Mercurial > libavcodec.hg
comparison intrax8dsp.c @ 5888:55a1e9f82bb7 libavcodec
factorize
author | michael |
---|---|
date | Fri, 09 Nov 2007 21:40:36 +0000 |
parents | 83ac4620c6ed |
children | 7eb994e6c047 |
comparison
equal
deleted
inserted
replaced
5887:83ac4620c6ed | 5888:55a1e9f82bb7 |
---|---|
116 } | 116 } |
117 memcpy(dst+area6, ptr-linesize, 8);//area6 always present in the above block | 117 memcpy(dst+area6, ptr-linesize, 8);//area6 always present in the above block |
118 } | 118 } |
119 //now calc the stuff we need | 119 //now calc the stuff we need |
120 if(edges&3){//mb_x==0 || mb_y==0){ | 120 if(edges&3){//mb_x==0 || mb_y==0){ |
121 int avg=(sum+4)>>3; | |
121 if(edges&1){ //(mb_x==0) {//implies mb_y!=0 | 122 if(edges&1){ //(mb_x==0) {//implies mb_y!=0 |
122 int avg=(sum+4)>>3; | |
123 memset(dst+area1,avg,8+8+1);//areas 1,2 and 3 are averaged | 123 memset(dst+area1,avg,8+8+1);//areas 1,2 and 3 are averaged |
124 sum+=avg*9;//8+1(egde pixel) | |
125 }else{//implies y==0 x!=0 | 124 }else{//implies y==0 x!=0 |
126 int avg=(sum+4)>>3; | |
127 memset(dst+area3,avg, 1+16+8);//areas 3, 4,5,6 | 125 memset(dst+area3,avg, 1+16+8);//areas 3, 4,5,6 |
128 sum+=avg*9; | 126 } |
129 } | 127 sum+=avg*9; |
130 }else{ | 128 }else{ |
131 uint8_t c; | 129 uint8_t c; |
132 c=*(src-1-linesize);//the edge pixel,in the top line and left column | 130 c=*(src-1-linesize);//the edge pixel,in the top line and left column |
133 dst[area3]=c; | 131 dst[area3]=c; |
134 sum+=c; | 132 sum+=c; |