Commit Graph

90022 Commits

Author SHA1 Message Date
Marton Balint 18ac642359 avformat: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Marton Balint 45ec2e44be avformat/hls: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Marton Balint 4bb0409820 avdevice: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Marton Balint 25a2d269bd fftools, tools, examples: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Marton Balint ea3672b7d6 avformat: add url field to AVFormatContext
This will replace the 1024 character limited filename field. Compatiblity for
output contexts are provided by copying filename field to URL if URL is unset
and by providing an internal function for muxers to set both url and filename
at once.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Marton Balint dc5d151568 avformat/hlsenc: use av_bprintf without buffer limit in replace_int_data_in_filename
In preparation for the deprecation of AVFormatContext->filename.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Martin Vignali 78b982d3b9 checkasm : add test for losslessvideoencdsp for diff bytes and sub_left_pred 2018-01-28 20:23:16 +01:00
Martin Vignali 8f9c38b196 avcodec/utvideoenc : add SIMD (avx) for sub_left_prediction
asm code by Henrik Gramner
2018-01-28 20:23:11 +01:00
Martin Vignali 3a230ce5fa avfilter/x86/vf_blend : avfilter/x86/vf_blend : add AVX2 version for each func except divide
and optimize average, grainextract, multiply, screen, grain merge
2018-01-28 20:21:32 +01:00
Marton Balint 4d95c6d5d7 avfilter/vf_framerate: add SIMD functions for frame blending
Blend function speedups on x86_64 Core i5 4460:

ffmpeg -f lavfi -i allyuv -vf framerate=60:threads=1 -f null none

C:     447548411 decicycles in Blend,    2048 runs,      0 skips
SSSE3: 130020087 decicycles in Blend,    2048 runs,      0 skips
AVX2:  128508221 decicycles in Blend,    2048 runs,      0 skips

ffmpeg -f lavfi -i allyuv -vf format=yuv420p12,framerate=60:threads=1 -f null none

C:     228932745 decicycles in Blend,    2048 runs,      0 skips
SSE4:  123357781 decicycles in Blend,    2048 runs,      0 skips
AVX2:  121215353 decicycles in Blend,    2048 runs,      0 skips

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 18:50:52 +01:00
Marton Balint 2cbe6bac03 avfilter/vf_framerate: change blend factor precision
This is done mainly in preparation for the SIMD patches.

- for the 8-bit input, decrease the blend factor precision to 7-bit.
- for the 16-bit input, increase the blend factor precision to 15-bit.
- make sure the blend functions are not called with 0 or maximum blending
  factors, because we don't want the signed factor integers to overflow.

Fate test changes are due to different rounding.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 18:50:50 +01:00
Marton Balint 1b6ffe9aca avfilter/vf_framerate: factorize blend functions and unify filter_slice
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 17:07:37 +01:00
Marton Balint 5bf774a4a4 avfilter/vf_framerate: unify luma and chroma blending
The expressions were mathematically equvivalent...

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 17:07:37 +01:00
Michael Niedermayer 293f24b42c fate: test the transpose filter more fully
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-28 15:10:52 +01:00
Michael Niedermayer 3f621455d6 avfilter/vf_transpose: Fix regression with packed pixel formats
Regression since: c6939f65a1
Found-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-28 15:10:52 +01:00
Timo Rothenpieler 932037c6bb avcodec/nvenc: also clear data pointer after unregistering a resource
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28 13:05:09 +01:00
Timo Rothenpieler 48e52e4edd avcodec/nvenc: add some more error case checks
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28 12:56:31 +01:00
Timo Rothenpieler 32bc4e77f6 avcodec/nvenc: unregister input resource when unmapping
Currently the resource is only ever unregistered when the
registered_frames array is fully in use and an unmapped entry is re-used
and cleaned up.
I'm pretty sure the frame will have been cleaned up before that happens,
so I'm kinda surprised this never blew up.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28 12:39:06 +01:00
Timo Rothenpieler bbe1b21022 avcodec/nvenc: refcount input frame mappings
If some logic like vsync in ffmpeg.c duplicates frames, it might pass
the same frame twice, which will result in a crash due it being
effectively mapped and unmapped twice.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-28 12:29:24 +01:00
Michael Niedermayer a026a3efae avcodec/hevc_cabac: Check prefix so as to avoid invalid shifts in coeff_abs_level_remaining_decode()
I suspect that this can be limited tighter, but i failed to find anything
in the spec that would confirm that.

