Methods and apparatus of matrix weighted intra prediction for chroma component in video coding
By employing training processes and format-specific down-sampling/up-sampling techniques, the storage requirements for matrix weights in video coding systems are reduced, optimizing resource usage and enhancing efficiency in chroma component prediction.
Patent Information
- Application Number
- PCT/CN2025/101182
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-10
- Filing Date
- 2025-06-16
- Publication Date
- 2026-01-15
AI Technical Summary
The storage requirements for matrix weights in video coding systems, particularly for chroma components using Matrix-based Intra Prediction (MIP), are substantial and inefficiently managed, leading to unnecessary resource utilization.
The proposed methods involve generating and reusing matrix weights for different chroma sub-sampling formats by training processes, applying down-sampling and up-sampling techniques, and utilizing luma matrix weights for chroma components to reduce storage needs.
These methods effectively reduce the storage requirements for matrix weights, optimizing resource usage and enhancing the efficiency of video coding systems by minimizing the size of stored data without compromising prediction accuracy.
Smart Images

Figure CN2025101182_15012026_PF_FP_ABST
Abstract
Description
METHODS AND APPARATUS OF MATRIX WEIGHTED INTRA PREDICTION FOR CHROMA COMPONENT IN VIDEO CODINGCROSS 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 / 669,319, filed on July 10, 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 techniques to reduce storage requirements associated with matrix weights for coding chroma components using Matrix-based Intra Prediction (MIP) 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] Matrix weighted Intra Prediction (MIP)
[0010] Matrix weighted intra prediction (MIP) method is a newly added intra prediction technique into VVC. For predicting the samples of a rectangular block of width W and height H, matrix weighted intra prediction (MIP) takes one line of H reconstructed neighbouring boundary samples left of the block and one line of W reconstructed neighbouring boundary samples above the block as input. If the reconstructed samples are unavailable, they are generated as it is done in the conventional intra prediction. The generation of the prediction signal is based on the following three steps, which are averaging, matrix vector multiplication and linear interpolation as shown in Fig. 2. One line of H reconstructed neighbouring boundary samples 212 left of the block and one line of W reconstructed neighbouring boundary samples 210 above the block are shown as dot-filled small squares. After the averaging process, the boundary samples are down-sampled to top boundary line 214 and left boundary line 224. The down-sampled samples are provided to the matric-vector multiplication unit 220 to generate the down-sampled prediction block 230. An interpolation process is then applied to generate the prediction block 240.
[0011] Position Dependent Matrix-based Intra Prediction Replacing Existing Conventional Intra Modes
[0012] In JVET-AG0197 (Bappaditya Ray, et al., “Non-EE2: Matrix based intra prediction replacing conventional intra modes” , Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, 33rd Meeting, by teleconference, 17–26 January 2024, Document: JVET-AG0197) , a matrix of weights, which are defined for a block shape and intra mode, is introduced. Those weights are multiplied by the neighbour reference template to derive the prediction samples replacing conventional intra prediction. The weights are applied to the reference samples of the L-shaped causal neighbourhood template as shown in the Fig. 3. In Fig. 3, the L-shaped causal neighbourhood template for a W x H prediction block 310 is shown, where the size of the top template 320 is 2W x T1 and the size for the left template 330 is T2 x 2H.
[0013] The reference samples in the adjacent neighbourhood are denoted as r, and F (x, y) is the matrix of weights. Then, the prediction P (x, y) can be derived as: P (x, y) = ∑n F (x, y, n) *r (n) , (1) where n denotes the index of the reference sample in the template. In the above equation, for a given reference sample r, the prediction P (x, y) corresponds to F (x, y) *r, where F (x, y) is the matrix of weights associated with the given reference sample r.
[0014] In the coding process, this prediction is used for block size with both width and height up to 32. The template size is 2 for blocks with both width and height up to 16 and P (x, y) from above formula is used for intra mode 0, 1, and (2+2*k) where k is an integer and its value is in range from 0 to 32. For other blocks larger than 16x16, template size is set to 1 and P (x, y) from above formula is used for mode 0, 1, and (2+4*k) where k is an integer and its value is in range from 0 to 16. Prediction is only performed for 16x16 positions, and the rest of the samples are generated by bilinear interpolation. For all block sizes, block shape and mode-based symmetry is used. Reference length is set to W and H for modes greater than 18 and less than 50 and set to 2W and 2H otherwise.
[0015] In this invention, methods and apparatus to reduce storage requirements associated with matrix weights for coding chroma components using Matrix-based Intra Prediction (MIP) in a video coding system are disclosed. BRIEF SUMMARY OF THE INVENTION
[0016] Methods and apparatus for video coding using matrix-based intra prediction are disclosed. According to this method, input data associated with a current block is received, wherein the input data comprise pixel data to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side, wherein the current block corresponds to a chroma component of input pictures, and at least two chroma sub-sampling formats are used for the chroma component. A template area for the current block is determined. A base matrix of weights for position-dependent matrix-based intra prediction is determined, wherein the base matrix of weights is used for the current block in any of said at least two chroma sub-sampling formats. The position-dependent matrix-based intra prediction for the current block in any of said at least two chroma sub-sampling formats is generated based on the base matrix of weights and reference samples in the template area. The current block is encoded or decoded using the position-dependent matrix-based intra prediction.
[0017] In one embodiment, said at least two chroma sub-sampling formats comprise any combination of 4: 4: 4 format, 4: 2: 2 format, and 4: 2: 0 format.
[0018] In one embodiment, the base matrix of weights corresponds to chroma 4: 4: 4 matrix weights and current chroma format for the current block is in the 4: 2: 2 format or the 4: 2: 0 format, a target matrix of weights for the current block is generated by down-sampling the chroma 4: 4: 4 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights. In one embodiment, target sample positions of prediction for the current block are down-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format. In one embodiment, the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights. In one embodiment, even column and / or row positions, or odd column and / or row positions of the base matrix of weights corresponding to the reference samples in an above and / or left region of the template area are used to generate the target matrix of weights. In one embodiment, a flag in SPS (Sequence Parameter Set) , slice header, PPS (Picture Parameter Set) , picture header, CTU (Coding Tree Unit) -level syntax element, or CU (Coding Unit) -level syntax element is signalled or parsed to determine whether even column positions or odd column positions of the base matrix of weights are used to generate the target matrix of weights.
[0019] In one embodiment, the base matrix of weights corresponds to chroma 4: 2: 2 matrix weights and current chroma format for the current block is in the 4: 4: 4 format, a target matrix of weights for the current block is generated by up-sampling the chroma 4: 2: 2 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights. In one embodiment, target sample positions of prediction for the current block are up-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format. In one embodiment, the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights.
[0020] In one embodiment, the base matrix of weights corresponds to chroma 4: 2: 2 matrix weights and current chroma format for the current block is in the 4: 2: 0 format, a target matrix of weights for the current block is generated by down-sampling the chroma 4: 2: 2 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights. In one embodiment, target sample positions of prediction for the current block are down-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format. In one embodiment, the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights.
[0021] In one embodiment, the base matrix of weights corresponds to chroma 4: 2: 0 matrix weights and current chroma format for the current block is in the 4: 2: 2 format or the 4: 4: 4 format, a target matrix of weights for the current block is generated by up-sampling the chroma 4: 2: 0 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights. In one embodiment, target sample positions of prediction for the current block are up-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format. In one embodiment, the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights.BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Fig. 1A illustrates an exemplary adaptive Inter / Intra video coding system incorporating loop processing.
[0023] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.
[0024] Fig. 2 illustrates an example of matrix weighted intra prediction process.
[0025] Fig. 3 illustrates an example of the L shaped causal neighbourhood template used to derive the prediction.
[0026] Fig. 4 illustrates an example of using chroma 4: 4: 4 matrix weights for chroma blocks in the 4: 2: 2 and 4: 2: 0 formats according to one embodiment of the present invention.
[0027] Fig. 5A illustrates an example of L-shape area of reconstruction samples up-scaled from samples in the 4: 2: 2 format to the 4: 4: 4 format.
[0028] Fig. 5B illustrates an example of L-shape area of reconstruction samples up-scaled from samples in the 4: 2: 0 format to the 4: 4: 4 format.
[0029] Fig. 6 illustrates an example of converting the matrix of weights for the 4: 2: 2 format to the matrix of weights for 4: 4: 4 format according to an embodiment of the present invention.
[0030] Fig. 7 illustrates an example of converting the matrix of weights for the 4: 4: 4 format to the matrix of weights for 4: 2: 2 format according to an embodiment of the present invention.
[0031] Fig. 8 illustrates a flowchart of an exemplary video coding system that uses a based matrix of weights for matrix-based intra prediction of chroma component in multiple chroma sub-sampling formats according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION
[0032] 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.
[0033] 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.
[0034] In this disclosed, methods to use position dependent matrix based intra prediction on chroma components are proposed. The matrix weights are generated by a training process with inputted collected data for training. For example, the collected data can be the neighbouring samples of the CU (coding unit) , the target coding mode, and the original samples or reconstructed samples of the CU. The training process generates the matrix of weights for each position of the sample location of the CU. These matrixes are multiplied by the samples of the neighbouring available samples outside current CU to get the predicted sample of each position. The goal is to minimize the difference between the predicted samples and original samples (or reconstructed samples) . The predicted samples are used to generate the residue of the CU for transform coding. The process can be applied to both luma and chroma components.
[0035] The storage for the matrix of weights can be several megabytes in size. For example, with reference to Fig. 3, if W and H are equal to 8 and T1 and T2 are equal to 2, there will be 64 samples in the current block and 68 samples in the L-shaped template. The size of the matrix of weights will be 64x68. However, the size will grow rapidly when the block size increases. Therefore, various methods are proposed to relieve the amount of storage requirement for storing the matrix of weights.
[0036] According to eqn. (1) , the prediction P (x, y) can be calculated according to P (x, y) = ∑n F (x, y, n) *r (n) . Mathematically, each prediction sample P (x, y) at (x, y) can be viewed as a row vector F’x, y (n) multiplied by a column vector r (n) corresponding to the reference samples in the L-shaped region, where F’ x, y (n) = F (x, y, n) . Therefore, F (x, y, n) can also be viewed as an array of weights for a given position prediction (x, y) . If the total number of reference samples used for generating the prediction is N, there will be N weights associated with the N reference samples. In other words, the N weights for each prediction can be viewed as L-shaped weights in the above region, left region and upper-left region of the L-shaped template. Furthermore, while the prediction P (x, y) is a 2-D array, it may also be viewed as a 1-D vector P (m) through row-by-row or column-by-column scan. For example, if 0 ≤ x ≤ 3 and 0 ≤ y ≤ 3, the index m for the 1-D vector P (m) will be 0 ≤ m ≤ M and M = 15.
[0037] Method 1: Separate Matrix of weights for Chroma 4: 4: 4 / 4: 2: 2 / 4: 2: 0
[0038] The format of chroma components can be chroma 4: 4: 4, chroma 4: 2: 2, or chroma 4: 2: 0. These chroma formats are also referred as chroma sub-sampling formats. For the luma component, the same set of matrix of weights can be used for generating the prediction for luma among those formats because the luma component is always full resolution without any down-sampling. However, different chroma formats lead to different resolution and characteristics of the chroma component. Therefore, in one embodiment, a group of matrix weight sets is trained for each chroma sub-sampling format for matrix weight intra prediction. For example, if there are three chroma formats (4: 4: 4 / 4: 2: 2 / 4: 2: 0) , three matrix weight sets are trained to predict the chroma samples for coding.
[0039] Method 2: Chroma 4: 4: 4 Matrix of weights Down-Sampled for Chroma 4: 2: 2 / 4: 2: 0
[0040] To train a set for each chroma format requires more storage to store the matrix of weights. To alleviate the storage requirement, we propose to reuse one set of the matrix of weights from one chroma format and use it as the basis to generate the matrix of weights for other chroma formats. For example, data are collected from a coding flow where 4: 4: 4 YUV sequences are coded. The data collection can be done at the encoder or decoder. For collecting data at the decoder, only the best coding results are collected for training. For collecting data at the encoder, several best coding modes are collected for training to get the matrix of weights, though some of the best modes may not be the final coding mode. Then, the matrix of weights for chroma 4: 4: 4 is used as the basis for generating the matrix of weights for chroma 4: 2: 2 or chroma 4: 2: 0.
[0041] In one embodiment, two stages of down-sampling process are performed for using matrix of weights of chroma 4: 4: 4 for chroma 4: 2: 2. The first stage (as the template in Fig. 4) is down-sampling of matrix of weights. The matrix of weights is decimated according to the chroma sub-sampling format. For weights of chroma 4: 4: 4 to be used for chroma 4: 2: 2, 2: 1 decimation of the weights in the horizontal direction is performed. Only one column of the weights out of two columns of the weights are kept after this down-sampling process. Before down-sampling, a low-pass filter may be optionally applied to the matrix of weights. The second stage (as the sample positions in Fig. 4) of down-sampling is the down-sampling of the position for prediction. For chroma 4: 4: 4, every position in full resolution of chroma is predicted and each position has its position specific matrix of weights. For reusing chroma 4: 4: 4 weights for chroma 4: 2: 2, only valid positions for chroma samples under that specific position should be predicted. In one embodiment, to predict 4: 2: 2 chroma with 4: 4: 4 matrix of weights, only the matrixes for even column positions are utilized (therefore, only 1 / 2 of the matrixes of 4: 4: 4 are used) . In another embodiment, to predict chroma CU in 4: 2: 2 format with chroma 4: 4: 4 matrix of weights, only the matrixes for odd column positions are utilized. For another embodiment, a flag in SPS, slice header, PPS, picture header, CTU-level syntax element, or CU-level syntax element is signalled to determine whether the matrixes from even column position or from odd column position are utilized for prediction generation. Matrix of weights used to predict 2WxH chroma CU in 4: 4: 4 format are utilized to predict WxH chroma CU in 4: 2: 2 format.
[0042] For one embodiment, there are two stages of down-sampling process for using matrix of weights of chroma 4: 4: 4 for chroma 4: 2: 0. The first stage is down-sampling of matrix of weights. The matrix of weights is decimated according to the chroma format. For example, for matrix of weights for chroma 4: 4: 4 to be used in chroma 4: 2: 0, decimating the weights for every other row and every other column of the weights should be performed. Only one row / column of the weights out of two rows / columns of the weights is kept after this down-sampling process. Before down-sampling, a low-pass filter can be optionally applied to the matrix of weights. The second stage of down-sampling is the down-sampling of the positions (actually only partial sets from the matrix of weights sets of chroma 4: 4: 4 are reused for chroma 4: 2: 0) for prediction. For chroma CU in 4: 4: 4 format, every position in the full resolution of chroma is predicted and each position has its position specific matrix of weights. For reusing chroma 4: 4: 4 weights in chroma 4: 2: 0, only valid positions for chroma samples under that specific position should be predicted. For one embodiment, to predict 4: 2: 0 chroma with 4: 4: 4 matrix of weights, only the matrixes for even horizontal and even vertical positions are utilized and therefore, only 1 / 4 of the matrixes of 4: 4: 4 are used. For another embodiment, to predict 4: 2: 0 chroma with 4: 4: 4 matrix of weights, only the matrixes for odd horizontal and odd vertical positions are utilized. For another embodiment, a flag in SPS, slice header, PPS, picture header, CTU-level syntax element, or CU-level syntax element is signalled to determine whether the matrixes from even horizontal / vertical position or from odd horizontal / vertical position is utilized for prediction generation. Matrix of weights.
[0043] As shown above, matrix of weights used to predict 2Wx2H chroma CU in 4: 4: 4 format is utilized to predict WxH chroma CU in 4: 2: 0 format and to predict Wx2H chroma CU in 4: 2: 2 format.
[0044] In another embodiment, CU size-matched matrix of weights for chroma 4: 4: 4 are directly used in generating the prediction for chroma CU in 4: 2: 2 or 4: 2: 0 format. Specifically, matrix of weights for WxH chroma CU in 4: 4: 4 format or are directly used in generating the prediction for WxH chroma CU in 4: 2: 2 format or WxH chroma CU in 4: 2: 0 format. Though the weights are not trained for chroma 4: 2: 2 or 4: 2: 0, the prediction generation can also be done and competing with other predictions from other coding modes through the rate-distortion optimization (RDO) process.
[0045] In another embodiment, L-shape areas with reconstruction samples from chroma CU in 4: 2: 2 or 4: 2: 0 format are scaled to the L-shape size as in chroma CU in 4: 4: 4 format (assuming luma is of the same size among different chroma formats) . Position-decimated weights from chroma in 4: 4: 4 format are used to generate the predicted samples. For L-shape scaled from chroma in 4: 2: 0 format, decimation of the positions by two (actually one forth sets of the matrix of weights sets from chroma CU in 4: 4: 4 format are used) is applied both horizontally and vertically. For L-shape scaled from chroma in 4: 2: 2 format, decimation of the positions by two (meaning that half sets of the matrix of weights sets from chroma CU in 4: 4: 4 format are used) is applied horizontally. The concept of this embodiment is depicted in Fig. 5A and Fig. 5B.
[0046] Method 3.1: 4: 2: 2 matrix of weights up-sampled for chroma 4: 4: 4
[0047] The same concept in method 2 can be applied to reuse matrix of weights from chroma CU in 4: 2: 2 format for other chroma format. For matrix of weights of chroma 4: 2: 2 to be used in chroma 4: 4: 4, there are two stages of processing. There are two options (Options 3.1-3.2) in first stage. Assuming the chroma CU size is 2WxH in 4: 4: 4 format and the number of the to-be-reused matrix weight (from weights of WxH chroma CU in 4: 2: 2 format) sets is WxH, the first stage process is described as follows.
[0048] Option 3.1: Matrix of weights for one position (one set) are up-sampled from shape as in chroma 4: 2: 2 to shape as in chroma 4: 4: 4.
[0049] Specifically, for angular prediction modes greater than 18 and less than 50 (template sides 2W and H as CU sides 2W and H) , reference length of template is up-sampled from 2W and H to 4W and H respectively. For angular prediction modes less than or equal to 18, or greater than or equal to 50 (template sides 4W and 2H as two times of CU sides 2W and H) , reference length of template is up-sampled from 4W and 2H to 8W and 2H respectively. Only coefficients for above side are up-sampled.
[0050] Option 3.2: Neighbouring reconstruction samples of the L-shape in chroma 4: 4: 4 format are down-sampled to a corresponding shape in chroma 4: 2: 2 format. Matrix of weights of WxH chroma CU in 4: 2: 2 format are used in prediction generation.
[0051] Specifically, the above side of the L-shape neighboring area of reconstruction samples of the chroma CU in 4: 4: 4 format is down-sampled to half width.
[0052] The second stage deals with position related manipulation. There are two options (Options 3.3-3.4) for the second stage. Assuming the size of current chroma CU is 2WxH in 4: 4: 4 format and a set of matrix of weights is used to generate one predicted sample of one position inside the current block, the second stage is described as follows.
[0053] Option 3.3: generate the prediction from WxH sets of matrix of weights from WxH chroma CU in 4: 2: 2 format. 3.3 (a) With option 3.1, L-shape of matrix of weights as the shape in chroma 4: 4: 4 is used to generate prediction samples. WxH samples of prediction are generated. Because the sample positions are equal to the amount of matrix weight sets in 4: 2: 2, only WxH prediction samples are generated. 3.3(b) With option 3.2, down-sampled L-shape as the L-shape in chroma 4: 2: 2 format is used to generate prediction samples. WxH samples of prediction are generated. Because the sample positions are equal to the amount of matrix weight sets in 4: 2: 2, only WxH prediction sample are generated. With 3.3 (a) or 3.3 (b) , up-sample the prediction from WxH to 2WxH to be used to predict 2WxH chroma CU in 4: 4: 4 format.
[0054] Option 3.4: generating the prediction from 2WxH sets of matrix of weights.
[0055] Specifically, matrix of weights for 2WxH chroma CU in 4: 2: 2 format are directly used in generating the prediction for 2WxH chroma CU in 4: 4: 4 format. A set is used to generate one predicted sample of one position inside the current block.
[0056] Examples of Option 3.1 combined with Option 3.3 (a) and Option 3.2 combined with Option 3.3 (b) are depicted as in Fig. 6 and Fig. 7.
[0057] Method 3.2: 4: 2: 2 matrix of weights down-sampled for chroma 4: 2: 0
[0058] For matrix of weights in chroma 4: 2: 2 format to be reused in chroma 4: 2: 0 format, there are two stages of processing. There are two options (Options 3.5-3.6) in the first stage. Assuming the chroma CU size is WxH in 4: 2: 0 format and the number of the to be reused matrix weight (from weights of Wx2H chroma CU in 4: 2: 2 chroma) sets is Wx2H, the first stage process is described as follows.
[0059] Option 3.5: Matrix of weights for one position (one set) are down-sampled from shape as in chroma 4: 2: 2 to shape as in chroma 4: 2: 0.
[0060] Specifically, for angular prediction modes greater than 18 and less than 50, reference length of template is down-sampled from W and H to W and H / 2. For angular prediction modes less than or equal to 18 or greater than or equal to 50, reference length of template is down-sampled from 2W and 2H to 2W and H. Only coefficients for the left side are down-sampled.
[0061] Option 3.6: Neighbouring reconstruction samples of the L-shape in 4: 2: 0 format are up-sampled to shape as in chroma 4: 2: 2. Matrix of weights of Wx2H chroma CU in format 4: 2: 2 used in prediction generation.
[0062] Specifically, the left side of the L-shape neighbouring area of reconstruction samples is up-sampled to twice height.
[0063] The second stage deals with position related manipulation. There are several options (Options 3.7-3.10) for the second stage. Assuming the size of current chroma CU is WxH in 4: 2: 0 format and a set of matrix of weights is used to generate one predicted sample of one position inside the current block, the second stage is described as follows
[0064] Option 3.7: generating the prediction from Wx2H sets of matrix of weights from Wx2H chroma CU in 4: 2: 2 format. Option 3.5 provides down-sampled matrix of weights with Wx2H positions. With all the positions.
[0065] Option 3.8: generating the prediction from Wx2H sets of matrix of weights from Wx2H chroma CU in 4: 2: 2 format. Option 3.5 provides down-sampled matrix of weights with Wx2H positions. Sub-sample positions (actually only half sets of the whole matrix weight sets are used) in vertical direction (keep even rows or odd rows) to generate prediction with size WxH.
[0066] Option 3.9: generating the prediction from Wx2H sets of matrix of weights from Wx2H chroma CU in 4: 2: 2 format. Option 3.6 provides L-shape of up-sampled reconstruction samples to generate a first prediction with size Wx2H. Down-sampling Wx2H to WxH to get second prediction as the final prediction to predict WxH chroma CU in 4: 2: 0 format.
[0067] Option 3.10: generating the prediction from Wx2H sets of matrix of weights from Wx2H chroma CU in 4: 2: 2 format. Option 3.6 provides up-sampled L-shape of reconstruction samples to generate predicted samples. Sub-sample positions (meaning that only partial sets of the whole matrix weight sets are used) in vertical direction (keep even rows or odd rows) to generate prediction with size WxH.
[0068] Option 3.11: generating the prediction from WxH sets of matrix of weights.
[0069] Specifically, matrix of weights for WxH chroma CU in 4: 2: 2 format are directly used in generating the prediction for WxH chroma CU in 4: 2: 0 format.
[0070] Method 4.1: 4: 2: 0 matrix of weights up-sampled for chroma 4: 2: 2
[0071] For matrix of weights of chroma 4: 2: 0 to be used in chroma 4: 2: 2, there are two stages of processing. There are two options (Options 4.1-4.2) in first stage. Assuming the chroma CU size is Wx2H in 4: 2: 2 format and the number of the to be reused matrix weight (from matrix of weights of WxH chroma CU in 4: 2: 0 chroma) sets is WxH, there are two options (Options 4.1-4.2) in the first stage.
[0072] Option 4.1: Matrix of weights for one position (one set) are up-sampled from shape as in chroma 4: 2: 0 to shape as in chroma 4: 2: 2.
[0073] Option 4.2: Neighbouring reconstruction samples of the L-shape in 4: 2: 2 format are down-sampled to the L-shape as in chroma 4: 2: 0. Matrix of weights of WxH chroma CU in 4: 2: 0 format are used in prediction generation.
[0074] The second stage deals with position related manipulation. There are two options (Options 4.3-4. 4) for the second stage. Assuming the size of current chroma CU is Wx2H and a set of matrix of weights is used to generate one predicted sample of one position inside the current block, the second stage is described as follows.
[0075] Option 4.3: generating the prediction from WxH sets of matrix of weights from WxH chroma CU in 4: 2: 0 format and up-sampling the prediction to Wx2H.
[0076] Specifically, up-sampled matrix of weights from Option 4.1 are used to generate the prediction. Otherwise, down-sampled L-shape area from Option 4.2 and matrix weight from WxH chroma CU in 4: 2: 0 format are used to generate the prediction.
[0077] Option 4.4: generating the prediction from Wx2H sets of matrix of weights.
[0078] Specifically, matrix of weights for Wx2H chroma CU in 4: 2: 0 format are directly used in generating the prediction for Wx2H chroma CU in 4: 2: 2 format.
[0079] Method 4.2: 4: 2: 0 matrix of weights up-sampled for chroma 4: 4: 4
[0080] For matrix of weights of chroma 4: 2: 0 to be used in chroma 4: 4: 4, there are two stages of processing. There are two options (Options 4.5-4.6) in first stage and assume the chroma CU size is 2Wx2H in 4: 4: 4 format and the number of the to be reused matrix weight (from weights of WxH chroma CU in 4: 2: 0 chroma) sets is WxH.
[0081] Option 4.5: Matrix of weights for one position (one set) are up-sampled from shape as in chroma 4: 2: 0 to shape as in chroma 4: 4: 4.
[0082] Option 4.6: reconstruction samples of the L-shape in 4: 4: 4 format are down-sampled to 4: 2: 0. Matrix of weights of WxH chroma CU in 4: 2: 0 format are used in prediction generation.
[0083] The second stage deals with position related manipulation. There are two options (Options 4.7-4.8) for the second stage. Assuming the size of current chroma CU is 2Wx2H in 4: 4: 4 format and a set of matrix of weights is used to generate the predicted sample of one position inside the current block, the second stage is described as follows.
[0084] Option 4.7: generating the prediction from weights of WxH chroma CU in 4: 2: 0 format. Up-sampling the prediction to 2Wx2H.
[0085] Specifically, L-shape with matrix of weights as the shape in chroma 4: 4: 4 from Option 4.5 are used to generate the prediction. Otherwise, down-sampled L-shape area of reconstruction samples from Option 4.6 and matrix of weights from WxH chroma CU in 4: 2: 0 format are used to generate the prediction.
[0086] Option 4.8: generating the prediction from 2Wx2H sets of matrix of weights.
[0087] Specifically, matrix of weights for 2Wx2H chroma CU in 4: 2: 0 are directly used in generating the prediction for 2Wx2H chroma CU in 4: 4: 4 format.
[0088] For one embodiment, the options described above is pre-defined. In another embodiment, a flag in SPS, slice header, PPS, picture header, CTU-level syntax element, or CU-level syntax element is signalled to specify which option is adopted in each processing stage.
[0089] Method 5: Reusing Matrixes of Weights from Luma for Chroma
[0090] To reduce the storage requirement, we propose to reuse the matrix of weights of luma to perform the prediction for the chroma component.
[0091] For single-tree block partition, the chroma component uses luma matrix of weights trained for generating prediction of the size as corresponding size of luma PU according to chroma format. However, the matrix of weights is down-sampled according to the chroma format. For the first stage, for chroma 4: 2: 0, apply down-sampling by a factor of two to the matrix of weights both horizontally and vertically to get the desired shape of matrix of weights in chroma 4: 2: 0 format. For chroma 4: 2: 2, apply down-sampling by a factor of two to the matrix of weights horizontally (one column out of two is kept) to get the desired shape of matrix of weights in chroma 4: 2: 2 format. Before down-sampling of weights, the weights can be optionally filtered. Because the weights used for luma has been fetched from the storage and the down-sampling can be done on-the-fly. This strategy can reduce the bandwidth requirement for accessing the storage. For second stage, sample positions for chroma which is less than the positions for luma in chroma 4: 2: 0 or 4: 2: 2 format, stride of two of position sub-sampling is used to select the reused sets of matrix of weights from luma.
[0092] For another embodiment, for both single-tree and dual-tree block partition cases, chroma uses luma matrix of weights trained for generating prediction of that chroma block.
[0093] For another embodiment, it is assumed that chroma also has its own matrix of weights for certain chroma format. A flag in SPS, slice header, PPS, picture header, CTU-level syntax element, or CU-level syntax element is signalled to specify whether the matrix trained for chroma is utilized or the matrix is reused from luma is utilized to generate the prediction. The final value of the signalled flag depends on which value can provide better rate-distortion trade-off.
[0094] For another embodiment, if the matrix of weights for a certain chroma CU size are missing from the set of matrix of weights for luma components. The matrix of weights for the missing chroma CU size are down-sampled or up-sampled from matrix of weights for luma. For another embodiment, to derive the matrix of weights for chroma components, multiple matrixes of luma are down-sampled or up-sampled and are blended with certain blending weights.
[0095] For another embodiment, CU size matched weights from luma are directly used for chroma to generate the predicted chroma samples. No weight interpolation or position sub-sampling is required.
[0096] For another embodiment, if the matrix of weights for a certain chroma CU size are missing from the set of matrix of weights for luma components. The missing matrix of weights for chroma are generated by a training process with collected training data. These extra matrix of weights are stored along with the matrix of weights for luma to be used in the coding flow.
[0097] Any of the foregoing proposed methods of sharing a base matrix of weights among multiple chroma sub-sampling formats can be implemented in encoders and / or decoders. For example, any of the proposed methods or combination thereof can be implemented in an intra module of an encoder and / or decoder. Alternatively, any of the proposed methods or combination thereof can be implemented as a circuit coupled to an intra module of the encoders and / or decoder, so as to provide the information needed by the intra module used in encoders and / or decoder. The proposed aspects, methods, related embodiments, and combination thereof can be implemented individually or jointly in a video coding system.
[0098] With reference to the exemplary video encoder / decoder in Fig. 1A and Fig. 1B, any of the proposed methods can be implemented in an Intra prediction module (e.g. Intra Pred. 150 in Fig. 1B) in a decoder or an Intra prediction module in an encoder (e.g. Intra Pred. 110 in Fig. 1A) . Any of the proposed methods can also be implemented as a circuit coupled to the intra coding module at the decoder or the encoder. However, the decoder or encoder may also use additional processing unit to implement the required processing. While the Intra prediction units (e.g. unit 110 in Fig. 1A and unit 150 in Fig. 1B) are shown as individual processing units, they may correspond to executable software or firmware codes stored on a media, such as hard disk or flash memory, for a CPU (Central Processing Unit) or programmable devices (e.g. DSP (Digital Signal Processor) or FPGA (Field Programmable Gate Array) ) .
[0099] Fig. 8 illustrates a flowchart of an exemplary video coding system that uses a based matrix of weights for matrix-based intra prediction of chroma component in multiple chroma sub-sampling formats 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 this method, input data associated with a current block is received in step 810, wherein the input data comprise pixel data to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side, wherein the current block corresponds to a chroma component of input pictures, and at least two chroma sub-sampling formats are used for the chroma component. A template area for the current block is determined in step 820. A base matrix of weights for position-dependent matrix-based intra prediction is determined in step 830, wherein the base matrix of weights is used for the current block in any of said at least two chroma sub-sampling formats. The position-dependent matrix-based intra prediction for the current block in any of said at least two chroma sub-sampling formats is generated based on the base matrix of weights and reference samples in the template area in step 840. The current block is encoded or decoded using the position-dependent matrix-based intra prediction in step 850.
[0100] 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.
[0101] 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.
[0102] 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.
[0103] 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
A method of video coding, the method comprising:receiving input data associated with a current block, wherein the input data comprise pixel data to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side, wherein the current block corresponds to a chroma component of input pictures, and at least two chroma sub-sampling formats are used for the chroma component;determining a template area for the current block;determining a base matrix of weights for position-dependent matrix-based intra prediction, wherein the base matrix of weights is used for the current block in any of said at least two chroma sub-sampling formats;generating the position-dependent matrix-based intra prediction for the current block in any of said at least two chroma sub-sampling formats based on the base matrix of weights and reference samples in the template area; andencoding or decoding the current block using the position-dependent matrix-based intra prediction.The method of Claim 1, wherein said at least two chroma sub-sampling formats comprise any combination of 4: 4: 4 format, 4: 2: 2 format, and 4: 2: 0 format.The method of Claim 2, wherein the base matrix of weights corresponds to chroma 4: 4: 4 matrix weights and current chroma format for the current block is in the 4: 2: 2 format or the 4: 2: 0 format, a target matrix of weights for the current block is generated by down-sampling the chroma 4: 4: 4 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights.The method of Claim 3, wherein target sample positions of prediction for the current block are down-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format.The method of Claim 4, wherein the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights.The method of Claim 3, wherein even column and / or row positions, or odd column and / or row positions of the base matrix of weights corresponding to the reference samples in an above and / or left region of the template area are used to generate the target matrix of weights.The method of Claim 3, wherein, a flag in SPS (Sequence Parameter Set) , slice header, PPS (Picture Parameter Set) , picture header, CTU (Coding Tree Unit) -level syntax element, or CU (Coding Unit) -level syntax element is signalled or parsed to determine whether even column and / or row positions, or odd column and / or row positions of the base matrix of weights corresponding to the reference samples in an above region of the template area are used to generate the target matrix of weights.The method of Claim 2, wherein the base matrix of weights corresponds to chroma 4: 2: 2 matrix weights and current chroma format for the current block is in the 4: 4: 4 format, a target matrix of weights for the current block is generated by up-sampling the chroma 4: 2: 2 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights.The method of Claim 8, wherein target sample positions of prediction for the current block are up-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format.The method of Claim 9, wherein the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights.The method of Claim 2, wherein the base matrix of weights corresponds to chroma 4: 2: 2 matrix weights and current chroma format for the current block is in the 4: 2: 0 format, a target matrix of weights for the current block is generated by down-sampling the chroma 4: 2: 2 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights.The method of Claim 11, wherein target sample positions of prediction for the current block are down-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format.The method of Claim 12, wherein the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights.The method of Claim 2, wherein the base matrix of weights corresponds to chroma 4: 2: 0 matrix weights and current chroma format for the current block is in the 4: 2: 2 format or the 4: 4: 4 format, a target matrix of weights for the current block is generated by up-sampling the chroma 4: 2: 0 matrix weights according to a base chroma format and the current chroma format, and wherein the base chroma format is associated with the base matrix of weights.The method of Claim 14, wherein target sample positions of prediction for the current block are up-sampled from base sample positions of prediction according to the base chroma format and the current chroma format, and wherein the base sample positions of prediction are associated with the base chroma format.The method of Claim 15, wherein the position-dependent matrix-based intra prediction for the current block is generated by multiplying reference samples at the target sample positions of prediction by the target matrix of weights.An apparatus of 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 to be encoded at an encoder side or data associated with the current block to be decoded at a decoder side, wherein the current block corresponds to a chroma component of input pictures, and at least two chroma sub-sampling formats are used for the chroma component;determine a template area for the current block;determine a base matrix of weights for position-dependent matrix-based intra prediction, wherein the base matrix of weights is used for the current block in any of said at least two chroma sub-sampling formats;generate the position-dependent matrix-based intra prediction for the current block in any of said at least two sub-sampling chroma formats based on the base matrix of weights and reference samples in the template area; andencode or decode the current block using the position-dependent matrix-based intra prediction.
Citation Information
Patent Citations
Method and apparatus for video encoding and decoding using matrix-based intra prediction
CN114145021A
Matrix intra prediction and cross-component linear model prediction harmonization for video coding
US20200413049A1
Matrix-based intra prediction using upsampling
US20220007029A1
MIP for All Channels in the Case of 4:4:4-Chroma Format and of Single Tree
US20230188720A1
Video coding method and video decoder
US20230319267A1