Commit Graph

1618 Commits

Author SHA1 Message Date
James Almer
f6171471e6 avcodec: rename the AV1 profiles
Use the proper names instead of numbers

Signed-off-by: James Almer <jamrial@gmail.com>
2018-03-29 13:02:56 -03:00
Luca Barbato
43778a501f Support AV1 encoding using libaom 2018-03-12 12:10:33 +01:00
Mark Thompson
5b145290df lavc: Add support for increasing hardware frame pool sizes
AVCodecContext.extra_hw_frames is added to the size of hardware frame
pools created by libavcodec for APIs which require fixed-size pools.
This allows the user to keep references to a greater number of frames
after decode, which may be necessary for some use-cases.

It is also added to the initial_pool_size value returned by
avcodec_get_hw_frames_parameters() if a fixed-size pool is required.
2018-02-11 22:00:33 +00:00
Mark Thompson
2117725dc5 lavc: Mark all AVHWAccel structures as const 2017-12-19 23:24:24 +00:00
Mark Thompson
e2d575543c lavc: Deprecate av_hwaccel_next() and av_register_hwaccel() 2017-12-19 23:22:31 +00:00
Mark Thompson
720cf4e6e7 lavc: Add codec metadata to indicate hardware support 2017-12-19 23:21:53 +00:00
wm4
47687a2f8a avcodec: add metadata to identify wrappers and hardware decoders
Explicitly identify decoder/encoder wrappers with a common name. This
saves API users from guessing by the name suffix. For example, they
don't have to guess that "h264_qsv" is the h264 QSV implementation, and
instead they can just check the AVCodec .codec and .wrapper_name fields.

Explicitly mark AVCodec entries that are hardware decoders or most
likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
API users listing hardware decoders in a more generic way. The proposed
AVCodecHWConfig does not provide this information fully, because it's
concerned with decoder configuration, not information about the fact
whether the hardware is used or not.

AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
implementations in case the hardware is not capable.

Based on a patch by Philip Langdale <philipl@overt.org>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-12-14 16:58:45 +01:00
wm4
b46a77f19d lavc: external hardware frame pool initialization
This adds a new API, which allows the API user to query the required
AVHWFramesContext parameters. This also reduces code duplication across
the hwaccels by introducing ff_decode_get_hw_frames_ctx(), which uses
the new API function. It takes care of initializing the hw_frames_ctx
if needed, and does additional error handling and API usage checking.

Support for VDA and Cuvid missing.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2017-10-19 17:10:59 +02:00
Mark Thompson
64a5260c69 lavc: Add flag to allow profile mismatch with hardware decoding 2017-04-26 22:57:57 +01:00
Kostya Shishkov
189157c3fc Add ClearVideo decoder
Only I-frames are decoded for now.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-04-25 15:39:10 +02:00
Paul B Mahol
95a8a03a19 Add FM Screen Capture Codec decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-04-13 12:35:35 +02:00
Vittorio Giovara
0648dec19d lavc: Drop deprecated stream codec tag
Deprecated in 07/2015.
2017-03-23 10:09:17 +01:00
Vittorio Giovara
94eed68ace lavc: Drop deprecated options moved to private contexts
Deprecated in 10/2014 and 07/2015.
2017-03-23 10:09:17 +01:00
Vittorio Giovara
5182a28b5d lavc: Drop deprecated global afd field
Deprecated in 08/2014.
2017-03-23 10:09:16 +01:00
Vittorio Giovara
4476027d93 lavc: Drop deprecated avctx codec name
Deprecated in 04/2014.
2017-03-23 10:09:16 +01:00
Vittorio Giovara
bb45d11282 lavc: Drop deprecated codec flags
Deprecated between 04/2014 - 05/2015.
2017-03-23 10:09:16 +01:00
Vittorio Giovara
302554835e lavc: Drop deprecated unused public members
Deprecated in 07/2014.
2017-03-23 10:09:15 +01:00
Vittorio Giovara
b3739599bd lavc: Drop deprecated emu edge functionality
Deprecated in 01/2014.
2017-03-23 10:09:15 +01:00
Vittorio Giovara
06c20d3e32 lavc: Drop deprecated av_fast_malloc() compatibility
Deprecated in 10/2013.
2017-03-23 10:09:15 +01:00
Vittorio Giovara
da5ba26b9e lavc: Drop deprecated macroblock type symbols
Deprecated in 10/2013.
2017-03-23 10:09:15 +01:00
Vittorio Giovara
cbebc3251b lavc: Drop deprecated public symbols
qscale types and maximum number of bframes deprecated in 10/2013.
Negative linesizes deprecated in 11/2013.
xvidmmx deprecated in 08/2014.
2017-03-23 10:09:15 +01:00
Vittorio Giovara
72dc7ddd18 lavc: Drop deprecated error rate option
Deprecated in 10/2013.
2017-03-23 10:09:14 +01:00
Diego Biurrun
dcc39ee10e lavc: Remove deprecated XvMC support hacks
Deprecated in 11/2013.
2017-03-23 10:09:14 +01:00
Vittorio Giovara
0871e23377 lavc: Drop deprecated architectures symbols
Alpha deprecated in 11/2013.
Sh4 and sparc deprecated in 01/2014.
2017-03-23 10:09:14 +01:00
Vittorio Giovara
c06e739291 lavc: Drop deprecated extended aspect ratio symbol
Deprecated in 10/2013.
2017-03-23 10:09:14 +01:00
Vittorio Giovara
0c7986df44 lavc: Drop deprecated workaround bugs options
Illegal ac_vlc and old msmpeg4 detection deprecated in 10/2013.
2017-03-23 10:09:14 +01:00
Vittorio Giovara
8933ac2079 lavc: Drop deprecated debug mv functionality
Deprecated in 10/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara
6dca24cd1d lavc: Drop deprecated way of setting codec dimensions
Deprecated in 10/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara
1146bb3bab lavc: Drop deprecated voxware codec entry
Deprecated in 08/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara
7b91704118 lavc: Drop deprecated VDPAU codec capability
Deprecated in 07/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara
b748c280e5 lavc: Drop deprecated lowres option
Deprecated in 04/2013.
2017-03-23 10:09:12 +01:00
Vittorio Giovara
0337adfab5 lavc: Drop deprecated missing sample log function
Deprecated in 01/2013.
2017-03-23 10:09:12 +01:00
Vittorio Giovara
bc143ce1ac lavc: Drop deprecated chroma subsample function
Deprecated in 11/2012.
2017-03-23 10:09:12 +01:00
wm4
16a163b55a lavc: Add hwaccel_flags field to AVCodecContext
This "reuses" the flags introduced for the av_vdpau_bind_context() API
function, and makes them available to all hwaccels. This does not affect
the current vdpau API, as av_vdpau_bind_context() should obviously
override the AVCodecContext.hwaccel_flags flags for the sake of
compatibility.
2017-03-20 23:15:43 +00:00
Kieran Kunhya
5f794aa165 Add Cineform HD Decoder
Decodes YUV 4:2:2 10-bit and RGB 12-bit files.
Older files with more subbands, skips, Bayer, alpha not supported.

