Multi-transform set fusion

CN123036836APending Publication Date: 2026-11-03INTERDIGITAL CE PATENT HOLDINGS SAS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202580024483.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-03-25
Filing Date
2025-02-28
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing video coding technologies lack flexibility in transform set selection when handling intra-prediction modes that are not angular, planar, or DC modes, resulting in low coding efficiency and increased encoder complexity and signaling costs.

Method used

The Multi-Transform Set Fusion (MTSF) technique is employed to generate the final transform set by combining VIPM1, VIPM2 and planar transform sets through a predefined fusion order and kernel selection, thus avoiding additional rate-distortion optimization and signaling notification.

Benefits of technology

Without increasing encoder complexity and signaling costs, it improves the flexibility and coding efficiency of transform sets, thereby enhancing the compression performance of video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123036836A_ABST
    Figure CN123036836A_ABST
Patent Text Reader

Abstract

In one implementation, we propose several techniques for selecting transforms across different transform sets without additional encoder complexity using multiple transform set fusion (MTSF). This approach combines several transform sets (e.g., VIPM and planar mode transform sets) to introduce diversity in the transform selection process for modes that are not angular, planar, or DC without adding additional encoder complexity and signaling cost. Specifically, we propose to enhance the transform set selection process for modes that are not angular, planar, or DC, such as MIP, DIMD, TIMD, SGPM, IntraTMP, IBC, and inter-block. In one example, multiple transform sets are selected based on planar mode and two virtual intra prediction modes. A transform kernel is selected from each of these transform sets based on predetermined rules, and the selected transform kernels are placed in the final transform set based on a predetermined order.
Need to check novelty before this filing date? Find Prior Art

Description

Cross-reference to related applications

[0001] This application claims priority to European Application No. 24305434.3, filed on 25 March 2024, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This embodiment generally relates to methods and apparatus for transform coding in video encoding and decoding. Background Technology

[0003] To achieve high compression efficiency, image and video coding schemes typically employ prediction and transform to utilize spatial and temporal redundancy in video content. Generally, intra-frame or inter-frame prediction is used to fully leverage intra-frame or inter-frame correlations, followed by transform, quantization, and entropy coding of the differences between the original and predicted blocks (often referred to as prediction error or prediction residual). To reconstruct the video, the compressed data is decoded through the inverse process corresponding to entropy coding, quantization, transform, and prediction. Summary of the Invention

[0004] According to one embodiment, an encoding method is provided, comprising: selecting a first intra-prediction mode and a second intra-prediction mode for a block of a frame; obtaining a first transform set and a second transform set corresponding to the first intra-prediction mode and the second intra-prediction mode, respectively; obtaining a transform set based on the first transform set and the second transform set, wherein a transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bitstream; obtaining a transform kernel from the transform set; and encoding the block based on the transform kernel.

[0005] According to another embodiment, a decoding method is provided, comprising: selecting a first intra-frame prediction mode and a second intra-frame prediction mode for a block of a frame; obtaining a first transform set and a second transform set corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode, respectively; obtaining a transform set based on the first transform set and the second transform set, wherein a transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bitstream; obtaining a transform kernel from the transform set; and decoding the block based on the transform kernel.

[0006] According to another embodiment, an apparatus for encoding is provided, including one or more processors and at least one memory coupled to the one or more processors, wherein the one or more processors are configured to: select a first intra-prediction mode and a second intra-prediction mode for a block of a frame; obtain a first transform set and a second transform set corresponding to the first intra-prediction mode and the second intra-prediction mode, respectively; obtain a transform set based on the first transform set and the second transform set, wherein a transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bitstream; obtain a transform kernel from the transform set; and encode the block based on the transform kernel.

[0007] According to another embodiment, an apparatus for decoding is provided, comprising one or more processors and at least one memory coupled to the one or more processors, wherein the one or more processors are configured to: select a first intra-prediction mode and a second intra-prediction mode for a block of a frame; obtain a first transform set and a second transform set corresponding to the first intra-prediction mode and the second intra-prediction mode, respectively; obtain a transform set based on the first transform set and the second transform set, wherein a transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bitstream; obtain a transform kernel from the transform set; and decode the block based on the transform kernel.

[0008] One or more embodiments also provide a computer program including instructions that, when executed by one or more processors, cause the one or more processors to perform the method according to any embodiment described herein. One or more of these embodiments also provide a computer-readable storage medium having instructions stored thereon for processing video data according to the method described herein.

[0009] One or more embodiments also provide a computer-readable storage medium storing video data generated according to the method described above. One or more embodiments also provide a method and apparatus for transmitting or receiving video data generated according to the method described herein. Attached Figure Description

[0010] Figure 1 A block diagram of a system that can implement aspects of this embodiment is shown.

[0011] Figure 2 A block diagram of an embodiment of a video encoder is shown.

[0012] Figure 3 A block diagram of an embodiment of a video decoder is shown.

[0013] Figure 4 An example of explicit MTS set selection in ECM is shown (modeIdx = 4 and sizeIdx = 0).

[0014] Figure 5 The ROI (Region of Interest) for LFNST16 is shown.

[0015] Figure 6 The ROI for LFNST8 is shown.

[0016] Figure 7 This shows that NSPT is applied to small blocks, while LFNST is applied to the remaining blocks.

[0017] Figure 8 The LFNST / NSPT LUT with corresponding plane, VIPM1 and VIPM2 transformation sets is shown.

[0018] Figure 9 The final transform set of TU is generated based on a predetermined fusion of the plane, VIPM1, and VIPM2 transform sets according to an embodiment.

[0019] Figure 10 A method for constructing the final transform set according to an embodiment is shown.

[0020] Figure 11 An encoding method in the NSPT case according to an embodiment is shown.

[0021] Figure 12 A decoding method in the NSPT case according to an embodiment is shown.

[0022] Figure 13 The final transform set of the TU is generated by dynamic fusion of the plane, VIPM1 and VIPM2 transform sets according to an embodiment. Detailed Implementation

[0023] Figure 1A block diagram illustrating an example of a system that can implement various aspects and embodiments is shown. System 100 may be embodied as a device including various components described below and configured to perform one or more aspects described in this application. Examples of such devices include, but are not limited to, various electronic devices such as personal computers, laptop computers, smartphones, tablet computers, digital multimedia set-top boxes, digital television receivers, personal video recording systems, networked home appliances, and servers. Elements of system 100 may be embodied individually or in combination in a single integrated circuit, multiple ICs, and / or discrete components. For example, in at least one embodiment, the processing and encoder / decoder elements of system 100 are distributed across multiple ICs and / or discrete components. In various embodiments, system 100 is communicatively coupled to other systems or other electronic devices via, for example, a communication bus or through dedicated input and / or output ports. In various embodiments, system 100 is configured to implement one or more aspects described in this application.

