100% found this document useful (2 votes)
841 views

MPEG Video Compression Technology and Testing

This document discusses MPEG video compression technology and testing. It provides an overview of MPEG video compression standards including MPEG-1, MPEG-2 and MPEG-4. It describes the MPEG-2 encoding process which uses temporal compression between frames and spatial compression within frames, along with rate control. The document also covers typical video data rates both compressed and uncompressed, applications of MPEG-2, and MPEG standards organizations and documents.

Uploaded by

avtaars
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
841 views

MPEG Video Compression Technology and Testing

This document discusses MPEG video compression technology and testing. It provides an overview of MPEG video compression standards including MPEG-1, MPEG-2 and MPEG-4. It describes the MPEG-2 encoding process which uses temporal compression between frames and spatial compression within frames, along with rate control. The document also covers typical video data rates both compressed and uncompressed, applications of MPEG-2, and MPEG standards organizations and documents.

Uploaded by

avtaars
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 119

MPEG Video Compression

Technology and Testing

TEKTRONIX

CONVERGENCE
SYMPOSIUM
Video Services Telecommunications Mobile Communications

MPEG Video Compression


Technology and Testing
Page 1
x
p
Seminar Topics
•  Modern Television System
–  Video and Compression Standards
•  MPEG-2 Compression
•  MPEG-2 System
•  Testing in Compressed Systems
–  Traditional test methods
–  Picture quality assessment
–  MPEG-2 protocol analysis

MPEG Video Compression


Technology and Testing
Page 2
x
p
Modern Television System
Other
Program Program Programs
Production Compression

Program Multi-Program
Transmission
Demultiplexing Multiplexing

Program
Program
Display or
Decompression
Reuse

MPEG Video Compression


Technology and Testing
Page 3
x
p
Video Production Formats
Analog Parallel
Composite Digital
Video Composite

C M
R R-Y Serial
a a
Digital
m G t B-Y Composite A to D
Serializer Composite
e B r Y Encoder Conv
(144 Mb/Sec)
r i
(177 Mb/Sec)
a x
Component 4xFsc Sample
Analog Video (PAL=17.7 MHz) Clock X10
(R-Y, B-Y, Y) (NTSC=14.4 MHz)
Component 13.5 MHz
Analog Video Sample
(RGB)
270 MHz clock
10 bits Multiplexed
Y A to D 27 Mwords/Sec
Conv ...Y / R-Y / Y / B-Y / Y... Serial
Digital
B-Y A to D Serializer Component
Conv 270 Mb/Sec
10 bits Parallel “Rec 601”
R-Y A to D
Conv AES/EBU
Parallel Digital Audio
6.75 MHz Digital
Sample Component

MPEG Video Compression


Technology and Testing
Page 4
x
p
Video Compression Standards
•  JPEG, still images (Joint Photographics Experts Group)
–  M-JPEG; motion JPEG, not a standard, generally proprietary

•  H.261 (px64), video conferencing


–  px64 kb/s (p=1, 2,…. 32)

•  H.263, video conferencing, emphasis on low bitrates


•  MPEG-1, CD-ROM and multimedia (Motion Picture Experts Group)
•  ETSI 300 174, Broadcast distribution and contribution
•  MPEG-2, Broadcast entertainment/contribution and DVD
•  Non-DCT methods
–  Wavelets, Fractal, DPCM
–  Lossless (e.g., special JPEG mode)

•  MPEG-4, very low bitrate coding (possibly wavelets)


MPEG Video Compression
Technology and Testing
Page 5
x
p
Typical Video Data Rates
•  10-bit Rec 601 270 Mbps
•  8-bit Rec 601 216 Mbps
•  8-bit Rec 601 (active only) 167 Mbps
•  Digital Betacam ~90 Mbps
•  MPEG-2 4:2:2P@ML 15-50 Mbps
•  MPEG-2 MP@ML 1.5-15 Mbps
•  MPEG-1 constrain. param. 0.5-1.8 Mbps
•  H.261 videoconferencing 64 kbps - 1.5 Mbps
•  H.263 videoconferencing 4 kbps - 0.5 Mbps
MPEG Video Compression
Technology and Testing
Page 6
x
p
MPEG-2 Applications
•  RF Transmission
–  DVB-S Digital Video Broadcasting - Satellite
–  DVB-C Cable, DVB-T Terrestrial broadcast
–  ENG Electronic (satellite) news gathering
•  Broadband Network
–  Contribution quality programs
–  Video on demand

•  Storage Media
–  DVD Digital Versatile Disk
–  Video servers

•  Intra-studio
–  Point-to-point (being developed by SMPTE)
–  Networking (being specified by EBU/SMPTE)
MPEG Video Compression
Technology and Testing
Page 7
x
p
MPEG-2 Standards Documents
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 & Control)
•  Part 7 Audio extension - NBC (non backward compatible)
•  Part 9 System extension RTI (real time interface)
•  Part 10 Conformance extension - DSM-CC
MPEG Video Compression
Technology and Testing
Page 8
x
p
Standards Organizations
•  ITU •  ISO
Place des Nations Case Postale 56
1211 Geneve 20, Switzerland 1 rue de Varembe
Ph: 41 22 730 6003 1211 Geneve 20, Switzerland
http://www.itu.ch Phone: +41 22 749 01 11
http://www.iso.ch

•  SMPTE
•  Documents for sale
595 West Hartsdale Ave
Global Engineering
White Plains, NY 10607 15 Inverness Way East
Ph: 914-761-1100 http:// Englewood, CO 80112
www.smpte.org Ph: 800-854-7179

MPEG Video Compression


