GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LDT / dev > encdec / rhel5-32
#include <LDT/HUFF.h>
#include <LDT/BA.h>
#include <PBI/FFS.ih>
Classes | |
struct | _HDE_assay |
The result of the histogram assessment. More... | |
struct | _HDE |
The control structure for the HDE facility. More... | |
Typedefs | |
typedef struct _HDE_assay | HDE_assay |
Typedef for _struct _HDE_assay. | |
typedef struct _HDE | HDE |
Typedef for struct _HDE. | |
Functions | |
static __inline HUFF_code | _HDE_codeS (HDE *hde, short int symbol) |
Encodes a symbol using the encoding information in hde. This encoding information must have been previously setup using HDE_encodeTable. | |
static __inline unsigned int | _HDE_symbolEncodeS (HDE *hde, unsigned int *buf, unsigned int pos, short int symbol) |
Encodes a symbol using the encoding information in hde. This encoding information must have been previously setup using HDE_encodeTable. | |
void * | HDE_construct (HDE *hde, unsigned int huffman_nbins) |
Constructs (initializes) the specified HDE structure. | |
unsigned int | HDE_sizeof (unsigned int huffman_nbins) |
Returns the size, in bytes, for a handle to hold a Huffman distribution of huffman_bins. | |
unsigned int | HDE_encodeSS (HDE *hde, unsigned int *buf, unsigned int pos, unsigned int huffman_bins, const unsigned short int *hist, int nbins, const short int *symbols, int nsymbols) |
Encodes the specified symbols symbols using the specified histogram of frequencies. Both the symbols and the histogram are presented as 16-bit values. | |
const HDE_assay * | HDE_assayLocate (const HDE *hde) |
Returns a pointer to the publically defined piece of this structure. This can be a one-time call, i.e. for any given HDE structure, this routine always returns the same value. | |
void | HDE_histClearS (const HDE *hde, unsigned short int *hist) |
Clears the histogram using the active bin range stored in the HDE_assay block of the HDE structure. | |
void | HDE_histClearL (const HDE *hde, unsigned int *hist) |
Clears the histogram using the active bin range stored in the HDE_assay block of the HDE structure. | |
void | HDE_tableConstructL (HDE *hde, unsigned int nhuff, const unsigned int *hist, int nbins, int nentries) |
Constructs HDE Huffman Table associated with the specified distribution. | |
unsigned int | HDE_tableEncode (HDE *hde, unsigned int *buf, unsigned int pos) |
Encodes a previously constructed table. | |
unsigned int | HDE_symbolsEncodeS (HDE *hde, unsigned int *buf, unsigned int pos, const short int *symbols, int nsymbols) |
Encodes the set of symbols using the encoding information in hde. This encoding information must have been previously setup using HDE_encodeTable. | |
unsigned int | HDE_symbolEncodeS (HDE *hde, unsigned int *buf, unsigned int pos, short int symbol) |
CVS $Id: HDE.h,v 1.5 2011/03/25 23:57:13 russell Exp $
Typedef for _struct _HDE_assay.
Encodes a symbol using the encoding information in hde. This encoding information must have been previously setup using HDE_encodeTable.
hde | The HDE control structure | |
symbol | The symbol |
References _HDE::assay, _HDE::codes, _HDE_assay::hcnt, _HDE_assay::hmin, _HDE_assay::nover, and _HDE_assay::nunder.
unsigned int _HDE_symbolEncodeS | ( | HDE * | hde, | |
unsigned int * | buf, | |||
unsigned int | pos, | |||
short int | symbol | |||
) | [static] |
Encodes a symbol using the encoding information in hde. This encoding information must have been previously setup using HDE_encodeTable.
hde | The HDE control structure | |
symbol | The symbol | |
buf | The output buffer address | |
pos | The current write bit offset |
References _HDE::assay, _HDE::codes, _HDE_assay::hcnt, _HDE_assay::hmin, _HDE_assay::nover, and _HDE_assay::nunder.
Returns a pointer to the publically defined piece of this structure. This can be a one-time call, i.e. for any given HDE structure, this routine always returns the same value.
hde | The HDE control structure |
References _HDE::assay.
void HDE_construct | ( | HDE * | hde, | |
unsigned int | nhuff | |||
) |
Constructs (initializes) the specified HDE structure.
hde | The HDE control structure to construct | |
nhuff | The maximum number of Huffman encoding bins that this control structure is meant to support. |
References _HDE::assay, _HDE::codes, _HDE::freq, HUFF_N_WA, _HDE::nhuff, and _HDE::wa.
unsigned int HDE_encodeSS | ( | HDE * | hde, | |
unsigned int * | buf, | |||
unsigned int | pos, | |||
unsigned int | nhuff, | |||
const unsigned short int * | hist, | |||
int | nbins, | |||
const short int * | symbols, | |||
int | nsymbols | |||
) |
Encodes the specified symbols symbols using the specified histogram of frequencies. Both the symbols and the histogram are presented as 16-bit values.
hde | The HDE control structure | |
buf | The output buffer address | |
pos | The current write bit offset | |
nhuff | Provides a means to limit the size of the huffman encoding region to a region that is smaller than what was specified during the HDE construction (i.e. the nhuff parameter) The construction value is used, if this value is 0 or larger. | |
hist | The frequency histogram. The histogram is such that it extends -/+ nbins from this pointer. That is, this is the center of the histogram. | |
nbins | The half width of the histogram | |
symbols | The array of symbols | |
nsymbols | The number of symbols |
References _HDE::assay, BFP__wordB(), _HDE_assay::cnt, _HDE::codes, codes_condition(), declare, direct_symbols_encode(), dprintf, dprintf_1, _HistCore::f, _HistLimits::f, _HDE::freq, _HDE_assay::hcnt, hist_copy(), hist_limits_find(), hist_select(), _HDE_assay::hmin, HUFF_buildSparse(), HUFF_codesPrint(), huff_symbols_encode(), huff_table_encode(), _HistCore_f::max, _HistLimits_f::max, _HistCore_f::min, _HDE_assay::min, _HistLimits_f::min, _HDE::nhuff, _HDE_assay::nover, _HDE_assay::nunder, _HistCore_f::pitched, _CodesSummary::ui, _HistLimits::ui, _HistCore::ull, and _HDE::wa.
void HDE_histClearL | ( | const HDE * | hde, | |
unsigned int * | hist | |||
) |
Clears the histogram using the active bin range stored in the HDE_assay block of the HDE structure.
hde | The HDE control handle | |
hist | The histogram to clear |
References _HDE::assay, _HDE_assay::cnt, and _HDE_assay::min.
void HDE_histClearS | ( | const HDE * | hde, | |
unsigned short int * | hist | |||
) |
Clears the histogram using the active bin range stored in the HDE_assay block of the HDE structure.
hde | The HDE control handle | |
hist | The histogram to clear |
References _HDE::assay, _HDE_assay::cnt, and _HDE_assay::min.
unsigned int HDE_sizeof | ( | unsigned int | nhuff | ) |
Returns the size, in bytes, for a handle to hold a Huffman distribution of huffman_bins.
nhuff | The maximum size of the Huffman encoding area Suggested values are small powers of 2 like 32, 64, 128. Note also up to 3 bins may be used to hold describe the underflow, overflow and exception areas. Currently these 3 are mapped into 1 bin, but this may change in a future implementation |
References HUFF_N_WA.
unsigned int HDE_symbolsEncodeS | ( | HDE * | hde, | |
unsigned int * | buf, | |||
unsigned int | pos, | |||
const short int * | symbols, | |||
int | nsymbols | |||
) |
Encodes the set of symbols using the encoding information in hde. This encoding information must have been previously setup using HDE_encodeTable.
hde | The HDE control structure | |
symbols | The array of symbols | |
nsymbols | The number of symbols | |
buf | The output buffer address | |
pos | The current write bit offset |
References _HDE::assay, _HDE::codes, dprintf_1, _HDE::freq, _HDE_assay::hcnt, _HDE_assay::hmin, huff_symbols_encode(), _HDE_assay::nover, and _HDE_assay::nunder.
void HDE_tableConstructL | ( | HDE * | hde, | |
unsigned int | nhuff, | |||
const unsigned int * | hist, | |||
int | nbins, | |||
int | nentries | |||
) |
Constructs HDE Huffman Table associated with the specified distribution.
hde | The HDE control structure | |
nhuff | Provides a means to limit the size of the huffman encoding region to a region that is smaller than what was specified during the HDE construction (i.e. the nhuff parameter) The construction value is used, if this value is 0 or larger. | |
hist | The frequency histogram. The histogram is such that it extends -/+ nbins from this pointer. That is, this is the center of the histogram. | |
nbins | The half width of the histogram | |
nentries | The number of entries in the histogram |
References _HDE::assay, _HDE_assay::cnt, _HDE::codes, codes_condition(), _HDE_assay::cs, declare, _HistCore::f, _HistLimits::f, _HDE::freq, _HDE_assay::hcnt, hist_copyL(), hist_limits_findL(), hist_selectL(), _HDE_assay::hmin, HUFF_buildSparse(), HUFF_codesPrint(), _HistCore_f::max, _HistLimits_f::max, _HistCore_f::min, _HDE_assay::min, _HistLimits_f::min, _HDE::nhuff, _HDE_assay::nover, _HDE_assay::nunder, _HistCore_f::pitched, _CodesSummary::ui, _HistLimits::ui, _HistCore::ull, and _HDE::wa.
unsigned int HDE_tableEncode | ( | HDE * | hde, | |
unsigned int * | buf, | |||
unsigned int | pos | |||
) |
Encodes a previously constructed table.
hde | The HDE control structure | |
buf | The output buffer address | |
pos | The current write bit offset |
References _HDE::assay, BFP__wordB(), _HDE::codes, _HDE_assay::cs, _HDE::freq, _HDE_assay::hcnt, _HDE_assay::hmin, huff_table_encode(), _HDE_assay::nover, _HDE_assay::nunder, and _HDE::wa.