summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad
diff options
context:
space:
mode:
authorTomasz Malesinski <tomal@rockbox.org>2006-11-09 21:59:27 +0000
committerTomasz Malesinski <tomal@rockbox.org>2006-11-09 21:59:27 +0000
commit5c54ba49d5c05e394a31f3827f7c4a75e28d9999 (patch)
tree096c978d3e4d259cc6cf08ee5ccdd4414d06c013 /apps/codecs/libmad
parent2e383a430de025378bf17942a1cf5ea86860f700 (diff)
Added macros controlling what goes to IRAM on different targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11483 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad')
-rw-r--r--apps/codecs/libmad/global.h4
-rw-r--r--apps/codecs/libmad/huffman.c38
2 files changed, 23 insertions, 19 deletions
diff --git a/apps/codecs/libmad/global.h b/apps/codecs/libmad/global.h
index fc3dde883e..1ecfea1c14 100644
--- a/apps/codecs/libmad/global.h
+++ b/apps/codecs/libmad/global.h
@@ -66,4 +66,8 @@
# endif
# endif
+#ifndef ICONST_ATTR_MPA_HUFFMAN
+#define ICONST_ATTR_MPA_HUFFMAN ICONST_ATTR
+#endif
+
# endif
diff --git a/apps/codecs/libmad/huffman.c b/apps/codecs/libmad/huffman.c
index 6ef2390dee..43216d3680 100644
--- a/apps/codecs/libmad/huffman.c
+++ b/apps/codecs/libmad/huffman.c
@@ -50,7 +50,7 @@
# endif
static
-union huffquad const hufftabA[] ICONST_ATTR = {
+union huffquad const hufftabA[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 2),
/* 0001 */ PTR(20, 2),
/* 0010 */ PTR(24, 1),
@@ -90,7 +90,7 @@ union huffquad const hufftabA[] ICONST_ATTR = {
};
static
-union huffquad const hufftabB[] ICONST_ATTR = {
+union huffquad const hufftabB[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ V(1, 1, 1, 1, 4),
/* 0001 */ V(1, 1, 1, 0, 4),
/* 0010 */ V(1, 1, 0, 1, 4),
@@ -126,12 +126,12 @@ union huffquad const hufftabB[] ICONST_ATTR = {
# endif
static
-union huffpair const hufftab0[] ICONST_ATTR = {
+union huffpair const hufftab0[] ICONST_ATTR_MPA_HUFFMAN = {
/* */ V(0, 0, 0)
};
static
-union huffpair const hufftab1[] ICONST_ATTR = {
+union huffpair const hufftab1[] ICONST_ATTR_MPA_HUFFMAN = {
/* 000 */ V(1, 1, 3),
/* 001 */ V(0, 1, 3),
/* 010 */ V(1, 0, 2),
@@ -143,7 +143,7 @@ union huffpair const hufftab1[] ICONST_ATTR = {
};
static
-union huffpair const hufftab2[] ICONST_ATTR = {
+union huffpair const hufftab2[] ICONST_ATTR_MPA_HUFFMAN = {
/* 000 */ PTR(8, 3),
/* 001 */ V(1, 1, 3),
/* 010 */ V(0, 1, 3),
@@ -165,7 +165,7 @@ union huffpair const hufftab2[] ICONST_ATTR = {
};
static
-union huffpair const hufftab3[] ICONST_ATTR = {
+union huffpair const hufftab3[] ICONST_ATTR_MPA_HUFFMAN = {
/* 000 */ PTR(8, 3),
/* 001 */ V(1, 0, 3),
/* 010 */ V(1, 1, 2),
@@ -187,7 +187,7 @@ union huffpair const hufftab3[] ICONST_ATTR = {
};
static
-union huffpair const hufftab5[] ICONST_ATTR = {
+union huffpair const hufftab5[] ICONST_ATTR_MPA_HUFFMAN = {
/* 000 */ PTR(8, 4),
/* 001 */ V(1, 1, 3),
/* 010 */ V(0, 1, 3),
@@ -221,7 +221,7 @@ union huffpair const hufftab5[] ICONST_ATTR = {
};
static
-union huffpair const hufftab6[] ICONST_ATTR = {
+union huffpair const hufftab6[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 3),
/* 0001 */ PTR(24, 1),
/* 0010 */ PTR(26, 1),
@@ -259,7 +259,7 @@ union huffpair const hufftab6[] ICONST_ATTR = {
};
static
-union huffpair const hufftab7[] ICONST_ATTR = {
+union huffpair const hufftab7[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 2),
@@ -346,7 +346,7 @@ union huffpair const hufftab7[] ICONST_ATTR = {
/* this version saves 8 entries (16 bytes) at the expense of
an extra lookup in 4 out of 36 cases */
static
-union huffpair const hufftab8[] ICONST_ATTR = {
+union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 2),
/* 0010 */ V(1, 2, 4),
@@ -424,7 +424,7 @@ union huffpair const hufftab8[] ICONST_ATTR = {
};
# else
static
-union huffpair const hufftab8[] ICONST_ATTR = {
+union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ V(1, 2, 4),
@@ -509,7 +509,7 @@ union huffpair const hufftab8[] ICONST_ATTR = {
# endif
static
-union huffpair const hufftab9[] ICONST_ATTR = {
+union huffpair const hufftab9[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 3),
/* 0010 */ PTR(40, 2),
@@ -581,7 +581,7 @@ union huffpair const hufftab9[] ICONST_ATTR = {
};
static
-union huffpair const hufftab10[] ICONST_ATTR = {
+union huffpair const hufftab10[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 2),
@@ -719,7 +719,7 @@ union huffpair const hufftab10[] ICONST_ATTR = {
};
static
-union huffpair const hufftab11[] ICONST_ATTR = {
+union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 4),
@@ -855,7 +855,7 @@ union huffpair const hufftab11[] ICONST_ATTR = {
};
static
-union huffpair const hufftab12[] ICONST_ATTR = {
+union huffpair const hufftab12[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 4),
@@ -983,7 +983,7 @@ union huffpair const hufftab12[] ICONST_ATTR = {
};
static
-union huffpair const hufftab13[] ICONST_ATTR = {
+union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 4),
@@ -1509,7 +1509,7 @@ union huffpair const hufftab13[] ICONST_ATTR = {
};
static
-union huffpair const hufftab15[] ICONST_ATTR = {
+union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 4),
@@ -2017,7 +2017,7 @@ union huffpair const hufftab15[] ICONST_ATTR = {
};
static
-union huffpair const hufftab16[] ICONST_ATTR = {
+union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 4),
@@ -2551,7 +2551,7 @@ union huffpair const hufftab16[] ICONST_ATTR = {
};
static
-union huffpair const hufftab24[] ICONST_ATTR = {
+union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 4),