Sunxi NV12 detiling

Nicolas Dufresne nicolas.dufresne at collabora.com
Fri Dec 17 15:58:25 UTC 2021


Le vendredi 17 décembre 2021 à 13:31 +0100, Giulio Benetti via gstreamer-devel a
écrit :
> Hello Nicolas, All,
> 
> I'm dealing with Cedrus on Linux 5.15.7 with Gstreamer 1.19.3.1-git(the 
> latest main branch) and I've got to the point that on A13 and A20 I have 

A bit unrelated I suppose, but I have been blocked on the subject since the
decoder only produces green frames for me (I have a Lime2 A20 to test this). If
you could share your kernel branch, and the board DT that works, I could
possibly try and find the difference and unblock this work on my side.

> to detile the output of Sunxi video-engine, since now it's done in 
> software and this causes:
> ```
> videodecoder 
> gstvideodecoder.c:3670:gst_video_decoder_clip_and_push_buf:<v4l2slh264dec0> 
> Dropping frame due to QoS.
> ```
> using kmssink. And I get an entire frame every 5 seconds.

Of course all to be expected, the CPUs are not very fast, it is single threaded
by default (see video convert n-threads property), AND this is non-cached CMA
memory, so that is bare metal IOs, very very slow.

> 
> I've found this [1] IRC discussion where you state that kmssink support 
> is missing for GST_VIDEO_FORMAT_NV12_32L32. Basically what I understand 
> is that we need a special treatment for A13 and A20, since from >= A33 
> we have the support for the untiled output(still not tried, but I have 
> to do it with A64).
> 
> Where can I begin from to implement the kmssink support for detiling? 
> There is something I can imitate?
> Can you or someone else point me more or less where to start working?

This is all correct, I have a super old patch here that I started for Exynos 4
DRM, but never finished it. I supposed there is likely a helper now for
DrmModeAddFb2 (with modifiers, unless that helpers only exist for the atomic
API, something on my todo). This should be good hint how to translate these
formats to DRM+Modifiers.

https://gitlab.freedesktop.org/ndufresne/gst-plugins-bad/-/commit/ac14733163d770499d834bce12863fe6c4b1570c

> 
> [1]: 
> https://oftc.irclog.whitequark.org/linux-sunxi/2021-07-13#1626188848-1626188913;
> 
> Thanks in advance
> Best regards



More information about the gstreamer-devel mailing list