arm: Add an option for making sure NEON registers aren't clobbered

This is pretty much based on the same test for XMM registers.

Signed-off-by: Martin Storsjö <martin@martin.st>
Cast signed libopenjpeg data values to unsigned before shifting.

This avoids undefined behaviour on left-shift.

Reviewed-by: Michael Bradshaw
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Cast signed libopenjpeg data values to unsigned before shifting.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wmalosslessdec: Pass on error code from decode_tilehdr()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wmalosslessdec: deallocate uninitialized frame on decode_tilehdr() failure

Fixes use of uninitialized memory
partly fixes: msan_uninit-mem_7f7834b6a530_6473_luckynight-partial.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wmalosslessdec: shrink output on error so no uninitialized data is returned

Fixes use of uninitialized memory
partly fixes: msan_uninit-mem_7f7834b6a530_6473_luckynight-partial.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/pjsdec: dont increase pointer when its already at the end in read_ts()

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f91f2de7764_2649_PJS_capability_tester.pjs
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  arm: Add an option for making sure NEON registers aren't clobbered

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/alac: only set *got_frame_ptr when all channels have been decoded

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f8b64436530_7895_quicktime_newcodec_applelosslessaudiocodec.m4a
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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>