Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20070520-1.c
blobfe9db97476efee857a7f5e122aaa3523123ea4fb
1 typedef unsigned char uint8_t;
2 extern uint8_t ff_cropTbl[256 + 2 * 1024];
4 void ff_pred8x8_plane_c(uint8_t *src, int stride){
5 int j, k;
6 int a;
7 uint8_t *cm = ff_cropTbl + 1024;
8 const uint8_t * const src0 = src+3-stride;
9 const uint8_t *src1 = src+4*stride-1;
10 const uint8_t *src2 = src1-2*stride;
11 int H = src0[1] - src0[-1];
12 int V = src1[0] - src2[ 0];
13 for(k=2; k<=4; ++k) {
14 src1 += stride; src2 -= stride;
15 H += k*(src0[k] - src0[-k]);
16 V += k*(src1[0] - src2[ 0]);
18 H = ( 17*H+16 ) >> 5;
19 V = ( 17*V+16 ) >> 5;
21 a = 16*(src1[0] + src2[8]+1) - 3*(V+H);
22 for(j=8; j>0; --j) {
23 int b = a;
24 a += V;
25 src[0] = cm[ (b ) >> 5 ];
26 src[1] = cm[ (b+ H) >> 5 ];
27 src[2] = cm[ (b+2*H) >> 5 ];
28 src[3] = cm[ (b+3*H) >> 5 ];
29 src[4] = cm[ (b+4*H) >> 5 ];
30 src[5] = cm[ (b+5*H) >> 5 ];
31 src[6] = cm[ (b+6*H) >> 5 ];
32 src[7] = cm[ (b+7*H) >> 5 ];
33 src += stride;