diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-02-17 11:05:37 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-02-17 11:05:37 +0100 |
commit | e4754d274bae87e1f1528acd83c1e09d783aff6e (patch) | |
tree | 322b42e0ce5485e11e459baf748bc60c029b1a80 /gst/fieldanalysis | |
parent | f08e247051c5c6d0aaacc29f99a2b0bb9de8405e (diff) | |
download | gstreamer-plugins-bad-e4754d274bae87e1f1528acd83c1e09d783aff6e.tar.gz |
RELEASE 0.11.1RELEASE-0.11.1
Diffstat (limited to 'gst/fieldanalysis')
-rw-r--r-- | gst/fieldanalysis/gstfieldanalysisorc-dist.c | 121 | ||||
-rw-r--r-- | gst/fieldanalysis/gstfieldanalysisorc-dist.h | 18 |
2 files changed, 53 insertions, 86 deletions
diff --git a/gst/fieldanalysis/gstfieldanalysisorc-dist.c b/gst/fieldanalysis/gstfieldanalysisorc-dist.c index 9b4e39abd..969916376 100644 --- a/gst/fieldanalysis/gstfieldanalysisorc-dist.c +++ b/gst/fieldanalysis/gstfieldanalysisorc-dist.c @@ -4,6 +4,9 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#ifndef DISABLE_ORC +#include <orc/orc.h> +#endif #include <glib.h> #ifndef _ORC_INTEGER_TYPEDEFS_ @@ -29,7 +32,6 @@ typedef unsigned __int16 orc_uint16; typedef unsigned __int32 orc_uint32; typedef unsigned __int64 orc_uint64; #define ORC_UINT64_C(x) (x##Ui64) -#define inline __inline #else #include <limits.h> typedef signed char orc_int8; @@ -69,34 +71,17 @@ typedef union orc_int16 x4[4]; } orc_union64; #endif -#ifndef ORC_RESTRICT -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define ORC_RESTRICT restrict -#elif defined(__GNUC__) && __GNUC__ >= 4 -#define ORC_RESTRICT __restrict__ -#else -#define ORC_RESTRICT -#endif -#endif -#ifndef DISABLE_ORC -#include <orc/orc.h> -#endif -void orc_same_parity_sad_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - int p2, int n); -void orc_same_parity_ssd_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - int p2, int n); -void orc_same_parity_3_tap_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, - const orc_uint8 * ORC_RESTRICT s5, const orc_uint8 * ORC_RESTRICT s6, - int p2, int n); -void orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, - const orc_uint8 * ORC_RESTRICT s5, int p2, int n); +void orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, int p2, int n); +void orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, int p2, int n); +void orc_same_parity_3_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, + const orc_uint8 * s5, const orc_uint8 * s6, int p2, int n); +void orc_opposite_parity_5_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, + const orc_uint8 * s5, int p2, int n); void gst_fieldanalysis_orc_init (void); @@ -132,7 +117,6 @@ void gst_fieldanalysis_orc_init (void); #define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0)) #define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff))) #define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0)) -#ifndef ORC_RESTRICT #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define ORC_RESTRICT restrict #elif defined(__GNUC__) && __GNUC__ >= 4 @@ -140,7 +124,6 @@ void gst_fieldanalysis_orc_init (void); #else #define ORC_RESTRICT #endif -#endif /* end Orc C target preamble */ @@ -148,9 +131,8 @@ void gst_fieldanalysis_orc_init (void); /* orc_same_parity_sad_planar_yuv */ #ifdef DISABLE_ORC void -orc_same_parity_sad_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - int p2, int n) +orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, int p2, int n) { int i; const orc_int8 *ORC_RESTRICT ptr4; @@ -201,7 +183,7 @@ orc_same_parity_sad_planar_yuv (guint32 * ORC_RESTRICT a1, #else static void -_backup_orc_same_parity_sad_planar_yuv (OrcExecutor * ORC_RESTRICT ex) +_backup_orc_same_parity_sad_planar_yuv (OrcExecutor * ex) { int i; int n = ex->n; @@ -253,9 +235,8 @@ _backup_orc_same_parity_sad_planar_yuv (OrcExecutor * ORC_RESTRICT ex) static OrcProgram *_orc_program_orc_same_parity_sad_planar_yuv; void -orc_same_parity_sad_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - int p2, int n) +orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, int p2, int n) { OrcExecutor _ex, *ex = &_ex; OrcProgram *p = _orc_program_orc_same_parity_sad_planar_yuv; @@ -278,9 +259,8 @@ orc_same_parity_sad_planar_yuv (guint32 * ORC_RESTRICT a1, /* orc_same_parity_ssd_planar_yuv */ #ifdef DISABLE_ORC void -orc_same_parity_ssd_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - int p2, int n) +orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, int p2, int n) { int i; const orc_int8 *ORC_RESTRICT ptr4; @@ -328,7 +308,7 @@ orc_same_parity_ssd_planar_yuv (guint32 * ORC_RESTRICT a1, #else static void -_backup_orc_same_parity_ssd_planar_yuv (OrcExecutor * ORC_RESTRICT ex) +_backup_orc_same_parity_ssd_planar_yuv (OrcExecutor * ex) { int i; int n = ex->n; @@ -377,9 +357,8 @@ _backup_orc_same_parity_ssd_planar_yuv (OrcExecutor * ORC_RESTRICT ex) static OrcProgram *_orc_program_orc_same_parity_ssd_planar_yuv; void -orc_same_parity_ssd_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - int p2, int n) +orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, int p2, int n) { OrcExecutor _ex, *ex = &_ex; OrcProgram *p = _orc_program_orc_same_parity_ssd_planar_yuv; @@ -402,11 +381,9 @@ orc_same_parity_ssd_planar_yuv (guint32 * ORC_RESTRICT a1, /* orc_same_parity_3_tap_planar_yuv */ #ifdef DISABLE_ORC void -orc_same_parity_3_tap_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, - const orc_uint8 * ORC_RESTRICT s5, const orc_uint8 * ORC_RESTRICT s6, - int p2, int n) +orc_same_parity_3_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, + const orc_uint8 * s5, const orc_uint8 * s6, int p2, int n) { int i; const orc_int8 *ORC_RESTRICT ptr4; @@ -507,7 +484,7 @@ orc_same_parity_3_tap_planar_yuv (guint32 * ORC_RESTRICT a1, #else static void -_backup_orc_same_parity_3_tap_planar_yuv (OrcExecutor * ORC_RESTRICT ex) +_backup_orc_same_parity_3_tap_planar_yuv (OrcExecutor * ex) { int i; int n = ex->n; @@ -609,11 +586,9 @@ _backup_orc_same_parity_3_tap_planar_yuv (OrcExecutor * ORC_RESTRICT ex) static OrcProgram *_orc_program_orc_same_parity_3_tap_planar_yuv; void -orc_same_parity_3_tap_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, - const orc_uint8 * ORC_RESTRICT s5, const orc_uint8 * ORC_RESTRICT s6, - int p2, int n) +orc_same_parity_3_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, + const orc_uint8 * s5, const orc_uint8 * s6, int p2, int n) { OrcExecutor _ex, *ex = &_ex; OrcProgram *p = _orc_program_orc_same_parity_3_tap_planar_yuv; @@ -640,10 +615,9 @@ orc_same_parity_3_tap_planar_yuv (guint32 * ORC_RESTRICT a1, /* orc_opposite_parity_5_tap_planar_yuv */ #ifdef DISABLE_ORC void -orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, - const orc_uint8 * ORC_RESTRICT s5, int p2, int n) +orc_opposite_parity_5_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, + const orc_uint8 * s5, int p2, int n) { int i; const orc_int8 *ORC_RESTRICT ptr4; @@ -684,9 +658,9 @@ orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT a1, ptr8 = (orc_int8 *) s5; /* 11: loadpw */ - var44.i = (int) 0x00000003; /* 3 or 1.4822e-323f */ + var44.i = 0x00000003; /* 3 or 1.4822e-323f */ /* 13: loadpw */ - var45.i = (int) 0x00000003; /* 3 or 1.4822e-323f */ + var45.i = 0x00000003; /* 3 or 1.4822e-323f */ /* 21: loadpl */ var46.i = p2; @@ -742,7 +716,7 @@ orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT a1, #else static void -_backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ORC_RESTRICT ex) +_backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ex) { int i; int n = ex->n; @@ -784,9 +758,9 @@ _backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ORC_RESTRICT ex) ptr8 = (orc_int8 *) ex->arrays[8]; /* 11: loadpw */ - var44.i = (int) 0x00000003; /* 3 or 1.4822e-323f */ + var44.i = 0x00000003; /* 3 or 1.4822e-323f */ /* 13: loadpw */ - var45.i = (int) 0x00000003; /* 3 or 1.4822e-323f */ + var45.i = 0x00000003; /* 3 or 1.4822e-323f */ /* 21: loadpl */ var46.i = ex->params[25]; @@ -842,10 +816,9 @@ _backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ORC_RESTRICT ex) static OrcProgram *_orc_program_orc_opposite_parity_5_tap_planar_yuv; void -orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT a1, - const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, - const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, - const orc_uint8 * ORC_RESTRICT s5, int p2, int n) +orc_opposite_parity_5_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, + const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, + const orc_uint8 * s5, int p2, int n) { OrcExecutor _ex, *ex = &_ex; OrcProgram *p = _orc_program_orc_opposite_parity_5_tap_planar_yuv; @@ -875,6 +848,7 @@ gst_fieldanalysis_orc_init (void) { /* orc_same_parity_sad_planar_yuv */ OrcProgram *p; + OrcCompileResult result; p = orc_program_new (); orc_program_set_name (p, "orc_same_parity_sad_planar_yuv"); @@ -905,13 +879,14 @@ gst_fieldanalysis_orc_init (void) orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); - orc_program_compile (p); + result = orc_program_compile (p); _orc_program_orc_same_parity_sad_planar_yuv = p; } { /* orc_same_parity_ssd_planar_yuv */ OrcProgram *p; + OrcCompileResult result; p = orc_program_new (); orc_program_set_name (p, "orc_same_parity_ssd_planar_yuv"); @@ -940,13 +915,14 @@ gst_fieldanalysis_orc_init (void) orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1); - orc_program_compile (p); + result = orc_program_compile (p); _orc_program_orc_same_parity_ssd_planar_yuv = p; } { /* orc_same_parity_3_tap_planar_yuv */ OrcProgram *p; + OrcCompileResult result; p = orc_program_new (); orc_program_set_name (p, "orc_same_parity_3_tap_planar_yuv"); @@ -1007,13 +983,14 @@ gst_fieldanalysis_orc_init (void) orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T7, ORC_VAR_D1, ORC_VAR_D1); - orc_program_compile (p); + result = orc_program_compile (p); _orc_program_orc_same_parity_3_tap_planar_yuv = p; } { /* orc_opposite_parity_5_tap_planar_yuv */ OrcProgram *p; + OrcCompileResult result; p = orc_program_new (); orc_program_set_name (p, "orc_opposite_parity_5_tap_planar_yuv"); @@ -1071,7 +1048,7 @@ gst_fieldanalysis_orc_init (void) orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1); - orc_program_compile (p); + result = orc_program_compile (p); _orc_program_orc_opposite_parity_5_tap_planar_yuv = p; } diff --git a/gst/fieldanalysis/gstfieldanalysisorc-dist.h b/gst/fieldanalysis/gstfieldanalysisorc-dist.h index a901a2ae5..b46b6fa60 100644 --- a/gst/fieldanalysis/gstfieldanalysisorc-dist.h +++ b/gst/fieldanalysis/gstfieldanalysisorc-dist.h @@ -37,7 +37,6 @@ typedef unsigned __int16 orc_uint16; typedef unsigned __int32 orc_uint32; typedef unsigned __int64 orc_uint64; #define ORC_UINT64_C(x) (x##Ui64) -#define inline __inline #else #include <limits.h> typedef signed char orc_int8; @@ -60,19 +59,10 @@ typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32; typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64; #endif -#ifndef ORC_RESTRICT -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define ORC_RESTRICT restrict -#elif defined(__GNUC__) && __GNUC__ >= 4 -#define ORC_RESTRICT __restrict__ -#else -#define ORC_RESTRICT -#endif -#endif -void orc_same_parity_sad_planar_yuv (guint32 * ORC_RESTRICT a1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int p2, int n); -void orc_same_parity_ssd_planar_yuv (guint32 * ORC_RESTRICT a1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, int p2, int n); -void orc_same_parity_3_tap_planar_yuv (guint32 * ORC_RESTRICT a1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, const orc_uint8 * ORC_RESTRICT s5, const orc_uint8 * ORC_RESTRICT s6, int p2, int n); -void orc_opposite_parity_5_tap_planar_yuv (guint32 * ORC_RESTRICT a1, const orc_uint8 * ORC_RESTRICT s1, const orc_uint8 * ORC_RESTRICT s2, const orc_uint8 * ORC_RESTRICT s3, const orc_uint8 * ORC_RESTRICT s4, const orc_uint8 * ORC_RESTRICT s5, int p2, int n); +void orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1, const orc_uint8 * s2, int p2, int n); +void orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1, const orc_uint8 * s2, int p2, int n); +void orc_same_parity_3_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, const orc_uint8 * s5, const orc_uint8 * s6, int p2, int n); +void orc_opposite_parity_5_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1, const orc_uint8 * s2, const orc_uint8 * s3, const orc_uint8 * s4, const orc_uint8 * s5, int p2, int n); #ifdef __cplusplus } |