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 632130 - mpegvideoparse: accelerate search for start code
mpegvideoparse: accelerate search for start code
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 0.10.17
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-14 10:21 UTC by Thijs Vermeir
Modified: 2010-10-14 19:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpegvideoparse: accelerate search for start code (1.14 KB, patch)
2010-10-14 10:22 UTC, Thijs Vermeir
committed Details | Review

Description Thijs Vermeir 2010-10-14 10:21:51 UTC
As the startcode always starts with 0x000001 some iterations
can be skipped if values > 1 are detected.

~ 70% faster on HD video stream.
Comment 1 Thijs Vermeir 2010-10-14 10:22:35 UTC
Created attachment 172338 [details] [review]
mpegvideoparse: accelerate search for start code

As the startcode always starts with 0x000001 some iterations
can be skipped if values > 1 are detected.

~ 70% faster on HD video stream.
Comment 2 Thijs Vermeir 2010-10-14 14:26:46 UTC
This implementation[1] in rtph264pay is only 20% faster as the current implementation in mpegvideoparse. Looks like Boyer-Moore is not optimal for this type of search. And that implementation can be optimized too by ordering the if statement on probability. (+10 % faster)

[1] http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/gstrtph264pay.c#n481
Comment 3 Wim Taymans 2010-10-14 16:01:34 UTC
please commit.
Comment 4 Thijs Vermeir 2010-10-14 16:55:36 UTC
commit 96a7f9c8b1195129f0c2157cbbcbaa6cab45056e
Author: Thijs Vermeir <thijsvermeir@gmail.com>
Date:   Thu Oct 14 11:45:55 2010 +0200

    mpegvideoparse: accelerate search for start code
    
    As the startcode always starts with 0x000001 some iterations
    can be skipped if values > 1 are detected.
    
    ~ 70% faster on HD video stream.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632130