summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc: deprecate AVCodecContext.ticks_per_frameAnton Khirnov2023-05-151-2/+14
| | | | | | | | For encoding, this field is entirely redundant with AVCodecContext.framerate. For decoding, this field is entirely redundant with AV_CODEC_PROP_FIELDS.
* avcodec: use the new AVFrame interlace flags in all decoders and encodersJames Almer2023-05-041-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: fix b-frame DTS behavior with fractional frameratesKyle Manning2023-04-031-1/+2
| | | | | | | | When using fractional framerates (or any fraction with a numerator != 1), DTS values for packets would be calculated incorrectly. Signed-off-by: Kyle Manning <tt2468@irltoolkit.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: avoid failing b_ref_mode check when unsetTimo Rothenpieler2023-03-101-4/+6
|
* avcodec/nvenc: fix potential NULL pointer dereferenceZhao Zhili2023-02-281-2/+7
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* lavu/frame: deprecate reordered_opaqueAnton Khirnov2023-02-041-0/+10
| | | | | It is only used in libavcodec, where it's been superseded by AV_CODEC_CAP_COPY_OPAQUE.
* lavc/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUEAnton Khirnov2023-01-291-20/+82
|
* avcodec/nvenc: fix vbv buffer size in cq modeTimo Rothenpieler2022-12-081-1/+2
| | | | | The CQ calculation gets thrown off and behaves very nonsensical if it isn't set to 0.
* avcodec/nvenc: notify users about rc_lookahead clippingTimo Rothenpieler2022-12-051-0/+3
|
* avcodec/nvenc: explicitly disable lookahead if lacking sufficient surfacesTimo Rothenpieler2022-12-051-0/+1
| | | | | It could already be enabled by the preset, so it needs explicitly disabled in this case.
* avcodec/nvenc: use provided constant for max extradata sizeTimo Rothenpieler2022-11-151-1/+2
|
* avcodec/nvenc: add forgotten X2RGB10 formats to 10-bit-listTimo Rothenpieler2022-11-141-0/+2
|
* avcodec/nvenc: remove unsupported AV1 High ProfileTimo Rothenpieler2022-11-101-2/+2
|
* avcodec/nvenc: fix AV1 darWidth/Height calculationTimo Rothenpieler2022-11-101-0/+20
| | | | | nvenc uses the darWidth/Height fields for the AV1 render_width/height instead, so a different calculation is needed.
* avcodec/nvenc: don't queue and offset dts for AV1Timo Rothenpieler2022-11-061-3/+9
| | | | | | | | dts != pts is actually a spec violation for AV1, given it has no reordering in the classical sense. We don't really need the whole timestamp queue in this case and can just pass through the timestamp as is for both dts and pts.
* avcodec/nvenc: set correct "sei" payload type for AV1Timo Rothenpieler2022-11-051-2/+19
|
* avcodec/nvenc: add AV1 encoding supportTimo Rothenpieler2022-11-051-8/+126
| | | | | | | | | | | | | | | | The encoder seems to be trading blows with hevc_nvenc. In terms of quality at low bitrate cbr settings, it seems to outperform it even. It produces fewer artifacts and the ones it does produce are less jarring to my perception. At higher bitrates I had a hard time finding differences between the two encoders in terms of subjective visual quality. Using the 'slow' preset, av1_nvenc outperformed hevc_nvenc in terms of encoding speed by 75% to 100% while performing above tests. Needless to say, it always massively outperformed h264_nvenc in terms of quality for a given bitrate, while also being slightly faster.
* avcodec/nvenc: only set b_ref_mode when explicitly requestedTimo Rothenpieler2022-11-051-2/+4
|
* avcodec/nvenc: remove unused slice offset queryingTimo Rothenpieler2022-11-011-26/+0
|
* avcodec/nvenc: hardcode color characteristics for internal RGB2YUV conversionTimo Rothenpieler2022-08-061-10/+28
| | | | | | | | nvenc does not appear to use these values as inputs for its built in RGB to YUV conversion, but instead sets them on the output as-is. Testing indicates the input is expected to be sRGB, with the output ending up as limited range bt.470.
* avcodec/nvenc: add support for additional (10 bit) RGB pixel formatsTimo Rothenpieler2022-07-051-0/+10
|
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-161-0/+1
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc/nvenc: switch to the new FIFO APIAnton Khirnov2022-02-071-26/+23
|
* avcodec/nvenc: zero-initialize NV_ENC_REGISTER_RESOURCE structTimo Rothenpieler2022-01-101-1/+1
|
* avcodec/nvenc: add udu_sei option to import user data unregistered SEIsLimin Wang2021-12-251-0/+3
| | | | | 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-201-1/+1
| | | | | | | 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-061-0/+21
| | | | | 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-061-1/+24
| | | | | 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-061-4/+31
| | | | | 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-061-2/+2
| | | | | 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-091-9/+8
|
* avcodec/nvenc: make aware of SDK 11.1 driver requirementsTimo Rothenpieler2021-08-081-1/+7
|
* avcodec/nvenc: add chroma qp offset supportRicardo Monteiro2021-08-081-0/+9
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* Remove unnecessary avassert.h inclusionsAndreas Rheinhardt2021-07-221-1/+0
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/nvenc: add option to disable all extra SEI dataTimo Rothenpieler2021-06-061-4/+6
| | | | | | | | | | | 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-041-85/+99
|
* avcodec/nvenc: write out user data unregistered SEIBrad Hards2021-06-041-0/+28
| | | | | 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-041-14/+41
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec: Remove deprecated AVCodecContext.coded_frameAndreas Rheinhardt2021-04-271-6/+0
| | | | | | | | | | 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-181-69/+73
| | | | | | | | | | | | 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-111-10/+20
|
* avcodec/nvenc: use AVCodecContext.get_encode_buffer()James Almer2021-03-171-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: base timestamps on frameIntervalPMartin Storsjö2021-03-121-1/+1
| | | | | | | | | | | | | 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-211-1/+1
|
* avcodec/nvenc: fix timestamp offset ticks logicTimo Rothenpieler2021-01-091-1/+1
|
* lavc: Mark hw_config pointer arrays as constMark Thompson2020-11-081-1/+1
| | | | They are read-only just like the HWConfig structures they point to.
* avcodec/nvenc: fix build with older SDKsTimo Rothenpieler2020-10-301-3/+0
|
* avcodec/nvenc: only enforce explicitly set twopass modeTimo Rothenpieler2020-10-301-1/+1
|
* avcodec/nvenc: only auto-pick vbr rc in cq modeTimo Rothenpieler2020-10-301-1/+1
|
* avcodec/nvenc: all presets are SDK10 presets nowTimo Rothenpieler2020-10-291-26/+16
|