Mpeg-2 Pocket Guide
Mpeg-2 Pocket Guide
Mpeg-2 Pocket Guide
E-mail Address
mpeg@wwgsolutions.com
e-mail: mpeg@wwgsolutions.com
http://mpeg.wwgsolutions.com
Vol. 2 Vol. 4
GSM ATM
Pocket Guide Pocket Guide
Fundamentals in Mobile Radio Networks Fundamentals and ATM Testing
E 8.98/WG1/1015 E 2.99/WG1/1020
POCKET Guide (96 Pages) 23/03/00 15:02 Page 1
1 Introduction
In 1936, the year of the Berlin Olympic Games, spectators crowded
into specially built viewing rooms called Fernsehstuben (literally, tele-
vision rooms) to catch a glimpse of one of the first-ever television
broadcasts. In black and white, 180 lines/frame, and 25 frames/second,
it would hardly compare to television by today’s standards; however,
it became the progenitor of modern-day broadcasting, one of the
most powerful tools of the Information Age.
Now, nearly seven decades later, the international community stands
at the dawn of a new millennium. The great technological advances
of the past century propel us toward the next great advancement or
invention at a frantic pace. More than ever before, international orga-
nizations of experts are pooling their resources—working together
for the greater good of the entire world. Digital broadcasting is one
of the newest technological advances to rest on the shoulders of inter-
national collaboration. In 1990, the Moving Pictures Experts Group,
commissioned by the ISO/IEC international standards organizations,
organized a multinational group of experts to begin work on the
MPEG-2 specification. This standard has become the backbone for
digital television as we know it.
1
POCKET Guide (96 Pages) 23/03/00 15:02 Page 4
This pocket guide will help you to become familiar with the basics of
digital broadcast transmission. It discusses, in some detail, MPEG-2
audio and video compression and the MPEG-2 system layer. It also
provides an overview of the DVB and ATSC standards, which are
extensions of MPEG-2. In addition to outlining the standards, it discusses
the need for test and verification in the digital broadcast environment,
provides several test scenarios, and discusses why and how to test
MPEG-2 transport streams in order to ensure the highest-quality
transmission now and in the future.
The pocket guide ends with a Glossary of Terms, a Reference Material
List and an Index. Because this guide is not exhaustive, we encourage
you to consult the Reference Material list for continued study.
2 MPEG History
In 1987 the International Electrotechnical Commission (IEC) and the
International Organisation for Standardisation (ISO) joined forces to
create JTC 1 (Joint Technical Committee 1). The JTC’s mission was to
coordinate international standardization for Information Technology
(IT). To handle this task, the Committee split its resources into various
subcommittees, one of which was Subcommittee 29 (SC 29), formed
to investigate the standardization of audiovisual coding. SC 29,
entitled “Coding of audio, picture, multimedia, and hypermedia
2
POCKET Guide (96 Pages) 23/03/00 15:02 Page 5
3
POCKET Guide (96 Pages) 23/03/00 15:02 Page 6
For more information about the Moving Pictures Experts Group or the
MPEG standards, see http://www.mpeg.org.
2.1 MPEG-1 MPEG-1 is the original MPEG standard for audio and video coding.
First published in 1993, this standard defines digital audio and video
compression for storage at up to approximately 1.5 Mbps. Like all
MPEG standards, MPEG-1 is flexible in that it defines only the syntax
and semantics of the encoded bit stream, and not the encoding
process itself. Common applications for MPEG-1 include the storage
of sound and pictures for interactive CDs such as video games and
movie CDs. MPEG-1 has also been used for digital radio broadcasts.
Soon after work on MPEG-1 began, champions of the “digital television”
concept realized that MPEG-1’s syntax and structure would not
support the complexity and versatility of digital TV. Hence, in 1990,
work began on MPEG-2, the standard that would make digital tele-
vision broadcasting a reality. We will discuss MPEG-2 in greater detail
in the next chapter.
4
POCKET Guide (96 Pages) 23/03/00 15:02 Page 7
5
POCKET Guide (96 Pages) 23/03/00 15:02 Page 8
6
POCKET Guide (96 Pages) 23/03/00 15:02 Page 9
Single Program
Stream #1
1 0 1 1 0 0 1 0 1
Single Program Multiple Program Stream
Stream #2
Multiplexer
Encoders
3.1 Video Video compression depends on (1) redundancy within and between
Compression pictures or frames and (2) the characteristics of the human visual
system. Two types of compression, spatial encoding and temporal
encoding, allow encoders to reduce redundant data significantly,
thereby greatly decreasing the bandwidth required to transmit a video
stream. Video compression also makes use of the eye’s inability
to detect certain visual degradations including noise in a “busy”
picture area and reduced color spatial frequency in a picture.
7
POCKET Guide (96 Pages) 23/03/00 15:02 Page 10
3.1.1 Spatial Spatial redundancy deals with similarities between adjacent pixels in
Encoding plain areas of a picture. For instance, a picture that contains a blue-
sky background will likely contain several rows of identical blue pixels.
Spatial encoding codes only one of these pixels, significantly reducing
redundancy in the bit stream. This type of encoding involves a series
of steps including Discrete Cosine Transform (DCT), weighting,
scanning and entropy coding.
The first step in spatial encoding, Discrete Cosine Transform (DCT),
requires that the video waveform be transformed into a matrix of
spatial frequencies. This matrix includes blocks of 8x8 pixels which,
when transformed, provide a series of coefficients that indicate the
prevalence of a given frequency in each pixel. Since the transform
requires multiplication by fractions, the resulting coefficients often
have a longer word length (or number of bits needed to express
a value) than the pixel values themselves. Hence, DCT itself does not
compress the picture block; rather, it actually expands it. However,
because of spatial redundancy, many coefficients end up with zero or
near-zero values, which means that the corresponding pixels can be
dropped from transmission as the differences are not visible to the
viewer. This allows for considerable compression with minimal
degradation in quality.
8
POCKET Guide (96 Pages) 23/03/00 15:02 Page 11
9
POCKET Guide (96 Pages) 23/03/00 15:02 Page 12
The final step in spatial coding deals with entropy coding, which resizes
coefficients based on the number of times they occur. Frequently repeated
coefficients are expressed in the smallest word length, thus greatly
decreasing the total amount of bandwidth used to transmit a single frame.
10
POCKET Guide (96 Pages) 23/03/00 15:02 Page 13
11
POCKET Guide (96 Pages) 23/03/00 15:02 Page 14
❑ Motion Though objects may change location on the screen, their appearance
prediction oftentimes remains the same. Motion Prediction takes advantage of
this similarity by measuring an object’s motion at the encoder. This
measurement is sent as a motion vector to the decoder. The decoder
then uses this vector to shift the specified image from its location in
the previous frame to a new location in the next frame. Typically,
motion continues across several frames, so even greater compression
can be attained when vectors are transmitted differentially. For
instance, if an object’s speed is constant, the motion vectors do not
change; only a vector differential of zero is transmitted.
3.1.3 Decoding The decoding of MPEG-2 audio and video streams reverses the encoding
process one for one. An inverse DCT process restores frequency
coefficients according to the accuracy of the encoder. The decoder
then uses transmitted macroblocks from I- and P-frames to replace
redundant macroblocks discarded from P- and B-frames during encoding.
Motion vectors specify the location of these macroblocks within the
predicted frames.
As explained above, in order to decode a B-frame, data from both the
previous and next pictures must be available in the decoder. Therefore,
inter-frame prediction requires that frames be sent out of sequence
12
POCKET Guide (96 Pages) 23/03/00 15:02 Page 15
Transmission/
Decoding I1 ➙ P1 ➙ B1 ➙ B2 ➙ P2 ➙ B3 ➙ B4 ➙ I2 ➙ B5 ➙ B6
Order
Presentation
Order I1 ➙ B1 ➙ B2 ➙ P1 ➙ B3 ➙ B4 ➙ P2 ➙ B5 ➙ B6 ➙ I2
Decoding Time Stamps (DTS) and Presentation Time Stamps (PTS) within
the header of each frame ensure that the frames are decoded on time
and presented in the proper order. For more information about time
stamps, see section 3.4 Timing: PCR, PTS and DTS.
13
POCKET Guide (96 Pages) 23/03/00 15:02 Page 16
3.2 Audio Similar to the compression of video, MPEG audio compression also
Compression capitalizes on the characteristics of a human sensatory organ-this time,
it’s the human ear. The compression takes into account both auditory
masking, where a louder sound will hide a softer sound, and time
uncertainty, where a sound in the past or future will interfere with
the ear’s ability to hear a current sound. One example of auditory
masking occurs when you try to carry on a quiet conversation in
a train station. Passing trains drown out your conversation each time
they speed by. In the presence of the sound generated by the train,
the quiet voices in the conversation become imperceptible.
Auditory masking is most prevalent among sounds with similar
frequencies. Its effect depends on the frequency separation between
a loud sound and the quieter sound being masked. The closer two
signals are in frequency, the more likely it is that one sound will drown
out the other, though it may be only slightly louder. For example,
if two horns are playing at two similar high frequencies, the quieter
horn cannot be heard, but a bass drum playing at the same sound
level as the quieter horn will likely be heard, since its frequency is
significantly different from that of the louder horn. Since the sensitivity
of the ear is frequency dependent, the effect of masking is also
frequency dependent. Sounds at lower frequencies must be even closer
14
POCKET Guide (96 Pages) 23/03/00 15:02 Page 17
15
POCKET Guide (96 Pages) 23/03/00 15:02 Page 18
3.2.1 AC-3 The Dolby AC-3 audio compression algorithms use the same humanear
characteristics described above, but the methods they use to divide
the frequencies and process the data are different than the ones used
by MPEG. The AC-3 algorithm also uses audio blocks of data.
3.3 From ES to PES Once an audio or video elementary stream has been compressed, it is
and from PES divided into variable-length packets and converted into a Packetized
to Transport Elementary Stream (PES). Video stream packets include one frame
Stream each, while audio stream packets usually include approximately 24
milliseconds of sound each. Each packet contains a header and a pay-
load. The header gives timing information so the decoder will know
at what time to decode and present the specified frame.
Useful data
Fixed or variable
Header length
Packetized
Elementary Stream
16
POCKET Guide (96 Pages) 23/03/00 15:02 Page 19
From here, PESs are further divided into transport packets of 188 bytes
each and multiplexed with other elementary streams and data to form
a transport stream containing audio and video for multiple programs.
The transport stream also contains system information in the form of
PSI/SI/PSIP tables, which we will discuss later. It may also contain data
for interactive applications. The use of fixed-size transport packets
simplifies the multiplexing and transmission processes along the
broadcast chain.
17
POCKET Guide (96 Pages) 23/03/00 15:02 Page 20
18
POCKET Guide (96 Pages) 23/03/00 15:02 Page 21
19
POCKET Guide (96 Pages) 23/03/00 15:02 Page 22
PCR
PES Time Stamp: P.L.L.
PTS and DTS MULTIPLEXAGE DEMUX
Presentation
Frequency
Transport
CODAGE PES
Time Stamp:
PCR
DECODAGE
3.5 PSI Tables MPEG-2 Program Specific Information (PSI) tables provide the data
required for a decoder to demultiplex a program from a transport
stream for presentation to a user. This information can include loca-
tion of audio and video for a certain program, access rights, and infor-
mation regarding the compression and characteristics of audio and
video signals. The tables are repeated periodically (for example,
10 times/second) in the transport stream to support random access
required by a decoder turning on or switching channels.
20
POCKET Guide (96 Pages) 23/03/00 15:02 Page 23
3.5.1 PAT Think of the Program Association Table (PAT) as a root directory for
the transport stream. This table lists all the programs in the stream
and provides the PID (Packet Identifier) value for the Program Map
Table (PMT) associated with each program. The PAT can also contain
the PID number for the Network Information Table (NIT), which pro-
vides access to other transport streams in the network. The decoder
is always able to find the PAT (if present in the stream) since it is always
in packets with a PID value of 00.
NIT PID 16
21
POCKET Guide (96 Pages) 23/03/00 15:02 Page 24
3.5.2 CAT The Conditional Access Table (CAT) provides a mechanism for decoders
to find Entitlement Management Messages (EMMs) in the transport
stream. EMMs update the subscription options or pay-per-view rights
for each subscriber or for groups of subscribers. The CAT lists the EMMs
in the transport stream and gives the associated PID values.
EMM A PID 61
EMM B PID 76
EMM C PID 38
EMM D PID 109
3.5.3 PMT The Program Map Table (PMT) provides a description for each program
in a transport stream. This table literally acts as the map for a program,
listing the PID values for its video, audio, clock reference and data
components. With this information, the decoder can locate the audio
and video for the program and display them synchronously.
22
POCKET Guide (96 Pages) 23/03/00 15:02 Page 25
3.5.4 NIT The Network Information Table (NIT) provides information regarding
other transport streams in the network. This table is not defined in
MPEG-2, but DVB and ATSC have either defined it or identified another
method for providing information similar to it.
23
POCKET Guide (96 Pages) 23/03/00 15:02 Page 26
24
POCKET Guide (96 Pages) 23/03/00 15:02 Page 27
3. Find the packets that contain the video (PID 131) for Program 1.
4. Find the packets that contain the audio for Program 1. If the user
has selected the sound track in German, locate the audio track on PID
132. If the user has requested the English sound track, locate the audio
on PID 133.
5. Use the PTS and DTS in the header of audio and video packets to
decode and present them at the proper time.
4.1 DVB History The DVB Project began in September 1993 when public and private
television organizations from across Europe signed an agreement to
work together for the creation of a digital broadcasting standard that
would bring digital television to the home. Because the DVB Project
united major players in the European broadcast market, it provided
a forum through which a truly unified digital television system could
be created. In time, the organization developed international
standards for satellite, cable and terrestrial transport.
25
POCKET Guide (96 Pages) 23/03/00 15:02 Page 28
The Project now includes over 220 participants in more than 30 nations
worldwide. Because the DVB standard applies to all types of trans-
mission links - satellite, cable and terrestrial - it eliminates redundancy
in research and design, reducing costs to manufacturers. Because the
standard is employed throughout Europe and in many countries across
the world, digital transmission to all countries under the DVB umbrella
need only be tested to fit DVB parameters. Even for terrestrial
broadcast, where information can be transmitted in multiple ways by
different service providers, the DVB standard limits the variations in
transmission from one provider to the next. This minimizes testing
costs for network operators, system integrators, service providers and
broadcasters.
Though this pocket guide focuses mainly on the System Information
specified by DVB, the standard also addresses other parts of digital
transmission, such as transmission mechanisms and data services.
For more information on these aspects of the DVB standard,
see http://www.dvb.org.
26
POCKET Guide (96 Pages) 23/03/00 15:02 Page 29
4.1.1 DVB System While MPEG-2 PSI tables organize the transmission of compressed
Information (SI) audio and video in a single transport stream, they are not designed
Tables to provide information for the large number of programs and services
available on a network of multiple transport streams. DVB Service
Information (SI) tables give service providers the tools they need to
offer programs and services across a large network that may include
many transport streams. SI tables function much like the Table of
Contents in a multi-chapter book. They enable receivers and set-top
boxes to access information anywhere in the MPEG/DVB network,
or bouquet of multiplexes, by providing information for events and
services available on all transport streams in the system. SI tables also
provide information for the Electronic Program Guide (EPG),
which supplies viewers with a list of all the programs and services
available, along with their duration and a description of their content.
SI tables have a specific structure similar to a file-management tree
structure on a PC with a root directory and subdirectories. They use
specific PID values for transmission and identification by any receiver.
There are four mandatory DVB SI tables: the Time and Date Table
(TDT), the Network Information Table (NIT), the Service Description
Table (SDT), and the Event Information Table (EIT).
27
POCKET Guide (96 Pages) 23/03/00 15:02 Page 30
❑ Time and Date This table provides the present UTC date and time, which can be adjusted
Table (TDT) according to time zone and presented on screen for the viewer.
28
POCKET Guide (96 Pages) 23/03/00 15:02 Page 31
The NIT defines tuning parameters for the channels in the network.
NETWORK A NETWORK B
29
POCKET Guide (96 Pages) 23/03/00 15:02 Page 32
NETWORK A NETWORK B
Service Service Service Service Service Service Service Service Service Service
A11 A12 A13 A31 A32 B11 B12 B13 B31 B32
30
POCKET Guide (96 Pages) 23/03/00 15:02 Page 33
The EIT is used to create the EPG, which gives the viewer access
to all the events available on the network.
NETWORK A NETWORK B
Service Service Service Service Service Service Service Service Service Service
A11 A12 A13 A31 A32 B11 B12 B13 B31 B32
31
POCKET Guide (96 Pages) 23/03/00 15:02 Page 34
32
POCKET Guide (96 Pages) 23/03/00 15:02 Page 35
4.2 DVB and Internet DVB’s recently developed Data Broadcasting specification allows for
Protocol (IP) high-speed data transfer via satellite, cable and terrestrial television
channels. Some potential applications for data broadcasting include
data-casting, downloading software, providing Internet services over
broadcast channels, and interactive TV. Data casting and surfing the
web via satellite offer consumers internet services at much greater
speeds than the typical telephone modem can offer. Where the trans-
mission of a 10MB file can take 30–45 minutes via telephone modem,
the same file can be downloaded via satellite to a high-performance
system in less than 20 seconds.
There are different implementations for data-broadcast over DVB.
The following figure summarizes the operation for multi-protocol
encapsulation (MPE) of IP as defined in the DVB standard, which uses
table section encapsulation into transport packets from MPEG-2.
33
POCKET Guide (96 Pages) 23/03/00 15:02 Page 36
IP datagrams
4 Kbyte
DVB table sections
Table_ ID xyz
1
130 byte 180 byte 188 byte 180 byte
MPEG-systems MPEG-systems MPEG-systems MPEG-systems
transport packets transport packets transport packets stuffing packets
PID 0x0400 PID 0x1234 Etc. PID 0xnnnn PID 0x1FFF
2
40 to 60 Mbit/s
MPEG-systems
multiplex
DVB-S
QPSK satellite modulation
34
POCKET Guide (96 Pages) 23/03/00 15:02 Page 37
❑ Multiplexing Step 2 in the process is the multiplexing of the transport packets from
the various multiple data streams—possibly along with video and audio streams
Data-Streams for digital TV—in a single MPEG transport stream. A transport stream
is a flagged bit stream with a fixed bit-rate corresponding to the per-
formance of the digital modulation through the satellite transponder.
Null packets are used for stuffing as the total bandwidth is rarely used
for Quality of Service (QoS) reasons.
35
POCKET Guide (96 Pages) 23/03/00 15:02 Page 38
5.1 ATSC History In 1987, the U.S. Federal Communications Commission (FCC) appointed
a special Advisory Committee as counsel regarding the technical and
political issues of Advanced Television (ATV). The formation of this
committee sparked a fierce competition among broadcast industry
leaders who hoped to propose to the Advisory Committee a system
that would be accepted as the nation’s standard. Twenty-three
proposals were originally brought before the Advisory Committee,
but by 1993, only four remained. The Committee tested these remaining
systems extensively and found deficiencies in each. In order to eliminate
these deficiencies and take advantage of the strengths found in each
system, the Advisory Committee encouraged the remaining competitors
to form a consortium by which they could work together to create
a U.S. standard for ATV broadcasting.
In response to this request, the remaining companies formed the HDTV
Grand Alliance in May of 1993. Within the Alliance, they worked
together to build a final prototype system based on specifications
approved by the Committee. The Committee called upon the
Advanced Television Systems Committee (ATSC) to develop and document
the detailed specifications of the new ATV standard based on
36
POCKET Guide (96 Pages) 23/03/00 15:02 Page 39
5.1.1 ATSC Program Like DVB SI tables, ATSC PSIP tables act as extensions to the MPEG-2
and System system layer, allowing broadcasters to make a larger number of
Information products and services available to the viewer. Unlike DVB, however,
Protocol (PSIP)
ATSC was created mainly for terrestrial broadcast where services are
Tables
made available through local TV stations that offer a limited number
of programs. Up to this point in time, the ATSC standard has been
used mainly for terrestrial applications, though it also provides parameters
for Cable TV (CATV) transmission.
PSIP tables are organized in a hierarchy similar to their DVB counter-
parts. They are identified by specific PID values and can thus be
identified by any ATSC receiver. PSIP tables include: the Master Guide
Table (MGT), the Virtual Channel Table (CVCT for cable, TVCT for
terrestrial), the System Time Table (STT), the Rating Region Table (RRT),
the Event Information Table (EIT), and the Extended Text Table (ETT).
37
POCKET Guide (96 Pages) 23/03/00 15:02 Page 40
❑ System Time The System Time Table consists of only one packet that serves as a
Table (STT) reference for the current time of day. This information enables the
receiver to start advertised events on schedule.
PID 0x1FFB
STT
Current time
38
POCKET Guide (96 Pages) 23/03/00 15:02 Page 41
❑ Rating Region This table transmits program-rating systems for each country that uses
Table (RRT) a rating standard. The information in this table allows viewers to
filter certain programs based on their content.
PID 0x1FFB
STT
Current time
RRT
Rating standards
per country
39
POCKET Guide (96 Pages) 23/03/00 15:02 Page 42
❑ Master Guide The Master Guide Table acts as an index for all other tables in the PSIP
Table (MGT) standard. It defines table sizes (necessary for proper decoding),
version numbers (which help to identify the tables that need to be
updated), and PID values (which enable the decoder to locate the EITs
and ETTs in the system).
PID 0x1FFB
STT
Current time
RRT
Rating standards
per country
MGT
Table type, ID, PID “xyz”
version and size
40
POCKET Guide (96 Pages) 23/03/00 15:02 Page 43
❑ Virtual This table lists all the channels in the transport stream and defines
Channel Table their characteristics. It includes information such as channel name,
(TVCT - terrestrial, stream components and types, and navigation identifiers. It identifies
CVCT - cable)
a source_id for each program, which the EIT uses to locate and
display information for the Electronic Program Guide.
PID 0x1FFB
STT
Current time
RRT
Rating standards
per country
MGT
Table type, ID, PID “xyz”
version and size
41
POCKET Guide (96 Pages) 23/03/00 15:02 Page 44
❑ Event The Event Information Table defines the events (TV programs) asso-
Information ciated with each of the virtual channels listed in the VCT. Information
Table (EIT) contained in this table might include an event’s start time and dura-
tion. According to the PSIP specification, between 4 and 128 EITs must
be in the transport stream at any given time. Each EIT provides event
information for a three-hour time period, so up to 16 days of pro-
gramming can be advertised in advance. EIT-0 always contains infor-
mation for the current 3-hour time block, while EIT-1 defines
programming for the next 3 hours.
PID 0x1FFB
STT
Current time
RRT
Rating standards
per country
MGT
Table type, ID, PID “xyz”
version and size
Min. 3
VCT EIT-0 EIT-1 Etc. EIT-n Max. 127
Source_id
9:00 news
news channel weather etc. Tab_id 0xCB
sport 1
9:30 World
sport 2 cup finals
radio
11:30
movies Casablanca
3 hour period
42
POCKET Guide (96 Pages) 23/03/00 15:02 Page 45
❑ Extended Text Extended Text Tables carry text messages describing both channels
Table (ETT) and events; hence, there are two types of ETTs: Channel ETTs and Event
ETTs. ETTs give the viewer more detailed information than is available
in the EIT. For example, Channel ETTs may contain information about
the price of a channel or its coming attractions. Event ETTs might
include a short paragraph describing a specific event, such as a movie.
As with EITs, the PID number for ETTs is also identified in the MGT.
ETTs are optional.
6.1 Why Should So, why should you test? The answer should be simple enough, right?
I Test? You test to make sure that the quality of your products will withstand
the rigors of the real-world environment. It seems simple enough, but
because testing can be costly and time consuming, validation teams
often limit the scope of their testing to include only those parameters
and events that are most likely to occur with their systems. Naturally,
these test scenarios are the easiest to create. But the constantly
changing digital broadcast environment forces all players to be much
43
POCKET Guide (96 Pages) 23/03/00 15:02 Page 46
44
POCKET Guide (96 Pages) 23/03/00 15:02 Page 47
45
POCKET Guide (96 Pages) 23/03/00 15:02 Page 48
6.1.2 Interoperability Because MPEG-2, DVB and ATSC are open systems, they specify only
the syntax of the output transport stream, not the manner in which
the stream is generated. This means that different manufacturers often
have different methods of encoding, modulating, or multiplexing the
input, while still remaining within the specification. Because complex
broadcasting systems often use equipment provided by different manu-
facturers, these manufacturers must be sure their systems can
46
POCKET Guide (96 Pages) 23/03/00 15:02 Page 49
47
POCKET Guide (96 Pages) 23/03/00 15:02 Page 50
6.1.3 Handling Errors Because digital transmission is especially vulnerable to errors, developers and
manufacturers must produce equipment that effectively handles dropped
packets or erroneous bits without crashing. In the case of the EPG, developers
need to make sure that their software can not only parse all possible
variations to the specification, but also resolve any error conditions that may
be present in a stream. This means making sure that the software does not
crash when an error occurs, thereby causing interruption in the video or audio
or forcing the user to turn the power off and on to recycle the system.
One common example of such an issue arises for ATSC systems when an error
occurs in the MGT. The MGT includes the length of the PSIP tables being
transmitted. However, if the value in the MGT does not match the true length
of a table, and the EPG software uses the length value from the MGT, the
table referred to in the MGT may not fit in the memory allocated. If this occurs,
the software might either discard it or overwrite other critical memory. Either
of these results could cause the software to crash or provide erroneous
information to the user. A reasonable EPG software package would detect
this problem and work around it, causing minimal impact to the EPG display.
In order to avoid this and other similar problems, the software developer
must test the digital television with as many erroneous transport streams as
possible. Again, a test PSIP simulator would allow you to easily simulate this
and many other error conditions.
48
POCKET Guide (96 Pages) 23/03/00 15:02 Page 51
6.2.1 Emulation or The test and verification of a digital television or set-top box includes
Simulation the feeding of many different variations of transport streams into the
equipment over time. This is a time-consuming process, and if any
changes are made to the hardware or software in the receiver during
the process, the testing must be repeated to test the areas affected
by the changes. Because the MPEG-2/DVB/ATSC specifications are so
complex, the number of different test scenarios required to test a digi-
tal television or receiver to a sufficient degree of confidence is quite
large. In order to obtain a collection of transport streams for testing,
manufacturers generally use one of three methods: live transmissions,
captured transport streams stored on disk, or simulated test streams.
Over the air (live) transmissions - Continuous feed is the main advan-
tage to using live transport streams for testing purposes. You can
49
POCKET Guide (96 Pages) 23/03/00 15:02 Page 52
connect a TV or IRD to an input source and let it run for days or weeks
without the cost of storing huge amounts of data on a hard drive.
The problem with this method, however, is that you cannot determine
the conditions of the test stream. And with live feed, these conditions
probably do not test the limits of what the equipment will be
required to do either now or in the future, according to the specification.
Captured transport streams - In the past, testing has generally been
accomplished with transport streams stored on a disk and played out,
repeating once they ended in order to mimic continuous feed. Unlike
over-the-air transmissions, broadcasters using captured transport
streams can select and store any number of test streams, each repre-
senting a different test scenario.
These captured streams can then be run through a transport stream
generator or other emulation device that sends the stream as input
to the unit under test. In spite of the possible variety available with
this method, however, the storage space required to keep these streams
severely limits the number of test scenarios that most manufacturers
store and use. For example, reasonable test coverage would require
10s to 100s of transport streams, each one occupying 100s of megabytes
or more of disk space. This database of streams is not only
difficult to obtain, but also time-consuming to manage.
50
POCKET Guide (96 Pages) 23/03/00 15:02 Page 53
Further, most captured streams do not test the limits of the specified
standards for items such as output rate, table size and repetition rate.
For example, U.S. terrestrial markets only transmit at 19.3 Mbps, so
most ATSC streams will be transmitted at this rate. But the future may
quite possibly see ATSC streams broadcast at 50 or 100 Mbps, as
specified by the standard. Manufacturers must know how their equipment
will react to these output rates. Table section lengths provide another
example. These days, most table sections are only 100 to 200 bytes long,
but according to the ATSC specification, they can be up to 1024 bytes
long. Actual transport streams with table sections of this size are
difficult to obtain, but manufacturers must test this condition for the
future.
Valid test streams should also present the unit under test with changing
conditions, such as changes in PID or PCR values. In order to test these
scenarios with real-world streams, manufacturers must encode and
multiplex a multitude of test streams that represent extreme conditions.
This requires expensive video compression equipment and multiplexers.
Once the stream has been created and sent as input to the unit under
test, a transport stream generator may be used to record erroneous
portions of the stream for analysis or testing.
51
POCKET Guide (96 Pages) 23/03/00 15:02 Page 54
52
POCKET Guide (96 Pages) 23/03/00 15:02 Page 55
information every three hours. These tests can also be run one after
another, in an automated fashion, to reduce the time and effort
needed to perform the tests. A test multiplexer allows you to create
a limited number of test streams that cover the range of conditions
for which you want to test.
53
POCKET Guide (96 Pages) 23/03/00 15:02 Page 56
They can also be used to check the size, quantizer scale, and motion
vectors for any macroblock in the video stream.
54
POCKET Guide (96 Pages) 23/03/00 15:02 Page 57
55
POCKET Guide (96 Pages) 23/03/00 15:02 Page 58
6.2.3 Analysis of a Validating any one of the different parts of the digital transport chain
Transmission requires not only the rigorous equipment testing discussed above, but
System also high-to-low-level transport stream analysis and validation. For
system integrators, this includes checking and rechecking the output
of the various pieces of equipment that make up a system. Transport
stream analysis helps system integrators verify that a particular com-
bination of encoders, modulators, multiplexers, and decoders can
effectively reproduce the input signal at the required level of quality.
Broadcasters who control large networks of programs and services
must be able to constantly monitor the output of their systems for
Quality of Service. Essentially all players in the digital transmission
chain must verify the output of their systems or services in order to
ensure quality performance for their customers. This kind of verifica-
tion requires some type of transport stream analyzer.
56
POCKET Guide (96 Pages) 23/03/00 15:02 Page 59
57
POCKET Guide (96 Pages) 23/03/00 15:02 Page 60
Transport stream generators are also used during validation for recor-
ding erroneous segments of a transport stream for off-line analysis.
This allows users to isolate problems in a system and resolve them
without delay. Transport stream generators can also be used in the
absence of a test multiplexer to play captured transport streams as
input to the unit under test.
6.3 What do I Look Many equipment manufacturers recognize the need to test their equipment
For? and even have the test tools necessary to do so, but are unsure exactly
what to look for during testing and validation. Because testing
requirements are often application specific, we’ve divided our answer
to this question into a few different test scenarios. Of course,
the information provided here is not all inclusive, but we hope this section
will give you a better idea of some of the most important issues involved
in testing the different elements of the digital broadcast system.
Compliance issues Compliance with the standards is essential when building digital
broadcast equipment of any kind. Because a single system often uses
equipment from different manufacturers, each piece of equipment
must be governed by the same protocol—and each must be able to
perform up to the limits specified by that protocol. The following
questions will help you create a more complete set of testing requirements.
Can the equipment handle the specified boundaries for items such as
output rate, table section size and PID number? If a high-definition
stream arrives at 45 Mbps, will the equipment process it properly?
What about table section sizes of 1024 bytes or PID values of 8190?
These and other protocol limits may become commonplace in the future,
so you will want to know how your equipment reacts to these
conditions.
After you have tested all boundary limits, consider possible changes
to the transport stream, both expected and unexpected. For example,
what if an audio or video stream changes PIDs? How will that affect
your system? What will happen if the PCR value changes unexpectedly?
What if extra bytes appear in the stream—will synchronization be
lost? For DVB systems, what happens when a new transport stream is
added to the network (or to the NIT)? How will that affect your system?
This event might be rare, but you want to know what effect it will
have on your system when and if it does occur.
59
POCKET Guide (96 Pages) 23/03/00 15:02 Page 62
Error conditions Of course, when you develop broadcast equipment your main concern
is that your equipment produces an error-free transmission stream.
Knowing your system’s limits can help you avoid unnecessary errors.
The main question here is, “What will it take to make the system fail?”
60
POCKET Guide (96 Pages) 23/03/00 15:02 Page 63
61
POCKET Guide (96 Pages) 23/03/00 15:02 Page 64
Tables - What happens when a CRC error occurs? For instance, what
if the PMT says the video PID is 50, but there is a bit error in the table?
Does the system process the table or discard it?
What happens when extra bytes are inserted every now and then?
Does the system maintain synchronization?
62
POCKET Guide (96 Pages) 23/03/00 15:02 Page 65
63
POCKET Guide (96 Pages) 23/03/00 15:02 Page 66
64
POCKET Guide (96 Pages) 23/03/00 15:02 Page 67
You will also want to verify rate- and timing-related issues that mea-
sure the statistical parameters of the transport stream. For instance,
do tables occur as often as expected? Does video arrive at the expected
speed? How many transport errors does the stream contain per second?
Some of these parameters are not exactly specified, so they must
be monitored and controlled by the broadcast equipment to ensure
proper decode and presentation. You can customize some transport
stream analyzers to identify unspecified errors that may affect your
system.
65
POCKET Guide (96 Pages) 23/03/00 15:02 Page 68
66
POCKET Guide (96 Pages) 23/03/00 15:02 Page 69
67
POCKET Guide (96 Pages) 23/03/00 15:02 Page 70
68
POCKET Guide (96 Pages) 23/03/00 15:02 Page 71
quality of the video or look for statistics about motion vectors. With IP
you may want to know what IP traffic is occurring in the transport
stream, or what data addresses are being transmitted.
Test equipment can help you quickly isolate hardware and software
failures in integrated systems. Transport stream analysis helps you
identify errors at the output. Emulation devices allow you to feed
known good streams to the different pieces of your system in order
to test their functionality and isolate errors. You may also need to
capture streams and send them back to a manufacturer for analysis
and repair of faulty equipment.
Test equipment can also be useful to system integrators when it comes
to acceptance testing. During acceptance testing, you must prove to
the customer that the system is set up properly and performs as expected.
The customer will want to know that output transport streams meet
the required specifications, that the program guide is set up properly,
and that the streams are transmitted at the correct rate. Test analyzers
allow integrators to print reports based on the content of the output
transport stream. These reports verify the PIDs and tables in the stream
at any given time and display their individual rates. They can be run
periodically over time to prove that a system can run without error
for days or weeks at a time.
69
POCKET Guide (96 Pages) 23/03/00 15:02 Page 72
70
POCKET Guide (96 Pages) 23/03/00 15:02 Page 73
Block—A set of 8x8 pixels used during Discrete Cosine Transform (DCT).
Bouquet—A set of services sold as a single entity.
Broadcaster—Someone who provides a sequence of scheduled events
or programs to the viewer.
CA—Conditional Access. This system allows service providers to control
subscriber access to programs and services via encryption.
CAT—Conditional Access Table. This table identifies EMM streams with
a unique PID value. The CAT is always found on PID 0x0001.
CATV—Community Access Television, otherwise known as Cable TV.
Channel—A digital medium that stores or transports an MPEG-2
transport stream.
COFDM—Coded Orthogonal Frequency-Division Modulation.
Compression—Reduction of the number of bits needed to represent
an item of data.
Conditional Access—A system used to control viewer access to
programming based on subscription.
CRC—Cyclic Redundancy Check. This 32-bit field is used to verify the
correctness of table data before decoding.
71
POCKET Guide (96 Pages) 23/03/00 15:02 Page 74
73
POCKET Guide (96 Pages) 23/03/00 15:02 Page 76
for events on all the virtual channels within the transport stream. ATSC
requires that each system contain at least 4 EIT tables, each
representing a different 3-hour time block. The PIDs for these tables
are identified in the MGT.
EIT Actual (DVB)—Event Information Table. This table is part of the
DVB SI. It supplies the list of events corresponding to each service and
identifies the characteristics of each of these events. Four types of EITs
are defined by DVB : 1) The EIT Actual Present/Following supplies
information for the present event and the next or following event of
the transport stream currently being accessed. This table is mandatory
and can be found on PID=0x0012. 2)The EIT Other Present/Following
defines the present event and the next or following events of other
transport streams in the system that are not currently being accessed
by the viewer. This table is optional. 3) The EIT Actual Event Schedule
supplies the detailed list of events in the form of a schedule that goes
beyond what is currently or next available. This table supplies a schedule
of events for the transport stream currently being accessed by the
viewer. 4) The EIT Other Event Schedule supplies the detailed schedule
of events that goes beyond what is currently or next available. This
table supplies a schedule of events for other transport streams in the
system that are not currently being accessed by the viewer. The EIT
Schedule tables are optional.
74
POCKET Guide (96 Pages) 23/03/00 15:02 Page 77
75
POCKET Guide (96 Pages) 23/03/00 15:02 Page 78
78
POCKET Guide (96 Pages) 23/03/00 15:02 Page 81
79
POCKET Guide (96 Pages) 23/03/00 15:02 Page 82
81
POCKET Guide (96 Pages) 23/03/00 15:02 Page 84
82
POCKET Guide (96 Pages) 23/03/00 15:02 Page 85
84
POCKET Guide (96 Pages) 23/03/00 15:02 Page 87
85
POCKET Guide (96 Pages) 23/03/00 15:02 Page 88
8 Reference Materials
86
POCKET Guide (96 Pages) 23/03/00 15:02 Page 89
87
POCKET Guide (96 Pages) 23/03/00 15:02 Page 90
88
POCKET Guide (96 Pages) 23/03/00 15:02 Page 91
8.4 Other Nielsen, Ole Stender and Nanna Eriksen. A Broadcaster’s Guide to
References MPEG. RE Technology AS, September 1996.
NVision. The Book: An Engineer’s Guide to the Digital Transition.
Nvision: Grass Valley, CA.
NVision. The Book II: More Engineering Guidance for the Digital
Transition. Nvision: Grass Valley, CA, 1999.
Philips Key Modules. MPEG Questions and Answers. Philips: Eindhoven,
The Netherlands, 1996.
Symes, Peter D. Video Compression. McGraw Hill: New York, NY, 1998.
Whitaker, Jerry. DTV: The Revolution in Electronic Imaging. McGraw Hill:
New York, NY, 1998.
89
POCKET Guide (96 Pages) 23/03/00 15:02 Page 92
Index Analysis
elementary streams............................................................................53
transport streams ..............................................................................56
ATSC......................................................................................................36, 46
history ................................................................................................36
PSIP tables ..........................................................................................37
audio compression ....................................................................................14
Auditory masking ......................................................................................14
BAT ............................................................................................................32
B-frame.......................................................................................................11
Bi-directionally predicted frame ..............................................................11
Bit errors.....................................................................................................61
Bouquet Association Table........................................................................32
CAT ............................................................................................................22
compliance ................................................................................................59
compression
audio compression ............................................................................14
video compression ..............................................................................7
Conditional Access Table ..........................................................................22
CRC ...............................................................See Cyclic Redundancy Check
CVCT ..........................................................................................................41
Cyclic Redundancy Check ..........................................................................66
DCT ..............................................................See Discrete Cosine Transform
Decoding ....................................................................................................12
Decoding Time Stamp ........................................................................13, 18
Digital Video Broadcasting..............................................................See DVB
Discrete Cosine Transform ..........................................................................8
DTS ....................................................................See Decoding Time Stamp
90
POCKET Guide (96 Pages) 23/03/00 15:02 Page 93
DVB ......................................................................................................25, 46
Internet Protocol (IP) ........................................................................33
SI tables ..............................................................................................27
DVB history ................................................................................................25
DVB Project ................................................................................................25
dynamic range ..........................................................................................15
EIT ......................................................................................................30, 41
Electronic Program Guide ............................................................27, 45, 66
Elementary Stream Analysis......................................................................53
Emulation ............................................................................................46, 49
Encoder ......................................................................................................63
entropy coding ..........................................................................................10
EPG ..............................................................See Electronic Program Guide
equipment............................................................................................49, 69
Errors in transmission ................................................................................48
ETT ............................................................................................................43
Event Information Table ....................................................................30, 41
events ........................................................................................................63
Extended Text Table ..................................................................................43
Grand Alliance ..........................................................................................36
History
ATSC ....................................................................................................36
DVB ....................................................................................................25
MPEG ....................................................................................................2
I-frame........................................................................................................10
Inter-frame prediction ..............................................................................10
Internet Protocol ......................................................................................33
Interoperability..........................................................................................46
91
POCKET Guide (96 Pages) 23/03/00 15:02 Page 94
Intra-coded frame......................................................................................10
Java data ....................................................................................................68
manufacturer ............................................................................................58
masking ......................................................................................................14
Master Guide Table ..................................................................................40
MGT ............................................................................................................40
Motion prediction ....................................................................................12
motion vectors ..........................................................................................12
Moving Pictures Experts Group ..................................................................5
MPEG
history ..................................................................................................2
MPEG-1 ........................................................................................................4
MPEG-2 ..................................................................................................5, 46
audio compression ............................................................................14
PSI tables ............................................................................................20
standard................................................................................................6
video compression ..............................................................................7
MPEG-4 ........................................................................................................5
Multiplexer ................................................................................................63
Network Information Table ................................................................23, 28
NIT ............................................................See Network Information Table
Packet Identifier ........................................................................................18
Packetized Elementary Stream ................................................................16
PAT ............................................................................................................21
PCR ................................................................See Program Clock Reference
PES ......................................................See Packetized Elementary Stream
P-frame ......................................................................................................11
Phase Lock Loop ........................................................................................19
92
POCKET Guide (96 Pages) 23/03/00 15:02 Page 95
93
POCKET Guide (96 Pages) 23/03/00 15:02 Page 96
system information....................................................................................17
System Information ..................................................................................27
System Integration ....................................................................................67
System Time Table ....................................................................................38
TDT ............................................................................................................28
Temporal encoding....................................................................................10
test equipment ..........................................................................................49
testing
compliance ........................................................................................59
equipment ....................................................................................45, 69
errors ..................................................................................................60
how? ..................................................................................................49
what to look for ................................................................................58
Testing
why?....................................................................................................43
Time and Date Table..................................................................................28
Timing....................................................................................................18,61
Timing Offset Table ..................................................................................32
TOT ............................................................................................................32
transport packet ........................................................................................17
TVCT ..........................................................................................................41
VCT ............................................................................................................41
video compression ......................................................................................7
Virtual Channel Table ................................................................................41
Weighting ....................................................................................................9
94
COUVERTURE Wandel 27/03/00 22:11 Page 1
E-mail Address
mpeg@wwgsolutions.com