yuv_buffer Struct Reference

A YUV buffer for passing uncompressed frames to and from the codec. More...

#include <theora.h>


Data Fields

int y_width
 Width of the Y' luminance plane.
int y_height
 Height of the luminance plane.
int y_stride
 Offset in bytes between successive rows.
int uv_width
 Width of the Cb and Cr chroma planes.
int uv_height
 Height of the chroma planes.
int uv_stride
 Offset between successive chroma rows.
unsigned char * y
 Pointer to start of luminance data.
unsigned char * u
 Pointer to start of Cb data.
unsigned char * v
 Pointer to start of Cr data.


Detailed Description

A YUV buffer for passing uncompressed frames to and from the codec.

This holds a Y'CbCr frame in planar format. The CbCr planes can be subsampled and have their own separate dimensions and row stride offsets. Note that the strides may be negative in some configurations. For theora the width and height of the largest plane must be a multiple of 16. The actual meaningful picture size and offset are stored in the theora_info structure; frames returned by the decoder may need to be cropped for display.

All samples are 8 bits. Within each plane samples are ordered by row from the top of the frame to the bottom. Within each row samples are ordered from left to right.

During decode, the yuv_buffer struct is allocated by the user, but all fields (including luma and chroma pointers) are filled by the library. These pointers address library-internal memory and their contents should not be modified.

Conversely, during encode the user allocates the struct and fills out all fields. The user also manages the data addressed by the luma and chroma pointers. See the encoder_example.c and dump_video.c example files in theora/examples/ for more information.


The documentation for this struct was generated from the following file:
Generated on Thu Oct 4 16:23:03 2007 for libtheora by  doxygen 1.5.1