@ -39,6 +39,10 @@
# define TSIZE ( int ) sizeof ( T1 ) * cn
# define TSIZE ( int ) sizeof ( T1 ) * cn
# endif
# endif
# define OP ( a,b ) { mid=a ; a=min(a,b); b=max(mid,b);}
# ifdef USE_4OPT
//Utility macros for for 1 , 2 , 4 channel images:
//Utility macros for for 1 , 2 , 4 channel images:
// - LOAD4/STORE4 - load/store 4-pixel groups from/to global memory
// - LOAD4/STORE4 - load/store 4-pixel groups from/to global memory
@ -89,8 +93,6 @@
# endif
# endif
# define OP ( a,b ) { mid=a ; a=min(a,b); b=max(mid,b);}
__kernel void medianFilter3_u ( __global const uchar* srcptr, int srcStep, int srcOffset,
__kernel void medianFilter3_u ( __global const uchar* srcptr, int srcStep, int srcOffset,
__global uchar* dstptr, int dstStep, int dstOffset,
__global uchar* dstptr, int dstStep, int dstOffset,
int rows, int cols )
int rows, int cols )
@ -274,6 +276,8 @@ __kernel void medianFilter5_u(__global const uchar* srcptr, int srcStep, int src
}
}
}
}
# endif
__kernel void medianFilter3 ( __global const uchar * srcptr, int src_step, int src_offset,
__kernel void medianFilter3 ( __global const uchar * srcptr, int src_step, int src_offset,
__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols )
__global uchar * dstptr, int dst_step, int dst_offset, int dst_rows, int dst_cols )
{
{