[theora] More examples?
yorn at gmx.net
Tue Feb 26 11:54:30 PST 2008
have you had a look at wikipedia?
The explanation is ok, to understand the idea behind YUV (against RGB for
As Monty said, the input/output format in theora is YUV420
That means, the first (width x hight) bytes are representing the luminance (Y)
of the picture. The U and V are the color(-difference) information to blue
and red respectivly.
As the human eye is more focused on luminance than on color, the color
differences are places in the subsequent (width/2 x hight/2) bytes. So that
the one color difference is responsible for a square of 2x2 luminance pixels.
All information (Y, U and V) are placed in 8 Bit.
All this is visualized on the wikipedia picture:
Hope that helps you.
PS: If you want to convert pictures, maybe imagemagick can help you. (I never
tried it so I do not really know)
Am Montag 25 Februar 2008 13:31:37 schrieb Manuel Dahmen:
> I want to make a program to extract frame from a theora movie as
> images. I tried with the decoding example located at theora web site
> (dump_video.c. I use it to extract a frame as yuv image but when I try
> to convert it to ppm with yuvtoppm program i obtain a strange image
> ( see http://poux.be/tmp/file.ppm ). I think it's a problem with the
> byte order for yuv, but don't I don't know anything about this format.
> I'd like to make a simple program to encode chosen frame into ppm.
> Perhaps it's just ordering properly the bytes issued from the
> write_video() function in the example and using yuvtoppm to make the
> What is the yuv format issued from dump_video.c (444, 422, 420 ?) and
> when can I find a not-too-hard-to-understand explanation of this format?
> Thanks in advance for your answers.
More information about the theora