Technology and Testing
Page 9
x
p
Seminar Topics
•  Modern Television System
–  Video and Compression Standards
•  MPEG-2 Compression
•  MPEG-2 System
•  Testing in Compressed Systems
–  Traditional test methods
–  Picture quality assessment
–  MPEG-2 protocol analysis

MPEG Video Compression


Technology and Testing
Page 10
x
p
MPEG-2 Video Compression
•  Pre-processing
–  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

MPEG Video Compression


Technology and Testing
Page 11
x
p
Important Points about MPEG
•  Only specifics bitstream syntax and decoding
•  Encoding algorithms are not defined
–  Open to invention and generally proprietary
–  Future improvements are compatible with all decoders
•  Asymmetric Compression
–  Encoder is very complex
–  Encoder contains a decoder model
–  Decoder definition emphasizes low complexity (cost)

MPEG Video Compression


Technology and Testing
Page 12
x
p
Pre-Processing
•  Required
–  Decode from composite to component
–  Produce correct picture size
–  Reduce 10-bit samples to 8-bit samples
–  Convert to 4:2:0 sampling (entertainment quality)
•  Optional
–  Noise reduction
–  Other picture clean up

MPEG Video Compression


Technology and Testing
Page 13
x
p
Picture Sizes
•  Rec 601/656 525/30/2:1 720 x 486
•  Rec 601/656 625/25/2:1 720 x 576
•  MPEG-2 30 fps (quasi-std) 704 x 480
•  MPEG-2 422P@ML 30 fps 720 x 512
•  MPEG-2 422P@ML 25 fps 720 x 608
•  SIF (30fps, 25 fps) 352 x 240,288
•  CIF (always 30 fps) 352 x 240
•  QSIF (30fps, 25 fps) 176 x 128,144
•  QCIF (always 30 fps) 176 x 144
MPEG Video Compression
Technology and Testing
Page 14
x
p
Rec 601 Component Video Sampling

(313)

(314)

MPEG Video Compression


Technology and Testing
Page 15
x
p
4:2:0 Chroma Sub-Sampling

4:2:2 Rec 601 4:1:1

1 Luminance sample Y

2 Chrominance samples Cb, Cr

4:2:0
MPEG Video Compression
Technology and Testing
Page 16
x
p
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.

MPEG Video Compression


Technology and Testing
Page 17
x
p
Discrete Cosine Transform (Definition)
The NxN two dimensional DCT
is defined as:
Encoder:

Decoder:

MPEG Video Compression


Technology and Testing
Page 18
x
p
DCT Function
•  8 X 8 pixel Blocks are converted from the spatial domain
to the spatial frequency domain.
•  Transformed blocks are numerically represented as 8 X
8 DCT coefficients.
•  DCT coefficients are more suitable for bit rate reduction
techniques.

The transform process does


not result in bit rate reduction.

MPEG Video Compression


Technology and Testing
Page 19
x
p
DCT Example
720 Pixels

8x8
480 Lines Pixels
(Pixels)

223 191 159 128 98 72 39 16 43.8 -40 0 -4.1 0 -1.1 0 0

223 191 159 128 98 72 39 16 0 0 0 0 0 0 0 0

223 191 159 128 98 72 39 16 0 0 0 0 0 0 0 0

223 191 159 128 98 72 39 16 0 0 0 0 0 0 0 0

223 191 159 128 98 72 39 16 0 0 0 0 0 0 0 0

223 191 159 128 98 72 39 16 0 0 0 0 0 0 0 0

223 191 159 128 98 72 39 16 0 0 0 0 0 0 0 0

223 191 159 128 98 72 39 16 0 0 0 0 0 0 0 0

Picture Sample Values DCT Coefficients


MPEG Video Compression
Technology and Testing
Page 20
x
p
“Picture” of the DCT Coefficients
H
V "

"
"

"
"
"

"
" " " " " "

" "
" "
" "
" "
" "
" "
" " " "
" " " "
" " " "
" " "
" " "
"
" "
" "
" "
" "
" " " "
" " " " " " "

" " " " " "


" "
" " "
"
" "
" "
" "
" " " "
" " " "
" " " "
" " "
" " " "
" " " "
" "
" "
" "
" "
" " " "

Horizontal spatial
frequency waveforms

MPEG Video Compression


Technology and Testing
Page 21
x
p
Quantization
•  Divides each DCT coefficient by a frequency-dependent
value and truncates the results to an integer.
•  Many of the resulting integers are zero or small values
(e.g., 1, 2, 3, … 12, 13, .)
•  Quantization coefficients can be tailored to complement
limitations of the human visual system
•  Quantization causes information to be irretrievably lost.
Reconstructed pixels usually differ in value from the
original

MPEG Video Compression


Technology and Testing
Page 22
x
p
7842 199 448 362 342 112 31 22 980 12 23 16 13 4 1 0

198 151 181 264 59 37 14 3 12 9 8 11 2 1 0 0

142 291 218 87 27 88 27 12 7 13 8 3 0 2 0 1

111 133 159 119 58 65 36 2 5 6 6 4 2 1 0 0


Divide by Divide by
49 85 217 50 8 3 14 12 Quant Quant 2 3 8 1 0 0 0 0
Matrix Scale
58 120 60 40 41 11 2 1 2 4 2 1 1 0 0 0

30 121 61 22 30 1 0 1 1 4 2 1 0 0 0 0

22 28 2 33 24 51 44 81 0 0 1 0 0 0 0 0

Input DCT Coefficients Output DCT Coefficients


(a more complex block) Value for display only
not actual results

Code Linear Non-Linear


8 16 19 22 26 27 29 34
Quant Scale Quant Scale

16 16 22 24 27 29 34 37 1 2 1

19 22 26 27 29 34 34 38 8 16 8

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 Quant Scale Values


Value used corresponds Not all code values are shown
to the coefficient location One value used for complete 8x8 block
Processing Sequences

