Exclude 2pix border from raw ca correction
This commit is contained in:
@@ -128,6 +128,8 @@ float* RawImageSource::CA_correct_RT(
|
||||
// multithreaded and vectorized by Ingo Weyrich
|
||||
constexpr int ts = 128;
|
||||
constexpr int tsh = ts / 2;
|
||||
constexpr int cb = 2; // 2 pixels border will be excluded from correction
|
||||
|
||||
//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;
|
||||
|
||||
@@ -141,7 +143,6 @@ float* RawImageSource::CA_correct_RT(
|
||||
}
|
||||
}
|
||||
|
||||
constexpr int cb = 4; // 4 pixels border will be excluded from 'Avoid Colour Shift'
|
||||
array2D<float>* redFactor = nullptr;
|
||||
array2D<float>* blueFactor = nullptr;
|
||||
array2D<float>* oldraw = nullptr;
|
||||
@@ -1209,15 +1210,15 @@ float* RawImageSource::CA_correct_RT(
|
||||
// copy temporary image matrix back to image matrix
|
||||
#pragma omp for
|
||||
|
||||
for (int row = 0; row < height; row++) {
|
||||
int col = FC(row, 0) & 1;
|
||||
for (int row = cb; row < height - cb; row++) {
|
||||
int col = cb + (FC(row, 0) & 1);
|
||||
int indx = (row * width + col) >> 1;
|
||||
#ifdef __SSE2__
|
||||
for (; col < width - 7 - (3 * (W & 1)); col += 8, indx += 4) {
|
||||
for (; col < width - 7 - cb; col += 8, indx += 4) {
|
||||
STC2VFU(rawData[row][col], LVFU(RawDataTmp[indx]));
|
||||
}
|
||||
#endif
|
||||
for (; col < width - (3 * (W & 1)); col += 2, indx++) {
|
||||
for (; col < width - cb; col += 2, indx++) {
|
||||
rawData[row][col] = RawDataTmp[indx];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user