Sub(x) = Raw(x) - Raw(x-bpp) 즉, Raw(x) = Sub(x) + Raw(x-bpp)
Raw(x) = Paeth(x) + PaethPredictor(Raw(x-bpp), Prior(x), Prior(x-bpp))
function PaethPredictor (a,b,c) begin ; a = left, b = above; c = upper left p = a + b - c pa = abs(p-a) pb = abs(p-b) pc = abs(p-c) if pa <= pb and pa <= pc then a else if pb <= pc then b else c