Coding method, decoding method, coding apparatus, decoding apparatus, coder, decoder, code stream and storage medium

By performing intra prediction based on the model parameters determined by the template area and reference template in video encoding and decoding, the problem of insufficient intra prediction performance in the prior art is solved, and higher video compression rate and encoding and decoding performance are achieved.

WO2025065694A1PCT designated stage expired Publication Date: 2025-04-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/123008
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

The intra prediction performance in the existing video encoding and codec standards has not been fully improved, resulting in the need to improve video compression rate and codec performance.

Method used

The accuracy of intra prediction is improved by determining the prediction value of the current block, based on the first model parameters determined by the template area and the reference template. The specific steps include determining the prediction distortion cost of the candidate prediction mode, selecting the first prediction mode, determining the reference template, calculating the first model parameters, and performing intra prediction based on these parameters.

Benefits of technology

Improve the accuracy of intra prediction, thereby enhancing video encoding and codec performance and improving video compression rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023123008_03042025_PF_FP_ABST
    Figure CN2023123008_03042025_PF_FP_ABST
Patent Text Reader

Abstract

A coding method, a decoding method, a coding apparatus, a decoding apparatus, a coder, a decoder, a code stream and a storage medium provided in the embodiments of the present application, the decoding method comprising: according to a template area of a current block, determining a prediction distortion cost of a candidate prediction mode of the current block; according to the prediction distortion cost, determining a first prediction mode of the current block; according to the first prediction mode, determining a reference template of the template area; according to the reference template and the template area, determining a first model parameter; and, according to the first prediction mode and the first model parameter, performing intra-frame prediction on the current block to obtain a prediction value of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method and device, codec, code stream, and storage medium Technical Field

[0001] The embodiments of the present application relate to video coding and decoding technology, including but not limited to coding and decoding methods and devices, codecs, bit streams, and storage media. Background Art

[0002] In the field of video coding and decoding, improving video compression rates is crucial. The digitization of images and videos generates a significant amount of data redundancy, which makes video compression technology possible. Because adjacent blocks in a video image exhibit strong similarities, intra-frame prediction (IP) is used in video coding and decoding to eliminate temporal redundancy, thereby improving video compression rates. However, intra-frame prediction in existing video coding and decoding standards still leaves room for improvement in video codec performance. Therefore, research on how to further improve the accuracy of intra-frame prediction and thereby enhance video codec performance remains of particular interest.

[0003] Summary of the Invention

[0004] The coding and decoding method and apparatus, codec, bitstream, and storage medium provided in the embodiments of the present application also determine the prediction value of the current block based on the first model parameter determined based on the template area and the reference template of the template area, thereby improving the accuracy of intra-frame prediction and thus enhancing coding and decoding performance.

[0005] The video image processing method and device, codec, bit stream, and storage medium provided in the embodiments of the present application are implemented as follows:

[0006] According to a first aspect of an embodiment of the present application, a decoding method is provided, which is applied to a decoder, and includes: determining a prediction distortion cost of a candidate prediction mode of the current block based on a template area of ​​the current block; determining a first prediction mode of the current block based on the prediction distortion cost; determining a reference template of the template area based on the first prediction mode; determining first model parameters based on the reference template and the template area; and performing intra-frame prediction on the current block based on the first prediction mode and the first model parameters to obtain a prediction value of the current block.

[0007] According to a second aspect of an embodiment of the present application, a coding method is provided, which is applied to an encoder, and the method includes: determining a prediction distortion cost of a candidate prediction mode of the current block based on a template area of ​​the current block; determining a first prediction mode of the current block based on the prediction distortion cost; determining a reference template of the template area based on the first prediction mode; determining first model parameters based on the reference template and the template area; and performing intra-frame prediction on the current block based on the first prediction mode and the first model parameters to obtain a prediction value of the current block.

[0008] According to a third aspect of an embodiment of the present application, a decoding device is provided, which is applied to a decoder, and the device includes: a first determination module, configured to determine the prediction distortion cost of a candidate prediction mode of the current block based on a template area of ​​the current block; a second determination module, configured to determine a first prediction mode of the current block based on the prediction distortion cost; a third determination module, configured to determine a reference template of the template area based on the first prediction mode; a fourth determination module, configured to determine a first model parameter based on the reference template and the template area; a first prediction module, configured to perform intra-frame prediction on the current block based on the first prediction mode and the first model parameter to obtain a prediction value of the current block.

[0009] According to a fourth aspect of an embodiment of the present application, a decoder is provided, comprising a first memory and a first processor; wherein the first memory is used to store a computer program that can be run on the first processor; and the first processor is used to execute the decoding method as described in the embodiment of the present application when running the computer program.

[0010] According to a fifth aspect of an embodiment of the present application, a coding device is provided, which is applied to an encoder, and the device includes: a fifth determination module, configured to determine the prediction distortion cost of a candidate prediction mode of the current block based on a template area of ​​the current block; a sixth determination module, configured to determine a first prediction mode of the current block based on the prediction distortion cost; a seventh determination module, configured to determine a reference template of the template area based on the first prediction mode; an eighth determination module, configured to determine a first model parameter based on the reference template and the template area; and a second prediction module, configured to perform intra-frame prediction on the current block based on the first prediction mode and the first model parameter to obtain a prediction value of the current block.

[0011] According to a sixth aspect of an embodiment of the present application, an encoder is provided, comprising a second memory and a second processor; wherein the second memory is used to store a computer program that can be run on the second processor; and the second processor is used to execute the encoding method as described in the embodiment of the present application when running the computer program.

[0012] According to a seventh aspect of the embodiments of the present application, a code stream is provided, which is obtained by using the encoding method as described in the embodiments of the present application.

[0013] According to an eighth aspect of the embodiments of the present application, an electronic device is provided, comprising: a processor suitable for executing a computer program; a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the encoding method as described in the embodiments of the present application is implemented, or when the computer program is executed by the processor, the decoding method as described in the embodiments of the present application is implemented.

[0014] According to the ninth aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the encoding method as described in the embodiments of the present application, or implements the decoding method as described in the embodiments of the present application.

[0015] In an embodiment of the present application, after obtaining the first prediction mode of the current block based on the template area of ​​the current block, intra-frame prediction is not performed on the current block directly based on the first prediction mode, but a reference template of the template area is determined based on the first prediction mode; first model parameters are determined based on the reference template and the template area; and then, based on the first prediction mode and the first model parameters, intra-frame prediction is performed on the current block to obtain a prediction value of the current block; in this way, since the prediction value of the current block is also determined based on the first model parameters determined based on the template area and the reference template of the template area, the accuracy of intra-frame prediction can be improved, thereby enhancing the encoding and decoding performance.

[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings herein are incorporated into and constitute a part of this specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, serve to illustrate the technical solutions of the present application. Obviously, the drawings described below are merely some embodiments of the present application. Those skilled in the art can, without inventive effort, derive other drawings from these drawings.

[0018] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0019] FIG1 is a block diagram of an encoder according to an embodiment of the present application;

[0020] FIG2 is a block diagram of a decoder according to an embodiment of the present application;

[0021] FIG3 is a schematic diagram of a network architecture of a coding and decoding system provided in an embodiment of the present application;

[0022] FIG4 is a schematic diagram of the prediction process of the TIMD technology provided in an embodiment of the present application;

[0023] FIG5 is a schematic diagram of a template area provided in an embodiment of the present application;

[0024] FIG6 is a second schematic diagram of a template area provided in an embodiment of the present application;

[0025] FIG7 is a third schematic diagram of a template area provided in an embodiment of the present application;

[0026] FIG8 is a schematic diagram of a reference area that can be used by the TIMD technology provided in an embodiment of the present application;

[0027] FIG9 is a schematic diagram of an implementation flow of the encoding method provided in an embodiment of the present application;

[0028] FIG10 is a schematic diagram of adjacent pixels of a current block provided by an embodiment of the present application;

[0029] FIG11 is a schematic diagram of an implementation flow of determining a prediction distortion value of a prediction mode among candidate prediction modes for a current block according to an embodiment of the present application;

[0030] FIG12 is a schematic diagram of a filtering model provided in an embodiment of the present application;

[0031] FIG13 is a flowchart illustrating a first embodiment of the present application for implementing step 905;

[0032] FIG14 is a second flow chart of implementing step 905 according to an embodiment of the present application;

[0033] FIG15 is a schematic diagram of an implementation flow of a decoding method provided in an embodiment of the present application;

[0034] FIG16 is a schematic diagram of a process for obtaining a prediction value in the TIMD-FLM mode according to an embodiment of the present application;

[0035] FIG17 is a schematic diagram of TIMD-FLM prediction provided in an embodiment of the present application;

[0036] FIG18 is a schematic structural diagram of a decoding device provided in an embodiment of the present application;

[0037] FIG19 is a schematic diagram of the structure of an encoding device provided in an embodiment of the present application;

[0038] FIG20 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0039] Figure 21 is a schematic diagram of the structure of the decoder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the specific technical solutions of the present application are further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but are not intended to limit the scope of the present application.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0042] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0043] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are intended to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0044] The encoder and decoder frameworks and business scenarios described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. It will be appreciated by those skilled in the art that with the evolution of encoders and decoders and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0045] Referring to Figure 1, which shows a schematic block diagram of the composition of an encoder provided in an embodiment of the present application. As shown in Figure 1, the encoder (specifically, a "video encoder") 100 may include a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).For the input original video signal, a video coding block can be obtained by dividing the coding tree unit (CTU). Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transformation and quantization unit 101, including transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients to further reduce the bit rate; the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block; the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding on the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is the process of generating a motion vector, which can estimate the motion of the video coding block. The motion compensation unit 104 then calculates the motion vector based on the motion vector determined by the motion estimation unit 105. After determining the intra-frame prediction mode, the intra-frame prediction unit 103 is further configured to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109. In addition, the inverse transform and inverse quantization unit 106 is configured to reconstruct the video coding block and reconstruct a residual block in the pixel domain. The reconstructed residual block is subjected to the filter control analysis unit 107 and the filtering unit 108 to remove the block effect artifacts. The reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is configured to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, and output the code stream of the video signal. The decoded image buffer unit 110 is configured to store the reconstructed video coding block for prediction reference. As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 .

[0046] Referring to Figure 2, which shows a schematic block diagram of a decoder provided in an embodiment of the present application, as shown in Figure 2, the decoder (specifically, a "video decoder") 200 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image buffer unit 206. The decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. After the input video signal is encoded as shown in FIG4A , a code stream of the video signal is output; the code stream is input to the decoder 200 and first passes through the decoding unit 201 to obtain decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from the previously decoded block of the current frame or picture; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses The prediction information is used to generate a predictive block for the video decoding block being decoded; a decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 202 with the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204; the decoded video signal passes through the filtering unit 205 to remove blocking artifacts, thereby improving video quality; the decoded video block is then stored in the decoded image buffer unit 206, which stores reference images used for subsequent intra-frame prediction or motion compensation, and is also used for outputting the video signal, thereby obtaining the restored original video signal.

[0047] Furthermore, an embodiment of the present application also provides a network architecture of a coding and decoding system including an encoder and a decoder, wherein FIG3 shows a schematic diagram of a network architecture of a coding and decoding system provided by an embodiment of the present application. As shown in FIG3 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication network 01. During implementation, the electronic device can be various types of devices with video coding and decoding functions. For example, the electronic device can include a smart phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensing device, a server, etc., which are not specifically limited here. In addition, the decoder or encoder described in the embodiment of the present application can be the above-mentioned electronic device.

[0048] It should be noted that the method of the embodiment of the present application is mainly applied to the intra-frame prediction unit 103 shown in Figure 1 and the intra-frame prediction unit 203 shown in Figure 2. In other words, the embodiment of the present application can be applied to both the encoder and the decoder, and can even be applied to both the encoder and the decoder at the same time, but the embodiment of the present application is not specifically limited thereto.

[0049] It should also be noted that, when applied to the intra-frame prediction unit 103, the "current block" specifically refers to the coding block currently to be intra-frame predicted, that is, the current coding block; when applied to the intra-frame prediction unit 203, the "current block" specifically refers to the decoding block currently to be intra-frame predicted, that is, the current decoding block.

[0050] In order to facilitate the understanding of the encoding method and decoding method described in the embodiments of the present application, the template based intra mode derivation (TIMD) process is first explained. TIMD is an intra prediction mode that can be used for luminance or chrominance. The encoder and decoder use the same operation to obtain the final prediction value. Specifically, for the intra prediction mode in a given prediction mode set (such as an MPM list), the prediction value of the template area is calculated for the template area of ​​the current block according to the mode, and the prediction value of the template area is compared with the reconstructed value of the template area to obtain the prediction distortion cost (such as the sum of absolute transform differences (SATD)). According to the size of the prediction distortion cost, a certain number (such as one or two) of prediction modes are selected for intra prediction of the current block. For example, let the prediction mode with the smallest SATD be Mode1, and its SATD be costMode1; let the prediction mode with the second smallest SATD be Mode2, and its SATD be costMode2. According to the size of costMode1 and costMode2, decide whether to apply weighted fusion.

[0051] If costMode2<2*costMode1, the prediction values ​​of the current block obtained by Mode1 and Mode2 are weighted and fused as the final prediction value of the current block.

[0052] Otherwise, only Mode 1 is used to calculate the final prediction value of the current block.

[0053] The prediction process of TIMD technology is introduced in detail below.

[0054] TIMD input: the position of the current block (xTbCmp, yTbCmp), the width uiWidth of the current block, and the height uiHeight of the current block.

[0055] Output of TIMD: predicted value predSamples[x][y] of the current block, where x = 0..nTbW-1, y = 0..nTbH-1.

[0056] As shown in FIG4 , the specific prediction process of the TIMD technology includes the following steps 401 to 404 :

[0057] Step 401, determining the template type and size of the template area of ​​the current block;

[0058] Step 402, obtaining reference area pixels;

[0059] Step 403, obtaining a prediction mode of TIMD;

[0060] Step 404: Generate a final prediction value of the current block.

[0061] Through the above process, the predicted value of the current block can be obtained.

[0062] The following is a detailed introduction:

[0063] In step 401, the current template type and size are determined.

[0064] The template areas that can be used by TIMD technology include the upper adjacent reconstructed pixel area and the left adjacent reconstructed pixel area. The template type (eTempType) is determined based on the location of the current block. For example:

[0065] If the left and upper adjacent reconstructed pixels are not available, eTempType is NO_NEIGHBOR, and there is no template area.

[0066] If both the left and above adjacent reconstructed pixels are available, eTempType is LEFT_ABOVE_NEIGHBOR, and the template regions are shown as 501 and 502 in FIG5 .

[0067] If only the left adjacent reconstructed pixels are available, then eTempType is LEFT_NEIGHBOR, and the template area is shown as 601 in FIG6 .

[0068] If only the upper adjacent reconstructed pixels are available, eTempType is ABOVE_NEIGHBOR, and the template area is shown as 701 in FIG. 7 .

[0069] The template size of the template area used by TIMD technology is related to the current block size. For example:

[0070] If the current block height (uiHeight) is greater than or equal to 8, the template height (iTempHeight) is 4; otherwise, the template height is 2.

[0071] If the current block width (uiWidth) is greater than or equal to 8, the template width (iTempWidth) is 4; otherwise, the template width is 2.

[0072] In step 402, pixels in a reference area are obtained.

[0073] As shown in Figure 8, the reference areas that can be used by TIMD technology are the adjacent reconstructed pixel areas on the left and above the template. Let the length of the adjacent reconstructed pixel area on the left be m_leftRefLength and the length of the adjacent reconstructed pixel area on the top be m_topRefLength, then: m_leftRefLength = (uiHeight + iTempHeight) << 3 m_topRefLength = (uiWidth + iTempWidth) << 3

[0074] In step 403, a prediction mode of TIMD is obtained.

[0075] To obtain the TIMD prediction mode, we first need to obtain a prediction mode set. Then, we traverse the prediction mode set and calculate the prediction value for the template area. By calculating the prediction distortion cost, we select the TIMD prediction mode for the current block.

[0076] In TIMD technology, the encoder or decoder selects a prediction mode set based on the prediction modes of the neighboring blocks (left, lower left, upper right, upper, upper left) of the current block. Specifically:

