Fix wrong const usage

This commit is contained in:
Ingo Weyrich 2020-07-26 13:28:21 +02:00
parent 0fcca62905
commit b55312140b
6 changed files with 10 additions and 10 deletions

View File

@ -123,7 +123,7 @@ float* RawImageSource::CA_correct_RT(
double cared, double cared,
double cablue, double cablue,
bool avoidColourshift, bool avoidColourshift,
const array2D<float> &rawData, array2D<float> &rawData,
double* fitParamsTransfer, double* fitParamsTransfer,
bool fitParamsIn, bool fitParamsIn,
bool fitParamsOut, bool fitParamsOut,
@ -1291,7 +1291,7 @@ float* RawImageSource::CA_correct_RT(
for (int i = 0; i < H - 2 * cb; ++i) { for (int i = 0; i < H - 2 * cb; ++i) {
const int firstCol = fc(cfa, i, 0) & 1; const int firstCol = fc(cfa, i, 0) & 1;
const int colour = fc(cfa, i, firstCol); const int colour = fc(cfa, i, firstCol);
const array2D<float>* nonGreen = colour == 0 ? redFactor : blueFactor; array2D<float>* nonGreen = colour == 0 ? redFactor : blueFactor;
int j = firstCol; int j = firstCol;
#ifdef __SSE2__ #ifdef __SSE2__
for (; j < W - 7 - 2 * cb; j += 8) { for (; j < W - 7 - 2 * cb; j += 8) {
@ -1325,7 +1325,7 @@ float* RawImageSource::CA_correct_RT(
const int ngRow = 1 - (fc(cfa, 0, 0) & 1); const int ngRow = 1 - (fc(cfa, 0, 0) & 1);
const int ngCol = fc(cfa, ngRow, 0) & 1; const int ngCol = fc(cfa, ngRow, 0) & 1;
const int colour = fc(cfa, ngRow, ngCol); const int colour = fc(cfa, ngRow, ngCol);
const array2D<float>* nonGreen = colour == 0 ? redFactor : blueFactor; array2D<float>* nonGreen = colour == 0 ? redFactor : blueFactor;
for (int i = 0; i < (H + 1 - 2 * cb) / 2; ++i) { for (int i = 0; i < (H + 1 - 2 * cb) / 2; ++i) {
(*nonGreen)[i][(W - 2 * cb + 1) / 2 - 1] = (*nonGreen)[i][(W - 2* cb + 1) / 2 - 2]; (*nonGreen)[i][(W - 2 * cb + 1) / 2 - 1] = (*nonGreen)[i][(W - 2* cb + 1) / 2 - 2];
} }

View File

@ -212,7 +212,7 @@ public:
} }
// use with indices // use with indices
T * operator[](int index) const T * operator[](int index)
{ {
assert((index >= 0) && (index < y)); assert((index >= 0) && (index < y));
return ptr[index]; return ptr[index];
@ -225,7 +225,7 @@ public:
} }
// use as pointer to T** // use as pointer to T**
operator const T* const *() operator const T* const *() const
{ {
return ptr; return ptr;
} }

View File

@ -1772,7 +1772,7 @@ void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b,
} }
} }
void Color::RGB2L(float *R, float *G, float *B, float *L, const float wp[3][3], int width) void Color::RGB2L(const float *R, const float *G, const float *B, float *L, const float wp[3][3], int width)
{ {
#ifdef __SSE2__ #ifdef __SSE2__

View File

@ -623,7 +623,7 @@ public:
static void XYZ2Lab(float x, float y, float z, float &L, float &a, float &b); static void XYZ2Lab(float x, float y, float z, float &L, float &a, float &b);
static void RGB2Lab(float *X, float *Y, float *Z, float *L, float *a, float *b, const float wp[3][3], int width); static void RGB2Lab(float *X, float *Y, float *Z, float *L, float *a, float *b, const float wp[3][3], int width);
static void Lab2RGBLimit(float *L, float *a, float *b, float *R, float *G, float *B, const float wp[3][3], float limit, float afactor, float bfactor, int width); static void Lab2RGBLimit(float *L, float *a, float *b, float *R, float *G, float *B, const float wp[3][3], float limit, float afactor, float bfactor, int width);
static void RGB2L(float *X, float *Y, float *Z, float *L, const float wp[3][3], int width); static void RGB2L(const float *R, const float *G, const float *B, float *L, const float wp[3][3], int width);
/** /**
* @brief Convert Lab in Yuv * @brief Convert Lab in Yuv

View File

@ -103,7 +103,7 @@ void restore(Imagefloat *rgb, float maxval, bool multithread)
} }
} }
int get_dark_channel(const array2D<float> &R, const array2D<float> &G, const array2D<float> &B, const array2D<float> &dst, int patchsize, const float ambient[3], bool clip, bool multithread, float strength) int get_dark_channel(const array2D<float> &R, const array2D<float> &G, const array2D<float> &B, array2D<float> &dst, int patchsize, const float ambient[3], bool clip, bool multithread, float strength)
{ {
const int W = R.width(); const int W = R.width();
const int H = R.height(); const int H = R.height();
@ -162,7 +162,7 @@ int get_dark_channel(const array2D<float> &R, const array2D<float> &G, const arr
return (W / patchsize + ((W % patchsize) > 0)) * (H / patchsize + ((H % patchsize) > 0)); return (W / patchsize + ((W % patchsize) > 0)) * (H / patchsize + ((H % patchsize) > 0));
} }
int get_dark_channel_downsized(const array2D<float> &R, const array2D<float> &G, const array2D<float> &B, const array2D<float> &dst, int patchsize, bool multithread) int get_dark_channel_downsized(const array2D<float> &R, const array2D<float> &G, const array2D<float> &B, array2D<float> &dst, int patchsize, bool multithread)
{ {
const int W = R.width(); const int W = R.width();
const int H = R.height(); const int H = R.height();

View File

@ -247,7 +247,7 @@ protected:
double cared, double cared,
double cablue, double cablue,
bool avoidColourshift, bool avoidColourshift,
const array2D<float> &rawData, array2D<float> &rawData,
double* fitParamsTransfer, double* fitParamsTransfer,
bool fitParamsIn, bool fitParamsIn,
bool fitParamsOut, bool fitParamsOut,