vda: fix chroma issue with vda upload

GL_YCBCR_422_APPLE need a GL_RGB internal format not GL_RGBA
vda: cvref textures are non power of two so don't allocate extra space
vda: use IOSurfaceGetPixelformat instead of CVPixelBufferGetPixelFormatType

We have converted the texture to an IOSurfaceRef so use that to check
for format.
vda: allocate pot texture if requested
vda: switch cvref rendering over to standard UYVY422 renderer

This gives brightness/contrast/scaling support. The fallback to
old style upload is dropped since GL_YCBCR_422_APPLE
is no longer used.
[ffmpeg/vda] - update for current used ffmpeg (2.2)
vda: allow 3 render buffers
vda: if no image is returned, we must still reset cv_buffer

This is used unconditinolly by ffmpeg, and if not cleared here an
old already released frame may end up being used.
vda: upgrade to hwaccel2 interface
ffmpeg: if a second GetFormat dis-allow hwaccel, we must restore ffmpeg

This fixes errors in the case that a second instance of a decoder fails, then we must fall back to software again.
gl: multipass renderer would use wrong source pixels sizes

The scaling was inverted for pixel coordinate.
gl: multipass renderer was broken when RECT textures was used as source

FBO is now always rendered with non rect texture target, even if source
is rect.
vda: only allow ffmpeg VDA when advanced setting enable it

It currently cause corruption during playback of some files
Merge pull request #5703 from elupus/vda_fixes

Vda fixes