GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LDT / V0-4-0

Constituent: encdec     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

APD.c File Reference

Arithmetic Byte Decoder, implementation file. More...

#include "APC.h"
#include "LDT/APD.h"
#include "bswp.h"
#include "PBI/Endianness.h"
#include "PBI/Alias.h"

Include dependency graph for APD.c:


Detailed Description

Arithmetic Byte Decoder, implementation file.

Author:
JJRussell - russell@slac.stanford.edu
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.

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.

Table Details
The frequency table used in this is implemented with 32-bit resolution (technically, really 31, because the inclusive space [0,1] 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.

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.

Generated on Fri Jun 19 01:48:02 2009 by  doxygen 1.5.3