Mercurial > libavcodec.hg
comparison ac3dec_data.c @ 9661:1fe22274393a libavcodec
eac3dec: use 16-bit pre-mantissas instead of 24-bit in AHT decoding. it is
simpler and also fixes a bug in GAQ dequantization.
author | jbr |
---|---|
date | Sun, 17 May 2009 06:53:24 +0000 |
parents | e9d9d946f213 |
children | debe2623a70a |
comparison
equal
deleted
inserted
replaced
9660:6d75bcdeaa30 | 9661:1fe22274393a |
---|---|
85 }; | 85 }; |
86 | 86 |
87 /** | 87 /** |
88 * Table E3.6, Gk=2 & Gk=4, B | 88 * Table E3.6, Gk=2 & Gk=4, B |
89 * Large mantissa inverse quantization, negative mantissa remapping offsets | 89 * Large mantissa inverse quantization, negative mantissa remapping offsets |
90 * Table values from the spec are right-shifted by 8 to simplify calculations. | |
91 * ff_eac3_gaq_remap_3_4_b[hebap-8][Gk=2,4] | 90 * ff_eac3_gaq_remap_3_4_b[hebap-8][Gk=2,4] |
92 */ | 91 */ |
93 const int8_t ff_eac3_gaq_remap_2_4_b[9][2] = { | 92 const int16_t ff_eac3_gaq_remap_2_4_b[9][2] = { |
94 { -22, -5 }, | 93 { -5461, -1170 }, |
95 { -46, -20 }, | 94 { -11703, -4915 }, |
96 { -56, -26 }, | 95 { -14199, -6606 }, |
97 { -60, -29 }, | 96 { -15327, -7412 }, |
98 { -62, -31 }, | 97 { -15864, -7805 }, |
99 { -63, -32 }, | 98 { -16126, -7999 }, |
100 { -64, -32 }, | 99 { -16255, -8096 }, |
101 { -64, -32 }, | 100 { -16320, -8144 }, |
102 { -64, -32 }, | 101 { -16352, -8168 } |
103 }; | 102 }; |
104 | 103 |
105 static const int16_t vq_hebap1[4][6] = { | 104 static const int16_t vq_hebap1[4][6] = { |
106 { 7167, 4739, 1106, 4269, 10412, 4820}, | 105 { 7167, 4739, 1106, 4269, 10412, 4820}, |
107 { -5702, -3187, -14483, -1392, -2027, 849}, | 106 { -5702, -3187, -14483, -1392, -2027, 849}, |