You are on page 1of 197

MPEG2 Video and Audio

Compression Overview

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

Tektronix Video Signals Diagram


SDTV
576p
576i
(625)
480p
480i
(525)

Analog
Composite
625i
525i

Analog Composite Video


(PAL/NTSC/SECAM)

Parallel Digital Composite


PAL=17.7MB/sec
NTSC=14.3MB/sec
10 Bits

B-Y
R-Y

Matrix

G
B
R

Composite
Encoder

Parallel

A to D
Conv

A to D
Conv

A to D
Conv

A to D
Conv

Ancillary Data
(Audio)

CRC
Calculator

Copyright 2006 Tektronix Inc.


3
(Rev 8/5/07)

Data
3Gb/sec

Encoder

Video
Video

Clock
Divide
by 10

Clock
270MHz
1.485GHz

NRZ

Single Program
Transport Streams

PSI MPEG
PSIP ATSC
SI DVB
PCR

PTS
DTS

Video

Serial Digital Component - D1


ITU-R BT.601 (SMPTE259M)
270Mb/sec
ITU-R BT.709 (SMPTE292M)
1.485Gb/sec

Shift
Register
Serializer

Coprocessor

Audio

Dual Link
SMPTE372M

Multiplexer
Multiplexed 27MB/sec
Multiplexed 0.1485GB/sec
TDMA CB/Y/CR/Y/CB/Y
10 Bits Parallel

13.5MHz
74.25MHz
Sample
Rate for Y

DVD
Digital Versatile
(Video) Disk

MPEG2 Program Stream

Transmission
Channel
Multiplexer

PB

Output video
files to many
applications

Clock X10

Y, B-Y, R-Y Scaled to


Y Pb Pr

PR

Input video
files from
many sources

Serial Digital Composite


143Mb/sec (NTSC)
177Mb/sec (PAL)
D2 and D3

Serializer

Color Difference
Component
4Fsc
Analog Video (PAL=17.7MHz)
(Y, B-Y, R-Y) (NTSC=14.3MHz)

Component
Analog Video
(GBR)

6.75MHz
37.125MHz
Sample
Rate for CB
and CR

Video File Server

Tx

VQoS
(Video Quality of Service)

Scrambler NRZI
Encoder

Compressed Video/Audio
Picture
Quality
Monitoring

Generation, Analysis
and Monitoring

Serial Digital Component - D1


ITU-R BT.601 (SMPTE259M)
270Mb/sec
ITU-R BT.709 (SMPTE292M)
1.485Gb/sec

Analog Composite Video


(PAL/NTSC/SECAM)

Decoder

Single
Program
Transport
Streams

Transmission
Channel
Analysis
MultiProgram
Transport
Stream

De-Multiplexer

HDTV
1080p
1080i
(1125)
720p
(750)

Transmission
Channel
Rx

Data
Audio

Set Top Box

1. Telco
a. SDH
b. ATM
c. SONET
2. Satellite
a. DVB-S
QPSK,
8PSK
3. Cable
a. DVB-C
16, 32,
64 QAM
4. Terrestrial
a. DVB-T
COFDM
b. ATSC
8VSB
5. Internet
a. Streaming
Video
b. VoIP
c. GigE
d. IPTV

Why We Need Compression

Non-compressed
Bitmap Image = 2,300,000 Bytes

Compressed
JPEG Image = 159,000 Bytes

14.5 times data reduction for just one image!!

Why We Need Compression

With MPEG2 Compression

~39MB per minute of compressed video


Full movie (~120 minutes) on 1 DVD

Without MPEG2 Compression

~11GB per minute of non-compressed video


Full movie (~120 minutes) on ~280 DVDs!!!

Why We Need Compression

What is the purpose of video compression?

Reduce the amount of data required to be transmitted to create the


picture at the receiver.
MPEG2 (Moving Picture Expert Group) is one type of compression out of
several selected for DTV.
Being used by ATSC and DVB.
19.39Mb/s using 8VSB modulation can fit in 6MHz bandwidth

COFDM using 8MHz per channel, data rate varies based on many factors

FCC is allocating 6MHz per terrestrial broadcast channel.

270Mb/s
480 Viewable
Lines for 525
(576 lines
for 625)
720 Pixels per Line

Why We Need Compression

What is the purpose of video compression?

Compression
fx
270Mbits/s

270Mbits/s
2-8 Mbits/s

Decompression
fx
2-8 Mbits/s

480 Viewable
Lines for 525
(576 lines
for 625)
720 Pixels per Line

Why We Need Compression

Compression Concepts

Lossey Compression

Identify video that is redundant and only send it one time.


Identify video a human cannot see and do not send it.
Identify video a human will not see if it is degraded and send it
in a degraded format (less data).
This video cannot be recovered at the receiver.

Lossless Compression

This video can be completely recovered at the receiver.


Like ZIP function

Why We Need Compression

Applications

Storage Media
DVD Digital Versatile Disk
Video servers
Intra-studio
Point-to-point (SDTI being developed by SMPTE)
Networking (user requirements being specified by
EBU/SMPTE)
Internet
Streaming Video
Video Conferencing
Education
Entertainment
Medical Diagnostics

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

Digital Television Overview Block


Diagram
Program
Production

Program
Compression

VBR

Single Program
Transport Streams

Rate
Control

Transmission
Program
Demux

Energy
Dispersal
FEC

V
B
R

Set Top Box

C
B
R

Multi-Program
Statistical
Multiplexing

Modulate

Program
Decompression

C
B
R

Program
Display or
Reuse

Digital Television Overview Block


Diagram
Program
Production

Program
Compression

VBR

Single Program
Transport Streams

Rate
Control

Transmission
Program
Demux

Energy
Dispersal
FEC

V
B
R

Set Top Box

C
B
R

Multi-Program
Statistical
Multiplexing

Modulate

Program
Decompression

C
B
R

Program
Display or
Reuse

Digital Television Overview Areas of


Application

Cable
Headend

Telco

Content Provider

Network Affiliate

Digital Television Overview Formats

Standard Definition Television (SDTV)

16:9 Aspect Ratio, 525 (480p) lines


16:9 Aspect Ratio, 525 (480i) lines
4:3 Aspect Ratio, 525 (480p) lines
4:3 Aspect Ratio, 525 (480i) lines

High Definition Television (HDTV)

All 16:9 Aspect Ratios


1125 (1080p) Horizontal Lines
1125 (1080i) Horizontal Lines
750 (720p) Horizontal Lines

Digital Television Overview

Many Types of Digital Compression

H.261 and H.263 Video Conferencing


JPEG, still images (Joint Photographic Experts Group)
M-JPEG; motion JPEG, not a standard, generally proprietary
MPEG-1, CD-ROM and multimedia (Moving Picture Experts
Group)
MPEG-2, Broadcast entertainment/contribution
and DVD
ITU H.264/AVC (ISO/IEC-14496-10 MPEG4-Part 10)
DVC/DVC-Pro, consumer, broadcast ENG, tape format optimized

Digital Television Overview Data Rates

HDTV Rec 709

1.485 Gb/s

10-bit Rec 601

270 Mb/s

8-bit Rec 601 (active only)

167 Mb/s

H.261, H.263 videoconferencing

4 kb/s - 2 Mb/s

MPEG-1

0.5 - 1.8 Mb/s

MPEG-2 SDTV contribution

18 - 50 Mb/s

MPEG-2 SDTV distribution

2 - 8 Mb/s

MPEG-2 HDTV distribution

19 - 38 Mb/s

DVC-Pro SDTV

25 - 50 Mb/s

Digital Betacam

~90 Mb/s

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

MPEG Standards MPEG1 Summary

ISO/IEC 11172 (1993)


Design focused on non-interlaced (progressive) SIF
(352x240)
Application was media storage e.g., CD-ROM
~1.5Mb/sec data rate
Uses most of the H.261 techniques
Introduced the concept of B-frames
Trick modes are supported
Fast search, Reverse, etc.

Used in early DTV testing


MPEG2 is based on MPEG1

MPEG Standards MPEG2 Document


MPEG-2 ISO/IEC 13818

Part 1 Systems
Part 2 Video
Part 3 Audio
Part 4 Conformance Testing (for 1, 2 and 3)
Part 5 Software Simulation
Part 6 System Extensions - DSM-CC
(Digital Storage Media - Command and Control)
Part 7 Audio Extension - NBC (Non-Backward Compatible)
Part 9 System Extension - RTI (Real-Time Interface)
Part 10 Conformance Extension - DSM-CC

