Methods and apparatus of inter prediction and neural network based intra prediction

By using a neural network-based intra-frame prediction method, combined with inter-frame prediction and geometric segmentation modes, the final prediction samples are generated, solving the problem of low efficiency in intra-frame prediction in existing technologies and improving the encoding and decoding performance and accuracy of video encoding and decoding.

CN123187437APending Publication Date: 2026-11-27MEDIATEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202580030697.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-12-03
Filing Date
2025-12-01
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies are inefficient in intra-frame prediction, making it difficult to effectively improve encoding and decoding performance.

Method used

A neural network-based intra-frame prediction method is adopted, which combines inter-frame prediction and geometric segmentation modes. The final prediction sample is generated by using the context information of the neural network prediction block, and then fused with other prediction modes to improve the encoding and decoding efficiency.

Benefits of technology

It improves the accuracy of intra-frame prediction and encoding/decoding efficiency, and optimizes the video encoding/decoding process by fusing multiple prediction modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123187437A_ABST
    Figure CN123187437A_ABST
Patent Text Reader

Abstract

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 comprises pixel data of 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, and wherein the current block is partitioned into a plurality of partitions. Intra prediction samples of a target region of the current block are derived according to an intra prediction mode, wherein the intra prediction mode comprises neural network based intra prediction. Non-neural network based intra prediction samples of the target region of the current block are derived. Final prediction samples are generated based on the intra prediction samples and the non-neural network based intra prediction samples. The current block is encoded or decoded using the final prediction samples.
Need to check novelty before this filing date? Find Prior Art

Description

Related applications

[0001] This application is a non-provisional application and claims priority to U.S. Provisional Application No. 63 / 727,247, filed December 3, 2024, which is incorporated herein by reference in its entirety. Technical Field

[0002] This invention relates to video encoding and decoding systems. In particular, this invention relates to using intra-frame prediction based on a neural network (NN) as a candidate in a video encoding and decoding system to derive intra-frame prediction samples for encoding and decoding tools with multiple predictions or multiple hypotheses. Background Technology

[0003] Versatile Video Coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (JVET), comprised of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG). This standard has been published as an ISO standard: ISO / IEC 23090-3:2021, Information technology – Coding representation of immersive media – Part 3: Versatile Video Coding, published in February 2021. VVC is based on its predecessor, High Efficiency Video Coding (HEVC), and improves coding efficiency by adding more coding tools, enabling it to handle various video source types, including 3D video signals.

[0004] Figure 1AThis demonstrates an exemplary adaptive inter-frame / intra-frame video coding system incorporating cyclic processing. For intra-frame prediction 110, the prediction data is derived from previously encoded video data in the current image. For inter-frame prediction 112, motion estimation (ME) is performed at the encoder, and motion compensation (MC) is performed based on the ME results to provide prediction data derived from other images and motion data. Switch 114 selects either intra-frame prediction 110 or inter-frame prediction 112, and the selected prediction data is fed to adder 116 to form the prediction error, also known as the residual. The prediction error is then processed by transform (T) 118, followed by quantization (Q) 120. The transformed and quantized residual is then encoded by an entropy encoder (122) and incorporated into the video bitstream of the corresponding compressed video data. The bitstream associated with the transform coefficients is packaged with side information, such as the motion and coding modes associated with intra-frame and inter-frame prediction, and other information such as parameters associated with the cyclic filters applied to the underlying image regions. Side information related to intra-frame prediction 110, inter-frame prediction 112, and cyclic filter 130, such as Figure 1A The image is provided to the entropy encoder 122. When using inter-frame prediction mode, the reference image must also be reconstructed at the encoder. Therefore, the transformed and quantized residuals are processed by inverse quantization (IQ) 124 and inverse transformation (IT) 126 to recover the residuals. The residuals are then added back to the prediction data 136 during reconstruction (REC) 128 to reconstruct the video data. The reconstructed video data can be stored in the reference picture buffer (134) and used for prediction of other frames.

[0005] like Figure 1AAs shown, the input video data undergoes a series of processing steps in the encoding system. The reconstructed video data from REC 128 may suffer various losses due to these processing steps. Therefore, a cyclic filter 130 is typically applied to the reconstructed video data before it is stored in the reference image buffer 134 to improve video quality. For example, a deblocking filter (DF), sample adaptive offset (SAO), and adaptive loop filter (ALF) can be used. Cyclic filter information may need to be incorporated into the bitstream so that the decoder can correctly recover the required information. Therefore, cyclic filter information is also provided to the entropy encoder 122 for inclusion in the bitstream. Figure 1A In the process, the cyclic filter 130 is applied to reconstruct the video, and then the reconstructed samples are stored in the reference image buffer 134. Figure 1A The system is designed to illustrate a paradigmatic architecture of a typical video encoder, which may correspond to a High Efficiency Video Coding (HEVC) system, VP8, VP9, ​​H.264, or VVC.

[0006] like Figure 1B As shown, the decoder can use some of the same functional modules 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 end. The decoder uses an entropy decoder (140) to decode the video bitstream into quantized transform coefficients and the necessary coding information (e.g., ILPF information, intra-frame prediction information, and inter-frame prediction information), instead of the entropy encoder 122. The intra-frame prediction 150 at the decoder end does not need to perform mode search; it only needs to generate intra-frame predictions based on the intra-frame prediction information received from the entropy decoder 140. Furthermore, for inter-frame prediction, the decoder only needs to perform motion compensation (MC 152) based on the inter-frame prediction information received from the entropy decoder 140, without performing motion estimation.

