partial fixed wrong old WB auto

This commit is contained in:
Desmis
2020-02-26 15:22:28 +01:00
parent cb0f81d0a0
commit 8cfc4e33af
3 changed files with 24 additions and 10 deletions

View File

@@ -37,6 +37,7 @@
#include "procparams.h"
#include "refreshmap.h"
#include "guidedfilter.h"
#include "../rtgui/version.h"
#include "../rtgui/options.h"
@@ -238,7 +239,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
// Check if any detail crops need high detail. If not, take a fast path short cut
if (!highDetailNeeded) {
for (size_t i = 0; i < crops.size(); i++) {
if (crops[i]->get_skip() == 1) { // skip=1 -> full resolution
if (crops[i]->get_skip() == 1) { // skip=1 -> full resolution
highDetailNeeded = true;
break;
}
@@ -255,10 +256,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
RAWParams rp = params->raw;
ColorManagementParams cmp = params->icm;
LCurveParams lcur = params->labCurve;
if (settings->verbose) {
printf("metwb2=%s \n", params->wb.method.c_str());
}
if (!highDetailNeeded) {
// if below 100% magnification, take a fast path
if (rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::NONE) && rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::MONO)) {
@@ -424,7 +422,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (settings->verbose) {
printf("automethod=%s \n", params->wb.method.c_str());
}
if (todo & (M_INIT | M_LINDENOISE | M_HDR)) {
MyMutex::MyLock initLock(minit); // Also used in crop window

View File

@@ -1305,6 +1305,8 @@ bool WBParams::operator !=(const WBParams& other) const
const std::vector<WBEntry>& WBParams::getWbEntries()
{
static const std::vector<WBEntry> wb_entries = {
{"Camera", WBEntry::Type::CAMERA, M("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f, 0.f},
// {"Auto", WBEntry::Type::AUTO, M("TP_WBALANCE_AUTO"), 0, 1.f, 1.f, 0.f},
@@ -1349,7 +1351,6 @@ const std::vector<WBEntry>& WBParams::getWbEntries()
// Should remain the last one
{"Custom", WBEntry::Type::CUSTOM, M("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f, 0.f}
};
return wb_entries;
}
@@ -4164,10 +4165,26 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Vibrance", "PastSatTog", pedited, vibrance.pastsattog, pedited->vibrance.pastsattog);
assignFromKeyfile(keyFile, "Vibrance", "SkinTonesCurve", pedited, vibrance.skintonescurve, pedited->vibrance.skintonescurve);
}
if (keyFile.has_group("White Balance")) {
assignFromKeyfile(keyFile, "White Balance", "Enabled", pedited, wb.enabled, pedited->wb.enabled);
assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method);
if (keyFile.has_key("White Balance", "Setting")) {
// if(ppVersion < 349) {
Glib::ustring prov = keyFile.get_string("White Balance", "Setting");
// printf("Prov=%s\n", prov.c_str());
if(prov == "Auto") {
printf("OK Auto\n");
prov = "autold";
wb.method = prov;
keyFile.set_string("White Balance", "Setting",wb.method );
if (pedited) {
pedited->wb.method = true;
}
assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method);
} else {
assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method);
}
}
assignFromKeyfile(keyFile, "White Balance", "Temperature", pedited, wb.temperature, pedited->wb.temperature);
assignFromKeyfile(keyFile, "White Balance", "Green", pedited, wb.green, pedited->wb.green);
assignFromKeyfile(keyFile, "White Balance", "Equal", pedited, wb.equal, pedited->wb.equal);

View File

@@ -1,7 +1,7 @@
#pragma once
// This number has to be incremented whenever the PP3 file format is modified or the behaviour of a tool changes
#define PPVERSION 346
#define PPVERSION 349
#define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified
/*