summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/codecs/libwma/wmadata.h5
-rw-r--r--apps/codecs/libwma/wmadeci.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/codecs/libwma/wmadata.h b/apps/codecs/libwma/wmadata.h
index cef945914a..63f922b6d6 100644
--- a/apps/codecs/libwma/wmadata.h
+++ b/apps/codecs/libwma/wmadata.h
@@ -1456,8 +1456,13 @@ const fixed64 pow_table[] =
1456 0x14f2e7a000000LL,0x1781474000000LL,0x1a5f7f4000000LL,0x1d974de000000LL,0x2133a18000000LL 1456 0x14f2e7a000000LL,0x1781474000000LL,0x1a5f7f4000000LL,0x1d974de000000LL,0x2133a18000000LL
1457 }; 1457 };
1458 1458
1459/*10^(index/16). We'll need to accomidate negative indicies too*/
1459const fixed32 pow_10_to_yover16[] ICONST_ATTR= 1460const fixed32 pow_10_to_yover16[] ICONST_ATTR=
1460{ 1461{
1462 /*16 negative indicies (-16 to -1)*/
14630x199a,0x1d90,0x2223,0x276c,0x2d86,0x3492,0x3cb5,0x461b,0x50f4,0x5d7c,0x6bf4,0x7caa,0x8ff6,0xa63e,
14640xbff9, 0xddb0,
1465 /*non-negative indicies*/
14610x10000,0x127a0,0x15562,0x18a39,0x1c73d,0x20db4,0x25f12,0x2bd09,0x3298b,0x3a6d9,0x4378b,0x4dea3, 14660x10000,0x127a0,0x15562,0x18a39,0x1c73d,0x20db4,0x25f12,0x2bd09,0x3298b,0x3a6d9,0x4378b,0x4dea3,
14620x59f98,0x67e6b,0x77fbb,0x8a8de,0xa0000,0xb8c3e,0xd55d1,0xf6636,0x11c865,0x148906,0x17b6b8,0x1b625b, 14670x59f98,0x67e6b,0x77fbb,0x8a8de,0xa0000,0xb8c3e,0xd55d1,0xf6636,0x11c865,0x148906,0x17b6b8,0x1b625b,
14630x1f9f6e,0x248475,0x2a2b6e,0x30b25f,0x383bf0,0x40f02c,0x4afd4b,0x5698b0,0x640000,0x737a6b,0x855a26, 14680x1f9f6e,0x248475,0x2a2b6e,0x30b25f,0x383bf0,0x40f02c,0x4afd4b,0x5698b0,0x640000,0x737a6b,0x855a26,
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index 3b81669d8f..8aa3620960 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -1110,6 +1110,9 @@ static int decode_exp_vlc(WMADecodeContext *s, int ch)
1110 fixed32 v, max_scale; 1110 fixed32 v, max_scale;
1111 fixed32 *q,*q_end; 1111 fixed32 *q,*q_end;
1112 1112
1113 /*accommodate the 16 negative indices */
1114 fixed32 *pow_10_to_yover16_ptr = &pow_10_to_yover16[16];
1115
1113 band_ptr = s->exponent_bands[s->frame_len_bits - s->block_len_bits]; 1116 band_ptr = s->exponent_bands[s->frame_len_bits - s->block_len_bits];
1114 ptr = band_ptr; 1117 ptr = band_ptr;
1115 q = s->exponents[ch]; 1118 q = s->exponents[ch];
@@ -1142,7 +1145,7 @@ static int decode_exp_vlc(WMADecodeContext *s, int ch)
1142 /* NOTE: this offset is the same as MPEG4 AAC ! */ 1145 /* NOTE: this offset is the same as MPEG4 AAC ! */
1143 last_exp += code - 60; 1146 last_exp += code - 60;
1144 /* XXX: use a table */ 1147 /* XXX: use a table */
1145 v = pow_10_to_yover16[last_exp]; 1148 v = pow_10_to_yover16_ptr[last_exp];
1146 if (v > max_scale) 1149 if (v > max_scale)
1147 { 1150 {
1148 max_scale = v; 1151 max_scale = v;