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 and height , matrix weighted intra prediction (MIP) takes one line of H reconstructed neighbouring boundary samples left of the block and one line of 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 Figure 20.
Figure 20 – Matrix weighted intra prediction process 3.3.6.1 Averaging neighboring samples Among the boundary samples, four samples or eight samples are selected by averaging based on block size and shape. Specifically, the input boundaries and are reduced to smaller boundaries and by averaging neighboring boundary samples according to predefined rule depends on block size. Then, the two reduced boundaries and are concatenated to a reduced boundary vector which is thus of size four for blocks of shape and of size eight for blocks of all other shapes. If refers to the MIP-mode, this concatenation is defined as follows:
(3-0)
3.3.6.2 Matrix Multiplication A matrix vector multiplication, followed by addition of an offset, is carried out with the averaged samples as an input. The result is a reduced prediction signal on a subsampled set of samples in the original block. Out of the reduced input vector a reduced prediction signal which is a signal on the downsampled block of width and height is generated. Here, and are defined as:
(3-0)
(3-0)
The reduced prediction signal is computed by calculating a matrix vector product and adding an offset:
.
Here, is a matrix that has rows and 4 columns if and 8 columns in all other cases. is a vector of size . The matrix and the offset vector are taken from one of the sets , , One defines an index as follows:
(3-0)
Here, each coefficient of the matrix A is represented with 8 bit precision. The set consists of 16 matrices each of which has 16 rows and 4 columns and 16 offset vectors each of size 16. Matrices and offset vectors of that set are used for blocks of size The set consists of 8 matrices , each of which has rows and 8 columns and 8 offset vectors each of size 16. The set consists of 6 matrices , each of which has 64 rows and 8 columns and of 6 offset vectors of size 64.