WO2023197181A1 - 解码方法、编码方法、解码器以及编码器 - Google Patents
解码方法、编码方法、解码器以及编码器 Download PDFInfo
- Publication number
- WO2023197181A1 WO2023197181A1 PCT/CN2022/086448 CN2022086448W WO2023197181A1 WO 2023197181 A1 WO2023197181 A1 WO 2023197181A1 CN 2022086448 W CN2022086448 W CN 2022086448W WO 2023197181 A1 WO2023197181 A1 WO 2023197181A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- prediction mode
- intra prediction
- transformation
- mode
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
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/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/18—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 a set of transform coefficients
-
- 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/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/12—Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
-
- 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/12—Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- H04N19/122—Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
-
- 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/46—Embedding additional information in the video signal during the compression process
-
- 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/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
-
- 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/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
-
- 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 and video encoding and decoding, and more specifically, to a decoding method, an encoding method, a decoder, and an encoder.
- Digital video compression technology mainly compresses huge digital image and video data to facilitate transmission and storage.
- Digital video compression standards can implement video decompression technology, there is still a need to pursue better digital video decompression technology to Improving compression efficiency.
- Embodiments of the present application provide a decoding method, encoding method, decoder and encoder, which can improve compression efficiency.
- this application provides a decoding method, including:
- Predict the current block based on the first intra prediction mode and the second intra prediction mode derived by the prediction mode derivation mode, and obtain a prediction block of the current block;
- a reconstructed block of the current block is obtained.
- this application provides an encoding method, including:
- Predict the current block based on the first intra prediction mode and the second intra prediction mode derived by the prediction mode derivation mode, and obtain the prediction block of the current block;
- the fourth transform coefficient is encoded.
- this application provides a decoder, including:
- a decoding unit used to decode the code stream to obtain the first transform coefficient of the current block
- Transform unit used for:
- a prediction unit configured to predict the current block based on the first intra prediction mode and the second intra prediction mode derived from the prediction mode derivation mode, and obtain a prediction block of the current block;
- a reconstruction unit configured to obtain a reconstruction block of the current block based on the prediction block of the current block and the residual block of the current block.
- this application provides an encoder, including:
- a prediction unit configured to predict the current block based on the first intra prediction mode and the second intra prediction mode derived from the prediction mode derivation mode, and obtain the prediction block of the current block;
- a residual unit configured to obtain a residual block of the current block based on the prediction block of the current block
- Transform unit used for:
- Coding unit used to encode the fourth transform coefficient.
- this application provides a decoder, including:
- a processor adapted to implement computer instructions
- the computer-readable storage medium stores computer instructions, and the computer instructions are suitable for the processor to load and execute the decoding method in the above-mentioned first aspect or its respective implementations.
- processors there are one or more processors and one or more memories.
- the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be provided separately from the processor.
- this application provides an encoder, including:
- a processor adapted to implement computer instructions
- the computer-readable storage medium stores computer instructions, and the computer instructions are suitable for the processor to load and execute the encoding method in the above-mentioned second aspect or its respective implementations.
- processors there are one or more processors and one or more memories.
- the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be provided separately from the processor.
- the present application provides a computer-readable storage medium that stores computer instructions.
- the computer instructions When the computer instructions are read and executed by a processor of a computer device, the computer device performs the above-mentioned first aspect.
- the present application provides a code stream, which code stream relates to the code stream in the above-mentioned first aspect or the code stream involved in the above-mentioned second aspect.
- this application introduces the first transformation based on the prediction mode derivation mode and the second transformation, which can improve the decompression efficiency of the current block.
- Figure 1 is a schematic block diagram of a coding framework provided by an embodiment of the present application.
- Figure 2 is a schematic diagram of specific directions of the 65 angle prediction modes provided by the embodiment of the present application.
- Figure 3 is an example of reference pixels in the wide-angle prediction mode provided by the embodiment of the present application.
- FIG. 4 is a schematic diagram of the MIP mode provided by the embodiment of the present application.
- Figure 5 is a schematic diagram of deriving a prediction mode based on DIMD provided by an embodiment of the present application.
- Figure 6 is a schematic diagram of deriving prediction blocks based on DIMD provided by an embodiment of the present application.
- Figure 7 is a schematic diagram of a template used by TIMD provided by an embodiment of the present application.
- Figure 8 is an example of a weight map corresponding to 64 weight derivation modes of GPM on a square block provided by the embodiment of the present application.
- Figure 9 is an example of dividing lines in the weight derivation mode provided by the embodiment of the present application.
- Figure 10 is an example of a weight map corresponding to 56 weight derivation modes of AWP on a square block provided by the embodiment of the present application.
- FIG 11 is a schematic diagram of a GPM or AWP provided by an embodiment of the present application.
- FIG. 12 is an example of a DCT2-type base image provided by an embodiment of the present application.
- Figure 13 is an example of LFNST provided by the embodiment of this application.
- Figure 14 is an example of a transformation matrix group of LFNST provided by the embodiment of the present application.
- Figure 15 is a schematic block diagram of a decoding framework provided by an embodiment of the present application.
- Figure 16 is a schematic flow chart of the decoding method provided by the embodiment of the present application.
- Figure 17 is a schematic flow chart of the encoding method provided by the embodiment of the present application.
- Figure 18 is a schematic block diagram of a decoder provided by an embodiment of the present application.
- Figure 19 is a schematic block diagram of an encoder provided by an embodiment of the present application.
- Figure 20 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
- the solutions provided by the embodiments of this application can be applied to the field of digital video coding technology, including but not limited to: image coding and decoding, video coding and decoding, hardware video coding and decoding, dedicated circuit video coding and decoding, and real-time video coding and decoding. field.
- the solution provided by the embodiments of the present application can be combined with the Audio Video Coding Standard (AVS), the second generation AVS standard (AVS2) or the third generation AVS standard (AVS3).
- AVS Audio Video Coding Standard
- VVC Very Video Coding
- the solution provided by the embodiment of the present application can be used to perform lossy compression on images (lossy compression), or can also be used to perform lossless compression on images (lossless compression).
- the lossless compression can be visually lossless compression (visually lossless compression) or mathematically lossless compression (mathematically lossless compression).
- Video coding and decoding standards all adopt block-based hybrid coding framework.
- Each frame in the video is divided into the largest coding unit (LCU) or coding tree unit (Coding Tree Unit, CTU) of the same size (such as 128x128, 64x64, etc.) squares.
- Each maximum coding unit or coding tree unit can be divided into rectangular coding units (coding units, CU) according to rules.
- the coding unit may also be divided into prediction unit (PU), transformation unit (TU), etc.
- the hybrid coding framework includes prediction, transform, quantization, entropy coding, in loop filter and other modules.
- the prediction module includes intra prediction and inter prediction.
- Inter-frame prediction includes motion estimation (motion estimation) and motion compensation (motion compensation).
- Intra-frame prediction only refers to the information of the same frame image and predicts the pixel information within the current divided block. Since there is a strong similarity between adjacent frames in the video, the interframe prediction method is used in video coding and decoding technology to eliminate the temporal redundancy between adjacent frames, thereby improving coding efficiency.
- Inter-frame prediction can refer to image information of different frames and use motion estimation to search for motion vector information that best matches the current divided block. The transformation converts the predicted image blocks into the frequency domain and redistributes the energy. Combined with quantization, it can remove information that is insensitive to the human eye and is used to eliminate visual redundancy.
- Entropy coding can eliminate character redundancy based on the current context model and the probability information of the binary code stream.
- the encoder can first read a black-and-white image or color image from the original video sequence, and then encode the black-and-white image or color image.
- the black-and-white image may include pixels of the brightness component
- the color image may include pixels of the chrominance component.
- the color image may also include pixels with a brightness component.
- the color format of the original video sequence can be luminance-chrominance (YCbCr, YUV) format or red-green-blue (Red-Green-Blue, RGB) format, etc.
- the encoder reads a black-and-white image or a color image, it divides it into blocks respectively, and uses intra-frame prediction or inter-frame prediction for the current block to generate a predicted block of the current block.
- the prediction block is subtracted from the original block of the current block. block to obtain a residual block, transform and quantize the residual block to obtain a quantized coefficient matrix, entropy encode the quantized coefficient matrix and output it to the code stream.
- the decoder uses intra prediction or inter prediction for the current block to generate a prediction block of the current block.
- the decoding end decodes the code stream to obtain the quantization coefficient matrix, performs inverse quantization and inverse transformation on the quantization coefficient matrix to obtain the residual block, and adds the prediction block and the residual block to obtain the reconstruction block.
- Reconstruction blocks can be used to compose a reconstructed image, and the decoder performs loop filtering on the reconstructed image based on images or blocks to obtain a decoded image.
- the current block can be the current coding unit (CU) or the current prediction unit (PU), etc.
- the encoding end also requires similar operations as the decoding end 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 encoding end, mode information or parameter information such as prediction, transformation, quantization, entropy coding, loop filtering, etc., need to be output to the code stream if necessary.
- the decoding end determines the same block division information as the encoding end through parsing and analyzing based on existing information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information, thereby ensuring the decoded image and decoding obtained by the encoding end
- the decoded image obtained at both ends is the same.
- the decoded image obtained at the encoding end is usually also called a reconstructed image.
- the current block can be divided into prediction units during prediction, and the current block can be divided into transformation units during transformation.
- the divisions between prediction units and transformation units can be the same or different.
- the above is only the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules of the framework or some steps of the process may be optimized. This application is applicable to this block-based hybrid coding.
- Figure 1 is a schematic block diagram of a coding framework 100 provided by an embodiment of the present application.
- the coding framework 100 may include an intra prediction unit 180, an inter prediction unit 170, a residual unit 110, a transformation and quantization unit 120, an entropy coding unit 130, an inverse transformation and inverse quantization unit 140, and a loop. filter unit 150.
- the encoding framework 100 may also include a decoded image buffer unit 160. This coding framework 100 may also be called a hybrid framework coding mode.
- the intra prediction unit 180 or the inter prediction unit 170 may predict the image block to be encoded to output the prediction block.
- the residual unit 110 may calculate a residual block, that is, a difference value between the prediction block and the image block to be encoded, based on the prediction block and the image block to be encoded.
- the transformation and quantization unit 120 is used to perform operations such as transformation and quantization on the residual block to remove information that is insensitive to the human eye, thereby eliminating visual redundancy.
- the residual block before transformation and quantization by the transformation and quantization unit 120 may be called a time domain residual block
- the time domain residual block after transformation and quantization by the transformation and quantization unit 120 may be called a frequency residual block. or frequency domain residual block.
- the entropy encoding unit 130 may output a code stream based on the transform quantization coefficient. For example, the entropy encoding unit 130 may eliminate character redundancy according to the target context model and probability information of the binary code stream. For example, the entropy coding unit 130 may be used for context-based adaptive binary arithmetic entropy coding (CABAC). The entropy encoding unit 130 may also be called a header information encoding unit.
- CABAC context-based adaptive binary arithmetic entropy coding
- the image block to be encoded can also be called an original image block or a target image block, and a prediction block can also be called a predicted image block or image prediction block, and can also be called a prediction signal or prediction information.
- the reconstruction block may also be called a reconstructed image block or an image reconstruction block, and may also be called a reconstructed signal or reconstructed information.
- the image block to be encoded may also be called an encoding block or a coded image block, and for the decoding end, the image block to be encoded may also be called a decoding block or a decoded image block.
- the image block to be encoded may be a CTU or a CU.
- the encoding framework 100 calculates the residual between the prediction block and the image block to be encoded to obtain the residual block, and then transmits the residual block to the decoder through processes such as transformation and quantization.
- the decoder receives and decodes the code stream, it obtains the residual block through steps such as inverse transformation and inverse quantization.
- the prediction block predicted by the decoder is superimposed on the residual block to obtain the reconstructed block.
- the inverse transform and inverse quantization unit 140, the loop filter unit 150 and the decoded image buffer unit 160 in the encoding framework 100 may be used to form a decoder.
- the intra prediction unit 180 or the inter prediction unit 170 can predict the image block to be encoded based on the existing reconstructed block, thereby ensuring that the encoding end and the decoding end have consistent understanding of the reference frame.
- the encoder can replicate the decoder's processing loop and thus produce the same predictions as the decoder.
- the quantized transform coefficients are inversely transformed and inversely quantized by the inverse transform and inverse quantization unit 140 to copy the approximate residual block at the decoding side.
- the approximate residual block After the approximate residual block is added to the prediction block, it can pass through the loop filtering unit 150 to smoothly filter out block effects and other effects caused by block-based processing and quantization.
- the image blocks output by the loop filter unit 150 may be stored in the decoded image buffer unit 160 for use in prediction of subsequent images.
- Figure 1 is only an example of the present application and should not be understood as a limitation of the present application.
- the loop filtering unit 150 in the coding framework 100 may include a deblocking filter (DBF) and sample adaptive compensation filtering (SAO).
- DBF deblocking filter
- SAO sample adaptive compensation filtering
- the encoding framework 100 may adopt a neural network-based loop filtering algorithm to improve video compression efficiency.
- the coding framework 100 may be a video coding hybrid framework based on a deep learning neural network.
- a model based on a convolutional neural network can be used to calculate the result of filtering the pixels based on the deblocking filter and sample adaptive compensation filtering.
- the network structures of the loop filter unit 150 on the luminance component and the chrominance component may be the same or different. Considering that the brightness component contains more visual information, the brightness component can also be used to guide the filtering of the chroma component to improve the reconstruction quality of the chroma component.
- inter-frame prediction can refer to the image information of different frames and use motion estimation to search for the motion vector information that best matches the image block to be encoded to eliminate temporal redundancy;
- the frames used for inter-frame prediction can be P frames and /or B frame, P frame refers to forward prediction frame, B frame refers to bidirectional prediction frame.
- intra-frame prediction only refers to the information of the same frame image and predicts pixel information within the image block to be encoded to eliminate spatial redundancy;
- the frame used for intra-frame prediction can be an I frame.
- the image block to be encoded can refer to the upper left image block, the upper image block and the left image block as reference information to predict the image block to be encoded, and the image block to be encoded The block is used as reference information for the next image block, so that the entire image can be predicted.
- the input digital video is in color format, such as YUV 4:2:0 format, then every 4 pixels of each image frame of the digital video consists of 4 Y components and 2 UV components.
- the encoding framework can components (i.e. luma blocks) and UV components (i.e. chrominance blocks) are encoded separately.
- the decoding end can also perform corresponding decoding according to the format.
- intra prediction can predict the image block to be encoded with the help of angle prediction mode and non-angle prediction mode to obtain the prediction block. Based on the rate distortion information calculated between the prediction block and the image block to be encoded, the to-be-encoded image block can be filtered out.
- the optimal prediction mode of the image block is determined and the prediction mode is transmitted to the decoder through the code stream.
- the decoder parses the prediction mode, predicts the prediction block of the target decoding block, and superimposes the time domain residual block obtained through code stream transmission to obtain the reconstruction block.
- non-angle prediction modes have remained relatively stable, including mean mode and plane mode.
- Angle prediction modes continue to increase with the evolution of digital video coding and decoding standards.
- the H.264/AVC standard only has 8 angle prediction modes and 1 non-angle prediction mode;
- H.265/HEVC has been expanded to 33 angle prediction modes and 2 non-angle prediction modes. model.
- the intra-frame prediction mode has been further expanded.
- Matrix weighted intra-frame prediction (MIP) mode among which this traditional prediction modes include: planar mode, DC mode and 65 angle prediction modes.
- planar mode is usually used to process some blocks with gradient textures
- DC mode is usually used to process some flat areas
- angle prediction mode is usually used to process blocks with obvious angular textures.
- the current block used for intra prediction may be a square block or a rectangular block.
- the probability of using the prediction mode at each angle is equal.
- the probability of using the reference pixels above the horizontal block is greater than height
- the usage probability of the left reference pixel is smaller than the usage probability of the left reference pixel for vertical blocks (height is greater than width).
- this application introduces a wide-angle prediction mode.
- the traditional angle prediction mode is converted into a wide-angle prediction mode.
- the prediction angle range of the current block It is larger than the prediction angle range when predicting rectangular blocks using traditional angle prediction mode.
- the decoder can convert the traditional angle prediction mode into the wide-angle prediction mode after receiving the signal, so that , the total number of intra prediction modes and the intra mode encoding method remain unchanged, and the intra mode encoding method remains unchanged.
- Figure 2 is a schematic diagram of specific directions of the 65 angle prediction modes provided by the embodiment of the present application.
- index 0 is used to identify the plane mode
- index 1 is used to identify the DC mode
- indexes -14 to 80 can be used to identify different angle prediction modes respectively.
- indexes 2 to 66 are used to identify the traditional angle prediction mode
- indexes -1 to -14 and indexes 67 to 80 are used to identify the wide angle prediction mode.
- the traditional intra prediction modes identified by indices 2 to 66 can be used to predict square blocks
- the wide angle prediction modes identified by indices -1 to -14 and 67 to 80 can be used to predict rectangular blocks.
- prediction mode identified by the index x mentioned in this application may also be called prediction mode x.
- intra prediction mode identified by index 2 may also be called intra prediction mode 2.
- Figure 3 is an example of reference pixels in the wide-angle prediction mode provided by the embodiment of the present application.
- the horizontal angle mode is replaced by some vertical-like angle modes near (larger than the intra prediction mode 66) the intra prediction mode 66 to expand the prediction angle range.
- W ⁇ H for example, 4 ⁇ 8 CU
- some points near the intra prediction mode 66 cannot be indexed to the reference.
- pixels, and some pixels near intra prediction mode 2 can still be indexed to reference pixels), so some classes near intra prediction mode 66 (smaller than intra prediction mode 66) need to be vertically
- the angle modes are replaced by some quasi-horizontal angle modes near intra prediction mode 2 (smaller than intra prediction mode 2) to expand the prediction angle range.
- the intra prediction mode to be performed may be determined or selected based on the size of the current block; for example, the wide-angle prediction mode may be determined or selected based on the size of the current block to perform intra prediction on the current block; for example, in When the current block is a rectangular block (width and height have different dimensions), the wide-angle prediction mode can be used for intra prediction of the current block.
- the aspect ratio of the current block may be used to determine the angle prediction mode to which the wide-angle prediction mode is replaced and the angle prediction mode after replacement. For example, when predicting the current block, any intra prediction mode having an angle not exceeding the diagonal corner of the current block (from the lower left corner to the upper right corner of the current block) may be selected as the replaced angle prediction mode.
- the MIP mode can also be called the Matrix weighted Intra Prediction (Matrix weighted Intra Prediction) mode.
- the process involved in the MIP mode can be divided into three main steps, which are the down-sampling process, the matrix multiplication process and the up-sampling process. Specifically, the spatially adjacent reconstructed samples are first downsampled through the downsampling process, and then the downsampled sample sequence is used as the input vector of the matrix multiplication process, that is, the output vector of the downsampling process is used as the input of the matrix multiplication process.
- Vector multiply the preset matrix and add the offset vector, and output the calculated sample vector; use the output vector of the matrix multiplication process as the input vector of the upsampling process, and obtain the final prediction block through upsampling .
- FIG. 4 is a schematic diagram of the MIP mode provided by the embodiment of the present application.
- the MIP mode obtains the upper adjacent downsampled reconstructed sample vector bdry top by averaging the reconstructed samples adjacent to the top of the current coding unit, and obtains the left adjacent down sample vector bdry top by averaging the reconstructed samples adjacent to the left.
- Sampling reconstructed sample vector bdry left After obtaining bdry top and bdry left , use them as the input vector bdry red of the matrix multiplication process.
- the sample can be obtained through the top row vector bdry top red , bdry left , A k ⁇ bdry red +b k based on bdry red Vector, where A k is a preset matrix, b k is a preset bias vector, and k is the index of the MIP mode.
- a k is a preset matrix
- b k is a preset bias vector
- k is the index of the MIP mode.
- MIP in order to predict a block with width W and height H, MIP requires H reconstructed pixels in the left column of the current block and W reconstructed pixels in the upper row of the current block as input.
- MIP generates prediction blocks in the following three steps: reference pixel averaging (Averaging), matrix multiplication (Matrix Vector Multiplication) and interpolation (Interpolation).
- the core of MIP is matrix multiplication, which can be thought of as a process of generating prediction blocks using input pixels (reference pixels) in a matrix multiplication manner.
- MIP provides a variety of matrices. Different prediction methods can be reflected in different matrices. Using different matrices for the same input pixel will yield different results.
- reference pixel averaging and interpolation is a design that compromises performance and complexity. For larger blocks, an effect similar to downsampling can be achieved by reference pixel averaging, allowing the input to be adapted to a smaller matrix, while interpolation achieves an upsampling effect. In this way, there is no need to provide MIP matrices for blocks of each size, but only matrices of one or several specific sizes. As the demand for compression performance increases and hardware capabilities improve, more complex MIPs may appear in the next generation of standards.
- the MIP mode can be simplified from the neural network.
- the matrix used can be obtained based on training. Therefore, the MIP mode has strong generalization ability and prediction effects that traditional prediction models cannot achieve.
- the MIP mode can be a model obtained through multiple simplifications of hardware and software complexity for an intra-frame prediction model based on a neural network. Based on a large number of training samples, multiple prediction modes represent a variety of models and parameters, which can compare Good coverage of natural sequences of textures.
- MIP is somewhat similar to planar mode, but obviously MIP is more complex and more flexible than planar mode.
- the number of MIP modes may be different. For example, for a coding unit of 4x4 size, the MIP mode has 16 prediction modes; for a coding unit of 8x8 with width equal to 4 or height equal to 4, the MIP mode has 8 prediction modes; for coding units of other sizes, the MIP mode has 6 prediction modes.
- MIP mode has a transpose function. For prediction modes that conform to the current size, MIP mode can try transposition calculations on the encoder side. Therefore, MIP mode not only requires a flag bit to indicate whether the current coding unit uses MIP mode, but also, if the current coding unit uses MIP mode, an additional transposed flag bit needs to be transmitted to the decoder.
- the main core point of the DIMD mode is that the decoder uses the same method as the encoder to derive the intra prediction mode. This avoids transmitting the intra prediction mode index of the current coding unit in the code stream to save bit overhead. Purpose.
- DIMD mode The specific process of DIMD mode can be divided into the following two main steps:
- Step 1 Export the prediction model.
- Figure 5 is a schematic diagram of deriving a prediction mode based on DIMD provided by an embodiment of the present application.
- DIMD derives a prediction mode using pixels in the template in the reconstruction area (reconstruction pixels on the left and upper sides of the current block).
- the template may include three adjacent rows of reconstructed samples above the current block, three adjacent columns of reconstructed samples on the left, and corresponding adjacent reconstructed samples on the upper left.
- the template can be configured according to the window (for example, as shown in (a) of Figure 5 or As shown in (b) of Figure 5), multiple gradient values are determined within the template, and each gradient value can be used to configure an intra prediction mode (Intra prediction mode, ipm) that is suitable for its gradient direction.
- Intra prediction mode Intra prediction mode, ipm
- the encoder can use the prediction mode adapted to the largest and second largest gradient values among multiple gradient values as the derived prediction mode. For example, as shown in Figure 5 (b), for a 4 ⁇ 4 block size, all pixels whose gradient values need to be determined are analyzed and the corresponding gradient histogram (histogram of gradients) is obtained, for example, as shown in Figure 5 As shown in (c), for blocks of other sizes, all pixels whose gradient values need to be determined are analyzed and the corresponding gradient histograms are obtained; finally, the prediction modes corresponding to the largest and second largest gradients in the gradient histogram are as a derived prediction model.
- Figure 5 (b) for a 4 ⁇ 4 block size, all pixels whose gradient values need to be determined are analyzed and the corresponding gradient histogram (histogram of gradients) is obtained, for example, as shown in Figure 5
- the prediction modes corresponding to the largest and second largest gradients in the gradient histogram are as a derived prediction model.
- the gradient histogram in this application is only an example for determining the derived prediction mode, and can be implemented in a variety of simple forms, which is not specifically limited in this application.
- this application does not limit the method of statistical gradient histograms.
- the Sobel operator or other methods may be used to calculate the gradient histograms.
- Step 2 Export prediction blocks.
- Figure 6 is a schematic diagram of deriving prediction blocks based on DIMD provided by an embodiment of the present application.
- the encoder can weight the prediction values of 3 intra prediction modes (planar mode and 2 intra prediction modes derived based on DIMD).
- the codec uses the same prediction block derivation method to obtain the prediction block of the current block. Assume that the prediction mode corresponding to the largest gradient value is prediction mode 1, and the prediction mode corresponding to the second largest gradient value is prediction mode 2.
- the encoder determines the following two conditions:
- the gradient of prediction mode 2 is not 0;
- Neither prediction mode 1 nor prediction mode 2 is planar mode or DC prediction mode.
- prediction mode 1 is used to calculate the prediction sample value of the current block, that is, the ordinary prediction prediction process is applied to prediction mode 1; otherwise, that is, the above two conditions are established, then the weighted averaging method is used. Export the predicted block for the current block.
- the specific method is: the plane mode occupies 1/3 of the weighted weight, and the remaining 2/3 is the total weight of prediction mode 1 and prediction mode 2. For example, divide the gradient amplitude value of prediction mode 1 by the sum of the gradient amplitude values of prediction mode 1. The sum of the gradient amplitude values of prediction mode 2 is used as the weighting weight of prediction mode 1.
- the gradient amplitude value of prediction mode 2 is divided by the sum of the gradient amplitude value of prediction mode 1 and the gradient amplitude value of prediction mode 2 as the weighting of prediction mode 2.
- the decoder follows the same steps to obtain the prediction block.
- Weight(mode1) 2/3*(amp1/(amp1+amp2));
- Weight(mode2) 1-Weight(PLANAR)-Weight(mode1);
- mode1 and mode2 represent prediction mode 1 and prediction mode 2 respectively
- amp1 and amp2 represent the gradient amplitude value of prediction mode 1 and the gradient amplitude value of prediction mode 2 respectively.
- DIMD mode requires transmitting a flag bit to the decoder, which is used to indicate whether the current encoding unit uses DIMD mode.
- DIMD uses gradient analysis of reconstructed pixels to screen intra prediction modes, and the two intra prediction modes plus the planar mode can be weighted according to the analysis results.
- the advantage of DIMD is that if the DIMD mode is selected for the current block, there is no need to indicate which intra prediction mode is used in the code stream. Instead, the decoder itself derives it through the above process, which saves overhead to a certain extent.
- the technical principles of the TIMD mode are similar to the technical principles of the above-mentioned DIMD mode. They both use the same operation of the codec to derive the prediction mode to save transmission mode index overhead.
- the TIMD mode can be understood as two main parts. First, the cost information of each prediction mode is calculated according to the template. The prediction mode corresponding to the minimum cost and the second smallest cost will be selected.
- the prediction mode corresponding to the minimum cost is recorded as prediction mode 1, and the second smallest cost is The prediction mode corresponding to the cost is recorded as prediction mode 2; if the ratio of the next smallest cost value (costMode2) to the minimum cost value (costMode1) meets the preset conditions, such as costMode2 ⁇ 2*costMode1, then prediction mode 1 and prediction mode 2
- costMode2 next smallest cost value
- costMode1 costMode2 ⁇ 2*costMode1
- the corresponding weights of prediction mode 1 and prediction mode 2 are determined in the following manner:
- weight1 costMode2/(costMode1+costMode2)
- weight2 1-weight1
- weight1 is the weight of the prediction block corresponding to prediction mode 1
- weight2 is the weight of the prediction block corresponding to prediction mode 2.
- weighted fusion between prediction blocks will not be performed, and the prediction block corresponding to prediction mode 1 will be the prediction block of TIMD.
- the TIMD mode if the TIMD mode is used to perform intra prediction on the current block, if the reconstruction sample template of the current block does not contain available adjacent reconstruction samples, the TIMD mode selects the planar mode to perform intra prediction on the current block, that is, it does not Perform unweighted fusion. Same as DIMD mode, TIMD mode needs to transmit a flag bit to the decoder to indicate whether the current coding unit uses TIMD mode.
- Figure 7 is a schematic diagram of a template used by TIMD provided by an embodiment of the present application.
- the codec can be based on a coding unit with a width equal to 2(M+L1)+1 and a height equal to 2(N+L2)+1 Select the reference template (Reference of template) of the current block to calculate the template of the current block.
- the TIMD mode selects the planar mode to perform intra prediction on the current block.
- the available adjacent reconstruction samples may be samples adjacent to the left and upper sides of the current CU in FIG. 7 , that is, there are no available reconstruction samples in the diagonally filled area. That is to say, if there are no available reconstruction samples in the diagonal padding area, the TIMD mode selects the planar mode to perform intra prediction on the current block.
- the left and upper sides of the current block can theoretically obtain reconstruction values, that is, the template of the current block contains available adjacent reconstruction samples.
- the decoder can use a certain intra prediction mode to predict on the template, and compare the prediction value and the reconstructed value to obtain the cost of the intra prediction mode on the template.
- a certain intra prediction mode to predict on the template, and compare the prediction value and the reconstructed value to obtain the cost of the intra prediction mode on the template.
- TIMD predicts some candidate intra prediction modes on the template, obtains the cost of the candidate intra prediction mode on the template, and replaces the one or two intra prediction modes with the lowest cost as the intra prediction value of the current block. If the template cost difference between the two intra prediction modes is not large, the compression performance can be improved by weighting the prediction values of the two intra prediction modes.
- the weights of the predicted values of the two prediction modes are related to the above-mentioned costs. For example, the weights are inversely proportional to the costs.
- TIMD uses the prediction effect of the intra prediction mode on the template to screen the intra prediction mode, and can weight the two intra prediction modes according to the cost on the template.
- the advantage of TIMD is that if the TIMD mode is selected for the current block, there is no need to indicate which intra prediction mode is used in the code stream. Instead, the decoder itself derives it through the above process, which saves overhead to a certain extent.
- DIMD mode In the above simple introduction to several intra prediction modes, it is not difficult to find that the technical principles of DIMD mode are close to those of TIMD mode. They both use the decoder to perform the same operation as the encoder to infer the prediction of the current coding unit. model.
- This prediction mode can save the transmission of the index of the prediction mode when the complexity is acceptable, thereby saving overhead and improving compression efficiency.
- the DIMD mode and the TIMD mode work better in large areas with consistent texture characteristics. If the texture changes slightly or the template area cannot be covered, Then the prediction effect of this prediction mode is poor.
- DIMD mode whether for DIMD mode or TIMD mode, prediction blocks obtained based on multiple traditional prediction modes are fused or weighted prediction blocks obtained based on multiple traditional prediction modes are performed.
- the fusion of prediction blocks can Generating effects that cannot be achieved by a single prediction mode.
- the DIMD mode introduces the planar mode as an additional weighted prediction mode to increase the spatial correlation between adjacent reconstructed samples and prediction samples, thereby improving the prediction effect of intra prediction, but , Since the prediction principle of planar mode is relatively simple, for some prediction blocks with obvious differences between the upper right corner and the lower left corner, using planar mode as an additional weighted prediction mode may have counterproductive effects.
- GPM or AWP For GPM or AWP, it also uses two reference blocks with the same size as the current block, but some pixel positions 100% use the pixel value of the corresponding position of the first reference block, and some pixel positions 100% use the second
- the pixel values at the corresponding positions of the reference block are used, and in the junction area or transition area, the pixel values at the corresponding positions of the two reference blocks are used according to a certain proportion.
- the weight of the junction area also gradually transitions. How these weights are allocated is determined by the weight export mode of GPM or AWP. Determine the weight of each pixel position according to the weight derivation mode of GPM or AWP.
- some GPM or AWP modes may not guarantee that some pixel positions must use 100% of the pixel values corresponding to the first reference block.
- the pixel position 100% uses the pixel value at the corresponding position of the second reference block; at this time, it can also be considered that GPM or AWP uses two reference blocks that are different in size from the current block, that is, each takes the required part as the reference block; that is, The part with a weight other than 0 is used as a reference block, and the part with a weight of 0 is eliminated.
- This application does not limit its specific implementation.
- Figure 8 is an example of a weight map corresponding to 64 weight derivation modes of GPM on a square block provided by the embodiment of the present application.
- GPM has weight maps corresponding to 64 weight derivation modes on square blocks.
- black means that the weight value of the corresponding position of the first reference block is 0%
- white means that the weight value of the corresponding position of the first reference block is 100%
- the gray area is based on color.
- the difference in depth means that the weight value of the corresponding position of the first reference block is a weight value greater than 0% and less than 100%.
- the weight value of the corresponding position of the second reference block is 100% minus the weight value of the corresponding position of the first reference block.
- Figure 9 is an example of dividing lines in the weight derivation mode provided by the embodiment of the present application.
- the dividing line of the weight derivation mode may be a line composed of points with the same weight of the two prediction modes corresponding to the GPM.
- the dividing line in the weight matrix of GPM, the dividing line is a line composed of points with the same weight of the two prediction modes corresponding to GPM.
- the dividing line may be a line composed of points with the same weights of the two prediction modes corresponding to the GPM in the area where the weight changes in the weight matrix of the GPM.
- the line composed of points with a median weight and the dividing line is a line composed of points corresponding to the median weight.
- the point with the median weight may be located in the middle of the entire pixel, or it may not be in the middle of the entire pixel. ; Taking weights from 0 to 8 as an example, the median weight can be 4.
- Figure 10 is an example of a weight map corresponding to 56 weight derivation modes of AWP on a square block provided by the embodiment of the present application.
- the weight map corresponding to the 56 weight derivation modes of AWP on square blocks As shown in Figure 10, the weight map corresponding to the 56 weight derivation modes of AWP on square blocks.
- black means that the weight value of the corresponding position of the first reference block is 0%
- white means that the weight value of the corresponding position of the first reference block is 100%
- the gray area is based on color.
- the difference in depth means that the weight value of the corresponding position of the first reference block is a weight value greater than 0% and less than 100%.
- the weight value of the corresponding position of the second reference block is 100% minus the weight value of the corresponding position of the first reference block.
- GPM determines the angle and offset based on each weight derivation mode, and then calculates the weight map corresponding to each weight derivation mode.
- AWP first determines a one-dimensional weight line based on each weight derivation mode, and then uses a method similar to intra-frame angle prediction to spread the one-dimensional weight line over the entire image to obtain a weight map corresponding to each weight derivation mode.
- the weight map corresponding to each weight derivation mode may also be called a weight matrix.
- the encoder can determine the corresponding dividing line according to each weight derivation mode, and then determine the corresponding weight matrix based on the dividing line. For example, the encoder can use Table 1 to determine the angle index variable angleIdx and distance index variable distanceIdx corresponding to the weight derivation mode to determine the weight derivation mode merge_gpm_partition_idx.
- the angle index variable angleIdx and the distance index variable distanceIdx can be considered as variables used to determine the dividing line, that is, They are used to determine the angle and offset of the dividing line respectively.
- the encoder determines the dividing lines corresponding to each weight derivation mode, it can determine the weight matrix corresponding to each weight derivation mode based on the dividing lines corresponding to each weight derivation mode.
- each weight export mode can correspond to an angle index variable angleIdx and a distance index variable distanceIdx. Equivalently, each weight derivation mode can correspond to a dividing line. Of course, an angle index variable angleIdx or a distance index variable distanceIdx can correspond to the index of one or more weight derivation modes. Table 1 is only an example of this application and should not be understood as a limitation of this application.
- the process of generating the GPM prediction sample matrix for one component can be divided into a sub-process, that is, the weighted sample prediction process for GPM for geometric partitioning mode), this process can be called for all three components, but the parameters called are different.
- This application uses the brightness component as an example to illustrate.
- nCbW is set to cbWidth
- nCbH is set to cbHeight.
- the inputs to the weighted prediction process of GPM include: the width of the current block nCbW; the height of the current block nCbH; 2 (nCbW)x(nCbH) prediction sample matrices predSamplesLA and predSamplesLB; GPM's "partition" angle index variable angleIdx; GPM's Distance index variable distanceIdx; component index variable cIdx, for example, when cIdx is 0, it can be used to represent the brightness component.
- the prediction sample matrix pbSamples[x][y] can be derived as follows:
- nW, nH, shift1, offset1, displacementX, displacementY, partFlip and shiftHor can be exported as follows:
- variables offsetX and offsetY can be exported as follows:
- offsetY ((-nH)>>1)+(angleIdx ⁇ 16?(distanceIdx*nH)>>3:-((distanceIdx*nH)>>3));
- offsetX ((-nW)>>1)+(angleIdx ⁇ 16?(distanceIdx*nW)>>3:-((distanceIdx*nW)>>3);
- weightIdx (((xL+offsetX) ⁇ 1)+1)*disLut[displacementX]+(((yL+offsetY) ⁇ 1)+1)*disLut[displacementY];
- weightIdxL partFlip? 32+weightIdx:32–weightIdx;
- pbSamples[x][y] Clip3(0,(1 ⁇ BitDepth)-1,(predSamplesLA[x][y]*wValue+predSamplesLB[x][y]*(8-wValue)+offset1)>> shift1).
- pbSamples[x][y] represents the predicted sample at (x, y) point.
- wValue represents the weight of the predicted value predSamplesLA[x][y] of the prediction matrix of a prediction mode at point (x, y), and (8-wValue) is another prediction mode at point (x, y) The weight of the predicted value predSamplesLB[x][y] of the prediction matrix.
- weight derivation mode you can use it to derive a weight value wValue for each point, and then calculate a GPM predicted value pbSamples[x][y].
- the weight wValue does not need to be written in the form of a matrix, but it can be understood that if the wValue of each position is saved in a matrix, then it is a weight matrix. Calculate the weight of each point separately and weight it to obtain the predicted value of GPM, or calculate all the weights and then weight them uniformly to obtain the predicted sample matrix of GPM.
- the principle is the same.
- the weight matrix is used in many descriptions in this article to make the expression easier to understand and to use the weight matrix to draw pictures more intuitively. In fact, it can also be described according to the weight of each position.
- the weight matrix derivation mode can also be said to be the weight derivation mode, which is not specifically limited in this application.
- GPM and AWP use masks of the weights of two reference blocks, namely the above-mentioned weight map or weight matrix. This mask determines the weight of the two reference blocks when generating the prediction block, or it can be simply understood as that part of the position of the prediction block comes from the first reference block and part of the position comes from the second reference block, while the transition area (blending area) is weighted by the corresponding positions of the two reference blocks, thereby making the transition smoother.
- GPM and AWP do not divide the current block into two CUs or PUs, so the transformation, quantization, inverse transformation, inverse quantization, etc. of the residual after prediction are also processed on the current block as a whole.
- GPM can use a weight matrix to combine two inter prediction blocks.
- This application extends this to combining two arbitrary prediction blocks. For example, two inter prediction blocks, two intra prediction blocks, one inter prediction block plus one intra prediction block.
- prediction blocks in intra block copy (IBC) mode or prediction blocks in palette (palette) mode can be used as one or two prediction blocks.
- IBC intra block copy
- palette palette mode
- the prediction mode can be understood as information according to which the codec can generate a prediction block for the current block.
- the prediction mode may be a certain intra prediction mode, such as DC mode, plane mode, various intra angle prediction modes, etc.
- the prediction mode may be a fusion (merge) mode, a fusion with motion vector difference (MMVD) mode, or an advanced motion vector prediction mode (Advanced Motion Vector Prediction, AMVP).
- the prediction mode may be unidirectional prediction, bidirectional prediction or multi-hypothesis prediction.
- the inter-frame prediction mode uses unidirectional prediction and a piece of motion information can be determined, the prediction block can be determined based on the motion information. If the inter-frame prediction mode uses bidirectional prediction and two pieces of motion information can be determined, the prediction block can be determined based on the motion information.
- FIG 11 is a schematic diagram of a GPM or AWP provided by an embodiment of the present application.
- the information that GPM needs to determine can be expressed as 1 weight derivation mode and 2 prediction modes.
- the weight derivation mode is used to determine the weight matrix or weight, and the two prediction modes determine a prediction block or prediction value respectively.
- Weight derivation mode is also known as partition mode or weight matrix derivation mode.
- the two prediction modes may be the same or different prediction modes, including but not limited to intra prediction mode, inter prediction mode, IBC mode and palette mode.
- the current block When encoding, the current block will be predicted first.
- the prediction uses spatial or temporal correlation performance to obtain an image that is the same or similar to the current block.
- the predicted block and the current block are exactly the same, but it is difficult to guarantee that this is the case for all blocks in a video.
- the predicted block is usually very similar to the current block, but there are differences.
- due to irregular motion, distortion, occlusion, brightness, etc. changes in the video it is difficult to completely predict the current block.
- the hybrid coding framework will subtract the predicted image from the original image of the current block to obtain the residual image, or the current block minus the predicted block will obtain the residual block.
- Residual blocks are usually much simpler than the original image, so prediction can significantly improve compression efficiency.
- the residual block is not directly encoded, but is usually transformed first. Transformation is to transform the residual image from the spatial domain to the frequency domain and remove the correlation of the residual image. After the residual image is transformed into the frequency domain, since the energy is mostly concentrated in the low-frequency region, most of the transformed non-zero coefficients are concentrated in the upper left corner. Next, quantization is used for further compression. And since the human eye is not sensitive to high frequencies, a larger quantization step size can be used in high-frequency areas.
- Image transformation technology is a transformation of the original image in order to be able to represent the original image with an orthogonal function or orthogonal matrix. This transformation is two-dimensional linear and reversible.
- the original image is generally called a spatial domain image
- the transformed image is called a converted domain image (also called frequency domain).
- the converted domain image can be inversely transformed into a spatial domain image. After image transformation, on the one hand, it can more effectively reflect the characteristics of the image itself, on the other hand, it can also concentrate energy on a small amount of data, which is more conducive to the storage, transmission and processing of images.
- Transformation methods include but are not limited to: Discrete Cosine Transform (DCT) and Discrete Sine Transform (DST). Since DCT has strong energy concentration characteristics, only some areas (such as the upper left corner area) of the original image have non-zero coefficients after DCT transformation.
- DCTs that can be used in video codecs include but are not limited to DCT2 and DCT8 types; DSTs that can be used in video codecs include but are not limited to DST7 types.
- DCT2 type is a commonly used transformation in video compression standards
- DCT8 type and DST7 type can be used in VVC. It is worth noting that transformation is very useful in general video compression, but not all blocks must be transformed. In some cases, transformation is not as good as compression without transformation. Therefore, in some cases, the encoder You can choose whether the current block uses transformations.
- the encoder When the encoder transforms the current block in the current image, it can use a basis function or a basis image to transform the residual block of the current block.
- the basis image is the graphical representation of the basis function.
- FIG. 12 is an example of a DCT2-type base image provided by an embodiment of the present application.
- the base image of DCT2 type can be a base image composed of 8 ⁇ 8 small blocks drawn according to the basis function, where each small block is composed of 8 ⁇ 8 elements (sub-blocks).
- a base image composed of 8 ⁇ 8 small blocks can be used to transform a block of 8x8 block size, and an 8x8 transformation coefficient matrix is obtained.
- DCT8 type and DST7 type to perform basic transformation on the residual block, that is, multiple transform mode selection (MTS) in VVC.
- MTS multiple transform mode selection
- the transformation type corresponding to the basis function used by the basic transformation can also be called the transformation kernel type used by the basic transformation.
- MTS multiple transform mode selection
- the basic transformation can also be called the core transform.
- MTS can select the transformation core type through some syntax elements. An MTS that selects the transformation core type through syntax elements is listed below in conjunction with Table 3.
- the transformation kernel type of the basic transformation in both the horizontal and vertical directions uses DCT2. If the value of MTS_CU_flag is 1, the value of MTS_Hor_flag is 0, and the value of MTS_Ver_flag is 0, then the transformation core type in the horizontal direction uses DST7, and the transformation core type in the vertical direction uses DST7.
- VVC uses a syntax element mts_idx to determine the transformation core type of the basic transformation.
- trTypeHor represents the transformation core type of horizontal transformation
- trTypeVer represents the transformation core type of vertical transformation
- trTypeHor and trTypeVer are 0 indicating DCT2 type transformation, 1 indicating DST7 type transformation, and 2 indicating DCT8 type transformation.
- the basic transformation can also take advantage of this correlation.
- One approach is to group the transform kernel types of MTS according to intra prediction mode. An example of grouping is shown in the table below.
- the corresponding transform core type group with index 0 of MTS is selected.
- the mode with index 0 in VVC is Planar, and the mode with index 1 in VVC is DC. , DC and Planar both produce flatter prediction values.
- the index of the intra prediction mode is 2 to 12
- the corresponding transform core type group with the index of MTS 1 is selected. According to the intra prediction mode picture, it can be seen that angles 2 to 12 point to the lower left direction.
- each transformation kernel type group may have a selection of transformation kernel types for horizontal transformation and vertical transformation, or there may be multiple selections of transformation kernel types for horizontal transformation and vertical transformation, that is to say, After selecting which transform core type group according to the intra prediction mode, further subdivision can be made. For example, the transform kernel type can be further selected through some identification or block size information, etc., which will not be described again here.
- the basic transform can select the transform core type group according to the intra prediction mode. It can also be seen that this method of selecting the transformation core type group of the basic transformation according to the intra prediction mode may also infer more detailed grouping of basic transformations in the future, which is not specifically limited in this application.
- the transformation kernel types involved in the main transformation of this application can also be called transformation matrices, transformation types, transformation kernels, and other terms with similar or identical meanings.
- the transformation kernel type group involved in the main transformation can also be called transformation matrices. Group, transformation type group, transformation core group and other terms with similar or identical meanings are not specifically limited in this application. That is to say, the selection transformation kernel type or transformation kernel type group involved in this application can also be called the selection transformation matrix or the transformation matrix group, it can also be called the selection transformation type or the selection transformation type group, and it can also be called the selection transformation. Kernel or transform kernel group.
- the transformation core type or transformation type can include DCT2, DCT8, DST7, etc., and can also include DCT5, DST4, DST1 or identity transform (Identity Transform, IDTR), etc.
- blocks of different sizes can use transformation kernel types of corresponding sizes, which will not be described in detail in this application.
- the one-dimensional transformation of the horizontal and vertical directions is performed in two steps. For example, perform horizontal transformation first and then vertical transformation, or perform vertical transformation first and then horizontal transformation.
- the above transformation method is more effective for horizontal and vertical textures, but is less effective for oblique textures. Since horizontal and vertical textures are the most common, the above transformation method is very useful for improving compression efficiency. However, with the development of technology, only processing the residual texture of horizontal and vertical directions can no longer meet the demand for compression efficiency.
- this application introduces the concept of secondary transformation, that is, the encoder can perform secondary transformation based on the primary transform to improve compression efficiency.
- the main transformation can be used to process textures in horizontal and vertical directions.
- the main transformation can also be called a basic transformation.
- the main transformation includes but is not limited to: the above-mentioned DCT2 type, DCT8 type, and DST7 type transformation.
- Secondary transformation is used to process oblique textures.
- secondary transformation includes but is not limited to: low frequency non-separable transform (LFNST).
- LFNST low frequency non-separable transform
- the secondary transform is used after the main transform and before quantization.
- the secondary transform is used after the inverse quantization and before the inverse primary transform.
- Figure 13 is an example of LFNST provided by the embodiment of this application.
- LFNST performs a secondary transformation on the low-frequency coefficients in the upper left corner after the basic transformation.
- the main transform concentrates the energy to the upper left corner by decorrelating the image.
- the secondary transformation decorrelates the low-frequency coefficients of the primary transformation.
- 16 coefficients are input to a 4x4 LFNST, 8 coefficients are output; when 64 coefficients are input to an 8x8 LFNST, 16 coefficients are output.
- 8 coefficients are input to the 4x4 inverse LFNST, 16 coefficients are output; when 16 coefficients are input to the 8x8 inverse LFNST, 64 coefficients are output.
- the encoder When the encoder performs secondary transformation on the current block in the current image, it can use a certain transformation matrix in the selected transformation matrix group to transform the residual block of the current block.
- the transformation matrix may refer to a matrix used to transform a certain oblique texture
- the transformation matrix group may include a matrix used to transform some similar oblique textures.
- Figure 14 is an example of a transformation matrix group of LFNST provided by the embodiment of the present application.
- LFNST may have 4 sets of transformation matrices, and the transformation matrices in the same set of transformation matrices have similar oblique textures.
- the transformation matrix group shown in (a) in Figure 14 may be a transformation matrix group with an index of 0, and the transformation matrix group shown in (b) of Figure 14 may be a transformation matrix group with an index of 1,
- the transformation matrix group shown in (c) in FIG. 14 may be a transformation matrix group with an index of 2
- the transformation matrix group shown in (d) of FIG. 14 may be a transformation matrix group with an index of 3.
- transformation matrix involved in the secondary transformation in this application can also be called transformation kernel, transformation kernel type or basis function and other terms with similar or identical meanings.
- the transformation matrix group involved in the secondary transformation can also be called Terms such as transformation kernel group, transformation kernel type group or basis function group have similar or identical meanings, which are not specifically limited in this application. That is to say, the selection transformation matrix or transformation matrix group involved in this application can also be called the selection transformation kernel type or the transformation core type group. It can also be called the selection transformation type or the selection transformation type group. It can also be called the selection transformation. Kernel or transform kernel group.
- Intra-frame prediction uses the reconstructed pixels around the current block as a reference to predict the current block. Since current videos are encoded from left to right and from top to bottom, the reference pixels that can be used by the current block are usually on the left and upper sides. . Angle prediction tiles the reference pixels to the current block according to the specified angle as the prediction value, which means that the predicted block will have obvious directional texture, and the residual of the current block after angle prediction will also reflect obvious angles statistically. characteristic. Therefore, the transformation matrix selected by LFNST can be bound to the intra prediction mode. That is, after the intra prediction mode is determined, LFNST can use a set of transformation matrices whose texture direction is adapted to the angular characteristics of the intra prediction mode. .
- LFNST has a total of 4 groups of transformation matrices, each group has 2 transformation matrices.
- Table 6 shows the correspondence between intra prediction modes and transformation matrix groups.
- intra prediction modes 0 to 81 can be associated with four sets of transformation matrix indexes.
- the cross-component prediction modes used by chroma intra-frame prediction are 81 to 83, while luma intra-frame prediction does not have these modes.
- the transformation matrix of LFNST can be transposed to use one transformation matrix group to handle more angles.
- intra prediction modes 13 to 23 and intra prediction modes 45 to 55 both correspond to transformation matrix group 2, but , intra prediction modes 13 to 23 are obviously close to horizontal modes, while intra prediction modes 45 to 55 are obviously close to vertical modes, and the corresponding modes of intra prediction modes 45 to 55 need to be transformed after inverse transformation Adapt by transposing.
- the encoding end can determine which set of transformation matrices LFNST uses based on the intra prediction mode used by the current block, and then determine the transformation matrix to be used in the determined set of transformation matrices. Equivalently, the correlation between the intra prediction mode and the LFNST transformation matrix group can be utilized, thereby reducing the transmission of the selected LFNST transformation matrix in the code stream. Whether the current block will use LFNST, and if LFNST is used, whether to use the first or second one in a group can be determined by the code stream and some conditions.
- LFNST can also be designed to be more complex. For example, use larger transformation matrices, more transformation matrix groups, and use more transformation matrices per transformation matrix group.
- Table 7 shows another correspondence relationship between intra prediction modes and transformation matrix groups.
- Index of the transformation matrix group 26 25 twenty four twenty three twenty two twenty one 20 19 18 17 16 15 14 13
- each transformation matrix group uses 3 transformation matrices.
- the corresponding relationship between the transformation matrix group and the intra prediction mode can be realized as follows: for the intra prediction mode 0 to 34, the forward direction corresponds to the transformation matrix group 0 to 34, that is, the larger the number of the prediction mode, the larger the index of the transformation matrix group; For intra prediction modes 35 to 67, due to transposition, they correspond inversely to 2 to 33, that is, the larger the number of the prediction mode, the smaller the index of the transformation matrix group; for the remaining prediction modes, they can all correspond uniformly to the transformation matrix group with index 2. That is to say, if transposition is not considered, an intra prediction mode corresponds to a transformation matrix group. According to this design, the residual corresponding to each intra prediction mode can obtain a more suitable LFNST transformation matrix, and the compression performance will also be improved.
- the wide-angle mode can also achieve one-to-one design, but this design has a low cost performance, and this application will not explain it in detail.
- the transformation matrix group to which the planar mode is adapted in this application can be used as the transformation matrix group adapted to the MIP.
- LFNST is only an example of quadratic transformation and should not be understood as a limitation on quadratic transformation.
- LFNST is a non-separable secondary transformation.
- a separable secondary transformation can also be used to improve the compression efficiency of the residual of oblique textures.
- Figure 15 is a schematic block diagram of the decoding framework 200 provided by the embodiment of the present application.
- the decoding framework 200 may include an entropy decoding unit 210, an inverse transform and inverse quantization unit 220, a residual unit 230, an intra prediction unit 240, an inter prediction unit 250, a loop filtering unit 260, and a decoded image buffer. Unit 270.
- the entropy decoding unit 210 After the entropy decoding unit 210 receives and decodes the code stream, it obtains the prediction block and the frequency domain residual block. For the frequency domain residual block, the inverse transform and inverse quantization unit 220 performs steps such as transformation and inverse quantization to obtain the time domain residual block. block, the residual unit 230 superposes the prediction block predicted by the intra prediction unit 240 or the inter prediction unit 250 to the time domain residual block after transformation and inverse quantization by the inverse transformation and inverse quantization unit 220, to obtain a reconstructed block .
- Figure 16 is a schematic flow chart of the decoding method 300 provided by the embodiment of the present application. It should be understood that the decoding method 300 can be performed by a decoder. For example, it is applied to the decoding framework 200 shown in FIG. 15 . For the convenience of description, the following takes the decoder as an example.
- the decoding method 300 may include some or all of the following:
- the decoder decodes the code stream to obtain the first transform coefficient of the current block
- S320 The decoder performs a first transformation on the first transform coefficient to obtain a second transform coefficient of the current block
- the decoder performs a second transformation on the second transformation coefficient to obtain the residual block of the current block
- S340 The decoder predicts the current block based on the first intra prediction mode and the second intra prediction mode derived from the prediction mode derivation mode, and obtains the prediction block of the current block;
- the decoder obtains a reconstructed block of the current block based on the prediction block of the current block and the residual block of the current block.
- This application introduces the first transformation based on the prediction mode derivation mode and the second transformation, which can improve the decompression efficiency of the current block.
- the first transformation may be LFNST, that is, this application combines LFNST into the prediction mode derivation mode, which can improve the compression efficiency of the residual of oblique textures.
- the adaptation method of prediction mode derivation mode and LFNST is also applicable to other secondary transformation methods.
- LFNST is a non-separable secondary transform.
- the prediction mode derivation mode can also be applied to separable secondary transforms, which is not specifically limited in this application.
- the prediction mode derivation mode may include a decoder-side intra mode derivation DIMD mode or a template-based intra mode derivation TIMD mode.
- the S320 may include:
- the first identifier is used to identify that the prediction mode derivation mode is allowed to be used to predict the image block in the current sequence
- the second identifier is used to identify that the first transformation is allowed to be used to predict the current sequence
- the current sequence is an image sequence including the current block.
- the first identification may be used to control whether the current sequence uses the prediction mode to derive the mode.
- the identifier allows the prediction mode derivation mode to be used to predict the image block in the current sequence. If the value of the first identifier is The second value indicates that the prediction mode derivation mode is not allowed to be used to predict the image blocks in the current sequence.
- the first numerical value is 0 and the second numerical value is 1.
- the first numerical value is 1 and the second numerical value is 0.
- the first numerical value or the second numerical value can also be other values.
- the second identification is used to control whether the current sequence uses the first transformation.
- the identifier allows the image block in the current sequence to be transformed using the first transformation, and if the value of the second identifier is the third If the value is four, it indicates that the first transformation is not allowed to be used to transform the image blocks in the current sequence.
- the third numerical value is 0 and the fourth numerical value is 1.
- the third numerical value is 1 and the fourth numerical value is 0.
- the third numerical value or the fourth numerical value can also be other values.
- the first flag is recorded as sps_timd/dimd_enabled_flag and the second flag is recorded as sps_lfnst_enabled_flag, then when the values of sps_timd/dimd_enabled_flag and sps_lfnst_enabled_flag are both 1, the first transformation coefficient is performed, Obtain the second transform coefficient.
- the first identification is used to identify that the prediction mode derivation mode is not allowed to be used to predict the image blocks in the current sequence
- the second identification is used to identify that the use of the prediction mode derivation mode is not allowed
- the first identifier and/or the second identifier can also be replaced by an image (picture), a slice (slice), the largest coding unit (LCU), or a coding unit.
- Identification of levels such as tree unit (Coding Tree Unit, CTU), coding unit (coding unit, CU), prediction unit (prediction unit, PU), or transformation unit (transform unit, TU).
- images, slices, LCUs, CTUs, CUs, and PUs may be added to determine whether to use the prediction mode derivation mode or whether to use the first transformation. or TU and other level identifiers, which are not specifically limited in the embodiments of this application.
- the S320 may include:
- the first identifier is used to identify that the prediction mode derivation mode is allowed to be used to predict the image block in the current sequence
- the second identifier is used to identify that the first transformation is allowed to be used to predict the current sequence
- a first transformation is performed on the first transformation coefficient to obtain the first transformation coefficient. Two transformation coefficients.
- the third identifier is used to control whether the prediction mode derivation mode and the first transformation can be shared.
- the identifier allows the image block in the current sequence to use the prediction mode derivation mode and the first transformation at the same time; if the third identifier is the sixth value, then the image blocks in the current sequence are not allowed to use the prediction mode derivation mode and the first transformation at the same time.
- the fifth numerical value is 0 and the sixth numerical value is 1.
- the fifth numerical value is 1 and the sixth numerical value is 0.
- the fifth numerical value or the sixth numerical value can also be other values.
- the first flag is recorded as sps_timd/dimd_enabled_flag
- the second flag is recorded as sps_lfnst_enabled_flag
- the third flag is recorded as sps_timd/dimd_lfnst_enabled_flag
- the third identifier can also be replaced by a picture, a slice, a largest coding unit (LCU), a coding tree unit (CTU) ), coding unit (CU), prediction unit (PU) or transform unit (TU) and other levels of identification.
- LCU largest coding unit
- CTU coding tree unit
- CU coding unit
- PU prediction unit
- TU transform unit
- the S320 may include:
- the decoder performs a first transformation on the first transformation coefficient to obtain the second transformation coefficient when the height and/or width of the current block is greater than or equal to the first threshold.
- the device determines the height and/or width of the current block, and when the height and/or width of the current block is greater than or equal to the first threshold, performs a first transformation on the first transform coefficient to obtain the The second transformation coefficient.
- the first threshold may be 4, 8, 16, 32, 64 or other values.
- the method 300 may further include:
- the decoder determines a set of transformation matrices used by the first transformation.
- the prediction mode derivation mode combines two prediction modes (i.e., the first intra prediction mode and the second intra prediction mode) to predict the current block, different intra prediction modes are used to predict the current block.
- the prediction blocks obtained by prediction may have different texture characteristics. Therefore, if the prediction mode derivation mode is selected for the current block, it means that the first intra prediction mode may cause the prediction block of the current block to exhibit a texture characteristic.
- the second intra prediction mode may cause the prediction block of the current block to exhibit another texture characteristic; in other words, after predicting the current block, from a statistical point of view, the residual block of the current block will also exhibit two texture characteristics.
- the decoder needs to first determine a transformation matrix group adapted to its characteristics.
- the transformation matrix group used in the first transformation is usually a transformation matrix group defined based on a single intra prediction mode, the related scheme for determining the transformation matrix used in the first transformation needs to be further improved for the prediction mode derivation mode, as follows. Various implementations are illustrated.
- the first transformation uses the same transformation matrix set as the transformation matrix set for planar mode or direct current DC mode adaptation.
- the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the decoder classifies the prediction mode derivation mode and the planar mode (or DC mode) into one category, and determines the derivation mode according to the planar mode ( or DC mode) adapts the set of transformation matrices used for the first transformation.
- the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the encoder can return the prediction mode of the current block to planar mode (or DC mode), so that the decoder will match the planar mode ( or DC mode) adapted transformation matrix group, determined as the transformation matrix group used for the first transformation.
- the decoder when the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the decoder can consider that the transformation matrix group used in the first transformation for the current block can be the same as the planar mode (or DC mode). ) adapted transformation matrix group.
- the transformation matrix group adapted to the planar mode or the direct current DC mode is determined as the first transformation
- the transformation matrix group used can not only decode the current block based on the prediction mode derivation mode and the first transformation, but also ensure that the texture characteristics of the transformation matrix group used by the first transformation are as close as possible to the texture of the residual block of the current block.
- the decoder determines a third intra prediction mode based on the first intra prediction mode and the second intra prediction mode; wherein the transformation matrix group used by the first transformation is the same as the transformation matrix group used by the first transformation.
- the third intra prediction mode adaptation transformation matrix group is the same.
- the decoder may determine the third intra prediction mode adapted transformation matrix group as the transformation matrix group used for the first transformation.
- the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the decoder determines the third intra prediction mode based on the first intra prediction mode and the second intra prediction mode. prediction mode, and group the prediction mode derivation mode and the third intra prediction mode into one category, so that the decoder can adapt the set of transformation matrices for the first transformation according to the third intra prediction mode.
- the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the encoder can return the prediction mode of the current block to the third intra prediction mode, so that the decoder will match the third intra prediction mode.
- the transformation matrix group for prediction mode adaptation is determined as the transformation matrix group used for the first transformation.
- the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the decoder can consider that the transformation matrix group used in the first transformation for the current block can be the same as the third intra prediction mode.
- a set of adapted transformation matrices are provided.
- the decoder may first determine the third intra prediction mode without explicitly determining the transformation matrix group used for the first transformation through the third intra prediction mode. . Instead, the transformation matrix group adapted to the third intra prediction mode is directly used as the transformation matrix group used for the first transformation.
- the decoder determines the default prediction mode in the first intra prediction mode and the second intra prediction mode as the third intra prediction mode; or the decoder determines the default prediction mode in the first intra prediction mode and the second intra prediction mode based on the The weight of the first intra prediction mode and/or the weight of the second intra prediction mode determines the third intra prediction mode; or the decoder determines the third intra prediction mode based on the type of the first intra prediction mode and the second intra prediction mode.
- the type of the intra prediction mode determines the third intra prediction mode; or the decoder determines the third frame based on the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode. Intra prediction mode.
- the first intra prediction mode and the second intra prediction mode may be selected.
- the prediction mode determines the set of transformation matrices used by the first transformation.
- the first intra prediction mode can be used to determine in any case, that is, the transformation matrix group adapted to the first intra prediction mode is determined as the transformation used for the first transformation in any case.
- Matrix group alternatively, it can be determined using the second intra prediction mode in any case, that is, the transformation matrix group adapted to the second intra prediction mode is determined as the transformation matrix used for the first transformation in any case. Group.
- the first intra prediction mode can be used to determine in some cases, that is, in some cases, the transformation matrix group adapted to the first intra prediction mode is determined as the first transformation. Transformation matrix group; alternatively, it can be determined using the second intra-frame prediction mode in some cases, that is, in some cases, the transformation matrix group adapted to the second intra-frame prediction mode is determined as the first transformation. Transformation matrix group; even, in some cases, the plane mode or DC mode is used to determine, that is, in some cases, the transformation matrix group adapted to the plane mode or DC mode is determined as the first transformation. Transformation matrix group.
- the so-called determination using a certain prediction mode means that the prediction mode derivation mode is classified into the same category as the certain prediction mode, so that the decoder can adapt the transformation matrix group used for the first transformation according to the certain prediction mode.
- the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, it can return the certain prediction mode so that the decoder can adapt to the first prediction mode according to the certain prediction mode.
- a set of transformation matrices for the transformation In other words, when the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the decoder can consider that the transformation matrix group used in the first transformation of the current block can be the same as the certain prediction mode.
- a set of adapted transformation matrices when the decoder checks the prediction mode of the current block, if the current block uses the prediction mode derivation mode, the decoder can consider that the transformation matrix group used in the first transformation of the current block can be the same as the certain
- the first frame when the decoder determines the third intra prediction mode based on the weight of the first intra prediction mode and/or the weight of the second intra prediction mode, the first frame may be The intra prediction mode with the largest weight among the intra prediction mode and the second intra prediction mode is determined as the third intra prediction mode.
- the intra prediction mode with the greater weight is given priority.
- the priority is higher than the intra prediction mode with small weight. For example, if the weight of the first intra prediction mode is greater than the weight of the second intra prediction mode, the first intra prediction mode is determined as the third intra prediction mode, and if the third intra prediction mode If the weight of the second intra prediction mode is greater than the weight of the first intra prediction mode, the second intra prediction mode is determined as the third intra prediction mode.
- the decoder determines the third intra prediction mode based on the type of the first intra prediction mode and the type of the second intra prediction mode, if the first intra prediction mode and the second intra prediction mode includes an angle prediction mode and a non-angle prediction mode, then the angle prediction mode is determined as the third intra prediction mode.
- the angle prediction mode is used as the third intra prediction mode.
- the priority is higher than the non-angle prediction mode as the third intra prediction mode.
- the first intra-frame prediction mode is an angle prediction mode and the second intra-frame prediction mode is a non-angle prediction mode (such as planar mode or DC mode)
- the first intra-frame prediction mode ie, angle prediction mode is mode
- the first prediction The intra prediction mode corresponding to the angle is determined as the third intra prediction mode, wherein the first prediction angle is based on the prediction angle of the first intra prediction mode and the prediction of the second intra prediction mode.
- Angle determination If the absolute value of the difference between the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode is greater than the second threshold, then the planar mode or the direct current DC mode is Determined to be the third intra prediction mode.
- the decoder determines the third intra prediction mode based on the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode, if the first intra prediction mode If the prediction angle is relatively close to the prediction angle of the second intra prediction mode, the decoder can set the first intra prediction mode, the second intra prediction mode, or the prediction angle to be between the prediction angle of the first intra prediction mode and the second intra prediction mode.
- Intra prediction mode Intra prediction mode with intermediate prediction angle. For example, if the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode are significantly different, the decoder may determine the planar mode or the DC mode as the third intra prediction mode.
- the decoder determines the transformation matrix group adapted for the prediction mode derivation mode as the transformation matrix group used for the first transformation.
- the decoder may derive a mode definition adapted or dedicated set of transform matrices for the prediction mode.
- the first transformation is used to process textures in the current block in an oblique direction
- the second transformation is used to process textures in the current block in a horizontal direction and in a vertical direction. texture on.
- the first transformation at the decoding end is the inverse transformation of the first transformation at the encoding end
- the second transformation at the decoding end is the inverse transformation of the second transformation at the encoding end
- the first transformation is the secondary transformation mentioned above
- the second transformation can be the basic transformation or main transformation mentioned above.
- the first transformation can be the upper transformation.
- the inverse transformation or inverse transformation of the quadratic transformation involved in this article For example, for the encoding end, the first transformation can be inverse LFNST, and the second transformation can be DCT2 type, DCT8 type or DST7 type, etc.; for the decoder, the first transformation can be inverse LFNST. (Inverse) LFNST, the second transformation may be an inverse (inverse) DCT2 type, an inverse (inverse) DCT8 type or an inverse (inverse) DST7 type, etc.
- the decoding method according to the embodiment of the present application has been described in detail from the perspective of the decoder above.
- the encoding method according to the embodiment of the present application will be described from the perspective of the encoder with reference to FIG. 17 below.
- Figure 17 is a schematic flow chart of the encoding method 400 provided by the embodiment of the present application. It should be understood that the encoding method 400 can be performed by an encoder. For example, it is applied to the coding framework 100 shown in FIG. 1 . For ease of description, the following uses an encoder as an example.
- the encoding method 400 may include:
- S410 Predict the current block based on the first intra prediction mode and the second intra prediction mode derived from the prediction mode derivation mode, and obtain the prediction block of the current block;
- the first transformation at the decoding end is the inverse transformation of the fourth transformation at the encoding end
- the second transformation at the decoding end is the inverse transformation of the third transformation at the encoding end.
- the third transformation is the basic transformation or the main transformation mentioned above
- the fourth transformation is the secondary transformation mentioned above
- the first transformation is the inverse transformation (or inverse transformation) of the secondary transformation.
- Transform the second transformation may be the base transformation or the inverse transformation (or inverse transformation) of the main transformation.
- the first transformation may be an inverse (inverse) LFNST
- the second transformation may be an inverse (inverse) DCT2 type, an inverse (inverse) DCT8 type, or an inverse (inverse) DST7 type, etc.
- the third transformation may be DCT2 type, DCT8 type or DST7 type, etc.
- the fourth transformation may be LFNST.
- the prediction mode derivation mode includes a decoder-side intra mode derivation mode or a template-based intra mode derivation mode.
- the S450 may include:
- the first identification is used to identify that the prediction mode derivation mode is allowed to be used to predict the image blocks in the current sequence
- the second identification is used to identify that the fourth transformation is allowed to be used to predict the current sequence. Transform the image blocks in .
- the S450 may include:
- the third identification is used to identify that image blocks in the current sequence are allowed to use the prediction mode derivation mode and the fourth transformation at the same time.
- the S440 may include:
- the fourth transform is performed on the third transform coefficient to obtain the fourth transform coefficient.
- the method 400 may further include:
- the fourth transformation uses the same transformation matrix set as the transformation matrix set for planar mode or direct current DC mode adaptation.
- determining the transformation matrix group used for the fourth transformation includes:
- the transformation matrix group used in the fourth transformation is the same as the transformation matrix group used in the third intra prediction mode adaptation.
- determining a third intra prediction mode based on the first intra prediction mode and the second intra prediction mode includes:
- the third intra prediction mode is determined based on the weight of the first intra prediction mode and/or the weight of the second intra prediction mode; or
- the third intra prediction mode is determined based on the type of the first intra prediction mode and the type of the second intra prediction mode; or
- the third intra prediction mode is determined based on the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode.
- determining the third intra prediction mode based on the weight of the first intra prediction mode and/or the weight of the second intra prediction mode includes:
- the intra prediction mode with the largest weight among the first intra prediction mode and the second intra prediction mode is determined as the third intra prediction mode.
- determining the third intra prediction mode based on the type of the first intra prediction mode and the type of the second intra prediction mode includes:
- the angle prediction mode is determined as the third intra prediction mode.
- determining the third intra prediction mode based on the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode includes:
- the intra prediction corresponding to the first prediction angle is mode, determined to be the third intra prediction mode, wherein the first prediction angle is determined according to the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode:
- the planar mode or the direct current DC mode is determined as the The third intra prediction mode is described.
- determining the transformation matrix group used for the fourth transformation includes:
- the transformation matrix group adapted to the prediction mode derivation mode is determined as the transformation matrix group used for the fourth transformation.
- the fourth transformation is used to process the texture in the oblique direction in the current block
- the third transformation is used to process the texture in the current block in the horizontal direction and in the vertical direction. texture on.
- the encoding method can be understood as the reverse process of the decoding method. Therefore, for the specific solution of the encoding method 400, please refer to the relevant content of the decoding method 300. For the convenience of description, this application will not repeat it again.
- the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
- the execution order of each process should be determined by its functions and internal logic, and should not be used in this application.
- the execution of the examples does not constitute any limitations.
- Figure 18 is a schematic block diagram of the decoder 500 according to the embodiment of the present application.
- the decoder 500 may include:
- Decoding unit 510 used to decode the code stream to obtain the first transform coefficient of the current block
- Transformation unit 520 used for:
- Prediction unit 530 configured to predict the current block based on the first intra prediction mode and the second intra prediction mode derived from the prediction mode derivation mode, and obtain a prediction block of the current block;
- the reconstruction unit 540 is configured to obtain a reconstruction block of the current block based on the prediction block of the current block and the residual block of the current block.
- the prediction mode derivation mode includes a decoder-side intra mode derivation mode or a template-based intra mode derivation mode.
- the transformation unit 520 is specifically used to:
- the first identifier is used to identify that the prediction mode derivation mode is allowed to be used to predict the image block in the current sequence
- the second identifier is used to identify that the first transformation is allowed to be used to predict the current sequence
- the transformation unit 520 is specifically used to:
- the first identifier is used to identify that the prediction mode derivation mode is allowed to be used to predict the image block in the current sequence
- the second identifier is used to identify that the first transformation is allowed to be used to predict the current sequence
- a first transformation is performed on the first transformation coefficient to obtain the first transformation coefficient. Two transformation coefficients.
- the transformation unit 520 is specifically used to:
- the first identifier is used to identify that the prediction mode derivation mode is allowed to be used to predict the image block in the current sequence
- the second identifier is used to identify that the first transformation is allowed to be used to predict the current sequence
- the transformation unit 520 performs a second transformation on the second transformation coefficient, and before obtaining the residual block of the current block, it is also used to:
- the transformation unit 520 is specifically used to:
- the first transformation uses the same transformation matrix set as the transformation matrix set for planar mode or direct current DC mode adaptation.
- the transformation unit 520 is specifically used to:
- the transformation matrix group used in the first transformation is the same as the transformation matrix group used in the third intra prediction mode adaptation.
- the transformation unit 520 is specifically used to:
- the third intra prediction mode is determined based on the weight of the first intra prediction mode and/or the weight of the second intra prediction mode; or
- the third intra prediction mode is determined based on the type of the first intra prediction mode and the type of the second intra prediction mode; or
- the third intra prediction mode is determined based on the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode.
- the transformation unit 520 is specifically used to:
- the intra prediction mode with the largest weight among the first intra prediction mode and the second intra prediction mode is determined as the third intra prediction mode.
- the transformation unit 520 is specifically used to:
- the angle prediction mode is determined as the third intra prediction mode.
- the transformation unit 520 is specifically used to:
- the intra prediction corresponding to the first prediction angle is mode, determined to be the third intra prediction mode, wherein the first prediction angle is determined according to the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode:
- the planar mode or the direct current DC mode is determined as the The third intra prediction mode is described.
- the transformation unit 520 is specifically used to:
- the transformation matrix group adapted to the prediction mode derivation mode is determined as the transformation matrix group used for the first transformation.
- the first transformation is used to process textures in the current block in an oblique direction
- the second transformation is used to process textures in the current block in a horizontal direction and in a vertical direction. texture on.
- Figure 19 is a schematic block diagram of the encoder 600 according to the embodiment of the present application.
- the encoder 600 may include:
- Prediction unit 610 configured to predict the current block based on the first intra prediction mode and the second intra prediction mode derived from the prediction mode derivation mode, and obtain the prediction block of the current block;
- the residual unit 620 is used to obtain the residual block of the current block based on the prediction block of the current block;
- Transformation unit 630 used for:
- Encoding unit 640 used to encode the fourth transform coefficient.
- the prediction mode derivation mode includes a decoder-side intra mode derivation mode or a template-based intra mode derivation mode.
- the encoding unit 640 is specifically used to:
- the first identification is used to identify that the prediction mode derivation mode is allowed to be used to predict the image blocks in the current sequence
- the second identification is used to identify that the fourth transformation is allowed to be used to predict the current sequence. Transform the image blocks in .
- the encoding unit 640 is specifically used to:
- the third identification is used to identify that image blocks in the current sequence are allowed to use the prediction mode derivation mode and the fourth transformation at the same time.
- the transformation unit 630 is specifically used to:
- the fourth transform is performed on the third transform coefficient to obtain the fourth transform coefficient.
- the transform unit 630 performs a fourth transform on the third transform coefficient, and before obtaining the fourth transform coefficient of the current block, it is also used for:
- the fourth transformation uses the same transformation matrix set as the transformation matrix set for planar mode or direct current DC mode adaptation.
- the transformation unit 630 is specifically used to:
- the transformation matrix group used in the fourth transformation is the same as the transformation matrix group used in the third intra prediction mode adaptation.
- the transformation unit 630 is specifically used to:
- the third intra prediction mode is determined based on the weight of the first intra prediction mode and/or the weight of the second intra prediction mode; or
- the third intra prediction mode is determined based on the type of the first intra prediction mode and the type of the second intra prediction mode; or
- the third intra prediction mode is determined based on the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode.
- the transformation unit 630 is specifically used to:
- the intra prediction mode with the largest weight among the first intra prediction mode and the second intra prediction mode is determined as the third intra prediction mode.
- the transformation unit 630 is specifically used to:
- the angle prediction mode is determined as the third intra prediction mode.
- the transformation unit 630 is specifically used to:
- the intra prediction corresponding to the first prediction angle is mode, determined to be the third intra prediction mode, wherein the first prediction angle is determined according to the prediction angle of the first intra prediction mode and the prediction angle of the second intra prediction mode:
- the planar mode or the direct current DC mode is determined as the The third intra prediction mode is described.
- the transformation unit 630 is specifically used to:
- the transformation matrix group adapted to the prediction mode derivation mode is determined as the transformation matrix group used for the fourth transformation.
- the fourth transformation is used to process the texture in the oblique direction in the current block
- the third transformation is used to process the texture in the current block in the horizontal direction and in the vertical direction. texture on.
- the device embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be repeated here.
- the decoder 500 shown in Figure 18 may correspond to the corresponding subject in performing the method 300 of the embodiment of the present application, and the foregoing and other operations and/or functions of each unit in the decoder 500 are respectively to implement the method 300, etc.
- the encoder 600 shown in Figure 19 may correspond to the corresponding subject in performing the method 400 of the embodiment of the present application, that is, the foregoing and other operations and/or functions of each unit in the encoder 600 are respectively in order to implement the method 400, etc. Corresponding processes in each method.
- each unit in the decoder 500 or encoder 600 involved in the embodiment of the present application can be separately or entirely combined into one or several other units to form, or some of the units (some) can also be disassembled. It is divided into multiple units with smaller functions, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application.
- the above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present application, the decoder 500 or the encoder 600 may also include other units. In practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by multiple units in cooperation.
- a general-purpose computing device including a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), etc.
- Run a computer program capable of executing each step involved in the corresponding method to construct the decoder 500 or encoder 600 involved in the embodiment of the present application, and implement the encoding method or decoding method of the embodiment of the present application.
- the computer program can be recorded on, for example, a computer-readable storage medium, loaded into an electronic device through the computer-readable storage medium, and run therein to implement the corresponding methods of the embodiments of the present application.
- the units mentioned above can be implemented in the form of hardware, can also be implemented in the form of instructions in the form of software, or can be implemented in the form of a combination of software and hardware.
- each step of the method embodiments in the embodiments of the present application can be completed by integrated logic circuits of hardware in the processor and/or instructions in the form of software.
- the steps of the methods disclosed in conjunction with the embodiments of the present application can be directly embodied in hardware.
- the execution of the decoding processor is completed, or the execution is completed using a combination of hardware and software in the decoding processor.
- the software can be located in a mature storage medium in this field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in combination with its hardware.
- FIG. 20 is a schematic structural diagram of an electronic device 700 provided by an embodiment of the present application.
- the electronic device 700 at least includes a processor 710 and a computer-readable storage medium 720 .
- the processor 710 and the computer-readable storage medium 720 may be connected through a bus or other means.
- the computer-readable storage medium 720 is used to store a computer program 721
- the computer program 721 includes computer instructions
- the processor 710 is used to execute the computer instructions stored in the computer-readable storage medium 720.
- the processor 710 is the computing core and the control core of the electronic device 700. It is suitable for implementing one or more computer instructions. Specifically, it is suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding functions.
- the processor 710 may also be called a central processing unit (Central Processing Unit, CPU).
- the processor 710 may include, but is not limited to: a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) Or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- DSP Digital Signal Processor
- ASIC Application Specific Integrated Circuit
- FPGA Field Programmable Gate Array
- the computer-readable storage medium 720 can be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; optionally, it can also be at least one located far away from the aforementioned processor 710 Computer-readable storage media.
- the computer-readable storage medium 720 includes, but is not limited to: volatile memory and/or non-volatile memory.
- non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
- Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
- RAM Random Access Memory
- SRAM static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- DDR SDRAM double data rate synchronous dynamic random access memory
- Enhanced SDRAM, ESDRAM enhanced synchronous dynamic random access memory
- SLDRAM synchronous link dynamic random access memory
- Direct Rambus RAM Direct Rambus RAM
- the electronic device 700 may be the encoder or coding framework involved in the embodiment of the present application; the computer-readable storage medium 720 stores the first computer instructions; the computer-readable instructions are loaded and executed by the processor 710
- the first computer instructions stored in the storage medium 720 are used to implement the corresponding steps in the encoding method provided by the embodiment of the present application; in other words, the first computer instructions in the computer-readable storage medium 720 are loaded by the processor 710 and execute the corresponding steps, To avoid repetition, they will not be repeated here.
- the electronic device 700 may be the decoder or decoding framework involved in the embodiment of the present application; the computer-readable storage medium 720 stores second computer instructions; the computer-readable instructions are loaded and executed by the processor 710 The second computer instructions stored in the storage medium 720 are used to implement the corresponding steps in the decoding method provided by the embodiment of the present application; in other words, the second computer instructions in the computer-readable storage medium 720 are loaded by the processor 710 and execute the corresponding steps, To avoid repetition, they will not be repeated here.
- embodiments of the present application also provide a coding and decoding system, including the above-mentioned encoder and decoder.
- embodiments of the present application also provide a computer-readable storage medium (Memory).
- the computer-readable storage medium is a memory device in the electronic device 700 and is used to store programs and data.
- computer-readable storage medium 720 may include a built-in storage medium in the electronic device 700 , and of course may also include an extended storage medium supported by the electronic device 700 .
- the computer-readable storage medium provides storage space that stores the operating system of the electronic device 700 .
- one or more computer instructions suitable for being loaded and executed by the processor 710 are also stored in the storage space. These computer instructions may be one or more computer programs 721 (including program codes).
- a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium.
- the data processing device 700 can be a computer.
- the processor 710 reads the computer instructions from the computer-readable storage medium 720.
- the processor 710 executes the computer instructions, so that the computer executes the encoding method provided in the above various optional ways. or decoding method.
- the computer program product includes one or more computer instructions.
- the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transmitted from a website, computer, server, or data center to Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) methods.
- wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
- wireless such as infrared, wireless, microwave, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Discrete Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
| idx | 0 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12 | 13 | 14 |
| disLut[idx] | 8 | 8 | 8 | 4 | 4 | 2 | 0 | -2 | -4 | -4 | -8 | -8 |
| idx | 16 | 18 | 19 | 20 | 21 | 22 | 24 | 26 | 27 | 28 | 29 | 30 |
| disLut[idx] | -8 | -8 | -8 | -4 | -4 | -2 | 0 | 2 | 4 | 4 | 8 | 8 |
| mts_idx | 0 | 1 | 2 | 3 | 4 |
| trTypeHor | 0 | 1 | 2 | 1 | 2 |
| trTypeVer | 0 | 1 | 1 | 2 | 2 |
| 0 | 0<=mode<=1 |
| 1 | 2<=mode<=12 |
| 2 | 13<=mode<=23 |
| 3 | 24<=mode<=34 |
| 帧内预测模式 | -14 | -13 | -12 | -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 |
| 变换矩阵组的索引 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
| 帧内预测模式 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 变换矩阵组的索引 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 帧内预测模式 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 变换矩阵组的索引 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 帧内预测模式 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
| 变换矩阵组的索引 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 33 | 32 | 31 | 30 | 29 | 28 | 27 |
| 帧内预测模式 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
| 变换矩阵组的索引 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 |
| 帧内预测模式 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
| 变换矩阵组的索引 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 2 | 2 | 2 |
| 帧内预测模式 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | |||
| 变换矩阵组的索引 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
Claims (34)
- 一种解码方法,其特征在于,包括:解码码流获取当前块的第一变换系数;对所述第一变换系数进行第一变换,得到所述当前块的第二变换系数;对所述第二变换系数进行第二变换,得到所述当前块的残差块;基于由预测模式导出模式导出的第一帧内预测模式和第二帧内预测模式对所述当前块进行预测,得到所述当前块的预测块;基于所述当前块的预测块和所述当前块的残差块,得到所述当前块的重建块。
- 根据权利要求1所述的方法,其特征在于,所述预测模式导出模式包括解码器侧帧内模式导出模式或基于模板的帧内模式导出模式。
- 根据权利要求1或2所述的方法,其特征在于,所述对所述第二变换系数进行第二变换,得到所述当前块的残差块,包括:解码所述码流,获取第一标识和第二标识;若所述第一标识用于标识允许使用所述预测模式导出模式对当前序列中的图像块进行预测,且所述第二标识用于标识允许使用所述第一变换对所述当前序列中的图像块进行变换,则对所述第一变换系数进行第一变换,得到所述第二变换系数。
- 根据权利要求3所述的方法,其特征在于,所述对所述第一变换系数进行第一变换,得到所述当前块的第二变换系数,包括:若所述第一标识用于标识允许使用所述预测模式导出模式对所述当前序列中的图像块进行预测,且所述第二标识用于标识允许使用所述第一变换对所述当前序列中的图像块进行变换,则解码所述码流,获取第三标识;若所述第三标识用于标识允许所述当前序列中的图像块同时使用所述预测模式导出模式和所述第一变换,则对所述第一变换系数进行第一变换,得到所述第二变换系数。
- 根据权利要求3所述的方法,其特征在于,所述对所述第一变换系数进行第一变换,得到所述当前块的第二变换系数,包括:若所述第一标识用于标识允许使用所述预测模式导出模式对所述当前序列中的图像块进行预测,且所述第二标识用于标识允许使用所述第一变换对所述当前序列中的图像块进行变换,则在所述当前块的高和/或宽大于或等于第一阈值的情况下,对所述第一变换系数进行第一变换,得到所述第二变换系数。
- 根据权利要求1至5中任一项所述的方法,其特征在于,所述对所述第二变换系数进行第二变换,得到所述当前块的残差块之前,所述方法还包括:确定所述第一变换使用的变换矩阵组。
- 根据权利要求6所述的方法,其特征在于,所述第一变换使用的变换矩阵组与平面模式或直流DC模式适配的变换矩阵组相同。
- 根据权利要求6所述的方法,其特征在于,所述确定所述第一变换使用的变换矩阵组,包括:基于所述第一帧内预测模式和所述第二帧内预测模式,确定第三帧内预测模式;其中,所述第一变换使用的变换矩阵组与所述第三帧内预测模式适配的变换矩阵组相同。
- 根据权利要求8所述的方法,其特征在于,所述基于所述第一帧内预测模式和所述第二帧内预测模式,确定第三帧内预测模式,包括:将所述第一帧内预测模式和所述第二帧内预测模式中的缺省预测模式,确定为所述第三帧内预测模式;或基于所述第一帧内预测模式的权重和/或所述第二帧内预测模式的权重确定所述第三帧内预测模式;或基于所述第一帧内预测模式的类型和所述第二帧内预测模式的类型确定所述第三帧内预测模式;或基于所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度,确定所述第三帧内预测模式。
- 根据权利要求9所述的方法,其特征在于,所述基于所述第一帧内预测模式的权重和/或所述第二帧内预测模式的权重确定所述第三帧内预测模式,包括:将所述第一帧内预测模式和所述第二帧内预测模式中权重最大的帧内预测模式,确定为所述第三帧内预测模式。
- 根据权利要求9所述的方法,其特征在于,所述基于所述第一帧内预测模式的类型和所述第二帧内预测模式的类型确定所述第三帧内预测模式,包括:若所述第一帧内预测模式和所述第二帧内预测模式包括角度预测模式和非角度预测模式,则将所述角度预测模式,确定为所述第三帧内预测模式。
- 根据权利要求9所述的方法,其特征在于,所述基于所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度,确定所述第三帧内预测模式,包括:若所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度之间的差值的绝对值小于或等于第二阈值,则将第一预测角度对应的帧内预测模式,确定为所述第三帧内预测模式,其中,所述第一预测角度根据所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度确定:若所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度之间的差值的绝对值大于所述第二阈值,则将平面模式或直流DC模式确定为所述第三帧内预测模式。
- 根据权利要求6所述的方法,其特征在于,所述确定所述第一变换使用的变换矩阵组,包括:将所述预测模式导出模式适配的变换矩阵组,确定为所述第一变换使用的变换矩阵组。
- 根据权利要求1至13中任一项所述的方法,其特征在于,所述第一变换用于处理所述当前块中沿倾斜方向上的纹理,所述第二变换用于处理所述当前块中沿水平方向上的纹理和沿竖直方向上的纹理。
- 一种编码方法,其特征在于,包括:基于由预测模式导出模式导出的第一帧内预测模式和第二帧内预测模式对当前块进行预测,得到所述当前块的预测块;基于所述当前块的预测块,得到所述当前块的残差块;对所述当前块的残差块进行第三变换,得到所述当前块的第三变换系数;对所述第三变换系数进行第四变换,得到所述当前块的第四变换系数;对所述第四变换系数进行编码。
- 根据权利要求15所述的方法,其特征在于,所述预测模式导出模式包括解码器侧帧内模式导出模式或基于模板的帧内模式导出模式。
- 根据权利要求15或16所述的方法,其特征在于,所述对所述第四变换系数进行编码,包括:对第一标识、第二标识以及所述第四变换系数进行编码;其中,所述第一标识用于标识允许使用所述预测模式导出模式对当前序列中的图像块进行预测,所述第二标识用于标识允许使用所述第四变换对所述当前序列中的图像块进行变换。
- 根据权利要求17所述的方法,其特征在于,所述对第一标识、第二标识以及所述第四变换系数进行编码,包括:对所述第一标识、所述第二标识、所述第四变换系数以及第三标识进行编码;其中,所述第三标识用于标识允许所述当前序列中的图像块同时使用所述预测模式导出模式和所述第四变换。
- 根据权利要求15至18中任一项所述的方法,其特征在于,所述对所述第三变换系数进行第四变换,得到所述当前块的第四变换系数,包括:在所述当前块的高和/或宽大于或等于第一阈值的情况下,对所述第三变换系数进行所述第四变换,得到所述第四变换系数。
- 根据权利要求15至19中任一项所述的方法,其特征在于,所述对所述第三变换系数进行第四变换,得到所述当前块的第四变换系数之前,所述方法还包括:确定所述第四变换使用的变换矩阵组。
- 根据权利要求20所述的方法,其特征在于,所述第四变换使用的变换矩阵组与平面模式或直流DC模式适配的变换矩阵组相同。
- 根据权利要求20所述的方法,其特征在于,所述确定所述第四变换使用的变换矩阵组,包括:基于所述第一帧内预测模式和所述第二帧内预测模式,确定第三帧内预测模式;其中,所述第四变换使用的变换矩阵组与所述第三帧内预测模式适配的变换矩阵组相同。
- 根据权利要求22所述的方法,其特征在于,所述基于所述第一帧内预测模式和所述第二帧内预测模式,确定第三帧内预测模式,包括:将所述第一帧内预测模式和所述第二帧内预测模式中的缺省预测模式,确定为所述第三帧内预测模式;或基于所述第一帧内预测模式的权重和/或所述第二帧内预测模式的权重确定所述第三帧内预测模式;或基于所述第一帧内预测模式的类型和所述第二帧内预测模式的类型确定所述第三帧内预测模式;或基于所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度,确定所述第三帧内预测模式。
- 根据权利要求23所述的方法,其特征在于,所述基于所述第一帧内预测模式的权重和/或所述第二帧内预测模式的权重确定所述第三帧内预测模式,包括:将所述第一帧内预测模式和所述第二帧内预测模式中权重最大的帧内预测模式,确定为所述第三帧内预测模式。
- 根据权利要求23所述的方法,其特征在于,所述基于所述第一帧内预测模式的类型和所述第二帧内预测模式的类型确定所述第三帧内预测模式,包括:若所述第一帧内预测模式和所述第二帧内预测模式包括角度预测模式和非角度预测模式,则将所述角度预测模式,确定为所述第三帧内预测模式。
- 根据权利要求23所述的方法,其特征在于,所述基于所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度,确定所述第三帧内预测模式,包括:若所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度之间的差值的绝对值小于或等于第二阈值,则将第一预测角度对应的帧内预测模式,确定为所述第三帧内预测模式,其中,所述第一预测角度根据所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度确定:若所述第一帧内预测模式的预测角度和所述第二帧内预测模式的预测角度之间的差值的绝对值大于所述第二阈值,则将平面模式或直流DC模式确定为所述第三帧内预测模式。
- 根据权利要求20所述的方法,其特征在于,所述确定所述第四变换使用的变换矩阵组,包括:将所述预测模式导出模式适配的变换矩阵组,确定为所述第四变换使用的变换矩阵组。
- 根据权利要求15至27中任一项所述的方法,其特征在于,所述第四变换用于处理所述当前块中沿倾斜方向上的纹理,所述第三变换用于处理所述当前块中沿水平方向上的纹理和沿竖直方向上的纹理。
- 一种解码器,其特征在于,包括:解码单元,用于解码码流获取当前块的第一变换系数;变换单元,用于:对所述第一变换系数进行第一变换,得到所述当前块的第二变换系数;对所述第二变换系数进行第二变换,得到所述当前块的残差块;预测单元,用于基于由预测模式导出模式导出的第一帧内预测模式和第二帧内预测模式对所述当前块进行预测,得到所述当前块的预测块;重建单元,用于基于所述当前块的预测块和所述当前块的残差块,得到所述当前块的重建块。
- 一种编码器,其特征在于,包括:预测单元,用于基于由预测模式导出模式导出的第一帧内预测模式和第二帧内预测模式对当前块进行预测,得到所 述当前块的预测块;残差单元,用于基于所述当前块的预测块,得到所述当前块的残差块;变换单元,用于:对所述当前块的残差块进行第三变换,得到所述当前块的第三变换系数;对所述第三变换系数进行第四变换,得到所述当前块的第四变换系数;编码单元,用于对所述第四变换系数进行编码。
- 一种电子设备,其特征在于,包括:处理器,适于执行计算机程序;计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至14中任一项所述的方法或如权利要求15至28中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,用于存储计算机程序,所述计算机程序使得计算机执行如权利要求1至14中任一项所述的方法或如权利要求15至28中任一项所述的方法。
- 一种计算机程序产品,包括计算机程序/指令,其特征在于,所述计算机程序/指令被处理器执行时实现如权利要求1至14中任一项所述的方法或如权利要求15至28中任一项所述的方法。
- 一种码流,其特征在于,所述码流如权利要求1至14中任一项所述的方法中所述的码流或如权利要求15至28中任一项所述的方法生成的码流。
Priority Applications (6)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22936835.2A EP4510588A4 (en) | 2022-04-12 | 2022-04-12 | DECODING METHOD, CODING METHOD, DECODERS AND CODERS |
| JP2024560810A JP2025512523A (ja) | 2022-04-12 | 2022-04-12 | 復号化方法、符号化方法、デコーダ、エンコーダ |
| PCT/CN2022/086448 WO2023197181A1 (zh) | 2022-04-12 | 2022-04-12 | 解码方法、编码方法、解码器以及编码器 |
| CN202280094735.8A CN119013989A (zh) | 2022-04-12 | 2022-04-12 | 解码方法、编码方法、解码器以及编码器 |
| US18/913,625 US20250039454A1 (en) | 2022-04-12 | 2024-10-11 | Decoding method, encoding method, decoder and encoder |
| MX2024012724A MX2024012724A (es) | 2022-04-12 | 2024-10-14 | Metodo de decodificacion, metodo de codificacion, decodificador y codificador |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2022/086448 WO2023197181A1 (zh) | 2022-04-12 | 2022-04-12 | 解码方法、编码方法、解码器以及编码器 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/913,625 Continuation US20250039454A1 (en) | 2022-04-12 | 2024-10-11 | Decoding method, encoding method, decoder and encoder |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023197181A1 true WO2023197181A1 (zh) | 2023-10-19 |
Family
ID=88328719
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/086448 Ceased WO2023197181A1 (zh) | 2022-04-12 | 2022-04-12 | 解码方法、编码方法、解码器以及编码器 |
Country Status (6)
| Country | Link |
|---|---|
| US (1) | US20250039454A1 (zh) |
| EP (1) | EP4510588A4 (zh) |
| JP (1) | JP2025512523A (zh) |
| CN (1) | CN119013989A (zh) |
| MX (1) | MX2024012724A (zh) |
| WO (1) | WO2023197181A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025140624A1 (en) * | 2023-12-29 | 2025-07-03 | Douyin Vision Co., Ltd. | Method, apparatus, and medium for video processing |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20200059669A1 (en) * | 2017-04-25 | 2020-02-20 | Panasonic Intellectual Property Corporation Of America | Encoder, decoder, encoding method, and decoding method |
| CN110881127A (zh) * | 2018-09-06 | 2020-03-13 | 腾讯美国有限责任公司 | 控制残差编码的方法、装置、计算机设备和存储介质 |
| CN111869218A (zh) * | 2018-03-07 | 2020-10-30 | 腾讯美国有限责任公司 | 视频编解码的方法和装置 |
| CN113728640A (zh) * | 2019-04-23 | 2021-11-30 | 北京字节跳动网络技术有限公司 | 帧内预测和残差编解码 |
| CN114073081A (zh) * | 2019-06-25 | 2022-02-18 | 弗劳恩霍夫应用研究促进协会 | 使用基于矩阵的帧内预测和二次变换进行编码 |
Family Cites Families (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP4030762A4 (en) * | 2019-09-10 | 2023-09-06 | Samsung Electronics Co., Ltd. | IMAGE DECODING DEVICE USING A SET OF TOOLS AND CORRESPONDING IMAGE DECODING METHOD, AND IMAGE ENCODING DEVICE AND CORRESPONDING IMAGE ENCODING METHOD |
| US12615365B2 (en) * | 2021-04-12 | 2026-04-28 | Qualcomm Incorporated | Intra-mode dependent multiple transform selection for video coding |
| US11943432B2 (en) * | 2021-04-26 | 2024-03-26 | Tencent America LLC | Decoder side intra mode derivation |
| US12375663B2 (en) * | 2021-06-27 | 2025-07-29 | Alibaba Innovation Private Limited | Methods and systems for performing combined inter and intra prediction |
| US12506881B2 (en) * | 2021-06-28 | 2025-12-23 | Wilus Institute Of Standards And Technology Inc. | Video signal processing method using intra prediction and device therefor |
| WO2023274372A1 (en) * | 2021-07-01 | 2023-01-05 | Beijing Bytedance Network Technology Co., Ltd. | Method, device, and medium for video processing |
| US12160561B2 (en) * | 2021-08-02 | 2024-12-03 | Tencent America LLC | Method and apparatus for improved intra prediction |
| CN117941350A (zh) * | 2021-09-13 | 2024-04-26 | 鸿颖创新有限公司 | 用于视频编码中的帧内预测的设备和方法 |
| US20230090025A1 (en) * | 2021-09-22 | 2023-03-23 | Alibaba Singapore Holding Private Limited | Methods and systems for performing combined inter and intra prediction |
| CN118044182A (zh) * | 2021-09-29 | 2024-05-14 | 抖音视界有限公司 | 用于视频处理的方法、设备和介质 |
| US12531985B2 (en) * | 2021-10-01 | 2026-01-20 | Lg Electronics Inc. | CIIP-based prediction method and device |
| WO2023059056A1 (ko) * | 2021-10-05 | 2023-04-13 | 엘지전자 주식회사 | 비분리 1차 변환에 기반한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장하는 기록 매체 |
| US12010316B2 (en) * | 2021-10-05 | 2024-06-11 | Tencent America LLC | Modification on fusion of intra prediction |
| CN118525515A (zh) * | 2021-10-28 | 2024-08-20 | 抖音视界有限公司 | 视频处理方法、设备和介质 |
| US12126822B2 (en) * | 2021-12-07 | 2024-10-22 | Tencent America LLC | Most probable mode (mpm) list sorting |
| WO2023128615A1 (ko) * | 2021-12-29 | 2023-07-06 | 엘지전자 주식회사 | 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체 |
| US12355982B2 (en) * | 2022-01-04 | 2025-07-08 | Alibaba (China) Co., Ltd | Decoder-side chroma intra prediction mode gradient-based derivation |
| WO2023164245A1 (en) * | 2022-02-28 | 2023-08-31 | Beijing Dajia Internet Information Technology Co., Ltd. | Methods and devices for decoder-side intra mode derivation |
-
2022
- 2022-04-12 CN CN202280094735.8A patent/CN119013989A/zh active Pending
- 2022-04-12 WO PCT/CN2022/086448 patent/WO2023197181A1/zh not_active Ceased
- 2022-04-12 EP EP22936835.2A patent/EP4510588A4/en active Pending
- 2022-04-12 JP JP2024560810A patent/JP2025512523A/ja active Pending
-
2024
- 2024-10-11 US US18/913,625 patent/US20250039454A1/en active Pending
- 2024-10-14 MX MX2024012724A patent/MX2024012724A/es unknown
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20200059669A1 (en) * | 2017-04-25 | 2020-02-20 | Panasonic Intellectual Property Corporation Of America | Encoder, decoder, encoding method, and decoding method |
| CN111869218A (zh) * | 2018-03-07 | 2020-10-30 | 腾讯美国有限责任公司 | 视频编解码的方法和装置 |
| CN110881127A (zh) * | 2018-09-06 | 2020-03-13 | 腾讯美国有限责任公司 | 控制残差编码的方法、装置、计算机设备和存储介质 |
| CN113728640A (zh) * | 2019-04-23 | 2021-11-30 | 北京字节跳动网络技术有限公司 | 帧内预测和残差编解码 |
| CN114073081A (zh) * | 2019-06-25 | 2022-02-18 | 弗劳恩霍夫应用研究促进协会 | 使用基于矩阵的帧内预测和二次变换进行编码 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4510588A4 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025140624A1 (en) * | 2023-12-29 | 2025-07-03 | Douyin Vision Co., Ltd. | Method, apparatus, and medium for video processing |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119013989A (zh) | 2024-11-22 |
| EP4510588A4 (en) | 2026-02-18 |
| EP4510588A1 (en) | 2025-02-19 |
| US20250039454A1 (en) | 2025-01-30 |
| JP2025512523A (ja) | 2025-04-17 |
| MX2024012724A (es) | 2024-11-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI834773B (zh) | 使用適應性迴路濾波器以編碼和解碼影像之一或多個影像部分的方法、裝置和電腦可讀儲存媒體 | |
| EP3149941B1 (en) | Method, apparatus and system for de-blocking a block of video samples | |
| KR20180083389A (ko) | 비디오 코딩 방법 및 장치 | |
| WO2024007116A1 (zh) | 解码方法、编码方法、解码器以及编码器 | |
| WO2023193253A1 (zh) | 解码方法、编码方法、解码器以及编码器 | |
| CN118592025A (zh) | 解码方法、编码方法、解码器、编码器和编解码系统 | |
| WO2023123398A1 (zh) | 滤波方法、滤波装置以及电子设备 | |
| US20250039452A1 (en) | Decoding method, encoding method, decoder, and encoder | |
| WO2023193254A1 (zh) | 解码方法、编码方法、解码器以及编码器 | |
| US20250039454A1 (en) | Decoding method, encoding method, decoder and encoder | |
| CN118160306A (zh) | 帧内预测方法、解码器、编码器及编解码系统 | |
| WO2023197180A1 (zh) | 解码方法、编码方法、解码器以及编码器 | |
| RU2859876C2 (ru) | Способ декодирования, способ кодирования и энергонезависимый машиночитаемый носитель данных | |
| WO2025236218A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2025166744A1 (zh) | 编解码方法、编解码器、码流以及存储介质 | |
| WO2025091378A1 (zh) | 编解码方法、编解码器以及存储介质 | |
| WO2025199802A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
| WO2024212086A1 (zh) | 解码方法、编码方法、解码器以及编码器 |
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: 22936835 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202280094735.8 Country of ref document: CN |
|
| WWE | Wipo information: entry into national phase |
Ref document number: MX/A/2024/012724 Country of ref document: MX |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2024560810 Country of ref document: JP |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202417086796 Country of ref document: IN |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2022936835 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: 2022936835 Country of ref document: EP Effective date: 20241112 |



