<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Algorithms for Computation of Reversible Integer Transform from Linear Float Transform and Minimization of Rounding Errors ?</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Matrosov Institute for System Dynamics and Control Theory of Siberian Branch of Russian Academy of Sciences</institution>
          ,
          <addr-line>134 Lermontov st. Irkutsk</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Various compression algorithms use linear transforms to represent data vectors in dierent coordinate systems, where they can be compressed better. The matrices usually have oat coecients, and the data vectors are integer, so some rounding is required. And to make the compression lossless it is required to make these transforms reversible, i.e. to be able to exactly restore the original vectors from the results of their transform. In this article we'll consider a straightforward algorithm for nding the decomposition of linear transform matrix and the approaches for estimation of the mean square approximation error and for nding the optimal decomposition, which minimizes the error.</p>
      </abstract>
      <kwd-group>
        <kwd>Lossless coding Data compression Invertible integer transform Error estimation Mean square error</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>When developing data formats for storing large volumes of multichannel data
it is worth to take into account the correlation between the channels to avoid
storing almost the same data again and achieve a better compression ratio. To
measure the correlation and decorrelate the data we can use such methods as
Karhunen-Loeve Transform (KLT) [1] to transfer the original values to a better
coordinate system, where most part of coordinates would represent dierences
between some original channels, which are generally small. In this article we’ll
consider only integer input data. Because it is improbable, that the matrix of
KLT transform would have all integer coecients, the result of the transform
will be represented by real values. But it is highly ineective to immediately use
? work supported by RAS (projects: -17-117032210079-1,
-19119111990037-0), RFBR (projects:18-07-00758-, 17-57-44006-ª-) and the
project "Fundamentals, methods and technologies of digital monitoring and
forecasting of the ecological situation in the Baikal natural territory" (2020-1902-01-071).
The results were obtained using the core facilities center "Integrated Information</p>
    </sec>
    <sec id="sec-2">
      <title>Network of the Irkutsk Scientic and Educational Complex".</title>
      <p>the oating point values to represent the real results of the transform, because
the larger memory consumption of the oating point values would outweigh any
advantages of the decorrelation.</p>
      <p>So it is required to represent somehow the results of the transform by integer
values to take advantage from the decorrelation. And it is not enough to just
round the transform results, because it would cause information loss and may
not allow to restore the original input values from the stored rounded values.
Thus, we need to approximate the real-valued linear transform by some integer
transform, that will be very close to the real-valued transform and will be
reversible. I.e. it should be possible to restore the original values from the results
of the integer approximation of the transform.</p>
      <p>The problem of building reversible integer approximation of linear transform
was thoroughly considered in the works of Hao and Shi [25]. The main idea
of their approach is to represent the linear transform matrix A by a product
of elementary reversible matrices (ERM), e.g. triangular matrices with diagonal
elements of absolute value 1. The process of computation of the product of a
vector by ERM with rounding resulting vector coordinates can be organized so,
that it can be reversed. We’ll consider the idea in more details in the next section.</p>
      <p>The article [4] is the most close to our work: here the authors prove, that
matrix A with jdetAj = 1 of size n n can be decomposed into the product of
permutation matrix and at most n + 1 single-row elementary reversible
matrices (SERM). The algorithm of SERM decomposition by Hao and Shi is based
upon high-level matrix operations. They also develop some error estimation
approach, which is based upon the innity norm k k1, i.e. they estimate and try
to minimize the maximum error of vector coordinate.</p>
      <p>In this article we’ll consider a straightforward algorithm for nding the SERM
decomposition of the transform matrix and the approaches for estimation of the
mean square approximation error and for nding the optimal decomposition,
which minimizes the error.
2</p>
      <sec id="sec-2-1">
        <title>Reversible Integer Transforms</title>
        <p>When developing some lossless data compression format, which performs a
