Fast and robust coding for image and video interpolation