[0024] System 100 includes at least one processor 110 configured to execute instructions loaded thereon for implementing various aspects, such as those described in this application. Processor 110 may include embedded memory, input / output interfaces, and various other circuitry known in the art. System 100 includes at least one memory 120 (e.g., a volatile memory device and / or a non-volatile memory device). System 100 includes a storage device 140, which may include non-volatile memory and / or volatile memory, including but not limited to EEPROM, ROM, PROM, RAM, DRAM, SRAM, flash memory, disk drives, and / or optical disk drives. As a non-limiting example, storage device 140 may include internal storage devices, attached storage devices, and / or network-accessible storage devices.

[0025] System 100 includes an encoder / decoder module 130 configured to, for example, process data to provide encoded or decoded video, and the encoder / decoder module 130 may include its own processor and memory. The encoder / decoder module 130 represents a module that can be included in a device to perform encoding and / or decoding functions. As is known, a device may include one or both encoding and decoding modules. Furthermore, the encoder / decoder module 130 may be implemented as a separate element of system 100, or it may be incorporated into processor 110 as a combination of hardware and software, as is known to those skilled in the art.

[0026] Program code to be loaded onto processor 110 or encoder / decoder 130 to execute the various aspects described in this application may be stored in storage device 140 and subsequently loaded into memory 120 for execution by processor 110. According to various embodiments, one or more of processor 110, memory 120, storage device 140, and encoder / decoder module 130 may store one or more items of a variety during execution of the processes described in this application. Such stored items may include, but are not limited to, input video, decoded video or portions of decoded video, bitstreams, matrices, variables, and intermediate or final results from processing of equations, formulas, operations, and operational logic.

[0027] In several embodiments, memory within processor 110 and / or encoder / decoder module 130 is used to store instructions and provide working memory for processing required during encoding or decoding. However, in other embodiments, external memory (e.g., the processing device may be processor 110 or encoder / decoder module 130) is used for one or more of these functions. External memory may be memory 120 and / or storage device 140, such as volatile memory and / or non-volatile flash memory. In several embodiments, external non-volatile flash memory is used to store the television's operating system. In at least one embodiment, fast external volatile memory, such as RAM, is used as working memory for video encoding and decoding operations, such as for MPEG-2, HEVC, or VVC.

[0028] Inputs to the components of system 100 can be provided by a variety of input devices as shown in box 105. Such input devices include, but are not limited to: (i) an RF section that receives, for example, RF signals transmitted over the air by a broadcaster; (ii) a composite input terminal; (iii) a USB input terminal; and / or (iv) an HDMI input terminal.

[0029] In various embodiments, the input device of block 105 has associated corresponding input processing elements known in the art. For example, the RF section may be associated with elements suitable for: (i) selecting a desired frequency (also known as selecting a signal, or band-limiting a signal to a frequency band); (ii) down-converting the selected signal; (iii) band-limiting it again to a narrower frequency band to select, for example, a signal band that may be referred to as a channel in some embodiments; (iv) demodulating the down-converted and band-limited signal; (v) performing error correction; and (vi) demultiplexing to select a desired data packet stream. The RF section in various embodiments includes one or more elements performing these functions, such as a frequency selector, signal selector, band limiter, channel selector, filter, downconverter, demodulator, error corrector, and demultiplexer. The RF section may include a tuner performing multiple of these functions, including, for example, down-converting a received signal to a lower frequency (e.g., intermediate frequency or near-baseband frequency) or to baseband. In one set-top box embodiment, the RF section and its associated input processing elements receive RF signals transmitted via a wired (e.g., cable) medium and perform frequency selection by filtering, down-converting, and re-filtering to the desired frequency band. Various embodiments rearrange the order of the above (and other) components, remove some of these components, and / or add other components that perform similar or different functions. Adding components may include inserting components between existing components, such as inserting amplifiers and analog-to-digital converters. In various embodiments, the RF section includes an antenna.

[0030] Furthermore, the USB and / or HDMI terminals may include corresponding interface processors for connecting system 100 to other electronic devices across USB and / or HDMI connections. It should be understood that various aspects of input processing (e.g., Reed-Solomon error correction) may be implemented as needed, for example, within a separate input processing IC or within processor 110. Similarly, aspects of USB or HDMI interface processing may be implemented as needed within a separate interface IC or within processor 110. The demodulated, error-corrected, and demultiplexed stream is provided to various processing elements, including, for example, processor 110 and encoder / decoder 130, which operate in conjunction with memory and storage elements to process the data stream as needed for presentation on the output device.

[0031] Various components of system 100 can be housed within an integrated housing. Within the integrated housing, various components can be interconnected and transmit data therebetween using suitable connection means 115 (e.g., internal buses known in the art, including I2C buses, wiring, and printed circuit boards).

[0032] System 100 includes a communication interface 150 that enables communication with other devices via a communication channel 190. The communication interface 150 may include, but is not limited to, a transceiver configured to send and receive data on the communication channel 190. The communication interface 150 may include, but is not limited to, a modem or network interface card (NIC), and the communication channel 190 may be implemented, for example, in a wired and / or wireless medium.

[0033] In various embodiments, data is streamed to system 100 using a Wi-Fi network such as IEEE 802.11. In these embodiments, Wi-Fi signals are received via a communication channel 190 and a communication interface 150 adapted for Wi-Fi communication. The communication channel 190 in these embodiments is typically connected to an access point or router that provides access to external networks, including the Internet, to allow streaming applications and other over-the-top services to communicate. Other embodiments use a set-top box to provide streaming data to system 100, delivering data via an HDMI connection to input box 105. Still other embodiments use an RF connection to input box 105 to provide streaming data to system 100.

