* [FFmpeg-devel] [PR] vulkan_av1: fix mi_col_starts and mi_row_starts units (PR #21529)
@ 2026-01-20 10:12 zzoon via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: zzoon via ffmpeg-devel @ 2026-01-20 10:12 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: zzoon
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-20 10:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-20 10:12 [FFmpeg-devel] [PR] vulkan_av1: fix mi_col_starts and mi_row_starts units (PR #21529) zzoon via ffmpeg-devel
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