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 732154 - h264parse: fix and optimize NAL collection function
h264parse: fix and optimize NAL collection function
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.3.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 731831
 
 
Reported: 2014-06-24 12:05 UTC by Gwenole Beauchesne
Modified: 2014-07-04 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
h264parse: fix and optimize NAL collection function (1.55 KB, patch)
2014-06-24 12:06 UTC, Gwenole Beauchesne
committed Details | Review

Description Gwenole Beauchesne 2014-06-24 12:05:51 UTC
Use gst_h264_parser_identify_nalu_unchecked() to identify the next NAL unit. We don't want to parse the full NAL unit, but only the header bytes and possibly the first RBSP byte for identifying the first_mb_in_slice syntax element.

Also fix check for failure when returning from that function. The only success condition for that is GST_H264_PARSER_OK, so use it.

BTW, I think that function is a misnomer. My understanding is that the function is used to determine access unit boundaries, not NAL boundaries.
Comment 1 Gwenole Beauchesne 2014-06-24 12:06:37 UTC
Created attachment 279111 [details] [review]
h264parse: fix and optimize NAL collection function
Comment 2 Gwenole Beauchesne 2014-06-24 12:12:22 UTC
Note: the optimization part is that we scan for start codes only once (start), not twice since we don't really care the next NAL is complete or not. We only need the initial header bytes + one byte from RBSP.
Comment 3 Gwenole Beauchesne 2014-07-01 14:37:04 UTC
commit 5601c875989df92373abf72ba7c89091244c6f6d
Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Date:   Tue Jun 24 13:55:13 2014 +0200

    h264parse: fix and optimize NAL collection function.
    
    Use gst_h264_parser_identify_nalu_unchecked() to identify the next
    NAL unit. We don't want to parse the full NAL unit, but only the
    header bytes and possibly the first RBSP byte for identifying the
    first_mb_in_slice syntax element.
    
    Also fix check for failure when returning from that function. The
    only success condition for that is GST_H264_PARSER_OK, so use it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732154
    
    Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>