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

9093 Commits

Author SHA1 Message Date
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
Mingyu Yin
ad2546e3b3 dnn/native: add native support for dense
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
2020-09-29 14:19:55 +08:00
Pavel Koshevoy
5bbf58ab87 avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWARE
Allow setparams to be used with hw backed frames and
avoid an assertion failure in avfilter_config_links.
2020-09-27 19:15:44 -06:00
Paul B Mahol
6db1b1af4c avfilter/vf_v360: add octahedron format 2020-09-27 22:40:26 +02:00
Andrew Klaassen
a6e72fb46d vf_colorspace: Added linear trc.
This patch adds the coefficients for the linear gamma function (1,0,1,0)
to the colorspace filter.

Signed-off-by: Andrew Klaassen <clawsoon@yahoo.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2020-09-27 09:14:46 -04:00
Paul B Mahol
85195f6ae9 avfilter/vf_histogram: add slide modes for thistogram 2020-09-26 22:04:27 +02:00
Guo, Yejun
e71d73b096 dnn: add a new interface DNNModel.get_output
for some cases (for example, super resolution), the DNN model changes
the frame size which impacts the filter behavior, so the filter needs
to know the out frame size at very beginning.

Currently, the filter reuses DNNModule.execute_model to query the
out frame size, it is not clear from interface perspective, so add
a new explict interface DNNModel.get_output for such query.
2020-09-21 21:26:56 +08:00
Guo, Yejun
fce3e3e137 dnn: put DNNModel.set_input and DNNModule.execute_model together
suppose we have a detect and classify filter in the future, the
detect filter generates some bounding boxes (BBox) as AVFrame sidedata,
and the classify filter executes DNN model for each BBox. For each
BBox, we need to crop the AVFrame, copy data to DNN model input and do
the model execution. So we have to save the in_frame at DNNModel.set_input
and use it at DNNModule.execute_model, such saving is not feasible
when we support async execute_model.

This patch sets the in_frame as execution_model parameter, and so
all the information are put together within the same function for
each inference. It also makes easy to support BBox async inference.
2020-09-21 21:26:56 +08:00
Guo, Yejun
2003e32f62 dnn: change dnn interface to replace DNNData* with AVFrame*
Currently, every filter needs to provide code to transfer data from
AVFrame* to model input (DNNData*), and also from model output
(DNNData*) to AVFrame*. Actually, such transfer can be implemented
within DNN module, and so filter can focus on its own business logic.

DNN module also exports the function pointer pre_proc and post_proc
in struct DNNModel, just in case that a filter has its special logic
to transfer data between AVFrame* and DNNData*. The default implementation
within DNN module is used if the filter does not set pre/post_proc.
2020-09-21 21:26:56 +08:00
Guo, Yejun
6918e240d7 dnn: add userdata for load model parameter
the userdata will be used for the interaction between AVFrame and DNNData
2020-09-21 21:26:56 +08:00
Xu Jun
a39fcbdffb dnn_backend_native_layer_conv2d.c: fix bug of loop boundary in single thread mode.
Before patch, fate test for dnn may fail in some Windows environment
while succeed in my Linux. The bug was caused by a wrong loop boundary.
After patch, fate test succeed in my windows mingw 64-bit.

Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-09-20 12:30:47 +08:00
Paul B Mahol
cdc4c268e2 avfilter/vf_datascope: fix oscilloscope with gray>8 depth 2020-09-19 16:38:21 +02:00
Limin Wang
0ea2bda099 avfilter/vf_showinfo: add const to the AVFrameSideData instance
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-09-17 18:52:11 +08:00
Xu Jun
7d3cd9f956 dnn_backend_native_layer_conv2d.c: refine code.
Move thread area allocate out of thread function into
main thread.

Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
2020-09-17 08:45:23 +08:00
Xu Jun
8e67ae2cb4 dnn_backend_native_layer_conv2d.c: fix memory allocation bug in multithread function.
Before patch, memory was allocated in each thread functions,
which may cause more than one time of memory allocation and
cause crash.

