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

faust3 subversion at mplayerhq.hu
Sat Jan 17 13:46:01 CET 2009


Author: faust3
Date: Sat Jan 17 13:46:01 2009
New Revision: 3969

Log:
renamed rlc_vlc to sf_rl_vlc and moved the init uninit next to sf_vlc

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

Modified: wmapro/wma3.h
==============================================================================
--- wmapro/wma3.h	Sat Jan 17 13:25:33 2009	(r3968)
+++ wmapro/wma3.h	Sat Jan 17 13:46:01 2009	(r3969)
@@ -119,7 +119,7 @@ typedef struct WMA3DecodeContext {
     VLC              vec2_vlc;
     VLC              vec1_vlc;
     VLC              coef_vlc[2];
-    VLC              rlc_vlc;
+    VLC              sf_rl_vlc;
     int              coef_max[2];
 
     int              parsed_all_subframes;

Modified: wmapro/wma3data.h
==============================================================================
--- wmapro/wma3data.h	Sat Jan 17 13:25:33 2009	(r3968)
+++ wmapro/wma3data.h	Sat Jan 17 13:46:01 2009	(r3969)
@@ -73,9 +73,9 @@ static const uint8_t ff_wma3_scale_huffb
 };
 
 
-#define FF_WMA3_HUFF_RLC_SIZE 120
-#define FF_WMA3_HUFF_RLC_MAXBITS 21
-static const uint32_t ff_wma3_huff_rlc_codes[FF_WMA3_HUFF_RLC_SIZE] = {
+#define FF_WMA3_HUFF_SCALE_RL_SIZE 120
+#define FF_WMA3_HUFF_SCALE_RL_MAXBITS 21
+static const uint32_t ff_wma3_scale_rl_huffcodes[FF_WMA3_HUFF_SCALE_RL_SIZE] = {
     0x00010C, 0x000001, 0x10FE2A, 0x000003, 0x000003, 0x000001, 0x000013,
     0x000020, 0x000029, 0x000014, 0x000016, 0x000045, 0x000049, 0x00002F,
     0x000042, 0x00008E, 0x00008F, 0x000129, 0x000009, 0x00000D, 0x0004AC,
@@ -96,7 +96,7 @@ static const uint32_t ff_wma3_huff_rlc_c
     0x0002B1,
 };
 
-static const uint8_t ff_wma3_huff_rlc_bits[FF_WMA3_HUFF_RLC_SIZE] = {
+static const uint8_t ff_wma3_scale_rl_huffbits[FF_WMA3_HUFF_SCALE_RL_SIZE] = {
      9,  2, 21,  2,  4,  5,  5,
      6,  6,  7,  7,  7,  7,  6,
      7,  8,  8,  9, 10, 10, 11,

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat Jan 17 13:25:33 2009	(r3968)
+++ wmapro/wma3dec.c	Sat Jan 17 13:46:01 2009	(r3969)
@@ -110,12 +110,12 @@ static av_cold int wma3_decode_end(AVCod
     }
 
     free_vlc(&s->sf_vlc);
+    free_vlc(&s->sf_rl_vlc);
     free_vlc(&s->coef_vlc[0]);
     free_vlc(&s->coef_vlc[1]);
     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++)
         ff_mdct_end(&s->mdct_ctx[i]);
@@ -216,6 +216,11 @@ static av_cold int wma3_decode_init(AVCo
                  ff_wma3_scale_huffbits, 1, 1,
                  ff_wma3_scale_huffcodes, 4, 4, 0);
 
+    init_vlc(&s->sf_rl_vlc, VLCBITS, FF_WMA3_HUFF_SCALE_RL_SIZE,
+                 ff_wma3_scale_rl_huffbits, 1, 1,
+                 ff_wma3_scale_rl_huffcodes, 4, 4, 0);
+
+
     init_vlc(&s->coef_vlc[0], VLCBITS, FF_WMA3_COEF0_SIZE,
                  ff_wma3_coef0_huffbits, 1, 1,
                  ff_wma3_coef0_huffcodes, 4, 4, 0);
@@ -240,10 +245,6 @@ static av_cold int wma3_decode_init(AVCo
                  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,
-                 ff_wma3_huff_rlc_codes, 4, 4, 0);
-
     s->num_sfb = av_mallocz(sizeof(int)*s->num_possible_block_sizes);
     s->sfb_offsets = av_mallocz(MAX_BANDS * sizeof(int) *s->num_possible_block_sizes);
     s->subwoofer_cutoffs = av_mallocz(sizeof(int)*s->num_possible_block_sizes);
@@ -903,7 +904,7 @@ static int wma_decode_scale_factors(WMA3
                     short level_mask;
                     short val;
 
-                    idx = get_vlc2(gb, s->rlc_vlc.table, VLCBITS, ((FF_WMA3_HUFF_RLC_MAXBITS+VLCBITS-1)/VLCBITS));
+                    idx = get_vlc2(gb, s->sf_rl_vlc.table, VLCBITS, ((FF_WMA3_HUFF_SCALE_RL_MAXBITS+VLCBITS-1)/VLCBITS));
 
                     if( !idx ){
                         uint32_t mask = get_bits(gb,14);



More information about the FFmpeg-soc mailing list