MPEG Standards Considerations

Only specifies bitstream syntax and decoding


Encoding algorithms are not defined
Asymmetric Compression

Encoder is very complex, Decoder definition


emphasizes low complexity (cost)
270Mbits/s
270Mbits/s

Compression
fx
Complex
Not Defined

480 Viewable
Lines for 525
(576 lines
for 625)
720 Pixels per Line

Decompression
fx
Simple
Highly Defined

2-8 Mbits/s

2-8 Mbits/s

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

MPEG2 Video Compression

Steps to Processing

Preprocessing
Clean-up pictures and prepare video samples
Temporal Compression (IntER-frame)
Compresses the data from multiple frames
Spatial Compression (IntRA-frame)
Compresses the data within one frame
(Similar to JPEG)
Rate Control
Constant bitrate
Constant (or nearly so) quality

MPEG2 Video Compression

Preprocessing

Required
Decode from composite to component
Produce correct picture size
Reduce 10-bit samples to 8-bit samples
Convert 4:2:2 to 4:2:0 sampling (entertainment quality)
Optional
Noise reduction
Other picture clean up
Film Scratches
Shifting Film (worn sprocket holes)
Film Grain

MPEG2 Video Compression


Preprocessing Step Convert 4:2:2 to 4:2:0

Pixel

Y
Sample
Cb
Cr
Sample Sample

Vertical Blanking

Active Video
line n

SDTV 720 pixels per line

line n + 263

HDTV More
Depending on Standard

line n + 1
line n + 264
4:4:4 Sampling

MPEG2 Video Compression


Preprocessing Step

Convert 4:2:2 to 4:2:0

Odd Field

To compress, reduce data


human will not notice if
slightly distorted color!
Convert interlace frame
to two fields

Interlaced Frame

Even Field

MPEG2 Video Compression


Preprocessing Step Convert 4:2:2 to 4:2:0
4:4:4 contains Y/Cr/Cb samples for each pixel.

8
8

Odd Field

MPEG2 Video Compression


Preprocessing

Step Convert
4:2:2 to 4:2:0

To see conversion,
split Y/Cr/Cb into
separate fields

Odd Field

MPEG2 Video Compression


Preprocessing Step Convert 4:2:2 to

4:2:0

When created SDI signal, skipped every


other color sample to reduce color sample
data by half
This is 4:4:4 to 4:2:2 sample relationship
and start with in SDI signal

Odd Field

MPEG2 Video Compression


Preprocessing Step Convert 4:2:2 to

4:2:0

Can further reduce color samples in data


stream before MPEG2 compression
Calculate average value of two vertical
samples and replace two sample with new
average value

New average
Cr value

Odd Field

MPEG2 Video Compression


Preprocessing Step Convert 4:2:2 to

4:2:0

Calculate average value of two vertical


samples and with new average value to
reduce color data samples by half

New average
Cb value

Odd Field

MPEG2 Video Compression


Preprocessing Step Convert 4:2:2 to

4:2:0

Calculate average value of two vertical


samples and with new average value to
reduce color data samples by half

Odd Field

MPEG2 Video Compression


Preprocessing Step: Convert 4:2:2 to

4:2:0

Calculate average value of two vertical


samples and with new average value to
reduce color data samples by half

Odd Field

MPEG2 Video Compression


Preprocessing

Step Convert
4:2:2 to 4:2:0
When overlay
samples, see
relationship of
4:2:0 Y/Cr/Cb
data

Odd Field

MPEG2 Video Compression


Preprocessing

Step Convert
4:2:2 to 4:2:0
When overlay
samples, see
relationship of
4:2:0 Y/Cr/Cb
data

Odd Field

Cr
Y
Y
Cb
Cr
Y
Y
Cb
Cr
Y
Y
Cb
Cr
Y
Y
Cb
Cr
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Cb

MPEG2 Video Compression


At the receiver, 4:2:0 converted back to 4:4:4

4:2:0

4:2:2

4:4:4

MPEG2 Video Compression


4:1:1 Chroma Sub-Sampling

MPEG2 Video Compression


MPEG Spatial

Compression

MPEG Building Blocks


Pixel
Individual picture
elements that define
the lowest level
addressable point in
a picture.
Block
8x8 Y samples
4x4 Cr and Cb
Macro Block
16x16 Y samples
8x8 Cr and Cb

MPEG2 Video Compression

Redundancies

Spatial Redundancies
Redundant information in the horizontal and vertical picture
dimensions. Data that is similar or repeats itself in picture
areas which are close to one another.
Temporal Redundancies
Redundant data over a given time. Data that is similar or
repeats itself from moment to moment, even if its location
in the picture area changes.

MPEG2 Video Compression

Spatial Redundancies

Similar areas in the same frame such as the sky and the street.

MPEG2 Video Compression

MPEG2 Spatial Compression

Based on Discrete Cosine Transfer (DCT) Process


8x8 Pixel Group
In this example, all 64 pixels are the same, the color of the sky.

8
8

MPEG2 Video Compression


MPEG2 Spatial Compression
720 Pixels

8
8

Cb Chroma Encoder
480 Lines

Cr Chroma Encoder
Y - Luma Encoder

Picture

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

Sample Values

64 identical
pixel values
would be sent
without
compression
applied. Can 64
samples be
reduced to fewer?

MPEG2 Video Compression

MPEG2 Spatial Compression

Example Luminance Sample Values


Show DCT sample values for selected block
Because all samples nearly same luminance
level, all DCT values
very close to the
same
Shown using the
Tektronix Elementary
Stream Analyzer
Settings>DCT
Display
Click on
Show DCT
soft key
Click on
macroblock
of interest

MPEG2 Video Compression

MPEG2 Spatial
Compression

Which of the blocks


at the right, most
closely resembles
the 8x8 pixel
pattern shown
below?

MPEG2 Video Compression

MPEG2 Spatial
Compression

In this case, it is
the first block
and none of the
others.

MPEG2 Video Compression


8

MPEG2 Spatial Compression

64 Pixel Values

Assign value to first DCT pattern equal


to the average luminance value for
the 8X8 pixel group.
All other pattern values set to 0.

Now just 1 DCT


Coefficient (DC_Avg)
(8 bits)

(512 bits)

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

MPEG2 Video Compression

MPEG2 Spatial Compression

1st DCT value equal to the average


luminance level of the 8X8 pixel group.
2nd pattern value 100.
All other pattern values set to 0.

Now just
2 DCT coefficients.

64 Pixel Values

(16 bits)

(512 bits)

125

105

85

75

55

35

15

125

105

85

75

55

35

15

125

105

85

75

55

35

15

125

105

85

75

55

35

15

125

105

85

75

55

35

125

105

85

75

55

125

105

85

75

125

105

85

75

62.5 100

15

35

15

55

35

15

55

35

15

MPEG2 Video Compression

MPEG2 Spatial Compression

1st DCT value equal to the average luminance level of the 8X8
pixel group.
2nd pattern value -100 because pixels almost exact inverse of
2nd pattern.
Other pattern values
set to 0.

Now just
2 DCT coefficients.

64 Pixel Values

(16 bits)

(512 bits)

15

35

55

75

85

105

125

15

35

55

75

85

105

125

15

35

55

75

85

105

125

15

35

55

75

85

105

15

35

55

75

85

15

35

55

75

15

35

55

15

35

55

62.5 -100

125

105

125

85

105

125

75

85

105

125

75

85

105

125

MPEG2 Video Compression

MPEG2 Spatial Compression

What DCT values describe this group of pixels?

MPEG2 Video Compression


8

MPEG2 Spatial Compression

64 Pixel Values

Working with our first example, what


do we do with all the 0s?

Now just
1 DCT coefficient.
(8bits)

(512 bits)

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

125

25

MPEG2 Video Compression


DCT Coefficient Processing Sequence
25

Zigzag or Classic
(for frames)

25, EOB

MPEG2 Video Compression


8

Spatial Compression Steps

Quantizer
512 bits

DCT
Decoder

Encoder Input DCT Coefficients


(a more complex block)

Encoder Output DCT Coefficients


Value for display only
not actual results

83

DCT
Encoder
512
bits
8

512 bits

512 bits
Encoder Quant Matrix Values
Value used corresponds
to the coefficient location

25, EOB
(16 bits)
8

512 bits

Divide by
Quant
Matrix

Quantizer-1
25, EOB
(16 bits)

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

25

MPEG2 Video Compression

MPEG2 Spatial
Compression

Similar areas in the same


frame such as the sky and
the street.
Examine video data on an
8x8 pixel block basis using
DCT.

MPEG2 Video Compression


MPEG2 Spatial Compression

Rise Time versus Signal Frequency Content

Time
Domain
1kHz
Sinewave

Freq.
Domain

0Hz

1kHz

2kHz

3kHz

4kHz

5kHz

6kHz

7kHz

MPEG2 Video Compression


MPEG2 Spatial Compression

Rise Time versus Signal Frequency Content

Time
Domain
1St Resultant
Sinewave
3kHz
Sinewave

Freq.
Domain

1kHz
Sinewave

0Hz

1kHz

2kHz

3kHz

4kHz

5kHz

6kHz

7kHz

MPEG2 Video Compression


MPEG2 Spatial Compression

Rise Time versus Signal Frequency Content

Time
Domain

2nd Resultant
Sinewave
1St Resultant
Sinewave
5kHz
Sinewave

Freq.
Domain

0Hz

1kHz

2kHz

3kHz

4kHz

5kHz

6kHz

7kHz

MPEG2 Video Compression

MPEG2 Spatial Compression

Rise Time versus Signal Frequency


Content
More harmonics of the fundamental
frequency create sharper edges but
need more spectrum

Freq.
Domain

0Hz

Hz

MPEG2 Video Compression

MPEG2 Spatial Compression

Rise Time versus Signal Frequency


Content
Fewer harmonics create softer edges
and need less spectrum which
translates into less data to compress
and send

Freq.
Domain

0Hz

Hz

MPEG2 Video Compression

MPEG2 Spatial Compression

Perception of Picture Frequency Content


How can we eliminate picture high frequency data and thus
reduce the bandwidth needed for the picture information?
Quantization is the answer

MPEG2 Video Compression

MPEG2 Spatial
Compression

What DCT values


describe this group of
pixels?

DCT Values that


represent low
frequency
information.

DCT Values that


represent high
frequency
information.

Low frequency
portion of the
DCT coefficient
matrices.
High frequency
portion of the
DCT coefficient
matrices.

86

-4

-3

54

19

-25

60

33

-20

20

42

-15

-30

-4

-1

-5

Low to
high
frequency
flow of
DCT
matrix
values

123 -20

19

22

-12

-12

10

-5

12

12

-5

Input DCT Coefficients


Input DCT Coefficients
Low Frequency Pixel Pattern High Frequency Pixel Pattern

7842

199

448

362

342

112

31

22

198

151

181

264

59

37

14

142

291

218

87

27

88

27

12

111

133

159

119

58

65

36

49

85

217

50

14

12

58

120

60

40

41

11

30

121

61

22

30

22

28

33

24

51

44

81

Divide by
Quant
Matrix

Encoder Input DCT Coefficients


(a more complex block)

980

12

23

16

13

12

11

13

To Decoder
Eventually

Encoder Output DCT Coefficients


Value for display only
not actual results

16

19

22

26

27

29

34

16

16

22

24

27

29

34

37

19

22

26

27

29

34

34

38

22

22

26

27

29

34

37

40

22

26

27

29

32

35

40

48

26

27

29

32

35

40

48

58

26

27

29

34

38

48

56

69

27

29

35

38

46

56

69

83

Encoder Quant Matrix Values


Value used corresponds
to the coefficient location

Quantizing process does the following:


1. Digitally filters out high frequency
picture content.
2. Makes big numbers small.
3. Lossey Compression

7840

192

437

352

338

108

29

192

144

176

264

54

29

133

286

208

81

68

38

110

132

156

108

58

34

44

78

216

29

52

108

58

32

35

26

108

58

34

35

Multiply
by
Quant
Matrix

Decoder DCT Coefficients

980

12

23

16

13

12

11

13

Eventually
From
Encoder

Decoder Input DCT Coefficients

(a more complex block)

Value for display only


not actual results

16

19

22

26

27

29

34

16

16

22

24

27

29

34

37

19

22

26

27

29

34

34

38

22

22

26

27

29

34

37

40

22

26

27

29

32

35

40

48

26

27

29

32

35

40

48

58

26

27

29

34

38

48

56

69

27

29

35

38

46

56

69

83

Decoder Quant Matrix Values


Value used corresponds
to the coefficient location

Reverse Quantization process does:


1. Restores small number back to
almost their original values.

MPEG2 Video Compression


Rate Control
Quantizing Data
Video in

Subtract/
Pass

Predicted
Present
Frame

RLC

DCT

No Loss,
No Data
Reduction

Data
Reduced,
Information
Lost

VLC

MUX

Q-1
-1

DCT
Quantizing - Lossey Compression
Reduce
Motionthe number of bits for each
coefficient.
Compensation
Give preference to certain SUM
Motion
coefficients. Fixed Store
Vectors
Reduction can differ for each
coefficient.
Motion Vectors
Motion
Estimation

Group of Pictures Control

Buffer

MPEG2 Video Compression


31, 42, 31, 56, 56, 31
Divide by
Quant
Matrix

Encoder Input DCT Coefficients


(a more complex block)

Run
Length

Encoder Output DCT Coefficients


Value for display only
not actual results

83

31, 42, 31, A2, 31


Variable
Length

Entropy Encoding
Run Length
Variable Length

To
the
Decoder

Encoder Quant Matrix Values


Value used corresponds
to the coefficient location

Run length coding - special code for repeating values (e.g., 13 2s, 5 1s, 4
6s and so on)

Lossless Compression

MPEG2 Video Compression


31, 42, 31, 56, 56, 31
Divide by
Quant
Matrix

Encoder Input DCT Coefficients


(a more complex block)

31, 42, 31, A2, 31 C, 42, C, A2, C

Run
Length

Encoder Output DCT Coefficients


Value for display only
not actual results

83

Encoder Quant Matrix Values


Value used corresponds
to the coefficient location

Variable
Length

Entropy Encoding
Run Length
Variable Length
Symbol
A
B
C
D
E
F

Probability
0.5
0.25
0.125
0.0625
0.03125
0.01125

To
the
Decoder

Code Word
0
10
110
1110
11110
11111

Variable Length coding using shorter code words for more probable symbols (like Morse
code).

Lossless Compression

MPEG2 Video Compression - I Frame


Rate Control
Quantizing Data

Subtract/
Pass

Video in

DCT

RLC

Predicted
Present
Frame

Motion
Vectors

Motion
Estimation

MUX

Q-1
DCT

Motion
Compensation

VLC

Buffer

-1

SUM

Fixed Store
Motion Vectors
Group of Pictures Control

Quantizer In the Encoder


0

25

0
0

Divide by
Quant
Matrix
Value

Divide by
Quant
Scale
Value

Input DCT Coefficients

To
Decoder

Output DCT Coefficients

(a more complex block)

Code

Linear
Non-Linear
Quant Scale Quant Scale

16

19

22

26

27

29

34

16

16

22

24

27

29

34

37

19

22

26

27

29

34

34

38

16

22

22

26

27

29

34

37

40

16

32

24

22

26

27

29

32

35

40

48

20

40

40

26

27

29

32

35

40

48

58

24

48

56

26

27

29

34

38

48

56

69

28

56

88

27

29

35

38

46

56

69

83

31

62

112

Quant Matrix Values


Value used corresponds
to the coefficient location

Quant Scale Values

Not all code values are shown


One value used for complete 8x8 block

MPEG2 Video Compression


MPEG2 Spatial

Compression
Blockiness
Distortion

MPEG2 Video Compression


MPEG2 Spatial

Compression
Blurring Distortion

MPEG2 Video Compression

Redundancies

Spatial Redundancies
Redundant information in the horizontal and vertical picture
dimensions. Data that is similar or repeats itself in picture
areas which are close to one another.
Temporal Redundancies
Redundant data over a given time. Data that is similar or
repeats itself from moment to moment, even if its location
in the picture area changes.

MPEG2 Video Compression

Temporal Redundancies

Frame to Frame
redundancies
New location same data
New data uncovered

