Merge pull request #2479 from alalek:ocl_compare_scalar

This commit is contained in:
Andrey Pavlenko
2014-03-17 14:04:22 +04:00
committed by OpenCV Buildbot
7 changed files with 181 additions and 57 deletions

View File

@@ -280,8 +280,13 @@
#elif defined OP_CMP
#define srcT2 srcT1
#ifndef convertToWT1
#define convertToWT1
#define PROCESS_ELEM storedst(convertToDT(srcelem1 CMP_OPERATOR srcelem2 ? (dstT)(255) : (dstT)(0)))
#endif
#define PROCESS_ELEM \
workT __s1 = srcelem1; \
workT __s2 = srcelem2; \
storedst(((__s1 CMP_OPERATOR __s2) ? (dstT)(255) : (dstT)(0)))
#elif defined OP_CONVERT_SCALE_ABS
#undef EXTRA_PARAMS