Commit Graph

95602 Commits

Author SHA1 Message Date
gxw 648b422e17 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>
2019-10-30 18:09:00 +01:00
Zhao Zhili af70c94c63 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>
2019-10-30 18:09:00 +01:00
Limin Wang 78c0030f34 FATE: add a test for freeezedetect
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-30 18:09:00 +01:00
Paul B Mahol d4ba2506ce doc/filters: move drawgraph to video filters chapter 2019-10-30 17:55:44 +01:00
Paul B Mahol 2539fea777 doc/filters: move agraphmonitor to multimedia filters chapter 2019-10-30 17:47:56 +01:00
Guo, Yejun 912ab246f1 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>
2019-10-30 12:01:52 -03:00
Guo, Yejun f4b3c0e55c 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>
2019-10-30 11:07:06 -03:00
Guo, Yejun e1b45b8596 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>
2019-10-30 11:00:41 -03:00
Guo, Yejun dff39ea9f0 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>
2019-10-30 10:31:55 -03:00
Alfred E. Heggestad a269fa044b doc: fix typo in muxers documentation 2019-10-30 11:10:25 +01:00
Philip Langdale d6ac6650b9 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>
2019-10-30 17:59:02 +08:00
Peter Ross fd17218558 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>
2019-10-30 10:06:38 +01:00
Michael Niedermayer d3dee676b8 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>
2019-10-29 16:20:33 +01:00
Michael Niedermayer 34e701ff93 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>
2019-10-29 16:20:33 +01:00
Michael Niedermayer f17ea02001 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>
2019-10-29 16:20:33 +01:00
Limin Wang e1c4ce4761 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>
2019-10-29 16:20:33 +01:00
Michael Niedermayer 069be4aa5d 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>
2019-10-29 16:20:33 +01:00
Michael Niedermayer 1850c3feaa 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>
2019-10-29 16:20:33 +01:00
Andreas Rheinhardt 8b28aa0767 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>
2019-10-29 16:20:33 +01:00
James Almer dad7592429 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>
2019-10-29 10:23:39 -03:00
hydra3333 ba6b20df3f avcodec/nvenc: turn feature check failures into warnings
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-10-29 13:38:24 +01:00
Paul B Mahol 3420e56d9a avfilter/vf_vfrdet: also report average delta 2019-10-29 13:07:08 +01:00
Paul B Mahol 4ce263a7fd avfilter/vf_vfrdet: fix reporting max delta
If only first delta was big it was previously discarded.
2019-10-29 12:57:58 +01:00
Paul B Mahol 1c3b70e2e0 avfilter: add median filter 2019-10-29 10:56:04 +01:00
Steven Liu 68f623d644 avformat/wc3movie: fix memleak when read content size not equvipe input size
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:22 +08:00
Steven Liu 70c6e84069 avformat/swfdec: fix memleak when inflateInit failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:20 +08:00
Steven Liu a3655a5cb2 avformat/smacker: fix memleak when avformat_new_stream failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:16 +08:00
Steven Liu 991cf95fde avformat/rtmpproto: fix memleak when open rtmp failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:14 +08:00
Steven Liu 59697e42e1 avformat/rl2: fix memleak when read end of file
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:11 +08:00
Steven Liu 7a20008964 avformat/mpc8: fix memleak when seek table too big
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:10 +08:00
Steven Liu 22eae2d0c9 avformat/libmodplug: fix memleak when load modplug failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:07 +08:00
Steven Liu 1a109fba54 avformat/hlsenc: move freep segment from sls_flags_filename_process after caller failed
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-10-28 14:26:04 +08:00
Paul B Mahol ebff4bbd82 avcodec/vmdvideo: fix log error message
Fixes #8339
2019-10-27 12:21:23 +01:00
ManojGuptaBonda 1054752c56 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>
2019-10-26 09:57:01 -07:00
Linjie Fu e1d993d829 lavc/qsvdec: remove unused check_dec_param
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
2019-10-26 21:31:01 +08:00
James Almer 1aa4fc1ec2 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>
2019-10-26 10:16:02 -03:00
Paul B Mahol 4447aeaac2 avfilter/vsrc_testsrc: increase max level of haldclutsrc
So it matches lut3d and haldclut filter.
2019-10-26 10:32:20 +02:00
Paul B Mahol a2210f10d3 avfilter/vf_lut3d: increase max level to upper limit defined by cube format specification 2019-10-26 10:32:20 +02:00
Paul B Mahol 9130028d87 avfilter/vf_lut3d: allocate 3d lut dynamically 2019-10-26 10:32:20 +02:00
Andreas Rheinhardt b78227e168 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>
2019-10-25 23:27:02 +02:00
Andreas Rheinhardt 982539a07a 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>
2019-10-25 23:27:02 +02:00
Andreas Rheinhardt 09e938b3a1 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>
2019-10-25 23:27:02 +02:00
Andreas Rheinhardt 2e37237ff1 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>
2019-10-25 23:27:02 +02:00
Paul B Mahol 296296a4d5 doc/filters: add one more example for libvmaf 2019-10-25 22:58:50 +02:00
Paul B Mahol 487a1f28e2 doc/filters: add one more example for ssim/psnr 2019-10-25 22:35:02 +02:00
Paul B Mahol 9e283aa24e avfilter/vf_psnr,vf_ssim: add warning if different timebases are encountered 2019-10-25 22:02:41 +02:00
Paul B Mahol 0481a1f6e5 avcodec/interplayvideo: properly decode motion vectors
Fixes #7945
2019-10-25 18:29:13 +02:00
Paul B Mahol 9d711a90fd avformat/bintext: avoid division by zero
Fixes #8335
2019-10-25 12:22:25 +02:00
Jun Li 155508c6e9 avformat/tee.c: steal bsf option before passing to fifo muxer
Fix #7620
In the case tee muxer with both "bsf" and "use_fifo" parameters
will trigger this bug. Tee muxer will first steal parameters (like "f",
"select"...) and then "use_fifo" will try reading out remaining options
and pass them to fifo as option "format_options".
Current code miss the part of stealing "bsf" options.
2019-10-25 11:55:52 +08:00
Andreas Rheinhardt 6f2a3958cf fftools/ffmpeg: Free swresample dictionary during cleanup
Freeing this was forgotten in ad899522.

Fixes #8315 and #8316.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-25 00:22:33 +02:00