History

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.

Mark Thompson committed 8 years ago

Commit 8479f991 parent af532c97 files · +15 −2Browse files

Showing the changes to libavcodec/vaapi_encode.c (1 of 7 files). Show all

Unified · Split

libavcodec/vaapi_encode.c+3−0
@@ -1436,6 +1436,9 @@ static av_cold int vaapi_encode_init_rate_control(AVCodecContext *avctx) · 1435 unmodified lines
14361436 .initial_qp = 0,
14371437 .min_qp = (avctx->qmin > 0 ? avctx->qmin : 0),
14381438 .basic_unit_size = 0,
1439+#if VA_CHECK_VERSION(1, 1, 0)
1440+ .max_qp = (avctx->qmax > 0 ? avctx->qmax : 0),
1441+#endif
14391442 };
14401443 vaapi_encode_add_global_param(avctx, &ctx->rc_params.misc,
14411444 sizeof(ctx->rc_params));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t