Method and device for encoding and decoding a data stream representing at least one image

文档序号:12620 发布日期:2021-09-17 浏览:44次 中文

阅读说明:本技术 用于编码和解码表示至少一个图像的数据流的方法和设备 (Method and device for encoding and decoding a data stream representing at least one image ) 是由 F.亨利 M.阿布多利 于 2020-01-30 设计创作,主要内容包括:本发明涉及一种用于编码和解码的方法,并且对应地,涉及一种用于编码和解码表示被分割成块的至少一个图像的编码数据流的设备。对于图像的至少一个当前块,从先前解码的像素确定(E441)块中恒定的像素值组,并且对于该块的每个像素,解码(E442)与所述像素相关联的预测残差。使用第一预测模式确定(E4411)与像素相关联的预测值,所述像素是在该第一预测模式中从至少一个其他先前解码的像素预测的,所述其他先前解码的像素属于所述当前块,信息项(E4422)指示是否使用第二预测模式来预测像素,所述像素是在该第二预测模式中使用从块中恒定的所述像素值组产生的预测而预测的。当使用第二预测模式预测像素时,用该组的所选择的值来替代(E4423)与该像素相关联的预测值。使用与像素相关联的预测值并使用预测残差,来重构(E444)像素。(The present invention relates to a method for encoding and decoding, and correspondingly to a device for encoding and decoding an encoded data stream representing at least one image divided into blocks. For at least one current block of the image, a constant set of pixel values in the block is determined (E441) from previously decoded pixels, and for each pixel of the block, a prediction residual associated with said pixel is decoded (E442). -determining (E4411), using a first prediction mode in which a prediction value associated with a pixel is predicted from at least one other previously decoded pixel belonging to said current block, an information item (E4422) indicating whether a second prediction mode is used to predict a pixel predicted using a prediction resulting from said set of pixel values being constant in the block. When the pixel is predicted using the second prediction mode, the prediction value associated with the pixel is replaced (E4423) with the selected value of the set. Reconstructing (E444) the pixel using the prediction value associated with the pixel and using the prediction residual.)

1. A method for decoding an encoded data stream representative of at least one image, said image being divided into blocks, said decoding method comprising, for at least one block, called current block, of said image:

-determining (E441) a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

(i) decoding (E442) a prediction residual associated with the pixel,

(ii) determining (E4411) a prediction value associated with said pixel according to a first prediction mode, said pixel being predicted from at least one other previously decoded pixel according to said first prediction mode, said other previously decoded pixel belonging to said current block,

(iii) decoding (E4422) an information item from the data stream, the information item indicating whether the pixel is predicted according to a second prediction mode, the pixel being predicted according to the second prediction mode using a prediction resulting from the set of pixel values being constant in the block,

(iv) when the information item indicates that the pixel is predicted according to the second prediction mode:

(a) selecting (E4423) the values of said set,

(b) replacing (E4423) the prediction value associated with the pixel with the selected value,

(v) reconstructing (E444) the pixel using a prediction value associated with the pixel and the prediction residual.

2. A method for encoding a data stream representing at least one image, said image being divided into blocks, said encoding method comprising, for at least one block, called current block, of said image:

-determining (E221) a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

(i) determining (E2201) a prediction value associated with the pixel according to a first prediction mode, the pixel being predicted according to the first prediction mode from at least one other previously decoded pixel, the other previously decoded pixel belonging to the current block,

(ii) determining (E2202) a prediction mode for the pixel from the first prediction mode and a second prediction mode, the pixel being predicted according to the second prediction mode using a prediction resulting from the set of pixel values being constant in the block,

(iii) encoding (E2203, E2207) an item of information in the data stream indicating whether the pixel is predicted according to the second prediction mode,

(iv) when the information item indicates that the pixel is predicted according to the second prediction mode:

(a) selecting (E2204) the values of the set,

(b) replacing (E2204) the prediction value associated with the pixel with the selected value,

(v) calculating (E2205) a quantized prediction residual associated with the pixel using the prediction value associated with the pixel and the value of the pixel,

(vi) reconstructing (E2206) the pixel using a prediction value associated with the pixel and the decoded prediction residual,

(vii) encoding (E223) a quantized prediction residual associated with the pixel in the data stream.

3. The method according to claim 1 or the encoding method according to claim 2, wherein the value of the group to be used is selected according to a distance between a prediction value associated with the pixel and a constant pixel value of the group.

4. The method of claim 3, wherein the group comprises a first value and a second value, the selected value of the group being the first value when a distance between a predicted value associated with the pixel and the first value is less than a distance between a predicted value associated with the pixel and the second value, otherwise the selected value of the group being the second value.

5. The decoding method according to claim 1 or the encoding method according to claim 2, wherein the decoding from the data stream or the encoding of the information item in the data stream, which indicates whether the pixel is predicted according to the second prediction mode, is performed only when the prediction residual is different from 0.

6. The decoding method according to claim 1 or the encoding method according to claim 2, wherein determining a constant set of pixel values in the block from previously decoded pixels is performed by computing a histogram of values of previously reconstructed neighboring pixels of the current block and selecting at least two pixel values respectively representing the most frequent two pixel values in the neighboring pixels of the current block.

7. The encoding method of claim 2, wherein a threshold is determined from at least one value of the constant set of pixel values from previously decoded pixels in the block, the second prediction mode being selected when determining the prediction mode of the pixel if:

-when the original value of the pixel is greater than the threshold value and the threshold value is greater than a prediction value associated with the pixel determined according to the first prediction mode, or

-when the original value of the pixel is smaller than the threshold value and the threshold value is smaller than the predicted value associated with the pixel determined according to the first prediction mode.

8. A device for decoding an encoded data stream representing at least one image, said image being partitioned into blocks, said decoding device comprising a processor (PROC0) configured to, for at least one block of said image, called current block:

-determining a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

(i) decoding a prediction residual associated with the pixel,

(ii) determining a prediction value associated with the pixel from at least one other previously decoded pixel, the other previously decoded pixel belonging to the current block,

(iii) determining from the data stream an information item indicating whether the pixel is predicted using a prediction resulting from the set of pixel values being constant in the block,

(iv) when the information item indicates that the pixel is predicted using a prediction generated from the set of pixel values that are constant in the block:

(a) the value of the set is selected such that,

(b) replacing the prediction value associated with the pixel with the selected value,

(v) reconstructing the pixel using a prediction value associated with the pixel and the prediction residual.

9. 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, for at least one block of said image, called current block:

-determining a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

(i) determining a prediction value associated with the pixel according to a first prediction mode, the pixel being predicted from at least one other previously decoded pixel according to the first prediction mode, the other previously decoded pixel belonging to the current block,

(ii) determining a prediction mode for the pixel from the first prediction mode and a second prediction mode, the pixel being predicted according to the second prediction mode using a prediction resulting from the set of pixel values being constant in the block,

(iii) encoding an information item in the data stream indicating whether the pixel is predicted according to the second prediction mode,

(iv) when the information item indicates that the pixel is predicted according to the second prediction mode:

