[Bug 785011] Sometime between 1.10.4 and 1.12.0 MKV video decode broke when mapping buffers to get pixel data

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jul 18 07:28:27 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=785011

--- Comment #13 from Carsten Haitzler (Rasterman) <raster at rasterman.com> ---
it's not just stride. plane offsets seem to leave junk around... and yup. using
stride and plane offsets. the way we feed data to the canvas is through a
series of row pointers for planar data. first its N pointers for each y row
THEN N/2 for u and N/2 for V after that... so all we need to do is calculate
the pointer location for the beginning of the row. at least for planar formats
like I420 this is fine (it allows for non-constant strides interestingly
enough...) so the converter is very simple:

   ptr = gst_data + info->plane_offset[0];
   jump = info->stride[0];
   for (i = 0; i < rh; i++, ptr += jump) rows[i] = ptr;

   ptr = gst_data + info->plane_offset[1];
   jump = info->stride[1];
   for (j = 0; j < (rh / 2); j++, i++, ptr += jump) rows[i] = ptr;

   ptr = gst_data + info->plane_offset[2];
   jump = info->stride[2];
   for (j = 0; j < (rh / 2); j++, i++, ptr += jump) rows[i] = ptr;

:)

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