JP3651699B2 - Decoding device and encoding / decoding device - Google Patents
Decoding device and encoding / decoding device Download PDFInfo
- Publication number
- JP3651699B2 JP3651699B2 JP10908995A JP10908995A JP3651699B2 JP 3651699 B2 JP3651699 B2 JP 3651699B2 JP 10908995 A JP10908995 A JP 10908995A JP 10908995 A JP10908995 A JP 10908995A JP 3651699 B2 JP3651699 B2 JP 3651699B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- decoding
- compressed
- audio data
- video data
- 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
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Television Signal Processing For Recording (AREA)
Description
【0001】
【目次】
以下の順序で本発明を説明する。
産業上の利用分野
従来の技術(図17)
発明が解決しようとする課題(図17及び図18)
課題を解決するための手段(図1〜図16)
作用(図1〜図16)
実施例(図1〜図16)
発明の効果
【0002】
【産業上の利用分野】
本発明は復号化装置及び符号化復号化装置に関し、例えばAVサーバシステムに適用して好適なものである。
【0003】
【従来の技術】
従来、ビデオ信号及びオーデイオ信号のデイジタル圧縮には種々の方式があるが、そのなかで現在最も注目を集めている方式の1つにMPEG(Moving Pictur Experts Group )規格がある。
このMPEG規格に従つて圧縮したAV(Audio Vidual:音響・映像)データを再生(デコード)する場合、AV間の同期をとる必要があるが、その方式には大きく分けて暗黙同期方式とタイム・スタンプ方式の2つの方式がある。
【0004】
暗黙同期方式は、ほぼ同一の時刻、同一時間長に相当する各AVデータをある単位で多重化しておき、1つのAV素材(以下、これをクリツプと呼ぶ)の先頭においてAVの頭が合うようにそれぞれのデコード開始時刻を調節することによりAV同期をとる方式である。
一方タイム・スタンプ方式は、AVの多重化時に各AVデータのある単位毎にその再生時刻を示すタイム・スタンプ(DTS:Decoding Time Stamp 及びPTS:Presentation Time Stamp )を付加し、さらにそのタイム・スタンプの基準となる時刻を示すタイム・スタンプ(SCR:System Clock Refernece 又はPCR:Program Clock Refernece )をある単位毎に付加しておき、各デコーダがこのタイム・スタンプに従つて再生を実行することによつてAV同期をとる方式である。なおMPEGシステム規格はこの方式を採用している。
【0005】
一般的にタイム・スタンプ方式は暗黙同期方式に比べて精度は高いがしくみが複雑になるため実現コストが高くなる特徴がある。
タイム・スタンプの使用方法についてもう少し追加説明する。図17に示すように、デマルチプレクサ1は供給されるAV多重化データDAvから基準時刻情報PCR を抽出し、この値に同期するようにシステムクロツクCL1を調整する。このシステムクロツクCL1は、オーデイオデコーダ2及びビデオデコーダ3にそれぞれ与えられる。
【0006】
またデマルチプレクサ1は、AV多重化データDAvから抽出したオーデイオデータDAdを再生時刻情報DTS と共にオーデイオデコーダ2に供給し、かつ抽出したビデオデータDViを再生時刻情報DTS 及びPTS と共にビデオデコーダ3に供給する。
これによりこれらオーデイオデコーダ2及びビデオデコーダ3は、それぞれシステムクロツクCL1と、再生時刻情報DTS 及びPTS とに基づいてこれらを比較することによりいつ再生動作を開始すればよいのかを判断するようになされている。
【0007】
【発明が解決しようとする課題】
ここで複数のクリツプを連続再生する場合を考える。
タイム・スタンプ方式の場合、図18に示すように、クリツプのつなぎめ付近の時刻では、すでにデマルチプレクサ1には次のクリツプ(クリツプ2)のデータが入力され始めており、システムクロツクCL1もクリツプ2の基準時刻情報PCR に同期しているが、オーデイオデコーダ2及びビデオデコーダ3ではまだ前のクリツプ(クリツプ1)の処理をしているという時間帯T0 が存在し得る。この場合各クリツプ1、2の基準時刻情報PCR はそれぞれ独立しているため、この時間帯T0 にオーデイオデコーダ2及びビデオデコーダ3がシステムクロツクCL1に従つてデコードしようとすると正しく再生されない可能性がある。
【0008】
このように従来のタイムスタンプ方式では、複数のクリツプを連続して再生し難い問題があつた。
かかる問題を解決するため、従来では複数のクリツプの連続再生を実現する方法として、オーデイオデコーダ2及びビデオデコーダ3を2組用意し、これら各組を交互に使用して、デマルチプレクサ1の出力をスイツチングする方法が広く用いられている。この方法によれば、AV同期の方式にタイムス・タンプ方式を採用することも可能である。
【0009】
しかしながらこのような方法では、オーデイオデコーダ2及びビデオデコーダ3を2組用意する必要があり、またスイツチングを行う装置も必要となるなどシステム規模が大きくなる問題があった。
本発明は以上の点を考慮してなされたもので、簡易な構成で、各クリツプの再生を指定時刻に開始でき、かつ複数のクリツプを連続的に再生することのできる復号化装置及び符号化復号化装置を提案しようとするものである。
【0010】
【課題を解決するための手段】
かかる課題を解決するため本発明においては、素材を形成する圧縮ビデオデータ及び圧縮オーデイオデータを復号する復号化装置に、データ供給源から供給される、所定の圧縮ビツトレートで圧縮符号化されて多重化された圧縮ビデオデータと圧縮オーデイオデータとを分割して出力する分割手段と、分割手段から出力される圧縮ビデオデータを復号する第1の復号手段と、分割手段から出力される圧縮オーデイオデータを復号する第2の復号手段と、データ供給源から供給される、素材の時間長を示す時間情報と、予め記憶している、素材の時間長毎に発生する圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差を示す再生時間差データとに基づいて、第2の復号手段の圧縮オーデイオデータに対する復号動作を再生時間差分だけ停止させる制御手段とを設けるようにした。
【0011】
また本発明においては、予め素材の時間長に対する最小単位を設定しておき、復号化装置に、当該最小単位以上の時間長毎に発生する再生時間差を示す再生時間差データを記憶させるようにした。
【0012】
【作用】
このように、所定の圧縮ビツトレートで圧縮符号化された圧縮ビデオデータ及び圧縮オーデイオデータで形成される素材の時間長毎に発生する圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差を、復号化側に再生時間差データとして記憶しておくようにしたことにより、タイムスタンプの有無に係わらず、素材の時間長のみから、当該素材を形成する圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差を特定することができ、さらに当該特定した再生時間差分だけ、圧縮オーデイオデータに対する復号動作を停止させることにより、複数の素材を連続再生する際に、各素材を形成する圧縮ビデオデータ及び圧縮オーデイオデータの再生開始時刻を同期させることができる。
【0013】
また、予め素材の時間長に対する最小単位を設定しておくことにより、素材の時間長と、当該素材を形成する圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差との組み合わせパターンを、最小単位が設定されていない場合と比べて格段と少なくすることができる。
【0014】
【実施例】
以下図面について、本発明の一実施例を詳述する。
【0015】
〔1〕第1実施例
(1)利用技術
(1−1)MPEG規格でのビデオ圧縮
(1−1−1)仮想バツフアについて
MPEG規格によるビデオデータの圧縮では、各フレーム(画像)によつて発生するビツト量が変化する。このビツト量が多すぎたり少なすぎたりすると、デコーダ側のバツフアがオーバーフローしたりアンダーフローしたりする可能性がある。
このため、一般的にはデコーダのバツフアをある量に想定し、このバツフアが破綻しないようにエンコーダを駆動制御しながら、供給されるビデオデータを符号化(エンコード)している。以下、このようなバツフアを仮想バツフアと呼ぶ。
【0016】
(1−1−2)スタートアツプデイレイについて
デコード時において、デコーダバツフアにデータが入力されると直ちに画像が再生されるわけではなく、ある時間が経過したのち再生が開始される。これはデコーダバツフアが破綻するのを防ぐためである。以下、この時間のことをスタート・アツプ・デイレイと呼ぶものとする。
スタート・アツプ・デレイは、どのようにビデオ素材を圧縮しても同じになるわけではなく、一般的にはビデオ素材によつてそれぞれ異なる。
図1に仮想バツフア4とスタート・アツプ・デイレイについて示す。この図1においてT1 は1フレーム時間、T2 はスタート・アツプ・デイレイ、Vb は仮想バツフア4の容量をそれぞれ示している。またここでは、一定速度でビデオデコーダ5にデータを供給することを考えているため、入力データの累積量を示す線は直線となつている。
【0017】
このような仮想バツフア4では、例えば図2(A)に示すように、所定のスタート・アツプ・デイレイT2 よりもデコード開始が遅すぎると、オーバーフローしてしまう危険がある。
一方図2(B)に示すように、所定のスタート・アツプ・デイレイT2 よりもデコード開始が早すぎると、アンダーフローしてしまう危険がある。
【0018】
(1−1−3)圧縮ビデオデータフアイルのデータ量について
以下、1つのビデオ素材をエンコードした結果、得られたデータ群を「圧縮ビデオデータフアイル」と呼ぶものとする。通常、同じ時間長の異なるビデオ素材から生成される圧縮ビデオデータフアイルのデータ量は同じにはならず、図3(A)及び(B)からも明らかなように、圧縮ビデオデータフアイルのデータ量をVv、ビデオ圧縮ビツトレートをRv、仮想バツフアの容量をVb、ビデオ素材の時間長をT4とすると、次式
【数1】
のように、±仮想バツフアの容量Vb分の範囲で変動する。
【0019】
(1−2)圧縮ビデオデータフアイルの連続再生
1.ビデオデータの圧縮方式としてMPEG方式を採用する。
2.ビデオデータの圧縮ビツトレートは一定とする。
3.各圧縮ビデオデータフアイルのスタート・アツプ・デイレイは等しいと限らない。
4.各圧縮ビデオデータフアイルのデータ量はその圧縮ビツトレートと再生時間(ビデオ素材の時間長)との積に等しいとは限らない。
という条件のもとで、圧縮ビデオデータフアイルを連続再生(デコード)するためには、
1.ビデオ・デコーダ・フアイルとして仮想バツフアの(容量又は数を)3倍以上を用意する。
2.連続再生すべき圧縮ビデオデータフアイル群の先頭フアイルは、ビデオ・デコーダ・バツフアに仮想バツフアの容量分だけデータがたまつてからデコードを開始する。
3.最大ビデオ・データ・フアイル量を、その再生時間内に転送可能な転送レートでデータをデコーダに転送する。
という方法が有効である。
【0020】
以下、この方法に関して説明する。
2つの圧縮ビデオデータフアイルF1 、F2 をこの順に連続再生をする場合を考える。このとき圧縮ビツトレートをともにRv とし、仮想バツフアのサイズをVb とする。また再生時間をそれぞれTF1及びTF2とし、スタート・アツプ・デイレイをそれぞれTd1 、Td2 とする。
【0021】
(1−2−1)圧縮ビデオデータフアイルの連続再生
簡単のため、各圧縮ビデオデータフアイルのデータ量はその圧縮ビツトレートと再生時間との積に等しい(データ量が特定できる)ものと仮定する。
もし、Td1 =Td2 であれば、この2つの圧縮ビデオデータフアイルF1 、F2 を連続的に圧縮ビツトレートRv の転送速度でデコーダに供給してやれば、これら2つの圧縮ビデオデータフアイルF1 、F2 は連続的に再生される。
ところがTd1 <Td2 の場合には、圧縮ビデオデータフアイルF2 のデコード開始がTd2 よりも早くなるため、仮想バアフアがアンダーフローする危険性がある。
【0022】
逆にTd1 >Td2 の場合には、圧縮ビデオデータフアイルF2 のデコード開始がTd2 よりも遅くなるため、仮想バアフアがオーバーフローする危険性がある。
この場合発生し得る最大のスタート・アツプ・デイレイは、「仮想バツフアの容量分のデータを圧縮ビツトレートと等しい転送速度で転送するのに要する時間(Tb =Vb /Rv )」に等しい。
【0023】
従つて連続再生すべき圧縮ビデオデータフアイル群の先頭フアイルにおいては、そのスタート・アツプ・デイレイとは無関係に、この時間だけTb だけ待つてからデコードを開始するようにすれば、バツフアがアンダーフローすることはない。つまりビデオデコーダバアフアにVb だけデータがたまつてからデコードを開始するようにすれば良い。
また発生し得る最小のスタート・アツプ・デイレイは「0」であり、このようなフアイルをTb だけデコードの開始を遅らせると、最悪Vb 分だけバツフアがオーバーフローしてしまう。そこでビデオデコーダバツフアとして、仮想バツフアの2倍用意しておけばオーバーフローすることはない。
【0024】
(1−2−2)データ量不足の考慮
簡単のため、各圧縮ビデオデータフアイルのスタート・アツプ・デイレイが等しい(スタート・アツプ・デイレイが特定できる)ものと仮定し、図4(A)及び(B)を参照して説明する。
一般に、圧縮ビデオデータフアイルのサイズVvは圧縮ビツトレートRv、とその再生時間Tの積に一致しない(Vv、≠Rv、T)ので、圧縮ビツトレートと等しい転送速度でデータをデコーダに供給した場合、入力に要する時間(Vv、/Rv、)と出力(再生)に要する時間Tとは一致しない。
【0025】
圧縮ビデオデータフアイルF1 において、デコーダ入力所要時間が出力所要時間よりも長い(VV1/Rv >TF1)の場合圧縮ビデオデータフアイルF2 のデコード開始がスタート・アツプ・デイレイTd2 よりも遅くなるため、バツフアがオーバーフローする危険性がある。
逆に圧縮ビデオフアイルF1 において、入力所要時間が出力所要時間よりも短い(VV1/Rv <TF1)場合、圧縮ビデオデータフアイルF2 のデコード開始がスタート・アツプ・デイレイTF2よりも早くなるため、バツフアがアンダーフローする危険性がある。
【0026】
発生し得る最大の圧縮ビデオデータ量Vvmaxは、次式
【数2】
である。そこで、実際に得られた圧縮ビデオデータ量がこの値に満たない場合には、そのフアイルの最後に「ゴミ」データDdを付加することにより、任意のフアイルのサイズVvをVvmaxになるようにする。MPEG規格では、「0」を「ゴミ」データとして追加することが可能である(以下、このようにフアイルのサイズ調整のために追加する「ゴミ」データDdを「パツド」と呼ぶ)。
このようにサイズ調整したフアイルの全データを、時間Tで転送できるだけの転送速度(Rv′=Rv+Vb/T)でデコーダに入力するようにすれば、図4(B)に示すように、入力所要時間と出力所要時間がともにTとなるため、上述のようなバツフア破綻は発生しない。
【0027】
しかしながらこの転送速度Rv ′は本来の転送速度Rv よりも大きいため、連続再生するしないにかかわらずバツフアがオーバーフローしてしまう危険性がある。最悪Vb 分だけバツフアがオーバーフローしてしまうので、このような事態を防ぐためには、ビデオデコードバツフアとして、仮想バツフアの2倍用意しておけば良い。
以上のことから、結局スタート・アツプ・デイレイが不定であり、データ量も不定であることを考慮すると、ビデオデコーダバツフアとして、仮想バツフアの(容量又は数の)3倍用意しておけばよいことがわかる。
【0028】
(1−3)MPEG規格でのオーデイオ圧縮
オーデイオデータの場合はビデオデータの場合と異なり、MPEG規格に基づいて圧縮した場合、ビデオデータのスタート・アツプ・デイレイに相当するものは存在しないし、またその圧縮データ量はその圧縮ビツトレートと素材の時間長との積に一致するので、特に工夫しなくても複数の圧縮オーデイオデータフアイルを連続的にデコーダに供給してやれば連続的に再生される。
【0029】
(1−4)圧縮データの最小単位
ビデオ信号はフレームという単位で扱われ、これをMPEG規格に基づいて圧縮した場合は、さらにGOP(Group Of Picture)という単位で扱われることになる。
例えばNTSC方式の場合、そのフレームは29.97 〔Hz〕であり、通常1GOPは15フレームで構成される。またPAL方式の場合は、そのフレームは25〔Hz〕であり、12フレームからなるGOPと13フレームからなるGOPとを交互に繰り返す構造にする。
【0030】
一方オーデイオをMPEG規格に基づいて圧縮した場合、例えばサンプリング周波数を48〔KHz〕とし、かつサンプル数を1152とすると、その最小単位は24〔ms〕となる。
このように、圧縮したデータには扱うことのできる最小単位というものが存在するため、任意の時間長のクリツプを厳密に実現することはできない。
ここで簡単のためクリツプの最小時間長単位を1秒とする。このような制限を受けても実際の運用上問題になることはほとんどない。このときクリツプの時間長をTとし、この時間以上で最も近い実現可能なビデオの時間をTv とする。また時間Tv 以下で最もこの時間に近く実現可能なオーデイオの時間をTa とする。
【0031】
PAL方式の場合であれば、Tv =Tとなるが、NTSC方式の場合はTv ≠Tとなつてしまう。
具体的な数値例を図5に示す。なおこの例は、ビデオはNTSC方式の場合であり、オーデイオは24〔ms〕が最小単位の場合である。この例の場合、ビデオとオーデイオの誤差TVX−Tc は、0から23までの24通り存在する。
【0032】
(2)実施例による符号化復号化装置の構成
図6において、10は全体として符号化復号化装置を示し、エンコーダ部11は供給される映像オーデイオ信号S1に基づく映像信号及びオーデイオ信号をそれぞれ符号化し、多重化した後、得られた圧縮AV多重化データD1をデータ供給部12に供給する。
データ供給部12は、供給される圧縮AV多重化データD1をコントローラ13の制御に基づき記録メデイア14に記録する。またこのデータ供給部12では、記録メデイア14に記録された圧縮AV多重化データD2をコントローラ13の制御に基づいてフアイル単位で読み出し、これを一定速度でデコーダ15のデマルチプレクサ16に供給する。
デマルチプレクサ16は、供給される圧縮AV多重化データD2を圧縮符号化されたビデオ信号でなる圧縮ビデオデータD3と、圧縮符号化されたオーデイオ信号でなる圧縮オーデイオデータD4とに分け、これらをそれぞれビデオデコーダ17及びオーデイオデコーダ18に送出する。
【0033】
このときデータ供給部12のコントローラ13は共有メモリ19を介してコントローラ20に制御情報信号S3を送出すると共に、コントローラ20は制御情報信号S3に基づく制御信号S4及びS5をそれぞれビデオデコーダ17、オーデイオデコーダ18に供給するようになされている。
かくしてビデオデコーダ17は、制御信号S4に基づいて圧縮ビデオデータD3をバツフア21に順次蓄え、読み出しながら、これを順次デコードして出力するようになされている。
同様にしてオーデイオデコーダ18は、制御信号S5に基づいて圧縮オーデイオデータD4をバツフア22に順次蓄え、読み出しながら、これを順次デコードして出力するようになされている。
【0034】
この実施例の場合、ビデオデコーダ17に対応するバツフア21としては、仮想バツフアの3倍の容量を有するものが用いられている。これにより供給される圧縮ビデオデータD3のスタート・アツプ・デイレイの不定や、データ量も不定によつてバツフア21が破綻(オーバーフロー、アンダーフロー)するのを防止し得るようになされている。
またこの実施例の場合、図7(B)に示すように、デマルチプレクサ16は、分割した圧縮ビデオデータD3及び圧縮オーデイオデータD4を速度変換することなく、そのままバースト的にビデオデコーダ17又はオーデイオデコーダ18に送出するようになされている。
【0035】
この場合、本来は、所定の圧縮ビツトレートで圧縮したデータは、図7(A)に示すように一定速度で各デコーダ17、18に供給すべきであるが、このようにしようとするとデマルチプレクサ25の部分に速度変換をする回路が必要になる。このため実施例の符号化復号化装置10では、このようにバースト的にデータが各ビデオデコーダ17やオーデイオデコーダ18に入力されてもバツフア21、22が破綻することなく再生が可能なように、以下のようにフオーマツトを規定している。
【0036】
(3)連続再生及び定時再生の実現
この実施例の符号化復号化装置10では、AVの同期をとる方式としてタイム・スタンプを使用しない暗黙同期方式を採用している。
この場合このような方式でAV同期をとりながらクリツプを連続再生するためには、
1.クリツプが連続しても各クリツプの頭でビデオデータとオーデイオデータの頭がそろうこと
2.クリツプが連続しても各クリツプの再生中にビデオデータ及びオーデイオデータの各デコーダバツフアが破綻しないこと
の2点を満たせば良い。
以下にこれら各条件をそれぞれ満たすための方法を説明する。
【0037】
(3−1)定時再生及び連続再生実現のためのAV頭合わせの方法
現在、デコーダにはいろいろなタイプのものが存在しているが、実施例の符号化復号化装置10では、ビデオデコーダ17として、「スタート命令を受け取つた後、1.5 フーム時間(0.05秒)後に再生を開始するもの」を適用し、オーデイオデコーダとして、「スタート命令を受け取つた後、すぐに再生を開始するもの(通常のデコーダ仕様)」を適用して、以下のシーケンスにより定時再生を実現している。
【0038】
1.再生を開始したい時刻のTS 秒(仮想バツフア分の圧縮ビデオデータをビデオデコーダ18のバツフア22に転送するのに要する時間)前に、データ供給部のコントローラ13(図1)により記録メデイア14からデータ転送を開始するようにする。このTS 秒という時間は、後述するように任意のクリツプについて同一となる。
2.デマルチプレクサ16が最初のクリツプの先頭データを受信したら、デコーダ15のコントローラ20にデータの転送が開始されたことを伝える。
3.(TS −0.05)秒経過したら、コントローラ20からビデオデコーダ17に対して再生動作開始命令を出す。
4.さらに0.05秒経過したら、コントローラ20からオーデイオデコーダ18に対して再生開始命令を出す。
【0039】
これによりビデオデータ及びオーデイオデータについて同時に所定時刻に再生が開始されるが、このような方法を実現するためには経過時間を計測する必要がある。
しかるにこの実施例の符号化復号化装置10では、圧縮AV多重化データD1が一定速度でデマルチプレクサ16に転送されるので、このデマルチプレクサ16を通過するデータの数をカウントしていれば、経過時間を計ることができる。
【0040】
このためこの実施例の場合、カウンタ等を用いずに、エンコーダ部11が映像信号及びオーデイオ信号を符号化、多重化する際、データフアイル内に「マルチプレクサ16が各デコーダ17、18に対して動作命令を出すべき時刻に相当する位置」に目印として特殊なコード(以下、これをマークと呼ぶ)を入れるようになされている。
またデマルチプレクサ16は、データフアイル内からこのマークを検出すると、これをマーク検出信号S10(図6)としてコントローラ20に伝える一方、コントローラ20はこのマーク検出信号S10に基づきその内容に応じてビデオデコーダ17及びオーデイオデコーダ18に対して制御信号S4及びS5を送出するようになされている。
これによりこの符号化復号化装置10では、コントローラ20が上述のようなタイミングでビデオデコーダ17及びオーデイオデコーダ18をそれぞれ駆動し得るようになされている。
【0041】
なおこのマークとしては、再生圧縮多重化データD2の中から識別することができるように、MPEGシステム規格によつて、決してマークは再生圧縮多重化データD2には現れないことが保証されている4バイトのコードを使用している。
この実施例の場合、ビデオデコーダ17にデコードを開始させるビデオデコード開始マーク、及びオーデイオデコーダ18にデコーダを開始させるオーデイオデコード開始マークとして、それぞれ16進数表示で「000001BD」、「000001BF」なるコードを使用している。
【0042】
また圧縮AV多重化データD2の転送速度を5〔Mbps〕とし、仮想バツフアの容量分の圧縮ビデオデータD4をビデオデコーダ17のバツフア21に転送するのに圧縮再生多重化データD2を4〔Mbit〕供給する必要があるものとして、図8に示すように、先頭から次式
【数3】
の位置にビデオデコード開始マークM1「000001BD」を置き、その次式
【数4】
後にオーデイオデコード開始マークM2「000001BF」を置いている。
次に連続再生実現のためのAV頭合わせの方法について説明する。
【0043】
上述の「(1−4)圧縮データの最小単位」のところで説明したように、ビデオデータとオーデイオデータとの再生時間は一致しない。例えば時間が6秒であるクリツプでは、0.006 秒だけビデオの方が再生時間が長くなる。従つて6秒のクリツプを2つ連続して再生すると、最初のクリツプのAV同期が完全にとれていたとしても、2つ目のクリツプはオーデイオ信号の再生開始が0.006 秒だけ早くなつてしまう。この程度の差であれば、実際上は何ら違和感を感じることはないが、クリツプの連続数が増えるごとにこの差は蓄積されていくため、例えは10個も連続すると、オーデイオとビデオとの差は0.06秒にもなつてしまい、違和感を感じるようになる。
このためこの実施例の符号化復号化装置10では、以下の方法により各クリツプの頭においてAVの頭が合うようにしている。
1.再生を開始してからオーデイオの再生時間Tc が経過したら、オーデイオデコーダ18を停止させる。
2.さらに再生時間差(Tv −Tc )だけ時間が経過したら、再びオーデイオデコーダ18を動作させる。
3.この操作を各クリツプに対して繰り返す。
この場合この方法を実現するためには、定時再生の場合と同様に経過時間を計測する必要がある。
【0044】
このためこの実施例では、上述の場合と同様にして、ここでもエンコーダ部11が各データフアイルの所定位置に所定のマークを付加するようになされている。
例えば図5によりT=6〔s〕のクリツプの場合、再生時間差が0.006秒であるから、オーデイオデコード開始マークM1の前の位置にオーデイオデコーダ18にデコードを停止させるオーデイオデコード停止マークMs1〜Ms23(図8)を入れる。
この場合圧縮オーデイオデータの最小単位が24〔ms〕である場合、再生時間差は0〜23〔ms〕までの24通り存在するが、差が0〔ms〕の場合は、オーデイオデコーダ18を停止させる必要がないのでオーデイオデコード停止マークMs1〜Ms23としては23個用意すれば良い。
【0045】
このためこのエンコーダ部11では、オーデイオデコード停止マークMs1〜Ms23として、例えば「000001C1」〜「00001D7」までの23個のコードをそれぞれ1〜23〔ms〕の再生時間差に対応させている。従つてこれらのコードは、5〔Mbps〕×0.001〔s〕=625〔byte〕毎に現れることになる。またこのエンコーダ5は、これら23個のコードのうちどれに従つてデコードを停止させれば良いかを示すマーク(以下、これを停止マーク指定マークM3と呼ぶ、例えば「000001D8」)を各クリツプの最後に付加し、この後に有効となるオーデイオデコード停止マークM4を続けて付加するようになされている。
例えばT=6〔s〕のクリツプの場合、再生時間差が0.006〔s〕であるから、オーデイオデコード停止マークMs6を有効にさせる必要があるため、このクリツプの最後尾の8〔byte〕は「000001D8000001C6」となる。
【0046】
クリツプ1(T=6〔s〕)とクリツプ2(T=7〔s〕)とを連続再生する場合、クリツプ1の停止マーク指定マークM3からオーデイオデコード停止マークMs6が有効であることがわかつているので、クリツプ2のオーデイオデコード停止マークMs6がデマルチプレクサ16において検出された時点で、オーデイオデコーダ18に停止命令を出し、さらにクリツプ2のオーデイオデコード開始マークM2が検出された時点で、オーデイオデコーダ18に開始命令を出すようになされている。
なおクリツプの連続再生を開始する前に有効な各停止マークMs1〜Ms23をクリアするため、「00000000」にしておくことにより先頭クリツプの停止マークMs1〜Ms23で停止命令が出されるのを防止し得るようになされている。
【0047】
(3−2)連続再生実現のためのバツフア使用方法
(3−2−1)圧縮AV多重化フオーマツトの基本構造
以下、同一種類のデータのかたまりを「パケツト」と呼ぶことにする。ここで種類とは、ビデオ、オーデイオ及びパケツトの3つを意味する。各パケツトの頭にその種類を表すためのヘツダを付ける。
またいくつかのパケツトの集まりを「パツク」と呼ぶことにする。パツクはパケツトとは異なり、何らかの識別ヘツダがつくわけではない。
ここでこの実施例の符号化復号化装置10では、以下に示す3種類のパツクを使用している。
1.標準パツク
……原則として、ビデオパケツト、オーデイオパケツト、パツドパケツト各1つずつから構成される。
2.先頭パツク
……仮想バツフア分だけビデオパケツトのデータ量が標準パツクよりも大きい。
3.残余パツク
……上述の2種類のパツクに含まれなかつた残りのデータから構成されている。
【0048】
この実施例の場合、1つのクリツプをエンコードして得られる1つの圧縮AV多重化データフアイルは、図9(A)に示すように、その先頭に1つの「先頭パツク」が存在し、その後複数個の「標準パツク」が連続し、最後に1つの「残余パツク」がくるように構成されている。
なおデータ制御用のマークは全て、先頭パツクのビデオパケツト内に位置することになるため、パケツト・ヘツダの内容にマークが挿入されて、パケツト・ヘツダが認識できなくなるようなことは発生しない。
【0049】
(3−2−2)パケツト・ヘツダ
各パケツトの種類を識別するためのヘツダとしては、圧縮データの中には決して現れないパターンを採用する必要がある。このためこの符号化復号化装置10では、MPEGシステム規格においてヘツダ用に確保されているパターンを採用している。実際上例えば、以下のようなパターンを用いている。なお、各ヘツダは16進数表示しており、そのサイズは4バイトである。
ビデオ・パケツト・ヘツダ ……000001E3
オーデイオ・パケツト・ヘツダ ……000001C0
パツド・パケツト・ヘツダ ……000001BE
かくしてデマルチプレクサ16では、入力されてくる圧縮AV多重化データD2の任意の連続する4バイトを調べて、それがビデオ・パケツト・ヘツダであれば以下に続くデータをビデオ・デコーダ17に振り分け、オーデイオ・パケツト・ヘツダであれば以下に続くデータをオーデイオ・デコーダ18に振り分け、パツド・パケツト・データであれば以下に続くデータを破棄するようになされている。
【0050】
(3−2−3)圧縮ビツト・レート値等に関する制限
時間長Tのクリツプを、仮想バツフア量Vb、ビデオ圧縮ビツト・レートRvで圧縮した場合、発生し得る最大の圧縮ビデオ・データ量は、上述のように次式
【数5】
で与えられる。
このためこの実施例の符号化復号化装置10では、実際に得られた圧縮ビデオ・データ量がこの値に満たない場合は、その最後にパツド・データを付加することにより、任意のフアイルのサイズをVvmaxになるようにしている。このようにサイズ調整したあとの全データを、時間Tで転送する場合、ビデオ・データ転送速度Rv′は次式によつて表される。
【数6】
Rv′が最大Rvmax′となるのはクリツプの時間長が最小Tminの場合である。
【数7】
圧縮AV多重化データ転送速度Rmは、少なくとも圧縮ビデオ・データ転送速度と圧縮オーデイオ・データ転送速度の和よりも大きくなければならない。オーデイオに関してはその圧縮ビツト・レートに等しい値の転送速度でよい。よつて、これらのパラメータは次式を満たさなければならない。(正確には、ヘツダやマーク分も考慮する必要があるが、ここでは簡単のため省略する)
【数8】
【数9】
【0051】
実際上この符号化復号化装置10では、Rv 、Rm 、Ra 、Tmin 、Vb 等のパラメータは任意の値が可能なわけではなく、その用途やハードウエアの都合等により制限が加わる。このためこの符号化復号化装置10では、これらパラメータの中で制限の強いものから決めていき、最終的に(9)式を満たすように順次選定している。
【0052】
(3−2−4)パケツト・サイズの算出
圧縮ビツト・レートの値等のパラメータ値が与えられた場合に、各パケツトのサイズをいくつにすればよいのかを算出するための式を以下に示す。
まず、以下の計算で使用する変数を列挙する。
ビデオ圧縮ビツト・レート ……Rv 〔Mbps〕
ビデオ・データ転送速度 ……Rv ′〔Mbps〕
オーデイオ圧縮ビツト・レート ……Ra 〔kbps〕
圧縮AV多重化データ転送速度 ……Rm 〔Mbps〕
クリツプの時間長(1秒単位) ……T〔s〕
最小クリツプの時間長(1秒単位)……Tmin 〔s〕
T以上でTに最も近く現実可能なビデオの再生時間……Tv 〔s〕
Tv 以下でTに最も近く現実可能なオーデイオの再生時間……Ta 〔s〕
クリツプを転送するのに要する時間……Tt 〔s〕
仮想バツフア分の圧縮ビデオ・データが転送されるのに要する時間……TS 〔s〕
仮想バツフア量 ……Vb 〔Mbit〕
1クリツプの圧縮ビデオ・データ量……Vv 〔byte〕
1クリツプの圧縮オーデイオ・データ量……Va 〔byte〕
1クリツプのパツド・データ量 ……Vp 〔byte〕
1クリツプの総データ量 ……Vm 〔byte〕
全マーク・データ量 ……Vk 〔byte〕(=4×27〔byte〕〕)
パケツト・ヘツダ・サイズ ……Lh 〔byte〕(=4〔byte〕)
標準ビデオ・パケツト・サイズ(ヘツダは含まない)……Lv 〔byte〕
標準オーデイオ・パケツト・サイズ(ヘツダは含まない)……La 〔byte〕
標準パツド・パケツト・サイズ(ヘツダは含まない)……Lp 〔byte〕
標準パツク・サイズ(ヘツダを含む) ……Lm 〔byte〕
パツク数(残余パツクを除く) ……P
*標準パケツトとは標準パツク内のパケツトであることを表す。
残余ビデオ・パケツト・サイズ(ヘツダは含まない)……Lv ′〔byte〕
残余オーデイオ・パケツト・サイズ(ヘツダは含まない)……La ′〔byte〕
残余パツド・パケツト・サイズ(ヘツダは含まない)……Lp ′〔byte〕
*残余パケツトとは残余パツク内のパケツトであることを表す。
単位変換係数(Mbit→byte)……Cm =125000=1000×1000/8
単位変換係数(kbit→byte)……Ck =125 =1000/8
【0053】
Tを1秒単位とした場合、簡単のため、任意の時間長のクリツプにおいて標準パケツトのサイズLvおよびLaがそれぞれ等しくなるようにするためには、次式を満たすようにRv、Ra、Lv、Laを選択すればよい。
【数10】
【数11】
【数12】
通常、Rvはせいぜい0.1〔Mbps〕単位であり、Raは64、128、192、256、384〔kbps〕のいずれかである。従つて、上式を満たすような整数Lv、及びLaは存在する。
圧縮データの取り得る最小単位の制限により発生する端数データ、つまりビデオにおけるRv、×(Tv、−T)及びオーデイオにおけるRa×(Ta−T)分のデータで残余パツクを構成するようにし、残りのデータ、つまり、ビデオにおけるRv、T+Vb及びオーデイオにおけるRa×Tで標準パツクと初期パツクを構成するようにする。
【0054】
このようにするとRa及びRvに関して次式が成り立つ。
【数13】
【数14】
【数15】
【数16】
(14)式及び(16)式よりRv、Ra、Laを与えれば、Lvを算出できる。
オーデイオ・データ量Vaは
【数17】
ビデオ・データ量Vvは
【数18】
多重化データ量Vmは
【数19】
よつて、パツド・データ量Vpは、
【数20】
よつて
【数21】
【0055】
(21)式よりLp及びLp′が求められる。
Ta<Tの場合、次式を満たす整数K及びLa″が存在する。
【数22】
このとき標準パツクの最後からK+1番目のパツクに関して、オーデイオ・パケツトのデータ・サイズをLa−La″とし、このパケツトの直後にサイズがLa″−Lhのパツト・パケツトを置くようにする。そして、標準パツクの最後からK個のパツク関して、オーデイオ・パケツトの代わりに同サイズのパツド・パケツトを置くようにする。
また、残余パツクに関して、次式が成り立つ。
【数23】
【数24】
【0056】
(3−2−5)連続再生実現のための条件
上述の「(1−2)圧縮ビデオ・データ・フアイルの連続再生」で説明したように、圧縮ビデオデータだけであつても連続再生するためには、ビデオ・デコーダ・バツフアを仮想バツフアの3倍用意する必要がある。
以下に多重化した場合にも、ビデオ・デコーダ・バツフア及びオーデイオ・デコーダ・バツフアをそれぞれ仮想バツフアの3倍用意すれば連続再生できる条件を示す。
まず「(1−2−1)スタート・アツプ・デイレイ不定の考慮」で示したように、各クリツプのスタート・アツプ・デイレイが不定であることに対処するためには、仮想バツフアの2倍の容量が必要となる。図11の「データ出力折れ線の推移可能領域」をカバーするのがこの2倍バツフアである。よつて、残りの1倍バツフア内でデータ入力折れ線を推移させるようにできれば、3倍バツフアで連続再生が可能となる。
【0057】
ビデオ・デコーダ・バツフア17には、1つのクリツプのデータだけが入つている時間と2つのクリツプのデータが入つている時間が存在する。
2つのクリツプのデータが入つている時間は、もしTt =Tv であれば、各クリツプの最初のTS 時間だけである。この時間は、任意のクリツプについて先頭パツクを転送している時間であり、先頭以外にオーデイオ・パケツトやパツド・パケツトが含まれないため、図10からも明らかなように、入力折れ線は必ず直線▲1▼よりも下になる。つまり、1倍バツフア内をデータ入力折れ線が出ることはない。
1つのクリツプのデータだけが入つている時間(TS だけ経過した後の時間)に関しては、図10において、直線▲1▼と直線▲2▼の間に入るようにふればよい。そのためには以下の条件を満たすようにすればよい。
条件1:直線▲1▼と直線▲3▼が原点以外で交わらないようにする。
【0058】
つまり任意のt>0についてv3(t)>v1(t)が成り立つようにすればよい。
【数25】
【数26】
条件2:直線▲2▼と直線▲4▼がビデオ・データを転送し終わる時刻teまで交わらないようにする。つまりv4(te)<v2(te)が成り立つようにすればよい。この場合、次式
【数27】
なので、
【数28】
【数29】
【0059】
なお、各直線▲1▼〜▲4▼の方程式は以下の通りである。また、厳密にはヘツダやマークの分も考慮する必要があるが、圧縮データのデータ量に比べて非常に小さいので無視する。
【数30】
【数31】
【数32】
【数33】
従つて、仮想バツフアの3倍で連続再生を実現するためには、Tt=Tvとして、かつ(26)式及び(29)式を満たすように各パラメータを選択すれば良く、実際上この実施例の符号化復号化装置10でもこのように各パラメータが選定されている。
【0060】
(3−2−6)連続再生可能な圧縮AV多重化フオーマツトの例
Rm=5〔Mbps〕、Rv=4〔Mbps〕、Ra=256〔kbps〕、Tmin=6〔s〕、Vb=4〔Mbps〕という要求を実現するフオーマツトを示す。ただし、ビデオはNTSC方式とする。
なおこの場合、(9)式の右辺は5〔Mbps〕であり、左辺は次式
【数34】
となるため、(9)式は満足されており、これらの値が選択可能であることがわかる。
例えばクリツプ時間長T=6〔s〕の場合、図5から、
Tt、=Tv、=6.006〔s〕、Ta=6〔s〕
適当にLa=1000〔byte〕として(あまり大きくするとオーデイオ・バツフアが破綻する可能性がある。逆に小さくしすぎると標準パツク数が増えてヘツダによるオーバ・ヘツドが増えてしまう)、(14)式より標準パツク数を求める。
【数35】
(16)式より標準ビデオ・パケツトのサイズを求める。
【数36】
(21)式よりパツド・パケツトのサイズを求める。
【数37】
よつて、Lp=293〔byte〕、Lp′=74〔byte〕となる。
【0061】
(23)式より残余ビデオ・パケツトのサイズを求める。
【数38】
ここでTa=Tなので、残余オーデイオ・パケツトのサイズは0である。
以上の値より標準パックのサイズを求める。
【数39】
このとき(26)式は満たされていることが分かる。
0.92>0.8
このとき(29)式も満たされていることが分かる。
23.2<24
以上の結果、得られるフオーマツトを図12に示す。同様にして、クリツプ時間長7秒の場合についても算出し、その結果を図13に示す。
この場合は、Ta≠Tとなるため、最後の標準パツクは他の標準パツクとは異なりTa−Tに相当する分のパツド・パケツトが存在する。
各パラメータの値が決まれば、クリツプの内容に無関係に任意のクリツプについてクリツプ時間長ごとに、図12及び図13のようなフオーマツト・テーブルを作成することができるので、実際に圧縮AVデータを多重化する場合、各エンコーダで得られた圧縮データをこのテーブルに従つて多重化してやればよい。
【0062】
このためこの実施例の符号化復号化装置10では、エンコーダ部11にこのようなフオーマツト・テーブルが予め格納されており、エンコーダ部11がこのフオーマツト・テーブルに基づいて符号化された映像信号と符号化されたオーデイオ信号とを多重化するようになされている。
【0063】
(4)第1実施例の動作
以上の構成において、この符号化復号化装置10では、エンコーダ部11に供給される映像オーデイオ信号S1に基づく映像信号及びオーデイオ信号を、このエンコーダ部11において符号化し、これらを上述の第1の多重化フオーマツトに従つて多重化することにより圧縮AV多重化データD1を形成すると共に、この際各クリツプ毎に、ビデオデコード開始マークM1 、オーデイオデコーダ開始マークM2 、オーデイオ停止マークMS1〜MS23 、停止マーク指定マークM3 及びオーデイオデコード停止マークM4 (以下、これらをまとめてデコーダ制御マークM1 〜M4 、MS1〜MS23 と呼ぶ)をそれぞれ所定位置に付加し、これをデータ供給部12に供給して記録メデイア14に記録させる。
この圧縮AV多重化データD1はコントローラ13の制御に基づいてデータフアイル単位で読み出され、圧縮AV多重化データD2としてデマルチプレクサ16に供給され、このデマルチプレクサ16において圧縮ビデオデータD3と圧縮オーデイオデータD4とに分割されて、それぞれビデオデコーダ17又はオーデイオデコーダ18に送出される。
この際デマルチプレクサ16は、このデータフアイルの中からデコーダ制御マークM1 〜M4 、MS1〜MS23 を検出すると、検出結果に基づくマーク検出信号S10をコントローラ20に送出する。
コントローラ20はこのマーク検出信号S10に基づいて制御信号S4、S5をそれぞれビデオデコーダ17及びオーデイオデコーダ18にそれぞれ出力してビデオデコーダ17を駆動制御することにより、ビデオデコーダ17及びオーデ.オデコーダ18を必要に応じて開始させ、又は停止させる。またこの際コントローラ20はオーデイオデコーダ18の再生動作をクリツプの時間長に応じた所定時間停止させる。
【0064】
このようにこの符号化復号化装置10では、エンコーダ側において、各クリツプ毎にクリツプの時間長に応じた制御用のデコーダ制御マークM1 〜M4 、MS1〜MS23 を入れると共に、デコーダ側ではこれらデコーダ制御マークM1 〜M4 、MS1〜MS23 に基づいてビデオデコーダ17及びオーデイオデコーダ18を駆動制御するため、各クリツプ毎に完結してAVの頭を合わせることができる。
またこの符号化復号化装置10では、ビデオデコーダ17のバツフア21が仮想バツフアの(容量又は数の)3倍に設定されており、さらにこの3倍のバツフア21を破綻させないように、クリツプの時間長のみに依存し、かつ先頭ビデオパケツトのサイズが他のビデオパケツトよりも仮想バツフアの容量分だけ大きい特徴を有する上述の第1の多重化フオーマツトに従つて、エンコーダ11が符号化されたビデオ信号と、符号化されたオーデイオ信号とを多重化するため、ビデオデコーダ17のバツフア21が破綻することはない。
従つて「(3)連続再生の実現」において提示した2つの条件を満たすため、AV同期をとりながら連続再生することができる。
【0065】
従つて例えばクリツプ素材としてテレビジヨン放送CMを適用し、これをMPEG圧縮して、上述の多重化フオーマツトに従つてAV多重化したのち、HDD等の大容量かつランダム・アクセス可能な記録メデイアに記録しておき、CM放送のタイム・テーブルに従つて指定のCM圧縮データ群を指定時刻にデコーダに供給するようにすれば、指定時刻にかつ連続にCMを放送することができる。
【0066】
(5)第1実施例の動作
以上の構成によれば、エンコーダ側において、各クリツプ毎にクリツプの時間長に応じた制御用のデコーダ制御マークM1 〜M4 、MS1〜MS23 を入れると共に、デコーダ側ではこれらデコーダ制御マークM1 〜M4 、MS1〜MS23 に基づいてビデオデコーダ17及びオーデイオデコーダ18を駆動制御する一方、エンコーダ部5が、クリツプの時間長のみに依存し、かつ先頭ビデオパケツトのサイズが他のビデオパケツトよりも仮想バツフアの容量分だけ大きい特徴を有する第1の多重化フオーマツトに従つて、符号化されたビデオ信号と、符号化されたオーデイオ信号とを多重化するようにしたことにより、各クリツプのAVの頭を合わせ得ると共にバツフア21が破綻するのを防止でき、かくして複数のクリツプを指定された時刻に連続的に再生し得る符号化復号化装置を実現できる。
【0067】
〔2〕第2実施例
図6との対応部分に同一符号を付して示す図14は、第2実施例による符号化復号化装置40を示し、デコーダ41のコントローラ42が、その内部メモリに予め記憶している各クリツプ長におけるビデオとオーデイオとの再生時間差データに基づいてビデオデコーダ17及びオーデイオデコーダ18の駆動を制御することを除いて第1実施例の符号化復号化装置10(図6)とほぼ同様に構成されている。
すなわちこの符号化復号化装置40の場合、エンコーダ43は、供給される映像音声信号S1に基づく映像信号及びオーデイオ信号をそれぞれ符号化し、これらを上述の第1の多重化フオーマツトに従つて多重化し、圧縮AV多重化データD30としてデータ供給部44に送出する。
データ供給部44は、供給される圧縮AV多重化データD30をコントローラ45の制御に基づいて記録メデイア14に記録する。またデータ供給部44は、コントローラ45の制御に基づいて、記録メデイア14に記録された圧縮AV多重化データD31をクリツプ単位で再生し、これをデコーダ41のデマルチプレクサ46に送出する。
デマルチプレクサ46は、供給される圧縮AV多重化データD31を圧縮映像データD4及び圧縮オーデイオデータD5に順次分割し、これらをそれぞれビデオデコーダ17及びオーデイオデコーダ18に送出する。
この際コントローラ45は、このクリツプの時間長を時間情報信号S30として共有メモリ19を介してデコーダ41のコントローラ42に供給する。
【0068】
このコントローラ42は、クリツプの各時間長におけるビデオとオーデイオとの間の再生時間差データを予め記憶しており、供給された時間情報信号S30に基づくこのクリツプの時間長と、記憶している対応する再生時間差データとに基づく制御信号S4、S5を生成し、これらをそれぞれビデオデコーダ17及びオーデイオデコーダ18に送出する。
これによりこのコントローラ42は、データ供給部44のコントローラ45が記録メデイア14からこのクリツプを再生し始めてからオーデイオの再生時間Tc が経過した後オーデイオデコーダ18を停止させ、この後再生時間差(Tv−Tc )だけ時間が経過すると再びオーデイオデコーダ18を動作させることを各クリツプに対して順次行うようにオーデイオデコーダ18を駆動制御するようになされ、かくして各クリツプの頭においてビデオとオーデイオの頭を合わせさせ得るようになされている。
以上の構成において、この符号化復号化装置40では、データ供給部44のコントローラ45が記録メデイア14に記録された圧縮AV多重化データD31をクリツプ単位で再生する際、このクリツプの再生時間情報をデコーダ41のコントローラ42に供給する。
【0069】
一方コントローラ42は、コントローラ45から供給されるこのクリツプの再生時間時間情報と、コントローラ42自体がもつている再生時間差データとに基づいて、各クリツプの頭においてビデオとオーデイオの頭が合うようにビデオデコーダ17及びオーデイオデコーダ18を駆動制御する。
このようにこの符号化復号化装置40では、各クリツプ単位でこのようなオーデイオデコーダ18の駆動制御が行われるため、各クリツプ内で完結してビデオ及びオーデイオ間の再生時間差を補正することができ、かくしてAV同期を取ることができる。
またビデオデコーダ17のバツフア21が仮想バツフアの容量の3倍のものに選定されており、エンコーダ43が供給これら符号化されたビデオ信号及びオーデイオ信号を第1の多重化フオーマツトに従つて多重化するため、第1実施例の場合と同様にAV同期を取りながら各クリツプを連続再生することができる。
【0070】
以上の構成によれば、ビデオデコーダ17のバツフア21の容量を仮想バツフアの3倍にし、かつエンコーダ43が、供給される符号化されたビデオ信号及びオーデイオ信号を第1の多重化フオーマツトに従つて多重化するように設定すると共に、データ供給部44のコントローラ45が記録メデイア14に記録された圧縮AV多重化データD31をクリツプ単位で再生する際、このクリツプの再生時間情報をデコーダ41のコントローラ42に供給し、かつコントローラ41がこの再生時間時間情報と、コントローラ41自体がもつている再生時間差データとに基づいてビデオデコーダ17及びオーデイオデコーダ18を、各クリツプの頭においてビデオとオーデイオの頭が合うように駆動制御するようにしたことにより、第1実施例の符号化復号化装置10と同様に複数のクリツプを指定された時刻に連続的に再生し得る符号化復号化装置を実現できる。
【0071】
【発明の効果】
上述のように本発明によれば、所定の圧縮ビツトレートで圧縮符号化された圧縮ビデオデータ及び圧縮オーデイオデータで形成される素材の時間長毎に発生する圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差を、復号化側に再生時間差データとして記憶しておくようにしたことにより、タイムスタンプの有無に係わらず、素材の時間長のみから、当該素材を形成する圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差を特定することができ、さらに当該特定した再生時間差分だけ、圧縮オーデイオデータに対する復号動作を停止させることにより、複数の素材を連続再生する際に、各素材を形成する圧縮ビデオデータ及び圧縮オーデイオデータの再生開始時刻を同期させることができるので、従来と比して一段と簡易な構成でありながら、各素材の再生を指定時刻に開始でき、かつ複数の素材を連続的に再生することのできる復号化装置及び符号化復号化装置を実現できる。
また本発明によれば、予め素材の時間長に対する最小単位を設定しておくことにより、素材の時間長と、当該素材を形成する圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差との組み合わせパターンを、最小単位が設定されていない場合と比べて格段と少なくすることができるので、より少ないデータ量の再生時間差データで圧縮ビデオデータ及び圧縮オーデイオデータ間の再生時間差を特定することができる。
【図面の簡単な説明】
【図1】仮想バツフアとスタート・アツプ・デイレイの説明に供するグラフ及びブロツク図である。
【図2】スタート・アツプ・デイレイとバツフアの破綻の説明に供するグラフである。
【図3】圧縮ビデオデータフアイルのデータ量の説明に供するグラフである。
【図4】データ量とデータ転送速度の調整の説明に供するグラフである。
【図5】ビデオ及びオーデイオの実現可能時間を示す図表である。
【図6】第1実施例の符号化復号化装置の構成を示すブロツク図である。
【図7】デマルチプレクス後のデータ転送形態を示すブロツク図である。
【図8】デコーダ制御マークの説明に供する略線図である。
【図9】圧縮AV多重化データフアイルのフオーマツトを示す略線図である。
【図10】ビデオデコーダへの入力の推移を示すグラフである。
【図11】連続再生時のビデオデコーダバツフアの使用状況の説明に供するグラフである。
【図12】圧縮AV多重化フオーマツトの例を示す図表である。
【図13】圧縮AV多重化フオーマツトの例を示す図表である。
【図14】第1実施例の符号化復号化装置の構成を示すブロツク図である。
【図15】圧縮AV多重化フオーマツトの例を示す図表である。
【図16】圧縮AV多重化フオーマツトの例を示す図表である。
【図17】タイム・スタンプ方式の説明に供するブロツク図である。
【図18】タイム・スタンプ方式の場合の連続再生の説明に供する略線図である。
【符号の説明】
10、40……符号化復号化装置、11、43……エンコーダ、12、44……データ供給部、13、20、42、45……コントローラ、14……記録メデイア、16、46……デマルチプレクサ、17……ビデオデコーダ、18……オーデイオデコーダ、21、22……バツフア、S4、S5……制御信号、S10……マーク検出信号、D1、D2……圧縮AV多重化データ、M1 ……ビデオデコード開始マーク、M2 ……オーデイオデコード開始マーク、M3 ……停止マーク指定マーク、M4 ……オーデイオデコーダ停止マーク、MS1〜MS23 ……オーデイオデコード停止マーク。
【数27】
【数28】
[0001]
【table of contents】
The present invention will be described in the following order.
Industrial application fields
Conventional technology (Fig. 17)
Problems to be Solved by the Invention (FIGS. 17 and 18)
Means for Solving the Problems (FIGS. 1 to 16)
Action (FIGS. 1-16)
Example (FIGS. 1 to 16)
The invention's effect
[0002]
[Industrial application fields]
The present inventionDecoding device and encoding / decoding deviceFor example, it is suitable for application to an AV server system.
[0003]
[Prior art]
Conventionally, there are various methods for digital compression of video signals and audio signals. Among them, one of the methods that are currently attracting the most attention is the MPEG (Moving Pictur Experts Group) standard.
When reproducing (decoding) AV (Audio Vidual: audio / video) data compressed according to the MPEG standard, it is necessary to synchronize between AVs. There are two methods of stamping.
[0004]
In the implicit synchronization method, each AV data corresponding to substantially the same time and the same time length is multiplexed in a certain unit so that the head of the AV matches at the head of one AV material (hereinafter referred to as a clip). In other words, the AV synchronization is achieved by adjusting the decoding start time.
The time stamp method, on the other hand, adds a time stamp (DTS: Decoding Time Stamp and PTS: Presentation Time Stamp) indicating the playback time for each AV data unit when AV is multiplexed. A time stamp (SCR: System Clock Refernece or PCR: Program Clock Refernece) indicating the reference time is added for each unit, and each decoder executes playback according to this time stamp. Therefore, this is a method of synchronizing AV. The MPEG system standard adopts this method.
[0005]
In general, the time stamp method is more accurate than the implicit synchronization method, but has a feature that the cost is high because the mechanism is complicated.
A little more explanation about how to use time stamps. As shown in FIG. 17, the
[0006]
Further, the
As a result, the
[0007]
[Problems to be solved by the invention]
Consider a case where a plurality of clips are continuously reproduced.
In the case of the time stamp method, as shown in FIG. 18, data of the next clip (clip 2) has already started to be input to the
[0008]
Thus, the conventional time stamp method has a problem that it is difficult to continuously reproduce a plurality of clips.
In order to solve such a problem, conventionally, as a method of realizing continuous reproduction of a plurality of clips, two sets of
[0009]
However, in such a method, there is a problem that the system scale becomes large because two sets of the
The present invention has been made in consideration of the above points. With a simple configuration, the reproduction of each clip can be started at a specified time, and a plurality of clips can be reproduced continuously.Decoding device and encoding / decoding deviceIs to try to propose.
[0010]
[Means for Solving the Problems]
In order to solve this problem, in the present invention,Compressed video data and compressed audio data that are compressed and encoded at a predetermined compression bit rate and supplied from a data supply source to a decoding device that decodes compressed video data and compressed audio data forming the material. Dividing means for dividing and outputting, first decoding means for decoding compressed video data output from the dividing means, second decoding means for decoding compressed audio data output from the dividing means, and data supply source Based on the time information indicating the time length of the material, and the playback time difference data indicating the playback time difference between the compressed video data and the compressed audio data generated for each time length of the material stored in advance, Control means for stopping the decoding operation on the compressed audio data of the second decoding means by the reproduction time difference is provided.
[0011]
In the present invention, the minimum unit for the time length of the material is set in advance, and the decoding apparatus stores the reproduction time difference data indicating the reproduction time difference generated for each time length equal to or greater than the minimum unit.
[0012]
[Action]
In this way, the reproduction time difference between the compressed video data and the compressed audio data generated for each time length of the material formed by the compressed video data and the compressed audio data compressed and encoded at a predetermined compression bit rate is transmitted to the decoding side. By storing it as playback time difference data, it is possible to specify the playback time difference between the compressed video data and the compressed audio data forming the material from only the time length of the material regardless of the presence or absence of a time stamp. In addition, by stopping the decoding operation on the compressed audio data by the specified reproduction time difference, the reproduction start time of the compressed video data and the compressed audio data forming each material can be set when continuously reproducing a plurality of materials. Can be synchronized.
[0013]
In addition, by setting the minimum unit for the time length of the material in advance, the minimum unit sets the combination pattern of the time length of the material and the playback time difference between the compressed video data and compressed audio data forming the material. Compared with the case where it is not done, it can be remarkably reduced.
[0014]
【Example】
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0015]
[1] First embodiment
(1) Technology used
(1-1) Video compression according to the MPEG standard
(1-1-1) Virtual buffer
In video data compression according to the MPEG standard, the amount of bits generated by each frame (image) changes. If the amount of bits is too large or too small, the buffer on the decoder side may overflow or underflow.
For this reason, generally, the buffer of the decoder is assumed to be a certain amount, and the supplied video data is encoded (encoded) while driving the encoder so that the buffer does not fail. Hereinafter, such a buffer is referred to as a virtual buffer.
[0016]
(1-1-2) Start up delay
At the time of decoding, when data is input to the decoder buffer, the image is not reproduced immediately, and the reproduction is started after a certain time has elapsed. This is to prevent the decoder buffer from failing. Hereinafter, this time is referred to as a start-up-delay.
The start up delay is not the same no matter how the video material is compressed, and generally differs depending on the video material.
FIG. 1 shows the
[0017]
In such a
On the other hand, as shown in FIG. 2 (B), a predetermined start up delay T2If decoding starts too soon, there is a risk of underflow.
[0018]
(1-1-3) Data amount of compressed video data file
Hereinafter, a data group obtained as a result of encoding one video material is referred to as a “compressed video data file”. Normally, the data amount of the compressed video data file generated from different video materials having the same time length is not the same, and as is apparent from FIGS. 3A and 3B, the data amount of the compressed video data file is Vv, Video compression bit rate Rv, The virtual buffer capacity to Vb, T the length of video material4Then, the following formula
[Expression 1]
+/- virtual buffer capacity VbFluctuates in the range of minutes.
[0019]
(1-2) Continuous playback of compressed video data file
1. The MPEG system is adopted as a video data compression system.
2. The compression bit rate of video data is assumed to be constant.
3. The start up delay of each compressed video data file is not necessarily equal.
4). The data amount of each compressed video data file is not necessarily equal to the product of the compression bit rate and the playback time (time length of the video material).
In order to continuously play back (decode) a compressed video data file under the conditions
1. Prepare 3 times or more (capacity or number) of virtual buffers as video decoder files.
2. Decoding of the first file of the group of compressed video data files to be continuously reproduced starts after data is accumulated in the video decoder buffer for the capacity of the virtual buffer.
3. The maximum video data file amount is transferred to the decoder at a transfer rate that can be transferred within the playback time.
This method is effective.
[0020]
Hereinafter, this method will be described.
Two compressed video data files F1, F2Let's consider the case of continuous playback in this order. At this time, both compression bit rates are RvAnd the size of the virtual buffer is VbAnd Each playback time is set to TF1And TF2And start-up and day-lay respectively at Td1, Td2And
[0021]
(1-2-1) Continuous playback of compressed video data files
For simplicity, it is assumed that the data amount of each compressed video data file is equal to the product of the compression bit rate and the reproduction time (the data amount can be specified).
If Td1= Td2If so, these two compressed video data files F1, F2Continuously compressed bit rate RvThese two compressed video data files F are supplied to the decoder at a transfer rate of1, F2Are played continuously.
However, Td1<Td2In the case of the compressed video data file F2Decoding start of Td2There is a risk of underflow of the virtual bear because it is faster.
[0022]
Conversely, Td1> Td2In the case of the compressed video data file F2Decoding start of Td2There is a risk of overflowing the virtual bearer.
The maximum start-up delay that can occur in this case is “the time required to transfer the data corresponding to the capacity of the virtual buffer at a transfer rate equal to the compression bit rate (Tb= Vb/ Rv)"be equivalent to.
[0023]
Therefore, in the first file of the group of compressed video data files to be continuously reproduced, this time is used regardless of the start-up-delay.bIf you just wait and start decoding, the buffer will not underflow. In other words, the video decoderbIt is only necessary to start decoding after data has been collected.
The minimum start-up delay that can occur is "0".bIf you only delay the start of decoding, the worst VbThe buffer will overflow by the amount. Therefore, if the video decoder buffer is prepared twice as much as the virtual buffer, it will not overflow.
[0024]
(1-2-2) Consideration of insufficient data volume
For the sake of simplicity, it is assumed that the start up delay of each compressed video data file is equal (the start up delay can be specified), and description will be made with reference to FIGS. 4A and 4B.
In general, the size V of the compressed video data filevIs the compression bit rate Rv, And its reproduction time T (Vv, ≠ Rv, T), when data is supplied to the decoder at a transfer rate equal to the compression bit rate, the time required for input (Vv, / Rv)) And the time T required for output (reproduction) do not match.
[0025]
Compressed video data file F1, The decoder input time is longer than the output time (VV1/ Rv> TF1) In the case of compressed video data file F2Decoding starts at start-up-delay Td2There is a risk that the buffer will overflow.
Conversely, compressed video file F1The input required time is shorter than the output required time (VV1/ Rv<TF1) If compressed video data file F2Decoding starts at Start Up Dayray TF2There is a risk that the buffer will underflow.
[0026]
Maximum amount of compressed video data that can be generated VvmaxIs
[Expression 2]
It is. Therefore, if the actual amount of compressed video data obtained is less than this value, the “dust” data D is added at the end of the file.dCan be added to any file size VvVvmaxTo be. In the MPEG standard, it is possible to add “0” as “dust” data (hereinafter, “dust” data D added for file size adjustment in this way.dAre called “patds”).
A transfer speed (R that can transfer all the data of the file whose size has been adjusted in this way at time T.v'= Rv+ VbWhen the data is input to the decoder at / T), as shown in FIG. 4B, both the required input time and the required output time are T, so that the above buffer failure does not occur.
[0027]
However, this transfer rate Rv'Is the original transfer rate RvTherefore, there is a risk that the buffer will overflow regardless of whether or not continuous playback is performed. Worst VbSince the buffer overflows by the amount, in order to prevent such a situation, it is sufficient to prepare twice as many as the virtual buffer as the video decoding buffer.
From the above, considering that the start-up-delay is indefinite and the amount of data is also indefinite, it is sufficient to prepare three times the virtual buffer (capacity or number) as the video decoder buffer. I understand that.
[0028]
(1-3) Audio compression in the MPEG standard
In the case of audio data, unlike the case of video data, when compressed based on the MPEG standard, there is no equivalent to the start-up / delay of video data, and the amount of compressed data depends on the compression bit rate and the material. Since it coincides with the product of the time length, it can be reproduced continuously if a plurality of compressed audio data files are continuously supplied to the decoder without any special effort.
[0029]
(1-4) Minimum unit of compressed data
A video signal is handled in units of frames, and when it is compressed based on the MPEG standard, it is further handled in units of GOP (Group Of Picture).
For example, in the case of the NTSC system, the frame is 29.97 [Hz], and normally 1 GOP is composed of 15 frames. In the case of the PAL system, the frame is 25 [Hz], and a GOP consisting of 12 frames and a GOP consisting of 13 frames are alternately repeated.
[0030]
On the other hand, when the audio is compressed based on the MPEG standard, for example, if the sampling frequency is 48 [KHz] and the number of samples is 1152, the minimum unit is 24 [ms].
As described above, since there is a minimum unit that can be handled in the compressed data, it is impossible to strictly realize a clip of an arbitrary time length.
Here, for simplicity, the minimum time length unit of the clip is 1 second. Even with such restrictions, there is almost no problem in actual operation. At this time, the clip time length is T, and the nearest realizable video time above this time is T.vAnd Time TvBelow is the most achievable audio time TaAnd
[0031]
In case of PAL system, Tv= T, but in the case of NTSC system, Tv≠ T.
Specific numerical examples are shown in FIG. In this example, the video is in the NTSC format, and the audio is in the minimum unit of 24 [ms]. In this example, the error T between the video and audioVX-TcThere are 24 types from 0 to 23.
[0032]
(2) Configuration of encoding / decoding device according to embodiment
In FIG. 6,
The
The
[0033]
At this time, the
Thus, the
Similarly, the
[0034]
In the case of this embodiment, the
In the case of this embodiment, as shown in FIG. 7B, the
[0035]
In this case, originally, data compressed at a predetermined compression bit rate should be supplied to the
[0036]
(3) Realization of continuous playback and scheduled playback
The encoding /
In this case, in order to play back clips continuously with AV synchronization in this way,
1. Even if clips continue, the heads of video data and audio data should be aligned at the head of each clip.
2. Even if clips continue, the video data and audio data decoder buffers do not fail during playback of each clip.
It is sufficient to satisfy these two points.
A method for satisfying each of these conditions will be described below.
[0037]
(3-1) AV head alignment method for realizing regular playback and continuous playback
At present, there are various types of decoders. In the encoding /
[0038]
1. T of the time you want to startSData transfer from the
2. When the
3. (TS-0.05) When the second has elapsed, the
4). When 0.05 seconds elapses, the
[0039]
As a result, playback of video data and audio data is started at a predetermined time at the same time. In order to realize such a method, it is necessary to measure elapsed time.
However, in the encoding /
[0040]
Therefore, in this embodiment, when the encoder unit 11 encodes and multiplexes the video signal and the audio signal without using a counter or the like, “the
Further, when the
As a result, in the encoding /
[0041]
This mark is guaranteed by the MPEG system standard that the mark never appears in the reproduction compression multiplexed data D2 so that it can be identified from the reproduction compression multiplexed data D2. Byte code is used.
In this embodiment, the codes “000001BD” and “000001BF” are used in hexadecimal notation as a video decode start mark for causing the
[0042]
The transfer rate of the compressed AV multiplexed data D2 is set to 5 [Mbps], and the compressed playback multiplexed data D2 is transferred to 4 [Mbit] to transfer the compressed video data D4 corresponding to the capacity of the virtual buffer to the
[Equation 3]
Video decode start mark M at the position1Place “000001BD” and the following formula
[Expression 4]
Audio decoding start mark M later2“000001BF” is placed.
Next, an AV head alignment method for realizing continuous reproduction will be described.
[0043]
As described above in “(1-4) Minimum unit of compressed data”, the playback times of video data and audio data do not match. For example, in a clip with a time of 6 seconds, the playback time of the video is longer by 0.006 seconds. Therefore, if two 6-second clips are continuously played back, even if the first clip is completely synchronized with the AV, the second clip will start playing the audio signal earlier by 0.006 seconds. If the difference is this level, you will not actually feel any sense of incongruity, but this difference accumulates as the number of consecutive clips increases. The difference goes as long as 0.06 seconds, and you feel uncomfortable.
For this reason, in the encoding /
1. Audio playback time T since playback startedcWhen elapses, the
2. Furthermore, playback time difference (Tv-TcWhen the time elapses, the
3. This operation is repeated for each clip.
In this case, in order to realize this method, it is necessary to measure the elapsed time as in the case of the regular reproduction.
[0044]
For this reason, in this embodiment, as in the case described above, the encoder unit 11 also adds a predetermined mark to a predetermined position of each data file.
For example, in the case of a clip of T = 6 [s] according to FIG. 5, the reproduction time difference is 0.006 seconds, so the audio decoding start mark M1Audio decoding stop mark M that causes the
In this case, when the minimum unit of the compressed audio data is 24 [ms], there are 24 reproduction time differences from 0 to 23 [ms], but when the difference is 0 [ms], the
[0045]
For this reason, the encoder 11 stops the audio decoding stop mark M.s1~ Ms23For example, 23 codes from “000001C1” to “00001D7” correspond to reproduction time differences of 1 to 23 [ms], respectively. Therefore, these codes appear every 5 [Mbps] × 0.001 [s] = 625 [bytes]. The
For example, in the case of a clip of T = 6 [s], since the reproduction time difference is 0.006 [s], the audio decoding stop mark Ms6Therefore, the last 8 [bytes] of this clip is “000001D8000001C6”.
[0046]
When clip 1 (T = 6 [s]) and clip 2 (T = 7 [s]) are continuously reproduced,
Each stop mark M that is valid before the clip starts to play continuously.s1~ Ms23In order to clear the mark, set “00000000” to stop mark M of the top clip.s1~ Ms23It is possible to prevent a stop command from being issued.
[0047]
(3-2) Buffer usage method for continuous playback
(3-2-1) Basic structure of compressed AV multiplexing format
Hereinafter, a group of data of the same type is referred to as a “packet”. Here, the type means three types: video, audio, and packet. A header is attached to the head of each packet to indicate its type.
A group of several packets is called “packet”. Unlike a packet, a packet does not have any identification header.
Here, in the encoding /
1. Standard pack
...... In principle, it consists of one video packet, one audio packet, and one packet packet.
2. Top pack
…… The amount of video packet data is larger than the standard packet by the amount of virtual buffer.
3. Residual pack
... consisting of the remaining data not included in the above two types of packs.
[0048]
In this embodiment, as shown in FIG. 9A, one compressed AV multiplexed data file obtained by encoding one clip has one “leading pack” at the beginning, and then a plurality of files. The “standard packs” are consecutive, and one “residual pack” comes to the end.
Since all the data control marks are located in the video packet of the first packet, there is no possibility that the mark is inserted into the contents of the packet / header and the packet / header cannot be recognized.
[0049]
(3-2-2) Packet Hedda
As a header for identifying the type of each packet, it is necessary to adopt a pattern that never appears in the compressed data. For this reason, the encoding /
Video packet Hedda ...... 000001E3
Audio / Packet / Hedda ...... 000001C0
Padded packet Hedda ...... 000001BE
Thus, the
[0050]
(3-2-3) Restrictions on compression bit rate values, etc.
The clip of time length T is converted to virtual buffer amount Vb, Video compression bit rate RvThe maximum amount of compressed video data that can be generated is
[Equation 5]
Given in.
For this reason, in the encoding /
[Formula 6]
Rv'Is the maximum Rvmax'Is the minimum clip time length TminThis is the case.
[Expression 7]
Compressed AV multiplexed data transfer rate RmMust be at least greater than the sum of the compressed video data rate and the compressed audio data rate. For audio, a transfer rate equal to the compression bit rate may be used. Therefore, these parameters must satisfy the following equation. (To be exact, it is necessary to consider the header and the mark, but they are omitted here for simplicity.)
[Equation 8]
[Equation 9]
[0051]
In practice, the encoding /
[0052]
(3-2-4) Calculation of packet size
An equation for calculating the size of each packet when a parameter value such as a compression bit rate value is given is shown below.
First, the variables used in the following calculation are listed.
Video compression bit rate ...... Rv[Mbps]
Video data transfer rate ...... Rv′ [Mbps]
Audio compression bit rate ...... Ra[Kbps]
Compressed AV multiplexed data transfer rate Rm[Mbps]
Clip duration (in 1 second increments) T [s]
Minimum clip time (in 1 second increments) Tmin[S]
Video playback time that is closest to T and realistic after Tv[S]
TvAudio playback time that is closest to T and can be realized in the following ... Ta[S]
Time required to transfer clip ... Tt[S]
Time required to transfer the compressed video data for the virtual buffer ... TS[S]
Virtual buffer amount …… Vb[Mbit]
One clip of compressed video data amount Vv[Byte]
One clip of compressed audio data volume ... Va[Byte]
1 clip of pad data amount …… Vp[Byte]
Total amount of data for one clip ...... Vm[Byte]
Total mark data amount …… Vk[Byte] (= 4 x 27 [byte]])
Packet Hedda Size Lh[Byte] (= 4 [byte])
Standard video packet size (excluding header) ... Lv[Byte]
Standard audio packet size (excluding header) …… La[Byte]
Standard packet size (excluding header) …… Lp[Byte]
Standard pack size (including header) ...... Lm[Byte]
Number of packs (excluding remaining packs) …… P
* Standard packet means a packet in the standard packet.
Residual video packet size (excluding header) …… Lv'[Byte]
Residual audio / packet size (excluding header) …… La'[Byte]
Residual packet, packet size (excluding header) …… Lp'[Byte]
* “Residual packet” means a packet in the residual packet.
Unit conversion coefficient (Mbit → byte) …… Cm= 125000 = 1000 × 1000/8
Unit conversion coefficient (kbit → byte) …… Ck= 125 = 1000/8
[0053]
When T is in units of 1 second, for the sake of simplicity, the standard packet size L in a clip of an arbitrary time lengthvAnd LaAre equal to each other, so that Rv, Ra, Lv, LaShould be selected.
[Expression 10]
## EQU11 ##
[Expression 12]
Usually RvIs at most 0.1 [Mbps] units, and RaIs one of 64, 128, 192, 256, and 384 [kbps]. Therefore, an integer L that satisfies the above equationv, And LaExists.
Fractional data generated by the restriction of the smallest unit that can be taken by compressed data, that is, R in videov, X (Tv, -T) and R in Audioa× (Ta-T) the remaining packet is composed of data, and the remaining data, that is, R in the videov, T + VbAnd R in AudioaA standard pack and an initial pack are constituted by × T.
[0054]
This way RaAnd RvThe following equation holds for.
[Formula 13]
[Expression 14]
[Expression 15]
[Expression 16]
From the equations (14) and (16), Rv, Ra, LaLvCan be calculated.
Audio data volume VaIs
[Expression 17]
Video data volume VvIs
[Expression 18]
Multiplexed data amount VmIs
[Equation 19]
Therefore, the amount of padded data VpIs
[Expression 20]
Yotsute
[Expression 21]
[0055]
L from equation (21)pAnd Lp'Is required.
Ta<T, integers K and L satisfying the following formulaa″ Exists.
[Expression 22]
At this time, the data size of the audio packet is set to L for the K + 1th pack from the end of the standard pack.a-La″ And the size is L immediately after this packeta″ -LhMake sure to put the packet / packet. For the K packets from the end of the standard packet, the same size packet packet is placed instead of the audio packet.
Further, the following equation holds for the remaining pack.
[Expression 23]
[Expression 24]
[0056]
(3-2-5) Conditions for realizing continuous playback
As described above in “(1-2) Continuous playback of compressed video data file”, in order to continuously play back only compressed video data, the video decoder buffer is three times the virtual buffer. It is necessary to prepare.
The following shows the conditions under which multiple video decoders / audio buffers / audio decoders / buffers can be continuously reproduced even if they are multiplexed.
First, as shown in “(1-2-1) Consideration of indefinite start-up / delay”, in order to deal with the indefinite start-up / delay of each clip, it is twice as large as the virtual buffer. Capacity is required. It is this double buffer that covers the “data output broken line transitionable region” of FIG. Therefore, if the data input broken line can be shifted within the remaining 1 × buffer, continuous playback can be performed with 3 × buffer.
[0057]
In the
The time that two clips are in is Tt= TvThen the first T of each clipSOnly time. This time is the time during which the first packet is transferred for an arbitrary clip, and since audio packets and packet packets are not included in addition to the beginning, the input broken line must be a straight line ▲, as is apparent from FIG. Below 1 ▼. That is, there is no data input broken line in the 1 × buffer.
Time when only one clip data is included (TSAs for the time after the elapse of time), it may be arranged so as to fall between the straight line (1) and the straight line (2) in FIG. For that purpose, the following conditions should be satisfied.
Condition 1: The straight line (1) and the straight line (3) should not intersect except at the origin.
[0058]
In other words, for any t> 0, v3(T)> v1(T) may be satisfied.
[Expression 25]
[Equation 26]
Condition 2: Time t when the straight line {circle over (2)} and straight line {circle around (4)} finish transferring the video dataeDo not cross until. That is, v4(Te) <V2(Te) Should hold. In this case,
[Expression 27]
So,
[Expression 28]
[Expression 29]
[0059]
The equations for the straight lines (1) to (4) are as follows. Strictly speaking, it is necessary to consider the amount of headers and marks, but it is ignored because it is very small compared to the amount of compressed data.
[30]
[31]
[Expression 32]
[Expression 33]
Therefore, in order to realize continuous playback with 3 times the virtual buffer, Tt= TvIn addition, the parameters may be selected so as to satisfy the expressions (26) and (29), and the parameters are actually selected in this way in the encoding /
[0060]
(3-2-6) Example of compressed AV multiplexed format capable of continuous reproduction
Rm= 5 [Mbps], Rv= 4 [Mbps], Ra= 256 [kbps], Tmin= 6 [s], Vb= 4 [Mbps] indicates a format that realizes the request. However, the video is NTSC.
In this case, the right side of equation (9) is 5 [Mbps], and the left side is
[Expression 34]
Therefore, equation (9) is satisfied, and it can be seen that these values can be selected.
For example, in the case of the clip time length T = 6 [s], from FIG.
Tt, = Tv, = 6.006 [s], Ta= 6 [s]
L appropriatelya= 1000 [bytes] (If the value is too large, the audio buffer may fail. Conversely, if the value is too small, the number of standard packs will increase and the overhead due to the header will increase.) Find the number of packs.
[Expression 35]
The size of the standard video packet is obtained from equation (16).
[Expression 36]
The size of the packet / packet is obtained from the equation (21).
[Expression 37]
Yotsu, Lp= 293 [bytes], Lp'= 74 [bytes].
[0061]
The size of the remaining video packet is obtained from equation (23).
[Formula 38]
Where Ta= T, so the size of the remaining audio packet is zero.
The size of the standard pack is obtained from the above values.
[39]
At this time, it can be seen that equation (26) is satisfied.
0.92> 0.8
At this time, it is understood that equation (29) is also satisfied.
23.2 <24
The resulting format is shown in FIG. Similarly, the case of the clip time length of 7 seconds is calculated, and the result is shown in FIG.
In this case, TaSince ≠ T, the last standard pack is different from other standard packs.aThere are as many packet packets as -T.
If the value of each parameter is determined, a format table as shown in FIGS. 12 and 13 can be created for each clip time length regardless of the contents of the clip, so that the compressed AV data is actually multiplexed. In this case, the compressed data obtained by each encoder may be multiplexed according to this table.
[0062]
For this reason, in the encoding /
[0063]
(4) Operation of the first embodiment
In the above configuration, the encoding /
The compressed AV multiplexed data D1 is read in units of data files based on the control of the
At this time, the
Based on the mark detection signal S10, the
[0064]
As described above, in the encoding /
Further, in this encoding /
Accordingly, since the two conditions presented in “(3) Realization of continuous playback” are satisfied, it is possible to perform continuous playback while maintaining AV synchronization.
[0065]
Therefore, for example, a television broadcast CM is applied as a clip material, which is MPEG-compressed and AV-multiplexed according to the above-described multiplexing format, and then recorded on a large-capacity and randomly accessible recording medium such as an HDD. If the specified CM compressed data group is supplied to the decoder at the specified time according to the CM broadcast time table, the CM can be broadcast continuously at the specified time.
[0066]
(5) Operation of the first embodiment
According to the above configuration, on the encoder side, the decoder control mark M for control corresponding to the clip time length for each clip.1~ MFour, MS1~ MS23And at the decoder side these decoder control marks M1~ MFour, MS1~ MS23On the other hand, the
[0067]
[2] Second embodiment
FIG. 14, in which parts corresponding to those in FIG. 6 are assigned the same reference numerals, shows the encoding /
That is, in the case of the encoding /
The
The
At this time, the controller 45 supplies the clip time length as a time information signal S30 to the
[0068]
The
As a result, the
In the above-described configuration, in the encoding /
[0069]
On the other hand, the
As described above, in the encoding /
The
[0070]
According to the above configuration, the capacity of the
[0071]
【The invention's effect】
As described above, according to the present invention, the reproduction time difference between the compressed video data and the compressed audio data generated for each time length of the material formed by the compressed video data and the compressed audio data compressed and encoded at a predetermined compression bit rate. Is stored on the decoding side as playback time difference data, so that playback between compressed video data and compressed audio data forming the material can be performed only from the time length of the material regardless of the presence or absence of a time stamp. The time difference can be specified, and the decoding operation for the compressed audio data is stopped by the specified reproduction time difference, so that when a plurality of materials are continuously reproduced, the compressed video data and the compressed audio data forming each material are reproduced. Since the data playback start time can be synchronized, it is much simpler than before. Yet formed, to start playback of each material at a specified time, and a plurality of materials decoding apparatus and coding and decoding apparatus can be realized capable of continuously be reproduced.
Further, according to the present invention, by setting a minimum unit for the time length of the material in advance, a combination pattern of the time length of the material and the reproduction time difference between the compressed video data and the compressed audio data forming the material is obtained. Since the minimum unit can be significantly reduced as compared with the case where the minimum unit is not set, the reproduction time difference between the compressed video data and the compressed audio data can be specified with the reproduction time difference data having a smaller data amount.
[Brief description of the drawings]
FIG. 1 is a graph and a block diagram for explaining a virtual buffer and a start-up-delay.
FIG. 2 is a graph for explaining the failure of a start-up daylay and a buffer.
FIG. 3 is a graph for explaining the data amount of a compressed video data file.
FIG. 4 is a graph for explaining adjustment of data amount and data transfer rate;
FIG. 5 is a chart showing realizable time of video and audio.
FIG. 6 is a block diagram showing the configuration of the encoding / decoding device according to the first embodiment;
FIG. 7 is a block diagram showing a data transfer form after demultiplexing.
FIG. 8 is a schematic diagram for explaining a decoder control mark;
FIG. 9 is a schematic diagram showing a format of a compressed AV multiplexed data file.
FIG. 10 is a graph showing transition of input to a video decoder.
FIG. 11 is a graph for explaining a usage situation of a video decoder buffer during continuous reproduction.
FIG. 12 is a chart showing an example of a compressed AV multiplexing format.
FIG. 13 is a chart showing an example of a compressed AV multiplexing format.
FIG. 14 is a block diagram showing a configuration of a coding / decoding device according to the first embodiment;
FIG. 15 is a chart showing an example of a compressed AV multiplexing format.
FIG. 16 is a chart showing an example of a compressed AV multiplexing format.
FIG. 17 is a block diagram for explaining a time stamp method.
FIG. 18 is a schematic diagram for explaining continuous reproduction in the case of a time stamp method.
[Explanation of symbols]
10, 40 ... Coding / decoding device, 11, 43 ... Encoder, 12, 44 ... Data supply unit, 13, 20, 42, 45 ... Controller, 14 ... Recording media, 16, 46 ... Data Multiplexer, 17 ... Video decoder, 18 ... Audio decoder, 21, 22 ... Buffer, S4, S5 ... Control signal, S10 ... Mark detection signal, D1, D2 ... Compressed AV multiplexed data, M1...... Video decoding start mark, M2...... Audio decoding start mark, MThree...... Stop mark designation mark, MFour...... Audio decoder stop mark, MS1~ MS23...... Audio decoding stop mark.
[Expression 27]
[Expression 28]
Claims (6)
データ供給源から供給される、所定の圧縮ビツトレートで圧縮符号化されて多重化された上記圧縮ビデオデータと上記圧縮オーデイオデータとを分割して出力する分割手段と、
上記分割手段から出力される上記圧縮ビデオデータを復号する第1の復号手段と、
上記分割手段から出力される上記圧縮オーデイオデータを復号する第2の復号手段と、
上記データ供給源から供給される、上記素材の時間長を示す時間情報と、予め記憶している、上記素材の時間長毎に発生する上記圧縮ビデオデータ及び上記圧縮オーデイオデータ間の再生時間差を示す再生時間差データとに基づいて、上記第2の復号手段の上記圧縮オーデイオデータに対する復号動作を上記再生時間差分だけ停止させる制御手段と
を具える
ことを特徴とする復号化装置。 In a decoding device for decoding compressed video data and compressed audio data forming material ,
A dividing means for dividing and outputting the compressed video data and the compressed audio data, which are supplied from a data supply source and are compressed and encoded at a predetermined compression bit rate and multiplexed;
First decoding means for decoding the compressed video data output from the dividing means;
Second decoding means for decoding the compressed audio data output from the dividing means;
The time information indicating the time length of the material supplied from the data supply source, and the reproduction time difference between the compressed video data and the compressed audio data generated for each time length of the material stored in advance are shown. based on the reproduction time difference data, decoding apparatus characterized by comprising a control means for stopping the decoding operation with respect to the compressed audio data of the second decoding means only the reproduction time difference.
上記制御手段は、
上記最小単位以上の時間長毎に発生する上記再生時間差を示す上記再生時間差データを記憶している
ことを特徴とする請求項1に記載の復号化装置。 Set the minimum unit for the time length of the material in advance,
The control means includes
2. The decoding apparatus according to claim 1, wherein the reproduction time difference data indicating the reproduction time difference generated every time length equal to or greater than the minimum unit is stored .
上記符号化部は、
素材を形成するビデオ信号及びオーデイオ信号のそれぞれを所定の圧縮ビツトレートで圧縮符号化し、かくして得られた上記圧縮ビデオデータ及び上記圧縮オーデイオデータを出力する符号化手段と、
上記符号化手段から出力された上記圧縮ビデオデータ及び上記圧縮オーデイオデータを多重化して上記データ供給部に供給する多重化手段と
を具え、
上記復号化部は、
上記データ供給部から供給される、多重化された上記圧縮ビデオデータと上記圧縮オーデイオデータとを分割して出力する分割手段と、
上記分割手段から出力される上記圧縮ビデオデータを復号する第1の復号手段と、
上記分割手段から出力される上記圧縮オーデイオデータを復号する第2の復号手段と、
上記データ供給部から供給される、上記素材の時間長を示す時間情報と、予め記憶している、上記素材の時間長毎に発生する上記圧縮ビデオデータ及び上記圧縮オーデイオデータ間の再生時間差を示す再生時間差データとに基づいて、上記第2の復号手段の上記圧縮オーデイオデータに対する復号動作を上記再生時間差分だけ停止させる制御手段と
を具える
ことを特徴とする符号化復号化装置。Becomes the encoding unit and the decoding unit, the compressed video data and compressed audio data is compression-encoded in the coding section, through a data supply section is supplied to the decoder, the compressed video data and the compressed In the encoding / decoding device for decoding the audio data by the decoding unit ,
The encoding unit is
Encoding means for compressing and encoding each of the video signal and audio signal forming the material at a predetermined compression bit rate, and outputting the compressed video data and the compressed audio data thus obtained;
Multiplexing means for multiplexing the compressed video data and the compressed audio data output from the encoding means and supplying the multiplexed data to the data supply unit;
With
The decryption unit
Supplied from the data supply unit, a dividing means for outputting the divided and multiplexed the compressed video data and the compressed audio data,
First decoding means for decoding the compressed video data output from the dividing means;
Second decoding means for decoding the compressed audio data output from the dividing means;
The time information indicating the time length of the material supplied from the data supply unit, and the reproduction time difference between the compressed video data and the compressed audio data generated for each time length of the material stored in advance are shown. based on the reproduction time difference data, coding and decoding apparatus characterized by comprising a control means for stopping the decoding operation with respect to the compressed audio data of the second decoding means only the reproduction time difference.
上記制御手段は、
上記最小単位以上の時間長毎に発生する上記再生時間差を示す上記再生時間差データを記憶している
ことを特徴とする請求項3に記載の符号化復号化装置。 Set the minimum unit for the time length of the material in advance,
The control means includes
4. The encoding / decoding apparatus according to claim 3, wherein the reproduction time difference data indicating the reproduction time difference generated every time length equal to or greater than the minimum unit is stored .
所定の圧縮ビツトレートで圧縮符号化されて多重化された上記圧縮ビデオデータと上記圧縮オーデイオデータとを分割する分割ステツプと、
上記分割された上記圧縮ビデオデータ及び上記圧縮オーデイオデータを復号する復号ステツプと
を具え、
上記復号ステツプでは、上記素材の時間長を示す時間情報と、上記素材の時間長毎に発生する上記圧縮ビデオデータ及び上記圧縮オーデイオデータ間の再生時間差を示す再生時間差データとに基づいて、上記圧縮オーデイオデータに対する復号処理を上記再生時間差分だけ停止する
ことを特徴とする復号化方法。 In a decoding method for decoding compressed video data and compressed audio data forming material ,
A dividing step for dividing the multiplexed the compressed video data and the compressed audio data is compressed and encoded by a predetermined compression bit rate,
A decoding step for decoding the divided compressed video data and the compressed audio data;
In the decoding step, based on time information indicating a time length of the material and reproduction time difference data indicating a reproduction time difference between the compressed video data and the compressed audio data generated for each time length of the material, the compression step is performed. A decoding method, wherein the decoding process for audio data is stopped for the reproduction time difference .
上記ビデオ信号及び上記オーデイオ信号のそれぞれを所定の圧縮ビツトレートで圧縮符号化する符号化ステツプと、
かくして得られた上記圧縮ビデオデータ及び上記圧縮オーデイオデータを多重化する多重化ステツプと、
多重化された上記圧縮ビデオデータと上記圧縮オーデイオデータとを分割する分割ステップと、
分割された上記圧縮ビデオデータ及び上記圧縮オーデイオデータを復号する復号ステツプと
を具え、
上記復号ステツプでは、上記素材の時間長を示す時間情報と、上記素材の時間長毎に発生する上記圧縮ビデオデータ及び上記圧縮オーデイオデータ間の再生時間差を示す再生時間差データとに基づいて、上記圧縮オーデイオデータに対する復号処理を上記再生時間差分だけ停止する
ことを特徴とする符号化復号化方法。 In an encoding / decoding method for compressing and encoding each of a video signal and an audio signal forming a material and decoding the compressed video data and the compressed audio data thus obtained ,
An encoding step for compressing and encoding each of the video signal and the audio signal at a predetermined compression bit rate;
A multiplexing step for multiplexing the compressed video data and the compressed audio data thus obtained;
A dividing step of dividing the multiplexed the compressed video data and the compressed audio data,
A decoding step for decoding the compressed video data and the compressed audio data divided;
In the decoding step, based on time information indicating a time length of the material and reproduction time difference data indicating a reproduction time difference between the compressed video data and the compressed audio data generated for each time length of the material, the compression step is performed. An encoding / decoding method, wherein the decoding process for audio data is stopped by the reproduction time difference .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10908995A JP3651699B2 (en) | 1995-04-09 | 1995-04-09 | Decoding device and encoding / decoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10908995A JP3651699B2 (en) | 1995-04-09 | 1995-04-09 | Decoding device and encoding / decoding device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08289255A JPH08289255A (en) | 1996-11-01 |
| JP3651699B2 true JP3651699B2 (en) | 2005-05-25 |
Family
ID=14501316
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10908995A Expired - Fee Related JP3651699B2 (en) | 1995-04-09 | 1995-04-09 | Decoding device and encoding / decoding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3651699B2 (en) |
Families Citing this family (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1193981A3 (en) * | 1997-09-05 | 2002-05-15 | Matsushita Electric Industrial Co., Ltd. | Decoding method and recording medium carrying recorded decoding program |
| JP3848805B2 (en) * | 1998-11-04 | 2006-11-22 | 株式会社日立製作所 | Receiver |
| US6816491B1 (en) | 1998-11-04 | 2004-11-09 | Hitachi, Ltd. | Multiplexed audio data decoding apparatus and receiver apparatus |
| JP4393435B2 (en) * | 1998-11-04 | 2010-01-06 | 株式会社日立製作所 | Receiver |
| US9432433B2 (en) | 2006-06-09 | 2016-08-30 | Qualcomm Incorporated | Enhanced block-request streaming system using signaling or block creation |
| US20100211690A1 (en) * | 2009-02-13 | 2010-08-19 | Digital Fountain, Inc. | Block partitioning for a data stream |
| US9419749B2 (en) | 2009-08-19 | 2016-08-16 | Qualcomm Incorporated | Methods and apparatus employing FEC codes with permanent inactivation of symbols for encoding and decoding processes |
| US9209934B2 (en) | 2006-06-09 | 2015-12-08 | Qualcomm Incorporated | Enhanced block-request streaming using cooperative parallel HTTP and forward error correction |
| US9917874B2 (en) | 2009-09-22 | 2018-03-13 | Qualcomm Incorporated | Enhanced block-request streaming using block partitioning or request controls for improved client-side handling |
| US9485546B2 (en) | 2010-06-29 | 2016-11-01 | Qualcomm Incorporated | Signaling video samples for trick mode video representations |
| US9843844B2 (en) | 2011-10-05 | 2017-12-12 | Qualcomm Incorporated | Network streaming of media data |
-
1995
- 1995-04-09 JP JP10908995A patent/JP3651699B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH08289255A (en) | 1996-11-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3364281B2 (en) | Time-division video and audio signal synchronization | |
| KR100205494B1 (en) | Rational input buffer arrangements for auxiliary information in video and audio signal processing system | |
| US5481543A (en) | Rational input buffer arrangements for auxiliary information in video and audio signal processing systems | |
| JP3405034B2 (en) | Digital signal multiplexing method and apparatus, and digital signal recording medium | |
| EP0634867B1 (en) | Compressed and coded data recording method | |
| US20010009548A1 (en) | Method and apparatus for converting data streams | |
| US20120179475A1 (en) | Reproducing apparatus and method, and recording medium | |
| JP3651699B2 (en) | Decoding device and encoding / decoding device | |
| JP2008123693A (en) | REPRODUCTION DEVICE, REPRODUCTION METHOD, AND RECORDING MEDIUM THEREOF | |
| US20020034144A1 (en) | Recording apparatus | |
| JP3277971B2 (en) | Data multiplexing apparatus, data multiplexing method, and data recording medium | |
| JPH0898160A (en) | Data multiplexing device | |
| JP2008176918A (en) | REPRODUCTION DEVICE, REPRODUCTION METHOD, AND RECORDING MEDIUM THEREOF | |
| JP4608831B2 (en) | Data multiplexing apparatus and data multiplexing method | |
| JP2001268513A (en) | Moving image reproducing device and moving image recording/reproducing system | |
| JPH11220695A (en) | Video data decoding apparatus and decoding method | |
| HK1098867B (en) | Reproducing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20041021 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20041029 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041227 |
|
| 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: 20050204 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050217 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080304 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090304 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100304 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100304 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110304 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120304 Year of fee payment: 7 |
|
| LAPS | Cancellation because of no payment of annual fees |
