Mercurial > libavcodec.hg
diff vorbis.c @ 3540:f31fda209742 libavcodec
another div -> fastdiv, another 2% faster vorbis.
author | lorenm |
---|---|
date | Thu, 03 Aug 2006 06:07:13 +0000 |
parents | 545a15c19c91 |
children | 5ea82888103e |
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) {