Luma mapping-based video or image coding
According to the disclosure of the present document, the index derivation process for the inverse luma mapping and/or the chroma residual scaling may be simplified, and the linear LMCS may be applied. Accordingly, the complexity of the LMCS may be reduced and video/image coding efficiency may be increased.
1 . An image decoding method performed by a decoding apparatus, the method comprising:
obtaining image information including prediction related information, luma mapping with chroma scaling (LMCS) related information, and residual information from a bitstream;
deriving an intra prediction mode of a current block based on the prediction related information;
generating a prediction luma sample based on the intra prediction mode;
deriving quantized transform coefficients for the current block based on the residual information;
deriving transform coefficients for the current block based on the quantized transform coefficients;
deriving a residual luma sample for the current block based on the transform coefficients;
generating a reconstructed luma sample based on the prediction luma sample and the residual luma sample;
deriving a piecewise function index based on the LMCS related information; and
generating a modified reconstructed luma sample based on the reconstructed luma sample and the piecewise function index,
wherein a minimum bin index and a maximum bin index are derived based on the LMCS related information,
wherein deriving the piecewise function index comprises:
determining whether a first mapped value, in a case that the piecewise function index is equal to the minimum bin index, is greater than a value of the reconstructed luma sample;
determining whether a second mapped value, in a case that the piecewise function index is equal to maximum bin index −1, is greater than the value of the reconstructed luma sample;
determining whether a third mapped value, in a case that the piecewise function index is equal to maximum bin index, is greater than the value of the reconstructed luma sample based on a determination that the second mapped value, in the case that the piecewise function index is equal to maximum bin index −1, is not greater than the value of the reconstructed luma sample, and
wherein based on the determination that the second mapped value is not greater than the value of the reconstructed luma sample in the case that the piecewise function index is equal to maximum bin index −1, the piecewise function index is derived as the maximum bin index based on the determination that the third mapped value is greater than the value of the reconstructed luma sample.
2 . An image encoding method performed by an encoding apparatus, the method comprising:
determining an intra prediction mode for a current block;
generating a prediction luma sample based on the intra prediction mode;
generating a residual luma sample based on the prediction luma sample;
deriving transform coefficients for the current block based on the residual luma sample;
deriving quantized transform coefficients for the current block based on the transform coefficients;
deriving residual information based on the quantized transform coefficients; and
encoding image information including luma mapping with chroma scaling (LMCS) related information and the residual information,
wherein the method further comprising:
generating a reconstructed luma sample based on the prediction luma sample;
deriving a piecewise function index based on the LMCS related information; and
generating a modified reconstructed luma sample based on the reconstructed luma sample and the piecewise function index,
wherein a minimum bin index and a maximum bin index are derived based on the LMCS related information,
wherein deriving the piecewise function index comprises:
determining whether a first mapped value, in a case that the piecewise function index is equal to the minimum bin index, is greater than a value of the reconstructed luma sample;
determining whether a second mapped value, in a case that the piecewise function index is equal to maximum bin index −1, is greater than the value of the reconstructed luma sample;
determining whether a third mapped value, in a case that the piecewise function index is equal to maximum bin index, is greater than the value of the reconstructed luma sample based on a determination that the second mapped value, in the case that the piecewise function index is equal to maximum bin index−1, is not greater than the value of the reconstructed luma sample, and
wherein based on the determination that the second mapped value is not greater than the value of the reconstructed luma sample in the case that the piecewise function index is equal to maximum bin index −1, the piecewise function index is derived as the maximum bin index based on the determination that the third mapped value is greater than the value of the reconstructed luma sample.
3 . A method for transmitting data for an image information, comprising:
obtaining a bitstream of the image information including luma mapping with chroma scaling (LMCS) related information and residual information, wherein the bitstream generated by determining an intra prediction mode for a current block, generating a prediction luma sample based on the intra prediction mode, generating a residual luma sample based on the prediction luma sample, deriving transform coefficients for the current block based on the residual luma sample, deriving quantized transform coefficients for the current block based on the transform coefficients, deriving residual information based on the quantized transform coefficients, and encoding the image information including the LMCS related information and the residual information; and
transmitting the data comprising the bitstream of the image information including the LMCS related information and the residual information,
wherein a reconstructed luma sample is generated based on the prediction luma sample;
wherein a piecewise function index is derived based on the LMCS related information; and
wherein a modified reconstructed luma sample is generated based on the reconstructed luma sample and the piecewise function index,
wherein a minimum bin index and a maximum bin index are derived based on the LMCS related information,
wherein for deriving the piecewise function index,
it is determined whether a first mapped value, in a case that the piecewise function index is equal to the minimum bin index, is greater than a value of the reconstructed luma sample;
it is determined whether a second mapped value, in a case that the piecewise function index is equal to maximum bin index −1, is greater than the value of the reconstructed luma sample;
it is determined whether a third mapped value, in a case that the piecewise function index is equal to maximum bin index, is greater than the value of the reconstructed luma sample based on a determination that the second mapped value, in the case that the piecewise function index is equal to maximum bin index −1, is not greater than the value of the reconstructed luma sample, and
wherein based on the determination that the second mapped value is not greater than the value of the reconstructed luma sample in the case that the piecewise function index is equal to maximum bin index −1, the piecewise function index is derived as the maximum bin index based on the determination that the third mapped value is greater than the value of the reconstructed luma sample.