CN-122003870-A - Encoding and decoding method and device, encoder and decoder, code stream and storage medium
Abstract
The encoding and decoding method, the encoding and decoding device, the code stream and the storage medium, wherein the decoding method comprises the steps of determining prediction distortion cost of candidate prediction modes of a current block according to a template area of the current block, determining a first prediction mode of the current block according to the prediction distortion cost, determining a reference template of the template area according to the first prediction mode, determining first model parameters according to the reference template and the template area, and carrying out intra-frame prediction on the current block according to the first prediction mode and the first model parameters to obtain a prediction value of the current block.
Inventors
- MA YANZHUO
- HUO JUNYAN
- YANG FUZHENG
- QIU NENGFU
- LIU JIAQI
- LI MING
Assignees
- OPPO广东移动通信有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230928
Claims (20)
- A decoding method, the method being applied to a decoder, the method comprising: determining the prediction distortion cost of a candidate prediction mode of the current block according to a template area of the current block; determining a first prediction mode of the current block according to the prediction distortion cost; determining a reference template of the template region according to the first prediction mode; determining a first model parameter according to the reference template and the template area; And carrying out intra-frame prediction on the current block according to the first prediction mode and the first model parameter to obtain a predicted value of the current block.
- The method of claim 1, wherein the method further comprises: And determining a template area of the current block according to the adjacent pixels of the current block.
- The method of claim 2, wherein the neighboring pixels of the current block comprise at least one of: upper adjacent pixels of the current block; An upper left neighboring pixel of the current block; an upper right neighboring pixel of the current block; adjacent pixels on the left side of the current block; the lower left neighboring pixel of the current block.
- A method according to claim 2 or 3, wherein the template area of the current block comprises available neighboring pixels of the current block.
- The method of any of claims 2-4, wherein the method further comprises: and determining the size of the template area according to the size of the current block.
- The method of claim 1, wherein the candidate prediction modes comprise one or more prediction modes and the prediction distortion cost comprises a prediction distortion value corresponding to the one or more prediction modes.
- The method of claim 6, wherein the method further comprises: Determining the one or more prediction modes; carrying out intra-frame prediction on the template area according to the prediction mode to obtain a first predicted value; And determining a prediction distortion value of the prediction mode for the template area according to the first prediction value corresponding to the prediction mode and the first reconstruction value of the template area.
- The method of claim 7, wherein the determining the one or more prediction modes comprises: The one or more prediction modes are determined according to a second prediction mode used to intra-predict neighboring blocks of the current block.
- The method of claim 8, wherein the neighboring block comprises at least one of: A left neighboring block of the current block; A lower left neighboring block of the current block; An upper right neighboring block of the current block; An upper neighboring block of the current block; The upper left neighboring block of the current block.
- The method according to claim 8 or 9, wherein, In the case where the second prediction mode does not exist as an angular prediction mode, the one or more prediction modes include Planar mode and/or DC mode.
- The method according to claim 8 or 9, wherein, In the case that the second prediction mode exists in an angular prediction mode, the one or more prediction modes include prediction modes in an MPM list of the current block constructed according to the neighboring block information.
- The method of claim 11, wherein, In the case where a third prediction mode does not exist in the MPM list, the third prediction mode is added to the MPM list.
- The method of claim 12, wherein the third prediction mode comprises a DC mode, a HOR mode, and/or a VER mode.
- The method of claim 1, wherein the first prediction mode is one or more prediction modes selected from the candidate prediction modes.
- The method of claim 14, wherein the first prediction mode comprises a prediction mode of the candidate prediction modes that has a least prediction distortion cost.
- The method of claim 15, wherein the determining the reference template for the template region according to the first prediction mode comprises: And determining the reference template of the template region according to the prediction mode with the minimum prediction distortion cost.
- The method of any of claims 1-16, wherein the determining a first model parameter from the reference template and the template region comprises: Determining the first model parameter according to the pixel reference value in the reference template and the pixel reference value in the template area.
- The method of claim 17, wherein the determining the first model parameter from the pixel reference value of the reference template and the pixel reference value of the template region comprises: Determining an autocorrelation parameter according to pixel reference values in the reference templates; determining a cross-correlation parameter according to the pixel reference value in the template area and the pixel reference value in the reference template; And determining the first model parameter according to the autocorrelation parameter and the cross-correlation parameter.
- The method according to claim 17 or 18, wherein, And filling the reference template or the template area with pixel reference values corresponding to the partial input positions under the condition that the partial input positions of the target filtering model corresponding to the first model parameters exceed the reference template or exceed the template area.
- The method of claim 19, wherein the reference template or the template region is filled with pixel reference values corresponding to the partial input locations if at least one of the following conditions is met: the pixel positions corresponding to the partial input positions are reconstructed; The part of input positions do not exceed the boundary of the current image; the partial input positions do not exceed the Tile boundary.
Description
Encoding and decoding method and device, encoder and decoder, code stream and storage medium Technical Field Embodiments of the present application relate to video encoding and decoding techniques, and relate to, but are not limited to, encoding and decoding methods and apparatuses, codecs, code streams, and storage media. Background In the field of video coding, how to enhance video compression rate is important. The image and video create a significant amount of data redundancy in the digitizing process, which makes video compression techniques possible. Because of the strong similarity between adjacent blocks in video images, intra-frame prediction methods are used in video coding and decoding techniques to eliminate temporal redundancy between adjacent blocks, thereby improving video compression rate. However, intra prediction in existing video codec standards still has room for video codec performance enhancement. Therefore, it is still of some significance to study how to further improve the accuracy of intra prediction, and thus enhance video codec performance. Disclosure of Invention According to the coding and decoding method and device, the coder and decoder, the code stream and the storage medium, the prediction value of the current block is determined according to the first model parameter determined based on the template area and the reference template of the template area, so that the intra-frame prediction accuracy can be improved, and the coding and decoding performance is improved. The video image processing method and device, the codec, the code stream and the storage medium provided by the embodiment of the application are realized as follows: According to a first aspect of an embodiment of the present application, there is provided a decoding method, which is applied to a decoder, the method including determining a prediction distortion cost of a candidate prediction mode of a current block according to a template area of the current block, determining a first prediction mode of the current block according to the prediction distortion cost, determining a reference template of the template area according to the first prediction mode, determining a first model parameter according to the reference template and the template area, and performing intra-frame prediction on the current block according to the first prediction mode and the first model parameter to obtain a prediction value of the current block. According to a second aspect of an embodiment of the present application, there is provided an encoding method applied to an encoder, the method including determining a prediction distortion cost of a candidate prediction mode of a current block according to a template region of the current block, determining a first prediction mode of the current block according to the prediction distortion cost, determining a reference template of the template region according to the first prediction mode, determining a first model parameter according to the reference template and the template region, and performing intra-prediction on the current block according to the first prediction mode and the first model parameter to obtain a prediction value of the current block. According to a third aspect of an embodiment of the present application, there is provided a decoding apparatus applied to a decoder, the apparatus including a first determining module configured to determine a prediction distortion cost of a candidate prediction mode of a current block according to a template region of the current block, a second determining module configured to determine a first prediction mode of the current block according to the prediction distortion cost, a third determining module configured to determine a reference template of the template region according to the first prediction mode, a fourth determining module configured to determine a first model parameter according to the reference template and the template region, and a first predicting module configured to intra-predict the current block according to the first prediction mode and the first model parameter to obtain a predicted value of the current block. According to a fourth aspect of the embodiment of the application, a decoder is provided, which comprises a first memory and a first processor, wherein the first memory is used for storing a computer program capable of running on the first processor, and the first processor is used for executing the decoding method according to the embodiment of the application when the computer program is run. According to a fifth aspect of embodiments of the present application, there is provided an encoding apparatus applied to an encoder, the apparatus including a fifth determining module configured to determine a prediction distortion cost of a candidate prediction mode of a current block according to a template region of the current block, a sixth determining module configured to determine a first prediction mode of t