Method and apparatus for digital data compression

文档序号:1559842 发布日期:2020-01-21 浏览:13次 中文

阅读说明:本技术 用于数字数据压缩的方法和设备 (Method and apparatus for digital data compression ) 是由 帕斯卡尔·休伯特·佩莱格里 查尔斯·丹尼尔·巴斯查尔特 加埃尔·鲁弗鲁瓦 于 2018-07-10 设计创作,主要内容包括:本发明涉及一种用于压缩输入数据集的方法,其中,将输入数据集中的系数分组为多个系数组,确定表示每一组所需的位平面数量、GCLI,应用量化,保留有限数量的位平面,将预测机制应用于所述GCLI以获得残差,并且对所述残差执行熵编码。熵编码后的残差以及保留的位平面允许解码器以最小的元数据成本重建经量化的数据。(The invention relates to a method for compressing an input data set, wherein coefficients in the input data set are grouped into a plurality of coefficient groups, the number of bit-planes required to represent each group, GCLI, is determined, quantization is applied, a limited number of bit-planes is reserved, a prediction mechanism is applied to the GCLI to obtain a residual, and entropy coding is performed on the residual. The entropy encoded residual and the reserved bitplanes allow the decoder to reconstruct the quantized data with minimal metadata cost.)

1. A method for compressing one or more input data sets in dependence on compression parameters, the or each input data set comprising a sequence of M coefficients, each coefficient having M bits to be included between 0 and 2m-1 into one or more respective compressed data sets, each compressed data set comprising a magnitude compressed data set and a metadata compressed data set, wherein the compression parameters may comprise: m; m; n; t; a quantization type; a mapping mode, the mapping mode being negative first or positive first; the number of rows and columns of the display image in the case where the input data set represents the display image; the number of rows of sub-bands in case the sequence of pixels is a decorrelating transformation of the display image; a prediction mode, which may be horizontal prediction or vertical prediction; determining the mode of the initial value of the prediction factor; an entropy coding mode; a value of a parameter k of Rice encoding in a case where the entropy encoding is Rice encoding; and a boundary pattern which is one of "bounded by a minimum", "bounded by a minimum/maximum", "bounded by a maximum", "without a boundary",

for the or each input data set, the method comprises the steps of:

A. grouping the coefficients into one or more consecutive groups of n coefficients, the grouping factor n being greater than or equal to 2, each coefficient group having m magnitude bit-planes of different weights for the coefficients;

B. for each of the coefficient groups i, there is,

a) determining a value of a maximum encoded line index (GCLI), the GCLIiAn index of the highest weighted non-zero bits in the bits of the magnitudes of these coefficients in said group i, the index counting from 1 of the least significant bit to m of the most significant bit, the GCLI being zero for the group in which all coefficients are equal to zero;

b) performing quantization such that quantized coefficients are included at 0 to 2(m-t)1, thereby providing n quantized coefficients, wherein t is the quantization level;

c) if GCLIi≧ t +1, then for each bitplane of the group, will have a weight of 1 through a weight of GCLIi-the bitplanes of quantized coefficients of t are copied to a set of magnitude-compressed data;

d) if GCLIiT is less than or equal to t, no operation is performed

e) Calculating GCLI based on GCLI of one or more sets of leading coefficients in the coefficient sequenceiIs predicted byiFor a first coefficient group of said coefficient sequence, the prediction factor pred is equal to pred _ init;

f) calculating the residual error ri

ri=max(GCLIi-t,0)-max(predi-t,0);

Characterized in that the method comprises the following additional steps:

g) the residual error riMapping to code, the mapping being obtainable by performing the following steps

(1) Will r isMinimum valueThe minimum value of the residuals of all possible values of GCLIi is calculated as

rMinimum value=-max(predi-t,0);

(2) Will r isMaximum valueThe maximum value of the residuals of all possible values of GCLIi is calculated as

rMaximum value=max(m-max(predi,t),0);

(3) Computing

-if the mapping pattern is negative first, then CFirstly, the method=-1,

-if the mapping mode is positive first, then CFirstly, the method=+1;

(4) Computing

-if the boundary pattern is "bounded by the minimum", flip-flop | rMinimum value|;

-if the boundary pattern is "bounded by MIN/max", trigger MIN (| r)Minimum value|,rMaximum value);

-if the boundary pattern is "bounded by the maximum", flip-flop | rMaximum value|;

-if the border mode is "no border", the flip-flop is m;

(5) IF r flip-flop, THEN

IFr C first >0, THEN

C=2*|r|-1

ELSE C=2*|r|

ELSE C ═ trigger + | rnon-woven phosphor

h) Entropy encoding of code C is provided and copied into the metadata compressed data set.

2. The method of claim 1, wherein the entropy encoding is Rice encoding, where k ═ 0, 1, or 2.

3. The method of claim 2, wherein k-0.

4. The method of any preceding claim, wherein n is less than or equal to 8, or equal to 4.

5. A method according to any one of the preceding claims, wherein said quantizing is performed by removing the t least significant bit planes of the coefficient sets.

6. The method according to any of the preceding claims, wherein the input data set is obtained by performing a decorrelation transform on a non-decorrelated input data set.

