Commit Graph

12 Commits

Author SHA1 Message Date
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt 6d15643173 avfilter/internal: Don't include video.h
internal.h does not depend on video.h (and should not depend on it)
and therefore should not include video.h at all; instead all users
of video.h should include it directly.

Doing so also avoids unnecessary video.h inclusions in files that
don't need it, like most audio filters.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-07 09:21:13 +02:00
Lynne 59f21c051d
gblur_vulkan: port for the rewrite 2023-05-29 00:41:53 +02:00
Lynne 15de0af8f0
vulkan: allow alloc pNext in ff_vk_create_buf 2023-05-29 00:41:45 +02:00
Lynne b5e333bba7
vulkan: add pNext argument to ff_vk_create_buf() 2023-05-29 00:41:43 +02:00
Anton Khirnov 632c349931 lavfi: add a flag for filters able to work with hw_device_ctx
This way the caller can set it just on the filters that can make use of
it.
2023-03-24 10:16:51 +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
Lynne f6dd30df24
lavfi/vulkan: split off lavfi-specific code into vulkan_filter.c
The issue is that libavfilter depends on libavcodec, and when doing a
static build, if libavcodec also includes "libavfilter/vulkan.c", then
during link-time, compiling programs will fail as there would be multiple
definitions of the same symbols in both libavfilter and libavcodec's
object files.
Linkers are, however, more permitting if both files that include
a common file that's used as a template are one-to-one identical.
Hence, to make both files the same in the future, export all avfilter
specific functions to a separate file.
There is some work in progress to make templated files like this be
compiled only once, so this is not a long-term solution.

This also removes a macro that could be used to toggle SPIRV compilation
capability on #include-time, as this could cause the files to be different.
2021-11-19 16:47:26 +01:00
Lynne d1133e8c44
lavu/vulkan: move common Vulkan code from libavfilter to libavutil 2021-11-19 13:44:45 +01:00
Limin Wang be43eacb7e avfilter/vf_gblur_vulkan: Fix use of uninitialized value
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-11-17 06:56:29 +01:00
Wu Jianhua e95969c07e avfilter/gblur_vulkan: fix memory leak
Whether failed or not, the block of codes labeled with fail should
be always run to ensure the av_free(kernel_def) is executed.

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-11-17 04:24:33 +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