summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
Commit message (Collapse)AuthorAge
* lavc/nvenc: switch to the new FIFO APIAnton Khirnov2022-02-07
|
* avcodec/nvenc: zero-initialize NV_ENC_REGISTER_RESOURCE structTimo Rothenpieler2022-01-10
|
* 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>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-20
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* 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: make number of slices per frame configurableLimin Wang2021-09-06
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: always set qp cr/cb offsetsTimo Rothenpieler2021-08-09
|
* avcodec/nvenc: make aware of SDK 11.1 driver requirementsTimo Rothenpieler2021-08-08
|
* avcodec/nvenc: add chroma qp offset supportRicardo Monteiro2021-08-08
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* Remove unnecessary avassert.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* 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: extract sei data prep into own functionTimo Rothenpieler2021-06-04
|
* avcodec/nvenc: write out user data unregistered SEIBrad Hards2021-06-04
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: use persistent sei data bufferBrad Hards2021-06-04
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec: Remove deprecated AVCodecContext.coded_frameAndreas Rheinhardt2021-04-27
| | | | | | | | | | Deprecated in 40cf1bbacc6220a0aa6bed5c331871d43f9ce370. (The currently disabled filter vf_mcdeint and vf_uspp were users of this field; they have not been changed, so that whoever wants to fix them can see the state of these filters when they were disabled.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: fix lossless tuning logicTimo Rothenpieler2021-04-18
| | | | | | | | | | | | Relying on the order of the enum is bad. It clashes with the new presets having to sit at the end of the list, so that they can be properly filtered out by the options parser on builds with older SDKs. So this refactors nvenc.c to instead rely on the internal NVENC_LOSSLESS flag. For this, the preset mapping has to happen much earlier, so it's moved from nvenc_setup_encoder to nvenc_setup_device and thus runs before the device capability check.
* avcodec/nvenc: add support for gbrp rgb inputTimo Rothenpieler2021-04-11
|
* avcodec/nvenc: use AVCodecContext.get_encode_buffer()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: base timestamps on frameIntervalPMartin Storsjö2021-03-12
| | | | | | | | | | | | | If b-frames were enabled implicitly (if max_b_frames wasn't set by the caller at all, since a0949d0bcb0eee2f3fffcf9a4810c0295d14c0dc), we wouldn't offset dts at all, producing invalid pts/dts combinations (causing loud warnings by ffmpeg, or muxer errors if passed without an extra cleanup pass). Instead use frameIntervalP for offsetting, which should always be accurate. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* hevc: Use common SEI typesMark Thompson2021-01-21
|
* avcodec/nvenc: fix timestamp offset ticks logicTimo Rothenpieler2021-01-09
|
* lavc: Mark hw_config pointer arrays as constMark Thompson2020-11-08
| | | | They are read-only just like the HWConfig structures they point to.
* avcodec/nvenc: fix build with older SDKsTimo Rothenpieler2020-10-30
|
* avcodec/nvenc: only enforce explicitly set twopass modeTimo Rothenpieler2020-10-30
|
* avcodec/nvenc: only auto-pick vbr rc in cq modeTimo Rothenpieler2020-10-30
|
* avcodec/nvenc: all presets are SDK10 presets nowTimo Rothenpieler2020-10-29
|
* avcodec/nvenc: removed unused and deprecated fieldTimo Rothenpieler2020-10-21
|
* avcodec/nvenc: reduce automated use of deprecated modesTimo Rothenpieler2020-10-21
|
* avcodec/nvenc: mark newly deprecated rc modesTimo Rothenpieler2020-10-21
|
* avcodec/nvenc: use alias to provide deprecated profilesTimo Rothenpieler2020-10-21
|
* avcodec/nvenc: update driver versions for SDK 11.0Timo Rothenpieler2020-10-17
|
* avcodec/utils: calculate frame number of HEVC if the framerate > 30FPSLimin Wang2020-08-16
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec: move ff_alloc_a53_sei() to atsc_53James Almer2020-08-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: fix B-Ref-Mode support check for recent HEVCTimo Rothenpieler2020-07-28
|
* 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: 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/nvenc: add more sei data supportLimin Wang2020-06-28
| | | | 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: honor max bitrate in CQ modeRoman Arzumanyan2020-06-04
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/internal: move packet related functions to their own headerJames Almer2020-06-02
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: zero avg and max bitrate in CQ modeRoman Arzumanyan2020-06-01
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: use framerate if availableZachariah Brown2020-05-15
| | | | | | | | | | | | The h264_nvenc and hevc_nvenc encoders aren't respecting the framerate in the codec context. Instead it was using the timebase which in our use-case was 1/1000 so the encoder was behaving as if we wanted 1000fps. This resulted in poor encoding results due to an extremely low bitrate. Both the amf and qsv encoders already contain similar logic to first check the framerate before falling back to the timebase. Signed-off-by: Zachariah Brown <zachariah@renewedvision.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: refactor dts calculation logicTimo Rothenpieler2020-05-02
| | | | | | | | | | | | | The old approach used some highly complex delta computation math and output-delaying. I do not remember what the initial reasoning behind that was, but given that we can just offset the dts by the amount of bframes, it seems wholy unnecessary. This leaves open an issue with VFR content, for which some more complex logic might be needed. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: offset dts to account for b-frame reorderingTimo Rothenpieler2020-05-01
| | | | | | Fixes ticket #7303 Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add hardware config metadataMark Thompson2020-04-27
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* 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: make sure newly allocated packets are refcountedTimo Rothenpieler2019-11-17
| | | | | | Fixes ticket 8383 Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>