From 1496ce8f6bae75bd6c00c4d7628a2326b7115df6 Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 23 Jan 2024 17:24:12 -0300 Subject: [PATCH] avcodec/vvc_ctu: align motion vector fields Should fix "member access within misaligned address 0xf00 for type 'const union av_alias64', which requires 8 byte alignment" errors as reported by GCC ubsan. Signed-off-by: James Almer --- libavcodec/vvc/vvc_ctu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc/vvc_ctu.h b/libavcodec/vvc/vvc_ctu.h index 5f2ad62676..91b4ed14a1 100644 --- a/libavcodec/vvc/vvc_ctu.h +++ b/libavcodec/vvc/vvc_ctu.h @@ -193,7 +193,7 @@ typedef struct Mv { } Mv; typedef struct MvField { - DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 + DECLARE_ALIGNED(8, Mv, mv)[2]; ///< mvL0, vvL1 int8_t ref_idx[2]; ///< refIdxL0, refIdxL1 uint8_t hpel_if_idx; ///< hpelIfIdx uint8_t bcw_idx; ///< bcwIdx @@ -202,7 +202,7 @@ typedef struct MvField { } MvField; typedef struct DMVRInfo { - DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 + DECLARE_ALIGNED(8, Mv, mv)[2]; ///< mvL0, vvL1 uint8_t dmvr_enabled; } DMVRInfo;