CODING USING MATRIX BASED INTRA-PREDICTION AND SECONDARY TRANSFORMS

An apparatus configured to select a predetermined intra prediction mode out of a plurality of intra-prediction modes which includes a first set of intra-prediction modes and a second set of matrix-based intra-prediction modes. The apparatus is configured to select a subset of one or more secondary transforms dependent on the predetermined intra prediction mode so that the subset is nonempty in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes or in the second set of matrix-based intra-prediction modes. The apparatus is configured to derive a transformed version of a prediction residual for a predetermined block, which is related to a spatial domain version of the prediction residual of the predetermined block via a transform defined by a concatenation of a primary transform and a predetermined secondary transform out of the subset of secondary transforms.

The present application concerns the field of matrix based intra-prediction and secondary transforms.

BACKGROUND OF THE INVENTION

For the conventional intra prediction modes like the Planar mode, the DC mode and the angular modes, non-separable secondary transform (LFNST) is a tool used to transform the prediction residuals corresponding to these intra prediction modes. Here, a set S of transform sets is given such that each conventional intra prediction mode is associated with one of these transform sets. Then, at the decoder, it can be extracted from the bitstream whether on a given block LFNST is to be applied. If this is the case, one transform set out of the set S is given, depending on the intra prediction mode used on the current block, and, if this transform set consist of more than one transform, it can be extracted from the bitstream which transform T out of this set is to be used. Then, at the decoder, the transform T is applied as a secondary transform, meaning that it is applied to a subset of the residual transform coefficients of a separable primary transform. But the aforementioned secondary transforms are a priori only defined for the conventional intra prediction modes.

SUMMARY

An embodiment may have an apparatus for decoding a predetermined block of a picture using intra-prediction, configured to select, based on the data stream, a predetermined intra prediction mode out of a plurality of intra-prediction modes which includes a first set of intra-prediction modes including a DC intra prediction mode and angular prediction modes, and a second set of matrix-based intra-prediction modes according to each of which a matrix-vector product between a vector derived from reference samples in a neighbourhood of the predetermined block and a prediction matrix associated with the respective matrix-based intra-prediction mode is used to obtain a prediction vector, on the basis of which samples of the predetermined block are predicted, derive a prediction signal for the predetermined block using the predetermined intra-prediction mode, select a subset of one or more secondary transforms out of a set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that the subset is nonempty in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, derive, from the data stream, a transformed version of a prediction residual for the predetermined block, which is related to a spatial domain version of the prediction residual of the predetermined block via a transform defined by a concatenation of a primary transform and a predetermined secondary transform out of the subset of secondary transforms applied onto a subset of coefficients of the primary transform, in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, reconstruct the predetermined block using the prediction signal and the prediction residual for the predetermined block.

Another embodiment may have an apparatus for encoding a predetermined block of a picture using intra-prediction, configured to select a predetermined intra prediction mode out of a plurality of intra-prediction modes which includes a first set of intra-prediction modes including a DC intra prediction mode and angular prediction modes, and a second set of matrix-based intra-prediction modes according to each of which a matrix-vector product between a vector derived from reference samples in a neighbourhood of the predetermined block and a prediction matrix associated with the respective matrix-based intra-prediction mode is used to obtain a prediction vector, on the basis of which samples of the predetermined block are predicted, signal the predetermined intra prediction mode in the data stream; derive a prediction signal for the predetermined block using the predetermined intra-prediction mode, select a subset of one or more secondary transforms out of a set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that the subset is nonempty in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, encode, into the data stream, a transformed version of a prediction residual for the predetermined block, which is related to a spatial domain version of the prediction residual of the predetermined block via a transform defined by a concatenation of a primary transform and a predetermined secondary transform out of the subset of secondary transforms applied onto a subset of coefficients of the primary transform, in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, wherein the predetermined block is reconstructable using the prediction signal and the prediction residual for the predetermined block.

According to another embodiment, a method for decoding a predetermined block of a picture using intra-prediction may have the steps of: selecting, based on the data stream, a predetermined intra prediction mode out of a plurality of intra-prediction modes which includes a first set of intra-prediction modes including a DC intra prediction mode and angular prediction modes, and a second set of matrix-based intra-prediction modes according to each of which a matrix-vector product between a vector derived from reference samples in a neighbourhood of the predetermined block and a prediction matrix associated with the respective matrix-based intra-prediction mode is used to obtain a prediction vector, on the basis of which samples of the predetermined block are predicted, deriving a prediction signal for the predetermined block using the predetermined intra-prediction mode, selecting a subset of one or more secondary transforms out of a set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that the subset is nonempty in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, deriving, from the data stream, a transformed version of a prediction residual for the predetermined block, which is related to a spatial domain version of the prediction residual of the predetermined block via a transform defined by a concatenation of a primary transform and a predetermined secondary transform out of the subset of secondary transforms applied onto a subset of coefficients of the primary transform, in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, reconstructing the predetermined block using the prediction signal and the prediction residual for the predetermined block.

According to another embodiment, a method for encoding a predetermined block of a picture using intra-prediction may have the steps of: selecting a predetermined intra prediction mode out of a plurality of intra-prediction modes which includes a first set of intra-prediction modes including a DC intra prediction mode and angular prediction modes, and a second set of matrix-based intra-prediction modes according to each of which a matrix-vector product between a vector derived from reference samples in a neighbourhood of the predetermined block and a prediction matrix associated with the respective matrix-based intra-prediction mode is used to obtain a prediction vector, on the basis of which samples of the predetermined block are predicted, signalling the predetermined intra prediction mode in the data stream; deriving a prediction signal for the predetermined block using the predetermined intra-prediction mode, selecting a subset of one or more secondary transforms out of a set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that the subset is nonempty in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, encoding, into the data stream, a transformed version of a prediction residual for the predetermined block, which is related to a spatial domain version of the prediction residual of the predetermined block via a transform defined by a concatenation of a primary transform and a predetermined secondary transform out of the subset of secondary transforms applied onto a subset of coefficients of the primary transform, in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes, wherein the predetermined block is reconstructable using the prediction signal and the prediction residual for the predetermined block.

Another embodiment may have a data stream having a picture encoded thereinto using the inventive method for encoding.

Another embodiment may have a non-transitory digital storage medium having a computer program stored thereon to perform the inventive methods, when said computer program is run by a computer.

In accordance with a first aspect of the present invention, the inventors of the present application realized that one problem encountered when trying to associate secondary transforms with matrix-based intra prediction modes stems from the fact that a provision of specific secondary transforms for each MIP mode may be too costly in terms of the memory requirement to additionally store extra transforms. According to the first aspect of the present application, this difficulty is overcome by selecting a subset of one or more secondary transforms out of a set of secondary transforms comprising transforms associated with matrix-based intra prediction modes and non-matrix-based intra prediction modes. The secondary transforms in the set of secondary transforms may be defined for one or more prediction modes, which reduces a needed memory capacity for the set of secondary transforms. Transforms defined for planar intra-prediction modes and/or transforms defined for DC intra-prediction modes may also be selectable for matrix-based intra prediction modes. With the specific selection of the subset of secondary transforms for a matrix-based intra prediction mode it is possible to increase a coding efficiency, although a bit stream and thus a signalization cost may be increased due to additional syntax elements needed for blocks associated with matrix-based intra prediction modes to indicate a usage of a secondary transform.

Accordingly, in accordance with a first aspect of the present application, an apparatus, i.e. a decoder, for decoding a predetermined block of a picture using intra-prediction, is configured to select, based on the data stream, a predetermined intra prediction mode out of a plurality of intra-prediction modes which comprises a first set of intra-prediction modes and a second set of matrix-based intra-prediction modes. The first set of intra-prediction modes comprises a DC intra prediction mode and angular prediction modes and optionally a planar intra prediction mode. If a matrix-based intra-prediction mode out of the second set is selected as the predetermined intra prediction mode, the decoder is configured to use a matrix-vector product between a vector derived from reference samples in a neighbourhood of the predetermined block and use a prediction matrix associated with the respective matrix-based intra-prediction mode to obtain a prediction vector, on the basis of which the decoder is configured to predict samples of the predetermined block. The decoder is configured to derive a prediction signal for the predetermined block using the predetermined intra-prediction mode and select a subset of one or more secondary transforms out of a set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that the subset is nonempty in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes. The first set and the second set define intra-prediction modes, for which a secondary transform is available. Thus for the predetermined intra-prediction mode selected out of the first set or out of the second set, the decoder is configured to select the subset of one or more secondary transforms out of the set of secondary transforms specifically associated with the selected predetermined intra-prediction mode. Additionally, the decoder is configured to derive, from the data stream, a transformed version of a prediction residual for the predetermined block, which is related to a spatial domain version of the prediction residual of the predetermined block via a transform defined by a concatenation of a primary transform and a predetermined secondary transform out of the subset of secondary transforms applied onto a subset of coefficients of the primary transform, in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes. The primary transform, for example, is set by default and the predetermined secondary transform, for example, is selected out of the subset of secondary transforms by the decoder. The decoder may be configured to select the predetermined secondary transform out of the subset of secondary transforms by deriving a secondary-transform-indicating syntax element from the data stream. The decoder is configured to reconstruct the predetermined block using the prediction signal and the prediction residual for the predetermined block.

In accordance with a first aspect of the present application, parallel to the decoder an apparatus, i.e. an encoder, for encoding a predetermined block of a picture using intra-prediction, is configured to select a predetermined intra prediction mode out of a plurality of intra-prediction modes which comprises a first set of intra-prediction modes comprising a DC intra prediction mode and angular prediction modes and optionally a planar intra prediction mode, and a second set of matrix-based intra-prediction modes according to each of which a matrix-vector product between a vector derived from reference samples in a neighbourhood of the predetermined block and a prediction matrix associated with the respective matrix-based intra-prediction mode is used to obtain a prediction vector, on the basis of which samples of the predetermined block are predicted. The encoder is configured to signal the predetermined intra prediction mode in the data stream and derive a prediction signal for the predetermined block using the predetermined intra-prediction mode. Additionally, the encoder is configured to select a subset of one or more secondary transforms out of a set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that the subset is nonempty in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes. The encoder is configured to encode, into the data stream, a transformed version of a prediction residual for the predetermined block, which is related to a spatial domain version of the prediction residual of the predetermined block via a transform defined by a concatenation of a primary transform and a predetermined secondary transform out of the subset of secondary transforms applied onto a subset of coefficients of the primary transform, in case of the predetermined intra prediction mode being contained in the first set of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set of matrix-based intra-prediction modes. The predetermined block is reconstructable using the prediction signal and the prediction residual for the predetermined block.

According to an embodiment, the decoder/encoder is configured to select the subset of one or more secondary transforms out of the set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that each secondary transform of the set of secondary transforms is contained in the subset of one or more secondary transforms selected for at least one of the intra-prediction modes within the first and second sets. For one or more intra-prediction modes within the first set or within the second set, the respective selected subset may comprise all secondary transforms of the set of secondary transforms.

According to an embodiment, the decoder/encoder is configured to select a subset of one or more secondary transforms out of a set of secondary transforms in a manner dependent on the predetermined intra prediction mode so that each secondary transform of each subset of secondary transforms selected for any matrix-based intra-prediction mode is contained by a subset of secondary transforms selected for at least one intra-prediction mode within the first set not belonging to the angular prediction modes. A subset selected for a matrix-based intra-prediction mode may contain secondary transforms associated with one or more non-angular intra-prediction modes within the first set, like the DC intra prediction mode and/or the planar intra prediction mode. Thus the secondary transforms out of the set of secondary transforms can be part of more than one subset of one or more secondary transforms. No additional secondary transforms only usable for blocks with the predetermined intra-prediction mode being a matrix-based intra-prediction mode have to be contained in the set of secondary transforms. For a predetermined block with the predetermined intra-prediction mode being a matrix-based intra-prediction mode, the decoder/encoder is configured to select the same secondary transforms out of the set of secondary transforms as for the predetermined intra-prediction mode being a non-angular prediction mode out of the first set. A subset selected for a matrix-based intra-prediction mode may be equal to a subset selected for an intra-prediction mode within the first set not belonging to the angular prediction modes or may contain some secondary transforms of a subset selected for an intra-prediction mode within the first set not belonging to the angular prediction modes or may contain some or all secondary transforms of two or more subsets selected for intra-prediction modes within the first set not belonging to the angular prediction modes.

Methods for encoding or decoding are based on the same considerations as the above-described apparatuses for encoding or decoding. The methods can, by the way, be completed with all features and functionalities, which are also described with regard to the apparatuses for encoding or decoding.

DETAILED DESCRIPTION OF THE INVENTION

In the following description, a plurality of details is set forth to provide a more throughout explanation of embodiments of the present invention. However, it will be apparent to those skilled in the art that embodiments of the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form rather than in detail in order to avoid obscuring embodiments of the present invention. In addition, features of the different embodiments described herein after may be combined with each other, unless specifically noted otherwise.

In the following, different inventive examples, embodiments and aspects will be described. At least some of these examples, embodiments and aspects refer, inter alia, to methods and/or apparatus for video coding and/or for performing intra Predictions e.g. using linear or affine transforms with neighbouring sample reduction and/or for optimizing video delivery (e.g., broadcast, streaming, file playback, etc.), e.g., for video applications and/or for virtual reality applications.

Further, examples, embodiments and aspects may refer to High Efficiency Video Coding (HEVC) or successors. Also, further embodiments, examples and aspects will be defined by the enclosed claims.

It should be noted that any embodiments, examples and aspects as defined by the claims can be supplemented by any of the details (features and functionalities) described in the following chapters.

Also, the embodiments, examples and aspects described in the following chapters can be used individually, and can also be supplemented by any of the features in another chapter, or by any feature included in the claims.

Also, it should be noted that individual, examples, embodiments and aspects described herein can be used individually or in combination. Thus, details can be added to each of said individual aspects without adding details to another one of said examples, embodiments and aspects.

It should also be noted that the present disclosure describes, explicitly or implicitly, features of decoding and/or encoding system and/or method.

Moreover, features and functionalities disclosed herein relating to a method can also be used in an apparatus. Furthermore, any features and functionalities disclosed herein with respect to an apparatus can also be used in a corresponding method. In other words, the methods disclosed herein can be supplemented by any of the features and functionalities described with respect to the apparatuses.

Also, any of the features and functionalities described herein can be implemented in hardware or in software, or using a combination of hardware and software, as will be described in the section “implementation alternatives”.

Moreover, any of the features described in parentheses (“( . . . )” or “[ . . . ]”) may be considered as optional in some examples, embodiments, or aspects.

In the following, various examples are described which may assist in achieving a more effective compression when using block-based prediction. Some examples achieve high compression efficiency by spending a set of intra-prediction modes. The latter ones may be added to other intra-prediction modes heuristically designed, for instance, or may be provided exclusively. And even other examples make use of both of the just-discussed specialties. As a vibration of these embodiments it may be, however, that intra prediction is turned into an inter prediction by using reference samples in another picture instead.

In order to ease the understanding of the following examples of the present application, the description starts with a presentation of possible encoders and decoders fitting thereto into which the subsequently outlined examples of the present application could be built.FIG. 1shows an apparatus for block-wise encoding a picture10into a datastream12. The apparatus is indicated using reference sign14and may be a still picture encoder or a video encoder. In other words, picture10may be a current picture out of a video16when the encoder14is configured to encode video16including picture10into datastream12, or encoder14may encode picture10into datastream12exclusively.

As mentioned, encoder14performs the encoding in a block-wise manner or block-base. To this, encoder14subdivides picture10into blocks, units of which encoder14encodes picture10into datastream12. Examples of possible subdivisions of picture10into blocks18are set out in more detail below. Generally, the subdivision may end-up into blocks18of constant size such as an array of blocks arranged in rows and columns or into blocks18of different block sizes such as by use of a hierarchical multi-tree subdivisioning with starting the multi-tree subdivisioning from the whole picture area of picture10or from a pre-partitioning of picture10into an array of tree blocks wherein these examples shall not be treated as excluding other possible ways of subdivisioning picture10into blocks18.

Further, encoder14is a predictive encoder configured to predictively encode picture10into datastream12. For a certain block18this means that encoder14determines a prediction signal for block18and encodes the prediction residual, i.e. the prediction error at which the prediction signal deviates from the actual picture content within block18, into datastream12.

Encoder14may support different prediction modes so as to derive the prediction signal for a certain block18. The prediction modes, which are of importance in the following examples, are intra-prediction modes according to which the inner of block18is predicted spatially from neighboring, already encoded samples of picture10. The encoding of picture10into datastream12and, accordingly, the corresponding decoding procedure, may be based on a certain coding order20defined among blocks18. For instance, the coding order20may traverse blocks18in a raster scan order such as row-wise from top to bottom with traversing each row from left to right, for instance. In case of hierarchical multi-tree based subdivisioning, raster scan ordering may be applied within each hierarchy level, wherein a depth-first traversal order may be applied, i.e. leaf nodes within a block of a certain hierarchy level may precede blocks of the same hierarchy level having the same parent block according to coding order20. Depending on the coding order20, neighboring, already encoded samples of a block18may be located usually at one or more sides of block18. In case of the examples presented herein, for instance, neighboring, already encoded samples of a block18are located to the top of, and to the left of block18.

Intra-prediction modes may not be the only ones supported by encoder14. In case of encoder14being a video encoder, for instance, encoder14may also support inter-prediction modes according to which a block18is temporarily predicted from a previously encoded picture of video16. Such an inter-prediction mode may be a motion-compensated prediction mode according to which a motion vector is signaled for such a block18indicating a relative spatial offset of the portion from which the prediction signal of block18is to be derived as a copy. Additionally or alternatively, other non-intra-prediction modes may be available as well such as inter-prediction modes in case of encoder14being a multi-view encoder, or non-predictive modes according to which the inner of block18is coded as is, i.e. without any prediction.

Before starting with focusing the description of the present application onto intra-prediction modes, a more specific example for a possible block-based encoder, i.e. for a possible implementation of encoder14, as described with respect toFIG. 2with then presenting two corresponding examples for a decoder fitting toFIGS. 1 and 2, respectively.

FIG. 2shows a possible implementation of encoder14ofFIG. 1, namely one where the encoder is configured to use transform coding for encoding the prediction residual although this is nearly an example and the present application is not restricted to that sort of prediction residual coding. According toFIG. 2, encoder14comprises a subtractor22configured to subtract from the inbound signal, i.e. picture10or, on a block basis, current block18, the corresponding prediction signal24so as to obtain the prediction residual signal26which is then encoded by a prediction residual encoder28into a datastream12. The prediction residual encoder28is composed of a lossy encoding stage28aand a lossless encoding stage28b.The lossy stage28areceives the prediction residual signal26and comprises a quantizer30which quantizes the samples of the prediction residual signal26. As already mentioned above, the present example uses transform coding of the prediction residual signal26and accordingly, the lossy encoding stage28acomprises a transform stage32connected between subtractor22and quantizer30so as to transform such a spectrally decomposed prediction residual26with a quantization of quantizer30taking place on the transformed coefficients where presenting the residual signal26. The transform may be a DCT, DST, FFT, Hadamard transform or the like. The transformed and quantized prediction residual signal34is then subject to lossless coding by the lossless encoding stage28bwhich is an entropy coder entropy coding quantized prediction residual signal34into datastream12. Encoder14further comprises the prediction residual signal reconstruction stage36connected to the output of quantizer30so as to reconstruct from the transformed and quantized prediction residual signal34the prediction residual signal in a manner also available at the decoder, i.e. taking the coding loss is quantizer30into account. To this end, the prediction residual reconstruction stage36comprises a dequantizer38which perform the inverse of the quantization of quantizer30, followed by an inverse transformer40which performs the inverse transformation relative to the transformation performed by transformer32such as the inverse of the spectral decomposition such as the inverse to any of the above-mentioned specific transformation examples. Encoder14comprises an adder42which adds the reconstructed prediction residual signal as output by inverse transformer40and the prediction signal24so as to output a reconstructed signal, i.e. reconstructed samples. This output is fed into a predictor44of encoder14which then determines the prediction signal24based thereon. It is predictor44which supports all the prediction modes already discussed above with respect toFIG. 1.FIG. 2also illustrates that in case of encoder14being a video encoder, encoder14may also comprise an in-loop filter46with filters completely reconstructed pictures which, after having been filtered, form reference pictures for predictor44with respect to inter-predicted block.

