Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 164425 | Differences between
and this patch

Collapse All | Expand All

(-)xine-lib-1.1.12-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc (-2 / +2 lines)
Lines 7-15 Link Here
7
// up by a little, and adjust later
7
// up by a little, and adjust later
8
8
9
#ifdef IS_SSE2
9
#ifdef IS_SSE2
10
		"paddusb "MANGLE(ONES)", %%xmm7\n\t"				// bias toward no motion
10
		"paddusb "_ONES", %%xmm7\n\t"				// bias toward no motion
11
#else
11
#else
12
		"paddusb "MANGLE(ONES)", %%mm7\n\t" 				// bias toward no motion
12
		"paddusb "_ONES", %%mm7\n\t" 				// bias toward no motion
13
#endif
13
#endif
14
14
15
        MERGE4PIXavg("(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")")  // center, in old and new
15
        MERGE4PIXavg("(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")")  // center, in old and new
(-)xine-lib-1.1.12-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc (-22 / +32 lines)
Lines 18-24 Link Here
18
            // Use the best weave if diffs less than 10 as that
18
            // Use the best weave if diffs less than 10 as that
19
            // means the image is still or moving cleanly
19
            // means the image is still or moving cleanly
20
            // if there is motion we will clip which will catch anything
20
            // if there is motion we will clip which will catch anything
21
            "psubusb "MANGLE(FOURS)", %%mm7\n\t"          // sets bits to zero if weave diff < 4
21
            "psubusb "_FOURS", %%mm7\n\t"          // sets bits to zero if weave diff < 4
22
            "pxor    %%mm0, %%mm0\n\t"
22
            "pxor    %%mm0, %%mm0\n\t"
23
            "pcmpeqb %%mm0, %%mm7\n\t"            // all ff where weave better, else 00
23
            "pcmpeqb %%mm0, %%mm7\n\t"            // all ff where weave better, else 00
24
            "pcmpeqb %%mm7, %%mm0\n\t"            // all ff where bob better, else 00
24
            "pcmpeqb %%mm7, %%mm0\n\t"            // all ff where bob better, else 00
Lines 28-37 Link Here
28
#else
28
#else
29
            // Use the better of bob or weave
29
            // Use the better of bob or weave
30
            //      pminub  mm4, TENS           // the most we care about
30
            //      pminub  mm4, TENS           // the most we care about
31
            V_PMINUB ("%%mm4", MANGLE(TENS), "%%mm0")   // the most we care about
31
            V_PMINUB ("%%mm4", _TENS, "%%mm0")   // the most we care about
32
            
32
            
33
            "psubusb %%mm4, %%mm7\n\t"            // foregive that much from weave est?
33
            "psubusb %%mm4, %%mm7\n\t"            // foregive that much from weave est?
34
            "psubusb "MANGLE(FOURS)", %%mm7\n\t"       // bias it a bit toward weave
34
            "psubusb "_FOURS", %%mm7\n\t"       // bias it a bit toward weave
35
            "pxor    %%mm0, %%mm0\n\t"
35
            "pxor    %%mm0, %%mm0\n\t"
36
            "pcmpeqb %%mm0, %%mm7\n\t"            // all ff where weave better, else 00
36
            "pcmpeqb %%mm0, %%mm7\n\t"            // all ff where weave better, else 00
37
            "pcmpeqb %%mm7, %%mm0\n\t"            // all ff where bob better, else 00
37
            "pcmpeqb %%mm7, %%mm0\n\t"            // all ff where bob better, else 00
Lines 42-80 Link Here
42
            
42
            
43
            
43
            
44
                //      pminub  mm0, Max_Vals       // but clip to catch the stray error
44
                //      pminub  mm0, Max_Vals       // but clip to catch the stray error
45
//                V_PMINUB ("%%mm0", MANGLE(Max_Vals), "%%mm1") // but clip to catch the stray error
45
//                V_PMINUB ("%%mm0", _Max_Vals, "%%mm1") // but clip to catch the stray error
46
                //      pmaxub  mm0, Min_Vals
46
                //      pmaxub  mm0, Min_Vals
47
//                V_PMAXUB ("%%mm0", MANGLE(Min_Vals))
47
//                V_PMAXUB ("%%mm0", _Min_Vals)
48
                
48
                
49
#endif
49
#endif
50
50
51
51
52
            MOVX"     "_pDest", %%"XAX"\n\t"
52
            MOVX"     "_pDest", %%"XAX"\n\t"
53
                
53
            ADDX"     "_olddx", %%"XAX"\n\t"
54
54
#ifdef USE_VERTICAL_FILTER
55
#ifdef USE_VERTICAL_FILTER
55
            "movq    %%mm0, %%mm1\n\t"
56
            "movq    %%mm0, %%mm1\n\t"
56
            //      pavgb   mm0, qword ptr["XBX"]
57
            //      pavgb   mm0, qword ptr["XDX"]
57
            V_PAVGB ("%%mm0", "(%%"XBX")", "%%mm2", MANGLE(ShiftMask))
58
            V_PAVGB ("%%mm0", "(%%"XDX")", "%%mm2", _ShiftMask)
58
            //      movntq  qword ptr["XAX"+"XDX"], mm0
59
            //      movntq  qword ptr["XAX"+"_olddx"], mm0
59
            V_MOVNTQ ("(%"XAX", %%"XDX")", "%%mm0")
60
            V_MOVNTQ ("(%"XAX")", "%%mm0")
60
            //      pavgb   mm1, qword ptr["XBX"+"XCX"]
61
            //      pavgb   mm1, qword ptr["XDX"+"XCX"]
61
            V_PAVGB ("%%mm1", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask))
62
            V_PAVGB ("%%mm1", "(%%"XDX", %%"XCX")", "%%mm2", _ShiftMask)
62
            "addq   "_dst_pitchw", %%"XBX
63
            "addq   "_dst_pitchw", %%"XDX
63
            //      movntq  qword ptr["XAX"+"XDX"], mm1
64
            //      movntq  qword ptr["XAX"+"_olddx"], mm1
64
            V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm1")
65
            V_MOVNTQ ("(%%"XAX")", "%%mm1")
65
#else
66
#else
66
                
67
                
67
            //      movntq  qword ptr["XAX"+"XDX"], mm0
68
            //      movntq  qword ptr["XAX"+"_olddx"], mm0
68
                V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm0")
69
                V_MOVNTQ ("(%%"XAX")", "%%mm0")
69
#endif
70
#endif
70
                
71
                
71
           LEAX"    8(%%"XDX"), %%"XDX"\n\t"       // bump offset pointer
72
           ADDX"    $8, "_olddx"\n\t"       // bump offset pointer
72
           CMPX"    "_Last8", %%"XDX"\n\t"       // done with line?
73
           MOVX"    "_olddx", %%"XAX"\n\t"
74
           CMPX"    "_Last8", %%"XAX"\n\t"       // done with line?