[0007] In VVC, the Sequence Parameter Set (SPS) and Picture Parameter Set (PPS) contain high-level syntax elements applicable to the entire encoded video sequence and images. The Picture Header (PH) and Slice Header (SH) contain high-level syntax elements applicable to the currently encoded image and the currently encoded segment.

[0008] In VVC, the coded image is divided into non-overlapping square regions, represented by associated Coding Tree Units (CTUs). The coded image can consist of multiple segments, each containing an integer number of CTUs. The CTUs within a segment are processed in raster scan order. Bidirectional prediction (B) segments can use intra-frame or inter-frame prediction, employing at most two motion vectors and a reference index to predict the sample value for each block. Unidirectional prediction (P) segments use either intra-frame or inter-frame prediction, employing at most one motion vector and a reference index to predict the sample value for each block. Intra-frame (I) segments are decoded using only intra-frame prediction.

[0009] I. Intra-frame prediction based on neural networks I.1 Neural Network Inferences Neural network-based intra-frame prediction (NN-intra-frame) patterns include Each of the 10 neural networks predicts... Blocks of different sizes. The predicted size is... The neural network of blocks is denoted as ,in Collect its parameters. For a given , Received by Preprocessing context The context is defined by the block above it. OK A reference sample and its left side List Composed of several reference samples to provide .right Post-processing can produce Prediction ,like Figure 2 As shown. Furthermore, Return two indexes and . This represents the index used to describe whether the LFNST core index and the main transform coefficients obtained after the neural network prediction residuals are processed by horizontal DCT-2 and vertical DCT-2 are transposed. , ,like Figure 2 As shown. Furthermore, Provide an index of the VVC intra-prediction modes (planar, DC, or directional intra-prediction modes). This mode is from the surrounding The prediction derived from the reference sample is the most representative ,like Figure 2 As shown.

[0010] like : otherwise: like ; otherwise: ; like ; otherwise: like , .otherwise, like , .otherwise, .

[0011] I.2 Preprocessing and Postprocessing I.2.1 Preprocessing of the current block context like Figure 2 The “preprocessing” shown includes the following four steps.

