1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

100645 Commits

Author SHA1 Message Date
Paul B Mahol
9ac31b419c avfilter/vf_xmedian: add timeline support 2020-12-30 15:53:22 +01:00
Guo, Yejun
c720286ee3 vf_dnn_processing.c: add async support
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
5024286465 dnn_interface: change from 'void *userdata' to 'AVFilterContext *filter_ctx'
'void *' is too flexible, since we can derive info from
AVFilterContext*, so we just unify the interface with this data
structure.

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
e67b5d0a24 dnn: add async execution support for openvino backend
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
39f5cb4bd1 dnn_interface: add interface to support async execution
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
38089925fa dnn_backend_openvino.c: refine code for error handle
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
2b177033bb dnn_backend_openvino.c: separate function execute_model_ov
function fill_model_input_ov and infer_completion_callback are
extracted, it will help the async execution for reuse.

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Xie, Lin
6506ab8b03 dnn/queue: add queue and safe_queue support
Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Guo, Yejun
1b64954e42 vf_dnn_processing.c: replace filter_frame with activate func
with this change, dnn_processing can use DNN async interface later.

Signed-off-by: Xie, Lin <lin.xie@intel.com>
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-29 09:31:06 +08:00
Aman Karmani
e1d7433100 avcodec/codec_desc: describe AV_CODEC_ID_MPEG2TS
Signed-off-by: Aman Karmani <aman@tmm1.net>
2020-12-28 14:08:44 -08:00
Aman Karmani
d20f059fb9 avformat/rtsp: add satip_raw flag to receive raw mpegts stream
This can be used to receive the raw mpegts stream from a SAT>IP
server, by letting avformat handle the RTSP/RTP/UDP negotiation
and setup, but then simply passing the MP2T stream through
instead of demuxing it further.

For example, this command would demux/remux the mpegts stream:

    SATIP_URL='satip://192.168.1.99:554/?src=1&freq=12188&pol=h&ro=0.35&msys=dvbs&mtype=qpsk&plts=off&sr=27500&fec=34&pids=0,17,18,167,136,47,71'
    ffmpeg -i $SATIP_URL -map 0 -c copy -f mpegts -y remux.ts

Whereas this command will simply write out the raw stream, with
the original PAT/PMT/PIDs intact:

    ffmpeg -rtsp_flags satip_raw -i $SATIP_URL -map 0 -c copy -f data -y raw.ts

Signed-off-by: Aman Karmani <aman@tmm1.net>
2020-12-28 14:08:44 -08:00
Aman Karmani
98b76bb11f avformat/rtsp: add support for satip://
The SAT>IP protocol[1] is similar to RTSP. However SAT>IP servers
are assumed to speak only MP2T, so DESCRIBE is not used in the same
way. When no streams are active, DESCRIBE will return 404 according
to the spec (see section 3.5.7). When streams are active, DESCRIBE
will return a list of all current streams along with information
about their signal strengths.

Previously, attemping to use ffmpeg with a rtsp:// url that points
to a SAT>IP server would work with some devices, but fail due to 404
response on others. Further, if the SAT>IP server was already
streaming, ffmpeg would incorrectly consume the DESCRIBE SDP response
and join an existing tuner instead of requesting a new session with
the URL provided by the user. These issues have been noted by many
users across the internet[2][3][4].

This commit adds proper spec-compliant support for SAT>IP, including:

- support for the satip:// psuedo-protocol[5]
- avoiding the use of DESCRIBE
- parsing and consuming the com.ses.streamID response header
- using "Transport: RTP/AVP;unicast" because the optional "/UDP"
  suffix confuses some servers

This patch has been validated against multiple SAT>IP vendor devices:

