From 3755f5c18e782498e84dc9148defa3236fe0c1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Mon, 8 Jan 2018 17:57:21 +0100 Subject: [PATCH] Fix i586 build by @heckflosse (#4284) --- rtengine/color.cc | 4 ++-- rtengine/improcfun.cc | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rtengine/color.cc b/rtengine/color.cc index dbabb217b..706d0f36d 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -1786,7 +1786,7 @@ void Color::Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat & void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, const float wp[3][3], int width) { -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) vfloat maxvalfv = F2V(MAXVALF); vfloat c116v = F2V(116.f); vfloat c5242d88v = F2V(5242.88f); @@ -1794,7 +1794,7 @@ void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, vfloat c200v = F2V(200.f); #endif int i = 0; -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) for(;i < width - 3; i+=4) { const vfloat rv = LVFU(R[i]); const vfloat gv = LVFU(G[i]); diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 61b1809e0..569ba42f1 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -54,7 +54,7 @@ using namespace rtengine; // begin of helper function for rgbProc() void shadowToneCurve(const LUTf &shtonecurve, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize) { -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) vfloat cr = F2V(0.299f); vfloat cg = F2V(0.587f); vfloat cb = F2V(0.114f); @@ -62,7 +62,7 @@ void shadowToneCurve(const LUTf &shtonecurve, float *rtemp, float *gtemp, float for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) for (; j < tW - 3; j+=4, tj+=4) { vfloat rv = LVF(rtemp[ti * tileSize + tj]); @@ -95,14 +95,14 @@ void shadowToneCurve(const LUTf &shtonecurve, float *rtemp, float *gtemp, float void highlightToneCurve(const LUTf &hltonecurve, float *rtemp, float *gtemp, float *btemp, int istart, int tH, int jstart, int tW, int tileSize, float exp_scale, float comp, float hlrange) { -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) vfloat threev = F2V(3.f); vfloat maxvalfv = F2V(MAXVALF); #endif for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) for (; j < tW - 3; j+=4, tj+=4) { vfloat rv = LVF(rtemp[ti * tileSize + tj]); @@ -159,7 +159,7 @@ void proPhotoBlue(float *rtemp, float *gtemp, float *btemp, int istart, int tH, // this is a hack to avoid the blue=>black bug (Issue 2141) for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) for (; j < tW - 3; j+=4, tj+=4) { vfloat rv = LVF(rtemp[ti * tileSize + tj]); vfloat gv = LVF(gtemp[ti * tileSize + tj]); @@ -3763,7 +3763,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } else { for (int i = istart, ti = 0; i < tH; i++, ti++) { int j = jstart, tj = 0; -#ifdef __SSE2__ +#if defined( __SSE2__ ) && defined( __x86_64__ ) for (; j < tW - 3; j+=4, tj+=4) { //brightness/contrast STVF(rtemp[ti * TS + tj], tonecurve(LVF(rtemp[ti * TS + tj])));