structyuv__buffer.tex 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. \section{yuv\_\-buffer Struct Reference}
  2. \label{structyuv__buffer}\index{yuv\_\-buffer@{yuv\_\-buffer}}
  3. A YUV buffer for passing uncompressed frames to and from the codec.
  4. {\ttfamily \#include $<$theora.h$>$}\subsection*{Data Fields}
  5. \begin{DoxyCompactItemize}
  6. \item
  7. int {\bf y\_\-width}
  8. \begin{DoxyCompactList}\small\item\em Width of the Y' luminance plane. \item\end{DoxyCompactList}\item
  9. int {\bf y\_\-height}
  10. \begin{DoxyCompactList}\small\item\em Height of the luminance plane. \item\end{DoxyCompactList}\item
  11. int {\bf y\_\-stride}
  12. \begin{DoxyCompactList}\small\item\em Offset in bytes between successive rows. \item\end{DoxyCompactList}\item
  13. int {\bf uv\_\-width}
  14. \begin{DoxyCompactList}\small\item\em Width of the Cb and Cr chroma planes. \item\end{DoxyCompactList}\item
  15. int {\bf uv\_\-height}
  16. \begin{DoxyCompactList}\small\item\em Height of the chroma planes. \item\end{DoxyCompactList}\item
  17. int {\bf uv\_\-stride}
  18. \begin{DoxyCompactList}\small\item\em Offset between successive chroma rows. \item\end{DoxyCompactList}\item
  19. unsigned char $\ast$ {\bf y}
  20. \begin{DoxyCompactList}\small\item\em Pointer to start of luminance data. \item\end{DoxyCompactList}\item
  21. unsigned char $\ast$ {\bf u}
  22. \begin{DoxyCompactList}\small\item\em Pointer to start of Cb data. \item\end{DoxyCompactList}\item
  23. unsigned char $\ast$ {\bf v}
  24. \begin{DoxyCompactList}\small\item\em Pointer to start of Cr data. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
  25. \subsection{Detailed Description}
  26. 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.
  27. 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.
  28. 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.
  29. 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.
  30. \subsection{Field Documentation}
  31. \index{yuv\_\-buffer@{yuv\_\-buffer}!u@{u}}
  32. \index{u@{u}!yuv_buffer@{yuv\_\-buffer}}
  33. \subsubsection[{u}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf yuv\_\-buffer::u}}\label{structyuv__buffer_a8b1857afe3ffac28f259499a57a559e1}
  34. Pointer to start of Cb data. \index{yuv\_\-buffer@{yuv\_\-buffer}!uv\_\-height@{uv\_\-height}}
  35. \index{uv\_\-height@{uv\_\-height}!yuv_buffer@{yuv\_\-buffer}}
  36. \subsubsection[{uv\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::uv\_\-height}}\label{structyuv__buffer_a640f1a0b456d3807f9f0538b22f10097}
  37. Height of the chroma planes. \index{yuv\_\-buffer@{yuv\_\-buffer}!uv\_\-stride@{uv\_\-stride}}
  38. \index{uv\_\-stride@{uv\_\-stride}!yuv_buffer@{yuv\_\-buffer}}
  39. \subsubsection[{uv\_\-stride}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::uv\_\-stride}}\label{structyuv__buffer_ab265cc24ffb5650bf52daf223b0debb9}
  40. Offset between successive chroma rows. \index{yuv\_\-buffer@{yuv\_\-buffer}!uv\_\-width@{uv\_\-width}}
  41. \index{uv\_\-width@{uv\_\-width}!yuv_buffer@{yuv\_\-buffer}}
  42. \subsubsection[{uv\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::uv\_\-width}}\label{structyuv__buffer_a8c59a57c35af0be519ee47f15e49fe2b}
  43. Width of the Cb and Cr chroma planes. \index{yuv\_\-buffer@{yuv\_\-buffer}!v@{v}}
  44. \index{v@{v}!yuv_buffer@{yuv\_\-buffer}}
  45. \subsubsection[{v}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf yuv\_\-buffer::v}}\label{structyuv__buffer_aa429491dd112adb0254672c59ef55075}
  46. Pointer to start of Cr data. \index{yuv\_\-buffer@{yuv\_\-buffer}!y@{y}}
  47. \index{y@{y}!yuv_buffer@{yuv\_\-buffer}}
  48. \subsubsection[{y}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf yuv\_\-buffer::y}}\label{structyuv__buffer_a725727c70eeced6b8c90866973399ac1}
  49. Pointer to start of luminance data. \index{yuv\_\-buffer@{yuv\_\-buffer}!y\_\-height@{y\_\-height}}
  50. \index{y\_\-height@{y\_\-height}!yuv_buffer@{yuv\_\-buffer}}
  51. \subsubsection[{y\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::y\_\-height}}\label{structyuv__buffer_a5a8b60e012247e2caffcbbaca99414e0}
  52. Height of the luminance plane. \index{yuv\_\-buffer@{yuv\_\-buffer}!y\_\-stride@{y\_\-stride}}
  53. \index{y\_\-stride@{y\_\-stride}!yuv_buffer@{yuv\_\-buffer}}
  54. \subsubsection[{y\_\-stride}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::y\_\-stride}}\label{structyuv__buffer_a9cdf61834c11b2351640a4a243ad0549}
  55. Offset in bytes between successive rows. \index{yuv\_\-buffer@{yuv\_\-buffer}!y\_\-width@{y\_\-width}}
  56. \index{y\_\-width@{y\_\-width}!yuv_buffer@{yuv\_\-buffer}}
  57. \subsubsection[{y\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf yuv\_\-buffer::y\_\-width}}\label{structyuv__buffer_aaa6c06c071da933231647238418d5fc0}
  58. Width of the Y' luminance plane.
  59. The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
  60. \item
  61. {\bf theora.h}\end{DoxyCompactItemize}