Commit Graph

86583 Commits

Author SHA1 Message Date
Paul B Mahol 565dc0e283 avfilter/vf_overlay: add auto format mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-24 10:18:30 +02:00
James Almer e5bce8b4ce fate: update checksums for fate-lavf-ffm and fate-lavf-mxf
<@jamrial> durandal_1707: 04aa09c4bc broke fate-lavf-ffm and fate-lavf-mxf
<@durandal_1707> how so?
<@jamrial> one byte changes
<@durandal_1707> jamrial: just update checksums
<@jamrial> durandal_1707: but why did they change at all? the commit you reverted didn't affect them
<@jamrial> why does reverting it affect these tests?
<@jamrial> i don't think updating the checksum without knowing what changed is a good idea
<@durandal_1707> jamrial: the lavfi core is in weird state after removal of recursive code
<@durandal_1707> jamrial: the change is that older ones would get progressive flag set and new one doesnt
<@jamrial> alright
2017-06-24 01:52:09 -03:00
James Almer 349446e36f x86/mdct15: use three operand form for some instructions
Fixes compilation with old yasm
2017-06-24 01:44:49 -03:00
Reino17 078322f33c Add support for LibOpenJPEG v2.2/git
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
2017-06-23 20:29:23 -07:00
James Almer a579dbb4f7 checkasm: add missing checks to float_dsp's butterflies_float test 2017-06-23 23:38:07 -03:00
Rostislav Pehlivanov e1120b1c54 mdct15: add assembly optimizations for the 15-point FFT
c:    1802 decicycles in fft15,16774635 runs,   2581 skips
avx:   865 decicycles in fft15,16776378 runs,    838 skips

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-06-23 23:45:37 +01:00
James Almer f66086adac configure: fix assignment of assembler specific flags
If the first assembler to be probed is an old nasm build, X86ASM_DEPFLAGS
will be set and remain so after yasm is ultimately used as fallback.
This results in yasm being called with said nasm specific flags and failing
during actual object assembly but not with configure sanity checks.

Regression since 5cae5a1def

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-23 17:55:14 -03:00
Paul B Mahol 04aa09c4bc Revert "lavfi/buffersrc: push the frame deeper if requested."
Fixes framesync filters with shortest option enabled.

This reverts commit 0ff5567a30.
2017-06-23 16:18:42 +02:00
jerett 9f26d670e4 lavc/videotoolboxenc: fix open videotoolbox bug on iOS8.4
Checks for NULL before using object.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2017-06-23 09:37:34 -04:00
jerett 82a8724df2 lavc/videotoolboxenc: fix loadVTEncSymbols crash when symbol not found
Signed-off-by: Rick Kern <kernrj@gmail.com>
2017-06-23 09:37:34 -04:00
Jun Zhao ea1d07aed9 lavc/golomb: add value range comment for set_ue_golomb().
set_ue_golomb just support 2^16 - 2 at most, becase this function call
put_bits, and put_bits just support write up to 31 bits, when write 32
bit in put_bits, it's will overwrite the bit buffer, and the default
assert level is 0, the av_assert2(n <= 31 && value < (1U << n)) in
put_bits can not be trigger runtime.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-23 13:03:20 +02:00
Michael Niedermayer 24e95f9d4d avcodec/wavpack: Fix integer overflow
Fixes: runtime error: signed integer overflow: 227511904 + 1964113935 cannot be represented in type 'int'
Fixes: 2331/clusterfuzz-testcase-minimized-6182185830711296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-23 03:03:04 +02:00
Michael Niedermayer 0c2ef4f6b4 avcodec/takdec: Fix integer overflow
Fixes: runtime error: signed integer overflow: 512 + 2147483146 cannot be represented in type 'int'
Fixes: 2314/clusterfuzz-testcase-minimized-4519333877252096

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-23 03:03:04 +02:00
Michael Niedermayer 27f80ab016 avcodec/tiff: Update pointer only when the result is used
Fixes: runtime error: signed integer overflow: 538976288 * 32 cannot be represented in type 'int'
Fixes: 2310/clusterfuzz-testcase-minimized-4534784887881728

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-23 03:03:04 +02:00
Rostislav Pehlivanov 7e98da9c4f opus_celt: do not use double precision exp2
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-06-22 22:37:53 +01:00
James Almer 505cb8e390 avformat/oggenc: check for stream private data in ogg_free()
Fixes a NULL pointer derefence when ogg_init() returns a failure and
a stream's private data was not yet allocated.

