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 719691 - encoder: h264: derive profile & level from active features
encoder: h264: derive profile & level from active features
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:
Blocks: 719412 719703 719827
 
 
Reported: 2013-12-02 15:57 UTC by Gwenole Beauchesne
Modified: 2014-01-13 16:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gwenole Beauchesne 2013-12-02 15:57:56 UTC
The H.264 encoder should generate bitstreams that can be decoded by the largest possible decoder audience. This means that, at the minimum, encoded bitstreams shall be conformant to the "Constrained Baseline Profile".

H.264 coding tools (features) could be exposed and enabled individually. Currently, only "max-bframes" are exposed. The default value is FALSE to comply with the minimally supported profile, and it shall remain unique.

Based on that, the profile_idc and level_idc values could be derived from the H.264 encoder parameters. Profile is easy, and level would imply additional heuristics.

* Profile. Default: "Constrained Baseline" (CBP).
- If "max-bframes" > 0, then profile is inferred to be "Main Profile" (MP).

* Level. Default: to be computed based on video resolution, framerate, "bitrate". Refer to Table A.1 - Level limits. Especially, MaxMBPS, MaxFS and MaxBR.
- For "Constant QP" (CQP) rate control mode, we could omit "bitrate" / MaxBR option in the characterization process.
- For other rate control modes, we probably could use "bitrate" +10% vs. MaxBR.

* Public API:
- gst_vaapi_encoder_h264_get_profile_and_level().
Comment 1 Gwenole Beauchesne 2014-01-13 16:39:14 UTC
commit b59a5572af08c1ce504232d3a9eed0cbf0cecec5
Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date:   Fri Jan 10 18:18:25 2014 +0100

    encoder: h264: derive profile and level from active coding tools.
    
    Automatically derive the minimum profile and level to be used for
    encoding, based on the activated coding tools. The encoder will
    be trying to generate a bitstream that has the best chances to be
    decoded on most platforms by default.
    
    Also change the default profile to "constrained-baseline" so that
    to ensure maximum compatibility when the stream is decoded.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719691