[Bug 761851] video: add orc UYVY422 to GRAY8 conversion function

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 12 06:15:34 UTC 2016


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

--- Comment #5 from Göran Jönsson <goran.jonsson at axis.com> ---
>+.function video_orc_convert_UYVY_GRAY8
>+.flags 2d
>+.dest 1 d guint8
>+.source 1 s guint8
>+
>+ldresnearb d, s, 0x10000, 0x20000

Generates

+#ifdef DISABLE_ORC
+void
+video_orc_convert_UYVY_GRAY8 (guint8 * ORC_RESTRICT d1, int d1_stride,
+    const guint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
+{
+  int i;
+  int j;
+  orc_int8 *ORC_RESTRICT ptr0;
+  const orc_int8 *ORC_RESTRICT ptr4;
+  orc_int8 var32;
+
+  for (j = 0; j < m; j++) {
+    ptr0 = ORC_PTR_OFFSET (d1, d1_stride * j);
+    ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
+
+
+    for (i = 0; i < n; i++) {
+      /* 0: ldresnearb */
+      var32 = ptr4[(65536 + i * 131072) >> 16];
+      /* 1: storeb */
+      ptr0[i] = var32;
+    }
+  }
+
+}

If look at 
var32 = ptr4[(65536 + i * 131072) >> 16]; 

=> var32 = ptr4[(0x10000 + i * 0x20000) >> 16];
=> var32 = ptr4[(0x10000 + i * 0x20000)/ 0x10000];
=> var32 = ptr4[(1 + i * 2)];

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