Patent ID: 11949872
Assignee: LG ELECTRONICS INC.
Field: Audio-visual technology (Electrical engineering)
Classification: CPC H | IPC H

Claim 0:
1. An image decoding method performed by a decoding apparatus, the method comprising:
obtaining image information including prediction related information and luma mapping with chroma scaling (LMCS) related 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;
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; and

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 a determination that the third mapped value is greater than the value of the reconstructed luma sample.