JPH10271463A - Data multiplexer and method therefor - Google Patents

Data multiplexer and method therefor

Info

Publication number
JPH10271463A
JPH10271463A JP7183497A JP7183497A JPH10271463A JP H10271463 A JPH10271463 A JP H10271463A JP 7183497 A JP7183497 A JP 7183497A JP 7183497 A JP7183497 A JP 7183497A JP H10271463 A JPH10271463 A JP H10271463A
Authority
JP
Japan
Prior art keywords
data
video
audio
stream
amount
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.)
Pending
Application number
JP7183497A
Other languages
Japanese (ja)
Inventor
Tomoji Miyazawa
智司 宮澤
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 JP7183497A priority Critical patent/JPH10271463A/en
Publication of JPH10271463A publication Critical patent/JPH10271463A/en
Pending 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 multiplex audio and video data by a simple algorithm without using a floating decimal point arithmetic operation so as not to cause a reception buffer to be overflowed without taking a residual storage capacity into account. SOLUTION: A CPU 424 controls a data quantity generated by a video encoder 20 so as to distribute video data to video frames without causing a fraction. The CPU 424 calculates a data quantity A of audio data to be multiplexed for each frame and a data quantity B of audio data to be multiplexed for each of a prescribed number of frames such as 30 frames based on a data rate of audio data generated by the video encoder 24, adds '1' to the data quantity A depending whether or not a data quantity C of the audio data that are multiplexed for 30 frames is more than the data quantity B to calculate a data quantity D. Moreover, the CPU 424 controls each component of a data multiplexer 2 to multiplex the video data by a prescribed quantity with the data quantity D calculated by each frame.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、映像データおよび
音声データ(音声・映像データ)を多重化し、伝送する
ためのトランスポートストリームを生成するデータ多重
化装置およびその方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data multiplexing apparatus for multiplexing video data and audio data (audio / video data) and generating a transport stream for transmission, and a method therefor.

【0002】[0002]

【従来の技術】映像データおよび音声データ(音声・映
像データ)をMPEG方式等により圧縮符号化し、所定
の伝送パケットに多重化してトランスポートストリーム
を生成し、視聴者に配信するディジタルテレビジョン放
送が実用化されている。音声・映像データを多重化する
場合、伸長復号装置のバッファ残量を考慮する必要があ
る。つまり、送信側で、MPEG等の規格において定め
られている伸長復号装置の受信バッファ(音声の場合4
kB)にオーバーフローもアンダーフローも(破綻が)
生じないように計画して音声・映像データを多重化する
必要がある。
2. Description of the Related Art Digital television broadcasting which compresses and encodes video data and audio data (audio / video data) according to an MPEG system or the like, multiplexes them into predetermined transmission packets, generates a transport stream, and distributes the transport stream to viewers. Has been put to practical use. When multiplexing audio / video data, it is necessary to consider the remaining buffer capacity of the decompression decoding device. That is, on the transmitting side, the receiving buffer (4 in case of audio,
Both overflow and underflow in KB)
It is necessary to multiplex audio / video data in a way that does not occur.

【0003】しかしながら、受信バッファに破綻が生じ
なくても、例えば、音声データに1秒の時間間隔が空く
場合等、データの伝送間隔が広すぎると、受信側で正常
に音声データを再生できなくなる可能性が生じる。ま
た、受信バッファが破綻しないように音声・映像データ
の圧縮符号化および多重化を計画するためのアルゴリズ
ムは複雑であり、浮動小数点演算を要するため所持時間
が長くかかる。
However, even if the reception buffer does not fail, if the data transmission interval is too wide, for example, if the time interval of one second is large in the audio data, the audio data cannot be normally reproduced on the receiving side. Possibilities arise. In addition, an algorithm for planning compression / encoding and multiplexing of audio / video data so that the reception buffer does not fail is complicated, and requires a long floating point operation because of the need for floating-point arithmetic.

【0004】[0004]

【発明が解決しようとする課題】本発明は上述した従来
技術の問題点に鑑みてなされたものであり、ディジタル
テレビジョン放送設備等において、受信側の伸長復号装
置の受信バッファの残り記憶容量を考慮せず、しかも、
浮動小数点演算を用いない整数演算のみの簡単なアルゴ
リズムで、受信バッファに破綻を生じさせないように、
音声・映像データを伝送パケットに多重化し、トランス
ポートストリームを生成することができるデータ多重化
装置およびその方法を提供することを目的とする。ま
た、本発明は、常に、受信側において正常に音声・映像
データを再生することができるように、音声・映像デー
タを伝送パケットに多重化し、トランスポートストリー
ムを生成することができるデータ多重化装置およびその
方法を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems of the prior art. In digital television broadcasting equipment and the like, the remaining storage capacity of a reception buffer of a decompression decoding device on the receiving side is reduced. Without consideration, and
With a simple algorithm of only integer operation without using floating point operation, so as not to cause failure in the reception buffer,
It is an object of the present invention to provide a data multiplexing apparatus and a method thereof capable of multiplexing audio / video data into transmission packets and generating a transport stream. Also, the present invention provides a data multiplexing apparatus capable of always multiplexing audio / video data into transmission packets and generating a transport stream so that audio / video data can be normally reproduced on a receiving side. And a method thereof.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
に、本発明にかかるデータ多重化装置は、端数が生じな
いように、映像データの映像フレーム周期それぞれに生
成した映像データを等しいデータ量ずつ配分することが
できる条件を満たす目標データ量を算出する映像目標デ
ータ量算出手段と、算出した前記目標データ量と等しい
データ量の映像データを生成する映像データ生成手段
と、前記映像フレーム周期と異なる音声フレーム周期ご
とに、所定のデータ量の音声データを生成する音声デー
タ生成手段と、生成した前記音声データを、前記映像フ
レーム周期それぞれにほぼ等しいデータ量ずつ配分する
音声データ配分手段と、前記映像フレーム周期ごとに、
前記等しいデータ量の映像データ、および、配分した前
記音声データを、所定のトランスポートストリームに多
重化する多重化手段とを有する。
In order to achieve the above object, a data multiplexing device according to the present invention provides a data multiplexing apparatus for generating video data generated in each video frame period of video data by an equal data amount so as not to generate a fraction. A video target data amount calculation unit that calculates a target data amount that satisfies a condition that can be distributed at a time; a video data generation unit that generates video data having a data amount equal to the calculated target data amount; For each different audio frame period, audio data generation means for generating audio data of a predetermined data amount, audio data distribution means for distributing the generated audio data by a data amount substantially equal to each of the video frame periods, For each video frame period,
Multiplexing means for multiplexing the video data having the same data amount and the allocated audio data into a predetermined transport stream.

【0006】好適には、前記映像データ生成手段は、非
圧縮映像データを圧縮して、前記目標データ量に適合す
るデータレートの前記映像データを生成する。
[0006] Preferably, the video data generating means compresses the uncompressed video data to generate the video data having a data rate suitable for the target data amount.

【0007】好適には、前記音声データ配分手段は、所
定数の前記映像フレーム周期の間に多重化する前記音声
データの目標データ量を算出する音声目標データ量算出
手段と、当該映像フレーム周期の過去、前記所定数の前
記映像フレーム周期の間に多重化した前記音声データの
データ量を計数する音声データ計数手段と、算出した前
記音声データの目標データ量、および、計数した前記音
声データのデータ量とに基づいて、当該映像フレーム周
期に配分する前記音声データのデータ量を算出する音声
データ配分量算出手段とを有する。
Preferably, the audio data distribution unit includes an audio target data amount calculation unit that calculates a target data amount of the audio data to be multiplexed during a predetermined number of the video frame periods, In the past, audio data counting means for counting the data amount of the audio data multiplexed during the predetermined number of video frame periods, the calculated target data amount of the audio data, and the counted data of the audio data Audio data distribution amount calculating means for calculating a data amount of the audio data to be allocated to the video frame cycle based on the amount.

【0008】好適には、前記音声データおよび前記映像
データに付加する付加データを生成する付加データ生成
手段をさらに有し、前記多重化手段は、生成した付加デ
ータを、さらに前記所定のトランスポートストリームに
多重化する。
Preferably, the apparatus further comprises additional data generating means for generating additional data to be added to the audio data and the video data, and the multiplexing means further converts the generated additional data into the predetermined transport stream. Multiplex.

【0009】映像目標データ量算出手段は、映像データ
のフレーム周期(映像フレーム周期)それぞれに、例え
ば、バイト単位で端数のない等しいデータ量の映像デー
タを配分することができるように、映像データ生成手段
が所定の単位時間〔例えば、30映像フレーム周期分の
時間(1秒)〕ごとに生成すべき映像データのデータ量
を示す目標データ量を算出する。
The video target data amount calculating means generates the video data in such a manner that the video data having the same data amount with no fraction in byte units can be allocated to each frame period (video frame period) of the video data. The means calculates a target data amount indicating a data amount of the video data to be generated for each predetermined unit time (for example, a time (1 second) for 30 video frame periods).

【0010】映像データ生成手段は、例えば、非圧縮映
像データをMPEG方式で圧縮符号化し、上記単位時間
ごとに、映像目標データ量算出手段が算出した目標デー
タ量と等しいデータ量の圧縮映像データを生成する。
The video data generating means compresses and encodes, for example, the uncompressed video data in accordance with the MPEG method, and compresses the compressed video data having a data amount equal to the target data amount calculated by the video target data amount calculating means every unit time. Generate.

【0011】音声データ生成手段は、例えば、非圧縮音
声データをMPEG方式で圧縮符号化し、音声データの
サンプリング周期ごとに一定のデータ量の圧縮音声デー
タを生成する。付加データ生成手段は、例えば、複数言
語の字幕を多重化する際に用いられる付加データ(プラ
イベートデータ)等を生成する。
The audio data generating means compresses and encodes, for example, uncompressed audio data in accordance with the MPEG system, and generates a fixed amount of compressed audio data for each sampling cycle of the audio data. The additional data generation means generates, for example, additional data (private data) used when multiplexing subtitles in a plurality of languages.

【0012】音声データ配分手段は、例えば、上記単位
時間の間に多重化すべき音声データのデータ量を示す音
声データの目標データ量を算出する(音声目標データ量
算出手段)。次に、音声データ配分手段は、映像フレー
ム周期ごとに、その映像フレーム周期の過去、上記単位
時間の間に多重化手段が多重化した圧縮音声データのデ
ータ量を計数する(音声データ計数手段)。
The audio data distribution means calculates, for example, a target data amount of audio data indicating the data amount of audio data to be multiplexed during the unit time (audio target data amount calculation means). Next, the audio data distribution unit counts, for each video frame period, the amount of compressed audio data multiplexed by the multiplexing unit during the unit time in the past of the video frame period (audio data counting unit) .

【0013】さらに、音声データ配分手段は、例えば、
計数した音声データのデータ量が、算出した音声データ
の目標データ量より多いか否かに応じて、上記単位時間
の間に多重化すべき音声データのデータ量を、上記単位
時間に含まれる映像フレーム周期の数で除算し、小数点
以下を切り捨てて得られるデータ量に1を加算し、その
映像フレーム周期に配分する音声データのデータ量を算
出する(音声データ配分量算出手段)。
Further, the audio data distribution means includes, for example,
Depending on whether the counted data amount of the audio data is larger than the calculated target data amount of the audio data, the data amount of the audio data to be multiplexed during the unit time is determined by the video frame included in the unit time. Divide by the number of periods, add 1 to the data amount obtained by rounding down the decimal point, and calculate the data amount of audio data to be allocated to the video frame period (audio data allocation amount calculation means).

【0014】多重化手段は、生成された映像データを、
映像フレーム周期に同期して、映像フレーム周期ごと
に、等量の圧縮映像データ、その映像フレーム周期に配
分されたデータ量の音声データ、および、生成した付加
データを、伝送用パケットに多重化し、トランスポート
ストリームを生成する。
The multiplexing means converts the generated video data into
In synchronization with the video frame period, for each video frame period, an equal amount of compressed video data, audio data of the data amount allocated to the video frame period, and the generated additional data are multiplexed into transmission packets, Generate a transport stream.

【0015】また、本発明に係るデータ多重化方法は、
端数が生じないように、映像データの映像フレーム周期
それぞれに生成した映像データを等しいデータ量ずつ配
分することができる条件を満たす目標データ量を算出
し、算出した前記目標データ量と等しいデータ量の映像
データを生成し、前記映像フレーム周期と異なる音声フ
レーム周期ごとに、所定のデータ量の音声データを生成
し、生成した前記音声データを、前記映像フレーム周期
それぞれにほぼ等しいデータ量ずつ配分し、前記映像フ
レーム周期ごとに、前記等しいデータ量の映像データ、
および、配分した前記音声データを、所定の伝送パケッ
トに多重化し、トランスポートストリームを生成する。
Further, the data multiplexing method according to the present invention comprises:
A target data amount that satisfies the condition that the video data generated in each video frame period of the video data can be distributed by an equal data amount so that no fraction occurs is calculated, and a target data amount equal to the calculated target data amount is calculated. Generate video data, for each audio frame period different from the video frame period, generate audio data of a predetermined data amount, and distribute the generated audio data by a data amount substantially equal to each of the video frame periods, Video data of the same data amount for each video frame period;
Then, the allocated audio data is multiplexed into a predetermined transmission packet to generate a transport stream.

【0016】好適には、非圧縮映像データを圧縮して、
前記目標データ量に適合するデータレートの前記映像デ
ータを生成する。
Preferably, the uncompressed video data is compressed,
The video data having a data rate matching the target data amount is generated.

【0017】好適には、所定数の前記映像フレーム周期
の間に多重化する前記音声データの目標データ量を算出
し、当該映像フレーム周期の過去、前記所定数の前記映
像フレーム周期の間に多重化した前記音声データのデー
タ量を計数し、算出した前記音声データの目標データ
量、および、計数した前記音声データのデータ量とに基
づいて、当該映像フレーム周期に配分する前記音声デー
タのデータ量を算出する。
Preferably, a target data amount of the audio data to be multiplexed during a predetermined number of video frame periods is calculated, and the target data amount is multiplexed during the predetermined number of video frame periods in the past of the video frame period. The data amount of the audio data to be distributed to the video frame period based on the target data amount of the audio data calculated by counting the data amount of the converted audio data, and the calculated data amount of the audio data. Is calculated.

