Methods and apparatus of intra prediction with neural network-based intra prediction
Neural network-based intra prediction enhances video coding efficiency by deriving combined intra predictions, addressing limitations in existing methods and improving coding performance in versatile video coding systems.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- MEDIATEK INC
- Filing Date
- 2025-12-01
- Publication Date
- 2026-06-11
Smart Images

Figure CN2025138993_11062026_PF_FP_ABST
Abstract
Description
METHODS AND APPARATUS OF INTRA PREDICTION WITH NEURAL NETWORK-BASED INTRA PREDICTIONCROSS 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 / 727,251, filed on December 3, 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 using neural network based intra prediction as a candidate for deriving combined intra prediction for coding tools with multiple predictions or multiple hypothesis in a video coding system. BACKGROUND AND RELATED ART
[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] I. Neural Network-based Intra Prediction
[0010] I. 1 Neural Network Inference
[0011] The neural network-based intra prediction (NN-Intra) mode contains 7 neural networks, each predicting blocks of a different size in {4×4, 8×4, 16×4, 32×4, 8×8, 16×8, 16×16} . The neural network predicting blocks of size w×h is denoted fh, w (. ; θh, w) where θh,w gathers its parameters. For a given w×h block Y, fh, w (. ; θh, w) takes a preprocessed version of the context X made of na rows of nl+2w+ew reference samples located above this block and nl columns of 2h+eh reference samples on its left side to provide The application of a postprocessing to yields a prediction of Y, see Fig. 2. Besides, fh, w (. ; θh, w) returns two indices grpIdx1 and grpIdx2. grpIdxi denotes the index characterizing the LFNST kernel index and whether the primary transform coefficients resulting from the application of the DCT-2 horizontally and the DCT-2 vertically to the residue of the neural network prediction are transposed when lfnstIdx=i, i∈ {1, 2} , see Fig. 2. Furthermore, fh, w (. ; θh, w) gives the index of the VVC intra prediction mode (Planar, DC or directional intra prediction mode) whose prediction of Y from the reference samples surrounding Y best represents as shown in Fig. 2. The repIdx is referred as a prediction mode index of the NN-based intra prediction in this disclosure.
[0012] I. 2 Pre-processing and Post-processing
[0013] I. 2.1 Pre-processing of context of current block
[0014] The “pre-processing” shown in Fig. 2 consists of the four following steps. 1. The mean μ of the available reference samples in X, as shown in Fig. 3, is subtracted from 2. If the neural network predicting the current block is in floats, the reference samples in the context X are multiplied by ρ=1 / (2b-8) , b being the internal bitdepth, i.e. 10 in VVC. Otherwise, the reference samples in the context X are multiplied by Qin denoting the input quantizer. 3. All the unavailable reference samples Xu in X, as shown in Fig. 3, are set to 0. 4. The context resulting from the previous step is flattened, yielding avector of size na (nl+ 2w+ ew) + (2h+ eh) nl.
[0015] I. 2.2 Post-processing of neural network prediction
[0016] The “post-processing” depicted in Fig. 2 consists of reshaping the vector of size hw into a rectangle of height h and width w, dividing the result of the reshape by ρ, adding the mean μ of the available reference samples in the context of the current block, and clipping to [0, 2b-1] . Therefore, the postprocessing can be summarized as
[0017] I. 2.3 Adaptation of the derivation of the list of MPMs
[0018] When creating the MPM list of a given luma CB, if the “left” luma CB is predicted via the NN-Intra mode, the neural network-based mode index can be replaced by the repIdx returned during the prediction of the “left” luma CB and become a candidate index to be put into the MPM list. Similarly, if “above” luma CB is predicted via the NN-Intra mode, the neural network-based mode index can be replaced by the repIdx returned during the prediction of the “above” luma CB and become a candidate index to be inserted into the MPM list.
[0019] I. 3 Signalling of Neural Network-Based Intra Prediction Mode
[0020] I. 3.1 Signalling of the neural network-based intra prediction mode in luma
[0021] For the current w×h luma CB with the top-left pixel at position (y, x) in the current luma channel, the intra prediction mode signalling in luma is split into two cases. ● If (h, w) ∈T, nnFlag appears in the intra prediction mode signaling in luma. nnFlag =1 means that the NN-Intra mode is selected to predict the current luma CB and END. nnFlag =0 means that the NN-Intra mode is not selected to predict the current luma CB, then the regular intra prediction mode signalling in luma, denoted applies, see Fig. 3. ● Otherwise, the regular intra prediction mode signalling in luma applies.
[0022] Note that, in the case “ (h, w) ∈T &&nnFlag =1" , if the context of the current luma CB goes out of the bounds of the current luma channel, i.e. x<nl || y<na, the NN-Intra is replaced by Planar mode. T = { (4, 4) , (4, 8) , (8, 4) , (4, 16) , (16, 4) , (4, 32) , (32, 4) , (8, 8) , (8, 16) , (16, 8) , (8, 32) , (32, 8) , (16, 16) , (16, 32) , (32, 16) , (32, 32) , (64, 64) } .
[0023] I. 3.2 Signalling of neural network-based intra prediction mode in chroma
[0024] For the current pair of w×h chroma CBs having top-left pixel at position (y, x) in the current pair of chroma channels, the intra prediction mode signalling in chroma is split into two cases. ● If the luma CB collocated with this pair of chroma CBs is predicted by the NN-Intra mode: ○ If (h, w) ∈T, the DM (Direct Mode) becomes the NN-Intra mode. ○ Otherwise, the DM is set to Planar. ● Otherwise: ○ If (h, w) ∈T, nnFlagChroma appears in the intra prediction mode signalling in chroma. nnFlagChroma is placed before the DM flag in the decision tree of the intra prediction mode signalling in chroma. nnFlagChroma =1 means that the NN-Intra mode is selected to predict the current pair of chroma CBs and END. nnFlagChroma =0 means that the NN-Intra mode is not selected to predict the current pair of chroma CBs, then the regular intra prediction mode signalling in chroma resumes from the DM flag. ○ Otherwise, the regular intra prediction mode signalling in chroma applies.
[0025] Note that, in the case where “ (h, w) ∈T and the DM becomes the NN-Intra mode” and the case where “ (h, w) ∈T &&nnFlagChroma =1” , if the context of the current chroma CB goes out of the bounds of the current chroma channel, i.e. x<nl || y<na, the NN-Intra mode is replaced by Planar mode.
[0026] I. 4 Transformation of Context and Neural Network Prediction
[0027] For a given w×h block, if (h, w) ∈T, it is possible that the NN-Intra mode must predict this block, but the NN-Intra mode does not contain fh, w (. ; θh, w) . In this case, the context of the current block can be down-sampled vertically by a factor δ and / or down-sampled horizontally by a factor γ and / or transposed before the step called “pre-processing” in Fig. 2. Then, the prediction of the current block can be transposed and / or up-sampled vertically by the factor δ and / or up-sampled horizontally by the factor γ after the step called “post-processing” in Fig. 2. The transposition of the context of the current block and the prediction, δ, and γ are chosen so that a neural network belonging to the NN-Intra mode is used for prediction as shown Table 1. Table 1: Decision of transposing the context of the current w×h block to be predicted and the prediction of this block, the value of γ, and the value of δ, and the neural network belonging to the NN-Intra mode used for prediction for each (h, w) ∈T.
[0028] I. 5 Description of Neural Networks Belonging to Neural Network-Based Intra Prediction Mode
[0029] The neural network for the NN-Intra mode is built by 4 cascaded fully-connected layers for the neural network predicting if the block size is 16x16, and 3 cascaded fully-connected layers for the other sizes. The memory consumption is about 4.9MB for the whole NN-Intra mode.
[0030] I. 6 Combination of Neural Network-Based Intra Prediction Mode and ISP
[0031] I. 6.1 Restricted combination
[0032] In the proposed combination between the NN-Intra mode and ISP (Intra Sub-partition) , ISP is allowed in luma exclusively and the same split types as in the original ISP are employed, i.e. horizontal and vertical splits. However, for a given luma CB predicted by the NN-Intra mode, ISP is ruled by four additional constraints compared to the constraints specific to the original ISP.
[0033] The luma CB can only be split into 4 equal-sized sub-partitions for both prediction and {transform coding, entropy coding of quantized transform coefficients} . For instance, a 8x8 luma CB predicted via the NN-Intra mode cannot be split vertically into two 4x8 sub-partitions for prediction and four 2x8 sub-partitions for {transform coding, entropy coding of quantized transform coefficients} .
[0034] A sub-partition of the luma CB cannot have a dimension strictly smaller than 4. For instance, a 4x16 luma CB predicted via the NN-Intra mode cannot be split vertically via ISP into four 1x16 sub-partitions.
[0035] At least one of the two dimensions of the luma CB must be equal to 4.
[0036] The luma CB must belong to a CU in a separate tree.
[0037] To summarize, for a given luma CB predicted by the NN-Intra mode, ISP is allowed if ispAllowed is true. ispAllowed = ! isPrelim && ( (h<<2) ≥4 || (w<<2) ≥4) isPrelim = ! isSepTree||h<4 ||w<4 || (h ! = 4 && w ! = 4) where h∶ height of the luma CB, w : width of the luma CB, and isSepTree : true if the luma CB is part of a CU in separate tree.
[0038] I. 6.2 Additional combination with LFNST
[0039] For a given luma CB predicted by a non-NN-Intra mode, when ISP and LFNST are used, the LFNST implicit signalling is determined by the index of the intra prediction mode, and all the luma TBs arising from the ISP split share the same LFNST implicit signalling. In contrast, for a given luma CB predicted via the NN-Intra mode, when ISP and LFNST are used, for each luma TB independently, the neural network infers the LFNST implicit signalling for this luma TB while predicting it.
[0040] I. 6.3 Coding tools in VVC and ECM
[0041] The description of prediction methods including Decoder-side Intra Mode Derivation (DIMD) , Template-Based Intra Mode Derivation (TIMD) , Combined Inter and Intra Prediction (CIIP) , Geometric Partitioning Mode (GPM) with inter and intra prediction, Spatial Geometric Partitioning Mode (SGPM) can refer to JVET-AJ2025 (Algorithm description of Enhanced Compression Model 15) and JVET-AH2002 (Algorithm description for Versatile Video Coding and Test Model 22) .
[0042] In the present invention, methods and apparatus to use NN-based intra prediction as an intra prediction candidate to derive blended intra prediction as final prediction are disclosed to improve the coding performance. BRIEF SUMMARY OF THE INVENTION
[0043] A method and apparatus for video coding using coding tools including neural network-based intra prediction are disclosed. According to the method, input data associated with a current block is received, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side. Two or more intra predictions are derived, wherein at least one of said two or more intra predictions corresponds to NN (Neural Network) -based intra prediction. Final prediction is generated by combining said two or more intra predictions. The current block is encoded or decoded using the final prediction.
[0044] In one embodiment, the current block is coded in DIMD (Decoder-side Intra Mode Derivation) or TIMD (Template-Based Intra Mode Derivation) .
[0045] In one embodiment, said two or more intra predictions correspond to two or more regular intra prediction and said two or more intra predictions comprise intra angular predictions, intra planar mode, or the NN-based intra prediction. In one embodiment, non‐directional prediction is implicitly determined as NN‐intra prediction according to size of the current block or a number of to‐be‐combined intra angular predictions.
[0046] In one embodiment, usage of combining the NN-based intra prediction to form the final prediction is explicitly indicated. In one embodiment, a syntax is signalled in SPS (Sequence Parameter Set) , PPS (Picture Parameter Set) , PH (Picture Header) or SH (Slice Header) to indicate if said combining the NN-based intra prediction in the DIMD or the TIMD is allowed for a current sequence, picture, or slice.
[0047] In one embodiment, the current block is coded in SGPM (Spatial Geometric Partitioning Mode) and the NN-based intra prediction is allowed as one of intra prediction pair. In one embodiment, the NN-based intra prediction is used to replace an intra angular prediction with an angular mode index equal to a representative intra prediction mode index of the NN-based intra prediction. In one embodiment, the NN-based intra prediction is included into an intra prediction mode list, and an index is used to represent an intra prediction mode index of NN-based intra prediction. In one embodiment, the NN-based intra prediction is the first candidate to be included into the intra prediction mode list if the NN-based intra prediction is available.
[0048] In one embodiment, the NN-based intra prediction is included into an intra prediction mode list, and an index is used to represent an intra prediction mode index of NN-based intra prediction. In one embodiment, the NN-based intra prediction is the first candidate to be included into the intra prediction mode list if the NN-based intra prediction is available.
[0049] In one embodiment, if N neural network models are available for the current block, x out of the N neural network models are selected to further combine predictions together or to blend with non-NN-intra predictions, and wherein N and x are positive numbers and N ≥ x. In one embodiment, the x out of the N neural network models are selected according to template cost, selection of the x out of the N neural network models is dependent on the template cost using one or more reduced template regions. In one embodiment, said one or more reduced template regions correspond a reduced left region or a reduced top region.BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Fig. 1A illustrates an exemplary adaptive Inter / Intra video coding system incorporating loop processing.
[0051] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.
[0052] Fig. 2 illustrates an exemplary prediction of the current w×h block Y from the context X of reference samples around Y via the NN-Intra mode, with w = 8 and h = 4.
[0053] Fig. 3 illustrates an example of decomposition of the context X of reference samples surrounding the current w×h block Y into the available reference samples and the unavailable reference samples Xu, where w=8 and h=4.
[0054] Fig. 4 illustrates an example of intra prediction mode signalling for the current w×h luma CB framed in long-dashed lines, where the bin value of nnFlag is shown in bold grey, h= 8, w = 4, x = 8, and y = 0.
[0055] Fig. 5 illustrates an example of neighbouring templates for calculating block matching costs.
[0056] Fig. 6 illustrates examples of templates used to generate template cost, where Fig. 6A shows an example of above and left templates (i.e., “a” and “b” regions marked with slash lines) used to calculate the template cost; Fig. 6B shows regions “a1” and “b1” marked in dots are used to generate the corresponding prediction of above template; and Fig. 6C shows regions “a2” and “b2” marked in dots used to generate the corresponding prediction of left template.
[0057] Fig. 7 illustrates examples of reduced template regions for calculating template cost.
[0058] Fig. 8 illustrates a flowchart of an exemplary video coding system that uses NN-based intra prediction as an intra prediction candidate to derive blended intra prediction as final prediction according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION
[0059] 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.
[0060] 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.
[0061] II. Proposed Method
[0062] The following methods are proposed to improve the intra prediction accuracy or coding performance.
[0063] II. 1 NN-Intra Prediction Fusion
[0064] The final prediction of the current block can be the combination of multiple predictions from different neural networks, or fusion of the prediction of the selected NN-Intra mode with non-NN-intra prediction (e.g. intra angular prediction modes, intra planar / DC modes, CIIP, Spatial GPM, GPM-intra, DIMD fusion, TIMD fusion, MRL, or inter prediction tools) .
[0065] In one embodiment, the NN-intra prediction can be always fused with normal intra prediction, or conditionally fused with normal intra prediction.
[0066] In another embodiment, the NN-intra prediction can be always fused with normal intra prediction with different reference line. For example, the reference line N is used for the input of NN-intra, the reference line N+1 is used for another non-NN-intra prediction, and the final prediction includes the fusion of these predictions.
[0067] II. 1.1 NN-intra prediction fusion in DIMD or TIMD
[0068] In Decoder Side Intra Mode Derivation (DIMD) or Template-Based Intra Mode Derivation (TIMD) , multiple regular intra predictions are combined to get the final prediction. The regular intra predictions can be intra angular predictions, intra planar mode, or NN-intra prediction.
[0069] In one embodiment, if the current block is predicted by DIMD or TIMD, a syntax is used to indicate which non-directional prediction is weighted combined with intra angular predictions. The syntax can be implicitly or explicitly determined. The non-directional prediction can be planar (or DC) prediction, prediction based on block vector, or NN-intra prediction. In another embodiment, the non-directional prediction is implicitly determined as NN-intra prediction according to the current block size (e.g., block width, block height, or block area) , or the number of to-be-combined intra angular predictions. For example, if the current block size is greater / less than or equal to a threshold, NN-intra prediction is selected. For another example, if the number of to-be-combined intra angular predictions is greater / less than or equal to a threshold, NN-intra prediction is selected. In another embodiment, NN-intra prediction is one of predictions when combining predictions in TIMD or DIMD.
[0070] In another embodiment, the usage of combining with NN-intra prediction can be explicitly indicated. The syntax can be signalled in SPS, PPS, PH or SH to indicate if combining with NN-intra prediction in DIMD or TIMD is allowed for the current sequence, picture, or slice. The syntax can be referred to use NN-intra to replace non-directional intra prediction (e.g., planar or DC mode) in DIMD or TIMD for the current sequence, picture, or slice.
[0071] In another embodiment, if the current block is predicted by TIMD, two intra prediction modes are selected to fuse with planar (or DC) prediction as the final prediction. The NN-intra prediction can be one of two intra prediction modes. For example, NN-intra prediction is combined with another intra prediction mode and fused with planar (or DC) prediction. To obtain the NN-intra prediction of the neighbouring template, the method in Section II. 4.2 (i.e., the Section entitled “Cost measured by template cost” ) is used for further calculate the SATD value of NN-intra prediction.
[0072] In another embodiment, if the current block is predicted by DIMD or TIMD with NN-intra prediction, PDPC is not applied to the NN-intra prediction.
[0073] II. 1.2 NN-intra prediction fusion in GPM with inter and intra prediction
[0074] In GPM with inter and intra prediction, the final prediction samples are generated by weighting inter predicted samples and intra predicted samples for each GPM-separated region. The inter predicted samples are derived by inter GPM whereas the intra predicted samples are derived by an intra prediction mode (IPM) candidate list and a candidate index is indicated. In one embodiment, NN-intra prediction is included into the IPM list, and repIdx is used to represent the intra prediction mode index of NN-intra prediction. In another embodiment, the NN-intra prediction is the first candidate to be included into the IPM list if NN-intra is available. In another embodiment, the NN-intra prediction can be used for GPB with IBC (Intra Block Copy) and intra prediction.
[0075] II. 1.3 NN-intra prediction fusion in SGPM
[0076] In Spatial Geometric Partitioning Mode (SGPM) , a candidate list is created to include feasible intra angular prediction combination pairs with various partition splits. The list is reordered using template cost. The target candidate index is signalled to indicate the intra angular prediction pairs and the corresponding partition mode. To improve the coding performance of SGPM, the NN-intra prediction is allowed to one of intra prediction pairs. In one embodiment, NN-intra prediction is used to replace the intra angular prediction that has the angular mode index equal to repIdx. In another embodiment, NN-intra prediction is included into the intra prediction mode list, and repIdx is used to represent the intra prediction mode index of NN-intra prediction. The NN-intra prediction is the first candidate to be included into the mode list if NN-intra is available.
[0077] In another embodiment, if NN-intra is used in SGPM, to obtain the NN-intra prediction of the neighbouring template in SGPM, the method in Section II. 4.2 (i.e., the Section entitled “Cost measured by template cost” ) is used for further calculate the SAD cost of NN-intra prediction.
[0078] In another embodiment, a syntax is explicitly indicated if NN-intra prediction is used to replace the intra angular prediction has the intra mode index equal to repIdx. Another syntax can be signalled in SPS, PPS, PH or SH to indicate whether the prediction replacement or NN-intra prediction used in SGPM is allowed to the current sequence, picture, or slice.
[0079] II. 2 NN-Intra Prediction Fusion Using Various Template Patterns
[0080] In one embodiment, two or more neural networks using different neighbouring template patterns are combined to generate the final prediction. For example, the first prediction is generated by applying the given neural network to the above neighbouring reconstruction samples (i.e., neighbouring samples have vertical position greater than the above-side position of the current block) , the second prediction is generated by applying the given neural network to the left neighbouring reconstruction samples (i.e., neighbouring samples have horizontal position greater than the left-side position of the current block) , the third prediction is generated by applying the given neural network to the above and left neighbouring reconstruction samples. Then, the final prediction of the current block is the weighed combination of two out of three predictions, or the weighed combination of three predictions.
[0081] In another embodiment, the final prediction can combine the prediction using NN-Intra mode or non-NN-intra prediction mode together. For example, the first prediction is generated using NN-Intra mode, the second is generated by one of inter or intra prediction modes, the final prediction is the weighted combination of the first and the second predictions. Besides, the prediction using NN-Intra mode can be generated by using various neighbouring template patterns (e.g., above-only, left-only, or left and above neighbouring samples) , or the neighbouring samples are transposed as the input of neural network. The NN-Intra mode with the specific pattern has the lowest template cost is selected to combine with non-NN-intra prediction mode together.
[0082] II. 3 NN-intra in MPM List
[0083] To reduce the intra prediction mode index signalling overhead, a MPM list is used for intra blocks for storing the recently used intra prediction mode index, including neighbouring intra prediction modes, derived intra prediction modes, and default modes. In one embodiment, NN-intra prediction is included into the MPM list, and repIdx is used to represent the intra prediction mode index of NN-intra prediction. In other words, the original intra angular prediction mode has the same repIdx mode index is replaced by NN-intra prediction. In another embodiment, the NN-intra prediction is the first candidate to be included into the MPM list if NN-intra is available. In another embodiment, the intra mode index of NN-intra prediction is the total number of non-NN-intra prediction modes plus 1. In another embodiment, if the selected neighbouring positions are predicted by NN-intra prediction mode, the NN-intra prediction is the first candidate to be included into the MPM list.
[0084] In another embodiment, a syntax is signalled in SPS, PPS, PH or SH to indicate if the prediction replacement by NN-intra prediction in MPM list is allowed to the current sequence, picture, or slice.
[0085] II. 4 Reorder or Select Candidate Neural Network Models by Cost
[0086] If N neural network models are valid for the current block (N > 1) , and x out of N network models (x ≥ 1) are selected to further combine predictions together or to blend with non-NN-intra predictions. The selection can depend on the blocking matching cost or the template cost.
[0087] II. 4.1 Cost is measured by block matching cost
[0088] In one embodiment, the selection can depend on the boundary matching cost measured by the prediction of a neural network model. For example, the prediction of the k-th neural network model at position (i, j) of the current block is the above neighbouring reconstruction sample corresponding to the position (i, j) of the current block at the m-th reference line is the left neighbouring reconstruction sample corresponding the position (i, j) of the current block at the m-th reference line is The locations of and are shown in Fig. 5. To calculate the block matching cost of the k-th neural network model, the cost can be determined as the difference of above neighbouring reconstruction samples and the above samples inside the current block (denoted as ) and the difference of left neighbouring reconstruction samples and the left samples inside the current block (denoted as ) , and can be formulated as where and are the weights for combining the difference values according to vertical and horizontal positions for the m-th reference line, and The value of j in can be further restricted, for example, j can be 0 or 1. Similarly, the value of i in can be further restricted, for example, i can be 0 or 1. In one embodiment, or
[0089] After calculating the block matching costs of each network models, a block matching cost list is created as {cost0, cost1, cost2, …, costk, …, costN} . Then the cost list is sorted in non-descending order, and the first x models are selected. In another embodiment, the x models can be selected explicitly. For example, the selected candidate network model index after sorting is signalled.
[0090] In another embodiment, if the above neighbouring reconstruction samples are not available, Similarly, if the left neighbouring reconstruction samples are not available, If both above and left reconstruction samples are not available, the final prediction of the current block is not allowed to combine the prediction of neural network model, or a default neural network model is implicitly selected.
[0091] II. 4.2 Cost measured by template cost
[0092] In another embodiment, the selection can depend on the template cost. For example, as shown in Fig. 6A, the above template (the region “a” marked with slash lines) or the left template (the region “b” marked with slash lines) are used to calculate the template cost. The template cost is measured by the difference between the reconstruction samples and the prediction using a specified prediction tool.
[0093] To obtain the prediction using a network model corresponding to the above template (or say region “a” ) , the reconstruction samples inside the above region “a1” with size w×na and the left region “b1” with size nl×h are used as the input of the neural network (i.e., fh,w (., θh, w) ) , where region “a1” and region “b1” are both next / adjacent to the above template (or say region “a” ) , as shown in Fig. 6B. The above template cost of the k-th neural network model can be formulated as: where is the prediction sample of the neural network and is the reconstruction samples at position (i, j) inside the above template, is the weights for combining the difference values at position (i, j) inside the above template, and 0≤i<w, 0≤j<ha, and
[0094] Similarly, to obtain the prediction using a network model corresponding to the left template (or say region “b” ) , the reconstruction samples inside the above region “a2” with size w×na and the left region “b2” with size nl×h are used as the input of the neural network (i.e., fh,w (., θh, w) ) , where region “a2” and region “b2” are both next / adjacent to the above template (or say region “b” ) , as shown in Fig. 6C. The left template cost of the k-th neural network model can be formulated as: where is the prediction sample of the neural network and is the reconstruction sample at position (m, n) inside the above template, is the weights for combining the difference values at position (m, n) inside the above template, and 0≤m<wb, 0≤n<h, and
[0095] Finally, the template cost of the k-th neural network model can be formulated as:
[0096] After calculating the block matching costs of each network models, a template cost list is created as {cost0, cost1, cost2, …, costk, …, costN} . Then the cost list is sorted in non-descending order, and the first x models are selected. In another embodiment, the x models can be selected explicitly. For example, the selected candidate network model index after sorting is signalled.
[0097] In another embodiment, the selection can depend on the template cost using the reduced template regions. For example, as shown in Fig. 7, when calculating the template cost for NN-intra, the reduced above template (the region a’ marked with slash lines) or the reduced left template (the region b’ marked with slash lines) are used to calculate the template cost. The template cost is measured by the difference between the reconstruction samples and the prediction using a specified prediction tool, as the methods in this Section (i.e., “Cost measured by template cost” ) . In another embodiment, after calculating the template cost using the reduced template regions, the template cost of NN-intra mode can multiply a factor (e.g., a fractional value greater than 1.0) for normalization once the template regions used for other predictions is not the same as that in NN-intra prediction.
[0098] II. 4.3 Use selected neighbouring positions to calculate cost
[0099] In still another embodiment, not all positions inside the above and left neighbouring reconstruction samples are used in calculating cost. For example, it can define a first start position and a first subsampling interval depends on the width of the current block to partially select positions inside the above neighbouring reconstruction samples. Similarly, it can define a second start position and a second subsampling interval depends on the height of the current block to partially select positions inside the left neighbouring reconstruction samples.
[0100] For another example, the number of reference lines to calculate the cost can be a constant or depend on the block size (e.g., if the current block size is greater than or equal to a threshold, number of reference line is equal to a first value. Otherwise, the number of reference line is equal to a second value) . For example, na or nl in the above figure can be 1, 2, 3, 4, 5, or 6.
[0101] II. 5 Pre-Refinement of Template Region for NN-intra
[0102] In one embodiment, filters like smooth, high pass, low pass filter…etc. can be applied on the template area. The filtered template area is then used as the input of NN-intra prediction. For example, [1 2 1] >> 2 filters are applied on the template area before the pre-processing of NN-intra. In one embodiment, the specific filter is always applied on the template area. In another embodiment, if multiple candidate filters can be applied, the filter can be selected by the lowest template cost. In another embodiment, the filter is selected explicitly by signalling the index of desired filter in PU, CU, CTU, slice, picture, or sequence level. In another embodiment, the proposed template area filtering can be combined with the embodiment of different neighbouring patterns. To be specific, any filters can be applied on various neighbouring template patterns (e.g., above-only, left-only or left and above neighbouring samples) , or the neighbouring samples are transposed as the input of neural network.
[0103] II. 6 Post Refinement of NN-Intra Prediction
[0104] In one embodiment, for the output of NN-intra prediction, further refinement can be applied on the output. The reconstruction of template area and the current output prediction can be used as the information for refinement. For example, the PDPC method can be applied on the output of NN-intra prediction. For another example, convolution with 3x3 kernel can be applied on the first above line and / or first left line to reduce the blocky artefact. In one embodiment, the refinement process is always applied on the NN-intra output, while in another embodiment, the refinement is applied by implicit rule. For example, the refinement process is applied on the NN-intra block with an up-sampling operation during generating the NN-intra prediction. In another embodiment, the refinement is explicitly applied by signalling a flag in PU, CU, CTU, slice, picture, or sequence level.
[0105] II. 7 Signalling Inherited Candidate Index in the List In one embodiment, an on / off flag is signalled to indicate whether NN-intra predictor is used for the current prediction mode. The flag can be signalled per CU / CB, PU, TU / TB, colour component, or chroma colour component. A high-level syntax can be signalled in SPS, PPS, PH or SH to indicate whether NN-intra predictor is allowed for the current sequence, picture, or slice. If NN-intra predictor is used for the current prediction mode, the used template pattern is signalled using truncate unary code, Exp-Golomb code, or fix length code.
[0106] Any of the foregoing proposed methods can be implemented in encoders and / or decoders. For example, any of the proposed methods of using NN-based intra prediction can be implemented in an inter / intra / prediction module of an encoder, and / or an inter / intra / prediction module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the inter / intra / prediction module of the encoder and / or the inter / intra / prediction module of the decoder, so as to provide the information needed by the inter / intra / prediction module.
[0107] With reference to the exemplary encoder in Fig. 1A and exemplary decoder in Fig. 1B, any of the proposed methods of using NN-based intra prediction 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 is an encoder (e.g. Intra Pred. 110 / Inter Pred. 112 in Fig. 1A) . Any of the proposed methods can also be implemented as a circuit coupled to the intra / inter coding module at the decoder or the encoder. However, the decoder or encoder may also use additional processing unit to implement the required processing for the proposed methods. While the Intra / Inter Pred. units (e.g. unit 110 / 112 in Fig. 1A and unit 150 / 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) ) .
[0108] Fig. 8 illustrates a flowchart of an exemplary video coding system that uses NN-based intra prediction as an intra prediction candidate to derive blended intra prediction as final prediction 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 hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to the method, input data associated with a current block is received in step 810, wherein the input data comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side. Two or more intra predictions are derived in step 820, wherein at least one of said two or more intra predictions corresponds to NN (Neural Network) -based intra prediction. Final prediction is generated by combining said two or more intra predictions in step 830. The current block is encoded or decoded using the final prediction in step 840.
[0109] 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.
[0110] 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.
[0111] 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.
[0112] 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 comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side;deriving two or more intra predictions, wherein at least one of said two or more intra predictions corresponds to NN (Neural Network) -based intra prediction;generating final prediction by combining said two or more intra predictions; andencoding or decoding the current block using the final prediction.2.The method of Claim 1, wherein the current block is coded in DIMD (Decoder-side Intra Mode Derivation) or TIMD (Template-Based Intra Mode Derivation) .3.The method of Claim 2, wherein said two or more intra predictions correspond to two or more regular intra prediction and said two or more intra predictions comprise intra angular predictions, intra planar mode, or the NN-based intra prediction.4.The method of Claim 3, wherein non‐directional prediction is implicitly determined as NN‐intra prediction according to size of the current block or a number of to‐be‐combined intra angular predictions.5.The method of Claim 2, wherein usage of combining the NN-based intra prediction to form the final prediction is explicitly indicated.6.The method of Claim 5, wherein a syntax is signalled in SPS (Sequence Parameter Set) , PPS (Picture Parameter Set) , PH (Picture Header) or SH (Slice Header) to indicate if said combining the NN-based intra prediction in the DIMD or the TIMD is allowed for a current sequence, picture, or slice.7.The method of Claim 1, wherein the current block is coded in SGPM (Spatial Geometric Partitioning Mode) and the NN-based intra prediction is allowed as one of intra prediction pair.8.The method of Claim 7, wherein the NN-based intra prediction is used to replace an intra angular prediction with an angular mode index equal to a representative intra prediction mode index of the NN-based intra prediction.9.The method of Claim 7, wherein the NN-based intra prediction is included into an intra prediction mode list, and an index is used to represent an intra prediction mode index of NN-based intra prediction.10.The method of Claim 9, wherein the NN-based intra prediction is the first candidate to be included into the intra prediction mode list if the NN-based intra prediction is available.11.The method of Claim 1, wherein the NN-based intra prediction is included into an intra prediction mode list, and an index is used to represent an intra prediction mode index of NN-based intra prediction.12.The method of Claim 11, wherein the NN-based intra prediction is the first candidate to be included into the intra prediction mode list if the NN-based intra prediction is available.13.The method of Claim 1, wherein if N neural network models are available for the current block, x out of the N neural network models are selected to further combine predictions together or to blend with non-NN-intra predictions, and wherein N and x are positive numbers and N ≥ x.14.The method of Claim 13, wherein the x out of the N neural network models are selected according to template cost, selection of the x out of the N neural network models is dependent on the template cost using one or more reduced template regions.15.The method of Claim 14, wherein said one or more reduced template regions correspond a reduced left region or a reduced top region.16.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 comprise pixel data for the current block to be encoded at an encoder side or coded data associated with the current block to be decoded at a decoder side;derive two or more intra predictions, wherein at least one of said two or more intra predictions corresponds to NN (Neural Network) -based intra prediction;generate final prediction by combining said two or more intra predictions; andencode or decode the current block using the final prediction.