1. An apparatus comprising at least a processor, and a memory associated with said processor and having computer coded instructions stored therein, said instructions when executed by the processor causing the apparatus to perform: selecting a pixel of a current block for prediction, wherein the pixel of the current block is one of a plurality of pixels in a row or column of the current block; determining a projection of said pixel to a set of reference pixels, wherein the set of reference pixels for at least one pixel in the row or column of the current block is already decoded reference pixels on a row above the current block, wherein the set of reference pixels for at least another pixel in the row or column of the current block is already decoded reference pixels on a column left of the current block, and wherein determining the projection comprises determining the projection of said pixel to the row or column of reference pixels based on a displacement measure between the row or column of the current block and the row or column of reference pixels with the displacement measure expressed with reference to a last pixel of a last row of the current block; and obtaining a prediction value for the pixel to be predicted using at least two reference pixels selected from the set of reference pixels on the basis of said projection.