dxva2_h264: set the correct ref frame index in the long slice struct

The latest H.264 DXVA specification states that the index in this
structure should refer to a valid entry in the RefFrameList of the picture
parameter structure, and not to the actual surface index.

Fixes H.264 DXVA2 decoding on recent Intel GPUs (tested on Sandy and Ivy)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dxva2_h264: add a workaround for old Intel GPUs

Old Intel GPUs expect the reference frame index to the actual surface,
instead of the index into RefFrameList as specified by the spec.

This workaround should be set when using one of the "ClearVideo" decoder
devices.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
hwaccel: fix dxva2 & vaapi loop filter parameters

Signed-off-by: Anton Khirnov <anton@khirnov.net>
avconv: add support for DXVA2 decoding

Signed-off-by: Anton Khirnov <anton@khirnov.net>
configure: rework dxva in avconv handling

Move the dxva check after the dependencies have been detected, make sure
the ole32 library exists.

Fixes build on non-Windows.
Merge commit '2fcef90bee98bffeff1d95b7197738f50c450d86'

* commit '2fcef90bee98bffeff1d95b7197738f50c450d86':
  dxva2_h264: set the correct ref frame index in the long slice struct

Conflicts:
	libavcodec/dxva2_h264.c

See: 276839b8de7ff836a529bbd6221f615a343b23e1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'ed4b757177f9b563412cdbc8ee3405d82e10fc05'

* commit 'ed4b757177f9b563412cdbc8ee3405d82e10fc05':
  dxva2_h264: add a workaround for old Intel GPUs

Conflicts:
	doc/APIchanges
	libavcodec/version.h

See: 8b2a130d3fe61e348092714dffa425b63c4d796c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'b2b4afe8115fe3c8b005d663610e5af06f110165'

* commit 'b2b4afe8115fe3c8b005d663610e5af06f110165':
  hwaccel: fix dxva2 & vaapi loop filter parameters

See: 0ad8f73f137dad1f3d0f818e22bdb2949186e9ec
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '35177ba77ff60a8b8839783f57e44bcc4214507a'

* commit '35177ba77ff60a8b8839783f57e44bcc4214507a':
  avconv: add support for DXVA2 decoding

Conflicts:
	Makefile
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'a61c2115fb936d50b8b0328d00562fe529a7c46a'

* commit 'a61c2115fb936d50b8b0328d00562fe529a7c46a':
  configure: rework dxva in avconv handling

Conflicts:
	Makefile
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_dxva2: fix mixing of declarations and statements

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avutil/log: fix memleak from 669a09fb372fa58ff913ebc326cb64bb3e8e7928

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1_parser: fix use of uinitialized memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>