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
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>
Merge commit '1c4073efd24164ac6eaa52c544f5cdb0e5f6aee5'

* commit '1c4073efd24164ac6eaa52c544f5cdb0e5f6aee5':
  fate: add tests for h264 decoder reinit
  h264: fix bit depth changes with frame threading

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

* commit '25408b2a0660c1e6c8555559c4ed71dff2ede31e':
  h264: make ff_h264_frame_start static.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264.h

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

* commit '48d0fd2d62a476e1db9298163f1fc0abae26cc67':
  h264: merge common_init() into ff_h264_decode_init.

Conflicts:
	libavcodec/h264.c

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

* commit 'da6be8fcec16a94d8084bda8bb8a0a411a96bcf7':
  h264: add a parameter to the MB_FIELD macro.
  h264: add a parameter to the MB_MBAFF macro.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c

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

* commit '7fa00653a550c0d24b3951c0f9fed6350ecf5ce4':
  h264: add a parameter to the FIELD_PICTURE macro.
  h264: add a parameter to the FRAME_MBAFF macro.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c

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

* commit '6d2b6f21eb45ffbda1103c772060303648714832':
  h264: add a parameter to the CABAC macro.
  h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c

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