This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 9c6638b179da1fc045be756d3a9bd4b6399a7133 Author: Niklas Haas <[email protected]> AuthorDate: Thu Mar 12 21:37:39 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Wed Mar 18 09:09:44 2026 +0000 swscale/ops_chain: add SwsOpTable to SwsImplParams Mainly so setup functions can look at table->block_size, and perhaps the table flags, as well as anything else we may add in the future. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <[email protected]> --- libswscale/ops_chain.c | 9 +++++---- libswscale/ops_chain.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libswscale/ops_chain.c b/libswscale/ops_chain.c index 5a003828b7..aee8f8558e 100644 --- a/libswscale/ops_chain.c +++ b/libswscale/ops_chain.c @@ -201,8 +201,9 @@ int ff_sws_op_compile_tables(const SwsOpTable *const tables[], int num_tables, const SwsOp *next = ops->num_ops > 1 ? &ops->ops[1] : &dummy; const unsigned cpu_flags = av_get_cpu_flags(); const SwsOpEntry *best = NULL; + const SwsOpTable *best_table = NULL; const SwsOp *op = &ops->ops[0]; - int ret, best_score = 0, best_cpu_flags; + int ret, best_score = 0; for (int n = 0; n < num_tables; n++) { const SwsOpTable *table = tables[n]; @@ -215,7 +216,7 @@ int ff_sws_op_compile_tables(const SwsOpTable *const tables[], int num_tables, int score = op_match(op, entry, next->comps); if (score > best_score) { best_score = score; - best_cpu_flags = table->cpu_flags; + best_table = table; best = entry; } } @@ -226,13 +227,13 @@ int ff_sws_op_compile_tables(const SwsOpTable *const tables[], int num_tables, SwsImplResult res = {0}; if (best->setup) { - const SwsImplParams params = { .op = op }; + const SwsImplParams params = { .op = op, .table = best_table }; ret = best->setup(¶ms, &res); if (ret < 0) return ret; } - chain->cpu_flags |= best_cpu_flags; + chain->cpu_flags |= best_table->cpu_flags; ret = ff_sws_op_chain_append(chain, res.func ? res.func : best->func, res.free, &res.priv); if (ret < 0) { diff --git a/libswscale/ops_chain.h b/libswscale/ops_chain.h index eb8e42acb0..bc0657f94d 100644 --- a/libswscale/ops_chain.h +++ b/libswscale/ops_chain.h @@ -101,6 +101,7 @@ int ff_sws_op_chain_append(SwsOpChain *chain, SwsFuncPtr func, void (*free)(SwsOpPriv *), const SwsOpPriv *priv); typedef struct SwsImplParams { + const SwsOpTable *table; const SwsOp *op; } SwsImplParams; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
