GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LDT / V0-0-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 dependency graph for APD.c:

Include dependency graph

Functions

void APD_start (APD_dtx *dtx, const unsigned char *in, unsigned int boff)
 Begins a decoding session.

int APD_bdecompress (unsigned char *out, int cnt, const unsigned char *in, unsigned int boff, const unsigned int *table)
 Convenience routine to decode a bit stream using the specified table.

unsigned int APD_decode (APD_dtx *dtx, const unsigned int *table)
 Decodes the next symbol.

int APD_finish (APD_dtx *dtx)
 Finishes the decoding, cleaning up any inprogress context.


Detailed Description

Arithmetic Byte Decoder, implementation file.

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


Function Documentation

int APD_bdecompress unsigned char *  out,
int  cnt,
const unsigned char *  in,
unsigned int  boff,
const unsigned int *  table
 

Convenience routine to decode a bit stream using the specified table.

Returns:
The number of decoded bits
Parameters:
out The output buffer
cnt The number of bytes in the output buffer
in The input buffer
boff The bit offset to start at in the input buffer
table The decoding table
This is a convenience routine, combining APD_start, APD_decode and APD_finish. This routine can only be used if the decoding table is the same for all symbols in the input stream.

Here is the call graph for this function:

unsigned int APD_decode APD_dtx dtx,
const unsigned int *  table
 

Decodes the next symbol.

Returns:
The decoded symbol
Parameters:
dtx The decoding context
table The table to use in the decoding

int APD_finish APD_dtx dtx  ) 
 

Finishes the decoding, cleaning up any inprogress context.

Returns:
The number of bits decoded

void APD_start APD_dtx dtx,
const unsigned char *  in,
unsigned int  boff
 

Begins a decoding session.

Parameters:
dtx The decoding context to be initialized
in The input bit stream
boff The bit offset into the input bit stream


Generated on Sat Sep 24 20:30:01 2005 by doxygen 1.3.3