0% found this document useful (0 votes)
171 views6 pages

A New Method For Calculating PCR

This paper proposes a new method for recalculating the program clock reference (PCR) in a packet-based video transmission network. The method replaces the PCR value with a new value from an onboard high reliability source. The goal was to synchronize the video and audio signals by fixing issues caused by delays in transmission. Testing of the method on a DekTec decoder was successful in perfectly synchronizing the signals.

Uploaded by

ionutsm
Copyright
© © All Rights Reserved
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
0% found this document useful (0 votes)
171 views6 pages

A New Method For Calculating PCR

This paper proposes a new method for recalculating the program clock reference (PCR) in a packet-based video transmission network. The method replaces the PCR value with a new value from an onboard high reliability source. The goal was to synchronize the video and audio signals by fixing issues caused by delays in transmission. Testing of the method on a DekTec decoder was successful in perfectly synchronizing the signals.

Uploaded by

ionutsm
Copyright
© © All Rights Reserved
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/ 6

A NEW METHOD FOR RECALCULATING

THE PROGRAM CLOCK REFERENCE IN A


PACKET-BASED TRANSMISSION
NETWORK

M. ALEXANDRU1 G.D.M. SNAE2 M. FIORE3

Abstract: This paper proposes and describes a novel method to be used in a


video transmission network that synchronizes the video signal with the audio
signal, replacing the program clock reference with a new value from an
onboard high reliability source. The intended goal of recalculating the
program clock reference values was a success and the test works perfectly on
the DekTec decoder.

Key words: Program Clock Reference, DVB, MPEG-2.

1. Introduction MPEG-2 reduces a single signal from 216


Mbit/s to 5 Mbit/s allowing broadcasters to
Digital Video Broadcasting (DVB) is a transmit digital signal using existing cable,
set of standards that define digital satellite, and terrestrial systems. MPEG-2
broadcasting using existing satellite, cable, uses the loss compression method, which
and terrestrial infrastructures (Figure 1). means that the digital signal sent is lost.
Today, the DVB Project consists of over This lost data does not affect how the
220 organizations in more than 29 human eye perceives the picture. Two
countries worldwide. DVB-compliant digital television formats that use MPEG-2
digital broadcasting and equipment is compression are Standard Definition
widely available and is distinguished by Television (SDTV) and High Definition
the DVB logo. Numerous DVB broadcast Television (HDTV).
services are available in Europe, North and Just like HDTV, DVB has a problem
South America, Africa, Asia, and with the synchronization of pictures and
Australia. The term digital television is sound. This problem is resolved by
sometimes used as a synonym for DVB. recalculating the values of Program Clock
However, the Advanced Television System Reference (PCR) [1], [3].
Committee (ATSC) standard is the digital
broadcasting standard used in the U.S. 2. MPEG-2 and Transport Stream (TS)
A fundamental decision of the DVB Characterization
Project was the selection of MPEG-2, one
of a series of MPEG standards for Moving video images must be delivered
compression of audio and video signal. in real time and with a consistent rate of

1
Dept. of Electronics and Computers, Transilvania University of Braov.
2
Elettronika Research S.R.L. Braov, Romania.
3
Dept. Research & Development, Elettronika Italy.
238 Bulletin of the Transilvania University of Braov Vol. 2 (51) - 2009 Series I

presentation in order to preserve the of delay for video packets arriving at the
illusion of motion. However, delays decoder. This delay wrecks havoc in the
introduced by coding, multiplexing and decoder process mandating buffers in the
transmission can cause a variable amount decoder [2].

Fig. 1. The transmission network from the studio to the transmitter

The MPEG-2 standard provides an manifested as bit value errors or loss of


additional mechanism to ensure video packets.
frames can be decoded and delivered to the TS may be either fixed or variable rate.
viewer with a consistent rate of display - In either case the constituent elementary
that mechanism is called the Program streams may either be fixed or variable
Clock Reference (PCR). rate. The syntax and semantic constrains
PCR is fundamental for the timing on the stream are identical in each of these
recovery mechanism for MPEG-2 transport cases. The TS rate is defined by the values
streams. PCR values are embedded into the and locations of PCR fields, which
adaptation field within the transport generally are separate PCR fields for each
packets of defined packet identifiers (PID). program [4].
PCR consists of two parts totalling 42 bits. Figure 2 shows the MPEG-2 TSs
The PCR values increment with a standard management to maintain synchronization
clock rate of 27 MHz, PCR values roll between the sender, which encodes the
over roughly once a day. stream, and the receiver, which decodes it.
As PCR is used by the Integrated As the elementary streams carrying video
Receiver Decoder (IRD) to derive the and audio content are packaged, their
clock reference, any jitter or drift is the target Decoding Time Stamp (DTS) and
PCR clock can have damaging effect on Presentation Time Stamp (PTS) are
the IRDs performance. The irregularities determined based on the current sender
in the PCR can be broadly classified into clock and inserted into the packet header.
jitter and offset. Jitter in the PCR is mainly For video streams, the access unit is a
attributed to two sources: systematic jitter frame, and both DTS and PTS are given
(or PCR accuracy error, PCR_AC), and only for the first bit after the picture header
network jitter. Systematic jitter and of every frame, which are later used by the
network jitter are combined to get overall decoder to control the speed at which it
jitter (PCR_OJ). starts to do decoding and presentation. For
The Transport Stream is a stream definition example, if at time 5.0 s an encoded frame
which is tailored for communicating or comes to the multiplexing stage, and the
storing one or more programs of coded data encoder believes that the decoder should
according to ITU-T Rec. H.262|ISO/IEC begin to decode that frame 0.5 s after it
13818-2 and ISO/IEC 13818-3 and other receives it and output the decoded frame
data in environments in which significant 0.1 s thereafter, then the DTS should be set
errors may occur. Such errors may be to 5.5 s and the PTS to 5.6 s. After that, as
Alexandru, M., et al.: A New Method for Recalculating the Program Clock Reference 239

these entire packaged elementary stream Program Clock Reference (PCR), which is
packets are further multiplexed together, given by periodically sampling the sender
the final stream is time-stamped with clock.

Fig. 2. Generic coding of moving pictures and associated audio systems

This resulted transport layer stream is (video, audio, data and timestamps) are
then sent over the network to the receiver, segmented into small packets of constant
or stored in storage devices for the decoder size (188 bytes), and the Packet ID (PID)
to read in the future. As long as the delay field in the 4-byte header of a packet tells
of the whole stream experiences remains which sub stream that packet belongs to.
constant from the receivers point of view, The PCR packets occur at constant
the receiver should be able to reconstruct intervals, and they form a running timeline
the senders clock that has been used when along which all other packets are
the stream was encoded. The accuracy and positioned at the right time point. Data
stability of this recovered clock is very packets arrive and they are read into the
important, since the decoder will try to decoder buffer at constant rate; this rate
match the PTS and DTS against this clock can be calculated by dividing the number
to guide its decoding and displaying activities. of bits between any 2 consecutive PCR
packets by the time difference between
their time stamps. In other words, if the
number of packets between any 2 PCR
packets remains constant, then the dif-
ference between their time stamps should
also be constant. Considering an ideal
state, packets are read into the decoder at
Fig. 3. Generic coding of moving pictures the constant bit rate, and whenever a new
and associated audio systems PCR packet arrives, its time stamp should
match exactly with the receiver clock,
Knowing the general idea in timing, we which confirms the decoder that so far it
introduce now an explanation about how has successfully re-constructed the same
the Transport Layer syntax works, as clock as the encoder. However, since PCR
shown in the Figure 3. All sub streams packets may have experienced jitter in
240 Bulletin of the Transilvania University of Braov Vol. 2 (51) - 2009 Series I

network transmission or storage device carry, and so its following frames are
accessing before they arrive at the receiver, dragged earlier or pushed later along the
we cannot simply set the receivers local timeline. In such circumstances, if we keep
clock to be the same as the time stamp both the time stamp and the spacing of the
carried by the next incoming PCR no PCR packets unchanged, then the
matter when it comes. To smooth out the receivers clock can still be correctly
jitter and maintain a stable clock with a reconstructed, but the arriving time of each
limited buffer size at the receiver, frame will be skewed along the timeline.
generally the receiver will resort to some For example, if the stream is low pass
smoothing technique like the Phase- filtered, and then every frame becomes
Locked-Loop (PLL) to generate a stable shorter, the following frames are dragged
clock from the jittered PCR packets. PLL forward to pack up the vacancy spared out.
is a feedback loop that uses an external From the decoders point of view, more
signal (the incoming PCR packets in our and more future frames begin to come
case) to tune a local signal source earlier and earlier, and to buffer them until
(generated by a local oscillator) to generate their stamped time for decoding, the buffer
a relatively more stable result signal (the will be overflowed in the long run no
receivers reconstructed local clock). As matter how large it is. The fundamental
long as the timing relation between PCR problem is that after the filtering, the actual
packets is correct, the jitter can be bit rate becomes lower or higher, but the
smoothed out with PLL [5]. data is still read in by the decoder at the
After the brief introduction on the usage original rate. So if the new rate is lower,
and importance of the PCR packets, now more and more future data is read in by the
we are ready to discuss how the filtering decoder, causing the decoder buffer to
operation may affect their validity and overflow eventually; on the other hand, if
accuracy. First, even for the same type of the new rate is higher, then at some point
filtering operation, e.g., low pass filtering, in the future, the data will be read in after
for different frames, the time required to its decoding time has already passed.
do the calculation and processing can be
quite different. Since the filtering is 3. Our Solution
transparent to the decoder, it seems to the
decoder that the jitter the stream has Because the length of the packets can be
experienced is larger. This is not a big 188/204Bytes, our solution is designed to
problem, since through longer buffering at work with both types of packets.
the filter and the receiver and the use of The first step was to set-up a real-time
jitter smoothing mechanisms, this stronger packet length monitoring and to verify the
jitter will not greatly affect the decoding nature of the packets, in order to set the
process. The second problem, however, is system to work on 188/204Bytes.
more intractable. As its mentioned above, Then, based on the PID of the packet, we
the packets for any access unit should be checked if the header of the packet
positioned within the stream and so arrive contains PCR values; if so, then those
at the receiver at its supposed time point values have been removed from the packet.
for the decoder to schedule where and how For testing we used an external source
long to buffer it before decoding it. for the PID, consisting of 3 jumpers. We
However, after the filter operations also tested a software approach. In the final
normally, a video frame becomes smaller project we used a block that will calculate
or larger. It takes less or more packets to the PID.
Alexandru, M., et al.: A New Method for Recalculating the Program Clock Reference 241

Fig. 4. Altera Cyclone III + Bitec HSMC BVDC & DekTec USB-2 ASI/SDI

Fig. 5. StreamXpress (right); StreamXpert (left)

Because the TS packets came in bursts, a TSViewer, designed by Elettronika - Italy,


dual-port RAM has been used to smooth is the software used to view the data inside
the data throughput rate. The next step was the transport stream packets.
to recalculate the new PCR values and to Figure 5 shows screenshots taken from
insert them into the packets. the DekTec applications which generate an
To test our solution, the Altera Cyclone ASI Transport Stream continuously
III starter kit, Bitec HSMC BVDC and a feeding our system and analyze in real-
DekTec USB2 ASI/SDI player and time the processed Transport Stream
analyzer have been used (Figure 4). generated by our restamping system.

Fig. 6. TSViewer
242 Bulletin of the Transilvania University of Braov Vol. 2 (51) - 2009 Series I

The DekTec applications (named timestamps are not synchronized. For a


StreamXpress and StreamXpert) can better synchronization, further work on the
operate with 188 and 204 packet lengths PTS-DTS timestamps has to be carried out.
and run in combination with a USB
module capable of bidirectional real-time References
conversion between the USB and DVB-
ASI interfaces. 1. Allen, J.R.: System and Method for
Figure 6 shows a screenshot of Reducing Jitter in a Packet-Based
TSViewer. In this program we see the data Transmission Network. U.S. Patent no.
from a transport stream. The TS is saved in 5652627.
a file which is then loaded in the program. 2. Navalpotro, J.: Short Note on PCR Jitter.
The program can also select all the packets Available at: www.abacantodigital.com/
with a specified PID. docs/ART-V_Short_Note_PCR-Jitter.
pdf. Accessed: 15-04-2009.
4. Conclusions and Future Work 3. Nemiroff, R., Liu, V., Wu, S.:
Regeneration of Program Clock
The intended goal of recalculating the Reference Data for MPEG Transport
PCR values was a success. The test works Stream. U.S. Patent no. 6724825 B1.
perfectly on the DekTec decoder but on the 4. Pandya, H.: Application Note - AN101
Rohde&Schwarz DVMD decoder the Considerations for Measurement of a
video and audio are slightly discontinuous, PCR Jitter. Pixelmetrix Corporation.
which suggests that the PTS-DTS 5. ISO/IEC JTC1/SC29/WG11 N0801.

You might also like