Mercurial > mplayer.hg
comparison postproc/swscale_template.c @ 18575:e00cea3e1732
fix variable type used via "m" asm constraint to match size used in asm.
fixes crashes on AMD64.
author | reimar |
---|---|
date | Mon, 05 Jun 2006 10:51:58 +0000 |
parents | b10d4b3cb9ec |
children |
comparison
equal
deleted
inserted
replaced
18574:804b83cf6dee | 18575:e00cea3e1732 |
---|---|
871 /** | 871 /** |
872 * vertical scale YV12 to RGB | 872 * vertical scale YV12 to RGB |
873 */ | 873 */ |
874 static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, | 874 static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize, |
875 int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, | 875 int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize, |
876 uint8_t *dest, int dstW, int dstY) | 876 uint8_t *dest, long dstW, long dstY) |
877 { | 877 { |
878 int dummy=0; | 878 long dummy=0; |
879 switch(c->dstFormat) | 879 switch(c->dstFormat) |
880 { | 880 { |
881 #ifdef HAVE_MMX | 881 #ifdef HAVE_MMX |
882 case IMGFMT_BGR32: | 882 case IMGFMT_BGR32: |
883 { | 883 { |
2221 } | 2221 } |
2222 #endif | 2222 #endif |
2223 #endif | 2223 #endif |
2224 } | 2224 } |
2225 // *** horizontal scale Y line to temp buffer | 2225 // *** horizontal scale Y line to temp buffer |
2226 static inline void RENAME(hyscale)(uint16_t *dst, int dstWidth, uint8_t *src, int srcW, int xInc, | 2226 static inline void RENAME(hyscale)(uint16_t *dst, long dstWidth, uint8_t *src, int srcW, int xInc, |
2227 int flags, int canMMX2BeUsed, int16_t *hLumFilter, | 2227 int flags, int canMMX2BeUsed, int16_t *hLumFilter, |
2228 int16_t *hLumFilterPos, int hLumFilterSize, void *funnyYCode, | 2228 int16_t *hLumFilterPos, int hLumFilterSize, void *funnyYCode, |
2229 int srcFormat, uint8_t *formatConvBuffer, int16_t *mmx2Filter, | 2229 int srcFormat, uint8_t *formatConvBuffer, int16_t *mmx2Filter, |
2230 int32_t *mmx2FilterPos) | 2230 int32_t *mmx2FilterPos) |
2231 { | 2231 { |
2334 for(i=dstWidth-1; (i*xInc)>>16 >=srcW-1; i--) dst[i] = src[srcW-1]*128; | 2334 for(i=dstWidth-1; (i*xInc)>>16 >=srcW-1; i--) dst[i] = src[srcW-1]*128; |
2335 } | 2335 } |
2336 else | 2336 else |
2337 { | 2337 { |
2338 #endif | 2338 #endif |
2339 int xInc_shr16 = xInc >> 16; | 2339 long xInc_shr16 = xInc >> 16; |
2340 int xInc_mask = xInc & 0xffff; | 2340 uint16_t xInc_mask = xInc & 0xffff; |
2341 //NO MMX just normal asm ... | 2341 //NO MMX just normal asm ... |
2342 asm volatile( | 2342 asm volatile( |
2343 "xor %%"REG_a", %%"REG_a" \n\t" // i | 2343 "xor %%"REG_a", %%"REG_a" \n\t" // i |
2344 "xor %%"REG_b", %%"REG_b" \n\t" // xx | 2344 "xor %%"REG_b", %%"REG_b" \n\t" // xx |
2345 "xorl %%ecx, %%ecx \n\t" // 2*xalpha | 2345 "xorl %%ecx, %%ecx \n\t" // 2*xalpha |
2533 } | 2533 } |
2534 else | 2534 else |
2535 { | 2535 { |
2536 #endif | 2536 #endif |
2537 long xInc_shr16 = (long) (xInc >> 16); | 2537 long xInc_shr16 = (long) (xInc >> 16); |
2538 int xInc_mask = xInc & 0xffff; | 2538 uint16_t xInc_mask = xInc & 0xffff; |
2539 asm volatile( | 2539 asm volatile( |
2540 "xor %%"REG_a", %%"REG_a" \n\t" // i | 2540 "xor %%"REG_a", %%"REG_a" \n\t" // i |
2541 "xor %%"REG_b", %%"REG_b" \n\t" // xx | 2541 "xor %%"REG_b", %%"REG_b" \n\t" // xx |
2542 "xorl %%ecx, %%ecx \n\t" // 2*xalpha | 2542 "xorl %%ecx, %%ecx \n\t" // 2*xalpha |
2543 ASMALIGN16 | 2543 ASMALIGN16 |