This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit e01d19aad6ee8e3e70482d8677977e85e4b1b831 Author: Lynne <[email protected]> AuthorDate: Tue Mar 3 13:33:49 2026 +0100 Commit: Lynne <[email protected]> CommitDate: Tue Mar 24 15:21:17 2026 +0100 swscale/vulkan: implement SWS_OP_LINEAR Sponsored-by: Sovereign Tech Fund --- libswscale/vulkan/ops.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libswscale/vulkan/ops.c b/libswscale/vulkan/ops.c index 0e8fc1eaea..385edb0cd0 100644 --- a/libswscale/vulkan/ops.c +++ b/libswscale/vulkan/ops.c @@ -223,6 +223,7 @@ static int add_ops_glsl(VulkanPriv *p, FFVulkanOpsCtx *s, GLSLC(1, u16vec4 u16; ); GLSLC(1, u32vec4 u32; ); GLSLC(1, precise f32vec4 f32; ); + GLSLC(1, precise f32vec4 tmp; ); GLSLC(0, ); for (int n = 0; n < ops->num_ops; n++) { @@ -336,6 +337,23 @@ static int add_ops_glsl(VulkanPriv *p, FFVulkanOpsCtx *s, size - 1); } break; + case SWS_OP_LINEAR: + for (int i = 0; i < 4; i++) { + if (op->lin.m[i][4].num) + av_bprintf(&shd->src, " tmp.%c = (%i/%i.0);\n", "xyzw"[i], + op->lin.m[i][4].num, op->lin.m[i][4].den); + else + av_bprintf(&shd->src, " tmp.%c = 0;\n", "xyzw"[i]); + for (int j = 0; j < 4; j++) { + if (!op->lin.m[i][j].num) + continue; + av_bprintf(&shd->src, " tmp.%c += f32.%c*(%i/%i.0);\n", + "xyzw"[i], "xyzw"[j], + op->lin.m[i][j].num, op->lin.m[i][j].den); + } + } + av_bprintf(&shd->src, " f32 = tmp;\n"); + break; default: return AVERROR(ENOTSUP); } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