[0034] System 100 can provide output signals to a variety of output devices, including display 165, speaker 175, and other peripheral devices 185. In various embodiments, other peripheral devices 185 include one or more of a standalone DVR, disk player, stereo system, lighting system, and other devices that provide functionality based on the output of system 100. In various embodiments, signaling such as AV.Link, CEC, or other communication protocols that enable device-to-device control (with or without user intervention) is used to transmit control signals between system 100 and display 165, speaker 175, or other peripheral devices 185. Output devices can be communicatively coupled to system 100 via dedicated connections through corresponding interfaces 160, 170, and 180. Alternatively, output devices can be connected to system 100 via communication interface 150 using communication channel 190. Display 165 and speaker 175 can be integrated into a single unit within an electronic device (e.g., a television) along with other system 100 components. In various embodiments, display interface 160 includes a display driver, such as a timing controller (TCon) chip.

[0035] Display 165 and speaker 175 may alternatively be separated from one or more other components, for example, if the RF portion of input 105 is part of a separate set-top box. In various embodiments where display 165 and speaker 175 are external components, the output signal may be provided via a dedicated output connection including, for example, an HDMI port, a USB port, or a COMP output.

[0036] Figure 2An example of a block-based hybrid video encoder 200, such as a VVC (Variety Video Coding) encoder, is shown. Figure 2 Encoders that improve upon the VVC standard or employ VVC-like technologies can also be shown.

[0037] In this application, the terms "reconstruction" and "decoding" are used interchangeably, as are the terms "encoded" and "coded," and the terms "image," "picture," and "frame." Generally, but not necessarily, the term "reconstruction" is used on the encoder side, while "decoding" is used on the decoder side.

[0038] Before encoding, the video sequence may undergo pre-coding (201), for example, by applying a color transform to the input color picture (e.g., from RGB 4:4:4 to YCbCr 4:2:0), or by performing remapping of the input picture components to obtain a signal distribution that is more robust to compression (e.g., using histogram equalization for one of the color components). Metadata may be associated with the pre-processing and attached to the bitstream.

[0039] In encoder 200, the frame is encoded by encoder elements as described below. The frame to be encoded is divided (202) and processed in units such as CUs (coding units). Each unit is encoded using, for example, an intra-frame mode or an inter-frame mode. When a unit is encoded in intra-frame mode, it performs intra-frame prediction (260). In inter-frame mode, motion estimation (275) and compensation (270) are performed. The encoder determines (205) which of the intra-frame mode or inter-frame mode to use to encode the unit and indicates the intra-frame / inter-frame decision by, for example, a prediction mode flag. For example, the prediction residual is calculated by subtracting (210) the prediction block from the original image block.

[0040] The prediction residuals are then transformed (225) and quantized (230). The quantized transform coefficients, along with motion vectors and other syntax elements (such as screen partitioning information), are entropy encoded (245) to output a bitstream. As a non-limiting example, context-based adaptive binary arithmetic coding (CABAC) can be used to encode the syntax elements into the bitstream.

[0041] An encoder can skip the transform and apply quantization directly to the untransformed residual signal. The encoder can bypass both the transform and quantization processes; that is, the residual is directly encoded without any transform or quantization.

[0042] The encoder decodes the encoded blocks to provide a reference for further prediction. The quantized transform coefficients are dequantized (240) and inverse transformed (250) to decode the prediction residuals. The decoded prediction residuals and prediction blocks are combined (255) to reconstruct the image blocks. A loop filter (265) is applied to the reconstructed images to perform, for example, deblocking / SAO (Sample Adaptive Offset) / ALF (Adaptive Loop Filter) filtering to reduce coding artifacts. The filtered image is stored in a reference image buffer (280).

[0043] Figure 3 A block diagram of an example video decoder 300 is shown. In decoder 300, the bitstream is decoded by decoder elements as described below. Video decoder 300 typically performs operations similar to... Figure 2 The encoding process described herein is the opposite of the decoding process. Encoder 200 also typically performs video decoding as part of the video data encoding.

[0044] Specifically, the input to the decoder includes a video bitstream, which can be generated by the video encoder 200. The bitstream is first entropy decoded (330) to obtain transform coefficients, prediction modes, motion vectors, and other encoded information. Frame segmentation information indicates how the frame is segmented. Therefore, the decoder can segment (335) the frame based on the decoded frame segmentation information. The transform coefficients are dequantized (340) and inverse transformed (350) to decode the prediction residuals. The decoded prediction residuals and prediction blocks are combined (355) to reconstruct image blocks. Prediction blocks can be obtained from intra-frame prediction (360) or motion-compensated prediction (i.e., inter-frame prediction) (375) (370). A loop filter (365) is applied to the reconstructed image. The filtered image is stored in a reference frame buffer (380). Note that for a given frame, the contents of the reference frame buffer 380 on the decoder 300 side and the contents of the reference frame buffer 280 on the encoder 200 side are the same for the same frame.

[0045] The decoded image can also undergo post-decoding processing (385), such as inverse color transformation (e.g., from YCbCr 4:2:0 to RGB 4:4:4) or inverse remapping of the process that is the inverse of the remapping process performed in the pre-encoding process (201). Post-decoding processing can use metadata that is exported in the pre-encoding process and signaled in the bitstream.

[0046] The transform selection in ECM (Enhanced Compression Model) depends on the intra-prediction mode of the current block. The intra-prediction mode is used as input to a lookup table (LUT) to obtain a set of transforms suitable for the block. This is done to take advantage of the correlation between directional intra-prediction modes and residual types, since residual samples tend to have larger absolute values ​​when far from the reference sample.

[0047] Several methods have been proposed to derive intra-prediction modes for transform selection for non-directional modes such as MIP (Matrix Weighted Intra Prediction), IntraTMP (Intra Template Matching Prediction), IBC (Intra-Block Copy), and inter-frame blocks. For example, the DIMD (Decoder-Side Intra-Mode Derivation) mode is used to derive Virtual Intra-Prediction Modes (VIPMs) for these modes to select appropriate MTS (Multiple Transform Sets) and LFNST (Low-Frequency Inseparable Transform) / NSPT (Inseparable Master Transform) transform sets. It should be noted that VIPMs can be angular intra-prediction modes, DC (Diverter-Driven), or planar modes. Here, angular mode refers to directional intra-prediction modes. Planar and DC can be referred to as non-angular modes. The VIPM mode is derived to indicate the characteristics of the prediction residuals, and thus is used to indicate transform set selection, even if the VIPM mode is not used for actual coding. However, since the transform set is defined based on intra-prediction modes including angular, planar, and DC modes, VIPM may not always provide the optimal transform set for the current block, as it does not reflect the residual type for blocks not encoded in angular, DC, or planar intra-prediction modes.

