Commit Graph

87170 Commits

Author SHA1 Message Date
Jun Zhao c6a8c2a4f7 lavc/vaapi_encode_h264: add "coder" option support
Follow libx264 style to support "coder" option, and set it to
cabac by default.

Signed-off-by: Yi A Wang <yi.a.wang@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-08-20 14:24:21 +01:00
Mark Thompson 9c878651db vaapi_encode: Move quality option to common code
Use AVCodecContext.compression_level rather than a private option,
replacing the H.264-specific quality option (which stays only for
compatibility).

This now works with the H.265 encoder in the i965 driver, as well as
the existing cases with the H.264 encoder.

(cherry picked from commit 19388a7200)
2017-08-20 12:56:24 +01:00
bnnm e7053f3316 lavf/bink: fix latest header and add all existing revisions
KB2 'i' found in Life is Strange (Xbox 360), rest verified against binkconv.exe

Signed-off-by: bnnm <bananaman255@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-20 11:33:51 +02:00
Michael Niedermayer e7b9d136a1 avcodec/cngdec: Check skip_samples
Without this its possible to make the new decode API decode billions of samples
out of a empty input and never return to the caller before all samples have been
created and discarded.

Fixes: Timeout
Fixes: 2992/clusterfuzz-testcase-6649611793989632

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-20 02:59:57 +02:00
Michael Niedermayer 0c9d5b015c avcodec/fic: Fixes signed integer overflow
Fixes: runtime error: signed integer overflow: 1037142357 + 1227025305 cannot be represented in type 'int'
Fixes: 3024/clusterfuzz-testcase-minimized-5885660323905536

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-20 02:59:57 +02:00
Michael Niedermayer d132683ddd avcodec/snowdec: Fix off by 1 error
Fixes: runtime error: index 4 out of bounds for type 'int8_t [4]'
Fixes: 3023/clusterfuzz-testcase-minimized-6421736130084864

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-20 02:59:57 +02:00
Ivan Kalvachev 43dab86bcd opus_pvq_search: Restore the proper use of conditional define and simplify the function name suffix handling.
Using named define properly documents the code paths.
It also avoids passing additional numbered arguments through
multiple levels of macro templates.

The suffix handling is done by concatenation, like in
other asm functions and avoid having two separate
"cglobal" defines.

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
2017-08-19 22:42:56 +01:00
Paul B Mahol 1146133df8 avutil/eval: add linear interpolation helper 2017-08-19 12:42:24 +02:00
Paul B Mahol e3a4afca07 avfilter: add pseudocolor filter 2017-08-19 12:42:24 +02:00
Rostislav Pehlivanov 3c99523a28 opus_pvq_search: split functions into exactness and only use the exact if its faster
This splits the asm function into exact and non-exact version. The exact
version is as fast or faster on newer CPUs (which EXTERNAL_AVX_FAST describes
well) whilst the non-exact version is faster than the exact on older CPUs.

