[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 77, Thu Mar 28 16:14:23 2002 UTC revision 78, Thu Mar 28 20:57:25 2002 UTC
# Line 7  Line 7 
7   * Returns a field of bits that indicates non zero ac blocks   * Returns a field of bits that indicates non zero ac blocks
8   * for this macro block   * for this macro block
9   */   */
10  uint32_t calc_cbp_c(const int16_t codes[6][64])  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 < 61; 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])                  if(codes[i + j]|codes[i + j +1]|codes[i + j + 2])
28                          cbp |= 1 << (5 - i);                          cbp |= 1 << (5 - i);
29    
30          }          }

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

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