【0018】好適には、前記音声データおよび前記映像
データに付加する付加データを生成し、生成した付加デ
ータを、さらに前記所定のトランスポートストリームに
多重化する。
Preferably, additional data to be added to the audio data and the video data is generated, and the generated additional data is further multiplexed into the predetermined transport stream.

【0019】[0019]

【発明の実施の形態】第1実施例 以下、本発明の第1の実施例を説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment Hereinafter, a first embodiment of the present invention will be described.

【0020】データ多重化装置1の構成 図1は、第1の実施例として示す本発明に係るデータ多
重化装置1の構成を示す図である。図1に示すように、
データ多重化装置1は、ビデオエンコーダ(video encod
er) 20、オーディオエンコーダ(audio encoder) 24
およサブタイトルエンコーダ(subtitle encoder)28お
よび多重化装置(multiplexer) 10から構成され、多重
化装置10は、バッファメモリ(buffer)100およびト
ランスポートストリーム生成装置(transport stream ma
ker)102から構成される。
The diagram 1 of a data multiplexing apparatus 1 is a diagram showing a configuration of a data multiplexing apparatus 1 according to the present invention shown as a first embodiment. As shown in FIG.
The data multiplexing device 1 includes a video encoder (video encoder).
er) 20, audio encoder (audio encoder) 24
And a subtitle encoder 28 and a multiplexer 10. The multiplexer 10 includes a buffer memory 100 and a transport stream generator.
ker) 102.

【0021】データ多重化装置1は、これらの構成部分
により、ビデオエンコーダ20、オーディオエンコーダ
24およびサブタイトルエンコーダ28それぞれにより
エンコードされた映画あるいは音楽プロモーション用の
ビデオストリーム(video stream)、オーディオストリー
ム(audio stream)およびサブタイトルストリーム(subti
tle stream) を1つに多重化してトランスポートストリ
ーム(transport stream)を生成する。
With these components, the data multiplexing apparatus 1 uses the video encoder 20, the audio encoder 24, and the subtitle encoder 28 to encode a movie or music promotion video stream and audio stream, respectively. ) And subtitle stream (subti
tle stream) to generate a transport stream.

【0022】ビデオエンコーダ20 ビデオエンコーダ20は、編集装置等の外部機器(図示
せず)から入力される映像データを、例えばMPEG2
方式等により圧縮符号化し、比較的長い一定時間ごとに
ほぼ等しいデータ量のビデオストリームを生成する固定
レート符号化を行い、多重化装置10のバッファメモリ
100に対して出力する。従って、ビデオエンコーダ2
0が生成するビデオストリームの映像フレームごとのデ
ータレートは平均してほぼ一定である。
Video Encoder 20 The video encoder 20 converts video data input from an external device (not shown) such as an editing device into MPEG2
The data is compressed and encoded by a system or the like, and fixed-rate encoding is performed to generate a video stream having substantially the same data amount at a relatively long fixed time interval, and output to the buffer memory 100 of the multiplexer 10. Therefore, video encoder 2
0, the data rate of each video frame of the video stream generated on average is almost constant.

【0023】オーディオエンコーダ24 オーディオエンコーダ24は、外部機器から入力される
音声データを、例えばMPEG2方式等により圧縮符号
化し、音声フレーム〔24ms,26.1ms,36m
s=音声データのサンプリング周期(1152/48k
Hz,1152/44.1kHz,1152/32kH
z)〕ごとに等しいデータ量のオーディオストリームを
生成し、多重化装置10のバッファメモリ100に対し
て出力する。
Audio Encoder 24 The audio encoder 24 compresses and encodes audio data input from an external device by, for example, the MPEG2 method or the like, and generates audio frames [24 ms, 26.1 ms, 36 m
s = sampling period of audio data (1152 / 48k)
Hz, 1152 / 44.1 kHz, 1152/32 kHz
z)], an audio stream having the same data amount is generated and output to the buffer memory 100 of the multiplexing device 10.

【0024】サブタイトルエンコーダ28 サブタイトルエンコーダ28は、サブタイトルデータを
生成する外部機器から入力されるサブタイトルデータ
を、線形量子化処理および固定長符号化処理によりエン
コードし、サブタイトルストリームとして多重化装置1
0のバッファメモリ100に対して出力する。
Subtitle encoder 28 The subtitle encoder 28 encodes subtitle data input from an external device for generating subtitle data by linear quantization processing and fixed-length encoding processing, and outputs the encoded data as a subtitle stream to the multiplexer 1.
0 is output to the buffer memory 100.

【0025】バッファメモリ100 多重化装置10のバッファメモリ100は、ビデオエン
コーダ20、オーディオエンコーダ24およびサブタイ
トルエンコーダ28からそれぞれ入力されるビデオスト
リーム、オーディオストリームおよびサブタイトルスト
リームをバッファリングしてトランスポートストリーム
生成装置102に対して出力する。トランスポートスト
リーム生成装置102は、例えば、マイクロプロセッサ
(CPU)等を用いた高速コンピュータから構成され、
バッファメモリ100にバッファリングされたビデオス
トリーム、オーディオストリームおよびサブタイトルス
トリーム(それぞれをエレメンタリストリームとも記
す)を所定のタイミングで読み出してスケジューリング
を行い、トランスポートストリームの伝送フォーマット
に合わせてヘッダ等を付加してトランスポートストリー
ムを生成し、出力する。
Buffer Memory 100 The buffer memory 100 of the multiplexer 10 buffers the video stream, audio stream, and subtitle stream input from the video encoder 20, the audio encoder 24, and the subtitle encoder 28, respectively. Output to 102. The transport stream generation device 102 is constituted by, for example, a high-speed computer using a microprocessor (CPU) and the like.
The video stream, the audio stream, and the subtitle stream (each also referred to as an elementary stream) buffered in the buffer memory 100 are read out at a predetermined timing to perform scheduling, and a header or the like is added according to the transport stream transmission format. To generate and output a transport stream.

【0026】第1の実施例として示したデータ多重化装
置1によれば、映画等の音声データ、映像データおよび
サブタイトルデータをMPEG方式等により圧縮符号化
し、圧縮符号化したこれらのデータを多重化して1つの
トランスポートストリームを生成し、出力することがで
きる。
According to the data multiplexing apparatus 1 shown as the first embodiment, audio data such as a movie, video data and subtitle data are compression-encoded by the MPEG system or the like, and these compression-encoded data are multiplexed. To generate and output one transport stream.

【0027】第2実施例 以下、本発明の第2の実施例を説明する。 Second Embodiment Hereinafter, a second embodiment of the present invention will be described.

【0028】第1の実施例として示したデータ多重化装
置1は、バッファメモリ100が全てのエレメンタリス
トリームをバッファメモリ100に一度、蓄積し、さら
に、トランスポートストリーム生成装置102のCPU
がスケジューリングおよびヘッダ(header)の付加等の処
理を行ってトランスポートストリームを生成する。この
ように、処理を行うCPUが直接、CPUがエレメンタ
リストリームの各ワード(バイト)に対してデータバス
を介してアクセスして処理を行うことによりトランスポ
ートストリームを生成する方法は、トランスポートスト
リーム生成装置102のデータバスに生じるバスネック
等が原因となって高速処理ができず、高速なトランスポ
ートストリームの生成に適用しえない。
In the data multiplexing apparatus 1 shown as the first embodiment, the buffer memory 100 stores all the elementary streams once in the buffer memory 100, and furthermore, the CPU of the transport stream generating apparatus 102
Performs processing such as scheduling and addition of a header to generate a transport stream. As described above, the method of generating a transport stream by directly processing the words (bytes) of the elementary stream via the data bus by the CPU performing the processing is performed by the transport stream. High-speed processing cannot be performed due to a bus neck or the like occurring in the data bus of the generation device 102, and the method cannot be applied to generation of a high-speed transport stream.

【0029】第2の実施例として示す本発明に係るデー
タ多重化装置2は、かかるデータ多重化装置1の問題点
を解決するための装置であり、エレメンタリストリーム
多重化のスケジューリングを行う制御系と、直接にエレ
メンタリストリームを多重化する多重化系とを分離する
ことにより高速なトランスポートストリームの生成を可
能としている。
A data multiplexing apparatus 2 according to the present invention shown as a second embodiment is an apparatus for solving the problem of the data multiplexing apparatus 1, and is a control system for scheduling elementary stream multiplexing. And a multiplexing system that directly multiplexes elementary streams, thereby enabling high-speed generation of a transport stream.

【0030】図2は、本発明に係るデータ多重化装置2
の構成を示す図である。図3は、図2に示したビデオエ
ンコーダ20の構成を示す図である。図4は、図2に示
したオーディオエンコーダ24の構成を示す図である。
FIG. 2 shows a data multiplexer 2 according to the present invention.
FIG. 3 is a diagram showing the configuration of FIG. FIG. 3 is a diagram showing a configuration of the video encoder 20 shown in FIG. FIG. 4 is a diagram showing a configuration of the audio encoder 24 shown in FIG.

【0031】データ多重化装置2の構成 図2に示すように、データ多重化装置2は、ビデオエン
コーダ20、オーディオエンコーダ24、サブタイトル
エンコーダ28、多重化系12および制御系42から構
成される。
As shown in diagram 2 of the data multiplexer 2, the data multiplexer 2 is composed of a video encoder 20, audio encoder 24, the subtitle encoder 28, a multiplexing system 12 and control system 42.

【0032】多重化系12は、入力用のFIFOメモリ
32a,32b,32c、第1のスイッチ回路(swich)
34、第2のスイッチ回路36、出力用のFIFOメモ
リ38およひSCSI(small computer system interfa
ce) インターフェース回路(SCSIIF回路)40か
ら構成される。制御系42は、データサイズ計数用イン
ターフェース回路(データサイズIF)30a,30
b,30c、RAM430、イーサネットインターフェ
ース回路(ether-net interface;ENIF回路)42
0、シリアルインターフェース回路(serial interfac
e; SIF回路)422、CPU424、処理用RAM
426および制御データ用RAM428がCPUバスを
介して相互に接続された構成を採る。
The multiplexing system 12 includes FIFO memories 32a, 32b, 32c for input, and a first switch circuit (switch).
34, a second switch circuit 36, a FIFO memory 38 for output, and a SCSI (small computer system interface).
ce) An interface circuit (SCSIIF circuit) 40 is provided. The control system 42 includes a data size counting interface circuit (data size IF) 30a, 30
b, 30c, RAM 430, Ethernet interface circuit (ether-net interface; ENIF circuit) 42
0, serial interface circuit (serial interfac
e; SIF circuit) 422, CPU 424, processing RAM
426 and a control data RAM 428 are connected to each other via a CPU bus.

【0033】ビデオエンコーダ20 ビデオエンコーダ20は、図3に示すように、加算回路
202、DCT回路204、量子化回路(quantize)20
6、逆量子化回路(I quantize)208、逆DCT回路(I
DCT) 210、加算回路212、フレームメモリ回路2
16、可変長符号化回路(VLC回路)218、ビット
レート制御回路(bit rate control)220、可変長符号
バッファ(VLCバッファ)222から構成される。
[0033] Video encoder 20 video encoder 20, as shown in FIG. 3, the addition circuit 202, DCT circuit 204, quantization circuit (The quantize) 20
6. Inverse quantization circuit (I quantize) 208, inverse DCT circuit (I
DCT) 210, addition circuit 212, frame memory circuit 2
16, a variable length coding circuit (VLC circuit) 218, a bit rate control circuit (bit rate control) 220, and a variable length code buffer (VLC buffer) 222.

【0034】CPU424は、ビットレート制御回路2
20に対して目標データ量video_rate_ta
rgetを設定する。ビットレート制御回路220は、
可変長符号化回路218が実際に生成したビデオストリ
ーム(MPEG Video stream) のデータ量に基づいて、圧縮
符号化後のデータ量が、設定された目標データ量vid
eo_rate_targetと等しくなるように量子
化回路206を制御する。
The CPU 424 controls the bit rate control circuit 2
Target data amount video_rate_ta for 20
Set rget. The bit rate control circuit 220
Based on the data amount of the video stream (MPEG Video stream) actually generated by the variable length coding circuit 218, the data amount after the compression encoding is set to the set target data amount vid.
The quantization circuit 206 is controlled so as to be equal to eo_rate_target.

【0035】CPU424の目標データ量video_
rate_targetの設定およびビットレート制御
回路220の制御により、データ多重化装置2の各構成
部分は、外部機器から入力される映像データVideoIN を
MPEG2方式により圧縮符号化し、目標データ量vi
deo_rate_targetとほぼ等しいデータ量
のビデオストリームを生成し、データ多重化装置2のデ
ータサイズIF30aおよびFIFOメモリ32aに対
して出力する。
The target data amount video_ of the CPU 424
By setting the rate_target and controlling the bit rate control circuit 220, each component of the data multiplexing apparatus 2 compresses and encodes the video data VideoIN input from the external device according to the MPEG2 system, and sets the target data amount vi.
A video stream having a data amount substantially equal to “deo_rate_target” is generated and output to the data size IF 30 a and the FIFO memory 32 a of the data multiplexing device 2.

【0036】オーディオエンコーダ24 オーディオエンコーダ24は、図4に示すように、サブ
バンド分析フィルタバンク(SAFB)240、線形量
子化回路242、ビット圧縮回路244、FFT(fast
fourier transfer) 回路246、心理聴覚モデル24
8、動的ビット割り当て回路250、スケールファクタ
選択情報記憶回路252、スケールファクタ抽出回路2
54、サイド情報符号化回路256およびビットストリ
ーム生成回路258から構成され、外部機器から入力さ
れた音声データ(Audio入力)を、MPEG2方式
により圧縮符号化し、オーディオストリーム(MPEG Audi
o stream) を生成し、データ多重化装置2のデータサイ
ズIF30bおよびFIFOメモリ32bに対して出力
する。
The audio encoder 24 audio encoder 24, as shown in FIG. 4, sub-band analysis filter bank (SAFB) 240, linear quantization circuit 242, a bit compression circuit 244, FFT (fast
fourier transfer) circuit 246, psychological auditory model 24
8, dynamic bit allocation circuit 250, scale factor selection information storage circuit 252, scale factor extraction circuit 2
54, a side information encoding circuit 256 and a bit stream generating circuit 258. The audio data (Audio input) input from an external device is compression-encoded by the MPEG2 system, and the audio stream (MPEG Audi
o stream) is generated and output to the data size IF 30b and the FIFO memory 32b of the data multiplexer 2.

