Motion compensation with long-term prediction, i.e. the reference frame for a current frame not being the temporally closest one