73
           "jb      1b\n\t"                    // y
75
           "jb      1b\n\t"                    // y
74
#endif
76
#endif
75
77
76
           MOVX" "_oldbx", %%"XBX"\n\t"
77
78
        : /* no outputs */
78
        : /* no outputs */
79
79
80
        : "m"(pBob),
80
        : "m"(pBob),
Lines 85-91 Link Here
85
          "m"(pSrc),
85
          "m"(pSrc),
86
          "m"(pSrcP),
86
          "m"(pSrcP),
87
          "m"(pBobP),
87
          "m"(pBobP),
88
          "m"(oldbx)
88
          "m"(olddx),
89
          "m"(UVMask),
90
          "m"(ShiftMask),
91
          "m"(FOURS),
92
          "m"(TENS),
93
          "m"(Max_Vals),
94
          "m"(Min_Vals),
95
          "m"(YMask),
96
          "m"(Max_Mov),
97
          "m"(ONES),
98
          "m"(DiffThres)
89
99
90
        : XAX, XCX, XDX, XSI, XDI,
100
        : XAX, XCX, XDX, XSI, XDI,
91
#ifdef ARCH_X86
101
#ifdef ARCH_X86
(-)xine-lib-1.1.12-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc (-28 / +38 lines)
Lines 66-72 long dst_pitchw = dst_pitch; // local s Link Here
66
#define _pSrc       "%5"
66
#define _pSrc       "%5"
67
#define _pSrcP      "%6"
67
#define _pSrcP      "%6"
68
#define _pBobP      "%7"
68
#define _pBobP      "%7"
69
#define _oldbx      "%8"
69
#define _olddx      "%8"
70
#define _UVMask     "%9"
71
#define _ShiftMask  "%10"
72
#define _FOURS      "%11"
73
#define _TENS       "%12"
74
#define _Max_Vals   "%13"
75
#define _Min_Vals   "%14"
76
#define _YMask      "%15"
77
#define _Max_Mov    "%16"
78
#define _ONES       "%17"
79
#define _DiffThres  "%18"
70
#endif
80
#endif
71
81
72
	for (y=1; y < FldHeight-1; y++)
82
	for (y=1; y < FldHeight-1; y++)
Lines 77-151 long dst_pitchw = dst_pitch; // local s Link Here
77
             // Loop general reg usage
87
             // Loop general reg usage
78
             //
88
             //
79
             // XAX - pBobP, then pDest 
89
             // XAX - pBobP, then pDest 
80
             // XBX - pBob
90
             // XDX - pBob
81
             // XCX - src_pitch2
91
             // XCX - src_pitch2
82
             // XDX - current offset
92
             // _olddx - current offset
83
             // XDI - prev weave pixels, 1 line up
93
             // XDI - prev weave pixels, 1 line up
84
             // XSI - next weave pixels, 1 line up
94
             // XSI - next weave pixels, 1 line up
85
95
86
             // Save "XBX" (-fPIC)
87
	     MOVX" %%"XBX", "_oldbx"\n\t"
88
             
89
#ifdef IS_SSE2
96
#ifdef IS_SSE2
90
             
97
             
91
             // sse2 code deleted for now
98
             // sse2 code deleted for now
92
99
93
#else
100
#else
94
             // simple bob first 8 bytes
101
             // simple bob first 8 bytes
95
             MOVX"	"_pBob",        %%"XBX"\n\t"
102
             MOVX"	"_pBob",        %%"XDX"\n\t"
96
             MOVX"	"_src_pitch2",  %%"XCX"\n\t"
103
             MOVX"	"_src_pitch2",  %%"XCX"\n\t"
97
104
98
#ifdef USE_VERTICAL_FILTER
105
#ifdef USE_VERTICAL_FILTER
99
             "movq	    (%%"XBX"),        %%mm0\n\t"
106
             "movq	    (%%"XDX"),        %%mm0\n\t"
100
             "movq	    (%%"XBX", %%"XCX"), %%mm1\n\t" //, qword ptr["XBX"+"XCX"]
107
             "movq	    (%%"XDX", %%"XCX"), %%mm1\n\t" //, qword ptr["XDX"+"XCX"]
101
             "movq	    %%mm0,          %%mm2\n\t"
108
             "movq	    %%mm0,          %%mm2\n\t"
102
             V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))		// halfway between
109
             V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)		// halfway between
103
             V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask))		// 1/4 way
110
             V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask)		// 1/4 way
104
             V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask))		// 3/4 way
111
             V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask)		// 3/4 way
105
             MOVX"		"_pDest",       %%"XDI"\n\t"
112
             MOVX"		"_pDest",       %%"XDI"\n\t"
106
             MOVX"		"_dst_pitchw",  %%"XAX"\n\t"
113
             MOVX"		"_dst_pitchw",  %%"XAX"\n\t"
107
             V_MOVNTQ	("(%%"XDI")", "%%mm0")
114
             V_MOVNTQ	("(%%"XDI")", "%%mm0")
108
             V_MOVNTQ	("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1
115
             V_MOVNTQ	("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1
109
116
110
             // simple bob last 8 bytes
117
             // simple bob last 8 bytes
111
             MOVX"		"_Last8", %%"XDX"\n\t"
118
             MOVX"		"_Last8", %%"XSI"\n\t"
112
             LEAX"		(%%"XBX", %%"XDX"), %%"XSI"\n\t"  // ["XBX"+"XDX"]
119
             MOVX"		%%"XSI", "_olddx"\n\t"
120
             ADDX"		%%"XDX", %%"XSI"\n\t"  // ["XDX"+"_olddx"]
113
             "movq	    (%%"XSI"), %%mm0\n\t"
121
             "movq	    (%%"XSI"), %%mm0\n\t"
114
             "movq	    (%%"XSI", %%"XCX"), %%mm1\n\t"    // qword ptr["XSI"+"XCX"]
122
             "movq	    (%%"XSI", %%"XCX"), %%mm1\n\t"    // qword ptr["XSI"+"XCX"]
115
             "movq	    %%mm0, %%mm2\n\t"
123
             "movq	    %%mm0, %%mm2\n\t"
116
             V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))		// halfway between
124
             V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)		// halfway between
117
             V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask))		// 1/4 way
125
             V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask)		// 1/4 way
118
             V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask))		// 3/4 way
126
             V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask)		// 3/4 way
119
             ADDX"		%%"XDX", %%"XDI"\n\t"						// last 8 bytes of dest
127
             ADDX"		"_olddx", %%"XDI"\n\t"						// last 8 bytes of dest
120
             V_MOVNTQ	("%%"XDI"", "%%mm0")
128
             V_MOVNTQ	("%%"XDI"", "%%mm0")
