26 #if defined(FIXED_POINT_POSITION)
61 const int total_width = BORDER_SIZE_LEFT + width + BORDER_SIZE_RIGHT;
62 const int gid0 = get_global_id(0);
63 const int gidH = gid0 - total_width;
64 const int gidW = gid0 - BORDER_SIZE_LEFT;
70 for(
int i = -BORDER_SIZE_LEFT; i < 0; ++i)
76 for(
int i = 0; i < BORDER_SIZE_RIGHT; ++i)
85 if(gidW < 0 || gidW > (width - 1))
87 val_idx = gidW < 0 ? 0 : width - 1;
92 for(
int i = -BORDER_SIZE_TOP; i < 0; ++i)
98 for(
int i = 0; i < BORDER_SIZE_BOTTOM; ++i)
138 const int total_width = BORDER_SIZE_LEFT + width + BORDER_SIZE_RIGHT;
139 const int gid0 = get_global_id(0);
140 const int gidH = gid0 - total_width;
141 const int gidW = gid0 - BORDER_SIZE_LEFT;
146 for(
int i = -BORDER_SIZE_LEFT; i < 0; ++i)
151 for(
int i = 0; i < BORDER_SIZE_RIGHT; ++i)
159 for(
int i = -BORDER_SIZE_TOP; i < 0; ++i)
164 for(
int i = 0; i < BORDER_SIZE_BOTTOM; ++i)
166 *(__global
DATA_TYPE *)
offset(&buf, gidW, height + i) = constant_value;
#define CONVERT_TENSOR3D_TO_IMAGE_STRUCT_NO_STEP(name)
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
__kernel void fill_image_borders_constant(__global uchar *buf_ptr, uint buf_stride_x, uint buf_step_x, uint buf_stride_y, uint buf_step_y, uint buf_stride_z, uint buf_step_z, uint buf_offset_first_element_in_bytes, uint width, uint height, int2 start_pos, DATA_TYPE constant_value)
Fill N pixels of the padding edge of a single channel image with a constant value.
Structure to hold Image information.
#define TENSOR3D_DECLARATION(name)
__global uchar * ptr
Pointer to the starting postion of the buffer.
__kernel void fill_image_borders_replicate(__global uchar *buf_ptr, uint buf_stride_x, uint buf_step_x, uint buf_stride_y, uint buf_step_y, uint buf_stride_z, uint buf_step_z, uint buf_offset_first_element_in_bytes, uint width, uint height, int2 start_pos)
Fill N pixel of the padding edge of a single channel image by replicating the closest valid pixel...
int stride_y
Stride of the image in Y dimension (in bytes)
int stride_x
Stride of the image in X dimension (in bytes)