[0048] This document proposes several techniques for selecting transforms across different transform sets using Multi-Transform Set Fusion (MTSF) without adding extra encoder complexity. This approach combines several transform sets (i.e., VIPM and planar mode transform sets) to introduce diversity in the transform selection process for modes that are not angular, planar, or DC modes, without increasing additional encoder complexity or signaling costs. Specifically, we propose enhancing the transform set selection process for modes that are not angular, planar, or DC modes, such as MIP, DIMD, TIMD (template-based intra-mode derivation), SGPM (spatial geometry partitioning mode), IntraTMP, IBC, and inter-block.

[0049] Intra-frame prediction in ECM 10 (Enhanced Compression Model 10) To capture arbitrary edge orientations presented in natural video, ECM features 65 directional intra-frame prediction modes, similar to those in VVC. Planar and DC modes are used to predict blocks with smoothly varying textures.

[0050] When applying DIMD (decoder-side intra-frame mode derivation), the horizontal and vertical gradients are computed for each sample in the reconstructed neighboring sample templates to construct a gradient histogram (HoG). Up to five intra-frame modes are derived from the gradients, and these five predictors are combined with the planar mode predictor with weights derived from the gradient histogram.

[0051] When used, TIMD (Template-based Intra-mode Derivation) is applied in the same way on both the encoder and decoder sides. For each intra-prediction mode in the MPM list of the current block (supplemented with default modes if necessary), a prediction of the block template is calculated from the decoded reference sample of the template, and the SATD (Sum of Absolute Transform Differences) between that prediction and the block template is calculated. The two intra-prediction modes with the smallest SATD are selected as the TIMD modes.

[0052] Intra-Template Matching Prediction (IntraTMP) is an intra-prediction mode that copies a prediction block from the reconstructed portion of the current frame whose L-shaped template best matches the current template. For a predefined search range, the encoder searches for the template most similar to the current template in the reconstructed portion of the current frame and uses the corresponding block as the prediction block. The encoder then signals the use of this mode and performs the same prediction operation on the decoder side.

[0053] In intra-frame block copy (IBC), predictions are obtained from a reference block indicated by a block vector within the same frame.

[0054] To predict samples from a block of width W and height H, matrix-weighted intra-frame prediction (MIP) takes H reconstructed neighbor boundary samples from the left side of the block and W reconstructed neighbor boundary samples from the top side of the block as input. The predicted signal is generated based on averaging neighbor samples, performing matrix-vector multiplication using the averaged samples, and linear interpolation.

[0055] Spatial Geometric Partitioning Mode (SGPM) is an intra-frame mode of an inter-frame coding tool similar to Geometric Partitioning Mode (GPM), where both prediction components are generated by an intra-frame prediction process. In this mode, a candidate list is constructed, with each entry containing a partition and two intra-frame prediction modes. The selected candidate index is signaled.

[0056] Intra-frame MTS in ECM In VVC design, in addition to DCT2, DST7 and DCT8 transform kernels are also used. These kernels are used for intra-frame and inter-frame coding. Transform skipping can also be used. In VVC, the main transform is a separable transform. Five different transform pairs (horizontal and vertical transform pairs) are supported, including (DCT2, DCT2) and four MTS (Multiple Transform Selection) mode combinations, namely (DST7, DST7), (DST7, DCT8), (DCT8, DST7), and (DCT8, DCT8).

[0057] In ECM, additional master transforms are employed, including DCT5, DST4, DST1, and the identity transform (IDT). Furthermore, the MTS set is made dependent on the TU size and intra-frame mode information. For blocks predicted via IntraTMP, the DIMD process is used on the predicted blocks to derive the intra-frame mode for transform selection. Specifically, the horizontal and vertical gradients are computed for each predicted sample to construct a gradient histogram (HoG). The intra-frame prediction mode (VIPM) with the largest histogram magnitude value is then used to determine the MTS transform set (the set of possible transform pairs).

[0058] In general, 16 different TU sizes are considered, and for each TU size, 5 different categories are considered based on intra-frame mode information. For each category, 1, 4, or 6 different transform pairs (MTS candidates) are considered in the MTS transform set. The number of intra-frame MTS candidates is adaptively selected based on the sum of the absolute values ​​of the transform coefficients (between 1, 4, and 6 MTS candidates). This sum is compared with two fixed thresholds to determine the total number of allowed MTS candidates.

[0059] Although a total of 80 distinct categories (16 transform sizes multiplied by 5 categories) were considered, some of these categories could share the same set of transforms. In the ECM, there were 58 unique entries (fewer than 80) in the Result Lookup Table (LUT).

[0060] For angular modes, joint symmetry in TU shape and intra-frame prediction is considered. Therefore, mode i (i>34) with TU shape A×B will be mapped to the same category as mode j = (68 – i) with TU shape B×A. However, for each transform pair, the order of the horizontal and vertical transform kernels is swapped. For example, a 16×4 block with mode 18 (horizontal prediction) and a 4×16 block with mode 50 (vertical prediction) are mapped to the same category. However, the vertical and horizontal transform kernels are swapped. For wide-angle modes, the closest regular angular mode is used to determine the transform set. For example, mode 2 is used for all modes between -2 and -14. Similarly, mode 66 is used for modes 67 through 80. Furthermore, a dedicated mode index is assigned to the MIP, resulting in a total of 36 possible mode entries in the LUT.

[0061] Figure 4 The example shown is a transformation set selection in a LUT for a given TU size and intra-frame mode, where the transformation set (TrSet i) is selected based on the TU size (sizeIdx) and intra-frame mode (modeIdx).

[0062] IDT is applied to blocks of size 16×16 or smaller whose intra-frame mode is near in both the horizontal and vertical intra-frame directions, where "near" is defined by a threshold depending on the block size. If the transform index is equal to 3 and the block satisfies the above conditions, then the horizontal and / or vertical identity transform is applied.

[0063] LFNST in ECM The transform coefficients from the main transform can be further transformed using a non-separable transform applied to the low-frequency portion. This is called the Low-Frequency Non-Separable Transform (LFNST). The main idea of ​​this transform stage is to further remove signal redundancy not captured by the separable two-dimensional first-order transforms (DCT-II and MTS). The transform matrix is ​​derived through offline training, which uses principal component analysis to minimize the correlation between the transform coefficients.

[0064] In VVC, LFNST uses four transform sets and two inseparable transform matrices / kernels (candidates) for each transform set. The mapping from intra-prediction modes to transform sets is predefined. For each LFNST transform set, the selected inseparable quadratic transform candidates are further specified by an LFNST index explicitly indicated by a signal.

