GNOME Bugzilla – Bug 632130
mpegvideoparse: accelerate search for start code
Last modified: 2010-10-14 19:49:16 UTC
As the startcode always starts with 0x000001 some iterations can be skipped if values > 1 are detected. ~ 70% faster on HD video stream.
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.
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
please commit.
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