Method and apparatus for non-separable transofrms for video coding

By selecting transform kernels based on block size for non-separable transforms, the method enhances video coding efficiency, addressing inefficiencies in existing techniques and improving compression performance.

WO2026037301A1PCT designated stage Publication Date: 2026-02-19GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/114202
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-12
Filing Date
2025-08-12
Publication Date
2026-02-19

AI Technical Summary

Technical Problem

Existing video coding techniques face inefficiencies in decoding and encoding processes, particularly when dealing with non-separable transforms and intra prediction methods, leading to suboptimal performance in video compression.

Method used

The method and apparatus utilize a processor to select a first transform kernel from a plurality of kernels based on the size of the current block, specifically for non-separable primary transforms and low-frequency non-separable transforms, to enhance decoding and encoding processes, including intra and inter prediction methods.

Benefits of technology

This approach improves the efficiency of video coding by optimizing the selection of transform kernels, enhancing the decoding and encoding processes for non-separable transforms, thereby improving video compression performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025114202_19022026_PF_FP_ABST
    Figure CN2025114202_19022026_PF_FP_ABST
Patent Text Reader

Abstract

According to one aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to a current block being associated with a non-separable primary transform (NSPT) or a low-frequency non-separable transform (LFNST), and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD), template-based intra mode derivation (TIMD), spatial geometric partitioning mode (SGPM), matrix-based intra prediction (MIP), or extrapolation filter-based intra prediction (EIP) selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to a current block being associated with an NSPT or LFNST, and an intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the block. According to one aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS FOR NON-SEPARABLE TRANSOFRMS FOR VIDEO CODINGCROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of priorities to U.S. Provisional Application No. 63 / 682,102, entitled “NON-SEPARABLE TRANSFORMS FOR VIDEO CODING” and filed on August 12, 2024, which is incorporated by reference herein in their entireties.BACKGROUND

[0002] Embodiments of the present disclosure relate to video coding.

[0003] Digital video has become mainstream and is being used in a wide range of applications including digital television, video telephony, and teleconferencing. These digital video applications are feasible because of the advances in computing and communication technologies as well as efficient video coding techniques. Various video coding techniques may be used to compress video data, such that coding on the video data can be performed using one or more video coding standards. Exemplary video coding standards may include, but are not limited to, versatile video coding (H. 266 / VVC) , high-efficiency video coding (H. 265 / HEVC) , advanced video coding (H. 264 / AVC) , moving picture expert group (MPEG) coding, enhanced video coding model (ECM) , to name a few.SUMMARY

[0004] According to one aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, decoding, by the processor, the current block based on the first transform kernel.

[0005] According to another aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, decoding, by the processor, the current block based on the first transform kernel.

[0006] According to a further aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to a current block being associated with an inter prediction method, selecting, by a processor, one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The method may include, decoding, by the processor, the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0007] According to still another aspect of the present disclosure, a decoder is provided. The decoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0008] According to still a further aspect of the present disclosure, a decoder is provided. The decoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0009] According to yet another aspect of the present disclosure, a decoder is provided. The decoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to decode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0010] According to still another aspect of the present disclosure, an apparatus for decoding is provided. The apparatus for decoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0011] According to still a further aspect of the present disclosure, an apparatus for decoding is provided. The apparatus for decoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0012] According to yet another aspect of the present disclosure, an apparatus for decoding is provided. The apparatus for decoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to decode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0013] According to still another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a decoder is provided. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0014] According to still a further aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a decoder is provided. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0015] According to yet another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a decoder is provided. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, decode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0016] According to one aspect of the present disclosure, a method of encoding by an encoder is provided. The method may include, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, encoding, by the processor, the current block based on the first transform kernel.

[0017] According to another aspect of the present disclosure, a method of encoding by an encoder is provided. The method may include, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, encoding, by the processor, the current block based on the first transform kernel.

[0018] According to a further aspect of the present disclosure, a method of encoding by an encoder is provided. The method may include, in response to a current block being associated with an inter prediction method, selecting, by a processor, one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The method may include, encoding, by the processor, the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0019] According to still another aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0020] According to still a further aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0021] According to yet another aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, encode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0022] According to still another aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0023] According to still a further aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0024] According to yet another aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, encode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0025] According to still another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0026] According to still a further aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0027] According to yet another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, encode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0028] According to still a further aspect of the present disclosure, a non-transitory computer-readable medium storing a bitstream is provided. The bitstream may be generated according to one or more of the operations described herein.

[0029] According to yet a further aspect of the present disclosure, a method of transmitting a bitstream is provided. The method may include generating, by a processor, the bitstream according to one or more of the operations described herein. The method may include, transmitting, by the processor, the bitstream.

[0030] These illustrative embodiments are mentioned not to limit or define the present disclosure, but to provide examples to aid understanding thereof. Additional embodiments are described in the Detailed Description, and further description is provided there.BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments of the present disclosure and, together with the description, further serve to explain the principles of the present disclosure and to enable a person skilled in the pertinent art to make and use the present disclosure.

[0032] FIG. 1 illustrates a block diagram of an exemplary encoding system, according to some embodiments of the present disclosure.

[0033] FIG. 2 illustrates a block diagram of an exemplary decoding system, according to some embodiments of the present disclosure.

[0034] FIG. 3 illustrates a detailed block diagram of an exemplary encoder in the encoding system in FIG. 1, according to some embodiments of the present disclosure.

[0035] FIG. 4 illustrates a detailed block diagram of an exemplary decoder in the decoding system in FIG. 2, according to some embodiments of the present disclosure.

[0036] FIG. 5 illustrates an exemplary picture divided into coding tree units (CTUs) , according to some embodiments of the present disclosure.

[0037] FIG. 6 illustrates an exemplary CTU divided into coding units (CUs) , according to some embodiments of the present disclosure.

[0038] FIG. 7 illustrates a schematic visualization of a current CU block and spatially adjacent and non-adjacent reconstructed samples to the current block, according to some embodiments of the present disclosure.

[0039] FIG. 8 illustrates a schematic visualization of the angular modes of VVC, according to some embodiments of the present disclosure.

[0040] FIG. 9 illustrates an example visualization of an inter prediction mode, according to some aspects of the present disclosure.

[0041] FIG. 10A illustrates a low-frequency non-separable transform (LFNST) kernel for 4xN, Nx4, and 8x8 block sizes in VVC, according to some embodiments of the present disclosure.

[0042] FIG. 10B illustrates an LFNST kernel for 8xN and Nx8 block sizes in VVC, according to some embodiments of the present disclosure.

[0043] FIG. 11A illustrates an LFNST kernel for 4xN and Nx4 block sizes in ECM, according to some embodiments of the present disclosure.

[0044] FIG. 11B illustrates an LFNST kernel for 8xN and Nx8 block sizes in ECM, according to some embodiments of the present disclosure.

[0045] FIG. 11C illustrates an LFNST kernel for 16x16 and larger block sizes in ECM, according to some embodiments of the present disclosure.

[0046] FIG. 12 illustrates an example transform coefficient scanning order, according to some embodiments of the present disclosure.

[0047] FIG. 13 illustrates a decoder-side intra mode derivation (DIMD) method for ECM, according to some embodiments of the present disclosure.

[0048] FIG. 14 illustrates an example gradient analysis on a reference block, according to some embodiments of the present disclosure.

[0049] FIGs. 15A and 15B illustrate a flowchart of a first exemplary method of decoding by a decoder, according to some embodiments of the present disclosure.

[0050] FIGs. 16A and 16B illustrate a flowchart of a second exemplary method of decoding by a decoder, according to some embodiments of the present disclosure.

[0051] FIG. 17 illustrates a flowchart of a third exemplary method of decoding by a decoder, according to some embodiments of the present disclosure.

[0052] FIGs. 18A and 18B illustrate a flowchart of a first exemplary method of encoding by an encoder, according to some embodiments of the present disclosure.

[0053] FIGs. 19A and 19B illustrate a flowchart of a second exemplary method of encoding by an encoder, according to some embodiments of the present disclosure.

[0054] FIG. 20 illustrates a flowchart of a third exemplary method of encoding by an encoder, according to some embodiments of the present disclosure.

[0055] Embodiments of the present disclosure will be described with reference to the accompanying drawings.DETAILED DESCRIPTION

[0056] Although some configurations and arrangements are discussed, it should be understood that this is done for illustrative purposes only. A person skilled in the pertinent art will recognize that other configurations and arrangements can be used without departing from the spirit and scope of the present disclosure. It will be apparent to a person skilled in the pertinent art that the present disclosure can also be employed in a variety of other applications.

[0057] It is noted that references in the specification to “one embodiment, ” “an embodiment, ” “an example embodiment, ” “some embodiments, ” “certain embodiments, ” etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases do not necessarily refer to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it would be within the knowledge of a person skilled in the pertinent art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.

[0058] In general, terminology may be understood at least in part from usage in context. For example, the term “one or more” as used herein, depending at least in part upon context, may be used to describe any feature, structure, or characteristic in a singular sense or may be used to describe combinations of features, structures or characteristics in a plural sense. Similarly, terms, such as “a, ” “an, ” or “the, ” again, may be understood to convey a singular usage or to convey a plural usage, depending at least in part upon context. In addition, the term “based on” may be understood as not necessarily intended to convey an exclusive set of factors and may, instead, allow for the existence of additional factors not necessarily expressly described, again, depending at least in part on context.

[0059] Various aspects of video coding systems will now be described with reference to various apparatus and methods. These apparatus and methods will be described in the following detailed description and illustrated in the accompanying drawings by various modules, components, circuits, steps, operations, processes, algorithms, etc. (collectively referred to as “elements” ) . These elements may be implemented using electronic hardware, firmware, computer software, or any combination thereof. Whether such elements are implemented as hardware, firmware, or software depends upon the particular application and design constraints imposed on the overall system.

[0060] The techniques described herein may be used for various video coding applications. As described herein, video coding includes both encoding and decoding a video. Encoding and decoding of a video can be performed by the unit of block. For example, an encoding / decoding process such as transform, quantization, prediction, in-loop filtering, reconstruction, or the like may be performed on a coding block, a transform block, or a prediction block. As described herein, a block to be encoded / decoded will be referred to as a “current block. ” For example, the current block may represent a coding block, a transform block, or a prediction block according to a current encoding / decoding process. In addition, it is understood that the term “unit” used in the present disclosure indicates a basic unit for performing a specific encoding / decoding process, and the term “block” indicates a sample array of a predetermined size. Unless otherwise stated, the “block” and “unit” may be used interchangeably.

[0061] FIG. 1 illustrates a block diagram of an exemplary encoding system 100, according to some embodiments of the present disclosure. FIG. 2 illustrates a block diagram of an exemplary decoding system 200, according to some embodiments of the present disclosure. Each system 100 or 200 may be applied or integrated into various systems and apparatus capable of data processing, such as computers and wireless communication devices. For example, system 100 or 200 may be the entirety or part of a mobile phone, a desktop computer, a laptop computer, a tablet, a vehicle computer, a gaming console, a printer, a positioning device, a wearable electronic device, a smart sensor, a virtual reality (VR) device, an argument reality (AR) device, or any other suitable electronic devices having data processing capability. As shown in FIGs. 1 and 2, system 100 or 200 may include a processor 102, a memory 104, and an interface 106. These components are shown as connected to one another by a bus, but other connection types are also permitted. It is understood that system 100 or 200 may include any other suitable components for performing functions described here.

