summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/libwma/wmadeci.c26
-rw-r--r--apps/plugins/SOURCES1
2 files changed, 10 insertions, 17 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index cd01c030c8..f018cfbc53 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -630,16 +630,7 @@ void ff_imdct_calc(MDCTContext *s,
630 in2 -= 2; 630 in2 -= 2;
631 } 631 }
632 632
633 for(k = 0; k < n4; k++){
634 z[k].re >>=1;
635 z[k].im >>=1;
636 }
637
638 //rb->splash(HZ, "in MDCT calc");
639 scale = fft_calc_unscaled(&s->fft, z); 633 scale = fft_calc_unscaled(&s->fft, z);
640 // scale = fft_calc(&s->fft, z);
641
642 //rb->splash(HZ, "in MDCT calc2");
643 634
644 /* post rotation + reordering */ 635 /* post rotation + reordering */
645 636
@@ -1764,8 +1755,7 @@ static int wma_decode_block(WMADecodeContext *s)
1764 { 1755 {
1765 1756
1766 /* XXX: optimize more */ 1757 /* XXX: optimize more */
1767 for(i = 0;i < s->coefs_start; ++i) 1758
1768 *coefs++ = 0; //why do we do this step?!
1769 n = nb_coefs[ch]; 1759 n = nb_coefs[ch];
1770 1760
1771 1761
@@ -1773,15 +1763,17 @@ static int wma_decode_block(WMADecodeContext *s)
1773 1763
1774 for(i = 0;i < n; ++i) 1764 for(i = 0;i < n; ++i)
1775 { 1765 {
1766 /*
1767 * Previously the IMDCT was run in 17.15 precision to avoid overflow. However rare files could
1768 * overflow here as well, so switch to 17.15 now. As a bonus, this saves us a shift later on.
1769 */
1776 1770
1777 atemp = (fixed32)(coefs1[i]*mult>>16);
1778 //atemp= ftofix32(coefs1[i] * fixtof64(exponents[i]) * fixtof64(mult>>16)); //this "works" in the sense that the mdcts converge
1779
1780 //this can still overflow in rare cases
1781 //running a full scale value square wave through here does bad things
1782 1771
1783 *coefs++=fixmul32(atemp,exponents[i<<bsize>>esize]); 1772 atemp = (fixed32)(coefs1[i]*mult>>17);
1773 //this "works" in the sense that the mdcts converge
1774 //atemp= ftofix32(coefs1[i] * fixtof64(exponents[i]) * fixtof64(mult>>16));
1784 1775
1776 *coefs++=fixmul32(atemp,exponents[i<<bsize>>esize]);
1785 1777
1786 } 1778 }
1787 n = s->block_len - s->coefs_end[bsize]; 1779 n = s->block_len - s->coefs_end[bsize];
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 14f4d552d1..807f20f9f8 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -18,6 +18,7 @@ stats.c
18stopwatch.c 18stopwatch.c
19vbrfix.c 19vbrfix.c
20viewer.c 20viewer.c
21test_codec.c
21 22
22/* plugins built for all targets, but not for the simulator */ 23/* plugins built for all targets, but not for the simulator */
23#if !defined(SIMULATOR) 24#if !defined(SIMULATOR)