init static method
void
init()
Implementation
static void init() {
if (_isInit) return;
_isInit = true;
// Pre-computes the symbol ratio table.
for (int i = 0; i < PDF417Common.symbolTable.length; i++) {
int currentSymbol = PDF417Common.symbolTable[i];
int currentBit = currentSymbol & 0x1;
for (int j = 0; j < PDF417Common.barsInModule; j++) {
double size = 0.0;
while ((currentSymbol & 0x1) == currentBit) {
size += 1.0;
currentSymbol >>= 1;
}
currentBit = currentSymbol & 0x1;
_ratiosTable[i][PDF417Common.barsInModule - j - 1] =
size / PDF417Common.modulesInCodeword;
}
}
}