Zigzag or Classic Alternate


(nominally for frames) (nominally for fields)

MPEG Video Compression


Technology and Testing
Page 24
x
p
Entropy Coding
•  Run length coding uses a special code for repeating
values (e.g., 13 “0s”, 5 “1s”, 4 “2s”)
•  Variable length coding uses shorter code words for
more probable symbols (like Morse code)
Symbol Probability Code Word
A 0.5 0
B 0.25 10
C 0.125 110
D 0.0625 1110
E 0.03125 11110
F 0.03125 11111

MPEG Video Compression


Technology and Testing
Page 25
x
p
INTRA-Frame Coding
Rate Control

Quantizing Data

Full Convert
Bitrate Entropy Compressed
4:2:2 to DCT Quantize Buffer Data
10-bit Coding
8-bit 4:2:0
Data

Information lost No Loss Data reduced Data reduced


Data reduced No Data reduced (information lost) (no loss)

Quantizing Entropy Coding


Reduce the number of bits for each coefficient. Variable Length Coding Run Length Coding
Give preference to certain coefficients. Use short words for Send a unique code
Reduction can differ for each coefficient. most frequent values word instead of strings
(like Morse Code) of zeros

MPEG Video Compression


Technology and Testing
Page 26
x
p
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.

MPEG Video Compression


Technology and Testing
Page 27
x
p
Temporal Redundancies
•  Frame to Frame redundancies •  New location same data
•  New data uncovered

MPEG Video Compression


Technology and Testing
Page 28
x
p
Motion Estimation

Macro Block
16x16 Pixels
Motion
Vector

Search
Range

Frame N Frame N + 1

MPEG Video Compression


Technology and Testing
Page 29
x
p
INTER-Frame Coding (Forward Prediction)

Video in Difference Frame


Subtract/Pass
Present Much less information if
Predicted the prediction is good
Frame
Present SUM
Frame
Previous Frame
Motion or Reconstructed
Compensation Present Frame to
use in the next
Motion Fixed Store Prediction
Vectors (previous frame)

Motion
Estimation
Motion Vectors

MPEG Video Compression


Technology and Testing
Page 30
x
p
MPEG Video Compression
P-pictures only
Rate Control

Quantizing Data

Video in
Subtract DCT Q RLC VLC MUX

Predicted Q-1
Present
Frame Buffer
DCT-1
Motion
Compensation
SUM
Motion
Vectors
Fixed Store

Motion Motion Vectors


Estimation
Group of Pictures Control

MPEG Video Compression


Technology and Testing
Page 31
x
p
Group of Pictures
Bi-directional Prediction

0 1 2 3 4 5 6 7

N = Distance between anchors

M = Distance between I pictures


I
I B B P B B B P

Forward Prediction

I pictures: Inter-coding only


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

MPEG Video Compression


Technology and Testing
Page 32
x
p
15/3 Frame Sequence
I
B
B
P
B
B
P
B
B
P
B
B
P
B
B
I

MPEG Video Compression


Technology and Testing
Page 33
x
p
Time Sequence of Pictures

MPEG Video Compression


Technology and Testing
Page 34
x
p
MPEG-1
•  Design focused on non-interlaced SIF (352x240)
•  Application was media storage e.g., CD-ROM
•  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

MPEG Video Compression


Technology and Testing
Page 35
x
p
MPEG-2
•  MPEG-2 = MPEG-1 + interlace tools + Profiles & Levels
•  New field/frame prediction and DCT modes for interlace
•  Quantization with greater range and adaptivity
•  New intra-frame VLCs (variable length codes)
•  New adaptive coefficient VLCs
•  Scalability extensions; Spatial, SNR, Temporal
•  System layer for multiple program transport streams
•  Audio extended to 5-channel sound

MPEG Video Compression


Technology and Testing
Page 36
x
p
MPEG-2 Profiles and Levels
HIGH 4:2:0 4:2:0. 4:2:2
1920 x 1152 1920 x 1152
80 Mb/s 100 Mb/s
I, P, B I, P, B

HIGH-1440 4:2:0 4:2:0 4:2:0, 4:2:2


1440 x 1152 1440 x 1152 1440 x 1152
60 Mb/s 60 Mb/s 80 Mb/s
I, P, B I, P, B I, P, B

MAIN 4:2:0 4:2:0 4:2:0 4:2:0, 4:2:2


760 x 576 720 x 576 720 x 576 720 x 576
15 Mb/s 15 Mb/s 15 Mb/s 20 Mb/s
I, P I, P, B I, P, B I, P, B

LOW 4:2:0 4:2:0


352 x 288 352 x 288
4 Mb/s 4 Mb/s
I, P, B I, P, B

LEVEL

PROFILE SIMPLE MAIN SNR SPATIAL HIGH

MPEG Video Compression


Technology and Testing
Page 37
x
p
MPEG-2 4:2:2 Profile
HIGH 4:2:0 4:2:0, 4:2:2
1920 x 1152 4:2:2 1920 x 1152
80 Mb/s 1920 x 1088 100 Mb/s
I, P, B 300 Mb/s I, P, B
I, P, B
HIGH-1440 4:2:0 4:2:0 4:2:0, 4:2:2
1440 x 1152 1440 x 1152 1440 x 1152
60 Mb/s 60 Mb/s 80 Mb/s
I, P, B I, P, B I, P, B
MAIN 4:2:0 4:2:0 4:2:0 4:2:0, 4:2:2
720 x 576 720 x 576 4:2:2 720 x 576 720 x 576
15 Mb/s 15 Mb/s 720 x 608 15 Mb/s 20 Mb/s
I, P I, P, B 50 Mb/s I, P, B I, P, B
I, P, B
LOW 4:2:0 4:2:0
352 x 288 352 x 288
4 Mb/s 4 Mb/s
I, P, B I, P, B

