hi folks! i would like to know whether there will be some function to decode to some plain 24 bit RGB buffer in the future. i think this feature is sometimes important, especially when using different surface layers, or when modifying the buffer in realtime. if this feature will definitely not be, could someone tell me how i can convert to some RGB buffer in realtime? i already tried different example codes, but i did not succeed, since i do not seem to understand the way the YCbCr data works.... thanks a lot in advance, ---david ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
Hi David, just look at the example player in Theora CVS, it should explain all important concepts. Markus david kment schrieb:>hi folks! > >i would like to know whether there will be some function to decode to some plain 24 bit RGB buffer in the future. > >i think this feature is sometimes important, especially when using different surface layers, or when modifying >the buffer in realtime. > >if this feature will definitely not be, could someone tell me how i can convert to some RGB buffer in realtime? >i already tried different example codes, but i did not succeed, since i do not seem to understand the way the YCbCr data works.... > >thanks a lot in advance, > > >---david > > > > >______________________________________________________________ >Verschicken Sie romantische, coole und witzige Bilder per SMS! >Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 > >_______________________________________________ >Theora mailing list >Theora@xiph.org >http://lists.xiph.org/mailman/listinfo/theora > > >
(sorry, the previous mail was sent individual instead of directly to the list...) i allready looked at the 3 different players, and they all use SDL, displaying directly to a YUV surface. i allready have taken a look at some code to convert a plain YUV (YCbCr) pixel to RGB, but what confuses me is the information that uncompressed YUV is just half the size of 24 bit RGB (don't know whether this is correct). the problem is that my application cannot display YUV images, and converting to 24 bit RGB is essential. so, how can i access the yuv buffer, to get the right value for each single pixel, which then can be converted? is it simply Y & U & V representing a non-interleaved pixel series? thanks, ---david> Markus Meyer <meyer@mesw.de> schrieb am 30.06.05 13:51:35: > > > > Hi David, > > > > just look at the example player in Theora CVS, it should explain all > > important concepts. > > > > > > Markus > > > > david kment schrieb: > > > > >hi folks! > > > > > >i would like to know whether there will be some function to decode to some plain 24 bit RGB buffer in the future. > > > > > >i think this feature is sometimes important, especially when using different surface layers, or when modifying > > >the buffer in realtime. > > > > > >if this feature will definitely not be, could someone tell me how i can convert to some RGB buffer in realtime? > > >i already tried different example codes, but i did not succeed, since i do not seem to understand the way the YCbCr data works.... > > > > > >thanks a lot in advance, > > > > > > > > >---david > > > > > > > > > > > > > > >______________________________________________________________ > > >Verschicken Sie romantische, coole und witzige Bilder per SMS! > > >Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 > > > > > >_______________________________________________ > > >Theora mailing list > > >Theora@xiph.org > > >http://lists.xiph.org/mailman/listinfo/theora > > > > > > > > > > > > >__________________________________________________________ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201
When I experimented with Theora, I used the discussion on http://www.fourcc.org/fccyvrgb.php to build my own formulas, which worked well. This is actually the first search result on Google when you search for "yuv to rgb conversion". Be sure to check out the link to Microsoft MSDN at the bottom, too. The page also has a good discussion on why there are sometimes different formulas used and what you can do to speed up calculation. Markus david kment schrieb:>i allready looked at the 3 different players, and they all use SDL, displaying directly to a YUV surface. > >i allready have taken a look at some code to convert a plain YUV (YCbCr) pixel to RGB, >but what confuses me is the information that uncompressed YUV is just half the size of 24 bit RGB >(don't know whether this is correct). > >the problem is that my application cannot display YUV images, and converting to 24 bit RGB is essential. > >so, how can i access the yuv buffer, to get the right value for each single pixel, which then can be converted? >is it simply Y & U & V representing a non-interleaved pixel series? > >thanks, > >---david > > >Markus Meyer <meyer@mesw.de> schrieb am 30.06.05 13:51:35: > > >>Hi David, >> >>just look at the example player in Theora CVS, it should explain all >>important concepts. >> >> >>Markus >> >>david kment schrieb: >> >> >> >>>hi folks! >>> >>>i would like to know whether there will be some function to decode to some plain 24 bit RGB buffer in the future. >>> >>>i think this feature is sometimes important, especially when using different surface layers, or when modifying >>>the buffer in realtime. >>> >>>if this feature will definitely not be, could someone tell me how i can convert to some RGB buffer in realtime? >>>i already tried different example codes, but i did not succeed, since i do not seem to understand the way the YCbCr data works.... >>> >>>thanks a lot in advance, >>> >>> >>>---david >>> >>> >>> >>> >>>______________________________________________________________ >>>Verschicken Sie romantische, coole und witzige Bilder per SMS! >>>Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 >>> >>>_______________________________________________ >>>Theora mailing list >>>Theora@xiph.org >>>http://lists.xiph.org/mailman/listinfo/theora >>> >>> >>> >>> >>> > > >______________________________________________________________ >Verschicken Sie romantische, coole und witzige Bilder per SMS! >Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 > > > >
On Thu, Jun 30, 2005 at 10:55:21AM +0200, david kment wrote:> i would like to know whether there will be some function to decode to some plain 24 bit RGB buffer in the future.I'd like to add such a thing, but it probably won't be until after the 1.0 release. Makes more sense to do a more general api addition where we return a general frame structure that can support various colourspace and pixel ordering options. I supposed in the meantime having something in examples woud be a good idea. Want to write something?> i think this feature is sometimes important, especially when using different surface layers, or when modifying > the buffer in realtime.If you're trying to do these things in realtime it might be faster to convert your other layers to planar YUV, and let the video card handle the conversion back for display like the example player. Depends which layer has the highest framerate, I guess.> if this feature will definitely not be, could someone tell me how i can convert to some RGB buffer in realtime? > i already tried different example codes, but i did not succeed, since i do not seem to understand the way the YCbCr data works....If it helps any, the YUV data is stored in planar format, which means each component is a separate image. Also the "U" and "V" channels can be subsampled by a factor of two from the full Y resolution. So to convert to normal RGB triplets, you have to combine pixels from the three planes, interpolate the U and V channels up to full resolution and then rotate to get RGB. The spec has full details of how to do this accurately, but most people don't bother with accurate colour and just do something fast. -r
Hi all, We have bunch of CG rendered movies in 640x368, NTSC, encoded with Theora using illiminable's DirectShow filters with default params (targetbitrate=400000, log2(keyframefreq)=64, quality=30). While quality is excellent during scenes with motion, all still frames have some very annoying problems. A still frame usually appears for dramatic pause (a character's face usually), or when there is a black screen with text-only ("A few hours later..."). When the still frame initially appears, it looks good, but as it stands still, its quality quickly degrades. Along object borders in the image, dots appear in what looks like dithering patterns grouped in small square blocks. Does anyone know what this is and/or how to get rid of that problem? It is not a small glitch, this is quite obvious and looks very bad. I can provide example movie if needed. Thanks in advance for any info you can give me, Alen