ffmpeg.git
3 months agoavfilter/af_afade: make sure that in is available
Paul B Mahol [Tue, 15 Oct 2019 22:45:26 +0000 (00:45 +0200)]
avfilter/af_afade: make sure that in is available

3 months agoavfilter/dnn: unify the layer load function in native mode
Guo, Yejun [Wed, 9 Oct 2019 14:08:18 +0000 (22:08 +0800)]
avfilter/dnn: unify the layer load function in native mode

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
3 months agoavfilter/dnn: unify the layer execution function in native mode
Guo, Yejun [Wed, 9 Oct 2019 14:08:11 +0000 (22:08 +0800)]
avfilter/dnn: unify the layer execution function in native mode

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
3 months agoavfilter/dnn: add DLT prefix for enum DNNLayerType to avoid potential conflicts
Guo, Yejun [Wed, 9 Oct 2019 14:08:04 +0000 (22:08 +0800)]
avfilter/dnn: add DLT prefix for enum DNNLayerType to avoid potential conflicts

and also change CONV to DLT_CONV2D for better description

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
3 months agoavformat/latmenc: abort if no extradata is available
James Almer [Tue, 15 Oct 2019 14:38:23 +0000 (11:38 -0300)]
avformat/latmenc: abort if no extradata is available

Fixes ticket #8273.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavfilter/vf_bm3d: make sure nb_jobs is at least 1
Paul B Mahol [Tue, 15 Oct 2019 15:59:43 +0000 (17:59 +0200)]
avfilter/vf_bm3d: make sure nb_jobs is at least 1

3 months agotools/target_dec_fuzzer: Also fuzz keyframe & disposal flags
Michael Niedermayer [Sat, 12 Oct 2019 20:34:03 +0000 (22:34 +0200)]
tools/target_dec_fuzzer: Also fuzz keyframe & disposal flags

This should improve coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agolavc/libxavs2: fix parameter setting result determination
hwren [Mon, 14 Oct 2019 13:22:42 +0000 (21:22 +0800)]
lavc/libxavs2: fix parameter setting result determination

Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/af_afade: fix heap-buffer overflow
Paul B Mahol [Tue, 15 Oct 2019 14:55:13 +0000 (16:55 +0200)]
avfilter/af_afade: fix heap-buffer overflow

Fixes #8276

3 months agoavfilter/vf_edgedetect: fix heap-buffer overflow
Paul B Mahol [Tue, 15 Oct 2019 14:38:40 +0000 (16:38 +0200)]
avfilter/vf_edgedetect: fix heap-buffer overflow

Fixes #8275

3 months agoavfilter/vf_avgblur: fix heap-buffer overflow
Paul B Mahol [Tue, 15 Oct 2019 14:31:15 +0000 (16:31 +0200)]
avfilter/vf_avgblur: fix heap-buffer overflow

Fixes #8274

3 months agoavcodec/av1_parse: Use av_fast_realloc() for OBU array
James Almer [Tue, 15 Oct 2019 02:42:01 +0000 (23:42 -0300)]
avcodec/av1_parse: Use av_fast_realloc() for OBU array

Based on commits 22bec0d33f4231487547581a1f77e2e8e6eade88 and
cebb446911fdc6c42d5a480b441b025c399e4a88.

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/av1_parse: simplify memset call
James Almer [Tue, 15 Oct 2019 02:43:08 +0000 (23:43 -0300)]
avcodec/av1_parse: simplify memset call

Removed (new_size - pkt->nals_allocated) because this value is always 1
during the call.
Based on commit 78b86c30d3860135042505dd4a9cbd95c4e6257d.

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavcodec/h2645_parse: Reset nal_buffer_size on uninit
Andriy Gelman [Tue, 15 Oct 2019 01:45:18 +0000 (21:45 -0400)]
avcodec/h2645_parse: Reset nal_buffer_size on uninit

Without reseting nal_buffer_size, av_fast_realloc will fail if
ff_h2645_packet_split is called with the unitialized pkt as argument.

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoffprobe: fix output of packets_and_frames section in JSON format
James Almer [Fri, 11 Oct 2019 16:36:38 +0000 (13:36 -0300)]
ffprobe: fix output of packets_and_frames section in JSON format