LEVEL
4:2:2
PROFILE SIMPLE MAIN SNR SPATIAL HIGH
PROFILE

MPEG Video Compression


Technology and Testing
Page 38
x
p
MPEG-2 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 editability
–  Capability to pass all active video, some vertical info

•  Economy
–  Storage costs
–  Transmission costs
–  Compatibility

MPEG Video Compression


Technology and Testing
Page 39
x
p
How Good is MPEG-2 4:2:2?
•  The MPEG committee has conducted subjective
assessment tests to verify the performance of the
MPEG-2 4:2:2 profile.
•  Tests demonstrated that, with proper choices of data
rate and GOP structure, MPEG-2 4:2:2 can meet
professional requirements.

MPEG Video Compression


Technology and Testing
Page 40
x
p
Achieving Quality

50 Mb/s
Higher
Quality
Bit Rate

30 Mb/s
Lower
Quality

20 Mb/s
I IB IBBP
GOP Structure

MPEG Video Compression


Technology and Testing
Page 41
x
p
Application Examples
News and Acquisition Distribution
18 Mb/s 20 Mb/s
IB GOP Structure IBBP GOP Structure

Fully
Compliant
MPEG-2
4:2:2
Decoders

Archive Post-Production
30 Mb/s 50 Mb/s
IB GOP Structure I only GOP Structure

MPEG Video Compression


Technology and Testing
Page 42
x
p
MPEG Audio
•  If you can’t hear it, don’t send it
•  Psychoacoustic Models
–  Pre-Masking
–  Post-Masking
–  Simultaneous Masking
•  Data Structures

MPEG Video Compression


Technology and Testing
Page 43
x
p
Temporal Masking

sound
pressure

Pre- Post-
masking masking

time

MPEG Video Compression


Technology and Testing
Page 44
x
p
Simultaneous Masking
sound
pressure

1 kHz sinewave

Threshold in
quiet
Masking
threshold

20 Hz 1 kHz 20 kHz

MPEG Video Compression


Technology and Testing
Page 45
x
p
MPEG Audio Encoder

Filterbank Scaler
32 and
Subbands Quantizer

MUX
Dynamic
512 Point Masking Bit and
FFT Thresholds Scale Factor
Allocator
and Coder

Audio Frame input PCM samples


384 for Layer 1
3 * 384 = 1152 for Layer 2

MPEG Video Compression


Technology and Testing
Page 46
x
p
Audio Time Frame
12 x 32 Samples

12 Sections of 32 Samples

32 32 32 32 Filterbank
Samples Samples Samples Samples 32 Subbands

32 Samples = 0.66 msec (@ 48 kHz)


1 MPEG audio layer 1 frame = 8 msec of audio
1 MPEG audio layer 2 frame = 24 msec

MPEG Video Compression


Technology and Testing
Page 47
x
p
Layer I Frame Structure
384 PCM Audio Input Samples
Duration 8 msec @ 48 kHz
Bit Allocation

Scalefactors

Anc Data
Header

CRC

Subband Samples

GR0 GR1 GR2 GR11


12 Bit Sync
20 Bit System

Optional

4 bit linear

6 bit linear

Length
Unspecified
0 1 2 31

MPEG Video Compression


Technology and Testing
Page 48
x
p
Seminar Topics
•  Modern Television System
–  Video and Compression Standards
•  MPEG-2 Compression
•  MPEG-2 System
•  Testing in Compressed Systems
–  Traditional test methods
–  Picture quality assessment
–  MPEG-2 protocol analysis

MPEG Video Compression


Technology and Testing
Page 49
x
p
MPEG System

Video Video
encoder decoder
Transport Stream
System System
Elementary encoder decoder
Elementary
Streams Streams
PES PES
Syntax Syntax
Audio Audio
encoder decoder

Not Standardized MPEG-2 Standards

MPEG Video Compression


Technology and Testing
Page 50
x
p
MPEG-2 System Mux

Video Video Video


Packetizer
Data Encoder PES Program
Stream
Program
Audio Audio Audio MUX Stream
Packetizer
Data Encoder PES (DVD)

Single
Elementary Transport Program
Stream
Stream MUX Transport
Data Stream

MPEG Video Compression


Technology and Testing
Page 51
x
p
Transport Stream Formation

MPEG Video Compression


Technology and Testing
Page 52
x
p
Multi-program Transport Stream

MPEG Video Compression


Technology and Testing
Page 53
x
p
Transport Packets
188 Bytes

Header Payload

Packet Packet Packet Packet Packet Packet Packet Packet

•  The Transport Stream (TS) is a continuous data stream


in 188 byte packets containing format (syntax)
information and payload data

MPEG Video Compression


Technology and Testing
Page 54
x
p
Transport Packet Header
188 Bytes

Header Payload

Minimum 4-byte header


Sync Transport Start Transport PID Scrambling Adaptation Continuity
Byte Error Indicator Priority Control Field Counter Adaption
Payload
Indicator Control Field
8 1 1 1 13 2 2 4

Adaptation Discontinuity Random Elem Stream


Field Indicator Access Priority 5 Flags Optional Stuffing
Length Indicator Indicator Fields Bytes
8 1 1 1 5

Splice Transport Adaption


PCR OPCR Countdown Private Field
Data Extension
48 48 8

MPEG Video Compression


Technology and Testing
Page 55
x
p
Program Clock Model
PCR clock
frequency PCR clock PCR:
encoder PCR clock
generator phase
stamps PCR: recovered
generator Display
departure arrival
time of time of
Video packet packet Video
Encoder Decoder

PES System System PES


Syntax MUX DEMUX Syntax

