Mercurial > libavcodec.hg
changeset 3540:f31fda209742 libavcodec
another div -> fastdiv, another 2% faster vorbis.
author | lorenm |
---|---|
date | Thu, 03 Aug 2006 06:07:13 +0000 |
parents | 37adbb172688 |
children | 3fbddeb13686 |
files | vorbis.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vorbis.c Thu Aug 03 05:15:50 2006 +0000 +++ b/vorbis.c Thu Aug 03 06:07:13 2006 +0000 @@ -1379,7 +1379,9 @@ if (vqbook>=0) { uint_fast16_t coffs; - uint_fast16_t step=vr->partition_size/vc->codebooks[vqbook].dimensions; + uint_fast8_t dim= vc->codebooks[vqbook].dimensions; + uint_fast16_t step= dim==1 ? vr->partition_size + : FASTDIV(vr->partition_size, dim); vorbis_codebook codebook= vc->codebooks[vqbook]; if (vr->type==0) {