summaryrefslogtreecommitdiff
path: root/apps/codecs/libtremor
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2009-02-17 17:01:09 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2009-02-17 17:01:09 +0000
commitbd60270418add07332505c1d7fd20cc0e031b8de (patch)
tree2b529d7118e91960cb51350761101ddf3f1fa487 /apps/codecs/libtremor
parent5593de5e7990897bdd350231c76013e17fc4b617 (diff)
Commit FS#9915 by Sei Aoyumi. Adds hints to help GCC better optimize vorbis decoding. Gives a minor speed increase.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20030 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libtremor')
-rw-r--r--apps/codecs/libtremor/bitwise.c4
-rw-r--r--apps/codecs/libtremor/codebook.c2
-rw-r--r--apps/codecs/libtremor/floor1.c2
-rw-r--r--apps/codecs/libtremor/ogg.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/apps/codecs/libtremor/bitwise.c b/apps/codecs/libtremor/bitwise.c
index caa42f4277..dabba468b9 100644
--- a/apps/codecs/libtremor/bitwise.c
+++ b/apps/codecs/libtremor/bitwise.c
@@ -131,8 +131,8 @@ static int _halt_one(oggpack_buffer *b){
}
/* bits <= 32 */
-long oggpack_read(oggpack_buffer *b,int bits) ICODE_ATTR_TREMOR_NOT_MDCT;
-long oggpack_read(oggpack_buffer *b,int bits){
+long oggpack_read(oggpack_buffer *b,register int bits) ICODE_ATTR_TREMOR_NOT_MDCT;
+long oggpack_read(oggpack_buffer *b,register int bits){
unsigned long m=oggpack_mask[bits];
ogg_uint32_t ret=-1;
diff --git a/apps/codecs/libtremor/codebook.c b/apps/codecs/libtremor/codebook.c
index f291686870..dd0908ba6a 100644
--- a/apps/codecs/libtremor/codebook.c
+++ b/apps/codecs/libtremor/codebook.c
@@ -451,7 +451,7 @@ static long vorbis_book_decodevv_add_2ch_even(codebook *book,ogg_int32_t **a,
long vorbis_book_decodevv_add(codebook *book,ogg_int32_t **a,
long offset,int ch,
oggpack_buffer *b,int n,int point){
- if(book->used_entries>0){
+ if(LIKELY(book->used_entries>0)){
long i,j,k,chunk,read;
int chptr=0;
int shift=point-book->binarypoint;
diff --git a/apps/codecs/libtremor/floor1.c b/apps/codecs/libtremor/floor1.c
index 4ee58c18ca..fa81b0d197 100644
--- a/apps/codecs/libtremor/floor1.c
+++ b/apps/codecs/libtremor/floor1.c
@@ -299,7 +299,7 @@ static void render_line(int n, int x0,register int x1,int y0,int y1,ogg_int32_t
if(n>x1)n=x1;
ady-=abs(base*adx);
- if(x<n)
+ if(LIKELY(x<n))
d[x]= MULT31_SHIFT15(d[x],FLOOR_fromdB_LOOKUP[y]);
while(++x<n){
diff --git a/apps/codecs/libtremor/ogg.h b/apps/codecs/libtremor/ogg.h
index 7e2785f117..15ca46b3cd 100644
--- a/apps/codecs/libtremor/ogg.h
+++ b/apps/codecs/libtremor/ogg.h
@@ -142,7 +142,7 @@ typedef struct {
extern void oggpack_readinit(oggpack_buffer *b,ogg_reference *r);
extern long oggpack_look_full(oggpack_buffer *b,int bits);
-extern long oggpack_read(oggpack_buffer *b,int bits);
+extern long oggpack_read(oggpack_buffer *b,register int bits);
/* Inline a few, often called functions */