comparison postproc/swscale_template.c @ 12130:2ef24558b732

AltiVec hScale, all size patch by (Romain Dolbeau <dolbeaur at club-internet dot fr>)
author michael
date Tue, 06 Apr 2004 00:25:47 +0000
parents 21e5cb258a95
children d2aef091743c
comparison
equal deleted inserted replaced
12129:c1aff21286dd 12130:2ef24558b732
2152 "m" (src), "r" (filterSize*2) 2152 "m" (src), "r" (filterSize*2)
2153 : "%ebx", "%eax", "%ecx" 2153 : "%ebx", "%eax", "%ecx"
2154 ); 2154 );
2155 } 2155 }
2156 #else 2156 #else
2157 #ifdef HAVE_ALTIVEC
2158 hScale_altivec_real(dst, dstW, src, srcW, xInc, filter, filterPos, filterSize);
2159 #else
2157 int i; 2160 int i;
2158 for(i=0; i<dstW; i++) 2161 for(i=0; i<dstW; i++)
2159 { 2162 {
2160 int j; 2163 int j;
2161 int srcPos= filterPos[i]; 2164 int srcPos= filterPos[i];
2168 } 2171 }
2169 // filter += hFilterSize; 2172 // filter += hFilterSize;
2170 dst[i] = MIN(MAX(0, val>>7), (1<<15)-1); // the cubic equation does overflow ... 2173 dst[i] = MIN(MAX(0, val>>7), (1<<15)-1); // the cubic equation does overflow ...
2171 // dst[i] = val>>7; 2174 // dst[i] = val>>7;
2172 } 2175 }
2176 #endif
2173 #endif 2177 #endif
2174 } 2178 }
2175 // *** horizontal scale Y line to temp buffer 2179 // *** horizontal scale Y line to temp buffer
2176 static inline void RENAME(hyscale)(uint16_t *dst, int dstWidth, uint8_t *src, int srcW, int xInc, 2180 static inline void RENAME(hyscale)(uint16_t *dst, int dstWidth, uint8_t *src, int srcW, int xInc,
2177 int flags, int canMMX2BeUsed, int16_t *hLumFilter, 2181 int flags, int canMMX2BeUsed, int16_t *hLumFilter,