From d909eee0cecb8645ff9b8ab3001505c9ac4cf87b Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Sat, 20 Dec 2008 01:49:27 +0000 Subject: [PATCH] Commit fix by Tom Ross in FS#7488 wherein a silly mistake noise coding initialization is corrected. This sample alone has probably resulted in more WMA fixes then all other combined and I suspect there will still be at least one more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19496 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libwma/wmadeci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 4c06ad0e42..292794b907 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c @@ -1283,10 +1283,8 @@ static int wma_decode_block(WMADecodeContext *s, int32_t *scratch_buffer) { /* use noise with specified power */ fixed32 tmp = fixdiv32(exp_power[j],exp_power[last_high_band]); - mult1 = (fixed64)fixsqrt32(tmp); - /* XXX: use a table */ /*mult1 is 48.16, pow_table is 48.16*/ - mult1 = mult1 * pow_table[s->high_band_values[ch][j]+20] >> PRECISION; + mult1 = fixmul32(fixsqrt32(tmp),pow_table[s->high_band_values[ch][j]+20]) >> 16; /*this step has a fairly high degree of error for some reason*/ mult1 = fixdiv64(mult1,fixmul32(s->max_exponent[ch],s->noise_mult));