comparison libswscale/swscale_template.c @ 30285:042ec58ab0e2

Reuse h{lum,chr}Filter{,Pos} variables for MMX2 fast_bilinear horizontal scaler.
author ramiro
date Sat, 16 Jan 2010 18:39:06 +0000
parents 1032ff2e83f1
children af1d6d36850d
comparison
equal deleted inserted replaced
30284:03f99130b7c3 30285:042ec58ab0e2
2258 long dstWidth, const uint8_t *src, int srcW, 2258 long dstWidth, const uint8_t *src, int srcW,
2259 int xInc) 2259 int xInc)
2260 { 2260 {
2261 #if ARCH_X86 && CONFIG_GPL 2261 #if ARCH_X86 && CONFIG_GPL
2262 #if COMPILE_TEMPLATE_MMX2 2262 #if COMPILE_TEMPLATE_MMX2
2263 int32_t *mmx2FilterPos = c->lumMmx2FilterPos; 2263 int32_t *filterPos = c->hLumFilterPos;
2264 int16_t *mmx2Filter = c->lumMmx2Filter; 2264 int16_t *filter = c->hLumFilter;
2265 int canMMX2BeUsed = c->canMMX2BeUsed; 2265 int canMMX2BeUsed = c->canMMX2BeUsed;
2266 void *mmx2FilterCode= c->lumMmx2FilterCode; 2266 void *mmx2FilterCode= c->lumMmx2FilterCode;
2267 int i; 2267 int i;
2268 #if defined(PIC) 2268 #if defined(PIC)
2269 DECLARE_ALIGNED(8, uint64_t, ebxsave); 2269 DECLARE_ALIGNED(8, uint64_t, ebxsave);
2314 CALL_MMX2_FILTER_CODE 2314 CALL_MMX2_FILTER_CODE
2315 2315
2316 #if defined(PIC) 2316 #if defined(PIC)
2317 "mov %5, %%"REG_b" \n\t" 2317 "mov %5, %%"REG_b" \n\t"
2318 #endif 2318 #endif
2319 :: "m" (src), "m" (dst), "m" (mmx2Filter), "m" (mmx2FilterPos), 2319 :: "m" (src), "m" (dst), "m" (filter), "m" (filterPos),
2320 "m" (mmx2FilterCode) 2320 "m" (mmx2FilterCode)
2321 #if defined(PIC) 2321 #if defined(PIC)
2322 ,"m" (ebxsave) 2322 ,"m" (ebxsave)
2323 #endif 2323 #endif
2324 : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D 2324 : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
2407 long dstWidth, const uint8_t *src1, 2407 long dstWidth, const uint8_t *src1,
2408 const uint8_t *src2, int srcW, int xInc) 2408 const uint8_t *src2, int srcW, int xInc)
2409 { 2409 {
2410 #if ARCH_X86 && CONFIG_GPL 2410 #if ARCH_X86 && CONFIG_GPL
2411 #if COMPILE_TEMPLATE_MMX2 2411 #if COMPILE_TEMPLATE_MMX2
2412 int32_t *mmx2FilterPos = c->chrMmx2FilterPos; 2412 int32_t *filterPos = c->hChrFilterPos;
2413 int16_t *mmx2Filter = c->chrMmx2Filter; 2413 int16_t *filter = c->hChrFilter;
2414 int canMMX2BeUsed = c->canMMX2BeUsed; 2414 int canMMX2BeUsed = c->canMMX2BeUsed;
2415 void *mmx2FilterCode= c->chrMmx2FilterCode; 2415 void *mmx2FilterCode= c->chrMmx2FilterCode;
2416 int i; 2416 int i;
2417 #if defined(PIC) 2417 #if defined(PIC)
2418 DECLARE_ALIGNED(8, uint64_t, ebxsave); 2418 DECLARE_ALIGNED(8, uint64_t, ebxsave);
2450 CALL_MMX2_FILTER_CODE 2450 CALL_MMX2_FILTER_CODE
2451 2451
2452 #if defined(PIC) 2452 #if defined(PIC)
2453 "mov %6, %%"REG_b" \n\t" 2453 "mov %6, %%"REG_b" \n\t"
2454 #endif 2454 #endif
2455 :: "m" (src1), "m" (dst), "m" (mmx2Filter), "m" (mmx2FilterPos), 2455 :: "m" (src1), "m" (dst), "m" (filter), "m" (filterPos),
2456 "m" (mmx2FilterCode), "m" (src2) 2456 "m" (mmx2FilterCode), "m" (src2)
2457 #if defined(PIC) 2457 #if defined(PIC)
2458 ,"m" (ebxsave) 2458 ,"m" (ebxsave)
2459 #endif 2459 #endif
2460 : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D 2460 : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D