GNOME Bugzilla – Bug 719691
encoder: h264: derive profile & level from active features
Last modified: 2014-01-13 16:39:14 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().
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