la, 2006-09-16 kello 17:59 +0200, Stefan Lucke kirjoitti: > On Samstag 16 September 2006 16:42, Heikki Lindholm wrote: > > la, 2006-09-16 kello 15:25 +0200, Stefan Lucke kirjoitti: > > > On Samstag 16 September 2006 13:38, Heikki Lindholm wrote: > > > > YV12 has different U/V plane order compared to I420. This patch fixes > > > > the YUV() method in the dfb driver accordingly. Without the patch YV12 > > > > has wrong colours. > > > > > > So you get wrong colors when YV12 is selected. > > > > Yes. > > > > > Do you get wrong colors too when I420 is selected ? > > > > No. By the spec the U/V ordering is not the same for the I420 and YV12 > > color spaces, hence we need to swap pointers somewhere if the source > > data (the video) is always in the same format. When looking at different > > sources of information, there might well be some inconsistency in what > > exactly is the U/V order for the YV12 (or I420.) Anyway, if my patch > > works correctly for other hw (I have g400) then it's probably correct. > > > > From naming that would be correct. > > I want to explain my argumentation again. > We get some date from the decoder. Ffmpeg's name for that is YV12. > - If we select X11-Xv with YV12 we get correct colors. > - We get correct colors if we convert YV12 -> YUY2 and allocate an X11-Xv > surface > for format YUY2. > - We get correct colors (same decoder + same YV12 -> YUY2 converter) when > we use a YUY2 surface of directfb. > - Our software OSD converter (RGB -> YV12) produces correct colors too.
Here's my final take on the matter: * assume that the pointers Py,Pu,Pv always point to correct planes * xv works because you do a swap there, too (search for FOURCC_YV12) * YV12->YUY2 conversion works because it uses the pointers to the planes and not just a picture data starting address, ie. it doesn't care if the memory layout is Y,U,V or Y,V,U. This applies to the DFB YUY2 case, too * the copying routine in videoDFB::YUV() lays out the planes in Y,U,V order, but YV12 should be in Y,V,U order. That's why I420 works there and YV12 does not without swapping -- Heikki Lindholm _______________________________________________ Softdevice-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/softdevice-devel
