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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 195 - (view) (download)

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

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