Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/d3d12va_vc1: add support for D3D12_VIDEO_DECODE_PROFILE_VC1_D2010 guid.
@ 2024-01-31 11:30 Tong Wu
  2024-02-05  2:20 ` Xiang, Haihao
  0 siblings, 1 reply; 2+ messages in thread
From: Tong Wu @ 2024-01-31 11:30 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Tong Wu, Aleksoid

From: Aleksoid <Aleksoid1978@mail.ru>

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>
---
 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".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-05  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 11:30 [FFmpeg-devel] [PATCH] avcodec/d3d12va_vc1: add support for D3D12_VIDEO_DECODE_PROFILE_VC1_D2010 guid Tong Wu
2024-02-05  2:20 ` Xiang, Haihao

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git