There is no reason to keep this intact when decoding failed, specially
as private_ref is supposed to always be NULL when a frame is returned to
the user.
With there being two hwaccels that use the CUDA pix_fmt now, just
relying on the pix_fmt to identify the selected hwaccel is not enough
anymore.
So this checks if the user explicitly selected a hwaccel, and only
accepts that one.
* commit '173b56218f39c6463be0e182259e2deead106936':
lavf: make avio_read_partial() public
swscale: Do not expand a macro with 'defined' in it
configure: Include d3d11va_extralibs in libavutil
This commit is a noop, see
69218b4198add7b3bc3f5d76674756
Merged-by: James Almer <jamrial@gmail.com>
* commit 'feed239021bad89743d5e7989b426ae594322eb7':
yadif: Account for the buffer alignment while processing the frame edges
See 221f902f1d
Merged-by: James Almer <jamrial@gmail.com>
* commit '0c99b900d874b60ce89b94742b2215f163c87a2b':
png: Support RGBA64 pixel format
This commit is a noop, see 97da38c99b
Merged-by: James Almer <jamrial@gmail.com>
* commit 'b78c30d7ec26af67c00ce2002709a189f6a87a7e':
lavc: Add mpeg2_metadata bitstream filter
lavc: Add coded bitstream read/write support for MPEG-2
cbs_h2645: Return error if writing fails
h264dec: use a large enough field for reference list modification values
xwddec: support 8bpp grayscale
This commit is a noop, see
b9c94e826e2aff557c6ab4c915f4b3686e388bbb569721ac8d
Merged-by: James Almer <jamrial@gmail.com>
* commit 'e3e8eab359238486dc233f7aa89b7bb3cb19ec38':
vaapi_h265: Add support for AUD NAL units
vaapi_h265: Convert to use coded bitstream infrastructure
vaapi_h264: Add support for SEI recovery points
vaapi_h264: Add support for AUD NAL units
vaapi_h264: Convert to use coded bitstream infrastructure
lavc: Add hevc_metadata bitstream filter
lavc: Add h264_redundant_pps bitstream filter
lavc: Add h264_metadata bitstream filter
lavc: Add trace_headers bitstream filter
lavc: Add coded bitstream read/write support for H.265
lavc: Add coded bitstream read/write support for H.264
lavc: Add coded bitstream read/write API
pixfmt: Support chroma-derived and ictcp color matrices
h264: Add support for alternative transfer characterics SEI
vaapi_encode: Move quality option to common code
This commit is a noop, see
9c878651db8c34a2024df3571048666734eef6b8b4c915f4b39b0c7aa0e49c7d70b49ba308872b048b2630629403f982bbca2e29ca2a9f281b68b0260bc7575ced00179664bc038a51258c
Merged-by: James Almer <jamrial@gmail.com>
* commit '1329c08ad6d2ddb304858f2972c67b508e8b0f0e':
hevc: Validate the number of long term reference pictures
See ea38e5a6b7
Merged-by: James Almer <jamrial@gmail.com>
* commit 'b88da98b34809dedf8882d43ed543632ed233538':
hevc: Improve stream constraint values in common header
h264: Add stream constraint values to the common header
This commit is a noop, see
d05444d2c6b1374e925c
Merged-by: James Almer <jamrial@gmail.com>
* commit 'defe307fb22beca60a632e976ab97e5edd4aee25':
mov: move stsd finalization to an appropriate place
mov: Do not set stsd_count if mov_read_stsd() fails
mov: log and return early on non-positive stsd entry counts
See 8b43ee4054656feb641d
Merged-by: James Almer <jamrial@gmail.com>
* commit 'b90fdb2c7199cc8b0e8d994fafba1fb4dc181d88':
hevcdec: add a CUVID hwaccel
Adapted for ffmpeg by Timo Rothenpieler.
Merged-by: James Almer <jamrial@gmail.com>
* commit '00fd914d4912322212e924c15f325cebf2fde8d3':
hevcdec: set the active SPS before calling get_format()
Merged-by: James Almer <jamrial@gmail.com>
* commit 'a58873b11198d04670b7f98f5a8a749d742db7c5':
avconv: when using -loop option bail out if seek to start fails
Merged-by: James Almer <jamrial@gmail.com>
* commit '004ea63714e31ed43326ad00d7420d104f0dab38':
cuvid: add cuvid.h to SKIPHEADERS
This commit is a noop, nvdec.h compiles just fine since it doesn't
depend on external headers.
Merged-by: James Almer <jamrial@gmail.com>
* commit 'b9129ec4668c511e0a79e25c6f25d748cee172c9':
h264dec: add a CUVID hwaccel
decode: add a per-frame private data for hwaccel use
decode: add a mechanism for performing delayed processing on the decoded frames
decode: add a method for attaching lavc-internal data to frames
decode: avoid leaks on failure in ff_get_buffer()
This commit is a noop, see
4776c614249f1cfd88af7fa64514c881c021c6a20e00624389
Merged-by: James Almer <jamrial@gmail.com>
Some parts of the code are based on a patch by
Timo Rothenpieler <timo@rothenpieler.org>
Merges Libav commit b9129ec466.
Due to the name clash with our cuvid decoder, rename it to nvdec.
This commit also changes the Libav code to dynamic loading of the
cuda/cuvid libraries.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Currently, AVHWAccels are looked up using a (codec_id, pixfmt) tuple.
This means it's impossible to have 2 decoders for the same codec and
using the same opaque hardware pixel format.
This breaks merging Libav's CUVID hwaccel. FFmpeg has its own CUVID
support, but it's a full stream decoder, using NVIDIA's codec parser.
The Libav one is a true hwaccel, which is based on the builtin software
decoders.
Fix this by introducing another field to disambiguate AVHWAccels, and
use it for our CUVID decoders. FF_CODEC_CAP_HWACCEL_REQUIRE_CLASS makes
this mechanism backwards compatible and optional.
cuvid.c is used by Libav's CUVID hwaccel. Resolve the conflict and
avoid future merge problems by renaming our decoder.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
This will be useful in the CUVID hwaccel. It should also eventually
replace current decoder-specific mechanisms used by various other
hwaccels.
Merges Libav commit 704311b294.
This gives FFmpeg libs a field that they can freely and safely use.
Avoiding the need of wrapping of a users opaque_ref field and its issues.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ff_alloc_packet have been deprecated, switch to use
ff_alloc_packet2.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ff_alloc_packet have been deprecated, switch to use the
ff_alloc_packet2.
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Arttu Ylä-Outinen <arttu.yla-outinen@tut.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
The user-supplied value for timecode_rate in drawtext is rounded
to nearest integer. So, a supplied value of 0.49 or lower is rounded to 0.
This throws a misleading error message which says "Timecode frame rate must be
specified". Changed message to account for values under one.
Also noted supported framerates for drop TC.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: runtime error: value -36211.7 is outside the range of representable values of type 'short'
Fixes: 2992/clusterfuzz-testcase-6649611793989632
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
The spec is correct, it does list these layouts as having rear speakers.
Questionable how many decoders correctly interpret those correctly since
side is way more popular.
Also fixes fate-aac-yoraw-encode.
Reported-by: pkviet <pkv.stream@gmail.com>
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>