(a) the value of the set is selected such that,

(b) replacing the prediction value associated with the pixel with the selected value,

(v) computing a prediction residual associated with the pixel using a prediction value associated with the pixel and a value of the pixel,

(b) encoding a prediction residual associated with the pixel in the data stream,

(vii) reconstructing the pixel using a prediction value associated with the pixel and the decoded prediction residual.

10. A data stream representing at least one image, said image being divided into blocks, said data stream comprising, for at least one block of said image, called current block, and for each pixel of said current block:

-an information item representing a prediction residual associated with said pixel,

-an information item indicating whether said pixel is predicted using a prediction resulting from a set of constant pixel values in said block, said set of constant pixel values in said block being determined from previously decoded pixels.

11. A computer program comprising instructions for implementing a decoding method according to any one of claims 1 or 3 to 6 or an encoding method according to any one of claims 2 to 7 when said program is run by a processor.

12. A computer-readable data medium comprising instructions of the computer program according to claim 11.

Technical Field

The field of the invention is that of encoding and decoding images or image sequences, and in particular of video streams.

More particularly, the invention relates to compressing an image or a sequence of images using a block representation of the image.

The invention can be applied in particular to image or video coding implemented in current or future encoders (JPEG, MPEG, h.264, HEVC, etc. and modifications thereof), and to the corresponding decoding.

Background

Digital images and image sequences occupy a lot of space in terms of memory, which requires that the images are compressed when they are transmitted in order to avoid congestion problems on the network used for the transmission.

Various techniques for compressing video data are known. Among other things, the HEVC compression standard ("High Efficiency Video Coding, Coding Tools and Specification", material Wien, Signals and Communication Technology,2015) proposes to enable prediction of pixels of a current picture relative to other pixels belonging to the same picture (intra prediction) or to previous or subsequent pictures (inter prediction).

More specifically, intra prediction uses spatial redundancy within the picture. For this purpose, the image is divided into pixel blocks. The blocks of pixels are then predicted using the already reconstructed information corresponding to the previously encoded/decoded blocks in the current picture according to the scanning order of the blocks in the picture.

Furthermore, in a standard manner, the encoding of a current block is performed using a prediction of the current block, called 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 the residual block to the predictor block.

Decoding is done picture by picture and, for each picture, block by block. For each block, a corresponding element of the stream is read. Inverse quantization and inverse transformation of the coefficients of the residual block are performed. Then, a 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.

In US9253508 DPCM (differential pulse code modulation) coding techniques for coding blocks in intra mode are integrated into an HEVC encoder. Such techniques include predicting a set of pixels of the same block by another set of pixels in the intra block that have been previously reconstructed. In US9253508, a set of pixels to be encoded in an intra block corresponds to a row, or a column, or a row and a column of the block, and intra prediction for predicting the set of pixels is one of directional intra predictions defined in the HEVC standard.

However, this technique is not optimal. In fact, the prediction of pixels by previously processed neighboring pixels is well suited for encoding natural type data (photos, video). However, when the type of content is artificial (e.g., content corresponding to screenshots or composite images), the images have strong discontinuities in generating high-energy transitions (transitions).

More specifically, for example, the composite image may contain regions having a very small number of pixel values, hereinafter also referred to as levels. For example, some regions may have only 2 levels: one for the background and one for the foreground, such as black text on a white background.

In the presence of such transitions in the image area, the value of the pixel to be encoded differs significantly from the values of the neighboring pixels. Prediction of such pixels using previously processed neighboring pixels as described above is difficult to model for such transitions.

Therefore, a new encoding and decoding method is needed to improve the compression of image or video data.

Disclosure of Invention

The present invention improves upon the prior art. To this end, the invention relates to a method for decoding an encoded data stream representing at least one image divided into blocks. This decoding method comprises, for at least one block in the image, called current block:

-determining a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

decoding the prediction residual associated with said pixel,

determining a prediction value associated with the pixel according to a first prediction mode according to which the pixel is predicted from at least one other previously decoded pixel belonging to the current block or to a previously decoded block of the picture,

decoding an information item from the data stream, the information item indicating whether the pixel is predicted according to a second prediction mode according to which the pixel is predicted using a prediction from the set of pixel values that is constant in the block,

when the information item indicates that the pixel is predicted according to the second prediction mode:

selecting a value of said group,

replace the prediction value associated with the pixel with the selected value,

reconstruct the pixel using the prediction value associated with the pixel and the prediction residual.

Relatedly, the invention also relates to a method for encoding a data stream representing at least one image divided into blocks. This coding method comprises, for at least one block of the image, called current block:

-determining a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

determining a prediction value associated with the pixel according to a first prediction mode according to which the pixel is predicted by means of a prediction value associated with the pixel determined from at least one other previously decoded pixel belonging to a previously decoded block of said current block or picture,

determining a prediction mode for the pixel from a first prediction mode and a second prediction mode, predicting the pixel from the second prediction mode using a prediction from the set of pixel values that is constant in the block,

encoding an information item in the data stream, the information item indicating whether the pixel is predicted according to the second prediction mode,

when the information item indicates that the pixel is predicted according to the second prediction mode:

selecting a value of said group,

replace the prediction value associated with the pixel with the selected value,

computing a prediction residual associated with a pixel using a prediction value associated with the pixel and a value of the pixel,

encoding the prediction residual associated with said pixel in the data stream,

reconstruct the pixel using the prediction value associated with the pixel and the decoded prediction residual.

Therefore, the present invention improves compression performance of an encoding mode using local prediction by neighboring pixels of a pixel to be encoded. Advantageously, a set of pixel values is determined which represents the values of the neighbouring pixels of the block to be encoded. For example, the group comprises a predetermined number of pixel values which are most frequent among the neighbouring pixels of the block to be encoded. Typically, the set of values may comprise intensity values of the image layers when the image is represented in layers (e.g. for a composite image), or comprise areas with a delimited foreground and background (such as black text on a white background).

According to a particular embodiment of the invention, the set of values comprises two values representing the two most frequent values in the neighborhood of the block.

When a pixel located in the transition area is detected, its prediction value is changed to one of the values of the thus determined group.

The value of such a group is considered to be constant in the current block because it is determined only once for all pixels of the current block.

According to a particular embodiment of the invention, the value of the group is selected according to a distance between predicted values associated with said pixels and determined according to the first prediction mode with respect to the constant pixel values of the group.

This particular embodiment of the invention allows for a convenient selection of a prediction value for a group for a pixel located in the transition region and does not require the transmission of additional information to indicate the selection.

According to another particular embodiment of the invention, the set comprises a first value and a second value, the selected value of the set being the first value when the distance between the predicted value associated with the pixel and the first value is smaller than the distance between the predicted value associated with the pixel and the second value, otherwise the selected value of the set being the second value.

According to another particular embodiment of the invention, an information item indicating whether a pixel is predicted according to the second prediction mode is decoded from or encoded in the data stream only if the prediction residual of the pixel differs from 0.