[0077] If the neighboring block does not have an angular prediction mode, the prediction mode set includes a Planar mode and / or a DC mode.

[0078] If there is an angular prediction mode for the adjacent block, the prediction mode set includes the MPM list and the wide angle prediction mode. If there is no DC / HOR / VER mode in the MPM list, it is added at the end of the MPM list.

[0079] In step 404, a final prediction value of the current block is generated.

[0080] (1) If the prediction mode set only includes the Planar mode and / or the DC mode, then after traversing the prediction mode set in the template region, the mode with the lowest prediction distortion cost (iBestMode) is selected as the TIMD prediction mode without weighted fusion. That is, predSamples[x][y] is directly obtained using the corresponding method of the selected TIMD prediction mode, where x = 0..nTbW-1 and y = 0..nTbH-1.

[0081] (2) Otherwise,

[0082] If there is only one prediction mode in the prediction mode set, weighted fusion is not performed, and the current block is predicted using this prediction mode to obtain the final prediction value. That is, predSamples[x][y] is directly obtained using the corresponding method of the prediction mode, where x = 0..nTbW-1 and y = 0..nTbH-1.

[0083] If there is more than one prediction mode in the prediction mode set, after traversing the prediction mode set in the template area, the mode with the smallest prediction distortion cost (iBestMode) and the mode with the second smallest prediction distortion cost (iSecondaryMode) are obtained. Then, the adjacent angle modes (+1 and -1) of iBestMode and iSecondaryMode are checked and updated as the prediction modes of TIMD, and the prediction distortion costs of these four adjacent angle modes for the template area are determined. Based on this, the mode with the smallest prediction distortion cost (still recorded as iBestMode, i.e., the updated iBestMode) and the mode with the second smallest prediction distortion cost (still recorded as iSecondaryMode, i.e., the updated iSecondaryMode) are determined from iBestMode and its adjacent angle modes (+1 and -1), iSecondaryMode and its adjacent angle modes (+1 and -1). Let the prediction distortion costs of iBestMode and iSecondaryMode be uiBestCost and uiSecondaryCost, respectively.

[0084] In TIMD technology, the encoder or decoder decides whether to apply weighted fusion based on the size of uiBestCost and uiSecondaryCost. The details are as follows:

[0085] If uiSecondaryCost>=2*uiBestCost, weighted fusion is not applied, and the current block is predicted using iBestMode to obtain the final prediction value.

[0086] If uiSecondaryCost < 2 * uiBestCost, then weighted fusion is applied. Let the weight of iBestMode be weight1 and the weight of iSecondaryMode be weight2. Specifically as follows: weight1 = uiSecondaryCost / (uiBestCost + uiSecondaryCost) weight2 = 1 - weight1

[0087] After using iBestMode and iSecondaryMode to obtain two prediction values ​​(pelPred[x][y] and pelPredFusion[x][y], where x = 0..nTbW-1, y = 0..nTbH-1), the current block is weighted fusion applied to obtain the final prediction value predSamples[x][y]. Specifically: predSamples[x][y] = pelPred[x][y]*weight1 + pelPredFusion[x][y]*weight2

[0088] Template based intra mode derivation is an intra prediction mode that can be used for luminance or chrominance. The encoder and decoder use the same operation to obtain the final prediction value. Specifically, for an intra prediction mode in a given prediction mode set (such as an MPM list), a template prediction value is calculated for the template area of ​​the current block based on the mode, and the template prediction value is compared with the template reconstruction value to obtain the prediction distortion cost (such as the sum of absolute transform differences (SATD)). According to the size of the prediction distortion cost, a certain number (such as one or two) of prediction modes are selected, and according to the size of the SATD, the best or the best and second-best mode is obtained to calculate the final prediction value of the current block.

[0089] However, in the non-fused prediction mode and the fused prediction mode, the information of the reconstructed adjacent sampling points cannot be fully utilized. If the availability of the search points in the entire undetermined reconstruction area is judged, the coding complexity will increase.

[0090] Based on the above analysis, an embodiment of the present application provides an encoding method, which can be applied to the encoder 100 shown in Figure 1. Figure 9 is a schematic diagram of the implementation flow of the encoding method provided in the embodiment of the present application. As shown in Figure 9, the method includes the following steps 901 to 905:

[0091] Step 901: determining the prediction distortion cost of the candidate prediction mode of the current block according to the template area of ​​the current block;

[0092] Step 902: determining a first prediction mode of the current block according to the prediction distortion cost;

[0093] Step 903: determining a reference template for the template area according to the first prediction mode;

[0094] Step 904: determining first model parameters according to the reference template and the template area;

[0095] Step 905: Perform 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.

[0096] In an embodiment of the present application, after obtaining the first prediction mode of the current block based on the template area of ​​the current block, intra-frame prediction is not performed on the current block directly based on the first prediction mode, but a reference template of the template area is determined based on the first prediction mode; first model parameters are determined based on the reference template and the template area; and then, intra-frame prediction is performed on the current block based on the first prediction mode and the first model parameters, thereby obtaining a prediction value of the current block; in this way, since the prediction value of the current block is also determined based on the first model parameters determined based on the template area and the reference template of the template area, it is beneficial to improve the accuracy of intra-frame prediction, thereby saving bit rate.

[0097] The following describes further optional implementations and related terms of each of the above steps.

[0098] In step 901 , prediction distortion costs of candidate prediction modes of the current block are determined according to a template region of the current block.

[0099] In some embodiments, the template area of ​​the current block may be determined in this way: the template area of ​​the current block is determined based on adjacent pixels of the current block.

[0100] Exemplarily, in some embodiments, the neighboring pixels of the current block include at least one of the following:

[0101] Upper adjacent pixels of the current block, such as area 1001 shown in FIG10 ;

[0102] The upper left neighboring pixels of the current block, such as the area 1002 shown in FIG10 ;

[0103] The upper right adjacent pixels of the current block, such as the area 1003 shown in FIG10 ;

[0104] The left adjacent pixels of the current block, such as the area 1004 shown in FIG10 ;

[0105] The lower left neighboring pixels of the current block, such as the area 1005 shown in FIG. 10 .

[0106] In some embodiments, the template area of ​​the current block includes available pixels among the adjacent pixels of the current block. It can be understood that the available pixels among the adjacent pixels refer to pixels among the adjacent pixels that have completed reconstruction.

[0107] In some embodiments, the encoder or decoder may determine the size of the template region according to the size of the current block.

[0108] For example, if the height of the current block (uiHeight as shown in FIG8 ) is greater than or equal to 8, the height of the template area (iTempHeight as shown in FIG8 ) is 4; otherwise, the height of the template area is 2.

[0109] If the width of the current block (uiWidth as shown in FIG8 ) is greater than or equal to 8, the width of the template area (iTempWidth as shown in FIG8 ) is 4; otherwise, the width of the template area is 2.

[0110] In an embodiment of the present application, the candidate prediction mode for the current block may include one or more prediction modes, and the candidate prediction mode for the current block may also be understood as the prediction mode set mentioned in this article, and the prediction distortion cost includes the prediction distortion value corresponding to the one or more prediction modes.

[0111] In some embodiments, as shown in FIG11 , the encoder or decoder may determine the prediction distortion value of a prediction mode among candidate prediction modes for the current block through steps 1101 to 1103 as follows:

[0112] Step 1101, determining the one or more prediction modes;

[0113] In some embodiments, the encoder or decoder may implement step 1101 by determining the one or more prediction modes according to a second prediction mode used for intra-frame prediction of a neighboring block of the current block.

[0114] In the embodiment of the present application, there is no limitation on which second prediction modes of the neighboring blocks of the current block are selected as candidate prediction modes of the current block.

[0115] For example, in some embodiments, based on the prediction distortion error / cost of the second prediction modes of the neighboring blocks of the current block for the template area of ​​the current block, one or more second prediction modes with the minimum prediction distortion can be selected as candidate prediction modes for the current block.

[0116] For example, in some other embodiments, the candidate prediction mode of the current block may be selected as follows:

[0117] In a case where the second prediction mode does not have an angular prediction mode, the one or more prediction modes (i.e., candidate prediction modes of the current block) include a Planar mode and / or a DC mode;

[0118] In the case where there is an angle prediction mode in the second prediction mode, the one or more prediction modes (i.e., the candidate prediction modes of the current block) include a prediction mode in the MPM list of the current block constructed based on the adjacent block information, and the prediction mode may include a wide-angle prediction mode.

[0119] Further, in some embodiments, when the third prediction mode does not exist in the MPM list, the third prediction mode is added to the MPM list.

[0120] Exemplarily, in some embodiments, the third prediction mode includes a DC mode, a HOR mode and / or a VER mode.

[0121] In some embodiments, the neighboring blocks of the current block include blocks adjacent to the current block that have been reconstructed. For example, in some embodiments, the neighboring blocks include at least one of the following:

[0122] A left adjacent block of the current block;

[0123] A lower left adjacent block of the current block;

[0124] The upper right adjacent block of the current block;

[0125] An upper adjacent block of the current block;

[0126] The upper left neighboring block of the current block.

[0127] Step 1102: performing intra-frame prediction on the template region according to the prediction mode to obtain a first prediction value;

[0128] Step 1103 : Determine a prediction distortion value of the prediction mode for the template region according to the first prediction value corresponding to the prediction mode and the first reconstruction value of the template region.

[0129] It can be understood that the so-called prediction distortion value of the prediction mode for the template area refers to the intra-frame prediction error of the prediction mode for the template area. For example, in some embodiments, the encoder or decoder can determine the SAD (sum of absolute difference), SSE (Sum of Squares due to Error), SATD (sum of absolute transformed difference) or MSE (mean-square error) between the first prediction value obtained by the prediction mode for the template area and the first reconstructed value of the template area, thereby obtaining the prediction distortion value / prediction distortion cost / intra-frame prediction error of the prediction mode. That is, the prediction distortion value of the prediction mode is represented by SAD, SSE, SATD or MSE. The smaller the SAD, SSE, SATD or MSE, the smaller the prediction distortion value, that is, the smaller the intra-frame prediction error.

[0130] In step 902, a first prediction mode of the current block is determined according to the prediction distortion cost.

[0131] In some embodiments, the first prediction mode is one or more prediction modes selected from the candidate prediction modes.

[0132] Exemplarily, in some embodiments, the first prediction mode includes a prediction mode with the smallest prediction distortion cost among the candidate prediction modes.

[0133] In step 903, a reference template of the template area is determined according to the first prediction mode.

[0134] As mentioned above, in some embodiments, the first prediction mode includes the prediction mode with the smallest prediction distortion cost among the candidate prediction modes. Based on this, in some embodiments, the encoder or decoder can determine the reference template for the template region based on the prediction mode with the smallest prediction distortion cost.

[0135] In step 904, first model parameters are determined based on the reference template and the template area.

[0136] In some embodiments, the first model parameter includes a filter coefficient of the target filter model. In the embodiment of the present application, there is no limitation on the shape of the target filter model and the number of filter coefficients (i.e., the number of taps of the filter model). The shape of the target filter model can be an m1*m2 matrix, where m1 is greater than 0 and m2 is greater than 1, or m1 is greater than 1 and m2 is greater than 0. The shape of the target filter model can also be a cross, as shown in Figure 12, for example, where C0-C4 represent filter coefficients at different positions.

[0137] The number of taps of the target filter model is defined as nTap. nTap can be a constant or a variable. For example, the number of taps of the filter model can be dynamically adjusted based on the size of the current block. In some embodiments, the encoder can select filter models of various shapes.

[0138] In some embodiments, the encoder or the decoder may determine the first model parameter by: determining the first model parameter according to the pixel reference values ​​in the reference template and the pixel reference values ​​in the template area.

[0139] Furthermore, in some embodiments, determining the first model parameter according to the pixel reference value of the reference template and the pixel reference value of the template area includes:

[0140] determining an autocorrelation parameter according to pixel reference values ​​in the reference template;

[0141] determining a cross-correlation parameter according to a pixel reference value in the template area and a pixel reference value in the reference template;

[0142] The first model parameter is determined according to the autocorrelation parameter and the cross-correlation parameter.

[0143] Exemplarily, in some embodiments, the pixel reference value includes at least one of the following: a pixel reconstruction value, a pixel gradient value of the pixel reconstruction value, and pixel position information.

[0144] In Example 1, the encoder or decoder may construct the MSE between the pixel reference value of the reference template and the pixel reference value of the template area according to the following formula, and determine the first model parameter based on this:

[0145] Wherein, refTemp[i][j] represents the pixel reference value of the reference template, recTemp[i][j] represents the pixel reference value of the template area, (i,j) represents the coordinate position, (i,j)∈R, k,l represents the coordinate offset of the filter coefficient position relative to the center position of the filter model, taking the filter model shown in Figure 12 as an example, k and l are between -1 and 1, and the values ​​of (k,l) include (0,0), (0,-1), (-1,0), (0,1), (1,0), c k,l Indicates the required filter coefficient. E represents the operation of calculating the average value, and the calculation formula is as follows:

[0146] where N pos Refers to the calculation of |predTemp[i][j]-recTemp[i][j]| 2 The number of (i,j) pairs.

[0147] The process of minimizing MSE to derive the filter coefficients is as follows:

[0148] 1) First, c k,l Find the partial derivative and make it 0:

[0149] m and n are between -1 and 1.

[0150] Arranged:

[0151] 2) After determining the reference template and the corresponding reference template, expand the equation obtained in step 1) into a matrix form:

[0152] 3) The autocorrelation matrix of refTemp in the reference template in step 2) and the cross-correlation vector of refTemp and recTemp are both known quantities. The filter coefficient c can be calculated by solving the equation group in step 2). k,l , for the filter coefficient c k,lIt can be fixed-point or not.

[0153] In the process of solving the linear equations, the autocorrelation matrix of the reconstructed pixel refTemp in the reference template is first calculated, and then the cross-correlation vector between refTemp and the reconstructed pixel recTemp in the template area is calculated. Then, the autocorrelation matrix is ​​decomposed by Cholesky or LDL, and finally, each filter coefficient c is calculated in turn by reverse recursion. n , the set of filter coefficients can be fixed-point or not.

[0154] In the above example 1, a linear filtering model is established based on the pixel reference values ​​of the template area and the pixel reference values ​​of the reference template. In example 2, a nonlinear filtering model between the two may also be established.

[0155] One possible way to achieve this is to introduce quadratic terms to establish a nonlinear filtering model, such as:

[0156] When minimizing the MSE of the filter coefficients in Example 1, the calculation method is changed to the following:

[0157] The calculation method for the predicted value based on this calculation is modified as follows:

[0158] Among them, ref[i+k][j+l] is the input pixel value of the position corresponding to the filter coefficient. If the position corresponding to the filter coefficient is outside the current block, the pixel reconstructed value at this position can be used as the input pixel value. If the position corresponding to the filter coefficient is within the current block, the pixel predicted value at this position can be used as the input pixel value.

[0159] In some embodiments, when part of the input position of the target filtering model corresponding to the first model parameters exceeds the reference template or template area, the reference template or template area is filled with pixel reference values ​​corresponding to the part of the input position.

[0160] In some embodiments, the reference template or the template area is filled with pixel reference values ​​corresponding to the partial input positions when at least one of the following conditions is met:

[0161] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0162] The partial input position does not exceed the boundary of the current image;

[0163] The partial input position does not exceed the Tile boundary.

[0164] Of course, in other embodiments, when part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template, the part of the input positions may not participate in the determination of the first model parameters.

[0165] In an embodiment of the present application, the encoder may establish only one linear filtering model to determine the first model parameters, or the encoder may establish multiple linear filtering models to determine multiple groups of candidate filter coefficients, and then select one group of filter coefficients as the first model parameters.

[0166] In some embodiments, the first model parameters include filter coefficients of a target filter model; the encoder may determine the first model parameters as follows:

[0167] Determining first candidate filter coefficients of the target filtering model according to pixel reference values ​​of the first type of samples in the reference template and pixel reference values ​​of the first type of samples in the template area;

[0168] Determining second candidate filter coefficients of the target filtering model according to the pixel reference values ​​of the second type of samples in the reference template and the pixel reference values ​​of the second type of samples in the template area;

