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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download)

1 : Isibaar 1.1 #include "../portab.h"
2 :     #include "cbp.h"
3 :    
4 :     cbpFuncPtr calc_cbp;
5 :    
6 : edgomez 1.2 /*
7 :     * Returns a field of bits that indicates non zero ac blocks
8 :     * for this macro block
9 :     */
10 : Isibaar 1.1 uint32_t calc_cbp_c(const int16_t codes[6][64])
11 :     {
12 : edgomez 1.2 uint32_t i, j;
13 :     uint32_t cbp = 0;
14 : Isibaar 1.1
15 : edgomez 1.2 for (i = 0; i < 6; i++) {
16 :     for (j = 1; j < 61; j+=4) {
17 : Isibaar 1.1 if (codes[i][j] |codes[i][j+1]|
18 : edgomez 1.2 codes[i][j+2]|codes[i][j+3]) {
19 : Isibaar 1.1 cbp |= 1 << (5 - i);
20 :     break;
21 :     }
22 :     }
23 : edgomez 1.2
24 :     if(codes[i][j]|codes[i][j+1]|codes[i][j+2])
25 :     cbp |= 1 << (5 - i);
26 :    
27 :     }
28 :    
29 :     return cbp;
30 :    
31 : Isibaar 1.1 }

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