summaryrefslogtreecommitdiff
path: root/gst/fieldanalysis
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-06-15 16:06:36 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2011-06-15 16:06:36 +0200
commita2b7a672b8826d9fb75f0889741c05ca76ce085f (patch)
treeef634796155235ab30dced5bc687f90bb6e272d3 /gst/fieldanalysis
parent6acbe1894374a51954b6cebd31d74c515d23ea17 (diff)
parenta6c4f3ed4ef8a2ebc4f184a796e8230838bd99a4 (diff)
downloadgstreamer-plugins-bad-a2b7a672b8826d9fb75f0889741c05ca76ce085f.tar.gz
Merge branch 'master' into 0.11
Conflicts: android/aacparse.mk android/amrparse.mk android/h264parse.mk android/metadata.mk android/qtmux.mk android/sdpelem.mk configure.ac gst/qtmux/gstqtmux.c win32/common/config.h
Diffstat (limited to 'gst/fieldanalysis')
-rw-r--r--gst/fieldanalysis/gstfieldanalysis.c81
-rw-r--r--gst/fieldanalysis/gstfieldanalysis.h2
-rw-r--r--gst/fieldanalysis/gstfieldanalysisorc-dist.c121
-rw-r--r--gst/fieldanalysis/gstfieldanalysisorc-dist.h18
4 files changed, 129 insertions, 93 deletions
diff --git a/gst/fieldanalysis/gstfieldanalysis.c b/gst/fieldanalysis/gstfieldanalysis.c
index 5f093320f..21b2e0d6c 100644
--- a/gst/fieldanalysis/gstfieldanalysis.c
+++ b/gst/fieldanalysis/gstfieldanalysis.c
@@ -333,7 +333,9 @@ gst_field_analysis_reset (GstFieldAnalysis * filter)
filter->first_buffer = TRUE;
filter->width = 0;
g_free (filter->comb_mask);
+ filter->comb_mask = NULL;
g_free (filter->block_scores);
+ filter->block_scores = NULL;
}
static void
@@ -630,7 +632,7 @@ gst_field_analysis_set_caps (GstPad * pad, GstCaps * caps)
* returns it */
static GstBuffer *
gst_field_analysis_decorate (GstFieldAnalysis * filter, gboolean tff,
- gboolean onefield, FieldAnalysisConclusion conclusion, gboolean gap)
+ gboolean onefield, FieldAnalysisConclusion conclusion, gboolean drop)
{
GstBuffer *buf = NULL;
GstCaps *caps;
@@ -674,10 +676,11 @@ gst_field_analysis_decorate (GstFieldAnalysis * filter, gboolean tff,
GST_BUFFER_FLAG_UNSET (buf, GST_VIDEO_BUFFER_ONEFIELD);
}
- GST_BUFFER_FLAG_UNSET (buf, GST_VIDEO_BUFFER_RFF);
-
- if (gap)
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_GAP);
+ if (drop) {
+ GST_BUFFER_FLAG_SET (buf, GST_VIDEO_BUFFER_RFF);
+ } else {
+ GST_BUFFER_FLAG_UNSET (buf, GST_VIDEO_BUFFER_RFF);
+ }
if (conclusion == FIELD_ANALYSIS_TELECINE_PROGRESSIVE || (filter->is_telecine
&& conclusion == FIELD_ANALYSIS_PROGRESSIVE))
@@ -704,12 +707,12 @@ gst_field_analysis_decorate (GstFieldAnalysis * filter, gboolean tff,
gst_caps_unref (caps);
GST_DEBUG_OBJECT (filter,
- "Pushing buffer with flags: %p (%p), p %d, tff %d, 1f %d, gap %d; conc %d",
+ "Pushing buffer with flags: %p (%p), p %d, tff %d, 1f %d, drop %d; conc %d",
GST_BUFFER_DATA (buf), buf,
GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_PROGRESSIVE),
GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_TFF),
GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_ONEFIELD),
- GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_GAP), conclusion);
+ GST_BUFFER_FLAG_IS_SET (buf, GST_VIDEO_BUFFER_RFF), conclusion);
return buf;
}
@@ -1397,7 +1400,7 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
res0->conclusion = FIELD_ANALYSIS_INTERLACED;
}
res0->holding = -1; /* needed fields unknown */
- res0->gap = FALSE;
+ res0->drop = FALSE;
}
if (n_queued >= 2) {
@@ -1452,11 +1455,11 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
/* prev P, cur repeated => cur P */
res0->conclusion = FIELD_ANALYSIS_TELECINE_PROGRESSIVE;
res0->holding = 1 + BOTH_FIELDS;
- /* push prev P, GAP */
- res1->gap = TRUE;
+ /* push prev P, RFF */
+ res1->drop = TRUE;
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
} else {
/* prev P, cur t xor b matches => cur TCM */
res0->conclusion = FIELD_ANALYSIS_TELECINE_MIXED;
@@ -1465,7 +1468,7 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
/* push prev P */
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
}
} else {
/* prev !P */
@@ -1506,7 +1509,7 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
/* push 1F held field */
outbuf =
gst_field_analysis_decorate (filter, !(res1->holding - 1), TRUE,
- res1->conclusion, res1->gap);
+ res1->conclusion, res1->drop);
} else if (res0->f > filter->frame_thresh && ((t
&& telecine_matches & FIELD_ANALYSIS_BOTTOM_TOP) || (b
&& telecine_matches & FIELD_ANALYSIS_TOP_BOTTOM))) {
@@ -1521,7 +1524,7 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
/* push 1F held field */
outbuf =
gst_field_analysis_decorate (filter, !(res1->holding - 1), TRUE,
- res1->conclusion, res1->gap);
+ res1->conclusion, res1->drop);
} else if (first_buffer && (telecine_matches & FIELD_ANALYSIS_BOTTOM_TOP
|| telecine_matches & FIELD_ANALYSIS_TOP_BOTTOM)) {
/* non-matched field is an orphan in the first buffer - push orphan as 1F */
@@ -1531,18 +1534,18 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
/* push 1F held field */
outbuf =
gst_field_analysis_decorate (filter, !(res1->holding - 1), TRUE,
- res1->conclusion, res1->gap);
+ res1->conclusion, res1->drop);
} else if (res1->holding == 1 + BOTH_FIELDS || res1->holding == -1) {
/* holding both fields, push prev as is */
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
} else {
- /* push prev as is with GAP */
- res1->gap = TRUE;
+ /* push prev as is with RFF */
+ res1->drop = TRUE;
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
}
}
} else if (res0->f <= filter->frame_thresh) {
@@ -1553,19 +1556,19 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
/* holding both fields, push prev as is */
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
} else if (res1->holding > 0) {
/* holding one field, push prev 1F held */
outbuf =
gst_field_analysis_decorate (filter, !(res1->holding - 1), TRUE,
- res1->conclusion, res1->gap);
+ res1->conclusion, res1->drop);
} else {
- /* unknown or no fields held, push prev as is with GAP */
- /* this will push unknown as gap - should be pushed as not gap? */
- res1->gap = TRUE;
+ /* unknown or no fields held, push prev as is with RFF */
+ /* this will push unknown as drop - should be pushed as not drop? */
+ res1->drop = TRUE;
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
}
} else {
/* cur !P */
@@ -1588,57 +1591,57 @@ gst_field_analysis_process_buffer (GstFieldAnalysis * filter,
/* push prev as is */
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
} else if ((t && telecine_matches & FIELD_ANALYSIS_TOP_BOTTOM) || (b
&& telecine_matches & FIELD_ANALYSIS_BOTTOM_TOP)) {
/* held is opposite to matched => need both field from prev */
/* if t_b, hold bottom from prev and top from current, else vice-versa */
- res1->holding = 1 + ! !(telecine_matches & FIELD_ANALYSIS_TOP_BOTTOM);
+ res1->holding = 1 + !!(telecine_matches & FIELD_ANALYSIS_TOP_BOTTOM);
res0->holding = 1 + !(telecine_matches & FIELD_ANALYSIS_TOP_BOTTOM);
/* push prev TCM */
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
} else if ((res1->holding > 0 && res1->holding != 1 + BOTH_FIELDS) || (t
&& telecine_matches & FIELD_ANALYSIS_BOTTOM_TOP) || (b
&& telecine_matches & FIELD_ANALYSIS_TOP_BOTTOM)) {
/* held field is needed, push prev 1F held */
outbuf =
gst_field_analysis_decorate (filter, !(res1->holding - 1), TRUE,
- res1->conclusion, res1->gap);
+ res1->conclusion, res1->drop);
} else {
/* holding none or unknown */
- /* push prev as is with GAP */
- res1->gap = TRUE;
+ /* push prev as is with RFF */
+ res1->drop = TRUE;
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
}
} else {
/* cur I */
res0->conclusion = FIELD_ANALYSIS_INTERLACED;
res0->holding = 1 + BOTH_FIELDS;
/* push prev appropriately */
- res1->gap = res1->holding <= 0;
+ res1->drop = res1->holding <= 0;
if (res1->holding != 0) {
- res1->gap = FALSE;
+ res1->drop = FALSE;
if (res1->holding == 1 + BOTH_FIELDS || res1->holding == -1) {
/* push prev as is */
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE,
- res1->conclusion, res1->gap);
+ res1->conclusion, res1->drop);
} else {
/* push prev 1F held */
outbuf =
gst_field_analysis_decorate (filter, !(res1->holding - 1), TRUE,
- res1->conclusion, res1->gap);
+ res1->conclusion, res1->drop);
}
} else {
- /* push prev as is with GAP */
- res1->gap = TRUE;
+ /* push prev as is with RFF */
+ res1->drop = TRUE;
outbuf =
gst_field_analysis_decorate (filter, -1, FALSE, res1->conclusion,
- res1->gap);
+ res1->drop);
}
}
}
diff --git a/gst/fieldanalysis/gstfieldanalysis.h b/gst/fieldanalysis/gstfieldanalysis.h
index 7b95871af..a7a638d15 100644
--- a/gst/fieldanalysis/gstfieldanalysis.h
+++ b/gst/fieldanalysis/gstfieldanalysis.h
@@ -91,7 +91,7 @@ struct _FieldAnalysis
FieldAnalysisConclusion conclusion;
/* -1 - unknown; 0 - holding none; 1 - top field; 2 - bottom field; 3 - both */
gint holding;
- gboolean gap;
+ gboolean drop;
};
typedef enum
diff --git a/gst/fieldanalysis/gstfieldanalysisorc-dist.c b/gst/fieldanalysis/gstfieldanalysisorc-dist.c
index 969916376..9b4e39abd 100644
--- a/gst/fieldanalysis/gstfieldanalysisorc-dist.c
+++ b/gst/fieldanalysis/gstfieldanalysisorc-dist.c
@@ -4,9 +4,6 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#ifndef DISABLE_ORC
-#include <orc/orc.h>
-#endif
#include <glib.h>
#ifndef _ORC_INTEGER_TYPEDEFS_
@@ -32,6 +29,7 @@ typedef unsigned __int16 orc_uint16;
typedef unsigned __int32 orc_uint32;
typedef unsigned __int64 orc_uint64;
#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
#else
#include <limits.h>
typedef signed char orc_int8;
@@ -71,17 +69,34 @@ typedef union
orc_int16 x4[4];
} orc_union64;
#endif
+#ifndef ORC_RESTRICT
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#define ORC_RESTRICT restrict
+#elif defined(__GNUC__) && __GNUC__ >= 4
+#define ORC_RESTRICT __restrict__
+#else
+#define ORC_RESTRICT
+#endif
+#endif
-void orc_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);
+#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 gst_fieldanalysis_orc_init (void);
@@ -117,6 +132,7 @@ 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
@@ -124,6 +140,7 @@ void gst_fieldanalysis_orc_init (void);
#else
#define ORC_RESTRICT
#endif
+#endif
/* end Orc C target preamble */
@@ -131,8 +148,9 @@ void gst_fieldanalysis_orc_init (void);
/* orc_same_parity_sad_planar_yuv */
#ifdef DISABLE_ORC
void
-orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1,
- const orc_uint8 * s2, int p2, int n)
+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)
{
int i;
const orc_int8 *ORC_RESTRICT ptr4;
@@ -183,7 +201,7 @@ orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1,
#else
static void
-_backup_orc_same_parity_sad_planar_yuv (OrcExecutor * ex)
+_backup_orc_same_parity_sad_planar_yuv (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -235,8 +253,9 @@ _backup_orc_same_parity_sad_planar_yuv (OrcExecutor * ex)
static OrcProgram *_orc_program_orc_same_parity_sad_planar_yuv;
void
-orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1,
- const orc_uint8 * s2, int p2, int n)
+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)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_orc_same_parity_sad_planar_yuv;
@@ -259,8 +278,9 @@ orc_same_parity_sad_planar_yuv (guint32 * a1, const orc_uint8 * s1,
/* orc_same_parity_ssd_planar_yuv */
#ifdef DISABLE_ORC
void
-orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1,
- const orc_uint8 * s2, int p2, int n)
+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)
{
int i;
const orc_int8 *ORC_RESTRICT ptr4;
@@ -308,7 +328,7 @@ orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1,
#else
static void
-_backup_orc_same_parity_ssd_planar_yuv (OrcExecutor * ex)
+_backup_orc_same_parity_ssd_planar_yuv (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -357,8 +377,9 @@ _backup_orc_same_parity_ssd_planar_yuv (OrcExecutor * ex)
static OrcProgram *_orc_program_orc_same_parity_ssd_planar_yuv;
void
-orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1,
- const orc_uint8 * s2, int p2, int n)
+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)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_orc_same_parity_ssd_planar_yuv;
@@ -381,9 +402,11 @@ orc_same_parity_ssd_planar_yuv (guint32 * a1, const orc_uint8 * s1,
/* orc_same_parity_3_tap_planar_yuv */
#ifdef DISABLE_ORC
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)
+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)
{
int i;
const orc_int8 *ORC_RESTRICT ptr4;
@@ -484,7 +507,7 @@ orc_same_parity_3_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1,
#else
static void
-_backup_orc_same_parity_3_tap_planar_yuv (OrcExecutor * ex)
+_backup_orc_same_parity_3_tap_planar_yuv (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -586,9 +609,11 @@ _backup_orc_same_parity_3_tap_planar_yuv (OrcExecutor * ex)
static OrcProgram *_orc_program_orc_same_parity_3_tap_planar_yuv;
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)
+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)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_orc_same_parity_3_tap_planar_yuv;
@@ -615,9 +640,10 @@ orc_same_parity_3_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1,
/* orc_opposite_parity_5_tap_planar_yuv */
#ifdef DISABLE_ORC
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)
+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)
{
int i;
const orc_int8 *ORC_RESTRICT ptr4;
@@ -658,9 +684,9 @@ orc_opposite_parity_5_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1,
ptr8 = (orc_int8 *) s5;
/* 11: loadpw */
- var44.i = 0x00000003; /* 3 or 1.4822e-323f */
+ var44.i = (int) 0x00000003; /* 3 or 1.4822e-323f */
/* 13: loadpw */
- var45.i = 0x00000003; /* 3 or 1.4822e-323f */
+ var45.i = (int) 0x00000003; /* 3 or 1.4822e-323f */
/* 21: loadpl */
var46.i = p2;
@@ -716,7 +742,7 @@ orc_opposite_parity_5_tap_planar_yuv (guint32 * a1, const orc_uint8 * s1,
#else
static void
-_backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ex)
+_backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ORC_RESTRICT ex)
{
int i;
int n = ex->n;
@@ -758,9 +784,9 @@ _backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ex)
ptr8 = (orc_int8 *) ex->arrays[8];
/* 11: loadpw */
- var44.i = 0x00000003; /* 3 or 1.4822e-323f */
+ var44.i = (int) 0x00000003; /* 3 or 1.4822e-323f */
/* 13: loadpw */
- var45.i = 0x00000003; /* 3 or 1.4822e-323f */
+ var45.i = (int) 0x00000003; /* 3 or 1.4822e-323f */
/* 21: loadpl */
var46.i = ex->params[25];
@@ -816,9 +842,10 @@ _backup_orc_opposite_parity_5_tap_planar_yuv (OrcExecutor * ex)
static OrcProgram *_orc_program_orc_opposite_parity_5_tap_planar_yuv;
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)
+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)
{
OrcExecutor _ex, *ex = &_ex;
OrcProgram *p = _orc_program_orc_opposite_parity_5_tap_planar_yuv;
@@ -848,7 +875,6 @@ 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");
@@ -879,14 +905,13 @@ gst_fieldanalysis_orc_init (void)
orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ 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");
@@ -915,14 +940,13 @@ gst_fieldanalysis_orc_init (void)
orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ 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");
@@ -983,14 +1007,13 @@ gst_fieldanalysis_orc_init (void)
orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T7, ORC_VAR_D1,
ORC_VAR_D1);
- result = orc_program_compile (p);
+ 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");
@@ -1048,7 +1071,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);
- result = orc_program_compile (p);
+ 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 b46b6fa60..a901a2ae5 100644
--- a/gst/fieldanalysis/gstfieldanalysisorc-dist.h
+++ b/gst/fieldanalysis/gstfieldanalysisorc-dist.h
@@ -37,6 +37,7 @@ typedef unsigned __int16 orc_uint16;
typedef unsigned __int32 orc_uint32;
typedef unsigned __int64 orc_uint64;
#define ORC_UINT64_C(x) (x##Ui64)
+#define inline __inline
#else
#include <limits.h>
typedef signed char orc_int8;
@@ -59,10 +60,19 @@ typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
#endif
-void 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);
+#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);
#ifdef __cplusplus
}