Stefan Lucke schrieb: > 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. > > By this, it is proven to my opinion that our interpertation of decoded planes > is correct. > First plane Y, second plane U and third plane V. > I don't doubt that our interpretation of the planes is correct.
> - We have to specify I420 insteadof YV12 for most DirectFB drivers. So > DirectFB > does something bad. > If you are sure that DirectFB swapped I420 and YV12, then you should ask them to fix it. > Quoted code from DirectFB is a prove for the fact that they have mixed I420 > and YV12, > as it is not executed in case of I420. With I420 we get correct colors. > If they would swap chroma components in case of DSPF_I420 every thing would > be fine. > > It should be an acceptable action for users to toggle between I420 and YV12 > to get > the correct colors. > I don't think that users should have to work around known bugs in drivers or programs. Do you know any DirectFB driver which displays YV12 correctly and I420 not? If yes, that one should be fixed or, if you are right and most of the DirectFB drivers have I420 and YV12 swapped then all the others should be changed. But one thing is clear to me, if one driver behaves in an other way then the others, than this is a bug in DirectFB and should be fixed there. If we work around bugs all the time, instead of reporting them, no bugs will ever get fixed. > We could rename the OSD option to some less technical term if thats an issue. > > But I definitly vote against touching a swap in this place. > Whatever DirectFB does, pretending that I420 and YV12 has the same order of U and V planes is wrong. So in my opinion not swapping the U and V planes is a bug, but since I don't use DirectFB I don't care. Thank you Heikki, for the patch. Please don't stop reporting bugs and sending patches :-) Bye, Martin _______________________________________________ Softdevice-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/softdevice-devel
