Commit Graph

624 Commits

Author SHA1 Message Date
Lynne 160a415e22
lavfi: add nlmeans_vulkan filter 2023-05-29 00:42:01 +02:00
Lynne 7cfd7e4af4
lavfi: add color_vulkan filter 2023-05-29 00:42:00 +02:00
Lynne 09dc9193ea
lavfi: add bwdif_vulkan 2023-05-29 00:41:56 +02:00
Devin Heitmueller 0e12cdc69c avfilter/vf_ccrepack: Add new filter to repack CEA-708 side data
THis filter can correct certain issues seen from upstream sources
where the cc_count is not properly set or the CEA-608 tuples are
not at the start of the payload as expected.

Make use of the ccfifo to extract and immediately repack the CEA-708
side data, thereby removing any extra padding and ensuring the 608
tuples are at the front of the payload.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2023-05-11 22:06:20 +08:00
Paul B Mahol 3475c8342c avfilter: add zoneplate video test source 2023-05-09 08:48:44 +02:00
Paul B Mahol a2f4adf680 avfilter: add arls filter 2023-04-30 11:34:35 +02:00
Paul B Mahol 19148a5b9f avfilter: add FIR equalizer coefficients source filter 2023-04-27 21:45:57 +02:00
Haihao Xiang 0f407cdea2 avfilter: add QSV variants of the stack filters
Include hstack_qsv, vstack_qsv and xstack_qsv. They may accept input
streams with different sizes.

Examples:
$ ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][0:v]hstack_qsv" -f null -

$ ffmpeg \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-hwaccel qsv -hwaccel_output_format qsv -i input.mp4 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_qsv=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-f null -

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-02-16 11:15:50 +08:00
Haihao Xiang aecfec6f80 avfilter: add VA-API variants of the stack filters
Include hstack_vaapi, vstack_vaapi and xstack_vaapi. They may accept
input streams with different sizes.  libva2 (VA-API 1.0+) is required.

Example:
$ ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i input.h265 -filter_complex
"[0:v][0:v]hstack_vaapi" -c:v h264_vaapi out.h264

$ ffmpeg \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-hwaccel vaapi -hwaccel_output_format vaapi -i input.h264 \
-filter_complex "[0:v][1:v][2:v][3:v]xstack_vaapi=inputs=4:fill=0x000000:layout=0_0_1920x1080|w0_0_1920x1080|0_h0_1920x1080|w0_h0_1920x1080" \
-c:v hevc_vaapi out.h265

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-01-30 08:48:58 +08:00
Shannon Chen ed519a3690 lavfi: Add vf_ssim360 filter
Customized SSIM for various projections (and stereo formats) of 360 images and videos.

Further contributions by:
Ashok Mathew Kuruvilla
Matthieu Patou
Yu-Hui Wu
Anton Khirnov

Suggested-By: ffmpeg@fb.com
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-01-28 12:00:27 +01:00
Paul B Mahol ac7d21284b avfilter: add fractional delay IR source filter 2023-01-16 09:59:31 +01:00
Paul B Mahol 3b66757d7d avfilter: add adrc filter 2022-12-19 20:43:58 +01:00
Paul B Mahol f0f19f3d3d avfilter: add corr video filter 2022-12-08 13:03:42 +01:00
Paul B Mahol d34c1b389e avfilter: add showcwt multimedia filter 2022-11-28 23:18:03 +01:00
Paul B Mahol 5c2a29cf72 avfilter: add backgroundkey video filter 2022-11-05 10:52:39 +01:00
Roman Arzumanyan cc81ab283c libavfilter: add vf_colorrange_cuda, CUDA-accelerated color conversion filter
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-09-13 22:59:30 +02:00
Mohamed Khaled Mohamed 1a5cd79f51 avfilter: add bilateral_cuda filter
GSoC 2022

Signed-off-by: Mohamed Khaled <mohamed.elbassiony00@eng-st.cu.edu.eg>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-09-03 15:18:56 +02:00
Paul B Mahol d1513e7f9c avfilter: add 3D scope multimedia filter 2022-09-03 14:44:59 +02:00
Timo Rothenpieler f611255480 avfilter: add vsrc_ddagrab 2022-07-18 02:08:27 +02:00
Mohamed Khaled Mohamed b1648150b2 avfilter: add chromakey_cuda filter
GSoC'22