【0037】サブタイトルエンコーダ28 サブタイトルエンコーダ28は、第1の実施例において
と同様に、外部機器から入力されるサブタイトルデータ
等のプライベートデータをエンコードする。なお、サブ
タイトルエンコーダ28は、エンコード済みサブタイト
ルデータを外部機器から直接、受け取ってもよく、例え
ば、ENIF回路420がイーサネットワーク等のLA
Nを介して、または、SIF422がシリアルラインを
介してエンコード済みサブタイトルデータを受け取り、
CPUバスを介してRAM430に対して出力する。エ
ンコード済みサブタイトルデータは、エンコード済みの
ビデオデータあるいはエンコード済みのオーディオデー
タに比べ、データ量が極端に少なく、CPUバスを介し
て伝送しても、CPUバスのデータトラフィックに影響
を与えないので、問題が生じることはない。
Subtitle encoder 28 The subtitle encoder 28 encodes private data such as subtitle data input from an external device, as in the first embodiment. The subtitle encoder 28 may directly receive the encoded subtitle data from an external device. For example, the ENIF circuit 420
N or the SIF 422 receives the encoded subtitle data via a serial line,
Output to the RAM 430 via the CPU bus. The encoded subtitle data has a problem in that the data amount is extremely small compared to the encoded video data or the encoded audio data, and even if transmitted via the CPU bus, it does not affect the data traffic of the CPU bus. Does not occur.

【0038】この場合、エンコード済みのサブタイトル
データに付されているヘッダに書かれたヘッダサイズを
ENIF回路420またはSIF422が検出し、検出
したヘッダサイズをCPUバスを介してCPU424に
対して出力する。また、RAM430は、CPU424
の制御に従って、入力されたエンコード済みのサブコー
ドデータをスイッチ回路34の入力端子bに対して出力
する。
In this case, the ENIF circuit 420 or the SIF 422 detects the header size written in the header attached to the encoded subtitle data, and outputs the detected header size to the CPU 424 via the CPU bus. In addition, the RAM 430 includes a CPU 424
According to the control of (1), the input encoded subcode data is output to the input terminal b of the switch circuit 34.

【0039】FIFOメモリ32a,32b,32c 多重化系12(図1)において、FIFOメモリ32
a,32b,32cはそれぞれ、ビデオエンコーダ2
0、オーディオエンコーダ24およびサブタイトルエン
コーダ28からそれぞれ入力されるビデオストリーム、
オーディオストリームおよびサブタイトルストリームを
バッファリングし、スイッチ回路34の入力端子a,
b,cに対して出力する。
In the multiplexing system 12 (FIG. 1) of the FIFO memories 32a, 32b, 32c ,
a, 32b, and 32c are video encoders 2 respectively.
0, video streams input from the audio encoder 24 and the subtitle encoder 28, respectively.
The audio stream and the subtitle stream are buffered, and the input terminals a,
Output for b and c.

【0040】スイッチ回路34 スイッチ回路34は、制御信号(control) を介した多重
化系12の制御に従って、入力端子a,b,c,dのい
ずれかを選択し、これらの入力端子それぞれに入力され
るエレメンタリストリームのいずれかを選択して多重化
し、スイッチ回路36の入力端子bに対して出力する。
なお、スイッチ回路34は、入力端子のいずれにも入力
されるエレメンタリストリームがない場合、あるいは、
スタッフィング処理を行う場合等は、入力端子a,b,
c,dのいずれをも選択せず、所定のブランクデータ
(連続した論理値1または0)を出力する。
Switch circuit 34 The switch circuit 34 selects one of the input terminals a, b, c, and d in accordance with the control of the multiplexing system 12 via a control signal (control), and inputs the input terminal to each of these input terminals. The selected elementary stream is selected and multiplexed, and is output to the input terminal b of the switch circuit 36.
The switch circuit 34 is provided when there is no elementary stream input to any of the input terminals, or
When the stuffing process is performed, the input terminals a, b,
Predetermined blank data (continuous logical value 1 or 0) is output without selecting either c or d.

【0041】スイッチ回路36 スイッチ回路36は、制御信号(control) を介した多重
化系12の制御に従って、入力端子a,bのいずれかを
選択し、入力端子bにスイッチ回路34から入力される
エレメンタリストリームのいずれか、または、入力端子
aに処理用RAM426から入力されるプライベートデ
ータストリーム(ヘッダデータ)を選択して多重化し、
FIFOメモリ38およびSCSIIF回路40に対し
て出力する。
Switch circuit 36 The switch circuit 36 selects one of the input terminals a and b according to the control of the multiplexing system 12 through a control signal (control), and is input to the input terminal b from the switch circuit 34. Selecting and multiplexing one of the elementary streams or a private data stream (header data) input from the processing RAM 426 to the input terminal a,
Output to the FIFO memory 38 and the SCSIIF circuit 40.

【0042】FIFOメモリ38 FIFOメモリ38は、スイッチ回路36が多重化した
データストリームをバッファリングし、トランスポート
ストリームとして通信回線等の外部機器(図示せず)に
対して出力する。
The FIFO memory 38 buffers the data stream multiplexed by the switch circuit 36 and outputs it as a transport stream to an external device (not shown) such as a communication line.

【0043】SCSIIF回路40 SCSIIF回路40は、スイッチ回路36が多重化し
たデータストリームを、ハードディスク装置(HDD) ある
いは光磁気ディスク装置(MOD) の記録装置等(図示せ
ず)に対して出力し、記録させる。
SCSIIF circuit 40 The SCSIIF circuit 40 outputs the data stream multiplexed by the switch circuit 36 to a recording device (not shown) of a hard disk device (HDD) or a magneto-optical disk device (MOD), Record.

【0044】データ量IF30a,30b,30c 制御系42において、データサイズIF30a,30
b,30cはそれぞれ、ビデオエンコーダ20、オーデ
ィオエンコーダ24およびサブタイトルエンコーダ28
から入力されるビデオストリーム、オーディオストリー
ムおよびサブタイトルストリームのフレームごとのデー
タサイズ(size)を計数し、CPUバスを介してCPU4
24に対して出力する。
In the control system 42, the data size IFs 30a, 30b, 30c
b and 30c are a video encoder 20, an audio encoder 24 and a subtitle encoder 28, respectively.
The data size (size) of each frame of the video stream, the audio stream and the subtitle stream input from the
24.

【0045】なお、データサイズの計数は、データサイ
ズIF30a,30b,30cに内蔵されたカウンタに
より行われる。また、データサイズの計数は、ビデオエ
ンコーダ20、オーディオエンコーダ24およびサブタ
イトルエンコーダ28が出力する各エレメンタリースト
リームのフレームごとのデータサイズを、データサイズ
IF30a,30b,30cが検出することによっても
可能である。
The counting of the data size is performed by a counter built in the data size IF 30a, 30b, 30c. Further, the data size can be counted by detecting the data size of each frame of each elementary stream output by the video encoder 20, the audio encoder 24, and the subtitle encoder 28 by the data size IFs 30a, 30b, 30c. .

【0046】ENIF回路420 ENIF回路420は、イーサネット等のLAN(図示
せず)を介して入力されてくるプライベートデータ(pri
vate data)を受け入れ、CPUバスを介してCPU42
4に対して出力する。
ENIF circuit 420 The ENIF circuit 420 has a private data (priority) input via a LAN (not shown) such as Ethernet.
vate data) and the CPU 42 via the CPU bus.
4 is output.

【0047】SIF回路422 SIF回路422は、例えばコンピュータから入力され
るシリアル形式のプライベートデータを受け入れ、CP
U424に対して出力する。なお、プライベートデータ
の例として、上述したサブタイトルデータ、クローズド
キャプションデータおよびユーザーデータを挙げること
ができる。
SIF circuit 422 The SIF circuit 422 receives serial private data input from, for example, a computer, and
Output to U424. Note that examples of the private data include the above-described subtitle data, closed caption data, and user data.

【0048】CPU424 CPU424は、例えば、マイクロプロセッサおよびプ
ログラム格納用のROMおよびこれらの周辺回路から構
成され、データサイズIF30a,30b,30c、E
NIF回路420およびSIF回路422から入力され
るデータサイズを処理用RAM426に記憶し、FIF
Oメモリ32a,32b,32c等の残り記憶容量(バ
ッファ残量)および処理用RAM426に記憶したデー
タサイズに基づいて、エレメンタリストリームの多重化
の順番、多重化のタイミング調整およびスケジューリン
グ等の多重化方法の計画を行い、計画した多重化方法に
従ってスイッチ回路34,36の多重化動作をCPUバ
スを介して制御する。
CPU 424 The CPU 424 includes, for example, a microprocessor, a ROM for storing programs, and peripheral circuits thereof, and has a data size IF 30 a, 30 b, 30 c, or E.
The data size input from the NIF circuit 420 and the SIF circuit 422 is stored in the processing RAM 426, and the
Based on the remaining storage capacity (remaining buffer capacity) of the O memories 32a, 32b, 32c and the like and the data size stored in the processing RAM 426, the multiplexing order of the elementary streams, multiplexing timing adjustment and scheduling, etc. The method is planned, and the multiplexing operation of the switch circuits 34 and 36 is controlled via the CPU bus according to the planned multiplexing method.

【0049】また、制御データ用RAM428は、CP
U424の処理にかかわる制御用のデータを記憶してお
り、CPU424は、制御データ用RAM428に記憶
された制御データを用いたスケジューリングに従って、
ヘッダデータを処理用RAM426上に作成し、スイッ
チ回路36の入力端子aに対して出力する。
The control data RAM 428 is
The CPU 424 stores control data related to the processing of U424, and according to the scheduling using the control data stored in the control data RAM 428,
The header data is created on the processing RAM 426 and output to the input terminal a of the switch circuit 36.

【0050】また、ヘッダデータの一部は、ENIF回
路240またはSIF回路422を介して入力され、R
AM426に記憶されたプライベートデータ(ユーザー
データ)に基づいて作成される場合もある。
A part of the header data is input via ENIF circuit 240 or SIF circuit 422,
It may be created based on private data (user data) stored in the AM 426.

【0051】データ多重化装置2の動作 以下、第2実施例におけるデータ多重化装置2の動作を
説明する。ビデオエンコーダ20、オーディオエンコー
ダ24およびサブタイトルエンコーダ28はそれぞれ、
入力される映像データ、音声データおよびサブタイトル
データをエンコードする。データサイズIF30a,3
0b,30cはそれぞれ、ビデオストリーム、オーディ
オストリームおよびサブタイトルストリームのデータサ
イズを計数し、CPU424に対して出力する。
The operation of the data multiplexing device 2 in the second embodiment will be described below. Video encoder 20, audio encoder 24 and subtitle encoder 28 each
The input video data, audio data, and subtitle data are encoded. Data size IF 30a, 3
0b and 30c respectively count the data sizes of the video stream, the audio stream and the subtitle stream, and output them to the CPU 424.

【0052】なお、サブタイトルエンコーダ28ではな
く、ENIF回路420がイーサネット等のLANを介
して、または、SIF回路422がシリアルラインを介
してエンコード済みのサブタイトルデータを受け取る場
合には、ENIF回路420またはSIF回路422が
データサイズを検出し、CPUバスを介してCPU42
4に対して出力する。また、RAM430は、CPU4
24の制御に従って、入力されたエンコード済みサブコ
ードデータを、スイッチ回路34の入力端子dに対して
出力する。
When the ENIF circuit 420 receives the encoded subtitle data via a LAN such as Ethernet or the like, or the SIF circuit 422 receives the encoded subtitle data via a serial line instead of the subtitle encoder 28, the ENIF circuit 420 or the SIF The circuit 422 detects the data size and sends the data to the CPU 42 via the CPU bus.
4 is output. Further, the RAM 430 stores the CPU 4
Under the control of 24, the input encoded subcode data is output to the input terminal d of the switch circuit 34.

【0053】図5は、図2に示したデータ多重化装置2
のCPU424の第2の実施例における処理を示すフロ
ーチャートである。なお、図5に示した処理は、ビデオ
フレームごとに実行される。
FIG. 5 shows the data multiplexer 2 shown in FIG.
13 is a flowchart showing processing of the CPU 424 in the second embodiment. The processing shown in FIG. 5 is executed for each video frame.

【0054】図5に示すように、ステップ102(S1
02)において、CPU424は、データサイズIF3
0aからビデオストリームのフレームごとのデータサイ
ズを受信すると、処理用RAM426に受信したデータ
サイズを格納する。また、CPU424は、データサイ
ズIF30b,30c、ENIF回路420またはSI
F回路422から入力されるデータサイズを受け取り次
第、処理用RAM426に記憶する。
As shown in FIG. 5, step 102 (S1
02), the CPU 424 determines that the data size IF3
When the data size of each frame of the video stream is received from 0a, the received data size is stored in the processing RAM 426. Further, the CPU 424 controls the data size IF 30b, 30c, the ENIF circuit 420 or the SI
Upon receiving the data size input from the F circuit 422, the data size is stored in the processing RAM 426.

【0055】ステップ103(S103)において、C
PU424は、変数nを初期化する。
In step 103 (S103), C
The PU 424 initializes a variable n.

【0056】ステップ104(S104)において、C
PU424は、上述した多重化方法の計画を行う。
In step 104 (S104), C
The PU 424 plans the multiplexing method described above.

