Commit Graph

95557 Commits

Author SHA1 Message Date
Paul B Mahol
9e283aa24e avfilter/vf_psnr,vf_ssim: add warning if different timebases are encountered 2019-10-25 22:02:41 +02:00
Paul B Mahol
0481a1f6e5 avcodec/interplayvideo: properly decode motion vectors
Fixes #7945
2019-10-25 18:29:13 +02:00
Paul B Mahol
9d711a90fd avformat/bintext: avoid division by zero
Fixes #8335
2019-10-25 12:22:25 +02:00
Jun Li
155508c6e9 avformat/tee.c: steal bsf option before passing to fifo muxer
Fix #7620
In the case tee muxer with both "bsf" and "use_fifo" parameters
will trigger this bug. Tee muxer will first steal parameters (like "f",
"select"...) and then "use_fifo" will try reading out remaining options
and pass them to fifo as option "format_options".
Current code miss the part of stealing "bsf" options.
2019-10-25 11:55:52 +08:00
Andreas Rheinhardt
6f2a3958cf fftools/ffmpeg: Free swresample dictionary during cleanup
Freeing this was forgotten in ad899522.

Fixes #8315 and #8316.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
698e042c77 avcodec/vp5: Check render_x/y
Fixes: Timeout (15sec -> 91ms)
Fixes: 18353/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP5_fuzzer-5704150326706176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
66589d9bd9 avcodec/truespeech: Fix integer overflow in truespeech_synth()
Fixes: signed integer overflow: -1801695444 + -830224908 cannot be represented in type 'int'
Fixes: 17995/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUESPEECH_fuzzer-5648084880588800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
3948d80842 avcodec/interplayacm: Fix integer overflows in juggle()
Fixes: signed integer overflow: -760459023 + -1520918047 cannot be represented in type 'int'
Fixes: 17994/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5647123042795520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
4834ec926a avcodec/hcom: Check the root entry and the right entries
Fixes: Segfault
Fixes: 17991/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCOM_fuzzer-5647235349479424

Also fixes related memleak

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
b63fbc19c0 avcodec/qdrw: Check input for header/skiped space before get_buffer()
Fixes: Timeout (21sec -> 0.8sec)
Fixes: 17990/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDRAW_fuzzer-5200374436200448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
8caa716667 tools/target_dec_fuzzer: Adjust threshold for CFHD
Fixes: Timeout (18sec -> 5sec)
Fixes: 17977/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5186112762413056

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
000494fed9 tools/target_dec_fuzzer: Adjust ffwavesynth threshold
ffwavesynth can produce large amounts of data relatively slowly on very small input

Fixes: Timeout (60sec -> 9sec)
Fixes: 17970/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5689121279836160

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
f4ecf6c39d avcodec/ralf: Skip initializing unused filter variables
Fixes: left shift of negative value -1
Fixes: 17890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5643307467669504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Michael Niedermayer
42eb78059d avcodec/takdec: Fix overflow with large sample rates
Fixes: signed integer overflow: 2147483647 + 511 cannot be represented in type 'int'
Fixes: 17899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5719753322135552

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00
Paul B Mahol
37d8ae9da8 doc/filters: fix another typo 2019-10-24 21:42:00 +02:00
Paul B Mahol
9bf5e7992f avcodec/interplayvideo: cosmetics 2019-10-24 20:59:05 +02:00
Paul B Mahol
f166951d6e avfilter: add maskedmin/maskedmax filters 2019-10-24 20:54:33 +02:00
Andreas Rheinhardt
262eef6b89 avformat/mpeg: Don't free unintialized pointer
In order to fix a potential memleak upon failure, 0b8956b2 made sure that
a buffer given by a pointer was freed upon error. But this pointer was
only initialized upon use and in several cases (Clang gives no fewer
than 13 -Wsometimes-uninitialized warnings) this meant that an
uninitialized pointer was used to free a buffer. So initialize the
pointer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-24 15:51:20 -03:00
Ramiro Polla
531fbce0b2 mpegvideo_enc: add intra_penalty option for p frames
This option allows more control over the use of intra macroblocks in
predictive frames.

By using '-intra_penalty max', intra macroblocks are never used in
predictive frames.

