summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
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 dba2d071aa..d20b2f58ee 100644
--- a/apps/codecs/libwmapro/quant.h
+++ b/apps/codecs/libwmapro/quant.h
@@ -8,8 +8,8 @@
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,139). */ 11 * range (50,170). */
12const int32_t quant_tab[90] = { 12const int32_t quant_tab[121] = {
13 0x0000013C, 0x00000163, 0x0000018E, 0x000001BF, 13 0x0000013C, 0x00000163, 0x0000018E, 0x000001BF,
14 0x000001F5, 0x00000232, 0x00000277, 0x000002C4, 14 0x000001F5, 0x00000232, 0x00000277, 0x000002C4,
15 0x0000031A, 0x0000037B, 0x000003E8, 0x00000462, 15 0x0000031A, 0x0000037B, 0x000003E8, 0x00000462,
@@ -32,11 +32,19 @@ const int32_t quant_tab[90] = {
32 0x001E71FE, 0x00222901, 0x0026540E, 0x002B014F, 32 0x001E71FE, 0x00222901, 0x0026540E, 0x002B014F,
33 0x003040A6, 0x003623E6, 0x003CBF10, 0x00442894, 33 0x003040A6, 0x003623E6, 0x003CBF10, 0x00442894,
34 0x004C79A0, 0x0055CE75, 0x006046C5, 0x006C0622, 34 0x004C79A0, 0x0055CE75, 0x006046C5, 0x006C0622,
35 0x00793472, 0x0087FE7D, 35 0x00793472, 0x0087FE7D, 0x00989680, 0x00AB34D9,
36 0x00C018C6, 0x00D7893F, 0x00F1D5E4, 0x010F580A,
37 0x013073F0, 0x01559A0C, 0x017F4890, 0x01AE0D16,
38 0x01E28678, 0x021D66FC, 0x025F769C, 0x02A995C8,
39 0x02FCC044, 0x035A1094, 0x03C2C3B8, 0x04383D50,
40 0x04BC0C78, 0x054FF0E8, 0x05F5E100, 0x06B01078,
41 0x0780F7C0, 0x086B5C80, 0x09725AE0, 0x0A997060,
42 0x0BE48750, 0x0D580470, 0x0EF8D5A0, 0x10CC82E0,
43 0x12D940C0,
36}; 44};
37 45
38#define EXP_MIN 50 46#define EXP_MIN 50
39#define EXP_MAX 139 47#define EXP_MAX 170
40 48
41/* return the correct value of quant based on exp */ 49/* return the correct value of quant based on exp */
42#define QUANT(exp) quant_tab[exp - EXP_MIN] 50#define QUANT(exp) quant_tab[exp - EXP_MIN]
diff --git a/apps/codecs/libwmapro/wmaprodec.c b/apps/codecs/libwmapro/wmaprodec.c
index 8b2043a682..88becb7af6 100644
--- a/apps/codecs/libwmapro/wmaprodec.c
+++ b/apps/codecs/libwmapro/wmaprodec.c
@@ -1249,7 +1249,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
1249 s->channel[c].scale_factor_step; 1249 s->channel[c].scale_factor_step;
1250 1250
1251 if(exp < EXP_MIN || exp > EXP_MAX) { 1251 if(exp < EXP_MIN || exp > EXP_MAX) {
1252 DEBUGF("in wmaprodec.c : unhandled value for exp, please report sample.\n"); 1252 DEBUGF("in wmaprodec.c : unhandled value for exp (%d), please report sample.\n", exp);
1253 return -1; 1253 return -1;
1254 } 1254 }
1255 const int32_t quant = QUANT(exp); 1255 const int32_t quant = QUANT(exp);