1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

10154 Commits

Author SHA1 Message Date
Paul B Mahol
2ba38beb79 avfilter/vf_epx: stop doing read overflow 2022-03-14 23:01:08 +01:00
Paul B Mahol
58f867ffef avfilter/avf_abitscope: rename macro to less generic one 2022-03-14 18:27:42 +01:00
Yiyuan GUO
2201c91fbf avfilter/vf_palettegen: add protection against potential divide by zero
In libavfilter/vf_palettegen.c, the function get_avg_color requires
that box->len greater than zero to avoid dividing by zero. However,
the call sequence filter_frame -> get_palette_frame -> get_avg_color
may not satisfy this precondition. Fixes #9222.

Signed-off-by: Yiyuan GUO <yguoaz@gmail.com>
2022-03-14 17:55:00 +01:00
Paul B Mahol
1ab83dd369 avfilter/vf_fieldhint: add pattern mode of filtering 2022-03-14 17:43:12 +01:00
Paul B Mahol
c0f49378a9 avfilter/af_afftdn: allow user to control number of bands 2022-03-14 17:43:12 +01:00
Paul B Mahol
deffacb6b4 avfilter/af_afftdn: use correct variable in for loops
Tehnically changes nothing as they are same value currently.
2022-03-14 17:43:12 +01:00
Paul B Mahol
a71a3d1ed2 avfilter/af_afftdn: stop producing small impulsive noise at start of output 2022-03-14 10:08:33 +01:00
Paul B Mahol
19614921e9 avfilter/vf_decimate: also check for ready frames if not ppsrc is used
Fixes filtering when cascading multiple decimate filters.
2022-03-13 21:59:54 +01:00
Paul B Mahol
07b8d6a897 avfilter/avf_showspectrum: stop rewriting pts
Also fix dropping of first frame for fullframe sliding.
2022-03-13 18:02:24 +01:00
Paul B Mahol
61224c856c avfilter/af_afftdn: add way to control noise floor link for >1 channels 2022-03-13 17:28:24 +01:00
Paul B Mahol
3cb5a5f64c avfilter/af_afftdn: improve residual tracking 2022-03-13 17:28:24 +01:00
Paul B Mahol
9e279c8c2d avfilter/af_afftdn: rename some variables to less cryptic name 2022-03-13 17:28:24 +01:00
Paul B Mahol
b578324b1d avfilter/af_afftdn: reduce some pointless pointer indirections 2022-03-13 17:28:24 +01:00
Paul B Mahol
447ca90bcf avfilter/af_afftdn: use define for sfm flags mask and size
Instead of hardcoding values.
2022-03-13 17:28:24 +01:00
Paul B Mahol
546afd0d49 avfilter/af_afftdn: allow user to change ratio factor
While here change default to lower value as previous
value were causing too much smearing on time axis of spectrogram.
2022-03-13 01:49:02 +01:00
Paul B Mahol
b2c6c7c4c5 avfilter/af_afftdn: stop sharing non-shareable parameters between channels 2022-03-13 01:49:02 +01:00
Paul B Mahol
df8163ae55 avfilter/af_afftdn: use RDFT instead
Makes spectral filtering less crude.
2022-03-12 18:58:24 +01:00
Paul B Mahol
b8af574477 avfilter/af_afftdn: reduce code duplication 2022-03-12 18:58:24 +01:00
Paul B Mahol
0bebff0c18 avfilter/af_afftdn: reduce scaling of input samples
It was multiplied too much.
2022-03-12 18:58:24 +01:00
Paul B Mahol
4a8b62c29a avfilter/af_afftdn: fix small memory leak 2022-03-12 12:12:25 +01:00
Paul B Mahol
386e5e4cfc avfilter/af_afftdn: change noise profile to floating point precision 2022-03-12 12:12:25 +01:00
Paul B Mahol
32e99157c2 avfilter/af_afftdn: generalize noise profile mean estimation 2022-03-12 12:12:25 +01:00
Paul B Mahol
983b15e5f4 avfilter/af_afftdn: use single define for number of bands in noise profile 2022-03-12 12:12:25 +01:00
Shubhanshu Saxena
d0a999a0ab libavfilter: Remove DNNReturnType from DNN Module
This patch removes all occurences of DNNReturnType from the DNN module.
This commit replaces DNN_SUCCESS by 0 (essentially the same), so the
functions with DNNReturnType now return 0 in case of success, the negative
values otherwise.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Shubhanshu Saxena
1df77bab08 lavfi/dnn_backend_common: Return specific error codes
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered in the common DNN backend functions.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Shubhanshu Saxena
515ff6b4f8 lavfi/dnn_backend_native: Return Specific Error Codes
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Shubhanshu Saxena
3fa89bd758 lavfi/dnn_backend_tf: Return Specific Error Codes
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered. For TensorFlow C API errors, currently
DNN_GENERIC_ERROR is returned.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Shubhanshu Saxena
91af38f2b3 lavfi/dnn_backend_openvino: Return Specific Error Codes
Switch to returning specific error codes or DNN_GENERIC_ERROR
when an error is encountered. For OpenVINO API errors, currently
DNN_GENERIC_ERROR is returned.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Shubhanshu Saxena
d0587daec2 lavfi/dnn_io_proc: Return Specific Error Codes
This commit returns specific error codes from the functions in the
dnn_io_proc instead of DNN_ERROR.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Shubhanshu Saxena
b602f11a06 lavfi/dnn: Error Specificity in Native Backend Layers
This commit returns specific error codes from the execution
functions in the Native Backend layers instead of DNN_ERROR.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Shubhanshu Saxena
e5ce6a6070 libavfilter: Prepare to handle specific error codes in DNN Filters
This commit prepares the filter side to handle specific error codes
from the DNN backends instead of current DNN_ERROR.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2022-03-12 15:10:28 +08:00
Paul B Mahol
e7caa18b4a avfilter/af_afftdn: remove special handling for first and last bin 2022-03-11 23:57:33 +01:00
Paul B Mahol
ea777333de avfilter/af_afftdn: remove code that have marginal impact to denoising 2022-03-11 23:57:33 +01:00
Paul B Mahol
a0724328a8 avfilter/vf_zscale: do not attempt to continue filtering if there is no graph 2022-03-11 09:34:04 +01:00
Paul B Mahol
4ac85ae448 avfilter/vf_zscale: also check formats 2022-03-11 01:54:03 +01:00
Paul B Mahol
5cd8eb2aef avfilter/af_lv2: add commands support 2022-03-10 12:08:47 +01:00
Paul B Mahol
34715fe4a2 avfilter/af_anlmdn: add support for using writable frames 2022-03-10 12:08:47 +01:00
Paul B Mahol
c71b76e141 avfilter/af_anlmdn: stop using fifo and rewriting pts 2022-03-09 22:08:36 +01:00
Paul B Mahol
41cae501b7 avfilter/af_anlmdn: fix possible array overflow and increase options limits 2022-03-09 22:08:36 +01:00
Thilo Borgmann
74117abf0c lavfi/drawtext: Add %N for drawing fractions of a second
Suggested-By: ffmpeg@fb.com
2022-03-08 13:28:02 +01:00
Paul B Mahol
3706fb8f16 avfilter/f_segment: fix sending frames with zero samples out
Fix max_samples variable type, and check for out of range values.
2022-03-08 10:26:46 +01:00
Paul B Mahol
13a153d801 avfilter/f_sendcmd: export width and height too 2022-03-07 17:00:12 +01:00
Paul B Mahol
328247076c avfilter/af_channelsplit: switch to activate() 2022-03-07 15:29:40 +01:00
Paul B Mahol
a1f2e42ebf avfilter/af_acrossover: switch to activate() 2022-03-07 15:29:39 +01:00
Paul B Mahol
7238541d39 avfilter/vf_extractplanes: switch to activate()
Fixes hang at end of input with this command:

