1. A method for encoding a picture, said method comprising: storing a reference picture in a memory; taking samples from at least one line of a prediction block; generating at least one data word, the data word being a function of the samples; addressing the memory with the at least one data word; receiving one or more addresses, said one or more addresses associated with one or more blocks; and selecting a reference block from the one or more blocks for the prediction block.