]> git.sesse.net Git - ffmpeg/log
ffmpeg
4 years agodoc/bitstream_filters: Fix copy an paste typo
Limin Wang [Mon, 4 Nov 2019 11:09:59 +0000 (19:09 +0800)]
doc/bitstream_filters: Fix copy an paste typo

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoconfigure: select bswapdsp for ylc decoder
Lou Logan [Mon, 4 Nov 2019 23:25:31 +0000 (14:25 -0900)]
configure: select bswapdsp for ylc decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoconfigure: select fft for qdmc decoder
Lou Logan [Mon, 4 Nov 2019 23:23:41 +0000 (14:23 -0900)]
configure: select fft for qdmc decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoconfigure: select bswapdsp for mdec decoder
Lou Logan [Mon, 4 Nov 2019 23:20:10 +0000 (14:20 -0900)]
configure: select bswapdsp for mdec decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoconfigure: select bswapdsp for imm4 decoder
Lou Logan [Mon, 4 Nov 2019 23:14:41 +0000 (14:14 -0900)]
configure: select bswapdsp for imm4 decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoavcodec/Makefile: add missing ass dependency to ccaption decoder
Lou Logan [Mon, 4 Nov 2019 23:12:24 +0000 (14:12 -0900)]
avcodec/Makefile: add missing ass dependency to ccaption decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoconfigure: select audiodsp for acelp_kelvin decoder
Lou Logan [Mon, 4 Nov 2019 23:10:11 +0000 (14:10 -0900)]
configure: select audiodsp for acelp_kelvin decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoconfigure: select mdct for atrac3al decoder
Lou Logan [Mon, 4 Nov 2019 23:06:22 +0000 (14:06 -0900)]
configure: select mdct for atrac3al decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoconfigure: select mdct & sinewin for atrac3pal decoder
Lou Logan [Mon, 4 Nov 2019 23:01:45 +0000 (14:01 -0900)]
configure: select mdct & sinewin for atrac3pal decoder

Signed-off-by: Lou Logan <lou@lrcd.com>
4 years agoavformat/Makefile: add missing pcm dependency to sdx demuxer
Lou Logan [Fri, 1 Nov 2019 22:18:35 +0000 (14:18 -0800)]
avformat/Makefile: add missing pcm dependency to sdx demuxer

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
4 years agoavformat/Makefile: add missing pcm dependency to nsp demuxer
Lou Logan [Fri, 1 Nov 2019 22:14:44 +0000 (14:14 -0800)]
avformat/Makefile: add missing pcm dependency to nsp demuxer

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
4 years agoavformat/Makefile: add missing pcm dependency to hcom demuxer
Lou Logan [Fri, 1 Nov 2019 21:57:38 +0000 (13:57 -0800)]
avformat/Makefile: add missing pcm dependency to hcom demuxer

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
4 years agoconfigure: select riffdec for act demuxer
Lou Logan [Fri, 1 Nov 2019 21:50:33 +0000 (13:50 -0800)]
configure: select riffdec for act demuxer

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
4 years agoconfigure: select jpegtables for rtp muxer
Lou Logan [Fri, 1 Nov 2019 21:35:53 +0000 (13:35 -0800)]
configure: select jpegtables for rtp muxer

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
4 years agotools/enum_options: replace the deprecated API
Zhong Li [Sat, 2 Nov 2019 15:47:01 +0000 (23:47 +0800)]
tools/enum_options: replace the deprecated API

Signed-off-by: Zhong Li <zhongli_dev@126.com>
4 years agotools/probetest: replace the deprecated API
Zhong Li [Sat, 2 Nov 2019 15:47:00 +0000 (23:47 +0800)]
tools/probetest: replace the deprecated API

Signed-off-by: Zhong Li <zhongli_dev@126.com>
4 years agolavc/qsvenc: add the missing vp9 file
zhongli_dev@126.com [Mon, 4 Nov 2019 07:11:38 +0000 (07:11 +0000)]
lavc/qsvenc: add the missing vp9 file

