A method for encoding an image block, comprising: determining a local dynamic range of the block identified by a maximum pixel value and a minimum pixel value among the pixel values of the block; adaptively precision-extending pixel values of the block based on the local dynamic range of the block comprising: calculating a precision extension factor based on a difference between said maximum pixel value and said minimum pixel value and a number of bits used for indicating pixel values of the block, while keeping an original bit depth of the pixel values of the block, for each of the pixels in the block, calculating a new pixel value by subtracting the minimal pixel value from the pixel value of the pixel, and multiplying the new pixel value by the precision extension factor; and encoding the block with an adaptively extended precision, said encoding the block with an adaptively extended precision comprises: for other blocks from which the block is predicted, adaptively precision-extending pixel values of said other blocks based on the determined local dynamic range of the block; and predicting the block by using said other blocks after being adaptively precision-extended, calculating residual values between the block and the predicted block; said method for encoding being characterized in that said encoding the block with an adaptively extended precision also comprises calculating coefficients of the block by performing DCT transform on the residual values; and quantizing the coefficients of the block according to a quantization step which is calculated by multiplying an original quantization step by said precision extension factor. determining a local dynamic range of the block identified by a maximum pixel value and a minimum pixel value among the pixel values of the block; adaptively precision-extending pixel values of the block based on the local dynamic range of the block comprising: calculating a precision extension factor based on a difference between said maximum pixel value and said minimum pixel value and a number of bits used for indicating pixel values of the block, while keeping an original bit depth of the pixel values of the block, for each of the pixels in the block, calculating a new pixel value by subtracting the minimal pixel value from the pixel value of the pixel, and multiplying the new pixel value by the precision extension factor; and calculating a precision extension factor based on a difference between said maximum pixel value and said minimum pixel value and a number of bits used for indicating pixel values of the block, while keeping an original bit depth of the pixel values of the block, for each of the pixels in the block, calculating a new pixel value by subtracting the minimal pixel value from the pixel value of the pixel, and multiplying the new pixel value by the precision extension factor; and encoding the block with an adaptively extended precision, said encoding the block with an adaptively extended precision comprises: for other blocks from which the block is predicted, adaptively precision-extending pixel values of said other blocks based on the determined local dynamic range of the block; and predicting the block by using said other blocks after being adaptively precision-extended, calculating residual values between the block and the predicted block; for other blocks from which the block is predicted, adaptively precision-extending pixel values of said other blocks based on the determined local dynamic range of the block; and predicting the block by using said other blocks after being adaptively precision-extended, calculating residual values between the block and the predicted block; said method for encoding being characterized in that said encoding the block with an adaptively extended precision also comprises calculating coefficients of the block by performing DCT transform on the residual values; and quantizing the coefficients of the block according to a quantization step which is calculated by multiplying an original quantization step by said precision extension factor.