1. A method for predicting a block of pixels comprising: forming a first patch with a neighborhood around the block of pixels to be predicted; searching in a search window at least one other patch similar to the first patch, each patch comprising a block of pixels and a causal neighborhood around that block of pixels; and obtaining a final prediction of the block to be predicted from said at least one other patch; wherein the method further comprises: determining a mapping of a causal neighborhood of a patch, on the block of pixels of said patch in order that the block of pixels of at least one training patch is best predicted by mapping the causal neighborhood of that training patch on the block of pixels of that training patch, and predicting the block of pixels from a prediction block computed by applying the determined mapping on the neighborhood of the block of pixels to predict, where in the course of the sub-step for searching, a patch which is the most similar to the patch formed with the neighborhood and the prediction block is considered, and the patches which are the most similar, in terms of content, to said most similar patch are considered; and adding said prediction block to the first patch.