Commit Graph

1646 Commits

Author SHA1 Message Date
Michael Niedermayer 6968a7d193 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doc/general: update supported devices table.
  doc/general: add missing @tab to codecs table.
  h264: Fix invalid interlaced/progressive MB combinations for direct mode prediction.
  avconv: reindent
  avconv: link '-passlogfile' option to libx264 'stats' AVOption.
  libx264: add 'stats' private option for setting 2pass stats filename.
  libx264: fix help text for slice-max-size option.
  http: Clear the auth state on redirects
  http: Retry auth if it failed due to being stale
  rtsp: Resend new keepalive commands if they used stale auth
  rtsp: Retry authentication if failed due to being stale
  httpauth: Parse the stale field in digest auth
  dxva2_vc1: pass the overlap flag to the decoder
  dxva2_vc1: fix decoding of BI frames
  FATE: add shorthand to wavpack test
  dfa: convert to bytestream2 API
  anm decoder: move buffer allocation from decode_init() to decode_frame()
  h264: improve parsing of broken AVC SPS

Conflicts:
	ffmpeg.c
	libavcodec/anm.c
	libavcodec/dfa.c
	libavcodec/h264.c
	libavcodec/h264_direct.c
	libavcodec/h264_ps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-14 02:10:11 +01:00
Paul B Mahol 6efe180782 FATE: add shorthand to wavpack test
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-12 21:47:47 -07:00
Paul B Mahol 5a877d9530 FATE: add test for cdxl demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-12 17:01:58 +02:00
Paul B Mahol 4ed0d182e2 FATE: add test for cdxl demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-11 17:25:29 +01:00
Michael Niedermayer ad53c7f9ec lavf: Add system to seperate relative timestamps from absolute ones.
With this we can always know if a timestamp is based on added durations
from an unknown origin or if it is based on a correct timestamp (and possibly
added durations)
This should fix some bugs where this distinction was mixed up.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-09 19:36:12 +01:00
Michael Niedermayer 6df42f9874 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  SBR DSP: fix SSE code to not use SSE2 instructions.
  cpu: initialize mask to -1, so that by default, optimizations are used.
  error_resilience: initialize s->block_index[].
  svq3: protect against negative quantizers.
  Don't use ff_cropTbl[] for IDCT.
  swscale: make filterPos 32bit.
  FATE: add CPUFLAGS variable, mapping to -cpuflags avconv option.
  avconv: add -cpuflags option for setting supported cpuflags.
  cpu: add av_set_cpu_flags_mask().
  libx264: Allow overriding the sliced threads option
  avconv: fix counting encoded video size.

Conflicts:
	doc/APIchanges
	doc/fate.texi
	doc/ffmpeg.texi
	ffmpeg.c
	libavcodec/h264idct_template.c
	libavcodec/svq3.c
	libavutil/avutil.h
	libavutil/cpu.c
	libavutil/cpu.h
	libswscale/swscale.c
	tests/Makefile
	tests/fate-run.sh
	tests/regression-funcs.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-07 03:22:49 +01:00
Anton Khirnov 018f39ef49 FATE: add CPUFLAGS variable, mapping to -cpuflags avconv option. 2012-03-06 15:03:36 +01:00
Michael Niedermayer f095391a14 Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  cdxl demux: do not create packets with uninitialized data at EOF.
  Replace computations of remaining bits with calls to get_bits_left().
  amrnb/amrwb: Remove get_bits usage.
  cosmetics: reindent
  avformat: do not require a pixel/sample format if there is no decoder
  avformat: do not fill-in audio packet duration in compute_pkt_fields()
  lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
  dca_parser: parse the sample rate and frame durations
  libspeexdec: do not set AVCodecContext.frame_size
  libopencore-amr: do not set AVCodecContext.frame_size
  alsdec: do not set AVCodecContext.frame_size
  siff: do not set AVCodecContext.frame_size
  amr demuxer: do not set AVCodecContext.frame_size.
  aiffdec: do not set AVCodecContext.frame_size
  mov: do not set AVCodecContext.frame_size
  ape: do not set AVCodecContext.frame_size.
  rdt: remove workaround for infinite loop with aac
  avformat: do not require frame_size in avformat_find_stream_info() for CELT
  avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3
  avformat: do not require frame_size in avformat_find_stream_info() for AAC
  ...

Conflicts:
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/h264_ps.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/dsputil_mmx.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-06 06:03:32 +01:00
Justin Ruggles 6c65cf58fd lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
Also, do not give AVCodecContext.frame_size priority for muxing.

Updated 2 FATE references:
dxa-feeble - adds 1 audio frame that is still within 2 seconds as specified
             by -t 2 in the FATE test
wmv8-drm-nodec - durations are not needed. previously they were estimated
                 using the packet size and average bit rate.
