Merge pull request #4990 from Beep6581/better-logging
Reduce logging in verbose mode
This commit is contained in:
commit
94f4d05dc1
@ -1100,10 +1100,6 @@ void Crop::update(int todo)
|
||||
void Crop::freeAll()
|
||||
{
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("freeallcrop starts %d\n", (int)cropAllocated);
|
||||
}
|
||||
|
||||
if (cropAllocated) {
|
||||
if (origCrop) {
|
||||
delete origCrop;
|
||||
@ -1163,10 +1159,6 @@ bool check_need_larger_crop_for_lcp_distortion(int fw, int fh, int x, int y, int
|
||||
bool Crop::setCropSizes(int rcx, int rcy, int rcw, int rch, int skip, bool internal)
|
||||
{
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("setcropsizes before lock\n");
|
||||
}
|
||||
|
||||
if (!internal) {
|
||||
cropMutex.lock();
|
||||
}
|
||||
@ -1258,10 +1250,6 @@ bool Crop::setCropSizes(int rcx, int rcy, int rcw, int rch, int skip, bool inter
|
||||
int cw = skips(bw, skip);
|
||||
int ch = skips(bh, skip);
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("setsizes starts (%d, %d, %d, %d, %d, %d)\n", orW, orH, trafw, trafh, cw, ch);
|
||||
}
|
||||
|
||||
EditType editType = ET_PIPETTE;
|
||||
|
||||
if (const auto editProvider = PipetteBuffer::getDataProvider()) {
|
||||
@ -1326,10 +1314,6 @@ bool Crop::setCropSizes(int rcx, int rcy, int rcw, int rch, int skip, bool inter
|
||||
cropx = bx1;
|
||||
cropy = by1;
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("setsizes ends\n");
|
||||
}
|
||||
|
||||
if (!internal) {
|
||||
cropMutex.unlock();
|
||||
}
|
||||
|
@ -44,10 +44,6 @@ void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidt
|
||||
{
|
||||
int lastlevel = maxlevel;
|
||||
|
||||
if(settings->verbose) {
|
||||
printf("Dirpyr scaleprev=%i\n", scaleprev);
|
||||
}
|
||||
|
||||
float atten123 = (float) settings->level123_cbdl;
|
||||
|
||||
if(atten123 > 50.f) {
|
||||
@ -105,10 +101,6 @@ void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, int srcwidt
|
||||
|
||||
}
|
||||
|
||||
if(settings->verbose) {
|
||||
printf("CbDL mult0=%f 1=%f 2=%f 3=%f 4=%f 5=%f\n", multi[0], multi[1], multi[2], multi[3], multi[4], multi[5]);
|
||||
}
|
||||
|
||||
multi_array2D<float, maxlevel> dirpyrlo (srcwidth, srcheight);
|
||||
|
||||
level = 0;
|
||||
|
@ -653,10 +653,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
}
|
||||
|
||||
if (params.colorToning.enabled && params.colorToning.autosat && actListener) {
|
||||
if (settings->verbose) {
|
||||
printf("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi, (int)colourToningSatLimit, (int) colourToningSatLimitOpacity);
|
||||
}
|
||||
|
||||
actListener->autoColorTonChanged(indi, (int) colourToningSatLimit, (int)colourToningSatLimitOpacity); //change sliders autosat
|
||||
}
|
||||
|
||||
@ -965,10 +961,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
void ImProcCoordinator::freeAll()
|
||||
{
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("freeall starts %d\n", (int)allocated);
|
||||
}
|
||||
|
||||
if (allocated) {
|
||||
if (orig_prev != oprevi) {
|
||||
delete oprevi;
|
||||
@ -1010,10 +1002,6 @@ void ImProcCoordinator::freeAll()
|
||||
void ImProcCoordinator::setScale(int prevscale)
|
||||
{
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("setscale before lock\n");
|
||||
}
|
||||
|
||||
tr = getCoarseBitMask(params.coarse);
|
||||
|
||||
int nW, nH;
|
||||
@ -1027,10 +1015,6 @@ void ImProcCoordinator::setScale(int prevscale)
|
||||
imgsrc->getSize(pp, nW, nH);
|
||||
} while (nH < 400 && prevscale > 1 && (nW * nH < 1000000)); // sctually hardcoded values, perhaps a better choice is possible
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("setscale starts (%d, %d)\n", nW, nH);
|
||||
}
|
||||
|
||||
if (nW != pW || nH != pH) {
|
||||
|
||||
freeAll();
|
||||
@ -1054,19 +1038,10 @@ void ImProcCoordinator::setScale(int prevscale)
|
||||
fullw = fw;
|
||||
fullh = fh;
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("setscale ends\n");
|
||||
}
|
||||
|
||||
if (!sizeListeners.empty())
|
||||
for (size_t i = 0; i < sizeListeners.size(); i++) {
|
||||
sizeListeners[i]->sizeChanged(fullw, fullh, fw, fh);
|
||||
}
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("setscale ends2\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -335,8 +335,6 @@ Imagefloat* ImProcFunctions::lab2rgbOut(LabImage* lab, int cx, int cy, int cw, i
|
||||
#endif
|
||||
delete [] buffer;
|
||||
if (!modelDesc.empty()) {
|
||||
printf("dmdd=%s\n", modelDesc.c_str());
|
||||
|
||||
std::size_t pos = modelDesc.find("g");
|
||||
std::size_t posmid = modelDesc.find("s");
|
||||
std::size_t posend = modelDesc.find("!");
|
||||
|
@ -170,12 +170,6 @@ void ImProcFunctions::vibrance (LabImage* lab)
|
||||
{static_cast<float>(wiprof[2][0]), static_cast<float>(wiprof[2][1]), static_cast<float>(wiprof[2][2])}
|
||||
};
|
||||
|
||||
|
||||
if (settings->verbose) {
|
||||
printf ("vibrance: p0=%1.2f p1=%1.2f p2=%1.2f s0=%1.2f s1=%1.2f s2=%1.2f\n", p0, p1, p2, s0, s1, s2);
|
||||
printf (" pastel=%f satur=%f limit= %1.2f chromamean=%0.5f\n", 1.0f + chromaPastel, 1.0f + chromaSatur, limitpastelsatur, chromamean);
|
||||
}
|
||||
|
||||
#pragma omp parallel if (multiThread)
|
||||
{
|
||||
|
||||
|
@ -894,6 +894,10 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
||||
|
||||
DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfile::ApplyState &as)
|
||||
{
|
||||
if (cmp.inputProfile == "(camera)" || cmp.inputProfile == "(none)") {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DCPProfile *dcpProf = nullptr;
|
||||
cmsHPROFILE dummy;
|
||||
findInputProfile(cmp.inputProfile, nullptr, (static_cast<const FramesData*>(getMetaData()))->getCamera(), &dcpProf, dummy);
|
||||
|
@ -501,7 +501,6 @@ std::unique_ptr<LFModifier> LFDatabase::getModifier(const LFCamera &camera, cons
|
||||
|
||||
std::unique_ptr<LFModifier> LFDatabase::findModifier(const LensProfParams &lensProf, const FramesMetaData *idata, int width, int height, const CoarseTransformParams &coarse, int rawRotationDeg)
|
||||
{
|
||||
const LFDatabase *db = getInstance();
|
||||
Glib::ustring make, model, lens;
|
||||
float focallen = idata->getFocalLen();
|
||||
if (lensProf.lfAutoMatch()) {
|
||||
@ -516,6 +515,11 @@ std::unique_ptr<LFModifier> LFDatabase::findModifier(const LensProfParams &lensP
|
||||
model = lensProf.lfCameraModel;
|
||||
lens = lensProf.lfLens;
|
||||
}
|
||||
if (make.empty() || model.empty() || lens.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const LFDatabase *db = getInstance();
|
||||
LFCamera c = db->findCamera(make, model);
|
||||
LFLens l = db->findLens(lensProf.lfAutoMatch() ? c : LFCamera(), lens);
|
||||
if (focallen <= 0 && l.data_ && l.data_->MinFocal == l.data_->MaxFocal) {
|
||||
|
@ -421,7 +421,9 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL
|
||||
|
||||
// did we succeed?
|
||||
if ( err ) {
|
||||
printf ("Could not extract thumb from %s\n", fname.data());
|
||||
if (options.rtSettings.verbose) {
|
||||
std::cout << "Could not extract thumb from " << fname.c_str() << std::endl;
|
||||
}
|
||||
delete tpp;
|
||||
delete img;
|
||||
delete ri;
|
||||
|
@ -1623,26 +1623,6 @@ BrowserFilter FileCatalog::getFilter ()
|
||||
anyRankFilterActive || anyCLabelFilterActive || anyEditedFilterActive;
|
||||
}
|
||||
|
||||
if( options.rtSettings.verbose ) {
|
||||
printf ("\n**************** FileCatalog::getFilter *** AFTER STEP 1 \n");
|
||||
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
printf ("filter.showRanked[%i] = %i\n", i, filter.showRanked[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
printf ("filter.showCLabeled[%i] = %i\n", i, filter.showCLabeled[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
printf ("filter.showEdited[%i] = %i\n", i, filter.showEdited[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
printf ("filter.showRecentlySaved[%i] = %i\n", i, filter.showRecentlySaved[i]);
|
||||
}
|
||||
}
|
||||
|
||||
filter.multiselect = false;
|
||||
|
||||
/*
|
||||
@ -1672,28 +1652,6 @@ BrowserFilter FileCatalog::getFilter ()
|
||||
filter.showEdited[i] = anyEditedFilterActive ? bEdited[i]->get_active() : true;
|
||||
filter.showRecentlySaved[i] = anyRecentlySavedFilterActive ? bRecentlySaved[i]->get_active() : true;
|
||||
}
|
||||
|
||||
if( options.rtSettings.verbose ) {
|
||||
printf ("\n**************** FileCatalog::getFilter *** AFTER STEP 2 \n");
|
||||
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
printf ("filter.showRanked[%i] = %i\n", i, filter.showRanked[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
printf ("filter.showCLabeled[%i] = %i\n", i, filter.showCLabeled[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
printf ("filter.showEdited[%i] = %i\n", i, filter.showEdited[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
printf ("filter.showRecentlySaved[%i] = %i\n", i, filter.showRecentlySaved[i]);
|
||||
}
|
||||
|
||||
printf ("filter.multiselect = %i\n", filter.multiselect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user