]> git.sesse.net Git - ffmpeg/log
ffmpeg
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

3 years agoh264: Use common SEI types
Mark Thompson [Thu, 21 Jan 2021 14:37:49 +0000 (14:37 +0000)]
h264: Use common SEI types

3 years agolavc: Add new header for SEI payload types
Mark Thompson [Thu, 21 Jan 2021 14:31:56 +0000 (14:31 +0000)]
lavc: Add new header for SEI payload types

These form a common namespace between the H.264, H.265 and H.266
standards, so we can use the same definitions in all three places.

3 years agoh264_metadata_bsf: Move SEI user data parsing to init time
Mark Thompson [Fri, 1 Jan 2021 21:35:12 +0000 (21:35 +0000)]
h264_metadata_bsf: Move SEI user data parsing to init time

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

Make a new template file for common SEI messages - this will also apply
to H.266.

3 years agoavfilter/vf_readeia608: add >8 depth support
Paul B Mahol [Thu, 21 Jan 2021 13:27:44 +0000 (14:27 +0100)]
avfilter/vf_readeia608: add >8 depth support

3 years agoffmpeg_opts: remove lowres check
James Almer [Fri, 8 Jan 2021 20:47:41 +0000 (17:47 -0300)]
ffmpeg_opts: remove lowres check

The st->codec values are updated based on the lowres factor by
avformat_find_stream_info() when it runs an instance of the decoder internally,
and the same thing happens in ffmpeg.c when we open ist->dec_ctx with
avcodec_open2(), so these assignments are redundant.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/vf_super2xsai: add slice threading support
Paul B Mahol [Thu, 21 Jan 2021 12:26:17 +0000 (13:26 +0100)]
avfilter/vf_super2xsai: add slice threading support

3 years agoavfilter/vf_super2xsai: constify src pointer
Paul B Mahol [Thu, 21 Jan 2021 12:05:57 +0000 (13:05 +0100)]
avfilter/vf_super2xsai: constify src pointer

3 years agoavfilter/vf_dblur: remove unused line
Paul B Mahol [Thu, 21 Jan 2021 11:58:58 +0000 (12:58 +0100)]
avfilter/vf_dblur: remove unused line

3 years agoavfilter/vf_deblock: fix >8 depth format case check
Paul B Mahol [Thu, 21 Jan 2021 11:55:16 +0000 (12:55 +0100)]
avfilter/vf_deblock: fix >8 depth format case check

3 years agoavfilter/vf_fieldmatch: use av_malloc_array()
Paul B Mahol [Thu, 21 Jan 2021 11:28:13 +0000 (12:28 +0100)]
avfilter/vf_fieldmatch: use av_malloc_array()

3 years agoavfilter/vf_decimate: add support for more formats
Paul B Mahol [Thu, 21 Jan 2021 10:07:04 +0000 (11:07 +0100)]
avfilter/vf_decimate: add support for more formats

3 years agoavformat/asfdec_o: Check size vs. offset in detect_unknown_subobject()
Michael Niedermayer [Tue, 12 Jan 2021 20:17:18 +0000 (21:17 +0100)]
avformat/asfdec_o: Check size vs. offset in detect_unknown_subobject()

Fixes: signed integer overflow: 2314885530818453566 + 7503032301549264928 cannot be represented in type 'long'
Fixes: 26639/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_O_fuzzer-6024222100684800
Alternatively this could be ignored but then the end condition of the loop
would be hard to reach as avio_tell() is int64_t

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 for integer overflow in av_get_frame_filename2()
Michael Niedermayer [Sat, 15 Aug 2020 20:52:42 +0000 (22:52 +0200)]
avformat/utils: check for integer overflow in av_get_frame_filename2()

Fixes: signed integer overflow: 317316873 * 10 cannot be represented in type 'int'
Fixes: 24708/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5731180885049344
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/vf_nnedi: fix memleak at eof and simplify frame handling
Paul B Mahol [Wed, 20 Jan 2021 12:33:41 +0000 (13:33 +0100)]
avfilter/vf_nnedi: fix memleak at eof and simplify frame handling

3 years agoavfilter/vf_nnedi: small improvements
Paul B Mahol [Wed, 20 Jan 2021 12:05:52 +0000 (13:05 +0100)]
avfilter/vf_nnedi: small improvements

3 years agoMAINTAINERS: update names
rcombs [Wed, 20 Jan 2021 07:04:26 +0000 (01:04 -0600)]
MAINTAINERS: update names

