This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit d89765eb28e6b2cab4f920ee30be558649911b35 Author: Niklas Haas <[email protected]> AuthorDate: Sat Feb 21 16:50:40 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Fri Feb 27 16:18:34 2026 +0000 swscale/graph: simplify output buffer management This function was originally written to support the use case of e.g. partially allocated planes that implicitly reference the original input image, but I've decided that this is stupid and doesn't currently work anyways. Plus, I have plans to kill SwsImg, so we need to simplify this mess. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/graph.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/libswscale/graph.c b/libswscale/graph.c index 1c3a089cfe..55636a2816 100644 --- a/libswscale/graph.c +++ b/libswscale/graph.c @@ -844,23 +844,6 @@ void ff_sws_graph_update_metadata(SwsGraph *graph, const SwsColor *color) ff_color_update_dynamic(&graph->src.color, color); } -static SwsImg pass_output(const SwsPass *pass, const SwsImg *fallback) -{ - if (!pass) - return *fallback; - - SwsImg img = pass->output->img; - img.frame_ptr = fallback->frame_ptr; - for (int i = 0; i < FF_ARRAY_ELEMS(img.data); i++) { - if (!img.data[i]) { - img.data[i] = fallback->data[i]; - img.linesize[i] = fallback->linesize[i]; - } - } - - return img; -} - void ff_sws_graph_run(SwsGraph *graph, const SwsImg *output, const SwsImg *input) { av_assert0(output->fmt == graph->dst.hw_format || @@ -871,8 +854,8 @@ void ff_sws_graph_run(SwsGraph *graph, const SwsImg *output, const SwsImg *input for (int i = 0; i < graph->num_passes; i++) { const SwsPass *pass = graph->passes[i]; graph->exec.pass = pass; - graph->exec.input = pass_output(pass->input, input); - graph->exec.output = pass_output(pass, output); + graph->exec.input = pass->input ? pass->input->output->img : *input; + graph->exec.output = pass->output->buf[0] ? pass->output->img : *output; if (pass->setup) pass->setup(&graph->exec.output, &graph->exec.input, pass); avpriv_slicethread_execute(graph->slicethread, pass->num_slices, 0); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
