diff options
| author | Nils Wallménius <nils@rockbox.org> | 2010-11-18 15:51:59 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2010-11-18 15:51:59 +0000 |
| commit | 8a2c480af7fd60c1f8c1f94c00676ae0d5e1e4a8 (patch) | |
| tree | dffe17e57de1fbf56fc919f8a2e1d02380c1400a | |
| parent | 3806584dbe10c31ff8f68695dee50cbb113605a3 (diff) | |
| download | rockbox-8a2c480af7fd60c1f8c1f94c00676ae0d5e1e4a8.zip rockbox-8a2c480af7fd60c1f8c1f94c00676ae0d5e1e4a8.tar.gz rockbox-8a2c480af7fd60c1f8c1f94c00676ae0d5e1e4a8.tar.bz2 rockbox-8a2c480af7fd60c1f8c1f94c00676ae0d5e1e4a8.tar.xz | |
libtremor: Use larger cachesize for codebook decoding on targets with 1MB codec buffer.
speedups as follows:
~3%/2MHz on high bitrate files (500kbps) on Gigabeat S
~1%/0.5MHz on high bitrate files (500kbps) on Fuze v1
~3%/1MHz (128kbps) - 12%/7MHz (500kbps) on H300
~2%/0.5MHz (128kbps) - 10%/3.5MHz (500kbps) on C200 v1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28615 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/codecs/libtremor/sharedbook.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/codecs/libtremor/sharedbook.c b/apps/codecs/libtremor/sharedbook.c index c47476b..9519976 100644 --- a/apps/codecs/libtremor/sharedbook.c +++ b/apps/codecs/libtremor/sharedbook.c @@ -391,7 +391,13 @@ int vorbis_book_init_decode(codebook *c,const static_codebook *s){ c->dec_codelengths[sortindex[n++]]=s->lengthlist[i]; _ogg_free(sortindex); +/* Use a larger cache size when we have a large codec buffer, helps decoding + speed especially on targets with slow memory and high bitrate files */ +#if CODEC_SIZE < 0x100000 c->dec_firsttablen=_ilog(c->used_entries)-4; /* this is magic */ +#else + c->dec_firsttablen=_ilog(c->used_entries)+1; /* this is magic */ +#endif if(c->dec_firsttablen<5)c->dec_firsttablen=5; if(c->dec_firsttablen>8)c->dec_firsttablen=8; |