libs: encoder: h265: add rate control parameter

https://bugzilla.gnome.org/show_bug.cgi?id=783449
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-06-05 20:44:22 +02:00
parent d733714ef8
commit 81886682cd

View file

@ -1772,6 +1772,17 @@ ensure_control_rate_params (GstVaapiEncoderH265 * encoder)
return TRUE;
/* *INDENT-OFF* */
/* RateControl params */
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder) = (VAEncMiscParameterRateControl) {
.bits_per_second = encoder->bitrate_bits,
.target_percentage = 70,
/* CPB (Coded picture buffer) length in milliseconds, which could
* be provided as a property */
.window_size = encoder->cpb_length,
.initial_qp = encoder->init_qp,
.min_qp = encoder->min_qp,
};
/* HRD params */
fill_hrd_params (encoder, &GST_VAAPI_ENCODER_VA_HRD (encoder));