vdpau: Add H.264 decoding via hwaccel infrastructure

Signed-off-by: Diego Biurrun <diego@biurrun.de>
vdpau: Add VC-1 decoding via hwaccel infrastructure

Signed-off-by: Diego Biurrun <diego@biurrun.de>
v4l2: avoid pointless indirection.

v4l2_read_header() does no cleanup, so it can return directly, without
any need for goto.
v4l2: set the average framerate instead of codec timebase.

Codec timebase is supposed to be set by decoders only.
v4l2: do not assert on a value received from outside of Libav
avpacket: free side data in av_free_packet().

Freeing it in av_destruct_packet(), as is done currently, would mean
that we allow it to be allocated with other means. But that would make
av_packet_new_side_data() unsafe.

Side data is not expected to be large, so copying it if required
shouldn't be a problem.
lavc: check for overflow in init_get_bits

Fix an undefined behaviour and make the function return a proper
error in case of overflow.

CC: libav-stable@libav.org
lavc: introduce the convenience function init_get_bits8

Accept the buffer size in bytes and check for overflow before passing
the value in bits to init_get_bits.
yadif: x86: fix build for compilers without aligned stack

Manually load registers to avoid using 8 registers on x86_32 with
compilers that do not align the stack (e.g. MSVC).

Signed-off-by: Diego Biurrun <diego@biurrun.de>
cscd: return meaningful error codes.
msrle: return meaningful error codes.
tmv: return meaningful error codes.
pcx: return meaningful error codes.
nuv: return meaningful error codes.
qpeg: return a meaningful error code.
targa: return meaningful error codes.
lcldec: return meaningful error codes.
interplayvideo: return meaningful error codes.
interplayvideo: remove a static variable.
gifdec: return meaningful error codes.