[gstreamer-bugs] [Bug 619806] New: [basetransform] caps functions should be faster
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu May 27 03:54:26 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=619806
GStreamer | gstreamer (core) | git
Summary: [basetransform] caps functions should be faster
Classification: Desktop
Product: GStreamer
Version: git
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: otte at gnome.org
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME target: ---
GNOME version: ---
This is fallout from bug 618853:
When running tests/benchmark/capsnego in a profile I noticed that a lot of time
was spent inside basetransform doing rather weird things with caps. I'll take
ffmpegcolorspace as an example of why this is very slow:
- In the getcaps function, peer caps are intersected with its template
This is absolutely not necessary, as the peer's getcaps function will return a
subset of the template caps. (With asserts enabled, it even checks this.) If
the peer is ffmpegcolorspace you'll mostly intersect the template caps with
itself: 32x32 = 1024 structure intersections.
- In the getcaps function, transformed caps are intersected with template caps
This is unnecessary again, as transform_caps must return a subset of the
template caps. It might make sense to keep a check with assertions enabled -
though that is quite expensive. Again, 1024 structure intersections with
ffmpegcolorspace.
- the algorithm for calling the transform function is slow
The current algorithm calls the transform function with every structure
separately and then merges the result. This is often very slow.
ffmpegcolorspace's transform function will expand the simple caps to its
template caps and return them appended to the original, so it'll return 1060
structures via 32 caps that'll get merged into a 32 structures large caps.
All of this is considerable overhead taking more than 5 times the performance
of the actual transform caps function.
--
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