As already mentioned above, encoder14operates block-based. For the subsequent description, the block bases of interest is the one subdividing picture10into blocks for which the intra-prediction mode is selected out of a set or plurality of intra-prediction modes supported by predictor44or encoder14, respectively, and the selected intra-prediction mode performed individually. Other sorts of blocks into which picture10is subdivided may, however, exist as well. For instance, the above-mentioned decision whether picture10is inter-coded or intra-coded may be done at a granularity or in units of blocks deviating from blocks18. For instance, the inter/intra mode decision may be performed at a level of coding blocks into which picture10is subdivided, and each coding block is subdivided into prediction blocks. Prediction blocks with encoding blocks for which it has been decided that intra-prediction is used, are each subdivided to an intra-prediction mode decision. To this, for each of these prediction blocks, it is decided as to which supported intra-prediction mode should be used for the respective prediction block. These prediction blocks will form blocks18which are of interest here. Prediction blocks within coding blocks associated with inter-prediction would be treated differently by predictor44. They would be inter-predicted from reference pictures by determining a motion vector and copying the prediction signal for this block from a location in the reference picture pointed to by the motion vector. Another block subdivisioning pertains the subdivisioning into transform blocks at units of which the transformations by transformer32and inverse transformer40are performed. Transformed blocks may, for instance, be the result of further subdivisioning coding blocks. Naturally, the examples set out herein should not be treated as being limiting and other examples exist as well. For the sake of completeness only, it is noted that the subdivisioning into coding blocks may, for instance, use multi-tree subdivisioning, and prediction blocks and/or transform blocks may be obtained by further subdividing coding blocks using multi-tree subdivisioning, as well.

A decoder54or apparatus for block-wise decoding fitting to the encoder14ofFIG. 1is depicted inFIG. 3. This decoder54does the opposite of encoder14, i.e. it decodes from datastream12picture10in a block-wise manner and supports, to this end, a plurality of intra-prediction modes. The decoder54may comprise a residual provider156, for example. All the other possibilities discussed above with respect toFIG. 1are valid for the decoder54, too. To this, decoder54may be a still picture decoder or a video decoder and all the prediction modes and prediction possibilities are supported by decoder54as well. The difference between encoder14and decoder54lies, primarily, in the fact that encoder14chooses or selects coding decisions according to some optimization such as, for instance, in order to minimize some cost function which may depend on coding rate and/or coding distortion. One of these coding options or coding parameters may involve a selection of the intra-prediction mode to be used for a current block18among available or supported intra-prediction modes. The selected intra-prediction mode may then be signaled by encoder14for current block18within datastream12with decoder54redoing the selection using this signalization in datastream12for block18. Likewise, the subdivisioning of picture10into blocks18may be subject to optimization within encoder14and corresponding subdivision information may be conveyed within datastream12with decoder54recovering the subdivision of picture10into blocks18on the basis of the subdivision information. Summarizing the above, decoder54may be a predictive decoder operating on a block-basis and besides intra-prediction modes, decoder54may support other prediction modes such as inter-prediction modes in case of, for instance, decoder54being a video decoder. In decoding, decoder54may also use the coding order20discussed with respect toFIG. 1and as this coding order20is obeyed both at encoder14and decoder54, the same neighboring samples are available for a current block18both at encoder14and decoder54. Accordingly, in order to avoid unnecessary repetition, the description of the mode of operation of encoder14shall also apply to decoder54as far the subdivision of picture10into blocks is concerned, for instance, as far as prediction is concerned and as far as the coding of the prediction residual is concerned. Differences lie in the fact that encoder14chooses, by optimization, some coding options or coding parameters and signals within, or inserts into, datastream12the coding parameters which are then derived from the datastream12by decoder54so as to redo the prediction, subdivision and so forth.

FIG. 4shows a possible implementation of the decoder54ofFIG. 3, namely one fitting to the implementation of encoder14ofFIG. 1as shown inFIG. 2. As many elements of the encoder54ofFIG. 4are the same as those occurring in the corresponding encoder ofFIG. 2, the same reference signs, provided with an apostrophe, are used inFIG. 4in order to indicate these elements. In particular, adder42′, optional in-loop filter46′ and predictor44′ are connected into a prediction loop in the same manner that they are in encoder ofFIG. 2. The reconstructed, i.e. dequantized and retransformed prediction residual signal applied to adder42′ is derived by a sequence of entropy decoder56which inverses the entropy encoding of entropy encoder28b,followed by the residual signal reconstruction stage36′ which is composed of dequantizer38′ and inverse transformer40′ just as it is the case on encoding side. The decoder's output is the reconstruction of picture10. The reconstruction of picture10may be available directly at the output of adder42′ or, alternatively, at the output of in-loop filter46′. Some post-filter may be arranged at the decoder's output in order to subject the reconstruction of picture10to some post-filtering in order to improve the picture quality, but this option is not depicted inFIG. 4. Again, with respect toFIG. 4the description brought forward above with respect toFIG. 2shall be valid forFIG. 4as well with the exception that merely the encoder performs the optimization tasks and the associated decisions with respect to coding options. However, all the description with respect to block-subdivisioning, prediction, dequantization and retransforming is also valid for the decoder54ofFIG. 4.

Some non-limiting examples regarding ALWIP are herewith discussed, even if ALWIP is not necessary to embody the techniques discussed here.

The present application is concerned, inter alia, with an improved block-based prediction mode concept for block-wise picture coding such as usable in a video codec such as HEVC or any successor of HEVC. The prediction mode may be an intra prediction mode, but theoretically the concepts described herein may be transferred onto inter prediction modes as well where the reference samples are part of another picture.

A block-based prediction concept allowing for an efficient implementation such as a hardware friendly implementation is sought.

This object is achieved by the subject-matter of the independent claims of the present application.

Intra-prediction modes are widely used in picture and video coding. In video coding, intra-prediction modes compete with other prediction modes such as inter-prediction modes such as motion-compensated prediction modes. In intra-prediction modes, a current block is predicted on the basis of neighboring samples, i.e. samples already encoded as far as the encoder side is concerned, and already decoded as far as the decoder side is concerned. Neighboring sample values are extrapolated into the current block so as to form a prediction signal for the current block with the prediction residual being transmitted in the datastream for the current block. The better the prediction signal is, the lower the prediction residual is and, accordingly, a lower number of bits is needed to code the prediction residual.

In order to be effective, several aspects should be taken into account in order to form an effective frame work for intra-prediction in a block-wise picture coding environment. For instance, the larger the number of intra-prediction modes supported by the codec, the larger the side information rate consumption is in order to signal the selection to the decoder. On the other hand, the set of supported intra-prediction modes should be able to provide a good prediction signal, i.e. a prediction signal resulting in a low prediction residual.

In the following, there is disclosed—as a comparison embodiment or basis example—an apparatus (encoder or decoder) for block-wise decoding a picture from a data stream, the apparatus supporting at least one intra-prediction mode according to which the intra-prediction signal for a block of a predetermined size of the picture is determined by applying a first template of samples which neighbours the current block onto an affine linear predictor which, in the sequel, shall be called Affine Linear Weighted Intra Predictor (ALWIP).

The apparatus may have at least one of the following properties (the same may apply to a method or to another technique, e.g. implemented in a non-transitory storage unit storing instructions which, when executed by a processor, cause the processor to implement the method and/or to operate as the apparatus):

3.1 Predictors may be Complementary to other Predictors

The intra-prediction modes which might form the subject of the implementational improvements described further below may be complementary to other intra prediction modes of the codec. Thus, they may be complementary to the DC-, Planar-, or Angular-Prediction modes defined in the HEVC codec resp. the JEM reference software. The latter three types of intra-prediction modes shall be called conventional intra prediction modes from now on. Thus, for a given block in intra mode, a flag needs to be parsed by the decoder which indicates whether one of the intra-prediction modes supported by the apparatus is to be used or not.

3.2 More Than One Proposed Prediction Modes

The apparatus may contain more than one ALWIP mode. Thus, in case that the decoder knows that one of the ALWIP modes supported by the apparatus is to be used, the decoder needs to parse additional information that indicates which of the ALWIP modes supported by the apparatus is to be used.

The signalization of the mode supported may have the property that the coding of some ALWIP modes may involve less bins than other ALWIP modes. Which of these modes involve less bins and which modes involve more bins may either depend on information that can be extracted from the already decoded bitstream or may be fixed in advance.

4 SOME ASPECTS

FIG. 2shows the decoder54for decoding a picture from a data stream12. The decoder54may be configured to decode a predetermined block18of the picture. In particular, the predictor44may be configured for mapping a set of P neighboring samples neighboring the predetermined block18using a linear or affine linear transformation [e.g., ALWIP] onto a set of Q predicted values for samples of the predetermined block.

As shown inFIG. 5, a predetermined block18comprises Q values to be predicted (which, at the end of the operations, will be “predicted values”). If the block18has M row and N columns, Q=M□N. The Q values of the block18may be in the spatial domain (e.g., pixels) or in the transform domain (e.g., DCT, Discrete Wavelet Transform, etc.). The Q values of the block18may be predicted on the basis of P values taken from the neighboring blocks17a-17c,which are in general adjacent to the block18. The P values of the neighboring blocks17a-17cmay be in the closest positions (e.g., adjacent) to the block18. The P values of the neighboring blocks17a-17chave already been processed and predicted. The P values are indicated as values in portions17′a-17′c,to distinguish them from the blocks they are part of (in some examples,17′bis not used).

As shown inFIG. 6, in order to perform the prediction, it is possible to operate with a first vector17P with P entries (each entry being associated to a particular position in the neighboring portions17′a-17′c), a second vector18Q with Q entries (each entry being associated with a particular position in the block18), and a mapping matrix17M (each row being associated to a particular position in the block18, each column being associated to a particular position in the neighboring portions17′a-17′c). The mapping matrix17M therefore performs the prediction of the P values of the neighboring portions17′a-17′cinto values of the block18according to a predetermined mode. The entries in the mapping matrix17M may be therefore understood as weighting factors. In the following passages, we will refer to the neighboring portions of the boundary using the signs17a-17cinstead of17′a-17′c.

In the art there are known several conventional modes, such as DC mode, planar mode and 65 directional prediction modes. There may be known, for example, 67 modes.

However, it has been noted that it is also possible to make use of different modes, which are here called linear or affine linear transformations. The linear or affine linear transformation comprises P=Q weighting factors, among which at least ¼ P=Q weighting factors are non-zero weighting values, which comprise, for each of the Q predicted values, a series of P weighting factors relating to the respective predicted value. The series, when being arranged one below the other according to a raster scan order among the samples of the predetermined block, form an envelope which is omnidirectionally non-linear.

It is possible to map the P positions of the neighboring values17′a-17′c(template), the Q positions of the neighboring samples17′a-17′c,and at the values of the P*Q weighting factors of the matrix17M. A plane is an example of the envelope of the series for a DC transformation (which is a plane for the DC transformation). The envelope is evidently planar and therefore is excluded by the definition of the linear or affine linear transformation (ALWIP). Another example is a matrix resulting in an emulation of an angular mode: an envelope would be excluded from the ALWIP definition and would, frankly speaking, look like a hill leading obliquely from top to bottom along a direction in the P/Q plane. The planar mode and the 65 directional prediction modes would have different envelopes, which would however be linear in at least one direction, namely all directions for the exemplified DC, for example, and the hill direction for an angular mode, for example.

To the contrary, the envelope of the linear or affine transformation will not be omnidirectionally linear. It has been understood that such kind of transformation may be optimal, in some situations, for performing the prediction for the block18. It has been noted that it is advantageous that at least ¼ of the weighting factors are different from zero (i.e., at least the 25% of the P*Q weighting factors are different from 0).

The weighting factors may be unrelated with each other according to any regular mapping rule. Hence, a matrix17M may be such that the values of its entries have no apparent recognizable relationship. For example, the weighting factors cannot be described by any analytical or differential function.

In examples, an ALWIP transformation is such that a mean of maxima of cross correlations between a first series of weighting factors relating to the respective predicted value, and a second series of weighting factors relating to predicted values other than the respective predicted value, or a reversed version of the latter series, whatever leads to a higher maximum, may be lower than a predetermined threshold (e.g., 0.2 or 0.3 or 0.35 or 0.1, e.g., a threshold in a range between 0.05 and 0.035). For example, for each couple (i1,i2) of rows of the ALWIP matrix17M, a cross correlation may be calculated by multiplying the P values of the i1throw with by the P values of the i2throw. For each obtained cross correlation, the maximum value may be obtained. Hence, a mean (average) may be obtained for the whole matrix17M (i.e. the maxima of the cross correlations in all combinations are averaged). After that, the threshold may be e.g., 0.2 or 0.3 or 0.35 or 0.1, e.g., a threshold in a range between 0.05 and 0.035.

The P neighboring samples of blocks17a-17cmay be located along a one-dimensional path extending along a border (e.g.,18c,18a) of the predetermined block18. For each of the Q predicted values of the predetermined block18, the series of P weighting factors relating to the respective predicted value may be ordered in a manner traversing the one-dimensional path in a predetermined direction (e.g., from left to right, from top to down, etc.).

In examples, the ALWIP matrix17M may be non-diagonal or non-block diagonal.

(Here, {37, 59, 77, 28} is the first row; {32, 92, 85, 25} is the second row; and {61, 32, 54, 100} is the 16throw of the matrix17M.) Matrix17M has dimension 16×4 and includes 64 weighting factors (as a consequence of 16*4=64). This is because matrix17M has dimension Q×P, where Q=M*N, which is the number of samples of the block18to be predicted (block18is a 4×4 block), and P is the number of samples of the already predicted samples. Here, M=4, N=4, Q=16 (as a consequence of M*N=4*4=16), P=4. The matrix is non-diagonal and non-block diagonal, and is not described by a particular rule.

As can be seen, less than ¼ of the weighting factors are 0 (in the case of the matrix shown above, one weighting factor out of sixty-four is zero). The envelope formed by these values, when arranged one below the other one according to a raster scan order, form an envelope which is omnidirectionally non-linear.

Even if the explanation above is mainly discussed with reference to a decoder (e.g., the decoder54), the same may be performed at the encoder (e.g., encoder14).

In some examples, for each block size (in the set of block sizes), the ALWIP transformations of intra-prediction modes within the second set of intra-prediction modes for the respective block size are mutually different. In addition, or alternatively, a cardinality of the second set of intra-prediction modes for the block sizes in the set of block sizes may coincide, but the associated linear or affine linear transformations of intra-prediction modes within the second set of intra-prediction modes for different block sizes may be non-transferable onto each other by scaling.

In some examples the ALWIP transformations may be defined in such a way that they have “nothing to share” with conventional transformations (e.g., the ALWIP transformations may have “nothing” to share with the corresponding conventional transformations, even though they have been mapped via one of the mappings above).

In examples, ALWIP modes are used for both luma components and chroma components, but in other examples ALWIP modes are used for luma components but are not used for chroma components.

5 AFFINE LINEAR WEIGHTED INTRA PREDICTION MODES WITH ENCODER SPEEDUP (E.G., TEST CE3-1.2.1)

5.1 Description of a Method or Apparatus

Affine linear weighted intra prediction (ALWIP) modes tested in CE3-1.2.1 may be the same as proposed in JVET-L0199under test CE3-2.2.2, except for the following changes:Harmonization with multiple reference line (MRL) intra prediction, especially encoder estimation and signaling, i.e. MRL is not combined with ALWIP and transmitting an MRL index is restricted to non-ALWIP blocks.Subsampling now mandatory for all blocks W×H≥32×32 (was optional for 32×32 before); therefore, the additional test at the encoder and sending the subsampling flag has been removed.ALWIP for 64×N and N×64 blocks (with N≤32) has been added by downsampling to 32×N and N×32, respectively, and applying the corresponding ALWIP modes.

Moreover, test CE3-1.2.1 includes the following encoder optimizations for ALWIP:Combined mode estimation: conventional and ALWIP modes use a shared Hadamard candidate list for full RD estimation, i.e. the ALWIP mode candidates are added to the same list as the conventional (and MRL) mode candidates based on the Hadamard cost.EMT intra fast and PB intra fast are supported for the combined mode list, with additional optimizations for reducing the number of full RD checks.Only MPMs of available left and above blocks are added to the list for full RD estimation for ALWIP, following the same approach as for conventional modes.

5.2 Complexity Assessment

In Test CE3-1.2.1, excluding computations invoking the Discrete Cosine Transform, at most 12 multiplications per sample were needed to generate the prediction signals. Moreover, a total number of 136 492 parameters, each in 16 bits, were needed. This corresponds to 0.273 Megabyte of memory.

5.3 Experimental Results

Evaluation of the test was performed according to the common test conditions JVET-J1010 [2], for the intra-only (Al) and random-access (RA) configurations with the VTM software version 3.0.1. The corresponding simulations were conducted on an Intel Xeon cluster (E5-2697A v4, AVX2 on, turbo boost off) with Linux OS and GCC 7.2.1 compiler.

5.4 Affine Linear Weighted Intra Prediction with Complexity Reduction (e.g. Test CE3-1.2.2)

The technique tested in CE2 is related to “Affine Linear Intra Predictions” described in JVET-L0199 [1], but simplifies it in terms of memory requirements and computational complexity:There may be only three different sets of prediction matrices (e.g. S0, S1, S2, see also below) and bias vectors (e.g. for providing offset values) covering all block shapes. As a consequence, the number of paramters is reduced to 14400 10-bit values, which is less memory than stored in a 128×128 CTU .The input and output size of the predictors is further reduced. Moreover, instead of transforming the boundary via DCT, averaging or downsampling may be performed to the boundary samples and the generation of the prediction signal may use linear interpolation instead of the inverse DCT. Consequently, a maximum of four multiplications per sample may be needed for generating the prediction signal.

It is here discussed how to perform some predictions (e.g., as shown inFIG. 6) with ALWIP predictions.

In principle, with reference toFIG. 6, in order to obtain the Q=M*N values of a M×N block18to be predicted, multiplications of the Q*P samples of the Q×P ALWIP prediction matrix17M by the P samples of the P×1 neighboring vector17P should be performed. Hence, in general, in order to obtain each of the Q=M*N values of the M×N block18to be predicted, at least P=M+N value multiplications are needed.

These multiplications have extremely unwanted effects. The dimension P of the boundary vector17P is in general dependent on the number M+N of boundary samples (bins or pixels)17a,17cneighbouring (e.g. adjacent to) the M×N block18to be predicted. This means that, if the size of block18to be predicted is large, the number M+N of boundary pixels (17a,17c) is accordingly large, hence increasing the dimension P=M+N of the P×1 boundary vector17P, and the length of each row of the Q×P ALWIP prediction matrix17M, and accordingly, also the numbers of multiplications needed (in general terms, Q=M*N=W*H, where W (Width) is another symbol for N and H (Height) is another symbol for M; P, in the case that the boundary vector is only formed by one row and/or one column of samples, is P=M+N=H+W).

This problem is, in general, exacerbated by the fact that in microprocessor-based systems (or other digital processing systems), multiplications are, in general, power-consuming operations. It may be imagined that a large number of multiplications carried for an extremely high number of samples for a large number of blocks causes a waste of computational power, which is in general unwanted.

Accordingly, it would be advantageous to reduce the number Q*P of multiplications needed for predicting the M×N block18.

It has been understood that it is possible to somehow reduce the computational power needed for each intra-prediction of each block18to be predicted by intelligently choosing operations alternative to multiplications and which are easier to be processed.

