[Bf-blender-cvs] [d21990c] soc-2016-cycles_denoising: Cycles: Fix two debugging problems in the Denoiser
Lukas Stockner
noreply at git.blender.org
Tue Nov 22 04:25:03 CET 2016
Commit: d21990c3bfa5d04daae7bb91f24a32fad031630b
Author: Lukas Stockner
Date: Sun Nov 13 17:40:28 2016 +0100
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rBd21990c3bfa5d04daae7bb91f24a32fad031630b
Cycles: Fix two debugging problems in the Denoiser
The mismatching alloc/dealloc would upset ASan, and the undefined elements would cause FPEs in the NLM code (the result was fine due to masking, but the intermediate values weren't).
===================================================================
M intern/cycles/device/device_cpu.cpp
===================================================================
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 3e421d1..180bc5a 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -270,6 +270,7 @@ public:
int w = align_up(rect.z - rect.x, 4), h = (rect.w - rect.y);
int pass_stride = w*h*frames;
float *filter_buffers = new float[22*pass_stride];
+ memset(filter_buffers, 0, sizeof(float)*22*pass_stride);
for(int frame = 0; frame < frames; frame++) {
@@ -538,7 +539,7 @@ public:
#undef WRITE_DEBUG
#endif
}
- free(storage);
+ delete[] storage;
}
void thread_render(DeviceTask& task)
More information about the Bf-blender-cvs
mailing list