transform of integer vectors, say, the RGB color components, it is required to make
the transform reversible. So, the developers of the formats use some reversible
discrete approximations of the continuous transforms.
2.1</p>
        <sec id="sec-2-1-1">
          <title>The Jpeg 2000 color transform An example of simple reversible color transform is used in the JPEG 2000 le format. The JPEG 2000 uses the following "Reversible multiple component transformation" (RCT forward transform of the RGB color space):</title>
          <p>Yr = b(R + 2G + B)=4c; Ur = R</p>
          <p>G; Vr = B</p>
          <p>G
which has the following reverse transform ("Inverse RCT"):
G = Yr</p>
          <p>b(Ur + Vr )=4c; R = Ur + G; B = Yr + G</p>
          <p>This transform is rather rough approximation of the exact transform of the
color space RGB to the color space YCrCb, which is dened by the CCIR 601
standard:
After analyzing correlation between color components of particular Earth remote
sensing images We have suggested the following new reversible integer transform
of the color components, which allows to obtain better compression ratio for this
kind of images:</p>
          <p>Cr 1 = b(R + G + B)=3c; Cr 2 = b(R + B
2G)=2c; Cr 3 = B</p>
          <p>
            R
(
            <xref ref-type="bibr" rid="ref1">1</xref>
            )
which has the following reverse transform:
          </p>
          <p>C = 2Cr 2 + Cr 3 mod 2; G = Cr 1</p>
          <p>bC=3c;</p>
          <p>
            R = G + (C Cr 3)=2; B = G + (C + Cr 3)=2 (
            <xref ref-type="bibr" rid="ref2">2</xref>
            )
Let’s prove, that the transform (
            <xref ref-type="bibr" rid="ref2">2</xref>
            ) is indeed the inverse of the transform (
            <xref ref-type="bibr" rid="ref1">1</xref>
            ).
Theorem 1. The color space transform for remote sensing images (
            <xref ref-type="bibr" rid="ref1">1</xref>
            ) is
reversible, and its inverse is the transform (
            <xref ref-type="bibr" rid="ref2">2</xref>
            ).
          </p>
          <p>Proof. Here we consider the operation b c as rounding down and the values like
X mod D are always positive. For example 7 mod 5 = 2 + 5 = 3. So
bX=Dc = (X</p>
          <p>X mod D)=D
C = 2Cr 2 + Cr 3 mod 2 = 2b(R + B
= (R + B
(R + B) mod 2)
2G)=2c + (B
2G + (B + R</p>
          <p>R) mod 2
2R) mod 2
= R + B
2G
bC=3c = b(R + G + B)=3c b(R + B
= b(R + G + B)=3c
2G)=3c
b(R + B + G)=3</p>
          <p>Gc = G</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Thus</title>
        </sec>
        <sec id="sec-2-1-3">
          <title>Hence</title>
          <p>Cr 1
=
=
G + (C</p>
          <p>Cr 3)=2</p>
          <p>G + (R + B
2G
(B</p>
          <p>R))=2
G + (C + Cr 3)=2</p>
          <p>G + (R + B
2G + (B</p>
          <p>R))=2
=
=</p>
          <p>R
B
tu</p>
          <p>In fact, development of this kind of reversible transforms is more like a
mathematical trick and it is impossible to generalize this kind of results to integer
approximations of arbitrary continuous transforms.
2.3</p>
        </sec>
        <sec id="sec-2-1-4">
          <title>The Main Idea of the General Approach to Construction of</title>
        </sec>
        <sec id="sec-2-1-5">
          <title>Reversible Integer Approximations</title>
          <p>To perform a reversible turn of a raster image by an angle a it is widely known
the lifting scheme:
cos
sin</p>
          <p>sin
cos
=</p>
          <p>1
1 cos
sin
where ki 2 Z, ki 6= 0 and y0 is an auxiliary intermediate value, which will not
be included into the resulting vector y. Usually the coecients ki 2 f 1; 1g,
because larger absolute values will extend the range of yi, and it would make
ineective the following compression steps.</p>
          <p>
            Therefore we can dene reversible integer approximation of the transform
