Commit Graph

93935 Commits

Author SHA1 Message Date
Paul B Mahol b16806b09d avfilter/avf_avectorscope: make use of av_rescale 2019-05-28 10:43:25 +02:00
Gyan Doshi eae251ead9 avformat/segment: populate empty outer stream extradata from packet
At present, if the outer stream extradata is empty but first packet
has extradata as a side data element, then only the first segment's
muxer instance may be able to extract this side data and use it.
For all other segments, extradata in packet side data could be missing
and generated segments may be invalid or unplayable in some apps
e.g. for an ADTS AAC stream segmented to MP4, the adtstoasc BSF will
add extradata to the first packet. The MOV muxer for the first segment
will add this to codecpar for the inner stream and write
Decoder Specific Information within the esds box. For other segments,
their esds' will not have this decSpecificInfo and they can't be opened
in Quicktime player or by services like nginx-vod-module.
2019-05-28 12:30:29 +05:30
Jun Zhao 9b069eb14e lavfi/sr: Change the backend type from flags to int
native and tensorflow is exclusive, so change the type from
flags to int.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-28 09:13:36 +08:00
Jun Zhao b983e71bde lavfi/sr: Remove slice thread flag
sr didn't enable the slice threading, so remove the flag

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-28 09:13:36 +08:00
Jun Zhao b63df9b527 doc/encoders: Document eld_v2 option for libfdk_aac encoder.
Document eld_v2 option for libfdk_aac encoder.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-28 09:12:17 +08:00
Jun Zhao 3ba09704fa doc/build_system: Document checkheaders/alltools and consistency fixes
Document checkheaders/alltools and consistency fixes

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-28 09:12:17 +08:00
Michael Niedermayer bf3ee6a130 avformat/mp3enc: Avoid SEEK_END as it is unsupported
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-27 19:01:38 +02:00
Michael Niedermayer 90db25a16e avcodec/diracdec: Check for arith decoder errors in dirac_unpack_block_motion_data()
Fixes: Timeout (54sec -> 188ms)
Fixes: 14585/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5649933052411904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-27 19:01:38 +02:00
Michael Niedermayer 8eecf761a6 avcodec/truemotion2: Fix several integer overflows in tm2_update_block()
Fixes: signed integer overflow: -1877966852 + -469491713 cannot be represented in type 'int'
Fixes: 14561/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5167608359288832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-27 19:01:38 +02:00
Michael Niedermayer e6f4d5dc38 avcodec/ffv1dec_template: Optimize common case in run mode
Fixes: Timeout (14sec -> 9sec)
Fixes: 13398/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5664106709778432

decode_line() becomes 1% faster for fate/vsynth2-ffv1.avi
for another fate sample there is a 0.5% speedup
the effect should be bigger for files with "flat" colored areas
the new faster branch is used in 97-100% of the cases in fate samples
compared to the older more complex (which i tested)

vsynth3-ffv1-v3-bgr0.avi had the lowest percentual useage of about 97%

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-27 19:01:38 +02:00
Paul B Mahol 5ddaedcaec avfilter/avf_showvolume: switch to activate 2019-05-27 18:44:19 +02:00
James Almer f78172b29a avcodec/libdav1d: add support for RGB streams
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27 13:21:52 -03:00
Werner Robitza 7458fa119c doc/swscaler: explain default Lanczos parameter
Explain that the default Lanczos filter parameter is 3 and that it can be
changed by the param0 option.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
2019-05-27 21:32:33 +05:30
James Almer 254da41531 avcodec/libdav1d: assert Dav1dPicture allocator_data is set before referencing its data
To ensure the custom allocator is effectively used.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27 12:49:01 -03:00
James Almer 0e07b767c8 avcodec/libdav1d: export level from the Sequence Header
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27 12:47:33 -03:00
Paul B Mahol 293489d835 avfilter/af_superequalizer: switch to activate 2019-05-27 17:36:30 +02:00
Antonin Gouzer 3da8d04c18 fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)
Slightly modified by Marton Balint to produce valid json as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-27 00:28:34 +02:00
Shiyou Yin 6b67daa326 avcodec/mips: [loongson] fix mpeg4 decoding error on loongson platform.
In function ff_dct_unquantize_mpeg2_intra_mmi,
addr0 shoudn't be changed before storage operation.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-26 21:04:18 +02:00
Paul B Mahol fc0de1c04b avfilter/avf_showfreqs: switch to activate 2019-05-26 17:11:17 +02:00
Paul B Mahol a9fa6b8e02 swresample/swresample: check for invalid sample rates 2019-05-26 14:43:32 +02:00
Derek Buitenhuis 80757bed89 avcodec/libx265: Support full range videos
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-05-26 12:04:46 +01:00
Michael Niedermayer 1a74b04737 avformat/webm_chunk: Specify expected argument length of get_chunk_filename()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-25 02:05:22 +02:00
Michael Niedermayer 3b5b977c9f avformat/webm_chunk: Check header filename length
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-25 02:05:20 +02:00
Michael Niedermayer 4fd74a2b10 avcodec/pngdec: Check nb_blocks
Fixes: Timeout (23sec -> 0.5sec)
Fixes: 14329/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LSCR_fuzzer-5679252923482112

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-05-25 02:04:43 +02:00
Marton Balint 1eb54323c8 avfilter/f_loop: warn about unset loop sizes
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Marton Balint 87e0247a6c avfilter/f_loop: fix video loop issues with 0 size or when size is bigger than input
Fixes infinte loop with -vf loop=loop=1 and also fixes looping when the input
is less frames than the specified loop size.

