Video encoder, video encoding method, video decoder, video decoding method
The video encoder and decoder system addresses the inefficiency of non-separable linear transforms for large blocks by employing adaptive NSPTs, achieving improved encoding and decoding performance through optimized compression techniques.
Patent Information
- Application Number
- JP2025534846
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-12-14
- Filing Date
- 2023-11-24
- Publication Date
- 2025-12-05
AI Technical Summary
Conventional image coding techniques face challenges in efficiently compressing video data, particularly with non-separable linear transforms being computationally expensive for large coding blocks.
A video encoder and decoder system utilizing a partition module, prediction module, computation module, transform module, quantization module, and entropy coding module, which includes non-separable linear transforms (NSPT) for specific block sizes and adaptive kernel selection to optimize compression and decoding efficiency.
The system effectively improves video encoding and decoding performance by reducing computational complexity and enhancing coding efficiency for various block sizes.
Smart Images

Figure 2025539632000001_ABST
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to U.S. Provisional Application No. 63 / 387,497, filed December 14, 2022. The entirety of the above patent application is incorporated herein by reference and made a part of this specification.
[0002] The present invention relates to the field of image data processing, and in particular to a video encoding method, a video decoding method, a video encoder, and a video decoder. [Background technology]
[0003] In conventional image coding techniques, how to efficiently predict and compress data remains an important challenge in this field. In particular, new transform methods (i.e., non-separable linear transforms) can efficiently compress data for small coding blocks, but are computationally expensive when applied to large coding blocks. Summary of the Invention [Problem to be solved by the invention]
[0004] New image processing methods are desired for efficiently encoding video data and efficiently decoding the corresponding bitstreams. [Means for solving the problem]
[0005] A video encoder according to the present invention includes a partition module, a prediction module, a computation module, a transform module, a quantization module, and an entropy coding module. The partition module is configured to receive input video and generate a plurality of coded blocks (CBs) of the input video. The prediction module is coupled to the partition module and configured to generate a prediction block of a current CB. The computation module is coupled to the partition module and the prediction module and configured to calculate a residual block based on the current CB and the prediction block. The transform module is coupled to the computation module and configured to perform a non-separable linear transform (NSPT) on the residual block to generate a plurality of coefficients based on a kernel, if the residual block has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the determined NSPT index value is 1, 2, or 3. The quantization module is coupled to the transform module and configured to quantize the plurality of coefficients to generate a plurality of quantized coefficients. The entropy coding module is coupled to the quantization module and configured to encode the plurality of quantized coefficients into an output bitstream. The entropy coding module is also configured to encode the NSPT index into the output bitstream.
[0006] In one embodiment of the present invention, the segmentation module is configured to segment input images of an input video into a plurality of coding tree units (CTUs), and to segment each CTU into one or more coding units (CUs) to generate a plurality of CUs and equivalently a plurality of coding blocks (CBs).
[0007] In one embodiment of the present invention, the prediction module is configured to generate the prediction block of the current CB by intra prediction.
[0008] In one embodiment of the present invention, when the residual block has an 8x16 block size, the transform module performs NSPT using an NSPT transform matrix selected from a kernel with dimensionality of 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0009] In one embodiment of the present invention, if the residual block has a 16x8 block size, the transform module performs NSPT using an NSPT transform matrix selected from a kernel with dimensionality 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT at the encoder perspective, parameter C is 3, and parameter D is 35.
[0010] In one embodiment of the present invention, when the residual block has a 16x16 block size, the transform module performs NSPT using an NSPT transform matrix selected from a kernel with dimensionality 256xB2xCxD, where parameter B2 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0011] In one embodiment of the present invention, parameters B1 and B2 are 32.
[0012] In one embodiment of the present invention, parameters B1 and B2 are close to but not equal to 32.
[0013] In one embodiment of the present invention, the prediction module further performs zeroing on the residual block such that the zeroed-out residual block has a zeroed-out region.
[0014] In one embodiment of the present invention, if the size of the residual block is larger than the block size supported by the largest NSPT kernel, the transform module is further configured to divide the residual block into multiple smaller transform blocks.
[0015] In one embodiment of the present invention, an NSPT index is signaled for each transform block of a plurality of smaller transform blocks.
[0016] In one embodiment of the present invention, an NSPT index is signaled for each unique transform block size, and transform blocks of multiple smaller transform blocks having the same block size share a common NSPT index.
[0017] In one embodiment of the present invention, if the size of the residual block is larger than the block size supported by the largest NSPT kernel, the current CB is implicitly divided into multiple smaller prediction blocks before prediction.
[0018] The video encoding method of the present invention includes the steps of receiving an input video and generating a plurality of coding blocks (CBs) of the input video; generating a prediction block of the current CB; calculating a residual block based on the current CB and the prediction block; if the residual block has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the determined NSPT index value is 1, 2, or 3, performing a non-separable linear transform (NSPT) on the residual block to generate a plurality of coefficients based on a kernel; quantizing the plurality of coefficients to generate a plurality of quantized coefficients; encoding the plurality of quantized coefficients into an output bitstream by entropy coding; and encoding the NSPT index into the output bitstream.
[0019] In one embodiment of the present invention, the video encoding method further includes the steps of dividing an input image of an input video into a plurality of coding tree units (CTUs), and dividing each CTU into one or more CUs to generate a plurality of CUs and equivalently generate a plurality of coding blocks (CBs).
[0020] In one embodiment of the present invention, the predicted block of the current CB is generated by intra prediction.
[0021] In one embodiment of the present invention, when the residual block has an 8x16 block size, the video coding method performs NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0022] In one embodiment of the present invention, when the residual block has a block size of 16x8, the video coding method performs NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0023] In one embodiment of the present invention, when the residual block has a 16x16 block size, the video coding method performs NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 256xB2xCxD, where parameter B2 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0024] In one embodiment of the present invention, parameters B1 and B2 are 32.
[0025] In one embodiment of the present invention, parameters B1 and B2 are close to but not equal to 32.
[0026] In one embodiment of the present invention, the video encoding method further includes performing zeroing on the residual block, such that the zeroed-out residual block has a zeroed-out region.
[0027] In one embodiment of the present invention, the video encoding method further comprises the step of dividing the residual block into a plurality of smaller transform blocks if the size of the residual block is larger than the block size supported by the maximum NSPT kernel.
[0028] In one embodiment of the present invention, an NSPT index is signaled for each transform block of a plurality of smaller transform blocks.
[0029] In one embodiment of the present invention, an NSPT index is signaled for each unique transform block size, and transform blocks of multiple smaller transform blocks having the same block size share a common NSPT index.
[0030] In one embodiment of the present invention, the video encoding method further includes a step of implicitly dividing the current CB into multiple smaller prediction blocks before prediction if the size of the residual block is larger than the block size supported by the maximum NSPT kernel.
[0031] A video decoder according to the present invention includes an entropy decoding module, a prediction module, an inverse quantization module, an inverse transform module, and a reconstruction module. The entropy decoding module is configured to receive an input bitstream. The prediction module is coupled to the entropy decoding module and configured to determine a prediction block. The entropy decoding module is configured to decode the input bitstream to obtain a plurality of quantized coefficients and an NSPT index. The inverse quantization module is coupled to the entropy decoding module and configured to inverse quantize the plurality of quantized coefficients to generate a plurality of reconstructed coefficients. The inverse transform module is coupled to the inverse quantization module and is configured to perform an inverse non-separable linear transform (NSPT) on the plurality of reconstructed coefficients to generate a reconstructed residual block based on a kernel when a current coding block (CB) has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the value of the NSPT index is 1, 2, or 3. The reconstruction module is coupled to the prediction module and the inverse transform module and is configured to generate a reconstructed CB based on the reconstructed residual block and the prediction block.
[0032] In one embodiment of the present invention, the reconstruction module is configured to combine the reconstructed CB with multiple reconstructed CBs to generate an output movie.
[0033] In one embodiment of the present invention, in response to a flag or flag set indicating the application of intra prediction, the prediction module is configured to determine the prediction block of the current CB by intra prediction.
[0034] In one embodiment of the present invention, if the current CB has an 8x16 block size, the inverse transform module performs inverse NSPT using an NSPT transform matrix selected from a kernel with dimensionality 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0035] In one embodiment of the present invention, if the current CB has a 16x8 block size, the inverse transform module performs inverse NSPT using an NSPT transform matrix selected from a kernel with dimensionality 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0036] In one embodiment of the present invention, if the current CB has a 16x16 block size, the inverse transform module performs inverse NSPT using an NSPT transform matrix selected from a kernel with dimensionality 256xB2xCxD, where parameter B2 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0037] In one embodiment of the present invention, parameters B1 and B2 are 32.
[0038] In one embodiment of the present invention, parameters B1 and B2 are close to but not equal to 32.
[0039] The video decoding method of the present invention includes the steps of receiving an input bitstream, determining a prediction block based on the input bitstream, entropy decoding the input bitstream to obtain a plurality of quantized coefficients and an NSPT index, inverse quantizing the plurality of quantized coefficients to generate a plurality of reconstructed coefficients, and, when a current coding block (CB) has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the value of the NSPT index is 1, 2, or 3, performing an inverse non-separable linear transform (NSPT) on the plurality of reconstructed coefficients to generate a reconstructed residual block based on a kernel, and generating a reconstructed CB based on the reconstructed residual block and the prediction block.
[0040] In one embodiment of the present invention, the video decoding method further includes combining the reconstructed CB with a plurality of reconstructed CBs to generate an output video.
[0041] In one embodiment of the present invention, the predicted block of the current CB is determined by intra prediction in response to a flag or flag set indicating the application of intra prediction.
[0042] In one embodiment of the present invention, if the current CB has an 8x16 block size, the video decoding method performs inverse NSPT using an NSPT transform matrix selected from a kernel with dimensions 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0043] In one embodiment of the present invention, if the current CB has a 16x8 block size, the video decoding method performs inverse NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 128xB1xCxD, where parameter B1 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0044] In one embodiment of the present invention, if the current CB has a 16x16 block size, the video decoding method performs inverse NSPT using an NSPT transform matrix selected from a kernel with dimensionality 256xB2xCxD, where parameter B2 is the number of transform coefficients generated by NSPT from the encoder perspective, parameter C is 3, and parameter D is 35.
[0045] In one embodiment of the present invention, parameters B1 and B2 are 32.
[0046] In one embodiment of the present invention, parameters B1 and B2 are close to but not equal to 32. [Effects of the Invention]
[0047] Based on the above, the video encoding method, video decoding method, video encoder, and video decoder of the present invention can effectively improve the performance of video encoding.
[0048] To make the above more easily understandable, several embodiments will now be described in detail with reference to the drawings. [Brief explanation of the drawings]
[0049] [Figure 1] 1 is a schematic diagram of a video encoder according to an embodiment of the present invention; [Figure 2] 1 is a schematic diagram of a video encoding process according to an embodiment of the present invention; [Figure 3] 1 is a flowchart of a moving image encoding method according to an embodiment of the present invention. [Figure 4] 1 is a schematic diagram of an image divided into multiple blocks according to an embodiment of the present invention; [Figure 5] 2 is a schematic diagram of a CTU divided into multiple CUs according to an embodiment of the present invention; [Figure 6A] FIG. 10 is a schematic diagram of LFNST for 4×N and N×4 block sizes according to an embodiment of the present invention. [Figure 6B] FIG. 10 is a schematic diagram of LFNST for large block sizes according to an embodiment of the present invention. [Figure 7A] FIG. 10 is a schematic diagram of LFNST for 4×N and N×4 block sizes according to an embodiment of the present invention. [Figure 7B] FIG. 10 is a schematic diagram of LFNST for 8×N and N×8 block sizes according to an embodiment of the present invention. [Figure 7C] FIG. 10 is a schematic diagram of LFNST for 16×N and N×16 block sizes according to an embodiment of the present invention. [Figure 8] FIG. 2 is a schematic diagram of a zero-out region according to an embodiment of the present invention. [Figure 9A] FIG. 4 is a schematic diagram of splitting a residual block according to an embodiment of the present invention; [Figure 9B] FIG. 10 is a schematic diagram of splitting a residual block according to another embodiment of the present invention; [Figure 10] FIG. 4 is a schematic diagram of local prediction according to another embodiment of the present invention; [Figure 11] 1 is a schematic diagram of a video decoder according to an embodiment of the present invention; [Figure 12] 2 is a schematic diagram of a video decoding process according to an embodiment of the present invention; [Figure 13] 1 is a flowchart of a video decoding method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0050] In order to provide a more detailed understanding of the features and technical contents of the embodiments of the present invention, the implementation methods of the embodiments of the present invention will be described in detail below with reference to the drawings, which are used for reference and explanation purposes only and are not intended to limit the embodiments of the present invention.
[0051] Modern global video coding standards generally describe a block-based hybrid approach to decoding bitstreams. For example, the High Efficiency Video Coding (HEVC) standard and the Versatile Video Coding (VVC) standard are block-based, mixed spatial and temporal predictive coding schemes. That is, to generate a corresponding bitstream when encoding each image, an image is divided into multiple blocks, and each of these blocks is further coded.
[0052] FIG. 1 is a schematic diagram of a video encoder according to an embodiment of the present invention. Referring to FIG. 1, the video encoder 100 includes a processor 110, a storage device 120, a communication interface 130, and a data bus 140. The processor 110 is electrically connected to the storage device 120 and the communication interface 130 via the data bus 140. In an embodiment of the present invention, the storage device 120 may store relevant instructions and may also store video encoder related algorithms. The processor 110 may output a bitstream to the communication interface 130. The processor 110 may implement the video encoding method according to the present invention by executing the relevant instructions.
[0053] In one embodiment of the present invention, video encoder 100 may be implemented by one or more personal computers (PCs), one or more server computers, and one or more workstation computers, or may be configured by multiple computing devices, but the present invention is not limited thereto. In another embodiment of the present invention, video encoder 100 may further include an additional processor for executing an associated video encoder and / or associated instructions to implement a video encoding method in accordance with the present invention. Furthermore, in one embodiment of the present invention, video encoder 100 may further include an additional processor for executing an associated video encoder, associated video decoder, and / or associated instructions to perform video encoding and video decoding functions. Video encoder 100 may be used to implement a video codec and may perform video encoding and video decoding functions in accordance with the present invention.
[0054] In one embodiment of the present invention, processor 110 may include, for example, a central processing unit (CPU), a graphics processing unit (GPU), or other programmable general-purpose or special-purpose microprocessor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD), other similar processing circuitry, or a combination of these devices. In one embodiment of the present invention, storage device 120 may be a non-transitory computer-readable recording medium, such as, but not limited to, read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or non-volatile memory (NVM).
[0055] In one embodiment of the present invention, the associated video encoder and / or associated instructions may be stored on a non-transitory computer-readable storage medium of one device and executed by a processor of another device. Communication interface 130 may be, for example, but is not limited to, a network card supporting a wired network connection (such as Ethernet), a wireless network card supporting wireless communication standards such as Institute of Electrical and Electronics Engineers (IEEE) 802.11n / b / g / ac / ax / be, or any other network connection device. Communication interface 130 is configured to acquire input video.
[0056] Figure 2 is a schematic diagram of a video encoding process according to an embodiment of the present invention. Referring to Figures 1 and 2, the video encoder 100 can encode an input video into an output bitstream by executing the video encoding process according to Figure 2. The storage device 120 can store algorithms for a division module 201, an arithmetic module 202 (e.g., an addition module or a subtraction module), a prediction module 203, a transformation module 204, a quantization module 205, an entropy coding module 206, an inverse quantization module 207, an inverse transformation module 208, a reconstruction module 209 (e.g., an addition module or a subtraction module), a filtering module 210, and a decoded image buffer module 211. The processor 110 can execute the above-mentioned modules to perform the video encoding process.
[0057] In one embodiment of the present invention, the processor 110 can receive input video from an external video source. The partitioning module 201 can receive the input video, partition each image of the input video into multiple coding tree units (CTUs), and further partition each CTU into one or more coding units (CUs) to generate multiple coding units (CUs). Each CU includes one or more spatially co-located coding blocks (CBs), each of which corresponds to a color component of the video. Thus, the partitioning module 201 equivalently generates multiple coding blocks (CBs). The prediction module 203 can receive a current CB and perform intra-prediction to generate a prediction block for the current CB, although the present invention is not limited thereto. The prediction module 203 can also generate a prediction block for the current CB by performing inter-prediction, motion prediction, and / or other prediction. The calculation module 202 can receive the current CB and a prediction block and perform a subtraction operation on the current CB and the prediction block to generate a residual block.
[0058] The transform module 204 may perform a non-separable primary transform (NSPT) on the residual block based on an (NSPT) kernel to transform the data of the residual block and generate a plurality of coefficients. Alternatively, the transform module 204 may perform other transforms (e.g., a Karhunen-Loeve Transform (KLT), a two-dimensional discrete cosine transform (DCT), and / or a low-frequency non-separable secondary transform (LFNST)). The quantization module 205 may further quantize the plurality of coefficients to generate a plurality of quantized coefficients. The entropy coding module 206 may then encode the plurality of quantized coefficients to generate an output bitstream. The entropy coding module 206 first binarizes the plurality of quantized coefficients into a set of binary bins and then applies an entropy coding algorithm to compress the binary bins and generate coded bits. Examples of binarization methods include, but are not limited to, truncated Unicode, a combination of truncated Rice (TR) and exponential-Golomb (EGk) binarization, kth order exponential-Golomb binarization, etc. Examples of entropy coding algorithms include, but are not limited to, variable length coding (VLC), context adaptive VLC (CAVLC), arithmetic coding, context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE), etc.The entropy coding module 206 may further encode other parameters (e.g., partition mode flags, prediction mode flags, coded block flags, sub-block coding flags, etc.) required to decode images from the video encoder 100 into the output bitstream, after which the video encoder 100 may output the output bitstream.
[0059] The inverse quantization module 207 may perform a scaling operation on the quantized coefficients to output a plurality of reconstructed coefficients. The inverse transform module 208 may perform one or more inverse transforms corresponding to the transform in the transform module 204 to output a reconstructed residual block. The reconstruction module 209 may calculate a reconstructed CB by adding the reconstructed residual block with a prediction block of the current CB generated by the prediction module 203. The reconstruction module 209 may send the reconstructed CB to the prediction module 203 to be used as a reference for intra prediction. After all CBs in the current image or current sub-image are reconstructed, the reconstruction module 209 may merge the reconstructed CBs to generate a reconstructed image or reconstructed sub-image. The filtering module 210 may perform loop filtering on the reconstructed image or reconstructed sub-image. The filtering module 210 may include one or more loop filtering operations (e.g., a deblocking filter, a Sample Adaptive Offset (SAO) filter, an Adaptive Loop Filter (ALF), a bilateral filter, a luma mapping with chroma scaling (LMCS) filter, a neural network-based loop filter (NNLF), etc.). The output of the filtering module 210 is a decoded image or a decoded sub-image, which may be buffered in a decoded image buffer module 211. The decoded image buffer module 211 may output the decoded image or the decoded sub-image according to timing and control information. The image stored in the decoded image buffer module 211 may also be used as a reference for the prediction module 203 to perform inter-prediction or intra-prediction.
[0060] 3 is a flowchart of a video encoding method according to an embodiment of the present invention. Referring to FIG. 1 to FIG. 3, the video encoder 100 can implement the video encoding method by performing the following steps S310 to S370. In step S310, the segmentation module 201 can receive a current image of an input video and segment the current image into multiple CBs.
[0061] FIG. 4 is a schematic diagram of an image divided into multiple blocks according to an embodiment of the present invention. As shown in FIG. 4, a current image 400 is first divided into square blocks called CTUs 401. For example, CTUs 401 are blocks of 256×256 pixels. Next, referring to FIG. 5, FIG. 5 is a schematic diagram of a current CTU divided into multiple CUs according to an embodiment of the present invention. In an embodiment of the present invention, each CTU 401 in an image can be further divided into one or more CUs 402. Each CU 402 is rectangular or square, and each CU 402 may be the same size as its root CTU 401 or, as shown in FIG. 5, a smaller subdivision, such as a 4×4 block, divided from the root CTU 401. Each CU 402 includes one or more spatially co-located coding blocks (CBs), where each coding block corresponds to a color component of a video.
[0062] In step S320, the prediction module 203 may generate a prediction block of the current CB. In an embodiment of the present invention, the prediction module 203 generates the prediction block of the current CB by intra prediction. In step S330, the calculation module 202 may calculate a residual block based on the current CB and the prediction block. After prediction, the residual may still have high spatial correlation. Although conditional entropy coding can capture the spatial dependency between adjacent samples to some extent, it is computationally impractical to create an entropy coding statistical model that can fully exploit the spatial correlation contained in the residual. In contrast, transform coding is a practical and effective method for spatially decorrelating the residual.
[0063] Note that the residual can generally be transformed by an integerized version of the DCT, which can be applied to the horizontal and vertical directions, respectively. For an M×N residual sample block (M is the block width and N is the block height), the transform coefficients can be obtained by the following operation: apply an M×M DCT to each row to obtain intermediate transform coefficients, and then apply an N×N DCT to each column of the intermediate transform coefficients. The benefit of applying the transform is the transform coding gain (G TC ) can be estimated by the transform coding gain, which is the distortion (D SQ ) and the distortion (D TC ) is defined as the ratio of the transform coefficient variance σ x 2 The arithmetic mean value of and σ x 2 can be interpreted as the ratio of the geometric means of
[0064]
number
[0065] The use of one-dimensional transforms applied separately to the horizontal and vertical directions scales computationally well with increasing block size. In the example above, the transform coefficients are obtained using a matrix implementation of the DCT, which requires (M + N) multiplications per sample. Furthermore, butterfly factorization can further reduce the number of multiplications per sample, at the expense of a slight increase in computational latency. Separable transforms can achieve optimal energy compaction for spatial features along Cartesian directions (i.e., vertical or horizontal). For example, vertical edges are fully compressed by a vertical DCT. However, separable transforms cannot optimally exploit spatial features along non-Cartesian directions. In such cases, a properly designed non-separable transform can achieve higher coding performance.
[0066] A separable transform applies one-dimensional transforms separately in the horizontal and vertical directions, whereas a two-dimensional non-separable transform is applied directly to a block of input samples. One desirable property of a transform is that the transform vector spans the space of input samples. This means that any input vector (i.e., any combination of input sample values) can be expressed as a weighted sum of transform vectors. For a transform to span, the number of transform vectors must be equal to or greater than the number of dimensions of the input space; in other words, the number of output transform coefficients must be equal to or greater than the number of input samples. For example, the one-dimensional DCT in VVC is a space-spanning transform. Next, for a space-spanning non-separable transform, if the block of input samples is an M×N residual, the transform also outputs an M×N block of transform coefficients, which can be realized by a matrix implementation of (M×N)×(M×N) multiplications.
[0067] To derive a non-separable transform that produces coding gain for a particular directional feature, we can train the transform. For example, we can group together representative sets of residual blocks corresponding to directional features of interest and compute the KLT based on the covariance matrix of the set of residual blocks. This process can be repeated for K different sets of residual blocks, resulting in an overall transform kernel with dimensionality of (M × N) × (M × N) × K in this example.
[0068] The space-spanning non-separable transforms described in this section have two problems. First, they have high computational complexity. Because non-separable transforms are generally learned, they usually cannot be factorized. In the above example, a matrix implementation of the space-spanning non-separable transform results in a complexity of (M × N) multiplications per sample. Second, the transform kernels occupy a large amount of storage in the encoder and decoder. In the above example, a single kernel adaptable to K different directional features has (M × N) × (M × N) × K weights. This kernel can only be applied to residual blocks of size M × N. To make the non-separable transform applicable to multiple block sizes, a transform kernel must be learned for each discrete block size.
[0069] Therefore, to address the above-mentioned problems of spatially spanning non-separable transforms, VVC introduced a low-frequency non-separable secondary transform (LFNST) tool with several modifications. First, the LFNST tool applies to a wide range of block sizes, but only two LFNST kernels are defined. A smaller LFNST kernel is applied to blocks of size 4×N or N×4 (N≧4), and a larger LFNST kernel is applied to all larger block sizes (8×8 and above). Referring to Figures 6A and 6B, the sample positions affected by the LFNST are also shown. For example, for a 4×N or N×4 block size from the encoder perspective, the top-left 4×4 sample position (shaded area in Figure 6A) is transformed by a small LFNST, and the remaining sample positions (white area in Figure 6A) are ignored or "zeroed out." From the decoder perspective, an inverse LFNST is applied to generate the top-left 4×4 sample, and the remaining samples are filled with zeros. A similar policy applies to larger block sizes, where LFNST operates on the top-left three 4x4 blocks of sample positions (shaded area in Figure 6B). The remaining sample positions are zeroed out.
[0070] As a result of the "zero-out" policy, LFNST is significantly smaller in size than a full-size transform applied to every sample position. However, it is inherently lossy, and values at sample positions ignored by LFNST cannot be recovered. If the LFNST tool were applied directly to the residual samples, such loss would be significant enough to impair the usefulness of the LFNST tool. However, LFNST is referred to as a secondary transform because it is applied after a separable DCT is performed in the encoder, operating on the primary transform coefficients to generate secondary transform coefficients. In other words, the DCT can be considered a primary transform. In this invention, the leftmost sample position of a primary transform coefficient block corresponds to the horizontal low-frequency portion of the DCT, and the topmost sample position corresponds to the vertical low-frequency portion of the DCT. By preferentially transforming and reconstructing the top-left sample position at the decoder, LFNST is able to reconstruct low-frequency information from the original residual. As mentioned above, the transform has energy compaction properties, resulting in coding gain. It is also well established empirically that the variance (energy) of image and video signals captured by a camera is mainly concentrated in the low-frequency DCT coefficients. Therefore, although "zeroing out" prevents LFNST from losslessly recovering any residual block, in practice, the loss can be minimized for most classes of image and video signals.
[0071] The second change is that the applied transform is not a space-spanning transform for both the small and large LFNST kernels. From the encoder's perspective, the number of output (secondary transform) coefficients is smaller than the number of input (primary transform) coefficients. For example, the small LFNST kernel takes 4 × 4 = 16 primary transform coefficients as input but outputs only 8 secondary transform coefficients. The large LFNST kernel takes 3 × 4 × 4 = 48 primary transform coefficients as input and outputs 8 secondary transform coefficients. The use of non-spanning transforms introduces additional reconstruction loss. However, this loss can be traded off for the reduced complexity achieved by control measures. The space-spanning non-separable transform can first be designed using the KLT method described above. According to this method, the basis vectors of the transform correspond to the eigenvectors of the covariance matrix calculated based on a set of representative residual blocks. These eigenvectors are ranked in importance by their corresponding eigenvalues. Select the most significant eigenvectors to construct a non-separable transformation that spans the non-space. For example, select the 8 eigenvectors with the largest eigenvalues to form a non-space-spanning transformation of the small LFNST kernel.
[0072] In summary, the above two changes significantly reduce the complexity of the LFNST kernel compared to space-spanning non-separable transforms. For small blocks, using a small LFNST kernel reduces the potential complexity from (4 × N) × (4 × N) multiplications (N ≥ 4) to 16 × 8 multiplications per transform block. For large blocks, using a large LFNST kernel reduces the potential complexity from (8 × N) × (8 × N) multiplications (N ≥ 8) to 48 × 8 multiplications per transform block.
[0073] The LFNST kernel does not consist of only one transformation matrix. Multiple transformation matrices are learned to achieve better coding gain for various image and video signals. The number of different transformation matrices is the product of the third and fourth dimensions of the LFNST kernel. A small LFNST kernel has dimensionality 16x8x2x4, while a large LFNST kernel has dimensionality 48x8x2x4. Because a specific transformation matrix is selected through a combination of explicit signaling and implicit selection, the LFNST kernel is represented by two additional dimensions.
[0074] Explicit signaling is performed by an LFNST index signaled in the bitstream, which can take values of 0, 1, or 2, where 0 indicates that LFNST is not used for the transform block, and 1 or 2 indicates the selection of the third dimension of the LFNST kernel. The drawbacks of potential reconstruction loss due to zeroing out and non-spanning simplifications are mitigated by the explicit signaling mechanism. If the use of LFNST results in excessive reconstruction loss for a transform block, the LFNST tool can be disabled by signaling an LFNST index of 0.
[0075] The implicit selection is enabled by restricting LFNST to coding blocks that use intra prediction. Intra prediction generates a prediction block for a coding block based on neighboring reference samples at the top and left edges of the current block. The specific method for constructing the prediction block is signaled in the bitstream by the intra prediction mode. Simple methods for intra prediction include averaging reference samples ("DC" mode) or constructing an affine interpolation between several reference samples ("planar" mode). However, most intra prediction modes are reserved for signaling the intra angle direction, where the prediction block is constructed based on the assumption that the reference sample values are replicated along a specific direction. When the intra angle direction is used, it can be a strong hint to the directional characteristics of the residual block. The implicit selection of the LFNST transform is performed by mapping the intra prediction mode to one of four possible values of a "transform set index," which is used to index the fourth dimension of the LFNST kernel. The mapping used in VVC is shown in Table 1 below (ie, mapping from intra prediction modes to LFNST transform set indices).
[0076] [Table 1]
[0077] Furthermore, in post-VVC research, an extension to LFNST has been proposed and integrated into the enhanced compression test model (ECM). The LFNST tool in ECM improves coding gain by relaxing some of the complexity reductions required for the original LFNST tool employed in VVC. ECM has three LFNST kernels. Similar to the LFNST tool in VVC, most transform blocks are zeroed out. Referring to Figures 7A through 7C, the shaded areas indicate the locations of primary transform coefficients affected by LFNST in ECM, while the white areas indicate the locations of zeroed-out transform coefficients. For blocks of size 4xN or Nx4 (N ≥ 4), a small LFNST kernel is used for the top-left 4x4 primary transform coefficients. For blocks of size 8xN or Nx8 (N ≥ 8), a medium-sized LFNST kernel is used for the four top-left 4x4 primary transform coefficient blocks. For blocks of 16x16 or larger, a large LFNST kernel is used for the six top-left 4x4 primary transform coefficient blocks.
[0078] The size of the LFNST kernel in ECM can be 16x16x3x35 for a small LFNST kernel, 64x32x3x35 for a medium LFNST kernel, and 96x32x3x35 for a large LFNST kernel. Compared to the LFNST tool in VVC, the range of LFNST indices signaled is increased from 2 to 3, and the number of LFNST transform sets is increased from 4 to 35. The mapping from intra prediction modes to LFNST transform set indices is shown in Table 2 below (i.e., mapping from intra prediction modes to LFNST transform set indices in ECM).
[0079] [Table 2]
[0080] The complexity burden of the LFNST tool can be evaluated in three ways. The first is the additional storage burden imposed on the decoder that must store the LFNST kernel. The second is the worst-case number of multiplications per sample that the decoder must perform when the LFNST tool is applied. The third is the additional number of multiplications per sample that the encoder needs to perform when searching the entire LFNST tool. In all three of these metrics, the enhanced LFNST proposed in ECM is more complex than the LFNST in VVC. However, considering the total number of multiplications per sample, the worst-case decoder complexity may still be lower than that of other transform options.
[0081] For a matrix multiplication implementation of the DCT applied separately to transforms of size MxN, the number of multiplications per sample is (M+N). Therefore, the worst-case complexity occurs at a maximum of (M+N). In practice, alternative implementations of the DCT (e.g., butterfly factorization) can reduce the complexity, but the matrix multiplication implementation provides a convenient way to estimate the complexity. The separable DCT is extended with ECM, which results in the largest transform being a 128-point DCT. Therefore, the worst-case complexity of the separable DCT is 128 + 128 = 256 multiplications per sample.
[0082] The worst-case decoder complexity of LFNST for ECM can be evaluated considering various block sizes. For a fair comparison, the evaluation includes the cost of performing the linear transform. For a 4x4 block, the linear transform involves 4 + 4 = 8 multiplications per sample. LFNST involves 16x16 matrix multiplications, or 16 multiplications per sample. Therefore, the total cost of LFNST for a 4x4 block is 24 multiplications per sample.
[0083] For a 4x8 block, a simple implementation of the linear transform typically involves eight 4x4 transforms along the short dimension and four 8x8 transforms along the long dimension, resulting in a total of 4 + 8 = 12 multiplications per sample. However, because LFNST reconstructs only the nonzero coefficient values in the top-left 4x4 block of primary transform coefficient locations, an optimized decoder can achieve a total of 2 + 4 = 6 multiplications per sample by performing only four 4x4 transforms along the short dimension and four 4x8 transforms along the long dimension. Because the order of separable transforms is generally fixed, in the worst case, the decoder must perform four 4x8 transforms along the long dimension and then eight 4x4 transforms along the short dimension, resulting in 4 + 4 = 8 multiplications per sample. LFNST is still a 16x16 matrix multiplication, and the cost is spread across larger blocks, resulting in eight multiplications per sample. Therefore, for a 4x8 block, the worst-case cost of LFNST is 16 multiplications per sample. The same principle applies in general to 4xN or Nx4 block sizes: therefore, the number of multiplications per sample for a 4xN or Nx4 block will always be less than or equal to the number of multiplications per sample for a 4x4 block.
[0084] For an 8x8 block, the linear transform involves 8 + 8 = 16 multiplications per sample. LFNST involves 64x32 matrix multiplications, or 32 multiplications per sample. Therefore, for an 8x8 block, the total cost of LFNST is 48 multiplications per sample.
[0085] For 8x16 blocks, we again assume that the optimized decoder exploits the zero-out property of the LFNST reconstruction. Of the primary transform coefficient positions, only the top-left 8x8 block is nonzero. Therefore, the optimized decoder can exploit this by performing eight 8x8 transforms along the short dimension followed by eight 8x16 transforms along the long dimension, achieving a total of 4 + 8 = 12 multiplications per sample. Alternatively, the optimized decoder could first perform eight 8x16 transforms along the long dimension followed by 16 8x8 transforms along the short dimension, achieving 8 + 8 = 16 multiplications per sample. The LFNST adds an additional (64 x 32) / (8 x 16) = 16 multiplications per sample, resulting in a total worst-case complexity of 32 multiplications per sample. As previously mentioned, the number of multiplications per sample for an 8xN or Nx8 block is always less than or equal to the number of multiplications per sample for an 8x8 block.
[0086] For 16x16 blocks, due to the zero-out property of LFNST reconstruction, only six 4x4 primary transform coefficient blocks have nonzero values in the pattern shown in Figure 7C. For simplicity, we take a more generous pattern and assume that the top-left 12x12 block at that primary transform position has nonzero values. In this case, an optimized decoder can take advantage of it by first performing 12 12x16 transforms along one dimension and then 16 12x16 transforms along the second dimension, which involves 9 + 12 = 21 multiplications per sample. LFNST involves (96 x 32) / (16 x 16) = 12 multiplications per sample, resulting in a total complexity of 33 multiplications per sample.
[0087] For an M × N block (M, N ≥ 16), an optimized decoder can perform a separable DCT by performing twelve 12 × M transforms along one dimension followed by M 12 × N transforms along the second dimension, achieving (12 × 12) / N + 12 multiplications per sample. The worst-case complexity occurs for the smallest value, N = 16, i.e., 21 multiplications per sample, equivalent to the complexity of a 16 × 16 block. LFNST adds an additional (96 × 32) / (M × N) multiplications per sample, which is always less than or equal to the number of multiplications per sample for a 16 × 16 block. Therefore, for large M × N block sizes, the total complexity of LFNST in ECM is always less than or equal to the number of multiplications per sample for a 16 × 16 block.
[0088] A detailed evaluation of the decoder complexity of the LFNST for ECM across a range of block sizes shows that the worst-case complexity is 48 multiplications per sample (occurring for 8x8 blocks). Surprisingly, this worst-case complexity includes the cost of implementing the separable DCT, but due to the LFNST zero-out optimization, it is significantly lower than the worst-case complexity of the separable DCT alone (estimated at 256 multiplications per sample).
[0089] As can be seen, the use of non-separable quadratic transforms allows for significant complexity reductions due to the use of zero-outs in selected linear transform coefficient regions. However, NSPT allows for further coding. Early work on non-separable linear transforms confirmed that significant gains could be obtained (average rate reduction of 3.43% achieved in the Bjontegaard metric), even though the implemented transforms were complex and the kernel weights were obtained by overfitting to a test dataset.
[0090] A practical implementation of NSPT has been proposed. In this proposal, NSPT is applied only to a small set of block sizes, such as 4x4, 4x8, 8x4, and 8x8. For these block sizes, NSPT replaces LFNST. Like LFNST, the NSPT kernel is trained; specifically, the appropriate matrix for a particular block is selected, guided by both a signaled index and the implicit selection of the intra-prediction mode. Three NSPT kernels are proposed: a small NSPT kernel (16x16x3x35) for 4x4 blocks, a medium NSPT kernel (32x20x3x35) for 4x8 and 8x4 blocks, and a large NSPT kernel (64x32x3x35) for 8x8 blocks.
[0091] Typically, the proposed NSPT does not use zero-out transforms, so the first dimension of each kernel is always equal to the number of samples in the block. For medium and large NSPT kernels, the second dimension is smaller than the first dimension, which means that NSPT is a lossy transform. Similar to LFNST, an NSPT index is signaled in the bitstream and can take values of 0, 1, 2, or 3. Here, 0 indicates that NSPT is not used for the transform block, and 1 through 3 indicate selection along the third dimension in the corresponding NSPT kernel. The selection along the fourth dimension of the NSPT kernel is determined by mapping from the intra prediction mode in a manner similar to the extended LFNST of ECM.
[0092] To make NSPT practically feasible, the kernel size and block size were carefully designed to enable NSPT. This can be confirmed by comparing the complexity of NSPT for each block size with the complexity of the corresponding LFNST replaced by NSPT. For 4x4 blocks, the complexity of NSPT is 16 multiplications per sample, while the complexity of LFNST is 24 multiplications per sample. For 4x8 and 8x4 blocks, NSPT is 20 multiplications per sample, while LFNST is 16 multiplications per sample. For 8x8 blocks, NSPT is 32 multiplications per sample, while LFNST is 48 multiplications per sample. Therefore, the worst-case decoder complexity is not increased.
[0093] In the above proposed NSPT implementation, for a specific block size, the NSPT kernel is designed to replace the LFNST, so that the worst-case decoder complexity in terms of multiplications per sample does not increase. The following embodiments provide several solutions to improve the gain of NSPT while keeping the worst-case decoder complexity practical.
[0094] 1 to 3 , in step S340, in response to the determined block size and NSPT index, the transform module 204 can perform NSPT on the residual block to generate multiple coefficients based on a kernel. In one embodiment of the present invention, if the residual block has a block size of 8×16, the NSPT transform matrix is selected from a kernel with dimensionality A×B×C×D, where the value of parameter A is 128, the value of parameter C is 3, and the value of parameter D is 35. Note that in the description of the present invention, dimensionality “A” represents the number of input samples from the residual block, dimensionality “B” represents the number of transform coefficients generated by NSPT, dimensionality “C” represents the number of indexed sets, and dimensionality “D” represents the number of transform sets. The order of the kernel dimensions described in the present invention is merely an example for explaining how to select an NSPT transform matrix, and may differ depending on the embodiment of NSPT.
[0095] The NSPT transform matrix is selected by indexing the "C" and "D" dimensions of the kernel, thus resulting in an NSPT transform matrix of size A x B. The NSPT index value can be 1, 2, or 3, and is used to index the "C" dimension of the kernel. The NSPT index value is determined by the following operation: video encoder 100 performs rate-distortion optimization (RDO) on all possible NSPT index values and selects the value that minimizes the RD cost. As described in step S320 above, the predictive block is generated by intra prediction associated with an intra prediction mode. The intra prediction mode is mapped to a transform set index by the mapping process described in Table 2. The transform set index is used to index the "D" dimension of the kernel.
[0096] In one example of this embodiment of the present invention, NSPT is performed on the residual block by matrix multiplication. The samples of the residual block are reordered in raster scan order to form a one-dimensional column vector R of 128 x 1 samples. Let the selected NSPT transformation matrix be T of size A x B (128 x B in this example). NSPT can then be performed by performing matrix multiplication on the samples of the residual block with the transpose of the NSPT transformation matrix, i.e., P = T T R, so the result of matrix multiplication, P, is a one-dimensional column vector consisting of B×1 transform coefficients. T Each column of corresponds to a sample position in the column vector R, and the samples in the column vector R correspond to spatial positions in the residual block according to the raster scan order described above. The raster scan order for constructing v described above is only an example, and different implementations may use different raster scan orders for T TOther scan orders may be used, provided the NSPT kernel is modified so that the columns of P correspond to the same spatial locations within the residual block. The column vector P is then inserted into a two-dimensional transform coefficient block of the same size as the residual block, following a hierarchical diagonal scan order. Note that either the one-dimensional vector P or the two-dimensional transform coefficient block may be referred to as coefficients.
[0097] In another embodiment of the present invention, if the residual block has a block size of 16x8, the NSPT transform matrix T is selected from a kernel with dimensionality of AxBxCxD. Parameter A has a value of 128, parameter C has a value of 3, and parameter D has a value of 35. The NSPT index is used to index the "C" dimension of the kernel, and the transform set index is used to index the "D" dimension of the kernel. In one example of this embodiment of the present invention, the NSPT performs a matrix multiplication P=T on the residual block. T The residual block is then interpolated into a two-dimensional transform coefficient block of the same size as the residual block, using a hierarchical diagonal scan order. Note that either the one-dimensional vector P or the two-dimensional transform coefficient block may be referred to as a plurality of coefficients.
[0098] Specifically, NSPT is extended to 8x16 and 16x8 block sizes to replace LFNST. For these block sizes, an additional NSPT kernel with dimensionality of 128xBxCxD is learned. Parameter B is the number of transform coefficients generated by NSPT from the encoder's perspective. Parameter C can be set to 3 and parameter D can be set to 35, which matches the current dimensionality of the kernels used in both ECM's extended LFNST kernel and the proposed NSPT. However, these dimensions may change if the overall design of LFNST and NSPT is further modified. The number of transform coefficients is set so that the worst-case decoder complexity of the extended NSPT and the overall complexity of the encoder applying the extended NSPT do not exceed the corresponding complexity of the LFNST tool replaced by NSPT. The worst-case LFNST complexity for 8x16 and 16x8 blocks is 32 multiplications per sample. In one embodiment of the present invention, parameter B = 32. However, in another embodiment of the present invention, parameter B can be set to a value close to but not equal to 32. The value of this parameter B is chosen to be an accurate value that has been empirically verified to not increase the complexity of the reference encoder.
[0099] In another embodiment of the present invention, if the residual block has a block size of 16x16, the NSPT transform matrix T is selected from a kernel with dimensionality of AxB2xCxD, where the value of parameter A is 256, the value of parameter C is 3, and the value of parameter D is 35. The value of the NSPT index is used to index the "C" dimension of the kernel, and the transform set index is used to index the "D" dimension of the kernel. In one example of this embodiment of the present invention, the NSPT is performed on the residual block by matrix multiplication P=T TThe residual block is then interpolated into a two-dimensional transform coefficient block of the same size as the residual block, using a hierarchical diagonal scan order. Note that either the one-dimensional vector P or the two-dimensional transform coefficient block may be referred to as a plurality of coefficients.
[0100] Specifically, NSPT is extended to 8x16, 16x8, and 16x16 block sizes to replace LFNST. For 8x16 and 16x8 block sizes, an additional NSPT kernel with dimensionality of 128xB1xCxD is trained, and for 16x16 block size, another additional NSPT kernel with dimensionality of 256xB2xCxD is trained. Parameter C can be set to 3 and parameter D can be set to 35, which matches the current dimensionality of the kernels used in both ECM's extended LFNST kernel and the proposed NSPT. However, these dimensions may change if the overall design of LFNST and NSPT is further modified. The number of transform coefficients (B1 and B2) of each additional NSPT kernel is set so that the worst-case decoder complexity of the extended NSPT and the overall complexity of the encoder with the extended NSPT applied do not exceed the corresponding complexity of the LFNST tool replaced by NSPT. The worst-case LFNST complexity for 8x16 and 16x8 blocks is 32 multiplications per sample, and for 16x16 blocks it is approximately 33 multiplications per sample (depending on the extent to which the linear transform is optimized for zero-out transform coefficient positions). Thus, in one embodiment of the present invention, parameter B1 is 32 and parameter B2 is 32. In another embodiment of the present invention, parameters B1 and B2 can be set to values close to, but not equal to, 32. Note that these values are chosen to be exact values that have been empirically verified to not increase the complexity of the reference encoder.
[0101] In step S350, the quantization module 207 quantizes the plurality of coefficients to generate a plurality of quantized coefficients. In step S360, the entropy coding module 208 encodes the plurality of quantized coefficients into an output bitstream. In step S370, the entropy coding module 208 encodes the NSPT index into the output bitstream. Thus, the video encoder 100 and its video coding method can achieve low-complexity NSPT and thus compress residual data by using the kernel matrix designed as described above.
[0102] FIG. 8 is a schematic diagram of a zero-out region according to an embodiment of the present invention. Referring to FIGS. 1 to 3 and 8, the prediction module 203 can further perform zero-out on the residual block, so that the zero-out residual block has a zero-out region. From the encoder's perspective, zero-out can be applied to the input side (residual sample position) of the NSPT kernel to further reduce its complexity. The LFNST tool stores DCT transform coefficient positions in the upper left (low frequency) part of the transform block, and the zero-out region is located in the lower right (high frequency) part of the transform block. In contrast, the NSPT stores residual sample positions in the lower right part of the residual block, and the zero-out region is located at the sample position at the upper left corner of the residual block. This is because intra prediction is performed based on a set of reference samples located near the upper left of the coding block, and the correlation between the reference sample and the coding block samples strongly depends on spatial proximity. Residual samples (corresponding to prediction errors) tend to have the smallest magnitude at sample positions close to the reference neighborhood. These locations are located at the top left corner of the residual block and are therefore least likely to cause significant reconstruction errors if completely ignored by zeroing out.
[0103] For example, as shown in Figure 8, Figure 8 shows an example arrangement of an 8x8 block. In this example, the top-left edge of the sample location, which has a thickness of 1, is zeroed out. From the encoder's perspective, the bottom-right 7x7 sample location (shown in the shaded area in Figure 8) is transformed by an NSPT kernel of size 49x32x3x35. The top-left edge of the sample location (shown in the white area in Figure 8) is ignored, or "zeroed out." From the decoder's perspective, an inverse NSPT is applied to generate the bottom-right 7x7 residual sample, along with zero-filling the remaining residual samples. Compared to the NSPT kernel's complexity of 32 multiplications per sample for an 8x8 block, this kernel's complexity is 24.5 multiplications per sample, a 24% reduction. A similar zero-out region is defined in the upper left corner for the NSPT kernels for 4x4, 4x8, and 8x4 block sizes, resulting in an NSPT kernel of 9x9x3x35 for 4x4 blocks (5 multiplications per sample, 69% complexity reduction), and 21x20x3x35 for 4x8 or 8x4 blocks (13.1 multiplications per sample, 35% complexity reduction).
[0104] In another embodiment of the present invention, a reduced zero-out region may be applied to some NSPT kernels compared to the example of Fig. 8. For example, the zero-out region may be reduced to only a single sample position at the upper left corner of the residual block. The size of the zero-out region is designed for each NSPT kernel, taking into account the trade-off between complexity and reconstruction error.
[0105] In another embodiment of the present invention, a zero-out region of increased thickness N is applied to some NSPT kernels compared to the example of Figure 8. For example, the thickness of the zero-out region can be increased to two sample widths at the top left most sample position.
[0106] In another embodiment of the present invention, the reduced zero-out region compared to Fig. 8 can be selected based on the intra-prediction mode. For example, if the intra-prediction mode is mainly horizontal (CUs are predicted mostly by left-side reference samples), the reduced zero-out region will be the left edge of the residual block.
[0107] 1 to 3, if the size of the residual block is larger than the block size supported by the largest NSPT kernel, the transform module 204 further divides the residual block into multiple smaller transform blocks. Specifically, the largest NSPT kernel size is limited to be applied to an M×N block. For example, M may be 16, and N may be 16. However, if the NSPT tool is applied to a block size equal to or smaller than P×Q (P>M, Q>N), the NSPT tool is enabled and replaces LFNST. The coding block size is R×S. In this embodiment, the coding block is larger than the block size supported by the largest NSPT kernel, i.e., R≧M, S≧N. An intra prediction mode is signaled for the coding block, and from the encoder's perspective, a prediction value is determined according to the intra prediction mode, and the prediction value is subtracted from the coding block sample to generate a residual. In this case, a non-zero NSPT index is signaled to indicate that NSPT is applied to the residual, while a zero NSPT index indicates that NSPT is not applied. In this embodiment of the present invention, instead of directly applying a transform to the residual block, the residual block is implicitly divided or partitioned into smaller transform blocks before applying NSPT, and therefore, NSPT according to this embodiment is scalable to a wider range of block sizes.
[0108] FIG. 9A is a schematic diagram illustrating partitioning of a residual block according to one embodiment of the present invention. FIG. 9B is a schematic diagram illustrating partitioning of a residual block according to another embodiment of the present invention. Referring to FIGS. 1 through 3, 9A, and 9B, in one embodiment of the present invention, an RxS residual block according to the above embodiment can be implicitly partitioned into MxN transform blocks, if possible. If R and S are not integer multiples of M and N, respectively, small blocks with dimensionality of (R%M) and (S%N) are generated (% is the modulus operator). In one embodiment of the present invention, the implicit partition is aligned with the upper left corner of the residual block, so that, if small blocks exist, they are generated at the bottom and right of the residual block. In another embodiment of the present invention, the implicit partition is aligned with the lower right corner of the residual block, so that, if small blocks exist, they are generated at the top and left of the residual block. The arrangement of these implicit partitions is shown in FIGS. 9A and 9B. Furthermore, each transform block is processed by an NSPT kernel of the corresponding block size, and the selection of a specific transform matrix is determined by the signaled NSPT index and the mapping from intra prediction mode to transform set index.
[0109] This advantage can be understood by considering the implicit partitioning of an MxN transform block into integer multiples. In this case, the number of multiplications per sample is equal to the number B of output transform coefficients generated by the selected NSPT. However, the total number of transform coefficients generated for the coding block is B per transform block. If NSPT were applied directly to the coding block without the implicit partitioning, the NSPT kernel would also need to include B output transform coefficients to achieve the same number of multiplications per sample. However, in this case, the total number of transform coefficients would be only B for the entire coding block. This number of transform coefficients is insufficient to reconstruct the coding block without incurring significant reconstruction error. As a result, direct application of NSPT to large blocks is not useful in video coding.
[0110] Furthermore, in the embodiment of Figure 8, zeroing can be limited to only the transform blocks located at the top or left edge of the residual block, meaning that either a zeroed-out or full-size version of the same NSPT kernel is applied depending on the position of the transform block within the residual.
[0111] In one embodiment of the present invention, an NSPT index is signaled for each transform block, which increases the signaling cost of the NSPT tool but may potentially improve the reconstruction error and allow for an overall improved rate-distortion tradeoff.
[0112] In one embodiment of the present invention, an NSPT index is signaled for each unique transform block size. Transform blocks of the same block size share a common NSPT index. Thus, the total number of NSPT indices signaled is 1, 2, or 4, depending on whether the residual block is an integer multiple of the maximum block size supported by the NSPT kernel.
[0113] In one embodiment of the present invention, an intra-prediction mode is signaled for a coding block, followed by a non-zero NSPT index to indicate that NSPT is to be applied. Unlike the previous embodiment, if the coding block is larger than the block size supported by the largest NSPT kernel, from the encoder's perspective, the coding block is implicitly divided into smaller prediction blocks before intra-prediction is applied. The implicit division follows the policy described with reference to FIG. 9 , except that prediction blocks are generated instead of transform blocks. Each prediction block is predicted according to the signaled intra-prediction mode to generate a residual block from each prediction block. However, each prediction value is determined by a reference sample immediately adjacent to the upper left boundary of the corresponding prediction block. An example of this prediction process is shown in FIG. 10 . FIG. 10 is a schematic diagram of local prediction according to another embodiment of the present invention. From the decoder's perspective, the prediction value cannot be determined until the prediction blocks above and to the left are fully reconstructed. This reduces the size of the residual because the prediction is more localized, but at the cost of increased sequential dependency. However, this sequential dependency is no worse than the worst case that the decoder already encounters (when CTUs are divided into the smallest possible size of CUs).
[0114] Figure 11 is a schematic diagram of a video decoder according to one embodiment of the present invention. Referring to Figure 11, the video decoder 1100 includes a processor 1110, a storage device 1120, a communication interface 1130, and a data bus 1140. The processor 1110 is electrically connected to the storage device 1120 and the communication interface 1130 via the data bus 1140. The storage device 1120 stores associated instructions and may further store associated video decoder algorithms. The processor 1110 receives a bitstream from the communication interface 1130. The processor 1110 may execute the associated video decoder and / or associated instructions to implement a video decoding method according to the present invention.
[0115] In one embodiment of the present invention, video decoder 1100 may be implemented by one or more PCs, one or more server computers, one or more workstation computers, or multiple computing devices, but the present invention is not limited thereto. In another embodiment of the present invention, video decoder 1100 may further include an additional processor for executing an associated video encoder and / or associated instructions to implement the video decoding method of the present invention. Also, in another embodiment of the present invention, video decoder 1100 may further include an additional processor for executing an associated video decoder and / or associated instructions to implement the video decoding method of the present invention. Furthermore, video decoder 1100 may be used to implement a video codec that performs the video decoding functions of the present invention.
[0116] In one embodiment of the present invention, processor 1110 includes, for example, a CPU, GPU, or other programmable general-purpose or special-purpose microprocessor, DSP, ASIC, PLD, similar processing circuitry, or a combination thereof. In one embodiment of the present invention, storage device 1120 may be a non-transitory computer-readable storage medium, such as, but not limited to, a ROM, an EPROM, an EEPROM, an NVM, etc.
[0117] In one embodiment of the present invention, the associated video decoder and / or associated instructions may be stored on a non-transitory computer-readable storage medium of one device and executed by a processor of another device. The communication interface 1130 may be, but is not limited to, a network card supporting a wired network connection such as Ethernet, a wireless network card supporting a wireless communication standard such as IEEE 802.11n / b / g / ac / ax / be, or any other network connection device. The communication interface 1130 is configured to obtain an input bitstream.
[0118] Figure 12 is a schematic diagram of a video decoding process according to an embodiment of the present invention. Referring to Figures 11 and 12, the video decoder 1100 executes the video decoding process according to Figure 12 to decode an input bitstream into an output video. In this embodiment of the present invention, the storage device 120 may store algorithms for an entropy decoding module 1201, a prediction module 1202, an inverse quantization module 1203, an inverse transform module 1204, a reconstruction module 1205 (e.g., an addition module or a subtraction module), a filtering module 1206, and a decoded image buffer module 1207. The processor 1110 may execute the above modules to perform the video decoding process.
[0119] In one embodiment of the present invention, the processor 1110 receives an input bitstream from an external video source. The entropy decoding module 1201 parses the input bitstream and obtains values of syntax elements from the input bitstream. The entropy decoding module 1201 decodes the input bitstream to obtain quantized coefficients and decodes entropy-coded syntax elements from the input bitstream. The entropy decoding module 1201 can convert binary representations of the entropy-coded syntax elements into numeric values. The entropy decoding module 1201 can also send the values of the syntax elements and one or more variables set or determined based on the values of the syntax elements to each module in the video decoder 1200, thereby obtaining one or more decoded images. The prediction module 1202 can determine a prediction block for a current coding block (CB). Note that although this process is a decoding process, these blocks are still referred to as coding blocks. The prediction module 1202 can include an intra prediction module. If it is indicated that an intra prediction mode is used for decoding the current CB, the prediction module 1202 can transfer the relevant parameters from the entropy decoding module 1201 to the intra prediction module to obtain an intra prediction block.
[0120] The inverse quantization module 1203 may inverse quantize the quantized coefficients to generate reconstructed coefficients. The inverse transform module 1204 may perform inverse NSPT on the reconstructed coefficients to generate a reconstructed residual block based on the NSPT kernel. The reconstruction module 1205 may generate a reconstructed CB based on the reconstructed residual block and a prediction block. The reconstructed CB may also be sent to the prediction module 1202 to be used as a reference for other blocks coded in intra prediction mode.
[0121] After all CBs in the current image or current subimage are reconstructed, the reconstructed CBs are combined to generate a reconstructed image or subimage. The filtering module 1206 performs loop filtering on the reconstructed image or subimage. The filtering module 1206 includes one or more loop filtering operations (e.g., a deblocking filter, a sample adaptive offset (SAO) filter, an adaptive loop filter (ALF), a bilateral filter, a luma mapping with chroma scaling (LMCS) filter, a neural network-based loop filter (NNLF), etc.). The filtering module 1206 outputs a decoded image or subimage, which is buffered in a decoded image buffer module 1207. The decoded image buffer module 1207 outputs the decoded image or subimage according to timing and control information. The image stored in the decoded image buffer module 1207 is used as a reference for inter- or intra-prediction by the prediction module 1202.
[0122] FIG. 13 is a flowchart of a video decoding method according to an embodiment of the present invention. Referring to FIGS. 11 to 13, the video decoder 1100 can implement the video decoding method by performing steps S1310 to S1370. In step S1310, the video decoder 1100 receives an input bitstream. In step S1320, the prediction module 1202 determines a prediction block of the current CB according to an intra prediction mode. In step S1330, the entropy decoding module 1201 decodes the input bitstream to obtain a plurality of quantized coefficients. In step S1340, the entropy decoding module 1201 decodes the input bitstream to obtain an NSPT index having a value of 1, 2, or 3. In step S1350, the inverse quantization module 1203 inverse quantizes the plurality of quantized coefficients to generate a plurality of reconstructed coefficients. In step S1360, the inverse transform module 1204 performs an inverse non-separable linear transform NSPT on the multiple reconstructed coefficients based on the determined block size and the decoded NSPT index to generate a reconstructed residual block based on the kernel.
[0123] In one embodiment of the present invention, if the block size of the current CB is 8x16, the NSPT transform matrix is selected from a kernel with dimensionality AxBxCxD, where the value of parameter A is 128, the value of parameter C is 3, and the value of parameter D is 35. The size of the current CB is determined by the partitioning mode flag previously decoded from the input bitstream. Note that in the present invention, dimensionality "A" represents the number of input samples from the residual block, dimensionality "B" represents the number of transform coefficients generated by the NSPT, dimensionality "C" represents the number of indexed sets, and dimensionality "D" represents the number of transform sets. The kernel dimensional order described herein is merely an example for explaining how to select the NSPT transform matrix, and may differ depending on the implementation of the NSPT.
[0124] An NSPT transform matrix is selected by indexing the "C" and "D" dimensions of the kernel, resulting in an NSPT transform matrix of size A x B. The NSPT index value is used to index the "C" dimension of the kernel. As described above in step S1320, the prediction block is generated by intra prediction associated with an intra prediction mode. The intra prediction mode is mapped to a transform set index according to the mapping process described above with reference to Table 2. This transform set index is used to index the "D" dimension of the kernel.
[0125] In one example of this embodiment of the present invention, inverse NSPT is performed on a plurality of reconstructed coefficients by matrix multiplication. The reconstructed coefficients are typically decoded according to a hierarchical reverse diagonal scan order, meaning that coefficients corresponding to high spatial frequencies are decoded before coefficients corresponding to low spatial frequencies. The reconstructed coefficients are then rearranged in reverse order (i.e., a hierarchical forward diagonal scan order) to form a one-dimensional column vector P of B × 1 samples. The selected NSPT transform matrix is denoted by matrix T of size A × B (128 × B in this embodiment). In this case, inverse NSPT is performed by performing matrix multiplication R = TP on the reconstructed coefficients with the NSPT transform matrix, resulting in a one-dimensional column vector R of 128 × 1 reconstructed residual coefficients. This column vector R is then arranged according to raster scan order to form a two-dimensional reconstructed residual block of the same size as the current CB. Note that in this matrix multiplication, each row of T corresponds to a sample position in column vector R, which, according to the aforementioned raster scan order, corresponds to a spatial position within the reconstructed residual block. The raster scan order for constructing the reconstructed residual block is only an example, and different embodiments may use other scan orders, provided the NSPT kernel is modified so that the columns of T correspond to the same spatial locations within the reconstructed residual block.
[0126] In another embodiment of the present invention, if the block size of the current CB is 16x8, the NSPT transform matrix T is selected from a kernel with dimensionality AxBxCxD, where the value of parameter A is 128, the value of parameter C is 3, and the value of parameter D is 35. The value of the NSPT index is used to index the "C" dimension of the kernel, and the transform set index is used to index the "D" dimension of the kernel. In one example of this embodiment of the present invention, the inverse NSPT is performed by matrix multiplication R=TP on multiple reconstructed coefficients, where the sample values of R are arranged according to raster scan order to generate a two-dimensional reconstructed residual block.
[0127] Specifically, NSPT is extended to 8x16 and 16x8 block sizes to replace LFNST. For these block sizes, additional NSPT kernels with dimensionality of 128xBxCxD are learned, where parameter B represents the number of transform coefficients generated by NSPT from the encoder's perspective. These additional NSPT kernels are identical to the additional NSPT kernels available in video encoder 100. In one embodiment of the present invention, parameter B is 32. However, in other embodiments of the present invention, parameter B may be set to a value close to but not equal to 32. In this case, the value of parameter B is selected from values that have been empirically verified not to increase the complexity of the reference encoder.
[0128] In another embodiment of the present invention, if the block size of the current CB is 16x16, the NSPT transform matrix T is selected from a kernel with dimensionality AxBxCxD, where the value of parameter A is 128, the value of parameter C is 3, and the value of parameter D is 35. The value of the NSPT index is used to index the "C" dimension of the kernel, and the transform set index is used to index the "D" dimension of the kernel. In one example of this embodiment of the present invention, the inverse NSPT is performed by matrix multiplication R=TP on multiple reconstructed coefficients, where the sample values of R are arranged according to raster scan order to generate a two-dimensional reconstructed residual block.
[0129] Specifically, NSPT is extended to 8x16, 16x8, and 16x16 block sizes to replace LFNST. For 8x16 and 16x8 block sizes, an additional NSPT kernel with dimensionality of 128xB1xCxD is trained, and for 16x16 block size, another additional NSPT kernel with dimensionality of 256xB2xCxD is trained. The additional NSPT kernels are identical to the additional NSPT kernels available in video encoder 100. In one embodiment of the present invention, parameters B1=32 and B2=32. In another embodiment of the present invention, parameter B1 may be set to a value close to but not equal to 32. In this case, the value of parameter B1 is selected from values empirically confirmed to not increase the complexity of the reference encoder.
[0130] In step S1370, reconstruction module 1205 may generate a reconstructed CB by performing sample-by-sample summation on the reconstructed residual block and the prediction block. Video decoder 1100 may combine this reconstructed CB with other reconstructed CBs to generate a reconstructed image or a reconstructed subimage. Filtering module 1206 then performs loop filtering to generate a decoded image or a decoded subimage, which video decoder 1100 may output as output video.
[0131] In summary, the video encoding method, video decoding method, video encoder, and video decoder according to the present invention propose several methods for achieving low complexity NSPT in video encoding and video decoding. The video encoding method, video decoding method, video encoder, and video decoder according to the present invention effectively improve the coding performance of video coding by introducing a large NSPT kernel whose complexity is comparable to that of the corresponding LFNST kernel, a new zero-out policy applied to the NSPT kernel, and / or extending the NSPT kernel to a large block size through implicit partitioning. The video encoding method, video decoding method, video encoder, and video decoder according to the present invention are applicable to future video coding standards.
[0132] Those skilled in the art may make various changes and modifications to the disclosed embodiments without departing from the scope or spirit of the present invention. Therefore, it is intended that the present invention cover changes and modifications that come within the scope of the following claims and their equivalents. [Explanation of symbols]
[0133] 100:Video Encoder 110, 1110: Processor 120, 1120: Storage devices 130, 1130: communication interface 140: Data bus 201: Split module 202: Calculation module 203: Prediction module 204: Conversion module 205: Quantization module 206: Entropy coding module 207: Inverse quantization module 208: Inverse quantization module 209: Reconstruction module 210: Filtering module 211: Decoded image buffer module 400: Input image 401:CTU 402:CU 1100:Video decoder 1201: Entropy decoding module 1202: Prediction module 1203: Inverse quantization module 1204: Inverse conversion module 1205: Reconstruction module 1206: Filtering module 1207: Decoded image buffer module S310~S370, S1310~S1370: Step
Claims
1. 1. A video encoder comprising: a segmentation module configured to receive an input video and generate a plurality of coding blocks (CBs) of the input video; a prediction module coupled to the partition module and configured to generate a prediction block of a current CB; a calculation module coupled to the partition module and the prediction module and configured to calculate a residual block based on the current CB and the prediction block; a transform module coupled to the computation module and configured to perform a non-separable linear transform (NSPT) on the residual block to generate a plurality of coefficients based on a kernel when the residual block has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the determined NSPT index value is 1, 2, or 3; a quantization module coupled to the transform module and configured to quantize the plurality of coefficients to generate a plurality of quantized coefficients; an entropy coding module coupled to the quantization module and configured to code the plurality of quantized coefficients and the NSPT index into an output bitstream. Video encoder.
2. The segmentation module is configured to segment an input image of the input video into a plurality of coding tree units (CTUs), and to segment each CTU into one or more CUs to generate a plurality of CUs and equivalently generate the plurality of CBs. The video encoder of claim 1 .
3. The prediction module is configured to generate a prediction block of the current CB by intra prediction. The video encoder of claim 1 .
4. When the residual block has an 8x16 block size, the transform module is configured to perform the NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35. The video encoder of claim 1 .
5. When the residual block has a 16x8 block size, the transform module is configured to perform the NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35. The video encoder of claim 1 .
6. When the residual block has a 16x16 block size, the transform module is configured to perform the NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 256xB2xCxD; where parameter B2 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35. The video encoder of claim 1 .
7. The parameter B1 is 32; The video encoder of claim 4 .
8. said parameter B1 being close to but not equal to 32; The video encoder of claim 4 .
9. The parameter B1 is 32; The video encoder of claim 5 .
10. said parameter B1 being close to but not equal to 32; The video encoder of claim 5 .
11. The parameter B1 and the parameter B2 are 32; The video encoder of claim 6.
12. the parameter B1 and the parameter B2 are close to but not equal to 32; The video encoder of claim 6.
13. the prediction module further performs zeroing on the residual block such that the zeroed-out residual block has a zeroed-out region. The video encoder of claim 1 .
14. If the size of the residual block is larger than a block size supported by a maximum NSPT kernel, the transform module is further configured to divide the residual block into multiple smaller transform blocks. The video encoder of claim 1 .
15. an NSPT index is signaled for each transform block of the plurality of smaller transform blocks; 15. A video encoder according to claim 14.
16. an NSPT index is signaled for each unique transform block size, and transform blocks of the plurality of smaller transform blocks having the same block size share a common NSPT index; 15. A video encoder according to claim 14.
17. If the size of the residual block is larger than the block size supported by the maximum NSPT kernel, the current CB is implicitly divided into multiple smaller prediction blocks before prediction. The video encoder of claim 1 .
18. A video encoding method, comprising: receiving an input video and generating a plurality of coded blocks (CBs) of the input video; generating a predicted block of the current CB; calculating a residual block based on the current CB and the predicted block; performing a non-separable linear transform (NSPT) on the residual block to generate a plurality of coefficients based on a kernel, if the residual block has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the determined NSPT index value is 1, 2, or 3; quantizing the plurality of coefficients to generate a plurality of quantized coefficients; encoding the plurality of quantized coefficients into an output bitstream by entropy coding; encoding the NSPT index into the output bitstream. Video encoding method.
19. Dividing input images of the input video into a plurality of coding tree units (CTUs); and dividing each CTU into one or more CUs to generate a plurality of CUs and equivalently a plurality of coding blocks (CBs). The moving image encoding method according to claim 18.
20. The predicted block of the current CB is generated by intra prediction. The moving image encoding method according to claim 18.
21. If the residual block has an 8x16 block size, the NSPT is performed based on an NSPT transformation matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35. The moving image encoding method according to claim 18.
22. If the residual block has a 16x8 block size, the NSPT is performed based on an NSPT transformation matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35. The moving image encoding method according to claim 18.
23. If the residual block has a 16x16 block size, the NSPT is performed based on an NSPT transformation matrix selected from a kernel with a dimensionality of 256xB2xCxD; where parameter B2 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35. The moving image encoding method according to claim 18.
24. The parameter B1 is 32; 22. The moving image encoding method according to claim 21.
25. said parameter B1 being close to but not equal to 32; 22. The moving image encoding method according to claim 21.
26. The parameter B1 is 32; 23. The moving image encoding method according to claim 22.
27. said parameter B1 being close to but not equal to 32; 23. The moving image encoding method according to claim 22.
28. The parameter B1 and the parameter B2 are 32; 24. The moving image encoding method according to claim 23.
29. the parameter B1 and the parameter B2 are close to but not equal to 32; 24. The moving image encoding method according to claim 23.
30. performing zeroing on the residual block such that the zeroed-out residual block has a zeroed-out region; The moving image encoding method according to claim 18.
31. If the size of the residual block is larger than the block size supported by the maximum NSPT kernel, dividing the residual block into multiple smaller transform blocks. The moving image encoding method according to claim 18.
32. an NSPT index is signaled for each transform block of the plurality of smaller transform blocks; 32. The moving image encoding method of claim 31.
33. an NSPT index is signaled for each unique transform block size, and transform blocks of the plurality of smaller transform blocks having the same block size share a common NSPT index; 32. The moving image encoding method of claim 31.
34. If the size of the residual block is larger than the block size supported by the maximum NSPT kernel, implicitly split the current CB into multiple smaller prediction blocks before prediction. The moving image encoding method according to claim 18.
35. 1. A video decoder comprising: an entropy decoding module configured to receive an input bitstream and decode the input bitstream to obtain a plurality of quantized coefficients and an NSPT index; a prediction module coupled to the entropy decoding module and configured to determine a prediction block; an inverse quantization module coupled to the entropy decoding module and configured to inverse quantize the plurality of quantized coefficients to generate a plurality of reconstructed coefficients; an inverse transform module coupled to the inverse quantization module and configured to, when a current coding block (CB) has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the value of the NSPT index is 1, 2, or 3, perform an inverse non-separable linear transform (NSPT) on the reconstructed coefficients to generate a reconstructed residual block based on a kernel; a reconstruction module coupled to the prediction module and the inverse transform module and configured to generate a reconstructed CB based on the residual block and the prediction block. Video decoder.
36. the reconstruction module is configured to combine the reconstructed CB with a plurality of reconstructed CBs to generate the output video.
36. A video decoder according to claim 35.
37. In response to a flag or a flag set indicating application of intra prediction, the prediction module is configured to determine a predicted block of the current CB by intra prediction.
36. A video decoder according to claim 35.
38. If the current CB has an 8x16 block size, the inverse transform module is configured to perform inverse NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35.
36. A video decoder according to claim 35.
39. If the current CB has a 16x8 block size, the inverse transform module is configured to perform inverse NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35.
36. A video decoder according to claim 35.
40. If the current CB has a 16x16 block size, the inverse transform module is configured to perform inverse NSPT using an NSPT transform matrix selected from a kernel with a dimensionality of 256xB2xCxD; where parameter B2 is the number of transform coefficients generated by the NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35.
36. A video decoder according to claim 35.
41. The parameter B1 is 32; 39. A video decoder according to claim 38.
42. said parameter B1 being close to but not equal to 32; 39. A video decoder according to claim 38.
43. The parameter B1 is 32; 40. A video decoder according to claim 39.
44. said parameter B1 being close to but not equal to 32; 40. A video decoder according to claim 39.
45. The parameter B1 and the parameter B2 are 32; 41. A video decoder according to claim 40.
46. the parameter B1 and the parameter B2 are close to but not equal to 32; 41. A video decoder according to claim 40.
47. A video decoding method, comprising: receiving an input bitstream; determining a prediction block based on the input bitstream; entropy decoding the input bitstream to obtain a plurality of quantized coefficients and NSPT indices; dequantizing the plurality of quantized coefficients to generate a plurality of reconstructed coefficients; performing an inverse non-separable linear transform (NSPT) on the reconstructed coefficients to generate a reconstructed residual block based on a kernel, when the current coding block (CB) has an 8x16 block size, a 16x8 block size, or a 16x16 block size and the value of the NSPT index is 1, 2, or 3; generating a reconstructed CB based on the residual block and the predicted block; Video decoding method.
48. further comprising combining the reconstructed CB with a plurality of reconstructed CBs to generate the output video.
48. The video decoding method of claim 47.
49. In response to a flag or a flag set indicating application of intra prediction, the predicted block of the current CB is determined by intra prediction.
48. The video decoding method of claim 47.
50. If the current CB has an 8x16 block size, the inverse NSPT is performed based on an NSPT transformation matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by the NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35.
48. The video decoding method of claim 47.
51. If the current CB has a 16x8 block size, the inverse NSPT is performed based on an NSPT transformation matrix selected from a kernel with a dimensionality of 128xB1xCxD; where parameter B1 is the number of transform coefficients generated by the NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35.
48. The video decoding method of claim 47.
52. If the current CB has a 16x16 block size, the inverse NSPT is performed based on an NSPT transformation matrix selected from a kernel with a dimensionality of 256xB2xCxD; where parameter B2 is the number of transform coefficients generated by the NSPT from the encoder's perspective, parameter C is 3, and parameter D is 35.
48. The video decoding method of claim 47.
53. The parameter B1 is 32; 51. The video decoding method of claim 50.
54. said parameter B1 being close to but not equal to 32; 51. The video decoding method of claim 50.
55. The parameter B1 is 32; 52. The video decoding method of claim 51.
56. said parameter B1 being close to but not equal to 32; 52. The video decoding method of claim 51.
57. The parameter B1 and the parameter B2 are 32; 53. The video decoding method of claim 52.
58. the parameter B1 and the parameter B2 are close to but not equal to 32; 53. The video decoding method of claim 52.