Commit Graph

26821 Commits

Author SHA1 Message Date
Michael Niedermayer
0389f9abe9 avcodec/avcodec: document that some video decoders do not support linesizes changing between frames.
Omission in the documentation found by: Sebastian Dröge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-03 15:35:11 +01:00
Dale Curtis
4feca2214a h264: Clear ERContext.cur_pic when unref'ing current picture.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
2014-01-02 23:49:06 +01:00
Michael Niedermayer
2e59ffbb79 avcodec/mace: check buffer size
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9d2775e090_8782_surge-2-8-MAC3.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-02 22:07:09 +01:00
Michael Niedermayer
c925e960e8 mp3on4: fail when the header check fails
It seems the code assumed that when one out of multiple blocks fail
some span of time is correct, its not, its some channels
that are correct

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f44a03ba3ce_5692_id5_1.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-02 18:53:41 +01:00
Michael Niedermayer
6433b393ba avcodec/aacps: fix number of bands used with ipd/opd
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f861d16355f_1664_File1_fixed.aac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-02 17:48:01 +01:00
Michael Niedermayer
4843227b2c avcodec/iff: ensure that runs with insufficient input dont leave uninitialized bytes in the output
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa0dea15eae_8988_test.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-02 14:52:02 +01:00
Maxim Poliakovski
4663a550f5 atrac3plus: Add forgotten initialization of an internal struct
This patch also fixes trac ticket 3254.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-02 02:25:37 +01:00
Michael Niedermayer
e6364ea26d avcodec/vqavideo: use av_mallocz() for decode_buffer()
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f62eaba897d_595_4D6EFA92.VQA
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 15:35:34 +01:00
Michael Niedermayer
07728a1115 avcodec/binkaudio: clear padding area of packet_buffer
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f0dba198b34_2970_Snd0a3a2ad4.dee
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 03:31:09 +01:00
Hendrik Leppkes
3d8eeea620 dxva2_vc1: signal skipped p frames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:57:56 +01:00
Hendrik Leppkes
c5562890c7 dxva2_vc1: fix signaling of intensity compensation values
lumscale/lumshift don't get reset back to their default values if
intensity compensation is not active, and a wrong signaling here can
cause playback issues.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:57:51 +01:00
Hendrik Leppkes
719f1ce5fb vc1: set chromaformat = 1 for simple/main profile
1 is the only valid value for VC-1/WMV3, and setting it here makes sure
no invalid value is send to a hw accelerator, for example.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:57:44 +01:00
Hendrik Leppkes
e1facd3f81 dxva2_vc1: set PQUANT as described by the 2010 spec update
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:57:33 +01:00
Hendrik Leppkes
3021d1be9e dxva2_vc1: set bfraction in slice info according to spec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:57:23 +01:00
Hendrik Leppkes
8abdf46b38 dxva2_vc1: set refdist value according to spec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:57:16 +01:00
Michael Niedermayer
46b06bd894 avcodec/mpegvideo_enc: implement frame skip score normalization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 02:46:39 +01:00
Michael Niedermayer
21a2fb7e05 avcodec/hevc: clear HEVClc when its deallocated in hevc_decode_free()
Fixes reading freed memory
Fixes: asan_heap-uaf_1abf8ef_3987_NUT_A_ericsson_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-31 15:19:59 +01:00
Reimar Döffinger
cbeaf67888 Avoid using empty macro arguments.
These are not supported by all compilers (gcc 2.95 but also older SPARC
compilers, see gcc bug #33304 for example), and there is no real need for them.
One use of this feature remains in libavdevice/v4l2.c which can't be
replaced quite as easily.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-12-31 12:19:59 +01:00
Anssi Hannula
4a4437c0fb avformat/mpegts: demux timed ID3 metadata
Used in some HLS streams ("Timed Metadata for HTTP Live Streaming").

This is just ID3 tags at arbitrary stream positions, but I still added
"timed" to the codec name to avoid confusion with regular non-stream ID3
tags.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2013-12-31 03:13:12 +02:00
Michael Niedermayer
61d43a2651 avcodec/lagarith: check and propagate return value from init_get_bits8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 14:27:33 +01:00
Michael Niedermayer
afd1245433 avcodec/lagarith: use init_get_bits8()
Suggested-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 13:49:49 +01:00
Michael Niedermayer
6f1b296771 avcodec/lagarith: reenable buggy lag_decode_zero_run_line()
This is to prevent regressions in case the old code was able to partly
decode frames (no way to say without a testcase)
Add a memset to prevent use of uninitialized memory until we have a
testcase and can test/fix it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 13:47:34 +01:00
Nicolas George
2ebaadf35c lavc/mjpegenc: use proper error codes. 2013-12-30 10:58:02 +01:00
Nicolas George
19a2d101ac lavc/mjpegenc: check av_frame_alloc() failure. 2013-12-30 10:58:02 +01:00
Nicolas George
97af2faaba lavc/libopenjpegenc: check av_frame_alloc() failure. 2013-12-30 10:58:02 +01:00
Nicolas George
a91394f4de lavc/diracdec: check av_frame_alloc() failure. 2013-12-30 10:58:01 +01:00
Nicolas George
38004051b5 lavc/utils: check av_frame_alloc() failure. 2013-12-30 10:58:01 +01:00
Nicolas George
bcfcb8b852 lavc/ffwavesynth: fix dependency sizeof(AVFrame). 2013-12-30 10:58:01 +01:00
Michael Niedermayer
4aa9c91508 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Fix condition for transparency warning in xsub encoder.
  Allow hiding the banner.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 02:12:53 +01:00
Michael Niedermayer
e80aa47abf avcodec/lagarith: fix init_get_bits() size in lag_decode_arith_plane()
untested due to lack of sample

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 00:55:32 +01:00
Michael Niedermayer
3410122c68 avcodec/lagarith: fix src/src_size for esc_count < 8
untested due to lack of sample

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 00:55:32 +01:00
Michael Niedermayer
100a54da52 avcodec/lagarith: disable lag_decode_zero_run_line() and ask for a sample
The code seems to have never been tested
fixing it should be quite easy but needs a sample/testcase

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9a862dfabf_413_2889_assassin_OL.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 00:52:24 +01:00
Carl Eugen Hoyos
de40905f55 Fix condition for transparency warning in xsub encoder. 2013-12-29 23:18:10 +01:00
Michael Niedermayer
5c74fa6ce0 avcodec/alsdec: skip cases where the master channel equals the current channel
Fixes: msan_uninit-mem_7f6c73c97cf9_3571_als_04_2ch48k16b.mp4
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 12:35:57 +01:00
Michael Niedermayer
74a9c92840 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: namespace the decode function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 11:37:42 +01:00
Michael Niedermayer
fead24141a avcodec/vda_h264_dec: avoid declaring int in for arguments
Some compilers dont support that

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 03:16:28 +01:00
Michael Niedermayer
3477874abd Merge branch 'master' of https://github.com/upsuper/ffmpeg-vdadec
* 'master' of https://github.com/upsuper/ffmpeg-vdadec:
  avcodec/vda_h264_dec: add format check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 03:16:09 +01:00
Maxim Poliakovski
2e1fb96af3 ATRAC+ decoder
Cleanup by Diego Biurrun.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 01:11:16 +01:00
Michael Niedermayer
55fa898969 avcodec/jpeg2000dec: zero Jpeg2000QuantStyle structure before use in get_qcd()
Fixes: msan_uninit-mem_7f50b84aac30_6823_mjp2.mov
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-28 22:08:49 +01:00
Michael Niedermayer
6ea05ef278 avcodec/h264: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-28 18:19:46 +01:00
Michael Niedermayer
c09bb235bf Merge remote-tracking branch 'rbultje/vp9-simd'
* rbultje/vp9-simd:
  vp9/x86: 16px MC functions (64bit only).
  vp9/x86: 16x16 sub-IDCT for top-left 8x8 subblock (eob <= 38).

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 13:57:38 +01:00
Michael Niedermayer
25b243759c Merge commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0'
* commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0':
  avutil: Move library version related macros to version.h

Conflicts:
	libavcodec/version.h
	libavresample/version.h
	libavutil/avutil.h
	libavutil/utils.c

See: 183117fed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 12:01:23 +01:00
Luca Barbato
4d2bb28931 h264: namespace the decode function
Make much easier debugging.
2013-12-27 07:48:13 +01:00
Ronald S. Bultje
18175baa54 vp9/x86: 16px MC functions (64bit only).
Cycle counts for large MCs (old -> new on ped1080p.webm, mx!=0&&my!=0):
16x8:    876 ->   870  (0.7%)
16x16:  1444 ->  1435  (0.7%)
16x32:  2784 ->  2748  (1.3%)
32x16:  2455 ->  2349  (4.5%)
32x32:  4641 ->  4084 (13.6%)
32x64:  9200 ->  7834 (17.4%)
64x32:  8980 ->  7197 (24.8%)
64x64: 17330 -> 13796 (25.6%)
Total decoding time goes from 9.326sec to 9.182sec.
2013-12-26 21:05:10 -05:00
Michael Niedermayer
f55bc96a54 avcodec/pcm-dvd: reset last header on errors
Fixes: msan_uninit-mem_7f4fff975a2c_4957_dvd_audio_sample.aob
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 03:00:52 +01:00
Michael Niedermayer
42b6805cc1 avcodec/huffyuvdec: clear remainder of the array on end of input in decode_422_bitstream()
Fixes: msan_uninit-mem_7f909423efcd_9923_yuv_predmed.avi
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 00:26:57 +01:00
Diego Biurrun
b83d1ee3b4 avutil: Move library version related macros to version.h
This is a more sensible place for these macros.
2013-12-26 19:05:22 +01:00
Michael Niedermayer
d164ad3298 avcodec/ivi_common: use av_mallocz() to allocate mbs array
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f1dffa1c016_8245_sasha.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 14:53:39 +01:00
Xidorn Quan
344d6db978 avcodec/vda_h264_dec: add format check
Fix crash when using this decoder for unsupported format on some version
of OS X.
2013-12-27 00:06:11 +11:00
Michael Niedermayer
14bec7dcf8 avcodec/wnv1: clear padding area of rbuf
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7faa48586020_2145_MAILTEST.AVI
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 13:53:15 +01:00