<div dir="ltr"><div><div><div><div><div><div>Hi Sebastian.<br><br></div>The bug report for performance penalty for videoconvert and videoscale for version 1.2.0-1.2.2 over 0.10.36 has been created as bug 721701 with link <a href="https://bugzilla.gnome.org/show_bug.cgi?id=721701">https://bugzilla.gnome.org/show_bug.cgi?id=721701</a><br>
<br></div>Please note that both videoscale and videoconvert appear to have the bug both with out-of-the-box ubuntu as well as my own build 1.2.2 where Orc "is enabled".<br><br></div>Platform is a dual Xeon with 4 cores each, so not an exotic hardware.<br>
<br></div>Below is the text from the bug report detailing how to see the penalty.<br><br></div>Best regards<br></div>Peter Maersk-Moller<br><br>----------------<br><div><div><div><div><div>It appear that version 1.2.0-1.2.2 and perhaps previous versions introduce a dramatic performance penalty for video scaling and video format conversion of I420 to BGRA when compared to version 0.10.36. This performance penalty is present for common Ubuntu installations ranging from 12.04 until 13.10 as well as with a newly build version of GStreamer 1.2.2 with orc-0.4.18. It is checked that Orc is enabled when building gst-plugins-base.<br>
<br><br>The following examples are all executed on Ubuntu 13.10 with GStreamer 1.2.2 for version 1.0 and GStreamer 0.10.36 for version 0.10. The system is a dual Xeon Quad core configuration with a total of 8 cores.<br><br>
First we create two test samples of 60 seconds each (just hit ctrl-c after running 60 seconds:<br><br> $ gst-launch-1.0 -e -v videotestsrc pattern=18 is-live=true ! 'video/x-raw, width=1024, height=576, format=I420' ! videoconvert ! x264enc ! 'video/x-h264, profile=main' ! avimux ! filesink location=video1024x576.mp4<br>
<br> $ gst-launch-1.0 -e -v videotestsrc pattern=18 is-live=true ! 'video/x-raw, width=1280, height=720, format=I420' ! videoconvert ! x264enc ! 'video/x-h264, profile=main' ! avimux ! filesink location=video1280x720.mp4<br>
<br>Now we start top in another window to check cpu load and try decode and convert the latter file with 0.10 and 1.0<br><br> $ /usr/bin/gst-launch-0.10 -v filesrc location=./video1280x720.mp4 do-timestamp=true ! decodebin2 name=decoder ! ffmpegcolorspace ! 'video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720' ! queue ! fakesink silent=true sync=true<br>
<br>and<br><br> $ /usr/local/bin/gst-launch-1.0 -v filesrc location=./video1280x720.mp4 do-timestamp=true ! decodebin name=decoder ! videoconvert ! 'video/x-raw, format=(string)BGRA, width=(int)1280, height=(int)720' ! queue ! fakesink silent=true sync=true<br>
<br>On my system, the 0.10 version will happily run at roughly 24-25 % CPU load while the 1.0 version runs at roughly 51%<br><br>Now we add videoscaling by using the first file we created and scale it before converting it:<br>
<br> $ /usr/bin/gst-launch-0.10 -v filesrc location=./video1024x576.mp4 do-timestamp=true ! decodebin2 name=decoder ! videoscale ! ffmpegcolorspace ! 'video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)1280, height=(int)720' ! queue ! fakesink silent=true sync=true<br>
<br>and<br><br> $ /usr/local/bin/gst-launch-1.0 -v filesrc location=./video1024x576.mp4 do-timestamp=true ! decodebin name=decoder ! videoscale ! videoconvert ! 'video/x-raw, format=(string)BGRA, width=(int)1280, height=(int)720' ! queue ! fakesink silent=true sync=true<br>
<br>On my system, the 0.10 version will happily run at roughly 33-34 % CPU load while the 1.0 version runs at roughly 101%<br><br>Here is what I see when building the plugin base:<br><br>configure: *** Plug-ins without external dependencies that will be built:<br>
adder<br> app<br> audioconvert<br> audiorate<br> audioresample<br> audiotestsrc<br> encoding<br> gio<br> playback<br> subparse<br> tcp<br> typefind<br> videoconvert<br> videorate<br>
videoscale<br> videotestsrc<br> volume<br><br>configure: *** Plug-ins without external dependencies that will NOT be built:<br><br>configure: *** Plug-ins that have NOT been ported:<br><br>configure: *** Plug-ins with dependencies that will be built:<br>
alsa<br> cdparanoia<br> ivorbisdec<br> libvisual<br> ogg<br> pango<br> theora<br> vorbis<br> ximagesink<br> xvimagesink<br><br>configure: *** Plug-ins with dependencies that will NOT be built:<br>
<br>configure: *** Orc acceleration enabled.<br><br>So I assume Orc acceleration for video scale and videoconvert is enabled.<br><br><br><br><br><br><br><br><br><br><br><br></div></div></div></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Jan 3, 2014 at 9:24 AM, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fr, 2014-01-03 at 01:46 +0100, Peter Maersk-Moller wrote:<br>
> Hi Edward.<br>
><br>
> Do you have more information on when GStreamer (Orc) specific is using the<br>
> slow path?<br>
> GStreamer 0.10 was doing it fast, but in my case 1.2 does it slow doing a<br>
> simply I420 1024x576 to 1280x720 followed by a I420 to BGRA conversion?<br>
><br>
> Should we/I create a bug report for it? I think so as main stream Ubuntu<br>
> runs with the performance penalty. In this context and given implementation<br>
> for mmx/sse is missing as reported by Edwrad I don't quite see why Andoni<br>
> could not reproduce it with the version he linked to.<br>
<br>
</div>Yes, please create a bug for this. Make sure to mention exactly which<br>
video format conversions are happening and which elements are all<br>
involved.<br>
<br>
At least for videoconvert we should add some more fast-paths for common<br>
conversions.<br>
<div class="im"><br>
> Sebastian D. in your fix for I420 to BGRA conversion I think you wrote it<br>
> was only a partial implementation. What is missing there?<br>
<br>
</div>Which one? The broken I420->BGRA conversion is completely fixed now, but<br>
the high-quality version of it is disabled now because it currently<br>
can't be implemented with orc properly.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br>
Expertise, Straight from the Source<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>