In particular, with reference toFIGS. 7.1-7.4, it has been understood that an encoder or decoder may predict a predetermined block (e.g.18) of the picture using a plurality of neighbouring samples (e.g.17a,17c), byreducing (e.g. at step811), (e.g. by averaging or downsampling), the plurality of neighbouring samples (e.g.17a,17c) to obtain a reduced set of samples values lower, in number of samples, than compared to the plurality of neighbouring samples,subjecting (e.g. at step812) the reduced set of sample values to a linear or affine linear transformation to obtain predicted values for predetermined samples of the predetermined block.

In some cases, the decoder or encoder may also derive, e.g. by interpolation, prediction values for further samples of the predetermined block on the basis of the predicted values for the predetermined samples and the plurality of neighboring samples. Accordingly, an upsampling strategy may be obtained.

In examples, it is possible to perform (e.g. at step811) some averages on the samples of the boundary17, so as to arrive at a reduced set102(FIGS. 7.1-7.4) of samples with a reduced number of samples (at least one of the samples of the reduced number of samples102may be the average of two samples of the original boundary samples, or a selection of the original boundary samples). For example, if the original boundary has P=M+N samples, the reduced set of samples may have Pred=Mred+Nred, with at least one of Mred<M and Nred<N, so that Pred<P. Hence, the boundary vector17P which will be actually used for the prediction (e.g. at step812b) will not have P×1 entries, but Pred×1 entries, with Pred<P. Analogously, the ALWIP prediction matrix17M chosen for the prediction will not have Q×P dimension, but Q×Pred(or Qred×Pred, see below) with a reduced number of elements of the matrix at least because Pred<P (by virtue of at least one of Mred<M and Nred<N).

In some examples (e.g.FIGS. 7.2, 7.3), it is even possible to further reduce the number of multiplications, if the block obtained by ALWIP (at step812) is a reduced block having size M′red×N′red, with M′red<M and/or N′red<N (i.e. the samples directly predicted by ALWIP are less in number than the samples of the block18to be actually predicted). Thus, setting Qred=M′red*N′red, this will bring to obtain an ALWIP prediction by using, instead of Q*Predmultiplications, Qred*Predmultiplications (with Qred*Pred<Q*Pred<Q*P). This multiplication will predict a reduced block, with dimension M′red×N′red. It will be notwithstanding possible to perform (e.g. at a subsequent step813) an upsampling (e.g., obtained by interpolation) from the reduced M′red×N′redpredicted block into the final M×N predicted block.

These techniques may be advantageous since, while the matrix multiplication involves a reduced number (Qred*Predor Q*Pred) of multiplications, both the initial reducing (e.g., averaging or downsampling) and the final transformation (e.g. interpolation) may be performed by reducing (or even avoiding) multiplications. For example, downsampling, averaging and/or interpolating may be performed (e.g. at steps811and/or813) by adopting non-computationally-power-demanding binary operations such as additions and shifting.

Also, the addition is an extremely easy operation which can be easily performed without much computational effort.

This shifting operation may be used, for example, for averaging two boundary samples and/or for interpolating two samples (support values) of the reduced predicted block (or taken from the boundary), to obtain the final predicted block. (For interpolation two sample values are needed. Within the block we have two predetermined values, but for interpolating the samples along the left and above border of the block we only have one predetermined value, as inFIG. 7.2, therefore we use a boundary sample as a support value for interpolation.)

A two-step procedure may be used, such as:first summing the values of the two samples;then halving (e.g., by right-shifting) the value of the sum.

Alternatively, it is possible to:first halving (e.g., by left-shifting) the each of the samples;then summing the values of the two halved samples.

Even easier operations may be performed when downsampling (e.g., at step811), as it is only needed to select one sample amount a group of samples (e.g., samples adjacent to each other).

Hence, it is now possible to define technique(s) for reducing the number of multiplications to be performed. Some of these techniques may be based, inter alia, on at least one of the following principles:Even if the block18to be actually predicted has size M×N, block may be reduced (in at least one of the two dimensions) and an ALWIP matrix with reduced size Qred×Predwith Qred=M′red*N′red. Pred=Nred+Mred, with M′red<M and/or N′red<N and/or Mred<M and/or Nred<N) may be applied. Hence, the boundary vector17P will have size Pred×1, implying only Pred<P multiplications (with Pred=Mred+Nredand P=M+N). The Pred×1 boundary vector17P may be obtained easily from the original boundary17, e.g.:By downsampling (e.g. by choosing only some samples of the boundary); and/orBy averaging multiple samples of the boundary (which may be easily obtained by addition and shifting, without multiplications).In addition or alternatively, instead of predicting by multiplication all the Q=M*N values of the block18to be predicted, it is possible to only predict a reduced block with reduced dimensions (e.g., Qred=M′red*N′redwith M′red<M and/or N′red<N). The remaining samples of the block18to be predicted will be obtained by interpolation, e.g. using the Qredsamples as support values for the remaining Q−Qredvalues to be predicted.

According to an example illustrated inFIG. 7.1, a 4×4 block18(M=4, N=4, Q=M*N=16) is to be predicted and a neighborhood17of samples17a(a vertical row column with four already-predicted samples) and17c(a horizontal row with four already-predicted samples) have already been predicted at previous iterations (the neighborhoods17aand17cmay be collectively indicated with17). A priori, by using the equation shown inFIG. 6, the prediction matrix17M should be a Q×P=16×8 matrix (by virtue of Q=M*N=4*4 and P=M+N=4+4=8), and the boundary vector17P should have 8×1 dimension (by virtue of P=8). However, this would drive to the necessity of performing 8 multiplications for each of the 16 samples of the 4×4 block18to be predicted, hence leading to the necessity of performing 16*8=128 multiplications in total. (It is noted that the average number of multiplications per sample is a good assessment of the computational complexity. For conventional intra-predictions, four multiplications per sample are needed and this increases the computational effort to be involved. Hence, it is possible to use this as an upper limit for ALWIP would ensures that the complexity is reasonable and does not exceed the complexity of conventional intra prediction.)

Notwithstanding, it has been understood that, by using the present technique, it is possible to reduce, at step811, the number of samples17aand17cneighboring the block18to be predicted from P to Pred<P. In particular, it has been understood that it is possible to average (e.g. at 100 inFIG. 7.1) boundary samples (17a,17c) which are adjacent to each other, to obtain a reduced boundary102with two horizontal rows and two vertical columns, hence operating as the block18were a 2×2 block (the reduced boundary being formed by averaged values). Alternatively, it is possible to perform a downsampling, hence selecting two samples for the row17cand two samples for the column17a.Hence, the horizontal row17c,instead of having the four original samples, is processed as having two samples (e.g. averaged samples), while the vertical column17a,originally having four samples, is processed as having two samples (e.g. averaged samples). It is also possible to understand that, after having subdivided the row17cand the column17ain groups110of two samples each, one single sample is maintained (e.g., the average of the samples of the group110or a simple choice among the samples of the group110). Accordingly, a so-called reduced set102of sample values is obtained, by virtue of the set102having only four samples (Mred=2, Nred=2, Pred=Mred+Nred=4, with Pred<P).

It has been understood that it is possible to perform operations (such as the averaging or downsampling100) without carrying out too many multiplications at the processor-level: the averaging or downsampling100performed at step811may be simply obtained by the straightforward and computationally-non-power-consuming operations such as additions and shifts.

It has been understood that, at this point, it is possible to subject the reduced set of sample values102to a linear or affine linear (ALWIP) transformation19(e.g., using a prediction matrix such as the matrix17M ofFIG. 6). In this case, the ALWIP transformation19directly maps the four samples102onto the sample values104of the block18. No interpolation is needed in the present case.

In this case, the ALWIP matrix17M has dimension Q×Pred=16×4: this follows the fact that all the Q=16 samples of the block18to be predicted are directly obtained by ALWIP multiplication (no interpolation needed).

Hence, at step812a,a suitable ALWIP matrix17M with dimension Q×Predis selected. The selection may at least partially be based, for example, on signalling from the datastream12. The selected ALWIP matrix17M may also be indicated with Ak, where k may be understood as an index, which may be signalled in the datastream12(in some cases the matrix is also indicated as Aidxm, see below). The selection may be performed according to the following scheme: for each dimension (e.g., pair of height/width of the block18to be predicted), an ALWIP matrix17M is chosen among, for example, one of the three sets of matrixes S0, S1, S2(each of the three sets S0, S1, S2may group a plurality of ALWIP matrixes17M of the same dimensions, and the ALWIP matrix to be chosen for the prediction will be one of them).

At step812b,a multiplication between the selected Q×PredALWIP matrix17M (also indicated as Ak) and the Pred×1 boundary vector17P is performed.

At step812c,an offset value (e.g., bk) may be added, e.g. to all the obtained values104of the vector18Q obtained by ALWIP. The value of the offset (bkor in some cases also indicated with b1,2,3i, see below) may be associated to the particular selected ALWIP matrix (Ak), and may be based on an index (e.g., which may be signalled in the datastream12).

Hence, a comparison between using the present technique and non-using the present technique is here resumed:Without the present technique:Block18to be predicted, the block having dimensions M=4, N=4;Q=M*N=4*4=16 values to be predicted;P=M+N=4+4=8 boundary samplesP=8 multiplications for each of the Q=16 values to be predicted,a total number of P*Q=8*16=128 multiplications;With the present technique, we have:Block18to be predicted, the block having dimensions M=4, N=4;Q=M*N=4*4=16 values to be predicted at the end;Reduced dimension of the boundary vector: Pred=Pred+Mred+Nred=2+2=4;Pred=4 multiplications for each of the Q=16 values to be predicted by ALWIP,a total number of Pred*Q=4*16=64 multiplications (the half of 128!)the ratio between the number of multiplications and the number of final values to be obtained and is red Pred*Q/Q=4, i.e. the half than the P=8 multiplications for each sample to be predicted!

As can be understood, by relying on straightforward and computationally-non-power-demanding operations such as averaging (and, in case, additions and/or shifts and/or downsampling) it is possible to obtain an appropriate value at step812.

With reference toFIG. 7.2, the block18to be predicted is here an 8×8 block (M=8, N=8) of 64 samples. Here, a priori, a prediction matrix17M should have size Q×P=64×16 (Q=64 by virtue of Q=M*N=8*8=64, M=8 and N=8 and by virtue of P=M+N=8+8=16). Hence, a priori, there would be needed P=16 multiplications for each of the Q=64 samples of the 8×8 block18to be predicted, to arrive at 64*16=1024 multiplications for the whole 8×8 block18!

However, as can be seen inFIG. 7.2, there can be provided a method820according to which, instead of using all the 16 samples of the boundary, only 8 values (e.g., 4 in the horizontal boundary row17cand 4 in the vertical boundary column17abetween original samples of the boundary) are used. From the boundary row17c,4 samples may be used instead of 8 (e.g., they may be two-by-two averages and/or selections of one sample out of two). Accordingly, the boundary vector is not a P×1=16×1 vector, but a Pred×1=8×1 vector only (Pred=Mred+Nred=4+4). It has been understood that it is possible to select or average (e.g., two by two) samples of the horizontal row17cand samples of the vertical columns17ato have, instead of the original P=16 samples, only Pred=8 boundary values, forming the reduced set102of sample values. This reduced set102will permit to obtain a reduced version of block18, the reduced version having Qred=Mred*Nred=4*4=16 samples (instead of Q=M*N=8*8=64). It is possible to apply an ALWIP matrix for predicting a block having size Mred×Nred=4×4. The reduced version of block18includes the samples indicated with grey in the scheme106inFIG. 7.2: the samples indicated with grey squared (including samples118′ and118″) form a 4×4 reduced block with Qred=16 values obtained at the step of subjecting812. The 4×4 reduced block has been obtained by applying the linear transformation19at the step of subjecting812. After having obtain the values of the 4×4 reduced block, it is possible to obtain the values of the remaining samples (samples indicated with white samples in the scheme106) for example by interpolation.

In respect to method810ofFIG. 7.1, this method820may additionally include a step813of deriving, e.g. by interpolation, prediction values for the remaining Q−Qred=64−16=48 samples (white squares) of the M×N=8×8 block18to be predicted. The remaining Q−Qred=64−16=48 samples may be obtained from the Qred=16 directly obtained samples by interpolation (the interpolation may also make use of values of the boundary samples, for example). As can be seen inFIG. 7.2, while the samples118′ and118″ have been obtained at step812(as indicated by the grey square), the sample108′ (intermediate to the samples118′ and118″ and indicated with white square) is obtained by interpolation between the sample118′ and118″ at step813. It has been understood that interpolations may also be obtained by operations similar to those for averaging such as shifting and adding. Hence, inFIG. 7.2, the value108′ may in general be determined as a value intermediate between the value of the sample118′ and the value of the sample118″ (it may be the average).

By performing interpolations, at step813it is also possible to arrive at the final version of the M×N=8×8 block18based on multiple sample values indicated in104.

Hence, a comparison between using the present technique and non-using it is:Without the present technique:Block18to be predicted, the block having dimensions M=8, N=8 andQ=M*N=8*8=64 samples in the block18to be predicted;P=M+N=8+8=16 samples in the boundary17;P=16 multiplications for each of the Q=64 values to be predicted,a total number of P*Q=16*64=1028 multiplicationsthe ratio between the number of multiplications and the number of final values to be obtained is P*Q/Q=16With the present technique:Block18to be predicted, having dimensions M=8, N=8Q=M*N=8*8=64 values to be predicted at the end;but an Qred×PredALWIP matrix to be used, with Pred=Mred+Nred, Qred=Mred*Nred, Mred=4, Nred=4Pred=Mred+Nred=4+4=8 samples in the boundary, with Pred<PPred=8 multiplications for each of the Qred=16 values of the 4×4 reduced block to be predicted (formed by grey squares in scheme106),a total number of Pred*Qred=8*16=128 multiplications (much less than 1024!)the ratio between the number of multiplications and the number of final values to be obtained is Pred*Qred/Q=128/64=2 (much less than the 16 obtained without the present technique!).

Accordingly, the herewith presented technique is 8 times less power-demanding than the previous one.

FIG. 7.3shows another example (which may be based on the method820), in which the block18to be predicted is a rectangular 4×8 block (M=8, N=4) with Q=4*8=32 samples to be predicted. The boundary17is formed by the horizontal row17cwith N=8 samples and the vertical column17awith M=4 samples. Hence, a priori, the boundary vector17P would have dimension P×1=12×1, while the prediction ALWIP matrix should be a Q×P=32×12 matrix, hence causing the need of Q*P=32*12=384 multiplications.

However, it is possible, for example, to average or downsample at least the 8 samples of the horizontal row17c,to obtain a reduced horizontal row with only 4 samples (e.g., averaged samples). In some examples, the vertical column17awould remain as it is (e.g. without averaging). In total, the reduced boundary would have dimension Pred=8, with Pred<P. Accordingly, the boundary vector17P will have dimension Pred×1=8×1. The ALWIP prediction matrix17M will be a matrix with dimensions M*Nred*Pred=4*4*8=64. The 4×4 reduced block (formed by the grey columns in the schema107), directly obtained at the subjecting step812, will have size Qred=M*Nred=4*4=16 samples (instead of the Q=4*8=32 of the original 4×8 block18to be predicted). Once the reduced 4×4 block is obtained by ALWIP, it is possible to add an offset value bk(step812c) and to perform interpolations at step813. As can be seen at step813inFIG. 7.3, the reduced 4×4 block is expanded to the 4×8 block18, where the values108′, non-obtained at step812, are obtained at step813by interpolating the values118′ and118″ (grey squares) obtained at step812.

Hence, a comparison between using the present technique and non-using it is:Without the present technique:Block18to be predicted, the block having dimensions M=4, N=8Q=M*N=4*8=32 values to be predicted;P=M+N=4+8=12 samples in the boundary;P=12 multiplications for each of the Q=32 values to be predicted,a total number of P*Q=12*32=384 multiplicationsthe ratio between the number of multiplications and the number of final values to be obtained is P*Q/Q=12With the present technique:Block18to be predicted, the block having dimensions M=4, N=8Q=M*N=4*8=32 values to be predicted at the end;but a Qred×Pred=16×8 ALWIP matrix ca be used, with M=4, Nred=4, Qred=M*Nred=16, Pred=M+Nred=4+4=8Pred=M+Nred=4+4=8 samples in the boundary, with Pred<PPred=8 multiplications for each of the Qred=16 values of the reduced block to be predicted,a total number of Qred*Pred=16*8=128 multiplications (less than 384!)the ratio between the number of multiplications and the number of final values to be obtained is Pred*Qred=128/32=4 (much less than the 12 obtained without the present technique!).

Hence, with the present technique, the computational effort is reduced to one third.

FIG. 7.4shows a case of a block18to be predicted with dimensions M×N=16×16 and having Q=M*N=16*16=256 values to be predicted at the end, with P=M+N=16+16=32 boundary samples. This would lead to a prediction matrix with dimensions Q×P=256×32, which would imply 256*32=8192 multiplications!

However, by applying the method820, it is possible, at step811, to reduce (e.g. by averaging or downsampling) the number of boundary samples, e.g., from 32 to 8: for example, for every group120of four consecutive samples of the row17a,one single sample (e.g., selected among the four samples, or the average of the samples) remains. Also for every group of four consecutive samples of the column17c,one single sample (e.g., selected among the four samples, or the average of the samples) remains.

Here, the ALWIP matrix17M is a Qred×Pred=64×8 matrix: this comes from the fact that it has been chosen Pred=8 (by using 8 averaged or selected samples from the 32 ones of the boundary) and by the fact that the reduced block to be predicted at step812is an 8×8 block (in the scheme109, the grey squares are 64).

Hence, once the 64 samples of the reduced 8×8 block are obtained at step812, it is possible to derive, at step813, the remaining Q−Qred=256−64=192 values104of the block18to be predicted.

In this case, in order to perform the interpolations, it has been chosen to use all the samples of the boundary column17aand only alternate samples in the boundary row17c.other choices may be made.

While with the present method the ratio between the number of multiplications and the number of finally obtained values is Qred*Pred/Q=8*64/256=2, which is much less than the 32 multiplications for each value without the present technique!

A comparison between using the present technique and non-using it is:Without the present technique:Block18to be predicted, the block having dimensions M=16, N=16Q=M*N=16*16=256 values to be predicted;P=M+N=16*16=32 samples in the boundary;P=32 multiplications for each of the Q=256 values to be predicted,a total number of P*Q=32*256=8192 multiplications;the ratio between the number of multiplications and the number of final values to be obtained is P*Q/Q=32With the present technique:Block18to be predicted, the block having dimensions M=16, N=16Q=M*N=16*16=256 values to be predicted at the end;but a Qred×Pred=64×8 ALWIP matrix to be used, with Mred=4, Nred=4, Qred=8*8=64 samples to be predicted by ALWIP, Pred=Mred+Nred=4+4=8Pred=Mred+Nred=4+4=8 samples in the boundary, with Pred<PPred=8 multiplications for each of the Qred=64 values of the reduced block to be predicted,a total number of Qred*Pred=64*4=256 multiplications (less than 8192!)the ratio between the number of multiplications and the number of final values to be obtained is Pred*Qred/Q=8*64/256=2 (much less than the 32 obtained without the present technique!).

Accordingly, the computational power needed by the present technique is 16 times less than the traditional technique!

Therefore, it is possible to predict a predetermined block (18) of the picture using a plurality of neighbouring samples (17) byreducing (100,813) the plurality of neighbouring samples to obtain a reduced set (102) of samples values lower, in number of samples, than compared to the plurality of neighbouring samples (17),subjecting (812) the reduced set of sample values (102) to a linear or affine linear transformation (19,17M) to obtain predicted values for predetermined samples (104,118′,188″) of the predetermined block (18).

In particular, it is possible to perform the reducing (100,813) by downsampling the plurality of neighbouring samples to obtain the reduced set (102) of samples values lower, in number of samples, than compared to the plurality of neighbouring samples (17).

Alternatively, it is possible to perform the reducing (100,813) by averaging the plurality of neighbouring samples to obtain the reduced set (102) of samples values lower, in number of samples, than compared to the plurality of neighbouring samples (17).