Audio Audio
Encoder Decoder

variable delay = e(n) constant trans delay = Ctrans variable delay = d(n)

constant total delay = Ctotal

MPEG Video Compression


Technology and Testing
Page 56
x
p
Reference Clock Synchronization
27 MHz
Clock

Video In Transport
Video
Stream
Encoder Elementary Stream Formation
PCR = X plus
PCR = X the time of
188 byte packets n bits exactly n bits
____

Transport PCR
Low
Stream Compare Pass
Decoder Filter
Local
PCR
27 MHz
27 MHz
Xtal
Load Clock
VCO
Receiver 27 MHz clock
MPEG Video Compression
Technology and Testing
Page 57
x
p
Decoding the Transport Stream
Program Specific Information (PSI)

•  Program Association Table (PAT)


–  PID = 0, must be present in every transport stream

•  Program Map Table (PMT)


–  PID values assigned by transmission system (DVB, ATSC, etc.)

•  Conditional Access Table (CAT)


–  PID = 1

•  Network Information Table (NIT)


–  PID values assigned by transmission system
–  DVB considers this part of System Information (SI)

•  Null Packets
–  PID = 8191 (1FFFhex = 13 “1”s binary)

MPEG Video Compression


Technology and Testing
Page 58
x
p
PSI Example
Program Association Table (PID 0) Network Information Table
Program 0 16 Private
Program 1 22 Network
Program 3 33 Data
... ...

Program k 55
... ...
Conditional Access
Table (PID 1)
Stream 1 Video 54 Stream 1 Video 19
Stream 2 Audio 48 Stream 2 Audio 81 Conditional
Access Data
Stream 3 Audio 49 Stream 3 Audio 82
... ... ... ... ... ...

Stream k Data 66
Program Map Stream k Data 88
... ... ...
Tables ... ... ...

Transport Stream
Prog 1 Prog 3 Prog 1 Prog 3 Prog 3 Prog 3 Prog 1 Prog 3 Prog 3
PAT EMM
MAP MAP Audio 1 Audio 2 Video 1 Video 1 Video 1 Audio 1 Video 1
0 22 33 1 48 82 19 19 54 81 19

MPEG Video Compression


Technology and Testing
Page 59
x
p
DVB System
•  MPEG-2 Transport Streams
–  Service Information (SI) in addition to MPEG-2 (PSI)

•  SI includes
–  NIT - Network Information
–  SDT - Service Description
–  EIT - Event Information
–  TDT - Time and Date
–  BAT - Bouquet Association
–  RST - Running Status
–  ST - Stuffing Tables

•  DVB Systems provide:


–  Common Scrambling systems
–  A common Conditional Access Interface
–  Facilities for reverse channel operation

MPEG Video Compression


Technology and Testing
Page 60
x
p
DVB Channel Coding
•  Provides error correction over the channel
–  ( 1 in 10-4 on channel to 1 in 10-11 on Transport Stream )
•  Outer Coding - energy dispersal and RS
•  Inner Coding - interleaving and viterbi
–  Not used for cable transmission

204 Bytes 204 Bytes 204 Bytes


per packet per packet per packet

Transport Reed Transport Reed Transport Reed


Stream Solomon Stream Solomon Stream Solomon
Packet Coding Packet Coding Packet Coding
188 Bytes 16 Bytes 188 Bytes 16 Bytes 188 Bytes 16 Bytes

MPEG Video Compression


Technology and Testing
Page 61
x
p
Seminar Topics
•  Modern Television System
–  Video and Compression Standards
•  MPEG-2 Compression
•  MPEG-2 System
•  Testing in Compressed Systems
–  Traditional test methods
–  Picture quality assessment
–  MPEG-2 protocol analysis

MPEG Video Compression


Technology and Testing
Page 62
x
p
Video Testing Layers
Signal Test Function
Studio
Standardized Connections Video Quality
Video Signals

Program
Compression

MPEG-2 INTRA-Facility
Protocol
Transport Connections
Analysis
Stream
Transmission
Channel
Formatting

INTER-Facility Transmission
SDH/ATM or Connections Channel
Modulated RF
Analysis
MPEG Video Compression
Technology and Testing
Page 63
x
p
Signal vs Picture Quality
•  Analog and digital video systems are linear
–  Superposition applies
–  Results are time invariant and signal independent
–  Test signals can be substituted for program material
–  Testing in the vertical interval is equivalent to full-field tests
–  Static test signals are sufficient (Indirect measurement)
•  Compression video systems are non-linear
–  Test signals are easily/accurately compressed
–  Picture quality is a function of; data rate, picture complexity and
encoding algorithm capabilities
–  Test with complex motion sequences (Direct measurement)
MPEG Video Compression
Technology and Testing
Page 64
x
p
Seminar Topics
•  Modern Television System
–  Video and Compression Standards
•  MPEG-2 Compression
•  MPEG-2 System
•  Testing in Compressed Systems
–  Traditional test methods
–  Picture quality assessment
–  MPEG-2 protocol analysis

MPEG Video Compression


Technology and Testing
Page 65
x
p
Traditional Test Methods
A significant portion of the modern television
system is analog or full bandwidth digital video

These signals will continue to be used in the


foreseeable future

Input picture quality to the compression system


must be maintained

MPEG Video Compression


Technology and Testing
Page 66
x
p
Analog Video Testing
RGB
Transmission Record
Composite PAL PAL
Camera or or
Encoder NTSC NTSC
Operation Display

Functional Layers
VIDEO Waveform
Operational Monitoring
Technical Measurements
Monitors
and
SYNCHRONIZING WAVEFORMS Measurement
Technical Measurements Sets

PHYSICAL LAYER (COAX)


Technical Measurements TDRs

MPEG Video Compression


