diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2018-07-04 15:26:42 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2018-07-04 15:37:24 +0300 |
commit | 9db8bdbc653eb783707a748a271797510144a8eb (patch) | |
tree | 806f8c5d27790244de203ae62829b04db0be1610 /intern/cycles/kernel/filter | |
parent | 97a0d6fcc736e604113487196ff3c3578306fc6c (diff) |
Cycles Denoising: Cleanup: Rename tiles to tile_info
Diffstat (limited to 'intern/cycles/kernel/filter')
-rw-r--r-- | intern/cycles/kernel/filter/filter_defines.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/filter/filter_prefilter.h | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/intern/cycles/kernel/filter/filter_defines.h b/intern/cycles/kernel/filter/filter_defines.h index ce96f733aff..57d3d90594f 100644 --- a/intern/cycles/kernel/filter/filter_defines.h +++ b/intern/cycles/kernel/filter/filter_defines.h @@ -22,7 +22,7 @@ #define XTWX_SIZE (((DENOISE_FEATURES+1)*(DENOISE_FEATURES+2))/2) #define XTWY_SIZE (DENOISE_FEATURES+1) -typedef struct TilesInfo { +typedef struct TileInfo { int offsets[9]; int strides[9]; int x[4]; @@ -33,6 +33,6 @@ typedef struct TilesInfo { #else long long int buffers[9]; #endif -} TilesInfo; +} TileInfo; #endif /* __FILTER_DEFINES_H__*/ diff --git a/intern/cycles/kernel/filter/filter_prefilter.h b/intern/cycles/kernel/filter/filter_prefilter.h index 4af209341f6..9513bf46bd7 100644 --- a/intern/cycles/kernel/filter/filter_prefilter.h +++ b/intern/cycles/kernel/filter/filter_prefilter.h @@ -26,7 +26,7 @@ CCL_NAMESPACE_BEGIN * bufferVariance: The buffer-based variance of the shadow feature. Unbiased, but quite noisy. */ ccl_device void kernel_filter_divide_shadow(int sample, - ccl_global TilesInfo *tiles, + ccl_global TileInfo *tile_info, int x, int y, ccl_global float *unfilteredA, ccl_global float *unfilteredB, @@ -37,13 +37,13 @@ ccl_device void kernel_filter_divide_shadow(int sample, int buffer_pass_stride, int buffer_denoising_offset) { - int xtile = (x < tiles->x[1])? 0: ((x < tiles->x[2])? 1: 2); - int ytile = (y < tiles->y[1])? 0: ((y < tiles->y[2])? 1: 2); + int xtile = (x < tile_info->x[1])? 0: ((x < tile_info->x[2])? 1: 2); + int ytile = (y < tile_info->y[1])? 0: ((y < tile_info->y[2])? 1: 2); int tile = ytile*3+xtile; - int offset = tiles->offsets[tile]; - int stride = tiles->strides[tile]; - const ccl_global float *ccl_restrict center_buffer = (ccl_global float*) tiles->buffers[tile]; + int offset = tile_info->offsets[tile]; + int stride = tile_info->strides[tile]; + const ccl_global float *ccl_restrict center_buffer = (ccl_global float*) tile_info->buffers[tile]; center_buffer += (y*stride + x + offset)*buffer_pass_stride; center_buffer += buffer_denoising_offset + 14; @@ -79,7 +79,7 @@ ccl_device void kernel_filter_divide_shadow(int sample, * - rect: The prefilter area (lower pixels inclusive, upper pixels exclusive). */ ccl_device void kernel_filter_get_feature(int sample, - ccl_global TilesInfo *tiles, + ccl_global TileInfo *tile_info, int m_offset, int v_offset, int x, int y, ccl_global float *mean, @@ -87,10 +87,10 @@ ccl_device void kernel_filter_get_feature(int sample, int4 rect, int buffer_pass_stride, int buffer_denoising_offset) { - int xtile = (x < tiles->x[1])? 0: ((x < tiles->x[2])? 1: 2); - int ytile = (y < tiles->y[1])? 0: ((y < tiles->y[2])? 1: 2); + int xtile = (x < tile_info->x[1])? 0: ((x < tile_info->x[2])? 1: 2); + int ytile = (y < tile_info->y[1])? 0: ((y < tile_info->y[2])? 1: 2); int tile = ytile*3+xtile; - ccl_global float *center_buffer = ((ccl_global float*) tiles->buffers[tile]) + (tiles->offsets[tile] + y*tiles->strides[tile] + x)*buffer_pass_stride + buffer_denoising_offset; + ccl_global float *center_buffer = ((ccl_global float*) tile_info->buffers[tile]) + (tile_info->offsets[tile] + y*tile_info->strides[tile] + x)*buffer_pass_stride + buffer_denoising_offset; int buffer_w = align_up(rect.z - rect.x, 4); int idx = (y-rect.y)*buffer_w + (x - rect.x); |