Fix for #5590. OpenCL BilateralFilter implementation failes to

build for some OCL drivers.
Some OCL vendors treat implicit scalar-vector conversions for
operators as errors when type conversion is required.
This commit is contained in:
Ariel Bernal 2015-10-30 09:39:11 -07:00
parent 37ce3b8cfe
commit cc903d0605

View File

@ -3108,7 +3108,7 @@ static bool ocl_bilateralFilter_8u(InputArray _src, OutputArray _dst, int d,
}
ocl::Kernel k(kernelName.c_str(), ocl::imgproc::bilateral_oclsrc,
format("-D radius=%d -D maxk=%d -D cn=%d -D int_t=%s -D uint_t=uint%s -D convert_int_t=%s"
" -D uchar_t=%s -D float_t=%s -D convert_float_t=%s -D convert_uchar_t=%s -D gauss_color_coeff=%f",
" -D uchar_t=%s -D float_t=%s -D convert_float_t=%s -D convert_uchar_t=%s -D gauss_color_coeff=(float)%f",
radius, maxk, cn, ocl::typeToStr(CV_32SC(cn)), cnstr.c_str(),
ocl::convertTypeStr(CV_8U, CV_32S, cn, cvt[0]),
ocl::typeToStr(type), ocl::typeToStr(CV_32FC(cn)),