Commit Graph

10602 Commits

Author SHA1 Message Date
Paul B Mahol
3879555cd5 avfilter/afir_template: make IR transitions artifacts free 2023-01-02 15:33:57 +01:00
Paul B Mahol
eeb280f351 avfilter/af_afir: fix prev_selir variable change in private filter context 2022-12-25 20:39:54 +01:00
Paul B Mahol
eaba6bfc51 avfilter/afir_template: reduce memset overhead a little 2022-12-25 20:39:54 +01:00
Paul B Mahol
8906145cdf avfilter/af_afir: increase max partition size 2022-12-25 20:39:54 +01:00
Paul B Mahol
64ddf04460 avfilter/af_afir: reduce memory usage 2022-12-25 20:39:54 +01:00
Paul B Mahol
9498bc7c32 avfilter/af_afir: make dry/wet runtime options 2022-12-22 17:09:15 +01:00
Paul B Mahol
54ebe1e8dc avfilter/afir_template: skip useless moving of samples 2022-12-22 17:09:15 +01:00
Paul B Mahol
bc1fc1be99 avfilter/afir_template: stop using hack to zero out data 2022-12-22 17:09:15 +01:00
Niklas Haas
a69b08790b avfilter/vf_tinterlace: support full-range YUV
This filter, when used in the "pad" mode, currently makes the
distinction between limited and full range solely by testing for YUVJ
pixel formats at link setup time. This is deprecated and should be
improved to perform the detection based on the per-frame metadata.

In order to make this distinction based on color range metadata, which
is only known at the time of filtering frames, for simplicity, we simply
allocate two copies of the "black" frame - one for limited range and the
other for full range metadata. This could be done more dynamically (e.g.
as-needed or simply by blitting the appropriate pixel value directly),
but this change is relatively simple and preserves the structure of the
existing code.

This commit actually fixes a bug in FATE - the new output is correct for
the first time. The previous md5 ref was of a frame that incorrectly
combined full-range pixel data with limited-range black fields. The
corresponding result has been updated.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-12-20 14:02:37 +01:00
Niklas Haas
8e2f61ef04 avfilter/vf_blackdetect: support full-range YUV
This filter currently makes the distinction between limited and full
range by testing for the deprecated YUVJ pixel formats at link setup
time. This is deprecated and should be improved to perform the detection
based on the per-frame metadata.

Rewrite it to calculate the black pixel threshold at the time of
filtering a frame, when metadata about the frame's color range is known.
Doing it this way has the small side benefit of being able to handle
streams with variable metadata, and is not a meaningful performance
cost.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-12-20 14:02:37 +01:00
Paul B Mahol
3b66757d7d avfilter: add adrc filter 2022-12-19 20:43:58 +01:00
Paul B Mahol
744100af62 avfilter/af_headphone: properly initialize scale 2022-12-19 18:45:56 +01:00
mail@nodoa.me
38b837e0e1 avfilter/vf_decimate: add mixed option to process input only partially to be decimated
Enabling the option will only decimate frames below dupthresh and output at
variable frame rate.
2022-12-19 16:24:25 +01:00
Paul B Mahol
a350e68c83 avfilter/af_afir: fix some misc low priority issues
Remove double ;; and dead store.
2022-12-18 23:53:19 +01:00
Paul B Mahol
8c75e5fdd3 avfilter/af_afir: improve output when IR switching at runtime
Also improve normalization and add more gtype modes
2022-12-18 19:58:12 +01:00
Saliev, Rafik F
8ad988ac37 libavfilter/dnn: fix openvino async mode
Bugfix: The OpenVino DNN backend in the 'async' mode sets
'task->inference_done' to 'complete' prior to data copy from
OpenVino output buffer to task's output frame.
This order causes task destroy in ff_dnn_get_result_common()
prior to model output processing.

Signed-off-by: Rafik Saliev <rafik.f.saliev@intel.com>
2022-12-17 09:55:14 +08:00
Paul B Mahol
69ac78da9b avfilter/afir_template: avoid indirect accessing nb_partitions value 2022-12-12 20:29:07 +01:00
Paul B Mahol
a73f4ca49b avfilter/afir_template: skip wet gain if its 1 2022-12-12 20:29:07 +01:00
Paul B Mahol
91abbb9d02 avfilter/af_afir: reduce output gain with default parameters
It was unreasonably high. Also change scaling to reduce
rare quantization errors.
2022-12-12 20:29:07 +01:00
Paul B Mahol
8556006984 avfilter/af_afir: improve output quality with small minp
Remove direct convolution implementation as its give worse
results. Simplifies code too.
2022-12-11 18:33:24 +01:00
Paul B Mahol
442bbdb3c5 avfilter/drawutils: rgb48/bgr48 is supported 2022-12-10 14:57:05 +01:00
Paul B Mahol
f0f19f3d3d avfilter: add corr video filter 2022-12-08 13:03:42 +01:00
Haihao Xiang
4061c22428 lavfi/vf_scale_qsv: remove PI, PHI and E
PI, PHI and E are defined in libavutil/eval.c, and user may use these
constants for scale_qsv filter, so we needn't re-define these variables
in vf_scale_qsv.c

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-08 14:29:23 +08:00
Haihao Xiang
3552dba0e1 lavfi/vf_vpp_qsv: accept P010 input in system memory
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-08 14:25:52 +08:00
Haihao Xiang
e5faa1d50c lavfi/vf_vpp_qsv: allow user to set scale_mode with constants
$ ffmpeg -f lavfi -i testsrc -vf "format=nv12,vpp_qsv=scale_mode=hq" -f
null -

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-08 14:24:21 +08:00
Haihao Xiang
d51edd225d lavfi/vf_vpp_qsv: use macros for extra mfx parameter
Make it easy to add new extra mfx parameter buffer. No functional
change.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-08 14:22:12 +08:00
Wenbin Chen
20f2941191 libavfilter/qsvvpp: Change the alignment to meet the requirement of YUV420P format
When process yuv420 frames, FFmpeg uses same alignment on Y/U/V
planes. VPL and MSDK use Y plane's pitch / 2 as U/V planes's
pitch, which makes U/V planes 16-bytes aligned. We need to set
a separate alignment to meet runtime's behaviour.

