opencl/cvtclr_dx: fix not compile-time constants issue.

fix the "initializing global variables with values that are not
compile-time constants" issue in Intel SDK for OpenCL. The root cause
is when initializing global variables with value, the variable need is
compile-time constants.

Thanks Zheng, Yang <yang.zheng@intel.com>,
Chodor, Jaroslaw <jaroslaw.chodor@intel.com> give a help.

Signed-off-by: Liu,Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
This commit is contained in:
Jun Zhao 2017-12-26 10:25:36 +08:00
parent 047764f476
commit 0369431ebd

View File

@ -71,12 +71,12 @@ float c_YUV2RGBCoeffs_420[5] =
1.5959997177f
};
static __constant float CV_8U_MAX = 255.0f;
static __constant float CV_8U_HALF = 128.0f;
static __constant float BT601_BLACK_RANGE = 16.0f;
static __constant float CV_8U_SCALE = 1.0f / 255.0f;
static __constant float d1 = BT601_BLACK_RANGE / CV_8U_MAX;
static __constant float d2 = CV_8U_HALF / CV_8U_MAX;
static const __constant float CV_8U_MAX = 255.0f;
static const __constant float CV_8U_HALF = 128.0f;
static const __constant float BT601_BLACK_RANGE = 16.0f;
static const __constant float CV_8U_SCALE = 1.0f / 255.0f;
static const __constant float d1 = BT601_BLACK_RANGE / CV_8U_MAX;
static const __constant float d2 = CV_8U_HALF / CV_8U_MAX;
#define NCHANNELS 3