|
|
|
@ -166,10 +166,12 @@ OCL_TEST_P(CvtColor, YUV2BGRA) { performTest(3, 4, CVTCODE(YUV2BGR)); } |
|
|
|
|
|
|
|
|
|
// RGB <-> YCrCb
|
|
|
|
|
|
|
|
|
|
OCL_TEST_P(CvtColor, RGB2YCrCb) { performTest(3, 3, CVTCODE(RGB2YCrCb)); } |
|
|
|
|
OCL_TEST_P(CvtColor, BGR2YCrCb) { performTest(3, 3, CVTCODE(BGR2YCrCb)); } |
|
|
|
|
OCL_TEST_P(CvtColor, RGBA2YCrCb) { performTest(4, 3, CVTCODE(RGB2YCrCb)); } |
|
|
|
|
OCL_TEST_P(CvtColor, BGRA2YCrCb) { performTest(4, 3, CVTCODE(BGR2YCrCb)); } |
|
|
|
|
#define EPS_FOR_FLOATING_POINT(e) (CV_32F <= depth ? e : 1) |
|
|
|
|
|
|
|
|
|
OCL_TEST_P(CvtColor, RGB2YCrCb) { performTest(3, 3, CVTCODE(RGB2YCrCb), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor, BGR2YCrCb) { performTest(3, 3, CVTCODE(BGR2YCrCb), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor, RGBA2YCrCb) { performTest(4, 3, CVTCODE(RGB2YCrCb), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor, BGRA2YCrCb) { performTest(4, 3, CVTCODE(BGR2YCrCb), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor, YCrCb2RGB) { performTest(3, 3, CVTCODE(YCrCb2RGB)); } |
|
|
|
|
OCL_TEST_P(CvtColor, YCrCb2BGR) { performTest(3, 3, CVTCODE(YCrCb2BGR)); } |
|
|
|
|
OCL_TEST_P(CvtColor, YCrCb2RGBA) { performTest(3, 4, CVTCODE(YCrCb2RGB)); } |
|
|
|
@ -200,7 +202,7 @@ OCL_TEST_P(CvtColor, XYZ2BGRA) { performTest(3, 4, CVTCODE(XYZ2BGR), IPP_EPS); } |
|
|
|
|
#ifdef HAVE_IPP |
|
|
|
|
#define IPP_EPS depth <= CV_32S ? 1 : 4e-5 |
|
|
|
|
#else |
|
|
|
|
#define IPP_EPS 1e-3 |
|
|
|
|
#define IPP_EPS EPS_FOR_FLOATING_POINT(1e-3) |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
typedef CvtColor CvtColor8u32f; |
|
|
|
@ -366,14 +368,14 @@ struct CvtColor_YUV2RGB_420 : |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGBA_NV12) { performTest(1, 4, CVTCODE(YUV2RGBA_NV12)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGRA_NV12) { performTest(1, 4, CVTCODE(YUV2BGRA_NV12)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGB_NV12) { performTest(1, 3, CVTCODE(YUV2RGB_NV12)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGR_NV12) { performTest(1, 3, CVTCODE(YUV2BGR_NV12)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGBA_NV21) { performTest(1, 4, CVTCODE(YUV2RGBA_NV21)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGRA_NV21) { performTest(1, 4, CVTCODE(YUV2BGRA_NV21)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGB_NV21) { performTest(1, 3, CVTCODE(YUV2RGB_NV21)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGR_NV21) { performTest(1, 3, CVTCODE(YUV2BGR_NV21)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGBA_NV12) { performTest(1, 4, CVTCODE(YUV2RGBA_NV12), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGRA_NV12) { performTest(1, 4, CVTCODE(YUV2BGRA_NV12), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGB_NV12) { performTest(1, 3, CVTCODE(YUV2RGB_NV12), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGR_NV12) { performTest(1, 3, CVTCODE(YUV2BGR_NV12), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGBA_NV21) { performTest(1, 4, CVTCODE(YUV2RGBA_NV21), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGRA_NV21) { performTest(1, 4, CVTCODE(YUV2BGRA_NV21), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGB_NV21) { performTest(1, 3, CVTCODE(YUV2RGB_NV21), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGR_NV21) { performTest(1, 3, CVTCODE(YUV2BGR_NV21), EPS_FOR_FLOATING_POINT(1e-3)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGBA_YV12) { performTest(1, 4, CVTCODE(YUV2RGBA_YV12)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2BGRA_YV12) { performTest(1, 4, CVTCODE(YUV2BGRA_YV12)); } |
|
|
|
|
OCL_TEST_P(CvtColor_YUV2RGB_420, YUV2RGB_YV12) { performTest(1, 3, CVTCODE(YUV2RGB_YV12)); } |
|
|
|
|