This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit cd89df8f99282deeead11db8ceab93e713f6cb09 Author: Lynne <[email protected]> AuthorDate: Sun May 31 01:02:08 2026 +0900 Commit: Lynne <[email protected]> CommitDate: Sun May 31 01:14:04 2026 +0900 vulkan/swscale: don't hardcode source type as float when filtering Sponsored-by: Sovereign Tech Fund --- libswscale/vulkan/ops.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libswscale/vulkan/ops.c b/libswscale/vulkan/ops.c index d70192e4c7..c944e120c5 100644 --- a/libswscale/vulkan/ops.c +++ b/libswscale/vulkan/ops.c @@ -826,6 +826,9 @@ static int read_filtered(SPICtx *spi, SPIRVIDs *id, const SwsOpList *ops, const int is_h = f->filter == SWS_OP_FILTER_H; const int src_interlaced = ops->src.interlaced; + const int src_float = op->type == SWS_PIXEL_F32; + const int read_vtype = src_float ? id->f32vec4_type : id->u32vec4_type; + /* Buffer array index along the filtered axis: pos.x (H) or pos.y (V) */ int axis = spi_OpCompositeExtract(spi, id->u32_type, gid, is_h ? 0 : 1); @@ -874,17 +877,24 @@ static int read_filtered(SPICtx *spi, SPIRVIDs *id, const SwsOpList *ops, spi_OpCompositeConstruct(spi, id->i32vec2_type, pos_x, c); if (op->rw.packed) { - int px = spi_OpImageRead(spi, id->f32vec4_type, + int px = spi_OpImageRead(spi, read_vtype, in_img[ops->plane_src[0]], coord, SpvImageOperandsMaskNone); + if (!src_float) + px = spi_OpConvertUToF(spi, id->f32vec4_type, px); px = spi_OpVectorTimesScalar(spi, id->f32vec4_type, px, w); acc_v = spi_OpFAdd(spi, id->f32vec4_type, acc_v, px); } else { for (int e = 0; e < op->rw.elems; e++) { - int px = spi_OpImageRead(spi, id->f32vec4_type, + int px = spi_OpImageRead(spi, read_vtype, in_img[ops->plane_src[e]], coord, SpvImageOperandsMaskNone); - px = spi_OpCompositeExtract(spi, id->f32_type, px, 0); + if (src_float) { + px = spi_OpCompositeExtract(spi, id->f32_type, px, 0); + } else { + px = spi_OpCompositeExtract(spi, id->u32_type, px, 0); + px = spi_OpConvertUToF(spi, id->f32_type, px); + } px = spi_OpFMul(spi, id->f32_type, w, px); acc_s[e] = spi_OpFAdd(spi, id->f32_type, acc_s[e], px); } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
