mirror of
https://github.com/love2d/megasource.git
synced 2026-08-21 13:10:24 +02:00
Updated libtheora from 1.1 to 1.1.1, we kept the CMakeLists.txt
--HG-- branch : update-to-libtheora-1.1.1
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
all: clean refman.dvi
|
||||
|
||||
ps: refman.ps
|
||||
|
||||
pdf: refman.pdf
|
||||
|
||||
ps_2on1: refman_2on1.ps
|
||||
|
||||
pdf_2on1: refman_2on1.pdf
|
||||
|
||||
refman.ps: refman.dvi
|
||||
dvips -o refman.ps refman.dvi
|
||||
|
||||
refman.pdf: refman.ps
|
||||
ps2pdf refman.ps refman.pdf
|
||||
|
||||
refman.dvi: refman.tex doxygen.sty
|
||||
echo "Running latex..."
|
||||
latex refman.tex
|
||||
echo "Running makeindex..."
|
||||
makeindex refman.idx
|
||||
echo "Rerunning latex...."
|
||||
latex refman.tex
|
||||
latex_count=5 ; \
|
||||
while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\
|
||||
do \
|
||||
echo "Rerunning latex...." ;\
|
||||
latex refman.tex ;\
|
||||
latex_count=`expr $$latex_count - 1` ;\
|
||||
done
|
||||
|
||||
refman_2on1.ps: refman.ps
|
||||
psnup -2 refman.ps >refman_2on1.ps
|
||||
|
||||
refman_2on1.pdf: refman_2on1.ps
|
||||
ps2pdf refman_2on1.ps refman_2on1.pdf
|
||||
|
||||
clean:
|
||||
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf
|
||||
@@ -0,0 +1,14 @@
|
||||
\section{Data Structures}
|
||||
Here are the data structures with brief descriptions:\begin{DoxyCompactList}
|
||||
\item\contentsline{section}{{\bf th\_\-comment} (The comment information )}{\pageref{structth__comment}}{}
|
||||
\item\contentsline{section}{{\bf th\_\-huff\_\-code} (A Huffman code for a Theora DCT token )}{\pageref{structth__huff__code}}{}
|
||||
\item\contentsline{section}{{\bf th\_\-img\_\-plane} (A buffer for a single color plane in an uncompressed image )}{\pageref{structth__img__plane}}{}
|
||||
\item\contentsline{section}{{\bf th\_\-info} (Theora bitstream information )}{\pageref{structth__info}}{}
|
||||
\item\contentsline{section}{{\bf th\_\-quant\_\-info} (A complete set of quantization parameters )}{\pageref{structth__quant__info}}{}
|
||||
\item\contentsline{section}{{\bf th\_\-quant\_\-ranges} (A set of {\itshape qi\/} ranges )}{\pageref{structth__quant__ranges}}{}
|
||||
\item\contentsline{section}{{\bf th\_\-stripe\_\-callback} (The striped decode callback data to pass to \doxyref{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}{p.}{theoradec_8h_ac95cc9e109474b0fa4bb920ab2cfdf1e} )}{\pageref{structth__stripe__callback}}{}
|
||||
\item\contentsline{section}{{\bf theora\_\-comment} (Comment header metadata )}{\pageref{structtheora__comment}}{}
|
||||
\item\contentsline{section}{{\bf theora\_\-info} (Theora bitstream info )}{\pageref{structtheora__info}}{}
|
||||
\item\contentsline{section}{{\bf theora\_\-state} (Codec internal state and context )}{\pageref{structtheora__state}}{}
|
||||
\item\contentsline{section}{{\bf yuv\_\-buffer} (A YUV buffer for passing uncompressed frames to and from the codec )}{\pageref{structyuv__buffer}}{}
|
||||
\end{DoxyCompactList}
|
||||
@@ -0,0 +1,233 @@
|
||||
\section{codec.h File Reference}
|
||||
\label{codec_8h}\index{codec.h@{codec.h}}
|
||||
|
||||
|
||||
The shared {\ttfamily libtheoradec} and {\ttfamily libtheoraenc} C API.
|
||||
{\ttfamily \#include $<$ogg/ogg.h$>$}\par
|
||||
\subsection*{Data Structures}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
struct {\bf th\_\-img\_\-plane}
|
||||
\begin{DoxyCompactList}\small\item\em A buffer for a single color plane in an uncompressed image. \item\end{DoxyCompactList}\item
|
||||
struct {\bf th\_\-info}
|
||||
\begin{DoxyCompactList}\small\item\em Theora bitstream information. \item\end{DoxyCompactList}\item
|
||||
struct {\bf th\_\-comment}
|
||||
\begin{DoxyCompactList}\small\item\em The comment information. \item\end{DoxyCompactList}\item
|
||||
struct {\bf th\_\-quant\_\-ranges}
|
||||
\begin{DoxyCompactList}\small\item\em A set of {\itshape qi\/} ranges. \item\end{DoxyCompactList}\item
|
||||
struct {\bf th\_\-quant\_\-info}
|
||||
\begin{DoxyCompactList}\small\item\em A complete set of quantization parameters. \item\end{DoxyCompactList}\item
|
||||
struct {\bf th\_\-huff\_\-code}
|
||||
\begin{DoxyCompactList}\small\item\em A Huffman code for a Theora DCT token. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Defines}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf \_\-O\_\-THEORA\_\-CODEC\_\-H\_\-}~(1)
|
||||
\item
|
||||
\#define {\bf TH\_\-NHUFFMAN\_\-TABLES}~(80)
|
||||
\begin{DoxyCompactList}\small\item\em The number of Huffman tables used by Theora. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-NDCT\_\-TOKENS}~(32)
|
||||
\begin{DoxyCompactList}\small\item\em The number of DCT token values in each table. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\begin{Indent}{\bf Return codes}\par
|
||||
{\em \label{_amgrp800007e5fae550658ee577ca16693452}
|
||||
}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf TH\_\-EFAULT}~(-\/1)
|
||||
\begin{DoxyCompactList}\small\item\em An invalid pointer was provided. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-EINVAL}~(-\/10)
|
||||
\begin{DoxyCompactList}\small\item\em An invalid argument was provided. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-EBADHEADER}~(-\/20)
|
||||
\begin{DoxyCompactList}\small\item\em The contents of the header were incomplete, invalid, or unexpected. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENOTFORMAT}~(-\/21)
|
||||
\begin{DoxyCompactList}\small\item\em The header does not belong to a Theora stream. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-EVERSION}~(-\/22)
|
||||
\begin{DoxyCompactList}\small\item\em The bitstream version is too high. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-EIMPL}~(-\/23)
|
||||
\begin{DoxyCompactList}\small\item\em The specified function is not implemented. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-EBADPACKET}~(-\/24)
|
||||
\begin{DoxyCompactList}\small\item\em There were errors in the video data packet. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DUPFRAME}~(1)
|
||||
\begin{DoxyCompactList}\small\item\em The decoded packet represented a dropped frame. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\subsection*{Typedefs}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
typedef {\bf th\_\-img\_\-plane} {\bf th\_\-ycbcr\_\-buffer} [3]
|
||||
\begin{DoxyCompactList}\small\item\em A complete image buffer for an uncompressed frame. \item\end{DoxyCompactList}\item
|
||||
typedef unsigned char {\bf th\_\-quant\_\-base} [64]
|
||||
\begin{DoxyCompactList}\small\item\em A single base matrix. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Enumerations}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
enum {\bf th\_\-colorspace} \{ {\bf TH\_\-CS\_\-UNSPECIFIED},
|
||||
{\bf TH\_\-CS\_\-ITU\_\-REC\_\-470M},
|
||||
{\bf TH\_\-CS\_\-ITU\_\-REC\_\-470BG},
|
||||
{\bf TH\_\-CS\_\-NSPACES}
|
||||
\}
|
||||
\begin{DoxyCompactList}\small\item\em The currently defined color space tags. \item\end{DoxyCompactList}\item
|
||||
enum {\bf th\_\-pixel\_\-fmt} \{ \par
|
||||
{\bf TH\_\-PF\_\-420},
|
||||
{\bf TH\_\-PF\_\-RSVD},
|
||||
{\bf TH\_\-PF\_\-422},
|
||||
{\bf TH\_\-PF\_\-444},
|
||||
\par
|
||||
{\bf TH\_\-PF\_\-NFORMATS}
|
||||
\}
|
||||
\begin{DoxyCompactList}\small\item\em The currently defined pixel format tags. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Functions}
|
||||
\begin{Indent}{\bf Basic shared functions}\par
|
||||
{\em \label{_amgrpb625c22fa07613c734f71c378fe32d7a}
|
||||
}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
const char $\ast$ {\bf th\_\-version\_\-string} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieves a human-\/readable string to identify the library vendor and version. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf th\_\-version\_\-number} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieves the library version number. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-int64\_\-t {\bf th\_\-granule\_\-frame} (void $\ast$\_\-encdec, ogg\_\-int64\_\-t \_\-granpos)
|
||||
\begin{DoxyCompactList}\small\item\em Converts a granule position to an absolute frame index, starting at {\ttfamily 0}. \item\end{DoxyCompactList}\item
|
||||
double {\bf th\_\-granule\_\-time} (void $\ast$\_\-encdec, ogg\_\-int64\_\-t \_\-granpos)
|
||||
\begin{DoxyCompactList}\small\item\em Converts a granule position to an absolute time in seconds. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-packet\_\-isheader} (ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Determines whether a Theora packet is a header or not. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-packet\_\-iskeyframe} (ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Determines whether a theora packet is a key frame or not. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\begin{Indent}{\bf Functions for manipulating header data}\par
|
||||
{\em \label{_amgrp14ef5f819e97c870c128539ed1f334e3}
|
||||
}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
void {\bf th\_\-info\_\-init} ({\bf th\_\-info} $\ast$\_\-info)
|
||||
\begin{DoxyCompactList}\small\item\em Initializes a \doxyref{th\_\-info}{p.}{structth__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-info\_\-clear} ({\bf th\_\-info} $\ast$\_\-info)
|
||||
\begin{DoxyCompactList}\small\item\em Clears a \doxyref{th\_\-info}{p.}{structth__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-init} ({\bf th\_\-comment} $\ast$\_\-tc)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize a \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-add} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-comment)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-add\_\-tag} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-tag, char $\ast$\_\-val)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\item
|
||||
char $\ast$ {\bf th\_\-comment\_\-query} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-tag, int \_\-count)
|
||||
\begin{DoxyCompactList}\small\item\em Look up a comment value by its tag. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-comment\_\-query\_\-count} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-tag)
|
||||
\begin{DoxyCompactList}\small\item\em Look up the number of instances of a tag. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-clear} ({\bf th\_\-comment} $\ast$\_\-tc)
|
||||
\begin{DoxyCompactList}\small\item\em Clears a \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
The shared {\ttfamily libtheoradec} and {\ttfamily libtheoraenc} C API. You don't need to include this directly.
|
||||
|
||||
\subsection{Define Documentation}
|
||||
\index{codec.h@{codec.h}!\_\-O\_\-THEORA\_\-CODEC\_\-H\_\-@{\_\-O\_\-THEORA\_\-CODEC\_\-H\_\-}}
|
||||
\index{\_\-O\_\-THEORA\_\-CODEC\_\-H\_\-@{\_\-O\_\-THEORA\_\-CODEC\_\-H\_\-}!codec.h@{codec.h}}
|
||||
\subsubsection[{\_\-O\_\-THEORA\_\-CODEC\_\-H\_\-}]{\setlength{\rightskip}{0pt plus 5cm}\#define \_\-O\_\-THEORA\_\-CODEC\_\-H\_\-~(1)}\label{codec_8h_a15352a6a862d25ab00a8f06ea65ee75b}
|
||||
\index{codec.h@{codec.h}!TH\_\-DUPFRAME@{TH\_\-DUPFRAME}}
|
||||
\index{TH\_\-DUPFRAME@{TH\_\-DUPFRAME}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-DUPFRAME}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DUPFRAME~(1)}\label{codec_8h_ab10e7b64f17a02707fc9348ea9832d09}
|
||||
|
||||
|
||||
The decoded packet represented a dropped frame. The player can continue to display the current frame, as the contents of the decoded frame buffer have not changed. \index{codec.h@{codec.h}!TH\_\-EBADHEADER@{TH\_\-EBADHEADER}}
|
||||
\index{TH\_\-EBADHEADER@{TH\_\-EBADHEADER}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-EBADHEADER}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-EBADHEADER~(-\/20)}\label{codec_8h_af00f7ecc5242d12a717202537324a510}
|
||||
|
||||
|
||||
The contents of the header were incomplete, invalid, or unexpected. \index{codec.h@{codec.h}!TH\_\-EBADPACKET@{TH\_\-EBADPACKET}}
|
||||
\index{TH\_\-EBADPACKET@{TH\_\-EBADPACKET}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-EBADPACKET}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-EBADPACKET~(-\/24)}\label{codec_8h_a6efb84e9c2213a8840003eee2847b27f}
|
||||
|
||||
|
||||
There were errors in the video data packet. \index{codec.h@{codec.h}!TH\_\-EFAULT@{TH\_\-EFAULT}}
|
||||
\index{TH\_\-EFAULT@{TH\_\-EFAULT}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-EFAULT}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-EFAULT~(-\/1)}\label{codec_8h_a4d8d8e34fc5ec39ffa05d61a310a0407}
|
||||
|
||||
|
||||
An invalid pointer was provided. \index{codec.h@{codec.h}!TH\_\-EIMPL@{TH\_\-EIMPL}}
|
||||
\index{TH\_\-EIMPL@{TH\_\-EIMPL}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-EIMPL}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-EIMPL~(-\/23)}\label{codec_8h_a921c47accc17841f220af5a6afb79efe}
|
||||
|
||||
|
||||
The specified function is not implemented. \index{codec.h@{codec.h}!TH\_\-EINVAL@{TH\_\-EINVAL}}
|
||||
\index{TH\_\-EINVAL@{TH\_\-EINVAL}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-EINVAL}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-EINVAL~(-\/10)}\label{codec_8h_afbbd9f19fbf292aeb62a37792cecb870}
|
||||
|
||||
|
||||
An invalid argument was provided. \index{codec.h@{codec.h}!TH\_\-ENOTFORMAT@{TH\_\-ENOTFORMAT}}
|
||||
\index{TH\_\-ENOTFORMAT@{TH\_\-ENOTFORMAT}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-ENOTFORMAT}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENOTFORMAT~(-\/21)}\label{codec_8h_a3dc08a00a9aba231be398f3e31726d9c}
|
||||
|
||||
|
||||
The header does not belong to a Theora stream. \index{codec.h@{codec.h}!TH\_\-EVERSION@{TH\_\-EVERSION}}
|
||||
\index{TH\_\-EVERSION@{TH\_\-EVERSION}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-EVERSION}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-EVERSION~(-\/22)}\label{codec_8h_ac3a45ef2b24f75259258edc481e3a122}
|
||||
|
||||
|
||||
The bitstream version is too high. \index{codec.h@{codec.h}!TH\_\-NDCT\_\-TOKENS@{TH\_\-NDCT\_\-TOKENS}}
|
||||
\index{TH\_\-NDCT\_\-TOKENS@{TH\_\-NDCT\_\-TOKENS}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-NDCT\_\-TOKENS}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-NDCT\_\-TOKENS~(32)}\label{codec_8h_a2a44f48084e76a58cae48fb5d47cd422}
|
||||
|
||||
|
||||
The number of DCT token values in each table. \index{codec.h@{codec.h}!TH\_\-NHUFFMAN\_\-TABLES@{TH\_\-NHUFFMAN\_\-TABLES}}
|
||||
\index{TH\_\-NHUFFMAN\_\-TABLES@{TH\_\-NHUFFMAN\_\-TABLES}!codec.h@{codec.h}}
|
||||
\subsubsection[{TH\_\-NHUFFMAN\_\-TABLES}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-NHUFFMAN\_\-TABLES~(80)}\label{codec_8h_a49bf449eae33c5320f0c308f32c6ae42}
|
||||
|
||||
|
||||
The number of Huffman tables used by Theora.
|
||||
|
||||
\subsection{Typedef Documentation}
|
||||
\index{codec.h@{codec.h}!th\_\-quant\_\-base@{th\_\-quant\_\-base}}
|
||||
\index{th\_\-quant\_\-base@{th\_\-quant\_\-base}!codec.h@{codec.h}}
|
||||
\subsubsection[{th\_\-quant\_\-base}]{\setlength{\rightskip}{0pt plus 5cm}typedef unsigned char {\bf th\_\-quant\_\-base}[64]}\label{codec_8h_a6a1426d16beef8a311d7f0e9d2e96326}
|
||||
|
||||
|
||||
A single base matrix. \index{codec.h@{codec.h}!th\_\-ycbcr\_\-buffer@{th\_\-ycbcr\_\-buffer}}
|
||||
\index{th\_\-ycbcr\_\-buffer@{th\_\-ycbcr\_\-buffer}!codec.h@{codec.h}}
|
||||
\subsubsection[{th\_\-ycbcr\_\-buffer}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf th\_\-img\_\-plane} {\bf th\_\-ycbcr\_\-buffer}[3]}\label{codec_8h_a343f7cfabad179cc4fe527cf06873f45}
|
||||
|
||||
|
||||
A complete image buffer for an uncompressed frame. The chroma planes may be decimated by a factor of two in either direction, as indicated by \doxyref{th\_\-info::pixel\_\-fmt}{p.}{structth__info_a2301388ef3755c41ab12fd144c1fc54e}. The width and height of the Y' plane must be multiples of 16. They may need to be cropped for display, using the rectangle specified by \doxyref{th\_\-info::pic\_\-x}{p.}{structth__info_a5b3f834bcf141564e7bb14f49101870f}, \doxyref{th\_\-info::pic\_\-y}{p.}{structth__info_a8aacc575cab2dfe3735001c2ad32aa14}, \doxyref{th\_\-info::pic\_\-width}{p.}{structth__info_a5048edf77b141dd3e9a92ca85e317345}, and \doxyref{th\_\-info::pic\_\-height}{p.}{structth__info_a775178474283c5990ba73f9ba7f6b88b}. All samples are 8 bits. \begin{DoxyNote}{Note}
|
||||
The term YUV often used to describe a colorspace is ambiguous. The exact parameters of the RGB to YUV conversion process aside, in many contexts the U and V channels actually have opposite meanings. To avoid this confusion, we are explicit: the name of the color channels are Y'CbCr, and they appear in that order, always. The prime symbol denotes that the Y channel is non-\/linear. Cb and Cr stand for \char`\"{}Chroma blue\char`\"{} and \char`\"{}Chroma red\char`\"{}, respectively.
|
||||
\end{DoxyNote}
|
||||
|
||||
|
||||
\subsection{Enumeration Type Documentation}
|
||||
\index{codec.h@{codec.h}!th\_\-colorspace@{th\_\-colorspace}}
|
||||
\index{th\_\-colorspace@{th\_\-colorspace}!codec.h@{codec.h}}
|
||||
\subsubsection[{th\_\-colorspace}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf th\_\-colorspace}}\label{codec_8h_a4ce7a695ce353b1582d29b6c1ddf31a0}
|
||||
|
||||
|
||||
The currently defined color space tags. See {\tt the Theora specification}, Chapter 4, for exact details on the meaning of each of these color spaces. \begin{Desc}
|
||||
\item[Enumerator: ]\par
|
||||
\begin{description}
|
||||
\index{TH\_\-CS\_\-UNSPECIFIED@{TH\_\-CS\_\-UNSPECIFIED}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-CS\_\-UNSPECIFIED@{TH\_\-CS\_\-UNSPECIFIED}}\item[{\em
|
||||
TH\_\-CS\_\-UNSPECIFIED\label{codec_8h_a4ce7a695ce353b1582d29b6c1ddf31a0adb9a17a3283c8d490652e507db2427cf}
|
||||
}]The color space was not specified at the encoder. It may be conveyed by an external means. \index{TH\_\-CS\_\-ITU\_\-REC\_\-470M@{TH\_\-CS\_\-ITU\_\-REC\_\-470M}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-CS\_\-ITU\_\-REC\_\-470M@{TH\_\-CS\_\-ITU\_\-REC\_\-470M}}\item[{\em
|
||||
TH\_\-CS\_\-ITU\_\-REC\_\-470M\label{codec_8h_a4ce7a695ce353b1582d29b6c1ddf31a0a1a19346bbfb8192baa4c185df73d3397}
|
||||
}]A color space designed for NTSC content. \index{TH\_\-CS\_\-ITU\_\-REC\_\-470BG@{TH\_\-CS\_\-ITU\_\-REC\_\-470BG}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-CS\_\-ITU\_\-REC\_\-470BG@{TH\_\-CS\_\-ITU\_\-REC\_\-470BG}}\item[{\em
|
||||
TH\_\-CS\_\-ITU\_\-REC\_\-470BG\label{codec_8h_a4ce7a695ce353b1582d29b6c1ddf31a0a009021d50836ddb0ec6004a2803775fe}
|
||||
}]A color space designed for PAL/SECAM content. \index{TH\_\-CS\_\-NSPACES@{TH\_\-CS\_\-NSPACES}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-CS\_\-NSPACES@{TH\_\-CS\_\-NSPACES}}\item[{\em
|
||||
TH\_\-CS\_\-NSPACES\label{codec_8h_a4ce7a695ce353b1582d29b6c1ddf31a0a0fa8ea07f583ee57943520ddb2f6e62e}
|
||||
}]The total number of currently defined color spaces. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
\index{codec.h@{codec.h}!th\_\-pixel\_\-fmt@{th\_\-pixel\_\-fmt}}
|
||||
\index{th\_\-pixel\_\-fmt@{th\_\-pixel\_\-fmt}!codec.h@{codec.h}}
|
||||
\subsubsection[{th\_\-pixel\_\-fmt}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf th\_\-pixel\_\-fmt}}\label{codec_8h_a5c9e7f2f0c7ed209c9ca3ed0abd328bc}
|
||||
|
||||
|
||||
The currently defined pixel format tags. See {\tt the Theora specification}, Section 4.4, for details on the precise sample locations. \begin{Desc}
|
||||
\item[Enumerator: ]\par
|
||||
\begin{description}
|
||||
\index{TH\_\-PF\_\-420@{TH\_\-PF\_\-420}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-PF\_\-420@{TH\_\-PF\_\-420}}\item[{\em
|
||||
TH\_\-PF\_\-420\label{codec_8h_a5c9e7f2f0c7ed209c9ca3ed0abd328bcafed7ad7ee4345930255827bff6055162}
|
||||
}]Chroma decimation by 2 in both the X and Y directions (4:2:0). The Cb and Cr chroma planes are half the width and half the height of the luma plane. \index{TH\_\-PF\_\-RSVD@{TH\_\-PF\_\-RSVD}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-PF\_\-RSVD@{TH\_\-PF\_\-RSVD}}\item[{\em
|
||||
TH\_\-PF\_\-RSVD\label{codec_8h_a5c9e7f2f0c7ed209c9ca3ed0abd328bca9e60af0159d42b20806d7eb4a8b833e6}
|
||||
}]Currently reserved. \index{TH\_\-PF\_\-422@{TH\_\-PF\_\-422}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-PF\_\-422@{TH\_\-PF\_\-422}}\item[{\em
|
||||
TH\_\-PF\_\-422\label{codec_8h_a5c9e7f2f0c7ed209c9ca3ed0abd328bca0271d01babf2f51512479f4a6245b9fa}
|
||||
}]Chroma decimation by 2 in the X direction (4:2:2). The Cb and Cr chroma planes are half the width of the luma plane, but full height. \index{TH\_\-PF\_\-444@{TH\_\-PF\_\-444}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-PF\_\-444@{TH\_\-PF\_\-444}}\item[{\em
|
||||
TH\_\-PF\_\-444\label{codec_8h_a5c9e7f2f0c7ed209c9ca3ed0abd328bca2ac50ac048ea75501a5e0f99a63c8c86}
|
||||
}]No chroma decimation (4:4:4). The Cb and Cr chroma planes are full width and full height. \index{TH\_\-PF\_\-NFORMATS@{TH\_\-PF\_\-NFORMATS}!codec.h@{codec.h}}\index{codec.h@{codec.h}!TH\_\-PF\_\-NFORMATS@{TH\_\-PF\_\-NFORMATS}}\item[{\em
|
||||
TH\_\-PF\_\-NFORMATS\label{codec_8h_a5c9e7f2f0c7ed209c9ca3ed0abd328bca2d6d78b9df1df086bb60f32f963a31eb}
|
||||
}]The total number of currently defined pixel formats. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{doxygen}
|
||||
|
||||
% Packages used by this style file
|
||||
\RequirePackage{alltt}
|
||||
\RequirePackage{array}
|
||||
\RequirePackage{calc}
|
||||
\RequirePackage{color}
|
||||
\RequirePackage{fancyhdr}
|
||||
\RequirePackage{verbatim}
|
||||
|
||||
% Setup fancy headings
|
||||
\pagestyle{fancyplain}
|
||||
\newcommand{\clearemptydoublepage}{%
|
||||
\newpage{\pagestyle{empty}\cleardoublepage}%
|
||||
}
|
||||
\renewcommand{\chaptermark}[1]{%
|
||||
\markboth{#1}{}%
|
||||
}
|
||||
\renewcommand{\sectionmark}[1]{%
|
||||
\markright{\thesection\ #1}%
|
||||
}
|
||||
\lhead[\fancyplain{}{\bfseries\thepage}]{%
|
||||
\fancyplain{}{\bfseries\rightmark}%
|
||||
}
|
||||
\rhead[\fancyplain{}{\bfseries\leftmark}]{%
|
||||
\fancyplain{}{\bfseries\thepage}%
|
||||
}
|
||||
\rfoot[\fancyplain{}{\bfseries\scriptsize%
|
||||
Generated on Mon Sep 28 11:02:24 2009 for libtheora by Doxygen }]{}
|
||||
\lfoot[]{\fancyplain{}{\bfseries\scriptsize%
|
||||
Generated on Mon Sep 28 11:02:24 2009 for libtheora by Doxygen }}
|
||||
\cfoot{}
|
||||
|
||||
%---------- Internal commands used in this style file ----------------
|
||||
|
||||
% Generic environment used by all paragraph-based environments defined
|
||||
% below. Note that the command \title{...} needs to be defined inside
|
||||
% those environments!
|
||||
\newenvironment{DoxyDesc}[1]{%
|
||||
\begin{list}{}%
|
||||
{%
|
||||
\settowidth{\labelwidth}{40pt}%
|
||||
\setlength{\leftmargin}{\labelwidth}%
|
||||
\setlength{\parsep}{0pt}%
|
||||
\setlength{\itemsep}{-4pt}%
|
||||
\renewcommand{\makelabel}{\entrylabel}%
|
||||
}%
|
||||
\item[#1:]%
|
||||
}{%
|
||||
\end{list}%
|
||||
}
|
||||
|
||||
%---------- Commands used by doxygen LaTeX output generator ----------
|
||||
|
||||
% Used by <pre> ... </pre>
|
||||
\newenvironment{DoxyPre}{%
|
||||
\small%
|
||||
\begin{alltt}%
|
||||
}{%
|
||||
\end{alltt}%
|
||||
\normalsize%
|
||||
}
|
||||
|
||||
% Used by @code ... @endcode
|
||||
\newenvironment{DoxyCode}{%
|
||||
\footnotesize%
|
||||
\verbatim%
|
||||
}{%
|
||||
\endverbatim%
|
||||
\normalsize%
|
||||
}
|
||||
|
||||
% Used by @example, @include, @includelineno and @dontinclude
|
||||
\newenvironment{DoxyCodeInclude}{%
|
||||
\DoxyCode%
|
||||
}{%
|
||||
\endDoxyCode%
|
||||
}
|
||||
|
||||
% Used by @verbatim ... @endverbatim
|
||||
\newenvironment{DoxyVerb}{%
|
||||
\footnotesize%
|
||||
\verbatim%
|
||||
}{%
|
||||
\endverbatim%
|
||||
\normalsize%
|
||||
}
|
||||
|
||||
% Used by @verbinclude
|
||||
\newenvironment{DoxyVerbInclude}{%
|
||||
\DoxyVerb%
|
||||
}{%
|
||||
\endDoxyVerb%
|
||||
}
|
||||
|
||||
% Used by numbered lists (using '-#' or <ol> ... </ol>)
|
||||
\newenvironment{DoxyEnumerate}{%
|
||||
\enumerate%
|
||||
}{%
|
||||
\endenumerate%
|
||||
}
|
||||
|
||||
% Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)
|
||||
\newenvironment{DoxyItemize}{%
|
||||
\itemize%
|
||||
}{%
|
||||
\enditemize%
|
||||
}
|
||||
|
||||
% Used by description lists (using <dl> ... </dl>)
|
||||
\newenvironment{DoxyDescription}{%
|
||||
\description%
|
||||
}{%
|
||||
\enddescription%
|
||||
}
|
||||
|
||||
% Used by @image, @dotfile, and @dot ... @enddot
|
||||
% (only if caption is specified)
|
||||
\newenvironment{DoxyImage}{%
|
||||
\begin{figure}[H]%
|
||||
\begin{center}%
|
||||
}{%
|
||||
\end{center}%
|
||||
\end{figure}%
|
||||
}
|
||||
|
||||
% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
|
||||
% (only if no caption is specified)
|
||||
\newenvironment{DoxyImageNoCaption}{%
|
||||
}{%
|
||||
}
|
||||
|
||||
% Used by @attention
|
||||
\newenvironment{DoxyAttention}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @author and @authors
|
||||
\newenvironment{DoxyAuthor}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @date
|
||||
\newenvironment{DoxyDate}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @invariant
|
||||
\newenvironment{DoxyInvariant}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @note
|
||||
\newenvironment{DoxyNote}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @post
|
||||
\newenvironment{DoxyPostcond}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @pre
|
||||
\newenvironment{DoxyPrecond}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @remark
|
||||
\newenvironment{DoxyRemark}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @return
|
||||
\newenvironment{DoxyReturn}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @since
|
||||
\newenvironment{DoxySince}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @see
|
||||
\newenvironment{DoxySeeAlso}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @version
|
||||
\newenvironment{DoxyVersion}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @warning
|
||||
\newenvironment{DoxyWarning}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @internal
|
||||
\newenvironment{DoxyInternal}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
}{%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by @par and @paragraph
|
||||
\newenvironment{DoxyParagraph}[1]{%
|
||||
\begin{list}{}%
|
||||
{%
|
||||
\settowidth{\labelwidth}{40pt}%
|
||||
\setlength{\leftmargin}{\labelwidth}%
|
||||
\setlength{\parsep}{0pt}%
|
||||
\setlength{\itemsep}{-4pt}%
|
||||
\renewcommand{\makelabel}{\entrylabel}%
|
||||
}%
|
||||
\item[#1]%
|
||||
}{%
|
||||
\end{list}%
|
||||
}
|
||||
|
||||
% Used by parameter lists
|
||||
\newenvironment{DoxyParams}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
\begin{description}%
|
||||
}{%
|
||||
\end{description}%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by return value lists
|
||||
\newenvironment{DoxyRetVals}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
\begin{description}%
|
||||
}{%
|
||||
\end{description}%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by exception lists
|
||||
\newenvironment{DoxyExceptions}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
\begin{description}%
|
||||
}{%
|
||||
\end{description}%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
% Used by template parameter lists
|
||||
\newenvironment{DoxyTemplParams}[1]{%
|
||||
\begin{DoxyDesc}{#1}%
|
||||
\begin{description}%
|
||||
}{%
|
||||
\end{description}%
|
||||
\end{DoxyDesc}%
|
||||
}
|
||||
|
||||
\newcommand{\doxyref}[3]{\textbf{#1} (\textnormal{#2}\,\pageref{#3})}
|
||||
\newenvironment{DoxyCompactList}
|
||||
{\begin{list}{}{
|
||||
\setlength{\leftmargin}{0.5cm}
|
||||
\setlength{\itemsep}{0pt}
|
||||
\setlength{\parsep}{0pt}
|
||||
\setlength{\topsep}{0pt}
|
||||
\renewcommand{\makelabel}{\hfill}}}
|
||||
{\end{list}}
|
||||
\newenvironment{DoxyCompactItemize}
|
||||
{
|
||||
\begin{itemize}
|
||||
\setlength{\itemsep}{-3pt}
|
||||
\setlength{\parsep}{0pt}
|
||||
\setlength{\topsep}{0pt}
|
||||
\setlength{\partopsep}{0pt}
|
||||
}
|
||||
{\end{itemize}}
|
||||
\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}
|
||||
\newlength{\tmplength}
|
||||
\newenvironment{TabularC}[1]
|
||||
{
|
||||
\setlength{\tmplength}
|
||||
{\linewidth/(#1)-\tabcolsep*2-\arrayrulewidth*(#1+1)/(#1)}
|
||||
\par\begin{tabular*}{\linewidth}
|
||||
{*{#1}{|>{\PBS\raggedright\hspace{0pt}}p{\the\tmplength}}|}
|
||||
}
|
||||
{\end{tabular*}\par}
|
||||
\newcommand{\entrylabel}[1]{
|
||||
{\parbox[b]{\labelwidth-4pt}{\makebox[0pt][l]{\textbf{#1}}\vspace{1.5\baselineskip}}}}
|
||||
\newenvironment{Desc}
|
||||
{\begin{list}{}
|
||||
{
|
||||
\settowidth{\labelwidth}{40pt}
|
||||
\setlength{\leftmargin}{\labelwidth}
|
||||
\setlength{\parsep}{0pt}
|
||||
\setlength{\itemsep}{-4pt}
|
||||
\renewcommand{\makelabel}{\entrylabel}
|
||||
}
|
||||
}
|
||||
{\end{list}}
|
||||
\newenvironment{Indent}
|
||||
{\begin{list}{}{\setlength{\leftmargin}{0.5cm}}
|
||||
\item[]\ignorespaces}
|
||||
{\unskip\end{list}}
|
||||
\setlength{\parindent}{0cm}
|
||||
\setlength{\parskip}{0.2cm}
|
||||
\addtocounter{secnumdepth}{1}
|
||||
\sloppy
|
||||
\usepackage[T1]{fontenc}
|
||||
\makeatletter
|
||||
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0ex}%
|
||||
{-3.25ex plus -1ex minus -0.2ex}%
|
||||
{1.5ex plus 0.2ex}%
|
||||
{\normalfont\normalsize\bfseries}}
|
||||
\makeatother
|
||||
\stepcounter{secnumdepth}
|
||||
\stepcounter{tocdepth}
|
||||
\definecolor{comment}{rgb}{0.5,0.0,0.0}
|
||||
\definecolor{keyword}{rgb}{0.0,0.5,0.0}
|
||||
\definecolor{keywordtype}{rgb}{0.38,0.25,0.125}
|
||||
\definecolor{keywordflow}{rgb}{0.88,0.5,0.0}
|
||||
\definecolor{preprocessor}{rgb}{0.5,0.38,0.125}
|
||||
\definecolor{stringliteral}{rgb}{0.0,0.125,0.25}
|
||||
\definecolor{charliteral}{rgb}{0.0,0.5,0.5}
|
||||
\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}
|
||||
\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}
|
||||
\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}
|
||||
\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}
|
||||
@@ -0,0 +1,7 @@
|
||||
\section{File List}
|
||||
Here is a list of all files with brief descriptions:\begin{DoxyCompactList}
|
||||
\item\contentsline{section}{{\bf codec.h} (The shared {\ttfamily libtheoradec} and {\ttfamily libtheoraenc} C API )}{\pageref{codec_8h}}{}
|
||||
\item\contentsline{section}{{\bf theora.h} (The libtheora pre-\/1.0 legacy C API )}{\pageref{theora_8h}}{}
|
||||
\item\contentsline{section}{{\bf theoradec.h} (The {\ttfamily libtheoradec} C decoding API )}{\pageref{theoradec_8h}}{}
|
||||
\item\contentsline{section}{{\bf theoraenc.h} (The {\ttfamily libtheoraenc} C encoding API )}{\pageref{theoraenc_8h}}{}
|
||||
\end{DoxyCompactList}
|
||||
@@ -0,0 +1,190 @@
|
||||
\section{Functions Shared by Encode and Decode}
|
||||
\label{group__basefuncs}\index{Functions Shared by Encode and Decode@{Functions Shared by Encode and Decode}}
|
||||
\subsection*{Basic shared functions}
|
||||
\label{_amgrpb625c22fa07613c734f71c378fe32d7a}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
const char $\ast$ {\bf th\_\-version\_\-string} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieves a human-\/readable string to identify the library vendor and version. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf th\_\-version\_\-number} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieves the library version number. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-int64\_\-t {\bf th\_\-granule\_\-frame} (void $\ast$\_\-encdec, ogg\_\-int64\_\-t \_\-granpos)
|
||||
\begin{DoxyCompactList}\small\item\em Converts a granule position to an absolute frame index, starting at {\ttfamily 0}. \item\end{DoxyCompactList}\item
|
||||
double {\bf th\_\-granule\_\-time} (void $\ast$\_\-encdec, ogg\_\-int64\_\-t \_\-granpos)
|
||||
\begin{DoxyCompactList}\small\item\em Converts a granule position to an absolute time in seconds. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-packet\_\-isheader} (ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Determines whether a Theora packet is a header or not. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-packet\_\-iskeyframe} (ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Determines whether a theora packet is a key frame or not. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Functions for manipulating header data}
|
||||
\label{_amgrp14ef5f819e97c870c128539ed1f334e3}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
void {\bf th\_\-info\_\-init} ({\bf th\_\-info} $\ast$\_\-info)
|
||||
\begin{DoxyCompactList}\small\item\em Initializes a \doxyref{th\_\-info}{p.}{structth__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-info\_\-clear} ({\bf th\_\-info} $\ast$\_\-info)
|
||||
\begin{DoxyCompactList}\small\item\em Clears a \doxyref{th\_\-info}{p.}{structth__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-init} ({\bf th\_\-comment} $\ast$\_\-tc)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize a \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-add} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-comment)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-add\_\-tag} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-tag, char $\ast$\_\-val)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\item
|
||||
char $\ast$ {\bf th\_\-comment\_\-query} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-tag, int \_\-count)
|
||||
\begin{DoxyCompactList}\small\item\em Look up a comment value by its tag. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-comment\_\-query\_\-count} ({\bf th\_\-comment} $\ast$\_\-tc, char $\ast$\_\-tag)
|
||||
\begin{DoxyCompactList}\small\item\em Look up the number of instances of a tag. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-comment\_\-clear} ({\bf th\_\-comment} $\ast$\_\-tc)
|
||||
\begin{DoxyCompactList}\small\item\em Clears a \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Function Documentation}
|
||||
\index{basefuncs@{basefuncs}!th\_\-comment\_\-add@{th\_\-comment\_\-add}}
|
||||
\index{th\_\-comment\_\-add@{th\_\-comment\_\-add}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-comment\_\-add}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-comment\_\-add ({\bf th\_\-comment} $\ast$ {\em \_\-tc}, \/ char $\ast$ {\em \_\-comment})}\label{group__basefuncs_ga19a1f7b8032db957df151a34e5ac9272}
|
||||
|
||||
|
||||
Add a comment to an initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \begin{DoxyNote}{Note}
|
||||
Neither \doxyref{th\_\-comment\_\-add()}{p.}{group__basefuncs_ga19a1f7b8032db957df151a34e5ac9272} nor \doxyref{th\_\-comment\_\-add\_\-tag()}{p.}{group__basefuncs_ga6c5edc201ca220a30787ca6c1ddcaeaf} support comments containing null values, although the bitstream format does support them. To add such comments you will need to manipulate the \doxyref{th\_\-comment}{p.}{structth__comment} structure directly.
|
||||
\end{DoxyNote}
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-tc}]The \doxyref{th\_\-comment}{p.}{structth__comment} struct to add the comment to. \item[{\em \_\-comment}]Must be a null-\/terminated UTF-\/8 string containing the comment in \char`\"{}TAG=the value\char`\"{} form. \end{DoxyParams}
|
||||
\index{basefuncs@{basefuncs}!th\_\-comment\_\-add\_\-tag@{th\_\-comment\_\-add\_\-tag}}
|
||||
\index{th\_\-comment\_\-add\_\-tag@{th\_\-comment\_\-add\_\-tag}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-comment\_\-add\_\-tag}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-comment\_\-add\_\-tag ({\bf th\_\-comment} $\ast$ {\em \_\-tc}, \/ char $\ast$ {\em \_\-tag}, \/ char $\ast$ {\em \_\-val})}\label{group__basefuncs_ga6c5edc201ca220a30787ca6c1ddcaeaf}
|
||||
|
||||
|
||||
Add a comment to an initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \begin{DoxyNote}{Note}
|
||||
Neither \doxyref{th\_\-comment\_\-add()}{p.}{group__basefuncs_ga19a1f7b8032db957df151a34e5ac9272} nor \doxyref{th\_\-comment\_\-add\_\-tag()}{p.}{group__basefuncs_ga6c5edc201ca220a30787ca6c1ddcaeaf} support comments containing null values, although the bitstream format does support them. To add such comments you will need to manipulate the \doxyref{th\_\-comment}{p.}{structth__comment} structure directly.
|
||||
\end{DoxyNote}
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-tc}]The \doxyref{th\_\-comment}{p.}{structth__comment} struct to add the comment to. \item[{\em \_\-tag}]A null-\/terminated string containing the tag associated with the comment. \item[{\em \_\-val}]The corresponding value as a null-\/terminated string. \end{DoxyParams}
|
||||
\index{basefuncs@{basefuncs}!th\_\-comment\_\-clear@{th\_\-comment\_\-clear}}
|
||||
\index{th\_\-comment\_\-clear@{th\_\-comment\_\-clear}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-comment\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-comment\_\-clear ({\bf th\_\-comment} $\ast$ {\em \_\-tc})}\label{group__basefuncs_gae736c1afa514947a3feb223143af95e3}
|
||||
|
||||
|
||||
Clears a \doxyref{th\_\-comment}{p.}{structth__comment} structure. This should be called on a \doxyref{th\_\-comment}{p.}{structth__comment} structure after it is no longer needed. It will free all memory used by the structure members.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-tc}]The \doxyref{th\_\-comment}{p.}{structth__comment} struct to clear. \end{DoxyParams}
|
||||
\index{basefuncs@{basefuncs}!th\_\-comment\_\-init@{th\_\-comment\_\-init}}
|
||||
\index{th\_\-comment\_\-init@{th\_\-comment\_\-init}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-comment\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-comment\_\-init ({\bf th\_\-comment} $\ast$ {\em \_\-tc})}\label{group__basefuncs_ga6c8ab25988e7ea9d7b1e31a54cf58f09}
|
||||
|
||||
|
||||
Initialize a \doxyref{th\_\-comment}{p.}{structth__comment} structure. This should be called on a freshly allocated \doxyref{th\_\-comment}{p.}{structth__comment} structure before attempting to use it.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-tc}]The \doxyref{th\_\-comment}{p.}{structth__comment} struct to initialize. \end{DoxyParams}
|
||||
\index{basefuncs@{basefuncs}!th\_\-comment\_\-query@{th\_\-comment\_\-query}}
|
||||
\index{th\_\-comment\_\-query@{th\_\-comment\_\-query}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-comment\_\-query}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ th\_\-comment\_\-query ({\bf th\_\-comment} $\ast$ {\em \_\-tc}, \/ char $\ast$ {\em \_\-tag}, \/ int {\em \_\-count})}\label{group__basefuncs_ga33c8b4f57a03217636d704c2ebb211fa}
|
||||
|
||||
|
||||
Look up a comment value by its tag.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-tc}]An initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item[{\em \_\-tag}]The tag to look up. \item[{\em \_\-count}]The instance of the tag. The same tag can appear multiple times, each with a distinct value, so an index is required to retrieve them all. The order in which these values appear is significant and should be preserved. Use \doxyref{th\_\-comment\_\-query\_\-count()}{p.}{group__basefuncs_ga81d518dc4426f63ceaedcbe2668679fc} to get the legal range for the {\itshape \_\-count\/} parameter. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
A pointer to the queried tag's value. This points directly to data in the \doxyref{th\_\-comment}{p.}{structth__comment} structure. It should not be modified or freed by the application, and modifications to the structure may invalidate the pointer.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em NULL}]If no matching tag is found. \end{DoxyRetVals}
|
||||
\index{basefuncs@{basefuncs}!th\_\-comment\_\-query\_\-count@{th\_\-comment\_\-query\_\-count}}
|
||||
\index{th\_\-comment\_\-query\_\-count@{th\_\-comment\_\-query\_\-count}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-comment\_\-query\_\-count}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-comment\_\-query\_\-count ({\bf th\_\-comment} $\ast$ {\em \_\-tc}, \/ char $\ast$ {\em \_\-tag})}\label{group__basefuncs_ga81d518dc4426f63ceaedcbe2668679fc}
|
||||
|
||||
|
||||
Look up the number of instances of a tag. Call this first when querying for a specific tag and then iterate over the number of instances with separate calls to \doxyref{th\_\-comment\_\-query()}{p.}{group__basefuncs_ga33c8b4f57a03217636d704c2ebb211fa} to retrieve all the values for that tag in order.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-tc}]An initialized \doxyref{th\_\-comment}{p.}{structth__comment} structure. \item[{\em \_\-tag}]The tag to look up. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The number on instances of this particular tag.
|
||||
\end{DoxyReturn}
|
||||
\index{basefuncs@{basefuncs}!th\_\-granule\_\-frame@{th\_\-granule\_\-frame}}
|
||||
\index{th\_\-granule\_\-frame@{th\_\-granule\_\-frame}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-granule\_\-frame}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-int64\_\-t th\_\-granule\_\-frame (void $\ast$ {\em \_\-encdec}, \/ ogg\_\-int64\_\-t {\em \_\-granpos})}\label{group__basefuncs_ga95b10e76fc4c05d0240ea2dfd9fd62bd}
|
||||
|
||||
|
||||
Converts a granule position to an absolute frame index, starting at {\ttfamily 0}. The granule position is interpreted in the context of a given \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} or \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle (either will suffice).
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-encdec}]A previously allocated \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} or \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle. \item[{\em \_\-granpos}]The granule position to convert. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The absolute frame index corresponding to {\itshape \_\-granpos\/}.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em -\/1}]The given granule position was invalid (i.e. negative). \end{DoxyRetVals}
|
||||
\index{basefuncs@{basefuncs}!th\_\-granule\_\-time@{th\_\-granule\_\-time}}
|
||||
\index{th\_\-granule\_\-time@{th\_\-granule\_\-time}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-granule\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}double th\_\-granule\_\-time (void $\ast$ {\em \_\-encdec}, \/ ogg\_\-int64\_\-t {\em \_\-granpos})}\label{group__basefuncs_ga707e1e281de788af0df39ef00f3fb432}
|
||||
|
||||
|
||||
Converts a granule position to an absolute time in seconds. The granule position is interpreted in the context of a given \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} or \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle (either will suffice).
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-encdec}]A previously allocated \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} or \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle. \item[{\em \_\-granpos}]The granule position to convert. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The absolute time in seconds corresponding to {\itshape \_\-granpos\/}. This is the \char`\"{}end time\char`\"{} for the frame, or the latest time it should be displayed. It is not the presentation time.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em -\/1}]The given granule position was invalid (i.e. negative). \end{DoxyRetVals}
|
||||
\index{basefuncs@{basefuncs}!th\_\-info\_\-clear@{th\_\-info\_\-clear}}
|
||||
\index{th\_\-info\_\-clear@{th\_\-info\_\-clear}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-info\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-info\_\-clear ({\bf th\_\-info} $\ast$ {\em \_\-info})}\label{group__basefuncs_gab3d6441ab4a4969859ef5fd78a9e3c1c}
|
||||
|
||||
|
||||
Clears a \doxyref{th\_\-info}{p.}{structth__info} structure. This should be called on a \doxyref{th\_\-info}{p.}{structth__info} structure after it is no longer needed.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-info}]The \doxyref{th\_\-info}{p.}{structth__info} struct to clear. \end{DoxyParams}
|
||||
\index{basefuncs@{basefuncs}!th\_\-info\_\-init@{th\_\-info\_\-init}}
|
||||
\index{th\_\-info\_\-init@{th\_\-info\_\-init}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-info\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-info\_\-init ({\bf th\_\-info} $\ast$ {\em \_\-info})}\label{group__basefuncs_ga430d9c605816a6ca0bdce3a0b965b926}
|
||||
|
||||
|
||||
Initializes a \doxyref{th\_\-info}{p.}{structth__info} structure. This should be called on a freshly allocated \doxyref{th\_\-info}{p.}{structth__info} structure before attempting to use it.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-info}]The \doxyref{th\_\-info}{p.}{structth__info} struct to initialize. \end{DoxyParams}
|
||||
\index{basefuncs@{basefuncs}!th\_\-packet\_\-isheader@{th\_\-packet\_\-isheader}}
|
||||
\index{th\_\-packet\_\-isheader@{th\_\-packet\_\-isheader}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-packet\_\-isheader}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-packet\_\-isheader (ogg\_\-packet $\ast$ {\em \_\-op})}\label{group__basefuncs_ga02f3f38261a9b39452d8a5e6f8737cc1}
|
||||
|
||||
|
||||
Determines whether a Theora packet is a header or not. This function does no verification beyond checking the packet type bit, so it should not be used for bitstream identification; use \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50} for that. As per the Theora specification, an empty (0-\/byte) packet is treated as a data packet (a delta frame with no coded blocks).
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-op}]An {\ttfamily ogg\_\-packet} containing encoded Theora data. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 1}]The packet is a header packet \item[{\em 0}]The packet is a video data packet. \end{DoxyRetVals}
|
||||
\index{basefuncs@{basefuncs}!th\_\-packet\_\-iskeyframe@{th\_\-packet\_\-iskeyframe}}
|
||||
\index{th\_\-packet\_\-iskeyframe@{th\_\-packet\_\-iskeyframe}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-packet\_\-iskeyframe}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-packet\_\-iskeyframe (ogg\_\-packet $\ast$ {\em \_\-op})}\label{group__basefuncs_gafe95cfd06f0fef413266c9168a66248a}
|
||||
|
||||
|
||||
Determines whether a theora packet is a key frame or not. This function does no verification beyond checking the packet type and key frame bits, so it should not be used for bitstream identification; use \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50} for that. As per the Theora specification, an empty (0-\/byte) packet is treated as a delta frame (with no coded blocks).
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-op}]An {\ttfamily ogg\_\-packet} containing encoded Theora data. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 1}]The packet contains a key frame. \item[{\em 0}]The packet contains a delta frame. \item[{\em -\/1}]The packet is not a video data packet. \end{DoxyRetVals}
|
||||
\index{basefuncs@{basefuncs}!th\_\-version\_\-number@{th\_\-version\_\-number}}
|
||||
\index{th\_\-version\_\-number@{th\_\-version\_\-number}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-version\_\-number}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t th\_\-version\_\-number (void)}\label{group__basefuncs_gab723a75c0f95b3eb817f7f769846016b}
|
||||
|
||||
|
||||
Retrieves the library version number. This is the highest bitstream version that the encoder library will produce, or that the decoder library can decode. This number is composed of a 16-\/bit major version, 8-\/bit minor version and 8 bit sub-\/version, composed as follows:
|
||||
\begin{DoxyCode}
|
||||
(VERSION_MAJOR<<16)+(VERSION_MINOR<<8)+(VERSION_SUBMINOR)
|
||||
\end{DoxyCode}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
the version number.
|
||||
\end{DoxyReturn}
|
||||
\index{basefuncs@{basefuncs}!th\_\-version\_\-string@{th\_\-version\_\-string}}
|
||||
\index{th\_\-version\_\-string@{th\_\-version\_\-string}!basefuncs@{basefuncs}}
|
||||
\subsubsection[{th\_\-version\_\-string}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ th\_\-version\_\-string (void)}\label{group__basefuncs_ga04846066738d9f2024fc9961162b2dbc}
|
||||
|
||||
|
||||
Retrieves a human-\/readable string to identify the library vendor and version. \begin{DoxyReturn}{Returns}
|
||||
the version string.
|
||||
\end{DoxyReturn}
|
||||
@@ -0,0 +1,111 @@
|
||||
\section{Functions for Decoding}
|
||||
\label{group__decfuncs}\index{Functions for Decoding@{Functions for Decoding}}
|
||||
\subsection*{Functions for decoding}
|
||||
\label{_amgrp9d29c94aa62f20426aa5ff062c7daedd}
|
||||
You must link to {\ttfamily libtheoradec} if you use any of the functions in this section.
|
||||
|
||||
The functions are listed in the order they are used in a typical decode. The basic steps are:
|
||||
\begin{DoxyItemize}
|
||||
\item Parse the header packets by repeatedly calling \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50}.
|
||||
\item Allocate a \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle with \doxyref{th\_\-decode\_\-alloc()}{p.}{group__decfuncs_ga0ef07a9a97849054aa606c595a2d807e}.
|
||||
\item Call \doxyref{th\_\-setup\_\-free()}{p.}{group__decfuncs_gadef55431b68aaa59d0d7b32b2f118f27} to free any memory used for codec setup information.
|
||||
\item Perform any additional decoder configuration with \doxyref{th\_\-decode\_\-ctl()}{p.}{group__decfuncs_ga1a8051958d75b1012573b6e3c8f670e1}.
|
||||
\item For each video data packet:
|
||||
\begin{DoxyItemize}
|
||||
\item Submit the packet to the decoder via \doxyref{th\_\-decode\_\-packetin()}{p.}{group__decfuncs_ga31c814bf09b2232aff69c57ae20f04eb}.
|
||||
\item Retrieve the uncompressed video data via \doxyref{th\_\-decode\_\-ycbcr\_\-out()}{p.}{group__decfuncs_gaa9cc8af63fa8540e0fc95572f259cdcb}.
|
||||
\end{DoxyItemize}
|
||||
\item Call \doxyref{th\_\-decode\_\-free()}{p.}{group__decfuncs_gafb6684ad8ba507b71112bc9de148e7d0} to release all decoder memory.
|
||||
\end{DoxyItemize}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
int {\bf th\_\-decode\_\-headerin} ({\bf th\_\-info} $\ast$\_\-info, {\bf th\_\-comment} $\ast$\_\-tc, {\bf th\_\-setup\_\-info} $\ast$$\ast$\_\-setup, ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Decodes the header packets of a Theora stream. \item\end{DoxyCompactList}\item
|
||||
{\bf th\_\-dec\_\-ctx} $\ast$ {\bf th\_\-decode\_\-alloc} (const {\bf th\_\-info} $\ast$\_\-info, const {\bf th\_\-setup\_\-info} $\ast$\_\-setup)
|
||||
\begin{DoxyCompactList}\small\item\em Allocates a decoder instance. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-setup\_\-free} ({\bf th\_\-setup\_\-info} $\ast$\_\-setup)
|
||||
\begin{DoxyCompactList}\small\item\em Releases all storage used for the decoder setup information. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-decode\_\-ctl} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec, int \_\-req, void $\ast$\_\-buf, size\_\-t \_\-buf\_\-sz)
|
||||
\begin{DoxyCompactList}\small\item\em Decoder control function. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-decode\_\-packetin} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec, const ogg\_\-packet $\ast$\_\-op, ogg\_\-int64\_\-t $\ast$\_\-granpos)
|
||||
\begin{DoxyCompactList}\small\item\em Submits a packet containing encoded video data to the decoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-decode\_\-ycbcr\_\-out} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec, {\bf th\_\-ycbcr\_\-buffer} \_\-ycbcr)
|
||||
\begin{DoxyCompactList}\small\item\em Outputs the next available frame of decoded Y'CbCr data. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-decode\_\-free} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec)
|
||||
\begin{DoxyCompactList}\small\item\em Frees an allocated decoder instance. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Function Documentation}
|
||||
\index{decfuncs@{decfuncs}!th\_\-decode\_\-alloc@{th\_\-decode\_\-alloc}}
|
||||
\index{th\_\-decode\_\-alloc@{th\_\-decode\_\-alloc}!decfuncs@{decfuncs}}
|
||||
\subsubsection[{th\_\-decode\_\-alloc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf th\_\-dec\_\-ctx}$\ast$ th\_\-decode\_\-alloc (const {\bf th\_\-info} $\ast$ {\em \_\-info}, \/ const {\bf th\_\-setup\_\-info} $\ast$ {\em \_\-setup})}\label{group__decfuncs_ga0ef07a9a97849054aa606c595a2d807e}
|
||||
|
||||
|
||||
Allocates a decoder instance. {\bfseries Security Warning:} The Theora format supports very large frame sizes, potentially even larger than the address space of a 32-\/bit machine, and creating a decoder context allocates the space for several frames of data. If the allocation fails here, your program will crash, possibly at some future point because the OS kernel returned a valid memory range and will only fail when it tries to map the pages in it the first time they are used. Even if it succeeds, you may experience a denial of service if the frame size is large enough to cause excessive paging. If you are integrating libtheora in a larger application where such things are undesirable, it is highly recommended that you check the frame size in {\itshape \_\-info\/} before calling this function and refuse to decode streams where it is larger than some reasonable maximum. libtheora will not check this for you, because there may be machines that can handle such streams and applications that wish to.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-info}]A \doxyref{th\_\-info}{p.}{structth__info} struct filled via \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50}. \item[{\em \_\-setup}]A \doxyref{th\_\-setup\_\-info}{p.}{theoradec_8h_ab71cd2657455cc27d6c0127c66a89f28} handle returned via \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50}. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The initialized \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em NULL}]If the decoding parameters were invalid. \end{DoxyRetVals}
|
||||
\index{decfuncs@{decfuncs}!th\_\-decode\_\-ctl@{th\_\-decode\_\-ctl}}
|
||||
\index{th\_\-decode\_\-ctl@{th\_\-decode\_\-ctl}!decfuncs@{decfuncs}}
|
||||
\subsubsection[{th\_\-decode\_\-ctl}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-decode\_\-ctl ({\bf th\_\-dec\_\-ctx} $\ast$ {\em \_\-dec}, \/ int {\em \_\-req}, \/ void $\ast$ {\em \_\-buf}, \/ size\_\-t {\em \_\-buf\_\-sz})}\label{group__decfuncs_ga1a8051958d75b1012573b6e3c8f670e1}
|
||||
|
||||
|
||||
Decoder control function. This is used to provide advanced control of the decoding process.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-dec}]A \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle. \item[{\em \_\-req}]The control code to process. See \doxyref{the list of available control codes}{p.}{theoradec_8h_decctlcodes} for details. \item[{\em \_\-buf}]The parameters for this control code. \item[{\em \_\-buf\_\-sz}]The size of the parameter buffer. \end{DoxyParams}
|
||||
\index{decfuncs@{decfuncs}!th\_\-decode\_\-free@{th\_\-decode\_\-free}}
|
||||
\index{th\_\-decode\_\-free@{th\_\-decode\_\-free}!decfuncs@{decfuncs}}
|
||||
\subsubsection[{th\_\-decode\_\-free}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-decode\_\-free ({\bf th\_\-dec\_\-ctx} $\ast$ {\em \_\-dec})}\label{group__decfuncs_gafb6684ad8ba507b71112bc9de148e7d0}
|
||||
|
||||
|
||||
Frees an allocated decoder instance.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-dec}]A \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle. \end{DoxyParams}
|
||||
\index{decfuncs@{decfuncs}!th\_\-decode\_\-headerin@{th\_\-decode\_\-headerin}}
|
||||
\index{th\_\-decode\_\-headerin@{th\_\-decode\_\-headerin}!decfuncs@{decfuncs}}
|
||||
\subsubsection[{th\_\-decode\_\-headerin}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-decode\_\-headerin ({\bf th\_\-info} $\ast$ {\em \_\-info}, \/ {\bf th\_\-comment} $\ast$ {\em \_\-tc}, \/ {\bf th\_\-setup\_\-info} $\ast$$\ast$ {\em \_\-setup}, \/ ogg\_\-packet $\ast$ {\em \_\-op})}\label{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50}
|
||||
|
||||
|
||||
Decodes the header packets of a Theora stream. This should be called on the initial packets of the stream, in succession, until it returns {\ttfamily 0}, indicating that all headers have been processed, or an error is encountered. At least three header packets are required, and additional optional header packets may follow. This can be used on the first packet of any logical stream to determine if that stream is a Theora stream.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-info}]A \doxyref{th\_\-info}{p.}{structth__info} structure to fill in. This must have been previously initialized with \doxyref{th\_\-info\_\-init()}{p.}{group__basefuncs_ga430d9c605816a6ca0bdce3a0b965b926}. The application may immediately begin using the contents of this structure after the first header is decoded, though it must continue to be passed in on all subsequent calls. \item[{\em \_\-tc}]A \doxyref{th\_\-comment}{p.}{structth__comment} structure to fill in. The application may immediately begin using the contents of this structure after the second header is decoded, though it must continue to be passed in on all subsequent calls. \item[{\em \_\-setup}]Returns a pointer to additional, private setup information needed by the decoder. The contents of this pointer must be initialized to {\ttfamily NULL} on the first call, and the returned value must continue to be passed in on all subsequent calls. \item[{\em \_\-op}]An {\ttfamily ogg\_\-packet} structure which contains one of the initial packets of an Ogg logical stream. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
A positive value indicates that a Theora header was successfully processed.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]The first video data packet was encountered after all required header packets were parsed. The packet just passed in on this call should be saved and fed to \doxyref{th\_\-decode\_\-packetin()}{p.}{group__decfuncs_ga31c814bf09b2232aff69c57ae20f04eb} to begin decoding video data. \item[{\em TH\_\-EFAULT}]One of {\itshape \_\-info\/}, {\itshape \_\-tc\/}, or {\itshape \_\-setup\/} was {\ttfamily NULL}. \item[{\em TH\_\-EBADHEADER}]{\itshape \_\-op\/} was {\ttfamily NULL}, the packet was not the next header packet in the expected sequence, or the format of the header data was invalid. \item[{\em TH\_\-EVERSION}]The packet data was a Theora info header, but for a bitstream version not decodable with this version of {\ttfamily libtheoradec}. \item[{\em TH\_\-ENOTFORMAT}]The packet was not a Theora header. \end{DoxyRetVals}
|
||||
\index{decfuncs@{decfuncs}!th\_\-decode\_\-packetin@{th\_\-decode\_\-packetin}}
|
||||
\index{th\_\-decode\_\-packetin@{th\_\-decode\_\-packetin}!decfuncs@{decfuncs}}
|
||||
\subsubsection[{th\_\-decode\_\-packetin}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-decode\_\-packetin ({\bf th\_\-dec\_\-ctx} $\ast$ {\em \_\-dec}, \/ const ogg\_\-packet $\ast$ {\em \_\-op}, \/ ogg\_\-int64\_\-t $\ast$ {\em \_\-granpos})}\label{group__decfuncs_ga31c814bf09b2232aff69c57ae20f04eb}
|
||||
|
||||
|
||||
Submits a packet containing encoded video data to the decoder.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-dec}]A \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle. \item[{\em \_\-op}]An {\ttfamily ogg\_\-packet} containing encoded video data. \item[{\em \_\-granpos}]Returns the granule position of the decoded packet. If non-\/{\ttfamily NULL}, the granule position for this specific packet is stored in this location. This is computed incrementally from previously decoded packets. After a seek, the correct granule position must be set via \doxyref{TH\_\-DECCTL\_\-SET\_\-GRANPOS}{p.}{theoradec_8h_a1e870c654d35394f0d490045df04e0f5} for this to work properly. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success. A new decoded frame can be retrieved by calling \doxyref{th\_\-decode\_\-ycbcr\_\-out()}{p.}{group__decfuncs_gaa9cc8af63fa8540e0fc95572f259cdcb}. \item[{\em TH\_\-DUPFRAME}]The packet represented a dropped (0-\/byte) frame. The player can skip the call to \doxyref{th\_\-decode\_\-ycbcr\_\-out()}{p.}{group__decfuncs_gaa9cc8af63fa8540e0fc95572f259cdcb}, as the contents of the decoded frame buffer have not changed. \item[{\em TH\_\-EFAULT}]{\itshape \_\-dec\/} or {\itshape \_\-op\/} was {\ttfamily NULL}. \item[{\em TH\_\-EBADPACKET}]{\itshape \_\-op\/} does not contain encoded video data. \item[{\em TH\_\-EIMPL}]The video data uses bitstream features which this library does not support. \end{DoxyRetVals}
|
||||
\index{decfuncs@{decfuncs}!th\_\-decode\_\-ycbcr\_\-out@{th\_\-decode\_\-ycbcr\_\-out}}
|
||||
\index{th\_\-decode\_\-ycbcr\_\-out@{th\_\-decode\_\-ycbcr\_\-out}!decfuncs@{decfuncs}}
|
||||
\subsubsection[{th\_\-decode\_\-ycbcr\_\-out}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-decode\_\-ycbcr\_\-out ({\bf th\_\-dec\_\-ctx} $\ast$ {\em \_\-dec}, \/ {\bf th\_\-ycbcr\_\-buffer} {\em \_\-ycbcr})}\label{group__decfuncs_gaa9cc8af63fa8540e0fc95572f259cdcb}
|
||||
|
||||
|
||||
Outputs the next available frame of decoded Y'CbCr data. If a striped decode callback has been set with \doxyref{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}{p.}{theoradec_8h_ac95cc9e109474b0fa4bb920ab2cfdf1e}, then the application does not need to call this function.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-dec}]A \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle. \item[{\em \_\-ycbcr}]A video buffer structure to fill in. {\ttfamily libtheoradec} will fill in all the members of this structure, including the pointers to the uncompressed video data. The memory for this video data is owned by {\ttfamily libtheoradec}. It may be freed or overwritten without notification when subsequent frames are decoded. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \item[{\em TH\_\-EFAULT}]{\itshape \_\-dec\/} or {\itshape \_\-ycbcr\/} was {\ttfamily NULL}. \end{DoxyRetVals}
|
||||
\index{decfuncs@{decfuncs}!th\_\-setup\_\-free@{th\_\-setup\_\-free}}
|
||||
\index{th\_\-setup\_\-free@{th\_\-setup\_\-free}!decfuncs@{decfuncs}}
|
||||
\subsubsection[{th\_\-setup\_\-free}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-setup\_\-free ({\bf th\_\-setup\_\-info} $\ast$ {\em \_\-setup})}\label{group__decfuncs_gadef55431b68aaa59d0d7b32b2f118f27}
|
||||
|
||||
|
||||
Releases all storage used for the decoder setup information. This should be called after you no longer want to create any decoders for a stream whose headers you have parsed with \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50}.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-setup}]The setup information to free. This can safely be {\ttfamily NULL}. \end{DoxyParams}
|
||||
@@ -0,0 +1,107 @@
|
||||
\section{Functions for Encoding}
|
||||
\label{group__encfuncs}\index{Functions for Encoding@{Functions for Encoding}}
|
||||
\subsection*{Functions for encoding}
|
||||
\label{_amgrpc58fb8743a7ca83eb895d57e29e032c8}
|
||||
You must link to {\ttfamily libtheoraenc} and {\ttfamily libtheoradec} if you use any of the functions in this section.
|
||||
|
||||
The functions are listed in the order they are used in a typical encode. The basic steps are:
|
||||
\begin{DoxyItemize}
|
||||
\item Fill in a \doxyref{th\_\-info}{p.}{structth__info} structure with details on the format of the video you wish to encode.
|
||||
\item Allocate a \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle with \doxyref{th\_\-encode\_\-alloc()}{p.}{group__encfuncs_gaa91e47bc9dd5f6ee52045bd7b815e5a7}.
|
||||
\item Perform any additional encoder configuration required with \doxyref{th\_\-encode\_\-ctl()}{p.}{group__encfuncs_ga3a427f6514dfdc01ea72172c469d51d9}.
|
||||
\item Repeatedly call \doxyref{th\_\-encode\_\-flushheader()}{p.}{group__encfuncs_ga9439d61b566039d194ff782681fbc408} to retrieve all the header packets.
|
||||
\item For each uncompressed frame:
|
||||
\begin{DoxyItemize}
|
||||
\item Submit the uncompressed frame via \doxyref{th\_\-encode\_\-ycbcr\_\-in()}{p.}{group__encfuncs_gadbe7dd66b411c2d61ab8153c15308750}
|
||||
\item Repeatedly call \doxyref{th\_\-encode\_\-packetout()}{p.}{group__encfuncs_ga96d8ac1dda53187455352f99bbb5b04b} to retrieve any video data packets that are ready.
|
||||
\end{DoxyItemize}
|
||||
\item Call \doxyref{th\_\-encode\_\-free()}{p.}{group__encfuncs_ga36b23d216532231925c4107894204680} to release all encoder memory.
|
||||
\end{DoxyItemize}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf th\_\-enc\_\-ctx} $\ast$ {\bf th\_\-encode\_\-alloc} (const {\bf th\_\-info} $\ast$\_\-info)
|
||||
\begin{DoxyCompactList}\small\item\em Allocates an encoder instance. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-ctl} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, int \_\-req, void $\ast$\_\-buf, size\_\-t \_\-buf\_\-sz)
|
||||
\begin{DoxyCompactList}\small\item\em Encoder control function. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-flushheader} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, {\bf th\_\-comment} $\ast$\_\-comments, ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Outputs the next header packet. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-ycbcr\_\-in} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, {\bf th\_\-ycbcr\_\-buffer} \_\-ycbcr)
|
||||
\begin{DoxyCompactList}\small\item\em Submits an uncompressed frame to the encoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-packetout} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, int \_\-last, ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieves encoded video data packets. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-encode\_\-free} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc)
|
||||
\begin{DoxyCompactList}\small\item\em Frees an allocated encoder instance. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Function Documentation}
|
||||
\index{encfuncs@{encfuncs}!th\_\-encode\_\-alloc@{th\_\-encode\_\-alloc}}
|
||||
\index{th\_\-encode\_\-alloc@{th\_\-encode\_\-alloc}!encfuncs@{encfuncs}}
|
||||
\subsubsection[{th\_\-encode\_\-alloc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf th\_\-enc\_\-ctx}$\ast$ th\_\-encode\_\-alloc (const {\bf th\_\-info} $\ast$ {\em \_\-info})}\label{group__encfuncs_gaa91e47bc9dd5f6ee52045bd7b815e5a7}
|
||||
|
||||
|
||||
Allocates an encoder instance.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-info}]A \doxyref{th\_\-info}{p.}{structth__info} struct filled with the desired encoding parameters. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The initialized \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em NULL}]If the encoding parameters were invalid. \end{DoxyRetVals}
|
||||
\index{encfuncs@{encfuncs}!th\_\-encode\_\-ctl@{th\_\-encode\_\-ctl}}
|
||||
\index{th\_\-encode\_\-ctl@{th\_\-encode\_\-ctl}!encfuncs@{encfuncs}}
|
||||
\subsubsection[{th\_\-encode\_\-ctl}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-encode\_\-ctl ({\bf th\_\-enc\_\-ctx} $\ast$ {\em \_\-enc}, \/ int {\em \_\-req}, \/ void $\ast$ {\em \_\-buf}, \/ size\_\-t {\em \_\-buf\_\-sz})}\label{group__encfuncs_ga3a427f6514dfdc01ea72172c469d51d9}
|
||||
|
||||
|
||||
Encoder control function. This is used to provide advanced control the encoding process.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-enc}]A \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle. \item[{\em \_\-req}]The control code to process. See \doxyref{the list of available control codes}{p.}{theoraenc_8h_encctlcodes} for details. \item[{\em \_\-buf}]The parameters for this control code. \item[{\em \_\-buf\_\-sz}]The size of the parameter buffer. \end{DoxyParams}
|
||||
\index{encfuncs@{encfuncs}!th\_\-encode\_\-flushheader@{th\_\-encode\_\-flushheader}}
|
||||
\index{th\_\-encode\_\-flushheader@{th\_\-encode\_\-flushheader}!encfuncs@{encfuncs}}
|
||||
\subsubsection[{th\_\-encode\_\-flushheader}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-encode\_\-flushheader ({\bf th\_\-enc\_\-ctx} $\ast$ {\em \_\-enc}, \/ {\bf th\_\-comment} $\ast$ {\em \_\-comments}, \/ ogg\_\-packet $\ast$ {\em \_\-op})}\label{group__encfuncs_ga9439d61b566039d194ff782681fbc408}
|
||||
|
||||
|
||||
Outputs the next header packet. This should be called repeatedly after encoder initialization until it returns 0 in order to get all of the header packets, in order, before encoding actual video data.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-enc}]A \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle. \item[{\em \_\-comments}]The metadata to place in the comment header, when it is encoded. \item[{\em \_\-op}]An {\ttfamily ogg\_\-packet} structure to fill. All of the elements of this structure will be set, including a pointer to the header data. The memory for the header data is owned by {\ttfamily libtheoraenc}, and may be invalidated when the next encoder function is called. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
A positive value indicates that a header packet was successfully produced.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]No packet was produced, and no more header packets remain. \item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\/}, {\itshape \_\-comments\/}, or {\itshape \_\-op\/} was {\ttfamily NULL}. \end{DoxyRetVals}
|
||||
\index{encfuncs@{encfuncs}!th\_\-encode\_\-free@{th\_\-encode\_\-free}}
|
||||
\index{th\_\-encode\_\-free@{th\_\-encode\_\-free}!encfuncs@{encfuncs}}
|
||||
\subsubsection[{th\_\-encode\_\-free}]{\setlength{\rightskip}{0pt plus 5cm}void th\_\-encode\_\-free ({\bf th\_\-enc\_\-ctx} $\ast$ {\em \_\-enc})}\label{group__encfuncs_ga36b23d216532231925c4107894204680}
|
||||
|
||||
|
||||
Frees an allocated encoder instance.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-enc}]A \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle. \end{DoxyParams}
|
||||
\index{encfuncs@{encfuncs}!th\_\-encode\_\-packetout@{th\_\-encode\_\-packetout}}
|
||||
\index{th\_\-encode\_\-packetout@{th\_\-encode\_\-packetout}!encfuncs@{encfuncs}}
|
||||
\subsubsection[{th\_\-encode\_\-packetout}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-encode\_\-packetout ({\bf th\_\-enc\_\-ctx} $\ast$ {\em \_\-enc}, \/ int {\em \_\-last}, \/ ogg\_\-packet $\ast$ {\em \_\-op})}\label{group__encfuncs_ga96d8ac1dda53187455352f99bbb5b04b}
|
||||
|
||||
|
||||
Retrieves encoded video data packets. This should be called repeatedly after each frame is submitted to flush any encoded packets, until it returns 0. The encoder will not buffer these packets as subsequent frames are compressed, so a failure to do so will result in lost video data. \begin{DoxyNote}{Note}
|
||||
Currently the encoder operates in a one-\/frame-\/in, one-\/packet-\/out manner. However, this may be changed in the future.
|
||||
\end{DoxyNote}
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-enc}]A \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle. \item[{\em \_\-last}]Set this flag to a non-\/zero value if no more uncompressed frames will be submitted. This ensures that a proper EOS flag is set on the last packet. \item[{\em \_\-op}]An {\ttfamily ogg\_\-packet} structure to fill. All of the elements of this structure will be set, including a pointer to the video data. The memory for the video data is owned by {\ttfamily libtheoraenc}, and may be invalidated when the next encoder function is called. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
A positive value indicates that a video data packet was successfully produced.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]No packet was produced, and no more encoded video data remains. \item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\/} or {\itshape \_\-op\/} was {\ttfamily NULL}. \end{DoxyRetVals}
|
||||
\index{encfuncs@{encfuncs}!th\_\-encode\_\-ycbcr\_\-in@{th\_\-encode\_\-ycbcr\_\-in}}
|
||||
\index{th\_\-encode\_\-ycbcr\_\-in@{th\_\-encode\_\-ycbcr\_\-in}!encfuncs@{encfuncs}}
|
||||
\subsubsection[{th\_\-encode\_\-ycbcr\_\-in}]{\setlength{\rightskip}{0pt plus 5cm}int th\_\-encode\_\-ycbcr\_\-in ({\bf th\_\-enc\_\-ctx} $\ast$ {\em \_\-enc}, \/ {\bf th\_\-ycbcr\_\-buffer} {\em \_\-ycbcr})}\label{group__encfuncs_gadbe7dd66b411c2d61ab8153c15308750}
|
||||
|
||||
|
||||
Submits an uncompressed frame to the encoder.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-enc}]A \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle. \item[{\em \_\-ycbcr}]A buffer of Y'CbCr data to encode. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success. \item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\/} or {\itshape \_\-ycbcr\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]The buffer size does not match the frame size the encoder was initialized with, or encoding has already completed. \end{DoxyRetVals}
|
||||
@@ -0,0 +1,611 @@
|
||||
\section{Legacy pre-\/1.0 C API}
|
||||
\label{group__oldfuncs}\index{Legacy pre-\/1.0 C API@{Legacy pre-\/1.0 C API}}
|
||||
\subsection*{Data Structures}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
struct {\bf yuv\_\-buffer}
|
||||
\begin{DoxyCompactList}\small\item\em A YUV buffer for passing uncompressed frames to and from the codec. \item\end{DoxyCompactList}\item
|
||||
struct {\bf theora\_\-info}
|
||||
\begin{DoxyCompactList}\small\item\em Theora bitstream info. \item\end{DoxyCompactList}\item
|
||||
struct {\bf theora\_\-state}
|
||||
\begin{DoxyCompactList}\small\item\em Codec internal state and context. \item\end{DoxyCompactList}\item
|
||||
struct {\bf theora\_\-comment}
|
||||
\begin{DoxyCompactList}\small\item\em Comment header metadata. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Files}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
file {\bf theora.h}
|
||||
|
||||
|
||||
\begin{DoxyCompactList}\small\item\em The libtheora pre-\/1.0 legacy C API. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Defines}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf OC\_\-FAULT}~-\/1
|
||||
\begin{DoxyCompactList}\small\item\em General failure. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-EINVAL}~-\/10
|
||||
\begin{DoxyCompactList}\small\item\em Library encountered invalid internal data. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-DISABLED}~-\/11
|
||||
\begin{DoxyCompactList}\small\item\em Requested action is disabled. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-BADHEADER}~-\/20
|
||||
\begin{DoxyCompactList}\small\item\em Header packet was corrupt/invalid. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-NOTFORMAT}~-\/21
|
||||
\begin{DoxyCompactList}\small\item\em Packet is not a theora packet. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-VERSION}~-\/22
|
||||
\begin{DoxyCompactList}\small\item\em Bitstream version is not handled. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-IMPL}~-\/23
|
||||
\begin{DoxyCompactList}\small\item\em Feature or action not implemented. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-BADPACKET}~-\/24
|
||||
\begin{DoxyCompactList}\small\item\em Packet is corrupt. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-NEWPACKET}~-\/25
|
||||
\begin{DoxyCompactList}\small\item\em Packet is an (ignorable) unhandled extension. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-DUPFRAME}~1
|
||||
\begin{DoxyCompactList}\small\item\em Packet is a dropped frame. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Enumerations}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
enum {\bf theora\_\-colorspace} \{ {\bf OC\_\-CS\_\-UNSPECIFIED},
|
||||
{\bf OC\_\-CS\_\-ITU\_\-REC\_\-470M},
|
||||
{\bf OC\_\-CS\_\-ITU\_\-REC\_\-470BG},
|
||||
{\bf OC\_\-CS\_\-NSPACES}
|
||||
\}
|
||||
\begin{DoxyCompactList}\small\item\em A Colorspace. \item\end{DoxyCompactList}\item
|
||||
enum {\bf theora\_\-pixelformat} \{ {\bf OC\_\-PF\_\-420},
|
||||
{\bf OC\_\-PF\_\-RSVD},
|
||||
{\bf OC\_\-PF\_\-422},
|
||||
{\bf OC\_\-PF\_\-444}
|
||||
\}
|
||||
\begin{DoxyCompactList}\small\item\em A Chroma subsampling. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
const char $\ast$ {\bf theora\_\-version\_\-string} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieve a human-\/readable string to identify the encoder vendor and version. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf theora\_\-version\_\-number} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieve a 32-\/bit version number. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-init} ({\bf theora\_\-state} $\ast$th, {\bf theora\_\-info} $\ast$ti)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize the theora encoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-YUVin} ({\bf theora\_\-state} $\ast$t, {\bf yuv\_\-buffer} $\ast$yuv)
|
||||
\begin{DoxyCompactList}\small\item\em Submit a YUV buffer to the theora encoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-packetout} ({\bf theora\_\-state} $\ast$t, int last\_\-p, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request the next packet of encoded video. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-header} ({\bf theora\_\-state} $\ast$t, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request a packet containing the initial header. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-comment} ({\bf theora\_\-comment} $\ast$tc, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request a comment header packet from provided metadata. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-tables} ({\bf theora\_\-state} $\ast$t, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request a packet containing the codebook tables for the stream. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-header} ({\bf theora\_\-info} $\ast$ci, {\bf theora\_\-comment} $\ast$cc, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Decode an Ogg packet, with the expectation that the packet contains an initial header, comment data or codebook tables. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-init} ({\bf theora\_\-state} $\ast$th, {\bf theora\_\-info} $\ast$c)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize a \doxyref{theora\_\-state}{p.}{structtheora__state} handle for decoding. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-packetin} ({\bf theora\_\-state} $\ast$th, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Input a packet containing encoded data into the theora decoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-YUVout} ({\bf theora\_\-state} $\ast$th, {\bf yuv\_\-buffer} $\ast$yuv)
|
||||
\begin{DoxyCompactList}\small\item\em Output the next available frame of decoded YUV data. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-packet\_\-isheader} (ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Report whether a theora packet is a header or not This function does no verification beyond checking the header flag bit so it should not be used for bitstream identification; use \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} for that. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-packet\_\-iskeyframe} (ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Report whether a theora packet is a keyframe or not. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-granule\_\-shift} ({\bf theora\_\-info} $\ast$ti)
|
||||
\begin{DoxyCompactList}\small\item\em Report the granulepos shift radix. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-int64\_\-t {\bf theora\_\-granule\_\-frame} ({\bf theora\_\-state} $\ast$th, ogg\_\-int64\_\-t granulepos)
|
||||
\begin{DoxyCompactList}\small\item\em Convert a granulepos to an absolute frame index, starting at 0. \item\end{DoxyCompactList}\item
|
||||
double {\bf theora\_\-granule\_\-time} ({\bf theora\_\-state} $\ast$th, ogg\_\-int64\_\-t granulepos)
|
||||
\begin{DoxyCompactList}\small\item\em Convert a granulepos to absolute time in seconds. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-info\_\-init} ({\bf theora\_\-info} $\ast$c)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize a \doxyref{theora\_\-info}{p.}{structtheora__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-info\_\-clear} ({\bf theora\_\-info} $\ast$c)
|
||||
\begin{DoxyCompactList}\small\item\em Clear a \doxyref{theora\_\-info}{p.}{structtheora__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-clear} ({\bf theora\_\-state} $\ast$t)
|
||||
\begin{DoxyCompactList}\small\item\em Free all internal data associated with a \doxyref{theora\_\-state}{p.}{structtheora__state} handle. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-init} ({\bf theora\_\-comment} $\ast$tc)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize an allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-add} ({\bf theora\_\-comment} $\ast$tc, char $\ast$comment)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-add\_\-tag} ({\bf theora\_\-comment} $\ast$tc, char $\ast$tag, char $\ast$value)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure. \item\end{DoxyCompactList}\item
|
||||
char $\ast$ {\bf theora\_\-comment\_\-query} ({\bf theora\_\-comment} $\ast$tc, char $\ast$tag, int count)
|
||||
\begin{DoxyCompactList}\small\item\em Look up a comment value by tag. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-comment\_\-query\_\-count} ({\bf theora\_\-comment} $\ast$tc, char $\ast$tag)
|
||||
\begin{DoxyCompactList}\small\item\em Look up the number of instances of a tag. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-clear} ({\bf theora\_\-comment} $\ast$tc)
|
||||
\begin{DoxyCompactList}\small\item\em Clear an allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} struct so that it can be freed. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-control} ({\bf theora\_\-state} $\ast$th, int req, void $\ast$buf, size\_\-t buf\_\-sz)
|
||||
\begin{DoxyCompactList}\small\item\em Encoder control function. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{theora\_\-control() codes}
|
||||
\label{_amgrp13fd61986cff4566fe89a40e30b74ad9}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}~(1)
|
||||
\begin{DoxyCompactList}\small\item\em Get the maximum post-\/processing level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-PPLEVEL}~(3)
|
||||
\begin{DoxyCompactList}\small\item\em Set the post-\/processing level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}~(4)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the maximum distance between key frames. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-GRANPOS}~(5)
|
||||
\begin{DoxyCompactList}\small\item\em Set the granule position. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}~(2)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the quantization parameters to use. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}~(10)
|
||||
\begin{DoxyCompactList}\small\item\em Disables any encoder features that would prevent lossless transcoding back to VP3. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}~(12)
|
||||
\begin{DoxyCompactList}\small\item\em Gets the maximum speed level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}~(14)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the speed level. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Define Documentation}
|
||||
\index{oldfuncs@{oldfuncs}!OC\_\-BADHEADER@{OC\_\-BADHEADER}}
|
||||
\index{OC\_\-BADHEADER@{OC\_\-BADHEADER}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-BADHEADER}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-BADHEADER~-\/20}\label{group__oldfuncs_ga809cbad2eb36be17a235a3cadfb737ba}
|
||||
|
||||
|
||||
Header packet was corrupt/invalid. \index{oldfuncs@{oldfuncs}!OC\_\-BADPACKET@{OC\_\-BADPACKET}}
|
||||
\index{OC\_\-BADPACKET@{OC\_\-BADPACKET}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-BADPACKET}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-BADPACKET~-\/24}\label{group__oldfuncs_ga117774c062a63dfad2a5b4d092fa2bb1}
|
||||
|
||||
|
||||
Packet is corrupt. \index{oldfuncs@{oldfuncs}!OC\_\-DISABLED@{OC\_\-DISABLED}}
|
||||
\index{OC\_\-DISABLED@{OC\_\-DISABLED}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-DISABLED}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-DISABLED~-\/11}\label{group__oldfuncs_ga38b9fa0af856d5930c534db26e2ac2d1}
|
||||
|
||||
|
||||
Requested action is disabled. \index{oldfuncs@{oldfuncs}!OC\_\-DUPFRAME@{OC\_\-DUPFRAME}}
|
||||
\index{OC\_\-DUPFRAME@{OC\_\-DUPFRAME}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-DUPFRAME}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-DUPFRAME~1}\label{group__oldfuncs_ga84a8d2f5080ad62b415a4e7551941cbb}
|
||||
|
||||
|
||||
Packet is a dropped frame. \index{oldfuncs@{oldfuncs}!OC\_\-EINVAL@{OC\_\-EINVAL}}
|
||||
\index{OC\_\-EINVAL@{OC\_\-EINVAL}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-EINVAL}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-EINVAL~-\/10}\label{group__oldfuncs_ga43d15091b1a03a734a124e9a04d3be55}
|
||||
|
||||
|
||||
Library encountered invalid internal data. \index{oldfuncs@{oldfuncs}!OC\_\-FAULT@{OC\_\-FAULT}}
|
||||
\index{OC\_\-FAULT@{OC\_\-FAULT}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-FAULT}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-FAULT~-\/1}\label{group__oldfuncs_gaa4370e13ed3aea6441ccf69dcab2506e}
|
||||
|
||||
|
||||
General failure. \index{oldfuncs@{oldfuncs}!OC\_\-IMPL@{OC\_\-IMPL}}
|
||||
\index{OC\_\-IMPL@{OC\_\-IMPL}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-IMPL}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-IMPL~-\/23}\label{group__oldfuncs_ga895dc2597b3bf9c97bf7701c6eff5b0c}
|
||||
|
||||
|
||||
Feature or action not implemented. \index{oldfuncs@{oldfuncs}!OC\_\-NEWPACKET@{OC\_\-NEWPACKET}}
|
||||
\index{OC\_\-NEWPACKET@{OC\_\-NEWPACKET}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-NEWPACKET}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-NEWPACKET~-\/25}\label{group__oldfuncs_ga60be4dc92c933eac3542bce3ce076496}
|
||||
|
||||
|
||||
Packet is an (ignorable) unhandled extension. \index{oldfuncs@{oldfuncs}!OC\_\-NOTFORMAT@{OC\_\-NOTFORMAT}}
|
||||
\index{OC\_\-NOTFORMAT@{OC\_\-NOTFORMAT}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-NOTFORMAT}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-NOTFORMAT~-\/21}\label{group__oldfuncs_ga9558d6d9eacd2273c8da27f945d725ad}
|
||||
|
||||
|
||||
Packet is not a theora packet. \index{oldfuncs@{oldfuncs}!OC\_\-VERSION@{OC\_\-VERSION}}
|
||||
\index{OC\_\-VERSION@{OC\_\-VERSION}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{OC\_\-VERSION}]{\setlength{\rightskip}{0pt plus 5cm}\#define OC\_\-VERSION~-\/22}\label{group__oldfuncs_ga4611cfd61160405721d1e2ab0ec2564b}
|
||||
|
||||
|
||||
Bitstream version is not handled. \index{oldfuncs@{oldfuncs}!TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX@{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}}
|
||||
\index{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX@{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX~(1)}\label{group__oldfuncs_gab31f251c9319f2140d247585d30b3d07}
|
||||
|
||||
|
||||
Get the maximum post-\/processing level. The decoder supports a post-\/processing filter that can improve the appearance of the decoded images. This returns the highest level setting for this post-\/processor, corresponding to maximum improvement and computational expense. \index{oldfuncs@{oldfuncs}!TH\_\-DECCTL\_\-SET\_\-GRANPOS@{TH\_\-DECCTL\_\-SET\_\-GRANPOS}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-GRANPOS@{TH\_\-DECCTL\_\-SET\_\-GRANPOS}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-GRANPOS}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-GRANPOS~(5)}\label{group__oldfuncs_ga1e870c654d35394f0d490045df04e0f5}
|
||||
|
||||
|
||||
Set the granule position. Call this after a seek, to update the internal granulepos in the decoder, to insure that subsequent frames are marked properly. If you track timestamps yourself and do not use the granule postion returned by the decoder, then you do not need to use this control. \index{oldfuncs@{oldfuncs}!TH\_\-DECCTL\_\-SET\_\-PPLEVEL@{TH\_\-DECCTL\_\-SET\_\-PPLEVEL}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-PPLEVEL@{TH\_\-DECCTL\_\-SET\_\-PPLEVEL}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-PPLEVEL}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-PPLEVEL~(3)}\label{group__oldfuncs_ga87774c35e1a755a84e2d705b38ebef0d}
|
||||
|
||||
|
||||
Set the post-\/processing level. Sets the level of post-\/processing to use when decoding the compressed stream. This must be a value between zero (off) and the maximum returned by TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX. \index{oldfuncs@{oldfuncs}!TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX@{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}}
|
||||
\index{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX@{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX~(12)}\label{group__oldfuncs_ga9baf5bdd206e80c78a8fd44687e89783}
|
||||
|
||||
|
||||
Gets the maximum speed level. Higher speed levels favor quicker encoding over better quality per bit. Depending on the encoding mode, and the internal algorithms used, quality may actually improve, but in this case bitrate will also likely increase. In any case, overall rate/distortion performance will probably decrease. The maximum value, and the meaning of each value, may change depending on the current encoding mode (VBR vs. CQI, etc.).
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\rightarrow$} {\em buf}]int: The maximum encoding speed level. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em OC\_\-FAULT}]{\itshape \doxyref{theora\_\-state}{p.}{structtheora__state}\/} or {\itshape buf\/} is {\ttfamily NULL}. \item[{\em OC\_\-EINVAL}]{\itshape buf\_\-sz\/} is not {\ttfamily sizeof(int)}. \item[{\em OC\_\-IMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE@{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE@{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE~(4)}\label{group__oldfuncs_ga27e755e15b4b5604c54974b304037a49}
|
||||
|
||||
|
||||
Sets the maximum distance between key frames. This can be changed during an encode, but will be bounded by {\ttfamily 1$<$$<$\doxyref{th\_\-info::keyframe\_\-granule\_\-shift}{p.}{structth__info_a693ca4ab11fbc0c3f32594b4bb8766ed}}. If it is set before encoding begins, \doxyref{th\_\-info::keyframe\_\-granule\_\-shift}{p.}{structth__info_a693ca4ab11fbc0c3f32594b4bb8766ed} will be enlarged appropriately.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em buf}]{\ttfamily ogg\_\-uint32\_\-t}: The maximum distance between key frames. \item[\mbox{$\rightarrow$} {\em buf}]{\ttfamily ogg\_\-uint32\_\-t}: The actual maximum distance set. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em OC\_\-FAULT}]{\itshape \doxyref{theora\_\-state}{p.}{structtheora__state}\/} or {\itshape buf\/} is {\ttfamily NULL}. \item[{\em OC\_\-EINVAL}]{\itshape buf\_\-sz\/} is not {\ttfamily sizeof(ogg\_\-uint32\_\-t)}. \item[{\em OC\_\-IMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS@{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS@{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS~(2)}\label{group__oldfuncs_ga3befcdd66678f8d27034f9c4b16d1b9c}
|
||||
|
||||
|
||||
Sets the quantization parameters to use. \label{group__oldfuncs_encctlcodes_old}
|
||||
The parameters are copied, not stored by reference, so they can be freed after this call. {\ttfamily NULL} may be specified to revert to the default parameters.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em buf}]\doxyref{th\_\-quant\_\-info}{p.}{structth__quant__info} \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em OC\_\-FAULT}]{\itshape \doxyref{theora\_\-state}{p.}{structtheora__state}\/} is {\ttfamily NULL}. \item[{\em OC\_\-EINVAL}]Encoding has already begun, the quantization parameters are not acceptable to this version of the encoder, {\itshape buf\/} is {\ttfamily NULL} and {\itshape buf\_\-sz\/} is not zero, or {\itshape buf\/} is non-\/{\ttfamily NULL} and {\itshape buf\_\-sz\/} is not {\ttfamily sizeof(\doxyref{th\_\-quant\_\-info}{p.}{structth__quant__info})}. \item[{\em OC\_\-IMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!TH\_\-ENCCTL\_\-SET\_\-SPLEVEL@{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL@{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-SPLEVEL~(14)}\label{group__oldfuncs_gabd9fbcb6a25a77d991d3620164fe59d6}
|
||||
|
||||
|
||||
Sets the speed level. By default a speed value of 1 is used.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em buf}]int: The new encoding speed level. 0 is slowest, larger values use less CPU. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em OC\_\-FAULT}]{\itshape \doxyref{theora\_\-state}{p.}{structtheora__state}\/} or {\itshape buf\/} is {\ttfamily NULL}. \item[{\em OC\_\-EINVAL}]{\itshape buf\_\-sz\/} is not {\ttfamily sizeof(int)}, or the encoding speed level is out of bounds. The maximum encoding speed level may be implementation-\/ and encoding mode-\/specific, and can be obtained via \doxyref{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}{p.}{theoraenc_8h_a9baf5bdd206e80c78a8fd44687e89783}. \item[{\em OC\_\-IMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE@{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE@{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE~(10)}\label{group__oldfuncs_ga382d685a39a34d8e6ba76b00d804efd8}
|
||||
|
||||
|
||||
Disables any encoder features that would prevent lossless transcoding back to VP3. This primarily means disabling block-\/level QI values and not using 4MV mode when any of the luma blocks in a macro block are not coded. It also includes using the VP3 quantization tables and Huffman codes; if you set them explicitly after calling this function, the resulting stream will not be VP3-\/compatible. If you enable VP3-\/compatibility when encoding 4:2:2 or 4:4:4 source material, or when using a picture region smaller than the full frame (e.g. a non-\/multiple-\/of-\/16 width or height), then non-\/VP3 bitstream features will still be disabled, but the stream will still not be VP3-\/compatible, as VP3 was not capable of encoding such formats. If you call this after encoding has already begun, then the quantization tables and codebooks cannot be changed, but the frame-\/level features will be enabled or disabled as requested.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em buf}]{\ttfamily int}: a non-\/zero value to enable VP3 compatibility, or 0 to disable it (the default). \item[\mbox{$\rightarrow$} {\em buf}]{\ttfamily int}: 1 if all bitstream features required for VP3-\/compatibility could be set, and 0 otherwise. The latter will be returned if the pixel format is not 4:2:0, the picture region is smaller than the full frame, or if encoding has begun, preventing the quantization tables and codebooks from being set. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em OC\_\-FAULT}]{\itshape \doxyref{theora\_\-state}{p.}{structtheora__state}\/} or {\itshape buf\/} is {\ttfamily NULL}. \item[{\em OC\_\-EINVAL}]{\itshape buf\_\-sz\/} is not {\ttfamily sizeof(int)}. \item[{\em OC\_\-IMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
|
||||
|
||||
\subsection{Enumeration Type Documentation}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-colorspace@{theora\_\-colorspace}}
|
||||
\index{theora\_\-colorspace@{theora\_\-colorspace}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-colorspace}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf theora\_\-colorspace}}\label{group__oldfuncs_gaa567da4ce591f7373149ce3ef3acdac9}
|
||||
|
||||
|
||||
A Colorspace. \begin{Desc}
|
||||
\item[Enumerator: ]\par
|
||||
\begin{description}
|
||||
\index{OC\_\-CS\_\-UNSPECIFIED@{OC\_\-CS\_\-UNSPECIFIED}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-CS\_\-UNSPECIFIED@{OC\_\-CS\_\-UNSPECIFIED}}\item[{\em
|
||||
OC\_\-CS\_\-UNSPECIFIED\label{group__oldfuncs_ggaa567da4ce591f7373149ce3ef3acdac9abf217cf83d7d7cbf73295e6689f5cf5f}
|
||||
}]The colorspace is unknown or unspecified. \index{OC\_\-CS\_\-ITU\_\-REC\_\-470M@{OC\_\-CS\_\-ITU\_\-REC\_\-470M}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-CS\_\-ITU\_\-REC\_\-470M@{OC\_\-CS\_\-ITU\_\-REC\_\-470M}}\item[{\em
|
||||
OC\_\-CS\_\-ITU\_\-REC\_\-470M\label{group__oldfuncs_ggaa567da4ce591f7373149ce3ef3acdac9ab20c9851a21ab148fef0bf2c00c0a294}
|
||||
}]This is the best option for 'NTSC' content. \index{OC\_\-CS\_\-ITU\_\-REC\_\-470BG@{OC\_\-CS\_\-ITU\_\-REC\_\-470BG}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-CS\_\-ITU\_\-REC\_\-470BG@{OC\_\-CS\_\-ITU\_\-REC\_\-470BG}}\item[{\em
|
||||
OC\_\-CS\_\-ITU\_\-REC\_\-470BG\label{group__oldfuncs_ggaa567da4ce591f7373149ce3ef3acdac9a04f8fa2da26f9ec513f514163705666a}
|
||||
}]This is the best option for 'PAL' content. \index{OC\_\-CS\_\-NSPACES@{OC\_\-CS\_\-NSPACES}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-CS\_\-NSPACES@{OC\_\-CS\_\-NSPACES}}\item[{\em
|
||||
OC\_\-CS\_\-NSPACES\label{group__oldfuncs_ggaa567da4ce591f7373149ce3ef3acdac9a640b572f11fa7102d434e1c605aaa186}
|
||||
}]This marks the end of the defined colorspaces. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-pixelformat@{theora\_\-pixelformat}}
|
||||
\index{theora\_\-pixelformat@{theora\_\-pixelformat}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-pixelformat}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf theora\_\-pixelformat}}\label{group__oldfuncs_gae169da05bfaaf4e964a6866552d45079}
|
||||
|
||||
|
||||
A Chroma subsampling. These enumerate the available chroma subsampling options supported by the theora format. See Section 4.4 of the specification for exact definitions. \begin{Desc}
|
||||
\item[Enumerator: ]\par
|
||||
\begin{description}
|
||||
\index{OC\_\-PF\_\-420@{OC\_\-PF\_\-420}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-PF\_\-420@{OC\_\-PF\_\-420}}\item[{\em
|
||||
OC\_\-PF\_\-420\label{group__oldfuncs_ggae169da05bfaaf4e964a6866552d45079a4e451af01be2645511b0e431f5225d2b}
|
||||
}]Chroma subsampling by 2 in each direction (4:2:0). \index{OC\_\-PF\_\-RSVD@{OC\_\-PF\_\-RSVD}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-PF\_\-RSVD@{OC\_\-PF\_\-RSVD}}\item[{\em
|
||||
OC\_\-PF\_\-RSVD\label{group__oldfuncs_ggae169da05bfaaf4e964a6866552d45079a7d21c63341ad299766839c83ed1216eb}
|
||||
}]Reserved value. \index{OC\_\-PF\_\-422@{OC\_\-PF\_\-422}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-PF\_\-422@{OC\_\-PF\_\-422}}\item[{\em
|
||||
OC\_\-PF\_\-422\label{group__oldfuncs_ggae169da05bfaaf4e964a6866552d45079a36a88c55b7ddd5aedeac2d61d57fee5b}
|
||||
}]Horizonatal chroma subsampling by 2 (4:2:2). \index{OC\_\-PF\_\-444@{OC\_\-PF\_\-444}!oldfuncs@{oldfuncs}}\index{oldfuncs@{oldfuncs}!OC\_\-PF\_\-444@{OC\_\-PF\_\-444}}\item[{\em
|
||||
OC\_\-PF\_\-444\label{group__oldfuncs_ggae169da05bfaaf4e964a6866552d45079a1d5c6d1b0365e06b4a87880b7825f044}
|
||||
}]No chroma subsampling at all (4:4:4). \end{description}
|
||||
\end{Desc}
|
||||
|
||||
|
||||
|
||||
\subsection{Function Documentation}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-clear@{theora\_\-clear}}
|
||||
\index{theora\_\-clear@{theora\_\-clear}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void theora\_\-clear ({\bf theora\_\-state} $\ast$ {\em t})}\label{group__oldfuncs_gab252d5d81b925136dda72e8f1c09c5eb}
|
||||
|
||||
|
||||
Free all internal data associated with a \doxyref{theora\_\-state}{p.}{structtheora__state} handle.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em t}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle. \end{DoxyParams}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-comment\_\-add@{theora\_\-comment\_\-add}}
|
||||
\index{theora\_\-comment\_\-add@{theora\_\-comment\_\-add}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-comment\_\-add}]{\setlength{\rightskip}{0pt plus 5cm}void theora\_\-comment\_\-add ({\bf theora\_\-comment} $\ast$ {\em tc}, \/ char $\ast$ {\em comment})}\label{group__oldfuncs_ga650642ed23894e41109bbc42ec393ed4}
|
||||
|
||||
|
||||
Add a comment to an initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em tc}]A previously initialized theora comment structure \item[{\em comment}]A null-\/terminated string encoding the comment in the form \char`\"{}TAG=the value\char`\"{}\end{DoxyParams}
|
||||
Neither \doxyref{theora\_\-comment\_\-add()}{p.}{group__oldfuncs_ga650642ed23894e41109bbc42ec393ed4} nor \doxyref{theora\_\-comment\_\-add\_\-tag()}{p.}{group__oldfuncs_ga339bd80b5bf4bb168b7052d8ec0b5a92} support comments containing null values, although the bitstream format supports this. To add such comments you will need to manipulate the \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure directly. \index{oldfuncs@{oldfuncs}!theora\_\-comment\_\-add\_\-tag@{theora\_\-comment\_\-add\_\-tag}}
|
||||
\index{theora\_\-comment\_\-add\_\-tag@{theora\_\-comment\_\-add\_\-tag}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-comment\_\-add\_\-tag}]{\setlength{\rightskip}{0pt plus 5cm}void theora\_\-comment\_\-add\_\-tag ({\bf theora\_\-comment} $\ast$ {\em tc}, \/ char $\ast$ {\em tag}, \/ char $\ast$ {\em value})}\label{group__oldfuncs_ga339bd80b5bf4bb168b7052d8ec0b5a92}
|
||||
|
||||
|
||||
Add a comment to an initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em tc}]A previously initialized theora comment structure \item[{\em tag}]A null-\/terminated string containing the tag associated with the comment. \item[{\em value}]The corresponding value as a null-\/terminated string\end{DoxyParams}
|
||||
Neither \doxyref{theora\_\-comment\_\-add()}{p.}{group__oldfuncs_ga650642ed23894e41109bbc42ec393ed4} nor \doxyref{theora\_\-comment\_\-add\_\-tag()}{p.}{group__oldfuncs_ga339bd80b5bf4bb168b7052d8ec0b5a92} support comments containing null values, although the bitstream format supports this. To add such comments you will need to manipulate the \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure directly. \index{oldfuncs@{oldfuncs}!theora\_\-comment\_\-clear@{theora\_\-comment\_\-clear}}
|
||||
\index{theora\_\-comment\_\-clear@{theora\_\-comment\_\-clear}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-comment\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void theora\_\-comment\_\-clear ({\bf theora\_\-comment} $\ast$ {\em tc})}\label{group__oldfuncs_ga04c07c2eefba3a433e43f9fbde14719f}
|
||||
|
||||
|
||||
Clear an allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} struct so that it can be freed.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em tc}]An allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure. \end{DoxyParams}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-comment\_\-init@{theora\_\-comment\_\-init}}
|
||||
\index{theora\_\-comment\_\-init@{theora\_\-comment\_\-init}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-comment\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void theora\_\-comment\_\-init ({\bf theora\_\-comment} $\ast$ {\em tc})}\label{group__oldfuncs_ga811b92785df3bdbbebb3de612d9d6ce0}
|
||||
|
||||
|
||||
Initialize an allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em tc}]An allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure \end{DoxyParams}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-comment\_\-query@{theora\_\-comment\_\-query}}
|
||||
\index{theora\_\-comment\_\-query@{theora\_\-comment\_\-query}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-comment\_\-query}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ theora\_\-comment\_\-query ({\bf theora\_\-comment} $\ast$ {\em tc}, \/ char $\ast$ {\em tag}, \/ int {\em count})}\label{group__oldfuncs_ga4361f6001abb5c83c36a2ddfb648a8dc}
|
||||
|
||||
|
||||
Look up a comment value by tag.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em tc}]Tn initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure \item[{\em tag}]The tag to look up \item[{\em count}]The instance of the tag. The same tag can appear multiple times, each with a distinct and ordered value, so an index is required to retrieve them all. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
A pointer to the queried tag's value
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em NULL}]No matching tag is found\end{DoxyRetVals}
|
||||
\begin{DoxyNote}{Note}
|
||||
Use \doxyref{theora\_\-comment\_\-query\_\-count()}{p.}{group__oldfuncs_ga10f66a3c752442a3e0c0098e0f88df8b} to get the legal range for the count parameter.
|
||||
\end{DoxyNote}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-comment\_\-query\_\-count@{theora\_\-comment\_\-query\_\-count}}
|
||||
\index{theora\_\-comment\_\-query\_\-count@{theora\_\-comment\_\-query\_\-count}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-comment\_\-query\_\-count}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-comment\_\-query\_\-count ({\bf theora\_\-comment} $\ast$ {\em tc}, \/ char $\ast$ {\em tag})}\label{group__oldfuncs_ga10f66a3c752442a3e0c0098e0f88df8b}
|
||||
|
||||
|
||||
Look up the number of instances of a tag.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em tc}]An initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure \item[{\em tag}]The tag to look up \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The number on instances of a particular tag.
|
||||
\end{DoxyReturn}
|
||||
Call this first when querying for a specific tag and then interate over the number of instances with separate calls to \doxyref{theora\_\-comment\_\-query()}{p.}{group__oldfuncs_ga4361f6001abb5c83c36a2ddfb648a8dc} to retrieve all instances in order. \index{oldfuncs@{oldfuncs}!theora\_\-control@{theora\_\-control}}
|
||||
\index{theora\_\-control@{theora\_\-control}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-control}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-control ({\bf theora\_\-state} $\ast$ {\em th}, \/ int {\em req}, \/ void $\ast$ {\em buf}, \/ size\_\-t {\em buf\_\-sz})}\label{group__oldfuncs_ga186773db3bc8cd550047e7df1b2ba2c9}
|
||||
|
||||
|
||||
Encoder control function. This is used to provide advanced control the encoding process.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em th}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle. \item[{\em req}]The control code to process. See \doxyref{the list of available }{p.}{group__oldfuncs_encctlcodes_old} control codes for details. \item[{\em buf}]The parameters for this control code. \item[{\em buf\_\-sz}]The size of the parameter buffer. \end{DoxyParams}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-decode\_\-header@{theora\_\-decode\_\-header}}
|
||||
\index{theora\_\-decode\_\-header@{theora\_\-decode\_\-header}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-decode\_\-header}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-decode\_\-header ({\bf theora\_\-info} $\ast$ {\em ci}, \/ {\bf theora\_\-comment} $\ast$ {\em cc}, \/ ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82}
|
||||
|
||||
|
||||
Decode an Ogg packet, with the expectation that the packet contains an initial header, comment data or codebook tables.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em ci}]A \doxyref{theora\_\-info}{p.}{structtheora__info} structure to fill. This must have been previously initialized with \doxyref{theora\_\-info\_\-init()}{p.}{group__oldfuncs_ga3091c87d48f1faba018c5956379a6d90}. If {\itshape op\/} contains an initial header, \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} will fill {\itshape ci\/} with the parsed header values. If {\itshape op\/} contains codebook tables, \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} will parse these and attach an internal representation to {\itshape ci-\/$>$codec\_\-setup\/}. \item[{\em cc}]A \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure to fill. If {\itshape op\/} contains comment data, \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} will fill {\itshape cc\/} with the parsed comments. \item[{\em op}]An ogg\_\-packet structure which you expect contains an initial header, comment data or codebook tables.\end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em OC\_\-BADHEADER}]{\itshape op\/} is NULL; OR the first byte of {\itshape op-\/$>$packet\/} has the signature of an initial packet, but op is not a b\_\-o\_\-s packet; OR this packet has the signature of an initial header packet, but an initial header packet has already been seen; OR this packet has the signature of a comment packet, but the initial header has not yet been seen; OR this packet has the signature of a comment packet, but contains invalid data; OR this packet has the signature of codebook tables, but the initial header or comments have not yet been seen; OR this packet has the signature of codebook tables, but contains invalid data; OR the stream being decoded has a compatible version but this packet does not have the signature of a theora initial header, comments, or codebook packet \item[{\em OC\_\-VERSION}]The packet data of {\itshape op\/} is an initial header with a version which is incompatible with this version of libtheora. \item[{\em OC\_\-NEWPACKET}]the stream being decoded has an incompatible (future) version and contains an unknown signature. \item[{\em 0}]Success\end{DoxyRetVals}
|
||||
\begin{DoxyNote}{Note}
|
||||
The normal usage is that \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} be called on the first three packets of a theora logical bitstream in succession.
|
||||
\end{DoxyNote}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-decode\_\-init@{theora\_\-decode\_\-init}}
|
||||
\index{theora\_\-decode\_\-init@{theora\_\-decode\_\-init}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-decode\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-decode\_\-init ({\bf theora\_\-state} $\ast$ {\em th}, \/ {\bf theora\_\-info} $\ast$ {\em c})}\label{group__oldfuncs_ga264907c66003799ff77ecbd09eb33d2c}
|
||||
|
||||
|
||||
Initialize a \doxyref{theora\_\-state}{p.}{structtheora__state} handle for decoding.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em th}]The \doxyref{theora\_\-state}{p.}{structtheora__state} handle to initialize. \item[{\em c}]A \doxyref{theora\_\-info}{p.}{structtheora__info} struct filled with the desired decoding parameters. This is of course usually obtained from a previous call to \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82}. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-decode\_\-packetin@{theora\_\-decode\_\-packetin}}
|
||||
\index{theora\_\-decode\_\-packetin@{theora\_\-decode\_\-packetin}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-decode\_\-packetin}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-decode\_\-packetin ({\bf theora\_\-state} $\ast$ {\em th}, \/ ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_gaa65a9e53b46fd54ab344bd599fa96975}
|
||||
|
||||
|
||||
Input a packet containing encoded data into the theora decoder.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em th}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle previously initialized for decoding. \item[{\em op}]An ogg\_\-packet containing encoded theora data. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \item[{\em OC\_\-BADPACKET}]{\itshape op\/} does not contain encoded video data \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-decode\_\-YUVout@{theora\_\-decode\_\-YUVout}}
|
||||
\index{theora\_\-decode\_\-YUVout@{theora\_\-decode\_\-YUVout}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-decode\_\-YUVout}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-decode\_\-YUVout ({\bf theora\_\-state} $\ast$ {\em th}, \/ {\bf yuv\_\-buffer} $\ast$ {\em yuv})}\label{group__oldfuncs_ga09d47c80e1e94bff0a46a496816b8daa}
|
||||
|
||||
|
||||
Output the next available frame of decoded YUV data.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em th}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle previously initialized for decoding. \item[{\em yuv}]A \doxyref{yuv\_\-buffer}{p.}{structyuv__buffer} in which libtheora should place the decoded data. Note that the buffer struct itself is allocated by the user, but that the luma and chroma pointers will be filled in by the library. Also note that these luma and chroma regions should be considered read-\/only by the user. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-encode\_\-comment@{theora\_\-encode\_\-comment}}
|
||||
\index{theora\_\-encode\_\-comment@{theora\_\-encode\_\-comment}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-encode\_\-comment}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-encode\_\-comment ({\bf theora\_\-comment} $\ast$ {\em tc}, \/ ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_ga45e8db0713eaaca0f1144f3724cb834a}
|
||||
|
||||
|
||||
Request a comment header packet from provided metadata. A pointer to the comment data is placed in a user-\/provided ogg\_\-packet structure.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em tc}]A \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure filled with the desired metadata \item[{\em op}]An ogg\_\-packet structure to fill. libtheora will set all elements of this structure, including a pointer to the encoded comment data. The memory for the comment data is owned by libtheora. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-encode\_\-header@{theora\_\-encode\_\-header}}
|
||||
\index{theora\_\-encode\_\-header@{theora\_\-encode\_\-header}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-encode\_\-header}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-encode\_\-header ({\bf theora\_\-state} $\ast$ {\em t}, \/ ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_ga451feb58d6bde726edbae193689887be}
|
||||
|
||||
|
||||
Request a packet containing the initial header. A pointer to the header data is placed in a user-\/provided ogg\_\-packet structure.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em t}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle previously initialized for encoding. \item[{\em op}]An ogg\_\-packet structure to fill. libtheora will set all elements of this structure, including a pointer to the header data. The memory for the header data is owned by libtheora. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-encode\_\-init@{theora\_\-encode\_\-init}}
|
||||
\index{theora\_\-encode\_\-init@{theora\_\-encode\_\-init}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-encode\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-encode\_\-init ({\bf theora\_\-state} $\ast$ {\em th}, \/ {\bf theora\_\-info} $\ast$ {\em ti})}\label{group__oldfuncs_ga0f7ad4d4b2343278cb4ba8fb2bd5109a}
|
||||
|
||||
|
||||
Initialize the theora encoder.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em th}]The \doxyref{theora\_\-state}{p.}{structtheora__state} handle to initialize for encoding. \item[{\em ti}]A \doxyref{theora\_\-info}{p.}{structtheora__info} struct filled with the desired encoding parameters. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-encode\_\-packetout@{theora\_\-encode\_\-packetout}}
|
||||
\index{theora\_\-encode\_\-packetout@{theora\_\-encode\_\-packetout}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-encode\_\-packetout}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-encode\_\-packetout ({\bf theora\_\-state} $\ast$ {\em t}, \/ int {\em last\_\-p}, \/ ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_ga5f4929677a735bc2198c2309d235f1b3}
|
||||
|
||||
|
||||
Request the next packet of encoded video. The encoded data is placed in a user-\/provided ogg\_\-packet structure.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em t}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle previously initialized for encoding. \item[{\em last\_\-p}]whether this is the last packet the encoder should produce. \item[{\em op}]An ogg\_\-packet structure to fill. libtheora will set all elements of this structure, including a pointer to encoded data. The memory for the encoded data is owned by libtheora. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]No internal storage exists OR no packet is ready \item[{\em -\/1}]The encoding process has completed \item[{\em 1}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-encode\_\-tables@{theora\_\-encode\_\-tables}}
|
||||
\index{theora\_\-encode\_\-tables@{theora\_\-encode\_\-tables}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-encode\_\-tables}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-encode\_\-tables ({\bf theora\_\-state} $\ast$ {\em t}, \/ ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_ga5085baf20855b283fa01fc948505d9d2}
|
||||
|
||||
|
||||
Request a packet containing the codebook tables for the stream. A pointer to the codebook data is placed in a user-\/provided ogg\_\-packet structure.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em t}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle previously initialized for encoding. \item[{\em op}]An ogg\_\-packet structure to fill. libtheora will set all elements of this structure, including a pointer to the codebook data. The memory for the header data is owned by libtheora. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-encode\_\-YUVin@{theora\_\-encode\_\-YUVin}}
|
||||
\index{theora\_\-encode\_\-YUVin@{theora\_\-encode\_\-YUVin}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-encode\_\-YUVin}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-encode\_\-YUVin ({\bf theora\_\-state} $\ast$ {\em t}, \/ {\bf yuv\_\-buffer} $\ast$ {\em yuv})}\label{group__oldfuncs_gac0d33d896ca70cedfc94c5986d947078}
|
||||
|
||||
|
||||
Submit a YUV buffer to the theora encoder.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em t}]A \doxyref{theora\_\-state}{p.}{structtheora__state} handle previously initialized for encoding. \item[{\em yuv}]A buffer of YUV data to encode. Note that both the \doxyref{yuv\_\-buffer}{p.}{structyuv__buffer} struct and the luma/chroma buffers within should be allocated by the user. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em OC\_\-EINVAL}]Encoder is not ready, or is finished. \item[{\em -\/1}]The size of the given frame differs from those previously input \item[{\em 0}]Success \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-granule\_\-frame@{theora\_\-granule\_\-frame}}
|
||||
\index{theora\_\-granule\_\-frame@{theora\_\-granule\_\-frame}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-granule\_\-frame}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-int64\_\-t theora\_\-granule\_\-frame ({\bf theora\_\-state} $\ast$ {\em th}, \/ ogg\_\-int64\_\-t {\em granulepos})}\label{group__oldfuncs_ga7bfa3ceb2fb4b41a282456c56e1dd269}
|
||||
|
||||
|
||||
Convert a granulepos to an absolute frame index, starting at 0. The granulepos is interpreted in the context of a given \doxyref{theora\_\-state}{p.}{structtheora__state} handle.
|
||||
|
||||
Note that while the granulepos encodes the frame count (i.e. starting from 1) this call returns the frame index, starting from zero. Thus One can calculate the presentation time by multiplying the index by the rate.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em th}]A previously initialized \doxyref{theora\_\-state}{p.}{structtheora__state} handle (encode or decode) \item[{\em granulepos}]The granulepos to convert. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The frame index corresponding to {\itshape granulepos\/}.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em -\/1}]The given granulepos is undefined (i.e. negative)\end{DoxyRetVals}
|
||||
Thus function was added in the 1.0alpha4 release. \index{oldfuncs@{oldfuncs}!theora\_\-granule\_\-shift@{theora\_\-granule\_\-shift}}
|
||||
\index{theora\_\-granule\_\-shift@{theora\_\-granule\_\-shift}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-granule\_\-shift}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-granule\_\-shift ({\bf theora\_\-info} $\ast$ {\em ti})}\label{group__oldfuncs_gacd9360e6a47139c761002410af457a02}
|
||||
|
||||
|
||||
Report the granulepos shift radix. When embedded in Ogg, Theora uses a two-\/part granulepos, splitting the 64-\/bit field into two pieces. The more-\/significant section represents the frame count at the last keyframe, and the less-\/significant section represents the count of frames since the last keyframe. In this way the overall field is still non-\/decreasing with time, but usefully encodes a pointer to the last keyframe, which is necessary for correctly restarting decode after a seek.
|
||||
|
||||
This function reports the number of bits used to represent the distance to the last keyframe, and thus how the granulepos field must be shifted or masked to obtain the two parts.
|
||||
|
||||
Since libtheora returns compressed data in an ogg\_\-packet structure, this may be generally useful even if the Theora packets are not being used in an Ogg container.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em ti}]A previously initialized \doxyref{theora\_\-info}{p.}{structtheora__info} struct \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The bit shift dividing the two granulepos fields
|
||||
\end{DoxyReturn}
|
||||
This function was added in the 1.0alpha5 release. \index{oldfuncs@{oldfuncs}!theora\_\-granule\_\-time@{theora\_\-granule\_\-time}}
|
||||
\index{theora\_\-granule\_\-time@{theora\_\-granule\_\-time}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-granule\_\-time}]{\setlength{\rightskip}{0pt plus 5cm}double theora\_\-granule\_\-time ({\bf theora\_\-state} $\ast$ {\em th}, \/ ogg\_\-int64\_\-t {\em granulepos})}\label{group__oldfuncs_ga4376358b12b9fa23ce6fe21cb5c65ac6}
|
||||
|
||||
|
||||
Convert a granulepos to absolute time in seconds. The granulepos is interpreted in the context of a given \doxyref{theora\_\-state}{p.}{structtheora__state} handle, and gives the end time of a frame's presentation as used in Ogg mux ordering.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em th}]A previously initialized \doxyref{theora\_\-state}{p.}{structtheora__state} handle (encode or decode) \item[{\em granulepos}]The granulepos to convert. \end{DoxyParams}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The absolute time in seconds corresponding to {\itshape granulepos\/}. This is the \char`\"{}end time\char`\"{} for the frame, or the latest time it should be displayed. It is not the presentation time.
|
||||
\end{DoxyReturn}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em -\/1.}]The given granulepos is undefined (i.e. negative), or \item[{\em -\/1.}]The function has been disabled because floating point support is not available. \end{DoxyRetVals}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-info\_\-clear@{theora\_\-info\_\-clear}}
|
||||
\index{theora\_\-info\_\-clear@{theora\_\-info\_\-clear}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-info\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void theora\_\-info\_\-clear ({\bf theora\_\-info} $\ast$ {\em c})}\label{group__oldfuncs_gaba7022d58edbc4825cacad03f68b3e0d}
|
||||
|
||||
|
||||
Clear a \doxyref{theora\_\-info}{p.}{structtheora__info} structure. All values within the given \doxyref{theora\_\-info}{p.}{structtheora__info} structure are cleared, and associated internal codec setup data is freed.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em c}]A \doxyref{theora\_\-info}{p.}{structtheora__info} struct to initialize. \end{DoxyParams}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-info\_\-init@{theora\_\-info\_\-init}}
|
||||
\index{theora\_\-info\_\-init@{theora\_\-info\_\-init}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-info\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void theora\_\-info\_\-init ({\bf theora\_\-info} $\ast$ {\em c})}\label{group__oldfuncs_ga3091c87d48f1faba018c5956379a6d90}
|
||||
|
||||
|
||||
Initialize a \doxyref{theora\_\-info}{p.}{structtheora__info} structure. All values within the given \doxyref{theora\_\-info}{p.}{structtheora__info} structure are initialized, and space is allocated within libtheora for internal codec setup data.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em c}]A \doxyref{theora\_\-info}{p.}{structtheora__info} struct to initialize. \end{DoxyParams}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-packet\_\-isheader@{theora\_\-packet\_\-isheader}}
|
||||
\index{theora\_\-packet\_\-isheader@{theora\_\-packet\_\-isheader}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-packet\_\-isheader}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-packet\_\-isheader (ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_gab969f9d0407683f0e5abe73d0839a25b}
|
||||
|
||||
|
||||
Report whether a theora packet is a header or not This function does no verification beyond checking the header flag bit so it should not be used for bitstream identification; use \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} for that.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em op}]An ogg\_\-packet containing encoded theora data. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 1}]The packet is a header packet \item[{\em 0}]The packet is not a header packet (and so contains frame data)\end{DoxyRetVals}
|
||||
Thus function was added in the 1.0alpha4 release. \index{oldfuncs@{oldfuncs}!theora\_\-packet\_\-iskeyframe@{theora\_\-packet\_\-iskeyframe}}
|
||||
\index{theora\_\-packet\_\-iskeyframe@{theora\_\-packet\_\-iskeyframe}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-packet\_\-iskeyframe}]{\setlength{\rightskip}{0pt plus 5cm}int theora\_\-packet\_\-iskeyframe (ogg\_\-packet $\ast$ {\em op})}\label{group__oldfuncs_ga39ccc8f847a748d7074c926b4fdd12b2}
|
||||
|
||||
|
||||
Report whether a theora packet is a keyframe or not.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em op}]An ogg\_\-packet containing encoded theora data. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 1}]The packet contains a keyframe image \item[{\em 0}]The packet is contains an interframe delta \item[{\em -\/1}]The packet is not an image data packet at all\end{DoxyRetVals}
|
||||
Thus function was added in the 1.0alpha4 release. \index{oldfuncs@{oldfuncs}!theora\_\-version\_\-number@{theora\_\-version\_\-number}}
|
||||
\index{theora\_\-version\_\-number@{theora\_\-version\_\-number}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-version\_\-number}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t theora\_\-version\_\-number (void)}\label{group__oldfuncs_gad181f4b19d455dcc2bef2533530b84c8}
|
||||
|
||||
|
||||
Retrieve a 32-\/bit version number. This number is composed of a 16-\/bit major version, 8-\/bit minor version and 8 bit sub-\/version, composed as follows:
|
||||
\begin{DoxyPre}
|
||||
(VERSION\_MAJOR<<16) + (VERSION\_MINOR<<8) + (VERSION\_SUB)
|
||||
\end{DoxyPre}
|
||||
\begin{DoxyReturn}{Returns}
|
||||
The version number.
|
||||
\end{DoxyReturn}
|
||||
\index{oldfuncs@{oldfuncs}!theora\_\-version\_\-string@{theora\_\-version\_\-string}}
|
||||
\index{theora\_\-version\_\-string@{theora\_\-version\_\-string}!oldfuncs@{oldfuncs}}
|
||||
\subsubsection[{theora\_\-version\_\-string}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ theora\_\-version\_\-string (void)}\label{group__oldfuncs_ga5a3da8fd262a60f055f96536eec06df2}
|
||||
|
||||
|
||||
Retrieve a human-\/readable string to identify the encoder vendor and version. \begin{DoxyReturn}{Returns}
|
||||
A version string.
|
||||
\end{DoxyReturn}
|
||||
@@ -0,0 +1,12 @@
|
||||
\section{Introduction}\label{index_intro}
|
||||
This is the documentation for {\ttfamily libtheora} C API. The current reference implementation for {\tt Theora}, a free, patent-\/unencumbered video codec. Theora is derived from On2's VP3 codec with additional features and integration with Ogg multimedia formats by {\tt the Xiph.Org Foundation}. Complete documentation of the format itself is available in {\tt the Theora specification}.\subsection{Organization}\label{index_Organization}
|
||||
The functions documented here are actually subdivided into three separate libraries:
|
||||
\begin{DoxyItemize}
|
||||
\item {\ttfamily libtheoraenc} contains the encoder interface, described in \doxyref{Functions for Encoding}{p.}{group__encfuncs}.
|
||||
\item {\ttfamily libtheoradec} contains the decoder interface and routines shared with the encoder. You must also link to this if you link to {\ttfamily libtheoraenc}. The routines in this library are described in \doxyref{Functions for Decoding}{p.}{group__decfuncs} and \doxyref{Functions Shared by Encode and Decode}{p.}{group__basefuncs}.
|
||||
\item {\ttfamily libtheora} contains the \doxyref{Legacy pre-\/1.0 C API}{p.}{group__oldfuncs}.
|
||||
\end{DoxyItemize}
|
||||
|
||||
New code should link to {\ttfamily libtheoradec} and, if using encoder features, {\ttfamily libtheoraenc}. Together these two export both the standard and the legacy API, so this is all that is needed by any code. The older {\ttfamily libtheora} library is provided just for compatibility with older build configurations.
|
||||
|
||||
In general the recommended 1.x API symbols can be distinguished by their {\ttfamily th\_\-} or {\ttfamily TH\_\-} namespace prefix. The older, legacy API uses {\ttfamily theora\_\-} or {\ttfamily OC\_\-} prefixes instead.
|
||||
@@ -0,0 +1,7 @@
|
||||
\section{Modules}
|
||||
Here is a list of all modules:\begin{DoxyCompactList}
|
||||
\item \contentsline{section}{Functions Shared by Encode and Decode}{\pageref{group__basefuncs}}{}
|
||||
\item \contentsline{section}{Legacy pre-\/1.0 C API}{\pageref{group__oldfuncs}}{}
|
||||
\item \contentsline{section}{Functions for Decoding}{\pageref{group__decfuncs}}{}
|
||||
\item \contentsline{section}{Functions for Encoding}{\pageref{group__encfuncs}}{}
|
||||
\end{DoxyCompactList}
|
||||
@@ -0,0 +1,64 @@
|
||||
\documentclass[a4paper]{book}
|
||||
\usepackage{a4wide}
|
||||
\usepackage{makeidx}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{multicol}
|
||||
\usepackage{float}
|
||||
\usepackage{listings}
|
||||
\usepackage{color}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{alltt}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{doxygen}
|
||||
\lstset{language=C++,inputencoding=utf8,basicstyle=\footnotesize,breaklines=true,breakatwhitespace=true,tabsize=8,numbers=left }
|
||||
\makeindex
|
||||
\setcounter{tocdepth}{3}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
\begin{document}
|
||||
\begin{titlepage}
|
||||
\vspace*{7cm}
|
||||
\begin{center}
|
||||
{\Large libtheora \\[1ex]\large 1.1.0+svn }\\
|
||||
\vspace*{1cm}
|
||||
{\large Generated by Doxygen 1.6.1}\\
|
||||
\vspace*{0.5cm}
|
||||
{\small Mon Sep 28 11:02:24 2009}\\
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{arabic}
|
||||
\chapter{Main Page}
|
||||
\label{index}\input{index}
|
||||
\chapter{Module Index}
|
||||
\input{modules}
|
||||
\chapter{Data Structure Index}
|
||||
\input{annotated}
|
||||
\chapter{File Index}
|
||||
\input{files}
|
||||
\chapter{Module Documentation}
|
||||
\input{group__basefuncs}
|
||||
\include{group__oldfuncs}
|
||||
\include{group__decfuncs}
|
||||
\include{group__encfuncs}
|
||||
\chapter{Data Structure Documentation}
|
||||
\input{structth__comment}
|
||||
\include{structth__huff__code}
|
||||
\include{structth__img__plane}
|
||||
\include{structth__info}
|
||||
\include{structth__quant__info}
|
||||
\include{structth__quant__ranges}
|
||||
\include{structth__stripe__callback}
|
||||
\include{structtheora__comment}
|
||||
\include{structtheora__info}
|
||||
\include{structtheora__state}
|
||||
\include{structyuv__buffer}
|
||||
\chapter{File Documentation}
|
||||
\input{codec_8h}
|
||||
\include{theora_8h}
|
||||
\include{theoradec_8h}
|
||||
\include{theoraenc_8h}
|
||||
\printindex
|
||||
\end{document}
|
||||
@@ -0,0 +1,53 @@
|
||||
\section{th\_\-comment Struct Reference}
|
||||
\label{structth__comment}\index{th\_\-comment@{th\_\-comment}}
|
||||
|
||||
|
||||
The comment information.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$codec.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
char $\ast$$\ast$ {\bf user\_\-comments}
|
||||
\begin{DoxyCompactList}\small\item\em The array of comment string vectors. \item\end{DoxyCompactList}\item
|
||||
int $\ast$ {\bf comment\_\-lengths}
|
||||
\begin{DoxyCompactList}\small\item\em An array of the corresponding length of each vector, in bytes. \item\end{DoxyCompactList}\item
|
||||
int {\bf comments}
|
||||
\begin{DoxyCompactList}\small\item\em The total number of comment strings. \item\end{DoxyCompactList}\item
|
||||
char $\ast$ {\bf vendor}
|
||||
\begin{DoxyCompactList}\small\item\em The null-\/terminated vendor string. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
The comment information. This structure holds the in-\/stream metadata corresponding to the 'comment' header packet. The comment header is meant to be used much like someone jotting a quick note on the label of a video. It should be a short, to the point text note that can be more than a couple words, but not more than a short paragraph.
|
||||
|
||||
The metadata is stored as a series of (tag, value) pairs, in length-\/encoded string vectors. The first occurrence of the '=' character delimits the tag and value. A particular tag may occur more than once, and order is significant. The character set encoding for the strings is always UTF-\/8, but the tag names are limited to ASCII, and treated as case-\/insensitive. See {\tt the Theora specification}, Section 6.3.3 for details.
|
||||
|
||||
In filling in this structure, \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50} will null-\/terminate the user\_\-comment strings for safety. However, the bitstream format itself treats them as 8-\/bit clean vectors, possibly containing null characters, and so the length array should be treated as their authoritative length.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{th\_\-comment@{th\_\-comment}!comment\_\-lengths@{comment\_\-lengths}}
|
||||
\index{comment\_\-lengths@{comment\_\-lengths}!th_comment@{th\_\-comment}}
|
||||
\subsubsection[{comment\_\-lengths}]{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ {\bf th\_\-comment::comment\_\-lengths}}\label{structth__comment_a723dc6fdf75757e70e28eea864b10898}
|
||||
|
||||
|
||||
An array of the corresponding length of each vector, in bytes. \index{th\_\-comment@{th\_\-comment}!comments@{comments}}
|
||||
\index{comments@{comments}!th_comment@{th\_\-comment}}
|
||||
\subsubsection[{comments}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-comment::comments}}\label{structth__comment_a5990c34932376f070ad0fc314daaeb78}
|
||||
|
||||
|
||||
The total number of comment strings. \index{th\_\-comment@{th\_\-comment}!user\_\-comments@{user\_\-comments}}
|
||||
\index{user\_\-comments@{user\_\-comments}!th_comment@{th\_\-comment}}
|
||||
\subsubsection[{user\_\-comments}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ {\bf th\_\-comment::user\_\-comments}}\label{structth__comment_ad72830e183e707bb0df423eb73b00de4}
|
||||
|
||||
|
||||
The array of comment string vectors. \index{th\_\-comment@{th\_\-comment}!vendor@{vendor}}
|
||||
\index{vendor@{vendor}!th_comment@{th\_\-comment}}
|
||||
\subsubsection[{vendor}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ {\bf th\_\-comment::vendor}}\label{structth__comment_a93fbe894d23603f56843be15b0cbdba0}
|
||||
|
||||
|
||||
The null-\/terminated vendor string. This identifies the software used to encode the stream.
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf codec.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,35 @@
|
||||
\section{th\_\-huff\_\-code Struct Reference}
|
||||
\label{structth__huff__code}\index{th\_\-huff\_\-code@{th\_\-huff\_\-code}}
|
||||
|
||||
|
||||
A Huffman code for a Theora DCT token.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$codec.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf pattern}
|
||||
\begin{DoxyCompactList}\small\item\em The bit pattern for the code, with the LSbit of the pattern aligned in the LSbit of the word. \item\end{DoxyCompactList}\item
|
||||
int {\bf nbits}
|
||||
\begin{DoxyCompactList}\small\item\em The number of bits in the code. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
A Huffman code for a Theora DCT token. Each set of Huffman codes in a given table must form a complete, prefix-\/free code. There is no requirement that all the tokens in a table have a valid code, but the current encoder is not optimized to take advantage of this. If each of the five grouops of 16 tables does not contain at least one table with a code for every token, then the encoder may fail to encode certain frames. The complete table in the first group of 16 does not have to be in the same place as the complete table in the other groups, but the complete tables in the remaining four groups must all be in the same place.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{th\_\-huff\_\-code@{th\_\-huff\_\-code}!nbits@{nbits}}
|
||||
\index{nbits@{nbits}!th_huff_code@{th\_\-huff\_\-code}}
|
||||
\subsubsection[{nbits}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-huff\_\-code::nbits}}\label{structth__huff__code_aaf97b8f2f90042f7bc136a7b2bc35e35}
|
||||
|
||||
|
||||
The number of bits in the code. This must be between 0 and 32, inclusive. \index{th\_\-huff\_\-code@{th\_\-huff\_\-code}!pattern@{pattern}}
|
||||
\index{pattern@{pattern}!th_huff_code@{th\_\-huff\_\-code}}
|
||||
\subsubsection[{pattern}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-huff\_\-code::pattern}}\label{structth__huff__code_a6dd29e3aa5a0c5a2dd5ce1f45b1162b4}
|
||||
|
||||
|
||||
The bit pattern for the code, with the LSbit of the pattern aligned in the LSbit of the word.
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf codec.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,49 @@
|
||||
\section{th\_\-img\_\-plane Struct Reference}
|
||||
\label{structth__img__plane}\index{th\_\-img\_\-plane@{th\_\-img\_\-plane}}
|
||||
|
||||
|
||||
A buffer for a single color plane in an uncompressed image.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$codec.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
int {\bf width}
|
||||
\begin{DoxyCompactList}\small\item\em The width of this plane. \item\end{DoxyCompactList}\item
|
||||
int {\bf height}
|
||||
\begin{DoxyCompactList}\small\item\em The height of this plane. \item\end{DoxyCompactList}\item
|
||||
int {\bf stride}
|
||||
\begin{DoxyCompactList}\small\item\em The offset in bytes between successive rows. \item\end{DoxyCompactList}\item
|
||||
unsigned char $\ast$ {\bf data}
|
||||
\begin{DoxyCompactList}\small\item\em A pointer to the beginning of the first row. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
A buffer for a single color plane in an uncompressed image. This contains the image data in a left-\/to-\/right, top-\/down format. Each row of pixels is stored contiguously in memory, but successive rows need not be. Use {\itshape stride\/} to compute the offset of the next row. The encoder accepts both positive {\itshape stride\/} values (top-\/down in memory) and negative (bottom-\/up in memory). The decoder currently always generates images with positive strides.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{th\_\-img\_\-plane@{th\_\-img\_\-plane}!data@{data}}
|
||||
\index{data@{data}!th_img_plane@{th\_\-img\_\-plane}}
|
||||
\subsubsection[{data}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char$\ast$ {\bf th\_\-img\_\-plane::data}}\label{structth__img__plane_af8133681516ce88b5a201c1b4b7e6ba2}
|
||||
|
||||
|
||||
A pointer to the beginning of the first row. \index{th\_\-img\_\-plane@{th\_\-img\_\-plane}!height@{height}}
|
||||
\index{height@{height}!th_img_plane@{th\_\-img\_\-plane}}
|
||||
\subsubsection[{height}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-img\_\-plane::height}}\label{structth__img__plane_a21aea1367894468de489d529d7eaf44d}
|
||||
|
||||
|
||||
The height of this plane. \index{th\_\-img\_\-plane@{th\_\-img\_\-plane}!stride@{stride}}
|
||||
\index{stride@{stride}!th_img_plane@{th\_\-img\_\-plane}}
|
||||
\subsubsection[{stride}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-img\_\-plane::stride}}\label{structth__img__plane_ab1100f071ffee3b37e07e3222f819bad}
|
||||
|
||||
|
||||
The offset in bytes between successive rows. \index{th\_\-img\_\-plane@{th\_\-img\_\-plane}!width@{width}}
|
||||
\index{width@{width}!th_img_plane@{th\_\-img\_\-plane}}
|
||||
\subsubsection[{width}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-img\_\-plane::width}}\label{structth__img__plane_a58cc297a99cd4594c3d30e56f2ed6b74}
|
||||
|
||||
|
||||
The width of this plane.
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf codec.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,164 @@
|
||||
\section{th\_\-info Struct Reference}
|
||||
\label{structth__info}\index{th\_\-info@{th\_\-info}}
|
||||
|
||||
|
||||
Theora bitstream information.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$codec.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf frame\_\-width}
|
||||
\begin{DoxyCompactList}\small\item\em The encoded frame width. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf frame\_\-height}
|
||||
\begin{DoxyCompactList}\small\item\em The encoded frame height. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf pic\_\-width}
|
||||
\begin{DoxyCompactList}\small\item\em The displayed picture width. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf pic\_\-height}
|
||||
\begin{DoxyCompactList}\small\item\em The displayed picture height. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf pic\_\-x}
|
||||
\begin{DoxyCompactList}\small\item\em The X offset of the displayed picture. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf pic\_\-y}
|
||||
\begin{DoxyCompactList}\small\item\em The Y offset of the displayed picture. \item\end{DoxyCompactList}\item
|
||||
{\bf th\_\-colorspace} {\bf colorspace}
|
||||
\begin{DoxyCompactList}\small\item\em The color space. \item\end{DoxyCompactList}\item
|
||||
{\bf th\_\-pixel\_\-fmt} {\bf pixel\_\-fmt}
|
||||
\begin{DoxyCompactList}\small\item\em The pixel format. \item\end{DoxyCompactList}\item
|
||||
int {\bf target\_\-bitrate}
|
||||
\begin{DoxyCompactList}\small\item\em The target bit-\/rate in bits per second. \item\end{DoxyCompactList}\item
|
||||
int {\bf quality}
|
||||
\begin{DoxyCompactList}\small\item\em The target quality level. \item\end{DoxyCompactList}\item
|
||||
int {\bf keyframe\_\-granule\_\-shift}
|
||||
\begin{DoxyCompactList}\small\item\em The amount to shift to extract the last keyframe number from the granule position. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\begin{Indent}{\bf Theora version}\par
|
||||
{\em \label{_amgrpf735645ddddaaf44dc0647da0e883f6c}
|
||||
Bitstream version information.}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
unsigned char {\bf version\_\-major}
|
||||
\item
|
||||
unsigned char {\bf version\_\-minor}
|
||||
\item
|
||||
unsigned char {\bf version\_\-subminor}
|
||||
\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\begin{Indent}{\bf Frame rate}\par
|
||||
{\em \label{_amgrp801309c4a0e25a4db3fe5739b322b0a7}
|
||||
The frame rate, as a fraction.
|
||||
|
||||
If either is 0, the frame rate is undefined. }\begin{DoxyCompactItemize}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf fps\_\-numerator}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf fps\_\-denominator}
|
||||
\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\begin{Indent}{\bf Aspect ratio}\par
|
||||
{\em \label{_amgrpdeca19914b5126815a2220f15d067c9b}
|
||||
The aspect ratio of the pixels.
|
||||
|
||||
If either value is zero, the aspect ratio is undefined. If not specified by any external means, 1:1 should be assumed. The aspect ratio of the full picture can be computed as
|
||||
\begin{DoxyCode}
|
||||
aspect_numerator*pic_width/(aspect_denominator*pic_height).
|
||||
\end{DoxyCode}
|
||||
}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf aspect\_\-numerator}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf aspect\_\-denominator}
|
||||
\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
Theora bitstream information. This contains the basic playback parameters for a stream, and corresponds to the initial 'info' header packet. To initialize an encoder, the application fills in this structure and passes it to \doxyref{th\_\-encode\_\-alloc()}{p.}{group__encfuncs_gaa91e47bc9dd5f6ee52045bd7b815e5a7}. A default encoding mode is chosen based on the values of the \doxyref{quality}{p.}{structth__info_aa4cdcf96cb46b256821993e9a830ee02} and \doxyref{target\_\-bitrate}{p.}{structth__info_a1d9c8d768a4ae623269f5bd8f6f7a015} fields. On decode, it is filled in by \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50}, and then passed to \doxyref{th\_\-decode\_\-alloc()}{p.}{group__decfuncs_ga0ef07a9a97849054aa606c595a2d807e}.
|
||||
|
||||
Encoded Theora frames must be a multiple of 16 in size; this is what the \doxyref{frame\_\-width}{p.}{structth__info_a6b8087a4d831da53011a43b8d74087a0} and \doxyref{frame\_\-height}{p.}{structth__info_a6b1adc3a16a8336a72692b0a5937214c} members represent. To handle arbitrary picture sizes, a crop rectangle is specified in the \doxyref{pic\_\-x}{p.}{structth__info_a5b3f834bcf141564e7bb14f49101870f}, \doxyref{pic\_\-y}{p.}{structth__info_a8aacc575cab2dfe3735001c2ad32aa14}, \doxyref{pic\_\-width}{p.}{structth__info_a5048edf77b141dd3e9a92ca85e317345} and \doxyref{pic\_\-height}{p.}{structth__info_a775178474283c5990ba73f9ba7f6b88b} members.
|
||||
|
||||
All frame buffers contain pointers to the full, padded frame. However, the current encoder {\itshape will not\/} reference pixels outside of the cropped picture region, and the application does not need to fill them in. The decoder {\itshape will\/} allocate storage for a full frame, but the application {\itshape should not\/} rely on the padding containing sensible data.
|
||||
|
||||
It is also generally recommended that the offsets and sizes should still be multiples of 2 to avoid chroma sampling shifts when chroma is sub-\/sampled. See {\tt the Theora specification}, Section 4.4, for more details.
|
||||
|
||||
Frame rate, in frames per second, is stored as a rational fraction, as is the pixel aspect ratio. Note that this refers to the aspect ratio of the individual pixels, not of the overall frame itself. The frame aspect ratio can be computed from pixel aspect ratio using the image dimensions.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{th\_\-info@{th\_\-info}!aspect\_\-denominator@{aspect\_\-denominator}}
|
||||
\index{aspect\_\-denominator@{aspect\_\-denominator}!th_info@{th\_\-info}}
|
||||
\subsubsection[{aspect\_\-denominator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::aspect\_\-denominator}}\label{structth__info_a04c0bd477222d747a76085d8720322e2}
|
||||
\index{th\_\-info@{th\_\-info}!aspect\_\-numerator@{aspect\_\-numerator}}
|
||||
\index{aspect\_\-numerator@{aspect\_\-numerator}!th_info@{th\_\-info}}
|
||||
\subsubsection[{aspect\_\-numerator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::aspect\_\-numerator}}\label{structth__info_a5be65dac9f75e37864cf73dd543570cd}
|
||||
\index{th\_\-info@{th\_\-info}!colorspace@{colorspace}}
|
||||
\index{colorspace@{colorspace}!th_info@{th\_\-info}}
|
||||
\subsubsection[{colorspace}]{\setlength{\rightskip}{0pt plus 5cm}{\bf th\_\-colorspace} {\bf th\_\-info::colorspace}}\label{structth__info_a8c7828cd0e023e9d21108160d53659a6}
|
||||
|
||||
|
||||
The color space. \index{th\_\-info@{th\_\-info}!fps\_\-denominator@{fps\_\-denominator}}
|
||||
\index{fps\_\-denominator@{fps\_\-denominator}!th_info@{th\_\-info}}
|
||||
\subsubsection[{fps\_\-denominator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::fps\_\-denominator}}\label{structth__info_aa619408f70c03935529f1d3eda7a3ec2}
|
||||
\index{th\_\-info@{th\_\-info}!fps\_\-numerator@{fps\_\-numerator}}
|
||||
\index{fps\_\-numerator@{fps\_\-numerator}!th_info@{th\_\-info}}
|
||||
\subsubsection[{fps\_\-numerator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::fps\_\-numerator}}\label{structth__info_a20606e61676f585a7e59cfc96de190a5}
|
||||
\index{th\_\-info@{th\_\-info}!frame\_\-height@{frame\_\-height}}
|
||||
\index{frame\_\-height@{frame\_\-height}!th_info@{th\_\-info}}
|
||||
\subsubsection[{frame\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::frame\_\-height}}\label{structth__info_a6b1adc3a16a8336a72692b0a5937214c}
|
||||
|
||||
|
||||
The encoded frame height. This must be a multiple of 16, and less than 1048576. \index{th\_\-info@{th\_\-info}!frame\_\-width@{frame\_\-width}}
|
||||
\index{frame\_\-width@{frame\_\-width}!th_info@{th\_\-info}}
|
||||
\subsubsection[{frame\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::frame\_\-width}}\label{structth__info_a6b8087a4d831da53011a43b8d74087a0}
|
||||
|
||||
|
||||
The encoded frame width. This must be a multiple of 16, and less than 1048576. \index{th\_\-info@{th\_\-info}!keyframe\_\-granule\_\-shift@{keyframe\_\-granule\_\-shift}}
|
||||
\index{keyframe\_\-granule\_\-shift@{keyframe\_\-granule\_\-shift}!th_info@{th\_\-info}}
|
||||
\subsubsection[{keyframe\_\-granule\_\-shift}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-info::keyframe\_\-granule\_\-shift}}\label{structth__info_a693ca4ab11fbc0c3f32594b4bb8766ed}
|
||||
|
||||
|
||||
The amount to shift to extract the last keyframe number from the granule position. This can be at most 31. \doxyref{th\_\-info\_\-init()}{p.}{group__basefuncs_ga430d9c605816a6ca0bdce3a0b965b926} will set this to a default value (currently {\ttfamily 6}, which is good for streaming applications), but you can set it to 0 to make every frame a keyframe. The maximum distance between key frames is {\ttfamily 1$<$$<$\doxyref{keyframe\_\-granule\_\-shift}{p.}{structth__info_a693ca4ab11fbc0c3f32594b4bb8766ed}}. The keyframe frequency can be more finely controlled with \doxyref{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}{p.}{theoraenc_8h_a27e755e15b4b5604c54974b304037a49}, which can also be adjusted during encoding (for example, to force the next frame to be a keyframe), but it cannot be set larger than the amount permitted by this field after the headers have been output. \index{th\_\-info@{th\_\-info}!pic\_\-height@{pic\_\-height}}
|
||||
\index{pic\_\-height@{pic\_\-height}!th_info@{th\_\-info}}
|
||||
\subsubsection[{pic\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::pic\_\-height}}\label{structth__info_a775178474283c5990ba73f9ba7f6b88b}
|
||||
|
||||
|
||||
The displayed picture height. This must be no larger than height. \index{th\_\-info@{th\_\-info}!pic\_\-width@{pic\_\-width}}
|
||||
\index{pic\_\-width@{pic\_\-width}!th_info@{th\_\-info}}
|
||||
\subsubsection[{pic\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::pic\_\-width}}\label{structth__info_a5048edf77b141dd3e9a92ca85e317345}
|
||||
|
||||
|
||||
The displayed picture width. This must be no larger than width. \index{th\_\-info@{th\_\-info}!pic\_\-x@{pic\_\-x}}
|
||||
\index{pic\_\-x@{pic\_\-x}!th_info@{th\_\-info}}
|
||||
\subsubsection[{pic\_\-x}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::pic\_\-x}}\label{structth__info_a5b3f834bcf141564e7bb14f49101870f}
|
||||
|
||||
|
||||
The X offset of the displayed picture. This must be no larger than \doxyref{frame\_\-width}{p.}{structth__info_a6b8087a4d831da53011a43b8d74087a0}-\/\doxyref{pic\_\-width}{p.}{structth__info_a5048edf77b141dd3e9a92ca85e317345} or 255, whichever is smaller. \index{th\_\-info@{th\_\-info}!pic\_\-y@{pic\_\-y}}
|
||||
\index{pic\_\-y@{pic\_\-y}!th_info@{th\_\-info}}
|
||||
\subsubsection[{pic\_\-y}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf th\_\-info::pic\_\-y}}\label{structth__info_a8aacc575cab2dfe3735001c2ad32aa14}
|
||||
|
||||
|
||||
The Y offset of the displayed picture. This must be no larger than \doxyref{frame\_\-height}{p.}{structth__info_a6b1adc3a16a8336a72692b0a5937214c}-\/\doxyref{pic\_\-height}{p.}{structth__info_a775178474283c5990ba73f9ba7f6b88b}, and \doxyref{frame\_\-height}{p.}{structth__info_a6b1adc3a16a8336a72692b0a5937214c}-\/\doxyref{pic\_\-height}{p.}{structth__info_a775178474283c5990ba73f9ba7f6b88b}-\/\doxyref{pic\_\-y}{p.}{structth__info_a8aacc575cab2dfe3735001c2ad32aa14} must be no larger than 255. This slightly funny restriction is due to the fact that the offset is specified from the top of the image for consistency with the standard graphics left-\/handed coordinate system used throughout this API, while it is stored in the encoded stream as an offset from the bottom. \index{th\_\-info@{th\_\-info}!pixel\_\-fmt@{pixel\_\-fmt}}
|
||||
\index{pixel\_\-fmt@{pixel\_\-fmt}!th_info@{th\_\-info}}
|
||||
\subsubsection[{pixel\_\-fmt}]{\setlength{\rightskip}{0pt plus 5cm}{\bf th\_\-pixel\_\-fmt} {\bf th\_\-info::pixel\_\-fmt}}\label{structth__info_a2301388ef3755c41ab12fd144c1fc54e}
|
||||
|
||||
|
||||
The pixel format. \index{th\_\-info@{th\_\-info}!quality@{quality}}
|
||||
\index{quality@{quality}!th_info@{th\_\-info}}
|
||||
\subsubsection[{quality}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-info::quality}}\label{structth__info_aa4cdcf96cb46b256821993e9a830ee02}
|
||||
|
||||
|
||||
The target quality level. Valid values range from 0 to 63, inclusive, with higher values giving higher quality. If initializing an encoder with this struct, and \doxyref{target\_\-bitrate}{p.}{structth__info_a1d9c8d768a4ae623269f5bd8f6f7a015} is set to zero, VBR encoding at this quality will be activated by default. \index{th\_\-info@{th\_\-info}!target\_\-bitrate@{target\_\-bitrate}}
|
||||
\index{target\_\-bitrate@{target\_\-bitrate}!th_info@{th\_\-info}}
|
||||
\subsubsection[{target\_\-bitrate}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-info::target\_\-bitrate}}\label{structth__info_a1d9c8d768a4ae623269f5bd8f6f7a015}
|
||||
|
||||
|
||||
The target bit-\/rate in bits per second. If initializing an encoder with this struct, set this field to a non-\/zero value to activate CBR encoding by default. \index{th\_\-info@{th\_\-info}!version\_\-major@{version\_\-major}}
|
||||
\index{version\_\-major@{version\_\-major}!th_info@{th\_\-info}}
|
||||
\subsubsection[{version\_\-major}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char {\bf th\_\-info::version\_\-major}}\label{structth__info_a60b3e2cac006fee0e105a918d6a5a9f9}
|
||||
\index{th\_\-info@{th\_\-info}!version\_\-minor@{version\_\-minor}}
|
||||
\index{version\_\-minor@{version\_\-minor}!th_info@{th\_\-info}}
|
||||
\subsubsection[{version\_\-minor}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char {\bf th\_\-info::version\_\-minor}}\label{structth__info_abb1d4887a8079c6c5aaa6d7229f243d7}
|
||||
\index{th\_\-info@{th\_\-info}!version\_\-subminor@{version\_\-subminor}}
|
||||
\index{version\_\-subminor@{version\_\-subminor}!th_info@{th\_\-info}}
|
||||
\subsubsection[{version\_\-subminor}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char {\bf th\_\-info::version\_\-subminor}}\label{structth__info_abfacc79b7cabae12b6ac2484f76602d3}
|
||||
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf codec.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,81 @@
|
||||
\section{th\_\-quant\_\-info Struct Reference}
|
||||
\label{structth__quant__info}\index{th\_\-quant\_\-info@{th\_\-quant\_\-info}}
|
||||
|
||||
|
||||
A complete set of quantization parameters.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$codec.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
ogg\_\-uint16\_\-t {\bf dc\_\-scale} [64]
|
||||
\begin{DoxyCompactList}\small\item\em The DC scaling factors. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint16\_\-t {\bf ac\_\-scale} [64]
|
||||
\begin{DoxyCompactList}\small\item\em The AC scaling factors. \item\end{DoxyCompactList}\item
|
||||
unsigned char {\bf loop\_\-filter\_\-limits} [64]
|
||||
\begin{DoxyCompactList}\small\item\em The loop filter limit values. \item\end{DoxyCompactList}\item
|
||||
{\bf th\_\-quant\_\-ranges} {\bf qi\_\-ranges} [2][3]
|
||||
\begin{DoxyCompactList}\small\item\em The {\itshape qi\/} ranges for each {\itshape ci\/} and {\itshape pli\/}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
A complete set of quantization parameters. The quantizer for each coefficient is calculated as:
|
||||
\begin{DoxyCode}
|
||||
Q=MAX(MIN(qmin[qti][ci!=0],scale[ci!=0][qi]*base[qti][pli][qi][ci]/100),
|
||||
1024).
|
||||
\end{DoxyCode}
|
||||
|
||||
|
||||
{\itshape qti\/} is the quantization type index: 0 for intra, 1 for inter. {\ttfamily ci!=0} is 0 for the DC coefficient and 1 for AC coefficients. {\itshape qi\/} is the quality index, ranging between 0 (low quality) and 63 (high quality). {\itshape pli\/} is the color plane index: 0 for Y', 1 for Cb, 2 for Cr. {\itshape ci\/} is the DCT coefficient index. Coefficient indices correspond to the normal 2D DCT block ordering-\/-\/row-\/major with low frequencies first-\/-\/{\itshape not\/} zig-\/zag order.
|
||||
|
||||
Minimum quantizers are constant, and are given by:
|
||||
\begin{DoxyCode}
|
||||
qmin[2][2]={{4,2},{8,4}}.
|
||||
\end{DoxyCode}
|
||||
|
||||
|
||||
Parameters that can be stored in the bitstream are as follows:
|
||||
\begin{DoxyItemize}
|
||||
\item The two scale matrices ac\_\-scale and dc\_\-scale.
|
||||
\begin{DoxyCode}
|
||||
scale[2][64]={dc_scale,ac_scale}.
|
||||
\end{DoxyCode}
|
||||
|
||||
\item The base matrices for each {\itshape qi\/}, {\itshape qti\/} and {\itshape pli\/} (up to 384 in all). In order to avoid storing a full 384 base matrices, only a sparse set of matrices are stored, and the rest are linearly interpolated. This is done as follows. For each {\itshape qti\/} and {\itshape pli\/}, a series of {\itshape n\/} {\itshape qi\/} ranges is defined. The size of each {\itshape qi\/} range can vary arbitrarily, but they must sum to 63. Then, {\ttfamily n+1} matrices are specified, one for each endpoint of the ranges. For interpolation purposes, each range's endpoints are the first {\itshape qi\/} value it contains and one past the last {\itshape qi\/} value it contains. Fractional values are rounded to the nearest integer, with ties rounded away from zero.
|
||||
\end{DoxyItemize}
|
||||
|
||||
Base matrices are stored by reference, so if the same matrices are used multiple times, they will only appear once in the bitstream. The bitstream is also capable of omitting an entire set of ranges and its associated matrices if they are the same as either the previous set (indexed in row-\/major order) or if the inter set is the same as the intra set.
|
||||
|
||||
|
||||
\begin{DoxyItemize}
|
||||
\item Loop filter limit values. The same limits are used for the loop filter in all color planes, despite potentially differing levels of quantization in each.
|
||||
\end{DoxyItemize}
|
||||
|
||||
For the current encoder, {\ttfamily scale[ci!=0][qi]} must be no greater than {\ttfamily scale[ci!=0][qi-\/1]} and {\ttfamily base[qti][pli][qi][ci]} must be no greater than {\ttfamily base[qti][pli][qi-\/1][ci]}. These two conditions ensure that the actual quantizer for a given {\itshape qti\/}, {\itshape pli\/}, and {\itshape ci\/} does not increase as {\itshape qi\/} increases. This is not required by the decoder.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{th\_\-quant\_\-info@{th\_\-quant\_\-info}!ac\_\-scale@{ac\_\-scale}}
|
||||
\index{ac\_\-scale@{ac\_\-scale}!th_quant_info@{th\_\-quant\_\-info}}
|
||||
\subsubsection[{ac\_\-scale}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint16\_\-t {\bf th\_\-quant\_\-info::ac\_\-scale}[64]}\label{structth__quant__info_a102f079c8f4a135dc0895c10768aeb06}
|
||||
|
||||
|
||||
The AC scaling factors. \index{th\_\-quant\_\-info@{th\_\-quant\_\-info}!dc\_\-scale@{dc\_\-scale}}
|
||||
\index{dc\_\-scale@{dc\_\-scale}!th_quant_info@{th\_\-quant\_\-info}}
|
||||
\subsubsection[{dc\_\-scale}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint16\_\-t {\bf th\_\-quant\_\-info::dc\_\-scale}[64]}\label{structth__quant__info_ad5c1c0d1aa4127fcf864ae747d732ed9}
|
||||
|
||||
|
||||
The DC scaling factors. \index{th\_\-quant\_\-info@{th\_\-quant\_\-info}!loop\_\-filter\_\-limits@{loop\_\-filter\_\-limits}}
|
||||
\index{loop\_\-filter\_\-limits@{loop\_\-filter\_\-limits}!th_quant_info@{th\_\-quant\_\-info}}
|
||||
\subsubsection[{loop\_\-filter\_\-limits}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char {\bf th\_\-quant\_\-info::loop\_\-filter\_\-limits}[64]}\label{structth__quant__info_a4ac56bf0a45b5743b36daf85d5cd9e33}
|
||||
|
||||
|
||||
The loop filter limit values. \index{th\_\-quant\_\-info@{th\_\-quant\_\-info}!qi\_\-ranges@{qi\_\-ranges}}
|
||||
\index{qi\_\-ranges@{qi\_\-ranges}!th_quant_info@{th\_\-quant\_\-info}}
|
||||
\subsubsection[{qi\_\-ranges}]{\setlength{\rightskip}{0pt plus 5cm}{\bf th\_\-quant\_\-ranges} {\bf th\_\-quant\_\-info::qi\_\-ranges}[2][3]}\label{structth__quant__info_a6feacf4b365e305a7df7b93d87ee7bb8}
|
||||
|
||||
|
||||
The {\itshape qi\/} ranges for each {\itshape ci\/} and {\itshape pli\/}.
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf codec.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,42 @@
|
||||
\section{th\_\-quant\_\-ranges Struct Reference}
|
||||
\label{structth__quant__ranges}\index{th\_\-quant\_\-ranges@{th\_\-quant\_\-ranges}}
|
||||
|
||||
|
||||
A set of {\itshape qi\/} ranges.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$codec.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
int {\bf nranges}
|
||||
\begin{DoxyCompactList}\small\item\em The number of ranges in the set. \item\end{DoxyCompactList}\item
|
||||
const int $\ast$ {\bf sizes}
|
||||
\begin{DoxyCompactList}\small\item\em The size of each of the \doxyref{nranges}{p.}{structth__quant__ranges_a53e5a3d7f7a112100b4b670929b3ebab} ranges. \item\end{DoxyCompactList}\item
|
||||
const {\bf th\_\-quant\_\-base} $\ast$ {\bf base\_\-matrices}
|
||||
\begin{DoxyCompactList}\small\item\em \doxyref{nranges}{p.}{structth__quant__ranges_a53e5a3d7f7a112100b4b670929b3ebab} {\ttfamily +1} base matrices. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
A set of {\itshape qi\/} ranges.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{th\_\-quant\_\-ranges@{th\_\-quant\_\-ranges}!base\_\-matrices@{base\_\-matrices}}
|
||||
\index{base\_\-matrices@{base\_\-matrices}!th_quant_ranges@{th\_\-quant\_\-ranges}}
|
||||
\subsubsection[{base\_\-matrices}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf th\_\-quant\_\-base}$\ast$ {\bf th\_\-quant\_\-ranges::base\_\-matrices}}\label{structth__quant__ranges_a52cb432f034737087492ea448de20bdb}
|
||||
|
||||
|
||||
\doxyref{nranges}{p.}{structth__quant__ranges_a53e5a3d7f7a112100b4b670929b3ebab} {\ttfamily +1} base matrices. Matrices {\itshape i\/} and {\ttfamily i+1} form the endpoints of range {\itshape i\/}. \index{th\_\-quant\_\-ranges@{th\_\-quant\_\-ranges}!nranges@{nranges}}
|
||||
\index{nranges@{nranges}!th_quant_ranges@{th\_\-quant\_\-ranges}}
|
||||
\subsubsection[{nranges}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf th\_\-quant\_\-ranges::nranges}}\label{structth__quant__ranges_a53e5a3d7f7a112100b4b670929b3ebab}
|
||||
|
||||
|
||||
The number of ranges in the set. \index{th\_\-quant\_\-ranges@{th\_\-quant\_\-ranges}!sizes@{sizes}}
|
||||
\index{sizes@{sizes}!th_quant_ranges@{th\_\-quant\_\-ranges}}
|
||||
\subsubsection[{sizes}]{\setlength{\rightskip}{0pt plus 5cm}const int$\ast$ {\bf th\_\-quant\_\-ranges::sizes}}\label{structth__quant__ranges_af3188a373bc0b8ffaa330d0ab4c1a194}
|
||||
|
||||
|
||||
The size of each of the \doxyref{nranges}{p.}{structth__quant__ranges_a53e5a3d7f7a112100b4b670929b3ebab} ranges. These must sum to 63.
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf codec.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,35 @@
|
||||
\section{th\_\-stripe\_\-callback Struct Reference}
|
||||
\label{structth__stripe__callback}\index{th\_\-stripe\_\-callback@{th\_\-stripe\_\-callback}}
|
||||
|
||||
|
||||
The striped decode callback data to pass to \doxyref{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}{p.}{theoradec_8h_ac95cc9e109474b0fa4bb920ab2cfdf1e}.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$theoradec.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
void $\ast$ {\bf ctx}
|
||||
\begin{DoxyCompactList}\small\item\em An application-\/provided context pointer. \item\end{DoxyCompactList}\item
|
||||
{\bf th\_\-stripe\_\-decoded\_\-func} {\bf stripe\_\-decoded}
|
||||
\begin{DoxyCompactList}\small\item\em The callback function pointer. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
The striped decode callback data to pass to \doxyref{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}{p.}{theoradec_8h_ac95cc9e109474b0fa4bb920ab2cfdf1e}.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{th\_\-stripe\_\-callback@{th\_\-stripe\_\-callback}!ctx@{ctx}}
|
||||
\index{ctx@{ctx}!th_stripe_callback@{th\_\-stripe\_\-callback}}
|
||||
\subsubsection[{ctx}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ {\bf th\_\-stripe\_\-callback::ctx}}\label{structth__stripe__callback_ab895162ce29a411fa98e0ba9661f47d4}
|
||||
|
||||
|
||||
An application-\/provided context pointer. This will be passed back verbatim to the application. \index{th\_\-stripe\_\-callback@{th\_\-stripe\_\-callback}!stripe\_\-decoded@{stripe\_\-decoded}}
|
||||
\index{stripe\_\-decoded@{stripe\_\-decoded}!th_stripe_callback@{th\_\-stripe\_\-callback}}
|
||||
\subsubsection[{stripe\_\-decoded}]{\setlength{\rightskip}{0pt plus 5cm}{\bf th\_\-stripe\_\-decoded\_\-func} {\bf th\_\-stripe\_\-callback::stripe\_\-decoded}}\label{structth__stripe__callback_a977c725680a37e3446e459f063b1f4a5}
|
||||
|
||||
|
||||
The callback function pointer.
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf theoradec.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,53 @@
|
||||
\section{theora\_\-comment Struct Reference}
|
||||
\label{structtheora__comment}\index{theora\_\-comment@{theora\_\-comment}}
|
||||
|
||||
|
||||
Comment header metadata.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$theora.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
char $\ast$$\ast$ {\bf user\_\-comments}
|
||||
\begin{DoxyCompactList}\small\item\em An array of comment string vectors. \item\end{DoxyCompactList}\item
|
||||
int $\ast$ {\bf comment\_\-lengths}
|
||||
\begin{DoxyCompactList}\small\item\em An array of corresponding string vector lengths in bytes. \item\end{DoxyCompactList}\item
|
||||
int {\bf comments}
|
||||
\begin{DoxyCompactList}\small\item\em The total number of comment string vectors. \item\end{DoxyCompactList}\item
|
||||
char $\ast$ {\bf vendor}
|
||||
\begin{DoxyCompactList}\small\item\em The vendor string identifying the encoder, null terminated. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
Comment header metadata. This structure holds the in-\/stream metadata corresponding to the 'comment' header packet.
|
||||
|
||||
Meta data is stored as a series of (tag, value) pairs, in length-\/encoded string vectors. The first occurence of the '=' character delimits the tag and value. A particular tag may occur more than once. The character set encoding for the strings is always UTF-\/8, but the tag names are limited to case-\/insensitive ASCII. See the spec for details.
|
||||
|
||||
In filling in this structure, \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} will null-\/terminate the user\_\-comment strings for safety. However, the bitstream format itself treats them as 8-\/bit clean, and so the length array should be treated as authoritative for their length.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{theora\_\-comment@{theora\_\-comment}!comment\_\-lengths@{comment\_\-lengths}}
|
||||
\index{comment\_\-lengths@{comment\_\-lengths}!theora_comment@{theora\_\-comment}}
|
||||
\subsubsection[{comment\_\-lengths}]{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ {\bf theora\_\-comment::comment\_\-lengths}}\label{structtheora__comment_a5ab4a376d3c217282a684577c9c9f49a}
|
||||
|
||||
|
||||
An array of corresponding string vector lengths in bytes. \index{theora\_\-comment@{theora\_\-comment}!comments@{comments}}
|
||||
\index{comments@{comments}!theora_comment@{theora\_\-comment}}
|
||||
\subsubsection[{comments}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf theora\_\-comment::comments}}\label{structtheora__comment_a122393035c8352ff9be42d69e73aee00}
|
||||
|
||||
|
||||
The total number of comment string vectors. \index{theora\_\-comment@{theora\_\-comment}!user\_\-comments@{user\_\-comments}}
|
||||
\index{user\_\-comments@{user\_\-comments}!theora_comment@{theora\_\-comment}}
|
||||
\subsubsection[{user\_\-comments}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ {\bf theora\_\-comment::user\_\-comments}}\label{structtheora__comment_a1e236fd180dfce19be89081399444cf5}
|
||||
|
||||
|
||||
An array of comment string vectors. \index{theora\_\-comment@{theora\_\-comment}!vendor@{vendor}}
|
||||
\index{vendor@{vendor}!theora_comment@{theora\_\-comment}}
|
||||
\subsubsection[{vendor}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ {\bf theora\_\-comment::vendor}}\label{structtheora__comment_adb371baf8f0daed42af8b875cf8430ef}
|
||||
|
||||
|
||||
The vendor string identifying the encoder, null terminated.
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf theora.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,197 @@
|
||||
\section{theora\_\-info Struct Reference}
|
||||
\label{structtheora__info}\index{theora\_\-info@{theora\_\-info}}
|
||||
|
||||
|
||||
Theora bitstream info.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$theora.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf width}
|
||||
\begin{DoxyCompactList}\small\item\em encoded frame width \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf height}
|
||||
\begin{DoxyCompactList}\small\item\em encoded frame height \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf frame\_\-width}
|
||||
\begin{DoxyCompactList}\small\item\em display frame width \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf frame\_\-height}
|
||||
\begin{DoxyCompactList}\small\item\em display frame height \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf offset\_\-x}
|
||||
\begin{DoxyCompactList}\small\item\em horizontal offset of the displayed frame \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf offset\_\-y}
|
||||
\begin{DoxyCompactList}\small\item\em vertical offset of the displayed frame \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf fps\_\-numerator}
|
||||
\begin{DoxyCompactList}\small\item\em frame rate numerator \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf fps\_\-denominator}
|
||||
\begin{DoxyCompactList}\small\item\em frame rate denominator \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf aspect\_\-numerator}
|
||||
\begin{DoxyCompactList}\small\item\em pixel aspect ratio numerator \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf aspect\_\-denominator}
|
||||
\begin{DoxyCompactList}\small\item\em pixel aspect ratio denominator \item\end{DoxyCompactList}\item
|
||||
{\bf theora\_\-colorspace} {\bf colorspace}
|
||||
\begin{DoxyCompactList}\small\item\em colorspace \item\end{DoxyCompactList}\item
|
||||
int {\bf target\_\-bitrate}
|
||||
\begin{DoxyCompactList}\small\item\em nominal bitrate in bits per second \item\end{DoxyCompactList}\item
|
||||
int {\bf quality}
|
||||
\begin{DoxyCompactList}\small\item\em Nominal quality setting, 0-\/63. \item\end{DoxyCompactList}\item
|
||||
int {\bf quick\_\-p}
|
||||
\begin{DoxyCompactList}\small\item\em Quick encode/decode. \item\end{DoxyCompactList}\item
|
||||
unsigned char {\bf version\_\-major}
|
||||
\item
|
||||
unsigned char {\bf version\_\-minor}
|
||||
\item
|
||||
unsigned char {\bf version\_\-subminor}
|
||||
\item
|
||||
void $\ast$ {\bf codec\_\-setup}
|
||||
\item
|
||||
int {\bf dropframes\_\-p}
|
||||
\item
|
||||
int {\bf keyframe\_\-auto\_\-p}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf keyframe\_\-frequency}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf keyframe\_\-frequency\_\-force}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf keyframe\_\-data\_\-target\_\-bitrate}
|
||||
\item
|
||||
ogg\_\-int32\_\-t {\bf keyframe\_\-auto\_\-threshold}
|
||||
\item
|
||||
ogg\_\-uint32\_\-t {\bf keyframe\_\-mindistance}
|
||||
\item
|
||||
ogg\_\-int32\_\-t {\bf noise\_\-sensitivity}
|
||||
\item
|
||||
ogg\_\-int32\_\-t {\bf sharpness}
|
||||
\item
|
||||
{\bf theora\_\-pixelformat} {\bf pixelformat}
|
||||
\begin{DoxyCompactList}\small\item\em chroma subsampling mode to expect \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
Theora bitstream info. Contains the basic playback parameters for a stream, corresponding to the initial 'info' header packet.
|
||||
|
||||
Encoded theora frames must be a multiple of 16 in width and height. To handle other frame sizes, a crop rectangle is specified in frame\_\-height and frame\_\-width, offset\_\-x and $\ast$ offset\_\-y. The offset and size should still be a multiple of 2 to avoid chroma sampling shifts. Offset values in this structure are measured from the upper left of the image.
|
||||
|
||||
Frame rate, in frames per second, is stored as a rational fraction. Aspect ratio is also stored as a rational fraction, and refers to the aspect ratio of the frame pixels, not of the overall frame itself.
|
||||
|
||||
See {\tt examples/encoder\_\-example.c} for usage examples of the other paramters and good default settings for the encoder parameters.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{theora\_\-info@{theora\_\-info}!aspect\_\-denominator@{aspect\_\-denominator}}
|
||||
\index{aspect\_\-denominator@{aspect\_\-denominator}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{aspect\_\-denominator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::aspect\_\-denominator}}\label{structtheora__info_afebc4d0cbfb34b68c833a8c79e83ae12}
|
||||
|
||||
|
||||
pixel aspect ratio denominator \index{theora\_\-info@{theora\_\-info}!aspect\_\-numerator@{aspect\_\-numerator}}
|
||||
\index{aspect\_\-numerator@{aspect\_\-numerator}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{aspect\_\-numerator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::aspect\_\-numerator}}\label{structtheora__info_a5a3ed8c79815fba1aa06c3f7d8e48b35}
|
||||
|
||||
|
||||
pixel aspect ratio numerator \index{theora\_\-info@{theora\_\-info}!codec\_\-setup@{codec\_\-setup}}
|
||||
\index{codec\_\-setup@{codec\_\-setup}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{codec\_\-setup}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ {\bf theora\_\-info::codec\_\-setup}}\label{structtheora__info_a719a1d77a4a3bfeab79aa5747dbbb04c}
|
||||
\index{theora\_\-info@{theora\_\-info}!colorspace@{colorspace}}
|
||||
\index{colorspace@{colorspace}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{colorspace}]{\setlength{\rightskip}{0pt plus 5cm}{\bf theora\_\-colorspace} {\bf theora\_\-info::colorspace}}\label{structtheora__info_a5eaba99c96706d47b426ab7b7602dc5d}
|
||||
|
||||
|
||||
colorspace \index{theora\_\-info@{theora\_\-info}!dropframes\_\-p@{dropframes\_\-p}}
|
||||
\index{dropframes\_\-p@{dropframes\_\-p}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{dropframes\_\-p}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf theora\_\-info::dropframes\_\-p}}\label{structtheora__info_af294db65a8363a0bcf43f4727763b291}
|
||||
\index{theora\_\-info@{theora\_\-info}!fps\_\-denominator@{fps\_\-denominator}}
|
||||
\index{fps\_\-denominator@{fps\_\-denominator}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{fps\_\-denominator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::fps\_\-denominator}}\label{structtheora__info_a9aa7e826e0323a4ae8cd8646a6cfbfea}
|
||||
|
||||
|
||||
frame rate denominator \index{theora\_\-info@{theora\_\-info}!fps\_\-numerator@{fps\_\-numerator}}
|
||||
\index{fps\_\-numerator@{fps\_\-numerator}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{fps\_\-numerator}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::fps\_\-numerator}}\label{structtheora__info_a3478199aa5ab213816c1819f70085ad7}
|
||||
|
||||
|
||||
frame rate numerator \index{theora\_\-info@{theora\_\-info}!frame\_\-height@{frame\_\-height}}
|
||||
\index{frame\_\-height@{frame\_\-height}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{frame\_\-height}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::frame\_\-height}}\label{structtheora__info_a287e4c194f1d2e6deb39d59f1748ea48}
|
||||
|
||||
|
||||
display frame height \index{theora\_\-info@{theora\_\-info}!frame\_\-width@{frame\_\-width}}
|
||||
\index{frame\_\-width@{frame\_\-width}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{frame\_\-width}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::frame\_\-width}}\label{structtheora__info_a8f28f4018a25634d40e4ae861fbbccfa}
|
||||
|
||||
|
||||
display frame width \index{theora\_\-info@{theora\_\-info}!height@{height}}
|
||||
\index{height@{height}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{height}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::height}}\label{structtheora__info_ae6f0274fc4a7f285c422d91abb35f9c6}
|
||||
|
||||
|
||||
encoded frame height \index{theora\_\-info@{theora\_\-info}!keyframe\_\-auto\_\-p@{keyframe\_\-auto\_\-p}}
|
||||
\index{keyframe\_\-auto\_\-p@{keyframe\_\-auto\_\-p}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{keyframe\_\-auto\_\-p}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf theora\_\-info::keyframe\_\-auto\_\-p}}\label{structtheora__info_a23648173369174f687085c0ce85ef30e}
|
||||
\index{theora\_\-info@{theora\_\-info}!keyframe\_\-auto\_\-threshold@{keyframe\_\-auto\_\-threshold}}
|
||||
\index{keyframe\_\-auto\_\-threshold@{keyframe\_\-auto\_\-threshold}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{keyframe\_\-auto\_\-threshold}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-int32\_\-t {\bf theora\_\-info::keyframe\_\-auto\_\-threshold}}\label{structtheora__info_a95cb8958e29ad3d24047ee8f9e7fd99b}
|
||||
\index{theora\_\-info@{theora\_\-info}!keyframe\_\-data\_\-target\_\-bitrate@{keyframe\_\-data\_\-target\_\-bitrate}}
|
||||
\index{keyframe\_\-data\_\-target\_\-bitrate@{keyframe\_\-data\_\-target\_\-bitrate}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{keyframe\_\-data\_\-target\_\-bitrate}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::keyframe\_\-data\_\-target\_\-bitrate}}\label{structtheora__info_a588942d1ee90a26a7effdf6a0e98b9ce}
|
||||
\index{theora\_\-info@{theora\_\-info}!keyframe\_\-frequency@{keyframe\_\-frequency}}
|
||||
\index{keyframe\_\-frequency@{keyframe\_\-frequency}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{keyframe\_\-frequency}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::keyframe\_\-frequency}}\label{structtheora__info_a03e1b3e337af5f9dabaaaeb9050f145a}
|
||||
\index{theora\_\-info@{theora\_\-info}!keyframe\_\-frequency\_\-force@{keyframe\_\-frequency\_\-force}}
|
||||
\index{keyframe\_\-frequency\_\-force@{keyframe\_\-frequency\_\-force}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{keyframe\_\-frequency\_\-force}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::keyframe\_\-frequency\_\-force}}\label{structtheora__info_ad9d2e22c44a53473010e6d1042dfe0d8}
|
||||
\index{theora\_\-info@{theora\_\-info}!keyframe\_\-mindistance@{keyframe\_\-mindistance}}
|
||||
\index{keyframe\_\-mindistance@{keyframe\_\-mindistance}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{keyframe\_\-mindistance}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::keyframe\_\-mindistance}}\label{structtheora__info_aa79ca8c0e77a884d4487fd627fae32e9}
|
||||
\index{theora\_\-info@{theora\_\-info}!noise\_\-sensitivity@{noise\_\-sensitivity}}
|
||||
\index{noise\_\-sensitivity@{noise\_\-sensitivity}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{noise\_\-sensitivity}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-int32\_\-t {\bf theora\_\-info::noise\_\-sensitivity}}\label{structtheora__info_ac4789034f547b57d1075e035050eeed9}
|
||||
\index{theora\_\-info@{theora\_\-info}!offset\_\-x@{offset\_\-x}}
|
||||
\index{offset\_\-x@{offset\_\-x}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{offset\_\-x}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::offset\_\-x}}\label{structtheora__info_af5949a02bef29512f2705e6f6c944e3b}
|
||||
|
||||
|
||||
horizontal offset of the displayed frame \index{theora\_\-info@{theora\_\-info}!offset\_\-y@{offset\_\-y}}
|
||||
\index{offset\_\-y@{offset\_\-y}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{offset\_\-y}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::offset\_\-y}}\label{structtheora__info_a91c3922097ba32a85acd584a01dc2c93}
|
||||
|
||||
|
||||
vertical offset of the displayed frame \index{theora\_\-info@{theora\_\-info}!pixelformat@{pixelformat}}
|
||||
\index{pixelformat@{pixelformat}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{pixelformat}]{\setlength{\rightskip}{0pt plus 5cm}{\bf theora\_\-pixelformat} {\bf theora\_\-info::pixelformat}}\label{structtheora__info_a65ab4376ab5242ee82e06c78fb7008ab}
|
||||
|
||||
|
||||
chroma subsampling mode to expect \index{theora\_\-info@{theora\_\-info}!quality@{quality}}
|
||||
\index{quality@{quality}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{quality}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf theora\_\-info::quality}}\label{structtheora__info_a71a4748a5f31bd58d0e403b7806c980d}
|
||||
|
||||
|
||||
Nominal quality setting, 0-\/63. \index{theora\_\-info@{theora\_\-info}!quick\_\-p@{quick\_\-p}}
|
||||
\index{quick\_\-p@{quick\_\-p}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{quick\_\-p}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf theora\_\-info::quick\_\-p}}\label{structtheora__info_a2dfae4fd175dbd19254eaf0697778ff5}
|
||||
|
||||
|
||||
Quick encode/decode. \index{theora\_\-info@{theora\_\-info}!sharpness@{sharpness}}
|
||||
\index{sharpness@{sharpness}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{sharpness}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-int32\_\-t {\bf theora\_\-info::sharpness}}\label{structtheora__info_a3fb695de2b2f56dd0203b9e2eb0df1cc}
|
||||
\index{theora\_\-info@{theora\_\-info}!target\_\-bitrate@{target\_\-bitrate}}
|
||||
\index{target\_\-bitrate@{target\_\-bitrate}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{target\_\-bitrate}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf theora\_\-info::target\_\-bitrate}}\label{structtheora__info_a0cfba041767ae2416dd190a406afe713}
|
||||
|
||||
|
||||
nominal bitrate in bits per second \index{theora\_\-info@{theora\_\-info}!version\_\-major@{version\_\-major}}
|
||||
\index{version\_\-major@{version\_\-major}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{version\_\-major}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char {\bf theora\_\-info::version\_\-major}}\label{structtheora__info_a7c5ebb9e6700aaef87f29f7c6074e474}
|
||||
\index{theora\_\-info@{theora\_\-info}!version\_\-minor@{version\_\-minor}}
|
||||
\index{version\_\-minor@{version\_\-minor}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{version\_\-minor}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char {\bf theora\_\-info::version\_\-minor}}\label{structtheora__info_a75eda4f30270d833c7b9dba43932a06a}
|
||||
\index{theora\_\-info@{theora\_\-info}!version\_\-subminor@{version\_\-subminor}}
|
||||
\index{version\_\-subminor@{version\_\-subminor}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{version\_\-subminor}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char {\bf theora\_\-info::version\_\-subminor}}\label{structtheora__info_aa07967ecd6e20bd2928ead42b6397b3d}
|
||||
\index{theora\_\-info@{theora\_\-info}!width@{width}}
|
||||
\index{width@{width}!theora_info@{theora\_\-info}}
|
||||
\subsubsection[{width}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-uint32\_\-t {\bf theora\_\-info::width}}\label{structtheora__info_a17c2fc651bb3329f1ea6b13ff1d3957b}
|
||||
|
||||
|
||||
encoded frame width
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf theora.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,41 @@
|
||||
\section{theora\_\-state Struct Reference}
|
||||
\label{structtheora__state}\index{theora\_\-state@{theora\_\-state}}
|
||||
|
||||
|
||||
Codec internal state and context.
|
||||
|
||||
|
||||
{\ttfamily \#include $<$theora.h$>$}\subsection*{Data Fields}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf theora\_\-info} $\ast$ {\bf i}
|
||||
\item
|
||||
ogg\_\-int64\_\-t {\bf granulepos}
|
||||
\item
|
||||
void $\ast$ {\bf internal\_\-encode}
|
||||
\item
|
||||
void $\ast$ {\bf internal\_\-decode}
|
||||
\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
Codec internal state and context.
|
||||
|
||||
\subsection{Field Documentation}
|
||||
\index{theora\_\-state@{theora\_\-state}!granulepos@{granulepos}}
|
||||
\index{granulepos@{granulepos}!theora_state@{theora\_\-state}}
|
||||
\subsubsection[{granulepos}]{\setlength{\rightskip}{0pt plus 5cm}ogg\_\-int64\_\-t {\bf theora\_\-state::granulepos}}\label{structtheora__state_a5dd344a3f79ea7501b18c756772fab7b}
|
||||
\index{theora\_\-state@{theora\_\-state}!i@{i}}
|
||||
\index{i@{i}!theora_state@{theora\_\-state}}
|
||||
\subsubsection[{i}]{\setlength{\rightskip}{0pt plus 5cm}{\bf theora\_\-info}$\ast$ {\bf theora\_\-state::i}}\label{structtheora__state_a0efc7ac581ef260b0ca17f518ace0731}
|
||||
\index{theora\_\-state@{theora\_\-state}!internal\_\-decode@{internal\_\-decode}}
|
||||
\index{internal\_\-decode@{internal\_\-decode}!theora_state@{theora\_\-state}}
|
||||
\subsubsection[{internal\_\-decode}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ {\bf theora\_\-state::internal\_\-decode}}\label{structtheora__state_ad20c4eebbc5ed9764cf03ba8b90e796e}
|
||||
\index{theora\_\-state@{theora\_\-state}!internal\_\-encode@{internal\_\-encode}}
|
||||
\index{internal\_\-encode@{internal\_\-encode}!theora_state@{theora\_\-state}}
|
||||
\subsubsection[{internal\_\-encode}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ {\bf theora\_\-state::internal\_\-encode}}\label{structtheora__state_a1fbfd82fb7210cbcc4233cb680ec2af6}
|
||||
|
||||
|
||||
The documentation for this struct was generated from the following file:\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf theora.h}\end{DoxyCompactItemize}
|
||||
@@ -0,0 +1,90 @@
|
||||
\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}
|
||||
@@ -0,0 +1,185 @@
|
||||
\section{theora.h File Reference}
|
||||
\label{theora_8h}\index{theora.h@{theora.h}}
|
||||
|
||||
|
||||
The libtheora pre-\/1.0 legacy C API.
|
||||
{\ttfamily \#include $<$stddef.h$>$}\par
|
||||
{\ttfamily \#include $<$ogg/ogg.h$>$}\par
|
||||
\subsection*{Data Structures}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
struct {\bf yuv\_\-buffer}
|
||||
\begin{DoxyCompactList}\small\item\em A YUV buffer for passing uncompressed frames to and from the codec. \item\end{DoxyCompactList}\item
|
||||
struct {\bf theora\_\-info}
|
||||
\begin{DoxyCompactList}\small\item\em Theora bitstream info. \item\end{DoxyCompactList}\item
|
||||
struct {\bf theora\_\-state}
|
||||
\begin{DoxyCompactList}\small\item\em Codec internal state and context. \item\end{DoxyCompactList}\item
|
||||
struct {\bf theora\_\-comment}
|
||||
\begin{DoxyCompactList}\small\item\em Comment header metadata. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Defines}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf OC\_\-FAULT}~-\/1
|
||||
\begin{DoxyCompactList}\small\item\em General failure. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-EINVAL}~-\/10
|
||||
\begin{DoxyCompactList}\small\item\em Library encountered invalid internal data. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-DISABLED}~-\/11
|
||||
\begin{DoxyCompactList}\small\item\em Requested action is disabled. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-BADHEADER}~-\/20
|
||||
\begin{DoxyCompactList}\small\item\em Header packet was corrupt/invalid. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-NOTFORMAT}~-\/21
|
||||
\begin{DoxyCompactList}\small\item\em Packet is not a theora packet. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-VERSION}~-\/22
|
||||
\begin{DoxyCompactList}\small\item\em Bitstream version is not handled. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-IMPL}~-\/23
|
||||
\begin{DoxyCompactList}\small\item\em Feature or action not implemented. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-BADPACKET}~-\/24
|
||||
\begin{DoxyCompactList}\small\item\em Packet is corrupt. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-NEWPACKET}~-\/25
|
||||
\begin{DoxyCompactList}\small\item\em Packet is an (ignorable) unhandled extension. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf OC\_\-DUPFRAME}~1
|
||||
\begin{DoxyCompactList}\small\item\em Packet is a dropped frame. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\begin{Indent}{\bf theora\_\-control() codes}\par
|
||||
{\em \label{_amgrp13fd61986cff4566fe89a40e30b74ad9}
|
||||
}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}~(1)
|
||||
\begin{DoxyCompactList}\small\item\em Get the maximum post-\/processing level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-PPLEVEL}~(3)
|
||||
\begin{DoxyCompactList}\small\item\em Set the post-\/processing level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}~(4)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the maximum distance between key frames. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-GRANPOS}~(5)
|
||||
\begin{DoxyCompactList}\small\item\em Set the granule position. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}~(2)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the quantization parameters to use. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}~(10)
|
||||
\begin{DoxyCompactList}\small\item\em Disables any encoder features that would prevent lossless transcoding back to VP3. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}~(12)
|
||||
\begin{DoxyCompactList}\small\item\em Gets the maximum speed level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}~(14)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the speed level. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\subsection*{Enumerations}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
enum {\bf theora\_\-colorspace} \{ {\bf OC\_\-CS\_\-UNSPECIFIED},
|
||||
{\bf OC\_\-CS\_\-ITU\_\-REC\_\-470M},
|
||||
{\bf OC\_\-CS\_\-ITU\_\-REC\_\-470BG},
|
||||
{\bf OC\_\-CS\_\-NSPACES}
|
||||
\}
|
||||
\begin{DoxyCompactList}\small\item\em A Colorspace. \item\end{DoxyCompactList}\item
|
||||
enum {\bf theora\_\-pixelformat} \{ {\bf OC\_\-PF\_\-420},
|
||||
{\bf OC\_\-PF\_\-RSVD},
|
||||
{\bf OC\_\-PF\_\-422},
|
||||
{\bf OC\_\-PF\_\-444}
|
||||
\}
|
||||
\begin{DoxyCompactList}\small\item\em A Chroma subsampling. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Functions}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
const char $\ast$ {\bf theora\_\-version\_\-string} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieve a human-\/readable string to identify the encoder vendor and version. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-uint32\_\-t {\bf theora\_\-version\_\-number} (void)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieve a 32-\/bit version number. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-init} ({\bf theora\_\-state} $\ast$th, {\bf theora\_\-info} $\ast$ti)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize the theora encoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-YUVin} ({\bf theora\_\-state} $\ast$t, {\bf yuv\_\-buffer} $\ast$yuv)
|
||||
\begin{DoxyCompactList}\small\item\em Submit a YUV buffer to the theora encoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-packetout} ({\bf theora\_\-state} $\ast$t, int last\_\-p, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request the next packet of encoded video. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-header} ({\bf theora\_\-state} $\ast$t, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request a packet containing the initial header. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-comment} ({\bf theora\_\-comment} $\ast$tc, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request a comment header packet from provided metadata. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-encode\_\-tables} ({\bf theora\_\-state} $\ast$t, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Request a packet containing the codebook tables for the stream. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-header} ({\bf theora\_\-info} $\ast$ci, {\bf theora\_\-comment} $\ast$cc, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Decode an Ogg packet, with the expectation that the packet contains an initial header, comment data or codebook tables. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-init} ({\bf theora\_\-state} $\ast$th, {\bf theora\_\-info} $\ast$c)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize a \doxyref{theora\_\-state}{p.}{structtheora__state} handle for decoding. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-packetin} ({\bf theora\_\-state} $\ast$th, ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Input a packet containing encoded data into the theora decoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-decode\_\-YUVout} ({\bf theora\_\-state} $\ast$th, {\bf yuv\_\-buffer} $\ast$yuv)
|
||||
\begin{DoxyCompactList}\small\item\em Output the next available frame of decoded YUV data. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-packet\_\-isheader} (ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Report whether a theora packet is a header or not This function does no verification beyond checking the header flag bit so it should not be used for bitstream identification; use \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} for that. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-packet\_\-iskeyframe} (ogg\_\-packet $\ast$op)
|
||||
\begin{DoxyCompactList}\small\item\em Report whether a theora packet is a keyframe or not. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-granule\_\-shift} ({\bf theora\_\-info} $\ast$ti)
|
||||
\begin{DoxyCompactList}\small\item\em Report the granulepos shift radix. \item\end{DoxyCompactList}\item
|
||||
ogg\_\-int64\_\-t {\bf theora\_\-granule\_\-frame} ({\bf theora\_\-state} $\ast$th, ogg\_\-int64\_\-t granulepos)
|
||||
\begin{DoxyCompactList}\small\item\em Convert a granulepos to an absolute frame index, starting at 0. \item\end{DoxyCompactList}\item
|
||||
double {\bf theora\_\-granule\_\-time} ({\bf theora\_\-state} $\ast$th, ogg\_\-int64\_\-t granulepos)
|
||||
\begin{DoxyCompactList}\small\item\em Convert a granulepos to absolute time in seconds. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-info\_\-init} ({\bf theora\_\-info} $\ast$c)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize a \doxyref{theora\_\-info}{p.}{structtheora__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-info\_\-clear} ({\bf theora\_\-info} $\ast$c)
|
||||
\begin{DoxyCompactList}\small\item\em Clear a \doxyref{theora\_\-info}{p.}{structtheora__info} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-clear} ({\bf theora\_\-state} $\ast$t)
|
||||
\begin{DoxyCompactList}\small\item\em Free all internal data associated with a \doxyref{theora\_\-state}{p.}{structtheora__state} handle. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-init} ({\bf theora\_\-comment} $\ast$tc)
|
||||
\begin{DoxyCompactList}\small\item\em Initialize an allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-add} ({\bf theora\_\-comment} $\ast$tc, char $\ast$comment)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-add\_\-tag} ({\bf theora\_\-comment} $\ast$tc, char $\ast$tag, char $\ast$value)
|
||||
\begin{DoxyCompactList}\small\item\em Add a comment to an initialized \doxyref{theora\_\-comment}{p.}{structtheora__comment} structure. \item\end{DoxyCompactList}\item
|
||||
char $\ast$ {\bf theora\_\-comment\_\-query} ({\bf theora\_\-comment} $\ast$tc, char $\ast$tag, int count)
|
||||
\begin{DoxyCompactList}\small\item\em Look up a comment value by tag. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-comment\_\-query\_\-count} ({\bf theora\_\-comment} $\ast$tc, char $\ast$tag)
|
||||
\begin{DoxyCompactList}\small\item\em Look up the number of instances of a tag. \item\end{DoxyCompactList}\item
|
||||
void {\bf theora\_\-comment\_\-clear} ({\bf theora\_\-comment} $\ast$tc)
|
||||
\begin{DoxyCompactList}\small\item\em Clear an allocated \doxyref{theora\_\-comment}{p.}{structtheora__comment} struct so that it can be freed. \item\end{DoxyCompactList}\item
|
||||
int {\bf theora\_\-control} ({\bf theora\_\-state} $\ast$th, int req, void $\ast$buf, size\_\-t buf\_\-sz)
|
||||
\begin{DoxyCompactList}\small\item\em Encoder control function. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
The libtheora pre-\/1.0 legacy C API. \subsection{Introduction}\label{index_intro}
|
||||
This is the documentation for the libtheora legacy C API, declared in the \doxyref{theora.h}{p.}{theora_8h} header, which describes the old interface used before the 1.0 release. This API was widely deployed for several years and remains supported, but for new code we recommend the cleaner API declared in \doxyref{theoradec.h}{p.}{theoradec_8h} and \doxyref{theoraenc.h}{p.}{theoraenc_8h}.
|
||||
|
||||
libtheora is the reference implementation for {\tt Theora}, a free video codec. Theora is derived from On2's VP3 codec with improved integration with Ogg multimedia formats by {\tt Xiph.Org}.\subsection{Overview}\label{theora_8h_overview}
|
||||
This library will both decode and encode theora packets to/from raw YUV frames. In either case, the packets will most likely either come from or need to be embedded in an Ogg stream. Use {\tt libogg} or {\tt liboggz} to extract/package these packets.\subsection{Decoding Process}\label{theora_8h_decoding}
|
||||
Decoding can be separated into the following steps:
|
||||
\begin{DoxyEnumerate}
|
||||
\item initialise \doxyref{theora\_\-info}{p.}{structtheora__info} and \doxyref{theora\_\-comment}{p.}{structtheora__comment} structures using \doxyref{theora\_\-info\_\-init()}{p.}{group__oldfuncs_ga3091c87d48f1faba018c5956379a6d90} and \doxyref{theora\_\-comment\_\-init()}{p.}{group__oldfuncs_ga811b92785df3bdbbebb3de612d9d6ce0}: \begin{DoxyVerb}
|
||||
theora_info info;
|
||||
theora_comment comment;
|
||||
|
||||
theora_info_init(&info);
|
||||
theora_comment_init(&comment);
|
||||
\end{DoxyVerb}
|
||||
|
||||
\item retrieve header packets from Ogg stream (there should be 3) and decode into \doxyref{theora\_\-info}{p.}{structtheora__info} and \doxyref{theora\_\-comment}{p.}{structtheora__comment} structures using \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82}. See \doxyref{Identifying Theora Packets}{p.}{theora_8h_identification} for more information on identifying which packets are theora packets. \begin{DoxyVerb}
|
||||
int i;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
(get a theora packet "op" from the Ogg stream)
|
||||
theora_decode_header(&info, &comment, op);
|
||||
}
|
||||
\end{DoxyVerb}
|
||||
|
||||
\item initialise the decoder based on the information retrieved into the \doxyref{theora\_\-info}{p.}{structtheora__info} struct by \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82}. You will need a \doxyref{theora\_\-state}{p.}{structtheora__state} struct. \begin{DoxyVerb}
|
||||
theora_state state;
|
||||
|
||||
theora_decode_init(&state, &info);
|
||||
\end{DoxyVerb}
|
||||
|
||||
\item pass in packets and retrieve decoded frames! See the \doxyref{yuv\_\-buffer}{p.}{structyuv__buffer} documentation for information on how to retrieve raw YUV data. \begin{DoxyVerb}
|
||||
yuf_buffer buffer;
|
||||
while (last packet was not e_o_s) {
|
||||
(get a theora packet "op" from the Ogg stream)
|
||||
theora_decode_packetin(&state, op);
|
||||
theora_decode_YUVout(&state, &buffer);
|
||||
}
|
||||
\end{DoxyVerb}
|
||||
|
||||
\end{DoxyEnumerate}\subsubsection{Identifying Theora Packets}\label{theora_8h_identification}
|
||||
All streams inside an Ogg file have a unique serial\_\-no attached to the stream. Typically, you will want to
|
||||
\begin{DoxyItemize}
|
||||
\item retrieve the serial\_\-no for each b\_\-o\_\-s (beginning of stream) page encountered within the Ogg file;
|
||||
\item test the first (only) packet on that page to determine if it is a theora packet;
|
||||
\item once you have found a theora b\_\-o\_\-s page then use the retrieved serial\_\-no to identify future packets belonging to the same theora stream.
|
||||
\end{DoxyItemize}
|
||||
|
||||
Note that you {\itshape cannot\/} use \doxyref{theora\_\-packet\_\-isheader()}{p.}{group__oldfuncs_gab969f9d0407683f0e5abe73d0839a25b} to determine if a packet is a theora packet or not, as this function does not perform any checking beyond whether a header bit is present. Instead, use the \doxyref{theora\_\-decode\_\-header()}{p.}{group__oldfuncs_ga02915e63c1bd733ee291f577a8b75a82} function and check the return value; or examine the header bytes at the beginning of the Ogg page.
|
||||
@@ -0,0 +1,194 @@
|
||||
\section{theoradec.h File Reference}
|
||||
\label{theoradec_8h}\index{theoradec.h@{theoradec.h}}
|
||||
|
||||
|
||||
The {\ttfamily libtheoradec} C decoding API.
|
||||
{\ttfamily \#include $<$stddef.h$>$}\par
|
||||
{\ttfamily \#include $<$ogg/ogg.h$>$}\par
|
||||
{\ttfamily \#include \char`\"{}codec.h\char`\"{}}\par
|
||||
\subsection*{Data Structures}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
struct {\bf th\_\-stripe\_\-callback}
|
||||
\begin{DoxyCompactList}\small\item\em The striped decode callback data to pass to \doxyref{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}{p.}{theoradec_8h_ac95cc9e109474b0fa4bb920ab2cfdf1e}. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\subsection*{Defines}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf \_\-O\_\-THEORA\_\-THEORADEC\_\-H\_\-}~(1)
|
||||
\end{DoxyCompactItemize}
|
||||
\begin{Indent}{\bf th\_\-decode\_\-ctl() codes}\par
|
||||
{\em \label{_amgrp638dfd34390d0a936dbf76caf938d78d}
|
||||
\label{theoradec_8h_decctlcodes}
|
||||
These are the available request codes for \doxyref{th\_\-decode\_\-ctl()}{p.}{group__decfuncs_ga1a8051958d75b1012573b6e3c8f670e1}. By convention, these are odd, to distinguish them from the \doxyref{encoder control codes}{p.}{theoraenc_8h_encctlcodes}. Keep any experimental or vendor-\/specific values above {\ttfamily 0x8000}. }\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}~(1)
|
||||
\begin{DoxyCompactList}\small\item\em Gets the maximum post-\/processing level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-PPLEVEL}~(3)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the post-\/processing level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-GRANPOS}~(5)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the granule position. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}~(7)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the striped decode callback function. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MBMODE}~(9)
|
||||
\begin{DoxyCompactList}\small\item\em Enables telemetry and sets the macroblock display mode. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MV}~(11)
|
||||
\begin{DoxyCompactList}\small\item\em Enables telemetry and sets the motion vector display mode. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-QI}~(13)
|
||||
\begin{DoxyCompactList}\small\item\em Enables telemetry and sets the adaptive quantization display mode. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-BITS}~(15)
|
||||
\begin{DoxyCompactList}\small\item\em Enables telemetry and sets the bitstream breakdown visualization mode. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\subsection*{Typedefs}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
typedef void($\ast$ {\bf th\_\-stripe\_\-decoded\_\-func} )(void $\ast$\_\-ctx, {\bf th\_\-ycbcr\_\-buffer} \_\-buf, int \_\-yfrag0, int \_\-yfrag\_\-end)
|
||||
\begin{DoxyCompactList}\small\item\em A callback function for striped decode. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\begin{Indent}{\bf Decoder state}\par
|
||||
{\em \label{_amgrp20ad7456b6a1ebc1cb57f3e51d4d7bc3}
|
||||
The following data structures are opaque, and their contents are not publicly defined by this API.
|
||||
|
||||
Referring to their internals directly is unsupported, and may break without warning. }\begin{DoxyCompactItemize}
|
||||
\item
|
||||
typedef struct {\bf th\_\-dec\_\-ctx} {\bf th\_\-dec\_\-ctx}
|
||||
\begin{DoxyCompactList}\small\item\em The decoder context. \item\end{DoxyCompactList}\item
|
||||
typedef struct {\bf th\_\-setup\_\-info} {\bf th\_\-setup\_\-info}
|
||||
\begin{DoxyCompactList}\small\item\em Setup information. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\subsection*{Functions}
|
||||
\begin{Indent}{\bf Functions for decoding}\par
|
||||
{\em \label{_amgrp9d29c94aa62f20426aa5ff062c7daedd}
|
||||
You must link to {\ttfamily libtheoradec} if you use any of the functions in this section.
|
||||
|
||||
The functions are listed in the order they are used in a typical decode. The basic steps are:
|
||||
\begin{DoxyItemize}
|
||||
\item Parse the header packets by repeatedly calling \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50}.
|
||||
\item Allocate a \doxyref{th\_\-dec\_\-ctx}{p.}{theoradec_8h_a843d70bb02563885a8d54b9c1a781729} handle with \doxyref{th\_\-decode\_\-alloc()}{p.}{group__decfuncs_ga0ef07a9a97849054aa606c595a2d807e}.
|
||||
\item Call \doxyref{th\_\-setup\_\-free()}{p.}{group__decfuncs_gadef55431b68aaa59d0d7b32b2f118f27} to free any memory used for codec setup information.
|
||||
\item Perform any additional decoder configuration with \doxyref{th\_\-decode\_\-ctl()}{p.}{group__decfuncs_ga1a8051958d75b1012573b6e3c8f670e1}.
|
||||
\item For each video data packet:
|
||||
\begin{DoxyItemize}
|
||||
\item Submit the packet to the decoder via \doxyref{th\_\-decode\_\-packetin()}{p.}{group__decfuncs_ga31c814bf09b2232aff69c57ae20f04eb}.
|
||||
\item Retrieve the uncompressed video data via \doxyref{th\_\-decode\_\-ycbcr\_\-out()}{p.}{group__decfuncs_gaa9cc8af63fa8540e0fc95572f259cdcb}.
|
||||
\end{DoxyItemize}
|
||||
\item Call \doxyref{th\_\-decode\_\-free()}{p.}{group__decfuncs_gafb6684ad8ba507b71112bc9de148e7d0} to release all decoder memory.
|
||||
\end{DoxyItemize}}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
int {\bf th\_\-decode\_\-headerin} ({\bf th\_\-info} $\ast$\_\-info, {\bf th\_\-comment} $\ast$\_\-tc, {\bf th\_\-setup\_\-info} $\ast$$\ast$\_\-setup, ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Decodes the header packets of a Theora stream. \item\end{DoxyCompactList}\item
|
||||
{\bf th\_\-dec\_\-ctx} $\ast$ {\bf th\_\-decode\_\-alloc} (const {\bf th\_\-info} $\ast$\_\-info, const {\bf th\_\-setup\_\-info} $\ast$\_\-setup)
|
||||
\begin{DoxyCompactList}\small\item\em Allocates a decoder instance. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-setup\_\-free} ({\bf th\_\-setup\_\-info} $\ast$\_\-setup)
|
||||
\begin{DoxyCompactList}\small\item\em Releases all storage used for the decoder setup information. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-decode\_\-ctl} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec, int \_\-req, void $\ast$\_\-buf, size\_\-t \_\-buf\_\-sz)
|
||||
\begin{DoxyCompactList}\small\item\em Decoder control function. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-decode\_\-packetin} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec, const ogg\_\-packet $\ast$\_\-op, ogg\_\-int64\_\-t $\ast$\_\-granpos)
|
||||
\begin{DoxyCompactList}\small\item\em Submits a packet containing encoded video data to the decoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-decode\_\-ycbcr\_\-out} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec, {\bf th\_\-ycbcr\_\-buffer} \_\-ycbcr)
|
||||
\begin{DoxyCompactList}\small\item\em Outputs the next available frame of decoded Y'CbCr data. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-decode\_\-free} ({\bf th\_\-dec\_\-ctx} $\ast$\_\-dec)
|
||||
\begin{DoxyCompactList}\small\item\em Frees an allocated decoder instance. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
The {\ttfamily libtheoradec} C decoding API.
|
||||
|
||||
\subsection{Define Documentation}
|
||||
\index{theoradec.h@{theoradec.h}!\_\-O\_\-THEORA\_\-THEORADEC\_\-H\_\-@{\_\-O\_\-THEORA\_\-THEORADEC\_\-H\_\-}}
|
||||
\index{\_\-O\_\-THEORA\_\-THEORADEC\_\-H\_\-@{\_\-O\_\-THEORA\_\-THEORADEC\_\-H\_\-}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{\_\-O\_\-THEORA\_\-THEORADEC\_\-H\_\-}]{\setlength{\rightskip}{0pt plus 5cm}\#define \_\-O\_\-THEORA\_\-THEORADEC\_\-H\_\-~(1)}\label{theoradec_8h_a0d78767a326c34dbf84d5b845cba7b4a}
|
||||
\index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX@{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}}
|
||||
\index{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX@{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX~(1)}\label{theoradec_8h_ab31f251c9319f2140d247585d30b3d07}
|
||||
|
||||
|
||||
Gets the maximum post-\/processing level. The decoder supports a post-\/processing filter that can improve the appearance of the decoded images. This returns the highest level setting for this post-\/processor, corresponding to maximum improvement and computational expense.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\rightarrow$} {\em \_\-buf}]int: The maximum post-\/processing level. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-dec\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-SET\_\-GRANPOS@{TH\_\-DECCTL\_\-SET\_\-GRANPOS}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-GRANPOS@{TH\_\-DECCTL\_\-SET\_\-GRANPOS}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-GRANPOS}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-GRANPOS~(5)}\label{theoradec_8h_a1e870c654d35394f0d490045df04e0f5}
|
||||
|
||||
|
||||
Sets the granule position. Call this after a seek, before decoding the first frame, to ensure that the proper granule position is returned for all subsequent frames. If you track timestamps yourself and do not use the granule position returned by the decoder, then you need not call this function.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily ogg\_\-int64\_\-t}: The granule position of the next frame. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-dec\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(ogg\_\-int64\_\-t)}, or the granule position is negative. \end{DoxyRetVals}
|
||||
\index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-SET\_\-PPLEVEL@{TH\_\-DECCTL\_\-SET\_\-PPLEVEL}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-PPLEVEL@{TH\_\-DECCTL\_\-SET\_\-PPLEVEL}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-PPLEVEL}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-PPLEVEL~(3)}\label{theoradec_8h_a87774c35e1a755a84e2d705b38ebef0d}
|
||||
|
||||
|
||||
Sets the post-\/processing level. By default, post-\/processing is disabled.
|
||||
|
||||
Sets the level of post-\/processing to use when decoding the compressed stream. This must be a value between zero (off) and the maximum returned by TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]int: The new post-\/processing level. 0 to disable; larger values use more CPU. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-dec\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}, or the post-\/processing level is out of bounds. The maximum post-\/processing level may be implementation-\/specific, and can be obtained via \doxyref{TH\_\-DECCTL\_\-GET\_\-PPLEVEL\_\-MAX}{p.}{theoradec_8h_ab31f251c9319f2140d247585d30b3d07}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB@{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB@{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-STRIPE\_\-CB~(7)}\label{theoradec_8h_ac95cc9e109474b0fa4bb920ab2cfdf1e}
|
||||
|
||||
|
||||
Sets the striped decode callback function. If set, this function will be called as each piece of a frame is fully decoded in \doxyref{th\_\-decode\_\-packetin()}{p.}{group__decfuncs_ga31c814bf09b2232aff69c57ae20f04eb}. You can pass in a \doxyref{th\_\-stripe\_\-callback}{p.}{structth__stripe__callback} with \doxyref{th\_\-stripe\_\-callback::stripe\_\-decoded}{p.}{structth__stripe__callback_a977c725680a37e3446e459f063b1f4a5} set to {\ttfamily NULL} to disable the callbacks at any point. Enabling striped decode does not prevent you from calling \doxyref{th\_\-decode\_\-ycbcr\_\-out()}{p.}{group__decfuncs_gaa9cc8af63fa8540e0fc95572f259cdcb} after the frame is fully decoded.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]\doxyref{th\_\-stripe\_\-callback}{p.}{structth__stripe__callback}: The callback parameters. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-dec\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(th\_\-stripe\_\-callback)}. \end{DoxyRetVals}
|
||||
\index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-BITS@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-BITS}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-BITS@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-BITS}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-BITS}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-BITS~(15)}\label{theoradec_8h_a7f43fec07486f8a5f00e92aab7d44a25}
|
||||
|
||||
|
||||
Enables telemetry and sets the bitstream breakdown visualization mode. \index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MBMODE@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MBMODE}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MBMODE@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MBMODE}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MBMODE}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MBMODE~(9)}\label{theoradec_8h_a8d5e0b9b4c8898f93f241acbeb7e7ffb}
|
||||
|
||||
|
||||
Enables telemetry and sets the macroblock display mode. \index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MV@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MV}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MV@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MV}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MV}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-MV~(11)}\label{theoradec_8h_a829285a03d24832c583f33c6357df8aa}
|
||||
|
||||
|
||||
Enables telemetry and sets the motion vector display mode. \index{theoradec.h@{theoradec.h}!TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-QI@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-QI}}
|
||||
\index{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-QI@{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-QI}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-QI}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-DECCTL\_\-SET\_\-TELEMETRY\_\-QI~(13)}\label{theoradec_8h_ae3e2f7674ad92fe67b63915d48c9df5b}
|
||||
|
||||
|
||||
Enables telemetry and sets the adaptive quantization display mode.
|
||||
|
||||
\subsection{Typedef Documentation}
|
||||
\index{theoradec.h@{theoradec.h}!th\_\-dec\_\-ctx@{th\_\-dec\_\-ctx}}
|
||||
\index{th\_\-dec\_\-ctx@{th\_\-dec\_\-ctx}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{th\_\-dec\_\-ctx}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf th\_\-dec\_\-ctx} {\bf th\_\-dec\_\-ctx}}\label{theoradec_8h_a843d70bb02563885a8d54b9c1a781729}
|
||||
|
||||
|
||||
The decoder context. \index{theoradec.h@{theoradec.h}!th\_\-setup\_\-info@{th\_\-setup\_\-info}}
|
||||
\index{th\_\-setup\_\-info@{th\_\-setup\_\-info}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{th\_\-setup\_\-info}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf th\_\-setup\_\-info} {\bf th\_\-setup\_\-info}}\label{theoradec_8h_ab71cd2657455cc27d6c0127c66a89f28}
|
||||
|
||||
|
||||
Setup information. This contains auxiliary information (Huffman tables and quantization parameters) decoded from the setup header by \doxyref{th\_\-decode\_\-headerin()}{p.}{group__decfuncs_ga006d01d36fbe64768c571e6a12b7fc50} to be passed to \doxyref{th\_\-decode\_\-alloc()}{p.}{group__decfuncs_ga0ef07a9a97849054aa606c595a2d807e}. It can be re-\/used to initialize any number of decoders, and can be freed via \doxyref{th\_\-setup\_\-free()}{p.}{group__decfuncs_gadef55431b68aaa59d0d7b32b2f118f27} at any time. \index{theoradec.h@{theoradec.h}!th\_\-stripe\_\-decoded\_\-func@{th\_\-stripe\_\-decoded\_\-func}}
|
||||
\index{th\_\-stripe\_\-decoded\_\-func@{th\_\-stripe\_\-decoded\_\-func}!theoradec.h@{theoradec.h}}
|
||||
\subsubsection[{th\_\-stripe\_\-decoded\_\-func}]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$ {\bf th\_\-stripe\_\-decoded\_\-func})(void $\ast$\_\-ctx, {\bf th\_\-ycbcr\_\-buffer} \_\-buf, int \_\-yfrag0, int \_\-yfrag\_\-end)}\label{theoradec_8h_a25dfc8713157545abd81eda476ca4b54}
|
||||
|
||||
|
||||
A callback function for striped decode. This is a function pointer to an application-\/provided function that will be called each time a section of the image is fully decoded in \doxyref{th\_\-decode\_\-packetin()}{p.}{group__decfuncs_ga31c814bf09b2232aff69c57ae20f04eb}. This allows the application to process the section immediately, while it is still in cache. Note that the frame is decoded bottom to top, so {\itshape \_\-yfrag0\/} will steadily decrease with each call until it reaches 0, at which point the full frame is decoded. The number of fragment rows made available in each call depends on the pixel format and the number of post-\/processing filters enabled, and may not even be constant for the entire frame. If a non-\/{\ttfamily NULL} {\itshape \_\-granpos\/} pointer is passed to \doxyref{th\_\-decode\_\-packetin()}{p.}{group__decfuncs_ga31c814bf09b2232aff69c57ae20f04eb}, the granule position for the frame will be stored in it before the first callback is made. If an entire frame is dropped (a 0-\/byte packet), then no callbacks will be made at all for that frame.
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[{\em \_\-ctx}]An application-\/provided context pointer. \item[{\em \_\-buf}]The image buffer for the decoded frame. \item[{\em \_\-yfrag0}]The Y coordinate of the first row of 8x8 fragments decoded. Multiply this by 8 to obtain the pixel row number in the luma plane. If the chroma planes are subsampled in the Y direction, this will always be divisible by two. \item[{\em \_\-yfrag\_\-end}]The Y coordinate of the first row of 8x8 fragments past the newly decoded section. If the chroma planes are subsampled in the Y direction, this will always be divisible by two. I.e., this section contains fragment rows {\ttfamily {\itshape \_\-yfrag0\/} ...{\itshape \_\-yfrag\_\-end\/} -\/1}. \end{DoxyParams}
|
||||
@@ -0,0 +1,343 @@
|
||||
\section{theoraenc.h File Reference}
|
||||
\label{theoraenc_8h}\index{theoraenc.h@{theoraenc.h}}
|
||||
|
||||
|
||||
The {\ttfamily libtheoraenc} C encoding API.
|
||||
{\ttfamily \#include $<$stddef.h$>$}\par
|
||||
{\ttfamily \#include $<$ogg/ogg.h$>$}\par
|
||||
{\ttfamily \#include \char`\"{}codec.h\char`\"{}}\par
|
||||
\subsection*{Defines}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf \_\-O\_\-THEORA\_\-THEORAENC\_\-H\_\-}~(1)
|
||||
\end{DoxyCompactItemize}
|
||||
\begin{Indent}{\bf th\_\-encode\_\-ctl() codes}\par
|
||||
{\em \label{_amgrp652c8d6bf1cea216ce117704a398b5f8}
|
||||
\label{theoraenc_8h_encctlcodes}
|
||||
These are the available request codes for \doxyref{th\_\-encode\_\-ctl()}{p.}{group__encfuncs_ga3a427f6514dfdc01ea72172c469d51d9}. By convention, these are even, to distinguish them from the \doxyref{decoder control codes}{p.}{theoradec_8h_decctlcodes}. Keep any experimental or vendor-\/specific values above {\ttfamily 0x8000}. }\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-HUFFMAN\_\-CODES}~(0)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the Huffman tables to use. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}~(2)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the quantization parameters to use. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}~(4)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the maximum distance between key frames. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}~(10)
|
||||
\begin{DoxyCompactList}\small\item\em Disables any encoder features that would prevent lossless transcoding back to VP3. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}~(12)
|
||||
\begin{DoxyCompactList}\small\item\em Gets the maximum speed level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}~(14)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the speed level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-GET\_\-SPLEVEL}~(16)
|
||||
\begin{DoxyCompactList}\small\item\em Gets the current speed level. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-DUP\_\-COUNT}~(18)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the number of duplicates of the next frame to produce. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS}~(20)
|
||||
\begin{DoxyCompactList}\small\item\em Modifies the default bitrate management behavior. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER}~(22)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the size of the bitrate management bit reservoir as a function of number of frames. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-2PASS\_\-OUT}~(24)
|
||||
\begin{DoxyCompactList}\small\item\em Enable pass 1 of two-\/pass encoding mode and retrieve the first pass metrics. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-2PASS\_\-IN}~(26)
|
||||
\begin{DoxyCompactList}\small\item\em Submits two-\/pass encoding metric data collected the first encoding pass to the second pass. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-QUALITY}~(28)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the current encoding quality. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-ENCCTL\_\-SET\_\-BITRATE}~(30)
|
||||
\begin{DoxyCompactList}\small\item\em Sets the current encoding bitrate. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\begin{Indent}{\bf TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS flags}\par
|
||||
{\em \label{_amgrp6d70796e675cce22589d15a73cb3a16b}
|
||||
\label{theoraenc_8h_ratectlflags}
|
||||
These are the flags available for use with \doxyref{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS}{p.}{theoraenc_8h_a026502e08fbe1af0a1063f39bd18129c}. }\begin{DoxyCompactItemize}
|
||||
\item
|
||||
\#define {\bf TH\_\-RATECTL\_\-DROP\_\-FRAMES}~(0x1)
|
||||
\begin{DoxyCompactList}\small\item\em Drop frames to keep within bitrate buffer constraints. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-RATECTL\_\-CAP\_\-OVERFLOW}~(0x2)
|
||||
\begin{DoxyCompactList}\small\item\em Ignore bitrate buffer overflows. \item\end{DoxyCompactList}\item
|
||||
\#define {\bf TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW}~(0x4)
|
||||
\begin{DoxyCompactList}\small\item\em Ignore bitrate buffer underflows. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\subsection*{Typedefs}
|
||||
\begin{Indent}{\bf Encoder state}\par
|
||||
{\em \label{_amgrp4ebc85bd8522a8b6128225c02b31c8b7}
|
||||
The following data structure is opaque, and its contents are not publicly defined by this API.
|
||||
|
||||
Referring to its internals directly is unsupported, and may break without warning. }\begin{DoxyCompactItemize}
|
||||
\item
|
||||
typedef struct {\bf th\_\-enc\_\-ctx} {\bf th\_\-enc\_\-ctx}
|
||||
\begin{DoxyCompactList}\small\item\em The encoder context. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\subsection*{Functions}
|
||||
\begin{Indent}{\bf Functions for encoding}\par
|
||||
{\em \label{_amgrpc58fb8743a7ca83eb895d57e29e032c8}
|
||||
You must link to {\ttfamily libtheoraenc} and {\ttfamily libtheoradec} if you use any of the functions in this section.
|
||||
|
||||
The functions are listed in the order they are used in a typical encode. The basic steps are:
|
||||
\begin{DoxyItemize}
|
||||
\item Fill in a \doxyref{th\_\-info}{p.}{structth__info} structure with details on the format of the video you wish to encode.
|
||||
\item Allocate a \doxyref{th\_\-enc\_\-ctx}{p.}{theoraenc_8h_af5cc40472b925456d42526a035d66edd} handle with \doxyref{th\_\-encode\_\-alloc()}{p.}{group__encfuncs_gaa91e47bc9dd5f6ee52045bd7b815e5a7}.
|
||||
\item Perform any additional encoder configuration required with \doxyref{th\_\-encode\_\-ctl()}{p.}{group__encfuncs_ga3a427f6514dfdc01ea72172c469d51d9}.
|
||||
\item Repeatedly call \doxyref{th\_\-encode\_\-flushheader()}{p.}{group__encfuncs_ga9439d61b566039d194ff782681fbc408} to retrieve all the header packets.
|
||||
\item For each uncompressed frame:
|
||||
\begin{DoxyItemize}
|
||||
\item Submit the uncompressed frame via \doxyref{th\_\-encode\_\-ycbcr\_\-in()}{p.}{group__encfuncs_gadbe7dd66b411c2d61ab8153c15308750}
|
||||
\item Repeatedly call \doxyref{th\_\-encode\_\-packetout()}{p.}{group__encfuncs_ga96d8ac1dda53187455352f99bbb5b04b} to retrieve any video data packets that are ready.
|
||||
\end{DoxyItemize}
|
||||
\item Call \doxyref{th\_\-encode\_\-free()}{p.}{group__encfuncs_ga36b23d216532231925c4107894204680} to release all encoder memory.
|
||||
\end{DoxyItemize}}\begin{DoxyCompactItemize}
|
||||
\item
|
||||
{\bf th\_\-enc\_\-ctx} $\ast$ {\bf th\_\-encode\_\-alloc} (const {\bf th\_\-info} $\ast$\_\-info)
|
||||
\begin{DoxyCompactList}\small\item\em Allocates an encoder instance. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-ctl} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, int \_\-req, void $\ast$\_\-buf, size\_\-t \_\-buf\_\-sz)
|
||||
\begin{DoxyCompactList}\small\item\em Encoder control function. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-flushheader} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, {\bf th\_\-comment} $\ast$\_\-comments, ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Outputs the next header packet. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-ycbcr\_\-in} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, {\bf th\_\-ycbcr\_\-buffer} \_\-ycbcr)
|
||||
\begin{DoxyCompactList}\small\item\em Submits an uncompressed frame to the encoder. \item\end{DoxyCompactList}\item
|
||||
int {\bf th\_\-encode\_\-packetout} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc, int \_\-last, ogg\_\-packet $\ast$\_\-op)
|
||||
\begin{DoxyCompactList}\small\item\em Retrieves encoded video data packets. \item\end{DoxyCompactList}\item
|
||||
void {\bf th\_\-encode\_\-free} ({\bf th\_\-enc\_\-ctx} $\ast$\_\-enc)
|
||||
\begin{DoxyCompactList}\small\item\em Frees an allocated encoder instance. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
\end{Indent}
|
||||
\subsection*{Variables}
|
||||
\begin{DoxyCompactItemize}
|
||||
\item
|
||||
const {\bf th\_\-quant\_\-info} {\bf TH\_\-VP31\_\-QUANT\_\-INFO}
|
||||
\begin{DoxyCompactList}\small\item\em The quantization parameters used by VP3. \item\end{DoxyCompactList}\item
|
||||
const {\bf th\_\-huff\_\-code} {\bf TH\_\-VP31\_\-HUFF\_\-CODES} [TH\_\-NHUFFMAN\_\-TABLES][TH\_\-NDCT\_\-TOKENS]
|
||||
\begin{DoxyCompactList}\small\item\em The Huffman tables used by VP3. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
The {\ttfamily libtheoraenc} C encoding API.
|
||||
|
||||
\subsection{Define Documentation}
|
||||
\index{theoraenc.h@{theoraenc.h}!\_\-O\_\-THEORA\_\-THEORAENC\_\-H\_\-@{\_\-O\_\-THEORA\_\-THEORAENC\_\-H\_\-}}
|
||||
\index{\_\-O\_\-THEORA\_\-THEORAENC\_\-H\_\-@{\_\-O\_\-THEORA\_\-THEORAENC\_\-H\_\-}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{\_\-O\_\-THEORA\_\-THEORAENC\_\-H\_\-}]{\setlength{\rightskip}{0pt plus 5cm}\#define \_\-O\_\-THEORA\_\-THEORAENC\_\-H\_\-~(1)}\label{theoraenc_8h_ab915dd90f069a2431454fd62365e9381}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-2PASS\_\-IN@{TH\_\-ENCCTL\_\-2PASS\_\-IN}}
|
||||
\index{TH\_\-ENCCTL\_\-2PASS\_\-IN@{TH\_\-ENCCTL\_\-2PASS\_\-IN}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-2PASS\_\-IN}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-2PASS\_\-IN~(26)}\label{theoraenc_8h_a4a84f982cdd9a3e3c803a29bbde9df0b}
|
||||
|
||||
|
||||
Submits two-\/pass encoding metric data collected the first encoding pass to the second pass. The first call must be made before the first frame is encoded, and a target bitrate must have already been specified to the encoder. It sets the encoder to pass 2 mode implicitly; this cannot be disabled. The encoder may require reading data from some or all of the frames in advance, depending on, e.g., the reservoir size used in the second pass. You must call this function repeatedly before each frame to provide data until either a) it fails to consume all of the data presented or b) all of the pass 1 data has been consumed. In the first case, you must save the remaining data to be presented after the next frame. You can call this function with a NULL argument to get an upper bound on the number of bytes that will be required before the next frame.
|
||||
|
||||
When pass 2 is first enabled, the default bit reservoir is set to the entire file; this gives maximum flexibility but can lead to very high peak rates. You can subsequently set it to another value with \doxyref{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER}{p.}{theoraenc_8h_aaefb515876b2a180ad5c3120fc584a52} (e.g., to set it to the keyframe interval for non-\/live streaming), however, you may then need to provide more data before the next frame.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily char[]}: A buffer containing the data returned by \doxyref{TH\_\-ENCCTL\_\-2PASS\_\-OUT}{p.}{theoraenc_8h_ac3751b9c3838888ec2e3f0b0d2823282} in pass 1. You may pass {\ttfamily NULL} for {\itshape \_\-buf\/} to return an upper bound on the number of additional bytes needed before the next frame. The summary data returned at the end of pass 1 must be at the head of the buffer on the first call with a non-\/{\ttfamily NULL} {\itshape \_\-buf\/}, and the placeholder data returned at the start of pass 1 should be omitted. After each call you should advance this buffer by the number of bytes consumed. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em $>$0}]The number of bytes of metric data required/consumed. \item[{\em 0}]No more data is required before the next frame. \item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]No target bitrate has been set, or the first call was made after the first frame was submitted for encoding. \item[{\em TH\_\-ENOTFORMAT}]The data did not appear to be pass 1 from a compatible implementation of this library. \item[{\em TH\_\-EBADHEADER}]The data was invalid; this may be returned when attempting to read an aborted pass 1 file that still has the placeholder data in place of the summary data. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-2PASS\_\-OUT@{TH\_\-ENCCTL\_\-2PASS\_\-OUT}}
|
||||
\index{TH\_\-ENCCTL\_\-2PASS\_\-OUT@{TH\_\-ENCCTL\_\-2PASS\_\-OUT}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-2PASS\_\-OUT}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-2PASS\_\-OUT~(24)}\label{theoraenc_8h_ac3751b9c3838888ec2e3f0b0d2823282}
|
||||
|
||||
|
||||
Enable pass 1 of two-\/pass encoding mode and retrieve the first pass metrics. Pass 1 mode must be enabled before the first frame is encoded, and a target bitrate must have already been specified to the encoder. Although this does not have to be the exact rate that will be used in the second pass, closer values may produce better results. The first call returns the size of the two-\/pass header data, along with some placeholder content, and sets the encoder into pass 1 mode implicitly. This call sets the encoder to pass 1 mode implicitly. Then, a subsequent call must be made after each call to \doxyref{th\_\-encode\_\-ycbcr\_\-in()}{p.}{group__encfuncs_gadbe7dd66b411c2d61ab8153c15308750} to retrieve the metrics for that frame. An additional, final call must be made to retrieve the summary data, containing such information as the total number of frames, etc. This must be stored in place of the placeholder data that was returned in the first call, before the frame metrics data. All of this data must be presented back to the encoder during pass 2 using \doxyref{TH\_\-ENCCTL\_\-2PASS\_\-IN}{p.}{theoraenc_8h_a4a84f982cdd9a3e3c803a29bbde9df0b}.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\rightarrow$} {\em $<$tt$>$char}]$\ast$\_\-buf: Returns a pointer to internal storage containing the two pass metrics data. This storage is only valid until the next call, or until the encoder context is freed, and must be copied by the application. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em $>$=0}]The number of bytes of metric data available in the returned buffer. \item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(char $\ast$)}, no target bitrate has been set, or the first call was made after the first frame was submitted for encoding. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-GET\_\-SPLEVEL@{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL}}
|
||||
\index{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL@{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-GET\_\-SPLEVEL~(16)}\label{theoraenc_8h_a114b7c552f50b7b8d881a39489af1f61}
|
||||
|
||||
|
||||
Gets the current speed level. The default speed level may vary according to encoder implementation, but if this control code is not supported (it returns \doxyref{TH\_\-EIMPL}{p.}{codec_8h_a921c47accc17841f220af5a6afb79efe}), the default may be assumed to be the slowest available speed (0). The maximum encoding speed level may be implementation-\/ and encoding mode-\/specific, and can be obtained via \doxyref{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}{p.}{theoraenc_8h_a9baf5bdd206e80c78a8fd44687e89783}.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\rightarrow$} {\em \_\-buf}]{\ttfamily int}: The current encoding speed level. 0 is slowest, larger values use less CPU. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX@{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}}
|
||||
\index{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX@{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX~(12)}\label{theoraenc_8h_a9baf5bdd206e80c78a8fd44687e89783}
|
||||
|
||||
|
||||
Gets the maximum speed level. Higher speed levels favor quicker encoding over better quality per bit. Depending on the encoding mode, and the internal algorithms used, quality may actually improve, but in this case bitrate will also likely increase. In any case, overall rate/distortion performance will probably decrease. The maximum value, and the meaning of each value, may change depending on the current encoding mode (VBR vs. constant quality, etc.).
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\rightarrow$} {\em \_\-buf}]{\ttfamily int}: The maximum encoding speed level. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-BITRATE@{TH\_\-ENCCTL\_\-SET\_\-BITRATE}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-BITRATE@{TH\_\-ENCCTL\_\-SET\_\-BITRATE}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-BITRATE}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-BITRATE~(30)}\label{theoraenc_8h_a9b969df55ecad1acd1ae207fad42592e}
|
||||
|
||||
|
||||
Sets the current encoding bitrate. Once a bitrate is set, the encoder must use a rate-\/controlled mode for all future frames (this restriction may be relaxed in a future version). If it is set before the headers are emitted, the target bitrate encoded in them will be updated. Due to the buffer delay, the exact bitrate of each section of the encode is not guaranteed. The encoder may have already used more bits than allowed for the frames it has encoded, expecting to make them up in future frames, or it may have used fewer, holding the excess in reserve. The exact transition between the two bitrates is not well-\/defined by this API, but may be affected by flags set with \doxyref{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS}{p.}{theoraenc_8h_a026502e08fbe1af0a1063f39bd18129c}. After a number of frames equal to the buffer delay, one may expect further output to average at the target bitrate.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily long}: The new target bitrate, in bits per second. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success. \item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]The target bitrate was not positive. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-DUP\_\-COUNT@{TH\_\-ENCCTL\_\-SET\_\-DUP\_\-COUNT}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-DUP\_\-COUNT@{TH\_\-ENCCTL\_\-SET\_\-DUP\_\-COUNT}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-DUP\_\-COUNT}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-DUP\_\-COUNT~(18)}\label{theoraenc_8h_a8bb9b05471c42a09f8684a2583b8a1df}
|
||||
|
||||
|
||||
Sets the number of duplicates of the next frame to produce. Although libtheora can encode duplicate frames very cheaply, it costs some amount of CPU to detect them, and a run of duplicates cannot span a keyframe boundary. This control code tells the encoder to produce the specified number of extra duplicates of the next frame. This allows the encoder to make smarter keyframe placement decisions and rate control decisions, and reduces CPU usage as well, when compared to just submitting the same frame for encoding multiple times. This setting only applies to the next frame submitted for encoding. You MUST call \doxyref{th\_\-encode\_\-packetout()}{p.}{group__encfuncs_ga96d8ac1dda53187455352f99bbb5b04b} repeatedly until it returns 0, or the extra duplicate frames will be lost.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily int}: The number of duplicates to produce. If this is negative or zero, no duplicates will be produced. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}, or the number of duplicates is greater than or equal to the maximum keyframe interval. In the latter case, NO duplicate frames will be produced. You must ensure that the maximum keyframe interval is set larger than the maximum number of duplicates you will ever wish to insert prior to encoding. \item[{\em TH\_\-EIMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-HUFFMAN\_\-CODES@{TH\_\-ENCCTL\_\-SET\_\-HUFFMAN\_\-CODES}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-HUFFMAN\_\-CODES@{TH\_\-ENCCTL\_\-SET\_\-HUFFMAN\_\-CODES}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-HUFFMAN\_\-CODES}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-HUFFMAN\_\-CODES~(0)}\label{theoraenc_8h_a0165348788e560a19b7c61ae8f0c2283}
|
||||
|
||||
|
||||
Sets the Huffman tables to use. The tables are copied, not stored by reference, so they can be freed after this call. {\ttfamily NULL} may be specified to revert to the default tables.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily \doxyref{th\_\-huff\_\-code}{p.}{structth__huff__code}[\doxyref{TH\_\-NHUFFMAN\_\-TABLES}{p.}{codec_8h_a49bf449eae33c5320f0c308f32c6ae42}][\doxyref{TH\_\-NDCT\_\-TOKENS}{p.}{codec_8h_a2a44f48084e76a58cae48fb5d47cd422}]} \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]Encoding has already begun or one or more of the given tables is not full or prefix-\/free, {\itshape \_\-buf\/} is {\ttfamily NULL} and {\itshape \_\-buf\_\-sz\/} is not zero, or {\itshape \_\-buf\/} is non-\/{\ttfamily NULL} and {\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(\doxyref{th\_\-huff\_\-code}{p.}{structth__huff__code})$\ast$\doxyref{TH\_\-NHUFFMAN\_\-TABLES}{p.}{codec_8h_a49bf449eae33c5320f0c308f32c6ae42}$\ast$\doxyref{TH\_\-NDCT\_\-TOKENS}{p.}{codec_8h_a2a44f48084e76a58cae48fb5d47cd422}}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE@{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE@{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-KEYFRAME\_\-FREQUENCY\_\-FORCE~(4)}\label{theoraenc_8h_a27e755e15b4b5604c54974b304037a49}
|
||||
|
||||
|
||||
Sets the maximum distance between key frames. This can be changed during an encode, but will be bounded by {\ttfamily 1$<$$<$\doxyref{th\_\-info::keyframe\_\-granule\_\-shift}{p.}{structth__info_a693ca4ab11fbc0c3f32594b4bb8766ed}}. If it is set before encoding begins, \doxyref{th\_\-info::keyframe\_\-granule\_\-shift}{p.}{structth__info_a693ca4ab11fbc0c3f32594b4bb8766ed} will be enlarged appropriately.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily ogg\_\-uint32\_\-t}: The maximum distance between key frames. \item[\mbox{$\rightarrow$} {\em \_\-buf}]{\ttfamily ogg\_\-uint32\_\-t}: The actual maximum distance set. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(ogg\_\-uint32\_\-t)}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-QUALITY@{TH\_\-ENCCTL\_\-SET\_\-QUALITY}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-QUALITY@{TH\_\-ENCCTL\_\-SET\_\-QUALITY}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-QUALITY}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-QUALITY~(28)}\label{theoraenc_8h_aac087983fa951b9148c9db6bc2e81ef4}
|
||||
|
||||
|
||||
Sets the current encoding quality. This is only valid so long as no bitrate has been specified, either through the \doxyref{th\_\-info}{p.}{structth__info} struct used to initialize the encoder or through \doxyref{TH\_\-ENCCTL\_\-SET\_\-BITRATE}{p.}{theoraenc_8h_a9b969df55ecad1acd1ae207fad42592e} (this restriction may be relaxed in a future version). If it is set before the headers are emitted, the target quality encoded in them will be updated.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily int}: The new target quality, in the range 0...63, inclusive. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em 0}]Success. \item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]A target bitrate has already been specified, or the quality index was not in the range 0...63. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS@{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS@{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-QUANT\_\-PARAMS~(2)}\label{theoraenc_8h_a3befcdd66678f8d27034f9c4b16d1b9c}
|
||||
|
||||
|
||||
Sets the quantization parameters to use. The parameters are copied, not stored by reference, so they can be freed after this call. {\ttfamily NULL} may be specified to revert to the default parameters.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]\doxyref{th\_\-quant\_\-info}{p.}{structth__quant__info} \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]Encoding has already begun, {\itshape \_\-buf\/} is {\ttfamily NULL} and {\itshape \_\-buf\_\-sz\/} is not zero, or {\itshape \_\-buf\/} is non-\/{\ttfamily NULL} and {\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(\doxyref{th\_\-quant\_\-info}{p.}{structth__quant__info})}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER@{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER@{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-RATE\_\-BUFFER~(22)}\label{theoraenc_8h_aaefb515876b2a180ad5c3120fc584a52}
|
||||
|
||||
|
||||
Sets the size of the bitrate management bit reservoir as a function of number of frames. The reservoir size affects how quickly bitrate management reacts to instantaneous changes in the video complexity. Larger reservoirs react more slowly, and provide better overall quality, but require more buffering by a client, adding more latency to live streams. By default, libtheora sets the reservoir to the maximum distance between keyframes, subject to a minimum and maximum limit. This call may be used to increase or decrease the reservoir, increasing or decreasing the allowed temporary variance in bitrate. An implementation may impose some limits on the size of a reservoir it can handle, in which case the actual reservoir size may not be exactly what was requested. The actual value set will be returned.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily int}: Requested size of the reservoir measured in frames. \item[\mbox{$\rightarrow$} {\em \_\-buf}]{\ttfamily int}: The actual size of the reservoir set. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}, or rate control is not enabled. The buffer has an implementation defined minimum and maximum size and the value in \_\-buf will be adjusted to match the actual value set. \item[{\em TH\_\-EIMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS@{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS@{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-RATE\_\-FLAGS~(20)}\label{theoraenc_8h_a026502e08fbe1af0a1063f39bd18129c}
|
||||
|
||||
|
||||
Modifies the default bitrate management behavior. Use to allow or disallow frame dropping, and to enable or disable capping bit reservoir overflows and underflows. See \doxyref{the list of available flags}{p.}{theoraenc_8h_encctlcodes}. The flags are set by default to {\ttfamily \doxyref{TH\_\-RATECTL\_\-DROP\_\-FRAMES}{p.}{theoraenc_8h_a3e7fab53b902b54135522ba286f45e33}$|$\doxyref{TH\_\-RATECTL\_\-CAP\_\-OVERFLOW}{p.}{theoraenc_8h_a32f9983b344a431334493cefb0b9337c}}.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily int}: Any combination of \doxyref{the available flags}{p.}{theoraenc_8h_ratectlflags}:
|
||||
\begin{DoxyItemize}
|
||||
\item \doxyref{TH\_\-RATECTL\_\-DROP\_\-FRAMES}{p.}{theoraenc_8h_a3e7fab53b902b54135522ba286f45e33}: Enable frame dropping.
|
||||
\item \doxyref{TH\_\-RATECTL\_\-CAP\_\-OVERFLOW}{p.}{theoraenc_8h_a32f9983b344a431334493cefb0b9337c}: Don't bank excess bits for later use.
|
||||
\item \doxyref{TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW}{p.}{theoraenc_8h_ad0d62d9dce542caf5296b03b97e020a6}: Don't try to make up shortfalls later.
|
||||
\end{DoxyItemize}\end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)} or rate control is not enabled. \item[{\em TH\_\-EIMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-SPLEVEL@{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL@{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-SPLEVEL}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-SPLEVEL~(14)}\label{theoraenc_8h_abd9fbcb6a25a77d991d3620164fe59d6}
|
||||
|
||||
|
||||
Sets the speed level. The current speed level may be retrieved using \doxyref{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL}{p.}{theoraenc_8h_a114b7c552f50b7b8d881a39489af1f61}.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily int}: The new encoding speed level. 0 is slowest, larger values use less CPU. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}, or the encoding speed level is out of bounds. The maximum encoding speed level may be implementation-\/ and encoding mode-\/specific, and can be obtained via \doxyref{TH\_\-ENCCTL\_\-GET\_\-SPLEVEL\_\-MAX}{p.}{theoraenc_8h_a9baf5bdd206e80c78a8fd44687e89783}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation in the current encoding mode. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE@{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}}
|
||||
\index{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE@{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-ENCCTL\_\-SET\_\-VP3\_\-COMPATIBLE~(10)}\label{theoraenc_8h_a382d685a39a34d8e6ba76b00d804efd8}
|
||||
|
||||
|
||||
Disables any encoder features that would prevent lossless transcoding back to VP3. This primarily means disabling block-\/adaptive quantization and always coding all four luma blocks in a macro block when 4MV is used. It also includes using the VP3 quantization tables and Huffman codes; if you set them explicitly after calling this function, the resulting stream will not be VP3-\/compatible. If you enable VP3-\/compatibility when encoding 4:2:2 or 4:4:4 source material, or when using a picture region smaller than the full frame (e.g. a non-\/multiple-\/of-\/16 width or height), then non-\/VP3 bitstream features will still be disabled, but the stream will still not be VP3-\/compatible, as VP3 was not capable of encoding such formats. If you call this after encoding has already begun, then the quantization tables and codebooks cannot be changed, but the frame-\/level features will be enabled or disabled as requested.
|
||||
|
||||
|
||||
\begin{DoxyParams}{Parameters}
|
||||
\item[\mbox{$\leftarrow$} {\em \_\-buf}]{\ttfamily int}: a non-\/zero value to enable VP3 compatibility, or 0 to disable it (the default). \item[\mbox{$\rightarrow$} {\em \_\-buf}]{\ttfamily int}: 1 if all bitstream features required for VP3-\/compatibility could be set, and 0 otherwise. The latter will be returned if the pixel format is not 4:2:0, the picture region is smaller than the full frame, or if encoding has begun, preventing the quantization tables and codebooks from being set. \end{DoxyParams}
|
||||
|
||||
\begin{DoxyRetVals}{Return values}
|
||||
\item[{\em TH\_\-EFAULT}]{\itshape \_\-enc\_\-ctx\/} or {\itshape \_\-buf\/} is {\ttfamily NULL}. \item[{\em TH\_\-EINVAL}]{\itshape \_\-buf\_\-sz\/} is not {\ttfamily sizeof(int)}. \item[{\em TH\_\-EIMPL}]Not supported by this implementation. \end{DoxyRetVals}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-RATECTL\_\-CAP\_\-OVERFLOW@{TH\_\-RATECTL\_\-CAP\_\-OVERFLOW}}
|
||||
\index{TH\_\-RATECTL\_\-CAP\_\-OVERFLOW@{TH\_\-RATECTL\_\-CAP\_\-OVERFLOW}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-RATECTL\_\-CAP\_\-OVERFLOW}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-RATECTL\_\-CAP\_\-OVERFLOW~(0x2)}\label{theoraenc_8h_a32f9983b344a431334493cefb0b9337c}
|
||||
|
||||
|
||||
Ignore bitrate buffer overflows. If the encoder uses so few bits that the reservoir of available bits overflows, ignore the excess. The encoder will not try to use these extra bits in future frames. At high rates this may cause the result to be undersized, but allows a client to play the stream using a finite buffer; it should normally be enabled. \index{theoraenc.h@{theoraenc.h}!TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW@{TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW}}
|
||||
\index{TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW@{TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-RATECTL\_\-CAP\_\-UNDERFLOW~(0x4)}\label{theoraenc_8h_ad0d62d9dce542caf5296b03b97e020a6}
|
||||
|
||||
|
||||
Ignore bitrate buffer underflows. If the encoder uses so many bits that the reservoir of available bits underflows, ignore the deficit. The encoder will not try to make up these extra bits in future frames. At low rates this may cause the result to be oversized; it should normally be disabled. \index{theoraenc.h@{theoraenc.h}!TH\_\-RATECTL\_\-DROP\_\-FRAMES@{TH\_\-RATECTL\_\-DROP\_\-FRAMES}}
|
||||
\index{TH\_\-RATECTL\_\-DROP\_\-FRAMES@{TH\_\-RATECTL\_\-DROP\_\-FRAMES}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-RATECTL\_\-DROP\_\-FRAMES}]{\setlength{\rightskip}{0pt plus 5cm}\#define TH\_\-RATECTL\_\-DROP\_\-FRAMES~(0x1)}\label{theoraenc_8h_a3e7fab53b902b54135522ba286f45e33}
|
||||
|
||||
|
||||
Drop frames to keep within bitrate buffer constraints. This can have a severe impact on quality, but is the only way to ensure that bitrate targets are met at low rates during sudden bursts of activity.
|
||||
|
||||
\subsection{Typedef Documentation}
|
||||
\index{theoraenc.h@{theoraenc.h}!th\_\-enc\_\-ctx@{th\_\-enc\_\-ctx}}
|
||||
\index{th\_\-enc\_\-ctx@{th\_\-enc\_\-ctx}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{th\_\-enc\_\-ctx}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf th\_\-enc\_\-ctx} {\bf th\_\-enc\_\-ctx}}\label{theoraenc_8h_af5cc40472b925456d42526a035d66edd}
|
||||
|
||||
|
||||
The encoder context.
|
||||
|
||||
\subsection{Variable Documentation}
|
||||
\index{theoraenc.h@{theoraenc.h}!TH\_\-VP31\_\-HUFF\_\-CODES@{TH\_\-VP31\_\-HUFF\_\-CODES}}
|
||||
\index{TH\_\-VP31\_\-HUFF\_\-CODES@{TH\_\-VP31\_\-HUFF\_\-CODES}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-VP31\_\-HUFF\_\-CODES}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf th\_\-huff\_\-code} {\bf TH\_\-VP31\_\-HUFF\_\-CODES}[TH\_\-NHUFFMAN\_\-TABLES][TH\_\-NDCT\_\-TOKENS]}\label{theoraenc_8h_aee1f7cb1fa0d3b7cc1d4ca0f17e6ae5e}
|
||||
|
||||
|
||||
The Huffman tables used by VP3. \index{theoraenc.h@{theoraenc.h}!TH\_\-VP31\_\-QUANT\_\-INFO@{TH\_\-VP31\_\-QUANT\_\-INFO}}
|
||||
\index{TH\_\-VP31\_\-QUANT\_\-INFO@{TH\_\-VP31\_\-QUANT\_\-INFO}!theoraenc.h@{theoraenc.h}}
|
||||
\subsubsection[{TH\_\-VP31\_\-QUANT\_\-INFO}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf th\_\-quant\_\-info} {\bf TH\_\-VP31\_\-QUANT\_\-INFO}}\label{theoraenc_8h_a3b1b462989f4e7a5a98e6e697f1a7f7d}
|
||||
|
||||
|
||||
The quantization parameters used by VP3.
|
||||
Reference in New Issue
Block a user