Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: zzoon via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: zzoon <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] vulkan_vp9: fix subsampling source and show_frame flag (PR #21132)
Date: Mon, 08 Dec 2025 16:00:07 -0000
Message-ID: <176520960840.39.8482843882719244620@2cb04c0e5124> (raw)

PR #21132 opened by zzoon
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21132
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21132.patch

This fixes vp9 decoding on ANV.


>From 173b9bc1fd8c6669a34caee57b17f33e84a8055c Mon Sep 17 00:00:00 2001
From: Hyunjun Ko <zzoon@igalia.com>
Date: Mon, 8 Dec 2025 16:01:45 +0100
Subject: [PATCH] vulkan_vp9: fix subsampling source and show_frame flag

---
 libavcodec/vulkan_vp9.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavcodec/vulkan_vp9.c b/libavcodec/vulkan_vp9.c
index 5b592c1443..6d0a5ce46f 100644
--- a/libavcodec/vulkan_vp9.c
+++ b/libavcodec/vulkan_vp9.c
@@ -115,6 +115,7 @@ static int vk_vp9_start_frame(AVCodecContext          *avctx,
     uint32_t frame_id_alloc_mask = 0;
 
     const VP9Frame *pic = &s->frames[CUR_FRAME];
+    const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(avctx->sw_pix_fmt);
     FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data;
     uint8_t profile = (pic->frame_header->profile_high_bit << 1) | pic->frame_header->profile_low_bit;
 
@@ -222,8 +223,9 @@ static int vk_vp9_start_frame(AVCodecContext          *avctx,
         },
         .BitDepth = profile < 2 ? 8 :
                     pic->frame_header->ten_or_twelve_bit ? 12 : 10,
-        .subsampling_x = pic->frame_header->subsampling_x,
-        .subsampling_y = pic->frame_header->subsampling_y,
+        .subsampling_x = pixdesc->log2_chroma_w,
+        .subsampling_y = pixdesc->log2_chroma_h,
+
         .color_space = pic->frame_header->color_space,
     };
 
@@ -235,7 +237,7 @@ static int vk_vp9_start_frame(AVCodecContext          *avctx,
            .refresh_frame_context = pic->frame_header->refresh_frame_context,
            .frame_parallel_decoding_mode = pic->frame_header->frame_parallel_decoding_mode,
            .segmentation_enabled = pic->frame_header->segmentation_enabled,
-           .show_frame = pic->frame_header->segmentation_enabled,
+           .show_frame = !s->h.invisible,
            .UsePrevFrameMvs = s->h.use_last_frame_mvs,
         },
         .profile = profile,
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

                 reply	other threads:[~2025-12-08 16:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=176520960840.39.8482843882719244620@2cb04c0e5124 \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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