ffmpeg.git
16 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>
16 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>
16 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.

16 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>
16 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

16 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

16 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

16 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

16 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

16 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()

16 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()

16 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()

16 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()

16 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

16 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

16 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

16 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()

16 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()

16 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()

16 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()

16 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

16 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

16 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()

16 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

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

16 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

16 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

16 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.

16 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.

16 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>
16 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>
16 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>
16 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>
16 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.

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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.

16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 months agoavutil/eval: add sgn()
Paul B Mahol [Fri, 11 Oct 2019 19:44:09 +0000 (21:44 +0200)]
avutil/eval: add sgn()

16 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>
16 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)

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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.

16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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

16 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

16 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

16 months agodoc/filters: document atempo command
Paul B Mahol [Wed, 9 Oct 2019 07:33:16 +0000 (09:33 +0200)]
doc/filters: document atempo command

16 months agodoc/filters: mention rubberband supported commands
Paul B Mahol [Wed, 9 Oct 2019 07:30:25 +0000 (09:30 +0200)]
doc/filters: mention rubberband supported commands

16 months agolavc/qsvdec: Add GPU-accelerated memory copy support
Linjie Fu [Tue, 8 Oct 2019 13:41:02 +0000 (21:41 +0800)]
lavc/qsvdec: Add GPU-accelerated memory copy support

GPU copy enables or disables GPU accelerated copying between video
and system memory. This may lead to a notable performance improvement.
Memory must be sequent and aligned with 128x64.

CMD:
ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -c:v h264_qsv
                    -gpu_copy on -i input.h264 -f null -
or:
ffmpeg -c:v h264_qsv -gpu_copy on -i input.h264 -f null -

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: ChaoX A Liu <chaox.a.liu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
16 months agolavc/qsv: remove vaapi device free function
Zhong Li [Tue, 8 Oct 2019 04:55:01 +0000 (12:55 +0800)]
lavc/qsv: remove vaapi device free function

It is not needed since av_buffer_unref() will call it internally

Signed-off-by: Zhong Li <zhong.li@intel.com>
16 months agoavformat/ivfdec: Change the length field to 32 bits
Raphaël Zumer [Tue, 1 Oct 2019 17:40:54 +0000 (13:40 -0400)]
avformat/ivfdec: Change the length field to 32 bits

Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
16 months agoavformat/ivfenc: Change the length fields to 32 bits
Raphaël Zumer [Wed, 2 Oct 2019 13:04:59 +0000 (09:04 -0400)]
avformat/ivfenc: Change the length fields to 32 bits

There is no change in the encoded bitstream, but this
ensures that the written field length is consistent
with the reference implementation.

Unused bytes are zeroed out for backwards compatibility.

Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
16 months agoavformat/ivfenc: Comment the length field encoding process
Raphaël Zumer [Tue, 1 Oct 2019 17:40:55 +0000 (13:40 -0400)]
avformat/ivfenc: Comment the length field encoding process

Signed-off-by: Raphaël Zumer <rzumer@tebako.net>
16 months agoavfilter/formats: remove unnecessary unreference
Zhao Zhili [Mon, 30 Sep 2019 08:00:34 +0000 (16:00 +0800)]
avfilter/formats: remove unnecessary unreference

16 months agoavcodec/dxv: Subtract 12 earlier in dxv_decompress_cocg()
Michael Niedermayer [Tue, 24 Sep 2019 10:40:35 +0000 (12:40 +0200)]
avcodec/dxv: Subtract 12 earlier in dxv_decompress_cocg()

the data_start is after reading 12 bytes and if its subtracted
at the very end the intermediate might overflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agolibavcodec/dxv: Remove redundant seek
Michael Niedermayer [Tue, 24 Sep 2019 10:39:25 +0000 (12:39 +0200)]
libavcodec/dxv: Remove redundant seek

This seeks to the position the previous call to dxv_decompress_opcodes()
positioned us in case of success

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agoavcodec/ituh263dec: Check input for minimal frame size
Michael Niedermayer [Mon, 23 Sep 2019 22:42:04 +0000 (00:42 +0200)]
avcodec/ituh263dec: Check input for minimal frame size

Fixes: Timeout (28sec -> 3sec)
Fixes: 17559/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H263_fuzzer-5681050776240128

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agoavcodec/truemotion1: Check that the input has enough space for a minimal index_stream
Michael Niedermayer [Mon, 23 Sep 2019 23:43:35 +0000 (01:43 +0200)]
avcodec/truemotion1: Check that the input has enough space for a minimal index_stream

Fixes: Timeout (18sec -> 0.4sec)
Fixes: 17585/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION1_fuzzer-5117015135617024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agoavformat/mpsubdec: Clear queue on error
Michael Niedermayer [Sat, 21 Sep 2019 11:43:19 +0000 (13:43 +0200)]
avformat/mpsubdec: Clear queue on error

Fixes: Memleaks
Fixes: 17219/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5720539124989952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agoavcodec/sunrast: Check that the input is large enough for the maximally compressed...
Michael Niedermayer [Sat, 21 Sep 2019 16:14:03 +0000 (18:14 +0200)]
avcodec/sunrast: Check that the input is large enough for the maximally compressed image

Fixes: Timeout (17sec -> 15ms)
Fixes: 17224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SUNRAST_fuzzer-5663218491457536
Fixes: 17224/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SUNRAST_fuzzer-5735590015795200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agoavcodec/sunrast: Check for availability of maplength before allocating image
Michael Niedermayer [Sat, 21 Sep 2019 16:10:25 +0000 (18:10 +0200)]
avcodec/sunrast: Check for availability of maplength before allocating image

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agoavcodec/jpeglsdec: Apply transform only to initialized lines
Michael Niedermayer [Thu, 19 Sep 2019 16:52:50 +0000 (18:52 +0200)]
avcodec/jpeglsdec: Apply transform only to initialized lines

Fixes: Timeout (110sec -> 1sec)
Fixes: 17123/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMV_fuzzer-5636452758585344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
16 months agoavcodec/jpeglsdec: Return error codes from ls_decode_line()
Michael Niedermayer [Thu, 19 Sep 2019 16:51:29 +0000 (18:51 +0200)]
avcodec/jpeglsdec: Return error codes from ls_decode_line()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>