summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksoid <Aleksoid1978@mail.ru>2024-01-31 19:30:27 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2024-02-08 10:34:02 +0800
commit336d59643a96843dbc51837e855326f2738f0e5b (patch)
treee477d1a103b479e47a56ed2015bf076c93c05a36
parent3372876888db8bc8dd27350549654d11d5bb40a6 (diff)
avcodec/d3d12va_vc1: add support for D3D12_VIDEO_DECODE_PROFILE_VC1_D2010 guid.
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 <Aleksoid1978@mail.ru> Signed-off-by: Tong Wu <tong1.wu@intel.com>
-rw-r--r--libavcodec/d3d12va_vc1.c11
1 files 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