parallel cvtColor for MSVS and Apple
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Fri, 5 Oct 2012 09:11:24 +0000 (13:11 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Fri, 5 Oct 2012 09:11:24 +0000 (13:11 +0400)
modules/imgproc/src/color.cpp

index 6c06a89..bc01127 100644 (file)
@@ -192,8 +192,11 @@ void CvtColorLoop(const Mat& src, Mat& dst, const Cvt& cvt)
 {
     Range range(0, src.rows);
     CvtColorLoop_Invoker<Cvt> invoker(src, dst, cvt);
+#if defined(_MSC_VER) || defined(__APPLE__)
+    parallel_for_(range, invoker);
+#else
     invoker(range);
-//     parallel_for_(range, invoker);
+#endif
 }
 
 ////////////////// Various 3/4-channel to 3/4-channel RGB transformations /////////////////