1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

101124 Commits

Author SHA1 Message Date
Paul B Mahol
058db59e16 avfilter/vf_gblur: factor out postscale function 2021-02-16 21:12:11 +01:00
Michael Niedermayer
d0b6b1f941 tools/target_dec_fuzzer: Adjust threshold for wavpack
Fixes: Timeout (long -> 4sec)
Fixes: 29064/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5104450901508096

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
1fc21b1bc5 tools/target_dec_fuzzer: Adjust threshold for MSA1
Fixes: Timeout (too long to wait -> 1ms)
Fixes: 29048/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSA1_fuzzer-5733703473037312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
fa7b7fdfa2 tools/target_dec_fuzzer: adjust threshold for cook
Fixes: Timeout (long -> 3ms)
Fixes: 29134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5192822695264256

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
e6d8ec977e tools/target_dec_fuzzer: Adjust threshold for theora
Fixes: Timeout
Fixes: 29226/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-6195092572471296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
be0c72b7c2 tools/target_dec_fuzzer: Update maxpixels_per_frame for low thresholds
Fixes: Timeout
Fixes: 29990/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSS2_fuzzer-5469155073589248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
887bd6b02f tools/target_dec_fuzzer: count all video decoding failures in the new API
The next commit depends on this

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
d558c9f237 avformat/rmdec: Check codec_length without overflow
Fixes: signed integer overflow: 2147483647 + 64 cannot be represented in type 'int'
Fixes: 30333/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-5175286983426048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
1d277b92fa avformat/mov: Check element count in mov_metadata_hmmt()
Fixes: Timeout
Fixes: 30325/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6048395703746560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
Michael Niedermayer
6a797ceafe avcodec/vp8: Move end check into MB loop in vp78_decode_mv_mb_modes()
Fixes: Timeout (long -> 5sec)
Fixes: 30269/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5430325004075008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16 19:02:24 +01:00
James Almer
04dfdde09b avfilter/buffersrc: simplify av_buffersrc_add_frame_flags()
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-16 12:36:37 -03:00
Ashish Singh
38aea9b041 avfilter: add vif filter
This is Visual Information Fidelity (VIF) filter and one of the component
filters of VMAF. It outputs the average VIF score over all frames.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
2021-02-16 15:00:50 +01:00
Paul B Mahol
8d209eb33c avcodec/exr: export any unknown header string variable to metadata
And properly skip preview type in header.
2021-02-16 14:39:43 +01:00
Paul B Mahol
f5dde8089d avcodec/exr: refactor GetByteContext usage 2021-02-16 13:58:48 +01:00
Paul B Mahol
3ea660c78a avcodec/exr: correctly calculate display window 2021-02-16 13:58:48 +01:00
Paul B Mahol
b1eb15c1cf avcodec/exr: add multipart support 2021-02-16 03:51:07 +01:00
Andreas Rheinhardt
c1f81c13a1 fate/matroska: Add test for remuxing file with spherical metadata
Also, test modifying colorspace properties and the default_mode
passthrough which is used here to create a file that has no default
track at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-15 21:58:00 +01:00
Andreas Rheinhardt
b0d8310f76 fate/matroska: Add test for zero-length Block
It furthermore tests the demuxer's handling of chained SeekHeads,
level 1-elements after the Clusters and the muxer's capability of
writing huge TrackNumbers as well as expanding the Cues' length field
by one byte if necessary to fill the reserved space. It also tests
propagation of metadata.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-15 21:48:22 +01:00
Paul B Mahol
6941d93faa avcodec/setts_bsf: add sample rate for expressions 2021-02-15 20:52:44 +01:00
Paul B Mahol
5f0e3b549a avcodec/exr: unbreak parsing sample aspect ratio 2021-02-15 17:39:35 +01:00
Paul B Mahol
98191135e0 avcodec/exr: read fps from metadata too 2021-02-15 17:39:35 +01:00
Andreas Rheinhardt
da857099e9 avformat/utils: Add av_assert1 to preclude NULL + len, len != 0
Such a scenario is undefined behaviour and would also indicate a bug
in our code.

Suggested-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-15 16:50:55 +01:00
Carl Eugen Hoyos
c0d0b1c4f6 lavf/img2dec: Autodetect pfm images. 2021-02-15 00:34:01 +01:00
Carl Eugen Hoyos
3490108f95 lavfi/vflip: Support Bayer vertical flip.
Fixes ticket #8819.
2021-02-15 00:12:38 +01:00
Carl Eugen Hoyos
ca781761d6 lavc/pnm: Allow decoding gray float pfm images. 2021-02-15 00:01:07 +01:00
Andreas Rheinhardt
9c0b3eddf4 avformat/utils: Fix undefined NULL + 0
This is undefined behaviour in C, so use data = len ? data + len : data
instead of data += len. GCC optimizes the branch away in this case;
Clang unfortunately doesn't.

Fixes ticket #8592.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-14 22:47:08 +01:00
Andreas Rheinhardt
4f49ca7bbc avdevice/avdevice: Deprecate AVDevice Capabilities API
It has been added in 6db42a2b6b,
yet since then none of the necessary create/free_device_capabilities
functions has been implemented, making this API completely useless.

