\hypertarget{classSPL_1_1MultiArithDecoder}{}\section{S\+P\+L\+:\+:Multi\+Arith\+Decoder Class Reference}
\label{classSPL_1_1MultiArithDecoder}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}


M-\/ary arithmetic decoder class.  




{\ttfamily \#include $<$arith\+Coder.\+hpp$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classSPL_1_1MultiArithDecoder_a9d903724046f825ba945c3ed3943fc18}{Multi\+Arith\+Decoder} (int max\+Contexts, \hyperlink{classSPL_1_1InputBitStream}{Input\+Bit\+Stream} $\ast$in=nullptr)
\begin{DoxyCompactList}\small\item\em Create a decoder with the specified maximum number of contexts that sends output to the given bit stream. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1MultiArithDecoder_a8681293dec90d0fa97a9149648f285d2}{$\sim$\+Multi\+Arith\+Decoder} ()
\begin{DoxyCompactList}\small\item\em Destroy the decoder. \end{DoxyCompactList}\item 
\hyperlink{classSPL_1_1InputBitStream}{Input\+Bit\+Stream} $\ast$ \hyperlink{group__ArithCoder_ga23bd62324652328105354fbb23ec4b57}{get\+Input} () const 
\begin{DoxyCompactList}\small\item\em Get the bit stream from which to read encoded data. \end{DoxyCompactList}\item 
void \hyperlink{group__ArithCoder_ga2be590d3842a83399b3a8a2a6ea3c74f}{set\+Input} (\hyperlink{classSPL_1_1InputBitStream}{Input\+Bit\+Stream} $\ast$in)
\begin{DoxyCompactList}\small\item\em Set the bit stream from which to read encoded data. \end{DoxyCompactList}\item 
S\+P\+L\+\_\+\+Arith\+Coder\+\_\+ulong \hyperlink{group__ArithCoder_ga46f8b73cf40d0c5254296d2b0fab8da4}{get\+Bit\+Count} () const 
\begin{DoxyCompactList}\small\item\em Get the number of bits read so far. \end{DoxyCompactList}\item 
S\+P\+L\+\_\+\+Arith\+Coder\+\_\+ulong \hyperlink{group__ArithCoder_gaefca821248ee1f439026c99a920f1f6a}{get\+Sym\+Count} () const 
\begin{DoxyCompactList}\small\item\em Get the number of symbols decoded so far. \end{DoxyCompactList}\item 
int \hyperlink{group__ArithCoder_ga577a12fb53226f44aa801e774841c7a4}{get\+Max\+Contexts} () const 
\begin{DoxyCompactList}\small\item\em Get the maximum number of contexts. \end{DoxyCompactList}\item 
void \hyperlink{classSPL_1_1MultiArithDecoder_ae03c96bd7f507a60fb27112e5e9fec99}{set\+Context} (int context\+Id, int num\+Syms)
\begin{DoxyCompactList}\small\item\em Set the specified context to have the given number of symbols which are initially equiprobable. \end{DoxyCompactList}\item 
void \hyperlink{classSPL_1_1MultiArithDecoder_ad22e463d8f01dc41e1bd17e49bc286e6}{set\+Context} (int context\+Id, const std\+::vector$<$ Arith\+Coder\+::\+Freq $>$ \&sym\+Freqs, bool adaptive)
\begin{DoxyCompactList}\small\item\em Set the specified context to have symbols with the given frequencies and the given adaptivity. \end{DoxyCompactList}\item 
int \hyperlink{classSPL_1_1MultiArithDecoder_ad4f55a2dd0d20029c7e882c0b84f6496}{start} ()
\begin{DoxyCompactList}\small\item\em Start a code word. \end{DoxyCompactList}\item 
int \hyperlink{classSPL_1_1MultiArithDecoder_a39d6cfa1bcbdc8aa803fd3eb82714312}{terminate} ()
\begin{DoxyCompactList}\small\item\em Terminate a code word (for synchronization with encoder). \end{DoxyCompactList}\item 
int \hyperlink{classSPL_1_1MultiArithDecoder_a9e35f4f355768d8272acfb4ed38f8200}{decode\+Regular} (int context\+Id)
\begin{DoxyCompactList}\small\item\em Decode a symbol using the given context. \end{DoxyCompactList}\item 
int \hyperlink{classSPL_1_1MultiArithDecoder_a95586f6b65c4503582f10d314c60ba5d}{decode\+Bypass} (int num\+Syms)
\begin{DoxyCompactList}\small\item\em Decode a symbol in bypass mode (i.\+e., all symbols equiprobable). \end{DoxyCompactList}\item 
void \hyperlink{classSPL_1_1MultiArithDecoder_a6564c9d846adb5a92440bc9a533a15f4}{dump} (std\+::ostream \&out) const 
\begin{DoxyCompactList}\small\item\em Dump the internal state of the decoder to the specified stream for debugging purposes. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \hyperlink{group__ArithCoder_gab610f2dc3a47a20be15f74de19b02414}{set\+Debug\+Level} (int debug\+Level)
\begin{DoxyCompactList}\small\item\em Set the debug level. \end{DoxyCompactList}\item 
static void \hyperlink{group__ArithCoder_gaf4a86b2d81388bfd4bbcd3fcbe3cbe91}{set\+Debug\+Stream} (std\+::ostream \&out)
\begin{DoxyCompactList}\small\item\em Set the stream to use for debugging output. \end{DoxyCompactList}\item 
static std\+::ostream \& \hyperlink{group__ArithCoder_ga85c0fd535728f705d5d26f20b94a2def}{get\+Debug\+Stream} ()
\begin{DoxyCompactList}\small\item\em Get the stream used for debugging output. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
M-\/ary arithmetic decoder class. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classSPL_1_1MultiArithDecoder_a9d903724046f825ba945c3ed3943fc18}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!Multi\+Arith\+Decoder@{Multi\+Arith\+Decoder}}
\index{Multi\+Arith\+Decoder@{Multi\+Arith\+Decoder}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{Multi\+Arith\+Decoder}]{\setlength{\rightskip}{0pt plus 5cm}S\+P\+L\+::\+Multi\+Arith\+Decoder\+::\+Multi\+Arith\+Decoder (
\begin{DoxyParamCaption}
\item[{int}]{max\+Contexts, }
\item[{{\bf Input\+Bit\+Stream} $\ast$}]{in = {\ttfamily nullptr}}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_a9d903724046f825ba945c3ed3943fc18}


Create a decoder with the specified maximum number of contexts that sends output to the given bit stream. 

\hypertarget{classSPL_1_1MultiArithDecoder_a8681293dec90d0fa97a9149648f285d2}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!````~Multi\+Arith\+Decoder@{$\sim$\+Multi\+Arith\+Decoder}}
\index{````~Multi\+Arith\+Decoder@{$\sim$\+Multi\+Arith\+Decoder}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{$\sim$\+Multi\+Arith\+Decoder}]{\setlength{\rightskip}{0pt plus 5cm}S\+P\+L\+::\+Multi\+Arith\+Decoder\+::$\sim$\+Multi\+Arith\+Decoder (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_a8681293dec90d0fa97a9149648f285d2}


Destroy the decoder. 



\subsection{Member Function Documentation}
\hypertarget{classSPL_1_1MultiArithDecoder_a95586f6b65c4503582f10d314c60ba5d}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!decode\+Bypass@{decode\+Bypass}}
\index{decode\+Bypass@{decode\+Bypass}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{decode\+Bypass}]{\setlength{\rightskip}{0pt plus 5cm}int S\+P\+L\+::\+Multi\+Arith\+Decoder\+::decode\+Bypass (
\begin{DoxyParamCaption}
\item[{int}]{num\+Syms}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_a95586f6b65c4503582f10d314c60ba5d}


Decode a symbol in bypass mode (i.\+e., all symbols equiprobable). 

\hypertarget{classSPL_1_1MultiArithDecoder_a9e35f4f355768d8272acfb4ed38f8200}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!decode\+Regular@{decode\+Regular}}
\index{decode\+Regular@{decode\+Regular}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{decode\+Regular}]{\setlength{\rightskip}{0pt plus 5cm}int S\+P\+L\+::\+Multi\+Arith\+Decoder\+::decode\+Regular (
\begin{DoxyParamCaption}
\item[{int}]{context\+Id}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_a9e35f4f355768d8272acfb4ed38f8200}


Decode a symbol using the given context. 

\hypertarget{classSPL_1_1MultiArithDecoder_a6564c9d846adb5a92440bc9a533a15f4}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!dump@{dump}}
\index{dump@{dump}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{dump}]{\setlength{\rightskip}{0pt plus 5cm}void S\+P\+L\+::\+Multi\+Arith\+Decoder\+::dump (
\begin{DoxyParamCaption}
\item[{std\+::ostream \&}]{out}
\end{DoxyParamCaption}
) const}\label{classSPL_1_1MultiArithDecoder_a6564c9d846adb5a92440bc9a533a15f4}