Further, it is possible to derive (813), by interpolation, prediction values for further samples (108,108′) of the predetermined block (18) on the basis of the predicted values for the predetermined samples (104,118′,118″) and the plurality of neighbouring samples (17).

The plurality of neighbouring samples (17a,17c) may extend one-dimensionally along two sides (e.g. towards right and toward below inFIGS. 7.1-7.4) of the predetermined block (18). The predetermined samples (e.g. those which are obtained by ALWIP in step812) may also be arranged in rows and columns and, along at least one of the rows and columns, the predetermined samples may be positioned at every nthposition from a sample (112) of the predetermined sample112adjoining the two sides of the predetermined block18.

Based on the plurality of neighbouring samples (17), it is possible to determine for each of the at least one of the rows and the columns, a support value (118) for one (118) of the plurality of neighbouring positions, which is aligned to the respective one of the at least one of the rows and the columns. It is also possible to derive, by interpolation, the prediction values118for the further samples (108,108′) of the predetermined block (18) on the basis of the predicted values for the predetermined samples (104,118′,118″) and the support values for the neighbouring samples (118) aligned to the at least one of rows and columns.

The predetermined samples (104) may be positioned at every nthposition from the sample (112) which adjoins the two sides of the predetermined block18along the rows and the predetermined samples are positioned at every mthposition from the sample (112) of the predetermined sample which (112) adjoins the two sides of the predetermined block (18) along the columns, wherein n, m>1. In some cases, n=m (e.g., inFIGS. 7.2 and 7.3, where the samples104,118′,118″, directly obtained by ALWIP at812and indicated with grey squares, are alternated, along rows and columns, to the samples108,108′ subsequently obtained at step813).

Along at least one of the rows (17c) and columns (17a), it may be possible to perform the determining the support values e.g. by downsampling or averaging (122), for each support value, a group (120) of neighbouring samples within the plurality of neighbouring samples which includes the neighbouring sample (118) for which the respective support value is determined. Hence, inFIG. 7.4, at step813it is possible to obtain the value of sample119by using the values of the predetermined sample118′″(previously obtained at step812) and the neighbouring sample118as support values.

The plurality of neighbouring samples may extend one-dimensionally along two sides of the predetermined block (18). It may be possible to perform the reduction (811) by grouping the plurality of neighbouring samples (17) into groups (110) of one or more consecutive neighbouring samples and performing a downsampling or an averaging on each of the group (110) of one or more neighbouring samples which has two or more than two neighbouring samples.

In examples, the linear or affine linear transformation may comprise Pred*Qredor Pred*Q weighting factors with Predbeing the number of sample values (102) within the reduced set of sample values and Qredor Q is the number predetermined samples within the predetermined block (18). At least ¼ Pred*Qredor ¼ Pred*Q weighting factors are non-zero weighting values. The Pred*Qredor Pred*Q weighting factors may comprise, for each of the Q or Qredpredetermined samples, a series of Predweighting factors relating to the respective predetermined sample, wherein the series, when being arranged one below the other according to a raster scan order among the predetermined samples of the predetermined block (18), form an envelope which is omnidirectionally non-linear. The Pred*Q or Pred*Qredweighting factors may be unrelated to each other via any regular mapping rule. A mean of maxima of cross correlations between a first series of weighting factors relating to the respective predetermined sample, and a second series of weighting factors relating to predetermined samples other than the respective predetermined sample, or a reversed version of the latter series, whatever leads to a higher maximum, is lower than a predetermined threshold. The predetermined threshold may 0.3 [or in some cases 0.2 or 0.1]. The Predneighbouring samples (17) may be located along a one-dimensional path extending along two sides of the predetermined block (18) and, for each of the Q or Qredpredetermined samples, the series of Predweighting factors relating to the respective predetermined sample are ordered in a manner traversing the one-dimensional path in a predetermined direction.

6.1 Description of a Method and Apparatus

For predicting the samples of a rectangular block of width W (also indicated with N) and height H (also indicated with M), Affine-linear weighted intra prediction (ALWIP) may take 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 may be generated as it is done in the conventional intra prediction.

A generation of the prediction signal (e.g., the values for the complete block18) may be based on at least some of the following three steps:1. Out of the boundary samples17, samples102(e.g., four samples in the case of W=H=4 and/or eight samples in other case) may be extracted by averaging or downsampling (e.g., step811).2. A matrix vector multiplication, followed by addition of an offset, may be carried out with the averaged samples (or the samples remaining from downsampling) as an input. The result may be a reduced prediction signal on a subsampled set of samples in the original block (e.g., step812).3. The prediction signal at the remaining position may be generated, e.g. by upsampling, from the prediction signal on the subsampled set, e.g., by linear interpolation (e.g., step813).

Thanks to steps 1. (811) and/or 3. (813), the total number of multiplications needed in the computation of the matrix-vector product may be such that it is smaller or equal than 4*W*H.

Moreover, the averaging operations on the boundary and the linear interpolation of the reduced prediction signal are carried out by solely using additions and bit-shifts. In other words, in examples at most four multiplications per sample are needed for the ALWIP modes.

In some examples, the matrices (e.g.,17M) and offset vectors (e.g., bk) needed to generate the prediction signal may be taken from sets (e.g., three sets), e.g., S0, S1, S2, of matrices which may be stored, for example, in storage unit(s) of the decoder and of the encoder.

In some examples, the set S0may comprise (e.g., consist of) n0(e.g., n0=16 or n0=18 or another number) matrices A0i, i∈{0, . . . , n0-1} each of which may have 16 rows and 4 columns and 18 offset vectors b0i, i∈{0, . . . , n0-1} each of size 16 to perform the technique according toFIG. 7.1. Matrices and offset vectors of this set are used for blocks18of size 4×4. Once the boundary vector has been reduced to a Pred=4 vector (as for step811ofFIG. 7.1), it is possible to map the Pred=4 samples of the reduced set of samples102directly into the Q=16 samples of the 4×4 block18to be predicted.

In some examples, the set S1may comprise (e.g., consist of) n1(e.g., n1=8 or n1=18 or another number) matrices A1i, i∈{0, . . . , n1-1}, each of which may have 16 rows and 8 columns and 18 offset vectors b1i, i∈{0, . . . , n1-1} each of size 16 to perform the technique according toFIG. 7.2 or 7.3. Matrices and offset vectors of this set Si may be used for blocks of sizes 4×8, 4×16, 4×32, 4×64, 16×4, 32×4, 64×4, 8×4 and 8×8. Additionally, it may also be used for blocks of size W×H with max(W, H)>4 and min(W, H)=4, i.e. for blocks of size 4×16 or 16×4, 4×32 or 32×4 and 4×64 or 64×4. The 16×8 matrix refers to the reduced version of the block18, which is a 4×4 block, as obtained inFIGS. 7.2 and 7.3.

Additionally or alternatively, the set S2may comprise (e.g., consists of) n2(e.g., n2=6 or n2=18 or another number) matrices A2i, i∈{0, . . . , n2-1}, each of which may have 64 rows and 8 columns and of 18 offset vectors b2i, i∈{0, . . . , n2-1} of size 64. The 64×8 matrix refers to the reduced version of the block18, which is an 8×8 block, e.g. as obtained inFIG. 7.4. Matrices and offset vectors of this set may be used for blocks of sizes 8×16, 8×32, 8×64, 16×8, 16×16, 16×32, 16×64, 32×8, 32×16, 32×32, 32×64, 64×8, 64×16, 64×32, 64×64.

Matrices and offset vectors of that set or parts of these matrices and offset vectors may be used for all other block-shapes.

6.2 Averaging or Downsampling of the Boundary

Here, features are provided regarding step811.

As explained above, the boundary samples (17a,17c) may be averaged and/or downsampled (e.g., from P samples to Pred<P samples).

In a first step, the input boundaries bdrytop(e.g.,17c) and bdryleft(e.g.,17a) may be reduced to smaller boundaries bdryredtopand bdryredleftto arrive at the reduced set102. Here, bdryredtopand bdryredleftboth consists of 2 samples in the case of a 4×4-block and both consist of 4 samples in other cases.

In the case of a 4×4-block, it is possible to define

In all other cases (e.g., for blocks of wither width or height different from 4), if the block-width W is given as W=4*2k, for 0≤i<4 one defines

and defines bdryredleftanalogously.

In still other cases, it is possible to downsample the boundary (e.g., by selecting one particular boundary sample from a group of boundary samples) to arrive at a reduce number of samples. For example, bdryredtop[0] may be chosen among bdrytop[0] and bdrytop[1], and bdrytop[1] may be chosen among bdrytop[2] and bdrytop[3]. It is also possible to define bdryredleftanalogously.

The two reduced boundaries bdryredtopand bdryredleftmay be concatenated to a reduced boundary vector bdryred(associated to the reduced set102), also indicated with17P. The reduced boundary vector bdryredmay be thus of size four red (Pred=4) for blocks of shape 4×4 (example ofFIG. 7.1) and of size eight (Pred=8) for blocks of all other shapes (examples ofFIG. 7.2-7.4).

Here, if mode<18 (or the number of matrixes in the set of matrixes), it is possible to define

If mode >18, which corresponds to the transposed mode of mode −17, it is possible to define

Hence, according to a particular state (one state: mode<18; one other state: mode≥18) it is possible to distribute the predicted values of the output vector along a different scan order (e.g., one scan order: [bdryredtop, bdryredleft]; one other scan order: [bdryredleft, bdryredtop]).

Other strategies may be carried out. In other examples, the mode index ‘mode’ is not necessarily in the range 0 to 35 (other ranges may be defined). Further, it is not necessary that each of the three sets S0, S1, S2has 18 matrices (hence, instead of expressions like mode18, it is possible to mode≥n0, n1, n2, which are the number of matrixes for each set of matrixes S0, S1, S2respectively). Further, the sets may have different numbers of matrixes each (for example, it may be that S0has 16 matrixes S1has eight matrixes, and S2has six matrixes).

The mode and transposed information are not necessarily stored and/or transmitted as one combined mode index ‘mode’: in some examples there is the possibility of signalling explicitly as a transposed flag and the matrix index (0-15 for S0, 0-7 for S1and 0-5 for S2).

In some cases, the combination of the transposed flag and matrix index may be interpreted as a set index. For example, there may be one bit operating as transposed flag, and some bits indicating the matrix index, collectively indicated as “set index”.

5.4 Generation of the Reduced Prediction Signal by Matrix Vector Multiplication

Here, features are provided regarding step812.

Out of the reduced input vector bdryred(boundary vector17P) one may generate a reduced prediction signal predred. The latter signal may be a signal on the downsampled block of with Wredand height Hred. Here, Wredand Hredmay be defined as:

The reduced prediction signal predredmay be computed by calculating a matrix vector-product and adding an offset:

Here, A is a matrix (e.g., prediction matrix17M) that may have Wred*Hredrows and 4 columns if W=H=4 and 8 columns in all other cases and b is a vector that may be of size Wred*Hred.

If W=H=4, then A may have 4 columns and 16 rows and thus 4 multiplications per sample may be needed in that case to compute predred. In all other cases, A may have 8 columns and one may verify that in these cases one has 8*Wred*Hred4*W*H, i.e. also in these cases, at most 4 multiplications per sample are needed to compute predred.

The matrix A and the vector b may be taken from one of the sets S0, S1, S2as follows. One defines an index idx=idx(W, H) by setting idx(W, H)=0, if W=H=4, idx(W, H)=1, if max(W, H)=8 and idx(W, H)=2 in all other cases. Moreover, one may put m=mode, if mode<18 and m=mode−17, else. Then, if idx≤1 or idx=2 and min(W, H)>4, one may put A=Aidxmand b=bidxm. In the case that idx=2 and min(W, H)=4, one lets A be the matrix that arises by leaving out every row of Aidxmthat, in the case W=4, corresponds to an odd x-coordinate in the downsampled block, or, in the case H=4, corresponds to an odd y-coordinate in the downsampled block. If mode18, one replaces the reduced prediction signal by its transposed signal. In alternative examples, different strategies may be carried out. For example, instead of reducing the size of a larger matrix (“leave out”), a smaller matrix of S1(idx=1) with Wred=4 and Hred=4 is used. I.e., such blocks are now assigned to S1instead of S2.

Other strategies may be carried out. In other examples, the mode index ‘mode’ is not necessarily in the range 0 to 35 (other ranges may be defined). Further, it is not necessary that each of the three sets S0, S1, S2has 18 matrices (hence, instead of expressions like mode<18, it is possible to mode<n0, n1, n2, which are the number of matrixes for each set of matrixes S0, S1, S2, respectively). Further, the sets may have different numbers of matrixes each (for example, it may be that S0has 16 matrixes S1has eight matrixes, and S2has six matrixes).

6.4 Linear Interpolation to Generate the Final Prediction Signal

Here, features are provided regarding step812.

Interpolation of the subsampled prediction signal, on large blocks a second version of the averaged boundary may be needed. Namely, if min(W, H)>8 and W≥H, one writes W=8*2l, and for 0≤i<8 defines

If min(W, H)>8 and H>W, one defines bdryredIIleftanalogously.

In addition or alternative, it is possible to have a “hard downsampling”, in which the bdrredIItop[i] is equal to

At the sample positions that were left out in the generation of predred, the final prediction signal may arise by linear interpolation from predred(e.g., step813in examples ofFIGS. 7.2-7.4). This linear interpolation may be unnecessary, in some examples, if W=H=4 (e.g., example ofFIG. 7.1).

The linear interpolation may be given as follows (other examples are notwithstanding possible). It is assumed that W≥H. Then, if H>Hred, a vertical upsampling of predredmay be performed.

In that case, predredmay be extended by one line to the top as follows. If W=8, predredmay have width Wred=4 and may be extended to the top by the averaged boundary signal bdryredtop, e.g. as defined above. If W>8, predredis of width Wred=8 and it is extended to the top by the averaged boundary signal bdryredIItop, e.g. as defined above. One may write predred[x][−1] for the first line of predred. Then the signal predredups,veron a block of width Wredand height 2*Hredmay be given as

where 0≤x<Wredand 0≤y<Hred. The latter process may be carried out k times until 2k*Hred=H. Thus, if H=8 or H=16, it may be carried out at most once. If H=32, it may be carried out twice. If H=64, it may be carried out three times. Next, a horizontal upsampling operation may be applied to the result of the vertical upsampling. The latter upsampling operation may use the full boundary left of the prediction signal. Finally, if H>W, one may proceed analogously by first upsampling in the horizontal direction (if needed) and then in the vertical direction.

This is an example of an interpolation using reduced boundary samples for the first interpolation (horizontally or vertically) and original boundary samples for the second interpolation (vertically or horizontally). Depending on the block size, only the second or no interpolation is needed. If both horizontal and vertical interpolation is needed, the order depends on the width and height of the block.

However, different techniques may be implemented: for example, original boundary samples may be used for both the first and the second interpolation and the order may be fixed, e.g. first horizontal then vertical (in other cases, first vertical then horizontal).

Hence, the interpolation order (horizontal/vertical) and the use of reduced/original boundary samples may be varied.

6.5 Illustration of an Example of the Entire ALWIP Process

The entire process of averaging, matrix-vector-multiplication and linear interpolation is illustrated for different shapes inFIGS. 7.1-7.4. Note, that the remaining shapes are treated as in one of the depicted cases.1. Given a 4×4 block, ALWIP may take two averages along each axis of the boundary by using the technique ofFIG. 7.1. The resulting four input samples enter the matrix-vector-multiplication. The matrices are taken from the set S0. After adding an offset, this may yield the 16 final prediction samples. Linear interpolation is not necessary for generating the prediction signal. Thus, a total of (4*16)/(4*4)=4 multiplications per sample are performed. See, for example,FIG. 7.1.2. Given an 8×8 block, ALWIP may take four averages along each axis of the boundary. The resulting eight input samples enter the matrix-vector-multiplication, by using the technique ofFIG. 7.2. The matrices are taken from the set S1. This yields 16 samples on the odd positions of the prediction block. Thus, a total of (8*16)/(8*8)=2 multiplications per sample are performed. After adding an offset, these samples may be interpolated, e.g., vertically by using the top boundary and, e.g. horizontally by using the left boundary. See, for example,FIG. 7.2.3. Given an 8×4 block, ALWIP may take four averages along the horizontal axis of the boundary and the four original boundary values on the left boundary by using the technique ofFIG. 7.3. The resulting eight input samples enter the matrix-vector-multiplication. The matrices are taken from the set S1. This yields 16 samples on the odd horizontal and each vertical positions of the prediction block. Thus, a total of (8*16)/(8*4)=4 multiplications per sample are performed. After adding an offset, these samples are interpolated horizontally by using the left boundary, for example. See, for example,FIG. 7.3.The transposed case is treated accordingly.4. Given a 16×16 block, ALWIP may take four averages along each axis of the boundary. The resulting eight input samples enter the matrix-vector-multiplication by using the technique ofFIG. 7.2. The matrices are taken from the set S2. This yields 64 samples on the odd positions of the prediction block. Thus, a total of (8*64)/(16*16)=2 multiplications per sample are performed. After adding an offset, these samples are interpolated vertically by using the top boundary and horizontally by using the left boundary, for example. See, for example,FIG. 7.2. See, for example,FIG. 7.4.For larger shapes, the procedure may be essentially the same and it is easy to check that the number of multiplications per sample is less than two.For W×8 blocks, only horizontal interpolation is needed as the samples are given at the odd horizontal and each vertical positions. Thus, at most (8*64)/(16*8)=4 multiplications per sample are performed in these cases.Finally for W×4 blocks with W>8, let Akbe the matrix that arises by leaving out every row that correspond to an odd entry along the horizontal axis of the downsampled block. Thus, the output size may be 32 and again, only horizontal interpolation remains to be performed. At most (8*32)/(16*4)=4 multiplications per sample may be performed.The transposed cases may be treated accordingly.

6.6 Number of Parameters Needed and Complexity Assessment

The parameters needed for all possible proposed intra prediction modes may be comprised by the matrices and offset vectors belonging to the sets S0, S1, S2. All matrix-coefficients and offset vectors may be stored as 10-bit values. Thus, according to the above description, a total number of 14400 parameters, each in 10-bit precision, may be needed for the proposed method. This corresponds to 0,018 Megabyte of memory. It is pointed out that currently, a CTU of size 128×128 in the standard 4:2:0 chroma-subsampling consists of 24576 values, each in 10 bit. Thus, the memory requirement of the proposed intra-prediction tool does not exceed the memory requirement of the current picture referencing tool that was adopted at the last meeting. Also, it is pointed out that the conventional intra prediction modes need four multiplications per sample due to the PDPC tool or the 4-tap interpolation filters for the angular prediction modes with fractional angle positions. Thus, in terms of operational complexity the proposed method does not exceed the conventional intra prediction modes.

6.7 Signalization of the Proposed Intra Prediction Modes

For luma blocks, 35 ALWIP modes are proposed, for example, (other numbers of modes may be used). For each Coding Unit (CU) in intra mode, a flag indicating if an ALWIP mode is to be applied on the corresponding Prediction Unit (PU) or not is sent in the bitstream. The signalization of the latter index may be harmonized with MRL in the same way as for the first CE test. If an ALWIP mode is to be applied, the index predmode of the ALWIP mode may be signaled using an MPM-list with 3 MPMS.

Here, the derivation of the MPMs may be performed using the intra-modes of the above and the left PU as follows. There may be tables, e.g. three fixed tables map_angular_to_alwipidx, idx∈{0,1,2} that may assign to each conventional intra prediction mode predmodeAngularan ALWIP mode

For each PU of width W and height H one defines and index

that indicates from which of the three sets the ALWIP-parameters are to be taken as in section 4 above. If the above Prediction Unit PUaboveis available, belongs to the same CTU as the current PU and is in intra mode, if idx(PU)=idx(PUabove) and if ALWIP is applied on PUabovewith ALWIP-mode predmodeALWIPabove, one puts

If the above PU is available, belongs to the same CTU as the current PU and is in intra mode and if a conventional intra prediction mode predmodeAngularaboveis applied on the above PU, one puts

In all other cases, one puts