[0062] Processor 102 may include microprocessors, such as a graphic processing unit (GPU) , image signal processor (ISP) , central processing unit (CPU) , digital signal processor (DSP) , tensor processing unit (TPU) , vision processing unit (VPU) , neural processing unit (NPU) , synergistic processing unit (SPU) , or physics processing unit (PPU) , microcontroller units (MCUs) , application-specific integrated circuits (ASICs) , field-programmable gate arrays (FPGAs) , programmable logic devices (PLDs) , state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functions described throughout the present disclosure. Although only one processor is shown in FIGs. 1 and 2, it is understood that multiple processors can be included. Processor 102 may be a hardware device having one or more processing cores. Processor 102 may execute software. Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software modules, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. Software can include computer instructions written in an interpreted language, a compiled language, or machine code. Other techniques for instructing hardware are also permitted under the broad category of software.

[0063] Memory 104 can broadly include both memory (a. k. a, primary / system memory) and storage (a. k. a. secondary memory) . For example, memory 104 may include random-access memory (RAM) , read-only memory (ROM) , static RAM (SRAM) , dynamic RAM (DRAM) , ferro-electric RAM (FRAM) , electrically erasable programmable ROM (EEPROM) , compact disc read-only memory (CD-ROM) or other optical disk storage, hard disk drive (HDD) , such as magnetic disk storage or other magnetic storage devices, Flash drive, solid-state drive (SSD) , or any other medium that can be used to carry or store desired program code in the form of instructions that can be accessed and executed by processor 102. Broadly, memory 104 may be embodied by any computer-readable medium, such as a non-transitory computer-readable medium. Although only one memory is shown in FIGs. 1 and 2, it is understood that multiple memories can be included.

[0064] Interface 106 can broadly include a data interface and a communication interface that is configured to receive and transmit a signal in the process of receiving and transmitting information with other external network elements. For example, interface 106 may include input / output (I / O) devices and wired or wireless transceivers. Although only one memory is shown in FIGs. 1 and 2, it is understood that multiple interfaces can be included.

[0065] Processor 102, memory 104, and interface 106 may be implemented in various forms in system 100 or 200 for performing video coding functions. In some embodiments, processor 102, memory 104, and interface 106 of system 100 or 200 are implemented (e.g., integrated) on one or more system-on-chips (SoCs) . In one example, processor 102, memory 104, and interface 106 may be integrated into an application processor (AP) SoC that handles application processing in an operating system (OS) environment, including running video encoding and decoding applications. In another example, processor 102, memory 104, and interface 106 may be integrated into a specialized processor chip for video coding, such as a GPU or ISP chip dedicated to image and video processing in a real-time operating system (RTOS) .

[0066] As shown in FIG. 1, in encoding system 100, processor 102 may include one or more modules, such as an encoder 101. Although FIG. 1 shows that encoder 101 is within one processor 102, it is understood that encoder 101 may include one or more sub-modules that can be implemented on different processors located closely or remotely with each other. Encoder 101 (and any corresponding sub-modules or sub-units) can be hardware units (e.g., portions of an integrated circuit) of processor 102 designed for use with other components or software units implemented by processor 102 through executing at least part of a program, e.g., instructions. The instructions of the program may be stored on a computer-readable medium, such as memory 104, and when executed by processor 102, it may perform a process having one or more functions related to video encoding, such as picture partitioning, inter prediction, intra prediction, transformation, quantization, filtering, entropy encoding, etc., as described below in detail.

[0067] Similarly, as shown in FIG. 2, in decoding system 200, processor 102 may include one or more modules, such as a decoder 201. Although FIG. 2 shows that decoder 201 is within one processor 102, it is understood that decoder 201 may include one or more sub-modules that can be implemented on different processors located closely or remotely with each other. Decoder 201 (and any corresponding sub-modules or sub-units) can be hardware units (e.g., portions of an integrated circuit) of processor 102 designed for use with other components or software units implemented by processor 102 through executing at least part of a program, e.g., instructions. The instructions of the program may be stored on a computer-readable medium, such as memory 104, and when executed by processor 102, it may perform a process having one or more functions related to video decoding, such as entropy decoding, inverse quantization, inverse transformation, inter prediction, intra prediction, filtering, as described below in detail.

[0068] FIG. 3 illustrates a detailed block diagram of exemplary encoder 101 in encoding system 100 in FIG. 1, according to some embodiments of the present disclosure. As shown in FIG. 3, encoder 101 may include a partitioning module 302, an inter prediction module 304, an intra prediction module 306, a transform module 308, a quantization module 310, a dequantization module 312, an inverse transform module 314, a filter module 316, a buffer module 318, and an encoding module 320. It is understood that each of the elements shown in FIG. 3 is independently shown to represent characteristic functions different from each other in a video encoder, and it does not mean that each component is formed by the configuration unit of separate hardware or single software. That is, each element is included to be listed as an element for convenience of explanation, and at least two of the elements may be combined to form a single element, or one element may be divided into a plurality of elements to perform a function. It is also understood that some of the elements are not necessary elements that perform functions described in the present disclosure but instead may be optional elements for improving performance. It is further understood that these elements may be implemented using electronic hardware, firmware, computer software, or any combination thereof. Whether such elements are implemented as hardware, firmware, or software depends upon the particular application and design constraints imposed on encoder 101.

[0069] Partitioning module 302 may be configured to partition an input picture of a video into at least one processing unit. A picture can be a frame of the video or a field of the video. In some embodiments, a picture includes an array of luma samples in monochrome format, or an array of luma samples and two corresponding arrays of chroma samples. At this point, the processing unit may be a coding unit (CU) , prediction unit (PU) , or a transform unit (TU) . Partitioning module 302 may partition a picture into a combination of a plurality of coding units, prediction units, and transform units, and encode a picture by selecting a combination of a coding unit, a prediction unit, and a transform unit based on a predetermined criterion (e.g., a cost function) .

[0070] Similar to H. 265 / HEVC, H. 266 / VVC is a block-based hybrid spatial and temporal predictive coding scheme. As shown in FIG. 5, during encoding, an input picture 500 is first divided into square blocks - CTUs 502, by partitioning module 302. For example, CTUs 502 can be blocks of 128×128 pixels. As shown in FIG. 6, each CTU 502 in input picture 500 can be partitioned by partitioning module 302 into one or more CUs 602, which can be used for prediction and transformation. Unlike H. 265 / HEVC, in H. 266 / VVC, CUs 602 can be rectangular or square, and can be coded without further partitioning into prediction units or transform units. For example, as shown in FIG. 6, the partition of CTU 502 into CUs 602 may include quadtree splitting (indicated in solid lines) , binary tree splitting (indicated in dashed lines) , and ternary splitting (indicated in dash-dotted lines) . Each CU 602 can be as large as its root CTU 502 or be subdivisions of root CTU 502 as small as 4×4 blocks, according to some embodiments.

[0071] Each CU consists of one or more collocated coding blocks (CBs) corresponding to the color components of the video sequence. For example, consumer video typically takes the 4: 2: 0 chroma format, in which case each CU consists of a luma CB and two chroma CBs with one-quarter the samples of the luma CB. Prediction and transform coding are performed at the prediction block (PB) and transform block (TB) level, respectively. Each CB typically consists of a single PB, except in cases where further partitioning is indicated. For example, partitioning into multiple PBs may occur when an intra sub-partition (ISP) mode is selected for a CU, or when conditions are satisfied to enable implicit splitting. Each PB in turn typically consists of a single TB, except in cases where further partitioning is indicated. For example, partitioning into multiple TBs may occur when a sub-block transform (SBT) is selected.

[0072] Referring to FIG. 3, inter prediction module 304 may be configured to perform inter prediction on a prediction unit, and intra prediction module 306 may be configured to perform intra prediction on a prediction unit. It may be determined whether to use inter prediction or to perform intra prediction for the prediction unit, and determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc. ) according to each prediction method. At this point, a processing unit for performing prediction may be different from a processing unit for determining a prediction method and specific content. For example, a prediction method and a prediction mode may be determined in a prediction unit, and transform may be performed in a transform unit. Residual coefficients in a residual block between the generated prediction block and the original block may be input into transform module 308. In addition, prediction mode information, motion vector information, and the like used for prediction may be encoded by encoding module 320 together with the residual coefficients or quantization levels into the bitstream. It is understood that in certain encoding modes, an original block may be encoded as it is without generating a prediction block through prediction module 304 or 306. It is also understood that in certain encoding modes, prediction, transform, and / or quantization may be skipped as well.

[0073] In some embodiments, inter prediction module 304 may predict a prediction unit based on information from at least one picture among pictures before or after the current picture. Inter prediction module 304 may include sub-modules, such as a reference picture interpolation module, a motion prediction module, and a motion compensation module (not shown) . For example, the reference picture interpolation module may receive reference picture information from buffer module 318 and generate pixel information of an integer number of pixels from the reference picture. In the case of a luminance pixel, a discrete cosine transform (DCT) -based 8-tap interpolation filter with a varying filter coefficient may be used to generate pixel information of an integer number of pixels by the unit of 1 / 4 pixels. In the case of a color difference signal, a DCT-based 4-tap interpolation filter with a varying filter coefficient may be used to generate pixel information of an integer number of pixels by the unit of 1 / 8 pixels. The motion prediction module may perform motion prediction based on the reference picture interpolated by the reference picture interpolation part. Various methods, such as a full search-based block matching algorithm (FBMA) , a three-step search (TSS) , and a new three-step search algorithm (NTS) may be used as a method of calculating a motion vector. The motion vector may have a motion vector value of a unit of 1 / 2, 1 / 4, or 1 / 16 pixels or integer pel based on interpolated pixels. The motion prediction module may predict a current prediction unit by varying the motion prediction method. Various methods, such as a skip method, a merge method, an advanced motion vector prediction (AMVP) method, an intra-block copy method, and the like, may be used as the motion prediction method.

[0074] Still referring to FIG. 3, in some embodiments, intra prediction module 306 may generate a prediction unit based on information from reference pixels that have already been code in the current picture. Reference pixels may only be used when they are available. A reference pixel is available if it has already been coded, and it belongs to the same parallel coding structure as the current prediction unit. For example, reference pixels are not available if they belong to a different slice or tile than the slice or tile of the current prediction unit. When a reference pixel is unavailable, at least one reference pixel among available reference pixels may be used in place of unavailable reference pixel information. A single intra prediction method may be used to predict both the luma PB and the chroma PBs. Alternatively, one intra prediction method may be used to predict the luma PB and a different intra prediction method may be used to predict the chroma PBs. An intra prediction method may be selected from several different options. For example, the prediction method may be intra block copy, in which case the prediction unit is copied from a reference block of pixels located elsewhere in the current picture. Alternatively, intra prediction may be performed for the prediction unit based on reference pixels in a neighborhood of the prediction unit. The reference pixels may be located on the left side, above-left side, and above the prediction unit. The reference pixels may be wrapped around the left, above-left, and above of the prediction unit, directly adjacent to the prediction unit in a so-called reference “line” . Alternatively, the reference pixels may be contained in reference lines non-adjacent to the current block. The intra prediction method may have an angular prediction mode that uses reference pixel information according to a prediction direction, or it may have a non-angular prediction mode that does not use directional information when performing prediction. For chroma PBs, the intra prediction method may be selected from one of the above methods, or from cross-component methods that predict the chroma PB from collocated luma PB information.