- Telestar Digibit R2
  (https://telestar.de/en/produkt/digibit-r1-2/)
- Kathrein EXIP 418
  (https://www.kathrein-ds.com/en/produkte/sat-zf-verteiltechnik/sat-ip/227/exip-418)
- Kathrein EXIP 4124
  (https://www.kathrein-ds.com/en/products/sat-if-signal-distribution/sat-ip/226/exip-4124)
- Megasat MEG-8000
  (https://www.megasat.tv/produkt/sat-ip-server-3/)
- Megasat Twin
  (https://www.megasat.tv/en/produkt/sat-ip-server-twin/)
- Triax TSS 400
  (https://www.conrad.com/p/triax-tss-400-mkii-sat-ip-server-595256)

[1] https://www.satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf
[2] https://stackoverflow.com/questions/61194344/does-ffmpeg-violate-the-satip-specification-describe-syntax
[3] https://github.com/kodi-pvr/pvr.iptvsimple/issues/196
[4] https://forum.kodi.tv/showthread.php?tid=359072&pid=2995884#pid2995884
[5] https://www.satip.info/resources/channel-lists/
2020-12-28 14:08:44 -08:00
Michael Niedermayer
292e41ce65 avcodec/tiff: Disallow striped and tiled tiffs except for DNG
strips + tiles is not allowed in TIFF
DNG uses a separate codepath

Regression since da5b3d0028.

Fixes: NULL pointer dereference
Fixes: poc1
Fixes: Ticket8960

Found-by: 1vanChen of NSFOCUS Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-28 19:36:57 +01:00
Michael Niedermayer
654b21ef17 avformat/mpegts: Fix argument type for av_log
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-28 19:36:57 +01:00
Michael Niedermayer
93bf8004d1 avformat/mxfdec: Do not clear arrays in mxf_read_index_entry_array()
They are written too immediately, so it should not be needed.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-28 19:34:40 +01:00
Marvin Scholz
d67c6c7f6f lavu: use address-of operator checking clock_gettime
When targeting a recent enough macOS/iOS version that has clock_gettime
it won't be a weak symbol, in which case clang warns for this check
as it's always true:

  warning: address of function 'clock_gettime' will always
  evaluate to 'true'

This warning is silenced by using the address-of operator to make
the intent explicit.
2020-12-28 01:12:26 -03:00
Steven Liu
6080c5e24f avformat/hlsproto: update comment of file description
reference link to rfc8216

Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
2020-12-28 11:09:19 +08:00
Steven Liu
e7703ae335 avformat/hls: update comment of file description
reference link to rfc8216

Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
2020-12-28 11:09:17 +08:00
Steven Liu
e6e341b2f0 doc/muxers: correct description of hls_enc_key and hls_enc_iv
because hls_enc_key and hls_enc_iv get 16byte char
for example:
-hls_enc_key 0123456789abcdef -hls_enc_iv abcdefghijklmnop

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2020-12-28 11:09:14 +08:00
Paul B Mahol
f1357274e9 avfilter/vf_decimate: always properly handle EOF 2020-12-27 22:24:43 +01:00
Paul B Mahol
4b4282bc57 avfilter/vf_decimate: stop dropping last frames with ppsrc 2020-12-27 22:01:23 +01:00
Paul B Mahol
89dcef90af avfilter/vf_decimate: fix broken logic with ppsrc handling
Make output bit exact with VIVTC VDecimate filter.
2020-12-27 21:21:08 +01:00
Marton Balint
6d3b70c27e avfilter/vf_framerate: fix infinite loop with 1-frame input
Fixes infinite loop in:
ffmpeg -f lavfi -i testsrc=d=0.04 -vf framerate=50 -f null none

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-27 11:01:41 +01:00
Gyan Doshi
bff6fbead8 doc/protocols: document cache option
Add entry for read_ahead_limit
2020-12-27 14:50:24 +05:30
Paul B Mahol
5b48d2af43 avfilter/vf_xmedian: add support for commands 2020-12-25 16:43:14 +01:00
Paul B Mahol
4848eb48ac avfilter/af_vibrato: make sure table size is at least 1
Fixes overreads.
2020-12-25 14:12:52 +01:00
Paul B Mahol
38e71d8b6c avfilter/af_tremolo: make sure table size is at least 1 2020-12-25 14:12:52 +01:00
Paul B Mahol
676689cc7c avcodec/cfhd: properly handle midstream size changes for transform type 2 2020-12-25 13:28:39 +01:00
Jeremy Leconte
29cef1bcd6 libswscale: avoid UB nullptr-with-offset.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-24 15:27:56 +01:00
Michael Niedermayer
aea8d4061d avformat/swfdec: Allocate output buffer after reading input
Fixes: Timeout (>10sec -> 0.26sec)
Fixes: 27419/clusterfuzz-testcase-minimized-ffmpeg_dem_SWF_fuzzer-5678307361947648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-24 15:25:00 +01:00
Michael Niedermayer
684aec6a68 avformat/cafdec: clip sample rate
Fixes: 1.21126e+111 is outside the range of representable values of type 'int'
Fixes: 27398/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5412960339755008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-24 15:25:00 +01:00
Michael Niedermayer
0d4e8e4c97 tools/target_dec_fuzzer: Adjust maxpixels for G2M
Fixes: Timeout (50sec -> 3sec)
Fixes: 27383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5196953666977792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-24 15:25:00 +01:00
Carl Eugen Hoyos
2943c3debd lavf/img2dec: Increase score for very large jpeg images.
Avoids a conflict with the raw mjpeg demuxer.
2020-12-24 13:16:44 +01:00
Carl Eugen Hoyos
b0a882cc93 lavd/decklink_dec: Do not set codec_tags.
Only set the pix_fmt for rawvideo.

Fixes ticket #9005.

Reviewed-by: Marton Balint
2020-12-24 12:07:05 +01:00
Gyan Doshi
9a0f5e412a ffmpeg: delay first stats
Wait for all output files to be initialized before printing first stats.

Avoids breaking output file dump report.
2020-12-24 10:04:38 +05:30
Derek Buitenhuis
a7f9b3b954 avformat/hlsenc: Add dependency on avc.o
a2b1dd0ce3 added a dependency
on ff_nal_unit_extract_rbsp.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2020-12-22 18:03:18 -05:00
Gyan Doshi
3e47bbad56 ffmpeg: don't delay printing initial stats
The first stats is printed after the initial stats_period has elapsed. With a large period,
it may appear that ffmpeg has frozen at startup.

The initial stats is now printed after the first transcode_step.
2020-12-23 00:41:20 +05:30
Gyan Doshi
842714b5cb ffmpeg: add option stats_period
At present, progress stats are updated at a hardcoded interval of
half a second. For long processes, this can lead to bloated
logs and progress reports.

Users can now set a custom period using option -stats_period
Default is kept at 0.5 seconds.
2020-12-23 00:41:07 +05:30
Paul B Mahol
686c07fb1e avfilter/vf_decimate: fix overreads when using ppsrc
Derive input parameters from correct inlink when using ppsrc.

Previously both input frames would use dimensions of first inlink,
causing crash if first inlink w/h was smaller than second one.
2020-12-22 13:31:55 +01:00
Ting Fu
5dbabb020e dnn: add NV12 pixel format support
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-12-22 10:53:35 +08:00
Michael Niedermayer
5cae71d2b7 avcodec/ffv1dec: Fix off by 1 error with quant tables
Fixes: assertion failure
Fixes: 28447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5369575948550144

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>
2020-12-22 00:30:50 +01:00
Michael Niedermayer
c0e660ba14 avformat/mpegts: simplify nb_packets code
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-22 00:30:50 +01:00
Michael Niedermayer
ef7b117b7b avformat/mpegts: Increase pcr_incr width to 64bit
Fixes: division by zero
Fixes: 26459/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5666350112178176
Fixes: 28154/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5195728439476224

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-22 00:30:50 +01:00
Paul B Mahol
cd82c6e4ef avfilter/vf_decimate: switch to activate 2020-12-21 23:34:10 +01:00
Paul B Mahol
204a906437 avfilter/af_crystalizer: implement inverse filtering 2020-12-21 13:15:27 +01:00
Paul B Mahol
28aedc7f54 avfilter/af_crystalizer: use proper type for variable 2020-12-21 12:00:21 +01:00
Paul B Mahol
c1c2e6f968 avfilter/af_crystalizer: improve filter description 2020-12-21 11:51:00 +01:00
Andriy Gelman
cd97e1ff4d avformat/libamqp: parse vhost in uri
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-12-21 01:27:33 -05:00
Paul B Mahol
6e96e3d970 avfilter: add shufflepixels video filter 2020-12-20 21:44:13 +01:00
Gyan Doshi
ab6a56773f doc/codecs: add entries for export_side_data
Document addition of venc_params and film_grain.
2020-12-20 15:09:28 +05:30