summaryrefslogtreecommitdiff
path: root/libavcodec/dcadata.c
diff options
context:
space:
mode:
authorfoo86 <foobaz86@gmail.com>2016-05-13 12:48:27 +0300
committerJames Almer <jamrial@gmail.com>2016-05-20 23:12:37 -0300
commit64fe1eebddbbf705d0c25d000c102bfca5558682 (patch)
tree32575c102c14db86cbee45dd27fe10e3d413996f /libavcodec/dcadata.c
parent801dbf0269b1bb5bc70c550e971491e0aea9eb70 (diff)
avcodec/dca: use LUT for LBR frequency ranges
Values for unsupported frequencies > 48000 Hz are still included (parser will make use of them). Also convert sampling frequencies array to unsigned. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dcadata.c')
-rw-r--r--libavcodec/dcadata.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/dcadata.c b/libavcodec/dcadata.c
index 53be01d1e7..2d533d0c12 100644
--- a/libavcodec/dcadata.c
+++ b/libavcodec/dcadata.c
@@ -8725,11 +8725,15 @@ const int32_t ff_dca_xll_band_coeff[20] = {
3259333, -5074941, 6928550, -8204883
};
-const int32_t ff_dca_sampling_freqs[16] = {
+const uint32_t ff_dca_sampling_freqs[16] = {
8000, 16000, 32000, 64000, 128000, 22050, 44100, 88200,
176400, 352800, 12000, 24000, 48000, 96000, 192000, 384000,
};
+const uint8_t ff_dca_freq_ranges[16] = {
+ 0, 1, 2, 3, 4, 1, 2, 3, 4, 4, 0, 1, 2, 3, 4, 4
+};
+
const uint16_t ff_dca_avg_g3_freqs[3] = { 16000, 18000, 24000 };
const uint16_t ff_dca_fst_amp[44] = {