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

9093 Commits

Author SHA1 Message Date
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
Paul B Mahol
ff9bf372f7 avfilter/vf_w3fdif: reduce overhead calling execute for every plane 2021-01-22 13:28:41 +01: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
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
Paul B Mahol
df4e2b923c avfilter/vf_readeia608: add >8 depth support 2021-01-21 14:52:40 +01:00
Paul B Mahol
f07a8b13f3 avfilter/vf_super2xsai: add slice threading support 2021-01-21 13:37:47 +01:00
Paul B Mahol
c2ee42e032 avfilter/vf_super2xsai: constify src pointer 2021-01-21 13:37:47 +01:00
Paul B Mahol
b51eae1abe avfilter/vf_dblur: remove unused line 2021-01-21 13:37:47 +01:00
Paul B Mahol
4225819c70 avfilter/vf_deblock: fix >8 depth format case check 2021-01-21 13:37:47 +01:00
Paul B Mahol
27f1ee7f53 avfilter/vf_fieldmatch: use av_malloc_array() 2021-01-21 13:37:47 +01:00
Paul B Mahol
b43c35c633 avfilter/vf_decimate: add support for more formats 2021-01-21 13:37:47 +01:00
Paul B Mahol
24dc6d386c avfilter/vf_nnedi: fix memleak at eof and simplify frame handling 2021-01-20 13:39:59 +01:00
Paul B Mahol
1dc71cf64e avfilter/vf_nnedi: small improvements 2021-01-20 13:39:59 +01:00
Paul B Mahol
f359575c0b avfilter/vf_nnedi: unbreak nsize=0:nns=0 output 2021-01-19 20:37:37 +01:00
Paul B Mahol
c737f6edce avfilter/vf_nnedi: simplify code even more 2021-01-19 20:37:37 +01:00
Paul B Mahol
553eb07737 avfilter/vf_nnedi: small cleanups 2021-01-19 14:59:05 +01:00
Paul B Mahol
f3f5ba0bf8 avfilter/vf_nnedi: fix some compilation errors and warnings 2021-01-19 12:15:07 +01:00
Paul B Mahol
d03c7b1ad4 avfilter/vf_w3fdif: add more forgotten formats 2021-01-18 14:05:51 +01:00
Paul B Mahol
e3baf45303 avfilter/vf_estdif: add some forgotten formats 2021-01-18 14:05:51 +01:00
Paul B Mahol
117bf7394f avfilter/vf_nnedi: rewrite and cleanup code
Also add slice threading support.
Also add support for >8 depth formats.
Also add support for commands.
2021-01-18 14:05:51 +01:00
Ting Fu
71b82e4ffd 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>
2021-01-18 13:09:22 +08:00
Ting Fu
048d5cc620 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>
2021-01-18 13:09:22 +08:00
Ting Fu
946fcd4508 dnn/openvino: remove unnecessary code
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-01-18 13:09:21 +08:00
Paul B Mahol
41ddb27597 avfilter/vsrc_testsrc: add missing break 2021-01-17 15:56:31 +01:00
Paul B Mahol
9e1956175c avfilter/vf_maskedmerge: add yuv440p10 and commands support 2021-01-17 15:56:31 +01:00
Paul B Mahol
8d86d58941 avfilter/vf_datascope: add option to show only subset of components 2021-01-17 13:18:23 +01:00
Paul B Mahol
eb0f532c98 avfilter/vf_bbox: add support for commands 2021-01-17 12:22:28 +01:00
Paul B Mahol
4f81e24c34 avfilter/vf_bbox: add support for >8 depth 2021-01-17 12:17:19 +01:00
Paul B Mahol
9b44f99329 avfilter/bbox: add support for >8 depth 2021-01-17 12:06:01 +01:00
Paul B Mahol
294854bd0a avfilter/vsrc_testsrc: add complement mode to rgbtestsrc 2021-01-16 23:54:21 +01:00
Paul B Mahol
79f2bca59c avfilter/vsrc_testsrc: add planar support to rgbtestsrc 2021-01-16 23:54:21 +01:00
Paul B Mahol
1ed6b80c28 avfilter/vf_threshold: add support for more formats 2021-01-16 23:52:54 +01:00
Paul B Mahol
95179dff82 avfilter/vf_chromanr: add support for more formats 2021-01-16 23:34:06 +01:00
Paul B Mahol
4ae2dfd7ea avfilter/vf_detelecine: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
bc2632f867 avfilter/vf_mix: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
6baed9ce03 avfilter/vf_telecine: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
737bb01540 avfilter/vf_weave: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
9beee83043 avfilter/vf_il: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
c590ff1fbb avfilter/vf_copy: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
60836fb6f6 avfilter/vf_fieldhint: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
5b34fcaa8d avfilter/vf_stack: use ff_formats_pixdesc_filter() 2021-01-16 21:35:44 +01:00
Paul B Mahol
b7817f23c0 avfilter/vf_phase: add support for commands 2021-01-16 20:47:52 +01:00
Paul B Mahol
e722b443e4 avfilter: add estdif video filter 2021-01-16 14:08:59 +01:00
Paul B Mahol
d4902751cb avfilter/vf_w3fdif: fix parity in frame mode 2021-01-15 11:43:38 +01:00
Guo, Yejun
64ea15f050 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>
2021-01-15 08:59:54 +08:00
Paul B Mahol
aaeee01eab avfilter/vf_w3fdif: add support for >8 depth gray formats 2021-01-14 19:16:55 +01:00
Paul B Mahol
a0acc44106 avfilter/vf_convolution: use correct stride variable 2021-01-10 17:27:27 +01:00
Andreas Rheinhardt
482aeda8bf avfilter/vsrc_testsrc: Deduplicate options
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 06:08:03 +01:00
Andreas Rheinhardt
6fed8a6cb0 avfilter/af_biquads: Don't redundantly set AVClass
It is already set generically in ff_filter_alloc().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 05:06:12 +01:00
Andreas Rheinhardt
2d48b69b3d avfilter/af_biquads: Deduplicate options
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 05:06:12 +01:00
Andreas Rheinhardt
a6fa1838e6 avfilter/vf_blend: Deduplicate options
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 05:06:12 +01:00
Andreas Rheinhardt
c51887c56a avfilter/af_asupercut: Deduplicate options
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 05:06:12 +01:00
Andreas Rheinhardt
d1de1d95a6 avfilter/vf_neighbor: Deduplicate options
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 05:06:12 +01:00
Andreas Rheinhardt
096cb41624 avfilter/vf_convolution: Deduplicate filter options
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 05:06:11 +01:00
Andreas Rheinhardt
a91b18f368 avfilter/vf_qp: Deduplicate variable names arrays
This also avoids relocations.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-08 05:05:10 +01:00
Paul B Mahol
89c9c42c5b avfilter/af_astats: clip input value to prevent overflow 2021-01-04 11:14:50 +01:00
Paul B Mahol
ddd6c5cdc0 avfilter/vf_w3fdif: not interlaced frames are filtered like tff 2021-01-03 23:09:39 +01:00
Paul B Mahol
b112c86a2e avfilter/vf_w3fdif: add two more useful options 2021-01-03 22:23:51 +01:00
Andreas Rheinhardt
2c6f532e0a Mark some pointers as const
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-01 15:25:48 +01:00
Anton Khirnov
c6357311f3 lavfi/vf_uspp: convert to the video_enc_params API 2021-01-01 14:26:09 +01:00
Anton Khirnov
7f7eb137d6 lavfi/vf_codecview: convert to the video_enc_params API 2021-01-01 14:25:33 +01:00
Anton Khirnov
3f0930387c lavfi/vf_fspp: convert to the video_enc_params API 2021-01-01 14:25:28 +01:00
Anton Khirnov
955bdb1d32 lavfi/vf_pp7: convert to the video_enc_params API
Re-enable fate-filter-pp7
2021-01-01 14:25:18 +01:00
Anton Khirnov
775707aba9 lavfi/vf_spp: convert to the video_enc_params API
Re-enable fate-filter-spp
2021-01-01 14:25:02 +01:00
Anton Khirnov
a11ee84194 lavfi/vf_pp: convert to the video_enc_params API
Re-enable fate-filter-qp and fate-filter-pp.
2021-01-01 14:24:43 +01:00
Anton Khirnov
fba0ecbe20 lavfi: add common code to handle QP tables
It will be used for converting the *pp filters to the new
AVVideoEncParams API.
2021-01-01 14:24:20 +01:00
Anton Khirnov
c72d526494 lavfi/vf_qp: convert to the video_enc_params API
Temporarily disable fate-filter-qp until vf_pp is converted.
2021-01-01 14:23:48 +01:00
Anton Khirnov
e15371061d lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump
They are not properly namespaced and not intended for public use.
2021-01-01 14:14:57 +01:00
Anton Khirnov
c8c2dfbc37 lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h
That is a more appropriate place for it.
2021-01-01 14:11:01 +01:00
Paul B Mahol
54cd025a82 avfilter: add temporal midway equalizer filter 2021-01-01 12:43:42 +01:00
Andreas Rheinhardt
2089d21bc7 avfilter/vf_addroi: Use chars instead of strings for one-char strings
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-31 21:41:07 +01:00
Guo, Yejun
477dd2df60 dnn_interface.h: fix redefining typedefs
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 09:21:31 +08:00
Guo, Yejun
6b0cfa8399 dnn/queue: add error check and cleanup
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 08:31:17 +08:00
Guo, Yejun
97f520b700 dnn: fix issue when pthread is not supported
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 08:31:17 +08:00
Guo, Yejun
8e78d5d394 dnn: fix redefining typedefs and also refine naming with correct prefix
The prefix for symbols not exported from the library and not
local to one translation unit is ff_ (or FF for types).

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-31 08:31:17 +08:00
Paul B Mahol
2f20e35892 avfilter/vf_w3fdif: add support for commands 2020-12-30 16:33:30 +01:00
Paul B Mahol
aea3cf4f18 avfilter/vf_xmedian: allow to control eof handling 2020-12-30 15:53:22 +01:00
Paul B Mahol
9ac31b419c avfilter/vf_xmedian: add timeline support 2020-12-30 15:53:22 +01:00
Guo, Yejun
c720286ee3 vf_dnn_processing.c: add async support
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>
2020-12-29 09:31:06 +08:00
Guo, Yejun
5024286465 dnn_interface: change from 'void *userdata' to 'AVFilterContext *filter_ctx'
'void *' is too flexible, since we can derive info from
AVFilterContext*, so we just unify the interface with this data
structure.

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>
2020-12-29 09:31:06 +08:00
Guo, Yejun
e67b5d0a24 dnn: add async execution support for openvino backend
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>
2020-12-29 09:31:06 +08:00
Guo, Yejun
39f5cb4bd1 dnn_interface: add interface to support async execution
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>
2020-12-29 09:31:06 +08:00
Guo, Yejun
38089925fa dnn_backend_openvino.c: refine code for error handle
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>
2020-12-29 09:31:06 +08:00
Guo, Yejun
2b177033bb dnn_backend_openvino.c: separate function execute_model_ov
function fill_model_input_ov and infer_completion_callback are
extracted, it will help the async execution for reuse.

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>
2020-12-29 09:31:06 +08:00
Xie, Lin
6506ab8b03 dnn/queue: add queue and safe_queue support
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>
2020-12-29 09:31:06 +08:00
Guo, Yejun
1b64954e42 vf_dnn_processing.c: replace filter_frame with activate func
with this change, dnn_processing can use DNN async interface later.

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>
2020-12-29 09:31:06 +08:00
Paul B Mahol
f1357274e9 avfilter/vf_decimate: always properly handle EOF 2020-12-27 22:24:43 +01:00
Paul B Mahol
4b4282bc57 avfilter/vf_decimate: stop dropping last frames with ppsrc 2020-12-27 22:01:23 +01:00
Paul B Mahol
89dcef90af avfilter/vf_decimate: fix broken logic with ppsrc handling
Make output bit exact with VIVTC VDecimate filter.
2020-12-27 21:21:08 +01:00
Marton Balint
6d3b70c27e avfilter/vf_framerate: fix infinite loop with 1-frame input
Fixes infinite loop in:
ffmpeg -f lavfi -i testsrc=d=0.04 -vf framerate=50 -f null none

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-27 11:01:41 +01:00
Paul B Mahol
5b48d2af43 avfilter/vf_xmedian: add support for commands 2020-12-25 16:43:14 +01:00
Paul B Mahol
4848eb48ac avfilter/af_vibrato: make sure table size is at least 1
Fixes overreads.
2020-12-25 14:12:52 +01:00
Paul B Mahol
38e71d8b6c avfilter/af_tremolo: make sure table size is at least 1 2020-12-25 14:12:52 +01:00
Paul B Mahol
686c07fb1e avfilter/vf_decimate: fix overreads when using ppsrc
Derive input parameters from correct inlink when using ppsrc.