y0 = F 0(x), where the vectors x and y0 have all integer components:
y00 = k0xn + [f0(x1; :::; xn 1)]
y10 = k1x1 + [f1(y00; x2; :::; xn 1)]
yi0 = kixi + fi(y00; :::; yi0 1; xi+1; :::; xn 1)
yn0 = kny0 + fn(y10; :::; yn0 1)
(
            <xref ref-type="bibr" rid="ref3">3</xref>
            )
here [ ] denotes some rounding operation, like round ,ceil , oor .
          </p>
          <p>
            Then we’ll be able to reverse this transform by expressing from the equations
y0 and xi and rewriting the steps in backward order:
(
            <xref ref-type="bibr" rid="ref4">4</xref>
            )
y0 = yn0=kn
xi = yi0=ki
x1 = y10=k1
xn = y00=k0
fn(y10; :::; yn0 1)
fi(y00; :::; yi0 1; xi+1; :::; xn 1)
[f1(y00; x2; :::; xn 1)]
[f0(x1; :::; xn 1)]
The inversion is possible here, because fi depends on the values available both
on the forward and on the backward passes and doesn’t depend on xi and y0.
i
The complexity of the functions fi is not limited here, but hereinafter we will
consider linear transforms only.
          </p>
          <p>When abs(ki) &gt; 1 the integer transform becomes not perfectly reversible,
because for some values of yi0 it will produce non-integer xi, but this fact makes
no problem for our purposes of being able to restore the values represented by
the results of the forward transform.</p>
          <p>The error of approximation dy = y0 y results from the combination of the
rounding error of fi and the errors induced by replacement of yi by yi0 in the
arguments of fi.
3</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>Decomposition of Linear Transform into Single</title>
      </sec>
      <sec id="sec-2-3">
        <title>Coordinate Shift Matrices</title>
        <p>The authors of [4] introduce the concepts of elementary reversible matrices
(ERM), which can be computed in the reversible manner. They consider
triangular elementary reversible matrices (TERM) and single-row elementary reversible
matrices (ERM).</p>
        <p>The SERM is dierent from identity matrix I in the non-diagonal cells of a
single row, it can be considered as a linear shift along the corresponding to the
row coordinate. They prove that the matrix A of the size n n with det A = 1
can be factorized into the product of a row permutation matrix P and n + 1
SERM matrices. The proof uses TERM factorization as an intermediate step
and it is hard to use the proof as a guide for implementation of the SERM
factorization algorithm. That’s why we are going to give in this section our own
proof of an analogous theorem, which is straightforward and can be easily used
for implementation.
3.1</p>
        <p>Straightforward Constructive Proof of the Possibility of Matrix</p>
        <sec id="sec-2-3-1">
          <title>Factorization into the Shift Matrices</title>
          <p>Let us show constructively that for a matrix of the size n n with the absolute
value of determinant 1 one can construct a factorization into n + 1 matrices
B(i) of shifts along the axes of the coordinate system with unit elements on the
diagonal and a single non-zero row:</p>
          <p>
            M = PLAPR = B(n) ::: B(
            <xref ref-type="bibr" rid="ref1">1</xref>
            )
          </p>
          <p>
            2 1
(
            <xref ref-type="bibr" rid="ref6">6</xref>
            )
here k = det PLAPR = det M = 1.
          </p>
          <p>
            Of the rows of the shift matrix B(i) only the i-th row (and the n-th for
the matrix B(0)) is dierent from the corresponding row of the identity matrix
I. So, when using this kind of decomposition each step changes a single vector
coordinate. Total the transform performs n+1 coordinate change, and it requires
n + 1 rounding operation to implement integer approximation of the transform.
The inversion of the integer approximation is performed the same way, as it was
considered before for the more general case in (
            <xref ref-type="bibr" rid="ref4">4</xref>
            ).
          </p>
          <p>
            Theorem 2. To each result of permutations of rows and columns M = PLAPR