It is useful for glitch artists to generate input material. This option
allows them to split and merge two video files while maintaining fluid
motion from the second video without having intra macroblocks restoring
chunks of the first video.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Andreas Rheinhardt
3d5d0301c3 avformat/icoenc: Add deinit function
Prevents memleaks in situations where the trailer isn't written, e.g.
because of errors during writing the header.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Andreas Rheinhardt
f53525d248 avformat/aiffenc: Use better error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Andreas Rheinhardt
c36eae65e4 avformat/mpeg: Add padding to extradata
Extradata is supposed to be padded with AV_INPUT_BUFFER_PADDING_SIZE bytes,
yet the VobSub demuxer used av_strdup for the allocation of extradata.
This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-24 19:45:17 +02:00
Paul B Mahol
ac0f5f4c17 avfilter/vf_maskedclamp: add x86 SIMD 2019-10-23 16:20:21 +02:00
Zhao Zhili
11cfff04ed FATE/dnn: add .gitignore
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2019-10-23 09:58:17 -03:00
Zhao Zhili
eafc8afafc avcodec/tests: add h265_levels to .gitignore 2019-10-23 09:56:38 -03:00
Paul B Mahol
7df808ea84 avfilter/settb: switch to activate
Now correctly updates EOF timestamp.
2019-10-23 12:37:46 +02:00
Paul B Mahol
8732eb124e avfilter/vf_floodfill: better fix for crash 2019-10-23 10:20:57 +02:00
Paul B Mahol
1cdc805228 avfilter/vf_floodfill: add more gray formats 2019-10-23 10:04:15 +02:00
Paul B Mahol
ba7d55d3fc avfilter/vf_deband: add more gray formats 2019-10-23 09:54:36 +02:00
Jun Zhao
0e3d5bdc08 lavfi/bilateral: Clean the option description and unused code
Clean the option description and unused code.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-10-23 15:47:27 +08:00
Paul B Mahol
7832e05c35 avfilter/vf_lut2: fix typo, correctly support gray14 2019-10-23 09:44:08 +02:00
Paul B Mahol
1f327f5d27 avfilter/vf_bm3d: add gray14 format 2019-10-23 09:37:18 +02:00
Paul B Mahol
dd239bdb65 avfilter/vf_vaguedenoiser: add more gray formats 2019-10-23 09:31:09 +02:00
Paul B Mahol
ec5d385722 avfilter/transpose: add missing headers 2019-10-22 19:53:50 +02:00
James Almer
738bc3e742 x86/vf_transpose: make ff_transpose_8x8_16_sse2 work on x86_32
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22 13:51:13 -03:00
Paul B Mahol
2a75006ddc avfilter/vf_maskedclamp: rewrite using macro 2019-10-22 18:10:03 +02:00
James Almer
a34d06222f avcodec/libdav1d: fix setting AVFrame reordered_opaque
Actually reorder the values.

Should effectively fix ticket #8300.

Tested-by: Andrey Semashev <andrey.semashev@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22 12:00:49 -03:00
James Almer
78a24fd014 avcodec/atrac9tab: use explicit ATRAC9BlockConfig struct initializers
Cosmetic change.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22 10:49:30 -03:00
Paul B Mahol
5561a1de90 avfilter/vf_premultiply: fix signed integer overflow
Fixes #8324
2019-10-22 10:38:16 +02:00
Steven Liu
0b8956b25c avformat/mpeg: move the header_str free into end label
fix CID: 1454875

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:54:36 +08:00
Steven Liu
388e1fc9b5 avcodec/psd: remove unneeded code
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:51:42 +08:00
Steven Liu
36ed8ae52c avcodec/hevcdec: remove unneeded code
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:51:37 +08:00
Steven Liu
d92b2296f8 avformat/segafilmenc: remove unneeded code
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-22 10:51:30 +08:00
Andreas Rheinhardt
74cafb0e6f avformat/matroskaenc: Cosmetics
Contains renaming of variables (e.g. mkv_write_cues() contained
variables called tracknum that actually contain the index of a track in
s->streams and not the track number (which can differ in case an
explicit dash track number is set)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
c486fe206e avformat/matroskaenc: Use more appropriate function name
mkv_start_new_cluster() actually didn't start a new cluster, but ended
the old one instead and emitted a debug message that it had started a
new cluster. This has been changed: The debug message has been moved to
the place that really starts a new cluster and the function has been
renamed to mkv_end_cluster().

Furthermore, without this debug message the function can be used for
flushing.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
b4e36df74f avformat/matroskaenc: Remove redundant assert
The Matroska muxer groups index entries with the same pts together in
order to save a few bytes. Because of Matroska's variable-length length
fields, mkv_write_cues() does this by first finding out how many index
entries will be grouped together before actually writing them.
Currently, it is asserted at both of these stages that the stream index
of the list of designated index entries is valid. But the second assert
is redundant, because the very same index entries have already been
checked.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
65ef74f749 avformat/matroskaenc: Move track-related fields to mkv_track
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 21:05:14 -03:00
Andreas Rheinhardt
7797fdfe6f avformat/matroskaenc: Use ffio_free_dyn_buf
instead of replicating its behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 20:35:54 -03:00
Andreas Rheinhardt
982a98a0e3 avformat/matroskaenc: Fix memleak upon failure
The Matroska muxer up until now leaked memory in two scenarios:

1. If an error happened during writing the trailer, as
mkv_write_trailer() returned early without cleaning up.
2. If mkv_write_header() indicated success despite an error in the
underlying AVIOContext. In this case avformat_write_header() returned
the IO error and according to the API the caller is not allowed to call
av_write_trailer(), so that no cleanup happened for the allocations made
in mkv_write_header().

This has been fixed by using a dedicated deinit function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 20:35:54 -03:00
Limin Wang
887db36821 avfilter/vsrc_mptestsrc: simplify the code and change the type of frame
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00