Skip to content

Commit

Permalink
Merge pull request #6906 from Lawrence37/fix-odd-raw-crop-raw-ca
Browse files Browse the repository at this point in the history
Fix for wrong colors when the demosaic border is odd (dev)
  • Loading branch information
Lawrence37 authored Dec 23, 2023
2 parents 31bf942 + 85746a8 commit 255a0c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtengine/CA_correct_RT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ float* RawImageSource::CA_correct_RT(
const unsigned int cfa[2][2] = {{FC(0,0), FC(0,1)}, {FC(1,0), FC(1,1)}};
constexpr int ts = 128;
constexpr int tsh = ts / 2;
const int cb = border_crop;
const int cb = 2 * ((border_crop + 1) / 2); // Round up to nearest even integer.

//shifts to location of vertical and diagonal neighbours
constexpr int v1 = ts, v2 = 2 * ts, v3 = 3 * ts, v4 = 4 * ts; //, p1=-ts+1, p2=-2*ts+2, p3=-3*ts+3, m1=ts+1, m2=2*ts+2, m3=3*ts+3;
Expand Down

0 comments on commit 255a0c7

Please sign in to comment.