7. The method according to any of the preceding claims, wherein the sequence of M coefficients corresponds to a pixel sequence of one or more lines of a display image comprising pixel rows and pixel columns or to a pixel sequence of one or more lines of a sub-band of a decorrelated transform of a display image comprising pixel rows and pixel columns.

8. Method according to any of the preceding claims, wherein in step B.e) the predictor predi of GCLIi is the GCLI of the previous coefficient group in the coefficient sequence, for the first coefficient group in the coefficient sequence the predictor is pred _ init, and the prediction mode is the horizontal prediction mode.

9. The method as claimed in claim 7, wherein, in step B.e), if the GCLI is greater than t, then GCLIiIs GCLI of a group of pixels in the same column of the previous row of pixels and is zero if the GCLI is less than or equal to t, and is pred _ init for the group of pixels of the first row of pixels and is a vertical prediction mode.

10. The method of claim 9, the one or more input data sets comprising at least two input data sets, a first input data set having a quantization level t1The second input data set having a quantization level t2A last row of pixels of the first input data set being above a first row of pixels of the second input data set in the displayed image,

it is characterized in that the preparation method is characterized in that,

if the GCLI > t1, the predictor for the group of pixels of the first row of pixels of the second input data set is equal to the GCLI for the group of pixels of the last row of pixels in the same column of the first input data set, and if the GCLI ≦ t1, the predictor is equal to zero.

11. A method for decompressing one or more compressed data sets according to a compression parameter, each compressed data set comprising a metadata compressed data set comprising a sequence of entropy-encoded codes ci and a magnitude compressed data set comprising bit-planes of coefficients, the one or more compressed data sets being obtainable by the method of any one of claims 1 to 10, having the same compression parameter, being decompressed into one or more corresponding decompressed data sets, each decompressed data set comprising a sequence of coefficients, each coefficient having m bits encoding a magnitude, the method comprising the steps of:

a) predicting the factor predi' initialization to pred _ init;

if the prediction mode is vertical, one row of GCLIpreviInitializing to pred _ init;

b) extracting code c from the metadata compressed data seti

c) If the prediction mode is vertical, then calculate

predi’=previ

d) Obtaining the code ciCorresponding residual error riThe corresponding relation can be obtained by performing the following steps

(1) For inclusion in rMinimum valueAnd rMaximum valuePerforms step B.g) of claim 1, thereby providing a table;

(2) obtaining the code ci from the tableiCorresponding residual error ri

e) Number n of bit-planes stored for the group corresponding to the codebpThe number of the bit planes is

nbp=ri+predi’;

f) If the number of bit planes nbpEqual to zero, then a sequence of n m-bit words in the decompressed data set having all zero bit-planes from t +1 to m is provided;

g) if the number of bit planes nbpUnlike zero, then provide the bit stream with t +1 to t + n extracted from subsequent n-bit bitplanes from the magnitude-compressed data setbpA bit plane and having a sequence of t +1+ nbp through n m-bit words of m bit planes equal to zero;

h) if the prediction mode is horizontal, use nbpReplacement predi'; if the prediction mode is vertical, prev is replacedi=nbp

i) Repeating steps b) through g) for successive codes and bitplanes until all codes in the metadata compressed dataset have been used.

12. Method according to claim 11 for decompressing two or more input data sets obtained according to claim 10, characterized in that for the first line of the second data set the corresponding value of previ obtained for the last line of the first data set is taken as the predictor predi'.

13. Method according to any of claims 1 to 12, characterized in that pred _ init is equal to zero or to int (m/2).

14. A compressed data set corresponding to an uncompressed data set, the uncompressed data set comprising a sequence of M coefficients, each coefficient having M bits encoding a magnitude, the compressed data set obtainable from the uncompressed data set by the method of any one of claims 1 to 10, the compressed data set comprising

A metadata compressed data set comprising a sequence of entropy encoded codes; and

a magnitude-compressed data set comprising bit-planes of coefficients.

15. An apparatus for compressing an input data set comprising a sequence of M coefficients, each coefficient having M bits encoding a magnitude into a compressed data set comprising a magnitude compressed data set, a metadata compressed data set, the apparatus comprising at least one of a logic circuit, an ASIC, an FPGA, a GPU and a CPU configured to perform the steps of the method of any of claims 1 to 10.

16. Apparatus for decompressing compressed data comprising a metadata compressed data set comprising a sequence of Rice encoded codes and a magnitude compressed data set comprising a bit-plane of coefficients, into a decompressed data set comprising a sequence of coefficients each having M bits encoding a magnitude, said compressed data set obtainable by a method according to any of claims 1 to 10, into a decompressed data set comprising a sequence of M coefficients each having M bits encoding a magnitude, the apparatus comprising at least one of a logic circuit, an ASIC, an FPGA, a GPU and a CPU configured for performing the steps of the method according to any of claims 11 to 13.

Technical Field

The present invention relates to a method for compressing an input data set comprising a sequence of coefficients into a compressed data set, and to a method for decompressing said compressed data set. The invention also relates to a compressed data set, and to an apparatus for performing the compression method and to an apparatus for performing the decompression method.

