1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

89579 Commits

Author SHA1 Message Date
Vishwanath Dixit
d02289c386 avformat/hlsenc:addition of #EXT-X-MEDIA tag and AUDIO attribute
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-23 13:42:00 +08:00
Aman Gupta
4c78bbd313 avformat/internal: log underlying error with ff_rename failure
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
2017-12-22 18:00:47 -08:00
Aman Gupta
5f4a32a6e3 avformat/hls: hide misleading warning when http reconnect is required
AVERROR_EOF is an internal error which means the http socket is no longer
valid for new requests. It informs the caller that a new connection must
be established, and as such does not need to be surfaced to the user as
a warning.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-22 16:41:41 -08:00
Aman Gupta
54d0ef1738 avformat/http: return EOF from ff_http_do_new_request if previous response said Connection:close
This fixes a deadlock when using the hls demuxer's new http_persistent feature
to stream a youtube live stream over HTTPS. The youtube servers are http/1.1
compliant, but return a "Connecton: close". Before this commit, the demuxer
would attempt to send a new request on the partially shutdown connection and
cause a deadlock in the tls protocol.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2017-12-22 16:39:37 -08:00
Aman Gupta
1f0eaa02aa avformat/hls: add http_multiple option
This improves network throughput of the hls demuxer by avoiding
the latency introduced by downloading segments one at a time.

The problem is particularly noticable over high-latency network
connections: for instance, if RTT is 250ms, there will a 250ms idle
period between when one segment response is read and the next one
starts.

The obvious solution to this is to use HTTP pipelining, where a
second request can be sent (on the persistent http/1.1 connection)
before the first response is fully read. Unfortunately the way the
http protocol is implemented in avformat makes implementing pipleining
very complex.

Instead, this commit simulates pipelining using two separate persistent
http connections. This has the advantage of working independently of
the http_persistent option, and can be used with http/1.0 servers as
well. The pair of connections is swapped every time a new segment starts
downloading, and a request for the next segment is sent on the secondary
connection right away. This means the second response will be ready and
waiting by the time the current response is fully read.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2017-12-22 14:42:50 -08:00
Aman Gupta
03765aa6fa avformat/hls: allow open_input to be re-used
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2017-12-22 14:42:50 -08:00
Aman Gupta
b7d6c0cd48 avformat/hls: add http_persistent option
This teaches the HLS demuxer to use the HTTP protocols
multiple_requests=1 option, to take advantage of "Connection:
Keep-Alive" when downloading playlists and segments from the HLS server.

With the new option, you can avoid TCP connection and TLS negotiation
overhead, which is particularly beneficial when streaming via a
high-latency internet connection.

Similar to the http_persistent option recently implemented in hlsenc.c

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2017-12-22 14:42:50 -08:00
Aman Gupta
9395e44b8d avformat/http: add "Opening" info logging to ff_http_do_new_request
This mimics logging that was added in 53e0d5d724 for security
purposes.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-22 14:42:50 -08:00
Aman Gupta
28358e466d avformat/http: return EINVAL from ff_http_do_new_request() if re-used with different hostname
This will prevent improper use of ff_http_do_new_request() if the user
tries to send a request for a different host to a previously connected
persistent http/1.1 connection.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Karthick J <kjeyapal@akamai.com>
2017-12-22 14:42:35 -08:00
Paul B Mahol
d2a2bc9a9f avfilter/vf_lut: add support for gray formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-22 10:57:12 +01:00
Karthick J
e3b2c8502b avformat/dashenc: avformat/dashenc: Fix the EXT-X-TARGETDURATION as per the hls specification 2017-12-22 07:44:51 +08:00
Karthick J
93a0e47876 avformat/hlsenc: set EXT-X-TARGETDURATION use lrint(EXTINF) 2017-12-22 07:43:54 +08:00
Marton Balint
e403e4bdbe avfilter/vf_framerate: fix scene score with negative linesize
Also, do not overread input if linesize > width, or linesize is not divisible
by 8, and use the proper rounded width/height for MAFD calculation.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-21 23:03:10 +01:00
Marton Balint
c6a65ed670 avfilter/vf_framerate: do not calculate scene change score multiple times for the same frame
This speeds up the filter, and also fixes scene change detection score which is
reduced based on the difference of the current MAFD to the preivous MAFD.
Obviously if we compare two frames twice, the difference will be 0...

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-21 23:03:10 +01:00
Marton Balint
e1113a83cc avfilter/vf_framerate: fix scene change detection score
- normalize score to [0..100] instead of [0..85]
- change the default score to 8.2 to roughly keep existing behaviour
- take into account bit depth
- do not truncate to integer

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-21 23:03:10 +01:00
Marton Balint
be15304ee6 avfilter/vf_framerate: factorize get_scene_score
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-21 23:03:10 +01:00
Marton Balint
090b740680 avfilter/vf_framerate: factorize blend_frames
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-21 23:03:10 +01:00
Marton Balint
1eb926dc02 avfilter/vf_framerate: add threaded blending operations
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-21 23:03:10 +01:00
Marton Balint
d6a8e46f97 fate: add 12 bit framerate filter tests
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-12-21 23:03:10 +01:00
Michael Niedermayer
80344959f0 avcodec/jpeg2000dec: Free lengthinc earlier
Reduces memory needed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-21 19:48:41 +01:00
Michael Niedermayer
4b2a186ef0 avcodec/mpeg4videodec: Add support for parsing and exporting video_range
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-21 19:48:41 +01:00
Michael Niedermayer
42274db1c6 avcodec/jpeg2000dec: Allocate lengthinc and data_start arrays as needed
Decreases memory requirements
Fixes: OOM
Fixes: 4525/clusterfuzz-testcase-minimized-6400713073623040

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-21 19:48:41 +01:00
wm4
1083859cb8 rkmppdec: move AV_CODEC_CAP_AVOID_PROBING to the correct field
AVCodec.caps_internal doesn't hold this field.

