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

90262 Commits

Author SHA1 Message Date
Aman Gupta
2a0eb86857 avcodec/mediacodecdec: add delay_flush option
The default behavior of the mediacodec decoder before this commit
was to delay flushes until all pending hardware frames were
returned to the decoder. This was useful for certain types of
applications, but was unexpected behavior for others.

The new default behavior with this commit is now to execute
flushes immediately to invalidate all pending frames. The old
behavior can be enabled by setting delay_flush=1.

With the new behavior, video players implementing seek can simply
call flush on the decoder without having to worry about whether
they have one or more mediacodec frames still buffered in their
rendering pipeline. Previously, all these frames had to be
explictly freed (or rendered) before the seek/flush would execute.

The new behavior matches the behavior of all other lavc decoders,
reducing the amount of special casing required when using the
mediacodec decoder.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-03-07 16:22:47 -08:00
Aurelien Jacobs
840f6eb77a Changelog: list the new SBC codec 2018-03-07 22:26:53 +01:00
Aurelien Jacobs
f677718bc8 sbcenc: add armv6 and neon asm optimizations
This was originally based on libsbc, and was fully integrated into ffmpeg.
2018-03-07 22:26:53 +01:00
Aurelien Jacobs
f1e490b1ad sbcenc: add MMX optimizations
This was originally based on libsbc, and was fully integrated into ffmpeg.

Rough speed test:
C version:    speed= 592x
MMX version:  speed= 785x
2018-03-07 22:26:53 +01:00
Aurelien Jacobs
88508a87a5 sbc: add raw muxer for SBC 2018-03-07 22:26:53 +01:00
Aurelien Jacobs
ff4600d954 sbc: implement SBC encoder (low-complexity subband codec)
This was originally based on libsbc, and was fully integrated into ffmpeg.
2018-03-07 22:26:53 +01:00
Aurelien Jacobs
2e08de0815 sbc: add raw demuxer for SBC 2018-03-07 22:26:53 +01:00
Aurelien Jacobs
2505ebc632 sbc: add parser for SBC 2018-03-07 22:26:53 +01:00
Aurelien Jacobs
4439887198 sbc: implement SBC decoder (low-complexity subband codec)
This was originally based on libsbc, and was fully integrated into ffmpeg.
2018-03-07 22:26:53 +01:00
Aurelien Jacobs
0b4ad86959 crc: add AV_CRC_8_SBC as a 8 bits CRC with polynomial 0x1D 2018-03-07 22:26:53 +01:00
Paul B Mahol
ea0963181a avfilter/af_alimiter: check if buffer_size is valid
Fixes #7050.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-03-07 21:37:01 +01:00
Michael Niedermayer
1b1362e408 avformat/utils: Fix integer overflow of fps_first/last_dts
Fixes: runtime error: signed integer overflow: 7738135736989908991 - -7898362169240453118 cannot be represented in type 'long'
Fixes: Chromium bug 796778
Reported-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Michael Niedermayer
da069e9c68 avformat/oggdec: Fix metadata memleak on multiple headers
Fixes: Chromium bug 800123
Reported-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Michael Niedermayer
3934aa495d libavformat/oggparsevorbis: Fix memleak on multiple headers
Fixes: Chromium bug 800123
Reported-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Michael Niedermayer
367929bed9 avformat/mov: Fix integer overflow in mov_get_stsc_samples()
Fixes: runtime error: signed integer overflow: 5 * -2147483647 cannot be represented in type 'int'
Fixes: Chromium bug 817338
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Reported-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Michael Niedermayer
c87bf5b6d0 avfilter/vf_*_vaapi: Add missing AV_OPT_FLAG_FILTERING_PARAM
Reviewed-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Michael Niedermayer
5735a390a6 avformat/internal: Document the freeing behavior of ff_alloc_extradata()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Matt Wolenetz
b59b599446 lavc/vorbisdec: Allow avcodec_open2 to call .close
If there is a decoder initialization failure detected in avcodec_open2
after .init is called, allow graceful decoder .close to prevent leaking
vorbis decoder allocations such as those from vorbis_parse_setup_*.

