Fix some issues reported by coverity

This commit is contained in:
heckflosse
2018-11-16 20:48:33 +01:00
parent 91706c284a
commit 1fa253ba63
12 changed files with 15 additions and 15 deletions

View File

@@ -807,8 +807,8 @@ BENCHFUN
#endif
const std::size_t blox_array_size = denoiseNestedLevels * numthreads;
float *LbloxArray[blox_array_size];
float *fLbloxArray[blox_array_size];
float *LbloxArray[blox_array_size] = {};
float *fLbloxArray[blox_array_size] = {};
for (std::size_t i = 0; i < blox_array_size; ++i) {
LbloxArray[i] = nullptr;

View File

@@ -132,7 +132,7 @@ Image16* Image16::copy()
return cp;
}
void Image16::getStdImage(ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first, procparams::ToneCurveParams hrp)
void Image16::getStdImage(ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp)
{
// compute channel multipliers

View File

@@ -45,7 +45,7 @@ public:
Image8* to8();
Imagefloat* tofloat();
virtual void getStdImage(ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first, procparams::ToneCurveParams hrp);
virtual void getStdImage(ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp);
virtual const char* getType() const
{

View File

@@ -97,7 +97,7 @@ Image8* Image8::copy ()
return cp;
}
void Image8::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first, procparams::ToneCurveParams hrp)
void Image8::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp)
{
// compute channel multipliers
float rm = 1.f, gm = 1.f, bm = 1.f;

View File

@@ -40,7 +40,7 @@ public:
Image8* copy ();
virtual void getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first, procparams::ToneCurveParams hrp);
virtual void getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp);
virtual const char* getType () const
{

View File

@@ -168,7 +168,7 @@ Imagefloat* Imagefloat::copy ()
}
// This is called by the StdImageSource class. We assume that fp images from StdImageSource don't have to deal with gamma
void Imagefloat::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first, procparams::ToneCurveParams hrp)
void Imagefloat::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp)
{
// compute channel multipliers

View File

@@ -49,7 +49,7 @@ public:
Image8* to8();
Image16* to16();
virtual void getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first, procparams::ToneCurveParams hrp);
virtual void getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp);
virtual const char* getType () const
{

View File

@@ -106,7 +106,7 @@ public:
return sampleArrangement;
}
virtual void getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first, procparams::ToneCurveParams hrp)
virtual void getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, bool first)
{
printf("getStdImage NULL!\n");
}

View File

@@ -74,7 +74,7 @@ public:
virtual void retinexPrepareBuffers (const ColorManagementParams& cmp, const RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {};
virtual void flushRawData () {};
virtual void flushRGB () {};
virtual void HLRecovery_Global (ToneCurveParams hrp) {};
virtual void HLRecovery_Global (const ToneCurveParams &hrp) {};
virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {};
virtual void MSR (LabImage* lab, LUTf & mapcurve, bool &mapcontlutili, int width, int height, int skip, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) {};

View File

@@ -2825,7 +2825,7 @@ void RawImageSource::flushRGB()
}
}
void RawImageSource::HLRecovery_Global(ToneCurveParams hrp)
void RawImageSource::HLRecovery_Global(const ToneCurveParams &hrp)
{
if (hrp.hrenabled && hrp.method == "Color") {
if(!rgbSourceModified) {
@@ -3236,10 +3236,10 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw
}
}
void RawImageSource::cfaboxblur(RawImage *riFlatFile, float* cfablur, const int boxH, const int boxW)
void RawImageSource::cfaboxblur(RawImage *riFlatFile, float* cfablur, int boxH, int boxW)
{
if(boxW == 0 && boxH == 0) { // nothing to blur
if (boxW < 0 || boxH < 0 || (boxW == 0 && boxH == 0)) { // nothing to blur or negative values
memcpy(cfablur, riFlatFile->data[0], W * H * sizeof(float));
return;
}

View File

@@ -122,7 +122,7 @@ public:
void retinexPrepareBuffers (const ColorManagementParams& cmp, const RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI);
void flushRawData ();
void flushRGB ();
void HLRecovery_Global (ToneCurveParams hrp);
void HLRecovery_Global (const ToneCurveParams &hrp);
void refinement_lassus (int PassCount);
void refinement(int PassCount);
void setBorder(unsigned int rawBorder) {border = rawBorder;}

View File

@@ -194,7 +194,7 @@ void StdImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
// the code will use OpenMP as of now.
img->getStdImage(ctemp, tran, image, pp, true, hrp);
img->getStdImage(ctemp, tran, image, pp, true);
// Hombre: we could have rotated the image here too, with just few line of code, but:
// 1. it would require other modifications in the engine, so "do not touch that little plonker!"