GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LDT / V0-3-2
Constituent: encdec     Tag: mv2304
#include "LDT/HDE.h"
#include "LDT/HUFF.h"
#include "LDT/BFP.h"
#include "LDT/BA.h"
#include "ffs.h"
#include "dprintf.h"
#include "PBS/TMR.h"
#include <string.h>
Include dependency graph for HDE.c:
Data Structures | |
struct | _HDE |
The control structure for the HDE facility. More... | |
struct | _HistLimits_f |
Min and Max indices of a region of the histogram. More... | |
union | _HistLimits |
Min and Max indices of a region of the histogram as a union between and uninterpretted 32-bit integer and its field representation. More... | |
struct | _HistCore_f |
Describes the result of the encoding selection process, giving the lower and upper bin limits along with the number of entries outside that region. More... | |
union | _HistCore |
The histogram core description as a union between an uninterpretted 32-bit representation and its field representation. More... | |
struct | _CodesSummary_f |
Lays out the structure of the return summary from codes_condition. More... | |
union | _CodesSummary |
Lays out the structure of the return summary from codes_condition as a union between an uninterpretted 32-bit representation and its field representation. More... | |
struct | _DeltasSummary_f |
Summarizes the parameters describing the delta code lengths array. More... | |
union | _DeltasSummary |
Summarizes the parameters describing the delta code lengths array as a union between an uninterpretted 32-bit number and its field representation. More... | |
Defines | |
#define | BA_32 |
#define | NULL ((void *)(0)) |
#define | _monitor_declare(statements) |
#define | _monitor_time(_mon, _idx) |
#define | _monitor(_var, val) |
#define | monitor_report(_mon) |
#define | _CODES(_l0, _c0, _l1, _c1, _l2, _c2) |
Typedefs | |
typedef _HDE | HDE |
typedef _HistLimits_f | HistLimits_f |
Typedef for struct _HistLimits. | |
typedef _HistLimits | HistLimits |
Typedef for union _HistLimits. | |
typedef _HistCore_f | HistCore_f |
Typedef for struct _HistCore. | |
typedef _HistCore | HistCore |
Typedef for union _HistCode. | |
typedef _CodesSummary_f | CodesSummary_f |
Typedef for struct _CodesStatus_f. | |
typedef _CodesSummary | CodesSummary |
Typedef for union _CodesSummary. | |
typedef _DeltasSummary_f | DeltasSummary_f |
Typedef for struct _DeltasSummary_f. | |
typedef _DeltasSummary | DeltasSummary |
Typedef for union _DeltasSummary. | |
Functions | |
static __inline unsigned int | hist_limits_find (const unsigned short int *hist, int cnt) |
Finds the indices of the smallest and largest non-zero entry in the specified histogram. | |
static __inline unsigned long long int | hist_select (const unsigned short int *hist, int nentries, HistLimits limits, int nbins) |
Finds the nbits that encompass the largest number of entries for the specified histogram. | |
static __inline int | hist_copy (unsigned int *dst, const unsigned short int *src, int min, int max) |
Copies the core of the histogram (i.e. from the first non-zero element to the last non-zero element. | |
static __inline unsigned int | huff_table_encode (unsigned int *buf, unsigned int pos, CodesSummary cs, const HUFF_code *codes, const unsigned int *freq, int min, int max, unsigned int nunderflow, unsigned int noverflow) |
Encodes the Huffman encoding table. | |
static __inline unsigned int | huff_symbols_encode (unsigned int *buf, unsigned int pos, const HUFF_code *codes, int min, int max, unsigned int nunderflow, unsigned int noverflow, int xsymbols, const short int *symbols, int nsymbols) |
Encodes the pedestal subtracted ADC values using the specified Huffman codes. | |
static __inline unsigned int | direct_symbols_encode (HDE *hde, unsigned int *buf, unsigned int pos, int min, int nbits, 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. | |
static __inline unsigned int | codes_condition (HUFF_code *codes, const unsigned int *freq, int ncodes) |
Conditions the code array by setting the code lengths of non-existent codes to the maximum code length + 1. | |
static __inline unsigned int | form_deltas (signed char *deltas, const HUFF_code *codes, int ncodes, int nseed, int seed) |
Forms the array code lengths deltas. | |
static __inline void | hist_deltas (unsigned int *hist, int min, int nbins, const signed char *deltas, int ndeltas) |
Histograms the delta distribution. | |
static __inline unsigned int | pack_short (unsigned int *buf, unsigned int pos, short int val) |
Packs the number of bits needed to contain the short integer and its value. | |
static __inline unsigned int | pack_seed_min_max (unsigned int *buf, unsigned int pos, int seed, int min, int max) |
static __inline unsigned int | pack_delta1 (unsigned int *buf, unsigned int pos, const signed char *deltas, int ndeltas, int min, int max_means_0) |
High efficiency routine to handle the case when all the deltas are 0 or 1. | |
static __inline unsigned int | pack_delta2 (unsigned int *buf, unsigned int pos, const signed char *deltas, int ndeltas, int min, int max_means_0) |
High efficiency routine to handle the case when all the delta range is only 2 (3 values). | |
static __inline unsigned int | pack_delta_huff (unsigned int *buf, unsigned int pos, const signed char *deltas, int cnt, int min, int max, int max_means_0) |
Packs the delta code lengths as a huffman table. | |
declare (static void print_nbits(const int *f, int cnt, int tot)) | |
unsigned int | HDE_sizeof (unsigned int nhuff) |
Returns the size, in bytes, for a handle to hold a Huffman distribution of huffman_bins. | |
void * | HDE_construct (HDE *hde, unsigned int nhuff) |
Constructs (initializes) the specified HDE structure. | |
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. | |
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. |
CVS $Id: HDE.c,v 1.5 2006/12/06 22:31:47 russell Exp $
|
Value: ( \ (((_c2 << 2) | _l2) << 8) | \ (((_c1 << 2) | _l1) << 4) | \ (((_c0 << 2) | _l0) << 0) \ ) |
|
Conditions the code array by setting the code lengths of non-existent codes to the maximum code length + 1.
|
|
Encodes the specified symbols symbols using the specified histogram of frequencies. Both the symbols and the histogram are presented as 16-bit values.
|
|
Forms the array code lengths deltas.
|
|
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.
|
|
Constructs (initializes) the specified HDE structure.
|
|
Encodes the specified symbols symbols using the specified histogram of frequencies. Both the symbols and the histogram are presented as 16-bit values.
|
|
Clears the histogram using the active bin range stored in the HDE_assay block of the HDE structure.
|
|
Returns the size, in bytes, for a handle to hold a Huffman distribution of huffman_bins.
|
|
Copies the core of the histogram (i.e. from the first non-zero element to the last non-zero element.
|
|
Histograms the delta distribution.
|
|
Finds the indices of the smallest and largest non-zero entry in the specified histogram.
|
|
Finds the nbits that encompass the largest number of entries for the specified histogram.
|
|
Encodes the pedestal subtracted ADC values using the specified Huffman codes.
|
|
Encodes the Huffman encoding table.
|
|
High efficiency routine to handle the case when all the deltas are 0 or 1.
|
|
High efficiency routine to handle the case when all the delta range is only 2 (3 values).
In practice here are the assignments If max is Bin0 Bin1 Bin2 Len:Code Len:Code Lne:Code Min == -1 2,3 1,0 2,2 Min != -1 1:0 2,2 2,3 |
|
Packs the delta code lengths as a huffman table.
|
|
|
|
Packs the number of bits needed to contain the short integer and its value.
|