Previously both input frames would use dimensions of first inlink,
causing crash if first inlink w/h was smaller than second one.
2020-12-22 13:31:55 +01:00
Ting Fu
5dbabb020e dnn: add NV12 pixel format support
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-22 10:53:35 +08:00
Paul B Mahol
cd82c6e4ef avfilter/vf_decimate: switch to activate 2020-12-21 23:34:10 +01:00
Paul B Mahol
204a906437 avfilter/af_crystalizer: implement inverse filtering 2020-12-21 13:15:27 +01:00
Paul B Mahol
28aedc7f54 avfilter/af_crystalizer: use proper type for variable 2020-12-21 12:00:21 +01:00
Paul B Mahol
c1c2e6f968 avfilter/af_crystalizer: improve filter description 2020-12-21 11:51:00 +01:00
Paul B Mahol
6e96e3d970 avfilter: add shufflepixels video filter 2020-12-20 21:44:13 +01:00
Paul B Mahol
3336ca4644 avfilter/vf_maskedthreshold: add support for commands 2020-12-19 23:08:09 +01:00
Paul B Mahol
64e572db46 avfilter/vf_maskedminmax: add support for commands 2020-12-19 20:46:00 +01:00
Paul B Mahol
4fcfecdd66 avfilter/vf_maskedclamp: add support for commands 2020-12-19 20:46:00 +01:00
Paul B Mahol
d6a356f115 avfilter/vf_bilateral: add support for commands 2020-12-19 20:46:00 +01:00
Paul B Mahol
50a9210739 avfilter/vf_fillborders: add fade mode 2020-12-18 23:11:51 +01:00
Paul B Mahol
90720da511 avfilter/vf_fillborders: add more fill modes 2020-12-18 19:40:31 +01:00
Paul B Mahol
7e3f20c43c avfilter/af_asoftclip: add two more useful options for finer filtering 2020-12-18 13:11:53 +01:00
Paul B Mahol
1eb751955e avfilter/af_biquads: fix error in ro calculation 2020-12-17 15:13:42 +01:00
Paul B Mahol
69be00aa61 avfilter/af_biquads: add one-pole shelf filters by adding pole option 2020-12-16 18:38:51 +01:00
Paul B Mahol
32586a42da avfilter/vf_limiter: add support for commands 2020-12-15 20:35:01 +01:00
Paul B Mahol
bf4b9e933f avfilter/af_afreqshift: add fltp sample format support 2020-12-13 11:16:31 +01:00
Jun Zhao
0320dab265 lavfi/dnn: check the return value from sws_getContext
sws_getContext may be return NULL, and it's will be dereferenced,
so add the check.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-12-12 13:34:30 +08:00
Jun Zhao
ae2075265b lavfi/dnn: used the format name in debug message
Used the format name in debug message.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-12-12 13:34:24 +08:00
Paul B Mahol
adf72718a4 avfilter/vf_fade: add timeline support 2020-12-11 23:02:03 +01:00
Paul B Mahol
fc50a8de55 avfilter/af_afade: add support for commands to afade filter 2020-12-11 23:02:03 +01:00
Paul B Mahol
d76469378d avfilter/vf_convolution: add support for commands 2020-12-11 18:33:48 +01:00
Paul B Mahol
7adb747fd7 avfilter/vf_chromanr: add options for finer controls of filtering 2020-12-11 13:39:50 +01:00
Paul B Mahol
b607f19374 avfilter: add asuperpass and asuperstop filter 2020-12-11 12:07:06 +01:00
Paul B Mahol
072835898d avfilter/af_earwax: fix check that was left in previous commit
Makes output exact with smaller number of samples per frame than taps.
2020-12-10 23:43:49 +01:00
Gyan Doshi
7777e5119a avfilter/cropdetect: add option for initial skip
The cropdetect filter, at present, skips the first two frames. This
behaviour is hardcoded.

