|
From: Vladimir V. <vla...@In...> - 2000-08-14 05:10:05
|
On 7 Aug 2000, Charles 'Buck' Krasic wrote: > > Hi there. I have one comment so far on your simpledv api. > > You may want to reconsider the direct use of GdkPixmaps in DVFile. I > think that the natural output format of the decoder should be YUV, not > an RGB format like the GdkPixmap. When HW assist for YUV color > conversion and scaling are available, they make a massive difference > in performance. > > There are currently two patches in the libdv project page on > sourceforge.net which implement YUV rendering. One uses the Xv > extension directly, while the other uses the SDL library as a shim > over Xv (when it is present). Another as yet unimplemented approach > is to use OpenGL textures. > I'm currently extending GdkPixbuf to handle YUV Pixbufs, using the Xv extension (if available) to render to screen, otherwise do YUV->RGB conversion. However, I'm having trouble figuring out how to get the libdv code to spit out a YUV frame (hopefully encoded in IYU1 format, i.e. UYYVYY, in the NTSC 4:1:1 case -- what does the encoding look like in the PAL 4:2:0 case? The only FOURCC standard that I'm aware of for 4:2:0 is a planar not packed standard...) What I've done is just not do the ycrcb calls, and I wrote up two functions that place the 411 and 420 data straight into the buffer; but I'm getting garbled data. Note that I'm not sure if it's the data from there that's garbled, or if it's just being written to screen incorrectly.. still working on that. If you have any pointers, I'd appreciate any :-) - Vlad |