Expand the range of the inverse quant table in WMA Pro.

Several of the problem samples on the tracker use values outside this
range.  Trying the larger table doesn't quite seem to fix things, but
its only a small amount of additional memory and looking at ffmpeg,
I think the larger table is correct.

Change-Id: Id046e62b68550701aa1f80c9abd0a1dcd711bd0d
This commit is contained in:
Michael Giacomelli 2012-05-20 02:31:24 -04:00
parent b154e51168
commit dd61978070

19
lib/rbcodec/codecs/libwmapro/quant.h Normal file → Executable file
View file

@ -8,8 +8,21 @@
* floating point value is :
* quant = pow(10.0, exp/20)
* 'exp' is an integer value which I have exmerimentally found to fall in the
* range (50,170). */
const int32_t quant_tab[121] = {
* range (0,170). */
const int32_t quant_tab[171] = {
0x00000001, 0x00000001,
0x00000001, 0x00000001, 0x00000002, 0x00000002,
0x00000002, 0x00000002, 0x00000003, 0x00000003,
0x00000003, 0x00000004, 0x00000004, 0x00000004,
0x00000005, 0x00000006, 0x00000006, 0x00000007,
0x00000008, 0x00000009, 0x0000000a, 0x0000000b,
0x0000000d, 0x0000000e, 0x00000010, 0x00000012,
0x00000014, 0x00000016, 0x00000019, 0x0000001c,
0x00000020, 0x00000023, 0x00000028, 0x0000002d,
0x00000032, 0x00000038, 0x0000003f, 0x00000047,
0x0000004f, 0x00000059, 0x00000064, 0x00000070,
0x0000007e, 0x0000008d, 0x0000009e, 0x000000b2,
0x000000c8, 0x000000e0, 0x000000fb, 0x0000011a,
0x0000013C, 0x00000163, 0x0000018E, 0x000001BF,
0x000001F5, 0x00000232, 0x00000277, 0x000002C4,
0x0000031A, 0x0000037B, 0x000003E8, 0x00000462,
@ -43,7 +56,7 @@ const int32_t quant_tab[121] = {
0x12D940B6
};
#define EXP_MIN 50
#define EXP_MIN 0
#define EXP_MAX 170
/* return the correct value of quant based on exp */