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

faust3 subversion at mplayerhq.hu
Sat Jan 17 13:55:52 CET 2009


Author: faust3
Date: Sat Jan 17 13:55:52 2009
New Revision: 3970

Log:
moved scale factor run length level and run tables next to the huffman tables and renamed them to ff_wma3_scale_rl_level / run

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

Modified: wmapro/wma3data.h
==============================================================================
--- wmapro/wma3data.h	Sat Jan 17 13:46:01 2009	(r3969)
+++ wmapro/wma3data.h	Sat Jan 17 13:55:52 2009	(r3970)
@@ -118,6 +118,27 @@ static const uint8_t ff_wma3_scale_rl_hu
 };
 
 
+static const uint8_t ff_wma3_scale_rl_run[] = {
+     0,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,
+    18, 19, 20, 21, 22, 23, 24,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11,
+    12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,  0,  1,  2,  3,  4,  5,
+     6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+     0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+    19, 20, 21, 22, 23, 24,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10,  0,  1,
+     0,  1,  0,  1,
+};
+
+static const uint8_t ff_wma3_scale_rl_level[] = {
+     1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,
+     2,  2,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,
+     3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  4,  4,  4,  4,  4,  4,
+     4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,
+     5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,
+     5,  5,  5,  5,  5,  5,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  7,  7,
+     8,  8,  9,  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+};
+
+
 #define FF_WMA3_COEF0_SIZE 244
 #define FF_WMA3_COEF0_MAXBITS 22
 static const uint32_t ff_wma3_coef0_huffcodes[FF_WMA3_COEF0_SIZE] = {
@@ -521,27 +542,6 @@ static const uint8_t ff_wma3_level_1[] =
 };
 
 
-static const uint8_t ff_wma3_run_mask[] = {
-     0,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,
-    18, 19, 20, 21, 22, 23, 24,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11,
-    12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,  0,  1,  2,  3,  4,  5,
-     6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
-     0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
-    19, 20, 21, 22, 23, 24,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10,  0,  1,
-     0,  1,  0,  1,
-};
-
-static const uint8_t ff_wma3_level_mask[] = {
-     1,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,
-     2,  2,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,
-     3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  4,  4,  4,  4,  4,  4,
-     4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,
-     5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,
-     5,  5,  5,  5,  5,  5,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  7,  7,
-     8,  8,  9,  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-};
-
-
 static const float ff_wma3_default_decorrelation_matrices[] = {
     1.000000,  0.707031, -0.707031,  0.707031,  0.707031,  0.578125,  0.707031,
     0.410156,  0.578125, -0.707031,  0.410156,  0.578125,  0.000000, -0.816406,

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	Sat Jan 17 13:46:01 2009	(r3969)
+++ wmapro/wma3dec.c	Sat Jan 17 13:55:52 2009	(r3970)
@@ -914,8 +914,8 @@ static int wma_decode_scale_factors(WMA3
                     }else if(idx == 1){
                         break;
                     }else{
-                        skip = ff_wma3_run_mask[idx-2];
-                        level_mask = ff_wma3_level_mask[idx-2];
+                        skip = ff_wma3_scale_rl_run[idx-2];
+                        level_mask = ff_wma3_scale_rl_level[idx-2];
                         val = get_bits(gb,1)-1;
                     }
 



More information about the FFmpeg-soc mailing list