**File:** modules/ts/include/opencv2/ts/ocl_test.hpp
**Change Type:** modified
**Context:** PR #11315: ARM: add new comparison to tolerate with rounding error - * clean up the source code * remove unused variable (eps) * remove unused member ...

**Code Changes:**
```diff
@@ -122,6 +122,25 @@ do \
     << "Size: " << mat1.size() << std::endl; \
 } while ((void)0, 0)
 
+#define OCL_EXPECT_MAT_N_DIFF(name, eps) \
+do \
+{ \
+    ASSERT_EQ(name ## _roi.type(), u ## name ## _roi.type()); \
+    ASSERT_EQ(name ## _roi.size(), u ## name ## _roi.size()); \
+    Mat diff, binary, binary_8; \
```

Review comment:
The error happens not only the edge, it happens all over the image. I already explained in [this comment](https://github.com/opencv/opencv/pull/11169#issuecomment-376818533) that it's about the pixel **coordinate** rather than the pixel **value** itself which become malfunction. So, answering your question, this evaluation is **NOT** about the border. It happens everywhere. Answering your second question, the test is based on a random generated image. The pixel next to each other are very less correlative. Now, I uploaded an error log from Tinker Board (Arm Cortex A17 + Mali T760) [here](https://gist.github.com/tomoaki0705/d3c64968a55db2226b0bbe3a238aebea) I've extraceted some tests which are still failing. ``` [ FAILED ] 54 tests, listed below: [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/4, where GetParam() = (CV_8U, Channels(1), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/5, where GetParam() = (CV_8U, Channels(1), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/6, where GetParam() = (CV_8U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/7, where GetParam() = (CV_8U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/8, where GetParam() = (CV_8U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/9, where GetParam() = (CV_8U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/34, where GetParam() = (CV_8U, Channels(3), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/35, where GetParam() = (CV_8U, Channels(3), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/36, where GetParam() = (CV_8U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/37, where GetParam() = (CV_8U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/38, where GetParam() = (CV_8U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/39, where GetParam() = (CV_8U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/64, where GetParam() = (CV_8U, Channels(4), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/65, where GetParam() = (CV_8U, Channels(4), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/66, where GetParam() = (CV_8U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/67, where GetParam() = (CV_8U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/68, where GetParam() = (CV_8U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/69, where GetParam() = (CV_8U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/94, where GetParam() = (CV_16U, Channels(1), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/95, where GetParam() = (CV_16U, Channels(1), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/96, where GetParam() = (CV_16U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/97, where GetParam() = (CV_16U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/98, where GetParam() = (CV_16U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/99, where GetParam() = (CV_16U, Channels(1), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/124, where GetParam() = (CV_16U, Channels(3), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/125, where GetParam() = (CV_16U, Channels(3), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/126, where GetParam() = (CV_16U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/127, where GetParam() = (CV_16U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/128, where GetParam() = (CV_16U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/129, where GetParam() = (CV_16U, Channels(3), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/154, where GetParam() = (CV_16U, Channels(4), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/155, where GetParam() = (CV_16U, Channels(4), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/156, where GetParam() = (CV_16U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/157, where GetParam() = (CV_16U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/158, where GetParam() = (CV_16U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/159, where GetParam() = (CV_16U, Channels(4), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/184, where GetParam() = (CV_32F, Channels(1), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/185, where GetParam() = (CV_32F, Channels(1), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/186, where GetParam() = (CV_32F, Channels(1), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/187, where GetParam() = (CV_32F, Channels(1), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/188, where GetParam() = (CV_32F, Channels(1), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/189, where GetParam() = (CV_32F, Channels(1), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/214, where GetParam() = (CV_32F, Channels(3), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/215, where GetParam() = (CV_32F, Channels(3), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/216, where GetParam() = (CV_32F, Channels(3), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/217, where GetParam() = (CV_32F, Channels(3), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/218, where GetParam() = (CV_32F, Channels(3), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/219, where GetParam() = (CV_32F, Channels(3), (32FC1, 32FC1), BORDER_REFLECT_101, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/244, where GetParam() = (CV_32F, Channels(4), (32FC1, 32FC1), BORDER_WRAP, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/245, where GetParam() = (CV_32F, Channels(4), (32FC1, 32FC1), BORDER_WRAP, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/246, where GetParam() = (CV_32F, Channels(4), (32FC1, 32FC1), BORDER_REFLECT, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/247, where GetParam() = (CV_32F, Channels(4), (32FC1, 32FC1), BORDER_REFLECT, true) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/248, where GetParam() = (CV_32F, Channels(4), (32FC1, 32FC1), BORDER_REFLECT_101, false) [ FAILED ] OCL_ImgprocWarp/Remap_INTER_LINEAR.Mat/249, where GetParam() = (CV_32F, Channels(4), (32FC1, 32FC1), BORDER_REFLECT_101, true) ``` Question from me, is it realistic to replace the input ? I can imagine 2,3 alternative solution, but I think it could still happen even if we replace the input image. How should we fix this test failure ?