[0075] The intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to the reference pixel according to a prediction mode. The type of the AIS filter applied to the reference pixel may vary. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing in the neighborhood of the current prediction unit. When a prediction mode of the current prediction unit is predicted using the mode information predicted from the neighboring prediction unit, if the intra prediction modes of the current prediction unit are the same as the prediction unit in the neighborhood, information indicating that the prediction modes of the current prediction unit are the same as the prediction unit in the neighborhood may be transmitted using predetermined flag information, and if the prediction modes of the current prediction unit and the prediction unit in the neighborhood are different from each other, prediction mode information of the current block may be encoded by extra flags information.

[0076] FIG. 7 illustrates a schematic visualization 700 of a current CU block 702 and spatially adjacent and non-adjacent reconstructed samples to the current block, according to some aspects of the present disclosure. In FIG. 7, the number 0, 1, 2, . . . indicates the pixel-line index in relation to current CU block 702.

[0077] In VVC, the intra prediction samples for the current block are generated using reference samples that are obtained from reconstructed samples of neighboring blocks. For a W ×H block, the reference samples are spatially adjacent to the current block, consisting of the vertical line of 2·H reconstructed samples to the left of the block and extending downwards, the top left reconstructed sample, and the horizontal line of 2·W reconstructed samples above the current block and extending to the right. This “L” shaped set of samples may be referred to in this disclosure as a “reference line. ” The reference line directly adjacent to current CU block 702 is shown as the line with index 0 in FIG. 7.

[0078] Similar to AVC and HEVC, VVC also supports angular intra prediction modes. Angular intra prediction is a directional intra prediction method. In comparison to HEVC, the angular intra prediction of VVC was modified by increasing the prediction accuracy and by an adaptation to the new partitioning framework. The former was realized by enlarging the number of angular prediction directions and by more accurate interpolation filters, while the latter was achieved by introducing wide-angular intra prediction modes. In VVC, the number of directional modes available for a given block is increased to 65 directions from the 33 HEVC directions. The angular modes 800 of VVC are depicted in FIG. 8.

[0079] The directions having even indices between 2 and 66 are equivalent to the directions of the angular modes supported in HEVC. For blocks of square shape, an equal number of angular modes is assigned to the top and left side of a block. On the other hand, intra blocks of rectangular shape, which are not present in HEVC, are a central part of VVC’s partitioning scheme with additional intra prediction directions assigned to the longer side of a block. The additional modes allocated along a longer side are called Wide-Angle Intra Prediction (WAIP) modes, since they correspond to prediction directions with angles greater than 45° relative to the horizontal or vertical mode. A WAIP mode for a given mode index is defined by mapping the original directional mode to a mode that has the opposite direction with an index offset equal to one, as shown in FIG. 8. For a given rectangular block, the aspect ratio, i.e., the ratio of width to height, is used to determine which angular modes are to be replaced by the corresponding wide-angular modes.

[0080] For square-shaped blocks in VVC, each pair of predicted samples that are horizontally or vertically adjacent is predicted from a pair of adjacent reference samples. To the contrary, WAIP extends the angular range of directional prediction beyond 45°, and therefore, for a coding block predicted with a WAIP mode, adjacent predicted samples may be predicted from non-adjacent reference samples.

[0081] For regular angular intra prediction, the prediction samples are predicted from the directly adjacent line of neighboring samples marked as line 0 in FIG. 7. Alternatively, non-adjacent lines may be used in a method referred to as multiple reference line (MRL) prediction. In addition to the directly adjacent line of neighboring samples, MRL signals one of the two non-adjacent reference lines (line 1 or line 2 in FIG. 7) to be used for angular intra prediction in VVC. For MRL in ECM, a non-adjacent reference line even further away may be used.

[0082] FIG. 9 illustrates an example visualization of an inter prediction mode 900, according to some aspects of the present disclosure.

[0083] Referring to FIG. 9, for inter-coded CUs (also referred to as “inter CUs” ) , reconstructed samples in temporal reference frames are used to predict the current block and the inter prediction mode is signaled once for the entire CU. Inter prediction exploits the temporal correlation between pictures to derive a motion-compensated prediction (MCP) for a block of image samples.

[0084] A simple concept of motion-compensated prediction is described here assuming a translational motion model. Although the actual motion within a video sequence may be complex, a translational motion model is surprisingly effective because the flexible hierarchical partitioning of CTUs into CUs can permit adaptation to complex motion by choosing small CUs, while still coding simple motion efficiently with large CUs.

[0085] In a simple “uni-predicted” mode of inter prediction, a current CU is predicted by a single corresponding size block from a previously decoded picture as illustrated in FIG. 9. Assuming a translational motion model, the position of the block relative to the current CU is indicated by a motion vector (Δx, Δy) , where Δx and Δy specify the horizontal and the vertical displacements relative to the position of the current block along horizontal and vertical directions, respectively. The displacements may be of fractional sample precision, in which case interpolation is used to derive the prediction samples. The previously decoded picture used by the inter CU is called a reference picture. Previously decoded pictures are stored and maintained in a reference picture list. The reference picture used by the current CU is identified by a reference index Δt in the reference picture list. These inter prediction parameters, e.g., motion vectors and reference indices, may be referred to as motion data, or more generally as side information.

[0086] Due to occlusion effects, an inter CU may not always be well predicted by reference pictures that occur temporally prior in the video sequence. However, the order in which pictures are coded (the decoding picture order) is not required to be the same as the order the pictures occur in the video sequence (the displayed picture order) . The displayed picture order is determined by labeling each picture with a Picture Order Count (POC) , while the decoding picture order is decided by the encoder to best trade off desired latency and coding efficiency. For example, a typical strategy is to use a hierarchical Group Of Pictures (GOP) structure of 8, 16, or 32 consecutive frames. This allows an inter CU more flexibility to be predicted from pictures before or after the current picture in displayed picture order.

[0087] Video sequence effects such as cross fading can also be accounted for by allowing “bi-prediction, ” in which the inter CU is predicted from two reference blocks identified from two sets of motion data (Δx0, Δy0, Δt0) and (Δx1, Δy1, Δt1) . The reference pictures that can be used in bi-prediction are stored in two separate lists, namely list 0 and list 1. The final prediction is determined by a weighted averaging between the two reference blocks.

[0088] VVC employs many coding tools that improve upon the basic inter prediction scheme described above. For example, the cost of encoding the motion vectors to the bitstream may be significantly reduced by signaling them as motion vector differences (MVDs) relative to motion vector predictors. Alternatively, a merge flag may signal that the motion vectors are inherited from a previously decoded inter CU. Some tools assume more complex motion models. For example, in translational motion compensation it is assumed that the same relative motion applies to each sample of the inter CU. In the affine mode, each sample of the inter CU has a relative motion determined from an affine projected plane through three motion vectors at the corners of the CU.

[0089] As shown in FIG. 3, the prediction unit generated by prediction module 304 or 306 is subtracted from the original block, resulting in a residual block (also referred to herein as the “residual” ) , of difference values between the prediction unit and the original block. The generated residual block may be input into transform module 308. Additional details of residuals and transforms for video coding will now be provided.

[0090] In hybrid video coding systems, redundancy in the video signal is first exploited by applying inter or intra prediction tools for each CU. The difference between the original samples of a CU and the prediction block for that CU is commonly referred to as the residual. Even after prediction, the residual may still be highly spatially correlated. Although conditional entropy coding can capture some spatial dependency between adjacent samples, it is computationally impractical to form entropy coding statistical models that can fully exploit spatial correlation in the residual. In contrast, transform coding is a practical and effective method for spatially decorrelating the residual.

[0091] For example, transform module 308 may transform the residual using an integerized version of the two-dimensional discrete cosine transform (DCT) , which may be applied separably in the horizontal and vertical directions. For an MxN block of residual samples (where M is the width of the block and N is the height of the block) , transform module 308 may obtain transform coefficients by applying an MxM DCT to each row, resulting in intermediate transform coefficients, and then applying an NxN DCT to each column of intermediate transform coefficients.

[0092] Transforms are desirable to use when they achieve energy compaction, e.g., when a large proportion of the residual’s energy can be captured with fewer transform coefficients than the original samples. If energy compaction is achieved, then the transform can produce coding gain. Other desirable properties of transforms are that they be reversible and orthogonal. Reversibility implies that the residual can be losslessly recovered by the inverse transform if no quantization was performed at the encoder. Orthogonality means that transform vectors form a basis, and that the basis vectors of the transform are orthogonal to each other and of unit length. The practical benefit of orthogonality is that quantization in the transformed domain can be performed independently across the coefficients. Orthogonality also means the transform vectors span the space of the input samples. This means any input vector (e.g., any combination of values of the input samples) can be represented by a weighted sum of the transform vectors. For a transform to be spanning, a necessary condition is that there must at least be as many transform vectors as the dimensionality of the input space, or in other words, the number of transform coefficients output is at least equal to the number of input samples. In the case of a basis, the number of transform coefficients is exactly equal to the number of input samples. Then, if the number of input samples is N, an orthogonal transform can be represented by multiplication with an NxN matrix.

[0093] The discrete cosine transform (DCT) has all the above properties and is used extensively in video coding. The DCT is applied to video coding by applying a one-dimensional transform to the residual in the horizontal and vertical directions separately. That is, for an MxN residual block of samples, the DCT may be performed by applying an MxM DCT to each column of M residual samples, producing an intermediate block of transformed coefficients, then applying an NxN DCT to each row of N intermediate transformed coefficients, finally producing the two-dimensional DCT coefficients.

[0094] While a separable transform applies one-dimensional transforms in the horizontal and vertical directions, separately, a two-dimensional non-separable transform is applied directly to a block of input samples. Then, for a spanning non-separable transform, if the block of input samples is an MxN residual, the transform will also output an MxN block of transform coefficients, which may be represented by a matrix implementation of (MxN) x (MxN) multiplications.

[0095] To derive a non-separable transform, which produces coding gain for a particular directional feature, the transform may be learned. For example, a representative set of residual blocks corresponding to the directional feature of interest may be grouped, and then the Karhunen-Loeve Transform (KLT) may be calculated from the covariance matrix of the set of residual blocks. The process may be repeated over K different sets of residual blocks. Then, in this example an overall transform kernel is derived with dimensionality (MxN) x (MxN) xK.

[0096] There are two problems with spanning non-separable transforms as described in this section. Firstly, the computation complexity is high. Because non-separable transforms are typically learned, they cannot generally be factorized. The matrix implementation of the spanning non-separable transform in the example above results in complexity of (MxN) multiplications per sample. The second problem is that the transform kernel (s) 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 (MxN) x (MxN) xK weights. This kernel can only be applied to residual blocks with size MxN. To allow the application of non-separable transform to multiple block sizes, a transform kernel must be learned for each discrete block size.