121
             V_MOVNTQ	("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1)
129
             V_MOVNTQ	("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1)
122
130
123
#else
131
#else
124
             "movq	(%%"XBX"), %%mm0\n\t"
132
             "movq	(%%"XDX"), %%mm0\n\t"
125
             //		pavgb	mm0, qword ptr["XBX"+"XCX"]
133
             //		pavgb	mm0, qword ptr["XDX"+"XCX"]
126
             V_PAVGB ("%%mm0", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XBX"+"XCX"], mm2, ShiftMask)
134
             V_PAVGB ("%%mm0", "(%%"XDX", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XDX"+"XCX"], mm2, ShiftMask)
127
             MOVX"		"_pDest", %%"XDI"\n\t"
135
             MOVX"		"_pDest", %%"XDI"\n\t"
128
             V_MOVNTQ	("(%%"XDI")", "%%mm0")
136
             V_MOVNTQ	("(%%"XDI")", "%%mm0")
129
137
130
             // simple bob last 8 bytes
138
             // simple bob last 8 bytes
131
             MOVX"		"_Last8", %%"XDX"\n\t"
139
             MOVX"		"_Last8", %%"XSI"\n\t"
132
             LEAX"		(%%"XBX", %%"XDX"), %%"XSI"\n\t" //"XSI", ["XBX"+"XDX"]
140
             MOVX"		%%"XSI", "_olddx"\n\t"
141
             ADDX"		%%"XDX", %%"XSI"\n\t" //"XSI", ["XDX"+"_olddx"]
133
             "movq	    (%%"XSI"), %%mm0\n\t"
142
             "movq	    (%%"XSI"), %%mm0\n\t"
134
             //		pavgb	mm0, qword ptr["XSI"+"XCX"]
143
             //		pavgb	mm0, qword ptr["XSI"+"XCX"]
135
             V_PAVGB	("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XSI"+"XCX"], mm2, ShiftMask)
144
             V_PAVGB	("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XSI"+"XCX"], mm2, ShiftMask)
136
             V_MOVNTQ	("(%%"XDI", %%"XDX")", "%%mm0") // qword ptr["XDI"+"XDX"], mm0)
145
             ADDX"		"_olddx", %%"XDI"\n\t"
146
             V_MOVNTQ	("(%%"XDI")", "%%mm0") // qword ptr["XDI"+"_olddx"], mm0)
137
#endif
147
#endif
138
             // now loop and get the middle qwords
148
             // now loop and get the middle qwords
139
             MOVX"		"_pSrc", %%"XSI"\n\t"
149
             MOVX"		"_pSrc", %%"XSI"\n\t"
140
             MOVX"		"_pSrcP", %%"XDI"\n\t"
150
             MOVX"		"_pSrcP", %%"XDI"\n\t"
141
             MOVX"		$8, %%"XDX"\n\t"				// curr offset longo all lines
151
             MOVX"		$8, "_olddx"\n\t"				// curr offset longo all lines
142
152
143
             "1:\n\t"	
153
             "1:\n\t"	
144
             MOVX"		"_pBobP", %%"XAX"\n\t"
154
             MOVX"		"_pBobP", %%"XAX"\n\t"
145
             ADDX"		$8, %%"XDI"\n\t"
155
             ADDX"		$8, %%"XDI"\n\t"
146
             ADDX"		$8, %%"XSI"\n\t"
156
             ADDX"		$8, %%"XSI"\n\t"
147
             ADDX"		$8, %%"XBX"\n\t"
157
             ADDX"		$8, %%"XDX"\n\t"
148
             ADDX"		%%"XDX", %%"XAX"\n\t"
158
             ADDX"		"_olddx", %%"XAX"\n\t"
149
159
150
#ifdef USE_STRANGE_BOB
160
#ifdef USE_STRANGE_BOB
151
#include "StrangeBob.inc"
161
#include "StrangeBob.inc"
(-)xine-lib-1.1.12-old/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc (-40 / +40 lines)
Lines 31-52 Link Here
31
        "pxor %%mm6, %%mm6\n\t"
31
        "pxor %%mm6, %%mm6\n\t"
32
        "pxor %%mm7, %%mm7\n\t"
32
        "pxor %%mm7, %%mm7\n\t"
33
33
34
		"movq    -2(%%"XBX"), %%mm0\n\t"		// value a from top left		
34
		"movq    -2(%%"XDX"), %%mm0\n\t"		// value a from top left		
35
		"movq    -4(%%"XBX", %%"XCX"), %%mm1\n\t"	// value m from bottom right			
35
		"movq    -4(%%"XDX", %%"XCX"), %%mm1\n\t"	// value m from bottom right			
36
        
36
        
37
		"movq	%%mm0, %%mm3\n\t"
37
		"movq	%%mm0, %%mm3\n\t"
38
		"psubusb	%%mm1, %%mm3\n\t"
38
		"psubusb	%%mm1, %%mm3\n\t"
39
		"psubusb %%mm0, %%mm1\n\t"
39
		"psubusb %%mm0, %%mm1\n\t"
40
		"por		%%mm1, %%mm3\n\t"					// abs(a,m)
40
		"por		%%mm1, %%mm3\n\t"					// abs(a,m)
41
41
42
		"psubusb "MANGLE(DiffThres)", %%mm3\n\t"		// nonzero where abs(a,m) > Thres else 0
42
		"psubusb "_DiffThres", %%mm3\n\t"		// nonzero where abs(a,m) > Thres else 0
43
		"pxor	%%mm4, %%mm4\n\t"
43
		"pxor	%%mm4, %%mm4\n\t"
44
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(a,m) < Thres, else 00	
44
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(a,m) < Thres, else 00	
45
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(a,m) > Thres, else 00
45
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(a,m) > Thres, else 00
46
46
47
47
48
		"movq    -4(%%"XBX"), %%mm0\n\t"		// value j
48
		"movq    -4(%%"XDX"), %%mm0\n\t"		// value j
49
		"movq    4(%%"XBX", %%"XCX"), %%mm1\n\t"	// value n
49
		"movq    4(%%"XDX", %%"XCX"), %%mm1\n\t"	// value n
50
		"movq	%%mm0, %%mm2\n\t"					
50
		"movq	%%mm0, %%mm2\n\t"					
51
		"pavgb	%%mm1, %%mm2\n\t"					// avg(j,n)
51
		"pavgb	%%mm1, %%mm2\n\t"					// avg(j,n)
52
        "movq	%%mm0, %%mm3\n\t"
52
        "movq	%%mm0, %%mm3\n\t"
Lines 55-61 Link Here
55
		"por		%%mm1, %%mm0\n\t"					// abs(j,n)
55
		"por		%%mm1, %%mm0\n\t"					// abs(j,n)
56
56
57
        "movq    %%mm0, %%mm1\n\t"
57
        "movq    %%mm0, %%mm1\n\t"
58
		"psubusb "MANGLE(DiffThres)", %%mm1\n\t"		// nonzero where abs(j,n) > Thres else 0
