JP2001144720A - Device and method for multiplexing and recording medium - Google Patents

Device and method for multiplexing and recording medium

Info

Publication number
JP2001144720A
JP2001144720A JP32774799A JP32774799A JP2001144720A JP 2001144720 A JP2001144720 A JP 2001144720A JP 32774799 A JP32774799 A JP 32774799A JP 32774799 A JP32774799 A JP 32774799A JP 2001144720 A JP2001144720 A JP 2001144720A
Authority
JP
Japan
Prior art keywords
data
multiplexing
data stream
pes
holding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP32774799A
Other languages
Japanese (ja)
Inventor
Shoji Shiomoto
祥司 塩本
Tetsuo Sumida
哲夫 隅田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP32774799A priority Critical patent/JP2001144720A/en
Publication of JP2001144720A publication Critical patent/JP2001144720A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Television Systems (AREA)
  • Time-Division Multiplex Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To avoid a DTS regulation violation of a PES of a channel whose priority is low in a congestion state and also to suppress data discard quantity. SOLUTION: In a step S1, whether or not the TB and MB of a T-STD are normally simulated is verified. In a step S2, whether or not an unerected multiplexing inhibition flag exists among multiplexing inhibition flags corresponding to each channel is decided. When the unerected multiplexing inhibition flag is decided as existing, and an advance is made to a step S4, and a channel in which the value of a multiplex priority function f2 (lefttime, Pk (k)) is minimum is selected and multiplexed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、多重化装置および
方法、並びに記録媒体に関し、例えば、優先順位が設定
されている複数のデータストリームを多重化してトラン
スポートストリームを生成する場合に用いて好適な多重
化装置および方法、並びに記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiplexing apparatus and method, and a recording medium, and is suitable for use, for example, when multiplexing a plurality of data streams for which priorities are set to generate a transport stream. Multiplexing apparatus and method, and a recording medium.

【0002】[0002]

【従来の技術】例えば、スカイパーフェクTV!(商
標)のようなディジタル衛星放送サービスにおいては、
放送信号にMPEG(Moving Picture Experts Group)2方式
のトランスポートストリーム(Transport Stream、以
下、TSと記述する)が用いられている。ディジタル衛
星放送サービスを実現するディジタル衛星放送システム
の構成の一例を図1を参照して説明する。
2. Description of the Related Art For example, SkyPerfect TV! Digital satellite broadcasting services such as (Trademark)
A transport stream of MPEG (Moving Picture Experts Group) 2 system (Transport Stream, hereinafter referred to as TS) is used for a broadcast signal. An example of the configuration of a digital satellite broadcasting system that realizes a digital satellite broadcasting service will be described with reference to FIG.

【0003】このディジタル衛星放送システムは、放送
局等に設置され、放送信号としてのTSを通信衛星2に
向けて送信する送信装置1、送信装置1からのTSを中
継する通信衛星2、および、通信衛星2で中継されたT
Sを受信し、選択されたプログラムのAV信号を再生す
る受信装置3から構成される。
[0003] This digital satellite broadcasting system is installed in a broadcasting station or the like, and transmits a TS as a broadcast signal to a communication satellite 2, a communication satellite 2 which relays a TS from the transmission device 1, and T relayed by communication satellite 2
The receiving device 3 receives S and reproduces the AV signal of the selected program.

【0004】送信装置1のPESストリーム生成部11−
1乃至PESストリーム生成部11−nは、プログラムの
AV信号をMPEG2方式により圧縮符号化してエレメンタ
リストリーム(Elementary Stream、以下、ESと記述
する)を生成し、ESを所定のデータ長毎にパケット化
してパケッタイズドエレメンタリストリーム(Packetiz
ed Elementary Stream、以下、PESと記述する)を生成
し、多重化装置12に出力する。
[0004] The PES stream generation unit 11- of the transmission device 1
1 to PES stream generation units 11-n generate an elementary stream (hereinafter, referred to as ES) by compression-encoding the AV signal of the program according to the MPEG2 system, and convert the ES into packets at a predetermined data length. Into a packetized elementary stream (Packetiz
An ed Elementary Stream (hereinafter, referred to as PES) is generated and output to the multiplexer 12.

【0005】PESを構成するPESパケットは、図2に示す
ように、所定のデータ長に区分けされたESに相当する
PESペイロードデータに、PESパケットヘッダが付与され
ている。PESヘッダには、PESを伝送する際に送信側と受
信側の基準時刻を同期させるために用いられる基準時刻
を示すESCR(Elementary Stream Clock Reference)、受
信側において送信側が意図するタイミングで復号と表示
が行われるための同期情報であるDTS(Decode Time Stam
p)およびPTS(Presentation Time Stamp)が含まれてい
る。
[0005] As shown in FIG. 2, a PES packet constituting a PES corresponds to an ES divided into a predetermined data length.
A PES packet header is added to the PES payload data. In the PES header, ESCR (Elementary Stream Clock Reference) indicating the reference time used to synchronize the reference time of the transmitting side and the receiving side when transmitting the PES, decoding and displaying at the timing intended by the transmitting side at the receiving side DTS (Decode Time Stam)
p) and PTS (Presentation Time Stamp).

【0006】多重化装置12は、PESストリーム生成部
11−1乃至PESストリーム生成部11−nで生成され
たn本のPESストリームを時分割多重化してTSを生成
し、誤り訂正部13に出力する。TSは、図3に示すよ
うに、固定長(188バイト)のTSパケットで構成さ
れる。TSパケットはTSの基準時刻情報であるPCR(Pr
ogram Clock Reference) を含むTPヘッダと、分割さ
れたPESパケットが格納されているペイロードデータか
ら成る。
The multiplexing device 12 generates a TS by time-division multiplexing the n PES streams generated by the PES stream generation units 11-1 to 11-n, and outputs the TS to the error correction unit 13. I do. The TS is composed of a fixed-length (188 bytes) TS packet as shown in FIG. The TS packet has a PCR (Pr
The TP header includes a TP header including a gram clock reference) and payload data storing the divided PES packets.

【0007】誤り訂正部13は、多重化装置12で生成
されたTSに誤り訂正のための符号化を施して変調部1
4に出力する。変調部14は、誤り訂正処理が施された
TSに、QPSK(Quadrature Phase Shift Keying)等のデ
ィジタル変調処理を施してアンテナ15に出力する。ア
ンテナ15は、変調部14からの変調信号を増幅し、R
F信号として通信衛星2に向けて送信する。
[0007] The error correction section 13 performs encoding for error correction on the TS generated by the multiplexing apparatus 12 and performs modulation on the TS.
4 is output. The modulation unit 14 performs digital modulation processing such as QPSK (Quadrature Phase Shift Keying) on the TS on which the error correction processing has been performed, and outputs the resultant to the antenna 15. The antenna 15 amplifies the modulation signal from the modulation unit 14 and outputs R
The signal is transmitted to the communication satellite 2 as an F signal.

【0008】受信装置3のアンテナ21は、通信衛星2
で中継されたRF信号を受信し、IF信号に変換してIR
D(Integrated Receiver Decoder)22に出力する。IRD
22は、アンテナ21からのIF信号に復調処理や誤り
訂正処理等を施し、得られたTSから、ユーザが選択し
たプログラムのPESを抽出し、MPEGデコードして得られ
たAV信号をモニタ23に出力する。
The antenna 21 of the receiving device 3 is connected to the communication satellite 2
Receives the RF signal relayed by the
D (Integrated Receiver Decoder) 22 is output. IRD
A demodulation process, an error correction process, and the like are performed on the IF signal from the antenna 21, a PES of a program selected by the user is extracted from the obtained TS, and an AV signal obtained by MPEG decoding is output to the monitor 23. Output.

【0009】図4は、送信装置1の多重化装置12の詳
細な構成の一例を示している。入力処理部31は、PES
ストリーム生成部11−1乃至11−nから入力される
n本のPESを、対応する多重バッファ34−1乃至34
−nに書き込むとともに、各PESを構成するPESパケット
のPESヘッダ等に記述されている属性データを抽出す
る。入力処理部31はまた、抽出した属性データのう
ち、ESCRについては、そのESCRのデコード値および捕捉
したタイミングを用いてストリームの基準時間を再生
し、得られた基準時刻を制御データ生成部32に供給す
る。抽出した他の属性データ(Stream ID等)について
は、多重化制御部37および制御データ生成部32に供
給する。
FIG. 4 shows an example of a detailed configuration of the multiplexing device 12 of the transmitting device 1. The input processing unit 31
The n PESs input from the stream generators 11-1 to 11-n are converted into the corresponding multiplex buffers 34-1 to 34-34.
−n and extract attribute data described in a PES header or the like of a PES packet constituting each PES. The input processing unit 31 also reproduces the reference time of the stream using the decoded value of the ESCR and the captured timing for the ESCR among the extracted attribute data, and transmits the obtained reference time to the control data generation unit 32. Supply. The extracted other attribute data (Stream ID or the like) is supplied to the multiplexing control unit 37 and the control data generation unit 32.

【0010】制御データ生成部32は、入力処理部31
から供給される基準時刻情報や属性データを用い、プロ
グラムを受信側で再生するために必要な制御データを生
成してスイッチ36に出力する。生成される制御データ
には、プログラム仕様情報(Program Specific Infomat
ion、以下、PSIと記述する)やプログラム全体または一
部についての各種情報であるサービス情報(Service In
formation、以下SIと記述する)、および、各プログラ
ムに固有のプログラム時刻基準参照値を示すPCRが含ま
れる。
[0010] The control data generation unit 32 includes an input processing unit 31.
Using the reference time information and the attribute data supplied from, the control data necessary for reproducing the program on the receiving side is generated and output to the switch. The generated control data includes Program Specific Infomat
service information (Service In) which is various information about the whole or a part of the program.
formation, hereinafter referred to as SI), and PCR indicating a program time reference value unique to each program.

【0011】ヌルパケット生成部33は、TSのビット
レートを満たすために多重化するヌルパケット(情報と
しては意味を為さないパケット)を生成してスイッチ3
6に出力する。
The null packet generation unit 33 generates a null packet (a packet having no meaning as information) to be multiplexed to satisfy the TS bit rate, and
6 is output.

【0012】多重バッファ34−1乃至34−nは、入
力処理部31から入力されるPESを一時的に記憶するFIF
O形式のバッファであり、記憶したPESを多重化制御部3
7からの制御に従ってスイッチ36に出力する。
The multiplexing buffers 34-1 to 34-n are used to temporarily store the PES input from the input processing unit 31.
An O-format buffer that stores the stored PES in the multiplexing control unit 3.
7 is output to the switch 36 in accordance with the control from.

【0013】TPヘッダ生成部35は、多重バッファ3
4−1乃至34−nからPESが読み出される際、それら
の先頭に付与するTPヘッダを生成してスイッチ36に
出力する。
The TP header generation unit 35 includes a multiplex buffer 3
When PESs are read from 4-1 to 34-n, a TP header to be added to the head of the PES is generated and output to the switch 36.

【0014】スイッチ36は、多重制御部37による制
御に対応し、制御データ生成部32からの制御データ、
ヌルパケット生成部33からのヌルパケット、多重バッ
ファ34−1乃至34−nからのPES、またはTPヘッ
ダ生成部35からのTPヘッダを、切り替えて出力制御
部38に出力する。
The switch 36 corresponds to the control by the multiplex control unit 37, and controls the control data from the control data generation unit 32,
The null packet from the null packet generator 33, the PES from the multiplex buffers 34-1 to 34-n, or the TP header from the TP header generator 35 are switched and output to the output controller 38.

【0015】多重化制御部37は、PES、制御データ、
またはヌルパケットを一定のデータ長に分割し、それぞ
れにTPヘッダが付加されるようにスイッチ36を切り
替える。制御方法については後述する。
The multiplexing control unit 37 includes a PES, control data,
Alternatively, the switch 36 is switched so that the null packet is divided into a certain data length, and a TP header is added to each. The control method will be described later.

