orc: Update pregenerated files

Fixes -Wtype-limits on gstbayer.orc when emulating convuuslw.

Regenerated Orc files use OrcOnce, which increases the minimum version to 0.4.34.

See https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/212 (ORC_MIN)

See https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/238 (AVX2 convussql)

See 8a86d51753 (OrcOnce)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9067>
This commit is contained in:
L. E. Segovia 2025-05-23 16:02:43 -03:00 committed by GStreamer Marge Bot
parent 00dfff821a
commit 7b8d4c0974
34 changed files with 14948 additions and 16760 deletions

View File

@ -173,7 +173,7 @@ endif
orc_option = get_option('orc') orc_option = get_option('orc')
# There is a check below to keep this in sync with subprojects/gst-plugins-base/meson.build # There is a check below to keep this in sync with subprojects/gst-plugins-base/meson.build
orc_req = '>= 0.4.24' orc_req = '>= 0.4.34'
orc_source_option = get_option('orc-source') orc_source_option = get_option('orc-source')
orc_subproject = disabler() orc_subproject = disabler()
if orc_option.allowed() if orc_option.allowed()

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,7 @@
#include <glib.h> #include <glib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C" {
{
#endif #endif
@ -16,70 +15,55 @@ extern "C"
#define _ORC_INTEGER_TYPEDEFS_ #define _ORC_INTEGER_TYPEDEFS_
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <stdint.h> #include <stdint.h>
typedef int8_t orc_int8; typedef int8_t orc_int8;
typedef int16_t orc_int16; typedef int16_t orc_int16;
typedef int32_t orc_int32; typedef int32_t orc_int32;
typedef int64_t orc_int64; typedef int64_t orc_int64;
typedef uint8_t orc_uint8; typedef uint8_t orc_uint8;
typedef uint16_t orc_uint16; typedef uint16_t orc_uint16;
typedef uint32_t orc_uint32; typedef uint32_t orc_uint32;
typedef uint64_t orc_uint64; typedef uint64_t orc_uint64;
#define ORC_UINT64_C(x) UINT64_C(x) #define ORC_UINT64_C(x) UINT64_C(x)
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
typedef signed __int8 orc_int8; typedef signed __int8 orc_int8;
typedef signed __int16 orc_int16; typedef signed __int16 orc_int16;
typedef signed __int32 orc_int32; typedef signed __int32 orc_int32;
typedef signed __int64 orc_int64; typedef signed __int64 orc_int64;
typedef unsigned __int8 orc_uint8; typedef unsigned __int8 orc_uint8;
typedef unsigned __int16 orc_uint16; typedef unsigned __int16 orc_uint16;
typedef unsigned __int32 orc_uint32; typedef unsigned __int32 orc_uint32;
typedef unsigned __int64 orc_uint64; typedef unsigned __int64 orc_uint64;
#define ORC_UINT64_C(x) (x##Ui64) #define ORC_UINT64_C(x) (x##Ui64)
#define inline __inline #define inline __inline
#else #else
#include <limits.h> #include <limits.h>
typedef signed char orc_int8; typedef signed char orc_int8;
typedef short orc_int16; typedef short orc_int16;
typedef int orc_int32; typedef int orc_int32;
typedef unsigned char orc_uint8; typedef unsigned char orc_uint8;
typedef unsigned short orc_uint16; typedef unsigned short orc_uint16;
typedef unsigned int orc_uint32; typedef unsigned int orc_uint32;
#if INT_MAX == LONG_MAX #if INT_MAX == LONG_MAX
typedef long long orc_int64; typedef long long orc_int64;
typedef unsigned long long orc_uint64; typedef unsigned long long orc_uint64;
#define ORC_UINT64_C(x) (x##ULL) #define ORC_UINT64_C(x) (x##ULL)
#else #else
typedef long orc_int64; typedef long orc_int64;
typedef unsigned long orc_uint64; typedef unsigned long orc_uint64;
#define ORC_UINT64_C(x) (x##UL) #define ORC_UINT64_C(x) (x##UL)
#endif #endif
#endif #endif
typedef union 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;
orc_int16 i; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
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 #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -97,95 +81,31 @@ extern "C"
#endif #endif
#endif #endif
void bayer_orc_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1, void bayer_orc_horiz_upsample_unaligned (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n); void bayer_orc_horiz_upsample (guint8 * ORC_RESTRICT d1, guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n);
void bayer_orc_horiz_upsample (guint8 * ORC_RESTRICT d1, void bayer_orc_merge_bg_bgra (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, const guint8 * ORC_RESTRICT s6, int n);
guint8 * ORC_RESTRICT d2, const guint8 * ORC_RESTRICT s1, int n); void bayer_orc_merge_gr_bgra (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, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_bg_bgra (guint8 * ORC_RESTRICT d1, void bayer_orc_merge_bg_abgr (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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, void bayer_orc_merge_gr_abgr (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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, void bayer_orc_merge_bg_rgba (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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); void bayer_orc_merge_gr_rgba (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, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_bgra (guint8 * ORC_RESTRICT d1, void bayer_orc_merge_bg_argb (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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, void bayer_orc_merge_gr_argb (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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, void bayer16_orc_horiz_upsample_le (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint16 * ORC_RESTRICT s1, int n);
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); void bayer16_orc_horiz_upsample_be (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, const guint16 * ORC_RESTRICT s1, int n);
void bayer_orc_merge_bg_abgr (guint8 * ORC_RESTRICT d1, void bayer16_orc_merge_bg_bgra (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, void bayer16_orc_merge_gr_bgra (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, void bayer16_orc_merge_bg_abgr (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); void bayer16_orc_merge_gr_abgr (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_abgr (guint8 * ORC_RESTRICT d1, void bayer16_orc_merge_bg_rgba (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, void bayer16_orc_merge_gr_rgba (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, void bayer16_orc_merge_bg_argb (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n); void bayer16_orc_merge_gr_argb (guint16 * ORC_RESTRICT d1, guint16 * ORC_RESTRICT d2, 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, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_bg_rgba (guint8 * ORC_RESTRICT d1, void bayer16to16_orc_reorder (guint8 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n);
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, void bayer16to8_orc_reorder (guint8 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1, int n);
const guint8 * ORC_RESTRICT s3, const guint8 * ORC_RESTRICT s4, void bayer8to16_orc_reorder (guint8 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1, int n);
const guint8 * ORC_RESTRICT s5, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_rgba (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, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_bg_argb (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, const guint8 * ORC_RESTRICT s6, int n);
void bayer_orc_merge_gr_argb (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, const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_horiz_upsample_le (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, const guint16 * ORC_RESTRICT s1, int n);
void bayer16_orc_horiz_upsample_be (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, const guint16 * ORC_RESTRICT s1, int n);
void bayer16_orc_merge_bg_bgra (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_merge_gr_bgra (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_merge_bg_abgr (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_merge_gr_abgr (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_merge_bg_rgba (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_merge_gr_rgba (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_merge_bg_argb (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16_orc_merge_gr_argb (guint16 * ORC_RESTRICT d1,
guint16 * ORC_RESTRICT d2, 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,
const guint8 * ORC_RESTRICT s6, int n);
void bayer16to16_orc_reorder (guint8 * ORC_RESTRICT d1,
const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1,
int n);
void bayer16to8_orc_reorder (guint8 * ORC_RESTRICT d1,
const guint32 * ORC_RESTRICT s1, const guint32 * ORC_RESTRICT s2, int p1,
int n);
void bayer8to16_orc_reorder (guint8 * ORC_RESTRICT d1,
const guint32 * ORC_RESTRICT s1, int n);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -67,6 +67,7 @@ typedef union
orc_int32 x2[2]; orc_int32 x2[2];
float x2f[2]; float x2f[2];
orc_int16 x4[4]; orc_int16 x4[4];
orc_int8 x8[8];
} orc_union64; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
@ -74,6 +75,8 @@ typedef union
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -114,6 +117,7 @@ void fieldanalysis_orc_opposite_parity_5_tap_planar_yuv (guint32 *
/* begin Orc C target preamble */ /* begin Orc C target preamble */
#include <math.h>
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
@ -149,6 +153,8 @@ void fieldanalysis_orc_opposite_parity_5_tap_planar_yuv (guint32 *
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -270,66 +276,61 @@ fieldanalysis_orc_same_parity_sad_planar_yuv (guint32 * ORC_RESTRICT a1,
int p1, int n) int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 44, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115, 1, 9, 44, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115,
95, 111, 114, 99, 95, 115, 97, 109, 101, 95, 112, 97, 114, 105, 116, 95, 111, 114, 99, 95, 115, 97, 109, 101, 95, 112, 97, 114, 105, 116, 121,
121, 95, 115, 97, 100, 95, 112, 108, 97, 110, 97, 114, 95, 121, 117, 118, 12,
95, 115, 97, 100, 95, 112, 108, 97, 110, 97, 114, 95, 121, 117, 118, 12, 1, 1, 12, 1, 1, 13, 4, 16, 4, 20, 2, 20, 2, 20, 4, 20,
1, 1, 12, 1, 1, 13, 4, 16, 4, 20, 2, 20, 2, 20, 4, 20, 4, 150, 32, 4, 150, 33, 5, 98, 32, 32, 33, 69, 32, 32, 154, 34,
4, 150, 32, 4, 150, 33, 5, 98, 32, 32, 33, 69, 32, 32, 154, 34, 32, 111, 35, 34, 24, 106, 34, 34, 35, 181, 12, 34, 2, 0,
32, 111, 35, 34, 24, 106, 34, 34, 35, 181, 12, 34, 2, 0, };
}; p = orc_program_new_from_static_bytecode (bc);
p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p,
orc_program_set_backup_function (p, _backup_fieldanalysis_orc_same_parity_sad_planar_yuv);
_backup_fieldanalysis_orc_same_parity_sad_planar_yuv);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "fieldanalysis_orc_same_parity_sad_planar_yuv"); orc_program_set_name (p, "fieldanalysis_orc_same_parity_sad_planar_yuv");
orc_program_set_backup_function (p, orc_program_set_backup_function (p,
_backup_fieldanalysis_orc_same_parity_sad_planar_yuv); _backup_fieldanalysis_orc_same_parity_sad_planar_yuv);
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s2");
orc_program_add_accumulator (p, 4, "a1"); orc_program_add_accumulator (p, 4, "a1");
orc_program_add_parameter (p, 4, "p1"); orc_program_add_parameter (p, 4, "p1");
orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 4, "t3"); orc_program_add_temporary (p, 4, "t3");
orc_program_add_temporary (p, 4, "t4"); orc_program_add_temporary (p, 4, "t4");
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_P1, orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_P1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "andl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, orc_program_append_2 (p, "andl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1, orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -453,65 +454,59 @@ fieldanalysis_orc_same_parity_ssd_planar_yuv (guint32 * ORC_RESTRICT a1,
int p1, int n) int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 44, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115, 1, 9, 44, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115,
95, 111, 114, 99, 95, 115, 97, 109, 101, 95, 112, 97, 114, 105, 116, 95, 111, 114, 99, 95, 115, 97, 109, 101, 95, 112, 97, 114, 105, 116, 121,
121, 95, 115, 115, 100, 95, 112, 108, 97, 110, 97, 114, 95, 121, 117, 118, 12,
95, 115, 115, 100, 95, 112, 108, 97, 110, 97, 114, 95, 121, 117, 118, 1, 1, 12, 1, 1, 13, 4, 16, 4, 20, 2, 20, 2, 20, 4, 20,
12, 4, 150, 32, 4, 150, 33, 5, 98, 32, 32, 33, 176, 34, 32, 32, 111,
1, 1, 12, 1, 1, 13, 4, 16, 4, 20, 2, 20, 2, 20, 4, 20, 35, 34, 24, 106, 34, 34, 35, 181, 12, 34, 2, 0,
4, 150, 32, 4, 150, 33, 5, 98, 32, 32, 33, 176, 34, 32, 32, 111, };
35, 34, 24, 106, 34, 34, 35, 181, 12, 34, 2, 0, p = orc_program_new_from_static_bytecode (bc);
}; orc_program_set_backup_function (p,
p = orc_program_new_from_static_bytecode (bc); _backup_fieldanalysis_orc_same_parity_ssd_planar_yuv);
orc_program_set_backup_function (p,
_backup_fieldanalysis_orc_same_parity_ssd_planar_yuv);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "fieldanalysis_orc_same_parity_ssd_planar_yuv"); orc_program_set_name (p, "fieldanalysis_orc_same_parity_ssd_planar_yuv");
orc_program_set_backup_function (p, orc_program_set_backup_function (p,
_backup_fieldanalysis_orc_same_parity_ssd_planar_yuv); _backup_fieldanalysis_orc_same_parity_ssd_planar_yuv);
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s2");
orc_program_add_accumulator (p, 4, "a1"); orc_program_add_accumulator (p, 4, "a1");
orc_program_add_parameter (p, 4, "p1"); orc_program_add_parameter (p, 4, "p1");
orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 4, "t3"); orc_program_add_temporary (p, 4, "t3");
orc_program_add_temporary (p, 4, "t4"); orc_program_add_temporary (p, 4, "t4");
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_T1, orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_T1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_P1, orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_P1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "andl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, orc_program_append_2 (p, "andl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1, orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -745,100 +740,94 @@ fieldanalysis_orc_same_parity_3_tap_planar_yuv (guint32 * ORC_RESTRICT a1,
int p1, int n) int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 46, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115, 1, 9, 46, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115,
95, 111, 114, 99, 95, 115, 97, 109, 101, 95, 112, 97, 114, 105, 116, 95, 111, 114, 99, 95, 115, 97, 109, 101, 95, 112, 97, 114, 105, 116, 121,
121, 95, 51, 95, 116, 97, 112, 95, 112, 108, 97, 110, 97, 114, 95, 121, 117,
95, 51, 95, 116, 97, 112, 95, 112, 108, 97, 110, 97, 114, 95, 121, 117, 118, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1,
118, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 13, 4, 14, 2, 2, 0, 0, 0, 16, 4, 20, 2, 20,
12, 1, 1, 13, 4, 14, 2, 2, 0, 0, 0, 16, 4, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 4, 20, 4, 150, 32, 4,
2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 4, 20, 4, 150, 32, 4, 150, 33, 5, 150, 34, 6, 150, 35, 7, 150, 36, 8, 150, 37, 9, 93,
150, 33, 5, 150, 34, 6, 150, 35, 7, 150, 36, 8, 150, 37, 9, 93, 33, 33, 16, 93, 36, 36, 16, 70, 32, 32, 33, 70, 32, 32, 34, 70,
33, 33, 16, 93, 36, 36, 16, 70, 32, 32, 33, 70, 32, 32, 34, 70, 35, 35, 36, 70, 35, 35, 37, 98, 32, 32, 35, 69, 32, 32, 154, 38,
35, 35, 36, 70, 35, 35, 37, 98, 32, 32, 35, 69, 32, 32, 154, 38, 32, 111, 39, 38, 24, 106, 38, 38, 39, 181, 12, 38, 2, 0,
32, 111, 39, 38, 24, 106, 38, 38, 39, 181, 12, 38, 2, 0, };
}; p = orc_program_new_from_static_bytecode (bc);
p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p,
orc_program_set_backup_function (p, _backup_fieldanalysis_orc_same_parity_3_tap_planar_yuv);
_backup_fieldanalysis_orc_same_parity_3_tap_planar_yuv);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, orc_program_set_name (p, "fieldanalysis_orc_same_parity_3_tap_planar_yuv");
"fieldanalysis_orc_same_parity_3_tap_planar_yuv"); orc_program_set_backup_function (p,
orc_program_set_backup_function (p, _backup_fieldanalysis_orc_same_parity_3_tap_planar_yuv);
_backup_fieldanalysis_orc_same_parity_3_tap_planar_yuv); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s3");
orc_program_add_source (p, 1, "s3"); orc_program_add_source (p, 1, "s4");
orc_program_add_source (p, 1, "s4"); orc_program_add_source (p, 1, "s5");
orc_program_add_source (p, 1, "s5"); orc_program_add_source (p, 1, "s6");
orc_program_add_source (p, 1, "s6"); orc_program_add_accumulator (p, 4, "a1");
orc_program_add_accumulator (p, 4, "a1"); orc_program_add_constant (p, 2, 0x00000002, "c1");
orc_program_add_constant (p, 2, 0x00000002, "c1"); orc_program_add_parameter (p, 4, "p1");
orc_program_add_parameter (p, 4, "p1"); orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t3"); orc_program_add_temporary (p, 2, "t4");
orc_program_add_temporary (p, 2, "t4"); orc_program_add_temporary (p, 2, "t5");
orc_program_add_temporary (p, 2, "t5"); orc_program_add_temporary (p, 2, "t6");
orc_program_add_temporary (p, 2, "t6"); orc_program_add_temporary (p, 4, "t7");
orc_program_add_temporary (p, 4, "t7"); orc_program_add_temporary (p, 4, "t8");
orc_program_add_temporary (p, 4, "t8");
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_S4, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_S4, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_S5, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_S5, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_S6, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_S6, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shlw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, orc_program_append_2 (p, "shlw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shlw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, orc_program_append_2 (p, "shlw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T6, orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T6,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T4, orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T4,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P1, orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_P1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "andl", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T8, orc_program_append_2 (p, "andl", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T8,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T7, ORC_VAR_D1, orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T7, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -1072,98 +1061,93 @@ fieldanalysis_orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT a1,
const orc_uint8 * ORC_RESTRICT s5, int p1, int n) const orc_uint8 * ORC_RESTRICT s5, int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 50, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115, 1, 9, 50, 102, 105, 101, 108, 100, 97, 110, 97, 108, 121, 115, 105, 115,
95, 111, 114, 99, 95, 111, 112, 112, 111, 115, 105, 116, 101, 95, 112, 95, 111, 114, 99, 95, 111, 112, 112, 111, 115, 105, 116, 101, 95, 112, 97,
97, 114, 105, 116, 121, 95, 53, 95, 116, 97, 112, 95, 112, 108, 97, 110, 97,
114, 105, 116, 121, 95, 53, 95, 116, 97, 112, 95, 112, 108, 97, 110, 97, 114, 95, 121, 117, 118, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1,
114, 95, 121, 117, 118, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 13, 4, 14, 2, 2, 0, 0, 0, 14, 2, 3, 0,
1, 12, 1, 1, 13, 4, 14, 2, 2, 0, 0, 0, 14, 2, 3, 0, 0, 0, 16, 4, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 4,
0, 0, 16, 4, 20, 2, 20, 2, 20, 2, 20, 2, 20, 2, 20, 4, 20, 4, 150, 32, 4, 150, 33, 5, 150, 34, 6, 150, 35, 7, 150, 36,
20, 4, 150, 32, 4, 150, 33, 5, 150, 34, 6, 150, 35, 7, 150, 36, 8, 93, 34, 34, 16, 89, 33, 33, 17, 89, 35, 35, 17, 98, 32, 32,
8, 93, 34, 34, 16, 89, 33, 33, 17, 89, 35, 35, 17, 98, 32, 32, 33, 70, 32, 32, 34, 98, 32, 32, 35, 70, 32, 32, 36, 69, 32, 32,
33, 70, 32, 32, 34, 98, 32, 32, 35, 70, 32, 32, 36, 69, 32, 32, 154, 37, 32, 111, 38, 37, 24, 106, 37, 37, 38, 181, 12, 37, 2, 0,
154, 37, 32, 111, 38, 37, 24, 106, 37, 37, 38, 181, 12, 37, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, orc_program_set_backup_function (p,
_backup_fieldanalysis_orc_opposite_parity_5_tap_planar_yuv); _backup_fieldanalysis_orc_opposite_parity_5_tap_planar_yuv);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, orc_program_set_name (p,
"fieldanalysis_orc_opposite_parity_5_tap_planar_yuv"); "fieldanalysis_orc_opposite_parity_5_tap_planar_yuv");
orc_program_set_backup_function (p, orc_program_set_backup_function (p,
_backup_fieldanalysis_orc_opposite_parity_5_tap_planar_yuv); _backup_fieldanalysis_orc_opposite_parity_5_tap_planar_yuv);
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3"); orc_program_add_source (p, 1, "s3");
orc_program_add_source (p, 1, "s4"); orc_program_add_source (p, 1, "s4");
orc_program_add_source (p, 1, "s5"); orc_program_add_source (p, 1, "s5");
orc_program_add_accumulator (p, 4, "a1"); orc_program_add_accumulator (p, 4, "a1");
orc_program_add_constant (p, 2, 0x00000002, "c1"); orc_program_add_constant (p, 2, 0x00000002, "c1");
orc_program_add_constant (p, 2, 0x00000003, "c2"); orc_program_add_constant (p, 2, 0x00000003, "c2");
orc_program_add_parameter (p, 4, "p1"); orc_program_add_parameter (p, 4, "p1");
orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3"); orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t4"); orc_program_add_temporary (p, 2, "t4");
orc_program_add_temporary (p, 2, "t5"); orc_program_add_temporary (p, 2, "t5");
orc_program_add_temporary (p, 4, "t6"); orc_program_add_temporary (p, 4, "t6");
orc_program_add_temporary (p, 4, "t7"); orc_program_add_temporary (p, 4, "t7");
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_S4, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_S4, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_S5, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_S5, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shlw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C1, orc_program_append_2 (p, "shlw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "mullw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C2, orc_program_append_2 (p, "mullw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T4, orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T4,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T5, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T5,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T6, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T6, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_P1, orc_program_append_2 (p, "cmpgtsl", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_P1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "andl", 0, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T7, orc_program_append_2 (p, "andl", 0, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T7,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T6, ORC_VAR_D1, orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T6, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;

View File

@ -1,8 +1,7 @@
/* autogenerated from gstfieldanalysisorc.orc */ /* autogenerated from gstfieldanalysisorc.orc */
#ifndef _GSTFIELDANALYSISORC_H_ #pragma once
#define _GSTFIELDANALYSISORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -89,5 +90,3 @@ void fieldanalysis_orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT
} }
#endif #endif
#endif

View File

@ -67,6 +67,7 @@ typedef union
orc_int32 x2[2]; orc_int32 x2[2];
float x2f[2]; float x2f[2];
orc_int16 x4[4]; orc_int16 x4[4];
orc_int8 x8[8];
} orc_union64; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
@ -74,6 +75,8 @@ typedef union
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -100,6 +103,7 @@ void gaudi_orc_burn (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1,
/* begin Orc C target preamble */ /* begin Orc C target preamble */
#include <math.h>
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
@ -135,6 +139,8 @@ void gaudi_orc_burn (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1,
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -391,71 +397,67 @@ gaudi_orc_burn (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1,
int p1, int n) int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 14, 103, 97, 117, 100, 105, 95, 111, 114, 99, 95, 98, 117, 114, 1, 9, 14, 103, 97, 117, 100, 105, 95, 111, 114, 99, 95, 98, 117, 114,
110, 11, 4, 4, 12, 4, 4, 14, 1, 255, 0, 0, 0, 14, 1, 7, 110, 11, 4, 4, 12, 4, 4, 14, 1, 255, 0, 0, 0, 14, 1, 7,
0, 0, 0, 14, 1, 1, 0, 0, 0, 16, 4, 20, 4, 20, 8, 20, 0, 0, 0, 14, 1, 1, 0, 0, 0, 16, 4, 20, 4, 20, 8, 20,
8, 21, 2, 42, 32, 4, 21, 2, 150, 33, 32, 21, 2, 70, 34, 33, 8, 21, 2, 42, 32, 4, 21, 2, 150, 33, 32, 21, 2, 70, 34, 33,
24, 21, 2, 95, 34, 34, 18, 21, 2, 65, 32, 16, 32, 21, 2, 150, 24, 21, 2, 95, 34, 34, 18, 21, 2, 65, 32, 16, 32, 21, 2, 150,
33, 32, 21, 2, 93, 33, 33, 17, 21, 2, 81, 33, 33, 34, 21, 2, 33, 32, 21, 2, 93, 33, 33, 17, 21, 2, 81, 33, 33, 34, 21, 2,
98, 33, 16, 33, 21, 2, 157, 32, 33, 128, 0, 32, 2, 0, 98, 33, 16, 33, 21, 2, 157, 32, 33, 128, 0, 32, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, _backup_gaudi_orc_burn); orc_program_set_backup_function (p, _backup_gaudi_orc_burn);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "gaudi_orc_burn"); orc_program_set_name (p, "gaudi_orc_burn");
orc_program_set_backup_function (p, _backup_gaudi_orc_burn); orc_program_set_backup_function (p, _backup_gaudi_orc_burn);
orc_program_add_destination (p, 4, "d1"); orc_program_add_destination (p, 4, "d1");
orc_program_add_source (p, 4, "s1"); orc_program_add_source (p, 4, "s1");
orc_program_add_constant (p, 1, 0x000000ff, "c1"); orc_program_add_constant (p, 1, 0x000000ff, "c1");
orc_program_add_constant (p, 1, 0x00000007, "c2"); orc_program_add_constant (p, 1, 0x00000007, "c2");
orc_program_add_constant (p, 1, 0x00000001, "c3"); orc_program_add_constant (p, 1, 0x00000001, "c3");
orc_program_add_parameter (p, 4, "p1"); orc_program_add_parameter (p, 4, "p1");
orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 4, "t1");
orc_program_add_temporary (p, 8, "t2"); orc_program_add_temporary (p, 8, "t2");
orc_program_add_temporary (p, 8, "t3"); orc_program_add_temporary (p, 8, "t3");
orc_program_append_2 (p, "copyb", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "copyb", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 2, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_P1, orc_program_append_2 (p, "addw", 2, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_P1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shruw", 2, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C3, orc_program_append_2 (p, "shruw", 2, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subb", 2, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_T1, orc_program_append_2 (p, "subb", 2, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_T1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shlw", 2, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, orc_program_append_2 (p, "shlw", 2, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "divluw", 2, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, orc_program_append_2 (p, "divluw", 2, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subw", 2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_T2, orc_program_append_2 (p, "subw", 2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convwb", 2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, orc_program_append_2 (p, "convwb", 2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;

View File

@ -1,8 +1,7 @@
/* autogenerated from gstgaudieffectsorc.orc */ /* autogenerated from gstgaudieffectsorc.orc */
#ifndef _GSTGAUDIEFFECTSORC_H_ #pragma once
#define _GSTGAUDIEFFECTSORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -86,5 +87,3 @@ void gaudi_orc_burn (guint32 * ORC_RESTRICT d1, const guint32 * ORC_RESTRICT s1,
} }
#endif #endif
#endif

View File

@ -67,6 +67,7 @@ typedef union
orc_int32 x2[2]; orc_int32 x2[2];
float x2f[2]; float x2f[2];
orc_int16 x4[4]; orc_int16 x4[4];
orc_int8 x8[8];
} orc_union64; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
@ -74,6 +75,8 @@ typedef union
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -101,6 +104,7 @@ void orc_sad_nxm_u8 (orc_uint32 * ORC_RESTRICT a1,
/* begin Orc C target preamble */ /* begin Orc C target preamble */
#include <math.h>
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
@ -136,6 +140,8 @@ void orc_sad_nxm_u8 (orc_uint32 * ORC_RESTRICT a1,
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -219,42 +225,38 @@ orc_sad_nxm_u8 (orc_uint32 * ORC_RESTRICT a1, const orc_uint8 * ORC_RESTRICT s1,
int m) int m)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 7, 9, 14, 111, 114, 99, 95, 115, 97, 100, 95, 110, 120, 109, 95, 1, 7, 9, 14, 111, 114, 99, 95, 115, 97, 100, 95, 110, 120, 109, 95,
117, 56, 12, 1, 1, 12, 1, 1, 13, 4, 182, 12, 4, 5, 2, 0, 117, 56, 12, 1, 1, 12, 1, 1, 13, 4, 182, 12, 4, 5, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, _backup_orc_sad_nxm_u8); orc_program_set_backup_function (p, _backup_orc_sad_nxm_u8);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_2d (p); orc_program_set_2d (p);
orc_program_set_name (p, "orc_sad_nxm_u8"); orc_program_set_name (p, "orc_sad_nxm_u8");
orc_program_set_backup_function (p, _backup_orc_sad_nxm_u8); orc_program_set_backup_function (p, _backup_orc_sad_nxm_u8);
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s2");
orc_program_add_accumulator (p, 4, "a1"); orc_program_add_accumulator (p, 4, "a1");
orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2,
ORC_VAR_S2, ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;

View File

@ -55,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif

View File

@ -18,7 +18,7 @@ gst_version_is_stable = gst_version_minor.is_even()
gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90 gst_version_is_dev = gst_version_minor.is_odd() and gst_version_micro < 90
glib_req = '>= 2.64.0' glib_req = '>= 2.64.0'
orc_req = '>= 0.4.17' orc_req = '>= 0.4.34'
if gst_version_is_stable if gst_version_is_stable
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)

View File

@ -1,8 +1,7 @@
/* autogenerated from gstaudiopack.orc */ /* autogenerated from gstaudiopack.orc */
#ifndef _GSTAUDIOPACK_H_ #pragma once
#define _GSTAUDIOPACK_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -135,5 +136,3 @@ void audio_orc_double_to_s32 (gint32 * ORC_RESTRICT d1, const gdouble * ORC_REST
} }
#endif #endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -55,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
/* autogenerated from gstadderorc.orc */ /* autogenerated from gstadderorc.orc */
#ifndef _GSTADDERORC_H_ #pragma once
#define _GSTADDERORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -109,5 +110,3 @@ void adder_orc_add_volume_f64 (double * ORC_RESTRICT d1, const double * ORC_REST
} }
#endif #endif
#endif

View File

@ -1,8 +1,7 @@
/* autogenerated from gstaudiomixerorc.orc */ /* autogenerated from gstaudiomixerorc.orc */
#ifndef _GSTAUDIOMIXERORC_H_ #pragma once
#define _GSTAUDIOMIXERORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -102,5 +103,3 @@ void audiomixer_orc_add_volume_f64 (double * ORC_RESTRICT d1, const double * ORC
} }
#endif #endif
#endif

View File

@ -55,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif

View File

@ -67,6 +67,7 @@ typedef union
orc_int32 x2[2]; orc_int32 x2[2];
float x2f[2]; float x2f[2];
orc_int16 x4[4]; orc_int16 x4[4];
orc_int8 x8[8];
} orc_union64; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
@ -74,6 +75,8 @@ typedef union
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -99,6 +102,7 @@ void video_test_src_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n);
/* begin Orc C target preamble */ /* begin Orc C target preamble */
#include <math.h>
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
@ -134,6 +138,8 @@ void video_test_src_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n);
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -188,40 +194,36 @@ void
video_test_src_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n) video_test_src_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 28, 118, 105, 100, 101, 111, 95, 116, 101, 115, 116, 95, 115, 114, 1, 9, 28, 118, 105, 100, 101, 111, 95, 116, 101, 115, 116, 95, 115, 114,
99, 95, 111, 114, 99, 95, 115, 112, 108, 97, 116, 95, 117, 51, 50, 11, 99, 95, 111, 114, 99, 95, 115, 112, 108, 97, 116, 95, 117, 51, 50, 11,
4, 4, 16, 4, 128, 0, 24, 2, 0, 4, 4, 16, 4, 128, 0, 24, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, _backup_video_test_src_orc_splat_u32); orc_program_set_backup_function (p, _backup_video_test_src_orc_splat_u32);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "video_test_src_orc_splat_u32"); orc_program_set_name (p, "video_test_src_orc_splat_u32");
orc_program_set_backup_function (p, _backup_video_test_src_orc_splat_u32); orc_program_set_backup_function (p, _backup_video_test_src_orc_splat_u32);
orc_program_add_destination (p, 4, "d1"); orc_program_add_destination (p, 4, "d1");
orc_program_add_parameter (p, 4, "p1"); orc_program_add_parameter (p, 4, "p1");
orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, orc_program_append_2 (p, "storel", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;

View File

@ -1,8 +1,7 @@
/* autogenerated from gstvideotestsrcorc.orc */ /* autogenerated from gstvideotestsrcorc.orc */
#ifndef _GSTVIDEOTESTSRCORC_H_ #pragma once
#define _GSTVIDEOTESTSRCORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -86,5 +87,3 @@ void video_test_src_orc_splat_u32 (guint8 * ORC_RESTRICT d1, int p1, int n);
} }
#endif #endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
/* autogenerated from gstvolumeorc.orc */ /* autogenerated from gstvolumeorc.orc */
#ifndef _GSTVOLUMEORC_H_ #pragma once
#define _GSTVOLUMEORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -103,5 +104,3 @@ void volume_orc_process_controlled_int8_2ch (gint8 * ORC_RESTRICT d1, const gdou
} }
#endif #endif
#endif