New option 'skip' allows users to change this. Convenient for when
input is a single image or a trimmed video stream.

Default is kept at 2 to preserve current behaviour.
2020-12-09 12:52:09 +05:30
Paul B Mahol
3021c611f5 avfilter/aeval: add timeline support for aeval 2020-12-08 15:34:14 +01:00
Paul B Mahol
18befac5da avfilter/f_perms: add timeline support 2020-12-07 21:09:08 +01:00
Paul B Mahol
f41de0436c avfilter/af_earwax: fix filter behavior
Previous filter output was incorrect. New one actually follows
graph in comments described on side of filter taps.
2020-12-07 21:09:08 +01:00
James Almer
13f35782b9 avfilter/vf_showinfo: include the correct Dynamic HDR10+ header
Signed-off-by: James Almer <jamrial@gmail.com>
2020-12-06 12:08:58 -03:00
Paul B Mahol
88b6ebdace avfilter/af_biquads: add shortcut to set internal precision 2020-12-06 14:51:21 +01:00
Mohammad Izadi
6f2d6e3efd avfilter/vf_showinfo: add support for HDR10+ metadata
Signed-off-by: James Almer <jamrial@gmail.com>
2020-12-05 19:20:11 -03:00
Paul B Mahol
530d1dbcef avfilter/af_afreqshift: add level option 2020-12-05 14:46:16 +01:00
Paul B Mahol
34773ee69f avfilter: add asubcut filter 2020-12-05 12:02:59 +01:00
Paul B Mahol
7025c91d07 avfilter/af_arnndn: add mix option
Mostly useful to listen to actual noise.
2020-12-04 23:57:01 +01:00
Michael Koch
ce8f45aaba avfilter/vf_v360: fix several problems with 'perspective' output
The image center wasn't preserved, the output image was mirror reversed,
and rotations were made around wrong axes.
I did also remove the vector normalization, because it's sure that the vector
is already normalized if it's calculated from sin() and cos() terms.
2020-12-04 19:50:10 +01:00
Paul B Mahol
51f8848e36 avfilter/af_stereotools: add support for commands 2020-12-04 15:40:42 +01:00
Paul B Mahol
eebf19ccd8 avfilter/af_stereotools: add timeline support 2020-12-04 15:40:42 +01:00
Paul B Mahol
456146356a avfilter/af_stereotools: add two more modes 2020-12-04 11:58:31 +01:00
Paul B Mahol
0c8a0d3a56 avfilter/af_acrossover: add per output band gain 2020-12-02 13:54:53 +01:00
Paul B Mahol
b0298ad4e5 avfilter/af_acrossover: remove pointless allocation of static size 2020-12-02 13:54:53 +01:00
Paul B Mahol
0a5ff19643 avfilter/af_acrossover: document roll-off of each filter order 2020-12-02 12:30:10 +01:00
Paul B Mahol
ba6e2a2d05 avfilter/af_acrossover: move coefficients and state to simple arrays 2020-12-01 18:42:57 +01:00
Paul B Mahol
aa3566a8ee avfilter/af_anequalizer: add timeline and slice support 2020-12-01 18:42:28 +01:00
Paul B Mahol
da83673c8b avfilter/af_agate: add support for commands and timeline 2020-11-30 21:42:09 +01:00
Paul B Mahol
62a0368fb4 avfilter/af_acrossover: remove unneeded emms_c() calls 2020-11-30 14:53:14 +01:00
Paul B Mahol
ca0900bc6e avfilter/af_acrossover: unroll biquad_process loop
Makes code significantly faster for higher orders.
2020-11-30 14:53:14 +01:00
Paul B Mahol
6100a01a7a avfilter/af_acrossover: use fdsp for inverter 2020-11-30 13:45:59 +01:00
Paul B Mahol
263b98bbbd avfilter/af_acrossover: always align nb_samples for fdsp call 2020-11-29 22:10:26 +01:00
Paul B Mahol
400b9ee731 avfilter/af_asupercut: add float sample format support 2020-11-29 21:44:37 +01:00
Paul B Mahol
bebea78755 avfilter/af_asupercut: add order option 2020-11-29 14:16:48 +01:00
Paul B Mahol
f194cedfe6 avfilter/af_acrossover: split in correct spot
Previously split was made in wrong (half of original) position.
2020-11-29 10:52:18 +01:00
Paul B Mahol
c5cdec9731 avfilter/af_acrossover: reduce memory usage
Split biquad coefficients from biquad state.
2020-11-29 10:52:18 +01:00
Paul B Mahol
94ea760c6f avfilter/af_asubboost: make wet option apply to final output
Also changes some default values for options after this change.
This makes distinction between feedback and wet option.
Before they would produce same output if values were swapped.
2020-11-28 22:07:18 +01:00
Paul B Mahol
a01b037c90 avfilter/avf_showfreqs: add group delay data mode 2020-11-28 20:57:41 +01:00
Paul B Mahol
66d89a8070 avfilter/af_acrossover: add option to adjust input gain 2020-11-28 16:02:12 +01:00
Paul B Mahol
68adb68e96 avfilter/af_acrossover: really fix single-pole allpass coefficients
Now LR2, LR6, LR10, LR14 and LR18 have really flat sum.
2020-11-28 14:53:17 +01:00
Paul B Mahol
50e2ad41de avfilter/af_acrossover: remove unecessary allpass calls 2020-11-28 13:12:06 +01:00
Paul B Mahol
7a95cf86ff avfilter/af_aemphasis: add timeline/slice and commands support 2020-11-27 22:38:17 +01:00
Paul B Mahol
1a25c6f196 avfilter/af_aemphasis: switch to planar sample format 2020-11-27 22:38:17 +01:00
Paul B Mahol
cf98822b66 avfilter/af_acrossover: add support for float sample format 2020-11-27 18:46:23 +01:00
Paul B Mahol
551ca67afe avfilter/af_acrossover: fix single pole allpass coefficients 2020-11-27 15:35:41 +01:00
Paul B Mahol
1555cfedf6 avfilter/af_acrossover: improve quality for odd order butterworth 2020-11-27 12:52:21 +01:00
Paul B Mahol
3864896017 avfilter/avf_showfreqs: implement phase display 2020-11-27 12:52:21 +01:00
Paul B Mahol
3c922681c3 avfilter: add asupercut filter 2020-11-26 17:38:49 +01:00
Paul B Mahol
68e452c367 avfilter/af_acrossover: add missing allpass processing 2020-11-26 15:44:14 +01:00
Paul B Mahol
f7d7ce4717 avfilter/af_acrossover: add missing inverter as last step 2020-11-26 13:17:20 +01:00
Paul B Mahol
4e3c4dfbf3 avfilter/af_acrossover: simplify coefficients 2020-11-26 13:17:20 +01:00
Paul B Mahol
cc74700a83 avfilter/af_acrossover: add even more orders 2020-11-26 13:17:20 +01:00
Paul B Mahol
bc529ea9bc avfilter/af_acrossover: use transposed direct II form 2020-11-26 13:17:20 +01:00
Paul B Mahol
810e213fab avfilter/af_acrossover: rewrite code so it performs faster 2020-11-26 13:17:20 +01:00
Paul B Mahol
aba17bf6a5 avfilter/af_acrossover: add higher orders 2020-11-26 13:17:20 +01:00
Lynne
ae8fc9922e
lavfi/vulkan: allow calling glslang_uninit without a prior init
Allows us to uninit cleanly.
This assert was also somewhat pointless as we assert every other
function, so another assert would be triggered long before this
one is.
2020-11-25 23:06:34 +01:00
Paul B Mahol
5b1ccd748a avfilter/af_arnndn: add timeline support 2020-11-25 13:41:52 +01:00
Paul B Mahol
278984b343 avfilter/vf_readeia608: add support for slice threads 2020-11-24 22:34:18 +01:00
Paul B Mahol
97bc6900e6 avfilter/vf_readeia608: add support for commands 2020-11-24 22:34:18 +01:00
Musee Ullah
7bb8b81955 avfilter/vf_xfade: ensure metadata is copied to transition frames
I was having an issue where, using a filter chain of xfade -> ass, the
colors on the subtitles were incorrect only on the frames where xfade
was being used. This resolves that issue for me.

