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

10168 Commits

Author SHA1 Message Date
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
Paul B Mahol
10c2ef1ca4 avfilter/vf_colorlevels: add planar rgb formats support 2022-03-06 14:00:26 +01:00
Paul B Mahol
88a58b90fe avfilter/avf_ahistogram: use av_clip_uint8() instead 2022-03-06 12:27:48 +01:00
Paul B Mahol
fb5e871937 avfilter/avf_ahistogram: add new histogram mode option 2022-03-05 22:11:38 +01:00
Paul B Mahol
c72b5be9e3 avfilter/vf_pad: use already available outlink variable 2022-03-04 18:30:10 +01:00
Paul B Mahol
779ae049b2 avfilter/vf_zscale: fix leaks in fast/bypass path 2022-03-04 14:07:20 +01:00
Paul B Mahol
8061098418 avfilter/avf_abitscope: make frame writable before writing to it 2022-03-04 13:54:12 +01:00
Paul B Mahol
2a5a14f3ca avfilter/avf_aphasemeter: make frame writable before writing to it 2022-03-04 13:54:12 +01:00
Paul B Mahol
de07c57d5a avfilter/avf_ahistogram: make frame writable before writing to it 2022-03-04 13:54:12 +01:00
Paul B Mahol
faac31cc86 avfilter/avf_avectorscope: make frame writable before writing to it 2022-03-04 13:54:12 +01:00
Paul B Mahol
dc8e83b4e0 avfilter/f_ebur128: make sure frame is writable before writing to it 2022-03-04 13:54:12 +01:00
Paul B Mahol
aede8424fe avfilter/f_graphmonitor: add several more flags 2022-03-04 13:54:11 +01:00
Paul B Mahol
34836e91e0 avfilter/f_ebur128: switch to activate() 2022-03-04 13:54:11 +01:00
Paul B Mahol
99f7f4144a avfilter/asrc_sinc: check allocation return value 2022-03-03 23:07:10 +01:00
Paul B Mahol
f4d123341c avfilter/asrc_sinc: remove no longer correct (un)pack 2022-03-03 23:07:10 +01:00
James Almer
ee88804d07 avfilter/framepool: remove superfluous pallete buffer allocation
av_image_fill_plane_sizes() already sets sizes[1] to AVPALETTE_SIZE.
Should fix memory leaks.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-03 14:18:28 -03:00
James Almer
8fcd9d7375 avfilter/framepool: use av_image_fill_plane_sizes() to calculate pool sizes
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-03 13:55:28 -03:00
Paul B Mahol
837c55da3d avfilter/vf_zscale: fix several issues in previous commit 2022-03-03 17:35:48 +01:00
Victoria Zhislina
d0aefc3706 avfilter/vf_zscale: add slice threading support
By ffmpeg threading support implementation via frame slicing and doing
zimg_filter_graph_build that used to take 30-60% of each frame processig
only if necessary (some parameters changed)
the performance increase vs original version
in video downscale and color conversion  >4x is seen
on 64 cores Intel Xeon, 3x on i7-6700K (4 cores with HT)

