summaryrefslogtreecommitdiff
path: root/apps/codecs/Tremor/ogg.h
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/ogg.h
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/ogg.h')
-rw-r--r--apps/codecs/Tremor/ogg.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs/Tremor/ogg.h b/apps/codecs/Tremor/ogg.h
index 08d15788c0..e6c78da95e 100644
--- a/apps/codecs/Tremor/ogg.h
+++ b/apps/codecs/Tremor/ogg.h
@@ -184,12 +184,13 @@ static inline void oggpack_adv(oggpack_buffer *b,int bits){
184 bits+=b->headbit; 184 bits+=b->headbit;
185 b->headbit=bits&7; 185 b->headbit=bits&7;
186 b->headptr+=bits/8; 186 b->headptr+=bits/8;
187 if((b->headend-=bits/8)<1)_span(b); 187 if((b->headend-=((unsigned)bits)/8)<1)_span(b);
188} 188}
189 189
190static inline long oggpack_look(oggpack_buffer *b, int bits){ 190static inline long oggpack_look(oggpack_buffer *b, int bits){
191 if(bits+b->headbit < b->headend<<3){ 191 if(bits+b->headbit < b->headend<<3){
192 unsigned long m=(1<<bits)-1; 192 extern const unsigned long oggpack_mask[];
193 unsigned long m=oggpack_mask[bits];
193 unsigned long ret=0; 194 unsigned long ret=0;
194 195
195 bits+=b->headbit; 196 bits+=b->headbit;