1. A method for coding an image block, the image block comprising a set of pixel values, the method comprising: generating a predicted block based on neighboring pixels of the image block and a prediction mode for prediction of the image block, the prediction mode specifying one of a vertical direction and a horizontal direction to be used for predicting pixels in the image block based on the neighboring pixels of the image block, each of the pixels along a single direction that is used for prediction of the image block being a function of a same at least one of the neighboring pixels, at least two of the pixels along the single direction being different functions of the same at least one of the neighboring pixels.