gl/utils: fix matrix conversion for column majorness
authorMatthew Waters <matthew@centricular.com>
Tue, 10 Jul 2018 10:12:15 +0000 (20:12 +1000)
committerMatthew Waters <matthew@centricular.com>
Tue, 10 Jul 2018 10:31:26 +0000 (20:31 +1000)
Companion to
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=e4bf9ed8f060021151cd57e2b00493ed696cb47b
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=16cba63d43f319ac33bc993eca2b1b51679727b3

ext/gl/gstglutils.c

index 3617ef9..12209a6 100644 (file)
@@ -161,8 +161,8 @@ void gst_gl_get_affine_transformation_meta_as_ndc_ext
   } else {
     float tmp[16];
 
-    gst_gl_multiply_matrix4 (to_ndc_matrix, meta->matrix, tmp);
-    gst_gl_multiply_matrix4 (tmp, from_ndc_matrix, matrix);
+    gst_gl_multiply_matrix4 (from_ndc_matrix, meta->matrix, tmp);
+    gst_gl_multiply_matrix4 (tmp, to_ndc_matrix, matrix);
   }
 }
 
@@ -173,6 +173,6 @@ void gst_gl_set_affine_transformation_meta_from_ndc_ext
 
   g_return_if_fail (meta != NULL);
 
-  gst_gl_multiply_matrix4 (from_ndc_matrix, matrix, tmp);
-  gst_gl_multiply_matrix4 (tmp, to_ndc_matrix, meta->matrix);
+  gst_gl_multiply_matrix4 (to_ndc_matrix, matrix, tmp);
+  gst_gl_multiply_matrix4 (tmp, from_ndc_matrix, meta->matrix);
 }