Mercurial > libavcodec.hg
comparison libpostproc/postprocess_template.c @ 2041:b996fbe0a7e7 libavcodec
Newer version, using a vectorized version of the
new organisation of code in doVertLowPass. it
seems to be faster in AltiVec also...
Also includes a compile fix for the new do_a_deblock
when using AltiVec.
patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
| author | michael |
|---|---|
| date | Fri, 28 May 2004 13:31:38 +0000 |
| parents | 5de466b3360e |
| children | 703b80c99891 |
comparison
equal
deleted
inserted
replaced
| 2040:5de466b3360e | 2041:b996fbe0a7e7 |
|---|---|
| 2201 ); | 2201 ); |
| 2202 } | 2202 } |
| 2203 #endif | 2203 #endif |
| 2204 //static int test=0; | 2204 //static int test=0; |
| 2205 | 2205 |
| 2206 #ifndef HAVE_ALTIVEC | |
| 2206 static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride, | 2207 static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride, |
| 2207 uint8_t *tempBlured, uint32_t *tempBluredPast, int *maxNoise) | 2208 uint8_t *tempBlured, uint32_t *tempBluredPast, int *maxNoise) |
| 2208 { | 2209 { |
| 2209 // to save a register (FIXME do this outside of the loops) | 2210 // to save a register (FIXME do this outside of the loops) |
| 2210 tempBluredPast[127]= maxNoise[0]; | 2211 tempBluredPast[127]= maxNoise[0]; |
| 2508 //printf("%d\n", test); | 2509 //printf("%d\n", test); |
| 2509 #else | 2510 #else |
| 2510 { | 2511 { |
| 2511 int y; | 2512 int y; |
| 2512 int d=0; | 2513 int d=0; |
| 2513 int sysd=0; | 2514 // int sysd=0; |
| 2514 int i; | 2515 int i; |
| 2515 | 2516 |
| 2516 for(y=0; y<8; y++) | 2517 for(y=0; y<8; y++) |
| 2517 { | 2518 { |
| 2518 int x; | 2519 int x; |
| 2523 int d1=ref - cur; | 2524 int d1=ref - cur; |
| 2524 // if(x==0 || x==7) d1+= d1>>1; | 2525 // if(x==0 || x==7) d1+= d1>>1; |
| 2525 // if(y==0 || y==7) d1+= d1>>1; | 2526 // if(y==0 || y==7) d1+= d1>>1; |
| 2526 // d+= ABS(d1); | 2527 // d+= ABS(d1); |
| 2527 d+= d1*d1; | 2528 d+= d1*d1; |
| 2528 sysd+= d1; | 2529 // sysd+= d1; |
| 2529 } | 2530 } |
| 2530 } | 2531 } |
| 2531 i=d; | 2532 i=d; |
| 2532 d= ( | 2533 d= ( |
| 2533 4*d | 2534 4*d |
| 2609 } | 2610 } |
| 2610 } | 2611 } |
| 2611 } | 2612 } |
| 2612 #endif | 2613 #endif |
| 2613 } | 2614 } |
| 2615 #endif //HAVE_ALTIVEC | |
| 2614 | 2616 |
| 2615 #ifdef HAVE_MMX | 2617 #ifdef HAVE_MMX |
| 2616 /** | 2618 /** |
| 2617 * accurate deblock filter | 2619 * accurate deblock filter |
| 2618 */ | 2620 */ |
