This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit ae25ca0b3677c3f9ff8c3b5fed78f987b7e10944 Author: Lynne <[email protected]> AuthorDate: Fri Jun 12 14:30:26 2026 +0900 Commit: Lynne <[email protected]> CommitDate: Thu Jul 2 16:45:09 2026 +0900 avcodec/vulkan_apv: replace the iDCT tile-position search with a division The iDCT located its tile by linearly scanning the tile column/row start tables. The APV tile grid is uniform-sized columns and rows with a single remainder tile at each edge, so the tile index is just the luma position divided by the (constant) first step, clamped to the last tile. Single column/row grids have no step to read and resolve to index 0. --- libavcodec/vulkan/apv_idct.comp.glsl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libavcodec/vulkan/apv_idct.comp.glsl b/libavcodec/vulkan/apv_idct.comp.glsl index 679b8e7623..ba37fb1073 100644 --- a/libavcodec/vulkan/apv_idct.comp.glsl +++ b/libavcodec/vulkan/apv_idct.comp.glsl @@ -72,13 +72,15 @@ void main(void) const ivec2 sub_shift = (comp == 0u) ? ivec2(0) : log2_chroma_sub; const ivec2 luma_pos = pos << sub_shift; - /* figure out the tile position */ - int tx = 0; - while (tx + 1 < tile_count.x && int(tile_col[tx + 1]) <= luma_pos.x) - tx++; - int ty = 0; - while (ty + 1 < tile_count.y && int(tile_row[ty + 1]) <= luma_pos.y) - ty++; + /* Uniform tile grid with a remainder tail, so the tile position is a + * division, not a search. Single-column/row grids have no step; index 0. */ + int tx = 0, ty = 0; + if (tile_count.x > 1) + tx = min(luma_pos.x / int(tile_col[1] - tile_col[0]), + tile_count.x - 1); + if (tile_count.y > 1) + ty = min(luma_pos.y / int(tile_row[1] - tile_row[0]), + tile_count.y - 1); const int tile_idx = ty * tile_count.x + tx; const int qp = int(tile_qp[int(comp) * APV_MAX_TILE_COUNT + tile_idx]); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
