[MPlayer-dev-eng] [PATCH] Fix inverted colours when capturing YV12 in V4L2 mode
Jindrich Makovicka
makovick at kmlinux.fjfi.cvut.cz
Fri Dec 16 20:07:25 CET 2005
Luc Gallant wrote:
> Fixes: When capturing YV12 in V4L2 mode, the U and V planes are
> inverted. This is because code was copied from V4L1, and V4L1 had a
> problem with some pixel formats Also fixes some formatting switch case
> entries that were wrong. Details of the YV12 == YVU420 are available
> here: http://v4l2spec.bytesex.org/spec-single/v4l2.html (search YV12)
>
> How to test if it works: Open up a device that sends YV12 video in
> V4L2, and see if the colours are inverted.
>
> In my case, I used my loopback driver (which is known to work with the
> YV12 format) to ensure that the patch worked.
> Another way to test is to capture an I420 stream (most capture cards),
> and play it in YV12 format, and make sure the colours are INVERTED
> (since i420 is the opposite of YV12)
What card are you using? I suppose it rather always produces YVU420,
even if it's asked to produce I420/YUV420. The current code works
without problems on my saa7134. The plane swapping is used since v4l1
because at least bt8x8 was unable to produce YV12/YVU420 natively.
--
Jindrich Makovicka
More information about the MPlayer-dev-eng
mailing list