You are on page 1of 8

Digital Signal Processing 16 (2006) 817–824

www.elsevier.com/locate/dsp

Reduced memory listless speck image compression


Mrityunjaya V. Latte a,∗ , Narasimha H. Ayachit a , D.K. Deshpande b
a Department of Electronics and Communication Engineering, Sri Dharmasthala Manjunatheshwara College of Engineering and Technology,
Dharwad, India
b Department of Microelectronics, Karnatak University, Dharwad, Karnataka, India

Available online 23 June 2006

Abstract
In this paper a variant of the set partitioned embedded block coder (SPECK) image compression called listless SPECK (LSK)
is presented. LSK operates without lists and is suitable for a fast, simple hardware implementation. LSK has a fixed predetermined
memory requirement about 50% larger than needed for the independent image. Instead of lists, a state table with two bits per
coefficient is used to keep track of the block coding and the information that has been encoded. LSK sparsely marks selected
block nodes of insignificant blocks in the state table, in such a way that large groups of predictably insignificant pixels are easily
identified and skipped during the coding process. The image data is stored as a one-dimensional recursive zigzag array for com-
putational efficiency and algorithmic simplicity. Performance of the proposed algorithm on standard test images is nearly same as
SPECK.
© 2006 Elsevier Inc. All rights reserved.

Keywords: Embedded zerotree wavelet (EZW); Set partitioning in hierarchical trees (SPIHT); Set partitioned embedded block coder (SPECK)

1. Introduction

The embedded zerotree wavelet (EZW) [1], set partitioning in hierarchical trees (SPIHT) [2] and set partitioned
embedded block coder (SPECK) [3] are fast and efficient techniques for image compression. First two are spatial tree-
based and the latter is a block-based scheme, exploiting magnitude correlation across bands of decomposition. Each
generates a fidelity progressive bit-stream by encoding each bit-plane of quantized dyadic subband decomposition.
They use significance tests on sets/blocks of coefficients combined with set/block partitioning, to isolate and encode
high magnitude coefficients efficiently.
An important difference between these above-mentioned coders is, in their set partitioning rules. SPIHT has an
additional partitioning step, in which a descendent (type A) set is split into four individual child sets and a grand
descendent (type B) set, where as SPECK uses a recursive block splitting method, to isolate significant coefficients.
EZW explicitly performs a breadth first search of the hierarchical trees, moving from the coarse to fine bands.
Though it is not explicit, SPIHT and SPECK perform a roughly breadth first search as well. Breadth first, as op-

* Corresponding author.
E-mail address: mvlatte@rediffmail.com (M.V. Latte).

1051-2004/$ – see front matter © 2006 Elsevier Inc. All rights reserved.
doi:10.1016/j.dsp.2006.06.001
818 M.V. Latte et al. / Digital Signal Processing 16 (2006) 817–824

posed to depth first scanning, improves the performance since the coefficients more likely to be significant are tested
first.
It is more complex to implement a zerotree codec that does a breadth first search for significant coefficients. The
codec needs to determine whether each node of the tree encountered during the search, must be tested and coded or
can be skipped because, it is a member of an insignificant set.
SPIHT and SPECK use list structures to keep track of which sets/blocks need to be tested. However, the use of
lists in these codecs causes a variable, data dependent memory requirement and the need for memory management,
as the list nodes are added, removed or moved. At high rates, there can be as many list nodes as coefficients. This
may be undesirable in hardware implementations. A variant of SPIHT image compression called no list SPIHT (NLS)
was presented [4] which uses a state table with four bits per coefficient is to keep track of the set partitions. LSK is
motivated by NLS and most of the literature in this paper can be found in [4].
We have developed a new image coder called listless SPECK (LSK) that uses the block splitting rules of SPECK
and does an explicit breadth first search, without using lists as is being done and reported in earlier works of Pearlman
et al. [5]. State information is kept in a fixed size array that corresponds to the array of coefficient values, with two
bits per coefficient to enable fast scanning of the bit planes.
LSK uses special markers as used by NLS, which are updated, when block splitting forms new significant blocks.
With these sparse marking schemes, large sections of the image are skipped at once, as breadth first scan moves
through the blocks in lower level.
Lin and Burgess [6,7] have developed listless zerotree codec for image and video, which use fixed size state tables.
However, in some passes, their codecs perform a depth first search of the trees.
In LSK, efficient skipping of blocks of insignificant coefficients is accomplished using a recursive zigzag image-
indexing scheme. Instead of indexing the array coefficients using two indices, we arrange two-dimensional array
to a one-dimensional array. This particular format offers computational and organizational advantages. The results
obtained in the present work are compared with the results available in the earlier work [5].