[0097] FIG. 10A illustrates a low-frequency non-separable transform (LFNST) kernel 1000 for 4xN, Nx4, and 8x8 block sizes in VVC, according to some embodiments of the present disclosure. FIG. 10B illustrates an LFNST 1001 kernel for 8xN and Nx8 block sizes in VVC, according to some embodiments of the present disclosure. FIGs. 10A and 10B will be described together.

[0098] Referring to FIGs. 10A and 10B, in VVC an LFNST tool was introduced with several modifications to address the problems described above for spanning non-separable transforms.

[0099] Firstly, while the LFNST tool applies to a wide range of block sizes, only two LFNST kernels are defined. For blocks with size 4xN, Nx4 (for N≥4) , or 8x8, a smaller LFNST kernel is applied. For all larger block sizes (e.g., larger than 8x8) a larger LFNST kernel is applied. FIGs. 10A and 10B show the sample positions on which the LFNST acts. For example, from encoder perspective, and for 4xN, Nx4, or 8x8 block sizes, the top left 4x4 sample positions (indicated by the shaded regions in FIG. 10A are transformed by the small LFNST) . The remaining sample positions (indicated by the white regions in FIG. 10A) are ignored, or “zeroed out” . From the decoder perspective, the inverse LFNST is applied to produce the top-left 4x4 samples, while the remaining samples are filled in as zeros. A similar policy is applied for larger block sizes, where the LFNST acts on the 3 top-left 4x4 blocks of sample positions (indicated by the shaded regions in FIG 10B) . The remaining sample positions are zeroed out.

[0100] Because of the “zero-out” policy, the LFNST is substantially reduced in size compared to a full-size transform applying to all sample positions. However, it is inherently lossy and cannot restore the values at sample positions ignored by the LFNST. Such loss would be too large for the LFNST tool to be useful if it were applied directly to the residual samples. However, the LFNST is called a secondary transform because it is applied after the separable DCT at the encoder has already been performed. In other words, the DCT is a primary transform, producing primary transform coefficients, and the LFNST is then a secondary transform acting on these primary transform coefficients to produce secondary transform coefficients. In this disclosure the left-most sample positions in a block of primary transform coefficients correspond to the horizontal low frequencies of the DCT, while the top-most sample positions correspond to the vertical low frequencies of the DCT. By preferentially transforming, and reconstructing at the decoder, the top-left sample positions, the LFNST can reconstruct the low-frequency information from the original residual. As described previously, transforms produce coding gain due to their energy compaction properties, and it has been shown empirically that the variance (energy) of camera captured image and video signals is predominantly concentrated in the low frequency DCT coefficients. Therefore, while “zero out” prevents the LFNST from reconstructing an arbitrary residual block losslessly, in practice the loss can be minimal for most classes of image and video signals.

[0101] A second modification is that for both the small and large LFNST kernels, the transform applied is not a spanning transform. From the encoder perspective, the number of output (secondary transform) coefficients is less than the number of input (primary transform) coefficients. For example, the smaller LFNST kernel takes as input 4x4=16 primary transform coefficients, but produces only 8 output secondary transform coefficients. The larger LFNST kernel takes 3x4x4=48 input primary transform coefficients and outputs 8 secondary transform coefficients. The use of a non-spanning transform introduces further reconstruction loss. However, this loss can be traded off in a controlled manner against the complexity reduction achieved. A spanning non-separable transform may first be designed by the KLT method described above. By following this method, the basis vectors of the transform correspond to eigenvectors of the covariance matrix calculated from a representative set of residual blocks. These eigenvectors may be ranked in importance by their corresponding eigenvalues, with the most important eigenvectors selected to construct a non-spanning non-separable transform. For example, the 8 eigenvectors with the largest eigenvalues may be selected to form a non-spanning transform for the smaller LFNST kernel.

[0102] In summary the two modifications described above significantly reduce the complexity of the LFNST kernel compared to the spanning non-separable transform. For smaller blocks, the use of the smaller LFNST kernel reduces the potential complexity from (4xN) x (4xN) multiplications per transform block (for N≥4) , down to 16x8 multiplications. For larger blocks, the use of the larger LFNST kernel reduces the potential complexity from (8xN) x (8xN) multiplications per transform block (for N≥8) , down to 48x8 multiplications.

[0103] The LFNST kernels do not consist of only one transform matrix. To achieve better coding gain over a variety of image and video signals, multiple transform matrices are learned. The number of different transform matrices is the product of the third and fourth dimensions of the LFNST kernel: the smaller LFNST kernel has dimensionality 16x8x2x4, and the larger LFNST kernel has dimensionality 48x8x2x4. The LFNST kernel is expressed with two additional dimensions because the particular transform matrix for a transform block is selected by a mixture of explicit signaling and implicit selection.

[0104] Explicit signaling is performed by an LFNST index signaled in the bitstream that may take the value 0, 1, or 2, where 0 indicates that the LFNST is not used for the transform block, while values 1 or 2 indicate selection in the third dimension of the LFNST kernel. The drawbacks of potential reconstruction loss due to the zero out and non-spanning simplifications are ameliorated by the explicit signaling mechanism. While the use of LFNST would result in excessive reconstruction loss for a transform block, the LFNST tool can be disabled by signaling an LFNST index of 0.

[0105] Implicit selection is enabled by restricting the LFNST only to coding units which use intra prediction. Intra prediction produces a prediction block for the coding unit from adjacent neighboring reference samples to the top and left of the current block. The particular method of constructing the prediction block is signaled in the bitstream by an intra prediction mode. Simple methods of intra prediction include taking the average of the reference samples ( “DC” mode) , or constructing an affine interpolation between some reference samples ( “planar” mode) . However, the majority of the intra prediction modes are reserved for signaling intra angular directions, where the prediction block is constructed by assuming the reference sample values are replicated along a particular direction. When an intra angular direction is used, it may be a strong hint for the directional characteristics of the residual block. Implicit selection of an LFNST transform is performed by mapping the intra prediction mode to one of 4 possible values of a “transform set index, ” which is used to index into the fourth dimension of the LFNST kernel. The mapping used in VVC is shown in Table 1. Table 1: Mapping from intra prediction mode to LFNST transform set index

[0106] Intra prediction modes 0 and 1 correspond to intra prediction planar mode and intra DC prediction mode respectively. These modes are handled as a special case by mapping to the transform set index 0. Otherwise, the remaining intra prediction modes correspond to intra angular directions which are shown in FIG 8. Intra prediction mode 2 corresponds to a diagonal intra angular prediction from the bottom-left. Increasing intra prediction mode numbering corresponds to clockwise rotation of the intra prediction direction, with intra prediction mode 34 corresponding to diagonal intra angular prediction from the top-left, and intra prediction mode 66 corresponding to diagonal intra angular prediction from the top-right.

[0107] For intra prediction modes greater than 34, which correspond to intra angular prediction directions clockwise of diagonal from the top-left, the selected LFNST transform matrix is applied in a transpose manner for the primary transform coefficients. In one implementation, this may be performed by scanning the primary transform coefficients in a transpose direction before applying the LFNST transform. For example, from encoder perspective if a current block is predicted by intra prediction mode 2, then the primary transform coefficients may be rearranged from their two-dimensional pattern in the block to a one-dimensional vector by a row-major scan, before applying a selected LFNST transform matrix. Then, for this example, if the current block is instead predicted by intra prediction mode 66 and the same signaled LFNST index is used, the primary transform coefficients would instead by rearranged to a one-dimensional vector by column-major scan before applying the same LFNST transform matrix. In another implementation, the same current block with intra prediction mode 66 can be equivalently transformed by still performing a row-major scan over the primary transform coefficients, but instead rearranging the rows of the transform matrix.

[0108] More generally, the application of the LFNST transform matrix may be described as follows. Let the primary transform coefficient located at row y, column x be denoted as px, y, and let the LFNST transform matrix T have dimensions A×B, where A is the number of primary transform coefficients that have not been zeroed out, and B is the number of secondary transform coefficients. For the purposes of this disclosure, T is defined as the matrix that performs the inverse LFNST transform in the decoder. However, as the LFNST is designed as an orthonormal transform, the forward LFNST transform is performed by the transpose of the same matrix, e.g., TT. Then, for intra prediction modes <= 34, an arbitrary scan order through the primary transform coefficients to construct a one-dimensional vector P may be defined by formula (1) . where is a transform coefficient corresponding to position n along the x direction and m  along the y direction.

[0109] For intra prediction modes greater than 34, P is instead constructed by the transposed scan order defined by formula (2) .

[0110] The forward LFNST transform may be performed by the matrix multiplication S=TTP, where S is a resulting one-dimensional vector of secondary transform coefficients. In practice, the transform is implemented as S=n (TTP) since all multiplications are implemented in integer arithmetic, and n (·) represents normalization operations necessary for the integerized LFNST to approximate the ideal transform expressed in floating point. Secondary transform coefficients are written back to the transform block in a forward diagonal scan order. Following the same notation as introduced above, and the convention that the (0, 0) location corresponds to “low frequency” or “DC” in the conventional DCT, the scan order is defined according to formula (3) . S= {s0, 0, s0, 1, s1, 0, s0, 2, s1, 1, s2, 0, s0, 3, s1, 2, s2, 1, s3, 0, …}   (3) .

[0111] At the decoder, the inverse LFNST transform may be performed by the matrix multiplication P=n (TS) .

[0112] Transposition of the primary transform coefficients for intra prediction modes greater than 34 allows the same LFNST transform matrix to be shared for intra angular prediction directions that are symmetric.

[0113] FIG. 11A illustrates an LFNST kernel 1100 for 4xN and Nx4 block sizes in ECM, according to some embodiments of the present disclosure. FIG. 11B illustrates an LFNST kernel 1101 for 8xN and Nx8 block sizes in ECM, according to some embodiments of the present disclosure. FIG. 11C illustrates an LFNST kernel 1103 for 16x16 and larger block sizes in ECM, according to some embodiments of the present disclosure. FIGs. 11A-11C will be described together.

[0114] Referring to FIGs. 11A-11C, the LFNST tool has been further extended in ECM. The LFNST tool in ECM relaxes some of the complexity reductions imposed on the original LFNST tool adopted in VVC to achieve enhanced coding gain.

[0115] ECM has three LFNST kernels. Like the LFNST tool in VVC, in most cases a significant portion of the transform block is zeroed out. The shaded regions in FIGs. 11A-11C indicate the primary transform coefficient positions on which the LFNST in ECM acts, while the white regions indicate which transform coefficient positions are zeroed out. For blocks with size 4xN or Nx4 (where N≥4) , a small LFNST kernel is used on the top left 4x4 primary transform coefficients. For blocks with size 8xN or Nx8 (where N≥8) , a medium LFNST kernel is used on the 4 top-left 4x4 blocks of primary transform coefficients. For 16x16 or larger blocks, a large LFNST kernel is used on the 6 top-left 4x4 blocks of primary transform coefficients.