[0169] determining a rate-distortion cost of a first candidate filter coefficient and a rate-distortion cost of a second candidate filter coefficient;

[0170] Determining filter coefficients of a target filtering model from the first candidate filter coefficients and the second candidate filter coefficients according to the rate-distortion cost of the first candidate filter coefficients and the rate-distortion cost of the second candidate filter coefficients;

[0171] The first index value of the filter coefficient of the target filter model is written into the bitstream.

[0172] For example, a group of filter coefficients with the smallest rate-distortion cost among the first candidate filter coefficients and the second candidate filter coefficients is used as the filter coefficients of the target filter model.

[0173] In some embodiments, the first category of samples refers to samples whose pixel reference values ​​are greater than or equal to the average pixel reference values ​​of the template in which they are located; the second category of samples refers to samples whose pixel reference values ​​are less than or equal to the average pixel reference values ​​of the template in which they are located.

[0174] Exemplarily, in some embodiments, the pixel reference value includes at least one of the following: a pixel reconstruction value, a pixel gradient value of the pixel reconstruction value, and pixel position information.

[0175] In some other embodiments, the first model parameter includes a filter coefficient of a target filter model; the template region includes at least one template sub-region, and the reference template includes at least one matching sub-template; and a matching sub-template of the template sub-region is determined according to the first prediction mode;

[0176] The determining the first model parameter according to the reference template and the template area includes:

[0177] Determining a corresponding third candidate filter coefficient according to the template sub-region and the corresponding matching sub-template;

[0178] determining a rate-distortion cost of a third candidate filter coefficient of the at least one matching sub-template;

[0179] determining, according to the rate-distortion cost of the third candidate filter coefficient of the at least one matching sub-template, filter coefficients of the target filter model from the third candidate filter coefficients;

[0180] The first index value of the filter coefficient of the target filter model is written into the bitstream.

[0181] For example, a group of filter coefficients with the smallest rate-distortion cost among the third candidate filter coefficients of the at least one matching sub-template is used as the filter coefficients of the target filter model.

[0182] In some embodiments, the encoder may divide the template region based on its relative position to the current block. For example, one template sub-region may include the upper and left adjacent pixels of the current block, another template sub-region may include the left and upper-left adjacent pixels of the current block, and so on. The specific division rule can be arbitrary, as long as any two divided template sub-regions do not completely overlap.

[0183] In yet other embodiments, the first model parameters include filter coefficients of a target filter model;

[0184] The determining the first model parameter according to the reference template and the template area includes:

[0185] determining filter coefficients of a plurality of filter models of different shapes respectively according to the reference template and the template area;

[0186] Determining rate-distortion costs of filter coefficients of the plurality of filter models of different shapes;

[0187] Determining the filter coefficients of the target filter model according to the rate-distortion costs of the filter coefficients of the plurality of filter models with different shapes;

[0188] Parsing the code stream to obtain a first index value of the filter coefficient of the target filter model;

[0189] The first index value of the filter coefficient of the target filter model is written into the bitstream.

[0190] In some embodiments, the encoder may further write the shapes of the multiple filter models of different shapes and / or the number of filter coefficients of the target filter model into the bitstream.

[0191] In step 905, intra-frame prediction is performed on the current block according to the first prediction mode and the first model parameters to obtain a prediction value of the current block.

[0192] In some embodiments, the encoder or decoder may implement step 905 as follows: performing intra-frame prediction on the current block according to the prediction mode with the minimum prediction distortion cost to obtain a second prediction value; and filtering the second prediction value according to the first model parameters to obtain a prediction value of the current block.

[0193] In the embodiment of the present application, there is no limitation on the scenario in which filtering processing is required for intra-frame prediction. For example, filtering processing can be used in any of the following scenarios 1 to 2.

[0194] In scenario 1, in some embodiments, when at least one of the following conditions is met, the second prediction value is filtered according to the first model parameters to obtain the prediction value of the current block:

[0195] The candidate prediction modes only include Planar mode and / or DC mode;

[0196] The one or more candidate prediction modes include only one prediction mode.

[0197] In scenario 2, in some embodiments, when the candidate prediction mode does not include only the Planar mode and / or the DC mode, and the candidate prediction mode includes multiple prediction modes, the first prediction mode includes the prediction mode with the smallest prediction distortion cost and the prediction mode with the second smallest prediction distortion cost, or, the first prediction mode includes the prediction mode with the smallest prediction distortion cost.

[0198] In some embodiments, the second smallest prediction distortion cost refers to the second smallest of the first prediction distortion cost and the second prediction distortion cost; the smallest prediction distortion cost refers to the smallest of the first prediction distortion cost and the second prediction distortion cost; the first prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area; the second prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area and the adjacent angle mode of the second smallest prediction mode for the template area.

[0199] Alternatively, the second smallest prediction distortion cost refers to the second smallest prediction distortion cost of the candidate prediction mode for the template area; the smallest prediction distortion cost refers to the smallest prediction distortion cost of the candidate prediction mode for the template area.

[0200] In one scenario of Scenario 2, in some embodiments, if the second smallest prediction distortion cost is greater than or equal to the product of the smallest prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the smallest prediction distortion cost; wherein the first value is greater than 1. Based on this, in some embodiments, the encoder or decoder may also implement step 905 as follows: performing intra-frame prediction on the current block according to the prediction mode with the smallest prediction distortion cost to obtain a third prediction value; and filtering the third prediction value according to the first model parameters to obtain a prediction value for the current block.

[0201] In another scenario of scenario 2, in some embodiments, if the second smallest prediction distortion cost is less than the product of the minimum prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the minimum prediction distortion cost and the prediction mode with the second smallest prediction distortion cost; wherein the first value is greater than 1. Based on this, for step 905, performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters to obtain the predicted value of the current block can be implemented by the following embodiment 1 or embodiment 2; wherein,

[0202] In embodiment 1, as shown in FIG13 , the encoder or decoder may implement step 905 through steps 1301 to 1304 as follows:

[0203] Step 1301: Perform intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth prediction value;

[0204] Step 1302: Perform intra-frame prediction on the current block according to the prediction mode corresponding to the second smallest prediction distortion cost to obtain a fifth prediction value.

[0205] Step 1303: weightedly fuse the fourth predicted value and the fifth predicted value to obtain a sixth predicted value;

[0206] Step 1304: Filter the sixth prediction value according to the first model parameters to obtain a prediction value of the current block.

[0207] In embodiment 2, as shown in FIG14 , the encoder or decoder may implement step 905 through steps 1401 to 1404 as follows:

[0208] Step 1401: Perform intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth prediction value;

[0209] Step 1402: Perform intra-frame prediction on the current block according to the prediction mode corresponding to the second smallest prediction distortion cost to obtain a fifth prediction value.

[0210] Step 1403: Filter the fourth predicted value according to the first model parameters to obtain a seventh predicted value.

[0211] Step 1404: Filter the fifth predicted value according to the first model parameters to obtain an eighth predicted value.

[0212] Step 1405: Weightedly fuse the seventh prediction value and the eighth prediction value to obtain the prediction value of the current block.

[0213] Alternatively, in some other embodiments, the encoder or decoder may further weightedly fuse the fourth prediction value and the eighth prediction value to obtain a prediction value of the current block. In this embodiment, the encoder or decoder does not need to perform step 1403.

[0214] Alternatively, in some further embodiments, the encoder also weightedly fuses the seventh prediction value and the fifth prediction value to obtain the prediction value of the current block. In this embodiment, the encoder or decoder does not need to perform step 1404.

[0215] In the embodiment of the present application, the weighting coefficient used for weighted fusion can be a preset value or a value related to the prediction distortion cost. For example, the weighting coefficient of two prediction values ​​can be expressed as follows: weight1 = uiSecondaryCost / (uiBestCost + uiSecondaryCost) weight2 = 1 - weight1

[0216] Among them, weight1 represents the weighting coefficient of the predicted value obtained based on the prediction mode with the minimum prediction distortion cost (uiBestCost), for example, the weighting coefficient is the weight of the fourth predicted value or the seventh predicted value, and weight2 represents the weighting coefficient of the predicted value obtained based on the prediction mode with the second smallest prediction distortion cost (uiSecondaryCost), for example, the weighting coefficient is the weighting coefficient of the fifth predicted value or the eighth predicted value.

[0217] In the embodiment of the present application, there is no limitation on the circumstances under which the encoder or decoder uses the first model parameters. It can be with or without restrictions. For the case of restrictions, for example, it can be the three cases described in the following embodiment. That is,

[0218] In some embodiments, the encoder or decoder performs the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters in step 905 when the first matching error between the reference template and the template area is greater than or equal to a first threshold;

[0219] In other embodiments, when a second matching error between the reference template and the template area after filtering by the first model parameters is greater than or equal to a second threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed.

[0220] In some further embodiments, the encoder may control the decoder via syntax elements whether to use the filtering process for the current block. The encoder may write the first syntax identification information and the second syntax identification information into the bitstream;

[0221] When the first syntax identification information received by the decoder is equal to a third value and the second syntax identification information is equal to a fourth value, performing the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters;

[0222] The third value indicates that a template-based intra-frame mode derivation method is used to perform intra-frame prediction on the current block, and the fourth value indicates that the first model parameter is used for intra-frame prediction of the current block.

[0223] It can be understood that in this embodiment, the encoder transmits a Flag indicating whether to apply the filtering processing technology based on the first model parameters. timdFlag (first syntax identification information) indicates whether the current coding block applies the template-based intra-frame mode derivation technology, and filterFlag (second syntax identification information) indicates whether the current coding block applies the filtering model. When timdFlag is 1, the encoder decides whether to use step 905 to determine the prediction value of the current block by comparing the distortion between the prediction block and the original block before and after filtering, such as SAD or MSE or SATD or SSE. If the distortion after filtering is less than the distortion before filtering, filterFlag is 1, and the current coding block uses the prediction block after filtering as the prediction block. Otherwise, filterFlag is 0, and the current coding block uses the prediction block before filtering as the prediction block. The encoder transmits filterFlag to the decoder.

[0224] Of course, the encoder or decoder may use the predicted value output in step 905 as the final predicted value of the current block, or may further filter the predicted value output in step 905 to obtain the final predicted value of the current block. For example, in some embodiments, the method further includes: filtering the predicted value of the current block according to the first model parameters to obtain the predicted value of the current block.

[0225] In some embodiments, the first model parameters include filter coefficients of a target filtering model.

[0226] In some embodiments, the filtering process includes: determining the product of the filter coefficient of the target filtering model and the predicted value of the corresponding position; setting the first output value of the target filtering model to be equal to the sum of n products; wherein n represents the number of filter coefficients of the target filtering model, and n is a positive integer.

[0227] It can be understood that the first output value of the target filtering model is the filtered prediction value at the corresponding position in the current block.

[0228] Exemplarily, in some embodiments, the output value of the filtering process is equal to the first output value of the target filtering model, or the output value of the filtering process is equal to the cumulative value of the first output value of the target filtering model and the first offset value.

[0229] In some embodiments, the first offset value is equal to a preset second value.

[0230] In other embodiments, the encoder or decoder may also determine the first offset value based on a pixel reconstruction value corresponding to at least one filter coefficient at a position different from the first output value of the target filtering model.

[0231] In some embodiments, when part of the input positions of the target filtering model exceeds the current block, the predicted values ​​of the part of the input positions are equal to the corresponding pixel reconstruction values.

[0232] Exemplarily, in some embodiments, the predicted value of the partial input position is equal to the corresponding pixel reconstruction value when at least one of the following conditions is satisfied:

[0233] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0234] The partial input position does not exceed the boundary of the current image;

[0235] The partial input position does not exceed the Tile boundary.

[0236] In some other embodiments, when part of the input positions of the target filtering model exceeds the current block, the part of the input positions is not used as the output positions of the target filtering model.

[0237] In some embodiments, the encoding method further includes: determining a prediction difference value of the current block according to an original value of the current block and a prediction value of the current block; and generating a code stream according to the prediction difference value of the current block.

[0238] The embodiment of the present application provides a decoding method, which can be applied to the decoder 200 shown in FIG2 . FIG15 is a schematic diagram of an implementation flow of the decoding method provided in the embodiment of the present application. As shown in FIG15 , the method includes the following steps 1501 to 1505:

[0239] Step 1501: determining prediction distortion costs of candidate prediction modes of the current block according to a template region of the current block;

[0240] Step 1502: determining a first prediction mode of the current block according to the prediction distortion cost;

[0241] Step 1503: determining a reference template for the template area according to the first prediction mode;

[0242] Step 1504: determining first model parameters based on the reference template and the template area;

[0243] Step 1505: Perform 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.

[0244] In some embodiments, the decoding method further includes: determining a template area of ​​the current block based on adjacent pixels of the current block.

[0245] Exemplarily, in some embodiments, the adjacent pixels of the current block include at least one of the following:

[0246] Upper adjacent pixels of the current block;

[0247] The upper left adjacent pixel of the current block;

[0248] The upper right adjacent pixel of the current block;

[0249] The left adjacent pixel of the current block;

[0250] The lower left neighboring pixel of the current block.

[0251] In some embodiments, the template area of ​​the current block includes available neighboring pixels of the current block.

[0252] In some embodiments, the decoding further comprises: determining a size of the template area according to a size of the current block.

[0253] In some embodiments, the candidate prediction modes include one or more prediction modes, and the prediction distortion costs include prediction distortion values ​​corresponding to the one or more prediction modes.

[0254] In some embodiments, the decoding method further includes: determining the one or more prediction modes; performing intra-frame prediction on the template area according to the prediction mode to obtain a first prediction value; and determining a prediction distortion value of the template area by the prediction mode based on the first prediction value corresponding to the prediction mode and the first reconstruction value of the template area.

[0255] In some embodiments, determining the one or more prediction modes includes determining the one or more prediction modes according to a second prediction mode used for performing intra-frame prediction on a neighboring block of the current block.

[0256] In some embodiments, the adjacent blocks include at least one of the following:

[0257] A left adjacent block of the current block;

[0258] A lower left adjacent block of the current block;

[0259] The upper right adjacent block of the current block;

[0260] An upper adjacent block of the current block;

[0261] The upper left neighboring block of the current block.

[0262] In some embodiments, in the case that the second prediction mode does not include an angular prediction mode, the one or more prediction modes include a Planar mode and / or a DC mode.

[0263] In some embodiments, when the second prediction mode has an angular prediction mode, the one or more prediction modes include a prediction mode in an MPM list of the current block constructed according to the neighboring block information, and the prediction mode may include a wide-angle prediction mode.

[0264] In some embodiments, if the third prediction mode does not exist in the MPM list, the third prediction mode is added to the MPM list.

[0265] In some embodiments, the third prediction mode includes a DC mode, a HOR mode and / or a VER mode.

[0266] In some embodiments, the first prediction mode is one or more prediction modes selected from the candidate prediction modes.

[0267] In some embodiments, the first prediction mode comprises a prediction mode with the smallest prediction distortion cost among the candidate prediction modes.

[0268] In some embodiments, determining the reference template of the template area according to the first prediction mode includes: determining the reference template of the template area according to the prediction mode with the minimum prediction distortion cost.

[0269] In some embodiments, determining the first model parameters based on the reference template and the template area includes: determining the first model parameters based on pixel reference values ​​in the reference template and pixel reference values ​​in the template area.

[0270] In some embodiments, determining the first model parameters based on the pixel reference values ​​of the reference template and the pixel reference values ​​of the template area includes: determining autocorrelation parameters based on the pixel reference values ​​in the reference template; determining cross-correlation parameters based on the pixel reference values ​​in the template area and the pixel reference values ​​in the reference template; and determining the first model parameters based on the autocorrelation parameters and the cross-correlation parameters.

[0271] In some embodiments, when part of the input position of the target filtering model corresponding to the first model parameters exceeds the reference template or template area, the reference template or template area is filled with pixel reference values ​​corresponding to the part of the input position.

[0272] In some embodiments, the reference template or template area is filled with pixel reference values ​​corresponding to the portion of input positions when at least one of the following conditions is met:

[0273] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0274] The partial input position does not exceed the boundary of the current image;