[0012] 1. Reference samples are available. exist The average value in (like Figure 3 (As shown) From Subtract from the middle.

[0013] 2. If the neural network used to predict the current block is a floating-point number, then the reference samples in the context... Multiply , Internal bit depth, i.e., in VVC Otherwise, the reference sample in the context Multiply , This indicates the input quantizer.

[0014] 3. All in Unavailable reference samples (like Figure 3 (As shown) are all set to .

[0015] 4. The context generated by the aforementioned steps is flattened to obtain... Its size is The vector.

[0016] I.2.2 Post-processing of Neural Network Prediction like Figure 2 The "post-processing" shown includes processing data of size [size missing]. vector Remodeling into a high degree ,width The rectangle, the reshaping result divided by Add the average value of the available reference samples in the current block context And cut to Therefore, post-processing can be summarized as follows: I.2.3 Adjustments to the Derivation of the Optimal Prediction Model (MPM) List When constructing a list of MPMs for a given brightness CB, if the "left" brightness CB is predicted using intra-frame (NN-intra-frame) patterns from a neural network, then the underlying pattern index of the neural network can be obtained from the pattern returned when predicting the "left" brightness CB. Replace and become a candidate index that can be put into the MPM list. Similarly, if the "above" brightness CB is predicted via NN-intra-frame mode, then the mode index of the neural network can be obtained from the index returned when predicting the "above" brightness CB. Replace it and make it a candidate index for insertion into the MPM list.

[0017] I.3 Signaling based on neural network-based intra-frame prediction mode I.3.1 Intra-frame prediction mode signaling based on neural networks in lumen For the present Brightness CB, whose top-left pixel is located in the current brightness channel. Intra-predictive mode signaling in position and brightness is divided into two cases.

[0018] like If this occurs, then nnFlag will appear in the lumen intra-frame prediction mode signaling. This indicates that the NN-intraframe mode has been selected to predict the current luminance CB and the process has ended. nnFlag This indicates that the NN-intra-frame mode was not selected to predict the current luminance CB, and the normal intra-frame prediction mode signaling in the luminance... Applicable, see Figure 3 .

[0019] Otherwise, the regular intra-frame prediction mode signaling in the brightness... Applicable.

[0020] It should be noted that in " "In this case, if the context of the current luminance channel CB exceeds the boundary of the current luminance channel, i.e." Then the NN-intraframe mode is replaced by the planar mode.

[0021] .

[0022] I.3.2 Intra-frame Prediction Mode Signaling Based on Neural Networks in Chroma For the current pair Chroma CB, whose top-left pixel is located in the current pair of chroma channels. Intra-predictive mode signaling in position and chroma can be divided into two cases.

[0023] If the luminance CB corresponding to this pair of chrominance CBs is predicted by the NN-intra-frame mode: like Then DM (direct mode) becomes NN-intra-frame mode.

[0024] Otherwise, DM is set to planar mode.

[0025] otherwise: like If nnFlagChroma appears in the chroma intra-frame prediction mode signaling, then nnFlagChroma is placed before the DM flag in the chroma intra-frame prediction mode signaling decision tree. This indicates that the NN-intraframe mode is selected to predict the current pair of chroma Cs and then the process ends. nnFlagChroma If the NN-intra-frame mode is not selected to predict the current pair of chroma CBs, then the regular intra-frame prediction mode signaling in the chroma will resume from the DM flag.

[0026] Otherwise, regular intra-frame prediction mode signaling in chroma applies.

[0027] It should be noted that in " And DM becomes NN-intra-frame mode" and " In this case, if the context of the current chroma CB exceeds the boundary of the current chroma channel, i.e. Then the NN-intraframe mode is replaced by the planar mode.

[0028] I.4 Context and Neural Network Prediction Conversion For a given block, if This block may then have to be predicted by the NN-intra-frame mode, but the NN-intra-frame mode does not contain... At this point, the context of the current block can be accessed. Figure 2 Before the "preprocessing" step shown, vertically... Factor downsampling and / or level Factor downsampling and / or transposition. Then, the prediction for the current block can be... Figure 2 Following the "post-processing" step shown, transpose and / or vertically... Factor upsampling and / or level Factor upsampling. The current block context and the transpose of the prediction. and The choice of allows neural networks belonging to the NN-intra-frame mode to be used for prediction, as shown in Table 1.

[0029] Table 1: Current conditions to be predicted in order to determine transpose The context of the block and the prediction for that block. value The value, and each The NN-intra-frame mode neural network used.

[0030] I.5 belongs to the description of neural networks based on intra-frame prediction patterns. The NN-intra-frame mode neural network consists of 4 fully connected layers in concatenation if the block size is 16x16; other sizes consist of 3 fully connected layers in concatenation. The total memory consumption of the entire NN-intra-frame mode is approximately 4.9MB.

[0031] I.6 Combination of Neural Network Intra-Frame Prediction Mode and ISP I.6.1 Restrictive Combination In the proposed combination of NN-intra-frame mode and ISP (intra-frame sub-segmentation), ISP is only allowed for luminance and uses the same segmentation type as the original ISP, namely horizontal and vertical segmentation. However, for a given luminance CB predicted by NN-intra-frame mode, ISP must also comply with four additional constraints compared to the original ISP.

[0032] A luma coded block (luma CB) can only be divided into four equal-sized sub-partitions during prediction and {transform coding, entropy coding of quantized transform coefficients}. For example, an 8x8 luma coded block predicted via the neural network intra-prediction mode (NN-Intra mode) cannot be vertically divided into two 4x8 sub-partitions during prediction and into four 2x8 sub-partitions during {transform coding, entropy coding of quantized transform coefficients}.

[0033] No dimension of a luma coding block sub-partition can be less than 4. For example, a 4x16 luma coding block predicted by a neural network intra-prediction mode cannot be vertically divided into four 1x16 sub-partitions through internal sub-partitions (ISP).

[0034] At least one of the two dimensions of the luminance coding block must be equal to 4.

[0035] The luminance coding block must belong to a coding unit (CU) in an independent tree.

[0036] In summary, for a given luminance coded block predicted via the intra-frame prediction mode of a neural network, if If true, then the use of internal sub-partitions (ISPs) is allowed.

[0037] ; ; in The height of the luminance coding block. The width of the luminance coding block. This is the result of determining whether a luminance coding block belongs to a coding unit (CU) in an independent tree.

[0038] I.6.2 Additional Combination with Low-Frequency Non-Separated Transform (LFNST) For a given luma coded block predicted via a non-neural network intra-prediction mode, when both Intra-Segmentation Block (ISP) and Low-Frequency Non-Separated Transform (LFNST) are used simultaneously, the implicit signaling of LFNST is determined by the index of the intra-prediction mode, and all luma transform blocks (luma TBs) generated by ISP partitioning share the same implicit LFNST signaling. Conversely, for a given luma coded block predicted via a neural network intra-prediction mode, when both ISP and LFNST are used simultaneously, the neural network independently derives the implicit LFNST signaling for each luma transform block during prediction.

[0039] I.6.3 Encoding / Decoding Tools in VVC and ECM Descriptions 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) combining inter and intra prediction, and Spatial Geometric Partitioning Mode (SGPM), can be found in JVET-AJ2025 (algorithm description of Enhanced Compression Model 15) and JVET-AH2002 (algorithm description of Multifunctional Video Coding and Testing Model 22).

[0040] This invention discloses a method and apparatus for using neural network-based intra-frame prediction as intra-frame prediction candidates to derive the final fused intra-frame prediction samples, thereby improving encoding and decoding performance. Summary of the Invention

[0041] A method and apparatus for video encoding and decoding using an encoding / decoding tool including intra-frame prediction based on a neural network (NN) are disclosed. According to the method, input data related to the current block is received, wherein the input data includes pixel data for encoding the current block at the encoder end, or encoded data related to decoding the current block at the decoder end, and the current block is divided into multiple partitions. Intra-frame prediction samples are derived for the target region of the current block according to an intra-frame prediction mode, wherein the intra-frame prediction mode includes intra-frame prediction based on a neural network. Intra-frame prediction samples based on a non-neural network are derived for the target region of the current block. A final prediction sample is generated based on the non-neural network intra-frame prediction sample and inter-frame prediction samples. The current block is encoded or decoded using the final prediction sample.

[0042] In one embodiment, the current block is encoded and decoded using either a combined inter-frame and intra-frame prediction (CIIP) mode or a geometric segmentation mode (GPM).

[0043] In one embodiment, the intra-prediction sample is a first intra-prediction mode that uses a plane or DC mode and has the lowest absolute transform difference sum (SATD) cost in template-based intra-mode derivation (TIMD), or a first intra-prediction mode that has the highest gradient value in decoder-side intra-mode derivation (DIMD), or a first intra-prediction mode generated by the neural network-based intra-prediction.

[0044] In one embodiment, when the current block is encoded and decoded using CIIP and the neural network-based intra-prediction is used to generate the intra-prediction sample, the weighting factor combining the inter-prediction sample and the intra-prediction sample is constant at each position within the current block. In another embodiment, when the current block is encoded and decoded using CIIP and the neural network-based intra-prediction is used to generate the intra-prediction sample, the current block is horizontally or vertically segmented into multiple sub-blocks based on the pattern index (repIdx) output by the neural network. In yet another embodiment, when the current block is encoded and decoded using CIIP and the neural network-based intra-prediction is used to generate the intra-prediction sample, the current block is horizontally or vertically segmented into multiple sub-blocks based on the block shape of the current block. In yet another embodiment, when the current block is encoded and decoded using CIIP and one or more neighboring positions of the current block are encoded and decoded using the neural network-based intra-prediction, the neural network-based intra-prediction is used to generate the intra-prediction sample for the current block.

[0045] In one embodiment, when the current block is encoded and decoded using GPM, the intra-prediction sample is derived from an intra-prediction mode (IPM) candidate list, and the neural network-based intra-prediction is included in the IPM candidate list. In another embodiment, when the current block is encoded and decoded using GPM, the mode index (repIdx) output by the neural network is used to represent the intra-prediction mode index when the neural network-based intra-prediction is included in the IPM candidate list. In yet another embodiment, when the current block is encoded and decoded using GPM and the neural network-based intra-prediction is available for the current block, the neural network-based intra-prediction is inserted into the IPM candidate list as the first candidate.

[0046] In one embodiment, the neural network-based intra-frame prediction is used for the current block that uses GPM and combines intra-block copy (IBC) and intra-frame prediction encoding / decoding.

[0047] In one embodiment, if N neural network models are effective for the current block, x neural network models are selected from the N neural network models for further combination of predictions or fusion with non-neural network intra-frame predictions, where N and x are both positive numbers and N ≥ x. In one embodiment, the x neural network models are selected from the N neural network models based on block matching cost or template cost. In one embodiment, the template cost is measured by the difference between the reconstructed sample and the predicted sample derived using a specified prediction tool. In one embodiment, the template cost is measured by using one or more reduced template regions.

[0048] In one embodiment, a signaling or parsing switch flag is used to indicate whether neural network-based intra-prediction is to be used for the current block. In one embodiment, the switch flag is signaled or parsed at CU / CB, PU, ​​TU / TB, per color component, or chroma component. In another embodiment, a high-level syntax is signaled or parsed in the Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), or Segment Header (SH) to indicate whether neural network-based intra-prediction is permitted for the current sequence, picture, or segment.

