Further reduction of include dependencies
This commit is contained in:
parent
b3b1008270
commit
6335b68a80
@ -29,6 +29,7 @@
|
||||
#include "array2D.h"
|
||||
#include "boxblur.h"
|
||||
#include "cplx_wavelet_dec.h"
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
#include "iccmatrices.h"
|
||||
#include "iccstore.h"
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gauss.h"
|
||||
#include "improcfun.h"
|
||||
#include "cieimage.h"
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
#include "labimage.h"
|
||||
#include "sleef.c"
|
||||
|
@ -20,9 +20,14 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "LUT.h"
|
||||
#include "opthelper.h"
|
||||
|
||||
template<typename T>
|
||||
class LUT;
|
||||
|
||||
using LUTu = LUT<uint32_t>;
|
||||
using LUTf = LUT<float>;
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
|
@ -25,13 +25,12 @@
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
#include "rt_math.h"
|
||||
#include "color.h"
|
||||
#include "flatcurvetypes.h"
|
||||
#include "diagonalcurvetypes.h"
|
||||
#include "pipettebuffer.h"
|
||||
#include "noncopyable.h"
|
||||
#include "LUT.h"
|
||||
|
||||
#include "sleef.c"
|
||||
#define CURVES_MIN_POLY_POINTS 1000
|
||||
|
||||
#include "rt_math.h"
|
||||
@ -894,12 +893,6 @@ public:
|
||||
float *r, float *g, float *b) const;
|
||||
};
|
||||
|
||||
class SatAndValueBlendingToneCurve : public ToneCurve
|
||||
{
|
||||
public:
|
||||
void Apply(float& r, float& g, float& b) const;
|
||||
};
|
||||
|
||||
class WeightedStdToneCurve : public ToneCurve
|
||||
{
|
||||
private:
|
||||
@ -1269,43 +1262,6 @@ inline void WeightedStdToneCurve::BatchApply(const size_t start, const size_t en
|
||||
#endif
|
||||
}
|
||||
|
||||
// Tone curve modifying the value channel only, preserving hue and saturation
|
||||
// values in 0xffff space
|
||||
inline void SatAndValueBlendingToneCurve::Apply (float& ir, float& ig, float& ib) const
|
||||
{
|
||||
|
||||
assert (lutToneCurve);
|
||||
|
||||
float r = CLIP(ir);
|
||||
float g = CLIP(ig);
|
||||
float b = CLIP(ib);
|
||||
|
||||
const float lum = (r + g + b) / 3.f;
|
||||
const float newLum = lutToneCurve[lum];
|
||||
|
||||
if (newLum == lum) {
|
||||
return;
|
||||
}
|
||||
|
||||
float h, s, v;
|
||||
Color::rgb2hsvtc(r, g, b, h, s, v);
|
||||
|
||||
float dV;
|
||||
if (newLum > lum) {
|
||||
// Linearly targeting Value = 1 and Saturation = 0
|
||||
const float coef = (newLum - lum) / (65535.f - lum);
|
||||
dV = (1.f - v) * coef;
|
||||
s *= 1.f - coef;
|
||||
} else {
|
||||
// Linearly targeting Value = 0
|
||||
const float coef = (newLum - lum) / lum ;
|
||||
dV = v * coef;
|
||||
}
|
||||
Color::hsv2rgbdcp(h, s, v + dV, r, g, b);
|
||||
|
||||
setUnlessOOG(ir, ig, ib, r, g, b);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#undef CLIPI
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "dcp.h"
|
||||
|
||||
#include "cJSON.h"
|
||||
#include "color.h"
|
||||
#include "iccmatrices.h"
|
||||
#include "iccstore.h"
|
||||
#include "imagefloat.h"
|
||||
|
@ -24,7 +24,9 @@
|
||||
|
||||
#include "array2D.h"
|
||||
#include "cieimage.h"
|
||||
#include "color.h"
|
||||
#include "improcfun.h"
|
||||
#include "LUT.h"
|
||||
#include "opthelper.h"
|
||||
#include "rt_math.h"
|
||||
#include "settings.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "color.h"
|
||||
#include "jaggedarray.h"
|
||||
#include "procparams.h"
|
||||
#include "rawimagesource.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "procparams.h"
|
||||
#include "rt_algo.h"
|
||||
#include "rtengine.h"
|
||||
|
||||
#include "sleef.c"
|
||||
//#define BENCHMARK
|
||||
#include "StopWatch.h"
|
||||
|
||||
|
@ -18,9 +18,11 @@
|
||||
*/
|
||||
#include <cmath>
|
||||
|
||||
#include "LUT.h"
|
||||
#include "rtengine.h"
|
||||
#include "rtthumbnail.h"
|
||||
#include "opthelper.h"
|
||||
#include "sleef.c"
|
||||
#include "rt_algo.h"
|
||||
#include "settings.h"
|
||||
#include "procparams.h"
|
||||
|
@ -27,8 +27,6 @@
|
||||
|
||||
#include <lcms2.h>
|
||||
|
||||
#include "color.h"
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "color.h"
|
||||
#include "procparams.h"
|
||||
#include "rtengine.h"
|
||||
|
||||
@ -45,3 +46,6 @@ int rtengine::getCoarseBitMask( const procparams::CoarseTransformParams &coarse)
|
||||
|
||||
return tr;
|
||||
}
|
||||
int rtengine::igammasrgb(float in) {
|
||||
return Color::igamma_srgb(in);
|
||||
}
|
||||
|
@ -21,9 +21,9 @@
|
||||
#include <vector>
|
||||
|
||||
#include <glibmm/ustring.h>
|
||||
#include <lcms2.h>
|
||||
|
||||
#include "alignedbuffer.h"
|
||||
#include "color.h"
|
||||
#include "coord2d.h"
|
||||
#include "imagedimensions.h"
|
||||
#include "LUT.h"
|
||||
@ -59,6 +59,7 @@ extern const char sImage16[];
|
||||
extern const char sImagefloat[];
|
||||
|
||||
int getCoarseBitMask(const procparams::CoarseTransformParams& coarse);
|
||||
int igammasrgb(float in);
|
||||
|
||||
enum TypeInterpolation { TI_Nearest, TI_Bilinear };
|
||||
|
||||
@ -964,9 +965,9 @@ public:
|
||||
convertTo<T, float>(r(i, j), r_);
|
||||
convertTo<T, float>(g(i, j), g_);
|
||||
convertTo<T, float>(b(i, j), b_);
|
||||
histogram[(int)Color::igamma_srgb (r_) >> histcompr]++;
|
||||
histogram[(int)Color::igamma_srgb (g_) >> histcompr]++;
|
||||
histogram[(int)Color::igamma_srgb (b_) >> histcompr]++;
|
||||
histogram[igammasrgb (r_) >> histcompr]++;
|
||||
histogram[igammasrgb (g_) >> histcompr]++;
|
||||
histogram[igammasrgb (b_) >> histcompr]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -982,9 +983,9 @@ public:
|
||||
convertTo<T, float>(r(i, j), r_);
|
||||
convertTo<T, float>(g(i, j), g_);
|
||||
convertTo<T, float>(b(i, j), b_);
|
||||
int rtemp = Color::igamma_srgb (r_);
|
||||
int gtemp = Color::igamma_srgb (g_);
|
||||
int btemp = Color::igamma_srgb (b_);
|
||||
int rtemp = igammasrgb (r_);
|
||||
int gtemp = igammasrgb (g_);
|
||||
int btemp = igammasrgb (b_);
|
||||
|
||||
histogram[rtemp >> compression]++;
|
||||
histogram[gtemp >> compression] += 2;
|
||||
@ -1573,9 +1574,9 @@ public:
|
||||
convertTo<T, float>(r(i, j), r_);
|
||||
convertTo<T, float>(g(i, j), g_);
|
||||
convertTo<T, float>(b(i, j), b_);
|
||||
histogram[(int)Color::igamma_srgb (r_) >> histcompr]++;
|
||||
histogram[(int)Color::igamma_srgb (g_) >> histcompr]++;
|
||||
histogram[(int)Color::igamma_srgb (b_) >> histcompr]++;
|
||||
histogram[igammasrgb (r_) >> histcompr]++;
|
||||
histogram[igammasrgb (g_) >> histcompr]++;
|
||||
histogram[igammasrgb (b_) >> histcompr]++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1591,9 +1592,9 @@ public:
|
||||
convertTo<T, float>(r(i, j), r_);
|
||||
convertTo<T, float>(g(i, j), g_);
|
||||
convertTo<T, float>(b(i, j), b_);
|
||||
int rtemp = Color::igamma_srgb (r_);
|
||||
int gtemp = Color::igamma_srgb (g_);
|
||||
int btemp = Color::igamma_srgb (b_);
|
||||
int rtemp = igammasrgb (r_);
|
||||
int gtemp = igammasrgb (g_);
|
||||
int btemp = igammasrgb (b_);
|
||||
|
||||
histogram[rtemp >> compression]++;
|
||||
histogram[gtemp >> compression] += 2;
|
||||
|
@ -28,6 +28,11 @@
|
||||
#include "LUT.h"
|
||||
#include "rtengine.h"
|
||||
|
||||
template<typename T>
|
||||
class LUT;
|
||||
|
||||
using LUTf = LUT<float>;
|
||||
|
||||
template<typename T, const size_t num>
|
||||
class multi_array2D;
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "improccoordinator.h"
|
||||
#include "clutstore.h"
|
||||
#include "ciecam02.h"
|
||||
#include "satandvalueblendingcurve.h"
|
||||
#include "StopWatch.h"
|
||||
#include "procparams.h"
|
||||
#include "../rtgui/ppversion.h"
|
||||
|
@ -20,13 +20,17 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "color.h"
|
||||
#include "coord2d.h"
|
||||
#include "gamutwarning.h"
|
||||
#include "LUT.h"
|
||||
#include "pipettebuffer.h"
|
||||
#include "shmap.h"
|
||||
|
||||
template<typename T>
|
||||
class LUT;
|
||||
|
||||
using LUTu = LUT<uint32_t>;
|
||||
using LUTf = LUT<float>;
|
||||
|
||||
template<typename T, const size_t num>
|
||||
class multi_array2D;
|
||||
namespace rtengine
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
#include <fftw3.h>
|
||||
#include "../rtgui/profilestorecombobox.h"
|
||||
#include "color.h"
|
||||
#include "rtengine.h"
|
||||
#include "iccstore.h"
|
||||
#include "dcp.h"
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#include "color.h"
|
||||
#include "guidedfilter.h"
|
||||
#include "iccstore.h"
|
||||
#include "imagefloat.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
#include "guidedfilter.h"
|
||||
#include "iccstore.h"
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
#include "gauss.h"
|
||||
#include "improcfun.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "improcfun.h"
|
||||
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
#include "gauss.h"
|
||||
#include "guidedfilter.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "color.h"
|
||||
#include "iccstore.h"
|
||||
#include "improcfun.h"
|
||||
#include "labimage.h"
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "../rtgui/threadutils.h"
|
||||
|
||||
#include "array2D.h"
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
#include "EdgePreservingDecomposition.h"
|
||||
#include "iccstore.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "median.h"
|
||||
#include "procparams.h"
|
||||
#include "rawimagesource.h"
|
||||
|
||||
#include "sleef.c"
|
||||
#include "../rtgui/multilangmgr.h"
|
||||
#include "../rtgui/options.h"
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "previewimage.h"
|
||||
|
||||
#include "color.h"
|
||||
#include "iimage.h"
|
||||
#include "iimage.h"
|
||||
#include "procparams.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <glibmm/miscutils.h>
|
||||
#include <glibmm/keyfile.h>
|
||||
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
#include "procparams.h"
|
||||
#include "utils.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <memory>
|
||||
|
||||
#include "array2D.h"
|
||||
#include "color.h"
|
||||
#include "colortemp.h"
|
||||
#include "iimage.h"
|
||||
#include "imagesource.h"
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
#include "iimage.h"
|
||||
#include "imageformat.h"
|
||||
#include "LUT.h"
|
||||
#include "procevents.h"
|
||||
#include "rawmetadatalocation.h"
|
||||
#include "rt_math.h"
|
||||
@ -43,6 +42,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
class LUT;
|
||||
|
||||
using LUTu = LUT<uint32_t>;
|
||||
|
||||
class EditDataProvider;
|
||||
namespace rtexif
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <glibmm/keyfile.h>
|
||||
|
||||
#include "cieimage.h"
|
||||
#include "color.h"
|
||||
#include "colortemp.h"
|
||||
#include "curves.h"
|
||||
#include "dcp.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "image16.h"
|
||||
#include "image8.h"
|
||||
#include "imagefloat.h"
|
||||
#include "LUT.h"
|
||||
#include "rawmetadatalocation.h"
|
||||
|
||||
#include "../rtgui/threadutils.h"
|
||||
|
70
rtengine/satandvalueblendingcurve.h
Normal file
70
rtengine/satandvalueblendingcurve.h
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* RawTherapee is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "color.h"
|
||||
#include "curves.h"
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
class SatAndValueBlendingToneCurve : public ToneCurve
|
||||
{
|
||||
public:
|
||||
void Apply(float& r, float& g, float& b) const;
|
||||
};
|
||||
|
||||
// Tone curve modifying the value channel only, preserving hue and saturation
|
||||
// values in 0xffff space
|
||||
inline void SatAndValueBlendingToneCurve::Apply (float& ir, float& ig, float& ib) const
|
||||
{
|
||||
|
||||
assert (lutToneCurve);
|
||||
|
||||
float r = CLIP(ir);
|
||||
float g = CLIP(ig);
|
||||
float b = CLIP(ib);
|
||||
|
||||
const float lum = (r + g + b) / 3.f;
|
||||
const float newLum = lutToneCurve[lum];
|
||||
|
||||
if (newLum == lum) {
|
||||
return;
|
||||
}
|
||||
|
||||
float h, s, v;
|
||||
Color::rgb2hsvtc(r, g, b, h, s, v);
|
||||
|
||||
float dV;
|
||||
if (newLum > lum) {
|
||||
// Linearly targeting Value = 1 and Saturation = 0
|
||||
const float coef = (newLum - lum) / (65535.f - lum);
|
||||
dV = (1.f - v) * coef;
|
||||
s *= 1.f - coef;
|
||||
} else {
|
||||
// Linearly targeting Value = 0
|
||||
const float coef = (newLum - lum) / lum ;
|
||||
dV = v * coef;
|
||||
}
|
||||
Color::hsv2rgbdcp(h, s, v + dV, r, g, b);
|
||||
|
||||
setUnlessOOG(ir, ig, ib, r, g, b);
|
||||
}
|
||||
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
#include "rtengine.h"
|
||||
#include "rt_math.h"
|
||||
#include "rawimagesource.h"
|
||||
#include "sleef.c"
|
||||
#include "jaggedarray.h"
|
||||
#undef THREAD_PRIORITY_NORMAL
|
||||
#include "opthelper.h"
|
||||
|
@ -18,9 +18,13 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "LUT.h"
|
||||
#include "noncopyable.h"
|
||||
|
||||
template<typename T>
|
||||
class LUT;
|
||||
|
||||
using LUTf = LUT<float>;
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "array2D.h"
|
||||
#include "color.h"
|
||||
#include "iccstore.h"
|
||||
#include "imagefloat.h"
|
||||
#include "improcfun.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "color.h"
|
||||
#include "rtengine.h"
|
||||
#include "rawimage.h"
|
||||
#include "rawimagesource.h"
|
||||
|
0
rtgui/bayerexposre.h
Normal file
0
rtgui/bayerexposre.h
Normal file
0
rtgui/bayerexposure.h
Normal file
0
rtgui/bayerexposure.h
Normal file
@ -7,6 +7,7 @@
|
||||
#include "eventmapper.h"
|
||||
#include "labgrid.h"
|
||||
#include "options.h"
|
||||
#include "../rtengine/color.h"
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "defringe.h"
|
||||
#include "options.h"
|
||||
|
||||
#include "../rtengine/color.h"
|
||||
#include "../rtengine/procparams.h"
|
||||
|
||||
using namespace rtengine;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "guiutils.h"
|
||||
#include "options.h"
|
||||
|
||||
#include "../rtengine/color.h"
|
||||
#include "../rtengine/procparams.h"
|
||||
|
||||
using namespace rtengine;
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "dirpyrequalizer.h"
|
||||
|
||||
#include "../rtengine/color.h"
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "options.h"
|
||||
|
||||
#include "../rtengine/color.h"
|
||||
#include "../rtengine/improcfun.h"
|
||||
#include "../rtengine/procparams.h"
|
||||
#include "editcallbacks.h"
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#include "labgrid.h"
|
||||
|
||||
#include "../rtengine/color.h"
|
||||
#include "options.h"
|
||||
#include "rtimage.h"
|
||||
|
||||
|
@ -26,9 +26,12 @@
|
||||
#include "curvelistener.h"
|
||||
#include "mycurve.h"
|
||||
|
||||
#include "../rtengine/LUT.h"
|
||||
#include "../rtengine/diagonalcurvetypes.h"
|
||||
|
||||
template<typename T>
|
||||
class LUT;
|
||||
|
||||
using LUTf = LUT<float>;
|
||||
|
||||
class DiagonalCurveDescr
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "mycurve.h"
|
||||
#include "rtimage.h"
|
||||
#include "options.h"
|
||||
#include "../rtengine/color.h"
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "guiutils.h"
|
||||
#include "rtimage.h"
|
||||
#include "options.h"
|
||||
#include "../rtengine/color.h"
|
||||
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
Loading…
x
Reference in New Issue
Block a user