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

faust3 subversion at mplayerhq.hu
Sat Jan 17 12:48:58 CET 2009


Author: faust3
Date: Sat Jan 17 12:48:58 2009
New Revision: 3964

Log:
renamed huffman tables of the vector coder so that their names contain the vectorsize

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

Modified: wmapro/wma3.h
==============================================================================
--- wmapro/wma3.h	Sat Jan 17 12:03:28 2009	(r3963)
+++ wmapro/wma3.h	Sat Jan 17 12:48:58 2009	(r3964)
@@ -116,9 +116,9 @@ typedef struct WMA3DecodeContext {
     int*              rgiBarkIndex;
 
     VLC              exp_vlc;
-    VLC              huff_0_vlc;
-    VLC              huff_1_vlc;
-    VLC              huff_2_vlc;
+    VLC              vec4_vlc;
+    VLC              vec2_vlc;
+    VLC              vec1_vlc;
     VLC              coef_vlc[2];
     VLC              rlc_vlc;
     int              coef_max[2];

Modified: wmapro/wma3data.h
==============================================================================
--- wmapro/wma3data.h	Sat Jan 17 12:03:28 2009	(r3963)
+++ wmapro/wma3data.h	Sat Jan 17 12:48:58 2009	(r3964)
@@ -239,9 +239,9 @@ static const uint8_t ff_wma3_coef1_huffb
 };
 
 
-#define FF_WMA3_HUFF_0_SIZE 127
-#define FF_WMA3_HUFF_0_MAXBITS 14
-static const uint32_t ff_wma3_huff_0_codes[FF_WMA3_HUFF_0_SIZE] = {
+#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] = {
     0x0019, 0x0027, 0x00F2, 0x03BA, 0x0930, 0x1267, 0x0031, 0x0030,
     0x0097, 0x0221, 0x058B, 0x0124, 0x00EB, 0x01D4, 0x03D8, 0x0584,
     0x0364, 0x045F, 0x0F66, 0x0931, 0x24CD, 0x002F, 0x0039, 0x00E8,
@@ -260,7 +260,7 @@ static const uint32_t ff_wma3_huff_0_cod
     0x03C4, 0x08B8, 0x078B, 0x0755, 0x0581, 0x0F67, 0x0000,
 };
 