Signed-off-by: Musee Ullah <lae@lae.is>
2020-11-24 14:35:41 +01:00
Paul B Mahol
c6a7ca271b avfilter/af_biquads: make sure that biquad filter still works 2020-11-24 14:26:47 +01:00
Paul B Mahol
040e989223 avfilter/af_biquads: do not abort filtering on bogus options
Instead, continue returning unfiltered input.
2020-11-24 12:03:23 +01:00
Paul B Mahol
68429b9465 avfilter/af_adenorm: add timeline and slice threading support 2020-11-24 11:32:19 +01:00
Paul B Mahol
ee8ecc2730 avfilter/af_asubboost: add timeline and slice threading support 2020-11-24 10:19:04 +01:00
Paul B Mahol
9208b72a38 avfilter/af_aiir: add support for arbitrary order lattice-ladder filter format 2020-11-22 22:57:43 +01:00
Paul B Mahol
42ccef2846 avfilter/af_biquads: remove not needed code 2020-11-22 14:22:19 +01:00
Paul B Mahol
0066bf4d1a avfilter/af_afreqshift: add timeline and slice threading support 2020-11-22 10:46:18 +01:00
Anton Khirnov
8918a3dfa2 lavfi/src_movie: switch to new decoding API 2020-11-20 15:25:26 +01:00
Anton Khirnov
e1c4a3ea7d lavfi/lavfutils: switch to the new decoding API 2020-11-20 15:20:24 +01:00
Mark Reid
e366797ad3 avfilter/vf_lut3d: fix sanitizef INF handling
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-11-20 15:20:24 +01:00
Limin Wang
ab072de419 avfilter/vf_fade: config_props -> config_input
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-11-19 22:39:30 +08:00
Limin Wang
2399a7795b avfilter/vf_fade: simplify code to use pts timebase for time check
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-11-19 22:39:30 +08:00
Paul B Mahol
c417f1a76c avfilter/vf_xfade: add squeeze transitions 2020-11-19 14:57:41 +01:00
Paul B Mahol
381ab69042 avfilter/vf_frei0r: add support for commands 2020-11-19 11:55:47 +01:00
Paul B Mahol
17a0dfebf5 avfilter/vf_despill: add support for commands 2020-11-18 18:03:15 +01:00
Paul B Mahol
e3081d6f4f avfilter/af_afade: add sinc curve types 2020-11-18 11:36:53 +01:00
Paul B Mahol
bb7bb440c2 avfilter/af_anlmdn: support all options as commands 2020-11-17 13:49:38 +01:00
Paul B Mahol
96f1b45b8c avfilter/af_anlmdn: allow to change smooth/m at runtime 2020-11-17 12:48:46 +01:00
Andrew Rodland
04340e5e01 lavfi/frei0r: Remove duplicated pix_fmt entry
Fixes e.g. 'ffmpeg -i input.mp4 -vf frei0r=pixeliz0r output.mp4':

    [Parsed_frei0r_0 @ 0x5585b8093280] Duplicated pixel format
    Error reinitializing filters!
    Failed to inject frame into filter network: Invalid argument
    Error while processing the decoded data for stream #0:0
    Conversion failed!

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2020-11-16 19:32:32 +00:00
Paul B Mahol
9f20e5d281 avfilter: add speechnorm filter 2020-11-15 12:59:40 +01:00
Paul B Mahol
ee4a046540 avfilter/af_asoftclip: add oversampling support 2020-11-10 15:25:18 +01:00
Limin Wang
a51767c9b3 avfilter/vf_unsharp: add more pixel format support
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-11-07 10:09:59 +08:00
Limin Wang
ee792ebe08 avfilter/vf_unsharp: add 10bit support
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-11-07 10:09:59 +08:00
Paul B Mahol
a125e08130 avfilter: add adenorm filter 2020-11-05 18:26:27 +01:00
Timo Rothenpieler
a1553b0cfb avfilter/scale_cuda: fix pitch calculation for >8 bit formats 2020-11-05 00:47:14 +01:00
Timo Rothenpieler
09e49ba31e avfilter/scale_cuda: simplify linesize calculation 2020-11-04 20:00:35 +01:00
Timo Rothenpieler
94cb78ed94 avfilter/scale_cuda: add support for RGB formats 2020-11-04 19:53:41 +01:00
Timo Rothenpieler
9a0b702078 avfilter/scale_cuda: expose optional algorithm parameter 2020-11-04 18:10:19 +01:00
Timo Rothenpieler
cfdddec0c8 avfilter/scale_cuda: add lanczos algorithm 2020-11-04 01:43:21 +01:00
Timo Rothenpieler
4ad7af085c avfilter/scale_cuda: add nearest neighbour algorithm 2020-11-03 19:58:13 +01:00
Timo Rothenpieler
15c0e038ce avfilter/scale_cuda: code cleanup 2020-11-03 19:58:13 +01:00
Timo Rothenpieler
f1d0f83712 avfilter/scale_cuda: add bicubic interpolation 2020-11-03 19:58:13 +01:00
Paul B Mahol
112fe0ff19 avfilter/af_asoftclip: add asserts in default switch cases 2020-11-03 12:30:19 +01:00
Paul B Mahol
de63b6fb54 avfitler/af_asoftclip: add hard type 2020-11-03 12:30:19 +01:00
Paul B Mahol
ee686236cd avfilter/af_asoftclip: add erf soft clip type 2020-11-03 12:30:19 +01:00
Paul B Mahol
2ddd6afd30 avfilter/af_biquads: make commands work reliably within biquad filter
Previously changing single coefficient would give unexpected results.
2020-11-02 13:30:14 +01:00
Paul B Mahol
40ce4ad999 avfilter/af_biquads: add lattice-ladder form 2020-11-02 13:30:14 +01:00
Paul B Mahol
c7ece8e26f avfilter/vf_normalize: fix regression with white/black point calculation 2020-10-27 19:45:51 +01:00
Carl Eugen Hoyos
7b0d179195 lavfi/Makefile: Remove opencl object files when calling make clean. 2020-10-25 21:18:34 +01:00
Paul B Mahol
d6e903b09b avfilter/vf_v360: make commands always do relative rotation 2020-10-25 12:49:25 +01:00
Paul B Mahol
637c154a50 avfilter: add audio frequency and phase shift filters 2020-10-20 20:38:30 +02:00
Romane Lafon
d60927b676 avfilter/avf_aphasemeter: add out of phase and mono detection
Extend aphasemeter to detect out of phase or mono sequences in
stereo streams.