View File

@ -28,7 +28,7 @@ else
endif endif
glib_req = '>= 2.64.0' glib_req = '>= 2.64.0'
orc_req = '>= 0.4.24' orc_req = '>= 0.4.34'
if gst_version_is_stable if gst_version_is_stable
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)

View File

@ -1,8 +1,7 @@
/* autogenerated from audiopanoramaorc.orc */ /* autogenerated from audiopanoramaorc.orc */
#ifndef _AUDIOPANORAMAORC_H_ #pragma once
#define _AUDIOPANORAMAORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -103,5 +104,3 @@ void audiopanoramam_orc_process_f32_ch2_sim_left (gfloat * ORC_RESTRICT d1, cons
} }
#endif #endif
#endif

View File

@ -67,6 +67,7 @@ typedef union
orc_int32 x2[2]; orc_int32 x2[2];
float x2f[2]; float x2f[2];
orc_int16 x4[4]; orc_int16 x4[4];
orc_int8 x8[8];
} orc_union64; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
@ -74,6 +75,8 @@ typedef union
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -117,6 +120,7 @@ void deinterlace_line_greedy (orc_uint8 * ORC_RESTRICT d1,
/* begin Orc C target preamble */ /* begin Orc C target preamble */
#include <math.h>
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
@ -152,6 +156,8 @@ void deinterlace_line_greedy (orc_uint8 * ORC_RESTRICT d1,
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -352,82 +358,78 @@ deinterlace_line_vfir (guint8 * ORC_RESTRICT d1, const guint8 * ORC_RESTRICT s1,
const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, int n) const guint8 * ORC_RESTRICT s4, const guint8 * ORC_RESTRICT s5, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 21, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 1, 9, 21, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108,
105, 110, 101, 95, 118, 102, 105, 114, 11, 1, 1, 12, 1, 1, 12, 1, 105, 110, 101, 95, 118, 102, 105, 114, 11, 1, 1, 12, 1, 1, 12, 1,
1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 2, 0, 0, 0, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 2, 0, 0, 0,
14, 2, 1, 0, 0, 0, 14, 2, 4, 0, 0, 0, 14, 2, 3, 0, 14, 2, 1, 0, 0, 0, 14, 2, 4, 0, 0, 0, 14, 2, 3, 0,
0, 0, 20, 2, 20, 2, 20, 2, 150, 32, 4, 150, 33, 8, 70, 32, 0, 0, 20, 2, 20, 2, 20, 2, 150, 32, 4, 150, 33, 8, 70, 32,
32, 33, 150, 33, 5, 150, 34, 7, 70, 33, 33, 34, 93, 33, 33, 16, 32, 33, 150, 33, 5, 150, 34, 7, 70, 33, 33, 34, 93, 33, 33, 16,
150, 34, 6, 93, 34, 34, 17, 98, 33, 33, 32, 70, 33, 33, 34, 70, 150, 34, 6, 93, 34, 34, 17, 98, 33, 33, 32, 70, 33, 33, 34, 70,
33, 33, 18, 94, 33, 33, 19, 160, 0, 33, 2, 0, 33, 33, 18, 94, 33, 33, 19, 160, 0, 33, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, _backup_deinterlace_line_vfir); orc_program_set_backup_function (p, _backup_deinterlace_line_vfir);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "deinterlace_line_vfir"); orc_program_set_name (p, "deinterlace_line_vfir");
orc_program_set_backup_function (p, _backup_deinterlace_line_vfir); orc_program_set_backup_function (p, _backup_deinterlace_line_vfir);
orc_program_add_destination (p, 1, "d1"); orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3"); orc_program_add_source (p, 1, "s3");
orc_program_add_source (p, 1, "s4"); orc_program_add_source (p, 1, "s4");
orc_program_add_source (p, 1, "s5"); orc_program_add_source (p, 1, "s5");
orc_program_add_constant (p, 2, 0x00000002, "c1"); orc_program_add_constant (p, 2, 0x00000002, "c1");
orc_program_add_constant (p, 2, 0x00000001, "c2"); orc_program_add_constant (p, 2, 0x00000001, "c2");
orc_program_add_constant (p, 2, 0x00000004, "c3"); orc_program_add_constant (p, 2, 0x00000004, "c3");
orc_program_add_constant (p, 2, 0x00000003, "c4"); orc_program_add_constant (p, 2, 0x00000003, "c4");
orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t3"); orc_program_add_temporary (p, 2, "t3");
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S5, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S5, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S4, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S4, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shlw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, orc_program_append_2 (p, "shlw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shlw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C2, orc_program_append_2 (p, "shlw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3, orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C4, orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C4,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1,
ORC_VAR_D1, ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -640,84 +642,79 @@ deinterlace_line_vfir_16bits (guint16 * ORC_RESTRICT d1,
const guint16 * ORC_RESTRICT s5, int n) const guint16 * ORC_RESTRICT s5, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 28, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 1, 9, 28, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108,
105, 110, 101, 95, 118, 102, 105, 114, 95, 49, 54, 98, 105, 116, 115, 105, 110, 101, 95, 118, 102, 105, 114, 95, 49, 54, 98, 105, 116, 115, 11,
11, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2,
2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 12, 2, 2, 14, 4, 2, 0, 0, 0, 14, 4, 1, 0, 0, 0, 14, 4, 4,
2, 14, 4, 2, 0, 0, 0, 14, 4, 1, 0, 0, 0, 14, 4, 4, 0, 0, 0, 14, 4, 3, 0, 0, 0, 20, 4, 20, 4, 20, 4, 154,
0, 0, 0, 14, 4, 3, 0, 0, 0, 20, 4, 20, 4, 20, 4, 154, 32, 4, 154, 33, 8, 103, 32, 32, 33, 154, 33, 5, 154, 34, 7, 103,
32, 4, 154, 33, 8, 103, 32, 32, 33, 154, 33, 5, 154, 34, 7, 103, 33, 33, 34, 124, 33, 33, 16, 154, 34, 6, 124, 34, 34, 17, 129, 33,
33, 33, 34, 124, 33, 33, 16, 154, 34, 6, 124, 34, 34, 17, 129, 33, 33, 32, 103, 33, 33, 34, 103, 33, 33, 18, 125, 33, 33, 19, 166, 0,
33, 32, 103, 33, 33, 34, 103, 33, 33, 18, 125, 33, 33, 19, 166, 0, 33, 2, 0,
33, 2, 0, };
}; p = orc_program_new_from_static_bytecode (bc);
p = orc_program_new_from_static_bytecode (bc); orc_program_set_backup_function (p, _backup_deinterlace_line_vfir_16bits);
orc_program_set_backup_function (p, _backup_deinterlace_line_vfir_16bits);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "deinterlace_line_vfir_16bits"); orc_program_set_name (p, "deinterlace_line_vfir_16bits");
orc_program_set_backup_function (p, _backup_deinterlace_line_vfir_16bits); orc_program_set_backup_function (p, _backup_deinterlace_line_vfir_16bits);
orc_program_add_destination (p, 2, "d1"); orc_program_add_destination (p, 2, "d1");
orc_program_add_source (p, 2, "s1"); orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s2"); orc_program_add_source (p, 2, "s2");
orc_program_add_source (p, 2, "s3"); orc_program_add_source (p, 2, "s3");
orc_program_add_source (p, 2, "s4"); orc_program_add_source (p, 2, "s4");
orc_program_add_source (p, 2, "s5"); orc_program_add_source (p, 2, "s5");
orc_program_add_constant (p, 4, 0x00000002, "c1"); orc_program_add_constant (p, 4, 0x00000002, "c1");
orc_program_add_constant (p, 4, 0x00000001, "c2"); orc_program_add_constant (p, 4, 0x00000001, "c2");
orc_program_add_constant (p, 4, 0x00000004, "c3"); orc_program_add_constant (p, 4, 0x00000004, "c3");
orc_program_add_constant (p, 4, 0x00000003, "c4"); orc_program_add_constant (p, 4, 0x00000003, "c4");
orc_program_add_temporary (p, 4, "t1"); orc_program_add_temporary (p, 4, "t1");
orc_program_add_temporary (p, 4, "t2"); orc_program_add_temporary (p, 4, "t2");
orc_program_add_temporary (p, 4, "t3"); orc_program_add_temporary (p, 4, "t3");
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_S5, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_S5, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, orc_program_append_2 (p, "addl", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_S4, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_S4, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shll", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, orc_program_append_2 (p, "shll", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shll", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C2, orc_program_append_2 (p, "shll", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, orc_program_append_2 (p, "subl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3, orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C4, orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C4,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convsuslw", 0, ORC_VAR_D1, ORC_VAR_T2, orc_program_append_2 (p, "convsuslw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1,
ORC_VAR_D1, ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -804,41 +801,37 @@ deinterlace_line_linear (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n) const guint8 * ORC_RESTRICT s1, const guint8 * ORC_RESTRICT s2, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 23, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 1, 9, 23, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108,
105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 11, 1, 1, 12, 1, 1, 105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 11, 1, 1, 12, 1, 1,
12, 1, 1, 39, 0, 4, 5, 2, 0, 12, 1, 1, 39, 0, 4, 5, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, _backup_deinterlace_line_linear); orc_program_set_backup_function (p, _backup_deinterlace_line_linear);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "deinterlace_line_linear"); orc_program_set_name (p, "deinterlace_line_linear");
orc_program_set_backup_function (p, _backup_deinterlace_line_linear); orc_program_set_backup_function (p, _backup_deinterlace_line_linear);
orc_program_add_destination (p, 1, "d1"); orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s2");
orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -922,45 +915,38 @@ deinterlace_line_linear_16bits (guint16 * ORC_RESTRICT d1,
const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, int n) const guint16 * ORC_RESTRICT s1, const guint16 * ORC_RESTRICT s2, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 30, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 1, 9, 30, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108,
105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 95, 49, 54, 98, 105, 105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 95, 49, 54, 98, 105, 116,
116, 115, 11, 2, 2, 12, 2, 2, 12, 2, 2, 76, 0, 4, 5, 2, 0,
115, 11, 2, 2, 12, 2, 2, 12, 2, 2, 76, 0, 4, 5, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, orc_program_set_backup_function (p, _backup_deinterlace_line_linear_16bits);
_backup_deinterlace_line_linear_16bits);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "deinterlace_line_linear_16bits"); orc_program_set_name (p, "deinterlace_line_linear_16bits");
orc_program_set_backup_function (p, orc_program_set_backup_function (p, _backup_deinterlace_line_linear_16bits);
_backup_deinterlace_line_linear_16bits); orc_program_add_destination (p, 2, "d1");
orc_program_add_destination (p, 2, "d1"); orc_program_add_source (p, 2, "s1");
orc_program_add_source (p, 2, "s1"); orc_program_add_source (p, 2, "s2");
orc_program_add_source (p, 2, "s2");
orc_program_append_2 (p, "avguw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, orc_program_append_2 (p, "avguw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -1118,68 +1104,62 @@ deinterlace_line_linear_blend (guint8 * ORC_RESTRICT d1,
const guint8 * ORC_RESTRICT s3, int n) const guint8 * ORC_RESTRICT s3, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 29, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 1, 9, 29, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108,
105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 95, 98, 108, 101, 110, 105, 110, 101, 95, 108, 105, 110, 101, 97, 114, 95, 98, 108, 101, 110,
100, 100,
11, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 2, 0, 11, 1, 1, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 2, 2, 0,
0, 0, 20, 2, 20, 2, 20, 2, 150, 32, 4, 150, 33, 5, 150, 34, 0, 0, 20, 2, 20, 2, 20, 2, 150, 32, 4, 150, 33, 5, 150, 34,
6, 70, 32, 32, 33, 70, 34, 34, 34, 70, 32, 32, 34, 70, 32, 32, 6, 70, 32, 32, 33, 70, 34, 34, 34, 70, 32, 32, 34, 70, 32, 32,
16, 94, 32, 32, 16, 160, 0, 32, 2, 0, 16, 94, 32, 32, 16, 160, 0, 32, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, orc_program_set_backup_function (p, _backup_deinterlace_line_linear_blend);
_backup_deinterlace_line_linear_blend);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "deinterlace_line_linear_blend"); orc_program_set_name (p, "deinterlace_line_linear_blend");
orc_program_set_backup_function (p, orc_program_set_backup_function (p, _backup_deinterlace_line_linear_blend);
_backup_deinterlace_line_linear_blend); orc_program_add_destination (p, 1, "d1");
orc_program_add_destination (p, 1, "d1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s3");
orc_program_add_source (p, 1, "s3"); orc_program_add_constant (p, 2, 0x00000002, "c1");
orc_program_add_constant (p, 2, 0x00000002, "c1"); orc_program_add_temporary (p, 2, "t1");
orc_program_add_temporary (p, 2, "t1"); orc_program_add_temporary (p, 2, "t2");
orc_program_add_temporary (p, 2, "t2"); orc_program_add_temporary (p, 2, "t3");
orc_program_add_temporary (p, 2, "t3");
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T3, orc_program_append_2 (p, "addw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1,
ORC_VAR_D1, ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;
@ -1416,109 +1396,105 @@ deinterlace_line_greedy (orc_uint8 * ORC_RESTRICT d1,
int p1, int n) int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 23, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108, 1, 9, 23, 100, 101, 105, 110, 116, 101, 114, 108, 97, 99, 101, 95, 108,
105, 110, 101, 95, 103, 114, 101, 101, 100, 121, 11, 1, 1, 12, 1, 1, 105, 110, 101, 95, 103, 114, 101, 101, 100, 121, 11, 1, 1, 12, 1, 1,
12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 1, 128, 0, 0, 0, 16, 12, 1, 1, 12, 1, 1, 12, 1, 1, 14, 1, 128, 0, 0, 0, 16,
1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20,
1, 20, 1, 20, 1, 20, 1, 20, 1, 43, 32, 4, 43, 33, 7, 43, 1, 20, 1, 20, 1, 20, 1, 20, 1, 43, 32, 4, 43, 33, 7, 43,
34, 6, 43, 35, 5, 39, 36, 35, 34, 53, 39, 32, 36, 55, 40, 32, 34, 6, 43, 35, 5, 39, 36, 35, 34, 53, 39, 32, 36, 55, 40, 32,
36, 65, 37, 39, 40, 53, 39, 33, 36, 55, 40, 33, 36, 65, 38, 39, 36, 65, 37, 39, 40, 53, 39, 33, 36, 55, 40, 33, 36, 65, 38, 39,
40, 68, 37, 37, 16, 68, 38, 38, 16, 41, 40, 37, 38, 36, 39, 33, 40, 68, 37, 37, 16, 68, 38, 38, 16, 41, 40, 37, 38, 36, 39, 33,
40, 37, 40, 40, 32, 59, 41, 39, 40, 53, 43, 35, 34, 55, 42, 35, 40, 37, 40, 40, 32, 59, 41, 39, 40, 53, 43, 35, 34, 55, 42, 35,
34, 35, 43, 43, 24, 67, 42, 42, 24, 55, 41, 41, 43, 53, 0, 41, 34, 35, 43, 43, 24, 67, 42, 42, 24, 55, 41, 41, 43, 53, 0, 41,
42, 2, 0, 42, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, _backup_deinterlace_line_greedy); orc_program_set_backup_function (p, _backup_deinterlace_line_greedy);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "deinterlace_line_greedy"); orc_program_set_name (p, "deinterlace_line_greedy");
orc_program_set_backup_function (p, _backup_deinterlace_line_greedy); orc_program_set_backup_function (p, _backup_deinterlace_line_greedy);
orc_program_add_destination (p, 1, "d1"); orc_program_add_destination (p, 1, "d1");
orc_program_add_source (p, 1, "s1"); orc_program_add_source (p, 1, "s1");
orc_program_add_source (p, 1, "s2"); orc_program_add_source (p, 1, "s2");
orc_program_add_source (p, 1, "s3"); orc_program_add_source (p, 1, "s3");
orc_program_add_source (p, 1, "s4"); orc_program_add_source (p, 1, "s4");
orc_program_add_constant (p, 1, 0x00000080, "c1"); orc_program_add_constant (p, 1, 0x00000080, "c1");
orc_program_add_parameter (p, 1, "p1"); orc_program_add_parameter (p, 1, "p1");
orc_program_add_temporary (p, 1, "t1"); orc_program_add_temporary (p, 1, "t1");
orc_program_add_temporary (p, 1, "t2"); orc_program_add_temporary (p, 1, "t2");
orc_program_add_temporary (p, 1, "t3"); orc_program_add_temporary (p, 1, "t3");
orc_program_add_temporary (p, 1, "t4"); orc_program_add_temporary (p, 1, "t4");
orc_program_add_temporary (p, 1, "t5"); orc_program_add_temporary (p, 1, "t5");
orc_program_add_temporary (p, 1, "t6"); orc_program_add_temporary (p, 1, "t6");
orc_program_add_temporary (p, 1, "t7"); orc_program_add_temporary (p, 1, "t7");
orc_program_add_temporary (p, 1, "t8"); orc_program_add_temporary (p, 1, "t8");
orc_program_add_temporary (p, 1, "t9"); orc_program_add_temporary (p, 1, "t9");
orc_program_add_temporary (p, 1, "t10"); orc_program_add_temporary (p, 1, "t10");
orc_program_add_temporary (p, 1, "t11"); orc_program_add_temporary (p, 1, "t11");
orc_program_add_temporary (p, 1, "t12"); orc_program_add_temporary (p, 1, "t12");
orc_program_append_2 (p, "loadb", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, orc_program_append_2 (p, "loadb", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "loadb", 0, ORC_VAR_T2, ORC_VAR_S4, ORC_VAR_D1, orc_program_append_2 (p, "loadb", 0, ORC_VAR_T2, ORC_VAR_S4, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "loadb", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, orc_program_append_2 (p, "loadb", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "loadb", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1, orc_program_append_2 (p, "loadb", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "avgub", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_T3, orc_program_append_2 (p, "avgub", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "maxub", 0, ORC_VAR_T8, ORC_VAR_T1, ORC_VAR_T5, orc_program_append_2 (p, "maxub", 0, ORC_VAR_T8, ORC_VAR_T1, ORC_VAR_T5,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "minub", 0, ORC_VAR_T9, ORC_VAR_T1, ORC_VAR_T5, orc_program_append_2 (p, "minub", 0, ORC_VAR_T9, ORC_VAR_T1, ORC_VAR_T5,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subb", 0, ORC_VAR_T6, ORC_VAR_T8, ORC_VAR_T9, orc_program_append_2 (p, "subb", 0, ORC_VAR_T6, ORC_VAR_T8, ORC_VAR_T9,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "maxub", 0, ORC_VAR_T8, ORC_VAR_T2, ORC_VAR_T5, orc_program_append_2 (p, "maxub", 0, ORC_VAR_T8, ORC_VAR_T2, ORC_VAR_T5,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "minub", 0, ORC_VAR_T9, ORC_VAR_T2, ORC_VAR_T5, orc_program_append_2 (p, "minub", 0, ORC_VAR_T9, ORC_VAR_T2, ORC_VAR_T5,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_T9, orc_program_append_2 (p, "subb", 0, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_T9,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "xorb", 0, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_C1, orc_program_append_2 (p, "xorb", 0, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "xorb", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C1, orc_program_append_2 (p, "xorb", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_C1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "cmpgtsb", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_T7, orc_program_append_2 (p, "cmpgtsb", 0, ORC_VAR_T9, ORC_VAR_T6, ORC_VAR_T7,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "andb", 0, ORC_VAR_T8, ORC_VAR_T2, ORC_VAR_T9, orc_program_append_2 (p, "andb", 0, ORC_VAR_T8, ORC_VAR_T2, ORC_VAR_T9,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "andnb", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T1, orc_program_append_2 (p, "andnb", 0, ORC_VAR_T9, ORC_VAR_T9, ORC_VAR_T1,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "orb", 0, ORC_VAR_T10, ORC_VAR_T8, ORC_VAR_T9, orc_program_append_2 (p, "orb", 0, ORC_VAR_T10, ORC_VAR_T8, ORC_VAR_T9,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "maxub", 0, ORC_VAR_T12, ORC_VAR_T4, ORC_VAR_T3, orc_program_append_2 (p, "maxub", 0, ORC_VAR_T12, ORC_VAR_T4, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "minub", 0, ORC_VAR_T11, ORC_VAR_T4, ORC_VAR_T3, orc_program_append_2 (p, "minub", 0, ORC_VAR_T11, ORC_VAR_T4, ORC_VAR_T3,
ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "addusb", 0, ORC_VAR_T12, ORC_VAR_T12, orc_program_append_2 (p, "addusb", 0, ORC_VAR_T12, ORC_VAR_T12, ORC_VAR_P1,
ORC_VAR_P1, ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "subusb", 0, ORC_VAR_T11, ORC_VAR_T11, orc_program_append_2 (p, "subusb", 0, ORC_VAR_T11, ORC_VAR_T11, ORC_VAR_P1,
ORC_VAR_P1, ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "minub", 0, ORC_VAR_T10, ORC_VAR_T10, orc_program_append_2 (p, "minub", 0, ORC_VAR_T10, ORC_VAR_T10, ORC_VAR_T12,
ORC_VAR_T12, ORC_VAR_D1); ORC_VAR_D1);
orc_program_append_2 (p, "maxub", 0, ORC_VAR_D1, ORC_VAR_T10, ORC_VAR_T11, orc_program_append_2 (p, "maxub", 0, ORC_VAR_D1, ORC_VAR_T10, ORC_VAR_T11,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;

View File

@ -55,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif

View File

@ -67,6 +67,7 @@ typedef union
orc_int32 x2[2]; orc_int32 x2[2];
float x2f[2]; float x2f[2];
orc_int16 x4[4]; orc_int16 x4[4];
orc_int8 x8[8];
} orc_union64; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
@ -74,6 +75,8 @@ typedef union
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -99,6 +102,7 @@ void video_box_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
/* begin Orc C target preamble */ /* begin Orc C target preamble */
#include <math.h>
#define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
#define ORC_ABS(a) ((a)<0 ? -(a) : (a)) #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
#define ORC_MIN(a,b) ((a)<(b) ? (a) : (b)) #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
@ -134,6 +138,8 @@ void video_box_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -194,40 +200,36 @@ void
video_box_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n) video_box_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n)
{ {
OrcExecutor _ex, *ex = &_ex; OrcExecutor _ex, *ex = &_ex;
static volatile int p_inited = 0; static OrcOnce once = ORC_ONCE_INIT;
static OrcCode *c = 0; OrcCode *c;
void (*func) (OrcExecutor *); OrcExecutorFunc func = NULL;
if (!p_inited) { if (!orc_once_enter (&once, (void **) &c)) {
orc_once_mutex_lock (); OrcProgram *p;
if (!p_inited) {
OrcProgram *p;
#if 1 #if 1
static const orc_uint8 bc[] = { static const orc_uint8 bc[] = {
1, 9, 23, 118, 105, 100, 101, 111, 95, 98, 111, 120, 95, 111, 114, 99, 1, 9, 23, 118, 105, 100, 101, 111, 95, 98, 111, 120, 95, 111, 114, 99,
95, 115, 112, 108, 97, 116, 95, 117, 51, 50, 11, 4, 4, 16, 4, 112, 95, 115, 112, 108, 97, 116, 95, 117, 51, 50, 11, 4, 4, 16, 4, 112,
0, 24, 2, 0, 0, 24, 2, 0,
}; };
p = orc_program_new_from_static_bytecode (bc); p = orc_program_new_from_static_bytecode (bc);
orc_program_set_backup_function (p, _backup_video_box_orc_splat_u32); orc_program_set_backup_function (p, _backup_video_box_orc_splat_u32);
#else #else
p = orc_program_new (); p = orc_program_new ();
orc_program_set_name (p, "video_box_orc_splat_u32"); orc_program_set_name (p, "video_box_orc_splat_u32");
orc_program_set_backup_function (p, _backup_video_box_orc_splat_u32); orc_program_set_backup_function (p, _backup_video_box_orc_splat_u32);
orc_program_add_destination (p, 4, "d1"); orc_program_add_destination (p, 4, "d1");
orc_program_add_parameter (p, 4, "p1"); orc_program_add_parameter (p, 4, "p1");
orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1,
ORC_VAR_D1); ORC_VAR_D1);
#endif #endif
orc_program_compile (p); orc_program_compile (p);
c = orc_program_take_code (p); c = orc_program_take_code (p);
orc_program_free (p); orc_program_free (p);
} orc_once_leave (&once, c);
p_inited = TRUE;
orc_once_mutex_unlock ();
} }
ex->arrays[ORC_VAR_A2] = c; ex->arrays[ORC_VAR_A2] = c;
ex->program = 0; ex->program = 0;

View File

@ -1,8 +1,7 @@
/* autogenerated from gstvideoboxorc.orc */ /* autogenerated from gstvideoboxorc.orc */
#ifndef _GSTVIDEOBOXORC_H_ #pragma once
#define _GSTVIDEOBOXORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -86,5 +87,3 @@ void video_box_orc_splat_u32 (guint32 * ORC_RESTRICT d1, int p1, int n);
} }
#endif #endif
#endif

View File

@ -1,8 +1,7 @@
/* autogenerated from videomixerorc.orc */ /* autogenerated from videomixerorc.orc */
#ifndef _VIDEOMIXERORC_H_ #pragma once
#define _VIDEOMIXERORC_H_
#include <glib.h> #include <glib.h>
@ -56,13 +55,15 @@ typedef unsigned long orc_uint64;
#endif #endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; 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_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; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; orc_int8 x8[8]; } orc_union64;
#endif #endif
#ifndef ORC_RESTRICT #ifndef ORC_RESTRICT
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define ORC_RESTRICT restrict #define ORC_RESTRICT restrict
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define ORC_RESTRICT __restrict__ #define ORC_RESTRICT __restrict__
#elif defined(_MSC_VER)
#define ORC_RESTRICT __restrict
#else #else
#define ORC_RESTRICT #define ORC_RESTRICT
#endif #endif
@ -92,5 +93,3 @@ void video_mixer_orc_overlay_bgra (guint8 * ORC_RESTRICT d1, int d1_stride, cons
} }
#endif #endif
#endif

View File

@ -23,7 +23,7 @@ if have_cxx
endif endif
glib_req = '>= 2.64.0' glib_req = '>= 2.64.0'
orc_req = '>= 0.4.17' orc_req = '>= 0.4.34'
if gst_version_is_stable if gst_version_is_stable
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)