]> git.sesse.net Git - ffmpeg/log
ffmpeg
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>
4 years agoavcodec/ralf: Skip initializing unused filter variables
Michael Niedermayer [Sat, 5 Oct 2019 17:34:17 +0000 (19:34 +0200)]
avcodec/ralf: Skip initializing unused filter variables

Fixes: left shift of negative value -1
Fixes: 17890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5643307467669504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/takdec: Fix overflow with large sample rates
Michael Niedermayer [Sat, 5 Oct 2019 17:52:53 +0000 (19:52 +0200)]
avcodec/takdec: Fix overflow with large sample rates

Fixes: signed integer overflow: 2147483647 + 511 cannot be represented in type 'int'
Fixes: 17899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5719753322135552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agodoc/filters: fix another typo
Paul B Mahol [Thu, 24 Oct 2019 19:42:00 +0000 (21:42 +0200)]
doc/filters: fix another typo

4 years agoavcodec/interplayvideo: cosmetics
Paul B Mahol [Thu, 24 Oct 2019 13:30:08 +0000 (15:30 +0200)]
avcodec/interplayvideo: cosmetics

4 years agoavfilter: add maskedmin/maskedmax filters
Paul B Mahol [Sun, 20 Oct 2019 18:16:18 +0000 (20:16 +0200)]
avfilter: add maskedmin/maskedmax filters

4 years agoavformat/mpeg: Don't free unintialized pointer
Andreas Rheinhardt [Tue, 22 Oct 2019 13:16:41 +0000 (15:16 +0200)]
avformat/mpeg: Don't free unintialized pointer

In order to fix a potential memleak upon failure, 0b8956b2 made sure that
a buffer given by a pointer was freed upon error. But this pointer was
only initialized upon use and in several cases (Clang gives no fewer
than 13 -Wsometimes-uninitialized warnings) this meant that an
uninitialized pointer was used to free a buffer. So initialize the
pointer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agompegvideo_enc: add intra_penalty option for p frames
Ramiro Polla [Wed, 23 Oct 2019 19:12:32 +0000 (21:12 +0200)]
mpegvideo_enc: add intra_penalty option for p frames

This option allows more control over the use of intra macroblocks in
predictive frames.

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

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/icoenc: Add deinit function
Andreas Rheinhardt [Wed, 23 Oct 2019 12:59:44 +0000 (14:59 +0200)]
avformat/icoenc: Add deinit function

Prevents memleaks in situations where the trailer isn't written, e.g.
because of errors during writing the header.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/aiffenc: Use better error codes
Andreas Rheinhardt [Wed, 23 Oct 2019 12:59:40 +0000 (14:59 +0200)]
avformat/aiffenc: Use better error codes

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mpeg: Add padding to extradata
Andreas Rheinhardt [Tue, 22 Oct 2019 13:16:42 +0000 (15:16 +0200)]
avformat/mpeg: Add padding to extradata

Extradata is supposed to be padded with AV_INPUT_BUFFER_PADDING_SIZE bytes,
yet the VobSub demuxer used av_strdup for the allocation of extradata.
This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_maskedclamp: add x86 SIMD
Paul B Mahol [Tue, 22 Oct 2019 16:57:14 +0000 (18:57 +0200)]
avfilter/vf_maskedclamp: add x86 SIMD

4 years agoFATE/dnn: add .gitignore
Zhao Zhili [Tue, 15 Oct 2019 16:21:10 +0000 (00:21 +0800)]
FATE/dnn: add .gitignore

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
4 years agoavcodec/tests: add h265_levels to .gitignore
Zhao Zhili [Tue, 15 Oct 2019 16:21:09 +0000 (00:21 +0800)]
avcodec/tests: add h265_levels to .gitignore

4 years agoavfilter/settb: switch to activate
Paul B Mahol [Sat, 19 Oct 2019 15:01:38 +0000 (17:01 +0200)]
avfilter/settb: switch to activate

Now correctly updates EOF timestamp.

4 years agoavfilter/vf_floodfill: better fix for crash
Paul B Mahol [Wed, 23 Oct 2019 08:17:46 +0000 (10:17 +0200)]
avfilter/vf_floodfill: better fix for crash

4 years agoavfilter/vf_floodfill: add more gray formats
Paul B Mahol [Wed, 23 Oct 2019 08:04:15 +0000 (10:04 +0200)]
avfilter/vf_floodfill: add more gray formats

