summaryrefslogtreecommitdiff
path: root/libavcodec/aactab.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-01-13 16:46:28 +0000
committerMåns Rullgård <mans@mansr.com>2010-01-13 16:46:28 +0000
commitc816d3d0425b94e95e182d53d94b528244d1f133 (patch)
treec6add8eb7a684ee6f9bbcd12eaaa32182ecc423d /libavcodec/aactab.h
parent9d50d3962905b3938e184932f4451e807c0f43fb (diff)
downloadffmpeg-c816d3d0425b94e95e182d53d94b528244d1f133.tar.gz
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. Originally committed as revision 21188 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aactab.h')
-rw-r--r--libavcodec/aactab.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/aactab.h b/libavcodec/aactab.h
index 061a4e9a76..54ec7c97f0 100644
--- a/libavcodec/aactab.h
+++ b/libavcodec/aactab.h
@@ -64,6 +64,8 @@ extern const uint8_t * const ff_aac_spectral_bits [11];
extern const uint16_t ff_aac_spectral_sizes[11];
extern const float *ff_aac_codebook_vectors[];
+extern const float *ff_aac_codebook_vector_vals[];
+extern const uint16_t *ff_aac_codebook_vector_idx[];
extern const uint16_t * const ff_swb_offset_1024[13];
extern const uint16_t * const ff_swb_offset_128 [13];