which means that this mode is unavailable. In the same way but without the restriction that the left PU needs to belong to the same CTU as the current PU, one derives a mode

Finally, three fixed default lists listidx, idx∈{0,1,2} are provided, each of which contains three distinct ALWIP modes. Out of the default list listidx(PU)and the modes modeALWIPaboveand modeALWIPleft, one constructs three distinct MPMs by substituting −1 by default values as well as eliminating repetitions.

The herein described embodiments are not limited by the above described Signalization of the proposed intra prediction modes. According to an alternative embodiment, no MPMs and/or mapping tables are used for MIP (ALWIP).

6.8 Adapted MPM-List Derivation for Conventional Luma and Chroma Intra-Prediction Modes

The proposed ALWIP-modes may be harmonized with the MPM-based coding of the conventional intra-prediction modes as follows. The luma and chroma MPM-list derivation processes for the conventional intra-prediction modes may use fixed tables map_alwip_to_angularidx, idx∈{0,1,2}, mapping an ALWIP-mode predmodeALWIPon a given PU to one of the conventional intra-prediction modes

For the luma MPM-list derivation, whenever a neighboring luma block is encountered which uses an ALWIP-mode predmodeALWIP, this block may be treated as if it was using the conventional intra-prediction mode predmodeAngular. For the chroma MPM-list derivation, whenever the current luma block uses an LWIP-mode, the same mapping may be used to translate the ALWIP-mode to a conventional intra prediction mode.

It is clear, that the ALWIP-modes can be harmonized with the conventional intra-prediction modes also without the usage of MPMs and/or mapping tables. It is, for example, possible that for the chroma block, whenever the current luma block uses an ALWIP-mode, the ALWIP-mode is mapped to a planar-intra prediction mode.

7. IMPLEMENTATION EFFICIENT EMBODIMENTS

Let's briefly summarize the above examples as they might form a basis for further extending the embodiments described herein below.

For predicting a predetermined block18of the picture10, using a plurality of neighbouring samples17a,cis used.

A reduction100, by averaging, of the plurality of neighbouring samples has been done to obtain a reduced set102of samples values lower, in number of samples, than compared to the plurality of neighbouring samples. This reduction is optional in the embodiments herein and yields the so called sample value vector mentioned in the following. The reduced set of sample values is the subject to a linear or affine linear transformation19to obtain predicted values for predetermined samples104of the predetermined block. It is this transformation, later on indicated using matrix A and offset vector b which has been obtained by machine learning (ML) and should be implementation efficiently preformed.

2By interpolation, prediction values for further samples108of the predetermined block are derived on the basis of the predicted values for the predetermined samples and the plurality of neighbouring samples. It should be said that, theoretically, the outcome of the affine/linear transformation could be associated with non-full-pel sample positions of block18so that all samples of block18might be obtained by interpolation in accordance with an alternative embodiment. No interpolation might be needed at all, too.

The plurality of neighbouring samples might extend one-dimensionally along two sides of the predetermined block, the predetermined samples are arranged in rows and columns and, along at least one of the rows and columns, wherein the predetermined samples may be positioned at every nth position from a sample (112) of the predetermined sample adjoining the two sides of the predetermined block. Based on the plurality of neighbouring samples, for each of the at least one of the rows and the columns, a support value for one (118) of the plurality of neighbouring positions might be determined, which is aligned to the respective one of the at least one of the rows and the columns, and by interpolation, the prediction values for the further samples108of the predetermined block might be derived on the basis of the predicted values for the predetermined samples and the support values for the neighbouring samples aligned to the at least one of rows and columns. The predetermined samples may be positioned at every nthposition from the sample112of the predetermined sample which adjoins the two sides of the predetermined block along the rows and the predetermined samples may be positioned at every mthposition from the sample112of the predetermined sample which adjoins the two sides of the predetermined block along the columns, wherein n,m>1. It might be that n=m. Along at least one of the rows and column, the determination of the support values may be done by averaging (122), for each support value, a group120of neighbouring samples within the plurality of neighbouring samples which includes the neighbouring sample118for which the respective support value is determined. The plurality of neighbouring samples may extend one-dimensionally along two sides of the predetermined block and the reduction may be done by grouping the plurality of neighbouring samples into groups110of one or more consecutive neighbouring samples and performing an averaging on each of the group of one or more neighbouring samples which has more than two neighbouring samples.

For the predetermined block, a prediction residual might be transmitted in the data stream. It might be derived therefrom at the decoder and the predetermined block be reconstructed using the prediction residual and the predicted values for the predetermined samples. At the encoder, the prediction residual is encoded into the data stream at the encoder.

The picture might be subdivided into a plurality of blocks of different block sizes, which plurality comprises the predetermined block. Then, it might be that the linear or affine linear transformation for block18is selected depending on a width W and height H of the predetermined block such that the linear or affine linear transformation selected for the predetermined block is selected out of a first set of linear or affine linear transformations as long as the width W and height H of the predetermined block are within a first set of width/height pairs and a second set of linear or affine linear transformations as long as the width W and height H of the predetermined block are within a second set of width/height pairs which is disjoint to the first set of width/height pairs. Again, later on it gets clear that the affine/linear transformations are represented by way of other parameters, namely weights of C and, optionally, offset and scale parameters.

Decoder and encoder may be configured to subdivide the picture into a plurality of blocks of different block sizes, which comprises the predetermined block, and to select the linear or affine linear transformation depending on a width W and height H of the predetermined block such that the linear or affine linear transformation selected for the predetermined block is selected out ofa first set of linear or affine linear transformations as long as the width W and height H of the predetermined block are within a first set of width/height pairs,a second set of linear or affine linear transformations as long as the width W and height H of the predetermined block are within a second set of width/height pairs which is disjoint to the first set of width/height pairs, anda third set of linear or affine linear transformations as long as the width W and height H of the predetermined block are within a third set of one or more width/height pairs, which is disjoint to the first and second sets of width/height pairs.

The third set of one or more width/height pairs merely comprises one width/height pair, W′, H′, and each linear or affine linear transformation within first set of linear or affine linear transformations is for transforming N′ sample values to W′*H′ predicted values for an W′×H′ array of sample positions.

Each of the first and second sets of width/height pairs may comprise a first width/height pairs Wp,Hpwith Wpbeing unequal to Hpand a second width/height pair Wq,Hqwith Hq=Wpand Wq=Hp.

Each of the first and second sets of width/height pairs may additionally comprise a third width/height pairs Wp,Hpwith Wpbeing equal to Hpand Hp>Hq.

For the predetermined block, a set index might be transmitted in the data stream, which indicates which linear or affine linear transformation to be selected for block18out of a predetermined set of linear or affine linear transformations.

The plurality of neighbouring samples may extend one-dimensionally along two sides of the predetermined block and the reduction may be done by, for a first subset of the plurality of neighbouring samples, which adjoin a first side of the predetermined block, grouping the first subset into first groups110of one or more consecutive neighbouring samples and, for a second subset of the plurality of neighbouring samples, which adjoin a second side of the predetermined block, grouping the second subset into second groups110of one or more consecutive neighbouring samples and performing an averaging on each of the first and second groups of one or more neighbouring samples which has more than two neighbouring samples, so as to obtain first sample values from the first groups and second sample values for the second groups. Then, the linear or affine linear transformation may be selected depending on the set index out of a predetermined set of linear or affine linear transformations such that two different states of the set index result into a selection of one of the linear or affine linear transformations of the predetermined set of linear or affine linear transformations, the reduced set of sample values may be subject to the predetermined linear or affine linear transformation in case of the set index assuming a first of the two different states in form of a first vector to yield an output vector of predicted values, and distribute the predicted values of the output vector along a first scan order onto the predetermined samples of the predetermined block and in case of the set index assuming a second of the two different states in form of a second vector, the first and second vectors differing so that components populated by one of the first sample values in the first vector are populated by one of the second sample values in the second vector, and components populated by one of the second sample values in the first vector are populated by one of the first sample values in the second vector, so as to yield an output vector of predicted values, and distribute the predicted values of the output vector along a second scan order onto the predetermined samples of the predetermined block which is transposed relative to the first scan order.

Each linear or affine linear transformation within first set of linear or affine linear transformations may be for transforming N1sample values to w1*h1predicted values for an w1×h1array of sample positions and each linear or affine linear transformation within second set of linear or affine linear transformations is for transforming N2sample values to w2*h2predicted values for an w2×h2array of sample positions, wherein for a first predetermined one of the first set of width/height pairs, w1may exceed the width of the first predetermined width/height pair or h1may exceed the height of the first predetermined width/height pair, and for a second predetermined one of the first set of width/height pairs neither w1may exceed the width of the second predetermined width/height pair nor h1exceeds the height of the second predetermined width/height pair. The reducing (100), by averaging, the plurality of neighbouring samples to obtain the reduced set (102) of samples values might then be done so that the reduced set102of samples values has N1sample values if the predetermined block is of the first predetermined width/height pair and if the predetermined block is of the second predetermined width/height pair, and the subjecting the reduced set of sample values to the selected linear or affine linear transformation might be performed by using only a first sub-portion of the selected linear or affine linear transformation which is related to a subsampling of the w1×h1array of sample positions along width dimension if w1exceeds the width of the one width/height pair, or along height dimension if h1exceeds the height of the one width/height pair if the predetermined block is of the first predetermined width/height pair, and the selected linear or affine linear transformation completely if the predetermined block is of the second predetermined width/height pair.

Each linear or affine linear transformation within first set of linear or affine linear transformations may be for transforming N1sample values to w1*h1predicted values for an w1×h1array of sample positions with w1=h1and each linear or affine linear transformation within second set of linear or affine linear transformations is for transforming N2sample values to w2*h2predicted values for an w2×h2array of sample positions with w2=h2.

All of the above described embodiments are merely illustrative in that they may form the basis for the embodiment described herein below. That is, above concepts and details shall serve to understand the following embodiments and shall serve as a reservoir of possible extensions and amendments of the embodiments described herein below. In particular, many of the above described details are optional such as the averaging of neighboring samples, the fact the neighboring samples are used as reference samples and so forth.

More generally, the embodiments described herein assume that a prediction signal on a rectangular block is generated out of already reconstructed samples such as an intra prediction signal on a rectangular block is generated out of neighboring, already reconstructed samples left and above the block. The generation of the prediction signal is based on the following steps.1. Out of the reference samples, called boundary sample now without, however, excluding the possibility of transferring the description to reference samples positioned elsewhere, samples may be extracted by averaging. Here, the averaging is carried out either for both the boundary samples left and above the block or only for the boundary samples on one of the two sides. If no averaging is carried out on a side, the samples on that side are kept unchanged.2. A matrix vector multiplication, optionally followed by addition of an offset, is carried out where the input vector of the matrix vector multiplication is either the concatenation of the averaged boundary samples left of the block and the original boundary samples above the block if averaging was applied only on the left side, or the concatenation of the original boundary samples left of the block and the averaged boundary samples above the block if averaging was applied only on the above side or the concatenation of the averaged boundary samples left of the block and the averaged boundary samples above the block if averaging was applied on both sides of the block. Again, alternatives would exist, such as ones where averaging isn't used at all.3. The result of the matrix vector multiplication and the optional offset addition may optionally be a reduced prediction signal on a subsampled set of samples in the original block. The prediction signal at the remaining positions may be generated from the prediction signal on the subsampled set by linear interpolation.

The computation of the matrix vector product in Step 2 should be carried out in integer arithmetic. Thus, if x=(x1, . . . , xn) denotes the input for the matrix vector product, i.e. x denotes the concatenation of the (averaged) boundary samples left and above the block, then out of x, the (reduced) prediction signal computed in Step 2 has should be computed using only bit shifts, the addition of offset vectors, and multiplications with integers. Ideally, the prediction signal in Step 2 would be given as Ax+b where b is an offset vector that might be zero and where A is derived by some machine-learning based training algorithm. However, such a training algorithm usually only results in a matrix A=Afloatthat is given in floating point precision. Thus, one is faced with the problem to specify integer operations in the aforementioned sense such that the expression Afloatx is well approximated using these integer operations. Here, it is important to mention that these integer operations are not necessarily chosen such that they approximate the expression Afloatx assuming a uniform distribution of the vector x but typically take into account that the input x vectors x for which the expression AfloatX is to be approximated are (averaged) boundary samples from natural video signals where one can expect some correlations between the components xiof x.

FIG. 8shows an improved ALWIP-prediction. Samples of a predetermined block can be predicted based on a first matrix-vector product between a matrix A1100derived by some machine-learning based training algorithm and a sample value vector x400. Optionally an offset b1110can be added. To achieve an integer approximation or a fixed-point approximation of this first matrix-vector product, the sample value vector can undergo an invertible linear transformation403to determine a further vector402. A second matrix-vector product between a further matrix B1200and the further vector402can equal the result of the first matrix-vector product.

Because of the features of the further vector402the second matrix-vector product can be integer approximated by a matrix-vector product404between a predetermined prediction matrix C405and the further vector402plus a further offset408. The further vector402and the further offset408can consist of integer or fixed-point values. All components of the further offset are, for example, the same. The predetermined prediction matrix405can be a quantized matrix or a matrix to be quantized. The result of the matrix-vector product404between the predetermined prediction matrix405and the further vector402can be understood as a prediction vector406.

In the following more details regarding this integer approximation are provided.

Possible Solution According to an Example I: Subtracting and Adding Mean Values

One possible incorporation of an integer approximation of an expression Afloatx useable in a scenario above, is to replace the i0-th component xi0, i.e. a predetermined component1500, of x, i.e. the sample value vector400, by the mean value mean (x), i.e. a predetermined value1400, of the components of x and to subtract this mean value from all other components. In other words, the invertible linear transform403, as shown inFIG. 9a, is defined such that a predetermined component1500of the further vector402becomes a, and each of other components of the further vector402, except the predetermined component1500, equal a corresponding component of the sample value vector400minus a, wherein a is a predetermined value1400which is, for example, an average, such as an arithmetic mean or weighted average, of components of the sample value vector400. This operation on the input is given by an invertible transform T403that has an obvious integer implementation in particular if the dimension n of x is a power of two.

Since Afloat=(AfloatT−1)T, if one does such a transformation on the input x, one has to find an integral approximation of the matrix vector product By, where B=(AfloatT−1) and y=Tx. Since the matrix-vector product Afloatx represents a prediction on a rectangular block, i.e. a predetermined block, and since x400is comprised by (e.g., averaged) boundary samples of that block, one should expect that in the case where all sample values of x are equal, i.e. where xi=mean(x) for all i, each sample value in the prediction signal Afloatx should be close to mean(x) or be exactly equal to mean(x). This means that one should expect that the i0-th column, i.e. the column corresponding to the predetermined component, of B is very close or equal to a column that consist only of ones. Thus, if M(i0), i.e. an integer matrix1300, is the matrix whose i0th column consists of ones and all of whose other columns are zero, writing By=Cy+M(i0)y with C=B−M(i0), one should expect that the i0-th column412of C, i.e. the predetermined prediction matrix405, has rather small entries or is zero, as shown inFIG. 9b. Moreover, since the components of x are correlated, one can expect that for each i≠i0, the i-th component yi=xi−mean(x) of y often has a much smaller absolute value than the i-th component of x. Since the matrix M(i0)1300is an integer matrix, an integer approximation of By is achieved if an integer approximation of Cy is given and, by the above arguments, one can expect that the quantization error that arises by quantizing each entry of C405in a suitable way should only marginally impact the error in the resulting quantization of By resp. of Afloatx.

The predetermined value1400is not necessarily the mean value mean (x). The herein described integer approximation of the expression AfloatX can also be achieved with the following alternative definitions of the predetermined value1400:

In another possible incorporation of an integer approximation of an expression Afloatx, the i0-th component xi0of x remains unaltered and the same value xi0is subtracted from all other components. That is, yi0=xi0and yi=xi−xi0for each i≠i0. In other words, the predetermined value1400can be a component of the sample value vector400corresponding to the predetermined component1500.

Alternatively, the predetermined value1400is a default value or a value signaled in a data stream into which a picture is coded.

The predetermined value1400equals, for example, 2bitdepth−1. In this case, the further vector402can be defined by y0=2bitdepth−1and yi=xi−x0for i>0.

Alternatively, the predetermined component1500becomes a constant minus the predetermined value1400. The constant equals, for example, 2bitdepth−1. According to an embodiment, the predetermined component yi01500of the further vector y402equals 2bitdepth−1minus a component xi0of the sample value vector400corresponding to the predetermined component1500and all other components of the further vector402equal the corresponding component of the sample value vector400minus the component of the sample value vector400corresponding to the predetermined component1500.

It is, for example, advantageous if the predetermined value1400has a small deviation from prediction values of samples of the predetermined block.

According to an embodiment, the apparatus1000is configured to comprise a plurality of invertible linear transforms403, each of which is associated with one component of the further vector402. Furthermore, the apparatus is, for example, configured to select the predetermined component1500out of the components of the sample value vector400and use the invertible linear transform403out of the plurality of invertible linear transforms which is associated with the predetermined component1500as the predetermined invertible linear transform. This is, for example, due to different positions of the i0throw, i.e. a row of the invertible linear transform403corresponding to the predetermined component, dependent on a position of the predetermined component in the further vector. If, for example, the first component, i.e. y1, of the further vector402is the predetermined component, the i0throw would replace the first row of the invertible linear transform.

As shown inFIG. 9b, matrix components414of the predetermined prediction matrix C405within a column412, i.e. an i0thcolumn, of the predetermined prediction matrix405which corresponds to the predetermined component1500of the further vector402are, for example, all zero. In this case, the apparatus is, for example, configured to compute the matrix-vector product404by performing multiplications by computing a matrix vector product407between a reduced prediction matrix C′405resulting from the predetermined prediction matrix C405by leaving away the column412and an even further vector410resulting from the further vector402by leaving away the predetermined component1500, as shown inFIG. 9c. Thus a prediction vector406can be calculated with less multiplications.

As shown inFIGS. 8, 9band9c, the apparatus1000can be configured to, in predicting the samples of the predetermined block on the basis of the prediction vector406, compute for each component of the prediction vector406a sum of the respective component and a, i.e. the predetermined value1400. This summation can be represented by a sum of the prediction vector406and a vector409with all components of the vector409being equal to the predetermined value1400, as shown inFIG. 8andFIG. 9c. Alternatively the summation can be represented by a sum of the prediction vector406and a matrix-vector product1310between an integer matrix M1300and the further vector402, as shown inFIG. 9b, wherein matrix components of the integer matrix1300are 1 within a column, i.e. an i0thcolumn, of the integer matrix1300which corresponds to the predetermined component1500of the further vector402, and all other components are, for example, zero.

A result of a summation of the predetermined prediction matrix C405and the integer matrix1300equals or approximates, for example, the further matrix B1200, shown inFIG. 8.

In other words, a matrix, i.e. the further matrix B1200, which results from summing each matrix component of the predetermined prediction matrix C405within a column412, i.e. the i0thcolumn, of the predetermined prediction matrix405, which corresponds to the predetermined component1500of the further vector402, with one, (i.e. matrix B) times the invertible linear transform403corresponds, for example, to a quantized version of a machine learning prediction matrix A1100, as shown inFIG. 8,FIG. 9aandFIG. 9b. The summing of each matrix component of the predetermined prediction matrix C405within the i0thcolumn412with one can correspond to the summation of the predetermined prediction matrix405and the integer matrix1300, as shown inFIG. 9b. As shown inFIG. 8the machine learning prediction matrix A1100can equal the result of the further matrix1200times the invertible linear transform403. This is due to A·x=BT·yT−1. The predetermined prediction matrix405is, for example, a quantized matrix, an integer matrix and/or a fixed-point matrix, whereby the quantized version of the machine learning prediction matrix A1100can be realized.

Matrix Multiplication Using Integer Operations Only

For a low complexity implementation (in terms of complexity of adding and multiplying scalar values, as well as in terms of storage needed for the entries of the partaking matrix), it is desirable to perform the matrix multiplications404using integer arithmetic only. To calculate an approximation of z=Cy, i.e.

