[vorbis-dev] confusing comment in encoder_example.c

vorbis at fuchs.offl.uni-jena.de vorbis at fuchs.offl.uni-jena.de
Fri Jul 19 13:46:10 PDT 2002



Documentation should not contain "big magic tables" (we have enough of them
in the MPEG docu), but how the tables are calculated, especially tables like in 

    www.xiph.org/ogg/vorbis/doc/floor1_inverse_dB_table.html

For not directly computable tables a compact respresentation should be used
and explained how this table was developed.

Example for huffman codes:

// compact representation (bit length of every entry, due to the use of
// canonic huffman codes the rest can be calculated from this table)

const unsigned char  _table1 [128] = {
  12, 11, 10, 10, 10, ...
};

typedef struct {
    uint32_t   HuffmanCode;        // Adjusted from Bit 31 downward to 32-UsedBits
    uint8_t    UsedBits;
    int16_t    EncodedValue;
} Huffman_t;

Huffman_t  table1 [128];


-- 
Frank Klemm

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis-dev mailing list