48 #define area5 (8+8+1+8)
49 #define area6 (8+8+1+16)
67 int * range,
int * psum,
int edges){
77 memset(dst,0x80,16+1+16+8);
96 min_pix=
FFMIN(min_pix,c);
97 max_pix=
FFMAX(max_pix,c);
109 min_pix=
FFMIN(min_pix, c);
110 max_pix=
FFMAX(max_pix, c);
113 memset(dst+
area5,c,8);
114 memcpy(dst+
area4, ptr, 8);
116 memcpy(dst+
area4, ptr, 16);
118 memcpy(dst+
area6, ptr-linesize, 8);
124 memset(dst+
area1,avg,8+8+1);
126 memset(dst+
area3,avg, 1+16+8);
135 (*range) = max_pix - min_pix;
142 640, 640, 669, 480, 708, 354, 748, 257, 792, 198, 760, 143, 808, 101, 772, 72,
143 480, 669, 537, 537, 598, 416, 661, 316, 719, 250, 707, 185, 768, 134, 745, 97,
144 354, 708, 416, 598, 488, 488, 564, 388, 634, 317, 642, 241, 716, 179, 706, 132,
145 257, 748, 316, 661, 388, 564, 469, 469, 543, 395, 571, 311, 655, 238, 660, 180,
146 198, 792, 250, 719, 317, 634, 395, 543, 469, 469, 507, 380, 597, 299, 616, 231,
147 161, 855, 206, 788, 266, 710, 340, 623, 411, 548, 455, 455, 548, 366, 576, 288,
148 122, 972, 159, 914, 211, 842, 276, 758, 341, 682, 389, 584, 483, 483, 520, 390,
149 110, 1172, 144, 1107, 193, 1028, 254, 932, 317, 846, 366, 731, 458, 611, 499, 499
157 uint16_t left_sum[2][8] = { { 0 } };
158 uint16_t top_sum[2][8] = { { 0 } };
164 left_sum[p&1][j]+= a>>(p>>1);
172 top_sum[p&1][j]+= a>>(p>>1);
179 top_sum[p&1][j]+= a>>(p>>1);
186 top_sum[p&1][j]+= a>>(p>>1);
191 top_sum [0][i]+=(top_sum [1][i]*181 + 128 )>>8;
192 left_sum[0][i]+=(left_sum[1][i]*181 + 128 )>>8;
220 dst[x]=src[
area4 +1+y+x];
230 dst[x]=src[
area4 +((y+1)>>1)+x];
240 dst[x]=( src[
area4+x] + src[
area6+x] + 1 )>>1;
251 dst[x]=src[
area2+9+2*x-y];
253 dst[x]=src[
area4 +x-((y+1)>>1)];
264 dst[x]=src[
area3+x-y];
275 dst[x]=( src[
area3-1+x-2*y] + src[
area3+x-2*y] + 1)>>1;
277 dst[x]=src[
area2+8-y +(x>>1)];
288 dst[x]=( src[
area1+7-y] + src[
area2+7-y] + 1 )>>1;
308 dst[x]=(src[
area2+7-y]*(8-x)+src[
area4+x]*x+4)>>3;
318 dst[x]=(src[
area2+7-y]*y+src[
area4+x]*(8-y)+4)>>3;
326 int p0,p1,p2,p3,p4,p5,p6,p7,p8,p9;
327 int ql=(quant+10)>>3;
329 for(i=0; i<8; i++,ptr+=b_stride){
342 (
FFABS(p1-p2) <= ql) +
343 (
FFABS(p2-p3) <= ql) +
344 (
FFABS(p3-p4) <= ql) +
345 (
FFABS(p4-p5) <= ql);
348 (
FFABS(p5-p6) <= ql) +
349 (
FFABS(p6-p7) <= ql) +
350 (
FFABS(p7-p8) <= ql) +
351 (
FFABS(p8-p9) <= ql) +
352 (
FFABS(p0-p1) <= ql);
366 ptr[-2*a_stride]=(4*p2 + 3*p3 + 1*p7 + 4)>>3;
367 ptr[-1*a_stride]=(3*p2 + 3*p4 + 2*p7 + 4)>>3;
368 ptr[ 0 ]=(2*p2 + 3*p5 + 3*p7 + 4)>>3;
369 ptr[ 1*a_stride]=(1*p2 + 3*p6 + 4*p7 + 4)>>3;
379 x0 = (2*p3 - 5*p4 + 5*p5 - 2*p6 + 4)>>3;
381 x1=(2*p1 - 5*p2 + 5*p3 - 2*p4 + 4)>>3;
382 x2=(2*p5 - 5*p6 + 5*p7 - 2*p8 + 4)>>3;
387 if( x > 0 && (m^x0) <0){
400 ptr[-1*a_stride] -= x;