Commit Graph

9886 Commits

Author SHA1 Message Date
Niklas Haas
a943f527a1 lavfi/vf_libplacebo: pick log level dynamically
In particular, allows users to go all the way up to PL_LOG_TRACE if
desired. (While also avoiding some potentially unnecessary callbacks for
filtered messages, including e.g. the CPU cost of printing out shader
sources)

Response to runtime log level changes by updating it once per
filter_frame(), which should hopefully be often enough.
2021-11-12 22:00:14 +01:00
Niklas Haas
51e03409d7 lavfi: add a libplacebo filter
This filter conceptually maps the libplacebo `pl_renderer` API into
libavfilter, which is a high-level image rendering API designed to work
with an RGB pipeline internally. As such, there's no way to avoid e.g.
chroma interpolation with this filter, although new versions of
libplacebo support outputting back to subsampled YCbCr after processing
is done.

That being said, `pl_renderer` supports automatic integration of the
majority of libplacebo's shaders, ranging from debanding to tone
mapping, and also supports loading custom mpv-style user shaders, making
this API a natural candidate for getting a lot of functionality out of
relatively little code.

In the future, I may approach this problem either by rewriting this
filter to also support a non-renderer codepath, or by upgrading
libplacebo's renderer to support a full YCbCr pipeline.

This unfortunately requires a very new version of libplacebo (unreleased
at time of writing) for timeline semaphore support. But the amount of
boilerplate needed to hack in backwards compatibility would have been
very unreasonable.
2021-11-12 14:45:36 +01:00
Limin Wang
ec6187b05b avfilter/src_movie: make the number of decode thread configurable
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-12 17:23:01 +08:00
Lynne
f705e9ea05
lavfi/vulkan: refactor, fix and fully implement multiple queues 2021-11-12 05:23:41 +01:00
Lynne
246f841b53
lavfi/glslang: migrate to the C API and robustify library detection
Finally, this is as close to usable as it gets for glslang.
Much faster to compile as well, and eliminates the need for a C++
compiler, which is great.
Also, changes to the resource limits won't break users, as we
can use designated initializers in C90.
2021-11-12 05:23:41 +01:00
Lynne
fef85c376a
lavfi/vulkan: use libavutil's vulkan loader
This finally fully eliminates the need to statically link to libvulkan!
2021-11-12 05:23:40 +01:00
Lynne
6bf9a6539e
vulkan: add support for encode and decode queues and refactor queue code
This simplifies and makes queue family picking simpler and more robust.
The requirements on the device context are relaxed. They made no sense
in the first place.

The video encode/decode extension is still in beta, at least on paper,
but I really doubt they'd change needing a separate queue family.
2021-11-12 05:23:36 +01:00
Lynne
dfc61800a2
lavfi/vulkan: port to using timeline semaphores 2021-11-12 03:36:46 +01:00
Paul B Mahol
047c362d3c avfilter/vf_nlmeans: add x86 SIMD 2021-11-11 21:54:46 +01:00
Paul B Mahol
aebdffb9c5 avfilter/vf_estdif: allow to change two more options 2021-11-11 21:54:40 +01:00
Limin Wang
afcf226b33 avfilter/af_atilt: use ff_filter_execute()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-11 21:54:17 +01:00
Paul B Mahol
a13646639f avfilter/vf_estdif: do some clip calculations only once in loop 2021-11-09 09:49:40 +01:00
Paul B Mahol
dcf83fd59d avfilter/vf_estdif: export distance cost as filter option 2021-11-09 09:49:39 +01:00
Paul B Mahol
45dc668aea avfilter/f_reverse: readjust frame timestamps for areverse 2021-11-07 20:47:21 +01:00
Paul B Mahol
0370c3e3d4 avfilter/af_adelay: use outlink where applicable 2021-11-07 20:47:21 +01:00
Roman Arzumanyan
08a501946f avfilter/scale_npp: add scale2ref_npp filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-11-03 19:06:14 +01:00
Paul B Mahol
bf9950446d avfilter/vf_chromanr: improve filtering results 2021-11-03 11:55:46 +01:00
Paul B Mahol
8164fe1139 avfilter: add huesaturation filter 2021-10-29 23:18:27 +02:00
Paul B Mahol
2b6d290fbf avfilter/vf_nlmeans: split wa struct
This will make x86 SIMD simpler and faster.
2021-10-29 18:42:29 +02:00
Paul B Mahol
eaca36d495 avfilter/vf_nlmeans: refactor line processing in preparation for x86 SIMD assembly 2021-10-29 18:42:29 +02:00
Paul B Mahol
38c86e7a02 avfilter/vf_nlmeans: avoid if () to help paralellization 2021-10-29 18:42:29 +02:00
Paul B Mahol
64d19411eb avfilter/vf_nlmeans: no need to print filter options at info level 2021-10-29 18:42:29 +02:00
Paul B Mahol
959ec353ce avfilter/vf_nlmeans: make access to pointer to lut faster 2021-10-29 18:42:29 +02:00
Paul B Mahol
81380d221c avfilter/vf_nlmeans: reduce scope of some variables 2021-10-29 18:42:29 +02:00
Jan Ekström
27c0dd5560 avfilter/vf_zscale: fix mapping of zimg_chroma_location_e to AVChromaLocation
The AVChromaLocation values are one higher than zimg's, not one
lower as the undefined value is set to zero (as opposed to zimg's
-1).
2021-10-28 23:13:51 +03:00
Jan Ekström
cd1d09e81b avfilter/vf_zscale: deduplicate output color information setting
This way a piece of logic is not missed in one location or the other,
such as the case with chroma location outside the if.
2021-10-28 23:13:51 +03:00
Paul B Mahol
8c2f142bd9 avfilter/vf_psnr/ssim: fix typos 2021-10-28 21:12:09 +02:00
Paul B Mahol
148c030395 avfilter/vf_histogram: add more color modes 2021-10-27 11:29:29 +02:00
Paul B Mahol
97b5b9dbea avfilter: split negate filter from lut filter
Using luts for negating is suboptimal.

