Commit b272afc7 authored by michael's avatar michael

factorize


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10972 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3306afee
...@@ -118,15 +118,13 @@ static void x8_setup_spacial_compensation(uint8_t *src, uint8_t *dst, int linesi ...@@ -118,15 +118,13 @@ static void x8_setup_spacial_compensation(uint8_t *src, uint8_t *dst, int linesi
} }
//now calc the stuff we need //now calc the stuff we need
if(edges&3){//mb_x==0 || mb_y==0){ if(edges&3){//mb_x==0 || mb_y==0){
if(edges&1){ //(mb_x==0) {//implies mb_y!=0
int avg=(sum+4)>>3; int avg=(sum+4)>>3;
if(edges&1){ //(mb_x==0) {//implies mb_y!=0
memset(dst+area1,avg,8+8+1);//areas 1,2 and 3 are averaged memset(dst+area1,avg,8+8+1);//areas 1,2 and 3 are averaged
sum+=avg*9;//8+1(egde pixel)
}else{//implies y==0 x!=0 }else{//implies y==0 x!=0
int avg=(sum+4)>>3;
memset(dst+area3,avg, 1+16+8);//areas 3, 4,5,6 memset(dst+area3,avg, 1+16+8);//areas 3, 4,5,6
sum+=avg*9;
} }
sum+=avg*9;
}else{ }else{
uint8_t c; uint8_t c;
c=*(src-1-linesize);//the edge pixel,in the top line and left column c=*(src-1-linesize);//the edge pixel,in the top line and left column
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment