Commit Graph

11061 Commits

Author SHA1 Message Date
Tobias Rapp
6747cda5ca avfilter/vf_overlay: Add support for yuv444p10 pixel format 2023-07-20 16:49:05 +02:00
Paul B Mahol
72390c7d80 avfilter/vf_pseudocolor: add heat preset 2023-07-19 23:42:03 +02:00
Paul B Mahol
5d8879208c avfilter/vf_pseudocolor: add cool preset 2023-07-19 23:42:01 +02:00
Paul B Mahol
c183f840fa avfilter/af_axcorrelate: add another algorithm for calculation
Rewrite EOF logic while here.
2023-07-15 23:41:09 +02:00
Timo Rothenpieler
3c73200be2 avfilter/vsrc_ddagrab: calculate pointer position on rotated screens 2023-07-15 18:48:49 +02:00
Timo Rothenpieler
da94c6a00c avfilter/vsrc_ddagrab: account for mouse-only frames during probing 2023-07-15 17:06:58 +02:00
Niklas Haas
138d3ac15d lavfi/vf_libplacebo: test for renderable pixel formats
Requires a new upstream function to test not for *import* support on a
given output pixel format, but also whether we can render to it.

Fixes: https://github.com/haasn/libplacebo/issues/173
2023-07-15 13:37:54 +02:00
Paul B Mahol
ef3b5789ec avfilter/af_atempo: improve RE_MALLOC_OR_FAIL macro
Make use of third parameter of av_calloc() call.
2023-07-15 10:52:15 +02:00
Paul B Mahol
374184a4dc avfilter/split: fix EOF passing to inlink 2023-07-14 00:46:45 +02:00
Paul B Mahol
7430ee2b8b avfilter/avf_showcwt: add rotation option 2023-07-13 00:11:36 +02:00
Paul B Mahol
422bfdc4ae avfilter/avf_showcwt: add bar display support 2023-07-13 00:11:34 +02:00
Anton Khirnov
fcc33ada47 lavfi: make sure frame SAR matches the link value 2023-07-11 19:28:18 +02:00
Anton Khirnov
bbff143b07 lavfi/src_movie: stop using AV_CODEC_FLAG_COPY_OPAQUE
That feature is overkill for a constant pointer to AVFilterLink which
can be stored in AVCodecContext.opaque (indirectly, because the link is
not allocated yet at the time the codec is opened).

This also avoids leaking non-NULL AVFrame.opaque to callers.
2023-07-11 19:14:23 +02:00
Paul B Mahol
f3896a148e avfilter/avf_showcwt: fix frame slide output 2023-07-10 18:57:14 +02:00
Paul B Mahol
1324698ff3 avfilter/avf_showcwt: simplify EOF checking 2023-07-10 18:57:13 +02:00
Paul B Mahol
2f2f76def7 avfilter/avf_showcwt: optimize multiplication with kernel 2023-07-10 18:57:12 +02:00
Paul B Mahol
587189cdb9 avfilter/avf_showcwt: simplify cache handling 2023-07-10 18:57:10 +02:00
Paul B Mahol
2c4fa968b6 avfilter/avf_showcwt: use av_rescale() 2023-07-10 18:57:08 +02:00
Paul B Mahol
fcbee7efdf avfilter/avf_showcwt: add qdrt frequency scale 2023-07-09 20:53:55 +02:00
Paul B Mahol
aee8689ba5 avfilter/avf_showcwt: add cbrt frequency scale 2023-07-09 20:53:54 +02:00
Paul B Mahol
7f23b72dde avfilter/avf_showcwt: add sqrt frequency scale 2023-07-09 20:53:52 +02:00
Paul B Mahol
20b8688092 avfilter/adynamicequalizer_template: fix peak filter 2023-07-09 11:58:22 +02:00
Paul B Mahol
889c2529cc avfilter/af_adynamicequalizer: simplify calculations 2023-07-09 11:58:03 +02:00
Niklas Haas
13e9899014 lavfi/vf_libplacebo: add contrast recovery options
New upstream option. Enabled by default in the high-quality preset
upstream, so enable it by default here.
2023-07-08 12:54:49 +02:00
Niklas Haas
2e83ba001d lavfi/vf_libplacebo: deprecate hybrid_mix option
Deprecated upstream in libplacebo v6.292.
2023-07-08 12:41:45 +02:00
John Cox
f00222e81f avfilter/vf_bwdif: Add neon for filter_line3
Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
697533e76d avfilter/vf_bwdif: Add a filter_line3 method for optimisation
Add an optional filter_line3 to the available optimisations.

filter_line3 is equivalent to filter_line, memcpy, filter_line

filter_line shares quite a number of loads and some calculations in
common with its next iteration and testing shows that using aarch64
neon filter_line3s performance is 30% better than two filter_lines
and a memcpy.

Adds a test for vf_bwdif filter_line3 to checkasm

Rounds job start lines down to a multiple of 4. This means that if
filter_line3 exists then filter_line will not sometimes be called
once at the end of a slice depending on thread count. The final slice
may do up to 3 extra lines but filter_edge is faster than filter_line
so it is unlikely to create any noticable thread load variation.

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
94cb94a2c0 avfilter/vf_bwdif: Add neon for filter_line
Exports C filter_line needed for tail fixup of neon code
Adds neon for filter_line

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
8130df83e0 avfilter/vf_bwdif: Add neon for filter_edge
Adds clip and spatial macros for aarch64 neon
Exports C filter_edge needed for tail fixup of neon code
Adds neon for filter_edge

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
John Cox
5075cfb4e6 avfilter/vf_bwdif: Add neon for filter_intra
Adds an outline for aarch neon functions
Adds common macros and consts for aarch64 neon
Exports C filter_intra needed for tail fixup of neon code
Adds neon for filter_intra