Fixes: 4833/clusterfuzz-testcase-minimized-5302840101699584
Fixes: runtime error: left shift of 134217730 by 4 places cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-27 04:29:30 +01:00
Michael Niedermayer 1bfc1aa004 avcodec/mjpegdec: Fix integer overflow in DC dequantization
Fixes: runtime error: signed integer overflow: -65535 * 65312 cannot be represented in type 'int'
Fixes: 4900/clusterfuzz-testcase-minimized-5769019744321536

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-27 04:29:30 +01:00
Michael Niedermayer c6939f65a1 avfilter/vf_transpose: Fix used plane count.
Fixes out of array access
Fixes: poc.mp4

Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-27 04:29:30 +01:00
wm4 23ffeb91fe hls: don't print a certain warning if playlist loading is aborted
AVERROR_EXIT happens when the user's interrupt callback signals that
playback should be aborted. In this case, the demuxer shouldn't print a
warning, as it's expected that all network accesses are stopped.
2018-01-27 04:10:52 +01:00
wm4 6194d7e564 avformat, hls: add a flag to signal unavailability of seeking
The seek function can just return an error if seeking is unavailable,
but often this is too late. Add a flag that signals that the stream is
unseekable, and use it in HLS.
2018-01-27 04:10:52 +01:00
wm4 637dfa3942 hls: do not allow fallback to generic seeking
This makes little sense due to how HLS works, and only causes some
additional annoyances if the HLS read_seek function fails (for example
if it's a live stream). It was most likely unintended.
2018-01-27 04:10:52 +01:00
Zhong Li 6829a07944 qsvdec: Relax the surface vs coded dimension check
Fix a common vp8 decoding failure.

Many vp8 clips cannot decode if hw_frames_ctx is enabled, reporting
"Error during QSV decoding.: incompatible video parameters (-14)".

It is due to mfx.FrameInfo.Width/Height not matching coded_w/coded_h.

See: avconv -hwaccel qsv -init_hw_device qsv -c:v vp8_qsv -i vp8-test-vectors-r1/vp80-00-comprehensive-001.ivf
-vf "hwdownload,format=nv12" -pix_fmt yuv420p -f md5 -

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-26 10:00:17 +01:00
Rodger Combs 7723750475 lavc/aarch64/sbrdsp_neon: fix build on old binutils 2018-01-26 02:42:01 -06:00
Karthick Jeyapal 18e2ac032e avformat/dashenc: Signal http end of chunk(http_shutdown) explicitly
Currently http end of chunk is signalled implicitly in dashenc_io_open().
This mean playlists http writes would have to wait upto a segment duration to signal end of chunk causing delays.
This patch will fix that problem and improve performance.
2018-01-26 07:26:09 +05:30
Karthick Jeyapal 0df9d0f4cb avformat/dashenc: Fix a resource leak when http persistent in enabled 2018-01-26 07:25:31 +05:30
Jun Zhao 4e6e1e5350 lavfi/misc_vaapi: use default value setting if without arguments.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 23:16:18 +00:00
Jun Zhao 658ac0672f lavfi/procamp_vaapi: fix the green video issue if without arguments.
Fix the green output issue when use procamp_vaapi without any
arguments, now if use procamp_vaapi without any arguments, will use
the default value to setting procamp_vaapi.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 23:16:08 +00:00
Mark Thompson 74cf4a75f7 ffmpeg: Ignore SIGPIPE
On systems which deliver SIGPIPE (Unices), a broken pipe will currently
result in the immediate termination of the ffmpeg process (the default
disposition as required by POSIX).  This is undesirable, because while
the broken pipe is likely fatal to useful cleanup of whatever component
is writing to it, there might be other components which can do useful
cleanup - for example, a muxer on another stream may still need to write
indexes to complete a file.  Therefore, set the signal disposition for
SIGPIPE to ignore the signal - the call which caused the signal will
fail with EPIPE and the error will be propagated upwards like any other
I/O failure on a single stream.
2018-01-25 22:54:10 +00:00
Mark Thompson 04e4ab44d7 Merge commit '559370f2c45110afd8308eec7194437736c323d4'
* commit '559370f2c45110afd8308eec7194437736c323d4':
  qsv: Skip the packet if decoding failure

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 22:50:38 +00:00
Mark Thompson b855b570c8 Merge commit 'a2a9e4eea0e4fde2ed8d3405b4f33f655b600c2d'
* commit 'a2a9e4eea0e4fde2ed8d3405b4f33f655b600c2d':
  rtmp: Plug leak if sending bytes read report fails.

This commit is a noop, see ee88f31d34

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 22:48:34 +00:00
Mark Thompson 8e9be8ffba Merge commit '85e10c0a9321bfe0d2afe0f3983ab6a8df6e3fba'
* commit '85e10c0a9321bfe0d2afe0f3983ab6a8df6e3fba':
  intreadwrite: Use __unaligned in MSVC for ARM64 as well

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-25 22:45:45 +00:00
Josh Allmann ee88f31d34 libavformat/rtmpproto: Plug leak if sending bytes read report fails.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-25 20:42:39 +01:00
Ruiling, Song 559370f2c4 qsv: Skip the packet if decoding failure
MediaSDK may fail to decode some frame, just skip it.
Otherwise, it will keep decoding the failure packet repeatedly
without processing any packet afterwards.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-01-25 11:13:34 +01:00
Jun Zhao 4dbae00bac lavfi/vf_xxx_vaapi: fix typo.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
2018-01-24 11:31:14 +01:00
Josh Allmann a2a9e4eea0 rtmp: Plug leak if sending bytes read report fails.
Signed-off-by: Martin Storsjö <martin@martin.st>
2018-01-24 07:16:06 +02:00
Vishwanath Dixit 1948b76a1b avformat/hlsenc: closed caption tags in the master playlist 2018-01-24 11:42:57 +08:00
Richard Shaffer 8a4cc0a256 avformat: add option to parse/store ID3 PRIV tags in metadata.
Enables getting access to ID3 PRIV tags from the command-line or metadata API
when demuxing. The PRIV owner is stored as the metadata key prepended with
"id3v2_priv.", and the data is stored as the metadata value. As PRIV tags may
contain arbitrary data, non-printable characters, including NULL bytes, are
escaped as \xXX.

Similarly, any metadata tags that begin with "id3v2_priv." are inserted as ID3
PRIV tags into the output (assuming the format supports ID3). \xXX sequences in
the value are un-escaped to their byte value.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2018-01-24 04:01:01 +01:00
James Almer f0320afab9 avfilter/Makefile: skip compiling vaapi_vpp.h when vaapi is not enabled
Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-23 23:42:05 -03:00
James Almer 172564ace9 configure: fix vaapi_encode_example dependencies
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-23 23:42:04 -03:00
Karthick Jeyapal 046a946868 MAINTAINERS: Add dashenc maintainer
If somebody else wants to maintain dashenc either now or in future,
I am absolutely fine with giving up this responsibility anytime.
But till then we need a maintainer for dashenc, and I am volunteering for that task.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-24 00:19:55 +01:00
Michael Niedermayer 6e1a167c55 avcodec/dxtory: Fix bits left checks
Fixes: Timeout
Fixes: 4863/clusterfuzz-testcase-6347354178322432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-23 21:48:31 +01:00
Michael Niedermayer 94d4237a7a avcodec/hevc_cabac: Move prefix check in coeff_abs_level_remaining_decode() down
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-23 21:48:31 +01:00
Jacob Trimble 9f07cf7c00 avutil/aes_ctr: Add method to set 16-byte IV.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-23 21:48:31 +01:00
Jorge Ramirez-Ortiz 9b1ec24835 avcodec: v4l2_context: remove unnecessary code
Fixes CID 1418358

Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
2018-01-23 09:56:08 +01:00
Mark Thompson 2e96f52780 v4l2_m2m: Fix integer overflow in timestamp handling 2018-01-22 17:24:36 +01:00
James Almer 388a0f7869 avcodec/mpeg12dec: fix preprocessor check for mpeg1_nvdec hwaccel
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 22:57:41 -03:00