summaryrefslogtreecommitdiff
path: root/apps/codecs/Tremor/floor0.c
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2005-12-28 20:42:24 +0000
committerMagnus Holmgren <magnushol@gmail.com>2005-12-28 20:42:24 +0000
commit41cea75095e6dcd17cff2f57c07553c0ec2a298e (patch)
tree4acd38bc18a591b53526ef4e9948b360e69031c7 /apps/codecs/Tremor/floor0.c
parent074999ded3b7f41ef25167b06b0c618306ed9d5e (diff)
downloadrockbox-41cea75095e6dcd17cff2f57c07553c0ec2a298e.tar.gz
rockbox-41cea75095e6dcd17cff2f57c07553c0ec2a298e.zip
Vorbis optimizations from Brandon Low (part of patch 1387611). Reduces cpu boost ratio on a test track by about 6 percentage points. Also fixes broken simulator playback caused by my previous Tremor commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8291 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/Tremor/floor0.c')
-rw-r--r--apps/codecs/Tremor/floor0.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/codecs/Tremor/floor0.c b/apps/codecs/Tremor/floor0.c
index 0c9542b654..8ea36aba2a 100644
--- a/apps/codecs/Tremor/floor0.c
+++ b/apps/codecs/Tremor/floor0.c
@@ -47,7 +47,7 @@ typedef struct {
47 16.16 format 47 16.16 format
48 returns in m.8 format */ 48 returns in m.8 format */
49 49
50static long ADJUST_SQRT2[2] ICODE_ATTR ={8192,5792}; 50static const long ADJUST_SQRT2[2] ICONST_ATTR ={8192,5792};
51static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){ 51static inline ogg_int32_t vorbis_invsqlook_i(long a,long e){
52 long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1); 52 long i=(a&0x7fff)>>(INVSQ_LOOKUP_I_SHIFT-1);
53 long d=a&INVSQ_LOOKUP_I_MASK; /* 0.10 */ 53 long d=a&INVSQ_LOOKUP_I_MASK; /* 0.10 */
@@ -117,21 +117,21 @@ static inline ogg_int32_t toBARK(int n){
117 } 117 }
118} 118}
119 119
120static const unsigned char MLOOP_1[64] IDATA_ATTR ={ 120static const unsigned char MLOOP_1[64] ICONST_ATTR ={
121 0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13, 121 0,10,11,11, 12,12,12,12, 13,13,13,13, 13,13,13,13,
122 14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14, 122 14,14,14,14, 14,14,14,14, 14,14,14,14, 14,14,14,14,
123 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 123 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
124 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 124 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15,
125}; 125};
126 126
127static const unsigned char MLOOP_2[64] IDATA_ATTR ={ 127static const unsigned char MLOOP_2[64] ICONST_ATTR ={
128 0,4,5,5, 6,6,6,6, 7,7,7,7, 7,7,7,7, 128 0,4,5,5, 6,6,6,6, 7,7,7,7, 7,7,7,7,
129 8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8, 129 8,8,8,8, 8,8,8,8, 8,8,8,8, 8,8,8,8,
130 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, 130 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9,
131 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9, 131 9,9,9,9, 9,9,9,9, 9,9,9,9, 9,9,9,9,
132}; 132};
133 133
134static const unsigned char MLOOP_3[8] IDATA_ATTR ={0,1,2,2,3,3,3,3}; 134static const unsigned char MLOOP_3[8] ICONST_ATTR ={0,1,2,2,3,3,3,3};
135 135
136void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln, 136void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
137 ogg_int32_t *lsp,int m, 137 ogg_int32_t *lsp,int m,
@@ -430,7 +430,7 @@ static int floor0_inverse2(vorbis_block *vb,vorbis_look_floor *i,
430} 430}
431 431
432/* export hooks */ 432/* export hooks */
433vorbis_func_floor floor0_exportbundle={ 433const vorbis_func_floor floor0_exportbundle ICONST_ATTR ={
434 &floor0_unpack,&floor0_look,&floor0_free_info, 434 &floor0_unpack,&floor0_look,&floor0_free_info,
435 &floor0_free_look,&floor0_inverse1,&floor0_inverse2 435 &floor0_free_look,&floor0_inverse1,&floor0_inverse2
436}; 436};