[0116] The size of the LFNST kernels in ECM are: 16x16x3x35 for the small LFNST kernel, 64x32x3x35 for the medium LFNST kernel, and 96x32x3x35 for the large LFNST kernel. Compared to the LFNST tool in VVC, the range of signaled LFNST indices is increased from 2 to 3, and the number of LFNST transform sets is increased from 4 to 35. The mapping from intra prediction mode to LFNST transform set index is shown in Table 2. Like the LFNST tool in VVC, when the intra prediction mode is greater than 34 then the primary transform coefficients are transposed. Table 2: Mapping from intra prediction mode to LFNST transform set index in ECM

[0117] As seen above, the use of non-separable secondary transform allows significant complexity reductions due to the use of zero-out on selected primary transform coefficient regions. However, further coding gain was found possible when applying a non-separable transform directly to the residual. This approach is adopted into ECM as the non-separable primary transform (NSPT) . In ECM, the NSPT is applied to a distinct set of pre-defined block sizes. For these block sizes, the NSPT reuses the signaling mechanism of the LFNST tool and is used instead of the combination of the DCT (primary) and LFNST that would otherwise be applied. As with the LFNST, the NSPT kernels are trained, with a selection of an appropriate matrix for a particular block guided by both a signaled index and implicit selection through the intra prediction mode.

[0118] The NSPT was initially proposed for 4 block sizes. For 4x4 blocks, an NSPT kernel with dimensions 16x16x3x35 is used. For 4x8 and 8x4 blocks, NSPT kernels with dimension 32x20x3x35 are used. For 8x8 blocks, an NSPT kernel with dimensions 64x32x3x35 is used. The NSPT was later extended to block sizes 4x16, 16x4, 8x16, 16x8, 4x32, 32x4, 8x32, and 32x8. For block sizes 4x16 and 16x4, NPST kernels with dimension 64x24x3x35 are used. For block sizes 8x16 and 16x8, NPST kernels with dimension 128x40x3x35 are used. For block sizes 4x32 and 32x4, NPST kernels with dimension 128x20x3x35 are used. For block sizes 8x32 and 32x8, NPST kernels with dimension 256x24x3x35 are used.

[0119] The present disclosure defines the term “zero-out” as a reduction in the input dimension of the transform kernel, which in the notation of the transform kernel dimensions of this disclosure corresponds to the first dimension. A reduction in the input dimension of the forward transform is equivalent to a reduction of the support for the transform. For example, with the LFNST zero-out corresponds to a reduction of the number of DCT primary transform coefficients that the forward LFNST acts on to produce secondary transform coefficients. In ECM, the NSPT acts directly on the residual coefficients, and the size of each NSPT kernel’s first dimension is equal to the number of samples in the block. In the ECM description of the NSPT tool, the term “zero-out” is instead defined as a reduction in the output dimension of the transform kernel, which in the notation of transform kernel dimensions in this disclosure is the second dimension. Such definition gives an example of the term “zero-out” being used more generally. However, for consistency and clarity within this disclosure we limit the definition of “zero-out” to describing a reduction in the input dimension of a transform kernel, while referring to a reduction of the output dimension as a non-spanning, or lossy transform.

[0120] As with the LFNST, an NSPT index is signaled in the bitstream that may take the value 0, 1, 2, or 3, where 0 indicates that the NSPT is not used for the transform block, while values 1-3 indicate selection within the corresponding NSPT kernel along the third dimension. As with the LFNST, the NSPT is only allowed for intra-coded CUs. Selection along the fourth dimension of the NSPT kernel is determined by mapping from the intra prediction mode to a transform set index as shown in Table 3, in the same manner as for the extended LFNST in ECM. As with the LFNST, when the intra prediction mode is greater than 34 (which means the intra angular direction is clockwise of the diagonal top-left direction) , the input to the transform is transposed. However, for the NSPT the input is composed of residual coefficients, not primary transform coefficients. Table 3: Mapping from intra prediction mode to NSPT transform set index in ECM

[0121] For an MxN shape residual block, and when the intra prediction mode is less than or equal to 34, let the residual sample located at row y, column x be denoted rx, y, and let a NSPT transform matrix T selected from the NSPT kernel for MxN shaped blocks have dimensions A×B, where A=M×N is the number of residual samples in the block, and B is the number of primary transform coefficients. Then, an arbitrary scan order through the residual samples r to construct a one-dimensional vector R may be defined by formula (4) .

[0122] For intra prediction modes greater than 34, R is instead constructed by the transposed scan order defined by formula (5) .

[0123] Additionally, when the intra prediction mode is greater than 34, the NSPT transform matrix T is selected instead from the NSPT kernel for NxM shaped blocks. For square block shapes, this is the same kernel, so T is the same transform matrix. However, in the case of non-square block sizes (e.g., 4x8, 8x4, etc. ) , the transform matrix is selected from a different NSPT kernel.

[0124] The forward NSPT transform may be performed by P=n (TTR) , where P is a resulting one-dimensional vector of NSPT primary transform coefficients, and n () denotes normalization operations necessary for the integerised NSPT to approximate the ideal transform expressed in floating point. Transform coefficients p are written back to the transform block in a forward diagonal scan order. Following the same notation as introduced above, and the convention that the (0, 0) location corresponds to “low frequency” or “DC” in the conventional DCT, the scan order may be defined according to formula (6) . P={p0, 0, p0, 1, p1, 0, p0, 2, p1, 1, p2, 0, p0, 3, p1, 2, p2, 1, p3, 0, …} (6) .

[0125] At the decoder, the inverse NSPT transform may be performed by the matrix multiplication R=n (TP) .

[0126] FIG. 12 illustrates an example transform coefficient scanning order 1200, according to some embodiments of the present disclosure.

[0127] Referring to FIG. 12, as at most only one of the LFNST or NSPT tools can be enabled for a particular block at a time, with the tool allowed being dependent on the block size, the same signaling mechanism is used for the LFNST and NSPT index syntax elements. This shared syntax element may be referred to as nst_idx. The semantics of whether this index corresponds to the LFNST or the NSPT are determined by the block size.

[0128] In ECM-10.0, the nst_idx is signaled conditional on the position of the last significant transform coefficient. The relation between the last significant position and the number of transform coefficients is illustrated by an example for an 8x8 transform block (TB) illustrated in FIG. 12. The last significant position is signaled by zero-indexed x and y coordinates, while the scan order through the coefficients is a hierarchical diagonal scan indicated by the enumerated boxes. The first level of the hierarchical diagonal scan is over 4x4 sub-blocks, while the second level is over coefficient positions within the sub-block. For example, if the last significant position is at x=3 and y=2, then the last significant coefficient corresponds to position 14 in the hierarchical diagonal scan order. This indicates that there are at most 15 non-zero coefficients corresponding to positions 0 through 14 inclusive in the hierarchical diagonal scan order. Let the number of potentially non-zero coefficients be N, e.g., N=15 in this example.

[0129] As shown in Table 4, the block size of the TB indicates not only whether the LFNST or NSPT tool is used, but also the dimensions of the kernel that is used. Therefore, when the last significant position is decoded, if N is greater than the number of non-separable transform coefficients that would be produced for the current TB as looked up from Table 4, it is not possible for the transform coefficients to have been produced by one of the non-separable transform tools. Then nst_idx is not signaled and implicitly inferred as 0. If N is less than or equal to the number of non-separable transform coefficients, nst_idx may be signaled depending on other conditions. Table 4: Block size mapping to non-separable transform kernel

[0130] In ECM-13.0, the non-separable kernel is implicitly selected based on the block size of the transform block, as shown above in Table 4. Therefore, the selection of the non-separable transform is influenced by just three factors: the block size of the TB, the value of the signalled nst_idx, and the value of the intra prediction mode (IPM) .

[0131] Note that in the present disclosure, the term “intra prediction mode” is referred to as a numeric value that indicates the direction (including non-directional DC and planar modes) of conventional angular intra prediction. In contrast, the term “intra prediction method” is referred to indicate the overall intra prediction tool that is selected, one of which is conventional angular intra prediction. Some tools such as matrix-based intra prediction (MIP) were already introduced in VVC but modified further in ECM, while some intra prediction tools are added in ECM. For example, while the DIMD process described above may be re-used by other tools, DIMD is itself a separate intra prediction method. Other intra prediction tools available in ECM include template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , extrapolation filter-based intra prediction (EIP) .

[0132] To improve the diversity of transforms available for selection, it was proposed to add further NSPT kernels. Kernels are only added for some block sizes, e.g., 4x4, 4x8, 8x4 4x16, 16x4, 8x8, 8x16, and 16x8. The additional kernels have the same kernel dimension as the original kernels for the same block size. As shown below, Table 5 summarises the full set of selectable non-separable transform kernels, including the original non-separable transform kernels. For the purposes of reference within the present disclosure, the original set of non-separable transform kernels are labeled Ki while the additional kernels are labeled Li. Then, the process of kernel selection is modified with an additional step. For a current transform block, the block size may either uniquely select a kernel Ki for some value of i corresponding to the block size, or correspond to a choice between two kernels Ki and Li. If there is a choice between two kernels, then a selection is implicitly made by the intra prediction method of the current TB. If the intra prediction method is DIMD, TIMD, SGPM, MIP, or EIP, the kernel Li is selected. Otherwise (for other intra prediction methods such as conventional angular intra prediction) , the kernel Ki is selected. That is, non-separable kernel selection depends on both the block size and the intra prediction method. Table 5. Non-separable transform kernels

[0133] The arrangement of the kernels and their dimensions presented in Table 5 are shown for clarity; however, it may be understood that the equivalent algorithm is possible with different kernel arrangements. For example, for a TB of size 4x4, Table 5 indicates that there is a choice between two kernels K0 and L0, each having the same dimensions 16x16x3x35. In other arrangements, the TB of size 4x4 may correspond to a single kernel with dimensions 16x16x3x35x2, or a single kernel with dimensions 16x16x210. The key point is that the block size, intra prediction method, nst_idx, and intra prediction mode are used to select the same 16x16 set of non-separable transform weights.

[0134] The total number of weights required for the original set of non-separable kernels (Ki) is 4166400. The total number of weights required for all the kernels shown in Table 5 is 5940480.

[0135] FIG. 13 illustrates a diagram 1300 of a decoder-side intra mode derivation (DIMD) method for ECM, according to some embodiments of the present disclosure.

[0136] Referring to FIG. 13, in DIMD, an intra prediction mode (or multiple intra prediction modes) is derived implicitly from an L-shaped template 1304 (referred to hereinafter as “template 1304” ) of reconstructed samples neighbouring the current CU 1302. The template 1304 has a size of a 3-sample width. Decoder 201 moves a 3x3 gradient analyzing window 1306 over the template 1304. At each position, a local gradient is calculated by applying Sobel filters. Assuming the 3x3 set of samples at one position in the template 1304 is Tk, the Sobel filter can be described according to formula (7) .

[0137] Then, the horizontal gradient Gk, x and the vertical gradient Gk, y are estimated by taking the dot products shown below in formulas (8) and (9) , respectively. Gk, x=Tk·Mx         (8) , and Gk, y=Tk·My        (9) .

[0138] The local gradient’s magnitude Gk and the local gradient’s angle θk may be estimated according to formulas (10) and (11) , respectively. Gk=|Gk, x|+|Gk, y| (10) , and

