GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / V7-1-0 > lsec / mv2304


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"
#include "LDT/HDE.h"

Functions

static __inline void LSEC_compress (LSEC_compression *cpr, void *ctx, unsigned int sym)
static __inline unsigned LSEC_compressH (LSEC_compression *cpr, int sym, unsigned int *buf, unsigned int pos)
 Encode a symbol using the Huffman table supplied by a compression.
static __inline void LSEC_histogram (LSEC_compression *cpr, int sym)
 Increment the bin of a histogram.
static __inline void LSEC_histogramH (LSEC_compression *cpr, int sym)
 Increment the bin of a Huffman histogram.
void LSEC_compress (LSEC_compression *cpr, void *ctx, unsigned sym)
 Encode a symbol using the frequency and lookup table supplied by a compression.


Detailed Description

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

Author:
James Swain & Owen Saxton
$Id: compress.ic,v 1.8 2010/08/12 21:10:28 saxton Exp $

Function Documentation

void LSEC_compress ( LSEC_compression cpr,
void *  ctx,
unsigned  sym 
)

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

unsigned LSEC_compressH ( LSEC_compression cpr,
int  sym,
unsigned int *  buf,
unsigned int  pos 
) [static]

Encode a symbol using the Huffman table supplied by a compression.

This function does not check for errors since only a programming error could cause one, and speed is of the essence.

Parameters:
cpr Pointer to an initialsed, populated and processed compression structure
sym Symbol to compress
buf The address of the buffer to hold the encoded value.
pos The current bit position within the buffer.
Returns:
The updated bit position within buf.

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

Increment the bin of a histogram.

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.

void LSEC_histogramH ( LSEC_compression cpr,
int  sym 
) [static]

Increment the bin of a Huffman histogram.

Parameters:
cpr Pointer to an allocated, initialised, compression structure
sym Symbol to add to the histogram
This function does not check for errors.


Generated on Mon Aug 23 10:03:14 2010 by  doxygen 1.5.3