ffmpeg -f lavfi -i testsrc2=d=50,format=yuv444p -lavfi \
"extractplanes=y+u+v[y][u][v];[y]tpad=start=0[y];[u]tpad=start=0[u];[v]negate[v];[y][u][v]vstack=3" -f null -
2022-03-07 15:29:39 +01:00
Paul B Mahol
0f5c964c57 avfilter/split: switch to activate() 2022-03-07 15:29:39 +01:00
Martin Storsjö
e645a1ddb9 libavfilter: vf_scale: Properly take in->color_range into account
While swscale can be reconfigured with sws_setColorspaceDetails,
the in/out ranges also need to be set before calling
sws_init_context, otherwise the initialization might choose
fastpaths that don't take the ranges into account.

Therefore, look at in->color_range too, when deciding on whether
the scaler needs to be reconfigured.

Add a new member variable for keeping track of this, for being
able to differentiate between whether the scale filter parameter
"in_range" has been set (which should override whatever the input
frame has set) or whether it has been configured based on the
latest frame (which should trigger reconfiguring the scaler if
the input frame ranges change).

Fixes: Ticket #9576

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-07 00:15:23 +02:00
Michael Niedermayer
b9973b72c0 avfilter/vf_colorlevels: Fix build failure on ARM
This fixes building for arm after 10c2ef1ca4.
The argument to av_clip_uintp2 must be an assembly time immediate
constant.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by and commit message details-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-06 20:16:39 +01:00
Paul B Mahol
6f231664ab avfilter/vsrc_gradients: add radial gradients 2022-03-06 15:54:10 +01:00
Paul B Mahol
7c23c9dfc7 avfilter/vsrc_gradients: add gbrapf32 format support 2022-03-06 15:54:09 +01:00