Signed-off-by: Victoria Zhislina <Victoria.Zhislina@intel.com>
2022-03-03 17:35:48 +01:00
Paul B Mahol
d607af50fd avfilter/vf_geq: add float formats support 2022-03-03 17:35:48 +01:00
Paul B Mahol
352a01c3ef avfilter/avf_abitscope: add support for more input formats 2022-03-03 17:35:48 +01:00
Paul B Mahol
de0bb77563 avfilter/avf_abitscope: refactor code & add trace mode 2022-03-03 17:35:48 +01:00
Paul B Mahol
dae95b3ffd avfilter/vf_maskedmerge: fix rounding when masking 2022-03-03 09:57:53 +01:00
Paul B Mahol
59520f068d avfilter/vf_colorchannelmixer: add float formats support 2022-03-03 09:57:53 +01:00
Paul B Mahol
835446a8e1 avfilter/vf_colorchannelmixer: refactor / add template 2022-03-03 09:57:53 +01:00
Nicolas George
add3571a59 lavfi/af_aformat: remove support for comma-separated lists
It has been deprecated for nine years.
2022-03-02 17:21:04 +01:00
Gyan Doshi
4b72bca6ca avfilter/drawtext: change reload value to an interval
Allows user to specify a frame interval at which textfile is reloaded.
2022-03-02 12:56:58 +05:30
Paul B Mahol
84f5583078 avfilter/vf_unsharp: add support for alpha formats 2022-03-01 12:36:35 +01:00
Paul B Mahol
e1974622e1 avfilter/vf_v360: improve rounding in xyz_to_dfisheye() 2022-03-01 10:16:08 +01:00
Paul B Mahol
5ffad29d62 avfilter/vf_chromanr: fix rounding of final output 2022-03-01 09:47:41 +01:00
Limin Wang
d344169419 avfilter: support for CUVA HDR Vivid metadata
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-03-01 09:08:43 +08:00
Paul B Mahol
178d8036dc avfilter/af_dynaudnorm: reduce number of lines by using for (int ... 2022-02-28 22:00:02 +01:00
Paul B Mahol
aa6b9066b9 avfilter/af_dynaudnorm: use fmin/fmax for doubles 2022-02-28 22:00:02 +01:00
Paul B Mahol
456d48c752 avfilter/af_dynaudnorm: add support for overlapping frames 2022-02-28 22:00:02 +01:00
Paul B Mahol
9a86e5338c avfilter/af_dynaudnorm: do not leak frame on error 2022-02-28 22:00:02 +01:00
Paul B Mahol
567cab3bd8 avfilter/vf_amplify: improve performance 2022-02-27 23:50:57 +01:00
Paul B Mahol
a2dbd17788 avfilter/af_dynaudnorm: allocate new frame instead of making it writable
Later case does not use frame pool at all.
2022-02-27 20:05:57 +01:00
Paul B Mahol
a9124a75b0 avfilter/af_dynaudnorm: allow to filter subset of channels 2022-02-27 20:05:57 +01:00
Paul B Mahol
b9f91a7cbc avfilter/af_dynaudnorm: make frame writable if it may be changed 2022-02-27 18:48:24 +01:00
Paul B Mahol
b15c26a22c avfilter/af_acrusher: add timeline support 2022-02-27 16:53:24 +01:00
Paul B Mahol
8bcb7d49f9 avfilter/af_vibrato: add timeline support 2022-02-27 16:31:11 +01:00
Paul B Mahol
57580376f7 avfilter/af_tremolo: add timeline support 2022-02-27 16:31:11 +01:00
Paul B Mahol
0d0002cd20 avfilter/af_afftdn: add more verbose options aliases 2022-02-27 12:04:21 +01:00
Paul B Mahol
592cef6135 avfilter/af_afftdn: remove ThreadData struct code 2022-02-27 12:04:21 +01:00
Paul B Mahol
2cb482aa74 avfilter/af_afftdn: add support for writable input frames 2022-02-27 12:04:21 +01:00
Paul B Mahol
6562d28b9b avfilter/af_aspectralstats: stop using fifo and rewritting pts 2022-02-26 13:30:04 +01:00
Paul B Mahol
644b6ed3ff avfilter/af_afftdn: stop using fifo and rewritting pts 2022-02-26 12:09:29 +01:00
Paul B Mahol
68bc9773cf avfilter/f_ebur128: set video outlink timebase and framerate 2022-02-25 18:15:26 +01:00
Paul B Mahol
e3f07185ed avfilter/f_ebur128: also set max peak for all channels in frame metadata 2022-02-25 18:15:26 +01:00
Paul B Mahol
e845c41c94 avfilter/af_dynaudnorm: cleanup gaussian_filter() function 2022-02-25 18:15:26 +01:00
Paul B Mahol
353195fb38 avfilter/af_crystalizer: refactor code 2022-02-24 22:37:55 +01:00
Paul B Mahol
b9493e0cc0 avfilter/vf_tmidequalizer: check that frame is valid 2022-02-24 21:46:13 +01:00
Paul B Mahol
6f04b43c22 avfilter/vf_tpad: handle case when no frame was ever received 2022-02-24 21:28:23 +01:00
Paul B Mahol
3715f2f864 avfilter/vf_tpad: if there is no frame to clone return early 2022-02-24 21:28:23 +01:00
Andreas Rheinhardt
636631d9db Remove unnecessary libavutil/(avutil|common|internal).h inclusions
Some of these were made possible by moving several common macros to
libavutil/macros.h.

While just at it, also improve the other headers a bit.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Andreas Rheinhardt
84f16bb5e6 avutil/avassert: Don't include avutil.h
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Andreas Rheinhardt
155cd6baa4 Remove obsolete version.h inclusions
Forgotten in e7bd47e657.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-24 12:56:49 +01:00
Paul B Mahol
15a1104d73 avfilter/f_ebur128: multiply is usually faster than divide
Also guard against overflow when subtracting from unsigned.
2022-02-24 11:15:28 +01:00
Paul B Mahol
d5ad1d7847 avfilter/f_ebur128: use unsigned for hist_entry.count
Also when summing multiple hist_entry.count use uint64_t for accumulator.
2022-02-24 11:15:28 +01:00
Paul B Mahol
b0f8dbb0ca avfilter/af_loudnorm: increase max allowed LRA 2022-02-23 23:25:58 +01:00
Paul B Mahol
d27e1cb633 avfilter/avf_showfreqs: stop using audio fifo
Also stop rewriting pts.
2022-02-23 17:01:36 +01:00
Paul B Mahol
570fda56b9 avfilter/af_surround: use outlink variable already available 2022-02-22 22:50:38 +01:00
Paul B Mahol
f984383ea0 avfilter/af_afftfilt: stop resetting pts
Also stop using audio fifo.
2022-02-22 22:50:38 +01:00
Paul B Mahol
fee804f7ed avfilter/af_surround: do not rewrite pts any more
Also stop using fifo and excessive peeking.
2022-02-22 13:25:21 +01:00
Paul B Mahol
c337b0f826 avfilter/af_afir: remove pts rewriting code
This is not needed at all.
2022-02-22 13:25:21 +01:00
Paul B Mahol
17a59a634c avfilter/framepool: fix alignment requirements for audio and video filters 2022-02-22 09:22:03 +01:00
Wu Jianhua
82ef4c708e avfilter/vf_gblur_vulkan: add sizeV option
This commit added a sizeV option, integrated some identical operations
to a separate function, and updated the CGS for horizontal and vertical
respectively.

The following command is on how to apply sizeV option:

ffmpeg -init_hw_device vulkan -i input.264 -vf \
hwupload,gblur_vulkan=size=127:sigma=20:sizeV=3:sigmaV=0.5,hwdownload,format=yuv420p \
-y out.264

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2022-02-22 05:52:44 +01:00
Wu Jianhua
50ca36f845 avfilter/scale_vulkan: use RET for checking return value
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2022-02-22 05:47:18 +01:00
Wu Jianhua
8f470133f6 avfilter/vf_blend_vulkan: add multiply blend mode
Use the commands below to test: (href: https://trac.ffmpeg.org/wiki/Blend)

I. make an image for test
ffmpeg -f lavfi -i color=s=256x256,geq=r='H-1-Y':g='H-1-Y':b='H-1-Y' -frames 1 \
-y -pix_fmt yuv420p test.jpg

II. blend in sw
ffmpeg -i test.jpg -vf "split[a][b];[b]transpose[b];[a][b]blend=all_mode=multiply,\
pseudocolor=preset=turbo" -y multiply_sw.jpg

III. blend in vulkan
ffmpeg -init_hw_device vulkan -i test.jpg -vf "split[a][b];[b]transpose[b];\
[a]hwupload[a];[b]hwupload[b];[a][b]blend_vulkan=all_mode=multiply,hwdownload,\
format=yuv420p,pseudocolor=preset=turbo" -y multiply_vulkan.jpg

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2022-02-22 05:46:06 +01:00
Paul B Mahol
0aa7142442 avfilter/vf_dblur: add float formats support 2022-02-21 17:52:20 +01:00
Paul B Mahol
6a9cb5a7ba avfilter/vf_lagfun: add float formats support 2022-02-21 17:52:20 +01:00
Paul B Mahol
b8e58f0858 avfilter/vf_limiter: refactor slice functions 2022-02-21 00:35:11 +01:00
Paul B Mahol
ebcde3fda8 avfilter/vf_maskedminmax: add float pixel formats 2022-02-21 00:35:11 +01:00
Paul B Mahol
b7dc07c07c avfilter/vf_maskedminmax: refactor slice function 2022-02-21 00:35:10 +01:00
Paul B Mahol
105234ce80 avfilter/vf_maskedmerge: add float pixel formats 2022-02-21 00:35:10 +01:00
Paul B Mahol
ac0fdac0fc avfilter/vf_maskedmerge: refactor slice function 2022-02-21 00:35:10 +01:00
Paul B Mahol
954279564a avfilter/vf_monochrome: use lrintf for rounding 2022-02-20 23:15:34 +01:00
Paul B Mahol
df98e8e4b4 avfilter/f_ebur128: add support for any number of channels 2022-02-20 17:45:50 +01:00
Nicolas George
01440e2588 lavfi/vf_fps: check flow before sending more frames
Analyzed by Paul B Mahol <onemda@gmail.com>.

Fixes OOM in #9081.
2022-02-20 12:38:52 +01:00
Nicolas George
531d09fb2d lavfi: add ff_inoutlink_check_flow() 2022-02-20 12:38:52 +01:00
Paul B Mahol
c439c6b191 avfilter/af_headphone: improve stereo hrir support
Until now, in some cases produced output would be wrong.
2022-02-19 13:45:47 +01:00
Paul B Mahol
51cd565208 avfilter/vf_xmedian: small additional speedup 2022-02-18 17:12:46 +01:00
Paul B Mahol
cca6fe7fe0 avfilter/vf_xmedian: refactor slice function 2022-02-18 17:12:46 +01:00
Paul B Mahol
b40419c99b avfilter/vf_atadenoise: fix >8 depth filtering with planes disabled 2022-02-18 17:12:46 +01:00
Paul B Mahol
33417198aa avfilter/vf_mix: additional speedup 2022-02-18 17:12:46 +01:00
Paul B Mahol
cc2b3201e7 avfilter/vf_waveform: do not add tint if output format is gray 2022-02-17 23:05:13 +01:00
Paul B Mahol
da473e0984 avfilter/vf_extractplanes: unbreak "extracting" >8 depth gray formats 2022-02-17 23:05:13 +01:00