Possible regressions since ef1aadffc7.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Marton Balint f811ac5228 avcodec/scpr3: fix checking ret value of decode_run_i
Fixes Coverity CID 1441461.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Marton Balint 1b4f74ffe2 avcodec/scpr: fix checking ret value of decode_run_i
Fixes Coverity CID 1441460.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Marton Balint f9271d0158 avformat/utils: fix stream ordering for program ID stream specifiers
Fixes a regression introduced in dbfd042983.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Gyan Doshi 50789e356d avformat/cache - delete cache file after closing handle
Verified that cache files get deleted on Windows.
2019-05-25 00:21:26 +05:30
Timo Rothenpieler a6818d5bd0 compat/cuda/ptx2c: don't drop final newline 2019-05-24 19:23:39 +02:00
Josh Allmann 4cfc34d9a8 avfilter/vf_scale_cuda: reset frame size after acquiring from hwframe
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-05-24 19:03:34 +02:00
Paul B Mahol 5073adcc42 avfilter/vf_xmedian: set sar to outlink 2019-05-24 18:37:41 +02:00
Paul B Mahol a1992637ac avfilter/vf_mix: set sar to outlink 2019-05-24 18:37:41 +02:00
Paul B Mahol a9b5af0d19 avfilter/vf_mix: use time_base from framesync 2019-05-24 18:33:16 +02:00
Ruiling Song 1d74150a7d lavfi/opencl: add nlmeans_opencl filter
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-05-24 15:09:22 +08:00
Xuewei Meng 023ea5e360 libavfilter/dnn_native: Add support of dilated convolution in dnn_native.
Add dilation parameter in dnn native to support dilated convolution.

Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-05-24 11:49:50 +08:00
Linjie Fu 8f6e651833 lavc/qsvenc: Fix the memory leak for enc_ctrl.Payload
frame->enc_ctrl.Payload is malloced in get_free_frame, directly memset
the whole structure of enc_ctrl to zero will cause the memory leak for
enc_ctrl.Payload.

frame->enc_ctrl as a structure will be malloc and init to zero by calling
frame = av_mallocz(sizeof(*frame)), so the memset is redundant and can
be removed.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-05-22 22:16:21 +08:00
Jun Zhao 82ccb9cba9 doc/writing_filters: Use ff_filter_get_nb_threads() get number of threads
ff_filter_get_nb_threads() respect AVFilterContext.nb_threads and
graph->nb_threads both, in most case, we perfer this API than using
ctx->graph->nb_threads directly.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-22 17:43:41 +08:00
Jun Zhao 98663a0bb8 lavfi/lensfun: Use ff_filter_get_nb_threads() get number of threads
ff_filter_get_nb_threads() respect AVFilterContext.nb_threads and
graph->nb_threads both, in most case, we perfer this API than using
ctx->graph->nb_threads directly.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-22 17:34:18 +08:00
Xuewei Meng ecc096513c libavfilter/dnn_native: Add multiple activation functions in dnn native
Add "Leaky_relu" and "None" option in activation function.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-05-22 10:28:07 +08:00
Xuewei Meng e45e6005ce libavfilter/dnn_native: Add multiple padding methods in dnn native
Add another two padding methods "VALID" and "SAME" as tensorflow,
and keep the existing "SAME_CLAMP_TO_EDGE" method suggested by sr filter.
As "SAME_CLAMP_TO_EDGE"can keep the output with the same size as original input,
and gives a slight better result as mentioned by sr filter.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-05-21 12:53:58 +08:00
Fu Linjie 154a730bdc lavc/vp9_superframe_bsf: avoid error messages in one line
Add "\n" to avoid continuous error messages in one line.

Signed-off-by: Fu Linjie <linjie.fu@intel.com>
2019-05-21 00:07:13 +01:00
James Almer e1839283bc doc: add basic documentation for libdav1d
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-20 18:21:33 -03:00
Daniel Kucera 8d9910a23a ffplay: added option always on top for video window
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Daniel Kucera <github@danman.eu>
2019-05-20 17:51:43 -03:00
James Almer fbc5a27694 avcodec/libdav1d: fine tune thread distribution
As suggested by Ronald, don't map auto threads to frame threads only, and
instead distribute them between frame and tile more efficiently.
Add a new framethreads override option, similar to the tilethreads one.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-20 16:20:04 -03:00
Baptiste Coudurier b401a4ab8a avformat/mxfenc: support XAVC long gop 2019-05-20 11:58:12 -07:00
Michael Niedermayer 3c0bfa7d1a avcodec/cpia: Check input size also against linesizes and EOL
Fixes: Timeout (14sec -> 29ms)
Fixes: 14733/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CPIA_fuzzer-5707022445576192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-20 18:10:54 +02:00
Michael Niedermayer fbdb3aa179 avcodec/v210dec: Fix alignment check for AVX2
Fixes: "null pointer dereference" (actually misaligned access but the tools seem not to support this)
Fixes: 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-19 10:47:09 +02:00
Marton Balint c61d16cf3b Revert "lavf/utils: Allow url credentials to contain a slash."
This reverts commit dd06f022b0.

Fixes ticket #7871 and reopens ticket #7816.

The introduced regression caused URL's with @ in them to be parsed incorrectly
which is a bigger issue then not being able to specify the slash character as a
password.

I think there are better ways to fix the original issue, like being able to
specify HTTP username and password as a protocol option, or adding a protocol
option to percent-decode the URL first.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-18 17:07:21 +02:00