Lines Matching defs:bit

30     * Place the codewords into the matrix bit by bit
420 gf = 256 #operating on 8-bit codewords -> Galois field = 2^8 = 256
445 # bit() returns the bit'th bit of the byte
446 def bit(byte, bit):
447 #the MSB is bit 1, LSB is bit 8
448 return ( byte >> (8-bit) ) %2
450 # "module" places a given bit with appropriate wrapping within array
451 def module(array, nrow, ncol, row, col, bit) :
460 array[row][col] = bit
463 module(array, nrow, ncol, nrow-1, 0, bit(char,1));
464 module(array, nrow, ncol, nrow-1, 1, bit(char,2));
465 module(array, nrow, ncol, nrow-1, 2, bit(char,3));
466 module(array, nrow, ncol, 0, ncol-2, bit(char,4));
467 module(array, nrow, ncol, 0, ncol-1, bit(char,5));
468 module(array, nrow, ncol, 1, ncol-1, bit(char,6));
469 module(array, nrow, ncol, 2, ncol-1, bit(char,7));
470 module(array, nrow, ncol, 3, ncol-1, bit(char,8));
473 module(array, nrow, ncol, nrow-3, 0, bit(char,1));
474 module(array, nrow, ncol, nrow-2, 0, bit(char,2));
475 module(array, nrow, ncol, nrow-1, 0, bit(char,3));
476 module(array, nrow, ncol, 0, ncol-4, bit(char,4));
477 module(array, nrow, ncol, 0, ncol-3, bit(char,5));
478 module(array, nrow, ncol, 0, ncol-2, bit(char,6));
479 module(array, nrow, ncol, 0, ncol-1, bit(char,7));
480 module(array, nrow, ncol, 1, ncol-1, bit(char,8));
483 module(array, nrow, ncol, nrow-3, 0, bit(char,1));
484 module(array, nrow, ncol, nrow-2, 0, bit(char,2));
485 module(array, nrow, ncol, nrow-1, 0, bit(char,3));
486 module(array, nrow, ncol, 0, ncol-2, bit(char,4));
487 module(array, nrow, ncol, 0, ncol-1, bit(char,5));
488 module(array, nrow, ncol, 1, ncol-1, bit(char,6));
489 module(array, nrow, ncol, 2, ncol-1, bit(char,7));
490 module(array, nrow, ncol, 3, ncol-1, bit(char,8));
493 module(array, nrow, ncol, nrow-1, 0, bit(char,1));
494 module(array, nrow, ncol, nrow-1, ncol-1, bit(char,2));
495 module(array, nrow, ncol, 0, ncol-3, bit(char,3));
496 module(array, nrow, ncol, 0, ncol-2, bit(char,4));
497 module(array, nrow, ncol, 0, ncol-1, bit(char,5));
498 module(array, nrow, ncol, 1, ncol-3, bit(char,6));
499 module(array, nrow, ncol, 1, ncol-2, bit(char,7));
500 module(array, nrow, ncol, 1, ncol-1, bit(char,8));
504 module(array, nrow, ncol,row-2, col-2, bit(char,1))
505 module(array, nrow, ncol,row-2, col-1, bit(char,2))
506 module(array, nrow, ncol,row-1, col-2, bit(char,3))
507 module(array, nrow, ncol,row-1, col-1, bit(char,4))
508 module(array, nrow, ncol,row-1, col, bit(char,5))
509 module(array, nrow, ncol,row, col-2, bit(char,6))
510 module(array, nrow, ncol,row, col-1, bit(char,7))
511 module(array, nrow, ncol,row, col, bit(char,8))
519 # Starting in the correct location for character #1, bit 8,...
604 datamatrix[dest_row][dest_col] = array[i][j] #transfer from the plain bit array
643 elif module_arrays[i][y][x] != 0: #we have an invalid bit value
644 inkex.errormsg(_('Invalid bit value, this is a bug!'))