It is missed in commit 3358380

Signed-off-by: Zhong Li <zhongli_dev@126.com>
4 years agolavf/asfdec: Simplify the check conditions
Jun Zhao [Sat, 15 Jun 2019 08:21:56 +0000 (16:21 +0800)]
lavf/asfdec: Simplify the check conditions

Simplify the check conditions

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agolavf/mpegtsenc: fix logic check error
Jun Zhao [Sat, 15 Jun 2019 08:19:18 +0000 (16:19 +0800)]
lavf/mpegtsenc: fix logic check error

fix the logic check error

fix #6751

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agoavformat/ftp: add AVOptions for authentication
Nicolas Frattaroli [Sat, 26 Oct 2019 22:37:32 +0000 (00:37 +0200)]
avformat/ftp: add AVOptions for authentication

This introduces two new AVOption options for the FTP protocol,
one named ftp-user to supply the username to be used for auth,
one named ftp-password to supply the password to be used for auth.

These are useful for when an API user does not wish to deal with
URL manipulation and percent encoding.

Setting them while also having credentials in the URL will use the
credentials from the URL. The rationale for this is that credentials
embedded in the URL are probably more specific to what the user is
trying to do than anything set by some API user.

Signed-off-by: Nicolas Frattaroli <ffmpeg@fratti.ch>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavformat: Add max_probe_packets option
Andriy Gelman [Thu, 17 Oct 2019 14:49:20 +0000 (10:49 -0400)]
avformat: Add max_probe_packets option

Allows user to set maximum number of buffered packets when
probing a codec. It was a hard-coded parameter before this commit.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolavc/qsvenc: enable vp9 encoder
Zhong Li [Sat, 26 Oct 2019 14:18:31 +0000 (22:18 +0800)]
lavc/qsvenc: enable vp9 encoder

1. must enable low_power mode since just VDENC can be supported by iHD
driver right now
2. Coding option1 and extra_data are not supported by MSDK
3. IVF header will be inserted in MSDK by default, but it is not needed
for FFmpeg, so disable it.

Signed-off-by: Zhong Li <zhongli_dev@126.com>
4 years agolavc/qsvenc: Fix bitrate_limit to allow AVC encode in limited bitrate
Linjie Fu [Tue, 15 Oct 2019 07:56:23 +0000 (15:56 +0800)]
lavc/qsvenc: Fix bitrate_limit to allow AVC encode in limited bitrate

MFXVideoENCODE_Query calls CheckVideoParamQueryLike in MSDK and
will determine whether to set param.mfx.TargetKbps to the allowed
minTargetKbps according to the bitrate_limit in extco2 buffer.

Thus q->param.ExtParam must be set before MFXVideoENCODE_Query in case
minTargetKbps is written to TargetKbps by default.

1080P AVC encoding with option "-bitrate_limit 0 -b:v 100k":
Before patch:
            902 kbps
After patch:
            156 kbps
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
4 years agoavcodec/v4l2_m2m: Fix indentation
Andriy Gelman [Sun, 27 Oct 2019 04:19:47 +0000 (00:19 -0400)]
avcodec/v4l2_m2m: Fix indentation

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agoavcodec/v4l2_buffers: Fix infinite loop
Andriy Gelman [Sun, 27 Oct 2019 04:19:46 +0000 (00:19 -0400)]
avcodec/v4l2_buffers: Fix infinite loop

This part of the code counts the number of planes returned by the v4l2
device for each queried capture/output buffer.
When testing the GPU h264 encoder on Nvidia's Jetson Nano, this caused an
infinite loop because avbuf->buf.length included some empty buffers (i.e.
where avbuf->buf.m.planes[i].length = 0), meaning that the counter was
never incremented and break was never reached.
This is fixed in the commit by using a well defined iteration range.

Signed-off-by: Aman Gupta <aman@tmm1.net>
4 years agotools/target_dec_fuzzer: Adjust threshold for G2M
Michael Niedermayer [Wed, 9 Oct 2019 08:09:22 +0000 (10:09 +0200)]
tools/target_dec_fuzzer: Adjust threshold for G2M

