gstreamer/ext/cog/gstcogorc-dist.c
2010-06-02 00:01:14 -07:00

5117 lines
119 KiB
C

/* autogenerated from gstcogorc.orc */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifndef DISABLE_ORC
#include <orc/orc.h>
#else
#include <stdint.h>
#endif
#include <glib.h>
void cogorc_downsample_horiz_cosite_1tap (uint8_t * d1, const uint16_t * s1,
int n);
void cogorc_downsample_horiz_cosite_3tap (uint8_t * d1, const uint16_t * s1,
const uint16_t * s2, int n);
void cogorc_downsample_420_jpeg (uint8_t * d1, const uint16_t * s1,
const uint16_t * s2, int n);
void cogorc_downsample_vert_halfsite_2tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n);
void cogorc_downsample_vert_cosite_3tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, const uint8_t * s3, int n);
void cogorc_downsample_vert_halfsite_4tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, const uint8_t * s3, const uint8_t * s4, int n);
void cogorc_upsample_horiz_cosite_1tap (uint8_t * d1, const uint8_t * s1,
int n);
void cogorc_upsample_horiz_cosite (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n);
void cogorc_upsample_vert_avgub (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n);
void orc_unpack_yuyv_y (uint8_t * d1, const uint16_t * s1, int n);
void orc_unpack_yuyv_u (uint8_t * d1, const uint32_t * s1, int n);
void orc_unpack_yuyv_v (uint8_t * d1, const uint32_t * s1, int n);
void orc_pack_yuyv (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int n);
void orc_unpack_uyvy_y (uint8_t * d1, const uint16_t * s1, int n);
void orc_unpack_uyvy_u (uint8_t * d1, const uint32_t * s1, int n);
void orc_unpack_uyvy_v (uint8_t * d1, const uint32_t * s1, int n);
void orc_pack_uyvy (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int n);
void orc_addc_convert_u8_s16 (uint8_t * d1, const int16_t * s1, int n);
void orc_subc_convert_s16_u8 (int16_t * d1, const uint8_t * s1, int n);
void orc_splat_u8_ns (uint8_t * d1, int p1, int n);
void orc_splat_s16_ns (int16_t * d1, int p1, int n);
void orc_matrix2_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
int p1, int p2, int p3, int n);
void orc_matrix2_11_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
int p1, int p2, int n);
void orc_matrix2_12_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
int p1, int p2, int n);
void orc_matrix3_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int n);
void orc_matrix3_100_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int n);
void orc_matrix3_100_offset_u8 (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, const uint8_t * s3, int p1, int p2, int p3, int p4,
int p5, int n);
void orc_matrix3_000_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int p5, int n);
void orc_pack_123x (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int n);
void orc_pack_x123 (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int n);
void cogorc_combine2_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
int p1, int p2, int n);
void cogorc_combine4_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, const uint8_t * s4, int p1, int p2, int p3, int p4,
int n);
void cogorc_unpack_axyz_0 (uint8_t * d1, const uint32_t * s1, int n);
void cogorc_unpack_axyz_1 (uint8_t * d1, const uint32_t * s1, int n);
void cogorc_unpack_axyz_2 (uint8_t * d1, const uint32_t * s1, int n);
void cogorc_unpack_axyz_3 (uint8_t * d1, const uint32_t * s1, int n);
/* begin Orc C target preamble */
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#define ORC_ABS(a) ((a)<0 ? -(a) : (a))
#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
#define ORC_MAX(a,b) ((a)>(b) ? (a) : (b))
#define ORC_SB_MAX 127
#define ORC_SB_MIN (-1-ORC_SB_MAX)
#define ORC_UB_MAX 255
#define ORC_UB_MIN 0
#define ORC_SW_MAX 32767
#define ORC_SW_MIN (-1-ORC_SW_MAX)
#define ORC_UW_MAX 65535
#define ORC_UW_MIN 0
#define ORC_SL_MAX 2147483647
#define ORC_SL_MIN (-1-ORC_SL_MAX)
#define ORC_UL_MAX 4294967295U
#define ORC_UL_MIN 0
#define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX)
#define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX)
#define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX)
#define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX)
#define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX)
#define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX)
#define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8))
#define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24))
#define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))
#define ORC_AS_FLOAT(x) (((union { int i; float f; } *)(&x))->f)
typedef union
{
int32_t i;
float f;
} orc_union32;
typedef union
{
int64_t i;
double f;
} orc_union64;
/* end Orc C target preamble */
/* cogorc_downsample_horiz_cosite_1tap */
#ifdef DISABLE_ORC
void
cogorc_downsample_horiz_cosite_1tap (uint8_t * d1, const uint16_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
ptr0 = (int8_t *) d1;
ptr4 = (int16_t *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0wb */
var0 = (uint16_t) var4 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_downsample_horiz_cosite_1tap (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0wb */
var0 = (uint16_t) var4 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_downsample_horiz_cosite_1tap (uint8_t * d1, const uint16_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p,
_backup_cogorc_downsample_horiz_cosite_1tap);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_append (p, "select0wb", ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_downsample_horiz_cosite_3tap */
#ifdef DISABLE_ORC
void
cogorc_downsample_horiz_cosite_3tap (uint8_t * d1, const uint16_t * s1,
const uint16_t * s2, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
int16_t var5;
const int16_t *ptr5;
const int16_t var16 = 2;
const int16_t var17 = 2;
const int16_t var18 = 2;
int8_t var32;
int8_t var33;
int8_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
ptr0 = (int8_t *) d1;
ptr4 = (int16_t *) s1;
ptr5 = (int16_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: copyw */
var35 = var4;
/* 1: select0wb */
var32 = (uint16_t) var35 & 0xff;
/* 2: select1wb */
var33 = ((uint16_t) var35 >> 8) & 0xff;
/* 3: select0wb */
var34 = (uint16_t) var5 & 0xff;
/* 4: convubw */
var38 = (uint8_t) var32;
/* 5: convubw */
var36 = (uint8_t) var33;
/* 6: convubw */
var37 = (uint8_t) var34;
/* 7: mullw */
var39 = (var36 * var16) & 0xffff;
/* 8: addw */
var40 = var38 + var37;
/* 9: addw */
var41 = var40 + var39;
/* 10: addw */
var42 = var41 + var17;
/* 11: shrsw */
var43 = var42 >> var18;
/* 12: convsuswb */
var0 = ORC_CLAMP_UB (var43);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_downsample_horiz_cosite_3tap (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
int16_t var5;
const int16_t *ptr5;
const int16_t var16 = 2;
const int16_t var17 = 2;
const int16_t var18 = 2;
int8_t var32;
int8_t var33;
int8_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
ptr5 = (int16_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: copyw */
var35 = var4;
/* 1: select0wb */
var32 = (uint16_t) var35 & 0xff;
/* 2: select1wb */
var33 = ((uint16_t) var35 >> 8) & 0xff;
/* 3: select0wb */
var34 = (uint16_t) var5 & 0xff;
/* 4: convubw */
var38 = (uint8_t) var32;
/* 5: convubw */
var36 = (uint8_t) var33;
/* 6: convubw */
var37 = (uint8_t) var34;
/* 7: mullw */
var39 = (var36 * var16) & 0xffff;
/* 8: addw */
var40 = var38 + var37;
/* 9: addw */
var41 = var40 + var39;
/* 10: addw */
var42 = var41 + var17;
/* 11: shrsw */
var43 = var42 >> var18;
/* 12: convsuswb */
var0 = ORC_CLAMP_UB (var43);
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_downsample_horiz_cosite_3tap (uint8_t * d1, const uint16_t * s1,
const uint16_t * s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p,
_backup_cogorc_downsample_horiz_cosite_3tap);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
orc_program_add_constant (p, 2, 2, "c1");
orc_program_add_constant (p, 2, 2, "c2");
orc_program_add_constant (p, 2, 2, "c3");
orc_program_add_temporary (p, 1, "t1");
orc_program_add_temporary (p, 1, "t2");
orc_program_add_temporary (p, 1, "t3");
orc_program_add_temporary (p, 2, "t4");
orc_program_add_temporary (p, 2, "t5");
orc_program_add_temporary (p, 2, "t6");
orc_program_append (p, "copyw", ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_T2, ORC_VAR_T4, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_T3, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1);
orc_program_append (p, "addw", ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T6);
orc_program_append (p, "addw", ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5);
orc_program_append (p, "addw", ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C2);
orc_program_append (p, "shrsw", ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C3);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_downsample_420_jpeg */
#ifdef DISABLE_ORC
void
cogorc_downsample_420_jpeg (uint8_t * d1, const uint16_t * s1,
const uint16_t * s2, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
int16_t var5;
const int16_t *ptr5;
int16_t var32;
int8_t var33;
int8_t var34;
int8_t var35;
int8_t var36;
int8_t var37;
int16_t var38;
int8_t var39;
ptr0 = (int8_t *) d1;
ptr4 = (int16_t *) s1;
ptr5 = (int16_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: copyw */
var32 = var4;
/* 1: select0wb */
var33 = (uint16_t) var32 & 0xff;
/* 2: select1wb */
var34 = ((uint16_t) var32 >> 8) & 0xff;
/* 3: avgub */
var37 = ((uint8_t) var33 + (uint8_t) var34 + 1) >> 1;
/* 4: copyw */
var38 = var5;
/* 5: select0wb */
var35 = (uint16_t) var38 & 0xff;
/* 6: select1wb */
var36 = ((uint16_t) var38 >> 8) & 0xff;
/* 7: avgub */
var39 = ((uint8_t) var35 + (uint8_t) var36 + 1) >> 1;
/* 8: avgub */
var0 = ((uint8_t) var37 + (uint8_t) var39 + 1) >> 1;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_downsample_420_jpeg (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
int16_t var5;
const int16_t *ptr5;
int16_t var32;
int8_t var33;
int8_t var34;
int8_t var35;
int8_t var36;
int8_t var37;
int16_t var38;
int8_t var39;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
ptr5 = (int16_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: copyw */
var32 = var4;
/* 1: select0wb */
var33 = (uint16_t) var32 & 0xff;
/* 2: select1wb */
var34 = ((uint16_t) var32 >> 8) & 0xff;
/* 3: avgub */
var37 = ((uint8_t) var33 + (uint8_t) var34 + 1) >> 1;
/* 4: copyw */
var38 = var5;
/* 5: select0wb */
var35 = (uint16_t) var38 & 0xff;
/* 6: select1wb */
var36 = ((uint16_t) var38 >> 8) & 0xff;
/* 7: avgub */
var39 = ((uint8_t) var35 + (uint8_t) var36 + 1) >> 1;
/* 8: avgub */
var0 = ((uint8_t) var37 + (uint8_t) var39 + 1) >> 1;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_downsample_420_jpeg (uint8_t * d1, const uint16_t * s1,
const uint16_t * s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_downsample_420_jpeg);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 1, "t2");
orc_program_add_temporary (p, 1, "t3");
orc_program_add_temporary (p, 1, "t4");
orc_program_add_temporary (p, 1, "t5");
orc_program_append (p, "copyw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1);
orc_program_append (p, "avgub", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3);
orc_program_append (p, "copyw", ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1);
orc_program_append (p, "avgub", ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5);
orc_program_append (p, "avgub", ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T4);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_downsample_vert_halfsite_2tap */
#ifdef DISABLE_ORC
void
cogorc_downsample_vert_halfsite_2tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: avgub */
var0 = ((uint8_t) var4 + (uint8_t) var5 + 1) >> 1;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_downsample_vert_halfsite_2tap (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: avgub */
var0 = ((uint8_t) var4 + (uint8_t) var5 + 1) >> 1;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_downsample_vert_halfsite_2tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p,
_backup_cogorc_downsample_vert_halfsite_2tap);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_append (p, "avgub", ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_downsample_vert_cosite_3tap */
#ifdef DISABLE_ORC
void
cogorc_downsample_vert_cosite_3tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, const uint8_t * s3, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var16 = 2;
const int16_t var17 = 2;
const int16_t var18 = 2;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: convubw */
var33 = (uint8_t) var5;
/* 2: convubw */
var34 = (uint8_t) var6;
/* 3: mullw */
var35 = (var33 * var16) & 0xffff;
/* 4: addw */
var36 = var32 + var34;
/* 5: addw */
var37 = var36 + var35;
/* 6: addw */
var38 = var37 + var17;
/* 7: shrsw */
var39 = var38 >> var18;
/* 8: convsuswb */
var0 = ORC_CLAMP_UB (var39);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_downsample_vert_cosite_3tap (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var16 = 2;
const int16_t var17 = 2;
const int16_t var18 = 2;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: convubw */
var33 = (uint8_t) var5;
/* 2: convubw */
var34 = (uint8_t) var6;
/* 3: mullw */
var35 = (var33 * var16) & 0xffff;
/* 4: addw */
var36 = var32 + var34;
/* 5: addw */
var37 = var36 + var35;
/* 6: addw */
var38 = var37 + var17;
/* 7: shrsw */
var39 = var38 >> var18;
/* 8: convsuswb */
var0 = ORC_CLAMP_UB (var39);
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_downsample_vert_cosite_3tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, const uint8_t * s3, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p,
_backup_cogorc_downsample_vert_cosite_3tap);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_constant (p, 2, 2, "c1");
orc_program_add_constant (p, 2, 2, "c2");
orc_program_add_constant (p, 2, 2, "c3");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2);
orc_program_append (p, "shrsw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C3);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_downsample_vert_halfsite_4tap */
#ifdef DISABLE_ORC
void
cogorc_downsample_vert_halfsite_4tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, const uint8_t * s3, const uint8_t * s4, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var7;
const int8_t *ptr7;
const int16_t var16 = 26;
const int16_t var17 = 6;
const int16_t var18 = 32;
const int16_t var19 = 6;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
ptr7 = (int8_t *) s4;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
var7 = *ptr7;
ptr7++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: convubw */
var33 = (uint8_t) var5;
/* 2: convubw */
var34 = (uint8_t) var6;
/* 3: convubw */
var35 = (uint8_t) var7;
/* 4: addw */
var36 = var33 + var34;
/* 5: mullw */
var37 = (var36 * var16) & 0xffff;
/* 6: addw */
var38 = var32 + var35;
/* 7: mullw */
var39 = (var38 * var17) & 0xffff;
/* 8: addw */
var40 = var37 + var39;
/* 9: addw */
var41 = var40 + var18;
/* 10: shrsw */
var42 = var41 >> var19;
/* 11: convsuswb */
var0 = ORC_CLAMP_UB (var42);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_downsample_vert_halfsite_4tap (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var7;
const int8_t *ptr7;
const int16_t var16 = 26;
const int16_t var17 = 6;
const int16_t var18 = 32;
const int16_t var19 = 6;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
ptr7 = (int8_t *) ex->arrays[7];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
var7 = *ptr7;
ptr7++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: convubw */
var33 = (uint8_t) var5;
/* 2: convubw */
var34 = (uint8_t) var6;
/* 3: convubw */
var35 = (uint8_t) var7;
/* 4: addw */
var36 = var33 + var34;
/* 5: mullw */
var37 = (var36 * var16) & 0xffff;
/* 6: addw */
var38 = var32 + var35;
/* 7: mullw */
var39 = (var38 * var17) & 0xffff;
/* 8: addw */
var40 = var37 + var39;
/* 9: addw */
var41 = var40 + var18;
/* 10: shrsw */
var42 = var41 >> var19;
/* 11: convsuswb */
var0 = ORC_CLAMP_UB (var42);
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_downsample_vert_halfsite_4tap (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, const uint8_t * s3, const uint8_t * s4, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p,
_backup_cogorc_downsample_vert_halfsite_4tap);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_source (p, 1, "s4");
orc_program_add_constant (p, 2, 26, "c1");
orc_program_add_constant (p, 2, 6, "c2");
orc_program_add_constant (p, 2, 32, "c3");
orc_program_add_constant (p, 2, 6, "c4");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t4");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1);
orc_program_append (p, "convubw", ORC_VAR_T4, ORC_VAR_S4, ORC_VAR_D1);
orc_program_append (p, "addw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T4);
orc_program_append (p, "mullw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2);
orc_program_append (p, "addw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1);
orc_program_append (p, "addw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3);
orc_program_append (p, "shrsw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C4);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->arrays[ORC_VAR_S4] = (void *) s4;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_upsample_horiz_cosite_1tap */
#ifdef DISABLE_ORC
void
cogorc_upsample_horiz_cosite_1tap (uint8_t * d1, const uint8_t * s1, int n)
{
int i;
int16_t var0;
int16_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var32;
ptr0 = (int16_t *) d1;
ptr4 = (int8_t *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: copyb */
var32 = var4;
/* 1: mergebw */
var0 = ((uint8_t) var32) | ((uint8_t) var32 << 8);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_upsample_horiz_cosite_1tap (OrcExecutor * ex)
{
int i;
int n = ex->n;
int16_t var0;
int16_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var32;
ptr0 = (int16_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: copyb */
var32 = var4;
/* 1: mergebw */
var0 = ((uint8_t) var32) | ((uint8_t) var32 << 8);
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_upsample_horiz_cosite_1tap (uint8_t * d1, const uint8_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p,
_backup_cogorc_upsample_horiz_cosite_1tap);
orc_program_add_destination (p, 2, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_temporary (p, 1, "t1");
orc_program_append (p, "copyb", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "mergebw", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_upsample_horiz_cosite */
#ifdef DISABLE_ORC
void
cogorc_upsample_horiz_cosite (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n)
{
int i;
int16_t var0;
int16_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var32;
int8_t var33;
ptr0 = (int16_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: copyb */
var32 = var4;
/* 1: avgub */
var33 = ((uint8_t) var32 + (uint8_t) var5 + 1) >> 1;
/* 2: mergebw */
var0 = ((uint8_t) var32) | ((uint8_t) var33 << 8);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_upsample_horiz_cosite (OrcExecutor * ex)
{
int i;
int n = ex->n;
int16_t var0;
int16_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var32;
int8_t var33;
ptr0 = (int16_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: copyb */
var32 = var4;
/* 1: avgub */
var33 = ((uint8_t) var32 + (uint8_t) var5 + 1) >> 1;
/* 2: mergebw */
var0 = ((uint8_t) var32) | ((uint8_t) var33 << 8);
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_upsample_horiz_cosite (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_upsample_horiz_cosite);
orc_program_add_destination (p, 2, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_temporary (p, 1, "t1");
orc_program_add_temporary (p, 1, "t2");
orc_program_append (p, "copyb", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "avgub", ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_S2);
orc_program_append (p, "mergebw", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_upsample_vert_avgub */
#ifdef DISABLE_ORC
void
cogorc_upsample_vert_avgub (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: avgub */
var0 = ((uint8_t) var4 + (uint8_t) var5 + 1) >> 1;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_upsample_vert_avgub (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: avgub */
var0 = ((uint8_t) var4 + (uint8_t) var5 + 1) >> 1;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_upsample_vert_avgub (uint8_t * d1, const uint8_t * s1,
const uint8_t * s2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_upsample_vert_avgub);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_append (p, "avgub", ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
func = p->code_exec;
func (ex);
}
#endif
/* orc_unpack_yuyv_y */
#ifdef DISABLE_ORC
void
orc_unpack_yuyv_y (uint8_t * d1, const uint16_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
ptr0 = (int8_t *) d1;
ptr4 = (int16_t *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0wb */
var0 = (uint16_t) var4 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_unpack_yuyv_y (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0wb */
var0 = (uint16_t) var4 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
orc_unpack_yuyv_y (uint8_t * d1, const uint16_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_y);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_append (p, "select0wb", ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_unpack_yuyv_u */
#ifdef DISABLE_ORC
void
orc_unpack_yuyv_u (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_unpack_yuyv_u (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
orc_unpack_yuyv_u (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_u);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select0lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_unpack_yuyv_v */
#ifdef DISABLE_ORC
void
orc_unpack_yuyv_v (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_unpack_yuyv_v (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
orc_unpack_yuyv_v (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_v);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select1lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_pack_yuyv */
#ifdef DISABLE_ORC
void
orc_pack_yuyv (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int n)
{
int i;
orc_union32 var0;
orc_union32 *ptr0;
int16_t var4;
const int16_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var32;
int8_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
ptr0 = (orc_union32 *) d1;
ptr4 = (int16_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: copyw */
var36 = var4;
/* 1: select0wb */
var32 = (uint16_t) var36 & 0xff;
/* 2: select1wb */
var33 = ((uint16_t) var36 >> 8) & 0xff;
/* 3: mergebw */
var34 = ((uint8_t) var32) | ((uint8_t) var5 << 8);
/* 4: mergebw */
var35 = ((uint8_t) var33) | ((uint8_t) var6 << 8);
/* 5: mergewl */
var0.i = ((uint16_t) var34) | ((uint16_t) var35 << 16);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_pack_yuyv (OrcExecutor * ex)
{
int i;
int n = ex->n;
orc_union32 var0;
orc_union32 *ptr0;
int16_t var4;
const int16_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var32;
int8_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
ptr0 = (orc_union32 *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: copyw */
var36 = var4;
/* 1: select0wb */
var32 = (uint16_t) var36 & 0xff;
/* 2: select1wb */
var33 = ((uint16_t) var36 >> 8) & 0xff;
/* 3: mergebw */
var34 = ((uint8_t) var32) | ((uint8_t) var5 << 8);
/* 4: mergebw */
var35 = ((uint8_t) var33) | ((uint8_t) var6 << 8);
/* 5: mergewl */
var0.i = ((uint16_t) var34) | ((uint16_t) var35 << 16);
*ptr0 = var0;
ptr0++;
}
}
void
orc_pack_yuyv (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_pack_yuyv);
orc_program_add_destination (p, 4, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_temporary (p, 1, "t1");
orc_program_add_temporary (p, 1, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t4");
orc_program_add_temporary (p, 2, "t5");
orc_program_append (p, "copyw", ORC_VAR_T5, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1);
orc_program_append (p, "mergebw", ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S2);
orc_program_append (p, "mergebw", ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_S3);
orc_program_append (p, "mergewl", ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
func = p->code_exec;
func (ex);
}
#endif
/* orc_unpack_uyvy_y */
#ifdef DISABLE_ORC
void
orc_unpack_uyvy_y (uint8_t * d1, const uint16_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
ptr0 = (int8_t *) d1;
ptr4 = (int16_t *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1wb */
var0 = ((uint16_t) var4 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_unpack_uyvy_y (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1wb */
var0 = ((uint16_t) var4 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
orc_unpack_uyvy_y (uint8_t * d1, const uint16_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_y);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_append (p, "select1wb", ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_unpack_uyvy_u */
#ifdef DISABLE_ORC
void
orc_unpack_uyvy_u (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_unpack_uyvy_u (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
orc_unpack_uyvy_u (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_u);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select0lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_unpack_uyvy_v */
#ifdef DISABLE_ORC
void
orc_unpack_uyvy_v (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_unpack_uyvy_v (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
orc_unpack_uyvy_v (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_v);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select1lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_pack_uyvy */
#ifdef DISABLE_ORC
void
orc_pack_uyvy (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int n)
{
int i;
orc_union32 var0;
orc_union32 *ptr0;
int16_t var4;
const int16_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var32;
int8_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
ptr0 = (orc_union32 *) d1;
ptr4 = (int16_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: copyw */
var36 = var4;
/* 1: select0wb */
var32 = (uint16_t) var36 & 0xff;
/* 2: select1wb */
var33 = ((uint16_t) var36 >> 8) & 0xff;
/* 3: mergebw */
var34 = ((uint8_t) var5) | ((uint8_t) var32 << 8);
/* 4: mergebw */
var35 = ((uint8_t) var6) | ((uint8_t) var33 << 8);
/* 5: mergewl */
var0.i = ((uint16_t) var34) | ((uint16_t) var35 << 16);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_pack_uyvy (OrcExecutor * ex)
{
int i;
int n = ex->n;
orc_union32 var0;
orc_union32 *ptr0;
int16_t var4;
const int16_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var32;
int8_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
ptr0 = (orc_union32 *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: copyw */
var36 = var4;
/* 1: select0wb */
var32 = (uint16_t) var36 & 0xff;
/* 2: select1wb */
var33 = ((uint16_t) var36 >> 8) & 0xff;
/* 3: mergebw */
var34 = ((uint8_t) var5) | ((uint8_t) var32 << 8);
/* 4: mergebw */
var35 = ((uint8_t) var6) | ((uint8_t) var33 << 8);
/* 5: mergewl */
var0.i = ((uint16_t) var34) | ((uint16_t) var35 << 16);
*ptr0 = var0;
ptr0++;
}
}
void
orc_pack_uyvy (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_pack_uyvy);
orc_program_add_destination (p, 4, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_temporary (p, 1, "t1");
orc_program_add_temporary (p, 1, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t4");
orc_program_add_temporary (p, 2, "t5");
orc_program_append (p, "copyw", ORC_VAR_T5, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1);
orc_program_append (p, "mergebw", ORC_VAR_T3, ORC_VAR_S2, ORC_VAR_T1);
orc_program_append (p, "mergebw", ORC_VAR_T4, ORC_VAR_S3, ORC_VAR_T2);
orc_program_append (p, "mergewl", ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
func = p->code_exec;
func (ex);
}
#endif
/* orc_addc_convert_u8_s16 */
#ifdef DISABLE_ORC
void
orc_addc_convert_u8_s16 (uint8_t * d1, const int16_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
const int16_t var16 = 128;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (int16_t *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: addw */
var32 = var4 + var16;
/* 1: convsuswb */
var0 = ORC_CLAMP_UB (var32);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_addc_convert_u8_s16 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int16_t var4;
const int16_t *ptr4;
const int16_t var16 = 128;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int16_t *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: addw */
var32 = var4 + var16;
/* 1: convsuswb */
var0 = ORC_CLAMP_UB (var32);
*ptr0 = var0;
ptr0++;
}
}
void
orc_addc_convert_u8_s16 (uint8_t * d1, const int16_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_addc_convert_u8_s16);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 2, "s1");
orc_program_add_constant (p, 2, 128, "c1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_subc_convert_s16_u8 */
#ifdef DISABLE_ORC
void
orc_subc_convert_s16_u8 (int16_t * d1, const uint8_t * s1, int n)
{
int i;
int16_t var0;
int16_t *ptr0;
int8_t var4;
const int8_t *ptr4;
const int16_t var16 = 128;
int16_t var32;
ptr0 = (int16_t *) d1;
ptr4 = (int8_t *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var0 = var32 - var16;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_subc_convert_s16_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int16_t var0;
int16_t *ptr0;
int8_t var4;
const int8_t *ptr4;
const int16_t var16 = 128;
int16_t var32;
ptr0 = (int16_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var0 = var32 - var16;
*ptr0 = var0;
ptr0++;
}
}
void
orc_subc_convert_s16_u8 (int16_t * d1, const uint8_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_subc_convert_s16_u8);
orc_program_add_destination (p, 2, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_constant (p, 2, 128, "c1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_splat_u8_ns */
#ifdef DISABLE_ORC
void
orc_splat_u8_ns (uint8_t * d1, int p1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
const int8_t var24 = p1;
ptr0 = (int8_t *) d1;
for (i = 0; i < n; i++) {
/* 0: copyb */
var0 = var24;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_splat_u8_ns (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
const int8_t var24 = ex->params[24];
ptr0 = (int8_t *) ex->arrays[0];
for (i = 0; i < n; i++) {
/* 0: copyb */
var0 = var24;
*ptr0 = var0;
ptr0++;
}
}
void
orc_splat_u8_ns (uint8_t * d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_splat_u8_ns);
orc_program_add_destination (p, 1, "d1");
orc_program_add_parameter (p, 1, "p1");
orc_program_append (p, "copyb", ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->params[ORC_VAR_P1] = p1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_splat_s16_ns */
#ifdef DISABLE_ORC
void
orc_splat_s16_ns (int16_t * d1, int p1, int n)
{
int i;
int16_t var0;
int16_t *ptr0;
const int16_t var24 = p1;
ptr0 = (int16_t *) d1;
for (i = 0; i < n; i++) {
/* 0: copyw */
var0 = var24;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_splat_s16_ns (OrcExecutor * ex)
{
int i;
int n = ex->n;
int16_t var0;
int16_t *ptr0;
const int16_t var24 = ex->params[24];
ptr0 = (int16_t *) ex->arrays[0];
for (i = 0; i < n; i++) {
/* 0: copyw */
var0 = var24;
*ptr0 = var0;
ptr0++;
}
}
void
orc_splat_s16_ns (int16_t * d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_splat_s16_ns);
orc_program_add_destination (p, 2, "d1");
orc_program_add_parameter (p, 2, "p1");
orc_program_append (p, "copyw", ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->params[ORC_VAR_P1] = p1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_matrix2_u8 */
#ifdef DISABLE_ORC
void
orc_matrix2_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2, int p1,
int p2, int p3, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 6;
const int16_t var24 = p1;
const int16_t var25 = p2;
const int16_t var26 = p3;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: addw */
var37 = var36 + var26;
/* 6: shrsw */
var38 = var37 >> var16;
/* 7: convsuswb */
var0 = ORC_CLAMP_UB (var38);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_matrix2_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 6;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
const int16_t var26 = ex->params[26];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: addw */
var37 = var36 + var26;
/* 6: shrsw */
var38 = var37 >> var16;
/* 7: convsuswb */
var0 = ORC_CLAMP_UB (var38);
*ptr0 = var0;
ptr0++;
}
}
void
orc_matrix2_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2, int p1,
int p2, int p3, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_matrix2_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_constant (p, 2, 6, "c1");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_parameter (p, 2, "p3");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3);
orc_program_append (p, "shrsw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
ex->params[ORC_VAR_P3] = p3;
func = p->code_exec;
func (ex);
}
#endif
/* orc_matrix2_11_u8 */
#ifdef DISABLE_ORC
void
orc_matrix2_11_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2, int p1,
int p2, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 16;
const int16_t var17 = 128;
const int16_t var18 = 128;
const int16_t var19 = 8;
const int16_t var24 = p1;
const int16_t var25 = p2;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var36 = var32 - var16;
/* 2: mullw */
var34 = (var36 * var24) & 0xffff;
/* 3: convubw */
var33 = (uint8_t) var5;
/* 4: subw */
var37 = var33 - var17;
/* 5: mullw */
var35 = (var37 * var25) & 0xffff;
/* 6: addw */
var38 = var34 + var35;
/* 7: addw */
var39 = var38 + var18;
/* 8: shrsw */
var40 = var39 >> var19;
/* 9: addw */
var41 = var40 + var36;
/* 10: addw */
var42 = var41 + var37;
/* 11: convsuswb */
var0 = ORC_CLAMP_UB (var42);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_matrix2_11_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 16;
const int16_t var17 = 128;
const int16_t var18 = 128;
const int16_t var19 = 8;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var36 = var32 - var16;
/* 2: mullw */
var34 = (var36 * var24) & 0xffff;
/* 3: convubw */
var33 = (uint8_t) var5;
/* 4: subw */
var37 = var33 - var17;
/* 5: mullw */
var35 = (var37 * var25) & 0xffff;
/* 6: addw */
var38 = var34 + var35;
/* 7: addw */
var39 = var38 + var18;
/* 8: shrsw */
var40 = var39 >> var19;
/* 9: addw */
var41 = var40 + var36;
/* 10: addw */
var42 = var41 + var37;
/* 11: convsuswb */
var0 = ORC_CLAMP_UB (var42);
*ptr0 = var0;
ptr0++;
}
}
void
orc_matrix2_11_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2, int p1,
int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_matrix2_11_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_constant (p, 2, 16, "c1");
orc_program_add_constant (p, 2, 128, "c2");
orc_program_add_constant (p, 2, 128, "c3");
orc_program_add_constant (p, 2, 8, "c4");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t4");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1);
orc_program_append (p, "mullw", ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2);
orc_program_append (p, "mullw", ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C3);
orc_program_append (p, "shrsw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C4);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T1);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
func = p->code_exec;
func (ex);
}
#endif
/* orc_matrix2_12_u8 */
#ifdef DISABLE_ORC
void
orc_matrix2_12_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2, int p1,
int p2, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 16;
const int16_t var17 = 128;
const int16_t var18 = 128;
const int16_t var19 = 8;
const int16_t var24 = p1;
const int16_t var25 = p2;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var36 = var32 - var16;
/* 2: mullw */
var34 = (var36 * var24) & 0xffff;
/* 3: convubw */
var33 = (uint8_t) var5;
/* 4: subw */
var37 = var33 - var17;
/* 5: mullw */
var35 = (var37 * var25) & 0xffff;
/* 6: addw */
var38 = var34 + var35;
/* 7: addw */
var39 = var38 + var18;
/* 8: shrsw */
var40 = var39 >> var19;
/* 9: addw */
var41 = var40 + var36;
/* 10: addw */
var42 = var41 + var37;
/* 11: addw */
var43 = var42 + var37;
/* 12: convsuswb */
var0 = ORC_CLAMP_UB (var43);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_matrix2_12_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 16;
const int16_t var17 = 128;
const int16_t var18 = 128;
const int16_t var19 = 8;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var36 = var32 - var16;
/* 2: mullw */
var34 = (var36 * var24) & 0xffff;
/* 3: convubw */
var33 = (uint8_t) var5;
/* 4: subw */
var37 = var33 - var17;
/* 5: mullw */
var35 = (var37 * var25) & 0xffff;
/* 6: addw */
var38 = var34 + var35;
/* 7: addw */
var39 = var38 + var18;
/* 8: shrsw */
var40 = var39 >> var19;
/* 9: addw */
var41 = var40 + var36;
/* 10: addw */
var42 = var41 + var37;
/* 11: addw */
var43 = var42 + var37;
/* 12: convsuswb */
var0 = ORC_CLAMP_UB (var43);
*ptr0 = var0;
ptr0++;
}
}
void
orc_matrix2_12_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2, int p1,
int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_matrix2_12_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_constant (p, 2, 16, "c1");
orc_program_add_constant (p, 2, 128, "c2");
orc_program_add_constant (p, 2, 128, "c3");
orc_program_add_constant (p, 2, 8, "c4");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t4");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1);
orc_program_append (p, "mullw", ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2);
orc_program_append (p, "mullw", ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C3);
orc_program_append (p, "shrsw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C4);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T1);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
func = p->code_exec;
func (ex);
}
#endif
/* orc_matrix3_u8 */
#ifdef DISABLE_ORC
void
orc_matrix3_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var16 = 6;
const int16_t var24 = p1;
const int16_t var25 = p2;
const int16_t var26 = p3;
const int16_t var27 = p4;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: addw */
var40 = var39 + var27;
/* 9: shrsw */
var41 = var40 >> var16;
/* 10: convsuswb */
var0 = ORC_CLAMP_UB (var41);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_matrix3_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var16 = 6;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
const int16_t var26 = ex->params[26];
const int16_t var27 = ex->params[27];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: addw */
var40 = var39 + var27;
/* 9: shrsw */
var41 = var40 >> var16;
/* 10: convsuswb */
var0 = ORC_CLAMP_UB (var41);
*ptr0 = var0;
ptr0++;
}
}
void
orc_matrix3_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_matrix3_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_constant (p, 2, 6, "c1");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_parameter (p, 2, "p3");
orc_program_add_parameter (p, 2, "p4");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4);
orc_program_append (p, "shrsw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
ex->params[ORC_VAR_P3] = p3;
ex->params[ORC_VAR_P4] = p4;
func = p->code_exec;
func (ex);
}
#endif
/* orc_matrix3_100_u8 */
#ifdef DISABLE_ORC
void
orc_matrix3_100_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var16 = 16;
const int16_t var17 = 128;
const int16_t var18 = 128;
const int16_t var19 = 128;
const int16_t var20 = 8;
const int16_t var24 = p1;
const int16_t var25 = p2;
const int16_t var26 = p3;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
int16_t var44;
int16_t var45;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var35 = var32 - var16;
/* 2: mullw */
var34 = (var35 * var24) & 0xffff;
/* 3: convubw */
var33 = (uint8_t) var5;
/* 4: subw */
var36 = var33 - var17;
/* 5: mullw */
var37 = (var36 * var25) & 0xffff;
/* 6: addw */
var38 = var34 + var37;
/* 7: convubw */
var39 = (uint8_t) var6;
/* 8: subw */
var40 = var39 - var18;
/* 9: mullw */
var41 = (var40 * var26) & 0xffff;
/* 10: addw */
var42 = var38 + var41;
/* 11: addw */
var43 = var42 + var19;
/* 12: shrsw */
var44 = var43 >> var20;
/* 13: addw */
var45 = var44 + var35;
/* 14: convsuswb */
var0 = ORC_CLAMP_UB (var45);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_matrix3_100_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var16 = 16;
const int16_t var17 = 128;
const int16_t var18 = 128;
const int16_t var19 = 128;
const int16_t var20 = 8;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
const int16_t var26 = ex->params[26];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
int16_t var44;
int16_t var45;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: subw */
var35 = var32 - var16;
/* 2: mullw */
var34 = (var35 * var24) & 0xffff;
/* 3: convubw */
var33 = (uint8_t) var5;
/* 4: subw */
var36 = var33 - var17;
/* 5: mullw */
var37 = (var36 * var25) & 0xffff;
/* 6: addw */
var38 = var34 + var37;
/* 7: convubw */
var39 = (uint8_t) var6;
/* 8: subw */
var40 = var39 - var18;
/* 9: mullw */
var41 = (var40 * var26) & 0xffff;
/* 10: addw */
var42 = var38 + var41;
/* 11: addw */
var43 = var42 + var19;
/* 12: shrsw */
var44 = var43 >> var20;
/* 13: addw */
var45 = var44 + var35;
/* 14: convsuswb */
var0 = ORC_CLAMP_UB (var45);
*ptr0 = var0;
ptr0++;
}
}
void
orc_matrix3_100_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_matrix3_100_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_constant (p, 2, 16, "c1");
orc_program_add_constant (p, 2, 128, "c2");
orc_program_add_constant (p, 2, 128, "c3");
orc_program_add_constant (p, 2, 128, "c4");
orc_program_add_constant (p, 2, 8, "c5");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_parameter (p, 2, "p3");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1);
orc_program_append (p, "mullw", ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1);
orc_program_append (p, "subw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C4);
orc_program_append (p, "shrsw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C5);
orc_program_append (p, "addw", ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T1);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
ex->params[ORC_VAR_P3] = p3;
func = p->code_exec;
func (ex);
}
#endif
/* orc_matrix3_100_offset_u8 */
#ifdef DISABLE_ORC
void
orc_matrix3_100_offset_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int p5, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var24 = p1;
const int16_t var25 = p2;
const int16_t var26 = p3;
const int16_t var27 = p4;
const int16_t var28 = p5;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var34 = (uint8_t) var4;
/* 1: mullw */
var32 = (var34 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var32 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: addw */
var40 = var39 + var27;
/* 9: shrsw */
var41 = var40 >> var28;
/* 10: addw */
var42 = var41 + var34;
/* 11: convsuswb */
var0 = ORC_CLAMP_UB (var42);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_matrix3_100_offset_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
const int16_t var26 = ex->params[26];
const int16_t var27 = ex->params[27];
const int16_t var28 = ex->params[28];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var34 = (uint8_t) var4;
/* 1: mullw */
var32 = (var34 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var32 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: addw */
var40 = var39 + var27;
/* 9: shrsw */
var41 = var40 >> var28;
/* 10: addw */
var42 = var41 + var34;
/* 11: convsuswb */
var0 = ORC_CLAMP_UB (var42);
*ptr0 = var0;
ptr0++;
}
}
void
orc_matrix3_100_offset_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int p5, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_matrix3_100_offset_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_parameter (p, 2, "p3");
orc_program_add_parameter (p, 2, "p4");
orc_program_add_parameter (p, 2, "p5");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3");
orc_program_append (p, "convubw", ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4);
orc_program_append (p, "shrsw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P5);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
ex->params[ORC_VAR_P3] = p3;
ex->params[ORC_VAR_P4] = p4;
ex->params[ORC_VAR_P5] = p5;
func = p->code_exec;
func (ex);
}
#endif
/* orc_matrix3_000_u8 */
#ifdef DISABLE_ORC
void
orc_matrix3_000_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int p5, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var24 = p1;
const int16_t var25 = p2;
const int16_t var26 = p3;
const int16_t var27 = p4;
const int16_t var28 = p5;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: addw */
var40 = var39 + var27;
/* 9: shrsw */
var41 = var40 >> var28;
/* 10: convwb */
var0 = var41;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_matrix3_000_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
const int16_t var26 = ex->params[26];
const int16_t var27 = ex->params[27];
const int16_t var28 = ex->params[28];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: addw */
var40 = var39 + var27;
/* 9: shrsw */
var41 = var40 >> var28;
/* 10: convwb */
var0 = var41;
*ptr0 = var0;
ptr0++;
}
}
void
orc_matrix3_000_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int p2, int p3, int p4, int p5, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_matrix3_000_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_parameter (p, 2, "p3");
orc_program_add_parameter (p, 2, "p4");
orc_program_add_parameter (p, 2, "p5");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4);
orc_program_append (p, "shrsw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P5);
orc_program_append (p, "convwb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
ex->params[ORC_VAR_P3] = p3;
ex->params[ORC_VAR_P4] = p4;
ex->params[ORC_VAR_P5] = p5;
func = p->code_exec;
func (ex);
}
#endif
/* orc_pack_123x */
#ifdef DISABLE_ORC
void
orc_pack_123x (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int n)
{
int i;
orc_union32 var0;
orc_union32 *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int8_t var24 = p1;
int16_t var32;
int16_t var33;
ptr0 = (orc_union32 *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: mergebw */
var32 = ((uint8_t) var4) | ((uint8_t) var5 << 8);
/* 1: mergebw */
var33 = ((uint8_t) var6) | ((uint8_t) var24 << 8);
/* 2: mergewl */
var0.i = ((uint16_t) var32) | ((uint16_t) var33 << 16);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_pack_123x (OrcExecutor * ex)
{
int i;
int n = ex->n;
orc_union32 var0;
orc_union32 *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int8_t var24 = ex->params[24];
int16_t var32;
int16_t var33;
ptr0 = (orc_union32 *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: mergebw */
var32 = ((uint8_t) var4) | ((uint8_t) var5 << 8);
/* 1: mergebw */
var33 = ((uint8_t) var6) | ((uint8_t) var24 << 8);
/* 2: mergewl */
var0.i = ((uint16_t) var32) | ((uint16_t) var33 << 16);
*ptr0 = var0;
ptr0++;
}
}
void
orc_pack_123x (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_pack_123x);
orc_program_add_destination (p, 4, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_parameter (p, 1, "p1");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_append (p, "mergebw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2);
orc_program_append (p, "mergebw", ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_P1);
orc_program_append (p, "mergewl", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->params[ORC_VAR_P1] = p1;
func = p->code_exec;
func (ex);
}
#endif
/* orc_pack_x123 */
#ifdef DISABLE_ORC
void
orc_pack_x123 (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int n)
{
int i;
orc_union32 var0;
orc_union32 *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int8_t var24 = p1;
int16_t var32;
int16_t var33;
ptr0 = (orc_union32 *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: mergebw */
var32 = ((uint8_t) var24) | ((uint8_t) var4 << 8);
/* 1: mergebw */
var33 = ((uint8_t) var5) | ((uint8_t) var6 << 8);
/* 2: mergewl */
var0.i = ((uint16_t) var32) | ((uint16_t) var33 << 16);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_orc_pack_x123 (OrcExecutor * ex)
{
int i;
int n = ex->n;
orc_union32 var0;
orc_union32 *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
const int8_t var24 = ex->params[24];
int16_t var32;
int16_t var33;
ptr0 = (orc_union32 *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
/* 0: mergebw */
var32 = ((uint8_t) var24) | ((uint8_t) var4 << 8);
/* 1: mergebw */
var33 = ((uint8_t) var5) | ((uint8_t) var6 << 8);
/* 2: mergewl */
var0.i = ((uint16_t) var32) | ((uint16_t) var33 << 16);
*ptr0 = var0;
ptr0++;
}
}
void
orc_pack_x123 (uint32_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_orc_pack_x123);
orc_program_add_destination (p, 4, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_parameter (p, 1, "p1");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_append (p, "mergebw", ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_S1);
orc_program_append (p, "mergebw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S3);
orc_program_append (p, "mergewl", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->params[ORC_VAR_P1] = p1;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_combine2_u8 */
#ifdef DISABLE_ORC
void
cogorc_combine2_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
int p1, int p2, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 8;
const int16_t var24 = p1;
const int16_t var25 = p2;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: shruw */
var37 = ((uint16_t) var36) >> var16;
/* 6: convuuswb */
var0 = ORC_CLAMP_UB ((uint16_t) var37);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_combine2_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
const int16_t var16 = 8;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: shruw */
var37 = ((uint16_t) var36) >> var16;
/* 6: convuuswb */
var0 = ORC_CLAMP_UB ((uint16_t) var37);
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_combine2_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
int p1, int p2, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_combine2_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_constant (p, 2, 8, "c1");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "shruw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1);
orc_program_append (p, "convuuswb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_combine4_u8 */
#ifdef DISABLE_ORC
void
cogorc_combine4_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, const uint8_t * s4, int p1, int p2, int p3, int p4,
int n)
{
int i;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var7;
const int8_t *ptr7;
const int16_t var16 = 32;
const int16_t var17 = 6;
const int16_t var24 = p1;
const int16_t var25 = p2;
const int16_t var26 = p3;
const int16_t var27 = p4;
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
int16_t var44;
ptr0 = (int8_t *) d1;
ptr4 = (int8_t *) s1;
ptr5 = (int8_t *) s2;
ptr6 = (int8_t *) s3;
ptr7 = (int8_t *) s4;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
var7 = *ptr7;
ptr7++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: convubw */
var40 = (uint8_t) var7;
/* 9: mullw */
var41 = (var40 * var27) & 0xffff;
/* 10: addw */
var42 = var39 + var41;
/* 11: addw */
var43 = var42 + var16;
/* 12: shrsw */
var44 = var43 >> var17;
/* 13: convsuswb */
var0 = ORC_CLAMP_UB (var44);
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_combine4_u8 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
int8_t var4;
const int8_t *ptr4;
int8_t var5;
const int8_t *ptr5;
int8_t var6;
const int8_t *ptr6;
int8_t var7;
const int8_t *ptr7;
const int16_t var16 = 32;
const int16_t var17 = 6;
const int16_t var24 = ex->params[24];
const int16_t var25 = ex->params[25];
const int16_t var26 = ex->params[26];
const int16_t var27 = ex->params[27];
int16_t var32;
int16_t var33;
int16_t var34;
int16_t var35;
int16_t var36;
int16_t var37;
int16_t var38;
int16_t var39;
int16_t var40;
int16_t var41;
int16_t var42;
int16_t var43;
int16_t var44;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (int8_t *) ex->arrays[4];
ptr5 = (int8_t *) ex->arrays[5];
ptr6 = (int8_t *) ex->arrays[6];
ptr7 = (int8_t *) ex->arrays[7];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
var5 = *ptr5;
ptr5++;
var6 = *ptr6;
ptr6++;
var7 = *ptr7;
ptr7++;
/* 0: convubw */
var32 = (uint8_t) var4;
/* 1: mullw */
var34 = (var32 * var24) & 0xffff;
/* 2: convubw */
var33 = (uint8_t) var5;
/* 3: mullw */
var35 = (var33 * var25) & 0xffff;
/* 4: addw */
var36 = var34 + var35;
/* 5: convubw */
var37 = (uint8_t) var6;
/* 6: mullw */
var38 = (var37 * var26) & 0xffff;
/* 7: addw */
var39 = var36 + var38;
/* 8: convubw */
var40 = (uint8_t) var7;
/* 9: mullw */
var41 = (var40 * var27) & 0xffff;
/* 10: addw */
var42 = var39 + var41;
/* 11: addw */
var43 = var42 + var16;
/* 12: shrsw */
var44 = var43 >> var17;
/* 13: convsuswb */
var0 = ORC_CLAMP_UB (var44);
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_combine4_u8 (uint8_t * d1, const uint8_t * s1, const uint8_t * s2,
const uint8_t * s3, const uint8_t * s4, int p1, int p2, int p3, int p4,
int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_combine4_u8);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3");
orc_program_add_source (p, 1, "s4");
orc_program_add_constant (p, 2, 32, "c1");
orc_program_add_constant (p, 2, 6, "c2");
orc_program_add_parameter (p, 2, "p1");
orc_program_add_parameter (p, 2, "p2");
orc_program_add_parameter (p, 2, "p3");
orc_program_add_parameter (p, 2, "p4");
orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2");
orc_program_append (p, "convubw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "convubw", ORC_VAR_T2, ORC_VAR_S4, ORC_VAR_D1);
orc_program_append (p, "mullw", ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P4);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2);
orc_program_append (p, "addw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1);
orc_program_append (p, "shrsw", ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2);
orc_program_append (p, "convsuswb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
ex->arrays[ORC_VAR_S2] = (void *) s2;
ex->arrays[ORC_VAR_S3] = (void *) s3;
ex->arrays[ORC_VAR_S4] = (void *) s4;
ex->params[ORC_VAR_P1] = p1;
ex->params[ORC_VAR_P2] = p2;
ex->params[ORC_VAR_P3] = p3;
ex->params[ORC_VAR_P4] = p4;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_unpack_axyz_0 */
#ifdef DISABLE_ORC
void
cogorc_unpack_axyz_0 (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_unpack_axyz_0 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_unpack_axyz_0 (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_unpack_axyz_0);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select0lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_unpack_axyz_1 */
#ifdef DISABLE_ORC
void
cogorc_unpack_axyz_1 (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_unpack_axyz_1 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select0lw */
var32 = (uint32_t) var4.i & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_unpack_axyz_1 (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_unpack_axyz_1);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select0lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_unpack_axyz_2 */
#ifdef DISABLE_ORC
void
cogorc_unpack_axyz_2 (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_unpack_axyz_2 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select0wb */
var0 = (uint16_t) var32 & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_unpack_axyz_2 (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_unpack_axyz_2);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select1lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select0wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif
/* cogorc_unpack_axyz_3 */
#ifdef DISABLE_ORC
void
cogorc_unpack_axyz_3 (uint8_t * d1, const uint32_t * s1, int n)
{
int i;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) d1;
ptr4 = (orc_union32 *) s1;
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
#else
static void
_backup_cogorc_unpack_axyz_3 (OrcExecutor * ex)
{
int i;
int n = ex->n;
int8_t var0;
int8_t *ptr0;
orc_union32 var4;
const orc_union32 *ptr4;
int16_t var32;
ptr0 = (int8_t *) ex->arrays[0];
ptr4 = (orc_union32 *) ex->arrays[4];
for (i = 0; i < n; i++) {
var4 = *ptr4;
ptr4++;
/* 0: select1lw */
var32 = ((uint32_t) var4.i >> 16) & 0xffff;
/* 1: select1wb */
var0 = ((uint16_t) var32 >> 8) & 0xff;
*ptr0 = var0;
ptr0++;
}
}
void
cogorc_unpack_axyz_3 (uint8_t * d1, const uint32_t * s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
static 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");
orc_program_set_backup_function (p, _backup_cogorc_unpack_axyz_3);
orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 4, "s1");
orc_program_add_temporary (p, 2, "t1");
orc_program_append (p, "select1lw", ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
orc_program_append (p, "select1wb", ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
result = orc_program_compile (p);
}
p_inited = TRUE;
orc_once_mutex_unlock ();
}
ex->program = p;
ex->n = n;
ex->arrays[ORC_VAR_D1] = d1;
ex->arrays[ORC_VAR_S1] = (void *) s1;
func = p->code_exec;
func (ex);
}
#endif