diff mbox series

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

Message ID AS8P250MB07442AF6C130D7EEA8F2FF478F5C2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 674f20813d14924e814fa1c68fe72aa2a79154bf
Headers show
Series [FFmpeg-devel,1/8] avutil/vulkan: Don't autoinclude vulkan_loader.h | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 3, 2024, 6:42 p.m. UTC
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@outlook.com>
---
 libavutil/vulkan_loader.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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[] = {