OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20070520-1.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
typedef unsigned char uint8_t;
2
extern uint8_t ff_cropTbl[256 + 2 * 1024];
3
 
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]);
17
  }
18
  H = ( 17*H+16 ) >> 5;
19
  V = ( 17*V+16 ) >> 5;
20
 
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;
34
  }
35
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.