Encoding method, decoding method, decoder, encoder, and storage medium

By adaptively selecting transformation kernel pairs based on block size and intra prediction mode, the method enhances video encoding and decoding efficiency and reduces encoding time and bit overhead.

JP7536386B2Active Publication Date: 2024-08-20HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023085664
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-03-09
Filing Date
2023-05-24
Publication Date
2024-08-20
Estimated Expiration
2040-03-09

AI Technical Summary

Technical Problem

Existing video encoding methods face inefficiencies due to the use of a single preset transformation kernel pair for all transform units (TUs), leading to varying compression effects and potential deterioration in encoding and decoding performance.

Method used

Adaptive selection of transformation kernel pairs based on the size and type of blocks, using a method that determines the optimal kernel pair for each block through intra prediction mode and shape information, and encoding the kernel pair index with adaptive binary arithmetic encoding.

Benefits of technology

Improves encoding and decoding performance by optimizing transformation kernel pairs for each block, reducing encoding time and bit overhead while maintaining high compression efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007536386000020
    Figure 0007536386000020
  • Figure 0007536386000029
    Figure 0007536386000029
  • Figure 0007536386000016
    Figure 0007536386000016
Patent Text Reader

Abstract

To provide a method for performing encoding and decoding, a decoding side, and an encoding side.SOLUTION: The method includes the steps of: obtaining encoded data of a current block; obtaining a transform kernel pair index of the current block from the encoded data in which a first bit of a binary codeword corresponding to the transform kernel pair index has been subjected to adaptive binary arithmetic decoding based on one context model; and establishing a transform kernel pair corresponding to the current block based on the transform kernel pair index, in which the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel. By adopting the present disclosure, encoding and decoding performance can be improved.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This invention claims priority to a Chinese patent application having application number 201910177580.4, filed on March 9, 2019, and titled "METHOD, DECODER, ENCODING END AND SYSTEM FOR ENCODING AND DECODING," the entire contents of which are incorporated herein by reference.

[0002] The present invention relates to the field of audio-video technology, in particular to an encoding method, a decoding method, a decoder, an encoder and a storage medium. [Background technology]

[0003] With the development of Internet technology and computer technology, video applications are becoming more and more, and users' demands for high-definition video in video applications are becoming more and more. However, because the data amount of high-definition video is relatively large, in order for high-definition video to be transmitted in a limited network bandwidth, it is necessary to perform an encoding process on the high-definition video. Generally, the encoding process includes intra prediction (or inter prediction), transform, quantization, entropy coding, in-loop filtering, etc. When performing the encoding process, a residual block (which can be called a TU (Transmission Unit), which can be called the residual signal of the current block) is obtained by intra prediction, and the TU is transformed (transformation refers to transforming an image described in the form of pixels in the spatial domain into the transform domain and expressing it in the form of transform coefficients) to obtain transform coefficients. Then, the transform coefficients are quantized and entropy coded to obtain encoded data. Summary of the Invention [Means for solving the problem]

[0004] The embodiments of the present disclosure provide an encoding method, a decoding method, a decoder, an encoder, and a storage medium.

[0005] In a first aspect, obtaining encoded data of a current block; determining that the height and width of the current block are both less than or equal to a preset threshold and the current block is a luminance block; Obtain a transform kernel pair index of the current block from the encoded data, where if the transform kernel pair index includes five index values, when an index value of the transform kernel pair index is a first index value, a transform kernel pair mapped by the transform kernel pair index is (DCT2, DCT2), when an index value of the transform kernel pair index is a second index value, a transform kernel pair mapped by the transform kernel pair index is (DST7, DST7), when an index value of the transform kernel pair index is a third index value, a transform kernel pair mapped by the transform kernel pair index is (DCT8, DST7), when an index value of the transform kernel pair index is a fourth index value, a transform kernel pair mapped by the transform kernel pair index is (DST7, DCT8), When the index value of the pair index is a fifth index value, the transform kernel pair mapped by the transform kernel pair index is (DCT8, DCT8), the binarized codeword corresponding to the transform kernel pair index occupies a maximum of 4 bits, the first bit of the binarized codeword corresponding to the transform kernel pair index is for indicating whether to use the transform kernel pair mapped by the first index value, and when the value of the first bit is a first value, it indicates that the transform kernel pair (DCT2, DCT2) mapped by the first index value is used, and when the value of the first bit is a second value, it indicates that the transform kernel pair mapped by one of the remaining index values ​​is used, and the first bit of the binarized codeword corresponding to the transform kernel pair index is decoded by performing adaptive binary arithmetic coding based on one context model; determining a transform kernel pair corresponding to the current block according to the transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel; Including, It relates to a decoding method.

[0006] In one possible embodiment of the present disclosure, determining a transform kernel pair corresponding to the current block based on the transform kernel pair index includes determining a transform kernel pair corresponding to the current block based on a transform kernel pair index of the current block and a predetermined correspondence relationship between transform kernel pair indexes and transform kernel pairs, where the correspondence relationship includes a mapping relationship between index values ​​of five transform kernel pair indexes and five transform kernel pairs.

[0007] In one possible embodiment of the present disclosure, when the value of the first bit is a second value, the first bit is used to indicate that a transform kernel pair mapped by one of the remaining index values ​​is used, and the transform kernel pair mapped by the one of the remaining index values ​​is one of four transform kernel pairs (DST7, DST7), (DCT8, DST7), (DST7, DCT8), (DCT8, DCT8); the value of the second bit of the binarized codeword is for distinguishing whether the transform kernel pair used by the current block is (DST7, DST7) or one of the other transform kernel pairs (DCT8, DST7), (DST7, DCT8), (DCT8, DCT8); the value of the third bit of the binarized codeword is for distinguishing whether the transform kernel pair used by the current block is (DCT8, DST7) or one of the transform kernel pairs (DST7, DCT8), (DCT8, DCT8); The value of the fourth bit of the binarized codeword is to distinguish whether the transform kernel pair used by the current block is (DST7, DCT8) or the transform kernel pair (DCT8, DCT8).

[0008] In one possible embodiment of the present disclosure, determining a transformation kernel pair corresponding to a current block based on the transformation kernel pair index includes: If the first bit is 0, determining that the transform kernel pair corresponding to the current block is (DCT2, DCT2); If the first bit is 1 and the second bit is 0, determining that the transformation kernel pair corresponding to the current block is (DST7, DST7); If the first bit is 1, the second bit is 1, and the third bit is 0, determining that the transform kernel pair corresponding to the current block is (DCT8, DST7); If the first bit is 1, the second bit is 1, the third bit is 1, and the fourth bit is 0, determining that the transformation kernel pair corresponding to the current block is (DST7, DCT8); If the first bit is 1, the second bit is 1, the third bit is 1, and the fourth bit is 1, determining that the transform kernel pair corresponding to the current block is (DCT8, DCT8); Includes.

[0009] In one possible embodiment of the present disclosure, before obtaining a transform kernel pair index for the current block from the encoded data, the method further includes determining whether the encoded data from an encoding side includes a target identifier, the target identifier being used to indicate that explicit multi-core transform processing is to be performed.

[0010] In one possible embodiment of the present disclosure, obtaining a transform kernel pair index of the current block from the encoded data includes: performing a step of obtaining a transform kernel pair index of the current block from the encoded data when determining that the current block is a luma block and that both a height and a width of the current block are less than or equal to 32.

[0011] In one possible embodiment of the present disclosure, the method further includes: if it is determined that the current block is not a luma block, or the height or width of the current block is greater than 32, then not decoding the transform kernel pair index of the current block, but directly taking (DCT2, DCT2) as the transform kernel pair used by the current block.

[0012] In one possible embodiment of the present disclosure, a first value of a first bit of a binarized codeword corresponding to the transformation kernel pair index is 0, and a second value of a first bit of a binarized codeword corresponding to the transformation kernel pair index is 1.

[0013] In one possible embodiment of the present disclosure, the binary code word for the first index value is 0, the binary code word for the second index value is 10, the binary code word for the third index value is 110, the binary code word for the fourth index value is 1110, and the binary code word for the fifth index value is 1111.

[0014] In one possible embodiment of the present disclosure, if the binarized codeword of the transformation kernel pair index further includes bits other than the first bit, the other bits are decoded using a context model-based adaptive binary arithmetic coding (CABAC) scheme.

[0015] In one possible embodiment of the present disclosure, obtaining the encoded data of the current block includes performing an entropy decoding process on the encoded data and performing an inverse quantization process on the entropy decoding result to obtain inverse quantized data of the current block.

[0016] In one possible embodiment of the present disclosure, after determining the transform kernel pair corresponding to the current block, the method further includes: using the transform kernel pair to perform an inverse transform process on the dequantized data of the current block to obtain a residual signal corresponding to the current block, and then adding the residual signal to a prediction signal to obtain reconstruction information corresponding to the current block.

[0017] In one possible embodiment of the present disclosure, the current block is a transform unit, and the current block is a coding unit obtained by splitting a coding tree unit using one or more of a quadtree split, a horizontal binary tree split, a vertical binary tree split, a horizontal ternary tree split and a vertical ternary tree split.

[0018] In one possible embodiment of the present disclosure, the current block is a transform unit whose width is greater than its height, or the current block is a transform unit whose width is equal to its height, or the current block is a transform unit whose width is less than its height.

[0019] In another aspect, determining that a height and a width of a current block are both equal to or less than a preset threshold and the current block is a luminance block; Determine a transform kernel pair corresponding to the current block and a transform kernel pair index corresponding to the current block, and when the transform kernel pair index includes five index values, if an index value of the transform kernel pair index is a first index value, a transform kernel pair mapped by the transform kernel pair index is (DCT2, DCT2), if an index value of the transform kernel pair index is a second index value, a transform kernel pair mapped by the transform kernel pair index is (DST7, DST7), if an index value of the transform kernel pair index is a third index value, a transform kernel pair mapped by the transform kernel pair index is (DCT8, DST7), and if an index value of the transform kernel pair index is a fourth index value, and if the transform kernel pair index is (DCT7, DCT8) and the index value of the transform kernel pair index is a fifth index value, the transform kernel pair index is (DCT8, DCT8), the binarized codeword corresponding to the transform kernel pair index occupies up to 4 bits, and a first bit of the binarized codeword corresponding to the transform kernel pair index is for indicating whether to use the transform kernel pair mapped by the first index value, and if the value of the first bit is a first value, it indicates that the transform kernel pair (DCT2, DCT2) mapped by the first index value is used, and if the value of the first bit is a second value, it indicates that the transform kernel pair mapped by one of the remaining index values ​​is used. For a first bit of a binarized codeword corresponding to the transformation kernel pair index, encoding the transformation kernel pair index according to a manner of performing adaptive binary arithmetic coding based on one context model, and adding the transformation kernel pair index to the coding data of the current block; Including, It relates to an encoding method.

[0020] In one possible embodiment of the present disclosure, determining a transform kernel pair corresponding to the current block and a transform kernel pair index corresponding to the current block includes: determining a transform kernel pair corresponding to the current block; and determining a transform kernel pair index for the current block based on the transform kernel pair and a predetermined correspondence relationship between the transform kernel pair indexes and the transform kernel pairs, where the correspondence relationship includes a mapping relationship between index values ​​of five transform kernel pair indexes and five transform kernel pairs.

[0021] In one possible embodiment of the present disclosure, using a transform kernel pair mapped by one index value among the remaining index values ​​when the value of the first bit is a second value includes: when the value of the first bit is a second value, the first bit is used to indicate using a transform kernel pair mapped by one index value among the remaining index values, the transform kernel pair mapped by one index value among the remaining index values ​​being one of four transform kernel pairs (DST7, DST7), (DCT8, DST7), (DST7, DCT8), (DCT8, DCT8); Wherein, the value of the second bit of the binarized codeword is for distinguishing whether the transform kernel pair used by the current block is (DST7, DST7) or one of the other transform kernel pairs (DCT8, DST7), (DST7, DCT8), and (DCT8, DCT8); Wherein, the value of the third bit of the binarized codeword is for distinguishing whether the transform kernel pair used by the current block is (DCT8, DST7) or one of the transform kernel pairs (DST7, DCT8), (DCT8, DCT8); Here, the value of the fourth bit of the binary codeword is for distinguishing whether the transform kernel pair used by the current block is (DST7, DCT8) or the transform kernel pair (DCT8, DCT8).

[0022] In one possible embodiment of the present disclosure, when the transform kernel pair corresponding to the current block is (DCT2, DCT2), the first bit of the binarized codeword is 0; when the transform kernel pair corresponding to the current block is (DST7, DST7), the first bit of the binarized codeword is 1 and the second bit is 0; when the transform kernel pair corresponding to the current block is (DCT8, DST7), the first bit of the binarized codeword is 1, the second bit is 1 and the third bit is 0; when the transform kernel pair corresponding to the current block is (DST7, DCT8), the first bit of the binarized codeword is 1, the second bit is 1, the third bit is 1 and the fourth bit is 0; when the transform kernel pair corresponding to the current block is (DCT8, DCT8), the first bit of the binarized codeword is 1, the second bit is 1, the third bit is 1 and the fourth bit is 0.

[0023] In one possible embodiment of the present disclosure, the method further includes adding a target identifier to the encoded data, the target identifier being used to indicate that explicit multi-core conversion processing is to be performed.