Now alignment is changed to 16 so that the linesizes of U/V planes
meet the requirment of VPL/MSDK. Add get_buffer.video callback to
qsv filters to change the default get_buffer behaviour.

Now the commandline works fine:
ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 3082x1884 \
-i ./3082x1884.yuv -vf 'vpp_qsv=w=2466:h=1508' -f rawvideo \
-pix_fmt yuv420p 2466_1508.yuv

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-12-08 14:21:07 +08:00
Paul B Mahol
f2e0351b77 avfilter/vf_vif: add missing framesync options 2022-12-07 12:23:16 +01:00
Paul B Mahol
cb9ab38c52 avfilter/vf_chromanr: split inner loops
Makes overall faster processing in default case.
2022-12-07 00:57:25 +01:00
Paul B Mahol
cc11afe502 avfilter/avf_showvolume: make rms meter actually get rms of whole frame 2022-12-06 17:31:56 +01:00
Paul B Mahol
520111c610 avfilter/vf_thumbnail: allow to change stats log level 2022-12-05 21:08:02 +01:00
Paul B Mahol
46642ceeaf avfilter/vf_thumbnail: optimize planar processing path 2022-12-05 21:07:11 +01:00
Paul B Mahol
6c814093d8 avfilter/vf_bm3d: switch to TX from lavu 2022-12-04 23:02:07 +01:00
Timo Rothenpieler
ee650398ec avfilter/vf_libplacebo: ensure filter hwdevice is a vulkan one
Before this, the filter blindly casts to AVVulkanDeviceContext and
passes invalid values to libplacebo if it's not.
2022-12-04 15:22:13 +01:00
Paul B Mahol
fc016fd665 avfilter/vf_exposure: ensure that scale is always > 0 2022-12-04 13:22:36 +01:00
Paul B Mahol
ec32c62cad avfilter/avf_showcwt: write also to alpha plane if available 2022-12-04 11:18:48 +01:00
Paul B Mahol
7bf74f909d avfilter/af_afftdn: fix invalid duplicated use of sizeof() 2022-12-03 21:28:54 +01:00
Paul B Mahol
754fa305fa avfilter/af_astats: accessing outlink in uninit is not valid 2022-12-03 17:32:07 +01:00
Paul B Mahol
e69909342e avfilter/avf_showcwt: fix logic mistake 2022-12-03 12:47:02 +01:00
Paul B Mahol
6b368bcb85 avfilter/af_apsyclip: add copy_props() call 2022-12-01 19:50:54 +01:00
Paul B Mahol
4d38d4607c avfilter/af_astats: print stats in case nb_samples is 0
Happens with special function only.
2022-12-01 19:21:11 +01:00
Marvin Scholz
fcbdd145cd avfilter/f_metadata: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz
492b45cb19 avfilter/vf_libvmaf: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz
d5d6e5ccec avfilter/vf_coreimage: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Marvin Scholz
1cf526c37a avfilter/vf_scale: use av_dict_iterate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-12-01 11:21:14 +01:00
Haihao Xiang
0ae459176b lavfi/vf_vpp_qsv: scale_mode can be applied to color conversion
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-01 09:40:40 +08:00
Haihao Xiang
7a856588dc lavfi/qsvvpp: provide a default framerate if needed
VPP in the SDK requires the frame rate to be set to a valid value,
otherwise init will fail, so always set a default framerate when the
input link doesn't have a valid framerate.

Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-01 09:40:31 +08:00
Haihao Xiang
51bad2e6a7 lavfi/qsvvpp: avoid overriding the returned value
It means more than one output is ready when
MFXVideoVPP_RunFrameVPPAsync() returns MFX_ERR_MORE_SURFACE [1].
Currently the returned value from MFXVideoVPP_RunFrameVPPAsync() might
be overridden, so the check of 'ret == MFX_ERR_MORE_SURFACE' is always
false when MFX_ERR_MORE_SURFACE is returned from
MFXVideoVPP_RunFrameVPPAsync()

[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#video-processing-procedures

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-12-01 09:39:32 +08:00
Chen,Wenbin
50575e24be lavfi/qsvvpp: change the output frame's width and height
Make sure the size of the output frame always matches the agreed upon
image size.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-12-01 09:39:32 +08:00
Paul B Mahol
14e6ca17e1 avfilter/af_astats: do not give output for 0 samples 2022-11-30 21:19:49 +01:00