ffmpeg.git
8 years agobuffersink: add AV_BUFFERSINK_FLAG_NO_REQUEST.
Nicolas George [Thu, 19 Apr 2012 15:08:27 +0000 (17:08 +0200)]
buffersink: add AV_BUFFERSINK_FLAG_NO_REQUEST.

8 years agovsrc_buffer: count the number of failed requests.
Nicolas George [Thu, 19 Apr 2012 14:31:20 +0000 (16:31 +0200)]
vsrc_buffer: count the number of failed requests.

8 years agovsrc_buffer: return EAGAIN if no frame is available.
Nicolas George [Tue, 17 Apr 2012 16:31:25 +0000 (18:31 +0200)]
vsrc_buffer: return EAGAIN if no frame is available.

This is not an erroneous condition, do not print a warning.

8 years agoavfiltergraph: add avfilter_graph_request_oldest().
Nicolas George [Wed, 18 Apr 2012 09:02:22 +0000 (11:02 +0200)]
avfiltergraph: add avfilter_graph_request_oldest().

Keep a heap of all sink links ordered by timestamps.

8 years agoavfilter: add a pointer from links to graph.
Nicolas George [Thu, 19 Apr 2012 10:43:33 +0000 (12:43 +0200)]
avfilter: add a pointer from links to graph.

8 years agoavfilter: document request_frame return codes.
Nicolas George [Tue, 17 Apr 2012 16:26:44 +0000 (18:26 +0200)]
avfilter: document request_frame return codes.

8 years agolavf: print a warning if probesize seems not enough.
Nicolas George [Sat, 21 Apr 2012 10:05:23 +0000 (12:05 +0200)]
lavf: print a warning if probesize seems not enough.

8 years agovp8: fix crash due to skiped update_dimensions().
Michael Niedermayer [Mon, 23 Apr 2012 01:29:48 +0000 (03:29 +0200)]
vp8: fix crash due to skiped update_dimensions().

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolowres2 support.
Michael Niedermayer [Sun, 22 Apr 2012 19:37:54 +0000 (21:37 +0200)]
lowres2 support.

