forked from len0rd/rockbox
libtremor: tiny optimization 0.5%-1.5% on coldfire and PP
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28285 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
055071195c
commit
c1bfe4eb62
1 changed files with 2 additions and 1 deletions
|
@ -277,6 +277,7 @@ static long decode_packed_block(codebook *book, oggpack_buffer *b,
|
|||
long *buf, int n){
|
||||
long *bufptr = buf;
|
||||
long *bufend = buf + n;
|
||||
const unsigned int cachemask = (1<<book->dec_firsttablen)-1;
|
||||
|
||||
while (bufptr<bufend) {
|
||||
if (b->headend > 8) {
|
||||
|
@ -302,7 +303,7 @@ static long decode_packed_block(codebook *book, oggpack_buffer *b,
|
|||
bit+=32;
|
||||
}
|
||||
|
||||
ogg_int32_t entry = book->dec_firsttable[cache&((1<<book->dec_firsttablen)-1)];
|
||||
ogg_int32_t entry = book->dec_firsttable[cache&cachemask];
|
||||
if(UNLIKELY(entry < 0)){
|
||||
const long lo = (entry>>15)&0x7fff, hi = book->used_entries-(entry&0x7fff);
|
||||
entry = bisect_codelist(lo, hi, cache, book->codelist);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue