diff options
| author | Michael Giacomelli <giac2000@hotmail.com> | 2009-04-29 17:44:02 +0000 |
|---|---|---|
| committer | Michael Giacomelli <giac2000@hotmail.com> | 2009-04-29 17:44:02 +0000 |
| commit | 0a1baa36b1d15fd392df531bc08b7445ef7d0371 (patch) | |
| tree | 85e533c3facde03549a156b52562343f6b8d52d3 /apps/codecs/libfaad/filtbank.c | |
| parent | 14731bc3e2760139d8086fa742fd5fca61924c6a (diff) | |
| download | rockbox-0a1baa36b1d15fd392df531bc08b7445ef7d0371.zip rockbox-0a1baa36b1d15fd392df531bc08b7445ef7d0371.tar.gz rockbox-0a1baa36b1d15fd392df531bc08b7445ef7d0371.tar.bz2 rockbox-0a1baa36b1d15fd392df531bc08b7445ef7d0371.tar.xz | |
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
Diffstat (limited to 'apps/codecs/libfaad/filtbank.c')
| -rw-r--r-- | apps/codecs/libfaad/filtbank.c | 20 |
1 files changed, 16 insertions, 4 deletions
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 } |