Unexpectedly expensive conversion from BGRA to BGR

Tyler Compton xaviosx at gmail.com
Fri Oct 16 23:10:52 UTC 2020


Hi everyone,

I have a pipeline that, at some point, needs to convert video frames from
BGRA to BGR. I was surprised to see about a ~17% increase in CPU usage just
from doing this conversion. I wouldn't expect it to be that expensive,
considering it's just a matter of stripping off some data for each pixel.

In my application, I have BGRA frames, but never any actual alpha
information. Is there perhaps an optimization opportunity because of that?

On average I see about 17% CPU usage when running this pipeline:

videotestsrc is-live=true !
"video/x-raw,format=BGRA,width=1920,height=1080,framerate=30/1" ! fakesink

However, I see around 38% CPU usage just by adding a videoconvert to go
from BGRA to BGR:

videotestsrc is-live=true !
"video/x-raw,format=BGRA,width=1920,height=1080,framerate=30/1" !
videoconvert ! "video/x-raw,format=BGR" ! fakesink

I'm running GStreamer 1.18.0 on Ubuntu 20.04.

Thanks,
Tyler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201016/2bda8646/attachment-0001.htm>


More information about the gstreamer-devel mailing list