From patchwork Fri Feb 3 02:09:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Fei W" X-Patchwork-Id: 40231 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp836147pzk; Thu, 2 Feb 2023 18:11:42 -0800 (PST) X-Google-Smtp-Source: AK7set+yZxOa7PL/EdUFhC+mpgUCkdCDrFNZasTWAmE/gt8INwNIFsDtuPpw5sAyWfflhrZ1Uels X-Received: by 2002:aa7:c48a:0:b0:4a2:4abc:29be with SMTP id m10-20020aa7c48a000000b004a24abc29bemr8306890edq.35.1675390301934; Thu, 02 Feb 2023 18:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675390301; cv=none; d=google.com; s=arc-20160816; b=dFnhE7qleKmS3ld8nVcw7lrbrI90WdpC4qBKcsx40TTe15nGoq0U56JyG25CCZaJ5g Ceg5Ny0HrkdqPJZfLvon/6gpCBKlWRLmovrQFwlajp4KqKo1gwdYDFz2RtU9inurupC9 xS+usCIxcxCFmeC++i6hurb2arXi/cLfKaPDSWCA/oKu/24XOSjtGuEwnN/CluPiKLtn skegXQ8xuPNjGxvGLluMi2y7sLG02ToK+sLn9LKbSteiEDEr3KBbdIIcFMl/CUMmFs6r lGopJjPXCSi3giWthuwnXw+EG/gZqGnKv3pSdIznsRj8XHDohhHWqU2LTJrGON6vTX3S 1w/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=RgzCobuQ/eEqn0uBrp5PSNHtjDVQpxXSRgp6LYqikz4=; b=hpiISZ0+cm9d7yXbGlAzknGfiMVIirwMyMYLOYkYRVmbRPAYxkKQozLz2SijS6jLoK NLtpLJyFs0nGFRK8JhrLwfPqsvlhgAnANysCwaHiMq8ZGJ8gg+matoRd7Ty1Bc5UOu8V 51ouTEjeNHxuzR4IjE86TnYXbHBx6EAWreHE1eJ7KQ1JLypzqSwsmGVYVtI6/O6EMN7Z ow39BqsVFa8oo7gr80jifge4D/spsdzBKiA77rQ4AOEAWSNbq60vkr/iAspC3U1wKSrc 9WnCFnDc1DYIJJkIc5BpwwozCZC5793lDcqOqWfGeZsmFhxB7+dgfRZS5c48mUSystgW 09Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ZmAtZoHq; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ef5-20020a05640228c500b004a21c0af01bsi1162809edb.344.2023.02.02.18.11.41; Thu, 02 Feb 2023 18:11:41 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=ZmAtZoHq; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2164168BE2C; Fri, 3 Feb 2023 04:10:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 49B1D68BE5B for ; Fri, 3 Feb 2023 04:10:42 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675390242; x=1706926242; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=OrqmVquT4gNYxXY0asCupeufez3Gq1bxCbNpQjqR0zg=; b=ZmAtZoHqFVYOY2YFx6oU23FhBKSd6XDpTUYmsraMyBQlNfFp9jypBQZ3 L4Jaa5tjqxYlr+AHdRebDznDPB+nc7R8RvzdgjEakzNfa2nVZhSENZTzQ gNH7Xz5EBkEmRecgEK9yQmUxwERSucSeYVW2OJhoilrUrPNgE2TAJuM+N uEyHvZTvDBONyILdVOYzhr1fkZkl5vPHEo88PMAjMO27ajaH2sfU5or1E dylZiUpAXdXh3exWXSmMOOfE23BupciovPK8TfLYlLqBtxfa3u5ibcL7p f9BwazxCJh7GcyA1C8UkMBxafYkZ5ehr7ZHmCzzFiCTVUdcfkXi4EWog2 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="328651757" X-IronPort-AV: E=Sophos;i="5.97,269,1669104000"; d="scan'208";a="328651757" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2023 18:10:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10609"; a="667505884" X-IronPort-AV: E=Sophos;i="5.97,269,1669104000"; d="scan'208";a="667505884" Received: from t.sh.intel.com ([10.239.159.159]) by fmsmga007.fm.intel.com with ESMTP; 02 Feb 2023 18:10:31 -0800 From: Fei Wang To: ffmpeg-devel@ffmpeg.org Date: Fri, 3 Feb 2023 10:09:23 +0800 Message-Id: <20230203020924.443162-9-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230203020924.443162-1-fei.w.wang@intel.com> References: <20230203020924.443162-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 09/10] lavc/vaapi_hevc: Set correct rps type for scc 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: MZShSsWVowg9 From: Linjie Fu According to 8.1.3 and 8.3.2. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/vaapi_hevc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index c10617a81a..29c75e88f0 100644 --- a/libavcodec/vaapi_hevc.c +++ b/libavcodec/vaapi_hevc.c @@ -71,6 +71,7 @@ static void fill_vaapi_pic(VAPictureHEVC *va_pic, const HEVCFrame *pic, int rps_ static int find_frame_rps_type(const HEVCContext *h, const HEVCFrame *pic) { VASurfaceID pic_surf = ff_vaapi_get_surface_id(pic->frame); + const HEVCFrame *current_picture = h->ref; int i; for (i = 0; i < h->rps[ST_CURR_BEF].nb_refs; i++) { @@ -88,6 +89,9 @@ static int find_frame_rps_type(const HEVCContext *h, const HEVCFrame *pic) return VA_PICTURE_HEVC_RPS_LT_CURR; } + if (h->ps.pps->pps_curr_pic_ref_enabled_flag && current_picture->poc == pic->poc) + return VA_PICTURE_HEVC_LONG_TERM_REFERENCE; + return 0; }