Method for decoding at least one image, corresponding encoding method, devices, signal and computer programs
A method for decoding at least one encoded image within an encoded data stream, the image being split into blocks of elements. The decoding method includes: obtaining from the stream a piece of information representative of a so-called prediction function, the prediction function belonging to a predetermined list of prediction functions; and decoding at least one element of a block of elements, using a differential pulse-code modulation, from an already processed neighbouring element and using the prediction function.
The field of the invention pertains to encoding and decoding of images or sequences of images, and in particular video streams.
More specifically, the invention relates to compression of images or sequences of images using a representation of the images by blocks.
In particular, the invention may apply to images or video encoding implemented in current or upcoming encoders (JPEG, MPEG, H.264, HEVC, etc. and VVC and their amendments), and in the corresponding decoders.
2. PRIOR ART AND ITS DRAWBACKSDigital images and sequences of images occupy a huge amount of memory space, which requires, when these images are transmitted, compressing them in order to avoid congestion problems on the network used for this transmission. Indeed, the usable rate on this network is limited in general.
Numerous techniques for compressing video data are already known. Among these, the HEVC (“High Efficiency Video Coding, Coding Tools and Specification”, Matthias Wien, Signals and Communication Technology, 2015) compression standard suggests implementing a prediction of pixels of a current image with regards to other pixels belonging to the same image (intra prediction) or to a previous or next image (inter prediction).
More specifically, the intra prediction makes use of spatial redundancies within an image. For this purpose, the images are split into blocks of elements or pixels. The blocks of pixels are then predicted using already rebuilt information, corresponding to the previously encoded/decoded blocks in the current image according to the order of browsing the blocks in the image.
Moreover, conventionally, encoding of a current block is carried out using a prediction of the current block, called predicted block, and a prediction residue or “residual block”, corresponding to the difference between the current block and the predicted block. The obtained residual block is then transformed, for example using a DCT (discrete cosine transform) type transform. Afterwards, the coefficient of the transformed residual block are quantized, and then encoded by an entropic encoding and transmitted to the decoder, which can rebuild the current block by adding this residual block to the predicted block.
Decoding is done image by image, and for each image, block by block. For each block, the corresponding elements of the stream are read. The reverse quantization and the reverse transformation of the coefficients of the residual block are performed. Then, the prediction of the block is calculated to obtain the predicted block and the current block is rebuilt by adding the prediction (the predicted block) to the decoded residual block.
A technique for predicting the elements of a block, called DPCM (standing for “Differential Pulse Code Modulation”), is also known which consists in predicting the value of a pixel of an image from that/those of one or several ones of its neighbours. For example, this technique is applied to the JPEG-LS (standing for “Lossless Joint Photographic Expert Group”) standard and described in the document ISO/OEC 14495-1:1999 ITU-T Rec. T.87, in 1998.
Referring to
A prediction of the value of X is referred to as P(X). According to the JPEG-LS standard, P(X) is calculated as follows:
P(X)=f(XA,XB,XC) where f is a predetermined function, that will be referred to later on as neighbouring function.
An example of a function f is indicated hereinbelow:
f(A,B,C)=min(A,B) if C≥max(A,B)
max(A,B) if C≤min(A,B)
A+B−C otherwise
This function f is that one used in the JPEG-LS standard. Once this prediction P(X) is calculated, an original prediction residue R(X) is determined by subtraction of the prediction of the pixel X from the original value of X:
R(X)=X−P(X).
In the case of an encoding without image loss like that one specified by JPEG-LS, this residue R(X) is encoded by an entropic encoder which makes use of its statistical properties, and then transmitted to the decoder.
In the case of an encoding with image loss, the residue R(X) is typically quantized, for example using a uniform scalar quantizer with a quantization step set by the user:
RQ(X)=NI(R(X/d)
Where NI (standing for “Nearest Integer”) is the function that determines the closest integer. It selects the smallest one in case of equality.
The quantized residue RQ(X) is compressed beforehand using an entropic encoding technique such as Huffman encoding or arithmetic encoding, known to those skilled in the art, and is then transmitted to the decoder. On the encoder side, the decoded value D(X) of the current pixel X is rebuilt, so that the current pixel could serve as a predictor to pixels that are processed subsequently. The decoded version of the current pixel D(X) may be expressed as follows:
D(X)=P(X)+RQ(X).d
The decoder applies the same formula to rebuild the samples of the signal carrying the encoded data transmitted by the encoder.
It should be noted that pixels other than the neighbouring pixels XA, XB and XC of the pixel X, determined by prediction functions other than the JPEG-LS function, may be used to predict the pixel X, as long as these pixels are available in their decoded form. Similarly, it is possible to use any quantizer known to those skilled in the art.
It should be noted that, when a DPCM-type prediction is applied to an image, some pixels X have no predictor as defined by the function f. This is the case, in the previous example, of the pixels of the first row of pixels of the image and of the first column. A known solution consists in assigning a default value to XA, XB or XC such as the median value of the dynamics of the signal, like 128 for a signal that can range between 0 and 255.
From the document published under the number U.S. Pat. No. 9,253,508 in February 2016, an adaptation of this DPCM prediction technique to a bloc-based coding scheme is also known. Thus, inside a block B of the image, for example 8×8 pixels sized, the pixels are browsed in the lexicographic order and the DPCM prediction as described before is applied. Typically, when the pixels XA, XB or XC that are used in calculating the prediction of a pixel X are outside the current block, the values of the decoded pixels originating from the neighbouring blocks are used, for example XC′, XB′ or XC″, XB″ as illustrated in
An experiment of the DPCM technique at the block level implemented by the inventors has revealed a gain in compression of the video, in particular on some types of contents such as synthetic contents.
Nevertheless, there is a need for a technique for predicting pixels at one block that is more effective.
3. DISCLOSURE OF THE INVENTIONAccording to at least one embodiment, the invention relates to a method for decoding at least one encoded image within an encoded data stream, said image being split into blocks of elements, the decoding method comprising:
obtainment from the stream, of a piece of information representative of a so-called prediction function, said prediction function belonging to a predetermined list of prediction functions,
decoding of at least one element of one said block of element using a differential pulse-code modulation, from an already processed neighbouring element and using said prediction function.
The invention is based on a quite new approach, which consists in obtaining, on the decoder side, the prediction function selected by the encoder as the best suitable, for example for the image or for the current block, in a predetermined list. The decoder makes use of the encoded information to obtain the prediction function to be used for the current block.
This way, the quality of the prediction is improved and the residue encoded in the stream has a small size. Advantageously, the decoded information may, for example, be in the form of a rank of the prediction function in a predetermined list known to the decoder.
According to an aspect of the invention, when the prediction function does not belong to the predetermined list of prediction functions, said information is not obtained.
According to another aspect, the predetermined list of prediction functions comprises at least one of the following prediction functions:
-
- Horizontal direction prediction function,
- Vertical direction prediction function, or
- JPEG-LS prediction function.
According to still another aspect of the invention, the predetermined list of prediction functions comprises the following prediction functions:
-
- Horizontal direction prediction function,
- Vertical direction prediction function.
According to still another aspect of the invention, said already processed neighbouring element is a previously decoded element of said block of the image.
Correlatively, the invention also relates to a method for encoding at least one image, split into blocks of elements, said encoding method comprising:
obtainment of a prediction function, said prediction function belonging to a predetermined list of prediction functions;
insertion of an encoded piece of information representative of said prediction function in an encoded data stream, and
encoding of at least one element of one said block of elements, using a differential pulse-code modulation, from an already processed neighbouring element and using said prediction function.
Advantageously, on the encoder side, this piece of information representative of the selected prediction function is encoded so as to be transmitted to the decoder, so that it could take it into account when processing the current block.
For example, the encoded information may be in the form of a rank of the prediction function in a predetermined list known to the decoder.
According to an aspect of the invention, if the prediction function does not belong to a predetermined list of prediction functions, said encoded information is not inserted.
According to another aspect of the invention, the predetermined list of prediction functions comprises at least one of the following prediction functions:
-
- Horizontal direction prediction function,
- Vertical direction prediction function, or
- JPEG-LS prediction function.
According to still another aspect of the invention, the predetermined list of prediction functions comprises the following prediction functions:
-
- Horizontal direction prediction function,
- Vertical direction prediction function.
According to another aspect of the invention, said already processed neighbouring element is a previously encoded element of said block of the image.
The invention also relates to a device for encoding or decoding at least one image adapted to implement an encoding or decoding method according to any one of the particular embodiments defined hereinabove. Of course, this device may include the different features relating to the encoding, respectively decoding, method according to the invention. Thus, the features and advantages of this device are the same as those of the encoding, respectively decoding, method and are not detailed further.
According to one embodiment, the invention also relates to a signal carrying encoded data representative of at least one image, an image being split into blocks of elements, said encoded data having been obtained by an encoding method according to the invention, said encoded data comprising at least one piece of information representative of a prediction function selected by the encoding method and belonging to a predetermined list of prediction functions, and intended to be obtained by a decoding method according to the invention, at least one current element of one said block of elements being decoded, using a differential pulse-code modulation, from an already processed neighbouring element and using said prediction function.
According to a particular embodiment, the invention also relates to one or several computer program(s) including instructions for the implementation of a method for encoding or decoding at least one image according to any one of the previously-described particular embodiments, when said program is executed by a processor. Such a program may use any programming language and be in the form of a source code, an object code, or an intermediate code between a source code and an object code, such as in a partially compiled form, or in any other desirable form. It may be downloaded from a communication network and/or recorded on a computer-readable medium.
The invention also covers a computer-readable recording medium or information medium, including instructions of a computer program as mentioned hereinabove. The aforementioned recording medium may consist of any entity or device capable of storing the program. For example, the medium may include a storage means, such as a ROM, for example a CD ROM or a ROM of a microelectronic circuit, or a magnetic recording means, for example a USB flash disk or a hard disk.
Besides, the recording media may correspond to a transmittable medium such as an electric or optical signal, which may be conveyed via an electrical or optical cable, by radio or by other means. In particular, the program according to the invention may be downloaded on an Internet-type network.
Alternatively, the recording media may correspond to an integrated circuit in which the program is embedded, the circuit being adapted to execute or to be used in the execution of the considered method.
Other objects, features and advantages of the invention will appear more clearly upon reading the following description, provided merely as an illustrative and non-limiting example, with reference to the figures, among which:
The invention relates to the prediction of a block of an image to be encoded or decoded, in particular the prediction according to the previously-described DPCM technique. According to this technique, the elements of a current block are predicted from other elements of this block.
The invention aims to improve this technique by enabling the encoder to select the best prediction function to apply to the current block in a predetermined list of functions and to transmit it to the decoder.
5.2 Detailed Description of the Embodiment of FIGS. 15 and 16According to an embodiment of the invention, there is provided a method for encoding at least one image, split into blocks of elements, using a Differential Pulse-Code Modulation (DPCM).
According to a general feature of this other aspect of the invention, the encoding method comprises the insertion, in an encoded data stream (bitstream), of an encoded information representative of a so-called prediction function that allows obtaining at least one element of the block of elements from another element, said encoded information being inserted if the prediction function belongs to a predetermined list of prediction functions.
In the case where the prediction function does not belong to a predetermined list of prediction functions, said encoded information is not inserted.
Preferably, the predetermined list of prediction functions comprises at least one of the following prediction functions:
-
- Horizontal direction prediction function,
- Vertical direction prediction function, or
- JPEG-LS prediction function.
Preferably, said element is a previously encoded element of said block of the image.
An embodiment of this method is illustrated by
At C152, a piece of information representative of the obtained prediction function f is encoded and inserted in the stream or file BS.
At C153, at least one element or pixel x is selected in the block B. A browse order is defined for the pixels of the current area. This browse order is known per se and is predetermined. In particular, it is determined by the pixels used for the prediction of the current pixel and which shall be available in their decoded form (and therefore shall have been proceeded before). Thus, a conventional browse order is the lexicographic order, which works for the previously-described local prediction functions.
For this selected element X, called current element, a value P(X) is predicted at C154 from at least one neighbouring predictor element already processed by applying a prediction function f.
At C155, the value of the prediction residue is obtained by calculating R(X)=X−P(X). Afterwards, the value R(X) is quantized at C156 using for example a scalar quantization known per se. A quantized value Q(R(X)) is obtained.
At C157, the quantized residue Q(R(X)) is encoded using known means such as a Huffman encoder or an arithmetic encoder and the obtained encoded data are inserted in a stream or a file BS.
At C158, the decoded value D(X) of the current element X is calculated by carrying out the reverse operations. This value is stored in memory M′ so as to be available for the prediction of next elements of the block B, or of the image.
If the dequantizer associated to the quantizer used at the previous step is referred to as QI, the decoded value D(X) of X is: D(X)=P(X)+QI(Q(R(X)))
During a step C159, we check whether the current element X is the last one to be processed in the area Zi. If so, we check at C160 whether there are still blocks to be processed. If this is the case, the processing ends. Otherwise, the previous steps are repeated.
According to another aspect of the invention, there is provide a method for decoding at least one encoded image within an encoded data stream using a Differential Pulse-Code Modulation (DPCM). Said image is split into blocks of elements. According to a general feature of this other aspect of the invention, the decoding method comprises the obtainment from the stream of a piece of information representative of a so-called prediction function which allows obtaining at least one element of the block of elements from another element, said prediction function belonging to a predetermined list of prediction functions.
In the case where the prediction function does not belong to a predetermined list of prediction functions, said information is not obtained.
Preferably, the predetermined list of prediction functions comprises at least one of the following prediction functions:
-
- Horizontal direction prediction function,
- Vertical direction prediction function, or
- JPEG-LS prediction function.
Preferably, said element is a previously decoded element of said block of the image.
An embodiment of this method is illustrated by
For this selected element X, called current element, a value P(X) is predicted at D164 according to the DPCM technique from at least one neighbouring predictor element already processed by applying a prediction function f.
At D165, the quantized residue Q(R(X)) is read in the encoded data and it is decoded at D166 using known means, the reverse of those implemented on the encoder side.
At D167, the dequantized value R(X) of the prediction residue is calculated. If the dequantizer associated to the quantizer used at the encoder is referred to as QI, the dequantized value of R(X) is QI(Q(R(X))).
At D168, the decoded value D(X) of the current element X is calculated by adding the predicted value to the dequantized residue: D(X)=P(X)+QI(Q(R(X))).
During a step D169, we check whether the current element is the last one to be processed in the block B. If so, we check at D170 whether there are still blocks to be processed in the image I. If this is the case, the processing ends. Otherwise, the precious steps are repeated.
An advantage of this aspect of the invention lies in selecting the prediction function that best suits the current block, which allows improving the quality of the prediction and therefore reducing the residue to be encoded.
5.3 Splitting of the Current Block into Areas and Prediction of the Obtained AreasAccording to another embodiment of the invention, a current block of an image to be encoded or decoded is split into several independently decodable areas. When a current element of one area requires an element located in another area to predict the current element, it uses a replacement value. For example, this value is predetermined and read in a memory, or it is determined by the encoder for the current block and read by the decoder in the encoded data representative of the current block or, still, the value of an element of a previously encoded or decoded block, preferably amongst the blocks the closest to the current block.
Firstly, embodiments of implementations of splitting of a block into several areas and of prediction of the obtained areas according to the invention, then an encoding method and a decoding method according to the invention using such a prediction by areas, are presented.
Variants of implementations for splitting a current block into areas and predicting the obtained areas independently of each other are presented hereinafter with reference to
Referring to
At E1, the block B is split into several areas Z1, Z2 . . . ZN with N an integer greater than or equal to 2. It should be noted that, according to the invention, the split or splitting mode applied at E1 to the block B is selected according to an encoding/decoding context, that is to say according to operating constraints of the encoder/decoder, such as for example an order in which the blocks and the elements in a block are browsed, or the mode for predicting the elements of the block, so as to guarantee that the predictor element(s) of an element of the block is/are available when this element is browsed. The splitting mode may be predetermined and known to the encoder and decoder or, according to an embodiment of the invention, be determined according to encoded information transmitted in the compressed stream or file. Variants will be described hereinafter.
Examples of splits will be presented hereinafter with reference to
At E2, an area Zi, with i an integer comprised between 1 and N, is predicted as follows:
At E21, at least one element or pixel X in the area Zi is selected and the value of at least one component of this element is considered. For example, this consists of its luminance value Y in a YCbCr representation model of the color space, common in video processing. Of course, the invention is not limited to this example and applies to any component of another representation model of the color space.
In the following description, it is considered that the elements of the block B are browsed in the lexicographical order. Of course, the invention is not limited to this browse order and applies to any other browse order, such as for example the zigzag browsing known to those skilled in the art.
During an optional step E22, a prediction function f to be applied to the current block B is obtained.
For this element X, a predictor element is selected afterwards at E23 by applying the obtained prediction function f or a predetermined prediction function. This prediction function f predicts the value of the element X from at least one of the neighbouring elements already processed, that is to say encoded or decoded.
In the following description, by neighbouring element, it should be understood, in broad terms, an element of the block B that is close to the current element, without being necessarily adjacent thereto.
The example of the so-called JPEG-LS or f(A, B, C) prediction function, which predicts the value of the current element X from that one of its left A, right B and diagonal top-left C neighbours, has been described with reference to
Other examples of prediction functions are indicated:
f(A,B,C)=XA
f(A,B,C)=XB
f(A,B,C)=XA+XB−XC
f(A,B,C)=0.33XA+0.33XB+0.34XC
Some of these examples will be described hereinafter with reference to
At E24, for each of the predictor elements designated by the used prediction function f, we check whether it belongs to the current area Zi.
If this is the case, the prediction function is applied at E25 to obtain the predicted value P(X) of the current element X from the values of the predictor element(s).
Otherwise, at E26, a replacement value VR is obtained for the predictor element that falls outside the current area Zi. Several variants of implementation may be considered, among which mention may exhaustively be made of:
-
- read in a memory a predetermined value, for example equal to the average of the dynamics of possible values for the element X. In the case where the element X could take on its luminance value within the range [0,255], then the replacement value VR is set to 128;
- obtain a replacement value that is specific to the current block B, such as for example the average value of the intensities of the elements of the block. In this case, this value is calculated on the encoder side, encoded and transmitted in the encoded data to the decoder, which obtains it by reading the encoded data;
- replace the predictor element with another predictor element located in a previously encoded or decoded neighbouring bock. Example of implementation of this option will be described hereinafter with reference to
FIGS. 3B, 3E and 6A to 6D .
Once the replacement value is obtained for each of the predictor elements located outside the current area Zi, the value P(X) of the current element X is predicted at E25.
At E27, we check whether there are still elements of the block to be predicted. If so, we return back to step E21 of selecting at least one element X. Otherwise, the processing ends at E28.
5.3.1 First Example of Implementation: Vertical PredictionReferring to
First, consider the area Z1. As regards the elements of the first row lin=1 from the top-left corner of the block B, as illustrated in
In this case, step E25 is done according to one of the previously listed options to obtain a replacement value. In particular, it may use, in a known manner, the value of the element XB′ of the previous block pointed by the vertical prediction function. Indeed, this block having already been processed, the decoded value of the element XB′ is available.
For the other rows, the vertical prediction designates predictor elements belonging to 21. Hence, the prediction of the elements of the area Z1 is done according to the conventional DPCM technique.
Consider now the second area Z2. As illustrated in
In this case, step E25 is done according to one of the previously listed options to obtain a replacement value. In particular, the invention suggests looking for a predictor element in the neighbouring block BS located above the current block. Advantageously, the predictor element selected to replace the element XB is the element XB″ (lin=4, col) located on the same column as the current element X and the closest to the current block, on the row lin=4 which adjoins the boundary Fr between the two areas Z1 and Z2. Of course, the invention is not limited to this example. Any other element of a neighbouring block that is already processed may be used to replace the forbidden predictor element, even though the selection of a predictor element that is the closest and located according to the same direction is more likely to provide a good quality prediction.
As regards the elements of the next rows of the area 2, step E22 designates predictor elements that belong to Z2. Hence, the prediction is done at E24 in a conventional manner.
By preventing every dependence in prediction between the two areas Z1 and Z2, the invention allows for a parallelisation of processing thereof. Referring to
Referring to
Referring to
When considering that the element X or X(lin,col) is located on the row lin and the column col, the predictor element XA is located on the row lin and on the column col-1.
In
First, consider the area Z1. As regards the elements of the first row col=1 from the top-left corner of the block B, as illustrated in
In this case, step E25 is done according to one of the previously listed options to obtain a replacement value. In particular, it may use, in a known manner, this value of the element XA of the previous block pointed by the horizontal prediction function. Indeed, this block having already been processed, the decoded value of the element XA is available.
For the next columns of the block B, starting from col=2, the horizontal prediction designates predictor elements belonging to 21. Hence, the prediction of the elements of the area Z1 is done according to the conventional DPCM technique.
Consider now the second area Z2. As illustrated in
In this case, step E25 is done according to one of the previously listed options to obtain a replacement value. In particular, the invention suggests looking for a predictor element in the neighbouring block BG located to the left of the current block. Advantageously, the predictor element selected to replace the element XA is the element XA′ (lin,col=4) located on the same row as the current element X and in the rightmost column, col=4 of the block BG, which adjoins the boundary Fr between the two areas Z1 and Z2.
Of course, the invention is not limited to this example. Any other element of a neighbouring block that is already processed may be used to replace the forbidden predictor element, even though the selection of a predictor element that is the closest and located according to the same direction is more likely to provide a good quality prediction.
As regards the elements of the next rows of the area 2, step E22 designates predictor elements that belong to Z2. Hence, the prediction is done at E24 in a conventional manner.
By preventing every dependence in prediction between the two areas Z1 and Z2, the invention allows for a parallelisation of processing thereof. Referring to
Referring to
Consider now the so-called JPEG-LS prediction function already described with reference to
The elements of the area Z1 are predicted in a conventional manner. If a predictor element XA, XB or XC designated by the JPEG-LS prediction function for the current element X falls within a preciously processed neighbouring block, its value is used for the prediction of the element X.
Consider now the area Z2. As illustrated in
Of course, the invention is not limited to this example. Any other element of a neighbouring block that is already processed may be used to replace the forbidden predictor element, even though the selection of a predictor element that is the closest and located according to the same direction is more likely to provide a good quality prediction.
However, the pixels of the area Z2 that have no predictor elements outside the area are predicted in a conventional manner.
Referring to
It is also possible to split a block into more than two independently decodable areas, for example into 4 areas Z1 to Z4 as illustrated by
Typically, a technique for encoding an image or an images sequence by blocks splits an image into blocks with variable sizes. For example, the available block dimensions are 4×4, 4×8, 8×4, 8×8 and 16×16.
The blocks splitting that induces the largest number of machine cycles required for processing an image, is a splitting into small-sized blocks. Indeed, as illustrated by
Consider again the example of the JPEG-LS prediction function and a 16×16 pixels sized image. If the image is “split” into one single 16×16 pixels sized block, and if the technique proposed in the invention is not applied, we have seen that the number of required cycles was 31. Conversely, if the block is divided into 16 4×4 sized blocks, each requiring 7 cycles, then processing of the entire image requires 16×7=112 cycles.
Hence, it is essential to reduce the number of cycles to process the small blocks. Indeed, a hardware decoder shall be designed to process, in real-time, the “worst case” that occurs in an encoded data stream, that is to say that one of an image split into blocks with a minimum size.
Referring to
In a known manner, encoding of the sequence of images I1, I2, . . . , IN is done image by image according to an encoding order established beforehand and known to the decoder. For example, the images may be encoded in the temporal order I1, I2, . . . , IN or according to another order, for example I1,I3,I2, . . . , IN.
At a non-represented step, an image Ik to be encoded of the sequence of images I1,I2, . . . , IN is split into blocks with a maximum size. Each block with a maximum size may be split again into smaller blocks. For example, a block with a maximum size has a 32×32 pixels size. Such a bock with a maximum size may be divided into square or rectangular sub-blocks, having for example a 16×16, 8×8, 4×4, 16×8, 8×16 . . . size.
On the decoder side, a step of reading the encoded data allows obtaining a piece of information relating to the performed splitting.
At a step C0, a block B, called current block, to be encoded/decoded of an image Ik is selected according to a predetermined browse order of the image Ik, known to the encoder and to the decoder, for example the lexicographic order.
During a step C1, we check whether the current block B is to be processed according to the DPCM technique of the invention or according to another prediction mode such as a conventional intra or inter prediction mode as described for example in the HEVC standard. In a known manner, the test may consist in comparing a rate-distortion cost of the current block according to each of the modes and in selecting that one which obtains the lowest cost. A piece of information, such as an indicator (flag), on the selected prediction mode is encoded.
On the decoder side, the information is read in the compressed file or the encoded data stream in order to determine whether the current block is to be decoded according to a conventional mode (intra or inter decoding as described in the HEVC standard), or according to the DPCM mode of the invention.
In the case where the identified mode is a conventional prediction mode, the next step is step C2 of encoding (respectively decoding) in a conventional mode, known to those skilled in the art. It will not be described further.
Otherwise, if the obtained prediction mode is the DPCM mode according to the invention, the next step is step C3 of obtaining a split of the current block. During this step, the current block is divided into several areas according to one of the variants of the invention described in section 5.3. According to a first example described in section 5.3.3, the current block B is split into two areas Z1 and Z2, defined as follows:
An element X(lin,col) of the block B belongs to the first area Z1 if lin+col<H+1 with H the number of rows. Otherwise, the pixel belongs to the second area Z1. The areas Z1 and Z2 are separated by a diagonal boundary Fr.
According to a second example described in section 5.3.1, the block B is divided into two areas Z1 and Z2, such that an element X(lin,col) belongs to the first area if lin<H+1 where H is the number of rows. Otherwise, the element belongs to the second area.
At C4, the first area Z1 is selected as the current area. It should be noted that the order of processing the areas of the block B is arbitrary, to the extent that these are encodable/decodable independently of each other.
Step C5 of encoding the area Z1 will be described hereinafter with reference to
At C6, we check whether there are still areas Zi to be encoded. In the considered example, there is still Z2. Hence, we return back to step C4 to select the area Z2. Afterwards, it is encoded or decoded, were appropriate, at C5/D5. At C6, the test of the last area is satisfactory.
The next step C7 checks whether there are still blocks to be processed. If this is the case, we return back to step C0 of selecting a new current block. Otherwise, the processing ends at C8.
5.4.2 Parallel Encoding or Decoding MethodThe steps of selecting a block C0, checking the prediction mode C1, conventional encoding/decoding C2 and splitting into areas C3 remain unchanged.
Step C4 of selecting an area to be processed is replaced with a step C4′ of distributing the areas between the computing machines or processing units that are available in the encoder/decoder. In the example of
Of course, the invention is not limited to this example and applies to an encoder or decoder comprising a number of processing units that is smaller than the number of areas to be processed. In this case, we check at C6 whether there are still areas of the block to be processed. If so, the method returns back to step C4′ of distributing the areas between the processing units. Otherwise, the next step is step C7 of checking the last block. If there are still blocks to be processed, we return back to step C0, otherwise the method ends at C8.
5.4.3 Encoding of an Area of the Current BlockStep C5 of encoding an area Zi of the current block according to an embodiment of the invention is now detailed with reference to
At C51, at least one element or pixel x is selected in the area Zi. A browse order is defined for the pixels of the current area. This browse order is known per se and is predetermined. In particular, it is determined by the pixels used for the prediction of the current pixel and which shall be available in their decoded form (and therefore shall have been proceeded before). Thus, a conventional browse order is the lexicographic order, which works for the previously-described local prediction functions.
For this selected element X, called current element, a value P(X) is predicted at C52 from at least one neighbouring predictor element already processed by applying a prediction function f, as previously described in section 5.3.
At C53, the value of the prediction residue R(X)=X−P(X) is calculated. Afterwards, the value R(X) is quantized at C54 using for example a scalar quantization known per se. A quantized value Q(R(X)) is obtained.
At C55, the quantized residue Q(R(X)) is encoded using known means such as a Huffman encoder or an arithmetic encoder and the obtained encoded data are inserted in a stream or a file.
At C56, the decoded value D(X) of the current element X is calculated by carrying out the reverse operations. This value is stored in memory so as to be available for the prediction of next elements of the current area, or of the image.
If the dequantizer associated to the quantizer used at the previous step is referred to as QI, the decoded value D(X) of X is: D(X)=P(X)+QI(Q(R(X)))
During a step C57, we check whether the current element is the last one to be processed in the area Zi. If so, the processing ends. Otherwise, the next step is step C51 of selecting an element to be encoded.
5.4.4 Decoding of an Area of the Current BlockStep D5 of decoding an area Zi of the current block according to an embodiment of the invention is detailed now with reference to
At D51, at least one element or pixel X in the area Zi is selected as previously described in section 5.4.3 for encoding.
For this selected element X, called current element, a value P(X) is predicted at D52 from at least one neighbouring predictor element already processed by applying a prediction function f, as previously described in section 5.3 for encoding.
At D53, the quantized residue Q(R(X)) is read in the encoded data and it is decoded at D54 using known means, the reverse of those implemented on the encoder side.
At D55, the dequantized value R(X) of the prediction residue is calculated. If the dequantizer associated to the quantizer used at the encoder is referred to as QI, the dequantized value of R(X) is QI(Q(R(X))).
At D56, the decoded value D(X) of the current element X is calculated by adding the predicted value to the dequantized residue: D(X)=P(X)+QI(Q(R(X))).
During a step D57, we check whether the current element is the last one to be processed in the area Zi. If so, the processing ends at D58. Otherwise, the next step is step D51 of selecting a next element to be decoded.
5.4.5 Variants of Encoding or Decoding of a Current BlockReferring to
When the prediction mode is the DPCM mode, we obtain during an additional step C11 the prediction function f to be applied to the elements of the current block to predict its elements, in a list of available functions. For example, the list comprises the horizontal prediction function, the vertical prediction function and the JPEG-LS prediction function or only two of these functions. Of course, the invention is not limited to this example and the list may contain prediction functions other than those described before.
On the encoder side, the listed prediction functions are tested for example by calculating for each one the induced rate-distortion cost. The selected prediction function f is that one associated to the lowest rate-distortion cost. The next steps C3 and C5 or C51 to C5N make use of the knowledge of this information. In particular, step C3 of splitting the current block into areas takes into account this prediction function indication to adapt the performed splitting. Indeed, as described before, each selected prediction function conditions a particular splitting of the block that will allow minimising the number of machine cycles that are required for processing the current block. However, step C4 of selecting an area to be processed or respectively C4′ of distributing the areas to be processed over the available processing units, is independent of the selection of the prediction function f, since, according to the invention, the areas split in the current block are encodable or decodable independently of each other. The encoding step C5 is also adapted, since the prediction of each of the areas is carried out with the selected prediction function.
Advantageously, the selected prediction function f is transmitted to the decoder in the form of a specific indicator which is encoded and inserted in the encoded data stream/file. For example, this indicator is in the form of a rank of the prediction function in the list. Of course, this indicator is inserted only when the current block is encoded in the DPCM mode.
On the decoder side, step D11 comprises reading of the prediction function indicator in the encoded data stream or file and decoding thereof. Of course, such an indicator is read only if the block is to be decoded in the DPCM mode. The prediction function f is obtained from the decoded specific indicator.
In a similar way as with the encoder, the next steps D3, and D5 or D51 to D5N take into account the obtained prediction function f to adapt their processing of the current block, whereas steps D4 or D4′ are not affected.
5.5 Encoding and Decoding DevicesAccording to a particular embodiment of the invention illustrated by
Upon initialisation, the code instructions of the computer program Pg are loaded for example in a RAM memory before being executed by the processor. In particular, the processor of the processing unit UT implements the steps of the encoding or decoding method described hereinabove in these different variants, according to the instructions of the computer program Pg.
According to another embodiment of the invention, illustrated by
According to another particular embodiment of the invention illustrated by
-
- a module CUT for splitting the block into at least two areas;
- a module PROC for processing at least one said area, comprising browsing of the elements of the area according to a predetermined browse order, and for a browsed current element:
- The selection SEL of at least one neighbouring predictor element previously encoded or decoded according to a predetermined neighbouring function;
- The prediction PRED of the current element into a predicted current element:
- from the at least one neighbouring predictor element, if the at least one neighbouring predictor element belongs to said area;
- from at least one replacement value, otherwise.
The processing unit UT cooperates with the above-described different functional modules and the memory MEM in order to implement the steps of the encoding or decoding method.
The above-described different functional modules may be in a hardware and/or software form. When in a software form, such a functional module may comprise one or several processor(s), a memory and program code instructions to implement the function corresponding to the module when the code instructions are executed by one/the processor. When in the hardware form, such a functional module may be implemented by any type of suitable encoding circuits, such as, without limitation, microprocessors, Digital Signal Processors (DSP), Application Specific Integrated Circuits (ASIC), Field Programmable Gate Arrays (FPGA) circuits, a wiring logic units.
These modules are driven by the processor of the processing unit UT.
Advantageously, the functional module PROC may comprise several processors arranged so as to process the areas split in the current block according to the invention in parallel.
Advantageously, the device 100 and/or the device 200 may be embedded in a terminal equipment ET 10, such as a smartphone, a tablet, a television set, a personal computer. The device 100, 200 is then arranged so as to cooperate at least with the following module of the terminal ET:
-
- a data emitter/receiver module E/R1, through which the bitstream TB or the compressed file FC is transmitted in a telecommunications network, for example a wired network or a radio network; and
- a module M for storing M the image or the sequence of images to be encoded, the obtained encoded data stream/file or the decoded image or sequence of images.
It goes without saying that the embodiments that have been described hereinabove have been provided for merely indicative and non-limiting purposes, and that numerous modifications may be easily made by those skilled in the art yet without departing from the scope of the invention.
Claims
1. A method for decoding at least one encoded image within an encoded data stream, said image being split into blocks of elements, the decoding method being implemented by a decoding device and comprising:
- obtaining from the stream a piece of information representative of a prediction function, said prediction function belonging to a predetermined list of prediction functions, and
- decoding at least one element of a block of the blocks of elements using a differential pulse-code modulation, from an already processed neighbouring element and using said prediction function.
2. The method according to claim 1, wherein when the prediction function does not belong to the predetermined list of prediction functions, said information is not obtained.
3. The method according to claim 1, wherein the predetermined list of prediction functions comprises at least one of the following prediction functions:
- horizontal direction prediction function,
- vertical direction prediction function, or
- JPEG-LS prediction function.
4. The method according to claim 1, wherein the predetermined list of prediction functions comprises the following prediction functions:
- horizontal direction prediction function,
- vertical direction prediction function.
5. The method according to one claim 1, wherein, said already processed neighbouring element is a previously decoded element of said block of the image.
6. A method for encoding at least one image, split into blocks of elements, said encoding method being implemented by an encoding device and comprising:
- obtaining a prediction function, said prediction function belonging to a predetermined list of prediction functions;
- inserting an encoded piece of information representative of said prediction function in an encoded data stream, and
- encoding at least one element of a block of the blocks of elements, using a differential pulse-code modulation, from an already processed neighbouring element and using said prediction function.
7. The method according to claim 6, wherein if the prediction function does not belong to a predetermined list of prediction functions, said encoded information is not inserted.
8. The method according to claim 6, wherein the predetermined list of prediction functions comprises at least one of the following prediction functions:
- horizontal direction prediction function,
- vertical direction prediction function, or
- JPEG-LS prediction function.
9. The method according to, wherein the predetermined list of prediction functions comprises the following prediction functions:
- horizontal direction prediction function,
- vertical direction prediction function.
10. The method according to claim 6, wherein, said already processed neighbouring element is a previously encoded element of said block of the image.
11. A device for decoding at least one encoded image within an encoded data stream, said image being split into blocks of elements, said device comprising a computing machine dedicated or configured to:
- obtain from the stream a piece of information representative of a prediction function, said prediction function belonging to a predetermined list of prediction functions, and
- decode at least one element of block of the blocks of elements, using a differential pulse-code modulation, from an already processed neighbouring element and using the prediction function.
12. A device for encoding at least one image, split into blocks of elements, said device comprising a computing machine dedicated or configured to:
- obtain a prediction function, said prediction function belonging to a predetermined list of prediction functions;
- insert an encoded piece of information representative of said prediction function in an encoded data stream, and
- encode at least one element of a block of the blocks of elements, using a differential pulse-code modulation, from an already processed neighbouring element and using the prediction function.
13. (canceled)
14. (canceled)
15. A non-transitory computer-readable medium comprising a computer program product recorded thereon which comprises program code instructions for performing a method for decoding at least one encoded image within an encoded data stream, when the instructions are executed by a processor of a decoding device, said image being split into blocks of elements, and wherein the instructions configure the decoding device to:
- obtain from the stream a piece of information representative of a prediction function, said prediction function belonging to a predetermined list of prediction functions, and
- decode at least one element of a block of the blocks of elements using a differential pulse-conde modulation, from an already processed neighboring element and using said prediction function.
16. A non-transitory computer-readable medium comprising a computer program product recorded thereon which comprises program code instructions for performing a method for encoding at least one image, when the instructions are executed by a processor of an encoding device, said image being split into blocks of elements, and wherein the instructions configure the encoding device to:
- obtain a prediction function, said prediction function belonging to a predetermined list of prediction functions;
- insert an encoded piece of information representative of said prediction function in an encoded data stream, and
- encode at least one element of a block of the blocks of elements, using a differential pulse-code modulation, from an already processed neighboring element and using said prediction function.
Type: Application
Filed: Nov 6, 2019
Publication Date: Dec 30, 2021
Inventors: Félix Henry (Saint-Grégoire), Gordon Clare (Pacé), Pierrick Philippe (Melesse)
Application Number: 17/292,215