From a602f46d69d9d18756b7f317470f654f695faa80 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 24 Apr 2011 20:19:05 +0000 Subject: 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 --- apps/codecs/libfaad/sbr_qmf.c | 48 ------------------------------------------- 1 file changed, 48 deletions(-) (limited to 'apps/codecs/libfaad/sbr_qmf.c') diff --git a/apps/codecs/libfaad/sbr_qmf.c b/apps/codecs/libfaad/sbr_qmf.c index 7cb62c241a..5f8203e5b1 100644 --- a/apps/codecs/libfaad/sbr_qmf.c +++ b/apps/codecs/libfaad/sbr_qmf.c @@ -50,30 +50,6 @@ #define FAAD_ANALYSIS_SCALE3(X) ((X)/32.0f) #endif -qmfa_info *qmfa_init(uint8_t channels) -{ - qmfa_info *qmfa = (qmfa_info*)faad_malloc(sizeof(qmfa_info)); - - /* x is implemented as double ringbuffer */ - qmfa->x = (real_t*)faad_malloc(2 * channels * 10 * sizeof(real_t)); - memset(qmfa->x, 0, 2 * channels * 10 * sizeof(real_t)); - - /* ringbuffer index */ - qmfa->x_index = 0; - - qmfa->channels = channels; - - return qmfa; -} - -void qmfa_end(qmfa_info *qmfa) -{ - if (qmfa) - { - if (qmfa->x) faad_free(qmfa->x); - faad_free(qmfa); - } -} void sbr_qmf_analysis_32(sbr_info *sbr, qmfa_info *qmfa, const real_t *input, qmf_t X[MAX_NTSR][64], uint8_t offset, uint8_t kx) @@ -198,30 +174,6 @@ void sbr_qmf_analysis_32(sbr_info *sbr, qmfa_info *qmfa, const real_t *input, } } -qmfs_info *qmfs_init(uint8_t channels) -{ - qmfs_info *qmfs = (qmfs_info*)faad_malloc(sizeof(qmfs_info)); - - /* v is a double ringbuffer */ - qmfs->v = (real_t*)faad_malloc(2 * channels * 20 * sizeof(real_t)); - memset(qmfs->v, 0, 2 * channels * 20 * sizeof(real_t)); - - qmfs->v_index = 0; - - qmfs->channels = channels; - - return qmfs; -} - -void qmfs_end(qmfs_info *qmfs) -{ - if (qmfs) - { - if (qmfs->v) faad_free(qmfs->v); - faad_free(qmfs); - } -} - #ifdef SBR_LOW_POWER void sbr_qmf_synthesis_32(sbr_info *sbr, qmfs_info *qmfs, qmf_t X[MAX_NTSR][64], -- cgit v1.2.3