Methods and apparatus for low-frequency non-separable transform with multiple transform sets in a video coding system
LFNST with multiple transform sets addresses the complexity and efficiency challenges in video coding by optimizing transform selection based on statistical criteria, reducing computational load and enhancing coding efficiency and quality.
Patent Information
- Application Number
- PCT/CN2025/089482
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-10-23
- Filing Date
- 2025-04-17
- Publication Date
- 2025-10-23
AI Technical Summary
Existing video coding systems face challenges in efficiently handling low-frequency components due to high computational complexity and memory requirements in non-separable transforms, particularly in versatile video coding (VVC), which affects the overall coding efficiency and video quality.
The implementation of Low-Frequency Non-Separable Transform (LFNST) with multiple transform sets, including reduced non-separable transforms and conditional application based on statistical information and coefficient significance, to optimize transform selection and reduce computational complexity while maintaining video quality.
This approach reduces computational complexity and memory usage while improving coding efficiency and video quality by selectively applying LFNST based on statistical criteria, enhancing the performance of video coding systems.
Smart Images

Figure CN2025089482_23102025_PF_FP_ABST
Abstract
Description
METHODS AND APPARATUS FOR LOW-FREQUENCY NON-SEPARABLE TRANSFORM WITH MULTIPLE TRANSFORM SETS IN A VIDEO CODING SYSTEMCROSS REFERENCE TO RELATED APPLICATIONS
[0001] The present invention is a non-Provisional Application of and claims priority to U.S. Provisional Patent Application No. 63 / 636,609, filed on April 19, 2024, U.S. Provisional Patent Application No. 63 / 666,333, filed on July 1, 2024, U.S. Provisional Patent Application No. 63 / 668,366, filed on July 8, 2024 and U.S. Provisional Patent Application No. 63 / 710,654, filed on October 23, 2024. The U.S. Provisional Patent Applications are hereby incorporated by reference in their entireties.FIELD OF THE INVENTION
[0002] The present invention relates to video coding system. In particular, the present invention relates to signalling of LFNST / NSPT or conditioning the use of SBT LFNST or NSPT.BACKGROUND
[0003] Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (JVET) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) . The standard has been published as an ISO standard: ISO / IEC 23090-3: 2021, Information technology -Coded representation of immersive media -Part 3: Versatile video coding, published Feb. 2021. VVC is developed based on its predecessor HEVC (High Efficiency Video Coding) by adding more coding tools to improve coding efficiency and also to handle various types of video sources including 3-dimensional (3D) video signals.
[0004] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing. For Intra Prediction 110, the prediction data is derived based on previously coded video data in the current picture. For Inter Prediction 112, Motion Estimation (ME) is performed at the encoder side and Motion Compensation (MC) is performed based on the result of ME to provide prediction data derived from other picture (s) and motion data. Switch 114 selects Intra Prediction 110 or Inter Prediction 112 and the selected prediction data is supplied to Adder 116 to form prediction errors, also called residues. The prediction error is then processed by Transform (T) 118 followed by Quantization (Q) 120. The transformed and quantized residues are then coded by Entropy Encoder 122 to be included in a video bitstream corresponding to the compressed video data. The bitstream associated with the transform coefficients is then packed with side information such as motion and coding modes associated with Intra prediction and Inter prediction, and other information such as parameters associated with loop filters applied to underlying image area. The side information associated with Intra Prediction 110, Inter prediction 112 and in-loop filter 130, is provided to Entropy Encoder 122 as shown in Fig. 1A. When an Inter-prediction mode is used, a reference picture or pictures have to be reconstructed at the encoder end as well. Consequently, the transformed and quantized residues are processed by Inverse Quantization (IQ) 124 and Inverse Transformation (IT) 126 to recover the residues. The residues are then added back to prediction data 136 at Reconstruction (REC) 128 to reconstruct video data. The reconstructed video data may be stored in Reference Picture Buffer 134 and used for prediction of other frames.
[0005] As shown in Fig. 1A, incoming video data undergoes a series of processing in the encoding system. The reconstructed video data from REC 128 may be subject to various impairments due to a series of processing. Accordingly, in-loop filter 130 is often applied to the reconstructed video data before the reconstructed video data are stored in the Reference Picture Buffer 134 in order to improve video quality. For example, deblocking filter (DF) , Sample Adaptive Offset (SAO) and Adaptive Loop Filter (ALF) may be used. The loop filter information may need to be incorporated in the bitstream so that a decoder can properly recover the required information. Therefore, loop filter information is also provided to Entropy Encoder 122 for incorporation into the bitstream. In Fig. 1A, Loop filter 130 is applied to the reconstructed video before the reconstructed samples are stored in the reference picture buffer 134. The system in Fig. 1A is intended to illustrate an exemplary structure of a typical video encoder. It may correspond to the High Efficiency Video Coding (HEVC) system, VP8, VP9, H. 264 or VVC.
[0006] The decoder, as shown in Fig. 1B, can use some of the functional blocks as the encoder. For example, the decoder can reuse Inverse Quantization 124 and Inverse Transform 126; however, Transform 118 and Quantization 120 are not needed at the decoder. Instead of Entropy Encoder 122, the decoder uses an Entropy Decoder 140 to decode the video bitstream into quantized transform coefficients and needed coding information (e.g. ILPF information, Intra prediction information and Inter prediction information) . The Intra prediction 150 at the decoder side does not need to perform the mode search. Instead, the decoder only needs to generate Intra prediction according to Intra prediction information received from the Entropy Decoder 140. Furthermore, for Inter prediction, the decoder only needs to perform motion compensation (MC 152) according to Inter prediction information received from the Entropy Decoder 140 without the need for motion estimation.
[0007] I. 1 Low-Frequency Non-Separable Transform (LFNST)
[0008] In VVC, LFNST is applied between forward primary transform and quantization (at encoder) and between de-quantization and inverse primary transform (at decoder side) as shown in Fig. 2. As shown in Fig. 2, after Forward Primary Transform 210, Forward Low-Frequency Non-Separable Transform LFNST 220 is applied to top-left region 222 of the Forward Primary Transform output, for example, 16 coefficients for 4x4 forward LFNST and / or 64 coefficients for 8x8 forward LFNST. In LFNST, 4x4 non-separable transform or 8x8 non-separable transform is applied according to block size. For example, 4x4 LFNST is applied for small blocks (i.e., min (width, height) < 8) and 8x8 LFNST is applied for larger blocks (i.e., min (width, height) > 4) . After LFNST, the transform coefficients are quantized by Quantization 230. To reconstruct the input signal, the quantized transform coefficients are de-quantized using De-Quantization 240 to obtain the de-quantized transform coefficients. Inverse LFNST 250 is applied to the top-left region 252 (8 coefficients for 4x4 inverse LFNST or 16 coefficients for 8x8 inverse LFNST) . After invers LFNST, inverse Primary Transform 260 is applied to recover the input signal.
[0009] Application of a non-separable transform, which is being used in LFNST, is described as follows using input as an example. To apply 4x4 LFNST, the 4x4 input block X, is first represented as a vector
[0010] The non-separable transform is calculated as where indicates the transform coefficient vector, and T is a 16x16 transform matrix. The 16x1 coefficient vector is subsequently re-organized as 4x4 block using the scanning order for that block (horizontal, vertical or diagonal) . The coefficients with smaller index will be placed with the smaller scanning index in the 4x4 coefficient block.
[0011] I. 1.1 Reduced non-separable transform
[0012] LFNST is based on direct matrix multiplication approach to apply non-separable transform so that it is implemented in a single pass without multiple iterations. However, the non-separable transform matrix dimension needs to be reduced to minimize computational complexity and memory space to store the transform coefficients. Hence, reduced non-separable transform (or RST) method is used in LFNST. The main idea of the reduced non-separable transform is to map an N (N is commonly equal to 64 for 8x8 NSST) dimensional vector to an R dimensional vector in a different space, where N / R (R < N) is the reduction factor. Hence, instead of NxN matrix, RST matrix becomes an R×N matrix as follows: where the R rows of the transform are R bases of the N dimensional space.
[0013] The inverse transform matrix for RT is the transpose of its forward transform. For 8x8 LFNST, a reduction factor of 4 is applied, and 64x64 direct matrix, which is conventional 8x8 non-separable transform matrix size, is reduced to16x48 direct matrix. Hence, the 48×16 inverse RST matrix is used at the decoder side to generate core (primary) transform coefficients in 8×8 top-left regions. When16x48 matrices are applied instead of 16x64 with the same transform set configuration, each of which takes 48 input data from three 4x4 blocks in a top-left 8x8 block excluding right-bottom 4x4 block. With the help of the reduced dimension, memory usage for storing all LFNST matrices is reduced from 10KB to 8KB with reasonable performance drop. In order to reduce the complexity, LFNST is restricted to be applicable only if all coefficients outside the first coefficient sub-group are non-significant. Hence, all primary-only transform coefficients have to be zero when LFNST is applied. This allows conditioning the LFNST index signalling on the last-significant position, and hence avoids the extra coefficient scanning in the current LFNST design, which is needed for checking for significant coefficients at specific positions only.
[0014] The worst-case handling of LFNST (in terms of multiplications per pixel) restricts the non-separable transforms for 4x4 and 8x8 blocks to 8x16 and 8x48 transforms, respectively. In those cases, the last-significant scan position has to be less than 8 when LFNST is applied, for other sizes less than 16. For blocks with a shape of 4xN and Nx4 and N > 8, the proposed restriction implies that the LFNST is now applied only once, and to the top-left 4x4 region only. As all primary-only coefficients are zero when LFNST is applied, the number of operations needed for the primary transforms is reduced in such cases. From encoder perspective, the quantization of coefficients is remarkably simplified when LFNST transforms are tested. A rate-distortion optimized quantization has to be done at maximum for the first 16 coefficients (in scan order) , the remaining coefficients are enforced to be zero.
[0015] I. 1.2 LFNST transform selection
[0016] There are 4 transform sets and 2 non-separable transform matrices (kernels) in total per transform set are used in LFNST. The mapping from the intra prediction mode to the transform set is pre-defined as shown in Table 1. If one of three CCLM modes (INTRA_LT_CCLM, INTRA_T_CCLM or INTRA_L_CCLM) is used for the current block (i.e., 81 <= predModeIntra <= 83) , transform set 0 is selected for the current chroma block. For each transform set, the selected non-separable secondary transform candidate is further specified by the explicitly signalled LFNST index. The index is signalled in a bit-stream once per Intra CU after transform coefficients. Table 1. Transform selection table
[0017] I. 1.3 LFNST index signalling and interaction with other tools
[0018] Since LFNST is restricted to be applicable only if all coefficients outside the first coefficient sub-group are non-significant, LFNST index coding depends on the position of the last significant coefficient. In addition, the LFNST index is context coded, but does not depend on intra prediction mode, and only the first bin is context coded. Furthermore, LFNST is applied for intra CU in both intra and inter slices, and for both luma and chroma. If a dual tree is enabled, LFNST indices for luma and chroma are signalled separately. For inter slice (the dual tree is disabled) , a single LFNST index is signalled and used for both luma and chroma.
[0019] Considering that a large CU greater than 64x64 is implicitly split (TU tiling) due to the existing maximum transform size restriction (64x64) , an LFNST index search could increase data buffering by four times for a certain number of decode pipeline stages. Therefore, the maximum size that LFNST is allowed is restricted to 64x64. Note that LFNST is enabled with DCT2 only. The LFNST index signalling is placed before MTS index signalling.
[0020] The use of scaling matrices for perceptual quantization is not evident that the scaling matrices that are specified for the primary matrices may be useful for LFNST coefficients. Hence, the use of the scaling matrices for LFNST coefficients is not allowed. For single-tree partition mode, chroma LFNST is not applied.
[0021] I. 2 Secondary Transformation: LFNST Extension with Large Kernel
[0022] The LFNST design in VVC is extended as follows: ● The number of LFNST sets (S) and candidates (C) are extended to S=35 and C=3, and the LFNST set (lfnstTrSetIdx) for a given intra mode (predModeIntra) is derived according to the following formula: ○ For predModeIntra < 2, lfnstTrSetIdx is equal to 2 ○ lfnstTrSetIdx = predModeIntra, for predModeIntra in [0, 34] ○ lfnstTrSetIdx = 68 –predModeIntra, for predModeIntra in [35, 66] ● Three different kernels, LFNST4, LFNST8, and LFNST16, are defined to indicate LFNST kernel sets, which are applied to 4xN / Nx4 (N≥4) , 8xN / Nx8 (N≥8) , and MxN (M, N≥16) , respectively.
[0023] The kernel dimensions are specified by: (LFSNT4, LFNST8*, LFNST16*) = (16x16, 32x64, 32x96) .
[0024] The forward LFNST is applied to top-left low frequency region, which is called Region-Of-Interest (ROI) . When LFNST is applied, primary-transformed coefficients that exist in the region other than ROI are zeroed out, which is not changed from the VVC standard.
[0025] The ROI for LFNST16 is depicted in Fig. 3A. It consists of six 4x4 sub-blocks, which are consecutive in scan order. Since the number of input samples is 96, transform matrix for forward LFNST16 can be Rx96. R is chosen to be 32 in this case, 32 coefficients (two 4x4 sub-blocks) are generated from forward LFNST16 accordingly, which are placed following the coefficient scan order.
[0026] The ROI for LFNST8 is shown in Fig. 3B. The forward LFNST8 matrix can be Rx64 and R is chosen to be 32. The generated coefficients are located in the same manner as with LFNST16.
[0027] The mapping from intra prediction modes to these sets is shown in Table 2. Table 2. Mapping of intra prediction modes to LFNST set index
[0028] I. 3 Matrix Based Intra Prediction Replacing Conventional Intra Modes
[0029] A matrix of weights, which are defined for a block shape and intra mode, is introduced, those weights are multiplied by the neighbouring reference template to derive the prediction samples replacing conventional intra prediction. The weights are applied to the reference samples of the L shaped causal neighbouring template as shown in the Fig. 4.
[0030] The reference samples in the causal neighbourhood are denoted as r, and F (x, y) is the matrix of weights. Then the prediction P (x, y) can be derived as: P (x, y) = ∑k F (x, y, k) *r (k) , where k denotes the index of the reference sample in the template.
[0031] The prediction is used for block size with both width and height up to 32 (except for 4x32, 32x4, 8x32 and 32x8) . The template size is 2 for blocks with both width and height up to 16 and it is only used for mode 0, 1, and (2+2*k) . For other blocks, template size is set to 1; is used for mode 0, 1, and (2+4*k) ; prediction is only performed for 16x16 positions, and the rest of the samples are generated by bilinear interpolation. For all block sizes, block shape and mode-based symmetry is used. Reference length is set to W and H for modes greater than 18 and less than 50 and set to 2*W and 2*H otherwise.
[0032] I. 4 Multi-Hypothesis Prediction (MHP)
[0033] In the multi-hypothesis inter prediction mode (JVET-M0425) , one or more additional motion-compensated prediction signals are signalled, in addition to the conventional bi-prediction signal. The resulting overall prediction signal is obtained by sample-wise weighted superposition. With the bi-prediction signal p_bi and the first additional inter prediction signal / hypothesis h_3, the resulting prediction signal p_3 is obtained as follows: p_3= (1-α) p_bi+αh_3.
[0034] The weighting factor α is specified by the new syntax element add_hyp_weight_idx, according to the following mapping: add_hyp_weight_idx α 0 1 / 4 1 -1 / 8.
[0035] Similar to the above case, more than one additional prediction signal can be used. The resulting overall prediction signal is accumulated iteratively with each additional prediction signal: p_ (n+1) = (1-α_ (n+1) ) p_n+α_ (n+1) h_ (n+1) .
[0036] The resulting overall prediction signal is obtained as the last p_n (i.e., the p_n having the largest index n) . Within this EE, up to two additional prediction signals can be used (i.e., n is limited to 2) .
[0037] The motion parameters of each additional prediction hypothesis can be signalled either explicitly by specifying the reference index, the motion vector predictor index, and the motion vector difference, or implicitly by specifying a merge index. A separate multi-hypothesis merge flag distinguishes between these two signalling modes.
[0038] For inter AMVP mode, MHP is only applied if non-equal weight in BCW is selected in bi-prediction mode.
[0039] Combination of MHP and BDOF is possible. However, the BDOF is only applied to the bi-prediction signal part of the prediction signal (i.e., the ordinary first two hypotheses) .
[0040] I. 5 Subblock Transform (SBT) Mode:
[0041] The SBT mode chooses a sub-partition of the residual block of an inter-predicted CU to be coded and skips the remaining portion. The coded residual sub-partition can be half or one-quarter size of the CU and an MTS transform type for the coded residual is implicitly inferred. The coded half or quarter sub-partition can be either the left, right, top or bottom part, leading to an overall number of 8 modes to be signalled per CU.
[0042] I. 6 LFNST / NSPT for SBT-coded blocks (proposed in JVET-AI0050)
[0043] It is proposed to enable LFNST / NSPT for SBT-coded blocks. A CU-level LFNST / NSPT index is signalled for an SBT-coded block to indicate the usage of LFNST / NSPT. When LFNST / NSPT is applied to an SBT-coded CU, the TU with non-zero residual will perform LFNST / NSPT, and the prediction signal within the TU region is used to derive the IPM for transform.
[0044] In the present invention, schemes for signalling for selecting a target set of LFNST / NSPT or conditioning the use of SBT LFNST / NSPT are disclosed. BRIEF SUMMARY OF THE INVENTION
[0045] A method and apparatus for video coding for using LFNST / NSPT are disclosed. According to this method, input data associated with a current block is received, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side. Multiple sets of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) are determined. A transform sub-group is determined from the multiple sets of LFNST or NSPT, wherein at least one of the multiple sets of LFNST or NSPT is excluded from the transform sub-group. A target transform set of LFNST or NSPT is selected from the multiple sets of LFNST or NSPT for the current block. Target syntax related to LFNST or NSPT kernel index is signalled or parsed only when the target transform set of LFNST or NSPT belongs to the transform sub-group. Forward transform is applied to the residual data according to a selected transform kernel of the target transform set of LFNST or NSPT at the encoder side to generate transformed data at the encoder side, or inverse transform is applied to the coded transformed residual data according to the selected transform kernel of the target transform set of LFNST or NSPT to derive reconstructed residual data, wherein the selected transform kernel of the target transform set of LFNST or NSPT is indicated by the LFNST or NSPT kernel index. The transformed data at the encoder side or the reconstructed residual data at the decoder side is provided.
[0046] In one embodiment, only when an LFNST or NSPT transform set related syntax indicates no alternative transform set being used on the LFNST or NSPT, the target syntax related to LFNST / NSPT kernel index is signalled or parsed. In one embodiment, only when an LFNST or NSPT transform set related syntax indicates that a target alternative transform set used on the LFNST or NSPT belongs to one or more special transform sets, the target syntax related to LFNST / NSPT kernel index is signalled or parsed.
[0047] In one embodiment, the multiple sets of LFNST or NSPT are derived based on histogram derived by collecting statistic information of current predictors. In one embodiment, if the current block is a bi-prediction coded block, two DIMD (Decoder-side Intra Mode Derivation) histograms are derived from L0 predictor and L1 predictor respectively, and the two DIMD histograms are referenced to derive the multiple sets of LFNST or NSPT.
[0048] In one embodiment, said signalling or parsing target syntax related to LFNST or NSPT kernel index only for the target transform set of LFNST or NSPT belonging to the transform sub-group is applied to the current block coded in GPM, MHP, or bi-predictive mode only. In one embodiment, intraMode1 derived from L0 predictor, L1 predictor, or a predictor after bi-predictive blending is used to derive the LFNST transform set, and wherein the intraMode1 corresponds to an intra direction with a highest amplitude value in DIMD histogram.
[0049] According to another method, input data associated with a current block is received, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side. Forward SBT (Subblock Transform) LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) is applied to the residual data to generate transformed data at the encoder side conditionally, or inverse SBT LFNST or NSPT is applied to the coded transformed residual data to derive reconstructed residual data conditionally, according to an absolute sum of quantized coefficients of the current block or a number of non-zero quantized coefficients. The transformed data at the encoder side or the reconstructed residual data at the decoder side is provided.
[0050] In one embodiment, the SBT LFNST or NSPT is disabled for the current block if the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients is greater than or equal to a threshold. In another embodiment, the SBT LFNST or NSPT is disabled for the current block if the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients is smaller than or equal to a threshold.
[0051] In one embodiment, multiple thresholds are used for selecting a target LFNST or NSPT transform set. In one embodiment, the multiple thresholds contains a first threshold and a second threshold, the target LFNST or NSPT transform set is selected from a first number of LFNST or NSPT transform sets if the absolute sum of quantized coefficients of the current block is greater than the first threshold and the target LFNST or NSPT transform set is selected from a second number of LFNST or NSPT transform sets if the absolute sum of quantized coefficients of the current block is greater than the second threshold, and wherein the second threshold is larger than the first threshold. In one embodiment, the multiple thresholds for selecting a first target LFNST or NSPT transform set for a luma block and for selecting a second target LFNST or NSPT transform set for a chroma block are different.
[0052] In one embodiment, applying the SBT LFNST or NSPT conditionally according to the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients is applied to the current block coded in GPM, MHP, or bi-predictive mode only. intraMode1 derived from L0 predictor, L1 predictor, or a predictor after bi-predictive blending is used to derive the LFNST transform set, and wherein the intraMode1 corresponds to an intra direction with a highest amplitude value in DIMD histogram.BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing.
[0054] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.
[0055] Fig. 2 illustrates an example of Low-Frequency Non-Separable Transform (LFNST) process.
[0056] Fig. 3A illustrates an example of Region-Of-Interest (ROI) for LFNST16.
[0057] Fig. 3B illustrates an example of Region-Of-Interest (ROI) for LFNST8.
[0058] Fig. 4 illustrates an example of L-shaped neighbourhood for a given predicted block.
[0059] Fig. 5 illustrates a flowchart of an exemplary video coding system according to one embodiment of the present invention, where target syntax related to LFNST or NSPT kernel index is signalled or parsed only when the target transform set of LFNST or NSPT belongs to the transform sub-group.
[0060] Fig. 6 illustrates a flowchart of an exemplary video coding system according to one embodiment of the present invention, where whether SBT LFNST / NSPT is applied depending on the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients.DETAILED DESCRIPTION OF THE INVENTION
[0061] It will be readily understood that the components of the present invention, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the systems and methods of the present invention, as represented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. References throughout this specification to “one embodiment, ” “an embodiment, ” or similar language mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment.
[0062] Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, etc. In other instances, well-known structures, or operations are not shown or described in detail to avoid obscuring aspects of the invention. The illustrated embodiments of the invention will be best understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of apparatus and methods that are consistent with the invention as claimed herein.
[0063] II: LFNST with Multiple Transform Sets
[0064] In one embodiment, LFNST can be tested with more than one transform set.
[0065] In one embodiment, the transform sets used for LFNST are determined based on DIMD (Decoder-side Intra Mode Derivation) related method. In that, a histogram is generated, and the top N intra modes with higher amplitude values can be used to derive LFNST transform sets for LFNST. N can be any integer larger than 0.
[0066] In one embodiment, an index is signalled in the bitstream to the decoder to indicate the selected transform set for LFNST. For example, the selected transform set is a transform set from top N candidates with highest amplitude values in the derived histogram. For another example, the selected transform set is a transform set from a derived transform set list.
[0067] In one embodiment, a flag is signalled in the bitstream to the decoder to indicate whether the second transform set is used for LFNST. If the flag is false, the first transform set is used. Otherwise, the second transform set is used.
[0068] For example, the first transform set can be derived based on DIMD related method. The second transform set can be derived by adding a predefined offset to the first transform set. For example, the first transform set is set 4. The second transform set will be set 5 (4 + 1) , set 3 (4 -1) , or set 21 (4 + 17) .
[0069] For example, the first transform set can be derived based on DIMD related method. The intraMode with the highest amplitude value will be used to derive LFNST transform set. The second transform set is derived by using the intraMode with the second highest amplitude value.
[0070] For example, the first transform set can be derived based on DIMD related method. The intraMode1 with the highest amplitude value will be used to derive LFNST transform set. The second transform set is derived by using intraMode2 with the second highest amplitude value. In this case, the distance between intraMode1 and intraMode2 shall be larger than TH. TH can be any integer.
[0071] In one embodiment, two flags are signalled in the bitstream. The first flag is used to indicate whether the main transform set is used. The second flag is used to indicate which additional transform set is used. Only if the first flag is false, the second flag needs to be signalled.
[0072] For example, the first transform set can be derived based on DIMD related method. The second transform set and the third transform set are derived by adding a predefined offset to the first transform set. For example, the first transform set is set 4. The second transform set will be set 5 (4 + 1) . The third transform set will be set 3 (4 -1) .
[0073] For example, the first transform set can be derived based on DIMD related method. The intraMode1 with the highest amplitude value will be used to derive LFNST transform set. The second transform set is derived by using intraMode2 with the second highest amplitude value. In this case, the distance between intraMode1 and intraMode2 shall be larger than TH. TH can be any integer. The third transform set is derived by using intraMode3 with the third highest amplitude value. In this case, the distance between intraMode2 and intraMode3 shall be larger than TH. TH can be any integer.
[0074] For another example, the derived transform sets of intraMode1, and intraMode2 are constrained to be different.
[0075] In another example, the first transform set can be derived based on DIMD related method. The second transform set is derived by adding a predefined offset to the first transform set or derived by using intraModeK with the Kth highest amplitude value. The third transform set is derived by adding a predefined offset to the first transform set or derived by using intraModeK with the Kth highest amplitude value.
[0076] For another example, the derived transform sets of intraMode1, intraMode2 and intraMode3 are constrained to be different.
[0077] In one embodiment, the first bin is signalled to the decoder in the bitstream to indicate whether the additional transform set is used for LFNST.
[0078] For example, the first bin can be coded by a context coded bin.
[0079] For example, the context variables used for intra LFNST and inter LFNST can be different, but not limited to.
[0080] For example, the context variables used for intra LFNST in dual tree case and non-dual tree case can be different, but not limited to.
[0081] In one embodiment, some truncated unary coded bins are used to indicate the selected LFNST transform set. In this case, the truncated unary coded bins will only be sent if the bin used to indicate whether the additional transform set is used for LFNST to decoder is true. Or they will only be sent if the bin used to indicate whether the main transform set is used for LFNST to decoder is false.
[0082] In one embodiment, the signalling of syntax related to LFNST transform set can be constrained by the absolute sum of transform coefficients of the current CU.
[0083] For example, if the absolute sum of quantized coefficients of the current CU is smaller than a predefined threshold, the syntax related to LFNST transform set will not be signalled.
[0084] In one embodiment, the signalling of syntax related to LFNST transform set can be constrained by the number of non-zero transform coefficients of current CU. For example, if the number of non-zero transform coefficients of current CU is smaller than a predefined threshold, the syntax related to LFNST transform set will not be signalled.
[0085] For example, the predefined thresholds for LFNST transform set signalling for intra LFNST and inter LFNST can be different.
[0086] For example, the predefined thresholds for LFNST transform set signalling for intra LFNST and inter LFNST can be the same.
[0087] In one embodiment, the signalling of syntax related to LFNST transform set can be constrained by CU size, prediction mode, slice-type or QP value.
[0088] In one embodiment, the signalling of syntax related to LFNST transform set can be constrained by any combined conditions mentioned above.
[0089] In another embodiment, one on / off control flag is signalled at CU level, slice level, picture level, and / or sequence level to indicate the proposed method in the above is enabled or not.
[0090] In another embodiment, the proposed method in the above is enabled or disabled, according to one or a combination of the selected reference picture indices, temporal distance between the reference picture and the current picture, quantization parameter, the coded information of current CU, prediction mode, motion vectors, motion vector resolution, residual of current CU, and reference samples.
[0091] In one embodiment, the above-mentioned schemes for LFSNT can also be applied on NSPT and MTS for selection of the transform set.
[0092] In one embodiment, more than one predefined threshold can be used for selecting LFNST / NSPT transform set. For example, if the absolute sum of the quantized coefficients of current block is larger than threshold 1, three different transform sets will be tested in the encoder, and the best one will be signalled in the bitstream. If the absolute sum of the quantized coefficients of current block is larger than threshold 2, five different transform sets will be tested in the encoder, and the best one will be signalled in the bitstream. The syntax design for signalling best LFNST / NSPT transform set can be different for different CUs, and it is based on the absolute sum of the quantized coefficients to choose the syntax design.
[0093] In one embodiment, more than one predefined threshold can be used for selecting LFNST / NSPT transform set. For example, if the number of non-zero quantized coefficients of current block is larger than threshold 1, three different transform sets will be tested in the encoder, and the best one will be signalled in the bitstream. If the number of non-zero quantized coefficients of current block is larger than threshold 2, five different transform sets will be tested in the encoder, and the best one will be signalled in the bitstream. The syntax design for signalling best LFNST / NSPT transform set can be different for different CUs, and it is based on the number of non-zero quantized coefficients to choose the syntax design.
[0094] In one embodiment, TU size, and prediction mode can also be used to select different signalling methods for transform set related syntax. For example, if current block is intra CU, three different transform sets will be tested in the encoder, and the best one will be signalled in the bitstream. If the current block is inter CU, five different transform sets will be tested in the encoder, and the best one will be signalled in the bitstream.
[0095] In one embodiment, the predefined thresholds mentioned above can be different for luma and chroma LFNST / NSPT to select the transform set.
[0096] In one embodiment, the syntax related to transform set of LFNST / NSPT will only be signalled when LFNST kernel N is used. N can be 0, 1, 2, or 3.
[0097] In one embodiment, the syntax related to transform set of LFNST / NSPT will only be signalled when some LFNST kernels are used. For example, only when LFNST kernel 0 and kernel 1 are applied, the additional syntax for LFNST / NSPT transform set will be signalled.
[0098] In one embodiment, the LFNST / NSPT transform set of current CU can be conditioned by neighbouring CUs. For example, when the intra / inter mode, the DIMD histogram, or other intra / inter prediction information of current CU is similar to the respective intra / inter mode, the DIMD histogram or other intra / inter prediction information of one of the neighbouring CUs. The transform set of current CU can be determined by the neighbouring CU. For one example, the transform set of current CU is set as the transform set of neighbouring CU with similar intra / inter mode condition and transform set syntax of current can be skipped. For another example, the candidate of transform set of current CU is set as the candidate of neighbouring CU with similar intra / inter mode condition, the transform set syntax of current CU is signalled to indicate the selected transform set.
[0099] In one example, the search region of the neighbouring CU for transform set referencing can be constrained in the current CTU or N CTU rows or any specific region.
[0100] In one embodiment, the alternative transform set derivation for LFNST / NSPT can be different from different prediction modes.
[0101] For example, the total number of transform sets tested in encoder is 3 for each CU.
[0102] For intra predicted CUs, the alternative tested transform sets are the neighbouring transform sets of the main transform set. For example, if the main transform set is set 4. Two alternative tested transform sets are set 3 (4 –1) and set 5 (4 + 1) .
[0103] For inter predicted CU, the alternative tested transform sets are derived by DIMD histogram. The first two intramode with highest amplitudes will be used to derive the alternative tested transform sets.
[0104] For another example, the total number of transform sets tested in encoder is 3 for each CU.
[0105] For fusion related predicted CUs (i.e., SGPM, DIMD, TIMD, ITMP, GPM…) , the alternative tested transform sets are the neighbouring transform sets of the main transform set. For example, if the main transform set is set 4. Two alternative tested transform sets are set 3 (4 –1) and set 5 (4 + 1) .
[0106] For other non-fusion related predicted CUs, the alternative tested transform sets are derived by DIMD histogram. The first two intramodes with highest amplitudes will be used to derive the alternative tested transform sets.
[0107] In one embodiment, the alternative transform set derivation for LFNST / NSPT can be different from different prediction modes. The maximum number of transform sets signalled to the decoder is dependent by prediction mode.
[0108] For example, the maximum number of transform sets signalled to the decoder is N for fusion related predicted CUs. The maximum number of transform sets signalled to decoder is M for non-fusion related predicted CUs. N and M can be any integer larger than 0.
[0109] For example, N is larger than M. For another example, N is smaller than M.
[0110] In one embodiment, the alternative transform set derivation for LFNST / NSPT can be different from different prediction modes.
[0111] For another example, the total number of transform sets tested in encoder is 3 for each CU.
[0112] For some special mode predicted CUs (e.g. MIP, EIP) , the alternative tested transform sets are derived by planar or DC mode.
[0113] In one embodiment, the alternative transform set derivation for LFNST / NSPT can be different from different CU sizes.
[0114] For example, the maximum number of transform set signalled to the decoder is N for CU area smaller than TH. The maximum number of transform set signalled to the decoder is M for other CUs. N and M can be any integer larger than 0. TH can be any pre-defined integer value.
[0115] For example, N is larger than M. For another example, N is smaller than M.
[0116] In one embodiment, the alternative transform sets derivation for LFNST / NSPT can be different depending on CU size, prediction mode, absolute sum of quantized coefficients or number of non-zero quantized coefficients.
[0117] For example, the maximum number of transform set signalled to the decoder is N when the absolute sum of quantized coefficients or number of non-zero quantized coefficients is smaller than TH. The maximum number of transform set signalled to decoder is M when the absolute sum of quantized coefficients or number of non-zero quantized coefficients is smaller than TH1. N and M can be any integer larger than 0. TH and TH1 can be any pre-defined integer value.
[0118] For example, N is larger than M. For another example, N is smaller than M.
[0119] In another embodiment, the maximum kernel number of alternative LFNST / NSPT transform set signalled to decoder can be dependent by prediction mode, CU area, CU size, absolute sum of quantized coefficients or number of non-zero quantized coefficients.
[0120] In another embodiment, the alternative transform set derivation for matrix based intra prediction mode mentioned in Section I. 3 can be aligned with the replaced intra mode or determined by DIMD method or derived by planar or DC mode. For example, if the main transform set of replaced intra mode is set 4, the main transform set of the matrix-based intra prediction mode is also set 4 and the two alternative tested transform sets are set 3 (4 –1) and set 5 (4 + 1) . For another example, the main transform set of the matrix-based intra prediction mode is set 4 (e.g., can be determined by replaced intra mode or DIMD histogram) and the two alternative tested transform sets are derived by DIMD histogram. For another example, the main transform set of the matrix-based intra prediction mode is set 4 (e.g., can be determined by replaced intra mode or DIMD histogram) and the two alternative tested transform sets are derived by planar or DC mode.
[0121] In addition, the LFNST / NSPT kernel index related syntax can be signalled after transform set related syntax.
[0122] In one embodiment, the syntax related to LFNST / NSPT kernel index will only be signalled when some LFNST transform sets are used.
[0123] For example, only when LFNST / NSPT transform set related syntax indicates that the alternative transform set is not used on LFNST / NSPT, the syntax related to LFNST / NSPT kernel index needs to be signalled. In other words, when the alternative transform set of LFNST / NSPT is used, LFNST / NSPT kernel index related syntax doesn’ t need to be signalled. The LFNST / NSPT kernel index can be assigned with a pre-defined value (i.e., 1st kernel is always used, or the corresponding kernel will be derived by a pre-defined formula (e.g. intraMode %3) ) .
[0124] For another example, only when LFNST / NSPT transform set related syntax indicates that the alternative transform set is not used on LFNST / NSPT or the alternative transform sets are some special transform sets (e.g. transform set number %2 == 0) , the syntax related to LFNST / NSPT kernel index needs to be signalled.
[0125] The pre-defined kernel index can be determined based on alternative transform set index, but not limit to.
[0126] The pre-defined kernel index can be different from inter LFNST / NSPT and intra LFNST / NSPT, but not limit to.
[0127] The pre-defined kernel index can be different from luma LFNST and chroma LFNST, but not limit to.
[0128] The pre-defined kernel index can be different from fusion related prediction mode and non-fusion related prediction mode, but not limit to.
[0129] The pre-defined kernel index can be different for different CU size, but not limit to.
[0130] For another example, when the alternative transform set of LFNST / NSPT is used, LFNST / NSPT kernel index related syntax does not need to be signalled, and the kernel index is determined based on a derived syntax, intramode.
[0131] For example, for non-wide angle intramode, first kernel will be used. For wide angle intramode, second kernel will be used.
[0132] For example, for the secondary transform applying with transpose process, the first kernel will be used. Otherwise, second kernel will be used.
[0133] For another example, when the alternative transform set of LFNST / NSPT is used, LFNST / NSPT kernel index related syntax still needs to be signalled. However, the syntax design for LFNST / NSPT kernel index in this condition is different when the non-alternative transform set of LFNST / NSPT is used.
[0134] For example, the maximum value of possible kernel index for alternative transform set is smaller than the maximum value of possible kernel index for non-alternative transform set.
[0135] For another example, the context variables used to code kernel index related syntax are different from alternative transform set and non-alternative transform set.
[0136] For another example, if alternative transform set is used, EP bins will be used to code the kernel index. If the non-alternative transform set is used, context coded bins will be used to code the kernel index.
[0137] III. Using Different Samples to Derive DIMD Histogram for LFNST / NSPT Transform Set Selection
[0138] The LFNST / NSPT transform set of a TU can be determined by DIMD related method. In this case, a histogram of intra mode of the TU is derived. The intra mode with the highest amplitude value in the histogram will be used to derive the corresponding LFNST / NSPT transform set.
[0139] In one embodiment, the histogram used to derive the transform set of LFNST and NSPT is derived by collecting the statistic information of neighbouring reconstruction samples. For example, the statistic information includes x-axis and y-axis gradients.
[0140] In one embodiment, the histogram used to derive the transform set of LFNST and NSPT is derived by collecting the statistic information current predictors. For example, the statistic information includes x-axis and y-axis gradients.
[0141] In one embodiment, the derivation of histogram used for inter LFNST / NSPT and intra LFNST / NSPT can be different, but not limit to. For example, the histogram used for inter LFNST / NSPT is derived by using the statistic information of current predictors. The histogram used for intra LFNST / NSPT is derived by using neighbouring reconstruction samples.
[0142] In one embodiment, the derivation of histogram used for LFNST / NSPT can be different for different prediction modes. For example, the modes with fusion schemes will use current predictors to derive histogram (e.g. intra TMP, SGPM, TIMD) . Other modes will use neighbouring reconstruction samples to derive histogram.
[0143] In one embodiment, the derivation of histogram used for LFNST / NSPT can be determined by statistical analysis. For example, if the histogram derived by neighbouring reconstruction samples is very different from the histogram derived by current predictors, the histogram derived by current predictors will be used to derive LFNST / NSPT transform set. For example, if the histogram derived by neighbouring reconstruction samples is very different from the histogram derived by current predictors, the histogram derived by neighbouring reconstruction samples will be used to derive LFNST / NSPT transform set.
[0144] In one embodiment, the derivation of histogram used for LFNST / NSPT can be different for different TU size. For example, when width and height of TUs are both larger than 32, the current predictor is used to derive histogram. For example, when TUs width and height are both smaller than 32, the current predictor is used to derive histogram.
[0145] In another embodiment, one on / off control flag is signalled at CU level, slice level, picture level, and / or sequence level to indicate the proposed method in the above is enabled or not.
[0146] For example, only when the control flag is signalled in the bitstream and the value is true, either neighbouring reconstruction samples or the current predictor will be used to derive DIMD histogram for LFNST / NSPT transform set selection for fusion modes and non-fusion mode. Otherwise, for intra blocks, the neighbouring reconstruction samples will always be used to derive DIMD histogram for LFNST / NSPT transform set selection. For inter blocks, the current predictor will always be used to derive DIMD histogram for LFNST / NSPT transform set selection.
[0147] In another embodiment, the proposed method in the above is enabled or disabled, according to one or the combination of the selected reference pictures indices, temporal distance between the reference picture and the current picture, quantization parameter, the coded information of current CU, prediction mode, motion vectors, motion vector resolution, residual of current CU, and reference samples.
[0148] In one embodiment, the selection of using neighbouring reconstruction samples or the current predictor to derive DIMD histogram for LFNST / NSPT transform set derivation is signalled in the bitstream. It can be signalled at CU level, slice level, picture level, and / or sequence level.
[0149] In one embodiment, the current predictors mentioned above are the final predictors after blending if the prediction mode of current CU is a fusion mode. In this case, more than one predictor will be blended to generate a blended final predictor.
[0150] In one embodiment, sub-sample technology can be applied to derive the DIMD histogram for LFNST / NSPT transform set derivation. For example, current predictors (i.e., final predictors after blending) are used to derive the DIMD histogram for LFNST / NSPT transform set derivation. Step number is set to be 2. Every two samples in each row and each column are collected to do the statistical analysis. In that, the step number can be designed based on current CU size.
[0151] For another example, the step number for row and column can be different, but not limit to.
[0152] For another example, the sub-sample technique is only applied when the current predictor area is larger than a pre-defined threshold (e.g. 256) .
[0153] For another example, only the samples in the first N rows and the first K columns of current predictors (e.g. final predictors after blending) are used to derive the DIMD histogram for LFNST / NSPT transform set derivation.
[0154] IV. Other Methods to Derive LFNST / NSPT Transform Set
[0155] In one embodiment, for bi-prediction coded blocks, two DIMD histograms can be derived by using predictor L0 and predictor L1. Two DIMD histograms are referenced to derive LFNST / NSPT transform set. For example, the histogram derived based on predictor L0 is used to derived the second transform set. The histogram derived based on predictor L1 is used to derive the third transform set.
[0156] In one example, the proposed method is applied on GPM-coded or MHP-coded or bi-predictive CUs only. When the proposed method is applied on bi-predictive CUs, the intraMode1 (i.e., the intra direction with highest amplitude value in DIMD histogram) derived from L0 predictor or L1 predictor or the predictor after bi-predictive blending is used to derive LFNST transform set. In another example, when the proposed method is applied on bi-predictive CUs, the intraMode1 derived from the predictor with larger BCW weight or smaller QP value or smaller POC difference is used to derive LFNST transform set.
[0157] In another example, when the proposed method is applied on MHP-coded CUs, the intraMode1 derived from one of the hypothesis or blended predictor of first N (where N >= 1) hypothesis or the final predictor is used to derive LFNST transform set.
[0158] In another example, when the proposed method is applied on GPM-coded CUs, the intraMode1 derived from one of the GPM predictors or the final predictor is used to derive LFNST transform set.
[0159] In one embodiment, the intramode of previously coded intra CU can be used to derive the LFNST / NSPT transform set of current CU.
[0160] The distance between the previously coded intra CU and the current CU can be constrained, but not limit to. For example, only if the distance between the top-left position of previously coded intra CU and the current CU is smaller than a threshold, the intramode of previously coded intra CU can be referenced by the current block.
[0161] The prediction mode of previously coded intra CU can be constrained, but not limit to. For example, only if the previously coded intra CU is not predicted by a fusion mode (i.e., DIMD, SGPM, intraTMP fusion) , the previously coded intra CU’s intra mode can be referenced by current block.
[0162] In the previously mentioned method, if the previously coded intra CU cannot be referenced, a pre-defined intramode is used (i.e., planar mode) .
[0163] V. Multiple LFNST transform sets with SBT LFNST / NSPT
[0164] In one embodiment, LFNST / NSPT can be enabled for specific SBT types only. For example, LFNST / NSPT can be enabled for SBT partition with cu_sbt_quad_flag equal to 0 or 1 and cu_sbt_horizontal_flag equal to 0 or 1 and cu_sbt_pos_flag equal to or 1.
[0165] In another embodiment, multiple LFNST / NSPT kernel sets can be enabled for SBT LFNST / NSPT or not. In one example, only K (K>=1) kernels can be used in each kernel set for SBT LFNST / NSPT. In one example, when the multiple LFNST / NSPT kernel set is enabled for SBT LFNST / NSPT, only K (K>=1) kernels can be used in each kernel set.
[0166] In another embodiment, the SBT LFNST / NSPT is conditioned by the absolute sum of quantized coefficients or the number of non-zero quantized coefficients. In one example, when the absolute sum of quantized coefficients or the number of non-zero quantized coefficients of a TB is smaller than, equal to, or larger than a predefined or adaptive threshold, the SBT LFNST / NSPT is disabled. In another example, when the absolute sum of quantized coefficients or the number of non-zero quantized coefficients of a TB is smaller than or equal to a first predefined or adaptive threshold, only P0 (P0 >= 1) kernels can be used in each kernel set for SBT LFNST / NSPT. When the absolute sum of quantized coefficients or the number of non-zero quantized coefficients of a TB is larger than a first predefined or adaptive threshold and smaller than or equal to a second threshold, only P1 (P1 >= 1) kernels can be used in each kernel set for SBT LFNST / NSPT. When the absolute sum of quantized coefficients or number of non-zero quantized coefficients of a TB is larger than i-th predefined or adaptive threshold and smaller than or equal to (i+1) -th threshold, only Pi-1 (Pi-1 >= 1) kernels can be used in each kernel set for SBT LFNST / NSPT.
[0167] In another embodiment, the SBT LFNST / NSPT is conditioned by coding modes or TB sizes. In one example, SBT LFNST / NSPT can be enabled for GPM-coded CUs only. In another example, SBT LFNST / NSPT can be enabled for CUs that are enabled for Affine, inter merge, inter AMVP, MMVD, TM merge, BM merge, CIIP, DMVR, or a combination thereof.
[0168] In another embodiment, the LFNST / NSPT kernel of SBT LFNST / NSPT is determined by the DIMD method performed on the entire CU or only on the partial CU with valid residual corresponding to SBT types.
[0169] Any of the foregoing proposed methods of signalling target syntax related to LFNST or NSPT kernel index only when the target transform set of LFNST or NSPT belongs to the transform sub-group or whether SBT LFNST / NSPT is applied depending on the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in transform module of an encoder and / or a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to transform module of the encoder and / or the decoder.
[0170] With reference to the exemplary encoder or decoder in Fig. 1A and Fig. 1B, any of the proposed methods can be implemented in an Intra / Inter coding module (e.g. Intra Pred. 150 / MC 152 in Fig. 1B) in a decoder or an Intra / Inter coding module in an encoder (e.g. Intra Pred. 110 / Inter Pred. 112 in Fig. 1A) . Any of the proposed methods can also be implemented as circuits coupled to the intra coding module at the decoder or the encoder. However, the decoder or encoder may also use additional processing unit to implement the required processing. While the Intra / Inter Pred. units (e.g. unit 110 / Inter Pred. 112 in Fig. 1A and unit 150 / MC 152 in Fig. 1B) are shown as individual processing units, they may correspond to executable software or firmware codes stored on a media, such as hard disk or flash memory, for a CPU (Central Processing Unit) or programmable devices (e.g. DSP (Digital Signal Processor) or FPGA (Field Programmable Gate Array) ) .
[0171] Fig. 5 illustrates a flowchart of an exemplary video coding system according to one embodiment of the present invention, where target syntax related to LFNST or NSPT kernel index is signalled or parsed only when the target transform set of LFNST or NSPT belongs to the transform sub-group. The steps shown in the flowchart may be implemented as program codes executable on one or more processors (e.g., one or more CPUs) at the encoder side. The steps shown in the flowchart may also be implemented based hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to this method, input data associated with a current block is received in step 510, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side. Multiple sets of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) are determined in step 520. A transform sub-group is determined from the multiple sets of LFNST or NSPT in step 530, wherein at least one of the multiple sets of LFNST or NSPT is excluded from the transform sub-group. A target transform set of LFNST or NSPT is selected from the multiple sets of LFNST or NSPT for the current block in step 540. Target syntax related to LFNST or NSPT kernel index is signalled or parsed only when the target transform set of LFNST or NSPT belongs to the transform sub-group in step 550. Forward transform is applied to the residual data according to a selected transform kernel of the target transform set of LFNST or NSPT at the encoder side to generate transformed data at the encoder side, or inverse transform is applied to the coded transformed residual data according to the selected transform kernel of the target transform set of LFNST or NSPT to derive reconstructed residual data in step 560, wherein the selected transform kernel of the target transform set of LFNST or NSPT is indicated by the LFNST or NSPT kernel index. The transformed data at the encoder side or the reconstructed residual data at the decoder side is provided in step 570.
[0172] Fig. 6 illustrates a flowchart of an exemplary video coding system according to one embodiment of the present invention, where whether SBT LFNST / NSPT is applied depending on the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients. According to another method, input data associated with a current block is received in step 610, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side. Forward SBT (Subblock Transform) LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) is applied to the residual data to generate transformed data at the encoder side conditionally, or inverse SBT LFNST or NSPT is applied to the coded transformed residual data to derive reconstructed residual data conditionally in step 620, according to an absolute sum of quantized coefficients of the current block or a number of non-zero quantized coefficients. The transformed data at the encoder side or the reconstructed residual data at the decoder side is provided in step 630.
[0173] The flowcharts shown are intended to illustrate an example of video coding according to the present invention. A person skilled in the art may modify each step, re-arranges the steps, split a step, or combine steps to practice the present invention without departing from the spirit of the present invention. In the disclosure, specific syntax and semantics have been used to illustrate examples to implement embodiments of the present invention. A skilled person may practice the present invention by substituting the syntax and semantics with equivalent syntax and semantics without departing from the spirit of the present invention.
[0174] The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.
[0175] Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be one or more circuit circuits integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA) . These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.
[0176] The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.
Claims
1.A method of video coding, the method comprising:receiving input data associated with a current block, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side;determining multiple sets of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) ;determining a transform sub-group from the multiple sets of LFNST or NSPT, wherein at least one of the multiple sets of LFNST or NSPT is excluded from the transform sub-group;selecting a target transform set of LFNST or NSPT from the multiple sets of LFNST or NSPT for the current block;signalling or parsing target syntax related to LFNST or NSPT kernel index only when the target transform set of LFNST or NSPT belongs to the transform sub-group;applying forward transform to the residual data according to a selected transform kernel of the target transform set of LFNST or NSPT at the encoder side to generate transformed data at the encoder side, or applying inverse transform to the coded transformed residual data according to the selected transform kernel of the target transform set of LFNST or NSPT to derive reconstructed residual data, wherein the selected transform kernel of the target transform set of LFNST or NSPT is indicated by the LFNST or NSPT kernel index; andproviding the transformed data at the encoder side or the reconstructed residual data at the decoder side.2.The method of Claim 1, wherein only when an LFNST or NSPT transform set related syntax indicates no alternative transform set being used on the LFNST or NSPT, the target syntax related to LFNST / NSPT kernel index is signalled or parsed.3.The method of Claim 1, wherein only when an LFNST or NSPT transform set related syntax indicates that a target alternative transform set used on the LFNST or NSPT belongs to one or more special transform sets, the target syntax related to LFNST / NSPT kernel index is signalled or parsed.4.The method of Claim 1, wherein the multiple sets of LFNST or NSPT are derived based on histogram derived by collecting statistic information of current predictors.5.The method of Claim 4, wherein if the current block is a bi-prediction coded block, two DIMD (Decoder-side Intra Mode Derivation) histograms are derived from L0 predictor and L1 predictor respectively, and the two DIMD histograms are referenced to derive the multiple sets of LFNST or NSPT.6.The method of Claim 1, wherein said signalling or parsing target syntax related to LFNST or NSPT kernel index only for the target transform set of LFNST or NSPT belonging to the transform sub-group is applied to the current block coded in GPM, MHP, or bi-predictive mode only.7.The method of Claim 6, wherein intraMode1 derived from L0 predictor, L1 predictor, or a predictor after bi-predictive blending is used to derive the LFNST transform set, and wherein the intraMode1 corresponds to an intra direction with a highest amplitude value in DIMD histogram.8.An apparatus for video coding, the apparatus comprising one or more electronics or processors arranged to:receive input data associated with a current block, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side;determine multiple sets of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) ;determine a transform sub-group from the multiple sets of LFNST or NSPT, wherein at least one of the multiple sets of LFNST or NSPT is excluded from the transform sub-group;select a target transform set of LFNST or NSPT from the multiple sets of LFNST or NSPT for the current block;signal or parse target syntax related to LFNST or NSPT kernel index only when the target transform set of LFNST or NSPT belongs to the transform sub-group;apply forward transform to the residual data according to a selected transform kernel of the target transform set of LFNST or NSPT at the encoder side to generate transformed data at the encoder side, or apply inverse transform to the coded transformed residual data according to the selected transform kernel of the target transform set of LFNST or NSPT to derive reconstructed residual data, wherein the selected transform kernel of the target transform set of LFNST or NSPT is indicated by the LFNST or NSPT kernel index; andprovide the transformed data at the encoder side or the reconstructed residual data at the decoder side.9.A method of video coding, the method comprising:receiving input data associated with a current block, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side;applying forward SBT (Subblock Transform) LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) to the residual data to generate transformed data at the encoder side conditionally, or applying inverse SBT LFNST or NSPT to the coded transformed residual data to derive reconstructed residual data conditionally, according to an absolute sum of quantized coefficients of the current block or a number of non-zero quantized coefficients; andproviding the transformed data at the encoder side or the reconstructed residual data at the decoder side.10.The method of Claim 9, wherein the SBT LFNST or NSPT is disabled for the current block if the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients is greater than or equal to a threshold.11.The method of Claim 9, wherein the SBT LFNST or NSPT is disabled for the current block if the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients is smaller than or equal to a threshold.12.The method of Claim 9, wherein multiple thresholds are used for selecting a target LFNST or NSPT transform set.13.The method of Claim 12, wherein the multiple thresholds contains a first threshold and a second threshold, the target LFNST or NSPT transform set is selected from a first number of LFNST or NSPT transform sets if the absolute sum of quantized coefficients of the current block is greater than the first threshold and the target LFNST or NSPT transform set is selected from a second number of LFNST or NSPT transform sets if the absolute sum of quantized coefficients of the current block is greater than the second threshold, and wherein the second threshold is larger than the first threshold.14.The method of Claim 13, wherein the multiple thresholds for selecting a first target LFNST or NSPT transform set for a luma block and for selecting a second target LFNST or NSPT transform set for a chroma block are different.15.The method of Claim 9, wherein multiple sets of LFNST or NSPT associated with the SBT LFNST or NSPT are derived based on histogram derived by collecting statistic information of current predictors.16.The method of Claim 15, wherein if the current block is a bi-prediction coded block, two DIMD (Decoder-side Intra Mode Derivation) histograms are derived from L0 predictor and L1 predictor respectively, and the two DIMD histograms are referenced to derive the multiple sets of LFNST or NSPT.17.The method of Claim 9, wherein applying the SBT LFNST or NSPT conditionally according to the absolute sum of quantized coefficients of the current block or the number of non-zero quantized coefficients is applied to the current block coded in GPM, MHP, or bi-predictive mode only.18.The method of Claim 17, wherein intraMode1 derived from L0 predictor, L1 predictor, or a predictor after bi-predictive blending is used to derive the LFNST transform set, and wherein the intraMode1 corresponds to an intra direction with a highest amplitude value in DIMD histogram.19.An apparatus for video coding, the apparatus comprising one or more electronics or processors arranged to:receive input data associated with a current block, wherein the input data comprises residual data for the current block at an encoder side or coded transformed residual data for the current block at a decoder side;apply forward SBT (Subblock Transform) LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) to the residual data to generate transformed data at the encoder side conditionally, or apply inverse SBT LFNST or NSPT to the coded transformed residual data to derive reconstructed residual data conditionally, according to an absolute sum of quantized coefficients of the current block or a number of non-zero quantized coefficients; andprovide the transformed data at the encoder side or the reconstructed residual data at the decoder side.
Citation Information
Patent Citations
Image encoding / decoding method and method for transmitting data
CN117812262A
Low frequency non-separable transform for video coding
US20220329819A1
Methods and Apparatus for Restricted Secondary Transform and Signaling Thereof in Image Coding
US20220385946A1
Methods and Apparatuses of Frequency Domain Mode Decision in Video Encoding Systems
US20230199196A1
Methods and apparatus for transform training and coding
WO2024054689A1