1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-07 11:13:41 +02:00
Commit Graph

100798 Commits

Author SHA1 Message Date
Michael Niedermayer
b17ffe8f8f avformat/iff: Check block align also for ID_MAUD
Fixes: Timeout & OOM
Fixes: 28701/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5185094964871168
Fixes: 29116/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-4874284795297792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-23 14:32:54 +01:00
Gyan Doshi
d8a585d4d5 doc/ffmpeg: document adrift_threshold 2021-01-23 16:43:51 +05:30
Gyan Doshi
e8b46b2c73 doc/ffmpeg: restore location of stray passage
Added in 88fc1438c6, this passage was separated from its original
context over the years with unrelated entries sandwiched in between.
2021-01-23 15:41:52 +05:30
Gyan Doshi
c52ced7ca2 doc/fftools-common-opts: document max_alloc 2021-01-23 14:59:47 +05:30
Gyan Doshi
e73a8ecb38 doc/fftools-common-opts: document buildconf 2021-01-23 13:58:01 +05:30
Michael Niedermayer
2488ba85a0 avcodec/utils: Check for integer overflow in get_audio_frame_duration() for ADPCM_DTK
Fixes: signed integer overflow: 131203586 * 28 cannot be represented in type 'int'
Fixes: 26817/clusterfuzz-testcase-minimized-ffmpeg_dem_MSF_fuzzer-6296902548848640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-23 01:05:25 +01:00
Michael Niedermayer
14bbb6bb30 avformat/fitsdec: Better size checks
Fixes: out of array access
Fixes: 26819/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5634559355650048
Fixes: 26820/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5760774955597824
Fixes: 27379/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5129775942991872.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-23 01:05:25 +01:00
Michael Niedermayer
d3d9b1fc8e avformat/mxfdec: Fix integer overflow in next position in mxf_read_local_tags()
Fixes: signed integer overflow: 9223372036854775723 + 8192 cannot be represented in type 'long'
Fixes: 29072/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4812604904177664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-23 01:05:25 +01:00
Andreas Rheinhardt
da607832b5 avcodec/tableprint: Don't include mem_internal.h
tableprint.h does not declare anything as aligned; it just prints
DECLARE_ALIGNED. So it can be removed; in fact, it needs to be removed,
because mem_internal.h includes config.h which leads to warnings when
building with hardcoded tables enabled because of redefinitions of
CONFIG_HARDCODED_TABLES.

