Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2018-10-08 23:17:06 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-10-08 23:17:06 +0300
commit0234de7d8517b16f7a1df7e537f711d3f062ba29 (patch)
tree4f1808675d70434fa85b07fa9ffe5c70406131fd /intern
parent15e9d80375797dd7ba9779daf6d1a7da5cd6de8e (diff)
Cycles: Reuse existing buffer in the NLM denoising kernels on CPU
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/device_cpu.cpp3
-rw-r--r--intern/cycles/device/device_denoising.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 4986bb809fb..7eb73dea3ef 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -475,7 +475,6 @@ public:
float *blurDifference = temporary_mem;
float *difference = temporary_mem + task->buffer.pass_stride;
float *weightAccum = temporary_mem + 2*task->buffer.pass_stride;
- float *temp_image = temporary_mem + 3*task->buffer.pass_stride;
memset(weightAccum, 0, sizeof(float)*w*h);
memset((float*) out_ptr, 0, sizeof(float)*w*h);
@@ -500,7 +499,7 @@ public:
filter_nlm_update_output_kernel()(dx, dy,
blurDifference,
(float*) image_ptr,
- temp_image,
+ difference,
(float*) out_ptr,
weightAccum,
local_rect,
diff --git a/intern/cycles/device/device_denoising.cpp b/intern/cycles/device/device_denoising.cpp
index 3384e1d81fd..78c65a3d22d 100644
--- a/intern/cycles/device/device_denoising.cpp
+++ b/intern/cycles/device/device_denoising.cpp
@@ -107,7 +107,7 @@ void DenoisingTask::setup_denoising_buffer()
num_layers = 2*num_shifts + 1;
}
else {
- num_layers = 4;
+ num_layers = 3;
}
/* Allocate two layers per shift as well as one for the weight accumulation. */
buffer.temporary_mem.alloc_to_device(num_layers * buffer.pass_stride);