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

38857 Commits

Author SHA1 Message Date
Michael Niedermayer
c225da68cf avcodec/hevcdsp_template: Fix undefined shift in put_hevc_pel_bi_w_pixels
Fixes: runtime error: left shift of negative value -95
Fixes: 3077/clusterfuzz-testcase-minimized-4684917524922368

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-11 12:23:58 +02:00
Michael Niedermayer
b5995856a4 avcodec/diracdec: Fix overflow in DC computation
Fixes: runtime error: signed integer overflow: 11896 + 2147483646 cannot be represented in type 'int'
Fixes: 3053/clusterfuzz-testcase-minimized-6355082062856192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-11 12:23:53 +02:00
Jesse Liu
8e17cd20b9 add missing ignore files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-10 19:08:33 +02:00
Michael Niedermayer
981f04b2ae avcodec/scpr: optimize shift loop.
Speeds code up from 50sec to 15sec

Fixes Timeout
Fixes: 3242/clusterfuzz-testcase-5811951672229888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-10 19:08:23 +02:00
Michael Niedermayer
d98d29a775 avcodec/dirac_vlc: limit res_bits in APPEND_RESIDUE()
Fixes: runtime error: left shift of 1073741838 by 1 places cannot be represented in type 'int32_t' (aka 'int')
Fixes: 3279/clusterfuzz-testcase-minimized-4564805744590848

Suggested-by: <atomnuker>
Reviewed-by: <atomnuker>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-09 18:55:47 +02:00
Jun Zhao
a918f16f7c lavc/vaapi_encode_mpeg2: fix frame rate calc error when use time_base.
fix frame rate calc error when use time_base.

Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-09-09 11:31:46 +01:00
Ilia Valiakhmetov
e59da0f7ff avcodec/vp9: Add tile threading support
Signed-off-by: Ilia Valiakhmetov <zakne0ne@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-09-08 10:25:40 -04:00
Ilia Valiakhmetov
83c12fefd2 avcodec/pthread_slice: add ff_slice_thread_execute_with_mainfunc()
Signed-off-by: Ilia Valiakhmetov <zakne0ne@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-09-08 10:25:32 -04:00
Mark Wachsler
fde5c7dc79 libavcodec/h264_parse: don't use uninitialized value when chroma_format_idc==0
When parsing a monochrome file, chroma_log2_weight_denom was used without
being initialized, which could lead to a bogus error message being printed, e.g.
  [h264 @ 0x61a000026480] chroma_log2_weight_denom 24576 is out of range
It also could led to warnings using AddressSanitizer.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-08 13:48:40 +02:00
Kaustubh Raste
9b2c3c406f avcodec/mips: Improve vp9 mc msa functions
Load the specific destination bytes instead of MSA load and pack.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-08 13:48:40 +02:00
Kaustubh Raste
c75b23cbea avcodec/mips: Improve vp9 idct msa functions
Removed memset calls.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-08 13:48:40 +02:00
Kaustubh Raste
2e79813a8e avcodec/mips: Improve vp9 lpf msa functions
Updated VP9_LPF_FILTER4_4W macro to process on 8 bit data.
Replaced VP9_LPF_FILTER4_8W with VP9_LPF_FILTER4_4W.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-08 13:48:40 +02:00
Timo Rothenpieler
d0961d3069 avcodec/nvenc: sanitize variable names 2017-09-07 12:08:32 +02:00
Timo Rothenpieler
a56d0497cb avcodec/nvenc: migrate to new encode API
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-07 12:08:32 +02:00
Paras Chadha
b07faf39ed avcodec/fitsdec: write output to frame directly
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-06 22:48:42 -03:00
James Almer
f4e593f7b5 avcodec/audiotoolboxdec: use av_freep()
This prevents leaving dangling pointers.
2017-09-06 13:04:21 -03:00
James Almer
3242babf64 avcodec/audiotoolboxdec: switch to the new generic filtering mechanism
Tested-by: ubitux
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-06 12:54:27 -03:00
James Almer
e49338a9c0 avcodec/audiotoolboxdec: add FF_CODEC_CAP_INIT_CLEANUP to the decoder capabilities
Extradata may be allocated and the AudioConverterRef may be created during init(),
which in case of a failure would not be freed as close() isn't called afterwards.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-06 11:35:14 -03:00
James Almer
7273e234de avcodec/audiotoolboxdec: always use a copy of the AVCodecContext extradata
Fixes memleaks introduced by 954e2b3d34

Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-06 11:35:07 -03:00
Kaustubh Raste
fa805df060 libavcodec/mips: Improve avc idct8 msa function
Replace memset call with msa stores.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-05 22:16:03 +02:00
James Almer
6cadbb16e9 avcodec: add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL flag
This flag replaces the deprecated, non-prefixed HWACCEL_CODEC_CAP_EXPERIMENTAL
one.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-04 17:48:41 -03:00
Michael Niedermayer
c595139f1f avcodec/dirac_vlc: Fix invalid shift in ff_dirac_golomb_read_32bit()
Fixes: runtime error: shift exponent 64 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2838/clusterfuzz-testcase-minimized-6260066086813696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-02 23:50:28 +02:00
Michael Niedermayer
f71cd44147 avcodec/dirac_dwt: Fix multiple overflows in 9/7 lifting
Fixes: runtime error: signed integer overflow: 1073901567 + 1073901567 cannot be represented in type 'int'
Fixes: 3124/clusterfuzz-testcase-minimized-454643435752652

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-02 23:50:28 +02:00
Michael Niedermayer
2a0823ae96 avcodec/diracdec: Fix integer overflow in INTRA_DC_PRED()
Fixes: runtime error: signed integer overflow: 1168175789 + 1168178473 cannot be represented in type 'int'
Fixes: 3081/clusterfuzz-testcase-minimized-4807564879462400
Fixes: 2844/clusterfuzz-testcase-minimized-5561715838156800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-02 23:50:28 +02:00
Timo Rothenpieler
4e6638abb4 avcodec/nvenc: always output picture timing SEI
Interlaced encoding profits from it, or might even need it in some
players.
No harm in enabling it unconditionally.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-02 16:01:57 +02:00
James Almer
9aa2469930 avcodec/internal: move FF_QSCALE_TYPE defines from avcodec.h
Their use in the public header is deprecated and will be removed, but
they are still needed by some codecs at least as long as qscale related
deprecated fields in the AVFrame struct remain in the tree.
2017-09-01 14:44:44 -03:00
Timo Rothenpieler
0e995eac20 avcodec/nvenc: only push cuda context on encoder close if encoder exists
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-01 10:52:15 +02:00
Timo Rothenpieler
a0b69e2b0a avcodec/nvenc: add support for specifying entropy coding mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-09-01 10:52:15 +02:00
pkviet
73bed07373 avocdec/libopus: fix typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-01 01:19:07 +02:00
James Almer
1291a6d0ff avcodec/fits: add missing header includes
Fixes checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-08-31 11:27:34 -03:00
Paul B Mahol
2b9fd15734 avcodec/codec_desc: make FITS description longer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-08-30 12:18:22 +02:00
Paras Chadha
6e02f66f1b Add FITS Encoder
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
2017-08-30 12:13:01 +02:00
Paras Chadha
61e4db4bb7 Add FITS Decoder
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
2017-08-30 12:13:01 +02:00
Michael Niedermayer
732f976456 avcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()
Fixes: runtime error: signed integer overflow: 267 * 8388608 cannot be represented in type 'int'
Fixes: 2743/clusterfuzz-testcase-minimized-5820652076400640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-29 21:16:32 +02:00
Michael Niedermayer
2a83866c9f avcodec/hevc_ps: Fix undefined shift in pcm code
Fixes: runtime error: shift exponent -1 is negative
Fixes: 3091/clusterfuzz-testcase-minimized-6229767969832960

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-29 21:16:32 +02:00
Michael Niedermayer
6def8b8d92 avcodec/h264idct_template: Fix integer overflow in ff_h264_idct8_add()
Fixes: 2891/clusterfuzz-testcase-minimized-5881795457318912
Fixes: runtime error: signed integer overflow: 1551827968 - -775913984 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-29 21:16:32 +02:00
James Almer
95a6de5674 avcodec/snowenc: fix setting motion_est option
Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly.
Based on code from svq1enc.c

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-28 21:27:01 -03:00
Mark Thompson
b264810ef7 hevc: Add names for reserved NAL unit types
While not yet used, these NAL units do already have some defined
semantics and are referred to elsewhere.

