Commit 82a79151 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

gst: update disted orc backup code

parent 09e01255
......@@ -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,14 +69,31 @@ 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 add_int32 (gint32 * d1, const gint32 * s1, int n);
void add_int16 (gint16 * d1, const gint16 * s1, int n);
void add_int8 (gint8 * d1, const gint8 * s1, int n);
void add_uint32 (guint32 * d1, const guint32 * s1, int n);
void add_uint16 (guint16 * d1, const guint16 * s1, int n);
void add_uint8 (guint8 * d1, const guint8 * s1, int n);
void add_float32 (float *d1, const float *s1, int n);
#ifndef DISABLE_ORC
#include <orc/orc.h>
#endif
void add_int32 (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1,
int n);
void add_int16 (gint16 * ORC_RESTRICT d1, const gint16 * ORC_RESTRICT s1,
int n);
void add_int8 (gint8 * ORC_RESTRICT d1, const gint8 * ORC_RESTRICT s1, int n);
void add_uint32 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1,
int n);
void add_uint16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1,
int n);
void add_uint8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
int n);
void add_float32 (float *ORC_RESTRICT d1, const float *ORC_RESTRICT s1, int n);
void gst_adder_orc_init (void);
......@@ -114,6 +129,7 @@ void gst_adder_orc_init (void);
#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 +137,7 @@ void gst_adder_orc_init (void);
#else
#define ORC_RESTRICT
#endif
#endif
/* end Orc C target preamble */
......@@ -128,7 +145,7 @@ void gst_adder_orc_init (void);
/* add_int32 */
#ifdef DISABLE_ORC
void
add_int32 (gint32 * d1, const gint32 * s1, int n)
add_int32 (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
......@@ -185,7 +202,7 @@ _backup_add_int32 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_add_int32;
void
add_int32 (gint32 * d1, const gint32 * s1, int n)
add_int32 (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_add_int32;
......@@ -206,7 +223,7 @@ add_int32 (gint32 * d1, const gint32 * s1, int n)
/* add_int16 */
#ifdef DISABLE_ORC
void
add_int16 (gint16 * d1, const gint16 * s1, int n)
add_int16 (gint16 * ORC_RESTRICT d1, const gint16 * ORC_RESTRICT s1, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
......@@ -263,7 +280,7 @@ _backup_add_int16 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_add_int16;
void
add_int16 (gint16 * d1, const gint16 * s1, int n)
add_int16 (gint16 * ORC_RESTRICT d1, const gint16 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_add_int16;
......@@ -284,7 +301,7 @@ add_int16 (gint16 * d1, const gint16 * s1, int n)
/* add_int8 */
#ifdef DISABLE_ORC
void
add_int8 (gint8 * d1, const gint8 * s1, int n)
add_int8 (gint8 * ORC_RESTRICT d1, const gint8 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
......@@ -341,7 +358,7 @@ _backup_add_int8 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_add_int8;
void
add_int8 (gint8 * d1, const gint8 * s1, int n)
add_int8 (gint8 * ORC_RESTRICT d1, const gint8 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_add_int8;
......@@ -362,7 +379,7 @@ add_int8 (gint8 * d1, const gint8 * s1, int n)
/* add_uint32 */
#ifdef DISABLE_ORC
void
add_uint32 (guint32 * d1, const guint32 * s1, int n)
add_uint32 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
......@@ -423,7 +440,7 @@ _backup_add_uint32 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_add_uint32;
void
add_uint32 (guint32 * d1, const guint32 * s1, int n)
add_uint32 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_add_uint32;
......@@ -444,7 +461,7 @@ add_uint32 (guint32 * d1, const guint32 * s1, int n)
/* add_uint16 */
#ifdef DISABLE_ORC
void
add_uint16 (guint16 * d1, const guint16 * s1, int n)
add_uint16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
......@@ -501,7 +518,7 @@ _backup_add_uint16 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_add_uint16;
void
add_uint16 (guint16 * d1, const guint16 * s1, int n)
add_uint16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_add_uint16;
......@@ -522,7 +539,7 @@ add_uint16 (guint16 * d1, const guint16 * s1, int n)
/* add_uint8 */
#ifdef DISABLE_ORC
void
add_uint8 (guint8 * d1, const guint8 * s1, int n)
add_uint8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
......@@ -579,7 +596,7 @@ _backup_add_uint8 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_add_uint8;
void
add_uint8 (guint8 * d1, const guint8 * s1, int n)
add_uint8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_add_uint8;
......@@ -600,7 +617,7 @@ add_uint8 (guint8 * d1, const guint8 * s1, int n)
/* add_float32 */
#ifdef DISABLE_ORC
void
add_float32 (float *d1, const float *s1, int n)
add_float32 (float *ORC_RESTRICT d1, const float *ORC_RESTRICT s1, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
......@@ -673,7 +690,7 @@ _backup_add_float32 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_add_float32;
void
add_float32 (float *d1, const float *s1, int n)
add_float32 (float *ORC_RESTRICT d1, const float *ORC_RESTRICT s1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_add_float32;
......@@ -698,7 +715,6 @@ gst_adder_orc_init (void)
{
/* add_int32 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "add_int32");
......@@ -709,14 +725,13 @@ gst_adder_orc_init (void)
orc_program_append_2 (p, "addssl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_add_int32 = p;
}
{
/* add_int16 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "add_int16");
......@@ -727,14 +742,13 @@ gst_adder_orc_init (void)
orc_program_append_2 (p, "addssw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_add_int16 = p;
}
{
/* add_int8 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "add_int8");
......@@ -745,14 +759,13 @@ gst_adder_orc_init (void)
orc_program_append_2 (p, "addssb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_add_int8 = p;
}
{
/* add_uint32 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "add_uint32");
......@@ -763,14 +776,13 @@ gst_adder_orc_init (void)
orc_program_append_2 (p, "addusl", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_add_uint32 = p;
}
{
/* add_uint16 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "add_uint16");
......@@ -781,14 +793,13 @@ gst_adder_orc_init (void)
orc_program_append_2 (p, "addusw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_add_uint16 = p;
}
{
/* add_uint8 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "add_uint8");
......@@ -799,14 +810,13 @@ gst_adder_orc_init (void)
orc_program_append_2 (p, "addusb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_add_uint8 = p;
}
{
/* add_float32 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "add_float32");
......@@ -817,7 +827,7 @@ gst_adder_orc_init (void)
orc_program_append_2 (p, "addf", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_add_float32 = p;
}
......
......@@ -37,6 +37,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;
......@@ -59,13 +60,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 add_int32 (gint32 * d1, const gint32 * s1, int n);
void add_int16 (gint16 * d1, const gint16 * s1, int n);
void add_int8 (gint8 * d1, const gint8 * s1, int n);
void add_uint32 (guint32 * d1, const guint32 * s1, int n);
void add_uint16 (guint16 * d1, const guint16 * s1, int n);
void add_uint8 (guint8 * d1, const guint8 * s1, int n);
void add_float32 (float * d1, const float * s1, 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 add_int32 (gint32 * ORC_RESTRICT d1, const gint32 * ORC_RESTRICT s1, int n);
void add_int16 (gint16 * ORC_RESTRICT d1, const gint16 * ORC_RESTRICT s1, int n);
void add_int8 (gint8 * ORC_RESTRICT d1, const gint8 * ORC_RESTRICT s1, int n);
void add_uint32 (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int n);
void add_uint16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1, int n);
void add_uint8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n);
void add_float32 (float * ORC_RESTRICT d1, const float * ORC_RESTRICT s1, int n);
#ifdef __cplusplus
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -60,21 +60,30 @@ 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_merge_linear_u8 (orc_uint8 * d1, const orc_uint8 * s1, const orc_uint8 * s2, int p1, int n);
void orc_merge_linear_u16 (orc_uint16 * d1, const orc_uint16 * s1, const orc_uint16 * s2, int p1, int p2, int n);
void orc_splat_u16 (orc_uint16 * d1, int p1, int n);
void orc_splat_u32 (orc_uint32 * d1, int p1, int n);
void orc_splat_u64 (orc_uint64 * d1, orc_int64 p1, int n);
void orc_downsample_u8 (guint8 * d1, const guint8 * s1, int n);
void orc_downsample_u16 (guint16 * d1, const guint16 * s1, int n);
void gst_videoscale_orc_downsample_u32 (guint8 * d1, const guint8 * s1, int n);
void gst_videoscale_orc_downsample_yuyv (guint8 * d1, const guint8 * s1, int n);
void gst_videoscale_orc_resample_nearest_u8 (guint8 * d1, const guint8 * s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_bilinear_u8 (guint8 * d1, const guint8 * s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_nearest_u32 (guint8 * d1, const guint8 * s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_bilinear_u32 (guint8 * d1, const guint8 * s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_merge_bilinear_u32 (guint8 * d1, guint8 * d2, const guint8 * s1, const guint8 * s2, int p1, int p2, int p3, int n);
void gst_videoscale_orc_merge_bicubic_u8 (guint8 * d1, const guint8 * s1, const guint8 * s2, const guint8 * s3, const guint8 * s4, int p1, int p2, int p3, int p4, 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_merge_linear_u8 (orc_uint8 * ORC_RESTRICT d1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int p1, int n);
void orc_merge_linear_u16 (orc_uint16 * ORC_RESTRICT d1, const orc_uint16 * ORC_RESTRICT s1, const orc_uint16 * ORC_RESTRICT s2, int p1, int p2, int n);
void orc_splat_u16 (orc_uint16 * ORC_RESTRICT d1, int p1, int n);
void orc_splat_u32 (orc_uint32 * ORC_RESTRICT d1, int p1, int n);
void orc_splat_u64 (orc_uint64 * ORC_RESTRICT d1, orc_int64 p1, int n);
void orc_downsample_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n);
void orc_downsample_u16 (guint16 * ORC_RESTRICT d1, const guint16 * ORC_RESTRICT s1, int n);
void gst_videoscale_orc_downsample_u32 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n);
void gst_videoscale_orc_downsample_yuyv (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int n);
void gst_videoscale_orc_resample_nearest_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_bilinear_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_nearest_u32 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_bilinear_u32 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, int p1, int p2, int n);
void gst_videoscale_orc_resample_merge_bilinear_u32 (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int p1, int p2, int p3, int n);
void gst_videoscale_orc_merge_bicubic_u8 (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, int p1, int p2, int p3, int p4, 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,11 +69,23 @@ 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 gst_orc_splat_u8 (guint8 * d1, int p1, int n);
void gst_orc_splat_s16 (gint8 * d1, int p1, int n);
void gst_orc_splat_u16 (guint8 * d1, int p1, int n);
void gst_orc_splat_u32 (guint8 * d1, int p1, int n);
#ifndef DISABLE_ORC
#include <orc/orc.h>
#endif
void gst_orc_splat_u8 (guint8 * ORC_RESTRICT d1, int p1, int n);
void gst_orc_splat_s16 (gint8 * ORC_RESTRICT d1, int p1, int n);
void gst_orc_splat_u16 (guint8 * ORC_RESTRICT d1, int p1, int n);
void gst_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n);
void gst_videotestsrc_orc_init (void);
......@@ -111,6 +121,7 @@ void gst_videotestsrc_orc_init (void);
#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
......@@ -118,6 +129,7 @@ void gst_videotestsrc_orc_init (void);
#else
#define ORC_RESTRICT
#endif
#endif
/* end Orc C target preamble */
......@@ -125,7 +137,7 @@ void gst_videotestsrc_orc_init (void);
/* gst_orc_splat_u8 */
#ifdef DISABLE_ORC
void
gst_orc_splat_u8 (guint8 * d1, int p1, int n)
gst_orc_splat_u8 (guint8 * ORC_RESTRICT d1, int p1, int n)
{
int i;
orc_int8 *ORC_RESTRICT ptr0;
......@@ -172,7 +184,7 @@ _backup_gst_orc_splat_u8 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_gst_orc_splat_u8;
void
gst_orc_splat_u8 (guint8 * d1, int p1, int n)
gst_orc_splat_u8 (guint8 * ORC_RESTRICT d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_gst_orc_splat_u8;
......@@ -193,7 +205,7 @@ gst_orc_splat_u8 (guint8 * d1, int p1, int n)
/* gst_orc_splat_s16 */
#ifdef DISABLE_ORC
void
gst_orc_splat_s16 (gint8 * d1, int p1, int n)
gst_orc_splat_s16 (gint8 * ORC_RESTRICT d1, int p1, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
......@@ -240,7 +252,7 @@ _backup_gst_orc_splat_s16 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_gst_orc_splat_s16;
void
gst_orc_splat_s16 (gint8 * d1, int p1, int n)
gst_orc_splat_s16 (gint8 * ORC_RESTRICT d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_gst_orc_splat_s16;
......@@ -261,7 +273,7 @@ gst_orc_splat_s16 (gint8 * d1, int p1, int n)
/* gst_orc_splat_u16 */
#ifdef DISABLE_ORC
void
gst_orc_splat_u16 (guint8 * d1, int p1, int n)
gst_orc_splat_u16 (guint8 * ORC_RESTRICT d1, int p1, int n)
{
int i;
orc_union16 *ORC_RESTRICT ptr0;
......@@ -308,7 +320,7 @@ _backup_gst_orc_splat_u16 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_gst_orc_splat_u16;
void
gst_orc_splat_u16 (guint8 * d1, int p1, int n)
gst_orc_splat_u16 (guint8 * ORC_RESTRICT d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_gst_orc_splat_u16;
......@@ -329,7 +341,7 @@ gst_orc_splat_u16 (guint8 * d1, int p1, int n)
/* gst_orc_splat_u32 */
#ifdef DISABLE_ORC
void
gst_orc_splat_u32 (guint8 * d1, int p1, int n)
gst_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n)
{
int i;
orc_union32 *ORC_RESTRICT ptr0;
......@@ -376,7 +388,7 @@ _backup_gst_orc_splat_u32 (OrcExecutor * ORC_RESTRICT ex)
static OrcProgram *_orc_program_gst_orc_splat_u32;
void
gst_orc_splat_u32 (guint8 * d1, int p1, int n)
gst_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_gst_orc_splat_u32;
......@@ -401,7 +413,6 @@ gst_videotestsrc_orc_init (void)
{
/* gst_orc_splat_u8 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "gst_orc_splat_u8");
......@@ -412,14 +423,13 @@ gst_videotestsrc_orc_init (void)
orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_gst_orc_splat_u8 = p;
}
{
/* gst_orc_splat_s16 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "gst_orc_splat_s16");
......@@ -430,14 +440,13 @@ gst_videotestsrc_orc_init (void)
orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_gst_orc_splat_s16 = p;
}
{
/* gst_orc_splat_u16 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "gst_orc_splat_u16");
......@@ -448,14 +457,13 @@ gst_videotestsrc_orc_init (void)
orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
ORC_VAR_D1);
result = orc_program_compile (p);
orc_program_compile (p);
_orc_program_gst_orc_splat_u16 = p;
}
{
/* gst_orc_splat_u32 */
OrcProgram *p;
OrcCompileResult result;
p = orc_program_new ();
orc_program_set_name (p, "gst_orc_splat_u32");
......@@ -466,7 +474,7 @@ gst_videotestsrc_orc_init (void)
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);
_orc_program_gst_orc_splat_u32 = p;
}
......
......@@ -37,6 +37,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;
......@@ -59,10 +60,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 gst_orc_splat_u8 (guint8 * d1, int p1, int n);
void gst_orc_splat_s16 (gint8 * d1, int p1, int n);
void gst_orc_splat_u16 (guint8 * d1, int p1, int n);
void gst_orc_splat_u32 (guint8 * 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 gst_orc_splat_u8 (guint8 * ORC_RESTRICT d1, int p1, int n);
void gst_orc_splat_s16 (gint8 * ORC_RESTRICT d1, int p1, int n);
void gst_orc_splat_u16 (guint8 * ORC_RESTRICT d1, int p1, int n);
void gst_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n);
#ifdef __cplusplus
}
......
This diff is collapsed.
......@@ -37,6 +37,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;
......@@ -59,24 +60,33 @@ 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_scalarmultiply_f64_ns (double * d1, double p1, int n);
void orc_scalarmultiply_f32_ns (float * d1, float p1, int n);
void orc_process_int32 (gint32 * d1, int p1, int n);
void orc_process_int32_clamp (gint32 * d1, int p1, int n);
void orc_process_int16 (gint16 * d1, int p1, int n);
void orc_process_int16_clamp (gint16 * d1, int p1, int n);
void orc_process_int8 (gint8 * d1, int p1, int n);
void orc_process_int8_clamp (gint8 * d1, int p1, int n);
void orc_memset_f64 (gdouble * d1, double p1, int n);
void orc_prepare_volumes (gdouble * d1, const gboolean * s1, int n);
void orc_process_controlled_f64_1ch (gdouble * d1, const gdouble * s1, int n);
void orc_process_controlled_f32_1ch (gfloat * d1, const gdouble * s1, int n);
void orc_process_controlled_f32_2ch (gfloat * d1, const gdouble * s1, int n);
void orc_process_controlled_int32_1ch (gint32 * d1, const gdouble * s1, int n);
void orc_process_controlled_int16_1ch (gint16 * d1, const gdouble * s1, int n);
void orc_process_controlled_int16_2ch (gint16 * d1, const gdouble * s1, int n);
void orc_process_controlled_int8_1ch (gint8 * d1, const gdouble * s1, int n);
void orc_process_controlled_int8_2ch (gint8 * d1, const gdouble * s1, 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_scalarmultiply_f64_ns (double * ORC_RESTRICT d1, double p1, int n);
void orc_scalarmultiply_f32_ns (float * ORC_RESTRICT d1, float p1, int n);
void orc_process_int32 (gint32 * ORC_RESTRICT d1, int p1, int n);
void orc_process_int32_clamp (gint32 * ORC_RESTRICT d1, int p1, int n);
void orc_process_int16 (gint16 * ORC_RESTRICT d1, int p1, int n);
void orc_process_int16_clamp (gint16 * ORC_RESTRICT d1, int p1, int n);
void orc_process_int8 (gint8 * ORC_RESTRICT d1, int p1, int n);
void orc_process_int8_clamp (gint8 * ORC_RESTRICT d1, int p1, int n);
void orc_memset_f64 (gdouble * ORC_RESTRICT d1, double p1, int n);
void orc_prepare_volumes (gdouble * ORC_RESTRICT d1, const gboolean * ORC_RESTRICT s1, int n);
void orc_process_controlled_f64_1ch (gdouble * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);
void orc_process_controlled_f32_1ch (gfloat * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);
void orc_process_controlled_f32_2ch (gfloat * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);
void orc_process_controlled_int32_1ch (gint32 * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);
void orc_process_controlled_int16_1ch (gint16 * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);
void orc_process_controlled_int16_2ch (gint16 * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);
void orc_process_controlled_int8_1ch (gint8 * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);
void orc_process_controlled_int8_2ch (gint8 * ORC_RESTRICT d1, const gdouble * ORC_RESTRICT s1, int n);