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 1/3] avcodec/vulkan_decode: fix struct type for h265_profile
@ 2023-08-23 20:05 Kacper Michajłow
  2023-08-23 20:05 ` [FFmpeg-devel] [PATCH 2/3] avcodec/vulkan_decode: check specVersion to avoid using incompatible implementations Kacper Michajłow
  2023-08-23 20:06 ` [FFmpeg-devel] [PATCH 3/3] avcodec/vulkan_decode: print also codec header name Kacper Michajłow
  0 siblings, 2 replies; 4+ messages in thread
From: Kacper Michajłow @ 2023-08-23 20:05 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Kacper Michajłow

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavcodec/vulkan_decode.c | 2 +-
 libavcodec/vulkan_decode.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index f20733fb39..04350578f9 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -682,7 +682,7 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx,
     VkVideoProfileListInfoKHR *profile_list = &prof->profile_list;
 
     VkVideoDecodeH264ProfileInfoKHR *h264_profile = &prof->h264_profile;
-    VkVideoDecodeH264ProfileInfoKHR *h265_profile = &prof->h265_profile;
+    VkVideoDecodeH265ProfileInfoKHR *h265_profile = &prof->h265_profile;
     VkVideoDecodeAV1ProfileInfoMESA *av1_profile  = &prof->av1_profile;
 
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->sw_pix_fmt);
diff --git a/libavcodec/vulkan_decode.h b/libavcodec/vulkan_decode.h
index 0aaa2e2de0..c50527e5f8 100644
--- a/libavcodec/vulkan_decode.h
+++ b/libavcodec/vulkan_decode.h
@@ -27,7 +27,7 @@
 
 typedef struct FFVulkanDecodeProfileData {
     VkVideoDecodeH264ProfileInfoKHR h264_profile;
-    VkVideoDecodeH264ProfileInfoKHR h265_profile;
+    VkVideoDecodeH265ProfileInfoKHR h265_profile;
     VkVideoDecodeAV1ProfileInfoMESA av1_profile;
     VkVideoDecodeUsageInfoKHR usage;
     VkVideoProfileInfoKHR profile;
-- 
2.34.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] 4+ messages in thread

* [FFmpeg-devel] [PATCH 2/3] avcodec/vulkan_decode: check specVersion to avoid using incompatible implementations
  2023-08-23 20:05 [FFmpeg-devel] [PATCH 1/3] avcodec/vulkan_decode: fix struct type for h265_profile Kacper Michajłow
@ 2023-08-23 20:05 ` Kacper Michajłow
  2023-08-23 20:06 ` [FFmpeg-devel] [PATCH 3/3] avcodec/vulkan_decode: print also codec header name Kacper Michajłow
  1 sibling, 0 replies; 4+ messages in thread
From: Kacper Michajłow @ 2023-08-23 20:05 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Kacper Michajłow

Fixes:
VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07190
VUID-VkVideoSessionCreateInfoKHR-pStdHeaderVersion-07191

As a bonus avoids crashing AMD video driver on Windows, which currently
doesn't advertise support.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavcodec/vulkan_decode.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 04350578f9..7607edf52e 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -881,6 +881,11 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
            caps->flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR ?
                " separate_references" : "");
 
+    if (dec_ext[avctx->codec_id]->specVersion > caps->stdHeaderVersion.specVersion ||
+        strncmp(caps->stdHeaderVersion.extensionName,
+                dec_ext[avctx->codec_id]->extensionName, VK_MAX_EXTENSION_NAME_SIZE))
+        return AVERROR(EINVAL);
+
     /* Check if decoding is possible with the given parameters */
     if (avctx->width  < caps->minCodedExtent.width   ||
         avctx->height < caps->minCodedExtent.height  ||
-- 
2.34.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] 4+ messages in thread

* [FFmpeg-devel] [PATCH 3/3] avcodec/vulkan_decode: print also codec header name
  2023-08-23 20:05 [FFmpeg-devel] [PATCH 1/3] avcodec/vulkan_decode: fix struct type for h265_profile Kacper Michajłow
  2023-08-23 20:05 ` [FFmpeg-devel] [PATCH 2/3] avcodec/vulkan_decode: check specVersion to avoid using incompatible implementations Kacper Michajłow
@ 2023-08-23 20:06 ` Kacper Michajłow
  2023-08-25  3:02   ` Lynne
  1 sibling, 1 reply; 4+ messages in thread
From: Kacper Michajłow @ 2023-08-23 20:06 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Kacper Michajłow

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavcodec/vulkan_decode.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 7607edf52e..0d561b7450 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -863,6 +863,9 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
            caps->maxDpbSlots);
     av_log(avctx, AV_LOG_VERBOSE, "    Maximum active references: %u\n",
            caps->maxActiveReferencePictures);
+    av_log(avctx, AV_LOG_VERBOSE, "    Codec header name: '%s' (driver), '%s' (compiled)\n",
+           caps->stdHeaderVersion.extensionName,
+           dec_ext[avctx->codec_id]->extensionName);
     av_log(avctx, AV_LOG_VERBOSE, "    Codec header version: %i.%i.%i (driver), %i.%i.%i (compiled)\n",
            CODEC_VER(caps->stdHeaderVersion.specVersion),
            CODEC_VER(dec_ext[avctx->codec_id]->specVersion));
-- 
2.34.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] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH 3/3] avcodec/vulkan_decode: print also codec header name
  2023-08-23 20:06 ` [FFmpeg-devel] [PATCH 3/3] avcodec/vulkan_decode: print also codec header name Kacper Michajłow
@ 2023-08-25  3:02   ` Lynne
  0 siblings, 0 replies; 4+ messages in thread
From: Lynne @ 2023-08-25  3:02 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Aug 23, 2023, 22:06 by kasper93@gmail.com:

> Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
> ---
>  libavcodec/vulkan_decode.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
> index 7607edf52e..0d561b7450 100644
> --- a/libavcodec/vulkan_decode.c
> +++ b/libavcodec/vulkan_decode.c
> @@ -863,6 +863,9 @@ static int vulkan_decode_get_profile(AVCodecContext *avctx, AVBufferRef *frames_
>  caps->maxDpbSlots);
>  av_log(avctx, AV_LOG_VERBOSE, "    Maximum active references: %u\n",
>  caps->maxActiveReferencePictures);
> +    av_log(avctx, AV_LOG_VERBOSE, "    Codec header name: '%s' (driver), '%s' (compiled)\n",
> +           caps->stdHeaderVersion.extensionName,
> +           dec_ext[avctx->codec_id]->extensionName);
>  av_log(avctx, AV_LOG_VERBOSE, "    Codec header version: %i.%i.%i (driver), %i.%i.%i (compiled)\n",
>  CODEC_VER(caps->stdHeaderVersion.specVersion),
>  CODEC_VER(dec_ext[avctx->codec_id]->specVersion));
>

Pushed, along with the first commit in the patchset.
As for the second, Mesa still doesn't signal a correct version,a
and I'd rather have at least one fully working implementation at any time.
_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2023-08-25  3:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23 20:05 [FFmpeg-devel] [PATCH 1/3] avcodec/vulkan_decode: fix struct type for h265_profile Kacper Michajłow
2023-08-23 20:05 ` [FFmpeg-devel] [PATCH 2/3] avcodec/vulkan_decode: check specVersion to avoid using incompatible implementations Kacper Michajłow
2023-08-23 20:06 ` [FFmpeg-devel] [PATCH 3/3] avcodec/vulkan_decode: print also codec header name Kacper Michajłow
2023-08-25  3:02   ` Lynne

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