27 #define DATA_TYPE short 31 #define COMPUTE_TYPE int 35 #define DATA_TYPE_OUT uchar 55 __global const uchar *left_pixel,
56 const
short left1_coeff,
57 const
short left2_coeff,
58 const
short left3_coeff,
59 const
short left4_coeff,
60 const
short middle_coeff,
61 const
short right1_coeff,
62 const
short right2_coeff,
63 const
short right3_coeff,
64 const
short right4_coeff)
66 uchar16 temp = vload16(0, left_pixel);
110 const
short up1_coeff,
111 const
short up2_coeff,
112 const
short up3_coeff,
113 const
short up4_coeff,
114 const
short middle_coeff,
115 const
short down1_coeff,
116 const
short down2_coeff,
117 const
short down3_coeff,
118 const
short down4_coeff)
258 const short mat0,
const short mat1,
const short mat2,
const short mat3,
const short mat4,
259 const short mat5,
const short mat6,
const short mat7,
const short mat8,
const short mat9,
260 const short mat10,
const short mat11,
const short mat12,
const short mat13,
const short mat14,
261 const short mat15,
const short mat16,
const short mat17,
const short mat18,
const short mat19,
262 const short mat20,
const short mat21,
const short mat22,
const short mat23,
const short mat24,
263 const short mat25,
const short mat26,
const short mat27,
const short mat28,
const short mat29,
264 const short mat30,
const short mat31,
const short mat32,
const short mat33,
const short mat34,
265 const short mat35,
const short mat36,
const short mat37,
const short mat38,
const short mat39,
266 const short mat40,
const short mat41,
const short mat42,
const short mat43,
const short mat44,
267 const short mat45,
const short mat46,
const short mat47,
const short mat48,
const short mat49,
268 const short mat50,
const short mat51,
const short mat52,
const short mat53,
const short mat54,
269 const short mat55,
const short mat56,
const short mat57,
const short mat58,
const short mat59,
270 const short mat60,
const short mat61,
const short mat62,
const short mat63,
const short mat64,
271 const short mat65,
const short mat66,
const short mat67,
const short mat68,
const short mat69,
272 const short mat70,
const short mat71,
const short mat72,
const short mat73,
const short mat74,
273 const short mat75,
const short mat76,
const short mat77,
const short mat78,
const short mat79,
274 const short mat80, uint scale)
279 pixels =
convolution1x9(
offset(src, -4, -4), mat0, mat1, mat2, mat3, mat4, mat5, mat6, mat7, mat8);
280 pixels +=
convolution1x9(
offset(src, -4, -3), mat9, mat10, mat11, mat12, mat13, mat14, mat15, mat16, mat17);
281 pixels +=
convolution1x9(
offset(src, -4, -2), mat18, mat19, mat20, mat21, mat22, mat23, mat24, mat25, mat26);
282 pixels +=
convolution1x9(
offset(src, -4, -1), mat27, mat28, mat29, mat30, mat31, mat32, mat33, mat34, mat35);
283 pixels +=
convolution1x9(
offset(src, -4, 0), mat36, mat37, mat38, mat39, mat40, mat41, mat42, mat43, mat44);
284 pixels +=
convolution1x9(
offset(src, -4, 1), mat45, mat46, mat47, mat48, mat49, mat50, mat51, mat52, mat53);
285 pixels +=
convolution1x9(
offset(src, -4, 2), mat54, mat55, mat56, mat57, mat58, mat59, mat60, mat61, mat62);
286 pixels +=
convolution1x9(
offset(src, -4, 3), mat63, mat64, mat65, mat66, mat67, mat68, mat69, mat70, mat71);
287 pixels +=
convolution1x9(
offset(src, -4, 4), mat72, mat73, mat74, mat75, mat76, mat77, mat78, mat79, mat80);
294 return convert_short8_sat(pixels);
297 #ifndef DYNAMIC_MATRIX_CONVOLUTION 326 pixels =
convolution1x9(
offset(&src, -4, 0), MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6, MAT7, MAT8);
359 pixels =
convolution9x1(&src, MAT9, MAT10, MAT11, MAT12, MAT13, MAT14, MAT15, MAT16, MAT17);
394 MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6, MAT7, MAT8, MAT9, MAT10, MAT11, MAT12, MAT13,
395 MAT14, MAT15, MAT16, MAT17, MAT18, MAT19, MAT20, MAT21, MAT22, MAT23, MAT24, MAT25,
396 MAT26, MAT27, MAT28, MAT29, MAT30, MAT31, MAT32, MAT33, MAT34, MAT35, MAT36, MAT37,
397 MAT38, MAT39, MAT40, MAT41, MAT42, MAT43, MAT44, MAT45, MAT46, MAT47, MAT48, MAT49,
398 MAT50, MAT51, MAT52, MAT53, MAT54, MAT55, MAT56, MAT57, MAT58, MAT59, MAT60, MAT61,
399 MAT62, MAT63, MAT64, MAT65, MAT66, MAT67, MAT68, MAT69, MAT70, MAT71, MAT72, MAT73,
400 MAT74, MAT75, MAT76, MAT77, MAT78, MAT79, MAT80, SCALE);
406 #endif // DYNAMIC_MATRIX_CONVOLUTION
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 ...
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 ...
#define IMAGE_DECLARATION(name)
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.
__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 ...
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
#define CONVERT_TO_IMAGE_STRUCT(name)
#define VEC_DATA_TYPE(type, size)
Structure to hold Image information.
#define CONVERT_SAT(x, type)
__global uchar * ptr
Pointer to the starting postion of the buffer.
__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 ...
__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 temporar...