#elif defined OP_PHASE_RADIANS
#define PROCESS_ELEM \
workT tmp = atan2(srcelem2, srcelem1); \
- if(tmp < 0) tmp += 6.283185307179586232; \
+ if(tmp < 0) tmp += 6.283185307179586232f; \
dstelem = tmp
#elif defined OP_PHASE_DEGREES
#define PROCESS_ELEM \
- workT tmp = atan2(srcelem2, srcelem1)*57.29577951308232286465; \
+ workT tmp = atan2(srcelem2, srcelem1)*57.29577951308232286465f; \
if(tmp < 0) tmp += 360; \
dstelem = tmp
#define dstT uchar
#define srcT2 srcT1
#define convertToWT1
-#define convertToWT2
#define PROCESS_ELEM dstelem = convert_uchar(srcelem1 CMP_OPERATOR srcelem2 ? 255 : 0)
#elif defined OP_CONVERT_SCALE_ABS
if (x < cols && y < rows)
{
int src1_index = mad24(y, srcstep1, x*(int)sizeof(srcT1) + srcoffset1);
+#if !(defined(OP_RECIP_SCALE) || defined(OP_NOT))
int src2_index = mad24(y, srcstep2, x*(int)sizeof(srcT2) + srcoffset2);
+#endif
int dst_index = mad24(y, dststep, x*(int)sizeof(dstT) + dstoffset);
EXTRA_INDEX;
}
else
k.create(kernelName.c_str(), ocl::imgproc::cvtcolor_oclsrc,
- format("-D depth=%d -D hscale=%f -D bidx=%d -D scn=%d -D dcn=3", depth, hrange*(1.f/360.f), bidx, scn));
+ format("-D depth=%d -D hscale=%ff -D bidx=%d -D scn=%d -D dcn=3", depth, hrange*(1.f/360.f), bidx, scn));
break;
}
case COLOR_HSV2BGR: case COLOR_HSV2RGB: case COLOR_HSV2BGR_FULL: case COLOR_HSV2RGB_FULL:
String kernelName = String(is_hsv ? "HSV" : "HLS") + "2RGB";
k.create(kernelName.c_str(), ocl::imgproc::cvtcolor_oclsrc,
- format("-D depth=%d -D dcn=%d -D scn=3 -D bidx=%d -D hrange=%d -D hscale=%f",
+ format("-D depth=%d -D dcn=%d -D scn=3 -D bidx=%d -D hrange=%d -D hscale=%ff",
depth, dcn, bidx, hrange, 6.f/hrange));
break;
}
{
int wdepth2 = std::max(CV_32F, depth), wtype2 = CV_MAKE_TYPE(wdepth2, cn);
buildOption = buildOption + format(" -D convertToT=%s -D WT2V=%s -D convertToWT2V=%s -D INTER_AREA_FAST"
- " -D XSCALE=%d -D YSCALE=%d -D SCALE=%f",
+ " -D XSCALE=%d -D YSCALE=%d -D SCALE=%ff",
ocl::convertTypeStr(wdepth2, depth, cn, cvt[0]),
ocl::typeToStr(wtype2), ocl::convertTypeStr(wdepth, wdepth2, cn, cvt[1]),
iscale_x, iscale_y, 1.0f / (iscale_x * iscale_y));
dst[0] = src[2];
dst[1] = src[1];
dst[2] = src[0];
-#elif defined ORDER
+#else
dst[0] = src[0];
dst[1] = src[1];
dst[2] = src[2];
diff = v - vmin;
s = diff/(float)(fabs(v) + FLT_EPSILON);
- diff = (float)(60./(diff + FLT_EPSILON));
+ diff = (float)(60.f/(diff + FLT_EPSILON));
if( v == r )
h = (g - b)*diff;
else if( v == g )
const int dst_step_in_pixel,
const int dst_cols,
const int dst_rows,
- __constant float * mat_kernel __attribute__((max_constant_size(4*(2*RADIUSY+1)))))
+ __constant float * mat_kernel)
{
int x = get_global_id(0);
int y = get_global_id(1);
int dst_step_in_pixel,
int dst_cols, int dst_rows,
int radiusy,
- __constant float * mat_kernel __attribute__((max_constant_size(4*(2*RADIUSX+1)))))
+ __constant float * mat_kernel)
{
int x = get_global_id(0)<<2;
int y = get_global_id(1);
int dst_step_in_pixel,
int dst_cols, int dst_rows,
int radiusy,
- __constant float * mat_kernel __attribute__((max_constant_size(4*(2*RADIUSX+1)))))
+ __constant float * mat_kernel)
{
int x = get_global_id(0);
int y = get_global_id(1);
int dst_step_in_pixel,
int dst_cols, int dst_rows,
int radiusy,
- __constant float * mat_kernel __attribute__((max_constant_size(4*(2*RADIUSX+1)))))
+ __constant float * mat_kernel)
{
int x = get_global_id(0);
int y = get_global_id(1);
int dst_step_in_pixel,
int dst_cols, int dst_rows,
int radiusy,
- __constant float * mat_kernel __attribute__((max_constant_size(4*(2*RADIUSX+1)))))
+ __constant float * mat_kernel)
{
int x = get_global_id(0);
int y = get_global_id(1);
int y_ = INC(y,srcrows);
int x_ = INC(x,srccols);
- __global const PIXTYPE* src = (__global const PIXTYPE*)(srcptr + mad24(y, srcstep, srcoffset + x*PIXSIZE));
#if depth <= 4