Technology and Testing
Page 67
x
p
Analog Tests

Amplitude Rise/fall times


Bandwidth Group delay
Sig/Noise ratio Non-linearities
Color gamut Diff Phase/Gain

No one test will do it all

MPEG Video Compression


Technology and Testing
Page 68
x
p
Digital Video Testing
RGB PAL PAL
NTSC Transmission NTSC Record
Composite
Camera or or
Encoder
Operation Display

Decode Encode
A/D D/A
Studio
Rec 601/656 Interconnect, Rec 601/656
Operation
Functional Layers
VIDEO
Waveform Monitors,
SIGNAL CODING (Rec 601) Measurement Sets
with
DIGITAL FORMATTING (Rec 656) Analog or Digital
DIGITAL WAVEFORM (Rec 656) Capabilities
PHYSICAL LAYER (COAX/FIBER) TDRs, OTDRs

MPEG Video Compression


Technology and Testing
Page 69
x
p
More Analog Tests
•  A/D and D/A Converters
–  Converters add distortions to the signal
–  Measure SNR on a shallow ramp
–  Differential gain/phase
–  Full ramp for “analog” measurements
–  Shallow ramp for “digital” measurements
•  Ringing on digitally generated signals

MPEG Video Compression


Technology and Testing
Page 70
x
p
Rec 601 Digital Measurements
•  Digital coding
–  Levels, excluded values
•  Formatting
–  Synchronization data, Embedded audio
•  Error Detection
•  Waveform (eye pattern)
–  Amplitude, risetime, overshoot
–  Jitter by eye pattern or demodulation
–  Headroom (cable length)

MPEG Video Compression


Technology and Testing
Page 71
x
p
Seminar Topics
•  Modern Television System
–  Video and Compression Standards
•  MPEG-2 Compression
•  MPEG-2 System
•  Testing in Compressed Systems
–  Traditional test methods
–  Picture quality assessment
–  MPEG-2 protocol analysis

MPEG Video Compression


Technology and Testing
Page 72
x
p
Factors Affecting Video Quality
in a Compression System
•  Quality of the input video
–  Amplitude, dc level, bandwidth, ringing, jitter
–  Noise, composite/component decoding artifacts
–  Prefiltering to eliminate the above problems
•  Nature of the input video
–  Picture spatial and temporal complexity

MPEG Video Compression


Technology and Testing
Page 73
x
p
Factors Affecting Video Quality
•  Encoding parameters used
–  Profile/level, field/frame, output data rate, GOP
•  Encoding algorithm
–  Speed required, hardware vs software
–  Multiple pass (iteration of parameters)
–  Algorithm design
–  Quantizing table selection
–  Use of motion vectors, search range

MPEG Video Compression


Technology and Testing
Page 74
x
p
Compression Impairments
Blocking: appearance of underlying block structure
Error Blocks: a form of block distortion
–  One or more blocks bear no resemblance to the current or previous scene
and often contrast greatly with the adjacent blocks
Edge busyness: distortion concentrated at edges of objects
–  Characterized by temporal and spatial features
Mosquito noise: edge busyness associated with movement
–  Characterized by moving artifacts or blotchy noise patterns superimposed
over the objects
Quantization noise: snow or salt & pepper
–  Similar to random noise but not uniform over the image
Blurring: distortion of the entire image,
–  Characterized by reduced sharpness of edges and spatial details
Jerkiness: smooth, continuous motion now perceived as a series of distinct images

MPEG Video Compression


Technology and Testing
Page 75
x
p
Blocking Blurring

MPEG Video Compression


Technology and Testing
Page 76
x
p
Picture Quality Measurements
•  We can not actually measure “picture quality”
–  We can measure picture degradation comparison to reference
•  Subjective measurements
–  ITU-R BT.500 has been updated
–  Further work to extend subjective methods
•  Objective measurements are most useful if they have
good correlation with subjective results

MPEG Video Compression


Technology and Testing
Page 77
x
p
Subjective Tests
(Human Viewer Trials)
Strengths Weaknesses
•  Produces valid results in •  Requires meticulous setup and
conventional and digital television control
system applications •  Needs lots of participants
•  Provides a scalar result •  Is time-consuming
–  Mean Objective Score
•  Works well over a wide range of
video (and still image) applications

Subjective tests are only applicable for development purposes.


They do not lend themselves to operational monitoring,
production line testing or troubleshooting.

MPEG Video Compression


Technology and Testing
Page 78
x
p
Quest for Objective Measurements
•  Intuition has led many developers to the same starting
point:
–  Picture quality is related to the differences between the original
and impaired scenes.
–  A measurement of the magnitude of these differences is
somehow related to “picture quality”
–  Therefore, construct a device which indicates the magnitude of
these differences.
•  There are two approaches to objective measurements
–  Feature Extraction
–  Picture Differencing
MPEG Video Compression
Technology and Testing
Page 79
x
p
Feature Extraction

Reference Degraded
Processing System
Picture Picture

Feature Feature
Extraction Low Extraction
Bandwidth
Feature
Data Difference
Results

MPEG Video Compression


Technology and Testing
Page 80
x
p
Picture Differencing

Reference Degraded
Processing System
Picture Picture

Image Image
Processing Picture Picture Processing
Data Picture Data
Data
Difference
Results

MPEG Video Compression


Technology and Testing
Page 81
x
p
Mean Squared Error
•  Prediction of quality derived from the result of
computing the mean of the squares of the differences
–  As the result approaches zero, the more identical are the
original and copy.
–  Conversely, as the result grows, the more different is the copy
from the original.
•  Peak Signal to Noise Ratio is a variation of MSE:

2552
PSNR=10 log10
MSE2
MPEG Video Compression
Technology and Testing
Page 82
x
p
But MSE (and PSNR) is Easily Fooled!