The "type" entry was hardcoded with an trailing comma, even if it was
the only entry in the section.

Fixes ticket #8228.

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavfilter: fix typo in comments
Zhao Zhili [Wed, 9 Oct 2019 12:06:10 +0000 (20:06 +0800)]
avfilter: fix typo in comments

Signed-off-by: mypopy@gmail.com
3 months agotools/target_dec_fuzzer: Also fuzz codec_tag
Michael Niedermayer [Sat, 12 Oct 2019 20:34:02 +0000 (22:34 +0200)]
tools/target_dec_fuzzer: Also fuzz codec_tag

This should improve coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agotools/target_dec_fuzzer: Also fuzz FF_COMPLIANCE_EXPERIMENTAL
Michael Niedermayer [Sat, 12 Oct 2019 20:34:01 +0000 (22:34 +0200)]
tools/target_dec_fuzzer: Also fuzz FF_COMPLIANCE_EXPERIMENTAL

This should improve coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agotools/target_dec_fuzzer: Also fuzz block_align
Michael Niedermayer [Sat, 12 Oct 2019 20:34:00 +0000 (22:34 +0200)]
tools/target_dec_fuzzer: Also fuzz block_align

This should improve coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/vf_lenscorrection: make width/height int
Paul B Mahol [Mon, 14 Oct 2019 18:14:03 +0000 (20:14 +0200)]
avfilter/vf_lenscorrection: make width/height int

Somehow previous correct fix broke usage.

3 months agodoc/APIchanges: add missing entry for the new runtime param AVOption flag
James Almer [Mon, 14 Oct 2019 15:05:01 +0000 (12:05 -0300)]
doc/APIchanges: add missing entry for the new runtime param AVOption flag

Signed-off-by: James Almer <jamrial@gmail.com>
3 months agoavfilter/vf_atadenoise: rewrite using macro
Paul B Mahol [Mon, 14 Oct 2019 14:39:56 +0000 (16:39 +0200)]
avfilter/vf_atadenoise: rewrite using macro

3 months agodoc/filters: document colorchannelmixer commands
Paul B Mahol [Mon, 14 Oct 2019 11:14:18 +0000 (13:14 +0200)]
doc/filters: document colorchannelmixer commands

3 months agodoc/filters: document amplify commands
Paul B Mahol [Mon, 14 Oct 2019 11:11:21 +0000 (13:11 +0200)]
doc/filters: document amplify commands

3 months agodoc/filters: document scroll commands
Paul B Mahol [Mon, 14 Oct 2019 11:08:13 +0000 (13:08 +0200)]
doc/filters: document scroll commands

3 months agoavfilter/vf_bwdif: fix heap-buffer overflow
Paul B Mahol [Sun, 13 Oct 2019 21:21:35 +0000 (23:21 +0200)]
avfilter/vf_bwdif: fix heap-buffer overflow

Fixes #8261

3 months agoavfilter/af_atempo: use ff_filter_process_command()
Paul B Mahol [Wed, 9 Oct 2019 10:13:22 +0000 (12:13 +0200)]
avfilter/af_atempo: use ff_filter_process_command()

3 months agoavfilter/af_biquads: use ff_filter_process_command()
Paul B Mahol [Wed, 9 Oct 2019 09:15:56 +0000 (11:15 +0200)]
avfilter/af_biquads: use ff_filter_process_command()

3 months agoavfilter/af_rubberband: use ff_filter_process_command()
Paul B Mahol [Tue, 8 Oct 2019 20:15:09 +0000 (22:15 +0200)]
avfilter/af_rubberband: use ff_filter_process_command()

3 months agoavfilter/vf_drawbox: use ff_filter_process_command()
Paul B Mahol [Tue, 8 Oct 2019 20:04:02 +0000 (22:04 +0200)]
avfilter/vf_drawbox: use ff_filter_process_command()

3 months agoavfilter/vf_colorchannelmixer: add support for commands
Paul B Mahol [Tue, 8 Oct 2019 19:54:30 +0000 (21:54 +0200)]
avfilter/vf_colorchannelmixer: add support for commands

3 months agoavfilter/vf_amplify: add support for commands
Paul B Mahol [Tue, 8 Oct 2019 11:44:58 +0000 (13:44 +0200)]
avfilter/vf_amplify: add support for commands

