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 6653945053 for ; Tue, 3 Jan 2023 13:01:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D0C668BD64; Tue, 3 Jan 2023 15:00:51 +0200 (EET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9786568BD51 for ; Tue, 3 Jan 2023 15:00:49 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672750849; x=1704286849; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hmm96N2EuVMW4p26W3oPsqzIxixkqHwJHDxg3DAgbqM=; b=hA3ZP7dXW8AD5l/fIf2M75jomzfBtUHtmGCetdjFBPt7KFqYkhkZVSU2 YMYlNpzyIJzX7nlyUuWYa1b2b4XFAXczMMh97ZQl7H+kQwxKERXW2XNM3 MRqy2RpvCeof3Iqh6tsJJiau8sqUvpfQBRNmoVYwc3vqWUsQpS3lz5ULs tLBfsuZQevLy5ze9VvYvg0yyEcqSDLFy+dCnPf7+NHwFeEyBW5drr7u97 ANpcCqRn8etV2PvzixlB3hqLdq2m1tsrkc1d1/3yeZft7kvG59E1SnK9E 2WLEodz5Ievqr4wvsAhGZ0ZoeEHnv8ZvzhTmArVmnke0etf8HYGz7EgJe g==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="302026296" X-IronPort-AV: E=Sophos;i="5.96,297,1665471600"; d="scan'208";a="302026296" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 05:00:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="718091878" X-IronPort-AV: E=Sophos;i="5.96,297,1665471600"; d="scan'208";a="718091878" Received: from t.sh.intel.com ([10.239.159.159]) by fmsmga008.fm.intel.com with ESMTP; 03 Jan 2023 05:00:42 -0800 From: Fei Wang To: ffmpeg-devel@ffmpeg.org Date: Tue, 3 Jan 2023 20:59:50 +0800 Message-Id: <20230103125952.2707824-9-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230103125952.2707824-1-fei.w.wang@intel.com> References: <20230103125952.2707824-1-fei.w.wang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 09/11] lavc/vaapi_hevc: Add vaapi profile parse support 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 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: Linjie Fu Note that Screen-Extended Main 4:4:4 and 4:4:4 10 supports chroma_format_idc from 0, 1 or 3, hence both 420 and 444 are supported. Signed-off-by: Linjie Fu Signed-off-by: Fei Wang --- libavcodec/vaapi_decode.c | 4 +++- libavcodec/vaapi_hevc.c | 14 ++++++++++++-- libavcodec/vaapi_hevc.h | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 134f10eca5..ab8c12e364 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -410,7 +410,9 @@ static const struct { #endif #if VA_CHECK_VERSION(1, 2, 0) && CONFIG_HEVC_VAAPI_HWACCEL MAP(HEVC, HEVC_REXT, None, - ff_vaapi_parse_hevc_rext_profile ), + ff_vaapi_parse_hevc_rext_scc_profile ), + MAP(HEVC, HEVC_SCC, None, + ff_vaapi_parse_hevc_rext_scc_profile ), #endif MAP(MJPEG, MJPEG_HUFFMAN_BASELINE_DCT, JPEGBaseline), diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index 73a8f5b4ce..c10617a81a 100644 --- a/libavcodec/vaapi_hevc.c +++ b/libavcodec/vaapi_hevc.c @@ -586,9 +586,9 @@ static int ptl_convert(const PTLCommon *general_ptl, H265RawProfileTierLevel *h2 } /* - * Find exact va_profile for HEVC Range Extension + * Find exact va_profile for HEVC Range Extension and Screen Content Coding Extension */ -VAProfile ff_vaapi_parse_hevc_rext_profile(AVCodecContext *avctx) +VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx) { const HEVCContext *h = avctx->priv_data; const HEVCSPS *sps = h->ps.sps; @@ -627,6 +627,16 @@ VAProfile ff_vaapi_parse_hevc_rext_profile(AVCodecContext *avctx) else if (!strcmp(profile->name, "Main 4:4:4 12") || !strcmp(profile->name, "Main 4:4:4 12 Intra")) return VAProfileHEVCMain444_12; + else if (!strcmp(profile->name, "Screen-Extended Main")) + return VAProfileHEVCSccMain; + else if (!strcmp(profile->name, "Screen-Extended Main 10")) + return VAProfileHEVCSccMain10; + else if (!strcmp(profile->name, "Screen-Extended Main 4:4:4")) + return VAProfileHEVCSccMain444; +#if VA_CHECK_VERSION(1, 8, 0) + else if (!strcmp(profile->name, "Screen-Extended Main 4:4:4 10")) + return VAProfileHEVCSccMain444_10; +#endif #else av_log(avctx, AV_LOG_WARNING, "HEVC profile %s is " "not supported with this VA version.\n", profile->name); diff --git a/libavcodec/vaapi_hevc.h b/libavcodec/vaapi_hevc.h index b3b0e6fc1e..449635d0d7 100644 --- a/libavcodec/vaapi_hevc.h +++ b/libavcodec/vaapi_hevc.h @@ -22,6 +22,6 @@ #include #include "avcodec.h" -VAProfile ff_vaapi_parse_hevc_rext_profile(AVCodecContext *avctx); +VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx); #endif /* AVCODEC_VAAPI_HEVC_H */ -- 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".