[0275] The partial input position does not exceed the Tile boundary.

[0276] In some embodiments, when part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template, the part of the input positions does not participate in the determination of the first model parameters.

[0277] In some embodiments, the pixel reference value includes at least one of the following: a pixel reconstruction value, a pixel gradient value of the pixel reconstruction value, and pixel position information.

[0278] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode with the smallest prediction distortion cost to obtain a second prediction value; and filtering the second prediction value according to the first model parameters to obtain a prediction value of the current block.

[0279] In some embodiments, when at least one of the following conditions is met, filtering is performed on the second prediction value according to the first model parameter to obtain the prediction value of the current block:

[0280] The candidate prediction modes only include Planar mode and / or DC mode;

[0281] The one or more candidate prediction modes include only one prediction mode.

[0282] In some embodiments, when the candidate prediction mode does not include only the Planar mode and / or the DC mode, and the candidate prediction mode includes multiple prediction modes, the first prediction mode includes the prediction mode with the smallest prediction distortion cost and the prediction mode with the second smallest prediction distortion cost, or the first prediction mode includes the prediction mode with the smallest prediction distortion cost.

[0283] In some embodiments, the second smallest prediction distortion cost refers to the second smallest of the first prediction distortion cost and the second prediction distortion cost; the smallest prediction distortion cost refers to the smallest of the first prediction distortion cost and the second prediction distortion cost;

[0284] Among them, the first prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area; the second prediction distortion cost includes the prediction distortion cost of the adjacent angle mode of the candidate prediction mode with the smallest prediction distortion cost for the template area and the second smallest prediction mode for the template area.

[0285] In some embodiments, the second smallest prediction distortion cost refers to the second smallest prediction distortion cost of the candidate prediction mode for the template area; the smallest prediction distortion cost refers to the smallest prediction distortion cost of the candidate prediction mode for the template area.

[0286] In some embodiments, if the second smallest prediction distortion cost is greater than or equal to the product of the smallest prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the smallest prediction distortion cost; wherein the first value is greater than 1.

[0287] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode with the smallest prediction distortion cost to obtain a third prediction value; and filtering the third prediction value according to the first model parameters to obtain the prediction value of the current block.

[0288] In some embodiments, if the second smallest prediction distortion cost is less than the product of the minimum prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the minimum prediction distortion cost and the prediction mode with the second smallest prediction distortion cost; wherein the first value is greater than 1.

[0289] In some embodiments, performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters to obtain a predicted value of the current block includes: performing intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth predicted value; performing intra-frame prediction on the current block according to the prediction mode corresponding to the second minimum prediction distortion cost to obtain a fifth predicted value; and weighted fusion of the fourth predicted value and the fifth predicted value to obtain a sixth predicted value.

[0290] The sixth prediction value is filtered according to the first model parameter to obtain a prediction value of the current block.

[0291] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth prediction value; performing intra-frame prediction on the current block according to the prediction mode corresponding to the second minimum prediction distortion cost to obtain a fifth prediction value; filtering the fourth prediction value according to the first model parameters to obtain a seventh prediction value; and / or filtering the fifth prediction value according to the first model parameters to obtain an eighth prediction value; weightedly fusing the fourth prediction value and the eighth prediction value, or weightedly fusing the seventh prediction value and the eighth prediction value, or weightedly fusing the seventh prediction value and the fifth prediction value to obtain the prediction value of the current block.

[0292] In some embodiments, the decoding method further includes: performing filtering processing on the prediction value of the current block according to the first model parameter to obtain the prediction value of the current block.

[0293] In some embodiments, the decoding method further includes: decoding a code stream to determine a prediction residual of the current block; and determining a reconstructed value of the current block according to the prediction value of the current block and the prediction residual of the current block.

[0294] In some embodiments, the first model parameters include filter coefficients of a target filtering model.

[0295] In some embodiments, the filtering process includes: determining the product of the filter coefficient of the target filtering model and the predicted value of the corresponding position; setting the first output value of the target filtering model to be equal to the sum of n products; wherein n represents the number of filter coefficients of the target filtering model, and n is a positive integer.

[0296] In some embodiments, when part of the input positions of the target filtering model exceeds the current block, the predicted values ​​of the part of the input positions are equal to the corresponding pixel reconstruction values.

[0297] In some embodiments, the predicted value of the partial input position is equal to the corresponding pixel reconstructed value when at least one of the following conditions is satisfied:

[0298] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0299] The partial input position does not exceed the boundary of the current image;

[0300] The partial input position does not exceed the Tile boundary.

[0301] In some embodiments, when part of the input positions of the target filtering model exceeds the current block, the part of the input positions is not used as the output positions of the target filtering model.

[0302] In some embodiments, the output value of the filtering process is equal to the first output value of the target filtering model, or the output value of the filtering process is equal to the cumulative value of the first output value of the target filtering model and the first offset value.

[0303] In some embodiments, the first offset value is equal to a preset second value.

[0304] In some embodiments, the decoding method further includes: determining the first offset value based on a pixel reconstruction value corresponding to at least one filter coefficient at a position different from the first output value of the target filtering model.

[0305] In some embodiments, the first model parameters include filter coefficients of a target filtering model; determining the first model parameters based on the reference template and the template area includes: determining first candidate filter coefficients of the target filtering model based on pixel reference values ​​of first-category samples in the reference template and pixel reference values ​​of first-category samples in the template area; determining second candidate filter coefficients of the target filtering model based on pixel reference values ​​of second-category samples in the reference template and pixel reference values ​​of second-category samples in the template area; parsing the bitstream to obtain a first index value of the filter coefficients of the target filtering model; and determining the filter coefficients of the target filtering model from the first candidate filter coefficients and the second candidate filter coefficients based on the first index value.

[0306] In some embodiments, the first category of samples refers to samples whose pixel reference values ​​are greater than or equal to the average pixel reference values ​​of the template in which they are located; the second category of samples refers to samples whose pixel reference values ​​are less than or equal to the average pixel reference values ​​of the template in which they are located.

[0307] In some embodiments, the first model parameters include filter coefficients of a target filtering model; the template area includes at least one template sub-area, and the reference template includes at least one matching sub-template; according to the first prediction mode, a matching sub-template of the template sub-area is determined; determining the first model parameters based on the reference template and the template area includes: determining a corresponding third candidate filter coefficient based on the template sub-area and the corresponding matching sub-template; parsing the bitstream to obtain a first index value of the filter coefficient of the target filtering model; and determining the filter coefficient of the target filtering model from the third candidate filter coefficient corresponding to the at least one template sub-area based on the first index value.

[0308] In some embodiments, the first model parameters include filter coefficients of a target filter model; determining the first model parameters based on the reference template and the template area includes: determining filter coefficients of multiple filter models of different shapes respectively based on the reference template and the template area; parsing the bitstream to obtain a first index value of the filter coefficients of the target filter model; and determining the filter coefficients of the target filter model from the filter coefficients of the multiple filter models of different shapes based on the first index value.

[0309] In some embodiments, the decoding method further includes: parsing the code stream to determine the shape of the target filtering model and / or the number of filtering coefficients of the target filtering model.

[0310] In some embodiments, the decoding method further includes: parsing the code stream to determine the shapes of the multiple filter models with different shapes and / or the number of filter coefficients of the target filter model.

[0311] In some embodiments, when a first matching error between the reference template and the template area is greater than or equal to a first threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed.

[0312] In some embodiments, when a second matching error between the reference template and the template area after filtering by the first model parameters is greater than or equal to a second threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed.

[0313] In some embodiments, the decoding method further comprises: parsing the code stream to obtain first syntax identification information and second syntax identification information;

[0314] When the first syntax identification information is equal to a third value and the second syntax identification information is equal to a fourth value, performing the step of performing intra prediction on the current block according to the first prediction mode and the first model parameters;

[0315] The third value indicates that a template-based intra-frame mode derivation method is used to perform intra-frame prediction on the current block, and the fourth value indicates that the first model parameter is used for intra-frame prediction of the current block.

[0316] It should be noted that in the embodiments of the present application, both the encoder and the decoder need to use the same operation to determine the prediction value of the current block. Regarding the operation of selecting a set of filter coefficients from multiple sets of candidate filter coefficients as the first model parameters, the decoder also needs to use the same operation as the encoder to determine the multiple sets of candidate filter coefficients. The difference is that the decoder does not need to select a set of filter coefficients as the first model parameters based on rate-distortion cost. Instead, the decoder obtains the index value of the first model parameter from the bitstream and, based on this index value, determines the first model parameters from the multiple sets of candidate filter coefficients.

[0317] Therefore, the decoding method embodiment is similar to the encoding method embodiment and has similar beneficial effects as the encoding method embodiment. For technical details not disclosed in the decoding method embodiment of this application, please refer to the description of the encoding method embodiment of this application for understanding.

[0318] The following describes an exemplary application of the embodiments of the present application in a practical application scenario.

[0319] The main technical plan:

[0320] In the TIMD prediction process, it is proposed to establish a linear model for the template area of ​​the current block and the template used in the TIMD optimal mode (i.e., the reference template) to fully utilize the information of all adjacent reconstructed sampling points, and apply the linear model to filter the predicted block of the current block.

[0321] The prediction process of the proposed method is described in detail below:

[0322] TIMD input: the position of the current block (xTbCmp, yTbCmp), the width uiWidth of the current block, and the height uiHeight of the current block.

[0323] Output of TIMD: predicted value predSamples[x][y] of the current block, where x = 0..nTbW-1, y = 0..nTbH-1.

[0324] As shown in FIG4 , the specific prediction process of the TIMD technology includes the following steps 401 to 404 :

[0325] Step 401, determining the template type and size of the template area of ​​the current block;

[0326] Step 402, obtaining reference area pixels;

[0327] Step 403, obtaining a prediction mode of TIMD;

[0328] Step 404: Generate a final prediction value of the current block.

[0329] Through the above process, the predicted value of the current block can be obtained.

[0330] The following is a detailed introduction:

[0331] In step 401, the current template type and size are determined.

[0332] The template areas that can be used by TIMD technology include the upper adjacent reconstructed pixel area and the left adjacent reconstructed pixel area. The template type (eTempType) is determined based on the location of the current block. For example:

[0333] If the left and upper adjacent reconstructed pixels are not available, eTempType is NO_NEIGHBOR, and there is no template area.

[0334] If both the left and above adjacent reconstructed pixels are available, eTempType is LEFT_ABOVE_NEIGHBOR, and the template regions are shown as 501 and 502 in FIG5 .

[0335] If only the left adjacent reconstructed pixels are available, then eTempType is LEFT_NEIGHBOR, and the template area is shown as 601 in FIG6 .

[0336] If only the upper adjacent reconstructed pixels are available, eTempType is ABOVE_NEIGHBOR, and the template area is shown as 701 in FIG. 7 .

[0337] The template size of the template area used by TIMD technology is related to the current block size. For example:

[0338] If the current block height (uiHeight) is greater than or equal to 8, the template height (iTempHeight) is 4; otherwise, the template height is 2.

[0339] If the current block width (uiWidth) is greater than or equal to 8, the template width (iTempWidth) is 4; otherwise, the template width is 2.

[0340] In step 402, pixels in a reference area are obtained.

[0341] As shown in Figure 8, the reference areas that can be used by TIMD technology are the adjacent reconstructed pixel areas on the left and above the template. Let the length of the adjacent reconstructed pixel area on the left be m_leftRefLength and the length of the adjacent reconstructed pixel area on the top be m_topRefLength, then: m_leftRefLength = (uiHeight + iTempHeight) << 3 m_topRefLength = (uiWidth + iTempWidth) << 3

[0342] In step 403, a prediction mode of TIMD is obtained.

[0343] To obtain the TIMD prediction mode, we first need to obtain a prediction mode set (i.e., an example of the candidate prediction mode for the current block mentioned above). Then, we traverse the prediction mode set and calculate the prediction value for the template area. By calculating the prediction distortion cost, we select the TIMD prediction mode for the current block.

[0344] In TIMD technology, the encoder or decoder selects a prediction mode set based on the prediction modes of the neighboring blocks (left, lower left, upper right, upper, upper left) of the current block. Specifically:

[0345] If the neighboring block does not have an angular prediction mode, the prediction mode set includes a Planar mode and / or a DC mode.

[0346] If there is an angular prediction mode for the adjacent block, the prediction mode set includes the MPM list and the wide angle prediction mode. If there is no DC / HOR / VER mode in the MPM list, it is added at the end of the MPM list.

[0347] In step 404, a final prediction value of the current block is generated.

[0348] (1) If the prediction mode set only includes the Planar mode and / or the DC mode, then after traversing the prediction mode set in the template region, the mode with the lowest prediction distortion cost (iBestMode) is selected as the first prediction mode, and no weighted fusion is performed. That is, predSamples[x][y] is directly obtained using the corresponding method of the first prediction mode, where x = 0..nTbW-1 and y = 0..nTbH-1.

[0349] (2) Otherwise (i.e., the prediction mode set does not include only Planar mode and / or DC mode), determine the mode information obtained from the bitstream. If TIMD-FLM is true, execute the process of constructing predSamples[x][y] using the linear filter model, as described in S4.2 below.

[0350] (3) Otherwise (i.e., the prediction mode set does not only include Planar mode and / or DC mode), if there is only one candidate prediction mode for TIMD, no weighted fusion is performed, and the current block is predicted using iBestMode to obtain the final prediction value. That is, predSamples[x][y] is directly obtained using the corresponding method of the prediction mode, where x = 0..nTbW-1 and y = 0..nTbH-1.

[0351] If there is more than one candidate mode for TIMD, after traversing the prediction mode set in the template area, the mode with the smallest prediction distortion cost (iBestMode) and the mode with the second smallest prediction distortion cost (iSecondaryMode) are obtained. Then, the adjacent angle modes (+1 and -1) of iBestMode and iSecondaryMode are checked, and these adjacent angle modes are calculated and updated as the prediction mode of TIMD, and the prediction distortion costs of these four adjacent angle modes for the template area are determined. Based on this, the mode with the smallest prediction distortion cost (still recorded as iBestMode, i.e., the updated iBestMode) and the mode with the second smallest prediction distortion cost (still recorded as iSecondaryMode, i.e., the updated iSecondaryMode) are determined from iBestMode and its adjacent angle modes (+1 and -1), iSecondaryMode and its adjacent angle modes (+1 and -1). Let the prediction distortion costs of iBestMode and iSecondaryMode be uiBestCost and uiSecondaryCost, respectively. If the TIMD fusion conditions are met, calculate the TIMD fusion weight. Based on the size of uiBestCost and uiSecondaryCost, decide whether to apply weighted fusion. The details are as follows:

[0352] If uiSecondaryCost > = 2 * uiBestCost, weighted fusion is not applied, and the current block is predicted using iBestMode to obtain the final prediction value. That is, predSamples[x][y] is directly obtained using the corresponding method of the prediction mode, where x = 0..nTbW-1 and y = 0..nTbH-1.

[0353] If uiSecondaryCost < 2 * uiBestCost, then weighted fusion is applied. Let the weight of iBestMode be weight1 and the weight of iSecondaryMode be weight2. Specifically as follows: weight1 = uiSecondaryCost / (uiBestCost + uiSecondaryCost) weight2 = 1 - weight1

[0354] After using iBestMode and iSecondaryMode to obtain two prediction values ​​(pelPred[x][y] and pelPredFusion[x][y], where x = 0..nTbW-1, y = 0..nTbH-1), the current block is weighted fusion applied to obtain the final prediction value predSamples[x][y]. Specifically: predSamples[x][y] = pelPred[x][y]*weight1 + pelPredFusion[x][y]*weight2

[0355] S4.2. Process of obtaining prediction values ​​using the TIMD-FLM model

[0356] Figure 5. Process of obtaining predicted values ​​in TIMD-FLM mode

[0357] As shown in FIG16 , it shows the process of obtaining the prediction value in the TIMD-FLM mode, including the following steps 1601 to 1603:

[0358] Step 1601, determining a reference region for establishing a linear filtering model;

[0359] Step 1602, calculating the filter coefficient;

[0360] Step 1603: Generate a prediction value for the current block.