MSE = 27.10 MSE = 21.26

MPEG Video Compression


Technology and Testing
Page 83
x
p
Objective Picture Measurements
•  ANSI T1.801.03
–  Peak Sig/noise Average gain Offset level
–  Spatial shift Spatial info Temporal info
–  Added/lost; spatial frequencies, motion/edge energy
–  Radial average of spatial frequencies
•  Insufficient for comparison of systems
•  Useful for yesterday/today comparisons
–  Unfortunately most systems are not constant
–  Bit rate changes
–  Concatenation of different coding systems

MPEG Video Compression


Technology and Testing
Page 84
x
p
Human Vision System
•  A number of picture assessment methods have been
proposed based on the human vision model
•  A robust metric of image quality
–  Independent of nature of the video material
–  Independent of the type of impairments
–  Independent of the compression system
•  Principles of HVS models
–  Contrast sensitivity
–  Spatio-temporal response
–  Color perception

MPEG Video Compression


Technology and Testing
Page 85
x
p
The Tektronix/Sarnoff Method
•  In a review of 32 human visual models
–  “All but one of the models can be regarded as simplified
versions of the Lubin model.”
•  Dr. Lubin at Sarnoff Labs
–  Extended the work to cover picture quality
–  Temporal chroma models have been added
•  “JND Image Quality Metric”
–  Tektronix/Sarnoff cooperative product development

MPEG Video Compression


Technology and Testing
Page 86
x
p
Just Noticeable Differences
•  Central features
–  Approximates the optics of the eye and retinal structure
–  Filters that decompose image into subbands
–  Directional filters
–  Psycho-visually valid calibration curves
–  Pooling process to combine local results
•  JND scale
–  At a value of 1 JND, 3 out of 4 can detect a difference
–  Values above 1 have more noticeable differences
–  Values below 1 have less noticeable differences

MPEG Video Compression


Technology and Testing
Page 87
x
p
JND Algorithm
impaired image

optics oriented responses

gain control
transducer
sampling
JND map
...
distance
...
contrast Identical
pyramid Process JND value

reference image

MPEG Video Compression


Technology and Testing
Page 88
x
p
Model Output: JND Maps

Reference Image JND Map Degraded Image

•  Local magnitude of JND Map indicates probability of seeing a difference


between two images at that point
•  Average of JND Map indicates overall magnitude of visible differences

MPEG Video Compression


Technology and Testing
Page 89
x
p
JND vs. MSE

MSE = 27.10 MSE = 21.26


Average JNDs = 0.75 Average JNDs = 2.52
MPEG Video Compression
Technology and Testing
Page 90
x
p
Objective Measurement Operation
•  Close matching of “presentation”
–  Chroma/luma gain and dc level
–  Spatial and temporal alignment
•  Test motion sequences
–  Difficult but not killer
–  Several different program types
•  Program material not okay (for now)
–  Compute power/time for matching
–  Material often not difficult

MPEG Video Compression


Technology and Testing
Page 91
x
p
Basic Concept

Encoder Transport Decoder

Play test Perform automatic


sequences
measurements
5+ seconds 2 seconds

Test Sequence Picture


Source Quality
Reference Meter
Sequence
Source

MPEG Video Compression


Technology and Testing
Page 92
x
p
Use of Calibration Stripes

Original Compare original and transported

Transported

Special markings used to


derive gain/level/shift.

MPEG Video Compression


Technology and Testing
Page 93
x
p
Seminar Topics
•  Modern Television System
–  Video and Compression Standards
•  MPEG-2 Compression
•  MPEG-2 System
•  Testing in Compressed Systems
–  Traditional test methods
–  Picture quality assessment
–  MPEG-2 protocol analysis

MPEG Video Compression


Technology and Testing
Page 94
x
p
MPEG Protocol Analysis
Hardware I/O Real-time Display
Interface Firmware key errors
MPEG
Transport
Stream

Generation and Display header


Hard-disk
Analysis and Timing
Storage
Software Information

•  Tektronix MTS 100 provides creation, generation and


in-depth analysis of MPEG-2 transport streams
•  Real-time analysis and display of key errors is planned

MPEG Video Compression


Technology and Testing
Page 95
x
p
MTS Analysis
•  Analyzes transport and/or PES Windows NT
Application MPEG TS
packets Data Files
MPEG Transport on the NT
–  Syntax (structural) Stream Disk
Analysis Program
•  Extracts
–  PES packets
–  Elementary streams MTS Multiple Hardware
Data Files Output Types
•  Hierarchical view in the Data
Windows NT
Store
Application
–  PSI (program specific System
Control
information)
–  Programs
MPEG
–  Channels TS

MPEG Video Compression


Technology and Testing
Page 96
x
p
MTS Generator
Windows NT
•  ES Data Files are supplied by • ES Application User
Data Files Control Defined
Tektronix or the user on the NT MTS Formatter Configure
Disk and File
•  The ES Data Files can Multiplexer

be on disk or CD ROM
CD ROM
•  MTS Data Files are built using
multiplexing software MTS Multiple Hardware
Data Files Output Types
–  Formatted ES in the Data
Store Windows NT
–  User defined configuration System Application
Control
–  Application of MPEG rules
•  MTS outputs the transport MPEG
stream to the device under test TS

MPEG Video Compression


Technology and Testing
Page 97
x
p
Transport Stream Hierarchical Display

MPEG Video Compression


Technology and Testing
Page 98
x
p
Transport Packet Field Description

MPEG Video Compression


Technology and Testing
Page 99
x
p
Transport Packet Data Analysis

MPEG Video Compression


Technology and Testing
Page 100
x
p
Transport Packet Hex Display

MPEG Video Compression


