Mercurial > libavcodec.hg
comparison aactab.h @ 10874:bcfe2acbf190 libavcodec
AAC: Compress codebook tables and optimise sign bit handling
The codebooks each consist of small number of values repeated in
groups of 2 or 4. Storing the codebooks as a packed list of 2- or
4-bit indexes into a table reduces their size substantially (from 7.5k
to 1.5k), resulting in less cache pressure.
For the band types with sign bits in the bitstream, storing the number
and position of non-zero codebook values using a few bits avoids
multiple get_bits() calls and floating-point comparisons which gcc
handles miserably.
Some float/int type punning also avoids gcc brain damage.
Overall speedup 20-35% on Cortex-A8, 20% on Core i7.
author | mru |
---|---|
date | Wed, 13 Jan 2010 16:46:28 +0000 |
parents | 69d79f51b8ce |
children | 34a65026fa06 |
comparison
equal
deleted
inserted
replaced
10873:fb42dfc877cc | 10874:bcfe2acbf190 |
---|---|
62 extern const uint16_t * const ff_aac_spectral_codes[11]; | 62 extern const uint16_t * const ff_aac_spectral_codes[11]; |
63 extern const uint8_t * const ff_aac_spectral_bits [11]; | 63 extern const uint8_t * const ff_aac_spectral_bits [11]; |
64 extern const uint16_t ff_aac_spectral_sizes[11]; | 64 extern const uint16_t ff_aac_spectral_sizes[11]; |
65 | 65 |
66 extern const float *ff_aac_codebook_vectors[]; | 66 extern const float *ff_aac_codebook_vectors[]; |
67 extern const float *ff_aac_codebook_vector_vals[]; | |
68 extern const uint16_t *ff_aac_codebook_vector_idx[]; | |
67 | 69 |
68 extern const uint16_t * const ff_swb_offset_1024[13]; | 70 extern const uint16_t * const ff_swb_offset_1024[13]; |
69 extern const uint16_t * const ff_swb_offset_128 [13]; | 71 extern const uint16_t * const ff_swb_offset_128 [13]; |
70 | 72 |
71 extern const uint8_t ff_tns_max_bands_1024[13]; | 73 extern const uint8_t ff_tns_max_bands_1024[13]; |