[0361] Using the best matching template (i.e., the reference template) obtained in the previous step using SATD and the current block template (i.e., the template region), a linear filtering model is established. This process mainly includes the following two steps: determining the reconstruction region for calculating the filter coefficients of the filtering model, and calculating the filter coefficients of the filtering model.

[0362] The number of taps in the filter (i.e., the filter model) is defined as nTap. nTap can be a constant or a variable; for example, the number of filter taps can be dynamically adjusted based on the block size. In this solution, filters of various shapes can be used. In one embodiment, a fixed-shape filter is used, as shown in Figure 12, resulting in a filter tap number nTap of 5.

[0363] In step 1601, a reference region for establishing a linear filtering model is determined;

[0364] The available reconstructed pixels are determined according to the template type eTempType. For example, when the template type eTempType is LEFT_ABOVE_NEIGHBOR, as shown in 501 and 502 in FIG5 , it indicates that the adjacent left and upper reconstructed pixels are available. The number of available reconstructed pixels on the left is templateW_size*nTbH, and the number of available reconstructed pixels on the upper side is templateH_size*nTbW.

[0365] Filling boundary pixels. Considering that the filter may use reconstructed pixels outside the template area and the reference template, it is necessary to fill the boundary pixels. Depending on the filter shape, the area that needs to be filled at the boundary is different.

[0366] There are also different ways to fill:

[0367] One filling method is to determine whether the current block is available. If it is available, the reconstructed pixels are directly used. If it is not available, the reconstructed pixels of the adjacent template area are copied to fill the current block.

[0368] Another filling method is to directly copy the reconstructed pixels of the adjacent template area to fill the current block.

[0369] Alternatively, you can choose not to fill in the data and instead give up using the corresponding data in the calculation when encountering a boundary position.

[0370] Availability judgment includes but is not limited to one or more of the following conditions:

[0371] The sampling point at this location has been reconstructed;

[0372] The position does not exceed the image boundaries;

[0373] The position does not exceed the Tile boundary;

[0374] After determining the number of available reconstruction pixels, the reconstruction region for calculating the filter coefficients of the filtering model is determined based on the available reconstructed pixels. This region is called R. R usually includes all available reconstructed pixels in the template. For example, when eTempType is LEFT_ABOVE_NEIGHBOR, R includes all available reconstructed pixels on the left and above.

[0375] S4.202. Calculate the filter coefficient of the filter model

[0376] After determining the reconstruction region R for calculating the filter coefficients of the filter model, a set of filter coefficients of the filter model is derived by minimizing the MSE of the reconstructed pixels in the region R and the reconstructed pixels of the current block template.

[0377] In step 1602, filter coefficients are calculated.

[0378] If there is only one candidate mode of TIMD, no weighted fusion is performed, and the current block is predicted using iBestMode to obtain a predicted value.

[0379] For the current block to be coded, a set of filter coefficients of the filter model can be obtained by establishing a linear filter model. The filter coefficients of the filter model are c0, c1, c2...c nTap-1 Then, the non-fused TIMD prediction value is filtered according to the filter shape and the filter coefficient of the filter model, that is, the filter coefficient of the filter model and the predicted pixels at the corresponding position are weighted and summed to obtain the final prediction value of the current block.

[0380] The specific prediction value calculation process is described as follows:

[0381] Assuming that the number of filter taps nTap is 5, the shape of the filter is shown in Figure 17, c0 to c4 are the tap coefficients of the filter, where the tap coefficient C0 corresponds to Point is the final predicted pixel of the current block The predicted pixel Y at the corresponding position in the best matching block pred [i][j]; the rest The point is the predicted pixel in the current block that is adjacent to the current spatial position.

[0382] The specific prediction value calculation process is as follows:

[0383] For each current pixel to be predicted (i, j), the pixel position of the filter in the current block is defined as (k, l), then the corresponding pixel in the prediction block during filtering is defined as [i+k][j+l], the filter coefficient of each filter model at the (k, l) position of the filter in the current block is defined as c k,l : c k,l =c n

[0384] Where n=0,…,nTap-1, k and l are between -1 and 1.

[0385] For i=0,…,nTbW-1,j=0,…,nTbH-1:

[0386] The final predicted value is:

[0387] in

[0388] The above method provided by the embodiment of the present application can effectively correct the prediction value of the template-based intra-frame mode derivation technology, thereby improving the prediction accuracy. This main scheme establishes a linear filtering model between the best matching template (i.e., the reference template) obtained by searching and the current block template (i.e., the template area), and calculates the filter coefficient of the filtering model by minimizing the MSE between the prediction template (prediction template = filter coefficient of the filtering model × matching template) and the current block template. The filter coefficient of the filtering model fully reflects the correlation between the matching template (i.e., the reference template) and the current block template (i.e., the template area), and applies this correlation to the current prediction block, performs filtering correction on its prediction value, and uses the filtered prediction pixel as the final prediction pixel, which improves the prediction accuracy to a certain extent.

[0389] In an embodiment of the present application, a template-based intra-frame mode derivation technology TIMD-FLM based on a linear filtering model is proposed, which uses a matching template (i.e., the reference template) and a current block template (i.e., the template area) to establish a linear filtering model, fully utilizes the correlation between the matching template and the current block template, and filters and corrects the pixels of the current prediction block, and uses the filtered prediction value as the final prediction value, which improves the prediction accuracy to a certain extent.

[0390] The main plan includes the following:

[0391] A linear filtering model is established between the best matching template obtained through the search and the current block template. The filter coefficient of the filtering model is obtained by minimizing the MSE between the prediction template (prediction template = filter coefficient of the filtering model × matching template) and the current block template. The current prediction block is filtered and corrected, and the filtered prediction pixel is used as the final prediction pixel.

[0392] Extension 1:

[0393] Expand the filter coefficient input information used to calculate the filter model in the main scheme:

[0394] In the main scheme, the input information for computing the filter coefficients of the filter model is the available reconstructed pixels of the matching template.

[0395] Extension 1.1:

[0396] The gradient of each pixel in the matching template may be calculated, including but not limited to the horizontal gradient, the vertical gradient, etc., and the calculated gradient is used as input information for calculating the filter coefficient of the filter model.

[0397] Extension 1.2:

[0398] The position information of each pixel can be used as input information for calculating the filter. The position information can be the absolute position information of each pixel in the entire image, or the relative position information of each pixel relative to a reference point.

[0399] Extension 2:

[0400] Another implementation method for calculating the filter coefficients of the filter model in the main solution:

[0401] In the main scheme, the filter coefficients of the filter model finally calculated are the tap coefficients corresponding to the filter, that is, the number of filter coefficients of the filter model is equal to the number of filter taps nTap. In addition, several bias terms (i.e., first offset values) can be added to the filter, for example:

[0402] In the main scheme, when nTap = 5, the filter coefficients of the filter model are the tap coefficients c0 to c4 corresponding to the filter, and the predicted value obtained by calculating the (i, j) position is:

[0403] At this time, the bias term can be added, as shown below:

[0404] where c n =c i,j,k,l Where Constant can be a fixed constant, such as Constant = 1 << (BitDepth-1), or a number related to the reconstructed pixel value corresponding to a tap in the filter other than the (i, j) position, such as Constant = f(ref[k][l]). Where Constant = f(ref[i][j]) or Constant = f(ref[k][l]) can be a linear mapping relationship or a nonlinear mapping relationship. The bias term can be added one or more times.

[0405] Extension 3:

[0406] Expand the number of filter models in the main scheme:

[0407] In the main solution, only one linear filtering model is established, but multiple linear filtering models can be established.

[0408] The input information for calculating the filter coefficients of the filter model is classified, and a filter model is established for each category of input information.

[0409] For example, when using reconstruction information to build a model, one feasible solution is to classify by the mean of the reconstruction information, build a model for the reconstruction information that is greater than the mean, and build a model for the reconstruction information that is less than the mean.

[0410] Another feasible solution is to use the position of the reconstruction information for classification. For example, a model can be established using the available reconstruction information on the left and upper sides, and a second model can be established using the available reconstruction information on the left and upper left sides. The encoder decides which model to use. One feasible decision-making method is for the encoder to decide which model to use through rate-distortion optimization and transmit the corresponding flag to the decoder.

[0411] Another feasible solution is to utilize filter shape classification. This allows for the use of multiple filters with different shapes and a filter model for each shape. The encoder then decides which filter shape to use. One feasible approach is for the encoder to determine the filter shape through rate-distortion optimization and transmit a corresponding flag to the decoder.

[0412] Extension 4:

[0413] Expand the type of filtering model in the main solution:

[0414] Extension 5:

[0415] Expand the prediction value calculation part of the main solution: use certain conditions to determine whether the current block uses the filtered prediction value as the final prediction value. For example, there are several ways:

[0416] By comparing the distortion of the matching template and the current encoding template, such as SAD or MSE or SATD or SSE, with the threshold T_Distortion1, it is decided whether to filter the matching template;

[0417] On the basis of satisfying the use of the filtering model in (1), the distortion between the filtered matching template and the template of the current block, such as SAD or MSE or SATD or SSE and the threshold T_Distortion2, is used to determine whether the current block should be filtered.

[0418] The encoding end transmits a Flag indicating whether to apply the filtering model. timdFlag indicates whether the current block applies the template-based intra-frame mode derivation technology, and filterFlag indicates whether the current block applies the filtering model. When timdFlag is 1, the encoding end decides whether to filter the prediction block by comparing the distortion between the prediction block and the original block before and after filtering, such as SAD or MSE or SATD or SSE. If the distortion after filtering is less than the distortion before filtering, filterFlag is 1, and the current block uses the prediction block after filtering as the prediction block. Otherwise, filterFlag is 0, and the current block uses the prediction block before filtering as the prediction block. The encoding end transmits filterFlag to the decoding end.

[0419] Extension 6:

[0420] Regarding the process of obtaining the prediction value of the coding block, you can follow the main scheme and only implement the prediction in TIMD-FLM mode, or only implement the weighted prediction of TIMD. You can also expand it to first implement the prediction in TIMD-FLM mode and then implement the weighted prediction of TIMD. In this case, the weighted prediction value of TIMD can be consistent with the previous calculation method, or it can be recalculated using the prediction template after implementing TIMD-FLM. The prediction value can be corrected using the TIMD-FLM mode only, or both BestMode and SecondBestMode can be used.

[0421] Extension 7:

[0422] This method may also be used in the normal directional prediction mode instead of the TIMD mode, as a replacement or supplement for the normal directional prediction mode.

[0423] It should be noted that although the steps of the method of the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all steps must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps; or steps in different embodiments may be combined to form a new technical solution.

[0424] Based on the above embodiments, an embodiment of the present application provides a decoding device, which is applied to a decoder. FIG18 is a schematic structural diagram of the decoding device provided in an embodiment of the present application. As shown in FIG18 , the decoding device 18 includes:

[0425] A first determining module 1801 is configured to determine a prediction distortion cost of a candidate prediction mode of the current block according to a template area of ​​the current block;

[0426] A second determining module 1802 is configured to determine a first prediction mode of the current block according to the prediction distortion cost;

[0427] A third determining module 1803 is configured to determine a reference template for the template area according to the first prediction mode;

[0428] A fourth determining module 1804 is configured to determine a first model parameter based on the reference template and the template area;

[0429] The first prediction module 1805 is configured to perform 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.

[0430] In some embodiments, the first determination module 1801 is further configured to: determine the template area of ​​the current block according to adjacent pixels of the current block.

[0431] Furthermore, in some embodiments, the adjacent pixels of the current block include at least one of the following:

[0432] Upper adjacent pixels of the current block;

[0433] The upper left adjacent pixel of the current block;

[0434] The upper right adjacent pixel of the current block;

[0435] The left adjacent pixel of the current block;

[0436] The lower left neighboring pixel of the current block.

[0437] In some embodiments, the template area of ​​the current block includes available neighboring pixels of the current block.

[0438] In some embodiments, the first determining module 1801 is further configured to: determine the size of the template area according to the size of the current block.

[0439] In some embodiments, the candidate prediction modes include one or more prediction modes, and the prediction distortion costs include prediction distortion values ​​corresponding to the one or more prediction modes.

[0440] In some embodiments, the second determination module 1802 is further configured to: determine the one or more prediction modes; perform intra-frame prediction on the template area according to the prediction mode to obtain a first prediction value; and determine the prediction distortion value of the template area by the prediction mode based on the first prediction value corresponding to the prediction mode and the first reconstruction value of the template area.

[0441] In some embodiments, determining the one or more prediction modes includes determining the one or more prediction modes according to a second prediction mode used for performing intra-frame prediction on a neighboring block of the current block.

[0442] In some embodiments, the adjacent blocks include at least one of the following:

[0443] A left adjacent block of the current block;

[0444] A lower left adjacent block of the current block;

[0445] The upper right adjacent block of the current block;

[0446] An upper adjacent block of the current block;

[0447] The upper left neighboring block of the current block.

[0448] In some embodiments, in the case that the second prediction mode does not include an angular prediction mode, the one or more prediction modes include a Planar mode and / or a DC mode.

[0449] In some embodiments, when an angle prediction mode exists in the second prediction mode, the one or more prediction modes include a prediction mode in an MPM list of the current block constructed according to the neighboring block information, and the prediction mode may include a wide angle prediction mode.

[0450] In some embodiments, if the third prediction mode does not exist in the MPM list, the third prediction mode is added to the MPM list.

[0451] In some embodiments, the third prediction mode includes a DC mode, a HOR mode and / or a VER mode.

[0452] In some embodiments, the first prediction mode is one or more prediction modes selected from the candidate prediction modes.

[0453] In some embodiments, the first prediction mode comprises a prediction mode with the smallest prediction distortion cost among the candidate prediction modes.

[0454] In some embodiments, determining the reference template of the template area according to the first prediction mode includes: determining the reference template of the template area according to the prediction mode with the minimum prediction distortion cost.

[0455] In some embodiments, determining the first model parameters based on the reference template and the template area includes: determining the first model parameters based on pixel reference values ​​in the reference template and pixel reference values ​​in the template area.

[0456] In some embodiments, determining the first model parameters based on the pixel reference values ​​of the reference template and the pixel reference values ​​of the template area includes: determining autocorrelation parameters based on the pixel reference values ​​in the reference template; determining cross-correlation parameters based on the pixel reference values ​​in the template area and the pixel reference values ​​in the reference template; and determining the first model parameters based on the autocorrelation parameters and the cross-correlation parameters.

[0457] In some embodiments, when part of the input position of the target filtering model corresponding to the first model parameters exceeds the reference template or the template area, the reference template or the template area is filled with the pixel reference value corresponding to the part of the input position.

[0458] In some embodiments, the reference template or the template area is filled with pixel reference values ​​corresponding to the partial input positions when at least one of the following conditions is met:

[0459] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0460] The partial input position does not exceed the boundary of the current image;

[0461] The partial input position does not exceed the Tile boundary.

[0462] In some embodiments, when part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template, the part of the input positions does not participate in the determination of the first model parameters.

[0463] In some embodiments, the pixel reference value includes at least one of the following: a pixel reconstruction value, a pixel gradient value of the pixel reconstruction value, and pixel position information.

[0464] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode with the smallest prediction distortion cost to obtain a second prediction value; and filtering the second prediction value according to the first model parameters to obtain a prediction value of the current block.

[0465] In some embodiments, when at least one of the following conditions is met, the second prediction value is filtered according to the first model parameters to obtain the prediction value of the current block: the candidate prediction mode only includes the Planar mode and / or the DC mode; the one or more candidate prediction modes only include one prediction mode.

[0466] In some embodiments, when the candidate prediction mode does not include only the Planar mode and / or the DC mode, and the candidate prediction mode includes multiple prediction modes, the first prediction mode includes the prediction mode with the smallest prediction distortion cost and the prediction mode with the second smallest prediction distortion cost, or the first prediction mode includes the prediction mode with the smallest prediction distortion cost.

[0467] In some embodiments, the second smallest prediction distortion cost refers to the second smallest of the first prediction distortion cost and the second prediction distortion cost; the smallest prediction distortion cost refers to the smallest of the first prediction distortion cost and the second prediction distortion cost; wherein, the first prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area; the second prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area with the smallest prediction distortion cost and the adjacent angle mode of the second smallest prediction mode for the template area.

