Design and Implementation of a Multi-programs
Transport Stream Multiplexer
Lei Zhang, Xiaofeng Huang, Yangang Cai
School of Electronic and Computer Engineering
Peking University Shenzhen Graduate School
Shenzhen, China
{lzhang, xfhuang, ygcai}@jdl.ac.cn
Zhuo Li, Huizhu Jia, Xiaodong Xie
National Engineering Laboratory of Video Technology
Peking University
Beijing, China
{zli, hzjia, xdxie}@jdl.ac.cn
Abstract—This paper describes design and implementation of a
multi-programs transport stream multiplexer which is based on
AVS system standard. We have developed an AVS TS compliant
multiplexer with special considerations for multi-programs
multiplexing. In particular, we construct a monitoring structure
which can imitate the behavioral model of T-STD and then use the
monitoring information as the key factors for scheduling. We have
made efficient verification of AVS and MPEG-2 compliance by
RTL simulation.
Keywords—Multi-programs, AVS system standard, Monitoring
structure, Behavioral model, Scheduling.
I. INTRODUCTION
AHB BUS
Video
Encoder
Audio
Encoder
CPU
DDR controller
DMA
Multi-programs
TS multiplexer
Video #4
Video #3
Video #2
Video #1
Audio #1
Audio #4
Audio #3
Audio #2
ES PES
TS out
Mu
ltiplexer is one of the key installations in the digital
television system. We have developed a multi-programs TS
multiplexer which adopts AVS transport stream as
multiplexing scheme. The multiplexer can multiplex at most 4
programs into a single transport stream. Every program
contains one video signal and one audio signal.
AVS system standard [1] expounds how to combine one or
multiple audio, video and other elementary data streams into a
single transport stream for storage and transmission. The
transport stream is mainly for environments where significant
errors may occur. System coding must follow the grammar and
semantic rules specified by AVS system standard. The standard
also provides a method to guarantee the timing and
synchronization of video and audio signal.
AVS system standard specifies a “System Target Decoder”
(STD) for analyzing the relationship between timing and
buffers. For transport streams, it is called “Transport Stream
System Target Decoder” (T-STD). The factors of T-STD
depend on particular elementary streams. TS multiplexer
should generate transport stream which must satisfy the
constraints of T-STD.
This paper describes design requirements, operating
principles and the RTL architecture of our design. The key
point of our design is using T-STD monitors to control TS
output for avoiding overflow and underflow in decoder buffers.
This paper is organized as follows. In section 2,we show
the functional requirements and design issue in multi-programs
TS multiplexer design. Section 3 presents the hardware
architecture and implementation. The process of verification is
show in Section 4. Finally, we conclude this paper in section 5.
II. FUNCTIONAL
REQUIREMENTS AND DESIGN
ISSUE
Our multi-programs multiplexer is designed as a hardware
module in SOC. It is linked on the AMBA AHB bus as a slave.
The architecture of the entire system is show in figure 1.
Fig. 1. Architecture of the Encoder and Multiplexer entire system
There are 4 video signals and 4 audio signals input. The
video and audio encoder compress the video and audio signal
into ES (Elementary Stream) and PES (Packetized Elementary
Stream), then store them in DDR. DMA pushes the ES and
PES to TS multiplexer.
The firmware run on CPU calculates the PES header for
video. One frame of video is packetized to one PES packet.
The firmware also generates PSI&SI for multiplexer.
So, the function of our multiplexer is multiplexing 4 video
ES and 4 audio PES into 1 single TS.
Commonly, decoder design must refer to the T-STD. It
means that TS must satisfy the constraint of T-STD; otherwise,
it will not be decoded correctly. The structure of the T-STD is
shown in figure 2.
This work is partially supported by grants from the Chinese National Nat
ural Science Foundation under contract No.61171139 and No. 61035001, and
ational High Technology Research and Development Program of China (86
3 Program) under contract No.2012AA011703.