Lines Matching refs:inter

102     data_nrow, data_ncol, reg_row, reg_col, nd, nc, inter = get_parameters( nrow, ncol )
110 codewords = get_codewords( text, nd, nc, inter, size144 )
127 # inter number of interleaved Reed-Solomon blocks
213 def get_codewords( text, nd, nc, inter, size144 ):
218 data_blocks = partition_data(data, nd*inter) #partition into data blocks of length nd*inter -> inter Reed-Solomon block
220 data_blocks = interleave( data_blocks, inter) # interleave consecutive inter blocks if required
224 data_blocks = combine_interleaved(data_blocks, inter, nd, nc, False) #concatenate Reed-Solomon blocks bound for the same datamatrix
232 inter = 8
236 block1 = interleave( [block1], inter) # interleave into 8 blocks
239 inter = 2
243 block2 = interleave( [block2], inter) # interleave into 2 blocks
257 #Takes a codeword stream and splits up into "inter" blocks.
259 def interleave( blocks, inter):
261 if inter == 1: # if we don't have to interleave, just return the blocks
266 block_length = len(block)/inter #length of each interleaved block
267 inter_blocks = [[0] * block_length for i in xrange(inter)] #the interleaved blocks
270 for j in range(inter): #for each interleaved block
271 inter_blocks[j][i] = block[ i*inter + j ]
281 def combine_interleaved( blocks, inter, nd, nc, size144):
282 if inter == 1: #the blocks aren't interleaved
286 for i in range( len(blocks) / inter ): #for each group of "inter" blocks -> one full datamatrix
293 nd_range = nd*inter
294 nc_range = nc*inter
297 data_codewords.append( blocks[i*inter + j%inter][j/inter] )
300 data_codewords.append( blocks[i*inter + j%inter][nd + j/inter] )