G2M allows large images from small input and also reallocates
multiple buffers on any resolution change.

Fixes: Timeout (22sec -> 5sec)
Fixes: 18022/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5089192530411520
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/aptx: Check the number of channels
Michael Niedermayer [Wed, 9 Oct 2019 07:53:26 +0000 (09:53 +0200)]
avcodec/aptx: Check the number of channels

Fixes: store to null pointer of type 'uint32_t' (aka 'unsigned int')
Fixes: 18021/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APTX_HD_fuzzer-5761738313564160
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/rv10: Check input for minimal frame size
Michael Niedermayer [Wed, 9 Oct 2019 07:08:38 +0000 (09:08 +0200)]
avcodec/rv10: Check input for minimal frame size

Fixes: Timeout (18sec -> 4sec)
Fixes: 18012/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV20_fuzzer-5767486145822720
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/aacdec_template: Check samplerate
Michael Niedermayer [Tue, 8 Oct 2019 20:52:56 +0000 (22:52 +0200)]
avcodec/aacdec_template: Check samplerate

Fixes: signed integer overflow: 2 * 1881153568 cannot be represented in type 'int'
Fixes: 17996/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5687126468853760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/truemotion2: Fix several integer overflows in tm2_low_res_block()
Michael Niedermayer [Sat, 26 Oct 2019 19:39:41 +0000 (21:39 +0200)]
avcodec/truemotion2: Fix several integer overflows in tm2_low_res_block()

Fixes: signed integer overflow: 1077952576 + 1355863565 cannot be represented in type 'int'
Fixes: 16196/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5679842317565952
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/truemotion2: Fix several integer overflows with *Yo, *Uo, *Vo
Michael Niedermayer [Sat, 26 Oct 2019 19:34:44 +0000 (21:34 +0200)]
avcodec/truemotion2: Fix several integer overflows with *Yo, *Uo, *Vo

Fixes: signed integer overflow: 538976288 - -2080374792 cannot be represented in type 'int'
Fixes: 16196/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5144044274974720
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/utils: Check block_align
Michael Niedermayer [Thu, 31 Oct 2019 08:31:22 +0000 (09:31 +0100)]
avcodec/utils: Check block_align

Fixes: out of array access
Fixes: 18432/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV2_fuzzer-5675574936207360
Fixes: 18326/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV2_fuzzer-5071752362721280
Fixes: 18384/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV1_fuzzer-5769439500304384
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>
4 years agoavfilter/vf_lut3d: simplify code
Limin Wang [Wed, 30 Oct 2019 13:20:55 +0000 (21:20 +0800)]
avfilter/vf_lut3d: simplify 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>
4 years agoswscale/swscale_unscaled: fix gbrap10be md5 different on big endian system
Limin Wang [Wed, 30 Oct 2019 13:20:52 +0000 (21:20 +0800)]
swscale/swscale_unscaled: fix gbrap10be md5 different on big endian system

You can reproduce it by below command:
./ffmpeg -f lavfi -i "testsrc=duration=1:rate=30" -vf format=gbrap10 -vcodec rawvideo \
    -pix_fmt gbrap10le -flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact  \
    -frames:v 1 -f nut md5:

little-endian:
f91e2edd8098276579c1929e5e160416
big-endian:
ba4d011dbbdc78ccbf6cc7d698630929

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>
4 years agolibavformat/flacenc: reject too big picture blocks
Mattias Wadman [Wed, 30 Oct 2019 13:01:28 +0000 (14:01 +0100)]
libavformat/flacenc: reject too big picture blocks

A too big picture will case the muxer to write a truncated block size (uint24)
causing the output file to be corrupt.

How to reproduce:

Write a file with truncated block size:
ffmpeg -y -f lavfi -i sine -f lavfi -i color=red:size=2400x2400 -map 0:a:0 -map 1:v:0 -c:v:0 bmp -disposition:1 attached_pic -t 1 test.flac

