This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 1794e927e70706582bcf1226e38ad7ffc2be1eaf Author: Niklas Haas <[email protected]> AuthorDate: Wed Jun 10 19:53:59 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Fri Oct 2 14:15:58 2026 +0200 swscale/ops_optimizer: fold clears into linear ops This does not affect any current op lists, but slightly modifies the series of internal steps (clears are first folded into linear ops and then extracted again, rather than being commuted past reduced scaling ops). Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <[email protected]> Signed-off-by: Ramiro Polla <[email protected]> --- libswscale/ops_optimizer.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c index 8a48c01fb1..fe621dd610 100644 --- a/libswscale/ops_optimizer.c +++ b/libswscale/ops_optimizer.c @@ -493,6 +493,24 @@ retry: ff_sws_op_list_remove_at(ops, n + 1, 1); goto retry; } + + /* Fold into linear op */ + if (next->op == SWS_OP_LINEAR) { + for (int j = 0; j < 4; j++) { + if (!SWS_COMP_TEST(op->clear.mask, j)) + continue; + + const AVRational64 x = op->clear.value[j]; + for (int i = 0; i < 4; i++) { + const AVRational64 kx = ff_mul_q64(next->lin.m[i][j], x); + next->lin.m[i][4] = ff_add_q64(next->lin.m[i][4], kx); + next->lin.m[i][j] = Q(0); + } + } + + ff_sws_op_list_remove_at(ops, n, 1); + goto retry; + } break; case SWS_OP_SWIZZLE: -- 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]