58
		"psubusb "_DiffThres", %%mm1\n\t"		// nonzero where abs(j,n) > Thres else 0
59
		"pxor	%%mm3, %%mm3\n\t"
59
		"pxor	%%mm3, %%mm3\n\t"
60
		"pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(j,n) < Thres, else 00	
60
		"pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(j,n) < Thres, else 00	
61
61
Lines 75-105 Link Here
75
        "por     %%mm0, %%mm7\n\t"
75
        "por     %%mm0, %%mm7\n\t"
76
        
76
        
77
        // k & m
77
        // k & m
78
		"movq    2(%%"XBX"), %%mm0\n\t"		// value c from top left		
78
		"movq    2(%%"XDX"), %%mm0\n\t"		// value c from top left		
79
		"movq    4(%%"XBX", %%"XCX"), %%mm1\n\t"	// value n from bottom right			
79
		"movq    4(%%"XDX", %%"XCX"), %%mm1\n\t"	// value n from bottom right			
80
80
81
		"movq	%%mm0, %%mm3\n\t"
81
		"movq	%%mm0, %%mm3\n\t"
82
		"psubusb	%%mm1, %%mm3\n\t"
82
		"psubusb	%%mm1, %%mm3\n\t"
83
		"psubusb %%mm0, %%mm1\n\t"
83
		"psubusb %%mm0, %%mm1\n\t"
84
		"por		%%mm1, %%mm3\n\t"					// abs(c,n)
84
		"por		%%mm1, %%mm3\n\t"					// abs(c,n)
85
85
86
		"psubusb "MANGLE(DiffThres)", %%mm3\n\t"		// nonzero where abs(c,n) > Thres else 0
86
		"psubusb "_DiffThres", %%mm3\n\t"		// nonzero where abs(c,n) > Thres else 0
87
		"pxor	%%mm4, %%mm4\n\t"
87
		"pxor	%%mm4, %%mm4\n\t"
88
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(c,n) < Thres, else 00	
88
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(c,n) < Thres, else 00	
89
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(c,n) > Thres, else 00
89
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(c,n) > Thres, else 00
90
90
91
91
92
		"movq    4(%%"XBX"), %%mm0\n\t"		// value k
92
		"movq    4(%%"XDX"), %%mm0\n\t"		// value k
93
		"movq    -4(%%"XBX", %%"XCX"), %%mm1\n\t"	// value m
93
		"movq    -4(%%"XDX", %%"XCX"), %%mm1\n\t"	// value m
94
		"movq	%%mm0, %%mm2\n\t"					
94
		"movq	%%mm0, %%mm2\n\t"					
95
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(k,m)
95
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(k,m)
96
        "movq	%%mm0, %%mm3\n\t"
96
        "movq	%%mm0, %%mm3\n\t"
97
		"psubusb	%%mm1, %%mm0\n\t"
97
		"psubusb	%%mm1, %%mm0\n\t"
98
		"psubusb %%mm3, %%mm1\n\t"
98
		"psubusb %%mm3, %%mm1\n\t"
99
		"por		%%mm1, %%mm0\n\t"					// abs(k,m)
99
		"por		%%mm1, %%mm0\n\t"					// abs(k,m)
100
100
101
        "movq    %%mm0, %%mm1\n\t"
101
        "movq    %%mm0, %%mm1\n\t"
102
		"psubusb "MANGLE(DiffThres)", %%mm1\n\t"		// nonzero where abs(k,m) > Thres else 0
102
		"psubusb "_DiffThres", %%mm1\n\t"		// nonzero where abs(k,m) > Thres else 0
103
		"pxor	%%mm3, %%mm3\n\t"
103
		"pxor	%%mm3, %%mm3\n\t"
104
		"pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(k,m) < Thres, else 00	
104
		"pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(k,m) < Thres, else 00	
105
105
Lines 120-149 Link Here
120
120
121
121
122
        // c & d
122
        // c & d
123
		"movq    (%%"XBX"), %%mm0\n\t"		// value b from top left		
123
		"movq    (%%"XDX"), %%mm0\n\t"		// value b from top left		
124
		"movq    2(%%"XBX", %%"XCX"), %%mm1\n\t"	// value f from bottom right			
124
		"movq    2(%%"XDX", %%"XCX"), %%mm1\n\t"	// value f from bottom right			
125
125
126
		"movq	%%mm0, %%mm3\n\t"
126
		"movq	%%mm0, %%mm3\n\t"
127
		"psubusb	%%mm1, %%mm3\n\t"
127
		"psubusb	%%mm1, %%mm3\n\t"
128
		"psubusb %%mm0, %%mm1\n\t"
128
		"psubusb %%mm0, %%mm1\n\t"
129
		"por		%%mm1, %%mm3\n\t"					// abs(b,f)
129
		"por		%%mm1, %%mm3\n\t"					// abs(b,f)
130
130
131
		"psubusb "MANGLE(DiffThres)", %%mm3\n\t"		// nonzero where abs(b,f) > Thres else 0
131
		"psubusb "_DiffThres", %%mm3\n\t"		// nonzero where abs(b,f) > Thres else 0
132
		"pxor	%%mm4, %%mm4\n\t"
132
		"pxor	%%mm4, %%mm4\n\t"
133
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(b,f) < Thres, else 00	
133
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(b,f) < Thres, else 00	
134
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(b,f) > Thres, else 00
134
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(b,f) > Thres, else 00
135
135
136
		"movq    2(%%"XBX"), %%mm0\n\t"		// value c
136
		"movq    2(%%"XDX"), %%mm0\n\t"		// value c
137
		"movq    -2(%%"XBX", %%"XCX"), %%mm1\n\t"	// value d
137
		"movq    -2(%%"XDX", %%"XCX"), %%mm1\n\t"	// value d
138
		"movq	%%mm0, %%mm2\n\t"					
138
		"movq	%%mm0, %%mm2\n\t"					
139
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(c,d)
139
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(c,d)
140
        "movq	%%mm0, %%mm3\n\t"
140
        "movq	%%mm0, %%mm3\n\t"
141
		"psubusb	%%mm1, %%mm0\n\t"
141
		"psubusb	%%mm1, %%mm0\n\t"
142
		"psubusb %%mm3, %%mm1\n\t"
142
		"psubusb %%mm3, %%mm1\n\t"
143
		"por		%%mm1, %%mm0\n\t"					// abs(c,d)
143
		"por		%%mm1, %%mm0\n\t"					// abs(c,d)
144
144
145
        "movq    %%mm0, %%mm1\n\t"
145
        "movq    %%mm0, %%mm1\n\t"
146
		"psubusb "MANGLE(DiffThres)", %%mm1\n\t"		// nonzero where abs(c,d) > Thres else 0
146
		"psubusb "_DiffThres", %%mm1\n\t"		// nonzero where abs(c,d) > Thres else 0