4 years agoavfilter/vf_deband: add more gray formats
Paul B Mahol [Wed, 23 Oct 2019 07:53:23 +0000 (09:53 +0200)]
avfilter/vf_deband: add more gray formats

4 years agolavfi/bilateral: Clean the option description and unused code
Jun Zhao [Wed, 23 Oct 2019 03:25:40 +0000 (11:25 +0800)]
lavfi/bilateral: Clean the option description and unused code

Clean the option description and unused code.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
4 years agoavfilter/vf_lut2: fix typo, correctly support gray14
Paul B Mahol [Wed, 23 Oct 2019 07:44:08 +0000 (09:44 +0200)]
avfilter/vf_lut2: fix typo, correctly support gray14

4 years agoavfilter/vf_bm3d: add gray14 format
Paul B Mahol [Wed, 23 Oct 2019 07:37:18 +0000 (09:37 +0200)]
avfilter/vf_bm3d: add gray14 format

4 years agoavfilter/vf_vaguedenoiser: add more gray formats
Paul B Mahol [Wed, 23 Oct 2019 07:31:09 +0000 (09:31 +0200)]
avfilter/vf_vaguedenoiser: add more gray formats

4 years agoavfilter/transpose: add missing headers
Paul B Mahol [Tue, 22 Oct 2019 17:53:50 +0000 (19:53 +0200)]
avfilter/transpose: add missing headers

4 years agox86/vf_transpose: make ff_transpose_8x8_16_sse2 work on x86_32
James Almer [Mon, 21 Oct 2019 20:06:18 +0000 (17:06 -0300)]
x86/vf_transpose: make ff_transpose_8x8_16_sse2 work on x86_32

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_maskedclamp: rewrite using macro
Paul B Mahol [Tue, 22 Oct 2019 16:10:03 +0000 (18:10 +0200)]
avfilter/vf_maskedclamp: rewrite using macro

4 years agoavcodec/libdav1d: fix setting AVFrame reordered_opaque
James Almer [Thu, 17 Oct 2019 23:18:47 +0000 (20:18 -0300)]
avcodec/libdav1d: fix setting AVFrame reordered_opaque

Actually reorder the values.

Should effectively fix ticket #8300.

Tested-by: Andrey Semashev <andrey.semashev@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/atrac9tab: use explicit ATRAC9BlockConfig struct initializers
James Almer [Tue, 22 Oct 2019 13:01:13 +0000 (10:01 -0300)]
avcodec/atrac9tab: use explicit ATRAC9BlockConfig struct initializers

Cosmetic change.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_premultiply: fix signed integer overflow
Paul B Mahol [Tue, 22 Oct 2019 08:38:16 +0000 (10:38 +0200)]
avfilter/vf_premultiply: fix signed integer overflow

Fixes #8324

4 years agoavformat/mpeg: move the header_str free into end label
Steven Liu [Tue, 22 Oct 2019 02:54:36 +0000 (10:54 +0800)]
avformat/mpeg: move the header_str free into end label

fix CID: 1454875

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavcodec/psd: remove unneeded code
Steven Liu [Thu, 10 Oct 2019 07:24:07 +0000 (15:24 +0800)]
avcodec/psd: remove unneeded code

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavcodec/hevcdec: remove unneeded code
Steven Liu [Thu, 10 Oct 2019 07:23:42 +0000 (15:23 +0800)]
avcodec/hevcdec: remove unneeded code

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/segafilmenc: remove unneeded code
Steven Liu [Thu, 10 Oct 2019 07:10:48 +0000 (15:10 +0800)]
avformat/segafilmenc: remove unneeded code

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
4 years agoavformat/matroskaenc: Cosmetics
Andreas Rheinhardt [Tue, 15 Oct 2019 11:17:34 +0000 (13:17 +0200)]
avformat/matroskaenc: Cosmetics

Contains renaming of variables (e.g. mkv_write_cues() contained
variables called tracknum that actually contain the index of a track in
s->streams and not the track number (which can differ in case an
explicit dash track number is set)).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/matroskaenc: Use more appropriate function name
Andreas Rheinhardt [Tue, 15 Oct 2019 11:17:33 +0000 (13:17 +0200)]
avformat/matroskaenc: Use more appropriate function name

mkv_start_new_cluster() actually didn't start a new cluster, but ended
the old one instead and emitted a debug message that it had started a
new cluster. This has been changed: The debug message has been moved to
the place that really starts a new cluster and the function has been
renamed to mkv_end_cluster().

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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/matroskaenc: Remove redundant assert
Andreas Rheinhardt [Tue, 15 Oct 2019 11:17:32 +0000 (13:17 +0200)]
avformat/matroskaenc: Remove redundant assert