Further fixes and refactorings by Anton Khirnov <anton@khirnov.net>,
Diego Biurrun <diego@biurrun.de>, Vittorio Giovara <vittorio.giovara@gmail.com>

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-03-09 18:37:29 +01:00
wm4
8a60bba0ae avcodec: clarify some decoding/encoding API details
Make it clear that there is no timing-dependent behavior. In particular,
there is no state in which both input and output are denied, and where
you have to wait for a while yourself to make progress (apparently some
hardware decoders like to do this).

Avoid wording that makes references to time. It shouldn't be mistaken
for some kind of asynchronous API (like POSIX read() can return EAGAIN
if there is no new input yet). It's a state machine, so try to use
appropriate terms.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-03-09 17:07:24 +01:00
Paul B Mahol
aba5b94859 Add Apple Pixlet decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-01 11:52:29 -05:00
Mark Thompson
44f2eda39f lavc: Add device context field to AVCodecContext
For use by codec implementations which can allocate frames internally.
2017-02-13 20:14:27 +00:00
wm4
577326d430 lavc: deprecate refcounted_frames field
No deprecation guards, because the old decode API (for which this field
is needed) doesn't have any either.

This field should be removed together with the old decode calls.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2017-02-01 10:47:46 +01:00
Anton Khirnov
019ab88a95 lavc: add an option for exporting cropping information to the caller
Also, add generic code for handling cropping, so the decoders can export
just the cropping size and not bother with the rest.
2017-01-12 16:24:15 +01:00
Anton Khirnov
d4a91e6534 pthread_frame: do not run hwaccel decoding asynchronously unless it's safe
Certain hardware decoding APIs are not guaranteed to be thread-safe, so
having the user access decoded hardware surfaces while the decoder is
running in another thread can cause failures (this is mainly known to
happen with DXVA2).

For such hwaccels, only allow the decoding thread to run while the user
is inside a lavc decode call (avcodec_send_packet/receive_frame).
2016-12-19 08:10:22 +01:00
Anton Khirnov
972c71e9cb lavc: add support for filtering packets before decoding 2016-12-14 09:06:45 +01:00
Anton Khirnov
061a0c14bb decode: restructure the core decoding code
Currently, the new decoding API is pretty much just a wrapper around the
old deprecated one. This is problematic, since it interferes with making
full use of the flexibility added by the new API. The old API should
also be removed at some future point.

Reorganize the code so that the new send_packet/receive_frame functions
call the actual decoding directly and change the old deprecated
avcodec_decode_* functions into wrappers around the new API.

The new internal API for decoders is now changing as well. Before this
commit, it mirrors the public API, so the decoders need to implement
send_packet() and receive_frame() callbacks. This turns out to require
awkward constructs in both the decoders and the generic code. After this
commit, the decoders only implement the receive_frame() callback and
call a new internal function, ff_decode_get_packet() to obtain input
data, in the same manner to how the bitstream filters now work.

avcodec will now always make a reference to the input packet, which means
that non-refcounted input packets will be copied. Keeping the previous
behaviour, where this copy could sometimes be avoided, would make the
code significantly more complex and fragile for only dubious gains,
since packets are typically small and everyone who cares about
performance should use refcounted packets anyway.
2016-12-14 09:06:44 +01:00
Vittorio Giovara
2fb6acd9c2 lavc: Add spherical packet side data API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-07 14:34:34 -05:00
Diego Biurrun
a1d9de304f Fix some mismatches between function parameter and doxygen parameter names. 2016-11-21 14:29:10 +01:00
Luca Barbato
adb0e941c3 avpacket: Mark src pointer as constant 2016-11-17 19:41:12 +01:00
Vittorio Giovara
14e7e19a90 lavc: bsf: Document input/output codecparam alloc/init process 2016-10-12 11:06:58 -04:00
Vittorio Giovara
b8d5070db6 avcodec: Document AV_PKT_DATA_PALETTE side data type 2016-10-02 15:42:03 -04:00
Yogender Gupta
de64dd13cb avcodec: Add the extended pixel format profile for HEVC
It is supported by the NVIDIA video SDK 7.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-09-19 10:02:43 +02:00
Luca Barbato
d42809f983 av1: Add codec_id and basic demuxing support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-08-24 14:45:08 +02:00