Applied fix suggested in bug 3282 and shortened code
Copied errorCovPre to errorCovPost. This allows the correct behaviour of the uncertainty to grow when there is missing data for each predict step.
Added few opencl optimizations (as Intel platform codepath):

1. HaarDetetctor: repack nodes to reduce memory footprint
2. cornerMinEigVal: 4 ocl kernels are fused into 1 for sobel calculation
try to fix build error
try to made compatible with mac
Update imgproc_canny.cl

Reordering condition checking.
fix CUDA 5.5 support (npp, arm cross compilation) in CMake scripts:

The patch was submitted to CMake and might be available
in the next CMake release.

But until we have the fix in CMake we should add workaround in our scripts.
fix the bug of ocl::bruteForceMatcher
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.
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.
rename imageproc_sobel2.cl -> imageproc_sobel3.cl for consistency
added performance tests for ocl::bitwise_or and ocl::bitwose_xor
fix bugs on host and device sides for imgprog_sobel3.cl
added own version of FindCUDA.cmake
Fixed a missing barrier.
fix the mismatch running on cpu devices