• Zhigang Gong's avatar
    Avoid unmap an umat(ocl) which hasn't been mapped at all. · 2e49ca49
    Zhigang Gong authored
    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: 's avatarZhigang Gong <zhigang.gong@intel.com>
    2e49ca49
Name
Last commit
Last update
..
androidcamera Loading commit data...
calib3d Loading commit data...
core Loading commit data...
cuda Loading commit data...
cudaarithm Loading commit data...
cudabgsegm Loading commit data...
cudacodec Loading commit data...
cudafeatures2d Loading commit data...
cudafilters Loading commit data...
cudaimgproc Loading commit data...
cudalegacy Loading commit data...
cudaoptflow Loading commit data...
cudastereo Loading commit data...
cudawarping Loading commit data...
cudev Loading commit data...
features2d Loading commit data...
flann Loading commit data...
highgui Loading commit data...
imgproc Loading commit data...
java Loading commit data...
matlab Loading commit data...
ml Loading commit data...
nonfree Loading commit data...
objdetect Loading commit data...
optim Loading commit data...
photo Loading commit data...
python Loading commit data...
shape Loading commit data...
stitching Loading commit data...
superres Loading commit data...
ts Loading commit data...
video Loading commit data...
videostab Loading commit data...
viz Loading commit data...
world Loading commit data...
CMakeLists.txt Loading commit data...
refman.rst.in Loading commit data...