2012-03-05 13:08:18 -05:00
Justin Ruggles 8d1a20aa7c aiffdec: do not set AVCodecContext.frame_size
It is unnecessary. Also, for some codecs we're reading more than 1 frame per
packet. Instead we use a private context variable to calculate the bit rate,
stream duration, and packet durations.

Updated FATE seek test, which has slightly different timestamps due to a
more accurate bit rate calculation.
2012-03-05 13:08:17 -05:00
Anton Khirnov 27c7ca9c12 lavf: deobfuscate read_frame_internal().
Split off packet parsing into a separate function. Parse full packets at
once and store them in a queue, eliminating the need for tracking
parsing state in AVStream.

The horrible unreadable loop in read_frame_internal() now isn't weirdly
ordered and doesn't contain evil gotos, so it should be much easier to
understand.

compute_pkt_fields() now invents slightly different timestamps for two
raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't
be more wrong (or right) than previous ones.
2012-03-05 18:47:05 +01:00
Michael Niedermayer 2af8f2cea6 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  cmdutils: use new avcodec_is_decoder/encoder() functions.
  lavc: make codec_is_decoder/encoder() public.
  lavc: deprecate AVCodecContext.sub_id.
  libcdio: add a forgotten AVClass to the private context.
  swscale: remove "cpu flags" from -sws_flags description.
  proresenc: give user a possibility to alter some encoding parameters
  vorbisenc: add output buffer overwrite protection
  libopencore-amrnbenc: fix end-of-stream handling
  ra144enc: fix end-of-stream handling
  nellymoserenc: zero any leftover packet bytes
  nellymoserenc: use proper MDCT overlap delay
  qpeg: Use bytestream2 functions to prevent buffer overreads.
  swscale: make %rep unconditional.
  vp8: convert simple loopfilter x86 assembly to use named arguments.
  vp8: convert idct x86 assembly to use named arguments.
  vp8: convert mc x86 assembly to use named arguments.
  vp8: convert loopfilter x86 assembly to use cpuflags().
  vp8: convert idct/mc x86 assembly to use cpuflags().
  swscale: remove now unnecessary hack.
  x86inc: don't "bake" stack_offset in named arguments.
  ...

Conflicts:
	cmdutils.c
	doc/APIchanges
	libavcodec/mpeg12.c
	libavcodec/options.c
	libavcodec/qpeg.c
	libavcodec/utils.c
	libavcodec/version.h
	libavdevice/libcdio.c
	tests/lavf-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-05 00:15:55 +01:00
Michael Niedermayer 337fa0dbe7 lavf: Do not compute the packet duration based on the bitrate if the frame_size can be determined.
This fixes issues when the bitrate is variable or inaccurate but the
frame size has not been determined yet.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-04 04:27:01 +01:00
Michael Niedermayer 15c6be8c7d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  tiertexseq: set correct block_align for audio
  tiertexseq: set audio stream start time to 0
  voc/avs: Do not change the sample rate mid-stream.
  segafilm: use the sample rate as the time base for audio streams
  ea: fix audio pts
  psx-str: fix audio pts
  vqf: set packet duration
  tta demuxer: set packet duration
  mpegaudio_parser: do not ignore information from the first parsed frame
  mpegaudio_parser: be less picky about the start position
  thp: set audio packet durations
  avcodec: add a Vorbis parser to get packet duration
  vorbisdec: read the previous window flag for long windows
  lavc: free the output packet when encoding failed or produced no output.
  lavc: preserve avpkt->destruct in ff_alloc_packet().
  lavc: clarify the meaning of AVCodecContext.frame_number.
  mpegts: Pad the packet buffer in handle_packet().
  mpegts: Do not call read_sl_header() when no bytes remain in the buffer.

Conflicts:
	libavcodec/mpegaudio_parser.c
	libavcodec/version.h
	libavformat/mpegts.c
	tests/ref/fate/pva-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-04 04:26:04 +01:00
Derek Buitenhuis 6aa6e3e814 fate: Add sunrast regression test
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-03 20:57:03 -05:00
Justin Ruggles 51ddf35c90 wmaenc: fix m/s stereo encoding for the first frame
We need to set ms_stereo in encode_init() in order to avoid incorrectly
encoding the first frame as non-m/s while flagging it as m/s. Fixes an
uncomfortable pop in the left channel at the start of playback.