using operations on integers only, the real values Ci,jis to be mapped to integer values Ĉi,j, according to an embodiment. This can be done for example by uniform scalar quantization, or by taking into account specific correlations between values yi. The integer values represent, for example fixed-point numbers that can each be stored with a fixed number of bits n_bits, for example n_bits=8.

The matrix vector product404with a matrix, i.e. the predetermined prediction matrix405, of size m×n can then be carried out like shown in this pseudo code, where <<, >> are arithmetic binary left- and right-shift operations and +, − and * operate on integer values only.

Here, the array C, i.e. the predetermined prediction matrix405, stores the fixed point numbers, for example, as integers. The final addition of final_offset and the right-shift operation with right_shift_result reduce precision by rounding to obtain a fixed point format needed at the output.

To allow for an increased range of real values representable by the integers in C, two additional matrices offseti,jand scalei,jcan be used, as shown in the embodiments ofFIG. 10andFIG. 11, such that each coefficient bi,jof yjin the matrix-vector product

is given by

The values offseti,jand scalei,jare themselves integer values. For example these integers can represent fixed-point numbers that can each be stored with a fixed number of bits, for example 8 bits, or for example the same number of bits n_bits that is used to store the values Ĉi,j.

In other words, the apparatus1000is configured to represent the predetermined prediction matrix405using prediction parameters, e.g. integer values Ĉi,jand the values offseti,jand scalei,j, and to compute the matrix-vector product404by performing multiplications and summations on the components of the further vector402and the prediction parameters and intermediate results resulting therefrom, wherein absolute values of the prediction parameters are representable by an n-bit fixed point number representation with n being equal to or lower than 14, or, alternatively, 10, or, alternatively, 8. For instance, the components of the further vector402are multiplied with the prediction parameters to yield products as intermediate results which, in turn, are subject to, or form addends of, a summation.

According to an embodiment, the prediction parameters comprise weights each of which is associated with a corresponding matrix component of the prediction matrix. In other words, the predetermined prediction matrix is, for example, replaced or represented by the prediction parameters. The weights are, for example, integer and/or fixed point values.

According to an embodiment, the prediction parameters further comprise one or more scaling factors, e.g. the values scalei,j, each of which is associated with one or more corresponding matrix components of the predetermined prediction matrix405for scaling the weight, e.g. an integer value Ĉi,j, associated with the one or more corresponding matrix component of the predetermined prediction matrix405. Additionally or Alternatively, the prediction parameters comprise one or more offsets, e.g. the values offseti,j, each of which is associated with one or more corresponding matrix components of the predetermined prediction matrix405for offsetting the weight, e.g. an integer value Ĉi,j, associated with the one or more corresponding matrix component of the predetermined prediction matrix405.

In order to reduce the amount of storage needed for offseti,jand scalei,j, their values can be chosen to be constant for particular sets of indices i,j. For example, their entries can be constant for each column or they can be constant for each row, or they can be constant for all i,j, as shown inFIG. 10.

For example, in one embodiment, offseti,jand scalei,jare constant for all values of a matrix of one prediction mode, as shown inFIG. 11. Thus, when there are K prediction modes with k=0 . . . K−1, only a single value okand a single value skis needed to calculate the prediction for mode k.

With offset representing okand scale representing sk, the calculation in (1) can be modified to be:

Broadened embodiments arising from that solution

The above solution implies the following embodiments:1. A prediction method as in Section I, where in Step 2 of Section I, the following is done for an integer approximation of the involved matrix vector product: Out of the (averaged) boundary samples x=(x1, . . . , xn), for a fixed i0with 1≤i0≤n, the vector y=(y1, . . . , yn) is computed, where yi=xi−mean(x) for i≠i0and where yi0=mean(x) and where mean(x) denotes the mean-value of x. The vector y then serves as an input for (an integer realization of) a matrix vector product Cy such that the (downsampled) prediction signal pred from Step 2 of Section I is given as pred=Cy+meanpred(x). In this equation, meanpred(x) denotes the signal that is equal to mean(x) for each sample position in the domain of the (downsampled) prediction signal. (see, e.g.,FIG. 9b)2. A prediction method as in Section I, where in Step 2 of Section I, the following is done for an integer approximation of the involved matrix vector product: Out of the (averaged) boundary samples x=(x1, . . . , xn), for a fixed i0with 1≤i0≤n, the vector y=(yi, . . . , yn−1) is computed, where yi=xi−mean(x) for i<i0and where yi=xi+1−mean(x) for i≥i0and where mean(x) denotes the mean-value of x. The vector y then serves as an input for (an integer realization of) a matrix vector product Cy such that the (downsampled) prediction signal pred from Step 2 of Section I is given as pred=Cy+meanpred(x). In this equation, meanpred(x) denotes the signal that is equal to mean(x) for each sample position in the domain of the (downsampled) prediction signal. (see, e.g.,FIG. 9c)3. A prediction method as in Section I, where the integer realization of the matrix vector product Cy is given by using coefficients bi,j=(Ĉi,j−offseti,j)*scalei,jin the matrix-vector product zi=*Σjbi,j*yj. (see, e.g.,FIG. 10)4. A prediction method as in Section I, where step 2 uses one of K matrices, such that multiple prediction modes can be calculated, each using a different matrix Ĉkwith k=0 . . . K−1, where the integer realization of the matrix vector product Cky is given by using coefficients bi,j=(Ĉk,i,j−offsetk)*scalekin the matrix-vector product zi=Σjbi,j*yj. (see, e.g.,FIG. 11)

That is, in accordance with embodiments of the present application, encoder and decoder act as follows in order to predict a predetermined block18of a picture10, seeFIG. 8. For predicting, a plurality of reference samples is used. As outlined above, embodiments of the present application would not be restricted to intra-coding and accordingly, reference samples would not be restricted to be neighboring samples, i.e. samples of picture10neighboring block18. In particular, the reference samples would not be restricted to the ones arranged alongside an outer edge of block18such as samples abutting the block's outer edge. However, this circumstance is certainly one embodiment of the present application.

In order to perform the prediction, a sample value vector400is formed out of the reference samples such as reference samples17aand17c.A possible formation has been described above. The formation may involve an averaging, thereby reducing the number of samples102or the number of components of vector400compared to the reference samples17contributing to the formation. The formation may also, as described above, somehow depend on the dimension or size of block18such as its width and height.

It is this vector400which is ought to be subject to an affine or linear transform in order to obtain the prediction of block18. Different nomenclatures have been used above. Using the most recent one, it is the aim to perform the prediction by applying vector400to matrix A by way of a matrix vector product within performing a summation with an offset vector b. The offset vector b is optional. The affine or linear transformation determined by A or A and b, might be determined by encoder and decoder or, to be more precise, for sake of prediction on the basis of the size and dimension of block18as already described above.

However, in order to achieve the above-outlined computational efficiency improvement or render the prediction more effective in terms of implementation, the affine or linear transform has been quantized, and encoder and decoder, or the predictor thereof, used the above-mentioned C and T in order to represent and perform the linear or affine transformation, with C and T, applied in the manner described above, representing a quantized version of the affine transformation. In particular, instead of applying vector400directly to a matrix A, the predictor in encoder and decoder, applies vector402resulting from the sample value vector400by way of subjecting same to a mapping via a predetermined invertible linear transform T. It might be that transform T as used here is the same as long as vector400has the same size, i.e. does not depend on the block's dimensions, i.e. width and height, or is at least the same for different affine/linear transformations. In the above, vector402has been denoted y. The exact matrix in order to perform the affine/linear transform as determined by machine learning would have been B. However, instead of exactly performing B, the prediction in encoder and decoder is done by way of an approximation or quantized version thereof. In particular, the representation is done via appropriately representing C in the manner outlined above with C+M representing the quantized version of B.

Accordingly, the prediction in encoder and decoder is further prosecuted by computing the matrix-vector product404between vector402and the predetermined prediction matrix C appropriately represented and stored at encoder and decoder in the manner described above. The vector406which results from this matrix-vector product, is then used for predicting the samples104of block18. As described above, for sake of prediction, each component of vector406might be subject to a summation with parameter a as indicated at408in order to compensate for the corresponding definition of C. The optional summation of vector406with offset vector b may also be involved in the derivation of the prediction of block18on the basis of vector406. It might be that, as described above, each component of vector406, and accordingly, each component of the summation of vector406, the vector of all a′s indicated at408and the optional vector b, might directly correspond to samples104of block18and, thus, indicate the predicted values of the samples. It may also be that only a sub-set of the block's samples104is predicted in that manner and that the remaining samples of block18, such as108, are derived by interpolation.

As described above, there are different embodiments for setting a. For instance, it might be the arithmetic mean of the components of vector400. For that case, seeFIG. 9a. The invertible linear transform T403may be as indicated in theFIG. 9a. i0is the predetermined component of the sample value vector and vector402, respectively, which is replaced by a. However, as also indicated above, there are other possibilities. However, as far as the representation of C is concerned, it has also been indicated above that same may be embodied differently. For instance, the matrix-vector product404may, in its actual computation, end up in the actual computation of a smaller matrix-vector product with lower dimensionality. In particular, as indicated above, it might be that owing to the definition of C, its whole i0thcolumn412gets 0 so that the actual computation of product404may be done by a reduced version of vector402which results from vector402by the omission of component yi0, namely by multiplying this reduced vector410with the reduced matrix C′ resulting from C by leaving out the i0thcolumn412.

The weights of C or the weights of C′, i.e. the components of this matrix, may be represented and stored in fixed-point number representation. These weights414may, however, also, as described above, be stored in a manner related to different scales and/or offsets. Scale and offset might be defined for the whole matrix C, i.e. be equal for all weights414of matrix C or matrix C′, or may be defined in a manner so as to be constant or equal for all weights414of the same row or all weights414of the same column of matrix C and matrix C′, respectively.FIG. 10illustrates, in this regard, that the computation of the matrix-vector product, i.e. the result of the product, may in fact be performed slightly different, namely for instance, by shifting the multiplication with the scale(s) towards the vector402or410, thereby reducing the number of multiplications having to be performed further.FIG. 11illustrates the case of using one scale and one offset for all weights414of C or C′ such as done in above calculation (2).

According to an embodiment, the herein described apparatus for predicting a predetermined block of a picture can be configured to use a matrix-based intra sample prediction comprising the following features:

The apparatus is configured to form a sample value vector pTemp[x]400out of the plurality of reference samples17. Assuming pTemp[x] to be 2*boundarySize, pTemp[x] might be populated by—e.g. by direct copying or by sub-sampling or pooling—the neighboring samples located at the top of the predetermined block, redT[x] with x=0 . . . boundarySize−1, followed by the neighboring samples located to the left of the predetermined block, redL[x] with x=0 . . . boundarySize−1, (e.g. in case of isTransposed=0) or vice versa in case of the transposed processing (e.g. in case of isTransposed=1).

The input values p[x] with x=0 . . . inSize−1 are derived, i.e. the apparatus is configured to derive from the sample value vector pTemp[x] a further vector p[x] onto which the sample value vector pTemp[x] is mapped by a predetermined invertible linear transform, or to be more specific predetermined invertible affine linear transform, as follows:If mipSizeId is equal to 2, the following applies:p[x]=pTemp[x+1]−pTemp[0]Otherwise (mipSizeId is less than 2), the following applies:p[0]=(1<<(BitDepth−1))−pTemp[0]p[x]=pTemp[x]−pTemp[0] for x=1 . . . inSize−1

Here, the variable mipSizeId is indicative of the size of predetermined block. That is, according to the present embodiment, the invertible transform using which the further vector is derived from the sample value vector, depends on the size of the predetermined block. The dependency might be given according to

Where predSize is indicative of the number of predicted samples within the predetermined block, and 2*bondarySize is indicative of the size of the sample value vector and is related to inSize, i.e. the further vector′S size, according to inSize=(2*boundarySize)−(mipSizeId==2)? 1:0. To be more precise, inSize indicates the number of those components of the further vector which actually participate in the computation. inSize is as large as the size of sample value vector for smaller block sizes, and one component smaller for larger block sizes. In the former case, one component may be disregarded, namely the one which would correspond to the predetermined component of the further vector, as in the matrix vector product to be computed later on, the contribution of the corresponding vector component would yield zero anyway and, thus, needs not to be actually computed. The dependency on the block size might be left off in case of alternative embodiments, where merely one of the two alternatives is used inevitably, i.e. irrespective of the block size (the option corresponding to mipSizeId is less than 2, or the option corresponding to mipSizeId equal to 2).

In other words, the predetermined invertible linear transform is, for example, defined such that a predetermined component of the further vector p becomes a, while all others correspond to a component of the sample value vector minus a, wherein e.g. a=pTemp[0]. In case of the first option corresponding to mipSizeId equal to 2, this is readily visible and only the differentially formed components of the further vector are further taken into account. That is, in the case of the first option, the further vector is actually {p[0 . . . inSize]; pTemp[0]} wherein pTemp[0] is a and the actually computed part of the matrix vector multiplication to yield the matrix vector product, i.e. the result of the multiplication, is restricted to only inSize components of the further vector and the corresponding columns of the matrix, as the matrix has a zero column which needs no computation. In other case, corresponding to mipSizeId smaller than 2, a=pTemp[0] is chosen, as all components of the further vector except p[0], i.e. each of other components p[x] (for x=1 . . . inSize−1) of the further vector p, except the predetermined component p[0], equal a corresponding component of the sample value vector pTemp[x] minus a, but p[0] is chosen to be a constant minus a. The matrix vector product is then computed. The constant is the mean of representable values, i.e. 2x−1(i.e. 1<<(BitDepth−1)) with x denoting the bit depth of the computational representation used. It should be noted that, if p[0] was selected to be pTemp[0] instead, then the product computed would simply deviate from the one computed using p[0] as indicated above (p[0]=(1<<(BitDepth−1))−pTemp[0]), by a constant vector which could be taken into account when predicting the block inner based on the product, i.e. the prediction vector. The value a is, thus, a predetermined value, e.g., pTemp[0]. The predetermined value pTemp[0] is in this case, for example, a component of the sample value vector pTemp corresponding to the predetermined component p[0]. It might be the neighboring sample to the top of the predetermined, or the left of the predetermined block, nearest to the upper left corner of the predetermined block.

For the intra sample prediction process according to predModeIntra, e.g., specifying the intra prediction mode, the apparatus is, for example, configured to apply the following steps, e.g. perform at least the first step:1. The matrix-based intra prediction samples predMip[x][y], with x=0 . . . predSize−1, y=0 . . . predSize−1 are derived as follows:The variable modeId is set equal to predModeIntra.The weight matrix mWeight[x][y] with x=0 . . . inSize−1, y=0 . . . predSize*predSize−1 is derived by invoking the MIP weight matrix derivation process with mipSizeId and modeId as inputs.The matrix-based intra prediction samples predMip[x][y], with x=0 . . . predSize−1, y=0 . . . predSize−1 are derived as follows:

predMip[x][y]=(((Σi=0inSize−1mWeight[i][y*predSize+x]*p[i])+oW)>>6)+pTemp[0]In other words, the apparatus is configured to compute a matrix-vector product between the further vector p[i] or, in case of mipSizeId equal to 2, {p[i]; pTemp[0]} and a predetermined prediction matrix mWeight or, in case of mipSizeId smaller than 2, the prediction matrix mWeight having an additional zero weight line corresponding to the omitted component of p, so as to obtain a prediction vector, which, here, has already been assigned to an array of block positions {x,y} distributed in the inner of the predetermined block so as to result in the array predMip[x][y]. The prediction vector would correspond to a concatenation of the rows of predMip[x][y] or the columns of predMip[x][y], respectively.According to an embodiment, or according to a different interpretation, only the component (((Σi=0inSize−1mWeight[i][y*predSize+x]*p[i])+oW)>>6) is understood as the prediction vector and the apparatus is configured to, in predicting the samples of the predetermined block on the basis of the prediction vector, compute for each component of the prediction vector a sum of the respective component and a, e.g. pTemp[0].The apparatus can optionally be configured to perform additionally the following steps in predicting the samples of the predetermined block on the basis of the prediction vector, e.g. predMip or ((Σi=0inSize−1mWeight[i][y*predSize+x]*p[i])+oW)>>6.2. The matrix-based intra prediction samples predMip[x][y], with x=0 . . . predSize−1, y=0 . . . predSize−1 are, for example, clipped as follows:

predMip=predTemp4. The predicted samples predSamples[x][y], with x=0 . . . nTbW−1, y=0 . . . nTbH−1 are, for example, derived as follows:If nTbW, specifying the transform block width, is greater than predSize or nTbH, specifying the transform block height, is greater than predSize, the MIP prediction upsampling process is invoked with the input block size predSize, matrix-based intra prediction samples predMip[x][y] with x=0 . . . predSize−1, y=0 . . . predSize−1, the transform block width nTbW, the transform block height nTbH, the top reference samples refT[x] with x=0 . . . nTbW−1, and the left reference samples refL[y] with y=0 . . . nTbH−1 as inputs, and the output is the predicted sample array predSamples.Otherwise, predSamples[x][y], with x=0 . . . nTbW−1, y=0 . . . nTbH−1 is set equal to predMip[x][y].

In other words, the apparatus is configured to predict samples predSamples of the predetermined block on the basis of the prediction vector predMip.

8. USING BLOCK/MATRIX-BASED INTRA PREDICTION MODES ALONG WITH OTHER INTRA-PREDICTION MODES

The following description presents, again, possibilities for combining block/matrix based prediction with other intra-prediction modes. It represents a further presentation of possibilities based on which the embodiments described in the subsequent section may be embodied.

Please note that in the following, the term block-based intra prediction is used to denoted an intra-prediction mode which may be embodied or equal those indicated by ALWIP above.

With this, the embodiments described in the following with respect toFIG. 12relate to decoders and encoders supporting intra-prediction for decoding/encoding a predetermined block18wherein different intra-prediction modes are supported. There are angular intra-prediction modes500according to which reference samples17neighboring the predetermined block18are used in order to fill the predetermined block18so as to obtain an intra-prediction signal for the predetermined block18. In particular, the reference samples17which are arranged alongside a boundary of the predetermined block18such as alongside the upper and left hand edge of the predetermined block18, represent picture content which is extrapolated, or copied, along a predetermined direction502into the inner of the predetermined block18. Before the extrapolation or copying, the picture content represented by the neighboring samples17might be subject to interpolation filtering or differently speaking may be derived from the neighboring samples17by way if interpolation filtering. The angular intra-prediction modes500mutually differ in the intra-prediction direction502. Each angular intra-prediction mode500may have an index associated with, wherein the association of indexes to the angular intra-prediction modes500may be such that the directions500, when ordering the angular intra-prediction mode500according to the associated mode indexes, monotonically rotate clockwise or anticlockwise.

There may also be non-angular intra-prediction modes.504, for instance, illustrates inFIG. 12a planar intra-prediction mode as optionally contained in set508, according to which a two-dimensional linear function defined by a horizontal slope, a vertical slope and an offset is derived based on neighboring samples17, with this linear function defining predicted sample values of the predetermined block18. Horizontal slope, vertical slope and offset are derived on the basis of the neighboring samples17. According to an embodiment, the first set508of intra-prediction modes comprises the planar intra-prediction mode504.

A specific non-angular intra prediction mode, the DC mode, which is contained in set508, is illustrated at506. Here, one value, quasi a DC value, is derived on the basis of the neighboring sample17and this one DC value is attributed to all samples of the predetermined block18so as to obtain the intra-prediction signal. Although two examples for a non-intra-prediction mode are shown, merely one or more than two may be present.

The intra-prediction modes500,504and506form a set508of intra-prediction modes which are supported by encoder and decoder in which compete, in terms of rate/distortion optimization sense, with the block-based intra-prediction modes generally indicated using reference sign510for which examples where discussed above using the abbreviation ALWIP. As described above, according to these block-based intra-prediction modes510, a matrix-vector product520is performed between a vector514which is derived from the neighboring samples17on the one hand and a predetermined prediction matrix516on the other hand. The result of the multiplication520is a prediction vector518which is used to predict the samples of the predetermined block18. The block-based intra-prediction modes510mutually differ in the prediction matrix516associated with the respective mode.

