Extensible Firmware Interface Specification
H-22 12/01/02 Version 1.10
STATIC
VOID
HufEncodeStart ()
{
INT32 i;
for (i = 0; i < NC; i++) {
mCFreq[i] = 0;
}
for (i = 0; i < NP; i++) {
mPFreq[i] = 0;
}
mOutputPos = mOutputMask = 0;
InitPutBits();
return;
}
STATIC
VOID
HufEncodeEnd ()
{
SendBlock();
//
// Flush remaining bits
//
PutBits(UINT8_BIT - 1, 0);
return;
}
STATIC
VOID
MakeCrcTable ()
{
UINT32 i, j, r;
for (i = 0; i <= UINT8_MAX; i++) {
r = i;
for (j = 0; j < UINT8_BIT; j++) {
if (r & 1) {
r = (r >> 1) ^ CRCPOLY;
} else {
r >>= 1;
}
}
mCrcTable[i] = (UINT16)r;
}
}
STATIC
VOID
PutBits (
IN INT32 n,
IN UINT32 x
)
/*++