From 56419fd096c55c646fc56d8dde522e32079c907c Mon Sep 17 00:00:00 2001 From: Frank Plowman Date: Thu, 28 Nov 2024 22:17:28 +0000 Subject: [PATCH] lavc/vvc: Fix overflow in MVD derivation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit H.266 (V3) section 7.4.12.8: "The value of lMvd[ compIdx ] shall be in the range of −2^{17} to 2^{17} − 1, inclusive." Signed-off-by: Frank Plowman --- libavcodec/vvc/ctu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c index b2c0babe9d..126748360c 100644 --- a/libavcodec/vvc/ctu.c +++ b/libavcodec/vvc/ctu.c @@ -1493,7 +1493,7 @@ static int hls_merge_data(VVCLocalContext *lc) static void hls_mvd_coding(VVCLocalContext *lc, Mv* mvd) { - int16_t mv[2]; + int32_t mv[2]; for (int i = 0; i < 2; i++) { mv[i] = ff_vvc_abs_mvd_greater0_flag(lc);