[MPlayer-G2-dev] impostor yv12

D Richard Felker III dalias at aerifal.cx
Wed Feb 4 16:45:35 CET 2004


On Wed, Feb 04, 2004 at 02:42:04AM +0200, Ivan Kalvachev wrote:
> Hello,
> I had send few patches and few mails to xvid people
> regarding their handling of YV12 format.
> In short they claimed that it is reversed and they swaped the UV
> planes. I had tracked a bug in DSHOW and VfW handling of
> IYUV - they had mapped it to yv12, while IYUV is the same as I420.
> Few weaks ago I checked the image.c routines and noticed that
> the thing are unchanged, but later i found out that the VfW/DShow issues
> have been sorted.
> 
> So,
> In short the YV12 format is not the format that mplayer claims it is.
> YV12 is in fact YVU / YCrCb /, that is in no way the default MPEG standart
> color format. As you know in MPEG 0,1,2,3 blocks are Y, Cb is #4 block, Cr
> is #5 block.
> Yes, I know that all code over mplayer-g1 use IMGFMT_YV12 as YUV, but in
> fact this format is the I420 or IYUV format. The real conversion is done
> at vo_xv (in draw_slice around line 488). Same for vo_directx and probably
> all that support planar formats. I should say that now I see the reason
> mplayer to have always U as plane[1] and V as plane[2].
> 
> Well, I don't want to change all IMGFMT_YV12 to I420, or to IMGFMT_YUV,
> as it is a too global change. But we should make G2 in the right way.
> Of cource if it is not already done.

RTFM, this is all nonsense. MPlayer does not care about plane order,
except when allocating or exporting buffers for crappy external
codecs/filters/vo's that care.

Rich




More information about the MPlayer-G2-dev mailing list