3 months agoavfilter/vf_scroll: add support for commands
Paul B Mahol [Tue, 8 Oct 2019 11:18:12 +0000 (13:18 +0200)]
avfilter/vf_scroll: add support for commands

3 months agoavfilter/af_anlmdn: switch to ff_filter_process_command()
Paul B Mahol [Tue, 8 Oct 2019 11:12:52 +0000 (13:12 +0200)]
avfilter/af_anlmdn: switch to ff_filter_process_command()

3 months agoavfilter/vf_avgblur: switch to ff_filter_process_command()
Paul B Mahol [Tue, 8 Oct 2019 11:05:36 +0000 (13:05 +0200)]
avfilter/vf_avgblur: switch to ff_filter_process_command()

3 months agoavfilter/vf_gblur: switch to ff_filter_process_command()
Paul B Mahol [Tue, 8 Oct 2019 11:03:52 +0000 (13:03 +0200)]
avfilter/vf_gblur: switch to ff_filter_process_command()

3 months agoavfilter/af_anlms: switch to ff_filter_process_command()
Paul B Mahol [Tue, 8 Oct 2019 10:49:28 +0000 (12:49 +0200)]
avfilter/af_anlms: switch to ff_filter_process_command()

3 months agodoc/filters: document new feature
Paul B Mahol [Mon, 14 Oct 2019 09:24:38 +0000 (11:24 +0200)]
doc/filters: document new feature

3 months agoavutil/opt: print runtime flag too
Paul B Mahol [Tue, 8 Oct 2019 10:56:55 +0000 (12:56 +0200)]
avutil/opt: print runtime flag too

3 months agoavfilter/avfilter: add ff_filter_process_command()
Paul B Mahol [Tue, 8 Oct 2019 10:42:40 +0000 (12:42 +0200)]
avfilter/avfilter: add ff_filter_process_command()

3 months agoavutil/opt: add AV_OPT_FLAG_RUNTIME_PARAM flag
Paul B Mahol [Tue, 8 Oct 2019 10:03:19 +0000 (12:03 +0200)]
avutil/opt: add AV_OPT_FLAG_RUNTIME_PARAM flag

3 months agoavfilter/vf_geq: reindent
Paul B Mahol [Fri, 11 Oct 2019 16:29:03 +0000 (18:29 +0200)]
avfilter/vf_geq: reindent

3 months agoavfilter/vf_geq: allow user to set interpolation method
Paul B Mahol [Fri, 11 Oct 2019 16:26:22 +0000 (18:26 +0200)]
avfilter/vf_geq: allow user to set interpolation method

3 months agoavfilter/vf_edgedetect: fix coverity issue
Paul B Mahol [Mon, 14 Oct 2019 08:52:27 +0000 (10:52 +0200)]
avfilter/vf_edgedetect: fix coverity issue

3 months agoavformat/chromaprint: improve logging message
Andriy Gelman [Sun, 6 Oct 2019 05:49:48 +0000 (01:49 -0400)]
avformat/chromaprint: improve logging message

Setting silence_threshold requires that -algorithm is set to 3.

3 months agoavformat/chromaprint: Fix fp_format option
Andriy Gelman [Sun, 6 Oct 2019 05:49:46 +0000 (01:49 -0400)]
avformat/chromaprint: Fix fp_format option

The fp_format option was incorrectly declared,
so it could not be set via string constants.

3 months agoavfilter/vf_geq: Use av_clipd() instead of av_clipf()
Michael Niedermayer [Sat, 12 Oct 2019 11:46:04 +0000 (13:46 +0200)]
avfilter/vf_geq: Use av_clipd() instead of av_clipf()

With floats we cannot represent all 32bit integer dimensions

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/Makefile: Fix aiffdec replaygain dependency
Andreas Rheinhardt [Sat, 12 Oct 2019 04:22:29 +0000 (06:22 +0200)]
avformat/Makefile: Fix aiffdec replaygain dependency

Forgotten in 6390f52a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/mips: Fixed four warnings in vc1dsp
gxw [Sat, 12 Oct 2019 02:48:19 +0000 (10:48 +0800)]
avcodec/mips: Fixed four warnings in vc1dsp