[0049] Simple Explanation of the Diagram Figure 1A Describe an example of an adaptive inter-frame / intra-frame video encoding / decoding system that includes loop processing.

[0050] Figure 1B illustrate Figure 1A The corresponding decoder for the encoder.

[0051] Figure 2To illustrate an example, we can utilize the intra-frame (NN-intra-frame) mode of a neural network to understand the context of a reference sample. around For the current piece Make predictions and include and .

[0052] Figure 3 To illustrate an example, decompose the context X of the reference sample surrounding the current w×h block Y into usable reference samples. With unavailable reference samples , where w=8 and h=4.

[0053] Figure 4 To illustrate, here is an example for the current situation. The luminance CB is outlined with a long dashed line to indicate intra-frame prediction mode signaling, where the binary value of nnFlag is displayed in coarse gray and includes... , , and .

[0054] Figure 5 This example illustrates a neighbor template used to calculate block matching costs.

[0055] Figure 6A -C specifies the example template used to generate template cost, where Figure 6A The top and left templates used to calculate template costs are displayed (i.e., the “a” and “b” areas marked with slashes). Figure 6B The dotted "a1" and "b1" regions are used to generate the corresponding predictions for the template above; Figure 6C The dotted "a2" and "b2" regions are used to generate the corresponding predictions for the left template.

[0056] Figure 7 This section describes an example of a reduced template region used to calculate template costs.

[0057] Figure 8 A flowchart illustrating an exemplary video encoding / decoding system is provided. This system uses neural network-based intra-frame prediction as intra-frame prediction candidates and derives intra-frame prediction samples to generate the final fused prediction according to an embodiment of the invention.

[0058] Implementation It is readily understood that the components of the present invention, as generally described and illustrated in the figures, can be arranged and designed in a variety of different configurations. Therefore, the following more detailed description of specific embodiments of the system and method of the present invention (as shown in the figures) is not intended to limit the scope of the invention, but is merely representative of selected embodiments. References to "an embodiment," "a particular embodiment," or similar language in this specification indicate that a specific feature, structure, or characteristic described in relation to that embodiment may be included in at least one embodiment of the invention. Therefore, the appearance of phrases such as "in one embodiment" or "in a particular embodiment" throughout this specification does not necessarily refer to the same embodiment.

[0059] Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. However, those skilled in the art will recognize that the invention may be practiced without one or more specific details, or may employ other methods, components, etc. In other instances, well-known structures or operations have not been shown or described in detail to avoid obscuring certain aspects of the invention. Embodiments of the invention will be best understood by way of illustration, wherein the same components are designated with the same numbers throughout. The following description is provided by way of example only, illustrating only certain selected embodiments of apparatus and methods consistent with the claims of the invention.

[0060] II. Proposal Method The following methods aim to improve the accuracy of intra-frame prediction or encoding / decoding performance.

[0061] II.1 Intra-frame prediction fusion of neural networks The final prediction for the current block can be a combination of multiple predictions from different neural networks, or a fusion of predictions from the selected neural network intra-frame mode with non-neural network intra-frame predictions (such as intra-frame angle prediction mode, intra-frame plane / DC mode, combined inter-frame and intra-frame prediction (CIIP), spatial geometric segmentation mode (Spatial GPM), GPM-intra-frame, DIMD fusion, TIMD fusion, multiple reference lines (MRL), or inter-frame prediction tools).

[0062] In one embodiment, neural network intra-prediction may always be fused with general intra-prediction, or conditionally be fused with general intra-prediction.

