This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 3aef0213e7c9372bd555461e6ca57d9f05bef84c Author: Niklas Haas <[email protected]> AuthorDate: Fri Mar 13 13:55:34 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Wed Mar 18 09:09:44 2026 +0000 swscale/ops_chain: add SwsContext to SwsImplParams Mainly so that implementations can consult sws->flags, to e.g. decide whether the kernel needs to be bit-exact. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <[email protected]> --- libswscale/ops_backend.c | 4 ++-- libswscale/ops_chain.c | 11 ++++++++--- libswscale/ops_chain.h | 5 +++-- libswscale/x86/ops.c | 4 ++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/libswscale/ops_backend.c b/libswscale/ops_backend.c index ceecae4f99..aaaa75ed0d 100644 --- a/libswscale/ops_backend.c +++ b/libswscale/ops_backend.c @@ -69,8 +69,8 @@ static int compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) /* Make on-stack copy of `ops` to iterate over */ SwsOpList rest = *ops; do { - ret = ff_sws_op_compile_tables(tables, FF_ARRAY_ELEMS(tables), &rest, - SWS_BLOCK_SIZE, chain); + ret = ff_sws_op_compile_tables(ctx, tables, FF_ARRAY_ELEMS(tables), + &rest, SWS_BLOCK_SIZE, chain); } while (ret == AVERROR(EAGAIN)); if (ret < 0) { diff --git a/libswscale/ops_chain.c b/libswscale/ops_chain.c index aee8f8558e..9ebbe675f0 100644 --- a/libswscale/ops_chain.c +++ b/libswscale/ops_chain.c @@ -193,8 +193,8 @@ static int op_match(const SwsOp *op, const SwsOpEntry *entry, const SwsComps nex return 0; } -int ff_sws_op_compile_tables(const SwsOpTable *const tables[], int num_tables, - SwsOpList *ops, const int block_size, +int ff_sws_op_compile_tables(SwsContext *ctx, const SwsOpTable *const tables[], + int num_tables, SwsOpList *ops, const int block_size, SwsOpChain *chain) { static const SwsOp dummy = { .comps.unused = { true, true, true, true }}; @@ -227,7 +227,12 @@ int ff_sws_op_compile_tables(const SwsOpTable *const tables[], int num_tables, SwsImplResult res = {0}; if (best->setup) { - const SwsImplParams params = { .op = op, .table = best_table }; + const SwsImplParams params = { + .ctx = ctx, + .op = op, + .table = best_table, + }; + ret = best->setup(¶ms, &res); if (ret < 0) return ret; diff --git a/libswscale/ops_chain.h b/libswscale/ops_chain.h index bc0657f94d..1c09525095 100644 --- a/libswscale/ops_chain.h +++ b/libswscale/ops_chain.h @@ -103,6 +103,7 @@ int ff_sws_op_chain_append(SwsOpChain *chain, SwsFuncPtr func, typedef struct SwsImplParams { const SwsOpTable *table; const SwsOp *op; + SwsContext *ctx; } SwsImplParams; typedef struct SwsImplResult { @@ -157,8 +158,8 @@ struct SwsOpTable { * * Returns 0, AVERROR(EAGAIN), or a negative error code. */ -int ff_sws_op_compile_tables(const SwsOpTable *const tables[], int num_tables, - SwsOpList *ops, const int block_size, +int ff_sws_op_compile_tables(SwsContext *ctx, const SwsOpTable *const tables[], + int num_tables, SwsOpList *ops, const int block_size, SwsOpChain *chain); #endif diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c index bd4b030333..969fca6128 100644 --- a/libswscale/x86/ops.c +++ b/libswscale/x86/ops.c @@ -728,8 +728,8 @@ static int compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) op->type = SWS_PIXEL_U8; } - ret = ff_sws_op_compile_tables(tables, FF_ARRAY_ELEMS(tables), &rest, - op_block_size, chain); + ret = ff_sws_op_compile_tables(ctx, tables, FF_ARRAY_ELEMS(tables), + &rest, op_block_size, chain); } while (ret == AVERROR(EAGAIN)); if (ret < 0) { _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
