Some more cherry-picking for 5.10 (#6937)
* Local adjustments - Show additional settings - link with complexity (#6899) * Change hishow -additional seeting - with complexity * Modify windows.yml and appimage.yml * Fixed bug in duplicate spot * Remove pre-dev builds * Update camconst.json white levels for 1DxII * Fix warnings: conversion to double/float, unused variables, register keyword * Fix crash when opening image in editor Do not access uninitialized raw image data. The raw data is requested when the demosaic mode is set to None and the cursor is moved over the image in the editor. It can occur before the raw data is loaded. * Fix sRGB working profile crash The sRGB working profile cannot be found under some conditions because the profile name is stored as a Glib::ustring and the same strings may not be equal when using different locales. Use std::string whenever comparing profile names. --------- Co-authored-by: Desmis <jdesmis@gmail.com> Co-authored-by: CarVac <airplaniac2002@gmail.com> Co-authored-by: Alexander Gruzintsev <0v3rt1r3d@gmail.com>
This commit is contained in:
parent
42817bffa4
commit
e438e0e604
@ -538,6 +538,10 @@ pkg_check_modules(LCMS REQUIRED lcms2>=2.6)
|
|||||||
pkg_check_modules(EXPAT REQUIRED expat>=2.1)
|
pkg_check_modules(EXPAT REQUIRED expat>=2.1)
|
||||||
pkg_check_modules(FFTW3F REQUIRED fftw3f)
|
pkg_check_modules(FFTW3F REQUIRED fftw3f)
|
||||||
|
|
||||||
|
# By default little-cms2 uses 'register' keyword which is deprecated and removed in c++17
|
||||||
|
# This definition forces not to use it
|
||||||
|
add_definitions("-DCMS_NO_REGISTER_KEYWORD")
|
||||||
|
|
||||||
#Set the appropriate FFTW flags on macOS
|
#Set the appropriate FFTW flags on macOS
|
||||||
if(APPLE AND OPTION_OMP)
|
if(APPLE AND OPTION_OMP)
|
||||||
set(EXTRA_LIB "-L${LOCAL_PREFIX}/lib -lfftw3f_omp -lfftw3f -lm")
|
set(EXTRA_LIB "-L${LOCAL_PREFIX}/lib -lfftw3f_omp -lfftw3f -lm")
|
||||||
|
@ -389,13 +389,18 @@ Camera constants:
|
|||||||
"ranges": {
|
"ranges": {
|
||||||
// black levels are read from raw masked pixels
|
// black levels are read from raw masked pixels
|
||||||
// white levels are same for all colors all ISOs, but safety margin vary on ISO
|
// white levels are same for all colors all ISOs, but safety margin vary on ISO
|
||||||
|
// actually not, 160 & 320 & 640 seem to have different white levels per color
|
||||||
"white": [
|
"white": [
|
||||||
{ "iso": 50, "levels": 16350 }, // typical for all ISOs: 16383, stdev 2.25
|
{ "iso": 50, "levels": 16350 }, // typical for all ISOs: 16383, stdev 2.25
|
||||||
{ "iso": 100, "levels": 16350 }, // stdev 2.25
|
{ "iso": 100, "levels": 16350 }, // stdev 2.25
|
||||||
{ "iso": [ 125, 160, 200, 250 ], "levels": 16340 }, // stdev 2.5
|
{ "iso": [ 125, 200, 250 ], "levels": 16340 }, // stdev 2.5
|
||||||
{ "iso": [ 320, 400, 500 ], "levels": 16330 }, // stdev 2.95
|
{ "iso": 160, "levels": [ 16340, 14450, 15600 ] }, // based on CarVac's testing
|
||||||
{ "iso": [ 640, 800, 1000 ], "levels": 16320 }, // stdev x, 4.0 , x
|
{ "iso": [ 400, 500 ], "levels": 16330 }, // stdev 2.95
|
||||||
{ "iso": [ 1250, 1600, 2000 ], "levels": 16300 }, // stdev x, 6.0 , x
|
{ "iso": 320, "levels": [ 16330, 16000, 16330 ] }, // based on CarVac's testing
|
||||||
|
{ "iso": [ 800, 1000 ], "levels": 16320 }, // stdev x, 4.0 , x
|
||||||
|
{ "iso": 640, "levels": [ 16320, 15800, 16320 ] }, // based on CarVac's testing
|
||||||
|
{ "iso": [ 1600, 2000 ], "levels": 16300 }, // stdev x, 6.0 , x
|
||||||
|
{ "iso": 1250, "levels": [ 16300, 16050, 16300 ] }, // based on CarVac's testing
|
||||||
{ "iso": [ 2500, 3200, 4000 ], "levels": 16250 }, // STDEV x, 9.8 , x
|
{ "iso": [ 2500, 3200, 4000 ], "levels": 16250 }, // STDEV x, 9.8 , x
|
||||||
{ "iso": [ 5000, 6400, 8000 ], "levels": 16150 }, // stdev x, 17, x
|
{ "iso": [ 5000, 6400, 8000 ], "levels": 16150 }, // stdev x, 17, x
|
||||||
{ "iso": [ 10000, 12800, 16000 ], "levels": 16100 }, // stdev x, 34 , x
|
{ "iso": [ 10000, 12800, 16000 ], "levels": 16100 }, // stdev x, 34 , x
|
||||||
|
@ -317,7 +317,6 @@ private:
|
|||||||
typedef std::map<std::string, std::vector<badPix> > bpList_t;
|
typedef std::map<std::string, std::vector<badPix> > bpList_t;
|
||||||
dfList_t dfList;
|
dfList_t dfList;
|
||||||
bpList_t bpList;
|
bpList_t bpList;
|
||||||
bool initialized;
|
|
||||||
Glib::ustring currentPath;
|
Glib::ustring currentPath;
|
||||||
dfInfo* addFileInfo(const Glib::ustring &filename, bool pool = true);
|
dfInfo* addFileInfo(const Glib::ustring &filename, bool pool = true);
|
||||||
dfInfo* find(const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t);
|
dfInfo* find(const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t);
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
#include <glibmm/fileutils.h>
|
#include <glibmm/fileutils.h>
|
||||||
@ -51,9 +52,9 @@ namespace
|
|||||||
// Not recursive
|
// Not recursive
|
||||||
void loadProfiles(
|
void loadProfiles(
|
||||||
const Glib::ustring& dirName,
|
const Glib::ustring& dirName,
|
||||||
std::map<Glib::ustring, cmsHPROFILE>* profiles,
|
std::map<std::string, cmsHPROFILE>* profiles,
|
||||||
std::map<Glib::ustring, rtengine::ProfileContent>* profileContents,
|
std::map<std::string, rtengine::ProfileContent>* profileContents,
|
||||||
std::map<Glib::ustring, Glib::ustring>* profileNames,
|
std::map<std::string, Glib::ustring>* profileNames,
|
||||||
bool nameUpper
|
bool nameUpper
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -114,8 +115,8 @@ void loadProfiles(
|
|||||||
bool loadProfile(
|
bool loadProfile(
|
||||||
const Glib::ustring& profile,
|
const Glib::ustring& profile,
|
||||||
const Glib::ustring& dirName,
|
const Glib::ustring& dirName,
|
||||||
std::map<Glib::ustring, cmsHPROFILE>* profiles,
|
std::map<std::string, cmsHPROFILE>* profiles,
|
||||||
std::map<Glib::ustring, rtengine::ProfileContent>* profileContents
|
std::map<std::string, rtengine::ProfileContent>* profileContents
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (dirName.empty() || profiles == nullptr) {
|
if (dirName.empty() || profiles == nullptr) {
|
||||||
@ -996,10 +997,10 @@ parse_error:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
using ProfileMap = std::map<Glib::ustring, cmsHPROFILE>;
|
using ProfileMap = std::map<std::string, cmsHPROFILE>;
|
||||||
using MatrixMap = std::map<Glib::ustring, TMatrix>;
|
using MatrixMap = std::map<std::string, TMatrix>;
|
||||||
using ContentMap = std::map<Glib::ustring, ProfileContent>;
|
using ContentMap = std::map<std::string, ProfileContent>;
|
||||||
using NameMap = std::map<Glib::ustring, Glib::ustring>;
|
using NameMap = std::map<std::string, Glib::ustring>;
|
||||||
|
|
||||||
ProfileMap wProfiles;
|
ProfileMap wProfiles;
|
||||||
// ProfileMap wProfilesGamma;
|
// ProfileMap wProfilesGamma;
|
||||||
|
@ -2990,7 +2990,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
|||||||
avoidrad(0.),
|
avoidrad(0.),
|
||||||
transitweak(1.0),
|
transitweak(1.0),
|
||||||
transitgrad(0.0),
|
transitgrad(0.0),
|
||||||
hishow(false),
|
hishow(options.complexity != 2),
|
||||||
activ(true),
|
activ(true),
|
||||||
blwh(false),
|
blwh(false),
|
||||||
recurs(false),
|
recurs(false),
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -743,6 +744,8 @@ void RawImageSource::getWBMults(const ColorTemp &ctemp, const RAWParams &raw, st
|
|||||||
|
|
||||||
void RawImageSource::getImage(const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw)
|
void RawImageSource::getImage(const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw)
|
||||||
{
|
{
|
||||||
|
assert(rawData.getHeight() == H && rawData.getWidth() == W);
|
||||||
|
|
||||||
MyMutex::MyLock lock(getImageMutex);
|
MyMutex::MyLock lock(getImageMutex);
|
||||||
|
|
||||||
tran = defTransform(ri, tran);
|
tran = defTransform(ri, tran);
|
||||||
@ -1744,6 +1747,8 @@ void RawImageSource::preprocess(const RAWParams &raw, const LensProfParams &lens
|
|||||||
|
|
||||||
void RawImageSource::demosaic(const RAWParams &raw, bool autoContrast, double &contrastThreshold, bool cache)
|
void RawImageSource::demosaic(const RAWParams &raw, bool autoContrast, double &contrastThreshold, bool cache)
|
||||||
{
|
{
|
||||||
|
assert(rawData.getHeight() == H && rawData.getWidth() == W);
|
||||||
|
|
||||||
MyTime t1, t2;
|
MyTime t1, t2;
|
||||||
t1.set();
|
t1.set();
|
||||||
|
|
||||||
@ -3837,6 +3842,8 @@ void RawImageSource::hlRecovery(const std::string &method, float* red, float* gr
|
|||||||
|
|
||||||
void RawImageSource::getAutoExpHistogram(LUTu & histogram, int& histcompr)
|
void RawImageSource::getAutoExpHistogram(LUTu & histogram, int& histcompr)
|
||||||
{
|
{
|
||||||
|
assert(rawData.getHeight() == H && rawData.getWidth() == W);
|
||||||
|
|
||||||
// BENCHFUN
|
// BENCHFUN
|
||||||
histcompr = 3;
|
histcompr = 3;
|
||||||
|
|
||||||
@ -5307,8 +5314,8 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double
|
|||||||
Glib::ustring profuse;
|
Glib::ustring profuse;
|
||||||
profuse = "JDCmax";
|
profuse = "JDCmax";
|
||||||
|
|
||||||
int limx = 0.05f;
|
float limx = 0.05f;
|
||||||
int limy = 0.04f;
|
float limy = 0.04f;
|
||||||
|
|
||||||
if (wbpar.itcwb_prim == "srgb") {
|
if (wbpar.itcwb_prim == "srgb") {
|
||||||
profuse = "sRGB";
|
profuse = "sRGB";
|
||||||
@ -7480,6 +7487,8 @@ void RawImageSource::getrgbloc(int begx, int begy, int yEn, int xEn, int cx, int
|
|||||||
|
|
||||||
void RawImageSource::getAutoWBMultipliersitc(bool extra, double & tempref, double & greenref, double & tempitc, double & greenitc, float &temp0, float &delta, int &bia, int &dread, int &kcam, int &nocam, float &studgood, float &minchrom, int &kmin, float &minhist, float &maxhist, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double & rm, double & gm, double & bm, const WBParams & wbpar, const ColorManagementParams & cmp, const RAWParams & raw, const ToneCurveParams &hrp)
|
void RawImageSource::getAutoWBMultipliersitc(bool extra, double & tempref, double & greenref, double & tempitc, double & greenitc, float &temp0, float &delta, int &bia, int &dread, int &kcam, int &nocam, float &studgood, float &minchrom, int &kmin, float &minhist, float &maxhist, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double & rm, double & gm, double & bm, const WBParams & wbpar, const ColorManagementParams & cmp, const RAWParams & raw, const ToneCurveParams &hrp)
|
||||||
{
|
{
|
||||||
|
assert(rawData.getHeight() == H && rawData.getWidth() == W);
|
||||||
|
|
||||||
// BENCHFUN
|
// BENCHFUN
|
||||||
constexpr double clipHigh = 64000.0;
|
constexpr double clipHigh = 64000.0;
|
||||||
|
|
||||||
@ -7704,6 +7713,8 @@ void RawImageSource::getAutoWBMultipliersitc(bool extra, double & tempref, doubl
|
|||||||
|
|
||||||
void RawImageSource::getAutoWBMultipliers(double &rm, double &gm, double &bm)
|
void RawImageSource::getAutoWBMultipliers(double &rm, double &gm, double &bm)
|
||||||
{
|
{
|
||||||
|
assert(rawData.getHeight() == H && rawData.getWidth() == W);
|
||||||
|
|
||||||
// BENCHFUN
|
// BENCHFUN
|
||||||
constexpr double clipHigh = 64000.0;
|
constexpr double clipHigh = 64000.0;
|
||||||
|
|
||||||
@ -7920,6 +7931,7 @@ void RawImageSource::getAutoWBMultipliers(double &rm, double &gm, double &bm)
|
|||||||
|
|
||||||
ColorTemp RawImageSource::getSpotWB(std::vector<Coord2D> &red, std::vector<Coord2D> &green, std::vector<Coord2D> &blue, int tran, double equal, StandardObserver observer)
|
ColorTemp RawImageSource::getSpotWB(std::vector<Coord2D> &red, std::vector<Coord2D> &green, std::vector<Coord2D> &blue, int tran, double equal, StandardObserver observer)
|
||||||
{
|
{
|
||||||
|
assert(rawData.getHeight() == H && rawData.getWidth() == W);
|
||||||
|
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
@ -8259,7 +8271,7 @@ void RawImageSource::init()
|
|||||||
|
|
||||||
void RawImageSource::getRawValues(int x, int y, int rotate, int &R, int &G, int &B)
|
void RawImageSource::getRawValues(int x, int y, int rotate, int &R, int &G, int &B)
|
||||||
{
|
{
|
||||||
if (d1x) { // Nikon D1x has special sensor. We just skip it
|
if (rawData.getWidth() != W || rawData.getHeight() != H || d1x) { // Nikon D1x has special sensor. We just skip it
|
||||||
R = G = B = 0;
|
R = G = B = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -8307,6 +8319,8 @@ bool RawImageSource::isGainMapSupported() const
|
|||||||
|
|
||||||
void RawImageSource::applyDngGainMap(const float black[4], const std::vector<GainMap> &gainMaps)
|
void RawImageSource::applyDngGainMap(const float black[4], const std::vector<GainMap> &gainMaps)
|
||||||
{
|
{
|
||||||
|
assert(rawData.getHeight() == H && rawData.getWidth() == W);
|
||||||
|
|
||||||
// now we can apply each gain map to raw_data
|
// now we can apply each gain map to raw_data
|
||||||
array2D<float> mvals[2][2];
|
array2D<float> mvals[2][2];
|
||||||
|
|
||||||
|
@ -393,7 +393,9 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath)
|
|||||||
|
|
||||||
char* dcpy = strdup (absDirPath.c_str());
|
char* dcpy = strdup (absDirPath.c_str());
|
||||||
char* dir = strtok (dcpy, "/\\");
|
char* dir = strtok (dcpy, "/\\");
|
||||||
|
#ifdef _WIN32
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
#endif
|
||||||
expandSuccess = true;
|
expandSuccess = true;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
@ -436,8 +438,9 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath)
|
|||||||
++ix;
|
++ix;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
#ifdef _WIN32
|
||||||
count++;
|
count++;
|
||||||
|
#endif
|
||||||
dir = strtok(nullptr, "/\\");
|
dir = strtok(nullptr, "/\\");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
class EditorPanel;
|
class EditorPanel;
|
||||||
class ExternalEditor;
|
struct ExternalEditor;
|
||||||
class RTWindow;
|
class RTWindow;
|
||||||
|
|
||||||
class EditWindow :
|
class EditWindow :
|
||||||
|
@ -445,7 +445,7 @@ void FlatField::setGainMap(bool enabled) {
|
|||||||
flatFieldFromMetaData->set_sensitive(enabled);
|
flatFieldFromMetaData->set_sensitive(enabled);
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
idle_register.add(
|
idle_register.add(
|
||||||
[this, enabled]() -> bool
|
[this]() -> bool
|
||||||
{
|
{
|
||||||
disableListener();
|
disableListener();
|
||||||
flatFieldFromMetaData->setValue(false);
|
flatFieldFromMetaData->setValue(false);
|
||||||
|
@ -845,6 +845,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited
|
|||||||
r.colorde = newSpot->colorde;
|
r.colorde = newSpot->colorde;
|
||||||
r.colorscope = newSpot->colorscope;
|
r.colorscope = newSpot->colorscope;
|
||||||
r.avoidrad = newSpot->avoidrad;
|
r.avoidrad = newSpot->avoidrad;
|
||||||
|
r.hishow = newSpot->hishow;
|
||||||
r.activ = newSpot->activ;
|
r.activ = newSpot->activ;
|
||||||
r.blwh = newSpot->blwh;
|
r.blwh = newSpot->blwh;
|
||||||
r.recurs = newSpot->recurs;
|
r.recurs = newSpot->recurs;
|
||||||
|
@ -30,7 +30,7 @@ namespace rtengine
|
|||||||
namespace procparams
|
namespace procparams
|
||||||
{
|
{
|
||||||
|
|
||||||
class ColorManagementParams;
|
struct ColorManagementParams;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace rtengine
|
|||||||
namespace procparams
|
namespace procparams
|
||||||
{
|
{
|
||||||
|
|
||||||
class ColorManagementParams;
|
struct ColorManagementParams;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user