[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.1, Fri Mar 8 02:44:35 2002 UTC revision 1.2, Thu Mar 21 15:25:32 2002 UTC
# Line 3  Line 3 
3    
4  cbpFuncPtr calc_cbp;  cbpFuncPtr calc_cbp;
5    
6    /*
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])  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; i++) {
16                  for (j = 1; j < 64/4; j+=4) {                  for (j = 1; j < 61; j+=4) {
17                          if (codes[i][j]  |codes[i][j+1]|                          if (codes[i][j]  |codes[i][j+1]|
18                                  codes[i][j+2]|codes[i][j+3]) {                                  codes[i][j+2]|codes[i][j+3]) {
19                                  cbp |= 1 << (5 - i);                                  cbp |= 1 << (5 - i);
20                                  break;                                  break;
21                          }                          }
22                  }                  }
23    
24                    if(codes[i][j]|codes[i][j+1]|codes[i][j+2])
25                            cbp |= 1 << (5 - i);
26    
27      }      }
28    
29      return cbp;      return cbp;
30    
31  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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