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 AFA0D4B8FD for ; Wed, 19 Jun 2024 02:27:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9ADE768D6B2; Wed, 19 Jun 2024 05:27:06 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8945C68D68F for ; Wed, 19 Jun 2024 05:26:59 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718764024; x=1750300024; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7XJo7QwgdRfiaMsGUTFQ6s9Y1y7xORnF68yHV7jvW9k=; b=aG5Vjlzemd0IDRNykKYP1Z5MyDQvN7ET8GOsuLEopfPlvCouhlF3I5eS e7uv3BzE7q9YvRRPoHnt5aZ+ixBLz708PT72z10pMO3SwtKXh2jDLU3bn VT3c3zFAdPk0X2a/hPbKus4SRsoEyVjBKFKkZMlxnAAr0c1hDB/RcAA0E MGt8V70wiDkHTPJzckAlyupJxXuFMj1M3bOgpvvhz++TFH6Xk4SS+WBsL gRRU9FDcFjymEX6eobMsbwR4OPohbpP8FsMkfsSo9S+uT/Om62js6V/n8 Fp8270+Aeirzu9g8Y+9mwnxcs8mbeWm6JyePckNKvL4czmQdrjowfncaK A==; X-CSE-ConnectionGUID: /DaxWAMZTTa9QgyBYFXMYw== X-CSE-MsgGUID: b5HN1PwDQ0OUm965Askl0Q== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="15648510" X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="15648510" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 19:26:52 -0700 X-CSE-ConnectionGUID: MAgrJjhXQfupvRfI+3T/vg== X-CSE-MsgGUID: 4ZtnTkbNTYaK5pM25QllAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,249,1712646000"; d="scan'208";a="42471518" Received: from unknown (HELO t-dg2.sh.intel.com) ([10.239.159.57]) by orviesa007.jf.intel.com with ESMTP; 18 Jun 2024 19:26:50 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Jun 2024 10:27:22 +0800 Message-Id: <20240619022722.1054455-2-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240619022722.1054455-1-fei.w.wang@intel.com> References: <20240619022722.1054455-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL 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: fei.w.wang@intel.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: From: Fei Wang Fixes regression from 47d34ba7fbb81 Signed-off-by: Fei Wang --- libavcodec/hevc/hevcdec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 39beb7e4dc..8bb564f1b3 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -2770,6 +2770,9 @@ static int decode_slice_data(HEVCContext *s, const H2645NAL *nal, GetBitContext const HEVCPPS *pps = s->pps; int ret; + if (!s->sh.first_slice_in_pic_flag) + s->slice_idx += !s->sh.dependent_slice_segment_flag; + if (!s->sh.dependent_slice_segment_flag && s->sh.slice_type != HEVC_SLICE_I) { ret = ff_hevc_slice_rpl(s); if (ret < 0) { @@ -2807,8 +2810,6 @@ static int decode_slice_data(HEVCContext *s, const H2645NAL *nal, GetBitContext s->local_ctx[0].tu.cu_qp_offset_cb = 0; s->local_ctx[0].tu.cu_qp_offset_cr = 0; - s->slice_idx += !s->sh.dependent_slice_segment_flag; - if (s->avctx->active_thread_type == FF_THREAD_SLICE && s->sh.num_entry_point_offsets > 0 && pps->num_tile_rows == 1 && pps->num_tile_columns == 1) -- 2.25.1 _______________________________________________ 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".