【0016】出力制御部38は、スイッチ36から入力
される、制御データ、ヌルパケットまたはPESパケット
が格納されているTSパケットをTSとして後段の誤り
訂正部13に出力する。
The output control unit 38 outputs a TS packet containing control data, a null packet or a PES packet, which is input from the switch 36, to the subsequent error correction unit 13 as a TS.

【0017】ここで、出力制御部38から出力されるT
Sについて説明する。TSは、MPEG2システムズにおい
て規定された制約を守ることが必須である。MPEG2シス
テムズの規定には、データ遅延に関する制約がある。具
体的には、図5に示すような仮想デコーダモデル(以
下、T-STD(Transport Stream System Target Decorder)
と記述する)が定義されており、送信側はT-STDにおけ
る全てのバッファが破綻無く動作するように、符号化デ
ータ、同期管理情報、および制御データを送らなくては
ならないと規定されている。
Here, T output from the output control unit 38
S will be described. It is indispensable for the TS to observe the restrictions specified in MPEG2 Systems. The rules of MPEG2 Systems have restrictions on data delay. Specifically, a virtual decoder model as shown in FIG. 5 (hereinafter, T-STD (Transport Stream System Target Decorder))
Is defined, and it is stipulated that the transmitting side must send encoded data, synchronization management information, and control data so that all buffers in T-STD operate without failure. .

【0018】TSに配置されるPCRには、PCRの最後のバ
イトがT-STDの入力段への到着予定時刻が記述されると
規定されており、PCRをデコードすることにより、TS
の全てのビットのT-STDの入力段への到着時刻がわかる
ようになされている。
The PCR arranged in the TS specifies that the last byte of the PCR describes the estimated time of arrival at the input stage of the T-STD.
The arrival time of all the bits of the T-STD at the input stage can be known.

【0019】入力されたTSはプログラムを再生するた
めに、映像データ用の系、音声データ用の系、またはシ
ステム制御データ用の系に多重分離されることを想定し
ている。
It is assumed that the input TS is demultiplexed into a system for video data, a system for audio data, or a system for system control data in order to reproduce a program.

【0020】図5に示すように、T-STDの映像データ用
の系は、トランポートバッファ(TB1)41−1、多
重バッファ(MB1)42、エレメンタリバッファ(E
1)43、ビデオデコーダ(D1)44、および、再配
列バッファ(O1)45から成る。音声データ用の系
は、トランポートバッファ(TBn)41−2、メイン
バッファ(Bn)46−1、および、オーディオデコー
ダ(Dn)47から成る。制御データ用の系は、トラン
ポートバッファ(TBsys)41−3、メインバッファ
(Bsys)46−2、および、システムデコーダ
(Dsys)48から成る。
As shown in FIG. 5, a system for T-STD video data includes a transport buffer (TB 1 ) 41-1, a multiplex buffer (MB 1 ) 42, and an elementary buffer (E).
B 1 ) 43, a video decoder (D 1 ) 44, and a rearrangement buffer (O 1 ) 45. System for audio data, Trang port buffer (TB n) 41-2, a main buffer (B n) 46-1, and consists of an audio decoder (D n) 47. The control data system includes a transport buffer (TB sys ) 41-3, a main buffer (B sys ) 46-2, and a system decoder (D sys ) 48.

【0021】各系のトランスポートバッファ41−1乃
至41−3は、多重分離直後のバースト的で高速なデー
タストリームをバッファリングする。トランスポートバ
ッファ41−1乃至41−3はまた、固定の記憶容量
(例えば512バイト)を有しており、TSパケット2
個余りを記憶することができる。トランスポートバッフ
ァ41−1乃至41−3にデータバイトが存在しない場
合、データバイトの転送は行われない。ビットストリー
ムの構成にあたっては、このトランスポートバッファが
オーバフローを起こさないようにしなければならないと
規定されている。
The transport buffers 41-1 to 41-3 of each system buffer a bursty, high-speed data stream immediately after demultiplexing. Each of the transport buffers 41-1 to 41-3 has a fixed storage capacity (for example, 512 bytes).
The remainder can be stored. When no data byte exists in the transport buffers 41-1 to 41-3, the transfer of the data byte is not performed. It is stipulated that the transport buffer must not cause an overflow in the configuration of the bit stream.

【0022】また、MPEG2システムズでは、正常なデコ
ードができなくなることを防ぐために、符号化単位(以
下、AU(Access Unit)と記述する)のDTSが示すデコー
ド時刻までに、当該AUをデコードをするために必要な
データの全てが、エレメンタリバッファ43に到着する
ようにデータ出力を完了せねばならないと規定されてい
る。以下、この規定をDTSの制約と記述することにす
る。さらに、AUがDTSで示されるデコード時刻に対し
て、どの程度の余裕時間を有して多重化されているかを
表すパラメータをDTSマージンと名付けて以下において
用いることにする。
In the MPEG2 Systems, in order to prevent normal decoding from being performed, the AU is decoded by a decoding time indicated by a DTS of a coding unit (hereinafter referred to as an AU (Access Unit)). Therefore, it is specified that the data output must be completed so that all of the data necessary for the data arrive at the elementary buffer 43. Hereinafter, this rule will be described as a restriction of DTS. Further, a parameter indicating how much time the AU has been multiplexed with respect to the decoding time indicated by the DTS is referred to as a DTS margin and is used below.

【0023】DTSマージンは換言すれば、AUの多重完
了時刻からデコード時刻までの時間の経過を表すもので
ある。図6は、複数のAUから成るストリームを多重化
した際の順次出力されるAUのDTSマージンAU[n],A
U[n+1]、・・・の推移の一例を示している。同図にお
いて、DTSマージンAU[n+7]だけは負の値であり、DTS
の制約が守られていなことを示している。
In other words, the DTS margin indicates the lapse of time from the AU multiplexing completion time to the decoding time. FIG. 6 shows DTS margins AU [n], A of AUs sequentially output when a stream composed of a plurality of AUs is multiplexed.
An example of the transition of U [n + 1],... In the figure, only the DTS margin AU [n + 7] is a negative value,
This indicates that the constraint of has not been observed.

【0024】なお、複数のデータストリーム(PES等)
を多重化してTSを生成するのではなく、単一のデータ
ストリームをTS化する場合は、データの内容によって
ダイナミックに変動するようなデータ遅延はほとんど生
じない。そのような条件(多重によるデータ遅延が0で
ある状態)で得られるDTSマージンをオリジナルDTSマー
ジンと名付けて以下において用いることにする。
Note that a plurality of data streams (PES, etc.)
When a single data stream is converted to a TS instead of generating a TS by multiplexing the data, there is almost no data delay that dynamically varies depending on the content of the data. The DTS margin obtained under such a condition (a state in which the data delay due to multiplexing is 0) is referred to as an original DTS margin hereinafter.

【0025】図4に戻り、多重化装置12の多重化制御
部37は、制御データ、ヌルパケット、複数のPESスト
リームのいずれを後段の出力するか(多重化するか)を
制御するが、制御データはプログラム再生にとって非常
に重要なデータであるので、PESストリームよりも優先
的に多重化するように制御する。したがって、多重化す
べき制御データがないタイミングにおいて、複数のPES
およびヌルパケットのうちの1つが選択される。
Returning to FIG. 4, the multiplexing control unit 37 of the multiplexing device 12 controls which of the control data, the null packet, and the plurality of PES streams is output (multiplexed) at the subsequent stage. Since data is very important data for program reproduction, control is performed such that data is multiplexed with priority over the PES stream. Therefore, when there is no control data to be multiplexed, multiple PESs
And one of a null packet is selected.

【0026】複数のPESから1つのPESを選択する方法は
種々考えられるが、ここでは、予め各PESに多重化する
優先順位を設定して、優先順位が高いPESから順番に選
択する方法(以下、ストリーム優先多重法または従来法
と記述する)について考察する。
There are various methods of selecting one PES from a plurality of PESs. Here, a method of setting priorities to be multiplexed to each PES in advance and selecting the PESs in descending order of priority (hereinafter, referred to as PES) is described. , Stream prioritized multiplexing or conventional).

【0027】入力するPESのチャンネル数がnであっ
て、チャンネル1,2、・・・nのPESの優先順位を1
番目、2番目、・・・n番目とした場合を想定する。こ
の場合、始めに、チャンネル1に対応する多重バッファ
54−1のデータ蓄積量が測定され、データが1パケッ
ト以上蓄積されていると判定された場合、チャンネル1
が選択され、多重バッファ54−1にデータが蓄積され
ていないと判定された場合、チャンネル2に対応する多
重バッファ54−2のデータ蓄積量が測定される。以下
同様に、多重化するチャンネルが選択されるまで、順
次、多重バッファ54−3乃至54−nのデータ蓄積量
が測定される。そして、最も優先順位が低く設定されて
いるチャンネルnに対応する多重バッファ54−nにデ
ータが蓄積されていないと判定された場合、ヌルパケッ
トが選択される。
The number of input PES channels is n, and the priority order of the PES of channels 1, 2,.
, 2nd,..., Nth. In this case, first, the data storage amount of the multiplex buffer 54-1 corresponding to the channel 1 is measured, and when it is determined that one or more packets are stored, the channel 1
Is selected, and it is determined that no data is stored in the multiplex buffer 54-1, the data storage amount of the multiplex buffer 54-2 corresponding to the channel 2 is measured. Similarly, the data storage amounts of the multiplexing buffers 54-3 to 54-n are sequentially measured until a channel to be multiplexed is selected. If it is determined that no data is stored in the multiplexing buffer 54-n corresponding to the channel n with the lowest priority, a null packet is selected.

【0028】当該ストリーム優先多重法によれば、生成
されるTSの出力ビットレートが、優先順位が1番目で
あるチャンネル1のPESのビットレートよりも大きけれ
ば、チャンネル1のPESは遅延なく多重化される。優先
順位が2番目であるチャンネル2のPESについては、T
Sの出力ビットレートからチャンネル1のPESのビット
レートを減算した値が、チャンネル2のPESのビットレ
ートよりも大きければ、少ない遅延量で多重化が可能で
ある。このとき、チャンネル1のPESは遅延なく多重化
されている。
According to the stream priority multiplexing method, if the output bit rate of the generated TS is higher than the bit rate of the PES of channel 1 having the first priority, the PES of channel 1 is multiplexed without delay. Is done. For the PES of channel 2 with the second priority, T
If the value obtained by subtracting the bit rate of the PES of channel 1 from the output bit rate of S is larger than the bit rate of the PES of channel 2, multiplexing can be performed with a small amount of delay. At this time, the PES of channel 1 is multiplexed without delay.

【0029】同様にして、優先順位がk番目であるチャ
ンネルkについては、TSの出力ビットレートからチャ
ンネル1乃至k−1の各PESのビットレートを減算した
値が、チャンネルkのPESのビットレートよりも大きけ
れば、チャンネルk−1のPESよりも遅延量は増加する
が多重化は可能である。
Similarly, for the channel k having the k-th priority, the value obtained by subtracting the bit rate of each PES of the channels 1 to k-1 from the output bit rate of the TS is the bit rate of the PES of the channel k. If it is larger than the PES of the channel k-1, the multiplexing is possible although the delay amount is increased.

【0030】したがって、チャンネル1乃至nに対応す
るn本のPESの入力ビットレートの合計が、生成される
TSの出力人レートよりも小さい場合、全チャンネルの
PESを多重化することが可能である。ただし、PESの遅延
時間は優先順位が下がるほど大きくなる。また、この場
合、各PESのオリジナルDTSマージンが比較的大きけれ
ば、優先順位が低いチャンネルで遅延が発生しても、DT
Sマージンの制約を守ることが可能である。
Therefore, if the sum of the input bit rates of the n PESs corresponding to channels 1 to n is smaller than the output human rate of the TS to be generated,
It is possible to multiplex PES. However, the delay time of the PES increases as the priority decreases. Also, in this case, if the original DTS margin of each PES is relatively large, even if a delay occurs in a channel of lower priority, the DT
It is possible to keep the S margin constraint.

【0031】しかしながら、チャンネル1乃至nに対応
するn本のPESの入力ビットレートの合計が、生成され
るTSの出力ビットレートよりも大きい場合(以下、輻
輳状態と記述する)、全てのPESを廃棄することなく多
重化して出力しようとすると、優先順位が低いチャンネ
ルのPESは同期破綻が生じ易くなる。
However, if the sum of the input bit rates of the n PESs corresponding to channels 1 to n is greater than the output bit rate of the generated TS (hereinafter referred to as a congestion state), all PESs are If an attempt is made to multiplex and output without discarding, the PES of a channel with a lower priority is likely to cause synchronization failure.

【0032】[0032]

【発明が解決しようとする課題】上述したストリーム優
先多重法により、予め優先順位が設定されている複数の
PESを多重化する場合、当該複数のPESが輻輳状態である
ときや、当該複数のPESのオリジナルDTSマージンが小さ
いときには、優先順位が低いチャンネルのPESに同期破
綻やデータ廃棄が発生し易くなってしまう課題があっ
た。
According to the above-described stream priority multiplexing method, a plurality of streams whose priorities are set in advance are determined.
When multiplexing PES, when the plurality of PESs are in a congested state or when the original DTS margin of the plurality of PESs is small, synchronization failure or data discard is likely to occur in the PES of a channel with a lower priority. There was a problem.

【0033】例えば、各PESの入力ビットレートの平均
値の合計は、生成されるTSの出力ビットレートに等し
いが、優先順位が高いチャンネルのPESの入力ビットレ
ートが瞬時的に大きくなったために、各PESの入力ビッ
トレートの合計がTSの出力ビットレートを超過する状
況を想定する。この状況においては、優先順位が低いチ
ャンネルのPESの遅延時間は著しく増大し、かつ、DTSマ
ージンは著しく低下する。場合によっては、優先順位が
低いチャンネルのPESはデコード時刻までに出力されな
くなり、廃棄されるか、あるいは同期破綻が発生する。
For example, the sum of the average values of the input bit rates of each PES is equal to the output bit rate of the TS to be generated, but the input bit rate of the PES of the channel having a higher priority instantaneously increases. Assume a situation where the sum of the input bit rates of each PES exceeds the output bit rate of the TS. In this situation, the PES delay of the lower priority channel increases significantly, and the DTS margin decreases significantly. In some cases, the PES of a channel with a lower priority is not output by the decoding time, and is discarded or a synchronization failure occurs.

【0034】また例えば、入力されるPESが追加され
て、定常的に輻輳状態になった状況を想定すると、優先
順位が低いチャンネルのPESは、同期破綻の頻度が著し
く増大したり、廃棄されるデータ量が多くなる。
Further, for example, assuming a situation in which the input PES is added and the congestion state is steadily increased, the PES of a channel with a low priority has a significantly increased frequency of synchronization failure or is discarded. The data volume increases.

【0035】本発明はこのような状況に鑑みてなされた
ものであり、予め優先順位が設定されている複数のPES
を多重化する際、優先順位とデコード時刻までの残り時
間とを配慮して多重化するチャンネルを選択することに
より、輻輳状態において優先順位が低いチャンネルのPE
SのDTS制約違反を回避し、かつ、データ廃棄量を抑制で
きるようにするものである。
The present invention has been made in view of such a situation, and a plurality of PESs in which priorities are set in advance are set.
When multiplexing, the channel to be multiplexed is selected in consideration of the priority order and the remaining time until the decoding time, so that the
This is to avoid violation of the DTS constraint of S and to suppress the amount of data discard.

【0036】[0036]

【課題を解決するための手段】本発明の多重化装置は、
各データストリームに設定されている優先順位を示す優
先度情報を入力する入力手段と、各データストリームに
対応する復号時刻情報を取得する取得手段と、各データ
ストリームから基準時刻情報を抽出する抽出手段と、各
データストリームを一時的に保持する保持手段と、復号
時刻情報および基準時刻情報に基づいて、保持手段が保
持するデータストリームの現時刻における復号時刻まで
の残り時間を演算する演算手段と、優先度情報および残
り時間に基づいて複数のデータストリームの中から1本
のデータストリームを選択する選択手段と、選択手段が
選択したデータストリームを保持手段から読み出して多
重化する読み出し手段とを含むことを特徴とする。
SUMMARY OF THE INVENTION A multiplexer according to the present invention comprises:
Input means for inputting priority information indicating the priority set for each data stream, obtaining means for obtaining decoding time information corresponding to each data stream, and extracting means for extracting reference time information from each data stream Holding means for temporarily holding each data stream, and calculating means for calculating the remaining time until the decoding time at the current time of the data stream held by the holding means, based on the decoding time information and the reference time information, Selecting means for selecting one data stream from the plurality of data streams based on the priority information and the remaining time; and reading means for reading and multiplexing the data stream selected by the selecting means from the holding means. It is characterized by.

【0037】前記選択手段は、残り時間から優先度情報
が示す値を減算した値が最小であるデータストリームを
優先的に選択するようにすることができる。
[0037] The selecting means may preferentially select a data stream having a minimum value obtained by subtracting the value indicated by the priority information from the remaining time.

【0038】本発明の多重化装置は、保持手段が保持し
ている各データストリームの保持量を計測する計測手段
をさらに含むことができ、前記選択手段は、優先度情
報、残り時間、および保持量をパラメータとして多重優
先関数により求められる値に基づいてデータストリーム
を選択するようにすることができる。
[0038] The multiplexing apparatus of the present invention may further include a measuring means for measuring the holding amount of each data stream held by the holding means, wherein the selecting means includes the priority information, the remaining time, and the holding time. The data stream can be selected based on the value determined by the multiple priority function with the quantity as a parameter.

【0039】本発明の多重化装置は、トランスポートス
トリームを複数のパケッタイズドエレメンタリストリー
ムに分離する分離手段をさらに含むことができる。
[0039] The multiplexing device of the present invention can further include a separating means for separating the transport stream into a plurality of packetized elementary streams.

【0040】本発明の多重化方法は、各データストリー
ムに設定されている優先順位を示す優先度情報を入力す
る入力ステップと、各データストリームに対応する復号
時刻情報を取得する取得ステップと、各データストリー
ムから基準時刻情報を抽出する抽出ステップと、各デー
タストリームを一時的に保持する保持ステップと、復号
時刻情報および基準時刻情報に基づいて、保持ステップ
の処理で保持されたデータストリームの現時刻における
復号時刻までの残り時間を演算する演算ステップと、優
先度情報および残り時間に基づいて複数のデータストリ
ームの中から1本のデータストリームを選択する選択ス
テップと、選択ステップの処理で選択されたデータスト
リームを保持ステップの処理に用いたバッファから読み
出して多重化する読み出しステップとを含むことを特徴
とする。
The multiplexing method of the present invention includes an input step of inputting priority information indicating a priority set for each data stream; an obtaining step of obtaining decoding time information corresponding to each data stream; An extraction step of extracting reference time information from the data stream; a holding step of temporarily holding each data stream; and a current time of the data stream held in the processing of the holding step based on the decoding time information and the reference time information. , A calculation step of calculating the remaining time until the decoding time, a selection step of selecting one data stream from a plurality of data streams based on the priority information and the remaining time, and a selection step. Read and multiplex the data stream from the buffer used for the holding step Characterized in that it comprises a look out step.

【0041】本発明の記録媒体のプログラムは、各デー
タストリームに設定されている優先順位を示す優先度情
報を入力する入力ステップと、各データストリームに対
応する復号時刻情報を取得する取得ステップと、各デー
タストリームから基準時刻情報を抽出する抽出ステップ
と、各データストリームを一時的に保持する保持ステッ
プと、復号時刻情報および基準時刻情報に基づいて、保
持ステップの処理で保持されたデータストリームの現時
刻における復号時刻までの残り時間を演算する演算ステ
ップと、優先度情報および残り時間に基づいて複数のデ
ータストリームの中から1本のデータストリームを選択
する選択ステップと、選択ステップの処理で選択された
データストリームを保持ステップの処理に用いたバッフ
ァから読み出して多重化する読み出しステップとを含む
ことを特徴とする。
According to the recording medium program of the present invention, an input step of inputting priority information indicating a priority set for each data stream; an obtaining step of obtaining decoding time information corresponding to each data stream; An extracting step of extracting reference time information from each data stream; a holding step of temporarily holding each data stream; and a current step of holding the data stream held in the processing of the holding step based on the decoding time information and the reference time information. A calculation step of calculating the remaining time until the decoding time at the time, a selection step of selecting one data stream from the plurality of data streams based on the priority information and the remaining time, and a selection step. Read the data stream from the buffer used for the holding step Characterized in that it comprises a reading step of duplicating.

【0042】本発明の多重化装置、多重化方法、および
記録媒体のプログラムにおいては、各データストリーム
に設定されている優先順位を示す優先度情報が入力さ
れ、各データストリームに対応する復号時刻情報が取得
され、各データストリームから基準時刻情報が抽出され
て、各データストリームが一時的に保持される。さら
に、復号時刻情報および基準時刻情報に基づいて、保持
されたデータストリームの現時刻における復号時刻まで
の残り時間が演算され、優先度情報および残り時間に基
づいて複数のデータストリームの中から1本のデータス
トリームが選択されて、選択されたデータストリームが
読み出されて多重化される。
In the multiplexing apparatus, multiplexing method, and recording medium program of the present invention, priority information indicating the priority set for each data stream is input, and decoding time information corresponding to each data stream is input. Is obtained, reference time information is extracted from each data stream, and each data stream is temporarily held. Further, the remaining time until the decoding time at the current time of the held data stream is calculated based on the decoding time information and the reference time information, and one of the plurality of data streams is calculated based on the priority information and the remaining time. Are selected, and the selected data stream is read and multiplexed.

【0043】[0043]

【発明の実施の形態】本発明を適用した多重化装置50
の構成例について、図7を参照して説明する。この多重
化装置50は、図1の多重化装置12に代えて送信装置
1を構成するものである。多重化装置50には、n本の
PESと、各PESに対応する優先度情報(多重化する際の優
先順位を示す値であり、当該値が大きいものほど優先順
位が高い)が入力される。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A multiplexer 50 according to the present invention.
Will be described with reference to FIG. This multiplexing device 50 constitutes the transmitting device 1 instead of the multiplexing device 12 of FIG. The multiplexing device 50 has n
PES and priority information corresponding to each PES (a value indicating the priority in multiplexing, the higher the value, the higher the priority) are input.

【0044】多重化装置50の入力処理部51は、入力
されるn本のPESを対応する多重バッファ54−1乃至
54−nに書き込むとともに、各PESを構成するPESパケ
ットのPESヘッダ等に記述されている属性データを抽出
する。入力処理部51はまた、抽出した属性データのう
ち、ESCRについては、そのESCRのデコード値および捕捉
したタイミングを用いてストリームの基準時間を再生
し、得られた基準時刻を制御データ生成部52および多
重化制御部57に供給する。抽出した他の属性データ
(Stream ID等)も多重化制御部57および制御データ
生成部52に供給する。
The input processing unit 51 of the multiplexer 50 writes the inputted n PESs into the corresponding multiplexing buffers 54-1 to 54-n, and describes the PESs in the PES headers of the PES packets constituting each PES. Extract attribute data that has been set. The input processing unit 51 also reproduces the reference time of the stream using the decoded value of the ESCR and the captured timing for the ESCR among the extracted attribute data, and outputs the obtained reference time to the control data generation unit 52 and It is supplied to the multiplexing control unit 57. The other extracted attribute data (Stream ID or the like) is also supplied to the multiplexing control unit 57 and the control data generation unit 52.

