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

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

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

revision 1.3, Thu Mar 28 20:57:24 2002 UTC revision 1.5, Wed Jun 12 20:38:40 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
11    calc_cbp_c(const int16_t codes[6 * 64])
12  {  {
13          uint32_t i, j;          uint32_t i, j;
14          uint32_t cbp = 0;          uint32_t cbp = 0;
15    
16          for (i = 0; i < 6*64; i+=64)          for (i = 0; i < 6; i++) {
17          {                  for (j = 1; j < 61; j += 4) {
18                  for (j = 1; j < 61; j+=4)                          if (codes[i * 64 + j] | codes[i * 64 + j + 1] |
19                  {                                  codes[i * 64 + j + 2] | codes[i * 64 + j + 3]) {
                         if (codes[i + j    ]|codes[i + j + 1]|  
                             codes[i + j + 2]|codes[i + j + 3])  
                         {  
20                                  cbp |= 1 << (5 - i);                                  cbp |= 1 << (5 - i);
21                                  break;                                  break;
22                          }                          }
23                  }                  }
24    
25                  if(codes[i + j]|codes[i + j +1]|codes[i + j + 2])                  if (codes[i * 64 + j] | codes[i * 64 + j + 1] | codes[i * 64 + j + 2])
26                          cbp |= 1 << (5 - i);                          cbp |= 1 << (5 - i);
27    
28          }          }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

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