I Frame

P Frame

MPEG2 Video Compression

Motion Vectors
MPEG Building Blocks
Pixel
Individual picture
elements that
define the lowest
level addressable
point in a picture.
Block
8x8 group of
pixels
Macro Block
16x16 group of
pixels
One use is to
calculate motion
vectors

MPEG2 Video Compression


Motion Vectors

Macroblocks
Picture is broken into
macroblocks for the next
step which is motion
vectors.

MPEG2 Video Compression


Motion Vectors

Nature of video to be redundancy from frame to frame


Take advantage of new location, same data redundancy
Motion vectors allows us to do this
Macro Block
16x16 Pixels

Motion
Vector

Search
Range

Frame N

Frame N + 1

MPEG2 Video Compression


Motion Vectors

Macroblocks
This figure shows the
motion vectors for the
macroblocks that move on
the static background

MPEG2 Video Compression


MPEG Building

Blocks

Pixel
Block
Macro Block
Slice
Sequence of
macroblocks
Provides a way to
resynchronize the
decoder to the video
in if the decoder
looses sync for some
reason

MPEG2 Video Compression - I Frame


Rate Control
Quantizing Data

Subtract/
Pass

Video in

DCT

RLC

Predicted
Present
Frame

Motion
Vectors

Motion
Estimation

MUX

Q-1
DCT

Motion
Compensation

VLC

Buffer

-1

SUM

Fixed Store
Motion Vectors
Group of Pictures Control

MPEG2 Video Compression - P Frame


Rate Control
Quantizing Data

Subtract/
Pass

Video in

DCT

RLC

Predicted
Present
Frame

Motion
Vectors

Motion
Estimation

MUX

Q-1
DCT

Motion
Compensation

VLC

Buffer

-1

SUM

Fixed Store
Motion Vectors
Group of Pictures Control

MPEG2 Video Compression - B Frame

I Frame

P Frame
Forward
Motion
Vector

I Frame

Reverse
Motion
Vector

B Frame

B Frame

P Frame

MPEG2 Video Compression


Frame reordering for I, B, P frame sequences

1- I

2-B

3-B

4-P

Encoder

1- I

4-P

2-B

3-B

MPEG2 Video Compression


Frame reordering for I, B, P frame sequences
I

Rec 601
Video Frames

B B

B B

1 2

B B

Elementary
Stream

MPEG2 Video Compression


Temporal Compression I/P/B Frames
Bi-directional Prediction

m = Distance between anchors


n = Distance between I pictures

Forward Prediction

Show I,B and


P on ES
Analyzer

I pictures: Intra-coding only


P pictures: Contain forward motion compensation
B pictures: Contain forward, backward and bi-directional motion compensation

MPEG2 Video Compression


Temporal Compression I/P/B Frames
I Frame Intra (Anchor) Frame
No Motion Vectors

P Frame Predicted Frame


Forward Motion Vectors

B Frame Bi-direction Frame


Forward and Reverse Motion Vectors

B Frame

P Frame

MPEG2 Video Compression


Temporal Compression I/P/B Frames

ES Analyzer Display
Click on Show Frame Size icon next to Zoom icon

MPEG2 Video Compression


MPEG Building Blocks

Pixel
Block
Macro Block
Slice
Access Unit AU
I Frame data is called an Access Unit
P Frame data is called an Access Unit
B Frame data is called an Access Unit

Group of Pictures GOP


A sequence of I, P and B Frame Access Units is called a Group of
Pictures or a GOP

MPEG2 Video Compression


Group of Pictures GOP
15/3 Frame Sequence

MPEG2 Video Compression


Elementary Stream Analyzer Software
Examples of Video (VES) and Audio (AES) Elementary Steams
Shows the GOP number and number of frames in GOP

MPEG2 Video Compression


Elementary Stream Analyzer Software
Examples of Video (VES) and Audio (AES) Elementary Steams
This figure shows the video slices and that a B frame is the first
frame in the sequence

MPEG2 Video Compression


Elementary Stream Analyzer Software
Examples of Video (VES) and Audio (AES) Elementary Steams
This figure shows the video player.
Because a B Frame
is the first frame,
we have a
distorted picture

MPEG2 Video Compression


Elementary Stream Analyzer Software
Examples of Video (VES) and Audio (AES) Elementary Steams
This figure shows the VES level (one step above the GOP)
The data
on the right
is from the
VES header

MPEG2 Video Compression


MPEG2 Profiles and Levels

MPEG2 Video Compression


MPEG2 4:2:2 Profiles and Levels

MPEG2 Video Compression

MPEG2 4:2:2 Profile for Production

Quality
Better chroma resolution than MP@ML
Higher quality (bit rate) than MP@ML
Good multi-generation performance
Flexibility
Short GOPs for ease of editing
Capability to pass all active video, some vertical info
Economy
Storage costs
Transmission costs
Compatibility

MPEG2 Video Compression


Achieving Quality
50 Mb/s

Bit Rate

Higher
Quality
30 Mb/s

Lower
Quality
20 Mb/s
I

IB
GOP Structure

IBBP

MPEG2 Video Compression

Examples of MPEG2 Compressed Video and Audio

Union Pacific Railroad


Branding
Alien Song
Lighthouse
Salmon

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

MPEG Audio Compression

Basic Rule: If listener cannot hear it, do not send it


Based on Psycho-acoustic Model

Pre-Masking
Post-Masking
Simultaneous Masking
Threshold in Quiet

MPEG1 Layers 1, 2 and 3


Layer compression complexity and efficiency increases as go
from layer 1 to 2 and finally to 3
MPEG1 Layer 3 is MP3 Audio
Two Channel Audio Only
Not used in North American standard but is in European standard

Dolby Digital (AC3)


5.1 to 7.1 Channel Audio
Used in North American standard, being adopted by

MPEG Audio Compression


Audio Masking

Simultaneous Masking
Threshold in Quite Masking
1 kHz sinewave
Threshold in
quiet
Masking
threshold

20 Hz

1 kHz

20 kHz

MPEG Audio Compression


Audio Masking
Pre-Masking
Post Masking

Time Occurrence
of Masking Sound

sound
pressure

-60

PreMasking

PostMasking

Masked sound
occurs before
masking sound

Masked sound
occurs after
masking sound

-40

-20

20

40

60

80

100 120 140 160 180 Time (ms)

MPEG Audio Compression


MPEG1 Audio Encoder Concepts

Audio samples in time domain (in group of 12), each sample


converted to 32 frequency components (sub-bands)
= 384 sub-band frequency components

PCM Time Sample

Quantizer
and
Coding

Filter Bank
32
Sub-bands

Boost frequency
components
based on
amplitude and
assigns scale
factors

Masking
Thresholds

Frame
Packing

Audio
ES

Coder

For each subband, decides


how much to
keep if any.

Psychoacoustics
Model

MPEG Audio Compression


MPEG1 Audio

Encoder
Concepts

PCM Sample
3
PCM Sample
4

PCM Sample 1

a
b-b
Su
32
s
nd

Representatio
n of 32 audio
sub-band
frequency
components
per time
sample

PCM Sample
2

PCM Sample
5

MPEG Audio Compression


MPEG1 Audio Encoder Concepts

Simultaneous, Pre and Post masks first


applied to sub-band components identify
amount of sound that can be heard
Some sub-band component
amplitudes reduced
PCM Sample
2

PCM Sample
3
PCM Sample
4

PCM Sample 1

PCM Sample
5

- Amount left

a
b-b
Su
32
s
nd

over after
masks
- What
person
cannot hear
is not coded

MPEG Audio Compression


MPEG1 Audio Encoder Concepts

Sub-band components left after the Simultaneous Mask,


Pre-mask and Post-masks are applies
Next need to apply the Threshold in Quite mask

PCM Sample
2

PCM Sample
3
PCM Sample
4

PCM Sample 1

PCM Sample
5

a
b-b
Su
32
s
nd

MPEG Audio Compression


MPEG1 Audio Encoder Concepts

Apply Threshold in Quite mask to identify only those sounds


that can be heard

PCM Sample
2

PCM Sample
3
PCM Sample
4

PCM Sample 1

PCM Sample
5

- Amount left

a
b-b
Su
32

over after
masking

s
nd

- What
person
cannot hear
is not coded

MPEG Audio Compression


MPEG1 Audio Encoder Concepts