Change the stride argument to ptrdiff_t in the following functions:
ff_put_no_rnd_vc1_chroma_mc8_mmi, ff_put_no_rnd_vc1_chroma_mc4_mmi,
ff_avg_no_rnd_vc1_chroma_mc8_mmi, ff_avg_no_rnd_vc1_chroma_mc4_mmi.

Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/wmaprodec: Check that the streams channels do not exceed the overall channels
Michael Niedermayer [Sat, 12 Oct 2019 16:32:08 +0000 (18:32 +0200)]
avcodec/wmaprodec: Check that the streams channels do not exceed the overall channels

Fixes: NULL pointer dereference
Fixes: 18075/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5708262036471808
Fixes: 18087/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5740627634946048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/vf_libvmaf: fix filtering of >8 bit data
Paul B Mahol [Sat, 12 Oct 2019 19:41:50 +0000 (21:41 +0200)]
avfilter/vf_libvmaf: fix filtering of >8 bit data

This is what reference does.

3 months agoavfilter/vf_lenscorrection: fix division by zero
Paul B Mahol [Sun, 13 Oct 2019 21:28:16 +0000 (23:28 +0200)]
avfilter/vf_lenscorrection: fix division by zero

Fixes #8265

3 months agoavfilter/vf_fieldorder: fix heap-buffer overflow
Paul B Mahol [Sun, 13 Oct 2019 21:10:16 +0000 (23:10 +0200)]
avfilter/vf_fieldorder: fix heap-buffer overflow

Fixes #8264

3 months agoavfilter/vf_convolution: fix undefined behaviour
Paul B Mahol [Sun, 13 Oct 2019 16:37:16 +0000 (18:37 +0200)]
avfilter/vf_convolution: fix undefined behaviour

Fixes #8263

3 months agoavfilter/vf_bm3d: fix possible infinite loop
Paul B Mahol [Sun, 13 Oct 2019 16:16:19 +0000 (18:16 +0200)]
avfilter/vf_bm3d: fix possible infinite loop

3 months agoavfilter/vf_bm3d: fix heap-buffer overflows
Paul B Mahol [Sun, 13 Oct 2019 16:10:38 +0000 (18:10 +0200)]
avfilter/vf_bm3d: fix heap-buffer overflows

Fixes #8262

3 months agoavfilter/vf_edgedetect: check if height is big enough
Paul B Mahol [Sun, 13 Oct 2019 15:23:10 +0000 (17:23 +0200)]
avfilter/vf_edgedetect: check if height is big enough

Fixes #8260

3 months agoavfilter/vf_waveform: fix typos which caused crash
Paul B Mahol [Sun, 13 Oct 2019 09:51:11 +0000 (11:51 +0200)]
avfilter/vf_waveform: fix typos which caused crash

3 months agoavfilter/vf_colorconstancy: fix overreads in gauss array
Paul B Mahol [Sat, 12 Oct 2019 09:07:54 +0000 (11:07 +0200)]
avfilter/vf_colorconstancy: fix overreads in gauss array

Fixes #8250

3 months agoavfilter/vf_waveform: add yflat filter
Paul B Mahol [Sat, 12 Oct 2019 16:46:13 +0000 (18:46 +0200)]
avfilter/vf_waveform: add yflat filter

3 months agoavfilter/vf_waveform: allow different cb for new modes
Paul B Mahol [Sat, 12 Oct 2019 15:57:23 +0000 (17:57 +0200)]
avfilter/vf_waveform: allow different cb for new modes

3 months agoavfilter/vf_waveform: add invert graticule
Paul B Mahol [Sat, 12 Oct 2019 15:42:21 +0000 (17:42 +0200)]
avfilter/vf_waveform: add invert graticule

3 months agoavfilter/vf_waveform: add graticule enum
Paul B Mahol [Sat, 12 Oct 2019 14:02:34 +0000 (16:02 +0200)]
avfilter/vf_waveform: add graticule enum

3 months agoavformat/mov: parse sdtp atom and set the pkt disposable flag accordingly
Matthieu Bouron [Fri, 27 Sep 2019 12:57:09 +0000 (14:57 +0200)]
avformat/mov: parse sdtp atom and set the pkt disposable flag accordingly