[0024] In one possible embodiment of the present disclosure, determining a transform kernel pair corresponding to the current block and a transform kernel pair index corresponding to the current block includes: If it is determined that the current block is a luminance block and both the height and width of the current block are less than or equal to 32, performing a step of determining a transformation kernel pair corresponding to the current block and a transformation kernel pair index corresponding to the current block.

[0025] In one possible embodiment of the present disclosure, the encoding method further includes: if it is determined that the current block is not a luma block, or the height or width of the current block is greater than 32, not encoding the transform kernel pair index of the current block, but directly taking (DCT2, DCT2) as the transform kernel pair used by the current block.

[0026] In one possible embodiment of the present disclosure, a first value of a first bit of a binarized codeword corresponding to the transformation kernel pair index is 0, and a second value of a first bit of a binarized codeword corresponding to the transformation kernel pair index is 1.

[0027] In one possible embodiment of the present disclosure, the binary code word for the first index value is 0, the binary code word for the second index value is 10, the binary code word for the third index value is 110, the binary code word for the fourth index value is 1110, and the binary code word for the fifth index value is 1111.

[0028] In one possible embodiment of the present disclosure, the encoding method further includes, when the binarized codeword of the transformation kernel pair index further includes bits other than the first bit, decoding the other bits using a context model based adaptive binary arithmetic coding (CABAC) scheme.

[0029] In one possible embodiment of the present disclosure, the encoding method further includes: transforming the current block based on the transform kernel pair to obtain transform coefficients; performing a quantization process on the transform coefficients to obtain quantized coefficients; and performing an entropy encoding process on the quantized coefficients to obtain encoded data of the current block.

[0030] In one possible embodiment of the present disclosure, after determining the transform kernel pair corresponding to the current block, the method further includes: transforming a residual signal of the current block based on the transform kernel pair to obtain transform coefficients, performing a quantization operation on the transform coefficients to obtain quantized coefficients, and performing an entropy coding operation on the quantized coefficients to obtain encoded data of the current block; and adding the coded transform kernel pair index to the coded data.

[0031] In one possible embodiment of the present disclosure, the current block is a transform unit, and the current block is a coding unit obtained by splitting a coding tree unit using one or more of a quadtree split, a horizontal binary tree split, a vertical binary tree split, a horizontal ternary tree split and a vertical ternary tree split.

[0032] In one possible embodiment of the present disclosure, the current block is a transform unit whose width is greater than its height, or the current block is a transform unit whose width is equal to its height, or the current block is a transform unit whose width is less than its height.

[0033] In another aspect, the present invention relates to a decoder including a processor and a memory for storing processor-executable instructions, wherein the processor is configured to perform a decoding method according to any of the embodiments above.

[0034] In another aspect, the present invention relates to an encoder including a processor and a memory for storing processor-executable instructions, wherein the processor is configured to perform an encoding method according to any of the preceding embodiments.

[0035] In another aspect, the present invention relates to a decoding device configured to perform the decoding method according to any of the above embodiments.

[0036] In another aspect, the present invention relates to an encoding device configured to perform the encoding method according to any of the above embodiments.

[0037] In another aspect, the present invention relates to a machine-readable storage medium having stored thereon machine-executable instructions executable by a processor, the machine-readable storage medium being used by the processor to execute the machine-executable instructions to realize the decoding method described in any of the above embodiments or the encoding method described in any of the above embodiments. [Brief description of the drawings]

[0038] [Figure 1] FIG. 2 is a schematic diagram of block division types according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of dividing a CTU into CUs according to an embodiment of the present disclosure. [Diagram 3] FIG. 2 is a schematic diagram of three general types of blocks according to an embodiment of the present disclosure. [Figure 4] FIG. 1 is a schematic diagram of directions when performing intra prediction according to an embodiment of the present disclosure. [Diagram 5] FIG. 2 is a schematic diagram of encoding according to an embodiment of the present disclosure. [Figure 6] FIG. 2 is a schematic diagram of a distributed signal according to an embodiment of the present disclosure. [Figure 7] FIG. 1 is a schematic diagram of a residual signal distribution according to an embodiment of the present disclosure. [Figure 8] 4 is a flowchart of a method for encoding according to an embodiment of the present disclosure. [Figure 9]4 is a flowchart of a method for decoding according to an embodiment of the present disclosure. [Figure 10] 4 is a flowchart of a method for encoding according to an embodiment of the present disclosure. [Figure 11] 4 is a flowchart of a method for decoding according to an embodiment of the present disclosure. [Figure 12] 4 is a flowchart of a method for encoding according to an embodiment of the present disclosure. [Figure 13] 4 is a flowchart of a method for decoding according to an embodiment of the present disclosure. [Figure 14] FIG. 2 is a structural schematic diagram of a decoding side according to an embodiment of the present disclosure; [Figure 15] FIG. 2 is a structural schematic diagram of the encoding side according to an embodiment of the present disclosure; [Figure 16] FIG. 2 is a structural schematic diagram of a decoding side according to an embodiment of the present disclosure; [Figure 17] FIG. 2 is a structural schematic diagram of the encoding side according to an embodiment of the present disclosure; [Figure 18] FIG. 2 is a structural schematic diagram of a decoding side according to an embodiment of the present disclosure; [Figure 19] FIG. 2 is a structural schematic diagram of the encoding side according to an embodiment of the present disclosure; [Figure 20] FIG. 2 is a structural schematic diagram of the encoding side according to an embodiment of the present disclosure; [Figure 21] FIG. 2 is a structural schematic diagram of a decoding side according to an embodiment of the present disclosure; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0039] In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the following describes the embodiments of the present disclosure in more detail with reference to the drawings.

[0040] In the related art, when transforming, a certain preset transform kernel pair (the transform kernel pair is composed of a horizontal transform kernel and a vertical transform kernel) is usually selected to perform a transform process on the TU to obtain transform coefficients. Correspondingly, when decoding, the preset transform kernel pair used in encoding is selected to perform an inverse transform process on the TU to obtain a residual signal.

[0041] As such, the compression effect varies greatly when transforming the same TU using different transform kernel pairs, so if the same preset transform kernel pair is used to perform transform processing on all TUs, the encoding and decoding performance may be degraded.

[0042] The present disclosure provides a method for encoding and decoding, in which an execution entity of the method for encoding may be an encoding side, and an execution entity of the method for decoding may be a decoding side, where the encoding side or the decoding side may be an apparatus capable of encoding and / or decoding video data, such as a server, a computer, a mobile phone, etc.

[0043] Here, the encoding side or the decoding side may be provided with a processor, a memory, a transceiver, etc., the processor may be used to perform the encoding process and / or the decoding process, the memory may be used to store data necessary for the encoding and / or decoding process and generated data, and the transceiver may be used to receive and transmit data, such as acquiring video data.

[0044] Before going into the implementation, the concept of the embodiment of the present disclosure will be explained.

[0045] "Transform kernel"

[0046] In video coding, transformation is an essential step to realize video data compression and can better concentrate the signal energy, and the transformation technology based on DCT (Discrete Cosine Transform) / DST (Discrete Sine Transform) is the main transformation technology in video coding. DCT and DST are further specifically divided into several types of transform kernels according to the difference in basis functions, and Table 1 shows the basis functions of three commonly used types of transform kernels.

[0047] [Table 1]

[0048] "Forward transform and inverse transform"

[0049] In video coding, the transformation process includes forward and inverse transformation processes, also called forward and inverse transformation, where the forward transformation transforms a two-dimensional residual signal (residual coefficients) into a two-dimensional spectrum signal (transform coefficients) with more concentrated energy, and the transform coefficients undergo a quantization process to effectively remove high-frequency components and retain low- and mid-frequency components, thus playing a role in compression. It is expressed as a determinant as shown in Equation (1), i.e.,

number

[0050] Here, m is the residual block width, n is the residual block height, f is the original residual signal with NxM dimensions, f is the frequency domain signal with NxM dimensions, A and B are the transformation matrices with MxM and NxN dimensions, both of which satisfy orthogonality.

[0051] The inverse transform, also called the backward transform, is the reverse process of the forward transform, that is, the frequency domain signal F is transformed into the time domain residual signal f by the orthogonal transform matrices A and B. It is expressed as a matrix as shown in Equation (2), that is,

number

[0052] "Horizontal transform and vertical transform"

[0053] In the transform stage of video coding, a two-dimensional residual signal is input, and as shown in equation (3),

number

[0054] Therefore, the forward transform of one two-dimensional residual signal can be realized by two one-dimensional forward transforms, and after the first forward transform, one MxN signal X is obtained, and the correlation between pixels in the horizontal direction of the two-dimensional residual signal is eliminated, so the first forward transform is called a horizontal transform and A is called the horizontal transform matrix; the correlation between pixels in the vertical direction of the two-dimensional residual signal is eliminated in the second forward transform, so the second forward transform is called a vertical transform and B is called the vertical transform matrix.

[0055] "Transform kernel pair"

[0056] In the next-generation video coding standard, since a TU (Transmission Unit) supports rectangular blocks, M may not be equal to N, and therefore the dimensions of A and B may not be the same. In addition, the next-generation video coding standard also supports that A and B are not transformation matrices with the same transformation kernel, so there is a transformation kernel pair {H, V} for the transformation, which consists of transformation kernels corresponding to A and B, where H is called the horizontal transformation kernel and V is called the vertical transformation kernel.

[0057] "Block Partition Technology"

[0058] In HEVC (High Efficiency Video Coding), a quadtree is used to recursively divide one 64x64 size CTU (Coding Tree Unit) into CUs (Coding Units). At the leaf node CU level, it is determined whether to use intra coding or inter coding. A CU may be further divided into two or four PUs (Prediction Units), and within the same PU, the same prediction information is used. After the prediction is completed and a residual signal is obtained, one CU can be further divided into four and divided into multiple TUs.

[0059] However, there has been a big change in the block partitioning technique in the newly proposed VVC (Versatile Video Coding). A partitioning structure that combines binary / ternary / quaternary tree (BT / TT / QT) replaces the original partitioning mode, cancels the original division of the concepts of CU, PU, ​​and TU, and supports a more flexible partitioning method for CU. CUs can be square or rectangular, and first, quadtree partitioning is performed on CTUs, and then further binary and ternary partitioning can be performed on the leaf nodes where quadtree partitioning has been performed. That is, there are five types of partitioning, namely, quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning. As shown in Fig. 1, the five partitioning types are shown, where (a) indicates no partitioning, (b) indicates quadtree partitioning, (c) indicates horizontal binary tree partitioning, (d) indicates vertical binary tree partitioning, (e) indicates horizontal ternary tree partitioning, and (f) indicates vertical ternary tree partitioning. As shown in Fig. 2, a diagram showing an example of partitioning a CTU into CUs is provided.

[0060] Therefore, based on the above division method, there are usually three types of shapes of blocks, as shown in Figure 3, in which (a) indicates a block whose width is greater than its height, (b) indicates a block whose width is equal to its height, and (c) indicates a block whose width is smaller than its height.

[0061] "Intra prediction"