Background

Data compression is required when it is necessary to transmit data that will require a larger bit rate compared to the available bandwidth of the communication channel or to store data that is much smaller compared to the capacity of the storage medium. This is possible when the data contains a lot of redundancy, and some details can be removed without affecting the transmission purpose. When the data is not modified by the compression-decompression cycle, the compression is considered lossless and therefore identical at the transmitter and receiver. However, lossless compression is generally not possible to guarantee because it depends on the inherent properties of the data, where redundancy and the ability to remove redundancy by mere smart encoding does not always succeed in reducing the bit rate or data cost. In this case, a lossy compression scheme is required, and the encoder reduces the information contained in the data by quantization to guarantee the required compressed data set size at the expense of quality.

Document SMPTE registration discloses document SMPTE RDD 35: 2016. 24/3/2016, pages 1-53, XP055366991, describes the TICO video compression scheme bitstream, decoding process, and provisions for mapping the bitstream to an IP network. In this process, the residual is obtained and encoded using unary coding.

Document WO03/092286 describes an adaptive method and system for mapping parameter values to codeword indices. The method entails the step of classifying the differences or parameters into at least a first group and a second group. This requires additional buffering and processing at the encoder and decoder. This also increases the latency of the process.

Document EP2773122a1, also related to the TICO video compression scheme, describes a method and apparatus for lossless data compression, in which the data are grouped into groups of n words with m bits; detecting, for each group, a value of a maximum encoded row index (GCLI), GCLI being an index of a highest weighted non-zero bit of bits of a word in the group; for each group, an output data set is generated that includes the GCLI bits of the lowest weight word in the group and metadata that includes the GCLI value. The method is very simple to implement and very efficient, especially if many data have small values. The value of GCLI is comprised between zero (when all words in a group are zero) and m (when at least one word in a group has a bit with weight m equal to 1). Therefore, binary encoding of GCLI requires

Figure BDA0002300253680000021

One bit,

Figure BDA0002300253680000022

Which is the smallest integer greater than x. This document also proposes an improvement in which the GCLI in the output data set is replaced by a difference between the GCLI value and the predicted value of GCLI. In doing so, the values to be encoded are smaller and unary encoding may require less space than binary encoding of GCLI. However, it appears that even when the improved scheme is used, the encoding of GCLI may represent a large amount of data in the compressed data set, especially when many coefficients become zero. In addition, when the compressed data set size exceeds the data budgetAnd lossy compression must be performed, the document does not address the need for quantization. Therefore, there is a need for a method for compressing an input data set that is easy to implement, requires less space for encoding metadata containing GCLI, and solves quantization problems.

Disclosure of Invention

The object of the present invention is to solve the above mentioned problems. In particular, it is an object of the invention to provide a compression and decompression method and device with low complexity, wherein the data budget required for metadata is reduced.

The invention is defined by the independent claims. The dependent claims define advantageous embodiments.

According to a first aspect of the present invention there is provided a method for compressing one or more input data sets in dependence on compression parameters, the or each input data set comprising a sequence of M coefficients, each coefficient having M bits to be included at 0 and 2m-magnitude encoding between 1 into one or more respective compressed data sets, each compressed data set comprising a magnitude compressed data set and a metadata compressed data set, wherein the compression parameters may comprise M; m; n; t; a quantization type; a mapping mode, the mapping mode being negative first or positive first; the number of rows and columns of the display image in the case where the input data set represents the display image; the number of rows of sub-bands in case the sequence of pixels is a decorrelating transformation of the display image; a prediction mode, which may be horizontal prediction or vertical prediction; determining the mode of the initial value of the prediction factor; an entropy coding mode; a value of a parameter k of Rice encoding in a case where the entropy encoding is Rice encoding; and a boundary pattern,

for the or each input data set, the method comprises the steps of:

A. grouping the coefficients into one or more consecutive groups of n coefficients, the grouping factor n being greater than or equal to 2, each coefficient group having m magnitude bit-planes of different weights for the coefficients;

B. for each of the coefficient groups i, there is,

a) determining a maximum encoded row index(GCLI) value, the GCLIiAn index of the highest weighted non-zero bits in the bits of the magnitudes of these coefficients in said group i, the index counting from 1 of the least significant bit to m of the most significant bit, the GCLI being zero for the group in which all coefficients are equal to zero;

b) performing quantization such that quantized coefficients are included at 0-2(m-t)1, thereby providing n quantized coefficients, wherein t is the quantization level;

c) if GCLIi≧ t +1, then for each bitplane of the group, will have a weight of 1 through a weight of GCLIi-the bitplanes of quantized coefficients of t are copied to a set of magnitude-compressed data;

d) if GCLIiT is less than or equal to t, no operation is performed

e) Calculating GCLI based on GCLI of one or more sets of leading coefficients in the coefficient sequenceiIs predicted byiFor a first coefficient group of said coefficient sequence, the prediction factor prediEqual to pred _ init;

f) calculating the residual error ri

ri=max(GCLIi-t,0)-max(predi-t,0);

g) The residual error riMapping to code, the mapping being obtainable by performing the following steps

