]> git.sesse.net Git - ffmpeg/log
ffmpeg
3 years agoavcodec/dolby_e: Split decoder/parser files
Nicolas Gaullier [Mon, 25 Jan 2021 12:11:37 +0000 (13:11 +0100)]
avcodec/dolby_e: Split decoder/parser files

3 years agoavcodec/dolby_e: Add a parser
Nicolas Gaullier [Mon, 25 Jan 2021 12:11:36 +0000 (13:11 +0100)]
avcodec/dolby_e: Add a parser

3 years agoavfilter/vf_lenscorrection: allow to change colors of unmapped pixels
Paul B Mahol [Mon, 25 Jan 2021 11:28:28 +0000 (12:28 +0100)]
avfilter/vf_lenscorrection: allow to change colors of unmapped pixels

3 years agoavfilter/vf_lenscorrection: add >8 depth support
Paul B Mahol [Mon, 25 Jan 2021 11:01:49 +0000 (12:01 +0100)]
avfilter/vf_lenscorrection: add >8 depth support

3 years agoavfilter/vf_lenscorrection: fix far edges with nearest interpolation
Paul B Mahol [Mon, 25 Jan 2021 10:38:58 +0000 (11:38 +0100)]
avfilter/vf_lenscorrection: fix far edges with nearest interpolation

3 years agolavf/http: treat 308 as 301
Robin Cooksey [Wed, 13 Jan 2021 15:27:50 +0000 (15:27 +0000)]
lavf/http: treat 308 as 301

FFmpeg does not support POST, so there is no difference between a
308 and 301 request (see [RFC7538] section 3).

Signed-off-by: Josh Dekker <josh@itanimul.li>
3 years agocheckasm: add hevc_pel tests
Josh Dekker [Thu, 7 Jan 2021 12:10:20 +0000 (13:10 +0100)]
checkasm: add hevc_pel tests

Co-authored-by: Niklas Haas <git@haasn.xyz>
Signed-off-by: Josh Dekker <josh@itanimul.li>
3 years agoconfigure: add fallback to $arch in msvc assembler check.
Reimar Döffinger [Sat, 23 Jan 2021 12:52:41 +0000 (13:52 +0100)]
configure: add fallback to $arch in msvc assembler check.

Setting the defaults for $arch happens only later, so
the current code would not set AS correctly if --arch
was not specified on the command-line.
Fix it by adding an explicit fallback to $arch_default.

Signed-off-by: Josh Dekker <josh@itanimul.li>
3 years agoavformat/asfdec_o: Check for EOF in asf_read_marker()
Michael Niedermayer [Tue, 19 Jan 2021 23:00:27 +0000 (00:00 +0100)]
avformat/asfdec_o: Check for EOF in asf_read_marker()

Fixes: Timeout
Fixes: 26460/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-5710884393189376
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter: add epx pixel art scaler
Paul B Mahol [Fri, 22 Jan 2021 18:54:52 +0000 (19:54 +0100)]
avfilter: add epx pixel art scaler

3 years agoavfilter/vf_lenscorrection: add support for more 8-bit formats
Paul B Mahol [Sun, 24 Jan 2021 23:43:31 +0000 (00:43 +0100)]
avfilter/vf_lenscorrection: add support for more 8-bit formats

3 years agoavfilter/vf_lenscorrection: add timeline support
Paul B Mahol [Sun, 24 Jan 2021 23:38:41 +0000 (00:38 +0100)]
avfilter/vf_lenscorrection: add timeline support

3 years agoavfilter/vf_lenscorrection: add bilinear interpolation
Paul B Mahol [Sun, 24 Jan 2021 22:43:11 +0000 (23:43 +0100)]
avfilter/vf_lenscorrection: add bilinear interpolation

3 years agoavfilter/vf_lenscorrection: simplify options
Paul B Mahol [Sun, 24 Jan 2021 11:18:09 +0000 (12:18 +0100)]
avfilter/vf_lenscorrection: simplify options

