X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fnvenc.c;h=bcafc20c033e612a892b797435b32d3aae8251a1;hb=b975aeec02e4518a4e5f2996cf51d113e42e1727;hp=7063f7505caf48e5220db5cbaefceac77ac23a6f;hpb=52692eed615cc6dd05edae5505044401059408a0;p=ffmpeg diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 7063f7505ca..bcafc20c033 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -890,7 +890,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) ctx->encode_config.encodeCodecConfig.h264Config.outputAUD = 1; - if (!ctx->profile) { + if (!ctx->profile && !lossless) { switch (avctx->profile) { case FF_PROFILE_H264_HIGH_444_PREDICTIVE: ctx->encode_config.profileGUID = NV_ENC_H264_PROFILE_HIGH_444_GUID; @@ -910,7 +910,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) ctx->encode_config.profileGUID = NV_ENC_H264_PROFILE_HIGH_GUID; break; } - } else { + } else if(!lossless) { if (!strcmp(ctx->profile, "high")) { ctx->encode_config.profileGUID = NV_ENC_H264_PROFILE_HIGH_GUID; avctx->profile = FF_PROFILE_H264_HIGH; @@ -1507,7 +1507,7 @@ static const enum AVPixelFormat pix_fmts_nvenc[] = { #define OFFSET(x) offsetof(NvencContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { - { "preset", "Set the encoding preset (one of slow = hq 2pass, medium = hq, fast = hp, hq, hp, bd, ll, llhq, llhp, default)", OFFSET(preset), AV_OPT_TYPE_STRING, { .str = "medium" }, 0, 0, VE }, + { "preset", "Set the encoding preset (one of slow = hq 2pass, medium = hq, fast = hp, hq, hp, bd, ll, llhq, llhp, lossless, losslesshp, default)", OFFSET(preset), AV_OPT_TYPE_STRING, { .str = "medium" }, 0, 0, VE }, { "profile", "Set the encoding profile (high, main, baseline or high444p)", OFFSET(profile), AV_OPT_TYPE_STRING, { .str = "main" }, 0, 0, VE }, { "level", "Set the encoding level restriction (auto, 1.0, 1.0b, 1.1, 1.2, ..., 4.2, 5.0, 5.1)", OFFSET(level), AV_OPT_TYPE_STRING, { .str = "auto" }, 0, 0, VE }, { "tier", "Set the encoding tier (main or high)", OFFSET(tier), AV_OPT_TYPE_STRING, { .str = "main" }, 0, 0, VE },