mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00: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:
parent
af532c9215
commit
8479f99c7d
7 changed files with 15 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue