1. Method for coding a current block of pixels of an image, comprising: determining a prediction block of the current block, determining a residual block from said current block and said prediction block, transforming and quantizing the residual block according to a quantization step size to obtain a quantized residual block, and entropy encoding the quantized residual block, wherein the prediction block of the current block is determined by: detecting, in a plurality of spatial prediction modes, redundant spatial prediction modes generating similar prediction blocks, generating, for each pair of redundant spatial prediction modes, an additional spatial prediction mode distinct from the spatial prediction modes of said plurality of spatial prediction modes and replacing, in said plurality of spatial prediction modes, one of the redundant spatial prediction modes by the additional spatial prediction mode, determining the prediction block of the current block according a spatial prediction mode of the plurality of spatial prediction modes.