This particular embodiment avoids encoding an information item indicating prediction according to the second prediction mode when the prediction residual is different from 0. Thus, according to this particular embodiment, at the decoder, the first prediction mode is used by default to predict the current pixel.

This particular embodiment of the invention avoids the encoder encoding unnecessary information. Indeed, at the encoder, when the prediction according to the first prediction mode results in a zero prediction residual (i.e. optimal prediction), the information item indicating that the second prediction mode is not used for the current pixel is implicit.

This particular embodiment of the invention may be implemented at the encoder, either by a preceding step of calculating a prediction residual from the prediction generated according to the first prediction mode, or by a step of determining whether the original value of the pixel to be encoded is far from the predicted value generated by the first prediction mode.

According to another particular embodiment of the invention, determining a constant set of pixel values in a block from previously decoded pixels is performed by calculating a histogram of values of previously reconstructed neighboring pixels of the current block and selecting at least two pixel values respectively representing the most frequent two pixel values in the neighboring pixels of the current block.

According to another specific embodiment of the present invention, the threshold value is determined from at least one value of the set of pixel values from previously decoded pixels that is constant in the block. Selecting a second prediction mode when determining the prediction mode of the pixel:

-when the original value of the pixel is greater than the threshold value and the threshold value is greater than the prediction value associated with the pixel determined according to the first prediction mode, or

-when the original value of the pixel is smaller than the threshold value and the threshold value is smaller than the predicted value associated with the pixel determined according to the first prediction mode.

The invention also relates to a device for decoding an encoded data stream representing at least one image divided into blocks. Such a decoding device comprises a processor configured to, for at least one block of the image, called current block:

-determining a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

decoding the prediction residual associated with said pixel,

determining a prediction value associated with a pixel from among at least one other previously decoded pixel belonging to a previously decoded block of the current block or picture,

determining from the data stream an information item indicating whether the pixel is predicted using a prediction resulting from said set of pixel values being constant in the block,

when an information item indicates that a pixel is predicted using a prediction resulting from a constant set of pixel values in a block:

selecting a value of said group,

replace the prediction value associated with the pixel with the selected value,

reconstruct the pixel using the prediction value associated with the pixel and the prediction residual.

According to a particular embodiment of the invention, such a decoding device is comprised in a terminal.

The invention also relates to a device for encoding a data stream representing at least one image divided into blocks. Such an encoding device comprises a processor configured to, for at least one block of the image, called current block:

-determining a constant set of pixel values in the block from previously decoded pixels,

-for each pixel of the block:

determining a prediction value associated with the pixel according to a first prediction mode according to which the pixel is predicted by means of a prediction value associated with the pixel determined from at least one other previously decoded pixel belonging to a previously decoded block of said current block or picture,

determining a prediction mode for the pixel based on a first prediction mode and a second prediction mode, predicting the pixel based on the first prediction mode and the second prediction mode using a prediction from the set of pixel values that is constant in the block,

encoding an information item in the data stream, the information item indicating whether the pixel is predicted according to the second prediction mode,

when the information item indicates that the pixel is predicted according to the second prediction mode:

selecting a value of said group,

replace the prediction value associated with the pixel with the selected value,

computing a prediction residual associated with a pixel using a prediction value associated with the pixel and a value of the pixel,

encoding the prediction residual associated with said pixel in the data stream,

reconstruct the pixel using the prediction value associated with the pixel and the decoded prediction residual.

According to a particular embodiment of the invention, such an encoding device is comprised in a terminal or in a server.

The invention also relates to a data stream representing at least one image segmented into blocks. For at least one block of the image, called current block, and for each pixel of the current block, this data flow method comprises:

-an information item representing a prediction residual associated with said pixel,

-an information item indicating whether or not the pixel is predicted using a prediction resulting from a constant set of pixel values in the block, the constant set of pixel values in the block being determined from previously decoded pixels.

The decoding method (or encoding method) according to the invention can be implemented in various ways, in particular in a wired form or in a software form. According to a particular embodiment of the invention, the decoding method (or the encoding method) is implemented by a computer program. The invention also relates to a computer program comprising instructions for implementing a decoding method or an encoding method according to any one of the preceding specific embodiments, when said program is run by a processor. Such programs may use any programming language. Which may be downloaded from a communication network and/or recorded on a computer readable medium.

The program may use any programming language and may be in the form of source code, object code, or an intermediate code between source and object code, such as in partially compiled form, or in any other desired form.

The invention also relates to a computer-readable storage medium or data medium comprising instructions of a computer program as described above. The above-mentioned recording medium may be any entity or device capable of storing the program. For example, the medium may include a storage component, such as a memory. On the other hand, the recording medium may correspond to a transmissible medium (such as an electric signal or an optical signal), which may be carried by an electric or optical cable, radio, or other means. The program according to the invention can be downloaded in particular over a network of the internet type.

Alternatively, the recording medium may correspond to an integrated circuit in which the program is embedded, the circuit being adapted for performing, or for use in the performance of, the method in question.

Drawings

Other characteristics and advantages of the invention will become clearer from reading the following description of a specific embodiment, given as a simple illustrative non-limiting example, and attached drawings, wherein:

fig. 1 shows the steps of an encoding method according to a particular embodiment of the invention.

Fig. 2A illustrates an example of a portion of an encoded data stream, in accordance with a particular embodiment of the present invention.

Fig. 2B illustrates an example of a portion of an encoded data stream in accordance with another particular embodiment of the present invention.

FIG. 3A illustrates an example of positions of neighboring blocks of a current block for determining an intra prediction mode according to a specific embodiment of the present invention.

Fig. 3B illustrates an example of locations of reference pixels used to predict pixels of a current block according to a specific embodiment of the present invention.

Fig. 4 illustrates the steps of a decoding method according to a specific embodiment of the present invention.

FIG. 5 illustrates an example of a block including content, such as a screen, each having two content layers, and its corresponding neighborhood in an image, in accordance with a particular embodiment of the present invention.

Fig. 6 illustrates an example of a 16x16 block including content such as a screen and a transition diagram showing transition states of pixels of the block, the 16x16 block having two content layers, according to a specific embodiment of the present invention.

Fig. 7 shows a simplified structure of an encoding apparatus adapted to implement an encoding method according to any one of the specific embodiments of the present invention.

Fig. 8 shows a simplified structure of a decoding apparatus adapted to implement a decoding method according to any one of certain embodiments of the present invention.

Detailed Description

5.1 general principles

The invention improves the coding mode of a block of an image using local prediction of pixels in the block that are located at a transition between two very different pixel value levels.

The coding mode using local prediction of the block to be coded allows the prediction of other pixels of the block to be coded using reference pixels belonging to the block to be coded. This prediction mode reduces the prediction residual by using pixels in the block that are spatially very close to the pixel to be encoded.

However, this coding mode introduces a relatively large coding residual when the original pixel is far from its prediction. This is often the case for content such as screenshots or composite images. In this type of content, the blocks to be encoded may have strong discontinuities. In this case, reference pixels belonging to the background may be used to predict pixels belonging to the foreground in the same block, and vice versa. In this case, the information items available in the reference pixels are not suitable for accurate prediction. Pixels located at the boundary between the background region and the foreground region are hereinafter referred to as transition pixels.

