JPEG
gif data

inADA

DCT

Subtract the previous DCT coefficient from the original picture data and calculate the average value. Multiply by +1 or -1, depending on whether the square is black or white.

{(+1) x (105-100)}
  + {(-1) x (75-100)}
    + {(+1) x (135 - 100)}
      + {(-1) x (85 - 100)} / 4
      = 20