def process4x(): pixelExpr = expandQuadrant(genExpr4(), 4) fullTableVariant = Variant(pixelExpr, lite=False, table=True) liteTableVariant = Variant(pixelExpr, lite=True, table=True) #printText(formatOffsetsTable(fullTableVariant.pixelExpr)) #printText(formatWeightsTable(fullTableVariant.pixelExpr, computeWeightCells)) #printText(formatWeightsTable(liteTableVariant.pixelExpr, computeLiteWeightCells)) writeBinaryFile('HQ4xOffsets.dat', computeOffsets(fullTableVariant.pixelExpr)) writeBinaryFile( 'HQ4xWeights.dat', computeWeights(fullTableVariant.pixelExpr, computeWeightCells)) writeBinaryFile('HQ4xLiteOffsets.dat', genHQLiteOffsetsTable(liteTableVariant.pixelExpr))
def process4x(): pixelExpr = expandQuadrant(genExpr4(), 4) fullTableVariant = Variant(pixelExpr, lite = False, table = True) liteTableVariant = Variant(pixelExpr, lite = True, table = True) #printText(formatOffsetsTable(fullTableVariant.pixelExpr)) #printText(formatWeightsTable(fullTableVariant.pixelExpr, computeWeightCells)) #printText(formatWeightsTable(liteTableVariant.pixelExpr, computeLiteWeightCells)) writeBinaryFile( 'HQ4xOffsets.dat', computeOffsets(fullTableVariant.pixelExpr) ) writeBinaryFile( 'HQ4xWeights.dat', computeWeights(fullTableVariant.pixelExpr, computeWeightCells) ) writeBinaryFile( 'HQ4xLiteOffsets.dat', genHQLiteOffsetsTable(liteTableVariant.pixelExpr) )
def checkConvert4to2(): topLeftQuadrant4 = genExpr4() topLeftQuadrant2 = convert4to2(topLeftQuadrant4) pixelExpr2 = expandQuadrant(topLeftQuadrant2, 2) comparePixelExpr(pixelExpr2, expandQuadrant(genExpr2(), 2))