Advantageously, the invention proposes to derive an information item relating to each layer of the image for the block to be encoded, for example a foreground-related information item and a background-related information item, taking into account only two layers. Additional content layers may of course be considered, increasing the number of information items to be derived. For example, the derivation of such information includes determining a constant set of pixel values in the block.

According to a particular embodiment of the invention, this information relating to each layer of the image is derived from the local neighborhood of the block to be coded.

Advantageously, this information is used in conjunction with a mechanism for detecting transition pixels in the block to be encoded. This reduces the residual energy of such pixels.

Fig. 5 illustrates a block (Bi-bl) comprising content, such as a screen with two content layers each, and its corresponding neighborhood (Neigh) in the image. As shown in fig. 5, the local neighborhood of the current block to be encoded contains useful information related to the intensity levels of two layers.

According to the present invention, when a transition pixel in a block to be encoded is detected, the intensity levels of the layers corresponding to the layers to which the pixel may belong are used to correct the predicted values of the pixels.

According to a particular embodiment of the invention, in order to have an optimal prediction for each pixel of the block and a limited rate cost, this mechanism is limited to pixels that satisfy certain conditions.

According to the local neighborhood of the pixel to be predicted, three states of the pixel to be predicted can be defined:

-s 1: the pixels belong to homogeneous regions where local prediction from neighboring pixels is very efficient, e.g. it provides zero quantized prediction residuals. In this case, the pixel is not a transition pixel. According to an embodiment variant, this state can be implicitly detected at the decoder,

-s 2: pixels belong to regions where local prediction from neighboring pixels is reasonably efficient, e.g., they provide low prediction residuals. Prediction of a pixel by the above correction mechanism is allowed for that pixel, but if the residual prediction error is not large enough compared to a threshold determined from the intensity level of the layer, no correction mechanism is applied. In this case, the indicator is specifically coded to indicate that no correction mechanism is used,

-s 3: a pixel belongs to a region where local prediction from neighboring pixels is not valid, e.g., it provides a large prediction residual. Prediction of a pixel by the above-described correction mechanism is allowed for that pixel, and an indicator is specifically coded to indicate that use.

Fig. 6 shows an example of a 16x16 block on the left with light text on a dark background and on the right a transition diagram of the block showing how the above states are assigned to the pixels of the block.

5.2 examples

Fig. 1 shows the steps of an encoding method according to a particular embodiment of the invention. For example, according to a particular embodiment of the invention, the image sequence I1、I2、……、INbIs encoded in the form of a coded data stream STR. Such an encoding method is implemented by an encoding apparatus as described later with respect to fig. 7, for example.

Image sequence I1、I2、……、INb(Nb is the number of pictures of the sequence to be encoded) is provided as input to the encoding method. The encoding method outputs a stream of encoded data STR representing a sequence of pictures supplied as input.

In a known manner, for the image sequence I1、I2、……、INbIs done picture by picture according to a coding order previously established and known by the encoder. For example, it may be in time order I1、I2、……、INbOr in another order (e.g. I)1、I3、I2、……、INb) The image is encoded.

In step E0, the image sequence I1、I2、……、INbTo be encoded injAre divided into blocks, for example, blocks of size 32 × 32 or 64 × 64 pixels or larger. Such a block may be subdivided into square or rectangular sub-blocks, e.g. 16 × 16, 8 × 8, 4 × 4, 16 × 8, 8 × 16 …

In step E1, according to image IjTo select the image I in a predetermined scanning orderjOf the first block or sub-block X to be encodedb. For example, it may be the first block in a lexicographic scan order of the image.

In step E2, the encoder selects the current block X for encodingbThe coding mode of (1).

According to a particular embodiment described herein, the encoder encodes from the first encoding mode M1 and the second encoding mode MTwo coding modes M2 selected for coding the current block XbThe coding mode of (1). Additional coding modes (not described herein) may be used.

According to a particular embodiment described herein, the first coding mode M1 corresponds to a conventional intra prediction coding of the current block, for example defined according to the HEVC standard, and the second coding mode M2 corresponds to an intra-loop residue (ILR) or DPCM prediction coding described later.

The principles of the present invention may be extended to other types of coding modes of the first coding mode M1. For example, the first coding mode may correspond to any type of coding mode (inter-image prediction coding, spatial prediction with template matching coding, etc.) using a transform of the prediction residual.

In step E2, the encoder may perform rate/distortion optimization to determine the optimal encoding mode for encoding the current block. During this rate/distortion optimization, additional coding modes, e.g., inter mode coding modes, different from the first and second coding modes may be tested. During this rate/distortion optimization, the encoder models the current block X according to the different available coding modesbTo determine the rate and distortion associated with each coding mode and to select the coding mode that provides the optimal rate/distortion tradeoff, for example according to a D + λ xr function, where R is the rate required to encode the current block according to the coding mode evaluated, D is the distortion measured between the decoded block and the original current block, and λ is a lagrange multiplier, for example entered by the user or defined at the encoder.

In step E20, an information item indicating the coding mode selected for the current block is encoded in the data stream STR.

If the current block XbIs encoded according to the first encoding mode M1, the method proceeds to step E21 for encoding the block according to M1. If the current block XbIs encoded according to the second encoding mode M2, the method proceeds to step E22 for encoding the block according to M2.

According to a particular embodiment of the invention, the following describes the step E21 of encoding the block according to the first coding mode M1. According to a particular mode described herein, the first coding mode corresponds to conventional intra prediction, such as that defined in the HEVC standard.

In step E210, a quantization step δ 1 is determined. For example, the quantization step δ 1 may be set by the user, or calculated using a quantization parameter that sets a trade-off between compression and quality and entered by the user or defined by the encoder. Thus, such a quantization parameter may be a parameter λ, which is used in a rate-distortion cost function D + λ × R, where D denotes the distortion introduced by the encoding and R denotes the rate used for the encoding. This function is used for code selection. Generally, a way of encoding the image that minimizes this function is sought.

As a variant, the quantization parameter may be a QP, which corresponds to the quantization parameter commonly used in the AVC or HEVC standard. Thus, in the HEVC standard, the quantization step δ 1 is determined by the formula δ 1 — levelScale [ QP% 6] < (QP/6), where for k 0..5 levelScale [ k ] {40,45,51,57,64,72 }.

In step E211, a prediction of the current block is determined using a conventional intra prediction mode. According to such conventional intra prediction, each prediction pixel is calculated only from decoded pixels (reference pixels) derived from neighboring blocks located above and to the left of the current block. The manner in which pixels are predicted from reference pixels depends on the prediction mode transmitted to the decoder and selected by the encoder from a predetermined set of modes known to the encoder and decoder.

