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 ESMTPS id 449C24D320 for ; Wed, 19 Feb 2025 20:31:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F1CF068C305; Wed, 19 Feb 2025 22:31:36 +0200 (EET) Received: from sender2-op-o11.zoho.eu (sender2-op-o11.zoho.eu [136.143.171.11]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5E98E68BF90 for ; Wed, 19 Feb 2025 22:31:31 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; t=1739997087; cv=none; d=zohomail.eu; s=zohoarc; b=hvw/X2I+l7cEB6wT6HAFWvSSLYhPEKpVftKe1xHyA9fHLdoDkbwPtN0E6yCDNqcXYy7U0gYqPFChq4BHnPXeWZONTVzlFWjde5EJl/xTPHkzhWHyS27ayXB5UpndTbv90UmvO/OhMpvaf5xK/vUYazqdmlgW8WKd3ceeQ8Zgp6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1739997087; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=y6EtDNo2kosi23ur6Sn1qRqjRnTGGz8hf7R2mwM/G48=; b=kK+/Un38jjBOIVoB0QQMGL7c08iE21NVnmGZM7+cJsH74zl1UchUAGo9q08kVtCkQ7qO9LWDm+KzUaOl+tQDdhoCAVgNomvCrfOMAoD3tAiawoIqW74zaz9aX6nG0QFY/rPuKpzoYoZP/vOCbsPjyD83vYP92p3si2+kD5l1jvE= 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=1739997087; 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=y6EtDNo2kosi23ur6Sn1qRqjRnTGGz8hf7R2mwM/G48=; b=UIy7TwON0fqc23E48iscJDj78x2Q7bgbE6OTctNxvJgt46uQMgbRMlWj0hziuTAP VstfhGuc6KmlWJHxtXF5R0zGYqE9COHak0dPY+A8SpbtUEpAy6nNck4MNBNPus4e70v X64yR6VAhDP3zO/vbNX9mDHX8xWJlQ5goz+8zqRk= Received: by mx.zoho.eu with SMTPS id 1739997086912592.5129096415718; Wed, 19 Feb 2025 21:31:26 +0100 (CET) From: Frank Plowman To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Feb 2025 20:30:08 +0000 Message-ID: <20250219203122.18920-1-post@frankplowman.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH v2 1/2] lavc/vvc: Fix slice map construction for small subpics 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 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: In the case pps_subpic_less_than_one_tile_slice is called, the subpicture is smaller than the tile and so there are multiple subpictures in the tile. Of course, then, not all the subpictures can start in the top-left corner as the code before the patch does. Patch fixes this, so each subpicture starts at the signalled location as is specified in section 6.5.1 of H.266(V3). Signed-off-by: Frank Plowman --- Changes since v1: None --- libavcodec/vvc/ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vvc/ps.c b/libavcodec/vvc/ps.c index fae6655cc0..9480540e03 100644 --- a/libavcodec/vvc/ps.c +++ b/libavcodec/vvc/ps.c @@ -404,8 +404,8 @@ static void subpic_tiles(int *tile_x, int *tile_y, int *tile_x_end, int *tile_y_ static void pps_subpic_less_than_one_tile_slice(VVCPPS *pps, const VVCSPS *sps, const int i, const int tx, const int ty, int *off) { pps->num_ctus_in_slice[i] = pps_add_ctus(pps, off, - pps->col_bd[tx], pps->row_bd[ty], - pps->r->col_width_val[tx], sps->r->sps_subpic_height_minus1[i] + 1); + sps->r->sps_subpic_ctu_top_left_x[i], sps->r->sps_subpic_ctu_top_left_y[i], + sps->r->sps_subpic_width_minus1[i] + 1, sps->r->sps_subpic_height_minus1[i] + 1); } static void pps_subpic_one_or_more_tiles_slice(VVCPPS *pps, const int tile_x, const int tile_y, const int x_end, const int y_end, const int i, int *off) -- 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".