Signed-off-by: Romane Lafon <romane@nomalab.com>
2020-10-20 20:30:45 +02:00
Paul B Mahol
8750c8f45c avfilter/af_asubboost: use transposed II form 2020-10-20 13:51:45 +02:00
Paul B Mahol
6d59d69bb0 avfilter/af_crossfeed: use transposed II form 2020-10-20 13:51:38 +02:00
Paul B Mahol
5da94413d1 avfilter/af_aiir: remove unused argument 2020-10-19 18:42:42 +02:00
Paul B Mahol
f7379eafd2 avfilter/af_aiir: fix sp2zp mapping 2020-10-19 18:42:42 +02:00
Guo, Yejun
c4a3dbe726 dnn_backend_tf.c: add option sess_config for tf backend
TensorFlow C library accepts config for session options to
set different parameters for the inference. This patch exports
this interface.

The config is a serialized tensorflow.ConfigProto proto, so we need
two steps to use it:
1. generate the serialized proto with python (see script example below)
the output looks like: 0xab...cd
where 0xcd is the least significant byte and 0xab is the most significant byte.

2. pass the python script output into ffmpeg with
dnn_processing=options=sess_config=0xab...cd

The following script is an example to specify one GPU. If the system contains
3 GPU cards, the visible_device_list could be '0', '1', '2', '0,1' etc.
'0' does not mean physical GPU card 0, we need to try and see.
And we can also add more opitions here to generate more serialized proto.