CC:libav-stable@libav.org
2012-03-03 18:20:10 -05:00
Justin Ruggles f9cf91d822 tiertexseq: set audio stream start time to 0
Update FATE test to reflect delayed video due to the file having audio-only
frames prior to the first frame with video.
2012-03-03 17:03:27 -05:00
Justin Ruggles 0883109b27 voc/avs: Do not change the sample rate mid-stream.
Also, set the time base based on the sample rate.
lavf-voc seek test updated to reflect slightly different seek points.
2012-03-03 17:03:27 -05:00
Justin Ruggles d0ab585074 vqf: set packet duration
Fixes timestamp calculation.
The FATE reference is updated because timestamp calculations are now more
accurate. Previous timestamps were based on average bit rate.
2012-03-03 17:03:26 -05:00
Justin Ruggles 0b8b7db01b mpegaudio_parser: do not ignore information from the first parsed frame
Update some demuxing and seeking fate tests.
2012-03-03 17:03:26 -05:00
Michael Niedermayer 268098d8b2 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  amrwb: remove duplicate arguments from extrapolate_isf().
  amrwb: error out early if mode is invalid.
  h264: change underread for 10bit QPEL to overread.
  matroska: check buffer size for RM-style byte reordering.
  vp8: disable mmx functions with sse/sse2 counterparts on x86-64.
  vp8: change int stride to ptrdiff_t stride.
  wma: fix invalid buffer size assumptions causing random overreads.
  Windows Media Audio Lossless decoder
  rv10/20: Fix slice overflow with checked bitstream reader.
  h263dec: Disallow width/height changing with frame threads.
  rv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
  rmdec: Honor .RMF tag size rather than assuming 18.
  g722: Fix the QMF scaling
  r3d: don't set codec timebase.
  electronicarts: set timebase for tgv video.
  electronicarts: parse the framerate for cmv video.
  ogg: don't set codec timebase
  electronicarts: don't set codec timebase
  avs: don't set codec timebase
  wavpack: Fix an integer overflow
  ...

Conflicts:
	libavcodec/arm/vp8dsp_init_arm.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/msmpeg4.c
	libavcodec/pnmdec.c
	libavcodec/qpeg.c
	libavcodec/rawenc.c
	libavcodec/ulti.c
	libavcodec/vcr1.c
	libavcodec/version.h
	libavcodec/wmalosslessdec.c
	libavformat/electronicarts.c
	libswscale/ppc/yuv2rgb_altivec.c
	tests/ref/acodec/g722
	tests/ref/fate/ea-cmv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-03 00:23:10 +01:00
Martin Storsjö b087ce2bee g722: Fix the QMF scaling
This fixes clipping if the encoder input used the full 16 bit
input range (samples with a magnitude below 16383 worked fine).
The filtered subband samples should be 15 bit maximum, while
the code earlier produced them scaled to 16 bit.

This makes the decoder output have double the magnitude
compared to before.

The spec reference samples doesn't test the QMF at all, which
was why this part slipped past initially.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-02 18:58:19 +02:00
Anton Khirnov efec3bc65a electronicarts: set timebase for tgv video.
The container has no timestamps and the framerate isn't stored in the
data either.
The decoder sets codec timebase to experimentally found value 1/15. Do
the same for the demuxer too, it should at least be better than the
default 1/90000.
2012-03-02 11:11:38 +01:00
Anton Khirnov e39400c3a8 electronicarts: parse the framerate for cmv video. 2012-03-02 11:11:38 +01:00
Anton Khirnov 1d3144c318 electronicarts: don't set codec timebase
Demuxers are not supposed to set it.
Set stream timebase and framerates instead (this is a cfr container with
no timestamps).
2012-03-02 11:11:38 +01:00
Michael Niedermayer 0b90db01b5 lavf: fix update_initial_durations() so it handles missing durations with the initial timestamp being known.
This fixes duplicate timestamps on mp2 in ts with non seekable input.
It also fixed the fate pva demux timestamps.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-02 06:38:03 +01:00
Derek Buitenhuis d91912effa fate: Add sunrast regression test
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-02 02:35:08 +01:00
Michael Niedermayer 79ae084e9b Merge remote-tracking branch 'qatar/master'
* qatar/master: (58 commits)
  amrnbdec: check frame size before decoding.
  cscd: use negative error values to indicate decode_init() failures.
  h264: prevent overreads in intra PCM decoding.
  FATE: do not decode audio in the nuv test.
  dxa: set audio stream time base using the sample rate
  psx-str: do not allow seeking by bytes
  asfdec: Do not set AVCodecContext.frame_size
  vqf: set packet parameters after av_new_packet()
  mpegaudiodec: use DSPUtil.butterflies_float().
  FATE: add mp3 test for sample that exhibited false overreads
  fate: add cdxl test for bit line plane arrangement
  vmnc: return error on decode_init() failure.
  libvorbis: add/update error messages
  libvorbis: use AVFifoBuffer for output packet buffer
  libvorbis: remove unneeded e_o_s check
  libvorbis: check return values for functions that can return errors
  libvorbis: use float input instead of s16
  libvorbis: do not flush libvorbis analysis if dsp state was not initialized
  libvorbis: use VBR by default, with default quality of 3
  libvorbis: fix use of minrate/maxrate AVOptions
  ...

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/dpxenc.c
	libavcodec/libvorbis.c
	libavcodec/vmnc.c
	libavformat/asfdec.c
	libavformat/id3v2enc.c
	libavformat/internal.h
	libavformat/mp3enc.c
	libavformat/utils.c
	libavformat/version.h
	libswscale/utils.c
	tests/fate/video.mak
	tests/ref/fate/nuv
	tests/ref/fate/prores-alpha
	tests/ref/lavf/ffm
	tests/ref/vsynth1/prores
	tests/ref/vsynth2/prores

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-01 03:17:11 +01:00
Justin Ruggles f240df6a74 FATE: do not decode audio in the nuv test.
We already have sufficient coverage for 16-bit pcm.
2012-02-29 15:45:50 -05:00
Justin Ruggles 841c17177b FATE: add mp3 test for sample that exhibited false overreads
related to b716542691
Error messages and audible artifacts were fixed in that commit.
2012-02-29 15:12:18 -05:00
Paul B Mahol 31b132c094 fate: add cdxl test for bit line plane arrangement
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-29 15:11:05 -05:00
Martin Storsjö 85b221e4d3 dpxenc: Don't include the libavcodec ident if bitexact mode is enabled
This avoids breaking fate every time the lavc version is bumped.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-29 20:08:09 +02:00
Kostya Shishkov 12b812d2e5 prores: store and retrieve extended colourspace information
Based on the patch by Phil Barrett.
2012-02-29 09:29:02 +01:00
Kostya Shishkov 235d693286 prores: handle 444 chroma in right order
ProRes codes chroma blocks in 444 mode in different order than luma blocks,
so make both decoder and encoder read/write chroma blocks in right order.

