Coda: imx53 plays video with incorrect colors

Nicolas Dufresne nicolas at ndufresne.ca
Mon Jan 18 01:18:29 UTC 2021


Le dim. 17 janv. 2021 08 h 47, Fabio Estevam <festevam at gmail.com> a écrit :

> Hi Nicolas,
>
> On Sat, Jan 16, 2021 at 11:46 PM Nicolas Dufresne <nicolas at ndufresne.ca>
> wrote:
>
> > Perhaps you would explain in detail what isn't color correct ? To debug
> this,
>
> Here is the movie showing the incorrect colors:
>
> https://www.dropbox.com/s/a4ifivpoi663dkd/mx53.mp4?dl=0



Ah, didn't realise this was a link to you filming a screen. This looks like
a UV inversion.

>
>
> The original video is this one:
> http://cdn.clipcanvas.com/sample/clipcanvas_14348_offline.mp4
>
> Please note that the color mismatch is not related to this specific
> video sample.
> It happens with all videos I have tried.
>
> > you probably want to inspect the caps and the colorimetry negotiated
> between
> > each element (use -v in gst-launch-1.0). It's quite possible that the
> decoder is
> > ignoring upstream colors and get badly hinted by the driver, or that
> kmssink is
> > pnot passing colorimetry to the driver.
>
> Here is the -v output:
>
> # gst-launch-1.0 -v filesrc location=/media/clip.mp4 ! qtdemux !
> h264parse ! v4l2h264dec ! kmssink
> Setting pipeline to PAUSED ...
> [   15.113196] msm msm: [drm:adreno_request_fw] loaded
> qcom/yamato_pm4.fw from new location
> [   15.124377] msm msm: [drm:adreno_request_fw] loaded
> qcom/yamato_pfp.fw from new location
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1024
> /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 576
> /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps =
> video/x-h264, stream-format=(string)avc, alignment=(string)au,
> level=(string)3.1, profile=(string)main,
> codec_data=(buffer)014d401fffe10
>
> 023674d401f967200800936028100000e100002bf203460016e40016e45ef7c1e1108a24001000468de3c80,
> width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1
> /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =
> video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,
> level=(string)3.1, profile=(string)main, width=(int)1024, height=(
> int)576, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1,
> chroma-format=(string)4:2:0, bit-depth-luma=(uint)8,
> bit-depth-chroma=(uint)8, parsed=(boolean)true
> /GstPipeline:pipeline0/v4l2h264dec:v4l2h264dec0.GstPad:sink: caps =
> video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,
> level=(string)3.1, profile=(string)main, width=(int)1024,
> height=(int)576, pixel-aspect-ratio=(fraction)1/1,
> framerate=(fraction)25/1, chroma-format=(string)4:2:0,
> bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
> /GstPipeline:pipeline0/v4l2h264dec:v4l2h264dec0.GstPad:src: caps =
> video/x-raw, format=(string)I420, width=(int)1024, height=(int)576,
> interlace-mode=(string)progressive, multiview-mode=(string)mono,
>
> multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
> pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jp
> eg, colorimetry=(string)bt601, framerate=(fraction)25/1
> /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps =
> video/x-raw, format=(string)I420, width=(int)1024, height=(int)576,
> interlace-mode=(string)progressive, multiview-mode=(string)mono,
>
> multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
> pixel-aspect-ratio=(fraction)1/1,
> chroma-site=(string)jpeg,colorimetry=(string)bt601,
> framerate=(fraction)25/1
> Pipeline is PREROLLED ...0 %)
> Setting pipeline to PLAYING ...
>

At first sight there is nothing wrong from GStreamer happening. It picks
i420, pass it to KMS and it comes out wrong, first suspect would be the
display driver. Understand that yuv formats are often unused and untested
as most display server / compositer uses rgb type of formats converting
with GPU.


New clock: GstSystemClock


>
>
>
> Any adjustment I need to do in the Gstreamer pipeline to negotiate the
> correct colors to the display?
>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210117/e97b8bcb/attachment.htm>


More information about the gstreamer-devel mailing list