Sub-band components
left after the Threshold
in Quite mask is applied
Scale Factor
Value applied to each
sub-band component
10 20 30 20 divided
by10 gives
1 2 3 2
Scale factor of 10 and smaller values
are sent
Bit Allocation
# of bits to represent sub-band component
Allocate only the number of bits necessary to encode
small sub-band values
Values above (1,2,3,2) can be represented by two bits rather
than 5 bits that would have been needed for 30 before scale
factor applied

MPEG Audio Compression


MPEG1 Audio Encoding

MPEG1 Audio Compression Common Features


Sampling rates of 32KHz, 44.1KHz or 48KHz
One or two channel coding
Monophonic mode for single channel
Dual Monophonic for two channels (two languages for
instance)
Stereo Mode
Stereo Mode with Joint Coding (joint signals only coded in
one channel)
CRC based error checking
Room for user defined data
MPEG1 offers three audio compression models called Layer 1,
Layer 2 and Layer 3
Layer 1 simplest while layer 3 is most complex
Layer 1 is least efficient while layer 3 is most efficient
Will now take a high level look at the three layers

MPEG Audio Compression


MPEG1 Layer 1 Audio

Encoder

Data rates > 128Kbps


per channel
Not for broadcast
12 time domain samples
converted to 32 frequency
domain sub-bands for 384
frequency domain values
Sub-band sample
values between
015 based on 4
bit allocation
Scale factors
between 063
based on 6 bit
scale factor value

MPEG Audio Compression


MPEG1 Layer 2

Audio Encoding

About 128Kbps per


channel
For broadcast
36 time domain
samples in 24ms at
48KHz, each converted
to 32 frequency
domain sub-bands for
1152 frequency
domain values.
Bit Allocation
changes based on
sub-band range
Scale Factor Selection
Information
Identifies what
scale factor to use

MPEG Audio Compression


Example of MPEG1 Layer 2 Audio
MPEG Header

Layer 2
Bit Rate
Sampling Freq
Others

Audio Playback

Play back audio


using ES analyzer

MPEG Audio Compression


MPEG1 Layer 3 (MP3) Audio Encoding

Very Similar to MPEG1 layer 2 with the following exceptions


Data rate of around 64Kbps per channel for high quality
audio
Converts 32 sub-bands to 576 sub-bands of 41.66Hz using
Modified DCT transforms for higher frequency domain
resolution for more efficient masking
Uses Huffman VLC and RLC to reduce redundant data in the
ES

MPEG Audio Compression


MPEG2 Audio Encoding

Based on same basic concepts as MPEG1


Expanded to support 6 channels (L/C/R/Ls/Rs/LFE) of audio at
32/44.1/48KHz at data rates of 384-640Kbps
Like Dolby Digital in this regard
MPEG1 only supports 2
MPEG2 backwards compatible version to MPEG1
MPEG1 decoder can decode compatible MPEG2 audio
Elementary Stream
There is a non-backwards compatible with MPEG1 version of
MPEG2 called Advanced Audio Compression (AAC)
Not being backwards compatible allows it to be more
efficient
MPEG2 not used in the ATSC standard
MPEG2 available in DVB standard

MPEG Audio Compression


MPEG Building Blocks

Pixel
Block
Macro Block
Slice
Access Unit AU

I Frame data is called an Access Unit


P Frame data is called an Access Unit
B Frame data is called an Access Unit
Audio data associated with video frame is organized into an Access
Unit

Group of Pictures GOP


A sequence of I, P and B Frame Access Units is called a Group of
Pictures or a GOP

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

MPEG2 System Overview

At the Decoder

DTS/PTS
Generator

Video
Data

Video
Encoder

Packetizer

Audio
Data

Audio
Encoder

Audio
Packetizer
PES

Elementary
Stream

Video
PES

Data

Program
Stream
MUX
Transport
Stream
MUX

Program
Stream (DVD)
Single
Program
Transport
Stream

MPEG2 System Overview


The PES Structure

Variable length packets (64 Kbytes maximum)


Some encoders produce one video frame per PES packet,
others multiple PES per video frame
Some PES headers contain DTS and PTS time values which
specify when to decode and present frames

MPEG2 System Overview


PES Packet Syntax Required Fields
PES start code
prefix

stream id

PES packet
length

16

24
PES
10 scrambling
control
2

PES
priority
1

PES
header

PES packet data

n1

data alignment
copyright
indicator
1

stuffing bytes

n2

original
or copy

7 flags

PES header
data length

optional
fields

MPEG2 System Overview


PES Packet Syntax Optional Fields
PES start code
prefix

stream id

PES packet
length

16

24
PES
10 scrambling
control
2

PES
priority
1

PES
header

PES packet data

n1

data alignment
copyright
indicator
1

stuffing bytes

original
or copy

7 flags

PES header
data length

PTS
DTS

ESCR

ES Rate

DSM
trick mode

40

48

24

n2

additional
PES
PES CRC
copy info
extension
8

16
5 flags

PES
pack header
private data
field
128

8+n3

program
packet seq.
counter
16

optional
fields

P-STD buffer
16

PES
extension
field
8+n4

optional
fields

MPEG2 System Overview


Elementary Stream Analyzer View of PES Data
Shows Video PES header data
Audio PES is
very similar

MPEG2 System Overview


Packetized Elementary Stream Analyzer Views of PES

Data
When open PES data with PES Analyzer, get detailed report of
PES level issues

MPEG2 System Overview


Packetized Elementary Stream Analyzer Views of PES

Data
Shows Video PES payload information in Hex
Data in pink
is header
information,
rest is payload

MPEG2 System Overview


Packetized Elementary Stream Analyzer Views of PES

Data
View PES header data in human friendly format

MPEG2 System Overview


Packetized Elementary Stream Analyzer Views of PES

Data
Shows DTS, PTS and other data for each AU
Can step from
each PES packet
type to the
next to see
changes

MPEG2 System Overview


Transport

Stream
Formation

MPEG2 System Overview


Transport Streams Formation
Will discuss this software in more detail on following pages
This view shows how many different PES streams can make up
the Transport Stream

MPEG2 System Overview


Transport

Stream
Formation
Another
view of
the many
PES,
identified
with
different
PIDS, that
can make
up one
Transport
Stream

MPEG2 System Overview

The Transport Stream (TS) is a continuous data stream


in 188 byte packets containing format (syntax)
information and payload data
188 = 4 x 47 (for ATM packet size)
MPEG system timing model based on zero jitter
No zero jitter transmission system in real world
Extra buffering needed for real world

188 Bytes
Header

Packet

Payload

Packet

Packet

Packet

Packet

Packet

Packet

Packet

MPEG2 System Overview


Multi-Program Transport Stream

Audio 1

Program 2
Video 2

Program 1
Video 1
PES
PES

2 Elementary Streams in Program 1


1 Elementary Stream in Program 2

2 Program Transport Stream

Each program has a separate reference clock

MPEG2 System Overview


Transport Packet Header Required

Header

188 Bytes

Payload

Minimum 4-byte header


Sync

Transport

Start

Transport

Byte

Error

Indicator

Priority

PID

Scrambling

Adaptation

Continuity

Control

Field

Counter

Indicator
8

Field

Control
1

13

Adaptation

Payload

MPEG2 System Overview


Transport Packet Header Adaptation
Header

188 Bytes

Payload

Minimum 4-byte header


Sync

Transport

Start

Transport

Byte

Error

Indicator

Priority

PID

Scrambling

Adaptation

Continuity

Control

Field

Counter

Indicator
8

13

Adaptation

Discontinuity

Random

Elem Stream

Field

Indicator

Access

Priority

Indicator

Indicator

Length
8

Payload

Field

Control
1

Adaptation

5 Flags

Optional

Stuffing

Fields

Bytes

MPEG2 System Overview


Transport Packet Header Optional
Header

188 Bytes

Payload

Minimum 4-byte header


Sync

Transport

Start

Transport

Byte

Error

Indicator

Priority

PID

Scrambling

Adaptation

Continuity

Control

Field

Counter

Indicator
8

13

Discontinuity

Random

Elem Stream

Field

Indicator

Access

Priority

Indicator

Indicator

Length
1

PCR
48

OPCR

48

Payload

Field

Control

Adaptation

Adaptation

5 Flags

Optional

Stuffing

Fields

Bytes

