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

Claim 12:
13. 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 mapped prediction luma sample based on the prediction luma sample;
generating luma mapping with chroma scaling (LMCS) related information based on the mapped prediction luma sample;
generating a residual luma sample based on the mapped prediction luma sample;
deriving residual information based on the residual luma sample;
encoding image information including the LMCS related information and the residual information;
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.