Commit Graph

89856 Commits

Author SHA1 Message Date
James Almer 2159d4bbc3 avcodec/hevc_parser: use ff_hevc_uninit_parameter_sets()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 00:17:23 -03:00
James Almer 1f0cf1b2f4 avcodec/hevcdec: use ff_hevc_uninit_parameter_sets()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 00:09:29 -03:00
James Almer 9462b2b820 avcodec/hevc_ps: add a function to uninitialize parameter set buffers
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-21 00:06:30 -03:00
Carl Eugen Hoyos 251f0bcb7b lavf/rawdec: Also probe the last byte of mjpeg streams.
Fixes ticket #6957.
2018-01-21 03:46:40 +01:00
Jorge Ramirez-Ortiz 0b9b7f0b46 avcodec: v4l2_m2m: context: fix raising warning on POLLERR
During the initialization stage, the codec attempts to get free
buffers from the driver before any have been queued (this is to keep
the code simple and generic)

When the kernel driver detects this situation, it returns POLLERR in
revents and ffmpeg therefore raises a warning.

This commit disables the warning since no buffers were queued to the
driver yet.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-01-21 00:37:35 +00:00
Jorge Ramirez-Ortiz 5d5de3eba4 avcodec: v4l2_m2m: remove unnecessary timeout.
Qualcomm's db410c/db820 Venus driver currently present in mainline
kernel has a bug which mishandles the CMD_STOP requests causing the
decoder to block while draining [1].

This patch removes the workaround that was used to prevent that
situation.

Encoding/Decoding tested on db820c.

[1] on CMD_STOP, the driver is flushing all buffers and never raising
IPIPE which ends up in blocking on poll.
2018-01-21 00:37:35 +00:00
Mark Thompson a0c624e299 avcodec: v4l2_m2m: fix races around freeing data on close
Refcount all of the context information. This also fixes a potential
segmentation fault when accessing freed memory  (buffer returned after
the codec has been closed).

Tested-by: Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>
2018-01-21 00:37:35 +00:00
Gyan Doshi 6c1c6c6c71 avfilter/drawtext - implement fix_bounds
When enabled, text, including effects like shadow or box, will be
completely bound within the video frame.

Default value changed to false to keep continuity of behaviour.

Fixes #6960.