(Untested.)
2017-12-21 18:50:49 +01:00
wm4
55eebf2a11 v4l_m2m: add missing AV_CODEC_CAP_DELAY flags
This is pretty much a requirement for any codec that handles modern
codecs like h264, but it was missing. Potentially could lead to issues
like missing frames at the end of a stream.

Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
2017-12-21 18:49:29 +01:00
Paul B Mahol
5a6e753bc6 avfilter/af_biquads: change defaults for biquad filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-21 12:06:21 +01:00
Paul B Mahol
7fc89f226f avfilter/af_biquads: increase width range
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-21 11:53:22 +01:00
Paul B Mahol
c99ed89f89 avfilter/af_biquads: add kHz width_type
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-21 11:52:49 +01:00
James Almer
bc10260f49 avformat/mov: simplify parsing of mdcv atom using av_make_q()
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-21 01:23:17 -03:00
James Almer
22ae33fb40 configure: fix minimum required version of libzimg
The new input properties added in 002db7d49a
were introduced to libzimg for the upcoming release 2.7.x

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-21 00:48:16 -03:00
Karthick J
3ac76d890d avformat/hlsenc: Fix a memory leak when http_persistent is 1
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-21 11:39:24 +08:00
Steven Liu
7feae7be5b avformat/hlsenc: reindent after previous commits
Reviewed-by: Karthick J <kjeyapal@akamai.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-21 11:17:08 +08:00
Steven Liu
8318f60845 avformat/hlsenc: fix first fragment mp4 do not split bug
fix ticket id: 6888

Tested-by: beloko <beloko@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-21 11:14:32 +08:00
Sasi Inguva
58a25aeb8e lavf/mov.c: Guess video codec delay based on PTS while parsing MOV header.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-20 22:27:06 +01:00
sfan5
05c1c79d37 libavcodec/hevcdec: implement skip_frame
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-20 22:26:31 +01:00
Paul B Mahol
cfd52094c0 avfilter/vf_psnr: add more gbrap formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-12-20 12:45:21 +01:00
Stefan Pöschel
c94b094858 configure: Fix case of static libmp3lame
Fixes #6918.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-19 23:55:02 -03:00
Jun Zhao
a31a482611 lavc/vaapi_encode: give a debug message if attrs unsupported.
Give a debug message when query attribute get VA_ATTRIB_NOT_SUPPORTED,
it's will help to trace and debug some issue.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-12-19 23:02:31 +00:00
James Almer
da03242778 Revert "checkasm/vf_interlace : add test for lowpass_line 8 and 16"
This reverts commit adff97be5e.

It currently fails on Windows targets.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-19 19:07:24 -03:00
James Almer
8e0e4384b0 Revert "avfilter/vf_interlace : add AVX2 for lowpass_line 8 and 16"
This reverts commits 1a5865b6dc and
8fb1d63d91.

They made fate interlace tests fail when AVX2 was used.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-19 19:04:25 -03:00
Michael Niedermayer
65da5c56e6 tests/audiomatch: Add missing return code at the end of main()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-19 21:32:04 +01:00
Jun Zhao
e72b854992 tests/audiomatch: Whitespace refinement
Refine the coding style.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-19 21:32:04 +01:00
Jun Zhao
2b38900cb3 tests/audiomatch: Add return value check for fread.
Check fread return value to fix build warning as "ignoring
return value of ‘fread’"

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-19 21:32:04 +01:00
Felix Matouschek
c12c2739cd configure: Fix detection of vp9 decoder/encoder
At least on Android the vp9 decoder/encoder needs $libm_extralibs
to successfully link, it was missing in the check_lib calls for vp9

Signed-off-by: Felix Matouschek <felix@matouschek.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-12-19 17:18:10 -03:00
Martin Vignali
3df6e61dad avfilter/x86/vf_hflip : indent
based on patch by Paul B Mahol
2017-12-19 21:10:12 +01:00
Martin Vignali
f181648176 avfilter/x86/vf_hflip : add avx2 version for hflip_byte and hflip_short 2017-12-19 21:10:09 +01:00
Martin Vignali
a4a4179e83 avfilter/x86/vf_hflip : merge hflip byte and hflip short to one macro 2017-12-19 21:10:05 +01:00
Martin Vignali
8fb1d63d91 avfilter/vf_tinterlace : add AVX2 func for lowpass_line 8 and 16 2017-12-19 20:59:59 +01:00
Martin Vignali
1a5865b6dc avfilter/vf_interlace : add AVX2 for lowpass_line 8 and 16 2017-12-19 20:59:54 +01:00
Martin Vignali
adff97be5e checkasm/vf_interlace : add test for lowpass_line 8 and 16 2017-12-19 20:59:51 +01:00
Martin Vignali
d31770d9a6 avfilter/vf_interlace : move func init in ff_interlace_init and add depth arg for ff_interlace_init_x86 2017-12-19 20:59:47 +01:00