may correspond a particular factorization into n + 1 shift by coordinate matrices.
Proof. Let’s show how can we nd the single coordinate shift decomposition of
the matrix M . Consider the transform y = M x. Note, that the space of matrices
M is n2 1 - dimensional (because the matrix belongs to the subspace of the n2
- dimensional space of coecients, which is dened by the equation det M = 1
or det M = 1). The space of bij is also of the size (n + 1)(n 1) = n2 1
(where n + 1 is the number of equations (matrices) and n 1 is the number of
coecients to be found in the equations). So the dimensions of both spaces are
equal for any n. Because det B(i) = 1 for i &gt; 0 and det B(0) = k = det M , we
have det M = det B(n) ::: B(
            <xref ref-type="bibr" rid="ref1">1</xref>
            ) B(0).
          </p>
        </sec>
        <sec id="sec-2-3-2">
          <title>Let’s denote</title>
          <p>v =
n 1
X b0j xj + kxn
j=1
the n-th coordinate of R(0)x.</p>
        </sec>
        <sec id="sec-2-3-3">
          <title>Next we’ll compute the coordinates of the resulting vector y.</title>
          <p>
            n 1 n 1
y1 = x1 + X b1j xj + b1nv = (1 + b1nb01) x1 + X (b1j + b1nb0j ) xj + b1nkxn (
            <xref ref-type="bibr" rid="ref5">5</xref>
            )
j=2 j=2
          </p>
        </sec>
        <sec id="sec-2-3-4">
          <title>On the other hand</title>
          <p>n
yi = X
j=1
mij xj</p>
        </sec>
        <sec id="sec-2-3-5">
          <title>By comparing the coecients at</title>
          <p>
            xj in the expressions for y1 (
            <xref ref-type="bibr" rid="ref5">5</xref>
            ) and (
            <xref ref-type="bibr" rid="ref6">6</xref>
            ) we have:
b1nk = m1n, 1 + b1nb01 = m11, b1j + b1nb0j = m1j for 2
j &lt; n
From the rst equation we can nd b1n, then from the second we can nd b01,
as a result the other equations become linear in the yet unknown values of b0j .
          </p>
        </sec>
        <sec id="sec-2-3-6">
          <title>Next we’ll consider the i-th step:</title>
          <p>yi =
i 1
X bij yj + xi +
j=1
n 1
X bij xj + binv
j=i+1
i 1 n
= X bij X mjlxl + kxn + xi + bin @
j=0 l=1
0n 1 1</p>
          <p>
            X b0j xj + kxnA
j=1
(7)
M (
            <xref ref-type="bibr" rid="ref6">6</xref>
            ).
          </p>
        </sec>
        <sec id="sec-2-3-7">
          <title>Here we use the values of yj represented by the coecients of the matrix</title>
        </sec>
        <sec id="sec-2-3-8">
          <title>By grouping the members with xj we get:</title>
          <p>i 1 i 1
yi = P P bilmlj + binb0j
j=1 l=1
xj +
i 1
P bilmli + binb0i + 1 xi
l=1
n 1
+ X
i 1</p>
          <p>X bilmlj + binb0j + bij
j=i+1 l=1
!
xj +
i 1
X bilmln + bin
l=1
!
xn
(8)</p>
          <p>Let us suppose that as a result of analysis of the expressions for yj for j &lt; i
we will know the values of b0j for j &lt; i, then using the rst and the last members
of the expression for yi (8) we will have the system of i linear equations:
8i 1
&gt; P bilmlj + binb0j = mij
&gt;
&lt;l=1</p>
          <p>i 1
&gt;&gt; P bilmln + bin = min
:l=1
for 1
j &lt; i
for i unknown variables: bil for 1 l &lt; i and bin.</p>
          <p>After solving the system using the second term in the expression for yi (8)
we obtain:
i 1
X bilmli + binb0i + 1 = mii
l=1
i 1
Hence b0i = mii P bilmli 1 =bin.</p>
          <p>l=1</p>
          <p>Thus we have extended to the step i the inductive hypothesis that it is
possible to nd b0j for j &lt; i using the analysis of the expressions for yj for j &lt; i.
Note, that the induction base is also valid, because using the analysis of the
expression for y1 we have already computed the value of b01.</p>
        </sec>
        <sec id="sec-2-3-9">
          <title>From the third term in the expression for yi (8) we have:</title>
          <p>i 1
