[Bug 724630] v4l2videodec: alignment support

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Feb 26 06:16:58 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=724630
  GStreamer | gst-plugins-good | 1.x

--- Comment #2 from Hugues Fruchet <hugues.fruchet at st.com> 2014-02-26 14:38:25 UTC ---
Hi Nicolas,

We are dealing with NV12, ie semiplanar so drawing is more like this:
[ Y plane ]
--- padding Y
[ UV plane ]
--- padding UV

but this doesn't change picture at all, you perfectly get the point of extra
padding for height.

Most of V4L2 hardware have alignment constraint in width, it's why there is an
explicit bytesperline field in V4L2 different from width, to express that only
width pixels have to be read on a given line, then bytesperline bytes have to
be skipped to go to the next line.
Most of V4L2 devices are cameras, which are based on a single line buffer (with
an alignment constraint), then the line is copied in memory to build the frame,
so without alignment in height.
With V4L2 codec API we are dealing with slightly new video codec hardwares,
planes based (Yplane/UVplane) and with alignment constraint in both width and
height, and clearly we miss of an explicit V4L2 field for this alignment in
height. We are using total sizeimage to express this alignment in height, and
you are true that implictly we suppose that padding is done at the end of each
Y and UV plane, but based on my past experience on at least 3 totally different
video decoders/encoders hardware IPs, the padding in height was done that way
(I precise that it was not the same HW designers team).

About MPLANE, you are right, we can do it with MPLANE, but MPLANE was
introduced by Samsung because of a strong hardware constraint that implies that
Y address is not in the same bank than UV address, so NV12 frame is not
contiguous in memory. We don't have such constraint, so we see no reason to
switch all of our drivers to MPLANE.

If this is really an issue on your side, we can align on Samsung way of doing
and use G_CROP to get the unaligned width & height.
Another way to progress on this, is that I submit problem to V4L2 mailing list
so we have the opinion from V4L2 maintainers, what do you think about this ?

BR.

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