1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

31411 Commits

Author SHA1 Message Date
Michael Niedermayer
a91c175db2 Merge commit '17c45d4d056d0e10ecb88b424ec9e68be398da5e'
* commit '17c45d4d056d0e10ecb88b424ec9e68be398da5e':
  libtheora: Check frame allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 21:41:55 +01:00
Michael Niedermayer
9ecfe0b878 Merge commit 'a72d93daa09ffbad2771f1450820941055eaf210'
* commit 'a72d93daa09ffbad2771f1450820941055eaf210':
  mpegvideo_enc: Check AVCodecContext allocation

Conflicts:
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 21:30:37 +01:00
Michael Niedermayer
0bc2da6dcf Merge commit '78c892284150e12f6b08b287bdf7e62307c6985f'
* commit '78c892284150e12f6b08b287bdf7e62307c6985f':
  dca: Document the permuted order in the lfe_fir_64 and lfe_fir_128 tables

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 21:20:24 +01:00
James Almer
d5addf1555 hevcdsp: fix compilation for arm and aarch64
Also add av_cold to ff_hevcdsp_init_arm.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 20:01:01 +01:00
Vittorio Giovara
17c45d4d05 libtheora: Check frame allocation 2015-03-12 15:29:59 +00:00
Vittorio Giovara
a72d93daa0 mpegvideo_enc: Check AVCodecContext allocation 2015-03-12 15:29:59 +00:00
Michael Niedermayer
27191b82de avcodec/vp9: Fix undefined shifts in decode_frame_header()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 15:31:41 +01:00
Michael Niedermayer
b7cb8b3d43 avcodec/h264_mb: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 15:16:46 +01:00
Rainer Hochecker
31816eae32 hevc: delay ff_thread_finish_setup for hwaccel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 14:49:41 +01:00
Niels Möller
78c8922841 dca: Document the permuted order in the lfe_fir_64 and lfe_fir_128 tables 2015-03-12 13:28:42 +01:00
Michael Niedermayer
e197dc04bb Merge commit '212556cd2144659dc6b9d121ddb38cd272bd10ae'
* commit '212556cd2144659dc6b9d121ddb38cd272bd10ae':
  qsv: Improve the log message of when initializing MFX_IMPL_HARDWARE{2, 3, 4}

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 00:15:58 +01:00
Andreas Cadhalpun
67142a8c72 roqvideoenc: set enc->avctx in roq_encode_init
So far it is only set in roq_encode_frame, but it is used in
roq_encode_end to free the coded_frame. This currently segfaults if
roq_encode_frame is not called between roq_encode_init and
roq_encode_end.

CC:libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 20:28:13 +01:00
Yukinori Yamazoe
212556cd21 qsv: Improve the log message of when initializing MFX_IMPL_HARDWARE{2, 3, 4}
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 19:48:01 +01:00
Michael Niedermayer
fd4e17fcc2 avcodec/mpegvideo_motion: Fix undefined shifts in mpeg_motion_internal()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 19:12:38 +01:00
Michael Niedermayer
c756b3fca2 avcodec/h264dsp_template: Fix undefined shift in biweight_h264_pixels and weight_h264_pixels
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 18:57:36 +01:00
Michael Niedermayer
2391e46430 avcodec/mpegvideo: Fix undefined shift in ff_mpv_lowest_referenced_row()
Also moves the shift out of the inner loop

Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 17:59:59 +01:00
Michael Niedermayer
9b2a964cee avcodec/vp8: Fix undefined shifts in vp8_mc_luma()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 16:55:07 +01:00
Michael Niedermayer
8617bc6ffa avcodec/golomb: Fix undefined shifts in unsigned rice decoding code
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 16:47:13 +01:00
Michael Niedermayer
8c7a0932ab avcodec/amrnbde: Fix undefined shift in decode_pitch_vector()
This also simplifies the code

Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 16:29:40 +01:00
Hendrik Leppkes
dc2d0e06af mlpdec: support TrueHD streams with an Atmos substream
The fourth substream is being discarded, since its not raw audio data,
but an encoded Atmos stream which needs a specialized decoder.

Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 16:06:40 +01:00
Hendrik Leppkes
f36f6a608b mlpdec: support major sync headers with optional extension blocks
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 16:03:13 +01:00
Michael Niedermayer
bd4c4c868c avcodec/wma: Fix undefined shift in ff_wma_run_level_decode()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 15:27:54 +01:00
Michael Niedermayer
e5dfa43619 avcodec/vc1_pred: Fix undefined shift in ff_vc1_pred_mv()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 13:16:47 +01:00
Michael Niedermayer
1932f7e2ee avcodec/mpeg12dec: Fix undefined shift
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 04:24:57 +01:00
Michael Niedermayer
48df30d36c avcodec/012v: redesign main loop
Fixes out of array accesses
Fixes: ffmpeg_012v_crash.ts

Found-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Reviewed-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-10 23:33:57 +01:00
Michael Niedermayer
eb7960b2bd avcodec/h264: Fix undefined shifts in pack16to32() and pack8to16()
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-10 21:25:39 +01:00
Michael Niedermayer
111456682f avcodec/mpegvideo: Fix undefined shifts in ff_init_block_index()
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-10 21:25:33 +01:00
Michael Niedermayer
d3b25383da avcodec/012v: Check dimensions more completely
Fixes division by 0

