[Bug 731442] New: bytereader: optimize _scan_for_start_code() using pointer access
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jun 10 01:23:43 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=731442
GStreamer | gstreamer (core) | git
Summary: bytereader: optimize _scan_for_start_code() using
pointer access
Classification: Platform
Product: GStreamer
Version: git
OS/Version: All
Status: UNCONFIRMED
Keywords: perf
Severity: enhancement
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: baver.bae at lge.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: Unversioned Enhancement
Created an attachment (id=278185)
View: https://bugzilla.gnome.org/attachment.cgi?id=278185
Review: https://bugzilla.gnome.org/review?bug=731442&attachment=278185
001_gstbytereader_improved_by_pointer_access.patch
This is a sub thread of the following:
https://bugzilla.gnome.org/show_bug.cgi?id=730783
Currently the scan uses Boyer-moore method and its performance is good.
but, it can be optimized from an implementation of view.
The original scan code is implemented by byte array and index-based access.
In _scan_for_start_code(), the index is increasing from start to end and the
base address of the byte array is referred to as return value.
In the case, index-based access can be replaced by pointer access, which
improve the performance by removing index-related operations.
Its performace is enhanced by approximately 8% on arm-based embedded devices.
Although it seems trivial, it can affect the overall performance because the
_scan_for_start_code() function is very often called when H.264/H.265 video is
played.
In addition, the technique can apply for all architectures and it is good in
view of readability and maintainability.
I attached a patch file.
If you have a problem or question, let me know it.
After reviewing this, please apply it to git repository.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list