Code refactor: use split variance calculation for mega kernels too.
There is no significant difference in denoised benchmark scenes and denoising ctests, so might as well make it all consistent.
This commit is contained in:
@@ -27,8 +27,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
|
||||
float *bufferV,
|
||||
int* prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
bool use_split_variance);
|
||||
int buffer_denoising_offset);
|
||||
|
||||
void KERNEL_FUNCTION_FULL_NAME(filter_get_feature)(int sample,
|
||||
TilesInfo *tiles,
|
||||
@@ -40,8 +39,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_get_feature)(int sample,
|
||||
float *variance,
|
||||
int* prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
bool use_split_variance);
|
||||
int buffer_denoising_offset);
|
||||
|
||||
void KERNEL_FUNCTION_FULL_NAME(filter_detect_outliers)(int x, int y,
|
||||
ccl_global float *image,
|
||||
|
||||
@@ -45,8 +45,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
|
||||
float *bufferVariance,
|
||||
int* prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
bool use_split_variance)
|
||||
int buffer_denoising_offset)
|
||||
{
|
||||
#ifdef KERNEL_STUB
|
||||
STUB_ASSERT(KERNEL_ARCH, filter_divide_shadow);
|
||||
@@ -60,8 +59,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_divide_shadow)(int sample,
|
||||
bufferVariance,
|
||||
load_int4(prefilter_rect),
|
||||
buffer_pass_stride,
|
||||
buffer_denoising_offset,
|
||||
use_split_variance);
|
||||
buffer_denoising_offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -74,8 +72,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_get_feature)(int sample,
|
||||
float *mean, float *variance,
|
||||
int* prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
bool use_split_variance)
|
||||
int buffer_denoising_offset)
|
||||
{
|
||||
#ifdef KERNEL_STUB
|
||||
STUB_ASSERT(KERNEL_ARCH, filter_get_feature);
|
||||
@@ -86,8 +83,7 @@ void KERNEL_FUNCTION_FULL_NAME(filter_get_feature)(int sample,
|
||||
mean, variance,
|
||||
load_int4(prefilter_rect),
|
||||
buffer_pass_stride,
|
||||
buffer_denoising_offset,
|
||||
use_split_variance);
|
||||
buffer_denoising_offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@ kernel_cuda_filter_divide_shadow(int sample,
|
||||
float *bufferVariance,
|
||||
int4 prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
bool use_split_variance)
|
||||
int buffer_denoising_offset)
|
||||
{
|
||||
int x = prefilter_rect.x + blockDim.x*blockIdx.x + threadIdx.x;
|
||||
int y = prefilter_rect.y + blockDim.y*blockIdx.y + threadIdx.y;
|
||||
@@ -53,8 +52,7 @@ kernel_cuda_filter_divide_shadow(int sample,
|
||||
bufferVariance,
|
||||
prefilter_rect,
|
||||
buffer_pass_stride,
|
||||
buffer_denoising_offset,
|
||||
use_split_variance);
|
||||
buffer_denoising_offset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +66,7 @@ kernel_cuda_filter_get_feature(int sample,
|
||||
float *variance,
|
||||
int4 prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
bool use_split_variance)
|
||||
int buffer_denoising_offset)
|
||||
{
|
||||
int x = prefilter_rect.x + blockDim.x*blockIdx.x + threadIdx.x;
|
||||
int y = prefilter_rect.y + blockDim.y*blockIdx.y + threadIdx.y;
|
||||
@@ -81,8 +78,7 @@ kernel_cuda_filter_get_feature(int sample,
|
||||
mean, variance,
|
||||
prefilter_rect,
|
||||
buffer_pass_stride,
|
||||
buffer_denoising_offset,
|
||||
use_split_variance);
|
||||
buffer_denoising_offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,7 @@ __kernel void kernel_ocl_filter_divide_shadow(int sample,
|
||||
ccl_global float *bufferVariance,
|
||||
int4 prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
char use_split_variance)
|
||||
int buffer_denoising_offset)
|
||||
{
|
||||
int x = prefilter_rect.x + get_global_id(0);
|
||||
int y = prefilter_rect.y + get_global_id(1);
|
||||
@@ -47,8 +46,7 @@ __kernel void kernel_ocl_filter_divide_shadow(int sample,
|
||||
bufferVariance,
|
||||
prefilter_rect,
|
||||
buffer_pass_stride,
|
||||
buffer_denoising_offset,
|
||||
use_split_variance);
|
||||
buffer_denoising_offset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,8 +58,7 @@ __kernel void kernel_ocl_filter_get_feature(int sample,
|
||||
ccl_global float *variance,
|
||||
int4 prefilter_rect,
|
||||
int buffer_pass_stride,
|
||||
int buffer_denoising_offset,
|
||||
char use_split_variance)
|
||||
int buffer_denoising_offset)
|
||||
{
|
||||
int x = prefilter_rect.x + get_global_id(0);
|
||||
int y = prefilter_rect.y + get_global_id(1);
|
||||
@@ -73,8 +70,7 @@ __kernel void kernel_ocl_filter_get_feature(int sample,
|
||||
mean, variance,
|
||||
prefilter_rect,
|
||||
buffer_pass_stride,
|
||||
buffer_denoising_offset,
|
||||
use_split_variance);
|
||||
buffer_denoising_offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user