Allows the creation of the sdtp atom while remuxing MP4 to MP4. This
atom is required by Apple devices (iPhone, Apple TV) in order to accept
2160p medias.

3 months agoavcodec/zmbvenc: Correct offset in buffer
Andreas Rheinhardt [Thu, 10 Oct 2019 09:47:41 +0000 (11:47 +0200)]
avcodec/zmbvenc: Correct offset in buffer

zmbvenc allocates a buffer for a picture with padding on all four sides:
The stride is choosen so large that it already contains padding on the
right; the height also includes padding rows. The padding on the right
of each row is also reused as padding for the left of the next row. So
one still needs to add padding on the left for the first row. This is done
by offsetting the actual pointer used to access the picture from the
pointer returned by av_mallocz and the formula for this offset was
wrong, because it ignored that a pixel can take more than one byte when
calculating the offset resulting from the left padding of the first row.

This fixes accesses outside of the allocated buffer that were reported
in tickets #7980 and #7994. No writes were ever attempted outside of
the buffer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agofftools/ffmpeg: Improve streamcopy
Andreas Rheinhardt [Fri, 11 Oct 2019 04:06:58 +0000 (06:06 +0200)]
fftools/ffmpeg: Improve streamcopy

do_streamcopy() has a packet that gets zero-initialized first, then gets
initialized via av_init_packet() after which some of its fields are
oerwritten again with the actually desired values (unless it's EOF): The
side data is copied into the packet with av_copy_packet_side_data() and
if the source packet is refcounted, the packet will get a new reference
to the source packet's data. Furthermore, the flags are copied and the
timestamp related fields are overwritten with new values.

This commit replaces this by using av_packet_ref() to both initialize
the packet as well as populate its fields with the right values (unless
it's EOF again in which case the packet will still be initialized). The
differences to the current approach are as follows:
a) There is no call to a deprecated function (av_copy_packet_side_data())
any more.
b) Several fields that weren't copied before are now copied from the source
packet to the new packet (e.g. pos). Some of them (the timestamp related
fields) may be immediately overwritten again and some don't seem to be
used at all (e.g. pos), but in return using av_packet_ref() allows to forgo
the initializations.
c) There was no check for whether copying side data fails or not. This
has been changed: Now the program is exited in this case.

Using av_packet_ref() does not lead to unnecessary copying of data,
because the source packets are already always refcounted (they originate
from av_read_frame()).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/qdmc: Check input space in qdmc_get_vlc()
Michael Niedermayer [Thu, 10 Oct 2019 16:26:44 +0000 (18:26 +0200)]
avcodec/qdmc: Check input space in qdmc_get_vlc()

Fixes: Timeout (125sec -> 0.4sec)
Fixes: 18059/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QDMC_fuzzer-5656195825664000

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mpjpegdec: ensure seekback for latest chunk
Moritz Barsnick [Sun, 6 Oct 2019 22:19:30 +0000 (00:19 +0200)]
avformat/mpjpegdec: ensure seekback for latest chunk

Not only the first, but each latest chunk must be cached to allow
seekback after finding the mime boundary.

Fixes trac #5023 and #5921.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mpjpegdec: fix strict boundary search string
Moritz Barsnick [Sun, 6 Oct 2019 22:19:29 +0000 (00:19 +0200)]
avformat/mpjpegdec: fix strict boundary search string

According to RFC1341, the multipart boundary indicated by the
Content-Type header must be prepended by CRLF + "--", and followed
by CRLF. In the case of strict MIME header boundary handling, the
"--" was forgotten to add.

Fixes trac #7921.

A side effect is that this coincidentally breaks enforcement of
strict MIME headers against servers running motion < 3.4.1, where
the boundary announcement in the HTTP headers incorrectly used the
prefix "--", which exactly matched this bug's behavior.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavformat/mpjpegdec: fix finding multipart boundary parameter
Moritz Barsnick [Sun, 6 Oct 2019 22:19:28 +0000 (00:19 +0200)]
avformat/mpjpegdec: fix finding multipart boundary parameter

The string matching function's return value was evaluated incorrectly.

