Methods and devices for coding and decoding a data stream representative of at least one image
11457213 · 2022-09-27
Assignee
Inventors
Cpc classification
H04N19/159
ELECTRICITY
International classification
H04N19/159
ELECTRICITY
Abstract
A coding method and a decoding method for decoding a coded data stream representative of at least one image that is split into blocks. For at least one current block of the image, an item of information indicating a coding mode of the current block is decoded from the data stream. When the coding mode of the current block corresponds to a first coding mode, the current block is decoded using a first determined quantization step to dequantize, in the transform domain, a prediction residue associated with the current block. When the coding mode of the current block corresponds to a second coding mode, the current block is decoded using a second determined quantization step to dequantize, in the spatial domain, a prediction residue associated with the current block. The first quantization step and the second quantization step are determined according to the same quantization parameter.
Claims
1. A decoding method for decoding a coded data stream representative of at least one image performed by a decoding device, said image being split into blocks, the decoding method comprises, for at least one block of the image, referred to as a current block: decoding an item of information indicating a coding mode of the current block, determining the coding mode of the current block from among at least a first and a second coding mode, when the coding mode of the current block corresponds to the first coding mode, decoding the current block comprising determining a first quantization step according to a quantization parameter to dequantize, in a transform domain, a prediction residue associated with the current block, when the coding mode of the current block corresponds to the second coding mode, decoding the current block comprising determining the first quantization step according to the quantization parameter and determining a second quantization step to dequantize, in a spatial domain, a prediction residue associated with the current block, the second quantization step being determined according to the first quantization step.
2. The decoding method according to claim 1, wherein when the coding mode of the current block corresponds to the second coding mode, the decoding of the current block further comprises, for each pixel of the current block: obtaining a prediction of said pixel from another previously decoded pixel, said other previously decoded pixel belonging to said current block or to a previously decoded block of the image, decoding a prediction residue associated with said pixel, dequantizing said prediction residue associated with said pixel using said second quantization step, reconstructing said pixel by adding the prediction of said pixel to the dequantized prediction residue.
3. The decoding method according to claim 1, wherein the coefficients of the prediction residue associated with the current block, when the coding mode of the current block corresponds to the second coding mode, are decoded by an entropy decoder, which was used to decode the coefficients of the prediction residue associated with the current block, when the coding mode of the current block corresponds to the first coding mode.
4. A coding method for coding a coded data stream representative of at least one image by a coding device, said image being split into blocks, the coding method comprises, for at least one block of the image, referred to as a current block: coding an item of information indicating a coding mode of the current block, determining a coding mode of the current block from among at least a first and a second coding mode; when the coding mode of the current block corresponds to a first coding mode, coding the current block comprising determining a first quantization step according to a quantization parameter to quantize a prediction residue associated with the current block in a transform domain, when the coding mode of the current block corresponds to a second coding mode, coding the current block comprising determining the first quantization step and determining a second quantization step to quantize a prediction residue associated with the current block in a spatial domain, the second quantization step being determined according to the first quantization step.
5. The coding method according to claim 4, wherein when the coding mode of the current block corresponds to the second coding mode, the coding of the current block comprises, for each pixel of the current block: obtaining a prediction of said pixel from another previously decoded pixel, said other previously decoded pixel belonging to said current block or to a previously decoded block of the image, obtaining a prediction residue associated with said pixel from the prediction of said pixel, quantizing said prediction residue associated with said pixel using said second quantization step, coding said quantized prediction residue.
6. The coding method according to claim 4, wherein the coefficients of the prediction residue associated with the current block, when the coding mode of the current block corresponds to the second coding mode, are coded by an entropy encoder, which was used to code the coefficients of the prediction residue associated with the current block, when the coding mode of the current block corresponds to the first coding mode.
7. The decoding method according to claim 1, wherein the second quantization step is determined by a*δ.sub.1+b or c*δ.sub.1.sup.2+d*δ.sub.1+e, with δ.sub.1 corresponding to the first quantization step, and a, b, c, d, e being predetermined numbers.
8. The decoding method according to claim 1, wherein the first quantization step is obtained from a quantization step table predetermined for values of the quantization parameter.
9. The decoding method according to claim 1, wherein the quantization parameter corresponds to a Lagrangian λ used to optimise a D+λ*R function where R corresponds to a rate of the data stream and D corresponds to an associated distortion of the decoded image.
10. The decoding method according to claim 1, wherein the quantization parameter is decoded from the data stream.
11. The decoding method according to claim 1, wherein the decoding of the current block according to the second coding mode further comprises: decoding another prediction residue associated with said current block, dequantizing said other prediction residue associated with said current block using said first quantization step, reconstructing said current block from the reconstructed pixels of the current block and said other dequantized prediction residue.
12. A device for decoding a coded data stream representative of at least one image, said image being split into blocks, wherein the decoding device comprises: a processor (PROC0) configured, for at least one block of the image, referred to as a current block, to: decode an item of information indicating a coding mode of the current block, determining a coding mode of the current block from among at least a first and a second coding mode; when the coding mode of the current block corresponds to the first coding mode, decode the current block by determining a first quantization step according to a quantization parameter to dequantize, in a transform domain, a prediction residue associated with the current block, when the coding mode of the current block corresponds to the second coding mode, decode the current block by determining the first quantization step according to the quantization parameter and determining a second quantization step to dequantize, in a spatial domain, a prediction residue associated with the current block, the second quantization step being determined according to the first quantization step.
13. A coding device for coding a coded data stream representative of at least one image, said image being split into blocks, wherein the coding device comprises: a processor configured, for at least one block of the image, referred to as a current block, to: code an item of information indicating a coding mode of the current block, determining a coding mode of the current block from among at least a first and a second coding mode; when the coding mode of the current block corresponds to the first coding mode, code the current block by determining a first quantization step according to a quantization step to quantize a prediction residue associated with the current block in a transform domain, when the coding mode of the current block corresponds to the second coding mode, code the current block by determining the first quantization step according to the quantization parameter and determining a second quantization step to quantize a prediction residue associated with the current block in a spatial domain, the second quantization step being determined according to the first quantization step.
14. A non-transitory computer-readable medium comprising instructions stored thereon which when executed by a processor of a decoding device configure the decoding device to: decode a coded data stream representative of at least one image performed by a decoding device, said image being split into blocks, the decoding comprising, for at least one block of the image, referred to as a current block: decoding an item of information indicating a coding mode of the current block, determining a coding mode of the current block from among at least a first and a second coding mode, when the coding mode of the current block corresponds to the first coding mode, decoding the current block comprising determining a first quantization step according to a quantization parameter to dequantize, in a transform domain, a prediction residue associated with the current block, when the coding mode of the current block corresponds to the second coding mode, decoding the current block comprising determining the first quantization step according to the quantization parameter and determining a second quantization step to dequantize, in a spatial domain, a prediction residue associated with the current block, the second quantization step being determined according to the first quantization step.
15. The coding method according to claim 4, wherein the second quantization step is determined by a*δ.sub.1+b or c*δ.sub.1.sup.2+d*δ.sub.1+e, with δ.sub.1 corresponding to the first quantization step, and a, b, c, d, e being predetermined numbers.
16. The coding method according to claim 4, wherein the first quantization step is obtained from a quantization step table predetermined for values of the quantization parameter.
17. The coding method according to claim 4, wherein the quantization parameter corresponds to a Lagrangian λ used to optimise a D+λ*R function where R corresponds to a rate of the data stream and D corresponds to an associated distortion of the decoded image.
18. The coding method according to claim 4, wherein the quantization parameter is coded in the data stream.
Description
4. LIST OF FIGURES
(1) Other characteristics and advantages of the invention will emerge more clearly upon reading the following description of a particular embodiment, provided as a simple illustrative non-restrictive example, and the annexed drawings, wherein:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
5. DESCRIPTION OF AN EMBODIMENT OF THE INVENTION
5.1 General Principle
(9) The general principle of the invention is to determine a first quantization step used to quantize transform coefficients of a prediction residue and a second quantization step used to directly quantize the values of a prediction residue in the space domain (i.e. without any transform operation), jointly. For this purpose, the first and second quantization steps depend on the same quantization parameter.
(10) According to different particular embodiments of the invention, the quantization parameter can correspond to one or other of the first and second quantization steps, or to a quantization parameter determined by the encoder or by the user, or to a Lagrangian used during rate/distortion optimisation at the encoder.
(11) The quantization parameter can also be coded in the data stream and transmitted to the decoder.
(12) When the quantization parameter corresponds to the first quantization step, the second quantization step can be determined according to a linear or polynomial function of the first quantization step, or a more general function.
(13) The invention thus improves the compression performance when different coding modes respectively carrying out a coding of a prediction residue with and without transform operation are used in the same system for coding/decoding images or sequences of images.
5. 2 Embodiments
(14)
(15) A sequence of images I.sub.1, I.sub.2, . . . , I.sub.Nb, Nb being the number of images of the sequence to be coded, is provided as input of the coding method. The coding method outputs a coded data stream STR representative of the sequence of images provided as input.
(16) In a known manner, the coding of the sequence of images I.sub.1, I.sub.2, . . . , I.sub.Nb is done image by image according to a coding order previously established and known to the encoder. For example, the images can be coded in the temporal order I.sub.1, I.sub.2, . . . , I.sub.Nb or in another order, for example I.sub.1, I.sub.3, I.sub.2, . . . , I.sub.Nb.
(17) In a step E0, an image I.sub.j to be coded of the sequence of images I.sub.1, I.sub.2, . . . , I.sub.Nb is split into blocks, for example into blocks of size 32×32 or 64×64 pixels or more. Such a block can be subdivided into square or rectangular sub-blocks, for example 16×16, 8×8, 4×4, 16×8, 8×16 . . . .
(18) In an optional step E10, according to a particular embodiment of the invention, a quantization parameter QP is coded in the data stream STR, at the data coded for the image I.sub.j or at the data coded for the sequence of images.
(19) Then, in a step E1, a first block or sub-block X.sub.b to be coded of the image I.sub.j, is selected according to a predetermined scanning order of the image I.sub.j. For example, it can be the first block in the lexicographical scanning order of the image.
(20) In a step E2, the encoder will choose the coding mode to code the current block X.sub.b.
(21) According to the particular embodiment described here, the encoder selects the coding mode to code the current block X.sub.b from a first coding mode M1 and a second coding mode M2.
(22) Additional coding modes (not described here) can be used.
(23) According to the particular embodiment described here, the first coding mode M1 corresponds to the coding of the current block by conventional intra prediction, for example as defined according to the HEVC standard, and the second coding mode M2 corresponds to the In-Loop Residual (ILR) prediction coding.
(24) The principle of the invention can be extended to other types of coding modes, whether for the first coding mode M1 or the second coding mode M2. For example, the first coding mode can correspond to any type of coding modes using a transform of the prediction residue before quantizing the coefficients resulting from the transform operation (inter-image prediction coding, spatial prediction with template matching coding, etc.). The second coding mode can correspond to any type of coding modes using a quantization of the values of the prediction residue in the spatial domain, i.e. without performing any transform operation, for example DCT, of the prediction residue.
(25) In step E2, the encoder can perform a rate/distortion optimisation to determine the best coding mode to code the current block. During this rate/distortion optimisation, additional coding modes distinct from the first and the second coding modes can be tested, for example an inter mode coding mode. During this rate/distortion optimisation, the encoder simulates the coding of the current block X.sub.b according to the different available coding modes in order to determine the rate and the distortion associated with each coding mode and selects the coding mode offering the best rate/distortion compromise, for example according to the D+λR function, where R is the rate required to code the current block according to the evaluated coding mode, D is the distortion measured between the decoded block and the original current block, and λ is a Lagrangian multiplier, for example entered by the user or defined at the encoder.
(26) In a step E20, an item of information indicating the coding mode selected for the current block is coded in the data stream STR.
(27) If the current block X.sub.b is coded according to the first coding mode M1, the method proceeds to step E21 for coding the block according to M1. If the current block X.sub.b is coded according to the second coding mode M2, the method proceeds to step E22 for coding the block according to M2.
(28) Step E21 for coding the block according to the first coding mode M1, according to a particular embodiment of the invention, is described below. According to the particular mode described here, the first coding mode corresponds to a conventional intra prediction, such as the one defined in the HEVC standard.
(29) In a step E210, a quantization step δ.sub.1 is determined. For example, the quantization step δ.sub.1 can be set by the user, or calculated using a quantization parameter setting a compromise between compression and quality and entered by the user or defined by the encoder. Thus, such a quantization parameter can be the parameter λ, used in the rate-distortion cost function D+λ.Math.R where D represents the distortion introduced by the coding and R the rate used for coding. This function is used to make coding choices, typically a way of coding the image that minimises this function is sought.
(30) As a variant, the quantization parameter can be QP, corresponding to the quantization parameter conventionally used in the AVC or HEVC standards. Thus, in the HEVC standard, the quantization step δ.sub.1 is determined by the equation δ.sub.1=levelScale[QP %6]<<(QP/6)) where levelScale[k]={40, 45, 51, 57, 64, 72} for k=0.5.
(31) In a step E211, a prediction of the current block is determined using a conventional intra prediction mode. According to this conventional intra prediction, each predicted pixel is calculated only from the decoded pixels originating from the neighbouring blocks (reference pixels) located above the current block, and to the left of the current block. The way the pixels are predicted from the reference pixels depends on a prediction mode that is transmitted to the decoder, and that is chosen by the encoder from a predetermined set of modes known to the encoder and the decoder.
(32) Thus, in HEVC there are 35 possible prediction modes: 33 modes that interpolate the reference pixels in 33 different angular directions, and 2 other modes: the DC mode in which each pixel of the predicted block is produced from the average of the reference pixels, and the PLANAR mode, that performs a planar and non-directional interpolation. This “conventional intra prediction” is well known and also used in the ITU-T H.264 standard (where there are only 9 different modes) as well as in the experimental JEM software available at the Internet address (https://jvet.hhi.fraunhder.de/), where there are 67 different prediction modes. In all cases, the conventional intra prediction respects the two aspects mentioned above (prediction of the pixels from the neighbouring blocks and transmission to the decoder of an optimal prediction mode).
(33) In step E211, the encoder thus chooses one of the available prediction modes from the predetermined list of prediction modes. One way to choose consists for example in evaluating all the prediction modes and keeping the prediction mode that minimises a cost function such as, classically, the rate-distortion cost.
(34) In a step E212, the prediction mode chosen for the current block is coded from the neighbouring blocks of the current block.
(35) In step E212, the intra prediction mode chosen for the current block is coded using the intra prediction modes associated with the neighbouring blocks.
(36) According to a variant of the particular embodiment of the invention described here, the intra prediction mode associated with a block is: the intra prediction mode that was used to predict the block, if the block was coded by a conventional intra prediction coding mode. the intra prediction mode that was associated with the block, if the block was coded by a coding mode distinct from a conventional intra prediction. An example of such an association is described later in reference to step E229.
(37) Thus, the approach described in the HEVC standard for coding the prediction mode of the current block can be used. In the example in
(38) According to the variant of the particular embodiment described here, the mechanism for creating the MPM list specified according to the HEVC standard is adapted in order to take into account the association of an intra prediction mode with a block during its coding, when this block is not coded according to the conventional intra coding mode (step E229 described later). According to this variant, a neighbouring block of the current block always has an intra prediction mode associated with it, whether this block was coded according to an intra coding mode or according to another coding mode (ILR, inter, etc.).
(39) The rest of the mechanism for creating the MPM list remains similar to the one specified according to the HEVC standard. If m.sub.A and m.sub.B are both equal to the same intra prediction mode and that intra prediction mode is the DC or PLANAR prediction mode, the MPM list includes the following prediction modes: MPM[0]=PLANAR, MPM[1]=DC, MPM[2]=A(26) corresponding to the angular prediction mode at the index 26 of the HEVC intra prediction mode table.
(40) If m.sub.A and m.sub.B are both equal to the same angular prediction mode m(n), the MPM list comprises the following prediction modes: MPM[0]=m(n), MPM[1]=m(2+(n+29)mod 32), MPM[2]=m(2+(n−1)mod 32).
(41) If m.sub.A and m.sub.B are different, the MPM list comprises the following prediction modes:
(42) MPM[0]=m.sub.B, MPM[1]=m.sub.A, MPM[2]=Mlast, where Mlast is defined by: if m.sub.B is not equal to the PLANAR mode and mA is not equal to the PLANAR mode, then Mlast is equal to the PLANAR mode, if not, if m.sub.B is not equal to the DC mode and mA is not equal to the DC mode, then Mlast is equal to the DC mode, otherwise Mlast is equal to the angular mode A(26).
(43) The non-MPM list comprises all the other intra prediction modes not comprised in the MPM list.
(44) According to another variant of the particular embodiment described here, in accordance with the mechanism for creating the MPM list specified according to the HEVC standard, if one of the neighbouring blocks Ab or Bb is not coded according to an intra prediction mode, the DC prediction mode is assigned to it by default. The rest of the mechanism for creating the MPM list remains similar to the one specified according to the HEVC standard and described above.
(45) According to the HEVC standard, in order to code the intra prediction mode of the current block, syntax elements are transmitted: a binary indicator indicating if the prediction mode to be coded for the current block is in the MPM list or not, if the prediction mode of the current block belongs to the MPM list, an index in the MPM list corresponding to the prediction mode of the current block is coded, if the prediction mode of the current block does not belong to the MPM list, an index in the non-MPM list corresponding to the prediction mode of the current block is coded.
(46) In a step E213, the prediction residue R for the current block is constructed.
(47) In step E213, in a conventional manner, a predicted block P is constructed according to the prediction mode chosen in step E211. Then, the prediction residue R is obtained by calculating the difference for each pixel between the predicted block P and the original current block.
(48) In a step E214, the prediction residue R is transformed into RT.
(49) In step E214, a frequency transform is applied to the residue block R in order to produce the block R.sub.T comprising transform coefficients. The transform could be a DCT-type transform for example. It is possible to choose the transform to be used from a predetermined set of transforms E.sub.T and to inform the decoder of the transform used.
(50) In a step E215, the transformed residue block R.sub.T is quantized using for example a quantization step scalar quantization δ.sub.1. This produces the quantized transformed prediction residue block R.sub.TQ.
(51) In a step E216, the coefficients of the quantized block R.sub.TQ are coded by an entropy encoder. For example, the entropy coding specified in the HEVC standard can be used.
(52) According to the embodiment variant described here, in a step E217, the prediction mode determined in step E211 is associated with the current block.
(53) In a known manner, the current block is decoded by dequantizing the coefficients of the quantized block R.sub.TQ, then applying the inverse transform to the dequantized coefficients to obtain the decoded prediction residue. The prediction is then added to the decoded prediction residue in order to reconstruct the current block and obtain its decoded version. The decoded version of the current block can then be used later to spatially predict other neighbouring blocks of the image or to predict blocks of other images by inter-image prediction.
(54) Step E22 for coding the block according to the second coding mode M2, according to a particular embodiment of the invention, is described below. According to the particular embodiment described here, the second coding mode corresponds to an ILR prediction coding.
(55) In a step E220, a local predictor PL for the current block is determined. According to the coding mode described here, the pixels of the current block are predicted by previously reconstructed pixels of a neighbouring block of the current block or of the current block itself.
(56) Preferably, for the prediction, pixels that are as close as possible to the pixel to be predicted are chosen. This is why it is referred to a local predictor. The local predictor PL can also be assimilated to a prediction mode of the current block associated with the second coding mode M2. According to this interpretation, in the particular embodiment described here, the first coding mode uses a first group of intra prediction modes, for example the intra prediction modes defined by the HEVC standard, and the second coding mode, here the ILR mode, uses a second group of prediction modes distinct from the first group of intra prediction modes. According to an embodiment variant described later, a correspondence between these two groups of prediction modes can be determined.
(57) The local predictor PL can be unique or it can be selected from a set of predetermined local predictors (second group of prediction modes).
(58) According to an embodiment variant, 4 local predictors are defined. Thus, if we call X a current pixel to be predicted from the current block, A the pixel located immediately to the left of X, B the pixel located immediately to the left of and above X, C the pixel located immediately above X, as illustrated in
(59) PL1(X)=min(A,B) if C max(A,B) max(A,B) if C min(A,B) A+B−C otherwise
(60) PL2(X)=A
(61) PL3(X)=B
(62) PL4(X)=C
(63) where min(A,B) corresponds to the function returning the smallest value between the value of A and the value of B and max(A,B) corresponds to the function returning the largest value between the value of A and the value of B.
(64) In step E220, the local predictor PL used for the current block is determined. In other words, the same local predictor will be used for all the pixels of the current block, i.e. the same prediction function. For this purpose, several embodiment variants are possible.
(65) The coding of the current block with each of the predictors can be simulated (similarly to an optimisation to choose a coding mode for the current block), and the local predictor that optimises a cost function (for example, that minimises the D+λ.Math.R function where R is the rate used to code the block, D is the distortion of the decoded block relative to the original block, and λ is a parameter set by the user) is selected.
(66) Or, in order to limit the complexity of selecting a local predictor for the current block, an orientation of the texture of the previously coded pixels is analysed. For example, the previously coded pixels in the block that are located above or to the left of the current block are analysed using a Sobel-type operator. If it is determined that: the orientation is horizontal, the local predictor PL2 is selected, the orientation is vertical, the local predictor PL3 is selected, the orientation is diagonal, the local predictor PL4 is selected, if no orientation emerges, the local predictor PL1 is selected.
(67) A syntax element is coded in the data stream STR to indicate to the decoder which local predictor was used to predict the current block.
(68) In a step E221, a quantization step δ.sub.2 is determined. According to the particular embodiment described here, the quantization step δ.sub.2 depends on the same quantization parameter as the quantization step δ.sub.1 that would be determined in step E210, if the current block was coded according to the first coding mode.
(69) According to one variant, the quantization step δ.sub.2 can be determined according to the quantization step δ.sub.1. For example, a linear or polynomial function can be used, such as δ.sub.2=a.sub.1*δ.sub.1+b.sub.1, where a.sub.1 and b.sub.1 are predetermined integers or real numbers, or δ.sub.2=c.sub.1*δ.sub.1.sup.2+d.sub.1*δ.sub.1+e.sub.1 or c.sub.1, d.sub.1 and e.sub.1 are predetermined integers or real numbers. For example, a.sub.1=2, b.sub.1=10, c.sub.1=0.1, d.sub.1=2 and e.sub.1=10. Other values are possible.
(70) According to another variant, the quantization step δ.sub.2 can be determined from the parameter A setting the compromise between compression and quality. This Lagrangian parameter A can be entered by the user or defined by the encoder, similarly to δ.sub.1 or determined from the previously mentioned quantization parameter QP.
(71) According to another variant, the quantization step δ.sub.2 can be set directly by the user, and it is then the quantization step δ.sub.1 that depends on δ.sub.2.
(72) In a step E222, a prediction residue R1 is calculated for the current block. For this purpose, once the local predictor is chosen, for each current pixel of the current block: the current pixel X of the current block is predicted by the selected local predictor PL, using either pixels outside the block and already reconstructed (and thus available with their decoded value), or pixels previously reconstructed in the current block, or both, in order to obtain a predicted value PRED. In all cases, the predictor PL uses previously reconstructed pixels. In
(73)
(74) Q(X) is the quantized residue associated with X. It is calculated in the spatial domain, i.e. calculated directly from the difference between the predicted value PRED of the pixel X and the original value of X. Such a quantized residue Q(X) for the pixel X is stored in a quantized prediction residue block R1.sub.Q, that will be coded later. the decoded predicted value P1(X) of X is calculated by adding to the predicted value PRED the dequantized value of the quantized residue Q(X). The decoded predicted value P1(X) of X is thus obtained by P1(X)=PRED+ScalarDequant(δ.sub.2, Q(X)). For example, the nearest scalar quantization inverse function is given by: ScalarDequant(Δ,x)=Δ×x.
(75) The decoded predicted value P1(X) thus makes it possible to predict possible pixels that remain to be processed in the current block. Moreover, the block P1 comprising the decoded/reconstructed values of the pixels of the current block is the ILR predictor of the current block (as opposed to the conventional intra predictor).
(76) The sub-steps described above are performed for all the pixels of the current block, in a scanning order that ensures that the pixels used for the prediction chosen from PL1, . . . , PL4 are available.
(77) According to an embodiment variant, the scanning order of the current block is the lexicographical order, i.e. from left to right, and from top to bottom.
(78) According to another embodiment variant, several scanning orders of the current block can be used, for example: the lexicographical order, or scanning the first column from top to bottom, then the column just to the right of it, etc., or, scanning the diagonals one after the other.
(79) According to this other variant, it is possible to simulate the coding cost associated with each of the scanning orders and to choose the best scanning order for the current block in terms of rate/distortion, then to code for the current block an item of information representative of the chosen scanning order.
(80) At the end of step E222, the quantized residue block R1.sub.Q was determined. This quantized residue block R1.sub.Q must be coded for transmission to the decoder. The predictor P1 of the current block was also determined.
(81) In a step E223, the quantized residue block R1.sub.Q is coded for transmission to the decoder. Any known approach such as the method described in HEVC can be used to code the quantized coefficients of a conventional prediction residue. For example, according to an embodiment variant, the values of the quantized residue block R1.sub.Q are coded using an entropy encoder in the data stream STR.
(82) According to a particular embodiment of the invention, it is possible to determine and code an additional prediction residue R2 from the ILR predictor obtained for the current block. The coding of an additional prediction residue R2 is, however, optional. It is indeed possible to simply code the current block by its predicted version P1 and the quantized residue R1.sub.Q.
(83) In order to code an additional prediction residue R2 for the current block, the following steps are implemented.
(84) In a step E224, the difference R2 between the predictor P1 and the original current block X.sub.b is calculated to form an additional residue R2: R2=X.sub.b−P1. The following steps correspond to the conventional coding steps for this residue R2.
(85) In a step E225, the residue R2 is transformed using a frequency transform in order to produce the block of coefficients R2.sub.T.
(86) The transform can be a DCT-type transform for example. It is possible to choose the transform to be used from a predetermined set of transforms E.sub.T2 and to inform the decoder of the transform used. In this case, the set E.sub.T2 can be different from the set E.sub.T, in order to adapt to the particular statistics of the residue R2.
(87) In a step E226, the block of coefficients R2.sub.T is quantized, for example using a quantization step scalar quantization δ. This produces the block R2.sub.TQ.
(88) The quantization step δ can be set by the user. It can also be calculated using another parameter λ setting the compromise between compression and quality and entered by the user or the encoder. For example, the quantization step δ can correspond to the quantization step δ.sub.1 or be determined similarly to it.
(89) In a step E227, the coefficients of the quantized block R2.sub.TQ are then transmitted in a coded manner. For example, the coding specified in the HEVC standard can be used.
(90) In a known manner, the current block is decoded by dequantizing the coefficients of the quantized block R2.sub.TQ, then applying the inverse transform to the dequantized coefficients to obtain the decoded prediction residue. The prediction P1 is then added to the decoded prediction residue in order to reconstruct the current block and obtain its decoded version X.sub.rec. The decoded version X.sub.rec of the current block can then be used later to spatially predict other neighbouring blocks of the image or to predict blocks of other images by inter-image prediction.
(91) According to a particular embodiment of the invention, a conventional intra prediction mode is determined and associated with the current block. For this purpose, in a step E228, an intra prediction mode is determined for the current block from the list of intra prediction modes available in the conventional intra coding mode.
(92) Several embodiment variants are possible.
(93) According to a variant, the list of MPM prediction modes is created for the current block according to the mechanism described above for coding according to the first coding mode M1. According to this variant, the prediction mode is determined as the first mode in the MPM list.
(94) According to another variant, the prediction mode is predetermined, for example it can be a prediction mode defined by default, or transmitted in the data stream. For example, the predetermined prediction mode is the PLANAR mode of the HEVC standard.
(95) According to another variant, the prediction mode is determined as the intra prediction mode that best approximates the decoded current block X.sub.rec. According to this variant, all the prediction modes are evaluated by measuring a distortion between the decoded current block X.sub.rec and the predicted block obtained by the evaluated prediction mode. The intra prediction mode providing the smallest distortion is selected.
(96) According to another variant, the prediction mode is determined as the intra prediction mode that best approximates the predicted current block P1 obtained by the ILR prediction. According to this variant, all the prediction modes are evaluated by measuring a distortion between the predicted current block P1 and the predicted block obtained by the evaluated prediction mode. The intra prediction mode providing the smallest distortion is selected.
(97) According to another variant, when for an ILR coded block, there are several possible local predictors, the intra prediction mode can be dependent on the local predictor chosen to predict the current block. For example, an association table indicates which intra prediction mode should be associated with the current block according to the chosen local predictor.
(98) In a step E229, the determined intra prediction mode is associated with the current block. The idea here is to associate an intra prediction mode but not to transmit it to the decoder. The method that determines the intra mode to be associated with the current block is reproducible in the decoder and does not require the transmission of any information.
(99) Several embodiment variants have been described above, but the encoder and the decoder must, of course, implement the same variant.
(100) According to the particular embodiment described here, the intra prediction mode associated with the current block can then be used to: predict the intra prediction mode of a subsequent block that would be coded in conventional intra mode, or determine, where appropriate, the intra prediction mode to be associated with a subsequent block that would be coded according to another coding mode distinct from the conventional intra prediction mode. This other coding mode could be an ILR coding mode, or other (inter, etc.).
(101) In a step E23, it is checked if the current block is the last block of the image to be processed by the coding method, taking into account the previously defined scanning order. If yes, the method proceeds to coding (step E25) the next image of the video, if any. If no, in a step E24, the subsequent block of the image to be processed is selected according to the previously defined scanning order of the image and the coding method proceeds to step E2, where the selected block becomes the current block to be processed.
(102)
(103) For example, the data stream STR was generated via the coding method shown in relation to
(104) The decoding method decodes the stream image by image and each image is decoded block by block.
(105) In a step E40, an image I.sub.j to be decoded is subdivided into blocks. Each block will undergo a decoding operation consisting in a series of steps that are detailed hereafter. Blocks can be the same size or different sizes.
(106) In an optional step E401, according to a particular embodiment of the invention, a quantization parameter QP is read from the data stream STR.
(107) In a step E41, a first block or sub-block X.sub.b to be decoded of the image I.sub.j is selected as the current block according to a predetermined scanning order of the image I.sub.j. For example, it can be the first block in the lexicographical scanning order of the image.
(108) In a step E42, an item of information indicating a coding mode for the current block is read from the data stream STR. According to the particular embodiment described here, this item of information indicates if the current block is coded according to a first coding mode M1 or according to a second coding mode M2. According to the particular embodiment described here, the first coding mode M1 corresponds to the conventional intra prediction coding of the current block, for example as defined according to the HEVC standard, and the second coding mode M2 corresponds to the In-Loop Residual (ILR) prediction coding.
(109) In other particular embodiments, the item of information read from the stream STR can also indicate the use of other coding modes to code the current block (not described here).
(110) The step E43 for decoding the current block when the current block is coded according to the first coding mode M1 is described below.
(111) In a step E430, a quantization step δ.sub.1 is determined. For example, the quantization step δ.sub.1 is determined from the quantization parameter QP read in step E401 or similarly to what was done at the encoder. For example, the quantization step δ.sub.1 can be calculated using the quantization parameter QP read in step E401. For example, the quantization parameter QP can be the quantization parameter conventionally used in the AVC or HEVC standards. Thus, in the HEVC standard, the quantization step δ.sub.1 is determined by the equation δ.sub.1=levelScale[QP % 6]<<(QP/6)) where levelScale[k]={40, 45, 51, 57, 64, 72} for k=0.5.
(112) In a step E431, the prediction mode chosen to code the current block is decoded from the neighbouring blocks. For this purpose, as it was done at the encoder, the intra prediction mode chosen for the current block is coded using the intra prediction modes associated with the neighbouring blocks of the current block.
(113) According to a variant of the particular embodiment of the invention described here, the intra prediction mode associated with a block is: the intra prediction mode that was used to predict the block if the block was coded by a conventional intra prediction coding mode, the intra prediction mode that was associated with the block if the block was coded by a coding mode distinct from a conventional intra prediction. An example of such an association is described later in reference to steps E449 and E450.
(114) The construction of both MPM and non-MPM lists is strictly similar to what was done during coding. According to the HEVC standard, syntax elements of the following type are decoded: a binary indicator indicating if the prediction mode to be coded for the current block is in the MPM list or not, if the prediction mode of the current block belongs to the MPM list, an index in the MPM list corresponding to the prediction mode of the current block is coded, if the prediction mode of the current block does not belong to the MPM list, an index in the non-MPM list corresponding to the prediction mode of the current block is coded.
(115) The binary indicator and the prediction mode index are thus read for the current block from the data stream STR, to decode the intra prediction mode of the current block.
(116) In a step E432, the decoder constructs a predicted block P for the current block from the decoded prediction mode.
(117) In a step E433, the decoder decodes the coefficients of the quantized block R.sub.TQ from the data stream STR, for example using the decoding specified in the HEVC standard.
(118) In a step E434, the decoded block R.sub.TQ is dequantized, for example using a quantization step scalar dequantization δ.sub.1. This produces the block of dequantized coefficients R.sub.TQD.
(119) In a step E435, an inverse frequency transform is applied to the block of dequantized coefficients R.sub.TQD in order to produce the decoded prediction residue block R.sub.TQDI. The transform could be an inverse DCT-type transform for example. It is possible to choose the transform to be used from a predetermined set of transforms E.sub.TI by decoding an indicator from the data stream STR.
(120) In a step E436, the current block is reconstructed from the predicted block P obtained in step E432 and the decoded residue block R.sub.TQDI obtained in step E435, in order to produce the decoded current block X.sub.rec, by X.sub.rec=P+R.sub.TQDI.
(121) According to the embodiment variant described here, in a step E437, the intra prediction mode decoded in step E431 is associated with the current block.
(122) The step E44 for decoding the current block when the current block is coded according to the second coding mode M2 is described below.
(123) In a step E440, the local predictor PL used to predict the pixels of the current block is determined. In the case where only one predictor is available, the local predictor is, for example, set by default at the decoder level and no syntax element needs to be read from the stream STR to determine it.
(124) In the case where several local predictors are available, for example the predictors PL1-PL4 described above, a syntax element is decoded from the data stream STR to identify which local predictor was used to predict the current block. The local predictor is thus determined from that decoded syntax element.
(125) In a step E441, the quantization step δ.sub.2 is determined, similarly to what was done at the encoder.
(126) In a step E442, the quantized residue R1.sub.Q is decoded from the data stream STR. Any known approach such as the method described in HEVC can be used to decode the quantized coefficients of the conventional prediction residue.
(127) In a step E443, the quantized residue block R1.sub.Q is dequantized using the quantization step δ.sub.2, in order to produce the dequantized residue block R1.sub.QD.
(128) In a step E444, when the dequantized residue block R1.sub.QD is obtained, the predicted block P1 is constructed using the local predictor PL determined in step E440.
(129) In step E444, each pixel of the current block is predicted and reconstructed as follows: the current pixel X of the current block is predicted by the selected predictor PL, using either pixels outside the block and already reconstructed, or previously reconstructed pixels of the current block, or both, in order to obtain a predicted value PRED. In all cases, the predictor PL uses previously decoded pixels. the decoded predicted value P1(X) of the current pixel X is calculated by adding to the predicted value PRED the dequantized value of the prediction residue R1.sub.QD, such that P1(X)=PRED+R1.sub.QD(X).
(130) These steps are implemented for all the pixels of the current block, in a scanning order that ensures that the pixels used for the prediction chosen from PL1, . . . , PL4 are available.
(131) For example, the scanning order is the lexicographical order (from left to right, then rows from top to bottom).
(132) According to a particular embodiment of the invention, the predicted block P1 comprising the decoded predicted values P1(X) of each pixel of the current block forms here the decoded current block X.sub.rec.
(133) According to another particular embodiment of the invention, it is considered here that an additional prediction residue was coded for the current block. It is therefore necessary to decode this additional prediction residue in order to reconstruct the decoded version of the current block X.sub.rec.
(134) For example, this other particular embodiment can be activated or not by default at the encoder and decoder level. Or, an indicator can be coded in the data stream with the block level information to indicate for each block coded according to the ILR coding mode if an additional prediction residue is coded. Or further, an indicator can be coded in the data stream with the image or sequence of images level information to indicate for all the blocks of the image or of the sequence of images coded according to the ILR coding mode if an additional prediction residue is coded.
(135) When an additional prediction residue is coded for the current block, in a step E445, the coefficients of the quantized prediction residue R2.sub.TQ are decoded from the data stream STR, using means adapted to those implemented at the encoder, for example the means implemented in an HEVC decoder.
(136) In a step E446, the block of quantized coefficients R2.sub.TQ is dequantized, for example using a quantization step scalar dequantization δ.sub.1. This produces the block of dequantized coefficients R2.sub.TQD.
(137) In a step E447, an inverse frequency transform is applied to the block R2.sub.TQD in order to produce the decoded prediction residue block R2.sub.TQDI.
(138) The inverse transform could be an inverse DCT-type transform for example.
(139) It is possible to choose the transform to be used from a predetermined set of transforms E.sub.T2 and to decode the item of information informing the decoder of the transform to be used. In this case, the set E.sub.T2 is different from the set E.sub.T, in order to adapt to the particular statistics of the residue R2.
(140) In a step E448, the current block is reconstructed by adding the predicted block P1 obtained in step E444 to the decoded prediction residue R2.sub.TQDI.
(141) According to a particular embodiment of the invention, a conventional intra prediction mode is determined and associated with the current block. For this purpose, in a step E449, an intra prediction mode is determined for the current block from the list of intra prediction modes available in the conventional intra coding mode. This determination is implemented similarly to what was implemented at the encoder level.
(142) In a step E450, the determined intra prediction mode is associated with the current block.
(143) In a step E45, it is checked if the current block is the last block of the image to be processed by the decoding method, taking into account the previously defined scanning order. If yes, the method proceeds to decoding (step E47) the next image of the video, if any. If no, in a step E46, the subsequent block of the image to be processed is selected according to the previously defined scanning order of the image and the decoding method proceeds to step E42, the selected block becoming the current block to be processed.
(144)
(145) The signal STR comprises a coded indicator TY indicating for a block of an image a coding mode for that block When the TY indicator indicates that the block is coded according to the second coding mode, here the ILR mode, the signal then comprises coded values of quantized prediction residues R1.sub.Q and possibly coded values of quantized transformed prediction residues R2.sub.TQ. When several local predictors are possible for the current block, the signal also comprises a local predictor PL coded indicator.
(146) When the indicator TY indicates that the block is coded according to the first coding mode, here the conventional intra prediction mode, the signal then comprises coded values of quantized transformed prediction residues R.sub.TQ, a binary indicator i.sub.MPM indicating whether or not the prediction mode to be coded for the current block is in the MPM list, and an index idx.sub.MPM indicating the index of current block prediction mode in the corresponding list.
(147)
(148) According to a particular embodiment of the invention, the steps of the coding method are implemented by computer program instructions. For this purpose, the coding device COD has the standard architecture of a computer and notably comprises a memory MEM, a processing unit UT, equipped for example with a processor PROC, and driven by the computer program PG stored in the memory MEM. The computer program PG comprises instructions for implementing the steps of the coding method as described above, when the program is executed by the processor PROC.
(149) At initialisation, the code instructions of the computer program PG are for example loaded into a RAM memory (not shown) before being executed by the processor PROC. In particular, the processor PROC of the processing unit UT implements the steps of the coding method described above, according to the instructions of the computer program PG.
(150)
(151) According to a particular embodiment of the invention, the decoding device DEC has the standard architecture of a computer and notably comprises a memory MEM0, a processing unit UT0, equipped for example with a processor PROC0, and driven by the computer program PG0 stored in the memory MEM0. The computer program PG0 comprises instructions for implementing the steps of the decoding method as described above, when the program is executed by the processor PROC0.
(152) At initialisation, the code instructions of the computer program PG0 are for example loaded into a RAM memory (not shown) before being executed by the processor PROC0. In particular, the processor PROC0 of the processing unit UT0 implements the steps of the decoding method described above, according to the instructions of the computer program PG0.