From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 871FD4881E for ; Tue, 19 Mar 2024 19:48:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1535E68D42B; Tue, 19 Mar 2024 21:48:05 +0200 (EET) Received: from sender-op-o11.zoho.eu (sender-op-o11.zoho.eu [136.143.169.11]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3973668D278 for ; Tue, 19 Mar 2024 21:47:58 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; t=1710877675; cv=none; d=zohomail.eu; s=zohoarc; b=Ml4I75RwMmD+vOyFN/oVAeo18bhDB2bTqq9gaDWu7SipIVc1TDbA360mnucmw0GBr97JQQ6gZ44cL0XaA1DZkG+h5ytIhY0rqQAco/8ItUqW8UPT7xYGczED4vlAUSCJlvVGSyj83yNrxV1UPho+HU1aJhNuGaJnTAAZUlJ7lbw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1710877675; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=zGsJD5dttKAxx1dVg33EOHf4c0V+TQ1lXaIL922iRWA=; b=lJJKelXazaxwO05I1ztAhFNp/RdvBX++QyakUfZoYBjiE02LEvkJVo3wXAd/GGFV1xwsTwoLaVfnkOISKEiBXWFQAidkZrdKHR/NirTeCrH1cQCgd0fAObuMU5GWWaIOV5zOJ4M45NyEh13pcwGKVgQ1f5giAcjj8zcVz+i1/K8= 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=1710877675; 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=zGsJD5dttKAxx1dVg33EOHf4c0V+TQ1lXaIL922iRWA=; b=EnvBf8lolo+Shgxhz1l+/HH7G33I6+vAkq+RP83F6Y3O6dchBULVBBXk9On9Tz/F mhXG2utNz97i+G1LCDP1TSrb6IqJwqjzBRmljUv7OtDdCgXCl+t9fV/hGz66B2Gg8Cr lhd36o8VQAntF5gkwYHBh+UmfNcYChdk+VOnluJ8= Received: from localhost.localdomain (frankplowman.com [51.89.148.29]) by mx.zoho.eu with SMTPS id 1710877674426834.853855092723; Tue, 19 Mar 2024 20:47:54 +0100 (CET) From: Frank Plowman To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Mar 2024 19:47:51 +0000 Message-ID: <20240319194751.34086-1-post@frankplowman.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH] lavc/vvc: Fix check whether QG is in first tile col 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 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: The second part of this condition is intended to check whether the current quantisation group is in the first CTU column of the current tile. The issue is that ctb_to_col_bd gives the x-ordinate of the first column of the current tile *in CTUs*, while xQg gives the x-ordinate of the quantisation group *in samples*. Rectify this by shifting xQg by ctb_log2_size to get xQg in CTUs before comparing. Fixes FFVVC issues #201 and #203. --- libavcodec/vvc/vvc_ctu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vvc/vvc_ctu.c b/libavcodec/vvc/vvc_ctu.c index 519bd1ba76..8ba12c8d9f 100644 --- a/libavcodec/vvc/vvc_ctu.c +++ b/libavcodec/vvc/vvc_ctu.c @@ -96,7 +96,7 @@ static int get_qp_y_pred(const VVCLocalContext *lc) if (lc->na.cand_up) { const int first_qg_in_ctu = !(xQg & ctb_size_mask) && !(yQg & ctb_size_mask); const int qPy_up = fc->tab.qp[LUMA][x_cb + (y_cb - 1) * min_cb_width]; - if (first_qg_in_ctu && pps->ctb_to_col_bd[xQg >> ctb_log2_size] == xQg) + if (first_qg_in_ctu && pps->ctb_to_col_bd[xQg >> ctb_log2_size] == xQg >> ctb_log2_size) return qPy_up; } -- 2.42.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".