Fixes trac #7920.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavutil/eval: add sgn()
Paul B Mahol [Fri, 11 Oct 2019 19:44:09 +0000 (21:44 +0200)]
avutil/eval: add sgn()

3 months agoavformat/dv: free all allocated structs on dv_read_header failure
James Almer [Fri, 11 Oct 2019 17:34:17 +0000 (14:34 -0300)]
avformat/dv: free all allocated structs on dv_read_header failure

Also propagate proper AVERROR codes while at it.

Fixes ticket #8230.

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 months agolibavcodec/amfenc_h264.c: Changed loop filter flag default value.
OvchinnikovDmitrii [Fri, 11 Oct 2019 15:37:13 +0000 (18:37 +0300)]
libavcodec/amfenc_h264.c: Changed loop filter flag default value.

The value has been changed to match the recommended(by AMF Encoder team)

3 months agoavfilter/vf_signalstats: fix stack buffer overflow
Paul B Mahol [Fri, 11 Oct 2019 11:32:24 +0000 (13:32 +0200)]
avfilter/vf_signalstats: fix stack buffer overflow

Fixes #8249

3 months agoavfilter/vf_w3fdif: deny processing small videos
Paul B Mahol [Fri, 11 Oct 2019 10:55:13 +0000 (12:55 +0200)]
avfilter/vf_w3fdif: deny processing small videos

Fixes #8243

3 months agoavfilter/vf_bitplanenoise: fix overreads
Paul B Mahol [Fri, 11 Oct 2019 10:42:13 +0000 (12:42 +0200)]
avfilter/vf_bitplanenoise: fix overreads

Fixes #8244

3 months agoavfilter/vf_deflicker: fix invalid access
Paul B Mahol [Fri, 11 Oct 2019 10:23:26 +0000 (12:23 +0200)]
avfilter/vf_deflicker: fix invalid access

Fixes #8253

3 months agoavfilter/vf_waveform: better guard against picking wrong pixel format
Paul B Mahol [Fri, 11 Oct 2019 10:07:10 +0000 (12:07 +0200)]
avfilter/vf_waveform: better guard against picking wrong pixel format

Fixes #8252

3 months agoavfilter/vf_neighbor: check if width is 1
Paul B Mahol [Fri, 11 Oct 2019 09:18:10 +0000 (11:18 +0200)]
avfilter/vf_neighbor: check if width is 1

Fixes #8242

3 months agoavfilter/vf_floodfill: finish early if source and destination fill matches
Paul B Mahol [Thu, 10 Oct 2019 19:50:03 +0000 (21:50 +0200)]
avfilter/vf_floodfill: finish early if source and destination fill matches

Fixes #8236

3 months agoavfilter/vf_random: fix crash
Paul B Mahol [Thu, 10 Oct 2019 19:04:56 +0000 (21:04 +0200)]
avfilter/vf_random: fix crash

Fixes #8235.

3 months agoavcodec/dstdec: Check for input exhaustion
Michael Niedermayer [Wed, 2 Oct 2019 18:48:40 +0000 (20:48 +0200)]
avcodec/dstdec: Check for input exhaustion

Fixes: Timeout (239sec -> 16sec)
Fixes: 17811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5715508149616640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/wmaprodec: Fix cleanup on error
Michael Niedermayer [Wed, 9 Oct 2019 08:19:42 +0000 (10:19 +0200)]
avcodec/wmaprodec: Fix cleanup on error

Fixes: memleaks
Fixes: 18023/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-5642535011090432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/pcm: Check bits_per_coded_sample
Michael Niedermayer [Sat, 28 Sep 2019 23:22:37 +0000 (01:22 +0200)]
avcodec/pcm: Check bits_per_coded_sample

Fixes: shift exponent -2 is negative
Fixes: 17736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F16LE_fuzzer-5742815929171968
Fixes: 17998/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F24LE_fuzzer-5716980383875072

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/magicyuv: remove duplicate code
Limin Wang [Tue, 24 Sep 2019 01:13:52 +0000 (09:13 +0800)]
avcodec/magicyuv: remove duplicate code

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/scpr: Check minimum size of type 17
Michael Niedermayer [Thu, 26 Sep 2019 19:56:48 +0000 (21:56 +0200)]
avcodec/scpr: Check minimum size of type 17