Found-by: Thomas Lindroth <thomas.lindroth@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-10 20:21:14 +01:00
Carl Eugen Hoyos
1d523ea89a lavc/hevcdsp: Fix compilation for arm with --disable-neon. 2015-03-10 12:14:16 +01:00
Andreas Cadhalpun
cf82c426fa roqvideoenc: set enc->avctx in roq_encode_init
So far it is only set in roq_encode_frame, but it is used in
roq_encode_end to free the coded_frame. This currently segfaults if
roq_encode_frame is not called between roq_encode_init and
roq_encode_end.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-09 21:44:30 +01:00
Michael Niedermayer
cf714205bd avcodec/libvpxenc: Clear twopass_stats.sz on deallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-09 21:18:43 +01:00
Michael Niedermayer
a11440c185 Merge commit '93f7948136fcda8ddbbc44a6c24418f11ca829b8'
* commit '93f7948136fcda8ddbbc44a6c24418f11ca829b8':
  libvpx: Fix mixed use of av_malloc() and av_reallocp()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-09 21:18:36 +01:00
zhaoxiu.zeng
b3a56e60be avcodec/hevc_parser: use avpriv_find_start_code in hevc_split()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-09 18:19:10 +01:00
Michael Niedermayer
1f4088b285 avcodec/options_table: remove extradata_size from the AVOptions table
allowing access to the size but not the extradata itself is not useful
and could lead to potential problems if writing happens through this field

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Reviewed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-09 17:43:25 +01:00
Vittorio Giovara
93f7948136 libvpx: Fix mixed use of av_malloc() and av_reallocp()
This buffer is resized when vpx_codec_get_cx_data() returns a
VPX_CODEC_STATS_PKT packet.

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-09 12:58:18 +00:00
Carl Eugen Hoyos
b69238d9ba Fix the intra_dc_precision API doc.
The mpegvideo decoder has set intra_dc_precision since forever.
2015-03-09 10:47:06 +01:00
Carl Eugen Hoyos
bf4bd427dd lavc/ffv1enc: Auto-select -coder 1 for >8bit also for yuv.
Reported-by: Christoph Gerstbauer
2015-03-09 10:40:16 +01:00
Michael Niedermayer
0ce3a0f9d9 utvideodec: Handle slice_height being zero
Fixes out of array accesses.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-9604
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-09 00:51:15 +01:00
Michael Niedermayer
d5e9fc7821 avcodec/tiff: move bpp check to after "end:"
This ensures that all current and future code-pathes get bpp checked

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 23:36:46 +01:00
Michael Niedermayer
9889762a9b Merge commit 'ae5e1f3d663a8c9a532d89e588cbc61f171c9186'
* commit 'ae5e1f3d663a8c9a532d89e588cbc61f171c9186':
  tiff: Check that there is no aliasing in pixel format selection

See: e1c0cfaa41
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 23:19:30 +01:00
Michael Niedermayer
acfb54c076 Merge commit '0025f7408a0fab2cab4a950064e4784a67463994'
* commit '0025f7408a0fab2cab4a950064e4784a67463994':
  vorbis: Check the vlc value in setup_classifs

Conflicts:
	libavcodec/vorbisdec.c

See: ae038c0914
See: 709cae2bcb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 19:31:25 +01:00
Anton Khirnov
ae5e1f3d66 tiff: Check that there is no aliasing in pixel format selection
Fixes possible issues with unexpected bpp/bppcount values.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-8544
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-08 19:14:14 +01:00
Michael Niedermayer
10e3e3aa85 Merge commit '62de77ffcaebd42fe685b8426da56b89b2532318'
* commit '62de77ffcaebd42fe685b8426da56b89b2532318':
  vorbis: Use a local codebook variable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 18:59:06 +01:00
Ronald S. Bultje
0b69c53a61 vp9: included uses_2pass member in vp9_ref_frame().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 14:50:11 +01:00
Luca Barbato
0025f7408a vorbis: Check the vlc value in setup_classifs
The valid returned values are always at most 11bit.
Remove the previous check that assumed larger values plausible and
use a signed integer to check get_vlc2 return values.

CC: libav-stable@libav.org
2015-03-08 14:33:03 +01:00
Luca Barbato
62de77ffca vorbis: Use a local codebook variable
Makes the code a little simpler.
2015-03-08 14:33:02 +01:00
Ronald S. Bultje
4ba8f3273e vp9: split segmentation map / mvpair references.
This prevents a memcpy if segmentation.update_map == false.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 13:58:14 +01:00
zhaoxiu.zeng
9d7e42e65c avcodec/vc1_mc: optimize get_chroma_mv, and add get_luma_mv
Test results:

before:
  fate-suite/vc1/SA10091.vc1: 1062 decicycles in ff_vc1_mc_4mv_chroma's get mv, 4089 runs, 7 skips
  fate-suite/vc1/SA10143.vc1: 1112 decicycles in ff_vc1_mc_4mv_luma's get mv, 4096 runs, 0 skips
  fate-suite/vc1/SA20021.vc1: 991 decicycles in ff_vc1_mc_4mv_chroma get mv, 8192 runs, 0 skips

after:
  fate-suite/vc1/SA10091.vc1: 940 decicycles in ff_vc1_mc_4mv_chroma's get mv, 4096 runs, 0 skips
  fate-suite/vc1/SA10143.vc1: 786 decicycles in ff_vc1_mc_4mv_luma's get mv, 4096 runs, 0 skips
  fate-suite/vc1/SA20021.vc1: 876 decicycles in ff_vc1_mc_4mv_chroma get mv, 8189 runs, 3 skips

Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 03:04:32 +01:00
Michael Niedermayer
8849c4ceac avcodec/mpegvideo_motion: Fix off by 1 error in MV bounds checking in qpel, chroma_4mv and 8x8
No testcase available

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 01:46:50 +01:00
Michael Niedermayer
9f0eaf792a avcodec/mpegvideo_motion: Fix off by 1 error in MV bounds checking
Fixes Ticket4299

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 01:27:56 +01:00