The new lowres support is limited to decoders where lowres decoding
is possible in high quality.
I was not able to measure any speed difference, but if one is found
the 2-3 lines that might affect speed can be made compile time conditional

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 22 Apr 2012 20:26:42 +0000 (22:26 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  ARM: allow runtime masking of CPU features
  dsputil: remove unused functions
  mov: Treat keyframe indexes as 1-origin if starting at non-zero.
  mov: Take stps entries into consideration also about key_off.
  Remove lowres video decoding

Conflicts:
ffmpeg.c
ffplay.c
libavcodec/arm/vp8dsp_init_arm.c
libavcodec/libopenjpegdec.c
libavcodec/mjpegdec.c
libavcodec/mpegvideo.c
libavcodec/utils.c
libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoSupport flicvideo with 904 bytes extradata.
Carl Eugen Hoyos [Sun, 22 Apr 2012 20:07:02 +0000 (22:07 +0200)]
Support flicvideo with 904 bytes extradata.

Fixes ticket #1234.

8 years agoffmpeg: assert the refcount of decoded frames
Michael Niedermayer [Sun, 22 Apr 2012 18:10:00 +0000 (20:10 +0200)]
ffmpeg: assert the refcount of decoded frames

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: assert the refcount of allocated frames,
Michael Niedermayer [Sun, 22 Apr 2012 18:08:00 +0000 (20:08 +0200)]
ffmpeg: assert the refcount of allocated frames,

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: assert against creation of cycles in the pools linked list.
Michael Niedermayer [Sun, 22 Apr 2012 18:07:04 +0000 (20:07 +0200)]
ffmpeg: assert against creation of cycles in the pools linked list.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: stricter refcount check in unref_buffer()
Michael Niedermayer [Sun, 22 Apr 2012 18:05:58 +0000 (20:05 +0200)]
ffmpeg: stricter refcount check in unref_buffer()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agompeg12dec: reset data size after parsing extradata.
Michael Niedermayer [Sun, 22 Apr 2012 18:03:53 +0000 (20:03 +0200)]
mpeg12dec: reset data size after parsing extradata.

This ended up corrupting data structures and may possibly
lead to a double free.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoiff: fix null ptr dereference
Michael Niedermayer [Sun, 22 Apr 2012 14:41:21 +0000 (16:41 +0200)]
iff: fix null ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoaudemux: Fix potential integer overflow leading to a division by 0
Michael Niedermayer [Sun, 22 Apr 2012 13:34:21 +0000 (15:34 +0200)]
audemux: Fix potential integer overflow leading to a division by 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoaudemux: Check channels isnt 0
Michael Niedermayer [Sun, 22 Apr 2012 13:32:58 +0000 (15:32 +0200)]
audemux: Check channels isnt 0

Fixes a division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowtvdec: Check that stream private context has been allocated before use.
Michael Niedermayer [Sun, 22 Apr 2012 13:29:34 +0000 (15:29 +0200)]
wtvdec: Check that stream private context has been allocated before use.

This fixes a null ptr dereference with attachments

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomjpegbdec: check SOS/SOF ordering.
Michael Niedermayer [Sun, 22 Apr 2012 12:19:18 +0000 (14:19 +0200)]
mjpegbdec: check SOS/SOF ordering.

Fixes null ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1dec: Require a valid keyframe for decoding non keyframes.
Michael Niedermayer [Sun, 22 Apr 2012 11:56:07 +0000 (13:56 +0200)]
ffv1dec: Require a valid keyframe for decoding non keyframes.

Before this the context could become inconsistent, this lead to a null ptr
dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoARM: allow runtime masking of CPU features
Mans Rullgard [Sat, 21 Apr 2012 14:31:10 +0000 (15:31 +0100)]
ARM: allow runtime masking of CPU features

This allows masking CPU features with the -cpuflags avconv option
which is useful for testing different optimisations without rebuilding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoffmpeg: fix validity test for file index.
Nicolas George [Sun, 22 Apr 2012 10:11:50 +0000 (12:11 +0200)]
ffmpeg: fix validity test for file index.

Also fix a typo in the next line.

8 years agoasv1dec: check extradatasize before reading.
Michael Niedermayer [Sun, 22 Apr 2012 10:16:29 +0000 (12:16 +0200)]
asv1dec: check extradatasize before reading.

Fixes null ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo5: check against scaleable frames in non scaleable streams.
Michael Niedermayer [Sun, 22 Apr 2012 10:09:59 +0000 (12:09 +0200)]
indeo5: check against scaleable frames in non scaleable streams.

Fixes a null ptr dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosmackerdemux: Allocate padding for extradata
Michael Niedermayer [Sun, 22 Apr 2012 09:23:58 +0000 (11:23 +0200)]
smackerdemux: Allocate padding for extradata

Fixes slight overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosvq1dec: Fix overread on very small input
Michael Niedermayer [Sun, 22 Apr 2012 09:10:17 +0000 (11:10 +0200)]
svq1dec: Fix overread on very small input

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmaprodec: tighter check for num_vec_coeffs
Michael Niedermayer [Sun, 22 Apr 2012 01:47:53 +0000 (03:47 +0200)]
wmaprodec: tighter check for num_vec_coeffs

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 21 Apr 2012 20:56:07 +0000 (22:56 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avcodec: remove AVCodecContext.dsp_mask
  avconv: fix a segfault when default encoder for a format doesn't exist.
  utvideo: general cosmetics
  aac: Handle HE-AACv2 when sniffing a channel order.
  movenc: Support high sample rates in isomedia formats by setting the sample rate field in stsd to 0.
  xxan: Remove write-only variable in xan_decode_frame_type0().
  ivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().

Conflicts:
ffmpeg.c
libavcodec/utvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoSupport broken v210 files with 64 byte padding.
Carl Eugen Hoyos [Sat, 21 Apr 2012 20:31:11 +0000 (22:31 +0200)]
Support broken v210 files with 64 byte padding.

Fixes ticket #743.

Reviewed-by: Paul B Mahol
8 years agodnxhddec: check that the indicated bit depth matches the tables.
Michael Niedermayer [Sat, 21 Apr 2012 19:39:18 +0000 (21:39 +0200)]
dnxhddec: check that the indicated bit depth matches the tables.

Fixes crash

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoxldec: move buffer size check up, it can be done before allocating a frame
Michael Niedermayer [Sat, 21 Apr 2012 19:30:51 +0000 (21:30 +0200)]
xldec: move buffer size check up, it can be done before allocating a frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoxldec: Check that width is a multiple of 4
Michael Niedermayer [Sat, 21 Apr 2012 19:29:48 +0000 (21:29 +0200)]
xldec: Check that width is a multiple of 4

Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodsputil: remove unused functions
Mans Rullgard [Sat, 21 Apr 2012 18:51:19 +0000 (19:51 +0100)]
dsputil: remove unused functions

These functions were left unused by the lowres removal.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agomov: Treat keyframe indexes as 1-origin if starting at non-zero.
Yusuke Nakamura [Mon, 16 Apr 2012 14:27:45 +0000 (23:27 +0900)]
mov: Treat keyframe indexes as 1-origin if starting at non-zero.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agomov: Take stps entries into consideration also about key_off.
Yusuke Nakamura [Fri, 13 Apr 2012 10:44:34 +0000 (19:44 +0900)]
mov: Take stps entries into consideration also about key_off.

Splitted files don't start always from a sync sample.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agoRemove lowres video decoding
Mans Rullgard [Thu, 12 Apr 2012 12:55:49 +0000 (13:55 +0100)]
Remove lowres video decoding

This feature is complex, of questionable utility, and slows down
normal decoding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoxmvdemux: prefer av_freep() to deallocate audio stream structs.
Michael Niedermayer [Sat, 21 Apr 2012 17:42:44 +0000 (19:42 +0200)]
xmvdemux: prefer av_freep() to deallocate audio stream structs.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoxmvdemux: dont let current_stream become invalid.
Michael Niedermayer [Sat, 21 Apr 2012 17:41:54 +0000 (19:41 +0200)]
xmvdemux: dont let current_stream become invalid.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavcodec: remove AVCodecContext.dsp_mask
Mans Rullgard [Fri, 20 Apr 2012 13:31:08 +0000 (14:31 +0100)]
avcodec: remove AVCodecContext.dsp_mask

This removes all references to AVCodecContext.dsp_mask and marks
it for eviction at the next version bump.  It has been superseded
by av_set_cpu_flag_mask() which, unlike this field, works everywhere.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agocook: check subacket count
Michael Niedermayer [Sat, 21 Apr 2012 17:28:35 +0000 (19:28 +0200)]
cook: check subacket count

Fixes out of array writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmalossless: Ensure that last frame is not written again if nothing was decoded in...
Jakub Stachowski [Sat, 21 Apr 2012 10:37:25 +0000 (12:37 +0200)]
wmalossless: Ensure that last frame is not written again if nothing was decoded in current packet.

Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffprobe: do not try to decode empty packets.
Nicolas George [Fri, 20 Apr 2012 14:17:54 +0000 (16:17 +0200)]
ffprobe: do not try to decode empty packets.

Fixes sporadic decode failures and trac ticket #997.

8 years agolavfi/setfield: remove stray argument in av_log()
Stefano Sabatini [Sat, 21 Apr 2012 08:28:37 +0000 (10:28 +0200)]
lavfi/setfield: remove stray argument in av_log()

Fix warning:
libavfilter/vf_setfield.c: In function ‘init’:
libavfilter/vf_setfield.c:64:20: warning: too many arguments for format [-Wformat-extra-args]

8 years agolavfi/setfield: rename variable top_field_first to mode
Stefano Sabatini [Sat, 21 Apr 2012 08:26:30 +0000 (10:26 +0200)]
lavfi/setfield: rename variable top_field_first to mode

The new name better reflects the meaning of the variable, after the
recent change.

8 years agolavfi/setfield: add "progressive" option
Tim Nicholson [Fri, 20 Apr 2012 09:51:42 +0000 (10:51 +0100)]
lavfi/setfield: add "progressive" option

Add "prog" parameter value, and deprecate numeric values.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
8 years agoavconv: fix a segfault when default encoder for a format doesn't exist.
Anton Khirnov [Wed, 18 Apr 2012 04:53:11 +0000 (06:53 +0200)]
avconv: fix a segfault when default encoder for a format doesn't exist.

Fail earlier and with a more descriptive error message.

8 years agoRevert "h264: assembly version of get_cabac for x86_64 with PIC (v4)"
Michael Niedermayer [Sat, 21 Apr 2012 00:09:27 +0000 (02:09 +0200)]
Revert "h264: assembly version of get_cabac for x86_64 with PIC (v4)"

This broke compilation on darwin, revert until a better solution is found.

This reverts commit a812b599b504b39a8021827da89d5e23fb361cc9.

8 years agofix swr_convert buffering of packed audio
Andrew Wason [Fri, 20 Apr 2012 21:06:25 +0000 (17:06 -0400)]
fix swr_convert buffering of packed audio

swr_convert is not properly buffering packed input audio when the
output is not large enough, and when resampling is not actually needed
(same samplerate and no SWR_FLAG_RESAMPLE).

buf_set() is only handling the first channel and leaving the others as-is.

Sample program to reproduce the problem is here https://gist.github.com/2431768

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoutvideo: general cosmetics
Jan Ekström [Fri, 20 Apr 2012 13:31:26 +0000 (13:31 +0000)]
utvideo: general cosmetics

General cosmetics, such as keeping lines under 80 characters,
fixing a couple of typos (predition -> prediction) and a
general style fix that was pointed out by Derek when I was having
my sliced multithreading patch in review by him.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agoh264: assembly version of get_cabac for x86_64 with PIC (v4)
Roland Scheidegger [Fri, 20 Apr 2012 00:10:57 +0000 (02:10 +0200)]
h264: assembly version of get_cabac for x86_64 with PIC (v4)

This adds a hand-optimized assembly version for get_cabac much like the
existing one, but it works if the table offsets are RIP-relative.
Compared to the non-RIP-relative version this adds 2 lea instructions
and it needs one extra register.
There is a surprisingly large performance improvement over the c version (more
so than the generated assembly seems to suggest) just in get_cabac, I measured
roughly 40% faster for get_cabac on a K8. However, overall the difference is
not that big, I measured roughly 5% on a test clip on a K8 and a Core2.
Hopefully it still compiles on x86 32bit...
v2: incorporated feedback from Loren Merritt to avoid rip-relative movs
for every table, and got rid of unnecessary @GOTPCREL.
v3: apply similar fixes to the the decode_significance functions, and use
same macro arguments for non-pic case.
v4: prettify inline asm arguments, add a non-fast-cmov version (as I expect
the c code to be faster otherwise since both cmov and sbb suck hard on a
Prescott, even can't construct the mask with a 64bit shift as that's just as
terrible - it's quite difficult to find usable instructions on that chip...).
This is tested to work but not on a P4, in theory it _should_ be fast there.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoaac: Handle HE-AACv2 when sniffing a channel order.
Alex Converse [Fri, 20 Apr 2012 21:01:57 +0000 (14:01 -0700)]
aac: Handle HE-AACv2 when sniffing a channel order.

8 years agomovenc: Support high sample rates in isomedia formats by setting the sample rate...
Alex Converse [Fri, 20 Apr 2012 20:21:28 +0000 (13:21 -0700)]
movenc: Support high sample rates in isomedia formats by setting the sample rate field in stsd to 0.

Libisomediafile appears to always set this field to zero.

8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Fri, 20 Apr 2012 20:18:26 +0000 (22:18 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avcodec: add a cook parser to get subpacket duration
  FATE: allow lavf tests to alter input parameters
  FATE: replace the acodec-pcm_s24daud test with an enc_dec_pcm checksum test
  FATE: replace the acodec-g726 test with 4 new encode/decode tests
  FATE: replace current g722 encoding tests with an encode/decode test
  FATE: add a pattern rule for generating asynth wav files
  FATE: optionally write a WAVE header in audiogen
  avutil: add audio fifo buffer

Conflicts:
doc/APIchanges
libavcodec/version.h
libavutil/avutil.h
tests/Makefile
tests/codec-regression.sh
tests/fate/voice.mak
tests/lavf-regression.sh
tests/ref/acodec/g722
tests/ref/acodec/g726
tests/ref/acodec/pcm_s24daud
tests/ref/lavf/dv_fmt
tests/ref/lavf/gxf
tests/ref/lavf/mxf
tests/ref/lavf/mxf_d10
tests/ref/seek/lavf_dv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoFix compilation with NASM.
Reimar Döffinger [Sun, 15 Apr 2012 17:31:40 +0000 (19:31 +0200)]
Fix compilation with NASM.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoxxan: Remove write-only variable in xan_decode_frame_type0().
Diego Biurrun [Thu, 19 Apr 2012 12:52:10 +0000 (14:52 +0200)]
xxan: Remove write-only variable in xan_decode_frame_type0().

libavcodec/xxan.c:293:13: warning: variable ‘corr_end’ set but not used

8 years agoivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().
Diego Biurrun [Mon, 2 Apr 2012 17:34:44 +0000 (19:34 +0200)]
ivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().

This simplifies the code a bit and avoids an uninitialized variable warning.

8 years agomxfdec: fix memleak on read error/EOF.
Reimar Döffinger [Fri, 20 Apr 2012 18:57:57 +0000 (20:57 +0200)]
mxfdec: fix memleak on read error/EOF.

This also matches the rest of the demuxer which will return
partial packets.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoindeo3: Fix reallocation code so that it doesnt become inconsistent.
Michael Niedermayer [Fri, 20 Apr 2012 16:13:29 +0000 (18:13 +0200)]
indeo3: Fix reallocation code so that it doesnt become inconsistent.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavcodec: add a cook parser to get subpacket duration
Justin Ruggles [Tue, 10 Apr 2012 20:33:45 +0000 (16:33 -0400)]
avcodec: add a cook parser to get subpacket duration

Fixes jittery video playback of rm files with cook audio.

8 years agoac3dec: Check number of output channels.
Michael Niedermayer [Fri, 20 Apr 2012 15:52:33 +0000 (17:52 +0200)]
ac3dec: Check number of output channels.

Fixes out of array write.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavsdec: Set dimensions instead of relying on the demuxer.
Michael Niedermayer [Fri, 20 Apr 2012 15:42:18 +0000 (17:42 +0200)]
avsdec: Set dimensions instead of relying on the demuxer.

This fixes out of array writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: check encoder earlier.
Nicolas George [Fri, 20 Apr 2012 13:17:38 +0000 (15:17 +0200)]
ffmpeg: check encoder earlier.

Fixes a segfault with Ogg output, libtheora not compiled in
and no codec specified.

8 years agoFATE: allow lavf tests to alter input parameters
Justin Ruggles [Tue, 17 Apr 2012 03:38:34 +0000 (23:38 -0400)]
FATE: allow lavf tests to alter input parameters

Change some lavf tests to avoid resampling and channel mixing.

8 years agoFATE: replace the acodec-pcm_s24daud test with an enc_dec_pcm checksum test
Justin Ruggles [Tue, 17 Apr 2012 01:21:30 +0000 (21:21 -0400)]
FATE: replace the acodec-pcm_s24daud test with an enc_dec_pcm checksum test

This avoids resampling and channel mixing by using a source with
the correct channel layout and sample rate.

8 years agoFATE: replace the acodec-g726 test with 4 new encode/decode tests
Justin Ruggles [Tue, 17 Apr 2012 02:42:53 +0000 (22:42 -0400)]
FATE: replace the acodec-g726 test with 4 new encode/decode tests

Avoids resampling and channel mixing. This only tests the behavior
with respect to input and output audio rather than also testing changes
to the encoder or muxer that do not affect the resulting decoded output.

8 years agoFATE: replace current g722 encoding tests with an encode/decode test
Justin Ruggles [Tue, 17 Apr 2012 01:49:11 +0000 (21:49 -0400)]
FATE: replace current g722 encoding tests with an encode/decode test

Avoids resampling and channel mixing. This only tests the behavior
with respect to input and output audio rather than also testing changes
to the encoder or muxer that do not affect the resulting decoded output.

8 years agoFATE: add a pattern rule for generating asynth wav files
Justin Ruggles [Thu, 19 Apr 2012 01:41:01 +0000 (21:41 -0400)]
FATE: add a pattern rule for generating asynth wav files

8 years agoFATE: optionally write a WAVE header in audiogen
Justin Ruggles [Tue, 17 Apr 2012 14:12:38 +0000 (10:12 -0400)]
FATE: optionally write a WAVE header in audiogen

8 years agoavutil: add audio fifo buffer
Justin Ruggles [Fri, 23 Mar 2012 21:45:48 +0000 (17:45 -0400)]
avutil: add audio fifo buffer

The functions operate on the sample level rather than the byte level and work
with all audio sample formats.

8 years agoffv1: add optional per slice CRCs to detect undamaged slices.
Michael Niedermayer [Fri, 20 Apr 2012 13:08:28 +0000 (15:08 +0200)]
ffv1: add optional per slice CRCs to detect undamaged slices.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: move most fields from the frame header to the slice headers with ffv1.3
Michael Niedermayer [Fri, 20 Apr 2012 13:05:36 +0000 (15:05 +0200)]
ffv1: move most fields from the frame header to the slice headers with ffv1.3

This will allow decoding a single undamaged slice even if all others are lost

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: refactor slice decoding init loop so that the first is less a special case
Michael Niedermayer [Fri, 20 Apr 2012 12:57:03 +0000 (14:57 +0200)]
ffv1: refactor slice decoding init loop so that the first is less a special case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: clear slice state in decode_slice()
Michael Niedermayer [Fri, 20 Apr 2012 12:55:09 +0000 (14:55 +0200)]
ffv1: clear slice state in decode_slice()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: split clear_slice_state() out so individual slices can be cleared.
Michael Niedermayer [Fri, 20 Apr 2012 12:51:42 +0000 (14:51 +0200)]
ffv1: split clear_slice_state() out so individual slices can be cleared.

This allows us to clear outside of the main thread for example.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: split init_slice_state() out so individual slices can be inited
Michael Niedermayer [Fri, 20 Apr 2012 12:50:07 +0000 (14:50 +0200)]
ffv1: split init_slice_state() out so individual slices can be inited

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: Add a CRC check to the global header with version 1.3
Michael Niedermayer [Fri, 20 Apr 2012 12:47:24 +0000 (14:47 +0200)]
ffv1: Add a CRC check to the global header with version 1.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolavfi/mp: remove libmpcodecs mirror filter
Stefano Sabatini [Thu, 19 Apr 2012 22:32:20 +0000 (00:32 +0200)]
lavfi/mp: remove libmpcodecs mirror filter

The native libavfilter hflip filter does the same thing.

8 years agolavfi: add avfilter_unref_bufferp()
Robert Nagy [Mon, 16 Apr 2012 06:17:25 +0000 (08:17 +0200)]
lavfi: add avfilter_unref_bufferp()

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
8 years agoavidec: zero extradata padding
Michael Niedermayer [Thu, 19 Apr 2012 20:52:34 +0000 (22:52 +0200)]
avidec: zero extradata padding

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomtvdec: check that the buf is large enough for probing
Michael Niedermayer [Thu, 19 Apr 2012 19:46:51 +0000 (21:46 +0200)]
mtvdec: check that the buf is large enough for probing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agojvdec: Make sure there is enough data for the id string.
Michael Niedermayer [Thu, 19 Apr 2012 19:43:15 +0000 (21:43 +0200)]
jvdec: Make sure there is enough data for the id string.

Previously too little data could lead to a false detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Thu, 19 Apr 2012 18:46:37 +0000 (20:46 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dv: Initialize encoder tables during encoder init.
  dv: Replace some magic numbers by the appropriate #define.
  FATE: pass the decoded output format and audio source file to enc_dec_pcm
  FATE: specify the input format when decoding in enc_dec_pcm()
  x86inc: support AVX abstraction for 2-operand instructions
  configure: detect PGI compiler and set suitable flags
  avconv: check for an incompatible changing channel layout
  avio: make AVIOContext.av_class pointer to const
  nutdec: add malloc check and fix const to non-const conversion warnings

Conflicts:
ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agobuild system: remove -wcast-qual
Michael Niedermayer [Wed, 18 Apr 2012 22:18:30 +0000 (00:18 +0200)]
build system: remove -wcast-qual

Generating warnings when casting const away leads to tight constraints
on the code if one wants to avoid warnings. This is especially true for
generic code that is supposed to work with both const and non const.
These tight constrains cause people to waste time trying to find a
way to write code so it doesnt generate any warning, while people
should rather spend their time thinking on how to write fast,
clean, maintainable and bug free code.
Removing this class of warnings fixes this issue.

Approved-by: Nicolas George <nicolas.george@normalesup.org>
Approved-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomlpdec: set channel variables after checking them
Michael Niedermayer [Thu, 19 Apr 2012 17:50:54 +0000 (19:50 +0200)]
mlpdec: set channel variables after checking them

This fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMake targa-in-mov QuickTime-compatible for more colour-spaces.
Carl Eugen Hoyos [Thu, 19 Apr 2012 15:29:17 +0000 (17:29 +0200)]
Make targa-in-mov QuickTime-compatible for more colour-spaces.

See ticket #1228.

8 years agoRemove .rodata alignment kludge for Mach-O if a recent enough yasm is used.
Nico Weber [Tue, 17 Apr 2012 18:26:01 +0000 (11:26 -0700)]
Remove .rodata alignment kludge for Mach-O if a recent enough yasm is used.

Yasm was fixed in its r2161 and yasm 0.8.0 (Apr 2010) contained this fix.
Nasm was fixed in 2.06 (Jun 2009):
https://groups.google.com/group/alt.lang.asm/browse_thread/thread/fcc85bbc3745d893

I tested with yasm  0.7.99 and yasm 1.2.0.7, where this works fine.

I also tested with nasm. The nasm shipping with Xcode is too old to understand
ffmpeg's assembly, before and after the patch. Nasm 2.10 fails to compile
fft_mmx.asm on trunk with

  libavcodec/x86/fft_mmx.asm:88: panic: section ".text" has already been specified with alignment 32, conflicts with new alignment of 16

but builds fine if I change the two alignment "16"s in x86inc.asm to "32". With this patch,
nasm 2.10 fails with

  libavcodec/x86/fft_mmx.asm:39: panic: section ".rodata" has already been specified with alignment 32, conflicts with new alignment of 16

instead, but again builds fine with s/16/32/.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoPrint unexpected length of flicvideo extradata.
Carl Eugen Hoyos [Thu, 19 Apr 2012 14:07:31 +0000 (16:07 +0200)]
Print unexpected length of flicvideo extradata.

8 years agomxfdec: Add missing break in frame layout parsing
Matthieu Bouron [Fri, 13 Apr 2012 13:32:55 +0000 (15:32 +0200)]
mxfdec: Add missing break in frame layout parsing

Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomxf: Fix frame layout values
Matthieu Bouron [Fri, 13 Apr 2012 13:28:52 +0000 (15:28 +0200)]
mxf: Fix frame layout values

Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoh263dec: Check for width/height changes on frame skips too.
Michael Niedermayer [Thu, 19 Apr 2012 12:37:35 +0000 (14:37 +0200)]
h263dec: Check for width/height changes on frame skips too.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodv: Initialize encoder tables during encoder init.
Diego Biurrun [Wed, 18 Apr 2012 16:47:16 +0000 (18:47 +0200)]
dv: Initialize encoder tables during encoder init.

8 years agoerror_concealment: Check that the reference is not NULL
Michael Niedermayer [Thu, 19 Apr 2012 10:14:08 +0000 (12:14 +0200)]
error_concealment: Check that the reference is not NULL

In normal picture decoding this does not need to be checked but as
error concealment is run in the case of errors the availability of
references is less certain. This may be fixed differently at some
point so that all references are always filled in before the EC
code, in which case this should then be changed to an assert()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoerror_concealment: make sure mbaff flags are 0 as interlaced is not supported.
Michael Niedermayer [Thu, 19 Apr 2012 10:09:33 +0000 (12:09 +0200)]
error_concealment: make sure mbaff flags are 0 as interlaced is not supported.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoerror_concealment: switch asserts mostly to av_asserts.
Michael Niedermayer [Thu, 19 Apr 2012 10:02:29 +0000 (12:02 +0200)]
error_concealment: switch asserts mostly to av_asserts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovc1dec: check that coded slice positions and interlacing match.
Michael Niedermayer [Thu, 19 Apr 2012 09:02:22 +0000 (11:02 +0200)]
vc1dec: check that coded slice positions and interlacing match.

This fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoh263dec: always enable picture dimensions reverting check.
Michael Niedermayer [Thu, 19 Apr 2012 08:43:46 +0000 (10:43 +0200)]
h263dec: always enable picture dimensions reverting check.

This does not need to be limited to threads and may help with error
resilience on single thread

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodv: Replace some magic numbers by the appropriate #define.
Diego Biurrun [Wed, 18 Apr 2012 14:05:17 +0000 (16:05 +0200)]
dv: Replace some magic numbers by the appropriate #define.

8 years agoFATE: pass the decoded output format and audio source file to enc_dec_pcm
Justin Ruggles [Tue, 17 Apr 2012 15:47:57 +0000 (16:47 +0100)]
FATE: pass the decoded output format and audio source file to enc_dec_pcm

This will allow decoding to md5 and doing a diff comparison to a reference
checksum instead of a fuzzy stddev or oneoff comparison.

Signed-off-by: Mans Rullgard <mans@mansr.com>