Blender  V2.93
Functions
filter_nlm_gpu.h File Reference

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN ccl_device_inline bool get_nlm_coords_window (int w, int h, int r, int stride, int4 *rect, int4 *co, int *ofs, int4 window)
 
ccl_device_inline bool get_nlm_coords (int w, int h, int r, int stride, int4 *rect, int4 *co, int *ofs)
 
ccl_device_inline void kernel_filter_nlm_calc_difference (int x, int y, int dx, int dy, const ccl_global float *ccl_restrict weight_image, const ccl_global float *ccl_restrict variance_image, const ccl_global float *ccl_restrict scale_image, ccl_global float *difference_image, int4 rect, int stride, int channel_offset, int frame_offset, float a, float k_2)
 
ccl_device_inline void kernel_filter_nlm_blur (int x, int y, const ccl_global float *ccl_restrict difference_image, ccl_global float *out_image, int4 rect, int stride, int f)
 
ccl_device_inline void kernel_filter_nlm_calc_weight (int x, int y, const ccl_global float *ccl_restrict difference_image, ccl_global float *out_image, int4 rect, int stride, int f)
 
ccl_device_inline void kernel_filter_nlm_update_output (int x, int y, int dx, int dy, const ccl_global float *ccl_restrict difference_image, const ccl_global float *ccl_restrict image, ccl_global float *out_image, ccl_global float *accum_image, int4 rect, int channel_offset, int stride, int f)
 
ccl_device_inline void kernel_filter_nlm_construct_gramian (int x, int y, int dx, int dy, int t, const ccl_global float *ccl_restrict difference_image, const ccl_global float *ccl_restrict buffer, const ccl_global float *ccl_restrict transform, ccl_global int *rank, ccl_global float *XtWX, ccl_global float3 *XtWY, int4 rect, int4 filter_window, int stride, int f, int pass_stride, int frame_offset, bool use_time, int localIdx)
 
ccl_device_inline void kernel_filter_nlm_normalize (int x, int y, ccl_global float *out_image, const ccl_global float *ccl_restrict accum_image, int stride)
 

Function Documentation

◆ get_nlm_coords()

ccl_device_inline bool get_nlm_coords ( int  w,
int  h,
int  r,
int  stride,
int4 rect,
int4 co,
int *  ofs 
)

Definition at line 69 of file filter_nlm_gpu.h.

References get_nlm_coords_window(), make_int4, r, stride, and w().

◆ get_nlm_coords_window()

CCL_NAMESPACE_BEGIN ccl_device_inline bool get_nlm_coords_window ( int  w,
int  h,
int  r,
int  stride,
int4 rect,
int4 co,
int *  ofs,
int4  window 
)

Definition at line 27 of file filter_nlm_gpu.h.

References ccl_global_id, local_index_to_coord(), make_int4, max, r, rect_clip(), rect_is_valid(), stride, w(), x, and y.

Referenced by get_nlm_coords().

◆ kernel_filter_nlm_blur()

ccl_device_inline void kernel_filter_nlm_blur ( int  x,
int  y,
const ccl_global float *ccl_restrict  difference_image,
ccl_global float out_image,
int4  rect,
int  stride,
int  f 
)

Definition at line 112 of file filter_nlm_gpu.h.

References high(), low(), max, min, stride, sum(), int4::w, x, int4::y, y, and y1.

◆ kernel_filter_nlm_calc_difference()

ccl_device_inline void kernel_filter_nlm_calc_difference ( int  x,
int  y,
int  dx,
int  dy,
const ccl_global float *ccl_restrict  weight_image,
const ccl_global float *ccl_restrict  variance_image,
const ccl_global float *ccl_restrict  scale_image,
ccl_global float difference_image,
int4  rect,
int  stride,
int  channel_offset,
int  frame_offset,
float  a,
float  k_2 
)

Definition at line 75 of file filter_nlm_gpu.h.

References Freestyle::a, Freestyle::c, clamp(), KDL::diff(), min, sqr(), stride, x, and y.

◆ kernel_filter_nlm_calc_weight()

ccl_device_inline void kernel_filter_nlm_calc_weight ( int  x,
int  y,
const ccl_global float *ccl_restrict  difference_image,
ccl_global float out_image,
int4  rect,
int  stride,
int  f 
)

Definition at line 131 of file filter_nlm_gpu.h.

References fast_expf(), high(), low(), max, min, stride, sum(), int4::x, x, y, and int4::z.

◆ kernel_filter_nlm_construct_gramian()

ccl_device_inline void kernel_filter_nlm_construct_gramian ( int  x,
int  y,
int  dx,
int  dy,
int  t,
const ccl_global float *ccl_restrict  difference_image,
const ccl_global float *ccl_restrict  buffer,
const ccl_global float *ccl_restrict  transform,
ccl_global int *  rank,
ccl_global float XtWX,
ccl_global float3 XtWY,
int4  rect,
int4  filter_window,
int  stride,
int  f,
int  pass_stride,
int  frame_offset,
bool  use_time,
int  localIdx 
)

◆ kernel_filter_nlm_normalize()

ccl_device_inline void kernel_filter_nlm_normalize ( int  x,
int  y,
ccl_global float out_image,
const ccl_global float *ccl_restrict  accum_image,
int  stride 
)

Definition at line 245 of file filter_nlm_gpu.h.

References stride, x, and y.

◆ kernel_filter_nlm_update_output()

ccl_device_inline void kernel_filter_nlm_update_output ( int  x,
int  y,
int  dx,
int  dy,
const ccl_global float *ccl_restrict  difference_image,
const ccl_global float *ccl_restrict  image,
ccl_global float out_image,
ccl_global float accum_image,
int4  rect,
int  channel_offset,
int  stride,
int  f 
)

Definition at line 150 of file filter_nlm_gpu.h.

References atomic_add_and_fetch_float, high(), low(), max, min, stride, sum(), int4::x, x, y, and int4::z.