【0057】さらに、CPU424は、この処理におけ
るループの回数Nを決定する。ループ回数Nは1ビデオ
フレーム期間に挿入されるパケット数を示し、ループ回
数Nの値は、例えば、パケットサイズが188Byte
固定であることから、トランスポートストリームのデー
タレートに依存する。つまり、ループ回数Nは、以下の
式〔N={トランスポートストリームのデータレート
(Byte)}÷30÷188(Byte);NTSC
方式の場合, N={トランスポートストリームのデー
タレート(Byte)}÷25÷188(Byte);
PAL方式の場合〕から算出され、CPU424は、ル
ープ回数Nと、受け取った各データサイズとに基づい
て、多重化のスケジューリングを行う。
Further, the CPU 424 determines the number N of loops in this processing. The number of loops N indicates the number of packets inserted in one video frame period, and the value of the number of loops N is, for example, a packet size of 188 bytes.
Since it is fixed, it depends on the data rate of the transport stream. That is, the number of loops N is calculated by the following formula [N = {data rate of transport stream (Byte)} 30} ÷ 188 (Byte); NTSC
In the case of the system, N = {Transport stream data rate (Byte)} 25} 188 (Byte);
In the case of the PAL system], the CPU 424 performs multiplexing scheduling based on the number of loops N and the received data size.

【0058】ステップ106(S106)において、C
PU424は、計画した多重化方法が、ビデオストリー
ムを出力することを示すか否かを判断する。多重化方法
が、ビデオストリームを出力することを示す場合には、
CPU424はS107の処理に進み、ビデオストリー
ムを出力することを示さない場合には、S110の処理
に進む。
In step 106 (S106), C
PU 424 determines whether the planned multiplexing method indicates to output a video stream. If the multiplexing method indicates to output a video stream,
The CPU 424 proceeds to the process of S107, and if it does not indicate to output the video stream, proceeds to the process of S110.

【0059】ステップ107(S107)において、C
PU424は、スイッチ回路36を制御して、RAM4
26から入力されるビデオ用のヘッダデータ(a)を選
択させ、出力させる。
In step 107 (S107), C
The PU 424 controls the switch circuit 36 so that the RAM 4
The video header data (a) input from the input terminal 26 is selected and output.

【0060】ステップ108(S108)において、C
PU424は、スイッチ回路34を制御してビデオスト
リームを選択させ、スイッチ回路36を制御してスイッ
チ回路34からのデータストリームを選択させてビデオ
ストリームをトランスポートストリームに多重化させ
る。
In step 108 (S108), C
The PU 424 controls the switch circuit 34 to select a video stream, controls the switch circuit 36 to select a data stream from the switch circuit 34, and multiplexes the video stream into a transport stream.

【0061】ステップ110(S110)において、C
PU424は、計画した多重化方法が、音声ストリーム
を出力することを示すか否かを判断する。多重化方法
が、音声ストリームを出力することを示す場合には、C
PU424はS111の処理に進み、音声ストリームを
出力することを示さない場合には、S114の処理に進
む。
In step 110 (S110), C
PU 424 determines whether the planned multiplexing method indicates to output an audio stream. If the multiplexing method indicates to output an audio stream, C
The PU 424 proceeds to the process of S111. If it is not indicated to output the audio stream, the PU 424 proceeds to the process of S114.

【0062】ステップ111(S111)において、C
PU424は、スイッチ回路36を制御して、RAM4
26から入力されるオーディオ用のヘッダデータ(a)
を選択させ、出力させる。
In step 111 (S111), C
The PU 424 controls the switch circuit 36 so that the RAM 4
Header data (a) for audio input from
And output.

【0063】ステップ112(S112)において、C
PU424は、スイッチ回路34を制御してオーディオ
ストリームを選択させ、スイッチ回路36を制御してス
イッチ回路34からのデータストリームを選択させてオ
ーディオストリームをトランスポートストリームに多重
化させる。
In step 112 (S112), C
The PU 424 controls the switch circuit 34 to select an audio stream, controls the switch circuit 36 to select a data stream from the switch circuit 34, and multiplexes the audio stream with the transport stream.

【0064】ステップ114(S114)において、C
PU424は、計画した多重化方法が、サブタイトルエ
ンコーダからのサブタイトルストリームを出力すること
を示すか否かを判断する。CPU424は、多重化方法
がサブタイトルストリームを出力することを示す場合に
はS115の処理に進み、多重化方法がサブタイトルス
トリームを出力することを示さない場合にはS118の
処理に進む。ステップ115(S115)において、C
PU424は、スイッチ回路36を制御して、RAM4
26から入力されるサブタイトル用のヘッダデータ
(a)を選択させ、出力させる。
In step 114 (S114), C
PU 424 determines whether the planned multiplexing method indicates to output a subtitle stream from the subtitle encoder. If the multiplexing method indicates that the subtitle stream is to be output, the CPU 424 proceeds to the process of S115. If the multiplexing method does not indicate that the subtitle stream is to be output, the process proceeds to S118. In step 115 (S115), C
The PU 424 controls the switch circuit 36 so that the RAM 4
26 to select and output the subtitle header data (a) inputted from the subtitle 26.

【0065】ステップ116(S116)において、C
PU424は、スイッチ回路34を制御してサブタイト
ルストリームを選択させ、スイッチ回路36を制御して
スイッチ回路34からのデータストリームを選択させて
サブタイトルストリームをトランスポートストリームに
多重化させる。ステップ118(S118)において、
CPU424は、計画した多重化方法がヘッダデータを
付加することを示すか否かを判断する。CPU424
は、多重化方法がヘッダデータを出力することを示す場
合にはS119の処理に進み、ヘッダデータを出力する
ことを示さない場合にはS122の処理に進む。
In step 116 (S116), C
The PU 424 controls the switch circuit 34 to select a subtitle stream, controls the switch circuit 36 to select a data stream from the switch circuit 34, and multiplexes the subtitle stream into a transport stream. In step 118 (S118),
The CPU 424 determines whether or not the planned multiplexing method indicates that header data is added. CPU 424
If the multiplexing method indicates that the header data is to be output, the process proceeds to S119. If the multiplexing method does not indicate that the header data is to be output, the process proceeds to S122.

【0066】ステップ119(S119)において、C
PU424は、スイッチ回路36を制御してプライベー
トデータストリームを選択させてプライベートデータス
トリーム(ヘッダデータ)をトランスポートストリーム
に多重化させる。ステップ120(S120)におい
て、CPU424は、スイッチ回路34,36およびR
AM430を制御して、RAM430からのプライベー
トデータを出力させて、トランスポートストリームに多
重化させる。
In step 119 (S119), C
The PU 424 controls the switch circuit 36 to select a private data stream and multiplex the private data stream (header data) with the transport stream. In step 120 (S120), the CPU 424 sets the switch circuits 34 and 36 and R
By controlling the AM 430, the private data from the RAM 430 is output and multiplexed to the transport stream.

【0067】ステップ122(S122)において、C
PU424は、変数n=Nであるか否かを判断する。変
数n=Nの場合には処理を終了し、n≠Nの場合にはS
106の処理に進む。FIFOメモリ38は、FIFO
メモリ38から出力されるトランスポートストリームを
バッファリングして、通信回線等に対して送出する。S
CSIIF回路40は、FIFOメモリ38から出力さ
れるトランスポートストリームをハードディスク装置等
に対して送出し、記録させる。
In step 122 (S122), C
The PU 424 determines whether or not the variable n = N. If the variable n = N, the process is terminated; if n ≠ N, S
Proceed to 106. The FIFO memory 38 has a FIFO
The transport stream output from the memory 38 is buffered and transmitted to a communication line or the like. S
The CSIIF circuit 40 sends the transport stream output from the FIFO memory 38 to a hard disk device or the like and records it.

【0068】以上説明したように、本発明に係るデータ
多重化装置2においては、CPU424のソフトウェア
処理により、トランスポートストリームを生成するたび
に多重化方法を計画するので、例えば、エレメンタリス
トリームをハードウェアによりトランスポートストリー
ムに多重化する場合に比べて、付加するプライベートデ
ータストリーム(ヘッダデータ)の種類および数を任意
に変更可能であるという特徴がある。従って、プライベ
ートデータストリームの種類および数の変更が容易であ
る。
As described above, in the data multiplexing apparatus 2 according to the present invention, a multiplexing method is planned each time a transport stream is generated by software processing of the CPU 424. The feature is that the type and number of private data streams (header data) to be added can be arbitrarily changed, as compared with the case where multiplexing is performed on a transport stream by hardware. Therefore, it is easy to change the type and number of private data streams.

【0069】なお、データ多重化装置2に対しては、ト
ランスポートストリームに多重化するエレメンタリスト
リームの数を増減する、あるいは、ENIF回路420
およびSIF回路422の数を増減する変更を加えるこ
とが可能である。また、第2の実施例として示した他
に、サブタイトルストリームの代わりに、例えば、編集
処理および放送時の処理に係るデータストリームをトラ
ンスポートストリームに多重化する等、データ多重化装
置2は、種々の構成を採ることができる。
For the data multiplexing device 2, the number of elementary streams to be multiplexed into the transport stream is increased or decreased, or the ENIF circuit 420
It is possible to make a change to increase or decrease the number of SIF circuits 422. Further, in addition to the data shown in the second embodiment, the data multiplexing apparatus 2 may perform various processes such as multiplexing a data stream related to an editing process and a process at the time of broadcasting into a transport stream instead of a subtitle stream. Can be adopted.

【0070】第3実施例 以下、本発明の第3の実施例を説明する。 Third Embodiment Hereinafter, a third embodiment of the present invention will be described.

【0071】第2の実施例として示したデータ多重化装
置2(図2)においては、データ量が非常に多いエレメ
ンタリストリームをCPUバス上で伝送することがない
ので、CPUバス上でバスネックが生じて高速なエレメ
ンタリストリームのトランスポートストリームに対する
多重化が妨げられることがないので、データ多重化装置
2は、高速なトランスポートストリームを生成するため
に好適である。
In the data multiplexing device 2 (FIG. 2) shown as the second embodiment, since an elementary stream having a very large data amount is not transmitted on the CPU bus, a bus neck on the CPU bus is not transmitted. The data multiplexing apparatus 2 is suitable for generating a high-speed transport stream, since the multiplexing of the high-speed elementary stream to the transport stream is not hindered by the occurrence of.

【0072】しかしながら、第2の実施例におけるデー
タ多重化装置2は、データ量IF30a,30b,30
c等が計数した各エレメンタリーストリームのデータ量
およびFIFOメモリ32a,32b,32cの残り記
憶容量(バッファ残量)に基づいて、CPU424がス
イッチ回路34の接続を切り換えて多重化を行う。従っ
て、ビデオエンコーダ20、オーディオエンコーダ24
およびサブタイトルエンコーダ28が、FIFOメモリ
32a,32b,32cそれぞれに、間欠的にデータを
書き込むか、あるいは、連続的にデータを書き込むかに
よってFIFOメモリ32a,32b,32cの残り記
憶容量(バッファ残量)に変動が生じる。
However, the data multiplexing device 2 in the second embodiment has a data amount IF 30a, 30b, 30
Based on the data amount of each elementary stream counted by c and the like and the remaining storage capacity (remaining buffer capacity) of the FIFO memories 32a, 32b, and 32c, the CPU 424 switches the connection of the switch circuit 34 to perform multiplexing. Therefore, the video encoder 20, the audio encoder 24
And the remaining storage capacity (remaining buffer capacity) of the FIFO memories 32a, 32b, and 32c depending on whether the subtitle encoder 28 writes data intermittently or continuously into the FIFO memories 32a, 32b, and 32c, respectively. Fluctuates.

【0073】従って、多重化後のトランスポートースト
リームのある部分のオーディオストリームのデータ量が
少なくなり、他の部分のオーディオストリームのデータ
量が多くなるといったように、結果的に多重化後のエレ
メンタリストリームのデータ量に疎密が生じて、各エレ
メンタリストリームの間隔に偏りが生じ、例えば、オー
ディオストリームの間隔が長くなった場合等に、受信側
の伸長復号装置が正常に音声再生をできなくなるといっ
た不具合が生じる可能性がある。
Therefore, the data amount of the audio stream in one part of the multiplexed transport stream is reduced, and the data amount of the audio stream in the other part is increased. The data amount of the mental stream is sparse and dense, and the interval between the elementary streams is biased. For example, when the interval between the audio streams is long, the expansion decoding device on the receiving side cannot normally reproduce the audio. Such a problem may occur.

【0074】例えば、CPU424が、受信側の伸長復
号装置の受信バッファの残り記憶容量(バッファ残量)
をも考慮した多重化計画を行うことにより、このような
不具合を回避することも可能である。しかしながら、C
PU424が受信バッファを考慮して、映像フレーム信
号と非同期に多重化計画を行うためのソフトウェアのア
ルゴリズムは複雑であり、長い処理時間を要するので、
この方法は、多重化処理の高速化を妨げる原因となる。
For example, the CPU 424 determines that the remaining storage capacity (remaining buffer capacity) of the reception buffer of the decompression decoding device on the receiving side.
By performing a multiplexing plan in consideration of the above, it is also possible to avoid such a problem. However, C
The software algorithm for the PU 424 to perform the multiplexing plan asynchronously with the video frame signal in consideration of the reception buffer is complicated and requires a long processing time.
This method hinders speeding up of the multiplexing process.

【0075】本発明の第3の実施例は、かかる不具合を
解決するためになされ、映像データのフレーム信号(映
像フレーム信号)に同期して、残り記憶容量(バッファ
残量)を考慮しない簡単なアルゴリズムで多重化を計画
し、高速で、受信側の伸長復号装置の受信バッファに破
綻を生じさせることがない各エレメンタリストリームの
多重化を行うことができるようにデータ多重化装置2
(図2)の動作を改良したものである。
The third embodiment of the present invention is intended to solve such a problem, and is simple in synchronization with a frame signal (video frame signal) of video data and without considering the remaining storage capacity (remaining buffer capacity). The data multiplexing device 2 is designed so that multiplexing of each elementary stream can be performed at a high speed without causing a failure in the reception buffer of the decompression decoding device on the receiving side.
This is an improvement of the operation shown in FIG.

【0076】CPU424の多重化計画第3の実施例に
おいて、CPU424(図2)は、図2に点線で示すよ
うに、ビデオエンコーダ20から入力される映像フレー
ム信号に同期して、映像フレーム信号の周期〔映像フレ
ーム周期;1/30秒(NTSC方式の場合),1/2
5秒(PAL方式の場合)〕ごとの多重化方法を計画
し、計画した多重化方法に基づいて、データ多重化装置
2の各構成部分を制御する。
Multiplexing Plan of CPU 424 In the third embodiment, the CPU 424 (FIG. 2) synchronizes the video frame signal input from the video encoder 20 with the video frame signal as shown by the dotted line in FIG. Cycle [Video frame cycle; 1/30 second (in case of NTSC system), 1/2]
5 seconds (in the case of the PAL system)], and controls each component of the data multiplexing device 2 based on the planned multiplexing method.

