a method and device form a prediction value . a prediction direction is locally described by nonlinear trajectories . the prediction direction can be used in forming a prediction value to achieve a more accurate prediction determination . the method and device can be used in image compression or image - sequence compression .