3 years agoAll: update names in copyright headers
rcombs [Wed, 20 Jan 2021 07:02:56 +0000 (01:02 -0600)]
All: update names in copyright headers

3 years agoavfilter/vf_nnedi: unbreak nsize=0:nns=0 output
Paul B Mahol [Tue, 19 Jan 2021 19:20:35 +0000 (20:20 +0100)]
avfilter/vf_nnedi: unbreak nsize=0:nns=0 output

3 years agoavfilter/vf_nnedi: simplify code even more
Paul B Mahol [Tue, 19 Jan 2021 16:06:05 +0000 (17:06 +0100)]
avfilter/vf_nnedi: simplify code even more

3 years agoavfilter/vf_nnedi: small cleanups
Paul B Mahol [Tue, 19 Jan 2021 13:49:45 +0000 (14:49 +0100)]
avfilter/vf_nnedi: small cleanups

3 years agoavfilter/vf_nnedi: fix some compilation errors and warnings
Paul B Mahol [Tue, 19 Jan 2021 11:15:07 +0000 (12:15 +0100)]
avfilter/vf_nnedi: fix some compilation errors and warnings

3 years agoavformat/id3v2: Check against max compression ratio before allocation
Michael Niedermayer [Sat, 28 Nov 2020 22:43:23 +0000 (23:43 +0100)]
avformat/id3v2: Check against max compression ratio before allocation

Fixes: Timeout (>10sec -> 12ms)
Fixes: 27612/clusterfuzz-testcase-minimized-ffmpeg_dem_PCM_S24BE_fuzzer-6605893000757248
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: Use av_sat_sub64() in check_stream_max_drift()
Michael Niedermayer [Sat, 31 Oct 2020 10:54:16 +0000 (11:54 +0100)]
avformat/avidec: Use av_sat_sub64() in check_stream_max_drift()

Fixes: signed integer overflow: 8833900919969684211 - -9223372036854775808 cannot be represented in type 'long'
Fixes: 26726/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5669377724383232
Fixes: 27587/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-6294562263531520
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 agoavutil/timecode: Avoid undefined behavior with large framenum
Michael Niedermayer [Sat, 28 Nov 2020 20:31:16 +0000 (21:31 +0100)]
avutil/timecode: Avoid undefined behavior with large framenum

Fixes: signed integer overflow: 2147462079 + 2149596 cannot be represented in type 'int'
Fixes: 27565/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5091972813160448
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/mov: Check a.size before computing next_root_atom
Michael Niedermayer [Sat, 28 Nov 2020 20:20:43 +0000 (21:20 +0100)]
avformat/mov: Check a.size before computing next_root_atom

Fixes: signed integer overflow: 64 + 9223372036854775799 cannot be represented in type 'long'
Fixes: 27563/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6244650163372032
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/sbgdec: Reduce the amount of floating point in str_to_time()
Michael Niedermayer [Sat, 16 Jan 2021 23:07:29 +0000 (00:07 +0100)]
avformat/sbgdec: Reduce the amount of floating point in str_to_time()

Fixes: 1e+75 is outside the range of representable values of type 'long'
Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_SBG_fuzzer-6626834808700928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/vf_w3fdif: add more forgotten formats
Paul B Mahol [Mon, 18 Jan 2021 10:44:03 +0000 (11:44 +0100)]
avfilter/vf_w3fdif: add more forgotten formats

3 years agoavfilter/vf_estdif: add some forgotten formats
Paul B Mahol [Mon, 18 Jan 2021 10:39:00 +0000 (11:39 +0100)]
avfilter/vf_estdif: add some forgotten formats

3 years agoavfilter/vf_nnedi: rewrite and cleanup code
Paul B Mahol [Sun, 17 Jan 2021 16:39:28 +0000 (17:39 +0100)]
avfilter/vf_nnedi: rewrite and cleanup code

Also add slice threading support.
Also add support for >8 depth formats.
Also add support for commands.

3 years agodnn/openvino: support model input resize
Ting Fu [Mon, 18 Jan 2021 03:42:14 +0000 (11:42 +0800)]
dnn/openvino: support model input resize

OpenVINO APIs require specify input size to run the model, while some
OpenVINO model does accept different input size. To enable this feature
adding input_resizable option here for easier use.
Setting bool variable input_resizable to specify if the input can be resizable or not.
input_resizable = 1 means support input resize, aka accept different input size.
input_resizable = 0 (default) means do not support input resize.
Please make sure the inference model does accept different input size
before use this option, otherwise the inference engine may report error(s).
eg: ./ffmpeg -i video_name.mp4 -vf dnn_processing=dnn_backend=openvino:\
      model=model_name.xml:input=input_name:output=output_name:\
      options=device=CPU\&input_resizable=1 -y output_video_name.mp4