-static const uint8_t ff_wma3_huff_0_bits[FF_WMA3_HUFF_0_SIZE] = {
+static const uint8_t ff_wma3_vec4_huffbits[FF_WMA3_HUFF_VEC4_SIZE] = {
      5,  6,  8, 10, 12, 13,  6,  6,
      8, 10, 11,  9,  8,  9, 10, 11,
     10, 11, 12, 12, 14,  6,  6,  8,
@@ -280,9 +280,9 @@ static const uint8_t ff_wma3_huff_0_bits
 };
 
 
-#define FF_WMA3_HUFF_1_SIZE 137
-#define FF_WMA3_HUFF_1_MAXBITS 12
-static const uint32_t ff_wma3_huff_1_codes[FF_WMA3_HUFF_1_SIZE] = {
+#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] = {
     0x055, 0x01C, 0x01A, 0x02B, 0x028, 0x067, 0x08B, 0x039,
     0x170, 0x10D, 0x2A5, 0x047, 0x464, 0x697, 0x523, 0x8CB,
     0x01B, 0x00E, 0x000, 0x010, 0x012, 0x036, 0x048, 0x04C,
@@ -303,7 +303,7 @@ static const uint32_t ff_wma3_huff_1_cod
     0x001,
 };
 
-static const uint8_t ff_wma3_huff_1_bits[FF_WMA3_HUFF_1_SIZE] = {
+static const uint8_t ff_wma3_vec2_huffbits[FF_WMA3_HUFF_VEC2_SIZE] = {
      7,  6,  6,  6,  7,  7,  8,  9,
      9, 10, 10, 11, 11, 11, 12, 12,
      6,  4,  5,  5,  6,  6,  7,  8,
@@ -325,9 +325,9 @@ static const uint8_t ff_wma3_huff_1_bits
 };
 
 
-#define FF_WMA3_HUFF_2_SIZE 101
-#define FF_WMA3_HUFF_2_MAXBITS 11
-static const uint32_t ff_wma3_huff_2_codes[FF_WMA3_HUFF_2_SIZE] = {
+#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] = {
     0x01A, 0x003, 0x017, 0x010, 0x00C, 0x009, 0x005, 0x000,
     0x00D, 0x00A, 0x009, 0x00C, 0x00F, 0x002, 0x004, 0x007,
     0x00B, 0x00F, 0x01C, 0x006, 0x010, 0x015, 0x01C, 0x022,
@@ -343,7 +343,7 @@ static const uint32_t ff_wma3_huff_2_cod
     0x297, 0x355, 0x372, 0x373, 0x016,
 };
 
-static const uint8_t ff_wma3_huff_2_bits[FF_WMA3_HUFF_2_SIZE] = {
+static const uint8_t ff_wma3_vec1_huffbits[FF_WMA3_HUFF_VEC1_SIZE] = {
      7,  6,  5,  5,  5,  5,  5,  5,
      4,  4,  4,  4,  4,  5,  5,  5,
      5,  5,  5,  6,  6,  6,  6,  6,

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat Jan 17 12:03:28 2009	(r3963)
+++ wmapro/wma3dec.c	Sat Jan 17 12:48:58 2009	(r3964)
@@ -112,9 +112,9 @@ static av_cold int wma3_decode_end(AVCod
     free_vlc(&s->exp_vlc);
     free_vlc(&s->coef_vlc[0]);
     free_vlc(&s->coef_vlc[1]);
-    free_vlc(&s->huff_0_vlc);
-    free_vlc(&s->huff_1_vlc);
-    free_vlc(&s->huff_2_vlc);
+    free_vlc(&s->vec4_vlc);
+    free_vlc(&s->vec2_vlc);
+    free_vlc(&s->vec1_vlc);
     free_vlc(&s->rlc_vlc);
 
     for(i=0 ; i<BLOCK_NB_SIZES ; i++)
@@ -228,17 +228,17 @@ static av_cold int wma3_decode_init(AVCo
 
     s->coef_max[1] = ((21+VLCBITS-1)/VLCBITS);
 
-    init_vlc(&s->huff_0_vlc, VLCBITS, FF_WMA3_HUFF_0_SIZE,
-                 ff_wma3_huff_0_bits, 1, 1,
-                 ff_wma3_huff_0_codes, 4, 4, 0);
+    init_vlc(&s->vec4_vlc, VLCBITS, FF_WMA3_HUFF_VEC4_SIZE,
+                 ff_wma3_vec4_huffbits, 1, 1,
+                 ff_wma3_vec4_huffcodes, 4, 4, 0);
 
-    init_vlc(&s->huff_1_vlc, VLCBITS, FF_WMA3_HUFF_1_SIZE,
-                 ff_wma3_huff_1_bits, 1, 1,
-                 ff_wma3_huff_1_codes, 4, 4, 0);
+    init_vlc(&s->vec2_vlc, VLCBITS, FF_WMA3_HUFF_VEC2_SIZE,
+                 ff_wma3_vec2_huffbits, 1, 1,
+                 ff_wma3_vec2_huffcodes, 4, 4, 0);
 
-    init_vlc(&s->huff_2_vlc, VLCBITS, FF_WMA3_HUFF_2_SIZE,
-                 ff_wma3_huff_2_bits, 1, 1,
-                 ff_wma3_huff_2_codes, 4, 4, 0);
+    init_vlc(&s->vec1_vlc, VLCBITS, FF_WMA3_HUFF_VEC1_SIZE,
+                 ff_wma3_vec1_huffbits, 1, 1,
+                 ff_wma3_vec1_huffcodes, 4, 4, 0);
 
     init_vlc(&s->rlc_vlc, VLCBITS, FF_WMA3_HUFF_RLC_SIZE,
                  ff_wma3_huff_rlc_bits, 1, 1,
@@ -725,18 +725,18 @@ static inline void wma_get_vec4(WMA3Deco
         unsigned int idx;
         int i = 0;
         // read 4 values
-        idx = get_vlc2(s->getbit, s->huff_0_vlc.table, VLCBITS, ((FF_WMA3_HUFF_0_MAXBITS+VLCBITS-1)/VLCBITS));
+        idx = get_vlc2(s->getbit, s->vec4_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC4_MAXBITS+VLCBITS-1)/VLCBITS));
 
 
         if ( idx == 126 )
         {
           while(i < 4){
-              idx = get_vlc2(s->getbit, s->huff_1_vlc.table, VLCBITS, ((FF_WMA3_HUFF_1_MAXBITS+VLCBITS-1)/VLCBITS));
+              idx = get_vlc2(s->getbit, s->vec2_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC2_MAXBITS+VLCBITS-1)/VLCBITS));
               if ( idx == 136 ){
-                   vals[i] = get_vlc2(s->getbit, s->huff_2_vlc.table, VLCBITS, ((FF_WMA3_HUFF_2_MAXBITS+VLCBITS-1)/VLCBITS));
+                   vals[i] = get_vlc2(s->getbit, s->vec1_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC1_MAXBITS+VLCBITS-1)/VLCBITS));
                    if(vals[i] == 100)
                        vals[i] += wma_get_large_val(s);
-                   vals[i+1] = get_vlc2(s->getbit, s->huff_2_vlc.table, VLCBITS, ((FF_WMA3_HUFF_2_MAXBITS+VLCBITS-1)/VLCBITS));
+                   vals[i+1] = get_vlc2(s->getbit, s->vec1_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC1_MAXBITS+VLCBITS-1)/VLCBITS));
                    if(vals[i+1] == 100)
                        vals[i+1] += wma_get_large_val(s);
               }else{



More information about the FFmpeg-soc mailing list