2. Wavelet transforms by lifting

Traditionally, a nonredundant wavelet transform has been implemented as an iterative filter banks with downsam-
pling operations [8]. This is commonly known as Mallat’s fast wavelet transform (FWT), which is derived from the
multiresolution nature of the wavelet approximation spaces as illustrated in Fig. 1 [8]. To decompose a signal (analy-
sis), the low and high-pass filters h̄(n) and ḡ(n), respectively, are used in the filter bank. The dual of these filters
h(n) and g(n), are used for reconstructing the signal (synthesis). In the context of image compression, the set of
filters {h̄, ḡ, h, g} is usually chosen to form a bi-orthogonal set which satisfies the perfect reconstruction property.
A practical implementation of the FWT separates the data and filters into polyphase components [8]. The polyphase
representation essentially allows us to move the downsampling operation forward to before the filter bank.
Consider the sequence x(n) = [. . . , x(0), x(1), x(2), . . .], and its polyphase representation in z-domain is given by
X0 (z) and X1 (z),
X(z) = X0 (z2 ) + z−1 X1 (z2 ),
where x0 (n) = [. . . , x(0), x(2), . . .] and x1 (n) = [x(−1), x(1), . . .]. The output of the filter down-sample operation
are the polyphase signals v0 (n) and v1 (n), which corresponds to the coarse and detail coefficients, respectively. In
polyphase notations these signals are obtained as follows:

Fig. 1. Analysis filter bank.


M.V. Latte et al. / Digital Signal Processing 16 (2006) 817–824 819

   
V0 (z) T −1 X0 (z)
= H̄p (z ) ,
V1 (z) X1 (z)
where
 
h̄0 (z) h̄1 (z)
H̄p (z) = .
ḡ0 (z) ḡ1 (z)
The lifting scheme for constructing bi-orthogonal wavelets has been well studied [9,10]. The idea behind the lifting
scheme is based on the following observation. A bi-orthogonal polyphase matrix pair {Hp (z), H̄p (z)} can be written
as
   
1 s(z) 1 0
Hp (z) = Hp (z)
0
, H̄p (z) = H̄p (z)
0
,
0 1 −s(z−1 ) 1
where the matrices Hp0 (z), H̄p0 (z) are another bi-orthogonal pair. This holds true if the filters are replaced by their
duals. Such a step is known as dual lifting. By combining lifting with dual lifting, one can obtain any set of bi-
orthogonal filters from a set of shorter ones. In particular one can begin with a trivial bi-orthogonal set and apply
above lifting procedures to obtain more useful set of filters. An example of a trivial set is the lazy wavelet. These
filters simply separate the input stream into even and odd components, i.e., its polyphase components. Euclidean
algorithm can be used to decompose any bi-orthogonal filter sets, into product of a finite number of lifting and dual
lifting factors [9]. Essentially this factors the polyphase matrix H̄p (z) into a product of simple polyphase matrices. In
summary the fast lifted wavelet transform (FLWT) involves three steps:

1. Compute the lazy wavelet.


2. Repeat the lifting operations for all the lifting steps in filter factorization.
3. Re-iterate steps 1 and 2 on subbands to yield final transform.