【0045】制御データ生成部52は、入力処理部51
から供給される基準時刻情報や属性データを用い、プロ
グラムを受信側で再生するために必要な制御データを生
成してスイッチ56に出力する。生成される制御データ
には、PSI、SI、およびPCRが含まれる。
The control data generation unit 52 includes an input processing unit 51
Using the reference time information and attribute data supplied from, the control data necessary for reproducing the program on the receiving side is generated and output to the switch 56. The generated control data includes PSI, SI, and PCR.

【0046】ヌルパケット生成部53は、TSのビット
レートを満たすために多重化するヌルパケットを生成し
てスイッチ56に出力する。
The null packet generator 53 generates a null packet to be multiplexed to satisfy the bit rate of the TS, and outputs it to the switch 56.

【0047】多重バッファ54−1乃至54−nは、入
力処理部51から入力されるPESを一時的に記憶するFIF
O形式のバッファであり、記憶したPESを多重化制御部5
7からの制御に従ってスイッチ56に出力する。
The multiplexing buffers 54-1 to 54-n are provided in the FIF for temporarily storing the PES input from the input processing unit 51.
O-type buffer that stores the stored PES in the multiplexing control unit 5
7 is output to the switch 56 in accordance with the control from.

【0048】TPヘッダ生成部55は、多重バッファ5
4−1乃至54−nからPESが読み出される際、それら
の先頭に付与するTPヘッダを生成してスイッチ56に
出力する。
The TP header generation unit 55
When PESs are read from 4-1 to 54-n, a TP header to be added to the head of the PES is generated and output to the switch 56.

【0049】スイッチ56は、多重制御部57による制
御に対応し、制御データ生成部52からの制御データ、
ヌルパケット生成部53からのヌルパケット、多重バッ
ファ54−1乃至54−nからのPES、またはTPヘッ
ダ生成部55からのTPヘッダを切り替えることにより
TSパケットを生成し、後段に多重化制御部57および
出力制御部58に出力する。
The switch 56 corresponds to the control by the multiplex control unit 57, and controls the control data from the control data generation unit 52,
A TS packet is generated by switching the null packet from the null packet generation unit 53, the PES from the multiplex buffers 54-1 to 54-n, or the TP header from the TP header generation unit 55, and a multiplex control unit 57 in the subsequent stage. And output to the output control unit 58.

【0050】多重化制御部57は、優先度情報等に基づ
いて、PES、制御データ、またはヌルパケットを一定の
データ長に分割し、それぞれにTPヘッダを付加するよ
うにスイッチ56を制御する。多重化制御部57はま
た、ドライブ100を制御して、磁気ディスク101、
光ディスク102、光磁気ディスク103、または半導
体メモリ104に記憶されている制御用プログラムを読
み出し、読み出した制御用プログラムに基づいて、多重
化装置50の各部を制御する。
The multiplexing control unit 57 controls the switch 56 so as to divide the PES, control data, or null packet into fixed data lengths based on the priority information and the like, and to add a TP header to each of them. The multiplexing control unit 57 also controls the drive 100 so that the magnetic disk 101,
The control program stored in the optical disk 102, the magneto-optical disk 103, or the semiconductor memory 104 is read, and each unit of the multiplexer 50 is controlled based on the read control program.

【0051】出力制御部58は、スイッチ56から入力
される、制御データ、ヌルパケット、またはPESパケッ
トが格納されているTSパケットをTSとして後段に出
力する。
The output control unit 58 outputs a TS packet containing control data, a null packet, or a PES packet, which is input from the switch 56, as a TS to a subsequent stage.

【0052】図8は、多重化制御部57の詳細な構成例
を示している。多重化制御部57は、バッファ出力およ
びスイッチ制御部61、多重チャンネル(CH)選択部6
2、および仮想デコーダバッファ検証部63から構成さ
れる。
FIG. 8 shows a detailed configuration example of the multiplexing control unit 57. The multiplexing control unit 57 includes a buffer output and switch control unit 61, a multiplex channel (CH) selection unit 6
2 and a virtual decoder buffer verification unit 63.

【0053】バッファ出力およびスイッチ制御部61
は、多重バッファ読み出しアドレスを多重チャンネル選
択部62に出力し、それに対応して返される多重チャン
ネル情報を受信して、多重チャンネル情報(制御デー
タ、ヌルパケット、n本のPESのうちのいずれを選択す
る情報)に対応して制御データ生成部52、ヌルパケッ
ト生成部53、および多重バッファ54−1乃至54−
nのうちのいずれかにデータ読み出し制御信号を出力
し、スイッチ制御信号をスイッチ56に出力する。な
お、PESを多重化する場合、多重チャンネル情報には、P
ESのペイロード長のデータが含まれる。この場合、バッ
ファ出力およびスイッチ制御部61は、TPヘッダ生成
部55に、PIDおよびPESペイロード長から算出するスタ
ッフィングバイト長等のTPヘッダ情報を出力する。
Buffer output and switch control unit 61
Outputs the multiplexed buffer read address to the multiplexed channel selector 62, receives the multiplexed channel information returned corresponding to the multiplexed buffer read address, and selects any of the multiplexed channel information (control data, null packet, and n PESs). The control data generator 52, the null packet generator 53, and the multiplex buffers 54-1 to 54-
A data read control signal is output to any one of n, and a switch control signal is output to the switch 56. When multiplexing PES, the multiplex channel information includes P
It contains data of the ES payload length. In this case, the buffer output and switch control unit 61 outputs TP header information such as a stuffing byte length calculated from the PID and the PES payload length to the TP header generation unit 55.

【0054】多重チャンネル選択部62は、制御データ
生成部52から入力される制御データ多重要求信号、多
重バッファ54−1乃至54−nからの多重バッファの
書き込みアドレスとバッファ出力およびスイッチ制御部
61からの読み出しアドレスから演算される多重バッフ
ァ占有量、スイッチ56からの出力データ(TSパケッ
ト)を解析して得られるAUの区切り、TPペイロード
長、およびAUデータ長、入力処理部51からの基準時
刻データおよびデコード時刻データを用いて演算される
多重バッファ54−1乃至54−nにそれぞれ記憶され
ている先頭の各AUのデコード時刻までの残り時間left
time、予め入力される各チャンネルの優先度情報、並び
に、仮想デコーダバッファ検証部63から入力される多
重禁止フラグに基づいて、多重化するチャンネルを選択
し、多重チャンネル情報としてバッファ出力および制御
部61に出力する。多重チャンネル選択部62はまた、
スイッチ56からの出力データ(TSパケット)を解析
して得られるTPペイロード長およびAUデータ長を仮
想デコーダバッファ検証部63に出力する。
The multiplex channel selection section 62 receives the control data multiplex request signal input from the control data generation section 52, the multiplex buffer write address and buffer output from the multiplex buffers 54-1 to 54-n, and the switch control section 61. Buffer occupancy calculated from the read address of, AU delimiter, TP payload length, and AU data length obtained by analyzing output data (TS packet) from switch 56, reference time data from input processing unit 51 And the remaining time left until the decode time of each of the first AUs stored in the multiplex buffers 54-1 to 54-n calculated using the decode time data.
The channel to be multiplexed is selected based on the time, the priority information of each channel input in advance, and the multiplexing inhibition flag input from the virtual decoder buffer verification unit 63, and the buffer output and control unit 61 as multiplexed channel information. Output to The multi-channel selection unit 62 also
The TP payload length and the AU data length obtained by analyzing the output data (TS packet) from the switch 56 are output to the virtual decoder buffer verification unit 63.

【0055】仮想デコーダバッファ検証部63は、多重
チャンネル選択部62からの、多重バッファ54−1乃
至54−nから出力されるTPについてのTPペイロー
ド長およびAUデータ長を用いて、各PES用のトランス
ポートバッファ(図5に示したT-STDのトランスポート
バッファ41−1等)および多重化バッファ(図5の多
重化バッファ42等)の動作をシミュレートし、当該ト
ランスポートバッファ(以下、TBと記述する)または
当該多重化バッファ(以下、MBと記述する)が破綻し
そうになったとき、当該チャンネルに対応する多重禁止
フラグを立てて多重チャンネル選択部62に出力する。
The virtual decoder buffer verification unit 63 uses the TP payload length and the AU data length of the TP output from the multiplex buffers 54-1 to 54-n from the multiplex channel selection unit 62, and The operation of the transport buffer (such as the transport buffer 41-1 of the T-STD shown in FIG. 5) and the multiplexing buffer (such as the multiplexing buffer 42 of FIG. 5) are simulated, and the transport buffer (hereinafter, TB) is When the multiplexing buffer (hereinafter referred to as MB) is about to fail, a multiplexing prohibition flag corresponding to the channel is set and output to the multiplexing channel selector 62.

【0056】すなわち、TBおよびMBのそれぞれにバ
ッファサイズに近い所定の閾値を設定し、TBまたはM
Bの蓄積量が閾値を越えたらバッファオーバフローが切
迫していると判断し、多重禁止フラグを立てて多重チャ
ンネル選択部62に出力する。
That is, a predetermined threshold value close to the buffer size is set for each of TB and MB, and TB or M
When the accumulated amount of B exceeds the threshold value, it is determined that the buffer overflow is imminent, and a multiplexing inhibition flag is set and output to the multiplex channel selection unit 62.

【0057】なお、TBおよびMBに関しては、1秒以
上連続してデータを保持することを禁止するとMPEG2シ
ステムズにおいて規定されている。そこで、仮想デコー
ダバッファ検証部63は、シミュレートする各バッファ
毎にタイマを設け、バッファが空になる度にタイマをリ
セットし、タイマ値がバッファのリークレートによって
決まる所定の閾値を越えた場合、データ連続保持時間が
1秒に切迫していると判断し、このときにも当該チャン
ネルに対応する多重禁止フラグを立てて多重チャンネル
選択部62に出力する。
It should be noted that MPEG2 Systems stipulates that it is prohibited to hold data continuously for one second or longer for TB and MB. Therefore, the virtual decoder buffer verification unit 63 provides a timer for each buffer to be simulated, resets the timer each time the buffer becomes empty, and when the timer value exceeds a predetermined threshold determined by the leak rate of the buffer, It is determined that the data continuous holding time is imminent to one second, and also at this time, the multiplex prohibition flag corresponding to the channel is set and output to the multiplex channel selection unit 62.

【0058】次に、多重チャンネル選択部62の動作に
ついて、図9のフローチャートを参照して説明する。多
重化するデータは、映像音声等のデータと、PSIおよびP
CR等の制御データに大別できるが、制御データは、プロ
グラムを再生する際に必要なデータであるので、映像音
声等のデータよりも優先的に多重化するように制御す
る。したがって、制御データを多重化しないタイミング
において、映像音声等のデータに相当するPESのいずれ
か、またはヌルパケットを多重化するように制御する。
Next, the operation of the multiplex channel selector 62 will be described with reference to the flowchart of FIG. Data to be multiplexed includes data such as video and audio, PSI and P
Although control data such as CR can be roughly classified, since control data is data necessary for reproducing a program, control is performed so as to be multiplexed with priority over data such as video and audio. Therefore, at the timing when control data is not multiplexed, control is performed so as to multiplex any of the PESs corresponding to data such as video and audio or null packets.

【0059】具体的には、ステップS1において、多重
チャンネル選択部62は、仮想デコーダバッファ検証部
63においてT-STDのTBおよびMBが正常にシミュレ
ートされているかを検証する。ステップS2において、
多重チャンネル選択部62は、仮想デコーダ検証部63
から入力される各チャンネルに対応する多重禁止フラグ
のうち、立てられていない多重禁止フラグが存在するか
否かを判定する。立てられていない多重禁止フラグが存
在すると判定された場合、ステップS3に進む。
More specifically, in step S 1, the multiplex channel selection unit 62 verifies whether the virtual decoder buffer verification unit 63 simulates the TB and MB of the T-STD normally. In step S2,
The multi-channel selection unit 62 includes a virtual decoder verification unit 63
Of the multiplex prohibition flags corresponding to the respective channels input from, whether or not there is a multiplex prohibition flag that is not set. If it is determined that there is a multiple prohibition flag that has not been set, the process proceeds to step S3.

