Merge pull request #1682 from SpecLad:Wmissing-declarations
added first very simple test for UMat<=>Mat conversion
fixed whitespace errors
hopefully, the last test failures are fixed now
fixed some bugs in OpenCL branch of UMat implementation; maybe now the tests will finally pass?! (please ;( )
fix the bug of ocl::bruteForceMatcher
Merge pull request #1683 from alalek:ocl_restore_showdiff
Merge pull request #1681 from LeszekSwirski:fix-ninjabuild
enabled ocl::bilateralFilter ROI testing
Removed a stray comma in the Android toolchain file.

It was actually acting as an additional argument, breaking the error message.
Replaced our usage of LINK_PRIVATE with that of LINK_INTERFACE_LIBRARIES.

The reasons for that are twofold:

1) LINK_PRIVATE is only available since CMake 2.8.7.
2) The way it was used generated a warning because of CMake policy CMP0023:

   http://www.cmake.org/cmake/help/v2.8.12/cmake.html#policy:CMP0023

Using LINK_INTERFACE_LIBRARIES actually causes another warning - this time
because of CMake policy CMP0022:

   http://www.cmake.org/cmake/help/v2.8.12/cmake.html#policy:CMP0022

I set the policy to OLD, because NEW means subtle changes when compiling
with CMake 2.8.12, and I don't want to research that this close to release.
:-)

I also removed the setting of CMP0003, because it's set by
cmake_minimal_version anyway.
Added the missing setting of HAVE_FFMPEG to true on Windows.

While the FFmpeg video IO backend gets compiled even without it,
the tests (for both FFmpeg and video IO) don't. This should fix
that.
Decoupled test_ffmpeg.cpp from ffmpeg_codecs.hpp.

(cherry picked from commit 3f3ae33327270de87768a80a339b746441db6fec)
Changed MPEG-2 resolution in the FFmpeg test.

Newer FFmpeg prohibits 4096x4096 MPEG-2, presumably because it violates
the standard.

http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=commit;h=7fb87bc5f24b1be13269109506c05e4c54695b5e

(cherry picked from commit 424a7b0ab0cf7da591f7f15fbd15b2fee8c84a41)

Conflicts:
	modules/highgui/test/test_ffmpeg.cpp
Added stupid hacks to make the video tests pass with FFmpeg 2.0.2.

Need to go back at some point and fix this for real.

(cherry picked from commit dfe07df87ba82216a6ed1b6677f4f525c851ec03)
Fixed indentation in CV_FFmpegWriteBigVideoTest::run.
Rewrite distanceToCenters.
It supports NORM_L1 distance types now and can
use user provided indices.
Also fixed a bug of kmeans where distance pointers should be float instead
 of double.

NORM_L2 changed to NORM_L2SQR, Accuracy and Perf tests are added

added ROI support in accuracy test of distanceToCenters
Another FFmpeg fix from master.

From commit dd74a851, to be exact. Now cap_ffmpeg.cpp should actually
build if HAVE_FFMPEG is true.

Also modified some gpu sources in a similar manner.
changed InputArray's enumeration constant for UMat, since it may potentially conflict with existing OpenCL module. refactored Kernel's setArg API (now UMat is passed to a kernel as a structure, as Alexander A suggested). removed Kernel's cleanup callback from the external API; now each kernel keeps track of used matrices and they are dereferenced after it's complete.
fixed separable filter extrapolation