Implemented Kullback-Leibler divergence
Optimization of cv::pyrDown for 8UC1.
Use fma only for Intel devices
SSE2 optimization of magnitude calculation
Added call to clone() to avoid unexpected change to external data.
- Fix both stitching_detailed.cpp sample and cv::Stitcher.
DShow camera as IVideoCapture object
Remove unused variable
Fixed test errors, added support for C data types.
Fixed truncation warning
Avoid unmap an umat(ocl) which hasn't been mapped at all.

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>
fix build
Merge pull request #2962 from alalek:fix_v4l_build
Merge pull request #2882 from akarsakov:ocl_pyrDown_opt
Merge pull request #2947 from vbystricky:capDShow
Split highgui module to videoio and highgui
Merge pull request #2953 from gongzg:master
Refresh code. Fix merge conflict
Changed cv::log to std::log
Merge pull request #2939 from adishavit:sample-fix_stitching_pipeline
Merge pull request #2765 from pradeep-pyro:kullback_leibler