【0060】ステップS3において、多重チャンネル選
択部62は、各チャンネル毎、各チャンネルの多重バッ
ファ54−1乃至54−nにそれぞれ記憶されている先
頭のAUのデコード時刻までの残り時間lefttimeと、各
チャンネルの優先度情報P(k)をパラメータとする次式の
ような多重優先関数f1(lefttime,P(k))を演算して、多
重優先関数f1(lefttime,P(k))が最小であるチャンネル
を多重化チャンネルに選択する。 多重優先関数f1(lefttime,P(k))=lefttime−P(k)
In step S3, the multiplex channel selection unit 62 determines, for each channel, the remaining time lefttime until the decoding time of the first AU stored in the multiplex buffers 54-1 to 54-n of each channel, and A multi-priority function f1 (lefttime, P (k)) is calculated using the channel priority information P (k) as a parameter, and the multi-priority function f1 (lefttime, P (k)) is minimized. Select a channel as a multiplex channel. Multiple priority function f1 (lefttime, P (k)) = lefttime-P (k)

【0061】ただし、優先度情報P(k)は、チャンネルk
の優先順位を示し、多重化される優先順位が高いチャン
ネルほど、その値は大きく設定されている。また、残り
時間lefttimeは時間の経過とともに減少する。よって、
多重優先関数f1(lefttime,P(k))は、その値が小さいほ
ど、対応するチャンネルの優先順位が高いと評価する。
However, the priority information P (k) is the channel k
The higher the priority of the multiplexed channel, the larger the value is set. In addition, the remaining time lefttime decreases as time elapses. Therefore,
The multiple priority function f1 (lefttime, P (k)) evaluates that the smaller the value is, the higher the priority of the corresponding channel is.

【0062】ステップS2において、立てられていない
多重禁止フラグが存在しないと判定した場合、多重チャ
ンネル選択部62は、ステップS4において、ヌルパケ
ットを多重チャンネルに選択する。
If it is determined in step S2 that there is no multiplex prohibition flag that has not been set, the multiplex channel selector 62 selects a null packet as a multiplex channel in step S4.

【0063】次に、多重化装置50の動作テストの結果
について、図10乃至図13を参照して説明する。動作
テストには、それぞれ異なる6秒間の映像シーンがMPEG
2方式で符号化された3本のPESを用い、チャンネル1
のPESの優先度を1番目とし、チャンネル2のPESの優先
度を2番目とし、チャンネル3のPESの優先度を3番目
とする。各PESの入力ビットレートは、チャンネル1か
ら順番に平均レートが5.87Mbps、4.75Mbps、
5.87Mbpsとして、いずれも±100%の変動幅をも
つ可変ビットレートとする。ただし、各チャンネル間の
入力ビットレートの変動タイミングは独立しているもの
とする。生成されるTSの出力に割り当てられるビット
レート(以下、出力可能レートと記述する)には、各PE
Sの平均入力ビットレートの加算値と等しい16.49M
bps(テスト1)と、それよりも1Mbpsだけ少ない1
5.49Mbps(テスト2)の2種類の値を用いた。
Next, the result of the operation test of the multiplexer 50 will be described with reference to FIGS. In the operation test, different 6 second video scenes were MPEG
Channel 3 using three PESs encoded in two systems
, The PES of channel 2 has the first priority, the PES of channel 2 has the second priority, and the PES of channel 3 has the third priority. The input bit rate of each PES is 5.87 Mbps, 4.75 Mbps, and the average rate in order from channel 1.
5.87 Mbps, each of which is a variable bit rate having a fluctuation range of ± 100%. However, it is assumed that the input bit rate fluctuation timing between the channels is independent. The bit rate assigned to the output of the generated TS (hereinafter referred to as the output available rate) includes the
16.49M which is equal to the sum of the average input bit rates of S
bps (test 1) and 1 less by 1Mbps
Two values of 5.49 Mbps (test 2) were used.

【0064】図10は、出力可能レートを16.49Mb
psに設定したテスト1における、時間とともに推移する
各チャンネルのPESの入力ビットレートを、出力可能レ
ートで正規化した値をグラフにしたものである。同図か
ら明らかなように、各PESの平均入力ビットレートの加
算値は、瞬時的に出力可能レートを超過している。した
がって、テスト1においては、瞬時的に輻輳状態となる
条件下でテストが行われる。
FIG. 10 shows that the possible output rate is 16.49 Mb.
The graph is a graph obtained by normalizing the input bit rate of the PES of each channel, which changes with time, in the test 1 set to ps with the outputtable rate. As is clear from the figure, the added value of the average input bit rate of each PES instantaneously exceeds the available output rate. Therefore, in the test 1, the test is performed under the condition of instantaneous congestion.

【0065】図11は、出力可能レートを15.49Mb
psに設定したテスト2における、時間とともに推移する
各チャンネルのPESの入力ビットレートを、出力可能レ
ートで正規化した値をグラフにしたものである。同図か
ら明らかなように、各PESの平均入力ビットレートの加
算値は、出力可能レートをほぼ定常的に超過している。
したがって、テスト2においては、ほぼ定常的に輻輳状
態となる条件下でテストが行われる。
FIG. 11 shows that the possible output rate is 15.49 Mb.
The graph is a graph obtained by normalizing the input bit rate of the PES of each channel that changes with time in the test 2 set to ps, with the output possible rate. As is clear from the figure, the added value of the average input bit rate of each PES almost constantly exceeds the available output rate.
Therefore, in the test 2, the test is performed under the condition that the congestion state is almost constant.

【0066】瞬時的あるいは定常的な輻輳状態では、デ
ータが同期破綻を起こさないように、各AUが順に多重
化されているときにデコード時刻に間に合わないと判別
された場合、当該AUのデータについては多重化されず
に多重バッファから廃棄される。
In an instantaneous or steady congestion state, if it is determined that the AUs are not multiplexed in time when the AUs are multiplexed in order so that the data does not break down, the AU data is Are discarded from the multiplex buffer without being multiplexed.

【0067】なお、動作テスト1,2において、上述し
た優先多重関数f1(lefttime,P(k))のパラメータである
残り時間lefttimeについては単位をミリ秒とし、チャン
ネル1の優先度P(1)=4、チャンネル2の優先度P(2)=
2、チャンネル3の優先度P(3)=0とした。
In the operation tests 1 and 2, the unit of the remaining time lefttime which is a parameter of the above-mentioned priority multifunction f1 (lefttime, P (k)) is set to milliseconds, and the priority P (1) of the channel 1 is set. = 4, priority P (2) of channel 2 =
2. The priority P (3) of channel 3 is set to 0.

【0068】図12は、テスト1におけるデータ廃棄量
の時間推移を示している。なお、本実施の形態による結
果(以下、本方法1と記述する)との比較のため、従来
のストリーム優先多重法(以下、従来方法と記述する)
による結果も併記する。
FIG. 12 shows the time transition of the data discard amount in Test 1. For comparison with the result according to the present embodiment (hereinafter, referred to as present method 1), a conventional stream priority multiplexing method (hereinafter, referred to as conventional method) is used.
The results from are also shown.

【0069】同図から明らかなように、テスト1では、
従来方法において、チャンネル3のPESだけにデータ廃
棄が発生した。図12に示したデータ廃棄量の推移と図
10に示した入力ビットレートの推移を照らし合わせる
と、瞬時的な輻輳状態におけるDTS制約違反の耐性につ
いては、明らかに本方法1の方が従来方法よりも優れて
いると判断できる。
As is apparent from FIG.
In the conventional method, data was discarded only in the PES of channel 3. When comparing the transition of the data discard amount shown in FIG. 12 with the transition of the input bit rate shown in FIG. 10, it is clear that the method 1 is more resistant to the DTS constraint violation in the instantaneous congestion state than the conventional method. It can be judged that it is better than

【0070】図13は、テスト2におけるデータ廃棄量
の時間推移を示している。なお、図13にも従来方法に
よる結果を併記する。同図から明らかなように、テスト
2では、本方法1および従来方法において、チャンネル
3のPESだけにデータ廃棄が発生した。図13に示した
データ廃棄量の推移と図11に示した入力ビットレート
の推移を照らし合わせると、定常的な輻輳状態におい
て、データ廃棄量が局所ピーク値をとるタイミングは本
方法1の方が遅れている場合があるが、これは優先度が
高いPESの残り時間lefttimeに比較的大きな余裕がある
とき、優先度が高いPESに対してデータ遅延を許容し、
優先度が低いPESを多重化するように制御しているため
である。
FIG. 13 shows the time transition of the data discard amount in Test 2. FIG. 13 also shows the result of the conventional method. As is clear from FIG. 6, in Test 2, in the method 1 and the conventional method, data was discarded only in the PES of the channel 3. Compared with the transition of the data discard amount shown in FIG. 13 and the transition of the input bit rate shown in FIG. 11, in the steady congestion state, the timing at which the data discard amount takes the local peak value is larger in this method 1. There may be a delay, but this allows a data delay for the high-priority PES when the remaining time lefttime of the high-priority PES has a relatively large margin,
This is because control is performed such that PESs with lower priorities are multiplexed.

【0071】また、データ廃棄量の総量については、本
方式1では3677パケットであり、従来方法では41
90パケットであった。したがって、本方法1は、従来
方法よりもDTS制約違反に対する耐性に優れ、かつ、優
先度が低いPESのデータ廃棄量を抑制することが可能で
あると判断できる。
The total amount of data discarded is 3677 packets in the present method 1 and 41 in the conventional method.
90 packets. Therefore, it can be determined that the method 1 is more resistant to the DTS constraint violation than the conventional method and can suppress the data discard amount of the PES with a low priority.

【0072】次に、本発明を適用した多重化装置70の
構成例について、図14を参照して説明する。なお、多
重化装置70も、図7の多重化装置50と同様に、図1
の多重化装置12に代わるものであって、多重化装置5
0の入力処理部51および多重化制御部57を、入力処
理部71および多重化制御部73に置換し、コードフラ
グメモリ72を追加したものである。
Next, an example of the configuration of a multiplexer 70 to which the present invention is applied will be described with reference to FIG. The multiplexing device 70 also has the same configuration as the multiplexing device 50 of FIG.
Of the multiplexing device 12 and the multiplexing device 5
The input processing unit 51 and the multiplexing control unit 57 are replaced with an input processing unit 71 and a multiplexing control unit 73, and a code flag memory 72 is added.

【0073】多重化装置70の入力処理部71は、入力
されるn本のPESを対応する多重バッファ54−1乃至
54−nに書き込むとともに、各PESを構成するPESパケ
ットのPESヘッダ等に記述されている属性データを抽出
する。入力処理部71はまた、抽出した属性データのう
ち、ESCRについては、そのESCRのデコード値および捕捉
したタイミングを用いてストリームの基準時間を再生
し、得られた基準時刻を制御データ生成部52および多
重化制御部73に供給する。抽出した他の属性データ
(Stream ID等)も制御データ生成部52および多重化
制御部73に供給する。
The input processing unit 71 of the multiplexer 70 writes the input n PESs into the corresponding multiplexing buffers 54-1 to 54-n, and describes the PESs in the PES headers of the PES packets constituting each PES. Extract attribute data that has been set. The input processing unit 71 also reproduces the reference time of the stream using the decoded value of the ESCR and the captured timing for the ESCR among the extracted attribute data, and outputs the obtained reference time to the control data generation unit 52. It is supplied to the multiplexing control unit 73. The other extracted attribute data (Stream ID or the like) is also supplied to the control data generator 52 and the multiplexing controller 73.

