avcodec/alac: warn if not all channels where decoded

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
flv: Workaround for buggy Omnia A/XE encoder

The Omnia A/XE encoder writes the explicit extra data incorrectly
and wrongly disables parametric stereo. Truncating the extra data
by setting the size to 2 works around this. The AAC extra data
parser will then only parse the correct parts.

Bug-id: 599
avcodec/hevc: use av_mallocz() for allocating tab_ipm

Fixes use of uninitialized memory and out of stack array read
Fixes: signal_sigsegv_ecc526_7846_WPP_C_ericsson_MAIN_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: Clip the pixel before shifting

Prevent an out of array bound read.

Fixes: asan_stack-oob_eae8e3_7333_WPP_B_ericsson_MAIN10_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  flv: Workaround for buggy Omnia A/XE encoder

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mjpegenc: pass chroma quantization matrix through as well, not just luma

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mpegvideo_enc: init chroma matrix for mjpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mjpegenc: use a seperate chroma matrix when luma and chroma differ

drop hardcoded TWOMATRIX code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vp9: fix mt-related hang a parser infinite loop.

Fixes trac ticket 3274.

Looked-at-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dct-test: correct output bias of prores idct

This way the output values make sense

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dct-test: reproduce 4..1019 clipping when testing prores IDCT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: clip pixels when transquant bypass is used

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

This is a more proper fix than 5856bca360c5bc3e340a357d91b1f993c80a7bea

The reconstructed picture should always be clipped (see section 8.6.5),
previously we did not clip coding units where
cu_transquant_bypass_flag == 1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: remove useless clip in FUNC(sao_band_filter)()

The src buffer should only contain values in the interval
[0, (1 << BIT_DEPTH) - 1]. Since shift = (BIT_DEPTH - 5), src[x] >> shift
must be in the interval [0, 31], so no clip is needed.

This removes the code that was changed in 5856bca360c5bc3e340a357d91b1f993c80a7bea
as the clip that was repositioned in that commit is removed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dct-test: add support for C prores IDCT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
examples/muxing: simplify video PTS setting

Rely on frame_count. Also more consistent with audio path.