WO2022174467A1 - 帧内预测方法、编码器、解码器以及存储介质 - Google Patents
帧内预测方法、编码器、解码器以及存储介质 Download PDFInfo
- Publication number
- WO2022174467A1 WO2022174467A1 PCT/CN2021/077324 CN2021077324W WO2022174467A1 WO 2022174467 A1 WO2022174467 A1 WO 2022174467A1 CN 2021077324 W CN2021077324 W CN 2021077324W WO 2022174467 A1 WO2022174467 A1 WO 2022174467A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mode
- intra
- prediction mode
- prediction
- mpm list
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 226
- 238000003860 storage Methods 0.000 title claims abstract description 23
- 239000011159 matrix material Substances 0.000 claims abstract description 195
- 238000009795 derivation Methods 0.000 claims description 75
- 238000013507 mapping Methods 0.000 claims description 69
- 238000012216 screening Methods 0.000 claims description 49
- 238000012545 processing Methods 0.000 claims description 31
- 230000008569 process Effects 0.000 claims description 30
- 238000010276 construction Methods 0.000 claims description 13
- 241000023320 Luma <angiosperm> Species 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 11
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 36
- 238000001914 filtration Methods 0.000 description 22
- 230000006835 compression Effects 0.000 description 16
- 238000007906 compression Methods 0.000 description 16
- 238000013139 quantization Methods 0.000 description 16
- 238000005516 engineering process Methods 0.000 description 12
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 10
- 230000001174 ascending effect Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 9
- 230000009466 transformation Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000007704 transition Effects 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000005192 partition Methods 0.000 description 4
- 230000002123 temporal effect Effects 0.000 description 4
- 230000003044 adaptive effect Effects 0.000 description 3
- 230000002457 bidirectional effect Effects 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000000499 effect on compression Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000000386 athletic effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000002156 mixing Methods 0.000 description 1
- 238000012958 reprocessing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Definitions
- the embodiments of the present application relate to the technical field of image processing, and in particular, to an intra-frame prediction method, an encoder, a decoder, and a storage medium.
- VVC Versatile Video Coding
- HEVC High Efficiency Video Coding
- DC Direct Current
- the embodiments of the present application provide an intra-frame prediction method, an encoder, a decoder, and a storage medium, which can reduce hardware implementation costs, reduce complexity, and implement simple and efficient encoding and decoding on the basis of improving the accuracy of intra-frame prediction method to improve compression performance.
- an embodiment of the present application provides an intra-frame prediction method, which is applied to a decoder, and the method includes:
- the intra prediction mode parameter indicates that the current block uses the IWCP mode to determine the intra prediction value of the current block, determining a first mode index and a second mode index of the current block;
- a first intra prediction mode and a second intra prediction mode of the current block are determined according to the first mode index, the second mode index and the MPM list; wherein the first intra prediction mode and The second intra-frame prediction modes are two different intra-frame angle prediction modes;
- a weight matrix of the current block is determined, and a prediction value of the current block is determined based on the first intra prediction mode, the second intra prediction mode and the weight matrix.
- an embodiment of the present application provides an intra-frame prediction method, which is applied to an encoder, and the method includes:
- the first intra prediction mode and the second intra prediction mode of the current block are determined; wherein the first intra prediction mode and the second intra prediction mode are determined.
- the second intra-frame prediction mode is two different intra-frame angle prediction modes;
- an embodiment of the present application provides an encoder, the encoder includes: a first determining part, a first constructing part, an encoding part,
- the first determination part is configured to determine the first intra prediction mode and the second intra prediction mode of the current block when the current block uses the IWCP mode to determine the intra prediction value of the current block; wherein, the The first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes;
- the first construction part configured to construct the MPM list of the current block
- the first determining part is further configured to determine the first mode index and the second mode index of the current block according to the first intra prediction mode, the second intra prediction mode and the MPM list;
- the encoding part is configured to write the first mode index and the second mode index into a code stream.
- an embodiment of the present application provides a decoder, the decoder includes: a decoding part, a second determining part, a second constructing part,
- the decoding part is configured to decode the code stream
- the second determination part is configured to determine the intra prediction mode parameter of the current block; when the intra prediction mode parameter indicates that the current block uses the IWCP mode to determine the intra prediction value of the current block, determine the the first mode index and the second mode index of the current block;
- a second building part configured to build the most probable mode MPM list of the current block
- the second determining part is further configured to determine a first intra prediction mode and a second intra prediction mode of the current block according to the first mode index, the second mode index and the MPM list; wherein , the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; the weight matrix of the current block is determined, and based on the first intra-frame prediction mode, the Two intra-frame prediction modes and the weight matrix determine the prediction value of the current block.
- an embodiment of the present application provides an encoder, where the encoder includes a first processor and a first memory storing an executable instruction of the first processor, when the instruction is executed, the When executed by the first processor, the intra-frame prediction method described above is implemented.
- an embodiment of the present application provides a decoder, where the decoder includes a second processor and a second memory storing an executable instruction of the second processor, when the instruction is executed, the When executed by the second processor, the intra-frame prediction method described above is implemented.
- an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, and when the computer program is executed by the first processor, the intra-frame prediction method according to the first aspect is implemented, Alternatively, the intra prediction method as described in the second aspect is implemented when executed by the second processor.
- the embodiments of the present application provide an intra-frame prediction method, an encoder, a decoder, and a storage medium.
- the decoder decodes a code stream and determines an intra-frame prediction mode parameter of a current block; when the intra-frame prediction mode parameter indicates that the current block uses the IWCP mode
- determine the intra-frame prediction value of the current block determine the first mode index and the second mode index of the current block; construct the most probable mode MPM list of the current block; determine the current block according to the first mode index, the second mode index and the MPM list
- the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; the weight matrix of the current block is determined and based The first intra prediction mode, the second intra prediction mode and the weight matrix determine the prediction value of the current block.
- the encoder determines the first intra prediction mode and the second intra prediction mode of the current block; wherein, the first intra prediction mode and the second intra prediction The mode is two different intra-frame angle prediction modes; the MPM list of the current block is constructed; the first mode index and the second mode index of the current block are determined according to the first intra-frame prediction mode, the second intra-frame prediction mode and the MPM list; Write the first mode index and the second mode index into the code stream. That is to say, in the embodiment of the present application, the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine them through various weight matrices to finally obtain a better prediction block.
- the complex prediction block on the basis of improving the accuracy of intra-frame prediction, can reduce the hardware implementation cost, reduce the complexity, and realize a simple and efficient encoding and decoding method, thereby improving the compression performance.
- Figure 1 is a schematic diagram 1 of weight allocation
- Figure 2 is a schematic diagram 2 of weight distribution
- 3 is a schematic diagram of intra prediction
- Fig. 4 is a kind of composition block diagram of video coding system
- Figure 5 is a block diagram of a video decoding system
- FIG. 6 is a schematic diagram 1 of the implementation flow of the intra-frame prediction method
- FIG. 7 is a schematic diagram of an IWCP mode
- Fig. 9 is the realization flow schematic diagram 2 of the intra-frame prediction method
- FIG. 10 is a schematic diagram 1 of the composition structure of the encoder proposed by the embodiment of the application.
- FIG. 11 is a second schematic diagram of the composition and structure of an encoder proposed by an embodiment of the present application.
- FIG. 12 is a schematic diagram 1 of the composition and structure of a decoder proposed by an embodiment of the present application.
- FIG. 13 is a second schematic diagram of the composition and structure of a decoder proposed by an embodiment of the present application.
- LCUs Large Coding Units
- CU Coding Unit
- Prediction Unit PU
- the hybrid coding framework may include modules such as prediction, transform (Transform), quantization (Quantization), entropy coding (EntropyCoding), and loop filtering (In Loop Filter); wherein, the prediction module may include intraPrediction (intraPrediction) And inter prediction (interPrediction), inter prediction can include motion estimation (motion estimation) and motion compensation (motion compensation). Since there is a strong correlation between adjacent pixels in a frame of a video image, the use of intra-frame prediction in video coding and decoding technology can eliminate the spatial redundancy between adjacent pixels; There is also a strong similarity between frames. In the video coding and decoding technology, the inter-frame prediction method is used to eliminate the temporal redundancy between adjacent frames, thereby improving the coding and decoding efficiency.
- the basic process of a video codec is as follows: at the encoding end, a frame of image is divided into blocks, intra-frame prediction or inter-frame prediction is used for the current block to generate the prediction block of the current block, and the original block of the current block is subtracted from the prediction block to obtain the residual. Difference block, transform and quantize the residual block to obtain a quantized coefficient matrix, perform entropy encoding on the quantized coefficient matrix and output it to the code stream.
- intra-frame prediction or inter-frame prediction for the current block to generate the prediction block of the current block.
- decode the code stream to obtain a quantized coefficient matrix, and perform inverse quantization and inverse transformation on the quantized coefficient matrix to obtain a residual block.
- the block and residual block are added to obtain the reconstructed block.
- the reconstructed blocks form a reconstructed image, and the decoded image is obtained by performing loop filtering on the reconstructed image based on the image or based on the block.
- the encoding side also needs a similar operation to the decoding side to obtain the decoded image.
- the decoded image can be used as a reference frame for inter-frame prediction for subsequent frames.
- the block division information determined by the coding end, mode information such as prediction, transformation, quantization, entropy coding, and loop filtering, or parameter information should be output to the code stream if necessary.
- the decoding end determines the same block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information as the encoding end through analysis and analysis according to the existing information, so as to ensure the decoded image and decoded image obtained by the encoding end.
- the decoded image obtained by the terminal is the same.
- the decoded image obtained by the encoding end is usually also called the reconstructed image.
- the current block may be divided into prediction units during prediction, and the current block may be divided into transformation units during transformation, and the division of prediction units and transformation units may be different.
- the current block may be a current coding unit (CU) or a current prediction unit (PU), or the like.
- Inter prediction uses information from a decoded or reconstructed image, or reference frame, to predict the current block.
- Inter prediction uses motion information to find a reference block from a reference frame, and generates a prediction block from the reference block.
- the motion information includes the reference frame list where the reference frame is located, the reference frame index, and the motion vector.
- the motion vector can be of whole pixel or sub-pixel. If the motion vector is sub-pixel, then it is necessary to use interpolation filtering in the reference frame to make the required sub-pixel block.
- the reference frame found according to the motion vector is used.
- the whole pixel or sub-pixel block is called the reference block.
- the reference block is directly used as the prediction block, and some technologies are processed on the basis of the reference block to generate the prediction block. Reprocessing to generate a prediction block on the basis of the reference block can also be understood as taking the reference block as a prediction block and then processing it on the basis of the prediction block to generate a new prediction block.
- VVC Versatile Video Coding
- GPM Geometric Partitioning Mode
- AVS Angular Weighted prediction mode
- the traditional unidirectional prediction just finds a reference block with the same size as the current block
- the traditional bidirectional prediction uses two reference blocks with the same size as the current block
- the pixel value of each point in the predicted block is The average value of the corresponding positions of the two reference blocks, that is, all points of each reference block account for 50% of the ratio.
- Bidirectional weighted prediction enables two reference blocks to have different proportions, such as 75% of all points in the first reference block and 25% of all points in the second reference block. But all points in the same reference block have the same scale.
- Some other optimization methods such as Decoder side Motion Vector Refinement (DMVR) technology, Bi-directional Optical Flow (BIO), etc., will cause some changes in reference pixels or predicted pixels, and GPM or AWP also Use two reference blocks of the same size as the current block, but some pixel positions use 100% of the pixel values of the corresponding positions of the first reference block, some pixel positions 100% use the pixel values of the corresponding positions of the second reference block, and In the boundary area, the pixel values of the corresponding positions of the two reference blocks are used in a certain proportion.
- the weight assignment can be determined by the prediction mode of GPM or AWP.
- FIG. 1 is a schematic diagram 1 of weight allocation. As shown in FIG. 1 , it shows a schematic diagram of weight allocation for multiple division modes of a GPM on a 64 ⁇ 64 current block provided by an embodiment of the present application, wherein , GPM has 64 division modes.
- FIG. 2 is a schematic diagram 2 of weight allocation. As shown in FIG. 2 , it shows a schematic diagram of weight allocation of multiple division modes of an AWP on a 64 ⁇ 64 current block provided by an embodiment of the present application. 56 division modes.
- the black area indicates that the weight value of the corresponding position of the first reference block is 0%
- the white area indicates that the weight value of the corresponding position of the first reference block is 100%
- the gray area indicates that the weight value of the corresponding position of the first reference block is 100%.
- the area indicates that the weight value of the corresponding position of the first reference block is greater than 0% and less than 100% according to the different shades of color, and the weight value of the corresponding position of the second reference block is 100% minus the first weight value.
- the weight value of the corresponding position of each reference block is Whether it is in Figure 1 or Figure 2, in each division mode, the black area indicates that the weight value of the corresponding position of the first reference block is 0%
- the white area indicates that the weight value of the corresponding position of the first reference block is 100%
- the gray area indicates that the weight value of the corresponding position of the first reference block is 100%.
- the area indicates that the weight value of the corresponding position of the first reference block is greater than 0% and less than 100% according to the different shades
- the weights are derived in different ways for GPM and AWP.
- GPM determines the angle and offset according to each mode, and then calculates the weight matrix for each mode.
- AWP first makes a one-dimensional weighted line, and then uses a method similar to intra-frame angle prediction to fill the entire matrix with the one-dimensional weighted line.
- GPM and AWP both achieve the predicted non-rectangular division effect without division.
- GPM and AWP use a mask of the weights of the two reference blocks, the aforementioned weight map. This mask determines the weight of the two reference blocks when generating the prediction block, and the blending area is weighted with the corresponding positions of the two reference blocks, thus making the transition smoother.
- GPM and AWP do not divide the current block into two CUs or PUs according to the dividing line, so the transform, quantization, inverse transform, and inverse quantization of the residual after prediction are also processed by the current block as a whole.
- the motion information used by the current block can be saved.
- Subsequent coded blocks of the current frame may use motion information of previously coded blocks (eg, adjacent blocks) according to the adjacent positional relationship. This takes advantage of the correlation in the spatial domain, so this encoded and decoded motion information is called motion information in the spatial domain.
- the motion information used by each block of the current frame can be saved.
- the subsequent coded frame can use the motion information of the previous coded frame according to the reference relationship. This utilizes the correlation in the time domain, so the motion information of the encoded and decoded frame is called the motion information in the time domain.
- the storage method of the motion information used by each block of the current frame usually takes a fixed-size matrix, such as a 4 ⁇ 4 matrix, as a minimum unit, and each minimum unit stores a set of motion information separately.
- a fixed-size matrix such as a 4 ⁇ 4 matrix
- each minimum unit stores a set of motion information separately.
- the minimum units corresponding to its position can store the motion information of the block.
- the motion information in the space domain or the motion information in the time domain is used, the motion information corresponding to the position can be directly found according to the position. If a 16x16 block uses traditional unidirectional prediction, then all 4x4 minimum units corresponding to this block store the motion information of this unidirectional prediction.
- a block uses GPM or AWP, then all the minimum units corresponding to this block will determine each minimum unit according to the mode of GPM or AWP, the first motion information, and the second motion information and the position of each minimum unit Stored athletic information.
- One method is that if all the 4 ⁇ 4 pixels corresponding to a minimum unit come from the first motion information, then this minimum unit stores the first motion information, if all the 4 ⁇ 4 pixels corresponding to a minimum unit come from the first motion information. two motion information, then this minimum unit stores the second motion information.
- AWP will select one of the motion information for storage; GPM’s approach is that if the two motion information point to different The reference frame list, then combine them into bidirectional motion information storage, otherwise only store the second motion information.
- GPM or AWP belongs to an inter-frame prediction technology, and GPM or AWP needs to transmit a flag (flag) whether GPM or AWP is used in the code stream, and the flag can indicate whether the current block uses GPM or AWP. If GPM or AWP is used, the encoder needs to transmit the specific mode used in the code stream, that is, one of the 64 division modes of GPM, or one of the 56 division modes of AWP; and two index values of unidirectional motion information. That is to say, for the current block, the decoder can obtain information on whether GPM or AWP is used by decoding the code stream.
- the decoder can parse out the prediction mode parameters of GPM or AWP and two motion information.
- the index value for example, the current block can be divided into two partitions, then the first index value corresponding to the first partition and the second index value corresponding to the second partition can be parsed.
- the prediction mode parameters under GPM will be transmitted in the code stream, such as the specific division mode of GPM; under normal circumstances, GPM includes 64 division modes.
- the prediction mode parameters under the AWP will be transmitted in the code stream, such as the specific division mode of the AWP; under normal circumstances, the AWP includes 56 division modes.
- the current implementation is to construct a unidirectional motion information candidate list by using the relevant information of the coded/decoded part before the current block on the encoder side, select unidirectional motion information from the unidirectional motion information candidate list, and combine the two unidirectional motion information. Write the code stream to the index value (index) of the motion information in the unidirectional motion information candidate list.
- a unidirectional motion information candidate list is constructed by using the relevant information of the decoded part before the current block.
- This unidirectional motion information candidate list must be the same as the candidate list constructed by the encoder side. In this way, the index values of the two unidirectional motion information are parsed from the code stream, and then the two unidirectional motion information are found from the unidirectional motion information candidate list, which are the two unidirectional motion information that the current block needs to use.
- the unidirectional motion information described in this application may include: motion vector information, that is, the value of (x, y), and corresponding reference frame information, that is, the reference frame list and the reference frame index in the reference frame list value.
- motion vector information that is, the value of (x, y)
- reference frame information that is, the reference frame list and the reference frame index in the reference frame list value.
- One representation is to record the reference frame index values of two reference frame lists, where the reference frame index value corresponding to one reference frame list is valid, such as 0, 1, 2, etc.; the reference frame index value corresponding to the other reference frame list is Invalid, i.e. -1.
- the reference frame list with a valid reference frame index value is the reference frame list used by the motion information of the current block, and a corresponding reference frame can be found from the reference frame list according to the reference frame index value.
- Each reference frame list has a corresponding motion vector, the motion vector corresponding to the valid reference frame list is valid, and the motion vector corresponding to the invalid reference frame list is invalid.
- the decoder can find the required reference frame through the reference frame information in the unidirectional motion information, and can find the reference block in the reference frame according to the position of the current block and the value of the motion vector (x, y), and then determine the current block.
- the inter-frame prediction value can be found the required reference frame through the reference frame information in the unidirectional motion information, and can find the reference block in the reference frame according to the position of the current block and the value of the motion vector (x, y), and then determine the current block.
- the inter-frame prediction value can be found from the required reference frame through the reference frame information in the unidirectional motion information, and can find the reference block in the reference frame according to the position of the current block and the value of the motion vector (x, y), and then determine the current block.
- the intra-frame prediction method uses the encoded and decoded reconstructed pixels around the current block as reference pixels to predict the current block.
- Figure 3 is a schematic diagram of intra prediction. As shown in Figure 3, the size of the current block is 4 ⁇ 4, and the pixels in the left row and the upper column of the current block are the reference pixels of the current block. Make predictions. These reference pixels may already be all available, ie all already coded and decoded. Some parts may not be available. For example, if the current block is the leftmost part of the whole frame, the reference pixels to the left of the current block are not available. Or when the current block is encoded and decoded, the lower left part of the current block has not been encoded or decoded, so the reference pixels at the lower left are also unavailable. For cases where reference pixels are not available, the available reference pixels or some value or some method can be used for padding, or no padding is performed.
- the multiple reference line intra-prediction method can use more reference pixels to improve encoding and decoding efficiency, for example, using 4 reference lines/columns for the current block reference pixel.
- intra-frame prediction for a 4 ⁇ 4 block mainly includes 9 modes. Among them, mode 0 can copy the pixels above the current block to the current block in the vertical direction as the predicted value, mode 1 can copy the reference pixel on the left to the current block in the horizontal direction as the predicted value, and mode 2 The average value of the points is used as the predicted value of all points. Modes 3 to 8 can copy the reference pixel to the corresponding position of the current block at a certain angle, because some positions in the current block cannot exactly correspond to the reference pixel, it may be necessary to use the reference pixel. The weighted average of the pixels, or subpixels of the interpolated reference pixels.
- the intra prediction modes used by HEVC include Planar mode, DC mode and 33 angle modes. There are 35 prediction modes in total.
- the intra-frame modes used by VVC include Planar mode, DC mode and 65 angle modes, a total of 67 prediction modes.
- AVS3 uses a total of 66 prediction modes in DC mode, Planar mode, Bilinear mode and 63 angle modes.
- the multiple intraprediction filter (MIPF) in AVS3 uses different filters to generate predicted values for different block sizes. For pixels at different positions within the same block, one filter is used to generate predicted values for pixels closer to the reference pixel, and another filter is used to generate predicted values for pixels farther from the reference pixel.
- MIPF intraprediction filter
- a technique for filtering predicted pixels, such as intra prediction filter (IPF) in AVS3, can use reference pixels to filter predicted values.
- an intra-frame mode coding technique of the Most Probable Modes List can be used to improve coding and decoding efficiency.
- MPM Most Probable Modes List
- the intra-frame prediction modes of the surrounding coded and decoded blocks and the intra-frame prediction modes derived from the intra-frame prediction modes of the surrounding coded and decoded blocks, such as adjacent modes, as well as some commonly used or high-probability intra-frame predictions Modes, such as DC, Planar, Bilinear modes, etc., form a list of MPMs.
- Intra prediction modes with reference to surrounding coded blocks take advantage of spatial correlation. Because the texture will have a certain continuity in space. MPM can be used as prediction for intra prediction mode. That is, it is considered that the probability of using MPM for the current block is higher than that of not using MPM. Therefore, during binarization, fewer code words will be used for the MPM, thereby saving overhead and improving encoding and decoding efficiency.
- the current intra-frame prediction modes include DC mode, Planar mode, Bilinear mode, etc., they can only handle simple texture prediction; even if there are more and more angle modes, their prediction can only follow a straight line at an angle to proceed. It can be seen that the current intra prediction mode can only handle simple texture prediction. For complex textures, it needs to be divided into smaller blocks during prediction, or encode more residuals, or cause larger distortion.
- an intra prediction method is currently proposed.
- the codec can determine two different prediction blocks of the current block through two different intra prediction modes, and then can combine them through various weight matrices to finally obtain a more accurate prediction. Sophisticated prediction blocks improve prediction accuracy.
- the non-angle prediction modes such as DC mode, Planar mode, PLANE mode, and Bilinear mode is different from that of the angle prediction mode, the non-angle prediction modes each have their own logic. The circuit of the angle prediction mode cannot be easily reused.
- the 2 intra prediction modes When using 2 intra prediction modes for prediction, if the 2 intra prediction modes are serially predicted on the hardware, and then combined according to the weight matrix, the 2 intra prediction modes
- the existing intra-frame prediction circuits can be used for prediction, but the prediction value that is predicted first needs to be stored, and the time of intra-frame weighted combination prediction is significantly higher than the original intra-frame prediction mode that only uses one. The time to make the forecast. If the 2 intra prediction modes are predicted serially on the hardware, the speed of producing the predicted value of the intra-weighted combined prediction is significantly better than the serial implementation. The cost of this is the need for two sets of intra-frame prediction circuits.
- a set of intra-frame prediction circuits needs to be added, and the intra-frame prediction circuits mentioned here perform prediction of the above-mentioned intra-frame non-angle prediction mode and intra-frame angle prediction mode. That is to say, a set of intra-frame prediction circuits must be added.
- the current intra-frame prediction method using two different intra-frame prediction modes can improve the prediction effect to a certain extent.
- the hardware implementation cost will increase. Therefore, simplifying the newly added intra-frame prediction circuit as much as possible can reduce the complexity of intra-frame weighted combined prediction.
- the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine various weight matrices to finally obtain
- more complex prediction blocks can reduce hardware implementation costs, reduce complexity, and implement simple and efficient encoding and decoding methods, thereby improving compression performance.
- the video coding system 10 includes a transformation and quantization unit 101, an intra-frame estimation unit 102, an intra-frame The prediction unit 103, the motion compensation unit 104, the motion estimation unit 105, the inverse transform and inverse quantization unit 106, the filter control analysis unit 107, the filtering unit 108, the encoding unit 109, the decoded image buffer unit 110, etc., wherein the filtering unit 108 can To implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering, the encoding unit 109 can implement header information encoding and context-based Adaptive Binary Arithmatic Coding (CABAC).
- CABAC Adaptive Binary Arithmatic Coding
- a video coding block can be obtained by dividing the coding tree block (Coding Tree Unit, CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is transformed and quantized.
- Unit 101 pairs The video coding block is transformed, including transforming residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce the bit rate;
- the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used for Intra prediction is performed on the video coding block; specifically, the intra prediction unit 102 and the intra prediction unit 103 are used to determine the intra prediction mode to be used to encode the video coding block;
- the motion compensation unit 104 and the motion estimation unit 105 is used to perform inter-predictive encoding of the received video encoding 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 to generate a motion vector.
- the motion vector can estimate the motion of the video coding block, and then the motion compensation unit 104 performs motion compensation based on the motion vector determined by the motion estimation unit 105; after determining the intra prediction mode, the intra prediction unit 103 also For providing the selected intra 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 used for the video Reconstruction of the coding block, reconstructing the residual block in the pixel domain, the reconstructed residual block removing the blocking artifacts by the filter control analysis unit 107 and the filtering unit 108, and then adding the reconstructed residual block to the decoding A predictive block in the frame of the image buffer unit 110 is used to generate a reconstructed video coding block; the coding unit 109 is used for coding various coding parameters and quantized transform coefficients.
- 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 a code stream of the video signal; and the decoded image buffer unit 110 is used to store the reconstructed video coding blocks, for Forecast reference. As the video image coding proceeds, new reconstructed video coding blocks are continuously generated, and these reconstructed video coding blocks are all stored in the decoded image buffer unit 110 .
- the video decoding system 20 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame The prediction unit 203, the motion compensation unit 204, the filtering unit 205, and the decoded image buffering unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering.
- the decoding unit 201 can implement header information decoding and CABAC decoding
- the filtering unit 205 can implement deblocking filtering and SAO filtering.
- the code stream of the video signal is output; the code stream is input into the video decoding system 20, and first passes through the decoding unit 201 to obtain the decoded transform coefficient; Inverse transform and inverse quantization unit 202 processes to generate residual blocks in the pixel domain; intra prediction unit 203 may be used to generate based on the determined intra prediction mode and data from previously decoded blocks of the current frame or picture Prediction data for the current video decoding block; motion compensation unit 204 determines prediction information for the video decoding block by parsing the motion vector and other associated syntax elements, and uses the prediction information to generate predictive information for the video decoding block being decoded block; a decoded video block is formed by summing the residual block from inverse transform and inverse quantization unit 202 and the corresponding predictive block produced by intra prediction unit 203 or motion compensation unit 204; the decoded video signal Video quality may be improved by filtering unit 205 in order to remove blocking artifacts; decoded video blocks are then stored in decoded image buffer unit 206, which stores reference images for subsequent
- the intra-frame prediction method in this embodiment of the present application is mainly applied to the intra-frame prediction unit 103 shown in FIG. 4 and the intra-frame prediction unit 203 shown in FIG. 5 . That is to say, the intra-frame prediction method in the embodiment of the present application can be applied to both a video encoding system and a video decoding system, and can even be applied to a video encoding system and a video decoding system at the same time. There is no specific limitation.
- the “current block” specifically refers to the current coding block in the intra-frame prediction; when the intra-frame prediction method is applied to the intra-frame prediction unit 203, the “current block” specifically refers to the current decoded block in intra prediction.
- FIG. 6 is a schematic diagram 1 of the implementation flow of the intra-frame prediction method.
- the method for performing intra-frame prediction by the decoder may include the following step:
- Step 101 Decode the code stream, and determine the intra prediction mode parameter of the current block.
- the decoder may determine the intra prediction mode parameter of the current block by decoding the code stream.
- the intra prediction mode parameter may indicate whether the current block can use the intra weighted combined prediction (intra weighted combined prediction, IWCP) mode, that is, whether the current block can use two different
- IWCP intra weighted combined prediction
- the intra prediction mode parameter can be understood as a flag indicating whether the IWCP mode is used.
- the decoder decodes the code stream, and can determine a variable as the parameter of the intra-frame prediction mode, so that the determination of the parameter of the intra-frame prediction mode can be realized by the value of the variable.
- the IWCP mode is an intra-frame prediction method, and specifically, the IWCP mode is to determine two different intra-frame angle prediction modes for the current block, and then according to the two different The intra-frame angle prediction mode of , determines two prediction blocks, then a weight matrix can be determined, and the two prediction blocks are combined according to the weight matrix, and finally a new prediction block can be obtained, that is, the prediction block of the current block can be obtained.
- FIG. 7 is a schematic diagram of the IWCP mode.
- the intra angle prediction mode 1 (the first intra prediction mode) can be used to determine the first prediction block of the current block, and at the same time Use the intra-frame angle prediction mode 2 (second intra-frame prediction mode) to determine the second prediction block of the current block, and then use the weight matrix to combine the first prediction block and the second prediction block, and finally obtain a new prediction block .
- the intra angle prediction mode 1 the first intra prediction mode
- second intra-frame prediction mode second intra-frame prediction mode
- a video image may be divided into multiple image blocks, and the current block is each image block currently to be encoded, which may be called a coding block (Coding Block, CB).
- each coding block may include a first image component, a second image component, and a third image component.
- the first intra-frame prediction is performed, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the coding block to be predicted can be called a luminance block; or, it is assumed that The second intra-frame prediction is performed, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the coding block to be predicted may be called a chrominance block.
- the size of the current block may be limited.
- the intra-frame prediction method proposed in the embodiment of the present application needs to use two different intra-frame angle prediction modes to generate two prediction blocks, and then perform weighting according to the weight matrix to obtain a new prediction block, in order to reduce the complexity of
- the IWCP mode may be restricted from not using this IWCP mode for prediction blocks of some sizes. Therefore, in this application, the decoder can first determine the size parameter of the current block, and then determine whether the current block uses the IWCP mode according to the size parameter.
- the size parameter of the current block may include the height and width of the current block. Therefore, the decoder may use the height and width of the current block to limit the use of the IWCP mode, that is, limit the use of the IWCP mode. The size of the prediction block in IWCP mode.
- both the width and the height are greater than or equal to the first lower limit value, and at the same time, both the width and the height are less than or equal to the first upper limit value, then it can be determined that the current block uses the IWCP mode. It can be seen that a possible restriction is to use only when the width and height of the predicted block are less than (or less than or equal to) the first upper limit value, and the width and height of the predicted block are greater than (or greater than or equal to) the first lower limit value. IWCP mode. Wherein, the first lower limit value may be 8, and the value of the first upper limit value may be 16 or 32 or the like.
- intra-frame frames such as I frames
- inter-frame frames such as B frames and P frames
- the intra-frame does not use the IWCP mode
- the inter-frame uses the IWCP mode.
- some inter-frames can be configured to use the IWCP mode, and some inter-frames do not use the IWCP mode.
- Inter-frames can also use intra-frame prediction, so it is also possible for inter-frames to use IWCP mode.
- a flag below the frame level and above the CU level (such as tile, slice, patch, LCU, etc.) to determine whether this area uses the IWCP mode.
- Step 102 When the intra prediction mode parameter indicates that the current block uses the IWCP mode to determine the intra prediction value of the current block, determine the first mode index and the second mode index of the current block.
- the decoder may further determine the current block The first mode index and second mode index of the block.
- the first mode index is used to indicate the first intra prediction mode used by the current block
- the second mode index may be used to indicate the second intra prediction mode of the current block. to instruct.
- the value of the first mode index and the value of the second mode index are related to the number of intra-frame angle prediction modes that may exist in the first intra-frame prediction mode and the second intra-frame prediction mode, for example, the first intra-frame prediction mode
- the prediction mode and the second intra-frame prediction mode may be one of the 28 intra-frame angle prediction modes with mode numbers 4-31, respectively, then the value of the first mode index and the value of the second mode index both belong to the range 0 ⁇ 27.
- the parameter iwcp_pred_mode0_index may be used to represent the first mode index
- the parameter iwcp_pred_mode1_index may be used to represent the second mode index
- Step 103 Build the MPM list of the current block.
- the decoder may also construct the MPM list of the current block.
- the prediction modes in the MPM list are all intra-angle prediction modes.
- the decoder when constructing the MPM list of the current block, the decoder needs to first determine the weight matrix derivation mode of the current block, and then use the weight matrix derivation mode to further determine the MPM list of the current block.
- the weight matrix derivation mode is used to determine the weight matrix used by the current block.
- the weight matrix derivation mode may be a mode of deriving the weight matrix.
- each weight matrix derivation mode can derive a weight matrix; for a prediction block of the same size, different weight matrix derivation modes derive different weight matrices.
- the AWP of AVS3 has 56 weight matrix derivation modes
- the GPM of VVC has 64 weight matrix derivation modes.
- the decoder when constructing the MPM list of the current block, may construct the MPM list directly based on the prediction mode and the weight matrix derivation mode of the adjacent blocks of the current block.
- the decoder when constructing the MPM list of the current block, may also construct the MPM list based on the prediction mode, the preset angle prediction mode set and the weight matrix derivation mode of neighboring blocks of the current block.
- the preset angle prediction mode set may be a subset of all intra-frame angle prediction modes. Taking AVS3 as an example, the preset angle prediction mode set may only include 28 intra angle prediction modes with mode numbers 4-31.
- the preset angle prediction mode set may be a combination of all intra angle prediction modes; if necessary The range of the first intra-frame prediction mode and the second intra-frame prediction mode is limited, then the preset angle prediction mode set can be only a combination of some intra-frame angle prediction modes, and the preset angle prediction mode set can be used for The range of the first intra-frame prediction mode and the second intra-frame prediction mode is limited, thereby effectively reducing overhead and improving compression performance.
- the decoder can use the prediction mode of the adjacent block when constructing the MPM list based on the intra prediction mode, the preset angle prediction mode set and the weight matrix derivation mode of the adjacent blocks of the current block. determining the first candidate mode; determining the second candidate mode by using the weight matrix derivation mode; further constructing the MPM list of the current block according to the first candidate mode, the second candidate mode and the set of preset angle prediction modes.
- the decoder determines the first candidate mode by using the prediction mode of the adjacent block, if the adjacent block is an ordinary intra prediction block, and the prediction mode of the adjacent block is the intra prediction mode, then The prediction mode of the adjacent block is determined as the first candidate mode.
- a common intra prediction block refers to a prediction block using prediction modes such as DC mode, Planar mode, Bilinear mode, and angle prediction mode, rather than using intra block copy (IBC).
- Prediction blocks for prediction modes such as string copy intra prediction intra string copy prediction.
- Fig. 8 is a schematic diagram of adjacent blocks. As shown in Fig. 8, the current block is E, where (x0, y0) is the coordinates of the upper left corner sample of block E in the image, and (x1, y0) is the upper right corner sample of block E at The coordinates in the image, (x0, y1) are the coordinates of the bottom left sample of block E in the image.
- the neighboring block A of the current block E is the block where the sample (x0-1, y0) is located
- the neighboring block B of the current block E is the block where the sample (x0, y0-1) is located
- the neighboring block C of the current block E is is the block where the sample (x1+1, y0-1) is located
- the adjacent block D of the current block E is the block where the sample (x0-1, y0-1) is located
- the adjacent block F of the block E is the sample (x0- 1, y1)
- the adjacent block G of block E is the block where the sample (x1, y0-1) is located.
- the spatial positional relationship between the current block E and its adjacent blocks A, B, C, and D is shown in FIG. 8 .
- the decoder can also use the adjacent blocks to the right and the lower of the current block.
- the decoder when the decoder uses the weight matrix derivation mode to determine the second candidate mode, it can first determine the dividing line angle index value according to the weight matrix derivation mode; and then can use the dividing line angle index value to determine the second candidate mode .
- the second candidate mode is L different intra-frame angle prediction modes, so that the construction of an MPM list of length L can be ensured.
- the position of the weight change constitutes a straight line, or, in the case that the weight matrix has multiple weights, the transition region has the same weight.
- the positions form a straight line, which can be called the dividing line. You can set the horizontal right angle to 0, and the angle increases counterclockwise. Then the dividing line may be horizontal 0 degrees, vertical 90 degrees, inclined such as 45 degrees, 135 degrees, and various other angles.
- the corresponding texture is likely to show different characteristics on both sides of the dividing line, such as two textures with different angles on both sides of the dividing line, or one side of the dividing line is an angle texture, while the other side is a relatively flat texture. Since the dividing line itself is also angled, it can be assumed that a point is obtained by intra-frame angle prediction, and it may be close to some textures of the current block, so this line and the two intra-frame prediction modes of the current block are There is a correlation.
- the boundary line is obtained from a point through intra-frame angle prediction, then at least one intra-frame angle prediction mode can be found, and this intra-frame angle prediction mode can approximate the boundary line.
- the horizontal dividing line matches the horizontal intra prediction mode, such as mode 24 in AVS3;
- the vertical dividing line matches the vertical intra prediction mode, such as mode 12 in AVS3;
- the boundary line can match the intra prediction mode of 45 degrees from the lower left to the upper right, such as mode 30 in AVS3; it can also match the intra prediction mode of 225 degrees from the upper right to the lower left, such as mode 6 in AVS3.
- weight matrix derivation mode can be matched to some intra prediction modes, so the weight matrix derivation mode can be used to assist the decoding of the intra prediction mode.
- the weight matrix derivation mode may also be an index of the weight matrix, for example, the 56 modes of AWP can be regarded as 56 weight matrix derivation modes.
- a mapping relationship table may be constructed to further represent the mapping relationship between the weight matrix derivation mode and the intra angle prediction mode.
- the boundary lines of multiple modes of AWP and GPM are all the same angle, for example, the angle of the boundary line of AWP of AVS3 is the same every 8 modes.
- the index of the dividing line angle can be obtained from the mode number modulo 8 (%8) of the weight matrix derived mode.
- Table 1 is a mapping relationship table.
- the indexes 0 and 1 of the dividing line angle can respectively correspond to two intra-frame angle prediction modes, one from the upper right corner to the lower left corner, and the other from the upper left corner to the upper left corner. bottom right.
- another approximately corresponding intra-frame angle prediction mode may be found for indices of other boundary angles, or all indices of boundary angles correspond to only one intra-frame angle prediction mode.
- some intra-angle prediction modes related to it are also more likely to be used. For example, an angle close to the dividing line, or an angle perpendicular to the dividing line, etc. corresponds to an intra-frame angle prediction mode.
- the decoder may utilize the correlation of the weight matrix with the intra angle prediction modes to construct an MPM list of intra weighted combined prediction modes. For example, when constructing an MPM list of intra-frame weighted combined prediction modes, if the list length of the MPM list is 4, the candidate modes corresponding to the boundary angle indices in Table 2 below may be added to the MPM list.
- the number of candidate modes corresponding to the index of each boundary angle is equal to the length of the MPM list, which can ensure that even if all the intra prediction modes of the referenced adjacent blocks are unavailable. Fill up the MPM list. If the length of the MPM list is 4, the number of candidate modes corresponding to the index of each boundary angle can be set to 4.
- the decoder when constructing the MPM list according to the first candidate mode, the second candidate mode and the preset angle prediction mode set, the decoder may also screen the first candidate mode based on the preset angle prediction mode set. processing, to obtain the candidate pattern after screening; construct the MPM list according to the candidate pattern after screening and the second candidate pattern.
- the decoder when the decoder performs screening processing on the first candidate mode based on the preset angle prediction mode set and obtains the candidate mode after screening, if the first candidate mode belongs to the preset angle prediction mode set, the first candidate mode is selected.
- a candidate mode is determined as a candidate mode after screening; if the first candidate mode is an intra-angle prediction mode and does not belong to a preset angle prediction mode set, then a replacement mode of the first candidate mode is determined in the preset angle prediction mode set, and Identify replacement patterns as post-screening candidate patterns.
- the decoder can directly delete the first candidate mode.
- the preset angle prediction mode set to which the first intra prediction mode and the second intra prediction mode belong is a subset of all intra angle prediction modes, excluding intra frame prediction modes.
- Non-angle prediction mode therefore, for the intra-frame weighted combination prediction mode, the selection of the most probable mode MPM of the current block, that is, the construction method of the MPM list, also needs to be adjusted accordingly.
- the decoder needs to refer to the intra prediction modes of neighboring blocks around the current block when constructing the MPM list. Peripheral adjacent blocks are such as left adjacent block, upper adjacent block, upper left adjacent block, upper right adjacent block, lower left adjacent block and so on. Due to the spatial correlation, a certain prediction mode is used in the surrounding adjacent blocks, and the current block has a higher probability of using the same or similar prediction mode.
- both the first intra-frame prediction mode and the second intra-frame prediction mode of the intra-frame weighted combined prediction mode can only be the intra-frame angle prediction mode
- the decoder does not use the intra-frame non-angle prediction mode used by this reference block when constructing the MPM list of the current block, That is, the intra non-angle prediction mode is not added to the MPM list of the current block.
- the preset angle prediction mode set to which the first intra prediction mode and the second intra prediction mode belong is a subset of all intra angle prediction modes
- the intra prediction mode is an intra angle prediction mode other than the preset angle prediction mode set, that is, the first candidate mode is the intra angle prediction mode and does not belong to the preset angle prediction mode set
- the decoder is constructing the current block.
- the intra angle prediction mode outside the preset angle prediction mode set can be converted into an intra angle prediction mode within the preset angle prediction mode set with a similar angle, and then added to the MPM list.
- Intra-frame angle prediction mode No. 12 the decoder can add the intra-frame angle prediction No. 12 similar to the intra-frame angle prediction No. 43 to the MPM list of the current block in the intra-frame weighted combined prediction mode.
- the decoder constructs the MPM list according to the candidate mode after screening and the second candidate mode, if the candidate mode after screening satisfies the preset addition condition, the candidate mode after screening is added to the MPM. list; if the MPM list does not meet the preset list length L, and the second candidate mode satisfies the preset addition condition, add the second candidate mode to the MPM list; where L is an integer greater than or equal to 1.
- the value of L may be 4, that is, the preset list length of the MPM list is 4, or in other words, the MPM list includes 4 most probable patterns.
- the decoder may sort the L modes in the MPM list in ascending order of mode numbers.
- the decoder can determine that the candidate mode after screening satisfies the preset addition condition; If the candidate mode is different from the prediction mode in the MPM list, the decoder can determine that the second candidate mode satisfies the preset addition condition.
- the decoder can determine the sequence parameter corresponding to the adjacent block when adding the filtered candidate mode corresponding to the adjacent block to the MPM list;
- the post-filtered candidate mode corresponding to the block is added to the MPM list.
- the decoder can determine the corresponding order parameter according to the spatial distance between the adjacent block and the current block. For example, the closer the spatial distance between the adjacent block and the current block, the stronger the correlation between the two, the earlier the The addition processing is performed, that is, the smaller the order parameter is; the further the spatial distance between the adjacent block and the current block, the weaker the correlation between the two, and the later the addition processing is performed, that is, the larger the order parameter is.
- the decoder may also perform a sequence of mode numbers from small to large in the MPM list.
- the L prediction modes are sorted.
- the MPM list of the current block in the intra-frame weighted combined prediction mode is IwcpMpm[4], that is, the list length of the MPM list is 4, the index of the weight matrix derivation mode is IwcpIndex, and the weight matrix is derived.
- the mode multiplexes the 56 derivation modes of the AWP, and the preset angle prediction mode set to which the first intra prediction mode and the second intra prediction mode belong are the intra angle prediction modes No. 4-31. Then the decoder can perform the following steps in sequence when constructing the MPM list of the current block:
- Step S1 set the array cand_mode[10], and all values of cand_mode are initialized to invalid values. Do the following for cand_mode:
- cand_mode[3] is equal to the intra-frame prediction mode of A
- cand_mode[4] is equal to the intra prediction mode of B
- the adjacent block X (X is A, B, C, D, F or G) "exists" means that the block should be within the image and the block should belong to the same slice as block E; otherwise the adjacent block "does not exist” . If the block "does not exist” or has not been decoded, the block is "unavailable”; otherwise the block is "available”. If the block in which the image sample is located is "not present” or the sample has not been decoded, the sample is "unavailable”; otherwise the sample is "available”.
- the execution steps of (a) to (f) above are the process of determining the first candidate mode; the execution steps of (g) to (j) are the determination of the second candidate mode.
- the flow, wherein, the decoder may refer to the above Table 2 to determine the second candidate mode.
- Step S2 for i from 0 to 5, perform the following operations:
- the decoder can directly delete the first candidate mode, that is, not use the first candidate mode.
- the decoder can select a similar intra-angle prediction mode from the preset angle prediction mode set pattern as a replacement pattern for the first candidate pattern, and then this replacement pattern as a filtered candidate pattern.
- the decoder can directly use the first candidate mode, that is, the first candidate mode is the filtered candidate mode.
- step S2 is the screening process of the first candidate mode, and a post-screening candidate mode corresponding to the first candidate mode is finally determined.
- Step S3 record mpm_num as 0, and perform the following operations for i from 0 to 9:
- the decoder can add the candidate mode after screening to the MPM list. If all the post-screening candidate modes that meet the preset addition conditions are added to the MPM list, and the prediction modes in the MPM list are less than 4, the decoder can continue to add the second candidate modes that meet the preset addition conditions to the MPM list. , until the list length of the MPM list reaches 4.
- Step S4 sort the four numbers of IwcpMpm[4] in ascending order.
- the decoder may sort the 4 intra-angle prediction modes in the MPM list in ascending order of mode numbers.
- the present application does not limit the execution order of the above steps 102 and 103, that is, does not limit the sequence between the process of determining the first mode index and the second mode index and the process of constructing the MPM list.
- Step 104 Determine the first intra prediction mode and the second intra prediction mode of the current block according to the first mode index, the second mode index and the MPM list; wherein, the first intra prediction mode and the second intra prediction mode are: Two different intra-angle prediction modes.
- the decoder after the decoder determines the first mode index and the second mode index of the current block and completes the construction of the MPM list of the current block, the decoder can further use the first mode index, the second mode index and the The MPM list determines the first intra prediction mode and the second intra prediction mode of the current block.
- the first intra-frame prediction mode and the second intra-frame prediction mode may be two different intra-frame angle prediction modes.
- the first intra-frame prediction mode and the second intra-frame prediction mode may be respectively two different intra-frame angle prediction modes in the preset angle prediction mode set.
- both the first intra-frame prediction mode and the second intra-frame prediction mode can only be intra-frame angle prediction modes, that is, neither the first intra-frame prediction mode nor the second intra-frame prediction mode is a division
- Other basic intra-frame prediction modes other than the intra-frame angle prediction mode such as intra-frame non-angle prediction modes, including DC mode, Planar mode, PLANE mode, Bilinear mode, PCM mode, etc.
- the basic intra-frame prediction modes include, but are not limited to, an angular prediction mode and a non-angular prediction mode. Such as 67 intra prediction modes used by VVC and 66 intra prediction modes used by AVS3.
- the restriction of the intra-frame angle prediction mode on the first intra-frame prediction mode and the second intra-frame prediction mode can reduce the hardware implementation complexity of the intra-frame weighted combination prediction mode on the one hand, because When the hardware implements the intra-frame weighted combination prediction mode in a parallel manner, only a set of circuits that support the intra-frame angle weighted prediction need to be added;
- the non-angle prediction mode usually deals with scenes with relatively uniform texture changes, and there are fewer modes that can be used to reduce overhead. Therefore, the intra-frame weighted combined prediction mode or not using the intra-frame non-angle prediction mode has little effect on compression performance.
- the decoder may limit the available intra-angle prediction modes for the first intra-frame prediction mode and the second intra-frame prediction mode using a preset angle prediction mode set, wherein the preset angle prediction mode set is all intra-frame angles A subset of prediction modes.
- AVS3 has 62 angle modes, that is, intra-frame angle prediction modes with mode numbers 3-32 and 34-65.
- the first intra-frame prediction mode and the second intra-frame prediction mode may only use the intra-frame angle prediction modes whose mode numbers are 3-32, or the first intra-frame prediction mode and the second frame.
- the intra prediction mode may use only 28 intra angle prediction modes with mode numbers 4-31.
- the first intra-frame prediction mode and the second intra-frame prediction mode may only use the intra-frame angle prediction mode whose mode number is an even number, or the first intra-frame prediction mode and The second intra prediction mode may use only intra angle prediction modes whose mode numbers are odd.
- the angle prediction mode set used by the first intra prediction mode and the angle prediction mode set used by the second intra prediction mode are different.
- the decoder can use the same preset angle prediction mode set to limit the first intra prediction mode and the second intra prediction mode, that is, if the first intra prediction mode can only use the mode number 4- 28 intra-frame angle prediction modes of 31, the second intra-frame prediction mode can also only use the 28 intra-frame angle prediction modes with mode numbers 4-31, and then the first intra-frame prediction mode and the second intra-frame prediction mode. You can use the same MPM list and use the same or similar codecs.
- the decoder restricts the first intra prediction mode and the second intra prediction mode using different preset angle prediction mode sets, then the first intra prediction mode and the second intra prediction mode need to be restricted. Use a different MPM list or use a significantly different codec.
- the decoder may determine a first mapping relationship table between the index value and the binary symbol string; wherein, the first mapping relationship table includes the first length, the second length and the third length respectively The binary string of symbols.
- the first length is 3 bits
- the second length is 5 bits
- the third length is 6 bits.
- the first mapping relationship table between the index value and the binary symbol string may be used to determine the values of the first mode index and the second mode index.
- the preset angle prediction mode set includes a total of 28 modes
- 4+8+ can be used.
- 16 form encoding that is, a pattern of 4 shortest codewords, a pattern of 8 shorter codewords, and a pattern of 16 longer codewords.
- the mode of 4 shortest codewords uses 3-bit codewords, that is, the first length is used
- the mode of 8 shorter codewords uses 5-bit codewords, that is, the second length is used, that is, the mode of 16 longer codewords
- a 6-bit codeword is used, that is, the third length is used.
- the prediction angles using the 28 intra-frame angle prediction modes with mode numbers 4-31 basically cover the entire commonly used angle range, and at the same time, the mode numbers are 4-31 intra-frame angle prediction
- the mode is simpler than the intra-angle prediction mode with mode numbers 34-65, and using these 28 modes to encode in the form of 4+8+16 will not cause waste of code words, so the decoder can preferably follow the mode number 4.
- the 28 intra-angle prediction modes of -31 define a set of preset angle prediction modes.
- the 4 most probable patterns in the MPM list can correspond to the binary symbol string using the first length, that is, the 4 shortest codes.
- the word mode can be used for 4 MPMs in the MPM list; correspondingly, other prediction modes in the preset angle prediction mode set other than the MPM list can use the binary symbol string of the second length and the binary symbol of the third length respectively. string of symbols.
- the decoder may The patterns of the words are evenly distributed. Specifically, the decoder may evenly distribute the modes of the 8 shorter codewords (binary symbol strings of the second length) among the remaining 24 intra-angle prediction modes. For example, a pattern of 1 shorter codeword (binary symbol string of second length) is used for every pattern of 2 longer codewords (binary symbol string of third length). Furthermore, in the specific execution process, it can be realized by the sequence number modulo 3 (%3) from 0-23 in the remaining 24 intra-frame angle prediction modes. The binary symbol string of the second length is used, and the serial number modulo 3 is 0 or 1 to use a 6-bit codeword, that is, the binary symbol string of the third length is used.
- a mapping relationship table may be as shown in Table 3, wherein the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits.
- the first bit can be used to indicate whether it is MPM, for example, "1" indicates that it is MPM, and "0" indicates that it is not MPM. If the first intra prediction mode is MPM, assuming that there are 4 MPMs in the MPM list, then 2 bits can be used to indicate which MPM in the MPM list is used, that is, "00, 01, 10, 11" respectively indicate the MPM The first MPM in the list, the second MPM, the third MPM, the fourth MPM.
- the context model is used for decoding the binary symbol string whose bit flag is 0, and the context model is not used for decoding the binary symbol string whose bit flag is not 0.
- the value of the bit flag may indicate how many bits have been decoded, and the bit flag may be represented by binIdx.
- the context model can be used to decode the binary symbol string whose binIdx is 0, while the binary symbol whose binIdx is not 0 can be decoded using the context model. Strings are decoded using an equal probability model or bypass mode.
- the value i of the first mode index may be determined according to the first mapping relationship table between the index value and the binary symbol string; wherein, i is an integer greater than or equal to 0. If i is greater than or equal to 0 and less than L, determine the (i+1)th angle prediction mode in the MPM list as the first intra prediction mode; if i is greater than or equal to L, use the preset The set of angular prediction modes and the MPM list determine the first intra prediction mode.
- the decoder determines the first intra-frame prediction mode by using the preset angle prediction mode set and the MPM list, if i is greater than or equal to the first mode in the MPM list If (i+1) is greater than or equal to the mode number of the second mode in the MPM list, then (i+1) and 1 are summed; If (i+2) is greater than or equal to the mode number of the third mode in the MPM list, perform a sum operation on (i+2) and 1; if (i+3) is greater than or equal to the mode number in the MPM list For the mode number of the fourth mode, perform a sum operation on (i+3) and 1; determine (i+4) as the mode number of the first intra-frame prediction mode, and predict at the preset angle The first intra prediction mode is determined from a mode set.
- the decoder determines the first intra-frame prediction mode by using the preset angle prediction mode set and the MPM list, if i is less than the value of the first mode in the MPM list mode number, then i is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set; or, if (i+1) is less than the mode number of the second mode in the MPM list, then (i+1) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set.
- an intra-frame prediction mode or, if (i+2) is less than the mode number of the third mode in the MPM list, then (i+2) is determined as the mode number of the first intra-frame prediction mode, and determine the first intra-frame prediction mode in the preset angle prediction mode set; or, if (i+3) is less than the mode number of the fourth mode in the MPM list, then (i+3) ) is determined as the mode number of the first intra-frame prediction mode, and the first intra-frame prediction mode is determined in the preset angle prediction mode set.
- the mode numbers of the 4 MPMs in the MPM list are 4, 8, 12, and 16, respectively, based on the first mapping relationship between the index value and the binary symbol string as shown in Table 3 above
- the value i of the first mode index determined by the table is 5, then in the preset angle prediction mode set including 28 intra-frame angle prediction modes with mode numbers 4-31, i is sequentially associated with 4 in the MPM list.
- the value 6 of (i+1) can be determined as the mode number of the first intra prediction mode, and the mode is set in the preset angle prediction mode set.
- the intra-frame angle prediction mode numbered 6 determines the first intra-frame prediction mode.
- the mode numbers of the 4 MPMs in the MPM list are 4, 8, 12, and 16, respectively, based on the first mapping relationship between the index value and the binary symbol string as shown in Table 3 above
- the value i of the first mode index determined by the table is 10, then in the preset angle prediction mode set including 28 intra-frame angle prediction modes whose mode numbers are 4-31, i is sequenced with the 4 in the MPM list.
- the intra-frame angle prediction mode numbered 13 determines the first intra-frame prediction mode.
- the value j of the second mode index may be determined according to the first mapping relationship table; wherein, j is an integer greater than or equal to 0. If j is greater than or equal to 0 and less than L, the (i+1)th angle prediction mode in the MPM list is determined as the first intra-frame prediction mode; if j is greater than or equal to L, the preset is used The set of angular prediction modes and the MPM list determine the first intra prediction mode.
- the decoder determines the second intra-frame prediction mode by using the preset angle prediction mode set and the MPM list, if j is greater than or equal to the first mode in the MPM list If (j+1) is greater than or equal to the mode number of the second mode in the MPM list, then (j+1) and 1 are summed; If (j+2) is greater than or equal to the mode number of the third mode in the MPM list, perform a sum operation on (j+2) and 1; if (j+3) is greater than or equal to the mode number in the MPM list For the mode number of the fourth mode, perform a sum operation on (j+3) and 1; determine (j+4) as the mode number of the second intra-frame prediction mode, and predict at the preset angle The second intra prediction mode is determined from a mode set.
- the decoder determines the second intra prediction mode by using the preset angle prediction mode set and the MPM list, if j is less than the value of the first mode in the MPM list mode number, then determine j as the mode number of the second intra-frame prediction mode, and determine the second intra-frame prediction mode in the preset angle prediction mode set; or, if (j+1) is less than the mode number of the second mode in the MPM list, then (j+1) is determined as the mode number of the second intra prediction mode, and the first prediction mode set is determined in the preset angle prediction mode set.
- the decoder decodes the code stream can determine the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index, and then can derive the first intra prediction mode according to the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index as IwcpPredMode0, and the second intra prediction mode is IwcpPredMode0.
- the prediction mode is IwcpPredMode1.
- the decoder may specifically perform the following operations:
- the binary symbol string can be determined by inverse binarization according to Table 3, that is, a matching binary symbol string can be found from the right column of Table 3 according to iwcp_pred_mode0_index , and then determine the value i of iwcp_pred_mode0_index from the left column of the same row.
- IwcpPredMode0 is equal to IwcpMpm[i].
- the decoder can compare the value i of the first mode index iwcp_pred_mode0_index with the mode number of each angle prediction mode in the MPM list in turn, and select whether to perform an increment operation according to the comparison result, and finally calculate the mode of the first intra prediction mode. number, and determine the first intra prediction mode in the preset angle prediction mode set according to the mode number.
- the decoder may specifically perform the following operations:
- the binary symbol string can be determined by inverse binarization according to Table 3, that is, a matching binary symbol string can be found from the right column of Table 3 according to iwcp_pred_mode1_index , and then determine the value j of iwcp_pred_mode1_index from the left column of the same row.
- IwcpPredMode1 is equal to IwcpMpm[i].
- IwcpPredMode1 is equal to
- the first intra-frame prediction mode and the second intra prediction mode can share a preset angle prediction mode set, and can also share the same MPM list, but the first intra prediction mode and the second intra prediction mode in the intra weighted combined prediction mode are not the same. Therefore, when encoding and decoding the second intra-frame prediction mode, the first intra-frame prediction mode may be referred to. Specifically, when determining the second intra-frame prediction mode, the first intra-frame prediction mode may be excluded.
- the probability of occurrence of 4 MPMs in the MPM list is very high (the first intra-frame angle prediction mode).
- the probability that the prediction mode is one of the 4 MPMs in the MPM list is about 50%, and the probability that the second intra prediction mode is one of the 4 MPMs in the MPM list is about 50%), if the first intra The prediction mode and the second intra-frame prediction mode are both MPMs in the MPM list, so when determining the second intra-frame prediction mode, you can only select from the other 3 MPMs in the MPM list other than the first intra-frame prediction mode One will do.
- the second intra-frame prediction mode can also be removed from the 24 intra-frame angle prediction modes of 8+16. , but this effect is relatively small.
- the MPM After the (i+1)th angle prediction mode in the list is determined to be the first intra prediction mode, when the decoder determines the second intra prediction mode, it can be based on the second mapping between the index value and the binary symbol string
- the relationship table determines the value j of the second mode index; if j is greater than or equal to i, add 1 to j; after performing the self-adding 1 operation, if j is greater than or equal to 0 and less than L, then the MPM list
- the (j+1)th angle prediction mode in is determined as the second intra-frame prediction mode; if j is greater than or equal to L, the second frame is determined by using the preset angle prediction mode set and the MPM list Intra prediction mode.
- the decoder may determine a second mapping relationship table between the index value and the binary symbol string; wherein, the second mapping relationship table includes the first length, the second length, and the third length respectively. and a binary symbol string of the fourth length.
- the first length is 3 bits
- the second length is 5 bits
- the third length is 6 bits
- the fourth length is 2 bits.
- the second mapping relationship table between the index value and the binary symbol string is only used to determine the value of the second mode index.
- the second mapping relationship table between the index value and the binary symbol string may be as shown in Table 4, where the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits. bits, and the fourth length is 2 bits.
- the length of the MPM list is 4, the preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31, the decoder decoding the code stream can determine the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index, and then can According to the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index, the first intra prediction mode is IwcpPredMode0, and the second intra prediction mode is IwcpPredMode1.
- the context model can be used to decode the binary symbol string whose binIdx is 0, while the binary symbol whose binIdx is not 0 can be decoded using the context model. Strings are decoded using an equal probability model or bypass mode.
- the decoder may specifically perform the following operations:
- IwcpPredMode0 is equal to IwcpMpm[i].
- the decoder may specifically perform the following operations:
- i is greater than or equal to 4, de-binarize the binary symbol string according to Table 3, determine the value of iwcp_pred_mode1_index as j, and then perform step 3;
- IwcpPredMode1 is equal to IwcpMpm[i].
- IwcpPredMode1 is equal to
- the value j of iwcp_pred_mode1_index depends on the value i of iwcp_pred_mode0_index.
- the first frame Both the intra prediction mode and the second intra prediction mode are MPMs in the MPM list, so there are only 3 MPMs available for the second intra prediction mode, and then 1 to 2 bits can be used to indicate which MPM is, such as "00 , 01, 10" represent the remaining first MPM, second MPM, and third MPM, respectively. It can be seen that since a possibility is excluded, the encoding and decoding method or the binarization or de-binarization method can be changed to save overhead.
- the preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31, and the length of the MPM list is 4, then when using the first length, When the binary symbol string of the second length and the third length determines the first mapping relationship table between the index value and the binary symbol string, the binary symbol string of the first length can be used for the 4 MPMs in the MPM list first, that is, using The shortest codeword. Next, 8 intra-angle prediction modes are selected from the remaining 24 intra-angle prediction modes to use the binary symbol string of the second length, and 16 intra-angle prediction modes are selected to use the binary symbol string of the third length.
- a shorter codeword can be used for the prediction modes corresponding to the first 8 mode numbers in the order of the mode numbers from small to large, that is, the first A binary symbol string of two lengths, and then a longer codeword is used for the prediction modes corresponding to the next 16 mode numbers, that is, a binary symbol string of a third length is used.
- the first mapping relationship table between the index value and the binary symbol string shown in Table 3 above can be replaced with the following Table 5, wherein the relationship between the index value and the binary symbol string is used to represent the index value and the binary symbol string.
- Table 5 of the first mapping relationship can also be used to determine the values of the first mode index and the second mode index.
- the second mapping relationship table between the index value and the binary symbol string shown in the above Table 4 can also be replaced with the following Table 6, wherein the second mapping relationship between the index value and the binary symbol string is used to represent the index value and the binary symbol string.
- Table 6 may also be used to determine the value of the second mode index.
- the preset angle prediction mode set includes a total of 20 modes, 4 3-bit codewords and 16 5-bit codewords can be used to represent them.
- the preset angle prediction mode set includes a total of 36 modes
- 4 3-bit codewords and 32 6-bit codewords can be used to represent them.
- 36 intra-frame angle prediction modes with mode numbers of 4-31, 42-45, and 56-59 are used.
- code word is understood as a string of binary symbols.
- the length of the codeword can be understood as the length of the binary symbol string.
- Another representation is to use a flag bit (flag) plus a binary symbol string.
- a binary MPM_flag is used to indicate whether the current mode is MPM mode, that is, if MPM_flag is 1, it means that the current mode is MPM mode, if MPM_flag is 0, it means that the current mode is not MPM mode, and if the current mode is MPM mode, there are a total of 4 possibilities for MPM.
- a 2-bit binary symbol string to indicate which MPM the current mode is. Then the code word can be understood as the flag bit plus the binary symbol string, and the length of the code word can be understood as the length of the flag bit plus the binary symbol string.
- Step 105 Determine the weight matrix of the current block, and determine the predicted value of the current block based on the first intra prediction mode, the second intra prediction mode and the weight matrix.
- the decoder needs to determine the weight matrix of the current block, so that after determining the first intra prediction mode and the second intra prediction mode used by the current block, the decoder also determines the weight matrix based on the first intra prediction mode, The second intra prediction mode and the weight matrix further determine the prediction value of the current block.
- the decoder may determine the weight matrix of the current block according to the weight matrix derivation mode of the current block.
- the decoder when determining the predicted value of the current block based on the first intra prediction mode, the second intra prediction mode and the weight matrix, the decoder may first determine the predicted value of the current block according to the The first intra-frame prediction mode determines the first prediction value of the current block; the second prediction value of the current block is determined according to the second intra-frame prediction mode; and then the weight matrix is used for the first prediction value A weighted operation is performed with the second predicted value to obtain the predicted value of the current block.
- the first intra-frame prediction mode and the second intra-frame prediction mode may both be intra-frame angle prediction modes, that is, two different intra-frame angle prediction modes are used in this embodiment of the present application. Then use the combination of the first intra prediction mode and the second intra prediction mode to generate the first prediction block and the second prediction block respectively, and then determine the prediction of the current block based on the first prediction block and the second prediction block, combined with the weight matrix piece.
- not all points in all possible weight matrices have the same weight.
- at least one possible weight matrix contains at least two different weight values.
- the decoder may adopt a method similar to GPM or AWP to realize the determination of the weight matrix. Specifically, if GPM or AWP is used in the same codec standard or codec, this method can be used to determine the weight matrix, so that the same logic in the multiplexing part can be achieved. If AWP is used in AVS3 inter-frame prediction, the AWP method can be used to determine the weight matrix in AVS3. Of course, different methods from GPM or AWP in the same codec standard or codec can also be used, such as using different mode numbers, or different transition region algorithms, or using different parameters.
- inter-frame prediction exploits the correlation in the temporal domain, it uses the reconstructed image in the reference frame as the reference block.
- Intra-frame prediction utilizes the correlation in the spatial domain, and it uses the reconstructed pixels around the current block as reference pixels. In the airspace, the closer the distance, the stronger the correlation, and the farther the distance, the worse the correlation. Therefore, if a certain weight matrix makes the obtained pixel position used by a prediction block far away from the reference pixel, then this part may not be able to make a more suitable prediction value than the existing technology, so such a weight matrix may not be used, but Can be used in inter prediction.
- the embodiment of the present application provides an intra-frame prediction method.
- the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine them through various weight matrices to finally obtain a better prediction block.
- the complex prediction block on the basis of improving the accuracy of intra-frame prediction, can reduce the hardware implementation cost, reduce the complexity, and realize a simple and efficient encoding and decoding method, thereby improving the compression performance.
- the following prediction sample matrix is the prediction block described above, that is, a "block” can be understood as a "sample matrix", and the array mentioned in the text is meaning of matrix.
- the prediction of the IWCP acting on the luma component can be taken as an example, but the present invention is not limited to the luma component, and can also be used for the chroma component and any component in any other format.
- the specific process that the decoder uses the intra weighted combined prediction mode to determine the prediction value of the current block can be described as follows:
- the weight matrix of the intra-frame weighted combined prediction (IWCP) mode multiplexes the weight matrix of the AWP, that is, the weight matrix derivation method of IWCP and the AWP
- the weight matrix is derived in the same way.
- a sequence-level flag may be used to determine whether the current sequence to be decoded uses the IWCP mode. For example:
- Sequence header definition Descriptor sequence_header() ⁇ ... iwcp_enable_flag u(1) ...
- the allowable flag iwcp_enable_flag of the intra-frame weighted combined prediction mode is a binary variable. Specifically, the iwcp_enable_flag value of '1' indicates that the intra-frame weighted combined prediction mode can be used; the value of '0' indicates that intra-frame weighted combined prediction should not be used. model.
- the value of IwcpEnableFlag is equal to iwcp_enable_flag. If iwcp_enable_flag is not present in the bitstream, the value of IwcpEnableFlag is 0.
- a frame-level flag may be used to determine whether the current frame to be decoded uses the IWCP mode. For example, it is possible to configure intra-frame frames (such as I frames) to use IWCP mode, and inter-frame frames (such as B frames and P frames) to not use IWCP mode. Or it can be configured that the intra-frame does not use the IWCP mode, and the inter-frame uses the IWCP mode. Alternatively, some inter-frames can be configured to use the IWCP mode, and some inter-frames do not apply the IWCP mode.
- intra-frame frames such as I frames
- inter-frame frames such as B frames and P frames
- a flag below the frame level and above the CU level may be used to determine whether this area uses the IWCP mode.
- the decoder decodes the current CU, and if the current CU meets the IWCP usage condition, decodes the IWCP usage flag of the current CU. Otherwise there is no need to decode the IWCP usage flag of the current CU.
- IwcpMinSize is equal to 8 and IwcpMaxSize is equal to 32.
- IwcpMinSize equal to 8 and IwcpMaxSize equal to 16.
- width is the width of the current CU
- height is the height of the current CU.
- an 8x8 block of luma corresponds to a 4x4 block of chrominance at the same position.
- One possible method is to allow the 8x8 block of luma to use IWCP. mode but disables chroma for 4x4 blocks using IWCP mode. Because the prediction effect of the 4 ⁇ 4 block in the IWCP mode is not significantly improved, on the other hand, the implementation cost of the hardware is increased.
- the current CU will not use, for example, Derived Tree (DT), Intra Prediction Filter (IPF), and Improved Intra Prediction (IIP) and some other modes. , that is, if the current CU uses IWCP, it does not need to process the related information of these modes. This is because the prediction effect of IWCP combined with these modes cannot be significantly improved.
- DT Derived Tree
- IPF Intra Prediction Filter
- IIP Improved Intra Prediction
- the current CU uses IWCP, the derived mode DT, intra-frame prediction filter IPF, and improved intra-frame prediction IIP are not used by default, so there is no need to transmit the flags of whether they are used in the code stream, such as dt_split_flag, intra_pf_flag, iip_flag, you can Saving code words is beneficial to compression efficiency.
- the intra-frame weighted combination prediction flag iwcp_flag is a binary variable, and the iwcp_flag value of '1' indicates that the intra-frame weighted combination prediction mode should be used; the value of '0' indicates that the intra-frame weighted combination prediction mode should not be used.
- the value of IwcpFlag is equal to the value of iwcp_flag. If iwcp_flag does not exist in the bitstream, the value of IwcpFlag is 0.
- the derivative mode division flag dt_split_flag is a binary variable.
- a value of dt_split_flag of '1' indicates that the derivative mode division should be performed; the value of '0' indicates that the derivative mode division should not be performed.
- the value of DtSplitFlag is equal to the value of dt_split_flag, and the value range is 0 to 4. If dt_split_flag does not exist in the bitstream, the value of DtSplitFlag is 0.
- Derived mode partition means that rectangular prediction units may be partitioned on the basis of the current CU.
- the intra prediction filtering flag intra_pf_flag is a binary variable.
- the intra_pf_flag value of '1' indicates that the current coding unit should use intra-frame prediction filtering; the value of '0' indicates that the current coding unit should not use intra-frame prediction filtering.
- the value of IntraPfFlag is equal to the value of intra_pf_flag. If intra_pf_flag does not exist in the bitstream, the value of IntraPfFlag is 0.
- Intra-frame prediction filtering can use reference pixels to filter the initial prediction value after generating the initial prediction value to generate a new prediction value.
- the improved intra prediction flag iip_flag is a binary variable.
- the iip_flag value of '1' indicates that the current coding unit should use improved intra prediction; the value of '0' indicates that the current coding unit should not use improved intra prediction.
- the value of IipFlag is equal to the value of iip_flag. If iip_flag does not exist in the bitstream, the value of IipFlag is 0.
- the improved intra prediction can generate predicted values using different filters than when the improved prediction is not used. An example is for certain angle predictions, where the improved intra prediction uses an 8-tap filter to produce the predicted value. The predicted value is generated using a 4-tap filter when not using improved intra prediction.
- the weight matrix derivation mode reuses the weight matrix derivation mode of the AWP.
- the intra-frame weighted combined prediction mode index iwcp_idx is used to determine the weight matrix of the intra-frame weighted combined prediction mode, and the value of IwcpIndex is equal to the value of iwcp_idx. If iwcp_idx does not exist in the bitstream, the value of IwcpIndex is equal to 0.
- the first mode index iwcp_pred_mode0_index in the intra weighted combined prediction mode is used to determine the first intra prediction mode IwcpPredMode0 of the luma block of the intra weighted combined prediction mode.
- the second mode index iwcp_pred_mode1_index in the intra weighted combined prediction mode is used to determine the second intra prediction mode IwcpPredMode1 of the luma block of the intra weighted combined prediction mode
- the first intra-frame luminance prediction sample matrix predMatrixY0 can be determined according to IwcpPredMode0, and the first intra-frame luminance prediction sample matrix predMatrixY0 can be determined according to IwcpPredMode1.
- Two intra-frame luminance prediction sample matrix predMatrixY1 and after determining the luminance weight matrix IwcpWeightMatrixY according to IwcpIndex, use the luminance weight matrix IwcpWeightMatrixY to perform a weighting operation on the first intra-frame luminance prediction sample matrix predMatrixY0 and the second intra-frame luminance prediction sample matrix predMatrixY1, and finally determine Luma prediction sample matrix predMatrixIwcpY.
- the luminance prediction sample matrix predMatrixIwcpY of the IWCP is determined according to the two intra-frame luminance prediction sample matrices predMatrixY0, predMatrixY1 and the weight matrix IwcpWeightMatrixY.
- the specific method is as follows:
- the value of the element predMatrixIwcpY[x][y] in the prediction sample matrix predMatrixIwcpY of the intra weighted combined prediction mode is ((predMatrixY0[x][y]*IwcpWeightMatrixY[x][y]+predMatrixY1[x][y]* (8-IwcpWeightMatrixY[x][y])+4)>>3).
- (x, y) is the coordinate position within the current block.
- the subsequent processing may also include decoding of the quantized coefficients, inverse transformation, inverse quantization to determine the residual block, and the residual block. And the prediction block is combined into a reconstructed block, and the subsequent loop filtering, etc.
- the embodiment of the present application provides an intra-frame prediction method.
- the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine them through various weight matrices to finally obtain a better prediction block.
- the complex prediction block on the basis of improving the accuracy of intra-frame prediction, can reduce the hardware implementation cost, reduce the complexity, and realize a simple and efficient encoding and decoding method, thereby improving the compression performance.
- FIG. 9 is a schematic diagram 2 of the implementation flow of the intra-frame prediction method.
- the method for performing intra-frame prediction by the encoder may include the following step:
- Step 201 when the current block uses the IWCP mode to determine the intra-frame prediction value of the current block, determine the first intra-frame prediction mode and the second intra-frame prediction mode of the current block; wherein, the first intra-frame prediction mode and the second intra-frame prediction mode are The prediction modes are two different intra-angle prediction modes.
- the encoder may first determine the first intra prediction mode and the second intra prediction mode of the current block;
- the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes.
- the IWCP mode is an intra-frame prediction method, and specifically, the IWCP mode is to determine two different intra-frame angle prediction modes for the current block, and then according to the two different The intra-frame angle prediction mode of , determines two prediction blocks, then a weight matrix can be determined, and the two prediction blocks are combined according to the weight matrix, and finally a new prediction block can be obtained, that is, the prediction block of the current block can be obtained.
- the size of the current block may be limited.
- the intra-frame prediction method proposed in the embodiment of the present application needs to use two different intra-frame angle prediction modes to generate two prediction blocks, and then perform weighting according to the weight matrix to obtain a new prediction block, in order to reduce the complexity of
- the IWCP mode may be restricted from not using this IWCP mode for prediction blocks of some sizes. Therefore, in this application, the encoder may first determine the size parameter of the current block, and then determine whether the current block uses the IWCP mode according to the size parameter.
- the size parameter of the current block may include the height and width of the current block. Therefore, the encoder may use the height and width of the current block to limit the use of the IWCP mode, that is, limit the use of the IWCP mode. The size of the prediction block in IWCP mode.
- both the width and the height are greater than or equal to the first lower limit value, and at the same time, both the width and the height are less than or equal to the first upper limit value, then it can be determined that the current block uses the IWCP mode. It can be seen that a possible restriction is to use only when the width and height of the predicted block are less than (or less than or equal to) the first upper limit value, and the width and height of the predicted block are greater than (or greater than or equal to) the first lower limit value. IWCP mode. Wherein, the first lower limit value may be 8, and the value of the first upper limit value may be 16 or 32 or the like.
- an 8x8 block of luma corresponds to a 4x4 block of chrominance at the same position.
- One possible method is to allow the 8x8 block of luma to use IWCP. mode but disables chroma for 4x4 blocks using IWCP mode. Because the prediction effect of the 4 ⁇ 4 block in the IWCP mode is not significantly improved, on the other hand, the implementation cost of the hardware is increased.
- intra-frame frames such as I frames
- inter-frame frames such as B frames and P frames
- the intra-frame does not use the IWCP mode
- the inter-frame uses the IWCP mode.
- some inter-frames can be configured to use the IWCP mode, and some inter-frames do not use the IWCP mode.
- Inter-frames can also use intra-frame prediction, so it is also possible for inter-frames to use IWCP mode.
- a flag below the frame level and above the CU level (such as tile, slice, patch, LCU, etc.) to determine whether this area uses the IWCP mode.
- the encoder can determine a combination of the minimum rate-distortion intra-frame prediction mode and the weight matrix derivation mode, wherein the combination includes the first intra-frame prediction mode, the second Intra prediction mode, weight matrix derivation mode.
- the first intra-frame prediction mode and the second intra-frame prediction mode may be two different intra-frame angle prediction modes.
- the first intra-frame prediction mode and the second intra-frame prediction mode may be respectively two different intra-frame angle prediction modes in the preset angle prediction mode set.
- both the first intra-frame prediction mode and the second intra-frame prediction mode can only be intra-frame angle prediction modes, that is, neither the first intra-frame prediction mode nor the second intra-frame prediction mode is a division
- Other basic intra-frame prediction modes other than the intra-frame angle prediction mode such as intra-frame non-angle prediction modes, including DC mode, Planar mode, PLANE mode, Bilinear mode, PCM mode, etc.
- the basic intra-frame prediction modes include, but are not limited to, an angular prediction mode and a non-angular prediction mode. Such as 67 intra prediction modes used by VVC and 66 intra prediction modes used by AVS3.
- the restriction of the intra-frame angle prediction mode on the first intra-frame prediction mode and the second intra-frame prediction mode can reduce the hardware implementation complexity of the intra-frame weighted combination prediction mode on the one hand, because When the hardware implements the intra-frame weighted combination prediction mode in a parallel manner, only a set of circuits that support the intra-frame angle weighted prediction need to be added;
- the non-angle prediction mode usually deals with scenes with relatively uniform texture changes, and there are fewer modes that can be used to reduce overhead. Therefore, the intra-frame weighted combined prediction mode or not using the intra-frame non-angle prediction mode has little effect on compression performance.
- the encoder may limit the available intra-angle prediction modes for the first intra-frame prediction mode and the second intra-frame prediction mode using a preset angle prediction mode set, wherein the preset angle prediction mode set is all intra-frame angles A subset of prediction modes.
- AVS3 has 62 angle modes, that is, intra-frame angle prediction modes with mode numbers 3-32 and 34-65.
- the first intra-frame prediction mode and the second intra-frame prediction mode may only use the intra-frame angle prediction modes whose mode numbers are 3-32, or the first intra-frame prediction mode and the second frame.
- the intra prediction mode may use only 28 intra angle prediction modes with mode numbers 4-31.
- the first intra-frame prediction mode and the second intra-frame prediction mode may only use the intra-frame angle prediction mode whose mode number is an even number, or the first intra-frame prediction mode and The second intra prediction mode may use only intra angle prediction modes whose mode numbers are odd.
- the angle prediction mode set used by the first intra prediction mode and the angle prediction mode set used by the second intra prediction mode are different.
- the decoder can use the same preset angle prediction mode set to limit the first intra prediction mode and the second intra prediction mode, that is, if the first intra prediction mode can only use the mode number 4- 28 intra-frame angle prediction modes of 31, the second intra-frame prediction mode can also only use the 28 intra-frame angle prediction modes with mode numbers 4-31, and then the first intra-frame prediction mode and the second intra-frame prediction mode. You can use the same MPM list and use the same or similar codecs.
- the decoder restricts the first intra prediction mode and the second intra prediction mode using different preset angle prediction mode sets, then the first intra prediction mode and the second intra prediction mode need to be restricted. Use a different MPM list or use a significantly different codec.
- Step 202 Build the MPM list of the current block.
- the encoder may further construct the MPM list of the current block.
- the prediction modes in the MPM list are all intra-angle prediction modes.
- the encoder when the encoder constructs the MPM list of the current block, it needs to first determine the weight matrix derivation mode of the current block, and then use the weight matrix derivation mode to further determine the MPM list of the current block.
- the weight matrix derivation mode is used to determine the weight matrix used by the current block.
- the weight matrix derivation mode may be a mode of deriving the weight matrix.
- each weight matrix derivation mode can derive a weight matrix; for a prediction block of the same size, different weight matrix derivation modes derive different weight matrices.
- the AWP of AVS3 has 56 weight matrix derivation modes
- the GPM of VVC has 64 weight matrix derivation modes.
- the decoder when constructing the MPM list of the current block, may construct the MPM list directly based on the prediction mode and the weight matrix derivation mode of the adjacent blocks of the current block.
- the encoder when constructing the MPM list of the current block, may also construct the MPM list based on the prediction mode of the adjacent blocks of the current block, the set of preset angle prediction modes, and the weight matrix derivation mode. List of MPMs.
- the preset angle prediction mode set may be a subset of all intra-frame angle prediction modes. Taking AVS3 as an example, the preset angle prediction mode set may only include 28 intra angle prediction modes with mode numbers 4-31.
- the preset angle prediction mode set may be a combination of all intra angle prediction modes; if necessary The range of the first intra-frame prediction mode and the second intra-frame prediction mode is limited, then the preset angle prediction mode set can be only a combination of some intra-frame angle prediction modes, and the preset angle prediction mode set can be used for The range of the first intra-frame prediction mode and the second intra-frame prediction mode is limited, thereby effectively reducing overhead and improving compression performance.
- the MPM list may be constructed first.
- a first candidate mode is determined by using the prediction mode of the adjacent block; meanwhile, a second candidate mode is determined by using the weight matrix derivation mode; and then the first candidate mode, the second candidate mode and the prediction Set the angle prediction mode set, and construct the MPM list of the current block.
- the encoder determines the first candidate mode by using the prediction mode of the adjacent block, if the adjacent block is an ordinary intra-frame prediction block, and the prediction mode of the adjacent block is Intra prediction mode, the prediction mode of the adjacent block is determined as the first candidate mode.
- the common intra prediction block refers to the prediction block using prediction modes such as DC mode, Planar mode, Bilinear mode, and angle prediction mode, rather than using the IBC mode, string copy intra prediction intra string copy.
- a prediction block for prediction modes such as prediction.
- the encoder when using the weight matrix derivation mode to determine the second candidate mode, the encoder may first determine the boundary angle index value according to the weight matrix derivation mode; and then use the boundary angle index value determines the second candidate mode.
- the second candidate mode is L different intra-frame angle prediction modes, so that the construction of an MPM list of length L can be ensured.
- the position of the weight change constitutes a straight line, or, in the case that the weight matrix has multiple weights, the transition region has the same weight.
- the positions form a straight line, which can be called the dividing line. You can set the horizontal right angle to 0, and the angle increases counterclockwise. Then the dividing line may be horizontal 0 degrees, vertical 90 degrees, inclined such as 45 degrees, 135 degrees, and various other angles.
- the corresponding texture is likely to show different characteristics on both sides of the dividing line, such as two textures with different angles on both sides of the dividing line, or one side of the dividing line is an angle texture, while the other side is a relatively flat texture. Since the dividing line itself has an angle, it can be assumed that a point is predicted by intra-frame angle, and it may be close to some textures of the current block, so this line and the two intra-frame prediction modes of the current block are There is a correlation.
- the boundary line is obtained from a point through intra-frame angle prediction, then at least one intra-frame angle prediction mode can be found, and this intra-frame angle prediction mode can approximate the boundary line.
- the horizontal dividing line matches the horizontal intra prediction mode, such as mode 24 in AVS3;
- the vertical dividing line matches the vertical intra prediction mode, such as mode 12 in AVS3;
- the boundary line can match the intra prediction mode of 45 degrees from the lower left to the upper right, such as mode 30 in AVS3; it can also match the intra prediction mode of 225 degrees from the upper right to the lower left, such as mode 6 in AVS3.
- weight matrix derivation mode can be matched to some intra prediction modes, so the weight matrix derivation mode can be used to assist the decoding of the intra prediction mode.
- the weight matrix derivation mode may also be an index of the weight matrix, for example, the 56 modes of AWP can be regarded as 56 weight matrix derivation modes.
- a mapping relationship table may be constructed to further represent the mapping relationship between the weight matrix derivation mode and the intra-angle prediction mode.
- the boundary lines of multiple modes of AWP and GPM are all the same angle, for example, the angle of the boundary line of AWP of AVS3 is the same every 8 modes.
- 56 AWP modes have a total of 8 dividing line angles.
- the index of the dividing line angle can be obtained from the mode number modulo 8 (%8) of the weight matrix derived mode.
- Table 1 above is a mapping relationship table.
- the indices 0 and 1 of the boundary angle can correspond to two intra-frame angle prediction modes, one from the upper right corner to the lower left corner, and the other from the upper left corner. to the bottom right.
- another approximately corresponding intra-angle prediction mode may be found for indices of other boundary angles, or all indices of boundary angles correspond to only one intra-angle prediction mode.
- the encoder may utilize the correlation of the weight matrix with the intra-angle prediction modes to construct the MPM list of intra-weighted combined prediction modes. For example, when constructing the MPM list of intra-frame weighted combined prediction modes, if the list length of the MPM list is 4, the candidate modes corresponding to the boundary angle indices in Table 2 may be added to the MPM list.
- the number of candidate modes corresponding to the index of each boundary angle is equal to the length of the MPM list, which can ensure that even if all the intra prediction modes of the referenced adjacent blocks are unavailable. Fill up the MPM list. If the length of the MPM list is 4, the number of candidate modes corresponding to the index of each boundary angle can be set to 4.
- the encoder when the encoder constructs the MPM list according to the first candidate mode, the second candidate mode and the preset angle prediction mode set, the encoder can also be based on the preset angle prediction mode.
- the set performs a screening process on the first candidate mode to obtain a candidate mode after screening; and constructs the MPM list according to the candidate mode after screening and the second candidate mode.
- the encoder when the encoder performs screening processing on the first candidate mode based on the preset angle prediction mode set and obtains a candidate mode after screening, if the first candidate mode belongs to the preset angle prediction mode set, the first candidate mode is determined as the post-screened candidate mode; if the first candidate mode is an intra-frame angle prediction mode and does not belong to the preset angle prediction mode set, then A replacement mode of the first candidate mode is determined from the preset angle prediction mode set, and the replacement mode is determined as the screened candidate mode.
- the encoder can directly delete the first candidate mode.
- the preset angle prediction mode set to which the first intra prediction mode and the second intra prediction mode belong is a subset of all intra angle prediction modes, excluding intra frame prediction modes.
- Non-angle prediction mode therefore, for the intra-frame weighted combination prediction mode, the selection of the most probable mode MPM of the current block, that is, the construction method of the MPM list, also needs to be adjusted accordingly.
- the encoder needs to refer to the intra prediction modes of adjacent blocks around the current block when constructing the MPM list. Peripheral adjacent blocks are such as left adjacent block, upper adjacent block, upper left adjacent block, upper right adjacent block, lower left adjacent block and so on. Due to the spatial correlation, a certain prediction mode is used in the surrounding adjacent blocks, and the current block has a higher probability of using the same or similar prediction mode.
- both the first intra-frame prediction mode and the second intra-frame prediction mode of the intra-frame weighted combined prediction mode can only be the intra-frame angle prediction mode
- the encoder does not use the intra-frame non-angle prediction mode used by this reference block when constructing the MPM list of the current block, That is, the intra non-angle prediction mode is not added to the MPM list of the current block.
- the preset angle prediction mode set to which the first intra prediction mode and the second intra prediction mode belong is a subset of all intra angle prediction modes
- the intra-frame prediction mode is an intra-frame angle prediction mode other than the preset angle prediction mode set, that is, the first candidate mode is the intra-frame angle prediction mode and does not belong to the preset angle prediction mode set
- the encoder is constructing the current block.
- the intra angle prediction mode outside the preset angle prediction mode set can be converted into an intra angle prediction mode within the preset angle prediction mode set with a similar angle, and then added to the MPM list.
- Intra-frame angle prediction mode No. 12 the encoder can add intra-frame angle prediction No. 12 similar to the intra-frame angle prediction No. 43 to the MPM list of the current block in the intra-frame weighted combined prediction mode.
- the encoder when the encoder constructs the MPM list according to the candidate mode after screening and the second candidate mode, if the candidate mode after screening satisfies the preset addition condition, then Add the filtered candidate mode to the MPM list; if the MPM list does not meet the preset list length L, and the second candidate mode satisfies the preset addition condition, then add the second candidate mode Add to the MPM list; wherein, L is an integer greater than or equal to 1.
- the value of L may be 4, that is, the preset list length of the MPM list is 4, or in other words, the MPM list includes 4 most probable patterns.
- the encoder may sort the L modes in the MPM list in ascending order of mode numbers.
- the encoder can determine that the candidate mode after screening satisfies the preset addition condition;
- the encoder may determine that the second candidate mode satisfies the preset addition condition.
- the encoder determines the sequence parameter corresponding to the adjacent block when adding the filtered candidate mode corresponding to the adjacent block to the MPM list;
- the corresponding post-screening candidate mode is added to the MPM list.
- the encoder can determine the corresponding sequence parameter according to the spatial distance between the adjacent block and the current block. For example, the closer the spatial distance between the adjacent block and the current block, the stronger the correlation between the two, the earlier the The addition processing is performed, that is, the smaller the order parameter is; the further the spatial distance between the adjacent block and the current block, the weaker the correlation between the two, and the later the addition processing is performed, that is, the larger the order parameter is.
- the encoder after the encoder adds the filtered candidate mode and/or the second candidate mode to the MPM list, the encoder can also perform mode numbers in an ascending order of mode numbers in the MPM list.
- the L prediction modes are sorted.
- the MPM list of the current block in the intra-frame weighted combined prediction mode is IwcpMpm[4], that is, the list length of the MPM list is 4, the index of the weight matrix derivation mode is IwcpIndex, and the weight matrix is derived.
- the mode multiplexes the 56 derivation modes of the AWP, and the preset angle prediction mode set to which the first intra prediction mode and the second intra prediction mode belong are the intra angle prediction modes No. 4-31. Then the encoder can perform the following steps in sequence when building the MPM list of the current block:
- Step S1 set the array cand_mode[10], and all values of cand_mode are initialized to invalid values. Do the following for cand_mode:
- cand_mode[3] is equal to the intra-frame prediction mode of A
- cand_mode[4] is equal to the intra prediction mode of B
- the adjacent block X (X is A, B, C, D, F or G) "exists" means that the block should be within the image and the block should belong to the same slice as block E; otherwise the adjacent block "does not exist” . If the block "does not exist” or has not been decoded, the block is "unavailable”; otherwise the block is "available”. If the block in which the image sample is located is "not present” or the sample has not been decoded, the sample is "unavailable”; otherwise the sample is "available”.
- Step S2 for i from 0 to 5, perform the following operations:
- the encoder can directly delete the first candidate mode, that is, not use the first candidate mode.
- the encoder can select a similar intra-angle prediction mode from the preset angle prediction mode set pattern as a replacement pattern for the first candidate pattern, and then this replacement pattern as a filtered candidate pattern.
- the encoder can directly use the first candidate mode, that is, the first candidate mode is the filtered candidate mode.
- step S2 is the screening process of the first candidate mode, and a post-screening candidate mode corresponding to the first candidate mode is finally determined.
- Step S3 record mpm_num as 0, and perform the following operations for i from 0 to 9:
- the encoder can add the candidate mode after screening to the MPM list. ; If all the post-screening candidate modes that meet the preset addition conditions are added to the MPM list, and the prediction modes in the MPM list are less than 4, then the encoder can continue to add the second candidate modes that meet the preset addition conditions to the MPM list. , until the list length of the MPM list reaches 4.
- Step S4 sort the four numbers of IwcpMpm[4] in ascending order.
- the encoder can sort the 4 intra-angle prediction modes in the MPM list in ascending order of mode numbers.
- this application does not limit the execution order of the above-mentioned steps 202 and 203, that is, does not limit the sequence between the determination process of the first intra prediction mode and the second intra prediction mode and the construction process of the MPM list. .
- Step 203 Determine the first mode index and the second mode index of the current block according to the first intra prediction mode, the second intra prediction mode and the MPM list.
- the encoder can further , the second intra prediction mode, and the MPM list to determine the first mode index and the second mode index of the current block.
- the first mode index may be used to indicate the first intra prediction mode used by the current block
- the second mode index may be used for the second intra prediction mode of the current block. mode to indicate.
- the value of the first mode index and the value of the second mode index are related to the number of intra-frame angle prediction modes that may exist in the first intra-frame prediction mode and the second intra-frame prediction mode, for example, the first intra-frame prediction mode
- the prediction mode and the second intra-frame prediction mode may be one of the 28 intra-frame angle prediction modes with mode numbers 4-31, respectively, then the value of the first mode index and the value of the second mode index both belong to the range 0 ⁇ 27.
- the parameter iwcp_pred_mode0_index may be used to represent the first mode index
- the parameter iwcp_pred_mode1_index may be used to represent the second mode index
- the encoder may determine a first mapping relationship table between the index value and the binary symbol string; wherein the first mapping relationship table includes a first length, a second length and a third length respectively The binary string of symbols.
- the first length is 3 bits
- the second length is 5 bits
- the third length is 6 bits.
- the first mapping relationship table between the index value and the binary symbol string may be used to determine the values of the first mode index and the second mode index.
- the preset angle prediction mode set includes a total of 28 modes
- 4+8+ can be used.
- 16 form encoding that is, a pattern of 4 shortest codewords, a pattern of 8 shorter codewords, and a pattern of 16 longer codewords.
- the mode of 4 shortest codewords uses 3-bit codewords, that is, the first length is used
- the mode of 8 shorter codewords uses 5-bit codewords, that is, the second length is used, that is, the mode of 16 longer codewords
- a 6-bit codeword is used, that is, the third length is used.
- the prediction angles using the 28 intra-frame angle prediction modes with mode numbers 4-31 basically cover the entire commonly used angle range, and at the same time, the mode numbers are 4-31 intra-frame angle prediction
- the mode is simpler than the intra-angle prediction mode with mode numbers 34-65, and using these 28 modes to encode in the form of 4+8+16 will not cause waste of code words, so the encoder can preferably follow the mode number 4.
- the 28 intra-angle prediction modes of -31 define a set of preset angle prediction modes.
- the 4 most probable patterns in the MPM list can correspond to the binary symbol string using the first length, that is, the 4 shortest codes.
- the word mode can be used for 4 MPMs in the MPM list; correspondingly, other prediction modes in the preset angle prediction mode set other than the MPM list can use the binary symbol string of the second length and the binary symbol of the third length respectively. string of symbols.
- the encoder can The patterns of the words are evenly distributed. Specifically, the encoder may evenly distribute the modes of the 8 shorter codewords (binary symbol strings of the second length) among the remaining 24 intra-angle prediction modes. For example, a pattern of 1 shorter codeword (binary symbol string of second length) is used for every pattern of 2 longer codewords (binary symbol string of third length). Furthermore, in the specific execution process, it can be realized by the sequence number modulo 3 (%3) from 0-23 in the remaining 24 intra-frame angle prediction modes. The binary symbol string of the second length is used, and the serial number modulo 3 is 0 or 1 to use a 6-bit codeword, that is, the binary symbol string of the third length is used.
- a mapping relationship table may be as shown in Table 3 above, wherein the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits.
- the first bit can be used to indicate whether it is MPM, for example, "1" indicates that it is MPM, and "0" indicates that it is not MPM. If the first intra prediction mode is MPM, assuming that there are 4 MPMs in the MPM list, then 2 bits can be used to indicate which MPM in the MPM list is used, that is, "00, 01, 10, 11" respectively indicate the MPM The first MPM in the list, the second MPM, the third MPM, the fourth MPM.
- the context model is used for encoding the binary symbol string whose bit flag is 0, and the context model is not used for encoding the binary symbol string whose bit flag is not 0.
- the value of the bit flag may indicate how many bits have been encoded, and the bit flag may be represented by binIdx.
- the context model can be used to encode the binary symbol string whose binIdx is 0, while the binary symbol string whose binIdx is not 0 can be encoded using the context model.
- the encoder determines the first mode index and the second mode index of the current block according to the first intra prediction mode, the second intra prediction mode and the MPM list , if the mode number of the first intra-frame prediction mode is the same as the mode number of the m-th mode in the MPM list, then the value i of the first mode index is assigned according to m; The mode number of the intra prediction mode is different from the mode number of any mode in the MPM list, then the value i of the first mode index is determined by using the MPM list; according to the first mapping relationship table and i The first mode index is determined.
- m is an integer greater than or equal to 0 and less than L.
- the encoder uses the MPM list to determine the value i of the first mode index
- the mode number of the first intra prediction mode is greater than or equal to the fourth value in the MPM list mode number of the first intra-frame prediction mode
- the mode number of the first intra-frame prediction mode is smaller than the The mode number of the fourth mode is greater than or equal to the mode number of the third mode in the MPM list, then assigns i according to the difference between the mode number of the first intra-frame prediction mode and 3
- the mode number of the first intra-frame prediction mode is smaller than the mode number of the third mode in the MPM list, and is greater than or equal to the mode number of the second mode in the MPM list, then according to the The difference between the mode number of the first intra-frame prediction mode and 2 is assigned to i; if the mode number of the first intra-frame prediction mode is less than the mode number of the second mode in the MPM
- the encoder can determine the first mode index according to the first mapping relationship table and i. , specifically, the encoder may perform binarization processing on i according to the first mapping relationship table shown in Table 3 above to determine the first mode index.
- the encoder determines the first mode index and the second mode index of the current block according to the first intra prediction mode, the second intra prediction mode and the MPM list , if the mode number of the second intra-frame prediction mode is the same as the mode number of the mth mode in the MPM list, then the value j of the first mode index is assigned according to m; The mode number of the intra prediction mode is different from the mode number of any mode in the MPM list, then the value j of the first mode index is determined by using the MPM list; according to the first mapping relationship table and j The second mode index is determined.
- m is an integer greater than or equal to 0 and less than L.
- the encoder uses the MPM list to determine the value j of the first mode index
- if the mode number of the second intra prediction mode is greater than or equal to the fourth value in the MPM list mode number of the second intra-frame prediction mode then assign j according to the difference between the mode number of the second intra-frame prediction mode and 4; if the mode number of the second intra-frame prediction mode is smaller than the MPM list
- the mode number of the fourth mode is greater than or equal to the mode number of the third mode in the MPM list, then assign j according to the difference between the mode number of the second intra-frame prediction mode and 3; If the mode number of the second intra prediction mode is less than the mode number of the third mode in the MPM list, and is greater than or equal to the mode number of the second mode in the MPM list, then according to the The difference between the mode number of the second intra prediction mode and 2 is assigned to j; if the mode number of the second intra prediction mode is less than the mode number of the second mode in the MPM list, and greater
- the encoder can determine the second mode index according to the first mapping relationship table and j. , specifically, the encoder may perform binarization processing on j according to the first mapping relationship table shown in Table 3 above to determine the second mode index.
- the preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31.
- the encoder may first determine that the first intra-frame prediction mode is IwcpPredMode0, and the second intra-frame prediction mode is IwcpPredMode1, and then can According to the first intra prediction mode IwcpPredMode0, the second intra prediction mode IwcpPredMode1 further determines the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index, wherein the values of iwcp_pred_mode0_index and iwcp_pred_mode1_index range from 0-27.
- the encoder may specifically perform the following operations when determining the first mode index iwcp_pred_mode0_index:
- IwcpPredMode0 is equal to IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value i of iwcp_pred_mode0_index is equal to m.
- IwcpPredMode0 is not equal to IwcpMpm[m]
- IwcpPredMode0 is the value i of iwcp_pred_mode0_index equal to IwcpPredMode0 ⁇ IwcpMpm[0]? IwcpPredMode0:IwcpPredMode0 ⁇ IwcpMpm[1]? IwcpPredMode0-1:IwcpPredMode0 ⁇ IwcpMpm[2]? IwcpPredMode0-2:IwcpPredMode0 ⁇ IwcpMpm[3]? IwcpPredMode0-3: IwcpPredMode0–4.
- the same index value as i can be determined from the left column of Table 3, and then the binary symbol string iwcp_pred_mode0_index can be determined from the right column of the same row.
- the encoder when the encoder determines the second mode index iwcp_pred_mode1_index after determining the second intra prediction mode IwcpPredMode1 used by the intra-frame weighted combined prediction mode of the current block, it may specifically perform the following operations:
- IwcpPredMode1 is equal to IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value j of iwcp_pred_mode1_index is equal to m.
- IwcpPredMode1 is not equal to IwcpMpm[m]
- IwcpPredMode1 is the value j of iwcp_pred_mode1_index equal to IwcpPredMode1 ⁇ IwcpMpm[0]? IwcpPredMode1:IwcpPredMode1 ⁇ IwcpMpm[1]? IwcpPredMode1-1:IwcpPredMode1 ⁇ IwcpMpm[2]? IwcpPredMode1-2:IwcpPredMode1 ⁇ IwcpMpm[3]? IwcpPredMode1-3: IwcpPredMode1–4.
- the same index value as j can be determined from the left column of Table 3, and then the binary symbol string iwcp_pred_mode1_index can be determined from the right column of the same row.
- the first intra-frame prediction mode and the second intra prediction mode can share a preset angle prediction mode set, and can also share the same MPM list, but the first intra prediction mode and the second intra prediction mode in the intra weighted combined prediction mode are not the same. Therefore, when encoding and decoding the second intra-frame prediction mode, the first intra-frame prediction mode may be referred to. Specifically, when determining the second intra-frame prediction mode, the first intra-frame prediction mode may be excluded.
- the probability of occurrence of 4 MPMs in the MPM list is very high (the first intra-frame angle prediction mode).
- the probability that the prediction mode is one of the 4 MPMs in the MPM list is about 50%, and the probability that the second intra prediction mode is one of the 4 MPMs in the MPM list is about 50%), if the first intra The prediction mode and the second intra-frame prediction mode are both MPMs in the MPM list, so when determining the second intra-frame prediction mode, you can only select from the other 3 MPMs in the MPM list other than the first intra-frame prediction mode One will do.
- the second intra-frame prediction mode can also be removed from the 24 intra-frame angle prediction modes of 8+16. , but this effect is relatively small.
- the encoder determines the first mode index and the first mode index of the current block according to the first intra prediction mode, the second intra prediction mode and the MPM list.
- the value j of the first mode index is assigned according to m; if The mode number of the second intra prediction mode is different from the mode number of any mode in the MPM list, then the MPM list is used to determine the value j of the first mode index; according to the first mapping A relationship table, a second mapping relationship table of index values and binary symbol strings, and j determine the second mode index.
- the second mapping relationship table between index values and binary symbol strings, and j, if i is less than L and less than j, after subtracting 1 from j, binarize j according to the second mapping relationship table to determine the second mode index; if j is greater than or equal to L, then according to the first mapping relationship
- the table performs binarization processing on j to determine the second mode index.
- the encoder may determine a second mapping relationship table between the index value and the binary symbol string; wherein, the second mapping relationship table includes the first length, the second length, and the third length respectively. and a binary symbol string of the fourth length.
- the first length is 3 bits
- the second length is 5 bits
- the third length is 6 bits
- the fourth length is 2 bits.
- the second mapping relationship table between the index value and the binary symbol string is only used to determine the value of the second mode index.
- the second mapping relationship table between the index value and the binary symbol string may be as shown in Table 4 above, wherein the first length is 3 bits, the second length is 5 bits, and the third length is 6 bits, the fourth length is 2 bits.
- the context model can be used to encode the binary symbol string whose binIdx is 0, while the binary symbol string whose binIdx is not 0 can be encoded using the context model.
- the preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31.
- the encoder may first determine that the first intra-frame prediction mode is IwcpPredMode0, and the second intra-frame prediction mode is IwcpPredMode1, and then can According to the first intra prediction mode IwcpPredMode0, the second intra prediction mode IwcpPredMode1 further determines the first mode index iwcp_pred_mode0_index and the second mode index iwcp_pred_mode1_index.
- the encoder may specifically perform the following operations when determining the first mode index iwcp_pred_mode0_index:
- IwcpPredMode0 is equal to IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value i of iwcp_pred_mode0_index is equal to m.
- IwcpPredMode0 is not equal to IwcpMpm[m]
- IwcpPredMode0 is the value i of iwcp_pred_mode0_index equal to IwcpPredMode0 ⁇ IwcpMpm[0]? IwcpPredMode0:IwcpPredMode0 ⁇ IwcpMpm[1]? IwcpPredMode0-1:IwcpPredMode0 ⁇ IwcpMpm[2]? IwcpPredMode0-2:IwcpPredMode0 ⁇ IwcpMpm[3]? IwcpPredMode0-3: IwcpPredMode0–4.
- the same index value as i can be determined from the left column of Table 3, and then the binary symbol string iwcp_pred_mode0_index can be determined from the right column of the same row.
- the encoder performs the second mode index after determining the second intra prediction mode IwcpPredMode1 used by the intra weighted combined prediction mode of the current block.
- Iwcp_pred_mode1_index you can perform the following operations:
- IwcpPredMode1 is equal to IwcpMpm[m], where m is greater than or equal to 0 and less than 4, then the value j of iwcp_pred_mode1_index is equal to m.
- IwcpPredMode1 is not equal to IwcpMpm[m]
- IwcpPredMode1 is the value j of iwcp_pred_mode1_index equal to IwcpPredMode1 ⁇ IwcpMpm[0]? IwcpPredMode1:IwcpPredMode1 ⁇ IwcpMpm[1]? IwcpPredMode1-1:IwcpPredMode1 ⁇ IwcpMpm[2]? IwcpPredMode1-2:IwcpPredMode1 ⁇ IwcpMpm[3]? IwcpPredMode1-3: IwcpPredMode1–4.
- iwcp_pred_mode1_index is greater than or equal to iwcp_pred_mode0_index, iwcp_pred_mode1_index is equal to iwcp_pred_mode1_index–1
- iwcp_pred_mode0_index If the value j of iwcp_pred_mode0_index is greater than or equal to 4, then perform binarization processing on the value j of iwcp_pred_mode1_index according to Table 3, and determine the iwcp_pred_mode1_index in the form of a binary symbol string.
- iwcp_pred_mode1_index also depends on iwcp_pred_mode0_index.
- the first intra prediction mode and the second The intra prediction modes are all MPMs in the MPM list, so there are only 3 MPMs available for the second intra prediction mode, and 1 to 2 bits can be used to indicate which MPM, such as "00, 01, 10" respectively. Indicates the remaining first MPM, second MPM, and third MPM. It can be seen that since a possibility is excluded, the codec method or the binarization or de-binarization method can be changed to save overhead.
- the preset angle prediction mode set includes 28 intra-frame angle prediction modes with mode numbers 4-31, and the length of the MPM list is 4, then when using the first length, When the binary symbol string of the second length and the third length determines the first mapping relationship table between the index value and the binary symbol string, the binary symbol string of the first length can be used for the 4 MPMs in the MPM list first, that is, using The shortest codeword. Next, 8 intra-angle prediction modes are selected from the remaining 24 intra-angle prediction modes to use the binary symbol string of the second length, and 16 intra-angle prediction modes are selected to use the binary symbol string of the third length.
- a shorter codeword can be used for the prediction modes corresponding to the first 8 mode numbers in the order of the mode numbers from small to large, that is, the first A binary symbol string of two lengths, and then a longer codeword is used for the prediction modes corresponding to the next 16 mode numbers, that is, a binary symbol string of a third length is used.
- the first mapping relationship table between the index value and the binary symbol string shown in Table 3 can be replaced with the above Table 5, wherein the first mapping table used to represent the index value and the binary symbol string Table 5 of a mapping relationship can also be used to determine the values of the first mode index and the second mode index.
- the second mapping relationship table between the index value and the binary symbol string shown in the above Table 4 can also be replaced with the above-mentioned Table 6, wherein the table used to represent the second mapping relationship between the index value and the binary symbol string 6 may also be used to determine the value of the second mode index.
- the preset angle prediction mode set includes a total of 20 modes, 4 3-bit codewords and 16 5-bit codewords can be used to represent them.
- the preset angle prediction mode set includes a total of 36 modes
- 4 3-bit codewords and 32 6-bit codewords can be used to represent them.
- 36 intra-frame angle prediction modes with mode numbers of 4-31, 42-45, and 56-59 are used.
- code word is understood as a string of binary symbols.
- the length of the codeword can be understood as the length of the binary symbol string.
- Another representation is to use a flag bit (flag) plus a binary symbol string.
- a binary MPM_flag is used to indicate whether the current mode is MPM mode, that is, if MPM_flag is 1, it means that the current mode is MPM mode, if MPM_flag is 0, it means that the current mode is not MPM mode, and if the current mode is MPM mode, there are a total of 4 possibilities for MPM.
- a 2-bit binary symbol string to indicate which MPM the current mode is. Then the code word can be understood as the flag bit plus the binary symbol string, and the length of the code word can be understood as the length of the flag bit plus the binary symbol string.
- Step 204 Write the first mode index and the second mode index into the code stream.
- the first mode index can be and the second mode index are written into the code stream and transmitted to the decoding side, so that the decoder determines the prediction value of the current block according to the first mode index and the second mode index determined by the decoding code stream.
- the encoder needs to determine the weight matrix of the current block, so that after determining the first intra prediction mode and the second intra prediction mode used by the current block, it is also based on the first intra prediction mode and the second intra prediction mode.
- the prediction mode, the second intra-frame prediction mode and the weight matrix further determine the prediction value of the current block.
- the encoder when the encoder determines the prediction value of the current block based on the first intra prediction mode, the second intra prediction mode and the weight matrix, it can first predict the prediction value according to the first intra prediction mode. mode to determine the first predicted value of the current block; at the same time, the second predicted value of the current block can be determined according to the second intra-frame prediction mode; then the first predicted value and the second predicted value can be weighted by using the weight matrix, and finally Get the predicted value of the current block.
- the encoder after determining the predicted value of the current block, can also perform a difference operation on the actual value and the predicted value of the current block to obtain a difference result between the two, so that it can The prediction difference value of the current block, that is, the residual error, is determined.
- the encoder can calculate the difference between the actual value of the current block and the predicted value in the frame, thereby obtaining the residual, and the residual is transformed, quantized, and entropy encoded into the code stream, transmitted to the decoding side.
- the encoder may determine the weight matrix of the current block according to the weight matrix derivation mode of the current block.
- the first intra-frame prediction mode and the second intra-frame prediction mode may both be intra-frame angle prediction modes, that is, two different intra-frame angle prediction modes are used in this embodiment of the present application. Then use the combination of the first intra prediction mode and the second intra prediction mode to generate the first prediction block and the second prediction block respectively, and then determine the prediction of the current block based on the first prediction block and the second prediction block, combined with the weight matrix piece.
- not all points in all possible weight matrices have the same weight.
- at least one possible weight matrix contains at least two different weight values.
- the encoder may adopt a method similar to GPM or AWP to realize the determination of the weight matrix. Specifically, if GPM or AWP is used in the same codec standard or codec, this method can be used to determine the weight matrix, so that the same logic in the multiplexing part can be achieved. If AWP is used in AVS3 inter-frame prediction, the AWP method can be used to determine the weight matrix in AVS3. Of course, different methods from GPM or AWP in the same codec standard or codec can also be used, such as using different mode numbers, or different transition region algorithms, or using different parameters.
- inter-frame prediction exploits the correlation in the temporal domain, it uses the reconstructed image in the reference frame as the reference block.
- Intra-frame prediction utilizes the correlation in the spatial domain, and it uses the reconstructed pixels around the current block as reference pixels. In the airspace, the closer the distance, the stronger the correlation, and the farther the distance, the worse the correlation. Therefore, if a certain weight matrix makes the obtained pixel position used by a prediction block far away from the reference pixel, then this part may not be able to make a more suitable prediction value than the existing technology, so such a weight matrix may not be used, but Can be used in inter prediction.
- the embodiment of the present application provides an intra-frame prediction method.
- the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine them through various weight matrices to finally obtain a better prediction block.
- the complex prediction block on the basis of improving the accuracy of intra-frame prediction, can reduce the hardware implementation cost, reduce the complexity, and realize a simple and efficient encoding and decoding method, thereby improving the compression performance.
- the encoder may further determine the intra-frame prediction mode parameter of the current block; wherein the intra-frame prediction mode parameter is used for It is judged whether the current block uses the IWCP mode; then the intra-prediction mode parameter can be written into the code stream.
- the intra prediction mode parameter may indicate whether the current block can use the IWCP mode, that is, whether the current block can use two different intra angle prediction modes to determine the prediction value of the current block.
- the intra prediction mode parameter can be understood as a flag indicating whether the IWCP mode is used.
- the encoder parses the code stream and can determine a variable that is an intra-frame prediction mode parameter, so that the intra-frame prediction mode parameter can be determined through the value of the variable.
- the encoder may set the value of the intra prediction mode parameter to indicate that the current block uses the IWCP mode. Specifically, the encoder may set the value of the variable. is 1.
- the encoder may set the value of the intra prediction mode parameter to indicate that the current block does not use the IWCP mode. Specifically, the encoder may set the variable value Set to 0.
- the encoder after the encoder completes the setting of the intra-frame prediction mode parameters, it can write the intra-frame prediction mode parameters into the code stream and transmit it to the decoder, so that the decoder can be The intra prediction mode parameters are obtained after decoding the code stream.
- the intra prediction mode parameters of the current block can be determined, and the corresponding intra prediction mode can be determined.
- the parameters are written into the code stream and transmitted from the encoder to the decoder.
- the encoder may first determine the prediction mode parameter, and then determine whether the encoding mode of the current block of the current block is through the prediction mode parameter.
- the specific encoding mode may be determined by the encoder.
- the encoder determines the prediction mode parameter of the current block of the current block, it can first use a variety of different prediction modes to predict and encode the current block respectively, and then calculate the prediction mode under the various prediction modes.
- multiple prediction modes can be used for the current block to encode the image components to be predicted, respectively.
- the encoder can obtain a rate-distortion cost result corresponding to each prediction mode;
- the minimum rate-distortion cost result is selected from the cost result, and the prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block of the current block; in this way, the determined prediction mode can finally be used to encode the current block, Moreover, in this prediction mode, the prediction residual can be made small, and the coding and decoding efficiency can be improved.
- the encoder when the encoder attempts to perform intra-frame prediction on a certain prediction block, it also attempts to encode the cost according to the IWCP mode.
- the cost in IWCP mode all or part of the possible costs are tried, and the one with the lowest cost is selected as the cost for IWCP mode encoding.
- all the above possible situations include that the first intra prediction mode of the current block is all possible prediction modes, and the second intra prediction mode of the current block is all possible prediction modes. mode, the weight matrix derives the mode as a combination of these three variations for all possible modes.
- the first intra-frame prediction mode and the second intra-frame prediction mode are two completely different intra-frame angle prediction modes
- the encoder can limit the intra-frame angle prediction modes that can be used by the IWCP mode, And limit the number of weight matrix derivation modes that can be used by the IWCP mode, then the possible situations will be reduced accordingly, and the complexity of the encoding end will also be reduced accordingly.
- the first intra-frame prediction mode has 66 possibilities, because the second intra-frame prediction mode and the first intra-frame prediction mode are The modes are different, so there are 65 possibilities.
- this application may use any two different intra-frame angle prediction modes and any one of the weight matrix derivation modes, a total of 66 ⁇ 65 ⁇ 56 possibilities.
- the available intra-angle prediction modes are limited, that is, the mode range in the preset angle prediction mode set is limited, for example, the preset angle prediction mode set is limited to only include 28 intra-angle predictions with mode numbers 4-31 mode, then, there are 28 possibilities for the first intra-frame prediction mode. Since the second intra-frame prediction mode is different from the first intra-frame prediction mode, there are 27 possibilities for the second intra-frame prediction mode. It is assumed that the weight matrix derivation mode has 56 types (taking AWP as an example), then this application may use any two different intra-frame angle prediction modes and any one of the weight matrix derivation modes, with a total of 28 ⁇ 27 ⁇ 56 possibilities.
- the encoder may perform rate-distortion optimization (Rate-Distortion Optimization, RDO) for all possible IWCP modes, and determine a combination with the smallest cost, wherein each combination includes There are combinations of the first intra prediction mode, the second intra prediction mode, and the weight matrix derivation mode.
- RDO rate-distortion optimization
- the cost may include the cost of encoding the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix derivation mode overhead in the code stream.
- the estimated cost of the overhead of the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix derivation mode in the code stream can also be used in the primary selection.
- the number of bits of the first intra prediction mode or the second intra prediction mode is estimated according to whether the MPM is MPM, or the number of bits of the first or second intra prediction mode is estimated according to the order of the intra prediction modes.
- the cost can be obtained by more accurate trial coding. In this process, the method of constructing the MPM list or sorting the intra prediction modes of the present application needs to be used.
- the first prediction block is determined according to the first intra prediction mode in the above-mentioned primary selection and fine selection
- the second prediction block is determined according to the second intra prediction mode, and is derived according to the weight matrix derivation mode.
- a weight matrix, the prediction block of the present application is determined according to the first prediction block, the second prediction block and the weight matrix.
- the current block and the predicted block are used to determine SAD and SATD in the primary selection of SAD and SATD.
- the encoder may also analyze the texture of the current block first, for example, by using gradients. Utilize the analyzed data to aid in the primaries. For example, in the texture of the current block, which direction has the stronger texture, in the above-mentioned primary selection, more attempts are made to select intra-frame prediction modes in approximate directions. For example, in the texture of the current block, in which direction the texture is weak, in the above-mentioned primary selection, less or no intra-frame prediction mode of the approximate direction is selected to try.
- the cost of coding according to the IWCP mode includes the cost of the codewords occupied by the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix derivation mode in the code stream, and the prediction residual error.
- the cost of various flags to be transmitted in the code stream such as transform quantization entropy coding and the cost of quantization coefficients, as well as the cost of distortion of the reconstructed block, etc.
- the encoder After determining the cost of encoding according to the IWCP mode, if the cost of encoding according to the IWCP mode is less than the cost of other prediction modes, wherein the other prediction modes may include other intra prediction modes or inter prediction modes, etc., the encoder will select the IWCP mode as the The prediction mode of the current block, otherwise some other prediction mode will be selected.
- the encoder will try coding costs of different block divisions, and the like. If the IWCP mode is selected for a certain prediction block, the flag bits required by the IWCP mode and the information of the first intra-frame prediction mode, the second intra-frame prediction mode, and the weight matrix derivation mode can be written in the code according to the syntax (syntax) At the same time, the prediction block is predicted according to the method of IWCP mode and the subsequent coding work is performed.
- the embodiment of the present application provides an intra-frame prediction method.
- the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine them through various weight matrices to finally obtain a better prediction block.
- the complex prediction block on the basis of improving the accuracy of intra-frame prediction, can reduce the hardware implementation cost, reduce the complexity, and realize a simple and efficient encoding and decoding method, thereby improving the compression performance.
- FIG. 10 is a schematic diagram of the composition and structure of the encoder proposed by the embodiment of the present application.
- the encoder 300 proposed by the embodiment of the present application may include the first A determination part 301, a first construction part 302, an encoding part 303,
- the first determination part 301 is configured to determine the first intra prediction mode and the second intra prediction mode of the current block when the current block uses the IWCP mode to determine the intra prediction value of the current block; wherein, The first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes;
- the first construction part 302 is configured to construct the MPM list of the current block
- the first determining part 301 is further configured to determine a first mode index and a second mode index of the current block according to the first intra prediction mode, the second intra prediction mode and the MPM list;
- the encoding part 303 is configured to write the first mode index and the second mode index into a code stream.
- FIG. 11 is a second schematic diagram of the composition and structure of the encoder proposed by the embodiment of the present application.
- the encoder 300 proposed by the embodiment of the present application may further include a first processor 304 and store the executable of the first processor 304 A first memory 305 for instructions, a first communication interface 306 , and a first bus 307 for connecting the first processor 304 , the first memory 305 , and the first communication interface 306 .
- the above-mentioned first processor 304 is configured to determine the first intra prediction mode of the current block when the current block uses the IWCP mode to determine the intra prediction value of the current block and a second intra-frame prediction mode; wherein, the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; construct the MPM list of the current block; according to the The first intra prediction mode, the second intra prediction mode and the MPM list determine the first mode index and the second mode index of the current block; the first mode index and the second mode index are combined Write the code stream.
- FIG. 12 is a schematic diagram 1 of the composition and structure of the decoder proposed by the embodiment of the present application.
- the decoder 400 proposed by the embodiment of the present application may include a decoding part 401, a second determining part 402, a second constructing part 403,
- the decoding part 401 is configured to decode the code stream
- the second determining part 402 is configured to determine the intra prediction mode parameter of the current block; when the intra prediction mode parameter indicates that the current block uses the IWCP mode to determine the intra prediction value of the current block, determine the intra prediction value of the current block. the first mode index and the second mode index of the current block;
- the second construction part 403 is configured to construct the most probable mode MPM list of the current block
- the second determining part 402 is further configured to determine the first intra prediction mode and the second intra prediction mode of the current block according to the first mode index, the second mode index and the MPM list;
- the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes;
- the weight matrix of the current block is determined, and based on the first intra-frame prediction mode, the The second intra prediction mode and the weight matrix determine the prediction value of the current block.
- FIG. 13 is a second schematic diagram of the composition and structure of the decoder proposed by the embodiment of the present application.
- the decoder 400 proposed by the embodiment of the present application may further include a second processor 404, and store the executable of the second processor 404.
- the above-mentioned second processor 404 is configured to decode the code stream and determine the intra-frame prediction mode parameter of the current block; when the intra-frame prediction mode parameter indicates that the current block uses the IWCP mode
- determine the first mode index and the second mode index of the current block construct a MPM list of the most probable mode of the current block; according to the first mode index, the The second mode index and the MPM list determine the first intra prediction mode and the second intra prediction mode of the current block; wherein the first intra prediction mode and the second intra prediction mode are two different intra-frame angle prediction modes; determining a weight matrix of the current block, and determining a prediction value of the current block based on the first intra-frame prediction mode, the second intra-frame prediction mode and the weight matrix.
- each functional module in this embodiment may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of software function modules.
- the integrated unit is implemented in the form of software function modules and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of this embodiment is essentially or correct. Part of the contribution made by the prior art or all or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium, and includes several instructions to make a computer device (which can be a personal A computer, a server, or a network device, etc.) or a processor (processor) executes all or part of the steps of the method in this embodiment.
- the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes.
- Embodiments of the present application provide an encoder and a decoder.
- the decoder decodes a code stream and determines an intra-frame prediction mode parameter of a current block; when the intra-frame prediction mode parameter indicates that the current block uses the IWCP mode to determine the intra-frame prediction value of the current block , determine the first mode index and the second mode index of the current block; construct the most probable mode MPM list of the current block; determine the first intra prediction mode and The second intra-frame prediction mode; wherein, the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; determine the weight matrix of the current block, and based on the first intra-frame prediction mode, the first intra-frame prediction mode Two intra-frame prediction modes and a weight matrix to determine the predicted value of the current block.
- the encoder determines the first intra prediction mode and the second intra prediction mode of the current block; wherein, the first intra prediction mode and the second intra prediction The mode is two different intra-frame angle prediction modes; the MPM list of the current block is constructed; the first mode index and the second mode index of the current block are determined according to the first intra-frame prediction mode, the second intra-frame prediction mode and the MPM list; Write the first mode index and the second mode index into the code stream. That is to say, in the embodiment of the present application, the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine them through various weight matrices to finally obtain a better prediction block.
- the complex prediction block on the basis of improving the accuracy of intra-frame prediction, can reduce the hardware implementation cost, reduce the complexity, and realize a simple and efficient encoding and decoding method, thereby improving the compression performance.
- Embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method described in the foregoing embodiments is implemented.
- a program instruction corresponding to an intra-frame prediction method in this embodiment may be stored on a storage medium such as an optical disk, a hard disk, a U disk, etc.
- a storage medium such as an optical disk, a hard disk, a U disk, etc.
- the intra prediction mode parameter indicates that the current block uses the IWCP mode to determine the intra prediction value of the current block, determining a first mode index and a second mode index of the current block;
- a first intra prediction mode and a second intra prediction mode of the current block are determined according to the first mode index, the second mode index and the MPM list; wherein the first intra prediction mode and The second intra-frame prediction modes are two different intra-frame angle prediction modes;
- a weight matrix of the current block is determined, and a prediction value of the current block is determined based on the first intra prediction mode, the second intra prediction mode and the weight matrix.
- the first intra prediction mode and the second intra prediction mode of the current block are determined; wherein the first intra prediction mode and the second intra prediction mode are determined.
- the second intra-frame prediction mode is two different intra-frame angle prediction modes;
- the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, optical storage, and the like.
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
- An apparatus implements the functions specified in a flow or flows of the implementation flow diagram and/or a block or blocks of the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the implementing flow diagram and/or the block or blocks of the block diagram.
- the embodiments of the present application provide an intra-frame prediction method, an encoder, a decoder, and a storage medium.
- the decoder decodes a code stream and determines an intra-frame prediction mode parameter of a current block; when the intra-frame prediction mode parameter indicates that the current block uses the IWCP mode
- determine the intra-frame prediction value of the current block determine the first mode index and the second mode index of the current block; construct the most probable mode MPM list of the current block; determine the current block according to the first mode index, the second mode index and the MPM list
- the first intra-frame prediction mode and the second intra-frame prediction mode are two different intra-frame angle prediction modes; the weight matrix of the current block is determined and based The first intra prediction mode, the second intra prediction mode and the weight matrix determine the prediction value of the current block.
- the encoder determines the first intra prediction mode and the second intra prediction mode of the current block; wherein, the first intra prediction mode and the second intra prediction The mode is two different intra-frame angle prediction modes; the MPM list of the current block is constructed; the first mode index and the second mode index of the current block are determined according to the first intra-frame prediction mode, the second intra-frame prediction mode and the MPM list; Write the first mode index and the second mode index into the code stream. That is to say, in the embodiment of the present application, the codec can determine two different prediction blocks of the current block through two different intra-frame angle prediction modes, and then can combine them through various weight matrices to finally obtain a better prediction block.
- the complex prediction block on the basis of improving the accuracy of intra-frame prediction, can reduce the hardware implementation cost, reduce the complexity, and realize a simple and efficient encoding and decoding method, thereby improving the compression performance.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
分界线角度的索引 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
候选模式0 | 30 | 27 | 24 | 21 | 18 | 15 | 12 | 9 |
候选模式1 | 6 | 24 | 12 | 24 | 17 | 14 | 24 | 12 |
候选模式2 | 24 | 6 | 23 | 18 | 19 | 16 | 11 | 8 |
候选模式3 | 12 | 9 | 25 | 12 | 24 | 12 | 13 | 10 |
序列头定义 | 描述符 |
sequence_header(){ | |
…… | |
iwcp_enable_flag | u(1) |
…… |
Claims (76)
- 一种帧内预测方法,应用于解码器,所述方法包括:解码码流,确定当前块的帧内预测模式参数;当所述帧内预测模式参数指示所述当前块使用帧内加权组合预测IWCP模式确定所述当前块的帧内预测值时,确定所述当前块的第一模式索引和第二模式索引;构建所述当前块的最可能模式MPM列表;根据所述第一模式索引、所述第二模式索引以及所述MPM列表确定所述当前块的第一帧内预测模式和第二帧内预测模式;其中,所述第一帧内预测模式和所述第二帧内预测模式为两个不同的帧内角度预测模式;确定当前块的权重矩阵,并基于所述第一帧内预测模式、所述第二帧内预测模式以及所述权重矩阵,确定所述当前块的预测值。
- 根据权利要求1所述的方法,其中,所述方法还包括:确定所述当前块的权重矩阵导出模式。
- 根据权利要求2所述的方法,其中,所述构建所述当前块的MPM列表,包括:基于所述当前块的相邻块的预测模式和所述权重矩阵导出模式,构建所述MPM列表。
- 根据权利要求2所述的方法,其中,所述构建所述当前块的MPM列表,包括:基于所述当前块的相邻块的预测模式、预设角度预测模式集合以及所述权重矩阵导出模式,构建所述MPM列表。
- 根据权利要求4所述的方法,其中,所述基于所述当前块的相邻块的帧内预测模式、预设角度预测模式集合以及所述权重矩阵导出模式,构建所述MPM列表,包括:利用所述相邻块的预测模式确定第一候选模式;利用所述权重矩阵导出模式确定第二候选模式;根据所述第一候选模式、所述第二候选模式以及所述预设角度预测模式集合,构建所述MPM列表。
- 根据权利要求5所述的方法,其中,所述利用所述相邻块的预测模式确定第一候选模式,包括:若所述相邻块为普通帧内预测块,且所述相邻块的预测模式为帧内预测模式,则将所述相邻块的预测模式确定为第一候选模式。
- 根据权利要求5所述的方法,其中,所述利用所述权重矩阵导出模式确定第二候选模式,包括:根据所述权重矩阵导出模式确定分界线角度索引值;利用所述分界线角度索引值确定所述第二候选模式。
- 根据权利要求5所述的方法,其中,所述根据所述第一候选模式、所述第二候选模式以及所述预设角度预测模式集合,构建所述MPM列表,包括:基于所述预设角度预测模式集合对所述第一候选模式进行筛选处理,获得筛选后候选模式;根据所述筛选后候选模式和所述第二候选模式,构建所述MPM列表。
- 根据权利要求8所述的方法,其中,所述基于所述预设角度预测模式集合对所述第一候选模式进行筛选处理,获得筛选后候选模式,包括:若所述第一候选模式属于所述预设角度预测模式集合,则将所述第一候选模式确定为所述筛选后候选模式;若所述第一候选模式为帧内角度预测模式且不属于所述预设角度预测模式集合,则在所述预设角度预测模式集合中确定所述第一候选模式的替换模式,并将所述替换模式确定为所述筛选后候选模式。
- 根据权利要求8所述的方法,其中,所述方法还包括:若所述第一候选模式不为帧内角度预测模式,则删除所述第一候选模式。
- 根据权利要求8所述的方法,其中,所述根据所述筛选后候选模式和所述第二候选模式,构建所述MPM列表,包括:若所述筛选后候选模式满足预设添加条件,则将所述筛选后候选模式添加至所述MPM列表;若所述MPM列表不满足预设列表长度L,且所述第二候选模式满足所述预设添加条件,则将所述第二候选模式添加至所述MPM列表;其中,L为大于等于1的整数。
- 根据权利要求11所述的方法,其中,所述方法还包括:若所述筛选后候选模式与所述MPM列表中的预测模式均不相同,则确定所述筛选后候选模式满足所述预设添加条件;若所述第二候选模式与所述MPM列表中的预测模式均不相同,则确定所述第二候选模式满足所述预设添加条件。
- 根据权利要求11所述的方法,其中,所述方法还包括:确定所述相邻块对应的顺序参数;按照所述顺序参数,依次将所述筛选后候选模式添加至所述MPM列表。
- 根据权利要求11所述的方法,其中,所述方法还包括:按照模式号由小到大的顺序对所述MPM列表中的预测模式进行排序处理。
- 根据权利要求14所述的方法,其中,所述方法还包括:确定索引值与二元符号串的第一映射关系表;其中,所述第一映射关系表中分别包括第一长度、第二长度以及第三长度的二元符号串。
- 根据权利要求15所述的方法,其中,所述方法还包括:所述MPM列表中的预测模式使用所述第一长度的二元符号串;所述预设角度预测模式集合中、所述MPM列表以外的其他预测模式使用所述第二长度的二元符号串和所述第三 长度的二元符号串。
- 根据权利要求16所述的方法,其中,所述根据所述第一模式索引、所述第二模式索引以及所述MPM列表确定所述当前块的第一帧内预测模式和第二帧内预测模式,包括:根据所述第一映射关系表确定所述第一模式索引的值i;若i大于等于0且小于L,则将所述MPM列表中的第(i+1)个角度预测模式确定为所述第一帧内预测模式;若i大于等于L,则利用所述预设角度预测模式集合和所述MPM列表确定所述第一帧内预测模式。
- 根据权利要求17所述的方法,其中,所述利用所述预设角度预测模式集合和所述MPM列表确定所述第一帧内预测模式,包括:若i大于等于所述MPM列表中的第一个模式的模式号,则对i和1进行求和运算;若(i+1)大于等于所述MPM列表中的第二个模式的模式号,则对(i+1)和1进行求和运算;若(i+2)大于等于所述MPM列表中的第三个模式的模式号,则对(i+2)和1进行求和运算;若(i+3)大于等于所述MPM列表中的第四个模式的模式号,则对(i+3)和1进行求和运算;将(i+4)确定为所述第一帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第一帧内预测模式。
- 根据权利要求18所述的方法,其中,所述方法还包括:若i小于所述MPM列表中的第一个模式的模式号,则将i确定为所述第一帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第一帧内预测模式;或者,若(i+1)小于所述MPM列表中的第二个模式的模式号,则将(i+1)确定为所述第一帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第一帧内预测模式;或者,若(i+2)小于所述MPM列表中的第三个模式的模式号,则将(i+2)确定为所述第一帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第一帧内预测模式;或者,若(i+3)小于所述MPM列表中的第四个模式的模式号,则将(i+3)确定为所述第一帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第一帧内预测模式。
- 根据权利要求16所述的方法,其中,所述根据所述第一模式索引、所述第二模式索引以及所述MPM列表确定所述当前块的第一帧内预测模式和第二帧内预测模式,包括:根据所述第一映射关系表确定所述第二模式索引的值j;若j大于等于0且小于L,则将所述MPM列表中的第(i+1)个角度预测模式确定为所述第一帧内预测模式;若j大于等于L,则利用所述预设角度预测模式集合和所述MPM列表确定所述第一帧内预测模式。
- 根据权利要求20所述的方法,其中,所述利用所述预设角度预测模式集合和所述MPM列表确定所述第二帧内预测模式,包括:若j大于等于所述MPM列表中的第一个模式的模式号,则对j和1进行求和运算;若(j+1)大于等于所述MPM列表中的第二个模式的模式号,则对(j+1)和1进行求和运算;若(j+2)大于等于所述MPM列表中的第三个模式的模式号,则对(j+2)和1进行求和运算;若(j+3)大于等于所述MPM列表中的第四个模式的模式号,则对(j+3)和1进行求和运算;将(j+4)确定为所述第二帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第二帧内预测模式。
- 根据权利要求21所述的方法,其中,所述方法还包括:若j小于所述MPM列表中的第一个模式的模式号,则将j确定为所述第二帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第二帧内预测模式;或者,若(j+1)小于所述MPM列表中的第二个模式的模式号,则将(j+1)确定为所述第二帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第二帧内预测模式;或者,若(j+2)小于所述MPM列表中的第三个模式的模式号,则将(j+2)确定为所述第二帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第二帧内预测模式;或者,若(j+3)小于所述MPM列表中的第四个模式的模式号,则将(j+3)确定为所述第二帧内预测模式的模式号,并在所述预设角度预测模式集合中确定所述第二帧内预测模式。
- 根据权利要求17所述的方法,其中,所述若i大于等于0且小于L,则将所述MPM列表中的第(i+1)个角度预测模式确定为所述第一帧内预测模式之后,所述方法还包括:根据索引值与二元符号串的第二映射关系表确定所述第二模式索引的值j;若j大于等于i,则对j进行加1运算;若j大于等于0且小于L,则将所述MPM列表中的第(j+1)个角度预测模式确定为所述第二帧内预测模式;若j大于等于L,则利用所述预设角度预测模式集合和所述MPM列表确定所述第二帧内预测模式。
- 根据权利要2所述的方法,其中,所述确定当前块的权重矩阵,包括:根据所述权重矩阵导出模式确定所述当前块的权重矩阵。
- 根据权利要求24所述的方法,其中,所述基于所述第一帧内预测模式、所述第二帧内预测模式以及所述权重矩阵,确定所述当前块的预测值,包括:根据所述第一帧内预测模式确定所述当前块的第一预测值;根据所述第二帧内预测模式确定所述当前块的第二预测值;利用所述权重矩阵对所述第一预测值和所述第二预测值进行加权运算,获得所述当前块的预测值。
- 根据权利要求11所述的方法,其中,所述L等于4。
- 根据权利要求11所述的方法,其中,所述第二候选模式为L个不同的帧内角度预测模式。
- 根据权利要求4所述的方法,其中,所述预设角度预测模式集合包括模式号为4-31的28个帧内角度预测模式。
- 根据权利要求4所述的方法,其中,所述第一帧内预测模式和所述第二帧内预测模式分别为所述预设角度预测模式集合中的两个不同的帧内角度预测模式。
- 根据权利要求1所述的方法,其中,所述方法还包括:所述MPM列表中的预测模式均为帧内角度预测模式。
- 根据权利要求1所述的方法,其中,所述方法还包括:确定所述当前块的尺寸参数;根据所述尺寸参数确定所述当前块是否使用所述IWCP模式。
- 根据权利要求31所述的方法,其中,所述尺寸参数包括宽度和高度;所述方法还包括:若所述宽度和所述高度均大于等于第一下限值,且所述宽度和所述高度均小于等于第一上限值,则确定所述当前块使用所述IWCP模式。
- 根据权利要求1所述的方法,其中,所述方法还包括:对比特标志为0的二元符号串使用上下文模型进行解码,对比特标志不为0的二元符号串不使用上下文模型进行解码。
- 根据权利要求1所述的方法,其中,所述方法还包括:若所述帧内预测模式参数指示所述当前块使用IWCP模式,则不解码衍生模式DT、帧内预测滤波IPF、改进型帧内预测IIP的标志信息。
- 根据权利要求1所述的方法,其中,所述方法还包括:对于YUV4:2:0格式,若所述当前块为亮度的8×8的块,则确定所述当前块使用所述IWCP模式;若所述当前块为色度的4×4的块,则确定所述当前块不使用所述IWCP模式。
- 一种帧内预测方法,应用于编码器,所述方法包括:当当前块使用IWCP模式确定所述当前块的帧内预测值时,确定所述当前块的第一帧内预测模式和第二帧内预测模式;其中,所述第一帧内预测模式和所述第二帧内预测模式为两个不同的帧内角度预测模式;构建所述当前块的MPM列表;根据所述第一帧内预测模式、所述第二帧内预测模式以及所述MPM列表确定所述当前块的第一模式索引和第二模式索引;将所述第一模式索引和所述第二模式索引写入码流。
- 根据权利要求36所述的方法,其中,所述方法还包括:确定所述当前块的权重矩阵导出模式。
- 根据权利要求37所述的方法,其中,所述构建所述当前块的MPM列表,包括:基于所述当前块的相邻块的预测模式和所述权重矩阵导出模式,构建所述MPM列表。
- 根据权利要求37所述的方法,其中,所述构建所述当前块的MPM列表,包括:基于所述当前块的相邻块的预测模式、预设角度预测模式集合以及所述权重矩阵导出模式,构建所述MPM列表。
- 根据权利要求39所述的方法,其中,所述基于所述当前块的相邻块的帧内预测模式、预设角度预测模式集合以及所述权重矩阵导出模式,构建所述MPM列表,包括:利用所述相邻块的预测模式确定第一候选模式;利用所述权重矩阵导出模式确定第二候选模式;根据所述第一候选模式、所述第二候选模式以及所述预设角度预测模式集合,构建所述MPM列表。
- 根据权利要求40所述的方法,其中,所述利用所述相邻块的预测模式确定第一候选模式,包括:若所述相邻块为普通帧内预测块,且所述相邻块的预测模式为帧内预测模式,则将所述相邻块的预测模式确定为第一候选模式。
- 根据权利要求40所述的方法,其中,所述利用所述权重矩阵导出模式确定第二候选模式,包括:根据所述权重矩阵导出模式确定分界线角度索引值;利用所述分界线角度索引值确定所述第二候选模式。
- 根据权利要求40所述的方法,其中,所述根据所述第一候选模式、所述第二候选模式以及所述预设角度预测模式集合,构建所述MPM列表,包括:基于所述预设角度预测模式集合对所述第一候选模式进行筛选处理,获得筛选后候选模式;根据所述筛选后候选模式和所述第二候选模式,构建所述MPM列表。
- 根据权利要求43所述的方法,其中,所述基于所述预设角度预测模式集合对所述第一候选模式进行筛选处理,获得筛选后候选模式,包括:若所述第一候选模式属于所述预设角度预测模式集合,则将所述第一候选模式确定为所述筛选后候选模式;若所述第一候选模式为帧内角度预测模式且不属于所述预设角度预测模式集合,则在所述预设角度预测模式集合中确定所述第一候选模式的替换模式,并将所述替换模式确定为所述筛选后候选模式。
- 根据权利要求43所述的方法,其中,所述方法还包括:若所述第一候选模式不为帧内角度预测模式,则删除所述第一候选模式。
- 根据权利要求43所述的方法,其中,所述根据所述筛选后候选模式和所述第二候选模式,构建所述MPM列表,包括:若所述筛选后候选模式满足预设添加条件,则将所述筛选后候选模式添加至所述MPM列表;若所述MPM列表不满足预设列表长度L,且所述第二候选模式满足所述预设添加条件,则将所述第二候选模式添加至所述MPM列表;其中,L为大于等于1的整数。
- 根据权利要求46所述的方法,其中,所述方法还包括:若所述筛选后候选模式与所述MPM列表中的预测模式均不相同,则确定所述筛选后候选模式满足所述预设添加条件;若所述第二候选模式与所述MPM列表中的预测模式均不相同,则确定所述第二候选模式满足所述预设添加条件。
- 根据权利要求46所述的方法,其中,所述方法还包括:确定所述相邻块对应的顺序参数;按照所述顺序参数,依次将所述筛选后候选模式添加至所述MPM列表。
- 根据权利要求46所述的方法,其中,所述方法还包括:按照模式号由小到大的顺序对所述MPM列表中的预测模式进行排序处理。
- 根据权利要求49所述的方法,其中,所述方法还包括:确定索引值与二元符号串的第一映射关系表;其中,所述第一映射关系表中分别包括第一长度、第二长度以及第三长度的二元符号串。
- 根据权利要求50所述的方法,其中,所述方法还包括:所述MPM列表中的预测模式使用所述第一长度的二元符号串;所述预设角度预测模式集合中、所述MPM列表以外的其他预测模式使用所述第二长度的二元符号串和所述第三长度的二元符号串。
- 根据权利要求51所述的方法,其中,所述根据所述第一帧内预测模式、所述第二帧内预测模式以及所述MPM列表确定所述当前块的第一模式索引和第二模式索引,包括:若所述第一帧内预测模式的模式号与所述MPM列表中的第m个模式的模式号相同,则按照m对所述第一模式索引的值i进行赋值;其中,m为大于等于0且小于L的整数;若所述第一帧内预测模式的模式号与所述MPM列表中的任一个模式的模式号均不同,则利用所述MPM列表确定所述第一模式索引的值i;根据所述第一映射关系表和i确定所述第一模式索引。
- 根据权利要求52所述的方法,其中,所述利用所述MPM列表确定所述第一模式索引的值i,包括:若所述第一帧内预测模式的模式号大于等于所述MPM列表中的第四个模式的模式号,则按照所述所述第一帧内预测模式的模式号与4的差值对i进行赋值;若所述第一帧内预测模式的模式号小于所述MPM列表中的第四个模式的模式号,且大于等于所述MPM列表中的第三个模式的模式号,则按照所述所述第一帧内预测模式的模式号与3的差值对i进行赋值;若所述第一帧内预测模式的模式号小于所述MPM列表中的第三个模式的模式号,且大于等于所述MPM列表中的第二个模式的模式号,则按照所述所述第一帧内预测模式的模式号与2的差值对i进行赋值;若所述第一帧内预测模式的模式号小于所述MPM列表中的第二个模式的模式号,且大于等于所述MPM列表中的第一个模式的模式号,则按照所述所述第一帧内预测模式的模式号与1的差值对i进行赋值;若所述第一帧内预测模式的模式号小于所述MPM列表中的第一个模式的模式号,则按照所述所述第一帧内预测模式的模式号对i进行赋值。
- 根据权利要求52所述的方法,其中,所述根据所述第一映射关系表和i确定所述第一模式索引,包括:按照所述第一映射关系表对i进行二值化处理,确定所述第一模式索引。
- 根据权利要求51所述的方法,其中,所述根据所述第一帧内预测模式、所述第二帧内预测模式以及所述MPM列表确定所述当前块的第一模式索引和第二模式索引,包括:若所述第二帧内预测模式的模式号与所述MPM列表中的第m个模式的模式号相同,则按照m对所述第二模式索引的值j进行赋值;其中,m为大于等于0且小于L的整数;若所述第二帧内预测模式的模式号与所述MPM列表中的任一个模式的模式号均不同,则利用所述MPM列表确定所述第二模式索引的值j;根据所述第一映射关系表和j确定所述第二模式索引。
- 根据权利要求55所述的方法,其中,所述利用所述MPM列表确定所述第二模式索引的值j,包括:若所述第二帧内预测模式的模式号大于等于所述MPM列表中的第四个模式的模式号,则按照所述所述第二帧内预测模式的模式号与4的差值对j进行赋值;若所述第二帧内预测模式的模式号小于所述MPM列表中的第四个模式的模式号,且大于等于所述MPM列表中的第三个模式的模式号,则按照所述所述第二帧内预测模式的模式号与3的差值对j进行赋值;若所述第二帧内预测模式的模式号小于所述MPM列表中的第三个模式的模式号,且大于等于所述MPM列表中的第二个模式的模式号,则按照所述所述第二帧内预测模式的模式号与2的差值对j进行赋值;若所述第二帧内预测模式的模式号小于所述MPM列表中的第二个模式的模式号,且大于等于所述MPM列表中的第一个模式的模式号,则按照所述所述第二帧内预测模式的模式号与1的差值对j进行赋值;若所述第二帧内预测模式的模式号小于所述MPM列表中的第一个模式的模式号,则按照所述所述第二帧内预测模式的模式号对j进行赋值。
- 根据权利要求55所述的方法,其中,所述根据所述第一映射关系表和j确定所述第二模式索引,包括:按照所述第一映射关系表对j进行二值化处理,确定所述第二模式索引。
- 根据权利要求52所述的方法,其中,所述根据所述第一帧内预测模式、所述第二帧内预测模式以及所述MPM列表确定所述当前块的第一模式索引和第二模式索引,包括:若所述第二帧内预测模式的模式号与所述MPM列表中的第m个模式的模式号相同,则按照m对所述第二模式索引的值j进行赋值;其中,m为大于等于0且小于L的整数;若所述第二帧内预测模式的模式号与所述MPM列表中的任一个模式的模式号均不同,则利用所述MPM列表确定所述第二模式索引的值j;根据所述第一映射关系表、索引值与二元符号串的第二映射关系表以及j确定所述第二模式索引。
- 根据权利要求58所述的方法,其中,所述根据所述第一映射关系表、索引值与二元符号串的第二映射关系表以及j确定所述第二模式索引,包括:若i小于L且小于j,则在对j进行减1运算后,根据所述第二映射关系表对j进行二值化处理,确定所述第二模式索引;若j大于等于L,则根据所述第一映射关系表对j进行二值化处理,确定所述第二模式索引。
- 根据权利要37所述的方法,其中,所述确定当前块的权重矩阵,包括:根据所述权重矩阵导出模式确定所述当前块的权重矩阵。
- 根据权利要求60所述的方法,其中,所述方法还包括:根据所述第一帧内预测模式确定所述当前块的第一预测值;根据所述第二帧内预测模式确定所述当前块的第二预测值;利用所述权重矩阵对所述第一预测值和所述第二预测值进行加权运算,获得所述当前块的预测值。
- 根据权利要求46所述的方法,其中,所述L等于4。
- 根据权利要求46所述的方法,其中,所述第二候选模式为L个不同的帧内角度预测模式。
- 根据权利要求39所述的方法,其中,所述预设角度预测模式集合包括模式号为4-31的28个帧内角度预测模式。
- 根据权利要求39所述的方法,其中,所述第一帧内预测模式和所述第二帧内预测模式分别为所述预设角度预测模式集合中的两个不同的帧内角度预测模式。
- 根据权利要求36所述的方法,其中,所述方法还包括:所述MPM列表中的预测模式均为帧内角度预测模式。
- 根据权利要求36所述的方法,其中,所述方法还包括:确定所述当前块的尺寸参数;根据所述尺寸参数确定所述当前块是否使用所述IWCP模式。
- 根据权利要求67所述的方法,其中,所述尺寸参数包括宽度和高度;所述方法还包括:若所述宽度和所述高度均大于等于第一下限值,且所述宽度和所述高度均小于等于第一上限值,则确定所述当前块使用所述IWCP模式。
- 根据权利要求36所述的方法,其中,所述方法还包括:确定所述当前块的帧内预测模式参数;其中,所述帧内预测模式参数用于判断所述当前块是否使用所述IWCP模式;将所述镇内预测模式参数写入所述码流。
- 根据权利要求36所述的方法,其中,所述方法还包括:对比特标志为0的二元符号串使用上下文模型进行编码,对比特标志不为0的二元符号串不使用上下文模型进行编码。
- 根据权利要求36所述的方法,其中,所述方法还包括:对于YUV4:2:0格式,若所述当前块为亮度的8×8的块,则确定所述当前块使用所述IWCP模式;若所述当前块为色度的4×4的块,则确定所述当前块不使用所述IWCP模式。
- 一种编码器,所述编码器包括:第一确定部分,第一构建部分,编码部分,所述第一确定部分,配置为当当前块使用IWCP模式确定所述当前块的帧内预测值时,确定所述当前块的第一帧内预测模式和第二帧内预测模式;其中,所述第一帧内预测模式和所述第二帧内预测模式为两个不同的帧内角度预测模式;所述第一构建部分,配置为构建所述当前块的MPM列表;所述第一确定部分,还配置为根据所述第一帧内预测模式、所述第二帧内预测模式以及所述MPM列表确定所述当前块的第一模式索引和第二模式索引;所述编码部分,配置为将所述第一模式索引和所述第二模式索引写入码流。
- 一种编码器,所述解码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被执行时,所述第一处理器执行时实现如权利要求1-35任一项所述的方法。
- 一种解码器,所述解码器包括:解码部分,第二确定部分,第二构建部分,所述解码部分,配置为解码码流;所述第二确定部分,配置为确定当前块的帧内预测模式参数;当所述帧内预测模式参数指示所述当前块使用IWCP模式确定所述当前块的帧内预测值时,确定所述当前块的第一模式索引和第二模式索引;第二构建部分,配置为构建所述当前块的最可能模式MPM列表;所述第二确定部分,还配置为根据所述第一模式索引、所述第二模式索引以及所述MPM列表确定所述当前块的 第一帧内预测模式和第二帧内预测模式;其中,所述第一帧内预测模式和所述第二帧内预测模式为两个不同的帧内角度预测模式;确定当前块的权重矩阵,并基于所述第一帧内预测模式、所述第二帧内预测模式以及所述权重矩阵,确定所述当前块的预测值。
- 一种解码器,所述编码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被执行时,所述第二处理器执行时实现如权利要求36-71任一项所述的方法。
- 一种计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如权利要求1-35任一项所述的方法,或者,被第二处理器执行时实现如权利要求36-71任一项所述的方法。
Priority Applications (8)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2021/077324 WO2022174467A1 (zh) | 2021-02-22 | 2021-02-22 | 帧内预测方法、编码器、解码器以及存储介质 |
EP21926184.9A EP4297406A1 (en) | 2021-02-22 | 2021-02-22 | Intra-frame prediction method, coder, decoder and storage medium |
CN202311667837.7A CN117676133A (zh) | 2021-02-22 | 2021-02-22 | 帧内预测方法、编码器、解码器以及存储介质 |
JP2023549679A JP2024511272A (ja) | 2021-02-22 | 2021-02-22 | イントラ予測方法、符号器、復号器及び記憶媒体 |
KR1020237031641A KR20230147149A (ko) | 2021-02-22 | 2021-02-22 | 인트라 예측 방법, 인코더, 디코더 및 저장 매체 |
MX2023009740A MX2023009740A (es) | 2021-02-22 | 2021-02-22 | Metodo de prediccion intra, codificador, decodificador y medio de almacenamiento. |
CN202180092098.6A CN116830584A (zh) | 2021-02-22 | 2021-02-22 | 帧内预测方法、编码器、解码器以及存储介质 |
US18/450,377 US20230403392A1 (en) | 2021-02-22 | 2023-08-15 | Intra prediction method and decoder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2021/077324 WO2022174467A1 (zh) | 2021-02-22 | 2021-02-22 | 帧内预测方法、编码器、解码器以及存储介质 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/450,377 Continuation US20230403392A1 (en) | 2021-02-22 | 2023-08-15 | Intra prediction method and decoder |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022174467A1 true WO2022174467A1 (zh) | 2022-08-25 |
Family
ID=82931976
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/077324 WO2022174467A1 (zh) | 2021-02-22 | 2021-02-22 | 帧内预测方法、编码器、解码器以及存储介质 |
Country Status (7)
Country | Link |
---|---|
US (1) | US20230403392A1 (zh) |
EP (1) | EP4297406A1 (zh) |
JP (1) | JP2024511272A (zh) |
KR (1) | KR20230147149A (zh) |
CN (2) | CN117676133A (zh) |
MX (1) | MX2023009740A (zh) |
WO (1) | WO2022174467A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9609343B1 (en) * | 2013-12-20 | 2017-03-28 | Google Inc. | Video coding using compound prediction |
CN111373750A (zh) * | 2017-10-24 | 2020-07-03 | 韦勒斯标准与技术协会公司 | 视频信号处理方法和装置 |
CN111937390A (zh) * | 2018-09-14 | 2020-11-13 | 腾讯美国有限责任公司 | 用于实现针对多行帧内预测的mpm列表生成的方法和装置 |
CN112385234A (zh) * | 2018-10-09 | 2021-02-19 | 华为技术有限公司 | 图像和视频译码的设备和方法 |
-
2021
- 2021-02-22 JP JP2023549679A patent/JP2024511272A/ja active Pending
- 2021-02-22 EP EP21926184.9A patent/EP4297406A1/en active Pending
- 2021-02-22 KR KR1020237031641A patent/KR20230147149A/ko active Search and Examination
- 2021-02-22 CN CN202311667837.7A patent/CN117676133A/zh active Pending
- 2021-02-22 CN CN202180092098.6A patent/CN116830584A/zh active Pending
- 2021-02-22 WO PCT/CN2021/077324 patent/WO2022174467A1/zh active Application Filing
- 2021-02-22 MX MX2023009740A patent/MX2023009740A/es unknown
-
2023
- 2023-08-15 US US18/450,377 patent/US20230403392A1/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9609343B1 (en) * | 2013-12-20 | 2017-03-28 | Google Inc. | Video coding using compound prediction |
CN111373750A (zh) * | 2017-10-24 | 2020-07-03 | 韦勒斯标准与技术协会公司 | 视频信号处理方法和装置 |
CN111937390A (zh) * | 2018-09-14 | 2020-11-13 | 腾讯美国有限责任公司 | 用于实现针对多行帧内预测的mpm列表生成的方法和装置 |
CN112385234A (zh) * | 2018-10-09 | 2021-02-19 | 华为技术有限公司 | 图像和视频译码的设备和方法 |
Also Published As
Publication number | Publication date |
---|---|
US20230403392A1 (en) | 2023-12-14 |
EP4297406A1 (en) | 2023-12-27 |
KR20230147149A (ko) | 2023-10-20 |
CN117676133A (zh) | 2024-03-08 |
CN116830584A (zh) | 2023-09-29 |
JP2024511272A (ja) | 2024-03-13 |
MX2023009740A (es) | 2023-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020253831A1 (zh) | 一种编解码方法、装置及存储介质 | |
CA3029038C (en) | Enhanced intra-prediction coding using planar representations | |
TW202029765A (zh) | 用於編碼或解碼轉換塊的方法與裝置 | |
US10284841B2 (en) | Method for encoding/decoding an intra-picture prediction mode using two intra-prediction mode candidate, and apparatus using such a method | |
WO2022117089A1 (zh) | 预测方法、编码器、解码器以及存储介质 | |
KR20130045150A (ko) | 영상 복호화 방법 및 장치 | |
CN113766247B (zh) | 环路滤波的方法与装置 | |
US11706449B2 (en) | Method and device for intra-prediction | |
WO2021203924A1 (zh) | 编码方法、解码方法、编码器、解码器以及存储介质 | |
CN116668695B (zh) | 用于视频编码的方法、计算设备和存储介质 | |
JP7286783B2 (ja) | 符号化方法、復号化方法、デコーダ、エンコーダー及び記憶媒体 | |
WO2022116113A1 (zh) | 一种帧内预测方法、装置及解码器和编码器 | |
KR20210133978A (ko) | 비디오 코딩을 위한 잔차 코딩에서의 정규 빈들의 유연한 할당 | |
WO2022174467A1 (zh) | 帧内预测方法、编码器、解码器以及存储介质 | |
WO2022140905A1 (zh) | 预测方法、编码器、解码器以及存储介质 | |
WO2022188114A1 (zh) | 帧内预测方法、编码器、解码器以及存储介质 | |
CN112262573B (zh) | 帧内预测装置、编码装置、解码装置、以及方法 | |
AU2018201830B2 (en) | Enhanced intra-prediction coding using planar representations | |
KR101622122B1 (ko) | 개선된 양자화 정보 표현 조건에 의한 동영상 압축율 향상방법 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21926184 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 202180092098.6 Country of ref document: CN |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2023549679 Country of ref document: JP |
|
WWE | Wipo information: entry into national phase |
Ref document number: MX/A/2023/009740 Country of ref document: MX |
|
ENP | Entry into the national phase |
Ref document number: 20237031641 Country of ref document: KR Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 1020237031641 Country of ref document: KR |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2021926184 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2021926184 Country of ref document: EP Effective date: 20230922 |