ARM Compute Library
17.04
|
#include "helpers.h"
Go to the source code of this file.
Macros | |
#define | DATA_TYPE short |
#define | COMPUTE_TYPE int |
#define | DATA_TYPE_OUT uchar |
Functions | |
short8 | convolution1x9 (__global const uchar *left_pixel, const short left1_coeff, const short left2_coeff, const short left3_coeff, const short left4_coeff, const short middle_coeff, const short right1_coeff, const short right2_coeff, const short right3_coeff, const short right4_coeff) |
Compute a 1D horizontal convolution of size 9 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). More... | |
int8 | convolution9x1 (Image *src, const short up1_coeff, const short up2_coeff, const short up3_coeff, const short up4_coeff, const short middle_coeff, const short down1_coeff, const short down2_coeff, const short down3_coeff, const short down4_coeff) |
Compute a 1D vertical convolution of size 9 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). More... | |
short8 | convolution9x9 (Image *src, const short mat0, const short mat1, const short mat2, const short mat3, const short mat4, const short mat5, const short mat6, const short mat7, const short mat8, const short mat9, const short mat10, const short mat11, const short mat12, const short mat13, const short mat14, const short mat15, const short mat16, const short mat17, const short mat18, const short mat19, const short mat20, const short mat21, const short mat22, const short mat23, const short mat24, const short mat25, const short mat26, const short mat27, const short mat28, const short mat29, const short mat30, const short mat31, const short mat32, const short mat33, const short mat34, const short mat35, const short mat36, const short mat37, const short mat38, const short mat39, const short mat40, const short mat41, const short mat42, const short mat43, const short mat44, const short mat45, const short mat46, const short mat47, const short mat48, const short mat49, const short mat50, const short mat51, const short mat52, const short mat53, const short mat54, const short mat55, const short mat56, const short mat57, const short mat58, const short mat59, const short mat60, const short mat61, const short mat62, const short mat63, const short mat64, const short mat65, const short mat66, const short mat67, const short mat68, const short mat69, const short mat70, const short mat71, const short mat72, const short mat73, const short mat74, const short mat75, const short mat76, const short mat77, const short mat78, const short mat79, const short mat80, uint scale) |
Apply a 9x9 convolution matrix to a single channel U8 input image and return the result. More... | |
__kernel void | convolution_separable1x9_static (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes) |
Apply a 1x9 static convolution matrix to a single channel U8 input image and output a single temporary channel image. More... | |
__kernel void | convolution_separable9x1_static (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes) |
Apply a 9x1 static convolution matrix to a single channel U8 input image and output a single channel image. More... | |
__kernel void | convolution9x9_static (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes) |
Apply a static 9x9 convolution matrix to a single channel U8 input image and output a single channel image including borders. More... | |
#define COMPUTE_TYPE int |
Definition at line 31 of file convolution9x9.cl.
Referenced by convolution1x9(), convolution9x1(), and convolution_separable9x1_static().
#define DATA_TYPE short |
Definition at line 27 of file convolution9x9.cl.
Referenced by convolution1x9(), convolution9x1(), convolution9x9(), and convolution_separable1x9_static().
#define DATA_TYPE_OUT uchar |
Definition at line 35 of file convolution9x9.cl.
Referenced by convolution9x9_static(), and convolution_separable9x1_static().
short8 convolution1x9 | ( | __global const uchar * | left_pixel, |
const short | left1_coeff, | ||
const short | left2_coeff, | ||
const short | left3_coeff, | ||
const short | left4_coeff, | ||
const short | middle_coeff, | ||
const short | right1_coeff, | ||
const short | right2_coeff, | ||
const short | right3_coeff, | ||
const short | right4_coeff | ||
) |
Compute a 1D horizontal convolution of size 9 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels).
[in] | left_pixel | Pointer to the left pixel |
[in] | left1_coeff | Weight of the most left pixel |
[in] | left2_coeff | Weight of the second left pixel |
[in] | left3_coeff | Weight of the third left pixel |
[in] | left4_coeff | Weight of the left pixel |
[in] | middle_coeff | Weight of the middle pixel |
[in] | right1_coeff | Weight of the right pixel |
[in] | right2_coeff | Weight of the second right pixel |
[in] | right3_coeff | Weight of the third right pixel |
[in] | right4_coeff | Weight of the most right pixel |
Definition at line 54 of file convolution9x9.cl.
References COMPUTE_TYPE, CONVERT, DATA_TYPE, and VEC_DATA_TYPE.
Referenced by convolution9x9(), convolution_rectangle(), and convolution_separable1x9_static().
int8 convolution9x1 | ( | Image * | src, |
const short | up1_coeff, | ||
const short | up2_coeff, | ||
const short | up3_coeff, | ||
const short | up4_coeff, | ||
const short | middle_coeff, | ||
const short | down1_coeff, | ||
const short | down2_coeff, | ||
const short | down3_coeff, | ||
const short | down4_coeff | ||
) |
Compute a 1D vertical convolution of size 9 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels).
[in] | src | Pointer to source image. |
[in] | up1_coeff | Weight of the most up pixel |
[in] | up2_coeff | Weight of the second up pixel |
[in] | up3_coeff | Weight of the third up pixel |
[in] | up4_coeff | Weight of the up pixel |
[in] | middle_coeff | Weight of the middle pixel |
[in] | down1_coeff | Weight of the down pixel |
[in] | down2_coeff | Weight of the second down pixel |
[in] | down3_coeff | Weight of the third down pixel |
[in] | down4_coeff | Weight of the most down pixel |
Definition at line 108 of file convolution9x9.cl.
References COMPUTE_TYPE, CONVERT, DATA_TYPE, offset(), and VEC_DATA_TYPE.
Referenced by convolution_separable9x1_static().
short8 convolution9x9 | ( | Image * | src, |
const short | mat0, | ||
const short | mat1, | ||
const short | mat2, | ||
const short | mat3, | ||
const short | mat4, | ||
const short | mat5, | ||
const short | mat6, | ||
const short | mat7, | ||
const short | mat8, | ||
const short | mat9, | ||
const short | mat10, | ||
const short | mat11, | ||
const short | mat12, | ||
const short | mat13, | ||
const short | mat14, | ||
const short | mat15, | ||
const short | mat16, | ||
const short | mat17, | ||
const short | mat18, | ||
const short | mat19, | ||
const short | mat20, | ||
const short | mat21, | ||
const short | mat22, | ||
const short | mat23, | ||
const short | mat24, | ||
const short | mat25, | ||
const short | mat26, | ||
const short | mat27, | ||
const short | mat28, | ||
const short | mat29, | ||
const short | mat30, | ||
const short | mat31, | ||
const short | mat32, | ||
const short | mat33, | ||
const short | mat34, | ||
const short | mat35, | ||
const short | mat36, | ||
const short | mat37, | ||
const short | mat38, | ||
const short | mat39, | ||
const short | mat40, | ||
const short | mat41, | ||
const short | mat42, | ||
const short | mat43, | ||
const short | mat44, | ||
const short | mat45, | ||
const short | mat46, | ||
const short | mat47, | ||
const short | mat48, | ||
const short | mat49, | ||
const short | mat50, | ||
const short | mat51, | ||
const short | mat52, | ||
const short | mat53, | ||
const short | mat54, | ||
const short | mat55, | ||
const short | mat56, | ||
const short | mat57, | ||
const short | mat58, | ||
const short | mat59, | ||
const short | mat60, | ||
const short | mat61, | ||
const short | mat62, | ||
const short | mat63, | ||
const short | mat64, | ||
const short | mat65, | ||
const short | mat66, | ||
const short | mat67, | ||
const short | mat68, | ||
const short | mat69, | ||
const short | mat70, | ||
const short | mat71, | ||
const short | mat72, | ||
const short | mat73, | ||
const short | mat74, | ||
const short | mat75, | ||
const short | mat76, | ||
const short | mat77, | ||
const short | mat78, | ||
const short | mat79, | ||
const short | mat80, | ||
uint | scale | ||
) |
Apply a 9x9 convolution matrix to a single channel U8 input image and return the result.
Convolution matrix layout:
[ mat0, mat1, mat2, mat3 , mat4, mat5, mat6, mat7, mat8 ]
[ mat9, mat10, mat11, mat12, mat13, mat14, mat15, mat16, mat17 ]
[ mat18, mat19, mat20, mat21, mat22, mat23, mat24, mat25, mat26 ]
[ mat27, mat28, mat29, mat30, mat31, mat32, mat33, mat34, mat35 ]
[ mat36, mat37, mat38, mat39, mat40, mat41, mat42, mat43, mat44 ]
[ mat45, mat46, mat47, mat48, mat49, mat50, mat51, mat52, mat53 ]
[ mat54, mat55, mat56, mat57, mat58, mat59, mat60, mat61, mat62 ] [ mat63, mat64, mat65, mat66, mat67, mat68, mat69, mat70, mat71 ] [ mat72, mat73, mat74, mat75, mat76, mat77, mat78, mat79, mat80 ]
[in] | src | A pointer to source Image structure. |
[in] | mat0 | Coefficient from the convolution matrix |
[in] | mat1 | Coefficient from the convolution matrix |
[in] | mat2 | Coefficient from the convolution matrix |
[in] | mat3 | Coefficient from the convolution matrix |
[in] | mat4 | Coefficient from the convolution matrix |
[in] | mat5 | Coefficient from the convolution matrix |
[in] | mat6 | Coefficient from the convolution matrix |
[in] | mat0 | Coefficient from the convolution matrix |
[in] | mat7 | Coefficient from the convolution matrix |
[in] | mat8 | Coefficient from the convolution matrix |
[in] | mat9 | Coefficient from the convolution matrix |
[in] | mat10 | Coefficient from the convolution matrix |
[in] | mat11 | Coefficient from the convolution matrix |
[in] | mat12 | Coefficient from the convolution matrix |
[in] | mat13 | Coefficient from the convolution matrix |
[in] | mat14 | Coefficient from the convolution matrix |
[in] | mat15 | Coefficient from the convolution matrix |
[in] | mat16 | Coefficient from the convolution matrix |
[in] | mat10 | Coefficient from the convolution matrix |
[in] | mat17 | Coefficient from the convolution matrix |
[in] | mat18 | Coefficient from the convolution matrix |
[in] | mat19 | Coefficient from the convolution matrix |
[in] | mat20 | Coefficient from the convolution matrix |
[in] | mat21 | Coefficient from the convolution matrix |
[in] | mat22 | Coefficient from the convolution matrix |
[in] | mat23 | Coefficient from the convolution matrix |
[in] | mat24 | Coefficient from the convolution matrix |
[in] | mat25 | Coefficient from the convolution matrix |
[in] | mat26 | Coefficient from the convolution matrix |
[in] | mat27 | Coefficient from the convolution matrix |
[in] | mat28 | Coefficient from the convolution matrix |
[in] | mat29 | Coefficient from the convolution matrix |
[in] | mat30 | Coefficient from the convolution matrix |
[in] | mat31 | Coefficient from the convolution matrix |
[in] | mat32 | Coefficient from the convolution matrix |
[in] | mat33 | Coefficient from the convolution matrix |
[in] | mat34 | Coefficient from the convolution matrix |
[in] | mat35 | Coefficient from the convolution matrix |
[in] | mat36 | Coefficient from the convolution matrix |
[in] | mat37 | Coefficient from the convolution matrix |
[in] | mat38 | Coefficient from the convolution matrix |
[in] | mat39 | Coefficient from the convolution matrix |
[in] | mat40 | Coefficient from the convolution matrix |
[in] | mat41 | Coefficient from the convolution matrix |
[in] | mat42 | Coefficient from the convolution matrix |
[in] | mat43 | Coefficient from the convolution matrix |
[in] | mat44 | Coefficient from the convolution matrix |
[in] | mat45 | Coefficient from the convolution matrix |
[in] | mat46 | Coefficient from the convolution matrix |
[in] | mat47 | Coefficient from the convolution matrix |
[in] | mat48 | Coefficient from the convolution matrix |
[in] | mat49 | Coefficient from the convolution matrix |
[in] | mat50 | Coefficient from the convolution matrix |
[in] | mat51 | Coefficient from the convolution matrix |
[in] | mat52 | Coefficient from the convolution matrix |
[in] | mat53 | Coefficient from the convolution matrix |
[in] | mat54 | Coefficient from the convolution matrix |
[in] | mat55 | Coefficient from the convolution matrix |
[in] | mat56 | Coefficient from the convolution matrix |
[in] | mat57 | Coefficient from the convolution matrix |
[in] | mat58 | Coefficient from the convolution matrix |
[in] | mat59 | Coefficient from the convolution matrix |
[in] | mat60 | Coefficient from the convolution matrix |
[in] | mat61 | Coefficient from the convolution matrix |
[in] | mat62 | Coefficient from the convolution matrix |
[in] | mat63 | Coefficient from the convolution matrix |
[in] | mat64 | Coefficient from the convolution matrix |
[in] | mat65 | Coefficient from the convolution matrix |
[in] | mat66 | Coefficient from the convolution matrix |
[in] | mat67 | Coefficient from the convolution matrix |
[in] | mat68 | Coefficient from the convolution matrix |
[in] | mat69 | Coefficient from the convolution matrix |
[in] | mat70 | Coefficient from the convolution matrix |
[in] | mat71 | Coefficient from the convolution matrix |
[in] | mat72 | Coefficient from the convolution matrix |
[in] | mat73 | Coefficient from the convolution matrix |
[in] | mat74 | Coefficient from the convolution matrix |
[in] | mat75 | Coefficient from the convolution matrix |
[in] | mat76 | Coefficient from the convolution matrix |
[in] | mat76 | Coefficient from the convolution matrix |
[in] | mat77 | Coefficient from the convolution matrix |
[in] | mat78 | Coefficient from the convolution matrix |
[in] | mat79 | Coefficient from the convolution matrix |
[in] | mat80 | Coefficient from the convolution matrix |
[in] | scale | Convolution matrix scale (Sum of the coefficients, or 1 if the sum is 0) |
Definition at line 256 of file convolution9x9.cl.
References convolution1x9(), DATA_TYPE, offset(), and VEC_DATA_TYPE.
Referenced by convolution9x9_static().
__kernel void convolution9x9_static | ( | __global uchar * | src_ptr, |
uint | src_stride_x, | ||
uint | src_step_x, | ||
uint | src_stride_y, | ||
uint | src_step_y, | ||
uint | src_offset_first_element_in_bytes, | ||
__global uchar * | dst_ptr, | ||
uint | dst_stride_x, | ||
uint | dst_step_x, | ||
uint | dst_stride_y, | ||
uint | dst_step_y, | ||
uint | dst_offset_first_element_in_bytes | ||
) |
Apply a static 9x9 convolution matrix to a single channel U8 input image and output a single channel image including borders.
[in] | src_ptr | Pointer to the source image. Supported data types: U8 |
[in] | src_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | src_step_x | src_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | src_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | src_step_y | src_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | src_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | dst_ptr | Pointer to the destination image. Supported data types: U8, S16 |
[in] | dst_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | dst_step_x | dst_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | dst_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | dst_step_y | dst_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | dst_offset_first_element_in_bytes | The offset of the first element in the destination image |
Definition at line 386 of file convolution9x9.cl.
References CONVERT_SAT, CONVERT_TO_IMAGE_STRUCT, convolution9x9(), DATA_TYPE_OUT, Image::ptr, and VEC_DATA_TYPE.
__kernel void convolution_separable1x9_static | ( | __global uchar * | src_ptr, |
uint | src_stride_x, | ||
uint | src_step_x, | ||
uint | src_stride_y, | ||
uint | src_step_y, | ||
uint | src_offset_first_element_in_bytes, | ||
__global uchar * | dst_ptr, | ||
uint | dst_stride_x, | ||
uint | dst_step_x, | ||
uint | dst_stride_y, | ||
uint | dst_step_y, | ||
uint | dst_offset_first_element_in_bytes | ||
) |
Apply a 1x9 static convolution matrix to a single channel U8 input image and output a single temporary channel image.
[in] | src_ptr | Pointer to the source image. Supported data types: U8 |
[in] | src_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | src_step_x | src_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | src_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | src_step_y | src_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | src_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | dst_ptr | Pointer to the destination image. Supported data types: U16, S16, S32 |
[in] | dst_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | dst_step_x | dst_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | dst_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | dst_step_y | dst_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | dst_offset_first_element_in_bytes | The offset of the first element in the destination image |
Definition at line 317 of file convolution9x9.cl.
References CONVERT_TO_IMAGE_STRUCT, convolution1x9(), DATA_TYPE, offset(), Image::ptr, and VEC_DATA_TYPE.
__kernel void convolution_separable9x1_static | ( | __global uchar * | src_ptr, |
uint | src_stride_x, | ||
uint | src_step_x, | ||
uint | src_stride_y, | ||
uint | src_step_y, | ||
uint | src_offset_first_element_in_bytes, | ||
__global uchar * | dst_ptr, | ||
uint | dst_stride_x, | ||
uint | dst_step_x, | ||
uint | dst_stride_y, | ||
uint | dst_step_y, | ||
uint | dst_offset_first_element_in_bytes | ||
) |
Apply a 9x1 static convolution matrix to a single channel U8 input image and output a single channel image.
[in] | src_ptr | Pointer to the source image. Supported data types: U16, S16, S32 |
[in] | src_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | src_step_x | src_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | src_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | src_step_y | src_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | src_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | dst_ptr | Pointer to the destination image. Supported data types: U8, S16 |
[in] | dst_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | dst_step_x | dst_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | dst_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | dst_step_y | dst_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | dst_offset_first_element_in_bytes | The offset of the first element in the destination image |
Definition at line 350 of file convolution9x9.cl.
References COMPUTE_TYPE, CONVERT_SAT, CONVERT_TO_IMAGE_STRUCT, convolution9x1(), DATA_TYPE_OUT, Image::ptr, and VEC_DATA_TYPE.