Thus, there are 35 possible prediction modes in HEVC: 33 modes of interpolating reference pixels in 33 different angular directions, and 2 other modes: DC mode (where each pixel of the predicted block is generated from the average of the reference pixels) and PLANAR mode (which performs PLANAR and non-directional interpolation). This "traditional intra prediction" is well known and is also used in the ITU-T H.264 standard (where there are only 9 different modes) and at the Internet address: (https:// jvet.hhi.fraunhofer.de/) Experimental JEM software was obtained in which there were 67 different prediction modes. In all cases, conventional intra prediction takes into account both of the above aspects (predicting the block to be encoded from the pixels of neighboring blocks)And transmits the optimal prediction mode to the decoder).

In step E211, the encoder thus selects one of the available prediction modes from the predetermined list of prediction modes. One option includes, for example, evaluating all prediction modes and keeping the prediction mode that minimizes a cost function, such as the conventional rate-distortion cost.

In step E212, the prediction mode selected for the current block is encoded according to a neighboring block of the current block. FIG. 3A illustrates a method for encoding a current block XbOf the prediction mode of (1), the current block XbOf adjacent block abAnd BbExamples of the location of (a).

In step E212, the intra prediction mode selected for the current block is encoded using the intra prediction modes associated with the neighboring blocks.

For example, the scheme described in the HEVC standard for coding the prediction mode of a current block may be used. In the example of FIG. 3A, this scheme includes identifying a block A that is located above the current blockbAssociated intra prediction mode mAAnd with a block B located directly to the left of the current blockbAssociated intra prediction mode mB. According to mAAnd mBCreates a list named MPM (most probable mode) (containing 3 intra prediction modes) and a list named non-MPM (containing 32 other prediction modes).

According to the HEVC standard, to encode the intra prediction mode of a current block, the syntax elements are transmitted:

a binary indicator indicating whether the prediction mode to be encoded of the current block is in the MPM list,

-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.

In step E213, a prediction residue R of the current block is constructed.

In step E213, the prediction block P is constructed in a standard manner according to the prediction mode selected in step E211. Then, a prediction residue R is obtained by calculating a difference of each pixel between the prediction block P and the original current block.

In step E214, the prediction residual R is transformed into RT

In step E214, a frequency transform is applied to the residual block R to produce a block R comprising transform coefficientsT. For example, the transform may be a DCT type transform. Possibly from a predetermined set of transformations ETSelects the transform to use and informs the decoder of the transform used.

In step E215, δ is scalar quantized using, for example, a quantization step size1To quantize the transformed residual block RT. This results in a quantized transformed prediction residual block RTQ

In step E216, the quantized block RTQIs encoded by an entropy encoder. For example, entropy coding as specified in the HEVC standard may be used.

In a known manner by quantizing the block RTQAnd then applies an inverse transform to the inverse quantized coefficients to decode the current block to obtain a decoded prediction residual. Then, the prediction is added to the decoded prediction residual in order to reconstruct the current block and obtain its decoded version. The decoded version of the current block can then be used to spatially predict other neighboring blocks of the picture or predict blocks of other pictures by inter-picture prediction.

The following describes the step E22 of encoding the block according to the second encoding mode M2, in accordance with a specific embodiment of the present invention. According to a particular embodiment described herein, the second coding mode corresponds to ILR prediction coding.

In a previous step E220, a quantization step δ is determined2. For example, the quantization step δ2Dependent on the quantization step delta1The same quantization parameter, the quantization step δ if the current block is encoded according to the first encoding mode1Will be determined in step E210.

According to the present invention, in the encoding mode, pixels of the current block may be predicted according to the first prediction mode or the second prediction mode.

The pixels of the current block are predicted from previously reconstructed pixels of a neighboring block of the current block and/or previously processed pixels of the current block itself according to the first prediction mode. Preferably, for predicting a pixel, a pixel is selected that is as close as possible to the pixel to be predicted. This is why it is called local predictor.

According to the second prediction mode, the pixels of the current block are predicted by means of the level values of the layer selected, for example, from a set of values determined in the neighbourhood of the current block.

In step E221, a constant set of pixel values in the block is determined from previously decoded pixels. Several reconstruction levels, for example two reconstruction levels, referred to as f and b, of the current block are determined. These levels are constructed by analyzing the values taken by reference pixels of the current block, i.e. pixels from previously processed blocks adjacent to the current block. There are several techniques for determining the levels f and b. Thus, it is possible to compute a histogram of the values of the reference pixels, and to designate b as the most frequent value and f as the second most frequent value. Another approach includes identifying local maxima of the histogram, i.e., maxima surrounded by smaller values. Then, level f is assigned as the largest local maximum, and level b is assigned as the second largest local maximum.

Further, according to a particular embodiment of the invention, a threshold value thr is determined, which is typically half-way between f and b, and is defined asIn alternative embodiments, options may also be provided Where dyn is the maximum value of the signal.

The above-described embodiment variant for determining a constant set of pixel values in a block allows for implicit detection of the image layer, which can also be implemented at the decoder without the need to transmit additional information.

For example, to limit the complexity of image layer detection, the direct neighborhood of the current block is used: for example, only the pixels of the column on the left and the pixels of the row above the current block are used.

According to other variants, more than two values may be determined, for example by considering the following local maxima of the histogram.

The values f and b thus determined correspond to the values of the set of values for the second prediction mode.

The following steps are performed for each pixel of the current block.

In step E2201, the local predictor PL of the pixel under consideration is determined. The local predictor PL corresponds to a predictor obtained from the first prediction mode.

The local predictor PL may be determined as follows. If we call X the current pixel to be predicted of the current block, A is the pixel immediately to the left of X, B is the pixel immediately to the left and above X, and C is the pixel immediately above X, as shown for the current block XbAs shown in fig. 3B. The local predictor PL is defined as follows:

PL (X) min (A, B) if C ≧ max (A, B)

max (A, B) if C is less than or equal to min (A, B)

A + B-C in other cases

Where min (A, B) corresponds to a function that returns a minimum value between the A and B values, and max (A, B) corresponds to a function that returns a maximum value between the A and B values.

Other local prediction functions may be used. According to another variant, several local prediction functions may be available, and the same local prediction function is selected for all pixels of the current block. For example, the orientation of the texture of previously encoded pixels of neighboring blocks is analyzed. Previously encoded pixels in the neighboring block that are above or to the left of the current block are analyzed, for example, using a sobel-type operator. If it is determined that:

-if no orientation is present, the prediction function is a function as defined above,

-if the orientation is horizontal, the prediction function is PL (X) A,

-if the orientation is vertical, the prediction function is PL (X) ═ B,

-if the orientation is diagonal, the prediction function is pl (x) ═ C.

Thus, the prediction value pl (X) associated with the current pixel X of the current block is obtained using already reconstructed pixels outside the block (and therefore the decoded values of which are available), or previously reconstructed pixels in the current block, or both, depending on the position of the pixels in the current block. In all cases, the predictor PL uses previously reconstructed pixels. In fig. 3B, it can be seen that the pixels of the current block located on the first row and/or the first column of the current block will use the pixels already reconstructed outside the block (the grey pixels in fig. 3B) and the pixels of the current block that may have already been reconstructed as reference pixels (to build the prediction value pl (x)). For other pixels of the current block, the reference pixel used to construct the prediction value pl (x) is located inside the current block.

In step E2202, a prediction mode for predicting the current pixel is determined from the first prediction mode and the second prediction mode.

According to a particular embodiment of the invention, the second prediction mode is selected when pl (X) < thr < X or when pl (X) > thr > X. In other words, the second prediction mode is selected in the following case:

when the original value X of the pixel is greater than a threshold thr and the threshold thr is greater than a prediction value pl (X) associated with the pixel determined according to the first prediction mode, or

When the original value X of the pixel is less than a threshold thr and the threshold thr is less than the predicted value pl (X) associated with the pixel determined according to the first prediction mode.

If one of the above conditions is satisfied, the state of the pixel to be predicted is s-3, and the encoder proceeds to the next step E2203.

In step E2203, the indicator t indicating that the pixel to be predicted is predicted according to the second prediction mode is set to e.g. 1 and is encoded in the data stream STR, e.g. by entropy coding, or transmitted as such in the stream.

In step E2204, the values of the set of values determined in step E221 are selected to predict the current pixel.

According to a particular embodiment of the invention, the value of the group is selected according to the distance between the predicted value associated with said pixel, determined according to the first prediction mode, with respect to the value of the group of pixels determined in step E221. For example, when the distance between the predicted value pl (x) associated with said pixel according to the first prediction mode and the value b of the set is smaller than the distance between the predicted value pl (x) associated with said pixel according to the first prediction mode and the value f, the value selected is b, otherwise the value selected is f.

For example, the L1 or L2 standards may be used as distance measurements.

Thus, if pl (x) -b | < | pl (x) -f |, then pl (x) -b, otherwise pl (x) -f.

The method then proceeds to step E2205.

If, in step E2202, it is determined that the current pixel is not predicted according to the second prediction mode, the current pixel is predicted according to the first prediction mode. Then, the prediction value pl (x) associated with the current pixel obtained according to the first prediction mode is not modified. The current pixel is then in state s-1 or s-2.

In step E2205, for the current pixel, the prediction residual R1(X) is calculated as the difference between the original value X of the current pixel and the predicted value pl (X) associated with the current pixel, i.e. R1(X) ═ X-pl (X). Here, the prediction value pl (x) may have been obtained by the first prediction mode or the second prediction mode.

Then in q (X) the quantization step scalar quantizer δ 2 passes q (X) ScalarQuant (R1(X)) ═ ScalarQuant (δ)2X-pl (X)) to quantize the prediction residual R1(X), the scalar quantizer being, for example, a nearest neighbor scalar quantizer such as: where Δ is the quantization step size and x is the value to be quantized.