[0139] The local gradient’s angle θk can be associated with an intra angular prediction direction IPMk. For example, an angle of 0 degrees corresponds with the horizontal intra prediction mode 18. In practice, IPMk may be estimated directly by decoder 201 from Gk, x and Gk, y with a fast implementation such as a look-up table. At the beginning of the DIMD method, an empty histogram H (populated with zeroes in each entry) is initialized with a size equal to the number of intra prediction modes. As the DIMD method performs gradient analysis over each local window, the histogram H is updated according to equation (12) . H[IPMk] += Gk   (12) .

[0140] Thus, each local gradient analysis “votes” for an intra prediction mode. At the conclusion of the DIMD method, the intra prediction mode with the highest count in H may be selected as the single representative intra prediction mode for the current CU. Alternatively, multiple intra prediction modes may also be obtained from H in order of the highest counts.

[0141] FIG. 14 illustrates an example gradient analysis 1400 on a reference block, according to some embodiments of the present disclosure.

[0142] In VVC, the non-separable transform tool LFNST was only used in intra prediction. However, in ECM the non-separable transforms are also applied to inter prediction. Since in inter prediction there is no intra prediction mode, the IPM must again be derived. In contrast with intra prediction, which applies DIMD on spatially neighbouring template of the current CU, for inter prediction a “DIMD-like” process is applied over the reference block of the inter CU.

[0143] As shown in FIG. 14, a 3x3 gradient analysing window is moved over the reference block. As with DIMD, at each position a local gradient is calculated by applying Sobel filters on the 3x3 window. The local gradients are accumulated in a histogram, with the gradient corresponding to the highest count in the histogram being used to select the intra prediction mode. The window may be moved in increments of one sample, thus covering every position within the reference block, or in larger increments of N samples at a time. This allows for faster implementation of the histogram calculation, which may be traded off against acceptable accuracy of the gradient estimation.

[0144] Further coding gain from non-separable transforms is demonstrated in intra prediction by introducing more kernels; however, this is only applied to some block sizes and comes at the cost of additional storage requirements.

[0145] To overcome these and other challenges, the present disclosure provides technique (s) sthat enables the use of additional kernels for more block sizes. Moreover, using the present technique (s) , these kernels may be used for non-separable transforms applied to inter prediction.

[0146] In some implementations, additional kernels are proposed for intra prediction.

[0147] For example, in one arrangement, additional non-separable transform kernels are introduced for every block size. That is, for any block size where non-separable transforms are allowed, there is a pair of non-separable transform kernels Li and Ki. The proposed non-separable transform kernels are shown in Table 6. The total number of weights required for all the kernels shown in Table 6 is 8332800. Then, if the intra prediction method is DIMD, TIMD, SGPM, MIP, or EIP, the kernel Li is selected. Otherwise (for other intra prediction methods such as conventional angular intra prediction) , the kernel Ki is selected.

[0148] Note that selecting between the kernels based on whether the intra prediction method is one of DIMD, TIMD, SGPM, MIP or EIP is provided as an example. In other arrangements, another set of intra prediction methods may instead be used as the condition. Table 6. Non-separable transform kernels

[0149] In another arrangement, additional non-separable transform kernels are introduced for every block size that selects a non-separable primary transform. That is, for any block size where an NSPT is selected, there is always a pair of non-separable transform kernels Li and Ki. For block sizes where an LFNST is selected, only the original transform kernels K12, K13 or K14 are available. The proposed non-separable transform kernels are shown in Table 7. The total number of weights required for all the kernels shown in Table 7 is 7768320. Table 7. Non-separable transform kernels

[0150] In another arrangement, additional non-separable transform kernels are introduced for block sizes corresponding to small non-separable transform kernels. That is, additional diversity in the non-separable transforms is introduced but traded off against the storage requirements of the non-separable transform kernels. In one example, for block sizes 8x16, 16x8, 8x32, and 32x8, only the corresponding original transform kernels K6, K7, K10 and K11 are available, while for all other block sizes a pair of non-separable transform kernels Li and Ki are available. The proposed non-separable transform kernels for this example are shown in Table 8. The total number of weights required for all the kernels shown in Table 8 is 5967360. Table 8. Non-separable transform kernels

[0151] In another example, for block sizes 8x16, 16x8, 4x32, 32x4, 8x32, 32x8, and 16x16 or larger, only the corresponding original transform kernels K6, K7, K8, K9, K10, K11 and K14 are available, while for all other block sizes a pair of non-separable transform kernels Li and Ki are available. The proposed non-separable transform kernels for this example are shown in Table 9. The total number of weights required for all the kernels shown in Table 9 is 5107200. Table 9. Non-separable transform kernels

[0152] In some implementations, the storage requirement of the non-separable transform kernels is reduced by reducing the number of transform coefficients for some of the kernels. The reduction is applied to kernels with the largest storage requirement. For example, compared to the arrangement of non-separable transform kernels described in Table 6, the kernels L6, K6, L7 and K7 are reduced in dimension from 128x40x3x35 to 128x32x3x35, and the kernels L10, K10, L11 and K11 are reduced in dimension from 256x24x3x35 to 256x20x3x35. This reduces the total number of weights from 8332800 to 7472640. The proposed non-separable transform kernels for this example are shown in Table 10.

[0153] Similar reductions to the number of transform coefficients can be applied to the kernels with the largest storage requirement in other arrangements of non-separable transform kernels such as described in Tables 5, 7, 8 and 9. Table 10. Non-separable transform kernels

[0154] In some implementations, methods are proposed for utilizing the additional non-separable transform kernels in inter prediction. This solution may be combined with any of the arrangements of additional non-separable transform kernels described above, such as Tables 5, 6, 7, 8, 9 or 10.

[0155] In one arrangement, the block size of an inter predicted transform block is used to select either a single kernel Ki or a pair of kernels Li and Ki from the set of non-separable transform kernels already stored for intra prediction as described above in any of the arrangements of Tables 5, 6, 7, 8, 9, or 10. For a fixed block size and an associated i, each of the kernels has the same dimensions AxBxCxD, where A is the number of primary transform or residual coefficients, B is the number of non-separable transform coefficients, C is the number of indexed sets, and D is the number of transform sets.

[0156] In the case where a pair of kernels are available from the stored non-separable transform kernels, then the pair of kernels Li and Ki may be concatenated along their third dimension to form a single kernel with dimension AxBx2CxD. The hyper-vectors stacked along the third dimension may be reordered in a predetermined manner so that the most useful vectors are placed first (e.g., at the lowest indices) . The relative usefulness of the vectors may be predetermined by testing how well the non-separable transforms represented by these vectors compact inter-predicted residuals. For the arrangements described in this disclosure, C=3 so the concatenated kernel in this example has a third dimension with size 6.

[0157] In one arrangement, nst_idx is determined in an unmodified manner from ECM-13, so it may be decoded or inferred with the value of 0 indicating that non-separable transforms are not used for the current TB, or it may be decoded from the bitstream with a value of 1, 2, or 3. In the latter case of a non-zero value of nst_idx, then one of the first three vectors of the stacked kernel is indexed by nst_idx, the fourth dimension is indexed by a transform set index (mapped from the IPM) , and finally a non-separable matrix of dimension AxB is obtained. The last three vectors of the stacked kernel are never used to transform inter prediction transform coefficients. However, the predetermined reordering allows a mixture of hyper-vectors from Li and Ki to be sorted into the first three vectors.

[0158] In other arrangements, when a pair of kernels are available, then the decoding process of nst_idx is modified so that it may decode a larger range of values. In different arrangements, the range of values of nst_idx may be {0, 1, 2, 3, 4} , {0, 1, 2, 3, 4, 5} , or {0, 1, 2, 3, 4, 5, 6} . In the last arrangement, all 6 hyper-vectors from Li and Ki are explicitly indexable by nst_idx. This gives full freedom to exercise the diversity of available non-separable transform kernels, although with increased signaling cost of nst_idx.

[0159] Referring to FIG. 4, inter prediction module 408 and intra prediction module 410 may be configured to generate a prediction block based on information related to the generation of a prediction block provided by decoding module 402 and information of a previously decoded block or picture provided by buffer module 414.

[0160] For example, inter prediction module 408 may be configured to receive a bitstream that includes a reference frame, a current frame, and an indication of a weighting factor associated with a multi-hypothesis prediction (MHP) procedure from an encoder. Inter prediction module 408 may be configured to perform the MHP procedure for a CU located in the current frame based on a search block (e.g., reference frame and / or reference template) in the reference frame. In some embodiments, to perform the MHP procedure, the inter prediction module 408 may be configured to perform template matching for the CU located in the current frame based on a search block in the reference frame and the weighting factor to obtain motion information. In some embodiments, to perform the MHP procedures, inter prediction module 408 may be configured to identify a weighting factor index associated with the weighting factor based on the template matching. Inter prediction module 408 may be configured to identify a weighting factor sign of the weighting factor based on an indication included in the bitstream. Inter prediction module 408 may be configured to perform an inter prediction procedure based on the current frame, the reference frame, the weighting factor index, and the weighting factor sign of the weighting factor to decode the bitstream.

[0161] The reconstructed block or reconstructed picture combined from the outputs of inverse transform module 406 and prediction module 408 or 410 may be provided to filter module 412. Filter module 412 may include a deblocking filter, an offset correction module, and an adaptive loop filter (ALF) . Buffer module 414 may store the reconstructed picture or block and use it as a reference picture or a reference block for inter prediction module 408 and may output the reconstructed picture.

[0162] Consistent with the scope of the present disclosure, encoding module 320 and decoding module 402 may be configured to adopt a scheme of quantization level binarization with Rice parameter adapted to the bit depth and / or the bit rate for encoding the picture of the video to improve the coding efficiency.

[0163] FIGs. 15A and 15B illustrates a flowchart of a first exemplary method 1500 of decoding, according to some embodiments of the present disclosure. Method 1500 may be performed by a system, e.g., such as decoding system 200, decoder 201, intra prediction module 410, or inter prediction module 408, just to name a few. Method 1500 may include operations 1502-1514, as described below. It is to be appreciated that some of the steps may be optional (as indicated with dashed lines) , and some of the steps may be performed simultaneously, or in a different order than shown in FIGs. 15A and 15B.

[0164] Referring to FIG. 15A, at 1502, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, a first transform kernel may be selected from among a plurality of transform kernels based on a size of the current block. In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0165] At 1504, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0166] At 1506, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0167] At 1508, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0168] At 1510, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0169] Referring to FIG. 15B, at 1512, in response to the first transform kernel being selected, the current block may be decoded based on the first transform kernel.

[0170] At 1514, in response to the second transform kernel being selected, the current block may be decoded based on the second transform kernel.

[0171] FIGs. 16A and 16B illustrates a flowchart of a second exemplary method 1600 of decoding, according to some embodiments of the present disclosure. Method 1600 may be performed by a system, e.g., such as decoding system 200, decoder 201, intra prediction module 410, or inter prediction module 408, just to name a few. Method 1600 may include operations 1602-1614, as described below. It is to be appreciated that some of the steps may be optional (as indicated with dashed lines) , and some of the steps may be performed simultaneously, or in a different order than shown in FIGs. 16A and 16B.

[0172] Referring to FIG. 16A, at 1602, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, a first transform kernel may be selected from among a plurality of transform kernels based on a size of the current block.

