def differentiate_frames(src):
  """Subtract every two consecutive frames."""
  # Shift data to pre/post frames
  pre_src = src[:-1]
  post_src = src[1:]

  # Differentiate src points
  src = pre_src - post_src

  return src