Commit Graph

29946 Commits

Author SHA1 Message Date
Michael Niedermayer
3e2b745020 avcodec/pngdec: Check bits per pixel before setting monoblack pixel format
Fixes out of array accesses
Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-03 17:37:15 +02:00
Michael Niedermayer
e1c0cfaa41 avcodec/tiff: more completely check bpp/bppcount
Fixes pixel format selection
Fixes out of array accesses
Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-03 16:33:06 +02:00
Michael Niedermayer
8b0e96e1f2 avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
Fixes out of array access
Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-03 14:46:43 +02:00
Michael Niedermayer
d225b0f7aa avcodec/h263dec: Fix decoding messenger.h263
Fixes http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263
Fixes regression since b239f3f6

Found-by: Josh Allmann
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-03 12:55:17 +02:00
Michael Niedermayer
105654e376 avcodec/utils: Add case for jv to avcodec_align_dimensions2()
Fixes out of array accesses
Fixes: asan_heap-oob_12304aa_8_asan_heap-oob_4da4f3_300_intro.jv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-03 04:48:29 +02:00
James Almer
0de1d6287e x86/mlpdec: add ff_mlp_rematrix_channel_{sse4,avx2}
2x to 2.5x faster than the C version.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-02 22:11:55 -03:00
James Almer
ddb813b0ef mlpdec: move rematrix_channels code to output_data()
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-02 22:11:51 -03:00
Michael Niedermayer
5c378d6a6d avcodec/mjpegdec: check bits per pixel for changes similar to dimensions
Fixes out of array accesses
Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-03 02:18:13 +02:00
Michael Niedermayer
06e7d58410 avcodec/jpeglsdec: Check run value more completely in ls_decode_line()
previously it could have been by 1 too large
Fixes out of array access
Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8c1e3.jls
Fixes: asan_heap-oob_12240f5_1_asan_heap-oob_12240f5_448_t8nde0.jls
Fixes: asan_heap-oob_12240fa_1_asan_heap-oob_12240fa_448_t16e3.jls

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-03 02:18:08 +02:00
Michael Niedermayer
77b3e110d2 avcodec: bump micro version for av_lockmgr_register() changes in a950edb472
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 22:14:02 +02:00
Manfred Georg
a950edb472 avcodec/utils: av_lockmgr_register defines behavior on failure.
The register function now specifies that the user callback should
leave things in the same state that it found them on failure but
that failure to destroy is ignored by the library.  The register
function is now explicit about its behavior on failure
(it unregisters the previous callback and destroys all mutex).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 21:18:49 +02:00
wm4
cdd6f059a6 avcodec, avutil: allow more control about how samples are skipped
Add CODEC_FLAG2_SKIP_MANUAL (exposed as "skip_manual"), which makes
the decoder export sample skip information via side data, instead
of applying it automatically. The format of the side data is the
same as AV_PKT_DATA_SKIP_SAMPLES, but since AVPacket and AVFrame
side data constants overlap, AV_FRAME_DATA_SKIP_SAMPLES needs to
be introduced.

This is useful for applications which want to do the timestamp
calculations manually, or which actually want to retrieve the
padding.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-02 20:21:00 +02:00
Yusuke Nakamura
6ea357ea83 Fix compilation of jpeg2000dsp when disabling the encoder.
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-02 12:56:13 -03:00
Carl Eugen Hoyos
80ca627abb Check for oom in the dirac parser.
Fixes ticket #3996.
2014-10-02 09:31:41 +02:00
James Almer
c9f2ec8a34 jpeg2000: split off inverse MCT decoding as Jpeg2000DSP
This makes the addition of arch optimized functions easier.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-02 03:21:45 -03:00
James Almer
acebff8e5d x86/mpegvideoencdsp: improve ff_pix_sum16_sse2
~15% faster.

Also add an mmxext version that takes advantage of the new code, and
build it alongside with the mmx version only on x86_32.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-01 13:07:22 -03:00
Michael Niedermayer
0a7afedc48 avcodec/libx264: add avcintra-class
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-01 16:39:19 +02:00
Christophe Gisquet
9a3653c9ec hevc: reuse edge emu buffer for coefficients
Kind of hackish but...

Reviewed-by: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-01 12:12:28 +02:00
Manfred Georg
79551d2c7a avcodec/utils: Force mutex to NULL after destruction.
A badly behaving user provided mutex manager (such as that in OpenCV) may not reset the mutex to NULL on destruction.  This can cause a problem for a later mutex manager (which may assert that the mutex is NULL before creating).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-01 00:56:53 +02:00
Michael Niedermayer
cda5d89def avcodec/bitstream_filter: Use av_bitstream_filter_next() instead of direct access in av_bitstream_filter_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-30 20:27:07 +02:00
Clément Bœsch
0eb4a42812 avcodec/srtdec: use AVBPrint API 2014-09-30 20:21:15 +02:00
Clément Bœsch
55180b3299 Kill timed SRT 2014-09-30 20:21:14 +02:00
Benoit Fouet
d5ddcb5f8e avcodec/h264_mp4toannexb_bsf: use the given padding in h264_extradata_to_annexb().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-30 13:12:36 +02:00
Benoit Fouet
1cf4d2e9be avcodec/h264_mp4toannexb_bsf: add a case when only SPS/PPS is in the stream.
When only SPS or PPS is present in the stream, copy the missing one from
AVCC before insertion to the output stream.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-30 11:33:06 +02:00
Michael Niedermayer
61c0683080 avcodec/mpegvideo_enc: Fix leak on bitstream buffer reallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-30 05:19:20 +02:00
Michael Niedermayer
1441641d78 avcodec/mpegvideo_enc: Allocate only a small buffer and reallocate as needed
This should reduce the memory requirement

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-29 21:50:53 +02:00
Michael Niedermayer
46807921f7 Merge commit 'e3a00acde05c925617dc19b5373969d864bf8414'
* commit 'e3a00acde05c925617dc19b5373969d864bf8414':
  hevc: Initialize mergecand_list to 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-29 21:02:15 +02:00
