diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 3e5804235..a6c9b95a4 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -163,7 +163,7 @@ void Crop::update (int todo) { if(lldenoiseutili && skip==1 && params.dirpyrDenoise.enabled) {//only allocate memory if enabled and skip calclum = new Imagefloat (cropw, croph);//for Luminance denoise curve if(origCrop != calclum) - memcpy(calclum->data,origCrop->data,origCrop->width*origCrop->height*3*sizeof(float)); + origCrop->copyData(calclum); parent->imgsrc->convertColorSpace(calclum, params.icm, parent->currWB, params.raw);//for denoise luminance curve } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 732ef095d..1d2b8891a 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -271,7 +271,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { if(lldenoiseutili && scale==1 && params.dirpyrDenoise.enabled ){//only allocate memory if enabled and scale=1 calclum = new Imagefloat (pW, pH);//for Luminance denoise curve if(orig_prev != calclum) - memcpy(calclum->data,orig_prev->data,orig_prev->width*orig_prev->height*3*sizeof(float)); + orig_prev->copyData(calclum); imgsrc->convertColorSpace(calclum, params.icm, currWB, params.raw);//claculate values after colorspace conversion } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 6104e3d97..a14df5ea8 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -2081,8 +2081,8 @@ lab2ProphotoRgbD50(float L, float A, float B, float& r, float& g, float& b) // Converts raw image including ICC input profile to working space - floating point version void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParams &cmp, ColorTemp &wb, double pre_mul[3], const RAWParams &raw, cmsHPROFILE embedded, cmsHPROFILE camprofile, double camMatrix[3][3], const std::string &camName) { - MyTime t1, t2, t3; - t1.set (); +// MyTime t1, t2, t3; +// t1.set (); cmsHPROFILE in; DCPProfile *dcpProf; @@ -2397,8 +2397,8 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam cmsDeleteTransform(hTransform); } -t3.set (); - printf ("ICM TIME: %d usec\n", t3.etime(t1)); +//t3.set (); +// printf ("ICM TIME: %d usec\n", t3.etime(t1)); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 55c89dd84..bc799f799 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -139,7 +139,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (params.dirpyrDenoise.enabled && lldenoiseutili) { calclum = new Imagefloat (fw, fh);//for luminance denoise curve if(baseImg != calclum) - memcpy(calclum->data,baseImg->data,baseImg->width*baseImg->height*3*sizeof(float)); + baseImg->copyData(calclum); imgsrc->convertColorSpace(calclum, params.icm, currWB, params.raw); } if (params.dirpyrDenoise.enabled) {