diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-10-15 11:21:54 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-10-15 11:21:54 +0000 |
commit | 379a20360c6f3e3d449dd8fc478d639ce9e61cdc (patch) | |
tree | f6f316ab65c5cbbee640bb7ad5f87095cbbcec80 /postproc/swscale_template.c | |
parent | 93cb9d7f733d0f03cc0cbe03c95f70024abd208e (diff) | |
download | ffmpeg-379a20360c6f3e3d449dd8fc478d639ce9e61cdc.tar.gz |
rounding fixes
Originally committed as revision 11123 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale_template.c')
-rw-r--r-- | postproc/swscale_template.c | 18 |
1 files changed, 10 insertions, 8 deletions
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; |