[0468] In some embodiments, the second smallest prediction distortion cost refers to the second smallest prediction distortion cost of the candidate prediction mode for the template area; the smallest prediction distortion cost refers to the smallest prediction distortion cost of the candidate prediction mode for the template area.

[0469] In some embodiments, if the second smallest prediction distortion cost is greater than or equal to the product of the smallest prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the smallest prediction distortion cost; wherein the first value is greater than 1.

[0470] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode with the smallest prediction distortion cost to obtain a third prediction value; and filtering the third prediction value according to the first model parameters to obtain the prediction value of the current block.

[0471] In some embodiments, if the second smallest prediction distortion cost is less than the product of the minimum prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the minimum prediction distortion cost and the prediction mode with the second smallest prediction distortion cost; wherein the first value is greater than 1.

[0472] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth prediction value; performing intra-frame prediction on the current block according to the prediction mode corresponding to the second minimum prediction distortion cost to obtain a fifth prediction value; weightedly fusing the fourth prediction value and the fifth prediction value to obtain a sixth prediction value; and filtering the sixth prediction value according to the first model parameters to obtain a prediction value of the current block.

[0473] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth prediction value; performing intra-frame prediction on the current block according to the prediction mode corresponding to the second minimum prediction distortion cost to obtain a fifth prediction value; filtering the fourth prediction value according to the first model parameters to obtain a seventh prediction value; and / or filtering the fifth prediction value according to the first model parameters to obtain an eighth prediction value; weightedly fusing the fourth prediction value and the eighth prediction value, or weightedly fusing the seventh prediction value and the eighth prediction value, or weightedly fusing the seventh prediction value and the fifth prediction value to obtain the prediction value of the current block.

[0474] In some embodiments, the first prediction module 1805 is further configured to perform filtering processing on the prediction value of the current block according to the first model parameters to obtain the prediction value of the current block.

[0475] In some embodiments, the decoding device 18 further includes a decoding module configured to decode the code stream and determine a prediction residual of the current block; and determine a reconstructed value of the current block based on the prediction value of the current block and the prediction residual of the current block.

[0476] In some embodiments, the first model parameters include filter coefficients of a target filtering model.

[0477] In some embodiments, the filtering process includes: determining the product of the filter coefficient of the target filtering model and the predicted value of the corresponding position; setting the first output value of the target filtering model to be equal to the sum of n products; wherein n represents the number of filter coefficients of the target filtering model, and n is a positive integer.

[0478] In some embodiments, when part of the input positions of the target filtering model exceeds the current block, the predicted values ​​of the part of the input positions are equal to the corresponding pixel reconstruction values.

[0479] In some embodiments, the predicted value of the partial input position is equal to the corresponding pixel reconstructed value when at least one of the following conditions is satisfied:

[0480] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0481] The partial input position does not exceed the boundary of the current image;

[0482] The partial input position does not exceed the Tile boundary.

[0483] In some embodiments, when part of the input positions of the target filtering model exceeds the current block, the part of the input positions is not used as the output positions of the target filtering model.

[0484] In some embodiments, the output value of the filtering process is equal to the first output value of the target filtering model, or the output value of the filtering process is equal to the cumulative value of the first output value of the target filtering model and the first offset value.

[0485] In some embodiments, the first offset value is equal to a preset second value.

[0486] In some embodiments, the first prediction module 1805 is further configured to determine the first offset value according to a pixel reconstruction value corresponding to at least one filter coefficient at a position different from the first output value of the target filtering model.

[0487] In some embodiments, the first model parameters include filter coefficients of a target filtering model; determining the first model parameters based on the reference template and the template area includes: determining first candidate filter coefficients of the target filtering model based on pixel reference values ​​of first-category samples in the reference template and pixel reference values ​​of first-category samples in the template area; determining second candidate filter coefficients of the target filtering model based on pixel reference values ​​of second-category samples in the reference template and pixel reference values ​​of second-category samples in the template area; parsing the bitstream to obtain a first index value of the filter coefficients of the target filtering model; and determining the filter coefficients of the target filtering model from the first candidate filter coefficients and the second candidate filter coefficients based on the first index value.

[0488] In some embodiments, the first category of samples refers to samples whose pixel reference values ​​are greater than or equal to the average pixel reference values ​​of the template in which they are located; the second category of samples refers to samples whose pixel reference values ​​are less than or equal to the average pixel reference values ​​of the template in which they are located.

[0489] In some embodiments, the first model parameters include filter coefficients of a target filtering model; the template area includes at least one template sub-area, and the reference template includes at least one matching sub-template; according to the first prediction mode, a matching sub-template of the template sub-area is determined; determining the first model parameters based on the reference template and the template area includes: determining a corresponding third candidate filter coefficient based on the template sub-area and the corresponding matching sub-template; parsing the bitstream to obtain a first index value of the filter coefficient of the target filtering model; and determining the filter coefficient of the target filtering model from the third candidate filter coefficient corresponding to the at least one template sub-area based on the first index value.

[0490] In some embodiments, the first model parameters include filter coefficients of a target filter model; determining the first model parameters based on the reference template and the template area includes: determining filter coefficients of multiple filter models of different shapes respectively based on the reference template and the template area; parsing the bitstream to obtain a first index value of the filter coefficients of the target filter model; and determining the filter coefficients of the target filter model from the filter coefficients of the multiple filter models of different shapes based on the first index value.

[0491] In some embodiments, the decoding device 18 further includes a decoding module configured to: parse a bitstream to determine the shape of the target filtering model and / or the number of filter coefficients of the target filtering model, or parse the bitstream to determine the shapes of the multiple filtering models with different shapes and / or the number of filter coefficients of the target filtering model, or parse the bitstream to obtain first syntax identification information and second syntax identification information; when the first syntax identification information is equal to a third value and the second syntax identification information is equal to a fourth value, perform the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters; wherein the third value indicates that the template-based intra-frame mode derivation method is used to perform intra-frame prediction on the current block, and the fourth value indicates that the first model parameters are used for intra-frame prediction of the current block.

[0492] In some embodiments, when a first matching error between the reference template and the template area is greater than or equal to a first threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed; or, when a second matching error between the reference template and the template area after filtering by the first model parameters is greater than or equal to a second threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed.

[0493] The description of the above decoding device embodiment is similar to the description of the above encoding method embodiment, and has similar beneficial effects as the encoding method embodiment. For technical details not disclosed in the decoding device embodiment of this application, please refer to the description of the encoding method embodiment of this application for understanding.

[0494] An embodiment of the present application provides an encoding device, which is applied to an encoder. FIG19 is a schematic structural diagram of the encoding device provided in an embodiment of the present application. As shown in FIG19 , the encoding device 19 includes:

[0495] a fifth determining module 1901 configured to determine, based on a template region of a current block, a prediction distortion cost of a candidate prediction mode of the current block;

[0496] a sixth determining module 1902, configured to determine a first prediction mode of the current block according to the prediction distortion cost;

[0497] a seventh determining module 1903, configured to determine a reference template for the template area according to the first prediction mode;

[0498] An eighth determining module 1904 is configured to determine a first model parameter based on the reference template and the template area;

[0499] The second prediction module 1905 is configured to perform 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.

[0500] In some embodiments, the fifth determination module 1901 is further configured to determine the template area of ​​the current block according to adjacent pixels of the current block.

[0501] In some embodiments, the neighboring pixels of the current block include at least one of the following:

[0502] Upper adjacent pixels of the current block;

[0503] The upper left adjacent pixel of the current block;

[0504] The upper right adjacent pixel of the current block;

[0505] The left adjacent pixel of the current block;

[0506] The lower left neighboring pixel of the current block.

[0507] In some embodiments, the template area of ​​the current block includes available neighboring pixels of the current block.

[0508] In some embodiments, the fifth determining module 1901 is further configured to determine the size of the template area according to the size of the current block.

[0509] In some embodiments, the candidate prediction modes include one or more prediction modes, and the prediction distortion costs include prediction distortion values ​​corresponding to the one or more prediction modes.

[0510] In some embodiments, the sixth determination module 1902 is further configured to: determine the one or more prediction modes; perform intra-frame prediction on the template area according to the prediction mode to obtain a first prediction value; and determine the prediction distortion value of the template area by the prediction mode based on the first prediction value corresponding to the prediction mode and the first reconstruction value of the template area.

[0511] In some embodiments, determining the one or more prediction modes includes determining the one or more prediction modes according to a second prediction mode used for performing intra-frame prediction on a neighboring block of the current block.

[0512] In some embodiments, the adjacent blocks include at least one of the following:

[0513] A left adjacent block of the current block;

[0514] A lower left adjacent block of the current block;

[0515] The upper right adjacent block of the current block;

[0516] An upper adjacent block of the current block;

[0517] The upper left neighboring block of the current block.

[0518] In some embodiments, in the case that the second prediction mode does not include an angular prediction mode, the one or more prediction modes include a Planar mode and / or a DC mode.

[0519] In some embodiments, when an angle prediction mode exists in the second prediction mode, the one or more prediction modes include a prediction mode in an MPM list of the current block constructed according to the neighboring block information, and the prediction mode may include a wide angle mode.

[0520] In some embodiments, if the third prediction mode does not exist in the MPM list, the third prediction mode is added to the MPM list.

[0521] In some embodiments, the third prediction mode includes a DC mode, a HOR mode and / or a VER mode.

[0522] In some embodiments, the first prediction mode is one or more prediction modes selected from the candidate prediction modes.

[0523] In some embodiments, the first prediction mode comprises a prediction mode with the smallest prediction distortion cost among the candidate prediction modes.

[0524] In some embodiments, determining the reference template of the template area according to the first prediction mode includes: determining the reference template of the template area according to the prediction mode with the minimum prediction distortion cost.

[0525] In some embodiments, determining the first model parameters based on the reference template and the template area includes: determining the first model parameters based on pixel reference values ​​in the reference template and pixel reference values ​​in the template area.

[0526] In some embodiments, determining the first model parameters based on the pixel reference values ​​of the reference template and the pixel reference values ​​of the template area includes: determining autocorrelation parameters based on the pixel reference values ​​in the reference template; determining cross-correlation parameters based on the pixel reference values ​​in the template area and the pixel reference values ​​in the reference template; and determining the first model parameters based on the autocorrelation parameters and the cross-correlation parameters.

[0527] In some embodiments, when part of the input position of the target filtering model corresponding to the first model parameters exceeds the reference template or the template area, the reference template or the template area is filled with the pixel reference value corresponding to the part of the input position.

[0528] In some embodiments, the reference template or the template area is filled with pixel reference values ​​corresponding to the partial input positions when at least one of the following conditions is met:

[0529] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0530] The partial input position does not exceed the boundary of the current image;

[0531] The partial input position does not exceed the Tile boundary.

[0532] In some embodiments, when part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template, the part of the input positions does not participate in the determination of the first model parameters.

[0533] In some embodiments, the pixel reference value includes at least one of the following: a pixel reconstruction value, a pixel gradient value of the pixel reconstruction value, and pixel position information.

[0534] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode with the smallest prediction distortion cost to obtain a second prediction value; and filtering the second prediction value according to the first model parameters to obtain a prediction value of the current block.

[0535] In some embodiments, when at least one of the following conditions is met, filtering is performed on the second prediction value according to the first model parameter to obtain the prediction value of the current block:

[0536] The candidate prediction modes only include Planar mode and / or DC mode;

[0537] The one or more candidate prediction modes include only one prediction mode.

[0538] In some embodiments, when the candidate prediction mode does not include only the Planar mode and / or the DC mode, and the candidate prediction mode includes multiple prediction modes, the first prediction mode includes the prediction mode with the smallest prediction distortion cost and the prediction mode with the second smallest prediction distortion cost, or the first prediction mode includes the prediction mode with the smallest prediction distortion cost.

[0539] In some embodiments, the second smallest prediction distortion cost refers to the second smallest of the first prediction distortion cost and the second prediction distortion cost; the smallest prediction distortion cost refers to the smallest of the first prediction distortion cost and the second prediction distortion cost; wherein, the first prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area; the second prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area with the smallest prediction distortion cost and the adjacent angle mode of the second smallest prediction mode for the template area.

[0540] In some embodiments, the second smallest prediction distortion cost refers to the second smallest prediction distortion cost of the candidate prediction mode for the template area; the smallest prediction distortion cost refers to the smallest prediction distortion cost of the candidate prediction mode for the template area.

[0541] In some embodiments, if the second smallest prediction distortion cost is greater than or equal to the product of the smallest prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the smallest prediction distortion cost; wherein the first value is greater than 1.

[0542] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode with the smallest prediction distortion cost to obtain a third prediction value; and filtering the third prediction value according to the first model parameters to obtain the prediction value of the current block.

[0543] In some embodiments, if the second smallest prediction distortion cost is less than the product of the minimum prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the minimum prediction distortion cost and the prediction mode with the second smallest prediction distortion cost; wherein the first value is greater than 1.

[0544] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth prediction value; performing intra-frame prediction on the current block according to the prediction mode corresponding to the second minimum prediction distortion cost to obtain a fifth prediction value; weightedly fusing the fourth prediction value and the fifth prediction value to obtain a sixth prediction value; and filtering the sixth prediction value according to the first model parameters to obtain a prediction value of the current block.

[0545] In some embodiments, performing 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 includes: performing intra-frame prediction on the current block according to the prediction mode corresponding to the minimum prediction distortion cost to obtain a fourth prediction value; performing intra-frame prediction on the current block according to the prediction mode corresponding to the second minimum prediction distortion cost to obtain a fifth prediction value; filtering the fourth prediction value according to the first model parameters to obtain a seventh prediction value; and / or filtering the fifth prediction value according to the first model parameters to obtain an eighth prediction value; weightedly fusing the fourth prediction value and the eighth prediction value, or weightedly fusing the seventh prediction value and the eighth prediction value, or weightedly fusing the seventh prediction value and the fifth prediction value to obtain the prediction value of the current block.

[0546] In some embodiments, the second prediction module 1905 is further configured to perform filtering processing on the prediction value of the current block according to the first model parameters to obtain the prediction value of the current block.

[0547] In some embodiments, the encoding device 19 further includes an encoding module configured to: determine a prediction residual of the current block based on the prediction value of the current block and the original value of the current block; and generate a code stream based on the prediction residual of the current block.

[0548] In some embodiments, the first model parameters include filter coefficients of a target filtering model.

[0549] In some embodiments, the filtering process includes: determining the product of the filter coefficient of the target filtering model and the predicted value of the corresponding position; setting the first output value of the target filtering model to be equal to the sum of n products; wherein n represents the number of filter coefficients of the target filtering model, and n is a positive integer.

[0550] In some embodiments, when part of the input positions of the target filtering model exceeds the current block, the predicted values ​​of the part of the input positions are equal to the corresponding pixel reconstruction values.

[0551] In some embodiments, the predicted value of the partial input position is equal to the corresponding pixel reconstructed value when at least one of the following conditions is satisfied:

[0552] The pixel positions corresponding to the part of the input positions have been reconstructed;

[0553] The partial input position does not exceed the boundary of the current image;

[0554] The partial input position does not exceed the Tile boundary.

[0555] In some embodiments, when part of the input positions of the target filtering model exceeds the current block, the part of the input positions is not used as the output positions of the target filtering model.

[0556] In some embodiments, the output value of the filtering process is equal to the first output value of the target filtering model, or the output value of the filtering process is equal to the cumulative value of the first output value of the target filtering model and the first offset value.

[0557] In some embodiments, the first offset value is equal to a preset second value.

[0558] In some embodiments, in some embodiments, the second prediction module 1905 is further configured to determine the first offset value based on a pixel reconstruction value corresponding to at least one filter coefficient at a position different from the first output value of the target filtering model.

[0559] In some embodiments, the first model parameters include filter coefficients of a target filtering model; determining the first model parameters based on the reference template and the template area includes: determining first candidate filter coefficients of the target filtering model based on pixel reference values ​​of first-category samples in the reference template and pixel reference values ​​of first-category samples in the template area; determining second candidate filter coefficients of the target filtering model based on pixel reference values ​​of second-category samples in the reference template and pixel reference values ​​of second-category samples in the template area; and determining the filter coefficients of the target filtering model based on the first candidate filter coefficients and the second candidate filter coefficients.

