[Bug 737401] videobox: Use videoconvert APIs for format conversions

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Oct 28 04:48:14 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=737401
  GStreamer | gst-plugins-good | git

--- Comment #2 from RaviKiran <ravi.kiran at samsung.com> 2014-10-28 11:48:10 UTC ---
Created an attachment (id=289514)
 View: https://bugzilla.gnome.org/attachment.cgi?id=289514
 Review: https://bugzilla.gnome.org/review?bug=737401&attachment=289514

use videoconvert API for format conversion

Patch attached for proposed changes.

Few observations:
Creating a converter requires height and width of both input and output frames
to be equal.
Hence an intermediate frame to be created with height and width = that of
output frame.
copy the contents from input frame to intermediate frame considering border
area/crop area.
Then, call videoconvert API to convert intermediate frame to output frame of
desired format.

This adds some overhead. For example, when I measured the time consumed,
conversion of AYUV to I420 of size 320x240 with border -10 each side, took
~988.6ms (against ~629ms earlier)

However, when input format = output format, this overhead is avoided.
AYUV to AYUV of size 320x240 with border -10 each side, took ~161.9ms (against
~288.5ms earlier)
I420 to I420 of size 320x240 with border -10 each side, took ~80.5ms (against
~839.8ms earlier)
[the saving here is mostly due to memcpy of lines instead of pixel-by-pixel
copy]

As most of the videobox usage I came across were mostly about only adding
borders or cropping, there will be no overhead in those cases with the new
approach.

Feedback welcome.

-- 
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