diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-15 10:09:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-15 10:35:26 +0200 |
commit | f1ca40ee00402102046fc7e59606651930436b0e (patch) | |
tree | d64b21cfabf26f3a2b1a3208745b6cc7e7081a26 /libavcodec | |
parent | ab94d1be7a32f6d3714935ad5ae551a753024ae6 (diff) | |
parent | 1c56cdad337a39951f26b17bdc8068d75a19ffca (diff) | |
download | ffmpeg-f1ca40ee00402102046fc7e59606651930436b0e.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
riff: Add SVQ3 fourcc
fate: ac3: add 4.0 and downmix tests
configure: x86: improve ebp availability check
vorbisdec: ensure FASTDIV denominator is never 1
avformat: refactor avformat_close_input
avformat: simplify avformat_close_input
Conflicts:
configure
libavcodec/vorbisdec.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vorbisdec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index d0709331e5..8ce0fc7c83 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1356,8 +1356,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, if (vqbook >= 0 && vc->codebooks[vqbook].codevectors) { unsigned coffs; unsigned dim = vc->codebooks[vqbook].dimensions; - unsigned step = dim == 1 ? vr->partition_size - : FASTDIV(vr->partition_size, dim); + unsigned step = FASTDIV(vr->partition_size << 1, dim << 1); vorbis_codebook codebook = vc->codebooks[vqbook]; if (vr_type == 0) { @@ -1411,7 +1410,7 @@ static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc, } } else if (vr_type == 2) { - unsigned voffs_div = ch == 1 ? voffset : FASTDIV(voffset, ch); + unsigned voffs_div = FASTDIV(voffset << 1, ch <<1); unsigned voffs_mod = voffset - voffs_div * ch; for (k = 0; k < step; ++k) { |