mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avcodec/nvenc: reject deprecated global_quality instead of -qp
This commit is contained in:
1 parent
64e6d750f9
commit
677c61b8fe
1 file changed
+4
-5
+4
-5
@@ -989,11 +989,10 @@ static av_cold int nvenc_setup_rate_control(AVCodecContext *avctx)
|
||||
{
|
||||
NvencContext *ctx = avctx->priv_data;
|
||||
|
||||
if (avctx->global_quality > 0)
|
||||
av_log(avctx, AV_LOG_WARNING, "Using global_quality with nvenc is deprecated. Use qp instead.\n");
|
||||
|
||||
if (ctx->cqp < 0 && avctx->global_quality > 0)
|
||||
ctx->cqp = avctx->global_quality;
|
||||
if (avctx->global_quality > 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Using global_quality with nvenc is not supported. Use qp instead.\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (avctx->bit_rate > 0) {
|
||||
ctx->encode_config.rcParams.averageBitRate = avctx->bit_rate;
|
||||
|
||||
Reference in new issue
Block a user