The VAEncSequenceParameterBuffer.ip_period value reprents the distance
between the I-frame and the next P-frame. So, this also accounts for
any additional B-frame in the middle of it.
This fixes rate control heuristics for certain VA drivers.
https://bugzilla.gnome.org/show_bug.cgi?id=722735
seq_param->seq_parameter_set_id = 0;
seq_param->level_idc = encoder->level_idc;
seq_param->intra_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (encoder);
- seq_param->ip_period = 0; // ?
+ seq_param->ip_period = 1 + encoder->num_bframes;
if (base_encoder->bitrate > 0)
seq_param->bits_per_second = base_encoder->bitrate * 1000;
else