GNOME Bugzilla – Bug 719947
decoder: h264: add support for constrained baseline profile
Last modified: 2013-12-09 12:13:40 UTC
decoder pipeline failed on H.264 constrained-baseline profiles when upgrade intel-driver in ivybridge $ gst-launch-1.0 filesrc location=h264_constrained_baseline.mp4 ! qtdemux ! vaapidecode ! vaapisink libva info: VA-API version 0.34.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /opt/X11R7/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_34 libva info: va_openDriver() returns 0 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error. Additional debug info: qtdemux.c(3952): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:qtdemux0: streaming stopped, reason not-supported ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ...
Created attachment 263637 [details] [review] h264 decoder ge correct profile of constrailed-baseline H.264 decoder need get correct profile of constrained-baseline from sps->profile_idc && sps->constraint_set1_flag. and check deocder capability if failed fallback to use GST_VAAPI_PROFILE_H264_BASELINE set to GstVaapiContext . this patch depends on fix of https://bugzilla.gnome.org/show_bug.cgi?id=719827 patch(id=263634)
Patch looks good. Thanks.
Oh, actually, if profile == "Constrained Baseline", a Main profile compliant decoder will support the stream. So, profiles[] array size could be increased to 3, main profile added to constrained baseline compatibility list, and fallback to main profile case.
maybe 4. case GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE: profiles[n_profiles++] = GST_VAAPI_PROFILE_H264_BASELINE; case GST_VAAPI_PROFILE_H264_BASELINE: profiles[n_profiles++] = GST_VAAPI_PROFILE_H264_MAIN; case GST_VAAPI_PROFILE_H264_MAIN: profiles[n_profiles++] = GST_VAAPI_PROFILE_H264_HIGH; break; :-)
Yes, you are right, except that I don't want to allow a fallback from plain Baseline profile to Main profile. Only if profile X is a subset of profile Y that we can allow fallback from X to Y. As is, plain Baseline profile is not a subset of Main profile. Thanks. i.e. the "case GST_VAAPI_PROFILE_H264_BASELINE" line is to be suppressed.
Applied in git master branch, with the mentioned changed. Thanks.
commit 009e4522bf798d187d4f1b931873ddcfb710e6db Author: Wind Yuan <feng.yuan@intel.com> Date: Fri Dec 6 15:08:26 2013 +0800 decoder: h264: add support for constrained baseline profile. Recognize streams marked as conforming to the "Constrained Baseline Profile". If VA driver supports that as is, fine. Otherwise, fallback to baseline, main or high profile. Constrained Baseline Profile conveys coding tools that are common to baseline profile and main profile. https://bugzilla.gnome.org/show_bug.cgi?id=719947 [Added fallbacks to main and high profiles] Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>