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] lavc/d3d12va: Improve behaviour on missing decoder support
@ 2024-02-04 13:24 Mark Thompson
  2024-02-04 16:57 ` [FFmpeg-devel] 回复: " Wu Jianhua
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Thompson @ 2024-02-04 13:24 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Distinguish between a decoder being entirely missing and a decoder which
requires features which are not present in the incomplete implementation
in libavcodec and therefore can't be used.
---
  libavcodec/d3d12va_decode.c | 12 ++++++++----
  1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/libavcodec/d3d12va_decode.c b/libavcodec/d3d12va_decode.c
index f678b6f483..9bb8db1690 100644
--- a/libavcodec/d3d12va_decode.c
+++ b/libavcodec/d3d12va_decode.c
@@ -239,10 +239,14 @@ static int d3d12va_create_decoder(AVCodecContext *avctx)

      DX_CHECK(ID3D12VideoDevice_CheckFeatureSupport(device_hwctx->video_device, D3D12_FEATURE_VIDEO_DECODE_SUPPORT,
                                                     &feature, sizeof(feature)));
-    if (!(feature.SupportFlags & D3D12_VIDEO_DECODE_SUPPORT_FLAG_SUPPORTED) ||
-        !(feature.DecodeTier >= D3D12_VIDEO_DECODE_TIER_2)) {
-        av_log(avctx, AV_LOG_ERROR, "D3D12 decoder doesn't support on this device\n");
-        return AVERROR(EINVAL);
+    if (!(feature.SupportFlags & D3D12_VIDEO_DECODE_SUPPORT_FLAG_SUPPORTED)) {
+        av_log(avctx, AV_LOG_ERROR, "D3D12 video decode is not supported on this device.\n");
+        return AVERROR(ENOSYS);
+    }
+    if (!(feature.DecodeTier >= D3D12_VIDEO_DECODE_TIER_2)) {
+        av_log(avctx, AV_LOG_ERROR, "D3D12 video decode on this device requires tier %d support, "
+               "but it is not implemented.\n", feature.DecodeTier);
+        return AVERROR_PATCHWELCOME;
      }

      desc = (D3D12_VIDEO_DECODER_DESC) {
-- 
2.43.0
_______________________________________________
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] 3+ messages in thread

* [FFmpeg-devel] 回复:  [PATCH] lavc/d3d12va: Improve behaviour on missing decoder support
  2024-02-04 13:24 [FFmpeg-devel] [PATCH] lavc/d3d12va: Improve behaviour on missing decoder support Mark Thompson
@ 2024-02-04 16:57 ` Wu Jianhua
  2024-02-04 19:20   ` Mark Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Wu Jianhua @ 2024-02-04 16:57 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

> 发件人: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> 代表 Mark Thompson <sw@jkqxz.net>
> 发送时间: 2024年2月4日 5:24
> 收件人: FFmpeg development discussions and patches
> 主题: [FFmpeg-devel] [PATCH] lavc/d3d12va: Improve behaviour on missing decoder support
> 
> Distinguish between a decoder being entirely missing and a decoder which
> requires features which are not present in the incomplete implementation
> in libavcodec and therefore can't be used.
> ---
>   libavcodec/d3d12va_decode.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)

LGTM. Thanks.
_______________________________________________
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] 3+ messages in thread

* Re: [FFmpeg-devel] 回复: [PATCH] lavc/d3d12va: Improve behaviour on missing decoder support
  2024-02-04 16:57 ` [FFmpeg-devel] 回复: " Wu Jianhua
@ 2024-02-04 19:20   ` Mark Thompson
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Thompson @ 2024-02-04 19:20 UTC (permalink / raw)
  To: ffmpeg-devel

On 04/02/2024 16:57, Wu Jianhua wrote:
>> 发件人: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> 代表 Mark Thompson <sw@jkqxz.net>
>> 发送时间: 2024年2月4日 5:24
>> 收件人: FFmpeg development discussions and patches
>> 主题: [FFmpeg-devel] [PATCH] lavc/d3d12va: Improve behaviour on missing decoder support
>>
>> Distinguish between a decoder being entirely missing and a decoder which
>> requires features which are not present in the incomplete implementation
>> in libavcodec and therefore can't be used.
>> ---
>>    libavcodec/d3d12va_decode.c | 12 ++++++++----
>>    1 file changed, 8 insertions(+), 4 deletions(-)
> 
> LGTM. Thanks.
Applied.  Thank you!.

- Mark
_______________________________________________
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] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 13:24 [FFmpeg-devel] [PATCH] lavc/d3d12va: Improve behaviour on missing decoder support Mark Thompson
2024-02-04 16:57 ` [FFmpeg-devel] 回复: " Wu Jianhua
2024-02-04 19:20   ` Mark Thompson

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