From bd60270418add07332505c1d7fd20cc0e031b8de Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 17 Feb 2009 17:01:09 +0000 Subject: 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 --- apps/codecs/libtremor/bitwise.c | 4 ++-- apps/codecs/libtremor/codebook.c | 2 +- apps/codecs/libtremor/floor1.c | 2 +- apps/codecs/libtremor/ogg.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/codecs/libtremor') 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