1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Deprecated convertTypeStr and made new variant that also takes the buffer size

This allows removing the unsafe sprintf.
This commit is contained in:
Sean McBride
2022-12-26 19:00:03 -05:00
parent e3e1f704a4
commit 58e4a880a2
25 changed files with 92 additions and 85 deletions
+2 -2
View File
@@ -59,8 +59,8 @@ static bool ocl_convertScaleAbs( InputArray _src, OutputArray _dst, double alpha
ocl::typeToStr(CV_8UC(kercn)), CV_8U,
ocl::typeToStr(CV_MAKE_TYPE(depth, kercn)),
ocl::typeToStr(CV_MAKE_TYPE(wdepth, kercn)), wdepth,
ocl::convertTypeStr(depth, wdepth, kercn, cvt[0]),
ocl::convertTypeStr(wdepth, CV_8U, kercn, cvt[1]),
ocl::convertTypeStr(depth, wdepth, kercn, cvt[0], sizeof(cvt[0])),
ocl::convertTypeStr(wdepth, CV_8U, kercn, cvt[1], sizeof(cvt[1])),
ocl::typeToStr(wdepth), rowsPerWI,
doubleSupport ? " -D DOUBLE_SUPPORT" : "");
ocl::Kernel k("KF", ocl::core::arithm_oclsrc, build_opt);