[0062] Intra prediction takes into account that there is a strong spatial correlation between adjacent blocks in an image, so that the reconstructed pixels around it can be used as reference pixels to predict the current uncoded block. Therefore, instead of performing coding processing on the original signal, only performing post-coding processing on the residual signal (original signal-prediction signal) can effectively remove the redundancy in the spatial domain and greatly improve the compression efficiency of the video signal. And in intra prediction, a denser angle can bring about a better prediction effect. As shown in FIG. 4, a schematic diagram of the angle direction during intra prediction according to 67 types of intra prediction modes provided by VVC is shown, and the number of intra prediction modes is increased from 33 types in HEVC to 65 types. When the mode number is 0, it represents the Planar mode, and when the mode number is 1, it represents the DC mode (DC mode refers to the fact that the predicted pixels of the current block are all the average value of the reference pixels), and the black solid line represents the original HEVC angle direction (2, 4, 6, The dotted lines represent the newly added angular directions (3, 5, 7, 9, …, 63, 65). The denser angular directions can capture the boundaries of any direction in natural video more effectively, and by utilizing more reference information to make rate-distortion cost selection, we can find more suitable intra prediction modes to predict the current block more accurately, so that the predicted block is closer to the original block, and fewer bits need to be transmitted to code the current block, resulting in better coding performance. When performing intra prediction coding, these 67 intra modes are applied to coding blocks of all sizes, including luma and chroma components.

[0063] In Figure 4, the mode numbers of the intra-prediction modes are 2 to 34, the angle between the angular direction and the horizontal right direction ranges from -45 degrees to 45 degrees, the mode numbers of the intra-prediction modes are 35 to 66, and the angle between the angular direction and the horizontal right direction ranges from -135 degrees to -45 degrees.

[0064] In a plane rectangular coordinate system, the horizontal right direction is the positive direction of the x-axis, and the vertical up direction is the positive direction of the y-axis. Thus, in the first and second quadrants, the angle formed by a ray (direction in which the ray leaves the origin) with the origin as its vertex and the positive direction of the x-axis is a positive value, and in the third and fourth quadrants, the angle formed by a ray (direction in which the ray leaves the origin) with the origin as its vertex and the positive direction of the x-axis is a negative value. For example, the angle between the horizontal right direction and the axis of symmetry in the fourth quadrant (direction in which the ray leaves the origin) is -45 degrees.

[0065] The embodiment of the present disclosure provides a general coded frame, and as shown in FIG. 5, a complete video coding method generally includes prediction, transformation, quantization, entropy coding, in-loop filtering, etc. Here, prediction is specifically divided into intra prediction and inter prediction, and intra prediction considers that there is a strong spatial domain correlation between adjacent blocks in an image, so that the surrounding reconstructed pixels can be used as reference pixels to predict the current uncoded block, so that the original signal is not coded, but only the residual signal (original signal-predicted signal) is subjected to a post-coding process, which can effectively remove the redundancy in the spatial domain and greatly improve the compression efficiency of the video signal. Inter prediction refers to using the image pixels coded adjacently to predict the pixels of the current image by utilizing the correlation in the video signal time domain to achieve the purpose of removing the redundancy in the video time domain. In the case of inter prediction, since there is a strong temporal domain correlation in the video, that is, there are many similar image blocks in the images of two adjacent frames in the time domain, for the image block of the current frame, a motion search is performed in the adjacent reference image to find the block that best matches the current block as the reference block. Because the reference block and the current block are highly similar and the difference between them is very small, the code rate overhead of encoding the difference is usually much smaller than the code rate overhead of directly encoding the pixel values ​​of the current block.

[0066] In the above transformation process, different transformation kernel pairs are used for the same TU (also called the residual block, also called the current block) to compress the residual block, and the compression effect is very different. This is determined by the basis function of the transformation kernel itself, as shown in Figure 6, the input signal bit is 64 points, corresponding to the basis functions of three kinds of transformation kernels, DCT2, DST7, and DCT8. As can be seen from the zero-order basis function in the figure, DCT2 has a strong energy concentration effect on a uniformly distributed signal, and the generated DC component is a multiple of the average value of the input signal, DST7 has a strong energy concentration effect on an input signal with increasing amplitude, and DCT8 has a strong energy concentration effect on an input signal with decreasing amplitude.

[0067] In order to get a more intuitive feel for the relationship between different transform kernels and residual characteristics, as shown in Figure 7, five different horizontal and vertical transform kernel pairs represent different types of residual distribution situations. For the {DCT2, DCT2} transform kernel type, it represents that the residual of the TU is uniformly distributed; for the {DST7, DST7} transform kernel type, it represents that the residual of the TU is distributed in a sequentially increasing manner from left to right and from top to bottom, and is mainly distributed in the lower right of the TU; similarly, {DCT8, DST7} represents that the residual is mainly distributed in the lower left of the TU, {DST7, DCT8} represents that the residual is mainly distributed in the upper right of the TU, and {DCT8, DCT8} represents that the residual is mainly distributed in the upper left of the TU.

[0068] Context Model,In video coding, the process of updating symbol probabilities based on context is called,context model.

[0069] An embodiment of the present disclosure provides a method for encoding, and the execution flow of the method can be shown in FIG.

[0070] In step 801, the encoding side obtains the residual signal of the current block.

[0071] In implementation, when encoding video data, the encoding side first performs intra prediction to obtain a residual signal (the method of obtaining a residual block is consistent with existing video encoding standards and will not be described further), and then takes the residual signal as the residual signal of the current block currently being processed.

[0072] The method for selecting an intra prediction mode is as follows.

[0073] Generally, there are two indices to evaluate the coding efficiency: code rate and PSNR (Peak Signal to Noise Ratio). In general, the smaller the bitstream, the higher the compression rate, and the higher the PSNR, the better the quality of the reconstructed image. When selecting a mode, the discriminant actually evaluates both of them comprehensively.

[0074] The rate-distortion cost corresponding to a mode is J(mode)=D+λ*R, where D stands for distortion, which is usually measured using the SSE (Sum of Squares Error) index, where SSE means the root mean square sum of the difference between the reconstructed block and the source image, λ is the Lagrange undetermined multiplier, and R is the actual number of bits required to code the image block in the corresponding intra-prediction mode, including the total bit sum required for coding mode information, motion information, residual signal, etc.

[0075] The encoding side obtains an explicit multi-core transform syntax table, and when one type of intra prediction mode is selected as shown in Table 2, each transform kernel pair in Table 2 is selected, and the transform process, quantization, entropy coding, and decoding process are performed in order to cycle through each type of intra prediction mode, and then the intra prediction mode and transform kernel pair with the smallest rate-distortion cost are selected, and the intra prediction mode is determined as the intra prediction mode corresponding to the current block. In this way, the intra prediction mode and transform kernel pair corresponding to the current block can be determined. For example, there are 67 types of intra prediction modes, and one type of intra prediction mode has 5 transform kernel pairs, and in this way, there are 67*5 combinations, each combination includes one type of intra prediction mode and one transform kernel pair, and the combination with the smallest rate-distortion cost is selected and used for the final intra prediction and transform.

[0076] [Table 2]

[0077] Note that alternative possible implementations of Table 2 could use DCT4 instead of DCT8, DST4 instead of DST7, or other transform kernels instead of DCT8 and DST7.

[0078] In addition, as shown in Table 3, in order to shorten the coding time, in addition to Table 2, the transform kernel pair (DCT8, DCT8) can be deleted, that is, the RDO decision of (DCT8, DCT8) is not performed, and in this way, the above combination is changed from 67*5 to 67*4, and the number of RDO decisions is reduced, so that the coding time is shortened. And since there is no transform kernel pair (DCT8, DCT8), the bits of the binarized codeword corresponding to the transform kernel pair index are also reduced from 4 to 3, so that the coded bit overhead can also be reduced.

[0079] [Table 3]

[0080] Note that another possible embodiment of Table 3 is to use DCT2 instead of DCT8, or to use DCT2 instead of DCT8 if certain preset shape constraints are met.

[0081] Also, as shown in Table 4, in addition to Table 3, in order to reduce the coding time, the transform kernel pair (DST7, DCT8) can be deleted. That is, the RDO decision of (DST7, DCT8) is not performed. In this way, the above combination is changed from 67*4 to 67*3, and the number of RDO decisions is reduced, so that the coding time is reduced. And, since there is no transform kernel pair (DCT8, DCT8), (DST7, DCT8), the bits of the binarized codeword corresponding to the transform kernel pair index are also reduced from 3 to 2, so that the coded bit overhead can also be reduced.

[0082] [Table 4]

[0083] Also, as shown in Table 5, in addition to Table 3, in order to reduce the coding time, the transform kernel pair (DCT8, DST7) can be deleted. That is, the RDO decision of (DCT8, DST7) is not performed. In this way, the above combination is changed from 67*4 to 67*3, and the number of RDO decisions is reduced, so that the coding time is reduced. And, since there is no transform kernel pair (DCT8, DCT8), (DCT8, DST7), the bits of the binarized codeword corresponding to the transform kernel pair index are also reduced from 3 to 2, so that the coded bit overhead can also be reduced.

[0084] [Table 5]

[0085] Also, as shown in Table 6, in addition to Table 2, in order to reduce the coding time, the transform kernel pairs (DCT8, DCT8), (DCT8, DST7), and (DST7, DCT8) can be deleted. That is, the RDO determination of (DCT8, DCT8), (DCT8, DST7), and (DST7, DCT8) is not performed. In this way, the above combinations are changed from 67*5 to 67*2, and the number of RDO determinations is reduced, so that the coding time is reduced. And, since there are no transform kernel pairs (DCT8, DCT8), (DCT8, DST7), and (DST7, DCT8), the bits of the binarized codeword corresponding to the transform kernel pair index are also reduced from 3 to 1, so that the coded bit overhead can also be reduced.

[0086] It should be noted that another possible embodiment of Tables 4 and 5 is to use DCT2 instead of DCT8, or to use DCT2 instead of DCT8 if certain preset shape constraints are met.

[0087] [Table 6]

[0088] Note that when Table 4 is used, the number of RDO decisions is reduced, but the coding performance is also reduced.

[0089] In addition, in Table 2, the first bit of the binarized codeword corresponding to the transform kernel pair index is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 1 or the transform kernel pair corresponding to the transform kernel pair indexes 2-5, the coding for the second bit is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 2 or the transform kernel pair corresponding to the transform kernel pair indexes 3-5, the coding for the third bit is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 3 or the transform kernel pair corresponding to the transform kernel pair indexes 4-5, and the coding for the fourth bit is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 4 or the transform kernel pair corresponding to the transform kernel pair index 5. That is, when the first bit is 0, it indicates that the transform kernel pair (DCT2, DCT2) is used; when the first bit is 1 and the second bit is 0, it indicates that the transform kernel pair (DST7, DST7) is used; when the first bit is 1, the second bit is 1, and the third bit is 0, it indicates that the transform kernel pair (DCT8, DST7) is used; when the first bit is 1, the second bit is 1, the third bit is 1, and the fourth bit is 0, it indicates that the transform kernel pair (DST7, DCT8) is used; when the first bit is 1, the second bit is 1, the third bit is 1, and the fourth bit is 0, it indicates that the transform kernel pair (DCT8, DCT8) is used.

[0090] In addition, in Table 3, the first bit of the binarized codeword corresponding to the transform kernel pair index is for distinguishing whether the current block uses the transform kernel pair corresponding to transform kernel pair index 1 or the transform kernel pair corresponding to transform kernel pair indexes 2-4, the coding for the second bit is for distinguishing whether the current block uses the transform kernel pair corresponding to transform kernel pair index 2 or the transform kernel pair corresponding to transform kernel pair indexes 3-4, and the coding for the third bit is for distinguishing whether the current block uses the transform kernel pair corresponding to transform kernel pair index 3 or the transform kernel pair corresponding to transform kernel pair index 4. That is, when the first bit is 0, it indicates that the transform kernel pair (DCT2, DCT2) is used; when the first bit is 1 and the second bit is 0, it indicates that the transform kernel pair (DST7, DST7) is used; when the first bit is 1, the second bit is 1, and the third bit is 0, it indicates that the transform kernel pair (DCT8, DST7) is used; when the first bit is 1, the second bit is 1, and the third bit is 1, it indicates that the transform kernel pair (DST7, DCT8) is used.

[0091] In addition, in Table 4, the first bit of the binarized codeword corresponding to the transform kernel pair index is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 1 or the transform kernel pair corresponding to the transform kernel pair index 2-3, and the coding for the second bit is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 2 or the transform kernel pair corresponding to the transform kernel pair index 3. That is, when the first bit is 0, it indicates that the transform kernel pair (DCT2, DCT2) is used, when the first bit is 1 and the second bit is 0, it indicates that the transform kernel pair (DST7, DST7) is used, and when the first bit is 1 and the second bit is 1, it indicates that the transform kernel pair (DCT8, DST7) is used.

[0092] In addition, in Table 5, the first bit of the binarized codeword corresponding to the transform kernel pair index is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 1 or the transform kernel pair corresponding to the transform kernel pair index 2-3, and the coding for the second bit is for distinguishing whether the current block uses the transform kernel pair corresponding to the transform kernel pair index 2 or the transform kernel pair corresponding to the transform kernel pair index 3. That is, when the first bit is 0, it indicates that the transform kernel pair (DCT2, DCT2) is used, when the first bit is 1 and the second bit is 0, it indicates that the transform kernel pair (DST7, DST7) is used, and when the first bit is 1 and the second bit is 1, it indicates that the transform kernel pair (DST7, DCT8) is used.

[0093] In addition, in Table 6, the first bit of the binarized codeword corresponding to the transform kernel pair index is for distinguishing whether the current block uses the transform kernel pair corresponding to transform kernel pair index 1 or the transform kernel pair corresponding to transform kernel pair index 2. That is, when the first bit is 0, it indicates that the transform kernel pair (DCT2, DCT2) is used, and when the first bit is 1, it indicates that the transform kernel pair (DST7, DST7) is used.

[0094] In step 802, the encoding side determines a transform kernel pair corresponding to a current block and a transform kernel pair index corresponding to the current block.

[0095] Here, the transformation kernel pair includes a vertical transformation kernel and a horizontal transformation kernel.

[0096] In implementation, the encoding side can obtain the finally selected transform kernel pair, and then select a transform kernel pair index corresponding to the transform kernel pair from the correspondence relationship between the transform kernel pair and the transform kernel pair index listed in any of Tables 2 to 6.

[0097] In addition, when encoding, which of Tables 2 to 6 is to be used is usually fixed, so only one of Tables 2 to 6 can be obtained.

[0098] In one possible embodiment of the present disclosure, prior to step 802, the following determination may be made.

[0099] The encoding side determines that the height and width of the current block are less than or equal to the preset thresholds, and the current block is a luminance block.

[0100] Here, the preset threshold can be preset and stored on the encoding side, and the preset threshold is generally N (N may be 32).

[0101] In practice, when the encoding side completes the execution of step 801, it can determine the number of pixel points of the current block in the height direction, i.e., the height of the current block, and determine the number of pixel points of the current block in the width direction, i.e., the width of the current block, and then determine whether the current block is a luminance block. If the current block is a luminance block and both the height and width of the current block are less than or equal to the preset threshold, it performs the processing of step 802.

[0102] In one possible embodiment of the present disclosure, the intra prediction mode or shape information of the current block can also be used to determine the transform kernel pair index, as shown below.

[0103] In the first manner, the encoding side determines a transform kernel pair corresponding to a current block, and determines a transform kernel pair index corresponding to the current block according to the intra prediction mode and the transform kernel pair of the current block.

[0104] In implementation, the encoding side can determine the transform kernel pair and the intra prediction mode of the current block as described above, and then obtain a preset explicit multi-core transform kernel pair syntax table, in which the intra prediction mode and the transform kernel pair are used to determine the transform kernel pair index corresponding to the current block.

[0105] In one possible embodiment of the present disclosure, the intra prediction mode is used to determine the transform kernel pair index as follows, and the corresponding processing may be as follows:

[0106] If the transform kernel pair is a first transform kernel pair and the mode number of the intra prediction mode of the current block is less than or equal to a preset value, determine that the transform kernel pair index corresponding to the current block is a first index; if the transform kernel pair is a second transform kernel pair and the mode number of the intra prediction mode of the current block is greater than the preset value, determine that the transform kernel pair index corresponding to the current block is a first index; if the transform kernel pair is a second transform kernel pair and the mode number of the intra prediction mode of the current block is less than or equal to the preset value, determine that the transform kernel pair index corresponding to the current block is a second index; if the transform kernel pair is a first transform kernel pair and the mode number of the intra prediction mode of the current block is greater than the preset value, determine that the transform kernel pair index corresponding to the current block is a second index.

[0107] In implementation, the syntax table of the preset explicit multi-core transformation kernel pair is as shown in Table 7.

[0108] [Table 7]

[0109] In Table 7, if the first transform kernel pair is (DST7, DCT8), the mode number of the intra prediction mode is equal to or less than the preset value (the preset value is 34), and the transform kernel pair index is determined to be 3, then the corresponding binarized codeword has three bits, which are sequentially 1, 1, 0. If the first transform kernel pair is (DCT8, DST7), the mode number of the intra prediction mode is greater than 34, and the corresponding transform kernel pair index is determined to be 3, then the corresponding binarized codeword has three bits, which are sequentially 1, 1, 0. If the first transform kernel pair is (DCT8, DST7), the mode number of the intra prediction mode is equal to or less than 34, and the corresponding transform kernel pair index is determined to be 4, then the corresponding binarized codeword has four bits, which are sequentially 1, 1, 1, 0. If it can be determined that the first transform kernel pair is (DST7, DCT8), the mode number of the intra prediction mode is greater than 34, and the transform kernel pair index is 4, then there are four bits of the corresponding binarized codeword, which are 1, 1, 1, 0 in sequence.

[0110] In addition, since some transform kernel pairs can directly determine the transform kernel pair index, the condition to be satisfied in the case of method 1 is that the determined transform kernel pair is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8).