(cherry picked from commit 3daaa44173)
2017-08-28 11:50:50 +01:00
Jun Zhao
e4a6eb70f4 lavc/vaapi_encode: Change the slice/parameter buffers to dynamic alloc.
Change the slice/parameter buffers to be allocated dynamically.

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-08-28 11:49:57 +01:00
Jun Zhao
385cafb07a lavc/vaapi_encode_h265: Enable VBR mode
Follow vaapi_h264 style, enable the VBR mode.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-08-28 11:47:55 +01:00
Michael Niedermayer
0181b202cc avcodec/aacpsdsp_template: Fix undefined integer overflow in ps_add_squares_c()
Fixes runtime error: signed integer overflow: 1997494407 + 613252359 cannot be represented in type 'int'
Fixes: 2014/clusterfuzz-testcase-minimized-5186337030275072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-27 19:40:28 +02:00
Michael Niedermayer
eefb68c9c3 avcodec/sbrdsp_fixed: Fix undefined overflows in autocorrelate()
Fixes: runtime error: signed integer overflow: 8903997421129740175 + 354481484684609529 cannot be represented in type 'long'
Fixes: 2045/clusterfuzz-testcase-minimized-6751255865065472

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-27 19:40:23 +02:00
James Almer
257f0d09f7 avcoec/snowenc: silence some deprecation warnings 2017-08-26 22:10:00 -03:00
Carl Eugen Hoyos
094d4d8691 lavc/sinewin_tablegen: Fix compilation with --enable-hardcoded-tables.
Reported by irc user JCount_.
2017-08-26 12:48:43 +02:00
Carl Eugen Hoyos
1c56becb9b lavc/utils: Calculate frame duration for little-endian G.726. 2017-08-26 11:59:34 +02:00
Michael Niedermayer
7c10068da1 avcodec/dvbsubdec: Check for duplicate regions in dvbsub_parse_page_segment()
Fixes: OOM
Fixes: 3051/clusterfuzz-testcase-minimized-5745818336231424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-25 23:38:24 +02:00
James Almer
8a0954dd51 avcodec: add missing FF_API_DEBUG_MV wrappers
Signed-off-by: James Almer <jamrial@gmail.com>
2017-08-25 13:44:52 -03:00
James Almer
2c800eb737 avcodec: make the avcodec_get_chroma_sub_sample deprecation effective
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-08-25 12:19:41 -03:00
Derek Buitenhuis
9e02f35f6a mjpeg: Add support for ICC side data
JPEGs store embedded profiles under the APP2 marker, signified
with a "ICC_PROFILE" null-terminated string header, and can be
split across multiple APP2 markers, out of order.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-08-25 13:44:41 +01:00
Paul B Mahol
dbc9a8f21f avcodec/aac: Add floating point 960/120 MDCT window
Co-Authored-By: Alex Converse <alex.converse@gmail.com>
Co-Authored-By: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-08-24 17:42:07 -07:00