Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle

This commit is contained in:
DrSlony
2015-08-11 11:55:03 +02:00
parent effb46c3e1
commit 0e0cfb9b25
452 changed files with 133354 additions and 99460 deletions

View File

@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -29,7 +29,8 @@
#include "LUT.h"
#include "../rtgui/threadutils.h"
namespace rtengine {
namespace rtengine
{
using namespace procparams;
@@ -46,199 +47,267 @@ class Crop;
* but using this class' LUT and other precomputed parameters. The main preview area is displaying a non framed Crop object,
* while detail windows are framed Crop objects.
*/
class ImProcCoordinator : public StagedImageProcessor {
class ImProcCoordinator : public StagedImageProcessor
{
friend class Crop;
protected:
Imagefloat *orig_prev;
Imagefloat *oprevi;
LabImage *oprevl;
LabImage *nprevl;
Image8 *previmg;
Image8 *workimg;
CieImage *ncie;
protected:
Imagefloat *orig_prev;
Imagefloat *oprevi;
LabImage *oprevl;
LabImage *nprevl;
Image8 *previmg;
Image8 *workimg;
CieImage *ncie;
ImageSource* imgsrc;
ImageSource* imgsrc;
SHMap* shmap;
SHMap* shmap;
ColorTemp currWB;
ColorTemp autoWB;
ColorTemp currWB;
ColorTemp autoWB;
double lastAwbEqual;
double lastAwbEqual;
ImProcFunctions ipf;
ImProcFunctions ipf;
int scale;
bool highDetailPreprocessComputed;
bool highDetailRawComputed;
bool allocated;
int scale;
bool highDetailPreprocessComputed;
bool highDetailRawComputed;
bool allocated;
void freeAll ();
void freeAll ();
// Precomputed values used by DetailedCrop ----------------------------------------------
// Precomputed values used by DetailedCrop ----------------------------------------------
float bwAutoR, bwAutoG, bwAutoB;
float CAMMean;
LUTf hltonecurve;
LUTf shtonecurve;
LUTf tonecurve;
float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema;
float bwAutoR, bwAutoG, bwAutoB;
float CAMMean;
LUTf hltonecurve;
LUTf shtonecurve;
LUTf tonecurve;
float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema;
LUTf lumacurve;
LUTf chroma_acurve;
LUTf chroma_bcurve;
LUTf satcurve;
LUTf lhskcurve;
LUTf clcurve;
LUTf wavclCurve;
LUTf clToningcurve;
LUTf cl2Toningcurve;
LUTf Noisecurve;
LUTf NoiseCCcurve;
LUTf lumacurve;
LUTf chroma_acurve;
LUTf chroma_bcurve;
LUTf satcurve;
LUTf lhskcurve;
LUTf clcurve;
LUTf wavclCurve;
LUTf clToningcurve;
LUTf cl2Toningcurve;
LUTf Noisecurve;
LUTf NoiseCCcurve;
LUTu vhist16,vhist16bw;
LUTu lhist16,lhist16Cropped;
LUTu lhist16CAM,lhist16CroppedCAM;
LUTu lhist16CCAM;
LUTu histCropped;
LUTu lhist16Clad,lhist16CLlad,lhist16LClad,lhist16LLClad;
LUTu histRed, histRedRaw;
LUTu histGreen, histGreenRaw;
LUTu histBlue, histBlueRaw;
LUTu histLuma, histToneCurve, histToneCurveBW, histLCurve, histCCurve, histCLurve;
LUTu histLLCurve, histLCAM, histCCAM, histClad, bcabhist, histChroma;
LUTu vhist16, vhist16bw;
LUTu lhist16, lhist16Cropped;
LUTu lhist16CAM, lhist16CroppedCAM;
LUTu lhist16CCAM;
LUTu histCropped;
LUTu lhist16Clad, lhist16CLlad, lhist16LClad, lhist16LLClad;
LUTu histRed, histRedRaw;
LUTu histGreen, histGreenRaw;
LUTu histBlue, histBlueRaw;
LUTu histLuma, histToneCurve, histToneCurveBW, histLCurve, histCCurve, histCLurve;
LUTu histLLCurve, histLCAM, histCCAM, histClad, bcabhist, histChroma;
LUTf CAMBrightCurveJ, CAMBrightCurveQ;
LUTf CAMBrightCurveJ, CAMBrightCurveQ;
LUTf rCurve;
LUTf gCurve;
LUTf bCurve;
ToneCurve customToneCurve1;
ToneCurve customToneCurve2;
ColorGradientCurve ctColorCurve;
OpacityCurve ctOpacityCurve;
NoiseCurve noiseLCurve;
NoiseCurve noiseCCurve;
WavCurve wavCLVCurve;
WavOpacityCurveRG waOpacityCurveRG;
WavOpacityCurveBY waOpacityCurveBY;
WavOpacityCurveW waOpacityCurveW;
WavOpacityCurveWL waOpacityCurveWL;
ColorAppearance customColCurve1;
ColorAppearance customColCurve2;
ColorAppearance customColCurve3;
ToneCurve beforeToneCurveBW;
ToneCurve afterToneCurveBW;
LUTf rCurve;
LUTf gCurve;
LUTf bCurve;
ToneCurve customToneCurve1;
ToneCurve customToneCurve2;
ColorGradientCurve ctColorCurve;
OpacityCurve ctOpacityCurve;
NoiseCurve noiseLCurve;
NoiseCurve noiseCCurve;
WavCurve wavCLVCurve;
WavOpacityCurveRG waOpacityCurveRG;
WavOpacityCurveBY waOpacityCurveBY;
WavOpacityCurveW waOpacityCurveW;
WavOpacityCurveWL waOpacityCurveWL;
LUTu rcurvehist, rcurvehistCropped, rbeforehist;
LUTu gcurvehist, gcurvehistCropped, gbeforehist;
LUTu bcurvehist, bcurvehistCropped, bbeforehist;
ColorAppearance customColCurve1;
ColorAppearance customColCurve2;
ColorAppearance customColCurve3;
ToneCurve beforeToneCurveBW;
ToneCurve afterToneCurveBW;
// ------------------------------------------------------------------------------------
LUTu rcurvehist, rcurvehistCropped, rbeforehist;
LUTu gcurvehist, gcurvehistCropped, gbeforehist;
LUTu bcurvehist, bcurvehistCropped, bbeforehist;
int fw, fh, tr, fullw, fullh;
int pW, pH;
// ------------------------------------------------------------------------------------
ProgressListener* plistener;
PreviewImageListener* imageListener;
AutoExpListener* aeListener;
AutoCamListener* acListener;
AutoBWListener* abwListener;
AutoColorTonListener* actListener;
AutoChromaListener* adnListener;
WaveletListener* awavListener;
int fw, fh, tr, fullw, fullh;
int pW, pH;
HistogramListener* hListener;
std::vector<SizeListener*> sizeListeners;
ProgressListener* plistener;
PreviewImageListener* imageListener;
AutoExpListener* aeListener;
AutoCamListener* acListener;
AutoBWListener* abwListener;
AutoColorTonListener* actListener;
AutoChromaListener* adnListener;
WaveletListener* awavListener;
std::vector<Crop*> crops;
HistogramListener* hListener;
std::vector<SizeListener*> sizeListeners;
bool resultValid;
std::vector<Crop*> crops;
MyMutex minit; // to gain mutually exclusive access to ... to what exactly?
bool resultValid;
void progress (Glib::ustring str, int pr);
void reallocAll ();
void updateLRGBHistograms ();
void setScale (int prevscale);
void updatePreviewImage (int todo, Crop* cropCall= NULL);
MyMutex minit; // to gain mutually exclusive access to ... to what exactly?
MyMutex mProcessing;
ProcParams params;
void progress (Glib::ustring str, int pr);
void reallocAll ();
void updateLRGBHistograms ();
void setScale (int prevscale);
void updatePreviewImage (int todo, Crop* cropCall = NULL);
// members of the updater:
Glib::Thread* thread;
MyMutex updaterThreadStart;
MyMutex paramsUpdateMutex;
int changeSinceLast;
bool updaterRunning;
ProcParams nextParams;
bool destroying;
bool utili;
bool autili;
bool butili;
bool ccutili;
bool cclutili;
bool clcutili;
bool opautili;
bool wavcontlutili;
void startProcessing ();
void process ();
MyMutex mProcessing;
ProcParams params;
public:
// members of the updater:
Glib::Thread* thread;
MyMutex updaterThreadStart;
MyMutex paramsUpdateMutex;
int changeSinceLast;
bool updaterRunning;
ProcParams nextParams;
bool destroying;
bool utili;
bool autili;
bool butili;
bool ccutili;
bool cclutili;
bool clcutili;
bool opautili;
bool wavcontlutili;
void startProcessing ();
void process ();
ImProcCoordinator ();
~ImProcCoordinator ();
void assign (ImageSource* imgsrc);
public:
void getParams (procparams::ProcParams* dst) { *dst = params; }
ImProcCoordinator ();
~ImProcCoordinator ();
void assign (ImageSource* imgsrc);
void startProcessing(int changeCode);
ProcParams* beginUpdateParams ();
void endUpdateParams (ProcEvent change); // must be called after beginUpdateParams, triggers update
void endUpdateParams (int changeFlags);
void stopProcessing ();
void getParams (procparams::ProcParams* dst)
{
*dst = params;
}
void startProcessing(int changeCode);
ProcParams* beginUpdateParams ();
void endUpdateParams (ProcEvent change); // must be called after beginUpdateParams, triggers update
void endUpdateParams (int changeFlags);
void stopProcessing ();
void setPreviewScale (int scale) { setScale (scale); }
int getPreviewScale () { return scale; }
void setPreviewScale (int scale)
{
setScale (scale);
}
int getPreviewScale ()
{
return scale;
}
//void fullUpdatePreviewImage ();
//void fullUpdatePreviewImage ();
int getFullWidth () { return fullw; }
int getFullHeight () { return fullh; }
int getFullWidth ()
{
return fullw;
}
int getFullHeight ()
{
return fullh;
}
int getPreviewWidth () { return pW; }
int getPreviewHeight () { return pH; }
int getPreviewWidth ()
{
return pW;
}
int getPreviewHeight ()
{
return pH;
}
DetailedCrop* createCrop (::EditDataProvider *editDataProvider, bool isDetailWindow);
DetailedCrop* createCrop (::EditDataProvider *editDataProvider, bool isDetailWindow);
bool getAutoWB (double& temp, double& green, double equal);
void getCamWB (double& temp, double& green);
void getSpotWB (int x, int y, int rectSize, double& temp, double& green);
void getAutoCrop (double ratio, int &x, int &y, int &w, int &h);
bool getAutoWB (double& temp, double& green, double equal);
void getCamWB (double& temp, double& green);
void getSpotWB (int x, int y, int rectSize, double& temp, double& green);
void getAutoCrop (double ratio, int &x, int &y, int &w, int &h);
bool updateTryLock () {return updaterThreadStart.trylock();}
void updateUnLock () {updaterThreadStart.unlock();}
bool updateTryLock ()
{
return updaterThreadStart.trylock();
}
void updateUnLock ()
{
updaterThreadStart.unlock();
}
void setProgressListener (ProgressListener* pl) { plistener = pl; }
void setPreviewImageListener (PreviewImageListener* il) {imageListener = il; }
void setSizeListener (SizeListener* il) {sizeListeners.push_back (il); }
void delSizeListener (SizeListener* il) {std::vector<SizeListener*>::iterator it = std::find (sizeListeners.begin(), sizeListeners.end(), il); if (it!=sizeListeners.end()) sizeListeners.erase (it); }
void setAutoExpListener (AutoExpListener* ael) {aeListener = ael; }
void setHistogramListener(HistogramListener *h) {hListener = h; }
void setAutoCamListener (AutoCamListener* acl) {acListener = acl; }
void setAutoBWListener (AutoBWListener* abw) {abwListener = abw; }
void setAutoColorTonListener (AutoColorTonListener* bwct) {actListener = bwct; }
void setAutoChromaListener (AutoChromaListener* adn) {adnListener = adn; }
void setWaveletListener (WaveletListener* awa) {awavListener = awa; }
void setProgressListener (ProgressListener* pl)
{
plistener = pl;
}
void setPreviewImageListener (PreviewImageListener* il)
{
imageListener = il;
}
void setSizeListener (SizeListener* il)
{
sizeListeners.push_back (il);
}
void delSizeListener (SizeListener* il)
{
std::vector<SizeListener*>::iterator it = std::find (sizeListeners.begin(), sizeListeners.end(), il);
void saveInputICCReference (const Glib::ustring& fname, bool apply_wb);
if (it != sizeListeners.end()) {
sizeListeners.erase (it);
}
}
void setAutoExpListener (AutoExpListener* ael)
{
aeListener = ael;
}
void setHistogramListener(HistogramListener *h)
{
hListener = h;
}
void setAutoCamListener (AutoCamListener* acl)
{
acListener = acl;
}
void setAutoBWListener (AutoBWListener* abw)
{
abwListener = abw;
}
void setAutoColorTonListener (AutoColorTonListener* bwct)
{
actListener = bwct;
}
void setAutoChromaListener (AutoChromaListener* adn)
{
adnListener = adn;
}
void setWaveletListener (WaveletListener* awa)
{
awavListener = awa;
}
InitialImage* getInitialImage () { return imgsrc; }
void saveInputICCReference (const Glib::ustring& fname, bool apply_wb);
InitialImage* getInitialImage ()
{
return imgsrc;
}
};
}
#endif