3 years agoavcodec/tiff_common: Remove declarations of inexistent functions
Andreas Rheinhardt [Sat, 23 Jan 2021 14:27:57 +0000 (15:27 +0100)]
avcodec/tiff_common: Remove declarations of inexistent functions

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/vp8data: Remove unused array
Andreas Rheinhardt [Sat, 23 Jan 2021 13:33:59 +0000 (14:33 +0100)]
avcodec/vp8data: Remove unused array

Unused since 748f921ad1997a464fb8963d0ba2c5bb5e036b1b.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/vf_nnedi: Fix segfault when prescreening is disabled
Andreas Rheinhardt [Sun, 24 Jan 2021 20:56:36 +0000 (21:56 +0100)]
avfilter/vf_nnedi: Fix segfault when prescreening is disabled

Since c737f6edcef74a64f4d0ebcefa970bd31266d512 prescreening is
nevertheless run because of a wrong check: "if (s->prescreen > 0)".
s->prescreen is an array of two function pointers that is contained in
the context and comparing it with 0 (i.e. NULL) is actually undefined
behaviour, because NULL and s->prescreen do not point to the same
object (NULL after all never points to any object). Nevertheless both
Clang as well as GCC compile this to code that treat s->prescreen > 0 as
true, leading to segfaults, because the code then tries to access the
-1th member of an array.

This commit fixes the check as well as another such check a few lines
below.

(Found via compiler warnings enabled by -pedantic:
"ordered comparison between pointer and zero is an extension".)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agolsws/ppc/yuv2rgb: Fix transparency converting from yuv->rgb32.
Carl Eugen Hoyos [Sat, 23 Jan 2021 18:33:13 +0000 (19:33 +0100)]
lsws/ppc/yuv2rgb: Fix transparency converting from yuv->rgb32.

Based on 68363b69 by Reimar Döffinger.

Fixes ticket #9077.

3 years agotests/fate/fits: Add a todo for a 64bit test.
Carl Eugen Hoyos [Sun, 24 Jan 2021 16:13:19 +0000 (17:13 +0100)]
tests/fate/fits: Add a todo for a 64bit test.

The test should currently fail on big endian but passes because of the
unsuitable input file.

3 years agotests/fate/hlsenc: ffprobe is needed for hls-fmp4_ac3.
Carl Eugen Hoyos [Sun, 24 Jan 2021 16:12:05 +0000 (17:12 +0100)]
tests/fate/hlsenc: ffprobe is needed for hls-fmp4_ac3.

3 years agoavfilter/avfilter: Remove AVFilterLink.flags
Andreas Rheinhardt [Sun, 24 Jan 2021 11:21:14 +0000 (12:21 +0100)]
avfilter/avfilter: Remove AVFilterLink.flags

It is a private field that is unused since
44f660e7e75b856eafa5f7e7cc6e633de5d01b5d.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavformat/rtpdec: Constify RTPDynamicProtocolHandlers
Andreas Rheinhardt [Wed, 30 Dec 2020 12:39:09 +0000 (13:39 +0100)]
avformat/rtpdec: Constify RTPDynamicProtocolHandlers

Also constify the list of pointers to said RTPDynamicProtocolHandlers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavformat/rtpdec: Remove next pointer from Protocol Handlers
Andreas Rheinhardt [Wed, 30 Dec 2020 12:31:46 +0000 (13:31 +0100)]
avformat/rtpdec: Remove next pointer from Protocol Handlers

