This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 3eed75fa1a72e731c92ab5d98287ff3f6d17ce97 Author: Niklas Haas <[email protected]> AuthorDate: Sat Nov 7 15:31:12 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Sun Nov 8 01:48:12 2026 +0000 swscale/uops_tmpl: store the linear coefficients in the op chain Avoids a separate allocation, and the pointer indirection in the kernel. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/uops_tmpl.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libswscale/uops_tmpl.c b/libswscale/uops_tmpl.c index 5473df8082..dac66549c1 100644 --- a/libswscale/uops_tmpl.c +++ b/libswscale/uops_tmpl.c @@ -821,11 +821,7 @@ DECL_SETUP(setup_linear, params, out) c.k[i] = uop->data.mat4x5[i][4].px; } - fn(LinCoeffs) *data = av_refstruct_allocz(sizeof(c)); - if (!data) - return AVERROR(ENOMEM); - memcpy(data, &c, sizeof(c)); - ff_sws_op_priv_pack_refptr(out, data); + SWS_OP_PRIV_PACK(out, c); return 0; } @@ -837,8 +833,7 @@ DECL_SETUP(setup_linear, params, out) */ DECL_FUNC(linear, const SwsCompMask mask, const uint32_t one, const uint32_t zero) { - const SwsOpPriv *priv = SWS_OP_PRIV(impl); - const fn(LinCoeffs) c = *(const fn(LinCoeffs) *) priv->ptr; + const fn(LinCoeffs) c = *(const fn(LinCoeffs) *) SWS_OP_PRIV(impl); SWS_LOOP for (int i = 0; i < SWS_BLOCK_SIZE; i++) { @@ -865,7 +860,7 @@ DECL_FUNC(linear, const SwsCompMask mask, const uint32_t one, const uint32_t zer if (W) LIN_ROW(3, w); } - CONTINUE(sizeof(void *), x, y, z, w); + CONTINUE(sizeof(fn(LinCoeffs)), x, y, z, w); } SWS_FOR(PX, LINEAR, DECL_IMPL, linear) -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