Reported by Phil Barrett
2012-02-29 09:28:34 +01:00
Anton Khirnov 63efd83ae1 mpegvideo_enc: add chroma/luma_elim_threshold private options.
Deprecate corresponding AVCodecContext fields.
2012-02-29 07:23:31 +01:00
Anton Khirnov ff71a383ac mpegvideo_enc: add qp_rd flag to mpv_flags.
Deprecate CODEC_FLAG_QP_RD.
2012-02-29 07:12:10 +01:00
Michael Niedermayer 52ae41a874 fate: disable deshake test as it isnt binary identical across archs.
probably due to float rounding

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-29 07:03:04 +01:00
Michael Niedermayer 9aa7b3cd53 fate: switch lavfi-pp targets which need bitexact flags to use them.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-29 02:24:59 +01:00
Michael Niedermayer 0ae9b32e51 fate: More libpostproc tests to improve coverage.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-29 01:45:36 +01:00
Michael Niedermayer 1ebc5e71a0 tests: add libpostproc test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 16:34:06 +01:00
Michael Niedermayer e3822886eb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec_default_reget_buffer(): fix compilation in DEBUG mode
  fate: Overhaul WavPack coverage
  h264: fix mmxext chroma deblock to use correct TC values.
  flvdec: Remove the now redundant check for known broken metadata creator
  flvdec: Validate index entries added from metadata while reading
  rtsp: Handle requests from server to client
  movenc: use timestamps instead of frame_size for samples-per-packet
  movenc: use the first cluster duration as the tfhd default duration
  movenc: factorize calculation of cluster duration into a separate function
  doc/APIchanges: fill in missing dates and hashes.
  lavc: reorder AVCodecContext fields.
  lavc: reorder AVFrame fields.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavformat/flvdec.c
	libavformat/movenc.c
	tests/fate/lossless-audio.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 03:38:58 +01:00
Derek Buitenhuis 273f4b39fc fate: Overhaul WavPack coverage
WavPack has a comprehensive test suite, and a bunch
of corner cases.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-27 09:40:36 -08:00
Nicolas George a4c22e3cac fate: add test for the life video source. 2012-02-27 17:13:21 +01:00
Nicolas George 48f3d43113 fate: add test for the unsharp video filter. 2012-02-27 14:45:14 +01:00
Nicolas George d8cf9d8a6c fate: add test for the transpose video filter. 2012-02-27 14:45:14 +01:00
Nicolas George b0de06aee6 fate: add test for the thumbnail video filter. 2012-02-27 14:45:14 +01:00
Nicolas George 01f1468eff fate: add test for the select video filter. 2012-02-27 14:45:14 +01:00
Nicolas George f2a05174eb fate: add test for the pad video filter. 2012-02-27 14:45:14 +01:00
Nicolas George 220de4fa20 fate: add test for the overlay video filter.
The test also covers somewhat the split, scale,
pad and fifo filters and the graph parser.
2012-02-27 14:45:13 +01:00
Nicolas George 9380003087 fate: add test for the fade video filter. 2012-02-27 14:45:13 +01:00