\hypertarget{APD_8c}{
\section{APD.c File Reference}
\label{APD_8c}\index{APD.c@{APD.c}}
}
Arithmetic Byte Decoder, implementation file. 

{\tt \#include \char`\"{}APC.h\char`\"{}}\par
{\tt \#include \char`\"{}LDT/APD.h\char`\"{}}\par
{\tt \#include \char`\"{}bswp.h\char`\"{}}\par
{\tt \#include \char`\"{}PBI/Endianness.h\char`\"{}}\par
{\tt \#include \char`\"{}PBI/Alias.h\char`\"{}}\par


Include dependency graph for APD.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=113pt]{APD_8c__incl}
\end{center}
\end{figure}


\subsection{Detailed Description}
Arithmetic Byte Decoder, implementation file. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}
\begin{Desc}
\item[Overview]Implementation of the routines to decode bit streams using an arithmetic probability encoding technique. To successfully decode an input stream, the encoder and decoder must agree on the modeling table. This modeling table is generally constructed from a frequency distribution derived from the actual data to be encoded or from a distribution thought to be highly representative (in a statisical sense345) of the distribution to be encoded. This frequency distribution must then be transformed into the encoding/decoding modeling table.\end{Desc}
\par
 \begin{Desc}
\item[]To achieve performance goals, particularly on the encoding side, these routines must be used with a model builder that forces a particular normalization of the cumulative probability. While such tables may be constructed in a variety of ways, APM\_\-build is an example of such a routine and is anticipated to be the model table builder.\end{Desc}
\par
 \begin{Desc}
\item[Table Details]The frequency table used in this is implemented with 32-bit resolution (technically, really 31, because the inclusive space \mbox{[}0,1\mbox{]} is mapped on to 0x00000000 - 0x80000000). This not only gives a high level of precision, but, more importantly, allows the frequency table to capture a larger dynamic range. From a simplistic viewpoint, the number of bits of dynamic range sets a floor on the maximum achievable compression.\end{Desc}
\par
 \begin{Desc}
\item[Note:]This file acts as a setup for the real code that is contained in the file acdtemplate.h. It merely defines some preprocessor symbols so that the template file can generate both the APD and APD32 routines on both big and little endian machines.\end{Desc}
