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 B55B949996 for ; Mon, 24 Jun 2024 06:23:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5BBB668D636; Mon, 24 Jun 2024 09:23:30 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8169A68D607 for ; Mon, 24 Jun 2024 09:23:23 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719210208; x=1750746208; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QTrZIkRy729wHqDf66sylfFi/N+Z/CztFBWvVG+9UP8=; b=bCU5wgNMhBZ7xXRuPz82goAMC6auS4OC1/lpybJN8bTiOoCGRON4MnhK WRThv2BzzP1ESM/SHGSR+uAxYDa703is8VyD8PcQfLBdqw7kApaCVpaly ukLbQYfdVvnUEDpn062jqt5Nc6YV67UEO7NAiCqBjGdZp8EwCtfKpnPdS pL4PgZyoyyhQm7R7mynXl4jQgPMWBQrJguA+5ADq8o5S82CMkvsgrFyFF dYcKO/rlx4oD3raE+aJjEchf/Lythky+az0oXBV2Jc6ADq/+t7/9UNUZK 7+74FB4ypEibJAXiym/7ac9kDU/r5SB9AXSaDhRmH9ldXNSr2BohNIasL Q==; X-CSE-ConnectionGUID: L8MQebixT3OJ51PZHRB0SA== X-CSE-MsgGUID: 4qVUpVqqSQCKBVYUWCWmfA== X-IronPort-AV: E=McAfee;i="6700,10204,11112"; a="15990804" X-IronPort-AV: E=Sophos;i="6.08,261,1712646000"; d="scan'208";a="15990804" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2024 23:23:16 -0700 X-CSE-ConnectionGUID: ZAMe2CP/QZCsOm6DWeXx+w== X-CSE-MsgGUID: +t4T51BDT5yddcx1wpQVxw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,261,1712646000"; d="scan'208";a="48144672" Received: from unknown (HELO t-dg2.sh.intel.com) ([10.239.159.57]) by orviesa005.jf.intel.com with ESMTP; 23 Jun 2024 23:23:16 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Mon, 24 Jun 2024 14:23:31 +0800 Message-Id: <20240624062331.189212-2-fei.w.wang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240624062331.189212-1-fei.w.wang@intel.com> References: <20240624062331.189212-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 2/2] lavc/hevcdec: Update slice index before hwaccel decode slice 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 Otherwise, slice index will never update for hwaccel decode, and slice RPL will be always overlap into first one which use slice index to construct. Fixes hwaccel decoding after 47d34ba7fbb81 Signed-off-by: Fei Wang --- 1. Update commit message. 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.34.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".