FATE test changes because filter no longer clips values into limited color range.
2021-10-27 11:29:29 +02:00
Michael Niedermayer
069f7831a2 avfilter/vf_owdenoise: relicense my code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-24 16:54:36 +02:00
Paul B Mahol
9df3f147f5 avfilter/vf_v360: do not reset yaw/pitch/roll with reset_rot true 2021-10-24 14:08:10 +02:00
Paul B Mahol
9353d1a60f avfilter/vf_v360: replace deprecated FF_CEIL_RSHIFT() 2021-10-24 14:08:10 +02:00
Paul B Mahol
97cff84f10 avfilter/vf_dblur: add clipping 2021-10-23 23:53:51 +02:00
Paul B Mahol
2148934ce3 avfilter/vf_dblur: use lrintf() 2021-10-23 23:38:39 +02:00
Paul B Mahol
a586ce0a21 avfilter/vf_dblur: fix artifacts 2021-10-23 23:38:39 +02:00
Paul B Mahol
6c45d34e50 avfilter/vf_convolution: improve runtime support for convolution filter 2021-10-23 14:51:42 +02:00
Paul B Mahol
9e8bb9efd9 avfilter/vf_convolution: unbreak runtime planes option functionality
For non-convolution filters like sobel.
2021-10-23 14:51:42 +02:00
Paul B Mahol
eda2a50c8e avfilter/vf_selectivecolor: no need to use doubles 2021-10-22 13:57:42 +02:00
Paul B Mahol
7d463be590 avfilter/vf_bilateral: add slice threading support 2021-10-22 12:20:40 +02:00
Paul B Mahol
444cf3fca8 avfilter/vf_bilateral: add direct aka writable frame support 2021-10-22 09:36:54 +02:00
Paul B Mahol
cf0881bcfc avfilter/vf_bilateral: properly round float result 2021-10-21 22:02:58 +02:00
Paul B Mahol
4e4057e437 avfilter/vf_bilateral: remove unused arguments 2021-10-21 22:02:58 +02:00
Paul B Mahol
f0ad40b525 avfilter/vf_bilateral: remove unneeded multiplications 2021-10-21 22:02:58 +02:00
the.real.laplace@gmail.com
c13a2f701d avfilter/vf_eq: add support for alpha channel
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-10-21 14:13:03 +02:00
Limin Wang
b22b8e5489 avfilter/vf_showinfo: small adjustments for the HDR10+ dump
summary for the adjustments:
1, remove the extra "," in the ,}
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,}
to
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013}

2, add "," between the } and new field
} fraction_bright_pixels
to
}, fraction_bright_pixels

3, remove the extra space between "} }"
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,} }
to
...{0.2004,0.3001,0.4008,0.5005,0.6002,0.7009,0.8006,0.9013,}}

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-20 22:47:42 +08:00
Limin Wang
3253133382 avfilter/af_replaygain: use fabsf() instead of fabs()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-10-20 22:47:36 +08:00
Paul B Mahol
960efa94ff avfilter/vf_v360: make reset_rot option not lose its value
Unless -1 value is provided then rotation is reset single time.
2021-10-20 14:49:13 +02:00
Paul B Mahol
407acc0747 avfilter: add varblur video filter 2021-10-19 08:53:56 +02:00
Paul B Mahol
f7ddf4fc57 avfilter/af_alimiter: add timeline and commands support 2021-10-18 22:46:36 +02:00
Paul B Mahol
374d646930 avfilter/vf_fftdnoiz: fix missing funcionality 2021-10-18 21:34:08 +02:00