Signed-off-by: Kyle Swanson <k@ylo.ph>
2018-01-20 16:30:56 -08:00
Michael Niedermayer 2eecf3cf8e avcodec/snowdec: Fix integer overflow before htaps check
Fixes: runtime error: signed integer overflow: -1094995529 * 2 cannot be represented in type 'int'
Fixes: 4828/clusterfuzz-testcase-minimized-5100849937252352

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-20 21:32:04 +01:00
Michael Niedermayer 725353525e avcodec/ulti: Check number of blocks at init
Fixes: Timeout
Fixes: 4832/clusterfuzz-testcase-4699096590843904

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-20 21:32:04 +01:00
Nikolas Bowe ef5994e09d avformat/lrcdec: Fix memory leak in lrc_read_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-20 21:32:04 +01:00
Henrik Gramner 6f62b0bd4f x86inc: Drop cpuflags_slowctz 2018-01-20 19:23:37 +01:00
Henrik Gramner eb5f063e7c x86inc: Correctly set mmreg variables 2018-01-20 19:23:37 +01:00
Henrik Gramner 6b6edd1216 x86inc: Support creating global symbols from local labels
On ELF platforms such symbols needs to be flagged as functions with the
correct visibility to please certain linkers in some scenarios.
2018-01-20 19:23:37 +01:00
Henrik Gramner 9e4b3675f2 x86inc: Use .rdata instead of .rodata on Windows
The standard section for read-only data on Windows is .rdata. Nasm will
flag non-standard sections as executable by default which isn't ideal.
2018-01-20 19:23:37 +01:00
Henrik Gramner 3a02cbe3fa x86inc: Enable AVX emulation for floating-point pseudo-instructions
There are 32 pseudo-instructions for each floating-point comparison
instruction, but only 8 of them are actually valid in legacy-encoded mode.
The remaining 24 requires the use of VEX-encoded (v-prefixed) instructions
and can therefore be disregarded for this purpose.
2018-01-20 19:23:37 +01:00
Devin Heitmueller b5b4868504 avdevice/decklink: Fix compilation of module on OSX
Clang applies the missing-prototypes warning on C++ files, whereas
gcc only applies it to C.  As a result, the decklink_common.cpp file
fails to build because of missing prototypes in DecklinkDispatch.cpp
(which is #included by decklink_common.cpp).

We don't want to change the actual Blackmagic SDK sources, so
suppress the warning just for that one #include.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:29 +01:00
Devin Heitmueller 5409f065f2 avdevice/decklink: Suppress warning about misuse of struct instead of class
When building with Clang, the following warning is shown:

warning: struct 'IDeckLinkVideoFrame' was previously declared as a
class [-Wmismatched-tags]

The function incorrectly casts IDeckLinkVideoFrame as a struct
instead of a class pointer.

Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:29 +01:00
Vishwanath Dixit fc93eca126 avdevice/decklink: addition of absolute wallclock option for pts source
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:38:27 +01:00
Vishwanath Dixit dfa2523bdd avdevice/decklink: addition of PTS_SRC_NB in enum DecklinkPtsSource
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:29:56 +01:00
Vishwanath Dixit 7c27bbd590 avdevice/decklink: addition of copyts option
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:29:56 +01:00
Marton Balint e3acba0d5d avfilter/formats: remove support for deprecated channel count specification
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-20 18:07:44 +01:00
Carl Eugen Hoyos 7652af9df0 lavf/swfdec: Reduce score when auto-detecting swf files.
Not more than 32bit are tested.
2018-01-20 15:41:40 +01:00
Yogender Gupta 07a96b6251 avcodec/cuviddec: set key frame for decoded frames
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2018-01-19 23:30:14 +01:00
Nikolas Bowe e07649e618 avformat/matroskadec: Fix float-cast-overflow undefined behavior in matroska_parse_tracks()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-19 22:33:31 +01:00
Karthick Jeyapal 0afa171f25 avformat/hlsenc: Add CODECS attribute to master playlist 2018-01-19 17:03:09 +08:00
Rodger Combs 381a4820c6 lavfi/vf_scale_vaapi: set output SAR 2018-01-18 19:18:33 -06:00
James Almer fb3fd4d506 fate: update filter-acrossfade test reference file
<jamrial> durandal_1707: 8088b5d69c broke the acrossfade test
<@durandal_1707> jamrial: there was test?
<jamrial> durandal_1707: fate-filter-acrossfade
<@durandal_1707> what broke?
<jamrial> what used to be one frame is now two
<@durandal_1707> ahh, just update test

Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-18 19:12:50 -03:00
James Almer 4f6b34f1f8 avformat: small AVFormatContext doxy cosmetics
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-18 13:00:25 -03:00
Paul B Mahol 8088b5d69c avfilter/af_afade: acrossfade: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-01-18 16:26:14 +01:00
James Almer 1b5d3c08e3 avformat: small cosmetics after 6512ff72f9
Signed-off-by: James Almer <jamrial@gmail.com>
2018-01-17 19:39:33 -03:00
Gyan Doshi e1e89c0695 avfilter/vidstab: check bytesPerPixel only for packed formats.
libvidstab introduced this variable only for packed formats but in
vf_vidstab*.c, it's checked for all inputs. So the filter errors out for YUV422/444P streams.

Fixes #6736.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-17 20:02:14 +01:00
Jun Zhao 383804edd8 lavfi/deinterlace_vaapi: fix can't show full option information.
use ffmpeg -h filter=deinterlace_vaapi can't get full help information,
the root cause is not setting the flags fileld in options.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-17 20:02:14 +01:00
Mark Thompson 96cf0d8a9c Merge commit 'cbe28bc069dde1d53d937ee10700bb123279c7c8'
* commit 'cbe28bc069dde1d53d937ee10700bb123279c7c8':
  qsv: better to use alignment by 16 and HEVC 10b requires alignment by 32

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 23:29:36 +00:00
Mark Thompson 3895fce26e Merge commit '34c113335b53d83ed343de49741f0823aa1f8cc6'
* commit '34c113335b53d83ed343de49741f0823aa1f8cc6':
  Add support for H.264 and HEVC hardware encoding for AMD GPUs based on AMF SDK

Most of this was already present from 9ea6607d29,
this just applies some minor fixups and adds the general documentation.

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 23:25:27 +00:00
Mark Thompson 68de778ccc Merge commit '7b0b5bc810cdb9ef100492c9a9f2d30602c04336'
* commit '7b0b5bc810cdb9ef100492c9a9f2d30602c04336':
  cmdutils: update copyright year to 2018

This commit is a noop, see bddf31ba75

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 23:01:20 +00:00
Mark Thompson 725ae0e2d0 Merge commit '1efbbfedcaf4a3cecab980273ad809ba3ade2f74'
* commit '1efbbfedcaf4a3cecab980273ad809ba3ade2f74':
  examples/qsvdec: do not set the deprecated field refcounted_frames

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 22:57:09 +00:00
Mark Thompson d204b7ff61 Merge commit 'e23190269fb6e8217d080918893641ba3e0e3556'
* commit 'e23190269fb6e8217d080918893641ba3e0e3556':
  lavu/qsv: add log message for libmfx version

Merged-by: Mark Thompson <sw@jkqxz.net>
2018-01-16 22:57:02 +00:00
Jun Zhao a919ab853e lavc/snow_dwt: add struct MpegEncContext to fix headers check.
add missing struct MpegEncContext, use make checkheaders
found this warning.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-16 22:02:34 +01:00
wm4 27b9f82e2c hwcontext_d3d11va: implement av_hwdevice_get_hwframe_constraints()
D3D11 has rather fine grained per format capabilities for different uses
that can be queried at runtime. Since we don't know what the user wants
to do with the formats when av_hwdevice_get_hwframe_constraints() is
called, we simply return all formats that have the most basic support.
2018-01-16 17:40:24 +01:00
wm4 631c56a8e4 avformat: make avformat_network_init() explicitly optional
It was sort of optional before - if you didn't call it, networking was
initialized on demand, and an ugly warning was logged. Also, the doxygen
comments threatened that it would be made strictly required one day.

Make it explicitly optional. I would prefer to deprecate it fully, but
there might still be legitimate reasons to use this. But the average
user won't need it.

This is needed only for two reasons: to initialize TLS libraries like
OpenSSL and GnuTLS, and winsock.

OpenSSL and GnuTLS were already silently initialized on demand if the
global network init function was not called. They also have various
thread-safety acrobatics, which make concurrent initialization within
libavformat safe. In addition, the libraries are moving towards making
their global init functions safe, which removes all need for central
global init. In particular, GnuTLS 3.5.16 and OpenSSL 1.1.0g have been
found to have safe init functions. In all cases, they use internal
reference counters to avoid that the global uninit functions interfere
with concurrent uses of the library by other API users who called global
init.

winsock should be thread-safe as well, and maintains an internal
reference counter as well.

Since we still support ancient TLS libraries, which do not have this
fixed, and since it's unknown whether winsock and GnuTLS
reinitialization is costly in any way, don't deprecate the libavformat
functions yet.
2018-01-16 12:57:04 +01:00
wm4 6512ff72f9 avformat: deprecate another ffserver API leftover 2018-01-16 12:54:53 +01:00
Michael Niedermayer 83e34ae3c2 avcodec/wavpack: Fix integer overflows in wv_unpack_stereo / mono
Fixes: runtime error: signed integer overflow: 2146276249 + 1487583 cannot be represented in type 'int'
Fixes: 4823/clusterfuzz-testcase-minimized-4551896611160064

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-15 19:55:22 +01:00
Michael Niedermayer 6887e41243 avcodec/jpeg2000: Check sum of sizes of band->prec before allocating
Fixes: OOM
Fixes: 4810/clusterfuzz-testcase-minimized-6034253235093504

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-15 19:55:22 +01:00
Michael Niedermayer a1f38c7589 avcodec/ac3dec_fixed: Fix integer overflow in scale_coefs()
Fixes: runtime error: signed integer overflow: 2147483520 + 128 cannot be represented in type 'int'
Fixes: 4800/clusterfuzz-testcase-minimized-6110372403609600

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-15 19:55:22 +01:00
wm4 cbbb206734 hwcontext_vdpau: implement av_hwdevice_get_hwframe_constraints()
In addition, this does not allow creating frames contexts with sw_format
for which no known transfer formats exist. In theory, we should check
whether the chroma format (i.e. the sw_format) is supported at all by
the vdpau driver, but checking for transfer formats has the same effect.

Note that the pre-existing code adds 1 to priv->nb_pix_fmts[i] for
unknown reason, and some checks need to account for that to check for
empty lists. They are not off-by-one errors.
2018-01-15 12:37:30 +01:00
wm4 43e1ccfea1 http: cosmetics: reformat reconnect check for better readability
The condition was a bit too long, and most editors will break the line
and turn it into an unreadable mess. Move out some of the conditions.

This should not change the behavior.
2018-01-15 12:37:30 +01:00
Robert Nagy 856b7cae9f avfilter/vf_idet: added more YUVA formats to idet query_formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-01-14 23:19:01 +01:00
sfan5 57dbabd9c1 dashdec: Support SegmentTemplate inside Period
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 23:02:26 +08:00
sfan5 01d74c4055 dashdec: Avoid trying to read any segments beyond the last
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-14 23:01:45 +08:00