[0111] In Table 7, when the transformation kernel pair index is 3, the above Mode=0-34?DST7:DCT8 means that if the mode number 0 to 34 of the intra prediction mode is true, the horizontal transformation kernel is DST7, otherwise the horizontal transformation kernel is DCT8. Mode=0-34?DCT8:DST7 means that if the mode number 0 to 34 of the intra prediction mode is true, the vertical transformation kernel is DCT8, otherwise the vertical transformation kernel is DST7. When the transformation kernel pair index is 4, the above Mode=0-34?DCT8:DST7 means that if the mode number 0 to 34 of the intra prediction mode is true, the horizontal transformation kernel is DCT8, otherwise the horizontal transformation kernel is DST7. Mode=0-34?DST7:DCT8 means that if the mode number 0 to 34 of the intra prediction mode is true, the vertical transformation kernel is DST7, otherwise the vertical transformation kernel is DCT8.

[0112] In the second method, the encoding side determines a transformation kernel pair corresponding to the current block, and determines a transformation kernel pair index corresponding to the current block according to the shape information of the current block and the transformation kernel pair.

[0113] In implementation, the encoding side determines the transform kernel pair and the shape information of the current block as described above, and then can obtain a preset explicit multi-core transform kernel pair syntax table, in which the transform kernel pair and the shape information of the current block are used to determine the transform kernel pair index corresponding to the current block.

[0114] In one possible embodiment of the present disclosure, the process of determining the transformation kernel pair index by referring to the shape information of the current block may be as follows:

[0115] If the transformation kernel pair is a first transformation kernel pair and the shape information of the current block meets the preset shape restriction condition, determine that the transformation kernel pair index corresponding to the current block is a first index. If the transformation kernel pair is a second transformation kernel pair and the shape information of the current block does not meet the preset shape restriction condition, determine that the transformation kernel pair index corresponding to the current block is a first index. If the transformation kernel pair is a second transformation kernel pair and the shape information of the current block meets the preset shape restriction condition, determine that the transformation kernel pair index corresponding to the current block is a second index. If the transformation kernel pair is a first transformation kernel pair and the shape information of the current block does not meet the preset shape restriction condition, determine that the transformation kernel pair index corresponding to the current block is a second index.

[0116] Here, the preset shape restriction condition can be preset and stored on the encoding side, and the preset shape restriction condition is that the width is equal to or greater than the height.

[0117] In implementation, the syntax table of the preset explicit multi-core transformation kernel pair is as shown in Table 8.

[0118] [Table 8]

[0119] In Table 8, if the first transform kernel pair is (DST7, DCT8), the shape information of the current block is that the width is greater than or equal to the height, and the transform kernel pair index is determined to be 3, then there are three bits in the corresponding binarized codeword, which are sequentially 1, 1, 0. If the first transform kernel pair is (DCT8, DST7), the shape information of the current block is that the width is less than the height, and the corresponding transform kernel pair index is determined to be 3, then there are three bits in the corresponding binarized codeword, which are sequentially 1, 1, 0. If the first transform kernel pair is (DCT8, DST7), the shape information of the current block is that the width is greater than or equal to the height, and the corresponding transform kernel pair index is determined to be 4, then there are four bits in the corresponding binarized codeword, which are sequentially 1, 1, 1, 0. If the first transform kernel pair is (DST7, DCT8), and the shape information of the current block is that the width is smaller than the height, and it can be determined that the transform kernel pair index is 4, then there are 4 bits in the corresponding binarized codeword, which are 1, 1, 1, 0 in sequence.

[0120] Based on Table 8, in method 2, if the shape information of the current block is that the width is greater than or equal to the height, and the first transformation kernel pair is (DST7, DCT8), the first index is 3, the shape information of the current block is that the width is less than the height, and the first transformation kernel pair is (DCT8, DST7), the first index is 3, the shape information of the current block is that the width is less than the height, and the first transformation kernel pair is (DST7, DCT8), the second index is 4, and the shape information of the current block is that the width is greater than or equal to the height, and the first transformation kernel pair is (DCT8, DST7), the second index is 4.

[0121] In addition, since some transform kernel pairs can directly determine the transform kernel pair index, the condition to be satisfied in the case of method 2 is that the determined transform kernel pair is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8).

[0122] In addition, in Table 8, when the transformation kernel pair index is 3, the above W≧H?DST7:DCT8 refers to the horizontal transformation kernel being DST7 if it is true that the width of the current block is equal to or greater than the height, otherwise the horizontal transformation kernel being DCT8. W≧H?DCT8:DST7 refers to the vertical transformation kernel being DCT8 if it is true that the width of the current block is equal to or greater than the height, otherwise the vertical transformation kernel being DST7. When the transformation kernel pair index is 4, the above W≧H?DCT8:DST7 refers to the horizontal transformation kernel being DCT8 if it is true that the width of the current block is equal to or greater than the height, otherwise the horizontal transformation kernel being DST7. W≧H?DST7:DCT8 refers to the vertical transformation kernel being DST7 if it is true that the width of the current block is equal to or greater than the height, otherwise the vertical transformation kernel being DCT8.

[0123] In addition, in Table 7 above, Mode represents the mode number, and in Table 8 above, W represents the width, and H represents the height.

[0124] In this way, by adaptively adjusting the priority of the transform kernel pair based on the shape information of the current block and the intra prediction mode described above, it is possible to shorten the binarized codeword corresponding to a highly probable transform kernel pair and the binarized codeword corresponding to the transform kernel pair index that needs to be encoded.

[0125] In addition, after obtaining the current block, the encoding side can first determine whether the height and width of the current block are less than or equal to N (N may be 32) and whether it is a luma block. If the height and width of the current block are less than or equal to N and it is a luma block, it can continue to execute step 802. If at least one of the conditions of the height and width being less than or equal to N and being a luma block is not met, the encoding side directly obtains a preset transform kernel pair (i.e., (DCT2, DCT2)).

[0126] In step 803, the encoding side performs an encoding process on the residual signal of the current block based on the transform kernel pair, and obtains encoded data corresponding to the current block.

[0127] In implementation, the encoding side obtains a transform kernel pair corresponding to the current block, and then converts the residual signal of the current block based on the transform kernel pair to obtain transform coefficients, and then performs a quantization process on the transform coefficients to obtain quantized coefficients, and performs an entropy encoding process on the quantized coefficients to obtain encoded data corresponding to the current block.

[0128] In step 804, the encoding side encodes the transformation kernel pair index according to a method of performing adaptive binary arithmetic coding based on one context model for the first bit of the binarized codeword corresponding to the transformation kernel pair index, and adds the transformation kernel pair index to the encoded data of the current block.

[0129] In implementation, a transform kernel pair index is added to the encoded data to allow the decoding side to know the transform kernel pair used at the encoding side.

[0130] The encoding side performs adaptive binary arithmetic coding on the first bit of the binarized codeword corresponding to the transformation kernel pair index based on one context model, and if the binarized codeword further includes other bits, the encoding side may use a context-based adaptive binary arithmetic coding (CABAC) scheme or a bypass binary arithmetic coding scheme to encode these other bits. After that, the encoding side adds the encoded transformation kernel pair index to the encoding data of the current block.

[0131] In this way, the encoding process of the current block is completed. An entire segment of video data can be encoded by processing each current block according to the flow shown in FIG.

[0132] In one possible embodiment of the present disclosure, the above other bits can be coded using a bypass binary arithmetic coding scheme, and the corresponding processing may be as follows:

[0133] When the binarized codeword corresponding to the transformed kernel pair index includes multiple bits, a first bit is adaptively coded according to a context model, and at least one of the bits other than the first bit is decoded by adopting a bypass binary arithmetic coding method, and the coded transformed kernel pair index is added to the coding data of the current block.

[0134] In implementation, when the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, the first bit is adaptively coded according to a context model, and at least one of the bits other than the first bit among the multiple bits is decoded by adopting a bypass binary arithmetic coding method, and then the coded transformation kernel pair index can be added to the coding data of the current block.

[0135] For example, if the transform kernel pair used is (DCT8, DCT8) and there are four corresponding bits, which are sequentially 1, 1, 1, 1, when encoding the first bit, one context model is used, and when encoding the remaining three bits, the bypass binary arithmetic coding method is adopted to decode them all. In this way, there is no need to store the context models of the remaining bits, which can save memory space and reduce the complexity of encoding and decoding.

[0136] In addition, to enable the decoding side to use an explicit multi-core conversion scheme, a target identifier may be added to the encoded data, and the target identifier is used to indicate that an explicit multi-core conversion scheme is used.

[0137] For the encoding scheme shown in the above FIG. 8, the embodiment of the present disclosure further provides a corresponding decoding scheme, as shown in FIG. 9, the process flow is as follows:

[0138] In step 901, the decoding side obtains the encoded data of the current block.

[0139] In implementation, when there is encoded data to be decoded, the decoding side obtains the encoded data, and then performs an entropy decoding process on the encoded data, and performs an inverse quantization process on the entropy decoding result to obtain the encoded data of the current block.

[0140] In step 902, the decoding side obtains a transform kernel pair index of a current block from the encoded data, where the first bit of the binarized codeword corresponding to the transform kernel pair index is decoded by performing adaptive binary arithmetic coding based on one context model.

[0141] In practice, the decoding side can obtain a transformation kernel pair index corresponding to the current block from the coding data of the current block, and when the coding side codes the transformation kernel pair index of the current block, the first bit of the binarized codeword corresponding to the transformation kernel pair index is adaptively binary arithmetic coded according to one context model. In this way, when decoding the first bit, the decoding side is also adaptively binary arithmetic coded according to one context model.

[0142] In one possible embodiment of the present disclosure, prior to step 902, the following determination may be made.

[0143] The decoding side determines that the height and width of the current block are less than or equal to the preset thresholds, and the current block is a luminance block.

[0144] Here, the preset threshold can be preset and stored on the decoding side, and the preset threshold is generally N (N may be 32).

[0145] In practice, when the decoding side completes the execution of step 901, it can determine the number of pixel points of the current block in the height direction, i.e., the height of the current block, and determine the number of pixel points of the current block in the width direction, i.e., the width of the current block. Then, the decoding side can determine whether the current block is a luminance block, and if the current block is a luminance block, and both the height and width of the current block are less than or equal to the preset threshold, it performs the processing of step 902.

[0146] Also, before performing the process of step 902, it may be determined whether the encoded data includes a target identifier, which is used to indicate that an explicit multi-core conversion process is to be performed. If the encoded data includes the target identifier, it indicates that an explicit multi-core conversion process is to be used, and the process of step 902 may be performed.

[0147] In step 903, the decoding side determines a transform kernel pair corresponding to the current block according to the transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel.

[0148] In implementation, after determining the transform kernel pair index of the current block, the decoding side can determine the transform kernel pair corresponding to the current block according to the corresponding relationship between the transform kernel pair index and the transform kernel pair.

[0149] In step 904, the decoding side performs a decoding process on the current block based on the transformation kernel pair to obtain reconstruction information corresponding to the current block.

[0150] In implementation, the decoding side determines a transform kernel pair corresponding to the current block, and then uses the transform kernel pair to perform inverse transform processing on the inversely quantized data of the current block to obtain a residual signal corresponding to the current block, and then adds the residual signal to a prediction signal of the current block to obtain reconstruction information corresponding to the current block.

