This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit f97ba8cbe78a750f9dc1c8d894f943ecdd7675d6 Author: Niklas Haas <[email protected]> AuthorDate: Thu Apr 30 17:19:38 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Tue Jun 9 18:27:20 2026 +0200 swscale/uops: loop over all flags when generating macros This list is currently empty but will be expanded by the following commit. I briefly tested whether it would be worth avoiding the free/realloc on the uops array, but found the performance difference to be negligible. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/uops.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/libswscale/uops.c b/libswscale/uops.c index 3c57ee55d3..4a3d264c14 100644 --- a/libswscale/uops.c +++ b/libswscale/uops.c @@ -674,13 +674,13 @@ static int register_uop(struct AVTreeNode **root, const SwsUOp *uop) return 0; } -static int register_uops(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) +static int register_flags(SwsContext *ctx, SwsOpList *ops, SwsUOpFlags flags) { SwsUOpList *uops = ff_sws_uop_list_alloc(); if (!uops) return AVERROR(ENOMEM); - int ret = ff_sws_ops_translate(ops, 0, uops); + int ret = ff_sws_ops_translate(ops, flags, uops); if (ret < 0) goto fail; @@ -692,11 +692,26 @@ static int register_uops(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) } fail: - *out = (SwsCompiledOp) {0}; /* dummy value, will be immediately freed */ ff_sws_uop_list_free(&uops); return ret; } +static const SwsUOpFlags uop_flags[] = { + 0, +}; + +static int register_uops(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) +{ + for (int i = 0; i < FF_ARRAY_ELEMS(uop_flags); i++) { + int ret = register_flags(ctx, ops, uop_flags[i]); + if (ret < 0) + return ret; + } + + *out = (SwsCompiledOp) {0}; /* dummy value, will be immediately freed */ + return 0; +} + /* Dummy backend that just registers all seen uops */ static const SwsOpBackend backend_uops = { .name = "uops_gen", _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
