mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
gst: update disted orc backup code
This commit is contained in:
parent
bde3a9e183
commit
9be707d54d
6 changed files with 526 additions and 477 deletions
|
@ -4,9 +4,6 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#ifndef DISABLE_ORC
|
||||
#include <orc/orc.h>
|
||||
#endif
|
||||
#include <glib.h>
|
||||
|
||||
#ifndef _ORC_INTEGER_TYPEDEFS_
|
||||
|
@ -32,6 +29,7 @@ typedef unsigned __int16 orc_uint16;
|
|||
typedef unsigned __int32 orc_uint32;
|
||||
typedef unsigned __int64 orc_uint64;
|
||||
#define ORC_UINT64_C(x) (x##Ui64)
|
||||
#define inline __inline
|
||||
#else
|
||||
#include <limits.h>
|
||||
typedef signed char orc_int8;
|
||||
|
@ -71,16 +69,32 @@ typedef union
|
|||
orc_int16 x4[4];
|
||||
} orc_union64;
|
||||
#endif
|
||||
#ifndef ORC_RESTRICT
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define ORC_RESTRICT restrict
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define ORC_RESTRICT __restrict__
|
||||
#else
|
||||
#define ORC_RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
||||
const guint8 * s3, const guint8 * s4, const guint8 * s5, int n);
|
||||
void deinterlace_line_linear (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
||||
int n);
|
||||
void deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1,
|
||||
const guint8 * s2, const guint8 * s3, int n);
|
||||
void deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
||||
const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int p1,
|
||||
int n);
|
||||
#ifndef DISABLE_ORC
|
||||
#include <orc/orc.h>
|
||||
#endif
|
||||
void deinterlace_line_vfir (guint8 * ORC_RESTRICT d1,
|
||||
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
|
||||
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4,
|
||||
const guint8 * ORC_RESTRICT s5, int n);
|
||||
void deinterlace_line_linear (guint8 * ORC_RESTRICT d1,
|
||||
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n);
|
||||
void deinterlace_line_linear_blend (guint8 * ORC_RESTRICT d1,
|
||||
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
|
||||
const guint8 * ORC_RESTRICT s3, int n);
|
||||
void deinterlace_line_greedy (orc_uint8 * ORC_RESTRICT d1,
|
||||
const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
|
||||
const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
|
||||
int p1, int n);
|
||||
|
||||
|
||||
/* begin Orc C target preamble */
|
||||
|
@ -114,6 +128,7 @@ void deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
|||
#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))
|
||||
#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))
|
||||
#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))
|
||||
#ifndef ORC_RESTRICT
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define ORC_RESTRICT restrict
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
|
@ -121,6 +136,7 @@ void deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
|||
#else
|
||||
#define ORC_RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
/* end Orc C target preamble */
|
||||
|
||||
|
||||
|
@ -128,8 +144,9 @@ void deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
|||
/* deinterlace_line_vfir */
|
||||
#ifdef DISABLE_ORC
|
||||
void
|
||||
deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
||||
const guint8 * s3, const guint8 * s4, const guint8 * s5, int n)
|
||||
deinterlace_line_vfir (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
|
||||
const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
|
||||
const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, int n)
|
||||
{
|
||||
int i;
|
||||
orc_int8 *ORC_RESTRICT ptr0;
|
||||
|
@ -167,7 +184,7 @@ deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
|||
ptr8 = (orc_int8 *) s5;
|
||||
|
||||
/* 16: loadpw */
|
||||
var40.i = 0x00000004; /* 4 or 1.97626e-323f */
|
||||
var40.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
/* 0: loadb */
|
||||
|
@ -255,7 +272,7 @@ _backup_deinterlace_line_vfir (OrcExecutor * ORC_RESTRICT ex)
|
|||
ptr8 = (orc_int8 *) ex->arrays[8];
|
||||
|
||||
/* 16: loadpw */
|
||||
var40.i = 0x00000004; /* 4 or 1.97626e-323f */
|
||||
var40.i = (int) 0x00000004; /* 4 or 1.97626e-323f */
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
/* 0: loadb */
|
||||
|
@ -303,8 +320,9 @@ _backup_deinterlace_line_vfir (OrcExecutor * ORC_RESTRICT ex)
|
|||
}
|
||||
|
||||
void
|
||||
deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
||||
const guint8 * s3, const guint8 * s4, const guint8 * s5, int n)
|
||||
deinterlace_line_vfir (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
|
||||
const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3,
|
||||
const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, int n)
|
||||
{
|
||||
OrcExecutor _ex, *ex = &_ex;
|
||||
static int p_inited = 0;
|
||||
|
@ -314,7 +332,6 @@ deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
|||
if (!p_inited) {
|
||||
orc_once_mutex_lock ();
|
||||
if (!p_inited) {
|
||||
OrcCompileResult result;
|
||||
|
||||
p = orc_program_new ();
|
||||
orc_program_set_name (p, "deinterlace_line_vfir");
|
||||
|
@ -362,7 +379,7 @@ deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
|||
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2,
|
||||
ORC_VAR_D1, ORC_VAR_D1);
|
||||
|
||||
result = orc_program_compile (p);
|
||||
orc_program_compile (p);
|
||||
}
|
||||
p_inited = TRUE;
|
||||
orc_once_mutex_unlock ();
|
||||
|
@ -386,8 +403,8 @@ deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
|||
/* deinterlace_line_linear */
|
||||
#ifdef DISABLE_ORC
|
||||
void
|
||||
deinterlace_line_linear (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
||||
int n)
|
||||
deinterlace_line_linear (guint8 * ORC_RESTRICT d1,
|
||||
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n)
|
||||
{
|
||||
int i;
|
||||
orc_int8 *ORC_RESTRICT ptr0;
|
||||
|
@ -447,8 +464,8 @@ _backup_deinterlace_line_linear (OrcExecutor * ORC_RESTRICT ex)
|
|||
}
|
||||
|
||||
void
|
||||
deinterlace_line_linear (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
||||
int n)
|
||||
deinterlace_line_linear (guint8 * ORC_RESTRICT d1,
|
||||
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n)
|
||||
{
|
||||
OrcExecutor _ex, *ex = &_ex;
|
||||
static int p_inited = 0;
|
||||
|
@ -458,7 +475,6 @@ deinterlace_line_linear (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
|||
if (!p_inited) {
|
||||
orc_once_mutex_lock ();
|
||||
if (!p_inited) {
|
||||
OrcCompileResult result;
|
||||
|
||||
p = orc_program_new ();
|
||||
orc_program_set_name (p, "deinterlace_line_linear");
|
||||
|
@ -470,7 +486,7 @@ deinterlace_line_linear (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
|||
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2,
|
||||
ORC_VAR_D1);
|
||||
|
||||
result = orc_program_compile (p);
|
||||
orc_program_compile (p);
|
||||
}
|
||||
p_inited = TRUE;
|
||||
orc_once_mutex_unlock ();
|
||||
|
@ -491,8 +507,9 @@ deinterlace_line_linear (guint8 * d1, const guint8 * s1, const guint8 * s2,
|
|||
/* deinterlace_line_linear_blend */
|
||||
#ifdef DISABLE_ORC
|
||||
void
|
||||
deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1,
|
||||
const guint8 * s2, const guint8 * s3, int n)
|
||||
deinterlace_line_linear_blend (guint8 * ORC_RESTRICT d1,
|
||||
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
|
||||
const guint8 * ORC_RESTRICT s3, int n)
|
||||
{
|
||||
int i;
|
||||
orc_int8 *ORC_RESTRICT ptr0;
|
||||
|
@ -519,7 +536,7 @@ deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1,
|
|||
ptr6 = (orc_int8 *) s3;
|
||||
|
||||
/* 9: loadpw */
|
||||
var38.i = 0x00000002; /* 2 or 9.88131e-324f */
|
||||
var38.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
/* 0: loadb */
|
||||
|
@ -582,7 +599,7 @@ _backup_deinterlace_line_linear_blend (OrcExecutor * ORC_RESTRICT ex)
|
|||
ptr6 = (orc_int8 *) ex->arrays[6];
|
||||
|
||||
/* 9: loadpw */
|
||||
var38.i = 0x00000002; /* 2 or 9.88131e-324f */
|
||||
var38.i = (int) 0x00000002; /* 2 or 9.88131e-324f */
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
/* 0: loadb */
|
||||
|
@ -616,8 +633,9 @@ _backup_deinterlace_line_linear_blend (OrcExecutor * ORC_RESTRICT ex)
|
|||
}
|
||||
|
||||
void
|
||||
deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1,
|
||||
const guint8 * s2, const guint8 * s3, int n)
|
||||
deinterlace_line_linear_blend (guint8 * ORC_RESTRICT d1,
|
||||
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2,
|
||||
const guint8 * ORC_RESTRICT s3, int n)
|
||||
{
|
||||
OrcExecutor _ex, *ex = &_ex;
|
||||
static int p_inited = 0;
|
||||
|
@ -627,7 +645,6 @@ deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1,
|
|||
if (!p_inited) {
|
||||
orc_once_mutex_lock ();
|
||||
if (!p_inited) {
|
||||
OrcCompileResult result;
|
||||
|
||||
p = orc_program_new ();
|
||||
orc_program_set_name (p, "deinterlace_line_linear_blend");
|
||||
|
@ -661,7 +678,7 @@ deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1,
|
|||
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1,
|
||||
ORC_VAR_D1, ORC_VAR_D1);
|
||||
|
||||
result = orc_program_compile (p);
|
||||
orc_program_compile (p);
|
||||
}
|
||||
p_inited = TRUE;
|
||||
orc_once_mutex_unlock ();
|
||||
|
@ -683,9 +700,10 @@ deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1,
|
|||
/* deinterlace_line_greedy */
|
||||
#ifdef DISABLE_ORC
|
||||
void
|
||||
deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
||||
const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int p1,
|
||||
int n)
|
||||
deinterlace_line_greedy (orc_uint8 * ORC_RESTRICT d1,
|
||||
const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
|
||||
const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
|
||||
int p1, int n)
|
||||
{
|
||||
int i;
|
||||
orc_int8 *ORC_RESTRICT ptr0;
|
||||
|
@ -728,9 +746,9 @@ deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
|||
ptr7 = (orc_int8 *) s4;
|
||||
|
||||
/* 11: loadpb */
|
||||
var44 = 0x00000080; /* 128 or 6.32404e-322f */
|
||||
var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */
|
||||
/* 13: loadpb */
|
||||
var45 = 0x00000080; /* 128 or 6.32404e-322f */
|
||||
var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */
|
||||
/* 21: loadpb */
|
||||
var46 = p1;
|
||||
/* 23: loadpb */
|
||||
|
@ -835,9 +853,9 @@ _backup_deinterlace_line_greedy (OrcExecutor * ORC_RESTRICT ex)
|
|||
ptr7 = (orc_int8 *) ex->arrays[7];
|
||||
|
||||
/* 11: loadpb */
|
||||
var44 = 0x00000080; /* 128 or 6.32404e-322f */
|
||||
var44 = (int) 0x00000080; /* 128 or 6.32404e-322f */
|
||||
/* 13: loadpb */
|
||||
var45 = 0x00000080; /* 128 or 6.32404e-322f */
|
||||
var45 = (int) 0x00000080; /* 128 or 6.32404e-322f */
|
||||
/* 21: loadpb */
|
||||
var46 = ex->params[24];
|
||||
/* 23: loadpb */
|
||||
|
@ -897,9 +915,10 @@ _backup_deinterlace_line_greedy (OrcExecutor * ORC_RESTRICT ex)
|
|||
}
|
||||
|
||||
void
|
||||
deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
||||
const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int p1,
|
||||
int n)
|
||||
deinterlace_line_greedy (orc_uint8 * ORC_RESTRICT d1,
|
||||
const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2,
|
||||
const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4,
|
||||
int p1, int n)
|
||||
{
|
||||
OrcExecutor _ex, *ex = &_ex;
|
||||
static int p_inited = 0;
|
||||
|
@ -909,7 +928,6 @@ deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
|||
if (!p_inited) {
|
||||
orc_once_mutex_lock ();
|
||||
if (!p_inited) {
|
||||
OrcCompileResult result;
|
||||
|
||||
p = orc_program_new ();
|
||||
orc_program_set_name (p, "deinterlace_line_greedy");
|
||||
|
@ -981,7 +999,7 @@ deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1,
|
|||
orc_program_append_2 (p, "maxub", 0, ORC_VAR_D1, ORC_VAR_T10, ORC_VAR_T11,
|
||||
ORC_VAR_D1);
|
||||
|
||||
result = orc_program_compile (p);
|
||||
orc_program_compile (p);
|
||||
}
|
||||
p_inited = TRUE;
|
||||
orc_once_mutex_unlock ();
|
||||
|
|
|
@ -35,6 +35,7 @@ typedef unsigned __int16 orc_uint16;
|
|||
typedef unsigned __int32 orc_uint32;
|
||||
typedef unsigned __int64 orc_uint64;
|
||||
#define ORC_UINT64_C(x) (x##Ui64)
|
||||
#define inline __inline
|
||||
#else
|
||||
#include <limits.h>
|
||||
typedef signed char orc_int8;
|
||||
|
@ -57,10 +58,19 @@ typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
|
|||
typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
|
||||
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
|
||||
#endif
|
||||
void deinterlace_line_vfir (guint8 * d1, const guint8 * s1, const guint8 * s2, const guint8 * s3, const guint8 * s4, const guint8 * s5, int n);
|
||||
void deinterlace_line_linear (guint8 * d1, const guint8 * s1, const guint8 * s2, int n);
|
||||
void deinterlace_line_linear_blend (guint8 * d1, const guint8 * s1, const guint8 * s2, const guint8 * s3, int n);
|
||||
void deinterlace_line_greedy (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, int p1, int n);
|
||||
#ifndef ORC_RESTRICT
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define ORC_RESTRICT restrict
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define ORC_RESTRICT __restrict__
|
||||
#else
|
||||
#define ORC_RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
void deinterlace_line_vfir (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, int n);
|
||||
void deinterlace_line_linear (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n);
|
||||
void deinterlace_line_linear_blend (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, int n);
|
||||
void deinterlace_line_greedy (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, int p1, int n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#ifndef DISABLE_ORC
|
||||
#include <orc/orc.h>
|
||||
#endif
|
||||
#include <glib.h>
|
||||
|
||||
#ifndef _ORC_INTEGER_TYPEDEFS_
|
||||
|
@ -32,6 +29,7 @@ typedef unsigned __int16 orc_uint16;
|
|||
typedef unsigned __int32 orc_uint32;
|
||||
typedef unsigned __int64 orc_uint64;
|
||||
#define ORC_UINT64_C(x) (x##Ui64)
|
||||
#define inline __inline
|
||||
#else
|
||||
#include <limits.h>
|
||||
typedef signed char orc_int8;
|
||||
|
@ -71,8 +69,20 @@ typedef union
|
|||
orc_int16 x4[4];
|
||||
} orc_union64;
|
||||
#endif
|
||||
#ifndef ORC_RESTRICT
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define ORC_RESTRICT restrict
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define ORC_RESTRICT __restrict__
|
||||
#else
|
||||
#define ORC_RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void orc_splat_u32 (guint32 * d1, int p1, int n);
|
||||
#ifndef DISABLE_ORC
|
||||
#include <orc/orc.h>
|
||||
#endif
|
||||
void orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
|
||||
|
||||
|
||||
/* begin Orc C target preamble */
|
||||
|
@ -106,6 +116,7 @@ void orc_splat_u32 (guint32 * d1, int p1, int n);
|
|||
#define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))
|
||||
#define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))
|
||||
#define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))
|
||||
#ifndef ORC_RESTRICT
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define ORC_RESTRICT restrict
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
|
@ -113,6 +124,7 @@ void orc_splat_u32 (guint32 * d1, int p1, int n);
|
|||
#else
|
||||
#define ORC_RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
/* end Orc C target preamble */
|
||||
|
||||
|
||||
|
@ -120,7 +132,7 @@ void orc_splat_u32 (guint32 * d1, int p1, int n);
|
|||
/* orc_splat_u32 */
|
||||
#ifdef DISABLE_ORC
|
||||
void
|
||||
orc_splat_u32 (guint32 * d1, int p1, int n)
|
||||
orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n)
|
||||
{
|
||||
int i;
|
||||
orc_union32 *ORC_RESTRICT ptr0;
|
||||
|
@ -166,7 +178,7 @@ _backup_orc_splat_u32 (OrcExecutor * ORC_RESTRICT ex)
|
|||
}
|
||||
|
||||
void
|
||||
orc_splat_u32 (guint32 * d1, int p1, int n)
|
||||
orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n)
|
||||
{
|
||||
OrcExecutor _ex, *ex = &_ex;
|
||||
static int p_inited = 0;
|
||||
|
@ -176,7 +188,6 @@ orc_splat_u32 (guint32 * d1, int p1, int n)
|
|||
if (!p_inited) {
|
||||
orc_once_mutex_lock ();
|
||||
if (!p_inited) {
|
||||
OrcCompileResult result;
|
||||
|
||||
p = orc_program_new ();
|
||||
orc_program_set_name (p, "orc_splat_u32");
|
||||
|
@ -187,7 +198,7 @@ orc_splat_u32 (guint32 * d1, int p1, int n)
|
|||
orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
|
||||
ORC_VAR_D1);
|
||||
|
||||
result = orc_program_compile (p);
|
||||
orc_program_compile (p);
|
||||
}
|
||||
p_inited = TRUE;
|
||||
orc_once_mutex_unlock ();
|
||||
|
|
|
@ -35,6 +35,7 @@ typedef unsigned __int16 orc_uint16;
|
|||
typedef unsigned __int32 orc_uint32;
|
||||
typedef unsigned __int64 orc_uint64;
|
||||
#define ORC_UINT64_C(x) (x##Ui64)
|
||||
#define inline __inline
|
||||
#else
|
||||
#include <limits.h>
|
||||
typedef signed char orc_int8;
|
||||
|
@ -57,7 +58,16 @@ typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
|
|||
typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
|
||||
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
|
||||
#endif
|
||||
void orc_splat_u32 (guint32 * d1, int p1, int n);
|
||||
#ifndef ORC_RESTRICT
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define ORC_RESTRICT restrict
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define ORC_RESTRICT __restrict__
|
||||
#else
|
||||
#define ORC_RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
void orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -58,13 +58,22 @@ typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
|
|||
typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
|
||||
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
|
||||
#endif
|
||||
void orc_splat_u32 (guint32 * d1, int p1, int n);
|
||||
void orc_memcpy_u32 (guint32 * d1, const guint32 * s1, int n);
|
||||
void orc_blend_u8 (guint8 * d1, int d1_stride, const guint8 * s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_blend_argb (guint8 * d1, int d1_stride, const guint8 * s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_blend_bgra (guint8 * d1, int d1_stride, const guint8 * s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_overlay_argb (guint8 * d1, int d1_stride, const guint8 * s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_overlay_bgra (guint8 * d1, int d1_stride, const guint8 * s1, int s1_stride, int p1, int n, int m);
|
||||
#ifndef ORC_RESTRICT
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define ORC_RESTRICT restrict
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define ORC_RESTRICT __restrict__
|
||||
#else
|
||||
#define ORC_RESTRICT
|
||||
#endif
|
||||
#endif
|
||||
void orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
|
||||
void orc_memcpy_u32 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int n);
|
||||
void orc_blend_u8 (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_blend_argb (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_blend_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_overlay_argb (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
|
||||
void orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, const guint8 * ORC_RESTRICT s1, int s1_stride, int p1, int n, int m);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue