[Bug 738013] v4l2allocator: issue with import_userptr() in single-planar API when n_planes > 1
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Jan 23 02:58:19 PST 2015
https://bugzilla.gnome.org/show_bug.cgi?id=738013
GStreamer | gst-plugins-good | git master
--- Comment #9 from Aurélien Zanelli <aurelien.zanelli at parrot.com> 2015-01-23 10:58:15 UTC ---
(In reply to comment #7)
> Review of attachment 294853 [details]:
>
> ::: sys/v4l2/gstv4l2allocator.c
> @@ +1167,3 @@
> + tmp = ((guint8 *) data[i]) + pix_fmt->bytesperline * pix_fmt->height;
> + if (tmp != data[i + 1])
> + goto non_contiguous_mem;
>
> This logic seems right.
>
> @@ -1164,0 +1180,5 @@
> +
> + if ((i + 1) == n_planes) {
> + size = img_size - offset[i];
> ... 2 more ...
>
> My fault, but this calculation of the plane size cannot be trusted. We'll need
> to pass the stride[] array instead of offset. Offset are relative to the
> buffer, there is no guaranty substracting offset give you plane size since data
> pointer may not be at the start of the memory.
Indeed.
>
> The correct way is to calculate this way:
> size = stride[i] * height
>
In fact it's
size = stride[i] * pheight[i]
no ?
> A special case is needed for tiled formats. I think we should fix in a seperate
> patch, prior to this one.
I will propose a patch to fix this soon.
--
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