merge with dev

This commit is contained in:
Desmis 2020-02-26 18:09:36 +01:00
commit a2095b0ee2
7 changed files with 246 additions and 366 deletions

View File

@ -1,5 +1,8 @@
name: macOS build
on: push
on:
push:
branches-ignore:
- '**'
jobs:
build:
runs-on: macos-latest

View File

@ -13,3 +13,7 @@ Build flags: ${CXX_FLAGS}
Link flags: ${LFLAGS}
OpenMP support: ${OPTION_OMP}
MMAP support: ${WITH_MYFILE_MMAP}
Build OS: ${BUILDINFO_OS}
Build date: ${BUILDINFO_DATE} ZULU
Build epoch: ${BUILDINFO_EPOCH}
Build UUID: ${BUILDINFO_UUID}

View File

@ -64,6 +64,11 @@ if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
set(GIT_NUMERIC_VERSION_BS "${GIT_NUMERIC_VERSION_BS}.${GIT_COMMITS_SINCE_TAG}")
endif()
execute_process(COMMAND uname -mrs OUTPUT_VARIABLE BUILDINFO_OS OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date -Ru OUTPUT_VARIABLE BUILDINFO_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date +%s OUTPUT_VARIABLE BUILDINFO_EPOCH OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND uuidgen COMMAND tr "A-Z" "a-z" OUTPUT_VARIABLE BUILDINFO_UUID OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Git checkout information:")
message(STATUS " Commit description: ${GIT_DESCRIBE}")
message(STATUS " Branch: ${GIT_BRANCH}")
@ -72,6 +77,11 @@ if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
message(STATUS " Commits since tag: ${GIT_COMMITS_SINCE_TAG}")
message(STATUS " Commits since branch: ${GIT_COMMITS_SINCE_BRANCH}")
message(STATUS " Version (unreliable): ${GIT_NUMERIC_VERSION_BS}")
message(STATUS "Build information:")
message(STATUS " Build OS: ${BUILDINFO_OS}")
message(STATUS " Build date: ${BUILDINFO_DATE}")
message(STATUS " Epoch: ${BUILDINFO_EPOCH}")
message(STATUS " UUID: ${BUILDINFO_UUID}")
if(NOT DEFINED CACHE_NAME_SUFFIX)
set(CACHE_NAME_SUFFIX "${GIT_DESCRIBE}")

View File

@ -1725,6 +1725,13 @@ void Color::Lab2XYZ(float L, float a, float b, float &x, float &y, float &z)
y = (LL > epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / kappa;
}
float Color::L2Y(float L)
{
const float LL = L / 327.68f;
const float fy = (c1By116 * LL) + c16By116; // (L+16)/116
return (LL > epskapf) ? 65535.f * fy * fy * fy : 65535.f * LL / kappaf;
}
void Color::L2XYZ(float L, float &x, float &y, float &z) // for black & white
{
float LL = L / 327.68f;
@ -1767,19 +1774,6 @@ inline float Color::computeXYZ2Lab(float f)
}
}
inline float Color::computeXYZ2LabY(float f)
{
if (f < 0.f) {
return 327.68 * (kappa * f / MAXVALF);
} else if (f > 65535.f) {
return 327.68f * (116.f * xcbrtf(f / MAXVALF) - 16.f);
} else {
return cachefy[f];
}
}
void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, const float wp[3][3], int width)
{

View File

@ -101,7 +101,6 @@ private:
#endif
static float computeXYZ2Lab(float f);
static float computeXYZ2LabY(float f);
public:
@ -185,6 +184,16 @@ public:
static void init ();
static void cleanup ();
static inline float computeXYZ2LabY(float f)
{
if (f < 0.f) {
return 327.68f * (kappa * f / MAXVALF);
} else if (f > 65535.f) {
return 327.68f * (116.f * xcbrtf(f / MAXVALF) - 16.f);
} else {
return cachefy[f];
}
}
/**
* @brief Extract luminance "sRGB" from red/green/blue values
@ -610,6 +619,7 @@ public:
*/
static void Lab2XYZ(float L, float a, float b, float &x, float &y, float &z);
static void L2XYZ(float L, float &x, float &y, float &z);
static float L2Y(float L);
#ifdef __SSE2__
static void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z);

View File

@ -200,29 +200,29 @@ public:
int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/);
void Tile_calc(int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip);
void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, int skip);
void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, const LUTf &wavclCurve, int skip);
void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L,
void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_L,
struct cont_params &cp, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili);
void WaveletcontAllLfinal(wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW,
void WaveletcontAllLfinal(const wavelet_decomposition &WaveletCoeffs_L, const cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW,
struct cont_params &cp, const bool useChannelA);
void WaveletAandBAllAB(wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b,
struct cont_params &cp, FlatCurve* hhcurve, bool hhutili);
void WaveletAandBAllAB(const wavelet_decomposition &WaveletCoeffs_a, const wavelet_decomposition &WaveletCoeffs_b,
const cont_params &cp, FlatCurve* hhcurve, bool hhutili);
void ContAllL(float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
int W_L, int H_L, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili);
void finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
void finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
void ContAllAB(LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
int W_ab, int H_ab, const bool useChannelA);
void Evaluate2(wavelet_decomposition &WaveletCoeffs_L,
void Evaluate2(const wavelet_decomposition &WaveletCoeffs_L,
float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
void Eval2(float ** WavCoeffs_L, int level,
int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min);
void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg);
void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);
void calckoe(float ** WavCoeffs_LL, const cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);

File diff suppressed because it is too large Load Diff