[0063] In another embodiment, the neural network intra-frame prediction can always be fused with a general intra-frame prediction using different reference lines. For example, reference line N is used for the input of the neural network intra-frame, and reference line N+1 is used for another non-neural network intra-frame prediction, with the final prediction incorporating a fusion of these predictions.

[0064] II.1.1 Intra-neural prediction fusion in combined inter-frame and intra-frame prediction (CIIP) In CIIP, the final predicted sample is generated by weighting inter-frame predicted samples and intra-frame predicted samples. Inter-frame predicted samples are obtained from motion vectors or block vectors and can be further refined in terms of predicted position through template matching or bilateral matching. Intra-frame predicted samples can be planar / DC modes, the first intra-frame predicted mode with the lowest sum of absolute transform differences (SATD) cost in template-based intra-frame mode derivation (TIMD), the first intra-frame predicted mode with the highest gradient value in decoder-side intra-frame mode derivation (DIMD), or neural network intra-frame predictions. Intra-frame predicted samples can be combined with inter-frame predicted samples using the same weighting factor or an adaptive weighting factor, depending on the current intra-block sample position.

[0065] In one embodiment, if intra-frame prediction from the neural network is used to combine with inter-frame prediction samples, the weighting factors for the inter-frame and intra-frame predictions are constants at each position within the current block. The combination can be... If s is 2, It can be {3,1}, {1, 3}, or if s is 3, {6, 2}, {5, 3}, {3, 5}, {6, 2}.

[0066] In another embodiment, if the intra-frame prediction of the neural network is used to combine with inter-frame prediction samples, then the current block is based on... (i.e., as) Figure 2 (As defined) is divided into multiple sub-blocks horizontally or vertically. When When the current block is vertically divided into multiple sub-blocks, then the current block is not vertically divided into multiple sub-blocks. Otherwise (i.e.) The current block is horizontally divided into multiple sub-blocks. Furthermore, the width or height of a sub-block can be divided by 4.

[0067] In another embodiment, if the intra-frame prediction of the neural network is used to combine with inter-frame prediction samples, the current block is divided into multiple sub-blocks horizontally or vertically based on the block shape. For example, if the width of the current block is greater than or equal to the height of the current block, the current block is vertically divided into multiple sub-blocks. Otherwise (i.e., the width of the current block is less than the height of the current block), the current block is horizontally divided into multiple sub-blocks. Conversely, if the width of the current block is greater than or equal to the height of the current block, the current block is horizontally divided into multiple sub-blocks. Otherwise (i.e., the width of the current block is less than the height of the current block), the current block is vertically divided into multiple sub-blocks.

[0068] In another embodiment, if the neural network's intra-frame prediction is used to combine with inter-frame prediction samples, the current block is horizontally or vertically divided into multiple sub-blocks based on the nearest intra-frame pattern index. For example, the nearest intra-frame pattern index can be obtained first from the upper right position of the current block. If there is no intra-frame prediction information at the upper right position of the current block, the intra-frame pattern index at the lower left position of the current block is checked instead. If no intra-frame pattern index is found at any of the nearest candidate positions, the default intra-frame pattern index is used. When the current block is vertically divided into multiple sub-blocks, then the current block is not vertically divided into multiple sub-blocks. Otherwise (i.e.) The current block is horizontally divided into multiple sub-blocks.

[0069] In another embodiment, if neighboring locations are predicted using a neural network intra-frame prediction mode, the neural network intra-frame prediction is used to combine with inter-frame prediction samples. For example, neighboring locations are predetermined adjacent or non-adjacent locations of the current block.

[0070] In another embodiment, if the neural network intra-frame is one of the TIMD candidates and the CIIP intra-frame prediction mode is selected from the TIMD candidates, then to obtain the neural network intra-frame prediction of the neighboring template in the TIMD, the method in Section II.3.2 (i.e. the section entitled "Cost as Template Cost") is used to further calculate the SATD value of the neural network intra-frame prediction.

[0071] In another embodiment, if the current block is predicted using CIIP in conjunction with neural network intra-frame prediction, then PDPC is not applied to the neural network intra-frame prediction.

[0072] II.1.2 Neural Network Intra-Prediction Fusion in Geometric Segmentation Mode (GPM) Combining Inter-Frame and Intra-Frame Prediction In GPM that combines inter-frame and intra-frame predictions, the final prediction sample is generated by weighting the inter-frame prediction sample and the intra-frame prediction sample for each GPM segmentation region. The inter-frame prediction sample is derived from the inter-frame GPM, while the intra-frame prediction sample is derived from an intra-frame prediction mode (IPM) candidate list, indicating the candidate index. In one embodiment, the neural network intra-frame prediction is incorporated into the IPM list, and An intra-prediction mode index is used to represent intra-prediction by a neural network. In another embodiment, if intra-prediction by a neural network is available, it is included as a first candidate in the IPM list. In yet another embodiment, intra-prediction by a neural network can be used in conjunction with GPB (Gross Block Buffer) and intra-prediction.

[0073] II.2 Intra-frame prediction fusion of neural networks using various template patterns In one embodiment, two or more neural networks using different neighbor template patterns are combined to generate a final prediction. For example, a first prediction is generated by applying a given neural network to the upper neighbor reconstructed samples (i.e., the vertical position of the neighboring samples is greater than the top position of the current block), a second prediction is generated by applying a given neural network to the left neighbor reconstructed samples (i.e., the horizontal position of the neighboring samples is greater than the left position of the current block), and a third prediction is generated by applying a given neural network to both the upper and left neighbor reconstructed samples. The final prediction for the current block is then a weighted combination of any two of the three predictions, or a weighted combination of all three predictions.

