From 02a168a576c19aa1c2f0ba58bc4055cfb1f32079 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 30 Apr 2026 17:01:12 +0200 Subject: [PATCH] swscale/uops: keep track of input range during op translation Needed for the FMA decision logic. Signed-off-by: Niklas Haas --- libswscale/uops.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libswscale/uops.c b/libswscale/uops.c index 98890b6263..3c57ee55d3 100644 --- a/libswscale/uops.c +++ b/libswscale/uops.c @@ -540,7 +540,8 @@ static bool is_expand_bit(SwsPixelType type, AVRational factor) return false; } -static int translate_op(SwsUOpList *uops, SwsUOpFlags flags, const SwsOp *op) +static int translate_op(SwsUOpList *uops, SwsUOpFlags flags, const SwsOp *op, + const SwsComps *input) { switch (op->op) { case SWS_OP_FILTER_H: @@ -640,13 +641,14 @@ static int translate_op(SwsUOpList *uops, SwsUOpFlags flags, const SwsOp *op) return ff_sws_uop_list_append(uops, &uop); } -int ff_sws_ops_translate(const SwsOpList *ops, SwsUOpFlags flags, - SwsUOpList *uops) +int ff_sws_ops_translate(const SwsOpList *ops, SwsUOpFlags flags, SwsUOpList *uops) { + SwsComps input = ops->comps_src; for (int i = 0; i < ops->num_ops; i++) { - int ret = translate_op(uops, flags, &ops->ops[i]); + int ret = translate_op(uops, flags, &ops->ops[i], &input); if (ret < 0) return ret; + input = ops->ops[i].comps; } return 0; }