diff options
-rw-r--r-- | apps/codecs/libfaad/common.h | 7 | ||||
-rw-r--r-- | apps/codecs/libfaad/sbr_dec.c | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/apps/codecs/libfaad/common.h b/apps/codecs/libfaad/common.h index fa8f4e0f39..e5b86ba978 100644 --- a/apps/codecs/libfaad/common.h +++ b/apps/codecs/libfaad/common.h | |||
@@ -56,29 +56,32 @@ extern struct codec_api* ci; | |||
56 | #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR | 56 | #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR |
57 | #define ICODE_ATTR_FAAD_LARGE_IRAM | 57 | #define ICODE_ATTR_FAAD_LARGE_IRAM |
58 | #define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR | 58 | #define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR |
59 | #define IBSS_ATTR_FAAD_XLR | ||
59 | 60 | ||
60 | #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) | 61 | #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) |
61 | /* Enough IRAM to move additional data and code to it. */ | 62 | /* Enough IRAM to move additional data and code to it. */ |
62 | #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR | 63 | #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR |
63 | #define ICODE_ATTR_FAAD_LARGE_IRAM ICODE_ATTR | 64 | #define ICODE_ATTR_FAAD_LARGE_IRAM ICODE_ATTR |
64 | #define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR | 65 | #define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR |
66 | #define IBSS_ATTR_FAAD_XLR | ||
65 | 67 | ||
66 | #elif defined(CPU_S5L870X) | 68 | #elif defined(CPU_S5L870X) |
67 | /* Very large IRAM. Move even more data to it. */ | 69 | /* Very large IRAM. Move even more data to it. */ |
68 | #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR | 70 | #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR |
69 | #define ICODE_ATTR_FAAD_LARGE_IRAM ICODE_ATTR | 71 | #define ICODE_ATTR_FAAD_LARGE_IRAM ICODE_ATTR |
70 | #define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR | 72 | #define ICONST_ATTR_FAAD_LARGE_IRAM ICONST_ATTR |
71 | #define FAAD_HAVE_XLR_IN_IRAM | 73 | #define IBSS_ATTR_FAAD_XLR IBSS_ATTR |
72 | 74 | ||
73 | #else | 75 | #else |
74 | /* Not enough IRAM available. */ | 76 | /* Not enough IRAM available. */ |
75 | #define IBSS_ATTR_FAAD_LARGE_IRAM | 77 | #define IBSS_ATTR_FAAD_LARGE_IRAM |
76 | #define ICODE_ATTR_FAAD_LARGE_IRAM | 78 | #define ICODE_ATTR_FAAD_LARGE_IRAM |
77 | #define ICONST_ATTR_FAAD_LARGE_IRAM | 79 | #define ICONST_ATTR_FAAD_LARGE_IRAM |
80 | #define IBSS_ATTR_FAAD_XLR | ||
78 | #endif | 81 | #endif |
79 | 82 | ||
80 | /* Used to allocate several SBR + PS arrays and variables statically. */ | 83 | /* Used to allocate several SBR + PS arrays and variables statically. */ |
81 | #define FAAD_STATIC_ALLOC | 84 | //#define FAAD_STATIC_ALLOC |
82 | 85 | ||
83 | #define INLINE __inline | 86 | #define INLINE __inline |
84 | #if 0 //defined(_WIN32) && !defined(_WIN32_WCE) | 87 | #if 0 //defined(_WIN32) && !defined(_WIN32_WCE) |
diff --git a/apps/codecs/libfaad/sbr_dec.c b/apps/codecs/libfaad/sbr_dec.c index d369868f74..4904c702ee 100644 --- a/apps/codecs/libfaad/sbr_dec.c +++ b/apps/codecs/libfaad/sbr_dec.c | |||
@@ -57,8 +57,8 @@ typedef struct { | |||
57 | 57 | ||
58 | /* static variables */ | 58 | /* static variables */ |
59 | static XLR_t *p_XLR = NULL; | 59 | static XLR_t *p_XLR = NULL; |
60 | #if defined(FAAD_STATIC_ALLOC) || defined(FAAD_HAVE_XLR_IN_IRAM) | 60 | #if defined(FAAD_STATIC_ALLOC) || defined(IBSS_ATTR_FAAD_XLR) |
61 | static XLR_t s_XLR IBSS_ATTR MEM_ALIGN_ATTR; | 61 | static XLR_t s_XLR IBSS_ATTR_FAAD_XLR MEM_ALIGN_ATTR; |
62 | #endif | 62 | #endif |
63 | #if defined(FAAD_STATIC_ALLOC) | 63 | #if defined(FAAD_STATIC_ALLOC) |
64 | static sbr_info s_sbr[MAX_SYNTAX_ELEMENTS]; | 64 | static sbr_info s_sbr[MAX_SYNTAX_ELEMENTS]; |
@@ -102,7 +102,7 @@ sbr_info *sbrDecodeInit(uint16_t framelength, uint8_t id_aac, uint8_t id_ele, | |||
102 | 102 | ||
103 | /* Allocate XLR temporary variable. Use static allocation if either | 103 | /* Allocate XLR temporary variable. Use static allocation if either |
104 | * FAAD_STATIC_ALLOC is set or XLR fits to IRAM. */ | 104 | * FAAD_STATIC_ALLOC is set or XLR fits to IRAM. */ |
105 | #if defined(FAAD_STATIC_ALLOC) || defined(FAAD_HAVE_XLR_IN_IRAM) | 105 | #if defined(FAAD_STATIC_ALLOC) || defined(IBSS_ATTR_FAAD_XLR) |
106 | p_XLR = &s_XLR; | 106 | p_XLR = &s_XLR; |
107 | #else | 107 | #else |
108 | p_XLR = (XLR_t*)faad_malloc(sizeof(XLR_t)); | 108 | p_XLR = (XLR_t*)faad_malloc(sizeof(XLR_t)); |