[FFmpeg-devel] [PATCH 8/8] avutil/vulkan: Move functions only used by lavfi to it
Lynne
dev at lynne.ee
Sun Mar 3 23:49:12 EET 2024
Mar 3, 2024, 19:42 by andreas.rheinhardt at outlook.com:
> lavu/vulkan.c is duplicated into lavfi, lavc and lavu,
> yet lots of functions in it are only used by lavfi.
> This commit moves them to lavfi, saving 6544B of .text
> from both lavc and lavu as well as some .rodata and
> .data.rel.ro (in total 7880B each for lavc and lavu).
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> One could also move this stuff to new files; e.g. both the shader
> and pipeline parts could be moved into files of their own
> which would then only be compiled for lavfi.
>
> libavfilter/vulkan_filter.c | 764 +++++++++++++++++++++++++++++++++++
> libavfilter/vulkan_filter.h | 177 ++++++++
> libavfilter/vulkan_glslang.c | 1 +
> libavfilter/vulkan_shaderc.c | 1 +
> libavutil/vulkan.c | 760 ----------------------------------
> libavutil/vulkan.h | 176 --------
> 6 files changed, 943 insertions(+), 936 deletions(-)
>
Patchset LGTM, except, sadly, the last commit.
We will need to implement shader-based film grain
application as Intel hardware does not support it,
so most of the functions will be used.
Also, a GSoC project I have to implement shader-based
encoders also depends on this code.
6k is a lot, but anyone serious about weight should
be using LTO, which would get rid of it.
More information about the ffmpeg-devel
mailing list