From patchwork Mon Dec 5 06:09:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Fei W" X-Patchwork-Id: 39604 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp3010466pzb; Sun, 4 Dec 2022 22:11:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf6h2TCFFzVq+uYBD4sI4FOgNRtN70swGeI0yL2Gm88GTX+d+6jLcgsnsUnafjXPpa6pZFtZ X-Received: by 2002:a17:906:d10f:b0:7c0:f727:5dd2 with SMTP id b15-20020a170906d10f00b007c0f7275dd2mr2199114ejz.319.1670220659878; Sun, 04 Dec 2022 22:10:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670220659; cv=none; d=google.com; s=arc-20160816; b=CkAaM/l035aeR6fzyy0BJ7PRnUaa/TvVw6DQ77N9TzcIgoa5QvGpZK36wnLFyeak0g kbJ+rq1c9IhXC7GK5jgHinOGFNBwnBcresEFbFSsa76YmORoaSYFIOr7xJZwjxYgxUSZ n6oHg5xxSE+2+ppjlvq4gIbfCtSNoFgVeMCF9/zIQNRTqzS4yKkofasN6mbD789Q6Mof 0emHigiSnpW8nv/oYmllSPnBlxiNxN5WYKXphX1qgvNt11VIxST6rcR6PsoIHAbaiwsJ DUP6qG74xr3tuEbcFMyRlp8SF6JlZgfWE75vkamJAmmvCX4T3sIwYjjDJo6fHhU0FbVb mLzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=wBEZiqEzkEiVNTfbGcahTxTMXysj/gslBYcYzXRHFl0=; b=wKdf1O6p11yMhCENbspEPoAetRoj2OX+w3qfRUpddUBQdYNt0YPh2wEMEpVwLGm/qG PF6myz1N7mElVpeuNUQ9riQq1UkF5A7kZHBVhBA+Kvie7sXok5qO2575gEFniJmN/tFV mh1/BIVvr4Z9jIsD2eeUKX7qOfoEY3DCCl8x7N/lSImI2vx2/8w7JtjBUTJfagl+K7P6 m0IKl7cE2aar/dB4gYlrz+mIilpo9k7LWBLJsGXemlRDeYUlj+bTtJvxsxflEmZh19hp nYtpH63PDqceJlzQoKnhlo9eRapmQo4PTg86h5Q6RvH0+ISuLs58ftYUXAAWb9xVnVQh 5Idg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b="MxQs/VtE"; 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 wy1-20020a170906fe0100b007ba713e241dsi10391600ejb.894.2022.12.04.22.10.59; Sun, 04 Dec 2022 22:10:59 -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="MxQs/VtE"; 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 86B9F68BBA0; Mon, 5 Dec 2022 08:10:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E23F468BC7B for ; Mon, 5 Dec 2022 08:10:05 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670220606; x=1701756606; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p5/cStIiif4By1hMBXhVKX5ovXQz/wqMfXl432s10Tk=; b=MxQs/VtEvDcdsp1vI81OlkdqQ6ytMLXFo7TzAOcBQNaBMMxQxdM/AFVL aAlMaZW2tV8HiWpolnXuXVOtMK7d52cpT19sbymVcIe2ac8o7I4YlDW2Z nCtGnFHH3JtOnlMhzd23C5qjdT9Y6/76FLupygZOfyPwzHqeErYk7kIDE GeuYzsAT/vTODC2jROak6sj5z0vRWoaX+Z1hhqF+bixJLaDJ8TALcnLfG IHuXWtPxW55ybxU1hybJNhYTvN5IEsAXmvnr7+EOKMozoHT6D163NS+B2 VW7evcfgftJ/Wnh+Gq0L1coE1pAC+3jxOGbyPr0pKdcMAWpDNgxwbiM4N Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10551"; a="295971401" X-IronPort-AV: E=Sophos;i="5.96,218,1665471600"; d="scan'208";a="295971401" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2022 22:10:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10551"; a="645700109" X-IronPort-AV: E=Sophos;i="5.96,218,1665471600"; d="scan'208";a="645700109" Received: from t.sh.intel.com ([10.239.159.159]) by orsmga002.jf.intel.com with ESMTP; 04 Dec 2022 22:09:59 -0800 From: Fei Wang To: ffmpeg-devel@ffmpeg.org Date: Mon, 5 Dec 2022 14:09:26 +0800 Message-Id: <20221205060929.2511871-10-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221205060929.2511871-1-fei.w.wang@intel.com> References: <20221205060929.2511871-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 10/13] 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 Cc: Linjie Fu , Fei Wang , Linjie Fu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: sbDEVejSgFtO 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 6ce1e17fa8..005d782819 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; }