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
diff options
context:
space:
mode:
-rw-r--r--intern/cycles/blender/addon/ui.py2
-rw-r--r--intern/cycles/blender/blender_session.cpp2
-rw-r--r--intern/cycles/device/device_cpu.cpp4
-rw-r--r--intern/cycles/device/device_cuda.cpp4
-rw-r--r--intern/cycles/device/device_denoising.cpp12
-rw-r--r--intern/cycles/device/device_denoising.h2
-rw-r--r--intern/cycles/device/device_task.h2
-rw-r--r--intern/cycles/device/opencl/opencl_base.cpp4
-rw-r--r--intern/cycles/filter/filter_transform.h10
-rw-r--r--intern/cycles/filter/filter_transform_gpu.h10
-rw-r--r--intern/cycles/filter/filter_transform_sse.h10
-rw-r--r--intern/cycles/filter/kernels/cpu/filter_cpu.h2
-rw-r--r--intern/cycles/filter/kernels/cpu/filter_cpu_impl.h4
-rw-r--r--intern/cycles/filter/kernels/cuda/filter.cu4
-rw-r--r--intern/cycles/filter/kernels/opencl/filter.cl4
-rw-r--r--intern/cycles/render/session.cpp2
-rw-r--r--intern/cycles/render/session.h6
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenloader/intern/versioning_270.c2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c6
21 files changed, 48 insertions, 48 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 8b96d27febc..1557115d3e0 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -595,7 +595,7 @@ class CyclesRender_PT_denoising(CyclesButtonsPanel, Panel):
col = layout.column()
sub = col.column(align=True)
- sub.prop(rl, "half_window")
+ sub.prop(rl, "radius")
sub.prop(rl, "filter_strength", slider=True)
sub.prop(rl, "filter_weighting_adjust", slider=True)
sub.prop(rl, "filter_gradients")
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 747ab569c79..2f3d0ff3164 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -520,7 +520,7 @@ void BlenderSession::render()
scene->film->denoising_split_pass = b_layer_iter->filter_cross();
buffer_params.denoising_clean_pass = scene->film->denoising_clean_pass;
buffer_params.denoising_split_pass = scene->film->denoising_split_pass;
- session->params.denoising_half_window = b_layer_iter->half_window();
+ session->params.denoising_radius = b_layer_iter->denoising_radius();
session->params.denoising_pca_threshold = (b_layer_iter->filter_strength() == 0.0f)? 1e-3f : copysignf(powf(10.0f, -fabsf(b_layer_iter->filter_strength())*2.0f), b_layer_iter->filter_strength());
session->params.denoising_weight_adjust = powf(2.0f, b_layer_iter->filter_weighting_adjust() - 1.0f);
session->params.denoising_use_gradients = b_layer_iter->filter_gradients();
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 426dda87422..d61ca793586 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -456,7 +456,7 @@ public:
(float*) task->storage.transform.device_pointer,
(int*) task->storage.rank.device_pointer,
&task->rect.x,
- task->half_window,
+ task->radius,
task->pca_threshold);
}
}
@@ -476,7 +476,7 @@ public:
float *difference = (float*) task->reconstruction_state.temporary_1_ptr;
float *blurDifference = (float*) task->reconstruction_state.temporary_2_ptr;
- int r = task->half_window;
+ int r = task->radius;
for(int i = 0; i < (2*r+1)*(2*r+1); i++) {
int dy = i / (2*r+1) - r;
int dx = i % (2*r+1) - r;
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 07166fc528e..8c9db9bab27 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -1021,7 +1021,7 @@ public:
&task->storage.rank.device_pointer,
&task->filter_area,
&task->rect,
- &task->half_window,
+ &task->radius,
&task->pca_threshold};
CUDA_LAUNCH_KERNEL(cuFilterConstructTransform, args);
cuda_assert(cuCtxSynchronize());
@@ -1065,7 +1065,7 @@ public:
CUdeviceptr difference = task->reconstruction_state.temporary_1_ptr;
CUdeviceptr blurDifference = task->reconstruction_state.temporary_2_ptr;
- int r = task->half_window;
+ int r = task->radius;
int f = 4;
float a = 1.0f;
for(int i = 0; i < (2*r+1)*(2*r+1); i++) {
diff --git a/intern/cycles/device/device_denoising.cpp b/intern/cycles/device/device_denoising.cpp
index 008808ddd18..6e3a5bb399a 100644
--- a/intern/cycles/device/device_denoising.cpp
+++ b/intern/cycles/device/device_denoising.cpp
@@ -22,7 +22,7 @@ CCL_NAMESPACE_BEGIN
void DenoisingTask::init_from_devicetask(const DeviceTask &task)
{
- half_window = task.denoising_half_window;
+ radius = task.denoising_radius;
pca_threshold = task.denoising_pca_threshold;
nlm_k_2 = task.denoising_weight_adjust;
use_cross_denoising = task.denoising_use_cross;
@@ -32,11 +32,11 @@ void DenoisingTask::init_from_devicetask(const DeviceTask &task)
render_buffer.denoising_data_offset = task.pass_denoising_data;
render_buffer.denoising_clean_offset = task.pass_denoising_clean;
- /* Expand filter_area by half_window pixels and clamp the result to the extent of the neighboring tiles */
- rect = make_int4(max(tiles->x[0], filter_area.x - half_window),
- max(tiles->y[0], filter_area.y - half_window),
- min(tiles->x[3], filter_area.x + filter_area.z + half_window),
- min(tiles->y[3], filter_area.y + filter_area.w + half_window));
+ /* Expand filter_area by radius pixels and clamp the result to the extent of the neighboring tiles */
+ rect = make_int4(max(tiles->x[0], filter_area.x - radius),
+ max(tiles->y[0], filter_area.y - radius),
+ min(tiles->x[3], filter_area.x + filter_area.z + radius),
+ min(tiles->y[3], filter_area.y + filter_area.w + radius));
}
void DenoisingTask::tiles_from_rendertiles(RenderTile *rtiles)
diff --git a/intern/cycles/device/device_denoising.h b/intern/cycles/device/device_denoising.h
index 6a761258ab3..3a4e9591678 100644
--- a/intern/cycles/device/device_denoising.h
+++ b/intern/cycles/device/device_denoising.h
@@ -27,7 +27,7 @@ CCL_NAMESPACE_BEGIN
class DenoisingTask {
public:
/* Parameters of the denoising algorithm. */
- int half_window;
+ int radius;
float pca_threshold;
float nlm_k_2;
bool use_cross_denoising;
diff --git a/intern/cycles/device/device_task.h b/intern/cycles/device/device_task.h
index 3f34426ebbe..9b958e159dc 100644
--- a/intern/cycles/device/device_task.h
+++ b/intern/cycles/device/device_task.h
@@ -67,7 +67,7 @@ public:
function<bool(void)> get_cancel;
function<void(RenderTile*)> get_neighbor_tiles;
- int denoising_half_window;
+ int denoising_radius;
float denoising_pca_threshold;
float denoising_weight_adjust;
bool denoising_use_cross;
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
index 82d39830848..f10e45bf35c 100644
--- a/intern/cycles/device/opencl/opencl_base.cpp
+++ b/intern/cycles/device/opencl/opencl_base.cpp
@@ -669,7 +669,7 @@ bool OpenCLDeviceBase::denoising_construct_transform(DenoisingTask *task)
rank_mem,
task->filter_area,
task->rect,
- task->half_window,
+ task->radius,
task->pca_threshold);
enqueue_kernel(ckFilterConstructTransform,
@@ -711,7 +711,7 @@ bool OpenCLDeviceBase::denoising_reconstruct(device_ptr color_ptr,
cl_mem difference = CL_MEM_PTR(task->reconstruction_state.temporary_1_ptr);
cl_mem blurDifference = CL_MEM_PTR(task->reconstruction_state.temporary_2_ptr);
- int r = task->half_window;
+ int r = task->radius;
int f = 4;
float a = 1.0f;
for(int i = 0; i < (2*r+1)*(2*r+1); i++) {
diff --git a/intern/cycles/filter/filter_transform.h b/intern/cycles/filter/filter_transform.h
index 04d43278696..f70c5cd4c63 100644
--- a/intern/cycles/filter/filter_transform.h
+++ b/intern/cycles/filter/filter_transform.h
@@ -19,7 +19,7 @@ CCL_NAMESPACE_BEGIN
ccl_device void kernel_filter_construct_transform(int sample, float ccl_readonly_ptr buffer,
int x, int y, int4 rect,
float *transform, int *rank,
- int half_window, float pca_threshold)
+ int radius, float pca_threshold)
{
float features[DENOISE_FEATURES];
@@ -37,10 +37,10 @@ ccl_device void kernel_filter_construct_transform(int sample, float ccl_readonly
/* === Calculate denoising window. === */
- int2 low = make_int2(max(rect.x, x - half_window),
- max(rect.y, y - half_window));
- int2 high = make_int2(min(rect.z, x + half_window + 1),
- min(rect.w, y + half_window + 1));
+ int2 low = make_int2(max(rect.x, x - radius),
+ max(rect.y, y - radius));
+ int2 high = make_int2(min(rect.z, x + radius + 1),
+ min(rect.w, y + radius + 1));
diff --git a/intern/cycles/filter/filter_transform_gpu.h b/intern/cycles/filter/filter_transform_gpu.h
index 3a1b750a548..a42ccd76c4e 100644
--- a/intern/cycles/filter/filter_transform_gpu.h
+++ b/intern/cycles/filter/filter_transform_gpu.h
@@ -21,7 +21,7 @@ ccl_device void kernel_filter_construct_transform(int sample,
int x, int y, int4 rect,
ccl_global float *transform,
ccl_global int *rank,
- int half_window, float pca_threshold,
+ int radius, float pca_threshold,
int transform_stride, int localIdx)
{
ccl_local float shared_features[DENOISE_FEATURES*CCL_MAX_LOCAL_SIZE];
@@ -31,10 +31,10 @@ ccl_device void kernel_filter_construct_transform(int sample,
int buffer_h = (rect.w - rect.y);
int pass_stride = buffer_h * buffer_w;
/* === Calculate denoising window. === */
- int2 low = make_int2(max(rect.x, x - half_window),
- max(rect.y, y - half_window));
- int2 high = make_int2(min(rect.z, x + half_window + 1),
- min(rect.w, y + half_window + 1));
+ int2 low = make_int2(max(rect.x, x - radius),
+ max(rect.y, y - radius));
+ int2 high = make_int2(min(rect.z, x + radius + 1),
+ min(rect.w, y + radius + 1));
ccl_global float ccl_readonly_ptr pixel_buffer;
int2 pixel;
diff --git a/intern/cycles/filter/filter_transform_sse.h b/intern/cycles/filter/filter_transform_sse.h
index 9a8425ef10b..c5bb1e93e9f 100644
--- a/intern/cycles/filter/filter_transform_sse.h
+++ b/intern/cycles/filter/filter_transform_sse.h
@@ -19,7 +19,7 @@ CCL_NAMESPACE_BEGIN
ccl_device void kernel_filter_construct_transform(int sample, float ccl_readonly_ptr buffer,
int x, int y, int4 rect,
float *transform, int *rank,
- int half_window, float pca_threshold)
+ int radius, float pca_threshold)
{
int buffer_w = align_up(rect.z - rect.x, 4);
int buffer_h = (rect.w - rect.y);
@@ -29,10 +29,10 @@ ccl_device void kernel_filter_construct_transform(int sample, float ccl_readonly
float ccl_readonly_ptr pixel_buffer;
int2 pixel;
- int2 low = make_int2(max(rect.x, x - half_window),
- max(rect.y, y - half_window));
- int2 high = make_int2(min(rect.z, x + half_window + 1),
- min(rect.w, y + half_window + 1));
+ int2 low = make_int2(max(rect.x, x - radius),
+ max(rect.y, y - radius));
+ int2 high = make_int2(min(rect.z, x + radius + 1),
+ min(rect.w, y + radius + 1));
__m128 feature_means[DENOISE_FEATURES];
math_vector_zero_sse(feature_means, DENOISE_FEATURES);
diff --git a/intern/cycles/filter/kernels/cpu/filter_cpu.h b/intern/cycles/filter/kernels/cpu/filter_cpu.h
index 5ad4ba215a4..b6f810d07b4 100644
--- a/intern/cycles/filter/kernels/cpu/filter_cpu.h
+++ b/intern/cycles/filter/kernels/cpu/filter_cpu.h
@@ -61,7 +61,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_construct_transform)(int sample,
float *transform,
int *rank,
int* rect,
- int half_window,
+ int radius,
float pca_threshold);
void KERNEL_FUNCTION_FULL_NAME(filter_divide_combined)(int x, int y,
diff --git a/intern/cycles/filter/kernels/cpu/filter_cpu_impl.h b/intern/cycles/filter/kernels/cpu/filter_cpu_impl.h
index a3cd000fbc2..75feed6a1f7 100644
--- a/intern/cycles/filter/kernels/cpu/filter_cpu_impl.h
+++ b/intern/cycles/filter/kernels/cpu/filter_cpu_impl.h
@@ -116,7 +116,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_construct_transform)(int sample,
float *transform,
int *rank,
int* prefilter_rect,
- int half_window,
+ int radius,
float pca_threshold)
{
#ifdef KERNEL_STUB
@@ -127,7 +127,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_construct_transform)(int sample,
kernel_filter_construct_transform(sample, buffer,
x, y, load_int4(prefilter_rect),
transform, rank,
- half_window, pca_threshold);
+ radius, pca_threshold);
#endif
}
diff --git a/intern/cycles/filter/kernels/cuda/filter.cu b/intern/cycles/filter/kernels/cuda/filter.cu
index 03ad1fea28e..bb9ed38a812 100644
--- a/intern/cycles/filter/kernels/cuda/filter.cu
+++ b/intern/cycles/filter/kernels/cuda/filter.cu
@@ -106,7 +106,7 @@ CUDA_LAUNCH_BOUNDS(CUDA_THREADS_BLOCK_WIDTH, CUDA_KERNEL_MAX_REGISTERS)
kernel_cuda_filter_construct_transform(int sample, float const* __restrict__ buffer,
float *transform, int *rank,
int4 filter_area, int4 rect,
- int half_window, float pca_threshold)
+ int radius, float pca_threshold)
{
int x = blockDim.x*blockIdx.x + threadIdx.x;
int y = blockDim.y*blockIdx.y + threadIdx.y;
@@ -116,7 +116,7 @@ kernel_cuda_filter_construct_transform(int sample, float const* __restrict__ buf
kernel_filter_construct_transform(sample, buffer,
x + filter_area.x, y + filter_area.y,
rect, l_transform, l_rank,
- half_window, pca_threshold,
+ radius, pca_threshold,
filter_area.z*filter_area.w,
threadIdx.y*blockDim.x + threadIdx.x);
}
diff --git a/intern/cycles/filter/kernels/opencl/filter.cl b/intern/cycles/filter/kernels/opencl/filter.cl
index d19355e0e09..42bb6b4db85 100644
--- a/intern/cycles/filter/kernels/opencl/filter.cl
+++ b/intern/cycles/filter/kernels/opencl/filter.cl
@@ -102,7 +102,7 @@ __kernel void kernel_ocl_filter_construct_transform(int sample,
ccl_global int *rank,
int4 filter_area,
int4 rect,
- int half_window,
+ int radius,
float pca_threshold)
{
int x = get_global_id(0);
@@ -113,7 +113,7 @@ __kernel void kernel_ocl_filter_construct_transform(int sample,
kernel_filter_construct_transform(sample, buffer,
x + filter_area.x, y + filter_area.y,
rect, l_transform, l_rank,
- half_window, pca_threshold,
+ radius, pca_threshold,
filter_area.z*filter_area.w,
get_local_id(1)*get_local_size(0) + get_local_id(0));
}
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 237f8946fb5..85623fcef21 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -965,7 +965,7 @@ void Session::render()
task.passes_size = tile_manager.params.get_passes_size();
if(params.denoise_result) {
- task.denoising_half_window = params.denoising_half_window;
+ task.denoising_radius = params.denoising_radius;
task.denoising_pca_threshold = params.denoising_pca_threshold;
task.denoising_weight_adjust = params.denoising_weight_adjust;
task.denoising_use_cross = params.denoising_use_cross;
diff --git a/intern/cycles/render/session.h b/intern/cycles/render/session.h
index 61dbed0651d..622cd45e792 100644
--- a/intern/cycles/render/session.h
+++ b/intern/cycles/render/session.h
@@ -59,7 +59,7 @@ public:
bool display_buffer_linear;
- int denoising_half_window;
+ int denoising_radius;
float denoising_pca_threshold;
float denoising_weight_adjust;
bool denoising_use_gradients;
@@ -90,7 +90,7 @@ public:
display_buffer_linear = false;
- denoising_half_window = 8;
+ denoising_radius = 8;
denoising_pca_threshold = 1e-3f;
denoising_weight_adjust = 0.5f;
denoising_use_gradients = false;
@@ -117,7 +117,7 @@ public:
&& start_resolution == params.start_resolution
&& threads == params.threads
&& denoise_result == params.denoise_result
- && denoising_half_window == params.denoising_half_window
+ && denoising_radius == params.denoising_radius
&& denoising_pca_threshold == params.denoising_pca_threshold
&& denoising_weight_adjust == params.denoising_weight_adjust
&& denoising_use_gradients == params.denoising_use_gradients
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 9aeca3fbaf2..08804fb980e 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2043,7 +2043,7 @@ SceneRenderLayer *BKE_scene_add_render_layer(Scene *sce, const char *name)
srl->pass_alpha_threshold = 0.5f;
srl->denoiseflag = SCE_DENOISE_PASS_DIFFDIR|SCE_DENOISE_PASS_GLOSSDIR|SCE_DENOISE_PASS_TRANSDIR|SCE_DENOISE_PASS_SUBDIR|
SCE_DENOISE_PASS_DIFFIND|SCE_DENOISE_PASS_GLOSSIND|SCE_DENOISE_PASS_TRANSIND|SCE_DENOISE_PASS_SUBIND;
- srl->denoise_half_window = 8;
+ srl->denoising_radius = 8;
srl->denoise_strength = 0.0f;
BKE_freestyle_config_init(&srl->freestyleConfig);
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 07edbd85d27..55ddcb5e612 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1414,7 +1414,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
for (rl = sce->r.layers.first; rl; rl = rl->next) {
rl->denoiseflag = SCE_DENOISE_PASS_DIFFDIR|SCE_DENOISE_PASS_GLOSSDIR|SCE_DENOISE_PASS_TRANSDIR|SCE_DENOISE_PASS_SUBDIR|
SCE_DENOISE_PASS_DIFFIND|SCE_DENOISE_PASS_GLOSSIND|SCE_DENOISE_PASS_TRANSIND|SCE_DENOISE_PASS_SUBIND;
- rl->denoise_half_window = 8;
+ rl->denoising_radius = 8;
rl->denoise_strength = 0.0f;
}
}
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 2e9f53c6109..5569dc823bd 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -228,7 +228,7 @@ typedef struct SceneRenderLayer {
int pass_xor;
int denoiseflag;
- int denoise_half_window;
+ int denoising_radius;
float denoise_strength;
float denoise_weighting;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 5f578ad2c0b..5443c56fe95 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -5147,10 +5147,10 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Filter weighting adjust", "Controls neighbor pixel weighting for the denoising filter (lower values preserve more detail, but aren't as smooth)");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- prop = RNA_def_property(srna, "half_window", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "denoise_half_window");
+ prop = RNA_def_property(srna, "denoising_radius", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "denoising_radius");
RNA_def_property_range(prop, 1, 50);
- RNA_def_property_ui_text(prop, "Half window", "Size of the filter window (the pixel area used for denoising one pixel). Higher values get rid of more noise, but might lose detail and are slower");
+ RNA_def_property_ui_text(prop, "Denoising Radius", "Size of the image area that's used to denoise a pixel. Higher values get rid of more noise, but might lose detail and are slower");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "filter_gradients", PROP_BOOLEAN, PROP_NONE);