摘要 |
The invention concerns a method for encoding a digital image, said image being divided into a plurality of blocks of pixels processed in a defined order, said method comprising the following steps, implemented for a current block: -Predicting (E1) the values of the current block from at least one previously processed block, according to a prediction method chosen from a plurality of possible methods, -Calculating (E2) a residual block by subtracting the predicted values from the original values of the current block, -Obtaining (E3) a transformed residual block by applying a transform to the pixels of the residual block, said residual block comprising coefficients, -Selecting (E7) the signs of the coefficients to predict in the transformed residual block; -Predicting (E9) the selected signs in the current block from encoded neighbouring blocks that have been decoded; -Calculating (E10) a prediction indicator of the selected signs from the predictions of the selected signs and the original values of same, -Carrying out entropy encoding (E11) of the values of indicators obtained for the predicted signs. According to the invention, the method comprises a step of determining a context of a coefficient of the current residual block from a plurality of predefined contexts, and the sign of a coefficient of the transformed residual block is selected depending on a predefined score associated with the encoding context of said coefficient, said score being representative of a reliability level of the prediction of the sign. |