(1) Will r isMinimum valueThe minimum value of the residuals of all possible values of GCLIi is calculated as

rMinimum value=-max(predi-t,0);

(2) Will r isMaximum valueThe maximum value of the residuals of all possible values of GCLIi is calculated as

rMaximum value=max(m-max(predi,t),0);

(3) If the mapping mode is negative first, C is calculatedFirstly, the methodIf it is a positive first mapping mode, C is calculated as-1Firstly, the method=+1;

(4) Computing

-if the boundary pattern is "bounded by the minimum", flip-flop | rMinimum value|;

-if the boundary pattern is "bounded by MIN/max", trigger MIN (| r)Minimum value|,rMaximum value);

-if the boundary pattern is "bounded by the maximum", flip-flop | rMaximum value|;

-if the border mode is "no border", the flip-flop is m;

(5) IF r flip-flop, THEN

IF r C first >0, THEN

C=2*|r|-1

ELSE C=2*|r|

ELSE C ═ trigger + | rnon-woven phosphor

h) Entropy encoding of code C is provided and copied into the metadata compressed data set.

Preferably, the entropy coding is Rice coding, wherein k is 0, 1 or 2. More preferably, k is 0.

Preferably, n is less than or equal to 8, or equal to 4.

The quantization may advantageously be performed by removing the t least significant bit planes of the coefficient sets.

The input data set may be obtained by performing a decorrelation transform on a non-decorrelated input data set.

The sequence of M coefficients may correspond to a pixel sequence of one or more lines of a display image comprising rows and columns of pixels or a pixel sequence of one or more lines of a sub-band of a decorrelation transform of a display image comprising rows and columns of pixels.

According to an embodiment of the invention utilizing level prediction, in step B.e), GCLIiSaid predictor pred ofiThe prediction factor is pred _ init for the first coefficient group in the coefficient sequence, which is the GCLI of the previous group of coefficients in the coefficient sequence.

According to an embodiment of the invention using vertical prediction, in step B.e), if the GCLI is greater than t, the GCLI isiSaid predictor pred ofiIs the GCLI of the group of pixels in the same column as the previous row of pixels, and if soGCLI is less than or equal to t, the predictor is zero, and for the group of pixels of the first row of pixels, the predictor is pred _ init.

In a preferred embodiment of the inventive compression method using vertical prediction, the one or more input data sets comprise at least two input data sets, a first input data set having a quantization level t1The second input data set having a quantization level t2The last row of pixels of the first input data set is above the first row of pixels of the second input data set in the displayed image if the GCLI is>t1, the predictor for the group of pixels of the first row of pixels of the second input data set is equal to the GCLI for the group of pixels of the last row of pixels in the same column of the first input data set, and the predictor is equal to zero if the GCLI ≦ t 1.

According to a second aspect of the present invention, there is provided a method for decompressing one or more compressed data sets according to a compression parameter, each compressed data set comprising a metadata compressed data set and a magnitude compressed data set, the metadata compressed data set comprising an entropy encoded code ciThe magnitude-compressed data set comprising a bit-plane of coefficients, the one or more compressed data sets being obtainable by the method of the first aspect of the invention, having the same compression parameters, being decompressed into one or more corresponding decompressed data sets, each decompressed data set comprising a sequence of coefficients, each coefficient having m bits encoding a magnitude, comprising the steps of:

a) predicting the factor predi' initialization to pred _ init;

if the prediction mode is vertical, one row of GCLI previInitializing to pred _ init;

b) extracting code c from the metadata compressed data seti

c) If the prediction mode is vertical, then calculate

predi’=previ

d) Obtaining the code ciCorresponding residual error riThe corresponding relation can be executedObtained by the following steps

(1) For inclusion in rMinimum valueAnd rMaximum valueAll r values in between perform step B.g) of the first aspect of the invention, thereby providing a table;

(2) obtaining the code ci from the tableiCorresponding residual error ri

e) Number n of bit-planes stored for the group corresponding to the codebpThe number of the bit planes is

nbp=ri+predi’;

f) If the number of bit planes nbpEqual to zero, then a sequence of n m-bit words in the decompressed data set having all zero bit-planes from t +1 to m is provided;

g) if the number of bit planes nbpUnlike zero, then provide the bit stream with t +1 to t + n extracted from subsequent n-bit bitplanes from the magnitude-compressed data setbpA bit plane and having t +1+ n equal to zerobpA sequence of n m-bit words to m bit planes;

h) if the prediction mode is horizontal, use nbpReplacement predi'; if the prediction mode is vertical, prev is replacedi=nbp

i) Repeating steps b) through g) for successive codes and bitplanes until all codes in the metadata compressed dataset have been used. In step d), the residual n may be performed by actually performing steps d (1) and d (2) or by other equivalent methods such as a search algorithm or formula.

When compression has been performed according to said preferred embodiment of the invention with vertical prediction, in the method for decompressing the two or more input data sets, for the first line of the second data set, it may be advantageous to obtain prev for the last line of the first data setiAs the predictor predi’。

In the compression method and the decompression method of the present invention, pred _ init may be equal to zero or to int (m/2).

According to a third aspect of the present invention, there is provided a compressed data set corresponding to an uncompressed data set, the uncompressed data set comprising a sequence of M coefficients, each coefficient having M bits encoding a magnitude, the compressed data set being obtainable from the uncompressed data set by the compression method of the present invention, the compressed data set comprising:

a metadata compressed data set comprising a sequence of entropy encoded codes; and

a magnitude-compressed data set comprising bit-planes of coefficients.

According to a fourth aspect of the present invention, there is provided an apparatus for compressing an input data set comprising a sequence of M coefficients, each coefficient having M bits encoding a magnitude into a compressed data set comprising a magnitude compressed data set, a metadata compressed data set, the apparatus comprising at least one of a logic circuit, an ASIC, an FPGA, a GPU and a CPU configured to perform the steps of the compression method of the present invention.

According to a fifth aspect of the present invention, there is provided an apparatus for decompressing a compressed data set into a decompressed data set, the compressed data set having data representing compression parameters and comprising a metadata compressed data set and a magnitude compressed data set, the compression parameters including values of M, n, t, a quantization type, a mapping mode being either negative first or positive first, a type of entropy coding, and a prediction mode, the metadata compressed data set comprising a sequence of Rice-coded codes, the magnitude compressed data set comprising a bit-plane of coefficients, the decompressed data set comprising a sequence of coefficients, each coefficient having M bits encoding a magnitude, the compressed data set obtainable by the compression method of the present invention and being decompressed into a decompressed data set, the decompressed data set comprising a sequence of M coefficients, each coefficient having M bits encoding a magnitude, the apparatus comprises at least one of a logic circuit, an ASIC, an FPGA, a GPU and a CPU, configured to perform the steps of the decompression method of the present invention.

Drawings

FIG. 1 is a schematic diagram of the data flow between the apparatus for compression and the apparatus for decompression of the present invention;

fig. 2 is a diagram schematically representing two input data sets and how the vertical prediction is performed at the boundary of the two data sets, the residual being functionally related to GCLI without quantization.

Fig. 3 is a graph showing the residual as a function of GCLI without quantization.

Fig. 4 is a graph showing the residual as a function of GCLI in case of quantization.

FIGS. 5 and 6 show the equation at rMinimum value| is less than rMaximum valueIn the case of (2), a graph of the mapping between the residual and the code, starting by mapping negative values first and positive values first, respectively.

FIGS. 7 and 8 show the equation at rMinimum value| is greater than rMaximum valueIn the case of (2), a graph of the mapping between the residual and the code, starting by mapping negative values first and positive values first, respectively.

Fig. 9 shows the results obtained for different images and different embodiments of the invention.

The figures are neither drawn to scale nor to scale.

Detailed Description

Fig. 1 is a schematic diagram of the data flow between the apparatus for compression and the apparatus for decompression of the present invention. The input data set may comprise a sequence of M coefficients, each coefficient having M bits encoding a magnitude. The input data set may represent a display image having a plurality of rows and columns or represent a transform of the display image, such as a subband of a wavelet transform of the image. The apparatus for compressing processes an input data set and generates a compressed data set. The compressed data sets may include magnitude compressed data sets and metadata compressed data sets. Additionally, the device for compressing may generate a set of compression parameters. These compression parameters may include:

-M, the number of coefficients in the input data set;

-m, the number of bits in the magnitude of the coefficients of the input data set;

-n, a grouping factor;

-t, quantization level;

-a quantization type;

-a mapping pattern, the mapping pattern being negative first or positive first;

-the number of rows and columns of the display image in case the input data set represents the display image;

-number of rows and subbands in case the sequence of pixels is a decorrelating transform of a display image;

-a prediction mode, which may be horizontal prediction or vertical prediction;

-an initial predictor pred _ init, used when no look-ahead GCLI is available for determining the predictor;

-determining the manner of the initial value of the predictor;

-an entropy coding mode;

-the value of the Rice-coded parameter k in case the entropy coding is Rice coding; and

-a boundary pattern, the boundary pattern being one of

-bounded by a minimum value;

-bounded by a minimum/maximum;

-bounded by a maximum;

no boundary.

These compression parameters are used by the device for compression and by the device for decompression. Some of these parameters may be communicated from the compression device to the decompression device, or may be fixed and pre-agreed between the compression device and the decompression device. The apparatus for decompressing generates a decompressed data set similar to the input data set but with some quality loss due to quantization.

Table 1 below is an example of a sequence of M-12 coefficients, each coefficient having M-15 quantization bits, grouped into three groups of n-4 coefficients. For each group, GCLI is represented, which is the maximum encoded row index, i.e. the index of the highest weighted non-zero bits of the coefficient magnitude in the group. A simple quantization is shown where the t-4 lowest bit planes of the coefficients are truncated, i.e. the quantization level t is 4.

TABLE I

Coefficient of performance

Figure BDA0002300253680000101

The GCLI for these three consecutive groups was 8, 7 and 3. If a prediction method is used and the GCLI is replaced by the residual given in equation 1:

ri=GCLIi-predi(equation 1) of the following formula,

a smaller value to be encoded can be obtained. In addition, when quantization is performed, the residual n required by the decompression device for decoding data can be calculated as ri=max(GCLIi-t,0)-max(predi-t,0) (Eq.2)

Residual r according to equation 2iThe decoder is provided with the necessary information while keeping the value to be encoded as small as possible. Assuming that the predictor is the previous GCLI (horizontal prediction) in the sequence and the GCLI of the group before the first example is 7, the residual n is as follows:

TABLE II

Figure BDA0002300253680000102

It can be seen in this example that the residual riIs a small value. Number n of bit planes to be transmittedbp(i.e., the number of bit planes above the dotted line in Table I) at GCLI>t is equal to GCLI-t, and if GCLI ≦ t, zero.

Table III is a table showing an example of processing coefficient sequences grouped into seven groups, generating seven GCLI. The quantization level t is 6. At the encoder, the initial predictor of the first set is considered to be pred _ init ═ 0. The subsequent predictor was considered to be the sequence GCLIi-1Of the preceding groupGCLI is prepared. This prediction mode is applicable to the general case and to the case when the input data set represents an image and the horizontal prediction mode is used. The residual n is calculated according to equation 2. N is to bebpThe bitplanes are copied from the quantized coefficients to a magnitude compressed data set. The sequence and bitplanes of the residual are provided to a decoder.

At the decoder, the initial predictors of the first set are obtained in the same way as at the encoder (predi _ init ═ 0 in the example). Calculating the number of bitplanes n using equation 3bp

nbp=ri+predi' (Eq.3)

The predictors of the latter group are considered as n for the current groupbpWhich corresponds to the GCLI of the quantized coefficients. Can be prepared by reaction at nbpAdding t to n when the value is not nullbpIn value of nbpThe value is kept zero for a null time to obtain the GCLI' of the decompressed data set coefficients. It can be seen that if the GCLI of the input data set is greater than t, then these GCLI' are equal to the GCLI of the input data set; and if GCLI ≦ t, these GCLI's are equal to zero, since in this case all coefficient bit-planes have been removed, resulting in zero coefficients at the decoder.

TABLE III

t=6

Vertical prediction is possible when the input data set corresponds to a sequence of pixels of one or more lines of a display image comprising rows and columns of pixels or a sequence of pixels of one or more lines of sub-bands of a decorrelation transform of a display image comprising rows and columns of pixels. It has been observed that the vertical prediction gives good results.

Table IV shows an example similar to that of table III, but with vertical prediction applied. Line I of the GCLI is processed in view of the previous line I-1. Predictor prediThe determination of (2) is as follows:

IF GCLIi(I-1)≤t THEN predi=0 ELSE predi=GCLIi(I-1)

the residual is calculated according to equation 2.

At the decoder, the set of GCLI' corresponding to the quantized coefficients of the previous row (row I-1) is held in a buffer for processing row I. The predictor pred 'is calculated using the following equation'i

pred’i=GCLI’i(I-1) (Eq. 4)

And the number of bit planes is calculated according to equation 3. GCLI' of the current row equals the number of bit-planes nbp,iAnd stored for use by the next row. For the first row of the data set, the row initialized to the value pred _ init is used.

TABLE IV

t=6

When the input data represents an image and comprises two or more input data sets, and when the last line of the first data set is immediately above the first line of the second data set, the two data sets may be processed independently with the initialization of the predictors of the first line as discussed in the previous paragraph. However, in a preferred embodiment of the invention, the last row of the first data set may be used as a predictor for the first row of the second data set. When the quantization level t of the first data set1Different from the quantization level t of the second data set2Special cases may arise. FIG. 2 shows the quantization level t1The condition of the first data set is quantified. The last line (line I-1) of the first data set includes data having GCLIg1Group 11. The second data set 20 comprises a first row (row I) having the immediately preceding g1Group of (1) GCLIg2

Table V is that the first data set has a quantization level t 110, the second data set has a quantization level t2Example 6.

Unlike the case of table IV, at the encoder, the predictor is determined as follows:

IF GCLIi(I-1)≤t1THEN predi=0ELSE predi=GCLIi(I-1) (Eq. 5)

Wherein, t is used1Instead of t. At the decoder, the predictor comes from prev of the last line of the first data setiAnd (4) elements.

TABLE V

t=6

Figure BDA0002300253680000141

Fig. 3 is a graph representing the residual error as a function of GCLI given by equation 1 without quantization for two values of the prediction factors pred-2 and pred-8. The number of possible values of the residual equals the number of values of GCLI. If the predictor is a good predictor, the residual is close to or equal to zero.

Figure 4 is a graph representing the residual as given by equation 2 as a function of the possible values of GCLI between 0 and 15 (or more generally m) in the case where quantization is performed with a quantization level t equal to 4. For pred-8, the lower bound r of the residualMinimum valueEqual to-4. For pred 2, the lower bound r of the residualMinimum valueEqual to 0. Upper bound rMaximum valueSame as the upper bound of FIG. 3, r Maximum value13. Also shown are graphs for the cases where t is 1 and pred is 8. Lower bound rMinimum valueIs zero and an upper bound rMaximum valueIs 5.

Lower bound r of residual errorMinimum valueAnd an upper bound rMaximum valueIs given by the following equation

rMinimum value=-max(predi-t,0) (equation 6)

And is

rMaximum value=max(m-max(prediT),0) (equation 7)

The range of quantized residual values is reduced relative to the range of values not quantized.

According to the invention, the residual error can be reducedThe value maps to a non-negative integer C. This is shown in fig. 5, 6, 7 and 8. R-0 may be mapped to C-0, then r-1 to C-1, r-1 to C-2, r-2 to C-3, and so onMinimum valueAnd rMaximum valueThe residuals in between map to a range of non-negative integers. This is indicated by the square symbols of fig. 5 to 8. In fig. 5 and 7, a negative value r-1 is first mapped to C-1 (negative first mapping). In fig. 6 and 8, a positive value r ═ 1 is first mapped to C ═ 1 (positive first mapping). Fig. 5 and 6 are graphs showing the case where m is 15, pred is 8, and t is 4. r isMaximum valueA value of greater than rMinimum valueAbsolute value of (a). Possible values of GCLI are in the range of 0 to 15. In this way, the most likely value of r (i.e., r at or near zero) is mapped to the minimum value of C. C can then be efficiently encoded as described below. Fig. 7 and 8 are graphs showing the case where m is 15, pred is 12, and t is 2.

According to a preferred embodiment of the invention, the mapping of the residual to the non-negative integer C may be improved by taking into account: when r isMaximum valueGreater than rMinimum valueIn case of l, r can be replaced byMinimum valueThe above residuals are mapped to consecutive C values (instead of step 2) to reduce the range of C values. This is called the "bounded C (bound C)" method and is indicated by the circular labels in FIGS. 5 and 6. The value of C reaches a maximum value of 11, not a maximum value of 14 for the negative antecedent case (fig. 5) and not a maximum value of 13 for the positive antecedent case (fig. 6). When r isMaximum valueLess than rMinimum valueSimilar results can be obtained when, as indicated by the circle labels in fig. 7 and 8: the value of C reaches a maximum value of 13, not a maximum value 19 for the negative antecedent case (fig. 7) and not a maximum value 20 for the positive antecedent case (fig. 8). Thus, with respect to the value of C without using the "bounded C" method, the maximum value of C is bounded.

In the option "bounded by a minimum", included between the trigger and rMaximum valueThe value of code C of the residual between (if any) is less than the value without the "bounded C" method.

In the option "bounded by maximum valueComprising an on-flip-flop and rMinimum valueThe value of code C of the residual between (if any) is less than the value without the "bounded C" method.

In the option "bounded by min/max", include-flip-flop and rMinimum valueThe value of code C of the residual (if any) between and included in the flip-flop and rMaximum valueThe value of code C of the residual between (if any) is less than the value without the "bounded C" method.

The code C corresponding to the residual range according to the negative or positive first mapping mode may be obtained by performing the following steps of the mapping algorithm:

we first define the following two parameters:

if it is negative first, CFirstly, the methodIf it is positive first, C is ═ 1Firstly, the method=+1

When using the "bounded C" improvement of the present invention, a boundary pattern is selected, which is one of

-bounded by a minimum value;

-bounded by a minimum/maximum;

-bounded by a maximum;

no boundary.

The trigger is determined as follows:

if bounded by the minimum, the flip-flop is | rMinimum value|,

If the minimum/maximum is bounded, then the trigger MIN (| r)Minimum value|,rMaximum value),

If the boundary is the maximum, the flip-flop is rMaximum value

If there is no boundary, the flip-flop is m.

The code C can then be calculated by performing the following steps:

Figure BDA0002300253680000161

the option "negative first" is more interesting because it can ensure that all values below the predictor, including all values that have been removed by quantization, are coded shorter. This is illustrated in fig. 9, where the relative advantage of the "negative first" approach is clearly superior to the "positive first" approach.

The boundary mode "bounded by a minimum/maximum" does not provide a significant advantage over the boundary mode "bounded by a minimum", and therefore, if the method is implemented, does provide for disregarding rMaximum valueThe method can be simplified safely.

Also, the mapping may be obtained from a predetermined look-up table.

The inverse mapping is bijective and therefore its inverse mapping can be performed at the decoder.

Table VI below provides an example of consecutive eight GCLI's from 1 to 8 encoded in m-15 bits for a coefficient group. The quantization level is t-4. For i-1, the initial predictor has been chosen to be int (m/2), i.e. 7. For each subsequent GCLI, the predictor has been determined to be the previous GCLI. For each successive GCLI, a residual r has been calculated according to equation 2iAnd r has been determined according to equations 6 and 7, respectivelyMinimum valueAnd rMaximum value. The value of the trigger has been calculated for each GCLI according to different options. In the last line, code C is already in the option "bounded by the minimum" and is negative first. Each GCLI is processed independently of the other GCLI in the input data set, depending on the predictor predi of the current GCLI.

TABLE VI

Figure BDA0002300253680000171

Figure BDA0002300253680000181

Table VII gives the number of bits required to encode these 8 codes C according to different boundary patterns and mapping patterns.

TABLE VII

Figure BDA0002300253680000182