Michael Niedermayer
cf32181b70 avcodec/put_bits: Add rebase_put_bits()
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-29 15:22:37 +02:00
Luca Barbato
e3a00acde0 hevc: Initialize mergecand_list to 0
Unbreak cf6090dc62.

CC: libav-stable@libav.org
Sample-Id: hevc-conformance-LTRPSPS_A_Qualcomm_1
2014-09-29 12:33:46 +01:00
Michael Niedermayer
8ba6945487 avcodec/utils: Fix off by 1 error causing unneeded allocation in ff_fast_malloc()
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-29 12:56:45 +02:00
Michael Niedermayer
755f7929c6 avcodec/mpegvideo_enc: Only enforce rc_max_available_vbv_use on first encoding attempt
This reduces repeatly re-encoding to achieve VBV compliance

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 23:59:44 +02:00
Michael Niedermayer
d22e88d120 avcodec/x86/fmtconvert: Fix operand size in ff_int32_to_float_fmul_array8_sse*
Fixes acodec-dca2 fate failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 19:04:06 +02:00
Michael Niedermayer
04152a31cb avcodec/vc1dec: Fixing is_intra, 2nd attempt
This also un-does the fate changes from a52f443714,
leaving this fix without even small differences in the output, that is
a sample for which this makes a vissible difference is very welcome

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 15:10:40 +02:00
Michael Niedermayer
a52f443714 avcodec/vc1dec: fix is_intra block vs. mb bug
Fixes CID1194380

There are no vissible differences in the changed fate samples. Only
a tiny number of pixels change by tiny amounts in the frames i checked
If someone has a file that shows a vissible difference, please post it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 14:27:35 +02:00
Michael Niedermayer
3956b12fde avcodec/libx265: enable psnr reporting when requested by the user
This is similar to what is done in libx264.c

Fixes Ticket3567

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 04:14:43 +02:00
Michael Niedermayer
4d9a46fe31 avcodec/libx264: mark unchanged pointer arguments as const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-28 03:40:13 +02:00
Michael Niedermayer
d85ebea3f3 avcodec/ac3enc_template: fix out of array read
Found-by: Andreas Cadhalpun
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-27 20:34:44 +02:00
Clément Bœsch
5ec90c90c6 avcodec/subviewerdec: remove old compat code 2014-09-27 17:55:29 +02:00
Clément Bœsch
180d7f330b avcodec/microdvddec: remove old compat code 2014-09-27 17:55:22 +02:00
Christophe Gisquet
f183febcda hevc: remove CodingTree
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-27 11:50:41 +02:00
Michael Niedermayer
be5dd8aa55 Merge commit '4e03b2097ca59843ed65424a572b7acd5345f088'
* commit '4e03b2097ca59843ed65424a572b7acd5345f088':
  mpeg12: Always invoke the get_format() callback

Conflicts:
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-27 03:38:48 +02:00
Michael Niedermayer
28b1698a7c Merge commit 'ce42316321145c435029dc288c2b5f1d48519dde'
* commit 'ce42316321145c435029dc288c2b5f1d48519dde':
  h264: Always invoke the get_format() callback

Conflicts:
	libavcodec/h264_slice.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-27 03:21:56 +02:00
Michael Niedermayer
01831fd004 Merge commit '1c80c9d7ef809180042257200c7b5f6b81d0b0e2'
* commit '1c80c9d7ef809180042257200c7b5f6b81d0b0e2':
  hwaccel: Call ->get_format again if hwaccel init fails

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-27 02:42:30 +02:00
James Almer
26cd7b1e1a x86/fmtconvert: add ff_int32_to_float_fmul_array8_{sse,sse2}
About two times faster than the c wrapper.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2014-09-26 20:48:40 -03:00
Michael Niedermayer
7618d360ca Merge commit '7703995a2e8760e66ff35148bf029e0f9e30dbe6'
* commit '7703995a2e8760e66ff35148bf029e0f9e30dbe6':
  flac: Remove unused headers

Conflicts:
	libavcodec/flacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-26 22:33:28 +02:00
Michael Niedermayer
c895fa7f66 Merge commit 'cc4992aaf3dbb0af88d9727983d75636baf1f8cc'
* commit 'cc4992aaf3dbb0af88d9727983d75636baf1f8cc':
  ac3enc: allow Dolby Pro Logic IIz as the Dolby Surround EX mode.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-26 22:18:12 +02:00
Michael Niedermayer
15fda8bcf1 Merge commit '4c2fd4b262347273afe97865ba451a1abde43ae6'
* commit '4c2fd4b262347273afe97865ba451a1abde43ae6':
  ac3enc: allow Dolby Pro Logic II as a preferred downmix mode.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-26 22:07:35 +02:00
Rémi Denis-Courmont
4e03b2097c mpeg12: Always invoke the get_format() callback
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-26 21:28:37 +02:00
Rémi Denis-Courmont
ce42316321 h264: Always invoke the get_format() callback
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-26 21:28:37 +02:00
Rémi Denis-Courmont
1c80c9d7ef hwaccel: Call ->get_format again if hwaccel init fails
This allows the application to fall back on another hwaccel or,
more likely, software decoding.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-26 21:28:36 +02:00