Signed-off-by: John Cox <jc@kynesim.co.uk>
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-07-06 00:21:05 +03:00
Paul B Mahol
3bbb1c023b avfilter/avf_showcwt: fix offset to take into initial delay
Syncs audio with video.
2023-07-05 23:02:08 +02:00
Paul B Mahol
0cdfe46f4e avfilter/avf_showcwt: fix output frame pts if inlink timebase does not match sample rate 2023-07-05 22:56:05 +02:00
Paul B Mahol
a196d02e86 avfilter/af_aresample: switch to activate 2023-07-05 21:42:22 +02:00
Haihao Xiang
ca939ebb4f lavfi/tonemap_vaapi: remove HDR metadata
The HDR metadata should be removed after HDR to SDR conversion,
otherwise the output frame still has HDR side data.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-07-05 09:34:19 +08:00
Paul B Mahol
8622dcb39b avfilter/adynamicequalizer_template: refactor and improve output 2023-07-05 01:53:04 +02:00
Lynne
9ff834c2a0
bwdif_vulkan: clamp the temporarily interpolated sample spatially
This makes the filter output match that of the C version.
It was left intentionally while we figured out if it was better
or not, and while it makes certain samples better, it makes static
samples jump around slightly.
2023-07-04 00:52:19 +02:00
Andreas Rheinhardt
652add3a6d avfilter/vf_ccrepack: Constify filter
The discrepancy between the definition and the declaration
in allfilters.c is actually UB.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-06-29 20:22:51 +02:00
Fei Wang
13a10fe892 lavfi/{denoise, procamp, scale, sharpness}_vaapi: Add passthrough mode
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-06-25 10:01:51 +08:00
Fei Wang
f2d45bc565 lavfi/vaapi: Add some debug message
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-06-25 10:01:51 +08:00
Fei Wang
f565da8346 lavfi/vaapi: Add function to get surface ID from AVFrame
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-06-25 10:01:51 +08:00
Niklas Haas
5fdb12d6a0 lavfi/vf_libplacebo: simplify SAR normalization
The old logic was trying to be excessively clever in "deducing" that the
user wanted to stretch/scale the image when ow/oh differed from iw/ih
aspect ratio. But this is almost surely unintended except in
pathological cases, and in those cases users should simply disable
normalize_sar and do all the stretching/scaling logic themselves. This
is especially important in multi-input mode, where the canvas may be
vastly different from the input dimensions of any stream. Also, passing
through input 0 SAR in multi-input mode is arbitrary and nearly useless,
so again force output SAR to 1:1 here.
2023-06-23 15:18:25 +02:00
Niklas Haas
e998d0a4f7 lavfi/vf_libplacebo: allow pos_w to depend on pos_h
Ditto for crop_w/crop_h. Requires simply repeating the evaluation of the
first variable to be evaluated.
2023-06-20 17:09:58 +02:00
Niklas Haas
f998a618ba lavfi/vf_libplacebo: add nb_inputs option
To control the number of inputs.
2023-06-20 17:09:58 +02:00
Niklas Haas
9049ea6763 lavfi/vf_libplacebo: set time_base/frame_rate dynamically
Use the gcd of all input timebases to ensure PTS accuracy. For the
framerate, just pick the highest of all the inputs, under the assumption
that we will render frames with approximately this frequency. Of course,
this is not 100% accurate, in particular if the input frames are badly
misaligned. But this field is informational to begin with.

Importantly, it covers the "common" case of combining high FPS and low
FPS streams with aligned frames.
2023-06-20 17:09:58 +02:00
Niklas Haas
1b2c6c9a03 lavfi/vf_libplacebo: also skip cache if in FPS == out FPS
Fixes an oversight in the previous code which should have been >=, not >.
2023-06-20 17:09:58 +02:00
Niklas Haas
618b72d4b4 lavfi/vf_libplacebo: skip cache selectively per-input
It may be the case that we want to skip the single frame cache for some
inputs but not others.
2023-06-20 17:09:58 +02:00
Niklas Haas
015c3b659e lavfi/vf_libplacebo: set format list for all inputs 2023-06-20 17:09:58 +02:00
Niklas Haas
5989719e87 lavfi/vf_libplacebo: add in_idx variable
To allow placing an input dynamically, as a function of the input index.
2023-06-20 17:09:58 +02:00
Niklas Haas
7645c8df66 lavfi/vf_libplacebo: make input-dependent vars dynamic
Because these can differ based on the input, for multiple inputs.
2023-06-20 17:09:58 +02:00
Niklas Haas
d625010acd lavfi/vf_libplacebo: generalize frame update to multiple inputs
In the event that some frame mixes are OK while others are not, the
priority goes:

1. Errors in updating any frame -> return error
2. Any input incomplete -> request frames and return
3. Any inputs OK -> ignore EOF streams and render remaining inputs
4. No inputs OK -> set output to most recent status

This logic ensures that we can continue rendering the remaining streams,
no matter which streams reach their end of life, until we have no
streams left at which point we forward the last EOF.
2023-06-20 17:09:58 +02:00