]> git.sesse.net Git - qscale/commitdiff
Make everything compile and work for amd64.
authorsgunderson@bigfoot.com <>
Sun, 3 Feb 2008 18:17:32 +0000 (19:17 +0100)
committersgunderson@bigfoot.com <>
Sun, 3 Feb 2008 18:17:32 +0000 (19:17 +0100)
qscale.c

index 1fcfd67716d645391b9123bb631cdfae8702b954..992bf7d24e3aae137f887bd3215876db66921ed5 100644 (file)
--- a/qscale.c
+++ b/qscale.c
@@ -103,7 +103,7 @@ void hscale(float *pix, unsigned char *npix, unsigned w, unsigned h, unsigned nw
                for (x = 0; x < nw; ++x) {
                        int result;
                        float acc;
-                       int tmp;
+                       long tmp;
                        static const float low = 0.0, high = 255.0;
                        asm (
                                "pxor %1, %1               \n"
@@ -113,7 +113,7 @@ void hscale(float *pix, unsigned char *npix, unsigned w, unsigned h, unsigned nw
                                "movups (%3,%2),%%xmm2     \n"
                                "mulps %%xmm2,%%xmm1       \n"
                                "addps %%xmm1,%1           \n"
-                               "addl $16,%2               \n"
+                               "add $16,%2                \n"
                                "dec %5                    \n"
                                "jnz .lbl2                 \n"
                                "haddps %1,%1              \n"
@@ -301,7 +301,7 @@ void vscale(unsigned char *pix, float *npix, unsigned w, unsigned h, unsigned nh
                                "r" (&sptr[pd[y].start * w]),        /* 0: srcptr base */
                                "r" (pd[y].end - pd[y].start + 1),   /* 1: filter len */
                                "r" (&coeffs[pd[y].startcoeff]),     /* 2: coeffs base */
-                               "r" (w),                             /* 3: stride */
+                               "r" ((long)w),                       /* 3: stride */
                                "r" (dptr)                           /* 4: dstptr base */
                                : "memory", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
                        );