BUG=772699

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 20:37:33 +01:00
Aman Gupta
23c91abe4f avcodec/aacdec: log configuration change details
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-07 11:32:50 -08:00
Stefan _
5ab0ecf283 avcodec/mediacodec_wrapper: fix false positives in swdec blacklist
'OMX.SEC.avc.dec' is a valid hardware decoder, while the decoders
we seek to blacklist all match 'OMX.SEC.*.sw.dec'.
2018-03-07 13:52:02 +01:00
James Almer
a43e9cdd44 avformat/isom: don't free extradata before calling ff_get_extradata()
ff_get_extradata() frees any existing extradata before allocating now,
and using av_free() here leaves a dangling pointer that will result in
a double free.

Fixes a regression since 0ca33b1d4e.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-06 23:41:32 -03:00
Masaki Tanaka
8b0a9f79c8 mpegvideo_parser: fix indentation of an if statement 2018-03-07 02:11:10 +02:00
Stefan _
7c39305a17 libavformat/tls_libtls: pass numeric hostnames to tls_connect_cbs()
Numeric hosts in certificates are not very common, but supported by LibreSSL.
Forward the IP address to make verification work in this case.

Fixes ticket #7029
2018-03-07 02:06:09 +02:00
Mark Thompson
56912555bc h264_metadata: Actually fail when sei_user_data option is invalid 2018-03-06 23:44:07 +00:00
James Almer
2aa42fac77 avformat/utils: simplify ff_alloc_extradata()
Cosmetic refactor

Reviewed-by: 74a2fa708af88d225ed708af758f236f869b1a57
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-06 19:13:46 -03:00
James Almer
0ca33b1d4e avformat/utils: free existing extradata before trying to allocate a new one
This prevents leaks in the rare cases the function is called when extradata
already exists.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-06 19:13:12 -03:00
Aman Gupta
b19e11a4dc MAINTAINERS: add myself to mediacodec
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-03-06 13:54:35 -08:00
Aman Gupta
c22e7b00e4 avcodec/mediacodec: reduce loglevel for per-frame logging
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-03-06 13:54:16 -08:00
Stefan _
313b6057fb avcodec/mediacodec_wrapper: blacklist more software decoders
Additionally blacklist ffmpeg, Samsung and Qualcomm
software implementations offered through MediaCodec.

Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
2018-03-06 13:52:24 -08:00
Zhong Li
0645698ecc lavc/qsvenc: disable h264 look_ahead by default
Look_ahead can provide quality improvements, but would better disable it by default due to some reasons:
1. It is only available for some codecs (e.g. HEVC is not supported) on Intel
   Haswell and plus platforms. Thus means it will be failed on some platforms.
2. It significantly increases encoding latency and memory consumption.
3. It may overwrite some other options such as CBR and CAVLC.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-03-06 00:23:16 +00:00
Mark Thompson
0cf9fa9924 Merge commit '2d6b3f3a9dce409ca51d70ef4b85c0593bb4b109'
* commit '2d6b3f3a9dce409ca51d70ef4b85c0593bb4b109':
  qsvenc: Provide a detailed error message if the parameters are invalid

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-03-05 23:16:29 +00:00
Mark Thompson
9053b08859 Merge commit 'e2399e0c1aeb110456405d23e211066fab6cb041'
* commit 'e2399e0c1aeb110456405d23e211066fab6cb041':
  fate: Error out more gracefully on configure failure

This commit is a noop, the configure failure reporting issue does not
appear to affect FFmpeg.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-03-05 23:14:58 +00:00
Mark Thompson
706d2c66e8 Merge commit 'dc40e64adb1712b1209c018914a44f809bc32664'
* commit 'dc40e64adb1712b1209c018914a44f809bc32664':
  hvcc: zero initialize the nal buffers past the last written byte

This commit is a noop, see 9482ec1b20

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-03-05 22:34:24 +00:00
Mark Thompson
085a2eb8e2 Merge commit '8ca39b855a7b0e4d9f726fa9d285bc8edcb953e6'
* commit '8ca39b855a7b0e4d9f726fa9d285bc8edcb953e6':
  qsv: Default PicStruct to progressive

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-03-05 22:31:03 +00:00
Rostislav Pehlivanov
8218249f1f parseutils: accept only full "ms" suffix
The commit which added those was pushed prematurely before anyone could object
to illogical suffixes like just m for milliseconds. Without this, we'd be locked
into never being able to implement the "m" suffix for minutes.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-03-05 20:38:35 +00:00
Timo Rothenpieler
5787908e8c configure: rename cuda to ffnvcodec
Right now, if someone configures ffmpeg with for example --enable-nvenc they will
get an error message complaining about missing cuda.
This is very confusing and already has lead people into installing the CUDA SDK,
even though it's not what they need.

