GB2305829A - A context model coder - Google Patents

A context model coder Download PDF

Info

Publication number
GB2305829A
GB2305829A GB9622826A GB9622826A GB2305829A GB 2305829 A GB2305829 A GB 2305829A GB 9622826 A GB9622826 A GB 9622826A GB 9622826 A GB9622826 A GB 9622826A GB 2305829 A GB2305829 A GB 2305829A
Authority
GB
United Kingdom
Prior art keywords
pass
coefficient
data
processing block
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB9622826A
Other versions
GB2305829B (en
GB9622826D0 (en
Inventor
Ahmad Zandi
James D Allen
Edward L Schwartz
Martin Boliek
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US08/310,146 external-priority patent/US5748786A/en
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority claimed from GB9518298A external-priority patent/GB2293733B/en
Publication of GB9622826D0 publication Critical patent/GB9622826D0/en
Publication of GB2305829A publication Critical patent/GB2305829A/en
Application granted granted Critical
Publication of GB2305829B publication Critical patent/GB2305829B/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/148Wavelet transforms
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/15Data rate or code amount at the encoder output by monitoring actual compressed data size at the memory before deciding storage at the transmission buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/162User input
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • H04N19/36Scalability techniques involving formatting the layers as a function of picture distortion after decoding, e.g. signal-to-noise [SNR] scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • H04N19/635Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets characterised by filter definition or implementation details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • H04N19/64Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets characterised by ordering of coefficients or of bits for transmission
    • H04N19/647Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets characterised by ordering of coefficients or of bits for transmission using significance based coding, e.g. Embedded Zerotrees of Wavelets [EZW] or Set Partitioning in Hierarchical Trees [SPIHT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/98Adaptive-dynamic-range coding [ADRC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/637Control signals issued by the client directed to the server or network components
    • H04N21/6377Control signals issued by the client directed to the server or network components directed to server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/115Selection of the code volume for a coding unit prior to coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Description

2305829 - l - A
The prowent invention relates to the field of data compression and docwWression systems; particularly, the, present Invention relates to a or for losolows and loony encoding of data In c=Wromal= systems.
Data compression is an extremely useful tool for storing and Cansmitting large amounts of data. For example, the time required to transmit an image, such as a facsimile transmission of a document, is reduced drastically when compression is used to decrease the number of bits required to recreate the image.
Many different data compression techniques exist in the prior art.
Compression techniques can be divided into two broad categories, lossy coding and lossless coding. Lossy coding involves coding that results in the loss of information, such that there is no guarantee of perfect reconstruction of the original data. The goal of lossy compression is that changes to the original data are done in such a way that they are not objectionable or detectable. In lossless compression, all the information is retained and the data is compressed in a manner which allows for perfect reconstruction.
In lossless compression, input symbols or intensity data are converted to output codewords. The input may include image, audio, one-dimensional (e.g., data changing spatially or temporally), twodimensional (e.g., data changing in two spatial directions (or one spatial 1 AD ORIGINP b I 3- 1 ( o- and one temporal dimension)),or multi-dimensional/multi-spectral data. If the compression is successful, the codewords are represented in fewer bits than the number of bits required for the uncoded input symbols (or intensity data). Lossless, coding methods include dictionary methods of coding (e.g., Lempel-Ziv),, run length encoding, enumerative coding and entropy coding. In lossless image compression, compression is based on predictions or contexts, plus coding. The JBIG standard for facsimile compression and DPCM (differential pulse. code modulation - an option in the JPEG standard) for continuous-tone images are.examples of lossless compression for images. In lossy compression, input symbols or intensity data are quantized prior to conversion to output codewords. Quantization is intended to preserve relevant characteristics of the data while eliminating unimportant characteristics. Prior to quantization, lossy compression system often use a. transform to provide energy compaction.
JPEG is an example of a lossy coding method for image data.
Recent developments in image signal processing continue to focus attention on a need for efficient and accurate forms of data compression coding. Various forms of form or pyramidal signal processing have been proposed, including multiresolution pyramidal processing and wavelet pyramidal processing. These forms are also referred to as subband processing and hierarchical processing. Wavelet pyramidal processing of image data is a specific type of multi-resolution pyramidal processing that may use quadrature mirror filters (Qhgs) to produce subband decomposition of an original image. Note that other types of non-Q1AF wavelets exist. For more information on wavelet processing, see Antonini, M., et al., 1mage Coding Using Wavelet Transform", = BAD ORIGINAL Transactions on Image Processing Vol. 1, No. 2, April 1992; Shapiro, An Embedded Hierarchical Image Coder Using Zerotrees of Wavelet Coefficients", Proc. TEEE Data C -. i Conference. pgs. 214-223,1993.
One problem associated with much of prior art wavelet processing is that a large memory is required to store all of the data while it is being processed. In other words, in performing wavelet processing, all of the data must be examined before en.coding is performed on the data. In such a case, there is no data output until at leaft one full pass has been made through all of the data. In fact, wavelet processing typically involves multiple passes through the data. Because of ffids, a large memory is often required. It is desirable to utilize wavelet processing, while avoiding the requirement of a large memory. Furthermore, it is desirable to perform wavelet processing using only a single pass through the data.
Many wavelet or subband transform implementations require filters in a particula,r canonical form. For example, low and high-pass filters must be the same length, the sum of the squares of the coefficients must be one, the high-pass filter must be the time and frequency reverse of the low-pass filter, etc. (See T1S. Patent No. 5,014, 134 issued May 1991 to Lawton et al.). It is desirable to allow a wider class of filters. That is, it is desirable to provide wavelet or subband transform implementations that use low and high-pass filters that are not the same length, the sum of the squares of the coefficients need not be one, the high-pass filter need not be the tim and frequency reverse of the low-pass filter, etc.
The present invention provides lossy and lossless compression using a transform that provides good energy compaction. The present invention also provides for modeling of joint spatial /frequency domain i.
data (wavelet transform domain) to permit efficient compression. Also provided is progressive transmission with rate or distortion being selectable by the user after encoding.
A method and apparatus for encoding and decoding data In described.
The present Invention provides a coder for encoding a plurality of data symbols comprising:
a formatting unit coupled to receive the plurality of data symbols for formatting the plurality of data symbols into a met of formatted data symbols; a significance unit coupled to the formatting unit to generate a plurality of decisions in response to each of the plurality of data wols each decision being Indicative of the significance of the corresponding data symbol; a memory mechanism coupled to receive the plurality of decisions from the significance unit for storage and output.
The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:
Figure 2A Is a block diagram of on oxuWle of the encoding portion of a coding syntem which way Include the coder of the present Invention.
Figure IB in a block diagraa of one oxaWle of bit significance adding which may use the coder of the present 10 invention.
Figure 2.A is a block diagram of a wavelet analysis/synthesis system.
Figure 2B illustrates forward and reverse representations of transform systems for filtering with non-overlapped minimal length reversible filters.
Figures 3A-D illustrate results of performing a four level decomposition.
1 Figure 4A is a block diagram of a three-level pyramidal transform.
Figure 4B is a block diagram of a two-dimensional, two level transform.
Figure 4C In a block diagram Illustrating onedimensional filter& performing a multi-rosolution decompression.
Figure 4D In a block diagram of a system using reversible wavelets.
Figure 4E are block diagrams of enhancement and analysis system using reversible wavelets.
Figure 5 illustrates a tree structure on wavelets coefficients.
Figure 6A and 6A (continued) In a flow chart of one example of a single list zerotree modelling for encoding.
Figure 6B and 6B (continued) in a flow chart of one example of a single list zerotree =dolling for encoding using reduced f lag memory.
Figure 6C in a flow chart of one example of a single list zerotree modelling for decoding.
Figure 6D is a flow chart of one example of a single list zerotree modelling for decoding using reduced flag memory.
Figure 7A in a flow chart of one example of a horizon modelling for encoding.
Figure 7B in a flow chart of one example of a horizon modelling for encoding using reduced flag memory.
Figure 7C In a flow chart of a horizon modelling for decoding.
Figure 7D in a flow chart of a horizon modelling for decoding using reduced flag memory.
Figure BA is a flow chart of one example of the B-pass for encoding.
Figure 8B in a flow chart of one ex amp l of the B-pass for encoding using reduced flag memory.
Figure 9A is a f low chart of one example of the B-pass for decoding.
Figure 9B in a flow chart of one example of the B-pass for decoding using reduced flag memory.
Figure 10 in one example of a forward wavelet filter.
Figure 11 in a block diagram of one example of a reverse wavelet filter.
Figure 12 Illustrates an Image and coefficients In a line buffer for a four level pyramidal deewWomition.
Figure 13 In a block diagram of one example of wavelet filtering using a filter control unit.
Figure 14 is a block diagram of another example of wavelet filtering using a filter control unit.
Figure 15 illustrates the assignment of memory banks to support horizontal and vortical access&.
Figure 16 illustrates the filter operation for a two.. level decomposition.
Figure 17 In a block diagram of one embodiment of the context model forming the encoder of the present invention.
Figure 18 In a block diagram of one embodiment of the sign/magnitude unit used in the present Invention.
Figure 19 in a block diagram of one od4-ent of the magnitude memory unit used in the present invention.
Figure 20 In a block diagram of one embodiment of the - 11 significance unit used in the present Invention.
Figure 21 in a block diagram of one embodiment of the tree memory unit used In the present invention.
Figure 22 In a block diagram of one embodiment of coefficient shifting used In the present Invention.
Figure 23 in a block diagram of an alternative embodiment of the significance unit used in the present Invention using an alignment by 1.5.
Figure 24 illustrates the dynamic allocation of coded data memory for one pass operation.
Figures 25A and B in a flow chart of one example of an encoding process.
Figures 26A and B in a flow chart of the decoding of one example of a decoding process.
Figures 27A and B are a flow chart of one example of the process for modelling each coefficient for both encoding and decoding processes.
Figures 28A and B are a flow chart of an alternate example of an encoding process.
Figure 29A and 5 are a flow chart of an alternative example of a decoding process.
Figures 30A and B are a flow cha rt of an alternate example of the process for modelling each coefficient In encoding and decoding processes.
Figure 31 in one example of multipliers for the frequency band used for coefficient alignment.
A method and apparatus for compression and decompression is described. In the following detailed des tion numerous specific details are set forth, such as " of coders, numbers of bits, signal names, etc., in order to provide a thorough understanding of the present invention. However, it will he apparent to one skilled irr the art that the present invention may bt practiced without these specific details. In other instances, wellknown structures and devices are shown in block diag ram form, rather djan in detail,.in order to avoid obscuring the present invention.
Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. lhe steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically a stated otherwise as apparent frd'm the following discussions, it is appreciated that throughout. discussions utilizing terms such as "processing" or "computing" or "calculating" or "determining" or displaying" or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and forms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories. or registers or other such information storage, transmission or display devices.
The present invention relates to apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose machines may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these machines will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein.
v 0 - is - Described below In a compress iorildeco"rooo ion system having an encoding portion and a decoding portion. The encoding portion In responsible for encoding input data to create compressed data, while the decoding portion In responsible for decoding previously encoded data to produce a reconstructed version of the original input data. The Input data may comprise a variety of data types, such as Image (still or video), audio, ate. in one emb odiment, the data is digital signal data; however, analog data digitized, text data formats, and other formats are possible. The source of the data may be a memory or channel for the encoding portion andlor the decoding portion.
Elements of the encoding portion andlor the decoding portion described below may be implemented in hardware or software, much an that used on a computer system. Then provide a lonaless compression/decompression system. The present Invention may also be configured to perform loony compression/decompression.
Figure 1A in a block diagram of one example of the encoding portion of the system. Not the decoding portion of the system operates in reverse order, along with the data flow. Referring to Figure 1A, an Input image data 101 in received by wavelet transform block 102. The output of wavelet transform block 102 in coupled to a bit-significance adding block 103. In response to the output from wavelet transform block 102, the bitsignificance adding block 103 produces at leant one bit stream that in received by an entropy coder 104. In response to the input from bitsignificance embedding 103, entropy coder 104 produces a code stream 107.
in one example, the bit significance embedding block 103 comprises a sign magnitude formatting unit 109 (which may also he used In the invention described hereinafter), a frequency-based context - 16 model 105 and a joint opace/frequency context model 106, such an shown In Pigure 1B. In one example, the joint space/frequency context model 106 c=Wrices a horizon context model. in a= examples, frequency-based context model block 105 comprises a zerotree model. In another embodiment, frequency-based context model i05 comprises significance tree model. The sign-magnitude unit 109, frequency-based context model 105 and the joint space/frequency GSF) context model 106 perfo:m bit-significance embedding Theinput of the sign rnagnitude unit 109 is coupled to the output of the i...a,.. elet coding block 102. The output of sign magnitude unit 109 is ccupled to a si,;itch 108. Switch 108 is coupled to provide the output of tli-.e s.,gn magnitude unit 109 to an input of either frequency-based modeling 4.jo:k 105 or joint space/frequency modeling block 106. The output of coding block 105 and horizon order coding block 106 are co,.:F'Aed to the input of entropy coder 104. Entropy coder 104 produces the output code stTeam 107.
Refe=g back to Figure 1A the image data 101 is received and transform coded using reversible wavelets in wavelet transform.block 102 as defined later below, to produce a series of coefficients representin g a multi-resolution decomposition of the image. These coefficients are received by the bit-significance embedding 103.
The bit significant embedding 103 orders and converts the coefficients into sign-magnitude format and, based on their significan.:c (as described below later), the formatted coefficients are subjected to a combination of different embedded modeling methods.
The formatted coefficients are subjected to either one of two 0 13AD ORIGINAL 3 added modelling methods (e.g. irequancy-basod modelling and JSF modelling).
in one example, the f ormatted coeff lclants are subjected to either trequency-based modelling or joint opatiallf requency modelling. When the Input data c=Wrisco Image data having multiple bitplanco, a ==bar of bitplanew are encoded with frequency-based modelling, while the remaining bitplanco are encoded with JSF modelling. The decision as to which method to use on eh bitplanes way be a user parameter. in one examplc, the high-order bitplance of the coefficients are ordered and coded with the frequencybased modelling of the present invention. In the frequencybased context model method, the prediction of oignif icance of the coefficient bits is related to the pyramidal structure of the wavelet. The low-order coefficient bitplanes are ordered and encoded with the joint opace/frequancy context model of the present Invention. The JS? modelling, for cx&Wl horizon modelling, provide advantages over the frequencybased encoding for bitplanes that are lens correlated with respect to the frequency domain coefficient relations.
The results of bit-significance adding In decisions (or symbols) to be coded by the entropy coder. In one example, all decisions are went to a single coder. in another example, decisions are labelled by significance, and decisions for each significance level are processed by different (physical or virtual) multiple coders.
The bit streams resulting from the frequency-based context model block 105 and JSF context model block 106 are encoded in order of significance using entropy coder 104. in an example, entropy coder 104 comprises a binary entropy coder. in one example, entropy coder 104 cowrioes a Q-coder, a B-coder defined In U.S. Patent No. 5,272,47e. or a coder such as described in U.S. patent application aerial no. 08/016,035, entitled Method and Apparatus for Parallel Decoding and Encoding of Data, filed February 10, 1993. For more Information on the Q-coder, owe Pannabaker, W.B., et - is - al., 0An Overview of the Basic Principles of the Q-coder Adaptive Binary Arithatic, IBM Journal of Research and DevelopMent, Vol. 32, pg. 717-26, 1988. In one example, a single coder produces a single output code stream. in another example, zultiple (physical or virtual) coder& produce multiple (physical or virtual) data streams. Wavelet Decomosition The described system Initially perform@ doc=Womiti= of an image (in the f orm of Image data) or another data signal using reversible wavlets. A reversible wavelet transform comprises an implementation of an exactreconstruction system In Integer arithmetic, such that a signal with Integer coefficients can he losslessly rocoverod. By using reversible wavelets, It In possible to provide lossless compression with finite precision arithmetic. The results generated by applying the reversible wavelet transform to the image data are a series of coefficients. in one example the reversible wavelet transform In Implemented using a act of filters. In one example, the filters are a two-tap low-pass filter and a six-tap high-pass filter. The present Invention provides such filters, which may be implemented using only addition and subtraction operations (plus hardwired bit shifting).
Also, the high-pass filter generate Its output using the results of the low-pass filter. The resulting high-pass coefficients are ordy a few bits greater than the pixel resolution and the low-pass coefficients are the same as the pixel resolution. Because only the low-pass coefficients are repeatedly filtered in a pyramidal decomposition, resolution is not increased in rnulti-level decompositions.
A wavelet transform system is defined by a pair of FM analysis filters ho (n), h2 (n), and a pair of FM synthesis filters goW, gi (n).
ho and go are the low-pass filters and hl and gI are the high-pass filters. A block diagram of the wavelet system is shown in Rgure 1A. Merring to Figure 2A, for an input signal, x(r,), the analysis filIkers ho and hl are applied and the outputs are decimated by 2 (critically to generate the transformed signals yo(W and vi(n), referred to 11-.ereL-i as low-passed and high-passed coefficients respectively. The analysis filters and their corresponding decimation, or subsampling, blocks form the analysis portion of the wavelet transform system. The coder/decoder contain all the processing logic and routines performed in the tra,-,sforrned domain (e.g., prediction, quantization, coding, etc.). The wavelet syslkein shown in'Figure 2.A also includes a synthesis portion in which the transformed signals are upsaripled by 2 (e.g., a zero is inserted after every term) and then passed through synthesis filters, go(n) and gi(n). The low-passed coefficients yo(n) are passed through the low-pass synthesi's filter go and the high-passed yl(n) are passed through the highpassed filter gi. The output of filters goW and gl(n) are combined to produce i(n).
BAD ORIGINAL.03 - 20 WMe doi%msampling ana upsampling are performed in some ernbodiments, in other embodixnents, filters are used such that computations which are unneeded due to downsampling and upsampling are not performed.
The wavelet system may be described in tems of the Z-transfonn, where X(Z), R(Z) are the input and output signals respectively, VoM, Y1 2) are the low-passed and high-passied transformed signals, HoM, HI M the lo,..;-pass and the bigh-pass analysis filters and finally COM, Cl M' are Lle lOw-pass and the high-pass synthesis filters. lf there is no alteration or 10 c.-,artiza+.:on in the transform domain, the output R(Z) in Figure 2, is Elven by (Z) m 1[HO(Z)GO(Z)+HI(Z)GI(Z)IX(Z)+ 1 IH,(-Z)G,(Z)+H,(-Z)G,(Z)]X(-Z).
is The second to= of XM), referred to an the ternn, is canceled because the synthesis filters are defined to be the quadrat-u--e mirror of the analysis filters, i.e., GO (Z) m H, (-Z) GI M = _HC)(-Z) 20 In terms of the filter coefficients, {g, (n) m (-1)n h, (n) gl(n)=-(-1)nh,(n) Therefore, for a quadrature mirror filter pairs, after substitution, the output is:,BAD OFtIGINAL 00' t i(z) m 1[H,(Z)H,(-Z)-H,(Z)H,(-Z)]X(Z). 2 Thus, In the quadrature zairror mystc=, the output is defined in terms of the analysis filters only. 'The wavelet transform is applied recursively to the formed signals in that the outputs generated by the filters are used as inputs, directly or indirectly, into the filter&. In the described l, only the low-passed cansformed component yo(n) is recursively transformed such that the systern is pyramidal. An example of such a pyramidal system is shown in Figure 4A.
The Z transform is a convenient notation for expressing the c-e:a,.-Aon of hardware and/or software on data. Multiplication by Z-M models a rn clock cycle delay in hardware, and an array access to the -.nth. previous element in software. Such hardware implementations include Lne=on.,-, pipestages, sdfters, registers, etc.
The signals, x(n) and X'(n), are identical up to a multplicative constant and a delay term, i.e. in terms of the Z- transform, X(Z) = cz-uX(Z).
Ms is called an exact reconstruction system. Thus, the wavelet transform initially applied to the inpui. data is exactly reconstructable.
one example using the Eadamard Transform is an exact reconstruction system, which in normalized form has the following representation in the Z-domain:
BAD ORIGINAL P0 Hom = 1 (1+Z-1) HIM = 42 After substitution, the output is Rg) m Z-1xg), which is clearly an exact-reconstruction. For more information on the Hadarnard Transform, see Anil K. Jain, Fundamentals of Image Processing, pg. 155.
A reversible version of the Hadamard Transform is referred to heren as the S-transform. Formore information on 5-transform, see Said, A. and Pearlman, W. "Reversible Image Compression via Multiresolution Representation and Predictive Coding," Dept. of Electrical, Computer and Systems Engineering, Renssealaer Polytechnic Institute, Troy, NY 1993. Since the Hadarnard Transform is an exact reconstruction transform, the following unnormalized version (which cliffers frorn the Hadamard Transform by constant factors) is also an exact reconstruction transform:
hom m 1(1+Z-1) 2 hl(z) = I-Z-1 Cii,en the samples of the input signal as xo, xl, the S-transform is a reversible i=plementation of this system as, YO(O) = [M0)+x(lW2J {y1M = X(0)-X(1) The notation 1J means to round down or truncate and is sometimes referred to as the floor function. Similarly, the ceiling function r_1 means round up to the nearest integer.
BAD ORIGINAL 1 r The proof that this implimentation is reversible follows from the fact that the only information lost in the approximation is the least significant bit of x(O)+x(l). But since the least significant bits of x(O)+x(l) and x(O)-x(l) are identical, flUs can be recovered from the high-pass output 5 yl (0). In other words, X(O) YO(O)(yl(O)+1)12j X(1) YO(O)-1(yl(O)-1)121 The 5-transform is a non-overlapping transform using minimal length reversible filters. Minimal length filters comprise a pair of filters, where both filters have two taps. Minimal length transforms do not provide good energy compaction. Minimal length filters implement a non-oveflapped transform because the length of the filters is equal to tht, number of filters. Overlapped transforms use at least one filter which has length greater than the number of filters. Overlapped transforms using longer (non-minimal length) filters can provide better enerty compaction. The present invention provides non-minimal length reversible filters which permits an overlapped trasform.
Another example of an exact-reconstruction system comprises the Two/Six (TS)-Transform which has the Z-domain definition, Hom ---L>Z-1) 42- H 1 (-1-2-1+8Z-2-8Z-3+Z-4+Z-5) 1 (Z) jT2 After substitution, the output is BAD ORIGINAL P0 X(Z) = 2Z-3X(Z), which is an exact-reconstruction transform.
The rational unnormalized version of the TS-transform comprises:
hom = -1o+Z-1) 2 h (:Z) = 1(-1-Z-1+8Z-2-8Z-3+Z-4+Z-5) 11 x(O), x(l), x(S) are six samples of the signal, then the first three los,v-passed coefficients yo(O), yo(l), yo(2) and the first L, -h-passed coefficient yl(O) are given by:
yo(O) = 1(x(O)+x(l))12j yo(l) = 1(x(2)+x(3))/2j yo(2) = 1(x(4)+x(S))/2j Y,(0)=[(-(X(O)+X(1)))+8(x(2)-X(3))+(x(4)+X(5))/8j.
However, the straight forward implementation of the rational unnormalized version of the TS-transform is not reversible. The follo,.%!ing example shows that the implementation is non-reversible locally. A longer sequence can be constructed as an example for the global case. Since -(x (0) + x(l)) + (x(4) + x(5)) yo (0) + ye (2) because of rounding to compute yo(O) and yo(2), this transform is not reversible using local information. For example, if x(O) = 1, x(l) = 1, x(2) = 3, x(3) = 1, x(4) = 1, x(5) =
1, then I,WD ORIGINAL 1 yo(O) = 1(1 + 1) 2J = 1 yo(l) = 1(3 + 1) 21 = 2 yo(2) = 1(1 + 1) 2J = 1 Y, (0) = j[-(1 + 1) + 8(3 - 1) + (1 + 1)] / 8J = 1(-2 +16 + 2) 1 Bi = 2 and if x(O)=1,x(l)=2,x(2)=4,x(3)=1,x(4)=1,x(S)=1,then yo(O) = 1(1 + 2) 1 2J = 1 yo(l) = 1(4 + 1) / 2J = 2 yo(2) = 1Q + 1) / 2 1 = 1 Y1 (0) = j[-(1 + 2) + 8(4 - 1) + (1 + 1)]j / 8 = 1(-3 + 24 + 2) / 8J = 123 / 8J = 2 Since yo(O), yo(l), y0M and yl(O) are the same for two different sets of inputs x(O)... x(S), the transform is not reversible, since given yo(O),. Y1(0) it cannot be determined from this local information which of the tvo sets were input. (Note that it can be proved that the transform is not reversible using global information from all coefficients.) Now consider a reversible T5-transform, which is referred to herein as an RTS-transform, which provides a different 1-dgh-pass filtering operation.
If x(O), x(l), x(2), x(3), M), x(S) are 6 samples of the signal, then the first three low-passed coefficients yo(O), yo(l), yo(2) and the first 1dgh-passed coefficient yl (0) are given by, yo (0) 1(x(O)+X(1))12j yo(l) 1(x(2)+X(3))12j JJ2) 1(X(4)+X(5))12j BAD ORIGINAL J0 1 7 - 26 t Y1(0) 1(-1(x(C))+X(1))lij+4(x(2)-x(3))+1(x(4)+x(S))/2j)14 1(-y,(0)+4(x(2)X(3))+Y,(2))/4i.
Since x(2) - x(3) a yJ0) -1-(ye(O) +yo(2)) / 41 then x(2)-x(3) is completely known. With y,(1)=1(x(2)+x(3))12jand x(2)-x(3) w,d x21'-x(3) defined above, x(2) and x(3) may beTecovered because the least ts of x(0)+W and x(D)-x(l) are identical.
n t 11n, let d(O) = x(2)-x(3) = y,(0)-1(-y.(C))+y.(2)14) x(2) = yo(l)-t-[(d(O)+ 1)12j x (3) = yD (1) + [(d(O) - 1) 12] One ex=ple of the forward filter for the RTS-transform is shown In A7pe:.,d..x A immplemented in the programming lanpl?-e "C" Ne,Ike that mathernatically the equation:
(-1 - Z-1 + BZ-2 - Bz + z, + Z) w.d the equation:
1 (!(-1-Z-')+4(Z-2 -Z-3)+1(Z Z-5) 4 2 2 aTe the sarne...;hen performed with infinite precision arithmetic. The reason the second equation represents a reversible filter is apparent when physically ir,-,ple.-ner,ted ivith integer arithmetic. Exemplary hardi...are implementations of the low-pass filter and the dgh-pass filter are described in conjunction with Figures 10 and 11.
C'xP,S"CPPO?11 \ f Note that in both the 5-tiLmform and the RTS-transform, the lowpass filter is implemented so that the range of the input signal x(n) is the sarne as the output signal y,(n). For example, if the signal is an 8-bit image, the output of the low-pass filter is also 8 bits. Ihis is an important property for a pyramidal system where the low-pass filter is successively applied because in prior art systems the range of the output signal is greater than that of the input signal, thereby making successive application.s of the filter difficult. In addition, the low-pass filter has only taps which makes it a non-overlapping filter. This property is impo-..anbl. for the hardware implementation, as is described below later.
In one ernbodixnent, with reference to the RTS-transform, the lov.--pass filter axid high-pass filter are defined as:
ho(Z) = 1>Z-1) 2 h 1(z) =!(-!(1+Z-')+4(Z-2_Z-3)+1(Z-4+Z-1 4 2 2 IIIi.js, the results from the low-pass filter may be used twice (in the first and terms) in the Ngh-pass filter. Therefore, only two other additorLs need to be performed to arrive at the results of the high-pass filter.
Many overlapped, non-=dnirnal length reversible filters may be ek, p, #_ W.4_ used in the!p;asanLipe.r,f,. Such forward and inverse representations of the transform system for filtering with non-overlapped minimal length ible filters is shown in Figure 2B. For instance, the following class of reversi filters may be useci. For an integer L k z, 0011 10110 d (0) = x(2(1LI2J + 1)) - x(2(ILI2J + 1) + 1) and and I- YO(O) = L(X(O) + X(I)) 12j Y. (1) = 1(x(2) + x(3)) 1 2J yo(L- l)= 1(x(21(L-1) /2j)+ x(21(L-1) / 2j+ 1)) /2j lil-li L-1 la,y,(i)+bd(O)+ ICY.0) ago il U2 12 The length of the high-pass filter is 2L. If L is odd, the filter may be closer to a syTnmetric filter. If ai, b, cl and k are integers and k<-b, then the filter is reversible. If ai, b, ci, and k are powers of two (or the negative or complement of a power of two), then the implementation of the filter may be sirnplified. If k = b (regardless of the values of ai and cl) then the range of the output of the high-pass filter yl is minimized. For each al, if there is exactly, one cj where ai = -cj, then the 1-agh-pass filter will have no response to a constant input. If aj = -cj when j-(L-1)= i, then the filter may be closer to a sym=etric filter.
Another useful property is [(a,)(2i)"' + (a,)(2i +1)m]+ (b)(2(11/2j+ I))'L -(b)(2(11/2j+l)+1) + 1,0 C,(2,)2'+c,(2,+1)"' =0 fulLI2j21 1 Ms makes the high-pass filter have no response to a linearly changing input when m=l and a quadratically changing input when m=2, etc., where m is the moment condition. This property is the principle 1 19P 9 reason that the RTS-transform las better energy compaction than the 5- transform.
Wl-jle filters must meet the Mul =um constraints for reversibility, for different applications, filters inay be used that meet none, some or all of the other properties. in am lea, one of the following oxazplo highpass filters Is used. The filters arc listed In a notation that just lists the integer coefficients of the rational version of the filter, to avoid obscurity.
1 1 -4 -4 16 -16 4 4 -1 -1 1 1 -3 -3 8.8 3 3 -1 -1 -1 -1 0 0 16 -16 0 0 1 1 -1 -1 4 4 -16 -16 256 -256 16 16 -4 -4 1 1 3 3 -= -22 128 -128 22 2.2 -3 -3 The last filiter is referred to as the Mwo/Ten) TT-filter, EL-td it has the that it has no response to a cubically increasing function. Note that since 22=16+2.xj^ and 3=2+1, this filter can be implemented with a toltal of seven additions and subtractions.
The strict reversibility requirements for filters can be relaxed by noting the following. High pass coefficients are encoded and decoded in the some order. Pixel values corresponding to previously decoded high pass coefficients are known exactly, so they can be used in current high pass filtering. For example, the following filter can be used when a raster order is used.
HIM=[1([_1(1+ Z-,)]+[l (8(z-2 -Z-3)+ (V +Z-S) 4 2 a\XAP10P -.30 .1^ 1 The use of a single fixed fiigh-pass filter is not reTuired...".daptive filters may be used or multiple filters may be used. Mie data us!d to adapt or select among multiple filters must be restricted to data that is available in the decoder prior to a particular inverse filtering operation.
One way to use multiple filters is to process the high-pass coefficients prog-essively. Alternate high-pass filtering operations (yl(O), y, (2), 3, 1(4),...) may be processed first with a reversible filter such as the R 715 'n', gh-pass fiher. The remaining processing (y,, (1), 3,1 (3), y, (5)....) M. 3 Y use a non-re.,.ersible filter of up to six taps, because the exact of the LrFuts to the overlap porton of the filter are known. For exarnple, any. of 4he filters may be used.
-1 3 -3 1 -1 4 -4 1 -3 8 -8 3 is 1 -5 10 -10 5 -1 1 -4 8 -8 4 -1 In come cxa=ples, the high pans filter may he replaced with a prediction /interpolation operation. A predictor /interpolator may predict the difference between a pair of inputs using any data that is available in the decoder prior to a particular prediction /interpolation operation. Mie predicted difference is subtracted from the actual differenct of the Mputs, and in output. In one example, prior art prediction methods usd in
DPCM, progTessive coding or spatial domain coding are used.
Using the low-pass and bigh-pass filters, a multi-resolution decomposition is performed. The number of levels of 41 C) - D is composition is variable and ma be any number; however, currently the number of decomposition levels equals from two to five levels.
For example, if the reversible wavelet transform is recursively applied to an image, the first level of decomposition operates on the finest detail, or resolution. At a first decomposition level, the image is decomposed into four sub-images (e.g., subbands). Each subband represents a band of spatial frequencies. 'Me first level subbands are designated LLO, LHO, HLO and HHO. The process of decomposing the original image involves subsampling by two in both horizontal and vertical dimensions, such that the first level subbands LLO, LHO, HLO and HHO each have one- fourth as many coefficients as the input has pixels (or coefficients) of the image, such as shown in Figure 3A.
Subband LLO contains simultaneously low frequency horizontirll and low frequency vertical information. Typically a large portion of the image energy is concentrated in this subband. Subband LHO contains low frequency horizontal and high frequency vertical information (e.g., horizontal edge information). Subband HI) contains high frequency horizontal information and low frequency vertical information (e.g., vertical edge information). Subband 1-WO contains high frequency horizontal information and high frequency vertical information (e.g., texture or diagonal edge information).
Each of the succeeding second, C&d and fourth lower decomposition levels is produced by decomposing the low frequency LL subband of the preceding level. MUs subband LLO of the first level is decomposed to produce subbands LLI, LH1, HLI and HH1 of the moderate detail second level. Simflarly, subband LLI is decomposed to produce OP C -::/l IOND 051 \XAP -' 32 coarse detail subbands LL2, LH2; HL2 and HH2 of the third level. Also, subband LL2 is decomposed to produce coarser detail subbands LL3, LH3, HL3 and HH3 of the third level, as shown in Figure 3D. Due to subsampling by two, each second level subband is one-sixteenth the size of the original image. Each sample (e.g., pel) at this level represents moderate detail in the original image at the same location. Similarly, each third level subband is 1/64 the size of the original image. Each pel at this level corresponds to relatively coarse detail in the original image at the same location. Also, each fourth level subband is 1/256 the size of the original image.
Since the decomposed images are physically smaller than the original image due to subsampling, the same memory used to store the o.-ignal image can be used to store all of the decomposed subbands. In other words, the original image and decomposed subbands LLO and LLI are discarded and are not stored in a three level decomposition.
A parent-cl-dld relationship exists between a subband component representative of coarse detail relative to a corresponding subband component at the next finer detail level.
Although only four subband decomposition levels are shown, additional levels could be developed in accordance with the requirements of a particular system. Also, with other transformations such as DCT or linearly spaced subbands, different parent-child relationships may be defined.
The process of multi-resolution decomposition may be performed using a filtering system, such as that depicted in Figure 4A. An input signal representing a one-dimensional signal with length L is low-pass 1/ 1 j- 33 and high-pass filtered by filter Uriuits 401 and 402 before being subsampled by two via urdts 403 and 405. A subsaxnpled output signal from unit 403 is low-pass and high-pass filtered by units 405 and 406 before being subsampled by two via units 407 and 408, respectively. Subband components L and H appear at respective outputs of urdts 407 and 408. Similarly, the output signal from unit 405 is low-pass and Hgh-pass filtered by units 409 and 410 before being subsampled by urts 411 and 412, respectively. Subband components L and H appear at respective outputs of uT-j,lbs 411 and 412. As described above, the filters used in subband decomposition are digital quadrature mirror filters for splitting the horizontal and vertical frequency band-c into low frequency and high frequency bands.
Fg,j.-e 4B illustrates a hvo-dimensional, two-level transform. Fib-_,re 4C also illustrates a two-dimensional, two-level transform irr.ple,-,,e,-.ted using one-dL-nensional filters, such as those shown in Figure 10 and 11. The one-dimensional filters are applied at every other pcsilbion, to avoid computation rendered unnecessary by subsaw.pling. 'In one e.-nlk.-odiment, one-dimensional filters share computation between low-pass and high-pass computation.
Therefore, the system for compression and decompression uses =on-ainimal length, overlapped reversible filters. Figure 4D in a block diagram of on examplo of such a system. 'Referring to Figure 4D, hierarchical decompression is initially performed. The results of the hierarchical decomposition are sent to a compressor for compression. The compression performed may include vector quantization, scalar quantization, zero r= length counting, 0- - 34 Huff--nan coding, etc. 7he outpt of the compressor compresses data representing a compressed version of the original input data. A decompressor may receive the data at sometime in the future and decompress the data. The system then performs an Inverse decomposition using non-minimal length, overlapped reversible filters to generate a reconstructed version of the original data.
The reversible wavelet filters may also he u-zed in exemplary analysis and enhancement systems, such as shown in A E.
Figure Referring to Figure 4E, hierarchical decornposition is pe-...-)rned on input data using non-minimal length, overlapped re%ers:'--,le wavelet filte.-5. The analysis unit receives the coefificlents genwated. by the filters and classifies them into decisions, e.g., rather than e n c Z din the coeHicients completely, only relavent information is extracted. For exam ple, in a document archiving systern, blarJ, pages be recognized using only the coarsest low-pass subband. Ancther exaMple would be to only use high pass information frorn a particular.s.-, ,bband to distinguish beriveen image of text and images of natural scenes. The hierarchical decomposition may be used for registering multiple images, such that coarse registration is done first with coarse subbands. in another embodiment the coefficients undergo enhancement or filtering followed by inverse decomposition. Sharperdng, edge enhancements, noise control, etc. may be performed using a hierarchical decoTnpos,+ion.
Thus, the wavelet transform can be used In joint time/space and frequency domain analysis and filtering /enhancement systems.
- 35 ]Bit-Sicmificance Zmbodded Codincr The coefficients generated an a result of the wavelet decomposition are entropy coded. The coefficients initially undergo embedded coding in which the coefficients are ordered in a Visually significant order or, more generally, ordered with respect to some error metric (e.g., distortion metric). Error or distortion metrics include peak error, and mearu squared error (MSE). Additionally, ordering can be performed to.give preference to bit- significance spatial locatton, relevance for data base querring, and directionally (vertcal, horizontal, diagonal, ote.). Multiple edded coding techniques are used, wherein a portion of the coefficients at one le,-el are coded with one encoding technique, while the re=-,a-ring coeffidents are coded with another techniques. In the present ini.ention, frequency-based modeling and joint spatial /frequency inodeling are two different embedded coding systems used to encode the coefificients generated by the wavelet transform.i Fre.-.,1e.-tcy-based modeling involves predicting a number of coefficients at a igher frequency that when coding a coefficient at a lower frequency. The joint space/frequency modeling takes advantage of both the known frequency bands and the neighboring pixels (or data). one example of the joint space/frequency modeling is referred to herein as horizon modeling.
The data is irdtially formatted in sign magnitude format, which is followed by the data being sorted based on significance. After the data is sorted with respect to the given significance metric, the data is encoded.
G\klo, 01 \ - 36 1 1 Both the frequency-based codinj and the horizon coding may based on bitsignificance ordering, but use different methods of encoding the events.
Assuming a digital signal, x(n), for each x(n) is represented with R bits of precision, then the embedded coding encodes the most significant bit (or bits) of every x(n) of the signal, then the next significant bit (or bits) and so on. For example, in the case of visually defined ordering, an image that requires better quality in the center than along the corners or near the edges (such as some medical images) may be subjected to encoding such that the low-order bits of the central pixels might be coded prior to the higher-order bits of the boundary pixels.
For an embedded system based on a bit significance distortion measure, binary values of the data are ordered by magnitude. In the case where the values are non-negative integers, such as occurs with respect to the intensity of pixels, the order that may be used is the bitplane order (e.g., from the most significant to the least significant bitplane). In embodiments where two's complement negative integers are also allowed, the embedded order of the sign bit is the same as the first nonzero bit of the absolute value of the integer. Iherefore, the sign bit is not considered until a non-zero bit is coded. As a result, the possible values for an event in the bit significance embedded system of the present invention is ternary before the sign bit is coded. Ihe ternary events are cl not significant", "positive significanC and "negative significant". For example, using sign magnitude notation, the 16-bit number -7 is: 1000000000000111 4P NI / 1 Y / On a bit-plane basis, the first twelve decisions will be not significant". The first 1-bit occurs at the thirteenth decision. The thirteenth decision will be Onegativa significantm. After the sign bit in coded, the possible events are reduced to binary, 1.. 0, 1. The fourteenth and fifteenth decisions are both 010.
In one ox=Wle, a list Is used to keep track of the coefficients. In one mxaWle, a one bit flag,:referred to herein an the group flag, associated with each coefficient differentiate& coefficients whose sign bit has not yet been coded from the coefficients with the sign bit already coded. In another example, two or more lists can be used Instead of a flat bit. in another example, a single list In used without a flag.
is In another example lists are not used. All decisions for a coefficient are generated and labelled by significance, before any decisions for the next coefficient are generated. This eliminates the need for storing all coefficients In lists.
The Encodinc and Decodina Process The following flow charts, Figures 25-30, depict examples of the encoding and decoding processes.
Figure 25 in a flow chart Illustrating the encoder transform and modelling process. Referring to Figure 25. the encoder transform and modelling process begins by acquiring input data (processing block 2501). After acquiring input data, a.reversible wavelet filter (processing block 2502) in applied.
001 lapp Next, a test determines ifanother level of decomposition is desired (processing block 2503). If another level of decomposition is desired, processing continues at processing 2504 where the reversible filter is applied to the LL coefficients that resulted from the immediately previous decornposition, and processing continues back at processing 2503. In this =anner, any number of loyal of dcooition can be performed.
If another level of decomposition is not desired, processing cc-.tt:-nues at processing block 2506 where the group flag for each coe!j.cier.t is to the A-gToup. After initializing the group flag, the bi-.llar.e for t1Ie A-pass, SA, is set to the most significant bitplane (max) (processing blzc, 25.27). Next, the bitplane for the B-pass, SB, is set to he nextrnost b..".pl&ane (max-l) (processing block 2508).
Then, a test dete=mines whether to code the bitplane for the A-pass, SA, with a frequency based model (processing block 22509). If the bitplane SA is to be coded with the frequency-based model, processing continues at P-.oce-zs:--lg block 2510 where each coefficient is modeled with the frequency-based model and entropy code. On the other hand, 11 bitplane SA is not to be coded with the frequency-based model, processing continues at processing block 2511 where each coefficient is modeled with a joint space/frequency model and entropy code.
In either case, processing thereafter continues at processing block 2512 where a test determines if the bitplane SA is greater than or equal to zero, thereby indicating whelther it is the last bitplane. If bitplane SA is greater than or equal to zero, processing loops back to processing block 2309. On the other hand, if bitplane SA is not greater than or equal to zero, 1.1 ^11 - 39 processing continues at processiing block 2513 where a test determines..; hethe-, the bitplane 5B is greater than or equal to zero, such that the process determines if the bitplane is the last bitplane to undergo a B- pass. lf bitplane 5B is greater than or equal to zero, processing continues at processing block 2509. However, if bitplane 5B is not greater than or equal to zero, processing continues at processing block 2514 where coded data is either transmitted onto a channel or stored in memory. After storing or transmitting the coded data, the encoder transform and modeling process of the present invention ends.
Figure 26 Illustrates a decoder transform and zaodelling process. Referring to Figure 26, the decoder transform, and modelling process begins by retrieving coded data (proces-z:--g block 2631). The coded data may be recelved from a charrel cr mernon. or ocher cansmission system. After retrieving the coded data, a group flag for each coefficient is Initialized to the A-gToup (processLng block 2632). Following this initialization, the bitplane for the A-pass, SA, is ost significant bitplane (max) (processing block 2603) and the et to 14"1,Le in, j bitplane for the B-pass, 5B, is set to the next most significant bitplane (max -1) (processing block 2604). Then, the value of each coefficient is set to an initial value of zero (processing block 2605).
After irdtializing the value of each coefficient to zero, a test determines whether the bitplane SA is to be decoded with a frequencybased model or not (processing 2606). If bitplane SA is to be decoded with a frequency-based model, processing continues to processing block 2607 where each coefficient is modeled with a frequency-based model and entropy decode. lf the bitplane SA is not to be decoded with a frequency- )1 110P - 40 i.
based model, processing continues at processing 2608 where each coefficient is modeled with a joint spacelfrequency model and entropy decode.
After each coefficient is modeled, processing continues at proce-.:--ing block 2609 where the bitplane SA determines if it is the last bitplane by testing if it is greater than or equal to zero. If the bitplane SA is greater than or equal to zero, processing continues at processing block 2606. On the other hand, if bitplane SA is not greater than or equal to zero, then a test determines if the B-pass bitplane SB is greater than or equal to zero (prc)ce-c-c:.-ig block 2610), thereby indicating that it is the last bitplane for a B pass. If so, processing continues at processing block 2606 for further On the other hand, if the bitplane for the B-pass, SB, is not g.-eater t. han or equal to zero, an inverse reversible filter is applied on the coef, iicients frorn the coarsest level of decomposition (processing block 2611). A test then determines if all the levels have been inverse filtered (processing block 2612). If not, the inverse reversible filter is applied again on the coefficients on the coarsest remairdng level of composition (processing block 2613). Thereafter, processing continues back at processing 2612 to test once again whether aU of the levels have been inverse filtered.
Once all the levels have been inverse filtered, processing continues at processing block 2612 where a store or trarLsmission of reconstructed data occurs.
rigure 27 illustrates one example of the process for modelling each coof ticiant. The process depicted represents the modelling process for either the frequency-based or asp modelling and encode or decode. That is is each of the four blocks (2507, 2508,2607,2608) may be implemented with the modeling process of Figure 27. Referring to Figure 27, an initial process begins by initially testing whether the modeling is to be performed in one pass (processing block 2701). If the modeling is not to occur in one pass, a test determines whether the bitplane SA is greater than the bitplane 5B (processing block 2702). If it is not, then the process transitions to processing block 2703 where a flag (do_A_fiag) is cleared to indicate that an A-pass is not to be performed. If bitplane SA iS greater than the bitplane 5B then processing continues at processing block 2704 where the flag (do_A_flag) is set to indicate that an A-pass is to be performed.
After either of processing blocks 2703 or 2704, processing continues at processing block 2705 where a test determines if the bitplane 5B is equal to bitplane SA. 11 the bitplanes are not equal, the present inVention clears a flag (do_B_flag) to prevent a B-pass from occuring (processing block 2705) and processing thereafter continues at processing block 2707. If the bitplane 5B is equal to the bitplane SA, the do-R-flag flag is set to indicate that a B-pass is to be performed (processing block 2706), and processing also thereafter continues at processing block 2707.
At processing block 2707, a test determines if the A-pass flag is set and the zerotree modeling is to be performed. If the flag indicates that an A-pass is to occur and zerotree modeling is to be performed, a "determined /undetermined" flag is initialized to the "undetern-dned" state for each coefficient (processing block 2708), and processing continues at processing block 2709. On the other hand, if either the A- pass indication flag or the zerotree modeling indication are not set, processing continues 00 rXX4P,a directly to processing block 2709_. At processing block 2709, the first coefficient is set to the variable C.
Once the first coefficient has been assigned to the variable C, a test determines if the B-pass indication flag is set (processing block 27/19). If the B-pass Indication tlag (dc>-b-tlag) 1o act, a a-pass is performed on coefficient C (processing block 2710), and processing continues at processing block 2711. On the other hand, if the B-pass flag is not set, then a B-pass is not perfo.rmed on C, and procesing continues directy to, p:.c)cessL-,g block 2711.
A test dhen determines whether the A-pass indication flag (do_A_flag) is set (processing block 2711). If the A-pass indication &1&ag 15 set, then an A-pass is performed on coefficient C (processing block 27177). processirg continues at processing block 2713. If the A-pass ind.:.-atcn flag is not set, processing continues at processing block 2713 without performing an A-pass on coefficient C.
At processing block 2713, a test determines if coefficient C is the last coefficient. lf coefficient C is not the last coefficient, then processing continues at processing block 2714 where the next coefficient is assigned to the variable C and processing continues at processing block 2719. However, if coefficient C is the last coefficient, processing continues at processing block 2715 where a test determines if the B-pass flag (do_B_flag) is set. If the Bpass flag is set, the bitplane 5B is set equal to the bitplane 5B -1 (processing block 2716), and processing continues at processing block 2717. If the B-pass indication flag is not set, processing continues at processing block. 2717. At processing block 2717, a test determines if the A-pass flag is set. If it is set, then the bitplane SA is set equal to the bitplane SA-1 (processing block 2718) 1 J f 1 3p -j i 01 a.nd processing ends. Also, if thi A-pass flag is not set, then processing ends immediately. In a= cxawlos, whether a cocificicot at a Particular bitPI4t 1 in the
A-group or the B-group can be determined without using a flag bit. This saves one bit of memory per coefficient, wMrh may be significant for large images. Instead a mask is compared using AND logic to a coefficient. If the result of the AND is zero, the bit is in the A-group; otherwise, it is in the B-group. An example of these masks are shown in Table 7 for 8 bitplanes. Note that these masks are the two's complement of 2(bitplan"l) 10 Owithout the sign bit).
Table 7 - Masks Bi:Elane Mask (binary) 7 1 00000000 6 10000000 11000000 4 11100000 3 11110000 2 11111000 1 11111100 0 11111110 Since independent masks can be assigned to the A-pass and B-pass respectively (called herein MA and MB), as many A-passes as desired can be performed before the corresponding b-pase. Tz cme lmmntation with 17 bitplanes, 3 A-passes are performed, then 14 simultaneous A-passes and B- passes are performed, and finally 2 B-passes are performed. Since A-pass laW ox::cGxltlkl- decisions can typically be coded"more efficiently than B-pass decisions, performing multiple A-passes initiaUy can improve quality for lossy compression.
Figure 28 Illustrates one clc of an encoder that uses a reduced flag memory (as is described later in the Detailed Description). Referring to Figure 28, the encoder transform and modeling process begins by acquiring input data (processing block 2S01).
After acquiring input data, a reversible wavelet filter (processing block 2802) is applied.
Next, a test determines if another level of decomposition is desired (-7ocess,:..-g block 2S03). lf another level of decomposition is desired, pro,-ess..n.g contL-iues at processing 2804 where the reversible filter is to the LL coef.licients that resulted from the i.-nme""i.21,.Cly pre',. iOus decompression, and processing continues back at processing 2803. 1n th15 zanner, any number of levels of decomposition can be performed.
lf another level of decomposition is not desired, processing continues at processing block 2805 where the bitplane for the A-pass, SA, is set to the most sig,-tfficant bitplane (m'ax). Next, the bitplane for the B-pass, 5B, is set to the next most significant bitplane (max-1) (processing block 28,36).
Next, mask MA is set to -2(SA+ 1) (processing block. 2807) and mpsk NIB is sel. to -2(5B+I) (processing block 2808). Then, a test determines whether to code the bitplane for the A-pass, SA, with a frequency based model (processing block 2S08). If the bitplane SA is to be coded with the Cs' I'' frequency-based model, processing continues at processing block 2S09 -oep 1 = 2 55 where one bit of each coefficiedis modeled with the frequency-based rnodel and ent-ropy code. On the other hand, if bitplane SA is not to be coded with the frequency-based model, processing continues at processing block 2510 where one bit of each coefficient is modeled with a joint spacelfrequency model and entropy code.
In either case, processing thereafter continues at processing block 2811 where a test determines if the bitplane SA iS greater than or equal to zero, thereby indicating whether it is the last bitplane. If bitplane SA is greater than or equal to zero, processing loops back to processing block 25,38. On the other hand, if bitplane SA iS not greater than or equal to zero, proCessing continues at processing block 2812 where a test determines w,lie.-'-,er the bitplane 5B is greater than or equal to zero, such that the p:.c)cess detern-Lines if the bitplane is the last bitplane to undergo a B-pass.
1.1 L' SB is greater than or equal to zero, processing contnues at p7ocessing block 2808. However, if bitplane 5B is not greater than or equal to zero, p-.ocessL-ig cont-Lnues at processing block 2813 where coded data is transmicted onto a channel or stored in memory. After storing or the coded data, the encoder transform and modeLing process of the present invention ends.
Pigure 29 Illustrates an alternative arrangement of the decoder transform and =dolling process when using a reduced flag memory. Referring to rigure 29, the decoder transform and modelling process begin by retrieving coded data (processing block 2901). The coded data may be received from a channel or mem.c-y or other transmission system. Once the coded data is received, the bitplane for the A-pass, SA, is set to the most signfficant bitplane (max) IC,XVAP- IBPD ik 1. A 6 b k (processing block 2903) and the bitplane for the B-pass, SB, is set to the next most significant bitplane (max -1) (processing block 2904). After initializing the value of each coefficient to zero, the value of each coefficient is set to an irdtial value of zero (processing block 2905). 7hen, mask MB is set to -2 (SB+I) (processing block 2902) and mask MA is set to -2(SA+1) (processing block 2915).
Then, a test determines whether the bitplane SA is to be decoded with a frequency-based model or not (processing 2906). If bitplalIC SA is to be decoded with a frequency-based model, processing continues to processing block 2907 where one bit of each coefficient is modeled with a frequencybased model and entropy decode. If the bitplane SA is not to be decoded with a frequency-based model, processing continues at processing 2908 where one bit of each coefficient is modeled with a joint space /frequency model and entropy decode.
After each coefficient is modeled, processing continues at processing block 2909 where the bitplane SA determines if it is the last bitplane by testing if it is greater than or equal to zero. If the bitplane SA is gTeater than or equal to zero, processing continues at processing block. 2906. On the other hand, if bitplane SA is rLOt greater than or equal to zero, then a 20 test determines if the B-pass bitplane SB is greater than or equal to zero (processing block 2910), thereby indicating that it is the last bitplane for a Bpass. If so, processing continues at processing block 2902 for further decoding.. On the other hand, if the bitplane for the B-pass, SB, is not greater than or equal to zero, an inverse reversible filter is applied on the 25 coefficients from the coarsest level of decomposition (processing block 2911). A test then determines if aU the levels have been inverse filtered (processing block 2912). If not, the inverse reversible filter is applied again on the coefficients on the coarsest remaining level of composition (processing block 2913). Thereafter, processing continues back at processing 2912 where a test once again whether all of the levels have been inverse filtered.
Once all the levels have been inverse filtered, processing continues at processing block 2912 where a store or transmission of reconstructed data occurs.
rigure 30 illustrates one emu1 of th process for modelling each coefficient. Note that like Figure 27, the process of Figure 30 may be used to implement the modeling steps in Figures 28 and 29. Referring to FiEure 30, an irj'bLal proCess begins by initially testing an A-pass is desired and shelher SA is greater than or equal to 0 (proces-ting block ^0001). If so, then the flag (do_A_flag) indicating that an A-pass is to be performed is set (processing block 3004), and processing continues at processing block Otherv, ise, the do-A-flag flag is cleared (processing block 3003).
If bitplane SA is greater than the bitplane 5B then processing cont-inues at processing block 3004 where a flag is set to indirate that an Apass is to occur. If bitplane SA is otgTea'ter than the bitplane SB, then processing continues at processing block 3003 where the flag indicating an A-pass is supposed to occur is clear.
After either of processing blocks 3003 or 3004, processing continues at processing block 3002 where a test detern-dnes if the bitplane 5B is greater than or equal to bitplane SA and if a B-pass is desired. If the bitplanes are not equal, a flag (do-B-flag) In cleared to prevent B-pass from occurring (processing block 3005), and prooazi ap,o OaclxApj- - 48 1 thereafter continues at processin^g block 3007. If the bitplane SB is equal to the bitplane SA, the do_B_flag flag is set to indicate that a Bpass is to be pe:fo-.rned (processing block 3006), and processing also thereafter continues at processing block 3007.
At processing block 3007, a test determines if the A-pass flag is set and the zerotree modeling is to be performed. If the flag indicates that an A-pass is to occur and zerotree modeling is to be performed, a "de!err.,.ned/undete.-rr,ined" flag is initialized to the "undel,er-, nined" state for each coefficient which has children (processing block and F-3cessing continues at processing block 3009." On the odher hand, if either t11 be A-pass indication flag or the zerotree modeling indication are not set, pro.-ess;&.-&g continues directly to processing block 3009. At processing block the 4.-st coefficient is set to the variable C.
Once the first coefficient has been assigned to the variable C, a test 15 dele.-..lines if the B-ass indication flag is set (processing block 3019). If the B-pass indication flag (do-a-flag) In set, a a-pang on coefficient t Cia perforraed (procoosing block 3010), and procnzing continues at a processing block 3011. On the other hand, if the B-pass flag is not set, then a B-pass is not performed on C, and processing continues directly to processong block 3011.
The test then determines is the A-pass indication flag has been set (processing block 3011). If the A-pass indication flag has been set, then an A--ass is performed on coefficient C (processing block 3017). Thereafter, processing continues at processing block 3013. If the A-pass indication flag is set, processing continues at processing block 3013 without performing an A-pass on coefficient C.
r 1 - 49 1 1 At processing block 3013, a test determines if coefficient C is the last coefficient. If coefficient C is not the last coefficient, then processing continues at processing block 3014 where the next coefficient is assigned to the variable C and processing continues at processing block 3019. However, if coefficient C is the last coefficient, processing continues at processing block 3015 where a test determines if the B-pass flag (do_B_flag) is set. If the Bpass flag is set, the bitplane SIB is set equal to the bitplane 5B-1 (processing block 3016), and processing continues at processing block 3017. If the B-pass indication flag is not set, processing continues at processing block 3017. At processing block 3017, a test determines if the A-pass flag is set. lf it is set. the.n the bitplane SA is set equal to the bitplane SA-1 (processing block 3018) and processing ends. Also, if the A-pass flag is not set, then processing ends immediately.
Coefficient Trees In a pyramidal system, the coefficients can be grouped into sets using a tree structure. The root of each tree is a purely low-pass coefficient. Figure 5 illustrates the tree structure of one purely low-pass coefficient of the transformed image. For a two-dimensional signal such as an image, the root of the tree has three "children" and the rest of the nodes have four cdldren each. Ihe tree hierarchicaUy is not limited to two dimensional signals. For example, for a one dimensional signal, a root has one'child and non-root nodes have two children each. Higher dimensions follow from the one-dimensional and two-dimensional cases.
liap,'D okSG111t., 0) - so - The tree structure is alsolpparant from the operation of the filters shown in Figures 4A4C. The operation of the pairs of filters with subsarnpling causes the previously described coefficients to be related.
After the coefficients bay been placed In sign magnitude format, a context model detem-dnes which of the multiple encoding methods is to be used to further encode the coefficients. A fre,. aency-based coding scheme, such as zerotree coding, efficiently codes &.e significance data associated with a given subband decomposition for a specilled threshold. In addition to using symbols indicating the si,, Lllic-%nce or insignifirance of a single isolated coefficient in the assodated subband decomposition, the entries of insigr.ificant pare.nts all &,ildren insignificant (those with magrdrudes less tha-n or e.-,al to the S..-,.er, th.reshold) are grouped together and jointly coded. The-se trees are so,.n.eliines referred to as zerotrees. These insignificant tTees are 15 cc-e--' with a s-igle dedicated symbol, sometimes called a zero tree root. If, ho%,,e,.er, there is a significant descendant, the entry of an ins;,-..,fic.Ant coefficient is encoded using the symbol for an 1solated zero". Thus, a tree is encoded with four symbols (positive significant, negative significant, isolated zero or zerotree rodt) for decisions where the sign of the coefficient has not been coded yet.
Frequency-based coding is particularly useful in compression systems because the joint coding of insignificant trees allows a small number of parent coeffirients to predict the insignificanre of a large n=ber of descendant coefficients. Since the entries in the tree associated with descendant coefficients can be predicted froin the root, no additional symbols are needed to encode their insignificance. The insignificance of the entire tree is encoded at a viry low cost. Hence, the high order bitplanes consist mostly of insignificant coefficients of which many are nelther zerotree roots nor isolated zeros (i.e., they are children in insignificant trees which do not have to be coded).
Shapiro discloses a frequency-based model called Zerotree inUS. Patent No. 5,321,776. In Shapiro's method, two lists, a dominant list and a subordinate list are used to store all of the coefficients. For each significance level, two passes are made, a dominant pass and a subordinate pass. in one exazpl, the frequency-hamod model In Zarotrow.
in another example, a frequency-hawed nodal similar to 4 Ze:ot:ee (as described by Shapiro) is used. Instead of ussing multiple 111sts. c&-tly a s,gle list is used, with each of the list elements being marked as be-,ng members of one of the two groups. The separation of coefficients into an A-group and a B-group is equivalent to the separation Shapiro acieves with dominant and subordinate lists (respectively). Shapiro's use of rnultiple lists allows greater flexibility in ordering of coefficients in &,e subordinate list at the expense of greater softw-are /hard ware complexity. This Single List Zerotree method uses two passes, the A-pass and the B-pass that are equivalent to Shapiro's dominant pass and subordinate pass, respectively. The Single List Zerotree model will be deswibed below.
The coding system maintains a list of the coefficients in sign-magnitude form in memory. Each element in the list has a one-bit label which indicates whether the element is a member of the "A-gToup or the "B-grDup". At the beginning of a stage, those 110p 4 coefficients that have not yet been found to be signfficant are labeled as being in the A-group. 7hose coefficients that have been previously found to be significant with respect to previous, larger, thresholds are labeled as being in the B-group. The list contains the coefficients in the order in wl-jch they will be processed for coding. At the beginning of the very first stage, all coefficients are labeled as members of the A-group, since no Coefficient has been established as being significant. As coefficients are de!e:.rnined to be significant or ins ignifi cant, the labels for their entries are &,a-ged from the original A-group designation to B-group designation. 'I'is 1;.sll. is subse,jently refined at progressively finer thresholds. '11-,at.,s, passes through the list occur.
in one example, the binary events which correspond to the Coa...-4cie.nts of the B-group are binary arithmetically coded under a zeroth order Markov context model. The 4-ary events corresponding to the coeflizients of the A-group are also encoded under a zeroth order \. larkoi, context model.
The order of coefficients in the list preserves the tree structure such that no child can be modeled prior to its parent. Thus, an ordering which preserves the tree structure is fixed and used consistently. in one example, the coefficients are stored in memory in order from the first storage location used, alternatively. at linked list may be used.
in one example, the coefficients are coded In a bit significance, or bit-plane embedded @yet&=. Since the coef f icients are coded f rom most signif leant bitPlant to least significant bitplane, the number of bitplarion in the data must he determined. This Is accomplished by finding an uper bound on the magnitudes of the coefficient values calculated from the data or derived from the depth of the image and the filter coefficients. For example, if the upper bound ia149, then there are 8 bits of sigTdficance or 8 bitplanes.
Figure 6A Illustrates on cma=ple of the single list zerotree encoding process. The process in Figure 6A may be used in the modeling process of Figure 27.
Referring to Figure 6A, the process begins by testing whether the group flag for the coefficient C isset to the "A-gToup" (processing 3221). If not, then the process ends. On the other hand, if the gToup flag fir coefficient C is set to the "A-g,-oup", then processing continues at processing block 522Z,..-here a test dete.-mines if the "deter,-nined/undetermined" flag for Che coefhcient C is set to "undelbe=nined". If the "detc.-.. lined /undetem..ined" flag for the coefficient is not set to . ur,l"ele-.-,,nined", the process ends. U, however, the "deter.-.nined /undetermined" flag for the coefficient C is set to . undete::rined", processing continues at processing block 3203 whe:e a test dete=ines if the bit SA of the coefficient C is one.
If the bit SA of the coefficient C is not one, processing continues at processing block 3207. On the other hand, if the bit SA of coefficient C is one, processing continues at processing block 3204 where a test deter=dnes is the sign of the coefficient C is positive. If the sign of the coefficient C is not positive, the decision is coded at "negative sigrdficant" in WgToup context(s) (processing block 3205), and the process continues at processing block 3Z29. If the sign of the coefficient C is positive, the derision is coded live significanC in "A-group" context(s) (processing block 32 as posIti 06), -. 54 - and the process continues at processing block 3229. At processing block 3229, the group flag for C is set to the "B-group".
At processing block 3207, a test determines whether the bit SA is zero for all the descendants (children) of the coefficient C. If bit SA is not zero, the decision is coded as "insignificant with significant children" (01) in "A-group" context(s) (processing block 3208), and the process ends. On the other hand, if the bit SA is zero for all the descendants (children) of the coefficient C, the decision is coded as "zerotree root" (00) is "A-0-otip" context(s) (processing block 3209). Thereafter, the "delbe.-.--.,ned/ur.deter,,nined" flag for all of the descend?.r.4b,s of the coefilc;ent C are set to "determined" (processing block 321,11), and the process ends.
The termination tent for the process may be Wheth.er or not a desired compression ratio is reached.
The binary events resulting fro= the a-pass may be entropy encoded under zeroth order Markov source context model. The 2 bit alphabet (size 4) resulting from the A-pass are encoded also under zeroth order Markov source, by a 4-ary (alphabet of size 4) arithmetic coder.
rigure 61B and 6B (continued) Illustrates an alternative implementation of the single list zerotree encoding process using reduced flag memory. The process of Figure 6B may be used as the A-pass in the process of Figure 30. Referring to rigure 6B and 6B (continued), the process begins by testing whether the result of 1V ANTDing coefficient C with the mask MA is zero (processing 3201). If not, the process ends. On the other hand, if the result of ANT1Ding coefficient with the mask MA is zero, processing continues at processing block ^0202 where a test determines if the "determined /undetermined" flag for the parent of the coefficient C is set to "undeter=dned". If the flag for the parent of the coefficient is not set to "undetermined", the process ends. If, however, the "determined /undetermined" flag for the parent of the coefficient C is set to "undeterrrdned", processing continues at processing block 3203 where a test determines if the bit SA of the coefficient C is one.
If the bit SA of the coefficient C is not one, processing continues at processing block 3207. On the other hand, if the bit SA of coefficient C is one, processing continues at processing block 3204 where a test deterrnines is the sign of the coefficient C is positive. lf the sign of the coefficient C is not positive, the decision is coded at "negative significant" in "A-g-,oup cc,-itext(s) (processing block 3205), and the process ends. If the Mgn. of the coefficient C is positive, the decision is coded as "positive significant" in "A-g-.oup" ccntext(s) (processing block 3206), and the process ends. In one ernbodirnent, a 4-ary coder is used and 4-ary doe-;c;nns are coded in one context. A binary coder and three context may be used (.g. the three contexts being the first bit of the decision, the second bit where the first bit is zero and the second bit when the first bit is a one).
At processing block 3207, a test determines whether the bit SA is zero for all the descendants (children) of the coefficient C. If bit SA is not zero, the decision is coded as Insignificant with significant chUdren", Isolated zero", (01) in A-group" context(s) (processing block 3208), and the process ends. On the other hand, if the bit SA is zero for all the descendants (cldldren) of the coefficient C, the decision is coded as xC ' O'D 0 XvIO i 0 zerotree rooC (00) is "A-group""context(s) (processing block 3209). Then, the "deter=tined/undeter=,ined" flag for the coefficient C is set to "determined" (processing block 3210). Thereafter, the "determined /undetenTtined" flag for all of the descendantb of the coefficient, which in turn have descendants, are set to "determined" (processing block 3211), and the process ends.
Decod,:-,r- ter.s Decoding in pcrto=cd in lockatep with the encoding.
Pigure Sc illustratts one arrangeant of the &-pass process for a ze:,, tTee horizon decoding process, and may be used in conjunction ivith the process of FiguTe 27. Referring to Figure 6C, the process begins by tesEng %,;&'.keth.er the group flag for coefficient C is set to the "A-STo,. 1p" (processing block 3521). If not, then the process ends. Hosvever, if so, processL-tg continues at processing block 3528 where a test determines if the "dete-,mined/undeterTnined" flag for the coefficient C is set to undeternined". If not, the process ends. If it is, then the process continues to processing block 3502 where the ternary decision is decoded in A-group context(s).
Then a test determines if the decision is "positive significant" (processing block 3503). If the decision is "positive significant", the sirm, of the coefficient C is set to positive (processing block 3505), the mtgn;t-t,.,-4e of the coefficient is set to 2A (processing block 3507), the group flag for coefficient C is set to the "B-gToup" (processing block 3541), and the process ends.
1 If the decision is not "positive significant, (processing block 3503), a test determines if the decision is "negative significant" (processing block 3504). If the decision is not "negative significanC, the process continues at processing block 3509 where a test determines if the decision is a zerotree root. If the decision is not a zerotree root, the process ends. If the decision is zerotree root, the "detern-dned /undetermined" flag for all decendants of coefficient C is set to "undetermined" (processing block 3531), and the process ends.
Ho,^.e,,.,er, if the test of processing block 3504 determines that the decision is "negative significanC, then the sign of the coefficient C is set to r.egat,,.e (processing block 3506), the magnitude of coefficient C is set to 2 SA (processing block 3507), the group flag for coefficient C is set to the BS-,cup (processing block.3541), and the process ends.
Figure 6D illustrates an alternative arrangement of the A-pass process for a zerotree horizon decoding process using reduced flag memory, and may be used in the process described in Figure 30. Referring to Figure 6D, the process begins by testing whether the result of AN-Ding coefficient C with the mask MA is zero (processing block 3501). If not, then the process ends. However, if the restdt of ANDing coefficient C with the.
mask MA is zero, processing continues at processing block 3508 where a test determines if the "determined /undetermined" flag for the parent of C is "undetern-dned". If not, the process ends. If it is, then the process continues to processing block 3502 where the ternary decision is decoded in A-group context(s).
Then a test determines if the decision is "positive significant" (processing block 3503). If the decision is "positive significant", the sign. of 5X CXXA N 010 Ove the coefficient is set to positive (processing block 3505), the magnitude of the coefficient is set to 2A (processing block 3507), and the process ends.
If the decision is not Positive significanC, a test determines if it is Unegative significant" (processing block 3504). If the decision is not Wnegative significant", the process continues at processing block 3509 where a test determines if the decision is a zerotree root. If the decision is not a zerotree root, the process ends. If the decision is zerotree root, the "determined /undetermined" flag for the coefficient C is set to "determined" (processing block 3510), the "determined /undetermined" flags for all decendants of coefficient C, which in turn have decendants, are set to "undetermined" (processing block 3511), and the process ends.
However, if the test of processing block 3504 determines that the decision is "negative significanC, then the sign of the coefficient C is set to negative (processing block 3506), the magnitude of coefficient C is set to 25A (processing block 3507), and the process ends.
Alternatives exist to the choice made by Shapiro to use 4-ary decisions to describe trees. Larger alphabets may be used to further specify the characteristics of an entire tree when coding the root of the tree. In one embodiment, the following set of 6-ary decisions are used.
insignificant with insignificant children (zerotree root) insignificant with at least one significant child significant, positive and all children non-negative sigitificant, positive and at least one child is negative significant, negative and all children are non-positive significant, negative and at least one child is positive =h\ i_l - - 59 in thin example, sign information in addition to insignificance In predicted for an entire tree. in other axe lea, trees with other sign constTaints or with magnitude constraints can be predicted. Alternativepredictors might be especially useful in representing texture or in representing multi-resolution features. With larger alphabets, the use of igher order Markov contexts (as described later) may be useful.
Multi12ass Ust Based joint 512acefFreguenc): Embedded Modells Frequency wabodded coding, such an Horizon order modeling disclosed herein, encodes the ternary events corresponding to the coefficients in the A-group. In horizon coding, all of the irL:t.:alizatio-,Ls preceding the coding steps are identical to the frequency- based Wystam. 1Binary entropy coding Is perfomed wit-h three contexts, "A-group magnitude," "A-gro..ip sign" and "B-g-.oup.
rigure 71 is a flow diagraa of one axwwlo of the A-pags for a sincle list horizon encoding process. This proce-ss may be used in the process of Figure 27. Referring to Figure 7A, the A- pass process begins by testing whether the group flag for coefficient C is set to the "A-group" (processing block 3111). If not, the process ends. If the group flag for coefficient C is set to the "A-gToup", processing continues at processing block 3102 where a test determines if the bit SA of coefficient C is one.If the bit SA of coefficient C is not one, the decision is coded as iTuignificant (0) in A-group" context (processing block 3103) and the process ends. If the bit SA of coefficient C is one, then processing continues at processing block 3104 where a test determines whether the sign of coefficient C is positive. 1f the sign of coefficient C is positive, the decision 19 C,r",D OV\axvlp- i is coded as "positive significant (10) in "A-group" context(s) (processing block 3106), and the process continues at processing block 3117. On the other hand, if the sign of coefficient C is not positive, the decision is coded as "negative significanC (11) in "A-group" context(s) (processing block.
0 53105), and the process continues at processing block. 3117. At processing block 3117, the group flag for coefficient C is set to the "B-group".
0 Figure 7b in a flow diagraa of an alternative arrangwwnt of the &- rkass for a single list horizon encoding process using reduced flag mernon...
This process may be used in the process of Figure 30. Referring to Figure 7B, the A-pass pi Dcess Legins by testing whether the restill. c,,f AllbM:"-" 0 0 coef.-'.'cen&b C the rnask MA is zero (processing block 31101). If not, ". =-r, 0 the process ends. If the result of ANMing coefficient C with the rna-sk MA is zero, processL-.g continues at processing block 3102 where a test deterr,-.,--es if the bit SA of coefficient C is one. Lf the bit SA of coefficient C is not cne, the decision is coded as insignificant (0) in "A-gr.oup" context (Processinblock 3103) and the process ends. If the bit SA of coeffident C is 0 cne, theripTocessing continues at processing block 3104 where a test determines whether. the sign of coefficient C is positive. If the sign of coefficient C is positive, the decision is coded as "positive significant" (10) in "A-group" context(s) (processing block 3106), and the process ends. On the other hand, if the sign of coefficient C is not positive, the decision is coded as "negative significant" (11) in "A-group" context(s) (processing block 3105), and the process ends.
25]Dgco,-;i,ne NO 1 Pigure ?C Illustrates one example of the A-pass process for a single list horizon decoding process and may b used in the process of Figure 27. Referring to Figure 7C, the process begins by testing whether the group flag for coefficient C is set to the WgToup,' (processing block 3411). If not, then the process ends. However, if the group flag for coefficient C is set to the Wgroup", processing continues at processing block 3402 where the ternary decision is decoded in A-group context(s).
Then a test determines if the decision is "positive significant" (processing block 3403). If the decision is "positive significant", the sigr, of the coefficient C is set to positive (processing block 3405), the magnitude of the coefficient is set to 25A (processing block 3407), the gToup flag for coefficient C is set to the '13-gTnup" (processing block 3418), and the process ends.
If the decision is not "positive significant", a test deternnines if it is negative sig-,uficant" (processing block 33404). If the decision is not -. negative sigrdficant", the process ends. However, if the decision is Rtnegative significant", then the sign of the coefficient C is set to negative (processing block 3406), the magnitude of C is set to 25A (processing block 3407), the group flag for coefficient C is set to the "B-group" (processing block 3418), and the process ends.
rigure 7D illustrate& an alternative ale of the A-pass process for a single list horizon decoding process using reduced flag memory, and may be used in the process of Figure 30. Referring to Figure 7 7D, the process begins by testing whether the result of AND.ing coefficient C with the mask MA is zero (processing block 3401). If not, then the o"xe O.A ,XX49' ?AO - 62 0 process ends. However, if the risult of ANDing coefficient C with the mask MA is zero, processing continues at processing block 3402 where the ternary decision is decoded in A-group context(s).
Then a test determines if the decision is "positive significant" (processing block 3403). If the decision is "positive significant", the sign of the coefficient C is set to positive (processing block 3405), the magnitude of the coefficient is set to 25A (processing block 3407), and the process ends.
If the decision is not "positive significanC, a test determines if it is negative significant" (processing block 3404). If the decision is not "negative sigrificant", the process ends. However, if the decision is '. negative significanC, then the sign of the coefficient C is set to negative 1,proce-cs.-ig block 3406), the magnitL.de of C is set to 25A (processing block 34D77), and the process ends.
B-;a5c for Both Zerntree and Horizon In on arrange=ant, the Z-Pass process for both zerotrec and horizon of the present Invention are the sum. ales of the a- pass algorythm for the encoding process and the decoding process are shown in Figures SA & BB and 9A & 9B respectively.
p U illustrates on ozole of the &-pans process that in used partially for zerotree and single list horizon encoding process, and may be used in the process of Figure 27. Referring to Figure SA, the process initially tests whether the group flag for coefficient C is set (processing block 3311). If not, then the process ends. On the other hand, if the group flag is set, processing continues at processing block 3302 where a test determines if the bit 5B of coefficient C is "I". If the bit of 5B of the _ 1, 1 v / coefficient C is not T', then the'decision is coded as "0" in "B-group" context(s) (processing block 3303), and the process ends. If the bit SB of the coefficient C is 'T', then the decision is coded as "I" in "B- group" context(s) (processing block 3304), and the process ends.
Figure 83 Illustrates an alternative example of the a-pass process that is used partially for zerotree and single list horizon encoding process and uses reduced flag memory, and may be used in the process of Figure 30. Referring to Figure BB, the process irtitially tests whether the result of AN1Ding the coefficient C with the mask MB is non-zero (Frocessing block 3301). If not, then the process ends. On the other hand, if the result of ANDing coefficient C with mask MB is non-zero, processing cc-.tir,,.jes at processing block 3302 where a test determines if the bit SB of C is 'T'. If the bit of 5B of the coefficient C is not 'T', then the is coded as "0" in "B-group" context(s) (processing block 3303), Wid the process ends. If the bit 5B of the coefficient C is 'T', then the decision, is coded as 'T' in T-g.roup" context(s) (processing block 3304), and the process ends.
Figure 9A illustrates one example of the 5-pass decoding which may be used in the process of Figure 27. Referring to Fig,=e 9A, a test initially determines if the group flag for coefficient C is' set to the "B-gToup" (processing block 3611). If not, then the process ends. However, if the group flag for coefficient C is set to the "B-group", then the der-ision are decoded in the '13-group" context(s) (processing block 3602). A test then decides if the decision is a Y (processing block 3603). If the decision is not a "1", the process ends. If the decision is a ^1", the bit 5B Of coefficiens. C is set (processing block 3604) and the proces ends.
Figure 9B Illustrates an alternative arrangement of the S- pass decoding using reduced flag nowry, and may be used in the process of 'Figure 30. Referring to Figure 913, a test initially determines if the result of ANDing coefficient C with the rnask MB is nonzero (processing block 3601). If the result of ANDing coefficient C with the mask MB is zero, then the process ends. However, if the result of ANDing coefficient C with the mask MB is non-zero, then the decisions are decoded in the B-g-oup" context(s) (processing block 3602). A test then decides if the decision is a 'T' (processing block 3603). If the decision is not a 'T', the P-ocess en.Is. If the decision is a "I", the bit 5B of coefficient C;s - zt..! (processing block 3604) and the process ends.
Using the cornbination of zerotree order coding and horizon o:der coding, the arrangement provides bit-significance encoding of the coefficients generated by the reversible wavelets. Note that the use of both t.e A-g-oup and the B-group, and the ternary and the binary events, corresponding to the 'W' and 'W' passes, respectively, is especially important in view of the fact that a switch is made from using the zerorree ordering to the horizon ordering at the end of any A pass. This compensates for the inefficiency in prediction that accompanies zerorree ordering at the low order bits. Therefore,. the system begins by zerotree coding the higher order bits data, and after a number of passes through the lists, i.e., after a number of bitrlanes are encodecr, the encoder switches to encode the rernaLnder of the data using horizon coding. The number of passes can be chosen statistically or can be chosen adaptively by monitoring the performance of zhe zerotree ordering coding block.
* 1 1V 1 - P V -, F Context-Model Alternative-& is in = exaWic, five binary ec=text bins are used. This 1 mmll when compared with other systems such as IBIG which uses slightly more than 1024 contexts. Compression may be improved by using more context bins. Decisions may be conditioned on spatial location, level, andlor bit position. Decisions may also be conditioned on previously decoded data that is close to the current data in spatial location, level, andlor bit position. In general, zeroth order Markov contexts described earlier may be replaced with higher order Markov contexts.
Sonne examples are as follows. The most sioficant (and therefore mest eassily predicted) bit of each rnantissa (B-group data in some could use a different context than the rest of the bits. The significant decision could be conditioned on the same decision made for spatially close previous coefficients at the sarne level. Sin. ilarly, the sign bits for sioficant coefficients might be cond.toned on the sign of spatally close previous coefficients at the same level or the sign of the coefficient of the parent.
Context model improvements might be especially important when 20 compressing images that have spatial or multi-resolution structure. Grayscale images of line drawings or text are an example of images with both of these types of structure. Improvements are also important for compressing files that already have to be compressed and decompressed with a specified peak error.
ax,gp1CP A The above system may be Implemented in hardware and/or software. A hardware Inplamentation of the system requires implementation of the wavelet filters, memory/data flow management to provide the data for the filters, a context model to control the embedded coding of the present invention, memory/data flow management to provide the data for the context model, and a binary entropy coder.
Wavelet Filters One example of a forward wavelet filter in whom In -Figure 10. The wavelet filter sho in Figure 10 accommodates 4 16-bit two's complement input pixels, shown as x(2)-x(5).
Referring to Figure 10, the two tap 1 V' low-pass filter uses one 16-bit adder 1001. The outputs are called S and D, respectively. The output nf the adder (5) is truncated to 16 bits using shift-by-1 block 1003. The shift by-1 block 1003 performs a divide-by-2 function by shifting its 17-bit input to the right one bit.
The six tap %1 -18 -8 1 V' high-pass filter requires the computation of -50 + 4D1 + 52. The function S2 - 50 is computed with 16-bit subtractor 1005 receiving the output of shift-by-l block 1003 and the Yo(O). 'The 4D1 term is computed using subtractor 1002 and shift-by-2 block 1004. The output produced by 16-bit subtractor 1002 is shifted to the left two places, thereby effectively multiplying its output by four. Adding the 4D1 output from shift-by-2 block 1004 to the output of subtractor 1005 is performed by 20-bit adder 1006. The output of the final adder is truncated to 18 bits using shift-by-2 block 1007. Shift-by-2 block 1007 performs a divide-by-4 function by shifting its 20 bit input to the right two bits.
0 i Thus, the total computational hardware required (not counting registers for storing temporary results) is:
1 @ 16-bit adder, 2 @ 16-bit subtractors, 1 @ 19-bit adder.
Note that shifting is performed by the wiring, such that no logic is needed.
In other embodiments, for inputs of size N, one N-bit adder, two N-bit subtractors and one (N+3) bit adder may he used.
Due to the extremely low hardware cost of these adders Isubtractors, parallel implementations of the filters can be used if desired.
Note that alternatively, instead of subtracting X(3) and X(2), X(4)-X(5) can be computed and saved until needed later as X(2)-X(3) for the next sl-dft or application of the filter. Both the forward filter (and the inverse filter described below) may be pipelined to achieve higher throughput.
The inverse wavelet filter is shown in Figure 11. The inputs of YO(O) and YO(2) are subtracted by subtractor 1101. The result of the subtraction is shifted to the right two bits by shift-by-2 block 1102. This effectively divides the' output of the subtractror by 4. A subtraction is performed between the output of shift-by-2 block 1104 and the Y1(0) input.
The input YO(I) is shifted one bit to the left by shift-by-1 block 1103, thereby multiplying the input by two. After YC)(1) is shifted by 1 (multiplied by two), the LSB of the shifted value is the MB taken from the output of subtractor 1104 and combined with the 16 bits output from shift-by-l block 1103 to form an input for adder 1105 and subtractor 1106. The other input for adder 1105 and subtractor 1106 is the output of subtractor 1104. The A outputs of adder 1105 and subtrictor 1106 may subsequently undergo clipping.
A choice of two clip operations may be used. In both cases, the 20-bit value is shifted by 1 (divided by 2), to a 19-bit value. For a systtm that only performs lossless compression, the least significant 16 bits can be output (the remaining 3 bits can be ignored). In a lossy system (or a lossyllossless system), the 19-bit value is set to zero if it is negative or set to 216-1 if it is greater than 216-1; otherwise, the least significant 16 bits can be output.
For inputs of size N bits, one N-bit subtractor, one (N+2) bit subtractor, one (N+3) bit adder and one (N+3) bit subtractor may, be used, and the clip unit outputs N bits.
Memory Usage Vith respect to memory and data flow management for the wavelet filter& described above for imagen where a full tram can fit In memory, memory/data flow management is not a difficult issue. D...en for 1024 X 1024 16-bit medical images (e.g., 2 Mbytes in size), requiring a full frame buffer is reasonable for many applications. For larger images (e.g., A4, 400 DPI 4-color images are about 50 Mbytes in size), performing the wavelet transform with a limited amount of line buffer memory is desirable.
Note that a full frame buffer is not necessary for the present invention to implement a one-pass system. Because of this, the memory required may be reduced by about a factor of 100 (compared to using a full frame buffer for large images). The one-pass system is described later.
1 i The data stored in the filter memory is a series of coefficients that are to be subjected to the embedded coding and binary entropy coding. The embedded coding uses a context model to coordinate the use of frequency based coding or horizon coding, and to provide data in the proper order.
The context model operates in conjunction with a memory management scheme. For systems with a full frame buffer, providing data in the proper order is not difficult. For systems without a full frame buffer, the transform data management scheme of the one-pass embodiment of the present invention (described below) provides coefficients to the context model such that the context model only needs to buffer coefficients for one tree. A one pass frequency based context model and one pass joint space/frequency context model operate on one tree at a time.
The result of the embedding operation. is to produce bit streams from the frequency based modeling mechanism, and the joint space/frequency modeling mechanism These bit streams are then encoded using a binary entropy coder.
For system with a full frame buffer, any binary entropy coder (or other appropriate coder) can be used. For systems without a full frame buffer, either multiple independent coders must be used, or the coder must be able to simulate multiple independent coders. Also, memory or channel management is needed to keep track of the outputs from the independent coders. An advantage is that the data to be managed is prioritized (embedded). If sufficient space or bandwidth is not available during compression or transmission less i important data can be discardedon the fly, providing for reasonable lossy compression.
One Pass System The'. one-pass transform allows the input data in the system to be completely processed as it is received. In such a system, the processing of the data is not dependent on data that follows. The memory required to compess an image is independent of the length of the image. by ramoving the dependency, the one-pass 10. system can output compressed data before all of Che data has been processed.
A. Di!ta ki?naú,e--nent fpr CEC-T-lasc TransfQrm i Figure 12 illustrates a section of an image that is being compressed in a raster order by band fashdon,'.
-4. Consider a four level decomposition. Each tree has 24 X 24 = 16 x 16 =2.56 coefficients. However, since the high-pass filter of the wavelet transform is overlapped, each tree depends on more than 256 input pixels. The two tap 1 V' low-pass filter (L) does not cause any overlap, all of the overlap comes from the six tap "-1 -18 -8 1 V, high-pass filter (H). The largest overlap occurs for the cascade of three applications of the low-pass filter followed by one application of the high pass filter (LLLH). Three applications of the low-pass filter G.LL) require a support of 23 m 8 input pixels. Support regions BA pixels in size are shown in Figure 12. When the high-pass filter is included in the cascade, the support regions is (6 X 23) X (6 X j3) = 48 x 48 pixels. A 48 x 48 pixel support region, consisting of thirty six 8 x 8 blocks as shown in Figure 12.
Assume that the coefficients in 48 x 48 pixel support region shown in Figure 12 are currently being processed. Ihe lightly shaded portion of the support region depicts pixels that have already been used in previous support regions. The lightly shaded part that is outside the support region illustrates pixels that have already been used in previous support regions and will be needed in future support regions. The black 16 x 16 region is the part of the support region that contains pixels that have not been used previously. SL-.nilarly, the darkly shaded 16 x 16 region contains pixels that have not been used previously but which will be used in the next 48 x 48 support region. One three-level 16 x 16 transform is computed, the pervious results for eight other three-level 16 x 16 transforms are recalled frorn a buffer, and the fourth level of the transforin is applied to the nine 16 x 16 three-level transforms. The buffering required to acco=plish this is enough to store the three level transform coefficients for (2 x widffi_of_image +32) x 16 pixels, plus enough to store a 16 line (one band) buffer of pixels.
Figure 13 Is a block diagram of one example of the one pass wavelet filtering unit which includes a filter control unit 1301, a Inemory 1302 and a filter 1303. Filter 1303 comprises the filter described in conjunction with Figure 10. Mernory 1302 refers to the memory described above in conjunction with Figure 12 and stores either pixels or coefficients. Filter control unit 1301 determines the data flow between mernory 1302 and ffiter 1303. The operation of the filter control unit 1301 is explained below.
03 ED 0 9 0 Figure 14 illustrates an arternative wavelet filter unit. To achieve high speed Operaticm, multiple filter@ can he U50d. %a CMO arrangmant since filter 1303 requires 4 or 5 inputs (e.g., inverse filter, forward filter) and produces two outputs, the memory bandwidth required could be substantial. The memory might have multiple pixels /coefficients per location, multiple banks andlor multiple ports. A memory interface unit 1401 reduces the memory bandwidth required by providing small buffers for local data used during processing. Memory interface unit 1401 also provides multiplexing/demultiplexing between the input/output (L10) of 10mernory 1302 and the I/0 of filter 1303.
Ln addition to the memory bandwidth required for filtering, bandwidth may be required for input of the pixels into rnernory 1302 and output of the coefficients to the context model. If pixels are input in raster order, additional memory may be required for the band buililer.
If a memory stores multiple elements (pixels or coefficients) per location, instead of storing horizontally or vertically adjacent elements in a row or colurnn, it may reduce the amount of memory accesses and buffering required if elements in a NxN block, when N is a power of 2, share the same location. This allows equal convenience for vertical and horizontal accesses.
Multiple banks of memory may also be implemented so that both horizontal and vertical access can take equal advantage of multiple banks as shown in Figure 15. For the two bank case, a bank. select bit providd for selecting either of the banks may be formed, in one embodixnent, by exclusive Wing the L5Bs of the horizontal and vertical coordinates. For the four bank case, the two bank select bits may be formed by adding .,n 1 le 51 PQ,, 0 n10-11 (module 4 with a 2-bit adder) tKe two L5Bs of the horizontal and vertical coordinates.
Figure 16 illustTates the one-pass filter operation for a 2-level decomposition implementation by the filter control unit 1301 (Figure 13).
Note that for illustration purposes, a 2-level description will be discussed first to illustrate the general technique. in other oza=pless 3level, 4-loyal, or high level decompositons are used. A two level decomposition has 16 coefficients. per tree and requires computation with 16 input pixels that have not been used previously. The filtering for a tree of coefficients is performed in 16 or fewer time units to correspond with the input and output rate. For this example, two filters operatL-ig in parallel are used to achieve the desired throughput of two f."ering operations per unit time. For each spatial location, where the leading edge of a filter is applied, Figuxe 16 shows a number that indicates the tirrie that each filtering operation is performed.
Since the order of filtering is determined by the leading edge of the filter, filtering does not generate all the coefficients of one tree before generating any of the coefficients of the next tree. The filtering of the &dldren of the tree occurs before the filtering of the parents, and low-pass filtering is done before the corresponding high-pass filtering. The filtering operates on A-group of coefficients which has the same number of coefficients of a type that a tree does.
The level 1 horizontal filtering is performed during time 0 through 7 and the results are stored in a temporary buffer. (Each spatial location results in two coefficients). During time 2 through 9, vertical filtering is performed (using the second filter) on data in the buffer and data from "a-D OW, t t - 14 previous horizontal filtering frdm memory (twice per spatial location). Vertical filtering can begin as soon as the second horizontal filtering operation is complete. The HH, HI. and LH coefficients are ready for output to the context model (at the appropriate time). The LL coefficients 5 are used in the next level.
With only two filters, level 0 zero horizontal filtering cannot begin until time 8 when the level 1 horizontal filtering is complete, maldng a filter available. Level 0 horizontal filtering cannot finish until time 10 one cycle after the level 0 vertical filtering is complete, proving all the required data. Next during time 11 and 12, the level 1 vertical filtering can occur.
Table 1 below summarizes the operation of each filter during each tim e unit. The format of the entries is level number, horizontal or vertical ("H" or "V") and the spatial location of the leading edge. The inputs of vertical filtering operations are identified as either lowpass to I-dghpass with a subscript "L" or "H". Note that it is not necessary to assign one filter to perform horizontal filtering and the other to perform vertical filtering, since both filters are identical.
Table 1
Time Filter 1 Filter 2 0 1H(0,0) (idle) 1 1H(0,1) 2 1H(2,0) 1VL(0,0) 3 1H(2,1) WWOM 4 1H(0,2) IVL(0,2) 1H(0,3) 1VHM0) 6 1H(2,2) 1VL(0,2) 7 M(2,3) 1VW0,2) 8 OH(0,0) WL(2,2) 9 (idle) IVH(2,2) OW0,1) (Idle) 11 OVL(0,0) 12 OvW0,0) 13 (idle) 14 (idle) is - While level 1 horizontal filtering can begin again for the next group of input pixels at time 11, this would cause the filter to operate faster than the input and output rate. Instead,. the filters will be idle and the next group will be started at time 16. Idle filtering cycles may be used for memory transfers. Instead of occurring at the end 5PP ofcxGxlgplx.- 0) of the filtering for each group, the idle cycles may be distributed among the filtering cycles if desired.
In view of the explanation of the 2-level case, the three level case is shown in Table 2. Concatenations of two or four time units are used to transfer the information onto one page, thereby making it easier to read. Table 2 Tirne] Filter 1 Filter 2 0-3 2H(0,0), 2H(0,1), 2H(2,0).2H(2,1) (idle),(idle) WM0,0), 2VH(0,0) 4-7 2H(4,0), 2H(C), 2H(6,0) 2H(6,1) VL(2,0), 2VH(2,0), 2VM4,0), 2VH(4,0) 8-11 2H(0,2), 2H(0,3), 2H(I2) 2H(I2,3) 2VL(C0), WH (6,0), 2VI,(0,2), 2ll (0,2) 12-15 2H(C2), 2H(4,3), 2H(6,212 2HW3) VL(2,2), 2VHQ.2), VL(4,2), 2VH(4,2) 16-19 2H(0,4), 2H(0,5), 2H(2,4) 2HMS) VL (6,2), 2VH (6,2), VL (0,4), 2Vii (0,4) 20-23 2H(C4), ZH(4,5), 2H(6,4) 2H(6,5) VL(2,4), 2VH(2,4), 2V1J4,4), 2VH(C4) 24-27 2H(0,6), 2H(0,7), 2H(2,6) 2H(2,7) 2VL(6,4), 2VH (6,4), VL(0,6), 2VH (0,6) 28-31 ZH(4,6), 2H(C7), 2H(6,6) 2H(6,7) 2VL(2,6), 2VH(2,6), VLOM, 2VH(C6) _1 1H(0,0), 1H(0,1), 1H(2,0) 1H(I1) VL(6,6),2VH(6,6), 1V1J0,0), WH(0,0) 32 35 36-39 1H(O.2), 1H(0,3), IH(2.2) 1H(2,3) IVL(2,0),-IVH(2,0), 1V1J0,2), WH(0,2) 40-43 OW0,0, (idle), OW0,1), (idle) VL(2,2), lIH(2,2), (idle), WL(0,0), 44-47 1 2VH(0,0), (idle), (idle), (idle) 48-51 52-55 (!We) Cidle) 56 60-63 Table 3 illustrates the four level case. Since there are now 256 time units per group of coefficients, for simplicity, only the level and direction of filtering is shown.
Table 3
Z] Filter 1 Filter 2 ETirne 0-1 Level 3 Horizontal (idle) 2-127 Level 3 Horizontal Level 3 Vertical IZ8-129 Level 2 Horizontal Level 3 Vertical 130-159 Level 2 Horizontal Level 2 Vertical 160-161 Ley. el 1 Horizontal Level 2 Vertical 162-167 Level 1 Horizontal Level 1 Vertical 168 Level 0 Horizontal Level 1 Vertical 169 (idle) Level 1 Vertical Level 0 Horizontal (idle) 171 (idle) Level 0 Vertical 172 (idle) Level 0 Vertical 173-2.55 (idle) (idle) The output of the filtering and mc=ry gubgygtom I@ & series of coefficients that undergo bit-significane added coding.
B. Thg Context Model- for the One-Pass System q in one arrangement, the bit significance embedded context model for the one-pass system, each tree is processed in four parts. The root of the tree, the highest level LL coefficient, is coded by one-pass horizon nrder coding. The three subtrees starting ivith each of the roots three children, the highest level HH, HL and LH coefficients, are processed with both one pass joint spacelfrequency modeling and one pass frequency-based modeling. The coefficients are coded such that encoded data may be output prior to the bit significance embedding context model operating on all of the data.
One-Pass Sigmificance Tree The zerotree context model cannot be used in the one-pass system. Zerotree requires a list (or multiple lists) that contains every
coefficient and zero-tree makes multiple passes through the lists(s). An alternative frequency-based model, one-pass significance tree, does not require any lists containing all the coefficients. Another difference between one pass significance tree and zerotree is that significance tree processes all children before processing its parents when generating decisions, in contrast to zerotree which processes parent first.
The context =del which forms the coder of the present invention is shown In block diagram form In Figure 17.
context =del 1700 contains two processing units, the sign/magnitude unit 109 (Figure IA) and the significance unit 1702. Context model 1700 also uses two memories (with memory control logic), a magnitude memory 1701 and a tree memory 1703. Each of these two memory units may be implemented with multiple storage areas tu Cow for alternating use duringMgh speed operation (i.e., while data is being written into one, the other is being read, or emptied).
The magnitude memory 1701 reorders coefficients in the tree into an order based on significance, such as an order based on their magnitude.
This is accomplished by maintaining a queue for each possible magnitude.
The significance unit 1702 receives coefficients in order of significance (e.g., magnitude) and generates decisions for a coder that handles the A pass algorythm. Tree memory 1703 is coupled to significance unit 1702 and eliminates zerotrees after all zeros.
The following discussion assumes that the coefficients are 18-bits and that the input data has undergone a four level decomposition.
One embodiment of the sign/magnitude unit 109 is shown in Fig-ure 18 and converts input coefficients into a sign/magnitude format.
Sign/magnitude unit 109 is coupled to receive 18 bits of the coefficients and includes an inverter 1801, a multiplexer (MUX) 1802, a priority encoder 1803 and a counter 1804. The sign/magnitude unit 109 outputs a sigrdficance indication (e.g., a 5-bit value), the mantissa of the input coefficient, (e.g., 17 bits), the sign of the input coefficient 1 bit and an index from counter 1804, (e.g., 7 bits.) MUX 1802 is coupled to receive 17 bits of the coefficient directly input into sign/magnitude unit 109 and an inverted version of the 17 bits from two's complementer 1801. Based on the sign bit (coefficient bit 17) received on the select input of NM 1802, the positive of the two inputs is output as the mantissa.
The sign/magnitude unit 109 uses a priority encoder 1803 to determine the first significant bit of each coefficient. Based on the first -sosignificant bit of each coefficienC, a significance level may be associated with the coefficient.
Couriter 1804 is used to associate an index with the current tree element. For a four level decomposition, the index varies from 0 to 84 (because 1 + 4 + 16 + 64 = 85. the number of elements in a subtree). The input coefficients are in tree order, which is assumed to be parents first, children last in this example. The coefficients are from different levels of decomposition as shown in Table 4 for the. coefficients in order.
Table 4
Level Coefficients index 0 0 1 1,22,43,64 2 2, 7, 12, 17, 23, 28, 33, 38, 44, 49, 54, 59, 65, 70, 75, 80 3 3 6,8 11,13 16,18 21,24 27,29-32,34 37,39 42, 48,50 53,55 58,60 63,66 69,71 74,76 79,81 84 Figure 19 is one embodiment of the block diagram of magnitude memory 1701. A counter and a memory is associated with each possible significance level (except nothing is needed for zero coefficients which do 15not need to be coded). For instance, counter 1916 and memory 1936 are associated with significance level 17. In one embodiment, there are sixteen levels of significance. Therefore, there are 17 co=ters and 17 associated memories.
In one embodiment, eachmemory must have 85 locations, for each possible coefficient in a subtree (since each subtree contains 85 coefficients), but the memory size might be rounded up to a power of 2, such as 128, for convenience. Each memory entry can contain a sign bit, a 7-bit index and N magnitude bits, where N is the significant level. If the use of a fixed width memory is desired, entries for significant 16 and 0, 15 and 1, etc. can be combined, so that each word has two entries totaling 32 bits. Of course, with an odd number of significance levels,.one word must contain only one entry, which is level 7 in tInds example.
Sign, index, and mantissa values received from sign/magnitude unit 109 are written to the appropriate memory at the address provided by the associated memory's counter. The associated counter is then incremented so that Che next coefficient at that significance level may be stored in the next location.
Memory is read out from each of the memories 1920-1926 in descending order of significance. The output of each coefficient includes its mantessa, sign, and index output. If counter for the higbest level Of significance (e.g., level 16) is nonzero, it is decremented and the memory is read at that address. This is repeated until the counter value is zero. Then the next level of significance (e.g., level 15) is considered. Each level of sigrdficance is considered in turn until all the counters have been decremented to zero and all the memories emptied.
In a real-time system, it may be desirable to use two banks of counters and memories, so that one bank can be used for input while the other is used for output.
k The counters address thefir associated memory such that a LIFO (last in, first out) is implemented. A LIFO is the correct order for when subtrees are input in the order of parents first. Alternatively, if subtrees were input child first, the operation of the counters could be changed to implement a FIFO (first in, first out).
Figure 20 is a block diagram of one embodiment of significance unit 1702. Referring to Figure 20, index counter 2001 is used to step through each coefficient in a subtree, children first. In one embodiment, index counter 2001 is iritialized to 84 and counts down to zero. Significance counter 2004 begins at the maximum significance level (e.g., 16 in the example) and counts down every time index counter 84 completes a cycle (returns to 84), such that the significance counter 2004 keeps track of the bitplane. The level of a particular index is detem-dned by logic (index to level 2003) that performs the function shown in Table 4 above.
Magnitude memory urdt 1701 provides an index, magnitude and sign of the next coefficient in the memory enabled by the output of the significance counter 2004. If the index input from memory is the same as the index output of index counter 2001, the equivalence logic 2002 asserts the nonzero output indication. The non-zero output indication sigrdfies that the magnitude memory should provide the next index, etc. on the next cycle. If there is not a match, then a non match indication is sent to discussion generator 2008.
In one embodiment, three flip-flops, shown as flag 0 (2005), flag 1 (2006), and flag 2 (2007), are used to keep track of non-zero data and are assigned to decomposition levels 0, 1 and 2, respectively. Note that the number of fhp-flops required is one less than the number of decomposition levels. Flip-flopi 2005-2007 are initially cleared. When the non-zero signal from equivalence logic 202 is asserted, all of the flip-flops in flip-flops 2005-2007 that assigned to a level less than the current level are set. The flip-flop assigned to the current level is cleared. The level is provided by index-to-level logic 2003, which provides the level in response to the index provided by index counter 2001.
Toded" flags are stored (in some ernbodixnents a register file), one bit for each index. When the non-zero signal is asserted, the bit associated with the current index counter value in the coded flags storage is set.
Otherwise, if the significance counter value is the maximum value, the associated bit is cleared. Otherwise, the value of the bit remains unchanged. The already coded output signal from coded flags storage is the same as the new value of the bit associated with the current index. Note that in an alternative embodiment, the coded flags are not used and the already coded signal is never used.
In one embodiment, decision generator 2008 determines when the current level is 3 and the previous level was not. In response to fijs determination, decision generator 2008 asserts the start output and the start level output is the previous level. If the non-zero signO is asserted, the decision generator 2008 outputs a decision as "significant" and also outputs the sign (00,01) and the mantissa. Otherwise, if the already coded input is asserted, no decision is output. Otherwise, if the flag flip-flop assigned to the current level is set, decision generator 2008 outputs the decision as Insignificant, with significant children" (10). Otherwise, decision generator 2008 outputs the decision as "insignificant, and children insignificant" (11) and asserts the all zero signal.
1.
Note that to implement both frequency-based modeling and horizon one pass joint space/frequency modeling, the following change is made to significance unit 2000. Significance counter 2004 is compared with a threshold, and the all zero output is only asserted if the counter value is greater than the threshold.
In one embodiment, the significance category input to tree memory 1703 (shown in Fgiure 21 and described below) is the output of the significance counter 2004. In this embodiment of the context model (e.g., bit-significance embedding unit), the significance category is based on the number of bitplanes, and there are 17 different categories of significance.
This is an arbitrary choice. In another embodiment, bitplanes may be combined to create fewer significance categories. Also, level information can be added to bitplane information to create more significance categories.
More significance categories might provide better lossy compression while fewer might reduce hardware complexity.
Figure 21 is a block diagram of one embodiment of the tree memory unit of the present invention. Referring to Figure 21, memory 2101 has adequate space for storing a decision and a significance indication for each possible decision. In one embodiment, for a four level decomposition with 17 significance levels, the number of locations in memory 2101 is equal to 85 x 17 = 1445.
To access memory 2101, addresses are generated. Counter 2102 is initially zero. When decision generator 2008 does not assert the all zero input, the value in counter 2102 is used to address memory. If decision generator 2008 asserts the start input, the current value of counter 2102 is 1 -asstored in one of registers 2110-2f 12 according to the start level, which acts as a selection mechanism. Counter 2102 is then incremented.
When decision generator 2008 asserts the all zero input, the value in the register (e.g., 2110, 2111, 2112) selected by the level input is used to address memory 2101 and Eds value plus one is loaded into counter 2102. This causes the memory locations used for insignificant children of an insignificant parent to be ignored.
During memory output, counter 2102 is decremented to provide the address of the location to output. Output (and decrementing) stops wher, 10counter 2102 reaches zero. lle output from tree memory unit 2100 is received by an entropy coder that properly codes the decision at the specified significance.
For real-time operation, two trLze memory units can be used so that one is used for input while the other is used for output.
1! Coefficient Alienment In one system an described above, the zorotree context model uses an unnormalized 1 + Z-1 low-pass filter. However, the zerotTee context model may be used with normalized filters, such as 1 + Z-1 12 In order to use normalized filters, an alignment unit, such as alignment unit 2200 in Figure 22 between the forward wavelet filter 1000 and the context model 105, can be used to compensate for the energy gained (or alternatively, lost) from the unnormalized filter, which improves compression. Because alignment allows non-uniform - 86 quantization for lossy operatiog, alignment can enhance the visual quality of lossy image reconstructions. In the one-dimensional case, coefficients from each level of the tree would have different alignment (divisors = -,, r2-, 2, 2-2, 4, multipliers'= 2-2, 2, -2, 1). In the two-dimensional case, the divisors would be 2, 4, 8, 16 and the multipliers would be 8, 4, 2, 1.
Since the alignment is just for grouping similar binary decisions for coding, using the exact normalization value is not critical. The alignment mu.st be inverted during decoding,.so both multiplication and division are required. Using factors/ divisors that are powers of two would allow hardware efficient shifting to be performed instead. When coefficients are multiplied by a power of two, the lessor signfficant zero bits added do not have to be coded.
However, instead of limiting the alignment factors/ divisors to power of two, an approximation like -2-. - 1.5 or -;2-.. 2. 1.5 can be used with the following method. Instead of multiplying/ dividing coefficients by the factor/divisor, only the "sigrdficant" coefficients would instead be scaled by the factor/divisor. The sign/magnitude unit may be modified as shown in Figure 23 to include a "15' priority encoder 2301 that returns the position of either (1) the most significant "1" bit if the next most significant bit is "I" also, or otherwise (2) the one less than the position of the most significant "1" bit. A truth table for a '15' priority encoder for 3 input bits is shown in Table 5.
- 87 1 Table 5
InEut (Bina!l) output 001 0 0 011 1 1 101 1 2 ill 12 Depending on the level of the coefficient indicated by the current index value, a multiplexer 2302 selects the signfficance. from either the standard priority encoder or the 'IS' phority encoder. Whenever the 'IS, alignment is used, the mantissa contains N+1 bits, where N is the significance value. Otherwise, the mantissa contains N bits.
An alignment unit 2200 comprising a two input multiplexer acting as a shifter can implement aligning by 1 or 2. Combining U-ds with the 1.5 alignment provided by the sign/magnitude unit allows alignments of 1, 1.5, 2, or 3 which is a good approximation of the desired multipliers for onedimensional signals since the numbers are simpler (e.g., powers of 1 two). (For two-dimensional sigals like images, the numbers are simpler.) During decoding, the N+2th bit of the mantissa (which is not coded) is the complement of the N+1th bit when the "15' priority encoder is used...
Coefficient alignment can be used for tuning the zerotree and for finer and non-uniform quantization. In case of images (two dimensional signals), no example of the RTS-transform align the Coefficients bY rn,.,ltiplyin.g the frequency band by the numbers depicted in Fi&nire 31. N1ul t- lying these numbers results in the RTS-transform being a very close apProxirnation of the exact reconstruction wavelets of the TS10 transforrns.
The e,-,-,cp,. coder must take into account the al;gr--nent proceSs be efficient.
Fret,enc%.-ba5ed Centext _Models by Fractional B,.Z:Ianes 1 to An alternative method of frequency-based modeling uses ftacti.--,al bitpla.nes or fractonal bits of significance. One iinplemen!aticn of this is to process each bitplane twice, such that the passes include an AI-pass, a Bl-pass, an A0-pass, and a BO-pass. Note that the names of the passes were chosen because the Al-pass handles coefficients startLng %..,ith '11" and the 20 AD-pass handles those starting with 'IT.
During the AI-pass for bitplane 5, a coefficient in the A-group is significant only if both bits S and -5-1 are non-zero. During the A27pass, a coefficient in the A-group is significant if bit S is non-zero. Since 4the t-,vo most significant bits are knoum, the Bl-pass and the BOpass only need to 25 process 5-1 bits (assurning S=0 is the least significant bitplane).
IQ "Qy 15.1 -1 - eg Since alternate fractional Sitplanes differ by a factor of 13 or 2/1.50 alignment for differmt levels can be achieved by grouping the desired fractional bitplanes for each level.
Fractional bitplanes cause finer modeling of the data by the parent/child relationship used by frequency-based context model. More than two passes, for example, four or eight passes could be used for even finer modeling. For example, in the four pass case, the All-pass would handle coefficients that. started with "111". The other passes would handle "110, " '101" and "10V Less fine modeling could also be used. For example, a pass could be made only for every other bitplane. In the less fine r.-icdeIL-ig case, more bits are coded by the B-group.
C. Coder and,,Iemcl5/Chanrel'I',lan7.gerrent for 0--,e-PacR Memory management for coded data in the one pass system is presented for systhems that store all of the data in.mernory and for sysle-is that transmit data in a channel. In the one-pass systern, coded data -,.ust be stored such that it can be accessed in an embedded causal fasl-uon, so that less sig-.uficant data can be discarded without losing more significant data. Since coded data is variable length, dynamic memory allocation can be used.
In one arrangement, the added coding scheme uses 18 bitplanes and, thus, assigns 18 levels of significance to the data. The coder in a one-pass system must be "embedded causal." That is, the decoding events corresponding to a bitplane do not require information from lower order bitplanes. In the one-pass case, typically all of the bits from one tree will be coded before any of the bits in the next tree 00 - 90 1 4 are coded, so bits of different siBdicance are not separated. For coders that do not use internal state, like Huffrnan coders, this is not a problem.
However, many sophisticated compressors with better compression use.
internal state.
One way to solve this problem for these coders is to use 18 different coders, perhaps 18 Q-coder chips. A technique that would allow the use of 9 Q-coder chips is described in U.S. Patent No. 5,097,261 (1-angcinn, Jr. ), entitled "Data Compression for Recording on a Record Mediurn," issued March 17, 1992. A better way uses a pipelined coder to implement different virtual codes with a single physical coder, such as that described in U.S. Patent Application Serial No. 08/016,035, ent,Aled "Method and Appara-Us for Parallel Decoding and Encoding of DaW, filed February 10, 1993. In such a coder, the multiple bit generator states for each prcbaL- i'li-,y, are each assigned to a part of the data. For example, each of 18 states cotod be assigned to a particular bitplane for 18 bit data. Registers in the sl, -ufter in the coder are also assigned to each part of the data. In the encoder, no interleaving is performed; each part of the data is simply bitpacked.
In arrangements either with multiple physical or virtual coders, rnemory is allocated to each part of the data. When compression is 2 0 complete, a linked list describing the memory allocated plus the contents of the allocated memory is the result.
If the memory overflows, the memory allocation routing causes more important data to overwrite less important data. For example, the least significant bit of numeric data might be overwritten first. The inforn-ation that describes how memory is allocated must be stored in addition to the coded data.
b Figure 24 shows an exam7ple dynamic memory a31ocation unit for three categories of signfficance. Only three categories are described to avoid obscurity; typically, a larger number of categories, such as 8, 16 or 18, would be used. A register file (or other storage) holds a pointer for each category of significance plus another pointer for indicating the next free memory location. The memory is divided into fixed size pages.
Initially, each pointer assigned to a significance category points to the start of a page of memory and the free pointer points to the next available page of memory. Coded data, identified with a significance category, is stored at the memory location addressed by the corresponding pointer. The pointer is then incremented to the next memory location.
l"r.e.-t the pointer reaches the maxim= for the current page, 14.,,e address of the start of the next free page stored in the free pointer is stored with the current page an a link. In one olc, the part of the codad data mernory or a separate memory or register file could be used for this purpose. Then the current pointer is set to the next free page. The fTee pointer is incremented. These steps cause a new page of memory to be allocated to a particular significance category and provide Lrdu to pages of memory contaIning data for a common signfficance category so that the order of allocation can be determined during decoding.
When all pages in the memory are in use and there is more data that is more signi.ficant than the least significant data in memory, memory reassigranent may be performed. Three such reassignment techniques are described. In all three cases, memory assigned to the least sig:uhcant data f 1 ap 1 - 92 t is reassigned to more sigrdficanf data and no more least significant data is stored.
First, the page currently being used by the least significant data is simply assigned to the more significant data. Since most typical entropy coders use internal state information, all of the least significant data stored previously in that page is lost.
Second, the page currently being used by the least significant data is assigned to the more significant data. Unlike the previous case, t.e pointer is set to the end of the page and as more significant data is written to the page, the corresponding pointer is decremented. This has the advantage of preserving the least significant data at the start of the page if the more significant data does not require the entire page.
Third, instead of the current page of least significant data being reassigned, any page of least sigrdficant data may be reassigned. This requires that the coded data for all pages be coded independently, wl,,. ich may reduce the compression achieved. It also requires that the uncoded data corresponding to the start of all pages be identified. Since any page of least significant data can be discarded, greater flexibility in quantization is available.
The third alternative might be especially attractive in a system that achieves a fixed rate of compression over regions of the image. A specified number of memory pages can be allocated to a region of the image.
Whether lessor significant data is retained or not can depend on the compression a&deved in a particular region. Note that the memory assigned to a region might not be fully utilized if lossless compression required less than the amount of memory assigned. Achieving a fixed rate - 93 of compression on a region of tKe image can support random access to the linage regions.
When compression is complete, the data may be ferred, if desired, to a channel or storage device in order of significance. 'The various links and pointers would then no longer be needed and multipass decoding could be performed. Alternatively, for one-pass decoding, the pointers to the data for each signihcance can be kept.
In some applications, some significance categories might not be used. For example, a 16-bit compressoi might be used on a 12-bit medical irnage, so significance categories corresponding to bitplanes 1512 would be unused. In implementations with large pages and many unused significance categories, this would waste memory (when the system does not know in advance that some categories are =used), since memory does not have to be allocated to them. Another solution to this mernorl waste would be to use a small memory (or register) to hold a count for each significance category. The count would keep track of the number of Insignificant, no significant children" decisions that occur before any other decision occurs. The memory required to store these counters must be "traded-off' against the memory used by =used significance categories.
The ability to write data into each page from both ends can be used to better utilize the total amount of memory available in the system.
When all pages are allocated, any page that has sufficient free space at the end can be allocated for use from the end. The ability to use both ends of a page must be balanced against the cost of keeping track of the location where the two types of data meet. Note that U-dz is different from the case where one of the data types wainot significant and could simply be overwritten.
Usinr a Channel In a system where data is transmitted in a channel instead of being stored in a mernory and fixed size pages of memory are used (but only one page per significance category is needed), when a page of memory is full, it is transmitted in the channel, and memory location can be reused as soon as they are transmitted. In some applications, the page size of the rr.ernory can be the size of data packets used in the channel or a multiple of the packet size. (Not that in on application, two pages per significance level can be used so that data can be written into one while the other is read for output to the channel.
In some communications systems, for exL-.nple A71,1 (Asynchronous Transfer Mode), priorities can be assigned to packets. AT.M has two priority levels, priority and secondary. Secondary packets are only transmitted if sufficient bandwidth is available. A threshold can be used to determine which significance categories are priority and which are secondary. Another method would be to use a threshold at the encoder to not transmit significance categories that were less significant than a threshold.
Lossy Compression with Bounded Peak Prror f In some applications, perfect (lossless) reconstruction is not -,,eeed.
It may be desirable to achieve compression with a specified maximum peak error. Let the peak error be:tE. This can be achieved by truncating :D lby - 95 the compressed data, so that all lessor significant data that is not needed to achdeve the desired accuracy is discarded.
Another way for achieving compression with a specified maximum peak error is to divide (with integer clivision) by a value less than or equal to 2xE+1 each pixel of the image to be compressed. During reconstruction, each pixel in the image is processed with:
output pLxel a (2xE+I) x input pixel +E.
(Alternatively, instead of adding.E duting deco ' mpression, subtraction can occur during compression prior to dividing by UE+1.) Another way to achieve compression with a specified maximum peak error is to replace the division and multiplication by shifts. The is 11c92(2xE+1)J. Because shifting is convenle.nt, a be-,,er error specification (replacing pealk error) might be errors of the form - %n<erro.,<-2n].
is The preceding should not be confused with quantization of coefficients that is well known in the art of lossy!=,age compresSion. In many lossy compression systems (e.g., JPEG), transform domain coefficients are assigned a maximurn peak error, which only indirectly control the peak error of the image. A critical difference is that the above performs the quantization on pixels and unes locale&@ compression of coefficients.
Transform domain quantization can also be used. Many coefficlents have an effect on peak error propagates through multiple levels of the transform. It is easier to determine the effect on peak error for the high- pass coefficients that have no cdldren.
- 96 Consider a one-dimensiofial signal which is to be encoded with a maximum peak error of L This can be achieved by quantizing the finest detail high-pass coefficients to 2E. For a two-dimensional signal, since.
there are two applications of the high-pass filter, the finest detail HH coefficients can be quantized to:t4E.
An alternative to using quantization of the input image is to control the decisions to the entropy coder. One example is the following. For ear-h coefficient, if setting the coefficient to zero would not cause
the error in any pixel affected by that coefficient to exceed the maximum error, the coefficient is set to zero. In some implementations only particular coefficients will be tested, perhaps only the AC coefficients that have no cl.-ul.'4re.n. Coefficients can be considered with a greedy strategy. %!here one is considered at a time. Other strategies can consider small gToups of coefficients and choose to zero the largest possible subset of the group.
Attention In directed to Application No. 9518298.6 (Publication No. 2,293,733) from which this case In divided and which claims the encoder described above.
Attention In also directed to co-divisional applications S (Publication No.2 '501- and 1, 19 L%-5,5 (Publication No. 'I so 1 I.PrIrP which respectively claim the wavelet filter of Figure 11 and other aspects of the coder described above.
Finally attention In directed to Application No. 9518299.4 (Publication No. 2,293,734) which claims related methods of coding data.
I\..
p 00) APPMWIX void RTS M w, m, n) 5 int W, M, n; int T; is - 97 ZI Code For ITS Transform (Forward) - One Level Docoup int i, j, k; int X, Y; for U-D;i<n;i++) for (Jmo;jcm;j+m2) for (j-O; J<m/2; j++) X0/21 m (T[iw+jl+T[iW+J+11)>>1; Y[j/21 - TUw+j]-T[i+j+13; void InverseRTS (T,W^n) int w,m,n; int T; int i, J; int B, D; for U.0;i<n;i++) T [im+j 3 X 1J 1; T[iM+M/2+Jlm (-X[J]+(Y[(J+1)1k(m/2)3.cc2)+X((j+2) % W2M> >2; Zx&Wlo Code For RTS Transform (Inverse) - One Level Daccup for (jmo;j<m/2;j++) for (JmO;Jcm/2;J++) B[J1 m (-T[iin+jl+Ttim+((J+2)1r(m/2))])&OX3; D[(j+1)k(m/2)l - ((T[iM+JI- Ttim+((J+2) Ir W2M+ (T tiM+M/2+j 1,C.C2) +3 ti 3 >>2) TUw+2J] a ((T[iM+J]<<1)+D[jl+l)>>1; TUw+2j+11 - TUw+2j] - D[J3; is Z DoomW - IRTS Transform (Forward) void RTS Mw,mM Int w,m,n; int T; int 1,j,k; int temp; int X, Y; for (imo; i<n;i++) for (J.O;J<m/2;J++) for (JwO; jcm; j+m2) X[J121 - (T[iw+jl+TtiW+J+11)>>1; Y[J/21 TUw+j]-TUw+j+13; for (Jmo;j<m;j++) 25 temp [im+jlmx[jl; temp [im+m/2+Jlm (X[J]+(Y[(J+1)9i(M/2)Icc2)+Xt(J+2)ti(m/2)])>>2; for (iwO;i<n;i+m2) X[i/21 m (temp[im+jl+temp[(i+l)M+J])>>1; Y[i/21 m temp[im+jl-temp[(i+l)m+ jl; for U.0;i<n/2;i++) T Uw+J 1 mX U3; T [ (i+n/2) w+j 1 (-X fil + (Y [ (i+l) lk (n/2) 1 <<2) +X [ (1+2) Ir (n/2) 3) >>2; Two Loyal DcoW - ILTS Transform (Inverse) void InverseRTS (T,w,m,n) int w,m,n; int T; int i,j; int B, D; int temp; is for (iwo;i<n;i++) - 99 for (Jmo;j<m;j++) for (iwo;icn/2;i++) for (imD;i<n/2;i++) BUI m (-T[iW+JI+T[((i+2)b(n/2))W+J])&OX3; Dl(i+1)t(n/2)l - ((T[iW+JI- T[((i+2)b(n/2))w+jl+ (T[(n/2+i)w+jl.c<2)+Bfil)>>2); temp(2im+J] a ((T[iw+jlccl)+DIII+1)>>1; temPH2i+i)m+J] m temp(2im+J] - D[i]; for (j.0;J<m12;j++) for (j.0;jcm/2;j++) i B[j] - (-temp[im+jl+temptim+((J+2)t(m/2))])&OX3; DHj+1)t(M12)l - ((tempUm+ j]- temp[im+((J+2)ti(M/2))]+ (temptiM+M/2+jl<c2)+B[j])>>'2); TUw+2j] - ((temp[im+jlc<l)+Dtjl+l)>>1; TUw+2j+11 m TUw+2J) - D[J1; - 100 1 1r. A 1 m 8 1. A coder for encoding a plurality of data symbols comprising:
a formatting unit coupled to receive the plurality of data a ols for formatting the plurality of data a ymb elm Into a not of formatted data a ols; a significance unit coupled to the formatting un to generate a plurality of decisions in response to &eh of the plurality of data symbols each decision being Indicative of the significance of the. corresponding data symbol; a memory mechanism coupled to receive the plurality of decisions from the significance unit for storage and output.
2. A coder according to claim 1, wherein the plurality of data symbols comprises a plurality of coefficients.
it 3. A coder according to claim 1 or 2, wherein the formatting unit comprises a sign magnitude unit for converting the plurality of data symbols into the not of formatted data symbols formatted in sign magnitude form.
4. A coder according to claim 3, wherein the sign magnitude unit c=Wrines:
a significance determination mechanism to output a significance indication for each data symbol; a sign and mantiona generator coupled to receive each of the plurality of data symbols and generate sign and mantissa for each of the plurality of data symbols; and - 101 an Index counter for generating an index for each of the plurality of data symbols.
5. A coder according to claim 4, wherein the significance determination zacchanism comprises a priority encoder.
6. A coder according to claim 4, wherein the significance determination zacchanion comprises a pair of priority encoder and a selection zacchanium to select between outputs from each of the pair of priority encoders to output the significance Indication.
7. A coder according to any one of claims 1 to 6 further comprising a magnitude zacmory coupled to receive tL plurality of formatted data symbols for storage.
8. A coder according to claim 7, wherein each of the plurality of formatted data symbols in stored In the magnitude memory based on significance level.
9. A coder according to clain 8, wherein the magnitude memory comprises a plurality of storage areas, wherein each of the plurality of storage areas stores data for a distinct significance level, said magnitude memory further comprising a plurality of counters, wherein each of the plurality of counters in associated with one of the plurality of storage areas to provide addresses for storage of the formatted data symbols.
GB9622826A 1994-09-20 1995-09-07 A coder Expired - Lifetime GB2305829B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US31014194A 1994-09-20 1994-09-20
US08/310,146 US5748786A (en) 1994-09-21 1994-09-21 Apparatus for compression using reversible embedded wavelets
GB9518298A GB2293733B (en) 1994-09-20 1995-09-07 Encoder including an embedded coder for performing bit-significance encoding

Publications (3)

Publication Number Publication Date
GB9622826D0 GB9622826D0 (en) 1997-01-08
GB2305829A true GB2305829A (en) 1997-04-16
GB2305829B GB2305829B (en) 1997-10-22

Family

ID=27267893

Family Applications (3)

Application Number Title Priority Date Filing Date
GB9622826A Expired - Lifetime GB2305829B (en) 1994-09-20 1995-09-07 A coder
GB9618683A Expired - Fee Related GB2302245B (en) 1994-09-20 1995-09-07 Wavelet transform filter
GB9618630A Expired - Fee Related GB2302244B (en) 1994-09-20 1995-09-07 Wavelet transform filter

Family Applications After (2)

Application Number Title Priority Date Filing Date
GB9618683A Expired - Fee Related GB2302245B (en) 1994-09-20 1995-09-07 Wavelet transform filter
GB9618630A Expired - Fee Related GB2302244B (en) 1994-09-20 1995-09-07 Wavelet transform filter

Country Status (1)

Country Link
GB (3) GB2305829B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2325584B (en) * 1997-05-01 2000-03-29 Ricoh Kk Decompression system using inverse wavelet transform
JP2002501709A (en) 1997-05-30 2002-01-15 インターバル・リサーチ・コーポレーション Method and apparatus for performing wavelet-based data compression
JP3792067B2 (en) * 1998-03-19 2006-06-28 シャープ株式会社 Visual progressive coding method for images
FR2823338A1 (en) * 2001-04-10 2002-10-11 Koninkl Philips Electronics Nv Digital MPEG post processing having frequency transformation step providing transformed coefficient assembly with original base/high frequency coefficients extracted/correction step carried out/combined transformed coefficients produced.

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0234861A2 (en) * 1986-02-28 1987-09-02 AT&T Corp. Packet generation apparatus and method
EP0272505A2 (en) * 1986-12-22 1988-06-29 International Business Machines Corporation Adaptive graylevel image compression system
US4999705A (en) * 1990-05-03 1991-03-12 At&T Bell Laboratories Three dimensional motion compensated video coding
WO1994017492A1 (en) * 1993-01-22 1994-08-04 David Sarnoff Research Center, Inc. Apparatus and method for compressing information
WO1995027337A1 (en) * 1994-04-01 1995-10-12 Dolby Laboratories Licensing Corporation Compact source coding tables for encoder/decoder system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5014134A (en) * 1989-09-11 1991-05-07 Aware, Inc. Image compression method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0234861A2 (en) * 1986-02-28 1987-09-02 AT&T Corp. Packet generation apparatus and method
EP0272505A2 (en) * 1986-12-22 1988-06-29 International Business Machines Corporation Adaptive graylevel image compression system
US4999705A (en) * 1990-05-03 1991-03-12 At&T Bell Laboratories Three dimensional motion compensated video coding
WO1994017492A1 (en) * 1993-01-22 1994-08-04 David Sarnoff Research Center, Inc. Apparatus and method for compressing information
WO1995027337A1 (en) * 1994-04-01 1995-10-12 Dolby Laboratories Licensing Corporation Compact source coding tables for encoder/decoder system

Also Published As

Publication number Publication date
GB2302245A (en) 1997-01-08
GB2302244A (en) 1997-01-08
GB9618683D0 (en) 1996-10-16
GB2302244B (en) 1997-10-22
GB2305829B (en) 1997-10-22
GB9618630D0 (en) 1996-10-16
GB9622826D0 (en) 1997-01-08
GB2302245B (en) 1997-10-22

Similar Documents

Publication Publication Date Title
US5748786A (en) Apparatus for compression using reversible embedded wavelets
US5867602A (en) Reversible wavelet transform and embedded codestream manipulation
US6873734B1 (en) Method and apparatus for compression using reversible wavelet transforms and an embedded codestream
US6195465B1 (en) Method and apparatus for compression using reversible wavelet transforms and an embedded codestream
US7418142B2 (en) Method for compression using reversible embedded wavelets
GB2293733A (en) Apparatus for image data compression using reversible embedded waveletts
JPH11168633A (en) Reconstruction execution method, reconstruction execution device, record medium, inverse conversion execution method, inverse conversion execution device, suitable reconstruction generating method, suitable reconstruction generator, coding data processing method, coding data processing unit and data processing system
GB2305829A (en) A context model coder
GB2313757A (en) Method using an embedded codestream
GB2302488A (en) Image data compression using embedded coding

Legal Events

Date Code Title Description
PE20 Patent expired after termination of 20 years

Expiry date: 20150906