Cycles Denoising: Merge outlier heuristic and confidence interval test
[blender.git] / intern / cycles / device / device_cpu.cpp
index c2f74aa89039213611a5803ecd4b4ebf0d796bf8..29bb1f91a40b1fc330bc001341084c4d74fa4447 100644 (file)
@@ -185,9 +185,9 @@ public:
        KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int, int)>       filter_nlm_update_output_kernel;
        KernelFunctions<void(*)(float*, float*, int*, int)>                                      filter_nlm_normalize_kernel;
 
-       KernelFunctions<void(*)(float*, int, int, int, float*, int*, int*, int, int, float)>                                              filter_construct_transform_kernel;
-       KernelFunctions<void(*)(int, int, float*, float*, float*, float*, float*, int*, float*, float3*, int*, int*, int, int, int, int)> filter_nlm_construct_gramian_kernel;
-       KernelFunctions<void(*)(int, int, int, int, int, float*, int*, float*, float3*, int*, int)>                                       filter_finalize_kernel;
+       KernelFunctions<void(*)(float*, int, int, int, float*, int*, int*, int, int, float)>                              filter_construct_transform_kernel;
+       KernelFunctions<void(*)(int, int, float*, float*, float*, int*, float*, float3*, int*, int*, int, int, int, int)> filter_nlm_construct_gramian_kernel;
+       KernelFunctions<void(*)(int, int, int, int, int, float*, int*, float*, float3*, int*, int)>                       filter_finalize_kernel;
 
        KernelFunctions<void(*)(KernelGlobals *, ccl_constant KernelData*, ccl_global void*, int, ccl_global char*,
                               ccl_global uint*, int, int, int, int, int, int, int, int, ccl_global int*, int,
@@ -465,8 +465,6 @@ public:
 
        bool denoising_reconstruct(device_ptr color_ptr,
                                   device_ptr color_variance_ptr,
-                                  device_ptr guide_ptr,
-                                  device_ptr guide_variance_ptr,
                                   device_ptr output_ptr,
                                   DenoisingTask *task)
        {
@@ -485,8 +483,8 @@ public:
                                             task->reconstruction_state.source_w - max(0, dx),
                                             task->reconstruction_state.source_h - max(0, dy)};
                        filter_nlm_calc_difference_kernel()(dx, dy,
-                                                           (float*) guide_ptr,
-                                                           (float*) guide_variance_ptr,
+                                                           (float*) color_ptr,
+                                                           (float*) color_variance_ptr,
                                                            difference,
                                                            local_rect,
                                                            task->buffer.w,
@@ -499,8 +497,6 @@ public:
                        filter_nlm_construct_gramian_kernel()(dx, dy,
                                                              blurDifference,
                                                              (float*)  task->buffer.mem.device_pointer,
-                                                             (float*)  color_ptr,
-                                                             (float*)  color_variance_ptr,
                                                              (float*)  task->storage.transform.device_pointer,
                                                              (int*)    task->storage.rank.device_pointer,
                                                              (float*)  task->storage.XtWX.device_pointer,
@@ -648,7 +644,7 @@ public:
                DenoisingTask denoising(this);
 
                denoising.functions.construct_transform = function_bind(&CPUDevice::denoising_construct_transform, this, &denoising);
-               denoising.functions.reconstruct = function_bind(&CPUDevice::denoising_reconstruct, this, _1, _2, _3, _4, _5, &denoising);
+               denoising.functions.reconstruct = function_bind(&CPUDevice::denoising_reconstruct, this, _1, _2, _3, &denoising);
                denoising.functions.divide_shadow = function_bind(&CPUDevice::denoising_divide_shadow, this, _1, _2, _3, _4, _5, &denoising);
                denoising.functions.non_local_means = function_bind(&CPUDevice::denoising_non_local_means, this, _1, _2, _3, _4, &denoising);
                denoising.functions.combine_halves = function_bind(&CPUDevice::denoising_combine_halves, this, _1, _2, _3, _4, _5, _6, &denoising);