diff options
author | Mark Thompson <sw@jkqxz.net> | 2018-09-23 22:53:00 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-10-27 19:35:35 +0100 |
commit | fef2162b6ea752c76a1220f59ad962b65a400fc3 (patch) | |
tree | eb9cf3ff0ab7698e03ce93c78c1ed1dc83a37ece /libavcodec/vaapi_encode.c | |
parent | a7eda762dce66e7df993f66fc3abdf06c7074190 (diff) | |
download | ffmpeg-fef2162b6ea752c76a1220f59ad962b65a400fc3.tar.gz |
vaapi_encode: Add flag to mark encoders supporting only constant-quality
And set it for MJPEG.
Diffstat (limited to 'libavcodec/vaapi_encode.c')
-rw-r--r-- | libavcodec/vaapi_encode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index e01c3c112b..2fe8501287 100644 --- a/libavcodec/vaapi_encode.c +++ b/libavcodec/vaapi_encode.c @@ -1277,7 +1277,8 @@ static av_cold int vaapi_encode_init_rate_control(AVCodecContext *avctx) ctx->va_rc_mode = VA_RC_CQP; return 0; } - if (avctx->flags & AV_CODEC_FLAG_QSCALE || + if (ctx->codec->flags & FLAG_CONSTANT_QUALITY_ONLY || + avctx->flags & AV_CODEC_FLAG_QSCALE || avctx->bit_rate <= 0) { if (rc_attr.value & VA_RC_CQP) { av_log(avctx, AV_LOG_VERBOSE, "Using constant-quality mode.\n"); |