[0065] In ECM, the LFNST design in VVC is extended as follows: • The number of LFNST sets (N) and the number of candidates in the set (C) are expanded to N = 35 and C = 3, and the LFNST set (lfnstTrSetIdx) for a given intra-frame mode (predModeIntra) is derived according to the following formula: For predModeIntra<0, lfnstTrSetIdx equals 2. For predModeIntra in [0,34], lfnstTrSetIdx = predModeIntra For predModeIntra in [35, 66], lfnstTrSetIdx = 68 – predModeIntra • Three distinct kernels, LFNST4, LFNST8, and LFNST16, are defined to indicate the LFNST kernel set, which are applied to 4×N / N×4 (N≥4), 8×N / N×8 (N≥8), and M×N (M, N≥16), respectively.

[0066] The mapping from intra-prediction modes to these sets is shown in Table 1.

[0067] Table 1. Mapping of Intra-Prediction Modes to LFNST Set Indices

[0068] The kernel dimension is specified by the following formula: (LFSNT4, LFNST8 LFNST16 = (16×16, 32×64, 32×96) Forward LFNST is applied to the upper left low-frequency region, known as the region of interest (ROI). When LFNST is applied, the principal transform coefficients in regions other than the ROI are set to zero, which is unchanged compared to the VVC standard.

[0069] ROI for LFNST16 such as Figure 5 As shown, it consists of six 4×4 sub-blocks that are consecutive in the scan order. Since the number of input samples is 96, the transformation matrix used for the forward LFNST16 can be R×96. In the ECM, R is chosen to be 32, that is, 32 coefficients (two 4×4 sub-blocks) are generated from the forward LFNST16 accordingly, which are placed in the coefficient scan order.

[0070] ROI for LFNST8, such as Figure 6 As shown. The forward LFNST8 matrix can be R×64, and R is chosen to be 32. The generated coefficients are positioned in the same way as LFNST16.

[0071] NSPT in ECM NSPT (Inseparable Master Transform) is designed to replace two transform stages (DCT2 followed by LFNST) with a single inseparable transform. This is only permitted for applications such as... Figure 7 The small block shown.

[0072] All NSPTs consist of 35 sets and 3 candidates from each set (similar to the current LFNST). The kernel of an NSPT has the following shape: •NSPT4×4:16×16 •NSPT4×8 / NSPT8×4:32×20 •NSPT8×8: 64×32 •NSPT4×16 / NSPT16×4:64×24 •NSPT8×16 / NSPT16×8:128×40 Therefore, NSPT4×8 / NSPT8×4, NSPT8×8, NSPT4×16 / NSPT16×4 and NSPT8×16 / NSPT16×8 were used to set 12, 32, 40 and 88 coefficients to zero, respectively.

[0073] Multi-transform set selection for LFNST / NSPT In ECM, the LFNST / NSPT transform set is implicitly determined by the Intra Prediction Mode (IPM). For blocks encoded in planar, DC, or directional modes, the IPM is set to the Intra Prediction Mode itself. For DIMD-coded blocks, the IPM (VIPM for transform selection) is set to the optimal mode derived from the DIMD process using neighboring reconstructed pixels. For TIMD-coded blocks, the IPM (VIPM for transform selection) is set to the optimal mode derived from the TIMD process. For MIP or IntraTMP-coded blocks, the IPM (VIPM for transform selection) is set to the optimal mode derived from the DIMD process using prediction. For SGPM-coded blocks, the IPM (VIPM for transform selection) is set to the mode corresponding to the segmentation direction of the SGPM.

[0074] DIMD, TIMD, SGPM, MIP, and IntraTMP employ prediction strategies different from common intra-frame prediction modes such as planar, DC, and directional modes. DIMD, TIMD, SGPM, and IntraTMP allow for multiple prediction combinations. MIP uses matrix computation for prediction. IntraTMP references the reconstructed region in the current frame. The prediction residuals may exhibit characteristics different from the derived IPM (virtual IPM).

[0075] Multiple Transform Set Selection (MTSS) allows CUs encoded with DIMD, TIMD, MIP, SGPM, and IntraTMP to select an LFNST / NSPT transform set from two candidate sets. If (1) the current block is encoded with DIMD, TIMD, MIP, SGPM, or IntraTMP, and (2) LFNST / NSPT is used, an additional bin (binary bits) is used to indicate whether to select the first or second candidate transform set. The first candidate transform set remains the same as the current ECM. The second candidate corresponds to another IPM derived through the DIMD process utilizing adjacent reconstructed pixels. In particular, if fusion is applied to TIMD-encoded blocks, the second TIMD IPM is considered to derive the second candidate set. For SGPM-encoded blocks, the two IPMs used by SGPM are considered to derive the second candidate set. The difference between the first and second IPMs should be greater than 4 to maintain diversity.

[0076] Multi-transform set fusion For angular intra-prediction modes, residual characteristics are significantly correlated with the intra-prediction mode of the block. They tend to have larger absolute values ​​when samples are far from the reference sample, unlike residuals from inter-frame, IBC, MIP, and IntraTMP modes. Therefore, the VIPM used to select the LFNST / NSPT transform set for these blocks does not reflect residual characteristics as well as it does for angular intra-prediction modes. To address this, as detailed above, an optimal transform set selection across multiple transform sets can be considered. However, this method introduces additional encoder complexity because the number of LFNST / NSPT RD checks increases from 3 to 6 for blocks using Multiple Transform Set Selection (MTSS). Furthermore, it requires additional signaling, as the optimal transform set index must be signaled to the decoder.

[0077] In this paper, we propose Multi-Transform Set Fusion (MTSF) as an alternative to MTSS. For modes using MTSF, no additional RD checks are performed, and no signaling is required to indicate which transform set the encoder has selected.

[0078] The proposed transform set fusion consists of kernels from different transform sets. In the examples below, we use three transform sets. However, this method can be applied to a number of transform sets. The transform sets considered are the VIPM1 transform set (i.e., the transform set corresponding to the VPM1 intra-frame mode), the VIPM2 transform set (the transform set corresponding to the VPM2 intra-frame mode), and the planar transform set (the transform set corresponding to the planar mode), as follows: Figure 8 As shown. Details of VIPM1 and VIPM2 for each prediction mode are given in Table 2. Here, "second IPM in DIMD HoG" refers to the intra-prediction mode in DIMD HoG that has the second largest histogram amplitude value.

[0079] Table 2. IPMs for predictive models used as VIPM1 and VIPM2.

[0080]

[0081] In one embodiment, the fusion of transform sets is predetermined and fixed. If the TU uses MTSF, a core is selected from each transform set in a specific order (fusion order) to create the final transform set. Here, the fusion order and which core is selected from each transform set (core selection) are known by the decoder to avoid signaling. For example, in Figure 9 In the final transformation set, the first kernel K1 is the first kernel from the VIPM1 set, the second kernel K2 is the second kernel from the VIPM2 set, and the third kernel K3 is the third kernel from the plane set.

[0082] Figure 10A method for reconstructing the final transform set according to this embodiment is shown. Figure 10 The method shown can be used at the encoder or decoder. Specifically, in step 1010, the encoder or decoder obtains an LFNST or NSPT matrix lookup table lowFreqTransMatrix[n][m] containing LFNST or NSPT kernels as two-dimensional matrices, where n = 0, ..., N-1 and m = 0, ..., C-1, where C specifies the number of kernels for each LFNST or NSPT transform set, and N specifies the number of LFNST or NSPT transform sets in the lookup table. In step 1020, it obtains a list of transform set candidates LfnstTrSetCand[i] indicating the fusion order, where i = 0, ..., nbTrSetCandidates-1, and the possible values ​​of LfnstTrSetCand[i] are in {0, 1, 2, ..., N-1}, where nbTrSetCandidates specifies the number of transform kernels in the final transform set. In step 1030, a list of transform indices LfnstIndices[i] indicating which kernel to select from each transform set is obtained, where i = 0, ..., nbTrSetCandidates-1, and the possible values ​​of LfnstIndices[i] are in {0, 1, 2, ..., C-1}. For each candidate position (1040) in the final transform set, the selected LFNST or NSPT kernel is placed (1050) in the array finalLfnstTrSet: finalLfnstTrSet[i] = lowFreqTransMatrix[LfnstTrSetCand[i]][LfnstIndices[i]]. LfnstTrSetCand and LfnstIndices are known to the encoder and decoder and do not need to be signaled in the bitstream. As for Figure 9 In the example, nbTrSetCandidates = 3, LfnstTrSetCand = {VIPM1,VIPM2, plane}, and LfnstIndices = {0, 1, 2}.

[0083] It should be noted that the fusion order and core selection can be arbitrary, and are different from [other methods]. Figure 9 As shown. Note that even if the number of cores in the final transform set in the ECM is 3, the number of cores in the final transform set can be different from 3, for example, nbTrSetCandidates = 1, 2 or 4.

[0084] On the encoder side, VIPM1 and VIPM2 are computed for the current block to construct the final transform set. Then, a rate-distortion optimization step for LFNST / NSPT core selection is performed to test all candidate cores in the final transform set, e.g., selecting a core from K1, K2, and K3. The transform coefficients are then obtained by applying the optimal LFNST / NSPT core, and the index of the optimal core in the set (denoted as lfnstIdx) is signaled to the decoder.

[0085] On the decoder side, VIPM1 and VIPM2 are computed for the current block. Then, the final transform set is constructed based on the fusion of different transform sets. Finally, the final LFNST / NSPT kernel is selected from the transform set based on lfnstIdx, and the corresponding transform is applied as the inverse transform to the transform coefficients.

[0086] Figure 11 An encoder in the NSPT case according to an embodiment is shown. In step 1110, the encoder obtains the prediction residual. In step 1120, virtual intra-frame prediction modes VIPM1 and VIPM2 are calculated, for example, as shown in Table 2. In step 1130, for example, as shown in Table 2... Figure 9 and Figure 10 The NSPT transform set is constructed as shown. In step 1140, the encoder performs RDO (rate-distortion optimization) to select the optimal NSPT kernel from the kernels in the NSPT transform set. In step 1150, the encoder uses the selected NSPT kernel to transform the prediction residuals into transform coefficients. In step 1160, the indices corresponding to the kernels selected in the final transform set are encoded.

[0087] Figure 12 The decoder in the NSPT case according to an embodiment is shown. In step 1210, the decoder obtains the transform coefficients. In step 1220, the decoder decodes the transform index. In step 1230, virtual intra-frame prediction modes VIM1 and VIM2 are calculated, for example, as shown in Table 2. In step 1240, for example, as shown in Table 2... Figure 9 and Figure 10 The NSPT transform set is constructed as shown. In step 1250, the decoder uses the NSPT kernel corresponding to the transform index in the final transform set to perform an inverse transform on the transform coefficients to obtain the prediction residuals. In step 1260, the prediction residuals are reconstructed.

[0088] In the case of LFNST, the transform operation first applies the master forward transform to the residuals, and then applies the selected LFNST kernel to the master transform coefficients in step 1150. On the decoder side, the inverse transform operation first reconstructs the master transform coefficients with the selected LFNST kernel, and then applies the master inverse transform in step 1250 to obtain the residuals.

[0089] In one variant, the fixed order in the final transformation set can be modified. For example, the order could be: {plane, VIPM1, VIPM2}, instead of... Figure 9 {VIPM1, VIPM2, plane} in the context.

[0090] In one variant, we consider only VIPM1 and the plane set to construct the final transform set. For example, we select one kernel from the plane LFNST / NSPT set and two kernels from the LFNST / NSPT set corresponding to VIPM1.

[0091] In one variant, the kernel from VIPM2 is considered in the fusion only if the absolute difference between VIPM1 and VIPM2 exceeds a certain threshold. Otherwise, only the kernel from VIPM1 is considered.

[0092] In one variant, if the absolute difference between VIPM1 and VIPM2 exceeds a certain threshold (meaning DIMD does not allow the derivation of a sharp direction), we replace the VIPM2 kernel in the final transform set with a kernel from the plane set. For example, we select one kernel from the plane LFNST / NSPT set and two kernels from the LFNST / NSPT set corresponding to VIPM1. Otherwise, we consider only the kernel from VIPM1.

[0093] In one variant, the proposed method is applied to an explicit intra-MTS for primary transform selection. In this case, the transform set consists of primary horizontal and vertical transform pairs, and the index in the set is denoted as mts_idx.

[0094] Multi-transform set fusion order based on VIM values One problem with the above method is that we always use the same LFNST / NSPT kernel from each transform set used in the fusion. In this embodiment, the final transform set design is based on a change in the VIPM1 value to avoid the exclusive use of the same kernel from each transform set. Therefore, the final transform set is constructed, for example, based on the value of VIPM1%3, as follows: Figure 13 As shown, the kernel changes based on the DIMD mode, which can improve performance because it provides additional options to the encoder.

[0095] Specifically, such as Figure 13 As shown, check the value of VIPM1%3 (1310). Depending on the value of VIPM1%3, the final transform set is constructed as follows. Note that in this example, LfnstIndices is always {0, 1, 2}, but in general, they can be different.

[0096] -If VIPM1%3 = 0 (1320): LfnstTrSetCand = {plane, VIPM2, VIPM1}, and LfnstIndices = {0, 1, 2}; -If VIPM1%3 = 1 (1330): LfnstTrSetCand = {VIPM1, plane, VIPM2}, and LfnstIndices = {0, 1, 2}; -If VIPM1%3 = 2 (1340): LfnstTrSetCand = {VIPM2, VIPM1, plane}, and LfnstIndices = {0, 1, 2}.

[0097] On the encoder side, VIPM1 and VIPM2 are calculated for the current block, and the final transform set is constructed based on the value of VIPM1, such as... Figure 13 As shown. Then, a rate-distortion optimization step for LFNST / NSPT kernel selection is performed in the final transform set. The transform coefficients are then obtained by applying the optimal LFNST / NSPT kernel, and the index of the optimal kernel in the set (denoted as lfnstIdx) is signaled to the decoder.

[0098] On the decoder side, VIPM1 and VIPM2 are computed for the current block. Then, the final transform set is constructed based on the value of VIPM1, such as... Figure 13 As shown. Finally, based on lfnstIdx, the final LFNST / NSPT kernel is selected from the transform set, and the corresponding transform is applied as the inverse transform to the transform coefficients.

[0099] In one variant, we consider only VIPM1 and the plane set to construct the final transform set. For example, we select one kernel from the plane LFNST / NSPT set and two kernels from the LFNST / NSPT set corresponding to VIPM1.

[0100] In one variant, we consider only VIPM1 and the plane set to construct the final transform set. For example, for each VIPM1%3 value, we select one kernel from the plane LFNST / NSPT set and two kernels from the LFNST / NSPT set corresponding to VIPM1.

[0101] In one variant, VIPM2 is considered in the final transform set only if the absolute difference between the VIPM1 and VIPM2 indices exceeds a certain threshold. Otherwise, the kernel from the VIPM2 transform set in the final transform set is replaced by the kernel from VIPM1.

[0102] In one variant, the proposed method is applied to the intra-frame MTS used for the main transform. In this case, the transform set consists of main horizontal and vertical transform pairs, and the index in the set is denoted as mts_idx.

[0103] This document describes various methods, each including one or more steps or actions for implementing the described method. Unless a specific order of steps or actions is required for proper operation of the method, the order and / or use of specific steps and / or actions can be modified or combined. Furthermore, terms such as "first" and "second" can be used in various embodiments to modify elements, components, steps, operations, etc., e.g., "first decoding" and "second decoding." The use of such terms does not imply an ordering of the modified operations unless specifically required. Therefore, in this example, the first decoding does not need to be performed before the second decoding and can occur, for example, before, during, or within a time period overlapping with the second decoding.

[0104] The various methods and other aspects described in this application can be used to modify modules of the video encoder 200 and decoder 300, for example... Figure 2 and Figure 3 The transformation and inverse transformation modules (225, 250, 350) are shown. Furthermore, this aspect is not limited to ECM, VVC, or HEVC, and can be applied to, for example, other standards and recommendations, as well as any extensions of such standards and recommendations. Unless otherwise indicated or technically excluded, the aspects described in this application may be used individually or in combination.

[0105] Various numerical values ​​are used in this application. Specific values ​​are used for illustrative purposes, and the aspects described are not limited to these specific values.

[0106] Various implementations involve decoding. As used herein, “decoding” can encompass all or part of the process performed, for example, on a received encoded sequence to produce a final output suitable for display. In various embodiments, such a process includes one or more processes typically performed by a decoder, such as entropy decoding, inverse quantization, inverse transform, and differential decoding. Whether the phrase “decoding process” is intended to specifically refer to a subset of operations or to refer generally to a broader decoding process will be clear from the specific context of the description and is believed to be readily understood by those skilled in the art.

[0107] Various implementations involve encoding. In a manner similar to the above discussion of "decoding," the term "encoding," as used herein, can encompass, for example, all or part of the process performed on an input video sequence to produce an encoded bitstream.

[0108] The implementations and aspects described herein can be implemented, for example, in methods or processes, apparatus, software programs, data streams, or signals. Even if discussed only in the context of a single form of implementation (e.g., discussed only as a method), implementations of the discussed features can be implemented in other forms (e.g., apparatus or program). Apparatus can be implemented, for example, in suitable hardware, software, and firmware. Methods can be implemented, for example, in apparatus, such as a processor, which generally refers to processing devices, including, for example, computers, microprocessors, integrated circuits, or programmable logic devices. Processors also include communication devices, such as computers, cellular phones, portable / personal digital assistants (“PDAs”), and other devices that facilitate information communication between end users.

[0109] References to “an embodiment” or “an embodiment” or “a implementation” or “an implementation” and other variations thereof mean that a particular feature, structure, characteristic, etc., described in connection with that embodiment is included in at least one embodiment. Therefore, the appearance of the phrases “in an embodiment” or “in an embodiment” or “in an implementation” or “in an implementation” and any other variations in various places throughout this application does not necessarily refer to the same embodiment.

[0110] Furthermore, this application may refer to "determining" various types of information. Determining information may include, for example, one or more of the following: estimation information, calculation information, prediction information, or information retrieved from memory.

[0111] Furthermore, this application may refer to "accessing" various types of information. Accessing information may include, for example, receiving information, retrieving information (e.g., from memory), storing information, moving information, copying information, calculating information, determining information, predicting information, or estimating information, or one or more of these.

[0112] Furthermore, this application may refer to "receiving" various types of information. "Receiving," like "accessing," is intended to be a broad term. Receiving information may include, for example, accessing information or retrieving information (e.g., from memory) from one or more sources. Moreover, "receiving" generally relates in some way to operations such as storing information, processing information, sending information, moving information, copying information, erasing information, calculating information, determining information, predicting information, or estimating information.

[0113] It should be understood that the use of any of the following “ / ”, “and / or”, and “at least one of…”, such as in the cases of “A / B”, “A and / or B”, and “at least one of A and B”, is intended to cover selecting only the first listed option (A), or only the second listed option (B), or both options (A and B). As another example, in the cases of “A, B, and / or C” and “at least one of A, B, and C”, this wording is intended to cover selecting only the first listed option (A), or only the second listed option (B), or only the third listed option (C), or only the first and second listed options (A and B), or only the first and third listed options (A and C), or only the second and third listed options (B and C), or all three options (A, B, and C). As will be apparent to those skilled in the art and related fields, this can be extended to as many items as possible listed.

[0114] Furthermore, as used herein, the term "signal" specifically refers to instructing the corresponding decoder to do something. For example, in some embodiments, the encoder signals the quantization matrix for dequantization. In this way, in embodiments, the same parameters are used on both the encoder and decoder sides. Thus, for example, the encoder can send (explicit signaling) specific parameters to the decoder so that the decoder can use the same specific parameters. Conversely, if the decoder already has specific parameters as well as other parameters, signaling can be used without transmission (implicit signaling) to simply allow the decoder to know and select specific parameters. Bit savings are achieved in many embodiments by avoiding the transmission of any actual functionality. It should be understood that signaling can be done in various ways. For example, in many embodiments, one or more syntax elements, flags, etc., are used to signal information to the corresponding decoder. While the foregoing refers to the verb form of the term "signal," the term "signal" can also be used as a noun herein.

[0115] As will be apparent to those skilled in the art, implementations can generate various signals formatted to carry information that can, for example, be stored or transmitted. The information may include, for example, instructions for performing a method or data generated by one of the described implementations. For example, the signal may be formatted to carry a bitstream of the described embodiments. Such a signal may be formatted, for example, as an electromagnetic wave (e.g., using the radio frequency portion of a spectrum) or a baseband signal. Formatting may include, for example, encoding the data stream and modulating a carrier wave with the encoded data stream. The information carried by the signal may be, for example, analog or digital information. The signal may be transmitted via a variety of different wired or wireless links as known. The signal may be stored on a processor-readable medium.

Claims

1. An encoding method, comprising: Select the first intra-frame prediction mode and the second intra-frame prediction mode for the blocks of the image; Obtain a first transform set and a second transform set corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode, respectively; A transform set is obtained based on the first transform set and the second transform set, wherein the transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bit stream; Obtain the transformation kernel from the transformation set; as well as The block is encoded based on the transformation kernel.

2. A decoding method, comprising: Select the first intra-frame prediction mode and the second intra-frame prediction mode for the blocks of the image; Obtain a first transform set and a second transform set corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode, respectively; A transform set is obtained based on the first transform set and the second transform set, wherein the transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bit stream; Obtain the transformation kernel from the transformation set; as well as The block is decoded based on the transform kernel.

3. An apparatus for encoding, comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to: Select the first intra-frame prediction mode and the second intra-frame prediction mode for the blocks of the image; Obtain a first transform set and a second transform set corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode, respectively; A transform set is obtained based on the first transform set and the second transform set, wherein the transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bit stream; Obtain the transformation kernel from the transformation set; as well as The block is encoded based on the transformation kernel.

4. An apparatus for decoding, comprising one or more processors and at least one memory coupled to said one or more processors, wherein said one or more processors are configured to: Select the first intra-frame prediction mode and the second intra-frame prediction mode for the blocks of the image; Obtain a first transform set and a second transform set corresponding to the first intra-frame prediction mode and the second intra-frame prediction mode, respectively; A transform set is obtained based on the first transform set and the second transform set, wherein the transform kernel for the transform set is selected from the first transform set and the second transform set, and wherein the selection from the first transform set and the second transform set is not signaled in the bit stream; Obtain the transformation kernel from the transformation set; as well as The block is decoded based on the transform kernel.

5. The method of claim 1 or 2, or the apparatus of claim 3 or 4, wherein the index corresponding to the transform core in the transform set is signaled in the bit stream.

6. The method of any one of claims 1, 2, and 5, further comprising, or the apparatus of any one of claims 3-5, wherein the one or more processors are further configured to perform: A third transform set corresponding to a planar intra-prediction mode is obtained, wherein the acquisition of the transform set is also based on the third transform set, and wherein the transform kernel for the transform set is selected from the first transform set, the second transform set, and the third transform set.

7. The method of any one of claims 1, 2, 5 and 6, or the apparatus of any one of claims 3-6, wherein a transformation kernel is selected from each of the first transformation set and the second transformation set based on a predetermined rule to form the transformation set.

8. The method of claim 7, or the apparatus of claim 7, wherein the transform kernels selected from the first transform set and the second transform set are placed in the transform set according to a predetermined order.

9. The method of any one of claims 1, 2, and 5-8, or the apparatus of any one of claims 3-8, wherein the first intra-frame prediction mode and the second intra-frame prediction mode are angular, planar, or DC intra-frame prediction modes, and wherein the block is encoded or decoded in an intra-frame mode or inter-frame mode other than angular, planar, or DC intra-frame prediction modes.

10. The method of claim 9, or the apparatus of claim 9, wherein when the block is encoded in DIMD, MIP, IntraTMP, IBC, or inter-frame mode, the first intra-prediction mode and the second intra-prediction mode correspond to the largest and second largest values ​​in the gradient histogram, and wherein the first intra-prediction mode and the second intra-prediction mode are used to determine the first transform set and the second transform set, respectively.

11. The method of claim 9, or the apparatus of claim 9, wherein when the block is encoded in SGPM, the first intra-prediction mode corresponds to the partitioning direction of the block, and the second intra-prediction mode corresponds to the intra-mode of the first SGPM partition or the second SGPM partition, and wherein the first intra-prediction mode and the second intra-prediction mode are used to determine the first transform set and the second transform set, respectively.

12. The method of any one of claims 1, 2, and 5-11, further comprising, or the apparatus of any one of claims 3-11, wherein the one or more processors are further configured to perform: Obtain the difference between the mode indices of the first intra-prediction mode and the second intra-prediction mode, wherein in response to the difference being greater than a value, only the first transform set is used when forming the transform set.

13. The method of any one of claims 1, 2 and 5-12, or the apparatus of any one of claims 3-12, wherein the transformation kernel is used for a secondary transformation.

14. The method of any one of claims 1, 2 and 5-12, or the apparatus of any one of claims 3-12, wherein the transformation core is used for the main transformation.

15. A signal comprising video data, formed by performing the method as described in any one of claims 1 and 5-14.