def blit_fast(dstv, dsthgt, dstwid, dstybase, dstxbase, srcv, srchgt, srcwid):
    for yoff in range(dstybase, dstybase + srchgt):
        dstypos = yoff * dstwid + dstxbase
srcypos = yoff * srcwid
for xoff in range(0, srcwid):
    dstv[dstypos + xoff] = srcv[srcypos + xoff]

def blit_slow(dstv, dsthgt, dstwid, dstybase, dstxbase, srcv, srchgt, srcwid):
    for yoff in range(0, srchgt):
        for xoff in range(0, srcwid):
            dstv[dstybase + yoff][dstxbase + xoff] = srcv[yoff][xoff]

def blit_convert(dstv, dsthgt, dstwid, dstybase, dstxbase, srcv, srchgt, srcwid
    ):
    for yoff in range(0, srchgt):
        for xoff in range(0, srcwid):
            dstv[dstybase + yoff][dstxbase + xoff] = convert(srcv, yoff, xoff)

def convert(srcv, ypos, xpos):
    cur = srcv[ypos][xpos]
top = srcv[ypos - 1][xpos]
bot = srcv[ypos + 1][xpos]
left = srcv[ypos][xpos - 1]
right = srcv[ypos][xpos + 1]
out = cur * 0.6 + top * 0.1 + bot * 0.1 + left * 0.1 + right * 0.1
return out
Улучшение производительности дисплея