【0074】さらに、入力処理部71は、各PESのAU
のスタートコードおよびPESスタートコードを検索し、
AUのスタートコードを検出したときには、コードフラ
グデータとして例えば10をコードフラグメモリ72に
出力し、PESスタートコードを検出したときには、コー
ドフラグデータとして例えば20をコードフラグメモリ
72に出力し、AUのスタートコードおよびPESスター
トコードを検出しないときには、コードフラグデータと
して例えば00をコードフラグメモリ72に出力する。
Further, the input processing section 71 checks the AU of each PES.
Search start code and PES start code,
When a start code of the AU is detected, for example, 10 is output to the code flag memory 72 as code flag data, and when a PES start code is detected, for example, 20 is output to the code flag memory 72 as code flag data. When the code and the PES start code are not detected, for example, 00 is output to the code flag memory 72 as code flag data.

【0075】コードフラグメモリ72は、多重バッファ
54の数と同数(=n)のサブ領域を有しており、図1
5に示すように、各サブ領域は多重バッファ54が保持
するデータと1対1に対応するコードフラグを記憶す
る。
The code flag memory 72 has the same number (= n) of sub-areas as the number of the multiplex buffers 54, and
As shown in FIG. 5, each sub area stores a code flag corresponding to the data held by the multiplexing buffer 54 on a one-to-one basis.

【0076】多重化制御部73は、PES、制御データ、
またはヌルパケットを一定のデータ長に分割し、それぞ
れにTPヘッダが付加されるようにスイッチ56を制御
する。
The multiplexing control unit 73 includes a PES, control data,
Alternatively, the switch 56 is controlled so that a null packet is divided into a certain data length and a TP header is added to each of them.

【0077】図16は、多重化制御部73の詳細な構成
例を示している。多重化制御部73は、バッファ出力お
よびスイッチ制御部81、多重チャンネル選択部82、
および仮想デコーダバッファ検証部83から構成され
る。
FIG. 16 shows a detailed configuration example of the multiplexing control unit 73. The multiplexing control unit 73 includes a buffer output and switch control unit 81, a multiplex channel selection unit 82,
And a virtual decoder buffer verifying unit 83.

【0078】バッファ出力およびスイッチ制御部81
は、多重バッファ読み出しアドレスを多重チャンネル選
択部82に出力し、それに対応して返される多重チャン
ネル情報を受信して、多重チャンネル情報(制御デー
タ、ヌルパケット、n本のPESのうちのいずれかを選択
する情報)に対応して制御データ生成部52、ヌルパケ
ット生成部53、および多重バッファ54−1乃至54
−nのうちのいずれかにデータ読み出し制御信号を出力
し、スイッチ制御信号をスイッチ56に出力する。な
お、PESを多重化する場合、多重チャンネル情報には、P
ESのペイロード長のデータが含まれる。この場合、バッ
ファ出力およびスイッチ制御部81は、TPヘッダ生成
部55に、PIDおよびPESペイロード長から算出できるス
タッフィングバイト長等のTPヘッダ情報を出力する。
Buffer output and switch control unit 81
Outputs the multiplexed buffer read address to the multiplexed channel selector 82, receives the multiplexed channel information returned in response to the multiplexed buffer readout address, and outputs any of the multiplexed channel information (control data, null packet, and n PESs). The control data generator 52, the null packet generator 53, and the multiplex buffers 54-1 to 54 correspond to the information to be selected).
A data read control signal is output to any one of −n and a switch control signal is output to the switch 56. When multiplexing PES, the multiplex channel information includes P
It contains data of the ES payload length. In this case, the buffer output and switch control unit 81 outputs TP header information such as a stuffing byte length that can be calculated from the PID and the PES payload length to the TP header generation unit 55.

【0079】多重チャンネル選択部82は、制御データ
生成部52から入力される制御データ多重要求信号、多
重バッファ54−1乃至54−nからの多重バッファの
書き込みアドレスとバッファ出力およびスイッチ制御部
81からの読み出しアドレスから演算される多重バッフ
ァ占有量、コードフラグメモリ72に記憶されているコ
ードフラグを解析して得られる、多重バッファ54内の
先頭のAUが占めるデータ長、入力処理部71からの基
準時刻データおよびデコード時刻データを用いて演算さ
れる各AUのデコード時刻までの残り時間lefttime、並
びに、仮想デコーダバッファ検証部83から入力される
多重禁止フラグに基づいて、多重化するチャンネルを選
択し、多重チャンネル情報としてバッファ出力および制
御部81に出力する。多重チャンネル選択部82はま
た、コードフラグメモリ72に記憶されているコードフ
ラグを解析して得られる、直前に多重化したチャンネル
のTPペイロード長およびAUデータ長を仮想デコーダ
バッファ検証部83に出力する。
The multiplex channel selection unit 82 receives the control data multiplex request signal input from the control data generation unit 52, the multiplex buffer write address from the multiplex buffers 54-1 to 54-n, the buffer output, and the switch control unit 81. Of the multiplexed buffer calculated from the read address of the multiplexed buffer, the data length occupied by the first AU in the multiplexed buffer 54 obtained by analyzing the code flag stored in the code flag memory 72, and the reference from the input processing unit 71. Selecting a channel to be multiplexed based on the remaining time lefttime up to the decoding time of each AU calculated using the time data and the decoding time data, and the multiplexing inhibition flag input from the virtual decoder buffer verification unit 83; Output to the buffer output and control unit 81 as multiplex channel information The multiplex channel selection unit 82 also outputs to the virtual decoder buffer verification unit 83 the TP payload length and AU data length of the channel multiplexed immediately before, which are obtained by analyzing the code flags stored in the code flag memory 72. .

【0080】仮想デコーダバッファ検証部83は、多重
チャンネル選択部82からの、直前に多重化されたチャ
ンネルのTPペイロード長およびAUデータ長を用い
て、各PES用のTBおよびMBの動作をシミュレート
し、TBまたはMBが破綻しそうになったとき、当該チ
ャンネルに対応する多重禁止フラグを立てて多重チャン
ネル選択部82に出力する。
The virtual decoder buffer verification unit 83 simulates the operation of the TB and MB for each PES using the TP payload length and AU data length of the channel multiplexed immediately before from the multiplex channel selection unit 82. Then, when the TB or MB is about to fail, a multiplex prohibition flag corresponding to the channel is set and output to the multiplex channel selection unit 82.

【0081】次に、多重チャンネル選択部82の動作に
ついて、図17のフローチャートを参照して説明する。
多重化するデータは、映像音声等のデータと、PSIおよ
びPCR等の制御データに大別できるが、制御データは、
プログラムを再生する際に必要なデータであるので、映
像音声等のデータよりも優先的に多重化するように制御
する。したがって、制御データを多重化しないタイミン
グにおいて、映像音声等のデータに相当するPESのいず
れか、またはヌルパケットを多重化するように制御す
る。
Next, the operation of the multiplex channel selector 82 will be described with reference to the flowchart of FIG.
Data to be multiplexed can be roughly classified into data such as video and audio, and control data such as PSI and PCR.
Since the data is necessary for reproducing the program, the data is controlled so as to be multiplexed with priority over data such as video and audio. Therefore, at the timing when control data is not multiplexed, control is performed so as to multiplex any of the PESs corresponding to data such as video and audio or null packets.

【0082】具体的には、ステップS11において、多
重チャンネル選択部82は、仮想デコーダバッファ検証
部83においてT-STDのTBおよびMBが正常にシミュ
レートされているかを検証する。ステップS12におい
て、多重チャンネル選択部82は、仮想デコーダ検証部
83から入力される各チャンネルに対応する多重禁止フ
ラグのうち、立てられていない多重禁止フラグが存在す
るか否かを判定する。立てられていない多重禁止フラグ
が存在すると判定された場合、ステップS13に進む。
More specifically, in step S11, the multiplex channel selection unit 82 verifies whether the virtual decoder buffer verification unit 83 simulates the TB and MB of the T-STD normally. In step S12, the multiplex channel selection unit 82 determines whether or not a multiplex prohibition flag that has not been set exists among the multiplex prohibition flags corresponding to each channel input from the virtual decoder verification unit 83. If it is determined that there is a multiple prohibition flag that has not been set, the process proceeds to step S13.

