From badf92ba644dee87d3c8024a3ba902b76b8f6333 Mon Sep 17 00:00:00 2001 From: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com> Date: Fri, 16 Oct 2020 13:30:47 +0200 Subject: [PATCH] Fix for declared near() function, backport from ART. Various other minor changes. --- rtengine/ashift_dt.c | 3 +++ rtengine/dcp.cc | 7 +++---- rtengine/dcp.h | 3 +-- rtengine/imagedata.cc | 6 ++---- rtengine/imagesource.h | 4 ++-- rtengine/improcfun.h | 1 - 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/rtengine/ashift_dt.c b/rtengine/ashift_dt.c index ce19b6808..c7cd01ef1 100644 --- a/rtengine/ashift_dt.c +++ b/rtengine/ashift_dt.c @@ -103,6 +103,9 @@ using namespace std; //----------------------------------------------------------------------------- // RT: BEGIN COMMENT +#ifdef near +# undef near +#endif #if 0 DT_MODULE_INTROSPECTION(4, dt_iop_ashift_params_t) diff --git a/rtengine/dcp.cc b/rtengine/dcp.cc index 7d9295c71..8f829635b 100644 --- a/rtengine/dcp.cc +++ b/rtengine/dcp.cc @@ -1059,7 +1059,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : DCPMetadata md(file); if (!md.parse()) { - //printf ("Unable to load DCP profile '%s'.", filename.c_str()); + //printf ("Unable to load DCP profile '%s' !", filename.c_str()); return; } @@ -1331,8 +1331,7 @@ void DCPProfile::apply( const ColorTemp& white_balance, const Triple& pre_mul, const Matrix& cam_wb_matrix, - bool apply_hue_sat_map, - bool apply_look_table + bool apply_hue_sat_map ) const { @@ -1344,7 +1343,7 @@ void DCPProfile::apply( apply_hue_sat_map = false; } - const Matrix xyz_cam = makeXyzCam(white_balance, pre_mul, cam_wb_matrix, preferred_illuminant, apply_hue_sat_map || apply_look_table); // Camera RGB to XYZ D50 matrix + 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 diff --git a/rtengine/dcp.h b/rtengine/dcp.h index 69020c23b..d05fdb4cc 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -85,8 +85,7 @@ public: const ColorTemp& white_balance, const Triple& pre_mul, const Matrix& cam_wb_matrix, - bool apply_hue_sat_map, - bool apply_look_table + bool apply_hue_sat_map ) 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; diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 351303bda..3478bfc9f 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -68,11 +68,9 @@ const std::string& validateUft8(const std::string& str, const std::string& on_er return on_error; } -} - -FramesMetaData* FramesMetaData::fromFile(const Glib::ustring& fname, std::unique_ptr rml, bool firstFrameOnly) +FramesMetaData* FramesMetaData::fromFile(const Glib::ustring& fname) { - return new FramesData(fname, std::move(rml), firstFrameOnly); + return new FramesData(fname); } FramesData::FramesData(const Glib::ustring &fname) : diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 32e8e0b5d..87ec9cdb6 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -28,6 +28,7 @@ #include "rtengine.h" #include "colortemp.h" #include "array2D.h" +#include "dcp.h" template class LUT; @@ -41,9 +42,8 @@ namespace rtengine { class ColorTemp; -class DCPProfile; -class DCPProfile::ApplyState; class Imagefloat; +class DCPProfile; class RetinexgaintransmissionCurve; class RetinextransmissionCurve; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index c98e77b29..8672c7159 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -49,7 +49,6 @@ namespace rtengine class ColorAppearance; class ColorGradientCurve; class DCPProfile; -class DCPProfile::ApplyState; class FlatCurve; class FramesMetaData; class LensCorrection;