[0560] In some embodiments, the first category of samples refers to samples whose pixel reference values ​​are greater than or equal to the average pixel reference values ​​of the template in which they are located; the second category of samples refers to samples whose pixel reference values ​​are less than or equal to the average pixel reference values ​​of the template in which they are located.

[0561] In some embodiments, the first model parameters include filtering coefficients of a target filtering model; the template area includes at least one template sub-area, and the reference template includes at least one matching sub-template; according to the first prediction mode, a matching sub-template of the template sub-area is determined; determining the first model parameters based on the reference template and the template area includes: determining a corresponding third candidate filtering coefficient based on the template sub-area and the corresponding matching sub-template; and determining the filtering coefficient of the target filtering model based on the third candidate filtering coefficient corresponding to the at least one template sub-area.

[0562] In some embodiments, the first model parameters include filtering coefficients of a target filtering model; determining the first model parameters based on the reference template and the template area includes: determining filtering coefficients of a plurality of filtering models of different shapes respectively based on the reference template and the template area; and determining filtering coefficients of the target filtering model based on the filtering coefficients of the plurality of filtering models of different shapes.

[0563] In some embodiments, the encoding device 19 further includes an encoding module configured to: write the first index value of the filter coefficient of the target filtering model into the bitstream, or write the shape of the target filtering model and / or the number of filter coefficients of the target filtering model into the bitstream, or write the shapes of the multiple filtering models of different shapes and / or the number of filter coefficients of the target filtering model into the bitstream.

[0564] In some embodiments, when a first matching error between the reference template and the template area is greater than or equal to a first threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed; or, when a second matching error between the reference template and the template area after filtering by the first model parameters is greater than or equal to a second threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed.

[0565] In some embodiments, the encoding device 19 further includes an encoding module configured to: write first syntax identification information and second syntax identification information into a bitstream; wherein, when the first syntax identification information is equal to a third value and the second syntax identification information is equal to a fourth value, the third value indicates that a template-based intra-frame mode derivation method is used to perform intra-frame prediction on the current block, and the fourth value indicates that the first model parameter is used for intra-frame prediction of the current block.

[0566] The description of the above encoding device embodiment is similar to the description of the above encoding / decoding method embodiment, and has similar beneficial effects as the encoding / decoding method embodiment. For technical details not disclosed in the encoding device embodiment of this application, please refer to the description of the encoding / decoding method embodiment of this application for understanding.

[0567] It should be noted that the division of modules in the encoding / decoding device described in the embodiments of the present application is schematic and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units. They may also be implemented in a combination of software and hardware.

[0568] It should be noted that, in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0569] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the encoding method or the decoding method as described in the embodiment of the present application is implemented.

[0570] An embodiment of the present application provides an encoder, as shown in FIG20 , the encoder 20 includes: a first communication interface 2001, a first memory 2002, and a first processor 2003; each component is coupled together via a first bus system 2004. It is understood that the first bus system 2004 is used to implement connection and communication between these components. In addition to the data bus, the first bus system 2004 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 2004 in FIG20 . Among them,

[0571] The first communication interface 2001 is used to receive and send signals when sending and receiving information with other external network elements;

[0572] A first memory 2002 is used to store a computer program that can be run on the first processor 2003;

[0573] The first processor 2003 is configured to execute the encoding method described in the embodiment of the present application when running the computer program.

[0574] It is understood that the first memory 2002 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 2002 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0575] The first processor 2003 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 2003. The above-mentioned first processor 2003 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 2002 , and the first processor 2003 reads the information in the first memory 2002 and completes the steps of the above method in combination with its hardware.

[0576] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0577] Optionally, as another embodiment, the first processor 2003 is further configured to execute any of the aforementioned encoding method embodiments when running the computer program.

[0578] The present application provides a decoder, as shown in FIG21 , in which the decoder 21 includes: a second communication interface 2101, a second memory 2102, and a second processor 2103; each component is coupled together via a second bus system 2104. It is understood that the second bus system 2104 is used to implement connection and communication between these components. In addition to the data bus, the second bus system 2104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in FIG21 , various buses are labeled as the second bus system 2104.

[0579] The second communication interface 2101 is used to receive and send signals during the process of sending and receiving information between other external network elements;

[0580] The second memory 2102 is used to store computer programs that can be run on the second processor 2103;

[0581] The second processor 2103 is configured to execute the decoding method described in the embodiment of the present application when running the computer program.

[0582] It can be understood that the hardware functions of the second memory 2102 and the first memory 2002 are similar, and the hardware functions of the second processor 2103 and the first processor 2003 are similar; they will not be described in detail here.

[0583] The embodiment of the present application further provides a code stream, which is obtained by using the aforementioned encoding method.

[0584] An embodiment of the present application provides an electronic device, comprising: a processor adapted to execute a computer program; and a computer-readable storage medium storing the computer program, wherein when the computer program is executed by the processor, the encoding method and / or decoding method described in the embodiment of the present application are implemented. The electronic device can be any type of device capable of video encoding and / or video decoding, such as a mobile phone, tablet computer, laptop computer, personal computer, television, projection device, or monitoring device.

[0585] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0586] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other. For the sake of brevity, they will not be repeated here.

[0587] The term "and / or" in this article is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, object A and / or object B can mean: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0588] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0589] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.

[0590] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed across multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of this embodiment.

[0591] In addition, all functional modules in the embodiments of the present application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the above-mentioned integrated modules can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0592] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.

[0593] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.

[0594] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0595] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0596] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0597] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A decoding method, the method being applied to a decoder, the method comprising: Determining, according to a template area of ​​a current block, a prediction distortion cost of a candidate prediction mode of the current block; Determining a first prediction mode of the current block according to the prediction distortion cost; Determining a reference template for the template area according to the first prediction mode; Determining first model parameters according to the reference template and the template area; According to the first prediction mode and the first model parameters, intra-frame prediction is performed on the current block to obtain a prediction value of the current block.

2. The method according to claim 1, wherein: The method further comprises: A template area of ​​the current block is determined according to adjacent pixels of the current block.

3. The method according to claim 2, wherein: The neighboring pixels of the current block include at least one of the following: The upper adjacent pixel of the current block; The upper left neighboring pixel of the current block; The upper right neighboring pixel of the current block; The left adjacent pixel of the current block; The lower left neighboring pixel of the current block.

4. The method according to claim 2 or 3, wherein: The template area of ​​the current block includes available neighboring pixels of the current block.

5. The method according to any one of claims 2 to 4, wherein: The method further comprises: The size of the template area is determined according to the size of the current block.

6. The method according to claim 1, wherein: The candidate prediction modes include one or more prediction modes, and the prediction distortion cost includes prediction distortion values ​​corresponding to the one or more prediction modes.

7. The method according to claim 6, wherein: The method further comprises: determining the one or more prediction modes; Performing intra-frame prediction on the template region according to the prediction mode to obtain a first prediction value; A prediction distortion value of the template region by the prediction mode is determined according to a first prediction value corresponding to the prediction mode and a first reconstruction value of the template region.

8. The method according to 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 for performing intra-frame prediction on a neighboring block of the current block.

9. The method according to claim 8, wherein: The adjacent blocks include at least one of the following: A left adjacent block of the current block; A lower left adjacent block of the current block; The upper right adjacent block of the current block; An upper adjacent block of the current block; The upper left neighboring block of the current block.

10. The method according to claim 8 or 9, wherein: In the case that the second prediction mode does not have an angular prediction mode, the one or more prediction modes include a Planar mode and / or a DC mode.

11. The method according to claim 8 or 9, wherein: In the case that the second prediction mode has an angular prediction mode, the one or more prediction modes include a prediction mode in an MPM list of the current block constructed according to the neighboring block information.

12. The method according to claim 11, wherein: If the third prediction mode does not exist in the MPM list, the third prediction mode is added to the MPM list.

13. The method according to claim 12, wherein: The third prediction mode includes a DC mode, a HOR mode and / or a VER mode.

14. The method according to claim 1, wherein: The first prediction mode is one or more prediction modes selected from the candidate prediction modes.

15. The method according to claim 14, wherein: The first prediction mode includes a prediction mode with the smallest prediction distortion cost among the candidate prediction modes.

16. The method according to claim 15, wherein: The determining, according to the first prediction mode, a reference template for the template area includes: The reference template of the template area is determined according to the prediction mode with the minimum prediction distortion cost.

17. The method according to any one of claims 1 to 16, wherein: The determining of the first model parameter according to the reference template and the template area includes: The first model parameters are determined according to the pixel reference values ​​in the reference template and the pixel reference values ​​in the template area.

18. The method according to claim 17, wherein: The determining the first model parameter according to the pixel reference value of the reference template and the pixel reference value of the template area includes: Determining an autocorrelation parameter according to a pixel reference value in the reference template; Determining a cross-correlation parameter according to a pixel reference value in the template area and a pixel reference value in the reference template; The first model parameter is determined according to the autocorrelation parameter and the cross-correlation parameter.

19. The method according to claim 17 or 18, wherein: When part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template or the template area, the reference template or the template area is filled with pixel reference values ​​corresponding to the part of the input positions.

20. The method according to claim 19, wherein: When at least one of the following conditions is met, the reference template or the template area is filled with the pixel reference values ​​corresponding to the partial input positions: The pixel positions corresponding to the part of input positions have been reconstructed; The partial input position does not exceed the boundary of the current image; The partial input position does not exceed the Tile boundary.

21. The method according to claim 17 or 18, wherein: When part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template, the part of the input positions does not participate in determining the first model parameters.

22. The method according to claim 17, wherein: The pixel reference value includes at least one of the following: a pixel reconstruction value, a pixel gradient value of the pixel reconstruction value, and pixel position information.

23. The method according to claim 15, wherein: The 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 includes: Performing intra-frame prediction on the current block according to the prediction mode with the minimum prediction distortion cost to obtain a second prediction value; The second prediction value is filtered according to the first model parameter to obtain the prediction value of the current block.

24. The method according to claim 23, wherein: When at least one of the following conditions is met, filtering is performed on the second prediction value according to the first model parameter to obtain a prediction value of the current block: The candidate prediction modes only include Planar mode and / or DC mode; The one or more candidate prediction modes include only one prediction mode.

25. The method of claim 14, wherein: When the candidate prediction mode does not include only the Planar mode and / or the DC mode, and the candidate prediction mode includes multiple prediction modes, the first prediction mode includes the prediction mode with the smallest prediction distortion cost and the prediction mode with the second smallest prediction distortion cost, or the first prediction mode includes the prediction mode with the smallest prediction distortion cost.

26. The method according to claim 25, wherein: The second smallest prediction distortion cost refers to the second smallest one between the first prediction distortion cost and the second prediction distortion cost; The minimum prediction distortion cost refers to the minimum of the first prediction distortion cost and the second prediction distortion cost; Among them, the first prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area; the second prediction distortion cost includes the prediction distortion cost of the adjacent angle mode of the candidate prediction mode with the smallest prediction distortion cost and the second smallest prediction distortion cost for the template area.

27. The method according to claim 25, wherein: The second smallest prediction distortion cost refers to the second smallest prediction distortion cost of the candidate prediction mode for the template area; The minimum prediction distortion cost refers to the minimum prediction distortion cost of the candidate prediction modes for the template region.

28. The method according to claim 26 or 27, wherein: If the second smallest prediction distortion cost is greater than or equal to the product of the smallest prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the smallest prediction distortion cost; wherein the first value is greater than 1.

29. The method according to claim 28, wherein: The 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 includes: Performing intra-frame prediction on the current block according to the prediction mode with the minimum prediction distortion cost to obtain a third prediction value; The third prediction value is filtered according to the first model parameter to obtain a prediction value of the current block.

30. The method according to claim 26 or 27, wherein: If the second smallest prediction distortion cost is less than the product of the minimum prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the minimum prediction distortion cost and the prediction mode with the second smallest prediction distortion cost; wherein the first value is greater than 1.

31. The method according to claim 30, wherein the 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 comprises: According to the prediction mode corresponding to the minimum prediction distortion cost, intra-frame prediction is performed on the current block to obtain a fourth prediction value; According to the prediction mode corresponding to the second smallest prediction distortion cost, intra-prediction is performed on the current block to obtain a fifth prediction value; Weighted fusion of the fourth prediction value and the fifth prediction value to obtain a sixth prediction value; The sixth prediction value is filtered according to the first model parameter to obtain a prediction value of the current block.

32. The method of claim 30, wherein: The 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 includes: According to the prediction mode corresponding to the minimum prediction distortion cost, intra-frame prediction is performed on the current block to obtain a fourth prediction value; According to the prediction mode corresponding to the second smallest prediction distortion cost, intra-prediction is performed on the current block to obtain a fifth prediction value; filtering the fourth prediction value according to the first model parameter to obtain a seventh prediction value; and / or filtering the fifth prediction value according to the first model parameter to obtain an eighth prediction value; The fourth prediction value and the eighth prediction value are weighted and fused, or the seventh prediction value and the eighth prediction value are weighted and fused, or the seventh prediction value and the fifth prediction value are weighted and fused to obtain the prediction value of the current block.

33. The method according to any one of claims 23 to 32, wherein: The method further comprises: According to the first model parameter, the prediction value of the current block is filtered to obtain the prediction value of the current block.

34. The method according to any one of claims 23 to 33, wherein: The method further comprises: Decoding a bitstream to determine a prediction residual of the current block; A reconstructed value of the current block is determined according to the predicted value of the current block and the predicted difference value of the current block.

35. The method according to any one of claims 23 to 33, wherein: The first model parameters include filter coefficients of a target filter model.

36. The method of claim 35, wherein: The filtering process comprises: Determine the product of the filter coefficient of the target filter model and the prediction value of the corresponding position; The first output value of the target filtering model is set to be equal to the sum of n products; wherein n represents the number of filtering coefficients of the target filtering model, and n is a positive integer.

37. The method of claim 36, wherein: In the case where part of the input positions of the target filtering model exceed the current block, the predicted values ​​of the part of the input positions are equal to the corresponding pixel reconstruction values.

38. The method of claim 37, wherein: The predicted value of the partial input position is equal to the corresponding pixel reconstruction value when at least one of the following conditions is met: The pixel positions corresponding to the part of input positions have been reconstructed; The partial input position does not exceed the boundary of the current image; The partial input position does not exceed the Tile boundary.

39. The method of claim 36, wherein: In the case where part of the input positions of the target filtering model exceed the current block, the part of the input positions are not used as output positions of the target filtering model.

40. The method of claim 36, wherein: The output value of the filtering process is equal to the first output value of the target filtering model, or the output value of the filtering process is equal to the accumulated value of the first output value of the target filtering model and the first offset value.

41. The method of claim 40, wherein: The first offset value is equal to a preset second value.

42. The method of claim 40, wherein: The method further comprises: The first offset value is determined according to a pixel reconstruction value corresponding to at least one filter coefficient at a position different from the first output value of the target filtering model.

43. The method of claim 1, wherein: The first model parameters include filter coefficients of a target filter model; The determining the first model parameter according to the reference template and the template area includes: Determining first candidate filter coefficients of the target filter model according to pixel reference values ​​of the first type of samples in the reference template and pixel reference values ​​of the first type of samples in the template area; Determining second candidate filter coefficients of the target filter model according to pixel reference values ​​of the second type of samples in the reference template and pixel reference values ​​of the second type of samples in the template area; Parsing the bitstream to obtain a first index value of a filter coefficient of the target filter model; According to the first index value, filter coefficients of a target filter model are determined from the first candidate filter coefficients and the second candidate filter coefficients.

44. The method of claim 43, wherein: The first type of samples refers to samples whose pixel reference values ​​are greater than or equal to the average value of the pixel reference values ​​of the template in which they are located; The second type of samples refers to samples whose pixel reference values ​​are less than or equal to the average value of the pixel reference values ​​of the template in which they are located.