147
		"pxor	%%mm3, %%mm3\n\t"
147
		"pxor	%%mm3, %%mm3\n\t"
148
        "pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(c,d) < Thres, else 00	
148
        "pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(c,d) < Thres, else 00	
149
149
Lines 163-192 Link Here
163
        "por     %%mm0, %%mm7\n\t"
163
        "por     %%mm0, %%mm7\n\t"
164
164
165
        // a & f
165
        // a & f
166
		"movq    (%%"XBX"), %%mm0\n\t"		// value b from top left		
166
		"movq    (%%"XDX"), %%mm0\n\t"		// value b from top left		
167
		"movq    -2(%%"XBX", %%"XCX"), %%mm1\n\t"	// value d from bottom right			
167
		"movq    -2(%%"XDX", %%"XCX"), %%mm1\n\t"	// value d from bottom right			
168
168
169
		"movq	%%mm0, %%mm3\n\t"
169
		"movq	%%mm0, %%mm3\n\t"
170
		"psubusb	%%mm1, %%mm3\n\t"
170
		"psubusb	%%mm1, %%mm3\n\t"
171
		"psubusb %%mm0, %%mm1\n\t"
171
		"psubusb %%mm0, %%mm1\n\t"
172
		"por		%%mm1, %%mm3\n\t"					// abs(b,d)
172
		"por		%%mm1, %%mm3\n\t"					// abs(b,d)
173
173
174
		"psubusb "MANGLE(DiffThres)", %%mm3\n\t"	// nonzero where abs(b,d) > Thres else 0
174
		"psubusb "_DiffThres", %%mm3\n\t"	// nonzero where abs(b,d) > Thres else 0
175
		"pxor	%%mm4, %%mm4\n\t"
175
		"pxor	%%mm4, %%mm4\n\t"
176
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(b,d) < Thres, else 00	
176
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where abs(b,d) < Thres, else 00	
177
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(b,d) > Thres, else 00
177
		"pcmpeqb	%%mm3, %%mm4\n\t"			// here ff where abs(b,d) > Thres, else 00
178
178
179
		"movq    -2(%%"XBX"), %%mm0\n\t"		// value a
179
		"movq    -2(%%"XDX"), %%mm0\n\t"		// value a
180
		"movq    2(%%"XBX", %%"XCX"), %%mm1\n\t"	// value f
180
		"movq    2(%%"XDX", %%"XCX"), %%mm1\n\t"	// value f
181
		"movq	%%mm0, %%mm2\n\t"					
181
		"movq	%%mm0, %%mm2\n\t"					
182
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(a,f)
182
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(a,f)
183
        "movq	%%mm0, %%mm3\n\t"
183
        "movq	%%mm0, %%mm3\n\t"
184
        "psubusb	%%mm1, %%mm0\n\t"
184
        "psubusb	%%mm1, %%mm0\n\t"
185
		"psubusb %%mm3, %%mm1\n\t"
185
		"psubusb %%mm3, %%mm1\n\t"
186
		"por		%%mm1, %%mm0\n\t"					// abs(a,f)
186
		"por		%%mm1, %%mm0\n\t"					// abs(a,f)
187
187
188
        "movq    %%mm0, %%mm1\n\t"
188
        "movq    %%mm0, %%mm1\n\t"
189
		"psubusb "MANGLE(DiffThres)", %%mm1\n\t"		// nonzero where abs(a,f) > Thres else 0
189
		"psubusb "_DiffThres", %%mm1\n\t"		// nonzero where abs(a,f) > Thres else 0
190
		"pxor	%%mm3, %%mm3\n\t"
190
		"pxor	%%mm3, %%mm3\n\t"
191
		"pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(a,f) < Thres, else 00	
191
		"pcmpeqb %%mm3, %%mm1\n\t"			// now ff where abs(a,f) < Thres, else 00	
192
192
Lines 205-226 Link Here
205
        "por     %%mm2, %%mm6\n\t"
205
        "por     %%mm2, %%mm6\n\t"
206
        "por     %%mm0, %%mm7\n\t"
206
        "por     %%mm0, %%mm7\n\t"
207
           
207
           
208
 		"pand	"MANGLE(YMask)", %%mm5\n\t"		// mask out chroma from here
208
 		"pand	"_YMask", %%mm5\n\t"		// mask out chroma from here
209
 		"pand	"MANGLE(YMask)", %%mm6\n\t"			// mask out chroma from here
209
 		"pand	"_YMask", %%mm6\n\t"			// mask out chroma from here
210
 		"pand	"MANGLE(YMask)", %%mm7\n\t"			// mask out chroma from here
210
 		"pand	"_YMask", %%mm7\n\t"			// mask out chroma from here
211
211
212
		// b,e
212
		// b,e
213
		"movq    (%%"XBX"), %%mm0\n\t"		// value b from top 		
213
		"movq    (%%"XDX"), %%mm0\n\t"		// value b from top 		
214
		"movq    (%%"XBX", %%"XCX"), %%mm1\n\t"	// value e from bottom 
214
		"movq    (%%"XDX", %%"XCX"), %%mm1\n\t"	// value e from bottom 
215
		"movq	%%mm0, %%mm2\n\t"					
215
		"movq	%%mm0, %%mm2\n\t"					
216
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(b,e)
216
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(b,e)
217
        "movq	%%mm0, %%mm3\n\t"
217
        "movq	%%mm0, %%mm3\n\t"
218
        "psubusb	%%mm1, %%mm0\n\t"
218
        "psubusb	%%mm1, %%mm0\n\t"
219
		"psubusb %%mm3, %%mm1\n\t"
219
		"psubusb %%mm3, %%mm1\n\t"
220
		"por		%%mm1, %%mm0\n\t"					// abs(b,e)
220
		"por		%%mm1, %%mm0\n\t"					// abs(b,e)
221
221
222
        "movq    %%mm0, %%mm1\n\t"
222
        "movq    %%mm0, %%mm1\n\t"
223
		"psubusb "MANGLE(DiffThres)", %%mm1\n\t"		// nonzero where abs(b,e) > Thres else 0
223
		"psubusb "_DiffThres", %%mm1\n\t"		// nonzero where abs(b,e) > Thres else 0
224
		"pxor	%%mm3, %%mm3\n\t"
224
		"pxor	%%mm3, %%mm3\n\t"
225
		"pcmpeqb %%mm3, %%mm1\n\t"		// now ff where abs(b,e) < Thres, else 00	
225
		"pcmpeqb %%mm3, %%mm1\n\t"		// now ff where abs(b,e) < Thres, else 00	
226
226
Lines 238-245 Link Here
238
        "por     %%mm0, %%mm7\n\t"
238
        "por     %%mm0, %%mm7\n\t"
239
239
240
		// bob in any leftovers
240
		// bob in any leftovers
241
		"movq    (%%"XBX"), %%mm0\n\t"		// value b from top 		
