aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vorbis_dec.c
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2008-07-15 23:01:15 +0000
committerLoren Merritt <lorenm@u.washington.edu>2008-07-15 23:01:15 +0000
commit1a32536737ce600af24dd325e6bb4f61c2463cf3 (patch)
tree6ca3d42e3f46d1b3e309d27d036772cb9f88aac4 /libavcodec/vorbis_dec.c
parent589790c29413ded9d52b03a160bd2beade435629 (diff)
downloadffmpeg-1a32536737ce600af24dd325e6bb4f61c2463cf3.tar.gz
unroll another common case in vorbis_residue_decode
Originally committed as revision 14250 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_dec.c')
-rw-r--r--libavcodec/vorbis_dec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c
index d4a5402d86..2143db76e5 100644
--- a/libavcodec/vorbis_dec.c
+++ b/libavcodec/vorbis_dec.c
@@ -1330,6 +1330,14 @@ static int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, uint_fa
vec[voffs+k ]+=codebook.codevectors[coffs ]; // FPMATH
vec[voffs+k+vlen]+=codebook.codevectors[coffs+1]; // FPMATH
}
+ } else if(dim==4) {
+ for(k=0;k<step;++k, voffs+=2) {
+ coffs=get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * 4;
+ vec[voffs ]+=codebook.codevectors[coffs ]; // FPMATH
+ vec[voffs+1 ]+=codebook.codevectors[coffs+2]; // FPMATH
+ vec[voffs+vlen ]+=codebook.codevectors[coffs+1]; // FPMATH
+ vec[voffs+vlen+1]+=codebook.codevectors[coffs+3]; // FPMATH
+ }
} else
for(k=0;k<step;++k) {
coffs=get_vlc2(gb, codebook.vlc.table, codebook.nb_bits, 3) * dim;