From 0a1baa36b1d15fd392df531bc08b7445ef7d0371 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Wed, 29 Apr 2009 17:44:02 +0000 Subject: Fix FS#10174 by correcting an oversimplification of the AAC window switching code I introduced with the unified IMDCT library. Should significantly improve accuracy for all AAC files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20821 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libfaad/filtbank.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'apps/codecs/libfaad/filtbank.c') diff --git a/apps/codecs/libfaad/filtbank.c b/apps/codecs/libfaad/filtbank.c index e5c1bd3..90175d9 100644 --- a/apps/codecs/libfaad/filtbank.c +++ b/apps/codecs/libfaad/filtbank.c @@ -198,8 +198,8 @@ static INLINE void mdct(fb_info *fb, real_t *in_data, real_t *out_data, uint16_t ALIGN real_t transf_buf[2*1024] IBSS_ATTR; -void ifilter_bank(uint8_t window_sequence, - real_t *freq_in, +void ifilter_bank(uint8_t window_sequence, uint8_t window_shape, + uint8_t window_shape_prev, real_t *freq_in, real_t *time_out, real_t *overlap, uint8_t object_type, uint16_t frame_len) { @@ -232,10 +232,22 @@ void ifilter_bank(uint8_t window_sequence, (void) object_type; #endif - window_long = sine_long_1024; + /*AAC uses two different window shapes depending on spectal features*/ + if(window_shape == 0){ + window_long = sine_long_1024; + window_short = sine_short_128; + } else { + window_long = kbd_long_1024; + window_short = kbd_short_128; + } + + if(window_shape_prev == 0){ + window_long_prev = sine_long_1024; + window_short_prev = sine_short_128; + } else { window_long_prev = kbd_long_1024; - window_short = sine_short_128; window_short_prev = kbd_short_128; + } #ifdef LD_DEC } -- cgit v1.1