From f9bb7a21e57d481ddeea4d27919ac37c7ea32bd1 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 15 Oct 2003 11:21:54 +0000 Subject: rounding fixes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11123 b3059339-0415-0410-9bf9-f77b7e298cf2 --- postproc/swscale_template.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'postproc/swscale_template.c') diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index 58788ce3b2..ebdb6c33d1 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -61,8 +61,8 @@ #define YSCALEYUV2YV12X(x, offset) \ "xorl %%eax, %%eax \n\t"\ - "pxor %%mm3, %%mm3 \n\t"\ - "pxor %%mm4, %%mm4 \n\t"\ + "movq "VROUNDER_OFFSET"(%0), %%mm3\n\t"\ + "movq %%mm3, %%mm4 \n\t"\ "leal " offset "(%0), %%edx \n\t"\ "movl (%%edx), %%esi \n\t"\ ".balign 16 \n\t" /* FIXME Unroll? */\ @@ -84,8 +84,8 @@ MOVNTQ(%%mm3, (%1, %%eax))\ "addl $8, %%eax \n\t"\ "cmpl %2, %%eax \n\t"\ - "pxor %%mm3, %%mm3 \n\t"\ - "pxor %%mm4, %%mm4 \n\t"\ + "movq "VROUNDER_OFFSET"(%0), %%mm3\n\t"\ + "movq %%mm3, %%mm4 \n\t"\ "leal " offset "(%0), %%edx \n\t"\ "movl (%%edx), %%esi \n\t"\ "jb 1b \n\t" @@ -117,8 +117,8 @@ "1: \n\t"\ "leal "CHR_MMX_FILTER_OFFSET"(%0), %%edx \n\t"\ "movl (%%edx), %%esi \n\t"\ - "pxor %%mm3, %%mm3 \n\t"\ - "pxor %%mm4, %%mm4 \n\t"\ + "movq "VROUNDER_OFFSET"(%0), %%mm3\n\t"\ + "movq %%mm3, %%mm4 \n\t"\ ".balign 16 \n\t"\ "2: \n\t"\ "movq 8(%%edx), %%mm0 \n\t" /* filterCoeff */\ @@ -135,8 +135,8 @@ \ "leal "LUM_MMX_FILTER_OFFSET"(%0), %%edx \n\t"\ "movl (%%edx), %%esi \n\t"\ - "pxor %%mm1, %%mm1 \n\t"\ - "pxor %%mm7, %%mm7 \n\t"\ + "movq "VROUNDER_OFFSET"(%0), %%mm1\n\t"\ + "movq %%mm1, %%mm7 \n\t"\ ".balign 16 \n\t"\ "2: \n\t"\ "movq 8(%%edx), %%mm0 \n\t" /* filterCoeff */\ @@ -2611,6 +2611,8 @@ i--; const int lastLumSrcY= firstLumSrcY + vLumFilterSize -1; // Last line needed as input const int lastChrSrcY= firstChrSrcY + vChrFilterSize -1; // Last line needed as input +//printf("dstY:%d dstH:%d firstLumSrcY:%d lastInLumBuf:%d vLumBufSize: %d vChrBufSize: %d slice: %d %d vLumFilterSize: %d firstChrSrcY: %d vChrFilterSize: %d c->chrSrcVSubSample: %d\n", +// dstY, dstH, firstLumSrcY, lastInLumBuf, vLumBufSize, vChrBufSize, srcSliceY, srcSliceH, vLumFilterSize, firstChrSrcY, vChrFilterSize, c->chrSrcVSubSample); //handle holes (FAST_BILINEAR & weird filters) if(firstLumSrcY > lastInLumBuf) lastInLumBuf= firstLumSrcY-1; if(firstChrSrcY > lastInChrBuf) lastInChrBuf= firstChrSrcY-1; -- cgit v1.2.3