5
Splice

Transport

Adaptation

Countdown

Private

Field

Data

Extension

MPEG2 System Overview


Transport Packet

Header Optional
What is the PCR?
PCR in the Optional
Fields portion of the
Adaptation Field

MPEG2 System Overview

Program Clock
Reference (PCR)
What is the PCR?
Encoder STC
(System Time Clock)
sets timing for
video, audio and data.
STC does not track hours,
minutes and seconds.
Sample of 42 bit STC
sent to decoder as PCR.
PCR sets the decoder STC
to match the encoder.

MPEG2 System Overview


Program Clock

Reference (PCR)
Video In

27 MHz Clock
42 Bit Counter
26.51 Hour Overflow

STC

Elementary Stream

Video
Encoder

PCR = X plus
the time of
n bits

PCR = X
n bits

188 byte packets

Transport
Stream
Formation

____
Transport
Stream
Decoder
Used when switching
from one program to
another because of
possibly different PCR
counts.

PCR

Load

Compare

STC
27 MHz Clock
42 Bit Counter
26.51 Hour Overflow

Low
Pass
Filter
27 MHz
Xtal
VCO

MPEG2 System Overview

Program Clock Reference (PCR)

Role of PCRs in Video, Audio and Data in the Decoder


DTS/PTS are STC counts associated with the each unit of video,
audio and data
Control when decoder decodes and presents information
Reorders out of sequence I, P, B, B to I, B, B, P

I, P, B, B

I, B, B, P

MPEG2 System Overview

Program Clock Reference (PCR)

Time 1

Time 2

MPEG2 System Overview

Program Clock Reference (PCR)


STB STC Assumes Constant Tx Delay
Time 2

Time 3

Time 4

MPEG2 System Overview

Program Clock Reference (PCR)

Source of PCR Errors


Incorrect PCR value put in the transport stream by the
multiplexer or
re-multiplexer

MPEG2 System Overview


Program Clock Reference (PCR)

Multiplexer
Multiplexes two or more single programs into a multiple
program transport stream and inserts the PCR at the correct
packet

MPEG2 System Overview


Program Clock Reference (PCR)

Re-Multiplexer
De-multiplexes transport streams and re-multiplexes them
into a new program transport stream including new PCR
values
Needs correct input PCRs to create correct output PCRs
If wrong PCR values put in,
then have errors.

MPEG2 System Overview

Program Clock Reference (PCR)

Source of PCR Errors


Not a constant delay in the transport stream.
STB STC Assumes Constant Tx Delay
What happens if delay increases?
What happens if delay decreases?

MPEG2 System Overview


Program Clock Reference (PCR)

Effects of Increased Delay (Time 5) and Decreased Delay (Time 6)


Time 4

Time 5

Time 6

MPEG2 System Overview


Program Clock Reference (PCR)

Role of PCRs in Video, Audio and Data in the Decoder


STB with composite video outputs, PCR controls color burst.

MPEG2 System Overview


Program Clock Reference (PCR) Measurements

There are a number of different PCR parameters we need to track,


they are:

PCR Arrival Interval

PCR_AC Accuracy

addresses low frequency transmission path variations

PCR_OJ Overall Jitter

does not address transmission path variations

PCR_DR Frequency Drift

does not address transmission path variations

PCR_FO Frequency Offset

does not address transmission path variations

addresses high frequency transmission path variations

Will look at each in sequence

MPEG2 System Overview


Program Clock

Reference
(PCR): Arrival
Interval
PCR sent in
Transport
Stream every
40-100 ms.
This is known as
PCR Arrival
Interval
MTM400
diagram

MPEG2 System Overview

Program Clock Reference (PCR): Accuracy

There are a number of different PCR parameters we need to track,


they are:
PCR Arrival Interval
does not address transmission path variations
PCR_AC Accuracy
does not address transmission path variations
PCR_FO Frequency Offset
does not address transmission path variations
PCR_DR Frequency Drift
addresses low frequency transmission path variations
PCR_OJ Overall Jitter
addresses high frequency transmission path variations
Will look at each in sequence

MPEG2 System Overview

Program Clock Reference (PCR): Accuracy

Definition
The accuracy of the PCR values PCR_AC is defined as the
difference between the actual PCR value and the value it
should have in the TS represented by the byte index for its
actual position. This can be calculated for constant bitrate
TS, the measurement may NOT produce meaningful results
in variable bitrate TS.
Purpose
The measurement indicates the total error included in the
PCR value with respect to its position in the TS. The
tolerance as specified by ISO/IEC 13818-1 is +/- 500 ns.
Limitations
Good for measuring accuracy at input to network but not at
end of network because by definition does not include
transmission path delay variations

MPEG2 System Overview

Program Clock
Reference
(PCR):
Accuracy

PCR Accuracy
(PCR_AC)
= +/- 500nS

MPEG2 System Overview

Program Clock Reference (PCR): Frequency Offset

There are a number of different PCR parameters we need to


track, they are:
PCR Arrival Interval
does not address transmission path variations
PCR_AC Accuracy
does not address transmission path variations
PCR_FO Frequency Offset
does not address transmission path variations
PCR_DR Frequency Drift
addresses low frequency transmission path variations
PCR_OJ Overall Jitter
addresses high frequency transmission path variations
Will look at each in sequence

MPEG2 System Overview

Program Clock Reference (PCR): Frequency Offset

Definition
PCR_FO is the difference between the program clock
frequency and a nominal clock frequency as measured
against a reference which is neither PCR or TS derived
Units for the parameter PCR_FO should be in Hz according
to:
Measured Frequency Nominal Frequency*
Limits are 27MHz, +/- 810Hz
Purpose
The original frequency of the clock used in the digital
video format (STC) is transmitted to the decoder in form of
numerical values in the PCR fields
*Nominal Frequency based on extremely accurate MPEG analyzer clock.

MPEG2 System Overview

Program Clock
Reference (PCR):
Frequency Offset

Think of as DC
Frequency
Coupling
For this stream,
frequency offset
is minus ~900Hz
STB STC is
~26,999,100Hz
so this stream is
out of tolerance

MPEG2 System Overview

Program Clock Reference (PCR): Frequency Drift

There are a number of different PCR parameters we need to track,


they are:

PCR Arrival Interval

PCR_AC Accuracy

addresses low frequency transmission path variations

PCR_OJ Overall Jitter

does not address transmission path variations

PCR_DR Frequency Drift

does not address transmission path variations

PCR_FO Frequency Offset

does not address transmission path variations

addresses high frequency transmission path variations

Will look at each in sequence

MPEG2 System Overview

Program Clock Reference (PCR): Frequency Drift

Definition

PCR_DR is defined as the first derivative of the frequency and is


measured on the low frequency components of the difference
between the program clock frequency and as compared to a
reference which is not neither PCR derived or TS derived.

Purpose

The measurement is designed to quantify the frequency of drift, if


any, of the program clock frequency. This limit is effective only for
the low frequency components of the variations as indicated by
the demarcation frequency described in Annex I of ISO/IEC 13818.
Good for characterizing transmission path delay variations

MPEG2 System Overview

Program Clock
Reference
(PCR):
Frequency Drift

This diagram is
the PCR_FO
Want to know
about small
variations in
26,999,100Hz
signal

MPEG2 System Overview

Program Clock
Reference
(PCR):
Frequency Drift

Drifting Clock
(low and
high freq
components)
1st Derivative
of Low Freq
component is
PCR_DR

MPEG2 System Overview

Program Clock
Reference
(PCR):
Frequency Drift

Indicates the
PCR rate of
change

MPEG2 System Overview

Program Clock Reference (PCR): Overall Jitter

There are a number of different PCR parameters we need to track,


they are:
PCR Arrival Interval
does not address transmission path variations
PCR_AC Accuracy
does not address transmission path variations
PCR_FO Frequency Offset
does not address transmission path variations
PCR_DR Frequency Drift
addresses low frequency transmission path variations
PCR_OJ Overall Jitter
addresses high frequency transmission path variations
Will look at each in sequence

MPEG2 System Overview

Program Clock Reference (PCR): Overall Jitter

Most important parameter to monitor


No limit defined for PCR_OJ in TR101-290

MPEG2 System Overview

Program Clock Reference (PCR): Overall Jitter

STB Buffers can filter out PCR arrival time variations

Buffer has to be large enough to handle time variations