[0151] In this way, the decoding process of the current block is completed. An entire segment of video data can be decoded by processing each current block according to the flow shown in FIG.

[0152] There are various ways to determine the transformation kernel pair for the current block in step 903, and various possible ways are given below.

[0153] For Scheme 1, as shown in Table 2, when the transform kernel pair index is 1, it indicates that the transform kernel pair used is (DCT2, DCT2), when the transform kernel pair index is 2, it indicates that the transform kernel pair used is (DST7, DST7), when the transform kernel pair index is 3, it indicates that the transform kernel pair used is (DCT8, DST7), when the transform kernel pair index is 4, it indicates that the transform kernel pair used is (DST7, DCT8), and when the transform kernel pair index is 5, it indicates that the transform kernel pair used is (DCT8, DCT8).

[0154] In the second method, the transformation kernel pair of the current block can be determined by using the corresponding relationship between the transformation kernel pair index and the transformation kernel pair in Table 3 and the transformation kernel pair index of the current block.

[0155] In the third method, the transformation kernel pair of the current block can be determined by using the corresponding relationship between the transformation kernel pair index and the transformation kernel pair in Table 4 and the transformation kernel pair index of the current block.

[0156] In the fourth method, the transformation kernel pair of the current block can be determined by using the corresponding relationship between the transformation kernel pair index and the transformation kernel pair in Table 5 and the transformation kernel pair index of the current block.

[0157] In Scheme 5, the transformation kernel pair of the current block can be determined by using the corresponding relationship between the transformation kernel pair index and the transformation kernel pair listed in Table 6 and the transformation kernel pair index of the current block.

[0158] In one possible embodiment of the present disclosure, the intra-mode information of the current block or the shape information of the current block can also be used to determine the transform kernel pair, and the corresponding process may be as follows:

[0159] The decoding side determines a transform kernel pair corresponding to the current block according to the intra prediction mode and the transform kernel pair index of the current block; or The decoding side determines the transformation kernel pair corresponding to the current block according to the transformation kernel pair index, the width and height of the current block.

[0160] In implementation, if the transform kernel pair index is a first index and the mode number of the intra prediction mode of the current block is less than or equal to a preset value, it is determined that the transform kernel pair corresponding to the current block is a first transform kernel pair; if the transform kernel pair index is a first index and the mode number of the intra prediction mode of the current block is greater than the preset value, it is determined that the transform kernel pair corresponding to the current block is a second transform kernel pair; if the transform kernel pair index is a second index and the mode number of the intra prediction mode of the current block is less than or equal to the preset value, it is determined that the transform kernel pair corresponding to the current block is the second transform kernel pair; if the transform kernel pair index is a second index and the mode number of the intra prediction mode of the current block is greater than the preset value, it is determined that the transform kernel pair corresponding to the current block is the first transform kernel pair.

[0161] Or, if the transformation kernel pair index is a first index and the shape information of the current block satisfies the preset shape restriction condition, determine that the transformation kernel pair corresponding to the current block is the first transformation kernel pair; if the transformation kernel pair index is a first index and the shape information of the current block does not satisfy the preset shape restriction condition, determine that the transformation kernel pair corresponding to the current block is the second transformation kernel pair; if the transformation kernel pair index is a second index and the shape information of the current block satisfies the preset shape restriction condition, determine that the transformation kernel pair corresponding to the current block is the second transformation kernel pair; if the transformation kernel pair index is a second index and the shape information of the current block does not satisfy the preset shape restriction condition, determine that the transformation kernel pair corresponding to the current block is the first transformation kernel pair. (This process can correspond to the process of step 803, and the description is omitted here.)

[0162] The above preset value may be 34 in Table 7, the first index may be 3, and the first transform kernel pair is (DST7, DCT8), and the second index may be 4, and the first transform kernel pair is (DCT8, DST7).

[0163] In one possible embodiment of the present disclosure, in order to save memory space of the encoding side, when the encoding side encodes the binarized codeword corresponding to the transformation kernel pair index, if the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, at least one of the multiple bits other than the first bit is decoded by adopting a bypass binary arithmetic coding scheme. In this way, when a bit is decoded by adopting a bypass binary arithmetic coding scheme, there is no need to store a context model, so that memory space can be saved. Similarly, when decoding, the decoding side also uses a corresponding scheme to decode.

[0164] In the embodiment of the present disclosure, when encoding a current block, the encoding side can obtain a transform kernel pair corresponding to the current block and perform encoding processing, instead of directly obtaining a preset transform kernel pair, so that the performance of encoding and decoding can be improved. When encoding a binarized codeword corresponding to a transform kernel pair index, the encoding side can perform encoding processing on the first bit of the binarized codeword corresponding to the transform kernel pair index using one context model without requiring multiple context models, so that memory space can be saved. In addition, since multiple context models are not required, there is no need to update the context, and the complexity of encoding and decoding can be reduced.

[0165] In another embodiment of the present disclosure, in consideration of saving memory space when the binarized codeword corresponding to the transformation kernel pair index contains multiple bits, the following encoding and decoding process is provided, as shown in FIG. 10.

[0166] In step 1001, the encoding side obtains the residual signal of the current block.

[0167] In implementation, when encoding video data, the encoding side first performs intra prediction to obtain a residual signal (the method for obtaining the residual signal is consistent with existing video encoding standards and will not be described), and then uses the residual signal as the residual signal of the current block currently being processed.

[0168] The method of selecting the intra prediction mode is the same as the method of selecting the intra prediction mode in step 801, so reference can be made to step 801, and the description thereof will be omitted here.

[0169] In step 1002, the encoding side determines a transform kernel pair corresponding to a current block and a transform kernel pair index corresponding to the current block.

[0170] Here, the transformation kernel pair includes a vertical transformation kernel and a horizontal transformation kernel.

[0171] In implementation, the encoding side obtains the finally selected transform kernel pair, and then selects a transform kernel pair index corresponding to the transform kernel pair from any one of Tables 2 to 6. (For this processing process, the process of step 802 can be referred to.)

[0172] In addition, when encoding, which of Tables 2 to 6 is to be used is usually fixed, so only one of Tables 2 to 6 can be obtained.

[0173] In one possible embodiment of the present disclosure, there are various ways to determine the transformation kernel pair index, and two possible embodiments are given below.

[0174] In the first manner, the encoding side determines a transform kernel pair corresponding to a current block, and determines a transform kernel pair index corresponding to the current block according to the intra prediction mode and the transform kernel pair of the current block.

[0175] This process is completely the same as Scheme 1 shown in Table 7 in step 802, and the description is omitted here.

[0176] In the second method, the encoding side determines a transformation kernel pair corresponding to the current block, and determines a transformation kernel pair index corresponding to the current block according to the shape information of the current block and the transformation kernel pair.

[0177] This process is completely the same as Scheme 2 shown in Table 8 in step 802, and the description is omitted here.

[0178] In addition, after obtaining the current block, the encoding side can first determine whether the height and width of the current block are less than or equal to N (N may be 32) and whether it is a luma block. If the height and width of the current block are less than or equal to 32 and it is a luma block, it can continue to execute step 1002. If at least one of the conditions of the height and width being less than or equal to 32 and being a luma block is not met, the encoding side directly obtains a preset transform kernel pair (i.e., (DCT2, DCT2)).

[0179] In step 1003, the encoding side performs an encoding process on the residual signal of the current block based on the transform kernel pair, and obtains encoded data corresponding to the current block.

[0180] In implementation, the encoding side obtains a transform kernel pair corresponding to the current block, and then transforms the residual signal of the current block according to the transform kernel pair to obtain transform coefficients. After that, the encoding side performs a quantization process on the transform coefficients to obtain quantized coefficients, and the encoding side performs an entropy coding process on the quantized coefficients to obtain coded data corresponding to the current block.

[0181] In step 1004, if the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, the encoding side adopts a bypass binary arithmetic coding method to encode at least one of the multiple bits other than the first bit, and adds it to the encoded data of the current block.

[0182] In implementation, a transform kernel pair index is added to the encoded data to allow the decoding side to know the transform kernel pair used at the encoding side.

[0183] When the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, the encoding side can adopt the CABAC method to encode the first bit of the binarized codeword corresponding to the transformation kernel pair index, and when the binarized codeword further includes other bits, the encoding side uses the bypass binary arithmetic coding method to encode at least one of these other bits, and then adds the encoded transformation kernel pair index to the encoded data. In this way, the bypass binary arithmetic coding method does not need to store a context model, so when encoding using the bypass binary arithmetic coding method, it is not necessary to store a context model for the bit.

[0184] Thus, the encoding process for the current block is completed. An entire segment of video data can be encoded by processing each current block according to the flow shown in FIG.

[0185] In one possible embodiment of the present disclosure, the first bit is subjected to adaptive binary arithmetic coding based on one context model.

[0186] In implementation, when encoding the first bit using the CABAC scheme, adaptive binary arithmetic coding can be performed using one context model instead of multiple context models, eliminating the need to store multiple context models and saving memory space.

[0187] In addition, to enable the decoding side to use an explicit multi-core conversion scheme, a target identifier may be added to the encoded data, and the target identifier is used to indicate that an explicit multi-core conversion scheme is used.

[0188] Based on the encoding scheme shown in FIG. 10, an embodiment of the present disclosure further provides a corresponding decoding scheme, as shown in FIG.

[0189] In step 1101, the decoding side obtains the encoded data of the current block.

[0190] In implementation, when there is encoded data to be decoded, the decoding side can obtain the encoded data, and then perform entropy decoding processing on the encoded data. The decoding side obtains the current block in the encoded data as the encoded data of the current block by performing inverse quantization processing on the entropy decoding result.

[0191] In step 1102, the decoding side obtains a transformation kernel pair index from the encoded data, where if the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, at least one of the multiple bits other than the first bit is decoded by adopting a bypass binary arithmetic decoding method.

[0192] In implementation, the decoding side can obtain a transformation kernel pair index corresponding to a current block from the encoded data, and when the encoding side encodes the transformation kernel pair index of the current block, if the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, at least one of the multiple bits other than the first bit is decoded by adopting the bypass binary arithmetic coding scheme. In this way, when the decoding side decodes the bits encoded by using the bypass binary arithmetic coding scheme, it can also decode by using the bypass binary arithmetic coding scheme, thereby saving the memory space of the decoding side.

[0193] In one possible embodiment of the present disclosure, to save memory space, one context model is used to encode the first bit of the multiple bits.

[0194] In one possible embodiment of the present disclosure, before performing step 1102, it is determined that the height and width of the current block are both less than or equal to the target value, and the current block is a luminance block.

[0195] In implementation, the target value can be preset and stored on the decoding side, and is generally N (N can be 32). If the height and width of the current block are both less than or equal to N, and the current block is a luminance block, perform the process of step 1102. Otherwise, it can be determined that the transform kernel pair corresponding to the current block is (DCT2, DCT2), and then the transform kernel pair can be directly used to perform the decoding process.

[0196] Also, before performing the process of step 1102, it may be determined whether the encoded data includes a target identifier, which is used to indicate that an explicit multi-core conversion process is to be used. If the target identifier in the encoded data indicates that an explicit multi-core conversion process is to be used, the process of step 1102 may be performed.

[0197] In step 1103, the decoding side determines a transform kernel pair corresponding to the current block according to the transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel.

[0198] This process is completely the same as the processing process of step 903, and the processing of step 903 can be referred to, and the description thereof will be omitted here.

[0199] In one possible embodiment of the present disclosure, the height and width of the current block or the intra prediction mode of the current block may be used when determining the transform kernel pair, and the corresponding process may be as follows:

[0200] Determine a transform kernel pair corresponding to the current block based on an intra prediction mode of the current block and a transform kernel pair index, or determine a transform kernel pair corresponding to the current block based on shape information of the current block and a transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel.

[0201] In implementation, this process is the same as the method of determining a transformation kernel pair using the height and width of the current block or the intra prediction mode of the current block in step 903, so reference can be made to the processing of step 903 and the description thereof will be omitted here.

[0202] In step 1104, the decoding side performs a decoding process on the current block based on the transformation kernel pair to obtain reconstruction information corresponding to the current block.

[0203] In implementation, after determining the transform kernel pair corresponding to the current block, the decoding side can use the transform kernel pair to perform inverse transform processing on the quantized coefficients corresponding to the current block, thereby obtaining the residual signal corresponding to the current block. After that, the decoding side uses the pixel values ​​of the pixel points in the reconstructed area around the current block to construct a prediction signal according to the intra prediction mode used, and then adds the residual signal to the prediction signal to obtain the reconstruction information corresponding to the current block.

[0204] Thus, the decoding process of the current block is completed. An entire segment of video data can be decoded by processing each current block according to the flow shown in FIG.

[0205] In the embodiment of the present disclosure, when encoding a current block, the encoding side can obtain a transform kernel pair corresponding to the current block and perform encoding processing instead of directly obtaining a preset transform kernel pair, so that the performance of encoding and decoding can be improved. When the encoding side encodes a transform kernel pair index, it uses a bypass binary arithmetic coding scheme to perform encoding processing on at least one bit other than the first bit of a binarized codeword corresponding to the transform kernel pair index, and it is not necessary to store a context model for this at least one bit, so that memory space can be saved. In addition, the complexity of encoding and decoding can be reduced because at least one bit does not use the CABAC scheme but uses a bypass binary arithmetic coding scheme, and it is not necessary to update the context model.

[0206] In another embodiment of the present disclosure, as shown in FIG. 12, a process of determining a transform kernel pair based on shape information of the current block or an intra prediction mode of the current block is further provided.

[0207] In step 1201, the encoding side obtains the residual signal of the current block.

[0208] In practice, when encoding video data, the encoding side first performs intra prediction to obtain a residual signal (the method of obtaining the residual signal is consistent with the existing video encoding standard, and the description is omitted). After that, the encoding side takes the residual signal as the residual signal of the current block to be currently processed.

[0209] It should be noted that the TU in the embodiment of the present disclosure is similar to the CU described above.

[0210] The method of selecting the intra prediction mode is the same as the method of selecting the intra prediction mode in step 801, so reference can be made to step 801, and the description thereof will be omitted here.

[0211] In step 1202, the encoding side obtains the intra prediction mode of the current block and a transformation kernel pair corresponding to the current block, or the shape information of the current block and a transformation kernel pair corresponding to the current block.

[0212] Here, the transformation kernel pair includes a vertical transformation kernel and a horizontal transformation kernel.

[0213] In implementation, the encoding side can obtain the intra prediction mode finally used during intra prediction in step 1201 (i.e., the intra prediction mode corresponding to the current block) and the transform kernel pair corresponding to the intra prediction mode when minimizing the rate-distortion cost (i.e., the transform kernel pair corresponding to the current block).

[0214] Alternatively, the encoding side can determine the height and width of the current block (i.e., the number of pixel points of the current block in the height direction and the number of pixel points of the current block in the width direction), and in this way, the encoding side can obtain the shape information of the current block and obtain the transformation kernel pair used when minimizing the rate-distortion cost (i.e., the transformation kernel pair corresponding to the current block).

[0215] In addition, after obtaining the current block, the encoding side can first determine whether the height and width of the current block are less than or equal to N (N may be 32) and whether it is a luma block. If the height and width of the current block are less than or equal to N and it is a luma block, it can continue to execute step 1202. If at least one of the conditions of the height and width being less than or equal to N and being a luma block is not met, the encoding side directly obtains a preset transform kernel pair (i.e., (DCT2, DCT2)).

[0216] In step 1203, the encoding side determines a transform kernel pair index corresponding to the current block based on the intra prediction mode of the current block and the transform kernel pair corresponding to the current block, or determines a transform kernel pair index corresponding to the current block based on the shape information of the current block and the transform kernel pair corresponding to the current block.

[0217] In implementation, if the transformation kernel pair determined in step 1202 is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8), a preset explicit multi-core transformation kernel pair syntax table (as shown in Table 7 above) can be obtained, and a transformation kernel pair index commonly corresponding to the intra prediction mode corresponding to the current block and the transformation kernel pair, that is, a transformation kernel pair index corresponding to the current block can be determined from Table 7. For example, if the transformation kernel pair is (DST7, DCT8) and the mode number of the intra prediction mode corresponding to the current block is 32, the commonly corresponding transformation kernel pair index is 3.

[0218] Or, if the transformation kernel pair determined in step 1202 is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8), a preset explicit multi-core transformation kernel pair syntax table (as shown in Table 8 above) can be obtained, and the shape information of the current block, the transformation kernel pair index commonly corresponding to the transformation kernel pair, that is, the transformation kernel pair index corresponding to the current block can be determined from Table 8. For example, if the transformation kernel pair is (DST7, DCT8) and the width of the current block is greater than the height, the commonly corresponding transformation kernel pair index is 3.

[0219] In one possible embodiment of the present disclosure, when the encoding side determines a transform kernel pair index using an intra prediction mode and a transform kernel pair, the encoding side may use the following scheme.

[0220] If the transform kernel pair is a first transform kernel pair and the mode number of the intra prediction mode of the current block is less than or equal to a preset value, determine that the transform kernel pair index corresponding to the current block is a first index; if the transform kernel pair is a second transform kernel pair and the mode number of the intra prediction mode of the current block is greater than the preset value, determine that the transform kernel pair index corresponding to the current block is a first index; if the transform kernel pair is a second transform kernel pair and the mode number of the intra prediction mode of the current block is less than or equal to the preset value, determine that the transform kernel pair index corresponding to the current block is a second index; if the transform kernel pair is a first transform kernel pair and the mode number of the intra prediction mode of the current block is greater than the preset value, determine that the transform kernel pair index corresponding to the current block is a second index.

[0221] In implementation, this process is completely the same as Scheme 1 shown in Table 7 in step 802, and the description is omitted here.

[0222] In one possible embodiment of the present disclosure, when the encoding side uses the shape information of the current block and the transformation kernel pair to determine the transformation kernel pair index, the encoding side may use the following method.

[0223] If the transformation kernel pair is a first transformation kernel pair and the shape information of the current block satisfies the preset shape restriction condition, a transformation kernel pair index corresponding to the current block is determined to be a first index; if the transformation kernel pair is a second transformation kernel pair and the shape information of the current block does not satisfy the preset shape restriction condition, a transformation kernel pair index corresponding to the current block is determined to be a first index; if the transformation kernel pair is a second transformation kernel pair and the shape information of the current block satisfies the preset shape restriction condition, a transformation kernel pair index corresponding to the current block is determined to be a second index; if the transformation kernel pair is the first transformation kernel pair and the shape information of the current block does not satisfy the preset shape restriction condition, a transformation kernel pair index corresponding to the current block is determined to be a second index.

[0224] In implementation, this process is completely the same as Scheme 2 shown in Table 8 in step 802, and the description is omitted here.

[0225] In step 1204, the encoding side performs an encoding process on the residual signal of the current block based on the transform kernel pair, and obtains encoded data corresponding to the current block.

[0226] In implementation, the encoding side obtains a transform kernel pair corresponding to the current block, and then transforms the residual signal of the current block according to the transform kernel pair to obtain transform coefficients. After that, the encoding side performs a quantization process on the transform coefficients to obtain quantized coefficients, and the encoding side performs an entropy coding process on the quantized coefficients to obtain coded data corresponding to the current block.

[0227] In step 1205, the encoding side performs an encoding process on the transformation kernel pair index and adds it to the encoded data of the current block.

[0228] In implementation, to allow the decoding side to know the transformation kernel pair used at the encoding side, a binarized codeword of the transformation kernel pair index is added to the encoded data.

[0229] The encoding side performs an encoding process on the transformed kernel pair index, and then can add the transformed kernel pair index after the encoding process to the encoded data.

[0230] Thus, the encoding process for the current block is completed. An entire segment of video data can be encoded by processing each current block according to the flow shown in FIG.

[0231] In one possible embodiment of the present disclosure, in order to save memory space, the transform kernel pair index can be encoded according to the following scheme, and the corresponding processing of step 1205 is as follows:

[0232] When the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, a first bit is encoded using the CABAC scheme, and at least one of the bits other than the first bit among the multiple bits is decoded by adopting a bypass binary arithmetic coding scheme.

[0233] In practice, when the binarized codeword corresponding to the transformation kernel pair index includes only one bit, the encoding process can be performed directly using the CABAC method; when the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, the first bit can be encoded using the CABAC method, and at least one of the other bits other than the first bit can be decoded using the bypass binary arithmetic coding method. After that, the encoding side adds the encoded transformation kernel pair index to the encoded data of the current block. In this way, when the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, some bits can be decoded using the bypass binary arithmetic coding method, and there is no need to store a context model, so that memory space can be saved.

[0234] In one possible embodiment of the present disclosure, the encoding side performs adaptive binary arithmetic coding on the first bit of the binarized codeword corresponding to the transformation kernel pair index based on one context model.

[0235] In practice, the encoding side can adopt one context model to encode the first bit of the binarized codeword corresponding to the transformation kernel pair index. In this way, only one context model is adopted, so only one context model is stored, and the occupied memory space is small, which can save the storage space of the encoding side.

[0236] In addition, to enable the decoding side to use an explicit multi-core conversion scheme, a target identifier may be added to the encoded data, and the target identifier is used to indicate that an explicit multi-core conversion scheme is used.

[0237] Based on the encoding process shown in above FIG. 12, the embodiment of the present disclosure further provides a decoding process, as shown in FIG.

[0238] In step 1301, the decoding side obtains the encoded data of the current block.

[0239] In implementation, when there is encoded data to be decoded, the decoding side can obtain the encoded data and then perform entropy decoding processing on the encoded data. The decoding side obtains the current block in the encoded data as the encoded data of the current block by performing inverse quantization processing on the entropy decoding result.

[0240] In step 1302, the decoding side obtains a transform kernel pair index from the encoded data, and obtains the intra prediction mode of the current block or the shape information of the current block.

[0241] In practice, the decoding side can obtain a transformation kernel pair index corresponding to the current block from the encoded data, determine the number of pixel points included in the height direction of the current block (i.e., height), and determine the number of pixel points included in the width direction of the current block (i.e., width). After that, the decoding side determines the height and width of the current block, i.e., obtains the shape information of the current block.

[0242] Or, the decoding side can obtain the transform kernel pair index corresponding to the current block from the encoded data, and obtain the mode number of the intra prediction mode by analyzing the intra prediction mode flag of the encoded data.

[0243] In one possible embodiment of the present disclosure, the binarized codeword corresponding to the transformation kernel pair index includes multiple bits, a first bit is decoded using the CABAC scheme, and at least one of the multiple bits other than the first bit is decoded by adopting the bypass binary arithmetic decoding scheme. In this way, when the transformation kernel pair index includes multiple bits, some bits are encoded by adopting the bypass binary arithmetic coding scheme, and there is no need to store a context model, so memory space can be saved. In this way, for the bits encoded by using the bypass binary arithmetic coding scheme, the decoding side also needs to decode by using the bypass binary arithmetic coding scheme, and there is no need for the decoding side to store a context model, so memory space can also be saved.

[0244] In one possible embodiment of the present disclosure, the first bit of the transformation kernel pair index is decoded by adopting one context model. In this way, the decoding side adopts only one context model, so that only one context model is stored, and the memory space occupied is small.

[0245] In one possible embodiment of the present disclosure, before performing step 1302, it is determined that the height and width of the current block are both less than or equal to the target value, and the current block is a luminance block.

[0246] In implementation, the target value can be preset and stored on the decoding side, and is generally N (N is 32). If the height and width of the current block are both less than or equal to N, and the current block is a luminance block, perform the process of step 1302. Otherwise, it can be determined that the transform kernel pair corresponding to the current block is (DCT2, DCT2), and then the transform kernel pair can be directly used to perform the decoding process.

[0247] Also, before performing the process of step 1302, it may be determined whether the encoded data includes a target identifier, which is used to indicate that an explicit multi-core conversion process is to be used. If the target identifier in the encoded data indicates that an explicit multi-core conversion process is to be used, the process of step 1302 may be performed.

[0248] In step 1303, the decoding side determines a transform kernel pair corresponding to the current block based on the intra prediction mode of the current block and a transform kernel pair index, or determines a transform kernel pair corresponding to the current block based on the shape information of the current block and a transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel.

[0249] In implementation, the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel. If the transform kernel pair determined in step 1302 is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8), a preset explicit multi-core transform kernel pair syntax table (as shown in Table 7 above) can be obtained, and a transform kernel pair commonly corresponding to the intra-prediction mode and transform kernel pair index corresponding to the current block from Table 7, that is, a transform kernel pair corresponding to the current block can be determined. For example, if the mode number of the intra-prediction mode corresponding to the current block is 32 and the transform kernel pair index is 3, the transform kernel pair is (DST7, DCT8).

[0250] Or, if the transformation kernel pair determined in step 1302 is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8), a preset explicit multi-core transformation kernel pair syntax table (as shown in Table 8 above) can be obtained, and a transformation kernel pair commonly corresponding to the height and width of the current block and the transformation kernel pair index, that is, a transformation kernel pair corresponding to the current block, can be determined from Table 8. For example, if the width of the current block is greater than the height and the transformation kernel pair index is 3, the transformation kernel pair is (DST7, DCT8).

[0251] In one possible embodiment of the present disclosure, when determining a transform kernel pair using an intra prediction mode and a transform kernel pair index, the following scheme may be used.

[0252] If the transform kernel pair index is a first index and the mode number of the intra prediction mode of the current block is less than or equal to a preset value, determine that the transform kernel pair corresponding to the current block is a first transform kernel pair; if the transform kernel pair index is a first index and the mode number of the intra prediction mode of the current block is greater than the preset value, determine that the transform kernel pair corresponding to the current block is a second transform kernel pair; if the transform kernel pair index is a second index and the mode number of the intra prediction mode of the current block is less than or equal to the preset value, determine that the transform kernel pair corresponding to the current block is a second transform kernel pair; if the transform kernel pair index is a second index and the mode number of the intra prediction mode of the current block is greater than the preset value, determine that the transform kernel pair corresponding to the current block is a first transform kernel pair.

[0253] In implementation, if the transformation kernel pair determined in step 1302 is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8), a preset explicit multi-core transformation kernel pair syntax table (as shown in Table 7 above) can be obtained, and a transformation kernel pair corresponding to the current block can be determined from Table 7.

[0254] The above first index is 3, the preset value is 34, and the first transform kernel pair is (DST7, DCT8), the second index is 4, the preset value is 34, and the first transform kernel pair is (DCT8, DST7).