Thus, briefly summarizing, encoders and decoders according to embodiments described herein comprise a set508of intra-prediction modes, i.e. a first set of intra-prediction modes and a set520of block-based intra-prediction modes, i.e. a second set of matrix-based intra-prediction modes, and they compete with each other.

In accordance with embodiments of the present application, the predetermined block18is coded/decoded using intra-prediction in the following manner. In particular, firstly a set-selecting syntax element522whether the predetermined block18is to be predicted using any of the set508of intra-prediction modes, or any of modes of set520of block-based intra-prediction modes. If the set-selected syntax element indicates that the predetermined block18is to be predicted using any mode of set508, i.e. of the first set of intra-prediction modes, a list528of most probable candidates out of set508is construed/formed at decoder and encoder on the basis of intra-prediction modes using which neighboring blocks, which neighbor block18, and which are exemplarily indicated at524and526, have been predicted. The neighboring blocks524and526may be determined relative to the position of predetermined block18in a predetermined manner such as by determining those neighboring blocks which overlay certain neighboring samples of block18such as the sample to the top of the upper left hand sample of block18, and the block526containing the sample to the left of the just-mentioned corner sample. Naturally, this is only an example. The same applies to the number of neighbouring blocks used for mode prediction which is not restricted to be two for all embodiments. More than two or just one may be used. If any of these blocks524and526is missing, a default intra-prediction mode may be used by default as a substitute for the intra-prediction mode of that missing neighbouring block. The same may apply if any of the blocks524and526has been coded/decoded using an inter-prediction mode such as by motion compensated prediction.

The construction of the list of modes out of set508, i.e., list528of most probable intra-prediction modes is as follows. The list-length of list528, i.e., the number of most probable modes therein, may be fixed by default. The length may be four as illustrated inFIG. 12, or may be different therefrom, such as being five or six. The latter case applies to the specific example described hereinbelow. An index in the data stream to be described later may indicate one mode out of list528to be used for predetermined block18. The indexing is performed along a list order or ranking530with a list index being, for instance, variable length coded so that the length of the index increases monotonically along order530. Accordingly, it is worthwhile to, firstly, populate list528with the most probable modes out of set508only, and to place, along order530, modes more probable upstream relative to modes having lower probability of being suitable for block18. The modes of list528are derived based on the modes used for blocks524and526, i.e. neighbouring blocks neighbouring the predetermined block18. If any of blocks524and526has been intra-predicted using a block-based mode510out of set520, the afore-described mapping from such

“ALWIP” or block-based modes510onto the modes within set508, let's say non-ALWIP modes, is used. The latter mapping may, for instance, map a majority (i.e. more than the half) of the block-based modes510onto the DC mode506(or any of the DC506or planar mode504).

According to an embodiment, the list528of most probable intra-prediction modes is populated with the planar intra-prediction mode504in a manner independent from the intra-prediction modes using when the neighboring blocks are predicted. Thus, for example, only the DC intra-prediction mode506and the angular intra-prediction modes500are populated in the list528dependent on the intra-prediction modes used for a prediction of the neighboring blocks524and526. The planar intra-prediction mode504is, for example, positioned at a first position of the list528of most-probable intra-prediction modes independent from the intra-prediction modes using when the neighboring blocks524and526are predicted.

In a manner exemplarily illustrated in more detail below, the list construction of list528of most probable intra-prediction modes is done in a manner so that the list528is free of the DC intra-prediction mode506if the neighboring blocks524and526have exclusively been predicted by any angular intra-prediction mode500. The DC intra prediction mode506is not in the list528of most probable intra-prediction modes if one neighboring blocks524or526is predicted by any angular intra-prediction mode500and/or if both neighboring blocks524and526are predicted by any angular intra-prediction mode500. In accordance with the embodiment set out herein below, for instance, list528is populated with the DC mode506only in case of the following circumstance being true for all neighboring blocks524and526: either same has been coded using any of the non-angular intra-prediction modes504and506, or same has been intra-predicted using any block-based intra-prediction mode510which, by way of the afore-mentioned mapping from block-based intra-prediction modes510onto the modes within set508, is mapped onto any of the non-angular intra-prediction modes504and506. Merely in the that case, the DC intra-prediction mode506, is positioned in list528. In that case, it might be positioned before any angular intra-prediction mode500in the order530as may be seen from the subsequent example.

In other words, the list528of most probable intra-prediction modes is, for example, populated with the DC intra-prediction mode506only in case of, for each of the neighboring blocks524and526, the respective neighbouring block predicted using any of at least one non-angular intra-prediction modes504and506with the first set508, which comprise the DC intra-prediction mode506, or predicted using any of block-based intra-prediction modes510which, by way of a mapping from the second set520of block-based intra-prediction modes510onto the intra-prediction modes within the first set508, which is used for the formation of the list528of most probable intra-prediction modes, is mapped onto any of the at least one non-angular inter-prediction modes500. The DC intra-prediction mode506, for example, is positioned before any angular intra-prediction mode500in the list528of most probable intra-prediction modes.

Thus, resuming the description as to how predetermined block18is coded into the data stream12, the data stream12contains, if the set-selective syntax element522indicates that the predetermined block18is to be coded by any mode out of the first set508, optionally an MPM syntax element532which indicates whether the intra-prediction mode to be used for predetermined block18is within list528and if yes, the data stream12comprises an MPM list index534pointing into list528indicating the mode, i.e. a predetermined intra-prediction mode, to be used for predetermined block18out of list528by indexing same along order530. If, however, the mode out of set508is not within list528, as indicated by the MPM syntax element532, then the data stream12comprises for block18a further syntax element536indicating which mode, i.e. a predetermined intra-prediction mode, is to be used for block18out of set508. The further syntax element536may indicate the mode in a manner by merely distinguishing between those modes out of set508, which are not contained in list528.

In other words, an apparatus for decoding the predetermined block18, for example, is configured to derive the MPM syntax element532from the data stream which indicates whether the predetermined intra-prediction mode of the first set508of intra-prediction modes is within the list528of most probable intra-prediction modes or not, if the set-selective syntax element522indicates that the predetermined block18is to be predicted using one of the first set508of intra-prediction modes. If the MPM syntax element532indicates that the predetermined intra-prediction mode of the first set508of intra-prediction modes is within the list528of most probable intra-prediction modes, the apparatus, for example, is configured to perform the formation of the list528of most probable intra-prediction modes on the basis of intra-prediction modes using when neighbouring blocks524,526neighbouring the predetermined block100are predicted and perform the derivation of the MPM list index534from the data stream12which points to a predetermined intra-prediction mode of the list528of most probable intra-prediction modes. If the MPM syntax element532from the data stream12indicates that the predetermined intra-prediction mode of the first set508of intra-prediction modes is not within the list528of most probable intra-prediction modes, the apparatus is configured to derive a further list index536from the data stream which indicates the predetermined intra-prediction mode out of the first set of intra-prediction modes. Thus based on the MPM syntax element532the data stream12comprises either the MPM list index534or the further list index536for the prediction of the predetermined block18.

By removing the circumstances where list528comprises a DC intra-prediction mode506, the following advantage is achieved. In particular, the inventors of the present application found out that “consuming” valuable list positions of list528with the DC intra-prediction mode506out of set508for coding/decoding the predetermined block18which is ought to use any of the intra-prediction modes of set508as indicated by syntax element522, i.e. the set-selective syntax element, would negatively affect the coding efficiency as such DC intra-prediction mode506out of set508competes, anyway, with the block-based intra-prediction modes510. Accordingly, “consuming” the list positions of list528with such DC intra-prediction mode506out of set508would result into an increased likelihood for a situation where the intra-prediction mode, i.e. the predetermined intra-prediction mode, to be finally used for the predetermined block18is not within list528so that the syntax element536, i.e. the further list index, needs to be transmitted in data stream12.

In particular, as the syntax element522already indicates for a block18whether the same should be predicted using any of the modes within set508or any of the block-based modes510of the set520, it seems as if, if the syntax element522indicates that the modes within set508are to be advantageous for block18, and that, accordingly, the block-based modes510are not to be used for block18, the likelihood that the DC prediction mode506out of set508could be suitable for block18is so low that the occurrence thereof in list528should be restricted to a very limited set of constellations of modes used for neighboring blocks524and526, namely the constellations set out above.

In the other case, i.e., in the case where the set-selective syntax element522indicates that the pre-determined block18is to be predicted using any of the block-based intra-prediction modes510, the coding of block18into data stream12and this decoding there from may be done in the manner set out above. To this end, indexing may be used in order to index the selected one out of, or indicate as to which of, the block-based intra-prediction modes510out of set520, i.e. second set of block-based intra-prediction modes, is to be used. A further MPM syntax element538may indicate whether the indexing is done by an index540, i.e. by a further MPM list index, which indicates the block-based intra-prediction mode510to be used for block18out of a list542of most probable block-based intra-prediction modes510, namely by indexing along a list order544, or whether the block-based intra-prediction mode510to be used for block18is indicated by a further syntax element546, i.e. by an even further list index, which indicates the block-based intra-prediction modes510out of set520, wherein the latter syntax element546may, for instance, only distinguish between those modes510within set520not already contained within list542. The list construction of list542may be done based on the modes using which block524and526have been predicted. If any of the blocks524and526is not available since being outside the picture or since being inter-predicted, a default intra-prediction mode such as one out of set508may be used instead. For each block524and526, having been intra-predicted using a mode out of set508rather than set520, the afore-described mapping from modes of set508onto modes out of set520is used to obtain an intra-prediction mode510, i.e. a predetermined block-based intra-prediction mode, for the respective block, i.e. the predetermined block18, and based on the resulting block-based intra-prediction modes for blocks524and526, the list542is construed.

According to an embodiment, the apparatus for decoding the predetermined block18is configured to derive a further MPM syntax element538from the data stream12which indicates whether the predetermined block-based intra-prediction mode of the second set520of block-based intra-prediction modes510is within a list542of most probable block-based intra-prediction modes or not, if the set-selective syntax element522indicates that the predetermined block18is not to be predicted using one of the first set508of intra-prediction modes. If the further MPM syntax element538indicates that the predetermined block-based intra-prediction mode of the second set520of block-based intra-prediction modes510is within a list542of most probable block-based intra-prediction modes, the apparatus, for example, is configured to form the list542of most probable block-based intra-prediction modes on the basis of intra-prediction modes using when neighbouring blocks524,526neighbouring the predetermined block18are predicted and derive a further MPM list index540from the data stream12which points into the list542of most probable block-based intra-prediction modes onto the predetermined block-based intra-prediction mode. If the further MPM syntax element538indicates that the predetermined block-based intra-prediction mode of the second set520of block-based intra-prediction modes is not within a list542of most probable block-based intra-prediction modes, the apparatus is configured to derive an even further list index546from the data stream12which indicates the predetermined block-based intra-prediction mode out of the second set520of block-based intra-prediction modes. Thus based on the further MPM syntax element538the data stream12comprises either the further MPM list index540or the even further list index546for the prediction of the predetermined block18.

Although the further MPM syntax element538, the further MPM list index540and the even further list index546are represented in the data stream12inFIG. 12as being parallel to the MPM syntax element532, the MPM list index534and the further list index536, it is clear, that either the further MPM syntax element538and the index associated with the further MPM syntax element538, e.g. the further MPM list index540or the even further list index546, are comprised by the data stream12or the MPM syntax element532and the index associated with the MPM syntax element532, e.g. the MPM list index534or the further list index536. Which of this syntax elements and indices are comprised by the data stream12, depends, for example, on the set-selective syntax element522.

An example for a syntax element portion of data stream12written as a pseudo code could look as shown inFIGS. 19ato 19d, wherein the reference signs indicate as to which syntax element correspond to the syntax elements discussed before.

The list construction of list528may be defined as follows, wherein candIntraPredModeA/B indicating the intra-prediction mode using which any of blocks524and526has been predicted, such as A for block524and B for block526, or onto which mode the intra-prediction mode is mapped out of set508, in case of the corresponding block524or526have been intra-predicted using any of the block-based intra-prediction modes510. INTRA_DC is used to indicate mode506, and the angular modes500are indicated by INTRA_ANGULAR# with the numbering (#) ordering the angular modes as exemplarily indicated above, namely in a manner so that the angular direction502monotonically decreases or increases with increasing number. The ordering among the modes within set508may be as defined in the subsequent table where INTRA_PLANAR indicates mode504.

Note that in the example above, the index534is, in fact, distributed onto the syntax elements534′ and534″: The former534′ is specific for the first, in order530, position of list528where, according to this example, the INTRA_PLANAR mode504is inevitably positioned. The latter534″ is points to any of the subsequent positions of list528where, as described, the DC mode506is only included in the described special circumstances.

Further, in the example above, further syntax elements are included in the data stream in case of syntax element522indicating that any among the modes within set508are used, which further syntax elements somehow parametrize the intra-prediction modes within set500. For instance, a syntax element600parametrizes or varies a region where the reference samples17are positioned based on which the modes in set508intra-predict the inner of block18, such as in terms of distance towards block's18outer circumference. Additionally or alternatively, a syntax element602parametrizes or varies whether the reference samples17are used by the modes in set508to intra-predict the inner of block18globally or en block, or whether the intra-prediction is done in pieces or portions into which the block18is sub-divided, and which are intra-predicted sequentially so that the prediction residual coded into the data stream for one portion may serve for recruiting new reference samples for intra-predicting a following portion. The latter coding option controlled by syntax element may be available only (and the corresponding syntax element may be present in the data stream only) if the syntax element600has a predetermined state corresponding to, for instance, the region, where the reference samples17lie, abutting the block18. The portions may be defined by subdividing the block along a predetermined direction such as either horizontally, thereby leading to portions being as high as block18, or vertically, thereby leading to portions being as wide as block18. A syntax element604may be present in the data stream if the partitioning is signaled to be active, which controls as to which split direction is used. As can be seen, it might be that the position in list528which is reserved for the INTRA_PLANAR mode, is available only in case of a certain parametrizing of the modes by the just-mentioned parametrizing syntax elements such as only if the syntax element600has a predetermined state corresponding to, for instance, the region where the reference samples17lie, abutting the block18and/or if the portion wise intra-prediction mode is not active as signaled by syntax element602.

9. EMBODIMENTS MAKING USE OF BLOCK/MATRIX-BASED INTRA PREDICTION MODES ALONG WITH OTHER INTRA-PREDICTION MODES AND USE OF SECONDARY TRANSFORMS

The following description presents embodiments for combining block/matrix-based prediction with other intra-prediction modes along with using secondary transforms for coding the prediction residual. Above presentation of possibilities for matrix/based intra prediction (ALWIP) and combination thereof with other intra prediction modes shall serve as examples to implement the embodiments described in hereinbelow. InFIG. 12, for instance, all details regarding the MPM list constructions with respect to the restricted inclusion of the DC mode thereinto are optional.

As described above, matrix-based intra prediction (MIP), also denoted as block-based intra prediction and ALWIP herein, generates an intra-prediction signal on a rectangular block by performing a matrix-vector multiplication where the output of the matrix-vector multiplication may be regarded as being a prediction signal on a downsampled block and where the input of the matrix vector multiplication may be comprised by downsampled boundary samples. If the output is regarded as a prediction signal on a downsampled block, this prediction signal needs to undergo an upsampling (or linear interpolation) stage before the final prediction signal is obtained.

On the other hand, for the conventional intra prediction modes like the Planar mode504, the DC mode506and the angular modes500, also denoted as modes of the set508in the above description, non-separable secondary transform (LFNST) is a tool used to transform the prediction residuals corresponding to these intra prediction modes. Here, a set S of transform sets is given such that each conventional intra prediction mode is associated with one of these transform sets. Then, at the decoder, it can be extracted from the bitstream whether on a given block LFNST is to be applied. If this is the case, one transform set out of the set S is given, depending on the intra prediction mode used on the current block, and, if this transform set consist of more than one transform, it can be extracted from the bitstream which transform T out of this set is to be used. Then, at the decoder, the transform T is applied as a secondary transform Ts, meaning that it is applied to a subset622of the residual transform coefficients620of a separable primary transform Tp as, for example, shown inFIG. 14.

The problem is that the aforementioned secondary transforms Ts are a priori only defined for the conventional intra prediction modes. Providing specific secondary transforms Ts for each MIP mode510may be too costly in terms of the memory requirement to additionally store extra transforms.

FIG. 13illustrates a decoder solving this problem. The decoder decodes a predetermined block18of a picture using intra-prediction. An encoder, according to an embodiment, comprises parallel features and/or functionalities as the decoder.

The decoder/encoder is configured to select602a predetermined intra prediction mode604out of a plurality600of intra-prediction modes which comprises a first set508of intra-prediction modes and a second set520of matrix-based intra-prediction modes510. This intra-mode selection602is performed based on a data stream12, by the decoder, wherein the encoder is configured to signal the predetermined intra prediction mode604in the data stream12. The intra-mode selection602may be performed as described with regard toFIG. 12.

The first set508of intra-prediction modes comprises a DC intra prediction mode506and angular prediction modes500and optionally a planar intra prediction mode504. In case of the predetermined intra prediction mode604being a matrix-based intra-prediction mode510out of the second set520, the decoder/encoder is configured to use a matrix-vector product512between a vector514derived from reference samples17in a neighbourhood of the predetermined block18and a prediction matrix516associated with the respective matrix-based intra-prediction mode510is used to obtain a prediction vector518, on the basis of which samples of the predetermined block18are predicted. A prediction of the predetermined block18using a matrix-based intra-prediction mode510as the predetermined intra prediction mode604can be performed by the decoder/encoder according to embodiments ofFIGS. 6 to 11. The decoder/encoder is configured to derive a prediction signal606for the predetermined block18using the predetermined intra-prediction mode604.

The decoder/encoder is configured to select608a subset610of one or more secondary transforms Ts(i1)-Ts(in), with i1being in a range of 1 to N and inbeing in a range of i1to N, out of a set612of secondary transforms Ts, e.g. Ts(1)-Ts(N), in a manner dependent on the predetermined intra prediction mode604so that the subset610is nonempty in case of the predetermined intra prediction mode604being contained in the first set508of intra-prediction modes and in case of the predetermined intra prediction mode604being contained in the second set520of matrix-based intra-prediction modes510.

According to an embodiment, the decoder/encoder is configured to select608the subset610so that each secondary transform Ts of the set612of secondary transforms Ts is contained in the subset610of one or more secondary transforms Ts selected for at least one of the intra-prediction modes within the first508and second520sets. Thus the subset610may be equal to the set612of secondary transforms. Such a subset may be selected for one or more matrix-based intra-prediction modes510. For one or more matrix-based intra-prediction modes510, it might be possible to select all the secondary transforms Ts of the set612of secondary transforms, whereby the subset610for this one or more matrix-based intra-prediction modes510comprises secondary transform Ts selectable for intra-prediction modes within the first set508of intra-prediction modes. Thus, for at least one of the matrix-based intra-prediction modes510no specific additional secondary transforms are needed in the set612of secondary transforms.

According to an embodiment, the decoder/encoder is configured to select608the subset610in a manner so that each secondary transform Ts of each subset610matrixof secondary transforms Ts selected for any matrix-based intra-prediction mode510is contained by a subset, e.g.610DCand/or610planar, of secondary transforms Ts selected for at least one intra-prediction mode within the first set508not belonging to the angular prediction modes500.FIG. 15indicates different possible subsets of secondary transforms Ts selected for any matrix-based intra-prediction mode510. The decoder/encoder may be configured to select, for each matrix-based intra-prediction mode510, a subset610of a first union611matrixof subsets610of secondary transforms for the matrix-based intra-prediction modes510.

