[svn] / trunk / xvidcore / src / bitstream / cbp.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/bitstream/cbp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3, Fri Mar 8 02:46:11 2002 UTC revision 78, Thu Mar 28 20:57:25 2002 UTC
# Line 3  Line 3 
3    
4  cbpFuncPtr calc_cbp;  cbpFuncPtr calc_cbp;
5    
6  uint32_t calc_cbp_c(const int16_t codes[6][64])  /*
7     * Returns a field of bits that indicates non zero ac blocks
8     * for this macro block
9     */
10    uint32_t calc_cbp_c(const int16_t codes[6*64])
11  {  {
12      uint32_t i, j;      uint32_t i, j;
13      uint32_t cbp = 0;      uint32_t cbp = 0;
14    
15      for (i = 0; i < 6; i++) {          for (i = 0; i < 6*64; i+=64)
16                  for (j = 1; j < 64/4; j+=4) {          {
17                          if (codes[i][j]  |codes[i][j+1]|                  for (j = 1; j < 61; j+=4)
18                                  codes[i][j+2]|codes[i][j+3]) {                  {
19                            if (codes[i + j    ]|codes[i + j + 1]|
20                                codes[i + j + 2]|codes[i + j + 3])
21                            {
22                                  cbp |= 1 << (5 - i);                                  cbp |= 1 << (5 - i);
23                                  break;                                  break;
24                          }                          }
25                  }                  }
26    
27                    if(codes[i + j]|codes[i + j +1]|codes[i + j + 2])
28                            cbp |= 1 << (5 - i);
29    
30      }      }
31    
32      return cbp;      return cbp;
33    
34  }  }

Legend:
Removed from v.3  
changed lines
  Added in v.78

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4