After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722087 - encoder: h264: target bitrate for CBR is not respected
encoder: h264: target bitrate for CBR is not respected
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on: 722735
Blocks: 719412
 
 
Reported: 2014-01-13 08:58 UTC by Gwenole Beauchesne
Modified: 2014-01-22 18:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gwenole Beauchesne 2014-01-13 08:58:36 UTC
When encoding with constant bitrate (CBR), the requested target bitrate is not respected. For instance, for a 320x240 stream, we would expect by default around 64 bits per macroblock (576 kbps). So, this is the maximum target bitrate, that is also emitted in the final container. However, in practice, the bitrate obtained is much larger (around 1.6 Mbps).

I am not certain this is a gstreamer-vaapi bug, but at least we can track the impact to this middleware here.
Comment 1 Gwenole Beauchesne 2014-01-21 22:17:10 UTC
Multiple issues involved. On the gstreamer-vaapi side: VAEncSequenceParameterBufferH264.ip_period is incorrectly set, thus breaking the VA driver heuristics for per slice-type stats. The CPB buffer size is also too long (8 sec).

Patches too follow, but also depends on VA driver patches.
Comment 2 Gwenole Beauchesne 2014-01-21 22:42:02 UTC
The gstreamer-vaapi side of things can be fixed by 0.5.8 timeframe. VA driver will require another iteration.
Comment 3 Gwenole Beauchesne 2014-01-22 18:12:22 UTC
commit 9d5fc53899fc05eecc4d7202946e0098427ba8a5
Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date:   Tue Jan 21 19:04:41 2014 +0100

    encoder: h264: fix default CPB buffer size.
    
    Fix default CPB buffer size to something more reasonable (1500 ms)
    and that still fits the level limits. This is a non configurable
    property for now. The initial CPB removal delay is also fixed to
    750 ms.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722087