The bold values correspond to the example shown in table VI. It can be seen that negative first gives better results. The "min/max bounded" boundary mode gives better results, but "min bounded" is also good.

The information prepared at the encoder (i.e. the bitplanes and the code C encoding the residual) is such that the decoder can determine from the received code C and the reconstructed predictors the number n of bitplanes to extract from the magnitude-compressed data set to reconstruct the original quantized data setbp. The trigger for encoding the residual at the encoder is not needed at the decoder and is not transmitted in the metadata compressed data set either.

The decoder receives the C value from a previous step or from pred _ init and has a pred value. From these two values, the decoder can calculate r according to equation 6 and equation 7, respectivelyMinimum valueAnd rMaximum value. With knowledge of the mapping mode and the boundary mode, the decoder computes the triggers. The decoder can then calculate the sum at r according to the above steps of the mapping algorithmMinimum valueAnd rMaximum valueAll r values in between correspond to code C. This will result given at rMinimum valueTo rMaximum valueR values between C and corresponding values of C. Then, the decoder obtains the r value in the table as a value corresponding to C.

In the example of table VIII, the code C-5 has been received, with the prediction factor equal to 7, and the quantization level t-4. Can calculate rMinimum valueAnd rMaximum valueAnd constructed for rMinimum valueAnd rMaximum valueTable of all possible residuals in between. The code C for each of these 11 values of r is calculated and inserted into the table. The table is then searched for the value of the received code C-5 to find the corresponding value r-3 of r. Other equivalent methods for performing the decoding of the code C, such as (binary) searches or formulas in tables.

TABLE VIII

Figure BDA0002300253680000191

Figure BDA0002300253680000201

The code C obtained for the residual in the method of the invention is a non-negative integer. If the predictor is an accurate predictor, the residual will be a very small value. Entropy coding is used to encode C in the metadata. The preferred entropy coding for C is Rice coding. The Rice coding of a non-negative integer N according to the parameter k is as follows:

-divide N by 2kAnd unary coding the resulting quotient;

-binary coding the remainder of the division by k bits.

Exemplary values of N between 0 and 10 and k ═ 0, 1, and 2 are given in the following table:

Figure BDA0002300253680000202

in the case where k is 0, the length of the code is one bit for N is 0. Therefore, when the prediction is accurate, the value k-0 is a preferred value for the inventive method, and the value 0 frequently occurs in the residual to be coded. However, if the accuracy of the prediction is not ideal enough, a large value of N may occur and a large value of k (e.g., k 1 or 2) may be optimal, where a large value of N requires fewer bits. Rice code is a prefix code. Thus, none of the set of possible codes is a prefix of another code in the set of possible codes. No special markers are required between the codes and the decoder can explicitly extract successive codes from the metadata compressed data set.

The quantization steps will be at 0 and 2m2 of coefficient magnitude between-1mThe set of values applies between 0 and 2(m-t)2 between-1m-tA set of values. One simple way to perform this quantization is to removeThe t lowest weight bits of the unquantized coefficients. However, other quantization methods may be used in the present invention.

Fig. 9 shows the results obtained for different images and different embodiments of the invention. For each of the 16 test images, the bar graph shows the PSNR (peak signal-to-noise ratio) for a method that does not use the encoding of the invention, but rather uses unary coding to encode the residual (such as the document SMPTE RDD 35: 2016). Bar graph representation

Use of | r onlyMinimum valueThe case of | boundary and employing negative-first mapping mode (min _ neg1 st);

use of | r onlyMinimum valueThe case of | boundary and employing positive first mapping mode (min _ pos1 st);

use | r simultaneouslyMinimum valueThe sum of | boundary and rMaximum valueThe case of a boundary and adopting a negative-first mapping mode (minmax _ neg1 st);

use | r simultaneouslyMinimum valueThe sum of | boundary and rMaximum valueBoundary and the case of the positive first mapping mode (minmax _ pos1st) is adopted.

·|rMinimum valueThe sum of | boundary and rMaximum valueThe case where the negative-first mapping mode (no _ minmax) is not used and is used for the boundary.

These results show that | r is used simultaneouslyMinimum valueThe sum of | boundary and rMaximum valueBoundary versus using only | rMinimum valueThe i boundary provides very little improvement. In both cases, the use of the negative first-mapping mode is significantly better than the use of the positive first-mapping mode.

The present description addresses the processing of the magnitude of the coefficients. These methods are applicable to unsigned coefficients. These methods are also applicable when the input data comprises signed coefficients. These signed coefficients may be encoded as sign + magnitude or transformed into a sign + magnitude format. The sign bits of the coefficients of a group are grouped into a sign bit plane and the sign bit plane is processed together with the magnitude bit plane. The invention relates to a method for compressing an input data set, wherein coefficients in the input data set are grouped into a plurality of coefficient groups, the number of bit-planes required to represent each group, GCLI, is determined, quantization is applied, a limited number of bit-planes is reserved, a prediction mechanism is applied to the GCLI to obtain a residual, and entropy coding is performed on the residual. The entropy encoded residual and the reserved bitplanes allow the decoder to reconstruct the quantized data with minimal metadata cost.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:双去块滤波阈值

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类