241
		"movq    (%%"XDX"), %%mm0\n\t"		// value b from top 		
242
		"movq    (%%"XBX", %%"XCX"), %%mm1\n\t"	// value e from bottom 
242
		"movq    (%%"XDX", %%"XCX"), %%mm1\n\t"	// value e from bottom 
243
243
244
244
245
// We will also calc here the max/min values to later limit comb
245
// We will also calc here the max/min values to later limit comb
Lines 271-277 Link Here
271
		"por		%%mm2, %%mm3\n\t"			// abs diff
271
		"por		%%mm2, %%mm3\n\t"			// abs diff
272
//		pmaxub  %%mm3, %%mm4			// top or bottom pixel moved most
272
//		pmaxub  %%mm3, %%mm4			// top or bottom pixel moved most
273
		V_PMAXUB ("%%mm3", "%%mm4")			// top or bottom pixel moved most
273
		V_PMAXUB ("%%mm3", "%%mm4")			// top or bottom pixel moved most
274
		"psubusb "MANGLE(DiffThres)", %%mm3\n\t"		// moved more than allowed? or goes to 0?
274
		"psubusb "_DiffThres", %%mm3\n\t"		// moved more than allowed? or goes to 0?
275
		"pxor	%%mm4, %%mm4\n\t"
275
		"pxor	%%mm4, %%mm4\n\t"
276
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where low motion, else high motion
276
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where low motion, else high motion
277
		
277
		
Lines 283-301 Link Here
283
		V_PMAXUB ("%%mm6", "%%mm2")
283
		V_PMAXUB ("%%mm6", "%%mm2")
284
284
285
        "psubusb %%mm3, %%mm2\n\t"			// maybe decrease it to 0000.. if no surround motion
285
        "psubusb %%mm3, %%mm2\n\t"			// maybe decrease it to 0000.. if no surround motion
286
//		"movq	%%mm2, "MANGLE(Min_Vals)"\n\t"
286
//		"movq	%%mm2, "_Min_Vals"\n\t"
287
287
288
		"movq	%%mm0, %%mm2\n\t"
288
		"movq	%%mm0, %%mm2\n\t"
289
		V_PMAXUB ("%%mm2", "%%mm1")
289
		V_PMAXUB ("%%mm2", "%%mm1")
290
//		pminub	%%mm6, %%mm2			// clip our current results so far to be below this
290
//		pminub	%%mm6, %%mm2			// clip our current results so far to be below this
291
		V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
291
		V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
292
        "paddusb %%mm3, %%mm2\n\t"			// maybe increase it to ffffff if no surround motion
292
        "paddusb %%mm3, %%mm2\n\t"			// maybe increase it to ffffff if no surround motion
293
//		"movq	%%mm2, "MANGLE(Max_Vals)"\n\t"
293
//		"movq	%%mm2, "_Max_Vals"\n\t"
294
#endif
294
#endif
295
			
295
			
296
		"movq	%%mm0, %%mm2\n\t"						
296
		"movq	%%mm0, %%mm2\n\t"						
297
//		pavgb	%%mm2, %%mm1					// avg(b,e)
297
//		pavgb	%%mm2, %%mm1					// avg(b,e)
298
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(b,e)
298
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(b,e)
299
				
299
				
300
        "movq	%%mm0, %%mm3\n\t"
300
        "movq	%%mm0, %%mm3\n\t"
301
		"psubusb	%%mm1, %%mm3\n\t"
301
		"psubusb	%%mm1, %%mm3\n\t"
