summaryrefslogtreecommitdiff
path: root/apps/codecs/libcook/cookdata_fixpoint.h
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2009-07-17 23:53:40 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2009-07-17 23:53:40 +0000
commitb957f7214be31bc5752625f9b9d60f96a77a9e34 (patch)
tree35987cd27988c0442dcb234912d3fb59468f5aad /apps/codecs/libcook/cookdata_fixpoint.h
parentc247483ef18360668c997ab64dc7345eaf65209c (diff)
downloadrockbox-b957f7214be31bc5752625f9b9d60f96a77a9e34.zip
rockbox-b957f7214be31bc5752625f9b9d60f96a77a9e34.tar.gz
rockbox-b957f7214be31bc5752625f9b9d60f96a77a9e34.tar.bz2
rockbox-b957f7214be31bc5752625f9b9d60f96a77a9e34.tar.xz
Rearrange the MDCT library lookup tables so that codecs can access them. Access them in cook. Remove old cook trig tables. Replace old 32x16 bit fixed point multiply code with faster ASM ARM/Coldfire versions using full 32 bit precision. Improves performance signficantly on PP5024 (~200% realtime for a 64k file) while saving a lot of memory and improving accuracy.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21939 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libcook/cookdata_fixpoint.h')
-rw-r--r--apps/codecs/libcook/cookdata_fixpoint.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/codecs/libcook/cookdata_fixpoint.h b/apps/codecs/libcook/cookdata_fixpoint.h
index 7a9440c..72ccabe 100644
--- a/apps/codecs/libcook/cookdata_fixpoint.h
+++ b/apps/codecs/libcook/cookdata_fixpoint.h
@@ -43,7 +43,9 @@ typedef struct {
#define cPI1_8 0xec83 /* 1pi/8 2^16 */
#define cPI2_8 0xb505 /* 2pi/8 2^16 */
#define cPI3_8 0x61f8 /* 3pi/8 2^16 */
-#endif
+
+
+
static const FIXPU sincos_lookup[2050] = {
/* x_i = 2^16 sin(i 2pi/8192), 2^16 cos(i 2pi/8192); i=0..1024 */
0x0000, 0xffff, 0x0032, 0xffff, 0x0065, 0xffff, 0x0097, 0xffff,
@@ -305,6 +307,8 @@ static const FIXPU sincos_lookup[2050] = {
0xb505, 0xb505
};
+#endif
+
static const FIXPU pow128_tab[128] = {
/* x_i = 2^(15+i/128) */
0x8000, 0x80b2, 0x8165, 0x8219, 0x82ce, 0x8383, 0x843a, 0x84f2, 0x85ab,
@@ -325,6 +329,7 @@ static const FIXPU pow128_tab[128] = {
};
+
/* dither_table and quant_centroid_table.
* Index 1: [0] - scaled by 2^13, [1] - scaled by 2^13 / sqrt(2)
* Index 2: [0..7] - category