On Fri, 1 Mar 2002, Chris Nuernberger wrote: > I am writing a small video viewing application using xvideo, and I was > curious as to if there was an explanation page about some of the video > formats. I am using an nvidia card. Here is some sample output from the > video device querying routine > (XvQueryAdaptors): > > Format: 0x59565955 YUV LSBFirst GUID: UYVY bpp 16 packed ys 8 us 8 vs 8, hyp > 1 hup 2 hvp 2 vyp 1 vup 1 vvp 1. > This is a direct print of the struct filled in, with the names of a few of > the variables switched. Now, I appreciate that much information, but it does > not tell me enough. Its guid tells you what the format really is, and it > works with the v4l2 uyvy pixel format.
There is more information in that structure than you actually need. > > Now, I like to compress stuff on the side, and I like to use yuv420 because > it is ~half the size of a comparable rgb image, and it is a planar format > (i.e. works well w/ jpeg). Here are the two planar formats, again with > shortened descriptions: > Format: 0x30323449 YUV LSBFirst GUID: I420 bpp 12 planar > ys 8 us 8 vs 8, hyp 1 hup 2 hvp 2 vyp 1 vup 2 vvp 2 > > Format: 0x32315659 YUV LSBFirst GUID: YV12 bpp 12 planar > ys 8 us 8 vs 8, hyp 1 hup 2 hvp 2 vyp 1 vup 2 vvp 2 > > The periods are correct, but when I tried the first format with a YUV420 > format image, the picture looked almost completely incorrect. The second may > work, I will try it soon, but why did the first one not work? > > I imagine that the part 'GUID: I420' tells me everything I need again. > Probably, the UV planes need to be first in memory, followed by the Y plane > (the I is probably for Inverted). In the Windows world all anyone needs to know is the fourcc code (or the GUID). The format is unambiguously defined by this (at least the YUV formats are). Nobody uses anything other than this. > > But other than the GUID, nothing tells me as much. Where is the concrete > description so that I REALLY know what is going on? I want a map of where > the card expects that data to be in memory, so that I can hook it up. The > extension works GREAT when it works, but without more information on the > formats that the system is expecting, it becomes a tough process to play with > the system. Is this something that needs to be written (if so, I wouldn't > mind doing tests till I found out what the four formats were for). These are industry standard formats. Documented in many places on the web. Such as: http://www.webartz.com/fourcc/ Despite this, the XvImageFormatValues spells all of this out in excruciating detail. I don't understand what problem you are having. Mark. _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