Try to decode:
ffmpeg -i test.flac test.wav

Signed-off-by: Mattias Wadman <mattias.wadman@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/libtwolame: fix mono default bitrate
James Cowgill [Fri, 1 Nov 2019 08:51:07 +0000 (08:51 +0000)]
avcodec/libtwolame: fix mono default bitrate

As of libtwolame 0.4.0, 384 kbps is not accepted as a valid bitrate
for encoding mono audio and the maximum bitrate is now halved to 192
kbps to comply with the MP2 standard. Example error:

    twolame_init_params(): 384kbps is an invalid bitrate for mono encoding.

Adjust the default bitrate calculation to take this into account.

Signed-off-by: James Cowgill <jcowgill@debian.org>
4 years agodoc/filters: fix overlay_opencl document typo
Steven Liu [Fri, 1 Nov 2019 08:42:36 +0000 (16:42 +0800)]
doc/filters: fix overlay_opencl document typo

Reported-by: Yabo Wei <weiyabo@kuaishou.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavfilter/vf_median: add radiusV option
Paul B Mahol [Wed, 30 Oct 2019 09:14:23 +0000 (10:14 +0100)]
avfilter/vf_median: add radiusV option

4 years agoavfilter/af_afade: start crossfading only when first stream reached end
Paul B Mahol [Thu, 31 Oct 2019 09:22:05 +0000 (10:22 +0100)]
avfilter/af_afade: start crossfading only when first stream reached end

4 years agoavformat/hlsenc: fix the av_dirname path isn't include separator in the end of string
Limin Wang [Wed, 23 Oct 2019 15:55:15 +0000 (23:55 +0800)]
avformat/hlsenc: fix the av_dirname path isn't include separator in the end of string

Reviewed-by: Liu Steven <lq@chinaffmpeg.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
4 years agoconfigure: fix standalone compilation of mxf muxer
Lou Logan [Wed, 30 Oct 2019 00:11:46 +0000 (16:11 -0800)]
configure: fix standalone compilation of mxf muxer

Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agoavformat/apngenc: Add deinit function
Andreas Rheinhardt [Wed, 23 Oct 2019 12:59:41 +0000 (14:59 +0200)]
avformat/apngenc: Add deinit function

Prevents memleaks when the trailer is never written (e.g. when there was
a write error when writing the header).

Fixes ticket #8347.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/af_afade: check for eof after crossfade later
Paul B Mahol [Wed, 30 Oct 2019 18:07:19 +0000 (19:07 +0100)]
avfilter/af_afade: check for eof after crossfade later

Fixes memleaks and #8346

4 years agoavcodec/mips: msa optimizations for vc1dsp
gxw [Mon, 21 Oct 2019 07:56:47 +0000 (15:56 +0800)]
avcodec/mips: msa optimizations for vc1dsp

Performance of WMV3 decoding has speed up from 3.66x to 5.23x tested on 3A4000.

Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/f_sidedata: fix Wtautological-constant-out-of-range-compare
Zhao Zhili [Tue, 15 Oct 2019 17:17:54 +0000 (01:17 +0800)]
avfilter/f_sidedata: fix Wtautological-constant-out-of-range-compare

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoFATE: add a test for freeezedetect
Limin Wang [Mon, 21 Oct 2019 10:12:13 +0000 (18:12 +0800)]
FATE: add a test for freeezedetect

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/filters: move drawgraph to video filters chapter
Paul B Mahol [Wed, 30 Oct 2019 16:55:44 +0000 (17:55 +0100)]
doc/filters: move drawgraph to video filters chapter

4 years agodoc/filters: move agraphmonitor to multimedia filters chapter
Paul B Mahol [Wed, 30 Oct 2019 16:47:05 +0000 (17:47 +0100)]
doc/filters: move agraphmonitor to multimedia filters chapter

4 years agoavfilter/vf_sr: correct flags since the filter changes frame w/h
Guo, Yejun [Mon, 28 Oct 2019 13:11:02 +0000 (21:11 +0800)]
avfilter/vf_sr: correct flags since the filter changes frame w/h