X bilmlj + binb0j + bij = mij for i + 1
l=1
j &lt; n
(9)
1</p>
          <p>After substitution to the equations (9) of the already computed values bil for
l &lt; i and bin we can nd the unknown variables bij :
i 1
X bilmlj
l=1
bij = mij
binb0j for i + 1
j &lt; n
(10)</p>
          <p>And after computation of b0i in (9) we can exchange i and j and also nd
still unknown values:
j 1
X bjlmli
l=1
bji = mji
bjnb0i for 1
j &lt; i</p>
        </sec>
        <sec id="sec-2-3-10">
          <title>Finally, on the n-th step we have:</title>
          <p>Similarly to the already considered general case, we can group the tems with xj
to obtain:
As a result we have the following system of n linear equations:
8n 1
&gt; P bnlmlj + b0j = mnj
&gt;
&lt; l=1</p>
          <p>n 1
&gt;&gt; P bnlmln + k = mnn
: l=1
for 1
j &lt; n
for n 1 unknown variable bnl , 1 l &lt; n. I.e. one of the equations (14) will be
redundant. The reason for the redundancy is that the condition det M = 1 = k
is automatically satised due to the structure of the matrices involved in the
decomposition.</p>
          <p>Since the redundancy can consist in the fact that all the coecients in the
equation with unknowns bnl, will be equal to 0 or that one of the equations will
be expressed through others, we should solve the set of equations (14) by the
version of Gauss algorithm for overdetermined sets of equations.</p>
          <p>Some of the computations involved in the proof include division by values,
which may be zero for some M . And solving of the systems of linear equations
here may also fail. That‘s why we say " may correspond " in the theorem
statement. But, once we have found a solution by the algorithm, we can be sure, that
it is the only solution of the problem of nding decomposition for the matrix
M .
(11)
(12)
(13)
(14)</p>
          <p>Later on we will consider the process of nding the optimal decomposition
of the matrix A by looking through all the combinations of row and column
permutations PL and PR. So, when the process of nding the decomposition
for a particular matrix M will fail, it will be just required to consider another
version of M .
4</p>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>Finding the Best Computation Order</title>
        <p>Let‘s recall, that M = PLAPR, i.e. it is a result of permutation of rows and
columns of the matrix A. Thus, it is required to nd the best order of
computation of the coecients bij . We will minimize the mean square deviation of the
results of the integer approximation from the results of the original continuous
transformation. For the small dimensions n we can aord to use the exhaustive
search of all the (n!)2 variants of permutations. The exhaustive search will
simply skip the variants, which cause division by zero during computation of the
matrix M decomposition.</p>
        <p>To select the best of the variants we should be able to estimate and compare
the errors, caused by the variants of approximations. Let us consider a method for
estimating the mean square dierence of the results of the integer approximation
of the transform from the results of the original continuous transform.
4.1</p>
        <sec id="sec-2-4-1">
          <title>Mean Square Error of the Rounding Operation for Linear</title>
        </sec>
        <sec id="sec-2-4-2">
          <title>Expressions with Real Coecients</title>
        </sec>
        <sec id="sec-2-4-3">
          <title>Let’s denote by v0 the integer version of v. Hereinafter, the expression [x] denotes the operation of rounding x, and</title>
          <p>fxg = [x]
x
denotes the dierence between the result of rounding and the original value.</p>
          <p>When rounding a linear expression on integer variables with rational
coefcients the size of the set of possible results of rounding depends on the least
common multiple (LCM) of the denominators of the coecients. Subsequently
we’ll call real rational coecients with large denominators. And the term rational
will be used for the rational coecients with small denominators.</p>
          <p>Assuming that rounding of an expression x having some real coecients is
performed to the nearest integer for large ranges of x, we can consider the value
fxg as a random variable, uniformly distributed over the interval [ 0:5; 0:5).</p>
        </sec>
        <sec id="sec-2-4-4">
          <title>Then</title>
          <p>fxg2 =</p>
          <p>Z 0:5
