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 1094145230 for ; Thu, 15 Jun 2023 15:20:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 81E4868C584; Thu, 15 Jun 2023 18:19:13 +0300 (EEST) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7B51068C56E for ; Thu, 15 Jun 2023 18:19:03 +0300 (EEST) Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-6b2b6910facso5185378a34.1 for ; Thu, 15 Jun 2023 08:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686842342; x=1689434342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EsgYLwznYDtyn42cmFl6liG4sxTMIccCDJkJ/CCb1B0=; b=p/PEJBDZFJkPiacHTjMHbQTA+doPC54ETZySa+lXbITqfTMpLYxHGlENTV9vOOvv1C +rp5emde9DkVmFJGpKdT3gRf4bbvejuf4m1ery6r5k9YCPAybovaXbgU6cPcjirU9caA aZ3h53EpaHZJsLbYwaRCB7VIsIeLLjRakAgYSt533XRJJWSUurHOIK2rUSSqCo5Dwsiu 7MToN92KV7/5FTfx8RdHcwFjxbYXW/2DGlKzbz1+vW9wF9xdNRUSDHvIliXuBDEsYGpy aJS5ufpRD2xXWF6a8qEMahXJnpih4SCCpm/cE0QKohIfhZZkTBmNmVCArQjArmhwhe6U yogw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686842342; x=1689434342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EsgYLwznYDtyn42cmFl6liG4sxTMIccCDJkJ/CCb1B0=; b=k2sw+QESS7zasqtUlJc7aIZQvjqklnlcLv0JrmGhriY1UPECtko7WQKln7E17RDEEf TrA4TQPypG+oFY3RlZujav26Nuu4TzdtZ++tVLSmfmQ4VEIVuLmYd2YwlSeLQqiD7wuf 5a/kF92QKE8TnNQHeS2cL8Hs5234IYkWOPRUXkSw0ruP/X9uwdmA34zNgrztEraPGpbS YMb8k2LkwSYbOo5DsODWETzd4yc4g82LyxsOE80NwlUpAbNWKwKuUuOpq1UMjfcTC64x L/3Xc2t3EAzXamzOmtS6GUtMi6CGsmlGc6Gfs+sgKicSkgu+mowuxOybXibVLzwgm7Oe fJpA== X-Gm-Message-State: AC+VfDzrXYNRSCFzcG1Q+TFxEqX8F00qcYPF0jUHz2j5c6+FFPJYJajc lSNq3G5myBl/n98HXSw2AU4fpr0uBd4= X-Google-Smtp-Source: ACHHUZ74elMDPxhjxJ+iDnRwKfuCjc9ZD0uTtzdlxTNasrEJtiNjDHXHmhjd+aR/8gbzhOS2tB4bHg== X-Received: by 2002:a05:6870:6256:b0:19f:5958:3b01 with SMTP id r22-20020a056870625600b0019f59583b01mr12670701oak.16.1686842341763; Thu, 15 Jun 2023 08:19:01 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id ve17-20020a0568710c1100b001a6a3f99691sm4748405oab.27.2023.06.15.08.19.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 08:19:01 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Jun 2023 12:18:31 -0300 Message-ID: <20230615151836.50535-7-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615151836.50535-1-jamrial@gmail.com> References: <20230615151836.50535-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/11] avcodec/evc_parse: use the correct sps when parsing slice headers 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 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: Signed-off-by: James Almer --- libavcodec/evc_parse.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavcodec/evc_parse.c b/libavcodec/evc_parse.c index b3044eca3f..3e315526fa 100644 --- a/libavcodec/evc_parse.c +++ b/libavcodec/evc_parse.c @@ -441,7 +441,7 @@ static int evc_parse_slice_header(EVCParserContext *ctx, EVCParserSliceHeader *s if(!pps) return AVERROR_INVALIDDATA; - sps = ctx->sps[slice_pic_parameter_set_id]; + sps = ctx->sps[pps->pps_seq_parameter_set_id]; if(!sps) return AVERROR_INVALIDDATA; @@ -654,7 +654,8 @@ int ff_evc_parse_nal_unit(EVCParserContext *ctx, const uint8_t *buf, int buf_siz case EVC_IDR_NUT: // Coded slice of a IDR or non-IDR picture case EVC_NOIDR_NUT: { EVCParserSliceHeader sh; - EVCParserSPS *sps; + const EVCParserSPS *sps; + const EVCParserPPS *pps; int ret; ret = evc_parse_slice_header(ctx, &sh, data, nalu_size); @@ -685,9 +686,11 @@ int ff_evc_parse_nal_unit(EVCParserContext *ctx, const uint8_t *buf, int buf_siz // POC (picture order count of the current picture) derivation // @see ISO/IEC 23094-1:2020(E) 8.3.1 Decoding process for picture order count - sps = ctx->sps[sh.slice_pic_parameter_set_id]; + pps = ctx->pps[sh.slice_pic_parameter_set_id]; + sps = ctx->sps[pps->pps_seq_parameter_set_id]; + av_assert0(sps && pps); - if (sps && sps->sps_pocs_flag) { + if (sps->sps_pocs_flag) { int PicOrderCntMsb = 0; ctx->poc.prevPicOrderCntVal = ctx->poc.PicOrderCntVal; -- 2.41.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".