If filter changes frame w/h, AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
cannot be supported.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoavfilter/dnn: add a new interface to query dnn model's input info
Guo, Yejun [Mon, 21 Oct 2019 12:38:17 +0000 (20:38 +0800)]
avfilter/dnn: add a new interface to query dnn model's input info

to support dnn networks more general, we need to know the input info
of the dnn model.

background:
The data type of dnn model's input could be float32, uint8 or fp16, etc.
And the w/h of input image could be fixed or variable.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agoavfilter/dnn: get the data type of network output from dnn execution result
Guo, Yejun [Mon, 21 Oct 2019 12:38:10 +0000 (20:38 +0800)]
avfilter/dnn: get the data type of network output from dnn execution result

so,  we can make a filter more general to accept different network
models, by adding a data type convertion after getting data from network.

After we add dt field into struct DNNData, it becomes the same as
DNNInputData, so merge them with one struct: DNNData.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agodnn: add tf.nn.conv2d support for native model
Guo, Yejun [Mon, 21 Oct 2019 12:38:03 +0000 (20:38 +0800)]
dnn: add tf.nn.conv2d support for native model

Unlike other tf.*.conv2d layers, tf.nn.conv2d does not create many
nodes (within a scope) in the graph, it just acts like other layers.
tf.nn.conv2d only creates one node in the graph, and no internal
nodes such as 'kernel' are created.

The format of native model file is also changed, a flag named
has_bias is added, so change the version number.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
4 years agodoc: fix typo in muxers documentation
Alfred E. Heggestad [Wed, 30 Oct 2019 09:48:44 +0000 (10:48 +0100)]
doc: fix typo in muxers documentation

4 years agoavformat/hls: Set AVFMT_TS_DISCONT flag on HLS input format
Philip Langdale [Sun, 27 Oct 2019 18:39:08 +0000 (11:39 -0700)]
avformat/hls: Set AVFMT_TS_DISCONT flag on HLS input format

There have been many reports over the years about problems when
taking an HLS stream as input to `ffmpeg` where there are timestamp
discontinuities present. This is explicitly supported in the
HLS spec (EXT-X-DISCONTINUITY) and often used for ad injection.

Various fixes and work-arounds have been proposed over the years,
but one step that seems obvious, even if it's not a complete fix,
is to mark the HLS input format as supporting discontinuities. This
will prevent timestamp fixup logic in ffmpeg.c kicking in that ends
up mangling the timestamps unnecessarily.

I've tested this out with an example provided by Joe Koberg early
last year, and it is sufficient to allow `ffmpeg` to download and
mux the stream correctly. Joe had briefly suggested that other
situations can still be handled incorrectly, but this seems like
a strict improvement.

Joe's example:

https://s3.amazonaws.com/playon-test-videos/discont_test_new/discont_test.m3u8

Reviewed-by: Steven Liu <lq@onvideo.cn>
Reviewed-by: Dennis Mungai <dmngaie@gmail.com>
4 years agovp4: prevent unaligned memory access in loop filter
Peter Ross [Thu, 20 Jun 2019 21:52:31 +0000 (07:52 +1000)]
vp4: prevent unaligned memory access in loop filter

VP4 applies a loop filter during motion compensation, causing the block offset
will often by unaligned. This produces a bus error on some platforms, namely
ARMv7 NEON.

This patch adds a unaligned version of the loop filter function pointer
to VP3DSPContext.

Reported-by: Mike Melanson <mike@multimedia.cx>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/wmalosslessdec: Fix some integer anomalies
Michael Niedermayer [Sun, 27 Oct 2019 23:12:59 +0000 (00:12 +0100)]
avcodec/wmalosslessdec: Fix some integer anomalies

