Skip to content

Commit

Permalink
fix rgb order
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinyu Li authored and Xinyu Li committed Nov 6, 2024
1 parent 5f89cb7 commit 2063a69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bb/image-processing/bb.h
Original file line number Diff line number Diff line change
Expand Up @@ -1985,9 +1985,9 @@ class ColorDynamicAdjustment : public ion::BuildingBlock<ColorDynamicAdjustment>
void generate() {
using namespace Halide;
Var x, y, c;
Expr rv = saturating_cast<uint8_t>(cast<float>(input(x, y, 0)) * gain_b);
Expr rv = saturating_cast<uint8_t>(cast<float>(input(x, y, 0)) * gain_r);
Expr gv = saturating_cast<uint8_t>(cast<float>(input(x, y, 1)) * gain_g);
Expr bv = saturating_cast<uint8_t>(cast<float>(input(x, y, 2)) * gain_r);
Expr bv = saturating_cast<uint8_t>(cast<float>(input(x, y, 2)) * gain_b);
output(x, y, c) = select(c == 0, rv, c == 1, gv, bv);
}
};
Expand Down

0 comments on commit 2063a69

Please sign in to comment.