45. The method of claim 1, wherein: The first model parameter includes a filter coefficient of a target filter model; the template region includes at least one template sub-region, and the reference template includes at least one matching sub-template; Determining a matching sub-template for the template sub-region according to the first prediction mode; The determining the first model parameter according to the reference template and the template area includes: Determining a corresponding third candidate filter coefficient according to the template sub-region and the corresponding matching sub-template; Parsing the bitstream to obtain a first index value of a filter coefficient of the target filter model; According to the first index value, the filter coefficient of the target filter model is determined from third candidate filter coefficients corresponding to the at least one template sub-region.

46. ​​The method of claim 1, wherein: The first model parameters include filter coefficients of a target filter model; The determining the first model parameter according to the reference template and the template area includes: Determining filter coefficients of a plurality of filter models of different shapes respectively according to the reference template and the template area; Parsing the bitstream to obtain a first index value of a filter coefficient of the target filter model; According to the first index value, the filter coefficient of the target filter model is determined from the filter coefficients of the multiple filter models with different shapes.

47. The method according to any one of claims 19-21, 35-43, 45, wherein: The method further comprises: Parse the bitstream to determine the shape of the target filter model and / or the number of filter coefficients of the target filter model.

48. The method of claim 46, wherein: The method further comprises: The bitstream is parsed to determine the shapes of the multiple filter models with different shapes and / or the number of filter coefficients of the target filter model.

49. The method of claim 1, wherein: When a first matching error between the reference template and the template area is greater than or equal to a first threshold, performing the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters; or, When a second matching error between the reference template and the template area after filtering by the first model parameters is greater than or equal to a second threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed.

50. The method of claim 1, wherein: Parsing the code stream to obtain first syntax identification information and second syntax identification information; When the first syntax identification information is equal to a third value and the second syntax identification information is equal to a fourth value, performing the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameter; The third value indicates that the template-based intra-frame mode derivation method is used to perform intra-frame prediction on the current block, and the fourth value indicates that the first model parameter is used for intra-frame prediction of the current block.

51. A coding method, the method being applied to an encoder, the method comprising: Determining, according to a template area of ​​a current block, a prediction distortion cost of a candidate prediction mode of the current block; Determining a first prediction mode of the current block according to the prediction distortion cost; Determining a reference template for the template area according to the first prediction mode; Determining first model parameters according to the reference template and the template area; According to the first prediction mode and the first model parameters, intra-frame prediction is performed on the current block to obtain a prediction value of the current block.

52. The method of claim 51, wherein: The method further comprises: A template area of ​​the current block is determined according to adjacent pixels of the current block.

53. The method of claim 52, wherein: The neighboring pixels of the current block include at least one of the following: The upper adjacent pixel of the current block; The upper left neighboring pixel of the current block; The upper right neighboring pixel of the current block; The left adjacent pixel of the current block; The lower left neighboring pixel of the current block.

54. The method of claim 52 or 53, wherein: The template area of ​​the current block includes available neighboring pixels of the current block.

55. The method according to any one of claims 52 to 54, wherein: The method further comprises: The size of the template area is determined according to the size of the current block.

56. The method of claim 51, wherein: The candidate prediction modes include one or more prediction modes, and the prediction distortion cost includes prediction distortion values ​​corresponding to the one or more prediction modes.

57. The method of claim 56, wherein: The method further comprises: determining the one or more prediction modes; Performing intra-frame prediction on the template region according to the prediction mode to obtain a first prediction value; A prediction distortion value of the template region by the prediction mode is determined according to a first prediction value corresponding to the prediction mode and a first reconstruction value of the template region.

58. The method of claim 57, 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 for performing intra-frame prediction on a neighboring block of the current block.

59. The method of claim 58, wherein: The adjacent blocks include at least one of the following: A left adjacent block of the current block; A lower left adjacent block of the current block; The upper right adjacent block of the current block; An upper adjacent block of the current block; The upper left neighboring block of the current block.

60. The method of claim 58 or 59, wherein: In the case that the second prediction mode does not have an angular prediction mode, the one or more prediction modes include a Planar mode and / or a DC mode.

61. The method of claim 58 or 59, wherein: In the case that the second prediction mode has an angular prediction mode, the one or more prediction modes include a prediction mode in an MPM list of the current block constructed according to the neighboring block information.

62. The method of claim 61, wherein: If the third prediction mode does not exist in the MPM list, the third prediction mode is added to the MPM list.

63. The method of claim 62, wherein: The third prediction mode includes a DC mode, a HOR mode and / or a VER mode.

64. The method of claim 51, wherein: The first prediction mode is one or more prediction modes selected from the candidate prediction modes.

65. The method of claim 64, wherein: The first prediction mode includes a prediction mode with the smallest prediction distortion cost among the candidate prediction modes.

66. The method of claim 65, wherein: The determining, according to the first prediction mode, a reference template for the template area includes: Determine a reference template for the template area according to the prediction mode with the minimum prediction distortion cost.

67. The method according to any one of claims 51 to 66, wherein: The determining of the first model parameter according to the reference template and the template area includes: The first model parameters are determined according to the pixel reference values ​​in the reference template and the pixel reference values ​​in the template area.

68. The method of claim 67, wherein: The determining the first model parameter according to the pixel reference value of the reference template and the pixel reference value of the template area includes: Determining an autocorrelation parameter according to a pixel reference value in the reference template; Determining a cross-correlation parameter according to a pixel reference value in the template area and a pixel reference value in the reference template; The first model parameter is determined according to the autocorrelation parameter and the cross-correlation parameter.

69. The method of claim 67 or 68, wherein: When part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template or the template area, the reference template or the template area is filled with pixel reference values ​​corresponding to the part of the input positions.

70. The method of claim 69, wherein: When at least one of the following conditions is met, the reference template or the template area is filled with the pixel reference values ​​corresponding to the partial input positions: The pixel positions corresponding to the part of input positions have been reconstructed; The partial input position does not exceed the boundary of the current image; The partial input position does not exceed the Tile boundary.

71. The method of claim 67 or 68, wherein: When part of the input positions of the target filtering model corresponding to the first model parameters exceed the reference template, the part of the input positions does not participate in determining the first model parameters.

72. The method of claim 67, wherein: The pixel reference value includes at least one of the following: a pixel reconstruction value, a pixel gradient value of the pixel reconstruction value, and pixel position information.

73. The method of claim 65, wherein: The 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 includes: Performing intra-frame prediction on the current block according to the prediction mode with the minimum prediction distortion cost to obtain a second prediction value; The second prediction value is filtered according to the first model parameter to obtain the prediction value of the current block.

74. The method of claim 73, wherein: When at least one of the following conditions is met, filtering is performed on the second prediction value according to the first model parameter to obtain a prediction value of the current block: The candidate prediction modes only include Planar mode and / or DC mode; The one or more candidate prediction modes include only one prediction mode.

75. The method of claim 64, wherein: When the candidate prediction mode does not include only the Planar mode and / or the DC mode, and the candidate prediction mode includes multiple prediction modes, the first prediction mode includes the prediction mode with the smallest prediction distortion cost and the prediction mode with the second smallest prediction distortion cost, or the first prediction mode includes the prediction mode with the smallest prediction distortion cost.

76. The method of claim 75, wherein: The second smallest prediction distortion cost refers to the second smallest one between the first prediction distortion cost and the second prediction distortion cost; The minimum prediction distortion cost refers to the minimum of the first prediction distortion cost and the second prediction distortion cost; Among them, the first prediction distortion cost includes the prediction distortion cost of the candidate prediction mode for the template area; the second prediction distortion cost includes the prediction distortion cost of the adjacent angle mode of the candidate prediction mode with the smallest prediction distortion cost and the second smallest prediction distortion cost for the template area.

77. The method of claim 75, wherein: The second smallest prediction distortion cost refers to the second smallest prediction distortion cost of the candidate prediction mode for the template area; The minimum prediction distortion cost refers to the minimum prediction distortion cost of the candidate prediction modes for the template region.

78. The method of claim 76 or 77, wherein: If the second smallest prediction distortion cost is greater than or equal to the product of the smallest prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the smallest prediction distortion cost; wherein the first value is greater than 1.

79. The method of claim 78, wherein: The 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 includes: Performing intra-frame prediction on the current block according to the prediction mode with the minimum prediction distortion cost to obtain a third prediction value; The third prediction value is filtered according to the first model parameter to obtain a prediction value of the current block.

80. The method of claim 76 or 77, wherein: If the second smallest prediction distortion cost is less than the product of the minimum prediction distortion cost and a first value, the first prediction mode includes the prediction mode with the minimum prediction distortion cost and the prediction mode with the second smallest prediction distortion cost; wherein the first value is greater than 1.

81. The method according to claim 80, wherein 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 comprises: According to the prediction mode corresponding to the minimum prediction distortion cost, intra-frame prediction is performed on the current block to obtain a fourth prediction value; According to the prediction mode corresponding to the second smallest prediction distortion cost, intra-prediction is performed on the current block to obtain a fifth prediction value; Weighted fusion of the fourth prediction value and the fifth prediction value to obtain a sixth prediction value; The sixth prediction value is filtered according to the first model parameter to obtain a prediction value of the current block.

82. The method of claim 80, wherein: The 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 includes: According to the prediction mode corresponding to the minimum prediction distortion cost, intra-frame prediction is performed on the current block to obtain a fourth prediction value; According to the prediction mode corresponding to the second smallest prediction distortion cost, intra-prediction is performed on the current block to obtain a fifth prediction value; filtering the fourth prediction value according to the first model parameter to obtain a seventh prediction value; and / or filtering the fifth prediction value according to the first model parameter to obtain an eighth prediction value; The fourth prediction value and the eighth prediction value are weighted and fused, or the seventh prediction value and the eighth prediction value are weighted and fused, or the seventh prediction value and the fifth prediction value are weighted and fused to obtain the prediction value of the current block.

83. The method according to any one of claims 73 to 82, wherein: The method further comprises: According to the first model parameter, the prediction value of the current block is filtered to obtain the prediction value of the current block.

84. The method according to any one of claims 73 to 83, wherein: The method further comprises: Determining a prediction residual of the current block according to the prediction value of the current block and the original value of the current block; Generate a code stream according to the prediction difference value of the current block.

85. The method according to any one of claims 73 to 83, wherein: The first model parameters include filter coefficients of a target filter model.

86. The method of claim 85, wherein: The filtering process comprises: Determine the product of the filter coefficient of the target filter model and the prediction value of the corresponding position; The first output value of the target filtering model is set to be equal to the sum of n products; wherein n represents the number of filtering coefficients of the target filtering model, and n is a positive integer.

87. The method of claim 86, wherein: In the case where part of the input positions of the target filtering model exceed the current block, the predicted values ​​of the part of the input positions are equal to the corresponding pixel reconstruction values.

88. The method of claim 87, wherein: The predicted value of the partial input position is equal to the corresponding pixel reconstruction value when at least one of the following conditions is met: The pixel positions corresponding to the part of input positions have been reconstructed; The partial input position does not exceed the boundary of the current image; The partial input position does not exceed the Tile boundary.

89. The method of claim 86, wherein: In the case where part of the input positions of the target filtering model exceed the current block, the part of the input positions are not used as output positions of the target filtering model.

90. The method of claim 86, wherein: The output value of the filtering process is equal to the first output value of the target filtering model, or the output value of the filtering process is equal to the accumulated value of the first output value of the target filtering model and the first offset value.

91. The method of claim 90, wherein: The first offset value is equal to a preset second value.

92. The method of claim 90, wherein: The method further comprises: The first offset value is determined according to a pixel reconstruction value corresponding to at least one filter coefficient at a position different from the first output value of the target filtering model.

93. The method of claim 51, wherein: The first model parameters include filter coefficients of a target filter model; The determining the first model parameter according to the reference template and the template area includes: Determining first candidate filter coefficients of the target filter model according to pixel reference values ​​of the first type of samples in the reference template and pixel reference values ​​of the first type of samples in the template area; Determining second candidate filter coefficients of the target filter model according to pixel reference values ​​of the second type of samples in the reference template and pixel reference values ​​of the second type of samples in the template area; The filter coefficients of the target filter model are determined according to the first candidate filter coefficients and the second candidate filter coefficients.

94. The method of claim 93, wherein: The first type of samples refers to samples whose pixel reference values ​​are greater than or equal to the average value of the pixel reference values ​​of the template in which they are located; The second type of samples refers to samples whose pixel reference values ​​are less than or equal to the average value of the pixel reference values ​​of the template in which they are located.

95. The method of claim 51, wherein: The first model parameter includes a filter coefficient of a target filter model; the template region includes at least one template sub-region, and the reference template includes at least one matching sub-template; Determining a matching sub-template for the template sub-region according to the first prediction mode; The determining the first model parameter according to the reference template and the template area includes: Determining a corresponding third candidate filter coefficient according to the template sub-region and the corresponding matching sub-template; The filter coefficient of the target filter model is determined according to the third candidate filter coefficient corresponding to the at least one template sub-region.

96. The method of claim 51, wherein: The first model parameters include filter coefficients of a target filter model; The determining the first model parameter according to the reference template and the template area includes: Determining filter coefficients of a plurality of filter models of different shapes respectively according to the reference template and the template area; The filter coefficients of the target filter model are determined according to the filter coefficients of the plurality of filter models of different shapes.

97. The method according to any one of claims 93 to 96, wherein: The method further comprises: The first index value of the filter coefficient of the target filter model is written into the bitstream.

98. The method according to any one of claims 69-71, 85-93, 95, wherein: The method further comprises: The shape of the target filtering model and / or the number of filtering coefficients of the target filtering model are written into the bitstream.

99. The method of claim 96, wherein: The method further comprises: The shapes of the multiple filter models with different shapes and / or the number of filter coefficients of the target filter model are written into the bitstream.

100. The method of claim 51, wherein: When a first matching error between the reference template and the template area is greater than or equal to a first threshold, performing the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters; or, When a second matching error between the reference template and the template area after filtering by the first model parameters is greater than or equal to a second threshold, the step of performing intra-frame prediction on the current block according to the first prediction mode and the first model parameters is performed.

101. The method of claim 51, wherein: The first syntax identification information and the second syntax identification information are written into the bitstream; wherein, When the first grammar identification information is equal to a third value and the second grammar identification information is equal to a fourth value, wherein the third value indicates that a template-based intra-frame mode derivation method is used to perform intra-frame prediction on the current block, and the fourth value indicates that the first model parameters are used for intra-frame prediction of the current block.

102. A decoding device, applied to a decoder, the device comprising: A first determination module, configured to determine a prediction distortion cost of a candidate prediction mode of the current block according to a template area of ​​the current block; A second determination module, configured to determine a first prediction mode of the current block according to the prediction distortion cost; A third determination module, configured to determine a reference template of the template area according to the first prediction mode; a fourth determination module, configured to determine a first model parameter according to the reference template and the template area; The first prediction module is configured to perform 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.

103. A decoder comprising a first memory and a first processor; wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 1 to 50 when running the computer program.

104. An encoding device, applied to an encoder, the device comprising: a fifth determination module, configured to determine a prediction distortion cost of a candidate prediction mode of the current block according to a template area of ​​the current block; a sixth determination module, configured to determine a first prediction mode of the current block according to the prediction distortion cost; a seventh determination module, configured to determine a reference template for the template area according to the first prediction mode; an eighth determination module, configured to determine a first model parameter according to the reference template and the template area; The second prediction module is configured to perform 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.

105. An encoder comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is used to execute the method according to any one of claims 51 to 101 when running the computer program.

106. A code stream, wherein the code stream is obtained by using the encoding method as described in any one of claims 51 to 101.

107. An electronic device comprising: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 1 to 50, or the computer program, when executed by the processor, implements the method as described in any one of claims 51 to 101.

108. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the method according to any one of claims 1 to 50, or implements the method according to any one of claims 51 to 101.

Citation Information

Patent Citations

  • Prediction value determination method, decoder and computer storage medium

    CN114424533A

  • Intra-frame prediction method, image coding method, image decoding method and apparatus

    CN114938449A

  • Intra prediction based on template matching

    CN115529852A

  • Image encoding / decoding method and apparatus, and recording medium storing bit stream

    CN116527888A

  • Method and apparatus for intra-prediction in image coding system

    US20210297677A1