1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Andree Buschmann 2011-04-24 20:19:05 +00:00
parent 69580a96eb
commit a602f46d69
26 changed files with 262 additions and 688 deletions

View file

@ -37,12 +37,13 @@ extern "C" {
#include "sbr_dec.h"
#endif
#define MAX_CHANNELS 64
#define MAX_SYNTAX_ELEMENTS 48
#define MAX_CHANNELS 2 /* Was 64, but we need to limit RAM usage */
#define MAX_SYNTAX_ELEMENTS 1 /* Was 48, but we need to limit RAM usage */
#define MAX_WINDOW_GROUPS 8
#define MAX_SFB 51
#define MAX_LTP_SFB 40
#define MAX_LTP_SFB_S 8
#define FRAME_LEN 1024
/* used to save the prediction state */
typedef struct {
@ -407,9 +408,6 @@ typedef struct
*/
uint8_t alloced_channels;
/* output data buffer */
void *sample_buffer;
uint8_t window_shape_prev[MAX_CHANNELS];
#ifdef LTP_DEC
uint16_t ltp_lag[MAX_CHANNELS];