|
From: Bill F. <bil...@mi...> - 2002-06-19 18:18:55
|
On Wed, 19 Jun 2002, Daniel Kobras wrote: > On Wed, Jun 19, 2002 at 10:43:19AM -0400, Bill Fink wrote: > > On Wed, 19 Jun 2002, Stefan Lucke wrote: > > > NO, thouse IDs come from X11. > > > #define FOURCC_YUY2 0x32595559 > > (Which is actually the hexdump of 'YUY2' [or '2YUY' depending on your > preferred endianness].) Thanks for that little tidbit. > > OK. I'm not sure I totally understand all this. xvinfo on XF 4.2 on > > ATI (both DRI and non-DRI) and NVIDIA all report "id: 0x32595559 (2YUY)" > > as the first available image format. Without the patch, only the ATI > > DRI case has wrong colors. The XF CVS patch may address the ATI DMA/DRI > > issue, but what about the NVIDIA case. Does this mean the NVIDIA X driver > > is currently broken (reporting incorrect image format)? > > The more I look into this, it seems that Xv implementations are flawed. > XvImageFormatValues contains an entry byte_order that should tell us > about the endianness the card wants to see. However, on the TiBook (ATI > Rage Mobility M3) at least, this field is set to LSBFirst, where > evidence clearly shows that it had better be MSBFirst. Which tells us > two things: 1) We cannot determine the correct byte order at compile > time. 2) The sane way to automatically probe the correct byte order at > runtime is flawed at least with some cards. Conclusion: We're screwed. > Easy way out: Let the user override default byte order with a runtime > switch. Comments? Yes, I believe a runtime option is the best workaround since I don't know of any reliable method of distinguishing between the different cases. > Below a little debugging patch to play with. It assumes the default in > current CVS, i.e. LSBFirst for little-endian systems, and MSBFirst on > big-endian machines, tests against the byte order reported by XV, and > bails out if they don't match. I get the following on my home dual 500 MHz G4 with an ATI Rage128 graphics card (either with or without DRI enabled): % playdv --no-mmap /dev/ieee1394/dv/host0/NTSC/in format 4:3 Audio is 32.0 kHz, 12 bits quantization, 2 channels, emphasis off Xv: ATI Rage128 Video Overlay: ports 59 - 59 Xv: ATI Rage128 Video Overlay: Unsupported endianness for format 0x32595559: LSBFirst Xv: ATI Rage128 Video Overlay: format 0x32595559 is NOT in format list ( 0x32595559[YUY2] 0x59565955[UYVY] 0x32315659[YV12] 0x30323449[I420] ) Xv: (ERROR) could not grab any port! playdv was compiled without SDL support Attempt to use gtk for display failed Unable to establish a display method The above was with DRI enabled. The only difference in the output with no DRI is the Xv ports are "55 - 55" instead of "59 - 59". I can't easily test my work system at the moment with the NVIDIA GeForce2 MX graphics card, but I suspect it would yield the same results since the xvinfo is the same for id 0x32595559 (2YUY). -Thanks -Bill |