【0077】データ多重化装置2の各構成部分は、CP
U424の制御に従って、各映像フレーム周期におい
て、下式に示すほぼ等しいデータ量aのビデオストリー
ムを、例えばATM方式の伝送パケットに多重化し、さ
らに、オーディオエンコーダ24およびサブタイトルエ
ンコーダ28が生成したオーディオストリームおよびプ
ライベートデータストリームを順次、伝送パケットに多
重化して、トランスポートデータストリームを生成す
る。なお、固定レート符号化により、ビデオストリーム
のデータレートはほぼ一定となるので、データ量aは、
結果的に、ビデオエンコーダ20が生成するビデオスト
リームの映像フレーム周期当たりの平均データ量とほぼ
同じになる。
Each component of the data multiplexing device 2 has a CP
Under the control of U424, in each video frame period, a video stream of approximately equal data amount a shown in the following equation is multiplexed into, for example, a transmission packet of the ATM system, and the audio stream generated by the audio encoder 24 and the subtitle encoder 28 The private data stream is sequentially multiplexed into transmission packets to generate a transport data stream. Since the data rate of the video stream becomes substantially constant by the fixed rate coding, the data amount a is
As a result, the average data amount per video frame period of the video stream generated by the video encoder 20 is almost the same.

【0078】[0078]

【数1】 a≒V/k …(1) 但し、aは、1映像フレーム周期に多重化されるビデオ
ストリームのデータ量であり、Vは、ビデオストリーム
の符号化レートである。
A ≒ V / k (1) where a is the data amount of the video stream multiplexed in one video frame period, and V is the coding rate of the video stream.

【0079】さらに、上述した映像フレーム周期ごとの
多重化計画により、受信バッファの破綻が防止できる理
由を説明する。受信側の伸長復号装置(デコーダ)にお
いては、映像フレーム周期ごとに受信バッファから映像
データが読み出され、除去される。従って、映像フレー
ム信号に同期して、映像フレーム周期ごとに、送信側か
ら適切な範囲のほぼ等量のビデオストリームを受信バッ
ファに書き込めば、受信バッファに破綻が生じることは
ない。逆に、例えば、第m番目の映像フレーム周期にお
いてビデオストリームを多重化せず、第(m+1)番目
の映像フレーム周期において2フレーム分のビデオスト
リームを伝送パケットに多重化し、トランスポートスト
リームを生成して伝送すると、受信バッファに破綻が生
じる可能性が生じる。
Further, the reason why the failure of the receiving buffer can be prevented by the above-described multiplexing plan for each video frame period will be described. In the decompression decoding device (decoder) on the receiving side, the video data is read from the reception buffer every video frame period and removed. Therefore, if almost the same amount of video stream in an appropriate range is written from the transmitting side to the receiving buffer in each video frame period in synchronization with the video frame signal, no failure occurs in the receiving buffer. Conversely, for example, the video stream for the (m + 1) th video frame period is not multiplexed in the mth video frame period, but the video stream for two frames is multiplexed into the transmission packet to generate the transport stream. If the transmission is performed in the receiving buffer, there is a possibility that a failure occurs in the receiving buffer.

【0080】同様に、オーディオストリームも、音声デ
ータのサンプリング周期〔音声フレーム周期;上述のよ
うに、24ms(1152/48kHz),26.1m
s(1152/44.1kHz),36ms(1152
/32kHz)≠1/30秒,1/25秒(映像フレー
ム周期)〕ごとに、音声フレーム周期ごとに生成され、
また、デコーダの受信バッファから読み出され、除去さ
れるので、音声フレーム周期ごとに等量ずつ伝送パケッ
トに多重化し、トランスポートストリームを生成して伝
送することにより、受信バッファの破綻を防ぐことがで
きる。
Similarly, the audio stream also has a sampling period of audio data [audio frame period; as described above, 24 ms (1152/48 kHz), 26.1 m.
s (1152 / 44.1 kHz), 36 ms (1152
/ 32 kHz) {1/30 seconds, 1/25 seconds (video frame period)], and is generated for each audio frame period,
Also, since the data is read from the reception buffer of the decoder and removed, the transmission packet is multiplexed in equal amounts in each audio frame period, and a transport stream is generated and transmitted. it can.

【0081】つまり、オーディオストリームは、音声デ
ータのサンプリング周波数が48kHzまたは44.1
kHzである場合には、映像フレーム周期ごとに1回ま
たは2回、を生成され、また、受信側のデコーダの受信
バッファから除去され、音声データのサンプリング周波
数が32kHzである場合には、映像フレーム周期ごと
に0回または1回、生成され、受信側のデコーダの受信
バッファから除去される。従って、CPU424は、映
像フレーム周期ごとに高々2回、オーディオストリーム
を等量ずつ伝送パケットに多重化し、トランスポートス
トリームを生成するように多重化計画を行うことによ
り、受信バッファの破綻、および、音声の再生が正常に
できなくなる不具合を防ぐことができる。
That is, the audio stream has a sampling frequency of audio data of 48 kHz or 44.1.
If the frequency is 32 kHz, it is generated once or twice every video frame period, and is removed from the receiving buffer of the decoder on the receiving side. If the sampling frequency of the audio data is 32 kHz, the video frame is generated. It is generated 0 or 1 time per cycle and is removed from the receiving buffer of the receiving decoder. Therefore, the CPU 424 multiplexes the audio stream into transmission packets at most twice in each video frame period, and performs a multiplexing plan so as to generate a transport stream. Can be prevented from being unable to be reproduced normally.

【0082】データ多重化装置2の動作 以下、第3の実施例におけるデータ多重化装置2の動作
を、ビデオストリームおよびオーディオストリームのデ
ータレートの具体例を挙げて説明する。
Operation of Data Multiplexing Apparatus 2 The operation of the data multiplexing apparatus 2 according to the third embodiment will be described below with reference to specific examples of data rates of a video stream and an audio stream.

【0083】ビデオエンコーダ20は、CPU424の
制御に従って、入力される映像データをエンコードし、
例えば、ほぼ一定のデータレート(4Mbps)のビデ
オストリームを生成する。オーディオエンコーダ24
は、CPU424の制御に従って、入力される映像デー
タをエンコードし、固定データレート(384kbp
s)のオーディオストリームを生成する。サブタイトル
エンコーダ28は、適宜、入力されるサブタイトルデー
タをエンコードし、プライベートデータストリームを生
成する。
The video encoder 20 encodes the input video data under the control of the CPU 424,
For example, a video stream having a substantially constant data rate (4 Mbps) is generated. Audio encoder 24
Encodes the input video data according to the control of the CPU 424 and outputs a fixed data rate (384 kbps).
Generate the audio stream of s). The subtitle encoder 28 appropriately encodes the input subtitle data and generates a private data stream.

【0084】データ量IF30a,30b,30cはそ
れぞれ、ビデオエンコーダ20、オーディオエンコーダ
24およびサブタイトルエンコーダ28がそれぞれ生成
したビデオストリーム、オーディオストリームおよびプ
ライベートデータストリームの一定時間当たりのデータ
量を計数し、これらのストリームのデータレートとして
CPU424に対して出力する。
The data amounts IF 30a, 30b, and 30c respectively count the data amounts of the video stream, the audio stream, and the private data stream generated by the video encoder 20, the audio encoder 24, and the subtitle encoder 28 per fixed time, respectively. The data is output to the CPU 424 as the data rate of the stream.

【0085】ここで、NTSC方式のビデオストリーム
のデータレートが、例えば4Mbpsである場合には、
下式に示すように、1映像フレーム周期当たりのビデオ
ストリームのデータ量は16666.7バイトであり、
同様に、オーディオストリームのデータレートが384
kbpsである場合には、下式に示すように、1映像フ
レーム周期当たりのオーディオストリームのデータ量は
1600バイトとなる。
Here, when the data rate of the video stream of the NTSC system is, for example, 4 Mbps,
As shown in the following equation, the data amount of the video stream per one video frame period is 16666.7 bytes.
Similarly, if the data rate of the audio stream is 384
In the case of kbps, the data amount of the audio stream per one video frame period is 1600 bytes as shown in the following equation.

【0086】[0086]

【数2】 1映像フレーム周期当たりのビデオストリームのデータ量; 4,000,000bps/(8ビット×30フレーム) =16666.7バイト …(2−1) 1フレーム当たりのオーディオストリームのデータ量; 38400,000bps/(8ビット×30フレーム) =1600バイト …(2−2)## EQU00002 ## Data amount of video stream per one video frame period; 4,000,000 bps / (8 bits.times.30 frames) = 1666.67 bytes (2-1) Data amount of audio stream per frame; 38400000 bps / (8 bits × 30 frames) = 1600 bytes (2-2)

【0087】従って、CPU424は、1映像フレーム
周期ごとに、16666バイトまたは166667バイ
トのビデオストリームを伝送パケットに多重化し、ま
た、1600バイトのオーディオストリームを、図6に
示す順番で多重化するように多重化計画を行い、この多
重化計画に従ってトランスポートストリームを生成する
ようにデータ多重化装置2の各構成部分を制御する。
Therefore, the CPU 424 multiplexes the 16666-byte or 166667-byte video stream into the transmission packet every video frame period, and multiplexes the 1600-byte audio stream in the order shown in FIG. A multiplexing plan is performed, and each component of the data multiplexing device 2 is controlled so as to generate a transport stream according to the multiplexing plan.

【0088】図6は、図2に示したデータ多重化装置2
が第3の実施例において生成するトランスポートストリ
ームに含まれる各エレメンタリストリームの順番を例示
する図である。まず、CPU424は、スイッチ回路3
6を制御して入力端子a側を選択させ、ビデオストリー
ムおよびオーディオストリームに先立って、CPU42
4が生成したPCR(program clock reference) デー
タ、PAT(program associationtable) およびPMT
(program map table) データを、処理用RAM426を
介して、例えば、1映像フレーム周期(MPEGにおい
て規定されている最長再送周期以下)ごとにそれぞれ1
つの伝送パケットに多重化し、トランスポートストリー
ムを生成して外部に出力する。
FIG. 6 shows the data multiplexing apparatus 2 shown in FIG.
FIG. 14 is a diagram illustrating the order of each elementary stream included in the transport stream generated in the third embodiment. First, the CPU 424 controls the switch circuit 3
6 to select the input terminal a side, and before the video stream and the audio stream, the CPU 42
4 generated PCR (program clock reference) data, PAT (program association table) and PMT
(program map table) The data is stored in the RAM 426 for processing, for example, for each one video frame period (less than the longest retransmission period specified in MPEG).
It multiplexes it into one transmission packet, generates a transport stream, and outputs it outside.

【0089】次に、CPU424は、スイッチ回路36
を制御して入力端子b側を選択させ、スイッチ回路34
を制御して入力端子の選択を順次、変更して、第1のビ
デオストリーム、第1のオーディオストリーム、第1の
サブタイトル(プライベートデータストリーム)、第1
のNullデータ、第2のビデオストリーム、第2のオ
ーディオストリーム、第2のサブタイトル(プライベー
トデータストリーム)および第2のNullデータの順
番で各ストリームを伝送パケットに多重化し、トランス
ポートストリームを生成して外部に出力する。
Next, the CPU 424 operates the switch circuit 36.
To select the input terminal b side, and the switch circuit 34
To sequentially change the selection of the input terminal so that the first video stream, the first audio stream, the first subtitle (private data stream), the first
Null data, a second video stream, a second audio stream, a second subtitle (private data stream) and a second Null data are multiplexed into transmission packets in this order to generate a transport stream. Output to the outside.

【0090】なお、図6に示したNullデータは、デ
ータ多重化装置2が出力するトランスポートストリーム
のデータレートを一定とするために、ビデオストリー
ム、オーディオストリーム、プライベートデータストリ
ームおよびその他のデータの合計のデータレートが、伝
送路のデータレートより小さい場合に挿入される無効デ
ータである。
The Null data shown in FIG. 6 is composed of a video stream, an audio stream, a private data stream and other data in order to keep the data rate of the transport stream output from the data multiplexing device 2 constant. Is invalid data inserted when the data rate is lower than the data rate of the transmission path.

【0091】以下、図7を参照して、CPU424の処
理をさらに説明する。図7は、図2に示したデータ多重
化装置2のCPU424の第3の実施例における多重化
計画の処理を示すフローチャートである。
Hereinafter, the processing of the CPU 424 will be further described with reference to FIG. FIG. 7 is a flowchart showing a multiplexing plan process in the third embodiment of the CPU 424 of the data multiplexing device 2 shown in FIG.

【0092】図7に示すように、ステップ200(S2
00)において、CPU424は、データ量IF30
a,30b,30cから入力される各エレメンタリスト
リームの一定時間当たりのデータ量に基づいて、これら
のエレメンタリストリームを、図6に示したトランスポ
ートストリームの各位置それぞれにおいて、どれだけの
データ量だけ多重化するかを示すパラメータ(SIZE
_FRAMEV,SIZE_FRAME_V1,SIZ
E_FRAME_V2等)の設定を行う。
As shown in FIG. 7, step 200 (S2
00), the CPU 424 determines that the data amount IF30
a, 30b, and 30c, based on the data amount of each elementary stream per fixed time, how much data amount of each of these elementary streams at each position of the transport stream shown in FIG. Parameter (SIZE) indicating whether only
_FRAMEV, SIZE_FRAME_V1, SIZ
E_FRAME_V2).

【0093】ステップ202(S202)において、C
PU424は、ビデオエンコーダ20から入力される映
像フレーム信号を受信し、新たな映像フレーム周期が始
まった場合にはS204の処理に進み、始まらない場合
にはS202の処理に留まる。ステップ204(S20
4)において、CPU424は、PCRデータ、PAT
データおよびPMTデータを多重化し、外部に出力す
る。
In step 202 (S202), C
The PU 424 receives the video frame signal input from the video encoder 20, and proceeds to the process of S204 if a new video frame period has started, and stays at the process of S202 if it does not start. Step 204 (S20
In 4), the CPU 424 checks the PCR data, PAT
Data and PMT data are multiplexed and output to the outside.

