summaryrefslogtreecommitdiff
path: root/lib
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 /lib
parentb154e511681e040ee34c79a67221a2910ee623aa (diff)
downloadrockbox-dd61978070a769b7bf6baee630be27f9f04bffc5.zip
rockbox-dd61978070a769b7bf6baee630be27f9f04bffc5.tar.gz
rockbox-dd61978070a769b7bf6baee630be27f9f04bffc5.tar.bz2
rockbox-dd61978070a769b7bf6baee630be27f9f04bffc5.tar.xz
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
Diffstat (limited to 'lib')
-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 3500615..8ec7459 100644..100755
--- a/lib/rbcodec/codecs/libwmapro/quant.h
+++ b/lib/rbcodec/codecs/libwmapro/quant.h
@@ -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 */