24.02.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) |
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) |
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 | ||
) |
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 |
Definition at line 158 of file scale.cl.
References arm_compute::test::validation::b, arm_compute::utility::clamp(), CONVERT, CONVERT_SAT, LOOP_UNROLLING, arm_compute::test::validation::reference::select(), SELECT_DATA_TYPE, SELECT_VEC_DATA_TYPE, TILE, transform_bilinear(), VEC_DATA_TYPE, VEC_SIZE, VSTORE, and VSTORE_PARTIAL.
__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 | ||
) |
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 |
Definition at line 91 of file scale.cl.
References arm_compute::utility::clamp(), CONVERT, LOOP_UNROLLING, arm_compute::round(), arm_compute::test::validation::reference::select(), SELECT_DATA_TYPE, SELECT_VEC_DATA_TYPE, TILE, transform_nearest(), VEC_SIZE, VSTORE, and VSTORE_PARTIAL.
|
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().