Q (X) is the quantized residual associated with X. Which is thatCalculated in the spatial domain, i.e. directly from the difference between the predicted value pl (X) of pixel X and the original value of X. This quantized residual q (X) of pixel X is stored in a quantized prediction residual block R1QIn this block R1QTo be encoded later.

In step E2206, a decoded prediction value pl (X) of X is calculated by adding the inverse quantized value of the quantized residual q (X) to the prediction value pl (X). Therefore, P1(X) ═ pl (X) + scalardsquant (δ)2Q (X)) obtains a decoded prediction value P1(X) for X. For example, the nearest scalar quantization inverse is given by: scalarsquant (Δ, x) ═ Δ × x.

The decoded predictor P1(X) thus makes it possible to predict the possible pixels remaining to be processed in the current block.

Furthermore, a block P1 may be defined that comprises decoded/reconstructed values P1(X) of the pixels of the current block. Such a block P1 is the ILR predictor for the current block (as opposed to the conventional intra predictor).

According to a particular embodiment of the invention, in step E2207, when the quantized prediction residual Q1(X) is not zero, in other words when the amplitude a of the quantized prediction residual Q1(X) is not zero, the indicator t is set to e.g. 0 and encoded in the data stream STR. In this case, the current pixel is considered to be in state s-2.

According to this particular embodiment of the invention, the indicator t is also set to 0 when the quantized prediction residual Q1(X) is zero, i.e. the amplitude a of the quantized prediction residual Q1(X) is zero, because the current pixel is not predicted by the second prediction mode, but the indicator t is not encoded in the data stream STR. This prediction mode will be implicitly derived at the decoder from the decoded values of the magnitude of the quantized prediction residual Q1 (X). In this case, the current pixel is considered to be in state s-1. In this case, the method proceeds directly from step E2206 to step E223.

Of course, in practice, when it is explicitly coded (s-2 or s-3), the indicator t is coded in the data stream after the quantized prediction residual Q1(X) is coded.

According to another particular embodiment of the invention, the indicator t is set to 0 and is systematically coded in the data stream STR for each pixel in step E2207, regardless of the value of the amplitude of the prediction residual Q1 (X). Thus, at the decoder, it is explicitly determined by the decoder whether the current pixel is predicted according to the second prediction mode, regardless of the value of the quantized prediction residual, by reading the indicator t. In this case, it is not distinguished whether the pixel is in the state s-1 or s-2.

According to a variant, in this particular embodiment of the invention, since the indicator t is systematically coded, determining in step E2202 the prediction mode for predicting the current pixel from among the first prediction mode and the second prediction mode may be done, for example, by comparing the distance measure between the prediction value provided by the first prediction mode and the original value X of the current pixel, and the distance measure between the prediction value provided by the second prediction mode and the original value X of the current pixel.

The above-described steps are performed for all pixels of the current block in a scan order that ensures that pixels for local prediction are available.

According to an embodiment variant, the scanning order of the current block is a dictionary order, i.e. from left to right and from top to bottom.

According to another embodiment variant, several scanning orders of the current block can be used, for example:

-lexicographic order, or

Scanning the first column from top to bottom and then the column directly to the right, etc., or

-scanning the diagonals one by one.

According to this further variant, it is possible to model the coding costs associated with each scanning order and to select, for the current block, the optimal scanning order according to the rate/distortion, then to code, for the current block, an item of information representative of the selected scanning order.

At the end of step E2205, a quantized residual block R1 is determinedQ. The quantized residual block R1QMust be encoded for transmission to the decoder. The predictor P1 of the current block is also determined.

In step E223, the residual block R1 is quantizedQIs encoded for transmission to a decoder. Any one has alreadyKnown schemes, such as the method described in HEVC, may be used to encode the quantized coefficients of the conventional prediction residual.

In the standard way, when the amplitude a is different from 0, each quantized prediction residue Q1(X) of the current block is decomposed into an amplitude value a and a sign indicator sgn.

According to a particular embodiment of the invention described herein, the quantization residual block R1 is quantized using an entropy coder in the data stream STRQThe amplitude and sign values of (a) are encoded.

According to a particular embodiment of the invention, it is possible to determine and encode the additional prediction residue R2 from the ILR predictor obtained for the current block. However, the encoding of the additional prediction residual R2 is optional. It is indeed possible to simply pass its predicted version P1 and quantized residual R1QThe current block is encoded.