Signed-off-by: Ting Fu <ting.fu@intel.com>
3 years agodnn/openvino: refine code for better model initialization
Ting Fu [Mon, 18 Jan 2021 03:42:13 +0000 (11:42 +0800)]
dnn/openvino: refine code for better model initialization

Move openvino model/inference request creation and initialization steps
from ff_dnn_load_model_ov to new function init_model_ov, for later input
resize support.

Signed-off-by: Ting Fu <ting.fu@intel.com>
3 years agodnn/openvino: remove unnecessary code
Ting Fu [Mon, 18 Jan 2021 03:42:12 +0000 (11:42 +0800)]
dnn/openvino: remove unnecessary code

Signed-off-by: Ting Fu <ting.fu@intel.com>
3 years agoavformat/rtsp: correctly set media control uri with mpegts
tpol [Sat, 10 Oct 2020 23:22:18 +0000 (19:22 -0400)]
avformat/rtsp: correctly set media control uri with mpegts

Fixes #1941

Currently the media control uri is not correctly assigned when mpegts is
signalled in the media description.

The code checks whether at least one AVStream has been setup before
assigning to the media's uri. With mpegts the AVStreams are setup when
parsing packets and so the media's uri is skipped. This is fixed by
using rt->nb_rtsp_streams in the check which counts all medias in the
sdp.

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agoavfilter/vsrc_testsrc: add missing break
Paul B Mahol [Sun, 17 Jan 2021 14:50:47 +0000 (15:50 +0100)]
avfilter/vsrc_testsrc: add missing break

3 years agoavfilter/vf_maskedmerge: add yuv440p10 and commands support
Paul B Mahol [Sun, 17 Jan 2021 14:45:58 +0000 (15:45 +0100)]
avfilter/vf_maskedmerge: add yuv440p10 and commands support

3 years agoavcodec/librav1e: Pass through timestamps as opaque user data
Derek Buitenhuis [Sun, 17 May 2020 12:01:12 +0000 (13:01 +0100)]
avcodec/librav1e: Pass through timestamps as opaque user data

avcodec has no facilities to generate timestamps properly from
output frame numbers (and it would be wrong for VFR anyway),
so pass through the timestamps using rav1e's opaque user data
feature, which was added in v0.4.0.

This bumps the minimum librav1e version to 0.4.0.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
3 years agoavcodec/cfhd: only increase s->level if transform is supported
Paul B Mahol [Wed, 23 Dec 2020 10:59:51 +0000 (11:59 +0100)]
avcodec/cfhd: only increase s->level if transform is supported

3 years agoavcodec/librav1e: Fix indentation
Derek Buitenhuis [Thu, 14 Jan 2021 13:32:11 +0000 (13:32 +0000)]
avcodec/librav1e: Fix indentation

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
3 years agoavfilter/vf_datascope: add option to show only subset of components
Paul B Mahol [Sun, 17 Jan 2021 12:18:23 +0000 (13:18 +0100)]
avfilter/vf_datascope: add option to show only subset of components

3 years agoavfilter/vf_bbox: add support for commands
Paul B Mahol [Sun, 17 Jan 2021 11:22:28 +0000 (12:22 +0100)]
avfilter/vf_bbox: add support for commands

3 years agoavfilter/vf_bbox: add support for >8 depth
Paul B Mahol [Sun, 17 Jan 2021 11:14:08 +0000 (12:14 +0100)]
avfilter/vf_bbox: add support for >8 depth

3 years agoavfilter/bbox: add support for >8 depth
Paul B Mahol [Sun, 17 Jan 2021 11:06:01 +0000 (12:06 +0100)]
avfilter/bbox: add support for >8 depth

3 years agoavfilter/vsrc_testsrc: add complement mode to rgbtestsrc
Paul B Mahol [Sat, 16 Jan 2021 14:54:25 +0000 (15:54 +0100)]
avfilter/vsrc_testsrc: add complement mode to rgbtestsrc

3 years agoavfilter/vsrc_testsrc: add planar support to rgbtestsrc
Paul B Mahol [Sat, 16 Jan 2021 14:36:25 +0000 (15:36 +0100)]
avfilter/vsrc_testsrc: add planar support to rgbtestsrc

