From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id ACC8D4F238 for ; Sat, 17 May 2025 20:53:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 3614368D958; Sat, 17 May 2025 23:53:14 +0300 (EEST) Received: from sender2-op-o11.zoho.eu (sender2-op-o11.zoho.eu [136.143.171.11]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id AF93A68D915 for ; Sat, 17 May 2025 23:53:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; t=1747515179; cv=none; d=zohomail.eu; s=zohoarc; b=h/43oqqUWRsuX2F2nysklpleaY2rsl+DSnmYmT4THK2SLXK6SMAQ+qyQJWzuiRE2zqzgDLKUBl4gbtNl9rpWAkHD2ImDPl9qOh/8Hjs9DgfoKtADlKpP0+N7N1xZ8ijoG1U9zgRAXHMloH5h/zKunpxTpCgjUK5Vt14f0HsKyAs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1747515179; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=8//nXI2pQBkjIxpcXH4OVU86svbhErWhdmE25aKddTU=; b=TBh+2TGdvh7dRmhRCKMwCTMU0G7Pvb16FITG14gebOO1gnIdQJnIw9VUm5XGCiM2CNYE2YteTmLL92rQKicsJl449j+8zgxvA8ECyyPzJ4PFsyJW/shnWt0qSOtqZzuFnhkDvWCWyPs4olpFsKaxwiHkcpinbigCD1kYwQQojRs= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=frankplowman.com; spf=pass smtp.mailfrom=post@frankplowman.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1747515179; s=zmail; d=frankplowman.com; i=post@frankplowman.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=8//nXI2pQBkjIxpcXH4OVU86svbhErWhdmE25aKddTU=; b=L6faFUqdWCVZ4Leg/5oEDtUBUU0q4Byq40zIoYGa0McaBxFZAklZY8l9epKXeTmw u8PMmoFUbIKEA2c+K706XpgeINhcEQ+oeCEhPPTCBk3yx1TTg0VYTAG4A8XUvJA4iEy aM0y/sEoNH357Se5U4meg6mrVVq0MZOTH9ogY7/0= Received: by mx.zoho.eu with SMTPS id 1747515176747297.11754852895956; Sat, 17 May 2025 22:52:56 +0200 (CEST) From: Frank Plowman To: ffmpeg-devel@ffmpeg.org Date: Sat, 17 May 2025 21:52:48 +0100 Message-ID: <20250517205250.4975-1-post@frankplowman.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH v1] lavc/vvc: Avoid UB in DB strength derivation for PLT CUs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Frank Plowman , nuomi2021@gmail.com, toqsxw@outlook.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: When called for palette-predicted CUs, boundary_strength could cause undefined behaviour due to accessing uninitialised motion information. The spec doesn't include this, but in the reference software it seems the deblock strength is always set to 0 for palette CUs due to some implementation details: perhaps this is a spec issue? Signed-off-by: Frank Plowman --- libavcodec/vvc/filter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vvc/filter.c b/libavcodec/vvc/filter.c index e3886d008e..3815668bcf 100644 --- a/libavcodec/vvc/filter.c +++ b/libavcodec/vvc/filter.c @@ -385,6 +385,9 @@ static int boundary_strength(const VVCLocalContext *lc, const MvField *curr, con { RefPicList *rpl = lc->sc->rpl; + if (curr->pred_flag == PF_PLT) + return 0; + if (curr->pred_flag == PF_IBC) return FFABS(neigh->mv[0].x - curr->mv[0].x) >= 8 || FFABS(neigh->mv[0].y - curr->mv[0].y) >= 8; -- 2.47.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".