diff options
author | Jens Arnold <amiconn@rockbox.org> | 2010-03-10 21:39:12 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2010-03-10 21:39:12 +0000 |
commit | 029e74866a6ed43f3b8833a06f28f4506210a99e (patch) | |
tree | dce150e1a1b2552fa696ed408665747448ff0b0f /apps/codecs/demac/libdemac/demac_config.h | |
parent | 20f5a533aed5c0a502f89eca3992f66a70d5d746 (diff) | |
download | rockbox-029e74866a6ed43f3b8833a06f28f4506210a99e.tar.gz rockbox-029e74866a6ed43f3b8833a06f28f4506210a99e.zip |
Move (small) data into DRAM on PP5020, it's ~4.5% faster that way. Closes about half of the performance gap towards PP5022. The (relatively large) buffers for decoded data stay in IRAM, as does the reciprocal table. Clarify some comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25108 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/demac/libdemac/demac_config.h')
-rw-r--r-- | apps/codecs/demac/libdemac/demac_config.h | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/apps/codecs/demac/libdemac/demac_config.h b/apps/codecs/demac/libdemac/demac_config.h index c908c3ea10..f3b293e1d2 100644 --- a/apps/codecs/demac/libdemac/demac_config.h +++ b/apps/codecs/demac/libdemac/demac_config.h | |||
@@ -49,18 +49,39 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA | |||
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #if CONFIG_CPU == PP5002 || defined(CPU_S5L870X) | 51 | #if CONFIG_CPU == PP5002 || defined(CPU_S5L870X) |
52 | /* Code in IRAM for speed, not enough IRAM for the insane filter buffer. */ | 52 | /* Code and data IRAM for speed (PP5002 has a broken cache), not enough IRAM |
53 | * for the insane filter buffer. Reciprocal table for division in IRAM. */ | ||
53 | #define ICODE_SECTION_DEMAC_ARM .icode | 54 | #define ICODE_SECTION_DEMAC_ARM .icode |
54 | #define ICODE_ATTR_DEMAC ICODE_ATTR | 55 | #define ICODE_ATTR_DEMAC ICODE_ATTR |
56 | #define ICONST_ATTR_DEMAC ICONST_ATTR | ||
57 | #define IBSS_ATTR_DEMAC IBSS_ATTR | ||
55 | #define IBSS_ATTR_DEMAC_INSANEBUF | 58 | #define IBSS_ATTR_DEMAC_INSANEBUF |
56 | #elif defined(CPU_PP502x) | 59 | |
57 | /* Insane filter buffer not in IRAM due to division table. */ | 60 | #elif CONFIG_CPU == PP5020 |
61 | /* Code and small data in DRAM for speed (PP5020 IRAM isn't completely single | ||
62 | * cycle). Insane filter buffer not in IRAM in favour of reciprocal table for | ||
63 | * divison. Decoded data buffers should be in IRAM (defined by the caller). */ | ||
64 | #define ICODE_SECTION_DEMAC_ARM .text | ||
65 | #define ICODE_ATTR_DEMAC | ||
66 | #define ICONST_ATTR_DEMAC | ||
67 | #define IBSS_ATTR_DEMAC | ||
68 | #define IBSS_ATTR_DEMAC_INSANEBUF | ||
69 | |||
70 | #elif CONFIG_CPU == PP5022 | ||
71 | /* Code in DRAM, data in IRAM. Insane filter buffer not in IRAM in favour of | ||
72 | * reciprocal table for divison */ | ||
58 | #define ICODE_SECTION_DEMAC_ARM .text | 73 | #define ICODE_SECTION_DEMAC_ARM .text |
59 | #define ICODE_ATTR_DEMAC | 74 | #define ICODE_ATTR_DEMAC |
75 | #define ICONST_ATTR_DEMAC ICONST_ATTR | ||
76 | #define IBSS_ATTR_DEMAC IBSS_ATTR | ||
60 | #define IBSS_ATTR_DEMAC_INSANEBUF | 77 | #define IBSS_ATTR_DEMAC_INSANEBUF |
78 | |||
61 | #else | 79 | #else |
80 | /* Code in DRAM, data in IRAM, including insane filter buffer. */ | ||
62 | #define ICODE_SECTION_DEMAC_ARM .text | 81 | #define ICODE_SECTION_DEMAC_ARM .text |
63 | #define ICODE_ATTR_DEMAC | 82 | #define ICODE_ATTR_DEMAC |
83 | #define ICONST_ATTR_DEMAC ICONST_ATTR | ||
84 | #define IBSS_ATTR_DEMAC IBSS_ATTR | ||
64 | #define IBSS_ATTR_DEMAC_INSANEBUF IBSS_ATTR | 85 | #define IBSS_ATTR_DEMAC_INSANEBUF IBSS_ATTR |
65 | #endif | 86 | #endif |
66 | 87 | ||
@@ -68,11 +89,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA | |||
68 | 89 | ||
69 | #define APE_OUTPUT_DEPTH (ape_ctx->bps) | 90 | #define APE_OUTPUT_DEPTH (ape_ctx->bps) |
70 | 91 | ||
71 | #define IBSS_ATTR | ||
72 | #define IBSS_ATTR_DEMAC_INSANEBUF | ||
73 | #define ICONST_ATTR | ||
74 | #define ICODE_ATTR | ||
75 | #define ICODE_ATTR_DEMAC | 92 | #define ICODE_ATTR_DEMAC |
93 | #define ICONST_ATTR_DEMAC | ||
94 | #define IBSS_ATTR_DEMAC | ||
95 | #define IBSS_ATTR_DEMAC_INSANEBUF | ||
76 | 96 | ||
77 | /* Use to give gcc hints on which branch is most likely taken */ | 97 | /* Use to give gcc hints on which branch is most likely taken */ |
78 | #if defined(__GNUC__) && __GNUC__ >= 3 | 98 | #if defined(__GNUC__) && __GNUC__ >= 3 |