diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2006-08-03 06:07:13 +0000 |
---|---|---|
committer | Loren Merritt <lorenm@u.washington.edu> | 2006-08-03 06:07:13 +0000 |
commit | 32e8763103f52ae7240910cd54e588300541cde7 (patch) | |
tree | bd741692f04dacfe5980cb4249530f0aef871024 /libavcodec/vorbis.c | |
parent | c1985978644677988d63573e0f5433b0c1bf5a00 (diff) | |
download | ffmpeg-32e8763103f52ae7240910cd54e588300541cde7.tar.gz |
another div -> fastdiv, another 2% faster vorbis.
Originally committed as revision 5902 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis.c')
-rw-r--r-- | libavcodec/vorbis.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c index cdf7cee579..0bd318d6b1 100644 --- a/libavcodec/vorbis.c +++ b/libavcodec/vorbis.c @@ -1379,7 +1379,9 @@ static int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, uint_fa 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) { |