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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (download) (annotate)
Sat Feb 15 15:22:18 2003 UTC (21 years, 1 month ago) by edgomez
Branch: MAIN
CVS Tags: merged-dev-api-3
Branch point for: dev-api-4
Changes since 1.9: +0 -64 lines
Moved dev-api-3 to HEAD -- Nasty but efficient -- Merging work has been done too
#include "../portab.h"
#include "cbp.h"

cbpFuncPtr calc_cbp;

/*
 * Returns a field of bits that indicates non zero ac blocks
 * for this macro block
 */
uint32_t
calc_cbp_c(const int16_t codes[6 * 64])
{
	uint32_t i, j;
	uint32_t cbp = 0;

	for (i = 0; i < 6; i++) {
		for (j = 1; j < 61; j += 4) {
			if (codes[i * 64 + j] | codes[i * 64 + j + 1] |
				codes[i * 64 + j + 2] | codes[i * 64 + j + 3]) {
				cbp |= 1 << (5 - i);
				break;
			}
		}

		if (codes[i * 64 + j] | codes[i * 64 + j + 1] | codes[i * 64 + j + 2])
			cbp |= 1 << (5 - i);

	}

	return cbp;

}

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