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

faust3 subversion at mplayerhq.hu
Sat Jan 17 14:19:08 CET 2009


Author: faust3
Date: Sat Jan 17 14:19:07 2009
New Revision: 3971

Log:
renamed FF_WMA3_COEF0_SIZE/MAXBITS to FF_WMA_HUFF_COEF0_SIZE/MAXBITS and avoid negation during the table selection

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

Modified: wmapro/wma3data.h
==============================================================================
--- wmapro/wma3data.h	Sat Jan 17 13:55:52 2009	(r3970)
+++ wmapro/wma3data.h	Sat Jan 17 14:19:07 2009	(r3971)
@@ -139,9 +139,9 @@ static const uint8_t ff_wma3_scale_rl_le
 };
 
 
-#define FF_WMA3_COEF0_SIZE 244
-#define FF_WMA3_COEF0_MAXBITS 22
-static const uint32_t ff_wma3_coef0_huffcodes[FF_WMA3_COEF0_SIZE] = {
+#define FF_WMA3_HUFF_COEF0_SIZE 244
+#define FF_WMA3_HUFF_COEF0_MAXBITS 22
+static const uint32_t ff_wma3_coef0_huffcodes[FF_WMA3_HUFF_COEF0_SIZE] = {
     0x0001E2, 0x00007F, 0x000000, 0x000002, 0x000008, 0x00000E, 0x000019,
     0x00002F, 0x000037, 0x000060, 0x00006C, 0x000095, 0x0000C6, 0x0000F0,
     0x00012E, 0x000189, 0x0001A5, 0x0001F8, 0x000253, 0x00030A, 0x000344,
@@ -179,7 +179,7 @@ static const uint32_t ff_wma3_coef0_huff
     0x175AC0, 0x005D61, 0x3F3C05, 0x006130, 0x3F3C04, 0x0062B5,
 };
 
-static const uint8_t ff_wma3_coef0_huffbits[FF_WMA3_COEF0_SIZE] = {
+static const uint8_t ff_wma3_coef0_huffbits[FF_WMA3_HUFF_COEF0_SIZE] = {
      9,  7,  2,  3,  4,  4,  5,
      6,  6,  7,  7,  8,  8,  8,
      9,  9,  9,  9, 10, 10, 10,
@@ -218,9 +218,9 @@ static const uint8_t ff_wma3_coef0_huffb
 };
 
 
-#define FF_WMA3_COEF1_SIZE 272
-#define FF_WMA3_COEF1_MAXBITS 21
-static const uint32_t ff_wma3_coef1_huffcodes[FF_WMA3_COEF1_SIZE] = {
+#define FF_WMA3_HUFF_COEF1_SIZE 272
+#define FF_WMA3_HUFF_COEF1_MAXBITS 21
+static const uint32_t ff_wma3_coef1_huffcodes[FF_WMA3_HUFF_COEF1_SIZE] = {
     0x00004A, 0x00002B, 0x000000, 0x000003, 0x000006, 0x000009, 0x00000F,
     0x000010, 0x000016, 0x000011, 0x000016, 0x000028, 0x00002F, 0x000026,
     0x000029, 0x000045, 0x000055, 0x00005D, 0x000042, 0x00004E, 0x000051,
@@ -262,7 +262,7 @@ static const uint32_t ff_wma3_coef1_huff
     0x087448, 0x0047E4, 0x043A20, 0x00542A, 0x087449, 0x00898C,
 };
 
-static const uint8_t ff_wma3_coef1_huffbits[FF_WMA3_COEF1_SIZE] = {
+static const uint8_t ff_wma3_coef1_huffbits[FF_WMA3_HUFF_COEF1_SIZE] = {
      8,  7,  2,  3,  3,  4,  4,
      5,  5,  6,  6,  6,  6,  7,
      7,  7,  7,  7,  8,  8,  8,

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat Jan 17 13:55:52 2009	(r3970)
+++ wmapro/wma3dec.c	Sat Jan 17 14:19:07 2009	(r3971)
@@ -221,17 +221,17 @@ static av_cold int wma3_decode_init(AVCo
                  ff_wma3_scale_rl_huffcodes, 4, 4, 0);
 
 
-    init_vlc(&s->coef_vlc[0], VLCBITS, FF_WMA3_COEF0_SIZE,
+    init_vlc(&s->coef_vlc[1], VLCBITS, FF_WMA3_HUFF_COEF0_SIZE,
                  ff_wma3_coef0_huffbits, 1, 1,
                  ff_wma3_coef0_huffcodes, 4, 4, 0);
 
-    s->coef_max[0] = ((22+VLCBITS-1)/VLCBITS);
+    s->coef_max[1] = ((FF_WMA3_HUFF_COEF0_MAXBITS+VLCBITS-1)/VLCBITS);
 
-    init_vlc(&s->coef_vlc[1], VLCBITS, FF_WMA3_COEF1_SIZE,
+    init_vlc(&s->coef_vlc[0], VLCBITS, FF_WMA3_HUFF_COEF1_SIZE,
                  ff_wma3_coef1_huffbits, 1, 1,
                  ff_wma3_coef1_huffcodes, 4, 4, 0);
 
-    s->coef_max[1] = ((21+VLCBITS-1)/VLCBITS);
+    s->coef_max[0] = ((FF_WMA3_HUFF_COEF1_MAXBITS+VLCBITS-1)/VLCBITS);
 
     init_vlc(&s->vec4_vlc, VLCBITS, FF_WMA3_HUFF_VEC4_SIZE,
                  ff_wma3_vec4_huffbits, 1, 1,
@@ -782,8 +782,8 @@ static int decode_coeffs(WMA3DecodeConte
     s->getbit = gb;
     s->esc_len = av_log2(s->subframe_len -1) +1;
     vlctable = get_bits(s->getbit, 1);
-    vlc = &s->coef_vlc[!vlctable];
-    vlcmax = s->coef_max[!vlctable];
+    vlc = &s->coef_vlc[vlctable];
+    vlcmax = s->coef_max[vlctable];
 
     if(!vlctable){
         run =  ff_wma3_run_1;



More information about the FFmpeg-soc mailing list