script example to generate serialized proto which specifies one GPU:
import tensorflow as tf
gpu_options = tf.GPUOptions(visible_device_list='0')
config = tf.ConfigProto(gpu_options=gpu_options)
s = config.SerializeToString()
b = ''.join("%02x" % int(ord(b)) for b in s[::-1])
print('0x%s' % b)
2020-10-19 20:54:29 +08:00
Paul B Mahol
9860777516 avfilter/af_aiir: remove unused variable 2020-10-18 22:56:23 +02:00
Paul B Mahol
847dc03787 avfilter/af_aiir: add analog transfer function format 2020-10-18 18:48:41 +02:00
Andreas Rheinhardt
6ef55f54fe avfilter/af_mcompand: Remove redundant calls to AVFilter.uninit
uninit is already called automatically (even when configuring the filter
failed).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-18 15:30:03 +02:00
Paul B Mahol
f372ce35f2 avfilter/af_aiir: use av_sscanf() 2020-10-17 18:43:47 +02:00
Paul B Mahol
7c1eef48e1 avfilter/af_aiir: reverse order of biquads in serial processing
This avoids most of clippings for fixed-point precision inputs.
Also add warning about filtering fixed-point precision with parallel processing.
2020-10-17 18:43:47 +02:00
Paul B Mahol
e704750a9f avfilter/af_aiir: use transposed II form for biquad sections 2020-10-16 23:07:27 +02:00
Paul B Mahol
0df0e12d02 avfilter/af_aiir: implement parallel processing 2020-10-16 23:07:27 +02:00
Chris Miceli
6bdfea8d4b libavfilter/dnn/dnn_backend{openvino, tf}: check memory alloc non-NULL
These previously would not check that the return value was non-null
meaning it was susceptible to a sigsegv. This checks those values.
2020-10-14 11:08:09 +08:00
Chris Miceli
ad95e5e45d libavfilter/dnn_backend_native: check mem allocation
check that frame allocations return non-null.
2020-10-14 10:19:05 +08:00
leozhang
b9727870ae avfilter/vf_scale_cuda: unload cuModule on uninit
Signed-off-by: leozhang <nowerzt@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-12 21:09:21 +02:00
Paul B Mahol
f7fd205f11 avfilter/af_sofalizer: allow up to 64 channels 2020-10-12 12:21:35 +02:00
Paul B Mahol
aa125fd06a avfilter/af_sofalizer: allow to specify virtual speakers indetifier as number 2020-10-12 12:21:35 +02:00
James Almer
0c73c2909e avfilter/avfilter.h: add missing FF_API_NEXT wrapper
Signed-off-by: James Almer <jamrial@gmail.com>
2020-10-10 23:58:40 -03:00
Andreas Rheinhardt
358c0bb168 avfilter/vf_minterpolate: Remove redundant code for freeing
ad73b32d29 added some code for freeing in
the input's config_props function, yet this is unnecessary as uninit is
called anyway if config_props fails.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-09 16:38:28 +02:00
Andreas Rheinhardt
aa262dcce8 avfilter/vf_minterpolate: Fix left shift of negative value
This has happened when initializing the motion estimation context if
width or height of the video was smaller than the block size used
for motion estimation and if the motion interpolation mode indicates
not to use motion estimation.