Fixes: left shift of negative value -341180
Fixes: 18401/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5686380134400000
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>
4 years agoavcodec/adpcm: Fix invalid shifts in ADPCM DTK
Michael Niedermayer [Sun, 27 Oct 2019 22:38:47 +0000 (23:38 +0100)]
avcodec/adpcm: Fix invalid shifts in ADPCM DTK

Fixes: left shift of negative value -1
Fixes: 18397/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_DTK_fuzzer-5675653487132672
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>
4 years agoavcodec/apedec: Only clear the needed buffer space, instead of all
Michael Niedermayer [Sun, 27 Oct 2019 22:26:52 +0000 (23:26 +0100)]
avcodec/apedec: Only clear the needed buffer space, instead of all

Fixes: Timeout (15sec -> 0.4sec)
Fixes: 18396/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5730080487112704
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>
4 years agoavfilter/asrc_anoisesrc: change color variable to int
Limin Wang [Sat, 26 Oct 2019 13:23:24 +0000 (21:23 +0800)]
avfilter/asrc_anoisesrc: change color variable to int

Or it'll cause invalid color and s->filter is NULL.
Please reproduce it with below command on big endian system:
$ ./ffmpeg -f lavfi -i "anoisesrc=d=60:c=1:r=48000" -f s16le -c:a pcm_s16le  -f
null  -
Segmentation fault (core dumped)

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>
4 years agoavcodec/libvorbisdec: Fix insufficient input checks leading to out of array reads
Michael Niedermayer [Sat, 26 Oct 2019 21:58:02 +0000 (23:58 +0200)]
avcodec/libvorbisdec: Fix insufficient input checks leading to out of array reads

Fixes: 16144/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVORBIS_fuzzer-5638618940440576
Fixes: out of array read
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/g723_1dec: fix invalid shift with negative sid_gain
Michael Niedermayer [Sat, 26 Oct 2019 19:56:03 +0000 (21:56 +0200)]
avcodec/g723_1dec: fix invalid shift with negative sid_gain

Fixes: left shift of negative value -1
Fixes: 18395/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G723_1_fuzzer-5710313034350592
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>
4 years agoavformat/dss: Remove superfluous headers
Andreas Rheinhardt [Sat, 26 Oct 2019 04:59:57 +0000 (06:59 +0200)]
avformat/dss: Remove superfluous headers

Both attributes.h and bswap.h have been included from the very beginning
of this muxer without there being any reason to do so.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/tiff: check the black level denominator
James Almer [Sat, 26 Oct 2019 15:01:16 +0000 (12:01 -0300)]
avcodec/tiff: check the black level denominator

Fixes ticket #8327.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/nvenc: turn feature check failures into warnings
hydra3333 [Sun, 27 Oct 2019 02:30:54 +0000 (19:30 -0700)]
avcodec/nvenc: turn feature check failures into warnings

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agoavfilter/vf_vfrdet: also report average delta
Paul B Mahol [Tue, 29 Oct 2019 12:05:31 +0000 (13:05 +0100)]
avfilter/vf_vfrdet: also report average delta

4 years agoavfilter/vf_vfrdet: fix reporting max delta
Paul B Mahol [Tue, 29 Oct 2019 11:57:58 +0000 (12:57 +0100)]
avfilter/vf_vfrdet: fix reporting max delta

If only first delta was big it was previously discarded.

4 years agoavfilter: add median filter
Paul B Mahol [Tue, 15 Jan 2019 10:32:49 +0000 (11:32 +0100)]
avfilter: add median filter