[0074] In another embodiment, the final prediction may combine predictions based on neural network intra-frame (NN-intra) patterns or predictions based on non-neural network intra-frame prediction patterns. For example, the first prediction is generated using a neural network intra-frame pattern, the second prediction is generated by one of inter-frame or intra-frame prediction patterns, and the final prediction is a weighted combination of the first and second predictions. Furthermore, predictions based on neural network intra-frame patterns can be generated by using various neighbor template patterns (e.g., only top, only left, or left and top neighbor samples), or by transposing neighbor samples as input to the neural network. Neural network intra-frame patterns with specific patterns and the lowest template cost are selected for combination with non-neural network intra-frame prediction patterns.

[0075] II.3 Re-ranking or selecting candidate neural network models by cost If N neural network models are effective for the current block (N>1), then x models (x≥1) are selected from the N network models to further combine predictions or fuse them with non-neural network intra-frame predictions. This selection can be based on block matching cost or template cost.

[0076] II.3.1 Cost is measured in terms of block matching cost. In one embodiment, this selection may be based on the boundary matching cost predicted by the neural network model. For example, the prediction of the k-th neural network model at the current block position (i, j) is... The reconstructed sample corresponding to the current block position (i, j) above the m-th reference line is: The reconstructed sample corresponding to the left neighbor of the current block position (i, j) on the m-th reference line is: To calculate the block matching cost of the k-th neural network model, this cost can be calculated by comparing the reconstructed samples above the current neighboring samples with the samples above the current neighboring samples (denoted as ). The differences between the reconstructed samples on the left and the left samples within the current block (denoted as ) and the reconstructed samples on the left. The difference between them is determined by, and can be expressed as .

[0077] .

[0078] .

[0079] in and For the m-th reference line, a weighting factor is used based on the difference between vertical and horizontal positions. , .exist The value of j can be further restricted; for example, j can be 0 or 1. Similarly, in The value of i can be further restricted; for example, i can be 0 or 1. In one embodiment, ,or .

[0080] After calculating the block matching cost for each network model, a list of block matching costs will be created. The cost list is then sorted in non-decreasing order, and the top x models are selected. In another embodiment, the x models can be explicitly selected. For example, the index of the selected candidate network models after sorting is signaled.

[0081] In another embodiment, if the adjacent reconstructed sample above is unavailable, Similarly, if the reconstructed sample to the left is unavailable, If the reconstructed samples above and to the left are unavailable, the final prediction of the current block cannot be combined with the prediction of the neural network model, or a default neural network model will be implicitly selected.

[0082] II.3.2 Costs are measured using template costs. In another embodiment, this selection can be based on template cost. For example, such as Figure 6A As shown, the top template (area "a" marked with a slash) or the left template (area "b" marked with a slash) is used to calculate the template cost. The template cost is measured by the difference between the reconstructed sample and the prediction made using the specified prediction tool.

[0083] To obtain the network model prediction corresponding to the template above (or region "a"), the area within region "a1" with a size of [missing information] will be [missing information]. The reconstructed sample, and the area "b1" on the left with a size of The reconstructed samples are used as input to the neural network (i.e., ), where both region "a1" and region "b1" are adjacent to the template above (or region "a"), such as Figure 6B As shown. The cost of the template above the k-th neural network model can be expressed as: .

[0084] in For the neural network's prediction samples, This is the reconstructed sample at position (i, j) within the template above. The weighting factor for the difference between positions (i, j) within the template above. , ,as well as .

[0085] Similarly, to obtain the network model prediction corresponding to the left template (or region "b"), the area with size "a2" above will be... The reconstructed sample, and the area "b2" on the left with a size of The reconstructed samples are used as input to the neural network (i.e., ), where both region "a2" and region "b2" are adjacent to the left template (or region "b"), such as Figure 6C As shown. The left template cost of the k-th neural network model can be expressed as: , in For the neural network's prediction samples, The reconstructed sample is located at position (m, n) within the template mentioned above. For the positions (m, n) within the template above, combine the weights of the differences. , and .

[0086] Finally, the template cost of the k-th neural network model can be expressed as: .

[0087] After calculating the block matching cost for each network model, a template cost list is created. The cost list is then sorted in non-decreasing order, and the top x models are selected. In another embodiment, the x models can be explicitly selected. For example, the index of the selected candidate network models after sorting is used for signaling.

[0088] In another embodiment, the template cost can be selected based on the use of a reduced template area. For example, such as... Figure 7 As shown, when calculating the template cost within an NN-frame, either a reduced upper template (region a' marked with a slash) or a reduced left template (region b' marked with a slash) is used to calculate the template cost. The template cost is measured by the difference between the reconstructed sample and the predicted sample derived using a specified prediction tool, as described in this section (i.e., "Measure Cost by Template Cost"). In another embodiment, after calculating the template cost using the reduced template region, the template cost of the NN-frame mode can be normalized by multiplying it by a factor (e.g., a score greater than 1.0) when the template regions used for other predictions are inconsistent with those used for the NN-frame prediction.

[0089] II.3.3 Calculate costs using selected neighboring locations In another embodiment, the cost is not calculated using all locations of the upper and left adjacent reconstructed samples. For example, a first starting position and a first sub-sampling interval can be defined based on the width of the current block to partially select locations within the upper adjacent reconstructed samples. Similarly, a second starting position and a second sub-sampling interval can be defined based on the height of the current block to partially select locations within the left adjacent reconstructed samples.

[0090] To give another example, the number of reference lines used to calculate the cost can be a constant or determined based on the block size (for example, if the current block size is greater than or equal to a threshold, the number of reference lines equals the first value; otherwise, the number of reference lines equals the second value). For example, n in the above diagram... a or n l It can be 1, 2, 3, 4, 5 or 6.

