James Almer
95a6de5674
avcodec/snowenc: fix setting motion_est option
...
Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly.
Based on code from svq1enc.c
Signed-off-by: James Almer <jamrial@gmail.com >
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-28 21:27:01 -03:00
Mark Thompson
b264810ef7
hevc: Add names for reserved NAL unit types
...
While not yet used, these NAL units do already have some defined
semantics and are referred to elsewhere.
(cherry picked from commit 3daaa44173 )
2017-08-28 11:50:50 +01:00
Jun Zhao
e4a6eb70f4
lavc/vaapi_encode: Change the slice/parameter buffers to dynamic alloc.
...
Change the slice/parameter buffers to be allocated dynamically.
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com >
Signed-off-by: Jun Zhao <jun.zhao@intel.com >
Signed-off-by: Mark Thompson <sw@jkqxz.net >
2017-08-28 11:49:57 +01:00
Jun Zhao
385cafb07a
lavc/vaapi_encode_h265: Enable VBR mode
...
Follow vaapi_h264 style, enable the VBR mode.
Signed-off-by: Jun Zhao <jun.zhao@intel.com >
Signed-off-by: Mark Thompson <sw@jkqxz.net >
2017-08-28 11:47:55 +01:00
Michael Niedermayer
0181b202cc
avcodec/aacpsdsp_template: Fix undefined integer overflow in ps_add_squares_c()
...
Fixes runtime error: signed integer overflow: 1997494407 + 613252359 cannot be represented in type 'int'
Fixes: 2014/clusterfuzz-testcase-minimized-5186337030275072
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-27 19:40:28 +02:00
Michael Niedermayer
eefb68c9c3
avcodec/sbrdsp_fixed: Fix undefined overflows in autocorrelate()
...
Fixes: runtime error: signed integer overflow: 8903997421129740175 + 354481484684609529 cannot be represented in type 'long'
Fixes: 2045/clusterfuzz-testcase-minimized-6751255865065472
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-27 19:40:23 +02:00
James Almer
257f0d09f7
avcoec/snowenc: silence some deprecation warnings
2017-08-26 22:10:00 -03:00
Carl Eugen Hoyos
094d4d8691
lavc/sinewin_tablegen: Fix compilation with --enable-hardcoded-tables.
...
Reported by irc user JCount_.
2017-08-26 12:48:43 +02:00
Carl Eugen Hoyos
1c56becb9b
lavc/utils: Calculate frame duration for little-endian G.726.
2017-08-26 11:59:34 +02:00
Michael Niedermayer
7c10068da1
avcodec/dvbsubdec: Check for duplicate regions in dvbsub_parse_page_segment()
...
Fixes: OOM
Fixes: 3051/clusterfuzz-testcase-minimized-5745818336231424
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-25 23:38:24 +02:00
James Almer
8a0954dd51
avcodec: add missing FF_API_DEBUG_MV wrappers
...
Signed-off-by: James Almer <jamrial@gmail.com >
2017-08-25 13:44:52 -03:00
James Almer
2c800eb737
avcodec: make the avcodec_get_chroma_sub_sample deprecation effective
...
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com >
2017-08-25 12:19:41 -03:00
Derek Buitenhuis
9e02f35f6a
mjpeg: Add support for ICC side data
...
JPEGs store embedded profiles under the APP2 marker, signified
with a "ICC_PROFILE" null-terminated string header, and can be
split across multiple APP2 markers, out of order.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
2017-08-25 13:44:41 +01:00
Paul B Mahol
dbc9a8f21f
avcodec/aac: Add floating point 960/120 MDCT window
...
Co-Authored-By: Alex Converse <alex.converse@gmail.com >
Co-Authored-By: Rostislav Pehlivanov <atomnuker@gmail.com >
2017-08-24 17:42:07 -07:00
Michael Niedermayer
2b44dcbc44
avcodec/hevc_ps: Check delta_pocs in ff_hevc_decode_short_term_rps()
...
Fixes: integer overflow
Fixes: 2893/clusterfuzz-testcase-minimized-5809330567774208
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-24 11:29:40 +02:00
Vitaly Buka
8c2bb10ddf
avcodec/utils: Fix signed integer overflow in rc_initial_buffer_occupancy initialization
...
Signed integer overflow is undefined behavior.
Detected with clang and -fsanitize=signed-integer-overflow
Signed-off-by: Vitaly Buka <vitalybuka@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-23 03:17:11 +02:00
Michael Niedermayer
6f03ffb47d
avcodec/aacdec_template: Fix running cleanup in decode_ics_info()
...
Fixes: out of array read
Fixes: 2873/clusterfuzz-testcase-minimized-5924145713905664
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Previous version reviewed-by: Alex Converse <alex.converse@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-22 20:01:31 +02:00
Michael Niedermayer
a2e444d5bb
avcodec/pngdec: Fix () placement
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-22 18:55:11 +02:00
James Zern
d8269519e4
vp9: set color range to MPEG for intraonly profile 0
...
this is undocumented in the vp9 bitstream and decoding specification
doc, but matches libvpx
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com >
Signed-off-by: James Zern <jzern@google.com >
2017-08-21 20:01:56 -07:00
Michael Niedermayer
bc488ec28a
avcodec/me_cmp: Fix crashes on ARM due to misalignment
...
Adds a diff_pixels_unaligned()
Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872503
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-21 23:19:18 +02:00
Carl Eugen Hoyos
898ea658c8
lavc/g726: Add a little-endian G.726 encoder.
...
Fixes ticket #6596 .
2017-08-21 16:19:58 +02:00
Michael Niedermayer
8754ccd3b3
avcodec/pixlet: Fixes: undefined shift in av_mod_uintp2()
...
Fixes: runtime error: shift exponent 4294967289 is too large for 32-bit type 'int'
Fixes: 3030/clusterfuzz-testcase-minimized-4649809254285312
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 21:14:47 +02:00
Michael Niedermayer
a165b53daa
avcodec/dirac_dwt_template: Fix integer overflow in vertical_compose53iL0()
...
Fixes: runtime error: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int'
Fixes: 3013/clusterfuzz-testcase-minimized-4644084197097472
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 21:14:47 +02:00
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
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
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
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
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
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
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
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
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
Davinder Singh
1939b90306
avcodec/mjpegenc: disable unused code with AMV
...
disable unused amv_encode_picture() when AMV encoder is not configured.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-08-11 04:28:52 +02:00