Stefan Lucke schrieb:
> 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.
> Do you get wrong colors too when I420 is selected ?
> 
> In DirectFB is I420 vs YV12 is swapped. I know that video is YV12. But
> we have to specify I420 in DirectFB. With X11 it is YV12 :-).
> 
> Look at the code of gfxdriver/radeon/radeon_overlay.c, (line 661):
> 
> 661                     if (surface->format == DSPF_YV12) {
> 662                          __u32 tmp  = offsets[1];
> 663                          offsets[1] = offsets[2];
> 664                          offsets[2] = tmp;
> 665                     }
> 
> They swap U/V in case of YV12 :-( .
> 
> There is to my optinion no need to swap again.
> 
I guess they swap U and V because the hardware only supports one of the
pixel formats. And in fact I think that makes sense, since exchanging
the pointers in the driver to get the other format is quite simple. So
to the hardware it doesn't matter if YV12 or I420 is selected,
radeon_overlay.c takes care of the swapping of the pointers, and to the
application it looks like there are two different pixel formats.

That means that we have to switch the pointers as well, so that the
hardware gets the correct pointers.
It is done like this in video-xv.c as well, and I can confirm that I
also get wrong colors with my Rage 128pro and my VIAcle266 using DFB.

So I would vote for either apply the patch or a similar one, or remove
either I420 or YV12. In my opinion it makes only sense to be able to
change between the two of them, if the driver is broken.

Bye,
Martin
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel

Reply via email to