[0091] II.4 Pre-refinement of template regions within NN frames In one embodiment, filters such as smoothing, high-pass, and low-pass filters can be applied to the template region. The filtered template region is then used as input for NN-intra-frame prediction. For example, a [1 21]>>2 filter is applied to the template region before NN-intra-frame preprocessing. In one embodiment, a specific filter is always applied to the template region. In another embodiment, if multiple candidate filters can be applied, the filter can be selected based on the lowest template cost. In another embodiment, the filter can be explicitly selected by indexing the required filter in PU, CU, CTU, segment, image, or sequence-level signaling. In another embodiment, the proposed template region filtering can be combined with embodiments of different neighbor sample patterns. Specifically, any filter can be applied to various neighbor template patterns (e.g., only above, only left, or left and above neighbor samples), or neighbor samples can be transposed as input to the neural network.

[0092] II.5 Post-refinement of NN-intra-frame prediction In one embodiment, the output of the NN-intra-prediction can be further refined. The reconstruction of the template region and the current prediction output can serve as sources of information for this refinement. For example, the PDPC method can be applied to the NN-intra-prediction output. As another example, a 3x3 convolution kernel can be applied to the first upper line and / or the first left line to reduce block distortion. In one embodiment, refinement is always applied to the NN-intra-output, while in another embodiment, refinement is applied according to implicit rules. For example, refinement is performed when an upsampling operation is applied to the NN-intra-block during the generation of the NN-intra-prediction. In another embodiment, refinement can be explicitly applied at the PU, CU, CTU, segment, image, or sequence level via signaling flags.

[0093] II.6 Signaling inheritance candidate indices are listed in the list In one embodiment, a signaling switch flag is used to indicate whether an NN-intra-predictor is used in the current prediction mode. This flag can be signaled by CU / CB, PU, ​​TU / TB, color component, or chroma component. The signaling high-level syntax can be used in the Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), or Segment Header (SH) to indicate whether the use of an NN-intra-predictor in the current sequence, picture, or segment is permitted. If an NN-intra-predictor is used in the current prediction mode, the template mode used can be signaled via truncated unary codes, Exp-Golomb codes, or fixed-length codes.

[0094] Any of the methods described above can be implemented in the encoder and / or decoder. For example, any of the proposed neural network-based intra-frame prediction methods can be implemented in the inter-frame / intra-frame prediction module of the encoder and / or the inter-frame / intra-frame prediction module of the decoder. Alternatively, any of the proposed methods can be coupled as a circuit to the inter-frame / intra-frame prediction module of the encoder and / or the inter-frame / intra-frame prediction module of the decoder to provide the information required by the inter-frame / intra-frame prediction module.

[0095] refer to Figure 1A Example encoders and Figure 1B The example decoder allows any proposed neural network-based intra-frame prediction method to be applied to the decoder's intra / inter-frame coding module (e.g., Figure 1B Intra-prediction 150 / MC 152 in the encoder or the intra / inter-coding module of the encoder (e.g. Figure 1A The proposed method is implemented in the intra-frame prediction 110 / inter-frame prediction 112. Any of the proposed methods can also be coupled as circuitry to the intra-frame / inter-frame coding modules of the decoder or encoder. However, the decoder or encoder can also use additional processing units to implement the processing required by the proposed method. Although the intra-frame / inter-frame prediction unit (e.g., Figure 1A Units 110 / 112 and Figure 1B Units 150 / 152 are shown as independent processing units, but they may correspond to executable software or firmware code stored on media (such as hard disks or flash memory) for use by a central processing unit (CPU) or a programmable device (such as a digital signal processor (DSP) or a field programmable gate array (FPGA)).

[0096] Figure 8A flowchart illustrating an exemplary video encoding / decoding system is provided. This system uses neural network (NN)-based intra-prediction as intra-prediction candidates to derive intra-prediction samples, thereby generating a final fused prediction, according to an embodiment of the invention. The steps shown in the flowchart can be executed as program code at the encoder on one or more processors (e.g., one or more central processing units (CPUs)). The steps shown in the flowchart can also be implemented in hardware, such as one or more electronic devices or processors configured to execute the steps in the flowchart. According to the method, in step 810, input data associated with the current block is received, wherein the input data includes pixel data for encoding the current block at the encoder, or encoded data associated with decoding the current block at the decoder, and the current block is divided into multiple partitions. In step 820, intra-prediction samples are derived for a target region of the current block according to an intra-prediction mode, wherein the intra-prediction mode includes neural network (NN)-based intra-prediction. In step 830, non-neural network-based intra-prediction samples are derived for the current block of the target region. In step 840, a final prediction sample is generated based on the intra-prediction sample and the non-neural network-based intra-prediction sample. In step 850, the current block is encoded or decoded using the final prediction sample.

[0097] The flowchart shown is intended to illustrate a video encoding / decoding paradigm according to the present invention. Those skilled in the art can modify each step, rearrange the steps, split the steps, or combine the steps to implement the invention without departing from its spirit. Specific syntax and semantics are used in this description to illustrate examples of implementing the invention. Those skilled in the art can use equivalent syntax and semantics to replace the original syntax and semantics to implement the invention without departing from its spirit.

[0098] The foregoing description is intended to enable those skilled in the art to implement the invention according to specific applications and needs. Various modifications can be made to the described embodiments by those skilled in the art, and the general principles defined herein can be applied to other embodiments. Therefore, the invention is not intended to be limited to the specific embodiments shown and described, but should be given the broadest scope consistent with the principles and novel features disclosed herein. In the foregoing detailed description, various specific details have been set forth in order to provide a thorough understanding of the invention. However, those skilled in the art will understand that the invention can be practiced.

