[FFmpeg-devel] [PATCH 1/1] avcodec/nvenc: move lossless presets after new ones

Martin Pulec martin.pulec at cesnet.cz
Fri Apr 16 14:53:48 EEST 2021


A simplier alternative to this patch would be replacing the condition in
nvenc.c:
    if (ctx->preset >= PRESET_LOSSLESS_DEFAULT && ret <= 0) {
with
    if ((ctx->preset >= PRESET_LOSSLESS_DEFAULT && (ctx->preset <= PRESET_LOSSLESS_HP))
            && ret <= 0) {

But a comment in the preset enum suggests keeping lossless presets at the end
so that I've followed that advice.

Martin Pulec (1):
  avcodec/nvenc: move lossless presets after new ones

 libavcodec/nvenc.h      | 4 ++--
 libavcodec/nvenc_h264.c | 2 +-
 libavcodec/nvenc_hevc.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.27.0



More information about the ffmpeg-devel mailing list