summaryrefslogtreecommitdiff
path: root/libavcodec/wmadata.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-23 05:09:57 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 17:51:48 +0100
commite5b416daddd0435571c3483621c6953c56e7cf9a (patch)
treeaa3752eb50790f4213df795db7a4f47f95105ba5 /libavcodec/wmadata.h
parent14be39e44a7dd5f378e93a9fea0e1ca1e6eba9d6 (diff)
avcodec/wmadec: Reduce the size of tables used to initialize VLC
By switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths() one can replace a table of codes of type uint16_t by a table of symbols of type uint8_t, saving space. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/wmadata.h')
-rw-r--r--libavcodec/wmadata.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/libavcodec/wmadata.h b/libavcodec/wmadata.h
index 641cb1813c..ca485a5663 100644
--- a/libavcodec/wmadata.h
+++ b/libavcodec/wmadata.h
@@ -51,18 +51,14 @@ static const uint8_t exponent_band_44100[3][25] = {
{ 17, 4, 8, 8, 4, 12, 12, 8, 8, 24, 16, 20, 24, 32, 40, 60, 80, 152, },
};
-const uint16_t ff_wma_hgain_huffcodes[37] = {
- 0x00003, 0x002e7, 0x00001, 0x005cd, 0x0005d, 0x005c9, 0x0005e, 0x00003,
- 0x00016, 0x0000b, 0x00001, 0x00006, 0x00001, 0x00006, 0x00004, 0x00005,
- 0x00004, 0x00007, 0x00003, 0x00007, 0x00004, 0x0000a, 0x0000a, 0x00002,
- 0x00003, 0x00000, 0x00005, 0x00002, 0x0005f, 0x00004, 0x00003, 0x00002,
- 0x005c8, 0x000b8, 0x005ca, 0x005cb, 0x005cc,
-};
-
-const uint8_t ff_wma_hgain_huffbits[37] = {
- 10, 12, 10, 13, 9, 13, 9, 8, 7, 5, 5, 4, 4, 3, 3, 3,
- 4, 3, 4, 4, 5, 5, 6, 8, 7, 10, 8, 10, 9, 8, 9, 9,
- 13, 10, 13, 13, 13,
+const uint8_t ff_wma_hgain_hufftab[37][2] = {
+ { 25, 10 }, { 2, 10 }, { 27, 10 }, { 0, 10 }, { 31, 9 }, { 30, 9 },
+ { 23, 8 }, { 7, 8 }, { 29, 8 }, { 26, 8 }, { 24, 7 }, { 10, 5 },
+ { 12, 4 }, { 20, 5 }, { 22, 6 }, { 8, 7 }, { 33, 10 }, { 32, 13 },
+ { 5, 13 }, { 34, 13 }, { 35, 13 }, { 36, 13 }, { 3, 13 }, { 1, 12 },
+ { 4, 9 }, { 6, 9 }, { 28, 9 }, { 18, 4 }, { 16, 4 }, { 21, 5 },
+ { 9, 5 }, { 11, 4 }, { 19, 4 }, { 14, 3 }, { 15, 3 }, { 13, 3 },
+ { 17, 3 },
};
const float ff_wma_lsp_codebook[NB_LSP_COEFS][16] = {