【0094】ステップ206(S206)において、C
PU424は、ビデオストリームを、S200の処理に
おいて設定したパラメータSIZE_FRAME_V1
が示すデータ量だけ多重化し、第1のビデオストリーム
として外部に出力する。ステップ208(S208)に
おいて、CPU424は、オーディオストリームを、S
200の処理において設定したパラメータSIZE_F
RAME_A1が示すデータ量だけ多重化し、第1のオ
ーディオストリームとして外部に出力する。
In step 206 (S206), C
The PU 424 converts the video stream into the parameter SIZE_FRAME_V1 set in the processing of S200.
Are multiplexed by the amount of data indicated by, and output to the outside as a first video stream. In step 208 (S208), the CPU 424 converts the audio stream into S
Parameter SIZE_F set in process 200
The data is multiplexed by the amount of data indicated by RAME_A1 and output to the outside as a first audio stream.

【0095】ステップ210(S210)において、C
PU424は、サブタイトルデータ(プライベートデー
タストリーム)を、S200の処理において設定したパ
ラメータSIZE_FRAME_S1が示すデータ量だ
け多重化し、第1のプライベートデータストリームとし
て外部に出力する。ステップ212(S212)におい
て、CPU424は、Nullデータを、S200の処
理において設定したパラメータSIZE_FRAME_
N1が示すデータ量だけ多重化し、第1のNullデー
タとして外部に出力する。
In step 210 (S210), C
The PU 424 multiplexes the subtitle data (private data stream) by the data amount indicated by the parameter SIZE_FRAME_S1 set in the processing of S200, and outputs the multiplexed data to the outside as a first private data stream. In step 212 (S212), the CPU 424 stores the Null data in the parameter SIZE_FRAME_
The data is multiplexed by the data amount indicated by N1 and output to the outside as first Null data.

【0096】ステップ214(S214)において、C
PU424は、ビデオストリームを、S200の処理に
おいて設定したパラメータSIZE_FRAME_V2
が示すデータ量だけ多重化し、第2のビデオストリーム
として外部に出力する。ステップ216(S216)に
おいて、CPU424は、オーディオストリームを、S
200の処理において設定したパラメータSIZE_F
RAME_A2が示すデータ量だけ多重化し、第2のオ
ーディオストリームとして外部に出力する。
In step 214 (S214), C
The PU 424 converts the video stream into the parameter SIZE_FRAME_V2 set in the processing of S200.
Are multiplexed by the data amount indicated by, and output to the outside as a second video stream. In step 216 (S216), the CPU 424 converts the audio stream into S
Parameter SIZE_F set in process 200
The data is multiplexed by the amount of data indicated by RAME_A2 and output to the outside as a second audio stream.

【0097】ステップ218(S218)において、C
PU424は、サブタイトルデータ(プライベートデー
タストリーム)を、S200の処理において設定したパ
ラメータSIZE_FRAME_S2が示すデータ量だ
け多重化し、第2のプライベートデータストリームとし
て外部に出力する。ステップ220(S220)におい
て、CPU424は、Nullデータを、S200の処
理において設定したパラメータSIZE_FRAME_
N2が示すデータ量だけ多重化し、第2のNullデー
タとして外部に出力する。
In step 218 (S218), C
The PU 424 multiplexes the subtitle data (private data stream) by the data amount indicated by the parameter SIZE_FRAME_S2 set in the processing of S200, and outputs the same as a second private data stream to the outside. In step 220 (S220), the CPU 424 stores the Null data in the parameter SIZE_FRAME_
The data is multiplexed by the data amount indicated by N2 and output to the outside as second Null data.

【0098】なお、図6および図7においては、各エレ
メンタリストリームの多重化の繰り返し回数が2回の場
合を例示してあるので、2回に分けて多重化される各エ
レメンタリストリームのデータ量をほぼ等しくする。つ
まり、各パラメータの関係は、SIZE_FRAME_
V1≒SIZE_FRAME_V2,SIZE_FRA
ME_A1≒SIZE_FRAME_A2,SIZE_
FRAME_S1≒SIZE_FRAME_S2とな
る。
FIGS. 6 and 7 show a case where the number of repetitions of multiplexing of each elementary stream is two. Therefore, the data of each elementary stream that is multiplexed in two parts is multiplexed. Make the volumes approximately equal. That is, the relationship between the parameters is SIZE_FRAME_
V1 ≒ SIZE_FRAME_V2, SIZE_FRA
ME_A1 @ SIZE_FRAME_A2, SIZE_
FRAME_S1 ≒ SIZE_FRAME_S2.

【0099】また、図6および図7示した各エレメンタ
リストリームの多重化の繰り返し回数は2回に限定され
ないので、繰り返し回数が奇数の場合等には、これらの
パラメータのいずれかを大きい値にすることも可能であ
る。例えば、繰り返し回数が3回の場合には、各パラメ
ータの関係を、SIZE_FRAME_V1<SIZE
_FRAME_V2<SIZE_FRAME_V3,S
IZE_FRAME_A1<SIZE_FRAME_A
2<SIZE_FRAME_A3,SIZE_FRAM
E_S1<SIZE_FRAME_S2<SIZE_F
RAME_S3とすることも可能である。
Since the number of repetitions of multiplexing of each elementary stream shown in FIGS. 6 and 7 is not limited to two, when the number of repetitions is an odd number, for example, one of these parameters is set to a large value. It is also possible. For example, when the number of repetitions is three, the relationship between the parameters is expressed as SIZE_FRAME_V1 <SIZE
_FRAME_V2 <SIZE_FRAME_V3, S
SIZE_FRAME_A1 <SIZE_FRAME_A
2 <SIZE_FRAME_A3, SIZE_FRAM
E_S1 <SIZE_FRAME_S2 <SIZE_F
RAME_S3 is also possible.

【0100】また、第3の実施例として図6に示した各
エレメンタリストリームの多重化の順番は例示であっ
て、他の順番で各エレメンタリストリームの多重化を計
画するようにCPU424の動作を変更してもよい。ま
た、第3の実施例として示したデータ多重化装置2の多
重化計画は、NTSC方式の525/60形式の音声・
映像データにも、PAL方式の625/50形式の音声
・映像データにも適応することができる。また、PES
パケットに多重化する際の単位としては、1ピクチャー
分の映像データであっても、1映像フレーム周期の間に
出力する映像データであってもよい。また、第3の実施
例に対しても、第2の実施例に対してと同様な変形が可
能である。
The order of multiplexing of each elementary stream shown in FIG. 6 as the third embodiment is an exemplification, and the operation of the CPU 424 is performed so that the multiplexing of each elementary stream is planned in another order. May be changed. The multiplexing plan of the data multiplexing apparatus 2 shown as the third embodiment is based on the NTSC 525/60 format audio / video.
The present invention can be applied to both video data and audio / video data in the 625/50 format of the PAL system. Also, PES
The unit for multiplexing into packets may be video data for one picture or video data output during one video frame period. Further, the same modification as that of the second embodiment can be applied to the third embodiment.

【0101】第4実施例 第3の実施例に示したデータ多重化装置2(図2)の動
作によれば、受信バッファの残り記憶容量を考慮しない
簡単なアルゴリズムで、受信側の伸長復号装置の受信バ
ッファに破綻を生じさせることなく、常に、音声・映像
の正常な再生を可能なように音声・映像データを伝送パ
ケットに多重化し、トランスポートストリームを生成す
ることができる。
Fourth Embodiment According to the operation of the data multiplexing apparatus 2 (FIG. 2) shown in the third embodiment, the decompression decoding apparatus on the receiving side can use a simple algorithm that does not consider the remaining storage capacity of the receiving buffer. It is possible to always multiplex audio / video data into transmission packets and generate a transport stream so that normal reproduction of audio / video can be performed without causing a failure in the receiving buffer.

【0102】しかしながら、NTSC方式の525/6
0形式の映像データの映像フレーム周期は正確には1/
29.97Hzであり、例えば、ビデオエンコーダ20
が生成するビデオストリームのデータレートが4Mbp
s固定である場合には、下式に示すように、映像フレー
ム周期ごとに、ビデオストリーム0.35バイト分の端
数が生じ、CPU424は、この端数を考慮して多重化
計画を行う必要がある。
However, the NTSC system 525/6
The video frame period of video data in the 0 format is exactly 1 /
29.97 Hz, for example, the video encoder 20
The data rate of the video stream generated by is 4Mbp
When s is fixed, as shown in the following formula, a fraction of 0.35 bytes of the video stream is generated for each video frame period, and the CPU 424 needs to perform a multiplexing plan in consideration of the fraction. .

【0103】[0103]

【数3】 4×106 /29.97=133466.8ビット =16683.35バイト …(3)## EQU3 ## 4 × 10 6 /29.97=1333466.8 bits = 16683.35 bytes (3)

【0104】また、オーディオエンコーダ24が生成す
るオーディオストリームについても同様であり、例え
ば、オーディオストリームのデータレートが384kb
ps固定である場合には、下式に示すように、映像フレ
ーム周期ごとに、オーディオストリーム0.6016バ
イト分の端数が生じ、CPU424は、この端数を考慮
して多重化計画を行う必要がある。
The same applies to the audio stream generated by the audio encoder 24. For example, the data rate of the audio stream is 384 kb.
When ps is fixed, as shown in the following formula, a fraction of 0.6016 bytes of the audio stream is generated for each video frame period, and the CPU 424 needs to perform a multiplexing plan in consideration of the fraction. .

【0105】[0105]

【数4】 384×103 /29.97=12812.813ビット =1601.6016バイト …(4)384 × 10 3 /29.97=12812.813 bits = 1601.6016 bytes (4)

【0106】一方、PAL方式の625/50形式の映
像フレーム周期は1/25Hzであり、例えば、上述の
ようにビデオストリームのデータレートが4Mbps固
定であり、オーディオストリームのデータレートが38
4kbps固定である場合には、下式に示すように、ビ
デオストリームおよびオーディオストリームに端数が生
じない。しかしながら、ビデオストリームおよびオーデ
ィオストリームのデータレートが、200bps(=2
5×8)の倍数でない場合には、端数が生じるので、C
PU424は、この端数を考慮して多重化計画を行う必
要がある。
On the other hand, the video frame period of the 625/50 format of the PAL system is 1/25 Hz. For example, as described above, the data rate of the video stream is fixed at 4 Mbps, and the data rate of the audio stream is 38
In the case of fixed 4 kbps, no fraction occurs in the video stream and the audio stream as shown in the following equation. However, if the data rate of the video stream and the audio stream is 200 bps (= 2
If it is not a multiple of 5 × 8), a fraction is generated.
The PU 424 needs to perform a multiplexing plan in consideration of the fraction.

【0107】[0107]

【数5】 ビデオストリーム; 4×106 /25=160000ビット =20000バイト …(5−1) オーディオストリーム; 384×103 /25=15360ビット =1920バイト …(5−2)Equation 5] video stream; 4 × 10 6/25 = 160000 bits = 20000 bytes ... (5-1) audio stream; 384 × 10 3/25 = 15360 bits = 1920 bytes ... (5-2)

【0108】本発明の第4の実施例は、上述した問題に
鑑みてなされたものであり、本発明の第3の実施例を改
良し、多重化計画のアルゴリズムをさらに簡単にしたも
のである。
The fourth embodiment of the present invention has been made in view of the above-described problem, and is an improvement of the third embodiment of the present invention, which further simplifies the multiplexing planning algorithm. .

【0109】CPU424の多重化計画 以下、NTSC方式のビデオストリームを多重化する場
合を例に、第4の実施例におけるCPU424の多重化
計画を説明する。
A multiplexing plan of the CPU 424 Hereinafter, a multiplexing plan of the CPU 424 in the fourth embodiment will be described by taking an example of multiplexing an NTSC video stream.

【0110】ビデオストリームのデータレート 第4の実施例においては、CPU424は、データ量I
F30aから入力されるビデオエンコーダ20のビデオ
ストリームのデータレートvideo_rate_or
gを、下式に示す固定値(frame_video_r
ate)に近似して多重化計画を行う。
Data Rate of Video Stream In the fourth embodiment, the CPU 424
Data rate of video stream of video encoder 20 input from F30a video_rate_or
g is a fixed value (frame_video_r) shown in the following equation.
ate) and perform a multiplexing plan.

【0111】[0111]

【数6】 frame _video _rate(byte)=video _rate_org(bps) /{(8×1001)/(1000 ×30) } …(6) 但し、video _rate_org は、ビデオエンコーダ20が
生成するビデオストリームのデータレートであり、fram
e _video _rateは小数点以下を切り捨てる。
[Equation 6] frame_video_rate (byte) = video_rate_org (bps) / {(8 × 1001) / (1000 × 30)} (6) where video_rate_org is data of a video stream generated by the video encoder 20 Rate the fram
e_video_rate rounds down decimal places.

【0112】ただし、上式6により算出されるビデオー
ストリームの映像フレーム周期当たりのデータレートf
rame_video_rateの値は離散的になる
が、制約がない限り、通常、ビデオストリームのデータ
レートは任意の値とすることができるので、特に問題が
生じることはない。
Here, the data rate f per video frame period of the video stream calculated by the above equation (6)
Although the value of the frame_video_rate is discrete, there is no particular problem because the data rate of the video stream can be any value unless there is a restriction.

【0113】また、上式6が、演算〔1001/(10
00×30)〕を含むのは、NTSC方式の1秒あたり
のフレーム数29.97を、整数演算により扱い得るよ
うにするためである。
In addition, the above equation (6) is equivalent to the operation [1001 / (10
00 × 30)] so that the number of frames per second in the NTSC system, 29.97, can be handled by integer arithmetic.

【0114】なお、CPU424が、ビデオエンコーダ
20のビットレート制御回路220(図3)に設定する
目標データ量video_rate_targetの値
は、下式により算出される。
Note that the value of the target data amount video_rate_target set by the CPU 424 in the bit rate control circuit 220 (FIG. 3) of the video encoder 20 is calculated by the following equation.

【0115】[0115]

【数7】 video _rate_target(bps) =frame _video _rate(byte) /{(8×30×1000)/1001} …(7)[Expression 7] video_rate_target (bps) = frame_video_rate (byte) / {(8 × 30 × 1000) / 1001} (7)

