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 55F6648FFE for ; Wed, 31 Jan 2024 11:22:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 57B9068D13E; Wed, 31 Jan 2024 13:22:05 +0200 (EET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3ABB368CAA2 for ; Wed, 31 Jan 2024 13:21:59 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706700124; x=1738236124; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Q/hVuXUl8MEbLwo1BqsT/Xh+DUNPf5lShGbivK07jeI=; b=PVZTJ8Il962JyUNQydqq7KhmJ33LB7/l2C+Ic5o07mcndYZHNworu7tI +IR8Zsb5l0f2koZvZxtvPDRgYt9cBZEuwVTjy2eo8P7NNZJICPXPLnYdu 4+ZVjVBX5ln+p271gZB+8GrLlP8VPdsdiDAkaM1x578LFk9NvInP6RWZV LzQpnjqjy0C3HcpgVncwbiXh/fjxNKiSqdMSnnyZ92yMnlyJqD8tC59+j sOuxp0K9gnTTcJYMdZ5kDUGdJ+UYhfwqG31R5ECTPnFMb0HSFVreALtV5 pEPP5ceA+girn7gYKA/mQ/um9/FD1/Jydqp0/IWlr2YCHP+yPXuWaF911 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="407288922" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="407288922" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 03:21:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="907847642" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="907847642" Received: from media-ci-tgl2.sh.intel.com (HELO localhost.localdomain) ([10.239.47.127]) by fmsmga002.fm.intel.com with ESMTP; 31 Jan 2024 03:21:55 -0800 From: Tong Wu To: ffmpeg-devel@ffmpeg.org Date: Wed, 31 Jan 2024 19:30:27 +0800 Message-ID: <20240131113027.1497-1-tong1.wu@intel.com> X-Mailer: git-send-email 2.43.0.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/d3d12va_vc1: add support for D3D12_VIDEO_DECODE_PROFILE_VC1_D2010 guid. 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: Tong Wu , Aleksoid 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: Aleksoid The VC1_D2010 profile, also known as VC1_VLD2010, has the same functionality and specification as the VC1_D profile. Support for this profile serves only as a positive indication that the accelerator has been designed with awareness of the modifications specified in the August 2010 version of this specification. Hardware accelerator drivers that expose support for this profile must not also expose the previously specified VC1_D GUID, unless the accelerator works properly with existing software decoders that use VC1_D and that do not incorporate the corrections added to the August 2010 version of this specification. As a result, we could give VC1_VLD2010 a higher priority and initialize it first. Signed-off-by: Aleksoid Signed-off-by: Tong Wu --- libavcodec/d3d12va_vc1.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/d3d12va_vc1.c b/libavcodec/d3d12va_vc1.c index 3aa2743107..110926be82 100644 --- a/libavcodec/d3d12va_vc1.c +++ b/libavcodec/d3d12va_vc1.c @@ -164,12 +164,19 @@ static int d3d12va_vc1_end_frame(AVCodecContext *avctx) static int d3d12va_vc1_decode_init(AVCodecContext *avctx) { + int ret; D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VC1; + ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VC1_D2010; ctx->max_num_ref = 3; - return ff_d3d12va_decode_init(avctx); + ret = ff_d3d12va_decode_init(avctx); + if (ret < 0) { + ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_VC1; + ret = ff_d3d12va_decode_init(avctx); + } + + return ret; } #if CONFIG_WMV3_D3D12VA_HWACCEL -- 2.43.0.windows.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".