Introduction To JPEG and Mpeg: Ingemar J. Cox University College London
Introduction To JPEG and Mpeg: Ingemar J. Cox University College London
Introduction To JPEG and Mpeg: Ingemar J. Cox University College London
MPEG
Ingemar J. Cox
University College London
Outline
Elementary information theory
Lossless compression
Quantization
1
H p( s) log 2 (
-5 -4 -3 -2 -1 0 1 2 3 4 5
-4 -2 0 2 4
Greyscale
Binary
Nov 27th 2006 Ingemar J. Cox 20
Fundamentals of images
A TV frame is about 640x480 pixels
If each pixels is represented by 8-bits for each
colour, then the total image size is
C (u )N 1
u
S (u ) s(n) cos (n 0.5)
C (u ) N 1 u
s ( n)
2 u 0
S (u ) cos
8
(n 0.5)
Nov 27th 2006 Ingemar J. Cox 30
Basis functions
DC term
where
1 C (u ) 1
C (0)
2
Nov 27th 2006 Ingemar J. Cox 50
Fundamentals of images
Discrete cosine transform
Coefficients are approximately uncorrelated
Except DC term
C.f. original 88 pixel block
Block-based DCT
Compute DCT on 88 blocks of pixels
Encoder
Decoder
2-step process
1. Convert zig-zag sequence to a symbol sequence
2. Convert symbols to a data stream
Nov 27th 2006 Ingemar J. Cox 58
Fundamentals of JPEG
Modes
Sequential
Progressive
Spectral selection
P-frames
B-frames
Interframe coded
Motion compensation
Based on past and future frames