summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2012-05-20 02:31:24 -0400
committerMichael Giacomelli <giac2000@hotmail.com>2012-05-20 02:31:24 -0400
commitdd61978070a769b7bf6baee630be27f9f04bffc5 (patch)
treed7e8dbdba256449e93efa5a9240f7f883d57a1ac
parentb154e511681e040ee34c79a67221a2910ee623aa (diff)
downloadrockbox-dd61978070a769b7bf6baee630be27f9f04bffc5.tar.gz
rockbox-dd61978070a769b7bf6baee630be27f9f04bffc5.zip
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
-rwxr-xr-x[-rw-r--r--]lib/rbcodec/codecs/libwmapro/quant.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/rbcodec/codecs/libwmapro/quant.h b/lib/rbcodec/codecs/libwmapro/quant.h
index 3500615fde..8ec74597f4 100644..100755
--- a/lib/rbcodec/codecs/libwmapro/quant.h
+++ b/lib/rbcodec/codecs/libwmapro/quant.h
@@ -8,8 +8,21 @@
8 * floating point value is : 8 * floating point value is :
9 * quant = pow(10.0, exp/20) 9 * quant = pow(10.0, exp/20)
10 * 'exp' is an integer value which I have exmerimentally found to fall in the 10 * 'exp' is an integer value which I have exmerimentally found to fall in the
11 * range (50,170). */ 11 * range (0,170). */
12const int32_t quant_tab[121] = { 12const int32_t quant_tab[171] = {
13 0x00000001, 0x00000001,
14 0x00000001, 0x00000001, 0x00000002, 0x00000002,
15 0x00000002, 0x00000002, 0x00000003, 0x00000003,
16 0x00000003, 0x00000004, 0x00000004, 0x00000004,
17 0x00000005, 0x00000006, 0x00000006, 0x00000007,
18 0x00000008, 0x00000009, 0x0000000a, 0x0000000b,
19 0x0000000d, 0x0000000e, 0x00000010, 0x00000012,
20 0x00000014, 0x00000016, 0x00000019, 0x0000001c,
21 0x00000020, 0x00000023, 0x00000028, 0x0000002d,
22 0x00000032, 0x00000038, 0x0000003f, 0x00000047,
23 0x0000004f, 0x00000059, 0x00000064, 0x00000070,
24 0x0000007e, 0x0000008d, 0x0000009e, 0x000000b2,
25 0x000000c8, 0x000000e0, 0x000000fb, 0x0000011a,
13 0x0000013C, 0x00000163, 0x0000018E, 0x000001BF, 26 0x0000013C, 0x00000163, 0x0000018E, 0x000001BF,
14 0x000001F5, 0x00000232, 0x00000277, 0x000002C4, 27 0x000001F5, 0x00000232, 0x00000277, 0x000002C4,
15 0x0000031A, 0x0000037B, 0x000003E8, 0x00000462, 28 0x0000031A, 0x0000037B, 0x000003E8, 0x00000462,
@@ -43,7 +56,7 @@ const int32_t quant_tab[121] = {
43 0x12D940B6 56 0x12D940B6
44}; 57};
45 58
46#define EXP_MIN 50 59#define EXP_MIN 0
47#define EXP_MAX 170 60#define EXP_MAX 170
48 61
49/* return the correct value of quant based on exp */ 62/* return the correct value of quant based on exp */