Technology and Testing
Page 101
x
p
Program Association Table Analysis

MPEG Video Compression


Technology and Testing
Page 102
x
p
PCR Data Analysis
PCR number 21 - 30

0.804640 0.985496 1.166352

PCR number 23

PCR Base : 79659 units


PCR Extension : 93 units
PCR Value (PCRV) : 0.885103444 sec
Interpolated PCR (PCRI) : 0.885104096 sec
PCRI - PCRV : 0.000000652 sec
Previous PCR Arrived Since : 0.040156800 sec
Packet Number : 5886
Packet Number of PID 50 : 2279

MPEG Video Compression


Technology and Testing
Page 103
x
p
Time Stamp Analysis

MPEG Video Compression


Technology and Testing
Page 104
x
p
System Target Decoder
•  An abstract model for deciding legality of streams and
decoders (This is really control on encoder operation.)
•  Based on passing of streams through cascading buffers
•  Overflow of any buffer implies illegality of stream
•  Sometimes underflow is allowed; sometimes it isn’t.

MPEG Video Compression


Technology and Testing
Page 105
x
p
System Target Decoder Simulation

MPEG Video Compression


Technology and Testing
Page 106
x
p
Automatic Analysis
•  Selectable functions
•  Error tables available for
quick access to data

MPEG Video Compression


Technology and Testing
Page 107
x
p
Service Information
•  Selection
of SI data

MPEG Video Compression


Technology and Testing
Page 108
x
p
Service Information Interpreted
•  Decoded
Service
Description
Table

MPEG Video Compression


Technology and Testing
Page 109
x
p
Sarnoff Compliance Bitstreams
STRM100

•  A visual inspection of Video Decoder Operation


–  No digital interface or capture equipment required
–  Ease of use: pass-fail testing, rapid fault isolation
–  Look for gray embossed “VERIFY” without artifacts
•  One parameter or technique at a time
•  Loopable

MPEG Video Compression


Technology and Testing
Page 110
x
p
Sarnoff Compliance Bitstreams:
How They Work
Tests without B-pictures
IPPP .... PP PP .... P PP .... PP
“Verify” (60 to 90 frames) -- does not change image

Test section (1 or more frame)

Start Title (operator convenience only)

Tests with B-pictures


IPPP .... PP PBBBB .... BBBBP
Test and Verify (60 to 90 frames) -- the test runs
continuously, each picture should be “verify”

Start Title (operator convenience only)

MPEG Video Compression


Technology and Testing
Page 111
x
p
Sarnoff Compliance Bitstream Tests
•  Different picture types •  Downloadable quant matrices
•  Motion vector range •  Different bitrates
•  DC differential range •  Dynamic picture size
•  Macroblock pattern range •  2:3 pulldown insertion
•  Macroblock type range •  VBV buffer sizes
•  AC run/level test •  Mixed MPEG-1 & MPEG-2
•  Macroblock address range •  Alternate scan pattern
•  Dynamic GOP structure •  Alternate AC run/level VLC
•  Dynamic slice size •  Frame/field coding modes
•  Macroblock & zero stuffing •  Frame/field prediction modes
•  Postprocessing •  Non-linear quantization scale
–  Zone plate •  Pan and Scan
–  Color bars
–  Ramp

MPEG Video Compression


Technology and Testing
Page 112
x
p
Summary
•  Modern television systems are much more than “DTV”
–  Cameras and displays will continue to be analog
–  Program production uses analog and full bandwidth digital
•  MPEG-2 will be the dominant compression method
–  Entertainment quality video to the home
–  Satellite, Terrestrial, Cable
–  Digital Versatile Disk (DVD)
–  Video servers
–  Contribution quality, reusable video for studios

MPEG Video Compression


Technology and Testing
Page 113
x
p
Summary
•  MPEG only specifies bitstream syntax and decoding
–  A non-symmetrical system
–  Complex encoders, Simple (inexpensive) decoders
–  Encoding can improve and be compatible with today’s decoders
–  Increasing compute power for complex algorithms
–  Manufacturers can compete with proprietary algorithms
•  4:2:2 profile provides contribution quality
–  Decoders must be compliant for flexibility of application
•  MPEG-2 System for multi-program transmission

MPEG Video Compression


Technology and Testing
Page 114
x
p
Summary
•  System testing requires a layered approach
–  Signal/Picture quality
–  MPEG-2 system protocol
–  Transmission channel
•  Signal quality testing uses traditional methods
–  Indirect measurement, Static test signals, vertical interval
•  Picture quality testing is a complete new paradigm
–  Dynamic, complex test scenes utilize the complete channel
–  Reliable objective measurements use human visual model
–  Picture differencing methods provide best results

MPEG Video Compression


Technology and Testing
Page 115
x
p
Summary
•  MPEG-2 system protocol testing
–  Generation of valid (and invalid) test signals is important
–  In-depth testing provides complete data analysis off-line
–  Real-time testing provides limited analysis of all packets

•  Tektronix equipment for video and protocol testing


–  TSG422 Digital Video Test Signal Generator
–  SPG422 Digital Video Sync Pulse Generator
–  TG2000 Multi-format Test Signal Generator
–  1700 series Composite/Component Waveform Monitors
–  WFM600 Series Digital Video Monitors
–  VM700T Video Signal Measurement Set
–  MTS100 MPEG Transport Stream Analyzer/Generator

MPEG Video Compression


Technology and Testing
Page 116
x
p
Thank You for Your Attendance

. . . providing 50 years
of technical innovation
and leadership.

MPEG Video Compression


Technology and Testing
Page 117
x
p
References

MPEG Video Compression


Technology and Testing
Page 118
x
p
References

MPEG Video Compression


Technology and Testing
Page 119
x
p

You might also like