A linear model (LM) prediction method and a coder are disclosed. The method includes dividing a current coding block into at least two sub-blocks; for each of the sub-blocks, constructing a linear model, wherein parameters of the linear model are calculated by using pixel values of adjacent reconstructed pixels of the sub-block and adjacent reconstructed pixels of a reference sub-block of the sub-block; and predicting the sub-block by using the linear model, and obtaining a LM prediction value of the sub-block.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A linear model (LM) prediction method, comprising: dividing a current coding block into at least two sub-blocks; for each of the sub-blocks, constructing a linear model, wherein parameters of the linear model are calculated by using pixel values of adjacent reconstructed pixels of the sub-block and adjacent reconstructed pixels of a reference sub-block of the sub-block; and predicting the sub-block by using the linear model, and obtaining a LM prediction value of the sub-block; wherein, the adjacent reconstructed pixels are located at a coded side of the sub-block and is located in another sub-block of the at least two sub-blocks, the another sub-block and the sub-block belong to one coding block; and when no adjacent reconstructed pixel is present on a side of the sub-block and the adjacent reconstructed pixels are present on another side of the sub-block, the present adjacent reconstructed pixels are used to fill the side at which no adjacent reconstructed pixel is present.
2. The method of claim 1, wherein the dividing a current coding block comprises: dividing the current coding block according to a linear model type of the current coding block.
3. The method of claim 2, wherein the dividing the current coding block according to a linear model type of the current coding block comprises: if the linear model type of the current coding block is LM or local illumination compensation (LIC), dividing the current coding block horizontally or vertically; if the linear model type of the current coding block is LM or LIC, dividing the current coding block horizontally and vertically; if the linear model type of the current coding block is LM_L, dividing the current coding block vertically; or if the linear model type of the current coding block is LM_T, dividing the current coding block horizontally.
4. The method of claim 1, wherein the dividing a current coding block comprises: dividing the current coding block according to size information of the current coding block.
5. The method of claim 4, wherein the dividing the current coding block according to a size of the current coding block comprises: if a width of the current coding block is greater than a height of the current coding block, dividing the current coding block vertically; if the width is less than the height, dividing the current coding block horizontally; if the width is equal to the height, dividing the current coding block horizontally and vertically; or if the width is equal to the height, dividing the current coding block horizontally or vertically.
6. The method of claim 1, wherein at least one of the sub-blocks has a shape of non-rectangle.
7. The method of claim 1, wherein if a linear model type of the sub-block is cross-component linear model (CCLM) and a coded side of the sub-block has a stepped edge, the adjacent reconstructed pixels of the sub-block used for calculating the parameters of the linear model of the sub-block belong to another sub-block adjacent to the sub-block.
8. The method of claim 1, wherein the LM prediction value of the sub-block is calculated by substituting the reference sub-block of the sub-block into the linear model.
9. The method of claim 1, further comprising: calculating prediction cost of sub-block prediction by using LM prediction values of all the sub-blocks; comparing the prediction cost of sub-block prediction with prediction cost of block-prediction and selecting a prediction mode with less prediction cost as a prediction mode of the current coding block, wherein the prediction cost of block-prediction indicates prediction cost for which linear model prediction is performed on the current coding block; and coding the current coding block by using the selected prediction mode, and obtaining a code-stream of the current coding block, wherein the code stream of the current coding block comprises a sub-block prediction flag, and the sub-block prediction flag is configured for indicating whether the current coding block adopts sub-block prediction.
10. The method of claim 9, wherein the sub-block prediction flag comprises a sub-block prediction syntax element, and a value of the sub-block prediction syntax element is configured for indicating whether the current coding block adopts sub-block prediction and a manner in which the current coding block is divided; or the sub-block prediction flag comprises a sub-block prediction syntax element, and a value of the sub-block prediction syntax element is configured for indicating whether the current coding block adopts sub-block prediction, and the sub-block prediction flag further comprises a manner in which the current coding block is divided when the current coding block adopts sub-block prediction; or the sub-block prediction flag comprises a sequence number of intra-prediction mode of the current coding block, wherein the sequence number is newly added when the current coding block adopts sub-block prediction.
11. A device for linear model (LM) prediction, comprising: a dividing module, configured for dividing a current coding block into at least two sub-blocks; for each of the sub-blocks, a constructing module, configured for constructing a linear model, wherein parameters of the linear model are calculated by using pixel values of adjacent reconstructed pixels of the sub-block and adjacent reconstructed pixels of a reference sub-block of the sub-block; and a predicting module, configured for predicting the sub-block using the linear model and obtaining a LM prediction value of the sub-block; wherein, the adjacent reconstructed pixels are located at a coded side of the sub-block and is located in another sub-block of the at least two sub-blocks, the another sub-block and the sub-block belong to one coding block; and when no adjacent reconstructed pixel is present on a side of the sub-block and the adjacent reconstructed pixels are present on another side of the sub-block, the present adjacent reconstructed pixels are used to fill the side at which no adjacent reconstructed pixel is present.
12. A coder, comprising a processor, wherein the processor is configured to execute instructions to perform: dividing a current coding block into at least two sub-blocks; for each of the sub-blocks, constructing a linear model, wherein parameters of the linear model are calculated by using pixel values of adjacent reconstructed pixels of the sub-block and adjacent reconstructed pixels of a reference sub-block of the sub-block; and predicting the sub-block by using the linear model, and obtaining a linear model (LM) prediction value of the sub-block; wherein, the adjacent reconstructed pixels are located at a coded side of the sub-block and is located in another sub-block of the at least two sub-blocks, the another sub-block and the sub-block belong to one coding block; and when no adjacent reconstructed pixel is present on a side of the sub-block and the adjacent reconstructed pixels are present on another side of the sub-block, the present adjacent reconstructed pixels are used to fill the side at which no adjacent reconstructed pixel is present.
13. The coder of claim 12, wherein the current coding block is divided according to a linear model type of the current coding block.
14. The coder of claim 13, wherein if the linear model type of the current coding block is LM or local illumination compensation (LIC), the current coding block is divided horizontally or vertically; if the linear model type of the current coding block is LM or LIC, the current coding block is divided horizontally and vertically; if the linear model type of the current coding block is LM_L, the current coding block is divided vertically; or if the linear model type of the current coding block is LM_T, the current coding block is divided horizontally.
15. The coder of claim 12, wherein the current coding block is divided according to size information of the current coding block.
16. The coder of claim 15, wherein if a width of the current coding block is greater than a height of the current coding block, the current coding block is divided vertically; if the width is less than the height, the current coding block is divided horizontally; if the width is equal to the height, the current coding block is divided horizontally or vertically; or if the width is equal to the height, the current coding block is divided horizontally and vertically.
17. The coder of claim 12, wherein if a linear model type of the sub-block is cross-component linear model (CCLM) and a coded side of the sub-block has a stepped edge, the adjacent reconstructed pixels of the sub-block used for calculating the parameters of the linear model of the sub-block belong to another sub-block adjacent to the sub-block.
18. The coder of claim 12, wherein the LM prediction value of the sub-block is calculated by substituting the reference sub-block of the sub-block into the linear model.
19. The coder of claim 12, wherein the processor is configured to execute instructions to further perform: calculating prediction cost of sub-block prediction by using LM prediction values of all the sub-blocks; comparing the prediction cost of sub-block prediction with prediction cost of block-prediction and selecting a prediction mode with less prediction cost as a prediction mode of the current coding block, wherein the prediction cost of block-prediction indicates prediction cost for which linear model prediction is performed on the current coding block; and coding the current coding block by using the selected prediction mode, and obtaining a code-stream of the current coding block, wherein the code stream of the current coding block comprises a sub-block prediction flag, and the sub-block prediction flag is configured for indicating whether the current coding block adopts sub-block prediction.
20. The coder of claim 19, wherein the sub-block prediction flag comprises a sub-block prediction syntax element, and a value of the sub-block prediction syntax element is configured for indicating whether the current coding block adopts sub-block prediction and a manner in which the current coding block is divided; or the sub-block prediction flag comprises a sub-block prediction syntax element, and a value of the sub-block prediction syntax element is configured for indicating whether the current coding block adopts sub-block prediction, and the sub-block prediction flag further comprises a manner in which the current coding block is divided when the current coding block adopts sub-block prediction; or the sub-block prediction flag comprises a sequence number of intra-prediction mode of the current coding block, wherein the sequence number is newly added when the current coding block adopts sub-block prediction.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
February 21, 2022
May 13, 2025
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.