summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-07-28 05:45:47 +0000
committerramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-07-28 05:45:47 +0000
commit7c240e02684ac934bc9d00a98fba845d9dce1ba2 (patch)
tree8a18522934372361544a9174f0ddcaf3c797ace8 /libswscale
parent878623ad28e99fb3356d3e70834edc0172d4a6a5 (diff)
downloadmpv-7c240e02684ac934bc9d00a98fba845d9dce1ba2.tar.bz2
mpv-7c240e02684ac934bc9d00a98fba845d9dce1ba2.tar.xz
MMX2 scaler: Remove {} block leftover from factorization in initMMX2Scaler().
Merge variable declarations to previous {} block and indent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29454 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 8cd61bd9e2..59d4d841fe 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1893,6 +1893,8 @@ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *fil
x86_reg imm8OfPShufW1 = (d+1<4) ? imm8OfPShufW1B : imm8OfPShufW1A;
x86_reg imm8OfPShufW2 = (d+1<4) ? imm8OfPShufW2B : imm8OfPShufW2A;
x86_reg fragmentLength = (d+1<4) ? fragmentLengthB : fragmentLengthA;
+ int maxShift= 3-(d+inc);
+ int shift=0;
filter[i ] = (( xpos & 0xFFFF) ^ 0xFFFF)>>9;
filter[i+1] = (((xpos+xInc ) & 0xFFFF) ^ 0xFFFF)>>9;
@@ -1900,30 +1902,25 @@ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *fil
filter[i+3] = (((xpos+xInc*3) & 0xFFFF) ^ 0xFFFF)>>9;
filterPos[i/2]= xx;
- {
- int maxShift= 3-(d+inc);
- int shift=0;
-
- memcpy(funnyCode + fragmentPos, fragment, fragmentLength);
+ memcpy(funnyCode + fragmentPos, fragment, fragmentLength);
- funnyCode[fragmentPos + imm8OfPShufW1]=
- (a+inc) | ((b+inc)<<2) | ((c+inc)<<4) | ((d+inc)<<6);
- funnyCode[fragmentPos + imm8OfPShufW2]=
- a | (b<<2) | (c<<4) | (d<<6);
+ funnyCode[fragmentPos + imm8OfPShufW1]=
+ (a+inc) | ((b+inc)<<2) | ((c+inc)<<4) | ((d+inc)<<6);
+ funnyCode[fragmentPos + imm8OfPShufW2]=
+ a | (b<<2) | (c<<4) | (d<<6);
- if (i+4-inc>=dstW) shift=maxShift; //avoid overread
- else if ((filterPos[i/2]&3) <= maxShift) shift=filterPos[i/2]&3; //Align
+ if (i+4-inc>=dstW) shift=maxShift; //avoid overread
+ else if ((filterPos[i/2]&3) <= maxShift) shift=filterPos[i/2]&3; //Align
- if (shift && i>=shift)
- {
- funnyCode[fragmentPos + imm8OfPShufW1]+= 0x55*shift;
- funnyCode[fragmentPos + imm8OfPShufW2]+= 0x55*shift;
- filterPos[i/2]-=shift;
- }
-
- fragmentPos+= fragmentLength;
+ if (shift && i>=shift)
+ {
+ funnyCode[fragmentPos + imm8OfPShufW1]+= 0x55*shift;
+ funnyCode[fragmentPos + imm8OfPShufW2]+= 0x55*shift;
+ filterPos[i/2]-=shift;
}
+ fragmentPos+= fragmentLength;
+
funnyCode[fragmentPos]= RET;
}
xpos+=xInc;