According to opencl 1.2 spec 5.4.2:
enqueues a command to unmap a previously mapped region of a memory object.
...
CL_INVALID_VALUE if mapped_ptr is not a valid pointer returned by
clEnqueueMapBuffer, or clEnqueueMapImage for memobj.
So if the u->data is not from a clEnqueueMapBuffer call, we should not
call clEnqueueUnmapMemObject() unmap it. With this patch, the cases
./opencv_test_video --gtest_filter=OCL_Video/FarnebackOpticalFlow.Mat/*
could work well with beignet 0.9.1, Otherwise, it will get a
CL_INVALID_VALUE at the clEnqueueUnmapMemObject().
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
modules/core/src/arithm.cpp:345:51:
error: constant expression evaluates to 4294967295 which cannot be narrowed to type 'int' [-Wc++11-narrowing]
static int CV_DECL_ALIGNED(16) v64f_absmask[] = { 0xffffffff, 0x7fffffff, 0xffffffff, 0x7fffffff };
^~~~~~~~~~
Converted to unsigned int. This variable is only used to initialize a bit pattern anywhy for a 128bit type.
When using perspectiveTransform in rather complicated settings, it would be easier for developers to have two separate assertions for each part of the boolean expression in order to pinpoint problems more efficiently. In my case I am struggling in Python2.7 with finding out whether scn+1 == m.cols or the depth == CV_32F || depth == CV_64F is making a problem, which is kind of hard.