summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-12 18:36:01 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-12 18:36:01 +0000
commitc82cac4c3d6d38b8df8e789c1b31a85cf2bd638e (patch)
tree907fbf8c660e4799d2b118489b7c1dc83280fce6 /apps
parent86dc6c1204b2adc3e64238c4dfdd65a473f0ce4c (diff)
downloadrockbox-c82cac4c3d6d38b8df8e789c1b31a85cf2bd638e.tar.gz
rockbox-c82cac4c3d6d38b8df8e789c1b31a85cf2bd638e.zip
Restore musepack's IRAM configuration to pre r25127 for non PP5022/24.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25133 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rwxr-xr-xapps/codecs/libmusepack/mpc_bits_reader.c10
-rwxr-xr-xapps/codecs/libmusepack/mpcdec.h6
2 files changed, 11 insertions, 5 deletions
diff --git a/apps/codecs/libmusepack/mpc_bits_reader.c b/apps/codecs/libmusepack/mpc_bits_reader.c
index fc1da31ed6..58b3f37e08 100755
--- a/apps/codecs/libmusepack/mpc_bits_reader.c
+++ b/apps/codecs/libmusepack/mpc_bits_reader.c
@@ -37,7 +37,7 @@
37#include "huffman.h" 37#include "huffman.h"
38#include "mpc_bits_reader.h" 38#include "mpc_bits_reader.h"
39 39
40const mpc_uint32_t Cnk[MAX_ENUM / 2][MAX_ENUM] = 40const mpc_uint32_t Cnk[MAX_ENUM / 2][MAX_ENUM] ICONST_ATTR_MPC_BITSREADER =
41{ 41{
42 {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, 42 {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
43 {0, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465}, 43 {0, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465},
@@ -57,7 +57,7 @@ const mpc_uint32_t Cnk[MAX_ENUM / 2][MAX_ENUM] =
57 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 153, 969, 4845, 20349, 74613, 245157, 735471, 2042975, 5311735, 13037895, 30421755, 67863915, 145422675, 300540195} 57 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 153, 969, 4845, 20349, 74613, 245157, 735471, 2042975, 5311735, 13037895, 30421755, 67863915, 145422675, 300540195}
58}; 58};
59 59
60const mpc_uint8_t Cnk_len[MAX_ENUM / 2][MAX_ENUM] = 60const mpc_uint8_t Cnk_len[MAX_ENUM / 2][MAX_ENUM] ICONST_ATTR_MPC_BITSREADER =
61{ 61{
62 {0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, 62 {0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5},
63 {0, 0, 2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9}, 63 {0, 0, 2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9},
@@ -78,7 +78,7 @@ const mpc_uint8_t Cnk_len[MAX_ENUM / 2][MAX_ENUM] =
78 78
79}; 79};
80 80
81const mpc_uint32_t Cnk_lost[MAX_ENUM / 2][MAX_ENUM] = 81const mpc_uint32_t Cnk_lost[MAX_ENUM / 2][MAX_ENUM] ICONST_ATTR_MPC_BITSREADER =
82{ 82{
83 {0, 0, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, 83 {0, 0, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0},
84 {0, 0, 1, 2, 6, 1, 11, 4, 28, 19, 9, 62, 50, 37, 23, 8, 120, 103, 85, 66, 46, 25, 3, 236, 212, 187, 161, 134, 106, 77, 47, 16}, 84 {0, 0, 1, 2, 6, 1, 11, 4, 28, 19, 9, 62, 50, 37, 23, 8, 120, 103, 85, 66, 46, 25, 3, 236, 212, 187, 161, 134, 106, 77, 47, 16},
@@ -98,10 +98,10 @@ const mpc_uint32_t Cnk_lost[MAX_ENUM / 2][MAX_ENUM] =
98 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 103, 55, 3347, 12419, 56459, 16987, 313105, 54177, 3076873, 3739321, 3132677, 66353813, 123012781, 236330717} 98 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 103, 55, 3347, 12419, 56459, 16987, 313105, 54177, 3076873, 3739321, 3132677, 66353813, 123012781, 236330717}
99}; 99};
100 100
101static const mpc_uint8_t log2[32] = 101static const mpc_uint8_t log2[32] ICONST_ATTR_MPC_BITSREADER =
102{ 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6}; 102{ 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6};
103 103
104static const mpc_uint8_t log2_lost[32] = 104static const mpc_uint8_t log2_lost[32] ICONST_ATTR_MPC_BITSREADER =
105{ 0, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31}; 105{ 0, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31};
106 106
107mpc_int32_t mpc_bits_golomb_dec(mpc_bits_reader * r, const mpc_uint_t k) 107mpc_int32_t mpc_bits_golomb_dec(mpc_bits_reader * r, const mpc_uint_t k)
diff --git a/apps/codecs/libmusepack/mpcdec.h b/apps/codecs/libmusepack/mpcdec.h
index f97a6458d4..be18cfec95 100755
--- a/apps/codecs/libmusepack/mpcdec.h
+++ b/apps/codecs/libmusepack/mpcdec.h
@@ -52,18 +52,24 @@ extern "C" {
52#define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR 52#define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR
53#define ICODE_ATTR_MPC_LARGE_IRAM 53#define ICODE_ATTR_MPC_LARGE_IRAM
54#define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR 54#define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR
55/* Keep the data arrays of bitsreadr.c in IRAM. */
56#define ICONST_ATTR_MPC_BITSREADER ICONST_ATTR
55 57
56#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) 58#elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
57/* Enough IRAM to move additional data and code to it. */ 59/* Enough IRAM to move additional data and code to it. */
58#define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR 60#define IBSS_ATTR_MPC_LARGE_IRAM IBSS_ATTR
59#define ICODE_ATTR_MPC_LARGE_IRAM ICODE_ATTR 61#define ICODE_ATTR_MPC_LARGE_IRAM ICODE_ATTR
60#define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR 62#define ICONST_ATTR_MPC_LARGE_IRAM ICONST_ATTR
63/* Not putting the data arrays of bitsreader.c to IRAM allows to move the
64 * sv7/sv8 bitstream demuxing into IRAM. This config is faster. */
65#define ICONST_ATTR_MPC_BITSREADER
61 66
62#else 67#else
63/* Not enough IRAM available. */ 68/* Not enough IRAM available. */
64#define IBSS_ATTR_MPC_LARGE_IRAM 69#define IBSS_ATTR_MPC_LARGE_IRAM
65#define ICODE_ATTR_MPC_LARGE_IRAM 70#define ICODE_ATTR_MPC_LARGE_IRAM
66#define ICONST_ATTR_MPC_LARGE_IRAM 71#define ICONST_ATTR_MPC_LARGE_IRAM
72#define ICONST_ATTR_MPC_BITSREADER
67#endif 73#endif
68 74
69enum { 75enum {