Make compilation unit rtengine/rawimagesource.cc -Wextra clean, #4155
This commit is contained in:
@@ -52,7 +52,7 @@ bool loadFile(
|
||||
rtengine::procparams::ColorManagementParams icm;
|
||||
icm.working = working_color_space;
|
||||
|
||||
img_src.getImage(curr_wb, TR_NONE, img_float.get(), pp, rtengine::procparams::ToneCurveParams(), icm, rtengine::procparams::RAWParams());
|
||||
img_src.getImage(curr_wb, TR_NONE, img_float.get(), pp, rtengine::procparams::ToneCurveParams(), rtengine::procparams::RAWParams());
|
||||
|
||||
if (!working_color_space.empty()) {
|
||||
img_src.convertColorSpace(img_float.get(), icm, curr_wb);
|
||||
|
||||
@@ -228,18 +228,18 @@ void Crop::update (int todo)
|
||||
if (settings->leveldnautsimpl == 1) {
|
||||
if (params.dirpyrDenoise.Cmethod == "MAN" || params.dirpyrDenoise.Cmethod == "PON" ) {
|
||||
PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip);
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw );
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.raw );
|
||||
}
|
||||
} else {
|
||||
if (params.dirpyrDenoise.C2method == "MANU") {
|
||||
PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip);
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw );
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.raw );
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PRE") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "PREV")) {
|
||||
PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip);
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw );
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.raw );
|
||||
|
||||
if ((!isDetailWindow) && parent->adnListener && skip == 1 && params.dirpyrDenoise.enabled) {
|
||||
float lowdenoise = 1.f;
|
||||
@@ -451,7 +451,7 @@ void Crop::update (int todo)
|
||||
for (int wcr = 0; wcr <= 2; wcr++) {
|
||||
for (int hcr = 0; hcr <= 2; hcr++) {
|
||||
PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1);
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw );
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCropPart, ppP, params.toneCurve, params.raw );
|
||||
|
||||
// we only need image reduced to 1/4 here
|
||||
for (int ii = 0; ii < crH; ii += 2) {
|
||||
@@ -613,7 +613,7 @@ void Crop::update (int todo)
|
||||
// if(params.dirpyrDenoise.Cmethod=="AUT" || params.dirpyrDenoise.Cmethod=="PON") {//reinit origCrop after Auto
|
||||
if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { //reinit origCrop after Auto
|
||||
PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip);
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw );
|
||||
parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.raw );
|
||||
}
|
||||
|
||||
DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise;
|
||||
@@ -763,7 +763,7 @@ void Crop::update (int todo)
|
||||
if (todo & M_RGBCURVE) {
|
||||
double rrm, ggm, bbm;
|
||||
DCPProfile::ApplyState as;
|
||||
DCPProfile *dcpProf = parent->imgsrc->getDCP (params.icm, parent->currWB, as);
|
||||
DCPProfile *dcpProf = parent->imgsrc->getDCP (params.icm, as);
|
||||
|
||||
LUTu histToneCurve;
|
||||
parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap,
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
embProfile(nullptr), idata(nullptr), dirpyrdenoiseExpComp(INFINITY) {}
|
||||
|
||||
virtual ~ImageSource () {}
|
||||
virtual int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false) = 0;
|
||||
virtual int load (const Glib::ustring &fname) = 0;
|
||||
virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true) {};
|
||||
virtual void demosaic (const RAWParams &raw) {};
|
||||
virtual void retinex (ColorManagementParams cmp, const RetinexParams &deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
|
||||
|
||||
// use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat*
|
||||
virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hlp, const ColorManagementParams &cmp, const RAWParams &raw) = 0;
|
||||
virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hlp, const RAWParams &raw) = 0;
|
||||
virtual eSensorType getSensorType () const = 0;
|
||||
// true is ready to provide the AutoWB, i.e. when the image has been demosaiced for RawImageSource
|
||||
virtual bool isWBProviderReady () = 0;
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
virtual FrameData* getImageData (unsigned int frameNum) = 0;
|
||||
virtual ImageMatrices* getImageMatrices () = 0;
|
||||
virtual bool isRAW () const = 0;
|
||||
virtual DCPProfile* getDCP (const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as)
|
||||
virtual DCPProfile* getDCP (const ColorManagementParams &cmp, DCPProfile::ApplyState &as)
|
||||
{
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
@@ -333,7 +333,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
// Tells to the ImProcFunctions' tools what is the preview scale, which may lead to some simplifications
|
||||
ipf.setScale (scale);
|
||||
|
||||
imgsrc->getImage (currWB, tr, orig_prev, pp, params.toneCurve, params.icm, params.raw);
|
||||
imgsrc->getImage (currWB, tr, orig_prev, pp, params.toneCurve, params.raw);
|
||||
denoiseInfoStore.valid = false;
|
||||
//ColorTemp::CAT02 (orig_prev, ¶ms) ;
|
||||
// printf("orig_prevW=%d\n scale=%d",orig_prev->width, scale);
|
||||
@@ -556,7 +556,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
||||
double bbm = 33.;
|
||||
|
||||
DCPProfile::ApplyState as;
|
||||
DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as);
|
||||
DCPProfile *dcpProf = imgsrc->getDCP (params.icm, as);
|
||||
|
||||
ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation,
|
||||
rCurve, gCurve, bCurve, colourToningSatLimit, colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve);
|
||||
@@ -1223,7 +1223,7 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool
|
||||
currWB = ColorTemp(); // = no white balance
|
||||
}
|
||||
|
||||
imgsrc->getImage (currWB, tr, im, pp, ppar.toneCurve, ppar.icm, ppar.raw);
|
||||
imgsrc->getImage (currWB, tr, im, pp, ppar.toneCurve, ppar.raw);
|
||||
ImProcFunctions ipf (&ppar, true);
|
||||
|
||||
if (ipf.needsTransform()) {
|
||||
|
||||
@@ -36,11 +36,7 @@ InitialImage* InitialImage::load (const Glib::ustring& fname, bool isRaw, int* e
|
||||
|
||||
isrc->setProgressListener (pl);
|
||||
|
||||
if(isRaw && pl == nullptr) {
|
||||
*errorCode = isrc->load (fname, true);
|
||||
} else {
|
||||
*errorCode = isrc->load (fname);
|
||||
}
|
||||
*errorCode = isrc->load (fname);
|
||||
|
||||
if (*errorCode) {
|
||||
delete isrc;
|
||||
|
||||
@@ -97,7 +97,7 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext
|
||||
|
||||
if ((mode == PIM_EmbeddedOrRaw && !tpp) || mode == PIM_ForceRaw) {
|
||||
RawImageSource rawImage;
|
||||
int error = rawImage.load(fname, true);
|
||||
int error = rawImage.load(fname);
|
||||
|
||||
if (!error) {
|
||||
const unsigned char *data = nullptr;
|
||||
@@ -115,7 +115,7 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext
|
||||
rawImage.preprocess(params.raw, params.lensProf, params.coarse);
|
||||
rawImage.demosaic(params.raw);
|
||||
Imagefloat image(fw, fh);
|
||||
rawImage.getImage (wb, TR_NONE, &image, pp, params.toneCurve, params.icm, params.raw);
|
||||
rawImage.getImage (wb, TR_NONE, &image, pp, params.toneCurve, params.raw);
|
||||
rtengine::Image8 output(fw, fh);
|
||||
rawImage.convertColorSpace(&image, params.icm, wb);
|
||||
#pragma omp parallel for schedule(dynamic, 10)
|
||||
|
||||
@@ -87,7 +87,7 @@ void transLineStandard (const float* const red, const float* const green, const
|
||||
rotateLine (blue, image->b, tran, i, imwidth, imheight);
|
||||
}
|
||||
|
||||
void transLineFuji (const float* const red, const float* const green, const float* const blue, const int i, rtengine::Imagefloat* const image, const int tran, const int imwidth, const int imheight, const int fw)
|
||||
void transLineFuji (const float* const red, const float* const green, const float* const blue, const int i, rtengine::Imagefloat* const image, const int tran, const int imheight, const int fw)
|
||||
{
|
||||
|
||||
// Fuji SuperCCD rotation + coarse rotation
|
||||
@@ -623,7 +623,7 @@ float calculate_scale_mul(float scale_mul[4], const float pre_mul_[4], const flo
|
||||
return gain;
|
||||
}
|
||||
|
||||
void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw )
|
||||
void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw )
|
||||
{
|
||||
MyMutex::MyLock lock(getImageMutex);
|
||||
|
||||
@@ -824,7 +824,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
||||
if(d1x) {
|
||||
transLineD1x (line_red, line_grn, line_blue, ix, image, tran, imwidth, imheight, d1xHeightOdd, doClip);
|
||||
} else if(fuji) {
|
||||
transLineFuji (line_red, line_grn, line_blue, ix, image, tran, imwidth, imheight, fw);
|
||||
transLineFuji (line_red, line_grn, line_blue, ix, image, tran, imheight, fw);
|
||||
} else {
|
||||
transLineStandard (line_red, line_grn, line_blue, ix, image, tran, imwidth, imheight);
|
||||
}
|
||||
@@ -910,7 +910,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
||||
}
|
||||
}
|
||||
|
||||
DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as)
|
||||
DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfile::ApplyState &as)
|
||||
{
|
||||
DCPProfile *dcpProf = nullptr;
|
||||
cmsHPROFILE dummy;
|
||||
@@ -1518,7 +1518,7 @@ void RawImageSource::vflip (Imagefloat* image)
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
int RawImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
int RawImageSource::load (const Glib::ustring &fname)
|
||||
{
|
||||
|
||||
MyTime t1, t2;
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
RawImageSource ();
|
||||
~RawImageSource ();
|
||||
|
||||
int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false);
|
||||
int load (const Glib::ustring &fname);
|
||||
void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true);
|
||||
void demosaic (const RAWParams &raw);
|
||||
void retinex (ColorManagementParams cmp, const RetinexParams &deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI);
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
void cfaboxblur (RawImage *riFlatFile, float* cfablur, int boxH, int boxW);
|
||||
void scaleColors (int winx, int winy, int winw, int winh, const RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
||||
|
||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw);
|
||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw);
|
||||
eSensorType getSensorType () const
|
||||
{
|
||||
return ri != nullptr ? ri->getSensorType() : ST_NONE;
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
}
|
||||
void getAutoExpHistogram (LUTu & histogram, int& histcompr);
|
||||
void getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw);
|
||||
DCPProfile *getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as);
|
||||
DCPProfile *getDCP(const ColorManagementParams &cmp, DCPProfile::ApplyState &as);
|
||||
|
||||
void convertColorSpace(Imagefloat* image, const ColorManagementParams &cmp, const ColorTemp &wb);
|
||||
static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in);
|
||||
|
||||
@@ -318,7 +318,7 @@ private:
|
||||
int beg_tileW = wcr * tileWskip + tileWskip / 2.f - crW / 2.f;
|
||||
int beg_tileH = hcr * tileHskip + tileHskip / 2.f - crH / 2.f;
|
||||
PreviewProps ppP (beg_tileW, beg_tileH, crW, crH, skipP);
|
||||
imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw );
|
||||
imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.raw );
|
||||
//baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve);
|
||||
|
||||
// we only need image reduced to 1/4 here
|
||||
@@ -538,7 +538,7 @@ private:
|
||||
for (int wcr = 0; wcr <= 2; wcr++) {
|
||||
for (int hcr = 0; hcr <= 2; hcr++) {
|
||||
PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1);
|
||||
imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw);
|
||||
imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.raw);
|
||||
//baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve);
|
||||
|
||||
|
||||
@@ -698,7 +698,7 @@ private:
|
||||
}
|
||||
|
||||
baseImg = new Imagefloat (fw, fh);
|
||||
imgsrc->getImage (currWB, tr, baseImg, pp, params.toneCurve, params.icm, params.raw);
|
||||
imgsrc->getImage (currWB, tr, baseImg, pp, params.toneCurve, params.raw);
|
||||
|
||||
if (pl) {
|
||||
pl->setProgress (0.50);
|
||||
@@ -931,7 +931,7 @@ private:
|
||||
|
||||
autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000)
|
||||
DCPProfile::ApplyState as;
|
||||
DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as);
|
||||
DCPProfile *dcpProf = imgsrc->getDCP (params.icm, as);
|
||||
|
||||
LUTu histToneCurve;
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ void StdImageSource::getSampleFormat (const Glib::ustring &fname, IIOSampleForma
|
||||
* and RT's image data type (Image8, Image16 and Imagefloat), then it will
|
||||
* load the image into it
|
||||
*/
|
||||
int StdImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
int StdImageSource::load (const Glib::ustring &fname)
|
||||
{
|
||||
|
||||
fileName = fname;
|
||||
@@ -187,7 +187,7 @@ int StdImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void StdImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw)
|
||||
void StdImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw)
|
||||
{
|
||||
|
||||
// the code will use OpenMP as of now.
|
||||
|
||||
@@ -42,8 +42,8 @@ public:
|
||||
StdImageSource ();
|
||||
~StdImageSource ();
|
||||
|
||||
int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false);
|
||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw);
|
||||
int load (const Glib::ustring &fname);
|
||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw);
|
||||
ColorTemp getWB () const
|
||||
{
|
||||
return wb;
|
||||
|
||||
Reference in New Issue
Block a user