Efficient C2-weighting for image warping