[0255] In one possible embodiment of the present disclosure, when determining a transformation kernel pair using the height and width of the current block and the transformation kernel pair index, the following scheme may be used.

[0256] If the transformation kernel pair index is a first index and the shape information of the current block satisfies the preset shape restriction condition, the transformation kernel pair corresponding to the current block is determined to be a first transformation kernel pair; if the transformation kernel pair index is a first index and the shape information of the current block does not satisfy the preset shape restriction condition, the transformation kernel pair corresponding to the current block is determined to be a second transformation kernel pair; if the transformation kernel pair index is a second index and the shape information of the current block satisfies the preset shape restriction condition, the transformation kernel pair corresponding to the current block is determined to be the second transformation kernel pair; if the transformation kernel pair index is a second index and the shape information of the current block does not satisfy the preset shape restriction condition, the transformation kernel pair corresponding to the current block is determined to be the first transformation kernel pair.

[0257] In implementation, if the transformation kernel pair determined in step 1302 is not (DCT2, DCT2), (DST7, DST7), or (DCT8, DCT8), a preset explicit multi-core transformation kernel pair syntax table (as shown in Table 8 above) can be obtained, and a transformation kernel pair corresponding to the current block can be determined from Table 8.

[0258] The above first index is 3, W≧H, and the first transform kernel pair is (DST7, DCT8), and the second index is 4, W≧H, and the first transform kernel pair is (DCT8, DST7).

[0259] In step 1304, the decoding side performs a decoding process on the current block based on the transformation kernel pair to obtain reconstruction information corresponding to the current block.

[0260] In implementation, after determining the target transformation kernel pair corresponding to the current block, the target transformation kernel pair is used to perform inverse transformation processing on the quantization coefficients corresponding to the current block, so as to obtain the residual signal corresponding to the current block. After that, the decoding side uses the pixel values ​​of the pixel points in the reconstructed area around the current block to construct a prediction signal according to the intra prediction mode used, and then adds the residual signal to the prediction signal to obtain the reconstruction information corresponding to the current block.

[0261] Thus, the decoding process for the current block is completed. An entire segment of video data can be decoded by processing each current block according to the flow shown in FIG.

[0262] In addition, in an embodiment of the present disclosure, the priority of the transform kernel pair can be adaptively adjusted based on the intra prediction mode or shape information of the current block, thereby making it possible to select the most probable transform kernel pair and shorten the codeword that needs to be encoded.

[0263] In an embodiment of the present disclosure, when the encoding side selects a transform kernel pair for encoding, it uses the intra prediction mode of the current block or the shape information of the current block instead of a preset transform kernel pair, and correspondingly, it uses the intra prediction mode of the current block or the shape information of the current block instead of a preset transform kernel pair, thereby improving the encoding and decoding performance.

[0264] Based on the same technical concept, the embodiment of the present disclosure further provides a decoding side for decoding, as shown in FIG. 14 , the decoding side includes: Get the encoded data of the current block, an obtaining module 1410 for obtaining a transform kernel pair index of the current block from the encoded data, where a first bit of a binarized codeword corresponding to the transform kernel pair index is decoded by performing adaptive binary arithmetic coding based on a context model; A determining module 1420 is used to determine a transform kernel pair corresponding to the current block based on the transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel; Includes.

[0265] In one possible embodiment of the present disclosure, the binarized codeword corresponding to the transformation kernel pair index includes a plurality of bits, and at least one of the plurality of bits other than the first bit is decoded by adopting a bypass binary arithmetic coding scheme.

[0266] In one possible embodiment of the present disclosure, the determination module 1420: Determine a transform kernel pair corresponding to the current block according to an intra-prediction mode of the current block and the transform kernel pair index; or Based on the shape information of the current block and the transformation kernel pair index, a transformation kernel pair corresponding to the current block is determined.

[0267] Based on the same technical concept, the embodiment of the present disclosure further provides an encoding side for encoding, as shown in FIG. 15 , the encoding side includes: a determining module 1510 used for determining a transformation kernel pair corresponding to a current block and a transformation kernel pair index corresponding to the current block; an encoding module 1520 for encoding the transformation kernel pair index according to a manner of performing adaptive binary arithmetic coding based on one context model for a first bit of a binarized codeword corresponding to the transformation kernel pair index, and adding the transformation kernel pair index to the encoding data of the current block; Includes.

[0268] In one possible embodiment of the present disclosure, the encoding module 1520: When the binarized codeword corresponding to the transformation kernel pair index includes a plurality of bits, performing adaptive binary arithmetic coding on a first bit according to one context model, and using a bypass binary arithmetic coding method to code at least one of the bits other than the first bit among the plurality of bits; It is used to add the transformation kernel pair index after encoding to the encoded data.

[0269] In one possible embodiment of the present disclosure, the determination module 1510 is Determine a transform kernel pair corresponding to the current block, and determine a transform kernel pair index corresponding to the current block according to an intra-prediction mode of the current block and the transform kernel pair; or A transform kernel pair corresponding to the current block is determined, and a transform kernel pair index corresponding to the current block is determined based on the shape information of the current block and the transform kernel pair.

[0270] In the embodiment of the present disclosure, when encoding a current block, the encoding side can obtain a transform kernel pair corresponding to the current block and perform encoding processing, instead of directly obtaining a preset transform kernel pair, so that the performance of encoding and decoding can be improved. When encoding a binarized codeword corresponding to a transform kernel pair index, the encoding side can perform encoding processing on the first bit of the binarized codeword corresponding to the transform kernel pair index using one context model without requiring multiple context models, so that memory space can be saved. In addition, since multiple context models are not required, there is no need to update the context, and the complexity of encoding and decoding can be reduced.

[0271] Based on the same technical concept, the embodiment of the present disclosure further provides a decoding side for decoding, as shown in FIG. 16 , the decoding side includes: Get the encoded data of the current block, an obtaining module 1610 for obtaining a transformation kernel pair index from the encoded data, where when a binarized codeword corresponding to the transformation kernel pair index includes a plurality of bits, at least one of the plurality of bits other than a first bit is decoded by adopting a bypass binary arithmetic coding scheme; A determining module 1620 is used to determine a transform kernel pair corresponding to the current block based on the transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel; Includes.

[0272] In one possible embodiment of the present disclosure, the first bit of the binarized codeword corresponding to the transformation kernel pair index is decoded by performing adaptive binary arithmetic coding based on a context model.

[0273] In one possible embodiment of the present disclosure, the determination module 1620 is Determine a transform kernel pair corresponding to the current block according to an intra-prediction mode of the current block and the transform kernel pair index; or Based on the shape information of the current block and the transform kernel pair index, a transform kernel pair corresponding to the current block is determined, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel.

[0274] Based on the same technical concept, the embodiment of the present disclosure further provides an encoding side for encoding, as shown in FIG. 17 , the encoding side includes: a determining module 1710 used for determining a transformation kernel pair corresponding to a current block and a transformation kernel pair index corresponding to the current block; an encoding module 1720 for encoding at least one bit other than the first bit among the plurality of bits by adopting a bypass binary arithmetic encoding scheme and adding the encoded data of the current block when the binarized codeword corresponding to the transformation kernel pair index includes a plurality of bits; Includes.

[0275] In one possible embodiment of the present disclosure, the encoding module 1720: The first bit is also used to perform adaptive binary arithmetic coding based on a context model.

[0276] In one possible embodiment of the present disclosure, the determination module 1710 is Determine a transform kernel pair corresponding to the current block, and determine a transform kernel pair index corresponding to the current block according to an intra-prediction mode of the current block and the transform kernel pair; or A transformation kernel pair corresponding to the current block is determined, and a transformation kernel pair index corresponding to the current block is determined based on the shape information of the current block and the transformation kernel pair.

[0277] In the embodiment of the present disclosure, when encoding a current block, the encoding side can obtain a transform kernel pair corresponding to the current block and perform encoding processing instead of directly obtaining a preset transform kernel pair, so that the performance of encoding and decoding can be improved. When the encoding side encodes a transform kernel pair index, it uses a bypass binary arithmetic coding scheme to perform encoding processing on at least one bit other than the first bit of a binarized codeword corresponding to the transform kernel pair index, and it is not necessary to store a context model for this at least one bit, so that memory space can be saved. In addition, since the at least one bit does not use the CABAC scheme but uses the bypass binary arithmetic coding scheme, the complexity of encoding and decoding can also be reduced.

[0278] Based on the same technical concept, the embodiment of the present disclosure further provides a decoding side for decoding, as shown in FIG. 18 , the decoding side includes: Get the encoded data of the current block

[0279] an obtaining module 1810, which is used to obtain a transform kernel pair index from the encoded data and obtain an intra-prediction mode of the current block or shape information of the current block; A determining module 1820 is used to determine a transform kernel pair corresponding to the current block according to an intra prediction mode of the current block and the transform kernel pair index, or to determine a transform kernel pair corresponding to the current block according to shape information of the current block and the transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel; Includes.

[0280] In one possible embodiment of the present disclosure, the determination module 1820 is When the transform kernel pair index is a first index and a mode number of an intra-prediction mode of the current block is equal to or less than a preset value, determine that the transform kernel pair corresponding to the current block is a first transform kernel pair; When the transform kernel pair index is a first index and a mode number of an intra-prediction mode of the current block is greater than a preset value, determine that the transform kernel pair corresponding to the current block is a second transform kernel pair; If the transform kernel pair index is a second index and a mode number of the intra prediction mode of the current block is less than or equal to a preset value, determine that the transform kernel pair corresponding to the current block is a second transform kernel pair; When the transform kernel pair index is a second index and the mode number of the intra prediction mode of the current block is greater than a preset value, the transform kernel pair corresponding to the current block is used to determine that it is a first transform kernel pair.

[0281] In one possible embodiment of the present disclosure, the determination module 1820 is If the transformation kernel pair index is a first index and the shape information of the current block satisfies a preset shape restriction condition, determine that the transformation kernel pair corresponding to the current block is a first transformation kernel pair; If the transformation kernel pair index is a first index and the shape information of the current block does not satisfy a preset shape restriction condition, determine that the transformation kernel pair corresponding to the current block is a second transformation kernel pair; If the transformation kernel pair index is a second index and the shape information of the current block satisfies a preset shape restriction condition, determine that the transformation kernel pair corresponding to the current block is a second transformation kernel pair; When the transformation kernel pair index is a second index and the shape information of the current block does not satisfy a preset shape restriction condition, the transformation kernel pair corresponding to the current block is used to determine that the transformation kernel pair is a first transformation kernel pair.

[0282] In one possible embodiment of the present disclosure, the first bit of the binarized codeword corresponding to the transformation kernel pair index is decoded by performing adaptive binary arithmetic coding based on a context model.

[0283] In one possible embodiment of the present disclosure, the binarized codeword corresponding to the transformation kernel pair index includes a plurality of bits, and at least one of the plurality of bits other than a first bit is encoded by adopting a bypass binary arithmetic coding scheme.

[0284] Based on the same technical concept, the embodiment of the present disclosure further provides an encoding side for encoding, as shown in FIG. 19 , the encoding side includes: an obtaining module 1910 used to obtain an intra prediction mode of a current block and a transformation kernel pair corresponding to the current block, or a shape information of the current block and a transformation kernel pair corresponding to the current block; A determination module 1920 is used to determine a transformation kernel pair index corresponding to the current block according to an intra prediction mode of the current block and a transformation kernel pair corresponding to the current block, or to determine a transformation kernel pair index corresponding to the current block according to shape information of the current block and a transformation kernel pair corresponding to the current block; an encoding module 1930 used to perform an encoding process on the transformation kernel pair index and add it to the encoding data of the current block; Includes.

[0285] In one possible embodiment of the present disclosure, the determination module 1920: If the transform kernel pair is a first transform kernel pair and a mode number of an intra-prediction mode of the current block is less than or equal to a preset value, determine that a transform kernel pair index corresponding to the current block is a first index; If the transformation kernel pair is a second transformation kernel pair and a mode number of an intra-prediction mode of the current block is greater than a preset value, determine that a transformation kernel pair index corresponding to the current block is a first index; If the transformation kernel pair is a second transformation kernel pair and a mode number of an intra-prediction mode of the current block is less than or equal to a preset value, determine that a transformation kernel pair index corresponding to the current block is a second index; If the transform kernel pair is a first transform kernel pair and the mode number of the intra prediction mode of the current block is greater than a preset value, the transform kernel pair index corresponding to the current block is used to determine that it is a second index.

[0286] In one possible embodiment of the present disclosure, the determination module 1920: If the transformation kernel pair is a first transformation kernel pair and the shape information of the current block satisfies a preset shape restriction condition, determine that the transformation kernel pair index corresponding to the current block is a first index; If the transformation kernel pair is a second transformation kernel pair and the shape information of the current block does not satisfy a preset shape restriction condition, determine that the transformation kernel pair index corresponding to the current block is a first index; If the transformation kernel pair is a second transformation kernel pair and the shape information of the current block satisfies a preset shape restriction condition, determine that the transformation kernel pair index corresponding to the current block is a second index; If the transformation kernel pair is a first transformation kernel pair and the shape information of the current block does not satisfy a preset shape restriction condition, the transformation kernel pair index corresponding to the current block is used to determine the second index.

[0287] In one possible embodiment of the present disclosure, the encoding module 1930: The first bit of the binarized codeword corresponding to the transformation kernel pair index is used for encoding according to a scheme of performing adaptive binary arithmetic coding based on one context model.

