This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit dfeb4fdbc7f0242e84aff5bb85641e8e9a515dd5 Author: Niklas Haas <[email protected]> AuthorDate: Wed Jun 3 21:10:30 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Wed Jun 3 21:39:55 2026 +0000 swscale/graph: add metadata about backends in use Not currently publicly visible, but useful inside the test framework nonetheless. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/graph.c | 2 ++ libswscale/graph.h | 2 ++ libswscale/ops_dispatch.c | 11 ++++++++--- libswscale/ops_dispatch.h | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index 37c11f9dd5..a5547de44d 100644 --- a/libswscale/graph.c +++ b/libswscale/graph.c @@ -487,6 +487,7 @@ static int init_legacy_subpass(SwsGraph *graph, SwsContext *sws, setup_legacy_swscale, sws, free_legacy_swscale, &pass); if (ret < 0) return ret; + pass->backend = SWS_BACKEND_LEGACY; /** * For slice threading, we need to create sub contexts, similar to how @@ -853,6 +854,7 @@ int ff_sws_graph_init(SwsGraph *graph, SwsContext *ctx, const SwsFormat *dst, /* Resolve output buffers for all intermediate passes */ for (int i = 0; i < graph->num_passes; i++) { + graph->backend |= graph->passes[i]->backend; ret = pass_alloc_output(graph->passes[i]->input); if (ret < 0) goto error; diff --git a/libswscale/graph.h b/libswscale/graph.h index 8098aaed06..adf4b19675 100644 --- a/libswscale/graph.h +++ b/libswscale/graph.h @@ -81,6 +81,7 @@ struct SwsPass { * are always equal to (or smaller than, for the last slice) `slice_h`. */ SwsPassFunc run; + SwsBackend backend; /* backend this pass is using, or 0 */ enum AVPixelFormat format; /* new pixel format */ int width, height; /* new output size */ int slice_h; /* filter granularity */ @@ -124,6 +125,7 @@ typedef struct SwsGraph { int num_threads; /* resolved at init() time */ bool incomplete; /* set during init() if formats had to be inferred */ bool noop; /* set during init() if the graph is a no-op */ + SwsBackend backend; /* backends this graph is using, set during init() */ AVBufferRef *hw_frames_ref; diff --git a/libswscale/ops_dispatch.c b/libswscale/ops_dispatch.c index cad52f83a0..7a9a527bcb 100644 --- a/libswscale/ops_dispatch.c +++ b/libswscale/ops_dispatch.c @@ -77,6 +77,7 @@ static int compile_backend(SwsContext *ctx, const SwsOpBackend *backend, goto fail; } + compiled.backend = backend; *out = compiled; av_log(ctx, AV_LOG_VERBOSE, "Compiled using backend '%s': " @@ -515,9 +516,12 @@ static int compile(SwsGraph *graph, const SwsOpBackend *backend, if (p->comp.opaque) { SwsCompiledOp c = *comp; av_free(p); - return ff_sws_graph_add_pass(graph, dst->format, dst->width, dst->height, - input, c.slice_align, c.func_opaque, - NULL, c.priv, c.free, output); + ret = ff_sws_graph_add_pass(graph, dst->format, dst->width, dst->height, + input, c.slice_align, c.func_opaque, + NULL, c.priv, c.free, output); + if (ret >= 0) + (*output)->backend = comp->backend->flags; + return ret; } const SwsOp *read = ff_sws_op_list_input(ops); @@ -599,6 +603,7 @@ static int compile(SwsGraph *graph, const SwsOpBackend *backend, if (ret < 0) return ret; + (*output)->backend = comp->backend->flags; align_pass(input, comp->block_size, comp->over_read, p->pixel_bits_in); align_pass(*output, comp->block_size, comp->over_write, p->pixel_bits_out); return 0; diff --git a/libswscale/ops_dispatch.h b/libswscale/ops_dispatch.h index 1678cc4bf2..a2aa00a813 100644 --- a/libswscale/ops_dispatch.h +++ b/libswscale/ops_dispatch.h @@ -111,6 +111,9 @@ typedef struct SwsCompiledOp { */ bool opaque; + /* Set by ff_sws_ops_compile(), informative */ + const struct SwsOpBackend *backend; + /* Execution parameters for all functions */ int slice_align; /* slice height alignment */ int cpu_flags; /* active set of CPU flags (informative) */ _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