0:5
x2dx =</p>
          <p>When we deal with the matrices A produced from some real-world data, say,
as a result of Karhunen-Loeve Transform (KLT), the estimate (16) will always
be in eect, because it is highly improbable to get rational elements here.
(15)
(16)</p>
        </sec>
        <sec id="sec-2-4-5">
          <title>Estimation of integer approximation errors When some expression uses several rounded values, we can consider the rounding errors of the values as independent random variables when the rounded values dier from each other.</title>
          <p>Once U and V - are independent random variables, and W = aU + bV , then</p>
          <p>W 2 = (aU + bV )2 = a2U 2 + b2V 2
But if U = V then the rounding error will be higher:</p>
          <p>W 2 = (aV + bV )2 = (a + b)2 V 2</p>
          <p>Thus, to calculate the mean square rounding errors of linear expressions it
is required to sum the squares of the coecients at the sub-expression errors
multiplied by i2.</p>
          <p>Let’s denote
i
(17)
(18)
(19)
(20)
i 1 n 1
yi = xi + X bijyj + X bijxj + binv =
j=1
j=i+1</p>
          <p>i 1 n 1
xi + X bijyj0 + X bijxj + binv0
j=1 j=i+1
i 1
X bijdyj
j=1
bindv
dyi = yi0
Let’s call</p>
          <p>8i 1 n 1 9 i 1
yi = &lt;X bijyj0 + X bijxj + binv0= + X bijdyj + bindv
:j=1 j=i+1 ; j=1</p>
          <p>8i 1 n 1
i = &lt;X bijyj0 + X bijxj + binv0
:j=1 j=i+1
9
=
;</p>
          <p>From (18) we can see that dyi depends on dyj for j from 0 to i 1, and also
on i and 0 . We can substitute into (18) for dyj the corresponding expressions
(18) to nally get:
i 1
dyi = i + X Dij j
j=0</p>
        </sec>
        <sec id="sec-2-4-6">
          <title>Here Dij are the coecients to be found.</title>
        </sec>
        <sec id="sec-2-4-7">
          <title>Let’s nd the coecients</title>
          <p>dyj from (20)
dyi = i +
i 1
X bij
j=1
j 1
j + X</p>
          <p>l=0</p>
          <p>X bij Dj0 + binA 0 +
j=1</p>
        </sec>
        <sec id="sec-2-4-8">
          <title>Dij by substituting into (18) the expressions for</title>
          <p>0i 1
0i 1
1
1</p>
          <p>X bij Dj0 + binA 0 + bi;i 1 i 1 +
j=1</p>
        </sec>
        <sec id="sec-2-4-9">
          <title>As a result we have:</title>
          <p>i 1 i 2
X bij j + X
j=1 l=1
l
i 1
X bij Djl
j=l+1
i 2 i 2
X bij j + X
j=1 j=1
j
i 1
X bilDlj
l=j+1</p>
          <p>X bij Dj0 + binA 0 + bi;i 1 i 1 + X
j=1 j=1
i 2 0</p>
          <p>1
i 1
X bilDlj A j (21)
l=j+1
The formula (21) describes the process of computation of Dij using the values
already computed for j from 0 to i 1.</p>
        </sec>
        <sec id="sec-2-4-10">
          <title>It is also required to consider separately the initial value of i:</title>
          <p>dy1 = 1 + b1n 0</p>
          <p>When computing the average square of the expressions (21) we will assume
that i2 = 112 because we suppose here, that the coecients bij are real.
5</p>
        </sec>
      </sec>
      <sec id="sec-2-5">
        <title>Tests</title>
        <p>Let‘s consider the results of the algorithm usage for random rotation matrices.
Table 1 shows some values, computed by the algorithms for a 3 3 matrix. The
columns of the table correspond to the vector components. The rows of the table
are:</p>
        <p>NErr - the number of dierences of the coordinates of source vectors from the
