Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package librtprocess for openSUSE:Factory checked in at 2024-06-13 15:40:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/librtprocess (Old) and /work/SRC/openSUSE:Factory/.librtprocess.new.19518 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "librtprocess" Thu Jun 13 15:40:34 2024 rev:4 rq:1180354 version:0.12.0+20230627 Changes: -------- --- /work/SRC/openSUSE:Factory/librtprocess/librtprocess.changes 2022-04-28 23:08:01.308691014 +0200 +++ /work/SRC/openSUSE:Factory/.librtprocess.new.19518/librtprocess.changes 2024-06-13 15:40:46.139997675 +0200 @@ -1,0 +2,6 @@ +Thu Jun 13 09:43:57 UTC 2024 - Paolo Stivanin <[email protected]> + +- Update to version 0.12.0+20230627: + * Some small compilation fixes. + +------------------------------------------------------------------- Old: ---- librtprocess-0.12.0+20211228.tar.xz New: ---- librtprocess-0.12.0+20230627.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ librtprocess.spec ++++++ --- /var/tmp/diff_new_pack.JGN6Y0/_old 2024-06-13 15:40:46.576013600 +0200 +++ /var/tmp/diff_new_pack.JGN6Y0/_new 2024-06-13 15:40:46.580013747 +0200 @@ -1,7 +1,7 @@ # # spec file for package librtprocess # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: librtprocess -Version: 0.12.0+20211228 +Version: 0.12.0+20230627 Release: 0 Summary: A collection of functions for processing photos License: BSL-1.0 AND GPL-3.0-or-later ++++++ librtprocess-0.12.0+20211228.tar.xz -> librtprocess-0.12.0+20230627.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtprocess-0.12.0+20211228/ProcessorTargets.cmake new/librtprocess-0.12.0+20230627/ProcessorTargets.cmake --- old/librtprocess-0.12.0+20211228/ProcessorTargets.cmake 2021-12-28 17:48:06.000000000 +0100 +++ new/librtprocess-0.12.0+20230627/ProcessorTargets.cmake 2023-06-28 05:10:47.000000000 +0200 @@ -6,5 +6,8 @@ # This second choice should be used for your own build only set(PROC_TARGET_2_LABEL native CACHE STRING "Processor-2 label - use it for your own build") -set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags") - +if (CMAKE_SYSTEM_PROCESSOR MATCHES "ppc|ppc64|powerpc|powerpc64" OR (APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc|ppc64")) + set(PROC_TARGET_2_FLAGS "-mtune=native" CACHE STRING "Processor-2 flags") +else() + set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags") +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtprocess-0.12.0+20211228/src/CMakeLists.txt new/librtprocess-0.12.0+20230627/src/CMakeLists.txt --- old/librtprocess-0.12.0+20211228/src/CMakeLists.txt 2021-12-28 17:48:06.000000000 +0100 +++ new/librtprocess-0.12.0+20230627/src/CMakeLists.txt 2023-06-28 05:10:47.000000000 +0200 @@ -25,6 +25,13 @@ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>) + +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(rtprocess + PRIVATE + LIBRTPROCESS_STATIC) +endif() + target_compile_options(rtprocess PRIVATE ${OpenMP_CXX_FLAGS} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtprocess-0.12.0+20211228/src/include/gauss.h new/librtprocess-0.12.0+20230627/src/include/gauss.h --- old/librtprocess-0.12.0+20211228/src/include/gauss.h 2021-12-28 17:48:06.000000000 +0100 +++ new/librtprocess-0.12.0+20230627/src/include/gauss.h 2023-06-28 05:10:47.000000000 +0200 @@ -213,7 +213,11 @@ // use separated filter if the support window is small and src == dst template<class T> void gaussHorizontal3 (T** src, T** dst, int W, int H, const float c0, const float c1) { +#ifdef _MSC_VER + T *temp = new T[W] ALIGNED16; +#else T temp[W] ALIGNED16; +#endif #ifdef _OPENMP #pragma omp for #endif @@ -228,6 +232,9 @@ dst[i][W - 1] = src[i][W - 1]; } +#ifdef _MSC_VER + delete temp; +#endif } #ifdef __SSE2__ @@ -293,7 +300,11 @@ #else template<class T> void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1) { +#ifdef _MSC_VER + T *temp = new T[H] ALIGNED16; +#else T temp[H] ALIGNED16; +#endif #ifdef _OPENMP #pragma omp for #endif @@ -311,6 +322,9 @@ dst[H - 1][i] = src[H - 1][i]; } +#ifdef _MSC_VER + delete temp; +#endif } #endif @@ -440,8 +454,11 @@ M[i][j] /= (1.0 + b1 - b2 + b3) * (1.0 + b2 + (b1 - b3) * b3); } +#ifdef _MSC_VER + double *temp2 = new double[W] ALIGNED16; +#else double temp2[W] ALIGNED16; - +#endif #ifdef _OPENMP #pragma omp for #endif @@ -473,6 +490,10 @@ } } + +#ifdef _MSC_VER + delete temp2; +#endif } #ifdef __SSE2__ @@ -917,13 +938,20 @@ // process 'numcols' columns for better usage of L1 cpu cache (especially faster for large values of H) static const int numcols = 8; +#ifdef _MSC_VER + double** temp2 = new double* [numcols]; + for (int i = 0; i < numcols; ++i) { + temp2[i] = new double[H]; + } +#else double temp2[H][numcols] ALIGNED16; +#endif double temp2Hm1[numcols], temp2H[numcols], temp2Hp1[numcols]; #ifdef _OPENMP #pragma omp for nowait #endif - for (unsigned int i = 0; i < static_cast<unsigned>(std::max(0, W - numcols + 1)); i += numcols) { + for (int i = 0; i < static_cast<int>(std::max(0, W - numcols + 1)); i += numcols) { for (int k = 0; k < numcols; k++) { temp2[0][k] = B * src[0][i + k] + b1 * src[0][i + k] + b2 * src[0][i + k] + b3 * src[0][i + k]; temp2[1][k] = B * src[1][i + k] + b1 * temp2[0][k] + b2 * src[0][i + k] + b3 * src[0][i + k]; @@ -981,6 +1009,13 @@ dst[j][i] = temp2[j][0] = B * temp2[j][0] + b1 * temp2[j + 1][0] + b2 * temp2[j + 2][0] + b3 * temp2[j + 3][0]; } } + +#ifdef _MSC_VER + for (int i = 0; i < numcols; ++i) { + delete[] temp2[i]; + } + delete[] temp2; +#endif } #ifndef __SSE2__ @@ -996,7 +1031,14 @@ // process 'numcols' columns for better usage of L1 cpu cache (especially faster for large values of H) static const int numcols = 8; +#ifdef _MSC_VER + double** temp2 = new double* [numcols]; + for (int i = 0; i < numcols; ++i) { + temp2[i] = new double[H]; + } +#else double temp2[H][numcols] ALIGNED16; +#endif double temp2Hm1[numcols], temp2H[numcols], temp2Hp1[numcols]; #ifdef _OPENMP #pragma omp for nowait @@ -1060,6 +1102,13 @@ dst[j][i] = librtprocess::max(divBuffer[j][i] / (temp2[j][0] = B * temp2[j][0] + b1 * temp2[j + 1][0] + b2 * temp2[j + 2][0] + b3 * temp2[j + 3][0]), 0.0); } } + +#ifdef _MSC_VER + for (int i = 0; i < numcols; ++i) { + delete[] temp2[i]; + } + delete[] temp2; +#endif } template<class T> void gaussVerticalmult (T** src, T** dst, const int W, const int H, const double sigma) @@ -1074,7 +1123,14 @@ // process 'numcols' columns for better usage of L1 cpu cache (especially faster for large values of H) static const int numcols = 8; +#ifdef _MSC_VER + double** temp2 = new double* [numcols]; + for (int i = 0; i < numcols; ++i) { + temp2[i] = new double[H]; + } +#else double temp2[H][numcols] ALIGNED16; +#endif double temp2Hm1[numcols], temp2H[numcols], temp2Hp1[numcols]; #ifdef _OPENMP #pragma omp for nowait @@ -1138,6 +1194,13 @@ dst[j][i] *= (temp2[j][0] = B * temp2[j][0] + b1 * temp2[j + 1][0] + b2 * temp2[j + 2][0] + b3 * temp2[j + 3][0]); } } + +#ifdef _MSC_VER + for (int i = 0; i < numcols; ++i) { + delete[] temp2[i]; + } + delete[] temp2; +#endif } #endif @@ -1177,8 +1240,11 @@ double mIdeal = (12 * sigma * sigma - n * wl * wl - 4 * n * wl - 3 * n) / (-4 * wl - 4); int m = round(mIdeal); +#ifdef _MSC_VER + int* sizes = new int[n]; +#else int sizes[n]; - +#endif for(int i = 0; i < n; i++) { sizes[i] = ((i < m ? wl : wu) - 1) / 2; } @@ -1188,6 +1254,10 @@ for(int i = 1; i < n; i++) { librtprocess::boxblur(dst, dst, buffer, sizes[i], sizes[i], W, H); } + +#ifdef _MSC_VER + delete sizes; +#endif } else { if (sigma < GAUSS_SKIP) { // don't perform filtering diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtprocess-0.12.0+20211228/src/include/librtprocess.h new/librtprocess-0.12.0+20230627/src/include/librtprocess.h --- old/librtprocess-0.12.0+20211228/src/include/librtprocess.h 2021-12-28 17:48:06.000000000 +0100 +++ new/librtprocess-0.12.0+20230627/src/include/librtprocess.h 2023-06-28 05:10:47.000000000 +0200 @@ -25,23 +25,40 @@ #include <functional> #include <cstddef> +#ifndef LIBRTPROCESS_STATIC +// DLL interface export/import macros are only available for MSVC for now, +// in order to keep compatibility with previous versions of librtprocess +//# if defined( __WIN32__ ) || defined( _WIN32 ) +# ifdef _MSC_VER +# if defined( rtprocess_EXPORTS ) +# define RTPROCESS_API __declspec( dllexport ) +# else +# define RTPROCESS_API __declspec( dllimport ) +# endif +# else +//# define RTPROCESS_API __attribute__ ((visibility("default"))) +# define RTPROCESS_API +# endif +#else +# define RTPROCESS_API +#endif enum rpError {RP_NO_ERROR, RP_MEMORY_ERROR, RP_WRONG_CFA, RP_CACORRECT_ERROR}; -rpError bayerborder_demosaic(int winw, int winh, int lborders, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2]); -void xtransborder_demosaic(int winw, int winh, int border, const float * const *rawData, float **red, float **green, float **blue, const unsigned xtrans[6][6]); -rpError ahd_demosaic (int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const float rgb_cam[3][4], const std::function<bool(double)> &setProgCancel); -rpError amaze_demosaic(int raw_width, int raw_height, int winx, int winy, int winw, int winh, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, double initGain, int border, float inputScale, float outputScale, std::size_t chunkSize = 2, bool measure = false); -rpError bayerfast_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, double initGain); -rpError dcb_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, int iterations, bool dcb_enhance); -rpError hphd_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel); -rpError rcd_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, std::size_t chunkSize = 2, bool measure = false, bool multiThread = true); -rpError markesteijn_demosaic(int width, int height, const float * const *rawdata, float **red, float **green, float **blue, const unsigned xtrans[6][6], const float rgb_cam[3][4], const std::function<bool(double)> &setProgCancel, const int passes, const bool useCieLab, std::size_t chunkSize = 2, bool measure = false); -rpError xtransfast_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned xtrans[6][6], const std::function<bool(double)> &setProgCancel); -rpError vng4_demosaic (int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel); -rpError igv_demosaic(int winw, int winh, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel); -rpError lmmse_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, int iterations); +RTPROCESS_API rpError bayerborder_demosaic(int winw, int winh, int lborders, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2]); +RTPROCESS_API void xtransborder_demosaic(int winw, int winh, int border, const float * const *rawData, float **red, float **green, float **blue, const unsigned xtrans[6][6]); +RTPROCESS_API rpError ahd_demosaic (int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const float rgb_cam[3][4], const std::function<bool(double)> &setProgCancel); +RTPROCESS_API rpError amaze_demosaic(int raw_width, int raw_height, int winx, int winy, int winw, int winh, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, double initGain, int border, float inputScale, float outputScale, std::size_t chunkSize = 2, bool measure = false); +RTPROCESS_API rpError bayerfast_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, double initGain); +RTPROCESS_API rpError dcb_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, int iterations, bool dcb_enhance); +RTPROCESS_API rpError hphd_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel); +RTPROCESS_API rpError rcd_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, std::size_t chunkSize = 2, bool measure = false, bool multiThread = true); +RTPROCESS_API rpError markesteijn_demosaic(int width, int height, const float * const *rawdata, float **red, float **green, float **blue, const unsigned xtrans[6][6], const float rgb_cam[3][4], const std::function<bool(double)> &setProgCancel, const int passes, const bool useCieLab, std::size_t chunkSize = 2, bool measure = false); +RTPROCESS_API rpError xtransfast_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned xtrans[6][6], const std::function<bool(double)> &setProgCancel); +RTPROCESS_API rpError vng4_demosaic (int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel); +RTPROCESS_API rpError igv_demosaic(int winw, int winh, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel); +RTPROCESS_API rpError lmmse_demosaic(int width, int height, const float * const *rawData, float **red, float **green, float **blue, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, int iterations); // for CA_correct rawDataIn and rawDataOut may point to the same buffer. That's handled fine inside CA_correct -rpError CA_correct(int winx, int winy, int winw, int winh, const bool autoCA, std::size_t autoIterations, const double cared, const double cablue, bool avoidColourshift, const float * const *rawDataIn, float **rawDataOut, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, double fitParams[2][2][16], bool fitParamsIn, float inputScale = 65535.f, float outputScale = 65535.f, size_t chunkSize = 2, bool measure = false); -rpError HLRecovery_inpaint(const int width, const int height, float **red, float **green, float **blue, const float chmax[3], const float clmax[3], const std::function<bool(double)> &setProgCancel); +RTPROCESS_API rpError CA_correct(int winx, int winy, int winw, int winh, const bool autoCA, std::size_t autoIterations, const double cared, const double cablue, bool avoidColourshift, const float * const *rawDataIn, float **rawDataOut, const unsigned cfarray[2][2], const std::function<bool(double)> &setProgCancel, double fitParams[2][2][16], bool fitParamsIn, float inputScale = 65535.f, float outputScale = 65535.f, size_t chunkSize = 2, bool measure = false); +RTPROCESS_API rpError HLRecovery_inpaint(const int width, const int height, float **red, float **green, float **blue, const float chmax[3], const float clmax[3], const std::function<bool(double)> &setProgCancel); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtprocess-0.12.0+20211228/src/include/mytime.h new/librtprocess-0.12.0+20230627/src/include/mytime.h --- old/librtprocess-0.12.0+20211228/src/include/mytime.h 2021-12-28 17:48:06.000000000 +0100 +++ new/librtprocess-0.12.0+20230627/src/include/mytime.h 2023-06-28 05:10:47.000000000 +0200 @@ -20,6 +20,8 @@ #define _MYTIME_ #ifdef WIN32 +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include <windows.h> #elif defined __APPLE__ #include <sys/time.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librtprocess-0.12.0+20211228/src/postprocess/hilite_recon.cc new/librtprocess-0.12.0+20230627/src/postprocess/hilite_recon.cc --- old/librtprocess-0.12.0+20211228/src/postprocess/hilite_recon.cc 2021-12-28 17:48:06.000000000 +0100 +++ new/librtprocess-0.12.0+20230627/src/postprocess/hilite_recon.cc 2023-06-28 05:10:47.000000000 +0200 @@ -494,7 +494,10 @@ int miny = height - 1; int maxy = 0; +// Current MSVC version doesn't support these way of calling OMP +#ifndef _MSC_VER #pragma omp parallel for reduction(min:minx,miny) reduction(max:maxx,maxy) schedule(dynamic, 16) +#endif for (int i = 0; i < height; ++i) { for (int j = 0; j< width; ++j) { if(red[i][j] >= max_f[0] || green[i][j] >= max_f[1] || blue[i][j] >= max_f[2]) {
