From 2063a69040ff36d8c7ac7aca73b811bee383d4b3 Mon Sep 17 00:00:00 2001 From: Xinyu Li Date: Wed, 6 Nov 2024 09:43:17 -0800 Subject: [PATCH] fix rgb order --- src/bb/image-processing/bb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb/image-processing/bb.h b/src/bb/image-processing/bb.h index 1994cd94..81e02ac2 100644 --- a/src/bb/image-processing/bb.h +++ b/src/bb/image-processing/bb.h @@ -1985,9 +1985,9 @@ class ColorDynamicAdjustment : public ion::BuildingBlock void generate() { using namespace Halide; Var x, y, c; - Expr rv = saturating_cast(cast(input(x, y, 0)) * gain_b); + Expr rv = saturating_cast(cast(input(x, y, 0)) * gain_r); Expr gv = saturating_cast(cast(input(x, y, 1)) * gain_g); - Expr bv = saturating_cast(cast(input(x, y, 2)) * gain_r); + Expr bv = saturating_cast(cast(input(x, y, 2)) * gain_b); output(x, y, c) = select(c == 0, rv, c == 1, gv, bv); } };