[soc]: r3970 - in wmapro: wma3data.h wma3dec.c
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; }
On Sat, Jan 17, 2009 at 01:55:52PM +0100, faust3 wrote:
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
Could you please stop using the -m switch for commit messages and write them in an editor instead? This will result in better commit messages and less ugly long lines. Diego
Hi, On Montag, 19. Januar 2009, Diego Biurrun wrote:
On Sat, Jan 17, 2009 at 01:55:52PM +0100, faust3 wrote:
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
Could you please stop using the -m switch for commit messages and write them in an editor instead?
This will result in better commit messages and less ugly long lines.
I'll try to keep them shorter next time. Regards Sascha
On Sat, Jan 24, 2009 at 06:48:46PM +0100, Sascha Sommer wrote:
On Montag, 19. Januar 2009, Diego Biurrun wrote:
On Sat, Jan 17, 2009 at 01:55:52PM +0100, faust3 wrote:
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
Could you please stop using the -m switch for commit messages and write them in an editor instead?
This will result in better commit messages and less ugly long lines.
I'll try to keep them shorter next time.
Thanks. Diego
participants (3)
-
Diego Biurrun -
faust3 -
Sascha Sommer