In order to encode the additional prediction residue R2 of the current block, the following steps are performed.

In step E224, the predictor P1 and the original current block X are calculatedbThe difference between R2 to form an additional residual R2: R2 ═ Xb-P1. The following steps correspond to the conventional encoding step of the residual R2.

In step E225, the residual R2 is transformed using a frequency transform to produce a block of coefficients R2T

For example, the transform may be a DCT type transform. Possibly from a predetermined set of transformations ET2Selects the transform to use and informs the decoder of the transform used. In this case, set ET2May be different from set ETIn order to fit into the particular statistics of the residual R2.

In step E226, the coefficient block R2TIs quantized, e.g., delta is scalar quantized using a quantization step size. This results in block R2TQ

The quantization step δ may be set by a user. It can also be calculated using a parameter lambda that sets the trade-off between compression and quality and is entered by the user or the encoder. For example, the quantization step δ may correspond to the quantization step δ1Or similarly determined.

In step E227, the amountBlock R2TQThen transmitted in an encoded manner. For example, the coding specified in the HEVC standard may be used.

In a known manner, by quantizing the block R2TQAnd then applies an inverse transform to the inverse quantized coefficients to obtain decoded prediction residues to decode the current block. The prediction P1 is then added to the decoded prediction residual, in order to reconstruct the current block and obtain its decoded version Xrec. Then the decoded version X of the current blockrecCan then be used to spatially predict other neighboring blocks of the image, or to predict blocks of other images by inter-image prediction.

In step E23, it is checked by the encoding method whether the current block is the last block of the image to be processed, taking into account the previously defined scanning order. If the current block is not the last block of the picture to be processed, in step E24, a subsequent block of the picture to be processed is selected according to the previously defined scanning order of the picture and the coding method proceeds to step E2, in step E2, the selected block becoming the current block to be processed.

If all blocks of the image have already been encoded, the method proceeds to step E231 to apply a post-processing method to be applied to the reconstructed image. Such post-processing methods may be, for example, deblocking filtering and/or SAO (sample adaptive offset) methods defined in the HEVC standard.

The method proceeds to encode the next picture of the video, if any (step E25).

Fig. 2A and 2B schematically illustrate a portion of a data stream resulting from the above-described encoding, in accordance with various specific embodiments of the present invention.

Fig. 2A illustrates an example of a stream of three pixels (X1, X2, X3) of a block of an image encoded according to a particular embodiment of the present invention, where it has been determined that pixel X1 is considered to be in state s-3, pixel X2 is considered to be in state s-2, and pixel X3 is considered to be in state s-1.

It can be seen that, according to the variant described here, the data coded for pixel X1 are the values of magnitude a (X1), sign sgn (X1) and indicator t set to 1 of the quantized prediction residual. The data encoded for pixel X2 is the value of magnitude value a (X2), its sign sgn (X2), and indicator t of the quantized prediction residual. For X2, the magnitude value of the quantized prediction residual is different from 0, and an indicator t set to 0 is explicitly coded in the stream.

The data encoded for pixel X3 is amplitude value a (X3) of the quantized prediction residual, which is zero. In this case, the magnitude value of the quantized prediction residual is different from 0, so the indicator t set to 0 is not explicitly coded in the stream and will be implicitly derived at the decoder.

Fig. 2B illustrates an example of a stream of three pixels (X1, X2, X3) of a block of an image encoded according to another particular embodiment of the present invention, where it has been determined that pixel X1 is considered to be in state s-3, pixel X2 is considered to be in state s-2, and pixel X3 is considered to be in state s-1.

It can be seen that, according to the variant described here, the data coded for pixel X1 are the values of magnitude a (X1), sign sgn (X1) and indicator t set to 1 of the quantized prediction residual. The data encoded for pixel X2 is the value of magnitude value a (X2) of the quantized prediction residual, its sign sgn (X2), and indicator t set to 0. The data encoded for pixel X3 is amplitude value a (X3) which is a quantized prediction residual of zero, and indicator t set to 0.

FIG. 4 illustrates a block diagram for representing a sequence of images I to be decoded according to a specific embodiment of the present invention1、I2、……、INbA step of a method of performing decoding.

The data stream STR is generated, for example, by the encoding method shown with respect to fig. 1. As described in relation to fig. 8, the data stream STR is provided as input to the decoding device DEC.

The decoding method decodes the stream pictures on a picture-by-picture basis, and each picture is decoded on a block-by-block basis.

In step E40, image I to be decodedjIs subdivided into blocks. Each block will undergo a decoding operation comprising a series of steps which will be described in detail below. The blocks may be the same size or different sizes.

In step E41, according to image IjIn a predetermined scanning order, selecting the image IjOf the first block or sub-block X to be decodedbAs the current block. For example, it may be the first block in a lexicographic scan order of the image.

In step E42, an information item indicating the coding mode of the current block is read from the data stream STR. According to a particular embodiment described herein, this information item indicates whether the current block is encoded according to the first encoding mode M1 or according to the second encoding mode M2. According to a particular embodiment described herein, the first coding mode M1 corresponds to a conventional intra prediction coding of the current block, for example defined according to the HEVC standard, and the second coding mode M2 corresponds to an intra-loop residue (ILR) prediction coding.

In other particular embodiments, the information item read from the stream STR may also indicate that the current block (not described here) is encoded using other encoding modes.

The following describes step E43 for decoding the current block when the current block is encoded according to the first encoding mode M1.

In step E430, a quantization step δ is determined1. For example, the quantization step δ1Is determined from the quantization parameter QP transmitted in the data stream STR or similar to what is done in the encoder. For example, the quantization parameter QP may be a quantization parameter conventionally used in the AVC or HEVC standard. Thus, in the HEVC standard, the quantization step δ1By the equation δ1=levelScale[QP%6]<<(QP/6) determination, where levelScale [ k ] is 0..5 for k]={40,45,51,57,64,72}。

In step E431, the prediction mode selected to encode the current block is decoded from the neighboring block. To this end, the intra-prediction mode selected for the current block is encoded using intra-prediction modes associated with neighboring blocks of the current block, as is done at the encoder.

The construction of the MPM list and non-MPM list is completely similar to what is done during encoding. According to the HEVC standard, the following types of syntax elements are decoded:

a binary indicator indicating whether the prediction mode to be encoded of the current block is in the MPM list,

-if the prediction mode of the current block belongs to the MPM list, reading an index in the MPM list corresponding to the prediction mode of the current block,

-if the prediction mode of the current block does not belong to the MPM list, reading an index in the non-MPM list corresponding to the prediction mode of the current block.

Accordingly, 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.

In step E432, the decoder constructs a prediction block P for the current block according to the decoded prediction mode.

In step E433, the decoder decodes the quantized block R from the data stream STR, for example using the decoding specified in the HEVC standardTQThe coefficient of (a).

In step E434, δ is dequantized, e.g., using a quantization step scalar1For decoding block RTQInverse quantization is performed. This produces a block of inverse quantized coefficients RTQD

