![](https://csdnimg.cn/release/download_crawler_static/4233393/bg4.jpg)
2 Copyright
c
2002–2005 Michael D. Adams
Part 1 (i.e., [7]) of the standard as the baseline codec. The base-
line codec is simply the core (or minimal functionality) JPEG-
2000 coding system. Part 2 (i.e., [15]) describes extensions to
the baseline codec that are useful for certain “niche” applica-
tions, while Part 3 (i.e., [16]) defines extensions for intraframe-
style video compression. Part 5 (i.e., [17]) provides two refer-
ence software implementations of the Part-1 codec, and Part 4
(i.e., [18]) provides a methodology for testing implementations
for compliance with the standard. In this paper, we will, for the
most part, limit our discussion to the baseline codec. Some of
the extensions included in Part 2 will also be discussed briefly.
Unless otherwise indicated, our exposition considers only the
baseline system.
For the most part, the JPEG-2000 standard is written from the
point of view of the decoder. That is, the decoder is defined quite
precisely with many details being normative in nature (i.e., re-
quired for compliance), while many parts of the encoder are less
rigidly specified. Obviously, implementors must make a very
clear distinction between normative and informative clauses in
the standard. For the purposes of our discussion, however, we
will only make such distinctions when absolutely necessary.
III. JPEG-2000 CODEC
Having briefly introduced the JPEG-2000 standard, we are
now in a position to begin examining the JPEG-2000 codec in
detail. The codec is based on wavelet/subband coding tech-
niques [21, 22]. It handles both lossy and lossless compres-
sion using the same transform-based framework, and borrows
heavily on ideas from the embedded block coding with opti-
mized truncation (EBCOT) scheme [23–25]. In order to fa-
cilitate both lossy and lossless coding in an efficient manner,
reversible integer-to-integer [26–28] and nonreversible real-to-
real transforms are employed. To code transform data, the codec
makes use of bit-plane coding techniques. For entropy coding,
a context-based adaptive binary arithmetic coder [29] is used—
more specifically, the MQ coder from the JBIG2 standard [30].
Two levels of syntax are employed to represent the coded image:
a code stream and file format syntax. The code stream syntax is
similar in spirit to that used in the JPEG standard.
The remainder of Section III is structured as follows. First,
Sections III-A to III-C, discuss the source image model and
how an image is internally represented by the codec. Next, Sec-
tion III-D examines the basic structure of the codec. This is
followed, in Sections III-E to III-M by a detailed explanation of
the coding engine itself. Next, Sections III-N and III-O explain
the syntax used to represent a coded image. Finally, Section III-
P briefly describes some of the extensions included in Part 2 of
the standard.
A. Source Image Model
Before examining the internals of the codec, it is important to
understand the image model that it employs. From the codec’s
point of view, an image is comprised of one or more compo-
nents (up to a limit of 2
14
), as shown in Fig. 1(a). As illustrated
in Fig. 1(b), each component consists of a rectangular array of
samples. The sample values for each component are integer val-
ued, and can be either signed or unsigned with a precision from
Component 1
Component 2
...
Component 0
Component N−1
(a)
(b)
Fig. 1. Source image model. (a) An image with N components. (b) Individual
component.
1 to 38 bits/sample. The signedness and precision of the sample
data are specified on a per-component basis.
All of the components are associated with the same spatial ex-
tent in the source image, but represent different spectral or aux-
iliary information. For example, a RGB color image has three
components with one component representing each of the red,
green, and blue color planes. In the simple case of a grayscale
image, there is only one component, corresponding to the lu-
minance plane. The various components of an image need not
be sampled at the same resolution. Consequently, the compo-
nents themselves can have different sizes. For example, when
color images are represented in a luminance-chrominance color
space, the luminance information is often more finely sampled
than the chrominance data.
B. Reference Grid
Given an image, the codec describes the geometry of the var-
ious components in terms of a rectangular grid called the ref-
erence grid. The reference grid has the general form shown
in Fig. 2. The grid is of size Xsiz × Ysiz with the origin lo-
cated at its top-left corner. The region with its top-left corner at
(XOsiz,YOsiz) and bottom-right corner at (Xsiz− 1, Ysiz − 1)
is called the image area, and corresponds to the picture data to
be represented. The width and height of the reference grid can-
not exceed 2
32
− 1 units, imposing an upper bound on the size
of an image that can be handled by the codec.
All of the components are mapped onto the image area of
the reference grid. Since components need not be sampled at
the full resolution of the reference grid, additional information
is required in order to establish this mapping. For each com-
ponent, we indicate the horizontal and vertical sampling period
in units of the reference grid, denoted as XRsiz and YRsiz, re-
spectively. These two parameters uniquely specify a (rectangu-
lar) sampling grid consisting of all points whose horizontal and
vertical positions are integer multiples of XRsiz and YRsiz, re-
spectively. All such points that fall within the image area, con-
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m
Click to buy NOW!
P
D
F
-
X
C
h
a
n
g
e
V
i
e
w
e
r
w
w
w
.
d
o
c
u
-
t
r
a
c
k
.
c
o
m