19.11.1
|
Go to the source code of this file.
Functions | |
const float8 | transform_nearest (const float2 coord, const float2 scale) |
Transforms four 2D coordinates. More... | |
const float8 | transform_bilinear (const float2 coord, const float2 scale) |
Transforms four 2D coordinates. More... | |
__kernel void | scale_nearest_neighbour_nchw (__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, const float input_width, const float input_height, const float scale_x, const float scale_y) |
Performs an affine transformation on an image interpolating with the NEAREAST NEIGHBOUR method. More... | |
__kernel void | scale_bilinear_nchw (__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, const float input_width, const float input_height, const float scale_x, const float scale_y) |
Performs an affine transformation on an image interpolating with the BILINEAR method. More... | |
__kernel void scale_bilinear_nchw | ( | __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, | ||
const float | input_width, | ||
const float | input_height, | ||
const float | scale_x, | ||
const float | scale_y | ||
) |
Performs an affine transformation on an image interpolating with the BILINEAR method.
[in] | in_ptr | Pointer to the source image. Supported data types: U8, S16. |
[in] | in_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | in_step_x | src_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | in_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | in_step_y | src_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | in_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | out_ptr | Pointer to the destination image. Supported data types: U8, S16. (Must be the same as the input) |
[in] | out_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | out_step_x | dst_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | out_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | out_step_y | dst_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | out_offset_first_element_in_bytes | The offset of the first element in the destination image |
[in] | input_width | Input image width |
[in] | input_height | Input image height |
[in] | scale_x | The scale factor along x dimension |
[in] | scale_y | The scale factor along y dimension |
Definition at line 131 of file scale.cl.
References bilinear_interpolate_with_border(), CONVERT_TO_IMAGE_STRUCT, CONVERT_TO_IMAGE_STRUCT_NO_STEP, DATA_TYPE, get_current_coords(), Image::ptr, and transform_bilinear().
__kernel void scale_nearest_neighbour_nchw | ( | __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, | ||
const float | input_width, | ||
const float | input_height, | ||
const float | scale_x, | ||
const float | scale_y | ||
) |
Performs an affine transformation on an image interpolating with the NEAREAST NEIGHBOUR method.
Input and output are single channel U8 or S16.
[in] | in_ptr | Pointer to the source image. Supported data types: U8, S16. |
[in] | in_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | in_step_x | src_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | in_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | in_step_y | src_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | in_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | out_ptr | Pointer to the destination image. Supported data types: U8, S16. (Must be the same as the input) |
[in] | out_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | out_step_x | dst_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | out_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | out_step_y | dst_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | out_offset_first_element_in_bytes | The offset of the first element in the destination image |
[in] | input_width | Input image width |
[in] | input_height | Input image height |
[in] | scale_x | The scale factor along x dimension |
[in] | scale_y | The scale factor along y dimension |
Definition at line 95 of file scale.cl.
References clamp_to_border_with_size(), CONVERT_TO_IMAGE_STRUCT, CONVERT_TO_IMAGE_STRUCT_NO_STEP, DATA_TYPE, get_current_coords(), Image::ptr, read_texels4(), and transform_nearest().
|
inline |
Transforms four 2D coordinates.
This is used to map the output coordinates to the input coordinates.
[in] | coord | 2D coordinates to transform. |
[in] | scale | input/output scale ratio |
Definition at line 58 of file scale.cl.
References arm_compute::test::validation::scale.
Referenced by scale_bilinear_nchw().
|
inline |
Transforms four 2D coordinates.
This is used to map the output coordinates to the input coordinates.
[in] | coord | 2D coordinates to transform. |
[in] | scale | input/output scale ratio |
Definition at line 34 of file scale.cl.
References arm_compute::test::validation::scale.
Referenced by scale_nearest_neighbour_nchw().