(Furthermore, config.h is only valid for the target, not the host,
so HAVE_LOCAL_ALIGNED might even be wrong here.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-22 19:09:57 +01:00
Paul B Mahol
3ce97d8ddd avfilter/vf_atadenoise: fix mid calculation 2021-01-22 18:24:32 +01:00
Paul B Mahol
bb66fd7f90 avfilter/vf_estdif: make interpolation used user configurable 2021-01-22 18:03:12 +01:00
Paul B Mahol
95183d25e8 avfilter/vf_atadenoise: add sigma options 2021-01-22 16:21:22 +01:00
Andreas Rheinhardt
ee1d1c4b37 avcodec/h264_metadata_bsf: Don't use unitialized value
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-22 14:38:09 +01:00
Andreas Rheinhardt
53db591a2e avcodec/videotoolboxenc: Fix SEI enum identifiers
Broken in 64b3aac8d0.

Tested-by: Mark Himsley <mark.himsley@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-22 13:31:16 +01:00
Paul B Mahol
ff9bf372f7 avfilter/vf_w3fdif: reduce overhead calling execute for every plane 2021-01-22 13:28:41 +01:00
Guo, Yejun
07a18ff477 tests/dnn: fix build issue after function name changed 2021-01-22 19:28:29 +08:00
Mark Thompson
bb96824510 dnn: Add ff_ prefix to unnamespaced globals
Reviewed-By: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 15:03:09 +08:00
Mark Thompson
2c424d9630 dnn_backend_native.c: Add missing static to local variable 2021-01-22 12:18:03 +08:00
Guo, Yejun
5235634b61 dnn-layer-conv2d-test.c: remove dependency of dnn_native_class 2021-01-22 12:18:03 +08:00
Xu Guangxin
ae97f69ce1 avutils/vulkan: hwmap, respect src frame resolution
fixes http://trac.ffmpeg.org/ticket/9055

The hw decoder may allocate a large frame from AVHWFramesContext, and adjust width and height based on bitstream.
We need to use resolution from src frame instead of AVHWFramesContext.

test command:
ffmpeg -loglevel debug -hide_banner -hwaccel vaapi -init_hw_device vaapi=va:/dev/dri/renderD128 -hwaccel_device va -hwaccel_output_format vaapi -init_hw_device vulkan=vulk -filter_hw_device vulk -i 1920x1080.264 -c:v libx264 -r:v 30 -profile:v high -preset veryfast -vf "hwmap,chromaber_vulkan=0:0,hwdownload,format=nv12" -map 0 -y vaapiouts.mkv

expected:
No green bar at bottom.
2021-01-22 04:30:42 +01:00
Mark Thompson
c6a3ca2db4 dnn_backend_native_layer_mathbinary.c: Delete unused global variable 2021-01-22 10:18:36 +08:00
Guo, Yejun
a11a3f358d dnn_backend_native_layer_conv2d.c: refine code with av_malloc_array and av_freep
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 08:28:13 +08:00
Guo, Yejun
a76fa0caa0 dnn_backend_native_layer_conv2d.c: correct struct name with CamelCase
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 08:28:13 +08:00
Guo, Yejun
d4f40c1b60 dnn/queue: remove prefix FF for Queue and SafeQueue
we don't need FF prefix for internal data struct

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 08:28:13 +08:00
Guo, Yejun
c5e30d588d libavfilter/dnn: add prefix ff_ for internal functions
from proc_from_frame_to_dnn to ff_proc_from_frame_to_dnn, and
from proc_from_dnn_to_frame to ff_proc_from_dnn_to_frame.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 08:28:13 +08:00
Guo, Yejun
2d6af4a501 libavfilter/dnn: use avpriv_report_missing_feature for unsupported features
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 08:28:13 +08:00
Guo, Yejun
0d5fd4999a dnn_backend_openvino.c: add version mismatch reminder
The OpenVINO model file format changes when OpenVINO goes to a new
release, it does not work if the versions between model file and
runtime are mismatched.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-01-22 08:28:13 +08:00
Limin Wang
6dad428546 avformat/async: Use AVERROR macro
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-01-22 07:40:29 +08:00
Mark Thompson
c154aada45 lavd/dshow: Add namespace prefix to global functions 2021-01-21 20:02:23 -03:00
Michael Niedermayer
43c8d3097b avcodec/cri: check for available input in unpack_10bit()
Fixes: Timeout (>20sec -> 56ms)
Fixes: 26995/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5107217080254464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-21 20:21:32 +01:00
Michael Niedermayer
1b373b41d9 avformat/avidec: dv does not support palettes
Fixes: memleak
Fixes: 26937/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5763003338981376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-21 20:21:32 +01:00
Michael Niedermayer
7540d60bf6 avformat/dhav: Break out of infinite dhav search loop
Fixes: Infinite loop
Fixes: 26922/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-5794549613723648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-21 20:21:32 +01:00
Michael Niedermayer
1b1dac2716 libavformat/utils: consider avio_size() failure in ffio_limit()
Fixes: Timeout (>20sec -> 3ms)
Fixes: 26918/clusterfuzz-testcase-minimized-ffmpeg_dem_THP_fuzzer-5750425191710720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-21 20:21:32 +01:00
Michael Niedermayer
60770a50fb avformat/nistspheredec: Check bits_per_coded_sample and channels
Fixes: signed integer overflow: 80 * 92233009 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_NISTSPHERE_fuzzer-6669100654919680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-21 20:21:32 +01:00
Michael Niedermayer
631ee3f8e4 avformat/paf: Do not zero allocated tables which are immedeately filled
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-21 20:21:32 +01:00
Andreas Rheinhardt
b347384173 avcodec/me_cmp: Remove ff_check_alignment()
The usage of a static variable presents a potential for data races and
means that this function can't be used in init functions of codecs with
FF_CODEC_CAP_INIT_THREADSAFE (unless of course one presumes that
everything is alright in which case the error is not triggered; but then
the whole function is pointless...). This makes the Snow decoder
init-threadsafe as it already claims.

Notice that this function has been removed in 2014 by Libav in commit
9103185bd1, because only some codepaths
are checked this way and because it only affects legacy compilers. The
latter is of course even more true today.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:13:06 +01:00
Andreas Rheinhardt
1f9ef2f3cf avcodec/mpeg12dec: Remove redundant writes
ff_mpv_decode_init() already sets MpegEncContext.avctx.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:12:43 +01:00
Andreas Rheinhardt
aff923c0b5 avcodec/Makefile: Make H.263 encoder compilable without MPEG4 encoder
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
ab905f1dbc avcodec/Makefile: Make H.263 decoder compilable without H.263I
The only call to ff_intel_h263_decode_picture_header() is already behind
"if (CONFIG_H263I_DECODER)".

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
d64828c8af avcodec/Makefile: Remove FLAC dependencies on vorbis_data
2ef2496cd1 used ff_vorbis_channel_layouts
in flac.c, but added a dependency to the FLAC decoder only; lateron
aba0278e9f added the dependency of the
FLAC parser and encoder on vorbis_data.o. Yet when the original commit
was reverted in aba0278e9f, the two other
dependencies were not removed. This commit fixes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
21b4b90475 avcodec/Makefile: Remove dependency of H.263 on FLV codecs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Andreas Rheinhardt
9e74f324d8 avcodec/Makefile: Remove unnecessary cbrt_data dependency
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-21 19:02:18 +01:00
Mark Thompson
fa75e43875 h264_redundant_pps_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
375176a540 av1_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
e46aa5a894 vp9_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
f35b268327 mpeg2_metadata_bsf: Use common cbs bsf implementation
This also adds support for updating new extradata.
2021-01-21 17:13:55 +00:00
Mark Thompson
b95f901c7f h265_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:55 +00:00
Mark Thompson
c837d9481a h264_metadata_bsf: Use common cbs bsf implementation 2021-01-21 17:13:54 +00:00
Mark Thompson
01a68c12a7 cbs: Implement common parts of cbs-based bitstream filters separately
This allows removal of a lot of duplicated code between BSFs.
2021-01-21 17:13:54 +00:00
Mark Thompson
c9c5b1977f h264_metadata_bsf: Improve interpretation of input display matrices
The previous code here only worked in more limited cases.
2021-01-21 17:13:54 +00:00