Fixes: integer overflows
Reported-by: "Xiaohan Wang (王消寒)" <xhwang@chromium.org>
Based on limits in "8.5 Transform coefficient decoding process and picture
construction process prior to deblocking filter process"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This makes sure no field is ever used uninitialized.
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
And remove the function altogether while at it. It's a duplicate of
another.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This effectively copies the side data elements from src instead of
potentially merging them with those already existing in dst.
This by extension also removes the only dependency on existing values
in the dst packet.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Right now, the PTS always starts out as 0, which causes problems on a
seek or when inserting this filter mid-stream.
Initialize it instead to AV_NOPTS_VALUE and copy the PTS from the first
frame instead if this is the case.
When ff_h264_decode_mb_cavlc() failed due to wrong sl->qscale values,
e.g. dquant out of range, set the qscale to be a valid value before
returning -1 and exiting the function. The qscale value can be used
later e.g. in loop filter.
BUG=806122
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This changes how NTSC VANC is extracted from the buffer. In NTSC the vanc data
is interleaved between luma and chroma, and not just the luma as in high
definition resolutions.
In my testing this allows a decklink card encoding valid NTSC closed
captions to pass the caption data to the x264 encoder.
Updated with reviews from Devin Heitmueller and Marton Balint.
Signed-off-by: Ray Tiley <raytiley@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
In a recent commit the default was changed from 0 (component) to 5
(unspecified), however some standards require using 0. With this option, the
user will be able to do so.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
* commit 'a674b31240e99a369059385b03582b35629d190f':
build: Ignore generated mpeg12framerate test binary
This commit is a noop, see fb791d2876
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit '5b6213ef6bf5e0781c83e86926eb0b33a98dc185':
avcodec/vc1dec: fix mby_start for interlaced content
This commit is a noop, see c9f72e4b81
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit '9b09792c90b580842157ca8ce534be434725a841':
lavc/qsv: default la_ds to MFX_LOOKAHEAD_DS_UNKNOWN
This commit is a noop: the code in FFmpeg is slightly different and never
contained the invalid value.
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit 'e412d683fe0349bb8450645813a23158bb4ebd66':
hwcontext: Perform usual uninitialisation on derived frames contexts
This commit is a noop, see 0f93cef2d6
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit 'caecb85014fc81f8734560a150073627eedab78c':
hwcontext: Perform usual initialisation on derived device contexts
This commit is a noop, see 309d660775
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit 'b128be1748f3920a14a98307265df5f2d3433e1d':
vf_*_vaapi: Support increasing hardware frame pool size
Rewritten to apply to common VAAPI code rather than specific filters.
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit '6d86cef06ba36c0ed591e14a2382e9630059fc5d':
lavfi: Add support for increasing hardware frame pool sizes
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit '5b145290df2998a9836a93eb925289c6c8b63af0':
lavc: Add support for increasing hardware frame pool sizes
Merged-by: Mark Thompson <sw@jkqxz.net>
* commit 'bca41545b371efc34e38d1fa8bb12dba8b614da0':
configure: Group code that sets the license string with licensing checks
Merged-by: James Almer <jamrial@gmail.com>
* commit '96e476cc9d414e248692c773d9dce736662572b8':
hwcontext: Fix documentation for av_hwdevice_ctx_alloc()
This commit is a noop, see 9365dfcbf6
Merged-by: James Almer <jamrial@gmail.com>
* commit '8965e2af921ec5926b26d5ae466ee4104bb5262b':
avpacket: Initialize the allocated padding area in side data
This commit is a noop, see 9cbb3fce59
Merged-by: James Almer <jamrial@gmail.com>
* commit '5085f25ace1e74846a0de3369bedd0e22d1a1bdc':
vc1: skip motion compensation when data for last picture is invalid
This commit is a noop. The crash can't be reproduced with ffmpeg.
Merged-by: James Almer <jamrial@gmail.com>
MFX_LOOKAHEAD_DS_UNKNOWN means auto.
-1 is not a valid value.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
AVBR is supported from API 1.3 but only available for Windows
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
These filters do not directly know whether the API they are using will
support dynamic frame pools, so this is somewhat tricky. If the user
sets extra_hw_frames, we assume that they are aware of the problem and
set a fixed size based on that. If not, most cases use dynamic sizing
just like they did previously. The hardware-reverse-mapping case for
hwmap previously had a large fixed size (64) here, primarily as a hack
for QSV use - this is removed and extra_hw_frames will need to be set
for QSV to work since it requires fixed-size pools (as the other cases
do, and which didn't work before).