Dump the internal state of the decoder to the specified stream for debugging purposes. 

\hypertarget{classSPL_1_1MultiArithDecoder_ae03c96bd7f507a60fb27112e5e9fec99}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!set\+Context@{set\+Context}}
\index{set\+Context@{set\+Context}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{set\+Context}]{\setlength{\rightskip}{0pt plus 5cm}void S\+P\+L\+::\+Multi\+Arith\+Decoder\+::set\+Context (
\begin{DoxyParamCaption}
\item[{int}]{context\+Id, }
\item[{int}]{num\+Syms}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_ae03c96bd7f507a60fb27112e5e9fec99}


Set the specified context to have the given number of symbols which are initially equiprobable. 

\hypertarget{classSPL_1_1MultiArithDecoder_ad22e463d8f01dc41e1bd17e49bc286e6}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!set\+Context@{set\+Context}}
\index{set\+Context@{set\+Context}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{set\+Context}]{\setlength{\rightskip}{0pt plus 5cm}void S\+P\+L\+::\+Multi\+Arith\+Decoder\+::set\+Context (
\begin{DoxyParamCaption}
\item[{int}]{context\+Id, }
\item[{const std\+::vector$<$ Arith\+Coder\+::\+Freq $>$ \&}]{sym\+Freqs, }
\item[{bool}]{adaptive}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_ad22e463d8f01dc41e1bd17e49bc286e6}


Set the specified context to have symbols with the given frequencies and the given adaptivity. 

\hypertarget{classSPL_1_1MultiArithDecoder_ad4f55a2dd0d20029c7e882c0b84f6496}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!start@{start}}
\index{start@{start}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{start}]{\setlength{\rightskip}{0pt plus 5cm}int S\+P\+L\+::\+Multi\+Arith\+Decoder\+::start (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_ad4f55a2dd0d20029c7e882c0b84f6496}


Start a code word. 

This function must be called before attempting to decode any symbols. \hypertarget{classSPL_1_1MultiArithDecoder_a39d6cfa1bcbdc8aa803fd3eb82714312}{}\index{S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}!terminate@{terminate}}
\index{terminate@{terminate}!S\+P\+L\+::\+Multi\+Arith\+Decoder@{S\+P\+L\+::\+Multi\+Arith\+Decoder}}
\subsubsection[{terminate}]{\setlength{\rightskip}{0pt plus 5cm}int S\+P\+L\+::\+Multi\+Arith\+Decoder\+::terminate (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classSPL_1_1MultiArithDecoder_a39d6cfa1bcbdc8aa803fd3eb82714312}


Terminate a code word (for synchronization with encoder). 



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{arithCoder_8hpp}{arith\+Coder.\+hpp}\item 
arith\+Coder.\+cpp\end{DoxyCompactItemize}
