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:
parent
69580a96eb
commit
a602f46d69
26 changed files with 262 additions and 688 deletions
|
|
@ -56,30 +56,30 @@ extern struct codec_api* ci;
|
|||
#define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR
|
||||
#define ICODE_ATTR_FAAD_LARGE_IRAM
|
||||
#define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR
|
||||
#define IBSS_ATTR_FAAD_XLARGE_IRAM
|
||||
|
||||
#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
|
||||
/* Enough IRAM to move additional data and code to it. */
|
||||
#define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR
|
||||
#define ICODE_ATTR_FAAD_LARGE_IRAM ICODE_ATTR
|
||||
#define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR
|
||||
#define IBSS_ATTR_FAAD_XLARGE_IRAM
|
||||
|
||||
#elif defined(CPU_S5L870X)
|
||||
/* Very large IRAM. Move even more data to it. */
|
||||
#define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR
|
||||
#define ICODE_ATTR_FAAD_LARGE_IRAM ICODE_ATTR
|
||||
#define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR
|
||||
#define IBSS_ATTR_FAAD_XLARGE_IRAM IBSS_ATTR
|
||||
#define FAAD_HAVE_XLR_IN_IRAM
|
||||
|
||||
#else
|
||||
/* Not enough IRAM available. */
|
||||
#define IBSS_ATTR_FAAD_LARGE_IRAM
|
||||
#define ICODE_ATTR_FAAD_LARGE_IRAM
|
||||
#define ICONST_ATTR_FAAD_LARGE_IRAM
|
||||
#define IBSS_ATTR_FAAD_XLARGE_IRAM
|
||||
#endif
|
||||
|
||||
/* Used to allocate several SBR + PS arrays and variables statically. */
|
||||
//#define FAAD_STATIC_ALLOC
|
||||
|
||||
#define INLINE __inline
|
||||
#if 0 //defined(_WIN32) && !defined(_WIN32_WCE)
|
||||
#define ALIGN __declspec(align(16))
|
||||
|
|
@ -442,8 +442,11 @@ uint8_t max_tns_sfb(const uint8_t sr_index, const uint8_t object_type,
|
|||
uint32_t get_sample_rate(const uint8_t sr_index);
|
||||
int8_t can_decode_ot(const uint8_t object_type);
|
||||
|
||||
void *faad_malloc(size_t size);
|
||||
void faad_free(void *b);
|
||||
#ifndef FAAD_STATIC_ALLOC
|
||||
/* Those should not be defined or used anymore */
|
||||
#define faad_malloc(A) malloc(A)
|
||||
#define faad_free(A) free(A)
|
||||
#endif
|
||||
|
||||
//#define PROFILE
|
||||
#ifdef PROFILE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue