avcodec/huffman: extend ff_huff_gen_len_table() to allow >8bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/huffman: raise the input capability of ff_huff_gen_len_table() from 8 to 14bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: Reject impossible dependent tile

The tile 0 cannot depend on a previous one.
Prevent an out of array bound load in ff_hevc_cabac_init().

Fixes: asan_heap-oob_e3a924_1630_DBLK_A_MAIN10_VIXS_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Reviewed-by: Guillaume Martres <smarter@ubuntu.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: Bound check slice_qp

The T-REC-H.265-2013044 page 79 states they have to be into the range
[-s->sps->qp_bd_offset, 51].

Fixes: asan_stack-oob_eae8e3_9522_WP_MAIN10_B_Toshiba_3.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/hevc: Check entry point arrays for malloc failure

Fixes null pointer dereference
Fixes: signal_sigsegv_e1d3b6_2192_DBLK_F_VIXS_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vc1: Factorize out chroma MC
vc1: Add avg_no_rnd_vc1_chroma_mc4_c()

Needed for proper interlaced support.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
vc1: Enable the interlaced B-frame codepath.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
x86/arm: Add clobber tests to libavresample

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'c798a6fedc3dd9ed3ac1fb2d95819af58705a87e'

* commit 'c798a6fedc3dd9ed3ac1fb2d95819af58705a87e':
  vc1: Factorize out chroma MC

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

* commit '6d98959c8a5a749592a878b9523b31eccea5d102':
  vc1: Add avg_no_rnd_vc1_chroma_mc4_c()

Conflicts:
	libavcodec/vc1dsp.c

See: dd6e291e4083b7af53968c0ae06330841f63405b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '49b9badcaab513b65b79be371b1a9c1012e482ea'

* commit '49b9badcaab513b65b79be371b1a9c1012e482ea':
  vc1: Enable the interlaced B-frame codepath.

See: 33f2a4942380184f3a28cbf2a36366c8ed105232
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '99e20125232d40ea239a5b54d26bbfe526506114'

* commit '99e20125232d40ea239a5b54d26bbfe526506114':
  x86/arm: Add clobber tests to libavresample

Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavf: simplify handling of offset in av_probe_input_buuffer()
lavf: use a fixed width type

It's shorter and more consistent with the rest of the code.
lavf: make av_probe_input_buffer more robust

Always use the actually read size as the offset instead of making
possibly invalid assumptions.

Addresses: CVE-2012-6618
Merge commit 'c1868e7ee7b07b40a0fe15f50df89fe499a01a50'

* commit 'c1868e7ee7b07b40a0fe15f50df89fe499a01a50':
  lavf: simplify handling of offset in av_probe_input_buuffer()

Conflicts:
	libavformat/utils.c

The simplification is broken and does not work at least for ffmpeg,
thus this change is not merged.

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

* commit '8b76362836f3c373c3aadc544522edcbef16dd5f':
  lavf: use a fixed width type

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  lavf: make av_probe_input_buffer more robust

Conflicts:
	libavformat/utils.c

Not merged as it depends on previous buggy changes

See: e74cd2f4706f71da5e9205003c1d8263b54ed3fb
See: ececbedaa86cddd883f6cdc12cdd1a75a0023550
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils/av_probe_input_buffer2: Fix pd.buf_size

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