JP4095081B2 - Stream converter - Google Patents
Stream converter Download PDFInfo
- Publication number
- JP4095081B2 JP4095081B2 JP2005246204A JP2005246204A JP4095081B2 JP 4095081 B2 JP4095081 B2 JP 4095081B2 JP 2005246204 A JP2005246204 A JP 2005246204A JP 2005246204 A JP2005246204 A JP 2005246204A JP 4095081 B2 JP4095081 B2 JP 4095081B2
- Authority
- JP
- Japan
- Prior art keywords
- data stream
- stream
- information
- data
- buffer
- 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.)
- Expired - Fee Related
Links
Images
Description
本発明は、例えば、画像情報の圧縮符号化規格であるMPEG2規格におけるプログラムストリームとトランスポートストリームのように、同じ素材から生成され構造の異なるデータストリームにおいて、その一方を他方へ変換するストリーム変換装置の技術分野に属する。 The present invention relates to a stream conversion apparatus for converting one of data streams generated from the same material and having a different structure, such as a program stream and a transport stream in the MPEG2 standard, which is a compression encoding standard for image information, to the other. Belongs to the technical field.
近年、記録容量を飛躍的に向上させた光ディスクであるDVDが一般化しつつあるが、このDVDへの画像情報の記録に際しては、いわゆるMPEG2規格(ISO(International Organization for Standardization)規格13818−1)が用いられている。このとき、当該DVDに対して画像情報と音声情報を合成して記録する際には、当該MPEG2規格におけるプログラムストリーム(以下、PSと称する。)と呼ばれるデータストリームを生成してこれをDVDに記録することが行われている。 In recent years, DVDs, which are optical discs with dramatically improved recording capacities, are becoming popular. When recording image information on these DVDs, the so-called MPEG2 standard (ISO (International Organization for Standardization) standard 13818-1) is used. It is used. At this time, when image information and audio information are combined and recorded on the DVD, a data stream called a program stream (hereinafter referred to as PS) in the MPEG2 standard is generated and recorded on the DVD. To be done.
一方、通信系又は伝送系では、同じくMPEG2規格で定義されているいわゆるトランスポートストリーム(以下、TSと称する。)を使用するのが一般的である。このTSは、近年実用化が予定されているATV(Advanced Television)でも採用される予定である。 On the other hand, in a communication system or transmission system, it is common to use a so-called transport stream (hereinafter referred to as TS) that is also defined in the MPEG2 standard. This TS is also planned to be adopted in ATV (Advanced Television), which is planned for practical use in recent years.
ここで、DVDから再生された画像情報等を上記通信系又は伝送系を用いて外部に伝送する場合に、上記PSからTSへの変換を行わないとすると、一度PSを復号してから符号化してTSを生成するか、又はPSを当該PSを構成するエレメンタリーストリーム(画像又は音声のデータそのもの)に展開し、これをTSを構成する情報単位に変換してから再度合成する処理が必要となる。 Here, when image information reproduced from a DVD is transmitted to the outside using the communication system or the transmission system, if conversion from the PS to the TS is not performed, the PS is once decoded and encoded. To generate a TS, or develop a PS into an elementary stream (image or audio data itself) constituting the PS, convert it into information units constituting the TS, and then re-synthesize it. Become.
ここで、上述のうち、前者の場合には、構成が複雑で高価な符号化器を使用する必要があり、しかも再度の符号化によって画質又は音質の劣化が起きる場合があるという問題点があった。 Here, in the former case, there is a problem that it is necessary to use an encoder having a complicated configuration and an expensive encoder, and the image quality or sound quality may be deteriorated by re-encoding. It was.
また、後者の場合は、常に当該エレメンタリーストリームが復号器内のバッファに蓄積される量を確認しながら、合成を行い、更にPS内の再生すべき再生時間等を示す時間情報を新たに算出する必要があり、変換装置としては複雑な処理が必要となるという問題点があった。 In the latter case, synthesis is performed while always checking the amount of the elementary stream stored in the buffer in the decoder, and time information indicating the playback time to be reproduced in the PS is newly calculated. There is a problem in that the conversion device requires complicated processing.
一方、今後ディジタル放送が一般的になってくると、それを受信するテレビジョン装置には上記TSを復号するMPEG2復号器が搭載されることが予想されるが、ここで、PSとTSの双方は画像情報の復号処理については共通である。よって、例えばテレビジョン装置にDVDの再生装置を接続して画像情報を再生する場合等においては当該テレビジョン装置と再生装置のいずれか一方にのみ画像デコーダを含ませるのが、装置の構成上経済的であると考えられ、この意味でもPSをTSに簡便に変換するストリーム変換装置が必要であるという問題点があった。 On the other hand, when digital broadcasting becomes common in the future, it is expected that a television apparatus that receives the digital broadcast will be equipped with an MPEG2 decoder for decoding the TS. Here, both PS and TS are used. Is common to the decoding process of image information. Therefore, for example, in the case of reproducing image information by connecting a DVD playback device to a television device, it is economical in terms of the device configuration to include an image decoder only in either the television device or the playback device. In this sense, there is a problem that a stream conversion device that easily converts PS to TS is necessary.
そこで、本発明は、上述の各問題点に鑑みて為されたもので、その課題は、複雑な処理を必要とせずに、効率よくPSをTSに変換することが可能なストリーム変換装置を提供することにある。 Accordingly, the present invention has been made in view of the above-described problems, and the problem is to provide a stream conversion apparatus that can efficiently convert PS to TS without requiring complicated processing. There is to do.
上記の課題を解決するために、請求項1に記載の発明は、復号の際にビデオバッファ等の第1バッファ手段においてオーバーフロー及びアンダーフローのいずれもが発生しないように設定された第1時間情報を含むPS等の第1データストリームであって、当該第1時間情報に基づいて前記第1バッファ手段に一時的に記憶されつつ復号される第1データストリームを、第2時間情報に基づいてトランスポートバッファ等の第2バッファ手段に一時的に記憶されつつ復号される第2データストリームに変換するストリーム変換装置において、前記変換後の第2データストリームを復号する際に前記第2バッファ手段においてオーバーフロー又はアンダーフローのいずれもが発生しないように前記第2時間情報を設定するコントローラ等の設定手段と、前記設定された第2時間情報を多重しつつ前記第1データストリームを当該第2データストリームに変換するコントローラ等の変換手段と、を備え、前記第2データストリームの転送レートが前記第1データストリームの転送レートよりも高いと共に、前記変換手段は、前記第1時間情報に基づいて、前記第1データストリームを当該第1時間情報を用いて復号する時の前記第1バッファ手段内の当該第1データストリームの蓄積量を予測算出する第1算出手段と、前記第2時間情報に基づいて、前記第2データストリームを当該第2時間情報を用いて復号する時の前記第2バッファ手段内の当該第2データストリームの蓄積量を予測算出する第2算出手段と、前記第1バッファ手段内の当該第1データストリームの蓄積量と前記第2バッファ手段内の当該第2データストリームの蓄積量との差が予め設定された所定の閾値以上となった時、前記第1データストリームに無関係の予め設定された挿入情報を挿入しつつ前記第1データストリームを前記第2データストリームに変換する挿入変換手段と、により構成され、前記第2バッファ手段は、少なくとも前記第2データストリームに固有の固有バッファ手段を有し、 前記閾値は、前記第2バッファ手段内の当該第2データストリームの蓄積量が前記第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ前記固有バッファ手段の最大容量以下であることを特徴とする。
In order to solve the above problem, the invention according to
請求項1に記載の発明の作用によれば、設定手段は、変換後の第2データストリームを復号する際に第2バッファ手段においてオーバーフロー又はアンダーフローのいずれもが発生しないように第2時間情報を設定する。 According to the operation of the first aspect of the present invention, the setting means outputs the second time information so that neither overflow nor underflow occurs in the second buffer means when the converted second data stream is decoded. Set.
そして、変換手段は、設定された第2時間情報を多重しつつ第1データストリームを当該第2データストリームに変換する。
また、第2データストリームの転送レートが第1データストリームの転送レートよりも高いと共に、変換手段における第1算出手段は、第1時間情報に基づいて第1データストリームを当該第1時間情報を用いて復号する時の第1バッファ手段内の当該第1データストリームの蓄積量を予測算出する。
これと並行して、変換手段における第2算出手段は、第2時間情報に基づいて第2データストリームを当該第2時間情報を用いて復号する時の第2バッファ手段内の当該第2データストリームの蓄積量を予測算出する。
そして、挿入変換手段は、第1バッファ手段内の当該第1データストリームの蓄積量と第2バッファ手段内の当該第2データストリームの蓄積量との差が所定の閾値以上となった時、第1データストリームに無関係の挿入情報を挿入しつつ第1データストリームを第2データストリームに変換する。
また、第2バッファ手段は、少なくとも固有バッファ手段を有し、上記閾値は、第2バッファ手段内の当該第2データストリームの蓄積量が第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ固有バッファ手段の最大容量以下であるようにされている。
Then, the converting means converts the first data stream into the second data stream while multiplexing the set second time information.
In addition, the transfer rate of the second data stream is higher than the transfer rate of the first data stream, and the first calculation unit in the conversion unit uses the first data stream based on the first time information. The amount of accumulation of the first data stream in the first buffer means at the time of decoding is predicted and calculated.
In parallel with this, the second calculating means in the converting means uses the second data stream in the second buffer means when decoding the second data stream using the second time information based on the second time information. Is estimated and calculated.
When the difference between the accumulated amount of the first data stream in the first buffer unit and the accumulated amount of the second data stream in the second buffer unit becomes equal to or greater than a predetermined threshold, The first data stream is converted into the second data stream while inserting irrelevant insertion information into one data stream.
Further, the second buffer means has at least a unique buffer means, and the threshold value is determined so that the accumulated amount of the second data stream in the second buffer means is the accumulated amount of the first data stream in the first buffer means. It is set so as to always exceed the maximum capacity of the unique buffer means.
よって、第2データストリームの復号処理が中断することを防止しつつ、且つ第1データストリームに対して分解処理等を施すことなく簡易な処理で第2データストリームに変換することができる。
また、各バッファ手段の蓄積量の差が所定の閾値以上となったとき、第1データストリームに無関係の挿入情報を挿入しつつ変換するので、第1データストリームのデータ内容を変更することなく、且つ第2バッファ手段におけるオーバーフロー又はアンダーフローを防止して第1データストリームを第2データストリームに変換することができる。
また、第2データストリーム固有の他のバッファ手段を新たに設ける必要がないと共に、固有バッファ手段におけるオーバーフロー又はアンダーフローを確実に防止しつつ第1データストリームを第2データストリームに変換することができる。
Therefore, it is possible to convert the second data stream into the second data stream by a simple process while preventing the decoding process of the second data stream from being interrupted and performing the decomposition process on the first data stream.
Further, when the difference between the accumulated amounts of the respective buffer means becomes a predetermined threshold value or more, since conversion is performed while inserting irrelevant insertion information into the first data stream, without changing the data content of the first data stream, In addition, the first data stream can be converted into the second data stream by preventing overflow or underflow in the second buffer means.
Further, it is not necessary to newly provide other buffer means unique to the second data stream, and the first data stream can be converted into the second data stream while reliably preventing overflow or underflow in the unique buffer means. .
上記の課題を解決するために、請求項2に記載の発明は、請求項1に記載のストリーム変換装置において、前記第1バッファ手段に前記第1データストリームを記憶させる際に当該第1バッファ内に予め設定された未記憶領域が生じるように前記第1時間情報が設定されていると共に、前記閾値は、前記固有バッファ手段内の当該第2データストリームの蓄積量が前記第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ前記固有バッファ手段の最大容量に前記未記憶領域の容量を加算した値以下であるように構成される。
In order to solve the above problem, the invention according to
請求項2に記載の発明の作用によれば、請求項1に記載の発明の作用に加えて、第1時間情報が、第1バッファ手段に第1データストリームを記憶させる際に当該第1バッファ内に未記憶領域が生じるように設定されていると共に、上記閾値は、固有バッファ手段内の当該第2データストリームの蓄積量が第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ固有バッファ手段の最大容量に未記憶領域の容量を加算した値以下とされている。
According to the operation of the invention described in
よって、固有バッファ手段におけるオーバーフロー又はアンダーフローを確実に防止しつつ第1データストリームを第2データストリームに変換することができる。 Therefore, it is possible to convert the first data stream into the second data stream while reliably preventing overflow or underflow in the specific buffer means.
上記の課題を解決するために、請求項3に記載の発明は、請求項1又は2に記載のストリーム変換装置において、前記挿入情報は、少なくとも、新たな前記第2時間情報、前記第2データストリームに含まれるデータの内容を示す内容情報又は0を示す情報の内のいずれかの情報であるように構成される。
In order to solve the above-mentioned problem, the invention according to
請求項3に記載の発明の作用によれば、請求項1又は2に記載の発明の作用に加えて、挿入情報は、少なくとも、新たな第2時間情報、内容情報又は0を示す情報の内のいずれかの情報であるので、第2データストリームの復号の際に影響を与えることなく当該第2データストリームを生成することができる。
According to the operation of the invention described in
上記の課題を解決するために、請求項4に記載の発明は、請求項3に記載のストリーム変換装置において、前記第2データストリームにおいて、前記挿入情報のうち、前記第2時間情報及び前記内容情報の挿入頻度が予め設定されているとき、前記変換手段は、当該挿入頻度を満たすように前記第2時間情報及び前記内容情報を挿入すると共に、前記第2時間情報及び前記内容情報を挿入すべき位置以外の前記挿入情報を挿入すべき前記第2データストリーム内の位置に前記0を示す情報を挿入するように構成される。
In order to solve the above-described problem, the invention according to claim 4 is the stream conversion device according to
請求項4に記載の発明の作用によれば、請求項3に記載の発明の作用に加えて、第2データストリームにおいて、挿入情報のうち第2時間情報及び内容情報の挿入頻度が予め設定されているとき、変換手段は、当該挿入頻度を満たすように第2時間情報及び内容情報を挿入すると共に、第2時間情報及び内容情報を挿入すべき位置以外の挿入情報を挿入すべき第2データストリーム内の位置に0を示す情報を挿入するので、効率的に第1データストリームを第2データストリームに変換することができる。
According to the operation of the invention described in claim 4 , in addition to the operation of the invention described in
上記の課題を解決するために、請求項5に記載の発明は、請求項1乃至4のいずれか一項に記載のストリーム変換装置において、前記第1データストリームは、DVDから検出されたMPEG2規格のプログラムストリームであり、前記第2データストリームは前記MPEG2規格のトランスポートストリームであると共に、前記変換手段は、前記トランスポートストリームにおいて不要な前記プログラムストリーム内のデータである不要データを削除しつつ当該プログラムストリームを前記トランスポートストリームに変換するように構成される。
In order to solve the above-mentioned problem, the invention according to
請求項5に記載の発明の作用によれば、請求項1乃至4のいずれか一項に記載の発明の作用に加えて、第1データストリームは、DVDから検出されたMPEG2規格のプログラムストリームであり、第2データストリームはMPEG2規格のトランスポートストリームであると共に、変換手段は不要データを削除しつつ当該プログラムストリームをトランスポートストリームに変換する。
According to the operation of the invention described in
よって、DVDから検出されたプログラムストリームを効率的にトランスポートストリームに変換することができる。 Therefore, the program stream detected from the DVD can be efficiently converted into a transport stream.
上記の課題を解決するために、請求項6に記載の発明は、請求項5に記載のストリーム変換装置において、前記変換手段は、前記不要データに代えて前記第2バッファ手段におけるアンダーフローを防止するためのダミーデータを挿入して前記プログラムストリームを前記トランスポートストリームに変換するように構成される。 In order to solve the above-described problem, according to a sixth aspect of the present invention, in the stream conversion device according to the fifth aspect , the conversion unit prevents underflow in the second buffer unit instead of the unnecessary data. The program stream is converted into the transport stream by inserting dummy data for performing the above.
請求項6に記載の発明の作用によれば、請求項5に記載の発明の作用に加えて、変換手段は、不要データに代えて第2バッファ手段におけるアンダーフローを防止するためのダミーデータを挿入してプログラムストリームをトランスポートストリームに変換する。
According to the operation of the invention described in
よって、トランスポートストリームの内容に影響を与えることなく第2バッファ手段のアンダーフローを防止して当該トランスポートストリームを生成することができる。
上記の課題を解決するために、請求項7に記載の発明は、復号の際に第1バッファ手段においてオーバーフロー及びアンダーフローのいずれもが発生しないように設定された第1時間情報を含む第1データストリームであって、当該第1時間情報に基づいて前記第1バッファ手段に一時的に記憶されつつ復号される第1データストリームを、第2時間情報に基づいて第2バッファ手段に一時的に記憶されつつ復号される第2データストリームに変換するストリーム変換装置において、前記変換後の第2データストリームを復号する際に前記第2バッファ手段においてオーバーフロー又はアンダーフローのいずれもが発生しないように前記第2時間情報を設定する設定手段と、前記設定された第2時間情報を多重しつつ前記第1データストリームを当該第2データストリームに変換する変換手段と、を備え、前記第2データストリームの転送レートが前記第1データストリームの転送レートよりも高いと共に、前記変換手段は、前記第1時間情報に基づいて、前記第1データストリームを当該第1時間情報を用いて復号する時の前記第1バッファ手段内の当該第1データストリームの蓄積量を予測算出する第1算出手段と、前記第2時間情報に基づいて、前記第2データストリームを当該第2時間情報を用いて復号する時の前記第2バッファ手段内の当該第2データストリームの蓄積量を予測算出する第2算出手段と、前記第1バッファ手段内の当該第1データストリームの蓄積量と前記第2バッファ手段内の当該第2データストリームの蓄積量との差が予め設定された所定の閾値以上となった時、前記第1データストリームに無関係の予め設定された挿入情報を挿入しつつ前記第1データストリームを前記第2データストリームに変換する挿入変換手段と、により構成され、前記挿入情報は、少なくとも、新たな前記第2時間情報、前記第2データストリームに含まれるデータの内容を示す内容情報又は0を示す情報の内のいずれかの情報であることを特徴とする。
上記の課題を解決するために、請求項8に記載の発明は、請求項7に記載のストリーム変換装置において、前記第2データストリームにおいて、前記挿入情報のうち、前記第2時間情報及び前記内容情報の挿入頻度が予め設定されているとき、前記変換手段は、当該挿入頻度を満たすように前記第2時間情報及び前記内容情報を挿入すると共に、前記第2時間情報及び前記内容情報を挿入すべき位置以外の前記挿入情報を挿入すべき前記第2データストリーム内の位置に前記0を示す情報を挿入することを特徴とする。
Therefore, the transport stream can be generated while preventing the underflow of the second buffer means without affecting the contents of the transport stream.
In order to solve the above problem, the invention according to claim 7 includes the first time information set so that neither overflow nor underflow occurs in the first buffer means during decoding. A first data stream that is a data stream and is decoded while being temporarily stored in the first buffer means based on the first time information is temporarily stored in the second buffer means based on the second time information. In the stream conversion device for converting into a second data stream to be decoded while being stored, the second buffer means prevents any overflow or underflow from occurring when the converted second data stream is decoded. Setting means for setting second time information; and the first data stream while multiplexing the set second time information. Converting means to convert the second data stream into a second data stream, wherein the transfer rate of the second data stream is higher than the transfer rate of the first data stream, and the conversion means is based on the first time information First calculation means for predicting and calculating an accumulation amount of the first data stream in the first buffer means when the first data stream is decoded using the first time information, and the second time information. A second calculating means for predicting and calculating an accumulation amount of the second data stream in the second buffer means when the second data stream is decoded using the second time information; The difference between the accumulated amount of the first data stream in the buffer means and the accumulated amount of the second data stream in the second buffer means is less than a predetermined threshold value set in advance. And inserting and converting means for converting the first data stream into the second data stream while inserting preset insertion information irrelevant to the first data stream. The information is at least one of the new second time information, the content information indicating the content of the data included in the second data stream, or the information indicating 0.
In order to solve the above-described problem, the invention according to claim 8 is the stream conversion apparatus according to claim 7, wherein in the second data stream, the second time information and the content of the insertion information are included. When the information insertion frequency is set in advance, the conversion means inserts the second time information and the content information so as to satisfy the insertion frequency, and inserts the second time information and the content information. Information indicating 0 is inserted at a position in the second data stream where the insertion information other than the power position is to be inserted.
以上説明したように、請求項1に記載の発明によれば、第2データストリームの復号処理が中断することを防止しつつ、且つ第1データストリームに対して分解処理等を施すことなく簡易な処理で第1データストリームを第2データストリームに変換することができる。また、各バッファ手段の蓄積量の差が所定の閾値以上となったとき、第1データストリームに無関係の挿入情報を挿入しつつ変換するので、第1データストリームのデータ内容を変更することなく、且つ第2バッファ手段におけるオーバーフロー又はアンダーフローを防止して第1データストリームを第2データストリームに変換することができる。また、第2バッファ手段内に少なくとも固有バッファ手段を有し、上記閾値が第2バッファ手段内の当該第2データストリームの蓄積量が第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ固有バッファ手段の最大容量以下であるようにされているので、第2データストリーム固有の他のバッファ手段を新たに設ける必要がないと共に、固有バッファ手段におけるオーバーフロー又はアンダーフローを確実に防止しつつ第1データストリームを第2データストリームに変換することができる。 As described above, according to the first aspect of the present invention, the decoding process of the second data stream is prevented from being interrupted, and the first data stream is simplified without being subjected to a decomposition process or the like. The process can convert the first data stream into a second data stream. Further, when the difference between the accumulated amounts of the respective buffer means becomes a predetermined threshold value or more, since conversion is performed while inserting irrelevant insertion information into the first data stream, without changing the data content of the first data stream, In addition, the first data stream can be converted into the second data stream by preventing overflow or underflow in the second buffer means. Further, the second buffer means has at least a unique buffer means, and the threshold value is always equal to the accumulated amount of the second data stream in the second buffer means. Since it is set so as to exceed the maximum capacity of the unique buffer means, there is no need to newly provide another buffer means unique to the second data stream, and an overflow in the unique buffer means or The first data stream can be converted to the second data stream while reliably preventing underflow.
請求項2に記載の発明によれば、請求項1に記載の発明の効果に加えて、上記閾値が、固有バッファ手段内の当該第2データストリームの蓄積量が第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ固有バッファ手段の最大容量に未記憶領域の容量を加算した値以下とされているので、固有バッファ手段におけるオーバーフロー又はアンダーフローを確実に防止しつつ第1データストリームを第2データストリームに変換することができる。 According to the second aspect of the present invention, in addition to the effect of the first aspect of the invention, the threshold value is determined so that the accumulated amount of the second data stream in the unique buffer means is the first value in the first buffer means. It is set to always exceed the accumulated amount of one data stream, and it is set to a value equal to or less than the maximum capacity of the unique buffer means plus the capacity of the unstored area, so that overflow or underflow in the unique buffer means is ensured. It is possible to convert the first data stream into the second data stream while preventing the above.
請求項3に記載の発明によれば、請求項1又は2に記載の発明の効果に加えて、挿入情報が、少なくとも、新たな第2時間情報、内容情報又は0を示す情報の内のいずれかの情報であるので、第2データストリームの復号の際に影響を与えることなく当該第2データストリームを生成することができる。
According to the invention described in
請求項4に記載の発明によれば、請求項3に記載の発明の効果に加えて、第2データストリームにおいて、挿入情報のうち第2時間情報及び内容情報の挿入頻度が予め設定されているとき、当該挿入頻度を満たすように第2時間情報及び内容情報を挿入すると共に、第2時間情報及び内容情報を挿入すべき位置以外に挿入情報を挿入すべき第2データストリーム内の位置に0を示す情報を挿入するので、効率的に第1データストリームを第2データストリームに変換することができる。
According to the invention described in claim 4 , in addition to the effect of the invention described in
請求項5に記載の発明によれば、請求項1乃至4のいずれか一項に記載の発明の効果に加えて、第1データストリームは、DVDから検出されたMPEG2規格のプログラムストリームであり、第2データストリームはMPEG2規格のトランスポートストリームであると共に、変換手段は不要データを削除しつつ当該プログラムストリームをトランスポートストリームに変換するので、DVDから検出されたプログラムストリームを効率的にトランスポートストリームに変換することができる。
According to the invention described in
請求項6に記載の発明によれば、請求項5に記載の発明の効果に加えて、不要データに代えてダミーデータを挿入してプログラムストリームをトランスポートストリームに変換するので、トランスポートストリームの内容に影響を与えることなく第2バッファ手段のアンダーフローを防止して当該トランスポートストリームを生成することができる。
According to the invention described in
次に、本発明に好適な実施の形態について、図面に基づいて説明する。なお、以下に説明する実施の形態は、DVDから再生されたPSを、TSを用いて画像を表示する構成のテレビジョン装置において表示する場合に対して本発明を適用した場合の実施の形態である。 Next, preferred embodiments of the present invention will be described with reference to the drawings. The embodiment described below is an embodiment in which the present invention is applied to a case where a PS reproduced from a DVD is displayed on a television apparatus configured to display an image using a TS. is there.
(I)前提事項の説明
始めに、具体的な実施の形態について説明する前に、本発明を説明する上での前提となる基礎的技術について図1乃至図5を用いて説明する。
(I) Description of Premises First, before describing specific embodiments, basic techniques that serve as a premise for describing the present invention will be described with reference to FIGS.
先ず、本発明に係るPS及びTSが含まれるMPEG2規格におけるシステムストリームの基本単位であるPES(Packetized Elementary Stream)パケット(以下、単にパケットと称する。)について図1(a)を用いてその構造を説明する。 First, the structure of a PES (Packetized Elementary Stream) packet (hereinafter simply referred to as a packet) which is a basic unit of a system stream in the MPEG2 standard including PS and TS according to the present invention will be described with reference to FIG. explain.
図1(a)に示すように、パケットPTは、上述したエレメンタリーストリームをパケット化したものであり、PESパケットヘッダ(以下、単にパケットヘッダと称する。)55と、パケットデータ(以下、単にパケットデータと称する。)56とにより構成されている。 As shown in FIG. 1A, a packet PT is a packetized version of the above-described elementary stream, and includes a PES packet header (hereinafter simply referred to as a packet header) 55 and packet data (hereinafter simply referred to as a packet). (Referred to as data) 56.
ここで、パケットデータ56は、実際に表示又は出力すべき画像データ又はオーディオデータが含まれている。
Here, the
また、パケットヘッダ55には、パケットデータ56に含まれているデータの種類を示すストリームIDやPTS(Presentation Time Stamp)及びDTS(Decoding Time Stamp)等が含まれている。
The
ここで、DTSはシステムストリームを復号するためのデコーダ内のバッファから復号されたピクチャデータが出力される時刻を示す90kHzを単位とする時間情報であり、PTSは当該ピクチャデータに対応する画像が実際に表示される時刻を示す90kHzを単位とする時間情報である。 Here, DTS is time information in units of 90 kHz indicating the time when decoded picture data is output from the buffer in the decoder for decoding the system stream, and PTS is the actual image corresponding to the picture data. Is time information in units of 90 kHz indicating the time displayed on the screen.
このとき、PESパケットデータ56がオーディオデータの時はPTSとDTSは同じ値になるので、それらの代表としてPTSのみが含まれる。
At this time, when the
また、PTS及びDTSは、パケットデータ56中にアクセスユニット(すなわち、画像情報の場合は各ピクチャであり、オーディオ情報の場合はAAU(Audio Access Unit)が相当する。)の先頭が存在する時のみ当該パケットヘッダ55内に含まれる。
PTS and DTS are only when the head of an access unit (that is, each picture in the case of image information and AAU (Audio Access Unit) in the case of audio information) is present in the
従って、上記パケットヘッダ55の大きさ(ビット数)はそれに含まれる上記PTS及びDTS等のオプション情報の有無によって変化することとなる。
Accordingly, the size (number of bits) of the
そして、図1(a)に示すパケットPTが複数個組み合わされ、更に後述する付加情報が組み合わされてMPEG2の上記システムストリームが形成される。 A plurality of packets PT shown in FIG. 1A are combined, and additional information described later is combined to form the MPEG2 system stream.
次に、上記システムストリームの一形態である上記PSについて、図1(b)を用いて一般的に説明する。 Next, the PS that is one form of the system stream will be generally described with reference to FIG.
上記PSは、複数個のパックを含んで構成されており、一のパックPは、図1(b)に示すように、一のパックヘッダ57と、システムヘッダ58と、複数個の上記パケットPTとから構成されている。
The PS includes a plurality of packs, and one pack P includes one
このうち、パックヘッダ57には、SCR(System Clock Reference;システム時刻基準参照値)等が含まれており、少なくとも0.7msecに一回はPS中に含まれている必要がある。このSCRはそれが含まれるパックPが復号器内のバッファに到着する時刻を90kHz単位で記述したものである。
Among these, the
より具体的に当該SCRについて説明すると、当該SCRは、夫々のパックPに含まれているデータの復号器内のバッファへの入力を開始すべき再生時間軸上の読み出し開始時刻を示すものである。 The SCR will be described more specifically. The SCR indicates a read start time on the reproduction time axis at which input of data included in each pack P should be started to the buffer in the decoder. .
また、パックヘッダ57の大きさは14バイトにダミーデータを加算したバイト数となる。
The size of the
更に、システムヘッダ58には上記バッファのサイズ等の情報が含まれており、一のパックP内に含まれるか否かは任意に設定できるが、含ませる場合にはパックヘッダ57の直後に合成される。
Further, the
次に、図1(b)に示したパックPを複数個含むPSが上記DVDに記録されている時の当該DVD上の物理的なフォーマットについて、図2を用いて説明する。 Next, a physical format on the DVD when a PS including a plurality of packs P shown in FIG. 1B is recorded on the DVD will be described with reference to FIG.
図2に示すように、DVD1は、その最内周部にリードインエリアLIを有すると共にその最外周部にリードアウトエリアLOを有しており、その間に、映像情報及び音声情報が、夫々にID(識別)番号を有する複数のVTS(Video Title Set )3(VTS#1乃至VTS#n)に分割されて記録されている。この複数のVTS3と後述するビデオマネージャ2とを合わせたものが上記PSに相当する。
As shown in FIG. 2, the
ここで、VTSとは、関連する(それに含まれる音声情報及び副映像情報の数や、仕様、対応言語等の属性が同じ)タイトル(映画等の、製作者が視聴者に提示しようとする一つの作品)を一まとめにしたセット(まとまり)である。 Here, the VTS is a related title (the number of audio information and sub-picture information included therein, the attributes such as the specification, the corresponding language, etc. are the same) titles (movies etc.) that the producer intends to present to the viewer. It is a set (group) of all the works.
また、VTS3が記録されている領域の先頭には、ビデオマネージャ2が記録される。このビデオマネージャ2として記録される情報は、例えば、各タイトルのメニューや、違法コピー防止のための情報、又は夫々のタイトルにアクセスするためのアクセステーブル等、当該DVD1に記録される映像情報及び音声情報の全体に係わる管理情報が記録されている。
In addition, the
次に、一のVTS3は、コントロールデータ11を先頭として、夫々にID番号を有する複数のVOB10に分割されて記録されている。ここで、複数のVOB10により構成されている部分をVOBセット(VOBS)という。このVOBセットは、VTS3を構成する他のデータであるコントロールデータ11と、映像情報及び音声情報の実体である複数のVOB10の部分とを区別するために当該実体部分についてVOBセットとしたものである。
Next, one
VTS3の先頭に記録されるコントロールデータ11には、複数のセル(セルについては後述する。)を組合わせた論理的区分であるプログラムチェインに関する種々の情報であるPGCI(Program Chain Information )等の情報が記録されている。また、各VOB10には、制御情報の他に映像情報及び音声情報の実体部分(制御情報以外の映像又は音声そのもの)が記録されている。
The
更に、一のVOB10は、夫々にID番号を有する複数のセル20により構成されている。ここで、一のVOB10は、複数のセル20により完結するように構成されており、一のセル20が二つのVOB10に跨がることはない。
Furthermore, one
次に、一のセル20は、夫々にID番号を有する複数のVOBユニット(VOBU)30により構成されている。ここで、VOBユニット30とは、映像情報、音声情報及び副映像情報(映画における字幕等の副映像の情報をいう。)の夫々を含む情報単位である。
Next, one
そして、一のVOBユニット30は、所定の制御情報が格納されているナビパック41と、映像情報としてのビデオデータを含むビデオパック42と、音声情報としてのオーディオデータを含むオーディオパック43と、副映像情報としてのサブピクチャデータを含むサブピクチャパック44とにより構成されている。ここで、ビデオデータとしては映像データのみが記録され、オーディオデータとしては音声データのみが記録されている。また、サブピクチャデータとしては副映像としての文字や図形等のグラフィックデータの含まれるパケットPTが記録されている。なお、DVD1に記録可能な音声は8種類であり、記録可能な副映像の種類は32種類であることが規格上定められている。
One
また、一のVOBユニット30に対応する再生時間(一のナビパック41と当該一のナビパック41に隣接するナビパック41との間に記録されているデータに対応する再生時間)は、0.4秒以上1秒以下の長さを有するように記録されている。
The playback time corresponding to one VOB unit 30 (playback time corresponding to data recorded between one
ここで、一のVOBユニット30に対応する再生時間を0.4秒以上とするのは、再生装置におけるPCIバッファの記憶容量を低減させるためであり、1秒以下とするのは、MPEG2方式の規格上定められているビデオパック42のデコード処理のための許容遅延時間が1秒とされているからである。従って、ナビパック41は、再生時、0.4秒乃至1秒に1回は必ず検出されることとなる。
Here, the playback time corresponding to one
更に、一のVOBユニット30において、ナビパック41は必ずその先頭に存在するが、ビデオパック42、オーディオパック43及びサブピクチャパック44の夫々は、必ずしもVOBユニット30中に存在する必要はなく、また、存在する場合にもその数や順序は任意に設定することができる。
Further, in one
ここで、図2に示すビデオパック42、オーディオパック43及びサブピクチャパック44の夫々の区分が上述したパックPに相当する。
Here, each of the
また、上記各パックPについては、通常、当該パックPを更に細分化した記録単位である上記パケットPT毎にビデオデータ、オーディオデータ又はサブピクチャデータが記録されるが、本実施形態におけるDVD1では、一般に一のパックPが一のパケットPTにより構成されている。
For each pack P, video data, audio data, or sub-picture data is normally recorded for each packet PT, which is a recording unit obtained by further subdividing the pack P. In the
更に、一のVOBユニット30に含まれている全てのビデオパック42は一又は複数のGOP(Group Of Picture)により構成されている。
Furthermore, all the video packs 42 included in one
ここで、上記各パックの内、ナビパック41、ビデオパック42及びオーディオパック43の夫々について細部構成を説明する。
Here, the detailed configuration of each of the
先ず、図3(a)に示すように、ナビパック41は、一のVOBユニット30に必ず一個含まれており、ビデオデータに先立って記述され、再生表示させたい映像又は音声等を検索するための検索情報(具体的には、当該再生表示させたい映像又は音声等が記録されているDVD1上のアドレス等)を含むパケットPTであるDSIパケット51と、DSIパケット51内のデータに基づいて検索してきた映像又は音声を表示する際の再生表示制御に関する情報を含むパケットPTであるPCIパケット50とにより構成される。この二つのパケットにおいては、パケットヘッダ55にはPTSもDTSも記述されていない。
First, as shown in FIG. 3A, one
このとき、各パケットにおけるストリームIDは両方とも0xBF(プライベートストリーム2規格の場合)であり、パケットヘッダ55の後にサブストリームIDとして夫々「0x00」及び「0x01」が記述されており、これによってPCIパケット50かDSIパケット51かの識別が可能となっている。
At this time, the stream IDs in each packet are both 0xBF (in the case of the
なお、このサブストリームIDは、MPEG2の規格にはないものであり、DVD独自の規格である。 This substream ID is not in the MPEG2 standard and is a DVD-specific standard.
また、PCIパケット50内には、視聴者によって選択される選択項目に対して、その項目が選択されたときの表示や動作を定義したハイライト情報が含まれている。このハイライト情報によって、例えば、視聴者が選択すべき項目を表示した画像(いわゆるメニュー画面)における、項目選択に対する画面表示の変化や、当該選択に対応して変化すべき表示位置及び選択された項目に対するコマンド(選択された項目に対して実行される動作を示す命令)等の設定が行われる。
Further, the
ここで、メニュー画面を構成して表示するために必要な、枠、選択ボタン等を表示するための画像情報は、上記の副映像情報であるサブピクチャデータとして記録されている。 Here, image information for displaying a frame, a selection button, and the like necessary for configuring and displaying the menu screen is recorded as sub-picture data which is the sub-picture information.
更に、上記GOPは、MPEG2規格において定められている単独で再生可能な最小の画像単位であり、各GOPの先頭には、当該GOPに含まれるビデオデータを表示すべき再生時間軸上の再生時刻を示す上記PTSが記録されている。 Further, the GOP is a minimum image unit that can be reproduced independently in the MPEG2 standard. At the head of each GOP, the reproduction time on the reproduction time axis at which video data included in the GOP is to be displayed. Is recorded.
次に、ビデオパック42について図3(b)を用いて説明する。
Next, the
図3(b)に示すように、ビデオパック42にはMPEG2で圧縮されたビデオデータ64が含まれている。
As shown in FIG. 3B, the
このビデオデータ64としては、一のDVD1では一種類の画像情報のみが含まれる。
The
また、パケットPT内にMPEG2におけるI(Intra-coded)ピクチャの先頭がある時、PTSとDTSがパケットヘッダ55内に含まれている。
Further, when there is a head of an I (Intra-coded) picture in MPEG2 in the packet PT, the PTS and DTS are included in the
更に、ストリームIDは「0xE0」である。 Furthermore, the stream ID is “0xE0”.
なお、図3(b)では、パックヘッダ57の後にビデオデータ64を含むパケットPTが一個だけ存在しているが、データレートを調整するためにパケットPTの後にダミーデータ(パディングパケットとも称する。)を挿入してもよい。この場合、パックヘッダ57、パケットPT及び当該ダミーデータの合計が2048バイトとなる。
In FIG. 3B, only one packet PT including the
また、このビデオデータ64においては、当該ビデオデータ64がビデオデータ64用のバッファにおいてオーバーフローもアンダーフローも起こさないようにPS内に挿入される。
The
次に、オーディオパック43について、図3(c)を用いて説明する。
Next, the
図3(c)に示すように、オーディオパック43には、AC−3と称される方式で圧縮されたオーディオデータ65が含まれている。
As shown in FIG. 3C, the
このとき、上述のように、DVD1に記録可能な音声情報は8種類であり、パケットPT中に上記AAUの先頭があるとき、PTSがパケットヘッダ55に記述される。
At this time, as described above, there are eight types of audio information that can be recorded on the
又、ストリームIDは「0xBD」(プライベートストリーム1規格の場合)であり、上記サブストリームIDは「0x80−0x87」である。このサブストリームIDの下位3ビットによって音声情報のストリーム番号が定義される。
The stream ID is “0xBD” (in the case of the
ここで、サブストリームIDを含む4バイトはプライベートデータエリアと称され、オーディオデータ65の先頭に記述されており、AC‐3方式の再生用の情報が含まれている。これらはMPEG2の規格にないものであり、DVD1独自の規格である。
Here, 4 bytes including the substream ID are referred to as a private data area, which is described at the head of the
更に、図3(c)ではパックヘッダ57の後にオーディオデータ65を含むパケットPTが一個だけ含まれているが、ビデオパック42の場合と同様に、データレートを調整するためにパケットPTの後にダミーデータを挿入してもよい。この場合、パックヘッダ57、パケットPT及び当該ダミーデータの合計が2048バイトとなる。
Further, in FIG. 3C, only one packet PT including the
また、このオーディオパック43においては、オーディオデータ65がオーディオデータ65用のバッファにおいてオーバーフローもアンダーフローも起こさないようにPS内に挿入される。
In the
次に、上述したPSを復号する際に用いられる復号器の構成及び動作について、図4を用いて説明する。 Next, the configuration and operation of the decoder used when decoding the above-described PS will be described with reference to FIG.
図4(a)に示すように、PSの復号器Dは、デマルチプレクサ66と、第1バッファ手段としてのビデオバッファ67と、ビデオデコーダ68と、オーディオバッファ69と、オーディオデコーダ70とにより構成されている。
As shown in FIG. 4A, the PS decoder D includes a
次に、動作の概要を説明する。 Next, an outline of the operation will be described.
デマルチプレクサ66に入力されるPSのデータレートは10.08Mbpsである。
The data rate of PS input to the
そして、デマルチプレクサ66でPSから分離されたビデオパック42が一時的に蓄積されるビデオバッファ67の容量は、MPEG2−MP@ML(Main Profile at Main Level)で定められている229376バイトと付加バッファ8192バイトの和である237568バイトとなる。
The capacity of the
一方、デマルチプレクサ66でPSから分離されたオーディオパック43が一時的に蓄積されるオーディオバッファ69の容量は、4096バイトである。
On the other hand, the capacity of the
そして、PSでは、ビデオバッファ67及びオーディオバッファ69がオーバーフローもアンダーフローもしないように上記PTS及びDTSが管理されてPSとして合成されている。
In the PS, the PTS and DTS are managed and synthesized as PS so that the
次に、図4(b)にビデオバッファ67の占有量の一例を示す。ここで、図4(b)中、Bsvmaxは蓄積量の最大値、すなわち237568バイトを示している。
Next, FIG. 4B shows an example of the occupied amount of the
図4(b)に示すように、ビデオバッファ67には、常に一定のデータレート(DVD1の場合10.08Mbps)でデータが入力される。
As shown in FIG. 4B, data is always input to the
なお、図4(b)で平坦になっている部分はオーディオデータ65を含むパケットPTがある等の理由により、ビデオバッファ67にビデオデータ64が入力されない期間を示している。更に、ビデオバッファ67からのビデオデータ64の出力については、ピクチャ単位で一枚のピクチャ毎に一瞬に出力される。
4B shows a period in which the
次に、上記システムストリームの一形態である上記TSについて、図5を用いて一般的に説明する。なお、図5(a)は元のエレメンタリーストリームから当該TSが生成される状態を示し、図5(b)は当該TSの復号に用いられる復号器の概要構成を示すブロック図である。 Next, the TS that is one form of the system stream will be generally described with reference to FIG. 5A shows a state where the TS is generated from the original elementary stream, and FIG. 5B is a block diagram showing a schematic configuration of a decoder used for decoding the TS.
図5(a)に示すように、システムストリームからTSを形成するときには、元のシステムストリームにおけるパケットPTが184バイト毎の部分パケットBPTに分解され、夫々の部分パケットBPTに4バイトのリンクヘッダ71が付加されて一のTSパケットTPTが形成される。
As shown in FIG. 5A, when a TS is formed from a system stream, the packet PT in the original system stream is broken down into partial packets BPT every 184 bytes, and a 4-
そして、188バイトのTSパケットTPTを一単位として他のシステムストリームから生成されたTSパケットTPTと多重される。 Then, a 188-byte TS packet TPT is multiplexed as a unit with a TS packet TPT generated from another system stream.
ここで、夫々のリンクヘッダ71には、PID(Packet ID。13ビットのストリーム識別情報で、該当TSパケットTPTの個別ストリームの識別番号を示す。)等が含まれる。
Here, each
また、これらと共にTS独自のテーブルが複数個多重される。 Along with these, a plurality of tables unique to TS are multiplexed.
なお、PSが単一のプログラム(ビデオデータ又はオーディオデータを纏めた一つの単位)の伝送しかできないのに対して、TSは複数のプログラムを一度に伝送することが可能である。 Note that PS can only transmit a single program (one unit of video data or audio data), whereas TS can transmit a plurality of programs at once.
上述した複数のテーブルのうち、プログラムアソシエーションテーブル(以下、PAT(Program Association Table)と称する。)には、あるプログラム番号に対して、対応するプログラムマップテーブル(以下、PMT(Program Map Table)と称する。)のPID等が含まれる。PAT自体のPIDは「0x00」である。 Among the plurality of tables described above, the program association table (hereinafter referred to as PAT (Program Association Table)) is referred to as a program map table (hereinafter referred to as PMT (Program Map Table)) corresponding to a certain program number. PID etc.). The PID of the PAT itself is “0x00”.
一方、PMTは、そのプログラムに含まれる映像、音声、付加データのPIDが含まれている。 On the other hand, the PMT includes PIDs of video, audio, and additional data included in the program.
そして、これらのテーブルがl84バイトに満たない時、この後に「0xFF」を必要な数だけ挿入して合計184バイトにする。 When these tables are less than l84 bytes, the necessary number of “0xFF” is inserted after this to make a total of 184 bytes.
リンクヘッダ71の後にはアダプテーションフィールドを挿入することができ、当該フィールドにはPCR(Program Clock Reference)等が記述される。このPCRはPSにおけるSCRに相当するもので、そのTSパケットTPTが復号器のバッファに到着する時刻が90kHz単位及び27MHz単位で記述されている。
An adaptation field can be inserted after the
なお、アダプテーションフィールドの後にパケットPTを挿入することもできる。この場合、当該パケットPTの長さが184バイトに満たない時には、アダプテーションデータ中にあるダミーデータで調整されることとなる。 Note that the packet PT can be inserted after the adaptation field. In this case, when the length of the packet PT is less than 184 bytes, adjustment is made with dummy data in the adaptation data.
また、PCRは0.1秒以内に1回以上挿入されることが規定されている。 Moreover, it is prescribed that PCR is inserted at least once within 0.1 seconds.
更に、「0」を示すパケット(以下、ヌルパケットと称する。)は主に転送レートの調整のために挿入されるもので、ペイロード(TSパケットTPT内のリンクヘッダ71又はアダプテーションフィールド以外の実際のデータが記述される部分をいう。)にはヌルパケットしては意味のあるデータは挿入されない。
Further, a packet indicating “0” (hereinafter referred to as a null packet) is inserted mainly for adjusting the transfer rate, and the payload (actual data other than the
次に、上記TSが用いられるテレビジョン装置におけるシステム規格について説明する。 Next, a system standard in a television apparatus using the TS will be described.
当該システム規格は基本的にはTSの規格そのままであるが、これに加えて更なる制限がある。すなわち、
(i)PMTは0.4秒に1回以上挿入されなければならない。
The system standard is basically the TS standard, but there are further restrictions in addition to this. That is,
(I) The PMT must be inserted at least once every 0.4 seconds.
(ii)PATは0.1秒に1回以上挿入されなければならない。 (Ii) The PAT must be inserted at least once per 0.1 second.
(iii)パケットPTのペイロードはビデオアクセスユニットの先頭(ピクチャ開始コード、グループ開始コード又はシーケンスヘッダ)で始まらなければならない。 (Iii) The payload of the packet PT must start at the beginning of the video access unit (picture start code, group start code or sequence header).
(iv)オーディオデータ65はAC−3方式で圧縮されている。このとき、ストリームIDは「0xBD」(プライベートストリーム1の場合)である。
(Iv) The
(v)多重レートは、約19.39Mbpsである。 (V) The multiplex rate is about 19.39 Mbps.
次に、上記TSが復号される復号器の構成及び動作について、図5(b)を用いて説明する。 Next, the configuration and operation of the decoder for decoding the TS will be described with reference to FIG.
図5(b)に示すように、当該復号器D’は、デマルチプレクサ72と、第2バッファ手段及び固有バッファ手段としてのトランスポートバッファ73及び76と、ビデオバッファ74と、ビデオデコーダ75と、オーディオバッファ77と、オーディオデコーダ78とにより構成されている。
As shown in FIG. 5B, the decoder D ′ includes a
次に、動作の概要を説明する。 Next, an outline of the operation will be described.
デマルチプレクサ72でTSから分離されたビデオデータが一時的に蓄積されるビデオバッファ74の容量は、MPEG2−MP@MLで定められている229376バイトと付加バッファ10000バイトの和である239376バイトとなる。
The capacity of the
一方、デマルチプレクサ72でTSから分離されたオーディオデータが一時的に蓄積されるオーディオバッファ77の容量は、原則として3584バイトであるがテレビジョン装置としては厳密には規格化されていない。
On the other hand, the capacity of the
そして、TSでは、ビデオバッファ74及びオーディオバッファ77がオーバーフローもアンダーフローもしないようにPTS及びDTSが管理されてTSとして合成されている。
In the TS, the PTS and DTS are managed and synthesized as a TS so that the
更に、トランスポートバッファ73及び76は、リンクヘッダ71等により生じるデータの偏りを補償するためのものであり、512バイトと規格されている。
Further, the transport buffers 73 and 76 are for compensating for the data bias caused by the
(II)実施形態
次に、上述した前提事項に基づいて、DVD1から再生されたPSを、本発明によりTSに変換し、当該TSを用いて画像等を表示する構成のテレビジョン装置において出力する情報再生装置の実施形態について、図6乃至図18を用いて説明する。
(II) Embodiment Next, based on the above-mentioned premise, PS reproduced from
始めに、実施形態の情報再生装置の全体構成について、図6を用いて説明する。 First, the overall configuration of the information reproducing apparatus according to the embodiment will be described with reference to FIG.
図6に示すように、実施形態の情報再生装置Sは、DVD1から再生されたPSをTSに変換して出力すると共に、当該PSを外部に出力する再生装置Rと、生成されたTSに基づいて当該TSに対応する画像又は音声を外部に出力するテレビジョン装置TVとにより構成されている。
As shown in FIG. 6, the information reproducing apparatus S of the embodiment converts the PS reproduced from the
また、再生装置Rは、DVD1に対して光ビームを照射し、その反射光に基づいて当該DVD1上に形成されている情報ピットを検出する検出回路80と、検出された情報ピットに対応する信号を復調する復調回路81と、復調された情報に対してエラー訂正を行いPSを出力するエラー訂正回路82と、本発明に係るPS/TS変換器84と、により構成されている。
Further, the reproducing apparatus R irradiates the
また、テレビジョン装置TVは、再生装置Rから再生されたTSをデコードし当該TSに対応する音声又は画像を外部に出力する図5(b)に示した復号器D’を含んで構成されている。 Further, the television device TV is configured to include the decoder D ′ shown in FIG. 5B that decodes the TS reproduced from the reproduction device R and outputs the sound or image corresponding to the TS to the outside. Yes.
次に、本発明に係る上記PS/TS変換器84の細部構成及び動作について、図7乃至図18を用いて説明する。
Next, the detailed configuration and operation of the PS /
始めに、PS/TS変換器84の細部構成及び概要動作について、図7を用いて説明する。
First, the detailed configuration and outline operation of the PS /
図7に示すように、実施形態のPS/TS変換器84は、復調器85と、抜取回路86と、PLL(Phase Locked Loop)87と、PESメモリ88と、リンクヘッダメモリ89と、ヌルパケットメモリ90と、PCRメモリ91と、PATメモリ92と、PMTメモリ93と、第1算出手段、第2算出手段、挿入変換手段、設定手段及び変換手段としてのコントローラ94と、アドレスバス95と、データバス96と、TSメモリ97と、により構成されている。
As shown in FIG. 7, the PS /
この構成において、復調器85は、入力されたPSを復調し、PSクロックPCKを生成して抜取回路86及びPLL87に出力すると共に、PSに含まれる情報に対応するデータPDATAを生成して抜取回路86に出力する。
In this configuration, the
そして、抜取回路86は、PSからTSに変換するに際して不要なデータをデータPDATAから後述の動作により抜き取り、対応する各信号をコントローラ94に出力すると共に、PSクロックPCKから内部クロックWCKを生成してPESメモリ88に出力する。
Then, the
一方、PESメモリ88、リンクヘッダメモリ89、ヌルパケットメモリ90、PCRメモリ91、PATメモリ92及びPMTメモリ93は、後述するコントローラ94の動作により、アドレスバス95から出力されるアドレス情報に基づいて各データを一時的に記憶し、データバス96に出力する。
On the other hand, the
このとき、アドレスバス95は、コントローラ94の制御により、各メモリ間のアドレスの授受を行い、データバス96は、コントローラ94の制御により、各メモリ間のデータの授受を行う。
At this time, the
そして、TSメモリ97は、生成されたTSを一時的に記憶して、テレビジョン装置TVに対して当該TSに対応するデータTDATAを出力する。
Then, the
これらの動作において、コントローラ94は、各メモリにおける読み出し及び書き込みを制御信号Scを用いて制御する。
In these operations, the
なお、図7において、符号「RD」はメモリ内容の読み出しのための制御を示し、符号「WE」はメモリへの書き込みのための制御を示している。 In FIG. 7, the symbol “RD” indicates control for reading the memory contents, and the symbol “WE” indicates control for writing to the memory.
これらの動作と並行して、PLL87は、PSクロックPCKからTS用のTSクロックTCKを生成し、データTDATAと併せてテレビジョン装置TVに出力すると共にTSメモリ97に出力する。
In parallel with these operations, the
次に、上記抜取回路86の細部動作について、図8乃至図11を用いて説明する。
Next, the detailed operation of the
図8に示すように、先ず、抜取回路86は、PSの中からパックヘッダ57と、システムヘッダ58を捨て去り、パケットPTのみを抜き出す。
As shown in FIG. 8, first, the
実施形態のテレビジョン装置TVの場合、ビデオデータ64を含むパケットPT(以下、単にビデオパケットと称する。)のペイロードの先頭はピクチャの先頭でなくてはならないが、DVD1においては、ビデオパケットのペイロードの先頭とピクチャの先頭が一致していることが保証されるのはVOBU30の単位だけであるので、VOBU30以外の他のパケットヘッダ55は取り去り、VOBU30単位で一つの大きい仮想的なパケットとする。
In the television apparatus TV of the embodiment, the beginning of the payload of a packet PT (hereinafter simply referred to as a video packet) including the
この際、当該パケットの大きさは変化するので、パケットヘッダ中のパケット長を示すデータを「0」(即ち、規定せず。)に書き換える。このとき、PTS及びDTSは書き換えない。 At this time, since the size of the packet changes, the data indicating the packet length in the packet header is rewritten to “0” (that is, not specified). At this time, PTS and DTS are not rewritten.
また、ビデオデータ64及びオーディオデータ65以外のデータを含む不要なパケットPTも抜取回路86で除かれる。このとき、複数のオーディオストリームがある場合には、そのうちの不要なストリームも除かれる。この場合、不要なストリームの選択は図示しない選択回路によって行われる。
Unnecessary packet PT including data other than
更に、DVD1上のPSの場合、AC−3方式のオーディオデータ65を含むオーディオパック43におけるパケットヘッダ55の後には上記プライベートデータエリアが設けられており、当該エリアには前述したサブストリームID等の情報が4バイト分記述されているが、これは再生装置R以外では不要な情報なのでこれも除かれる。
Further, in the case of PS on the
但し、単に抜き取るだけではパケット長さ情報と実際のパケットPTの長さが齟齬するので、この場合はパケットヘッダ55中にダミーデータを設けて調整する。
However, since the packet length information and the actual length of the packet PT are inconsistent simply by extraction, dummy data is provided in the
より具体的には、元のパケットヘッダ55を送出した後に4バイトの「0xFF」を送出し、パケット長さ情報の値に「4」を加算する。
More specifically, after sending the
次に、抜取回路86の具体的な動作について、図9乃至図11のフローチャートを用いて説明する。
Next, a specific operation of the
抜取回路86においては、先ず、電源ON又はリセットが為されると(ステップS1)、最初のパックヘッダスタートコード(パックヘッダ57が入力されたことを示すコード)が検出されたか否かが判定され(ステップS2)、検出されないときは(ステップS2;False(以下、単にFと示す。))検出されるまで待機し、検出されたときは(ステップS2;True(以下、単にTと示す。))、そのパックヘッダ57の中からSCR基礎部及びSCR拡張部を抜き出してこれらを正しい順序に並べ替え、SCR信号Sscrとしてコントローラ94に出力する。そして、当該スタートコード及びパックヘッダ57内の残りl0バイトを破棄する(ステップS3)。
In the
次に、その次の4バイトがシステムヘッダスタートコード(システムヘッダ58が入力されたことを示すコード。具体的には、「0x000001BB」)かどうかを検出し(ステップS4)、そうでなければ(ステップS4;F)上記スタートコードを含む残りの2030バイトのデータを破棄して(ステップS5)初期状態に戻る。これまでのステップS1乃至S5は、システムヘッダ58を有するパケットPTを検索する処理である。この処理により、常にGOPの先頭からストリーム変換を開始することができる。
Next, it is detected whether or not the next 4 bytes are a system header start code (a code indicating that the
一方、システムヘッダスタートコードが見つかると(ステップS4;T)、その旨を示すスタート信号Sstをコントローラ94に送出すると共に、そのSCRをSCR信号Sscrとしてコントローラ94に送出し、当該コントローラ94中のスタートフラグを「HIGH」にする。
On the other hand, when a system header start code is found (step S4; T), a start signal Sst indicating that is sent to the
ここで、SCRを送出するプロトコルは任意であり、また、当該スタートフラグを「LOW」にするタイミングも任意である。例えば、一定のパルス幅をもってコントローラ94で立ち上がりを検出してもよいし、レジスタ構成にしてコントローラ94でリセットしてもよい。
Here, the protocol for transmitting the SCR is arbitrary, and the timing for setting the start flag to “LOW” is also arbitrary. For example, the rising edge may be detected by the
次に、コントローラ94内の内部レジスタのうち、ナビパック検出レジスタを「HIGH」とし、その後、残りの2030バイトを破棄する(ステップS6)。
Next, among the internal registers in the
次に、パックヘッダスタートコードを検出する(ステップS7)。 Next, a pack header start code is detected (step S7).
ここで、この時点では必ず当該パックヘッダスタートコードがあるはずなので(ステップS7;T)、ここはそのまま通過し、SCRを入手してこれをコントローラ94にSCR信号Sscrとして送出する。更に、パックヘッダ57の残りの情報10バイトは必要ないので破棄する(ステップS8)。
Here, since the pack header start code must be present at this time (step S7; T), this is passed through as it is, and the SCR is obtained and transmitted to the
次に、システムヘッダスタートコードが入力されてきたか否かが検出され(ステップS9)、入力されてきたときは(ステップS9;T)、このときに検出されているパックはナビパック41であるので、ナビパック検出レジスタを「HIGH」とした後(ステップS10)、残りの2030バイトを破棄して(ステップS11)ステップS7に戻る。
Next, it is detected whether or not a system header start code has been input (step S9). If it has been input (step S9; T), the pack detected at this time is the
一方、ステップS9においてシステムヘッダスタートコードが検出されていないときは(ステップS9;F)、次に、ビデオパケットスタートコード(ビデオデータ64を含むパケットPTが入力されたことを示すコード)が検出されたか否かが判定され(ステップS12)、検出されたときは(ステップS12;T)、そのパックPをPESメモリ88に送出し(ステップS13)ステップS7に戻る。このステップS13の細部処理については、後程詳述する。
On the other hand, when the system header start code is not detected in step S9 (step S9; F), a video packet start code (a code indicating that the packet PT including the
一方、ステップS12においてビデオパケットスタートコードが検出されないときは(ステップS12;F)、次に、プライベートストリーム1スタートコードが検出されたか否かが判定され(ステップS14)、検出されているときは(ステップS14;T)、このパックがAC‐3方式のオーディオデータ43を扱う場合のみ、データをPESメモリ88に転送する(ステップS15)。このステップS15の細部処理についても、後程詳述する。
On the other hand, when the video packet start code is not detected in step S12 (step S12; F), it is next determined whether or not the
更に、プライベートストリーム1スタートコードも検出されないときは(ステップS14;F)そのパックP中の残りデータ2030バイトを破棄して(ステップS16)ステップS7に戻り、ダミーデータを除去しつつ上述した動作を繰り返す。
Further, when the
次に、ステップS13における処理の細部を図10を用いて説明する。 Next, details of the processing in step S13 will be described with reference to FIG.
ステップS13では、先ず、ナビパック検出フラグを検証する(ステップS20)。 In step S13, first, the navigation pack detection flag is verified (step S20).
そして、これが「HIGH」であった時は(ステップS20;T)VOBU30の最初のビデオパック64なので、そのパケットヘッダ55もPESメモリ88に伝送する必要があることになる。
When this is “HIGH” (step S20; T), since it is the
この場合、先ずパケットスタートコードをPESメモリ88に伝送してから(ステップS21)残りのパケットヘッダ55を抜取回路86内蔵の図示しないRAMに格納する(ステップS22)。このとき、残りのパケットヘッダ55の大きさはヘッダ長さ情報により簡単に計算できる。
In this case, the packet start code is first transmitted to the PES memory 88 (step S21), and the remaining
次にペイロードの大きさを計算する(ステップS23)。これは、具体的には、
(数1)
ペイロードの大きさ=(PESパケット長さ情報の値)−3−(ヘッダ長さ情報の値)
により計算できる。この計算後の値は抜取回路86内のレジスタに格納される。
Next, the size of the payload is calculated (step S23). Specifically,
(Equation 1)
Payload size = (value of PES packet length information) -3- (value of header length information)
Can be calculated by The calculated value is stored in a register in the
次に、抜取回路86内蔵のRAMに入っているパケットヘッダ55を、パケット長さ情報を「0」に書き直した後(ステップS24)PESメモリ88に伝送する(ステップS25)。
Next, after rewriting the packet length information to “0” (step S24), the
この後、ペイロードの内容が、ステップS23で計算した量だけPESメモリ88に伝送される(ステップS26)。
Thereafter, the content of the payload is transmitted to the
そして、PESメモリ88への各データの伝送が終わったら、伝送したバイト数をパケット長さ信号Spdlとしてコントローラ94に転送する(ステップS27)。このとき、当該伝送したバイト数は、カウンタ等でカウントしてもよいし、パケット長さ情報により予め計算しておいてもよい。
When the transmission of each data to the
これで所定の転送が終わったので、ナビパック検出フラグを「LOW」として(ステップS28)、更にパケット転送信号Spdtをコントローラ94に出力し(ステップS33)、これにより転送終了をコントローラ94に告知して抜取回路86内蔵のRAMのポインタをリセットし(ステップS34)元のメインルーチンに戻る。
Since the predetermined transfer is completed, the navigation pack detection flag is set to “LOW” (step S28), and the packet transfer signal Spdt is output to the controller 94 (step S33), thereby notifying the
一方、ステップS20において、ナビパック検出フラグが「LOW」のときは(ステップS20;F)ペイロードだけを伝送すればよいので、先ず、パケットヘッダ55を抜取回路86内蔵のRAMに格納し(ステップS29)、この内容を使ってペイロードの大きさを計算し、抜取回路86内蔵のレジスタに格納する(ステップS30)。
On the other hand, when the navigation pack detection flag is “LOW” in step S20 (step S20; F), only the payload needs to be transmitted. First, the
この後、ペイロードをPESメモリ88に転送し(ステップS31)、伝送したバイト数をパケット長さ信号Spdlとしてコントローラ94に転送して(ステップS32)ステップS33に移行する。
Thereafter, the payload is transferred to the PES memory 88 (step S31), the number of transmitted bytes is transferred to the
次に、ステップS15における処理の内容の細部を図11を用いて説明する。 Next, details of the contents of the processing in step S15 will be described with reference to FIG.
ステップS15では、そのパケットが必要なAC−3方式のストリームかどうかを検証し、当該AC−3方式のストリームならばダミーデータを付加した後にPESメモリ88に伝送する。
In step S15, it is verified whether the packet is a necessary AC-3 system stream, and if it is the AC-3 system stream, dummy data is added and then transmitted to the
先ず、プライベートストリーム1スタートコードと、残りのパケットヘッダ55、及びその後の4バイトのデータを抜取回路86内蔵のRAMに格納する(ステップS35、S36、S37)。
First, the
次にプライベートデータ中のサブストリームIDを検証し、これがAC−3方式のオーディオデータ65を示しているか否かを判断する(ステップS38)。そして、AC−3方式のオーディオデータ65でなければ(ステップS38;F)PESメモリ88に伝送する必要がないので、抜取回路86内臓のRAMのポインタをリセットして(ステップS46)元のメインルーチンに戻る。
Next, the substream ID in the private data is verified, and it is determined whether or not it indicates AC-3 audio data 65 (step S38). If it is not AC-3 audio data 65 (step S38; F), since there is no need to transmit it to the
一方、ステップS38の判定において、それがAC−3方式のオーディオデータ65を示している場合には(ステップS38;T)、このストリームが複数あるうちの所望のストリームであるかどうかを検証する(ステップS39)。
On the other hand, if it is determined in step S38 that the AC-3
そして、所望のストリームでなければ(ステップS39;F)同じく内臓RAMのポインタをリセット(ステップS46)してメインルーチンに戻る。 If it is not a desired stream (step S39; F), the internal RAM pointer is reset (step S46) and the process returns to the main routine.
一方、ステップS39の判定において、AC−3方式のオーディオデータ65であり、且つ所望のストリームであることが確認されたら(ステップS39;T)、プライベートヘッダはDVD1特有の情報であるので4バイトのダミーデータに書き換え、パケットヘッダ長さ情報の値に「4」を加算して同じく書き換える(ステップS40)。
On the other hand, if it is confirmed in step S39 that the
また、ビデオデータ64の場合と同じようにペイロードの大きさを計算し、プライベートデータの分4バイトを引いて抜取回路86内蔵のレジスタに格納する(ステップS41)。
Further, the size of the payload is calculated in the same manner as in the case of the
この後、抜取回路86内臓のRAMの内容とペイロードをPESメモリ88に伝送し(ステップS42、S43)、伝送したバイト数をパケット長さ信号Spdlとしてコントローラ94に転送する(ステップS44)。
Thereafter, the contents and payload of the RAM built in the
これで所定の転送が終わったので、パケット転送信号Spdtをコントローラ94に出力し(ステップS45)、これにより転送終了をコントローラ94に告知して抜取回路86内蔵のRAMのポインタをリセットし(ステップS46)元のメインルーチンに戻る。
Since the predetermined transfer is completed, the packet transfer signal Spdt is output to the controller 94 (step S45), thereby notifying the
ここで、PESメモリ88はいわゆるFIFO(First In First Out)動作を行う。
Here, the
こののPESメモリ88は、パック単位で動作するので、その容量は4kバイト程度あればよい。
Since the
また、TSにおけるリンクヘッダ71、ヌルパケット、PCRパケット、PAT及びPMTの5種類のTSパケットTPTの中身はほとんどのビットが固定なので、いったん雛形を作って各RAM(リンクヘッダメモリ89、ヌルパケットメモリ90、PCRメモリ91、PATメモリ92及びPMTメモリ93)に入力しておき、適宜変更して必要な場所に多重する。このとき、各RAMの入力、変更はコントローラ94がデータバス96を経由して行う。
Since the contents of the five types of TS packet TPT of the
ここで、夫々のRAMに入力されるTSパケットTPTの値の例を具体的に示す。 Here, an example of the value of the TS packet TPT input to each RAM is specifically shown.
始めに、リンクヘッダメモリ89に入力されるリンクヘッダ71を含むTSパケットTPTの値の例を以下の表に示す。
First, an example of the value of the TS packet TPT including the
すなわち、ペイロードが184バイトでダミーデータがないときは、最初の4バイトのみを読み出す。この場合、アダプテーションフィールドコントロール(Adaptation Field Control)は「01」となる。 That is, when the payload is 184 bytes and there is no dummy data, only the first 4 bytes are read. In this case, the adaptation field control (Adaptation Field Control) is “01”.
また、ペイロードが183バイトで1バイトのダミーデータが必要な時は、最初の5バイトを読み出す。この場合、アダプテーションフィールドコントロールは「11」となり、アダプテーションフィールドレングス(Adaptation Field Length)は「0x00」となる。 When the payload is 183 bytes and 1-byte dummy data is required, the first 5 bytes are read. In this case, the adaptation field control is “11”, and the adaptation field length (Adaptation Field Length) is “0x00”.
更に、ペイロードが182バイトで2バイトのダミーデータが必要な時は、最初の6バイトを読み出す。この場合、アダプテーションフィールドコントロールは「11」、アダプテーションフィールドレングスは「0x01」となる。 Further, when the payload is 182 bytes and 2 bytes of dummy data is required, the first 6 bytes are read. In this case, the adaptation field control is “11”, and the adaptation field length is “0x01”.
最後に、ペイロードが1バイトから181バイトまでのときは、188バイトからペイロードのバイト数を引いた量だけ読み出す。この場合、アダプテーションフィールドコントロールは「11」、アダプテーションフィールドレングスは183バイトからペイロードのバイト数を引いた値となる。 Finally, when the payload is from 1 byte to 181 bytes, only the amount obtained by subtracting the number of bytes of the payload from 188 bytes is read. In this case, the adaptation field control is “11”, and the adaptation field length is a value obtained by subtracting the number of bytes of the payload from 183 bytes.
また、PIDの値はエレメンタリーストリームの種類による。 The value of PID depends on the type of elementary stream.
本実施形態のテレビジョン装置TVの場合、プログラム番号を4ビット左にシフトしたものを基礎PIDとすると、ビデオは(基礎PID+0x0001)、オーディオは(基礎PID+0x0004)と定義されている。ここでは図示しない選沢回路によって選ばれるプログラム番号によってPIDを作る。 In the case of the television apparatus TV of this embodiment, if the basic PID is defined by shifting the program number to the left by 4 bits, the video is defined as (basic PID + 0x0001) and the audio is defined as (basic PID + 0x0004). Here, a PID is created by a program number selected by a selection circuit (not shown).
ランダムアクセスインジケータ(Random Access Indicator)は、GOPの先頭のビデオパケットでは「1」とする。 The random access indicator is “1” in the first video packet of the GOP.
次に、ヌルパケットメモリ90に入力されるヌルパケットを含むTSパケットTPTの値の例を以下の表に示す。
Next, an example of the value of the TS packet TPT including the null packet input to the
データバイトは、何が入ってもよいので、特に転送せずにRAMにデフォルトで入っている値そのままを用いてもよい。 Since any data byte can be entered, the value stored in the RAM by default without being transferred may be used as it is.
更に、PCRメモリ91に入力されるPCRパケットを含むTSパケットTPTの値の例を以下の表に示す。
Furthermore, an example of the value of the TS packet TPT including the PCR packet input to the
また、PCRの値は、SCRを基礎に、このパケットを伝送する直前に計算され、書き換えられる。 Also, the PCR value is calculated and rewritten on the basis of the SCR immediately before transmitting this packet.
更に、このパケットはPCRを伝送することだけが目的なので、ペイロードは持っていない。 Furthermore, since this packet is only intended to transmit PCR, it does not have a payload.
更にまた、一番最初のPCRパケットでは、不連続インジケータ(Discontinuity Indicator)は「1」とする必要がある。 Furthermore, in the first PCR packet, the discontinuity indicator (Discontinuity Indicator) needs to be “1”.
更に、PATメモリ92に入力されるPATを含むTSパケットTPTの値の例を以下の表に示す。
Further, an example of the value of the TS packet TPT including the PAT input to the
最後に、PMTメモリ93内に入力されるPMTを含むTSパケットTPTの値の例を以下の表に示す。
Finally, an example of the value of the TS packet TPT including the PMT input into the
また、ディスクリプタ(Descriptor)は、プログラム情報に関るものがプログラム識別子とプログラムスムージングバッファディスクリプタであり、エレメンタリーストリーム情報に関するものが、ビデオについてはデータストリームアサインメントディスクリプタであり、オーディオについてはオーディオエレメンタリーストリーム識別子とAC−3オーディオディスクリプタである。 In addition, descriptors related to program information are program identifiers and program smoothing buffer descriptors, and those related to elementary stream information are data stream assignment descriptors for video and audio elementary for audio. A stream identifier and an AC-3 audio descriptor.
次に、PS/TS変換器84におけるコントローラ94の動作について図12乃至図18を用いて詳述する。当該コントローラ94は、主に上記六つのメモリを適宜更新して、それらを切り換えてデータをTSメモリ97にDMA(ダイレクトメモリアクセス)転送する等の動作を行う。
Next, the operation of the
なお、以下の説明では、アルゴリズムの簡単化のために、PSのパックPの単位で処理が完結する場合について説明する。 In the following description, a case will be described in which processing is completed in units of PS packs P in order to simplify the algorithm.
また、PTS及びDTSの付け替えは行わず、SCRは極力変えることなくPCRに変換することとする。 Further, PTS and DTS are not replaced, and the SCR is converted to PCR without changing it as much as possible.
一般に、PSからTSに変換すると転送レートは上がる。これは、TSでは184バイトという小さい単位につき4バイトのヘッダを加算するからである。 In general, when PS is converted to TS, the transfer rate increases. This is because a 4-byte header is added to a small unit of 184 bytes in TS.
ここで、TSの転送レートの最低値は、概略、
(数2)
転送レートの最低値=(PSの転送レート)×(188/184)+(PAT、PMT
などの転送レート)−(パックヘッダ57の転送レート)
となる。
Here, the minimum value of the TS transfer rate is roughly
(Equation 2)
Minimum transfer rate = (PS transfer rate) × (188/184) + (PAT, PMT)
Transfer rate)-(
It becomes.
以下の説明では、この式によって計算されるレート以上のどのような転送レートにも対応できるアルゴリズムについて述べることとする。 In the following description, an algorithm that can cope with any transfer rate higher than the rate calculated by this equation will be described.
先ず、図12(a)はDVD1のパック単位のビデオバッファ67又はオーディオバッファ69の占有率の例である。
First, FIG. 12A shows an example of the occupation ratio of the
この例では、復号器Dの各バッファはパックPのデータを読み込みつつ、ピクチャデータを出力している。 In this example, each buffer of the decoder D outputs picture data while reading pack P data.
前述したように、ピクチャデータの出力は一瞬にして行われている。 As described above, picture data is output in an instant.
本実施形態では、PTS及びDTSを付け替えないで、且つSCRもなるべく変化させずにPCRに変換するので、変換したTSのバッファ(復号器D’内のトランスポートバッファ73又は76、ビデオバッファ74又はオーディオバッファ77を合わせた仮想的なバッファ)の蓄積量がPSのバッファ(上記ビデオバッファ67又はオーディオバッファ69の仮想的なバッファ)の蓄積量を下回るとTSのバッファにおいてアンダーフローが生じる可能性がある。
In this embodiment, the PTS and the DTS are not changed, and the SCR is converted into the PCR without changing as much as possible. Therefore, the converted TS buffer (the
例えば、図12(b)に示す例では、TSのパケットの挿入方法を誤ったためにTSのバッファにおいてアンダーフローが生じている。即ち、TS及びPSにおける各ピクチャが出力されるタイミングが把握できない時は常にアンダーフローの可能性が存在する。 For example, in the example shown in FIG. 12B, an underflow occurs in the TS buffer due to an incorrect TS packet insertion method. That is, there is a possibility of underflow whenever the timing at which each picture in TS and PS is output cannot be grasped.
そこで、本実施形態では、TSのバッファ蓄積量が常にPSのバッファ蓄積量を上回るように制御する。 Therefore, in the present embodiment, control is performed so that the TS buffer accumulation amount always exceeds the PS buffer accumulation amount.
前述したようにTSの転送レートはPSの転送レートよりも高くなるが、このことは最初のTSパケットTPTをPSにおけるパケットPTの前(又は同時)に挿入することに他ならない。 As described above, the TS transfer rate is higher than the PS transfer rate, but this is nothing other than inserting the first TS packet TPT before (or simultaneously with) the packet PT in the PS.
しかしながら、TSパケットTPTをPSにおけるパケットPTの前(又は同時)に挿入すると、今度は、図13(a)に示すように、TSバッファにおけるオーバーフローを起こす可能性が出てくる。 However, if the TS packet TPT is inserted before (or simultaneously with) the packet PT in the PS, there is a possibility that an overflow in the TS buffer will occur as shown in FIG.
そこで、本実施形態では、各バッファの蓄積量の差に対応してTSに上記ヌルパケットを挿入することで双方の蓄積量の増加レートを整合させる。この点について、図13(b)を用いて説明する。 Therefore, in this embodiment, the null packets are inserted into the TS corresponding to the difference between the accumulation amounts of the respective buffers, thereby matching the increase rates of both accumulation amounts. This point will be described with reference to FIG.
前述したように、各バッファの蓄積量については、常にTSのバッフ蓄積量がPSのバッファ蓄積量を下回らないようにしなければならない。 As described above, with respect to the accumulation amount of each buffer, it is necessary to always prevent the TS buffer accumulation amount from being lower than the PS buffer accumulation amount.
一方、挿入したヌルパケットの直後にダミーデータを含んだTSパケットTPTが挿入されているときには、TSのデータ入力は最大でほぼ二パケットの期間行われない。 On the other hand, when the TS packet TPT including dummy data is inserted immediately after the inserted null packet, the TS data is not input for a period of almost two packets at the maximum.
そして、この場合にも上記の条件(TSのバッフ蓄積量がPSのバッファ蓄積量を下回らないようにする。)を満足させるためには、図13(b)において、
(数3)
Bx≧(Rps/Rts)×(188×2)(バイト)
である必要がある。但し、上式において、Bxは各ストリームにおいて、一のパケットが送出された後の各バッファの蓄積量の差であり、Rps及びRtsは夫々TS及びPSの転送レートである。
In this case as well, in order to satisfy the above condition (so that the TS buffer accumulation amount does not fall below the PS buffer accumulation amount), in FIG.
(Equation 3)
Bx ≧ (Rps / Rts) × (188 × 2) (bytes)
Need to be. However, in the above equation, Bx is the difference in the accumulated amount of each buffer after one packet is transmitted in each stream, and Rps and Rts are the transfer rates of TS and PS, respectively.
この条件を満たすように上記ヌルパケットを挿入すれば、2つのストリームのバッファ蓄積量の差は常にBx以内に収まる。 If the null packet is inserted so as to satisfy this condition, the difference between the buffer accumulation amounts of the two streams is always within Bx.
しかしながら、このように構成してもバッファ蓄積量の差は最大でBxだけ生じるので、未だにオーバーフローしてしまう可能性は残っている。 However, even with such a configuration, the difference in the buffer accumulation amount occurs only up to Bx, so there is still a possibility of overflow.
ここで、このバッファ蓄積量の差の最大量BxがTS固有の上記トランスポートバッファ73及び74の容量を超えなければオーバーフローは起こらない。ここで、トランスポートバッファ73及び74の容量は上述のように夫々512バイトと定められているから、結局、
(数4)
(Rps/Rts)×(188×2)(バイト)≦Bx≦512バイト
を満たせば良いことになる。
Here, an overflow does not occur unless the maximum amount Bx of the difference between the buffer accumulation amounts exceeds the capacity of the transport buffers 73 and 74 specific to the TS. Here, since the capacities of the transport buffers 73 and 74 are determined to be 512 bytes as described above, after all,
(Equation 4)
(Rps / Rts) × (188 × 2) (bytes) ≦ Bx ≦ 512 bytes should be satisfied.
ここで、本実施形態でDVD1を再生する再生装置Rをテレビジョン装置TVに接続する場合を考えると、Rps=10.08Mbps、Rts=l9.39Mbpsであるから、
(数5)
(10.08/19.39)×188×2≒196
から、196バイト≦Bx≦512バイトとなるように制御すればよいこととなる。
Here, considering the case where the playback device R that plays back the
(Equation 5)
(10.08 / 19.39) × 188 × 2≈196
Therefore, control should be performed so that 196 bytes ≦ Bx ≦ 512 bytes.
ところで、PSのデータを作る際、バッファ制御に安全帯を設けることもよく行われる。 By the way, when creating PS data, a safety band is often provided for buffer control.
これは、バッファの上位と下位に所定のマージンを設け、その範囲の中てバッファ占有率を決めるものである。この場合は上記Bxをその分だけ広く設定することができる。 In this method, a predetermined margin is provided at the upper and lower portions of the buffer, and the buffer occupancy is determined within the range. In this case, the Bx can be set wider as much.
すなわち、上側マージンをBmuとし、下側マージンををBmlとすると、
(数6)
(Rps/Rts)×(188×2)(バイト)−Bml≦Bx≦512バイト+Bmu
となるように制御すればよい。
That is, if the upper margin is Bmu and the lower margin is Bml,
(Equation 6)
(Rps / Rts) × (188 × 2) (bytes) −Bml ≦ Bx ≦ 512 bytes + Bmu
Control may be performed so that
即ち、上記再生装置Rとテレビジョン装置TVの場合は、
(数7)
196−Bml≦Bx(バイト)≦512+Bmu
となる。
That is, in the case of the playback device R and the television device TV,
(Equation 7)
196-Bml ≦ Bx (bytes) ≦ 512 + Bmu
It becomes.
ここで、上述のように、PSのパックPの単位で処理を完結させるために、その単位のパケットPTのデータが184バイトで割り切れない場合、最後のTSパケットTPTにはダミーデータを入れて調整する。 Here, as described above, in order to complete the processing in units of PS pack P, if the data of packet PT in that unit is not divisible by 184 bytes, dummy data is put in the last TS packet TPT and adjusted. To do.
また、ナビパック41があった位置など、空き領域がTSの転送レートで188バイト以上あるときは、ヌルパケットを挿入して転送レートを調整する。
When the empty area such as the position where the
例えば、DVD1のような可変レートのPSの場合、パックPの単位でバッファ入力待ちが発生する場合があるが、このような場合も184バイト以上の場合は、ヌルパケットで調整し、固定レートのTSとなるようにする。 For example, in the case of a variable rate PS such as DVD1, there is a case where a buffer input wait may occur in units of pack P. In this case, too, if it is 184 bytes or more, it is adjusted with a null packet and fixed rate Try to be TS.
この際、前述したようにTSはPSよりもパックPの単位で早く送出し始めなければならないので、空きが184バイト以内になるとそこからTSパケットTPTを挿入し始める。 At this time, as described above, since the TS must start to be transmitted in units of packs P rather than PS, when the empty space is within 184 bytes, the TS packet TPT starts to be inserted from there.
更に、前述したように、TSでは種々の付加情報を多重する必要がある。例えば、実施形態のテレビジョン装置TVの場合は上記PAT、PMT及びPCRパケットがこれに当たる。これらは夫々0.1秒、0.4秒及び0.1秒ごと以上の頻度で挿入されている必要がある。 Furthermore, as described above, it is necessary to multiplex various additional information in the TS. For example, in the case of the television apparatus TV of the embodiment, the PAT, PMT, and PCR packets correspond to this. These need to be inserted at a frequency of at least 0.1 seconds, 0.4 seconds, and 0.1 seconds, respectively.
これを満たすために、夫々予め設定された所定の頻度毎にヌルパケットをこれらの情報に置き換える。これは、ヌルパケットを挿入する際、これと付加情報を切り換えて挿入するようにすればよい。 In order to satisfy this, the null packet is replaced with these pieces of information at a predetermined frequency set in advance. In this case, when inserting a null packet, this and the additional information may be switched and inserted.
これは例えば、PAT及びPCRパケットについては直前に挿入した時から50msec、PMTについては前に挿入した時から200msec、夫々計時しておき、その時間を過ぎた最初のヌルパケットを夫々の情報に置き換えればよい。この時間の計測はPCRを求める過程で簡単に行うことができる。 For example, 50 msec from the last insertion for PAT and PCR packets, 200 msec from the previous insertion for PMT, and replace the first null packet after that time with the respective information. That's fine. This time measurement can be easily performed in the process of obtaining the PCR.
ここで、復号器D’においては、これらの情報が来るまでは正しいデコードが行えないので、実施形態のPS/TS変換器84が動作し始める時には、エレメンタリーストリームを出力する前に必ずこれらの情報を挿入しておかなくてはならない。
Here, in the decoder D ′, correct decoding cannot be performed until these pieces of information are received. Therefore, when the PS /
一方、上記コントローラ94には、次の9個のレジスタを内部に備えている。
On the other hand, the
すなわち、SCR1レジスタと、SCR2レジスタと、PCRレジスタと、PDLEN(Packet Data Length)レジスタと、PSバッファレジスタと、TSバッファレジスタと、PCR間隔レジスタと、PAT間隔レジスタと、PMT間隔レジスタとを備えている。 That is, an SCR1 register, an SCR2 register, a PCR register, a PDLEN (Packet Data Length) register, a PS buffer register, a TS buffer register, a PCR interval register, a PAT interval register, and a PMT interval register are provided. Yes.
このとき、SCR1レジスタ及びSCR2レジスタには、PSのSCRの値が格納される。 At this time, the SCR value of the PS is stored in the SCR1 register and the SCR2 register.
また、PCRレジスタにはその時に最後に挿入されたTSパケットTPTの次のTSパケットTPTのPCRの値が格納される。 The PCR register stores the PCR value of the TS packet TPT next to the TS packet TPT inserted last.
更に、PDLENレジスタにはPSにおける送出すべきデータの長さが格納される。 Furthermore, the length of data to be transmitted in the PS is stored in the PDLEN register.
また、PSバッファレジスタ及びTSバッファレジスタには、夫々PSのバッファの蓄積量及びTSのバッファの蓄積量のその時点での予測値(夫々SCR又はPCRに基づく予測値)が格納される。 The PS buffer register and the TS buffer register store the PS buffer accumulation amount and the TS buffer accumulation amount at that point in time (predicted values based on SCR or PCR, respectively).
最後に、PCR間隔レジスタ、PAT間隔レジスタ及びPMT間隔レジスタには、夫々その時点で最後に挿入されたPCRパケット、PAT又はPMTの値が格納される。 Finally, the PCR interval register, the PAT interval register, and the PMT interval register store the value of the PCR packet, PAT, or PMT inserted last at that time, respectively.
次に、コントローラ94の具体的な動作について、図14乃至図16のフローチャートを用いて説明する。
Next, a specific operation of the
始めに、コントローラ94の初期化時の動作について図14に示すフローチャートを用いて説明する。
First, the operation at the time of initialization of the
図14に示すように、コントローラ94の初期化時においては、先ず、電源のON又はリセット後(ステップS1)、全ての内部のレジスタの初期化を行い(ステップS51)、夫々のRAMに夫々の情報に関する上記雛形を記録させる(ステップS52)。
As shown in FIG. 14, at the time of initialization of the
この後、抜取回路84をリセットし(ステップS53)、次に、ナビパック41内のスタートコードが入力されたか否かを抜取回路86からのスタート信号Sstに基づいて判定する(ステップS54)。そして、スタート信号Sstが入力されない時は(ステップS54;F)そのまま待機し、入力された時は(ステップS54;T)ナビパック41を検出したとしてその中のSCRをSCR信号Sscrとして受け取ってSCR1レジスタとPCRレジスタに夫々入力してから(ステップS56)、PATメモリ92に記憶されている情報をTSメモリ97にDMA転送してその時のPCRをPAT間隔レジスタに格納する(ステップS57)。その後、PCRレジスタの値を時間Ttspだけ増加させる(ステップS58)。
Thereafter, the
次に、PMTメモリ93に記憶されている情報をTSメモリ97にDMA転送してその時のPCRをPMT間隔レジスタに格納する(ステップS59)。その後、PCRレジスタの値を時間Ttspだけ増加させる(ステップS60)。
Next, the information stored in the
ここで、時間TtspはTSパケットTPTを1パケット送信する時間を90kHzで計測したものであり、以下のように求まる。 Here, the time Ttsp is obtained by measuring the time for transmitting one TS packet TPT at 90 kHz, and is obtained as follows.
(数8)
Ttsp=(188×8)×90000/Rts
なお、この値は普通割り切れないので、例えば浮動小数点で持っておき、増分するたびに切り捨て又は四捨五入を行うように構成することができる。
(Equation 8)
Ttsp = (188 × 8) × 90000 / Rts
Since this value is not normally divisible, it can be held in, for example, a floating point and rounded off or rounded off each time it is incremented.
そして、この時点のPCRレジスタの値でPCRメモリ91を書き換え(ステップS61)、PCRパケットを転送する。その時のPCRをPCR間隔レジスタに格納する(ステップS62)。その後、PCRレジスタの値を時間Ttspだけ増加させ(ステップS63)、次のメインルーチンに移行する。
Then, the
次に、コントローラ94における処理のメインルーチンについて図15を用いて説明する。
Next, a main routine of processing in the
図15に示すように、上述した初期化が終了すると、次に、上記SCR信号Sscrに基づいて次のSCRの値を取り込み(ステップS65)、これをSCR2レジスタに取り込む(ステップS66)。 As shown in FIG. 15, when the above-described initialization ends, the next SCR value is fetched based on the SCR signal Sscr (step S65), and this is fetched into the SCR2 register (step S66).
この時点で、SCR1はナビパック41のスタートの時間、SCR2はその終了の時間を夫々概賂表わすこととなる。
At this time, SCR1 roughly represents the start time of the
次に、パケット転送信号Spdtを確認する(ステップS69)。 Next, the packet transfer signal Spdt is confirmed (step S69).
スタート信号Sstが入力された直後のパックPはナビパック41であり、この時点ではパケット転送信号Spdtは「HIGH」になっていない(ステップS69;F)。
The pack P immediately after the start signal Sst is input is the
従って、次に、PCRレジスタの値とSCR2レジスタの値との差が上記時間Ttsp以上か否かを判定し(ステップS82)、その差が時間Ttsp以上である時は(ステップS82;T)、PCRレジスタの値がSCR2レジスタの値を超えない範囲で情報パケットのTSメモリ97への転送を行い(ステップS83)、PCRレジスタの値を上記時間Ttspだけ増分して(ステップS84)、再度ステップS82に戻って今までの動作を繰り返す。
Therefore, it is next determined whether or not the difference between the value in the PCR register and the value in the SCR2 register is equal to or greater than the time Ttsp (step S82), and when the difference is equal to or greater than the time Ttsp (step S82; T), The information packet is transferred to the
一方、ステップS82の判定において、PCRレジスタの値とSCR2レジスタの値との差が上記時間Ttsp未満であるときは(ステップS82;F)、SCR2レジスタの内容をSCR1レジスタにコピーし(ステップS85)、元のステップS65に戻って以上の動作を繰り返す。 On the other hand, when the difference between the value of the PCR register and the value of the SCR2 register is less than the time Ttsp in the determination of step S82 (step S82; F), the contents of the SCR2 register are copied to the SCR1 register (step S85). Returning to the original step S65, the above operation is repeated.
ここで、情報パケットとは、上記PCRパケット、PAT、PMT又はヌルパケットを示す。 Here, the information packet indicates the PCR packet, PAT, PMT, or null packet.
一方、ステップS67の判定において、パケット転送信号Spdtが「HIGH」のときは(ステップS69;T)、有効なデータがPESメモリ88に転送されたバイト数がパケット長さ信号Spdlとして抜取回路86から送信されてくるので、これをPDLENレジスタに格納する(ステップS68)。
On the other hand, if the packet transfer signal Spdt is “HIGH” in the determination in step S67 (step S69; T), the number of bytes in which valid data has been transferred to the
次に、PDLENレジスタの値が184バイト以上か否かが判定され(ステップS69)、184バイト以上である時は(ステップS69;T)、先ずPSのバッファの蓄積量を計算してPSバッファレジスタに格納する(ステップS70)。 Next, it is determined whether or not the value of the PDLEN register is 184 bytes or more (step S69). If it is 184 bytes or more (step S69; T), the PS buffer register is first calculated by calculating the PS buffer accumulation amount. (Step S70).
この値は、
(数9)
PSバッファレジスタ=Rps×(PCR−SCR1)/90000
として算出できる。
This value is
(Equation 9)
PS buffer register = Rps × (PCR-SCR1) / 90000
Can be calculated as
次に、TSバッファレジスタとPSバッファレジスタの差を求める(ステップS71)。この差が前述の閾値Bxよりも大きければ(ステップS71;T)上記情報パケットをTSメモリ97に転送し(ステップS77)、ステップS76へ移行する。 Next, the difference between the TS buffer register and the PS buffer register is obtained (step S71). If this difference is larger than the aforementioned threshold value Bx (step S71; T), the information packet is transferred to the TS memory 97 (step S77), and the process proceeds to step S76.
一方、ステップS71の判定において、TSバッファレジスタとPSバッファレジスタの差が閾値Bxよりも大きけくなければ(ステップS71;F)、リンクヘッダメモリ89の内容をリンクヘッダ71を送出するように書き直してこれを4バイト転送し(ステップS72)、PESメモリ88の内容を184バイト転送する(ステップS73)。
On the other hand, if it is determined in step S71 that the difference between the TS buffer register and the PS buffer register is not larger than the threshold value Bx (step S71; F), the contents of the
この後、TSバッファレジスタの値を184バイト分増分し(ステップS74)、PDLENレジスタの値を184バイト分減じる(ステップS75)。 Thereafter, the value of the TS buffer register is incremented by 184 bytes (step S74), and the value of the PDLEN register is decremented by 184 bytes (step S75).
その後、PCRレジスタの値を上記時間Ttsp分だけ増分して(ステップS76)上記ステップS69に戻る。 Thereafter, the value of the PCR register is incremented by the time Ttsp (step S76), and the process returns to step S69.
一方、ステップS69の判定において、PDLENレジスタの値が184バイト未満である時は(ステップS69;F)、リンクヘッダメモリ89の内容をダミーデータを送出するように書き直し、その後、ダミーデータを含んだバイト数分だけ転送される(ステップS78)。
On the other hand, if it is determined in step S69 that the value of the PDLEN register is less than 184 bytes (step S69; F), the contents of the
この時の転送バイト数は、
(数10)
転送バイト数=4+184−(PDLENレジスタの値)
から求まる。
The number of bytes transferred at this time is
(Equation 10)
Number of transfer bytes = 4 + 184-(PDLEN register value)
Obtained from
この後、PESメモリ88の内容をPDLENレジスタで示される分だけ転送することによって(ステップS79)、結果的に188バイトのTSパケットTPTが転送できることになる。
Thereafter, by transferring the contents of the
その後、PCRレジスタが上記時間Ttspだけ増分され(ステップS80)、パックP中の有効な内容は全て転送されたのでTSバッファレジスタの内容をリセットする(ステップS81)。 Thereafter, the PCR register is incremented by the time Ttsp (step S80), and all the valid contents in the pack P have been transferred, so the contents of the TS buffer register are reset (step S81).
なお、この後にはダミーパケットがある可能性があるが、この場合、次のSCR(SCR2)がこの時点のPCRよりも十分大きな値となっているので、前述のアルゴリズムで情報パケットを挿入する。 There may be a dummy packet after this. In this case, since the next SCR (SCR2) is sufficiently larger than the PCR at this time, the information packet is inserted by the above-described algorithm.
次に、ステップS77及びS83の情報パケットの送出について、図16を用いて説明する。ここで、当該情報パケットは間隔計算用のレジスタの値によって当該情報パケットのうち一つが選択されて挿入される。 Next, transmission of information packets in steps S77 and S83 will be described with reference to FIG. Here, one of the information packets is selected and inserted from the information packet according to the value of the interval calculation register.
すなわち、ステップS77及びS83の情報パケットの送出においては、先ず、PCRレジスタとPCR間隔レジスタの値の差を検出し(ステップS90)、その差が50msec分、すなわち、
(数11)
90000×0.05=4500
以上となると(ステップS90;T)、次に、PCRメモリ91の内容を一のPCRパケットを送出するように書き換えて(ステップS95)、当該PCRメモリ91の内容を188バイト分TSメモリ97に送出し(ステップS92)、PCR間隔レジスタの値をその時のPCRレジスタの値に書き換えて(ステップS93)元のメインルーチンに戻る。
That is, in sending information packets in steps S77 and S83, first, the difference between the values of the PCR register and the PCR interval register is detected (step S90), and the difference is 50 msec, that is,
(Equation 11)
90000 × 0.05 = 4500
When the above is reached (step S90; T), the contents of the
一方、ステップS90の判定において、PCRレジスタとPCR間隔レジスタの値の差が「4500」未満の時は、次に、PCRレジスタとPAT間隔レジスタの値の差を検出し(ステップS94)、その差が50msec分、すなわち、「4500」以上となると(ステップS94;T)、次に、PATメモリ92の内容を一のPATを送出するように書き換えて(ステップS95)、当該PATメモリ92の内容を188バイト分TSメモリ97に送出し(ステップS96)、PAT間隔レジスタの値をその時のPCRレジスタの値に書き換えて(ステップS97)元のメインルーチンに戻る。
On the other hand, if it is determined in step S90 that the difference between the PCR register and the PCR interval register is less than “4500”, then the difference between the PCR register and the PAT interval register is detected (step S94). Is 50 msec, that is, “4500” or more (step S94; T), the contents of the
一方、ステップS94の判定において、PCRレジスタとPAT間隔レジスタの値の差が「4500」未満の時は(ステップS94;F)、次に、PCRレジスタとPMT間隔レジスタの値の差を検出し(ステップS98)、その差が0.2秒分、すなわち、
(数12)
90000×0.2=18000
以上となると(ステップS98;T)、次に、PMTメモリ93の内容を一のPMTを送出するように書き換えて(ステップS99)、当該PMTメモリ93の内容を188バイト分TSメモリ97に送出し(ステップS100)、PMT間隔レジスタの値をその時のPCRレジスタの値に書き換えて(ステップS101)元のメインルーチンに戻る。
On the other hand, when the difference between the values of the PCR register and the PAT interval register is less than “4500” in the determination of step S94 (step S94; F), the difference between the values of the PCR register and the PMT interval register is then detected ( Step S98), the difference is 0.2 seconds, that is,
(Equation 12)
90000 × 0.2 = 18000
When the above is reached (step S98; T), the contents of the
次に、ステップS98の判定において、PCRレジスタとPMT間隔レジスタの値の差が「18000」未満の時は(ステップS98;F)、ヌルパケットメモリ90の内容を一のヌルパケットを送出するように書き換えて(ステップS102)、当該ヌルパケットを188バイト分TSメモリ97に送出し(ステップS103)、元のメインルーチンに戻る。
Next, when the difference between the values of the PCR register and the PMT interval register is less than “18000” in the determination in step S98 (step S98; F), the content of the
次に、上述したアルゴリズムで生成したTSの形態を模式的に図17に示す。 Next, the form of the TS generated by the above-described algorithm is schematically shown in FIG.
図17に示すように、PSにおけるナビパック41に対応する位置にはPAT及びPMT等の情報パケットが置かれ、エレメンタリーパックの部分には、TSとしての実際のデータ又はダミーデータ或いはヌルパケットが挿入されることとなる。
As shown in FIG. 17, information packets such as PAT and PMT are placed at positions corresponding to the
このとき、トランスポートバッファ73又は74内の蓄積量は、情報パケットの間では「0」のままであり、ヌルパケット又はダミーデータ以外のタイミングで増加することとなる(図17内グラフ実線参照)。また、ビデオバッファ67の蓄積量はPSのエレメンタリーパックが開始されるタイミングから徐々に単純増加することとなる(図17内グラフ一点鎖線参照)。
At this time, the accumulation amount in the
なお、図18は、実際に実施形態のPS/TS変換を行った場合のトランスポートバッファ73及び74の蓄積量の変化(実線)及びビデオバッファ67の蓄積量の変化(破線)を示す。 FIG. 18 shows changes in the accumulation amount of the transport buffers 73 and 74 (solid line) and changes in the accumulation amount of the video buffer 67 (broken line) when the PS / TS conversion of the embodiment is actually performed.
このグラフから明らかなように、トランスポートバッファ73及び74の蓄積量がビデオバッファ67の蓄積量を常に上回りつつオーバーフロー又はアンダーフローも起こすことなく変化する。
As is apparent from this graph, the accumulation amount of the transport buffers 73 and 74 always exceeds the accumulation amount of the
以上説明したように、実施形態のPS/TS変換器84の動作によれば、TSの復号処理が中断することを防止しつつ、且つPSに対して分解処理等を施すことなく簡易な処理でPSをTSに変換することができる。
As described above, according to the operation of the PS /
また、各バッファの蓄積量の差が閾値Bx以上となったとき、PSに無関係のダミーデータ等を挿入しつつ変換するので、PSのデータ内容を変更することなく、且つトランスポートバッファ73又は74におけるオーバーフロー又はアンダーフローを防止して第PSをTSに変換することができる。
Further, when the difference between the accumulated amounts of the buffers becomes equal to or larger than the threshold value Bx, the conversion is performed while inserting dummy data irrelevant to the PS, so that the
更に、上記閾値Bxが、トランスポートバッファ73又は74内の当該TSの蓄積量がビデオバッファ67内の当該PSの蓄積量を常に上回るように設定されており、且つトランスポートバッファ73又は74の最大容量以下とされているので、トランスポートバッファ73又は74におけるオーバーフロー又はアンダーフローを確実に防止しつつPSをTSに変換することができる。
Further, the threshold Bx is set so that the accumulated amount of the TS in the
更にまた、上記閾値Bxをトランスポートバッファ73又は74の最大容量に上下のマージンの容量を加算した値以下とした場合には、トランスポートバッファ73又は74におけるオーバーフロー又はアンダーフローを確実に防止しつつPSをTSに変換することができる。
Furthermore, when the threshold Bx is equal to or less than the maximum capacity of the
また、情報パケットが、少なくとも、PCRパケット、PAT、PMT又はヌルパケットの内のいずれかの情報であるので、TSの復号の際に影響を与えることなく当該TSを生成することができる。 Further, since the information packet is at least one of the information of the PCR packet, PAT, PMT, or null packet, the TS can be generated without affecting the decoding of the TS.
更に、TSにおいて、情報パケットのうちPCRパケット、PAT及びPMTの挿入頻度が予め設定されているとき、当該挿入頻度を満たすようにPCRパケット、PAT及びPMTを挿入すると共に、PCRパケット、PAT及びPMTを挿入すべき位置以外に情報パケットを挿入すべきTS内の位置にヌルパケットを挿入するので、効率的にPSをTSに変換することができる。 Further, in the TS, when the insertion frequency of the PCR packet, PAT, and PMT is preset in the information packet, the PCR packet, PAT, and PMT are inserted so as to satisfy the insertion frequency, and the PCR packet, PAT, and PMT are also inserted. Since a null packet is inserted at a position in the TS where an information packet is to be inserted in addition to a position where an information packet is to be inserted, PS can be efficiently converted to a TS.
また、ダミーデータを挿入してPSをTSに変換するので、TSの内容に影響を与えることなくトランスポートバッファ73又は74のアンダーフローを防止して当該TSを生成することができる。
Further, since dummy data is inserted and PS is converted to TS, underflow of
1 DVD
2 ビデオマネージャ
3 VTS
10 VOB
11 コントロールデータ
20 セル
30 VOBユニット
41 ナビパック
42 ビデオパック
43 オーディオパック
44 サブピクチャパック
55 パケットヘッダ
56 パケットデータ
57 パックヘッダ
58 システムヘッダ
62 PCIパケット
63 DSIパケット
64 ビデオデータ
65 オーディオデータ
66、72 デマルチプレクサ
67、74 ビデオバッファ
68、75 ビデオデコータ
69、77 オーディオバッファ
70、78 オーディオデコータ
71 リンクヘッダ
73、74 トランスポートバッファ
80 検出回路
81 復調回路
82 エラー訂正回路
83、D、D’ 復号器
84 PS/TS変換器
85 復調器
86 抜取回路
87 PLL
88 PESメモリ
89 リンクヘッダメモリ
90 ヌルパケットメモリ
91 PCRメモリ
92 PATメモリ
93 PMTメモリ
94 コントローラ
95 アドレスバス
96 データバス
97 TSメモリ
R 再生装置
TV テレビジョン装置
PS プログラムストリーム
TS トランスポートストリーム
P パック
PT パケット
LI リードインエリア
LO リードアウトエリア
TPT TSパケット
PCK PSクロック
PDATA、TDATA データ
TCK TSクロック
Sst スタート信号
Sscr SCR信号
Spdl パケット長さ信号
Spdt パケット転送信号
1 DVD
2
10 VOB
11
88
Claims (8)
前記変換後の第2データストリームを復号する際に前記第2バッファ手段においてオーバーフロー又はアンダーフローのいずれもが発生しないように前記第2時間情報を設定する設定手段と、
前記設定された第2時間情報を多重しつつ前記第1データストリームを当該第2データストリームに変換する変換手段と、
を備え、
前記第2データストリームの転送レートが前記第1データストリームの転送レートよりも高いと共に、
前記変換手段は、
前記第1時間情報に基づいて、前記第1データストリームを当該第1時間情報を用いて復号する時の前記第1バッファ手段内の当該第1データストリームの蓄積量を予測算出する第1算出手段と、
前記第2時間情報に基づいて、前記第2データストリームを当該第2時間情報を用いて復号する時の前記第2バッファ手段内の当該第2データストリームの蓄積量を予測算出する第2算出手段と、
前記第1バッファ手段内の当該第1データストリームの蓄積量と前記第2バッファ手段内の当該第2データストリームの蓄積量との差が予め設定された所定の閾値以上となった時、前記第1データストリームに無関係の予め設定された挿入情報を挿入しつつ前記第1データストリームを前記第2データストリームに変換する挿入変換手段と、
により構成され、
前記第2バッファ手段は、少なくとも前記第2データストリームに固有の固有バッファ手段を有し、
前記閾値は、前記第2バッファ手段内の当該第2データストリームの蓄積量が前記第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ前記固有バッファ手段の最大容量以下であることを特徴とするストリーム変換装置。 A first data stream including first time information set so that neither overflow nor underflow occurs in the first buffer means during decoding, wherein the first buffer is based on the first time information. A stream conversion device for converting a first data stream decoded while being temporarily stored in the means into a second data stream decoded while being temporarily stored in the second buffer means based on the second time information;
Setting means for setting the second time information so that neither overflow nor underflow occurs in the second buffer means when decoding the converted second data stream;
Conversion means for converting the first data stream into the second data stream while multiplexing the set second time information;
Equipped with a,
The transfer rate of the second data stream is higher than the transfer rate of the first data stream;
The converting means includes
Based on the first time information, first calculation means for predicting and calculating an accumulation amount of the first data stream in the first buffer means when the first data stream is decoded using the first time information. When,
Second calculation means for predicting and calculating an accumulation amount of the second data stream in the second buffer means when decoding the second data stream using the second time information based on the second time information When,
When the difference between the accumulated amount of the first data stream in the first buffer means and the accumulated amount of the second data stream in the second buffer means exceeds a predetermined threshold value, the first Insertion conversion means for converting the first data stream into the second data stream while inserting preset insertion information irrelevant to one data stream;
Composed of
Said second buffer means comprises at least unique buffer means specific to said second data stream;
The threshold is set so that the accumulated amount of the second data stream in the second buffer means always exceeds the accumulated amount of the first data stream in the first buffer means, and the unique buffer means A stream converter characterized in that it is less than the maximum capacity .
前記第1バッファ手段に前記第1データストリームを記憶させる際に当該第1バッファ内に予め設定された未記憶領域が生じるように前記第1時間情報が設定されていると共に、
前記閾値は、前記固有バッファ手段内の当該第2データストリームの蓄積量が前記第1バッファ手段内の当該第1データストリームの蓄積量を常に上回るように設定されており、且つ前記固有バッファ手段の最大容量に前記未記憶領域の容量を加算した値以下であることを特徴とするストリーム変換装置。 The stream converter according to claim 1 ,
The first time information is set so that a preset unstored area is generated in the first buffer when the first data stream is stored in the first buffer means, and
The threshold is set so that the accumulated amount of the second data stream in the unique buffer means always exceeds the accumulated amount of the first data stream in the first buffer means, and the unique buffer means The stream conversion apparatus , wherein the maximum capacity is equal to or less than a value obtained by adding the capacity of the unstored area .
前記挿入情報は、少なくとも、新たな前記第2時間情報、前記第2データストリームに含まれるデータの内容を示す内容情報又は0を示す情報の内のいずれかの情報であること
を特徴とするストリーム変換装置。 The stream converter according to claim 1 or 2,
The insertion information is at least one of the new second time information, content information indicating the content of data included in the second data stream, or information indicating 0. Conversion device.
前記第2データストリームにおいて、前記挿入情報のうち、前記第2時間情報及び前記内容情報の挿入頻度が予め設定されているとき、前記変換手段は、当該挿入頻度を満たすように前記第2時間情報及び前記内容情報を挿入すると共に、
前記第2時間情報及び前記内容情報を挿入すべき位置以外の前記挿入情報を挿入すべき前記第2データストリーム内の位置に前記0を示す情報を挿入することを特徴とするストリーム変換装置。 The stream converter according to claim 3,
In the second data stream, when the insertion frequency of the second time information and the content information among the insertion information is set in advance, the conversion means sets the second time information so as to satisfy the insertion frequency. And inserting the content information,
The stream conversion apparatus , wherein information indicating the 0 is inserted at a position in the second data stream where the insertion information other than the position where the second time information and the content information are to be inserted is inserted .
前記第1データストリームは、DVDから検出されたMPEG2(Moving Picture Expert Group 2)規格のプログラムストリームであり、前記第2データストリームは前記MPEG2規格のトランスポートストリームであると共に、
前記変換手段は、前記トランスポートストリームにおいて不要な前記プログラムストリーム内のデータである不要データを削除しつつ当該プログラムストリームを前記トランスポートストリームに変換することを特徴とするストリーム変換装置。 In the stream converter according to any one of claims 1 to 4 ,
The first data stream is a MPEG-2 (Moving Picture Expert Group 2) standard program stream detected from a DVD, the second data stream is the MPEG2 standard transport stream, and
The stream conversion device, wherein the conversion means converts the program stream into the transport stream while deleting unnecessary data that is unnecessary data in the program stream in the transport stream .
前記変換手段は、前記不要データに代えて前記第2バッファ手段におけるアンダーフローを防止するためのダミーデータを挿入して前記プログラムストリームを前記トランスポートストリームに変換することを特徴とするストリーム変換装置。 The stream converter according to claim 5, wherein
The stream conversion device , wherein the conversion means converts the program stream into the transport stream by inserting dummy data for preventing underflow in the second buffer means in place of the unnecessary data .
前記変換後の第2データストリームを復号する際に前記第2バッファ手段においてオーバーフロー又はアンダーフローのいずれもが発生しないように前記第2時間情報を設定する設定手段と、
前記設定された第2時間情報を多重しつつ前記第1データストリームを当該第2データストリームに変換する変換手段と、
を備え、
前記第2データストリームの転送レートが前記第1データストリームの転送レートよりも高いと共に、
前記変換手段は、
前記第1時間情報に基づいて、前記第1データストリームを当該第1時間情報を用いて復号する時の前記第1バッファ手段内の当該第1データストリームの蓄積量を予測算出する第1算出手段と、
前記第2時間情報に基づいて、前記第2データストリームを当該第2時間情報を用いて復号する時の前記第2バッファ手段内の当該第2データストリームの蓄積量を予測算出する第2算出手段と、
前記第1バッファ手段内の当該第1データストリームの蓄積量と前記第2バッファ手段内の当該第2データストリームの蓄積量との差が予め設定された所定の閾値以上となった時、前記第1データストリームに無関係の予め設定された挿入情報を挿入しつつ前記第1データストリームを前記第2データストリームに変換する挿入変換手段と、
により構成され、
前記挿入情報は、少なくとも、新たな前記第2時間情報、前記第2データストリームに含まれるデータの内容を示す内容情報又は0を示す情報の内のいずれかの情報であることを特徴とするストリーム変換装置。 A first data stream including first time information set so that neither overflow nor underflow occurs in the first buffer means during decoding, wherein the first buffer is based on the first time information. A stream conversion device for converting a first data stream decoded while being temporarily stored in the means into a second data stream decoded while being temporarily stored in the second buffer means based on the second time information;
Setting means for setting the second time information so that neither overflow nor underflow occurs in the second buffer means when decoding the converted second data stream;
Conversion means for converting the first data stream into the second data stream while multiplexing the set second time information;
With
The transfer rate of the second data stream is higher than the transfer rate of the first data stream;
The converting means includes
Based on the first time information, first calculation means for predicting and calculating an accumulation amount of the first data stream in the first buffer means when the first data stream is decoded using the first time information. When,
Second calculation means for predicting and calculating an accumulation amount of the second data stream in the second buffer means when decoding the second data stream using the second time information based on the second time information When,
When the difference between the accumulated amount of the first data stream in the first buffer means and the accumulated amount of the second data stream in the second buffer means exceeds a predetermined threshold value, the first Insertion conversion means for converting the first data stream into the second data stream while inserting preset insertion information irrelevant to one data stream;
Composed of
The insertion information is at least one of the new second time information, content information indicating the content of data included in the second data stream, or information indicating 0. Conversion device.
前記第2データストリームにおいて、前記挿入情報のうち、前記第2時間情報及び前記内容情報の挿入頻度が予め設定されているとき、前記変換手段は、当該挿入頻度を満たすように前記第2時間情報及び前記内容情報を挿入すると共に、
前記第2時間情報及び前記内容情報を挿入すべき位置以外の前記挿入情報を挿入すべき前記第2データストリーム内の位置に前記0を示す情報を挿入することを特徴とするストリーム変換装置。 The stream converter according to claim 7,
In the second data stream, when the insertion frequency of the second time information and the content information among the insertion information is set in advance, the conversion means sets the second time information so as to satisfy the insertion frequency. And inserting the content information,
The stream conversion apparatus , wherein information indicating the 0 is inserted at a position in the second data stream where the insertion information other than the position where the second time information and the content information are to be inserted is inserted .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005246204A JP4095081B2 (en) | 2005-08-26 | 2005-08-26 | Stream converter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005246204A JP4095081B2 (en) | 2005-08-26 | 2005-08-26 | Stream converter |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP09644598A Division JP3844877B2 (en) | 1998-04-08 | 1998-04-08 | Stream converter |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006042382A JP2006042382A (en) | 2006-02-09 |
JP4095081B2 true JP4095081B2 (en) | 2008-06-04 |
Family
ID=35906766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005246204A Expired - Fee Related JP4095081B2 (en) | 2005-08-26 | 2005-08-26 | Stream converter |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4095081B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009260643A (en) * | 2008-04-16 | 2009-11-05 | Nec Electronics Corp | Data stream analysis apparatus, decoder, and data stream analysis method |
JP6259363B2 (en) * | 2014-06-23 | 2018-01-10 | 日本電信電話株式会社 | Station-side optical line terminator and signal generation method |
CN114225364B (en) * | 2020-09-14 | 2023-02-28 | 成都拟合未来科技有限公司 | Real-time interaction method and system |
-
2005
- 2005-08-26 JP JP2005246204A patent/JP4095081B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2006042382A (en) | 2006-02-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3844877B2 (en) | Stream converter | |
JP4409792B2 (en) | Data transmission apparatus and method, recording medium, and program | |
KR100825548B1 (en) | Information recording medium, data sorting device, and data reproducing device | |
US5737479A (en) | Apparatus and method for inserting rating code into the digital video signal | |
US7949930B2 (en) | Information recording medium, data sorting device and data reproduction device | |
US10482924B2 (en) | Recording medium, playback device, and playback method | |
EP1517554A1 (en) | Data processing device | |
US8068722B2 (en) | Information storage medium, TS packet judgement apparatus, and data reproduction apparatus | |
WO2003010766A9 (en) | Information recording medium, and apparatus and method for recording information on information recording medium | |
JPH11353790A (en) | Digital video signal transmitter and receiver | |
JP2004312663A (en) | Recording method, recording apparatus, recording medium, reproducing method, reproducing apparatus, and imaging apparatus | |
JP4095081B2 (en) | Stream converter | |
US7499631B2 (en) | Data stream format conversion method and recording method for the same | |
US20040233996A1 (en) | Reproducing apparatus and method, and recording medium | |
WO2006059482A1 (en) | Data processing device, data processing method, program, program recording medium, data recording medium, and data structure | |
US8107796B2 (en) | Data processing device, data processing method, program, program recording medium, data recording medium, and data structure | |
TWI291832B (en) | Recording device and method, recording medium, and program | |
EP4280598A2 (en) | Recording medium, playback device, and playback method | |
JP3901555B2 (en) | AV data recording apparatus and method, disc recorded by the AV data recording apparatus or method, and AV data reproducing apparatus and method or AV data recording / reproducing apparatus and method for reproducing the disc | |
KR100722036B1 (en) | Data processing device and data processing method | |
US7869696B1 (en) | Method for recording recorded digital data stream and for providing presentation managing information for the recorded digital data stream | |
KR100563666B1 (en) | Method for providing information on description of disc or disc player and controlling method and apparatus based on the description information | |
KR20050091373A (en) | Recording and playback control method of transport stram data | |
JP2006302498A (en) | Data receiving apparatus and method | |
JP2006216227A (en) | Data receiving apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070524 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070911 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071107 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080304 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080306 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110314 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120314 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130314 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140314 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |