Commit Graph

1611 Commits

Author SHA1 Message Date
wm4 f53d483ded 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 6c4b771bec lavc: Add flag to allow profile mismatch with hardware decoding 2017-04-26 22:57:57 +01:00
Kostya Shishkov e5d8289b98 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 efa6004baf 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 bb67de094c lavc: Drop deprecated stream codec tag
Deprecated in 07/2015.
2017-03-23 10:09:17 +01:00
Vittorio Giovara a6d83e76c7 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 6a1ea86143 lavc: Drop deprecated global afd field
Deprecated in 08/2014.
2017-03-23 10:09:16 +01:00
Vittorio Giovara ea4584a6a7 lavc: Drop deprecated avctx codec name
Deprecated in 04/2014.
2017-03-23 10:09:16 +01:00
Vittorio Giovara f87fdb41d6 lavc: Drop deprecated codec flags
Deprecated between 04/2014 - 05/2015.
2017-03-23 10:09:16 +01:00
Vittorio Giovara 90f17e8cee lavc: Drop deprecated unused public members
Deprecated in 07/2014.
2017-03-23 10:09:15 +01:00
Vittorio Giovara 48f8194418 lavc: Drop deprecated emu edge functionality
Deprecated in 01/2014.
2017-03-23 10:09:15 +01:00
Vittorio Giovara a82c4b9989 lavc: Drop deprecated av_fast_malloc() compatibility
Deprecated in 10/2013.
2017-03-23 10:09:15 +01:00
Vittorio Giovara e217de2c85 lavc: Drop deprecated macroblock type symbols
Deprecated in 10/2013.
2017-03-23 10:09:15 +01:00
Vittorio Giovara c8ad15dac1 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 abc605b645 lavc: Drop deprecated error rate option
Deprecated in 10/2013.
2017-03-23 10:09:14 +01:00
Diego Biurrun 7675bf98cc lavc: Remove deprecated XvMC support hacks
Deprecated in 11/2013.
2017-03-23 10:09:14 +01:00
Vittorio Giovara 7603d2049d 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 87efb9720c lavc: Drop deprecated extended aspect ratio symbol
Deprecated in 10/2013.
2017-03-23 10:09:14 +01:00
Vittorio Giovara 79ff864de1 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 a759f2fb92 lavc: Drop deprecated debug mv functionality
Deprecated in 10/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara bb03e63953 lavc: Drop deprecated way of setting codec dimensions
Deprecated in 10/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara 2e94f19e7c lavc: Drop deprecated voxware codec entry
Deprecated in 08/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara fb8ed2fcc6 lavc: Drop deprecated VDPAU codec capability
Deprecated in 07/2013.
2017-03-23 10:09:13 +01:00
Vittorio Giovara c9123a7abc lavc: Drop deprecated lowres option
Deprecated in 04/2013.
2017-03-23 10:09:12 +01:00
Vittorio Giovara 614e321c5d lavc: Drop deprecated missing sample log function
Deprecated in 01/2013.
2017-03-23 10:09:12 +01:00
Vittorio Giovara f8e969dd46 lavc: Drop deprecated chroma subsample function
Deprecated in 11/2012.
2017-03-23 10:09:12 +01:00
wm4 b60ba5c4e2 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 4f33b96ad9 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 c86e45c7b2 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 b2277ac2dd Add Apple Pixlet decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-03-01 11:52:29 -05:00
Mark Thompson 4584f1b2c2 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 f7013b3531 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 25187e7356 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 e70b44521e 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 d569c80f8e lavc: add support for filtering packets before decoding 2016-12-14 09:06:45 +01:00
Anton Khirnov f2c4d4f444 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 0adc0e3c67 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 b63c141c4e Fix some mismatches between function parameter and doxygen parameter names. 2016-11-21 14:29:10 +01:00
Luca Barbato fecaace32a avpacket: Mark src pointer as constant 2016-11-17 19:41:12 +01:00
Vittorio Giovara 5e2fc0be9b lavc: bsf: Document input/output codecparam alloc/init process 2016-10-12 11:06:58 -04:00
Vittorio Giovara e7fa827480 avcodec: Document AV_PKT_DATA_PALETTE side data type 2016-10-02 15:42:03 -04:00
Yogender Gupta d74dc4a014 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 1ee69c9e13 av1: Add codec_id and basic demuxing support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-08-24 14:45:08 +02:00
Anton Khirnov e85f6f7f8d lavc: allow using AVCodecContext.hw_frames_ctx for decoding
For now it will only be used by the default get_buffer2 callback for
allocating hw frames.
2016-06-21 19:52:17 +02:00
Paul B Mahol 470cd0c5fe Add TrueMotion 2.0 Real Time decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-20 15:48:12 -04:00
Paul B Mahol d78fd2fa21 Add MagicYUV decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-20 15:45:51 -04:00
Vittorio Giovara 75872d77d2 lavc: Document AV_PKT_DATA_NEW_EXTRADATA 2016-06-17 11:02:40 -04:00
Anton Khirnov 90f469aa2b lavc: add H.264 MVC profiles 2016-06-12 20:27:53 +02:00
Francois Cartegnie ad61da054b jpeg2000: Fix profile define values
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-24 12:22:57 +02:00
Anton Khirnov 2ef6dab0a7 lavc: document that avcodec_close() should not be used
We cannot deprecate it until the new parser API is in place, because of
the way libavformat works. But the majority of the users can already
simply replace it with avcodec_free_context(), which will simplify the
transition once it is finally deprecated.
2016-05-23 06:46:18 +02:00