summaryrefslogtreecommitdiff
path: root/apps/codecs/demac/libdemac/demac_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/demac/libdemac/demac_config.h')
-rw-r--r--apps/codecs/demac/libdemac/demac_config.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/apps/codecs/demac/libdemac/demac_config.h b/apps/codecs/demac/libdemac/demac_config.h
index 93fda76e25..86c2d24919 100644
--- a/apps/codecs/demac/libdemac/demac_config.h
+++ b/apps/codecs/demac/libdemac/demac_config.h
@@ -39,12 +39,21 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
39 39
40#define APE_OUTPUT_DEPTH 29 40#define APE_OUTPUT_DEPTH 29
41 41
42/* On PP5002 code should go into IRAM. Otherwise put the insane 42/* On ARMv4, using 32 bit ints for the filters is faster. */
43 * filter buffer into IRAM as long as there is no better use. */ 43#if defined(CPU_ARM) && (ARM_ARCH == 4)
44#define FILTER_BITS 32
45#endif
46
44#if CONFIG_CPU == PP5002 47#if CONFIG_CPU == PP5002
48/* Code in IRAM for speed, not enough IRAM for the insane filter buffer. */
45#define ICODE_SECTION_DEMAC_ARM .icode 49#define ICODE_SECTION_DEMAC_ARM .icode
46#define ICODE_ATTR_DEMAC ICODE_ATTR 50#define ICODE_ATTR_DEMAC ICODE_ATTR
47#define IBSS_ATTR_DEMAC_INSANEBUF 51#define IBSS_ATTR_DEMAC_INSANEBUF
52#elif CONFIG_CPU == PP5020
53/* Not enough IRAM for the insane filter buffer. */
54#define ICODE_SECTION_DEMAC_ARM .text
55#define ICODE_ATTR_DEMAC
56#define IBSS_ATTR_DEMAC_INSANEBUF
48#else 57#else
49#define ICODE_SECTION_DEMAC_ARM .text 58#define ICODE_SECTION_DEMAC_ARM .text
50#define ICODE_ATTR_DEMAC 59#define ICODE_ATTR_DEMAC
@@ -75,6 +84,20 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
75 84
76#ifndef PREDICTOR_HISTORY_SIZE 85#ifndef PREDICTOR_HISTORY_SIZE
77#define PREDICTOR_HISTORY_SIZE 512 86#define PREDICTOR_HISTORY_SIZE 512
87#endif
88
89#ifndef FILTER_BITS
90#define FILTER_BITS 16
91#endif
92
93
94#ifndef __ASSEMBLER__
95#include <inttypes.h>
96#if FILTER_BITS == 32
97typedef int32_t filter_int;
98#elif FILTER_BITS == 16
99typedef int16_t filter_int;
100#endif
78#endif 101#endif
79 102
80#endif /* _DEMAC_CONFIG_H */ 103#endif /* _DEMAC_CONFIG_H */