typedef struct uchar4
{
uchar x,y,z,w;
}uchar4;
inline uchar4 make_uchar4(uchar x, uchar y, uchar z, uchar w)
{
uchar4 val;
val.x = x;
val.y = y;
val.z = z;
val.w = w;
return val;
}
for( int j=0;j!=height;++j ){
for( int i=0;i!=width*channels/4;++i ){
uchar4 * __rowptrsrc = (( uchar4* ) rowptr_src);
uchar4 * __rowptrdst = (( uchar4* ) rowptr_dst);
uchar4 _val4 = __rowptrsrc[i];
__rowptrdst[i] = oop::make_uchar4(gray[_val4.x], gray[_val4.y], gray[_val4.z], gray[_val4.w] );
//rowptr_dst[i] = gray[rowptr_src[i]];
}
rowptr_src += src_stride;
rowptr_dst += dst_stride;
}