summaryrefslogtreecommitdiffstats
path: root/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-08-25 14:37:45 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-08-25 14:37:45 +0000
commit3e4982542b8b085e037da35c65975d7ad1b96e90 (patch)
tree3be2924abb1854dc3beebd17ee78b4516a357616 /gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc
parentc980279fa4ab6bdf782cb3c7c6832caea71c3ee6 (diff)
downloadgst-plugins-bad-3e4982542b8b085e037da35c65975d7ad1b96e90.tar.gz
gst-plugins-bad-3e4982542b8b085e037da35c65975d7ad1b96e90.tar.bz2
gst-plugins-bad-3e4982542b8b085e037da35c65975d7ad1b96e90.zip
gst/deinterlace2/: First part of the C implementation of the tomsmocomp deinterlacing algorithm. This only supports s...
Original commit message from CVS: * gst/deinterlace2/gstdeinterlace2.c: (gst_deinterlace_method_class_init): * gst/deinterlace2/gstdeinterlace2.h: * gst/deinterlace2/tvtime/tomsmocomp.c: (gst_deinterlace_method_tomsmocomp_class_init): * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc: * gst/deinterlace2/tvtime/tomsmocomp/SearchLoopTop.inc: * gst/deinterlace2/tvtime/tomsmocomp/StrangeBob.inc: * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll.inc: * gst/deinterlace2/tvtime/tomsmocomp/TomsMoCompAll2.inc: * gst/deinterlace2/tvtime/tomsmocomp/WierdBob.inc: * gst/deinterlace2/tvtime/tomsmocomp/tomsmocompmacros.h: First part of the C implementation of the tomsmocomp deinterlacing algorithm. This only supports search-effort=0 currently, is painfully slow and needs some cleanup later when all search-effort settings are implemented in C.
Diffstat (limited to 'gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc')
-rw-r--r--gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc56
1 files changed, 51 insertions, 5 deletions
diff --git a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc
index 6b6ee4ca..ce6d2534 100644
--- a/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc
+++ b/gst/deinterlace2/tvtime/tomsmocomp/SearchLoopBottom.inc
@@ -1,11 +1,9 @@
// -*- c++ -*-
-#ifdef IS_SSE2
-//sse2 code deleted for now
-#else
-
// Version for non-SSE2
+#ifndef IS_C
+
#ifdef SKIP_SEARCH
"movq %%mm6, %%mm0\n\t" // just use the results of our wierd bob
#else
@@ -59,6 +57,7 @@
V_MOVNTQ ("(%"XAX", %%"XDX")", "%%mm0")
// pavgb mm1, qword ptr["XBX"+"XCX"]
V_PAVGB ("%%mm1", "(%%"XBX", %%"XCX")", "%%mm2", _ShiftMask)
+ //FIXME: XDX or XAX!!
"addq "_dst_pitchw", %%"XBX
// movntq qword ptr["XAX"+"XDX"], mm1
V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm1")
@@ -71,7 +70,6 @@
LEAX" 8(%%"XDX"), %%"XDX"\n\t" // bump offset pointer
CMPX" "_Last8", %%"XDX"\n\t" // done with line?
"jb 1b\n\t" // y
-#endif
MOVX" "_oldbx", %%"XBX"\n\t"
@@ -114,3 +112,51 @@
}
return 0;
+#else
+#ifdef SKIP_SEARCH
+ out = best; // just use the results of our wierd bob
+#else
+ diff = diff - MIN (diff, 10) - 4;
+ if (diff < 0)
+ out = weave;
+ else
+ out = best;
+
+ out = CLAMP (out, MinVals, MaxVals);
+#endif
+
+#ifdef USE_VERTICAL_FILTER
+ pDest[x] = (out + pBob[0]) / 2;
+ pDest[x + dst_pitchw] = (pBob[src_pitch2] + out) / 2;
+#else
+ pDest[x] = out;
+#endif
+ pBob += 1;
+ pBobP += 1;
+ pSrc += 1;
+ pSrcP += 1;
+ }
+ // adjust for next line
+ pSrc = src_pitch2 * (y+1) + pWeaveSrc;
+ pSrcP = src_pitch2 * (y+1) + pWeaveSrcP;
+ pDest = dst_pitch2 * (y+1) + pWeaveDest + dst_pitch2;
+
+
+ if (TopFirst)
+ {
+ pBob = pCopySrc + src_pitch2;
+ pBobP = pCopySrcP + src_pitch2;
+ }
+ else
+ {
+ pBob = pCopySrc;
+ pBobP = pCopySrcP;
+ }
+
+ pBob += src_pitch2 * (y+1);
+ pBobP += src_pitch2 * (y+1);
+ }
+
+ return 0;
+
+#endif