As shown inFIG. 15, a subset610selectable for one or more matrix-based intra-prediction modes510can be equal to a subset, e.g.610DC1or610DC2, selectable for DC intra-prediction modes506or can be equal to a subset, e.g.610planar1or610planar2, selectable for planar intra-prediction modes504. It is possible, that a subset610selectable for one or more matrix-based intra-prediction modes510comprises only one or more secondary transforms, e.g. Ts(ax)to Ts(ay), of a subset, e.g.610DC, of secondary transforms Ts selected for one intra-prediction mode within the first set508not belonging to the angular prediction modes500, as indicated by the subset610matrix4.

A subset610selectable for matrix-based intra-prediction modes510may contain one or more secondary transforms out of two or more subsets, e.g.610DC1and610DC2, selectable for DC intra-prediction modes506, as indicated by the subset610matrix1, or may contain one or more secondary transforms out of two or more subsets, e.g.610planar1and610planar2, selectable for planar intra-prediction modes504, as indicated by the subset610matrix3.

A further possible subset610selectable for matrix-based intra-prediction modes510may comprise one or more secondary transforms out of one or more subsets, e.g.610DC2, selectable for DC intra-prediction modes506and one or more secondary transforms out of one or more subsets, e.g.610planar1, selectable for planar intra-prediction modes504, as indicated by the subset610matrix2.

According to an embodiment, the decoder/encoder is configured to select608the subset610in a manner so that an intersection between the first union611matrix of subsets610of secondary transforms selected for the matrix-based intra-prediction modes510and a second union611angularof subsets610angularof secondary transforms selected for all angular intra-prediction modes is empty. A third union611DCcomprises all subsets610DCselected for the DC intra-prediction modes506and a fourth union611planarcomprises all subsets610planarselected for the planar intra-prediction modes504. For example, due to a downsampling optionally applied to a reduced prediction signal606, the MIP modes510are, as the Planar-504and the DC-mode506, non-directional and thus their prediction residuals618have more statistical similarities with those of the DC-506and the Planar-modes504than with those of the angular modes500.

Furthermore, as shown inFIG. 13, the decoder is configured to derive614, from the data stream, encoded by the encoder into the data stream, a transformed version616of a prediction residual for the predetermined block18, which is related to a spatial domain version618of the prediction residual of the predetermined block18via a transform T defined by a concatenation of a primary transform Tp and a predetermined secondary transform Ts out of the subset610of secondary transforms. As shown inFIG. 14, the encoder can be configured to apply the transform T onto a subset622of coefficients620of the primary transform Tp, in case of the predetermined intra prediction mode being contained in the first set508of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set520of matrix-based intra-prediction modes510. The decoder can be configured to use an inverse T−1of the transform T to obtain the spatial domain version618of the prediction residual of the predetermined block18. The primary transform, for example, is a separable 2D transform and the secondary transform, for example, is a non-separable 2D transform.

The decoder is configured to reconstruct624the predetermined block18using the prediction signal606and the prediction residual618for the predetermined block18.

If the subset610of one or more secondary transforms Ts contains more than one secondary transform Ts, the decoder may be configured to select the predetermined secondary transform Ts out of the subset610of one or more secondary transforms depending on a secondary-transform-indicating syntax element transmitted in the data stream12for the predetermined block. The secondary-transform-indicating syntax element may be an index pointing into the selected subset610of one or more secondary transforms. The encoder may in this case be configured to transmit the secondary-transform-indicating syntax element in the data stream12.

According to an embodiment, the decoder is configured to infer that the transform T via which the transformed version616of a prediction residual for the predetermined block18is related to the spatial domain version618of the prediction residual of the predetermined block18is the primary transform Tp, if dimensions of the predetermined block18meet a predetermined criterion. Otherwise the transform T may be the concatenation of a primary transform Tp and the predetermined secondary transform Ts. The decoder renders available the second set520of matrix-based intra-prediction modes510for the selection602of the predetermined intra prediction mode604irrespective of the dimensions of the predetermined block18meeting the predetermined criterion. The predetermined criterion for the dimensions of the predetermined block18may only be relevant for the subset selection608and not for the intra-mode selection602. There are, for example, block dimensions for which MIP/ALWIP510is available although LFNST, i.e. the subset selection608, is not. For a block18of such dimensions, no secondary-transform-indicating syntax element needs to be transmitted in, and read from, the data stream. The predetermined criterion, for example, is met if the dimensions fall below a predetermined threshold. For small predetermined blocks18, it might not be beneficial, meaning that for the latter shapes, the additional signalization costs to signal whether LFNST is to be applied for a block in MIP mode or not is, on average, higher than the gain one obtains by allowing LFNST transforms for the MIP modes.

According to an embodiment, the decoder is configured to read a non-zero zone indication transmitted in the data stream12for the respective predetermined block18which indicates a non-zero transform domain area623within the transformed version616of the prediction residual for the predetermined block18, as shown inFIG. 16. All non-zero coefficients are located exclusively in the non-zero transform domain area623. The non-zero zone indication, for example, is transmitted in the data stream12by the encoder. The decoder/encoder is configured to decode/encode the coefficients within the non-zero transform domain area623from/into the data stream12. A LP syntax element may act as the non-zero zone indication. A last non-zero coefficient position along a scan path leading from a DC coefficient position to opposite, or highest frequency, coefficient position, is indicated by the LP syntax element herein. The LP syntax element may quasi serve as a measure for an expected count of non-zero coefficients within the non-zero transform domain area623.

According to an embodiment, the decoder is configured to infer that the transform T via which the transformed version616of the prediction residual for the predetermined block18is related to the spatial domain version618of the prediction residual of the predetermined block18is the primary transform Tp depending on an extension and/or position of the non-zero transform domain area623meeting a first predetermined criterion and/or a number of non-zero coefficients within the non-zero transform domain area623meeting a second predetermined criterion.

The first predetermined criterion, for example, is such that same is met if the non-zero transform domain area623does not exclusively cover the subset622of coefficients of the primary transform Tp onto which the secondary transform Tp is applied by the concatenation. This is based on the idea, that the secondary transform Ts should cover all non-zero coefficients of the transform coefficients of the primary transform Tp. In case of non-zero coefficients being outside of the subset622of coefficients of the primary transform Tp, it may not be advantageous to apply the predetermined secondary transform, for which reason the decoder infers that the transform T is the primary transform Tp. The decoder may perform the subset selection608and apply the transform T defined by the concatenation of a primary transform Tp and the predetermined secondary transform Ts out of the subset610of secondary transforms applied onto the subset622of coefficients of the primary transform Tp to obtain the spatial domain version618of the prediction residual of the predetermined block18if the non-zero transform domain area623is positioned completely inside the subset622of coefficients of the primary transform Tp onto which the secondary transform Tp is applied by the concatenation, see, e.g.,FIG. 16.

The second predetermined criterion, for example, is such that same is met if the number of non-zero coefficients within the non-zero transform domain area623falls below a predetermined threshold. This is based on the idea, that the number of non-zero coefficients within the non-zero transform domain area623does not need to be further reduced by a secondary transform Ts, if the number falls below the predetermined threshold. In case of a small number of non-zero coefficients of the primary transform Tp, it may not be advantageous to apply additionally the predetermined secondary transform, for which reason the decoder infers that the transform T is the primary transform Tp. The additional signalling costs for the predetermined secondary transform would be higher than the achieved increased coding efficiency by the predetermined secondary transform in case of the number of non-zero coefficients falling below a predetermined threshold. The decoder may perform the subset selection608and apply the transform T defined by the concatenation of a primary transform Tp and the predetermined secondary transform Ts out of the subset610of secondary transforms applied onto the subset622of coefficients of the primary transform Tp to obtain the spatial domain version618of the prediction residual of the predetermined block18if the number of non-zero coefficients within the non-zero transform domain area623equals or exceeds the predetermined threshold.

According to an embodiment, the decoder/encoder is configured to derive/encode a set-selective syntax element522from/into the data stream12which indicates whether the predetermined block18is to be predicted using one of the first set508of intra-prediction modes, as, e.g., described with regard toFIG. 12. If the set-selective syntax element522indicates that the predetermined block18is to be predicted using one of the first set508of intra-prediction modes, the decoder/encoder is configured to form a list528of most probable intra-prediction modes on the basis of intra-prediction modes using which neighbouring blocks524and526neighbouring the predetermined block18are predicted and derive/signal a MPM list index534from/into the data stream12which points into the list528of most probable intra-prediction modes onto the predetermined intra-prediction mode604. If the set-selective syntax element522indicates that the predetermined block18is not to be predicted using one of the first set508of intra-prediction modes, the decoder/encoder is configured to derive/encode a further index540and/or546from/into the data stream which indicates the predetermined intra-prediction mode604out of the second set520of matrix-based intra-prediction modes510.

The decoder and the encoder, described with regard toFIG. 13, may comprise further features and/or functionalities as described with regard toFIG. 12.

In case of the predetermined intra-prediction mode604for the predetermined block18being a matrix-based intra-prediction mode510out of the second set520, the apparatus, i.e. the decoder according toFIG. 13, for decoding the predetermined block18and/or the apparatus, i.e. the encoder according toFIG. 13, for encoding the predetermined block18can comprise one or more of the following features.

According to an embodiment, the apparatus is configured to form a sample value vector, e.g. the sample value vector400as described with regard to one of the embodiments ofFIGS. 6 to 9, out of the plurality of reference samples17and derive from the sample value vector the vector514so that the sample value vector is mapped by a predetermined invertible linear transform onto the vector514. In this case, the vector514can be understood as a further vector. The vector514is, for example, determined and/or defined as described for the further vector402with regard to one of the embodiment ofFIGS. 8 to 11.

According to an embodiment, the apparatus is configured to form the sample value vector out of the plurality of reference samples17by, for each component of the sample value vector, adopting one reference sample of the plurality of reference samples as the respective component of the sample value vector, and/or averaging two or more components of the sample value vector to obtain the respective component of the sample value vector.

The plurality of reference samples17are, for example, arranged within the picture alongside an outer edge of the predetermined block18.

The invertible linear transform is, for example, defined such that a predetermined component of the vector514, e.g. of the further vector, becomes a, and each of other components of the vector514, except the predetermined component, equal a corresponding component of the sample value vector minus a. The value a is, for example, a predetermined value1400.

According to an embodiment, the predetermined value1400is one of an average, such as an arithmetic mean or weighted average, of components of the sample value vector, a default value, a value signalled in a data stream into which the picture is coded, and a component of the sample value vector corresponding to the predetermined component.

The invertible linear transform is, for example, defined such that a predetermined component of the vector514, e.g. of the further vector, becomes a, and each of other components of the vector514, except the predetermined component, equal a corresponding component of the sample value vector minus a, wherein a is an arithmetic mean of components of the sample value vector.

The invertible linear transform is, for example, defined such that a predetermined component of the vector514, e.g. of the further vector, becomes a, and each of other components of the vector514, except the predetermined component, equal a corresponding component of the sample value vector minus a, wherein a is a component of the sample value vector corresponding to the predetermined component. The apparatus is, for example, configured to comprise a plurality of invertible linear transforms, each of which is associated with one component of the vector514, select the predetermined component out of the components of the sample value vector and use the invertible linear transform out of the plurality of invertible linear transforms which is associated with the predetermined component as the predetermined invertible linear transform.

According to an embodiment, matrix components of the prediction matrix516within a column of the prediction matrix516which corresponds to the predetermined component of the vector514, e.g. of the further vector, are all zero. The apparatus is configured to compute the matrix-vector product512by performing multiplications by computing a matrix vector product512between a reduced prediction matrix resulting from the prediction matrix516by leaving away the column and a further vector410resulting from the vector514by leaving away the predetermined component, as shown inFIG. 9c.

According to an embodiment, the apparatus is configured to, in predicting the samples of the predetermined block18on the basis of the prediction vector518, compute for each component of the prediction vector518a sum of the respective component and a.

A matrix, which results from summing each matrix component of the prediction matrix516within a column of the prediction matrix516, which corresponds to the predetermined component of the vector514, e.g. of the further vector, with one (i.e. a summation of the matrix C405and the matrix M1300, illustrated inFIG. 9a, resulting in matrix B inFIG. 8), times the invertible linear transform corresponds, for example, to a quantized version of a machine learning prediction matrix (i.e. the prediction matrix A1100shown inFIG. 8).

According to an embodiment, the apparatus is configured to compute the matrix-vector product512using fixed point arithmetic operations.

According to an embodiment, the apparatus is configured to compute the matrix-vector product512without floating point arithmetic operations.

According to an embodiment, the apparatus is configured to store a fixed point number representation of the prediction matrix516.

According to an embodiment, the apparatus is configured to represent the prediction matrix516using prediction parameters and to compute the matrix-vector product512by performing multiplications and summations on the components of the vector514, e.g. of the further vector, and the prediction parameters and intermediate results resulting therefrom, wherein absolute values of the prediction parameters are representable by an n-bit fixed point number representation with n being equal to or lower than 14, or, alternatively, 10, or, alternatively, 8. This can be performed similarly or as described inFIG. 10orFIG. 11.

The prediction parameters comprise, for example, weights each of which is associated with a corresponding matrix component of the prediction matrix516.

The prediction parameters further comprise, for example, one or more scaling factors each of which is associated with one or more corresponding matrix components of the prediction matrix516for scaling the weight associated with the one or more corresponding matrix component of the prediction matrix516, and/or one or more offsets each of which is associated with one or more corresponding matrix components of the prediction matrix516for offsetting the weight associated with the one or more corresponding matrix component of the prediction matrix516.

According to an embodiment, the apparatus is configured to, in predicting the samples of the predetermined block18on the basis of the prediction vector518, use interpolation to compute at least one sample position of the predetermined block18based on the prediction vector518each component of which is associated with a corresponding position within the predetermined block18.

The decoder and the encoder, described with regard toFIG. 13, may comprise further features and/or functionalities as described with regard to one or more embodiments ofFIGS. 6-11.

Thus, a solution provided by the present invention is to associate to each MIP mode510one specific set160of transforms out of the given transforms set S612, the latter being originally defined for the conventional intra prediction modes, i.e. the intra-prediction modes within the first set508. One specific way to do this would be that all MIP modes510use the LFNST transforms, i.e. the secondary transforms, that are initially designed for the Planar504and the DC mode506. For example, due to the downsampling optionally applied to the reduced prediction signal, the MIP modes510are, as the Planar-504and the DC-mode506, non-directional and thus their prediction residuals have more statistical similarities with those of the DC-506and the Planar-modes504than with those of the angular modes500.

It may turn out that to allow LFNST, i.e. to allow the usage of a secondary transform, for MIP510in the aforementioned way might be beneficial in terms of coding efficiency for some block shapes and for other block shapes, it might not be beneficial, meaning that for the latter shapes, the additional signalization costs to signal whether LFNST is to be applied for a block18in MIP mode510or not is, on average, higher than the gain one obtains by allowing LFNST transforms for the MIP modes510. Thus, an embodiment of the present invention, the aforementioned combination of LFNST and MIP510is only allowed on a subset of all those block shapes for which such a combination would in principle be possible.

FIG. 17shows a method6000for decoding a predetermined block (18) of a picture using intra-prediction, comprising selecting (602), based on a data stream, a predetermined intra prediction mode (604) out of a plurality of intra-prediction modes which comprises a first set (508) of intra-prediction modes comprising a DC intra prediction mode (506) and angular prediction modes (500) and optionally a planar intra-prediction mode (504), and a second set (520) of matrix-based intra-prediction modes (510) according to each of which a matrix-vector product (512) between a vector (514) derived from reference samples (17) in a neighbourhood of the predetermined block and a prediction matrix (516) associated with the respective matrix-based intra-prediction mode is used to obtain a prediction vector (518), on the basis of which samples of the predetermined block are predicted. A prediction signal (606) for the predetermined block is derived6100using the predetermined intra-prediction mode and a subset (610) of one or more secondary transforms out of a set (612) of secondary transforms is selected in a manner dependent on the predetermined intra prediction mode so that the subset (610) is nonempty in case of the predetermined intra prediction mode being contained in the first set (508) of intra-prediction modes and the predetermined intra prediction mode being contained in the second set (520) of matrix-based intra-prediction modes (510). The method6000comprises deriving (614), from the data stream, a transformed version (616) of a prediction residual for the predetermined block (18), which is related to a spatial domain version (618) of the prediction residual of the predetermined block via a transform (T) defined by a concatenation of a primary transform (Tp) and a predetermined secondary transform (Ts) out of the subset (610) of secondary transforms applied onto a subset (622) of coefficients (620) of the primary transform, in case of the predetermined intra prediction mode being contained in the first set (508) of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set (520) of matrix-based intra-prediction modes (510). Additionally, the method6000comprises reconstructing (624) the predetermined block using the prediction signal and the prediction residual for the predetermined block (18).

FIG. 18shows a method7000for encoding a predetermined block (18) of a picture using intra-prediction, comprising selecting (602) a predetermined intra prediction mode (604) out of a plurality (600) of intra-prediction modes which comprises a first set (508) of intra-prediction modes comprising a DC intra prediction mode (506) and angular prediction modes (500), and a second set (520) of matrix-based intra-prediction modes (510) according to each of which a matrix-vector product (512) between a vector (514) derived from reference samples (17) in a neighbourhood of the predetermined block and a prediction matrix (516) associated with the respective matrix-based intra-prediction mode is used to obtain a prediction vector (518), on the basis of which samples of the predetermined block are predicted. Additionally, the method7000comprises signalling7100the predetermined intra prediction mode (604) in the data stream, deriving7200a prediction signal (606) for the predetermined block using the predetermined intra-prediction mode and selecting a subset (610) of one or more secondary transforms out of a set (612) of secondary transforms in a manner dependent on the predetermined intra prediction mode so that the subset (610) is nonempty in case of the predetermined intra prediction mode being contained in the first set (508) of intra-prediction modes and the predetermined intra prediction mode being contained in the second set (520) of matrix-based intra-prediction modes (510). The method comprises encoding (614), into the data stream, a transformed version (616) of a prediction residual for the predetermined block (18), which is related to a spatial domain version (618) of the prediction residual of the predetermined block via a transform (T) defined by a concatenation of a primary transform (Tp) and a predetermined secondary transform (Ts) out of the subset (610) of secondary transforms applied onto a subset (622) of coefficients (620) of the primary transform, in case of the predetermined intra prediction mode being contained in the first set (508) of intra-prediction modes and in case of the predetermined intra prediction mode being contained in the second set (520) of matrix-based intra-prediction modes (510), wherein the predetermined block is reconstructable (624) using the prediction signal and the prediction residual for the predetermined block (18).

REFERENCES

Further Embodiments and Examples

Generally, examples may be implemented as a computer program product with program instructions, the program instructions being operative for performing one of the methods when the computer program product runs on a computer. The program instructions may for example be stored on a machine readable medium.

Other examples comprise the computer program for performing one of the methods described herein, stored on a machine-readable carrier.

In other words, an example of method is, therefore, a computer program having program instructions for performing one of the methods described herein, when the computer program runs on a computer.

A further example of the methods is, therefore, a data carrier medium (or a digital storage medium, or a computer-readable medium) comprising, recorded thereon, the computer program for performing one of the methods described herein. The data carrier medium, the digital storage medium or the recorded medium are tangible and/or non-transitionary, rather than signals which are intangible and transitory.

A further example of the method is, therefore, a data stream or a sequence of signals representing the computer program for performing one of the methods described herein. The data stream or the sequence of signals may for example be transferred via a data communication connection, for example via the Internet.

A further example comprises a processing means, for example a computer, or a programmable logic device performing one of the methods described herein.

A further example comprises a computer having installed thereon the computer program for performing one of the methods described herein.

A further example comprises an apparatus or a system transferring (for example, electronically or optically) a computer program for performing one of the methods described herein to a receiver.

The receiver may, for example, be a computer, a mobile device, a memory device or the like. The apparatus or system may, for example, comprise a file server for transferring the computer program to the receiver.

In some examples, a programmable logic device (for example, a field programmable gate array) may be used to perform some or all of the functionalities of the methods described herein. In some examples, a field programmable gate array may cooperate with a microprocessor in order to perform one of the methods described herein. Generally, the methods may be performed by any appropriate hardware apparatus.