【0083】ステップS13において、多重チャンネル
選択部82は、各チャンネル毎、各チャンネルの多重バ
ッファ54−1乃至54−nにそれぞれ記憶されている
先頭のAUのデコード時刻までの残り時間lefttime、各
チャンネルの優先度情報P(k)、および、多重バッファ5
4内の蓄積データのうちの先頭AUの占有量ocを取得
し、残り時間lefttime、優先度情報P(k)、および占有量
ocをパラメータとする次式のような多重優先関数f2(l
efttime,oc,P(k))の値を演算して、多重優先関数f2(lef
ttime,oc,P(k))の値が最大であるチャンネルを多重化チ
ャンネルに選択する。 多重優先関数f2(lefttime,oc,P(k))=oc−α(lefttime
−(P(k)+β))
In step S13, the multiplex channel selecting unit 82 determines, for each channel, the remaining time lefttime until the decoding time of the first AU stored in the multiplex buffers 54-1 to 54-n of each channel, Priority information P (k) and multiplex buffer 5
4, the occupation amount oc of the leading AU among the stored data is obtained, and the remaining time lefttime, the priority information P (k), and the occupation amount oc are used as parameters.
efttime, oc, P (k)) and calculate the multiple priority function f2 (lef
The channel having the largest value of (ttime, oc, P (k)) is selected as the multiplexed channel. Multiple priority function f2 (lefttime, oc, P (k)) = oc-α (lefttime
− (P (k) + β))

【0084】ただし、βは正の定数であり、αは多重優
先関数f2(lefttime,oc,P(k))のパラメータである占有量
ocと残り時間lefttimeの重み付けを設定する係数であ
り、残り時間lefttimeがP(k)+βよりも小さい場合、α
はα0からα0よりも大きいα1に切替えることによ
り、残り時間lefttime に対する依存度を大きくした多
重優先関数f2(lefttime,oc,P(k))が得られるようになさ
れている。 α=α0 (lefttime≧P(k)+β) =α1 (lefttime<P(k)+β) α0≦α1
Here, β is a positive constant, and α is a coefficient for setting the weight of the occupation amount oc and the remaining time lefttime, which are the parameters of the multiple priority function f2 (lefttime, oc, P (k)). If the time lefttime is smaller than P (k) + β, α
By switching from α0 to α1 which is larger than α0, a multi-priority function f2 (lefttime, oc, P (k)) whose dependency on the remaining time lefttime is increased can be obtained. α = α0 (lefttime ≧ P (k) + β) = α1 (lefttime <P (k) + β) α0 ≦ α1

【0085】多重優先関数f2(lefttime,oc,P(k))は、占
有量ocの増加とともに単調増加し、残り時間lefttime
が時間の経過とともに減少することに伴って単調増加す
る。
The multiple priority function f2 (lefttime, oc, P (k)) monotonically increases as the occupancy oc increases, and the remaining time lefttime
Increases monotonically with decreasing over time.

【0086】多重優先関数f2(lefttime,oc,P(k))をグラ
フ化した一例を図18に示す。ただし、同図において
は、残り時間lefttimeの単位をパケット周期として、占
有量ocの単位をTPデータサイズとした。また、優先
度情報P(k)=10、β=3、α0=1/3、α1=1と
した。
FIG. 18 shows an example of a graph of the multiple priority function f2 (lefttime, oc, P (k)). However, in the figure, the unit of the remaining time lefttime is the packet cycle, and the unit of the occupancy oc is the TP data size. Further, priority information P (k) = 10, β = 3, α0 = 1/3, and α1 = 1.

【0087】ステップS12において、立てられていな
い多重禁止フラグが存在しないと判定した場合、多重チ
ャンネル選択部82は、ステップS14において、ヌル
パケットを多重チャンネルに選択する。
If it is determined in step S12 that there is no multiplex prohibition flag that has not been set, the multiplex channel selection unit 82 selects a null packet as a multiplex channel in step S14.

【0088】次に、多重化装置70の動作テストの結果
を図19に示す。動作テストは、上述したテスト3と同
様の条件下で実施した。なお、優先多重関数f2(lefttim
e,oc,P(k))のパラメータは、チャンネル1の優先度P(1)
=100、チャンネル2の優先度P(2)=50、チャンネ
ル3の優先度P(3)=0、β=3、α0=1/3、α1=
1とした。なお、図19はデータ廃棄量の時間推移を示
しており、図12と同様に、本実施の形態による結果
(以下、本方法2と記述する)との比較のため、従来方
法による結果も併記している。
Next, the result of the operation test of the multiplexer 70 is shown in FIG. The operation test was performed under the same conditions as in Test 3 described above. Note that the priority multiple function f2 (lefttim
e, oc, P (k)) is the priority of channel 1 P (1)
= 100, channel 2 priority P (2) = 50, channel 3 priority P (3) = 0, β = 3, α0 = 1/3, α1 =
It was set to 1. FIG. 19 shows the time change of the data discard amount. As in FIG. 12, for comparison with the result of the present embodiment (hereinafter referred to as the present method 2), the result of the conventional method is also shown. are doing.

【0089】図19に示したデータ廃棄量の推移と図1
1に示した入力ビットレートの推移を照らし合わせる
と、定常的な輻輳状態において、データ廃棄量が局所ピ
ーク値をとるタイミングは本方法2の方が遅れている場
合があるが、これは優先度が高いPESの残り時間lefttim
eに比較的大きな余裕があるとき、優先度が高いPESに対
してデータ遅延を許容し、優先度が低いPESを多重化す
るように制御しているためである。
FIG. 19 shows the transition of the data discard amount shown in FIG.
In comparison with the transition of the input bit rate shown in FIG. 1, in the steady congestion state, the timing at which the data discard amount reaches the local peak value may be delayed in the method 2 in accordance with the priority. Time lefttim with high PES
This is because when e has a relatively large margin, data delay is allowed for a PES with a high priority, and control is performed such that a PES with a low priority is multiplexed.

【0090】また、データ廃棄量の総量については、本
方式2では3626パケットであり、従来方法では41
90パケットであった。したがって、本方法2は、上述
した本方式1(データ廃棄量の総量=3677パケッ
ト)および従来方法よりもDTS制約違反に対する耐性に
優れ、かつ、優先度が低いPESのデータ廃棄量を抑制す
ることが可能であると判断できる。
The total amount of data discarded is 3626 packets in the present system 2 and 41 in the conventional method.
90 packets. Therefore, the method 2 is more resistant to DTS constraint violation than the method 1 (total amount of data discarded = 3677 packets) and the conventional method, and suppresses the data discard amount of the PES with low priority. Can be determined to be possible.

【0091】なお、本実施の形態である多重化装置5
0,70に対する入力は、PESを前提としていたが、複
数のPESが多重化されているTSを入力してもよい。
The multiplexing device 5 according to the present embodiment
Although the input to 0 and 70 is based on the PES, a TS in which a plurality of PESs are multiplexed may be input.

【0092】また、図20に示す多重化装置90のよう
に、図14の多重化装置70の入力処理部71の前段
に、入力されるTSをPES形式に変換するTS-PES変換部
91を設けてもよい。なお、TS-PES変換部91は、TS
を変換したPESを入力処理部71に出力するとともに、
TSの基準時刻を再生し、再生した基準時刻を制御デー
タ生成部52および多重化制御部73に出力するもので
ある。
As in the multiplexer 90 shown in FIG. 20, a TS-PES converter 91 for converting an input TS into a PES format is provided at a stage preceding the input processor 71 of the multiplexer 70 in FIG. It may be provided. Note that the TS-PES conversion unit 91
Is output to the input processing unit 71,
The reference time of the TS is reproduced, and the reproduced reference time is output to the control data generator 52 and the multiplexing controller 73.

【0093】さらに、本実施の形態においては、PESを
入力してTSを出力する多重化装置について記述してい
るが、本発明は、符号化単位の復号時刻までに各符号化
単位の出力が完了することを制約内容にもつあらゆるビ
ットストリームを出力する装置に適用することが可能で
ある。
Further, in the present embodiment, a multiplexing apparatus that inputs a PES and outputs a TS is described. However, the present invention provides that the output of each coding unit is output before the decoding time of the coding unit. The present invention can be applied to a device that outputs any bit stream having a constraint that the completion is completed.

【0094】ところで、上述した一連の処理は、ハード
ウェアにより実行させることもできるが、ソフトウェア
により実行させることもできる。一連の処理をソフトウ
ェアにより実行させる場合には、そのソフトウェアを構
成するプログラムが、専用のハードウェアに組み込まれ
ているコンピュータ、または、各種のプログラムをイン
ストールすることで、各種の機能を実行することが可能
な、例えば汎用のパーソナルコンピュータなどに、記録
媒体からインストールされる。
Incidentally, the above-described series of processes can be executed by hardware, but can also be executed by software. When a series of processing is executed by software, a program constituting the software can execute various functions by installing a computer built into dedicated hardware or installing various programs. It is installed from a recording medium into a possible general-purpose personal computer or the like.

【0095】この記録媒体は、図7に示すように、コン
ピュータとは別に、ユーザにプログラムを提供するため
に配布される、プログラムが記録されている磁気ディス
ク101(フロッピディスクを含む)、光ディスク10
2(CD-ROM(Compact Disc-Read Only Memory)、DVD(Dig
ital Versatile Disc)を含む)、光磁気ディスク103
(MD(Mini Disc)を含む)、もしくは半導体メモリ1
04などよりなるパッケージメディアにより構成される
だけでなく、コンピュータに予め組み込まれた状態でユ
ーザに提供される、プログラムが記録されているROMや
記憶部に含まれるハードディスクなどで構成される。
As shown in FIG. 7, the recording medium is a magnetic disk 101 (including a floppy disk) on which the program is recorded, which is distributed separately from the computer to provide the program to the user, and an optical disk 10
2 (CD-ROM (Compact Disc-Read Only Memory), DVD (Dig
Ital Versatile Disc), magneto-optical disc 103
(Including MD (Mini Disc)) or semiconductor memory 1
In addition to being constituted by a package medium such as a CD-ROM 04, the ROM is provided to a user in a state of being incorporated in a computer in advance, and is constituted by a ROM in which a program is recorded, a hard disk included in a storage unit, and the like.

【0096】なお、本明細書において、記録媒体に記録
されるプログラムを記述するステップは、記載された順
序に従って時系列的に行われる処理はもちろん、必ずし
も時系列的に処理されなくとも、並列的あるいは個別に
実行される処理をも含むものである。
In this specification, the steps for describing the program recorded on the recording medium are not limited to the processing performed in chronological order according to the described order, but are not necessarily performed in chronological order. Alternatively, it also includes individually executed processing.

【0097】[0097]

【発明の効果】以上のように、本発明の多重化装置、多
重化方法、および記録媒体のプログラムによれば、復号
時刻情報および基準時刻情報に基づいて、保持したデー
タストリームの現時刻における復号時刻までの残り時間
を演算し、優先度情報および残り時間に基づいて複数の
データストリームの中から1本のデータストリームを選
択して多重化するようにしたので、輻輳状態において優
先順位が低いチャンネルのPESのDTS制約違反を回避し、
かつ、データ廃棄量を抑制することが可能となる。
As described above, according to the multiplexing apparatus, the multiplexing method, and the program of the recording medium of the present invention, decoding of the held data stream at the current time is performed based on the decoding time information and the reference time information. The remaining time up to the time is calculated, and one data stream is selected and multiplexed from a plurality of data streams based on the priority information and the remaining time. Avoid PES DTS constraint violations,
In addition, the amount of data discard can be reduced.

【図面の簡単な説明】[Brief description of the drawings]

【図1】従来のディジタル衛星放送システムの構成の一
例を示すブロック図である。
FIG. 1 is a block diagram illustrating an example of a configuration of a conventional digital satellite broadcasting system.

【図2】PESパケットのデータ構造を示す図である。FIG. 2 is a diagram showing a data structure of a PES packet.

【図3】TSパケットのデータ構造を示す図である。FIG. 3 is a diagram showing a data structure of a TS packet.

【図4】図1の多重化装置12の構成の一例を示すブロ
ック図である。
FIG. 4 is a block diagram illustrating an example of a configuration of the multiplexer 12 of FIG.

【図5】T-STDの構成例を示すブロック図である。FIG. 5 is a block diagram illustrating a configuration example of a T-STD.

【図6】DTSマージンについて説明するための図であ
る。
FIG. 6 is a diagram for explaining a DTS margin.

【図7】本発明の一実施の形態である多重化装置50の
構成例を示すブロック図である。
FIG. 7 is a block diagram illustrating a configuration example of a multiplexing device 50 according to an embodiment of the present invention.

【図8】図7の多重化制御部57の詳細な構成例を示す
ブロック図である。
8 is a block diagram illustrating a detailed configuration example of a multiplexing control unit 57 in FIG.

【図9】図8の多重チャンネル選択部62の動作を説明
するフローチャートである。
FIG. 9 is a flowchart illustrating an operation of the multiplex channel selection unit 62 of FIG. 8;

【図10】動作テスト1に用いるPESの入力ビットレー
トの推移を示す図である。
FIG. 10 is a diagram showing a transition of an input bit rate of a PES used for an operation test 1;

【図11】動作テスト2に用いるPESの入力ビットレー
トの推移を示す図である。
FIG. 11 is a diagram showing a transition of an input bit rate of a PES used for an operation test 2;

【図12】多重化装置50の動作テスト1におけるデー
タ廃棄量を示す図である。
FIG. 12 is a diagram showing a data discard amount in an operation test 1 of the multiplexing device 50;

【図13】多重化装置50の動作テスト2におけるデー
タ廃棄量を示す図である。
13 is a diagram showing a data discard amount in the operation test 2 of the multiplexing device 50. FIG.

【図14】本発明の一実施の形態である多重化装置70
の構成例を示すブロック図である。
FIG. 14 shows a multiplexer 70 according to an embodiment of the present invention.
FIG. 3 is a block diagram illustrating a configuration example of FIG.

【図15】図14のコードフラグメモリ72について説
明するための図である。
FIG. 15 is a diagram for explaining a code flag memory 72 of FIG. 14;

【図16】図14の多重化制御部73の詳細な構成例を
示すブロック図である。
16 is a block diagram illustrating a detailed configuration example of a multiplexing control unit 73 in FIG.

【図17】図16の多重チャンネル選択部82の動作を
説明するフローチャートである。
FIG. 17 is a flowchart illustrating the operation of the multiplex channel selection unit 82 of FIG.

【図18】多重優先関数f2を示す図である。FIG. 18 is a diagram illustrating a multiple priority function f2.

【図19】多重化装置70の動作テストにおけるデータ
廃棄量を示す図である。
19 is a diagram illustrating a data discard amount in an operation test of the multiplexing device 70. FIG.

【図20】本発明の一実施の形態である多重化装置90
の構成例を示すブロック図である。
FIG. 20 shows a multiplexer 90 according to an embodiment of the present invention.
FIG. 3 is a block diagram illustrating a configuration example of FIG.

【符号の説明】 50 多重化装置, 51 入力処理部, 52 制御
データ生成部, 53ヌルパケット生成部, 54 多
重バッファ, 55 TPヘッダ生成部,56 スイッ
チ, 57 多重化制御部, 58 出力制御部, 6
1 バッファ出力およびスイッチ制御部, 62 多重
チャンネル選択部, 63 仮想デコーダバッファ検証
部, 70 多重化装置, 71 入力処理部, 72
コードフラグメモリ, 73 多重化制御部, 81
バッファ出力およびスイッチ制御部, 82 多重チ
ャンネル選択部, 83 仮想デコーダバッファ検証
部, 90 多重化装置, 91 TS−PES変換部
[Description of Signs] 50 multiplexer, 51 input processing unit, 52 control data generation unit, 53 null packet generation unit, 54 multiplex buffer, 55 TP header generation unit, 56 switch, 57 multiplex control unit, 58 output control unit , 6
1 buffer output and switch control unit, 62 multiplex channel selection unit, 63 virtual decoder buffer verification unit, 70 multiplexer, 71 input processing unit, 72
Code flag memory 73 multiplexing control unit 81
Buffer output and switch control unit, 82 multiplex channel selection unit, 83 virtual decoder buffer verification unit, 90 multiplexer, 91 TS-PES conversion unit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C063 AB03 AB07 AC10 CA34 5K028 AA11 BB04 DD01 DD02 DD04 EE05 EE07 FF11 HH01 KK01 KK32 LL12 MM05 MM08 MM16 NN21 RR02 SS05 SS15 SS24 TT01 5K030 GA13 HA15 HB19 HB21 HB29 JA01 JL01 JL02 JT04 JT10 KA02 KA19 KX28 LA15 LA18 LC11 LD01 LD07 LD18 LE06 9A001 BB04 CC03 CC05 DD10 GG01 HH32 JJ12 KK56  ──────────────────────────────────────────────────続 き Continued on the front page F-term (reference) KA02 KA19 KX28 LA15 LA18 LC11 LD01 LD07 LD18 LE06 9A001 BB04 CC03 CC05 DD10 GG01 HH32 JJ12 KK56

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 優先順位が設定されている複数のデータ
ストリームを多重化する多重化装置において、 前記各データストリームに設定されている前記優先順位
を示す優先度情報を入力する入力手段と、 前記各データストリームに対応する復号時刻情報を取得
する取得手段と、 前記各データストリームから基準時刻情報を抽出する抽
出手段と、 前記各データストリームを一時的に保持する保持手段
と、 前記復号時刻情報および前記基準時刻情報に基づいて、
前記保持手段が保持する前記データストリームの現時刻
における復号時刻までの残り時間を演算する演算手段
と、 前記優先度情報および前記残り時間に基づいて前記複数
のデータストリームの中から1本のデータストリームを
選択する選択手段と、 前記選択手段が選択した前記データストリームを前記保
持手段から読み出して多重化する読み出し手段とを含む
ことを特徴とする多重化装置。
1. A multiplexing device for multiplexing a plurality of data streams for which priorities are set, an input unit for inputting priority information indicating the priorities set for each of the data streams; Acquiring means for acquiring decoding time information corresponding to each data stream; extracting means for extracting reference time information from each data stream; holding means for temporarily holding each data stream; Based on the reference time information,
Calculating means for calculating the remaining time until the decoding time at the current time of the data stream held by the holding means; and one data stream from the plurality of data streams based on the priority information and the remaining time And a reading unit that reads the data stream selected by the selecting unit from the holding unit and multiplexes the data stream.
【請求項2】 前記選択手段は、前記残り時間から前記
優先度情報が示す値を減算した値が最小である前記デー
タストリームを優先的に選択することを特徴とする請求
項1に記載の多重化装置。
2. The multiplexing apparatus according to claim 1, wherein said selecting means preferentially selects the data stream having a minimum value obtained by subtracting the value indicated by the priority information from the remaining time. Device.
【請求項3】 前記保持手段が保持している各データス
トリームの保持量を計測する計測手段をさらに含み、 前記選択手段は、前記優先度情報、前記残り時間、およ
び前記保持量をパラメータとして多重優先関数により求
められる値に基づいてデータストリームを選択すること
を特徴とする請求項1に記載の多重化装置。
3. The information processing apparatus according to claim 1, further comprising: a measuring unit configured to measure a holding amount of each data stream held by the holding unit, wherein the selecting unit multiplexes the priority information, the remaining time, and the holding amount as parameters. The multiplexing apparatus according to claim 1, wherein the data stream is selected based on a value obtained by the priority function.
【請求項4】 前記データストリームはパケッタイズド
エレメンタリストリーム、または単一のパケッタイズド
エレメンタリストリームから構成されるトランスポート
ストリームであることを特徴とする請求項1に記載の多
重化装置。
4. The multiplexing apparatus according to claim 1, wherein the data stream is a packetized elementary stream or a transport stream composed of a single packetized elementary stream.
【請求項5】 トランスポートストリームを複数のパケ
ッタイズドエレメンタリストリームに分離する分離手段
をさらに含み、 前記データストリームは複数のパケッタイズドエレメン
タリストリームから構成されるトランスポートストリー
ムであることを特徴とする請求項1に記載の多重化装
置。
5. The apparatus according to claim 1, further comprising a separating unit configured to separate the transport stream into a plurality of packetized elementary streams, wherein the data stream is a transport stream including a plurality of packetized elementary streams. The multiplexing device according to claim 1, wherein
【請求項6】 優先順位が設定されている複数のデータ
ストリームを多重化する多重化装置の多重化方法におい
て、 前記各データストリームに設定されている前記優先順位
を示す優先度情報を入力する入力ステップと、 前記各データストリームに対応する復号時刻情報を取得
する取得ステップと、 前記各データストリームから基準時刻情報を抽出する抽
出ステップと、 前記各データストリームを一時的に保持する保持ステッ
プと、 前記復号時刻情報および前記基準時刻情報に基づいて、
前記保持ステップの処理で保持された前記データストリ
ームの現時刻における復号時刻までの残り時間を演算す
る演算ステップと、 前記優先度情報および前記残り時間に基づいて前記複数
のデータストリームの中から1本のデータストリームを
選択する選択ステップと、 前記選択ステップの処理で選択された前記データストリ
ームを前記保持ステップの処理に用いたバッファから読
み出して多重化する読み出しステップとを含むことを特
徴とする多重化方法。
6. A multiplexing method for a multiplexing apparatus for multiplexing a plurality of data streams for which priorities have been set, wherein an input for inputting priority information indicating the priorities set for each data stream. An acquisition step of acquiring decoding time information corresponding to each of the data streams; an extraction step of extracting reference time information from each of the data streams; a holding step of temporarily holding each of the data streams; Based on the decoding time information and the reference time information,
An operation step of calculating the remaining time until the decoding time at the current time of the data stream held in the processing of the holding step; and one of the plurality of data streams based on the priority information and the remaining time. A multiplexing method, comprising: selecting a data stream from the buffer; and reading out and multiplexing the data stream selected in the processing of the selecting step from the buffer used in the processing of the holding step. Method.
【請求項7】 優先順位が設定されている複数のデータ
ストリームを多重化する多重用のプログラムであって、 前記各データストリームに設定されている前記優先順位
を示す優先度情報を入力する入力ステップと、 前記各データストリームに対応する復号時刻情報を取得
する取得ステップと、 前記各データストリームから基準時刻情報を抽出する抽
出ステップと、 前記各データストリームを一時的に保持する保持ステッ
プと、 前記復号時刻情報および前記基準時刻情報に基づいて、
前記保持ステップの処理で保持された前記データストリ
ームの現時刻における復号時刻までの残り時間を演算す
る演算ステップと、 前記優先度情報および前記残り時間に基づいて前記複数
のデータストリームの中から1本のデータストリームを
選択する選択ステップと、 前記選択ステップの処理で選択された前記データストリ
ームを前記保持ステップの処理に用いたバッファから読
み出して多重化する読み出しステップとを含むことを特
徴とするコンピュータが読み取り可能なプログラムが記
録されている記録媒体。
7. A multiplexing program for multiplexing a plurality of data streams for which priorities are set, an input step of inputting priority information indicating the priorities set for each of the data streams. An acquisition step of acquiring decoding time information corresponding to each data stream; an extraction step of extracting reference time information from each data stream; a holding step of temporarily holding each data stream; Based on the time information and the reference time information,
An operation step of calculating the remaining time until the decoding time at the current time of the data stream held in the processing of the holding step; and one of the plurality of data streams based on the priority information and the remaining time. A selecting step of selecting the data stream of the above, and a reading step of reading and multiplexing the data stream selected in the processing of the selecting step from the buffer used in the processing of the holding step. A recording medium on which a readable program is recorded.
JP32774799A 1999-11-18 1999-11-18 Device and method for multiplexing and recording medium Withdrawn JP2001144720A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32774799A JP2001144720A (en) 1999-11-18 1999-11-18 Device and method for multiplexing and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32774799A JP2001144720A (en) 1999-11-18 1999-11-18 Device and method for multiplexing and recording medium

Publications (1)

Publication Number Publication Date
JP2001144720A true JP2001144720A (en) 2001-05-25

Family

ID=18202540

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32774799A Withdrawn JP2001144720A (en) 1999-11-18 1999-11-18 Device and method for multiplexing and recording medium

Country Status (1)

Country Link
JP (1) JP2001144720A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004180154A (en) * 2002-11-28 2004-06-24 Matsushita Electric Ind Co Ltd Base station device and adaptive modulation method
JP2006120122A (en) * 2004-09-03 2006-05-11 Sony United Kingdom Ltd Data transmission
JP2007318470A (en) * 2006-05-26 2007-12-06 Sony Corp Server device, transmission sequence determination method and content distribution system
JP2009151183A (en) * 2007-12-21 2009-07-09 Ntt Docomo Inc Multi-channel voice sound signal coding device and method, and multi-channel voice sound signal decoding device and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004180154A (en) * 2002-11-28 2004-06-24 Matsushita Electric Ind Co Ltd Base station device and adaptive modulation method
JP2006120122A (en) * 2004-09-03 2006-05-11 Sony United Kingdom Ltd Data transmission
JP2007318470A (en) * 2006-05-26 2007-12-06 Sony Corp Server device, transmission sequence determination method and content distribution system
JP2009151183A (en) * 2007-12-21 2009-07-09 Ntt Docomo Inc Multi-channel voice sound signal coding device and method, and multi-channel voice sound signal decoding device and method

Similar Documents

Publication Publication Date Title
US7496675B2 (en) Data multiplexer, data multiplexing method, and recording medium
JP3168243B2 (en) Video signal encoding device
US5801781A (en) Apparatus for converting moving picture stream of MPEG1 to transport stream of MPEG2
JP3666625B2 (en) Data recording method and data recording apparatus
US20050100094A1 (en) Buffer management in variable bit-rate compression systems
KR20010102436A (en) Method and apparatus for converting data streams
JP2002536889A (en) Method and apparatus for ensuring that the bandwidth of a statistical multiplexer is sufficient
EP0933949B1 (en) Transmitting system, transmitting apparatus, recording and reproducing apparatus
US5930451A (en) Audio and video reproduction system comprising audio reproduction time adjusting unit
EP1014370A2 (en) Method , recording medium , and recording, editing and recording and playback apparatus for seamless reproduction
US20100142554A1 (en) Multiplexer and multiplexing method, program, and recording medium
JP4294660B2 (en) REPRODUCTION DEVICE, REPRODUCTION METHOD, AND RECORDING MEDIUM THEREOF
CN100563349C (en) Reproducer and method
US8359413B2 (en) Data stream buffer control using reference time and decoding time
JP3558983B2 (en) Digital broadcast recording and playback device
JP3750760B2 (en) Repeated use data insertion device and digital broadcast transmission system
JP2001144720A (en) Device and method for multiplexing and recording medium
US8254764B2 (en) Recording apparatus, image reproducing apparatus, and special reproduction method therefor
JP3990813B2 (en) Encoding apparatus, encoding method, digital transmission apparatus, and digital transmission system
EP2557786B1 (en) Delay controlled decoding apparatus and method
JP2001144711A (en) Device and method for multiplexing and recording medium
JPH11112947A (en) Device and method for data multiplexing, device and method for data processing, and transmission medium
JP2001339688A (en) Playback equipment of transport stream
JP2008176918A (en) Reproducing apparatus and method, and recording medium
JP4362950B2 (en) Signal multiplexing apparatus and method, and recording medium

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070206