This is a regression since 3c5a53cdfa

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-22 16:12:51 -03:00
Matthieu Bouron 067e42b851 checkasm/aarch64: fix tests returning a float
Avoids overriding the v0 register (which containins the result of the
tested function) in checkasm_call_checked.
2017-06-22 09:18:10 +02:00
Michael Niedermayer 6f1d2355a7 avcodec/cfhd: Check bpc before setting bpc in context
Fixes: runtime error: shift exponent 32 is too large for 32-bit type 'int'
Fixes: 2306/clusterfuzz-testcase-minimized-5002997392211968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-22 01:54:40 +02:00
Michael Niedermayer 5a950f4e32 avcodec/cfhd: Fix undefined shift
Fixes: runtime error: left shift of negative value -1
Fixes: 2303/clusterfuzz-testcase-minimized-5529675273076736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-22 01:54:40 +02:00
Diego Biurrun 5cae5a1def configure: Move x86 assembler sanity check into assembler probe function
This allows for more graceful fallback from NASM to Yasm if the available
NASM version is too old.

(Cherry-picked from libav commit adfd7892e3)
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:31 -03:00
Diego Biurrun 4f9297ac3b build: Prefer NASM assembler over YASM
NASM is more actively maintained and permits generating dependency information
as a sideeffect of assembling, thus cutting build times in half.

(Cherry-picked from libav commit 57b753b445)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:30 -03:00
James Almer 3cc73d3d6d build: fix commandline selection of nasm
"nasm --version" works on nasm since around version 2.11 and as
such configure assumed it was yasm.

Based on libav commit f54037da8a by
Diego Biurrun.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:30 -03:00
Diego Biurrun d44935cbf4 build: Explicitly set 32-bit/64-bit object formats for nasm/yasm
Consistently use object format names with "32" suffix and set object format
to "win64" on Windows x86_64, which fixes assembling with nasm.

(Cherry-picked from libav commit 808ef43597)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:30 -03:00
Diego Biurrun 0cc0c5b6db build: Allow generating dependencies as a side-effect of assembling
(Cherry-picked from libav commit 3c0efbd033)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:29 -03:00
Diego Biurrun fd502f4f5f build: Generalize yasm/nasm-related variable names
None of them are specific to the YASM assembler.

(Cherry-picked from libav commit 39e208f4d4)

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-21 17:00:29 -03:00
Paul B Mahol 664ac7c5e2 avfilter/af_stereotools: add forgotten break
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-21 19:20:25 +02:00
Ronald S. Bultje e639d09199 mdec: stop preferring the simple IDCT.
This was added in e3e3c82555, probably
as a workaround for the fact that the quant table was not permutated
and the IDCT coefficients are, meaning that you'd only get correct
reconstruction if the IDCT permutation was an identity matrix, which
happens to be the case when you use the simple IDCT. The quant table
permutation bug was fixed in 42dd1434bf,
meaning this workaround is no longer necessary.

