Analysis of Coding Gain Due to In-Loop Reshaping
Chau-Wai Wong, Chang-Hong Fu, Mengting Xu, Guan-Ming Su
TL;DR
This work provides the first theoretical justification for coding gains from in-loop reshaping in hybrid video codecs. By modeling a simplified one-piece range-expansion reshaper, the authors derive a closed-form RD relation that shows a distortion reduction of $\mathrm{MSE} \approx (q/k)^2/12$ and an entropy increase of $H^{(1)} \approx H^{(0)}+\log_2 k$. Crucially, they show that gains arise only when the entropy coder is suboptimal, with a PSNR gain given by $\Delta \mathrm{PSNR} = 20(1-\eta)\log_{10} k$, where $\eta$ captures the coder’s suboptimality; experiments with a simplified codec and standard test sequences verify the predicted gains. The results illuminate why in-loop reshaping improves coding efficiency in practice and offer guidance for real codecs (e.g., VVC LMCS) by highlighting the role of entropy coding; they also discuss extensions to multi-piece reshapers and practical considerations such as quantization and evaluation metrics.
Abstract
Reshaping, a point operation that alters the characteristics of signals, has been shown capable of improving the compression ratio in video coding practices. Out-of-loop reshaping that directly modifies the input video signal was first adopted as the supplemental enhancement information (SEI) for the HEVC/H.265 without the need to alter the core design of the video codec. VVC/H.266 further improves the coding efficiency by adopting in-loop reshaping that modifies the residual signal being processed in the hybrid coding loop. In this paper, we theoretically analyze the rate-distortion performance of the in-loop reshaping and use experiments to verify the theoretical result. We prove that the in-loop reshaping can improve coding efficiency when the entropy coder adopted in the coding pipeline is suboptimal, which is in line with the practical scenarios that video codecs operate in. We derive the PSNR gain in a closed form and show that the theoretically predicted gain is consistent with that measured from experiments using standard testing video sequences.
