(compute_motion): Add window argument.