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 622696 - ffmpegcolorspace: Speed up caps nego by using simpler caps
ffmpegcolorspace: Speed up caps nego by using simpler caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 0.10.30
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-25 08:19 UTC by Edward Hervey
Modified: 2010-06-25 15:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ffmpegcolorspace: Use a more concise pad template (4.43 KB, patch)
2010-06-25 08:20 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2010-06-25 08:19:58 UTC
Use a pre-written and more concise pad template caps instead of the programatically-generated one to:
* speed up plugin registration
* speed up caps negotiation (the caps intersection becomes simpler)
Comment 1 Edward Hervey 2010-06-25 08:20:18 UTC
Created attachment 164591 [details] [review]
ffmpegcolorspace: Use a more concise pad template

Speeds up caps nego 2 fold
Comment 2 Edward Hervey 2010-06-25 08:21:02 UTC
One could also get rid of all the now-unused code in gstffmpegcodecmap.c to slim down the plugin.
Comment 3 Sebastian Dröge (slomo) 2010-06-25 08:57:03 UTC
What exactly makes the difference here? Only that all YUV formats are in a single structure? Everything else should be more or less the same...
Comment 4 Tim-Philipp Müller 2010-06-25 09:11:16 UTC
I don't know how much it matters, but this patch also changes the order of the structures within the announced caps a littile, e.g. before we had UYVY, YVYU, IYU1 (mmh?), v308, and AYUV at the very end of the caps, after the RGB caps, whereas now that's all in the very first structure.
Comment 5 Benjamin Otte (Company) 2010-06-25 09:24:16 UTC
It shouldn't matter if it was just used for the template. But as long as ffmpegcolorspace uses the template's order in its getcaps function, it's possible to (accidentally?) abuse this to get weird caps. See bug 619844 for an example.

i don't think it's a real-world problem though.
Comment 6 Benjamin Otte (Company) 2010-06-25 09:26:06 UTC
(In reply to comment #1)
> Created an attachment (id=164591) [details] [review]
> ffmpegcolorspace: Use a more concise pad template
> 
> Speeds up caps nego 2 fold
>
Would it work to call gst_caps_simplify() on the generated caps instead of adding a hardcoded version? That should give you roughly the same caps I guess?
Comment 7 Sebastian Dröge (slomo) 2010-06-25 09:49:09 UTC
It gives reordered caps though.


But I don't think that the order is important for ffmpegcolorspace... the order is absolutely arbitrary anyway. But it might be a good idea to now order it correctly, with the formats with the most information first, etc. (AYUV, ARGB variants, v380/Y444/xRGB/RGB, ....)
Comment 8 Edward Hervey 2010-06-25 14:59:53 UTC
Going to commit it then in a few mins.
Comment 9 Edward Hervey 2010-06-25 15:07:53 UTC
Attachment 164591 [details] pushed as 3a00a97 - ffmpegcolorspace: Use a more concise pad template