[FFmpeg-cvslog] avcodec/vvc_ctu: align motion vector fields

James Almer git at videolan.org
Tue Jan 23 22:26:51 EET 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jan 23 17:24:12 2024 -0300| [1496ce8f6bae75bd6c00c4d7628a2326b7115df6] | committer: James Almer

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 <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1496ce8f6bae75bd6c00c4d7628a2326b7115df6
---

 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;
 



More information about the ffmpeg-cvslog mailing list