After patch, memory is allocated in the main thread once,
an index was parsed into thread functions. Bug fixed.

Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
2020-09-17 08:45:23 +08:00
Paul B Mahol
2524e64dbe avfilter/f_interleave: fix some issues with interleaving 2020-09-15 17:21:38 +02:00
Paul B Mahol
fda5363c80 avfilter/x86/vf_convolution_init: there is asm only for 8bit depth 2020-09-15 08:13:04 +02:00
Paul B Mahol
05c8d0bce6 avfilter/avf_concat: check for possible integer overflow
Also check that segment delta pts is always bigger than input pts.

There is nothing much currently that can be done to recover from
this situation so just return AVERROR_INVALIDDATA error code.
2020-09-14 18:16:42 +02:00
Paul B Mahol
17b44f759e avfilter/af_amix: do not leave unset PTS for frames after first stream is over
First stream is used only to get number of samples to put into each output frame.
2020-09-14 18:16:42 +02:00
Mark Reid
60e7021064 avfilter/vf_premultiply: add missing AV_PIX_FMT_YUVA444P12
query_formats says its supported, but is missing from switch statement leading to segfault
2020-09-14 10:31:46 +02:00
Marton Balint
172af0ee51 avfilter/vf_showinfo: use av_timecode_make_smpte_tc_string2
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-09-13 17:51:57 +02:00
Paul B Mahol
55af1807f7 avfilter/asrc_anullsrc: actually return correct EOF pts 2020-09-13 13:26:11 +02:00
Paul B Mahol
c28b14eb98 avfilter/asrc_anullsrc: give better limits to number of samples per frame 2020-09-13 13:18:18 +02:00
Paul B Mahol
0a17a4891d avfilter/asrc_anullsrc: make number of output samples match duration 2020-09-13 13:18:18 +02:00
Ting Fu
dc16aeb390 dnn/openvino: add input/output name info
show all input/output names when the input or output name not correct

Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-09-12 16:15:30 +08:00
Ting Fu
87cb24a1ca dnn/openvino: support run inference via GPU
for enabling OpenVINO GPU please:
1. install required OpenCL drivers, see: https://github.com/intel/compute-runtime/releases/tag/19.41.14441
2. build OpenVINO c lib with GPU enabled: use cmake config with: -DENABLE_CLDNN=ON
3. then make, and include the OpenVINO c lib in environment variables
detailed steps please refer: https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md

inference model with GPU please add: optioins=device=GPU

Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-09-12 16:15:30 +08:00
Andreas Rheinhardt
0963be71ec avfilter/formats: Remove pointless checks
ff_formats_ref() takes a pointer to an AVFilterFormats and a pointer to
a pointer to an AVFilterFormats as arguments and adds the latter as an
owner to the list pointed to by the former; the latter is hereby always
the address of a list contained in an AVFilterFormatsConfig and can
therefore not be NULL. So remove the check for whether it is NULL; also
do the same for ff_channel_layouts_ref().

