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>