In step E435, an inverse frequency transform is applied to the inverse quantized coefficient block RTQDIn order to produce a decoded prediction residual block RTQDI. For example, the transform may be an inverse DCT type transform. By decoding the indicator from the data stream STR it is possible to select from a predetermined set of transforms ETITo select the transform to be used.

In step E436, the prediction block P obtained in step E432 and the decoded residual block R obtained in step E435 are used as a basisTQDITo reconstruct the current block so as to pass Xrec=P+RTQDITo generate a decoded current block Xrec

The following describes step E44 for decoding the current block when the current block is encoded according to the second encoding mode M2.

In step E440, a quantization step δ is determined, similar to what is done at the encoder2

According to the invention, in this coding mode M2, the pixels of the current block can be predicted according to the first prediction mode or the second prediction mode already presented with respect to fig. 1.

In step E441, a set of constant pixel values in the block is determined from previously decoded pixels of the image, similar to what is done at the encoder. The level values f and b are considered to have been determined by the encoder.

The following steps are performed for each pixel of the current block.

In step E4411, a prediction value according to the first prediction mode of the current pixel is determined. For this purpose the same local predictor PL is used as at the encoder. When several local predictors are possible, the local predictor PL is determined similarly to what was done at the encoder.

In step E442, the quantized residual R1 is decoded from the data stream STRQ. Any known method, such as the one described in HEVC, may be used to decode the quantized coefficients of the conventional prediction residual. The amplitude a of the quantized prediction residual Q1' (X) of the current pixel is then obtained.

According to a particular embodiment of the invention, in step E4421, when the amplitude a of the quantized prediction residual Q1' (X) is zero, the indicator t indicating whether the current pixel is predicted according to the second prediction mode is implicitly set to 0. In this case, the current pixel is considered to be in the state s ═ 1, and it will be predicted by the prediction value generated from the first prediction mode. The quantized prediction residual Q1'(X) is then reconstructed by Q1' (X) being 0.

Otherwise, when the amplitude a of the quantized prediction residual Q1'(X) is not zero, the sign sgn associated with the quantized prediction residual Q1' (X) is read in the data stream STR. The quantized prediction residual Q1'(X) is then reconstructed by Q1' (X) ═ a × sgn.

Then, in step E4422, the indicator t of the current pixel is read in the data stream STR. If the value of the read indicator t is 0, the state of the current pixel is s-2. If the value of the read indicator t is 1, the state of the current pixel is s-3.

According to another particular embodiment of the present invention, the indicator t is systematically coded for each pixel of the current block. In this case, in step E4422, the value 0 or 1 of the indicator t is read in the data stream STR and the state s of the pixel is set accordingly.

And when the state of the current pixel is s-3, predicting the current pixel according to the second prediction mode. In this case, in step E4423, the values of the set of values determined in step E441 are selected and assigned to the prediction value pl (x) associated with the current pixel to predict the current pixel similarly to what was done at the encoder. For example, if | pl (x) -b | < | pl (x) -f |, then pl (x) -b, otherwise pl (x) -f.

The method then proceeds to step E443.

When the state of the current pixel is s-2 or s-1, the current pixel is predicted according to the first prediction mode. In this case, the prediction value pl (x) of the current pixel determined according to the first prediction mode in step E4411 is not changed.

In step E443, the quantization step δ is used2The quantized residual Q1' (X) is dequantized to produce an dequantized residual QD1 (X).

In step E444, the prediction value pl (X) determined in step E4411 or E4423 and the inverse quantized prediction residual QD1(X) are used to obtain a reconstructed value X' of the current pixel, X ═ pl (X) + QD1 (X).

The prediction residues Q1(X) of the pixels of the current block are placed in the prediction residue block R1QIn (2), the inverse quantized prediction residue QD1(X) of the pixels of the current block is placed in the inverse quantized prediction residue block R1QDThe reconstructed value X' of the pixel of the current block is placed in the reconstructed block P1.

The above-described steps are performed for all pixels of the current block in a scan order that ensures that pixels for local prediction are available.

For example, the scan order is a dictionary order (left to right, then top to bottom rows).

According to a particular embodiment of the present invention, the block P1 comprising the reconstructed value PL (X) + QD1(X) of each pixel of the current block here forms the decoded current block Xrec

According to another particular embodiment of the invention, it is considered that an additional prediction residual is encoded for the current block. Therefore, in order to reconstruct the current block XrecMust decode the additional prediction residual.

For example, this other particular embodiment may be activated or not activated by default at the encoder and decoder level. Alternatively, an indicator may be encoded with block level information in the data stream to indicate whether additional prediction residuals are encoded for each block encoded according to the ILR coding mode. Or further, an indicator may be encoded in the data stream with 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.

When encoding the additional prediction residual for the current block, the quantized prediction residual R2 is decoded from the data stream STR in step E445 using means suitable for implementation at the encoder (e.g. means implemented in an HEVC decoder)TQThe coefficient of (a).

In step E446, the coefficient block R2 is quantizedTQE.g. scalar inverse quantization delta using quantization step size1Is dequantized. This produces an inverse quantized coefficient block R2TQD

In step E447, an inverse frequency transform is applied to block R2TQDTo produce a decoded prediction residual block R2TQDI

For example, the inverse transform may be an inverse DCT type transform.

Possibly from a predetermined set of transformations ET2And decoding an information item informing the decoder of the transformation to be used. In this case, set ET2Different from the set ETIn order to accommodate the particular statistics of the residual R2.

In step E448, by adding the prediction block P1 obtained in step E444 to the decoded prediction residual R2TQDITo reconstruct the current block.

In step E45, it is checked whether the current block is the last block of the picture to be processed by the decoding method, taking into account the previously defined scan order. If the current block is not the last block of the picture to be processed, in step E46, a subsequent block of the picture to be processed is selected according to the previously defined scanning order of the picture, and the decoding method proceeds to step E42, the selected block becoming the current block to be processed.

If all blocks of the image have already been encoded, the method proceeds to the application of a post-processing method to be applied to the reconstructed image in step E451, if necessary. Such post-processing methods may be deblocking filtering and/or SAO methods.

The method then proceeds to decode the next picture of the video (if any) (step E47).

Fig. 7 shows a simplified structure of a coding device COD suitable for implementing the coding method according to any one of the particular embodiments of the invention.

According to a particular embodiment of the invention, the steps of the encoding 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 for example with 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 above-described encoding method when the program is run by the processor PROC.

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.

Fig. 8 shows a simplified structure of a decoding device DEC suitable for implementing a decoding method according to any one of the particular embodiments of the invention.

According to a particular embodiment of the invention, the decoding device DEC has a standard architecture of a computer and in particular comprises a memory MEM0, a processing unit UT0 equipped with, for example, a processor PROC0 and driven by a computer program PG0 stored in a memory MEM 0. The computer program PG0 comprises instructions for implementing the steps of the decoding method as described above, when the program is run by the processor PROC 0.

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 PROC 0. In particular, the processor PROC0 of the processing unit UT0 implements the steps of the decoding method described above according to the instructions of the computer program PG 0.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频序列的图像编解码方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类