From ec84e172246f6c9121b326c3a9a6372ab71c70a4 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sat, 3 Dec 2022 22:21:30 -0800 Subject: [PATCH] Restore cleanups to rtengine/dcp.* --- rtengine/dcp.cc | 140 ++++++++++++++++------------------ rtengine/dcp.h | 35 ++++----- rtengine/dcrop.cc | 2 +- rtengine/imagesource.h | 6 +- rtengine/improccoordinator.cc | 2 +- rtengine/improcfun.cc | 4 +- rtengine/improcfun.h | 5 +- rtengine/rawimagesource.cc | 2 +- rtengine/rawimagesource.h | 2 +- rtengine/rtthumbnail.cc | 2 +- rtengine/simpleprocess.cc | 2 +- 11 files changed, 98 insertions(+), 104 deletions(-) diff --git a/rtengine/dcp.cc b/rtengine/dcp.cc index 5fe078fa3..a858a0e71 100644 --- a/rtengine/dcp.cc +++ b/rtengine/dcp.cc @@ -38,13 +38,6 @@ #include "utils.h" #include "../rtgui/options.h" -namespace rtengine -{ - -extern const Settings* settings; - -} - using namespace rtengine; namespace @@ -55,7 +48,7 @@ namespace DCPProfile::Matrix invert3x3(const DCPProfile::Matrix& a) { DCPProfile::Matrix res = a; - if (!invertMatrix(a, res) && settings->verbose) { + if (!invertMatrix(a, res)) { std::cerr << "DCP matrix cannot be inverted! Expect weird output." << std::endl; } return res; @@ -340,8 +333,6 @@ double xyCoordToTemperature(const std::array& white_xy) // Search for line pair coordinate is between. double last_dt = 0.0; - double last_dv = 0.0; - double last_du = 0.0; for (uint32_t index = 1; index <= 30; ++index) { // Convert slope to delta-u and delta-v, with length 1. @@ -377,23 +368,11 @@ double xyCoordToTemperature(const std::array& white_xy) // Interpolate the temperature. res = 1.0e6 / (temp_table[index - 1].r * f + temp_table[index].r * (1.0 - f)); - - // Find delta from black body point to test coordinate. - uu = u - (temp_table [index - 1].u * f + temp_table [index].u * (1.0 - f)); - vv = v - (temp_table [index - 1].v * f + temp_table [index].v * (1.0 - f)); - // Interpolate vectors along slope. - du = du * (1.0 - f) + last_du * f; - dv = dv * (1.0 - f) + last_dv * f; - len = sqrt (du * du + dv * dv); - du /= len; - dv /= len; break; } // Try next line pair. last_dt = dt; - last_du = du; - last_dv = dv; } return res; @@ -486,9 +465,7 @@ public: { if (!file_) { #ifndef NDEBUG - if (settings->verbose) { - std::cerr << "ERROR: No file opened." << std::endl; - } + std::cerr << "ERROR: No file opened." << std::endl; #endif return false; } @@ -500,7 +477,7 @@ public: std::uint16_t bo; std::fread(&bo, 1, 2, file_); order_ = ByteOrder(bo); - + get2(); // Skip // Seek to IFD @@ -528,7 +505,7 @@ public: { return tags_.find(id) != tags_.end(); } - + std::string toString(int id) const { const Tags::const_iterator tag = tags_.find(id); @@ -558,24 +535,28 @@ public: } return 0; } + case BYTE: { if (offset < tag->second.value.size()) { return tag->second.value[offset]; } return 0; } + case SSHORT: { if (offset + 1 < tag->second.value.size()) { return static_cast(sget2(tag->second.value.data() + offset)); } return 0; } + case SHORT: { if (offset + 1 < tag->second.value.size()) { return sget2(tag->second.value.data() + offset); } return 0; } + case SLONG: case LONG: { if (offset + 3 < tag->second.value.size()) { @@ -583,6 +564,7 @@ public: } return 0; } + case SRATIONAL: case RATIONAL: { if (offset + 7 < tag->second.value.size()) { @@ -594,27 +576,29 @@ public: } return 0; } + case FLOAT: { return toDouble(id, offset); } + default: { return 0; } } } - + int toShort(int id, std::size_t offset = 0) const { return toInt(id, offset, SHORT); } - + double toDouble(int id, std::size_t offset = 0) const { const Tags::const_iterator tag = tags_.find(id); if (tag == tags_.end()) { return 0.0; } - + switch (tag->second.type) { case SBYTE: { if (offset < tag->second.value.size()) { @@ -622,24 +606,28 @@ public: } return 0.0; } + case BYTE: { if (offset < tag->second.value.size()) { return tag->second.value[offset]; } return 0.0; } + case SSHORT: { if (offset + 1 < tag->second.value.size()) { return static_cast(sget2(tag->second.value.data() + offset)); } return 0.0; } + case SHORT: { if (offset + 1 < tag->second.value.size()) { return sget2(tag->second.value.data() + offset); } return 0.0; } + case SLONG: case LONG: { if (offset + 3 < tag->second.value.size()) { @@ -647,6 +635,7 @@ public: } return 0.0; } + case SRATIONAL: case RATIONAL: { if (offset + 7 < tag->second.value.size()) { @@ -659,14 +648,17 @@ public: } return 0.0; } + case FLOAT: { union IntFloat { std::uint32_t i; float f; } conv; + conv.i = sget4(tag->second.value.data() + offset); - return conv.f; // IEEE FLOATs are already C format, they just need a recast + return conv.f; // IEEE FLOATs are already C format, they just need a recast } + default: { return 0.0; } @@ -689,9 +681,9 @@ private: TagType type; unsigned int count; }; - + using Tags = std::unordered_map; - + std::uint16_t sget2(const std::uint8_t* s) const { if (order_ == INTEL) { @@ -700,7 +692,7 @@ private: return s[0] << 8 | s[1]; } } - + std::uint32_t sget4(const std::uint8_t* s) const { if (order_ == INTEL) { @@ -709,16 +701,16 @@ private: return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]; } } - + std::uint16_t get2() - { + { std::uint16_t res = std::numeric_limits::max(); std::fread(&res, 1, 2, file_); return sget2(reinterpret_cast(&res)); } - + std::uint32_t get4() - { + { std::uint32_t res = std::numeric_limits::max(); std::fread(&res, 1, 4, file_); return sget4(reinterpret_cast(&res)); @@ -734,32 +726,32 @@ private: case UNDEFINED: { return 1; } - + case SHORT: case SSHORT: { return 2; } - + case LONG: case SLONG: case FLOAT: { return 4; } - + case RATIONAL: case SRATIONAL: case DOUBLE: { return 8; } } - + return 1; } bool parseTag(Tag& tag) { tag.id = get2(); - tag.type = TagType(get2()); + tag.type = TagType(get2()); tag.count = std::max(1U, get4()); // Filter out invalid tags @@ -767,7 +759,7 @@ private: // (only a small part of it will actually be parsed though) if ( tag.type == INVALID - || tag.type > DOUBLE + || tag.type > DOUBLE || tag.count > 10 * 1024 * 1024 ) { tag.type = INVALID; @@ -798,19 +790,19 @@ private: // Seek back to the saved position std::fseek(file_, saved_position, SEEK_SET); - + return true; } - + FILE* const file_; - + Tags tags_; ByteOrder order_; }; } // namespace -struct DCPProfile::ApplyState::Data { +struct DCPProfileApplyState::Data { float pro_photo[3][3]; float work[3][3]; bool already_pro_photo; @@ -819,14 +811,12 @@ struct DCPProfile::ApplyState::Data { float bl_scale; }; -DCPProfile::ApplyState::ApplyState() : +DCPProfileApplyState::DCPProfileApplyState() : data(new Data{}) { } -DCPProfile::ApplyState::~ApplyState() -{ -} +DCPProfileApplyState::~DCPProfileApplyState() = default; DCPProfile::DCPProfile(const Glib::ustring& filename) : has_color_matrix_1(false), @@ -1124,7 +1114,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : FILE* const file = g_fopen(filename.c_str(), "rb"); if (file == nullptr) { - //printf ("Unable to load DCP profile '%s' !", filename.c_str()); + printf ("Unable to load DCP profile '%s' !", filename.c_str()); return; } @@ -1170,9 +1160,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : // Color Matrix (one is always there) if (!md.find(TAG_KEY_COLOR_MATRIX_1)) { - if (settings->verbose) { - std::cerr << "DCP '" << filename << "' is missing 'ColorMatrix1'. Skipped." << std::endl; - } + std::cerr << "DCP '" << filename << "' is missing 'ColorMatrix1'. Skipped." << std::endl; fclose(file); return; } @@ -1408,25 +1396,25 @@ void DCPProfile::apply( const TMatrix work_matrix = ICCStore::getInstance()->workingSpaceInverseMatrix(working_space); + const Matrix xyz_cam = makeXyzCam(white_balance, pre_mul, cam_wb_matrix, preferred_illuminant); // Camera RGB to XYZ D50 matrix + const std::vector delta_base = makeHueSatMap(white_balance, preferred_illuminant); if (delta_base.empty()) { apply_hue_sat_map = false; } - const Matrix xyz_cam = makeXyzCam(white_balance, pre_mul, cam_wb_matrix, preferred_illuminant); // Camera RGB to XYZ D50 matrix - if (!apply_hue_sat_map) { // The fast path: No LUT --> Calculate matrix for direct conversion raw -> working space float mat[3][3] = {}; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { - + double temp = 0.0; for (int k = 0; k < 3; ++k) { - mat[i][j] += work_matrix[i][k] * xyz_cam[k][j]; + temp += work_matrix[i][k] * xyz_cam[k][j]; } - + mat[i][j] = temp; } } @@ -1452,11 +1440,11 @@ void DCPProfile::apply( for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { - + double temp = 0.0; for (int k = 0; k < 3; ++k) { - pro_photo[i][j] += prophoto_xyz[i][k] * xyz_cam[k][j]; + temp += prophoto_xyz[i][k] * xyz_cam[k][j]; } - + pro_photo[i][j] = temp; } } @@ -1464,11 +1452,11 @@ void DCPProfile::apply( for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { - + double temp = 0.0; for (int k = 0; k < 3; ++k) { - work[i][j] += work_matrix[i][k] * xyz_prophoto[k][j]; + temp += work_matrix[i][k] * xyz_prophoto[k][j]; } - + work[i][j] = temp; } } @@ -1510,7 +1498,7 @@ void DCPProfile::apply( } } -void DCPProfile::setStep2ApplyState(const Glib::ustring& working_space, bool use_tone_curve, bool apply_look_table, bool apply_baseline_exposure, ApplyState& as_out) +void DCPProfile::setStep2ApplyState(const Glib::ustring& working_space, bool use_tone_curve, bool apply_look_table, bool apply_baseline_exposure, DCPProfileApplyState& as_out) { as_out.data->use_tone_curve = use_tone_curve; as_out.data->apply_look_table = apply_look_table; @@ -1539,9 +1527,11 @@ void DCPProfile::setStep2ApplyState(const Glib::ustring& working_space, bool use for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { + double temp = 0.0; for (int k = 0; k < 3; k++) { - as_out.data->pro_photo[i][j] += prophoto_xyz[i][k] * mWork[k][j]; + temp += prophoto_xyz[i][k] * mWork[k][j]; } + as_out.data->pro_photo[i][j] = temp; } } @@ -1550,18 +1540,20 @@ void DCPProfile::setStep2ApplyState(const Glib::ustring& working_space, bool use for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { + double temp = 0.0; for (int k = 0; k < 3; k++) { - as_out.data->work[i][j] += mWork[i][k] * xyz_prophoto[k][j]; + temp += mWork[i][k] * xyz_prophoto[k][j]; } + as_out.data->work[i][j] = temp; } } } } -void DCPProfile::step2ApplyTile(float* rc, float* gc, float* bc, int width, int height, int tile_width, const ApplyState& as_in) const +void DCPProfile::step2ApplyTile(float* rc, float* gc, float* bc, int width, int height, int tile_width, const DCPProfileApplyState& as_in) const { -#define FCLIP(a) ((a)>0.0?((a)<65535.5?(a):65535.5):0.0) +#define FCLIP(a) ((a)>0.f?((a)<65535.5f?(a):65535.5f):0.f) #define CLIP01(a) ((a)>0?((a)<1?(a):1):0) float exp_scale = as_in.data->bl_scale; @@ -2000,7 +1992,7 @@ std::vector DCPProfile::makeHueSatMap(const ColorTemp& wh return res; } -void DCPProfile::hsdApply(const HsdTableInfo& table_info, const std::vector& table_base, float& h, float& s, float& v) const +inline void DCPProfile::hsdApply(const HsdTableInfo& table_info, const std::vector& table_base, float& h, float& s, float& v) const { // Apply the HueSatMap. Ported from Adobes reference implementation. float hue_shift; @@ -2234,7 +2226,7 @@ DCPProfile* DCPStore::getProfile(const Glib::ustring& filename) const if (res->isValid()) { // Add profile profile_cache[key] = res; - if (options.rtSettings.verbose) { + if (settings->verbose) { printf("DCP profile '%s' loaded from disk\n", filename.c_str()); } return res; diff --git a/rtengine/dcp.h b/rtengine/dcp.h index 378a70bf1..573349348 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -36,24 +36,11 @@ namespace rtengine class ColorTemp; class Imagefloat; +class DCPProfileApplyState; class DCPProfile final { public: - class ApplyState final - { - public: - ApplyState(); - ~ApplyState(); - - private: - struct Data; - - std::unique_ptr data; - - friend class DCPProfile; - }; - struct Illuminants { short light_source_1; short light_source_2; @@ -85,10 +72,10 @@ public: const ColorTemp& white_balance, const Triple& pre_mul, const Matrix& cam_wb_matrix, - bool apply_hue_sat_map + bool apply_hue_sat_map = true ) const; - void setStep2ApplyState(const Glib::ustring& working_space, bool use_tone_curve, bool apply_look_table, bool apply_baseline_exposure, ApplyState& as_out); - void step2ApplyTile(float* r, float* g, float* b, int width, int height, int tile_width, const ApplyState& as_in) const; + void setStep2ApplyState(const Glib::ustring& working_space, bool use_tone_curve, bool apply_look_table, bool apply_baseline_exposure, DCPProfileApplyState& as_out); + void step2ApplyTile(float* r, float* g, float* b, int width, int height, int tile_width, const DCPProfileApplyState& as_in) const; private: struct HsbModify { @@ -149,6 +136,20 @@ private: AdobeToneCurve tone_curve; }; +class DCPProfileApplyState final +{ +public: + DCPProfileApplyState(); + ~DCPProfileApplyState(); + +private: + struct Data; + + const std::unique_ptr data; + + friend class DCPProfile; +}; + class DCPStore final : public NonCopyable { diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index d644d2d1e..790a2bf0d 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -1152,7 +1152,7 @@ void Crop::update(int todo) } */ double rrm, ggm, bbm; - DCPProfile::ApplyState as; + DCPProfileApplyState as; DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, as); LUTu histToneCurve; diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 67bec48dd..d89681137 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -28,7 +28,6 @@ #include "rtengine.h" #include "colortemp.h" #include "array2D.h" -#include "dcp.h" template class LUT; @@ -42,8 +41,9 @@ namespace rtengine { class ColorTemp; -class Imagefloat; class DCPProfile; +class DCPProfileApplyState; +class Imagefloat; class RetinexgaintransmissionCurve; class RetinextransmissionCurve; @@ -137,7 +137,7 @@ public: virtual ImageMatrices* getImageMatrices () = 0; virtual bool isRAW () const = 0; - virtual DCPProfile* getDCP (const procparams::ColorManagementParams &cmp, DCPProfile::ApplyState &as) + virtual DCPProfile* getDCP (const procparams::ColorManagementParams &cmp, DCPProfileApplyState &as) { return nullptr; }; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 128420359..804e81ac0 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1300,7 +1300,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange) double ggm = 33.; double bbm = 33.; - DCPProfile::ApplyState as; + DCPProfileApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params->icm, as); ipf.rgbProc(oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, params->toneCurve.saturation, diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index a1f115820..861cc8d7d 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -2021,7 +2021,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int sat, const LUTf& rCurve, const LUTf& gCurve, const LUTf& bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve& ctColorCurve, const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clToningcurve, const LUTf& cl2Toningcurve, const ToneCurve& customToneCurve1, const ToneCurve& customToneCurve2, const ToneCurve& customToneCurvebw1, const ToneCurve& customToneCurvebw2, - double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState& asIn, + double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfileApplyState& asIn, LUTu& histToneCurve, size_t chunkSize, bool measure) { rgbProc(working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, sat, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, @@ -2035,7 +2035,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer const ColorGradientCurve& ctColorCurve, const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clToningcurve, const LUTf& cl2Toningcurve, const ToneCurve& customToneCurve1, const ToneCurve& customToneCurve2, const ToneCurve& customToneCurvebw1, const ToneCurve& customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, - DCPProfile *dcpProf, const DCPProfile::ApplyState& asIn, LUTu& histToneCurve, size_t chunkSize, bool measure) + DCPProfile *dcpProf, const DCPProfileApplyState& asIn, LUTu& histToneCurve, size_t chunkSize, bool measure) { std::unique_ptr stop; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index f21e9d7be..c11f0810b 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -49,6 +49,7 @@ namespace rtengine class ColorAppearance; class ColorGradientCurve; class DCPProfile; +class DCPProfileApplyState; class FlatCurve; class FramesMetaData; class LensCorrection; @@ -168,13 +169,13 @@ enum class BlurType { const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clcurve, const LUTf& cl2curve, const ToneCurve& customToneCurve1, const ToneCurve& customToneCurve2, const ToneCurve& customToneCurvebw1, const ToneCurve& customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, - const DCPProfile::ApplyState& asIn, LUTu& histToneCurve, size_t chunkSize = 1, bool measure = false); + const DCPProfileApplyState& asIn, LUTu& histToneCurve, size_t chunkSize = 1, bool measure = false); void rgbProc(Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve, int sat, const LUTf& rCurve, const LUTf& gCurve, const LUTf& bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve& ctColorCurve, const OpacityCurve& ctOpacityCurve, bool opautili, const LUTf& clcurve, const LUTf& cl2curve, const ToneCurve& customToneCurve1, const ToneCurve& customToneCurve2, const ToneCurve& customToneCurvebw1, const ToneCurve& customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, - int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState& asIn, LUTu& histToneCurve, size_t chunkSize = 1, bool measure = false); + int hlcomprthresh, DCPProfile *dcpProf, const DCPProfileApplyState& asIn, LUTu& histToneCurve, size_t chunkSize = 1, bool measure = false); void labtoning(float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, const LUTf & clToningcurve, const LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3]); void toning2col(float r, float g, float b, float &ro, float &go, float &bo, float iplow, float iphigh, float rl, float gl, float bl, float rh, float gh, float bh, float SatLow, float SatHigh, float balanS, float balanH, float reducac, int mode, int preser, float strProtect); void toningsmh(float r, float g, float b, float &ro, float &go, float &bo, float RedLow, float GreenLow, float BlueLow, float RedMed, float GreenMed, float BlueMed, float RedHigh, float GreenHigh, float BlueHigh, float reducac, int mode, float strProtect); diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 21258c9a7..8f8a71553 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -980,7 +980,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima } } -DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfile::ApplyState &as) +DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfileApplyState &as) { if (cmp.inputProfile == "(camera)" || cmp.inputProfile == "(none)") { return nullptr; diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index fecde5d96..16677b1da 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -184,7 +184,7 @@ public: void getAutoExpHistogram (LUTu & histogram, int& histcompr) override; void getRAWHistogram (LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw) override; void getAutoMatchedToneCurve(const procparams::ColorManagementParams &cp, std::vector &outCurve) override; - DCPProfile *getDCP(const procparams::ColorManagementParams &cmp, DCPProfile::ApplyState &as) override; + DCPProfile *getDCP(const procparams::ColorManagementParams &cmp, DCPProfileApplyState &as) override; void convertColorSpace(Imagefloat* image, const procparams::ColorManagementParams &cmp, const ColorTemp &wb) override; static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in); diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 5d6fa3aeb..30855b1f1 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1355,7 +1355,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT LabImage* labView = new LabImage (fw, fh); DCPProfile *dcpProf = nullptr; - DCPProfile::ApplyState as; + DCPProfileApplyState as; if (isRaw) { cmsHPROFILE dummy; diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 596720e80..6ae805d94 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1282,7 +1282,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; + DCPProfileApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, as); LUTu histToneCurve;