Method and apparatus for video encoding and decoding with matrix based intra-prediction
Different implementations are described, particularly implementations for video encoding and decoding based on linear weighted intra prediction, also called matrix based intra prediction, are presented. Accordingly, for a block being encoded or decoded in linear weighted intra prediction, obtaining intra predicted samples from at least two matrix-vector products between at least two selected weight matrices of reduced size and a set of neighboring reference samples. Advantageously, such arrangement allows to reduce the amount of memory for storing data and to reduce the complexity of the intra prediction samples computation.
1. A method comprising:
encoding a block of a picture of a video in intra prediction mode using linear weighted prediction,
wherein the encoding comprises:
determining a set of n neighboring reference samples x;
selecting at least a first weight matrix G of size m×r, a second weight matrix H T of size r×n, and an associated bias vector b among a set of weight matrices and associated bias vectors based on a mode of linear weighted intra prediction and a block shape, the first weight matrix G having a size m×r and the second weight matrix H T having a size r×n, where m, n, r are integers with r smaller than m and r smaller than n; and
obtaining intra predicted samples ŷ of the block from a first product of matrices H T x, a second product of matrices G(H T x), and adding associated bias b resulting in ŷ=G(H T x)+b.
2. The method of claim 1 , wherein the first and second weight matrices G and H T are obtained from low rank processing of a weight matrix M of size m×n and wherein an estimate M of the weight matrix M is the product of the first and second weight matrices G and H T , {circumflex over (M)}=GH T .
3. The method of claim 1 , wherein r is determined to reduce matrices product complexity.
4. The method of claim 1 , wherein r is determined responsive to Single Value Decomposition SVD of the weight matrix M.
5. The method of claim 1 , wherein, for a block of size width*height, the set of neighboring reference samples x comprises all reconstructed samples from a neighboring top line of size width and from a neighboring left line of size height.
6. The method of claim 1 , wherein for a block of size width*height, the set of neighboring reference samples x comprises all reconstructed samples from a neighboring top line of size 2*width and from a neighboring left line of size 2*height.
7. The method of claim 1 , wherein at least one high level syntax element representative of the set of weight matrix and associated bias are signaled in a Picture Parameter Set (PPS) so that all blocks in a frame using linear weighted prediction uses the signaled set of weight matrices.
8. The method of claim 1 , wherein at least one high level syntax element representative of the set of weight matrix and associated bias are signaled in a Sequence Parameter Set (SPS) so that all blocks in a sequence using linear weighted prediction uses the signaled set of weight matrices.
9. The method of claim 1 , wherein a bit depth of the first product of matrices and of the second product of matrices is increased with regard to a bit depth of intra predicted samples.
10. A method comprising:
decoding a block of a picture of a video, the block being coded in intra prediction mode using linear weighted prediction,
wherein the decoding comprises:
determining a set of n neighboring reference samples x;
selecting at least a first weight matrix G of size m×r, a second weight matrix H T of size r×n, and an associated bias vector b among a set of weight matrices and associated bias vectors based on a mode of linear weighted intra prediction and a block shape, the first weight matrix G having a size m×r and the second weight matrix H T having a size r×n, where m, n, r are integers with r smaller than m and r smaller than n; and
obtaining intra predicted samples ŷ of the block from a first product of matrices H T x, a second product of matrices G(H T x), and adding associated bias b resulting in ŷ=G (H T x)+b.
11. The method of claim 10 , wherein the first and second weight matrices G and H T are obtained from low rank processing of a weight matrix M of size m×n, and wherein an estimate M of the weight matrix M is the product of the first and second weight matrices G and H T , {circumflex over (M)}=GH T .
12. The method of claim 10 , wherein r is determined to reduce matrices product complexity.
13. The method of claim 10 , wherein r is determined responsive to Single Value Decomposition SVD of the weight matrix M.
14. The method of claim 10 , wherein, for a block of size width*height, the set of neighboring reference samples x comprises all reconstructed samples from a neighboring top line of size width and from a neighboring left line of size height.
15. The method of claim 10 , wherein for a block of size width*height, the set of neighboring reference samples x comprises all reconstructed samples from a neighboring top line of size 2*width and from a neighboring left line of size 2*height.
16. The method of claim 10 , wherein at least one high level syntax element representative of the set of weight matrix and associated bias are signaled in a Picture Parameter Set (PPS) so that all blocks in a frame using linear weighted prediction uses the signaled set of weight matrices.
17. The method of claim 10 , wherein at least one high level syntax element representative of the set of weight matrix and associated bias are signaled in a Sequence Parameter Set (SPS) so that all blocks in a sequence using linear weighted prediction uses the signaled set of weight matrices.
18. The method of claim 10 , wherein a bit depth of the first product of matrices and of the second product of matrices is increased with regard to a bit depth of intra predicted samples.
19. An apparatus comprising one or more processors, and at least one memory, the one or more processors configured for:
encoding a block of a picture of a video in intra prediction mode using linear weighted prediction,
wherein intra predicted samples of the block are obtained by:
determining a set of n neighboring reference samples x;
selecting at least a first weight matrix G of size m×r, a second weight matrix H T of size r×n, and an associated bias vector b among a set of weight matrices and associated bias vectors based on a mode of linear weighted intra prediction and a block shape, the first weight matrix G having a size m×r and the second weight matrix H T having a size r×n, where m, n, r are integers with r smaller than m and r smaller than n; and
obtaining intra predicted samples ŷ of the block from a first product of matrices H T x, a second product of matrices G (H T x), and adding associated bias b resulting in ŷ=G (H T x)+b.
20. An apparatus comprising one or more processors, and at least one memory, the one or more processors configured for:
decoding a block of a picture of a video, the block being coded in intra prediction mode using linear weighted prediction,
wherein intra predicted samples of the block are obtained by:
determining a set of n neighboring reference samples x;
selecting at least a first weight matrix G of size m×r, a second weight matrix H T of size r×n, and an associated bias vector b among a set of weight matrices and associated bias vectors based on a mode of linear weighted intra prediction and a block shape, the first weight matrix G having a size m×r and the second weight matrix H T having a size r×n, where m, n, r are integers with r smaller than m and r smaller than n; and
obtaining intra predicted samples ŷ of the block from a first product of matrices H T x, a second product of matrices G (H T x), and adding associated bias b resulting in ŷ=G (H T x)+b.
21. A non-transitory computer readable medium having stored instructions which, when executed by one or more processors, cause the one or more processors to perform the method of claim 1 .
22. A non-transitory computer readable medium having stored instructions which, when executed by one or more processors, cause the one or more processors to perform the method of claim 10 .