[Bug 773433] video-format: add API to check if a video format is "sparse"
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Nov 17 09:35:10 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=773433
--- Comment #16 from Philippe Renon <philippe_renon at yahoo.fr> ---
Yes, I totally agree.
The elements I looked at eventually do a cvCvtColor( img, norm_img, CV_BGR2GRAY
);
And it works well with BGRx and RGB (or so it seems) so I need to find out why
and what would happen with other formats (xBGR, etc...).
For now, I do as suggested : i.e. explicit switch/case on the gst format...
I have a working fix that uses the other suggestion (using pixel stride) but I
don't like it... Looks like this:
is_sparse = FALSE;
for (i = 0; i < GST_VIDEO_INFO_N_COMPONENTS (&info); i++) {
depth += GST_VIDEO_INFO_COMP_DEPTH (&info, i);
if (GST_VIDEO_INFO_COMP_PSTRIDE (&info, i) > (gint)
GST_VIDEO_INFO_N_COMPONENTS (&info))
is_sparse = TRUE;
}
--
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