3 years agoavfilter/vf_threshold: add support for more formats
Paul B Mahol [Sat, 16 Jan 2021 22:49:59 +0000 (23:49 +0100)]
avfilter/vf_threshold: add support for more formats

3 years agoavfilter/vf_chromanr: add support for more formats
Paul B Mahol [Sat, 16 Jan 2021 22:30:59 +0000 (23:30 +0100)]
avfilter/vf_chromanr: add support for more formats

3 years agoffmpeg: use sigaction() instead of signal() on linux
Andriy Gelman [Sat, 28 Nov 2020 19:46:53 +0000 (14:46 -0500)]
ffmpeg: use sigaction() instead of signal() on linux

As per signal() help (man 2 signal) the semantics of using signal may
vary across platforms. It is suggested to use sigaction() instead.

Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agoavfilter/vf_detelecine: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:28:33 +0000 (21:28 +0100)]
avfilter/vf_detelecine: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_mix: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:24:43 +0000 (21:24 +0100)]
avfilter/vf_mix: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_telecine: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:20:31 +0000 (21:20 +0100)]
avfilter/vf_telecine: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_weave: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:18:07 +0000 (21:18 +0100)]
avfilter/vf_weave: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_il: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:14:48 +0000 (21:14 +0100)]
avfilter/vf_il: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_copy: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:11:57 +0000 (21:11 +0100)]
avfilter/vf_copy: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_fieldhint: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:08:08 +0000 (21:08 +0100)]
avfilter/vf_fieldhint: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_stack: use ff_formats_pixdesc_filter()
Paul B Mahol [Sat, 16 Jan 2021 20:04:42 +0000 (21:04 +0100)]
avfilter/vf_stack: use ff_formats_pixdesc_filter()

3 years agoavfilter/vf_phase: add support for commands
Paul B Mahol [Sat, 16 Jan 2021 19:38:54 +0000 (20:38 +0100)]
avfilter/vf_phase: add support for commands

3 years agoavfilter: add estdif video filter
Paul B Mahol [Wed, 30 Dec 2020 17:41:43 +0000 (18:41 +0100)]
avfilter: add estdif video filter

3 years agoavformat/hlsenc: reindent the code
Limin Wang [Thu, 24 Dec 2020 14:05:24 +0000 (22:05 +0800)]
avformat/hlsenc: reindent the code

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agoavformat/udp: add memory alloc checks
Limin Wang [Thu, 7 Jan 2021 10:22:07 +0000 (18:22 +0800)]
avformat/udp: add memory alloc checks

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agoavformat/udp: return the error code instead of generic EIO
Limin Wang [Tue, 12 Jan 2021 23:55:10 +0000 (07:55 +0800)]
avformat/udp: return the error code instead of generic EIO

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agoavutil/timecode: fix sscanf format string with garbage at the end
Limin Wang [Sat, 5 Dec 2020 01:39:38 +0000 (09:39 +0800)]
avutil/timecode: fix sscanf format string with garbage at the end

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
3 years agomovenc: Present durations in mvhd/tkhd/mdhd as they are after edits
Martin Storsjö [Sat, 19 Dec 2020 22:45:42 +0000 (00:45 +0200)]
movenc: Present durations in mvhd/tkhd/mdhd as they are after edits

If the edit lists remove parts of the output timeline, or add a
delay to it, this should be included in the mvhd/tkhd/mdhd durations,
which should correspond to the edit lists.

For tracks starting with pts < 0, the edit list trims out the segment
before pts=0. For tracks starting with pts > 0, a delay element is
added in the edit list, delaying the start of the track data.

In both cases, the practical effect is that the post-edit output
is as if the track had started with pts = 0. Thus calculate the range
from pts=0 to end_pts, for the purposes of mvhd/tkhd/mdhd, unless
edit lists explicitly are disabled.

mov_write_edts_tag needs to operate on the actual pts duration of
the track samples, not the duration that already takes the edit
list effect into account.

Signed-off-by: Martin Storsjö <martin@martin.st>
3 years agoavfilter/vf_w3fdif: fix parity in frame mode
Paul B Mahol [Fri, 15 Jan 2021 10:34:17 +0000 (11:34 +0100)]
avfilter/vf_w3fdif: fix parity in frame mode

3 years agolibavfilter/dnn: add batch mode for async execution
Guo, Yejun [Thu, 7 Jan 2021 03:14:10 +0000 (11:14 +0800)]
libavfilter/dnn: add batch mode for async execution

the default number of batch_size is 1

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>