[FFmpeg-devel] [PATCH 6/6] lavc/vvc: Fix overflow in MVD derivation

Frank Plowman post at frankplowman.com
Fri Nov 29 00:17:28 EET 2024


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 <post at frankplowman.com>
---
 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 0030938cf5..505099bc76 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);
-- 
2.47.0



More information about the ffmpeg-devel mailing list