summaryrefslogtreecommitdiff
path: root/apps/codecs/libfaad/filtbank.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-04-24 20:19:05 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-04-24 20:19:05 +0000
commita602f46d69d9d18756b7f317470f654f695faa80 (patch)
treef111cc29197def94d5404d15c7febfd06efed9f7 /apps/codecs/libfaad/filtbank.c
parent69580a96eb816d9b811c542d38181126243d8563 (diff)
downloadrockbox-a602f46d69d9d18756b7f317470f654f695faa80.zip
rockbox-a602f46d69d9d18756b7f317470f654f695faa80.tar.gz
rockbox-a602f46d69d9d18756b7f317470f654f695faa80.tar.bz2
rockbox-a602f46d69d9d18756b7f317470f654f695faa80.tar.xz
Rework of libfaad in several areas. Allow removal of malloc with a new define FAAD_STATIC_ALLOC (in common.h). For now malloc is not fully removed but used by a few arrays needed for AAC-HE SBR+PS only. Reason to keep malloc is to have this amount of memory available for AAC-LC files which might require large m4a tables. The changes make the allocation routines much smaller, better centralized and allow to move duplicated code from aac.c/raa.c to libfaad. The rework includes removal of (now and former) unused code as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29778 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad/filtbank.c')
-rw-r--r--apps/codecs/libfaad/filtbank.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/codecs/libfaad/filtbank.c b/apps/codecs/libfaad/filtbank.c
index 906af9e..fd7a4dc 100644
--- a/apps/codecs/libfaad/filtbank.c
+++ b/apps/codecs/libfaad/filtbank.c
@@ -43,8 +43,14 @@
#include "sine_win.h"
-/*Windowing functions borrowed from libwmai*/
+/* static variables */
+static real_t transf_buf[2*FRAME_LEN] IBSS_ATTR MEM_ALIGN_ATTR;
+#ifdef LTP_DEC
+static real_t windowed_buf[2*FRAME_LEN] MEM_ALIGN_ATTR = {0};
+#endif
+
+/*Windowing functions borrowed from libwmai*/
#ifdef CPU_ARM
static inline
void vector_fmul_add_add(real_t *dst, const real_t *src0, const real_t *src1, const real_t *src2, int len)
@@ -196,8 +202,6 @@ static INLINE void mdct(fb_info *fb, real_t *in_data, real_t *out_data, uint16_t
}
#endif
-real_t transf_buf[2*1024] IBSS_ATTR MEM_ALIGN_ATTR;
-
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,
@@ -403,7 +407,6 @@ void ifilter_bank(uint8_t window_sequence, uint8_t window_shape,
#ifdef LTP_DEC
-real_t windowed_buf[2*1024] MEM_ALIGN_ATTR = {0};
/* only works for LTP -> no overlapping, no short blocks */
void filter_bank_ltp(fb_info *fb, uint8_t window_sequence, uint8_t window_shape,
uint8_t window_shape_prev, real_t *in_data, real_t *out_mdct,