Skip to content

Commit

Permalink
Merge pull request #339 from fixstars/fix/ColorDynamicAdjustment-bb
Browse files Browse the repository at this point in the history
Fix/rgb gain order
  • Loading branch information
Fixstars-momoko authored Nov 6, 2024
2 parents 5f89cb7 + 2063a69 commit 9dfb8b6
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 9dfb8b6

Please sign in to comment.