Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-09-19 01:30:46 +0300
committerMark Thompson <sw@jkqxz.net>2018-09-23 16:42:33 +0300
commit8479f99c7dd227d9cb94d262602f1298f71cf33b (patch)
tree1911420d4a3bb8c65fe1d884f2211cff3948b7a6 /libavcodec/vaapi_encode.c
parentaf532c921575eb8ee805cc2c64a914f6302442e1 (diff)
vaapi_encode: Add support for max QP in rate control
This was added in libva 2.1.0 (VAAPI 1.1.0). Use AVCodecContext.qmax, matching the existing behaviour for qmin, and clean up the defaults so that we only pass min/max when explicitly set.
Diffstat (limited to 'libavcodec/vaapi_encode.c')
-rw-r--r--libavcodec/vaapi_encode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index 25d89c65c9..e9eeb6eb83 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -1436,6 +1436,9 @@ static av_cold int vaapi_encode_init_rate_control(AVCodecContext *avctx)
.initial_qp = 0,
.min_qp = (avctx->qmin > 0 ? avctx->qmin : 0),
.basic_unit_size = 0,
+#if VA_CHECK_VERSION(1, 1, 0)
+ .max_qp = (avctx->qmax > 0 ? avctx->qmax : 0),
+#endif
};
vaapi_encode_add_global_param(avctx, &ctx->rc_params.misc,
sizeof(ctx->rc_params));