【0116】例えば、ビデオエンコーダ20が生成する
ビデオストリームのデータレートvideo_rate
_orgが4Mbpsの場合には、目標データ量vid
eo_rate_targetの値は3.999920
1Mbpsである。なお、この場合には、両者の値の間
の差はごくわずかであり、CPU424が、目標データ
量video_rate_targetとして、データ
レートvideo_rate_orgをビットレート制
御回路220に設定しても、実用上、何らの問題も生じ
ない。
For example, the data rate of a video stream generated by the video encoder 20 is video_rate.
When _org is 4 Mbps, the target data amount vid
The value of eo_rate_target is 3.999920
1 Mbps. Note that in this case, the difference between the two values is very small, and even if the CPU 424 sets the data rate video_rate_org as the target data amount video_rate_target in the bit rate control circuit 220, there is no practical problem. Does not occur.

【0117】以下、図8をさらに参照して、CPU42
4がビデオエンコーダ20のビットレート制御回路22
0(図3)に設定する目標データ量video_rat
e_targetの算出方法を説明する。図8は、第4
の実施例において、データ多重化装置2のビデオエンコ
ーダ20のビットレート制御回路220に設定される目
標データ量video_rate_targetの算出
方法を示すフローチャート図である。
Hereinafter, with further reference to FIG.
4 is a bit rate control circuit 22 of the video encoder 20
Target data amount video_rat to be set to 0 (FIG. 3)
A method for calculating e_target will be described. FIG.
FIG. 9 is a flowchart illustrating a method of calculating a target data amount video_rate_target set in the bit rate control circuit 220 of the video encoder 20 of the data multiplexing device 2 in the example of FIG.

【0118】図8に示すように、ステップ240(S2
40)において、CPU424は、データ量IF30a
から、ビデオエンコーダ20が生成するビデオストリー
ムのデータレートvideo_rate_orgを受け
て、RAM428に設定する。
As shown in FIG. 8, step 240 (S2
40), the CPU 424 sets the data amount IF 30a
, The data rate video_rate_org of the video stream generated by the video encoder 20 is received and set in the RAM 428.

【0119】ステップ242(S242)において、C
PU424は、式6により、映像フレーム周期当たりの
ビデオストリームのデータレートframe_vide
o_rateを算出する。
In step 242 (S242), C
The PU 424 uses Equation 6 to calculate the data rate of the video stream per video frame period frame_video.
o_rate is calculated.

【0120】ステップ244(S244)において、C
PU424は、式7により、ビデオエンコーダ20のビ
ットレート制御回路220に設定する目標データ量vi
deo_rate_targetを算出する。
In step 244 (S244), C
The PU 424 calculates the target data amount vi to be set in the bit rate control circuit 220 of the video encoder 20 according to Expression 7.
Calculate deo_rate_target.

【0121】なお、例えば、ビデオストリームのデータ
レートvideo_rate_orgが4Mbpsであ
り、伝送パケットのペイロード部分が184バイトであ
る場合には、下式に示すように、123バイトの端数が
生じる。一般には、この端数を収容した伝送パケットの
ペイロード部分の余りに、61バイト(=184−12
3)のスタッフィングデータを収容する処理を行うが、
この処理を行うと、トランスポートストリームのデータ
レートを不要に高くしてしまう。従って、この端数部分
を、次の映像フレーム期間において多重化する方法を採
ることが好ましい。
For example, when the data rate video_rate_org of the video stream is 4 Mbps and the payload portion of the transmission packet is 184 bytes, a fraction of 123 bytes is generated as shown in the following equation. In general, the remainder of the payload portion of the transmission packet containing this fraction is 61 bytes (= 184-12).
3) The process of storing the stuffing data is performed.
Performing this process unnecessarily increases the data rate of the transport stream. Therefore, it is preferable to adopt a method of multiplexing this fractional part in the next video frame period.

【0122】[0122]

【数8】 =16683(式3)/184 =90パケット+余り123バイト …(8)## EQU8 ## = 16683 (Equation 3) / 184 = 90 packets + 123 remaining bytes (8)

【0123】オーディオストリームのデータレート 図9は、MPEG方式において規格化されているオーデ
ィオストリームのデータレートを示す図表である。ビデ
オストリームのデータレートとは異なり、図9に示すよ
うに、オーディオストリームのデータレートaudio
_rate_targetは固定値であって、いずれも
8×1000bpsの倍数の値を採る。
Data Rate of Audio Stream FIG. 9 is a chart showing the data rate of an audio stream standardized in the MPEG system. Unlike the data rate of the video stream, as shown in FIG. 9, the data rate of the audio stream is audio.
_Rate_target is a fixed value, and each value is a multiple of 8 × 1000 bps.

【0124】例えば、オーディオエンコーダ24が生成
するオーディオストリームのデータレートaudio_
rate_targetが、384kbpsである場合
には、30映像フレーム周期の間にオーディオエンコー
ダ24が出力するオーディオストリームのデータ量au
dio_frame_30frameは、制御周期を3
0映像フレーム周期(約1秒)とすると、下式に示すよ
うに算出される。
For example, the data rate of the audio stream generated by the audio encoder 24 is audio_
When rate_target is 384 kbps, the data amount au of the audio stream output by the audio encoder 24 during 30 video frame periods.
“dio_frame_30frame” indicates that the control cycle is 3
Assuming that the video frame period is 0 (about 1 second), it is calculated as shown in the following equation.

【0125】[0125]

【数9】 audio _rate_30frame =384 ×1000×1001/1000 =384384ビット =48048 バイト …(9)[Equation 9] audio_rate_30frame = 384 × 1000 × 1001/1000 = 384384 bits = 48048 bytes (9)

【0126】従って、1映像フレーム周期ごとにトラン
スポートストリームに多重化すべきオーディオストリー
ムのデータ量は、1601バイトまたは1602バイト
となる。従って、CPU424は、過去30映像フレー
ム周期の間に多重化したオーディオフレームが、式9に
より算出したデータ量audio_frame_30f
rame(48048バイト)より多い場合には160
2バイト分のオーディオストリームを、その映像フレー
ム周期のトランスポートストリームに多重化し、多くな
い場合には1601バイト分のオーディオストリームを
その映像フレーム周期のトランスポートストリームに多
重化するように、スイッチ回路34の接続を制御する。
Accordingly, the data amount of the audio stream to be multiplexed into the transport stream for each video frame period is 1601 bytes or 1602 bytes. Therefore, the CPU 424 determines that the audio frames multiplexed during the past 30 video frame periods have the data amount audio_frame_30f calculated by Expression 9.
160 if it is larger than frame (48048 bytes)
The switch circuit 34 multiplexes the audio stream of 2 bytes into the transport stream of the video frame cycle, and if not, multiplexes the audio stream of 1601 bytes into the transport stream of the video frame cycle. Control connections.

【0127】データ多重化装置2の動作 以下、図10をさらに参照して、第4の実施例における
データ多重化装置2の動作を説明する。図10は、第4
の実施例において、データ多重化装置2が、映像フレー
ム周期ごとにトランスポートストリームに多重化するオ
ーディオストリームのデータ量を算出し、ビデオストリ
ーム等と多重化する処理を示すフローチャート図であ
る。
Operation of Data Multiplexing Apparatus 2 The operation of the data multiplexing apparatus 2 according to the fourth embodiment will be described below with further reference to FIG. FIG.
FIG. 13 is a flowchart showing a process in which the data multiplexing apparatus 2 calculates the data amount of an audio stream to be multiplexed to a transport stream for each video frame period and multiplexes the data stream with a video stream or the like in the embodiment of FIG.

【0128】図10に示すように、ステップ300(S
300)において、CPU424は、オーディオエンコ
ーダ24が生成したオーディオストリームのデータレー
トを、データ量IF30bから受け、RAM428に設
定する。
As shown in FIG. 10, step 300 (S
In 300), the CPU 424 receives the data rate of the audio stream generated by the audio encoder 24 from the data amount IF 30b and sets the data rate in the RAM 428.

【0129】ステップ302(S302)において、C
PU424は、1映像フレーム周期ごとにトランスポー
トストリームに多重化すべきオーディオストリームのデ
ータ量frame_audio_rate_preを、
下式により算出する。
In step 302 (S302), C
The PU 424 calculates the data amount frame_audio_rate_pre of the audio stream to be multiplexed into the transport stream for each video frame period,
It is calculated by the following equation.

【0130】[0130]

【数10】 frame _audio _rate_pre =audio _rate_target /{(8×1001)/(1000 ×30) } …(10) 但し、frame _audio _rate_pre の小数点以下は切り
捨てる。
[Equation 10] frame_audio_rate_pre = audio_rate_target / {(8 × 1001) / (1000 × 30)} (10) However, the fractional part of frame_audio_rate_pre is rounded down.

【0131】ステップ304(S304)において、C
PU424は、式9により、30映像フレーム周期当た
りのオーディオストリームのデータ量audio_fr
ame_30frameを算出する。
In step 304 (S304), C
According to Equation 9, the PU 424 calculates the data amount audio_fr of the audio stream per 30 video frame periods.
ame_30frame is calculated.

【0132】ステップ306(S306)において、C
PU424は、ビデオエンコーダ20から入力される映
像フレーム信号を受信し、映像フレーム周期が開始した
か否かを判断する。映像フレーム周期が開始した場合に
は、CPU424はs308の処理に進み、開始しない
場合にはS306の処理に留まる。
In step 306 (S306), C
The PU 424 receives the video frame signal input from the video encoder 20, and determines whether the video frame period has started. If the video frame period has started, the CPU 424 proceeds to the process of s308. If not started, the CPU 424 remains at the process of S306.

【0133】ステップ308(S308)において、C
PU424は、過去30映像フレーム周期の間に多重化
したオーディオストリームのデータ量が、S304の処
理において算出したデータ量audio_frame_
30frameより多いか否かを判断し、多い場合には
S310の処理に進み、多くない場合にはS312の処
理に進む。
In step 308 (S308), C
The PU 424 determines that the data amount of the audio stream multiplexed during the past 30 video frame periods is equal to the data amount audio_frame_ calculated in the process of S304.
It is determined whether or not the number is larger than 30 frames. If the number is larger, the process proceeds to S310. If not, the process proceeds to S312.

【0134】ステップ310(S310)において、C
PU424は、その映像フレーム周期において多重化す
るオーディオフレームのデータ量frame_audi
o_rateを求め、S302の処理において算出した
データ量frame_audio_rate_preと
する。
In step 310 (S310), C
The PU 424 outputs the data amount frame_audio of the audio frame to be multiplexed in the video frame period.
o_rate is obtained, and is set as the data amount frame_audio_rate_pre calculated in the process of S302.

【0135】ステップ312(S312)において、C
PU424は、その映像フレーム周期において多重化す
るオーディオフレームのデータ量frame_audi
o_rateを求め、S302の処理において算出した
データ量frame_audio_rate_pre+
1とする。
In step 312 (S312), C
The PU 424 outputs the data amount frame_audio of the audio frame to be multiplexed in the video frame period.
o_rate is obtained, and the data amount frame_audio_rate_pre ++ calculated in the process of S302.
Let it be 1.

【0136】CPU424は、スイッチ回路34等、デ
ータ多重化装置2の各構成部分を制御して、図8に示し
た処理により算出されたデータ量frame_vide
o_rateのビデオストリーム、図10のS300〜
S312の処理により算出されたデータ量frame_
audio_rateのオーディオストリームおよびプ
ライベートデータストリームを多重化させる。
The CPU 424 controls each component of the data multiplexing device 2 such as the switch circuit 34, and the data amount frame_video calculated by the processing shown in FIG.
o_rate video stream, S300 to S300 in FIG.
Data amount frame_ calculated by the process of S312
The audio stream of audio_rate and the private data stream are multiplexed.

【0137】以上説明したように、第4の実施例として
示したデータ多重化装置2の動作によれば、浮動小数点
演算を用いない簡単なアルゴリズムで、映像フレーム期
間に同期したビデオストリームおよびオーディオストリ
ーム等の多重化を行うことができる。
As described above, according to the operation of the data multiplexing apparatus 2 shown as the fourth embodiment, the video stream and the audio stream synchronized with the video frame period are obtained by a simple algorithm without using a floating-point operation. Multiplexing can be performed.

【0138】なお、トランスポートストリームの生成開
始時に、生成されたビデオストリームが30映像フレー
ム周期分に達しない間は、例えば、データ量frame
_audio_rateを、データ量frame_au
dio_rate_preおよびデータ量frame_
audio_rate_pre+1いずれかとすればよ
い。
At the start of the generation of the transport stream, if the generated video stream does not reach 30 video frame periods, for example, the data amount frame
_Audio_rate to the data amount frame_au
dio_rate_pre and data amount frame_
audio_rate_pre + 1 may be set.

【0139】また、映像フレーム周期当たりに多重化す
るビデオストリームのデータ量video_frame
_rateを、上述したように映像フレーム周期ごとに
変更する方法の他、例えば、30映像フレーム周期(所
定の制御周期)ごとに、データ量frame_audi
o_rateを、データ量frame_audio_r
ate_preおよびデータ量frame_audio
_rate_pre+1のいずれかに変更する方法を採
ってもよい。
The data amount video_frame of a video stream to be multiplexed per video frame period
In addition to the method of changing _rate for each video frame period as described above, for example, the data amount frame_audi is obtained every 30 video frame periods (predetermined control periods).
o_rate is replaced by the data amount frame_audio_r
ate_pre and data amount frame_audio
_Rate_pre + 1 may be changed.

【0140】また、ビデオストリームおよびオーディオ
ストリームのデータレート(4Mbps,384kbp
s等)、および、データ量の単位(バイト)は例示であ
って、適切な変更を施すことにより、第4の実施例とし
て示した多重化計画の方法は、他のデータレートのビデ
オストリームおよびオーディオストリーム、および、他
のデータ量の単位を用いた多重化計画に応用することが
できる。
The data rates of the video stream and the audio stream (4 Mbps, 384 kbp)
s, etc.) and the unit of data amount (byte) are examples, and by making appropriate changes, the method of multiplexing planning shown as the fourth embodiment can be applied to video streams of other data rates and The present invention can be applied to a multiplexing plan using an audio stream and other data amount units.