The solution is of course to only initialize the motion estimation
context if the interpolation mode uses motion estimation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-09 16:38:28 +02:00
Andreas Rheinhardt
bb13cdbe27 avfilter/vf_minterpolate: Reject too small dimensions
The latter code relies upon the dimensions to be not too small;
otherwise one will call av_clip() with min > max lateron which aborts
in case ASSERT_LEVEL is >= 2 or one will get a nonsense result that may
lead to a heap-buffer-overflow/underflow. The latter has happened in
ticket #8248 which this commit fixes.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-09 16:38:28 +02:00
Paul B Mahol
a086b73e1f avfilter/vf_v360: use quaternions for rotation
Fixes gimbal lock issues, and round-off errors.
2020-10-07 01:54:05 +02:00
Paul B Mahol
3a035a8cd2 avfilter/vf_v360: fix possible out of range values 2020-10-04 19:23:52 +02:00
Paul B Mahol
eaba6cecfb avfilter/vf_v360: add mitchell interpolation 2020-10-04 19:23:52 +02:00
Paul B Mahol
23d0754165 avfilter/vf_v360: stop using floats variables in xyz_to_octahedron
Use proper integer variables.
2020-09-30 00:09:22 +02:00
Mark Thompson
4fceb2634e Revert "avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWARE"
This reverts commit 5bbf58ab87.

The setparams filters are not hwframe aware, so the default context
passthrough behaviour is needed to allow using them with hardware frames.
2020-09-29 17:07:43 +01:00
Paul B Mahol
12585c87e6 avfilter/vf_v360: simplify input flipping 2020-09-29 14:21:22 +02:00
Paul B Mahol
86b29c0cd0 avfilter/vf_v360: split maps into slices 2020-09-29 14:21:20 +02:00