[FFmpeg-devel] [PATCH 3/8] avutil/vulkan_loader: Use smaller types

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Mar 3 20:42:45 EET 2024


Saves 16B per entry here (four of these 16 bytes are padding);
leads to 1776 B of savings in each file that uses
ff_vk_load_functions().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavutil/vulkan_loader.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/vulkan_loader.h b/libavutil/vulkan_loader.h
index 07b6316089..37ce339e1d 100644
--- a/libavutil/vulkan_loader.h
+++ b/libavutil/vulkan_loader.h
@@ -97,9 +97,9 @@ static inline int ff_vk_load_functions(AVHWDeviceContext *ctx,
     AVVulkanDeviceContext *hwctx = ctx->hwctx;
 
     static const struct FunctionLoadInfo {
-        int req_inst;
-        int req_dev;
-        size_t struct_offset;
+        char req_inst;
+        char req_dev;
+        uint16_t struct_offset;
         FFVulkanExtensions ext_flag;
         const char *name;
     } vk_load_info[] = {
-- 
2.40.1



More information about the ffmpeg-devel mailing list