whitespace cosmetics: Remove all trailing whitespace.
[mplayer.git] / libmpcodecs / vf_ilpack.c
index 67e14dd..b0a3f55 100644 (file)
@@ -57,11 +57,11 @@ static void pack_li_1_C(unsigned char *dst, unsigned char *y,
        }
 }
 
-#ifdef HAVE_MMX
+#if HAVE_MMX
 static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
        unsigned char *u, unsigned char *v, int w)
 {
-       asm volatile (""
+       __asm__ volatile (""
                ASMALIGN(4)
                "1: \n\t"
                "movq (%0), %%mm1 \n\t"
@@ -71,7 +71,7 @@ static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
                "punpcklbw %%mm6, %%mm4 \n\t"
                "punpcklbw %%mm4, %%mm1 \n\t"
                "punpckhbw %%mm4, %%mm2 \n\t"
-               
+
                "add $8, %0 \n\t"
                "add $4, %1 \n\t"
                "add $4, %2 \n\t"
@@ -81,7 +81,7 @@ static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
                "decl %4 \n\t"
                "jnz 1b \n\t"
                "emms \n\t"
-               : 
+               :
                : "r" (y), "r" (u), "r" (v), "r" (dst), "r" (w/8)
                : "memory"
                );
@@ -91,21 +91,21 @@ static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
 static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
        unsigned char *u, unsigned char *v, int w, int us, int vs)
 {
-       asm volatile (""
+       __asm__ volatile (""
                "push %%"REG_BP" \n\t"
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
                "mov %6, %%"REG_BP" \n\t"
 #else
                "movl 4(%%"REG_d"), %%"REG_BP" \n\t"
                "movl (%%"REG_d"), %%"REG_d" \n\t"
 #endif
                "pxor %%mm0, %%mm0 \n\t"
-               
+
                ASMALIGN(4)
                ".Lli0: \n\t"
                "movq (%%"REG_S"), %%mm1 \n\t"
                "movq (%%"REG_S"), %%mm2 \n\t"
-               
+
                "movq (%%"REG_a",%%"REG_d",2), %%mm4 \n\t"
                "movq (%%"REG_b",%%"REG_BP",2), %%mm6 \n\t"
                "punpcklbw %%mm0, %%mm4 \n\t"
@@ -135,13 +135,13 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
                "punpcklbw %%mm6, %%mm4 \n\t"
                "punpcklbw %%mm4, %%mm1 \n\t"
                "punpckhbw %%mm4, %%mm2 \n\t"
-               
+
                "movq %%mm1, (%%"REG_D") \n\t"
                "movq %%mm2, 8(%%"REG_D") \n\t"
-               
+
                "movq 8(%%"REG_S"), %%mm1 \n\t"
                "movq 8(%%"REG_S"), %%mm2 \n\t"
-               
+
                "movq (%%"REG_a",%%"REG_d",2), %%mm4 \n\t"
                "movq (%%"REG_b",%%"REG_BP",2), %%mm6 \n\t"
                "punpckhbw %%mm0, %%mm4 \n\t"
@@ -171,23 +171,23 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
                "punpcklbw %%mm6, %%mm4 \n\t"
                "punpcklbw %%mm4, %%mm1 \n\t"
                "punpckhbw %%mm4, %%mm2 \n\t"
-               
+
                "add $16, %%"REG_S" \n\t"
                "add $8, %%"REG_a" \n\t"
                "add $8, %%"REG_b" \n\t"
-               
+
                "movq %%mm1, 16(%%"REG_D") \n\t"
                "movq %%mm2, 24(%%"REG_D") \n\t"
                "add $32, %%"REG_D" \n\t"
-               
+
                "decl %%ecx \n\t"
                "jnz .Lli0 \n\t"
                "emms \n\t"
                "pop %%"REG_BP" \n\t"
-               : 
+               :
                : "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16),
-#ifdef ARCH_X86_64
-               "d" ((long)us), "r" ((long)vs)
+#if ARCH_X86_64
+               "d" ((x86_reg)us), "r" ((x86_reg)vs)
 #else
                "d" (&us)
 #endif
@@ -199,21 +199,21 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
 static void pack_li_1_MMX(unsigned char *dst, unsigned char *y,
        unsigned char *u, unsigned char *v, int w, int us, int vs)
 {
-       asm volatile (""
+       __asm__ volatile (""
                "push %%"REG_BP" \n\t"
-#ifdef ARCH_X86_64
+#if ARCH_X86_64
                "mov %6, %%"REG_BP" \n\t"
 #else
                "movl 4(%%"REG_d"), %%"REG_BP" \n\t"
                "movl (%%"REG_d"), %%"REG_d" \n\t"
 #endif
                "pxor %%mm0, %%mm0 \n\t"
-               
+
                ASMALIGN(4)
                ".Lli1: \n\t"
                "movq (%%"REG_S"), %%mm1 \n\t"
                "movq (%%"REG_S"), %%mm2 \n\t"
-               
+
                "movq (%%"REG_a",%%"REG_d",2), %%mm4 \n\t"
                "movq (%%"REG_b",%%"REG_BP",2), %%mm6 \n\t"
                "punpcklbw %%mm0, %%mm4 \n\t"
@@ -245,13 +245,13 @@ static void pack_li_1_MMX(unsigned char *dst, unsigned char *y,
                "punpcklbw %%mm6, %%mm4 \n\t"
                "punpcklbw %%mm4, %%mm1 \n\t"
                "punpckhbw %%mm4, %%mm2 \n\t"
-               
+
                "movq %%mm1, (%%"REG_D") \n\t"
                "movq %%mm2, 8(%%"REG_D") \n\t"
-               
+
                "movq 8(%%"REG_S"), %%mm1 \n\t"
                "movq 8(%%"REG_S"), %%mm2 \n\t"
-               
+
                "movq (%%"REG_a",%%"REG_d",2), %%mm4 \n\t"
                "movq (%%"REG_b",%%"REG_BP",2), %%mm6 \n\t"
                "punpckhbw %%mm0, %%mm4 \n\t"
@@ -283,23 +283,23 @@ static void pack_li_1_MMX(unsigned char *dst, unsigned char *y,
                "punpcklbw %%mm6, %%mm4 \n\t"
                "punpcklbw %%mm4, %%mm1 \n\t"
                "punpckhbw %%mm4, %%mm2 \n\t"
-               
+
                "add $16, %%"REG_S" \n\t"
                "add $8, %%"REG_a" \n\t"
                "add $8, %%"REG_b" \n\t"
-               
+
                "movq %%mm1, 16(%%"REG_D") \n\t"
                "movq %%mm2, 24(%%"REG_D") \n\t"
                "add $32, %%"REG_D" \n\t"
-               
+
                "decl %%ecx \n\t"
                "jnz .Lli1 \n\t"
                "emms \n\t"
                "pop %%"REG_BP" \n\t"
-               : 
+               :
                : "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16),
-#ifdef ARCH_X86_64
-               "d" ((long)us), "r" ((long)vs)
+#if ARCH_X86_64
+               "d" ((x86_reg)us), "r" ((x86_reg)vs)
 #else
                "d" (&us)
 #endif
@@ -392,11 +392,11 @@ static int open(vf_instance_t *vf, char* args)
        vf->priv = calloc(1, sizeof(struct vf_priv_s));
        vf->priv->mode = 1;
        if (args) sscanf(args, "%d", &vf->priv->mode);
-       
+
        pack_nn = (pack_func_t *)pack_nn_C;
        pack_li_0 = pack_li_0_C;
        pack_li_1 = pack_li_1_C;
-#ifdef HAVE_MMX
+#if HAVE_MMX
        if(gCpuCaps.hasMMX) {
                pack_nn = (pack_func_t *)pack_nn_MMX;
                pack_li_0 = pack_li_0_MMX;
@@ -417,7 +417,7 @@ static int open(vf_instance_t *vf, char* args)
                vf->priv->pack[1] = pack_li_1;
                break;
        }
-       
+
        return 1;
 }