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 4D70C4C897 for ; Sun, 9 Feb 2025 15:45:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 786B268B64B; Sun, 9 Feb 2025 17:45:21 +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 2314168B36B for ; Sun, 9 Feb 2025 17:45:15 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; t=1739115911; cv=none; d=zohomail.eu; s=zohoarc; b=aIJ85XDkWRRW97L0yEyCFCZDLFLLf2llhDhLTfoytOiBr2YdFvZ+o0TlAuclncDe3CM2ZzGWAsH9alks4jXl7B5zMF4qkvRhpAmgDhiMotL54Q2lMgi+5V926GEYyKNePEAssYyBrDf1DpFwJgVZCA0tWGyA+hZei2VF+6DQhRg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1739115911; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=f4Tqqb3l0bMD2U754EazlUGSgBdUlIfuXq0GpryslRE=; b=UW3ht0asu/N1iP+UwDrIkK4eClU/fxfDEOlUhB1RqY+Bq+7wOkf7u6jfezPEcMYjD3L8yznjATxGKrwgT0SAUbuuxmdP3cNnQlxHB60wqcsJfjbxCDYyRP7/pJkxbumsjMb1JKnbgqmnsQIwHfLFI/SaVZ5Go491geV7CNS/lbM= 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=1739115911; 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=f4Tqqb3l0bMD2U754EazlUGSgBdUlIfuXq0GpryslRE=; b=RiR/YDWbe/w9CJVFemuZFoDRbdRW3ORX52GPGfv8sU8mWuZFyJbFGh703gYr61Is V7qoLxi7MqgLnhNi3Nwu1mIuRKuh3NCedlaJO2gBMuIwxY4OEZl7d1f+nII1dH800lS ad+VrJDiljbV/+kwniOAduCdq7mNsYEki9OUP2SY= Received: by mx.zoho.eu with SMTPS id 1739115910012974.7067468384167; Sun, 9 Feb 2025 16:45:10 +0100 (CET) From: Frank Plowman To: ffmpeg-devel@ffmpeg.org Date: Sun, 9 Feb 2025 15:43:16 +0000 Message-ID: <20250209154505.69704-1-post@frankplowman.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH 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 --- 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".