[0173] At 1604, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0174] At 1606, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0175] At 1608, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0176] At 1610, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0177] Referring to FIG. 16B, at 1612, in response to the first transform kernel being selected, the current block may be decoded based on the first transform kernel.

[0178] At 1614, in response to the second transform kernel being selected, the current block may be decoded based on the second transform kernel.

[0179] FIG. 17 illustrates a flowchart of a third exemplary method 1700 of decoding, according to some embodiments of the present disclosure. Method 1700 may be performed by a system, e.g., such as decoding system 200, decoder 201, intra prediction module 410, or inter prediction module 408, just to name a few. Method 1700 may include operations 1702-1708, as described below. It is to be appreciated that some of the steps may be optional (as indicated with dashed lines) , and some of the steps may be performed simultaneously, or in a different order than shown in FIG. 17.

[0180] Referring to FIG. 17, at 1702, in response to a current block being associated with an inter prediction method, one or more non-separable transform kernels corresponding to the intra prediction method may be selected based on a size of the current block. In some implementations, each of the one or more kernels may have dimensions AxBxCxD, A may be a number of primary transform or residual coefficients, B may be a number of non-separable transform coefficients, C may be a number of indexed sets, and D may be a number of transform sets.

[0181] At 1704, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, the plurality of kernels may be concatenated along a third dimension corresponding to indexed sets to form a single kernel.

[0182] At 1706, a non-separable transform index (nst_index) may be decoded to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0183] At 1708, the current block may be decoded based on the one or more kernels. In some implementations, the decoding, by the processor, the current block based on the one or more kernels may include decoding the current block based on the single kernel. In some implementations, the single kernel may have dimensions AxBx2CxD.

[0184] FIGs. 18A and 18B illustrates a flowchart of a first exemplary method 1800 of encoding, according to some embodiments of the present disclosure. Method 1800 may be performed by a system, e.g., such as encoding system 100, encoder 101, intra prediction module 306, or inter prediction module 304, just to name a few. Method 1800 may include operations 1802-1814, as described below. It is to be appreciated that some of the steps may be optional (as indicated with dashed lines) , and some of the steps may be performed simultaneously, or in a different order than shown in FIGs. 18A and 18B.

[0185] Referring to FIG. 18A, at 1802, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, a first transform kernel may be selected from among a plurality of transform kernels based on a size of the current block. In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0186] At 1804, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0187] At 1806, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0188] At 1808, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0189] At 1810, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0190] Referring to FIG. 18B, at 1812, in response to the first transform kernel being selected, the current block may be encoded based on the first transform kernel.

[0191] At 1814, in response to the second transform kernel being selected, the current block may be encoded based on the second transform kernel.

[0192] FIGs. 19A and 19B illustrates a flowchart of a second exemplary method 1900 of encoding, according to some embodiments of the present disclosure. Method 1900 may be performed by a system, e.g., such as encoding system 100, encoder 101, intra prediction module 306, or inter prediction module 304, just to name a few. Method 1900 may include operations 1902-1920, as described below. It is to be appreciated that some of the steps may be optional (as indicated with dashed lines) , and some of the steps may be performed simultaneously, or in a different order than shown in FIGs. 19A and 19B.

[0193] Referring to FIG. 19A, at 1902, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, a first transform kernel may be selected from among a plurality of transform kernels based on a size of the current block.

[0194] At 1904, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0195] At 1906, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0196] At 1908, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0197] At 1910, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, a second transform kernel different than the first transform kernel may be selected from among the plurality of transform kernels based on the size of the current block.

[0198] Referring to FIG. 19B, at 1912, in response to the first transform kernel being selected, the current block may be encoded based on the first transform kernel.

[0199] At 1914, in response to the second transform kernel being selected, the current block may be encoded based on the second transform kernel.

[0200] FIG. 20 illustrates a flowchart of a third exemplary method 2000 of encoding, according to some embodiments of the present disclosure. Method 2000 may be performed by a system, e.g., such as encoding system 100, encoder 101, intra prediction module 306, or inter prediction module 304, just to name a few. Method 2000 may include operations 2002-2008, as described below. It is to be appreciated that some of the steps may be optional (as indicated with dashed lines) , and some of the steps may be performed simultaneously, or in a different order than shown in FIG. 20.

[0201] Referring to FIG. 20, at 2002, in response to a current block being associated with an inter prediction method, one or more non-separable transform kernels corresponding to an intra prediction method may be selected based on a size of the current block. In some implementations, each of the one or more kernels may have dimensions AxBxCxD, A may be a number of primary transform or residual coefficients, B may be a number of non-separable transform coefficients, C may be a number of indexed sets, and D may be a number of transform sets.

[0202] At 2004, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, the plurality of kernels may be concatenated along a third dimension corresponding to indexed sets to form a single kernel.

[0203] At 2006, a non-separable transform index (nst_index) may be encoded to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0204] At 2008, the current block may be encoded based on the one or more kernels. In some implementations, the encoding, by the processor, the current block based on the one or more kernels may include encoding the current block based on the single kernel. In some implementations, the single kernel may have dimensions AxBx2CxD.

[0205] In various aspects of the present disclosure, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as instructions on a non-transitory computer-readable medium. Computer-readable media includes computer storage media. Storage media may be any available media that can be accessed by a processor, such as processor 102 in FIGs. 1 and 2. By way of example, and not limitation, such computer-readable media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, HDD, such as magnetic disk storage or other magnetic storage devices, Flash drive, SSD, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a processing system, such as a mobile device or a computer. Disk and disc, as used herein, include CD, laser disc, optical disc, digital video disc (DVD) , and floppy disk where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0206] According to one aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, decoding, by the processor, the current block based on the first transform kernel.

[0207] In some implementations, the method may include, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0208] In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0209] In some implementations, the method may include, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0210] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0211] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0212] According to another aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, decoding, by the processor, the current block based on the first transform kernel.

[0213] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0214] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0215] In some implementations, the method may include, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0216] In some implementations, the method may include, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.

[0217] According to a further aspect of the present disclosure, a method of decoding by a decoder is provided. The method may include, in response to a current block being associated with an inter prediction method, selecting, by a processor, one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The method may include, decoding, by the processor, the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0218] In some implementations, the method may include, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenating, by the processor, the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel. In some implementations, the decoding, by the processor, the current block based on the one or more kernels may include decoding, by the processor, the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.

[0219] In some implementations, the method may include decoding, by the processor, an nst_index to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0220] According to still another aspect of the present disclosure, a decoder is provided. The decoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0221] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0222] In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0223] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0224] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0225] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0226] According to still a further aspect of the present disclosure, a decoder is provided. The decoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0227] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0228] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0229] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0230] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0231] According to yet another aspect of the present disclosure, a decoder is provided. The decoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to decode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0232] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel. In some implementations, to decode the current block based on the one or more kernels, the memory storing instructions, which when executed by the processor, may cause the processor to decode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.

[0233] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to decode an nst_index to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0234] According to still another aspect of the present disclosure, an apparatus for decoding is provided. The apparatus for decoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0235] According to still a further aspect of the present disclosure, an apparatus for decoding is provided. The apparatus for decoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0236] According to yet another aspect of the present disclosure, an apparatus for decoding is provided. The apparatus for decoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to decode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0237] According to still another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a decoder is provided. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0238] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0239] In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0240] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0241] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0242] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0243] According to still a further aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a decoder is provided. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to the first transform kernel being selected, decode the current block based on the first transform kernel.

[0244] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0245] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0246] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0247] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to the second transform kernel being selected, decode the current block based on the second transform kernel.

[0248] According to yet another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a decoder is provided. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to, decode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0249] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel. In some implementations, to decode the current block based on the one or more kernels, the instructions, which when executed by the processor of the decoder, may cause the processor of the decoder to decode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.

[0250] In some implementations, the instructions, which when executed by the processor of the decoder, may further cause the processor of the decoder to decode an nst_index to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0251] According to one aspect of the present disclosure, a method of encoding by an encoder is provided. The method may include, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, encoding, by the processor, the current block based on the first transform kernel.

[0252] In some implementations, the method may include, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0253] In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0254] In some implementations, the method may include, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0255] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0256] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0257] According to another aspect of the present disclosure, a method of encoding by an encoder is provided. The method may include, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block. The method may include, in response to the first transform kernel being selected, encoding, by the processor, the current block based on the first transform kernel.

[0258] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0259] In some implementations, the method may include, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0260] In some implementations, the method may include, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0261] In some implementations, the method may include, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the method may include, in response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.

[0262] According to a further aspect of the present disclosure, a method of encoding by an encoder is provided. The method may include, in response to a current block being associated with an inter prediction method, selecting, by a processor, one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The method may include, encoding, by the processor, the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0263] In some implementations, the method may include, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenating, by the processor, the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel. In some implementations, the encoding, by the processor, the current block based on the one or more kernels may include encoding, by the processor, the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.

[0264] In some implementations, the method may include encoding, by the processor, an nst_index to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0265] According to still another aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0266] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0267] In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0268] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0269] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0270] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0271] According to still a further aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0272] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0273] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0274] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0275] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0276] According to yet another aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, encode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0277] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel. In some implementations, to encode the current block based on the one or more kernels, the memory storing instructions, which when executed by the processor, may cause the processor to encode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.

[0278] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to encode an nst_index to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0279] According to still another aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0280] According to still a further aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0281] According to yet another aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The memory storing instructions, which when executed by the processor, may cause the processor to, encode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0282] According to still another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to a current block being associated with an NSPT, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0283] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0284] In some implementations, in response to the size of the current block being 8x16 or 16x8, the first transform kernel may have dimensions of 128x32x3x35. In some implementations, in response to the size of the current block being 8x32 or 32x8, the first transform kernel may have dimensions of 256x20x3x35.

[0285] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0286] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0287] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0288] According to still a further aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to a current block being associated with an LFNST, and an intra prediction method corresponding to the current block not including DIMD, TIMD, SGPM, MIP, or EIP, select a first transform kernel from among a plurality of transform kernels based on a size of the current block. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to the first transform kernel being selected, encode the current block based on the first transform kernel.

[0289] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0290] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0291] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0292] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the second transform kernel being selected, encode the current block based on the second transform kernel.

[0293] According to yet another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, encode the current block based on the one or more kernels. Each of the one or more kernels may have dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.

[0294] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel. In some implementations, to encode the current block based on the one or more kernels, the instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to encode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.

[0295] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to encode an nst_index to determine a value for the third dimension. In some implementations, the value may include one of 0, 1, 2, 3, 4, 5, or 6.

[0296] According to still a further aspect of the present disclosure, a non-transitory computer-readable medium storing a bitstream is provided. The bitstream may be generated according to one or more of the operations described herein.

[0297] According to yet a further aspect of the present disclosure, a method of transmitting a bitstream is provided. The method may include generating, by a processor, the bitstream according to one or more of the operations described herein. The method may include, transmitting, by the processor, the bitstream.