MPEG2 System Overview

Program Clock Reference (PCR): Overall Jitter

Variations in PCR Arrival Time


Caused by network packet delays/variations
MPEG analyzer time stamps each arriving packet with
accurate internal clock
No limits for PCR Arrival Time jitter variation are defined in
MPEG2 or TR101 290
Filtered out by buffering TS and play out at a constant rate.
Variations in arrival time depend upon transmission method
ATM and IP networks can generate large arrival time
variations

Encoder

Network

Set Top
Box

MPEG2 System Overview

Program Clock Reference (PCR): Overall Jitter

Definition
PCR_OJ is the measurement of the difference between
when a PCR should have arrived at a measurement
point (based upon previous PCR values, its current
value and a reference which is not PCR or TS derived)
and when it actually arrived.
Purpose
The PCR_OJ measurement is designed to account for
all cumulative errors affecting the PCR values during
program stream generation, multiplexing,
transmission, etc. All these effects appear as jitter at
the receiver but they are a combination of PCR
inaccuracies and jitter in the transmission.
Good for characterizing transmission path delay
variations

MPEG2 System Overview

Program Clock
Reference
(PCR): Overall
Jitter

MTM400
Measurement

MPEG2 System Overview

Program Clock Reference (PCR) Measurements Summary

PCR Arrival Interval


does not address transmission path variations
PCR_AC Accuracy
does not address transmission path variations
PCR_FO Frequency Offset
does not address transmission path variations
PCR_DR Frequency Drift
addresses low frequency transmission path variations
PCR_OJ Overall Jitter
addresses high frequency transmission path variations

MPEG2 System Overview


Multiple PCRs in Multi-Program Transport Streams

Transport streams normally contain several MPEG programs.


When MPEG programs are created, PCRs placed are in the
transport stream based on the STC at the time.
In the multiple program transport stream, different programs can
have different PCRs even if right beside each other.
Re-multiplexing is a common source of PCR errors

MPEG
Program 1
Multiple
Program
Transport
Stream

P1 - PCR 1

MPEG
Program 2

P2 - PCR 1

P1 - PCR 2

P2 - PCR 2

P1 - PCR 3

P2 - PCR 3

MPEG2 System Overview

Transport Streams carry video, audio and data.


Need way to determine TS contents and access it.
ISO/IEC13818 - Program Specific Information (PSI)

Video
encoder
Elementary
Streams

Video
decoder

Transport Stream
System
encoder

System
decoder

PES
Syntax

PES
Syntax

Audio
encoder

Not Standardized

Elementary
Streams
Audio
decoder

MPEG-2 Standards

MPEG2 System Overview


MPEG - Program Specific Information (PSI)
Information on current content of transport stream, not future
content

MPEG2 System Overview

MPEG - Program Specific


Information (PSI)

PSI data as viewed on the


Transport Stream Compliance
Analyzer
Notice the:
PAT
PMT Programs
CAT

MPEG2 System Overview

MPEG - Program Specific Information (PSI)

PAT, PMTs and CAT repeated on a regular basis

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

World Digital Video Broadcast Systems

Standards for Terrestrial, Satellite, Cable and Handheld


China

Europe & Most of the World

ATSC (Advanced
Television System
Committee)

Japan and Brazil

DVB (Digital Video Broadcast)

United States

DMB-T/H

ISDB (Integrated
Services Digital
Broadcasting)

South Korea

T-DMB

World Digital Video Broadcast Systems

MPEG2 - Program Specific


Information (PSI)

Only tells current content of the


transport stream
Does not tell of future
programming like an Electronic
Program Guide (EPG), current
date/time, services, program
ratings or other support
information

World systems based on


MPEG2 and have added
information not defined in
MPEG2 standard (13818)

DMB-T

ISDB

MPEG2

DVB

ATSC

World Digital Video Broadcast Systems

Digital Video Broadcast (DVB) Service Information (SI)

The Service Information (SI) performs the following functions:


Provides complementary information to MPEG2 PSI
Provides information for Integrated Receiver Decoders (IRD)
Provides Electronic Program Guide (EPG) information
Used for automatic tuning to particular services
Provides relevant schedule information

World Digital Video Broadcast Systems

Digital Video Broadcast


(DVB) Service
Information (SI)

As viewed on the
Transport Stream
Compliance Analyzer

World Digital Video Broadcast Systems

Digital Video Broadcast (DVB) Service Information (SI)


NIT - Network Information Table
Same as MPEG2 Program Specific Information (PSI) Data

World Digital Video Broadcast Systems

Digital Video Broadcast (DVB) Service Information (SI)


SDT - Service Description Table
Lists all available services

World Digital Video Broadcast Systems

Digital Video Broadcast (DVB) Service Information (SI)


EIT - Event Information Table
Lists schedule of services

World Digital Video Broadcast Systems

Digital Video Broadcast (DVB) Service Information (SI)


TDT - Time Date Table
Lists GMT time

World Digital Video Broadcast Systems

Digital Video Broadcast (DVB) Service Information (SI)


TOT - Time Offset Table,
Lists GMT minus local time zone

World Digital Video Broadcast Systems

Digital Video Broadcast (DVB) Service Information (SI)

BAT - Bouquet Association Table


Lists groups of services being offered as package
RST - Running Status Table
Used between programs till SDT data catches up
ST - Stuffing Tables
Replaces or invalidates other tables
DIT - Discontinuity Information Table
Informs down stream devices of TS problems
SIT - Selection Information Table
Informs down stream devices services carried by partial TS

World Digital Video Broadcast Systems

Advanced Television System


Committee (ATSC) Program
and System Information
Protocol (PSIP)

Data as viewed on the


transport stream compliance
analyzer

World Digital Video Broadcast Systems

Advanced Television System Committee (ATSC)


Program and System Information Protocol (PSIP)
MGT - Master Guide Table
List of PIDs to other tables

World Digital Video Broadcast Systems

Advanced Television System Committee (ATSC)


Program and System Information Protocol (PSIP)
VCT - Virtual Channel Table (TVCT and CVCT)
List of program channels

World Digital Video Broadcast Systems

Advanced Television System Committee (ATSC)


Program and System Information Protocol (PSIP)
EITn - Event Information Table
EIT-0 and EIT-1 will be required - 3 Hours per EIT
ETT - Extended Text Table - Optional

World Digital Video Broadcast Systems

Advanced Television System Committee (ATSC)


Program and System Information Protocol (PSIP)
STT - System Time Table
Tracks current time in 1 second increments

World Digital Video Broadcast Systems

Advanced Television System Committee (ATSC)


Program and System Information Protocol (PSIP)

RRT - Rating Region Table

Program rating based on region of broadcast

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

Tektronix Video Signals Diagram


SDTV
576p
576i
(625)
480p
480i
(525)

Analog
Composite
625i
525i

Analog Composite Video


(PAL/NTSC/SECAM)

Parallel Digital Composite


PAL=17.7MB/sec
NTSC=14.3MB/sec
10 Bits

B-Y
R-Y

Matrix

G
B
R

Composite
Encoder

Parallel

A to D
Conv

A to D
Conv

A to D
Conv

A to D
Conv

Ancillary Data
(Audio)

CRC
Calculator

Copyright 2006 Tektronix Inc.


187
(Rev 8/5/07)

Data
3Gb/sec

Encoder

Video
Video

Clock
Divide
by 10

Clock
270MHz
1.485GHz

NRZ

Single Program
Transport Streams

PSI MPEG
PSIP ATSC
SI DVB
PCR

PTS
DTS

Video

Serial Digital Component - D1


ITU-R BT.601 (SMPTE259M)
270Mb/sec
ITU-R BT.709 (SMPTE292M)
1.485Gb/sec

Shift
Register
Serializer

Coprocessor

Audio

Dual Link
SMPTE372M

Multiplexer
Multiplexed 27MB/sec
Multiplexed 0.1485GB/sec
TDMA CB/Y/CR/Y/CB/Y
10 Bits Parallel

13.5MHz
74.25MHz
Sample
Rate for Y

DVD
Digital Versatile
(Video) Disk

MPEG2 Program Stream

Transmission
Channel
Multiplexer

PB

Output video
files to many
applications

Clock X10

Y, B-Y, R-Y Scaled to


Y Pb Pr

PR

Input video
files from
many sources

Serial Digital Composite