The main advantage of FLWT is, its efficient implementation in digital hardware. The calculations in each step
can be done in situ. This reduces the memory requirement of the transform. In fact, the only memory overhead in
the algorithm is for the lifting steps and the temporary memory, during the polyphase decomposition (lazy wavelet
transform). For long filters, the FLWT algorithm needs approximately half the number of operations when compared
to the traditional filter bank algorithm [9]. In practice, the simple, lattice-like computation in each lifting step is very
easy to implement and requires no overheads such as loops. The resultant code is very fast to execute. It is believed
that the low complexity algorithms are easily mapped into an efficient hardware implementation.

3. Linear indexing

The linear indexing uses a single number to represent the index of a coefficient instead of two. Let R = C = 2N
be the number of rows and columns of the square image, and let r and c be zero-based row and column indices.
Represent the row index in binary as, r = [rLr−1 , . . . , r1 , r0 ], where each of the rn is a bit, and for the column index
as c = [cLr−1 , . . . , c1 , c0 ]. For an index (r, c), the linear index is defined by i = [rLr−1 , cLr−1 , . . . , r1 , c1 , r0 , c0 ]. The
bits of r and c are simply interleaved. The linear index I ranges from 0 to I − 1, where I = RC. Figures 2a and 2b
show an example of this indexing method and also MATLAB code, to obtain this mapping matrix.
Every pre-final block of size 2 × 2 used in linear indexing for SPECK, has four consecutive indices, before a
pixel level is reached. Another important property of the linear indexing is, it efficiently supports the operations on
coefficient positions, needed for tree-based/block-based algorithms with one operation instead of two. Also, the linear
index naturally facilitates a breadth first search.

4. Listless speck

LSK uses same block partitioning rules, as used by SPECK. Partitioning of set ‘I ’ into three ‘S’ sets [3], is
modified in the proposed algorithm, by placing markers at all initial pixels for all the subbands. This method requires
computational time and complexity, same as that compared to SPECK [3], however unlike SPECK, the proposed LSK
algorithm uses some minimum number of bits to indicate the insignificant subband blocks in the initial passes.
820 M.V. Latte et al. / Digital Signal Processing 16 (2006) 817–824

1 2 5 6 17 18 21 22
3 4 7 8 19 20 23 24
9 10 13 14 25 26 29 30
11 12 15 16 27 28 31 32
33 34 37 38 49 50 53 54
35 36 39 40 51 52 55 56
41 42 45 46 57 58 61 62
43 44 47 48 59 60 63 64
(a)
Function A = mapping (n)
If n = 2
A = [1 2; 3 4];
Else
B = mapping (n/2);
A = [ B B + (n/2)ˆ2; B + (n/2)ˆ2*2 B + (n/2)ˆ2*3 ];
End
(b)

Fig. 2. (a) Linear indexing with R = C = 8 and two subband levels with bands delimited with thick lines. (b) Function in MATLAB to generate
mapping matrix of size n × n.

4.1. Storage

The number of coefficients in DC band is Idc = Rdc Cdc , where Rdc = R2−L , Cdc = C2−L , and L is the number
of subband decomposition levels. These coefficients are stored in a vector of length I . For convenience, we refer to
the magnitude part with the array val and the sign part with array sign. The state table is an array, named mark, of
length I , with 2 bits per coefficient. There is a one-to-one correspondence between val and mark.
Zerotree encoders can optionally trade memory for computation by pre-computing and storing the maximum mag-
nitude of all possible descendent and grand descendent sets as done in NLS [4,11], a similar approach can also be
used for block coders but with more memory requirement. In the proposed LSK algorithm, this pre computing is not
adapted and these pre-computed arrays are eliminated at the expense of repeated searching of blocks for significant
coefficients.
If each subband coefficient is stored in W bytes, the total bulk storage memory needed is: RCW for the subband
data and RC/4 (with two bits per marker) for the state table. For a 512 × 512 image using 2 bytes per coefficient,
total bulk storage memory size is 576 kbytes. This is all the significant memory needed for this algorithm. The amount
of memory required is fixed for a given size of the image. We are not counting the memory required by the subband
transform, but this part of the system can be efficiently handled by a rolling line-based transform.

