|
From: Bill F. <bil...@mi...> - 2002-06-17 04:48:54
|
On Sun, 16 Jun 2002, Daniel Kobras wrote: > On Fri, Jun 14, 2002 at 06:07:45PM -0400, Bill Fink wrote: > > I've run into a similar problem with my ATI graphics card. When I don't > > use DRI (and thus no DMA) kino gives weird byte swapped colors, but when > > I enable DRI (which also enables DMA) then the colors are fine. > > I need the attached patch to libdv (CVS) to convince playdv to produce > sane colours on PPC with Xv and SDL target. GTK is fine as is. Oh, and > I need to tell playdv to clamp luma; pure white appears as black > otherwise[1]. That was using a YUY2 (or rather 2YUY on big endian) Xv > display format. I'd guess that your kino first tried the buggy 411 > format and switched to 420 or plain RGB after you fiddled with the > configuration. This is actually an ATI driver bug. The same thing happened with the xine 0.9.9 logo which used YUY2 format (newer xine versions use MPEG-2 format which doesn't exhibit the problem). Without DMA (no DRI) the colors are byte swapped, but with DMA (DRI enabled) the colors are correct. Using an NVIDIA card (which doesn't support DRI) gives correct colors. Doing byte swapping in the application would fix the non-DRI/non-DMA ATI case, but would break the DRI/DMA ATI case and the NVIDIA (and presumably others) case (I know because I tried doing this for xine). > To libdv maintainers: > The WORDS_BIGENDIAN macro disappeared at some time. Same for > G_BYTE_ORDER. I changed the instances to use BYTE_ORDER from glibc's > endian.h, and also whacked a works-for-me big-endian patch for the 411 > code in YUY2.c. I'm rather ignorant to YUV colour spaces, so I'd be > happy if someone more knowledgeable than me looked into the lut issue > mentioned above. The playdv from the 0.9 libdv seems to work best for me on PPC. Besides being a royal pain trying to build more recent CVS versions, the audio is broken on these newer versions, probably because of the endianness issues you mentioned. You didn't mention any audio issues so I'm hoping your patch fixes that problem. I'm also wondering if there's any simple way to have playdv use YUV instead of YUY2, since that does work fine (that's what xine uses for normal MPEG-2 video such as when playing DVDs). > Regards, > > Daniel. > > [1] Bug in the ylut setup in dv_YUY2_init()? The lut isn't used on x86 > with MMX optimisation... -Thanks -Bill |