\section{yuv\_\-buffer Struct Reference}
\label{structyuv__buffer}\index{yuv\_\-buffer@{yuv\_\-buffer}}


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


{\ttfamily \#include $<$theora.h$>$}\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
int {\bf y\_\-width}
\begin{DoxyCompactList}\small\item\em Width of the Y' luminance plane. \item\end{DoxyCompactList}\item 
int {\bf y\_\-height}
\begin{DoxyCompactList}\small\item\em Height of the luminance plane. \item\end{DoxyCompactList}\item 
int {\bf y\_\-stride}
\begin{DoxyCompactList}\small\item\em Offset in bytes between successive rows. \item\end{DoxyCompactList}\item 
int {\bf uv\_\-width}
\begin{DoxyCompactList}\small\item\em Width of the Cb and Cr chroma planes. \item\end{DoxyCompactList}\item 
int {\bf uv\_\-height}
\begin{DoxyCompactList}\small\item\em Height of the chroma planes. \item\end{DoxyCompactList}\item 
int {\bf uv\_\-stride}
\begin{DoxyCompactList}\small\item\em Offset between successive chroma rows. \item\end{DoxyCompactList}\item 
unsigned char $\ast$ {\bf y}
\begin{DoxyCompactList}\small\item\em Pointer to start of luminance data. \item\end{DoxyCompactList}\item 
unsigned char $\ast$ {\bf u}
\begin{DoxyCompactList}\small\item\em Pointer to start of Cb data. \item\end{DoxyCompactList}\item 
unsigned char $\ast$ {\bf v}
\begin{DoxyCompactList}\small\item\em Pointer to start of Cr data. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{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 \doxyref{theora\_\-info}{p.}{structtheora__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 \doxyref{yuv\_\-buffer}{p.}{structyuv__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. 

\subsection{Field Documentation}
\index{yuv\_\-buffer@{yuv\_\-buffer}!u@{u}}
\index{u@{u}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{u}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf yuv\_\-buffer::u}}\label{structyuv__buffer_a8b1857afe3ffac28f259499a57a559e1}


Pointer to start of Cb data. \index{yuv\_\-buffer@{yuv\_\-buffer}!uv\_\-height@{uv\_\-height}}
\index{uv\_\-height@{uv\_\-height}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{uv\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::uv\_\-height}}\label{structyuv__buffer_a640f1a0b456d3807f9f0538b22f10097}


Height of the chroma planes. \index{yuv\_\-buffer@{yuv\_\-buffer}!uv\_\-stride@{uv\_\-stride}}
\index{uv\_\-stride@{uv\_\-stride}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{uv\_\-stride}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::uv\_\-stride}}\label{structyuv__buffer_ab265cc24ffb5650bf52daf223b0debb9}


Offset between successive chroma rows. \index{yuv\_\-buffer@{yuv\_\-buffer}!uv\_\-width@{uv\_\-width}}
\index{uv\_\-width@{uv\_\-width}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{uv\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::uv\_\-width}}\label{structyuv__buffer_a8c59a57c35af0be519ee47f15e49fe2b}


Width of the Cb and Cr chroma planes. \index{yuv\_\-buffer@{yuv\_\-buffer}!v@{v}}
\index{v@{v}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{v}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf yuv\_\-buffer::v}}\label{structyuv__buffer_aa429491dd112adb0254672c59ef55075}


Pointer to start of Cr data. \index{yuv\_\-buffer@{yuv\_\-buffer}!y@{y}}
\index{y@{y}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{y}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf yuv\_\-buffer::y}}\label{structyuv__buffer_a725727c70eeced6b8c90866973399ac1}


Pointer to start of luminance data. \index{yuv\_\-buffer@{yuv\_\-buffer}!y\_\-height@{y\_\-height}}
\index{y\_\-height@{y\_\-height}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{y\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::y\_\-height}}\label{structyuv__buffer_a5a8b60e012247e2caffcbbaca99414e0}


Height of the luminance plane. \index{yuv\_\-buffer@{yuv\_\-buffer}!y\_\-stride@{y\_\-stride}}
\index{y\_\-stride@{y\_\-stride}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{y\_\-stride}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::y\_\-stride}}\label{structyuv__buffer_a9cdf61834c11b2351640a4a243ad0549}


Offset in bytes between successive rows. \index{yuv\_\-buffer@{yuv\_\-buffer}!y\_\-width@{y\_\-width}}
\index{y\_\-width@{y\_\-width}!yuv_buffer@{yuv\_\-buffer}}
\subsubsection[{y\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::y\_\-width}}\label{structyuv__buffer_aaa6c06c071da933231647238418d5fc0}


Width of the Y' luminance plane. 

The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
\item 
{\bf theora.h}\end{DoxyCompactItemize}
