Fixes crashes, when using NR, because FFTW isn't tread save, Issue 1796
This commit is contained in:
@@ -85,7 +85,8 @@ namespace rtengine {
|
|||||||
|
|
||||||
void ImProcFunctions::RGB_denoise(Imagefloat * src, Imagefloat * dst, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const procparams::DefringeParams & defringe, const double expcomp)
|
void ImProcFunctions::RGB_denoise(Imagefloat * src, Imagefloat * dst, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const procparams::DefringeParams & defringe, const double expcomp)
|
||||||
{
|
{
|
||||||
|
static Glib::Mutex FftwMutex;
|
||||||
|
FftwMutex.lock();
|
||||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
/*if (plistener) {
|
/*if (plistener) {
|
||||||
@@ -736,6 +737,7 @@ namespace rtengine {
|
|||||||
fftwf_destroy_plan( plan_forward_blox[1] );
|
fftwf_destroy_plan( plan_forward_blox[1] );
|
||||||
fftwf_destroy_plan( plan_backward_blox[1] );
|
fftwf_destroy_plan( plan_backward_blox[1] );
|
||||||
fftwf_cleanup();
|
fftwf_cleanup();
|
||||||
|
FftwMutex.unlock();
|
||||||
|
|
||||||
}//end of main RGB_denoise
|
}//end of main RGB_denoise
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user