GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / V7-0-0 > lsec_test / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

compress.ic File Reference

The histogram and compress functions, as static inlines for efficiency. More...

#include "compress.h"
#include "LSEC_p.h"
#include "LDT/APE.h"

Defines

#define LSEC_N_ENCODE   32

Functions

static __inline void LSEC_compress (LSEC_compression *cpr, void *ctx, unsigned sym)
 Encode a symbol using the frequency and lookup table supplied by a compression.
static __inline void LSEC_compressD (LSEC_compression *cpr, void *ctx, unsigned int sym, const unsigned int **tables, unsigned short *syms, int *nsyms)
 Encode a symbol using the frequency and lookup table supplied by a compression.
static __inline void LSEC_histogram (LSEC_compression *cpr, unsigned sym)
 Increment the bin of the histogram corresponding.


Detailed Description

The histogram and compress functions, as static inlines for efficiency.

Author:
James Swain & Owen Saxton
$Id: compress.ic,v 1.7 2010/05/25 19:16:36 saxton Exp $

Function Documentation

void LSEC_compress ( LSEC_compression cpr,
void *  ctx,
unsigned  sym 
) [static]

Encode a symbol using the frequency and lookup table supplied by a compression.

This function does not return errors since propogation of those errors to a point in LSEC where reasonable decisions about error handling can be made is problematic. Instead, errors are latched and can be checked using LSEC_checkCompression.

Parameters:
cpr Pointer to an initialsed, populated and processed compression structure
ctx Context, pointer to the arithmetic encoder context
sym Symbol to compress

void LSEC_compressD ( LSEC_compression cpr,
void *  ctx,
unsigned int  sym,
const unsigned int **  tables,
unsigned short *  syms,
int *  nsyms 
) [static]

Encode a symbol using the frequency and lookup table supplied by a compression.

This function does not do the encoding immediately. It instead collects the table and symbol to be used into a pair of supplied arrays, and encodes the arrays when they become full.

This function does not return errors since propogation of those errors to a point in LSEC where reasonable decisions about error handling can be made is problematic. Instead, errors are latched and can be checked using LSEC_checkCompression.

Parameters:
cpr Pointer to an initialsed, populated and processed compression structure
ctx Context, pointer to the arithmetic encoder context
sym Symbol to encode.
tables Pointer to an array of size LSEC_N_ENCODE to hold the table pointers for deferred encoding.
syms Pointer to an array of size LSEC_N_ENCODE to hold the symbols for deferred encoding.
nsyms Pointer to an integer to hold the number of symbols to be encoded.

void LSEC_histogram ( LSEC_compression cpr,
unsigned  sym 
) [static]

Increment the bin of the histogram corresponding.

Parameters:
cpr Pointer to an allocated, initialised, compression structure
sym Symbol to add to the histogram
This function does not return errors since propogation of those errors to a point in LSEC where reasonable decisions about error handling can be made is problematic. Instead, errors are latched and can be checked using LSEC_checkCompression.


Generated on Wed May 26 10:22:16 2010 by  doxygen 1.5.3