[0099] The embodiments of the present invention described above can be implemented in various hardware, software program code, or a combination of both. For example, one embodiment of the invention may be one or more circuits integrated into a video compression chip, or program code integrated into video compression software to perform the processing described herein. Another embodiment of the invention may be program code executed on a digital signal processor (DSP) to perform the processing described herein. The invention may also relate to multiple functions executed by a computer processor, digital signal processor, microprocessor, or field-programmable gate array (FPGA). These processors can be configured to perform the specific methods embodied in the invention by executing machine-readable software program code or firmware program code. The software program code or firmware program code can be developed in different programming languages ​​and in different formats or styles. The software program code can also be compiled for different target platforms. However, different program code formats, styles, and languages, as well as other ways of configuring program code to perform the tasks related to the invention, do not depart from the spirit and scope of the invention.

Claims

1. A video encoding / decoding method, the method comprising: Receive input data related to the current block, wherein the input data includes pixel data for encoding the current block at the encoder end, or encoded data related to decoding the current block at the decoder end, and the current block is divided into multiple partitions; Based on an intra-prediction mode, intra-prediction samples are derived for the target region of the current block, wherein the intra-prediction mode includes intra-prediction based on a neural network (NN). Intra-frame prediction samples based on non-neural networks are derived for the current block of the target region; The final prediction sample is generated based on the intra-frame prediction sample and the non-neural network-based intra-frame prediction sample. The final predicted sample is then used to encode or decode the current block.

2. The method according to claim 1, characterized in that, The current block is encoded and decoded using either CIIP (Combined Inter-Frame and Intra-Frame Prediction) mode or GPM (Geometric Partitioning Mode).

3. The method according to claim 1, characterized in that, The intra-prediction sample is the first intra-prediction mode that uses a plane or DC mode and has the lowest absolute transform difference sum (SATD) cost in template-based intra-mode derivation (TIMD), or the first intra-prediction mode that has the highest gradient value in decoder-side intra-mode derivation (DIMD), or the first intra-prediction mode generated by the neural network-based intra-prediction.

4. The method according to claim 1, characterized in that, When the current block is encoded and decoded using CIIP and the neural network-based intra-prediction is used to generate the intra-prediction sample, the weighting factor combining the inter-prediction sample and the intra-prediction sample is constant at each position within the current block.

5. The method according to claim 1, characterized in that, When the current block is encoded and decoded using CIIP and the neural network-based intra-frame prediction is used to generate the intra-frame prediction sample, the current block is horizontally or vertically divided into multiple sub-blocks according to the pattern index (repIdx) output by the neural network.

6. The method according to claim 1, characterized in that, When the current block is encoded and decoded using CIIP and the neural network-based intra-frame prediction is used to generate the intra-frame prediction sample, the current block is horizontally or vertically divided into multiple sub-blocks according to the block shape of the current block.

7. The method according to claim 1, characterized in that, When the current block is encoded and decoded using CIIP and one or more neighboring locations of the current block are encoded and decoded using neural network-based intra-prediction, the neural network-based intra-prediction is used to generate the intra-prediction sample for the current block.

8. The method according to claim 1, characterized in that, When the current block is encoded using GPM, the intra-prediction sample is derived from the intra-prediction mode (IPM) candidate list, and the neural network-based intra-prediction is included in the IPM candidate list.

9. The method according to claim 8, characterized in that, When the current block is encoded using GPM, the mode index (repIdx) output by the neural network is used to represent the intra-prediction mode index when the neural network-based intra-prediction is included in the IPM candidate list.

10. The method according to claim 8, characterized in that, When the current block is encoded and decoded using GPM and the neural network-based intra-prediction is available for the current block, the neural network-based intra-prediction is inserted into the IPM candidate list as the first candidate in the IPM candidate list.

11. The method according to claim 1, characterized in that, The neural network-based intra-frame prediction is used for the current block that uses GPM and combines intra-block copy (IBC) with intra-frame prediction encoding and decoding.

12. The method according to claim 1, characterized in that, If N neural network models are effective for the current block, then select x models from the N neural network models to further combine the predictions or fuse them with non-neural network intra-frame predictions, where N and x are both positive numbers and N ≥ x.

13. The method according to claim 12, characterized in that, The x neural network models are selected from the N neural network models based on block matching cost or template cost.

14. The method according to claim 13, characterized in that, The template cost is measured by the difference between the reconstructed sample and the predicted sample derived using the specified prediction tool.

15. The method according to claim 13, characterized in that, The cost of the template is measured using one or more reduced template regions.

16. The method according to claim 1, characterized in that, Signaling or parsing switch flags can be used to indicate whether neural network-based intra-frame prediction is used for the current block.

17. The method according to claim 16, characterized in that, The switch flag is signaled or resolved according to CU / CB, PU, ​​TU / TB, each color component or chromaticity component.

18. The method according to claim 1, characterized in that, Signal or parse high-level syntax in the Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), or Segment Header (SH) to indicate whether the neural network-based intra-frame prediction is allowed for the current sequence, picture, or segment.

19. A video encoding / decoding apparatus, the apparatus comprising one or more electronic components or a processor configured to: Receive input data related to the current block, wherein the input data includes pixel data for encoding the current block at the encoder end, or encoded data related to decoding the current block at the decoder end, and the current block is divided into multiple partitions; Based on an intra-prediction mode, intra-prediction samples are derived for the target region of the current block, wherein the intra-prediction mode includes intra-prediction based on a neural network (NN). Intra-frame prediction samples based on non-neural networks are derived for the current block of the target region; The final prediction sample is generated based on the intra-frame prediction sample and the intra-frame prediction sample based on the non-neural network. The final predicted sample is then used to encode or decode the current block.