[FFmpeg-soc] [soc]: r4421 - in wmapro: wma3data.h wma3dec.c

faust3 subversion at mplayerhq.hu
Thu Jun 11 15:15:08 CEST 2009


Author: faust3
Date: Thu Jun 11 15:15:07 2009
New Revision: 4421

Log:
reduce vlc table sizes where possible

Modified:
   wmapro/wma3data.h
   wmapro/wma3dec.c

Modified: wmapro/wma3data.h
==============================================================================
--- wmapro/wma3data.h	Thu Jun 11 14:48:31 2009	(r4420)
+++ wmapro/wma3data.h	Thu Jun 11 15:15:07 2009	(r4421)
@@ -45,23 +45,23 @@ static const uint16_t ff_wma3_critical_f
  */
 #define FF_WMA3_HUFF_SCALE_SIZE 121
 #define FF_WMA3_HUFF_SCALE_MAXBITS 19
-static const uint32_t ff_wma3_scale_huffcodes[FF_WMA3_HUFF_SCALE_SIZE] = {
-    0x0E639, 0x0E6C2, 0x0E6C1, 0x0E6C0, 0x0E63F, 0x0E63E, 0x0E63D, 0x0E63C,
-    0x0E63B, 0x0E63A, 0x0E638, 0x0E637, 0x0E636, 0x0E635, 0x0E634, 0x0E632,
-    0x0E633, 0x0E620, 0x0737B, 0x0E610, 0x0E611, 0x0E612, 0x0E613, 0x0E614,
-    0x0E615, 0x0E616, 0x0E617, 0x0E618, 0x0E619, 0x0E61A, 0x0E61B, 0x0E61C,
-    0x0E61D, 0x0E61E, 0x0E61F, 0x0E6C3, 0x0E621, 0x0E622, 0x0E623, 0x0E624,
-    0x0E625, 0x0E626, 0x0E627, 0x0E628, 0x0E629, 0x0E62A, 0x0E62B, 0x0E62C,
-    0x0E62D, 0x0E62E, 0x0E62F, 0x0E630, 0x0E631, 0x01CDF, 0x00E60, 0x00399,
-    0x000E7, 0x0001D, 0x00000, 0x00001, 0x00001, 0x00001, 0x00002, 0x00006,
-    0x00002, 0x00007, 0x00006, 0x0000F, 0x00038, 0x00072, 0x0039A, 0x0E6C4,
-    0x0E6C5, 0x0E6C6, 0x0E6C7, 0x0E6C8, 0x0E6C9, 0x0E6CA, 0x0E6CB, 0x0E6CC,
-    0x0E6CD, 0x0E6CE, 0x0E6CF, 0x0E6D0, 0x0E6D1, 0x0E6D2, 0x0E6D3, 0x0E6D4,
-    0x0E6D5, 0x0E6D6, 0x0E6D7, 0x0E6D8, 0x0E6D9, 0x0E6DA, 0x0E6DB, 0x0E6DC,
-    0x0E6DD, 0x0E6DE, 0x0E6DF, 0x0E6E0, 0x0E6E1, 0x0E6E2, 0x0E6E3, 0x0E6E4,
-    0x0E6E5, 0x0E6E6, 0x0E6E7, 0x0E6E8, 0x0E6E9, 0x0E6EA, 0x0E6EB, 0x0E6EC,
-    0x0E6ED, 0x0E6EE, 0x0E6EF, 0x0E6F0, 0x0E6F1, 0x0E6F2, 0x0E6F3, 0x0E6F4,
-    0x0E6F5,
+static const uint16_t ff_wma3_scale_huffcodes[FF_WMA3_HUFF_SCALE_SIZE] = {
+    0xE639, 0xE6C2, 0xE6C1, 0xE6C0, 0xE63F, 0xE63E, 0xE63D, 0xE63C,
+    0xE63B, 0xE63A, 0xE638, 0xE637, 0xE636, 0xE635, 0xE634, 0xE632,
+    0xE633, 0xE620, 0x737B, 0xE610, 0xE611, 0xE612, 0xE613, 0xE614,
+    0xE615, 0xE616, 0xE617, 0xE618, 0xE619, 0xE61A, 0xE61B, 0xE61C,
+    0xE61D, 0xE61E, 0xE61F, 0xE6C3, 0xE621, 0xE622, 0xE623, 0xE624,
+    0xE625, 0xE626, 0xE627, 0xE628, 0xE629, 0xE62A, 0xE62B, 0xE62C,
+    0xE62D, 0xE62E, 0xE62F, 0xE630, 0xE631, 0x1CDF, 0x0E60, 0x0399,
+    0x00E7, 0x001D, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0006,
+    0x0002, 0x0007, 0x0006, 0x000F, 0x0038, 0x0072, 0x039A, 0xE6C4,
+    0xE6C5, 0xE6C6, 0xE6C7, 0xE6C8, 0xE6C9, 0xE6CA, 0xE6CB, 0xE6CC,
+    0xE6CD, 0xE6CE, 0xE6CF, 0xE6D0, 0xE6D1, 0xE6D2, 0xE6D3, 0xE6D4,
+    0xE6D5, 0xE6D6, 0xE6D7, 0xE6D8, 0xE6D9, 0xE6DA, 0xE6DB, 0xE6DC,
+    0xE6DD, 0xE6DE, 0xE6DF, 0xE6E0, 0xE6E1, 0xE6E2, 0xE6E3, 0xE6E4,
+    0xE6E5, 0xE6E6, 0xE6E7, 0xE6E8, 0xE6E9, 0xE6EA, 0xE6EB, 0xE6EC,
+    0xE6ED, 0xE6EE, 0xE6EF, 0xE6F0, 0xE6F1, 0xE6F2, 0xE6F3, 0xE6F4,
+    0xE6F5,
 };
 
 static const uint8_t ff_wma3_scale_huffbits[FF_WMA3_HUFF_SCALE_SIZE] = {
@@ -415,7 +415,7 @@ static const uint8_t ff_wma3_coef1_level
  */
 #define FF_WMA3_HUFF_VEC4_SIZE 127
 #define FF_WMA3_HUFF_VEC4_MAXBITS 14
-static const uint32_t ff_wma3_vec4_huffcodes[FF_WMA3_HUFF_VEC4_SIZE] = {
+static const uint16_t ff_wma3_vec4_huffcodes[FF_WMA3_HUFF_VEC4_SIZE] = {
     0x0019, 0x0027, 0x00F2, 0x03BA, 0x0930, 0x1267, 0x0031, 0x0030,
     0x0097, 0x0221, 0x058B, 0x0124, 0x00EB, 0x01D4, 0x03D8, 0x0584,
     0x0364, 0x045F, 0x0F66, 0x0931, 0x24CD, 0x002F, 0x0039, 0x00E8,
@@ -456,7 +456,7 @@ static const uint8_t ff_wma3_vec4_huffbi
 
 #define FF_WMA3_HUFF_VEC2_SIZE 137
 #define FF_WMA3_HUFF_VEC2_MAXBITS 12
-static const uint32_t ff_wma3_vec2_huffcodes[FF_WMA3_HUFF_VEC2_SIZE] = {
+static const uint16_t ff_wma3_vec2_huffcodes[FF_WMA3_HUFF_VEC2_SIZE] = {
     0x055, 0x01C, 0x01A, 0x02B, 0x028, 0x067, 0x08B, 0x039,
     0x170, 0x10D, 0x2A5, 0x047, 0x464, 0x697, 0x523, 0x8CB,
     0x01B, 0x00E, 0x000, 0x010, 0x012, 0x036, 0x048, 0x04C,
@@ -501,7 +501,7 @@ static const uint8_t ff_wma3_vec2_huffbi
 
 #define FF_WMA3_HUFF_VEC1_SIZE 101
 #define FF_WMA3_HUFF_VEC1_MAXBITS 11
-static const uint32_t ff_wma3_vec1_huffcodes[FF_WMA3_HUFF_VEC1_SIZE] = {
+static const uint16_t ff_wma3_vec1_huffcodes[FF_WMA3_HUFF_VEC1_SIZE] = {
     0x01A, 0x003, 0x017, 0x010, 0x00C, 0x009, 0x005, 0x000,
     0x00D, 0x00A, 0x009, 0x00C, 0x00F, 0x002, 0x004, 0x007,
     0x00B, 0x00F, 0x01C, 0x006, 0x010, 0x015, 0x01C, 0x022,

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Thu Jun 11 14:48:31 2009	(r4420)
+++ wmapro/wma3dec.c	Thu Jun 11 15:15:07 2009	(r4421)
@@ -267,7 +267,7 @@ static av_cold int wma_decode_init(AVCod
 
     INIT_VLC_STATIC(&sf_vlc, SCALEVLCBITS, FF_WMA3_HUFF_SCALE_SIZE,
                  ff_wma3_scale_huffbits, 1, 1,
-                 ff_wma3_scale_huffcodes, 4, 4, 616);
+                 ff_wma3_scale_huffcodes, 2, 2, 616);
 
     INIT_VLC_STATIC(&sf_rl_vlc, VLCBITS, FF_WMA3_HUFF_SCALE_RL_SIZE,
                  ff_wma3_scale_rl_huffbits, 1, 1,
@@ -287,15 +287,15 @@ static av_cold int wma_decode_init(AVCod
 
     INIT_VLC_STATIC(&vec4_vlc, VLCBITS, FF_WMA3_HUFF_VEC4_SIZE,
                  ff_wma3_vec4_huffbits, 1, 1,
-                 ff_wma3_vec4_huffcodes, 4, 4, 604);
+                 ff_wma3_vec4_huffcodes, 2, 2, 604);
 
     INIT_VLC_STATIC(&vec2_vlc, VLCBITS, FF_WMA3_HUFF_VEC2_SIZE,
                  ff_wma3_vec2_huffbits, 1, 1,
-                 ff_wma3_vec2_huffcodes, 4, 4, 562);
+                 ff_wma3_vec2_huffcodes, 2, 2, 562);
 
     INIT_VLC_STATIC(&vec1_vlc, VLCBITS, FF_WMA3_HUFF_VEC1_SIZE,
                  ff_wma3_vec1_huffbits, 1, 1,
-                 ff_wma3_vec1_huffcodes, 4, 4, 562);
+                 ff_wma3_vec1_huffcodes, 2, 2, 562);
 
     s->num_sfb = av_mallocz(sizeof(int8_t)*s->num_possible_block_sizes);
     s->sfb_offsets = av_mallocz(MAX_BANDS *


More information about the FFmpeg-soc mailing list