mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-17 04:20:10 +01:00
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.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user