The encoding/decoding method and apparatus according to the present invention derives a residual coefficient of a residual block, calculates a quantization parameter for a residual block, performs dequantization on a residual coefficient using a quantization parameter, and performs inverse transform on a dequantized residual coefficient to reconstruct a residual sample of a residual block.