This will make it complain about ffnvcodec instead.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-03-05 21:09:22 +01:00
James Almer
df3a2ff767 avcodec/cbs: use a reference to the assembled CodedBitstreamFragment buffer when writing packets
This saves one malloc + memcpy per packet

The CodedBitstreamFragment buffer is padded to follow the requirements
of AVPacket.

Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-05 11:44:51 -03:00
Zhong Li
2d6b3f3a9d qsvenc: Provide a detailed error message if the parameters are invalid
Currently it always shows "Selected ratecontrol mode is not supported
by the QSV runtime. Choose a different mode", but sometimes it is not
accurate.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2018-03-05 10:39:17 +01:00
Tobias Rapp
69995a94d8 fftools/ffmpeg: update print_report to use AVBPrint API
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-03-05 09:24:55 +01:00
Tobias Rapp
a194e9c415 fftools/ffmpeg: fix progress log message in case pts is not available
Also fixes sign prefix for progress report.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-03-05 09:24:40 +01:00
Matt Wolenetz
133ddd3875 avformat/mov: Initialize a potential gap in ctts_data in mov_build_index
mov_read_ctts ignores ctts entries having count <= 0. Generally, the
aggregate of all ctts entries' count fields resulting from mov_read_ctts
can be less than the corresponding sample_count.

mov_build_index attempts to normalize any existing ctts_data counts to
be 1, to make a 1-1 mapping of a ctts_data entry to a sample.

That 1-1 mapping left a tail of uninitialized ctts_data entries when the
aggregate, normalized ctts_count < sample_count.

Even more generally, later usage of ctts_data may depend on the entire
ctts_allocated_size having been initialized.

This change memsets the entire allocation of the normalized ctts_data in
mov_build_index, to prevent use of uninitialized data later.

BUG=816787

Change-Id: I7fd7db255e3aeed076ee32c90cb2df211741c052
Reviewed-on: https://chromium-review.googlesource.com/947110
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-05 01:16:34 +01:00
Jerome Borsboom
0ec7eb9305 avcodec/vaapi: mask unused bits in bitplane_present.value
Due to the union construct, unused bits in bitplane_present.value might
be uninitialized even when the used bits are all set to a value.
Masking the unused bits prevents spurious true values when all used
bits are unset, e.g. skipped pictures.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-03-04 22:17:33 +00:00
Jerome Borsboom
883bdc5fb7 avcodec/vaapi: add fields for VAAPI VC-1 interlaced decoding
Pass necessary bitstream elements to the VAAPI VC-1 decoder in order
to start doing interlaced decoding in hardware.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-03-04 22:17:26 +00:00
Jerome Borsboom
1160d1d478 avcodec/vc1: add bitstream elements for VAAPI VC-1 interlaced decoding
We need to pass more bitstream elements to the VAAPI VC-1 decoder in
order to start doing interlaced decoding in hardware.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-03-04 22:16:58 +00:00
Philip Langdale
dd3f1e3a11 swscale: Introduce a helper to identify semi-planar formats
This cleans up the ever-more-unreadable list of semi-planar
exclusions for selecting the planar copy wrapper.
2018-03-03 15:20:19 -08:00
Jun Zhao
1c7f1f38c5 doc/bitstream_filters: correct dump_extra bsfs docs.
Update dump_extra bit stream filter docs to follow current
code implement.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-03 23:01:41 +01:00
Tianqiang Liu
5df9d75b44 avformat/mov: Add manu/modl to mov_read_udta_string.
Documentation: http://mp4ra.org/atoms.html

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-03 23:01:41 +01:00
Matthieu Bouron
2238e54ef0 avcodec/mediacodecdec: factorize codec declarations 2018-03-03 21:18:39 +01:00
Matthieu Bouron
af167d970b avcodec/mediacodecdec: factorize common extradata functions 2018-03-03 21:18:39 +01:00
Matthieu Bouron
535e020225 avcodec/mediacodecdec: add missing "libavutil/internal.h" include
libavutil/internal.h defines NULL_IF_CONFIG_SMALL.
2018-03-03 21:18:39 +01:00