From 228ca70d485e2660c2e381d7112cbcca65c156a0 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 2 Jun 2004 22:59:04 +0000 Subject: update to the 2.0 release of faad, patch by adland git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12528 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libfaad2/ssr.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'libfaad2/ssr.c') diff --git a/libfaad2/ssr.c b/libfaad2/ssr.c index 04be8c4514..d1409227b1 100644 --- a/libfaad2/ssr.c +++ b/libfaad2/ssr.c @@ -1,6 +1,6 @@ /* ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding -** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com +** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ ** Commercial non-GPL licensing of this software is possible. ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. ** -** $Id: ssr.c,v 1.5 2003/09/09 18:09:52 menno Exp $ +** $Id: ssr.c,v 1.2 2003/10/03 22:22:27 alex Exp $ **/ #include "common.h" @@ -43,11 +43,8 @@ void ssr_decode(ssr_info *ssr, fb_info *fb, uint8_t window_sequence, { uint8_t band; uint16_t ssr_frame_len = frame_len/SSR_BANDS; - real_t time_tmp[2048]; - real_t output[1024]; - - memset(output, 0, 1024*sizeof(real_t)); - memset(time_tmp, 0, 2048*sizeof(real_t)); + real_t time_tmp[2048] = {0}; + real_t output[1024] = {0}; for (band = 0; band < SSR_BANDS; band++) { @@ -90,7 +87,7 @@ static void ssr_gain_control(ssr_info *ssr, real_t *data, real_t *output, if (window_sequence != EIGHT_SHORT_SEQUENCE) { ssr_gc_function(ssr, &prev_fmd[band * frame_len*2], - gc_function, window_sequence, frame_len); + gc_function, window_sequence, band, frame_len); for (i = 0; i < frame_len*2; i++) data[band * frame_len*2 + i] *= gc_function[i]; @@ -136,7 +133,7 @@ static void ssr_gain_control(ssr_info *ssr, real_t *data, real_t *output, static void ssr_gc_function(ssr_info *ssr, real_t *prev_fmd, real_t *gc_function, uint8_t window_sequence, - uint16_t frame_len) + uint8_t band, uint16_t frame_len) { uint16_t i; uint16_t len_area1, len_area2; -- cgit v1.2.3