Forgotten in 61974537610d82bd35b6e3ac91ccd270c6bdc711 (notice that
RTPDynamicProtocolHandler is not a public struct, so one can remove
the linked-list pointer immediately (unlike in most other patches of
this kind)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavformat/hlsenc: EXT-X-I-FRAMES-ONLY requires version 4 or higher
Zhao Zhili [Fri, 15 Jan 2021 16:47:41 +0000 (00:47 +0800)]
avformat/hlsenc: EXT-X-I-FRAMES-ONLY requires version 4 or higher

3 years agoavformat/hls: change sequence number type to int64_t
Zhao Zhili [Sat, 16 Jan 2021 03:40:36 +0000 (11:40 +0800)]
avformat/hls: change sequence number type to int64_t

Fix atoi() overflow for large EXT-X-MEDIA-SEQUENCE.

The spec says the type of sequence number is uint64_t. Use int64_t
here since current implementation requires it to be signed integer,
and hlsenc use int64_t too.

3 years agoavfilter/vf_waveform: flat_pix_fmts never used
Peter Ross [Tue, 5 Jan 2021 02:54:53 +0000 (13:54 +1100)]
avfilter/vf_waveform: flat_pix_fmts never used

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/dvenc: dv100_weight_shift never used
Peter Ross [Tue, 5 Jan 2021 02:54:22 +0000 (13:54 +1100)]
avcodec/dvenc: dv100_weight_shift never used

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/vf_colorchannelmixer: add option to preserve lightness
Paul B Mahol [Sat, 23 Jan 2021 21:01:46 +0000 (22:01 +0100)]
avfilter/vf_colorchannelmixer: add option to preserve lightness

3 years agoavcodec/flashsv2enc: factorize updating block dimensions
Marton Balint [Tue, 6 Oct 2020 23:39:43 +0000 (01:39 +0200)]
avcodec/flashsv2enc: factorize updating block dimensions

The patch changes the init function to initialize block dimensions to fixed
64x64 instead of the previously used image width/height based value.

This should not cause any actual change in behaviour because block dimensions
are recalculated on every keyframe in optimum_block_width() and
optimum_block_height() functions and in the current code the result is always
64x64 regardless of the image dimensions used.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavformat/swf: add support for reading and writing VP6A and Flash Screen Video codecs
Marton Balint [Wed, 7 Oct 2020 20:21:27 +0000 (22:21 +0200)]
avformat/swf: add support for reading and writing VP6A and Flash Screen Video codecs

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavformat/swfenc: add support for muxing png images
Marton Balint [Sat, 28 Sep 2019 20:58:52 +0000 (22:58 +0200)]
avformat/swfenc: add support for muxing png images

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavformat/swfenc: fix generation of FileAttributes tag
Marton Balint [Sat, 28 Sep 2019 21:05:21 +0000 (23:05 +0200)]
avformat/swfenc: fix generation of FileAttributes tag

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavfilter/af_astats: fix possible crash because of undefined float to integer rounding
Marton Balint [Sun, 10 Jan 2021 23:12:39 +0000 (00:12 +0100)]
avfilter/af_astats: fix possible crash because of undefined float to integer rounding

Fixes ticket #9049.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoRevert "avutil/timecode: fix sscanf format string with garbage at the end"
Marton Balint [Sat, 16 Jan 2021 08:42:01 +0000 (09:42 +0100)]
Revert "avutil/timecode: fix sscanf format string with garbage at the end"

This reverts commit 6696a07ac62bfec49dd488510a719367918b9f7a.

It is wrong to restrict timecodes to always contain leading zeros or for hours
or frames to be 2 chars only.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoqsv: dump more info in error, debug and verbose mode
Haihao Xiang [Tue, 5 Jan 2021 07:02:56 +0000 (15:02 +0800)]
qsv: dump more info in error, debug and verbose mode

Dump iopattern mode and the SDK error/warning desciptions for qsv based
filters and iopattern mode for qsvenc

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com
3 years agolavf/qsv: Add functions to print mfx iopattern, warning and error
Haihao Xiang [Tue, 5 Jan 2021 07:02:55 +0000 (15:02 +0800)]
lavf/qsv: Add functions to print mfx iopattern, warning and error

It is a copy of the relevant part in lavc/qsv but use different function
names to avoid multiple definition when linking lavc and lavf statically.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com
3 years agoavcodec/qsvdec: refact, remove duplicate code for plugin loading
Xu Guangxin [Tue, 5 Jan 2021 02:43:42 +0000 (10:43 +0800)]
avcodec/qsvdec: refact, remove duplicate code for plugin loading

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
3 years agoavcodec/qsvdec: refact, move qsvdec_other.c to qsvdec.c
Xu Guangxin [Tue, 5 Jan 2021 02:43:41 +0000 (10:43 +0800)]
avcodec/qsvdec: refact, move qsvdec_other.c to qsvdec.c

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
3 years agoavcodec/qsvdec: refact, move qsvdec_h2645.c to qsvdec.c
Xu Guangxin [Tue, 5 Jan 2021 02:43:40 +0000 (10:43 +0800)]
avcodec/qsvdec: refact, move qsvdec_h2645.c to qsvdec.c

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
3 years agoavcodec/qsvdec_h2645: refact, use DEFINE_QSV_DECODER to remove duplicate code
Xu Guangxin [Tue, 5 Jan 2021 02:43:39 +0000 (10:43 +0800)]
avcodec/qsvdec_h2645: refact, use DEFINE_QSV_DECODER to remove duplicate code

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
3 years agoavcodec/qsvdec_other: refact, use DEFINE_QSV_DECODER to remove duplicate code
Xu Guangxin [Tue, 5 Jan 2021 02:43:38 +0000 (10:43 +0800)]
avcodec/qsvdec_other: refact, use DEFINE_QSV_DECODER to remove duplicate code

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
3 years agoavcodec/qsv_h2645: fix memory leak for plugin load
Xu Guangxin [Tue, 5 Jan 2021 02:43:37 +0000 (10:43 +0800)]
avcodec/qsv_h2645: fix memory leak for plugin load

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
3 years agoavformat/flvdec: Use av_sat_add64() for pts computation
Michael Niedermayer [Thu, 14 Jan 2021 21:02:50 +0000 (22:02 +0100)]
avformat/flvdec: Use av_sat_add64() for pts computation

Fixes: signed integer overflow: -9223372036854767583 + -65536 cannot be represented in type 'long'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_FLV_fuzzer-6734549467922432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/utils: Check dts - (1<<pts_wrap_bits) overflow
Michael Niedermayer [Thu, 14 Jan 2021 20:29:01 +0000 (21:29 +0100)]
avformat/utils: Check dts - (1<<pts_wrap_bits) overflow

Fixes: signed integer overflow: -9223372036842389247 - 2147483648 cannot be represented in type 'long long'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_FLV_fuzzer-4845007531671552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/bfi: Check chunk_header
Michael Niedermayer [Thu, 14 Jan 2021 17:41:41 +0000 (18:41 +0100)]
avformat/bfi: Check chunk_header

Fixes: signed integer overflow: -2147483648 - 3 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_BFI_fuzzer-6665764123836416
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/ads: Check size
Michael Niedermayer [Thu, 14 Jan 2021 17:38:16 +0000 (18:38 +0100)]
avformat/ads: Check size

Fixes: signed integer overflow: -2147483616 - 64 cannot be represented in type 'int'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_ADS_fuzzer-6617769344892928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/iff: Check block align also for ID_MAUD
Michael Niedermayer [Fri, 1 Jan 2021 23:58:42 +0000 (00:58 +0100)]
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>
3 years agodoc/ffmpeg: document adrift_threshold
Gyan Doshi [Sat, 23 Jan 2021 11:11:40 +0000 (16:41 +0530)]
doc/ffmpeg: document adrift_threshold

3 years agodoc/ffmpeg: restore location of stray passage
Gyan Doshi [Sat, 23 Jan 2021 10:11:52 +0000 (15:41 +0530)]
doc/ffmpeg: restore location of stray passage

Added in 88fc1438c69, this passage was separated from its original
context over the years with unrelated entries sandwiched in between.

3 years agodoc/fftools-common-opts: document max_alloc
Gyan Doshi [Sat, 23 Jan 2021 09:29:07 +0000 (14:59 +0530)]
doc/fftools-common-opts: document max_alloc

3 years agodoc/fftools-common-opts: document buildconf
Gyan Doshi [Sat, 23 Jan 2021 08:25:28 +0000 (13:55 +0530)]
doc/fftools-common-opts: document buildconf

3 years agoavcodec/utils: Check for integer overflow in get_audio_frame_duration() for ADPCM_DTK
Michael Niedermayer [Tue, 3 Nov 2020 18:21:18 +0000 (19:21 +0100)]
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>
3 years agoavformat/fitsdec: Better size checks
Michael Niedermayer [Tue, 3 Nov 2020 22:41:36 +0000 (23:41 +0100)]
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>
3 years agoavformat/mxfdec: Fix integer overflow in next position in mxf_read_local_tags()
Michael Niedermayer [Thu, 21 Jan 2021 20:41:41 +0000 (21:41 +0100)]
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>
3 years agoavcodec/tableprint: Don't include mem_internal.h
Andreas Rheinhardt [Wed, 6 Jan 2021 21:40:28 +0000 (22:40 +0100)]
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>
3 years agoavfilter/vf_atadenoise: fix mid calculation
Paul B Mahol [Fri, 22 Jan 2021 17:18:38 +0000 (18:18 +0100)]
avfilter/vf_atadenoise: fix mid calculation

3 years agoavfilter/vf_estdif: make interpolation used user configurable
Paul B Mahol [Fri, 22 Jan 2021 16:21:28 +0000 (17:21 +0100)]
avfilter/vf_estdif: make interpolation used user configurable

3 years agoavfilter/vf_atadenoise: add sigma options
Paul B Mahol [Thu, 21 Jan 2021 17:48:27 +0000 (18:48 +0100)]
avfilter/vf_atadenoise: add sigma options

3 years agoavcodec/h264_metadata_bsf: Don't use unitialized value
Andreas Rheinhardt [Fri, 22 Jan 2021 11:42:44 +0000 (12:42 +0100)]
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>
3 years agoavcodec/videotoolboxenc: Fix SEI enum identifiers
Andreas Rheinhardt [Fri, 22 Jan 2021 10:59:41 +0000 (11:59 +0100)]
avcodec/videotoolboxenc: Fix SEI enum identifiers

Broken in 64b3aac8d07a8744656737619b70977359d9a6a5.

Tested-by: Mark Himsley <mark.himsley@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavfilter/vf_w3fdif: reduce overhead calling execute for every plane
Paul B Mahol [Fri, 22 Jan 2021 12:27:06 +0000 (13:27 +0100)]
avfilter/vf_w3fdif: reduce overhead calling execute for every plane

3 years agotests/dnn: fix build issue after function name changed
Guo, Yejun [Fri, 22 Jan 2021 11:28:29 +0000 (19:28 +0800)]
tests/dnn: fix build issue after function name changed

3 years agodnn: Add ff_ prefix to unnamespaced globals
Mark Thompson [Thu, 21 Jan 2021 21:39:55 +0000 (21:39 +0000)]
dnn: Add ff_ prefix to unnamespaced globals

Reviewed-By: Guo, Yejun <yejun.guo@intel.com>
3 years agodnn_backend_native.c: Add missing static to local variable
Mark Thompson [Thu, 21 Jan 2021 21:39:53 +0000 (21:39 +0000)]
dnn_backend_native.c: Add missing static to local variable

3 years agodnn-layer-conv2d-test.c: remove dependency of dnn_native_class
Guo, Yejun [Fri, 22 Jan 2021 02:39:19 +0000 (10:39 +0800)]
dnn-layer-conv2d-test.c: remove dependency of dnn_native_class

3 years agoavutils/vulkan: hwmap, respect src frame resolution
Xu Guangxin [Thu, 21 Jan 2021 04:35:13 +0000 (12:35 +0800)]
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.

3 years agodnn_backend_native_layer_mathbinary.c: Delete unused global variable
Mark Thompson [Thu, 21 Jan 2021 21:39:52 +0000 (21:39 +0000)]
dnn_backend_native_layer_mathbinary.c: Delete unused global variable

3 years agodnn_backend_native_layer_conv2d.c: refine code with av_malloc_array and av_freep
Guo, Yejun [Mon, 18 Jan 2021 08:28:11 +0000 (16:28 +0800)]
dnn_backend_native_layer_conv2d.c: refine code with av_malloc_array and av_freep

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
3 years agodnn_backend_native_layer_conv2d.c: correct struct name with CamelCase
Guo, Yejun [Mon, 18 Jan 2021 08:15:34 +0000 (16:15 +0800)]
dnn_backend_native_layer_conv2d.c: correct struct name with CamelCase

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
3 years agodnn/queue: remove prefix FF for Queue and SafeQueue
Guo, Yejun [Mon, 18 Jan 2021 08:09:56 +0000 (16:09 +0800)]
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>
3 years agolibavfilter/dnn: add prefix ff_ for internal functions
Guo, Yejun [Mon, 18 Jan 2021 08:00:58 +0000 (16:00 +0800)]
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>
3 years agolibavfilter/dnn: use avpriv_report_missing_feature for unsupported features
Guo, Yejun [Mon, 18 Jan 2021 07:56:34 +0000 (15:56 +0800)]
libavfilter/dnn: use avpriv_report_missing_feature for unsupported features

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
3 years agodnn_backend_openvino.c: add version mismatch reminder
Guo, Yejun [Mon, 18 Jan 2021 07:27:23 +0000 (15:27 +0800)]
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>
3 years agoavformat/async: Use AVERROR macro
Limin Wang [Sat, 16 Jan 2021 01:32:13 +0000 (09:32 +0800)]
avformat/async: Use AVERROR macro

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agolavd/dshow: Add namespace prefix to global functions
Mark Thompson [Mon, 25 Jun 2018 18:47:03 +0000 (19:47 +0100)]
lavd/dshow: Add namespace prefix to global functions

3 years agoavcodec/cri: check for available input in unpack_10bit()
Michael Niedermayer [Mon, 9 Nov 2020 22:31:30 +0000 (23:31 +0100)]
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>
3 years agoavformat/avidec: dv does not support palettes
Michael Niedermayer [Mon, 9 Nov 2020 20:48:31 +0000 (21:48 +0100)]
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>
3 years agoavformat/dhav: Break out of infinite dhav search loop
Michael Niedermayer [Mon, 9 Nov 2020 19:42:56 +0000 (20:42 +0100)]
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>
3 years agolibavformat/utils: consider avio_size() failure in ffio_limit()
Michael Niedermayer [Mon, 9 Nov 2020 18:58:20 +0000 (19:58 +0100)]
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>
3 years agoavformat/nistspheredec: Check bits_per_coded_sample and channels
Michael Niedermayer [Sat, 16 Jan 2021 23:07:26 +0000 (00:07 +0100)]
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>
3 years agoavformat/paf: Do not zero allocated tables which are immedeately filled
Michael Niedermayer [Tue, 19 Jan 2021 23:32:22 +0000 (00:32 +0100)]
avformat/paf: Do not zero allocated tables which are immedeately filled

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/me_cmp: Remove ff_check_alignment()
Andreas Rheinhardt [Tue, 1 Dec 2020 23:20:04 +0000 (00:20 +0100)]
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
9103185bd116930f90b847090e66a64fa9971ce2, 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>
3 years agoavcodec/mpeg12dec: Remove redundant writes
Andreas Rheinhardt [Wed, 9 Dec 2020 02:30:00 +0000 (03:30 +0100)]
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>
3 years agoavcodec/Makefile: Make H.263 encoder compilable without MPEG4 encoder
Andreas Rheinhardt [Fri, 8 Jan 2021 03:07:19 +0000 (04:07 +0100)]
avcodec/Makefile: Make H.263 encoder compilable without MPEG4 encoder

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/Makefile: Make H.263 decoder compilable without H.263I
Andreas Rheinhardt [Thu, 7 Jan 2021 01:51:13 +0000 (02:51 +0100)]
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>
3 years agoavcodec/Makefile: Remove FLAC dependencies on vorbis_data
Andreas Rheinhardt [Thu, 7 Jan 2021 01:00:26 +0000 (02:00 +0100)]
avcodec/Makefile: Remove FLAC dependencies on vorbis_data

2ef2496cd19eb833f4ad22a5051c11be80d09598 used ff_vorbis_channel_layouts
in flac.c, but added a dependency to the FLAC decoder only; lateron
aba0278e9fe8e66c078588efe66f6af4db432770 added the dependency of the
FLAC parser and encoder on vorbis_data.o. Yet when the original commit
was reverted in aba0278e9fe8e66c078588efe66f6af4db432770, the two other
dependencies were not removed. This commit fixes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/Makefile: Remove dependency of H.263 on FLV codecs
Andreas Rheinhardt [Thu, 7 Jan 2021 00:34:25 +0000 (01:34 +0100)]
avcodec/Makefile: Remove dependency of H.263 on FLV codecs

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/Makefile: Remove unnecessary cbrt_data dependency
Andreas Rheinhardt [Wed, 6 Jan 2021 23:34:13 +0000 (00:34 +0100)]
avcodec/Makefile: Remove unnecessary cbrt_data dependency

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoh264_redundant_pps_bsf: Use common cbs bsf implementation
Mark Thompson [Fri, 1 Jan 2021 21:35:23 +0000 (21:35 +0000)]
h264_redundant_pps_bsf: Use common cbs bsf implementation

3 years agoav1_metadata_bsf: Use common cbs bsf implementation
Mark Thompson [Fri, 1 Jan 2021 21:35:22 +0000 (21:35 +0000)]
av1_metadata_bsf: Use common cbs bsf implementation

3 years agovp9_metadata_bsf: Use common cbs bsf implementation
Mark Thompson [Fri, 1 Jan 2021 21:35:21 +0000 (21:35 +0000)]
vp9_metadata_bsf: Use common cbs bsf implementation

3 years agompeg2_metadata_bsf: Use common cbs bsf implementation
Mark Thompson [Fri, 1 Jan 2021 21:35:20 +0000 (21:35 +0000)]
mpeg2_metadata_bsf: Use common cbs bsf implementation

This also adds support for updating new extradata.

3 years agoh265_metadata_bsf: Use common cbs bsf implementation
Mark Thompson [Fri, 1 Jan 2021 21:35:19 +0000 (21:35 +0000)]
h265_metadata_bsf: Use common cbs bsf implementation

3 years agoh264_metadata_bsf: Use common cbs bsf implementation
Mark Thompson [Fri, 1 Jan 2021 21:35:18 +0000 (21:35 +0000)]
h264_metadata_bsf: Use common cbs bsf implementation

3 years agocbs: Implement common parts of cbs-based bitstream filters separately
Mark Thompson [Fri, 1 Jan 2021 21:35:17 +0000 (21:35 +0000)]
cbs: Implement common parts of cbs-based bitstream filters separately

This allows removal of a lot of duplicated code between BSFs.

3 years agoh264_metadata_bsf: Improve interpretation of input display matrices
Mark Thompson [Fri, 1 Jan 2021 21:35:16 +0000 (21:35 +0000)]
h264_metadata_bsf: Improve interpretation of input display matrices

The previous code here only worked in more limited cases.

3 years agoh264_metadata_bsf: Refactor the filter function into smaller parts
Mark Thompson [Fri, 1 Jan 2021 21:35:15 +0000 (21:35 +0000)]
h264_metadata_bsf: Refactor the filter function into smaller parts

3 years agocbs_sei: Remove restrictions on MDCV values
Mark Thompson [Fri, 1 Jan 2021 21:35:14 +0000 (21:35 +0000)]
cbs_sei: Remove restrictions on MDCV values

Since this was originally written the standards have changed to allow
arbitrary values here, but leaves their meaning unspecified.

3 years agocbs_h2645: Merge SEI message handling in common between codecs
Mark Thompson [Fri, 1 Jan 2021 21:35:13 +0000 (21:35 +0000)]
cbs_h2645: Merge SEI message handling in common between codecs

3 years agohevc: Use common SEI types
Mark Thompson [Thu, 21 Jan 2021 14:38:58 +0000 (14:38 +0000)]
hevc: Use common SEI types