1. A method for encoding an image block, the image block comprising a set of pixel values, the method comprising: selecting a prediction mode for predicting pixels in the image block based on neighboring pixels, the prediction mode specifying the predicted value of at least one pixel in the image block as a combination of at least two neighboring pixels.