4 years agoavformat/wc3movie: fix memleak when read content size not equvipe input size
Steven Liu [Thu, 10 Oct 2019 02:07:56 +0000 (10:07 +0800)]
avformat/wc3movie: fix memleak when read content size not equvipe input size

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/swfdec: fix memleak when inflateInit failed
Steven Liu [Thu, 10 Oct 2019 02:07:55 +0000 (10:07 +0800)]
avformat/swfdec: fix memleak when inflateInit failed

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/smacker: fix memleak when avformat_new_stream failed
Steven Liu [Thu, 10 Oct 2019 02:07:54 +0000 (10:07 +0800)]
avformat/smacker: fix memleak when avformat_new_stream failed

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/rtmpproto: fix memleak when open rtmp failed
Steven Liu [Thu, 10 Oct 2019 02:07:53 +0000 (10:07 +0800)]
avformat/rtmpproto: fix memleak when open rtmp failed

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/rl2: fix memleak when read end of file
Steven Liu [Thu, 10 Oct 2019 02:07:52 +0000 (10:07 +0800)]
avformat/rl2: fix memleak when read end of file

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/mpc8: fix memleak when seek table too big
Steven Liu [Thu, 10 Oct 2019 02:07:51 +0000 (10:07 +0800)]
avformat/mpc8: fix memleak when seek table too big

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/libmodplug: fix memleak when load modplug failed
Steven Liu [Thu, 10 Oct 2019 02:07:50 +0000 (10:07 +0800)]
avformat/libmodplug: fix memleak when load modplug failed

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/hlsenc: move freep segment from sls_flags_filename_process after caller...
Steven Liu [Thu, 10 Oct 2019 02:07:49 +0000 (10:07 +0800)]
avformat/hlsenc: move freep segment from sls_flags_filename_process after caller failed

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavcodec/vmdvideo: fix log error message
Paul B Mahol [Sun, 27 Oct 2019 11:12:24 +0000 (12:12 +0100)]
avcodec/vmdvideo: fix log error message

Fixes #8339

4 years agoAdd support for VP9 VDPAU hwaccel decode
ManojGuptaBonda [Fri, 25 Oct 2019 05:30:13 +0000 (11:00 +0530)]
Add support for VP9 VDPAU hwaccel decode

Support for VDPAU accelerated VP9 decoding was added with libvdpau-1.3.
Support for the same in ffmpeg is added with this patch. Profiles
related to VDPAU VP9 can be found in latest vdpau.h present in
libvdpau-1.3. DRC clips are not supported yet due to
http://trac.ffmpeg.org/ticket/8068

Add VP9 VDPAU to list of hwaccels and supported formats
Added file vdpau_vp9.c and Modified configure to add VDPAU VP9 support.
Mapped VP9 profiles to VDPAU VP9 profiles. Populated the codec specific
params that need to be passed to VDPAU.

Signed-off-by: Philip Langdale <philipl@overt.org>
4 years agolavc/qsvdec: remove unused check_dec_param
Linjie Fu [Fri, 18 Oct 2019 08:28:59 +0000 (16:28 +0800)]
lavc/qsvdec: remove unused check_dec_param

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
4 years agoavfilter/avf_showfreqs: free input frame after using it
James Almer [Sat, 26 Oct 2019 04:21:56 +0000 (01:21 -0300)]
avfilter/avf_showfreqs: free input frame after using it

Fixes ticket #8336.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vsrc_testsrc: increase max level of haldclutsrc
Paul B Mahol [Sat, 26 Oct 2019 08:24:03 +0000 (10:24 +0200)]
avfilter/vsrc_testsrc: increase max level of haldclutsrc

So it matches lut3d and haldclut filter.

4 years agoavfilter/vf_lut3d: increase max level to upper limit defined by cube format specification
Paul B Mahol [Fri, 25 Oct 2019 09:26:25 +0000 (11:26 +0200)]
avfilter/vf_lut3d: increase max level to upper limit defined by cube format specification

4 years agoavfilter/vf_lut3d: allocate 3d lut dynamically
Paul B Mahol [Thu, 24 Oct 2019 11:37:38 +0000 (13:37 +0200)]
avfilter/vf_lut3d: allocate 3d lut dynamically

4 years agoavformat/avienc: Remove superfluous header
Andreas Rheinhardt [Fri, 25 Oct 2019 18:07:37 +0000 (20:07 +0200)]
avformat/avienc: Remove superfluous header

04d2540c added intreadwrite.h to avienc.c, although there was (and is)
no need to do so. The inclusion seems to be a mistake as this commit
added a AV_WL32 to avidec.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/avidec: Remove superfluous header
Andreas Rheinhardt [Fri, 25 Oct 2019 18:07:36 +0000 (20:07 +0200)]
avformat/avidec: Remove superfluous header

