summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorMohamed Tarek <mt@rockbox.org>2010-07-17 09:13:55 +0000
committerMohamed Tarek <mt@rockbox.org>2010-07-17 09:13:55 +0000
commit56161967c64656574f601721c1f91eaec11dd7fe (patch)
tree90b89eccc697ed85e421610fdc2e444efecc8999 /apps/codecs
parent331460c1f520ccc9c2e29fc1c2f228d737c148fa (diff)
downloadrockbox-56161967c64656574f601721c1f91eaec11dd7fe.zip
rockbox-56161967c64656574f601721c1f91eaec11dd7fe.tar.gz
rockbox-56161967c64656574f601721c1f91eaec11dd7fe.tar.bz2
rockbox-56161967c64656574f601721c1f91eaec11dd7fe.tar.xz
Increase the size of quant table in libwmapro to accomodate more values for exp. Fixes wma pro failure on test files in download.rockbox.org/test_files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27460 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/libwmapro/quant.h16
-rw-r--r--apps/codecs/libwmapro/wmaprodec.c2
2 files changed, 13 insertions, 5 deletions
diff --git a/apps/codecs/libwmapro/quant.h b/apps/codecs/libwmapro/quant.h
index dba2d07..d20b2f5 100644
--- a/apps/codecs/libwmapro/quant.h
+++ b/apps/codecs/libwmapro/quant.h
@@ -8,8 +8,8 @@
* 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,139). */
-const int32_t quant_tab[90] = {
+ * range (50,170). */
+const int32_t quant_tab[121] = {
0x0000013C, 0x00000163, 0x0000018E, 0x000001BF,
0x000001F5, 0x00000232, 0x00000277, 0x000002C4,
0x0000031A, 0x0000037B, 0x000003E8, 0x00000462,
@@ -32,11 +32,19 @@ const int32_t quant_tab[90] = {
0x001E71FE, 0x00222901, 0x0026540E, 0x002B014F,
0x003040A6, 0x003623E6, 0x003CBF10, 0x00442894,
0x004C79A0, 0x0055CE75, 0x006046C5, 0x006C0622,
- 0x00793472, 0x0087FE7D,
+ 0x00793472, 0x0087FE7D, 0x00989680, 0x00AB34D9,
+ 0x00C018C6, 0x00D7893F, 0x00F1D5E4, 0x010F580A,
+ 0x013073F0, 0x01559A0C, 0x017F4890, 0x01AE0D16,
+ 0x01E28678, 0x021D66FC, 0x025F769C, 0x02A995C8,
+ 0x02FCC044, 0x035A1094, 0x03C2C3B8, 0x04383D50,
+ 0x04BC0C78, 0x054FF0E8, 0x05F5E100, 0x06B01078,
+ 0x0780F7C0, 0x086B5C80, 0x09725AE0, 0x0A997060,
+ 0x0BE48750, 0x0D580470, 0x0EF8D5A0, 0x10CC82E0,
+ 0x12D940C0,
};
#define EXP_MIN 50
-#define EXP_MAX 139
+#define EXP_MAX 170
/* return the correct value of quant based on exp */
#define QUANT(exp) quant_tab[exp - EXP_MIN]
diff --git a/apps/codecs/libwmapro/wmaprodec.c b/apps/codecs/libwmapro/wmaprodec.c
index 8b2043a..88becb7 100644
--- a/apps/codecs/libwmapro/wmaprodec.c
+++ b/apps/codecs/libwmapro/wmaprodec.c
@@ -1249,7 +1249,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
s->channel[c].scale_factor_step;
if(exp < EXP_MIN || exp > EXP_MAX) {
- DEBUGF("in wmaprodec.c : unhandled value for exp, please report sample.\n");
+ DEBUGF("in wmaprodec.c : unhandled value for exp (%d), please report sample.\n", exp);
return -1;
}
const int32_t quant = QUANT(exp);