summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc_hevc.c
Commit message (Collapse)AuthorAge
* avcodec/nvenc: add udu_sei option to import user data unregistered SEIsLimin Wang2021-12-25
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add constrainedFrame encoding supportLimin Wang2021-09-06
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add single slice intra refresh supportLimin Wang2021-09-06
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add intra refresh supportLimin Wang2021-09-06
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add chroma qp offset supportRicardo Monteiro2021-08-08
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add option to disable all extra SEI dataTimo Rothenpieler2021-06-06
| | | | | | | | | | | With these triggering a lot of crashes recently, an option to globally disable all of them is added as a tool to work around those crashes in case the SEI data is not needed by the user. Also re-enables s12m for hevc_nvenc, since the issue is not specifically with that, but it affects all SEI data. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: disable s12m timestamps by defaultTimo Rothenpieler2021-05-29
| | | | | Leads to weird crashes with valid looking input data for otherwise unknown reasons.
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Remove deprecated old aliases for NVENC encodersAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 888a5c794778a2f2aad22e9b4a3952dff92b11fa. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: use AVCodecContext.get_encode_buffer()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: don't disable b-frames by defaultRicardo Monteiro2021-02-22
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: mark newly deprecated rc modesTimo Rothenpieler2020-10-21
|
* avcodec/nvenc_hevc: add ff_nvenc_encode_flush() for .flushLimin Wang2020-09-03
| | | | | | for the .capabilities have AV_CODEC_CAP_ENCODER_FLUSH, so it's better to add it. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/nvenc: add new Video SDK 10 featuresRoman Arzumanyan2020-07-01
| | | | | | | | 1. new Nvenc presets 2. new multipass encode modes 3. low delay key frame scale Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: rename tc option to something more uniqueTimo Rothenpieler2020-06-30
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add a53cc option for hevc_nvencTimo Rothenpieler2020-06-30
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: support for HEVC timecode passthroughLimin Wang2020-06-28
| | | | | Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/encode: restructure the core encoding codeJames Almer2020-06-18
| | | | | | | | | | | | | | | | This commit follows the same logic as 061a0c14bb, but for the encode API: The new public encoding API will no longer be a wrapper around the old deprecated one, and the internal API used by the encoders now consists of a single receive_packet() callback that pulls frames as required. amf encoders adapted by James Almer librav1e encoder adapted by James Almer nvidia encoders adapted by James Almer MediaFoundation encoders adapted by James Almer vaapi encoders adapted by Linjie Fu v4l2_m2m encoders adapted by Andriy Gelman Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc_hevc: add spatial-aq and temporal-aq option to consistent with ↵Limin Wang2020-05-03
| | | | | | nvenc_h264 Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/nvenc: add hardware config metadataMark Thompson2020-04-27
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec: Add explicit capability flag for encoder flushingPhilip Langdale2020-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, there was no way to flush an encoder such that after draining, the encoder could be used again. We generally suggested that clients teardown and replace the encoder instance in these situations. However, for at least some hardware encoders, the cost of this tear down/replace cycle is very high, which can get in the way of some use-cases - for example: segmented encoding with nvenc. To help address that use case, we added support for calling avcodec_flush_buffers() to nvenc and things worked in practice, although it was not clearly documented as to whether this should work or not. There was only one previous example of an encoder implementing the flush callback (audiotoolboxenc) and it's unclear if that was intentional or not. However, it was clear that calling avocdec_flush_buffers() on any other encoder would leave the encoder in an undefined state, and that's not great. As part of cleaning this up, this change introduces a formal capability flag for encoders that support flushing and ensures a flush call is a no-op for any other encoder. This allows client code to check if it is meaningful to call flush on an encoder before actually doing it. I have not attempted to separate the steps taken inside avcodec_flush_buffers() because it's not doing anything that's wrong for an encoder. But I did add a sanity check to reject attempts to flush a frame threaded encoder because I couldn't wrap my head around whether that code path was actually safe or not. As this combination doesn't exist today, we'll deal with it if it ever comes up.
* nvenc: implement flush to help allow an encoder to be re-usedPhilip Langdale2020-01-08
| | | | | | It can be useful to re-use an encoder instance when doing segmented encodings, and this requires flushing the encoder at the start of each segment.
* avcodec/nvenc: switch to dedicated dpb_size optionTimo Rothenpieler2019-09-27
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add b_as_ref support for HEVCRoman Arzumanyan2019-02-14
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | 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>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
* avcodec/nvenc: migrate to new encode APITimo Rothenpieler2017-09-07
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: Add default value for AVCodecContext::refsSrinath K R2017-06-01
| | | | | | | | | | | | | AVCodecContext::refs is used to control the DPB size to be used by the encoder. The default value for AVCodecContext::refs as set in libavcodec/options_table.h is 1. This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in order to let the driver take the decision of the correct DPB size to use in all cases. Signed-off-by: Srinath K R <skr@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add weighted prediction supportSumit Agarwal2017-05-10
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add fractional CQ supportBen Chang2017-05-10
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: deprecated old rc modes, add new onesTimo Rothenpieler2017-05-09
|
* avcodec/nvenc: surface allocation reductionBen Chang2017-04-26
| | | | | | | | | | | | | | | | This patch aims to reduce the number of input/output surfaces NVENC allocates per session. Previous default sets allocated surfaces to 32 (unless there is user specified param or lookahead involved). Having large number of surfaces consumes extra video memory (esp for higher resolution encoding). The patch changes the surfaces calculation for default, B-frames, lookahead scenario respectively. The other change involves surface selection. Previously, if a session allocates x surfaces, only x-1 surfaces are used (due to combination of output delay and lock toggle logic). To prevent unused surfaces, changing surface rotation to using predefined fifo. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: Deprecate usage of global_quality, introducing qpTimo Rothenpieler2017-03-23
|
* avcodec/nvenc: add initial QP value optionsKonda Raju2017-03-01
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: allow forcing keyframes by defaultTimo Rothenpieler2017-02-20
|
* avcodec/nvenc: Add bluray_compat basic implementationMiroslav Slugen2017-01-01
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: Make AUD optional for h264_nvenc and hevc_nvencMiroslav Slugen2017-01-01
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: maximum usable surfaces are limited to maximum registered framesMiroslav Slugeň2016-11-22
| | | | | | | Maximum usable surfaces is limited to MAX_REGISTERED_FRAMES constant in nvenc.h Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc_hevc: Added missing option -temporal_aqSven C. Dack2016-10-19
| | | | | | The option is present in h264_nvenc, but was missing from hevc_nvenc. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add support for forcing intra/idr framesTimo Rothenpieler2016-10-12
|
* avcodec/nvenc: nicely align AVOptionsTimo Rothenpieler2016-09-28
|
* avcodec/nvenc: Extended rate-control support as provided by SDK 7Yogender Gupta2016-09-28
| | | | | Merged from libav commit by Yogender Gupta: https://git.libav.org/?p=libav.git;a=commitdiff;h=70de2ea4261f860457a04e3d0c58c5543f403325
* avcodec/nvenc: add HEVC REXT profileTimo Rothenpieler2016-09-28
|
* avcodec/nvenc: added support for rate control lookaheadOliver Collyer2016-08-28
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: added support for 10 bit HEVC encodingOliver Collyer2016-08-28
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: Bring encoder names in line with other encodersTimo Rothenpieler2016-06-25
|
* avcodec/nvenc: rework library load and GPU selectionAndrey Turkin2016-05-31
| | | | | | | Use explicit nvenc capability checks instead to determine usable devices instead of SM versions. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: allow configuring number of surfacesAndrey Turkin2016-05-31
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: use INIT_CLEANUP to deal with init failuresAndrey Turkin2016-05-31
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add rate control optionAndrey Turkin2016-05-31
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: convert tier to AVOptionsAndrey Turkin2016-05-31
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>