[Bug 738013] v4l2allocator: issue with import_userptr() in single-planar API when n_planes > 1
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Oct 31 10:18:09 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=738013
GStreamer | gst-plugins-good | git
--- Comment #3 from Aurélien Zanelli <aurelien.zanelli at parrot.com> 2014-10-31 17:18:06 UTC ---
(In reply to comment #2)
> Review of attachment 287859 [details]:
>
> ::: sys/v4l2/gstv4l2allocator.c
> @@ +1138,3 @@
> + if (V4L2_TYPE_IS_MULTIPLANAR (allocator->type)) {
> + /* TODO Support passing N plane from 1 memory to MPLANE v4l2 format */
> + goto n_mem_missmatch;
>
> This though should really be supported.
I can try to look at this part, but I think it should be done in a different
patch.
>
> @@ +1142,3 @@
> + /* With the single planar API, planes should be contiguous in memory.
> + * TODO: Check that planes are contiguous instead of assuming it's true
> ?
> + */
>
> Feels like without this part in, it isn't safe to merge that. Please correct me
> if I'm wrong.
I think so, especially if data[i] points to different 'memory space', ie planes
not contiguous in virtual memory. I try to do the following to check that:
for (i = 0; i < (n_planes - 1); i++) {
gsize diff_data = ((guint8 *) data[i + 1]) - ((guint8 *) data[i]);
gsize size = offset[i + 1] - offset[i];
if (diff_data != size)
goto non_contiguous_mem;
}
It works for contiguous data, but I'm not sure it will fails if it's not the
case.
--
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