Also fixes yasm compilation which doesn't accept !cpuflags(avx) syntax.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-08-18 19:32:55 +01:00
Carl Eugen Hoyos 285c015f10 lavd/libdc1394: Do not crash if dc1394_camera_new() fails.
Fixes Ubuntu bug 1710849
2017-08-18 19:20:15 +02:00
Rostislav Pehlivanov f386dd70ac opus_pvq_search: only use rsqrtps approximation on CPUs with avx
Makes the search produce idential results with the C version.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-08-18 17:30:41 +01:00
Rostislav Pehlivanov 8e53cd1fab ops_pvq_search: remove dead macro
There's no point in toggling it, even for debugging. Its just worse.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-08-18 17:27:41 +01:00
Ivan Kalvachev 7205513f8f SIMD opus pvq_search implementation
Explanation on the workings and methods used by the
Pyramid Vector Quantization Search function
could be found in the following Work-In-Progress mail threads:
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-June/212146.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-June/212816.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/213030.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/213436.html

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
2017-08-18 17:18:32 +01:00
Ivan Kalvachev 30ae07d7ef Add macros to x86util.asm .
Improved version of VBROADCASTSS that works like the avx2 instruction.
Emulation of vpbroadcastd.
Horizontal sum HSUMPS that places the result in all elements.
Emulation of blendvps and pblendvb.

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
2017-08-18 17:18:32 +01:00
Michael Niedermayer cadab5a2a7 avcodec/pixlet: fixes integer overflow in read_highpass()
Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: 2879/clusterfuzz-testcase-minimized-6317542639403008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-18 11:34:01 +02:00
Michael Niedermayer b9f92093a1 avcodec/ffv1dec: Check for bitstream end in decode_line()
Fixes: timeout
Fixes: 2971/clusterfuzz-testcase-6130678276030464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-18 11:33:16 +02:00
Michael Niedermayer c359c51947 avcodec/rangecoder: Do not increase the pointer beyond the buffer
Fixes: undefined behavior

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-18 11:33:14 +02:00
Jacob Trimble f4544163b2 libavformat/mov: Fix inserting frames before current_frame.
When using streaming input, it may be possible to see frames that appear
before the current_frame.  When these frames are inserted into the
index, the current_frame needs to be updated so it is still pointing
at the same frame.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-18 03:02:11 +02:00
Zhao Zhili 7fb4b0368d ffprobe: fix use of uninitialized variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-18 03:02:11 +02:00
Kyle Swanson 2955cd4482 filters.texi: clarify audio upsampling in loudnorm
Signed-off-by: Kyle Swanson <k@ylo.ph>
2017-08-17 14:01:42 -07:00
Werner Robitza 801ba0f0ee filters.texi: explain audio upsampling in loudnorm
Explain that audio will be upsampled to 192 kHz. Addresses issues mentioned in
issue 6570.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
2017-08-17 12:20:26 -08:00
Marton Balint 7160992431 avformat/utils: always av_reduce r_frame_rate
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-17 21:02:40 +02:00
Michael Niedermayer 931c0ac95c avcodec/zmbv: Check decomp_size
Fixes: OOM
Fixes: 2710/clusterfuzz-testcase-minimized-4750001420894208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-17 16:30:06 +02:00
Paul B Mahol 28e9ba951d avcodec/dnxhdenc: call slice thread code only if slice threading is enabled 2017-08-17 11:42:16 +02:00
Michael Niedermayer 92da23093c avcodec/diracdec: Fixes integer overflow
Fixes: runtime error: signed integer overflow: 340018243 * 27 cannot be represented in type 'int'
Fixes: 2861/clusterfuzz-testcase-minimized-5361070510178304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-17 00:23:01 +02:00
Michael Niedermayer 1e6cab8745 avcodec/diracdec: Check perspective_exp and zrs_exp.
Fixes: undefined shift
Fixes: runtime error: shift exponent 264 is too large for 32-bit type 'int'
Fixes: 2860/clusterfuzz-testcase-minimized-4672811689836544

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-17 00:23:01 +02:00
Marton Balint 366e6bfc51 fate: add overlay filter tests with alpha
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-16 22:00:35 +02:00
Paul B Mahol 16efcfe413 avfilter/vf_weave: fix top vs bottom field order
Fixes #6590.
2017-08-16 13:37:53 +02:00
Paul B Mahol 7b19e76aeb avfilter/vf_transpose: rewrite for x86 SIMD
Transpose first in chunks of 8x8 blocks.
15% faster overall.
2017-08-16 09:28:31 +02:00
Leo Izen cbd8e07056 encoders.texi: Replace x264 --full-help suggestion with --fullhelp
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-16 03:35:24 +02:00
Nikolas Bowe 4b54d5a721 avformat/mov: Fix memory leak when reading DDTS box.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-16 03:35:13 +02:00
Michael Niedermayer 0ac8fce267 swresample/resample: Fix flush refelction length
Reviewed-by: atomnuker
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-16 00:54:17 +02:00
Vittorio Giovara 62dfa2ba14 Add tonemap filter
Based off mpv automatic tonemapping capabilities.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-15 15:27:42 +02:00
Vittorio Giovara 8b9ae9a8e0 zscale: Enable single precision input/ouput filtering
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-15 15:27:40 +02:00
Vittorio Giovara 1460408703 Add single precision planar RGB pixel formats
Add a pixel format flag to identify this family.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-15 15:26:20 +02:00
Paul B Mahol 8d2da0939c avfilter/vf_datascope: make it possible to change pixscope window position 2017-08-15 13:54:19 +02:00
Michael Niedermayer b9ce43625c avcodec/cavsdec: Check P/B frame mb decode which return error codes
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-15 01:27:36 +02:00
Michael Niedermayer 426a322aa2 avcodec/cavsdec: Check I frame mb decode for errors
Fixes: timeout
Fixes: 2943/clusterfuzz-testcase-5430257156882432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-15 01:27:36 +02:00
Timo Rothenpieler 62b75537db avfilter/scale_npp: fix logic used in previous patch 2017-08-14 16:03:11 +02:00
Timo Rothenpieler f4ebbda566 avfilter/scale_npp: check for buffer allocation failure
I totally did not forget to amend this to the previous patch...
2017-08-14 14:15:27 +02:00
Yogender Gupta 77c5a54192 avfilter/scale_npp: fix passthrough mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-08-14 13:56:10 +02:00
Michael Niedermayer 5859b5b439 avcodec/lagarith: Detect end of input in lag_decode_line() loop
Fixes: timeout
Fixes: 2933/clusterfuzz-testcase-5124990208835584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 22:02:38 +02:00
Michael Niedermayer 0561bd2fc2 avcodec/gdv: Check available space before reading palette
Fixes: Timeout
Fixes: 2926/clusterfuzz-testcase-498711001458278

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 19:27:52 +02:00
Michael Niedermayer 62702eebde avcodec/ffv1dec_template: Fix undefined shift
Fixes: runtime error: left shift of negative value -127
Fixes: 2834/clusterfuzz-testcase-minimized-5988039123795968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 18:21:06 +02:00
Michael Niedermayer 7735ed2974 avcodec/mpeg4videodec: Clear mcsel before decoding an image
Fixes: runtime error: signed integer overflow: 2146467840 + 1032192 cannot be represented in type 'int'
Fixes: 2826/clusterfuzz-testcase-minimized-5901511613743104

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 12:07:16 +02:00
Michael Niedermayer 511e10f673 avformat/avidec: Move packet skip after prefix and related checks
This fixes loosing packets
Fixes: big.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 12:07:08 +02:00
Michael Niedermayer 84786e928f avcodec/tests/dct: Add Mean square error test
based on quotes of IEEE 1180 / ISO/IEC 23002-1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 12:06:41 +02:00
Michael Niedermayer 86cbffdc4d avcodec/tests/dct: Add peak mean error check
based on quotes of IEEE 1180 / ISO/IEC 23002-1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 12:06:40 +02:00
Davinder Singh 4116b2b136 avcodec/mjpegenc: cosmetic changes
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 04:28:52 +02:00