GNOME Bugzilla – Bug 722735
encoder: h264: fix ip_period value in sequence parameter buffer
Last modified: 2014-01-22 18:13:12 UTC
The VAEncSequenceParameterBufferH264.ip_period value is incorrectly set to 0. This is an invalid number even for streams that don't contain B-frames. It should be derived as follows: 1 + encoder->num_bframes. The VA driver relies on this to correctly maintain per slice-type statistics for rate control.
VA driver patches are also needed to correctly handle cases where (intra_period % ip_period) != 0 in presence of B-frames. In particular, the gaps/remainder should be filled in with P-frames.
commit d9cf58e88a88a44168044c5f0a5a9da9943ec523 Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Date: Tue Jan 21 17:35:24 2014 +0100 encoder: h264: fix ip_period value in sequence parameter. 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