coordinates of the results of the forward transformation of the vectors by the
obtained reversible integer approximation and back by its inverse detected
in the loop over an area in the space of the vectors;
sqD - root mean square error of the results of continuous transform from the
results of its reversible integer approximation computed in the loop over the
area in the space of the vectors;
sqDNet - root mean square of deviation of the coordinates of the results of
continuous transform from their rounded values (it allows us to estimate the
lower bound for sqD);
DCalc - root mean square error of the results of continuous transform from
the results of its reversible integer approximation estimated by our algorithm;
Top# - the permutation of columns, which gives the minimum of DCalc;
Left# - the permutation of columns, which gives the minimum of DCalc;</p>
        <sec id="sec-2-5-1">
          <title>A - the transform matrix;</title>
        </sec>
        <sec id="sec-2-5-2">
          <title>3 from Table 1 we have the root mean square error</title>
          <p>Error = 0:650244800045056
and the following reversible integer approximation
v = x2 + [0:578125087465738 x3
0:53671762651506 x1]
y1 = x3 + [ 0:397744145953282 x1
0:862892315808962 v]
y2 = x1 + [0:419964254965846 y1 + 0:797925922936165 v]
y3 = v + [0:608264013914563 y1
0:502304008291562 y2]</p>
        </sec>
        <sec id="sec-2-5-3">
          <title>For the matrix 5</title>
        </sec>
        <sec id="sec-2-5-4">
          <title>5 from Table 2 we have the root mean square error</title>
          <p>Error = 0:768078871487727
and the following reversible integer approximation
v = x4 + [0:2739172 x3
0:8386267 x2
0:00005832195 x1 + 0:1419508 x5]
y4 = x3 + [ 0:5215370 x2
0:006188384 x1
0:04225347 x5
0:3529485 v]
y1 = x2 + [0:1916207 y4</p>
          <p>0:002794371 x1 + 0:28758131 x5 + 0:8573734 v]
y5 = x1 + [0:006326542 y4 + 0:01397231 y1
0:005955142 x5
0:01004929 v]
y3 = x5 + [0:05669100 y4</p>
          <p>0:774736 y1 + 0:006511915 y5 + 0:5056881 v]
y2 = v + [ 0:07052526 y4
1 2 3 4 5 6 7
NErr 0 0 0 0 0 0 0
sqD 0.3846963 0.3202919 0.3138482 0.3830634 0.394112 0.312817 0.4199523
sqDNet 0.2886750 0.2886750 0.2886689 0.2886647 0.2886753 0.2884511 0.2886757
DCalc 0.3846966 0.3202547 0.3138602 0.3830685 0.3941317 0.31305 0.5059632
Top# 7 3 5 4 2 6 1
Left# 7 6 4 3 2 1 5
M1 0.1839351 -0.3193916 0.1334853 0.113963 -0.2213811 -0.09188760 0.8808507
M2 -0.3417553 0.6397698 -0.1804105 -0.1702700 0.3857258 0.2043536 0.4709703
M3 -0.02518445 0.4264799 0.8528390 -0.08033195 -0.2374124 -0.1614647 -0.03546056
M4 -0.8741814 -0.439128 0.2010590 -0.01850904 0.04347172 -0.01722685 0.004371392
M5 0.2798122 -0.3364512 0.3273608 -0.566333 0.5675667 0.241562 0.01108168
M6 -0.02110229 -0.0127339 0.04954787 -0.03171776 -0.4384360 0.8962660 -0.02031064
M7 -0.07618058 0.02455606 -0.26880 -0.793401 -0.4791590 -0.2485626 0.02184048</p>
        </sec>
        <sec id="sec-2-5-5">
          <title>For the matrix 7</title>
        </sec>
        <sec id="sec-2-5-6">
          <title>7 from Table 3 we have the root mean square error</title>
          <p>and the following reversible integer approximation</p>
          <p>The examples considered demonstrate, that the root mean square error grows
steadily with the increase of the matrix size. The largest error we usually have
for the vector component, which is computed last. And even for the matrix 7 7
it was slightly over 0:5, which is quite acceptable for most use cases.
6</p>
        </sec>
      </sec>
      <sec id="sec-2-6">
        <title>Conclusion</title>
        <p>In contrast to the previous works on the reversible integer transforms we give a
straightforward proof of the possibility to construct a reversible integer
approximation of a linear transform, represented by matrix with unit determinant.</p>
        <p>We have developed a method to estimate the mean square of rounding errors
for the transform matrices with real coecients and using the estimates we
perform a brute-force search of the best computation order, which minimizes
the error estimation.</p>
        <p>For the matrices of rational coecients with small denominators it is still
required to rectify the error estimates, but a thorough examination of the
related questions would substantially increase the size of this article beyond the
prescribed limits.</p>
        <p>The algorithms suggested in the article are detailed enough to be easily
implemented in software. And the tests performed show, that they allow us to
compute high quality reversible approximations of linear transforms.</p>
        <p>We have a successful experience of using the reversible integer transforms
in conjunction with a specialized compression algorithm [6] for compression of
multichannel images.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Dony</surname>
          </string-name>
          , R. D.:
          <string-name>
            <surname>Karhunen-Leove Transform</surname>
          </string-name>
          .
          <source>In: The Transform and Data</source>
          Compression Handbook Ed.
          <string-name>
            <given-names>K. R.</given-names>
            <surname>Rao</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.C.</given-names>
            <surname>Yip</surname>
          </string-name>
          . Boca Raton, CRC Press LLC,
          <year>2001</year>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Pengwei</given-names>
            <surname>Hao</surname>
          </string-name>
          and
          <string-name>
            <given-names>Qingyun</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <article-title>Invertible Linear Transforms Implemented by Integer Mapping (Published in Chinese</article-title>
          , Science in China, Series E,
          <year>April 2000</year>
          , V30,
          <fpage>N2</fpage>
          ,
          <fpage>pp132</fpage>
          -
          <lpage>141</lpage>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Pengwei</given-names>
            <surname>Hao</surname>
          </string-name>
          and
          <string-name>
            <given-names>Qingyun</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <article-title>"Comparative Study of Color Transforms for Image Coding and Derivation of Integer Reversible Color Transform"</article-title>
          ,
          <source>15th International Conference on Pattern Recognition (ICPR)</source>
          ,
          <year>2000</year>
          , Vol.
          <volume>3</volume>
          , pp.
          <fpage>224</fpage>
          -
          <lpage>227</lpage>
          , Sept 3-
          <issue>8</issue>
          ,
          <year>2000</year>
          , Barcelona, Spain.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Pengwei</given-names>
            <surname>Hao</surname>
          </string-name>
          and
          <string-name>
            <given-names>Qingyun</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <article-title>"Matrix factorizations for reversible integer mapping,"</article-title>
          <source>in IEEE Transactions on Signal Processing</source>
          , vol.
          <volume>49</volume>
          , no.
          <issue>10</issue>
          , pp.
          <fpage>2314</fpage>
          -
          <lpage>2324</lpage>
          , Oct.
          <year>2001</year>
          , doi: 10.1109/78.950787.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>P.</given-names>
            <surname>Hao</surname>
          </string-name>
          and
          <string-name>
            <given-names>Q.</given-names>
            <surname>Shi</surname>
          </string-name>
          ,
          <article-title>"Reversible integer KLT for progressive-to-lossless compression of multiple component images,"</article-title>
          <source>Proceedings 2003 International Conference on Image Processing (Cat. No.03CH37429)</source>
          , Barcelona, Spain,
          <year>2003</year>
          , pp.
          <fpage>I</fpage>
          -
          <volume>633</volume>
          , doi: 10.1109/ICIP.
          <year>2003</year>
          .
          <volume>1247041</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Hmelnov</surname>
            ,
            <given-names>A.E.</given-names>
          </string-name>
          <article-title>A lossless compression algorithm for integer dierences sequences by optimization of their division into intervals of constant bit depth values // Computational technologies</article-title>
          .
          <year>2015</year>
          . V.
          <volume>20</volume>
          . 3. P.
          <volume>75</volume>
          -
          <fpage>98</fpage>
          (in Russian)
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>