[0288] In one possible embodiment of the present disclosure, the encoding module 1930: When the binarized codeword corresponding to the transformation kernel pair index includes a plurality of bits, at least one of the plurality of bits other than the first bit is used for decoding by adopting a bypass binary arithmetic coding method.

[0289] In an embodiment of the present disclosure, when the encoding side selects a transform kernel pair for encoding, it uses the intra prediction mode of the current block or the shape information of the current block instead of a preset transform kernel pair, and correspondingly, it uses the intra prediction mode of the current block or the shape information of the current block instead of a preset transform kernel pair, thereby improving the encoding and decoding performance.

[0290] It should be noted that, when the decoding side according to the above embodiment decodes, only the division of each of the above-mentioned functional modules is taken as an example for description, in actual application, in order to complete all or part of the above-mentioned functions, the allocation of the above-mentioned functions can be completed by different functional modules as necessary, that is, the internal structure of the decoding side can be divided into different functional modules. In addition, the decoding side according to the above embodiment and the embodiment of the method for decoding belong to the same concept, and the specific realization process thereof can be referred to the embodiment of the method, and the description is omitted here.

[0291] It should be noted that, when the encoding side according to the above embodiment performs encoding, only the division of each of the above-mentioned functional modules is taken as an example for description, and in actual application, in order to complete all or part of the above-mentioned functions, the allocation of the above-mentioned functions can be completed by different functional modules as necessary, that is, the internal structure of the encoding side can be divided into different functional modules. In addition, the encoding side according to the above embodiment and the embodiment of the method for encoding belong to the same concept, and the specific realization process thereof can be referred to the embodiment of the method, and the description is omitted here.

[0292] FIG. 20 is a structural schematic diagram of an encoding side according to an embodiment of the present invention, where the encoding side 2000 may have relatively large differences due to differences in configuration or performance, and may include one or more processors (central processing units, CPUs) 2001 and one or more memories 2002, where at least one instruction is stored in the memory 2002, and the at least one instruction is loaded and executed by the processor 2001 to realize the steps of the encoding method described above.

[0293] FIG. 21 is a structural schematic diagram of a decoding side according to an embodiment of the present invention, where the decoding side 2100 may have relatively large differences due to differences in configuration or performance, and may include one or more processors (central processing units, CPUs) 2101 and one or more memories 2102, where at least one instruction is stored in the memory 2102, and the at least one instruction is loaded and executed by the processor 2101 to realize the steps of the above-mentioned decoding method.

[0294] In an embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned encoding method and decoding method are realized.

[0295] In an embodiment of the present disclosure, there is further provided an encoding side including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the program stored in the memory, thereby realizing the steps of the encoding method described above.

[0296] In an embodiment of the present disclosure, a decoding side is further provided, which includes a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the program stored in the memory, thereby realizing the steps of the above-mentioned method for decoding.

[0297] In an embodiment of the present disclosure, there is further provided a system for encoding and decoding, the system including an encoding side and a decoding side, where: The encoding side is an encoding side that performs the encoding process as described above, The decoding side is the side that performs the decoding process as described above.

[0298] Those skilled in the art can understand that all or part of the steps in the above embodiments may be completed by hardware, or may be completed by using a program to instruct related hardware, and the program may be stored in a computer-readable storage medium, and the storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.

[0299] The above are merely preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure are intended to be included in the scope of the present disclosure. [Explanation of symbols]

[0300] 1410 Acquisition Module 1420 Confirmation Module 1520 Encoding Module 1610 Acquisition Module 1620 Confirmation Module 1710 Confirmation Module 1720 Encoding Module 1810 Acquisition Module 1820 Confirmation Module 1910 Acquisition Module 1920 Confirmation Module 1930 Encoding Module 2000 Encoding side 2001 Processor 2002 Memory 2100 Decryption side 2101 Processor 2102 Memory

Claims

1. Obtaining encoded data of a current block; Determining whether the encoded data from the encoding side includes a target identifier, the target identifier being used to indicate that an explicit multi-core conversion process is to be performed, and when it is determined that the target identifier is included, If it is determined that the current block is a luma block, and both a height and a width of the current block are less than or equal to 32, obtain a transform kernel pair index of the current block from the encoded data, where, if the transform kernel pair index includes 5 index values, when an index value of the transform kernel pair index is a first index value, a transform kernel pair mapped by the transform kernel pair index is (DCT2, DCT2), when an index value of the transform kernel pair index is a second index value, a transform kernel pair mapped by the transform kernel pair index is (DST7, DST7), when an index value of the transform kernel pair index is a third index value, a transform kernel pair mapped by the transform kernel pair index is (DCT8, DST7), and when an index value of the transform kernel pair index is a fourth index value, a transform kernel pair mapped by the transform kernel pair index is (DCT8, DST7). and if the transform kernel pair is (DCT7, DCT8) and the index value of the transform kernel pair index is a fifth index value, the transform kernel pair mapped by the transform kernel pair index is (DCT8, DCT8), the binarized codeword corresponding to the transform kernel pair index occupies a maximum of 4 bits, the first bit of the binarized codeword corresponding to the transform kernel pair index is for indicating whether to use the transform kernel pair mapped by the first index value, and if the value of the first bit is a first value, it indicates that the transform kernel pair (DCT2, DCT2) mapped by the first index value is used, and if the value of the first bit is a second value, it indicates that the transform kernel pair mapped by one of the remaining index values ​​is used, and the first bit of the binarized codeword corresponding to the transform kernel pair index is decoded by performing adaptive binary arithmetic coding based on one context model. determining a transform kernel pair corresponding to the current block according to the transform kernel pair index, where the transform kernel pair includes a horizontal transform kernel and a vertical transform kernel; A method of decoding, comprising: The decoding method includes: If it is determined that the current block is not a luminance block, or the height or width of the current block is greater than 32, do not decode the transform kernel pair index of the current block, and directly take (DCT2, DCT2) as the transform kernel pair used by the current block; Further comprising: Decryption method.

2. determining a transformation kernel pair corresponding to the current block based on the transformation kernel pair index, determining a transformation kernel pair corresponding to the current block according to a transformation kernel pair index of the current block and a predetermined correspondence relationship between the transformation kernel pair index and the transformation kernel pair, where the correspondence relationship includes a mapping relationship between index values ​​of five transformation kernel pair indexes and five transformation kernel pairs; The method of claim 1.

3. When the value of the first bit is a second value, the first bit is used to indicate the use of a transform kernel pair mapped by one of the remaining index values, and the transform kernel pair mapped by the one of the remaining index values ​​is one of four transform kernel pairs (DST7, DST7), (DCT8, DST7), (DST7, DCT8), (DCT8, DCT8); the value of the second bit of the binary codeword is for distinguishing whether the transform kernel pair used by the current block is (DST7, DST7) or one of the other transform kernel pairs (DCT8, DST7), (DST7, DCT8), (DCT8, DCT8); the value of the third bit of the binarized codeword is for distinguishing whether the transform kernel pair used by the current block is (DCT8, DST7) or one of the transform kernel pairs (DST7, DCT8), (DCT8, DCT8); The value of the fourth bit of the binary codeword is to distinguish whether the transform kernel pair used by the current block is (DCT7, DCT8) or the transform kernel pair (DCT8, DCT8). The method of claim 1.

4. determining a transformation kernel pair corresponding to a current block based on the transformation kernel pair index, If the first bit is 0, determining that the transform kernel pair corresponding to the current block is (DCT2, DCT2); If the first bit is 1 and the second bit is 0, determining that the transformation kernel pair corresponding to the current block is (DST7, DST7); If the first bit is 1, the second bit is 1, and the third bit is 0, determining that the transform kernel pair corresponding to the current block is (DCT8, DST7); If the first bit is 1, the second bit is 1, the third bit is 1, and the fourth bit is 0, determining that the transform kernel pair corresponding to the current block is (DCT7, DCT8); If the first bit is 1, the second bit is 1, the third bit is 1, and the fourth bit is 1, determining that the transform kernel pair corresponding to the current block is (DCT8, DCT8); Including, The method of claim 1. a first value of a first bit of the binary code word corresponding to the transformation kernel pair index is 0, and a second value of a first bit of the binary code word corresponding to the transformation kernel pair index is 1; the binary codeword for the first index value is 0, the binary codeword for the second index value is 10, the binary codeword for the third index value is 110, the binary codeword for the fourth index value is 1110, and the binary codeword for the fifth index value is 1111; If the binary codeword of the transformation kernel pair index further includes bits other than the first bit, decoding the other bits using a context model based adaptive binary arithmetic coding (CABAC) scheme.

2. The method of claim 1 .

6. determining that the height and width of the current block are both less than or equal to a preset threshold and the current block is a luminance block; Determine a transform kernel pair corresponding to the current block and a transform kernel pair index corresponding to the current block, and when the transform kernel pair index includes five index values, if an index value of the transform kernel pair index is a first index value, a transform kernel pair mapped by the transform kernel pair index is (DCT2, DCT2), if an index value of the transform kernel pair index is a second index value, a transform kernel pair mapped by the transform kernel pair index is (DST7, DST7), if an index value of the transform kernel pair index is a third index value, a transform kernel pair mapped by the transform kernel pair index is (DCT8, DST7), and if an index value of the transform kernel pair index is a fourth index value, and if the transform kernel pair index is (DCT7, DCT8) and the index value of the transform kernel pair index is a fifth index value, the transform kernel pair index is (DCT8, DCT8), the binarized codeword corresponding to the transform kernel pair index occupies up to 4 bits, and a first bit of the binarized codeword corresponding to the transform kernel pair index is for indicating whether to use the transform kernel pair mapped by the first index value, and if the value of the first bit is a first value, it indicates that the transform kernel pair (DCT2, DCT2) mapped by the first index value is used, and if the value of the first bit is a second value, it indicates that the transform kernel pair mapped by one of the remaining index values ​​is used. For a first bit of a binarized codeword corresponding to the transformation kernel pair index, encoding the transformation kernel pair index according to a manner of performing adaptive binary arithmetic coding based on a context model, and adding the transformation kernel pair index to the coding data of the current block; Including, 13. An encoding method comprising:

7. Determining a transformation kernel pair corresponding to the current block and a transformation kernel pair index corresponding to the current block includes: determining a transformation kernel pair corresponding to the current block; and determining a transformation kernel pair index of the current block based on the transformation kernel pair and a correspondence relationship between the transformation kernel pair index and the transformation kernel pair that is preset, where the correspondence relationship includes a mapping relationship between index values ​​of five transformation kernel pair indexes and five transformation kernel pairs. The method according to claim 6.

8. Using a transform kernel pair mapped by one index value among the remaining index values ​​when the value of the first bit is a second value includes: a first bit being used to indicate that when the value of the first bit is a second value, use a transform kernel pair mapped by one index value among the remaining index values; the transform kernel pair mapped by the one index value among the remaining index values ​​is one of four transform kernel pairs (DST7, DST7), (DCT8, DST7), (DST7, DCT8), (DCT8, DCT8); Here, the value of the second bit of the binary codeword is for distinguishing whether the transform kernel pair used by the current block is (DST7, DST7) or one of the other transform kernel pairs (DCT8, DST7), (DST7, DCT8), and (DCT8, DCT8); Wherein, the value of the third bit of the binarized codeword is for distinguishing whether the transform kernel pair used by the current block is (DCT8, DST7) or one of the transform kernel pairs (DST7, DCT8), (DCT8, DCT8); Here, the value of the fourth bit of the binary codeword is for distinguishing whether the transform kernel pair used by the current block is (DCT7, DCT8) or the transform kernel pair (DCT8, DCT8); where, if the transform kernel pair corresponding to the current block is (DCT2, DCT2), the first bit of the binarized codeword is 0; If the transform kernel pair corresponding to the current block is (DST7, DST7), the first bit of the binary codeword is 1 and the second bit is 0; If the transform kernel pair corresponding to the current block is (DCT8, DST7), the first bit of the binarized codeword is 1, the second bit is 1, and the third bit is 0; If the transform kernel pair corresponding to the current block is (DCT7, DCT8), the first bit of the binarized codeword is 1, the second bit is 1, the third bit is 1, and the fourth bit is 0; If the transform kernel pair corresponding to the current block is (DCT8, DCT8), the first bit of the binarized codeword is 1, the second bit is 1, the third bit is 1, and the fourth bit is 1; The method according to claim 6.

9. A decoder comprising a processor and a memory for storing processor-executable instructions, wherein the processor is configured to perform a decoding method according to any one of claims 1 to 5.

10. An encoder comprising a processor and a memory for storing processor-executable instructions, wherein the processor is configured to perform an encoding method according to any one of claims 6 to 8.

11. A decoding device configured to perform the decoding method according to any one of claims 1 to 5.

12. An encoding device configured to execute the encoding method according to any one of claims 6 to 8.

13. A machine-readable storage medium on which machine-executable instructions executable by a processor are stored, the processor being the machine-readable storage medium used to execute the machine-executable instructions to realize a method according to any one of claims 1 to 5 or 6 to 8.

Citation Information

Patent Citations

  • Video coding method and apparatus using transform skip flag

    JP2021513755A

  • Interaction of multiple intra coding methods

    JP2022531435A

  • Method and Apparatus of Adaptive Multiple Transforms for Video Coding

    US20180332289A1

  • Image coding method and device using transform SKIP flag

    US20200260070A1