In practical terms, before 42dd1434bf,
the PSNR between decodes of the fate-mdec using simple (C) or simplemmx
IDCTs was 35. After 42dd1434bf, it's 90.
2017-06-21 09:01:32 -04:00
Ronald S. Bultje 42dd1434bf mdec: use correctly permutated quant matrix for dequantization. 2017-06-21 08:59:22 -04:00
Memphiz 9e85c5d6a7 aarch64: vp9 16bpp: Fix assembling with Xcode 6.2 and older
Properly use the b.eq form instead of the nonstandard form (which
both gas and newer clang accept though), and expand the register
lists that used a range (which the Xcode 6.2 clang, based on clang
3.5 svn, didn't support).

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-06-21 09:08:14 +03:00
Memphiz 998609ddb8 aarch64: vp9: Fix assembling with Xcode 6.2 and older
Properly use the b.eq/b.ge forms instead of the nonstandard forms
(which both gas and newer clang accept though), and expand the
register list that used a range (which the Xcode 6.2 clang, based
on clang 3.5 svn, didn't support).

This is cherrypicked from libav commit
a970f9de86.

Signed-off-by: Martin Storsjö <martin@martin.st>
2017-06-21 09:08:13 +03:00
Michael Niedermayer 70a7df049c avcodec/mpegvideo: Use intra_scantable in dct_unquantize_h263_intra_c()
Reviewed-by: James Darnley <jdarnley@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-21 02:25:23 +02:00
Michael Niedermayer d7b3d5c3f2 avcodec/hevc_filter: Fix invalid shift
Fixes: runtime error: left shift of negative value -1

Fixes: 2299/clusterfuzz-testcase-minimized-4843509351710720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-21 02:25:23 +02:00
Michael Niedermayer fdfbcbdd14 avcodec/hevcdec: Check beta and tc offset in hls_slice_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-21 02:25:23 +02:00
Michael Niedermayer 5443c4bdf4 avcodec/mpeg4videodec: Fix overflow in virtual_ref computation
Fixes: runtime error: signed integer overflow: 262144 * -16120 cannot be represented in type 'int'
Fixes: 2292/clusterfuzz-testcase-minimized-6156080415506432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-21 02:25:23 +02:00
Michael Niedermayer e95fcfe8fb avcodec/lpc: signed integer overflow in compute_lpc_coefs() (aacdec_fixed)
Fixes: runtime error: signed integer overflow: -1575818955 + -915383657 cannot be represented in type 'int'
Fixes: 2224/clusterfuzz-testcase-minimized-6208559949807616

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-21 02:25:23 +02:00
Luca Barbato 19bf50406e configure: Move up the avbuild directory creation
The early check for inconsistent in-source vs out-of-source build
cannot generate a config.log otherwise.

(Cherry-picked from libav commit 0ee78020cd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-20 20:40:52 -03:00
John Rummell 966a0a814d avcodec/decode: Update decode_simple_internal() to get the side data correctly.
Use avci->last_pkt_props to get the side data. Using |pkt| doesn't work
when FF_API_MERGE_SD is set, as the compressed side data is expanded into
|tmp|, leaving the original |pkt| unchanged.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-20 17:14:17 -03:00
James Darnley 8221c71703 avcodec/x86: allow future 8-bit simple idct to use slightly different coefficients 2017-06-20 16:12:25 +02:00
James Darnley 9d11fedd11 avcodec/mdec: override IDCT choice before initing DSP structs 2017-06-20 13:59:51 +02:00
James Darnley d2597fb0c1 avcodec/x86: modify simple_idct10 macros to add an action paramter 2017-06-20 13:35:01 +02:00
James Darnley 8781330d80 avcodec/x86: cleanup simple_idct10
Use named arguments for the functions so we can remove a define.  The
stride/linesize argument is now ptrdiff_t type so we no longer need to
sign extend the register.
2017-06-20 13:34:38 +02:00
James Darnley e3db94302c avcodec/x86/mpegenc: support transpose permuation type 2017-06-20 12:12:13 +02:00
James Darnley fa30a0a548 avcodec/x86/mpegenc: check IDCT permutation type is a valid value 2017-06-20 12:12:13 +02:00
Diego Biurrun 155f071bad build: Add missing idctdsp dependency for clearvideo
(cherry picked from commit 2f792cb670)
2017-06-20 11:56:36 +02:00
wm4 f1df7cc10c ffmpeg: remove misleading and incorrect warning messages
It is wrong/incorrect in two aspects:
1. The pixel format is not enough to guarantee that the resulting file
   will be any more compatible with media players.
2. Media players not supporting higher profiles are not necessarily
   outdated (in fact this is simply an arrogant statement that
   libavcodec can handle these particular features).

You could add that there are plenty of other ways to produce widely
incompatible files with ffmpeg, and these don't show any warnings.

What we really want to do here is defaulting to codec profiles that
have wide compatibility, such as main/high for h264. Also, if an
encoder does not accept certain pixfmts, we should automatically
convert them to a pixfmt the encoder can accept. But the existing
message certainly is not appropriate.

It also works for 2 specific encoders only. Extending it for other
cases would result in a lot of special cases, so this is not the
right place.
2017-06-20 10:03:30 +02:00
Michael Niedermayer ae6f6d4e34 avcodec/x86/mpegvideo: Use intra scantable in dct_unquantize_h263_intra_mmx()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-20 00:07:51 +02:00
Anton Mitrofanov cf231b68da avcodec/h264: Fix mix of lossless and lossy MBs decoding
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-06-19 14:33:40 -04:00
Anton Mitrofanov 06dda70f1e avcodec/h264_mb: Fix 8x8dct in lossless for new versions of x264
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-06-19 14:33:39 -04:00
Anton Mitrofanov 840b41b2a6 avcodec/h264_cabac: Fix CABAC+8x8dct in 4:4:4
Use the correct ctxIdxInc calculation for coded_block_flag.
Keep old behavior for old versions of x264 for backward compatibility.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-06-19 14:33:39 -04:00
Kevin Mark 05feeeb813 libavfilter/scale: Populate ow/oh when using 0 as w/h
The input width and height is known at parse time so there's no
reason ow/oh should not be usable when using 0 as the width or
height expression.

Previously in "scale=0:ow" ow would be set to "0" which works,
conveniently, as "scale=0:0" is perfectly valid input but this breaks
down when you do something like "scale=0:ow/4" which one could
reasonably expect to work as well, but does not as ow is 0 not the
real value.

This change handles the 0 case for w/h immediately so the ow/oh
variables work as expected. Consequently, the rest of the code does
not need to handle 0 input. w/h will always be > 0 or < 0.

The second explicit (int) cast ensures that ow/oh appear as integers
as a user might expect when dealing with pixel dimensions.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-06-19 14:27:52 -04:00