[Bug 785980] New: gst_gl_get_affine_transformation_meta_as_ndc (_ext) should use column major matrix
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Aug 8 02:02:31 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=785980
Bug ID: 785980
Summary: gst_gl_get_affine_transformation_meta_as_ndc (_ext)
should use column major matrix
Classification: Platform
Product: GStreamer
Version: 1.12.2
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-bad
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: HHG01200 at nifty.ne.jp
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
In gstvideoaffinetransformationmeta.h , it is stated as:
------------------------------------------------------
* @matrix: the column-major 4x4 transformation matrix
*
* are assumed to have an origin at (0.5, 0.5, 0.5) in a left-handed coordinate
------------------------------------------------------
In gstglimagesink.c , it is passed to
gst_gl_get_affine_transformation_meta_as_ndc_ext (af_meta, matrix);
In gstglutils.c , gst_gl_get_affine_transformation_meta_as_ndc_ext() uses
constant matrix, from_ndc_matrix[] and to_ndc_matrix[] .
I think those constant matrices also should be column major.
In addition, I think z axis should be inverted.
------------------------------------------------------
static const gfloat from_ndc_matrix[] = {
// column major, Right Hand -> Left Hand
0.5f, 0.0f, 0.0, 0.0f,
0.0f, 0.5f, 0.0, 0.0f,
0.0f, 0.0f, -0.5, 0.0f,
0.5f, 0.5f, 0.5, 1.0f,
/*
0.5f, 0.0f, 0.0, 0.5f,
0.0f, 0.5f, 0.0, 0.5f,
0.0f, 0.0f, 0.5, 0.5f,
0.0f, 0.0f, 0.0, 1.0f,
*/
};
static const gfloat to_ndc_matrix[] = {
// column major, Left Hand -> Right Hand
2.0f, 0.0f, 0.0, 0.0f,
0.0f, 2.0f, 0.0, 0.0f,
0.0f, 0.0f, -2.0, 0.0f,
-1.0f, -1.0f, -1.0, 1.0f,
/*
2.0f, 0.0f, 0.0, -1.0f,
0.0f, 2.0f, 0.0, -1.0f,
0.0f, 0.0f, 2.0, -1.0f,
0.0f, 0.0f, 0.0, 1.0f,
*/
};
------------------------------------------------------
I hope experts verify this point.
--
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