Improves: Timeout (85sec -> 46sec)
Improves: 17644/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5715704283660288

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/exr: Allow duplicate use of channel indexes
Michael Niedermayer [Thu, 26 Sep 2019 13:40:30 +0000 (15:40 +0200)]
avcodec/exr: Allow duplicate use of channel indexes

Fixes: Ticket #8203

Reported-by: durandal_1707
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavcodec/fitsdec: Fail on 0 naxisn
Michael Niedermayer [Mon, 30 Sep 2019 06:50:41 +0000 (08:50 +0200)]
avcodec/fitsdec: Fail on 0 naxisn

Fixes: Timeout (100+ sec -> 23ms)
Fixes: 17769/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-5678314672357376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 months agoavfilter/vf_delogo: make the interp value compute method simple
Steven Liu [Tue, 8 Oct 2019 03:45:33 +0000 (11:45 +0800)]
avfilter/vf_delogo: make the interp value compute method simple

because the interp >= 0UL comparison of an unsigned value is always true
fix CID: 1454642

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
3 months agoavfilter/vf_delogo: add auto set the area inside of the frame
Steven Liu [Wed, 4 Sep 2019 15:53:05 +0000 (23:53 +0800)]
avfilter/vf_delogo: add auto set the area inside of the frame

when the area outside of the frame, then use expr should
give user warning message and auto set to the area inside of the frame.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
3 months agoavformat/iff: fix memleak when get st->codecpar->extradata failed in iff_read_header
Steven Liu [Wed, 9 Oct 2019 03:50:49 +0000 (11:50 +0800)]
avformat/iff: fix memleak when get st->codecpar->extradata failed in iff_read_header

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
3 months agoavformat/jvdec: fix memleak when read_header failed
Steven Liu [Wed, 9 Oct 2019 03:56:22 +0000 (11:56 +0800)]
avformat/jvdec: fix memleak when read_header failed

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
3 months agolavfi/hqdn3d: add slice thread optimization
Jun Zhao [Wed, 2 Oct 2019 02:31:13 +0000 (10:31 +0800)]
lavfi/hqdn3d: add slice thread optimization

Enabled one thread per plane, used the test command for 1080P video
(YUV420P format) as follow:

ffmpeg -i 1080p.mp4 -an -vf hqdn3d -f null /dev/nul

This optimization improved the performance about 30% in 1080P YUV420P
case (from 110fps to 143fps), also pass the framemd5 check and FATE.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 months agolavfi/v360: remove unnecessary cast for void *
Jun Zhao [Wed, 9 Oct 2019 14:14:49 +0000 (22:14 +0800)]
lavfi/v360: remove unnecessary cast for void *

Remove unnecessary cast for void * pointer.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 months agolavfi/remap: remove unnecessary cast for void *
Jun Zhao [Wed, 9 Oct 2019 14:14:00 +0000 (22:14 +0800)]
lavfi/remap: remove unnecessary cast for void *

Remove unnecessary cast for void * pointer.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 months agolavfi/lenscorrection: remove unnecessary cast for void *
Jun Zhao [Wed, 9 Oct 2019 11:24:33 +0000 (19:24 +0800)]
lavfi/lenscorrection: remove unnecessary cast for void *

Remove unnecessary cast for void * pointer.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 months agolavfi/colorspace: typedef ThreadData as all other filters
Jun Zhao [Wed, 9 Oct 2019 11:21:46 +0000 (19:21 +0800)]
lavfi/colorspace: typedef ThreadData as all other filters

typedef ThreadData as all other filters.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 months agodoc/filters: add more examples for afftfilt
Paul B Mahol [Wed, 9 Oct 2019 17:03:45 +0000 (19:03 +0200)]
doc/filters: add more examples for afftfilt

3 months agoavfilter/af_anlms: increase max limit for mu
Paul B Mahol [Wed, 9 Oct 2019 16:13:55 +0000 (18:13 +0200)]
avfilter/af_anlms: increase max limit for mu

3 months agoavfilter/af_adelay: fix buggy behaviour
Paul B Mahol [Wed, 9 Oct 2019 07:56:33 +0000 (09:56 +0200)]
avfilter/af_adelay: fix buggy behaviour