projects
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix build with --build-suffix
[ffmpeg.git]
/
libpostproc
/
postprocess_template.c
diff --git
a/libpostproc/postprocess_template.c
b/libpostproc/postprocess_template.c
index 92a053c24bb060992908ea420743422b35ee963f..1f00661e4e01d9784faa9880f8329718ee26f659 100644
(file)
--- a/
libpostproc/postprocess_template.c
+++ b/
libpostproc/postprocess_template.c
@@
-2182,12
+2182,12
@@
static inline void RENAME(transpose2)(uint8_t *dst, int dstStride, uint8_t *src)
#ifndef HAVE_ALTIVEC
static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
#ifndef HAVE_ALTIVEC
static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
- uint8_t *tempBlur
ed, uint32_t *tempBlu
redPast, int *maxNoise)
+ uint8_t *tempBlur
red, uint32_t *tempBlur
redPast, int *maxNoise)
{
// to save a register (FIXME do this outside of the loops)
{
// to save a register (FIXME do this outside of the loops)
- tempBluredPast[127]= maxNoise[0];
- tempBluredPast[128]= maxNoise[1];
- tempBluredPast[129]= maxNoise[2];
+ tempBlur
r
edPast[127]= maxNoise[0];
+ tempBlur
r
edPast[128]= maxNoise[1];
+ tempBlur
r
edPast[129]= maxNoise[2];
#define FAST_L2_DIFF
//#define L1_DIFF //u should change the thresholds too if u try that one
#define FAST_L2_DIFF
//#define L1_DIFF //u should change the thresholds too if u try that one
@@
-2476,7
+2476,7
@@
L2_DIFF_CORE((%0, %%REGc) , (%1, %%REGc))
"4: \n\t"
"4: \n\t"
- :: "r" (src), "r" (tempBlur
ed), "r"((long)stride), "m" (tempBlu
redPast)
+ :: "r" (src), "r" (tempBlur
red), "r"((long)stride), "m" (tempBlur
redPast)
: "%"REG_a, "%"REG_d, "%"REG_c, "memory"
);
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
: "%"REG_a, "%"REG_d, "%"REG_c, "memory"
);
#else //defined (HAVE_MMX2) || defined (HAVE_3DNOW)
@@
-2489,7
+2489,7
@@
L2_DIFF_CORE((%0, %%REGc) , (%1, %%REGc))
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
- int ref= tempBlured[ x + y*stride ];
+ int ref= tempBlur
r
ed[ x + y*stride ];
int cur= src[ x + y*stride ];
int d1=ref - cur;
// if(x==0 || x==7) d1+= d1>>1;
int cur= src[ x + y*stride ];
int d1=ref - cur;
// if(x==0 || x==7) d1+= d1>>1;
@@
-2502,12
+2502,12
@@
L2_DIFF_CORE((%0, %%REGc) , (%1, %%REGc))
i=d;
d= (
4*d
i=d;
d= (
4*d
- +(*(tempBluredPast-256))
- +(*(tempBlur
edPast-1))+ (*(tempBlu
redPast+1))
- +(*(tempBluredPast+256))
+ +(*(tempBlur
r
edPast-256))
+ +(*(tempBlur
redPast-1))+ (*(tempBlur
redPast+1))
+ +(*(tempBlur
r
edPast+256))
+4)>>3;
+4)>>3;
- *tempBluredPast=i;
-// ((*tempBluredPast)*3 + d + 2)>>2;
+ *tempBlur
r
edPast=i;
+// ((*tempBlur
r
edPast)*3 + d + 2)>>2;
/*
Switch between
/*
Switch between
@@
-2521,9
+2521,9
@@
Switch between
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
- int ref= tempBlured[ x + y*stride ];
+ int ref= tempBlur
r
ed[ x + y*stride ];
int cur= src[ x + y*stride ];
int cur= src[ x + y*stride ];
- tempBlured[ x + y*stride ]=
+ tempBlur
r
ed[ x + y*stride ]=
src[ x + y*stride ]=
(ref + cur + 1)>>1;
}
src[ x + y*stride ]=
(ref + cur + 1)>>1;
}
@@
-2532,7
+2532,7
@@
Switch between
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
- tempBlured[ x + y*stride ]= src[ x + y*stride ];
+ tempBlur
r
ed[ x + y*stride ]= src[ x + y*stride ];
}
}
}
}
}
}
@@
-2541,9
+2541,9
@@
Switch between
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
- int ref= tempBlured[ x + y*stride ];
+ int ref= tempBlur
r
ed[ x + y*stride ];
int cur= src[ x + y*stride ];
int cur= src[ x + y*stride ];
- tempBlured[ x + y*stride ]=
+ tempBlur
r
ed[ x + y*stride ]=
src[ x + y*stride ]=
(ref*7 + cur + 4)>>3;
}
src[ x + y*stride ]=
(ref*7 + cur + 4)>>3;
}
@@
-2552,9
+2552,9
@@
Switch between
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
for(y=0; y<8; y++){
int x;
for(x=0; x<8; x++){
- int ref= tempBlured[ x + y*stride ];
+ int ref= tempBlur
r
ed[ x + y*stride ];
int cur= src[ x + y*stride ];
int cur= src[ x + y*stride ];
- tempBlured[ x + y*stride ]=
+ tempBlur
r
ed[ x + y*stride ]=
src[ x + y*stride ]=
(ref*3 + cur + 2)>>2;
}
src[ x + y*stride ]=
(ref*3 + cur + 2)>>2;
}
@@
-3650,8
+3650,8
@@
static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
if(mode & TEMP_NOISE_FILTER)
{
RENAME(tempNoiseReducer)(dstBlock-8, stride,
if(mode & TEMP_NOISE_FILTER)
{
RENAME(tempNoiseReducer)(dstBlock-8, stride,
- c.tempBlured[isColor] + y*dstStride + x,
- c.tempBluredPast[isColor] + (y>>3)*256 + (x>>3),
+ c.tempBlur
r
ed[isColor] + y*dstStride + x,
+ c.tempBlur
r
edPast[isColor] + (y>>3)*256 + (x>>3),
c.ppMode.maxTmpNoise);
}
}
c.ppMode.maxTmpNoise);
}
}
@@
-3672,8
+3672,8
@@
static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
if((mode & TEMP_NOISE_FILTER)){
RENAME(tempNoiseReducer)(dstBlock-8, dstStride,
if((mode & TEMP_NOISE_FILTER)){
RENAME(tempNoiseReducer)(dstBlock-8, dstStride,
- c.tempBlured[isColor] + y*dstStride + x,
- c.tempBluredPast[isColor] + (y>>3)*256 + (x>>3),
+ c.tempBlur
r
ed[isColor] + y*dstStride + x,
+ c.tempBlur
r
edPast[isColor] + (y>>3)*256 + (x>>3),
c.ppMode.maxTmpNoise);
}
c.ppMode.maxTmpNoise);
}