libavfilter/vf_chromakey_cuda.cu:the CUDA kernel for the filter
libavfilter/vf_chromakey_cuda.c: the C side that calls the kernel and gets user input
libavfilter/allfilters.c: added the filter to it
libavfilter/Makefile: added the filter to it
cuda/cuda_runtime.h: added two math CUDA functions that are used in the filter

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-07-10 17:20:15 +02:00
Paul B Mahol 6ed9eaf664 avfilter: add remap opencl filter 2022-07-07 17:52:32 +02:00
Paul B Mahol d39f9feddc avfilter: add virtualbass filter 2022-06-16 10:23:30 +02:00
Paul B Mahol 525f83becd avfilter: add tiltshelf audio filter 2022-05-29 12:37:46 +02:00
Thilo Borgmann 9cb9da62a3 avfilter: Add blockdetect filter 2022-05-24 11:21:36 +02:00
Paul B Mahol 767f66ea5d avfilter: add multiply video filter 2022-05-05 19:07:10 +02:00
Thilo Borgmann b23208826b lavfi: Add blurdetect filter 2022-04-25 20:52:15 +02:00
Niklas Haas 2cb0cebd11 lavfi: add vf_iccdetect for parsing ICC profiles
This filter is designed to parse embedded ICC profiles and attempt
extracting colorspace tags from them, updating the AVFrame metadata
accordingly.

This is intentionally made a separate filter, rather than being part of
libavcodec itself, so that it's an opt-in behavior for the time being.
This also gives the user more flexibility to e.g. first attach an ICC
profile and then also set the colorspace tags from it.

This makes #9673 possible, though not automatic.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Niklas Haas 5cfeaeef0c lavfi: add vf_iccgen for generating ICC profiles
This filter is designed to specifically cover the task of generating ICC
profiles (and attaching them to output frames) on demand. Other tasks,
such as ICC profile loading/stripping, or ICC profile application, are
better left to separate filters (or included into e.g. vf_setparams).

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-23 21:51:55 +02:00
Paul B Mahol 16463520d9 avfilter: add colorchart video filter 2022-04-23 11:00:42 +02:00
Paul B Mahol 43ea19fef4 avfilter: add colormap video filter 2022-04-23 10:59:34 +02:00
Paul B Mahol 391ce570c8 avfilter: add pixelize video filter 2022-04-14 22:37:21 +02:00
Paul B Mahol 7e81295488 avfilter: add feedback video filter 2022-04-14 22:29:46 +02:00
Paul B Mahol 1047fedd0f avfilter: add Audio Video Sync Test filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2022-04-12 10:51:46 +02:00
Boris Baracaldo 80831e742b lavfilter: Add SITI filter
Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video, as defined
in ITU-T P.910: Subjective video quality assessment methods for multimedia
applications.
2022-04-01 20:27:43 +02:00
Paul B Mahol f05c52985c avfilter: add dialogue enhance audio filter 2022-02-12 12:47:36 +01:00
Xinpeng Sun 516496069d avfilter: add overlay vaapi filter
Overlay one video on the top of another.

It takes two inputs and has one output. The first input is the "main" video on
which the second input is overlaid. This filter requires same memory layout for
all the inputs.

An example command to use this filter to overlay overlay.mp4 at the top-left
corner of the main.mp4:

ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 \
-hwaccel vaapi -hwaccel_device foo -hwaccel_output_format vaapi -c:v h264 -i main.mp4 \
-hwaccel vaapi -hwaccel_device foo -hwaccel_output_format vaapi -c:v h264 -i overlay.mp4 \
-filter_complex "[0:v][1:v]overlay_vaapi=0:0:100💯0.5[t1]" \
-map "[t1]" -an -c:v h264_vaapi -y out_vaapi.mp4

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Zachary Zhou <zachary.zhou@intel.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-17 16:32:17 +08:00
Wu Jianhua 9a194252c7 avfilter: add a blend_vulkan filter
This commit adds a blend_vulkan filter and a normal blend mode, and
reserves support for introducing the blend modes in the future.

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=normal,\
pseudocolor=preset=turbo" -y normal_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=normal,hwdownload,\
format=yuv420p,pseudocolor=preset=turbo" -y normal_vulkan.jpg

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2022-01-05 15:16:22 +01:00
Andreas Rheinhardt ab54956edd configure: Add new mpegvideodec CONFIG_EXTRA
This allows to remove the spurious dependencies of mpegvideo encoders
on error_resilience; some other components that do not use mpegvideo
to its fullest turned out to not need it either.

