diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-06-05 20:44:22 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-06-07 11:24:38 +0200 |
commit | 81886682cd462f4ad1d490299f487f7aa521ca1a (patch) | |
tree | 81b159f20afc67622a75f87d30c012558df8daf7 /gst-libs | |
parent | d733714ef85db8c66cb8e36d2438cff9b899358a (diff) |
libs: encoder: h265: add rate control parameter
https://bugzilla.gnome.org/show_bug.cgi?id=783449
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiencoder_h265.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c index 33975ab2..d8a521b4 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c @@ -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)); |