<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __do_filter_up(self, scanline, result):
 """Up filter."""

        previous = self.prev
        for i in range(len(result)):
            x = scanline[i]
            b = previous[i]
            result[i] = (x - b) & 0xff