Methods and apparatus for adaptively determining selected transform type in image and video coding systems
By adaptively inserting Planar and DC modes into the candidate list based on block dimensions and HoG distribution, the proposed methods address the limitations of existing video coding standards, enhancing transform set determination and video coding efficiency.
Patent Information
- Application Number
- PCT/CN2025/089241
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-16
- Filing Date
- 2025-04-16
- Publication Date
- 2025-10-23
AI Technical Summary
Existing video coding standards like VVC and ECM-12 struggle to effectively determine the intra prediction mode for deriving the transform set, particularly for non-angular modes such as Planar and DC, which are not adequately addressed by current tools like DIMD.
Proposed methods to adaptively insert Planar and/or DC mode into the candidate list for determining the transform set by considering block dimensions, Histogram of Gradients (HoG) distribution, and contextual information, allowing for improved selection of Low-Frequency Non-Separable Transform (LFNST) or Non-Separable Primary Transform (NSPT) based on intra prediction modes.
Enhances the accuracy and efficiency of transform set determination by accounting for non-angular modes, leading to improved video coding performance and compression efficiency.
Smart Images

Figure CN2025089241_23102025_PF_FP_ABST
Abstract
Description
METHODS AND APPARATUS FOR ADAPTIVELY DETERMINING SELECTED TRANSFORM TYPE IN IMAGE AND VIDEO CODING SYSTEMSCROSS 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 / 634,520, filed on April 16, 2024. The U.S. Provisional Patent Application is hereby incorporated by reference in its entirety.FIELD OF THE INVENTION
[0002] The present invention relates to video coding system. In particular, the present invention relates to determining whether to insert Planar mode, DC mode, or both into a candidate list for deriving the transform set associated with the current block.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] In VVC, the Sequence Parameter Set (SPS) and the Picture Parameter Set (PPS) contain high-level syntax elements that apply to entire coded video sequences and pictures, respectively. The Picture Header (PH) and Slice Header (SH) contain high-level syntax elements that apply to a current coded picture and a current coded slice, respectively.
[0008] In VVC, a coded picture is partitioned into non-overlapped square block regions represented by the associated coding tree units (CTUs) . A coded picture can be represented by a collection of slices, each comprising an integer number of CTUs. The individual CTUs in a slice are processed in raster-scan order. A bi-predictive (B) slice may be decoded using intra prediction or inter prediction with at most two motion vectors and reference indices to predict the sample values of each block. A predictive (P) slice is decoded using intra prediction or inter prediction with at most one motion vector and reference index to predict the sample values of each block. An intra (I) slice is decoded using intra prediction only.
[0009] In VVC, each CTU can be partitioned into one or multiple non-overlapped coding units (CUs) using a Quaternary Tree (QT) with nested Multi-Type-Tree (MTT) structure. The partitioning information is signalled by a coding tree syntax structure, where each CTU is treated as the root of a coding tree. The CTUs may be first partitioned by the quaternary tree (a. k. a. quadtree) structure, as shown in Fig. 2A. Then the quaternary tree leaf nodes can be further partitioned by a MTT structure, as shown in Figs. 2B-E. There are four splitting types in multi-type tree structure: vertical binary splitting (SPLIT_BT_VER) , horizontal binary splitting (SPLIT_BT_HOR) , vertical ternary splitting (SPLIT_TT_VER) , and horizontal ternary splitting (SPLIT_TT_HOR) . Each quadtree child node may be further split into smaller coding tree nodes using any one of five split types in Fig. 2. However, each multi-type-tree child node is only allowed to be further split by one of four MTT split types. The coding tree leaf nodes correspond to the coding units (CUs) . Fig. 3 provides an example of a CTU recursively partitioned by QT with the nested MTT, where the bold block edges represent quadtree partitioning and the remaining edges represent multi-type tree partitioning.
[0010] Each CU contains one or more Prediction Units (PUs) . The prediction unit, together with the associated CU syntax, works as a basic unit for signalling the predictor information. The specified prediction process is employed to predict the values of the associated pixel samples inside the PU. Each CU may contain one or more transform units (TUs) for representing the prediction residual blocks. A transform unit (TU) is comprised of one transform block (TB) of luma samples and two corresponding transform blocks of chroma samples. Each TB corresponds to one residual block of samples from one colour component. An integer transform is applied to a transform block. The level values of quantized coefficients together with other side information are entropy coded in the bitstream. The terms coding tree block (CTB) , coding block (CB) , prediction block (PB) , and transform block (TB) are defined to specify the 2-D sample array of one colour component associated with CTU, CU, PU, and TU, respectively. Thus, a CTU consists of one luma CTB, two chroma CTBs, and associated syntax elements. A similar relationship is valid for CU, PU, and TU.
[0011] Matrix weighted Intra Prediction (MIP)
[0012] Matrix weighted intra prediction (MIP) method is a newly added intra prediction technique in VVC. For predicting the samples of a rectangular block of width W and height H, matrix weighted intra prediction (MIP) takes one line of H reconstructed neighbouring boundary samples left of the block and one line of W reconstructed neighbouring boundary samples above the block as input. If the reconstructed samples are unavailable, they are generated as it is done in the conventional intra prediction. The generation of the prediction signal is based on the following three steps, i.e., averaging, matrix vector multiplication and linear interpolation as shown in Fig. 4. One line of H reconstructed neighbouring boundary samples 412 left of the block and one line of W reconstructed neighbouring boundary samples 410 above the block are shown as dot-filled small squares. After the averaging process, the boundary samples are down-sampled to top boundary line 414 and left boundary line 424. The down-sampled samples are provided to the matric-vector multiplication unit 420 to generate the down-sampled prediction block 430. An interpolation process is then applied to generate the prediction block 440.
[0013] Low-Frequency Non-Separable Transform (LFNST)
[0014] In VVC, LFNST is applied between forward primary transform and quantization (at the encoder side) and between de-quantization and inverse primary transform (at the decoder side) as shown in Fig. 5. As shown in Fig. 5, after Forward Primary Transform 510, Forward Low-Frequency Non-Separable Transform LFNST 520 is applied to top-left region 522 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 530. To reconstruct the input signal, the quantized transform coefficients are de-quantized using De-Quantization 540 to obtain the de-quantized transform coefficients. Inverse LFNST 550 is applied to the top-left region 552 (8 coefficients for 4x4 inverse LFNST or 16 coefficients for 8x8 inverse LFNST) . After invers LFNST, inverse Primary Transform 560 is applied to recover the input signal. There are totally 4 transform sets and 2 non-separable transform candidate matrices (kernels) per transform set are used in LFNST. The selected transform set for a current block is determined by the intra prediction mode associated with the current block, where a look-up table is pre-defined for mapping each intra prediction mode to the associated LFNST transform set.
[0015] Joint Video Expert Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 are currently in the process of exploring the next-generation video coding standard. Some promising new coding tools have been adopted into Enhanced Compression Model 12 (ECM 12) (M. Coban, F. Le Léannec, R. -L. Liao, K. Naser, J. L. Zhang “Algorithm description of Enhanced Compression Model 12 (ECM 12) , ” Joint Video Expert Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, Doc. JVET-AG2025, 33rd Meeting, by teleconference, 17–26 January 2024) to further improve VVC.
[0016] In ECM-12.0 software (available online at https: / / vcgit. hhi. fraunhofer. de / ecm / ECM) , a template-based intra mode derivation (TIMD) coding tool is utilised for intra coding a coding unit. A CU syntax flag is coded to indicate whether the TIMD tool is enabled for coding a current CU or not. When the TIMD mode is selected for a current CU, for each intra prediction mode in the most probable mode (MPM) list, a template-matching cost based on the sum of absolute transformed differences (SATD) between the prediction samples (612 and 614) and reconstruction samples (620 and 622) of the template for the current CU 610 is calculated, as illustrated in Fig. 6. The two intra prediction modes with the lowest SATD and the second lowest SATD are referred to as the primary TIMD intra prediction mode and the secondary TIMD intra prediction mode, respectively. When the template-matching costs costMode1 and costMode2 for primary TIMD intra prediction mode and the secondary TIMD intra prediction mode meet the condition costMode2 >= 2*costMode1, the final prediction signal for the current CU is set equal to the intra predictor corresponding to the primary intra prediction mode. Otherwise, when a TIMD multi-mode fusion of two intra predictors is used for the current CU, the final prediction signal, Pfusion is set equal to a weighted sum of two intra predictors, Pm0 and Pm1, corresponding to the primary intra prediction mode m0 and the second intra prediction mode m1, respectively, as follows: Pfusion = w0 *Pm0 + w1 *Pm1 (1) wherein w0 and w1 are fusion weights for predictors Pm0 and Pm1, respectively.
[0017] In ECM-12.0, a Decoder Side Intra Mode Derivation (DIMD) tool is utilised to determine the intra angular prediction mode of a block. When a DIMD mode is selected for a current block, a horizontal gradient and a vertical gradient are calculated for each of the reconstructed samples in a template region of the current block to build a histogram of gradients (HoG) with 65 bins, corresponding to the 65 angular modes in VVC. The final prediction signal is generated by a fusion of up to six intra predictors, where one predictor corresponds to Planar mode and the others correspond to the angular modes with the largest amplitude values in the HoG. The fusion weight for Planar is set to a fixed value equal to 1 / 4 when the number of fused intra predictors is greater than 2. The fusion weights for angular modes are determined by the corresponding amplitude values in the HoG.
[0018] In ECM-12, the number of LFNST sets (S) and candidates (C) are extended to S=35 and C=3 for a given block size. Three different kernel types, LFNST4, LFNST8, and LFNST16, are applied to 4xN / Nx4 (N≥4) , 8xN / Nx8 (N≥8) , and MxN (M, N≥16) , respectively. The separable DCT-II plus LFNST transform combinations can be replaced with non-separable primary transform (NSPT) for the block shapes 4x4, 4x8, 8x4 and 8x8, 4x16, 16x4, 8x16 and 16x8. For each block shape, all NSPTs consist of 35 sets and each set further consists of 3 candidates (like the current LFNST in ECM-12.0) . The selected transform set for a block is determined by the intra prediction mode associated with the block, where a look-up table is pre-defined for mapping each intra prediction mode to one associated LFNST or NSPT transform set out of 35 LFNST or NSPT sets. A syntax element is further signalled to indicate a selected kernel from 3 candidate kernels in the associated LFNST or NSPT transform set.
[0019] In ECM-12, the DIMD tool is further utilised to derive the intra prediction mode (DIMD) 710 associated with a current block based on the prediction signal of the current block as shown in Fig. 7. Specifically, a horizontal gradient and a vertical gradient are calculated for each predicted sample of the current block to build a histogram of gradient (HoG) 720. The derived intra prediction mode is set equal to the angular mode with the largest histogram amplitude value in the HoG. This scheme has been adopted for deriving an intra prediction mode that is used to determine the LFNST / NSPT transform set and LFNST / NSPT transpose flag associated with a coded block in MIP, intra template matching prediction (IntraTMP) , extrapolation filter-based intra prediction (EIP) , or Inter mode. For MIP, this is done before up-sampling and is illustrated in Fig. 7. The scheme has also been adopted for deriving an intra prediction mode that is used to determine the multiple transform selection (MTS) set associated with a coded block in IntraTMP, or EIP mode. In Fig. 7, matrix vector multiplication module 730 is used to generate MIP prediction 740; and further processed by MIP prediction upsampling module 750 to generate the upsampled output 760.
[0020] In the present invention, schemes for adaptively inserting Planar and / or DC mode into a candidate list for deriving a set of LFNST or NSPT are disclosed. BRIEF SUMMARY OF THE INVENTION
[0021] A method and apparatus for video coding comprising selecting LFNST or NSPT are disclosed. According to this method, input data is received, wherein the input data comprises residual data for a current block at an encoder side or coded transformed residual data for the current block at a decoder side. A first candidate list comprising a plurality of member intra prediction modes for the current block is derived. Whether to insert Planar mode, DC mode, or both into the first candidate list to form an updated first candidate list for deriving a transform set associated with the current block is determined. A target intra prediction mode from the updated first candidate list is selected. A target set of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) is derived according to the target intra prediction mode. Forward transform is applied to the residual data according to a selected transform kernel of the target 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 set of LFNST or NSPT to derive reconstructed residual data. The transformed data at the encoder side or the reconstructed residual data at the decoder side is provided.
[0022] In one embodiment, whether to insert the Planar mode, the DC mode, or both into the first candidate list is dependent on block dimension of the current block. In one embodiment, the block dimension of the current block comprises width, height, area size, or a combination thereof.
[0023] In one embodiment, whether to insert the Planar mode, the DC mode, or both into the first candidate list is dependent on DIMD (Decoder Side Intra Mode Derivation) HoG (Histogram of Gradients) generated by predicted samples of the current block or reconstructed samples in a template region of the current block.
[0024] In one embodiment, a position in the first candidate list for insertion of a non-angular intra prediction candidate is fixed or determined adaptively according to contextual information for coding the current block.
[0025] In one embodiment, when the current block is coded in MIP (Matrix weighted Intra Prediction) , intraTMP (intra Template Matching Prediction) , Inter or EIP (Extrapolation filter-based Intra Prediction) mode, and the Planar mode or the DC mode is inserted into the first candidate list, the first candidate list comprises a first mode and a second mode selected from the Planar mode and a derived prediction mode corresponding to largest HoG (Histogram of Gradients) amplitude.
[0026] In one embodiment, when the current block is coded in MIP, intraTMP, Inter or EIP mode, whether to insert the Planar mode or the DC mode into the first candidate list is determined by comparing an average amplitude value of HoG with a first threshold and a second threshold. In one embodiment, the Planar mode is inserted to a first mode position in the first candidate list and mode 0 is moved to a second mode position in the first candidate list if the average amplitude value of HoG is smaller than the first threshold, and wherein the first threshold is smaller than the second threshold, and mode 0 corresponds to a first intra prediction mode in an original first candidate list used to derive the first candidate list; otherwise, the mode 0 remains at the first mode position in the first candidate list and the Planar mode is inserted into the second mode position in the first candidate list if the average amplitude value of HoG is between the first threshold and the second threshold; otherwise, the mode 0 remains at the first mode position in the first candidate list and mode 1 remains at the second mode position in the first candidate list if the average amplitude value of HoG is larger than the second threshold.
[0027] In one embodiment, a number of the plurality of member intra prediction modes in the first candidate list or the updated first candidate list is determined adaptively by considering context information for coding the current block. In one embodiment, the number of the plurality of member intra prediction modes in the first candidate list or the updated first candidate list is determined according to block width, block height, block area, quantization parameter (QP) , and / or coding mode of the current block, and / or intra prediction modes of neighboring blocks. In one embodiment, the number of the plurality of member intra prediction modes in the first candidate list or the updated first candidate list is signalled in one or more high-level syntax sets comprising SPS (Sequence Parameter Set) , PPS (Picture Parameter Set) , PH (Picture Header) , SH (Slice Header) , or a combination thereof.BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing.
[0029] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.
[0030] Fig. 2A-Fig. 2E illustrates examples of a multi-type tree structure corresponding to quadtree splitting (Fig. 2A) vertical binary splitting (SPLIT_BT_VER, Fig. 2B) , horizontal binary splitting (SPLIT_BT_HOR, Fig. 2C) , vertical ternary splitting (SPLIT_TT_VER, Fig. 2D) , and horizontal ternary splitting (SPLIT_TT_HOR, Fig. 2E) .
[0031] Fig. 3 shows an example of a CTU divided into multiple CUs with a quadtree and nested multi-type tree coding block structure, where the bold block edges represent quadtree partitioning and the remaining edges represent multi-type tree partitioning.
[0032] Fig. 4 illustrates an example of processing flow for Matrix weighted intra prediction (MIP) .
[0033] Fig. 5 illustrates an example of Low-Frequency Non-Separable Transform (LFNST) process.
[0034] Fig. 6 illustrates an example of template and its reference samples used in TIMD.
[0035] Fig. 7 illustrates an example of LFNST modification for MIP coded blocks, which utilizes DIMD to derive the LFNST transform set and determine LFNST transpose flag.
[0036] Fig. 8 illustrates a flowchart of an exemplary video coding system that determines whether to insert Planar mode or DC mode into a first candidate to form an updated first candidate list for deriving a transform set associated with the current block according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION
[0037] 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.
[0038] 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.
[0039] In ECM-12.0, DIMD is utilised to determine the current intra prediction mode for deriving the transform set of MTS, LFNST or NSPT associated with a current block. However, DIMD can only be used to classify a block into one of 65 angular modes and cannot detect an intra prediction mode corresponding to one of DC and Planar modes, which are commonly referred to as non-angular or non-directional modes. In the present disclosure, new methods are disclosed to improve the current scheme for determining the intra prediction mode associated with a current block based on DIMD in an image or video coding system. Particularly, methods are proposed to determine if the current prediction mode may belong to Planar or DC for determining the transform set associated with a current block.
[0040] In one method, a video coder may determine whether to set the intra prediction mode of a current block equal to one of Planar and DC for deriving the transform set associated with the current block considering the block dimension (e.g. width, height, and / or area size) of the current block. For example, when one or both of block width and height of a current block are greater than a specified threshold Twh, a video coder may set the current intra prediction mode equal to Planar for deriving the selected transform set. Otherwise, the current intra prediction mode may be determined by DIMD or other specified methods. In some preferred embodiments, Twh may be set equal to 8, 16, or 32.
[0041] In another method, a video coder may determine whether to set the current intra prediction mode of a current block equal to one of Planar and DC for deriving the transform set associated with the current block dependent on distribution of the HoG built up by DIMD, wherein the DIMD HoG can be generated from the predicted samples of the current block or the reconstructed samples in the template region of the current block. In some embodiments, a video coder may determine whether to set the current intra prediction mode equal to Planar or DC for deriving the associated transform set considering the ratio of the largest amplitude value or the sum of a plurality of largest amplitude values of the HoG to the sum of all amplitude values of the HoG. For example, when the ratio of the largest amplitude values of the HoG to the sum of all amplitude values of the HoG is less than a specified threshold T1, a video coder may set the intra prediction mode of a current block equal to Planar for deriving the associated transform set. Otherwise, the current intra prediction mode may be set equal to the prediction mode selected by DIMD or other specified methods. In some preferred embodiments, T1 may be set equal to 0.0625, 0.125, 0.1875, 0.25, 0.375, or 0.5. In some preferred embodiments, the said plurality of largest amplitude values of the HoG may correspond to two or more intra prediction modes that are utilised for generating a fused intra prediction for predicting a current block such as the selected intra prediction modes in TIMD or DIMD mode.
[0042] In some embodiments, a video coder may determine whether to set the current intra prediction mode of a current block equal to Planar or DC for deriving the associated transform set considering the average HoG amplitude values. For example, when the sum of HoG amplitude values is less than a specified threshold, Ta scaled by the number of samples used for calculating the HoG, a video coder may set the intra prediction mode of a current block equal to Planar. Otherwise, the current intra prediction mode may be set equal to the prediction mode selected by DIMD or other specified methods.
[0043] In another method, a video coder may determine whether to set the current intra prediction mode equal to one of Planar and DC for deriving the transform set associated with the current block dependent on the prediction modes of neighbouring blocks. For example, a video coder may set the intra prediction mode of a current block equal to Planar or DC for deriving the associated transform set when both pre-defined above and left neighbouring blocks of the current block are predicted in Planar or DC mode or when all specified neighbouring blocks of the current block are predicted in Planar or DC mode.
[0044] In another method, a video coder may determine whether to set the current intra prediction mode equal to one of Planar and DC for deriving the transform set associated with the current block by considering the template-matching costs associated with Planar and / or DC, wherein the template matching cost may be calculated as the SATD or the sum of absolute differences (SAD) between the prediction and reconstruction samples of the template along the coded blocks boundaries. For example, a video coder may calculate the template matching costs for predictors corresponding to Planar, DC and the angular mode with the largest histogram amplitude value in the DIMD HoG, respectively. The video coder may then determine the selected intra prediction mode for deriving the transform set associated with a current block by comparing the template-matching costs associated with three intra predictors. In one embodiment, the video coder may just set the intra prediction mode of a current block equal to Planar or DC for deriving the associated transform set when Planar or DC corresponds to the lowest template matching cost.
[0045] The proposed methods may further comprise signalling one or more syntax elements in one or more high-level syntax sets to indicate the selected method in a current video data unit, wherein the high-level syntax sets may comprise SPS, PPS, PH, SH, or a combination thereof. The proposed methods may further comprise signalling one or more syntax elements to explicitly specify threshold values used in the proposed methods. A video coder may signal separate sets of syntax elements for the proposed methods applied to blocks coded in different CU modes.
[0046] The proposed methods and related embodiments can be implemented jointly in an image and video coding system. For example, a video coder may determine whether to set the current intra prediction mode of a current block equal to one of Planar and DC for deriving the transform set associated with the current block considering the block dimension of the current block and distribution of the HoG built by DIMD jointly. In one example, when one or both of block width and height of a current block are greater than a specified threshold Twh and the ratio of the largest amplitude value of HoG to the sum of all HoG amplitude values is less than a specified threshold T1, a video coder may set the current intra prediction mode equal to Planar. Otherwise, the current intra prediction mode may be set equal to the prediction mode selected by the DIMD HoG or other specified methods. In the proposed method, the said HoG built by DIMD can be generated by the predicted samples in the current block or the reconstructed samples in the template region of the current block. Anyone of the proposed methods for determining whether to set the current intra prediction mode of a current block equal to one of Planar and DC for deriving the transform set associated with the current block can be utilised as a general method for detecting or predicting the presence of a non-angular intra prediction mode for a block in a video coding system.
[0047] In some embodiments, a video coder may comprise a plurality of intra prediction mode candidates for deriving the transform set associated with a current block. The video coder may further comprise creating a candidate list of intra prediction modes for deriving the transform set associated with the current block, wherein the intra prediction mode candidates may be selected based on the DIMD HoG or other specified methods dependent on the coding mode of the current block. For example, when a current block is coded in DIMD or TIMD mode, the candidate list of intra prediction modes for deriving the transform set associated with a current block may comprise two or more selected intra prediction modes used for generating a fused intra prediction signal.
[0048] When a current block is coded in MIP, intraTMP, Inter or EIP mode, the candidate list of intra prediction modes for deriving the transform set associated with a current block may comprise two or more angular prediction modes corresponding to two or more largest amplitude values of the HoGs built by the DIMD. The video coder may further comprise encoding or decoding one or more syntax elements to indicate the selected intra prediction mode from the candidate list for deriving the associated transform set. The video coder may further comprise determining whether to insert Planar or DC to the candidate list of intra prediction modes for the current block by a specified method. The video coder may further comprise reordering the intra prediction modes in the candidate list for the current block by a specified method and encoding or decoding syntax information indicating the selected intra prediction mode based on the reordered indices.
[0049] Specifically, our previous methods proposed for determining whether to set the current intra prediction mode of a current block equal to Planar or DC for deriving the associated transform set may be further applied to determining whether to insert Planar or DC to the candidate list of intra prediction modes and / or applied to reordering the intra prediction modes in the candidate list for the current block. If it is determined that the intra prediction mode of a current block shall be set equal to Planar or DC for deriving the associated transform set by one of our previous methods, then a video coder may further add Planar or DC to the candidate list and / or prioritize Planar or DC in the candidate list for deriving the associated transform set for the current block. For example, a video coder may determine whether to further add a non-angular mode, such as Planar or DC to a candidate list of intra prediction modes for deriving the associated transform set with a current block by comparing the block dimension (e.g. width, height, and / or area size) of the current block with a specified threshold Twh or by considering distribution of the HoG built up by DIMD using the predicted samples for the current block or the reconstructed samples in the template region of the current block.
[0050] In some specific embodiments, a video coder may further add a Planar mode to a candidate list of intra prediction modes for deriving the associated transform set with a current block when one of the following conditions is met: the block size dimension of the current block is greater than a specified threshold Twh; the average amplitude value of the HoG is less a specified threshold Ta ; or the ratio of the largest amplitude value of the HoG to the sum of the all amplitude values of the HoG is less than a specified threshold T1. Here, the HoG is built up by DIMD using the predicted samples for the current block or the reconstructed samples in the template region of the current block.
[0051] In some embodiments, when it is determined that a Planar or DC prediction mode shall be additionally inserted into a candidate list of the intra prediction modes, it is inserted to some fixed index position in the candidate list for a particular coding mode. For example, when a current block is coded in MIP, intraTMP, Inter or EIP mode and it is determined that a Planar or DC prediction mode shall be additionally inserted into the candidate list of the intra prediction modes for the current block, the candidate list of intra prediction modes for deriving the transform set associated with the current block may comprise the Planar mode as the first mode and the prediction mode corresponding to the largest HoG amplitude as the second mode. In another embodiment, the candidate list may comprise the prediction mode corresponding to the largest HoG amplitude as the first mode and the Planar mode as the second mode. Here, the HoG is built by DIMD using the predicted samples for the current block or the reconstructed samples in the template region of the current block.
[0052] In some embodiments, the index position for the additional Planar or DC prediction mode in the candidate list of the intra prediction modes for a particular coding mode can be adaptively determined for a current block depending on contextual information related to the current block, such as the coding mode, block dimension, predicted samples, and reconstructed neighbouring samples associated with the current block. In some specific embodiments, a video coder may determine the index position for the additional Planar or DC prediction mode in a candidate list for deriving the associated transform set with a current block in a particular coding mode by comparing the block dimension (e.g. width, height, and / or area size) of the current block with one or more sets of specified threshold values, or comparing the average amplitude value of the HoG with another set of specified threshold values. In another embodiment, the index position is determined by comparing the ratio of the largest amplitude value of the HoG to the sum of the all amplitude values of the HoG with another set of specified threshold values. Here, the HoG is built up by DIMD using the predicted samples for the current block or the reconstructed samples in the template region of the current block. For example, when a current block is coded in MIP, intraTMP, Inter, or EIP mode, the candidate list of intra prediction modes for deriving the transform set associated with a current block may be determined by further comparing the average amplitude value of the HoG with two threshold values, as follows: If sumAmp < N·Ta0 Cand0 = Planar, Cand1 = Mode0 else if sumAmp < N·Ta1 Cand0 = Mode0, Cand1 = Planar else Cand0 = Mode0, Cand1 = Mode1, where the variables Cand0 and Cand1 indicates the first and second intra prediction modes in the candidate list for deriving the transform set associated with the current block, the variable sumAmp is set equal to the sum of the amplitude values of the HoG built by the DIMD, the variables Mode0 and Mode1 indicate the intra prediction modes corresponding to the largest amplitude and the second largest amplitude in the HoG, the variable N indicates the number of the samples used for building up the HoG, and Ta0 and Ta1 are two threshold values with Ta0 < Ta1.
[0053] According to an aspect of the present invention, a video coder may adaptively determine the number of the intra prediction modes in a candidate list for deriving the transform set associated with a current block. In some embodiments, a video coder may determine the number of intra prediction mode candidates adaptively considering context information for coding a current block, such as block dimension (e.g. width, height, and / or area size) , quantization parameter (QP) , the coding mode of the current block and / or the intra prediction modes of the neighbouring blocks associated with the current block. For example, a video coder may determine the number of intra prediction mode candidates for a current block by comparing the block area size (in number of pixels) with a plurality of threshold value. For another example, a video coder may determine the number of intra prediction mode candidates for a current block by considering syntax information related to signalling the position of the last significant coefficients in the current block. In some embodiments, a video coder may signal the number of intra prediction mode candidates in one or more high-level syntax sets such as SPS, PPS, PH, and SH.
[0054] The proposed methods can be applied to different coding modes to determine the current intra prediction mode of a current block for deriving the associated transform set of LFNST, NSPT, or MTS, such as the intraTMP mode, the cross-component linear model (CCLM) mode, the template-based intra mode derivation (TIMD) mode, the decoder side intra mode derivation (DIMD) mode, extrapolation filter-based intra prediction (EIP) , the Inter mode, and the intra block copy (IBC) mode in ECM 12.
[0055] In ECM-12.0, when a CU is coded in DIMD mode, a fixed fusion weight value equal to 1 / 4 is assigned to the intra Planar predictor when the number of fused intra predictors is greater than 2. According to another aspect of the present invention, a video coder may further adjust the value of the fusion weight for the intra non-angular predictor adaptively when the number of fused intra predictors is greater than 2 in DIMD mode. In the proposed method, a video coder may further comprise determining the value of the fusion weight for the intra non-angular predictor for a current block in DIMD mode, wherein the fusion weight for the intra Planar predictor can be adaptively determined considering the distribution of the HoG built by DIMD and other coding conditions, such as the quantization parameter, block dimension, intra prediction modes of the neighbouring blocks associated with the current block.
[0056] In some embodiments, the video coder may further comprise detecting or predicting the presence of non-angular prediction mode for the current block. Specifically, our methods proposed for determining whether to set the current intra prediction mode of a current block equal to Planar or DC for deriving the associated transform set can be further applied to determining the fusion weight associated with the intra non-angular predictor used in the DIMD mode. If it is determined by one of our previous methods that the intra prediction mode of a current block shall be set equal to a non-angular mode for deriving the associated transform set by one of our previous methods, the video coder may further increase the fusion weight value for the non-angular predictor in the DIMD mode. In some embodiments, a video coder may determine the value of the fusion weight for the non-angular intra predictor by comparing the current block size (e.g. width, height, or area size) with one or more threshold values. In some embodiments, a video coder may determine the value of the fusion weight for the intra non-angular predictor by comparing an average amplitude of HoG built by DIMD with another set of threshold values. In some embodiments, a video coder may determine the value of the fusion weight for the intra Planar predictor considering one or more largest amplitude values in comparison with the sum of all histogram amplitude values.
[0057] Any of the foregoing proposed methods of adaptively inserting Planar or DC mode into a candidate list for deriving a transform set for the current block can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in an intra prediction module of an encoder, and / or an intra prediction module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit integrated to the intra prediction module of the encoder and / or the intra prediction module of the decoder. The proposed aspects, methods and related embodiments can be implemented individually or jointly in an image and video coding system.
[0058] The proposed aspects, methods and related embodiments can be implemented individually or jointly in an image and video coding system. For example, the proposed methods as described above can be implemented in an encoder side or a decoder side with reference to Fig. 1A and Fig. 1B. For example, any of the proposed methods can be implemented in an Intra coding module (e.g. Intra Pred. 150 in Fig. 1B) in a decoder or an Intra coding module in an encoder (e.g. Intra Pred. 110 in Fig. 1A) . Any of the proposed candidate derivation method 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 Pred. units (e.g. unit 110 in Fig. 1A and unit 150 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) ) .
[0059] Fig. 8 illustrates a flowchart of an exemplary video coding system that determines whether to insert Planar mode or DC mode into a first candidate to form an updated first candidate list for deriving a transform set associated with the current block according to an embodiment of the present invention. 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 on hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to this method, input data is received in step 810, wherein the input data comprises residual data for a current block at an encoder side or coded transformed residual data for the current block at a decoder side. A first candidate list comprising a plurality of member intra prediction modes for the current block is derived in step 820. Whether to insert Planar mode, DC mode, or both into the first candidate list to form an updated first candidate list for deriving a transform set associated with the current block is determined in step 830. A target intra prediction mode from the updated first candidate list is selected in step 840. A target set of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) is derived according to the target intra prediction mode in step 850. Forward transform is applied to the residual data according to a selected transform kernel of the target 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 set of LFNST or NSPT to derive reconstructed residual data in step 860. The transformed data at the encoder side or the reconstructed residual data at the decoder side is provided in step 870. It should be noted that the term “forward transform” has been used to make distinguishment with “inverse transform” , and is not intended to bring additional limitation to the term “transform” in this patent.
[0060] The flowchart shown is 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.
[0061] 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.
[0062] 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.
[0063] 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, wherein the input data comprises residual data for a current block at an encoder side or coded transformed residual data for the current block at a decoder side;deriving a first candidate list comprising a plurality of member intra prediction modes for the current block;determining whether to insert Planar mode, DC mode, or both into the first candidate list to form an updated first candidate list for deriving a transform set associated with the current block;selecting a target intra prediction mode from the updated first candidate list;deriving a target set of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) according to the target intra prediction mode;applying forward transform to the residual data according to a selected transform kernel of the target 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 set of LFNST or NSPT to derive reconstructed residual data; andproviding the transformed data at the encoder side or the reconstructed residual data at the decoder side.2.The method of Claim 1, wherein whether to insert the Planar mode, the DC mode, or both into the first candidate list is dependent on block dimension of the current block.3.The method of Claim 2, wherein the block dimension of the current block comprises width, height, area size, or a combination thereof.4.The method of Claim 1, wherein whether to insert the Planar mode, the DC mode, or both into the first candidate list is dependent on DIMD (Decoder Side Intra Mode Derivation) HoG (Histogram of Gradients) generated by predicted samples of the current block or reconstructed samples in a template region of the current block.5.The method of Claim 1, wherein a position in the first candidate list for insertion of a non-angular intra prediction candidate is fixed or determined adaptively according to contextual information for coding the current block.6.The method of Claim 1, wherein when the current block is coded in MIP (Matrix weighted Intra Prediction) , intraTMP (intra Template Matching Prediction) , Inter or EIP (Extrapolation filter-based Intra Prediction) mode, and the Planar mode or the DC mode is inserted into the first candidate list, the first candidate list comprises a first mode and a second mode selected from the Planar mode and a derived prediction mode corresponding to largest HoG (Histogram of Gradients) amplitude.7.The method of Claim 1, wherein when the current block is coded in MIP (Matrix weighted Intra Prediction) , intraTMP (intra Template Matching Prediction) , Inter or EIP (Extrapolation filter-based Intra Prediction) mode, whether to insert the Planar mode or the DC mode into the first candidate list is determined by comparing an average amplitude value of HoG (Histogram of Gradients) with a first threshold and a second threshold.8.The method of Claim 7, wherein the Planar mode is inserted to a first mode position in the first candidate list and mode 0 is moved to a second mode position in the first candidate list if the average amplitude value of HoG is smaller than the first threshold, and wherein the first threshold is smaller than the second threshold, and mode 0 corresponds to a first intra prediction mode in an original first candidate list used to derive the first candidate list.9.The method of Claim 8, wherein otherwise, the mode 0 remains at the first mode position in the first candidate list and the Planar mode is inserted into the second mode position in the first candidate list if the average amplitude value of HoG is between the first threshold and the second threshold.10.The method of Claim 9, wherein otherwise, the mode 0 remains at the first mode position in the first candidate list and mode 1 remains at the second mode position in the first candidate list if the average amplitude value of HoG is larger than the second threshold.11.The method of Claim 1, wherein a number of the plurality of member intra prediction modes in the first candidate list or the updated first candidate list is determined adaptively by considering context information for coding the current block.12.The method of Claim 11, wherein the number of the plurality of member intra prediction modes in the first candidate list or the updated first candidate list is determined according to block width, block height, block area, quantization parameter (QP) , and / or coding mode of the current block, and / or intra prediction modes of neighboring blocks.13.The method of Claim 11, wherein the number of the plurality of member intra prediction modes in the first candidate list or the updated first candidate list is signalled in one or more high-level syntax sets comprising SPS (Sequence Parameter Set) , PPS (Picture Parameter Set) , PH (Picture Header) , SH (Slice Header) , or a combination thereof.14.An apparatus of video coding, the apparatus comprising one or more electronics or processors arranged to:receive input data, wherein the input data comprises residual data for a current block at an encoder side or coded transformed residual data for the current block at a decoder side;derive a first candidate list comprising a plurality of member intra prediction modes for the current block;determine whether to insert Planar mode, DC mode, or both into the first candidate list to form an updated first candidate list for deriving a transform set associated with the current block;select a target intra prediction mode from the updated first candidate list;derive a target set of LFNST (Low-Frequency Non-Separable Transform) or NSPT (Non-Separable Primary Transform) according to the target intra prediction mode;apply forward transform to the residual data according to a selected transform kernel of the target 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 set of LFNST or NSPT to derive reconstructed residual data; andprovide the transformed data at the encoder side or the reconstructed residual data at the decoder side.
Citation Information
Patent Citations
Look-up table for enhanced multiple transform
US20180020218A1
Low frequency non-separable transform for video coding
US20220329819A1
Adaptive Transforms for Compound Inter-Intra Prediction Modes
US20230100043A1
Sign prediction for block-based video coding
WO2023043885A1
Method and apparatus of novel intra prediction with combinations of reference lines and intra prediction modes in video coding system
WO2024017187A1