Adding a new CONFIG_EXTRA needs a reconfigure to take effect.
In order to force this a few unnecessary headers from lavfi/allfilters.c
have been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-01-04 16:28:55 +01:00
Paul B Mahol 209488ccb0 avfilter: add anlmf filter 2021-12-25 11:32:41 +01:00
Aman Karmani 4ac869ca2a avfilter: add vf_yadif_videotoolbox
deinterlaces CVPixelBuffers, i.e. AV_PIX_FMT_VIDEOTOOLBOX frames

for example, an interlaced mpeg2 video can be decoded by avcodec,
uploaded into a CVPixelBuffer, deinterlaced by Metal, and then
encoded to h264 by VideoToolbox as follows:

    ffmpeg \
           -init_hw_device videotoolbox \
           -i interlaced.ts \
           -vf hwupload,yadif_videotoolbox \
           -c:v h264_videotoolbox \
           -b:v 2000k \
           -c:a copy \
           -y progressive.ts

(note that uploading AVFrame into CVPixelBuffer via hwupload
 requires 504c60660d)

this work is sponsored by Fancy Bits LLC

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Aman Karmani <aman@tmm1.net>
2021-12-18 11:57:31 -08:00
Paul B Mahol 996b13fac4 avfilter: add audio dynamic equalizer filter 2021-12-12 10:47:28 +01:00
Wu Jianhua 58816f6927 avfilter: add a transpose_vulkan filter
The following command is on how to apply transpose_vulkan filter:
ffmpeg -init_hw_device vulkan -i input.264 -vf \
hwupload=extra_hw_frames=16,transpose_vulkan,hwdownload,format=yuv420p output.264

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-12-10 16:48:20 +01:00
Anton Khirnov 944c34a94c lavfi/allfilters: move vf_chromaber_vulkan to video section 2021-12-04 14:06:42 +01:00
Wu Jianhua bdfb0e4da4 avfilter: add a flip_vulkan filter
This filter flips the input video both horizontally and vertically
in one compute pipeline, and it's no need to use two pipelines for
hflip_vulkan,vflip_vulkan anymore.

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-12-02 11:06:24 +01:00
Paul B Mahol fc9a686688 avfilter: add audio dynamic smooth filter 2021-12-02 09:39:27 +01:00
Paul B Mahol 11b11577fe avfilter: add audio spectral stats filter 2021-12-02 09:35:36 +01:00
Wu Jianhua 3188b606d7 avfilter: add a vflip_vulkan filter
The following command is on how to apply vflip_vulkan filter:

ffmpeg -init_hw_device vulkan -i input.264 -vf hwupload=extra_hw_frames=16,vflip_vulkan,hwdownload,format=yuv420p output.264

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-11-19 16:47:48 +01:00
Wu Jianhua d313cb5a2f avfilter: add a hflip_vulkan filter
The following command is on how to apply hflip_vulkan filter:

ffmpeg -init_hw_device vulkan -i input.264 -vf hwupload=extra_hw_frames=16,hflip_vulkan,hwdownload,format=yuv420p output.264

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-11-19 16:47:48 +01:00
Paul B Mahol d401b1ccec avfilter: add colorspectrum source video filter 2021-11-16 20:41:39 +01:00
Wu Jianhua 5fc935c7fa libavfilter: add a gblur_vulkan filter
This commit adds a powerful and customizable gblur Vulkan filter,
which provides a maximum 127x127 kernel size of Gaussian Filter.
The size could be adjusted by requirements on quality or performance.

The following command is on how to apply gblur_vulkan filter:

ffmpeg -init_hw_device vulkan -i input.264 -vf hwupload=extra_hw_frames=16,gblur_vulkan,hwdownload,format=yuv420p output.264

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-11-16 10:32:21 +01:00