greedy2frame 32bit build fix

"Torsten Jager" <[email protected]> Tue, 12 Jun 2012 21:54:56 +0200
Newsgroups gmane.comp.video.xine.devel
Message-ID <[email protected]>
Hi again.

I knew this migration thing was a bad idea.
No, honestly.

1.2.2 does not compile on my box. I guess this is because
I run a 32 bit system, and asm () runs out of general
registers.

This patch fixes comilation. Still untested, though,
since I dont know how to activate the plugin at runtime.

Torsten

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
xine-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-devel
greedy2frame_fix.diff (application/octet-stream, 2 KB)
--- xine-lib-1.2-20120609/src/post/deinterlace/plugins/greedy2frame_template_sse2.c	2012-06-09 19:58:05.000000000 +0200
+++ xine-lib-1.2-20120609/src/post/deinterlace/plugins/greedy2frame_template_sse2.c	2012-06-10 17:05:47.000000000 +0200
@@ -170,10 +170,10 @@ static void DeinterlaceGreedy2Frame_SSE2
         * See above for a description of the algorithm.
         * weave if (weave(M) AND (weave(T) OR weave(B)))
         */
-            "movdqa  (%3), %%xmm1		\n\t" /* xmm1 = T1 */
-            "movdqa  (%4), %%xmm0		\n\t" /* xmm0 = T0 */
-            "movdqa  (%q5,%3), %%xmm3		\n\t" /* xmm3 = B1 */
-            "movdqa  (%q5,%4), %%xmm2		\n\t" /* xmm2 = B0 */
+            "movdqa  (%1), %%xmm1		\n\t" /* xmm1 = T1 */
+            "movdqa  (%2), %%xmm0		\n\t" /* xmm0 = T0 */
+            "movdqa  (%q3,%1), %%xmm3		\n\t" /* xmm3 = B1 */
+            "movdqa  (%q3,%2), %%xmm2		\n\t" /* xmm2 = B0 */
 
             /* calculate |T1-T0| keep T1 put result in xmm5 */
             "movdqa  %%xmm1, %%xmm5		\n\t"
@@ -182,19 +182,23 @@ static void DeinterlaceGreedy2Frame_SSE2
             "por     %%xmm0, %%xmm5		\n\t"
 
             "movdqa  (%0), %%xmm0		\n\t" /* xmm0 = M1 */
+          :
+          : "r" (M1), "r" (T1), "r" (T0), "r" (Pitch) );
+
+          asm volatile(
             /* T1 is data for line to copy */
-            "movntdq  %%xmm1, %2		\n\t"
+            "movntdq  %%xmm1, %1		\n\t"
 
             /* if |T1-T0| > Threshold we want 0 else dword minus one */
             "psrlw   $1, %%xmm5			\n\t"
             "pand    %%xmm6, %%xmm5		\n\t"
-            "pcmpgtb %1, %%xmm5			\n\t"
+            "pcmpgtb %0, %%xmm5			\n\t"
             "pcmpeqd %%xmm7, %%xmm5		\n\t"
 
-            "prefetcht0  64(%q5,%3)		\n\t"
-            "prefetcht0  64(%q5,%4)		\n\t"
+            "prefetcht0  64(%q4,%2)		\n\t"
+            "prefetcht0  64(%q4,%3)		\n\t"
           :
-          : "r" (M1), "m" (GreedyTwoFrameThreshold128),
+          : "m" (GreedyTwoFrameThreshold128),
             "m" (*Destc), "r" (T1), "r" (T0), "r" (Pitch) );
 
           asm volatile (