【0141】[0141]

【発明の効果】以上述べたように、本発明は、ディジタ
ルテレビジョン放送等において、音声データ、映像デー
タおよびプライベートデータの多重化に好適である。ま
た、本発明によれば、ディジタルテレビジョン放送用等
の音声データ、映像データおよび付加データの高速多重
化に好適で、しかも、付加データの種類および処理の変
更に柔軟に対応しうる。
As described above, the present invention is suitable for multiplexing audio data, video data and private data in digital television broadcasting and the like. Further, according to the present invention, it is suitable for high-speed multiplexing of audio data, video data, and additional data for digital television broadcasting and the like, and can flexibly cope with changes in the type and processing of the additional data.

【0142】また、本発明によれば、ディジタルテレビ
ジョン放送設備等において、受信側の伸長復号装置の受
信バッファの残り記憶容量を考慮せず、しかも、浮動小
数点演算を用いない整数演算のみの簡単なアルゴリズム
で、受信バッファに破綻を生じさせないように、音声・
映像データを伝送パケットに多重化し、トランスポート
ストリームを生成することができる。また、本発明によ
れば、常に、受信側において正常に音声・映像データを
再生することができるように、音声・映像データを伝送
パケットに多重化し、トランスポートストリームを生成
することができる。
Further, according to the present invention, in a digital television broadcasting facility or the like, it is not necessary to consider the remaining storage capacity of the reception buffer of the decompression decoding device on the receiving side, and it is also possible to simply use only integer arithmetic without using floating point arithmetic. Voice and audio to prevent the reception buffer from breaking down
Video data can be multiplexed into transmission packets to generate a transport stream. Further, according to the present invention, a transport stream can be generated by multiplexing audio / video data into transmission packets so that audio / video data can always be normally reproduced on the receiving side.

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

【図1】第1の実施例として示す本発明に係るデータ多
重化装置の構成を示す図である。
FIG. 1 is a diagram showing a configuration of a data multiplexing apparatus according to the present invention shown as a first embodiment.

【図2】本発明に係るデータ多重化装置の構成を示す図
である。
FIG. 2 is a diagram showing a configuration of a data multiplexing device according to the present invention.

【図3】図2に示したビデオエンコーダの構成を示す図
である。
FIG. 3 is a diagram illustrating a configuration of a video encoder illustrated in FIG. 2;

【図4】図2に示したオーディオエンコーダの構成を示
す図である。
FIG. 4 is a diagram illustrating a configuration of an audio encoder illustrated in FIG. 2;

【図5】図2に示したデータ多重化装置の第2の実施例
におけるCPUの処理を示すフローチャートである。
FIG. 5 is a flowchart showing processing of a CPU in a second embodiment of the data multiplexing device shown in FIG. 2;

【図6】図2に示したデータ多重化装置が第3の実施例
において生成するトランスポートストリームに含まれる
各エレメンタリストリームの順番を例示する図である。
FIG. 6 is a diagram exemplifying an order of each elementary stream included in a transport stream generated by the data multiplexing apparatus shown in FIG. 2 in a third embodiment.

【図7】図2に示したデータ多重化装置のCPUの第3
の実施例における多重化計画の処理を示すフローチャー
トである。
FIG. 7 shows a third example of the CPU of the data multiplexer shown in FIG. 2;
It is a flowchart which shows the process of the multiplexing plan in Example of FIG.

【図8】第4の実施例において、データ多重化装置(図
2)のビデオエンコーダのビットレート制御回路に設定
される目標データ量video_rate_targe
tの算出方法を示すフローチャート図である。
FIG. 8 is a diagram showing a target data amount video_rate_target set in a bit rate control circuit of a video encoder of a data multiplexer (FIG. 2) in a fourth embodiment;
It is a flowchart figure which shows the calculation method of t.

【図9】図9は、MPEG方式において規格化されてい
るオーディオストリームのデータレートを示す図表であ
る。
FIG. 9 is a chart showing a data rate of an audio stream standardized in the MPEG system.

【図10】第4の実施例において、データ多重化装置
(図2)が、映像フレーム周期ごとにトランスポートス
トリームに多重化するオーディオストリームのデータ量
を算出し、ビデオストリーム等と多重化する処理を示す
フローチャート図である。
FIG. 10 is a diagram illustrating a process in which a data multiplexer (FIG. 2) calculates a data amount of an audio stream to be multiplexed into a transport stream for each video frame period and multiplexes the data with a video stream or the like in a fourth embodiment. It is a flowchart figure which shows.

【符号の説明】[Explanation of symbols]

1,2…データ多重化装置、10…多重化装置、100
…バッファメモリ、102…トランスポートストリーム
生成装置、12…多重化系、20…ビデオエンコーダ、
24…オーディオエンコーダ、28…サブタイトルエン
コーダ、32a,32b,32c…FIFOメモリ、3
4,36…スイッチ回路、38…FIFOメモリ、40
…SCSIIF回路、42…制御系、30a,30b,
30c…データ量IF、420…ENIF回路、422
…SIF回路、424…CPU、426…処理用RA
M、428…制御データ用RAM、430…RAM。
1, 2, ... data multiplexing device, 10 ... multiplexing device, 100
... Buffer memory, 102 ... Transport stream generator, 12 ... Multiplexing system, 20 ... Video encoder,
24: audio encoder, 28: subtitle encoder, 32a, 32b, 32c: FIFO memory, 3
4, 36: switch circuit, 38: FIFO memory, 40
... SCSIIF circuit, 42 ... control system, 30a, 30b,
30c: data amount IF, 420: ENIF circuit, 422
... SIF circuit, 424 ... CPU, 426 ... RA for processing
M, 428: RAM for control data, 430: RAM.

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】端数が生じないように、映像データの映像
フレーム周期それぞれに生成した映像データを等しいデ
ータ量ずつ配分することができる条件を満たす目標デー
タ量を算出する映像目標データ量算出手段と、 算出した前記目標データ量と等しいデータ量の映像デー
タを生成する映像データ生成手段と、 前記映像フレーム周期と異なる音声フレーム周期ごと
に、所定のデータ量の音声データを生成する音声データ
生成手段と、 生成した前記音声データを、前記映像フレーム周期それ
ぞれにほぼ等しいデータ量ずつ配分する音声データ配分
手段と、 前記映像フレーム周期ごとに、前記等しいデータ量の映
像データ、および、配分した前記音声データを、所定の
トランスポートストリームに多重化する多重化手段とを
有するデータ多重化装置。
1. A video target data amount calculating means for calculating a target data amount satisfying a condition that video data generated in each video frame period of video data can be distributed by an equal data amount so that a fraction does not occur. A video data generating unit that generates video data having a data amount equal to the calculated target data amount; and an audio data generating unit that generates audio data having a predetermined data amount for each audio frame period different from the video frame period. An audio data distribution unit that distributes the generated audio data by a data amount substantially equal to each of the video frame periods; and for each of the video frame periods, the video data having the same data amount and the allocated audio data. Multiplexing means for multiplexing data into a predetermined transport stream. Place.
【請求項2】前記映像データ生成手段は、非圧縮映像デ
ータを圧縮して、前記目標データ量に適合するデータレ
ートの前記映像データを生成する請求項1に記載のデー
タ多重化装置。
2. The data multiplexing apparatus according to claim 1, wherein said video data generating means compresses the uncompressed video data and generates the video data having a data rate suitable for the target data amount.
【請求項3】前記音声データ配分手段は、 所定数の前記映像フレーム周期の間に多重化する前記音
声データの目標データ量を算出する音声目標データ量算
出手段と、 当該映像フレーム周期の過去、前記所定数の前記映像フ
レーム周期の間に多重化した前記音声データのデータ量
を計数する音声データ計数手段と、 算出した前記音声データの目標データ量、および、計数
した前記音声データのデータ量とに基づいて、当該映像
フレーム周期に配分する前記音声データのデータ量を算
出する音声データ配分量算出手段とを有する請求項1に
記載のデータ多重化装置。
3. The audio data distribution unit includes: an audio target data amount calculation unit that calculates a target data amount of the audio data to be multiplexed during a predetermined number of the video frame periods; Audio data counting means for counting a data amount of the audio data multiplexed during the predetermined number of video frame periods; a calculated target data amount of the audio data; and a counted data amount of the audio data. 2. The data multiplexing apparatus according to claim 1, further comprising: audio data distribution amount calculation means for calculating a data amount of the audio data to be allocated to the video frame cycle based on the audio data.
【請求項4】前記音声データおよび前記映像データに付
加する付加データを生成する付加データ生成手段をさら
に有し、 前記多重化手段は、生成した付加データを、さらに前記
所定のトランスポートストリームに多重化する請求項1
に記載のデータ多重化装置。
4. An apparatus according to claim 1, further comprising additional data generating means for generating additional data to be added to said audio data and said video data, wherein said multiplexing means further multiplexes said generated additional data into said predetermined transport stream. Claim 1
3. The data multiplexing device according to 1.
【請求項5】端数が生じないように、映像データの映像
フレーム周期それぞれに生成した映像データを等しいデ
ータ量ずつ配分することができる条件を満たす目標デー
タ量を算出し、 算出した前記目標データ量と等しいデータ量の映像デー
タを生成し、 前記映像フレーム周期と異なる音声フレーム周期ごと
に、所定のデータ量の音声データを生成し、 生成した前記音声データを、前記映像フレーム周期それ
ぞれにほぼ等しいデータ量ずつ配分し、 前記映像フレーム周期ごとに、前記等しいデータ量の映
像データ、および、配分した前記音声データを、所定の
トランスポートストリームに多重化するデータ多重化方
法。
5. A target data amount that satisfies a condition that video data generated in each video frame period of the video data can be distributed by an equal data amount so that a fraction does not occur, and the calculated target data amount is calculated. And generating audio data of a predetermined data amount for each audio frame period different from the video frame period, and generating the generated audio data with data substantially equal to each of the video frame periods. A data multiplexing method of allocating video data of the same data amount and the allocated audio data to a predetermined transport stream for each video frame period.
【請求項6】非圧縮映像データを圧縮して、前記目標デ
ータ量に適合するデータレートの前記映像データを生成
する請求項5に記載のデータ多重化方法。
6. The data multiplexing method according to claim 5, wherein uncompressed video data is compressed to generate said video data having a data rate adapted to said target data amount.
【請求項7】所定数の前記映像フレーム周期の間に多重
化する前記音声データの目標データ量を算出し、 当該映像フレーム周期の過去、前記所定数の前記映像フ
レーム周期の間に多重化した前記音声データのデータ量
を計数し、 算出した前記音声データの目標データ量、および、計数
した前記音声データのデータ量とに基づいて、当該映像
フレーム周期に配分する前記音声データのデータ量を算
出する請求項5に記載のデータ多重化方法。
7. A target data amount of the audio data to be multiplexed during a predetermined number of the video frame periods, and multiplexed during the predetermined number of the video frame periods in the past of the video frame period. The data amount of the audio data is counted, and the data amount of the audio data to be allocated to the video frame cycle is calculated based on the calculated target data amount of the audio data and the counted data amount of the audio data. The data multiplexing method according to claim 5, wherein
【請求項8】前記音声データおよび前記映像データに付
加する付加データを生成し、 生成した付加データを、さらに前記所定のトランスポー
トストリームに多重化する請求項5に記載のデータ多重
化方法。
8. The data multiplexing method according to claim 5, wherein additional data to be added to said audio data and said video data is generated, and said generated additional data is further multiplexed into said predetermined transport stream.
JP7183497A 1997-03-25 1997-03-25 Data multiplexer and method therefor Pending JPH10271463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7183497A JPH10271463A (en) 1997-03-25 1997-03-25 Data multiplexer and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7183497A JPH10271463A (en) 1997-03-25 1997-03-25 Data multiplexer and method therefor

Publications (1)

Publication Number Publication Date
JPH10271463A true JPH10271463A (en) 1998-10-09

Family

ID=13471982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7183497A Pending JPH10271463A (en) 1997-03-25 1997-03-25 Data multiplexer and method therefor

Country Status (1)

Country Link
JP (1) JPH10271463A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010033125A (en) * 2008-07-25 2010-02-12 Hitachi Ltd Storage apparatus and data transfer method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010033125A (en) * 2008-07-25 2010-02-12 Hitachi Ltd Storage apparatus and data transfer method
US8352663B2 (en) 2008-07-25 2013-01-08 Hitachi, Ltd. Data storage apparatus and method of data transfer

Similar Documents

Publication Publication Date Title
US6542518B1 (en) Transport stream generating device and method, and program transmission device
US6327421B1 (en) Multiple speed fast forward/rewind compressed video delivery system
JP3976759B2 (en) Device for synchronizing audio and video signals
JP3103301B2 (en) Multiplexing method of audio / video signal stream encoded according to MPEG1 standard
US5963256A (en) Coding according to degree of coding difficulty in conformity with a target bit rate
US6157674A (en) Audio and video data transmitting apparatus, system, and method thereof
KR100226528B1 (en) Decoder for compressed and multiplexed video and audio data
EP0634867B1 (en) Compressed and coded data recording method
JP3666625B2 (en) Data recording method and data recording apparatus
US7379497B2 (en) Encoded data outputting apparatus and method
US6347119B2 (en) Communication apparatus, communication method and storage medium
JPH0738857A (en) Synchronization system for time-division video and audio signals
JPH09509035A (en) Audio / video timing mismatch management
JP2001346201A (en) Image coder and its method, image decoder and its method, image recorder, image transmitter
CN100353766C (en) Data stream replaying equipment and method, digital broadcast receiver and correlative computer program
EP0826289B1 (en) Data multiplexing apparatus
US20100257575A1 (en) Apparatus for receiving and playing back data
JPH0730886A (en) Method and device for processing picture and audio signal
JP3556381B2 (en) Information multiplexing device
JP3277971B2 (en) Data multiplexing apparatus, data multiplexing method, and data recording medium
JPH10271463A (en) Data multiplexer and method therefor
JPH09312625A (en) Data multiplexer and its method
JP2005151463A (en) Device and method for receiving stream data
JPH09312656A (en) Transmitter and method therefor
JPH11298893A (en) Transport stream synchronous circuit