Ignore:
Timestamp:
04/23/07 16:47:30 (17 years ago)
Author:
r2d
Message:

improved decoder speed using LUT for huffman decoding. profiling/bench needed (see LUT_DEPTH parameter in huffman.h)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/libmpcdec/huffman.h

    r288 r290  
    4747#endif
    4848
     49// LUT size parameter, LUT size is 1 << LUT_DEPTH
     50#define LUT_DEPTH 6
     51
    4952/// Huffman table entry.
    5053typedef struct mpc_huffman_t {
     
    5457} mpc_huffman;
    5558
     59/// Huffman LUT entry.
     60typedef struct mpc_huff_lut_t {
     61        mpc_uint8_t  Length;
     62        mpc_int8_t   Value;
     63} mpc_huff_lut;
     64
     65/// Type used for huffman LUT decoding
     66typedef struct mpc_lut_data_t {
     67        const mpc_huffman * table;
     68        mpc_huff_lut lut[1 << LUT_DEPTH];
     69} mpc_lut_data;
     70
     71void huff_init_lut(const int bits);
     72
    5673#ifdef __cplusplus
    5774}
Note: See TracChangeset for help on using the changeset viewer.