bswap.h was included since 7b114c09, yet since 3788a3c0 no explicit use
of anything from bswap.h has been made, so remove this header.

(Only AV_RL32 is used and while this might imply swapping on
big-endian systems, it is contained in libavutil/intreadwrite.h.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/asfenc: Remove unnecessary header
Andreas Rheinhardt [Fri, 25 Oct 2019 18:07:33 +0000 (20:07 +0200)]
avformat/asfenc: Remove unnecessary header

libavutil/parseutils.h has been included in 22bbd6e8 for av_parse_time()
and the header has not been removed when said function was replaced by
ff_parse_creation_time_metadata() in ea1bf08a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/aiffenc: Add deinit function
Andreas Rheinhardt [Fri, 25 Oct 2019 01:38:07 +0000 (03:38 +0200)]
avformat/aiffenc: Add deinit function

Prevents memleaks if the trailer is never written.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/filters: add one more example for libvmaf
Paul B Mahol [Fri, 25 Oct 2019 20:58:50 +0000 (22:58 +0200)]
doc/filters: add one more example for libvmaf

4 years agodoc/filters: add one more example for ssim/psnr
Paul B Mahol [Fri, 25 Oct 2019 20:35:02 +0000 (22:35 +0200)]
doc/filters: add one more example for ssim/psnr

4 years agoavfilter/vf_psnr,vf_ssim: add warning if different timebases are encountered
Paul B Mahol [Fri, 25 Oct 2019 20:02:41 +0000 (22:02 +0200)]
avfilter/vf_psnr,vf_ssim: add warning if different timebases are encountered

4 years agoavcodec/interplayvideo: properly decode motion vectors
Paul B Mahol [Fri, 25 Oct 2019 16:18:59 +0000 (18:18 +0200)]
avcodec/interplayvideo: properly decode motion vectors

Fixes #7945

4 years agoavformat/bintext: avoid division by zero
Paul B Mahol [Fri, 25 Oct 2019 10:16:29 +0000 (12:16 +0200)]
avformat/bintext: avoid division by zero

Fixes #8335

4 years agoavformat/tee.c: steal bsf option before passing to fifo muxer
Jun Li [Sun, 13 Oct 2019 21:14:25 +0000 (14:14 -0700)]
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.

4 years agofftools/ffmpeg: Free swresample dictionary during cleanup
Andreas Rheinhardt [Thu, 24 Oct 2019 13:36:35 +0000 (15:36 +0200)]
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>
4 years agoavcodec/vp5: Check render_x/y
Michael Niedermayer [Wed, 23 Oct 2019 18:57:12 +0000 (20:57 +0200)]
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>
4 years agoavcodec/truespeech: Fix integer overflow in truespeech_synth()
Michael Niedermayer [Mon, 7 Oct 2019 16:13:26 +0000 (18:13 +0200)]
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>
4 years agoavcodec/interplayacm: Fix integer overflows in juggle()
Michael Niedermayer [Mon, 7 Oct 2019 16:09:11 +0000 (18:09 +0200)]
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>
4 years agoavcodec/hcom: Check the root entry and the right entries
Michael Niedermayer [Mon, 7 Oct 2019 14:56:11 +0000 (16:56 +0200)]
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>
4 years agoavcodec/qdrw: Check input for header/skiped space before get_buffer()
Michael Niedermayer [Mon, 7 Oct 2019 14:14:32 +0000 (16:14 +0200)]
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>
4 years agotools/target_dec_fuzzer: Adjust threshold for CFHD
Michael Niedermayer [Mon, 7 Oct 2019 13:32:06 +0000 (15:32 +0200)]
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>
4 years agotools/target_dec_fuzzer: Adjust ffwavesynth threshold
Michael Niedermayer [Mon, 7 Oct 2019 12:53:28 +0000 (14:53 +0200)]
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>