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

Claim 7:
8. An image encoding method performed by an encoding apparatus, the method comprising:
deriving an inter prediction mode;
generating motion information for a current block based on the inter prediction mode;
generating a prediction luma sample for the current block based on the motion information for the current block;
generating a mapped prediction luma sample based on a mapping process for the prediction luma sample;
generating luma mapping with chroma scaling (LMCS) related information based on the mapped prediction luma sample;
generating a modified reconstructed luma sample based on an inverse mapping process for luma samples;
generating residual information based on the mapped prediction luma sample and the modified reconstructed luma sample; and
encoding image information including the LMCS related information and the residual information,
wherein the LMCS related information includes information on bins for mapping and inverse mapping and information on LMCS codewords,
wherein a minimum bin index and a maximum bin index are derived based on the information on the bins,
wherein mapped values indexed by bin indices from the minimum bin index to the maximum bin index are derived based on the information on the LMCS codewords,
wherein in the mapping process for the prediction luma sample, a mapping index is derived based on the prediction luma samples, and the mapped prediction luma sample is generated by using a mapped value indexed by the mapping index,
wherein in the inverse mapping process for the luma samples, an inverse mapping index is derived based on the mapped values indexed by bin indices from the minimum bin index to the maximum bin index, and the modified reconstructed luma sample is generated by using a mapped value indexed by the inverse mapping index,
wherein, for deriving the inverse mapping index, the inverse mapping process for the luma samples comprises:
determining whether a mapped value, based on a case that the inverse mapping index is equal to the minimum bin index, is greater than a value of a reconstructed luma sample;
determining whether a mapped value, based on a case that the inverse mapping index is equal to maximum bin index −1, is greater than the value of the reconstructed luma sample; and
determining whether a mapped value, based on a case that the inverse mapping index is equal to the maximum bin index, is greater than the value of the reconstructed luma sample based on a determination that the mapped value, based on the case that the inverse mapping index is equal to maximum bin index −1, is not greater than the value of the reconstructed luma sample, and

wherein, based on a determination that the mapped value, based on the case that the inverse mapping index is equal to the maximum bin index, is greater than the value of the reconstructed luma sample, the inverse mapping index is derived as the maximum bin index.