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 719947 - decoder: h264: add support for constrained baseline profile
decoder: h264: add support for constrained baseline profile
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
 
 
Reported: 2013-12-06 07:32 UTC by Wind Yuan
Modified: 2013-12-09 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
h264 decoder ge correct profile of constrailed-baseline (2.51 KB, patch)
2013-12-06 07:37 UTC, Wind Yuan
none Details | Review

Description Wind Yuan 2013-12-06 07:32:15 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 ...
Comment 1 Wind Yuan 2013-12-06 07:37:16 UTC
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)
Comment 2 Gwenole Beauchesne 2013-12-06 09:19:33 UTC
Patch looks good. Thanks.
Comment 3 Gwenole Beauchesne 2013-12-06 09:22:04 UTC
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.
Comment 4 Wind Yuan 2013-12-06 10:23:00 UTC
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;

:-)
Comment 5 Gwenole Beauchesne 2013-12-06 12:43:54 UTC
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.
Comment 6 Gwenole Beauchesne 2013-12-09 12:13:27 UTC
Applied in git master branch, with the mentioned changed. Thanks.
Comment 7 Gwenole Beauchesne 2013-12-09 12:13:40 UTC
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>