Because of this one can already simplify
avdevice_capabilities_free/create and can already remove the function
pointers at the next major bump; given that the documentation explicitly
states that av_device_capabilities is not to be used by a user, it's
options can already be removed (save for the sentinel).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-14 21:07:57 +01:00
Michael Niedermayer
ee1c5b4256 tools/target_dec_fuzzer: Adjust threshold for VMNC
Fixes: Timeout
Fixes: 30055/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMNC_fuzzer-4739482576355328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14 19:55:02 +01:00
Michael Niedermayer
b24d3bfe66 avcodec/fmvc: avoid copying uninitialized data
Fixes: Timeout
Fixes: 30049/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FMVC_fuzzer-5986909455253504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14 19:55:02 +01:00
Michael Niedermayer
c000a91288 avcodec/fits: Check gcount and pcount being non negative
Fixes: signed integer overflow: 9223372036854775807 - -30069403896 cannot be represented in type 'long'
Fixes: 30046/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5807144773484544

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14 19:55:02 +01:00
Michael Niedermayer
796d07bb5a tools/target_dec_fuzzer: Adjust the threshold of vc1image
Fixes: Timeout
Fixes: 30025/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5965511357759488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14 19:55:02 +01:00
Michael Niedermayer
c425198558 avformat/nutdec: Check timebase count against main header length
Fixes: Timeout (long -> 3ms)
Fixes: 28514/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6078669009321984
Fixes: 30095/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-5074433016463360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14 19:55:02 +01:00
Michael Niedermayer
cb90e1c4d0 avformat/mov: sanity check STSD entries
The choosen value is arbitrary. I am not sure if this is a good idea
but i dont immedeately see an alternative better way, it seems either
an arbitrary limit or OOM

Fixes: OOM
Fixes: 27492/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6194970578649088

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14 19:55:02 +01:00
Paul B Mahol
505d6ed475 avcodec/apedec: export bits_per_raw_sample
Fixes #4717
2021-02-14 18:59:28 +01:00
Paul B Mahol
5d9f44da46 avcodec/pngenc: remove monowhite from apng formats
Monowhite pixel format is not supported, and it does not make sense
to add support for it.

Fixes #7989
2021-02-14 17:23:24 +01:00
sfan5
6f80953554 avcodec/mediacodecdec: do not abort when H264/HEVC extradata extraction fails
Although rare, extradata can be present but empty and extraction will fail.
However Android also supports passing codec-specific data inline and
will likely play such a stream anyway. So there's no reason to abort
initialization before we know for sure.
2021-02-14 13:38:46 +02:00
James Almer
d5d6751a55 avformat/mux: return a pointer to the packet in ff_interleaved_peek()
And make it const, so the caller doesn't attempt to change it.
ff_get_muxer_ts_offset() should be used to get the muxer timestamp offset.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-13 13:05:26 -03:00
James Almer
93e2fa933f avformat/mux: add ff_get_muxer_ts_offset()
Will be useful in the next patch

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-13 13:01:48 -03:00
James Almer
a80fbbdab5 avformat/utils: force lowres to 0 in avformat_find_stream_info()
Instead of applying it and then restoring the original codecpar dimensions.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-13 13:01:48 -03:00
Paul B Mahol
c6ce18be08 avfilter/vf_convolution: add 16-column operation for filter_column()
Based on patch by Xu Jun <xujunzz@sjtu.edu.cn>
2021-02-13 14:45:48 +01:00
Paul B Mahol
63231fa8d3 avcodec/pngdec: fix possible race condition with APNG decoding
Fixes #9017
2021-02-13 13:24:45 +01:00
Paul B Mahol
bbf6183e11 avfilter/vf_datascope: pixscope: add commands support 2021-02-13 12:38:15 +01:00
Michael Niedermayer
59bb9dc2a6 avformat/electronicarts: Clear partial_packet on error
Fixes: Infinite loop
Fixes: 30165/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-6224642371092480

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-12 23:42:16 +01:00
Michael Niedermayer
7a2aa5dc2a avformat/r3d: Check samples before computing duration
Fixes: signed integer overflow: -4611686024827895807 + -4611686016279904256 cannot be represented in type 'long'
Fixes: 30161/clusterfuzz-testcase-minimized-ffmpeg_dem_R3D_fuzzer-5694406713802752

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-12 23:42:16 +01:00
Michael Niedermayer
5314a4996c avcodec/pnm_parser: Check av_image_get_buffer_size() for failure
Fixes: out of array access
Fixes: 30135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-4997145650397184
Fixes: 30208/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5605891665690624.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-12 23:42:16 +01:00
Paul B Mahol
6c52c27d3d avfilter/vf_psnr: remove precision limits for metadata values 2021-02-12 23:22:32 +01:00
Paul B Mahol
3300d718f7 avfilter/vf_ssim: remove precision limits for metadata values 2021-02-12 23:22:32 +01:00
Paul B Mahol
95b854dd06 avfilter/af_amix: rename sum option to normalize
It makes more sense to still use provided weights.
2021-02-12 23:01:52 +01:00
Paul B Mahol
05a6d82d5c avfilter/vf_ssim: add timeline support 2021-02-12 21:21:25 +01:00
Paul B Mahol
735ec7666b avfilter/vf_psnr: add timeline support 2021-02-12 21:21:25 +01:00