METHOD AND DEVICES FOR ENCODING AND DECODING A DATA STREAM REPRESENTING AT LEAST ONE IMAGE
Patent Information
- Application Number
- DE602019076890
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-06-27
- Filing Date
- 2019-06-18
- Publication Date
- 2025-10-15
- Estimated Expiration
- 2039-06-18
AI Technical Summary
Existing video compression techniques, such as those in the HEVC standard, do not optimally combine intra prediction modes and quantization steps, leading to inconsistent compression rates and visual quality across blocks, and lack efficient methods for bitrate/distortion optimization.
A method that links first and second quantization steps for transformed and spatial domain prediction residues, using a shared quantization parameter to ensure coherent compression and improve visual quality by predicting pixels locally before reconstructing the entire block.
Enhances compression performance by maintaining consistent visual quality and optimizing bitrate/distortion through coherent quantization across different coding modes within an image or video sequence.
Description
1. Field of the invention
[0001] The field of the invention is that of the coding and decoding of images or sequences of images, and in particular video streams.
[0002] More specifically, the invention relates to the compression of images or sequences of images using a block representation of the images.
[0003] The invention can in particular be applied to image or video coding implemented in current or future coders (JPEG, MPEG, H.264, HEVC, etc. and their amendments), and to the corresponding decoding. 2. Prior Art
[0004] Digital images and image sequences take up a lot of memory space, which means that when transmitting these images, they need to be compressed to avoid congestion problems on the network used for this transmission.
[0005] Many video data compression techniques are already known. Among these, the HEVC compression standard ("High Efficiency Video Coding, Coding Tools and Specification", Matthias Wien, Signals and Communication Technology, 2015) proposes to implement a prediction of pixels in a current image in relation to other pixels belonging to the same image (intra prediction) or to a previous or following image (inter prediction).
[0006] More precisely, intra prediction exploits spatial redundancies within an image. To do this, images are divided into blocks of pixels. The blocks of pixels are then predicted using already reconstructed information, corresponding to the blocks previously encoded / decoded in the current image according to the order in which the blocks are traversed in the image.
[0007] Furthermore, conventionally, the coding of a current block is carried out using a prediction of the current block, called the predictor block, and a prediction residue or "residual block", corresponding to a difference between the current block and the predictor block. The resulting residual block is then transformed, for example using a DCT type transform (discrete cosine transform). The coefficients of the transformed residual block are then quantized, then encoded by an entropy coding and transmitted to the decoder, which can reconstruct the current block by adding this residual block to the predictor block.
[0008] Decoding is done frame by frame, and for each frame, block by block. For each block, the corresponding elements of the stream are read. Inverse quantization and inverse transformation of the coefficients of the residual block are performed. Then, the block prediction is calculated to obtain the predictor block, and the current block is reconstructed by adding the prediction (i.e. the predictor block) to the decoded residual block.
[0009] In US9253508, a DPCM (Differential Pulse Code Modulation) coding technique for coding blocks in Intra mode is inserted into an HEVC encoder. Such a technique consists of predicting a set of pixels of an intra block by another set of pixels of the same block that have been previously reconstructed. In US9253508, a set of pixels of the intra block to be encoded corresponds to a row of the block, or a column or a row and a column, and the intra prediction used to predict the set of pixels is one of the directional intra predictions defined in the HEVC standard.
[0010] However, such a technique is not optimal. Indeed, the reconstruction of a set of pixels of the intra block corresponds either to the addition of a prediction residue in the case of lossless coding, thus offering a fairly low compression rate, or to the addition of a prediction residue after inverse transformation and / or inverse quantization of said other set of pixels serving as prediction. Such a technique therefore does not allow predicting each pixel of the intra block using a local prediction function and reconstructing the predicted pixel before predicting a following pixel. Indeed, this technique requires reconstructing a set of pixels (row / column of the block for example) to predict another set of pixels. In other words, at each prediction and reconstruction of a part of the block, several pixels of the block are predicted and reconstructed.
[0011] Furthermore, in US9253508, it is not described how to make conventional intra prediction modes such as defined in the HEVC standard for example and the DPCM prediction mode coexist, nor how to determine a quantization step for the blocks coded by a DPCM intra prediction such as described in US9253508, which is adapted to a bitrate / distortion optimization mechanism aimed at minimizing the D + function λR where R represents the bit rate for coding the image, D the associated distortion and l a Lagrangian.
[0012] Therefore, there is a need for a new coding and decoding method to improve the compression of image or video data.
[0013] WO 2015 / 049491 A1 (SONY CORP [JP]; SONY EUROPE LTD [GB]) April 9, 2015 (2015-04-09), discloses that after intra / inter prediction, a residual can be quantized in a transformed or spatial domain (transformation bypass mode). In a third mode, the residual can be decorrelated by a PCM process. The mode is signaled in the bitstream. To determine the quantization steps, a rate distortion optimization is performed. The QP parameters are mentioned. WO 2007 / 079964 A1 (NARROSCHKE MATTHIAS [DE]; MUSMANN HANS-GEORG [DE]) July 19, 2007 (2007-07-19), discloses the possibility to bypass the transformation of the reported prediction error at the block or slice level. In both modes, quantizers optimized for rate distortion are found and a QP is reported.The paper STANKOWSKI JAKUB ET AL: "Rate-distortion optimized quantization in HEVC: Performance limitations", 2015 PICTURE CODING SYMPOSIUM (PCS), IEEE, May 31, 2015 (2015-05-31), pages 85-89, discloses background information on rate-distortion optimized quantization in HEVC system. 3. Statement of the invention
[0014] The invention improves the state of the art. To this end, it relates to a method for decoding a coded data stream according to claim 1.
[0015] According to the invention, it is thus possible to define a first quantization step for the prediction residues to be quantized / de-quantized in the transformed domain and a second quantization step for the prediction residues to be quantized / de-quantized in the spatial domain, the first and second quantization steps being determined by the same quantization parameter. Thus, the first and second quantization steps are linked and can be used jointly.
[0016] Advantageously, according to the invention, the quantization steps used in the different coding modes available for a current block are coherent, in particular for the bitrate / distortion optimization mechanism applied to the current block, but also the quantization steps are coherent between blocks, in particular for the bitrate / distortion optimization mechanism applied to the image when certain blocks are coded according to the first coding mode and other blocks are coded according to the second coding mode. Indeed, if the quantization steps are not linked to each other, one of the two quantization steps can become very large compared to the other quantization step.The blocks coded according to the coding mode using the very large quantization step size would then be highly compressed, unlike the other blocks coded according to the other coding mode using the smaller quantization step size, which would result in significant spatial variability of the visual quality in the image, and therefore lower visual quality of the entire image.
[0017] According to the invention, the first coding mode corresponds to a coding of the block in the transformed domain. In other words, according to this first coding mode, a prediction residue of the current block calculated in the spatial domain, i.e. between the original block and a predicted block, is transformed, for example by a DCT transformation, to provide a block of transformed coefficients. This block of transformed coefficients is then quantized using the first quantization step.
[0018] The second coding mode corresponds to a coding of the block in the spatial domain. In other words, according to this second coding mode, the prediction residue of the current block calculated in the spatial domain is directly quantified, without undergoing any transformations.
[0019] The invention also relates to a method for encoding a coded data stream according to claim 3.
[0020] According to the invention, the current block can be coded / decoded by so-called classic intra prediction (first coding mode), for example a spatial prediction according to any of the prediction modes defined in the HEVC standard, or by a new intra prediction (second coding mode) based on the use of pixels of the current block which have been previously decoded.
[0021] According to this new intra prediction, also called ILR (for In-Loop Residual in English), each pixel is predicted, then a residual is calculated for the predicted pixel and the residual is quantized. The quantized residual is then de-quantized and then added to the pixel prediction to reconstruct the pixel value and obtain its decoded value. Such a decoded value of the pixel can then be used to predict other pixels in the current block.
[0022] Advantageously, such an intra prediction method makes it possible to predict pixels of the current block using pixels that are spatially closer than the reference pixels used in the so-called classic intra prediction. The prediction is thus improved.
[0023] According to another particular embodiment of the decoding method or the coding method cited above, the second quantization step is determined as a function of the first quantization step.
[0024] According to this particular embodiment of the invention, the quantization parameter then corresponds to the first quantization step, and the two quantization steps depend on each other.
[0025] As a variant of this particular embodiment, the second quantization step is determined by a * d 1 + b Or c ∗ δ 1 2 + d ∗ δ 1 + e , with d 1 corresponding to the first quantization step, and a, b, c, d, e being predetermined parameters.
[0026] According to another particular embodiment of the decoding method or the coding method cited above, the first quantization step is obtained from a predetermined quantization step table for values of the quantization parameter.
[0027] According to another particular embodiment of the decoding method or the coding method cited above, the quantization parameter corresponds to a Lagrangian l used to optimize a D+ function l * R where R is the data stream rate and D is the associated distortion of the decoded image.
[0028] According to another particular embodiment of the decoding method or the coding method cited above, the quantization parameter is coded in the data stream or decoded from the data stream.
[0029] According to another particular embodiment, the decoding of the current block according to the second coding mode further comprises: decoding another prediction residue associated with said current block, de-quantizing 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 de-quantized prediction residue.
[0030] According to this particular embodiment of the invention, when the current block is coded according to the second coding mode, a second prediction residue is coded / decoded for the current block from the prediction obtained during the coding of the first prediction residue pixel by pixel. The additional characteristics of this particular embodiment correspond to the steps of decoding the block coded according to the first coding mode. Thus, it is possible to maintain similar coding / decoding for the two coding modes, in particular at the level of the entropy coder / decoder, thus making it possible to further improve compression performance.
[0031] The invention also relates to a decoding device according to claim 11.
[0032] According to a particular embodiment of the invention, such a decoding device is included in a terminal.
[0033] The invention also relates to a coding device according to claim 12.
[0034] According to a particular embodiment of the invention, such a coding device is included in a terminal, or a server.
[0035] The decoding method, respectively the coding method, according to the invention can be implemented in various ways, in particular in wired form or in software form. According to a particular embodiment of the invention, the decoding method, respectively the coding method, is implemented by a computer program. The invention also relates to a computer program comprising instructions for implementing the decoding method or the coding method according to any one of the particular embodiments described above, when said program is executed by a processor. Such a program can use any programming language. It can be downloaded from a communications network and / or recorded on a computer-readable medium.
[0036] This program may use any programming language, and may be in the form of source code, object code, or intermediate code between source code and object code, such as in a partially compiled form, or in any other desirable form. The invention also provides a recording medium or information carrier readable by a computer, and comprising instructions of a computer program as mentioned above. The recording media mentioned above may be any entity or device capable of storing the program. For example, the medium may comprise a storage means such as a memory. On the other hand, the recording media may correspond to a transmissible medium such as an electrical or optical signal, which may be conveyed via an electrical or optical cable, by radio or by other means.The program according to the invention may in particular be downloaded from a network such as the Internet. Alternatively, the recording media may correspond to an integrated circuit in which the program is incorporated, the circuit being adapted to execute or to be used in the execution of the method in question. 4. List of figures
[0037] Other characteristics and advantages of the invention will appear more clearly on reading the following description of a particular embodiment, given as a simple illustrative and non-limiting example, and the appended drawings, among which: there figure 1 presents steps of the coding method according to a particular embodiment of the invention, the figure 2 illustrates an example of the position of neighboring blocks of a current block to determine an intra prediction mode according to a particular embodiment of the invention, the figure 3illustrates an example of the position of the reference pixels used to predict pixels of a current block according to a particular embodiment of the invention, the figure 4 presents steps of the decoding method according to a particular embodiment of the invention, the figure 5 illustrates an example of a signal comprising coded data representative of at least one block of an image according to a particular embodiment of the invention, the figure 6 presents the simplified structure of a coding device suitable for implementing the coding method according to any one of the particular embodiments of the invention, the figure 7 presents the simplified structure of a decoding device suitable for implementing the decoding method according to any of the particular embodiments of the invention. 5. Description of an embodiment of the invention 5.1 General principle
[0038] The general principle of the invention is to determine a first quantization step used to quantize transformed coefficients of a prediction residue and a second quantization step used to directly quantize the values of a prediction residue in the spatial domain (i.e. without transformation), jointly. For this, the first and second quantization steps depend on the same quantization parameter.
[0039] According to various particular embodiments of the invention, the quantization parameter may correspond to one or other of the first or second quantization steps, or to a quantization parameter determined by the encoder or by the user, or to a Lagrangian used during the bitrate / distortion optimization at the encoder.
[0040] The quantization parameter can also be encoded in the data stream and passed to the decoder.
[0041] 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 even a more general function.
[0042] The invention thus makes it possible to improve compression performance when different coding modes respectively performing coding of a prediction residue with and without transformation are used within the same image or image sequence coding / decoding system. 5. 2 Examples of implementation
[0043] There figure 1presents steps of the coding method according to a particular embodiment of the invention. For example, a sequence of images I 1 , I 2 , ..., I Nb is coded in the form of a coded data stream STR according to a particular embodiment of the invention. For example, such a coding method is implemented by a coding device as described below in relation to the figure 6 .
[0044] A sequence of images I 1 , I 2 , ..., I Nb , Nb being the number of images in the sequence to be coded, is provided as input to the coding method. The coding method outputs a coded data stream STR representative of the sequence of images provided as input.
[0045] In a known manner, the coding of the sequence of images I 1 , I 2 , ..., I Nb is done image by image according to a coding order previously established and known to the coder. For example, the images can be coded in the temporal order I 1 , I 2 , ..., I Nb or according to another order, for example I 1 , I 3 , I 2 , ..., I Nb .
[0046] In a step E0, an image I j to be coded from the sequence of images I 1 , I 2 , ..., I Nb is divided into blocks, for example into blocks of size 32x32, or 64x64 pixels or more. Such a block can be subdivided into square or rectangular sub-blocks, for example of size 16x16, 8x8, 4x4, 16x8, 8x16, ....
[0047] During 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 level of the data coded for the image I j or at the level of the data coded for the sequence of images.
[0048] Then, during a step E1, a first block or sub-block X b to be coded from image I j is selected according to a predetermined direction of traversal of image I j. For example, it may be the first block in the lexicographic order of traversal of the image.
[0049] During step E2, the encoder will choose the coding mode to code the current block X b. According to the particular embodiment described herein, the encoder selects the coding mode for coding the current block X b among a first coding mode M1 and a second coding mode M2. Additional coding modes (not described here) may be used.
[0050] 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 coding by In Loop Residual (ILR) prediction.
[0051] 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 transformation of the prediction residue before quantizing the coefficients resulting from the transformation (coding by inter-image prediction, coding by spatial prediction with template matching, 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 a transformation, for example DCT, of the prediction residue. During step E2, the coder can perform a bitrate / distortion optimization to determine the best coding mode for coding the current block.During this bitrate / distortion optimization, additional coding modes distinct from the first and second coding modes can be tested, for example an inter-mode coding mode. During this bitrate / distortion optimization, the encoder simulates the coding of the current block. X b according to the different coding modes available in order to determine the bit rate and distortion associated with each coding mode and selects the coding mode offering the best bit rate / distortion compromise, for example according to the D+ function l R, where R represents the bit rate required to encode the current block according to the evaluated encoding mode, D the distortion measured between the decoded block and the original current block and l a Lagrangian multiplier, for example entered by the user or defined at the encoder.
[0052] During a step E20, information indicating the coding mode selected for the current block is coded in the STR data stream.
[0053] If the current block X b is coded according to the first coding mode M1, the method proceeds to step E21 of coding the block according to M1. If the current block X b is coded according to the second coding mode M2, the method proceeds to step E22 of coding the block according to M2.
[0054] The step E21 of coding the block according to the first coding mode M1 is described below, according to a particular embodiment of the invention. According to the particular mode described here, the first coding mode corresponds to a classic intra prediction, such as that defined in the HEVC standard.
[0055] During a step E210, a quantization step d 1 is determined. For example, the quantization step d1 can be set by the user, or calculated using a quantization parameter that sets a trade-off between compression and quality and is entered by the user or defined by the encoder. Thus, such a quantization parameter can be the parameter l , used in the rate-distortion cost function D+ l .R where D represents the distortion introduced by the coding and R the bit rate used for coding. This function is used to make coding choices; typically, we look for the way to code the image that minimizes this function.
[0056] Alternatively, the quantization parameter can be the QP, corresponding to the quantization parameter classically used in the AVC or HEVC standards. Thus, in the HEVC standard, the quantization step d 1 is determined by the equation d1 =levelScale[ QP%6 ] << (QP / 6)) where levelScale[ k ] = { 40, 45, 51, 57, 64, 72} for k = 0..5. During a step E211, a prediction of the current block is determined using a classical intra prediction mode. According to this classical intra prediction, each predicted pixel is calculated only from the decoded pixels from the neighboring blocks (reference pixels) located above the current block, and to the left of the current block. The way in which the pixels are predicted from the reference pixels depends on a prediction mode which is transmitted to the decoder, and which is chosen by the encoder from a predetermined set of modes known to the encoder and the decoder.
[0057] 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, which performs a planar and non-directional interpolation. This approach called "classical 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.fraunhofer.de / ), where there are 67 different prediction modes. In all cases, classical intra prediction respects the two aspects mentioned above (prediction of pixels from neighboring blocks and transmission to the decoder of an optimal prediction mode).
[0058] During step E211, the encoder therefore chooses one of the available prediction modes from the predetermined list of prediction modes. One way of choosing consists, for example, of evaluating all the prediction modes and retaining the prediction mode which minimizes a cost function such as, classically, the bitrate-distortion cost.
[0059] During a step E212, the prediction mode chosen for the current block is coded from the neighboring blocks of the current block. figure 2 illustrates an example of the position of neighboring blocks A b and B b of the current block X b to encode the prediction mode of the current block X b .
[0060] During step E212, the intra prediction mode chosen for the current block is coded using the intra prediction modes associated with the neighboring blocks.
[0061] 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 classical 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 classical intra prediction. An example of such an association is described later with reference to step E229.
[0062] Thus, the approach described in the HEVC standard for encoding the prediction mode of the current block can be used. In the example of the figure 2 , such an approach consists of identifying the intra prediction mode m A associated with the block A b located above the current block, and the intra prediction mode m B associated with the block B b located just to the left of the current block. Depending on the value of m A and m B , a list called MPM (for Most Probable Mode), containing 3 intra prediction modes, and a list called non-MPM, containing the other 32 prediction modes, are created.
[0063] According to the variant embodiment of the particular mode described here, the mechanism for creating the MPM list specified according to the HEVC standard is adapted 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 block neighboring the current block always has an intra prediction mode associated with it, whether this block has been coded according to an intra coding mode or according to another coding mode (ILR, inter, etc.).
[0064] The rest of the MPM list creation mechanism remains similar to that specified according to the HEVC standard. If m A and m B are both equal to the same intra prediction mode and this 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 index 26 of the HEVC intra prediction mode table.
[0065] If m A and m B are both equal to the same angular prediction mode m(n), the MPM list includes the following prediction modes: MPM[0]=m(n), MPM[1]=m(2+(n+29)mod32), MPM[2]=m(2+(n-1)mod32).
[0066] If m A and m B are different, the MPM list includes the following prediction modes: MPM[0]= m B , MPM[1]= m A , MPM[2]=Mlast, where Mlast is defined by: if m B is not equal to PLANAR mode and m A is not equal to PLANAR mode, then Mlast is equal to PLANAR mode, otherwise, if m B is not equal to DC mode and m A is not equal to DC mode, then Mlast is equal to DC mode, otherwise Mlast is equal to angular mode A(26).
[0067] The non-MPM list includes all other intra prediction modes not included in the MPM list.
[0068] According to another alternative embodiment of the particular mode described here, in accordance with the mechanism for creating the MPM list specified according to the HEVC standard, if one of the neighboring blocks A b or B b is not coded according to an intra prediction mode, the DC prediction mode is assigned to it by default. The remainder of the mechanism for creating the MPM list remains similar to that specified according to the HEVC standard and described above.
[0069] According to the HEVC standard, in order to encode the intra prediction mode of the current block, syntax elements are transmitted: a binary flag indicating whether the prediction mode to be encoded 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 encoded, 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 encoded.
[0070] During a step E213, the prediction residue R for the current block is constructed.
[0071] During 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.
[0072] During a step E214, the prediction residue R is transformed into RT.
[0073] During step E214, a frequency transform is applied to the residue block R so as to produce the block RT comprising transformed coefficients. The transform may be a DCT type transform for example. It is possible to choose the transform to be used from a predetermined set of ET transforms and to signal the transform used to the decoder.
[0074] During a step E215, the transformed residue block RT is quantized using, for example, a scalar quantization of quantization step d 1. This produces the quantized transformed prediction residue block R TQ.
[0075] During a step E216, the coefficients of the quantized block R TQ are coded by an entropy coder. For example, the entropy coding specified in the HEVC standard can be used. According to the embodiment variant described here, during a step E217, the prediction mode determined in step E211 is associated with the current block.
[0076] As is known, the current block is decoded by dequantizing the coefficients of the quantized block R 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 neighboring blocks of the image or to predict blocks of other images by inter-image prediction.
[0077] The step E22 of coding the block according to the second coding mode M2 is described below, according to a particular embodiment of the invention. According to the particular mode described here, the second coding mode corresponds to coding by ILR prediction.
[0078] During 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 block neighboring the current block or of the current block itself.
[0079] Preferably, to predict, pixels are chosen which are as close as possible to the pixel to be predicted. For this reason, we speak of a local predictor. The local predictor PL can also be likened 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 alternative embodiment described later, a correspondence between these two groups of prediction modes can be determined.
[0080] The local predictor PL can be unique or it can be selected from a set of predetermined local predictors (second group of prediction modes).
[0081] According to an alternative embodiment, 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 and above X, C the pixel located immediately above X, as illustrated in figure 3 showing a current block X b . 4 local predictors PL1, PL2, PL3, PL4 can be defined as follows: PL 1 X = min A B si C ≥ max A B max A B si C ≤ min A B A + B − C sinon PL 2 X = A PL 3 X = B PL 4 X = C 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.
[0082] During step E220, it is determined which local predictor PL to use for the current block. 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, several implementation variants are possible.
[0083] The coding of the current block with each of the predictors can be simulated (similar to an optimization for choosing a coding mode for the current block), and the local predictor that optimizes a cost function (e.g., that minimizes the function D + λ.R where R is the bit rate used to encode the block, D is the distortion of the decoded block relative to the original block, and λ is a user-set parameter) is selected.
[0084] Alternatively, to limit the complexity of selecting a local predictor for the current block, a texture orientation of the previously coded pixels is analyzed. For example, previously coded pixels in the block that are located above or to the left of the current block are analyzed using a Sobel-like 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 is clear, the local predictor PL1 is selected.
[0085] A syntax element is encoded in the STR data stream to tell the decoder which local predictor was used to predict the current block.
[0086] During a step E221, a quantization step d2 is determined. According to the particular embodiment described here, the quantization step d 2 depends on the same quantization parameter as the quantization step d 1 which would be determined in step E210, if the current block were coded according to the first coding mode.
[0087] Alternatively, the quantization step d 2 can be determined based on the quantization step d 1. For example, a linear or polynomial function can be used, such as d 2 = a 1 * d 1 . +b 1 , where a 1 and b 1 are predetermined integers or real numbers, or d 2 = c 1 * d 1 2< + d 1 * d 1 + e 1 or c 1 , d 1 and e 1 are predetermined integers or real numbers. For example, a 1 =2, b 1 =10, c 1 =0.1, d 1 =2 and e 1 =10. Other values are possible.
[0088] According to another variant, the quantization step d2 can be determined from the parameter λ fixing the trade-off between compression and quality. This Lagrangian parameter λ can be entered by the user or defined by the encoder, similarly to d 1 or determined from the quantization parameter QP previously mentioned.
[0089] According to another variant, the quantization step d 2 can be set directly by the user, and this is then the quantization step d 1 which is a function of d 2 .
[0090] In a step E222, a prediction residual R1 is calculated for the current block. To do this, once the local predictor has been 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 therefore 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. On the figure 3 , we see that the pixels of the current block located on the first line and / or the first column of the current block will use as reference pixels (to construct the predicted value PRED) pixels outside the block and already reconstructed (pixels in gray on the figure 3) and possibly already reconstructed pixels of the current block. For the other pixels of the current block, the reference pixels used to construct the predicted value PRED are located inside the current block. The difference DIFF between PRED and X is quantized into a value Q(X), by a scalar quantizer with a quantization step d 2, by Q(X) = ScalarQuant(DIFF) = ScalarQuant( d 2, X-PRED), the scalar quantifier being for example a nearest neighbor scalar quantifier such that: ScalarQuant Δ x = floor x + Δ 2 Δ . 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 pixel X and the original value of X. Such a quantized residue Q(X) for pixel X is stored in a quantized prediction residue block R1 Q , which will be encoded later. The decoded predicted value P1(X) of X is calculated by adding to the predicted value PRED the de-quantized value of the quantized residue Q(X). The decoded predicted value P1(X) of X is thus obtained by P1(X) = PRED + ScalarDequant( d 2 , Q(X)). For example, the inverse nearest-quantization scalar function is given by: ScalarDequant(Δ, x ) = Δ × x.
[0091] The decoded predicted value P1(X) thus makes it possible to predict any pixels that remain to be processed in the current block. Furthermore, the block P1 comprising the decoded / reconstructed values of the pixels of the current block constitutes the ILR predictor of the current block (as opposed to the classic intra predictor).
[0092] The substeps described above are performed for all pixels of the current block, in a scanning order which ensures that the pixels used for the prediction chosen from PL1,..., PL4 are available.
[0093] According to an alternative embodiment, the order of traversal of the current block is the lexicographic order, i.e. from left to right, and from top to bottom.
[0094] According to another embodiment variant, several orders of traversal of the current block can be used, for example: the lexicographical order, or by going through the first column from top to bottom, then the column just to its right, etc. or, by going through the diagonals one after the other.
[0095] According to this other variant, it is possible to simulate the coding cost associated with each of the traversal orders and to choose the best traversal order for the current block in the flow / distortion sense, then to code for the current block information representative of the chosen traversal order.
[0096] At the end of step E222, the quantized residue block R1 Q has been determined. This quantized residue block R1 Q must be coded to be transmitted to the decoder. The predictor P1 of the current block has also been determined.
[0097] In a step E223, the quantized residue block R1 Q is coded in order to transmit it to the decoder. It is possible to use any known approach such as the method described in HEVC to code the quantized coefficients of a conventional prediction residue. For example, according to an alternative embodiment, the values of the quantized residue block R1 Q are coded using an entropy coder in the STR data stream.
[0098] 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 Q . In order to code an additional prediction residue R2 for the current block, the following steps are implemented.
[0099] In a step E224, the difference R2 between the predictor P1 and the original current block X b is calculated in order to constitute an additional residue R2: R2 = X b -P1. The following steps correspond to the classic steps of coding this residue R2.
[0100] During a step E225, the residue R2 is transformed using a frequency transform so as to produce the block of coefficients R2 T .
[0101] 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 E T2 transforms and to signal the transform used to the decoder. In this case, the E T2 set can be different from the ET set, in order to adapt to the particular statistics of the residual R2.
[0102] During a step E226, the block of coefficients R2 T is quantized, for example using a scalar quantization of quantization step d. This produces the R2 TQ block.
[0103] The quantization step d can be set by the user. It can also be calculated using another parameter l setting the trade-off between compression and quality and entered by the user or encoder. For example, the quantization step d can correspond to the quantization step d 1 or be determined in a similar manner thereto.
[0104] In a step E227, the coefficients of the quantized block R2 TQ are then transmitted in coded form. For example, the coding specified in the HEVC standard can be used.
[0105] In a known manner, the current block is decoded by de-quantizing the coefficients of the quantized block R2 TQ , then applying the inverse transform to the de-quantized 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 rec . The decoded version X rec of the current block can then be used later to spatially predict other neighboring blocks of the image or to predict blocks of other images by inter-image prediction.
[0106] According to a particular embodiment of the invention, a conventional intra prediction mode is determined and associated with the current block. For this, during 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.
[0107] Several implementation variations are possible.
[0108] According to one 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. 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.
[0109] According to another variant, the prediction mode is determined as the intra prediction mode that best approximates the decoded current block X rec . According to this variant, all prediction modes are evaluated by measuring a distortion between the decoded current block X rec and the predicted block obtained by the evaluated prediction mode. The intra prediction mode providing the smallest distortion is selected.
[0110] 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 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.
[0111] Alternatively, when there are multiple possible local predictors for an ILR-encoded block, the intra prediction mode may depend 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 based on the chosen local predictor.
[0112] During a step E229, the determined intra prediction mode is associated with the current block. This involves associating an intra prediction mode but not transmitting it to the decoder. The method that determines the intra mode to be associated with the current block is reproducible to the decoder and does not require the transmission of any information.
[0113] Several implementation variants have been described above, but the encoder and decoder must of course implement the same variant.
[0114] 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 following block which would be coded in classic intra mode, or determine, if applicable, the intra prediction mode to be associated with a following block which would be coded according to another coding mode distinct from the classic intra prediction mode. This other coding mode could be an ILR coding mode, or other (inter, etc.).
[0115] In a step E23, it is checked whether the current block is the last block of the image to be processed by the coding method, taking into account the previously defined traversal order. If yes, the method moves on to the coding (step E25) of the next image of the video if applicable. If not, in a step E24, the next block of the image to be processed is selected according to the previously defined traversal of the image and the coding method moves on to step E2, where the selected block becomes the current block to be processed.
[0116] There figure 4 presents steps of the method for decoding a STR stream of coded data representative of a sequence of images I 1 , I 2 , ..., I Nb to be decoded according to a particular embodiment of the invention.
[0117] For example, the STR data stream was generated via the coding method presented in relation to the figure 1. The STR data stream is provided as input to a decoding device DEC, as described in relation to the figure 7 .
[0118] The decoding process decodes the stream frame by frame and each frame is decoded block by block.
[0119] During a step E40, an image I j to be decoded is subdivided into blocks. Each block will undergo a decoding operation consisting of a series of steps which are detailed later. The blocks can be of the same size or of different sizes.
[0120] During an optional step E401, according to a particular embodiment of the invention, a quantization parameter QP is read from the data stream STR.
[0121] During a step E41, a first block or sub-block X bto be decoded from image I j is selected as the current block according to a predetermined direction of traversal of image I j. For example, it may be the first block in the lexicographic order of traversal of the image.
[0122] During a step E42, information indicating a coding mode for the current block is read from the STR data stream. According to the particular embodiment described here, this information indicates whether 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 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 coding by In Loop Residual (ILR) prediction.
[0123] In other particular embodiments, the information read from the STR stream may also indicate the use of other encoding modes to encode the current block (not described herein).
[0124] The step E43 of decoding the current block when the current block is coded according to the first coding mode M1 is described below.
[0125] During an E430 step, a quantization step d 1 is determined. For example, the quantization step d 1 is determined from the quantization parameter QP read in step E401 or in a similar manner to what was done to the encoder. For example, the quantization step d 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 d1 is determined by the equation d 1 =levelScale[ QP%6 ] << (QP / 6)) where levelScale[ k ] = { 40, 45, 51, 57, 64, 72} for k = 0..5.
[0126] In a step E431, the prediction mode used to code the current block is decoded from the neighboring blocks. For this, as was done to the encoder, the intra prediction mode chosen for the current block is decoded, using the intra prediction modes associated with the neighboring blocks of the current block.
[0127] 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 classical 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 classical intra prediction. An example of such an association is described further with reference to steps E449 and E450.
[0128] The construction of both MPM and non-MPM lists is strictly similar to what was done during encoding. According to the HEVC standard, syntax elements of the following type are decoded: a binary flag indicating whether the prediction mode to be encoded 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 encoded, 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 encoded.
[0129] The binary flag and the prediction mode index are therefore read for the current block from the STR data stream, to decode the intra prediction mode of the current block.
[0130] During a step E432, the decoder constructs a predicted block P for the current block from the decoded prediction mode.
[0131] In an E433 step, the decoder decodes the coefficients of the quantized block R TQ from the STR data stream, for example using the decoding specified in the HEVC standard.
[0132] During a step E434, the decoded block R TQ is de-quantized, for example using a scalar de-quantization of quantization step d 1. This produces the de-quantized coefficient block R TQD.
[0133] In a step E435, an inverse frequency transform is applied to the de-quantized coefficient block R TQD so as to produce the decoded prediction residue block R TQDI. The transform may be an inverse DCT type transform for example. It is possible to choose the transform to be used from a predetermined set of E TI transforms by decoding an indicator from the STR data stream.
[0134] During a step E436, the current block is reconstructed from the predicted block P obtained in step E432 and the decoded residue block R TQDI obtained in step E435, in order to produce the decoded current block X rec , by X rec = P + R TQDI .
[0135] According to the embodiment variant described here, during a step E437, the intra prediction mode decoded in step E431 is associated with the current block.
[0136] Step E44 of decoding the current block is described below when the current block is coded according to the second coding mode M2.
[0137] 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 defined by default at the decoder level and no syntax element needs to be read in the STR stream to determine it.
[0138] In the case where multiple local predictors are available, for example the PL1-PL4 predictors described above, a syntax element is decoded from the STR data stream to identify which local predictor was used to predict the current block. The local predictor is therefore determined from this decoded syntax element.
[0139] During a step E441, the quantization step d 2 is determined, similarly to what was done to the encoder.
[0140] In a step E442, the quantized residue R1 Q is decoded from the STR data stream. It is possible to use any known approach such as the method described in HEVC to decode the quantized coefficients of the classical prediction residue.
[0141] During a step E443, the quantized residue block R1 Q is de-quantized using the quantization step d 2, so as to produce the de-quantized residue block R1 QD.
[0142] In a step E444, when the de-quantized residue block R1 QD is obtained, the predicted block P1 is constructed using the local predictor PL determined in step E440.
[0143] During 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 PL predictor, using either pixels outside the block and already decoded, or previously reconstructed pixels of the current block, or both, in order to obtain a predicted value PRED. In all cases, the PL predictor 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 de-quantized value of the prediction residue R1 QD , such that P1(X) = PRED + R1 QD (X).
[0144] These steps are implemented for all pixels of the current block, in a traversal order which ensures that the pixels used for the prediction chosen from PL1,...,PL4 are available.
[0145] For example, the order of traversal is lexicographical order (left to right, then lines from top to bottom).
[0146] 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 here constitutes the decoded current block X rec.
[0147] According to another particular embodiment of the invention, it is considered here that an additional prediction residue has been 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 rec .
[0148] For example, this other particular embodiment may be enabled or disabled by default at the encoder and decoder. Or, a flag may be encoded in the data stream with the block-level information to indicate for each block encoded according to the ILR encoding mode whether an additional prediction residual is encoded. Or, a flag may be encoded in the data stream with the image or image sequence-level information to indicate for all blocks of the image or image sequence encoded according to the ILR encoding mode whether an additional prediction residual is encoded.
[0149] When an additional prediction residue is coded for the current block, during a step E445, the coefficients of the quantized prediction residue R2 TQ are decoded from the STR data stream, using means adapted to those implemented in the coder, for example the means implemented in an HEVC decoder.
[0150] During a step E446, the block of quantized coefficients R2 TQ is de-quantized, for example using a scalar de-quantization of quantization step d 1. This produces the block of de-quantized coefficients R2 TQD.
[0151] During a step E447, an inverse frequency transform is applied to the block R2 TQD so as to produce the decoded prediction residue block R2 TQDI.
[0152] The inverse transform could be an inverse DCT type transform for example.
[0153] It is possible to choose the transform to be used from a predetermined set of E T2 transforms and to decode the information signaling the transform to be used to the decoder. In this case, the set E T2 is different from the set ET , in order to adapt to the particular statistics of the residual R2.
[0154] During a step E448, the current block is reconstructed by adding the predicted block P1 obtained during step E444 to the decoded prediction residue R2 TQDI.
[0155] According to a particular embodiment of the invention, a conventional intra prediction mode is determined and associated with the current block. For this, during 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 in a similar manner to what was implemented at the coder level.
[0156] During a step E450, the determined intra prediction mode is associated with the current block.
[0157] In a step E45, it is checked whether the current block is the last block of the image to be processed by the decoding method, taking into account the previously defined order of traversal. If yes, the method moves on to the decoding (step E47) of the next image of the video if applicable. If not, in a step E46, the next block of the image to be processed is selected according to the previously defined image traversal and the decoding method moves on to step E42, the selected block becoming the current block to be processed.
[0158] There figure 5 illustrates an example of an STR signal comprising coded data representative of at least one block of an image according to a particular embodiment of the invention. For example, the STR signal may comprise a quantization parameter QP making it possible to determine the quantization step d 1 and the quantization step d2 described above. This quantization parameter QP can be coded at the block level, or at the image or image sequence level in the case of video coding.
[0159] The STR signal includes a coded indicator TY indicating for a block of an image, a coding mode for this block. When the indicator TY indicates that the block is coded according to the second coding mode, here the ILR mode, the signal then includes coded values of quantized prediction residues R1 Q and possibly coded values of quantized transformed prediction residues R2 TQ . When several local predictors are possible for the current block, the signal also includes a coded indicator of local predictor PL.
[0160] When the TY indicator indicates that the block is coded according to the first coding mode, here the classic intra prediction mode, the signal then comprises coded values of quantized transformed prediction residues R TQ , a binary indicator i MPM indicating whether the prediction mode to be coded for the current block is in the MPM list or not, and an index idx MPM indicating the index of the prediction mode of the current block in the corresponding list.
[0161] There figure 6 presents the simplified structure of a COD coding device suitable for implementing the coding method according to any of the particular embodiments of the invention.
[0162] According to a particular embodiment of the invention, the steps of the coding method are implemented by computer program instructions. For this, the coding device COD has the conventional architecture of a computer and notably comprises a memory MEM, a processing unit UT, equipped for example with a processor PROC, and controlled by the computer program PG stored in 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.
[0163] At initialization, 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. The processor PROC of the processing unit UT implements in particular the steps of the coding method described above, according to the instructions of the computer program PG. The figure 7 presents the simplified structure of a DEC decoding device suitable for implementing the decoding method according to any of the particular embodiments of the invention.
[0164] According to a particular embodiment of the invention, the decoding device DEC has the conventional architecture of a computer and notably comprises a memory MEM0, a processing unit UT0, equipped for example with a processor PROC0, and controlled by the computer program PG0 stored in 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.
[0165] At initialization, 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. The processor PROC0 of the processing unit UT0 implements in particular the steps of the decoding method described above, according to the instructions of the computer program PG0.
Claims
1. Method for decoding a stream of coded data which represents at least one frame, said frame being divided into blocks, the decoding method comprising, for at least one block of the frame, referred to as the current block: - decoding (E42) information indicating a coding mode of the current block, in which a prediction residual associated with said current block and resulting from a spatial prediction is, in a first coding mode, transformed to deliver a block of transformed coefficients, said block of transformed coefficients then being quantized and, in a second coding mode, directly quantized without undergoing transform, - when the coding mode of the current block is said first coding mode, decoding (E43) the current block, this comprising determining (E430) a first quantization step size for dequantizing, in the transform domain, said prediction residual associated with the current block, - when the coding mode of the current block is said second coding mode, decoding (E44) the current block, this comprising determining (E441) a second quantization step size for dequantizing, in the spatial domain, said prediction residual associated with the current block, - the first quantization step size and the second quantization step size being determined depending on the same quantization parameter, and wherein, when the coding mode of the current block is the second coding mode, the decoding of the current block further comprises determining a local predictor and for each pixel of the current block: - obtaining a prediction of said pixel from said local predictor and from another previously decoded pixel, said other previously decoded pixel belonging to said current block or to a block of the frame neighbouring said current block and previously decoded, when said predicted pixel is located on the first row and / or first column of said current block, said other previously decoded pixel belongs to a block of the frame neighbouring said current block and previously decoded, and otherwise said other previously decoded pixel belongs to said current block, - decoding a prediction residual associated with said pixel, - dequantizing said prediction residual associated with said pixel using said second quantization step size, - reconstructing said pixel by adding the prediction of said pixel to the dequantized prediction residual.
2. Decoding method according to Claim 1, wherein the coefficients of the prediction residual associated with the current block, when the coding mode of the current block is the second coding mode, are decoded by an entropy decoder, which is used to decode the coefficients of the prediction residual associated with the current block, when the coding mode of the current block is the first coding mode.
3. Method for coding a stream of coded data that is representative of at least one frame, said frame being divided into blocks, the coding method comprising, for at least one block of the frame, referred to as the current block: - coding (E20) information indicating a coding mode of the current block, in which a prediction residual associated with said current block and resulting from a spatial prediction is, in a first coding mode, transformed to deliver a block of transformed coefficients, said block of transformed coefficients then being quantized and, in a second coding mode, directly quantized without undergoing transform, - when the coding mode of the current block is said first coding mode, coding (E21) the current block, this comprising determining (E210) a first quantization step size for quantizing said prediction residual associated with the current block in the transform domain, - when the coding mode of the current block is said second coding mode, coding (E22) the current block, this comprising determining (E221) a second quantization step size for quantizing said prediction residual associated with the current block in the spatial domain, - the first quantization step size and the second quantization step size being determined depending on the same quantization parameter, and wherein, when the coding mode of the current block is the second coding mode, the coding of the current block comprises determining a local predictor and for each pixel of the current block: - obtaining a prediction of said pixel from said local predictor and from another previously decoded pixel, said other previously decoded pixel belonging to said current block or to a block of the frame neighbouring said current block and previously decoded, when said predicted pixel is located on the first row and / or first column of said current block, said other previously decoded pixel belongs to a block of the frame neighbouring said current block and previously decoded, and otherwise said other previously decoded pixel belongs to said current block, - obtaining a prediction residual associated with said pixel from the prediction of said pixel, - quantizing said prediction residual associated with said pixel using said second quantization step size, - coding said quantized prediction residual.
4. Coding method according to Claim 3, wherein the coefficients of the prediction residual associated with the current block, when the coding mode of the current block is the second coding mode, are coded by an entropy coder, which is used to code the coefficients of the prediction residual associated with the current block, when the coding mode of the current block is the first coding mode.
5. Method according to any of Claims 1 to 4, wherein the second quantization step size is determined depending on the first quantization step size.
6. Method according to Claim 5, wherein the second quantization step size is determined by a * δ1 + b or c * δ 1 2 + d * δ 1 + e , where δ1 is the first quantization step size, and a, b, c, d, e are predetermined parameters.
7. Method according to any of Claims 1 to 4, wherein the first quantization step size is obtained from a table of quantization step sizes that is predetermined for values of the quantization parameter.
8. Method according to any of Claims 1 to 4, wherein the quantization parameter is a Lagrangian λ used to optimize a function D + A * R where R is the rate of the data stream and D is the distortion associated with the decoded frame.
9. Method according to any of Claims 1 to 4, wherein the quantization parameter is coded in the data stream or decoded from the data stream.
10. Decoding method according to either of Claims 1 and 2, wherein the decoding of the current block in the second coding mode further comprises: - decoding another prediction residual associated with said current block, - dequantizing said other prediction residual associated with said block using said first quantization step size, - reconstructing said current block from the reconstructed pixels of the current block and from said dequantized other prediction residual.
11. Device for decoding a stream of coded data which represents at least one frame, said frame being divided into blocks, the decoding device comprising a processor (PROCO) configured to, for at least one block of the frame, referred to as the current block: - decode information indicating a coding mode of the current block, in which a prediction residual associated with said current block and resulting from a spatial prediction is, in a first coding mode, transformed to deliver a block of transformed coefficients, said block of transformed coefficients then being quantized and, in a second coding mode, directly quantized without undergoing transform, - when the coding mode of the current block is said first coding mode, decode the current block by determining a first quantization step size for dequantizing, in the transform domain, said prediction residual associated with the current block, - when the coding mode of the current block corresponds to said second coding mode, decode the current block by determining a second quantization step size for dequantizing, in the spatial domain, said prediction residual associated with the current block, - the first quantization step size and the second quantization step size being determined depending on the same quantization parameter, and wherein when the coding mode of the current block is the second coding mode, when decoding the current block, the processor is further configured to determine a local predictor and, for each pixel of the current block, to: - obtain a prediction of said pixel from said local predictor and from another previously decoded pixel, said other previously decoded pixel belonging to said current block or to a block of the frame neighbouring said current block and previously decoded, when said predicted pixel is located on the first row and / or first column of said current block, said other previously decoded pixel belongs to a block of the frame neighbouring said current block and previously decoded, and otherwise said other previously decoded pixel belongs to said current block, - decode a prediction residual associated with said pixel, - quantize said prediction residual associated with said pixel using said second quantization step size, - reconstruct said pixel by adding the prediction of said pixel to the dequantized prediction residual.
12. Device for coding a stream of coded data which represents at least one frame, said frame being divided into blocks, the coding device comprising a processor (PROC) configured to, for at least one block of the frame, referred to as the current block: - code information indicating a coding mode of the current block, in which a prediction residual associated with said current block and resulting from a spatial prediction is, in a first coding mode, transformed to deliver a block of transformed coefficients, said block of transformed coefficients then being quantized and, in a second coding mode, directly quantized without undergoing transform, - when the coding mode of the current block is said first coding mode, coding the current block by determining a first quantization step size for quantizing said prediction residual associated with the current block in the transform domain, - when the coding mode of the current block is said second coding mode, coding the current block by determining a second quantization step size for quantizing said prediction residual associated with the current block in the spatial domain, - the first quantization step size and the second quantization step size being determined depending on the same quantization parameter, and wherein when the coding mode of the current block is the second coding mode, when coding the current block, the processor is further configured to determine a local predictor and, for each pixel of the current block, to: - obtain a prediction of said pixel from said local predictor and from another previously decoded pixel, said other previously decoded pixel belonging to said current block, or to a block of the frame neighbouring said current block and previously decoded, when said predicted pixel is located on the first row and / or first column of said current block, said other previously decoded pixel belongs to a block of the frame neighbouring said current block and previously decoded, and otherwise said other previously decoded pixel belongs to said current block, - obtain a prediction residual associated with said pixel from the prediction of said pixel, - quantize said prediction residual associated with said pixel using said second quantization step size, - code said quantized prediction residual.
13. Computer program comprising instructions for implementing the decoding method according to any of Claims 1-2 or 5 to 10 or the coding method according to any of Claims 3 to 9, when said program is executed by a processor.