From: zzoon via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: zzoon <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PR] vulkan_av1: fix mi_col_starts and mi_row_starts units (PR #21529)
Date: Tue, 20 Jan 2026 10:12:34 -0000
Message-ID: <176890395456.25.2819533451224919045@4457048688e7> (raw)
PR #21529 opened by zzoon
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21529
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21529.patch
The spec says:
pMiColStarts is a pointer to an array of TileCols number
of unsigned integers that corresponds to MiColStarts
defined in section 6.8.14 of the [AV1 Specification]
And the unit of MiColStarts is MI(mode info).
So is pMiRowStarts.
>From fee2a0ee92cac589bcb478d5ed44a9e3b30742b6 Mon Sep 17 00:00:00 2001
From: Hyunjun Ko <zzoon@igalia.com>
Date: Tue, 20 Jan 2026 18:36:20 +0900
Subject: [PATCH] avcodec/vulkan_av1: fix mi_col_starts and mi_row_starts units
The spec says:
pMiColStarts is a pointer to an array of TileCols number
of unsigned integers that corresponds to MiColStarts
defined in section 6.8.14 of the [AV1 Specification]
And the unit of MiColStarts is MI(mode info).
So is pMiRowStarts.
---
libavcodec/vulkan_av1.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
index 3bee784a4f..08c371746e 100644
--- a/libavcodec/vulkan_av1.c
+++ b/libavcodec/vulkan_av1.c
@@ -252,9 +252,11 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
int err;
int ref_count = 0;
AV1DecContext *s = avctx->priv_data;
+ const AV1RawSequenceHeader *seq = s->raw_seq;
const AV1Frame *pic = &s->cur_frame;
FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data;
uint32_t frame_id_alloc_mask = 0;
+ uint16_t sb_shift = seq->use_128x128_superblock ? 5 : 4;
AV1VulkanDecodePicture *ap = pic->hwaccel_picture_private;
FFVulkanDecodePicture *vp = &ap->vp;
@@ -498,8 +500,8 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
for (int i = 0; i < 64; i++) {
ap->width_in_sbs_minus1[i] = frame_header->width_in_sbs_minus_1[i];
ap->height_in_sbs_minus1[i] = frame_header->height_in_sbs_minus_1[i];
- ap->mi_col_starts[i] = frame_header->tile_start_col_sb[i];
- ap->mi_row_starts[i] = frame_header->tile_start_row_sb[i];
+ ap->mi_col_starts[i] = frame_header->tile_start_col_sb[i] << sb_shift;
+ ap->mi_row_starts[i] = frame_header->tile_start_row_sb[i] << sb_shift;
}
for (int i = 0; i < STD_VIDEO_AV1_MAX_SEGMENTS; i++) {
--
2.52.0
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2026-01-20 10:13 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=176890395456.25.2819533451224919045@4457048688e7 \
--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