Backward Coding of Wavelet Trees with Fine-Grained Bitrate Control
Total Page:16
File Type:pdf, Size:1020Kb
JOURNAL OF COMPUTERS, VOL. 1, NO. 4, JULY 2006 1 Backward Coding of Wavelet Trees with Fine-grained Bitrate Control Jiangling Guo School of Information Science and Technology, Beijing Institute of Technology at Zhuhai, Zhuhai, P.R. China Email: [email protected] Sunanda Mitra, Brian Nutter and Tanja Karp Department of Electrical and Computer Engineering, Texas Tech University, Lubbock, USA Email: {sunanda.mitra, brian.nutter, tanja.karp}@ttu.edu Abstract—Backward Coding of Wavelet Trees (BCWT) is Recently, several new wavelet-tree-based codecs have an extremely fast wavelet-tree-based image coding algo- been developed, such as LTW [7] and Progres [8], which rithm. Utilizing a unique backward coding algorithm, drastically improved the computational efficiency in BCWT also provides a rich set of features such as resolu- terms of coding speed. In [9] we have presented our tion-scalability, extremely low memory usage, and extremely newly developed BCWT codec, which is the fastest low complexity. However, BCWT in its original form inher- its one drawback also existing in most non-bitplane codecs, wavelet-tree-based codec we have studied to date with namely coarse bitrate control. In this paper, two solutions the same compression performance as SPIHT. With its for improving the bitrate controllability of BCWT are pre- unique backward coding, the wavelet coefficients from sented. The first solution is based on dual minimum quanti- high frequency subbands to low frequency subbands, zation levels, allowing BCWT to achieve fine-grained bi- BCWT also provides a rich set of features such as low trates with quality-index as a controlling parameter; the memory usage, low complexity and resolution scalability, second solution is based on both dual minimum quantiza- usually lacking in other wavelet-tree-based codecs. tion levels and a coding histogram, providing the ability to Like LTW and Progres, BCWT avoids bitplane coding use target bitrate as the controlling parameter with only a to gain significant coding speed improvement, but at the small speed penalty. same time, it inherits a common problem of non-bitplane Index Terms—image coding, wavelet tree, backward coding, codecs, namely coarse bitrate control. The original bitrate control, quality index, coding histogram. BCWT in [9] can only achieve certain bitrates, and the gaps in-between are large. One solution based on quanti- zation step size search was used in LTW and Progres to I. INTRODUCTION gather experimental results. However, the enormous speed penalty (usually more than 10X the coding time) of Ever since Shapiro developed the embedded zero-tree such methods makes them impossible to use in practical wavelet (EZW) [1] algorithm, many new wavelet-tree- applications. based image coding algorithms have emerged. Among In this paper, we present two new solutions to allow them, SPIHT [2] developed by Said and Pearlman has BCWT to achieve fine-grained bitrate control with small undoubtedly been one of the most influential codecs. or no speed penalty. It is worth pointing out that these Achieving high compression performance with its low two solutions are also applicable to other non-bitplane complexity algorithm, SPIHT also provides rate- codecs. scalability and fine-grained bitrate control. Extensive The rest of this paper is organized as follows. We first research on enhancing SPIHT, as well as other wavelet- provide an overview of the BCWT algorithm in Section II. tree-based codecs, has been the focus of image coding for In Section III, we discuss the bitrate control problem and many years. Although new features, such as resolution- one highly inefficient solution used in some codecs. In scalability, have been added into the enhanced codecs [3- Section IV, our two solutions to the bitrate control prob- 5], there are still many important features that are lem are presented. Experimental results are shown and difficult to incorporate into wavelet-tree-based codecs, discussed in Section V, followed by conclusions and fu- specifically, low memory usage and computational effi- ture work in Section VI. ciency [6]. II. BACKWARD CODING OF WAVELET TREES Based on “A Fast and Low Complexity Image Codec based on The following definitions are commonly used terms Backward Coding of Wavelet Trees”, by Jiangling Guo, Sunanda Mitra, and symbols in the description of the BCWT algorithm: Brian Nutter and Tanja Karp which appeared in the Proceedings of the IEEE Data Compression Conference 2006, Snowbird, USA, March ci,j : The wavelet coefficient at coordinate (i, j). 2006. © 2006 IEEE. O(i, j) : A set of coordinates of all the offspring of (i,j). © 2006 ACADEMY PUBLISHER 2 JOURNAL OF COMPUTERS, VOL. 1, NO. 4, JULY 2006 D(i, j) : A set of coordinates of all descendants of (i, j). least once. The map calculation merely moves some of L(i, j) = D(i, j) – O(i, j) : A set of coordinates of all the these computations to the beginning. leaves of (i, j). B. Common Bottlenecks in Wavelet-tree-based Codecs log c if, c ≥ 1 The quantization level = 2 i, j i, j While applying the MQD map to SPIHT and other qi, j : −1 , otherwise of the coefficient ci, j wavelet-tree-based codecs can effectively reduce the = { } : The maximum quantization computational expense of each tree-scanning to a mere qO i,( j) max qk ,l (k l), ∈O i,( j) two-number-comparison, the total amount of tree- level of the offspring of (i, j). scanning is still high enough for this process to take a = { } : The maximum quantization level significant portion of the coding time. This computational qL i,( j) max qk,l (k,l)∈L i,( j) load will become even more serious at high bitrates, be- of the leaves of (i, j). cause the wavelet-trees are split into many small trees. At qmin : The minimum quantization threshold. Any bit the same time, the second major bottleneck of most below qmin will not be present at the encoder output. wavelet-based codecs, namely bitplane coding, also con- tributes to the first bottleneck through repeating the same A. Map of Maximum Quantization Levels of Descendants tree-scanning while gradually lowering the quantization (MQD Map) threshold. The third bottleneck, management of dynamic The basis of the BCWT algorithm is building a map of lists, is also present. These bottlenecks result in a limited the Maximum Quantization levels of Descendants (MQD improvement in encoding time when the MQD map is map), which is a variation of Shapiro’s zerotree map rep- applied to other wavelet-tree-based codecs. resented in a more efficient form. Because the MQD map The BCWT algorithm, on the other hand, avoids these can also be applied to any other wavelet-tree-based codec, bottlenecks completely, thus offering very high coding we will introduce it out of the context of BCWT. speed, and, at the same time, featuring identical PSNR In the zerotree map or its adaptation to SPIHT-based performance to SPIHT, resolution scalability or rate scal- codecs, each node stores the maximum magnitude ability, extremely low memory usage and high paral- amongst the coefficients in its corresponding wavelet tree. lelizability. While BCWT borrows the efficient coding In the MQD map, however, each node stores the maxi- principle from SPIHT to describe relationships between mum quantization level of the tree so that memory usage parents and descendants in wavelet trees, it differs from is much lower than that of the corresponding zerotree SPIHT and other wavelet-tree-based codecs in many as- map. pects. The key is its unique one-pass backward coding, More rigidly defined, a MQD map is a two- which starts from the lowest level sub-bands and travels dimensional map that is 1/4 the size of the wavelet- backwards. MQD map calculation and coefficient encod- transformed-image. Each node, denoted as mi,j, represents ing are all carefully integrated inside this one pass in such the maximum quantization level of all the descendants of a way that there is as little redundancy as possible for the wavelet coefficient ci,j, where (i,j) is in level 2 or computation and memory usage. In order to describe the higher subbands: complete coding process, we will start with the building q , i,( j) in level 2 blocks of the algorithm, i.e. BCWT coding units. m = O i,( j) . (1) i, j {} max qO i,( j) ,qL i,( j) , otherwise C. BCWT Coding Units The coding process consists of recursive coding of Coefficients in level 1 subbands do not have descendants. many small branches of the wavelet trees, and we denote Because q L (i, j ) can be expressed in terms of the off- these branches and their related MQD map nodes as spring nodes of mi,j by BCWT coding units. An example of a BCWT coding unit, U(i,j), is illustrated in Fig. 1, as well as the computation = ( ), (2) qL i,( j) max mk,l of some of the interim data. For simplicity, only HL- (k l), ∈O i,( j) subbands are shown. then Differing from a conventional wavelet tree, which spans many levels, from the root of the tree to the first q , i,( j) in level 2 = O i,( j) . (3) level subband, a BCWT coding unit spans only three lev- mi, j {} max qO(i, j) , max (mk,l ) , otherwise (k,l)∈O(i, j) els with only twenty wavelet coefficients and five MQD map nodes. In most “forward” codecs, even just to en- This recursive characteristic of the nodes makes it pos- code the top portion of the tree, the entire wavelet tree sible to efficiently calculate the entire map by starting must be kept in memory and repeatedly scanned. Benefit- from the second level of wavelet sub-bands, where the ing from the backward nature, to encode a coding unit, coefficients have no leaves, and then go to the higher BCWT does not require any data outside the three-level- level sub-bands.