4.2. State table markers

The following markers are placed in the 2 bit per coefficient state table mark, to keep track of the set partitions.
Each element of mark, if signifying a block, indicates something about the corresponding element in the val image
array. Each marker and its meaning is listed below.

MIP: The pixel is significant or untested for this bit-plane.


MNP: The pixel is newly significant, so it will not be refined for this bit-plane.
MSP: The pixel is significant and will be refined in this bit-plane.
MS2: The block of size 2 × 2, i.e., 4 elements to be skipped.

We use MS2 markers successively to skip 4 × 4 block, 8 × 8 block, . . . , and so on. The amount of computational
time required to calculate the number of MS2 markers in this algorithm is negligible. This can also be avoided by
using additional pointers, such as MS4, MS8, . . . , etc., which will increase memory size to 64 kbytes for a 512 × 512
image decomposed to 5 levels.
M.V. Latte et al. / Digital Signal Processing 16 (2006) 817–824 821

for i = 0, . . . , I − 1
mark[i] = MIP
end

i = Idc , e = log2 (m/2L )


while i < I
j =0
while j < e
mark[i + j ] = MS2
mark[2∗ i + j ] = MS2
mark[3∗ i + j ] = MS2
j =j +1
end
i = 4∗ i
e=e+1
end

Fig. 3. Initialization procedure.

4.3. Initialization

A dyadic subband transform is performed on the image with L = 5 levels, and floating point transform coefficients
are quantized to integers. Next, the transform is read into the linear array val. Map the whole two-dimensional trans-
form matrix into one-dimensional array and for each (r, c), i can be found by bit interleaving and the corresponding
coefficients can be moved.
The most significant non-zero bit-plane, B, is found by scanning val. LSK marks all the first elements of all initial
blocks by MS* markers, instead of using a set defined as ‘I ’ in SPECK [3] and then partitioning it by checking its
significance. This procedure can be included in LSK by using additional pointer in the proposed algorithm, to skip all
the elements after it.
The state table is initialized by marking each coefficient with MIP, and first element of every full sized block by
MS* markers. Few full sized blocks are marked during initialization. For a square image of size m × m and L levels
of decomposition, the initialization procedure is given in Fig. 3.
A small pre-computed constant look up table might also be used instead of calculating the indices above.

4.4. Main algorithm

The main encoder algorithm shown in Fig. 4 below is performed for each bit-plane, b, starting with B and decre-
mented to 0, or until a bit budget is met. The significance level for each bit-plane is s = 2b . Significance checks are
always done with bitwise AND operation.
The decoder follows the same overall procedure as the encoder with some low-level changes. To decode, use input
instead of output, and set the bits and signs of coefficients with bitwise OR instead of testing them with bitwise AND.
The decoder may also perform mid-tread type dequantization for coefficients that are not fully decoded.
In each pass, the coefficient array val is examined in the linear order for significance. Algorithm of encoder is given
below in its entirety. Though the pseudo-code given for the main algorithm uses multiplication and division for clarity,
all multiplication and division operations are by integral powers of 2 and are implemented by bit shifting.

5. Results and conclusions

Coding results obtained in the present work on 512 × 512 grey scale images of Barbara, Lena, and Baboon are
presented in Table 1. Coding results for 256 × 256 of the above images are also presented in Table 1. These images
were obtained by resizing standard 512 × 512 grey scale images using Lanczos re-sampling filtering method. For
these examples, we used a five level decomposition with the 9/7-biorthogonal wavelet [12] with symmetric extension
at image edges. The analysis and synthesis filter coefficients are given in Tables 2 and 3. A simple truncation of
wavelet coefficients was used. All decoded images for each bit-rate were recovered from a single fidelity embedded
encoded file, truncated at desired rate.
822 M.V. Latte et al. / Digital Signal Processing 16 (2006) 817–824

Symbols used:
Blockcount_ms2 , count_ms2 × count_ms2 numbers of elements starting from the current index i.

ENCODER:

PASS 1
i=0
while i < I
if mark[i] = MIP
output(d = Sb [val(i)])
mark[i] = MNP
if d
output(sign(i))
end
i =i +1
else if mark[i] = MS2
temp_index = i
count_ms2 = 0
while mark[temp_index] = MIP
count_ms2 = count_ms2 + 1
temp_index = temp_index + 1
end
output(d = Sn (Blockcount_ms2 ))
if d
mark[i+count_ms2−1] = MIP
if count_ms2 > 1
for j = 1, 2, 3
mark[i + j *22*(count_ms2−1) to
i + j *22*(count_ms2−1) + count_ms2−1] = MS2
end
end
else
i = i + 22*count_ms2
end
else
i =i +1
end

PASS 2
i=0
while i < I
if mark[i] = MSP
output(val[i] AND s)
i =i +1
else if mark[i] = MNP
mark[i] = MSP
i =i +1
else if mark[i] = MS2
temp_index = i
count_ms2 = 0
while mark[temp_index] = MIP
count_ms2 = count_ms2 + 1
temp_index = temp_index + 1
end
i = i + 22*count_ms2
else
i =i +1
end
end

Fig. 4. Main encoder algorithm.


M.V. Latte et al. / Digital Signal Processing 16 (2006) 817–824 823

Table 1
Bit rate (bpp) Barbara PSNR (dB) Lena PSNR (dB) Baboon PSNR (dB)
For the image of 256 × 256
0.125 22.51 29.19 19.63
0.25 24.84 32.96 20.78
0.5 27.52 37.44 22.61
1 32.01 42.91 26.07
2 39.00 44.48 32.02
For the image 512 × 512
0.125 23.62 31.23 21.26
0.25 30.5 33.08 23.42
0.5 33.03 37.92 25.34
1 36.36 40.12 28.46
2 42.26 46.78 34.43

Table 2
n Low pass analysis coefficients High pass analysis coefficients
0 0.85269867900889 −0.78848561640558
±1 0.37740285561283 0.41809227322162
±2 −0.11062440441844 0.04068941760916
±3 −0.02384946501956 −0.06453888262870
±4 0.03782845550726 –

Table 3
n Low pass synthesis coefficients High pass synthesis coefficients
0 0.78848561640558 −0.85269867900889
±1 0.41809227322162 0.37740285561283
±2 −0.04068941760916 0.11062440441844
±3 −0.06453888262870 −0.02384946501956
±4 – −0.03782845550726

No arithmetic coding was used on the significance test or any symbols produced by LSK algorithm. Back-end
arithmetic coding, using contexts and joint probability generally improve SPECK by about 0.5 dB. We expect im-
provement for LSK as well. Authors feel that this particular proposed algorithm would be very much suitable for
hardware implementation of object based SPECK (OB-SPECK) [13] for digital mammography.
The comparison of the results obtained (Table 1) with the earlier work [5] for the two images, viz. Lena and Barbara
for size 512 × 512, reveal that the compression performance is little harmed by using the listless implementation. This
is in-line with the expectation, because of the process of procedure involved in the implementation. The values of
PSNR’s for 512 × 512 in the earlier work are not much different from the present work, although to the surprise, the
resized image of 256 × 256 for Lena seems to be better compare to the image of size 512 × 512. The present method
also has an advantage regarding memory disc-swapping. It is found that it gets reduced to half in view of less number
of pointers being used.

Acknowledgment

The authors (M.V.L. and N.H.A.) wish to thank the Principal and the management of SDM College of Engineering
and Technology, Dharwad, India, for the encouragement shown in carrying out this work. M.V.L. acknowledges the
support and the stimulating discussions had with Mr. Ravi Lakkundi, DSP Engineer, Flexitronics Ltd., Bangalore, that
contributed to this paper.

References

[1] J. Shapiro, Embedded image coding using zerotrees of wavelet coefficients, IEEE Trans. Signal Process. 41 (1993) 3445–3462.
824 M.V. Latte et al. / Digital Signal Processing 16 (2006) 817–824

[2] A. Said, W.A. Pearlman, A new fast and efficient image codec based on set partitioning in hierarchical trees, IEEE Trans. Circuits Syst. Video
Technol. 6 (1996) 243–250.
[3] A. Islam, W.A. Pearlman, An embedded and efficient low-complexity hierarchical image coder, Proc. SPIE 3653 (1999) 294–305.
[4] F.W. Wheeler, W.A. Pearlman, SPIHT image compression without lists, in: Proceedings of IEEE International Conference on Acoustics,
Speech and Signal Processing, Istanbul, Turkey, June 5–9, 2000.
[5] W.A. Pearlman, A. Islam, N. Nagaraj, A. Said, Efficient, low-complexity image coding with a set-partitioning embedded block coder, IEEE
Trans. Circuits Syst. Video Technol. 14 (11) (2004) 1219–1235.
[6] W.K. Lin, N. Burgess, Listless zerotree coding for color images, in: Proceedings of the 32nd Asilomor Conference on Signals, Systems and
Computers, vol. 1, November 1998, pp. 231–235.
[7] W.K. Lin, N. Burgess, 3D listless zerotree coding for low bit rate video, in: Proceedings of the International Conference on Image Processing,
October 1999.
[8] G. Strang, T. Nguyen, Wavelets and Filter Banks, Wellesley-Cambridge Press, Cambridge, 1996.
[9] I. Daubechies, W. Sweldens, Factoring wavelet transforms into lifting steps, J. Fourier Anal. Appl. 4 (3) (1998) 245–267.
[10] W. Sweldens, The lifting scheme: A custom-design construction of biorthogonal wavelets, Appl. Comput. Harmon. Anal. 3 (2) (1996) 186–
200.
[11] J.M. Shapiro, A fast technique for identifying zerotrees in the EZW algorithm, in: Proceedings of the International Conference on Image
Processing, 1998.
[12] M. Antonini, M. Barlaud, P. Mathieu, I. Daubechies, Image coding using the wavelet transform, IEEE Trans. Image Process. (1992) 205–220.
[13] M. Penedo, W.A. Pearlman, P.G. Tahoces, M. Souto, J.J. Vidal, Region-based wavelet coding methods for digital mammography, IEEE Trans.
Med. Imag. 22 (2003) 1288–1296.

Mrityunjaya V. Latte was born on April 25, 1964, in India. He received the B.E. degree in electrical
engineering and the M.E. degree in digital electronics from S.D.M. College of Engineering & Technology,
Dharwad, India, in 1986 and 1995, respectively. He was awarded the Ph.D. degree in 2004 for his work in
the area of digital signal processing. He is working as Professor and Head, Electronics & Communication
Engineering Department, in SDM College of Engineering & Technology, Dharwad, India. His research interests
include coding, image processing, and multiresolution transforms. He received a best paper award for his paper
in a national conference NCSSS 2002 held at Coimbatore, India.

Narasimha H. Ayachit is presently working as Professor and Dean (Academic & Examination) at S.D.M.
College of Engineering & Technology, Dharwad, India. He completed his B.Sc. and M.Sc. in physics in 1979
and 1981, respectively. He was awarded the Ph.D. degree in 1983 for his work in the area of electronic spectra
of organic molecules from Karnatak University, Dharwad, India. He has published more than sixty research
papers in various journals. His areas of research include microwave, dielectrics, spectroscopy, and digital signal
processing apart from reforms in examination system.

Dhruvaraj K. Deshpande completed his B.Sc. and M.Sc. in electronics in 1961 and 1963, respectively,
both from Karnatak University, Dharwad, India. He completed the Ph.D. in the area of dielectrics in 1972 from
Department of Physics (Electronics), Karnatak University, Dharwad, India. He was faculty in Department of
Physics (Electronics), Karnatak University, Dharwad, India. He has more than forty research publications to his
credit in various journals in the areas of dielectrics, antenna, digital signal processing, and liquid crystals.

You might also like