Method and apparatus for encoding and decoding a data stream representing at least one image
By adopting the quantization mode of transform domain and spatial domain in image encoding, and using the same quantization parameters to determine the quantization step size, the low compression ratio and visual quality problems caused by intra-block prediction and reconstruction in the prior art are solved, and the image is improved or video compression performance and visual quality.
Patent Information
- Application Number
- CN202410912864.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-06-27
- Filing Date
- 2019-06-18
- Publication Date
- 2024-11-12
AI Technical Summary
Prior Art In image or video encoding, prediction and reconstruction of intra-blocks lead to low compression ratios and visual quality reductions, and failure to effectively coexist with traditional intra-block prediction modes and DPCM prediction modes, and lack of suitable for rate/distortion optimization Quantitative step size determination method.
Two encoding modes are adopted: one is used for quantization in the transform domain and the other is used for quantization in the spatial domain, and the first and second quantization steps are determined by the same quantization parameters, for prediction residuals in different encoding modes. Processing to improve pixel prediction and compression performance.
The compression performance of image or video data is improved, the quantization step size consistency in different encoding modes is ensured, significant spatial changes in visual quality are avoided, and the visual quality of the overall image is enhanced.
Smart Images

Figure CN118945331A_ABST
Abstract
Description
[0001] This patent application is a divisional application of the following invention patent applications:
[0002] Application number: 201980042019.3
[0003] Application date: June 18, 2019
[0004] Invention title: Method and device for encoding and decoding a data stream representing at least one image Technical Field
[0005] The field of the invention is encoding and decoding images or image sequences, in particular video streams.
[0006] More particularly, the invention relates to compressing an image or a sequence of images using a block representation of the image.
[0007] The invention is particularly applicable to image or video encoding implemented in current or future encoders (JPEG, MPEG, H.264, HEVC, etc. and their modifications), and the corresponding decoding. Background Art
[0008] Digital images and image sequences occupy a large amount of space in terms of memory, which requires that these images be compressed when they are transmitted in order to avoid congestion problems on the network used for the transmission.
[0009] Many techniques for compressing video data are known. Among them, the HEVC compression standard (“High Efficiency Video Coding, Coding Tools and Specification”, Matthias Wien, Signals and Communication Technology, 2015) proposes to implement the prediction of pixels of the current image relative to other pixels belonging to the same image (intra-frame prediction) or previous or subsequent images (inter-frame prediction).
[0010] More specifically, intra prediction uses spatial redundancy within an image. To do this, the image is split into blocks of pixels. The blocks of pixels are then predicted using already reconstructed information corresponding to previously encoded / decoded blocks in the current image, based on the scanning order of the blocks in the image.
[0011] Furthermore, in a conventional manner, the encoding of the current block is performed using a prediction of the current block, called a predictor block, and a prediction residual or "residual block" corresponding to the difference between the current block and the predictor block. The resulting residual block is then transformed, for example using a DCT (Discrete Cosine Transform) type transform. The coefficients of the transformed residual block are then quantized, encoded by entropy coding, and transmitted to a decoder, which can reconstruct the current block by adding this residual block to the predictor block.
[0012] The decoding is done image by image, and for each image, block by block. For each block, the corresponding element of the stream is read. Inverse quantization and inverse transform of the coefficients of the residual block are performed. Then, the block prediction is calculated to obtain a predictor block, and the current block is reconstructed by adding the prediction (i.e., the predictor block) to the decoded residual block.
[0013] In US9253508, a DPCM (differential pulse code modulation) coding technique for coding blocks in intra mode is integrated into the HEVC encoder. Such a technique is to predict a pixel set of an intra block by another pixel set of the same block that has been previously reconstructed. In US9253508, the pixel set of the intra block to be encoded corresponds to a row, or a column, or a row and a column of a block, and the intra prediction for predicting the pixel set is one of the directional intra predictions defined in the HEVC standard.
[0014] However, such a technique is not optimal. In fact, the reconstruction of the set of pixels of the intra block corresponds to adding prediction residuals in the case of lossless coding, thereby providing a relatively low compression ratio, or corresponds to adding prediction residuals after inverse transformation and / or inverse quantization of the other set of pixels used as prediction. Therefore, such a technique does not enable the use of a local prediction function to predict each pixel of the intra block, and to reconstruct the predicted pixels before predicting subsequent pixels. In fact, this technique requires the reconstruction of a set of pixels (e.g., rows / columns of a block) to predict another set of pixels. In other words, by each prediction and reconstruction of a portion of a block, several pixels of the block are predicted and reconstructed.
[0015] Furthermore, in US9253508, there is no description of how to make conventional intra prediction modes and DPCM prediction modes, such as those defined in the HEVC standard, coexist, nor is there a description of how to determine the quantization step size of a block encoded by the DPCM intra prediction described in US9253508, which is suitable for a rate / distortion optimization mechanism that aims to minimize the D+λR function, where R is the rate at which the image is encoded, D represents the associated distortion, and λ represents the Lagrangian.
[0016] Therefore, a new encoding and decoding method is needed to improve the compression of image or video data. Summary of the invention
[0017] The present invention improves the prior art. To this end, the present invention relates to a method for decoding a coded data stream representing at least one image split into blocks, said method for decoding comprising performing the following operations for at least one block of said image, called the current block:
[0018] - decoding an item of information indicating a coding mode of said current block,
[0019] - when the coding mode of the current block corresponds to the first coding mode, decoding the current block, comprising: determining a first quantization step size to inverse quantize a prediction residual associated with the current block in a transform domain,
[0020] - when the encoding mode of the current block corresponds to the second encoding mode, decoding the current block, comprising: determining a second quantization step size to inverse quantize a prediction residual associated with the current block in the spatial domain,
[0021] - The first quantization step size and the second quantization step size are determined according to the same quantization parameter.
[0022] According to the present invention, it is therefore possible to define a first quantization step size for a prediction residual to be quantized / dequantized in the transform domain and to define a second quantization step size for a prediction residual to be quantized / dequantized in the spatial domain, the first quantization step size and the second quantization step size being determined by the same quantization parameter. Thus, the first quantization step size and the second quantization step size are linked and can be used together.
[0023] Advantageously, according to the invention, the quantization step sizes used in the different coding modes available for the current block are consistent, in particular for a rate / distortion optimization mechanism applied to the current block, but when some blocks are coded according to a first coding mode and other blocks are coded according to a second coding mode, the quantization step sizes are also consistent between blocks, in particular for a rate / distortion optimization mechanism applied to the image. In practice, if the quantization step sizes are not linked together, one of the two quantization step sizes may become very large compared to the other quantization step size. Then, the block coded according to the coding mode using a very large quantization step size will be highly compressed, unlike the other blocks coded according to another coding mode using a smaller quantization step size, which will result in significant spatial variations in visual quality in the image and, therefore, in a lower visual quality of the entire image.
[0024] According to the invention, the first coding mode corresponds to encoding the block in the transform domain. In other words, according to the first coding mode, the prediction residual of the current block calculated in the spatial domain, i.e. the prediction residual between the original block and the predicted block, is transformed, for example, by a DCT transform to provide a transform coefficient block. The transform coefficient block is then quantized using a first quantization step size.
[0025] The second coding mode corresponds to coding the block in the spatial domain. In other words, according to this second coding mode, the prediction residual of the current block calculated in the spatial domain is directly quantized without undergoing any transform operation.
[0026] According to a specific embodiment of the present invention, when the encoding mode of the current block corresponds to the second encoding mode, decoding the current block further includes performing the following operations for each pixel of the current block:
[0027] - obtaining a prediction of said pixel from another pixel previously decoded, said other pixel previously decoded belonging to said current block or to a previously decoded block of said image,
[0028] - decoding the prediction residual associated with said pixel,
[0029] - dequantizing the prediction residual associated with the pixel using the second quantization step size,
[0030] - reconstructing the pixel by adding the prediction of the pixel and the inverse quantized prediction residual.
[0031] According to this particular embodiment of the invention, according to the second coding mode, the prediction of the current block is obtained by locally predicting each pixel of the current block using previously decoded pixels of the current block or pixels of previously decoded neighboring blocks, thereby improving pixel prediction.
[0032] The invention also relates to a method for encoding a data stream representing the encoding of at least one image split into blocks, said method for encoding comprising, for at least one block of the image, called the current block, performing the following operations:
[0033] - encoding an information item indicating a coding mode for said current block,
[0034] - when the encoding mode of the current block corresponds to a first encoding mode, encoding the current block, comprising: determining a first quantization step size to quantize a prediction residual associated with the current block in a transform domain,
[0035] - when the encoding mode of the current block corresponds to the second encoding mode, encoding the current block, comprising: determining a second quantization step size to quantize a prediction residual associated with the current block in the spatial domain,
[0036] - The first quantization step size and the second quantization step size are determined according to the same quantization parameter.
[0037] According to a specific embodiment of the present invention, when the encoding mode of the current block corresponds to the second encoding mode, encoding the current block includes, for each pixel of the current block, performing the following operations:
[0038] - obtaining a prediction of said pixel from another pixel previously decoded, said other pixel previously decoded belonging to said current block or to a previously decoded block of said image,
[0039] - obtaining a prediction residual associated with said pixel from the prediction of said pixel,
[0040] - quantizing the prediction residual associated with the pixel using the second quantization step size,
[0041] - encoding the quantized prediction residual.
[0042] According to the present invention, the current block can be encoded / decoded by conventional intra-frame prediction (first coding mode), such as spatial prediction according to any prediction mode defined in the HEVC standard, or by new intra-frame prediction based on the use of pixels of the current block that have been previously decoded (second coding mode).
[0043] According to this new intra prediction, also referred to as ILR (In-Loop Residual) hereinafter, each pixel is predicted, then the residual of the predicted pixel is calculated, and the residual is quantized. The quantized residual is then dequantized and added to the prediction of the pixel to reconstruct the value of the pixel and obtain its decoded value. The decoded value of such a pixel can then be used to predict other pixels of the current block.
[0044] Advantageously, such intra prediction methods can use pixels that are spatially closer to the reference pixels used in conventional intra prediction to predict the pixels of the current block, thereby improving the prediction.
[0045] According to another specific embodiment of the above decoding method or encoding method, the second quantization step size is determined according to the first quantization step size.
[0046] According to this particular embodiment of the invention, the quantization parameter then corresponds to the first quantization step size, and the two quantization step sizes are dependent on each other.
[0047] As a variation of this particular embodiment, the second quantization step size is a*δ1+b or Determine, where δ1 corresponds to the first quantization step size, and a, b, c, d, e are predetermined parameters.
[0048] According to another specific embodiment of the above decoding method or encoding method, the first quantization step size is obtained from a quantization step size table predetermined for values of a quantization parameter.
[0049] According to another particular embodiment of the above decoding method or encoding method, the quantization parameter corresponds to the Lagrangian λ for optimizing the D+λ*R function, where R corresponds to the rate of the data stream and D corresponds to the associated distortion of the decoded image.
[0050] According to another particular embodiment of the above decoding method or encoding method, the quantization parameter is encoded in the data stream or decoded from the data stream.
[0051] According to another specific embodiment, decoding the current block according to the second encoding mode further comprises:
[0052] - decoding another prediction residual associated with said current block,
[0053] - dequantizing said further prediction residual associated with said current block using said first quantization step size,
[0054] - reconstructing the current block from the reconstructed pixels of the current block and the further inverse quantized prediction residual.
[0055] According to this particular embodiment of the invention, when the current block is encoded according to the second coding mode, the second prediction residual of the current block is encoded / decoded according to the prediction obtained when encoding the first prediction residual pixel by pixel. The additional characteristics of this particular embodiment correspond to the decoding step of the block encoded according to the first coding mode. Therefore, it is possible to maintain similar encoding / decoding for both coding modes, in particular at the entropy encoder / decoder level, thereby further improving the compression performance.
[0056] The invention also relates to a stream or signal of coded data representing at least one image, said image being split into blocks, said coded data stream comprising, for at least one block of the image, called the current block:
[0057] - an information item indicating a coding mode of said current block,
[0058] - when the coding mode of the current block corresponds to the first coding mode, a prediction residual associated with the current block comprising coefficients transformed and quantized using a first quantization step size,
[0059] - when the coding mode of the current block corresponds to the second coding mode, a prediction residual associated with the current block comprising a prediction residual value quantized in the spatial domain using a second quantization step size,
[0060] - The first quantization step size and the second quantization step size are determined according to the same quantization parameter.
[0061] According to a particular embodiment of the invention, said encoded data stream further comprises said quantization parameter.
[0062] The invention also relates to a decoding device configured to implement a decoding method according to any one of the specific embodiments defined above. Of course, the decoding device may include different characteristics related to the decoding method according to the invention. Therefore, the characteristics and advantages of the decoding device are the same as those of the decoding method and they will not be described in further detail.
[0063] The decoding device comprises in particular a processor configured to perform the following operations for at least one block of the image, referred to as the current block:
[0064] - decoding an item of information indicating a coding mode of said current block;
[0065] - when the coding mode of the current block corresponds to a first coding mode, decoding the current block by determining a first quantization step size for inverse quantizing a prediction residual associated with the current block in a transform domain;
[0066] - when the encoding mode of the current block corresponds to a second encoding mode, decoding the current block by determining a second quantization step size for inverse quantizing a prediction residual associated with the current block in the spatial domain,
[0067] - The first quantization step size and the second quantization step size are determined according to the same quantization parameter.
[0068] According to a particular embodiment of the invention, such decoding means are comprised in a terminal.
[0069] The invention also relates to a coding device configured to implement a coding method according to any one of the specific embodiments defined above. Of course, the coding device may include different characteristics related to the coding method according to the invention. Therefore, the characteristics and advantages of the coding device are the same as those of the coding method and they will not be described in further detail.
[0070] The encoding device comprises in particular a processor configured to perform, for at least one block of the image, referred to as the current block:
[0071] - encoding an information item indicating a coding mode for said current block,
[0072] - encoding the current block by determining a first quantization step size for quantizing a prediction residual associated with the current block in a transform domain, when the encoding mode of the current block corresponds to a first encoding mode,
[0073] - when the encoding mode of the current block corresponds to a second encoding mode, encoding the current block by determining a second quantization step size for quantizing a prediction residual associated with the current block in the spatial domain,
[0074] - The first quantization step size and the second quantization step size are determined according to the same quantization parameter.
[0075] According to a particular embodiment of the invention, such encoding means are comprised in a terminal or a server.
[0076] The decoding method according to the invention, the corresponding encoding method can be implemented in various ways, in particular in wired form or in software form. According to a specific embodiment of the invention, the decoding method, the corresponding encoding method is implemented by a computer program. The invention also relates to a computer program comprising instructions, which, when executed by a processor, are used to implement the decoding method or encoding method according to any of the specific embodiments previously described. Such a program can use any programming language. It can be downloaded from a communication network and / or recorded on a computer readable medium.
[0077] The program may use any programming language, and may be in the form of source code, object code, or an intermediate code between source code and object code, such as a partially compiled form, or any other desired form.
[0078] The present invention further relates to a computer-readable storage medium or data medium comprising the instructions of a computer program as described above. The above-mentioned recording medium can be any entity or device capable of storing a program. For example, the medium can include a storage component such as a memory. On the other hand, the recording medium can correspond to a transmissible medium such as an electrical signal or an optical signal, which can be carried via a cable or optical cable, by radio or by other means. According to the program of the present invention, it can be downloaded particularly on a network of the Internet type.
[0079] Alternatively, the recording medium may correspond to an integrated circuit in which the program is embedded, the circuit being suitable for executing or for executing the method in question. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Other characteristics and advantages of the invention will appear more clearly on reading the following description of specific embodiments provided as simple illustrative and non-limiting examples and the accompanying drawings, in which:
[0081] Figure 1 The steps of the encoding method according to a specific embodiment of the present invention are shown;
[0082] Figure 2 An example of the positions of neighboring blocks of a current block for determining an intra prediction mode according to a specific embodiment of the present invention is shown;
[0083] Figure 3 An example of the position of reference pixels used to predict pixels of a current block according to a specific embodiment of the present invention is shown;
[0084] Figure 4 The steps of a decoding method according to a specific embodiment of the present invention are shown;
[0085] Figure 5 An example of a signal comprising coded data representing at least one block of an image according to a particular embodiment of the invention is shown;
[0086] Figure 6 shows a simplified structure of a coding device suitable for implementing a coding method according to any one of the specific embodiments of the present invention;
[0087] Figure 7 A simplified structure of a decoding device suitable for implementing a decoding method according to any one of the specific embodiments of the present invention is shown. DETAILED DESCRIPTION
[0088] 5.1 General Principles
[0089] The general principle of the invention is to jointly determine a first quantization step size for quantizing the transform coefficients of the prediction residual and a second quantization step size for directly quantizing the values of the prediction residual in the spatial domain (i.e. without any transform operation). To this end, the first and second quantization step sizes depend on the same quantization parameter.
[0090] According to different specific embodiments of the invention, the quantization parameter may correspond to one or the other of the first and second quantization step sizes, or to a quantization parameter determined by the encoder or by a user, or to a Lagrangian used during rate / distortion optimization at the encoder.
[0091] The quantization parameter may also be encoded in the data stream and transmitted to the decoder.
[0092] When the quantization parameter corresponds to the first quantization step size, the second quantization step size may be determined according to a linear or polynomial function, or a more general function, of the first quantization step size.
[0093] The invention thus improves the compression performance when different coding modes are used in the same system for encoding / decoding an image or a sequence of images, respectively performing the coding of the prediction residual with and without a transform operation.
[0094] Figure 1The steps of the encoding method according to a specific embodiment of the present invention are shown. For example, according to a specific embodiment of the present invention, the image sequences I1, I2, ..., I3 are encoded in the form of a coded data stream STR. Nb For example, such an encoding method is as described later in Figure 6 The invention is implemented by the described encoding device.
[0095] Image sequence I1, I2, ..., I Nb As input to the encoding method is provided Nb, wherein Nb is the number of images of the sequence to be encoded. The encoding method outputs a data stream STR representing the encoding of the sequence of images provided as input.
[0096] In a known manner, the image sequence I1, I2, ..., I3 is completed image by image according to a coding order previously established and known to the encoder. Nb For example, the encoding can be in the time sequence I1, I2, ..., I Nb Or in another order (e.g. I1, I3, I2, ..., I Nb ) to encode the image.
[0097] In step E0, the image sequence I1, I2, ..., I Nb The image to be encoded I j Split into blocks, for example into blocks of size 32×32 or 64×64 pixels or larger. Such blocks can be subdivided into square or rectangular sub-blocks, for example 16×16, 8×8, 4×4, 16×8, 8×16...
[0098] In optional step E10, according to a particular embodiment of the invention, the quantization parameter QP is present in the data stream STR, in the image I j The encoded data is encoded at or at the data encoded for the image sequence.
[0099] Then, in step E1, according to image I j The predetermined scanning order is used to select the image I j The first block or subblock to be encoded X b . For example, it can be the first block in the dictionary scan order of the image.
[0100] In step E2, the encoder selects a coding mode to encode the current block X. b to encode.
[0101] According to a specific embodiment described herein, the encoder selects a coding mode from a first coding mode M1 and a second coding mode M2 to encode the current block X bAdditional encoding modes (not described here) may be used.
[0102] 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 defined according to the HEVC standard, and the second coding mode M2 corresponds to in-loop residual (ILR) prediction coding.
[0103] The principles of the invention can be extended to other types of coding modes, both for the first coding mode M1 and the second coding mode M2. For example, the first coding mode may correspond to any type of coding mode that uses a transformation of the prediction residual before quantizing the coefficients resulting from the transformation operation (inter-image prediction coding, spatial prediction using template matching coding, etc.). The second coding mode may correspond to any type of coding mode that uses quantization of the values of the prediction residual in the spatial domain, i.e., without performing any transformation operation of the prediction residual, such as DCT.
[0104] In step E2, the encoder may perform a rate / distortion optimization to determine the best coding mode for encoding the current block. During this rate / distortion optimization, additional coding modes different from the first coding mode and the second coding mode may be tested, such as an inter-mode coding mode. During this rate / distortion optimization, the encoder simulates the encoding of the current block Xb according to different available coding modes in order to determine the rate and distortion associated with each coding mode and selects the coding mode that provides the best rate / distortion compromise, for example according to a D+λR function, where R is the rate required to encode 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 Lagrange multiplier, for example defined by a user input or at the encoder.
[0105] In step E20 , an item of information indicating the coding mode selected for the current block is encoded in the data stream STR.
[0106] If the current block Xb is coded according to the first coding mode M1, the method proceeds to step E21 to code the block according to M1. If the current block Xb is coded according to the second coding mode M2, the method proceeds to step E22 to code the block according to M2.
[0107] A step E21 for encoding a block according to a 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 conventional intra prediction, such as that defined in the HEVC standard.
[0108] At step E210, a quantization step size δ1 is determined. For example, the quantization step size δ1 may be set by the user or calculated using a quantization parameter that sets a tradeoff between compression and quality and is input by the user or defined by the encoder. Thus, such a quantization parameter may be the parameter λ used in a rate-distortion cost function D+λ*R, where D represents the distortion introduced by the encoding and R represents the rate used for the encoding. This function is used to make encoding choices, typically seeking a way to encode the image that minimizes this function.
[0109] As a variant, the quantization parameter may be QP, which corresponds to the quantization parameter conventionally used in the AVC or HEVC standard. Thus, in the HEVC standard, the quantization step size δ1 is determined by the equation δ1=levelScale[QP%6]<<(QP / 6)), where levelScale[k]={40,45,51,57,64,72} for k=0..5.
[0110] In step E211, the 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 decoded pixels (reference pixels) originating from neighboring blocks located above and to the left of the current block. The way in which pixels are predicted from reference pixels depends on the prediction mode transmitted to the decoder and is selected by the encoder from a set of predetermined modes known to the encoder and the decoder.
[0111] Thus, in HEVC, there are 35 possible prediction modes: 33 modes in which reference pixels are interpolated in 33 different angular directions, and 2 other modes: DC mode in which each pixel of the prediction block is generated from the average value of the reference pixels, and planar mode in which planar and non-directional interpolation is performed. This "traditional intra prediction" is well known and is also described in the ITU-T H.264 standard (in which there are only 9 different modes) and at the Internet address ( https: / / jvet.hhi.fraunhofer.de / ) is used in the experimental JEM software available from 2007 (where there are 67 different prediction modes). In all cases, conventional intra prediction adheres to the above two aspects (predicting pixels from neighboring blocks and transmitting the best prediction mode to the decoder).
[0112] At step E211 , the encoder therefore selects one of the available prediction modes from a list of predetermined prediction modes. One way of selection consists, for example, in evaluating all prediction modes and keeping the prediction mode that minimizes a cost function, such as, classically, a rate-distortion cost.
[0113] In step E212, the prediction mode selected for the current block is encoded from neighboring blocks of the current block. Figure 2 Shows the current block X bThe adjacent block A b and B b To the current block X b An example of where the prediction mode is encoded.
[0114] At step E212 , the intra prediction mode selected for the current block is encoded using the intra prediction modes associated with the neighboring blocks.
[0115] According to a variant of a particular embodiment of the invention described here, the intra prediction mode associated with a block is:
[0116] - The intra prediction mode used to predict the block, if the block was encoded by a conventional intra prediction coding mode.
[0117] - an intra prediction mode associated with the block, if the block is coded by a coding mode different from conventional intra prediction. An example of such an association is described later with reference to step E229.
[0118] Therefore, the scheme described in the HEVC standard for encoding the prediction mode of the current block can be used. Figure 2 In the example of , such a scheme includes identifying a block A located above the current block. b The associated intra prediction mode m A , and block B just to the left of the current block b The associated intra prediction mode m B . Depends on m A and m B A list called MPM (Most Probable Mode) containing 3 intra prediction modes and a list called non-MPM containing 32 other prediction modes are created based on the value of .
[0119] According to a variant of the particular embodiment described here, the mechanism for creating the MPM list specified according to the HEVC standard is adapted so as to take into account the association of an intra prediction mode with a block during its coding when the block is not coded according to a conventional intra coding mode (step E229 described later). According to this variant, the neighboring blocks of the current block always have an intra prediction mode associated with them, regardless of whether the block is coded according to intra coding mode or according to another coding mode (ILR, inter, etc.).
[0120] The rest of the mechanism for creating an MPM list remains similar to the mechanism specified according to the HEVC standard. A and m BIf both are equal to the same intra-frame prediction mode and the intra-frame prediction mode is DC or planar prediction mode, then the MPM list includes the following prediction modes: MPM[0] = planar, MPM[1] = DC, MPM[2] = A(26) (which corresponds to the angular prediction mode at index 26 of the HEVC intra-frame prediction mode table).
[0121] If m A and m B are all 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).
[0122] If m A and m B If different, the MPM list includes the following prediction modes:
[0123] MPM[0] = m B ,MPM[1]=m A ,MPM[2]=Mlast, where Mlast is defined as follows:
[0124] - If m B is not equal to the plane mode and m A is not equal to the plane mode, then Mlast is equal to the plane mode,
[0125] - If not, if m B is not equal to the DC mode and m A is not equal to the DC mode, then Mlast is equal to the DC mode,
[0126] - Otherwise, Mlast is equal to angle mode A (26).
[0127] The non-MPM list includes all other intra prediction modes not included in the MPM list.
[0128] According to another variant of the particular embodiment described here, according to the mechanism for creating the MPM list specified according to the HEVC standard, if the neighboring block A b or B b If one of the MPM lists is not coded according to intra prediction mode, it is assigned DC prediction mode by default. The rest of the mechanism for creating the MPM list remains similar to the mechanism specified according to the HEVC standard and as described above.
[0129] According to the HEVC standard, in order to encode the intra prediction mode of the current block, the syntax element is transmitted:
[0130] - a binary indicator indicating whether the prediction mode to be encoded for the current block is in the MPM list,
[0131] - if the prediction mode of the current block belongs to the MPM list, then encode the index of the prediction mode in the MPM list corresponding to the current block,
[0132] - If the prediction mode of the current block does not belong to the MPM list, then encode the index of the prediction mode corresponding to the current block in the non-MPM list.
[0133] In step E213 , the prediction residual R of the current block is constructed.
[0134] At step E213, in a conventional manner, a prediction block P is constructed according to the prediction mode selected at step E211. The prediction residual R is then obtained by calculating the difference per pixel between the prediction block P and the original current block.
[0135] In step E214, the prediction residual R is transformed into R T .
[0136] At step E214, a frequency transformation is applied to the residual block R so as to generate a block R comprising transformation coefficients T For example, the transform may be a DCT type transform. It may be possible to select from a predetermined set of transforms E T The transform to be used is selected in the decoder and the decoder is informed of the transform to be used.
[0137] At step E215, the transformed residual block R is quantized using, for example, a quantization step size scalar quantization δ1. T This produces a quantized transformed prediction residual block R TQ .
[0138] In step E216, the quantized block R is coded by an entropy encoder. TQ For example, entropy coding specified in the HEVC standard may be used.
[0139] According to the embodiment variant described here, at step E217 , the prediction mode determined at step E211 is associated with the current block.
[0140] In a known manner, by quantizing the block R TQ The current block is decoded by dequantizing the coefficients of the image, and then applying the inverse transform to the dequantized coefficients to obtain a decoded prediction residual. The prediction is then added to the decoded prediction residual 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.
[0141] A step E22 for encoding 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 ILR prediction coding.
[0142] At step E220, a local predictor PL of 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 neighboring blocks of the current block or of the current block itself.
[0143] Preferably, for the prediction, a pixel is selected that is as close as possible to the pixel to be predicted. That is why it is called a local predictor. The local predictor PL can also be assimilated to the prediction mode of the current block associated with the second coding mode M2. According to this explanation, in the specific embodiment described here, the first coding mode uses a first set of intra-frame prediction modes, such as the intra-frame prediction modes defined by the HEVC standard, and the second coding mode (here the ILR mode) uses a second set of prediction modes that is different from the first set of intra-frame prediction modes. According to the embodiment variant described later, the correspondence between the two sets of prediction modes can be determined.
[0144] The local predictor PL may be unique or may be selected from a set of predetermined local predictors (a second set of prediction modes).
[0145] According to a variant embodiment, four local predictors are defined. Thus, as shown in FIG. b of Figure 3 As shown, if we call X the current pixel to be predicted from the current block, then A is called the pixel immediately to the left of X, B is called the pixel immediately above the left of X, and C is called the pixel immediately above X. The four local predictors PL1, PL2, PL3, and PL4 can be defined as follows:
[0146] PL1(X)=min(A,B)if C≥max(A,B)
[0147] max(A,B) if C ≤ min(A,B)
[0148] A+BC Other situations
[0149] PL2(X)=A
[0150] PL3(X)=B
[0151] PL4(X)=C
[0152] Where min(A, B) corresponds to a function that returns the minimum value between the value of A and the value of B, and max(A, B) corresponds to a function that returns the maximum value between the value of A and the value of B.
[0153] 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 pixels of the current block, ie the same prediction function. To this end, several embodiment variants are possible.
[0154] Encoding the current block using each predictor can be simulated (similar to optimization to select the encoding mode for the current block), and the local predictor that optimizes the cost function (e.g., minimizing the D+λ*R function, where R is the rate used to encode 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.
[0155] Alternatively, to limit the complexity of selecting a local predictor for the current block, analyze the orientation of the texture of previously coded pixels. For example, use a Sobel type operator to analyze previously coded pixels in blocks located above or to the left of the current block. If it is determined that:
[0156] - the orientation is horizontal, then the local predictor PL2 is selected,
[0157] - the orientation is vertical, then the local predictor PL3 is selected,
[0158] - If it is diagonal, then the local predictor PL4 is selected,
[0159] - If no orientation is present, the local predictor PL1 is selected.
[0160] A syntax element is encoded in the data stream STR to indicate to the decoder which local predictor to use for predicting the current block.
[0161] At step E221 , the quantization step δ2 is determined. According to the particular embodiment described here, if the current block is coded according to the first coding mode, the quantization step δ2 depends on the same quantization parameter as the quantization step δ1 to be determined at step E210 .
[0162] According to one variation, the quantization step size δ2 may be determined based on the quantization step size δ1. For example, a linear or polynomial function may be used, such as δ2=a1*δ1+b1, where a1 and b1 are predetermined integers or real numbers, or δ2=c1*δ1 2 +d1*δ1+e1, where c1, d1 and e1 are predetermined integers or real numbers. For example, a1=2, b1=10, c1=0.1, d1=2 and e1=10. Other values are also possible.
[0163] According to another variant, the quantization step size δ2 may be determined from a parameter λ setting a trade-off between compression and quality. This Lagrangian parameter λ may be defined by user input or by the encoder, similar to δ1, or determined from the previously mentioned quantization parameter QP.
[0164] According to another variant, the quantization step size δ2 can be set directly by the user, and it is then dependent on the quantization step size δ1 of δ2.
[0165] At step E222, the prediction residual R1 is calculated for the current block. To this end, once the local predictor has been selected, for each current pixel of the current block:
[0166] - The current pixel X of the current block is predicted by the selected local predictor PL using already reconstructed pixels outside the block (and therefore available with their decoded values) or previously reconstructed pixels in the current block, or both, in order to obtain the prediction value PRED. In all cases, the predictor PL uses previously reconstructed pixels. Figure 3 It can be seen that the pixels of the current block located on the first row and / or first column of the current block will use the pixels outside the block and have been reconstructed ( Figure 3 The gray pixels in the current block) and possibly the reconstructed pixels of the current block are used as reference pixels (to construct the prediction value PRED). For other pixels of the current block, the reference pixels used to construct the prediction value PRED are located inside the current block.
[0167] - quantize the difference DIFF between PRED and X to a value Q(X) by Q(X)=ScalarQuant(DIFF)=ScalarQuant(δ2,X-PRED) by a quantization step size scalar quantizer δ2, the scalar quantizer being, for example, a nearest neighbor scalar quantizer such as:
[0168] Q(X) is the quantized residual associated with X. It is calculated in the spatial domain, i.e. directly from the difference between the predicted value PRED of the pixel X and the original value of X. Such a quantized residual Q(X) of the pixel X is stored in a quantized prediction residual block R1 to be encoded later. Q middle.
[0169] - The decoded prediction value P1(X) of X is calculated by adding the dequantized value of the quantized residual Q(X) to the prediction value PRED. Thus, the decoded prediction value P1(X) of X is obtained by P1(X)=PRED+ScalarDequant(δ2,Q(X)). For example, the recent inverse scalar quantization function is given by: ScalarDequant(Δ,x)=Δ×x.
[0170] Thus, the decoded prediction value P1(X) makes it possible to predict possible pixels still to be processed in the current block. Furthermore, the block P1 comprising decoded / reconstructed values of pixels of the current block is an ILR predictor of the current block (as opposed to a conventional intra predictor).
[0171] The above sub-steps are performed for all pixels of the current block in a scanning order that ensures that the pixels used for prediction selected from PL1, ..., PL4 are available.
[0172] According to an embodiment variant, the scanning order of the current block is lexicographical, ie from left to right, and from top to bottom.
[0173] According to another embodiment variant, several scanning orders of the current block may be used, for example:
[0174] - lexicographic order, or
[0175] - scan the first column from top to bottom, then the column immediately to its right, etc., or,
[0176] -Scan the diagonal lines one by one.
[0177] According to this other variant, it is possible to simulate the coding costs associated with each scanning order and select the best scanning order in terms of rate / distortion for the current block and then encode for the current block an information item representative of the selected scanning order.
[0178] At the end of step E222, the quantized residual block R1 is determined Q The quantized residual block R1 Q must be encoded for transmission to the decoder. The predictor P1 for the current block is also determined.
[0179] In step E223, the quantized residual block R1 Q is encoded for transmission to a decoder. The quantized coefficients of the conventional prediction residual may be encoded using any known scheme, such as the method described in HEVC. For example, according to a variant embodiment, the quantized residual block R1 is encoded using an entropy encoder in the data stream STR. Q Encode the value of .
[0180] According to a particular embodiment of the invention, it is possible to determine and encode the additional prediction residual R2 based on the ILR predictor obtained for the current block. However, encoding the additional prediction residual R2 is optional. In practice, it is possible to obtain the predicted version P1 of the current block and the quantized residual R1 Q , to simply encode the current block.
[0181] In order to encode the additional prediction residual R2 of the current block, the following steps are performed.
[0182] At step E224, the predictor P1 is calculated and the original current block X b The difference between R2 and R2 is used to form an additional residual R2: R2 = X b-P1. The following steps correspond to the conventional encoding steps for this residue R2.
[0183] In step E225, the residual R2 is transformed using a frequency transform so as to generate coefficients R2 T piece.
[0184] For example, the transform may be a DCT type transform. T2 The transform to be used is selected from a predetermined set of E and the decoder is informed of the transform used. T2 Can be different from the set E T , in order to adapt the specific statistics of the residual R2.
[0185] In step E226, the block R2 of coefficients is quantized, for example using a quantization step size scalar quantization δ. T This produces block R2 TQ .
[0186] The quantization step size δ may be set by the user. The step size may also be calculated using another parameter λ that sets a tradeoff between compression and quality and is input by the user or the encoder. For example, the quantization step size δ may correspond to the quantization step size δ1 or be determined similarly thereto.
[0187] In step E227, the quantized block R2 is then transmitted in an encoded manner TQ For example, the encoding specified in the HEVC standard may be used.
[0188] In a known manner, by quantizing the block R2 TQ The current block is decoded by dequantizing the coefficients of , and then applying the inverse transform to the dequantized coefficients to obtain the decoded prediction residual. The prediction P1 is then added to the decoded prediction residual in order to reconstruct the current block and obtain its decoded version X rec The decoded version X of the current block can then be used later rec , to spatially predict other adjacent blocks of an image or to predict blocks of other images through inter-image prediction.
[0189] According to a particular embodiment of the invention, a conventional intra prediction mode is determined and associated with the current block. To this end, at step E228, an intra prediction mode for the current block is determined from a list of intra prediction modes available in conventional intra coding modes.
[0190] Several embodiment variations are possible.
[0191] According to a variant, an MPM prediction mode list is created for the current block according to the mechanism described above for encoding according to the first coding mode M1. According to this variant, the prediction mode is determined as the first mode in the MPM list.
[0192] According to another variant, the prediction mode is predetermined, for example, it may be a prediction mode defined by default, or a prediction mode transmitted in the data stream. For example, the predetermined prediction mode is the planar mode of the HEVC standard.
[0193] According to another variant, the prediction mode is determined as the closest to the decoded current block X rec According to this variant, by measuring the decoded current block X rec All prediction modes are evaluated based on the distortion between the predicted block and the one obtained by the evaluated prediction mode. The intra prediction mode that provides the smallest distortion is selected.
[0194] According to another variant, the prediction mode is determined to be the intra prediction mode of the current block P1 that is closest to the prediction obtained by ILR prediction. According to this variant, all prediction modes are evaluated by measuring the distortion between the predicted current block P1 and the prediction block obtained by the evaluated prediction mode. The intra prediction mode that provides the smallest distortion is selected.
[0195] According to another variant, when there are several possible local predictors for an ILR coded block, the intra prediction mode may depend on the local predictor selected for predicting the current block. For example, an association table indicates which intra prediction mode should be associated with the current block depending on the selected local predictor.
[0196] In step E229, the determined intra prediction mode is associated with the current block. The idea here is to associate the intra prediction mode but not transmit it to the decoder. The method of determining the intra mode to be associated with the current block is reproducible in the decoder and does not require the transmission of any information.
[0197] Several embodiment variants have been described above, but the encoder and decoder must of course implement the same variants.
[0198] According to certain embodiments described herein, the intra prediction mode associated with the current block may then be used to:
[0199] - an intra prediction mode that predicts a subsequent block to be encoded in conventional intra mode, or
[0200] - Where appropriate, determining that said intra prediction mode is associated with a subsequent block to be encoded according to another coding mode different from said conventional intra prediction mode. Said other coding mode may be an ILR coding mode or other (inter etc.).
[0201] In 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 scanning order previously defined. If yes, the method proceeds to coding the next image of the video, if any (step E25). If not, in step E24, a subsequent block of the image to be processed is selected according to the scanning order of the images previously defined, and the coding method proceeds to step E2, in which the selected block becomes the current block to be processed.
[0202] Figure 4 A method for decoding a sequence of images I1, I2, ..., I2, according to a specific embodiment of the present invention, is shown. Nb The steps of the method for decoding an encoded data stream str.
[0203] For example, through the Figure 1 The encoding method shown generates a data stream STR. Figure 7 As described, the data stream STR is supplied as input to the decoding means DEC.
[0204] This decoding method decodes the stream picture by picture, and decodes each picture block by block.
[0205] In step E40, the image I to be decoded j Subdivided into blocks. Each block will undergo a decoding operation consisting of a series of steps described in detail later. Blocks can be of the same size or of different sizes.
[0206] In optional step E401 , according to a particular embodiment of the invention, a quantization parameter QP is read from the data stream STR.
[0207] In step E41, according to image I j The predetermined scanning order is selected, and image I j The first block or sub-block to be decoded X b As the current block. For example, it can be the first block in the dictionary scan order of the image.
[0208] At step E42, an information item indicating the coding mode of the current block is read from the data stream STR. According to the particular embodiment described here, the information item 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 a conventional intra-frame prediction coding of the current block (for example defined according to the HEVC standard), and the second coding mode M2 corresponds to an in-loop residual (ILR) prediction coding.
[0209] In other specific embodiments, the information items read from the stream STR may also indicate the use of other encoding modes for encoding the current block (not described here).
[0210] The following describes step E43 for decoding the current block when the current block is encoded according to the first encoding mode M1.
[0211] In step E430, the quantization step size δ1 is determined. For example, the quantization step size δ1 is determined according to the quantization parameter QP read in step E401, or similar to the actions performed at the encoder. For example, the quantization step size δ1 can be calculated using the quantization parameter QP read in step E401. For example, the quantization parameter QP can be the quantization parameter traditionally used in the AVC or HEVC standard. Therefore, in the HEVC standard, the quantization step size δ1 is determined by the equation δ1=levelScale[QP%6]<<(QP / 6)), where, for k=0..5, levelScale[k]={40,45,51,57,64,72}.
[0212] At step E431 , the prediction mode selected for encoding the current block is decoded from the neighboring blocks. To this end, the intra prediction mode selected for the current block is encoded using the intra prediction modes associated with the neighboring blocks of the current block, as done at the encoder.
[0213] According to a variant of a particular embodiment of the invention described here, the intra prediction mode associated with a block is:
[0214] - the intra prediction mode used to predict the block, if the block was encoded by a conventional intra prediction coding mode,
[0215] - an intra prediction mode associated with the block, if the block is coded by a coding mode different from conventional intra prediction. An example of such an association is described later with reference to steps E449 and E450.
[0216] The construction of MPM and non-MPM lists is strictly similar to what is done during encoding. According to the HEVC standard, the following types of syntax elements are decoded:
[0217] - a binary indicator indicating whether the prediction mode to be encoded for the current block is in the MPM list,
[0218] - if the prediction mode of the current block belongs to the MPM list, then encode the index of the prediction mode in the MPM list corresponding to the current block,
[0219] - If the prediction mode of the current block does not belong to the MPM list, then encode the index of the prediction mode corresponding to the current block in the non-MPM list.
[0220] Therefore, the binary indicator and the prediction mode index of the current block are read from the data stream STR to decode the intra prediction mode of the current block.
[0221] At step E432 , the decoder constructs a prediction block P of the current block according to the decoded prediction mode.
[0222] In step E433, the decoder decodes the quantized block R from the data stream STR, for example using the decoding specified in the HEVC standard. TQ The coefficient of .
[0223] In step E434, the decoded block R is dequantized, for example using a scalar quantization step size δ1. TQ This produces a block R of inverse quantized coefficients. TQD .
[0224] In step E435, the block R of inverse quantized coefficients TQD Apply the inverse frequency transform to produce the decoded prediction residual block R TQDI For example, the transform may be an inverse DCT type transform. It is possible to decode the indicator from the data stream STR from the transform E TI Select the transform to use from a predetermined set of transforms.
[0225] At step E436, the predicted block P obtained at step E432 and the decoded residual block R obtained at step E435 are TQDI To restructure the current block so that it can be accessed by X rec =P+R TQDI To generate the decoded current block X rec .
[0226] According to the embodiment variant described here, at step E437 , the intra prediction mode decoded at step E431 is associated with the current block.
[0227] The following describes a step E44 for decoding the current block when the current block is encoded according to the second encoding mode M2.
[0228] At 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 set by default, for example at the decoder level, and it is not necessary to read syntax elements from the stream STR to determine it.
[0229] In the case where several local predictors are available, such as 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. Thus, the local predictor is determined from this decoded syntax element.
[0230] At step E441 , the quantization step size δ2 is determined, similarly to what is done at the encoder.
[0231] In step E442, the quantized residual R1 is decoded from the data stream STR. Q The quantized coefficients of the conventional prediction residual may be decoded using any known scheme, such as the method described in HEVC.
[0232] In step E443, the residual block R1 is quantized using the quantization step size δ2. Q Dequantize to generate a dequantized residual block R1 QD .
[0233] In step E444, when the inverse quantized residual block R1 is obtained QD , the prediction block P1 is constructed using the local predictor PL determined in step E440.
[0234] In step E444, each pixel of the current block is predicted and reconstructed as follows:
[0235] - The current pixel X of the current block is predicted by the selected predictor PL using pixels that are outside the block and already reconstructed or previously reconstructed pixels of the current block or both, in order to obtain the prediction value PRED. In all cases, the predictor PL uses previously decoded pixels.
[0236] - By dividing the prediction residual R1 QD The dequantized value of is added to the prediction value PRED to calculate the decoded prediction value P1(X) of the current pixel X, so that P1(X)=PRED+R1 QD (X).
[0237] These steps are performed for all pixels of the current block in a scanning order that ensures that the pixels selected from PL1, ..., PL4 for prediction are available.
[0238] For example, the scanning order is lexicographical (left to right, then rows top to bottom).
[0239] According to a particular embodiment of the invention, the prediction block P1 comprising the decoded prediction value P1(X) for each pixel of the current block forms the decoded current block X rec .
[0240] According to another specific embodiment of the present invention, it is considered that an additional prediction residual is encoded for the current block. Therefore, it is necessary to decode the additional prediction residual in order to reconstruct the current block X rec The decoded version of .
[0241] For example, the other specific embodiment may be activated or deactivated by default at the encoder and decoder level. Alternatively, an indicator may be encoded in the data stream using block level information to indicate whether additional prediction residuals are encoded for each block encoded according to the ILR coding mode. Alternatively, an indicator may be encoded in the data stream using picture or picture sequence level information to indicate whether additional prediction residuals are encoded for all blocks of a picture or picture sequence encoded according to the ILR coding mode.
[0242] When an additional prediction residual is encoded for the current block, at step E445 the coefficients R2 of the quantized prediction residual are obtained from the data stream STR using means suitable for implementation at the encoder, such as those implemented in a HEVC decoder. TQ to decode.
[0243] In step E446, the block R2 of quantized coefficients is dequantized, for example using a quantization step size scalar δ1. TQ This produces the inverse quantized coefficient block R2 TQD .
[0244] In step E447, for block R2 TQD Apply the inverse frequency transform to produce the decoded prediction residual block R2 TQDI .
[0245] For example, the inverse transform may be an inverse DCT type transform.
[0246] From the transformation E T2 The transform to be used is selected from a predetermined set of and the information item informing the decoder of the transform to be used is decoded. T2 Different from set E T , in order to adapt the specific statistics of the residual R2.
[0247] In step E448, the prediction block P1 obtained in step E444 is compared with the decoded prediction residual R2 TQDI Add them together to reconstruct the current block.
[0248] According to a specific embodiment of the present invention, a conventional intra prediction mode is determined and associated with the current block. To this end, in step E449, the intra prediction mode of the current block is determined from a list of intra prediction modes available in the conventional intra coding mode. This determination is implemented similarly to the determination implemented at the encoder level.
[0249] At step E450 , the determined intra prediction mode is associated with the current block.
[0250] At 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 scanning order previously defined. If yes, the method proceeds to decoding the next image of the video, if any (step E47). If not, at step E46, a subsequent block of the image to be processed is selected according to the scanning order of the images previously defined, and the decoding method proceeds to step E42, the selected block becoming the current block to be processed.
[0251] Figure 5 An example of a signal STR including encoded data representing at least one block of an image according to a specific embodiment of the present invention is shown. For example, the signal STR may include a quantization parameter QP for determining the above-mentioned quantization step size δ1 and quantization step size δ2. When encoding the video, the quantization parameter QP may be encoded at the block level, or at the image or image sequence level. The signal STR includes an encoded indicator TY, which indicates the encoding mode of the block for the block of the image. When the TY indicator indicates that the block is encoded according to the second encoding mode (here, the ILR mode), the signal includes a quantized prediction residual R1 Q The coded value and possible quantized transformed prediction residual R2 TQ When several local predictors are possible for the current block, the signal also includes an indicator of the PL encoding of the local predictor.
[0252] When the indicator TY indicates that the block is encoded according to the first coding mode (here the conventional intra prediction mode), the signal comprises the quantized transformed prediction residual R TQ The encoded value of the prediction mode to be encoded for the current block is a binary indicator i in the MPM list. MPM , and an index idx indicating the index of the current block prediction mode in the corresponding list MPM .
[0253] Figure 6 Shown is a simplified structure of a coding device COD suitable for implementing the coding method according to any one of the specific embodiments of the invention.
[0254] According to a particular embodiment of the invention, the steps of the coding method are implemented by computer program instructions. To this end, the coding device COD has a standard architecture of a computer and comprises in particular a memory MEM, a processing unit UT equipped with, for example, a processor PROC and driven by a 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.
[0255] At initialization, the code instructions of the computer program PG are loaded into a RAM memory (not shown), for example, before being executed by the processor PROC. In particular, the processor PROC of the processing unit UT implements the steps of the above-described encoding method according to the instructions of the computer program PG.
[0256] Figure 7 Shown is a simplified structure of a decoding device DEC suitable for implementing a decoding method according to any one of the specific embodiments of the invention.
[0257] According to a particular embodiment of the invention, the decoding device DEC has a standard architecture of a computer and comprises in particular a memory MEM0, a processing unit UT0 equipped with, for example, a processor PROC0 and driven by a 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.
[0258] At initialization, the code instructions of the computer program PG0 are loaded into a RAM memory (not shown), for example, before being executed by the processor PROC0. In particular, the processor PROC0 of the processing unit UT0 implements the steps of the above-described decoding method according to the instructions of the computer program PG0.
Claims
1. A method for decoding a data stream representing at least one image, said image being split into blocks, said method for decoding comprising performing the following operations for at least one block of said image, called the current block: - decoding (E42) an item of information indicating a coding mode of said current block, - when the encoding mode of the current block corresponds to the first encoding mode, decoding the current block (E43), comprising: determining (E430) a first quantization step size according to a quantization parameter for inverse quantization of a prediction residual associated with said current block in a transform domain, - when the encoding mode of the current block corresponds to a second encoding mode, decoding the current block (E44), comprising: determining (E441) a second quantization step size for inverse quantization of a prediction residual associated with the current block in the spatial domain, wherein the second quantization step size is different from the first quantization step size, - the first quantization step size and the second quantization step size are determined according to the same quantization parameter, Wherein, when the encoding mode of the current block corresponds to the first encoding mode, decoding the current block further includes performing the following operations on at least one pixel of the current block: - obtaining a prediction of said pixel from another pixel previously decoded, said other pixel previously decoded belonging to a previously decoded block of said image, - decoding the prediction residual associated with said pixel, - reconstructing said pixel from said prediction associated with said pixel using said first quantization step size and said prediction residual.
2. The method for decoding according to claim 1, wherein: When the encoding mode of the current block corresponds to the second encoding mode, the coefficients of the prediction residual associated with the current block are decoded by an entropy decoder, wherein when the encoding mode of the current block corresponds to the first encoding mode, the entropy decoder is used to decode the coefficients of the prediction residual associated with the current block.
3. The method for decoding according to claim 1 or 2, wherein: The second quantization step size is determined according to the first quantization step size.
4. The method for decoding according to claim 3, wherein: The second quantization step size is a*δ1+b or And determine, where δ1 corresponds to the first quantization step size, and a, b, c, d, e are predetermined parameters.
5. The method for decoding according to claim 1 or 2, wherein: The first quantization step size is obtained from a quantization step size table predetermined for the value of the quantization parameter.
6. The method for decoding according to claim 1 or 2, wherein: The quantization parameter corresponds to the Lagrangian λ used to optimize a D+λ*R function, where R corresponds to the rate of the data stream and D corresponds to the associated distortion of the decoded image.
7. The method for decoding according to claim 1 or 2, wherein: The quantization parameter is decoded from the data stream.
8. The method for decoding according to claim 1 or 2, wherein: Decoding the current block according to the second coding mode further includes: - decoding another prediction residual associated with said current block, - dequantizing said further prediction residual associated with said current block using said first quantization step size, - reconstructing the current block from the reconstructed pixels of the current block and the inverse quantized further prediction residual.
9. A method for encoding a data stream representing at least one image, said image being divided into blocks, said method for encoding comprising, for at least one block of said image, called the current block, performing the following operations: - encoding an information item indicating a coding mode of said current block (E20), - when the encoding mode of the current block corresponds to a first encoding mode, encoding the current block (E21), comprising: determining (E210) a first quantization step size according to a quantization parameter for quantizing a prediction residual associated with said current block in a transform domain, - when the encoding mode of the current block corresponds to a second encoding mode, encoding the current block (E22), comprising: determining (E221) a second quantization step size for quantizing a prediction residual associated with the current block in the spatial domain, wherein the second quantization step size is different from the first quantization step size, - the first quantization step size and the second quantization step size are determined according to the same quantization parameter, Wherein, when the encoding mode of the current block corresponds to the first encoding mode, encoding the current block includes performing the following operations on at least one pixel of the current block: - obtaining a prediction of said pixel from another pixel previously decoded, said other pixel previously decoded belonging to a previously decoded block of said image, - obtaining a prediction residual associated with said pixel from the prediction of said pixel, - quantizing the prediction residual associated with the pixel using the first quantization step size, - encoding the quantized prediction residual.
10. The method for encoding according to claim 9, wherein: When the encoding mode of the current block corresponds to the second encoding mode, the coefficients of the prediction residual associated with the current block are encoded by an entropy encoder, wherein when the encoding mode of the current block corresponds to the first encoding mode, the entropy encoder is used to encode the coefficients of the prediction residual associated with the current block.
11. The method for encoding according to claim 9 or 10, wherein: The second quantization step size is determined according to the first quantization step size.
12. The method according to claim 11, wherein: The second quantization step size is a*δ1+b or And determine, where δ1 corresponds to the first quantization step size, and a, b, c, d, e are predetermined parameters.
13. The method for encoding according to claim 9 or 10, wherein: The first quantization step size is obtained from a quantization step size table predetermined for the value of the quantization parameter.
14. The method for encoding according to claim 9 or 10, wherein: The quantization parameter corresponds to the Lagrangian λ used to optimize a D+λ*R function, where R corresponds to the rate of the data stream and D corresponds to the associated distortion of the decoded image.
15. The method for encoding according to claim 9 or 10, wherein: The quantization parameter is encoded in the data stream.
16. A device for decoding a data stream representing at least one image, said image being split into blocks, said decoding device comprising a processor (PROC0) configured to perform, for at least one block of said image, called current block, the following operations: - decoding an item of information indicating a coding mode of said current block; - when the coding mode of the current block corresponds to a first coding mode, decoding the current block by determining a first quantization step size according to a quantization parameter to inverse quantize a prediction residual associated with the current block in a transform domain; - when the encoding mode of the current block corresponds to a second encoding mode, decoding the current block by determining a second quantization step size to inverse quantize a prediction residual associated with the current block in the spatial domain, wherein the second quantization step size is different from the first quantization step size, - the first quantization step size and the second quantization step size are determined according to the same quantization parameter, When the encoding mode of the current block corresponds to the first encoding mode, the processor is further configured to decode the current block in the following manner for at least one pixel of the current block: - obtaining a prediction of said pixel from another pixel previously decoded, said other pixel previously decoded belonging to a previously decoded block of said image, - decoding the prediction residual associated with said pixel, - reconstructing said pixel from said prediction associated with said pixel using said first quantization step size and said prediction residual.
17. A device for encoding a data stream representing at least one image, said image being divided into blocks, said encoding device comprising a processor (PROC) configured to perform, for at least one block of said image, called current block, the following operations: - encoding an information item indicating a coding mode of said current block, - when the encoding mode of the current block corresponds to a first encoding mode, encoding the current block by determining a first quantization step size according to a quantization parameter to quantize a prediction residual associated with the current block in a transform domain, - when the encoding mode of the current block corresponds to a second encoding mode, encoding the current block by determining a second quantization step size to quantize a prediction residual associated with the current block in the spatial domain, wherein the second quantization step size is different from the first quantization step size, - the first quantization step size and the second quantization step size are determined according to the same quantization parameter, in, When the encoding mode of the current block corresponds to the first encoding mode, the processor is further configured to encode the current block in the following manner for at least one pixel of the current block: - obtaining a prediction of said pixel from another pixel previously decoded, said other pixel previously decoded belonging to a previously decoded block of said image, - obtaining a prediction residual associated with said pixel from the prediction of said pixel, - quantizing the prediction residual associated with the pixel using the first quantization step size, - encoding the quantized prediction residual.
18. A computer-readable storage medium having stored thereon a computer program, the computer program comprising instructions for implementing the method for decoding according to any one of claims 1 to 8 or the method for encoding according to any one of claims 9 to 15 when the program is executed by a processor.
