Re: impostor yv12
Arpi <[email protected]> Wed, 4 Feb 2004 02:44:18 +0100 (CET)
| Newsgroups | gmane.comp.video.mplayer.g2.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, > 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 probably time for you to read docs/tech/colorspaces.txt YV12 is really Y, V, U plane order in memory, _if_ you have aligned planes. although mplayer handles EVERY planar yuv formats (be it yv12, i420, iyuv, y422, yvu9 etc) as array[3] of planes, where 0=Y 1=U 2=V always! if you have 3 pointers, it doesnt matter if you call it yv12 or iyuv, it's still planar yuv and planes[1] is always points to U plane wherever it is. it only does matter, when you have single pointer only, and u+v are calculated internally (in codec dll, for example) from the y pointer by adding w*h and w*h*5/4 (this is the case with vfw/dshow, which uses single pointer) > 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, huh? i cant see why do you want/need to change it. > as it is a too global change. But we should make G2 in the right way. ??? A'rpi / Astral & ESP-team -- Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu