Motion compensation with long-term prediction