From patchwork Thu Mar 28 02:07:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 47564 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9f96:b0:1a3:b6bb:3029 with SMTP id mm22csp1028124pzb; Wed, 27 Mar 2024 19:09:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWuDeSrZ3QkHCj9ToBs3cnWzR6WE2YraeJdsloYlV4OKxvoD8Gi2qtNC6wxgKQ1uKMLbXWQIrn2R53Te7TjnrTFpuAGTXmfT/qB0g== X-Google-Smtp-Source: AGHT+IFobW5QRDUY05g1LQnQViISRPlZ/v7ww3SYgzQoDpJITEBk/kG8trsE/5mX+Y36nZHOscsX X-Received: by 2002:a17:906:ecea:b0:a48:56b2:d988 with SMTP id qt10-20020a170906ecea00b00a4856b2d988mr739080ejb.59.1711591757816; Wed, 27 Mar 2024 19:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711591757; cv=none; d=google.com; s=arc-20160816; b=QoTWa5xFNtgvkXoS6c+PqPPL3uG2O4L0TrJ9NONNrRAT2NZ/oP4OSPYZaBM7OjrVGP X08JsDsKiwH+TeyivmduufVo1Xqqj2MBZbim8oi2lGWa9hCmClRJFgkrL0VVCJeXoJJi lBpS18qLnjOiFJqHgYzwevDfoYtqzTi3ln8c2tisoeIGNlNc8kKmpXCoFW/XmVJJi5/g /oziUR64/jO+x3yXy/LBZPF5ypMY2rnO0SHSmMV12ndETxYa0q5I9bw30jgA3hQKfWyg Mes6qLK4zXeucK2Rp9iQd0Fi8OMbwUHwNG+uknWOzFad2n6Tm+mYQi2pKChqR2LqNlhz r6dQ== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=M4IoHbaxEmNsCgNzObcK4LNgJcENmUtvoFPN32QMj0c=; fh=1kpmTRI1sW42eNCnNMby7VLIISQBX6KJuVYxOEG0t2A=; b=ME8LqGCpjTLbk6TIorNxomrYFZA7ZG8aNdwUHh/d8N6dQsRHqbDiG4IuNdqvOAOrNE gnL+BTrNSnBHJxrKm96B0998EnqdlIz9Ak3UcJTFdhN+z/cte54L36BfnlIbKVuSyVTH l8H0k0cuzusnSQjeCB6FK8pXp6EQBSF09EnR5YLlKIvfCvOB4crb48DUUHh2XkulfvJE DAsJJIRqWlOlTMfvdaqMTnxu8YCYOwvkWYn7i5jFFS/aSDbMyhGeYev5ofPYoXN+zOuA b+bQGIZBASS8DFo+k8miqRZCN26zDIYG2gajnmyA9JBhsU0FvlzX44A/my/WN/W/FEYR lNsQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=SwZVZzyP; 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 i8-20020a17090671c800b00a46d04127e9si178743ejk.8.2024.03.27.19.09.13; Wed, 27 Mar 2024 19:09:17 -0700 (PDT) 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=SwZVZzyP; 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 BD0E168D6E9; Thu, 28 Mar 2024 04:09:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8B4E68D20C for ; Thu, 28 Mar 2024 04:09:03 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711591749; x=1743127749; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=u1A8szWwVh2dqyAeht8m/NcFahO63pTj4T7rMoXCmIs=; b=SwZVZzyPMoBy6XXhcSE3rRf5FcOIbsd6ajHIsLnFoE22BfBuJFuIS4Xz 4UkrFGRVy62A1gj5rIMRwY7TMVvS3hipzBHMYx8Q2qj/n1l8mTvvHZWxm DKAFJq/zxP7FpofaoEU4UrZn2w0LzGrJois6R5wfwhhohcKrSZeW3iZas lbXamEYk5PlNfq4xxy8wQaKOtM/zrmOgxkDV/g9FuJzb4jyGvHTTjNz5C mgI/kwkikbUzmL+AdT4B66KmZWZDgyN9tR2D3PBFhObxD4J4yYMd7gFXV NLyKMXqU1GWytFajMTNhTbzmkUq06REKItQlphTEKrbl2WVmQKCQbzPcf g==; X-CSE-ConnectionGUID: GyPIPmBYRVyAnXz5hNa0UA== X-CSE-MsgGUID: Vuc8CiU0TiS/qOkdJqK64w== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="10518371" X-IronPort-AV: E=Sophos;i="6.07,160,1708416000"; d="scan'208";a="10518371" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 19:09:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,160,1708416000"; d="scan'208";a="47697651" Received: from xhh-dg264.sh.intel.com ([10.238.2.76]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 19:08:59 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Thu, 28 Mar 2024 10:07:04 +0800 Message-Id: <20240328020704.4109636-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/vaapi_hevc: Add support for Main Intra & Main 10 Intra 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: Haihao Xiang Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Psr/iuWAkM80 From: Haihao Xiang Both Main Intra and Main 10 Intra are Rext, we may use Main and Main 10 instead for decoding. This patch fixes the error below: [hevc @ 0x55a771b80a00] No support for codec hevc profile 4. [hevc @ 0x55a771b80a00] Failed setup for format vaapi: hwaccel initialisation returned error. Signed-off-by: Haihao Xiang --- libavcodec/vaapi_hevc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c index 3bdd2dd1b8..83b94d1a55 100644 --- a/libavcodec/vaapi_hevc.c +++ b/libavcodec/vaapi_hevc.c @@ -612,6 +612,13 @@ VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx) av_log(avctx, AV_LOG_VERBOSE, "HEVC profile %s is found.\n", profile->name); } +#if VA_CHECK_VERSION(0, 37, 0) + if (!strcmp(profile->name, "Main Intra")) + return VAProfileHEVCMain; + else if (!strcmp(profile->name, "Main 10 Intra")) + return VAProfileHEVCMain10; +#endif + #if VA_CHECK_VERSION(1, 2, 0) if (!strcmp(profile->name, "Main 12") || !strcmp(profile->name, "Main 12 Intra"))