(-)xine-lib-1.1.12-old/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc (-3 / +3 lines)
Lines 33-40 static const int64_t __attribute__((__us Link Here
33
static const int64_t __attribute__((__used__)) FOURS     = 0x0404040404040404ull;
33
static const int64_t __attribute__((__used__)) FOURS     = 0x0404040404040404ull;
34
static const int64_t __attribute__((__used__)) ONES      = 0x0101010101010101ull;
34
static const int64_t __attribute__((__used__)) ONES      = 0x0101010101010101ull;
35
static const int64_t __attribute__((__used__)) ShiftMask = 0xfefffefffefffeffull;
35
static const int64_t __attribute__((__used__)) ShiftMask = 0xfefffefffefffeffull;
36
//static int64_t Min_Vals  = 0x0000000000000000ull;
36
static int64_t Min_Vals  = 0x0000000000000000ull;
37
//static int64_t Max_Vals  = 0x0000000000000000ull;
37
static int64_t Max_Vals  = 0x0000000000000000ull;
38
#endif
38
#endif
39
39
40
#ifndef TopFirst
40
#ifndef TopFirst
Lines 69-75 static void FUNCT_NAME(uint8_t *output, Link Here
69
    int rowsize;
69
    int rowsize;
70
    int FldHeight;
70
    int FldHeight;
71
    int stride = (width*2);
71
    int stride = (width*2);
72
    long oldbx;
72
    long olddx;
73
73
74
74
75
    src_pitch = stride*2;
75
    src_pitch = stride*2;
(-)xine-lib-1.1.12-old/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc (-20 / +20 lines)
Lines 14-35 Link Here
14
		// selected for the	smallest of abs(a,f), abs(c,d), or abs(b,e), etc.
14
		// selected for the	smallest of abs(a,f), abs(c,d), or abs(b,e), etc.
15
15
16
		// a,f
16
		// a,f
17
		"movq    -2(%%"XBX"), %%mm0\n\t"		// value a from top left		
17
		"movq    -2(%%"XDX"), %%mm0\n\t"		// value a from top left		
18
		"movq    2(%%"XBX", %%"XCX"), %%mm1\n\t"	// value f from bottom right			
18
		"movq    2(%%"XDX", %%"XCX"), %%mm1\n\t"	// value f from bottom right			
19
		"movq	%%mm0, %%mm6\n\t"					
19
		"movq	%%mm0, %%mm6\n\t"					
20
//		pavgb	%%mm6, %%mm1					// avg(a,f), also best so far
20
//		pavgb	%%mm6, %%mm1					// avg(a,f), also best so far
21
		V_PAVGB ("%%mm6", "%%mm1", "%%mm7", MANGLE(ShiftMask))	// avg(a,f), also best so far
21
		V_PAVGB ("%%mm6", "%%mm1", "%%mm7", _ShiftMask)	// avg(a,f), also best so far
22
        "movq	%%mm0, %%mm7\n\t"
22
        "movq	%%mm0, %%mm7\n\t"
23
		"psubusb	 %%mm1, %%mm7\n\t"
23
		"psubusb	 %%mm1, %%mm7\n\t"
24
		"psubusb %%mm0, %%mm1\n\t"
24
		"psubusb %%mm0, %%mm1\n\t"
25
		"por		%%mm1, %%mm7\n\t"					// abs diff, also best so far
25
		"por		%%mm1, %%mm7\n\t"					// abs diff, also best so far
26
26
27
		// c,d
27
		// c,d
28
		"movq    2(%%"XBX"), %%mm0\n\t"		// value a from top left		
28
		"movq    2(%%"XDX"), %%mm0\n\t"		// value a from top left		
29
		"movq    -2(%%"XBX", %%"XCX"), %%mm1\n\t"	// value f from bottom right			
29
		"movq    -2(%%"XDX", %%"XCX"), %%mm1\n\t"	// value f from bottom right			
30
		"movq	%%mm0, %%mm2\n\t"						
30
		"movq	%%mm0, %%mm2\n\t"						
31
//		pavgb	%%mm2, %%mm1					// avg(c,d)
31
//		pavgb	%%mm2, %%mm1					// avg(c,d)
32
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(c,d)
32
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(c,d)
33
        "movq	%%mm0, %%mm3\n\t"
33
        "movq	%%mm0, %%mm3\n\t"
34
		"psubusb	%%mm1, %%mm3\n\t"
34
		"psubusb	%%mm1, %%mm3\n\t"
35
		"psubusb %%mm0, %%mm1\n\t"
35
		"psubusb %%mm0, %%mm1\n\t"
Lines 49-63 Link Here
49
49
50
		"por		%%mm2, %%mm6\n\t"			// and merge new & old vals keeping best
50
		"por		%%mm2, %%mm6\n\t"			// and merge new & old vals keeping best
51
		"por		%%mm1, %%mm7\n\t"
51
		"por		%%mm1, %%mm7\n\t"
52
		"por		"MANGLE(UVMask)", %%mm7\n\t"			// but we know chroma is worthless so far
52
		"por		"_UVMask", %%mm7\n\t"			// but we know chroma is worthless so far
53
		"pand	"MANGLE(YMask)", %%mm5\n\t"			// mask out chroma from here also
53
		"pand	"_YMask", %%mm5\n\t"			// mask out chroma from here also
54
54
55
		// j,n
55
		// j,n
56
		"movq    -4(%%"XBX"), %%mm0\n\t"		// value j from top left		
56
		"movq    -4(%%"XDX"), %%mm0\n\t"		// value j from top left		
57
		"movq    4(%%"XBX", %%"XCX"), %%mm1\n\t"	// value n from bottom right			
57
		"movq    4(%%"XDX", %%"XCX"), %%mm1\n\t"	// value n from bottom right			
58
		"movq	%%mm0, %%mm2\n\t"						
58
		"movq	%%mm0, %%mm2\n\t"						
59
//		pavgb	%%mm2, %%mm1					// avg(j,n)
59
//		pavgb	%%mm2, %%mm1					// avg(j,n)
60
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(j,n)
60
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(j,n)
61
        "movq	%%mm0, %%mm3\n\t"
61
        "movq	%%mm0, %%mm3\n\t"
62
		"psubusb	%%mm1, %%mm3\n\t"
62
		"psubusb	%%mm1, %%mm3\n\t"
63
		"psubusb %%mm0, %%mm1\n\t"
63
		"psubusb %%mm0, %%mm1\n\t"
Lines 79-89 Link Here
79
		"por		%%mm1, %%mm7\n\t"			// "
79
		"por		%%mm1, %%mm7\n\t"			// "
80
80
81
		// k, m
81
		// k, m
82
		"movq    4(%%"XBX"), %%mm0\n\t"		// value k from top right		
82
		"movq    4(%%"XDX"), %%mm0\n\t"		// value k from top right		
83
		"movq    -4(%%"XBX", %%"XCX"), %%mm1\n\t"	// value n from bottom left			
83
		"movq    -4(%%"XDX", %%"XCX"), %%mm1\n\t"	// value n from bottom left			
84
		"movq	%%mm0, %%mm4\n\t"						
84
		"movq	%%mm0, %%mm4\n\t"						
85
//		pavgb	%%mm4, %%mm1					// avg(k,m)
85
//		pavgb	%%mm4, %%mm1					// avg(k,m)
86
		V_PAVGB ("%%mm4", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(k,m)
86
		V_PAVGB ("%%mm4", "%%mm1", "%%mm3", _ShiftMask)	// avg(k,m)
87
87
88
        "movq	%%mm0, %%mm3\n\t"
88
        "movq	%%mm0, %%mm3\n\t"
89
		"psubusb	%%mm1, %%mm3\n\t"
89
		"psubusb	%%mm1, %%mm3\n\t"
Lines 108-115 Link Here
108
		"por		%%mm1, %%mm7\n\t"			// "
108
		"por		%%mm1, %%mm7\n\t"			// "
109
109
110
		// b,e
110
		// b,e
111
		"movq    (%%"XBX"), %%mm0\n\t"		// value b from top 		
111
		"movq    (%%"XDX"), %%mm0\n\t"		// value b from top 		
112
		"movq    (%%"XBX", %%"XCX"), %%mm1\n\t"	// value e from bottom 
112
		"movq    (%%"XDX", %%"XCX"), %%mm1\n\t"	// value e from bottom 
113
113
114
// We will also calc here the max/min values to later limit comb
114
// We will also calc here the max/min values to later limit comb
115
// so the max excursion will not exceed the Max_Comb constant
115
// so the max excursion will not exceed the Max_Comb constant
Lines 140-146 Link Here
140
		"por		%%mm2, %%mm3\n\t"			// abs diff
140
		"por		%%mm2, %%mm3\n\t"			// abs diff
141
//		pmaxub  %%mm3, %%mm4			// top or bottom pixel moved most
141
//		pmaxub  %%mm3, %%mm4			// top or bottom pixel moved most
142
		V_PMAXUB ("%%mm3", "%%mm4")			// top or bottom pixel moved most
142
		V_PMAXUB ("%%mm3", "%%mm4")			// top or bottom pixel moved most
143
		"psubusb "MANGLE(Max_Mov)", %%mm3\n\t"		// moved more than allowed? or goes to 0?
143
		"psubusb "_Max_Mov", %%mm3\n\t"		// moved more than allowed? or goes to 0?
144
		"pxor	%%mm4, %%mm4\n\t"
144
		"pxor	%%mm4, %%mm4\n\t"
145
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where low motion, else high motion
145
		"pcmpeqb %%mm4, %%mm3\n\t"			// now ff where low motion, else high motion
146
		
146
		
Lines 152-170 Link Here
152
		V_PMAXUB ("%%mm6", "%%mm2")
152
		V_PMAXUB ("%%mm6", "%%mm2")
153
153
154
		"psubusb %%mm3, %%mm2\n\t"			// maybe decrease it to 0000.. if no surround motion
154
		"psubusb %%mm3, %%mm2\n\t"			// maybe decrease it to 0000.. if no surround motion
155
//		"movq	%%mm2, "MANGLE(Min_Vals)"\n\t"
155
//		"movq	%%mm2, "_Min_Vals"\n\t"
156
156
157
		"movq	%%mm0, %%mm2\n\t"
157
		"movq	%%mm0, %%mm2\n\t"
158
		V_PMAXUB ("%%mm2", "%%mm1")
158
		V_PMAXUB ("%%mm2", "%%mm1")
159
//		pminub	%%mm6, %%mm2			// clip our current results so far to be below this
159
//		pminub	%%mm6, %%mm2			// clip our current results so far to be below this
160
		V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
160
		V_PMINUB ("%%mm6", "%%mm2", "%%mm4")
161
        "paddusb %%mm3, %%mm2\n\t"			// maybe increase it to ffffff if no surround motion
161
        "paddusb %%mm3, %%mm2\n\t"			// maybe increase it to ffffff if no surround motion
162
//		"movq	%%mm2, "MANGLE(Max_Vals)"\n\t"
162
//		"movq	%%mm2, "_Max_Vals"\n\t"
163
#endif
163
#endif
164
        
164
        
165
		"movq	%%mm0, %%mm2\n\t"						
165
		"movq	%%mm0, %%mm2\n\t"						
166
//		pavgb	%%mm2, %%mm1					// avg(b,e)
166
//		pavgb	%%mm2, %%mm1					// avg(b,e)
167
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask))	// avg(b,e)
167
		V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask)	// avg(b,e)
168
				
168
				
169
        "movq	%%mm0, %%mm3\n\t"
169
        "movq	%%mm0, %%mm3\n\t"
170
		"psubusb	%%mm1, %%mm3\n\t"
170
		"psubusb	%%mm1, %%mm3\n\t"
(-)xine-lib-1.1.12-old/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h (-6 / +6 lines)
Lines 114-120 Link Here
114
    "por     %%xmm0,      %%xmm5\n\t"      /* and merge new & old vals */                \
114
    "por     %%xmm0,      %%xmm5\n\t"      /* and merge new & old vals */                \
115
    "por     %%xmm2,      %%xmm7\n\t"
115
    "por     %%xmm2,      %%xmm7\n\t"
116
116
117
#define RESET_CHROMA "por "MANGLE(UVMask)", %%xmm7\n\t"
117
#define RESET_CHROMA "por "_UVMask", %%xmm7\n\t"
118
118
119
#else // ifdef IS_SSE2
119
#else // ifdef IS_SSE2
120
120
Lines 126-132 Link Here
126
    "psubusb %%mm1,      %%mm2\n\t"                                                     \
126
    "psubusb %%mm1,      %%mm2\n\t"                                                     \
127
    "psubusb %%mm0,      %%mm3\n\t"                                                     \
127
    "psubusb %%mm0,      %%mm3\n\t"                                                     \
128
    "por     %%mm3,      %%mm2\n\t"                                                     \
128
    "por     %%mm3,      %%mm2\n\t"                                                     \
129
    V_PAVGB ("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask)) /* avg of 2 pixels */               \
129
    V_PAVGB ("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */               \
130
    "movq    %%mm2,      %%mm3\n\t"       /* another copy of our our weights */         \
130
    "movq    %%mm2,      %%mm3\n\t"       /* another copy of our our weights */         \
131
    "pxor    %%mm1,      %%mm1\n\t"                                                     \
131
    "pxor    %%mm1,      %%mm1\n\t"                                                     \
132
    "psubusb %%mm7,      %%mm3\n\t"       /* nonzero where old weights lower, else 0 */ \
132
    "psubusb %%mm7,      %%mm3\n\t"       /* nonzero where old weights lower, else 0 */ \
Lines 144-157 Link Here
144
    "movq    "PADDR2A",   %%mm1\n\t"      /* our pixel2 value */                        \
144
    "movq    "PADDR2A",   %%mm1\n\t"      /* our pixel2 value */                        \
145
    "movq    "PADDR1B",   %%mm2\n\t"      /* our 4 pixels */                            \
145
    "movq    "PADDR1B",   %%mm2\n\t"      /* our 4 pixels */                            \
146
    "movq    "PADDR2B",   %%mm3\n\t"      /* our pixel2 value */                        \
146
    "movq    "PADDR2B",   %%mm3\n\t"      /* our pixel2 value */                        \
147
    V_PAVGB("%%mm0", "%%mm2", "%%mm2", MANGLE(ShiftMask))                                      \
147
    V_PAVGB("%%mm0", "%%mm2", "%%mm2", _ShiftMask)                                      \
148
    V_PAVGB("%%mm1", "%%mm3", "%%mm3", MANGLE(ShiftMask))                                      \
148
    V_PAVGB("%%mm1", "%%mm3", "%%mm3", _ShiftMask)                                      \
149
    "movq    %%mm0,       %%mm2\n\t"      /* another copy of our pixel1 value */        \
149
    "movq    %%mm0,       %%mm2\n\t"      /* another copy of our pixel1 value */        \
150
    "movq    %%mm1,       %%mm3\n\t"      /* another copy of our pixel1 value */        \
150
    "movq    %%mm1,       %%mm3\n\t"      /* another copy of our pixel1 value */        \
151
    "psubusb %%mm1,       %%mm2\n\t"                                                    \
151
    "psubusb %%mm1,       %%mm2\n\t"                                                    \
152
    "psubusb %%mm0,       %%mm3\n\t"                                                    \
152
    "psubusb %%mm0,       %%mm3\n\t"                                                    \
153
    "por     %%mm3,       %%mm2\n\t"                                                    \
153
    "por     %%mm3,       %%mm2\n\t"                                                    \
154
    V_PAVGB("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask))   /* avg of 2 pixels */              \
154
    V_PAVGB("%%mm0", "%%mm1", "%%mm3", _ShiftMask)   /* avg of 2 pixels */              \
155
    "movq    %%mm2,       %%mm3\n\t"      /* another copy of our our weights */         \
155
    "movq    %%mm2,       %%mm3\n\t"      /* another copy of our our weights */         \
156
    "pxor    %%mm1,       %%mm1\n\t"                                                    \
156
    "pxor    %%mm1,       %%mm1\n\t"                                                    \
157
    "psubusb %%mm7,       %%mm3\n\t"      /* nonzero where old weights lower, else 0 */ \
157
    "psubusb %%mm7,       %%mm3\n\t"      /* nonzero where old weights lower, else 0 */ \
Lines 164-170 Link Here
164
    "por     %%mm0,       %%mm5\n\t"      /* and merge new & old vals */                \
164
    "por     %%mm0,       %%mm5\n\t"      /* and merge new & old vals */                \
165
    "por     %%mm2,       %%mm7\n\t"
165
    "por     %%mm2,       %%mm7\n\t"
166
166
167
#define RESET_CHROMA "por "MANGLE(UVMask)", %%mm7\n\t"
167
#define RESET_CHROMA "por "_UVMask", %%mm7\n\t"
168
168
169
#endif
169
#endif
170
170

Return to bug 164425