summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/cog/gstcogorc-dist.c4811
-rw-r--r--ext/cog/gstcogorc-dist.h158
2 files changed, 3310 insertions, 1659 deletions
diff --git a/ext/cog/gstcogorc-dist.c b/ext/cog/gstcogorc-dist.c
index 6ee303970..d4daee6ba 100644
--- a/ext/cog/gstcogorc-dist.c
+++ b/ext/cog/gstcogorc-dist.c
@@ -4,9 +4,6 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#ifndef DISABLE_ORC
-#include <orc/orc.h>
-#endif
#include <glib.h>
#ifndef _ORC_INTEGER_TYPEDEFS_
@@ -32,6 +29,7 @@ typedef unsigned __int16 orc_uint16;
typedef unsigned __int32 orc_uint32;
typedef unsigned __int64 orc_uint64;
#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
#else
#include <limits.h>
typedef signed char orc_int8;
@@ -71,165 +69,232 @@ typedef union
orc_int16 x4[4];
} orc_union64;
#endif
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
-void cogorc_memcpy_2d (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1,
- int s1_stride, int n, int m);
-void cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1,
+#ifndef DISABLE_ORC
+#include <orc/orc.h>
+#endif
+void cogorc_memcpy_2d (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_downsample_horiz_cosite_1tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n);
+void cogorc_downsample_horiz_cosite_3tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2,
int n);
-void cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
- const orc_uint16 * s2, int n);
-void cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
- const orc_uint16 * s2, int n);
-void cogorc_downsample_vert_halfsite_2tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n);
-void cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, int n);
-void cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n);
-void cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1,
+void cogorc_downsample_420_jpeg (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2,
int n);
-void cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n);
-void cogorc_upsample_vert_avgub (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n);
-void orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n);
-void orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int n);
-void orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n);
-void orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int n);
-void orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n);
-void orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n);
-void orc_splat_u8_ns (orc_uint8 * d1, int p1, int n);
-void orc_splat_s16_ns (gint16 * d1, int p1, int n);
-void orc_matrix2_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
- int p2, int p3, int n);
-void orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- int p1, int p2, int n);
-void orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- int p1, int p2, int n);
-void orc_matrix3_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int n);
-void orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int n);
-void orc_matrix3_100_offset_u8 (guint8 * d1, const guint8 * s1,
- const guint8 * s2, const guint8 * s3, int p1, int p2, int p3, int p4,
- int p5, int n);
-void orc_matrix3_000_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int p5, int n);
-void orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int p1, int n);
-void orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int p1, int n);
-void cogorc_combine2_u8 (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int p1, int p2, int n);
-void cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int p1,
- int p2, int p3, int p4, int n);
-void cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
+void cogorc_downsample_vert_halfsite_2tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ int n);
+void cogorc_downsample_vert_cosite_3tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n);
+void cogorc_downsample_vert_halfsite_4tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
+ int n);
+void cogorc_upsample_horiz_cosite_1tap (guint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int n);
+void cogorc_upsample_horiz_cosite (guint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ int n);
+void cogorc_upsample_vert_avgub (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ int n);
+void orc_unpack_yuyv_y (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n);
+void orc_unpack_yuyv_u (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_unpack_yuyv_v (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_pack_yuyv (orc_uint32 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n);
+void orc_unpack_uyvy_y (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n);
+void orc_unpack_uyvy_u (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_unpack_uyvy_v (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_pack_uyvy (orc_uint32 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n);
+void orc_addc_convert_u8_s16 (orc_uint8 * ORC_RESTRICT d1,
+ const gint16 * ORC_RESTRICT s1, int n);
+void orc_subc_convert_s16_u8 (gint16 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int n);
+void orc_splat_u8_ns (orc_uint8 * ORC_RESTRICT d1, int p1, int n);
+void orc_splat_s16_ns (gint16 * ORC_RESTRICT d1, int p1, int n);
+void orc_matrix2_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, int p1, int p2, int p3, int n);
+void orc_matrix2_11_u8 (guint8 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int p1,
int p2, int n);
-void cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
+void orc_matrix2_12_u8 (guint8 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int p1,
int p2, int n);
-void cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n);
-void cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n);
-void cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n);
-void cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
- orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n);
-void cogorc_convert_UYVY_YUY2 (orc_uint32 * d1, int d1_stride,
- const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_420_422 (orc_uint8 * d1, int d1_stride,
- orc_uint8 * d2, int d2_stride, const orc_uint8 * s1, int s1_stride, int n,
+void orc_matrix3_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1,
+ int p2, int p3, int p4, int n);
+void orc_matrix3_100_u8 (guint8 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+ const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int n);
+void orc_matrix3_100_offset_u8 (guint8 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+ const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5,
+ int n);
+void orc_matrix3_000_u8 (guint8 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+ const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5,
+ int n);
+void orc_pack_123x (guint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int p1, int n);
+void orc_pack_x123 (guint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int p1, int n);
+void cogorc_combine2_u8 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ int p1, int p2, int n);
+void cogorc_combine4_u8 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
+ int p1, int p2, int p3, int p4, int n);
+void cogorc_unpack_axyz_0 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_unpack_axyz_1 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_unpack_axyz_2 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_unpack_axyz_3 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_resample_horiz_1tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n);
+void cogorc_resample_horiz_2tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n);
+void cogorc_convert_I420_UYVY (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1,
+ const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n);
+void cogorc_convert_I420_YUY2 (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1,
+ const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n);
+void cogorc_convert_I420_AYUV (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n);
+void cogorc_convert_YUY2_I420 (orc_uint16 * ORC_RESTRICT d1,
+ orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3,
+ orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1,
+ const orc_uint32 * ORC_RESTRICT s2, int n);
+void cogorc_convert_UYVY_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_420_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_420_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_422_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_444_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_444_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void cogorc_planar_chroma_422_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void cogorc_convert_YUY2_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_UYVY_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_YUY2_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m);
+void cogorc_convert_UYVY_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m);
+void cogorc_convert_YUY2_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m);
+void cogorc_convert_UYVY_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m);
+void cogorc_convert_UYVY_I420 (orc_uint16 * ORC_RESTRICT d1,
+ orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3,
+ orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1,
+ const orc_uint32 * ORC_RESTRICT s2, int n);
+void cogorc_convert_AYUV_I420 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, orc_uint8 * ORC_RESTRICT d4, int d4_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint64 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void cogorc_convert_AYUV_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n,
int m);
-void cogorc_planar_chroma_420_444 (orc_uint16 * d1, int d1_stride,
- orc_uint16 * d2, int d2_stride, const orc_uint8 * s1, int s1_stride, int n,
+void cogorc_convert_AYUV_Y444 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
int m);
-void cogorc_planar_chroma_422_444 (orc_uint16 * d1, int d1_stride,
- const orc_uint8 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride,
- int n, int m);
-void cogorc_planar_chroma_422_420 (orc_uint8 * d1, int d1_stride,
- const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride,
- int n, int m);
-void cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride,
- const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride,
- const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m);
-void cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m);
-void cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m);
-void cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m);
-void cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
- orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n);
-void cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, orc_uint8 * d4, int d4_stride,
- const orc_uint64 * s1, int s1_stride, const orc_uint64 * s2, int s2_stride,
- int n, int m);
-void cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride,
- const orc_uint64 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride,
- const orc_uint64 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint64 * s1,
- int s1_stride, int n, int m);
-void cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m);
-void cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride,
- const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride,
- const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride,
- const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride,
- const orc_uint16 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride,
- const orc_uint16 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride,
- const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride,
- const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride,
- const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride,
- const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride,
- const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride,
- const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, int n);
-void cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4,
- const orc_uint8 * s5, int n);
+void cogorc_convert_Y42B_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y42B_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y42B_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y444_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y444_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y444_AYUV (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_AYUV_ARGB (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_BGRA (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_ABGR (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_RGBA (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_I420_BGRA (orc_uint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n);
+void cogorc_convert_I420_BGRA_avg (orc_uint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
+ const orc_uint8 * ORC_RESTRICT s5, int n);
/* begin Orc C target preamble */
@@ -263,6 +328,7 @@ void cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))
#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))
#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))
+#ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4
@@ -270,6 +336,7 @@ void cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
#else
#define ORC_RESTRICT
#endif
+#endif
/* end Orc C target preamble */
@@ -277,8 +344,8 @@ void cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
/* cogorc_memcpy_2d */
#ifdef DISABLE_ORC
void
-cogorc_memcpy_2d (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1,
- int s1_stride, int n, int m)
+cogorc_memcpy_2d (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -306,7 +373,7 @@ cogorc_memcpy_2d (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_memcpy_2d (OrcExecutor * ex)
+_backup_cogorc_memcpy_2d (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -335,18 +402,17 @@ _backup_cogorc_memcpy_2d (OrcExecutor * ex)
}
void
-cogorc_memcpy_2d (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1,
- int s1_stride, int n, int m)
+cogorc_memcpy_2d (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -358,7 +424,7 @@ cogorc_memcpy_2d (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1,
orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -381,8 +447,8 @@ cogorc_memcpy_2d (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1,
/* cogorc_downsample_horiz_cosite_1tap */
#ifdef DISABLE_ORC
void
-cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1,
- int n)
+cogorc_downsample_horiz_cosite_1tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -398,7 +464,11 @@ cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1,
/* 0: loadw */
var32 = ptr4[i];
/* 1: select0wb */
- var33 = (orc_uint16) var32.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var32.i;
+ var33 = _src.x2[0];
+ }
/* 2: storeb */
ptr0[i] = var33;
}
@@ -407,7 +477,7 @@ cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_downsample_horiz_cosite_1tap (OrcExecutor * ex)
+_backup_cogorc_downsample_horiz_cosite_1tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -424,7 +494,11 @@ _backup_cogorc_downsample_horiz_cosite_1tap (OrcExecutor * ex)
/* 0: loadw */
var32 = ptr4[i];
/* 1: select0wb */
- var33 = (orc_uint16) var32.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var32.i;
+ var33 = _src.x2[0];
+ }
/* 2: storeb */
ptr0[i] = var33;
}
@@ -432,18 +506,17 @@ _backup_cogorc_downsample_horiz_cosite_1tap (OrcExecutor * ex)
}
void
-cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1,
- int n)
+cogorc_downsample_horiz_cosite_1tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_downsample_horiz_cosite_1tap");
@@ -455,7 +528,7 @@ cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1,
orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -475,8 +548,9 @@ cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1,
/* cogorc_downsample_horiz_cosite_3tap */
#ifdef DISABLE_ORC
void
-cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
- const orc_uint16 * s2, int n)
+cogorc_downsample_horiz_cosite_3tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2,
+ int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -505,9 +579,9 @@ cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
ptr5 = (orc_union16 *) s2;
/* 9: loadpw */
- var40.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var40.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
/* 13: loadpw */
- var41.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var41.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
for (i = 0; i < n; i++) {
/* 0: loadw */
@@ -515,13 +589,25 @@ cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
/* 1: copyw */
var43.i = var38.i;
/* 2: select0wb */
- var44 = (orc_uint16) var43.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var44 = _src.x2[0];
+ }
/* 3: select1wb */
- var45 = ((orc_uint16) var43.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var45 = _src.x2[1];
+ }
/* 4: loadw */
var39 = ptr5[i];
/* 5: select0wb */
- var46 = (orc_uint16) var39.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var46 = _src.x2[0];
+ }
/* 6: convubw */
var47.i = (orc_uint8) var44;
/* 7: convubw */
@@ -548,7 +634,7 @@ cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_downsample_horiz_cosite_3tap (OrcExecutor * ex)
+_backup_cogorc_downsample_horiz_cosite_3tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -578,9 +664,9 @@ _backup_cogorc_downsample_horiz_cosite_3tap (OrcExecutor * ex)
ptr5 = (orc_union16 *) ex->arrays[5];
/* 9: loadpw */
- var40.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var40.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
/* 13: loadpw */
- var41.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var41.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
for (i = 0; i < n; i++) {
/* 0: loadw */
@@ -588,13 +674,25 @@ _backup_cogorc_downsample_horiz_cosite_3tap (OrcExecutor * ex)
/* 1: copyw */
var43.i = var38.i;
/* 2: select0wb */
- var44 = (orc_uint16) var43.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var44 = _src.x2[0];
+ }
/* 3: select1wb */
- var45 = ((orc_uint16) var43.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var45 = _src.x2[1];
+ }
/* 4: loadw */
var39 = ptr5[i];
/* 5: select0wb */
- var46 = (orc_uint16) var39.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var46 = _src.x2[0];
+ }
/* 6: convubw */
var47.i = (orc_uint8) var44;
/* 7: convubw */
@@ -620,18 +718,18 @@ _backup_cogorc_downsample_horiz_cosite_3tap (OrcExecutor * ex)
}
void
-cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
- const orc_uint16 * s2, int n)
+cogorc_downsample_horiz_cosite_3tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2,
+ int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_downsample_horiz_cosite_3tap");
@@ -675,7 +773,7 @@ cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T4,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -696,8 +794,9 @@ cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1,
/* cogorc_downsample_420_jpeg */
#ifdef DISABLE_ORC
void
-cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
- const orc_uint16 * s2, int n)
+cogorc_downsample_420_jpeg (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2,
+ int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -726,9 +825,17 @@ cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
/* 1: copyw */
var40.i = var37.i;
/* 2: select0wb */
- var41 = (orc_uint16) var40.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.i;
+ var41 = _src.x2[0];
+ }
/* 3: select1wb */
- var42 = ((orc_uint16) var40.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.i;
+ var42 = _src.x2[1];
+ }
/* 4: avgub */
var43 = ((orc_uint8) var41 + (orc_uint8) var42 + 1) >> 1;
/* 5: loadw */
@@ -736,9 +843,17 @@ cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
/* 6: copyw */
var44.i = var38.i;
/* 7: select0wb */
- var45 = (orc_uint16) var44.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var44.i;
+ var45 = _src.x2[0];
+ }
/* 8: select1wb */
- var46 = ((orc_uint16) var44.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var44.i;
+ var46 = _src.x2[1];
+ }
/* 9: avgub */
var47 = ((orc_uint8) var45 + (orc_uint8) var46 + 1) >> 1;
/* 10: avgub */
@@ -751,7 +866,7 @@ cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_downsample_420_jpeg (OrcExecutor * ex)
+_backup_cogorc_downsample_420_jpeg (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -781,9 +896,17 @@ _backup_cogorc_downsample_420_jpeg (OrcExecutor * ex)
/* 1: copyw */
var40.i = var37.i;
/* 2: select0wb */
- var41 = (orc_uint16) var40.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.i;
+ var41 = _src.x2[0];
+ }
/* 3: select1wb */
- var42 = ((orc_uint16) var40.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.i;
+ var42 = _src.x2[1];
+ }
/* 4: avgub */
var43 = ((orc_uint8) var41 + (orc_uint8) var42 + 1) >> 1;
/* 5: loadw */
@@ -791,9 +914,17 @@ _backup_cogorc_downsample_420_jpeg (OrcExecutor * ex)
/* 6: copyw */
var44.i = var38.i;
/* 7: select0wb */
- var45 = (orc_uint16) var44.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var44.i;
+ var45 = _src.x2[0];
+ }
/* 8: select1wb */
- var46 = ((orc_uint16) var44.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var44.i;
+ var46 = _src.x2[1];
+ }
/* 9: avgub */
var47 = ((orc_uint8) var45 + (orc_uint8) var46 + 1) >> 1;
/* 10: avgub */
@@ -805,18 +936,18 @@ _backup_cogorc_downsample_420_jpeg (OrcExecutor * ex)
}
void
-cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
- const orc_uint16 * s2, int n)
+cogorc_downsample_420_jpeg (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2,
+ int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_downsample_420_jpeg");
@@ -849,7 +980,7 @@ cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T4,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -870,8 +1001,8 @@ cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1,
/* cogorc_downsample_vert_halfsite_2tap */
#ifdef DISABLE_ORC
void
-cogorc_downsample_vert_halfsite_2tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n)
+cogorc_downsample_vert_halfsite_2tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -901,7 +1032,7 @@ cogorc_downsample_vert_halfsite_2tap (orc_uint8 * d1, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_downsample_vert_halfsite_2tap (OrcExecutor * ex)
+_backup_cogorc_downsample_vert_halfsite_2tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -931,18 +1062,17 @@ _backup_cogorc_downsample_vert_halfsite_2tap (OrcExecutor * ex)
}
void
-cogorc_downsample_vert_halfsite_2tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n)
+cogorc_downsample_vert_halfsite_2tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_downsample_vert_halfsite_2tap");
@@ -955,7 +1085,7 @@ cogorc_downsample_vert_halfsite_2tap (orc_uint8 * d1, const orc_uint8 * s1,
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -976,8 +1106,9 @@ cogorc_downsample_vert_halfsite_2tap (orc_uint8 * d1, const orc_uint8 * s1,
/* cogorc_downsample_vert_cosite_3tap */
#ifdef DISABLE_ORC
void
-cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, int n)
+cogorc_downsample_vert_cosite_3tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -1005,9 +1136,9 @@ cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1,
ptr6 = (orc_int8 *) s3;
/* 6: loadpw */
- var38.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var38.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
/* 10: loadpw */
- var39.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var39.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -1042,7 +1173,7 @@ cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_downsample_vert_cosite_3tap (OrcExecutor * ex)
+_backup_cogorc_downsample_vert_cosite_3tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1071,9 +1202,9 @@ _backup_cogorc_downsample_vert_cosite_3tap (OrcExecutor * ex)
ptr6 = (orc_int8 *) ex->arrays[6];
/* 6: loadpw */
- var38.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var38.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
/* 10: loadpw */
- var39.i = 0x00000002; /* 2 or 9.88131e-324f */
+ var39.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -1107,18 +1238,18 @@ _backup_cogorc_downsample_vert_cosite_3tap (OrcExecutor * ex)
}
void
-cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, int n)
+cogorc_downsample_vert_cosite_3tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_downsample_vert_cosite_3tap");
@@ -1152,7 +1283,7 @@ cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -1174,8 +1305,9 @@ cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1,
/* cogorc_downsample_vert_halfsite_4tap */
#ifdef DISABLE_ORC
void
-cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n)
+cogorc_downsample_vert_halfsite_4tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -1210,11 +1342,11 @@ cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1,
ptr7 = (orc_int8 *) s4;
/* 9: loadpw */
- var40.i = 0x0000001a; /* 26 or 1.28457e-322f */
+ var40.i = (int) 0x0000001a; /* 26 or 1.28457e-322f */
/* 12: loadpw */
- var41.i = 0x00000006; /* 6 or 2.96439e-323f */
+ var41.i = (int) 0x00000006; /* 6 or 2.96439e-323f */
/* 15: loadpw */
- var42.i = 0x00000020; /* 32 or 1.58101e-322f */
+ var42.i = (int) 0x00000020; /* 32 or 1.58101e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -1257,7 +1389,7 @@ cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_downsample_vert_halfsite_4tap (OrcExecutor * ex)
+_backup_cogorc_downsample_vert_halfsite_4tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1293,11 +1425,11 @@ _backup_cogorc_downsample_vert_halfsite_4tap (OrcExecutor * ex)
ptr7 = (orc_int8 *) ex->arrays[7];
/* 9: loadpw */
- var40.i = 0x0000001a; /* 26 or 1.28457e-322f */
+ var40.i = (int) 0x0000001a; /* 26 or 1.28457e-322f */
/* 12: loadpw */
- var41.i = 0x00000006; /* 6 or 2.96439e-323f */
+ var41.i = (int) 0x00000006; /* 6 or 2.96439e-323f */
/* 15: loadpw */
- var42.i = 0x00000020; /* 32 or 1.58101e-322f */
+ var42.i = (int) 0x00000020; /* 32 or 1.58101e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -1339,18 +1471,18 @@ _backup_cogorc_downsample_vert_halfsite_4tap (OrcExecutor * ex)
}
void
-cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n)
+cogorc_downsample_vert_halfsite_4tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_downsample_vert_halfsite_4tap");
@@ -1394,7 +1526,7 @@ cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -1417,7 +1549,8 @@ cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1,
/* cogorc_upsample_horiz_cosite_1tap */
#ifdef DISABLE_ORC
void
-cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1, int n)
+cogorc_upsample_horiz_cosite_1tap (guint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
@@ -1436,7 +1569,12 @@ cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1, int n)
/* 1: copyb */
var35 = var33;
/* 2: mergebw */
- var34.i = ((orc_uint8) var35 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35;
+ _dest.x2[1] = var35;
+ var34.i = _dest.i;
+ }
/* 3: storew */
ptr0[i] = var34;
}
@@ -1445,7 +1583,7 @@ cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1, int n)
#else
static void
-_backup_cogorc_upsample_horiz_cosite_1tap (OrcExecutor * ex)
+_backup_cogorc_upsample_horiz_cosite_1tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1465,7 +1603,12 @@ _backup_cogorc_upsample_horiz_cosite_1tap (OrcExecutor * ex)
/* 1: copyb */
var35 = var33;
/* 2: mergebw */
- var34.i = ((orc_uint8) var35 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35;
+ _dest.x2[1] = var35;
+ var34.i = _dest.i;
+ }
/* 3: storew */
ptr0[i] = var34;
}
@@ -1473,17 +1616,17 @@ _backup_cogorc_upsample_horiz_cosite_1tap (OrcExecutor * ex)
}
void
-cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1, int n)
+cogorc_upsample_horiz_cosite_1tap (guint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_upsample_horiz_cosite_1tap");
@@ -1498,7 +1641,7 @@ cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1, int n)
orc_program_append_2 (p, "mergebw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -1518,8 +1661,8 @@ cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1, int n)
/* cogorc_upsample_horiz_cosite */
#ifdef DISABLE_ORC
void
-cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n)
+cogorc_upsample_horiz_cosite (guint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
@@ -1546,7 +1689,12 @@ cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1,
/* 3: avgub */
var38 = ((orc_uint8) var37 + (orc_uint8) var35 + 1) >> 1;
/* 4: mergebw */
- var36.i = ((orc_uint8) var37 & 0x00ff) | ((orc_uint8) var38 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37;
+ _dest.x2[1] = var38;
+ var36.i = _dest.i;
+ }
/* 5: storew */
ptr0[i] = var36;
}
@@ -1555,7 +1703,7 @@ cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_upsample_horiz_cosite (OrcExecutor * ex)
+_backup_cogorc_upsample_horiz_cosite (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1583,7 +1731,12 @@ _backup_cogorc_upsample_horiz_cosite (OrcExecutor * ex)
/* 3: avgub */
var38 = ((orc_uint8) var37 + (orc_uint8) var35 + 1) >> 1;
/* 4: mergebw */
- var36.i = ((orc_uint8) var37 & 0x00ff) | ((orc_uint8) var38 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37;
+ _dest.x2[1] = var38;
+ var36.i = _dest.i;
+ }
/* 5: storew */
ptr0[i] = var36;
}
@@ -1591,18 +1744,17 @@ _backup_cogorc_upsample_horiz_cosite (OrcExecutor * ex)
}
void
-cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n)
+cogorc_upsample_horiz_cosite (guint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_upsample_horiz_cosite");
@@ -1620,7 +1772,7 @@ cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1,
orc_program_append_2 (p, "mergebw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -1641,8 +1793,8 @@ cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1,
/* cogorc_upsample_vert_avgub */
#ifdef DISABLE_ORC
void
-cogorc_upsample_vert_avgub (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n)
+cogorc_upsample_vert_avgub (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -1672,7 +1824,7 @@ cogorc_upsample_vert_avgub (orc_uint8 * d1, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_upsample_vert_avgub (OrcExecutor * ex)
+_backup_cogorc_upsample_vert_avgub (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1702,18 +1854,17 @@ _backup_cogorc_upsample_vert_avgub (OrcExecutor * ex)
}
void
-cogorc_upsample_vert_avgub (orc_uint8 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, int n)
+cogorc_upsample_vert_avgub (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_upsample_vert_avgub");
@@ -1725,7 +1876,7 @@ cogorc_upsample_vert_avgub (orc_uint8 * d1, const orc_uint8 * s1,
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -1746,7 +1897,8 @@ cogorc_upsample_vert_avgub (orc_uint8 * d1, const orc_uint8 * s1,
/* orc_unpack_yuyv_y */
#ifdef DISABLE_ORC
void
-orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
+orc_unpack_yuyv_y (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -1762,7 +1914,11 @@ orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
/* 0: loadw */
var32 = ptr4[i];
/* 1: select0wb */
- var33 = (orc_uint16) var32.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var32.i;
+ var33 = _src.x2[0];
+ }
/* 2: storeb */
ptr0[i] = var33;
}
@@ -1771,7 +1927,7 @@ orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
#else
static void
-_backup_orc_unpack_yuyv_y (OrcExecutor * ex)
+_backup_orc_unpack_yuyv_y (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1788,7 +1944,11 @@ _backup_orc_unpack_yuyv_y (OrcExecutor * ex)
/* 0: loadw */
var32 = ptr4[i];
/* 1: select0wb */
- var33 = (orc_uint16) var32.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var32.i;
+ var33 = _src.x2[0];
+ }
/* 2: storeb */
ptr0[i] = var33;
}
@@ -1796,17 +1956,17 @@ _backup_orc_unpack_yuyv_y (OrcExecutor * ex)
}
void
-orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
+orc_unpack_yuyv_y (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_unpack_yuyv_y");
@@ -1817,7 +1977,7 @@ orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -1837,7 +1997,8 @@ orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
/* orc_unpack_yuyv_u */
#ifdef DISABLE_ORC
void
-orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_yuyv_u (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -1854,9 +2015,17 @@ orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -1865,7 +2034,7 @@ orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_orc_unpack_yuyv_u (OrcExecutor * ex)
+_backup_orc_unpack_yuyv_u (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1883,9 +2052,17 @@ _backup_orc_unpack_yuyv_u (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -1893,17 +2070,17 @@ _backup_orc_unpack_yuyv_u (OrcExecutor * ex)
}
void
-orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_yuyv_u (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_unpack_yuyv_u");
@@ -1917,7 +2094,7 @@ orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -1937,7 +2114,8 @@ orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* orc_unpack_yuyv_v */
#ifdef DISABLE_ORC
void
-orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_yuyv_v (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -1954,9 +2132,17 @@ orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -1965,7 +2151,7 @@ orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_orc_unpack_yuyv_v (OrcExecutor * ex)
+_backup_orc_unpack_yuyv_v (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -1983,9 +2169,17 @@ _backup_orc_unpack_yuyv_v (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -1993,17 +2187,17 @@ _backup_orc_unpack_yuyv_v (OrcExecutor * ex)
}
void
-orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_yuyv_v (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_unpack_yuyv_v");
@@ -2017,7 +2211,7 @@ orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2037,8 +2231,8 @@ orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* orc_pack_yuyv */
#ifdef DISABLE_ORC
void
-orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int n)
+orc_pack_yuyv (orc_uint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -2067,20 +2261,42 @@ orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
/* 1: copyw */
var41.i = var37.i;
/* 2: select0wb */
- var42 = (orc_uint16) var41.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var42 = _src.x2[0];
+ }
/* 3: select1wb */
- var43 = ((orc_uint16) var41.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var43 = _src.x2[1];
+ }
/* 4: loadb */
var38 = ptr5[i];
/* 5: mergebw */
- var44.i = ((orc_uint8) var42 & 0x00ff) | ((orc_uint8) var38 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var42;
+ _dest.x2[1] = var38;
+ var44.i = _dest.i;
+ }
/* 6: loadb */
var39 = ptr6[i];
/* 7: mergebw */
- var45.i = ((orc_uint8) var43 & 0x00ff) | ((orc_uint8) var39 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43;
+ _dest.x2[1] = var39;
+ var45.i = _dest.i;
+ }
/* 8: mergewl */
- var40.i =
- ((orc_uint16) var44.i & 0x0000ffff) | ((orc_uint16) var45.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var44.i;
+ _dest.x2[1] = var45.i;
+ var40.i = _dest.i;
+ }
/* 9: storel */
ptr0[i] = var40;
}
@@ -2089,7 +2305,7 @@ orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
#else
static void
-_backup_orc_pack_yuyv (OrcExecutor * ex)
+_backup_orc_pack_yuyv (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2119,20 +2335,42 @@ _backup_orc_pack_yuyv (OrcExecutor * ex)
/* 1: copyw */
var41.i = var37.i;
/* 2: select0wb */
- var42 = (orc_uint16) var41.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var42 = _src.x2[0];
+ }
/* 3: select1wb */
- var43 = ((orc_uint16) var41.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var43 = _src.x2[1];
+ }
/* 4: loadb */
var38 = ptr5[i];
/* 5: mergebw */
- var44.i = ((orc_uint8) var42 & 0x00ff) | ((orc_uint8) var38 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var42;
+ _dest.x2[1] = var38;
+ var44.i = _dest.i;
+ }
/* 6: loadb */
var39 = ptr6[i];
/* 7: mergebw */
- var45.i = ((orc_uint8) var43 & 0x00ff) | ((orc_uint8) var39 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43;
+ _dest.x2[1] = var39;
+ var45.i = _dest.i;
+ }
/* 8: mergewl */
- var40.i =
- ((orc_uint16) var44.i & 0x0000ffff) | ((orc_uint16) var45.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var44.i;
+ _dest.x2[1] = var45.i;
+ var40.i = _dest.i;
+ }
/* 9: storel */
ptr0[i] = var40;
}
@@ -2140,18 +2378,17 @@ _backup_orc_pack_yuyv (OrcExecutor * ex)
}
void
-orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int n)
+orc_pack_yuyv (orc_uint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_pack_yuyv");
@@ -2179,7 +2416,7 @@ orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2201,7 +2438,8 @@ orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
/* orc_unpack_uyvy_y */
#ifdef DISABLE_ORC
void
-orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
+orc_unpack_uyvy_y (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -2217,7 +2455,11 @@ orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
/* 0: loadw */
var32 = ptr4[i];
/* 1: select1wb */
- var33 = ((orc_uint16) var32.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var32.i;
+ var33 = _src.x2[1];
+ }
/* 2: storeb */
ptr0[i] = var33;
}
@@ -2226,7 +2468,7 @@ orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
#else
static void
-_backup_orc_unpack_uyvy_y (OrcExecutor * ex)
+_backup_orc_unpack_uyvy_y (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2243,7 +2485,11 @@ _backup_orc_unpack_uyvy_y (OrcExecutor * ex)
/* 0: loadw */
var32 = ptr4[i];
/* 1: select1wb */
- var33 = ((orc_uint16) var32.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var32.i;
+ var33 = _src.x2[1];
+ }
/* 2: storeb */
ptr0[i] = var33;
}
@@ -2251,17 +2497,17 @@ _backup_orc_unpack_uyvy_y (OrcExecutor * ex)
}
void
-orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
+orc_unpack_uyvy_y (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint16 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_unpack_uyvy_y");
@@ -2272,7 +2518,7 @@ orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2292,7 +2538,8 @@ orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n)
/* orc_unpack_uyvy_u */
#ifdef DISABLE_ORC
void
-orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_uyvy_u (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -2309,9 +2556,17 @@ orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -2320,7 +2575,7 @@ orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_orc_unpack_uyvy_u (OrcExecutor * ex)
+_backup_orc_unpack_uyvy_u (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2338,9 +2593,17 @@ _backup_orc_unpack_uyvy_u (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -2348,17 +2611,17 @@ _backup_orc_unpack_uyvy_u (OrcExecutor * ex)
}
void
-orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_uyvy_u (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_unpack_uyvy_u");
@@ -2372,7 +2635,7 @@ orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2392,7 +2655,8 @@ orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* orc_unpack_uyvy_v */
#ifdef DISABLE_ORC
void
-orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_uyvy_v (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -2409,9 +2673,17 @@ orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -2420,7 +2692,7 @@ orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_orc_unpack_uyvy_v (OrcExecutor * ex)
+_backup_orc_unpack_uyvy_v (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2438,9 +2710,17 @@ _backup_orc_unpack_uyvy_v (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -2448,17 +2728,17 @@ _backup_orc_unpack_uyvy_v (OrcExecutor * ex)
}
void
-orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
+orc_unpack_uyvy_v (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_unpack_uyvy_v");
@@ -2472,7 +2752,7 @@ orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2492,8 +2772,8 @@ orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* orc_pack_uyvy */
#ifdef DISABLE_ORC
void
-orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int n)
+orc_pack_uyvy (orc_uint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -2522,20 +2802,42 @@ orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
/* 1: copyw */
var41.i = var37.i;
/* 2: select0wb */
- var42 = (orc_uint16) var41.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var42 = _src.x2[0];
+ }
/* 3: select1wb */
- var43 = ((orc_uint16) var41.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var43 = _src.x2[1];
+ }
/* 4: loadb */
var38 = ptr5[i];
/* 5: mergebw */
- var44.i = ((orc_uint8) var38 & 0x00ff) | ((orc_uint8) var42 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38;
+ _dest.x2[1] = var42;
+ var44.i = _dest.i;
+ }
/* 6: loadb */
var39 = ptr6[i];
/* 7: mergebw */
- var45.i = ((orc_uint8) var39 & 0x00ff) | ((orc_uint8) var43 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39;
+ _dest.x2[1] = var43;
+ var45.i = _dest.i;
+ }
/* 8: mergewl */
- var40.i =
- ((orc_uint16) var44.i & 0x0000ffff) | ((orc_uint16) var45.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var44.i;
+ _dest.x2[1] = var45.i;
+ var40.i = _dest.i;
+ }
/* 9: storel */
ptr0[i] = var40;
}
@@ -2544,7 +2846,7 @@ orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
#else
static void
-_backup_orc_pack_uyvy (OrcExecutor * ex)
+_backup_orc_pack_uyvy (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2574,20 +2876,42 @@ _backup_orc_pack_uyvy (OrcExecutor * ex)
/* 1: copyw */
var41.i = var37.i;
/* 2: select0wb */
- var42 = (orc_uint16) var41.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var42 = _src.x2[0];
+ }
/* 3: select1wb */
- var43 = ((orc_uint16) var41.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.i;
+ var43 = _src.x2[1];
+ }
/* 4: loadb */
var38 = ptr5[i];
/* 5: mergebw */
- var44.i = ((orc_uint8) var38 & 0x00ff) | ((orc_uint8) var42 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38;
+ _dest.x2[1] = var42;
+ var44.i = _dest.i;
+ }
/* 6: loadb */
var39 = ptr6[i];
/* 7: mergebw */
- var45.i = ((orc_uint8) var39 & 0x00ff) | ((orc_uint8) var43 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39;
+ _dest.x2[1] = var43;
+ var45.i = _dest.i;
+ }
/* 8: mergewl */
- var40.i =
- ((orc_uint16) var44.i & 0x0000ffff) | ((orc_uint16) var45.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var44.i;
+ _dest.x2[1] = var45.i;
+ var40.i = _dest.i;
+ }
/* 9: storel */
ptr0[i] = var40;
}
@@ -2595,18 +2919,17 @@ _backup_orc_pack_uyvy (OrcExecutor * ex)
}
void
-orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int n)
+orc_pack_uyvy (orc_uint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_pack_uyvy");
@@ -2634,7 +2957,7 @@ orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2656,7 +2979,8 @@ orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2,
/* orc_addc_convert_u8_s16 */
#ifdef DISABLE_ORC
void
-orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n)
+orc_addc_convert_u8_s16 (orc_uint8 * ORC_RESTRICT d1,
+ const gint16 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -2670,7 +2994,7 @@ orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n)
ptr4 = (orc_union16 *) s1;
/* 1: loadpw */
- var34.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var34.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadw */
@@ -2687,7 +3011,7 @@ orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n)
#else
static void
-_backup_orc_addc_convert_u8_s16 (OrcExecutor * ex)
+_backup_orc_addc_convert_u8_s16 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2702,7 +3026,7 @@ _backup_orc_addc_convert_u8_s16 (OrcExecutor * ex)
ptr4 = (orc_union16 *) ex->arrays[4];
/* 1: loadpw */
- var34.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var34.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadw */
@@ -2718,17 +3042,17 @@ _backup_orc_addc_convert_u8_s16 (OrcExecutor * ex)
}
void
-orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n)
+orc_addc_convert_u8_s16 (orc_uint8 * ORC_RESTRICT d1,
+ const gint16 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_addc_convert_u8_s16");
@@ -2743,7 +3067,7 @@ orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n)
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2763,7 +3087,8 @@ orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n)
/* orc_subc_convert_s16_u8 */
#ifdef DISABLE_ORC
void
-orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n)
+orc_subc_convert_s16_u8 (gint16 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
@@ -2777,7 +3102,7 @@ orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n)
ptr4 = (orc_int8 *) s1;
/* 2: loadpw */
- var34.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var34.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -2794,7 +3119,7 @@ orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n)
#else
static void
-_backup_orc_subc_convert_s16_u8 (OrcExecutor * ex)
+_backup_orc_subc_convert_s16_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2809,7 +3134,7 @@ _backup_orc_subc_convert_s16_u8 (OrcExecutor * ex)
ptr4 = (orc_int8 *) ex->arrays[4];
/* 2: loadpw */
- var34.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var34.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -2825,17 +3150,17 @@ _backup_orc_subc_convert_s16_u8 (OrcExecutor * ex)
}
void
-orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n)
+orc_subc_convert_s16_u8 (gint16 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_subc_convert_s16_u8");
@@ -2850,7 +3175,7 @@ orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n)
orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2870,7 +3195,7 @@ orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n)
/* orc_splat_u8_ns */
#ifdef DISABLE_ORC
void
-orc_splat_u8_ns (orc_uint8 * d1, int p1, int n)
+orc_splat_u8_ns (orc_uint8 * ORC_RESTRICT d1, int p1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -2893,7 +3218,7 @@ orc_splat_u8_ns (orc_uint8 * d1, int p1, int n)
#else
static void
-_backup_orc_splat_u8_ns (OrcExecutor * ex)
+_backup_orc_splat_u8_ns (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -2916,17 +3241,16 @@ _backup_orc_splat_u8_ns (OrcExecutor * ex)
}
void
-orc_splat_u8_ns (orc_uint8 * d1, int p1, int n)
+orc_splat_u8_ns (orc_uint8 * ORC_RESTRICT d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_splat_u8_ns");
@@ -2937,7 +3261,7 @@ orc_splat_u8_ns (orc_uint8 * d1, int p1, int n)
orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -2957,7 +3281,7 @@ orc_splat_u8_ns (orc_uint8 * d1, int p1, int n)
/* orc_splat_s16_ns */
#ifdef DISABLE_ORC
void
-orc_splat_s16_ns (gint16 * d1, int p1, int n)
+orc_splat_s16_ns (gint16 * ORC_RESTRICT d1, int p1, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
@@ -2980,7 +3304,7 @@ orc_splat_s16_ns (gint16 * d1, int p1, int n)
#else
static void
-_backup_orc_splat_s16_ns (OrcExecutor * ex)
+_backup_orc_splat_s16_ns (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -3003,17 +3327,16 @@ _backup_orc_splat_s16_ns (OrcExecutor * ex)
}
void
-orc_splat_s16_ns (gint16 * d1, int p1, int n)
+orc_splat_s16_ns (gint16 * ORC_RESTRICT d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_splat_s16_ns");
@@ -3024,7 +3347,7 @@ orc_splat_s16_ns (gint16 * d1, int p1, int n)
orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -3044,8 +3367,8 @@ orc_splat_s16_ns (gint16 * d1, int p1, int n)
/* orc_matrix2_u8 */
#ifdef DISABLE_ORC
void
-orc_matrix2_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
- int p2, int p3, int n)
+orc_matrix2_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, int p1, int p2, int p3, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -3105,7 +3428,7 @@ orc_matrix2_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
#else
static void
-_backup_orc_matrix2_u8 (OrcExecutor * ex)
+_backup_orc_matrix2_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -3165,18 +3488,17 @@ _backup_orc_matrix2_u8 (OrcExecutor * ex)
}
void
-orc_matrix2_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
- int p2, int p3, int n)
+orc_matrix2_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, int p1, int p2, int p3, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_matrix2_u8");
@@ -3208,7 +3530,7 @@ orc_matrix2_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -3232,8 +3554,8 @@ orc_matrix2_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
/* orc_matrix2_11_u8 */
#ifdef DISABLE_ORC
void
-orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
- int p2, int n)
+orc_matrix2_11_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, int p1, int p2, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -3264,15 +3586,15 @@ orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
ptr5 = (orc_int8 *) s2;
/* 2: loadpw */
- var37.i = 0x00000010; /* 16 or 7.90505e-323f */
+ var37.i = (int) 0x00000010; /* 16 or 7.90505e-323f */
/* 4: loadpw */
var38.i = p1;
/* 8: loadpw */
- var40.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var40.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 10: loadpw */
var41.i = p2;
/* 13: loadpw */
- var42.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var42.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -3311,7 +3633,7 @@ orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
#else
static void
-_backup_orc_matrix2_11_u8 (OrcExecutor * ex)
+_backup_orc_matrix2_11_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -3343,15 +3665,15 @@ _backup_orc_matrix2_11_u8 (OrcExecutor * ex)
ptr5 = (orc_int8 *) ex->arrays[5];
/* 2: loadpw */
- var37.i = 0x00000010; /* 16 or 7.90505e-323f */
+ var37.i = (int) 0x00000010; /* 16 or 7.90505e-323f */
/* 4: loadpw */
var38.i = ex->params[24];
/* 8: loadpw */
- var40.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var40.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 10: loadpw */
var41.i = ex->params[25];
/* 13: loadpw */
- var42.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var42.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -3389,18 +3711,17 @@ _backup_orc_matrix2_11_u8 (OrcExecutor * ex)
}
void
-orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
- int p2, int n)
+orc_matrix2_11_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, int p1, int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_matrix2_11_u8");
@@ -3443,7 +3764,7 @@ orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T3,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -3466,8 +3787,8 @@ orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
/* orc_matrix2_12_u8 */
#ifdef DISABLE_ORC
void
-orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
- int p2, int n)
+orc_matrix2_12_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, int p1, int p2, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -3499,15 +3820,15 @@ orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
ptr5 = (orc_int8 *) s2;
/* 2: loadpw */
- var37.i = 0x00000010; /* 16 or 7.90505e-323f */
+ var37.i = (int) 0x00000010; /* 16 or 7.90505e-323f */
/* 4: loadpw */
var38.i = p1;
/* 8: loadpw */
- var40.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var40.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 10: loadpw */
var41.i = p2;
/* 13: loadpw */
- var42.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var42.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -3548,7 +3869,7 @@ orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
#else
static void
-_backup_orc_matrix2_12_u8 (OrcExecutor * ex)
+_backup_orc_matrix2_12_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -3581,15 +3902,15 @@ _backup_orc_matrix2_12_u8 (OrcExecutor * ex)
ptr5 = (orc_int8 *) ex->arrays[5];
/* 2: loadpw */
- var37.i = 0x00000010; /* 16 or 7.90505e-323f */
+ var37.i = (int) 0x00000010; /* 16 or 7.90505e-323f */
/* 4: loadpw */
var38.i = ex->params[24];
/* 8: loadpw */
- var40.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var40.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 10: loadpw */
var41.i = ex->params[25];
/* 13: loadpw */
- var42.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var42.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -3629,18 +3950,17 @@ _backup_orc_matrix2_12_u8 (OrcExecutor * ex)
}
void
-orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
- int p2, int n)
+orc_matrix2_12_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, int p1, int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_matrix2_12_u8");
@@ -3685,7 +4005,7 @@ orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T3,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -3708,8 +4028,9 @@ orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1,
/* orc_matrix3_u8 */
#ifdef DISABLE_ORC
void
-orc_matrix3_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int n)
+orc_matrix3_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1,
+ int p2, int p3, int p4, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -3786,7 +4107,7 @@ orc_matrix3_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
#else
static void
-_backup_orc_matrix3_u8 (OrcExecutor * ex)
+_backup_orc_matrix3_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -3863,18 +4184,18 @@ _backup_orc_matrix3_u8 (OrcExecutor * ex)
}
void
-orc_matrix3_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int n)
+orc_matrix3_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1,
+ int p2, int p3, int p4, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_matrix3_u8");
@@ -3914,7 +4235,7 @@ orc_matrix3_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -3940,8 +4261,9 @@ orc_matrix3_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
/* orc_matrix3_100_u8 */
#ifdef DISABLE_ORC
void
-orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int n)
+orc_matrix3_100_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1,
+ int p2, int p3, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -3980,19 +4302,19 @@ orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
ptr6 = (orc_int8 *) s3;
/* 2: loadpw */
- var36.i = 0x00000010; /* 16 or 7.90505e-323f */
+ var36.i = (int) 0x00000010; /* 16 or 7.90505e-323f */
/* 4: loadpw */
var37.i = p1;
/* 8: loadpw */
- var39.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var39.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 10: loadpw */
var40.i = p2;
/* 15: loadpw */
- var42.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var42.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 17: loadpw */
var43.i = p3;
/* 20: loadpw */
- var44.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var44.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -4039,7 +4361,7 @@ orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
#else
static void
-_backup_orc_matrix3_100_u8 (OrcExecutor * ex)
+_backup_orc_matrix3_100_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -4079,19 +4401,19 @@ _backup_orc_matrix3_100_u8 (OrcExecutor * ex)
ptr6 = (orc_int8 *) ex->arrays[6];
/* 2: loadpw */
- var36.i = 0x00000010; /* 16 or 7.90505e-323f */
+ var36.i = (int) 0x00000010; /* 16 or 7.90505e-323f */
/* 4: loadpw */
var37.i = ex->params[24];
/* 8: loadpw */
- var39.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var39.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 10: loadpw */
var40.i = ex->params[25];
/* 15: loadpw */
- var42.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var42.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 17: loadpw */
var43.i = ex->params[26];
/* 20: loadpw */
- var44.i = 0x00000080; /* 128 or 6.32404e-322f */
+ var44.i = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -4137,18 +4459,18 @@ _backup_orc_matrix3_100_u8 (OrcExecutor * ex)
}
void
-orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int n)
+orc_matrix3_100_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1,
+ int p2, int p3, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_matrix3_100_u8");
@@ -4198,7 +4520,7 @@ orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T3,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -4223,8 +4545,10 @@ orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
/* orc_matrix3_100_offset_u8 */
#ifdef DISABLE_ORC
void
-orc_matrix3_100_offset_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int p5, int n)
+orc_matrix3_100_offset_u8 (guint8 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+ const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5,
+ int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -4304,7 +4628,7 @@ orc_matrix3_100_offset_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
#else
static void
-_backup_orc_matrix3_100_offset_u8 (OrcExecutor * ex)
+_backup_orc_matrix3_100_offset_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -4384,18 +4708,19 @@ _backup_orc_matrix3_100_offset_u8 (OrcExecutor * ex)
}
void
-orc_matrix3_100_offset_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int p5, int n)
+orc_matrix3_100_offset_u8 (guint8 * ORC_RESTRICT d1,
+ const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
+ const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5,
+ int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_matrix3_100_offset_u8");
@@ -4438,7 +4763,7 @@ orc_matrix3_100_offset_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -4465,8 +4790,9 @@ orc_matrix3_100_offset_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
/* orc_matrix3_000_u8 */
#ifdef DISABLE_ORC
void
-orc_matrix3_000_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int p5, int n)
+orc_matrix3_000_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1,
+ int p2, int p3, int p4, int p5, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -4543,7 +4869,7 @@ orc_matrix3_000_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
#else
static void
-_backup_orc_matrix3_000_u8 (OrcExecutor * ex)
+_backup_orc_matrix3_000_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -4620,18 +4946,18 @@ _backup_orc_matrix3_000_u8 (OrcExecutor * ex)
}
void
-orc_matrix3_000_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
- const guint8 * s3, int p1, int p2, int p3, int p4, int p5, int n)
+orc_matrix3_000_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
+ const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1,
+ int p2, int p3, int p4, int p5, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_matrix3_000_u8");
@@ -4671,7 +4997,7 @@ orc_matrix3_000_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
orc_program_append_2 (p, "convwb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -4698,8 +5024,9 @@ orc_matrix3_000_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2,
/* orc_pack_123x */
#ifdef DISABLE_ORC
void
-orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int p1, int n)
+orc_pack_123x (guint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ int p1, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -4728,14 +5055,28 @@ orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
/* 1: loadb */
var35 = ptr5[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var34 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var34;
+ _dest.x2[1] = var35;
+ var39.i = _dest.i;
+ }
/* 3: loadb */
var36 = ptr6[i];
/* 5: mergebw */
- var40.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var40.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var39.i & 0x0000ffff) | ((orc_uint16) var40.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var39.i;
+ _dest.x2[1] = var40.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
}
@@ -4744,7 +5085,7 @@ orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
#else
static void
-_backup_orc_pack_123x (OrcExecutor * ex)
+_backup_orc_pack_123x (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -4774,14 +5115,28 @@ _backup_orc_pack_123x (OrcExecutor * ex)
/* 1: loadb */
var35 = ptr5[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var34 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var34;
+ _dest.x2[1] = var35;
+ var39.i = _dest.i;
+ }
/* 3: loadb */
var36 = ptr6[i];
/* 5: mergebw */
- var40.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var40.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var39.i & 0x0000ffff) | ((orc_uint16) var40.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var39.i;
+ _dest.x2[1] = var40.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
}
@@ -4789,18 +5144,18 @@ _backup_orc_pack_123x (OrcExecutor * ex)
}
void
-orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int p1, int n)
+orc_pack_123x (guint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_pack_123x");
@@ -4820,7 +5175,7 @@ orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -4843,8 +5198,9 @@ orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
/* orc_pack_x123 */
#ifdef DISABLE_ORC
void
-orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int p1, int n)
+orc_pack_x123 (guint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ int p1, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -4871,16 +5227,30 @@ orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
/* 1: loadb */
var35 = ptr4[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var34 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var34;
+ _dest.x2[1] = var35;
+ var39.i = _dest.i;
+ }
/* 3: loadb */
var36 = ptr5[i];
/* 4: loadb */
var37 = ptr6[i];
/* 5: mergebw */
- var40.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var40.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var39.i & 0x0000ffff) | ((orc_uint16) var40.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var39.i;
+ _dest.x2[1] = var40.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
}
@@ -4889,7 +5259,7 @@ orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
#else
static void
-_backup_orc_pack_x123 (OrcExecutor * ex)
+_backup_orc_pack_x123 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -4917,16 +5287,30 @@ _backup_orc_pack_x123 (OrcExecutor * ex)
/* 1: loadb */
var35 = ptr4[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var34 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var34;
+ _dest.x2[1] = var35;
+ var39.i = _dest.i;
+ }
/* 3: loadb */
var36 = ptr5[i];
/* 4: loadb */
var37 = ptr6[i];
/* 5: mergebw */
- var40.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var40.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var39.i & 0x0000ffff) | ((orc_uint16) var40.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var39.i;
+ _dest.x2[1] = var40.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
}
@@ -4934,18 +5318,18 @@ _backup_orc_pack_x123 (OrcExecutor * ex)
}
void
-orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, int p1, int n)
+orc_pack_x123 (guint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "orc_pack_x123");
@@ -4965,7 +5349,7 @@ orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -4988,7 +5372,8 @@ orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
/* cogorc_combine2_u8 */
#ifdef DISABLE_ORC
void
-cogorc_combine2_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
+cogorc_combine2_u8 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
int p1, int p2, int n)
{
int i;
@@ -5043,7 +5428,7 @@ cogorc_combine2_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
#else
static void
-_backup_cogorc_combine2_u8 (OrcExecutor * ex)
+_backup_cogorc_combine2_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5097,18 +5482,18 @@ _backup_cogorc_combine2_u8 (OrcExecutor * ex)
}
void
-cogorc_combine2_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
+cogorc_combine2_u8 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
int p1, int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_combine2_u8");
@@ -5137,7 +5522,7 @@ cogorc_combine2_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -5160,9 +5545,10 @@ cogorc_combine2_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
/* cogorc_combine4_u8 */
#ifdef DISABLE_ORC
void
-cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, const orc_uint8 * s4, int p1, int p2, int p3, int p4,
- int n)
+cogorc_combine4_u8 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
+ int p1, int p2, int p3, int p4, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -5209,7 +5595,7 @@ cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
/* 16: loadpw */
var41.i = p4;
/* 19: loadpw */
- var42.i = 0x00000020; /* 32 or 1.58101e-322f */
+ var42.i = (int) 0x00000020; /* 32 or 1.58101e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -5256,7 +5642,7 @@ cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
#else
static void
-_backup_cogorc_combine4_u8 (OrcExecutor * ex)
+_backup_cogorc_combine4_u8 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5304,7 +5690,7 @@ _backup_cogorc_combine4_u8 (OrcExecutor * ex)
/* 16: loadpw */
var41.i = ex->params[27];
/* 19: loadpw */
- var42.i = 0x00000020; /* 32 or 1.58101e-322f */
+ var42.i = (int) 0x00000020; /* 32 or 1.58101e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -5350,19 +5736,19 @@ _backup_cogorc_combine4_u8 (OrcExecutor * ex)
}
void
-cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
- const orc_uint8 * s3, const orc_uint8 * s4, int p1, int p2, int p3, int p4,
- int n)
+cogorc_combine4_u8 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
+ int p1, int p2, int p3, int p4, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_combine4_u8");
@@ -5410,7 +5796,7 @@ cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -5437,7 +5823,8 @@ cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2,
/* cogorc_unpack_axyz_0 */
#ifdef DISABLE_ORC
void
-cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_0 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -5454,9 +5841,17 @@ cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5465,7 +5860,7 @@ cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_cogorc_unpack_axyz_0 (OrcExecutor * ex)
+_backup_cogorc_unpack_axyz_0 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5483,9 +5878,17 @@ _backup_cogorc_unpack_axyz_0 (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5493,17 +5896,17 @@ _backup_cogorc_unpack_axyz_0 (OrcExecutor * ex)
}
void
-cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_0 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_unpack_axyz_0");
@@ -5517,7 +5920,7 @@ cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -5537,7 +5940,8 @@ cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* cogorc_unpack_axyz_1 */
#ifdef DISABLE_ORC
void
-cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_1 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -5554,9 +5958,17 @@ cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5565,7 +5977,7 @@ cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_cogorc_unpack_axyz_1 (OrcExecutor * ex)
+_backup_cogorc_unpack_axyz_1 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5583,9 +5995,17 @@ _backup_cogorc_unpack_axyz_1 (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select0lw */
- var35.i = (orc_uint32) var33.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[0];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5593,17 +6013,17 @@ _backup_cogorc_unpack_axyz_1 (OrcExecutor * ex)
}
void
-cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_1 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_unpack_axyz_1");
@@ -5617,7 +6037,7 @@ cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -5637,7 +6057,8 @@ cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* cogorc_unpack_axyz_2 */
#ifdef DISABLE_ORC
void
-cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_2 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -5654,9 +6075,17 @@ cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5665,7 +6094,7 @@ cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_cogorc_unpack_axyz_2 (OrcExecutor * ex)
+_backup_cogorc_unpack_axyz_2 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5683,9 +6112,17 @@ _backup_cogorc_unpack_axyz_2 (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select0wb */
- var34 = (orc_uint16) var35.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[0];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5693,17 +6130,17 @@ _backup_cogorc_unpack_axyz_2 (OrcExecutor * ex)
}
void
-cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_2 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_unpack_axyz_2");
@@ -5717,7 +6154,7 @@ cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -5737,7 +6174,8 @@ cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* cogorc_unpack_axyz_3 */
#ifdef DISABLE_ORC
void
-cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_3 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -5754,9 +6192,17 @@ cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5765,7 +6211,7 @@ cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n)
#else
static void
-_backup_cogorc_unpack_axyz_3 (OrcExecutor * ex)
+_backup_cogorc_unpack_axyz_3 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5783,9 +6229,17 @@ _backup_cogorc_unpack_axyz_3 (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: select1lw */
- var35.i = ((orc_uint32) var33.i >> 16) & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var33.i;
+ var35.i = _src.x2[1];
+ }
/* 2: select1wb */
- var34 = ((orc_uint16) var35.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.i;
+ var34 = _src.x2[1];
+ }
/* 3: storeb */
ptr0[i] = var34;
}
@@ -5793,17 +6247,17 @@ _backup_cogorc_unpack_axyz_3 (OrcExecutor * ex)
}
void
-cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n)
+cogorc_unpack_axyz_3 (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_unpack_axyz_3");
@@ -5817,7 +6271,7 @@ cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n)
orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -5837,8 +6291,8 @@ cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n)
/* cogorc_resample_horiz_1tap */
#ifdef DISABLE_ORC
void
-cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
- int p2, int n)
+cogorc_resample_horiz_1tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -5860,7 +6314,7 @@ cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
#else
static void
-_backup_cogorc_resample_horiz_1tap (OrcExecutor * ex)
+_backup_cogorc_resample_horiz_1tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5882,18 +6336,17 @@ _backup_cogorc_resample_horiz_1tap (OrcExecutor * ex)
}
void
-cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
- int p2, int n)
+cogorc_resample_horiz_1tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_resample_horiz_1tap");
@@ -5906,7 +6359,7 @@ cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
orc_program_append_2 (p, "ldresnearb", 0, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_P1, ORC_VAR_P2);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -5928,8 +6381,8 @@ cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
/* cogorc_resample_horiz_2tap */
#ifdef DISABLE_ORC
void
-cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
- int p2, int n)
+cogorc_resample_horiz_2tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
@@ -5956,7 +6409,7 @@ cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
#else
static void
-_backup_cogorc_resample_horiz_2tap (OrcExecutor * ex)
+_backup_cogorc_resample_horiz_2tap (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -5983,18 +6436,17 @@ _backup_cogorc_resample_horiz_2tap (OrcExecutor * ex)
}
void
-cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
- int p2, int n)
+cogorc_resample_horiz_2tap (orc_uint8 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_resample_horiz_2tap");
@@ -6007,7 +6459,7 @@ cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
orc_program_append_2 (p, "ldreslinb", 0, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_P1, ORC_VAR_P2);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -6029,9 +6481,10 @@ cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1,
/* cogorc_convert_I420_UYVY */
#ifdef DISABLE_ORC
void
-cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n)
+cogorc_convert_I420_UYVY (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1,
+ const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -6062,23 +6515,44 @@ cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2,
/* 1: loadb */
var34 = ptr7[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var39.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var39.x2[0] & 0x00ff) | ((orc_uint8) var35.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var39.x2[1] & 0x00ff) | ((orc_uint8) var35.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[0];
+ _dest.x2[1] = var35.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[1];
+ _dest.x2[1] = var35.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
/* 6: loadw */
var37 = ptr5[i];
/* 7: mergebw */
- var38.x2[0] =
- ((orc_uint8) var39.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var39.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 8: storel */
ptr1[i] = var38;
}
@@ -6087,7 +6561,7 @@ cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2,
#else
static void
-_backup_cogorc_convert_I420_UYVY (OrcExecutor * ex)
+_backup_cogorc_convert_I420_UYVY (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -6119,23 +6593,44 @@ _backup_cogorc_convert_I420_UYVY (OrcExecutor * ex)
/* 1: loadb */
var34 = ptr7[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var39.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var39.x2[0] & 0x00ff) | ((orc_uint8) var35.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var39.x2[1] & 0x00ff) | ((orc_uint8) var35.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[0];
+ _dest.x2[1] = var35.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[1];
+ _dest.x2[1] = var35.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
/* 6: loadw */
var37 = ptr5[i];
/* 7: mergebw */
- var38.x2[0] =
- ((orc_uint8) var39.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var39.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 8: storel */
ptr1[i] = var38;
}
@@ -6143,19 +6638,19 @@ _backup_cogorc_convert_I420_UYVY (OrcExecutor * ex)
}
void
-cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n)
+cogorc_convert_I420_UYVY (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1,
+ const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_convert_I420_UYVY");
@@ -6175,7 +6670,7 @@ cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_S2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -6199,9 +6694,10 @@ cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2,
/* cogorc_convert_I420_YUY2 */
#ifdef DISABLE_ORC
void
-cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n)
+cogorc_convert_I420_YUY2 (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1,
+ const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -6232,23 +6728,44 @@ cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2,
/* 1: loadb */
var34 = ptr7[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var39.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var35.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var35.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
/* 6: loadw */
var37 = ptr5[i];
/* 7: mergebw */
- var38.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 8: storel */
ptr1[i] = var38;
}
@@ -6257,7 +6774,7 @@ cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2,
#else
static void
-_backup_cogorc_convert_I420_YUY2 (OrcExecutor * ex)
+_backup_cogorc_convert_I420_YUY2 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -6289,23 +6806,44 @@ _backup_cogorc_convert_I420_YUY2 (OrcExecutor * ex)
/* 1: loadb */
var34 = ptr7[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var39.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var35.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var35.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
/* 6: loadw */
var37 = ptr5[i];
/* 7: mergebw */
- var38.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 8: storel */
ptr1[i] = var38;
}
@@ -6313,19 +6851,19 @@ _backup_cogorc_convert_I420_YUY2 (OrcExecutor * ex)
}
void
-cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n)
+cogorc_convert_I420_YUY2 (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1,
+ const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_convert_I420_YUY2");
@@ -6345,7 +6883,7 @@ cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D2, ORC_VAR_S2, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -6369,9 +6907,10 @@ cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2,
/* cogorc_convert_I420_AYUV */
#ifdef DISABLE_ORC
void
-cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n)
+cogorc_convert_I420_AYUV (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -6400,9 +6939,9 @@ cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
ptr7 = (orc_int8 *) s4;
/* 3: loadpb */
- var36 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
/* 8: loadpb */
- var39 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var39 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadupdb */
@@ -6410,23 +6949,46 @@ cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
/* 1: loadupdb */
var43 = ptr7[i >> 1];
/* 2: mergebw */
- var44.i = ((orc_uint8) var42 & 0x00ff) | ((orc_uint8) var43 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var42;
+ _dest.x2[1] = var43;
+ var44.i = _dest.i;
+ }
/* 4: loadb */
var37 = ptr4[i];
/* 5: mergebw */
- var45.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var45.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var45.i & 0x0000ffff) | ((orc_uint16) var44.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var45.i;
+ _dest.x2[1] = var44.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
/* 9: loadb */
var40 = ptr5[i];
/* 10: mergebw */
- var46.i = ((orc_uint8) var39 & 0x00ff) | ((orc_uint8) var40 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39;
+ _dest.x2[1] = var40;
+ var46.i = _dest.i;
+ }
/* 11: mergewl */
- var41.i =
- ((orc_uint16) var46.i & 0x0000ffff) | ((orc_uint16) var44.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var46.i;
+ _dest.x2[1] = var44.i;
+ var41.i = _dest.i;
+ }
/* 12: storel */
ptr1[i] = var41;
}
@@ -6435,7 +6997,7 @@ cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
#else
static void
-_backup_cogorc_convert_I420_AYUV (OrcExecutor * ex)
+_backup_cogorc_convert_I420_AYUV (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -6465,9 +7027,9 @@ _backup_cogorc_convert_I420_AYUV (OrcExecutor * ex)
ptr7 = (orc_int8 *) ex->arrays[7];
/* 3: loadpb */
- var36 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
/* 8: loadpb */
- var39 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var39 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadupdb */
@@ -6475,23 +7037,46 @@ _backup_cogorc_convert_I420_AYUV (OrcExecutor * ex)
/* 1: loadupdb */
var43 = ptr7[i >> 1];
/* 2: mergebw */
- var44.i = ((orc_uint8) var42 & 0x00ff) | ((orc_uint8) var43 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var42;
+ _dest.x2[1] = var43;
+ var44.i = _dest.i;
+ }
/* 4: loadb */
var37 = ptr4[i];
/* 5: mergebw */
- var45.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var45.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var45.i & 0x0000ffff) | ((orc_uint16) var44.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var45.i;
+ _dest.x2[1] = var44.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
/* 9: loadb */
var40 = ptr5[i];
/* 10: mergebw */
- var46.i = ((orc_uint8) var39 & 0x00ff) | ((orc_uint8) var40 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var39;
+ _dest.x2[1] = var40;
+ var46.i = _dest.i;
+ }
/* 11: mergewl */
- var41.i =
- ((orc_uint16) var46.i & 0x0000ffff) | ((orc_uint16) var44.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var46.i;
+ _dest.x2[1] = var44.i;
+ var41.i = _dest.i;
+ }
/* 12: storel */
ptr1[i] = var41;
}
@@ -6499,19 +7084,19 @@ _backup_cogorc_convert_I420_AYUV (OrcExecutor * ex)
}
void
-cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
- const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3,
- const orc_uint8 * s4, int n)
+cogorc_convert_I420_AYUV (orc_uint32 * ORC_RESTRICT d1,
+ orc_uint32 * ORC_RESTRICT d2, const orc_uint8 * ORC_RESTRICT s1,
+ const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3,
+ const orc_uint8 * ORC_RESTRICT s4, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_convert_I420_AYUV");
@@ -6543,7 +7128,7 @@ cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -6567,8 +7152,10 @@ cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2,
/* cogorc_convert_YUY2_I420 */
#ifdef DISABLE_ORC
void
-cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
- orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n)
+cogorc_convert_YUY2_I420 (orc_uint16 * ORC_RESTRICT d1,
+ orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3,
+ orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1,
+ const orc_uint32 * ORC_RESTRICT s2, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
@@ -6599,27 +7186,47 @@ cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var40.x2[0] = var35.x2[0] & 0xff;
- var39.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var40.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var40;
/* 3: loadl */
var36 = ptr5[i];
/* 4: splitwb */
- var41.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var42.x2[0] = var36.x2[0] & 0xff;
- var41.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var42.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var41.x2[0] = _src.x2[1];
+ var42.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var41.x2[1] = _src.x2[1];
+ var42.x2[1] = _src.x2[0];
+ }
/* 5: storew */
ptr1[i] = var42;
/* 6: avgub */
var43.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var41.x2[0] + 1) >> 1;
var43.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var41.x2[1] + 1) >> 1;
/* 7: splitwb */
- var37 = (var43.i >> 8) & 0xff;
- var38 = var43.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var37 = _src.x2[1];
+ var38 = _src.x2[0];
+ }
/* 8: storeb */
ptr3[i] = var37;
/* 9: storeb */
@@ -6630,7 +7237,7 @@ cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
#else
static void
-_backup_cogorc_convert_YUY2_I420 (OrcExecutor * ex)
+_backup_cogorc_convert_YUY2_I420 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -6662,27 +7269,47 @@ _backup_cogorc_convert_YUY2_I420 (OrcExecutor * ex)
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var40.x2[0] = var35.x2[0] & 0xff;
- var39.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var40.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var40;
/* 3: loadl */
var36 = ptr5[i];
/* 4: splitwb */
- var41.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var42.x2[0] = var36.x2[0] & 0xff;
- var41.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var42.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var41.x2[0] = _src.x2[1];
+ var42.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var41.x2[1] = _src.x2[1];
+ var42.x2[1] = _src.x2[0];
+ }
/* 5: storew */
ptr1[i] = var42;
/* 6: avgub */
var43.x2[0] = ((orc_uint8) var39.x2[0] + (orc_uint8) var41.x2[0] + 1) >> 1;
var43.x2[1] = ((orc_uint8) var39.x2[1] + (orc_uint8) var41.x2[1] + 1) >> 1;
/* 7: splitwb */
- var37 = (var43.i >> 8) & 0xff;
- var38 = var43.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var37 = _src.x2[1];
+ var38 = _src.x2[0];
+ }
/* 8: storeb */
ptr3[i] = var37;
/* 9: storeb */
@@ -6692,18 +7319,19 @@ _backup_cogorc_convert_YUY2_I420 (OrcExecutor * ex)
}
void
-cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
- orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n)
+cogorc_convert_YUY2_I420 (orc_uint16 * ORC_RESTRICT d1,
+ orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3,
+ orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1,
+ const orc_uint32 * ORC_RESTRICT s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_convert_YUY2_I420");
@@ -6731,7 +7359,7 @@ cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D4, ORC_VAR_D3, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -6755,8 +7383,8 @@ cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
/* cogorc_convert_UYVY_YUY2 */
#ifdef DISABLE_ORC
void
-cogorc_convert_UYVY_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -6785,7 +7413,7 @@ cogorc_convert_UYVY_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
#else
static void
-_backup_cogorc_convert_UYVY_YUY2 (OrcExecutor * ex)
+_backup_cogorc_convert_UYVY_YUY2 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -6815,18 +7443,17 @@ _backup_cogorc_convert_UYVY_YUY2 (OrcExecutor * ex)
}
void
-cogorc_convert_UYVY_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -6838,7 +7465,7 @@ cogorc_convert_UYVY_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
orc_program_append_2 (p, "swapw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -6861,8 +7488,9 @@ cogorc_convert_UYVY_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* cogorc_planar_chroma_420_422 */
#ifdef DISABLE_ORC
void
-cogorc_planar_chroma_420_422 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, const orc_uint8 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_420_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -6900,7 +7528,7 @@ cogorc_planar_chroma_420_422 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
#else
static void
-_backup_cogorc_planar_chroma_420_422 (OrcExecutor * ex)
+_backup_cogorc_planar_chroma_420_422 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -6939,18 +7567,18 @@ _backup_cogorc_planar_chroma_420_422 (OrcExecutor * ex)
}
void
-cogorc_planar_chroma_420_422 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, const orc_uint8 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_420_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -6965,7 +7593,7 @@ cogorc_planar_chroma_420_422 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
orc_program_append_2 (p, "copyb", 0, ORC_VAR_D2, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -6990,8 +7618,9 @@ cogorc_planar_chroma_420_422 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
/* cogorc_planar_chroma_420_444 */
#ifdef DISABLE_ORC
void
-cogorc_planar_chroma_420_444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, const orc_uint8 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_420_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -7023,7 +7652,7 @@ cogorc_planar_chroma_420_444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
#else
static void
-_backup_cogorc_planar_chroma_420_444 (OrcExecutor * ex)
+_backup_cogorc_planar_chroma_420_444 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -7056,18 +7685,18 @@ _backup_cogorc_planar_chroma_420_444 (OrcExecutor * ex)
}
void
-cogorc_planar_chroma_420_444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, const orc_uint8 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_420_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -7085,7 +7714,7 @@ cogorc_planar_chroma_420_444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
orc_program_append_2 (p, "storew", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -7110,8 +7739,8 @@ cogorc_planar_chroma_420_444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
/* cogorc_planar_chroma_422_444 */
#ifdef DISABLE_ORC
void
-cogorc_planar_chroma_422_444 (orc_uint16 * d1, int d1_stride,
- const orc_uint8 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_422_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -7139,7 +7768,7 @@ cogorc_planar_chroma_422_444 (orc_uint16 * d1, int d1_stride,
#else
static void
-_backup_cogorc_planar_chroma_422_444 (OrcExecutor * ex)
+_backup_cogorc_planar_chroma_422_444 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -7168,18 +7797,17 @@ _backup_cogorc_planar_chroma_422_444 (OrcExecutor * ex)
}
void
-cogorc_planar_chroma_422_444 (orc_uint16 * d1, int d1_stride,
- const orc_uint8 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_422_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -7194,7 +7822,7 @@ cogorc_planar_chroma_422_444 (orc_uint16 * d1, int d1_stride,
orc_program_append_2 (p, "storew", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -7217,8 +7845,8 @@ cogorc_planar_chroma_422_444 (orc_uint16 * d1, int d1_stride,
/* cogorc_planar_chroma_444_422 */
#ifdef DISABLE_ORC
void
-cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_444_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -7238,8 +7866,12 @@ cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride,
/* 0: loadw */
var34 = ptr4[i];
/* 1: splitwb */
- var36 = (var34.i >> 8) & 0xff;
- var37 = var34.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var34.i;
+ var36 = _src.x2[1];
+ var37 = _src.x2[0];
+ }
/* 2: avgub */
var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1;
/* 3: storeb */
@@ -7251,7 +7883,7 @@ cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride,
#else
static void
-_backup_cogorc_planar_chroma_444_422 (OrcExecutor * ex)
+_backup_cogorc_planar_chroma_444_422 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -7273,8 +7905,12 @@ _backup_cogorc_planar_chroma_444_422 (OrcExecutor * ex)
/* 0: loadw */
var34 = ptr4[i];
/* 1: splitwb */
- var36 = (var34.i >> 8) & 0xff;
- var37 = var34.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var34.i;
+ var36 = _src.x2[1];
+ var37 = _src.x2[0];
+ }
/* 2: avgub */
var35 = ((orc_uint8) var36 + (orc_uint8) var37 + 1) >> 1;
/* 3: storeb */
@@ -7285,18 +7921,17 @@ _backup_cogorc_planar_chroma_444_422 (OrcExecutor * ex)
}
void
-cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, int n, int m)
+cogorc_planar_chroma_444_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -7312,7 +7947,7 @@ cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride,
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -7335,9 +7970,9 @@ cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride,
/* cogorc_planar_chroma_444_420 */
#ifdef DISABLE_ORC
void
-cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride,
- int n, int m)
+cogorc_planar_chroma_444_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride, int n, int m)
{
int i;
int j;
@@ -7368,8 +8003,12 @@ cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride,
var38.x2[1] =
((orc_uint8) var35.x2[1] + (orc_uint8) var36.x2[1] + 1) >> 1;
/* 3: splitwb */
- var39 = (var38.i >> 8) & 0xff;
- var40 = var38.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var38.i;
+ var39 = _src.x2[1];
+ var40 = _src.x2[0];
+ }
/* 4: avgub */
var37 = ((orc_uint8) var39 + (orc_uint8) var40 + 1) >> 1;
/* 5: storeb */
@@ -7381,7 +8020,7 @@ cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride,
#else
static void
-_backup_cogorc_planar_chroma_444_420 (OrcExecutor * ex)
+_backup_cogorc_planar_chroma_444_420 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -7414,8 +8053,12 @@ _backup_cogorc_planar_chroma_444_420 (OrcExecutor * ex)
var38.x2[1] =
((orc_uint8) var35.x2[1] + (orc_uint8) var36.x2[1] + 1) >> 1;
/* 3: splitwb */
- var39 = (var38.i >> 8) & 0xff;
- var40 = var38.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var38.i;
+ var39 = _src.x2[1];
+ var40 = _src.x2[0];
+ }
/* 4: avgub */
var37 = ((orc_uint8) var39 + (orc_uint8) var40 + 1) >> 1;
/* 5: storeb */
@@ -7426,19 +8069,18 @@ _backup_cogorc_planar_chroma_444_420 (OrcExecutor * ex)
}
void
-cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride,
- const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride,
- int n, int m)
+cogorc_planar_chroma_444_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -7458,7 +8100,7 @@ cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride,
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T3,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -7483,9 +8125,9 @@ cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride,
/* cogorc_planar_chroma_422_420 */
#ifdef DISABLE_ORC
void
-cogorc_planar_chroma_422_420 (orc_uint8 * d1, int d1_stride,
- const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride,
- int n, int m)
+cogorc_planar_chroma_422_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
{
int i;
int j;
@@ -7518,7 +8160,7 @@ cogorc_planar_chroma_422_420 (orc_uint8 * d1, int d1_stride,
#else
static void
-_backup_cogorc_planar_chroma_422_420 (OrcExecutor * ex)
+_backup_cogorc_planar_chroma_422_420 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -7552,19 +8194,18 @@ _backup_cogorc_planar_chroma_422_420 (OrcExecutor * ex)
}
void
-cogorc_planar_chroma_422_420 (orc_uint8 * d1, int d1_stride,
- const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride,
- int n, int m)
+cogorc_planar_chroma_422_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -7577,7 +8218,7 @@ cogorc_planar_chroma_422_420 (orc_uint8 * d1, int d1_stride,
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -7602,8 +8243,8 @@ cogorc_planar_chroma_422_420 (orc_uint8 * d1, int d1_stride,
/* cogorc_convert_YUY2_AYUV */
#ifdef DISABLE_ORC
void
-cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_YUY2_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -7622,32 +8263,58 @@ cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
/* 2: loadpb */
- var37.x2[0] = 0x000000ff; /* 255 or 1.25987e-321f */
- var37.x2[1] = 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadl */
var36 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var40.x2[0] = var36.x2[0] & 0xff;
- var39.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var40.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 3: mergebw */
- var41.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var40.x2[0] << 8);
- var41.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var40.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var40.x2[0];
+ var41.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var40.x2[1];
+ var41.x2[1] = _dest.i;
+ }
/* 4: mergewl */
- var42.i =
- ((orc_uint16) var39.i & 0x0000ffff) | ((orc_uint16) var39.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var39.i;
+ _dest.x2[1] = var39.i;
+ var42.i = _dest.i;
+ }
/* 5: mergewl */
- var38.x2[0] =
- ((orc_uint16) var41.
- x2[0] & 0x0000ffff) | ((orc_uint16) var42.x2[0] << 16);
- var38.x2[1] =
- ((orc_uint16) var41.
- x2[1] & 0x0000ffff) | ((orc_uint16) var42.x2[1] << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[0];
+ _dest.x2[1] = var42.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[1];
+ _dest.x2[1] = var42.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storeq */
ptr0[i] = var38;
}
@@ -7657,7 +8324,7 @@ cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
#else
static void
-_backup_cogorc_convert_YUY2_AYUV (OrcExecutor * ex)
+_backup_cogorc_convert_YUY2_AYUV (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -7678,32 +8345,58 @@ _backup_cogorc_convert_YUY2_AYUV (OrcExecutor * ex)
ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
/* 2: loadpb */
- var37.x2[0] = 0x000000ff; /* 255 or 1.25987e-321f */
- var37.x2[1] = 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadl */
var36 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var40.x2[0] = var36.x2[0] & 0xff;
- var39.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var40.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 3: mergebw */
- var41.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var40.x2[0] << 8);
- var41.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var40.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var40.x2[0];
+ var41.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var40.x2[1];
+ var41.x2[1] = _dest.i;
+ }
/* 4: mergewl */
- var42.i =
- ((orc_uint16) var39.i & 0x0000ffff) | ((orc_uint16) var39.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var39.i;
+ _dest.x2[1] = var39.i;
+ var42.i = _dest.i;
+ }
/* 5: mergewl */
- var38.x2[0] =
- ((orc_uint16) var41.
- x2[0] & 0x0000ffff) | ((orc_uint16) var42.x2[0] << 16);
- var38.x2[1] =
- ((orc_uint16) var41.
- x2[1] & 0x0000ffff) | ((orc_uint16) var42.x2[1] << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[0];
+ _dest.x2[1] = var42.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[1];
+ _dest.x2[1] = var42.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storeq */
ptr0[i] = var38;
}
@@ -7712,18 +8405,17 @@ _backup_cogorc_convert_YUY2_AYUV (OrcExecutor * ex)
}
void
-cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_YUY2_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -7746,7 +8438,7 @@ cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -7769,8 +8461,8 @@ cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
/* cogorc_convert_UYVY_AYUV */
#ifdef DISABLE_ORC
void
-cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -7789,32 +8481,58 @@ cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
/* 2: loadpb */
- var37.x2[0] = 0x000000ff; /* 255 or 1.25987e-321f */
- var37.x2[1] = 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadl */
var36 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var40.x2[0] = var36.x2[0] & 0xff;
- var39.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var40.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 3: mergebw */
- var41.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var41.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var41.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var41.x2[1] = _dest.i;
+ }
/* 4: mergewl */
- var42.i =
- ((orc_uint16) var40.i & 0x0000ffff) | ((orc_uint16) var40.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var40.i;
+ _dest.x2[1] = var40.i;
+ var42.i = _dest.i;
+ }
/* 5: mergewl */
- var38.x2[0] =
- ((orc_uint16) var41.
- x2[0] & 0x0000ffff) | ((orc_uint16) var42.x2[0] << 16);
- var38.x2[1] =
- ((orc_uint16) var41.
- x2[1] & 0x0000ffff) | ((orc_uint16) var42.x2[1] << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[0];
+ _dest.x2[1] = var42.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[1];
+ _dest.x2[1] = var42.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storeq */
ptr0[i] = var38;
}
@@ -7824,7 +8542,7 @@ cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
#else
static void
-_backup_cogorc_convert_UYVY_AYUV (OrcExecutor * ex)
+_backup_cogorc_convert_UYVY_AYUV (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -7845,32 +8563,58 @@ _backup_cogorc_convert_UYVY_AYUV (OrcExecutor * ex)
ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
/* 2: loadpb */
- var37.x2[0] = 0x000000ff; /* 255 or 1.25987e-321f */
- var37.x2[1] = 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+ var37.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadl */
var36 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var40.x2[0] = var36.x2[0] & 0xff;
- var39.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var40.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 3: mergebw */
- var41.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var41.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var41.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var41.x2[1] = _dest.i;
+ }
/* 4: mergewl */
- var42.i =
- ((orc_uint16) var40.i & 0x0000ffff) | ((orc_uint16) var40.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var40.i;
+ _dest.x2[1] = var40.i;
+ var42.i = _dest.i;
+ }
/* 5: mergewl */
- var38.x2[0] =
- ((orc_uint16) var41.
- x2[0] & 0x0000ffff) | ((orc_uint16) var42.x2[0] << 16);
- var38.x2[1] =
- ((orc_uint16) var41.
- x2[1] & 0x0000ffff) | ((orc_uint16) var42.x2[1] << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[0];
+ _dest.x2[1] = var42.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.x2[1];
+ _dest.x2[1] = var42.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storeq */
ptr0[i] = var38;
}
@@ -7879,18 +8623,17 @@ _backup_cogorc_convert_UYVY_AYUV (OrcExecutor * ex)
}
void
-cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -7913,7 +8656,7 @@ cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -7936,9 +8679,10 @@ cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1,
/* cogorc_convert_YUY2_Y42B */
#ifdef DISABLE_ORC
void
-cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_YUY2_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
int i;
int j;
@@ -7963,15 +8707,27 @@ cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
/* 0: loadl */
var33 = ptr4[i];
/* 1: splitwb */
- var37.x2[0] = (var33.x2[0] >> 8) & 0xff;
- var34.x2[0] = var33.x2[0] & 0xff;
- var37.x2[1] = (var33.x2[1] >> 8) & 0xff;
- var34.x2[1] = var33.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[0];
+ var37.x2[0] = _src.x2[1];
+ var34.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[1];
+ var37.x2[1] = _src.x2[1];
+ var34.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var34;
/* 3: splitwb */
- var35 = (var37.i >> 8) & 0xff;
- var36 = var37.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var37.i;
+ var35 = _src.x2[1];
+ var36 = _src.x2[0];
+ }
/* 4: storeb */
ptr2[i] = var35;
/* 5: storeb */
@@ -7983,7 +8739,7 @@ cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
#else
static void
-_backup_cogorc_convert_YUY2_Y42B (OrcExecutor * ex)
+_backup_cogorc_convert_YUY2_Y42B (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -8010,15 +8766,27 @@ _backup_cogorc_convert_YUY2_Y42B (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: splitwb */
- var37.x2[0] = (var33.x2[0] >> 8) & 0xff;
- var34.x2[0] = var33.x2[0] & 0xff;
- var37.x2[1] = (var33.x2[1] >> 8) & 0xff;
- var34.x2[1] = var33.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[0];
+ var37.x2[0] = _src.x2[1];
+ var34.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[1];
+ var37.x2[1] = _src.x2[1];
+ var34.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var34;
/* 3: splitwb */
- var35 = (var37.i >> 8) & 0xff;
- var36 = var37.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var37.i;
+ var35 = _src.x2[1];
+ var36 = _src.x2[0];
+ }
/* 4: storeb */
ptr2[i] = var35;
/* 5: storeb */
@@ -8029,19 +8797,19 @@ _backup_cogorc_convert_YUY2_Y42B (OrcExecutor * ex)
}
void
-cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_YUY2_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -8058,7 +8826,7 @@ cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -8085,9 +8853,10 @@ cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
/* cogorc_convert_UYVY_Y42B */
#ifdef DISABLE_ORC
void
-cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
int i;
int j;
@@ -8112,15 +8881,27 @@ cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
/* 0: loadl */
var33 = ptr4[i];
/* 1: splitwb */
- var34.x2[0] = (var33.x2[0] >> 8) & 0xff;
- var37.x2[0] = var33.x2[0] & 0xff;
- var34.x2[1] = (var33.x2[1] >> 8) & 0xff;
- var37.x2[1] = var33.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[0];
+ var34.x2[0] = _src.x2[1];
+ var37.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[1];
+ var34.x2[1] = _src.x2[1];
+ var37.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var34;
/* 3: splitwb */
- var35 = (var37.i >> 8) & 0xff;
- var36 = var37.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var37.i;
+ var35 = _src.x2[1];
+ var36 = _src.x2[0];
+ }
/* 4: storeb */
ptr2[i] = var35;
/* 5: storeb */
@@ -8132,7 +8913,7 @@ cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
#else
static void
-_backup_cogorc_convert_UYVY_Y42B (OrcExecutor * ex)
+_backup_cogorc_convert_UYVY_Y42B (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -8159,15 +8940,27 @@ _backup_cogorc_convert_UYVY_Y42B (OrcExecutor * ex)
/* 0: loadl */
var33 = ptr4[i];
/* 1: splitwb */
- var34.x2[0] = (var33.x2[0] >> 8) & 0xff;
- var37.x2[0] = var33.x2[0] & 0xff;
- var34.x2[1] = (var33.x2[1] >> 8) & 0xff;
- var37.x2[1] = var33.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[0];
+ var34.x2[0] = _src.x2[1];
+ var37.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var33.x2[1];
+ var34.x2[1] = _src.x2[1];
+ var37.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var34;
/* 3: splitwb */
- var35 = (var37.i >> 8) & 0xff;
- var36 = var37.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var37.i;
+ var35 = _src.x2[1];
+ var36 = _src.x2[0];
+ }
/* 4: storeb */
ptr2[i] = var35;
/* 5: storeb */
@@ -8178,19 +8971,19 @@ _backup_cogorc_convert_UYVY_Y42B (OrcExecutor * ex)
}
void
-cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -8207,7 +9000,7 @@ cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D3, ORC_VAR_D2, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -8234,9 +9027,10 @@ cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
/* cogorc_convert_YUY2_Y444 */
#ifdef DISABLE_ORC
void
-cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_YUY2_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
int i;
int j;
@@ -8263,15 +9057,27 @@ cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var36.x2[0] = var35.x2[0] & 0xff;
- var39.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var36.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var36.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var36.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var36;
/* 3: splitwb */
- var40 = (var39.i >> 8) & 0xff;
- var41 = var39.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var40 = _src.x2[1];
+ var41 = _src.x2[0];
+ }
/* 4: splatbw */
var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
/* 5: storew */
@@ -8287,7 +9093,7 @@ cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
#else
static void
-_backup_cogorc_convert_YUY2_Y444 (OrcExecutor * ex)
+_backup_cogorc_convert_YUY2_Y444 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -8316,15 +9122,27 @@ _backup_cogorc_convert_YUY2_Y444 (OrcExecutor * ex)
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var36.x2[0] = var35.x2[0] & 0xff;
- var39.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var36.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var36.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var36.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var36;
/* 3: splitwb */
- var40 = (var39.i >> 8) & 0xff;
- var41 = var39.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var40 = _src.x2[1];
+ var41 = _src.x2[0];
+ }
/* 4: splatbw */
var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
/* 5: storew */
@@ -8339,19 +9157,19 @@ _backup_cogorc_convert_YUY2_Y444 (OrcExecutor * ex)
}
void
-cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_YUY2_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -8374,7 +9192,7 @@ cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D3, ORC_VAR_T3, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -8401,9 +9219,10 @@ cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
/* cogorc_convert_UYVY_Y444 */
#ifdef DISABLE_ORC
void
-cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
int i;
int j;
@@ -8430,15 +9249,27 @@ cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var36.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var39.x2[0] = var35.x2[0] & 0xff;
- var36.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var39.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var36.x2[0] = _src.x2[1];
+ var39.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var36.x2[1] = _src.x2[1];
+ var39.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var36;
/* 3: splitwb */
- var40 = (var39.i >> 8) & 0xff;
- var41 = var39.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var40 = _src.x2[1];
+ var41 = _src.x2[0];
+ }
/* 4: splatbw */
var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
/* 5: storew */
@@ -8454,7 +9285,7 @@ cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
#else
static void
-_backup_cogorc_convert_UYVY_Y444 (OrcExecutor * ex)
+_backup_cogorc_convert_UYVY_Y444 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -8483,15 +9314,27 @@ _backup_cogorc_convert_UYVY_Y444 (OrcExecutor * ex)
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var36.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var39.x2[0] = var35.x2[0] & 0xff;
- var36.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var39.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var36.x2[0] = _src.x2[1];
+ var39.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var36.x2[1] = _src.x2[1];
+ var39.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var36;
/* 3: splitwb */
- var40 = (var39.i >> 8) & 0xff;
- var41 = var39.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var40 = _src.x2[1];
+ var41 = _src.x2[0];
+ }
/* 4: splatbw */
var37.i = ((var41 & 0xff) << 8) | (var41 & 0xff);
/* 5: storew */
@@ -8506,19 +9349,19 @@ _backup_cogorc_convert_UYVY_Y444 (OrcExecutor * ex)
}
void
-cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_UYVY_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -8541,7 +9384,7 @@ cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
orc_program_append_2 (p, "splatbw", 0, ORC_VAR_D3, ORC_VAR_T3, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -8568,8 +9411,10 @@ cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
/* cogorc_convert_UYVY_I420 */
#ifdef DISABLE_ORC
void
-cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
- orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n)
+cogorc_convert_UYVY_I420 (orc_uint16 * ORC_RESTRICT d1,
+ orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3,
+ orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1,
+ const orc_uint32 * ORC_RESTRICT s2, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
@@ -8600,27 +9445,47 @@ cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var40.x2[0] = var35.x2[0] & 0xff;
- var39.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var40.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var39;
/* 3: loadl */
var36 = ptr5[i];
/* 4: splitwb */
- var41.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var42.x2[0] = var36.x2[0] & 0xff;
- var41.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var42.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var41.x2[0] = _src.x2[1];
+ var42.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var41.x2[1] = _src.x2[1];
+ var42.x2[1] = _src.x2[0];
+ }
/* 5: storew */
ptr1[i] = var41;
/* 6: avgub */
var43.x2[0] = ((orc_uint8) var40.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
var43.x2[1] = ((orc_uint8) var40.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
/* 7: splitwb */
- var37 = (var43.i >> 8) & 0xff;
- var38 = var43.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var37 = _src.x2[1];
+ var38 = _src.x2[0];
+ }
/* 8: storeb */
ptr3[i] = var37;
/* 9: storeb */
@@ -8631,7 +9496,7 @@ cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
#else
static void
-_backup_cogorc_convert_UYVY_I420 (OrcExecutor * ex)
+_backup_cogorc_convert_UYVY_I420 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -8663,27 +9528,47 @@ _backup_cogorc_convert_UYVY_I420 (OrcExecutor * ex)
/* 0: loadl */
var35 = ptr4[i];
/* 1: splitwb */
- var39.x2[0] = (var35.x2[0] >> 8) & 0xff;
- var40.x2[0] = var35.x2[0] & 0xff;
- var39.x2[1] = (var35.x2[1] >> 8) & 0xff;
- var40.x2[1] = var35.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var35.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: storew */
ptr0[i] = var39;
/* 3: loadl */
var36 = ptr5[i];
/* 4: splitwb */
- var41.x2[0] = (var36.x2[0] >> 8) & 0xff;
- var42.x2[0] = var36.x2[0] & 0xff;
- var41.x2[1] = (var36.x2[1] >> 8) & 0xff;
- var42.x2[1] = var36.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[0];
+ var41.x2[0] = _src.x2[1];
+ var42.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var36.x2[1];
+ var41.x2[1] = _src.x2[1];
+ var42.x2[1] = _src.x2[0];
+ }
/* 5: storew */
ptr1[i] = var41;
/* 6: avgub */
var43.x2[0] = ((orc_uint8) var40.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
var43.x2[1] = ((orc_uint8) var40.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
/* 7: splitwb */
- var37 = (var43.i >> 8) & 0xff;
- var38 = var43.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var43.i;
+ var37 = _src.x2[1];
+ var38 = _src.x2[0];
+ }
/* 8: storeb */
ptr3[i] = var37;
/* 9: storeb */
@@ -8693,18 +9578,19 @@ _backup_cogorc_convert_UYVY_I420 (OrcExecutor * ex)
}
void
-cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
- orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n)
+cogorc_convert_UYVY_I420 (orc_uint16 * ORC_RESTRICT d1,
+ orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3,
+ orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1,
+ const orc_uint32 * ORC_RESTRICT s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_convert_UYVY_I420");
@@ -8732,7 +9618,7 @@ cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
orc_program_append_2 (p, "splitwb", 0, ORC_VAR_D4, ORC_VAR_D3, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -8756,10 +9642,11 @@ cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3,
/* cogorc_convert_AYUV_I420 */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, orc_uint8 * d4, int d4_stride,
- const orc_uint64 * s1, int s1_stride, const orc_uint64 * s2, int s2_stride,
- int n, int m)
+cogorc_convert_AYUV_I420 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, orc_uint8 * ORC_RESTRICT d4, int d4_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint64 * ORC_RESTRICT s2, int s2_stride, int n, int m)
{
int i;
int j;
@@ -8800,25 +9687,57 @@ cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
/* 0: loadq */
var40 = ptr4[i];
/* 1: splitlw */
- var46.x2[0] = (var40.x2[0] >> 16) & 0xffff;
- var47.x2[0] = var40.x2[0] & 0xffff;
- var46.x2[1] = (var40.x2[1] >> 16) & 0xffff;
- var47.x2[1] = var40.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.x2[0];
+ var46.x2[0] = _src.x2[1];
+ var47.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var40.x2[1];
+ var46.x2[1] = _src.x2[1];
+ var47.x2[1] = _src.x2[0];
+ }
/* 2: select1wb */
- var41.x2[0] = ((orc_uint16) var47.x2[0] >> 8) & 0xff;
- var41.x2[1] = ((orc_uint16) var47.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var47.x2[0];
+ var41.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var47.x2[1];
+ var41.x2[1] = _src.x2[1];
+ }
/* 3: storew */
ptr0[i] = var41;
/* 4: loadq */
var42 = ptr5[i];
/* 5: splitlw */
- var48.x2[0] = (var42.x2[0] >> 16) & 0xffff;
- var49.x2[0] = var42.x2[0] & 0xffff;
- var48.x2[1] = (var42.x2[1] >> 16) & 0xffff;
- var49.x2[1] = var42.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var42.x2[0];
+ var48.x2[0] = _src.x2[1];
+ var49.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var42.x2[1];
+ var48.x2[1] = _src.x2[1];
+ var49.x2[1] = _src.x2[0];
+ }
/* 6: select1wb */
- var43.x2[0] = ((orc_uint16) var49.x2[0] >> 8) & 0xff;
- var43.x2[1] = ((orc_uint16) var49.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var49.x2[0];
+ var43.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var49.x2[1];
+ var43.x2[1] = _src.x2[1];
+ }
/* 7: storew */
ptr1[i] = var43;
/* 8: avgub */
@@ -8831,20 +9750,36 @@ cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
var50.x4[3] =
((orc_uint8) var46.x4[3] + (orc_uint8) var48.x4[3] + 1) >> 1;
/* 9: splitwb */
- var51.x2[0] = (var50.x2[0] >> 8) & 0xff;
- var52.x2[0] = var50.x2[0] & 0xff;
- var51.x2[1] = (var50.x2[1] >> 8) & 0xff;
- var52.x2[1] = var50.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var50.x2[0];
+ var51.x2[0] = _src.x2[1];
+ var52.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var50.x2[1];
+ var51.x2[1] = _src.x2[1];
+ var52.x2[1] = _src.x2[0];
+ }
/* 10: splitwb */
- var53 = (var52.i >> 8) & 0xff;
- var54 = var52.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var52.i;
+ var53 = _src.x2[1];
+ var54 = _src.x2[0];
+ }
/* 11: avgub */
var44 = ((orc_uint8) var53 + (orc_uint8) var54 + 1) >> 1;
/* 12: storeb */
ptr2[i] = var44;
/* 13: splitwb */
- var55 = (var51.i >> 8) & 0xff;
- var56 = var51.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var51.i;
+ var55 = _src.x2[1];
+ var56 = _src.x2[0];
+ }
/* 14: avgub */
var45 = ((orc_uint8) var55 + (orc_uint8) var56 + 1) >> 1;
/* 15: storeb */
@@ -8856,7 +9791,7 @@ cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
#else
static void
-_backup_cogorc_convert_AYUV_I420 (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_I420 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -8899,25 +9834,57 @@ _backup_cogorc_convert_AYUV_I420 (OrcExecutor * ex)
/* 0: loadq */
var40 = ptr4[i];
/* 1: splitlw */
- var46.x2[0] = (var40.x2[0] >> 16) & 0xffff;
- var47.x2[0] = var40.x2[0] & 0xffff;
- var46.x2[1] = (var40.x2[1] >> 16) & 0xffff;
- var47.x2[1] = var40.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.x2[0];
+ var46.x2[0] = _src.x2[1];
+ var47.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var40.x2[1];
+ var46.x2[1] = _src.x2[1];
+ var47.x2[1] = _src.x2[0];
+ }
/* 2: select1wb */
- var41.x2[0] = ((orc_uint16) var47.x2[0] >> 8) & 0xff;
- var41.x2[1] = ((orc_uint16) var47.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var47.x2[0];
+ var41.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var47.x2[1];
+ var41.x2[1] = _src.x2[1];
+ }
/* 3: storew */
ptr0[i] = var41;
/* 4: loadq */
var42 = ptr5[i];
/* 5: splitlw */
- var48.x2[0] = (var42.x2[0] >> 16) & 0xffff;
- var49.x2[0] = var42.x2[0] & 0xffff;
- var48.x2[1] = (var42.x2[1] >> 16) & 0xffff;
- var49.x2[1] = var42.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var42.x2[0];
+ var48.x2[0] = _src.x2[1];
+ var49.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var42.x2[1];
+ var48.x2[1] = _src.x2[1];
+ var49.x2[1] = _src.x2[0];
+ }
/* 6: select1wb */
- var43.x2[0] = ((orc_uint16) var49.x2[0] >> 8) & 0xff;
- var43.x2[1] = ((orc_uint16) var49.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var49.x2[0];
+ var43.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var49.x2[1];
+ var43.x2[1] = _src.x2[1];
+ }
/* 7: storew */
ptr1[i] = var43;
/* 8: avgub */
@@ -8930,20 +9897,36 @@ _backup_cogorc_convert_AYUV_I420 (OrcExecutor * ex)
var50.x4[3] =
((orc_uint8) var46.x4[3] + (orc_uint8) var48.x4[3] + 1) >> 1;
/* 9: splitwb */
- var51.x2[0] = (var50.x2[0] >> 8) & 0xff;
- var52.x2[0] = var50.x2[0] & 0xff;
- var51.x2[1] = (var50.x2[1] >> 8) & 0xff;
- var52.x2[1] = var50.x2[1] & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var50.x2[0];
+ var51.x2[0] = _src.x2[1];
+ var52.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var50.x2[1];
+ var51.x2[1] = _src.x2[1];
+ var52.x2[1] = _src.x2[0];
+ }
/* 10: splitwb */
- var53 = (var52.i >> 8) & 0xff;
- var54 = var52.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var52.i;
+ var53 = _src.x2[1];
+ var54 = _src.x2[0];
+ }
/* 11: avgub */
var44 = ((orc_uint8) var53 + (orc_uint8) var54 + 1) >> 1;
/* 12: storeb */
ptr2[i] = var44;
/* 13: splitwb */
- var55 = (var51.i >> 8) & 0xff;
- var56 = var51.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var51.i;
+ var55 = _src.x2[1];
+ var56 = _src.x2[0];
+ }
/* 14: avgub */
var45 = ((orc_uint8) var55 + (orc_uint8) var56 + 1) >> 1;
/* 15: storeb */
@@ -8954,20 +9937,20 @@ _backup_cogorc_convert_AYUV_I420 (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, orc_uint8 * d4, int d4_stride,
- const orc_uint64 * s1, int s1_stride, const orc_uint64 * s2, int s2_stride,
- int n, int m)
+cogorc_convert_AYUV_I420 (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, orc_uint8 * ORC_RESTRICT d4, int d4_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint64 * ORC_RESTRICT s2, int s2_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -9009,7 +9992,7 @@ cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D4, ORC_VAR_T7, ORC_VAR_T8,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -9040,8 +10023,8 @@ cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2,
/* cogorc_convert_AYUV_YUY2 */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -9065,26 +10048,54 @@ cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
/* 0: loadq */
var37 = ptr4[i];
/* 1: splitlw */
- var39.x2[0] = (var37.x2[0] >> 16) & 0xffff;
- var40.x2[0] = var37.x2[0] & 0xffff;
- var39.x2[1] = (var37.x2[1] >> 16) & 0xffff;
- var40.x2[1] = var37.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: splitlw */
- var41.i = (var39.i >> 16) & 0xffff;
- var42.i = var39.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var39.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 3: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
var43.x2[1] =
((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
/* 4: select1wb */
- var44.x2[0] = ((orc_uint16) var40.x2[0] >> 8) & 0xff;
- var44.x2[1] = ((orc_uint16) var40.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[0];
+ var44.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[1];
+ var44.x2[1] = _src.x2[1];
+ }
/* 5: mergebw */
- var38.x2[0] =
- ((orc_uint8) var44.x2[0] & 0x00ff) | ((orc_uint8) var43.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var44.x2[1] & 0x00ff) | ((orc_uint8) var43.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var44.x2[0];
+ _dest.x2[1] = var43.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var44.x2[1];
+ _dest.x2[1] = var43.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storel */
ptr0[i] = var38;
}
@@ -9094,7 +10105,7 @@ cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
#else
static void
-_backup_cogorc_convert_AYUV_YUY2 (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_YUY2 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -9120,26 +10131,54 @@ _backup_cogorc_convert_AYUV_YUY2 (OrcExecutor * ex)
/* 0: loadq */
var37 = ptr4[i];
/* 1: splitlw */
- var39.x2[0] = (var37.x2[0] >> 16) & 0xffff;
- var40.x2[0] = var37.x2[0] & 0xffff;
- var39.x2[1] = (var37.x2[1] >> 16) & 0xffff;
- var40.x2[1] = var37.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: splitlw */
- var41.i = (var39.i >> 16) & 0xffff;
- var42.i = var39.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var39.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 3: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
var43.x2[1] =
((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
/* 4: select1wb */
- var44.x2[0] = ((orc_uint16) var40.x2[0] >> 8) & 0xff;
- var44.x2[1] = ((orc_uint16) var40.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[0];
+ var44.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[1];
+ var44.x2[1] = _src.x2[1];
+ }
/* 5: mergebw */
- var38.x2[0] =
- ((orc_uint8) var44.x2[0] & 0x00ff) | ((orc_uint8) var43.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var44.x2[1] & 0x00ff) | ((orc_uint8) var43.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var44.x2[0];
+ _dest.x2[1] = var43.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var44.x2[1];
+ _dest.x2[1] = var43.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storel */
ptr0[i] = var38;
}
@@ -9148,18 +10187,17 @@ _backup_cogorc_convert_AYUV_YUY2 (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -9184,7 +10222,7 @@ cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -9207,8 +10245,8 @@ cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
/* cogorc_convert_AYUV_UYVY */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -9232,26 +10270,54 @@ cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
/* 0: loadq */
var37 = ptr4[i];
/* 1: splitlw */
- var39.x2[0] = (var37.x2[0] >> 16) & 0xffff;
- var40.x2[0] = var37.x2[0] & 0xffff;
- var39.x2[1] = (var37.x2[1] >> 16) & 0xffff;
- var40.x2[1] = var37.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: splitlw */
- var41.i = (var39.i >> 16) & 0xffff;
- var42.i = var39.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var39.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 3: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
var43.x2[1] =
((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
/* 4: select1wb */
- var44.x2[0] = ((orc_uint16) var40.x2[0] >> 8) & 0xff;
- var44.x2[1] = ((orc_uint16) var40.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[0];
+ var44.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[1];
+ var44.x2[1] = _src.x2[1];
+ }
/* 5: mergebw */
- var38.x2[0] =
- ((orc_uint8) var43.x2[0] & 0x00ff) | ((orc_uint8) var44.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var43.x2[1] & 0x00ff) | ((orc_uint8) var44.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[0];
+ _dest.x2[1] = var44.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[1];
+ _dest.x2[1] = var44.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storel */
ptr0[i] = var38;
}
@@ -9261,7 +10327,7 @@ cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
#else
static void
-_backup_cogorc_convert_AYUV_UYVY (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_UYVY (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -9287,26 +10353,54 @@ _backup_cogorc_convert_AYUV_UYVY (OrcExecutor * ex)
/* 0: loadq */
var37 = ptr4[i];
/* 1: splitlw */
- var39.x2[0] = (var37.x2[0] >> 16) & 0xffff;
- var40.x2[0] = var37.x2[0] & 0xffff;
- var39.x2[1] = (var37.x2[1] >> 16) & 0xffff;
- var40.x2[1] = var37.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[0];
+ var39.x2[0] = _src.x2[1];
+ var40.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var37.x2[1];
+ var39.x2[1] = _src.x2[1];
+ var40.x2[1] = _src.x2[0];
+ }
/* 2: splitlw */
- var41.i = (var39.i >> 16) & 0xffff;
- var42.i = var39.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var39.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 3: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
var43.x2[1] =
((orc_uint8) var41.x2[1] + (orc_uint8) var42.x2[1] + 1) >> 1;
/* 4: select1wb */
- var44.x2[0] = ((orc_uint16) var40.x2[0] >> 8) & 0xff;
- var44.x2[1] = ((orc_uint16) var40.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[0];
+ var44.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var40.x2[1];
+ var44.x2[1] = _src.x2[1];
+ }
/* 5: mergebw */
- var38.x2[0] =
- ((orc_uint8) var43.x2[0] & 0x00ff) | ((orc_uint8) var44.x2[0] << 8);
- var38.x2[1] =
- ((orc_uint8) var43.x2[1] & 0x00ff) | ((orc_uint8) var44.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[0];
+ _dest.x2[1] = var44.x2[0];
+ var38.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[1];
+ _dest.x2[1] = var44.x2[1];
+ var38.x2[1] = _dest.i;
+ }
/* 6: storel */
ptr0[i] = var38;
}
@@ -9315,18 +10409,17 @@ _backup_cogorc_convert_AYUV_UYVY (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -9351,7 +10444,7 @@ cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -9374,9 +10467,10 @@ cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1,
/* cogorc_convert_AYUV_Y42B */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint64 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
int i;
int j;
@@ -9405,28 +10499,52 @@ cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
/* 0: loadq */
var36 = ptr4[i];
/* 1: splitlw */
- var40.x2[0] = (var36.x2[0] >> 16) & 0xffff;
- var41.x2[0] = var36.x2[0] & 0xffff;
- var40.x2[1] = (var36.x2[1] >> 16) & 0xffff;
- var41.x2[1] = var36.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var36.x2[0];
+ var40.x2[0] = _src.x2[1];
+ var41.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var36.x2[1];
+ var40.x2[1] = _src.x2[1];
+ var41.x2[1] = _src.x2[0];
+ }
/* 2: splitlw */
- var42.i = (var40.i >> 16) & 0xffff;
- var43.i = var40.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.i;
+ var42.i = _src.x2[1];
+ var43.i = _src.x2[0];
+ }
/* 3: avgub */
var44.x2[0] =
((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1;
var44.x2[1] =
((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1;
/* 4: splitwb */
- var37 = (var44.i >> 8) & 0xff;
- var38 = var44.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var44.i;
+ var37 = _src.x2[1];
+ var38 = _src.x2[0];
+ }
/* 5: storeb */
ptr2[i] = var37;
/* 6: storeb */
ptr1[i] = var38;
/* 7: select1wb */
- var39.x2[0] = ((orc_uint16) var41.x2[0] >> 8) & 0xff;
- var39.x2[1] = ((orc_uint16) var41.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.x2[0];
+ var39.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var41.x2[1];
+ var39.x2[1] = _src.x2[1];
+ }
/* 8: storew */
ptr0[i] = var39;
}
@@ -9436,7 +10554,7 @@ cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
#else
static void
-_backup_cogorc_convert_AYUV_Y42B (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_Y42B (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -9467,28 +10585,52 @@ _backup_cogorc_convert_AYUV_Y42B (OrcExecutor * ex)
/* 0: loadq */
var36 = ptr4[i];
/* 1: splitlw */
- var40.x2[0] = (var36.x2[0] >> 16) & 0xffff;
- var41.x2[0] = var36.x2[0] & 0xffff;
- var40.x2[1] = (var36.x2[1] >> 16) & 0xffff;
- var41.x2[1] = var36.x2[1] & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var36.x2[0];
+ var40.x2[0] = _src.x2[1];
+ var41.x2[0] = _src.x2[0];
+ }
+ {
+ orc_union32 _src;
+ _src.i = var36.x2[1];
+ var40.x2[1] = _src.x2[1];
+ var41.x2[1] = _src.x2[0];
+ }
/* 2: splitlw */
- var42.i = (var40.i >> 16) & 0xffff;
- var43.i = var40.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.i;
+ var42.i = _src.x2[1];
+ var43.i = _src.x2[0];
+ }
/* 3: avgub */
var44.x2[0] =
((orc_uint8) var42.x2[0] + (orc_uint8) var43.x2[0] + 1) >> 1;
var44.x2[1] =
((orc_uint8) var42.x2[1] + (orc_uint8) var43.x2[1] + 1) >> 1;
/* 4: splitwb */
- var37 = (var44.i >> 8) & 0xff;
- var38 = var44.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var44.i;
+ var37 = _src.x2[1];
+ var38 = _src.x2[0];
+ }
/* 5: storeb */
ptr2[i] = var37;
/* 6: storeb */
ptr1[i] = var38;
/* 7: select1wb */
- var39.x2[0] = ((orc_uint16) var41.x2[0] >> 8) & 0xff;
- var39.x2[1] = ((orc_uint16) var41.x2[1] >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var41.x2[0];
+ var39.x2[0] = _src.x2[1];
+ }
+ {
+ orc_union16 _src;
+ _src.i = var41.x2[1];
+ var39.x2[1] = _src.x2[1];
+ }
/* 8: storew */
ptr0[i] = var39;
}
@@ -9497,19 +10639,19 @@ _backup_cogorc_convert_AYUV_Y42B (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint64 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -9535,7 +10677,7 @@ cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
orc_program_append_2 (p, "select1wb", 1, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -9562,9 +10704,10 @@ cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2,
/* cogorc_convert_AYUV_Y444 */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_Y444 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
int i;
int j;
@@ -9590,17 +10733,29 @@ cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
/* 0: loadl */
var34 = ptr4[i];
/* 1: splitlw */
- var38.i = (var34.i >> 16) & 0xffff;
- var39.i = var34.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var34.i;
+ var38.i = _src.x2[1];
+ var39.i = _src.x2[0];
+ }
/* 2: splitwb */
- var35 = (var38.i >> 8) & 0xff;
- var36 = var38.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var38.i;
+ var35 = _src.x2[1];
+ var36 = _src.x2[0];
+ }
/* 3: storeb */
ptr2[i] = var35;
/* 4: storeb */
ptr1[i] = var36;
/* 5: select1wb */
- var37 = ((orc_uint16) var39.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var37 = _src.x2[1];
+ }
/* 6: storeb */
ptr0[i] = var37;
}
@@ -9610,7 +10765,7 @@ cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
#else
static void
-_backup_cogorc_convert_AYUV_Y444 (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_Y444 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -9638,17 +10793,29 @@ _backup_cogorc_convert_AYUV_Y444 (OrcExecutor * ex)
/* 0: loadl */
var34 = ptr4[i];
/* 1: splitlw */
- var38.i = (var34.i >> 16) & 0xffff;
- var39.i = var34.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var34.i;
+ var38.i = _src.x2[1];
+ var39.i = _src.x2[0];
+ }
/* 2: splitwb */
- var35 = (var38.i >> 8) & 0xff;
- var36 = var38.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var38.i;
+ var35 = _src.x2[1];
+ var36 = _src.x2[0];
+ }
/* 3: storeb */
ptr2[i] = var35;
/* 4: storeb */
ptr1[i] = var36;
/* 5: select1wb */
- var37 = ((orc_uint16) var39.i >> 8) & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var39.i;
+ var37 = _src.x2[1];
+ }
/* 6: storeb */
ptr0[i] = var37;
}
@@ -9657,19 +10824,19 @@ _backup_cogorc_convert_AYUV_Y444 (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
- int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_Y444 (orc_uint8 * ORC_RESTRICT d1, int d1_stride,
+ orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3,
+ int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n,
+ int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -9689,7 +10856,7 @@ cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1,
ORC_VAR_D1, ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -9716,9 +10883,10 @@ cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2,
/* cogorc_convert_Y42B_YUY2 */
#ifdef DISABLE_ORC
void
-cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y42B_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
int i;
int j;
@@ -9745,14 +10913,27 @@ cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* 1: loadb */
var34 = ptr6[i];
/* 2: mergebw */
- var37.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var37.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var35.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var35.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
}
@@ -9762,7 +10943,7 @@ cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_convert_Y42B_YUY2 (OrcExecutor * ex)
+_backup_cogorc_convert_Y42B_YUY2 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -9791,14 +10972,27 @@ _backup_cogorc_convert_Y42B_YUY2 (OrcExecutor * ex)
/* 1: loadb */
var34 = ptr6[i];
/* 2: mergebw */
- var37.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var37.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var35.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var35.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var35.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
}
@@ -9807,19 +11001,19 @@ _backup_cogorc_convert_Y42B_YUY2 (OrcExecutor * ex)
}
void
-cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y42B_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -9836,7 +11030,7 @@ cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -9863,9 +11057,10 @@ cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* cogorc_convert_Y42B_UYVY */
#ifdef DISABLE_ORC
void
-cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y42B_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
int i;
int j;
@@ -9892,14 +11087,27 @@ cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* 1: loadb */
var34 = ptr6[i];
/* 2: mergebw */
- var37.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var37.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var35.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var35.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var35.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var35.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
}
@@ -9909,7 +11117,7 @@ cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_convert_Y42B_UYVY (OrcExecutor * ex)
+_backup_cogorc_convert_Y42B_UYVY (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -9938,14 +11146,27 @@ _backup_cogorc_convert_Y42B_UYVY (OrcExecutor * ex)
/* 1: loadb */
var34 = ptr6[i];
/* 2: mergebw */
- var37.i = ((orc_uint8) var33 & 0x00ff) | ((orc_uint8) var34 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var33;
+ _dest.x2[1] = var34;
+ var37.i = _dest.i;
+ }
/* 3: loadw */
var35 = ptr4[i];
/* 4: mergebw */
- var36.x2[0] =
- ((orc_uint8) var37.x2[0] & 0x00ff) | ((orc_uint8) var35.x2[0] << 8);
- var36.x2[1] =
- ((orc_uint8) var37.x2[1] & 0x00ff) | ((orc_uint8) var35.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[0];
+ _dest.x2[1] = var35.x2[0];
+ var36.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var37.x2[1];
+ _dest.x2[1] = var35.x2[1];
+ var36.x2[1] = _dest.i;
+ }
/* 5: storel */
ptr0[i] = var36;
}
@@ -9954,19 +11175,19 @@ _backup_cogorc_convert_Y42B_UYVY (OrcExecutor * ex)
}
void
-cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y42B_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -9983,7 +11204,7 @@ cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -10010,9 +11231,10 @@ cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* cogorc_convert_Y42B_AYUV */
#ifdef DISABLE_ORC
void
-cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y42B_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
int i;
int j;
@@ -10036,8 +11258,8 @@ cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1,
ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
/* 3: loadpb */
- var38.x2[0] = 0x000000ff; /* 255 or 1.25987e-321f */
- var38.x2[1] = 0x000000ff; /* 255 or 1.25987e-321f */
+ var38.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+ var38.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -10045,24 +11267,47 @@ cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1,
/* 1: loadb */
var37 = ptr6[i];
/* 2: mergebw */
- var41.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var41.i = _dest.i;
+ }
/* 4: loadw */
var39 = ptr4[i];
/* 5: mergebw */
- var42.x2[0] =
- ((orc_uint8) var38.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var42.x2[1] =
- ((orc_uint8) var38.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var42.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var42.x2[1] = _dest.i;
+ }
/* 6: mergewl */
- var43.i =
- ((orc_uint16) var41.i & 0x0000ffff) | ((orc_uint16) var41.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.i;
+ _dest.x2[1] = var41.i;
+ var43.i = _dest.i;
+ }
/* 7: mergewl */
- var40.x2[0] =
- ((orc_uint16) var42.
- x2[0] & 0x0000ffff) | ((orc_uint16) var43.x2[0] << 16);
- var40.x2[1] =
- ((orc_uint16) var42.
- x2[1] & 0x0000ffff) | ((orc_uint16) var43.x2[1] << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var42.x2[0];
+ _dest.x2[1] = var43.x2[0];
+ var40.x2[0] = _dest.i;
+ }
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var42.x2[1];
+ _dest.x2[1] = var43.x2[1];
+ var40.x2[1] = _dest.i;
+ }
/* 8: storeq */
ptr0[i] = var40;
}
@@ -10072,7 +11317,7 @@ cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_convert_Y42B_AYUV (OrcExecutor * ex)
+_backup_cogorc_convert_Y42B_AYUV (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -10098,8 +11343,8 @@ _backup_cogorc_convert_Y42B_AYUV (OrcExecutor * ex)
ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
/* 3: loadpb */
- var38.x2[0] = 0x000000ff; /* 255 or 1.25987e-321f */
- var38.x2[1] = 0x000000ff; /* 255 or 1.25987e-321f */
+ var38.x2[0] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
+ var38.x2[1] = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -10107,24 +11352,47 @@ _backup_cogorc_convert_Y42B_AYUV (OrcExecutor * ex)
/* 1: loadb */
var37 = ptr6[i];
/* 2: mergebw */
- var41.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var41.i = _dest.i;
+ }
/* 4: loadw */
var39 = ptr4[i];
/* 5: mergebw */
- var42.x2[0] =
- ((orc_uint8) var38.x2[0] & 0x00ff) | ((orc_uint8) var39.x2[0] << 8);
- var42.x2[1] =
- ((orc_uint8) var38.x2[1] & 0x00ff) | ((orc_uint8) var39.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[0];
+ _dest.x2[1] = var39.x2[0];
+ var42.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[1];
+ _dest.x2[1] = var39.x2[1];
+ var42.x2[1] = _dest.i;
+ }
/* 6: mergewl */
- var43.i =
- ((orc_uint16) var41.i & 0x0000ffff) | ((orc_uint16) var41.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var41.i;
+ _dest.x2[1] = var41.i;
+ var43.i = _dest.i;
+ }
/* 7: mergewl */
- var40.x2[0] =
- ((orc_uint16) var42.
- x2[0] & 0x0000ffff) | ((orc_uint16) var43.x2[0] << 16);
- var40.x2[1] =
- ((orc_uint16) var42.
- x2[1] & 0x0000ffff) | ((orc_uint16) var43.x2[1] << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var42.x2[0];
+ _dest.x2[1] = var43.x2[0];
+ var40.x2[0] = _dest.i;
+ }
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var42.x2[1];
+ _dest.x2[1] = var43.x2[1];
+ var40.x2[1] = _dest.i;
+ }
/* 8: storeq */
ptr0[i] = var40;
}
@@ -10133,19 +11401,19 @@ _backup_cogorc_convert_Y42B_AYUV (OrcExecutor * ex)
}
void
-cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y42B_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -10170,7 +11438,7 @@ cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1,
orc_program_append_2 (p, "mergewl", 1, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T3,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -10197,9 +11465,10 @@ cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1,
/* cogorc_convert_Y444_YUY2 */
#ifdef DISABLE_ORC
void
-cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint16 * s2, int s2_stride, const orc_uint16 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y444_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
int i;
int j;
@@ -10229,13 +11498,25 @@ cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* 1: loadw */
var37 = ptr6[i];
/* 2: mergebw */
- var40.x2[0] =
- ((orc_uint8) var36.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var40.x2[1] =
- ((orc_uint8) var36.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var40.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var40.x2[1] = _dest.i;
+ }
/* 3: splitlw */
- var41.i = (var40.i >> 16) & 0xffff;
- var42.i = var40.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 4: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
@@ -10244,10 +11525,18 @@ cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* 5: loadw */
var38 = ptr4[i];
/* 6: mergebw */
- var39.x2[0] =
- ((orc_uint8) var38.x2[0] & 0x00ff) | ((orc_uint8) var43.x2[0] << 8);
- var39.x2[1] =
- ((orc_uint8) var38.x2[1] & 0x00ff) | ((orc_uint8) var43.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[0];
+ _dest.x2[1] = var43.x2[0];
+ var39.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[1];
+ _dest.x2[1] = var43.x2[1];
+ var39.x2[1] = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var39;
}
@@ -10257,7 +11546,7 @@ cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_convert_Y444_YUY2 (OrcExecutor * ex)
+_backup_cogorc_convert_Y444_YUY2 (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -10289,13 +11578,25 @@ _backup_cogorc_convert_Y444_YUY2 (OrcExecutor * ex)
/* 1: loadw */
var37 = ptr6[i];
/* 2: mergebw */
- var40.x2[0] =
- ((orc_uint8) var36.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var40.x2[1] =
- ((orc_uint8) var36.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var40.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var40.x2[1] = _dest.i;
+ }
/* 3: splitlw */
- var41.i = (var40.i >> 16) & 0xffff;
- var42.i = var40.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 4: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
@@ -10304,10 +11605,18 @@ _backup_cogorc_convert_Y444_YUY2 (OrcExecutor * ex)
/* 5: loadw */
var38 = ptr4[i];
/* 6: mergebw */
- var39.x2[0] =
- ((orc_uint8) var38.x2[0] & 0x00ff) | ((orc_uint8) var43.x2[0] << 8);
- var39.x2[1] =
- ((orc_uint8) var38.x2[1] & 0x00ff) | ((orc_uint8) var43.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[0];
+ _dest.x2[1] = var43.x2[0];
+ var39.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var38.x2[1];
+ _dest.x2[1] = var43.x2[1];
+ var39.x2[1] = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var39;
}
@@ -10316,19 +11625,19 @@ _backup_cogorc_convert_Y444_YUY2 (OrcExecutor * ex)
}
void
-cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint16 * s2, int s2_stride, const orc_uint16 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y444_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -10352,7 +11661,7 @@ cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -10379,9 +11688,10 @@ cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* cogorc_convert_Y444_UYVY */
#ifdef DISABLE_ORC
void
-cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint16 * s2, int s2_stride, const orc_uint16 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y444_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
int i;
int j;
@@ -10411,13 +11721,25 @@ cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* 1: loadw */
var37 = ptr6[i];
/* 2: mergebw */
- var40.x2[0] =
- ((orc_uint8) var36.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var40.x2[1] =
- ((orc_uint8) var36.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var40.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var40.x2[1] = _dest.i;
+ }
/* 3: splitlw */
- var41.i = (var40.i >> 16) & 0xffff;
- var42.i = var40.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 4: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
@@ -10426,10 +11748,18 @@ cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* 5: loadw */
var38 = ptr4[i];
/* 6: mergebw */
- var39.x2[0] =
- ((orc_uint8) var43.x2[0] & 0x00ff) | ((orc_uint8) var38.x2[0] << 8);
- var39.x2[1] =
- ((orc_uint8) var43.x2[1] & 0x00ff) | ((orc_uint8) var38.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[0];
+ _dest.x2[1] = var38.x2[0];
+ var39.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[1];
+ _dest.x2[1] = var38.x2[1];
+ var39.x2[1] = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var39;
}
@@ -10439,7 +11769,7 @@ cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
#else
static void
-_backup_cogorc_convert_Y444_UYVY (OrcExecutor * ex)
+_backup_cogorc_convert_Y444_UYVY (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -10471,13 +11801,25 @@ _backup_cogorc_convert_Y444_UYVY (OrcExecutor * ex)
/* 1: loadw */
var37 = ptr6[i];
/* 2: mergebw */
- var40.x2[0] =
- ((orc_uint8) var36.x2[0] & 0x00ff) | ((orc_uint8) var37.x2[0] << 8);
- var40.x2[1] =
- ((orc_uint8) var36.x2[1] & 0x00ff) | ((orc_uint8) var37.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[0];
+ _dest.x2[1] = var37.x2[0];
+ var40.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36.x2[1];
+ _dest.x2[1] = var37.x2[1];
+ var40.x2[1] = _dest.i;
+ }
/* 3: splitlw */
- var41.i = (var40.i >> 16) & 0xffff;
- var42.i = var40.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var40.i;
+ var41.i = _src.x2[1];
+ var42.i = _src.x2[0];
+ }
/* 4: avgub */
var43.x2[0] =
((orc_uint8) var41.x2[0] + (orc_uint8) var42.x2[0] + 1) >> 1;
@@ -10486,10 +11828,18 @@ _backup_cogorc_convert_Y444_UYVY (OrcExecutor * ex)
/* 5: loadw */
var38 = ptr4[i];
/* 6: mergebw */
- var39.x2[0] =
- ((orc_uint8) var43.x2[0] & 0x00ff) | ((orc_uint8) var38.x2[0] << 8);
- var39.x2[1] =
- ((orc_uint8) var43.x2[1] & 0x00ff) | ((orc_uint8) var38.x2[1] << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[0];
+ _dest.x2[1] = var38.x2[0];
+ var39.x2[0] = _dest.i;
+ }
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var43.x2[1];
+ _dest.x2[1] = var38.x2[1];
+ var39.x2[1] = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var39;
}
@@ -10498,19 +11848,19 @@ _backup_cogorc_convert_Y444_UYVY (OrcExecutor * ex)
}
void
-cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
- int s1_stride, const orc_uint16 * s2, int s2_stride, const orc_uint16 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y444_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint16 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint16 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -10534,7 +11884,7 @@ cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
orc_program_append_2 (p, "mergebw", 1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -10561,9 +11911,10 @@ cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1,
/* cogorc_convert_Y444_AYUV */
#ifdef DISABLE_ORC
void
-cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y444_AYUV (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
int i;
int j;
@@ -10586,7 +11937,7 @@ cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1,
ptr6 = ORC_PTR_OFFSET (s3, s3_stride * j);
/* 3: loadpb */
- var36 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -10594,14 +11945,28 @@ cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1,
/* 1: loadb */
var35 = ptr6[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var34 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var34;
+ _dest.x2[1] = var35;
+ var39.i = _dest.i;
+ }
/* 4: loadb */
var37 = ptr4[i];
/* 5: mergebw */
- var40.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var40.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var40.i & 0x0000ffff) | ((orc_uint16) var39.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var40.i;
+ _dest.x2[1] = var39.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
}
@@ -10611,7 +11976,7 @@ cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_convert_Y444_AYUV (OrcExecutor * ex)
+_backup_cogorc_convert_Y444_AYUV (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -10636,7 +12001,7 @@ _backup_cogorc_convert_Y444_AYUV (OrcExecutor * ex)
ptr6 = ORC_PTR_OFFSET (ex->arrays[6], ex->params[6] * j);
/* 3: loadpb */
- var36 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var36 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -10644,14 +12009,28 @@ _backup_cogorc_convert_Y444_AYUV (OrcExecutor * ex)
/* 1: loadb */
var35 = ptr6[i];
/* 2: mergebw */
- var39.i = ((orc_uint8) var34 & 0x00ff) | ((orc_uint8) var35 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var34;
+ _dest.x2[1] = var35;
+ var39.i = _dest.i;
+ }
/* 4: loadb */
var37 = ptr4[i];
/* 5: mergebw */
- var40.i = ((orc_uint8) var36 & 0x00ff) | ((orc_uint8) var37 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var36;
+ _dest.x2[1] = var37;
+ var40.i = _dest.i;
+ }
/* 6: mergewl */
- var38.i =
- ((orc_uint16) var40.i & 0x0000ffff) | ((orc_uint16) var39.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var40.i;
+ _dest.x2[1] = var39.i;
+ var38.i = _dest.i;
+ }
/* 7: storel */
ptr0[i] = var38;
}
@@ -10660,19 +12039,19 @@ _backup_cogorc_convert_Y444_AYUV (OrcExecutor * ex)
}
void
-cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1,
- int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3,
- int s3_stride, int n, int m)
+cogorc_convert_Y444_AYUV (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint8 * ORC_RESTRICT s1, int s1_stride,
+ const orc_uint8 * ORC_RESTRICT s2, int s2_stride,
+ const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -10693,7 +12072,7 @@ cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1,
orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -10720,8 +12099,8 @@ cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1,
/* cogorc_convert_AYUV_ARGB */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_ARGB (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -10778,25 +12157,25 @@ cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -10807,14 +12186,26 @@ cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -10868,12 +12259,26 @@ cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var61 & 0x00ff) | ((orc_uint8) var87 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var61;
+ _dest.x2[1] = var87;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var88 & 0x00ff) | ((orc_uint8) var89 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var88;
+ _dest.x2[1] = var89;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -10888,7 +12293,7 @@ cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
#else
static void
-_backup_cogorc_convert_AYUV_ARGB (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_ARGB (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -10947,25 +12352,25 @@ _backup_cogorc_convert_AYUV_ARGB (OrcExecutor * ex)
ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -10976,14 +12381,26 @@ _backup_cogorc_convert_AYUV_ARGB (OrcExecutor * ex)
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -11037,12 +12454,26 @@ _backup_cogorc_convert_AYUV_ARGB (OrcExecutor * ex)
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var61 & 0x00ff) | ((orc_uint8) var87 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var61;
+ _dest.x2[1] = var87;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var88 & 0x00ff) | ((orc_uint8) var89 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var88;
+ _dest.x2[1] = var89;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -11056,18 +12487,17 @@ _backup_cogorc_convert_AYUV_ARGB (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_ARGB (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -11168,7 +12598,7 @@ cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, 47, ORC_VAR_C2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -11191,8 +12621,8 @@ cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* cogorc_convert_AYUV_BGRA */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_BGRA (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -11249,25 +12679,25 @@ cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -11278,14 +12708,26 @@ cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -11339,12 +12781,26 @@ cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var89 & 0x00ff) | ((orc_uint8) var88 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var89;
+ _dest.x2[1] = var88;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var87 & 0x00ff) | ((orc_uint8) var61 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var87;
+ _dest.x2[1] = var61;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -11359,7 +12815,7 @@ cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
#else
static void
-_backup_cogorc_convert_AYUV_BGRA (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_BGRA (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -11418,25 +12874,25 @@ _backup_cogorc_convert_AYUV_BGRA (OrcExecutor * ex)
ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -11447,14 +12903,26 @@ _backup_cogorc_convert_AYUV_BGRA (OrcExecutor * ex)
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -11508,12 +12976,26 @@ _backup_cogorc_convert_AYUV_BGRA (OrcExecutor * ex)
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var89 & 0x00ff) | ((orc_uint8) var88 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var89;
+ _dest.x2[1] = var88;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var87 & 0x00ff) | ((orc_uint8) var61 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var87;
+ _dest.x2[1] = var61;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -11527,18 +13009,17 @@ _backup_cogorc_convert_AYUV_BGRA (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_BGRA (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -11639,7 +13120,7 @@ cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, 47, ORC_VAR_C2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -11662,8 +13143,8 @@ cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* cogorc_convert_AYUV_ABGR */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_ABGR (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -11720,25 +13201,25 @@ cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -11749,14 +13230,26 @@ cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -11810,12 +13303,26 @@ cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var61 & 0x00ff) | ((orc_uint8) var89 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var61;
+ _dest.x2[1] = var89;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var88 & 0x00ff) | ((orc_uint8) var87 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var88;
+ _dest.x2[1] = var87;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -11830,7 +13337,7 @@ cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
#else
static void
-_backup_cogorc_convert_AYUV_ABGR (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_ABGR (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -11889,25 +13396,25 @@ _backup_cogorc_convert_AYUV_ABGR (OrcExecutor * ex)
ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -11918,14 +13425,26 @@ _backup_cogorc_convert_AYUV_ABGR (OrcExecutor * ex)
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -11979,12 +13498,26 @@ _backup_cogorc_convert_AYUV_ABGR (OrcExecutor * ex)
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var61 & 0x00ff) | ((orc_uint8) var89 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var61;
+ _dest.x2[1] = var89;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var88 & 0x00ff) | ((orc_uint8) var87 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var88;
+ _dest.x2[1] = var87;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -11998,18 +13531,17 @@ _backup_cogorc_convert_AYUV_ABGR (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_ABGR (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -12110,7 +13642,7 @@ cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, 47, ORC_VAR_C2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -12133,8 +13665,8 @@ cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* cogorc_convert_AYUV_RGBA */
#ifdef DISABLE_ORC
void
-cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_RGBA (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
int i;
int j;
@@ -12191,25 +13723,25 @@ cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
ptr4 = ORC_PTR_OFFSET (s1, s1_stride * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -12220,14 +13752,26 @@ cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -12281,12 +13825,26 @@ cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var87 & 0x00ff) | ((orc_uint8) var88 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var87;
+ _dest.x2[1] = var88;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var89 & 0x00ff) | ((orc_uint8) var61 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var89;
+ _dest.x2[1] = var61;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -12301,7 +13859,7 @@ cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
#else
static void
-_backup_cogorc_convert_AYUV_RGBA (OrcExecutor * ex)
+_backup_cogorc_convert_AYUV_RGBA (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int j;
@@ -12360,25 +13918,25 @@ _backup_cogorc_convert_AYUV_RGBA (OrcExecutor * ex)
ptr4 = ORC_PTR_OFFSET (ex->arrays[4], ex->params[4] * j);
/* 1: loadpb */
- var49.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var49.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var49.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 14: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 21: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 25: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 29: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 40: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadl */
@@ -12389,14 +13947,26 @@ _backup_cogorc_convert_AYUV_RGBA (OrcExecutor * ex)
var57.x4[2] = var48.x4[2] - var49.x4[2];
var57.x4[3] = var48.x4[3] - var49.x4[3];
/* 3: splitlw */
- var58.i = (var57.i >> 16) & 0xffff;
- var59.i = var57.i & 0xffff;
+ {
+ orc_union32 _src;
+ _src.i = var57.i;
+ var58.i = _src.x2[1];
+ var59.i = _src.x2[0];
+ }
/* 4: splitwb */
- var60 = (var59.i >> 8) & 0xff;
- var61 = var59.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var59.i;
+ var60 = _src.x2[1];
+ var61 = _src.x2[0];
+ }
/* 5: splitwb */
- var62 = (var58.i >> 8) & 0xff;
- var63 = var58.i & 0xff;
+ {
+ orc_union16 _src;
+ _src.i = var58.i;
+ var62 = _src.x2[1];
+ var63 = _src.x2[0];
+ }
/* 6: convsbw */
var64.i = var60;
/* 7: convsbw */
@@ -12450,12 +14020,26 @@ _backup_cogorc_convert_AYUV_RGBA (OrcExecutor * ex)
/* 36: convssswb */
var89 = ORC_CLAMP_SB (var79.i);
/* 37: mergebw */
- var90.i = ((orc_uint8) var87 & 0x00ff) | ((orc_uint8) var88 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var87;
+ _dest.x2[1] = var88;
+ var90.i = _dest.i;
+ }
/* 38: mergebw */
- var91.i = ((orc_uint8) var89 & 0x00ff) | ((orc_uint8) var61 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var89;
+ _dest.x2[1] = var61;
+ var91.i = _dest.i;
+ }
/* 39: mergewl */
- var92.i =
- ((orc_uint16) var90.i & 0x0000ffff) | ((orc_uint16) var91.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var90.i;
+ _dest.x2[1] = var91.i;
+ var92.i = _dest.i;
+ }
/* 41: addb */
var56.x4[0] = var92.x4[0] + var55.x4[0];
var56.x4[1] = var92.x4[1] + var55.x4[1];
@@ -12469,18 +14053,17 @@ _backup_cogorc_convert_AYUV_RGBA (OrcExecutor * ex)
}
void
-cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
- int s1_stride, int n, int m)
+cogorc_convert_AYUV_RGBA (orc_uint32 * ORC_RESTRICT d1, int d1_stride,
+ const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_2d (p);
@@ -12581,7 +14164,7 @@ cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, 47, ORC_VAR_C2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -12604,8 +14187,9 @@ cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1,
/* cogorc_convert_I420_BGRA */
#ifdef DISABLE_ORC
void
-cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, int n)
+cogorc_convert_I420_BGRA (orc_uint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -12665,28 +14249,28 @@ cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
ptr6 = (orc_int8 *) s3;
/* 1: loadpb */
- var46 = 0x00000080; /* 128 or 6.32404e-322f */
+ var46 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 5: loadpb */
- var47 = 0x00000080; /* 128 or 6.32404e-322f */
+ var47 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpb */
- var48 = 0x00000080; /* 128 or 6.32404e-322f */
+ var48 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 12: loadpw */
- var49.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var49.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 17: loadpw */
- var50.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var50.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 24: loadpw */
- var51.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var51.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 28: loadpw */
- var52.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var52.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 32: loadpw */
- var53.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var53.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 41: loadpb */
- var54 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var54 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
/* 44: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -12758,12 +14342,26 @@ cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
/* 39: convssswb */
var87 = ORC_CLAMP_SB (var77.i);
/* 40: mergebw */
- var88.i = ((orc_uint8) var87 & 0x00ff) | ((orc_uint8) var86 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var87;
+ _dest.x2[1] = var86;
+ var88.i = _dest.i;
+ }
/* 42: mergebw */
- var89.i = ((orc_uint8) var85 & 0x00ff) | ((orc_uint8) var54 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var85;
+ _dest.x2[1] = var54;
+ var89.i = _dest.i;
+ }
/* 43: mergewl */
- var90.i =
- ((orc_uint16) var88.i & 0x0000ffff) | ((orc_uint16) var89.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var88.i;
+ _dest.x2[1] = var89.i;
+ var90.i = _dest.i;
+ }
/* 45: addb */
var56.x4[0] = var90.x4[0] + var55.x4[0];
var56.x4[1] = var90.x4[1] + var55.x4[1];
@@ -12777,7 +14375,7 @@ cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_convert_I420_BGRA (OrcExecutor * ex)
+_backup_cogorc_convert_I420_BGRA (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -12838,28 +14436,28 @@ _backup_cogorc_convert_I420_BGRA (OrcExecutor * ex)
ptr6 = (orc_int8 *) ex->arrays[6];
/* 1: loadpb */
- var46 = 0x00000080; /* 128 or 6.32404e-322f */
+ var46 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 5: loadpb */
- var47 = 0x00000080; /* 128 or 6.32404e-322f */
+ var47 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 9: loadpb */
- var48 = 0x00000080; /* 128 or 6.32404e-322f */
+ var48 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 12: loadpw */
- var49.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var49.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 17: loadpw */
- var50.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var50.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 24: loadpw */
- var51.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var51.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 28: loadpw */
- var52.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var52.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 32: loadpw */
- var53.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var53.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 41: loadpb */
- var54 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var54 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
/* 44: loadpb */
- var55.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var55.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var55.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -12931,12 +14529,26 @@ _backup_cogorc_convert_I420_BGRA (OrcExecutor * ex)
/* 39: convssswb */
var87 = ORC_CLAMP_SB (var77.i);
/* 40: mergebw */
- var88.i = ((orc_uint8) var87 & 0x00ff) | ((orc_uint8) var86 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var87;
+ _dest.x2[1] = var86;
+ var88.i = _dest.i;
+ }
/* 42: mergebw */
- var89.i = ((orc_uint8) var85 & 0x00ff) | ((orc_uint8) var54 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var85;
+ _dest.x2[1] = var54;
+ var89.i = _dest.i;
+ }
/* 43: mergewl */
- var90.i =
- ((orc_uint16) var88.i & 0x0000ffff) | ((orc_uint16) var89.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var88.i;
+ _dest.x2[1] = var89.i;
+ var90.i = _dest.i;
+ }
/* 45: addb */
var56.x4[0] = var90.x4[0] + var55.x4[0];
var56.x4[1] = var90.x4[1] + var55.x4[1];
@@ -12949,18 +14561,18 @@ _backup_cogorc_convert_I420_BGRA (OrcExecutor * ex)
}
void
-cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, int n)
+cogorc_convert_I420_BGRA (orc_uint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_convert_I420_BGRA");
@@ -13062,7 +14674,7 @@ cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T13, ORC_VAR_C2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
@@ -13084,9 +14696,10 @@ cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1,
/* cogorc_convert_I420_BGRA_avg */
#ifdef DISABLE_ORC
void
-cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4,
- const orc_uint8 * s5, int n)
+cogorc_convert_I420_BGRA_avg (orc_uint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
+ const orc_uint8 * ORC_RESTRICT s5, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
@@ -13154,28 +14767,28 @@ cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
ptr8 = (orc_int8 *) s5;
/* 1: loadpb */
- var47 = 0x00000080; /* 128 or 6.32404e-322f */
+ var47 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 7: loadpb */
- var48 = 0x00000080; /* 128 or 6.32404e-322f */
+ var48 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 13: loadpb */
- var49 = 0x00000080; /* 128 or 6.32404e-322f */
+ var49 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 16: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 21: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 28: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 32: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 36: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 45: loadpb */
- var55 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var55 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
/* 48: loadpb */
- var56.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var56.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var56.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var56.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -13259,12 +14872,26 @@ cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
/* 43: convssswb */
var92 = ORC_CLAMP_SB (var82.i);
/* 44: mergebw */
- var93.i = ((orc_uint8) var92 & 0x00ff) | ((orc_uint8) var91 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var92;
+ _dest.x2[1] = var91;
+ var93.i = _dest.i;
+ }
/* 46: mergebw */
- var94.i = ((orc_uint8) var90 & 0x00ff) | ((orc_uint8) var55 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var90;
+ _dest.x2[1] = var55;
+ var94.i = _dest.i;
+ }
/* 47: mergewl */
- var95.i =
- ((orc_uint16) var93.i & 0x0000ffff) | ((orc_uint16) var94.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var93.i;
+ _dest.x2[1] = var94.i;
+ var95.i = _dest.i;
+ }
/* 49: addb */
var57.x4[0] = var95.x4[0] + var56.x4[0];
var57.x4[1] = var95.x4[1] + var56.x4[1];
@@ -13278,7 +14905,7 @@ cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
#else
static void
-_backup_cogorc_convert_I420_BGRA_avg (OrcExecutor * ex)
+_backup_cogorc_convert_I420_BGRA_avg (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -13347,28 +14974,28 @@ _backup_cogorc_convert_I420_BGRA_avg (OrcExecutor * ex)
ptr8 = (orc_int8 *) ex->arrays[8];
/* 1: loadpb */
- var47 = 0x00000080; /* 128 or 6.32404e-322f */
+ var47 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 7: loadpb */
- var48 = 0x00000080; /* 128 or 6.32404e-322f */
+ var48 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 13: loadpb */
- var49 = 0x00000080; /* 128 or 6.32404e-322f */
+ var49 = (int) 0x00000080; /* 128 or 6.32404e-322f */
/* 16: loadpw */
- var50.i = 0x0000002a; /* 42 or 2.07508e-322f */
+ var50.i = (int) 0x0000002a; /* 42 or 2.07508e-322f */
/* 21: loadpw */
- var51.i = 0x00000067; /* 103 or 5.08888e-322f */
+ var51.i = (int) 0x00000067; /* 103 or 5.08888e-322f */
/* 28: loadpw */
- var52.i = 0x00000004; /* 4 or 1.97626e-323f */
+ var52.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
/* 32: loadpw */
- var53.i = 0x00000064; /* 100 or 4.94066e-322f */
+ var53.i = (int) 0x00000064; /* 100 or 4.94066e-322f */
/* 36: loadpw */
- var54.i = 0x00000068; /* 104 or 5.13828e-322f */
+ var54.i = (int) 0x00000068; /* 104 or 5.13828e-322f */
/* 45: loadpb */
- var55 = 0x000000ff; /* 255 or 1.25987e-321f */
+ var55 = (int) 0x000000ff; /* 255 or 1.25987e-321f */
/* 48: loadpb */
- var56.x4[0] = 0x00000080; /* 128 or 6.32404e-322f */
- var56.x4[1] = 0x00000080; /* 128 or 6.32404e-322f */
- var56.x4[2] = 0x00000080; /* 128 or 6.32404e-322f */
- var56.x4[3] = 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[0] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[1] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[2] = (int) 0x00000080; /* 128 or 6.32404e-322f */
+ var56.x4[3] = (int) 0x00000080; /* 128 or 6.32404e-322f */
for (i = 0; i < n; i++) {
/* 0: loadb */
@@ -13452,12 +15079,26 @@ _backup_cogorc_convert_I420_BGRA_avg (OrcExecutor * ex)
/* 43: convssswb */
var92 = ORC_CLAMP_SB (var82.i);
/* 44: mergebw */
- var93.i = ((orc_uint8) var92 & 0x00ff) | ((orc_uint8) var91 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var92;
+ _dest.x2[1] = var91;
+ var93.i = _dest.i;
+ }
/* 46: mergebw */
- var94.i = ((orc_uint8) var90 & 0x00ff) | ((orc_uint8) var55 << 8);
+ {
+ orc_union16 _dest;
+ _dest.x2[0] = var90;
+ _dest.x2[1] = var55;
+ var94.i = _dest.i;
+ }
/* 47: mergewl */
- var95.i =
- ((orc_uint16) var93.i & 0x0000ffff) | ((orc_uint16) var94.i << 16);
+ {
+ orc_union32 _dest;
+ _dest.x2[0] = var93.i;
+ _dest.x2[1] = var94.i;
+ var95.i = _dest.i;
+ }
/* 49: addb */
var57.x4[0] = var95.x4[0] + var56.x4[0];
var57.x4[1] = var95.x4[1] + var56.x4[1];
@@ -13470,19 +15111,19 @@ _backup_cogorc_convert_I420_BGRA_avg (OrcExecutor * ex)
}
void
-cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
- const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4,
- const orc_uint8 * s5, int n)
+cogorc_convert_I420_BGRA_avg (orc_uint32 * ORC_RESTRICT d1,
+ const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
+ const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
+ const orc_uint8 * ORC_RESTRICT s5, int n)
{
OrcExecutor _ex, *ex = &_ex;
- static int p_inited = 0;
+ static volatile int p_inited = 0;
static OrcProgram *p = 0;
void (*func) (OrcExecutor *);
if (!p_inited) {
orc_once_mutex_lock ();
if (!p_inited) {
- OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "cogorc_convert_I420_BGRA_avg");
@@ -13595,7 +15236,7 @@ cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1,
orc_program_append_2 (p, "addb", 2, ORC_VAR_D1, ORC_VAR_T14, ORC_VAR_C2,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
diff --git a/ext/cog/gstcogorc-dist.h b/ext/cog/gstcogorc-dist.h
index 4f1dbd204..e7bac246e 100644
--- a/ext/cog/gstcogorc-dist.h
+++ b/ext/cog/gstcogorc-dist.h
@@ -35,6 +35,7 @@ typedef unsigned __int16 orc_uint16;
typedef unsigned __int32 orc_uint32;
typedef unsigned __int64 orc_uint64;
#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
#else
#include <limits.h>
typedef signed char orc_int8;
@@ -57,80 +58,89 @@ typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
#endif
-void cogorc_memcpy_2d (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1, int s1_stride, int n, int m);
-void cogorc_downsample_horiz_cosite_1tap (orc_uint8 * d1, const orc_uint16 * s1, int n);
-void cogorc_downsample_horiz_cosite_3tap (orc_uint8 * d1, const orc_uint16 * s1, const orc_uint16 * s2, int n);
-void cogorc_downsample_420_jpeg (orc_uint8 * d1, const orc_uint16 * s1, const orc_uint16 * s2, int n);
-void cogorc_downsample_vert_halfsite_2tap (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int n);
-void cogorc_downsample_vert_cosite_3tap (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int n);
-void cogorc_downsample_vert_halfsite_4tap (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n);
-void cogorc_upsample_horiz_cosite_1tap (guint8 * d1, const orc_uint8 * s1, int n);
-void cogorc_upsample_horiz_cosite (guint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int n);
-void cogorc_upsample_vert_avgub (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int n);
-void orc_unpack_yuyv_y (orc_uint8 * d1, const orc_uint16 * s1, int n);
-void orc_unpack_yuyv_u (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_unpack_yuyv_v (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_pack_yuyv (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int n);
-void orc_unpack_uyvy_y (orc_uint8 * d1, const orc_uint16 * s1, int n);
-void orc_unpack_uyvy_u (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_unpack_uyvy_v (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void orc_pack_uyvy (orc_uint32 * d1, const guint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int n);
-void orc_addc_convert_u8_s16 (orc_uint8 * d1, const gint16 * s1, int n);
-void orc_subc_convert_s16_u8 (gint16 * d1, const orc_uint8 * s1, int n);
-void orc_splat_u8_ns (orc_uint8 * d1, int p1, int n);
-void orc_splat_s16_ns (gint16 * d1, int p1, int n);
-void orc_matrix2_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1, int p2, int p3, int n);
-void orc_matrix2_11_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1, int p2, int n);
-void orc_matrix2_12_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, int p1, int p2, int n);
-void orc_matrix3_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, const guint8 * s3, int p1, int p2, int p3, int p4, int n);
-void orc_matrix3_100_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, const guint8 * s3, int p1, int p2, int p3, int n);
-void orc_matrix3_100_offset_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, const guint8 * s3, int p1, int p2, int p3, int p4, int p5, int n);
-void orc_matrix3_000_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, const guint8 * s3, int p1, int p2, int p3, int p4, int p5, int n);
-void orc_pack_123x (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int p1, int n);
-void orc_pack_x123 (guint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int p1, int n);
-void cogorc_combine2_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int p1, int p2, int n);
-void cogorc_combine4_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int p1, int p2, int p3, int p4, int n);
-void cogorc_unpack_axyz_0 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_unpack_axyz_1 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_unpack_axyz_2 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_unpack_axyz_3 (orc_uint8 * d1, const orc_uint32 * s1, int n);
-void cogorc_resample_horiz_1tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n);
-void cogorc_resample_horiz_2tap (orc_uint8 * d1, const orc_uint8 * s1, int p1, int p2, int n);
-void cogorc_convert_I420_UYVY (orc_uint32 * d1, orc_uint32 * d2, const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n);
-void cogorc_convert_I420_YUY2 (orc_uint32 * d1, orc_uint32 * d2, const orc_uint16 * s1, const orc_uint16 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n);
-void cogorc_convert_I420_AYUV (orc_uint32 * d1, orc_uint32 * d2, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int n);
-void cogorc_convert_YUY2_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3, orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n);
-void cogorc_convert_UYVY_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_420_422 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2, int d2_stride, const orc_uint8 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_420_444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2, int d2_stride, const orc_uint8 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_422_444 (orc_uint16 * d1, int d1_stride, const orc_uint8 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_444_422 (orc_uint8 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, int n, int m);
-void cogorc_planar_chroma_444_420 (orc_uint8 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride, int n, int m);
-void cogorc_planar_chroma_422_420 (orc_uint8 * d1, int d1_stride, const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride, int n, int m);
-void cogorc_convert_YUY2_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_UYVY_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_YUY2_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2, int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_UYVY_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2, int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_YUY2_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2, int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_UYVY_Y444 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2, int d2_stride, orc_uint16 * d3, int d3_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_UYVY_I420 (orc_uint16 * d1, orc_uint16 * d2, orc_uint8 * d3, orc_uint8 * d4, const orc_uint32 * s1, const orc_uint32 * s2, int n);
-void cogorc_convert_AYUV_I420 (orc_uint16 * d1, int d1_stride, orc_uint16 * d2, int d2_stride, orc_uint8 * d3, int d3_stride, orc_uint8 * d4, int d4_stride, const orc_uint64 * s1, int s1_stride, const orc_uint64 * s2, int s2_stride, int n, int m);
-void cogorc_convert_AYUV_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint64 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_Y42B (orc_uint16 * d1, int d1_stride, orc_uint8 * d2, int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint64 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_Y444 (orc_uint8 * d1, int d1_stride, orc_uint8 * d2, int d2_stride, orc_uint8 * d3, int d3_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_Y42B_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y42B_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y42B_AYUV (orc_uint64 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y444_YUY2 (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride, const orc_uint16 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y444_UYVY (orc_uint32 * d1, int d1_stride, const orc_uint16 * s1, int s1_stride, const orc_uint16 * s2, int s2_stride, const orc_uint16 * s3, int s3_stride, int n, int m);
-void cogorc_convert_Y444_AYUV (orc_uint32 * d1, int d1_stride, const orc_uint8 * s1, int s1_stride, const orc_uint8 * s2, int s2_stride, const orc_uint8 * s3, int s3_stride, int n, int m);
-void cogorc_convert_AYUV_ARGB (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_BGRA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_ABGR (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_AYUV_RGBA (orc_uint32 * d1, int d1_stride, const orc_uint32 * s1, int s1_stride, int n, int m);
-void cogorc_convert_I420_BGRA (orc_uint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, int n);
-void cogorc_convert_I420_BGRA_avg (orc_uint32 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, const orc_uint8 * s5, int n);
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
+void cogorc_memcpy_2d (orc_uint8 * ORC_RESTRICT d1, int d1_stride, const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_downsample_horiz_cosite_1tap (orc_uint8 * ORC_RESTRICT d1, const orc_uint16 * ORC_RESTRICT s1, int n);
+void cogorc_downsample_horiz_cosite_3tap (orc_uint8 * ORC_RESTRICT d1, const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2, int n);
+void cogorc_downsample_420_jpeg (orc_uint8 * ORC_RESTRICT d1, const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2, int n);
+void cogorc_downsample_vert_halfsite_2tap (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n);
+void cogorc_downsample_vert_cosite_3tap (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n);
+void cogorc_downsample_vert_halfsite_4tap (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int n);
+void cogorc_upsample_horiz_cosite_1tap (guint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, int n);
+void cogorc_upsample_horiz_cosite (guint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n);
+void cogorc_upsample_vert_avgub (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int n);
+void orc_unpack_yuyv_y (orc_uint8 * ORC_RESTRICT d1, const orc_uint16 * ORC_RESTRICT s1, int n);
+void orc_unpack_yuyv_u (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_unpack_yuyv_v (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_pack_yuyv (orc_uint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n);
+void orc_unpack_uyvy_y (orc_uint8 * ORC_RESTRICT d1, const orc_uint16 * ORC_RESTRICT s1, int n);
+void orc_unpack_uyvy_u (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_unpack_uyvy_v (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void orc_pack_uyvy (orc_uint32 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n);
+void orc_addc_convert_u8_s16 (orc_uint8 * ORC_RESTRICT d1, const gint16 * ORC_RESTRICT s1, int n);
+void orc_subc_convert_s16_u8 (gint16 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, int n);
+void orc_splat_u8_ns (orc_uint8 * ORC_RESTRICT d1, int p1, int n);
+void orc_splat_s16_ns (gint16 * ORC_RESTRICT d1, int p1, int n);
+void orc_matrix2_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int p1, int p2, int p3, int n);
+void orc_matrix2_11_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int p1, int p2, int n);
+void orc_matrix2_12_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int p1, int p2, int n);
+void orc_matrix3_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int n);
+void orc_matrix3_100_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int n);
+void orc_matrix3_100_offset_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, int n);
+void orc_matrix3_000_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int p1, int p2, int p3, int p4, int p5, int n);
+void orc_pack_123x (guint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int p1, int n);
+void orc_pack_x123 (guint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int p1, int n);
+void cogorc_combine2_u8 (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int p1, int p2, int n);
+void cogorc_combine4_u8 (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, int n);
+void cogorc_unpack_axyz_0 (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_unpack_axyz_1 (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_unpack_axyz_2 (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_unpack_axyz_3 (orc_uint8 * ORC_RESTRICT d1, const orc_uint32 * ORC_RESTRICT s1, int n);
+void cogorc_resample_horiz_1tap (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n);
+void cogorc_resample_horiz_2tap (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, int p1, int p2, int n);
+void cogorc_convert_I420_UYVY (orc_uint32 * ORC_RESTRICT d1, orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int n);
+void cogorc_convert_I420_YUY2 (orc_uint32 * ORC_RESTRICT d1, orc_uint32 * ORC_RESTRICT d2, const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int n);
+void cogorc_convert_I420_AYUV (orc_uint32 * ORC_RESTRICT d1, orc_uint32 * ORC_RESTRICT d2, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int n);
+void cogorc_convert_YUY2_I420 (orc_uint16 * ORC_RESTRICT d1, orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3, orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1, const orc_uint32 * ORC_RESTRICT s2, int n);
+void cogorc_convert_UYVY_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_420_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride, orc_uint8 * ORC_RESTRICT d2, int d2_stride, const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_420_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride, orc_uint16 * ORC_RESTRICT d2, int d2_stride, const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_422_444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride, const orc_uint8 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_444_422 (orc_uint8 * ORC_RESTRICT d1, int d1_stride, const orc_uint16 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_planar_chroma_444_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride, const orc_uint16 * ORC_RESTRICT s1, int s1_stride, const orc_uint16 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void cogorc_planar_chroma_422_420 (orc_uint8 * ORC_RESTRICT d1, int d1_stride, const orc_uint8 * ORC_RESTRICT s1, int s1_stride, const orc_uint8 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void cogorc_convert_YUY2_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_UYVY_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_YUY2_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride, orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3, int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_UYVY_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride, orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3, int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_YUY2_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride, orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3, int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_UYVY_Y444 (orc_uint16 * ORC_RESTRICT d1, int d1_stride, orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint16 * ORC_RESTRICT d3, int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_UYVY_I420 (orc_uint16 * ORC_RESTRICT d1, orc_uint16 * ORC_RESTRICT d2, orc_uint8 * ORC_RESTRICT d3, orc_uint8 * ORC_RESTRICT d4, const orc_uint32 * ORC_RESTRICT s1, const orc_uint32 * ORC_RESTRICT s2, int n);
+void cogorc_convert_AYUV_I420 (orc_uint16 * ORC_RESTRICT d1, int d1_stride, orc_uint16 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3, int d3_stride, orc_uint8 * ORC_RESTRICT d4, int d4_stride, const orc_uint64 * ORC_RESTRICT s1, int s1_stride, const orc_uint64 * ORC_RESTRICT s2, int s2_stride, int n, int m);
+void cogorc_convert_AYUV_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_Y42B (orc_uint16 * ORC_RESTRICT d1, int d1_stride, orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3, int d3_stride, const orc_uint64 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_Y444 (orc_uint8 * ORC_RESTRICT d1, int d1_stride, orc_uint8 * ORC_RESTRICT d2, int d2_stride, orc_uint8 * ORC_RESTRICT d3, int d3_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_Y42B_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint16 * ORC_RESTRICT s1, int s1_stride, const orc_uint8 * ORC_RESTRICT s2, int s2_stride, const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y42B_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint16 * ORC_RESTRICT s1, int s1_stride, const orc_uint8 * ORC_RESTRICT s2, int s2_stride, const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y42B_AYUV (orc_uint64 * ORC_RESTRICT d1, int d1_stride, const orc_uint16 * ORC_RESTRICT s1, int s1_stride, const orc_uint8 * ORC_RESTRICT s2, int s2_stride, const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y444_YUY2 (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint16 * ORC_RESTRICT s1, int s1_stride, const orc_uint16 * ORC_RESTRICT s2, int s2_stride, const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y444_UYVY (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint16 * ORC_RESTRICT s1, int s1_stride, const orc_uint16 * ORC_RESTRICT s2, int s2_stride, const orc_uint16 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_Y444_AYUV (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint8 * ORC_RESTRICT s1, int s1_stride, const orc_uint8 * ORC_RESTRICT s2, int s2_stride, const orc_uint8 * ORC_RESTRICT s3, int s3_stride, int n, int m);
+void cogorc_convert_AYUV_ARGB (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_BGRA (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_ABGR (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_AYUV_RGBA (orc_uint32 * ORC_RESTRICT d1, int d1_stride, const orc_uint32 * ORC_RESTRICT s1, int s1_stride, int n, int m);
+void cogorc_convert_I420_BGRA (orc_uint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, int n);
+void cogorc_convert_I420_BGRA_avg (orc_uint32 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, const orc_uint8 * ORC_RESTRICT s5, int n);
#ifdef __cplusplus
}