Beruflich Dokumente
Kultur Dokumente
Introduction
Lossless and Lossy Coding Schemes
JPEG Standard Details
Summary
MULTIMEDIA
STORAGE/BANDWIDTH
REQUIREMENTS
Media type
Duration/Size
Bandwidth
Storage
Audio
CD-DA quality
Speech quality
60 mins
1.412 Mbits/lsec.
64Kbits/sec.
635MB.
28.8MB.
Image
Gray scale (8-bit)
Color (24-bit)
640 480
Video
NTSC
HDTV
60 mins.
~307KB.
~922KB.
221 Mbits/sec.
99.45 GB.
~922 GB.
JPEG Components
JPEG Modes
Four Modes:
Lossless JPEG
Sequential (Baseline) JPEG
Progressive JPEG
Hierarchical JPEG
Lossless JPEG
yb
yc
y abc
bc
2
ac
y b
2
ab
y
2
y a
Baseline JPEG
Level-shift the image is by subtracting 2n-1 from each pixel value,
where n is the number of bits used to represent each pixel
Divide the image into non-overlapping blocks of size 8 x 8
Apply DCT to each of the blocks to obtain the transform
coefficients
Baseline JPEG
DC Coefficient :
DC Coefficient Encoding
0
1
2
3
4
5
6
7
8
9
10
11
0
-1,1
-3,-2,2,3
-7...-4,4...7
15...-8,8...15
-31...-16,16...31
-63...-32,32...63
-127...-33,33...127
-255...-128,128...255
-511...-256,256...511
-1023...-512,512...1023
-2047...-1024,1024...2047
DC Coefficient Encoding
Encoding of Di : Vi . Gi . Mi
AC Coefficient Encoding
Category Table for AC coefficients available
Huffman Table for category numbers available
Express non-zero AC coefficients as : NNNNSSSS
NNNN : Runlength, R
NNNN : Number of zeroes between previous and
current non-zero AC coefficients
Runlength 16 : 11110000
Runlength >16 : qr , where q = Rdiv16 ; r=Rmod16
SSSS
AC coefficient values
1
2
3
4
5
6
7
8
9
10
-1,1
-3,-2,2,3
-7...-4,4...7
15...-8,8...15
-31...-16,16...31
-63...-32,32...63
-127...-33,33...127
-255...-128,128...255
-511...-256,256...511
-1023...-512,512...1023
AC Coefficient Encoding
16 possible Run Lengths (0-15) : NNNN
AC Coefficient Encoding
Express AC coefficients Ai as NNNNSSSS
Determine Vi the Huffman code corresponding to
NNNNSSSS
Determine Mi : relative magnitude of Ai within the category
Mi = (k-1) bits of the 1scomplementofAi
k : category number
Sign Gi : 1 if Ai 0; 0 if Ai<0
Encoding of Ai : Vi . Gi . Mi ( . : concatenation)
EXAMPLE
X=
Apply 2-D DCT
Y=
Quantize
EXAMPLE (CONTD.)
Z=
ZigZag Ordering
(39 3 2 1 1 1 0 0 0 0 0 1 EOB)
Huffman Encode
(100101/0100/0110/001/000/001/11110100/1010)
Progressive JPEG
Formation of coefficients and Quantization similar to
Baseline JPEG
Each coefficient coded in mulitple scans
Each succesive scan refines Image
Two types:
Spectral Selection
Successive Approximation
Progressive: Successive
Approximation
Hierarchical JPEG
Hierarchical Encoder
R-Component
JPEG
Compression
Apply
Color Image
G-Component
JPEG
Compression
Apply
B-Component
JPEG
Compression
Y-component
(Luminance)
JPEG
Compression
Y Cr Cb
or
YUV
Cr, Cb component
(Chrominance)
Subsample
Apply
by 2
JPEG
Compression
in H & V
1.
Lossless Mode
1. Baseline Mode
. Progressive Mode
Hierarchical Mode