projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c198597
)
another div -> fastdiv, another 2% faster vorbis.
author
Loren Merritt
<lorenm@u.washington.edu>
Thu, 3 Aug 2006 06:07:13 +0000
(06:07 +0000)
committer
Loren Merritt
<lorenm@u.washington.edu>
Thu, 3 Aug 2006 06:07:13 +0000
(06:07 +0000)
Originally committed as revision 5902 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/vorbis.c
patch
|
blob
|
history
diff --git
a/libavcodec/vorbis.c
b/libavcodec/vorbis.c
index
cdf7cee
..
0bd318d
100644
(file)
--- 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) {