Commit f1ca40ee authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ab94d1be 1c56cdad
......@@ -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) {
......
......@@ -3058,13 +3058,19 @@ void avformat_close_input(AVFormatContext **ps)
AVFormatContext *s = *ps;
AVIOContext *pb = (s->iformat && (s->iformat->flags & AVFMT_NOFILE)) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ?
NULL : s->pb;
flush_packet_queue(s);
if (s->iformat && (s->iformat->read_close))
s->iformat->read_close(s);
if (s->iformat) {
if (s->iformat->read_close)
s->iformat->read_close(s);
}
avformat_free_context(s);
*ps = NULL;
if (pb)
avio_close(pb);
avio_close(pb);
}
#if FF_API_NEW_STREAM
......
......@@ -3,11 +3,36 @@ fate-ac3-2.0: CMD = pcm -i $(SAMPLES)/ac3/monsters_inc_2.0_192_small.ac3
fate-ac3-2.0: CMP = oneoff
fate-ac3-2.0: REF = $(SAMPLES)/ac3/monsters_inc_2.0_192_small.pcm
FATE_AC3 += fate-ac3-4.0
fate-ac3-4.0: CMD = pcm -i $(SAMPLES)/ac3/millers_crossing_4.0.ac3
fate-ac3-4.0: CMP = oneoff
fate-ac3-4.0: REF = $(SAMPLES)/ac3/millers_crossing_4.0.pcm
FATE_AC3 += fate-ac3-4.0-downmix-mono
fate-ac3-4.0-downmix-mono: CMD = pcm -request_channels 1 -i $(SAMPLES)/ac3/millers_crossing_4.0.ac3
fate-ac3-4.0-downmix-mono: CMP = oneoff
fate-ac3-4.0-downmix-mono: REF = $(SAMPLES)/ac3/millers_crossing_4.0_mono.pcm
FATE_AC3 += fate-ac3-4.0-downmix-stereo
fate-ac3-4.0-downmix-stereo: CMD = pcm -request_channels 2 -i $(SAMPLES)/ac3/millers_crossing_4.0.ac3
fate-ac3-4.0-downmix-stereo: CMP = oneoff
fate-ac3-4.0-downmix-stereo: REF = $(SAMPLES)/ac3/millers_crossing_4.0_stereo.pcm
FATE_AC3 += fate-ac3-5.1
fate-ac3-5.1: CMD = pcm -i $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3
fate-ac3-5.1: CMP = oneoff
fate-ac3-5.1: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small.pcm
FATE_AC3 += fate-ac3-5.1-downmix-mono
fate-ac3-5.1-downmix-mono: CMD = pcm -request_channels 1 -i $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3
fate-ac3-5.1-downmix-mono: CMP = oneoff
fate-ac3-5.1-downmix-mono: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small_mono.pcm
FATE_AC3 += fate-ac3-5.1-downmix-stereo
fate-ac3-5.1-downmix-stereo: CMD = pcm -request_channels 2 -i $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3
fate-ac3-5.1-downmix-stereo: CMP = oneoff
fate-ac3-5.1-downmix-stereo: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small_stereo.pcm
FATE_AC3 += fate-eac3-1
fate-eac3-1: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.eac3
fate-eac3-1: CMP = oneoff
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment