h264: fix bit depth changes with frame threading

AVCodecContext.bits_per_raw_sample is updated from the previous thread
in the generic update function before the codec specific update_thread
function is called. The check for reinitialization of dsp functions uses
bits_per_raw_sample. When called from update_thread_context it will be
already at the current value and the dsp functions aren't updated if
only the bit depth changes.
fate: add tests for h264 decoder reinit
asrc_sine: avoid use of INFINITY as it might be a non constant

This should fix compilation on openbsd

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavc/utils: fix metadata audio frame memleak in case of non refcounted frames.

The metadata must be set before saving the frame to avci->to_free,
otherwise it will leak.

Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
avformat/avs: increase probe score to preempt conflict with avxsynth

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

Dynamically loads the library itself, rather than through VfW.
Supports AvxSynth on Linux and OS X.

Supports the new colorspaces added in AviSynth 2.6 when used
with AviSynth 2.6.
Provide local copies of AviSynth's and AvxSynth's requisite headers in compat/avisynth/.

The versions of the headers are the same as those provided with x264
for consistency's sake.
lavfi/vf_stereo3d: use standard options parsing

Signed-off-by: Paul B Mahol <onemda@gmail.com>
h264: make ff_h264_frame_start static.

It is not called from outside h264.c
h264: merge common_init() into ff_h264_decode_init.

There is no point in keeping those separate.
h264: add a parameter to the MB_MBAFF macro.

This way it does not look like a constant.
h264: add a parameter to the MB_FIELD macro.

This way it does not look like a constant.
h264: add a parameter to the FRAME_MBAFF macro.

This way it does not look like a constant.
h264: add a parameter to the FIELD_PICTURE macro.

This way it does not look like a constant.
h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.

This way it does not look like a constant.
h264: add a parameter to the CABAC macro.

This way it does not look like a constant.
h264: add a parameter to the CHROMA422 macro.

This way it does not look like a constant.
h264: add a parameter to the CHROMA444 macro.

This way it does not look like a constant.
h264: remove redundant freeing of DPB in h264_decode_end

free_tables() frees it already.
h264: drop special case for 9bit chroma422

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