diff --git a/gmic-cflags.diff b/gmic-cflags.diff index 28369d9..b0d6ecf 100644 --- a/gmic-cflags.diff +++ b/gmic-cflags.diff @@ -1,26 +1,37 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -80,7 +80,7 @@ INCLUDE=include +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -80,11 +80,11 @@ INCLUDE=include IS_BETA_CFLAGS = # Flags that are mandatory to compile 'gmic'. + ifndef NO_STDLIB +-MANDATORY_CFLAGS += -std=c++11 -Dgmic_build -I$(USR)/$(INCLUDE) ++MANDATORY_CFLAGS += $(CFLAGS) -std=c++11 -Dgmic_build -I$(USR)/$(INCLUDE) + else -MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/$(INCLUDE) +MANDATORY_CFLAGS += $(CFLAGS) -Dgmic_build -I$(USR)/$(INCLUDE) + endif MANDATORY_LIBS += -L$(USR)/$(LIB) - ifeq ($(CC),g++) + ifeq ($(notdir $(CC)),g++) MANDATORY_CFLAGS += -Wall -W -@@ -99,7 +99,7 @@ DEBUG_CFLAGS = -Dcimg_verbosity=3 -g +@@ -108,11 +108,11 @@ DEBUG_CFLAGS = -Dcimg_verbosity=3 -g # Flags to enable optimizations. - ifeq ($(CC),g++) --OPT_CFLAGS = -O2 -fno-ipa-sra -mtune=generic # -fno-tree-pre # -ffast-math -+OPT_CFLAGS = -O2 # -mtune=generic # -fno-tree-pre # -ffast-math + ifeq ($(notdir $(CC)),g++) + ifeq ($(OS),Darwin) +-OPT_CFLAGS = -O2 -mtune=generic ++OPT_CFLAGS = -O2 # -mtune=generic + else +-OPT_CFLAGS = -O2 -fno-ipa-sra -mtune=generic ++OPT_CFLAGS = -O2 # -fno-ipa-sra # -mtune=generic endif - ifeq ($(CC),clang++) - OPT_CFLAGS = -O2 -@@ -130,13 +130,13 @@ OPENMP_LIBS = -lgomp + else + ifeq ($(CC),icpc) + OPT_CFLAGS = -fast +@@ -142,15 +142,15 @@ OPENMP_LIBS = -lgomp + # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). # This requires the presence of the X11 include and library files. # (package 'libx11-dev' on Debian). X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr @@ -36,8 +47,10 @@ Index: gmic-1.6.0.0/src/Makefile # Flags to enable image display, using GDI32. # This requires the presence of the GDI32 include and library files. -@@ -241,7 +241,8 @@ MINIMAL_UNIX_LIBS = $(MANDATORY_LIBS) $( - ${TIFF_LIBS} ${PNG_LIBS} $(ZLIB_LIBS) $(FFTW_LIBS) # $(OPENCV_LIBS) + GDI32_CFLAGS = -Dcimg_display=2 -Dcimg_appname=\\\"gmic\\\" +@@ -247,9 +247,10 @@ MINIMAL_UNIX_CFLAGS = $(MANDATORY_CFLAGS + MINIMAL_UNIX_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) \ + ${TIFF_LIBS} ${PNG_LIBS} $(ZLIB_LIBS) $(FFTW_LIBS) $(OPENCV_LIBS) # Unix : Static build. -STATIC_PATH = $(USR)/${LIB}/x86_64-linux-gnu @@ -46,8 +59,10 @@ Index: gmic-1.6.0.0/src/Makefile STATIC_EXTRA = STATIC_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0 STATIC_UNIX_LIBS = $(PARALLEL_LIBS) \ -@@ -279,12 +280,11 @@ STD_LIB_LIBS = $(MANDATORY_LIBS) $(PARAL - + $(STATIC_PATH)/libpng.a \ +@@ -316,14 +317,13 @@ STD_LIB_CFLAGS = $(MANDATORY_CFLAGS) $(P + STD_LIB_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(OPENMP_LIBS) $(FFTW_LIBS) $(ZLIB_LIBS) + endif # GMICol : Standard build. GMICOL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0 -GMICOL_UNIX_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS) /usr/lib/x86_64-linux-gnu/libfftw3.a /usr/lib/x86_64-linux-gnu/libfftw3_threads.a @@ -60,7 +75,9 @@ Index: gmic-1.6.0.0/src/Makefile # Main entries all: ifeq ($(OS),Unix) -@@ -307,7 +307,7 @@ endif + @echo "**" +@@ -344,9 +344,9 @@ else + endif endif gimp: @@ -69,7 +86,9 @@ Index: gmic-1.6.0.0/src/Makefile lib: $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib -@@ -321,7 +321,7 @@ endif + +@@ -358,9 +358,9 @@ else + endif # Entries for other configurations. linux: @@ -78,3 +97,4 @@ Index: gmic-1.6.0.0/src/Makefile solaris: $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic + diff --git a/gmic-docdir.diff b/gmic-docdir.diff index 912f76a..c16ac23 100644 --- a/gmic-docdir.diff +++ b/gmic-docdir.diff @@ -1,8 +1,9 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -71,6 +71,7 @@ endif +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -70,8 +70,9 @@ EXE = .exe + endif LIB=lib BIN=bin INCLUDE=include @@ -10,7 +11,9 @@ Index: gmic-1.6.0.0/src/Makefile #------------------------------------------------ # Set compilation flags for build customization. -@@ -415,7 +416,7 @@ uninstall: + #------------------------------------------------ +@@ -458,9 +459,9 @@ uninstall: + rm -f $(DESTDIR)$(USR)/$(INCLUDE)/gmic.h rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.0 rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so @@ -19,3 +22,4 @@ Index: gmic-1.6.0.0/src/Makefile rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz + distclean: clean diff --git a/gmic-make-zart.diff b/gmic-make-zart.diff index 1b3b675..a845258 100644 --- a/gmic-make-zart.diff +++ b/gmic-make-zart.diff @@ -1,8 +1,9 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -412,6 +412,10 @@ endif +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -457,8 +457,12 @@ endif + cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi if [ -d /opt/local/etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi @@ -13,3 +14,4 @@ Index: gmic-1.6.0.0/src/Makefile uninstall: rm -f $(DESTDIR)$(USR)/$(BIN)/gmic rm -f $(DESTDIR)$(USR)/$(INCLUDE)/gmic.h + rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.0 diff --git a/gmic-opencv.diff b/gmic-opencv.diff index 3ae71b2..441898d 100644 --- a/gmic-opencv.diff +++ b/gmic-opencv.diff @@ -1,17 +1,19 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -230,10 +230,10 @@ BOARD_LIBS = -lboard +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -238,12 +238,12 @@ BOARD_LIBS = -lboard + # Unix : Standard build. STD_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(PNG_CFLAGS) \ $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) \ -- $(EXR_CFLAGS) $(FFTW_CFLAGS) # $(OPENCV_CFLAGS) $(FFMPEG_CFLAGS) # $(MAGICK_CFLAGS) -+ $(EXR_CFLAGS) $(FFTW_CFLAGS) $(OPENCV_CFLAGS) # $(FFMPEG_CFLAGS) # $(MAGICK_CFLAGS) +- $(EXR_CFLAGS) $(FFTW_CFLAGS) # $(OPENCV_CFLAGS) $(MAGICK_CFLAGS) ++ $(EXR_CFLAGS) $(FFTW_CFLAGS) $(OPENCV_CFLAGS) # $(MAGICK_CFLAGS) STD_UNIX_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) $(XSHM_LIBS) $(PNG_LIBS) \ $(JPEG_LIBS) $(TIFF_LIBS) $(ZLIB_LIBS) \ -- $(EXR_LIBS) $(FFTW_LIBS) # $(OPENCV_LIBS) $(FFMPEG_LIBS) # $(MAGICK_LIBS) -+ $(EXR_LIBS) $(FFTW_LIBS) $(OPENCV_LIBS) # $(FFMPEG_LIBS) # $(MAGICK_LIBS) +- $(EXR_LIBS) $(FFTW_LIBS) # $(OPENCV_LIBS) # $(MAGICK_LIBS) ++ $(EXR_LIBS) $(FFTW_LIBS) $(OPENCV_LIBS) # $(MAGICK_LIBS) # Unix : Minimal build. MINIMAL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(DEBUG_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) \ + ${TIFF_CFLAGS} ${PNG_CFLAGS} $(ZLIB_CFLAGS) $(FFTW_CFLAGS) $(CHECKIMAGE_CFLAGS) # $(OPENCV_CFLAGS) diff --git a/gmic-openmp-gcc43.diff b/gmic-openmp-gcc43.diff index a4d3dd6..e7c586f 100644 --- a/gmic-openmp-gcc43.diff +++ b/gmic-openmp-gcc43.diff @@ -1,8 +1,8 @@ -Index: gmic-1.6.0.0/src/CImg.h +Index: gmic-1.6.0.3/src/CImg.h =================================================================== ---- gmic-1.6.0.0.orig/src/CImg.h -+++ gmic-1.6.0.0/src/CImg.h -@@ -220,8 +220,13 @@ +--- gmic-1.6.0.3.orig/src/CImg.h ++++ gmic-1.6.0.3/src/CImg.h +@@ -230,8 +230,13 @@ // OpenMP directives may be used in a (very) few CImg functions to get // advantages of multi-core CPUs. #ifdef cimg_use_openmp @@ -16,7 +16,7 @@ Index: gmic-1.6.0.0/src/CImg.h // Configure OpenCV support. // (http://opencv.willowgarage.com/wiki/) -@@ -10548,9 +10553,9 @@ namespace cimg_library_suffixed { +@@ -10697,9 +10702,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator+=(const t value) { @@ -27,7 +27,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd + value); return *this; -@@ -10579,9 +10584,9 @@ namespace cimg_library_suffixed { +@@ -10728,9 +10733,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -38,7 +38,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd + lmp(x,y,z,c)); ++ptrd; } } -@@ -10639,9 +10644,9 @@ namespace cimg_library_suffixed { +@@ -10788,9 +10793,9 @@ namespace cimg_library_suffixed { - Writing \c ++img is equivalent to \c img+=1. **/ CImg& operator++() { @@ -49,7 +49,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) ++*ptrd; return *this; -@@ -10708,9 +10713,9 @@ namespace cimg_library_suffixed { +@@ -10857,9 +10862,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator-=(const t value) { @@ -60,7 +60,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd - value); return *this; -@@ -10735,9 +10740,9 @@ namespace cimg_library_suffixed { +@@ -10884,9 +10889,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -71,7 +71,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd - lmp(x,y,z,c)); ++ptrd; } } -@@ -10777,9 +10782,9 @@ namespace cimg_library_suffixed { +@@ -10926,9 +10931,9 @@ namespace cimg_library_suffixed { Similar to operator++(), except that it performs a decrement instead of an increment. **/ CImg& operator--() { @@ -82,7 +82,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = *ptrd-(T)1; return *this; -@@ -10848,9 +10853,9 @@ namespace cimg_library_suffixed { +@@ -10997,9 +11002,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator*=(const t value) { @@ -93,7 +93,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd * value); return *this; -@@ -10875,9 +10880,9 @@ namespace cimg_library_suffixed { +@@ -11024,9 +11029,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -104,18 +104,20 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd * lmp(x,y,z,c)); ++ptrd; } } -@@ -10949,9 +10954,9 @@ namespace cimg_library_suffixed { +@@ -11097,10 +11102,10 @@ namespace cimg_library_suffixed { + "matrix (%u,%u,%u,%u,%p)", cimg_instance, img._width,img._height,img._depth,img._spectrum,img._data); CImg<_cimg_Tt> res(img._width,_height); - #ifdef cimg_use_openmp +-#ifdef cimg_use_openmp -#pragma omp parallel for if (size()>1024 && img.size()>1024) collapse(2) ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) +#pragma omp parallel for if (size()>1024 && img.size()>1024) COLLAPSE(2) cimg_forXY(res,i,j) { _cimg_Ttdouble value = 0; cimg_forX(*this,k) value+=(*this)(k,j)*img(i,k); res(i,j) = (_cimg_Tt)value; } #else -@@ -10969,9 +10974,9 @@ namespace cimg_library_suffixed { +@@ -11118,9 +11123,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator/=(const t value) { @@ -126,7 +128,13 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd / value); return *this; -@@ -10996,9 +11001,9 @@ namespace cimg_library_suffixed { +@@ -11140,14 +11145,14 @@ namespace cimg_library_suffixed { + T *ptrd = *expression=='<'?end()-1:_data; + if (*expression=='<') cimg_rofXYZC(*this,x,y,z,c) { *ptrd = (T)(*ptrd / mp(x,y,z,c)); --ptrd; } + else if (*expression=='>') cimg_forXYZC(*this,x,y,z,c) { *ptrd = (T)(*ptrd / mp(x,y,z,c)); ++ptrd; } + else { +-#ifdef cimg_use_openmp ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -137,7 +145,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd / lmp(x,y,z,c)); ++ptrd; } } -@@ -11066,9 +11071,9 @@ namespace cimg_library_suffixed { +@@ -11215,9 +11220,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator%=(const t value) { @@ -148,7 +156,13 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)cimg::mod(*ptrd,(T)value); return *this; -@@ -11093,9 +11098,9 @@ namespace cimg_library_suffixed { +@@ -11237,14 +11242,14 @@ namespace cimg_library_suffixed { + T *ptrd = *expression=='<'?end()-1:_data; + if (*expression=='<') cimg_rofXYZC(*this,x,y,z,c) { *ptrd = (T)cimg::mod(*ptrd,(T)mp(x,y,z,c)); --ptrd; } + else if (*expression=='>') cimg_forXYZC(*this,x,y,z,c) { *ptrd = (T)cimg::mod(*ptrd,(T)mp(x,y,z,c)); ++ptrd; } + else { +-#ifdef cimg_use_openmp ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -159,7 +173,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)cimg::mod(*ptrd,(T)lmp(x,y,z,c)); ++ptrd; } } -@@ -11165,9 +11170,9 @@ namespace cimg_library_suffixed { +@@ -11314,9 +11319,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator&=(const t value) { @@ -170,7 +184,13 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)((unsigned long)*ptrd & (unsigned long)value); return *this; -@@ -11194,9 +11199,9 @@ namespace cimg_library_suffixed { +@@ -11338,14 +11343,14 @@ namespace cimg_library_suffixed { + cimg_rofXYZC(*this,x,y,z,c) { *ptrd = (T)((unsigned long)*ptrd & (unsigned long)mp(x,y,z,c)); --ptrd; } + else if (*expression=='>') + cimg_forXYZC(*this,x,y,z,c) { *ptrd = (T)((unsigned long)*ptrd & (unsigned long)mp(x,y,z,c)); ++ptrd; } + else { +-#ifdef cimg_use_openmp ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -181,7 +201,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)((unsigned long)*ptrd & (unsigned long)lmp(x,y,z,c)); ++ptrd; } } -@@ -11266,9 +11271,9 @@ namespace cimg_library_suffixed { +@@ -11415,9 +11420,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator|=(const t value) { @@ -192,7 +212,13 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)((unsigned long)*ptrd | (unsigned long)value); return *this; -@@ -11295,9 +11300,9 @@ namespace cimg_library_suffixed { +@@ -11439,14 +11444,14 @@ namespace cimg_library_suffixed { + cimg_rofXYZC(*this,x,y,z,c) { *ptrd = (T)((unsigned long)*ptrd | (unsigned long)mp(x,y,z,c)); --ptrd; } + else if (*expression=='>') + cimg_forXYZC(*this,x,y,z,c) { *ptrd = (T)((unsigned long)*ptrd | (unsigned long)mp(x,y,z,c)); ++ptrd; } + else { +-#ifdef cimg_use_openmp ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -203,7 +229,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)((unsigned long)*ptrd | (unsigned long)lmp(x,y,z,c)); ++ptrd; } } -@@ -11369,9 +11374,9 @@ namespace cimg_library_suffixed { +@@ -11518,9 +11523,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator^=(const t value) { @@ -214,7 +240,13 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)((unsigned long)*ptrd ^ (unsigned long)value); return *this; -@@ -11400,9 +11405,9 @@ namespace cimg_library_suffixed { +@@ -11544,14 +11549,14 @@ namespace cimg_library_suffixed { + cimg_rofXYZC(*this,x,y,z,c) { *ptrd = (T)((unsigned long)*ptrd ^ (unsigned long)mp(x,y,z,c)); --ptrd; } + else if (*expression=='>') + cimg_forXYZC(*this,x,y,z,c) { *ptrd = (T)((unsigned long)*ptrd ^ (unsigned long)mp(x,y,z,c)); ++ptrd; } + else { +-#ifdef cimg_use_openmp ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -225,7 +257,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)((unsigned long)*ptrd ^ (unsigned long)lmp(x,y,z,c)); ++ptrd; } } -@@ -11474,9 +11479,9 @@ namespace cimg_library_suffixed { +@@ -11623,9 +11628,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator<<=(const t value) { @@ -236,7 +268,13 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(((long)*ptrd) << (int)value); return *this; -@@ -11501,9 +11506,9 @@ namespace cimg_library_suffixed { +@@ -11645,14 +11650,14 @@ namespace cimg_library_suffixed { + T *ptrd = *expression=='<'?end()-1:_data; + if (*expression=='<') cimg_rofXYZC(*this,x,y,z,c) { *ptrd = (T)((long)*ptrd << (int)mp(x,y,z,c)); --ptrd; } + else if (*expression=='>') cimg_forXYZC(*this,x,y,z,c) { *ptrd = (T)((long)*ptrd << (int)mp(x,y,z,c)); ++ptrd; } + else { +-#ifdef cimg_use_openmp ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -247,7 +285,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)((long)*ptrd << (int)lmp(x,y,z,c)); ++ptrd; } } -@@ -11574,9 +11579,9 @@ namespace cimg_library_suffixed { +@@ -11723,9 +11728,9 @@ namespace cimg_library_suffixed { **/ template CImg& operator>>=(const t value) { @@ -258,7 +296,13 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(((long)*ptrd) >> (int)value); return *this; -@@ -11601,9 +11606,9 @@ namespace cimg_library_suffixed { +@@ -11745,14 +11750,14 @@ namespace cimg_library_suffixed { + T *ptrd = *expression=='<'?end()-1:_data; + if (*expression=='<') cimg_rofXYZC(*this,x,y,z,c) { *ptrd = (T)((long)*ptrd >> (int)mp(x,y,z,c)); --ptrd; } + else if (*expression=='>') cimg_forXYZC(*this,x,y,z,c) { *ptrd = (T)((long)*ptrd >> (int)mp(x,y,z,c)); ++ptrd; } + else { +-#ifdef cimg_use_openmp ++#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -269,7 +313,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)((long)*ptrd >> (int)lmp(x,y,z,c)); ++ptrd; } } -@@ -14947,9 +14952,9 @@ namespace cimg_library_suffixed { +@@ -15108,9 +15113,9 @@ namespace cimg_library_suffixed { \image html ref_sqr.jpg **/ CImg& sqr() { @@ -280,7 +324,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) { const T val = *ptrd; *ptrd = (T)(val*val); }; return *this; -@@ -14974,9 +14979,9 @@ namespace cimg_library_suffixed { +@@ -15135,9 +15140,9 @@ namespace cimg_library_suffixed { \image html ref_sqrt.jpg **/ CImg& sqrt() { @@ -291,7 +335,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::sqrt((double)*ptrd); return *this; -@@ -14995,9 +15000,9 @@ namespace cimg_library_suffixed { +@@ -15156,9 +15161,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& exp() { @@ -302,7 +346,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::exp((double)*ptrd); return *this; -@@ -15017,9 +15022,9 @@ namespace cimg_library_suffixed { +@@ -15178,9 +15183,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& log() { @@ -313,7 +357,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::log((double)*ptrd); return *this; -@@ -15039,9 +15044,9 @@ namespace cimg_library_suffixed { +@@ -15200,9 +15205,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& log2() { @@ -324,7 +368,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)cimg::log2((double)*ptrd); return *this; -@@ -15061,9 +15066,9 @@ namespace cimg_library_suffixed { +@@ -15222,9 +15227,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& log10() { @@ -335,7 +379,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::log10((double)*ptrd); return *this; -@@ -15082,9 +15087,9 @@ namespace cimg_library_suffixed { +@@ -15243,9 +15248,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& abs() { @@ -346,7 +390,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = cimg::abs(*ptrd); return *this; -@@ -15108,9 +15113,9 @@ namespace cimg_library_suffixed { +@@ -15269,9 +15274,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& sign() { @@ -357,7 +401,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = cimg::sign(*ptrd); return *this; -@@ -15130,9 +15135,9 @@ namespace cimg_library_suffixed { +@@ -15291,9 +15296,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& cos() { @@ -368,7 +412,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::cos((double)*ptrd); return *this; -@@ -15152,9 +15157,9 @@ namespace cimg_library_suffixed { +@@ -15313,9 +15318,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& sin() { @@ -379,7 +423,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::sin((double)*ptrd); return *this; -@@ -15175,9 +15180,9 @@ namespace cimg_library_suffixed { +@@ -15336,9 +15341,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& sinc() { @@ -390,7 +434,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)cimg::sinc((double)*ptrd); return *this; -@@ -15197,9 +15202,9 @@ namespace cimg_library_suffixed { +@@ -15358,9 +15363,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& tan() { @@ -401,7 +445,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::tan((double)*ptrd); return *this; -@@ -15219,9 +15224,9 @@ namespace cimg_library_suffixed { +@@ -15380,9 +15385,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& cosh() { @@ -412,7 +456,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::cosh((double)*ptrd); return *this; -@@ -15241,9 +15246,9 @@ namespace cimg_library_suffixed { +@@ -15402,9 +15407,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& sinh() { @@ -423,7 +467,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::sinh((double)*ptrd); return *this; -@@ -15263,9 +15268,9 @@ namespace cimg_library_suffixed { +@@ -15424,9 +15429,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& tanh() { @@ -434,7 +478,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::tanh((double)*ptrd); return *this; -@@ -15285,9 +15290,9 @@ namespace cimg_library_suffixed { +@@ -15446,9 +15451,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& acos() { @@ -445,7 +489,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::acos((double)*ptrd); return *this; -@@ -15307,9 +15312,9 @@ namespace cimg_library_suffixed { +@@ -15468,9 +15473,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& asin() { @@ -456,7 +500,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::asin((double)*ptrd); return *this; -@@ -15329,9 +15334,9 @@ namespace cimg_library_suffixed { +@@ -15490,9 +15495,9 @@ namespace cimg_library_suffixed { - The \newinstance returns a \c CImg image, if the pixel type \c T is \e not float-valued. **/ CImg& atan() { @@ -467,7 +511,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::atan((double)*ptrd); return *this; -@@ -15458,37 +15463,37 @@ namespace cimg_library_suffixed { +@@ -15619,37 +15624,37 @@ namespace cimg_library_suffixed { **/ CImg& pow(const double p) { if (is_empty()) return *this; @@ -510,7 +554,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) { const T val = *ptrd; *ptrd = (T)(1/std::sqrt((double)val)); } return *this; -@@ -15497,22 +15502,22 @@ namespace cimg_library_suffixed { +@@ -15658,22 +15663,22 @@ namespace cimg_library_suffixed { if (p==0.5) return sqrt(); if (p==1) return *this; if (p==2) return sqr(); @@ -536,7 +580,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)std::pow((double)*ptrd,p); return *this; -@@ -15543,9 +15548,9 @@ namespace cimg_library_suffixed { +@@ -15704,9 +15709,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -547,7 +591,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)std::pow((double)*ptrd,lmp(x,y,z,c)); ++ptrd; } } -@@ -15602,9 +15607,9 @@ namespace cimg_library_suffixed { +@@ -15763,9 +15768,9 @@ namespace cimg_library_suffixed { Similar to operator<<=(unsigned int), except that it performs a left rotation instead of a left shift. **/ CImg& rol(const unsigned int n=1) { @@ -558,7 +602,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)cimg::rol(*ptrd,n); return *this; -@@ -15636,9 +15641,9 @@ namespace cimg_library_suffixed { +@@ -15797,9 +15802,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -569,7 +613,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)cimg::rol(*ptrd,(unsigned int)lmp(x,y,z,c)); ++ptrd; } } -@@ -15695,9 +15700,9 @@ namespace cimg_library_suffixed { +@@ -15856,9 +15861,9 @@ namespace cimg_library_suffixed { Similar to operator>>=(unsigned int), except that it performs a right rotation instead of a right shift. **/ CImg& ror(const unsigned int n=1) { @@ -580,7 +624,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)cimg::ror(*ptrd,n); return *this; -@@ -15729,9 +15734,9 @@ namespace cimg_library_suffixed { +@@ -15890,9 +15895,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -591,7 +635,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)cimg::ror(*ptrd,(unsigned int)lmp(x,y,z,c)); ++ptrd; } } -@@ -15790,9 +15795,9 @@ namespace cimg_library_suffixed { +@@ -15951,9 +15956,9 @@ namespace cimg_library_suffixed { \f$\mathrm{min}(I_{(x,y,z,c)},\mathrm{val})\f$. **/ CImg& min(const T val) { @@ -602,7 +646,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = cimg::min(*ptrd,val); return *this; -@@ -15850,9 +15855,9 @@ namespace cimg_library_suffixed { +@@ -16011,9 +16016,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -613,7 +657,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)cimg::min(*ptrd,(T)lmp(x,y,z,c)); ++ptrd; } } -@@ -15887,9 +15892,9 @@ namespace cimg_library_suffixed { +@@ -16048,9 +16053,9 @@ namespace cimg_library_suffixed { \f$\mathrm{max}(I_{(x,y,z,c)},\mathrm{val})\f$. **/ CImg& max(const T val) { @@ -624,7 +668,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = cimg::max(*ptrd,val); return *this; -@@ -15947,9 +15952,9 @@ namespace cimg_library_suffixed { +@@ -16108,9 +16113,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -635,7 +679,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)cimg::max(*ptrd,(T)lmp(x,y,z,c)); ++ptrd; } } -@@ -18509,9 +18514,9 @@ namespace cimg_library_suffixed { +@@ -18672,9 +18677,9 @@ namespace cimg_library_suffixed { if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -646,7 +690,7 @@ Index: gmic-1.6.0.0/src/CImg.h T *ptrd = data(0,y,z,c); cimg_forX(*this,x) *ptrd++ = (T)lmp(x,y,z,c); } -@@ -18744,9 +18749,9 @@ namespace cimg_library_suffixed { +@@ -18985,9 +18990,9 @@ namespace cimg_library_suffixed { - \c 1: Forward. **/ CImg& round(const double y=1, const int rounding_type=0) { @@ -657,7 +701,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = cimg::round(*ptrd,y,rounding_type); return *this; -@@ -18855,9 +18860,9 @@ namespace cimg_library_suffixed { +@@ -19096,9 +19101,9 @@ namespace cimg_library_suffixed { T m, M = max_min(m); const Tfloat fm = (Tfloat)m, fM = (Tfloat)M; if (m==M) return fill(min_value); @@ -668,7 +712,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (T)((*ptrd-fm)/(fM-fm)*(b-a)+a); return *this; -@@ -18879,9 +18884,9 @@ namespace cimg_library_suffixed { +@@ -19120,9 +19125,9 @@ namespace cimg_library_suffixed { **/ CImg& normalize() { const unsigned long whd = (unsigned long)_width*_height*_depth; @@ -679,7 +723,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) { T *ptrd = data(0,y,z,0); cimg_forX(*this,x) { -@@ -18925,9 +18930,9 @@ namespace cimg_library_suffixed { +@@ -19166,9 +19171,9 @@ namespace cimg_library_suffixed { CImg res(_width,_height,_depth); switch (norm_type) { case -1 : { // Linf norm @@ -690,7 +734,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) { const unsigned long off = offset(0,y,z); const T *ptrs = _data + off; -@@ -18941,9 +18946,9 @@ namespace cimg_library_suffixed { +@@ -19182,9 +19187,9 @@ namespace cimg_library_suffixed { } } break; case 1 : { // L1 norm @@ -701,7 +745,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) { const unsigned long off = offset(0,y,z); const T *ptrs = _data + off; -@@ -18957,9 +18962,9 @@ namespace cimg_library_suffixed { +@@ -19198,9 +19203,9 @@ namespace cimg_library_suffixed { } } break; default : { // L2 norm @@ -712,7 +756,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) { const unsigned long off = offset(0,y,z); const T *ptrs = _data + off; -@@ -18989,9 +18994,9 @@ namespace cimg_library_suffixed { +@@ -19230,9 +19235,9 @@ namespace cimg_library_suffixed { **/ CImg& cut(const T min_value, const T max_value) { if (is_empty()) return *this; @@ -723,7 +767,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = (*ptrdb)?b:*ptrd); return *this; -@@ -19022,16 +19027,16 @@ namespace cimg_library_suffixed { +@@ -19263,16 +19268,16 @@ namespace cimg_library_suffixed { if (is_empty()) return *this; Tfloat m, M = (Tfloat)max_min(m), range = M - m; if (range>0) { @@ -742,7 +786,7 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) { const unsigned int val = (unsigned int)((*ptrd-m)*nb_levels/range); -@@ -19061,27 +19066,27 @@ namespace cimg_library_suffixed { +@@ -19302,27 +19307,27 @@ namespace cimg_library_suffixed { CImg& threshold(const T value, const bool soft_threshold=false, const bool strict_threshold=false) { if (is_empty()) return *this; if (strict_threshold) { @@ -774,18 +818,18 @@ Index: gmic-1.6.0.0/src/CImg.h #endif cimg_rof(*this,ptrd,T) *ptrd = *ptrd>=value?(T)1:(T)0; } -@@ -19158,9 +19163,9 @@ namespace cimg_library_suffixed { - T vmin = min_value hist = get_histogram(nb_levels,vmin,vmax); unsigned long cumul = 0; cimg_forX(hist,pos) { cumul+=hist[pos]; hist[pos] = cumul; } + if (!cumul) cumul = 1; -#ifdef cimg_use_openmp +#if defined(cimg_use_openmp) && !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) #pragma omp parallel for if (size()>=1048576) #endif cimg_rof(*this,ptrd,T) { const int pos = (int)((*ptrd-vmin)*(nb_levels-1)/(vmax-vmin)); -@@ -19374,9 +19379,9 @@ namespace cimg_library_suffixed { +@@ -19616,9 +19621,9 @@ namespace cimg_library_suffixed { } else { // Non-dithered versions switch (_spectrum) { case 1 : { // Optimized for scalars. @@ -796,7 +840,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) { tuint *ptrd = res.data(0,y,z); for (const T *ptrs0 = data(0,y,z), *ptrs_end = ptrs0 + _width; ptrs0 _mask = mask.get_shared_channel(c%mask._spectrum); if (is_normalized) { // Normalized correlation. const Ttfloat _M = (Ttfloat)_mask.magnitude(2), M = _M*_M; @@ -1523,7 +1567,7 @@ Index: gmic-1.6.0.0/src/CImg.h for (int z = mz1; z=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Ttfloat val = 0, N = 0; -@@ -24582,9 +24587,9 @@ namespace cimg_library_suffixed { +@@ -24773,9 +24778,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = (Ttfloat)(N?val/std::sqrt(N):0); } else @@ -1545,7 +1589,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(res,y,z) for (int x = 0; x=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Ttfloat val = 0, N = 0; -@@ -24599,9 +24604,9 @@ namespace cimg_library_suffixed { +@@ -24790,9 +24795,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = (Ttfloat)(N?val/std::sqrt(N):0); } } else { // Classical correlation. @@ -1556,7 +1600,7 @@ Index: gmic-1.6.0.0/src/CImg.h for (int z = mz1; z=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Ttfloat val = 0; -@@ -24626,9 +24631,9 @@ namespace cimg_library_suffixed { +@@ -24817,9 +24822,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = (Ttfloat)val; } else @@ -1578,7 +1622,51 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(res,y,z) for (int x = 0; x=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Ttfloat val = 0; -@@ -24699,9 +24704,9 @@ namespace cimg_library_suffixed { +@@ -24857,9 +24862,9 @@ namespace cimg_library_suffixed { + CImg& cumulate(const char axis=0) { + switch (cimg::uncase(axis)) { + case 'x' : + #ifdef cimg_use_openmp +-#pragma omp parallel for collapse(3) if (_width>=512 && _height*_depth*_spectrum>=16) ++#pragma omp parallel for COLLAPSE(3) if (_width>=512 && _height*_depth*_spectrum>=16) + #endif + cimg_forYZC(*this,y,z,c) { + T *ptrd = data(0,y,z,c); + Tlong cumul = 0; +@@ -24868,9 +24873,9 @@ namespace cimg_library_suffixed { + break; + case 'y' : { + const unsigned long w = (unsigned long)_width; + #ifdef cimg_use_openmp +-#pragma omp parallel for collapse(3) if (_height>=512 && _width*_depth*_spectrum>=16) ++#pragma omp parallel for COLLAPSE(3) if (_height>=512 && _width*_depth*_spectrum>=16) + #endif + cimg_forXZC(*this,x,z,c) { + T *ptrd = data(x,0,z,c); + Tlong cumul = 0; +@@ -24879,9 +24884,9 @@ namespace cimg_library_suffixed { + } break; + case 'z' : { + const unsigned long wh = (unsigned long)_width*_height; + #ifdef cimg_use_openmp +-#pragma omp parallel for collapse(3) if (_depth>=512 && _width*_depth*_spectrum>=16) ++#pragma omp parallel for COLLAPSE(3) if (_depth>=512 && _width*_depth*_spectrum>=16) + #endif + cimg_forXYC(*this,x,y,c) { + T *ptrd = data(x,y,0,c); + Tlong cumul = 0; +@@ -24890,9 +24895,9 @@ namespace cimg_library_suffixed { + } break; + case 'c' : { + const unsigned long whd = (unsigned long)_width*_height*_depth; + #ifdef cimg_use_openmp +-#pragma omp parallel for collapse(3) if (_spectrum>=512 && _width*_height*_depth>=16) ++#pragma omp parallel for COLLAPSE(3) if (_spectrum>=512 && _width*_height*_depth>=16) + #endif + cimg_forXYZ(*this,x,y,z) { + T *ptrd = data(x,y,z,0); + Tlong cumul = 0; +@@ -24967,9 +24972,9 @@ namespace cimg_library_suffixed { const CImg _img = get_shared_channel(c%_spectrum); const CImg _mask = mask.get_shared_channel(c%mask._spectrum); if (is_normalized) { // Normalized erosion. @@ -1589,7 +1677,7 @@ Index: gmic-1.6.0.0/src/CImg.h for (int z = mz1; z=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt min_val = cimg::type::max(); -@@ -24732,9 +24737,9 @@ namespace cimg_library_suffixed { +@@ -25000,9 +25005,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = min_val; } else @@ -1611,7 +1699,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(res,y,z) for (int x = 0; x=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt min_val = cimg::type::max(); -@@ -24749,9 +24754,9 @@ namespace cimg_library_suffixed { +@@ -25017,9 +25022,9 @@ namespace cimg_library_suffixed { } } else { // Classical erosion. @@ -1622,7 +1710,7 @@ Index: gmic-1.6.0.0/src/CImg.h for (int z = mz1; z=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt min_val = cimg::type::max(); -@@ -24780,9 +24785,9 @@ namespace cimg_library_suffixed { +@@ -25048,9 +25053,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = min_val; } else @@ -1644,7 +1732,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(res,y,z) for (int x = 0; x=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt min_val = cimg::type::max(); -@@ -24810,9 +24815,9 @@ namespace cimg_library_suffixed { +@@ -25078,9 +25083,9 @@ namespace cimg_library_suffixed { if (sx>1 && _width>1) { // Along X-axis. const int L = width(), off = 1, s = (int)sx, _s1 = s/2, _s2 = s - _s1, s1 = _s1>L?L:_s1, s2 = _s2>L?L:_s2; CImg buf(L); @@ -1655,7 +1743,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZC(*this,y,z,c) { T *const ptrdb = buf._data, *ptrd = buf._data, *const ptrde = buf._data + L - 1; const T *const ptrsb = data(0,y,z,c), *ptrs = ptrsb, *const ptrse = ptrs + L*off - off; -@@ -24853,9 +24858,9 @@ namespace cimg_library_suffixed { +@@ -25121,9 +25126,9 @@ namespace cimg_library_suffixed { const int L = height(), off = width(), s = (int)sy, _s1 = s/2, _s2 = s - _s1, s1 = _s1>L?L:_s1, s2 = _s2>L?L:_s2; CImg buf(L); @@ -1666,7 +1754,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXZC(*this,x,z,c) { T *const ptrdb = buf._data, *ptrd = ptrdb, *const ptrde = buf._data + L - 1; const T *const ptrsb = data(x,0,z,c), *ptrs = ptrsb, *const ptrse = ptrs + L*off - off; -@@ -24897,9 +24902,9 @@ namespace cimg_library_suffixed { +@@ -25165,9 +25170,9 @@ namespace cimg_library_suffixed { const int L = depth(), off = width()*height(), s = (int)sz, _s1 = s/2, _s2 = s - _s1, s1 = _s1>L?L:_s1, s2 = _s2>L?L:_s2; CImg buf(L); @@ -1677,7 +1765,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYC(*this,x,y,c) { T *const ptrdb = buf._data, *ptrd = ptrdb, *const ptrde = buf._data + L - 1; const T *const ptrsb = data(x,y,0,c), *ptrs = ptrsb, *const ptrse = ptrs + L*off - off; -@@ -24988,9 +24993,9 @@ namespace cimg_library_suffixed { +@@ -25256,9 +25261,9 @@ namespace cimg_library_suffixed { const CImg _img = get_shared_channel(c%_spectrum); const CImg _mask = mask.get_shared_channel(c%mask._spectrum); if (is_normalized) { // Normalized dilation. @@ -1688,7 +1776,7 @@ Index: gmic-1.6.0.0/src/CImg.h for (int z = mz1; z=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt max_val = cimg::type::min(); -@@ -25021,9 +25026,9 @@ namespace cimg_library_suffixed { +@@ -25289,9 +25294,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = max_val; } else @@ -1710,7 +1798,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) for (int x = 0; x=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt max_val = cimg::type::min(); -@@ -25037,9 +25042,9 @@ namespace cimg_library_suffixed { +@@ -25305,9 +25310,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = max_val; } } else { // Classical dilation. @@ -1721,7 +1809,7 @@ Index: gmic-1.6.0.0/src/CImg.h for (int z = mz1; z=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt max_val = cimg::type::min(); -@@ -25068,9 +25073,9 @@ namespace cimg_library_suffixed { +@@ -25336,9 +25341,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = max_val; } else @@ -1743,7 +1831,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(res,y,z) for (int x = 0; x=mye || z=mze)?++x:((x=mxe)?++x:(x=mxe))) { Tt max_val = cimg::type::min(); -@@ -25098,9 +25103,9 @@ namespace cimg_library_suffixed { +@@ -25366,9 +25371,9 @@ namespace cimg_library_suffixed { if (sx>1 && _width>1) { // Along X-axis. const int L = width(), off = 1, s = (int)sx, _s2 = s/2 + 1, _s1 = s - _s2, s1 = _s1>L?L:_s1, s2 = _s2>L?L:_s2; CImg buf(L); @@ -1754,7 +1842,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZC(*this,y,z,c) { T *const ptrdb = buf._data, *ptrd = ptrdb, *const ptrde = buf._data + L - 1; const T *const ptrsb = data(0,y,z,c), *ptrs = ptrsb, *const ptrse = ptrs + L*off - off; -@@ -25142,9 +25147,9 @@ namespace cimg_library_suffixed { +@@ -25410,9 +25415,9 @@ namespace cimg_library_suffixed { const int L = height(), off = width(), s = (int)sy, _s2 = s/2 + 1, _s1 = s - _s2, s1 = _s1>L?L:_s1, s2 = _s2>L?L:_s2; CImg buf(L); @@ -1765,7 +1853,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXZC(*this,x,z,c) { T *const ptrdb = buf._data, *ptrd = ptrdb, *const ptrde = buf._data + L - 1; const T *const ptrsb = data(x,0,z,c), *ptrs = ptrsb, *const ptrse = ptrs + L*off - off; -@@ -25186,9 +25191,9 @@ namespace cimg_library_suffixed { +@@ -25454,9 +25459,9 @@ namespace cimg_library_suffixed { const int L = depth(), off = width()*height(), s = (int)sz, _s2 = s/2 + 1, _s1 = s - _s2, s1 = _s1>L?L:_s1, s2 = _s2>L?L:_s2; CImg buf(L); @@ -1776,7 +1864,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYC(*this,x,y,c) { T *const ptrdb = buf._data, *ptrd = ptrdb, *const ptrde = buf._data + L - 1; const T *const ptrsb = data(x,y,0,c), *ptrs = ptrsb, *const ptrse = ptrs + L*off - off; -@@ -25507,33 +25512,33 @@ namespace cimg_library_suffixed { +@@ -25775,33 +25780,33 @@ namespace cimg_library_suffixed { case 'x' : { const int N = _width; const unsigned long off = 1U; @@ -1814,43 +1902,43 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYZ(*this,x,y,z) { T *ptrX = data(x,y,z,0); _cimg_deriche_apply; } } } -@@ -25663,31 +25668,31 @@ namespace cimg_library_suffixed { - +@@ -26002,31 +26007,31 @@ namespace cimg_library_suffixed { + filter[0] = B; filter[1] = -b1; filter[2] = -b2; filter[3] = -b3; switch (naxis) { case 'x' : { #ifdef cimg_use_openmp -#pragma omp parallel for collapse(3) if (_width>=256 && _height*_depth*_spectrum>=16) +#pragma omp parallel for COLLAPSE(3) if (_width>=256 && _height*_depth*_spectrum>=16) #endif - cimg_forYZC(*this,y,z,c) - _cimg_recursive_apply<4>(data(0,y,z,c),filter,_width,1U,order,boundary_conditions); + cimg_forYZC(*this,y,z,c) + _cimg_recursive_apply(data(0,y,z,c),filter,_width,1U,order,boundary_conditions); } break; case 'y' : { #ifdef cimg_use_openmp -#pragma omp parallel for collapse(3) if (_width>=256 && _height*_depth*_spectrum>=16) +#pragma omp parallel for COLLAPSE(3) if (_width>=256 && _height*_depth*_spectrum>=16) #endif - cimg_forXZC(*this,x,z,c) - _cimg_recursive_apply<4>(data(x,0,z,c),filter,_height,(unsigned long)_width,order,boundary_conditions); + cimg_forXZC(*this,x,z,c) + _cimg_recursive_apply(data(x,0,z,c),filter,_height,(unsigned long)_width,order,boundary_conditions); } break; case 'z' : { #ifdef cimg_use_openmp -#pragma omp parallel for collapse(3) if (_width>=256 && _height*_depth*_spectrum>=16) +#pragma omp parallel for COLLAPSE(3) if (_width>=256 && _height*_depth*_spectrum>=16) #endif - cimg_forXYC(*this,x,y,c) - _cimg_recursive_apply<4>(data(x,y,0,c),filter,_depth,(unsigned long)(_width*_height), - order,boundary_conditions); + cimg_forXYC(*this,x,y,c) + _cimg_recursive_apply(data(x,y,0,c),filter,_depth,(unsigned long)(_width*_height), + order,boundary_conditions); } break; default : { #ifdef cimg_use_openmp -#pragma omp parallel for collapse(3) if (_width>=256 && _height*_depth*_spectrum>=16) +#pragma omp parallel for COLLAPSE(3) if (_width>=256 && _height*_depth*_spectrum>=16) #endif - cimg_forXYZ(*this,x,y,z) - _cimg_recursive_apply<4>(data(x,y,z,0),filter,_spectrum,(unsigned long)(_width*_height*_depth), - order,boundary_conditions); -@@ -25850,9 +25855,9 @@ namespace cimg_library_suffixed { + cimg_forXYZ(*this,x,y,z) + _cimg_recursive_apply(data(x,y,z,0),filter,_spectrum,(unsigned long)(_width*_height*_depth), + order,boundary_conditions); +@@ -26189,9 +26194,9 @@ namespace cimg_library_suffixed { *(pd3++) = (Tfloat)n; } @@ -1861,7 +1949,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYZ(*this,x,y,z) { val.fill(0); const float -@@ -26325,9 +26330,9 @@ namespace cimg_library_suffixed { +@@ -26731,9 +26736,9 @@ namespace cimg_library_suffixed { default : { const int psize2 = (int)patch_size/2, psize1 = (int)patch_size - psize2 - 1; if (is_fast_approx) @@ -1872,7 +1960,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYZ(res,x,y,z) { // Fast P = img.get_crop(x - psize1,y - psize1,z - psize1,x + psize2,y + psize2,z + psize2,true); const int x0 = x - rsize1, y0 = y - rsize1, z0 = z - rsize1, -@@ -26345,9 +26350,9 @@ namespace cimg_library_suffixed { +@@ -26751,9 +26756,9 @@ namespace cimg_library_suffixed { if (sum_weights>0) cimg_forC(res,c) res(x,y,z,c)/=sum_weights; else cimg_forC(res,c) res(x,y,z,c) = (Tfloat)((*this)(x,y,z,c)); } else @@ -1883,29 +1971,29 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYZ(res,x,y,z) { // Exact P = img.get_crop(x - psize1,y - psize1,z - psize1,x + psize2,y + psize2,z + psize2,true); const int x0 = x - rsize1, y0 = y - rsize1, z0 = z - rsize1, -@@ -26444,9 +26449,9 @@ namespace cimg_library_suffixed { +@@ -26850,9 +26855,9 @@ namespace cimg_library_suffixed { const int hl = n/2, hr = hl - 1 + n%2; if (res._depth!=1) { // 3d if (threshold>0) - #if cimg_use_openmp + #ifdef cimg_use_openmp -#pragma omp parallel for collapse(3) if (_width>=16 && _height*_depth*_spectrum>=4) +#pragma omp parallel for COLLAPSE(3) if (_width>=16 && _height*_depth*_spectrum>=4) #endif cimg_forXYZC(*this,x,y,z,c) { // With threshold. const int x0 = x - hl, y0 = y - hl, z0 = z-hl, x1 = x + hr, y1 = y + hr, z1 = z+hr, -@@ -26461,9 +26466,9 @@ namespace cimg_library_suffixed { +@@ -26867,9 +26872,9 @@ namespace cimg_library_suffixed { res(x,y,z,c) = values.get_shared_points(0,nb_values-1).median(); } else - #if cimg_use_openmp + #ifdef cimg_use_openmp -#pragma omp parallel for collapse(3) if (_width>=16 && _height*_depth*_spectrum>=4) +#pragma omp parallel for COLLAPSE(3) if (_width>=16 && _height*_depth*_spectrum>=4) #endif cimg_forXYZC(*this,x,y,z,c) { // Without threshold. const int x0 = x - hl, y0 = y - hl, z0 = z-hl, x1 = x + hr, y1 = y + hr, z1 = z+hr, -@@ -26475,9 +26480,9 @@ namespace cimg_library_suffixed { +@@ -26881,9 +26886,9 @@ namespace cimg_library_suffixed { #define _cimg_median_sort(a,b) if ((a)>(b)) cimg::swap(a,b) if (res._height!=1) { // 2d if (threshold>0) @@ -1916,7 +2004,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYC(*this,x,y,c) { // With threshold. const int x0 = x - hl, y0 = y - hl, x1 = x + hr, y1 = y + hr, -@@ -26559,9 +26564,9 @@ namespace cimg_library_suffixed { +@@ -26965,9 +26970,9 @@ namespace cimg_library_suffixed { } } break; default : { @@ -1927,7 +2015,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYC(*this,x,y,c) { const int x0 = x - hl, y0 = y - hl, x1 = x + hr, y1 = y + hr, -@@ -26645,9 +26650,9 @@ namespace cimg_library_suffixed { +@@ -27051,9 +27056,9 @@ namespace cimg_library_suffixed { if (sharpen_type) { // Shock filters. CImg G = (alpha>0?get_blur(alpha).get_structure_tensors():get_structure_tensors()); if (sigma>0) G.blur(sigma); @@ -1938,7 +2026,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(G,y,z) { Tfloat *ptrG0 = G.data(0,y,z,0), *ptrG1 = G.data(0,y,z,1), *ptrG2 = G.data(0,y,z,2), *ptrG3 = G.data(0,y,z,3); -@@ -26864,9 +26869,9 @@ namespace cimg_library_suffixed { +@@ -27270,9 +27275,9 @@ namespace cimg_library_suffixed { } } else switch (scheme) { // 2d. case -1 : { // Backward finite differences. @@ -1949,7 +2037,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { const unsigned long off = c*_width*_height*_depth + z*_width*_height; Tfloat *ptrd0 = grad[0]._data + off, *ptrd1 = grad[1]._data + off; -@@ -26878,9 +26883,9 @@ namespace cimg_library_suffixed { +@@ -27284,9 +27289,9 @@ namespace cimg_library_suffixed { } } break; case 1 : { // Forward finite differences. @@ -1960,7 +2048,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { const unsigned long off = c*_width*_height*_depth + z*_width*_height; Tfloat *ptrd0 = grad[0]._data + off, *ptrd1 = grad[1]._data + off; -@@ -26892,9 +26897,9 @@ namespace cimg_library_suffixed { +@@ -27298,9 +27303,9 @@ namespace cimg_library_suffixed { } } break; case 2 : { // Sobel scheme. @@ -1971,7 +2059,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { const unsigned long off = c*_width*_height*_depth + z*_width*_height; Tfloat *ptrd0 = grad[0]._data + off, *ptrd1 = grad[1]._data + off; -@@ -26906,9 +26911,9 @@ namespace cimg_library_suffixed { +@@ -27312,9 +27317,9 @@ namespace cimg_library_suffixed { } } break; case 3 : { // Rotation invariant mask. @@ -1982,7 +2070,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { const unsigned long off = c*_width*_height*_depth + z*_width*_height; Tfloat *ptrd0 = grad[0]._data + off, *ptrd1 = grad[1]._data + off; -@@ -26929,9 +26934,9 @@ namespace cimg_library_suffixed { +@@ -27335,9 +27340,9 @@ namespace cimg_library_suffixed { grad[1] = get_vanvliet(0,1,'y'); } break; default : { // Central finite differences @@ -1993,7 +2081,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { const unsigned long off = c*_width*_height*_depth + z*_width*_height; Tfloat *ptrd0 = grad[0]._data + off, *ptrd1 = grad[1]._data + off; -@@ -26994,9 +26999,9 @@ namespace cimg_library_suffixed { +@@ -27400,9 +27405,9 @@ namespace cimg_library_suffixed { } } } else if (!cimg::strcasecmp(naxes,def_axes2d)) { // 2d @@ -2004,7 +2092,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { const unsigned long off = c*_width*_height*_depth + z*_width*_height; Tfloat *ptrd0 = res[0]._data + off, *ptrd1 = res[1]._data + off, *ptrd2 = res[2]._data + off; -@@ -27014,9 +27019,9 @@ namespace cimg_library_suffixed { +@@ -27420,9 +27425,9 @@ namespace cimg_library_suffixed { bool valid_axis = false; if (axis1=='x' && axis2=='x') { // Ixx valid_axis = true; @@ -2015,7 +2103,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { Tfloat *ptrd = res[l2].data(0,0,z,c); CImg_3x3(I,Tfloat); -@@ -27025,9 +27030,9 @@ namespace cimg_library_suffixed { +@@ -27431,9 +27436,9 @@ namespace cimg_library_suffixed { } else if (axis1=='x' && axis2=='y') { // Ixy valid_axis = true; @@ -2026,7 +2114,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { Tfloat *ptrd = res[l2].data(0,0,z,c); CImg_3x3(I,Tfloat); -@@ -27047,9 +27052,9 @@ namespace cimg_library_suffixed { +@@ -27453,9 +27458,9 @@ namespace cimg_library_suffixed { } else if (axis1=='y' && axis2=='y') { // Iyy valid_axis = true; @@ -2037,7 +2125,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forZC(*this,z,c) { Tfloat *ptrd = res[l2].data(0,0,z,c); CImg_3x3(I,Tfloat); -@@ -27290,9 +27295,9 @@ namespace cimg_library_suffixed { +@@ -27696,9 +27701,9 @@ namespace cimg_library_suffixed { if (_depth>1) { // 3d get_structure_tensors().move_to(res).blur(sigma); @@ -2048,7 +2136,29 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) { Tfloat *ptrd0 = res.data(0,y,z,0), *ptrd1 = res.data(0,y,z,1), *ptrd2 = res.data(0,y,z,2), -@@ -27610,9 +27615,9 @@ namespace cimg_library_suffixed { +@@ -27814,9 +27819,9 @@ namespace cimg_library_suffixed { + float _energy = 0; + if (is_3d) { // 3d version. + if (smoothness>=0) // Isotropic regularization. + #ifdef cimg_use_openmp +-#pragma omp parallel for collapse(2) if (_height*_depth>=8 && _width>=16) reduction(+:_energy) ++#pragma omp parallel for COLLAPSE(2) if (_height*_depth>=8 && _width>=16) reduction(+:_energy) + #endif + cimg_forYZ(U,y,z) { + const int + _p1y = y?y-1:0, _n1y = y=8 && _width>=16) reduction(+:_energy) ++#pragma omp parallel for COLLAPSE(2) if (_height*_depth>=8 && _width>=16) reduction(+:_energy) + #endif + cimg_forYZ(U,y,z) { + const int + _p1y = y?y-1:0, _n1y = y g(_width), dt(_width), s(_width), t(_width); CImg img = get_shared_channel(c); @@ -2059,7 +2169,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forYZ(*this,y,z) { // Over X-direction. cimg_forX(*this,x) g[x] = (long)img(x,y,z,0,wh); _distance_scan(_width,g,sep,f,s,t,dt); -@@ -27620,9 +27625,9 @@ namespace cimg_library_suffixed { +@@ -28056,9 +28061,9 @@ namespace cimg_library_suffixed { } if (_height>1) { g.assign(_height); dt.assign(_height); s.assign(_height); t.assign(_height); @@ -2070,7 +2180,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXZ(*this,x,z) { // Over Y-direction. cimg_forY(*this,y) g[y] = (long)img(x,y,z,0,wh); _distance_scan(_height,g,sep,f,s,t,dt); -@@ -27631,9 +27636,9 @@ namespace cimg_library_suffixed { +@@ -28067,9 +28072,9 @@ namespace cimg_library_suffixed { } if (_depth>1) { g.assign(_depth); dt.assign(_depth); s.assign(_depth); t.assign(_depth); @@ -2081,7 +2191,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXY(*this,x,y) { // Over Z-direction. cimg_forZ(*this,z) g[z] = (long)img(x,y,z,0,wh); _distance_scan(_depth,g,sep,f,s,t,dt); -@@ -27662,9 +27667,9 @@ namespace cimg_library_suffixed { +@@ -28098,9 +28103,9 @@ namespace cimg_library_suffixed { #endif cimg_forC(*this,c) { CImg img = get_shared_channel(c); @@ -2092,7 +2202,7 @@ Index: gmic-1.6.0.0/src/CImg.h cimg_forXYZ(metric_mask,dx,dy,dz) { const t weight = metric_mask(dx,dy,dz); if (weight) { -@@ -35380,9 +35385,9 @@ namespace cimg_library_suffixed { +@@ -35812,9 +35817,9 @@ namespace cimg_library_suffixed { _y0 = y0<0?0:y0>=height()?height()-1:y0, _x1 = x1<0?1:x1>=width()?width()-1:x1, _y1 = y1<0?1:y1>=height()?height()-1:y1; @@ -2103,10 +2213,10 @@ Index: gmic-1.6.0.0/src/CImg.h for (int q = _y0; q<=_y1; ++q) for (int p = _x0; p<=_x1; ++p) { unsigned int iteration = 0; -Index: gmic-1.6.0.0/src/gmic.cpp +Index: gmic-1.6.0.3/src/gmic.cpp =================================================================== ---- gmic-1.6.0.0.orig/src/gmic.cpp -+++ gmic-1.6.0.0/src/gmic.cpp +--- gmic-1.6.0.3.orig/src/gmic.cpp ++++ gmic-1.6.0.3/src/gmic.cpp @@ -41,8 +41,17 @@ # knowledge of the CeCILL license and that you accept its terms. # @@ -2125,7 +2235,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp //------------------------------------------------ #ifdef cimg_plugin -@@ -78,9 +87,9 @@ CImg get_gmic_invert_endianness(const +@@ -76,9 +85,9 @@ CImg get_gmic_invert_endianness(const } template @@ -2136,7 +2246,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd == (T)val); return *this; -@@ -101,9 +110,9 @@ CImg& operator_eq(const char *const e +@@ -99,9 +108,9 @@ CImg& operator_eq(const char *const e if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -2147,7 +2257,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd == (T)lmp(x,y,z,c)); ++ptrd; } } -@@ -138,9 +147,9 @@ CImg& operator_eq(const CImg& img) +@@ -136,9 +145,9 @@ CImg& operator_eq(const CImg& img) } template @@ -2158,7 +2268,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd != (T)val); return *this; -@@ -161,9 +170,9 @@ CImg& operator_neq(const char *const +@@ -159,9 +168,9 @@ CImg& operator_neq(const char *const if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -2169,7 +2279,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd != (T)lmp(x,y,z,c)); ++ptrd; } } -@@ -198,9 +207,9 @@ CImg& operator_neq(const CImg& img +@@ -196,9 +205,9 @@ CImg& operator_neq(const CImg& img } template @@ -2180,7 +2290,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd > (T)val); return *this; -@@ -221,9 +230,9 @@ CImg& operator_gt(const char *const e +@@ -219,9 +228,9 @@ CImg& operator_gt(const char *const e if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -2191,7 +2301,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd > (T)lmp(x,y,z,c)); ++ptrd; } } -@@ -258,9 +267,9 @@ CImg& operator_gt(const CImg& img) +@@ -256,9 +265,9 @@ CImg& operator_gt(const CImg& img) } template @@ -2202,7 +2312,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd >= (T)val); return *this; -@@ -281,9 +290,9 @@ CImg& operator_ge(const char *const e +@@ -279,9 +288,9 @@ CImg& operator_ge(const char *const e if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -2213,7 +2323,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd >= (T)lmp(x,y,z,c)); ++ptrd; } } -@@ -318,9 +327,9 @@ CImg& operator_ge(const CImg& img) +@@ -316,9 +325,9 @@ CImg& operator_ge(const CImg& img) } template @@ -2224,7 +2334,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd < (T)val); return *this; -@@ -341,9 +350,9 @@ CImg& operator_lt(const char *const e +@@ -339,9 +348,9 @@ CImg& operator_lt(const char *const e if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { @@ -2235,7 +2345,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp T *ptrd = data(0,y,z,c); cimg_forX(*this,x) { *ptrd = (T)(*ptrd < (T)lmp(x,y,z,c)); ++ptrd; } } -@@ -378,9 +387,9 @@ CImg& operator_lt(const CImg& img) +@@ -376,9 +385,9 @@ CImg& operator_lt(const CImg& img) } template @@ -2246,7 +2356,7 @@ Index: gmic-1.6.0.0/src/gmic.cpp #endif cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd <= (T)val); return *this; -@@ -401,9 +410,9 @@ CImg& operator_le(const char *const e +@@ -399,9 +408,9 @@ CImg& operator_le(const char *const e if (_width>=512 && _height*_depth*_spectrum>=2 && std::strlen(expression)>=6) #pragma omp parallel { diff --git a/gmic-openmp.diff b/gmic-openmp.diff index 33b06d4..77de16a 100644 --- a/gmic-openmp.diff +++ b/gmic-openmp.diff @@ -1,8 +1,8 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -121,11 +121,13 @@ endif +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -134,11 +134,13 @@ endif ifneq ($(OS),Darwin) CHECKIMAGE_CFLAGS = -Dgmic_check_image endif diff --git a/gmic-overflow.diff b/gmic-overflow.diff index a95f0cc..69a217b 100644 --- a/gmic-overflow.diff +++ b/gmic-overflow.diff @@ -1,8 +1,9 @@ -Index: gmic-1.6.0.0/src/CImg.h +Index: gmic-1.6.0.3/src/CImg.h =================================================================== ---- gmic-1.6.0.0.orig/src/CImg.h -+++ gmic-1.6.0.0/src/CImg.h -@@ -48529,7 +48529,7 @@ namespace cimg_library_suffixed { +--- gmic-1.6.0.3.orig/src/CImg.h ++++ gmic-1.6.0.3/src/CImg.h +@@ -48684,9 +48684,9 @@ namespace cimg_library_suffixed { + filename?filename:"(FILE*)"); #endif std::FILE *const nfile = file?file:cimg::fopen(filename,"wb"); const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little"; @@ -11,3 +12,4 @@ Index: gmic-1.6.0.0/src/CImg.h else std::fprintf(nfile,"%u %s %s_endian\n",_width,ptype,etype); cimglist_for(*this,l) { const CImg& img = _data[l]; + std::fprintf(nfile,"%u %u %u %u",img._width,img._height,img._depth,img._spectrum); diff --git a/gmic-unstrip.diff b/gmic-unstrip.diff index 213d24a..9a3700b 100644 --- a/gmic-unstrip.diff +++ b/gmic-unstrip.diff @@ -1,8 +1,9 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -317,7 +317,7 @@ QMAKE = qmake +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -356,9 +356,9 @@ lib: + QMAKE = qmake zart: lib ifneq ($(OS),Darwin) @@ -11,7 +12,9 @@ Index: gmic-1.6.0.0/src/Makefile else cd ../zart && $(QMAKE) zart.pro && $(MAKE) "CFLAGS=$(STD_MACOSX_CFLAGS) $(OPT_CFLAGS)" "SUBLIBS=$(STD_MACOSX_LIBS) $(OPT_LIBS)" endif -@@ -363,7 +363,7 @@ gmic_gimp.o: gmic.cpp CImg.h + +@@ -408,9 +408,9 @@ endif + gmic_gimp.o: gmic.cpp CImg.h $(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp gmic_gimp : gmic_gimp.o gmic_gimp.cpp $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) @@ -20,3 +23,4 @@ Index: gmic-1.6.0.0/src/Makefile gmic: gmic.cpp gmic.h CImg.h $(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_main $(LIBS) + diff --git a/gmic-x11opts.diff b/gmic-x11opts.diff index 20f8b3e..237efab 100644 --- a/gmic-x11opts.diff +++ b/gmic-x11opts.diff @@ -1,8 +1,9 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -130,8 +130,8 @@ OPENMP_LIBS = -lgomp +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -142,10 +142,10 @@ OPENMP_LIBS = -lgomp + # Flags to enable image display, using X11 # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). # This requires the presence of the X11 include and library files. # (package 'libx11-dev' on Debian). @@ -13,27 +14,33 @@ Index: gmic-1.6.0.0/src/Makefile # Flags to enable fast display, using XShm. # This requires the presence of the X11 extension include and library files. -@@ -228,17 +228,17 @@ BOARD_LIBS = -lboard + # (package 'libx11-dev' on Debian). +@@ -234,20 +234,20 @@ BOARD_LIBS = -lboard + # Predefined sets of flags for different default configurations. #---------------------------------------------------------------- # Unix : Standard build. -STD_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(X11_CFLAGS) $(PNG_CFLAGS) \ +STD_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(PNG_CFLAGS) \ $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) \ -- $(EXR_CFLAGS) $(FFTW_CFLAGS) # $(XSHM_CFLAGS) $(OPENCV_CFLAGS) $(FFMPEG_CFLAGS) # $(MAGICK_CFLAGS) +- $(EXR_CFLAGS) $(FFTW_CFLAGS) $(OPENCV_CFLAGS) # $(XSHM_CFLAGS) $(MAGICK_CFLAGS) -STD_UNIX_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) $(PNG_LIBS) \ -+ $(EXR_CFLAGS) $(FFTW_CFLAGS) # $(OPENCV_CFLAGS) $(FFMPEG_CFLAGS) # $(MAGICK_CFLAGS) ++ $(EXR_CFLAGS) $(FFTW_CFLAGS) # $(OPENCV_CFLAGS) $(MAGICK_CFLAGS) +STD_UNIX_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) $(XSHM_LIBS) $(PNG_LIBS) \ $(JPEG_LIBS) $(TIFF_LIBS) $(ZLIB_LIBS) \ -- $(EXR_LIBS) $(FFTW_LIBS) # $(XSHM_LIBS) $(OPENCV_LIBS) $(FFMPEG_LIBS) # $(MAGICK_LIBS) -+ $(EXR_LIBS) $(FFTW_LIBS) # $(OPENCV_LIBS) $(FFMPEG_LIBS) # $(MAGICK_LIBS) +- $(EXR_LIBS) $(FFTW_LIBS) $(OPENCV_LIBS) # $(XSHM_LIBS) # $(MAGICK_LIBS) ++ $(EXR_LIBS) $(FFTW_LIBS) # $(OPENCV_LIBS) # $(MAGICK_LIBS) # Unix : Minimal build. -MINIMAL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(DEBUG_CFLAGS) $(X11_CFLAGS) \ -+MINIMAL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(DEBUG_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) \ - ${TIFF_CFLAGS} ${PNG_CFLAGS} $(ZLIB_CFLAGS) $(FFTW_CFLAGS) $(CHECKIMAGE_CFLAGS) # $(OPENCV_CFLAGS) +- ${TIFF_CFLAGS} ${PNG_CFLAGS} $(ZLIB_CFLAGS) $(FFTW_CFLAGS) $(CHECKIMAGE_CFLAGS) $(OPENCV_CFLAGS) -MINIMAL_UNIX_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) \ +- ${TIFF_LIBS} ${PNG_LIBS} $(ZLIB_LIBS) $(FFTW_LIBS) $(OPENCV_LIBS) ++MINIMAL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(PARALLEL_CFLAGS) $(OPENMP_CFLAGS) $(DEBUG_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) \ ++ ${TIFF_CFLAGS} ${PNG_CFLAGS} $(ZLIB_CFLAGS) $(FFTW_CFLAGS) $(CHECKIMAGE_CFLAGS) # $(OPENCV_CFLAGS) +MINIMAL_UNIX_LIBS = $(MANDATORY_LIBS) $(PARALLEL_LIBS) $(OPENMP_LIBS) $(X11_LIBS) $(XSHM_LIBS) \ - ${TIFF_LIBS} ${PNG_LIBS} $(ZLIB_LIBS) $(FFTW_LIBS) # $(OPENCV_LIBS) ++ ${TIFF_LIBS} ${PNG_LIBS} $(ZLIB_LIBS) $(FFTW_LIBS) # $(OPENCV_LIBS) # Unix : Static build. + #STATIC_PATH = $(USR)/${LIB}/x86_64-linux-gnu + STATIC_PATH=$(USR)/$(LIB) diff --git a/gmic-zart-qmake.diff b/gmic-zart-qmake.diff index 67fae23..1b36015 100644 --- a/gmic-zart-qmake.diff +++ b/gmic-zart-qmake.diff @@ -1,8 +1,9 @@ -Index: gmic-1.6.0.0/src/Makefile +Index: gmic-1.6.0.3/src/Makefile =================================================================== ---- gmic-1.6.0.0.orig/src/Makefile -+++ gmic-1.6.0.0/src/Makefile -@@ -313,11 +313,13 @@ gimp: +--- gmic-1.6.0.3.orig/src/Makefile ++++ gmic-1.6.0.3/src/Makefile +@@ -352,13 +352,15 @@ gimp: + lib: $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib @@ -18,3 +19,4 @@ Index: gmic-1.6.0.0/src/Makefile endif # Entries for other configurations. + linux: diff --git a/gmic.changes b/gmic.changes index a4851d1..535f5e7 100644 --- a/gmic.changes +++ b/gmic.changes @@ -1,3 +1,41 @@ +------------------------------------------------------------------- +Thu Jan 8 14:57:41 CET 2015 - kurt@garloff.de + +- Update to gmic-1.6.0.3: + * New GIMP filters Degradation/Dirty, Rendering/Lightning, + Layers/Colors to Layers + * New commands rgb2int and int2rgb + * New preferred .gmz image list file format + * New -nlmeans denoising algorithm + * Improvements to -bilateral, -peronamalik_flow, -apply_parallel, + (= -ap), -split, -discard, -colormap, -displacement, vanvliet, + -belnd_median + * Bugfixes around -output codec, -eigen, -center3d, -normalize3d, + -split3d, -label +- Update to gmic-1.6.0.2: + * New -peronamalik_flow (diffusion smoothing) + * New -x_select_function1d and -x_color_curves + * New --guided, -cumulate + * New -apply_video, -video2files, -files2video, -average_video + * New -dct and -idct + * Improvements to -parallel + * Improving -fitscreen and tiff -output + * Improvements for -snapshot3d, -text, -fft, -ifft, -blur + * Major ZArt update + * Bugfixes for -deconvolve_fft, -bilateral, -gaussian, -srand +- Update to gmic-1.6.0.1: + * New: const(value) and button() typedefs to describe filters. + * Filter return status can be a list now. + * GIMP plug-in now has default capability to open display windows. + * New -x_segment (Contours/Extract Foreground). + * Double underscore vars are thread shared globals. + * New -x_select_color, -x_select_palette, -input_gpl, -x_colorize + * C++11 support in CImg, avoiding uneeded image copies + * Removed bool option for -endian + * Command --reverse now only reverses the selected images + * Bug fixes around -pass, -parallel, -quit, -equalize and + buffer overflow avoidance for plug-in code. + ------------------------------------------------------------------- Sun Sep 7 12:08:18 CEST 2014 - kurt@garloff.de diff --git a/gmic.spec b/gmic.spec index 0d6f088..8540442 100644 --- a/gmic.spec +++ b/gmic.spec @@ -15,9 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +# Detect SLES11 and SLES12 +%if 0%{?suse_version} == 1110 || 0%{?suse_version} == 1315 +%define no_opencv 1 +%else +%define no_opencv 0 +%endif Name: gmic -Version: 1.6.0.0 +Version: 1.6.0.3 Release: 0 Group: Productivity/Graphics/Bitmap Editors URL: http://gmic.sourceforge.net/ @@ -49,7 +55,7 @@ BuildRequires: libqt4-devel BuildRequires: libjpeg-devel BuildRequires: libtiff-devel BuildRequires: fftw3-threads-devel -%if 0%{?suse_version} >= 1120 +%if 0%{?no_opencv} == 0 BuildRequires: opencv-devel BuildRequires: libjasper1 %endif @@ -142,17 +148,7 @@ Group: Productivity/Graphics/Bitmap Editors This is a plugin for gimp that exposes many of the nice gmic features for interactive use in gimp. -%if 0%{?suse_version} == 0 -%package zart -Summary: Real-time web cam video stream manipulation -Group: Productivity/Graphics/Bitmap editors - -%description zart -This program allows you to capture video from a web cam and apply -(real time) gmic image manipulations on the video stream. -%else -%if 0%{?suse_version} >= 1120 -%endif +%if 0%{?no_opencv} == 0 %package zart Summary: Real-time web cam video stream manipulation Group: Productivity/Graphics/Bitmap editors @@ -178,11 +174,7 @@ This is the reference documentation for G'MIC in .pdf format. %patch11 -p1 %patch12 -p1 # More gmic features ... opencv -%if 0%{?suse_version} > 0 -%if 0%{?suse_version} >= 1120 -%patch15 -p1 -%endif -%else +%if 0%{?no_opencv} == 0 %patch15 -p1 %endif #%patch17 -p1 @@ -215,6 +207,7 @@ RPM_OPT_FLAGS="$RPM_OPT_FLAGS -ffast-math" GCCVER=`gcc -v 2>&1 | tail -n1 | sed -e 's/^gcc version \([^ ]*\) .*$/\1/' -e 's/\.//g'` if test $GCCVER -ge 480; then RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-ipa-sra"; fi if test $GCCVER -ge 480 -a $GCCVER -le 482; then MAKEFLAGS="NO_OPENMP=1"; fi +if test $GCCVER -le 445; then sed -i 's/\-std=c++11//' src/Makefile; fi # Compile times are exorbitant as are, -funroll-loops makes it worse #RPM_OPT_FLAGS="$RPM_OPT_FLAGS -funroll-loops" %ifarch %{ix86} x86_64 @@ -225,6 +218,9 @@ RPM_OPT_FLAGS="$RPM_OPT_FLAGS -momit-leaf-frame-pointer" RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mmmx -msse -mfpmath=sse,387" %endif %endif +%if 0%{?fedora_version} > 19 +RPM_OPT_FLAGS="`echo $RPM_OPT_FLAGS | sed 's/-strong//'`" +%endif # gcc-4.3 needs -fno-tree-pre, see gcc bug 36439 GCCVER="`gcc --version | head -n1 | sed 's/^gcc[^0-9]*\([^ ]*\).*$/\1/'`" #echo $GCCVER @@ -259,12 +255,8 @@ make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} QMAKE=qmake-qt4 zart %else make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} linux make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} gimp lib -%if 0%{?suse_version} == 0 +%if 0%{?no_opencv} == 0 make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} zart -%else -%if 0%{?suse_version} >= 1120 -make $JOBS $MAKEFLAGS CFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} zart -%endif %endif %endif #make %{?jobs:-j%jobs} CFLAGS="$RPM_OPT_FLAGS" gimp @@ -278,12 +270,8 @@ make install DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LIB=%{_ %if 0%{?fedora_version} > 16 make install-zart DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LIB=%{_lib} QMAKE=qmake-qt4 %else -%if 0%{?suse_version} == 0 +%if 0%{?no_opencv} == 0 make install-zart DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LIB=%{_lib} -%else -%if 0%{?suse_version} >= 1120 -make install-zart DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LIB=%{_lib} -%endif %endif %endif #mkdir -p $RPM_BUILD_ROOT%{_docdir}/gmic/html @@ -296,12 +284,8 @@ make install-zart DESTDIR=$RPM_BUILD_ROOT DOCDIR=%{_docdir} MANDIR=%{_mandir} LI strip -S $RPM_BUILD_ROOT/usr/bin/gmic strip -S $RPM_BUILD_ROOT/usr/%{_lib}/gimp/2.0/plug-ins/gmic_gimp # ZART -%if 0%{?suse_version} == 0 +%if 0%{?no_opencv} == 0 strip -S $RPM_BUILD_ROOT/usr/bin/zart -%else -%if 0%{?suse_version} >= 1120 -strip -S $RPM_BUILD_ROOT/usr/bin/zart -%endif %endif # Duplicate man page ... rm $RPM_BUILD_ROOT/%{_mandir}/fr/man1/gmic.1.gz @@ -330,18 +314,11 @@ rm $RPM_BUILD_ROOT/%{_mandir}/fr/man1/gmic.1.gz %doc README COPYING index.html %config %attr(0644,root,root) /etc/bash_completion.d/gmic -%if 0%{?suse_version} == 0 +%if 0%{?no_opencv} == 0 %files zart %defattr(-,root,root) /usr/bin/zart %doc zart/Licence_CeCILL_V2-en.html zart/README.zart -%else -%if 0%{?suse_version} >= 1120 -%files zart -%defattr(-,root,root) -/usr/bin/zart -%doc zart/Licence_CeCILL_V2-en.html zart/README.zart -%endif %endif %files gimp diff --git a/gmic_1.6.0.0.tar.bz2 b/gmic_1.6.0.0.tar.bz2 deleted file mode 100644 index 7157ae4..0000000 --- a/gmic_1.6.0.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63b98c5b71c6ac41167416ff6c512d0fc7d39528bd864c1383d7e9bdc7ebd12a -size 1932765 diff --git a/gmic_1.6.0.3.tar.bz2 b/gmic_1.6.0.3.tar.bz2 new file mode 100644 index 0000000..68f7144 --- /dev/null +++ b/gmic_1.6.0.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e568074f926a92f1d7512e3545934e79088d39f6cdc22075261024fabdb93c7 +size 2070442 diff --git a/gmic_reference.pdf b/gmic_reference.pdf index 68885d8..6d6e324 100644 --- a/gmic_reference.pdf +++ b/gmic_reference.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c9c74fbeaf7f972205e0659608d76fcee761fa19935ad3c6934ac2f342af152 -size 25373035 +oid sha256:cdfae0c913dbf2122aba51a589bb4618ecaf87470a73d90f5668e7dd53979b90 +size 25653521