[MPlayer-dev-eng] [PATCH] Fix inverted colours when capturing YV12 in V4L2 mode

Luc Gallant lucgallant at gmail.com
Thu Dec 15 21:26:07 CET 2005


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)

Author: Luc Gallant (lucgallant at gmail.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lucgallant.patch
Type: text/x-patch
Size: 2152 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20051215/add70cbf/attachment.bin>


More information about the MPlayer-dev-eng mailing list