Also do the same for the unref functions where argument is never NULL
because it is always the address of an existing lvalue.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:53:06 +02:00
Andreas Rheinhardt
5616942220 avfilter/formats: Don't typedef structure a second time
Before commit 2f76476549, avfilter.h
contained no typedef for AVFilterChannelLayouts; all references to it
were done using its struct tag. formats.h meanwhile contained the
definition of the struct and a typedef for it. Said commit now added a
typedef in avfilter.h, too, bringing it in line with AVFilterFormats;
yet this means that there are two typedefs for AVFilterChannelLayouts
(in contrast to AVFilterFormats which is only typedef'ed in avfilter.h).

The problem is that older versions of GCC don't like this and error out:
http://fate.ffmpeg.org/history.cgi?slot=x86_64-openbsd5.6-gcc4.2-conf2
is one of the FATE boxes that now fail to compile. So just remove the
typedef in formats.h.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:51:03 +02:00
Andreas Rheinhardt
0086432fc7 fftools, libavcodec, libavfilter: Add const to some AVCodec *
The user has no business modifying the underlying AVCodec.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:42:36 +02:00
Andreas Rheinhardt
b091df7210 avfilter/vf_subtitles: Remove obsolete LIBAVCODEC_VERSION_INT checks
libavcodec major version is already 58.

Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:42:02 +02:00
Andreas Rheinhardt
e65897f3ee avfilter/vf_subtitles: Remove unnecessary initialization of AVPacket
av_read_frame() can handle uninitialized packets.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:41:36 +02:00
Andreas Rheinhardt
77ace1ffea avfilter/vf_subtitles: Fix leaks on failure
init_subtitles() sometimes returned directly upon error without cleaning
up after itself. The easiest way to trigger this is by using
picture-based subtitles; it is also possible to run into this in case of
missing decoders or allocation failures.

Furthermore, return the proper error code in case of missing decoder.

Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:41:18 +02:00
Andreas Rheinhardt
8443848dfc avfilter/vf_uspp: Fix potential leak of dict on error
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:41:08 +02:00
Andreas Rheinhardt
98171d14c5 avfilter/lavfutils: Avoid initializing packet
av_read_frame() can handle uninitialized packets.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:40:58 +02:00
Andreas Rheinhardt
f38926ec24 avfilter/lavfutils: Fix memleak when avformat_find_stream_info() fails
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:40:34 +02:00
Andreas Rheinhardt
3d1a9824b8 avfilter/lavfutils: Don't use uninitialized pointers for freeing
Happened on several error conditions, e.g. if there is just no decoder
for the format (like with svg images).

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-11 14:39:38 +02:00
Andreas Rheinhardt
d91756c1b5 avfilter/src_movie: Fix leak of packet upon error
If allocating the AVFrame to contain a decoded frame fails, the AVPacket
containing the data intended to be decoded leaks. This commit fixes
this.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-10 22:25:34 +02:00
Andreas Rheinhardt
41e0058b48 avfilter/src_movie: Remove unnecessary secondary AVPacket
The movie and amovie filters currently use two packets. One of the two,
pkt0, is the owner of the returned packet; it is also the destination
packet for av_read_frame(). The other one pkt is initially (i.e. after
av_read_frame()) a copy of pkt0; copy means that the contents of both
are absolutely the same: They both point to the same AVBufferRef and the
same side data. This violation of the refcounted packet API is only
possible because pkt is not considered to own its data. Only pkt0 is
ever unreferenced.
The reason for pkt's existence seems to be historic:
The API used for decoding audio (namely avcodec_decode_audio4()) could
consume frames partially, i.e. it could return multiple frames for one
packet and therefore it returned how much of the input buffer had been
consumed. The caller was then supposed to update the packet's data and
size pointer to reflect this and call avcodec_decode_audio4() again with
the updated packet to get the next frame.
But before the introduction of refcounted AVPackets where knowledge and
responsibility about what to free lies with the underlying AVBuffer such
a procedure required a spare packet (or one would need to record the
original data and size fields separately to restore them before freeing
the packet; notice that this code has been written when AVPackets still
had a destruct field). But these times are long gone, so just remove the
secondary AVPacket.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-10 22:25:28 +02:00
Andreas Rheinhardt
c97d91ecae avfilter/src_movie: Remove unneeded resetting of AVPacket
av_read_frame() already returns clean packets on error.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-10 22:25:12 +02:00
Paul B Mahol
84327e4607 avfilter/avfilter: remove obsolete comment 2020-09-10 11:24:58 +02:00
Mark Reid
6d2528f28d avfilter/vf_premultiply: add support for gbrapf32 format 2020-09-10 11:24:36 +02:00
Nicolas George
b0203fa72b lavfi/buffersink: cast to uint64_t before shifting.
Fix CID 1466666.
2020-09-09 16:39:55 +02:00
Andreas Rheinhardt
9beaf536fe dnn/dnn_backend_native_layer_conv2d: Fix allocation size
Found via ASAN with the dnn-layer-conv2d FATE-test.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 14:58:26 +02:00
Andreas Rheinhardt
3e950f5349 avfilter/af_headphone: Don't check for clipping in separate loop
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:48:24 +02:00
Andreas Rheinhardt
7b841cf6b7 avfilter/af_headphone: Remove pointless additions
buffer_length is a power-of-two and modulo is buffer_length - 1, so that
buffer_length & modulo is zero.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:48:18 +02:00
Andreas Rheinhardt
8dda0d601b avfilter/af_headphone: Use more appropriate variable name
Also unify incrementing the variable containing the pointer
to the currently used HRIR data.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:48:06 +02:00
Andreas Rheinhardt
bb8ab733c2 avfilter/af_headphone: Avoid indirection for function pointer
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:48:01 +02:00
Andreas Rheinhardt
6ada3c8368 avfilter/af_headphone: Avoid allocating array
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:51 +02:00
Andreas Rheinhardt
6d0d25eca3 avfilter/af_headphone: Don't allocate unused element in array
The headphone filter uses an array with as many elements as the
filter has inputs to store some per-input information; yet actually it
only stores information for all inputs except the very first one (which
is special for this filter). Therefore this commit modifies the code to
remove this unused element.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:46 +02:00
Andreas Rheinhardt
990d9dd800 avfilter/af_headphone: Only keep one AVFrame at a time
Despite the headphone filter only using one AVFrame at a time, it kept
an array each of whose entries contained a pointer to an AVFrame at all
times; the pointers were mostly NULL. This commit instead replaces them
by using a single pointer to an AVFrame on the stack of the only
function that actually uses them.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:40 +02:00
Andreas Rheinhardt
abe0a5dd0a avfilter/af_headphone: Avoid intermediate buffer III
The headphone filter allocates a pair of buffers to be used as
intermediate buffers lateron: Before every use they are zeroed, then
some elements of the buffer are set and lateron the complete buffers are
copied into another, bigger buffer. These intermediate buffers are
unnecessary as the data can be directly written into the bigger buffer.
Furthermore, the whole buffer has been zeroed initially and because no
piece of this buffer is set twice (due to the fact that duplicate
channel map entries are skipped), it is unnecessary to rezero the part
of the big buffer that is about to be written to.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:35 +02:00
Andreas Rheinhardt
9d1f58424a avfilter/af_headphone: Simplify finding channel index
Before this commit, the headphone filter called
av_channel_layout_extract_channel() in a loop in order to find out
the index of a channel (given via its AV_CH_* value) in a channel layout.
This commit changes this to av_get_channel_layout_channel_index()
instead.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:30 +02:00
Andreas Rheinhardt
0952f8f909 avfilter/af_headphone: Fix channel assignment
The documentation of the map argument of the headphone filter states:

"Set mapping of input streams for convolution. The argument is a
’|’-separated list of channel names in order as they are given as
additional stream inputs for filter."

Yet this has not been honoured at all. Instead for the kth given HRIR
channel pair it was checked whether there was a kth mapping and if the
channel position so given was present in the channel layout of the main
input; if so, then the given HRIR channel pair was matched to the kth
channel of the main input. It should actually have been matched to the
channel given by the kth mapping. A consequence of the current algorithm
is that if N additional HRIR channel pairs are given, a permutation of
the first N entries of the mapping does not affect the output at all.

The old code might even set arrays belonging to streams that don't exist
(i.e. whose index is >= the number of channels of the main input
stream); these parts were not read lateron at all. The new code doesn't
do this any longer and therefore the number of elements of some of the
allocated arrays has been reduced (in case the number of mappings was
bigger than the number of channels of the first input stream).

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:24 +02:00
Andreas Rheinhardt
d883bca0f0 avfilter/af_headphone: Avoid intermediate buffers II
When the headphone filter is configured to perform its processing in the
frequency domain, it allocates (among other things) two pairs of
buffers, all of the same size. One pair is used to store data in it
during the initialization of the filter; the other pair is only
allocated lateron. It is zero-initialized and yet its data is
immediately overwritten by the content of the other pair of buffers
mentioned above; the latter pair is then freed.

This commit eliminates the pair of intermediate buffers.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:19 +02:00
Andreas Rheinhardt
f5e1d38b87 avfilter/af_headphone: Avoid intermediate buffers I
The headphone filter has two modes; in one of them (say A), it needs
certain buffers to store data. But it allocated them in both modes.
Furthermore when in mode A it also allocated intermediate buffers of the
same size, initialized them, copied their contents into the permanent
buffers and freed them.

This commit changes this: The permanent buffer is only allocated when
needed; the temporary buffer has been completely avoided.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:14 +02:00
Andreas Rheinhardt
a513b306b3 avfilter/af_headphone: Remove delay fields
They seem to exist for an option that was never implemented.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:09 +02:00
Andreas Rheinhardt
b2feca4616 avfilter/af_headphone: Remove unused arrays
The delay arrays were never properly initialized, only zero-initialized;
furthermore these arrays duplicate fields in the headphone_inputs
struct. So remove them.
(Btw: The allocations for them have not been checked.)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:47:03 +02:00
Andreas Rheinhardt
bff1d0c658 avfilter/af_headphone: Avoid duplicating string needlessly
The string given by an AVOption that contains the channel assignment
is used only once; ergo it doesn't matter that parsing the string via
av_strtok() is destructive. There is no need to make a copy.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:46:58 +02:00
Andreas Rheinhardt
71daaafa3a avfilter/af_headphone: Simplify parsing channel mapping string
When parsing the channel mapping string (a string containing '|'
delimited tokens each of which is supposed to contain a channel name
like "FR"), the old code would at each step read up to seven uppercase
characters from the input string and give this to
av_get_channel_layout() to parse. The returned layout is then checked
for being a layout with a single channel set by computing its logarithm.

Besides being overtly complicated this also has the drawback of relying
on the assumption that every channel name consists of at most seven
uppercase letters only; but said assumption is wrong: The abbreviation
of the second low frequency channel is LFE2. Furthermore it treats
garbage like "FRfoo" as valid channel.

This commit changes this by using av_get_channel_layout() directly;
furthermore, av_get_channel_layout_nb_channels() (which uses popcount)
is used to find out the number of channels instead of the custom code
to calculate the logarithm.

(As a consequence, certain other formats to specify the channel layouts
are now accepted (like the hex versions of av_get_channel_layout()); but
this is actually not bad at all.)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:46:51 +02:00
Andreas Rheinhardt
bc533ba2ae avfilter/af_headphone: Use uint64_t for channel mapping
The headphone filter has an option for the user to specify an assignment
of inputs to channels (or from pairs of channels of the second input to
channels). Up until now, these channels were stored in an int containing
the logarithm of the channel layout. Yet it is not the logarithm that is
used lateron and so a retransformation was necessary. Therefore this
commit simply stores the uint64_t as is, avoiding the retransformation.

This also has the advantage that unset channels (whose corresponding
entry is zero) can't be mistaken for valid channels any more; the old
code had to initialize the channels to -1 to solve this problem and had
to check for whether a channel is set before the retransformation
(because 1 << -1 is UB).

The only downside of this approach is that the size of the context
increases (by 256 bytes); but this is not exceedingly much.

Finally, the array has been moved to the end of the context; it is only
used a few times during the initialization process and moving it
decreased the offsets of lots of other entries, reducing codesize.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:46:30 +02:00
Andreas Rheinhardt
5e68727fa7 avfilter/af_headphone: Only attempt once to init coeffs
The headphone filter does most of its initialization after its init
function, because it can perform certain tasks only after all but its
first input streams have reached eof. When this happens, it allocates
certain buffers and errors out if an allocation fails.

Yet the filter didn't check whether some of these buffers already exist
(which may happen if an earlier attempt has been interrupted in the
middle (due to an allocation error)) in which case the old buffers leak.

This commit makes sure that initializing the buffers is only attempted
once; if not successfull at the first attempt, future calls to the
filter will error out. Trying to support resuming initialization doesn't
seem worthwhile.

Notice that some allocations were freed before a new allocation was
performed; yet this effort was incomplete. Said code has been removed.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:46:24 +02:00
Andreas Rheinhardt
a84c77396b avfilter/af_headphone: Combine several loops when checking for EOF
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:46:18 +02:00
Andreas Rheinhardt
58b6594b01 avfilter/af_headphone: Fix stack buffer overflow
The number of channels can be up to 64, not only 16.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:46:13 +02:00
Andreas Rheinhardt
14226be499 avfilter/af_headphone: Don't overrun array
The headphone filter stores the channel position of the ith HRIR stream
in the ith element of an array of 64 elements; but because there is no
check for duplicate channels, it is easy to write beyond the end of the
array by simply repeating channels.

This commit adds a check for duplicate channels to rule this out.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:46:07 +02:00
Andreas Rheinhardt
7b74e02ef2 avfilter/af_headphone: Fix segfault when using very short streams
When the headphone filter does its processing in the time domain,
the lengths of the buffers involved are determined by three parameters,
only two of which are relevant here: ir_len and air_len. The former is
the length (in samples) of the longest HRIR input stream and the latter
is the smallest power-of-two bigger than ir_len.

Using optimized functions to calculate the convolution places
restrictions on the alignment of the length of the vectors whose scalar
product is calculated. Therefore said length, namely ir_len, is aligned
on 32; but the number of elements of the buffers used is given by air_len
and for ir_len < 16 a buffer overflow happens.

This commit fixes this by ensuring that air_len is always >= 32 if
processing happens in the time domain.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:45:59 +02:00
Andreas Rheinhardt
dfd46e2d16 avfilter/af_headphone: Check for the existence of samples
Not providing any samples makes no sense at all. And if no samples
were provided for one of the HRIR streams, one would either run into
an av_assert1 in ff_inlink_consume_samples() or into a segfault in
take_samples() in avfilter.c.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:45:39 +02:00
Andreas Rheinhardt
709fca0a94 avfilter/af_headphone: Remove always true check
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:45:20 +02:00
Andreas Rheinhardt
e2d4a5807f avfilter/af_headphone: Don't use uninitialized buffer in log message
This buffer was supposed to be initialized by sscanf(input, "%7[A-Z]%n",
buf, &len), yet if the first input character is not in the A-Z range,
buf is not touched (in particular it needn't be zero-terminated if the
failure happened when parsing the first channel and it still contains
the last channel name if the failure happened when one channel name
could be successfully parsed). This is treated as error in which case
buf is used directly in the log message. This commit fixes this by
actually using the string that could not be matched in the log message
instead.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-09 13:36:54 +02:00
Xu Jun
3c7cad69f2 dnn_backend_native_layer_conv2d.c:Add mutithread function
Use pthread to multithread dnn_execute_layer_conv2d.
Can be tested with command "./ffmpeg_g -i input.png -vf \
format=yuvj420p,dnn_processing=dnn_backend=native:model= \
espcn.model:input=x:output=y:options=conv2d_threads=23 \
 -y sr_native.jpg -benchmark"

before patch: utime=11.238s stime=0.005s rtime=11.248s
after patch:  utime=20.817s stime=0.047s rtime=1.051s
on my 3900X 12c24t @4.2GHz

About the increase of utime, it's because that CPU HyperThreading
technology makes logical cores twice of physical cores while cpu's
counting performance improves less than double. And utime sums
all cpu's logical cores' runtime. As a result, using threads num
near cpu's logical core's number will double utime, while reduce
rtime less than half for HyperThreading CPUs.

Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-09-09 14:24:36 +08:00
Xu Jun
235e01f5a0 dnn_backend_native.c: parse options in native backend
Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-09-09 14:24:36 +08:00
Nicolas George
d1f3d721df Revert "avfilter/src_movie: switch to activate"
This reverts commit abc884bcc0.

This patch was pushed without actual review.
An actual review would have revealed that the switch to activate
was not done correctly because the logic between request_frame()
and frame_wanted is not as direct with filters with multiple
outputs than with a single output.
2020-09-08 14:57:53 +02:00
Nicolas George
ddba05afe4 lavfi/vsrc_testsrc: switch to activate.
Allow to set the EOF timestamp.

Also: doc/filters/testsrc*: specify the rounding of the duration option.

The changes in the ref files are right.

For filter-fps-down, the graph is testsrc2=r=7:d=3.5,fps=3.
3.5=24.5/7, so the EOF of testsrc2 will have PTS 25/7.
25/7=(10+5/7)/3, so the EOF PTS for fps should be 11/7,
and the output should contain a frame at PTS 10.

For filter-fps-up, the graph is testsrc2=r=3:d=2,fps=7,
for filter-fps-up-round-down and filter-fps-up-round-up
it is the same with explicit rounding options.
But there is no rounding: testsrc2 produces exactly 6 frames
and 2 seconds, fps converts it into exactly 14 frames.

The tests should probably be adjusted to restore them to
a useful coverage.
2020-09-08 14:39:43 +02:00
Nicolas George
fe964d80fe lavfi/formats: more logical testing of inputs and outputs.
ff_set_common_formats() is currently only called after
graph_check_validity(), guaranteeing that inputs and outputs
are connected.
If we want to support configuring partially-connected graphs,
we will have a lot of redesign to do anyway.

Fix CID 1466262 / 1466263.
2020-09-08 14:22:24 +02:00
Nicolas George
0d942357f6 lavfi/buffersink: remove redundant channel layouts.
The channel_layouts and channel_counts options set what buffersink
is supposed to accept. If channel_counts contains 2, then stereo is
already accepted, there is no point in having it in channel_layouts
too. This was not properly documented until now, so only print a
warning.
2020-09-08 14:10:31 +02:00
Nicolas George
69f5f6ea37 lavfi: check the validity of formats lists.
Part of the code expects valid lists, in particular no duplicates.
These tests allow to catch bugs in filters (unlikely but possible)
and to give a clear message when the error comes from the user
((a)formats) or the application (buffersink).

If we decide to switch to a more efficient merging algorithm,
possibly sorting the lists, these functions will be the preferred
place for pre-processing, and can be renamed accordingly.
2020-09-08 14:10:31 +02:00
Nicolas George
6479f40afa lavfi/formats: simplify a macro parameters. 2020-09-08 14:02:42 +02:00
Nicolas George
2f76476549 lavfi: regroup formats lists in a single structure.
It will allow to refernce it as a whole without clunky macros.

Most of the changes have been automatically made with sed:

sed -i '
  s/-> *in_formats/->incfg.formats/g;
  s/-> *out_formats/->outcfg.formats/g;
  s/-> *in_channel_layouts/->incfg.channel_layouts/g;
  s/-> *out_channel_layouts/->outcfg.channel_layouts/g;
  s/-> *in_samplerates/->incfg.samplerates/g;
  s/-> *out_samplerates/->outcfg.samplerates/g;
  ' src/libavfilter/*(.)
2020-09-08 14:02:40 +02:00
Paul B Mahol
376c61c61b avfilter/vf_nnedi: use av_fopen_utf8() 2020-09-07 19:13:19 +02:00
Mark Reid
5fcd83a244 avfilter/vf_lut3d: support remaping negative values in the prelut 2020-09-07 19:04:09 +02:00
Paul B Mahol
912785572a avfilter/asrc_anullsrc: remove not useful function 2020-09-04 19:37:29 +02:00
Paul B Mahol
9f5f971efd avfilter/vsrc_gradients: switch to activate
Allow to set the EOF timestamp.
2020-09-04 19:37:29 +02:00
Paul B Mahol
e8819d86fa avfilter/asrc_anullsrc: switch to activate
Allow to set the EOF timestamp.
2020-09-04 19:37:29 +02:00
Paul B Mahol
615d75f291 avfilter/asrc_anullsrc: add support to set output duration 2020-09-04 19:37:29 +02:00
Paul B Mahol
88db1745fc avfilter/vf_alphamerge: use framesync 2020-09-04 19:37:29 +02:00
Paul B Mahol
abc884bcc0 avfilter/src_movie: switch to activate
Allow to set the EOF timestamp.
2020-09-04 19:37:29 +02:00
Paul B Mahol
939f4b35b8 avfilter/af_arnndn: reduce size of second_check[] table 2020-09-04 18:02:52 +02:00
Paul B Mahol
e417f84003 avfilter/f_graphmonitor: also show link EOF status in blue 2020-08-31 19:59:35 +02:00
Paul B Mahol
eb9fa00bcc avfilter/vsrc_gradients: add speed option 2020-08-31 11:09:53 +02:00
Paul B Mahol
823eb009cb avfilter/vsrc_gradients: do not use (l)lrint variants for double 2020-08-31 11:09:53 +02:00
Paul B Mahol
64e93025f0 avfilter/vsrc_gradients: add duration option 2020-08-31 11:09:53 +02:00
Ting Fu
4a11a6f4cc dnn/tensorflow: add log error message
Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-08-31 13:12:10 +08:00
Ting Fu
74358ff4a4 dnn/openvino: add log error message
Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-08-31 13:12:10 +08:00
Andreas Rheinhardt
a97d8469a6 avfilter/src_movie: Avoid intermediate buffer for writing string
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-31 03:41:38 +02:00
Paul B Mahol
60796d22f9 avfilter/vf_xfade: fix excessive number of queued frames
Also do not abort in some cases too early when transition is over.

Fixes #8823.
2020-08-30 11:28:28 +02:00
Paul B Mahol
f7deae7215 avfilter/af_arnndn: use memcpy for copying in compute_rnn() 2020-08-27 20:39:33 +02:00
Paul B Mahol
ace1cc6163 avfilter/af_arnndn: use scalarproduct_float() in dct function 2020-08-27 20:39:33 +02:00
Paul B Mahol
0d46043619 avfilter/af_compensationdelay: always initialize w_ptr with 0
It will be changed later anyway, and in case inlink have 0 channels
(should never happen) it will not pick some random value.
2020-08-27 18:10:24 +02:00
Paul B Mahol
1419bf0551 avfilter/vf_xfade: do not use alpha for average rgb color 2020-08-27 14:45:21 +02:00
Paul B Mahol
9ebde67f0b avfilter/vf_xfade: add corner wipe transforms 2020-08-27 14:45:21 +02:00
Limin Wang
71ec3e4583 Revert "avfilter/yadif: simplify the code for better readability"
This reverts commit 2a9b934675.
2020-08-27 07:30:30 +08:00
Andreas Rheinhardt
ca8e5dedc7 avfilter/af_headphone: Fix leak of channel layouts list on error
In case the multichannel HRIR mode was enabled, an error could happen
between allocating a channel layouts list and attaching it to its target
destination. If an error happened, the list would leak. This is fixed by
attaching the list to its target directly after its allocation.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-26 23:52:57 +02:00