summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger_lists@hispeed.ch>2012-05-22 11:03:45 +0300
committerRoland Scheidegger <rscheidegger_lists@hispeed.ch>2012-05-22 11:03:45 +0300
commit885b6025ffcb12e281a24b98f951d535741bebd2 (patch)
treef0475732e6dcc3403d7bcdcc4e6ea49ee4086053 /src
parentb30e1d850e133649493e61dc0ea14d39d15559ba (diff)
downloadxine-lib-885b6025ffcb12e281a24b98f951d535741bebd2.tar.gz
xine-lib-885b6025ffcb12e281a24b98f951d535741bebd2.tar.bz2
Simplify mmx constant loading
Diffstat (limited to 'src')
-rw-r--r--src/post/deinterlace/plugins/greedy2frame.c5
-rw-r--r--src/post/deinterlace/plugins/greedy2frame_template.c15
2 files changed, 8 insertions, 12 deletions
diff --git a/src/post/deinterlace/plugins/greedy2frame.c b/src/post/deinterlace/plugins/greedy2frame.c
index e74046e0e..ef7486300 100644
--- a/src/post/deinterlace/plugins/greedy2frame.c
+++ b/src/post/deinterlace/plugins/greedy2frame.c
@@ -33,6 +33,7 @@
#include <xine/attributes.h>
#include <xine/xineutils.h>
+#include "xine_mmx.h"
#include "deinterlace.h"
#include "speedtools.h"
#include "speedy.h"
@@ -44,8 +45,8 @@
// uncomment next line to see this
//#define CHECK_BOBWEAVE
-static int GreedyTwoFrameThreshold = 4;
-static int GreedyTwoFrameThreshold2 = 8;
+#define GREEDYTWOFRAMETHRESHOLD 4
+#define GREEDYTWOFRAMETHRESHOLD2 8
#define IS_MMXEXT 1
#include "greedy2frame_template.c"
diff --git a/src/post/deinterlace/plugins/greedy2frame_template.c b/src/post/deinterlace/plugins/greedy2frame_template.c
index f9395cefd..9229adc1d 100644
--- a/src/post/deinterlace/plugins/greedy2frame_template.c
+++ b/src/post/deinterlace/plugins/greedy2frame_template.c
@@ -87,8 +87,10 @@
#if !defined(MASKS_DEFINED)
#define MASKS_DEFINED
- static const int64_t __attribute__((__used__)) Mask = 0x7f7f7f7f7f7f7f7fll;
- static int64_t qwGreedyTwoFrameThreshold;
+static const mmx_t Mask = { uq: 0x7f7f7f7f7f7f7f7fll };
+#define TP GREEDYTWOFRAMETHRESHOLD, GREEDYTWOFRAMETHRESHOLD2
+static const mmx_t GreedyTwoFrameThreshold = { ub: {TP, TP, TP, TP} };
+#undef TP
#endif
#if defined(IS_MMXEXT)
@@ -121,13 +123,6 @@ static void DeinterlaceGreedy2Frame_MMX(uint8_t *output, int outstride,
uint32_t LineLength = stride;
uint32_t PitchRest = Pitch - (LineLength >> 3)*8;
- qwGreedyTwoFrameThreshold = GreedyTwoFrameThreshold;
- qwGreedyTwoFrameThreshold += (GreedyTwoFrameThreshold2 << 8);
- qwGreedyTwoFrameThreshold += (qwGreedyTwoFrameThreshold << 48) +
- (qwGreedyTwoFrameThreshold << 32) +
- (qwGreedyTwoFrameThreshold << 16);
-
-
if( second_field ) {
M1 = data->f0;
T1 = data->f0;
@@ -300,7 +295,7 @@ static void DeinterlaceGreedy2Frame_MMX(uint8_t *output, int outstride,
#endif
: "=m" (*Dest2)
- : "m" (*T0), "m" (*B0), "m" (qwGreedyTwoFrameThreshold) );
+ : "m" (*T0), "m" (*B0), "m" (GreedyTwoFrameThreshold) );
/* Advance to the next set of pixels. */
T1 += 8;