The Matroska muxer groups index entries with the same pts together in
order to save a few bytes. Because of Matroska's variable-length length
fields, mkv_write_cues() does this by first finding out how many index
entries will be grouped together before actually writing them.
Currently, it is asserted at both of these stages that the stream index
of the list of designated index entries is valid. But the second assert
is redundant, because the very same index entries have already been
checked.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/matroskaenc: Move track-related fields to mkv_track
Andreas Rheinhardt [Wed, 16 Oct 2019 02:00:56 +0000 (04:00 +0200)]
avformat/matroskaenc: Move track-related fields to mkv_track

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/matroskaenc: Use ffio_free_dyn_buf
Andreas Rheinhardt [Wed, 16 Oct 2019 01:57:09 +0000 (03:57 +0200)]
avformat/matroskaenc: Use ffio_free_dyn_buf

instead of replicating its behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/matroskaenc: Fix memleak upon failure
Andreas Rheinhardt [Wed, 16 Oct 2019 01:57:08 +0000 (03:57 +0200)]
avformat/matroskaenc: Fix memleak upon failure

The Matroska muxer up until now leaked memory in two scenarios:

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

This has been fixed by using a dedicated deinit function.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vsrc_mptestsrc: simplify the code and change the type of frame
Limin Wang [Mon, 21 Oct 2019 10:12:12 +0000 (18:12 +0800)]
avfilter/vsrc_mptestsrc: simplify the code and change the type of frame

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/atrac9dec: Set channels
Michael Niedermayer [Sun, 20 Oct 2019 22:22:46 +0000 (00:22 +0200)]
avcodec/atrac9dec: Set channels

Fixes: null pointer dereference
Fixes: 18341/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5681203490848768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vsrc_mptestsrc: add options to set the maximum number of frames
Limin Wang [Mon, 21 Oct 2019 10:12:11 +0000 (18:12 +0800)]
avfilter/vsrc_mptestsrc: add options to set the maximum number of frames

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_unsharp: rename config_props -> config_input, link -> inlink
Limin Wang [Mon, 14 Oct 2019 10:27:04 +0000 (18:27 +0800)]
avfilter/vf_unsharp: rename config_props -> config_input, link -> inlink

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/oggenc: free buffered page lists while uninitializing the muxer
James Almer [Mon, 21 Oct 2019 02:38:05 +0000 (23:38 -0300)]
avformat/oggenc: free buffered page lists while uninitializing the muxer

If the trailer is never writen, there could be buffered pages that would leak.

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/flacenc: add a deinit function
James Almer [Mon, 21 Oct 2019 02:44:05 +0000 (23:44 -0300)]
avformat/flacenc: add a deinit function

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/mp3enc: add init and deinit functions
James Almer [Mon, 21 Oct 2019 02:25:53 +0000 (23:25 -0300)]
avformat/mp3enc: add init and deinit functions

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/ttaenc: add a deinit function
James Almer [Mon, 21 Oct 2019 02:24:54 +0000 (23:24 -0300)]
avformat/ttaenc: add a deinit function

Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/avienc: add deinit function
James Almer [Sat, 19 Oct 2019 02:47:44 +0000 (23:47 -0300)]
avformat/avienc: add deinit function

Fixes ticket #8302

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: call AVOutputFormat->deinit() when freeing the context
James Almer [Sat, 19 Oct 2019 02:23:32 +0000 (23:23 -0300)]
avformat: call AVOutputFormat->deinit() when freeing the context

Despite the doxy stating that it's called when the muxer is destroyed,
this was not true in practice. It's only called by av_write_trailer()
and on init() failure.

An AVFormatContext may be closed without writing the trailer if errors
ocurred while muxing packets, so in order to prevent memory leaks, it
should effectively be called when freeing the muxer.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agox86/vf_transpose: fix cpuflags check
James Almer [Mon, 21 Oct 2019 20:01:39 +0000 (17:01 -0300)]
x86/vf_transpose: fix cpuflags check

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavfilter/vf_transpose: add x86 SIMD
Paul B Mahol [Mon, 21 Oct 2019 14:43:26 +0000 (16:43 +0200)]
avfilter/vf_transpose: add x86 SIMD

4 years agoavfilter/x86/vf_atadenoise: fix comment
Paul B Mahol [Mon, 21 Oct 2019 15:56:45 +0000 (17:56 +0200)]
avfilter/x86/vf_atadenoise: fix comment