Zhong Li
520226b683
lavc/hevc_ps_enc: fix vps nal issues
...
1. write vps_num_hrd_parameters element
2. flush left bits
Signed-off-by: Zhong Li <zhong.li@intel.com >
2019-03-29 09:51:09 +08:00
Michael Niedermayer
4daec0c677
avcodec/dxv: Check remaining space in CHECKPOINT()
...
Fixes: Timeout (77sec -> 1sec)
Fixes: 13407/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5093143018471424
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-28 21:32:31 +01:00
Zhong Li
391f884675
lavc/qsvenc_h264: remove the privite option trellis
...
There are many problems of current qsv trellis option:
1. Duplicated with AVCodecContext definition
2. MFX_TRELLIS_XXX is introduced by MSDK API 1.17
Currently Without MSDK API checking thus may cause compilation issue.
3. user is inclined to enable trellis when set "-trellis 1", but
actually it is to disable since MFX_TRELLIS_OFF is equal to 1.
4. It is too complex for user to enable trellis for every frame(I/P/B).
Just simply remove the private option, and switch to the AVCodecContext
definition. Compatibility should not a big problem (except can't exact map)
since the option name is same as AVCodecContext.
Signed-off-by: Zhong Li <zhong.li@intel.com >
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com >
Reviewed-by: Moritz Barsnick <barsnick@gmx.net >
2019-03-28 21:52:51 +08:00
Zhong Li
b9a066ae23
lavc/qsvenc: use the common option "trellis" of AVCodecContext
...
Signed-off-by: Zhong Li <zhong.li@intel.com >
2019-03-28 21:50:01 +08:00
Zhong Li
4131b0619c
qsv: fix the dangerous macro definitions
...
Signed-off-by: Zhong Li <zhong.li@intel.com >
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com >
2019-03-28 21:49:04 +08:00
Zhong Li
b47446cc39
lavc/qsvenc: make the queried libmfx version easily reused
...
Signed-off-by: Zhong Li <zhong.li@intel.com >
2019-03-28 21:48:09 +08:00
Carl Eugen Hoyos
f8fa8bbf22
lavc/vaapi_h264: Do not set FMO fields.
...
The fields are deprecated in current vaapi,
setting them to 0 in old versions is fine
as FMO is not implemented.
Fixes the following warnings:
libavcodec/vaapi_h264.c:259:10: warning: 'num_slice_groups_minus1' is deprecated [-Wdeprecated-declarations]
.num_slice_groups_minus1 = pps->slice_group_count - 1,
^
libavcodec/vaapi_h264.c:260:10: warning: 'slice_group_map_type' is deprecated [-Wdeprecated-declarations]
.slice_group_map_type = pps->mb_slice_group_map_type,
^
libavcodec/vaapi_h264.c:261:10: warning: 'slice_group_change_rate_minus1' is deprecated [-Wdeprecated-declarations]
.slice_group_change_rate_minus1 = 0, /* FMO is not implemented */
^
Reviewed-by: Mark Thompson
2019-03-28 00:51:14 +01:00
Carl Eugen Hoyos
9fa757ad7c
lavc/vaapi_hevc: Do not initialize fields twice.
...
Fixes the following compilation warnings:
libavcodec/vaapi_hevc.c:155:21: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.pic_fields.bits = {
~^~~~
libavcodec/vaapi_hevc.c:125:57: note: previous initialization is here
.pic_fields.value = 0,
^
libavcodec/vaapi_hevc.c:175:31: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.slice_parsing_fields.bits = {
~^~~~
libavcodec/vaapi_hevc.c:126:57: note: previous initialization is here
.slice_parsing_fields.value = 0,
Reviewed-by: Mark Thompson
2019-03-28 00:33:07 +01:00
Michael Niedermayer
54655623a8
avcodec/hevcdec: Avoid only partly skiping duplicate first slices
...
Fixes: NULL pointer dereference and out of array access
Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432
Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304
This also fixes the return code for explode mode
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-27 08:42:10 +01:00
Decai Lin
ec1e4a8baf
lavc/h264_levels: add MaxMBPS checking and update fate test.
...
1. add MaxMBPS checking for level idc setting to align with AVC spec
AnnexA table A-1/A-6 level limits.
2. update h264 level fate test.
Signed-off-by: Decai Lin <decai.lin@intel.com >
Signed-off-by: Mark Thompson <sw@jkqxz.net >
2019-03-27 00:13:27 +00:00
Carl Eugen Hoyos
1e34014010
lavc/bmp: Avoid a heap buffer overwrite for 1bpp input.
...
Found by Mingi Cho, Seoyoung Kim, and Taekyoung Kwon
of the Information Security Lab, Yonsei University.
2019-03-26 21:07:51 +01:00
James Almer
40490b3a63
avcodec/cbs_av1: fix range of values for Mastering Display Color Volume Metadata OBUs
...
Signed-off-by: James Almer <jamrial@gmail.com >
2019-03-25 11:26:26 -03:00
Michael Niedermayer
b8f53a2342
avcodec/jpeg2000dec: Skip de-quantization of empty areas
...
Fixes: Timeout (26sec -> 18sec)
Fixes: 13448/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-576903098243481
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-25 13:20:30 +01:00
Michael Niedermayer
c0ca67ba40
avcodec/prosumer: Check decoded size
...
Fixes: Timeout (longer than i had patience for -> 2sec)
Fixes: 13205/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5105644481282048
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-25 13:20:30 +01:00
Michael Niedermayer
635067b75f
avcodec/mpegpicture: Check size of edge_emu_buffer
...
Fixes: OOM
Fixes: 13710/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5633152942342144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-25 13:20:30 +01:00
Michael Niedermayer
4ef27d4072
avcodec/indeo2: Check input size against resolution in ir2_decode_plane()
...
Fixes: Timeout (56 sec -> 14 sec)
Fixes: 13708/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO2_fuzzer-5656342004498432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-25 13:20:30 +01:00
Michael Niedermayer
d92034a06a
avcodec/dxtory: Check slice sizes before allocating image
...
Fixes: Timeout (26sec -> 2sec)
Fixes: 13612/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5676845977042944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-25 13:20:29 +01:00
Michael Niedermayer
1223696c72
avcodec/truemotion2: Fix integer overflow in tm2_null_res_block()
...
Fixes: signed integer overflow: 1111638592 - -2122219136 cannot be represented in type 'int'
Fixes: 13441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5732769815068672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-25 13:20:29 +01:00
James Almer
699d0c2a30
avcodec/av1_parser: don't abort parsing the first frame if extradata parsing fails
...
The first frame contains the sequence header, which is needed to parse every
following frame.
This fixes parsing streams with broken extradata but correct packet data.
Signed-off-by: James Almer <jamrial@gmail.com >
2019-03-24 18:26:49 -03:00
Michael Niedermayer
013f71497b
avcodec/tiff: do not allow bpp 40 with undefined pixel formats
...
Fixes: Out of array access, assertion failure
Fixes: 13851/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5754570929602560
Fixes: 13869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5695998313103360
Fixes: 13873/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5077273645940736
Fixes: 13874/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5756396757319680
Fixes: 13877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5741026750234624
Fixes: 13880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5649148809838592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-24 10:35:47 +01:00
hwrenx
5252d594a1
lavc/libdavs2: fix frame dumping error description
...
Reviewed-by: Steven Liu <lq@chinaffmpeg.org >
Signed-off-by: hwrenx <hwrenx@126.com >
2019-03-23 14:08:00 +08:00
hwrenx
bf05f621d5
lavc/libdavs2: add davs2_flush
...
Reviewed-by: Steven Liu <lq@chinaffmpeg.org >
Signed-off-by: hwrenx <hwrenx@126.com >
2019-03-23 14:07:16 +08:00
James Almer
47e12966b7
Merge commit '0676de935b1e81bc5b5698fef3e7d48ff2ea77ff'
...
* commit '0676de935b1e81bc5b5698fef3e7d48ff2ea77ff':
arm: Implement a NEON version of 422 h264_h_loop_filter_chroma
Merged-by: James Almer <jamrial@gmail.com >
2019-03-22 16:06:04 -03:00
Martin Storsjö
0676de935b
arm: Implement a NEON version of 422 h264_h_loop_filter_chroma
...
Previously, the 420 version was used even for 422.
This fixes occasional checkasm failures.
Signed-off-by: Martin Storsjö <martin@martin.st >
2019-03-21 22:03:46 +02:00
James Almer
70c8c8a818
avcodec/hevcdec: decode at most one slice reporting being the first in the picture
...
Fixes deadlocks when decoding packets containing more than one of the aforementioned
slices when using frame threads.
Tested-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2019-03-20 19:53:12 -03:00
Michael Niedermayer
9d20901b92
avcodec/arbc: Check nb_segments before allocating and copying frame
...
Fixes: Timeout (30sec -> 2sec)
Fixes: 13578/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5685625527730176
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-20 21:12:45 +01:00
Michael Niedermayer
8f63fa4c2e
avcodec/scpr: Perform frame copy later
...
Optimization found while looking at 13442/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5758293933293568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-20 21:12:45 +01:00
Carl Eugen Hoyos
4602456c4f
lavc/arbc: Use AV_WB24() where applicable.
2019-03-20 17:53:34 +01:00
Carl Eugen Hoyos
82fd7866a3
lavc/tiff: Allow decoding of cmyka (five components).
...
Fixes ticket #7675 .
2019-03-20 17:50:25 +01:00
Carl Eugen Hoyos
801d78f0d8
lavc/truehd_core: Initialize the last bytes of the output buffer.
...
Avoids undeterministic output.
2019-03-20 17:23:00 +01:00
Carl Eugen Hoyos
ba0a56e0b0
lavc/qtrle: Avoid an unaligned 64-bit write.
...
pixel_ptr can be increased by 4.
Fixes a crash on sparc64.
2019-03-20 17:16:02 +01:00
Carl Eugen Hoyos
6fcf7adc01
lavc/tiff: Support decoding 16bit cmyk.
2019-03-20 17:04:55 +01:00
Rodger Combs
ce6301a46f
avcodec/vt_hevc: fix crash if vps_list[0] or sps_list[0] are null
...
Instead of assuming id 0 is used, use the same logic as used for PPS,
where all available entries in the list are emitted.
Signed-off-by: Aman Gupta <aman@tmm1.net >
2019-03-19 14:56:21 -07:00
Derek Buitenhuis
90b85ab21f
h2645_parse: Fix loglevel for NAL header parsing
...
We don't treat this as an error.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com >
2019-03-19 19:56:19 +00:00
James Almer
9e62e1a110
avcodec/libdav1d: use a reference to the allocated buffer instead of wrapping the Dav1dPicture
...
Removes an av_malloc() per frame.
Reviewed-by: BBB
Reviewed-by: nevcairiel
Signed-off-by: James Almer <jamrial@gmail.com >
2019-03-19 14:04:08 -03:00
James Almer
5cd60b6f2e
avcodec/libdav1d: reset pool size on allocation failure
...
Signed-off-by: James Almer <jamrial@gmail.com >
2019-03-19 14:03:39 -03:00
Michael Niedermayer
14eea7c47a
avcodec/pnm: Optimize reading loop in pnm_get()
...
Fixes: Timeout 13149 (5sec -> 3sec), 13166 (11sec -> 7sec), 13430 (5sec -> 3sec)
Fixes: 13149/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-5760833622114304
Fixes: 13166/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5763216322330624
Fixes: 13430/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5758658334425088
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-17 11:35:00 +01:00
Michael Niedermayer
f20760fadb
avcodec/dfa: Check the chunk header is not truncated
...
Fixes: Timeout (11sec -> 3sec)
Fixes: 13218/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-5661074316066816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-17 11:35:00 +01:00
Michael Niedermayer
41f93f9411
avcodec/clearvideo: Check remaining data in P frames
...
Fixes: Timeout (19sec -> 419msec)
Fixes: 13411/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5733153811988480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-17 11:35:00 +01:00
Michael Niedermayer
dd2a2a51fe
avcodec/diracdec: Count truncated parts as errors in decode_component()
...
Fixes: Timeout (29sec -> 4sec)
Fixes: 13150/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5690185671507968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-17 11:35:00 +01:00
Michael Niedermayer
efe4aef90f
avcodec/ffv1dec_template: Optimize golomb run mode
...
Fixes: Timeout (34sec -> 12sec)
Fixes: 13398/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5664106709778432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-17 11:35:00 +01:00
Mathieu Duponchelle
6cfa173303
mpeg12enc: Use Closed Captions if available
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-16 00:02:23 +01:00
Carl Eugen Hoyos
dbecf03f69
lavc/qtrle: Do not use aligned writes for 24bit frames.
...
pixel_ptr is 3 and leads to aligned access on odd memory addresses.
Fixes crashes on systems that do not allow unaligned access like sparc32.
2019-03-15 01:09:02 +01:00
James Almer
92219ef4ac
Merge commit '186bd30aa3b6c2b29b4dbf18278700b572068b1e'
...
* commit '186bd30aa3b6c2b29b4dbf18278700b572068b1e':
h264/arm64: implement missing 4:2:2 chroma loop filter neon functions
Merged-by: James Almer <jamrial@gmail.com >
2019-03-14 16:29:41 -03:00
James Almer
5c363d3e59
Merge commit '7e42d5f0ab2aeac811fd01e122627c9198b13f01'
...
* commit '7e42d5f0ab2aeac811fd01e122627c9198b13f01':
aarch64: vp8: Optimize vp8_idct_add_neon for aarch64
Merged-by: James Almer <jamrial@gmail.com >
2019-03-14 16:22:29 -03:00
James Almer
409e684e79
Merge commit '49f9c4272c4029b57ff300d908ba03c6332fc9c4'
...
* commit '49f9c4272c4029b57ff300d908ba03c6332fc9c4':
aarch64: vp8: Skip saturating in shrn in ff_vp8_idct_add_neon
Merged-by: James Almer <jamrial@gmail.com >
2019-03-14 16:21:46 -03:00
James Almer
fbd607dd56
Merge commit '37394ef01b040605f8e1c98e73aa12b1c0bcba07'
...
* commit '37394ef01b040605f8e1c98e73aa12b1c0bcba07':
aarch64: vp8: Optimize put_epel16_h6v6 with vp8_epel8_v6_y2
Merged-by: James Almer <jamrial@gmail.com >
2019-03-14 16:20:05 -03:00
James Almer
d6b62ce1ac
Merge commit 'cef914e08310166112ac09567e66452a7679bfc8'
...
* commit 'cef914e08310166112ac09567e66452a7679bfc8':
arm: vp8: Optimize put_epel16_h6v6 with vp8_epel8_v6_y2
Merged-by: James Almer <jamrial@gmail.com >
2019-03-14 16:19:41 -03:00
James Almer
34a0a9746b
Merge commit 'e39a9212ab37a55b346801c77487d8a47b6f9fe2'
...
* commit 'e39a9212ab37a55b346801c77487d8a47b6f9fe2':
aarch64: vp8: Port bilin functions from arm version
Merged-by: James Almer <jamrial@gmail.com >
2019-03-14 16:18:42 -03:00
James Almer
2ac399d7fa
Merge commit '58d154922707bfeb873cb3a7476e0f94b17463dd'
...
* commit '58d154922707bfeb873cb3a7476e0f94b17463dd':
aarch64: vp8: Port epel4 functions from arm version
Merged-by: James Almer <jamrial@gmail.com >
2019-03-14 16:17:33 -03:00