143Mb/sec (NTSC)
177Mb/sec (PAL)
D2 and D3

Serializer

Color Difference
Component
4Fsc
Analog Video (PAL=17.7MHz)
(Y, B-Y, R-Y) (NTSC=14.3MHz)

Component
Analog Video
(GBR)

6.75MHz
37.125MHz
Sample
Rate for CB
and CR

Video File Server

Tx

VQoS
(Video Quality of Service)

Scrambler NRZI
Encoder

Compressed Video/Audio
Picture
Quality
Monitoring

Generation, Analysis
and Monitoring

Serial Digital Component - D1


ITU-R BT.601 (SMPTE259M)
270Mb/sec
ITU-R BT.709 (SMPTE292M)
1.485Gb/sec

Analog Composite Video


(PAL/NTSC/SECAM)

Decoder

Single
Program
Transport
Streams

Transmission
Channel
Analysis
MultiProgram
Transport
Stream

De-Multiplexer

HDTV
1080p
1080i
(1125)
720p
(750)

Transmission
Channel
Rx

Data
Audio

Set Top Box

1. Telco
a. SDH
b. ATM
c. SONET
2. Satellite
a. DVB-S
QPSK,
8PSK
3. Cable
a. DVB-C
16, 32,
64 QAM
4. Terrestrial
a. DVB-T
COFDM
b. ATSC
8VSB
5. Internet
a. Streaming
Video
b. VoIP
c. GigE
d. IPTV

Baseband MPEG2 Transport Stream


Interfaces

Function
Need to transport baseband (non-RF modulated) MPEG2
transport streams between various MPEG2 devices i.e. encoder,
multiplexer, re-multiplexer, monitors, generators, analyzers

Interface Classes
Packet Asynchronous (PA)

Fixed clock rate


Variable data rate
Stuffing bytes put in data stream where there is not data

Data Stuffing Data Stuffing Stuffing


Packet Synchronous (PS)

Variable clock rate to match data rate


All the bytes are data

Data

Data

Data

Data

Data

Baseband MPEG2 Transport Stream


Interfaces

Interface Types
IEEE1394/a/b

Characteristics
Packet Asynchronous
Serial
Several clock rates
depending on version with
up to gigabit speeds over 100
meters of fiber
Slower data rates over shorter distances are possible with
other medium
Low cost
Hot plug and play
Uses
Mostly consumer applications

Baseband MPEG2 Transport Stream


Interfaces

Interface Types
DVB-ASI (Asynchronous Serial Interface)

Characteristics
Packet Asynchronous
Serial
91.5 Meters (300 Feet)
270MHz Clock
Up to 214Mbps data rate
75 ohm coax or fiber cable
Is a coax connector
Uses
Very popular in most of the world (exception North America) for
use in professional infrastructure equipment

Baseband MPEG2 Transport Stream


Interfaces

Interface Types
DVB SSI (Synchronous Serial Interface)

Characteristics
Packet Synchronous
Serial
137 Meters (450 Feet)
Variable clock rate depending on data rate 105MHz max
75 ohm coax or fiber cable
Is a coax connector
Uses
Less popular than DVB ASI for use in professional infrastructure
equipment

Baseband MPEG2 Transport Stream


Interfaces

Interface Types

SMPTE 310M (for ATSC Terrestrial Systems)

Characteristics
Packet Asynchronous
Serial
91.5 Meters (300 Feet)
Fixed clock and data rates of 19.39, 38.78Mbps
Being expanded to 80Mbps
8VSB can handle 19.39Mbps in 6MHz
75 ohm coax or fiber cable
Is a coax connector
Uses
Most dominant MPEG2 interface North America

Baseband MPEG2 Transport Stream


Interfaces

Interface Types
DHEI (DigiCable Headend Expansion Interface)

Characteristics
Packet Asynchronous
Serial
5 Meters (16 Feet)
Fixed clock and data rates of 29 and 39Mbps
Simplex version (one way transfer of data 15 pin D connector)
Duplex version (two way transfer of data 26 pin D connector)
Uses
Transport MPEG2 between devices such as integrated receiver
transcoders in a cable headend.
Standardized by SCTE (Society of Cable Telecommunications
Engineers)

Baseband MPEG2 Transport Stream


Interfaces

Interface Types

DVB-SPI

Characteristics
Packet Synchronous
Serial
Fixed clock and data rates of <13.5Mbps
108Mbps
25 pin D connector
Uses
Unidirectional, point to point, parallel interface in cable
headends and uplink sites

Subjects

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

Tektronix Video Signals Diagram


SDTV
576p
576i
(625)
480p
480i
(525)

Analog
Composite
625i
525i

Analog Composite Video


(PAL/NTSC/SECAM)

Parallel Digital Composite


PAL=17.7MB/sec
NTSC=14.3MB/sec
10 Bits

B-Y
R-Y

Matrix

G
B
R

Composite
Encoder

Parallel

A to D
Conv

A to D
Conv

A to D
Conv

A to D
Conv

Ancillary Data
(Audio)

CRC
Calculator

Copyright 2006 Tektronix Inc.


196
(Rev 8/5/07)

Data
3Gb/sec

Encoder

Video
Video

Clock
Divide
by 10

Clock
270MHz
1.485GHz

NRZ

Single Program
Transport Streams

PSI MPEG
PSIP ATSC
SI DVB
PCR

PTS
DTS

Video

Serial Digital Component - D1


ITU-R BT.601 (SMPTE259M)
270Mb/sec
ITU-R BT.709 (SMPTE292M)
1.485Gb/sec

Shift
Register
Serializer

Coprocessor

Audio

Dual Link
SMPTE372M

Multiplexer
Multiplexed 27MB/sec
Multiplexed 0.1485GB/sec
TDMA CB/Y/CR/Y/CB/Y
10 Bits Parallel

13.5MHz
74.25MHz
Sample
Rate for Y

DVD
Digital Versatile
(Video) Disk

MPEG2 Program Stream

Transmission
Channel
Multiplexer

PB

Output video
files to many
applications

Clock X10

Y, B-Y, R-Y Scaled to


Y Pb Pr

PR

Input video
files from
many sources

Serial Digital Composite


143Mb/sec (NTSC)
177Mb/sec (PAL)
D2 and D3

Serializer

Color Difference
Component
4Fsc
Analog Video (PAL=17.7MHz)
(Y, B-Y, R-Y) (NTSC=14.3MHz)

Component
Analog Video
(GBR)

6.75MHz
37.125MHz
Sample
Rate for CB
and CR

Video File Server

Tx

VQoS
(Video Quality of Service)

Scrambler NRZI
Encoder

Compressed Video/Audio
Picture
Quality
Monitoring

Generation, Analysis
and Monitoring

Serial Digital Component - D1


ITU-R BT.601 (SMPTE259M)
270Mb/sec
ITU-R BT.709 (SMPTE292M)
1.485Gb/sec

Analog Composite Video


(PAL/NTSC/SECAM)

Decoder

Single
Program
Transport
Streams

Transmission
Channel
Analysis
MultiProgram
Transport
Stream

De-Multiplexer

HDTV
1080p
1080i
(1125)
720p
(750)

Transmission
Channel
Rx

Data
Audio

Set Top Box

1. Telco
a. SDH
b. ATM
c. SONET
2. Satellite
a. DVB-S
QPSK,
8PSK
3. Cable
a. DVB-C
16, 32,
64 QAM
4. Terrestrial
a. DVB-T
COFDM
b. ATSC
8VSB
5. Internet
a. Streaming
Video
b. VoIP
c. GigE
d. IPTV

RF Transmission

DVB

DVB-T: Terrestrial broadcast mode, COFDM (2k or 8k)


DVB-S: Satellite transmission, QPSK
DVB-C: Cable transmission, 16, 32, or 64 QAM
MPEG1 Audio (2 Audio Channels)
Dolby Digital Audio (5.1 to 7.1 Audio Channels)

ATSC

Terrestrial broadcast mode, 8 VSB


Dolby Digital Audio (5.1 to 7.1 Audio Channels)

Review

Why We Need Compression


Digital Television Overview
MPEG Standards
MPEG2 Video Compression
MPEG2 Audio Compression
MPEG2 System Overview
World Digital Video Broadcast Systems
Baseband MPEG2 Transport Stream Interfaces
RF Transmission

You might also like