[0298] The foregoing description of the embodiments will so reveal the general nature of the present disclosure that others can, by applying knowledge within the skill of the art, readily modify and / or adapt for various applications such embodiments, without undue experimentation, without departing from the general concept of the present disclosure. Therefore, such adaptations and modifications are intended to be within the meaning and range of equivalents of the disclosed embodiments, based on the teaching and guidance presented herein. It is to be understood that the phraseology or terminology herein is for the purpose of description and not of limitation, such that the terminology or phraseology of the present specification is to be interpreted by the skilled artisan in light of the teachings and guidance.

[0299] Embodiments of the present disclosure have been described above with the aid of functional building blocks illustrating the implementation of specified functions and relationships thereof. The boundaries of these functional building blocks have been arbitrarily defined herein for the convenience of the description. Alternate boundaries can be defined so long as the specified functions and relationships thereof are appropriately performed.

[0300] The Summary and Abstract sections may set forth one or more but not all exemplary embodiments of the present disclosure as contemplated by the inventor (s) , and thus, are not intended to limit the present disclosure and the appended claims in any way.

[0301] Various functional blocks, modules, and steps are disclosed above. The arrangements provided are illustrative and without limitation. Accordingly, the functional blocks, modules, and steps may be reordered or combined in different ways than in the examples provided above. Likewise, some embodiments include only a subset of the functional blocks, modules, and steps, and any such subset is permitted.

[0302] The breadth and scope of the present disclosure should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.

Claims

A method of decoding by a decoder, comprising:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decoding, by the processor, the current block based on the first transform kernel.The method of claim 1, further comprising:in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.The method of claim 1, wherein:in response to the size of the current block being 8x16 or 16x8, the first transform kernel has dimensions of 128x32x3x35, orin response to the size of the current block being 8x32 or 32x8, the first transform kernel has dimensions of 256x20x3x35.The method of claim 1, further comprising:in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.The method of claim 1, further comprising:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.The method of claim 1, further comprising:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.A method of decoding by a decoder, comprising:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decoding, by the processor, the current block based on the first transform kernel.The method of claim 7, further comprising:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.The method of claim 7, further comprising:in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.The method of claim 7, further comprising:in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.The method of claim 7, further comprising:in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decoding, by the processor, the current block based on the second transform kernel.A method of decoding by a decoder, comprising:in response to a current block being associated with an inter prediction method, selecting, by a processor, one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; anddecoding, by the processor, the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.The method of claim 12, further comprising:in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenating, by the processor, the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel,wherein the decoding, by the processor, the current block based on the one or more kernels comprises:decoding, by the processor, the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.The method of claim 13, further comprising:decoding, by the processor, a non-separable transform index (nst_index) to determine a value for the third dimension,wherein the value comprises one of 0, 1, 2, 3, 4, 5, or 6.A decoder, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decode the current block based on the first transform kernel.The decoder of claim 15, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The decoder of claim 15, wherein:in response to the size of the current block being 8x16 or 16x8, the first transform kernel has dimensions of 128x32x3x35, orin response to the size of the current block being 8x32 or 32x8, the first transform kernel has dimensions of 256x20x3x35.The decoder of claim 15, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The decoder of claim 15, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The decoder of claim 15, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.A decoder, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decode the current block based on the first transform kernel.The decoder of claim 21, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The decoder of claim 21, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The decoder of claim 21, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The decoder of claim 21, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.A decoder, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; anddecode the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.The decoder of claim 26, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel,wherein, to decode the current block based on the one or more kernels, the memory storing instructions, which when executed by the processor, cause the processor to:decode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.The decoder of claim 27, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:decode a non-separable transform index (nst_index) to determine a value for the third dimension,wherein the value comprises one of 0, 1, 2, 3, 4, 5, or 6.An apparatus for decoding, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decode the current block based on the first transform kernel.An apparatus for decoding, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decode the current block based on the first transform kernel.An apparatus for decoding, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; anddecode the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.A non-transitory computer-readable medium storing instructions, which when executed by a processor of a decoder, cause the processor of the decoder to:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decode the current block based on the first transform kernel.The non-transitory computer-readable medium of claim 32, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 32, wherein:in response to the size of the current block being 8x16 or 16x8, the first transform kernel has dimensions of 128x32x3x35, orin response to the size of the current block being 8x32 or 32x8, the first transform kernel has dimensions of 256x20x3x35.The non-transitory computer-readable medium of claim 32, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 32, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 32, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.A non-transitory computer-readable medium storing instructions, which when executed by a processor of a decoder, cause the processor of the decoder to:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, decode the current block based on the first transform kernel.The non-transitory computer-readable medium of claim 38, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 38, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 38, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 38, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, decode the current block based on the second transform kernel.A non-transitory computer-readable medium storing instructions, which when executed by a processor of a decoder, cause the processor of the decoder to:in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; anddecode the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.The non-transitory computer-readable medium of claim 43, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel,wherein, to decode the current block based on the one or more kernels, the instructions, which when executed by the processor of the decoder, cause the processor of the decoder to:decode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.The non-transitory computer-readable medium of claim 44, wherein the instructions, which when executed by the processor of the decoder, further cause the processor of the decoder to:decode a non-separable transform index (nst_index) to determine a value for the third dimension,wherein the value comprises one of 0, 1, 2, 3, 4, 5, or 6.A method of encoding by an encoder, comprising:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encoding, by the processor, the current block based on the first transform kernel.The method of claim 46, further comprising:in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.The method of claim 46, wherein:in response to the size of the current block being 8x16 or 16x8, the first transform kernel has dimensions of 128x32x3x35, orin response to the size of the current block being 8x32 or 32x8, the first transform kernel has dimensions of 256x20x3x35.The method of claim 46, further comprising:in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.The method of claim 46, further comprising:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.The method of claim 46, further comprising:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.A method of encoding by an encoder, comprising:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , selecting, by a processor, a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encoding, by the processor, the current block based on the first transform kernel.The method of claim 52, further comprising:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.The method of claim 52, further comprising:in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.The method of claim 52, further comprising:in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.The method of claim 52, further comprising:in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, selecting, by the processor, a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encoding, by the processor, the current block based on the second transform kernel.A method of encoding by an encoder, comprising:in response to a current block being associated with an inter prediction method, selecting, by a processor, one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; andencoding, by the processor, the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.The method of claim 57, further comprising:in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenating, by the processor, the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel,wherein the encoding, by the processor, the current block based on the one or more kernels comprises:encoding, by the processor, the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.The method of claim 58, further comprising:encoding, by the processor, a non-separable transform index (nst_index) to determine a value for the third dimension,wherein the value comprises one of 0, 1, 2, 3, 4, 5, or 6.An encoder, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encode the current block based on the first transform kernel.The encoder of claim 60, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The encoder of claim 60, wherein:in response to the size of the current block being 8x16 or 16x8, the first transform kernel has dimensions of 128x32x3x35, orin response to the size of the current block being 8x32 or 32x8, the first transform kernel has dimensions of 256x20x3x35.The encoder of claim 60, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The encoder of claim 60, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The encoder of claim 60, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.An encoder, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encode the current block based on the first transform kernel.The encoder of claim 66, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The encoder of claim 66, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The encoder of claim 66, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The encoder of claim 66, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.An encoder, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; andencode the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.The encoder of claim 71, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel,wherein, to encode the current block based on the one or more kernels, the memory storing instructions, which when executed by the processor, cause the processor to:encode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.The encoder of claim 72, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:encode a non-separable transform index (nst_index) to determine a value for the third dimension,wherein the value comprises one of 0, 1, 2, 3, 4, 5, or 6.An apparatus for encoding, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encode the current block based on the first transform kernel.An apparatus for encoding, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encode the current block based on the first transform kernel.An apparatus for encoding, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; andencode the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.A non-transitory computer-readable medium storing instructions, which when executed by a processor of an encoder, cause the processor of the encoder to:in response to a current block being associated with a non-separable primary transform (NSPT) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encode the current block based on the first transform kernel.The non-transitory computer-readable medium of claim 77, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 77, wherein:in response to the size of the current block being 8x16 or 16x8, the first transform kernel has dimensions of 128x32x3x35, orin response to the size of the current block being 8x32 or 32x8, the first transform kernel has dimensions of 256x20x3x35.The non-transitory computer-readable medium of claim 77, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the size of the current block having a first dimension less than or equal to 8 and a second dimension less than or equal to 8, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 77, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 16, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 77, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to 32, the current block being associated with the NSPT, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.A non-transitory computer-readable medium storing instructions, which when executed by a processor of an encoder, cause the processor of the encoder to:in response to a current block being associated with a low-frequency non-separable transform (LFNST) , and an intra prediction method corresponding to the current block not including encoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , spatial geometric partitioning mode (SGPM) , matrix-based intra prediction (MIP) , or extrapolation filter-based intra prediction (EIP) , select a first transform kernel from among a plurality of transform kernels based on a size of the current block; andin response to the first transform kernel being selected, encode the current block based on the first transform kernel.The non-transitory computer-readable medium of claim 83, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the size of the current block having a first dimension equal to 4 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 83, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the size of the current block having a first dimension equal to 8 and a second dimension equal to or larger than the first dimension, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 83, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the size of the current block having a first dimension greater than or equal to 16 and a second dimension greater than or equal to 16, the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.The non-transitory computer-readable medium of claim 83, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to the current block being associated with the LFNST, and the intra prediction method corresponding to the current block including DIMD, TIMD, SGPM, MIP, or EIP, select a second transform kernel different than the first transform kernel from among the plurality of transform kernels based on the size of the current block; andin response to the second transform kernel being selected, encode the current block based on the second transform kernel.A non-transitory computer-readable medium storing instructions, which when executed by a processor of an encoder, cause the processor of the encoder to:in response to a current block being associated with an inter prediction method, select one or more non-separable transform kernels corresponding to an intra prediction method based on a size of the current block; andencode the current block based on the one or more kernels,wherein each of the one or more kernels has dimensions AxBxCxD, where A is a number of primary transform or residual coefficients, B is a number of non-separable transform coefficients, C is a number of indexed sets, and D is a number of transform sets.The non-transitory computer-readable medium of claim 88, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:in response to selecting a plurality of kernels corresponding to the intra prediction method based on the size of the current block, concatenate the plurality of kernels along a third dimension corresponding to indexed sets to form a single kernel,wherein, to encode the current block based on the one or more kernels, the instructions, which when executed by the processor of the encoder, cause the processor of the encoder to:encode the current block based on the single kernel, wherein the single kernel has dimensions AxBx2CxD.The non-transitory computer-readable medium of claim 89, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:encode a non-separable transform index (nst_index) to determine a value for the third dimension,wherein the value comprises one of 0, 1, 2, 3, 4, 5, or 6.A non-transitory computer-readable medium storing a bitstream, the bitstream being generated based on one or more of claims 46-59.A method of transmitting a bitstream, comprising:generating, by a processor, a bitstream based on one or more of claims 46-59; andtransmitting, by the processor, the bitstream.

Citation Information

Patent Citations

  • Method and apparatus for improved implicit transform selection

    CN113615187A

  • Moving image decoding device and moving image encoding device

    CN118402241A

  • Method and apparatus for video coding based on non-separable primary transform

    WO2024071680A1

  • Image encoding / decoding method on basis of non-separable transform, method for transmitting bitstream, and recording medium for storing bitstream

    WO2024080766A1

  • Determination of intra prediction mode for indexation into non-separable transform kernels

    WO2024158549A1