72 float4 mapx_coords = vload4(0, (__global
float *)mapx.
ptr);
73 float4 mapy_coords = vload4(0, (__global
float *)mapy.
ptr);
74 float8 map_coords = (float8)(mapx_coords.s0, mapy_coords.s0, mapx_coords.s1, mapy_coords.s1,
75 mapx_coords.s2, mapy_coords.s2, mapx_coords.s3, mapy_coords.s3);
76 map_coords += (float8)(0.5f);
126 float4 mapx_coords = vload4(0, (__global
float *)mapx.
ptr);
127 float4 mapy_coords = vload4(0, (__global
float *)mapy.
ptr);
128 float8 map_coords = (float8)(mapx_coords.s0, mapy_coords.s0, mapx_coords.s1, mapy_coords.s1,
129 mapx_coords.s2, mapy_coords.s2, mapx_coords.s3, mapy_coords.s3);
#define CONVERT_TO_IMAGE_STRUCT(name)
const float8 clamp_to_border(float8 coords, const float width, const float height)
Clamps the given coordinates to the borders.
#define IMAGE_DECLARATION(name)
#define CONVERT_TO_IMAGE_STRUCT_NO_STEP(name)
__kernel void remap_nearest_neighbour(__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, __global uchar *mapx_ptr, uint mapx_stride_x, uint mapx_step_x, uint mapx_stride_y, uint mapx_step_y, uint mapx_offset_first_element_in_bytes, __global uchar *mapy_ptr, uint mapy_stride_x, uint mapy_step_x, uint mapy_stride_y, uint mapy_step_y, uint mapy_offset_first_element_in_bytes, const float width, const float height)
Performs a remapping of an input image to an output given two remapping image using nearest neighbor ...
Structure to hold Image information.
__global uchar * ptr
Pointer to the starting postion of the buffer.
const DATA_TYPE4 read_texels4(const Image *in, const int8 coords)
Reads four texels from the input image.
__kernel void remap_bilinear(__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, __global uchar *mapx_ptr, uint mapx_stride_x, uint mapx_step_x, uint mapx_stride_y, uint mapx_step_y, uint mapx_offset_first_element_in_bytes, __global uchar *mapy_ptr, uint mapy_stride_x, uint mapy_step_x, uint mapy_stride_y, uint mapy_step_y, uint mapy_offset_first_element_in_bytes, const float width, const float height)
Performs a remapping of an input image to an output given two remapping image using bilinear as inter...
const DATA_TYPE4 bilinear_interpolate(const Image *in, const float8 coords, const float width, const float height)
Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the ...