JP4432284B2 - Recording apparatus and method - Google Patents

Recording apparatus and method Download PDF

Info

Publication number
JP4432284B2
JP4432284B2 JP2001193384A JP2001193384A JP4432284B2 JP 4432284 B2 JP4432284 B2 JP 4432284B2 JP 2001193384 A JP2001193384 A JP 2001193384A JP 2001193384 A JP2001193384 A JP 2001193384A JP 4432284 B2 JP4432284 B2 JP 4432284B2
Authority
JP
Japan
Prior art keywords
stream
unit
recording
code
equal length
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
Application number
JP2001193384A
Other languages
Japanese (ja)
Other versions
JP2003009087A (en
Inventor
晋 藤堂
治夫 富樫
晃 杉山
英之 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2001193384A priority Critical patent/JP4432284B2/en
Publication of JP2003009087A publication Critical patent/JP2003009087A/en
Application granted granted Critical
Publication of JP4432284B2 publication Critical patent/JP4432284B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、データストリームを所定単位で等長化して記録媒体に記録する記録装置および方法に関する。
【0002】
【従来の技術】
ディジタルVTR(Video Tape Recorder) に代表されるように、ディジタルビデオ信号およびディジタルオーディオ信号を記録媒体に記録し、また、記録媒体から再生するようなデータ記録再生装置が知られている。ディジタルビデオ信号は、データ容量が膨大となるため、所定の方式で圧縮符号化されて記録媒体に記録されるのが一般的である。近年では、MPEG2(Moving Picture Experts Group 2)方式が圧縮符号化の標準的な方式として知られている。
【0003】
上述のMPEG2を始めとする画像圧縮技術では、可変長符号を用いてデータの圧縮率を高めている。したがって、圧縮しようとする画像の複雑さによって、1画面分、例えば1フレームあるいは1フィールド当たりのデータの圧縮後の符号量が変動する。
【0004】
上述したMPEG2方式では、マクロブロック層、スライス層、ピクチャ層、GOP層およびシーケンス層の順に下位から上位へと階層構造を有するデータにおいて、スライス層が可変長符号化の単位となっている。マクロブロック層は、さらに、複数個のDCT(Discrete Cosine Transform) ブロックからなる。各層の先頭には、ヘッダ情報が格納されるヘッダ部が設けられ、例えばスライス層では、このヘッダ部を検出することで可変長符号の区切り位置が検出される。可変長符号を復号化するデコーダでは、検出された区切り位置に基づき可変長符号の復号化を行う。
【0005】
なお、例えばMPEG2において、規格によって定められたデータの配列を、シンタクスと称する。
【0006】
一方、画像データのフォーマットは、画像サイズとフレーム周波数との組み合わせ、走査方法の違いなどにより、様々なものが考えられる。放送用や制作用の映像機器では、一般に、扱われる画像データのフォーマットに対して所定の制限が与えられる。上述のMPEG2の規格は、こうした様々な画像フォーマットに柔軟に対応できるように考えられている。
【0007】
ところで、ベースバンド信号として入力されたビデオ信号を、上述のようにしてエンコードして、磁気テープのような記録媒体に記録する際には、機器のエンコーダによって、ストリームが所定単位、例えばフレーム単位で等長化される。等長化の単位は、記録装置の構成などによっても異なり、この他にも、例えば1フィールド、複数フレームを等長化単位にすることができる。以下、等長化がフレーム単位で行われるものとする。記録媒体上の記録領域が等長化の長さに対応する大きさに区切られ、等長化されたストリームが順次、この領域に記録される。
【0008】
このように、可変長符号化されたストリームを等長化して記録媒体に記録することで、ビデオ信号に対するフレーム単位での処理を、容易に行うことができるようになる。
【0009】
また、ストリームを等長化単位で記録媒体に記録することにより、記録媒体は、等長化単位が記録された記録時間に比例して消費されることになる。そのため、記録総量(記録時間)や記録媒体の残量の正確な値を容易に得られると共に、高速サーチによる頭出しも容易である。さらに、記録媒体が磁気テープであるときなど、力学的に駆動される磁気テープを等速に保つことによって安定化を図れるという利点もある。
【0010】
【発明が解決しようとする課題】
ところが、入力されたストリームを等長化して記録する際に、等長化単位、すなわちフレーム毎の符号量が等長化の長さの上限に収まっている保証は、無い。若し、この記録装置がストリームを入力された順でフレーム毎に記録するようなものであったら、あるフレームの符号化量が等長化に規定された符号量(等長化量)の限界を超えた場合、そのフレームのストリームは、等長化容量分だけが記録され、それ以降の符号は、分断されてしまうことになる。
【0011】
このようにフレームのストリームが分断されてしまうと、そのフレームの再生画像において、画面の下端が欠落してしまうことになるという問題点があった。また、フレームのストリームが分断され、フレームが正常終了しないと、再生時に、次フレームとの境界でシンタクスエラーが発生する可能性がある。シンタクスエラーは、そのストリームが入力されたデコーダの暴走やハングアップを誘発するおそれがあるという問題点があった。
【0012】
さらに、入力ストリームが確実に等長化されていることを前提として設計された、エラー耐性の弱い記録装置においては、等長化量の上限を超えたストリームを記録する段階で破綻を来す可能性がある。すなわち、等長化量から溢れた符号が次のフレームに領域に侵入し、次フレームの容量と記録位置とが溢れた符号によって圧迫されることになるという問題点があった。これにより、記録媒体上の領域を等長化する意味が失われてしまう。
【0013】
さらに、容量と記録位置とが圧迫された次フレームが、さらに次のフレームを圧迫する、という事態が繰り返されると、やがて、記録系のメモリがオーバーフローしてしまう可能性があるという問題点があった。
【0014】
したがって、この発明の目的は、可変長符号化されたストリームを所定の等長化単位で記録する際に、等長化単位の符号量が等長化量の上限を超えるようなストリームを記録しないようにした記録装置および方法を提供することにある。
【0015】
【課題を解決するための手段】
この発明は、上述した課題を解決するために、可変長符号を用いて符号化されたストリームを所定の等長化単位で記録媒体に記録する記録装置において、
可変長符号を用いて符号化されたストリームが入力される入力手段と、
入力手段に入力されたストリームを所定の等長化単位で記録媒体に記録する第1の記録手段と、
入力手段に入力されたストリームの、所定の等長化単位の符号量を計測する計測手段と、
計測手段の計測結果に基づき、入力されたストリームの、所定の等長化単位の符号量が、所定の等長化単位に対して規定された符号総量を越えている場合、所定の等長化単位に対して規定された符号総量内のストリームと、所定の等長化単位に対して規定された符号総量を越えているストリーム分けて第2の記録手段に記録する第1のパッキング処理と、所定の等長化単位に対して規定された符号総量を越えているストリームを読み出し、所定の等長化単位に対して規定された符号総量よりも小さく、空き領域が生じた領域に所定の等長化単位に対して規定された符号総量を越えているストリームを読み込む第2のパッキング処理と、所定単位のブロック分のストリームを読み込んだ場合には、読み込みを一時中断し、外符号のパリティを生成し、第2のパッキング処理されたデータと、外符号のパリティとを第1の記録手段に書き戻す書き戻し処理を行う制御手段と
を有することを特徴とする記録装置である。
【0016】
また、この発明は、可変長符号を用いて符号化されたストリームを所定の等長化単位で記録媒体に記録する記録方法において、
可変長符号を用いて符号化されたストリームが入力される入力のステップと、
入力のステップに入力されたストリームの、所定の等長化単位の符号量を計測する計測のステップと、
入力されたストリームの、所定の等長化単位の符号量が、所定の等長化単位に対して規定された符号総量を越えている場合、所定の等長化単位に対して規定された符号総量内のストリームと、所定の等長化単位に対して規定された符号総量を越えているストリームとを分けて記録手段に記録する第1のパッキングのステップと、
所定の等長化単位に対して規定された符号総量を越えているストリームを読み出し、所定の等長化単位に対して規定された符号総量よりも小さく、空き領域が生じた領域に所定の等長化単位に対して規定された符号総量を越えているストリームを読み込む第2のパッキングのステップと
所定単位のブロック分のストリームを読み込んだ場合には、読み込みを一時中断し、外符号のパリティを生成し、第2のパッキング処理されたデータと、外符号のパリティとを記録手段に書き戻す書き戻しのステップと
を有することを特徴とする記録方法である。
【0017】
上述したように、この発明は、入力された可変長符号を用いて符号化されたストリームを所定の等長化単位で記録媒体に記録し、その際に、入力されたストリームの、所定の等長化単位の符号量が、所定の等長化単位に対して規定された符号総量を越えている場合、所定の等長化単位に対して規定された符号総量内のストリームと、所定の等長化単位に対して規定された符号総量を越えているストリームとを分けて記録手段に記録し、所定の等長化単位に対して規定された符号総量を越えているストリームを読み出し、所定の等長化単位に対して規定された符号総量よりも小さく、空き領域が生じた領域に所定の等長化単位に対して規定された符号総量を越えているストリームを読み込み、所定単位のブロック分のストリームを読み込んだ場合には、読み込みを一時中断し、外符号のパリティを生成し、第2のパッキング処理されたデータと、外符号のパリティとを記録手段に書き戻すように制御するようにしているため、ビットレートが規定の値を超えるストリームが入力された場合に、記録媒体に対して不正な記録が行われることが防がれる。
【0018】
【発明の実施の形態】
以下、この発明の概念を、図1乃至図3を用いて説明する。図1は、磁気テープを記録媒体としてベースバンド信号の記録、再生を行うディジタルVTR(Video Tape Recorder)の基本的な構成を示す。記録時には、非圧縮のディジタルビデオ信号であるベースバンド信号が端子500から入力される。ベースバンド信号は、ECC(Error Correction Coding)エンコーダ511に供給される。ECCエンコーダ501に供給されたベースバンド信号は、シャフリングやエラー訂正符号化処理が施され、記録アンプ502で記録符号化されて図示されない回転ヘッドに供給され、回転ヘッドにより磁気テープ503に記録される。
【0019】
再生時には、磁気テープ503から回転ヘッドにより再生された再生信号が再生アンプ504に供給され、ディジタル信号に復号化される。再生アンプ504の出力は、ECCデコーダ505に供給され、エラー訂正符号が復号化されてエラー訂正されると共にデシャフリングされる。ECCデコーダ505から出力されたベースバンド信号は、端子506に導出される。
【0020】
図2は、ビデオ信号がMPEG2方式でエンコードされたストリームの記録、再生を行うディジタルVTRの基本的な構成を示す。記録時には、ベースバンド信号が端子510から入力され、MPEGエンコーダ511に供給される。MPEGエンコーダ511では、供給されたベースバンド信号を所定にMPEG2方式でエンコードし、ストリームとして出力する。MPEGエンコーダ511から出力されたストリームは、セレクタ513の一方の入力端に供給される。また、MPEG2方式で予めエンコードされたストリームが端子512から入力される。このストリームは、セレクタ513の他方の入力端に供給される。
【0021】
セレクタ513では、一方および他方の入力端に供給されたストリームを所定に選択し、ECCエンコーダ514に供給する。ストリームは、ECCエンコーダ514で所定にシャフリングやエラー訂正符号化処理が施され、記録アンプ515で記録符号化されて図示されない回転ヘッドに供給され、磁気テープ516に記録される。
【0022】
再生時には、回転ヘッドにより磁気テープ516から再生された再生信号が再生アンプ517に供給され、ディジタル信号に復号化される。再生アンプ517の出力は、ECCデコーダ518に供給され、エラー訂正符号が復号化されてエラー訂正されると共にデシャフリングされ、MPEG2のストリームとされる。ECCデコーダ518から出力されたストリームは、MPEGデコーダ520にも供給される。MPEGデコーダ520に供給されたストリームは、ベースバンド信号に復号化され、端子521に導出される。
【0023】
このように、機器間でのビデオ信号をストリームのままで伝送可能であれば、ベースバンド信号よりも少ない情報量で同じ枚数の画像を伝送することができるようになる。また、伝送するたびにデータの伸張および圧縮を繰り返して画質の劣化を招くベースバンド接続に対し、ストリーム接続なら画質劣化無く画像情報を伝送できる。画像を加工しないのであれば、ストリーム接続の方がベースバンド接続よりも有利であるといえる。
【0024】
図3は、この発明によるVTRの基本的な構成を示す。なお、図3において、上述した図2の構成と対応する部分には同一の符号を付し、詳細な説明を省略する。図3では、図2の構成に対して、入力されるストリームにおける等長化単位の符号量を計測する符号量計測器530と、メモリ531とが追加されている。端子512から入力されたストリームは、メモリ531および符号量計測器530にも供給され、符号量計測器530で、例えば1フレームである等長化単位の符号量が計測される。
【0025】
若し、符号量計測器530で計測された符号量が、等長化単位に対して所定に規定された規定値を超えていたときには、符号量計測器530から、ストリームの磁気テープ516への記録を制御する制御信号が出力される。この図3の例では、この制御信号が記録アンプ515’に供給され、記録RF信号の出力が停止される。さらに、制御信号を図示されないサーボ回路に供給し、記録動作そのものを停止するようにしても良い。
【0026】
このように、入力側で、入力されたストリームの等長化単位の符号量を計測して、計測結果に基づき記録の制御を行うことで、等長化単位の符号量が規定量以上のストリームが記録媒体に記録されるのが防がれる。
【0027】
なお、メモリ531は、符号量計測器530による計測結果が得られる前に、入力されたストリームが磁気テープ516に記録されてしまうのを防止するために設けられる。例えば、ECCエンコーダ514における処理で十分な遅延が得られるのであれば、メモリ531は、不要である。
【0028】
次に、この実施の第1の形態をディジタルVTRに対して適用した例について説明する。このディジタルVTRは、放送局の環境で使用して好適なもので、互いに異なる複数のフォーマットのビデオ信号の記録/再生を可能とするものである。
【0029】
なお、以下に説明する実施の第1の形態の適用例は、後述する実施の第2〜第5の例にも同様にして適用可能なものである。
【0030】
この実施の第1の形態では、圧縮方式としては、例えばMPEG2方式が採用される。MPEG2は、動き補償予測符号化と、DCTによる圧縮符号化とを組み合わせたものである。MPEG2のデータ構造は、階層構造をなしている。図4は、一般的なMPEG2のデータストリームの階層構造を概略的に示す。図4に示されるように、データ構造は、下位から、マクロブロック層(図4E)、スライス層(図4D)、ピクチャ層(図4C)、GOP層(図4B)およびシーケンス層(図4A)となっている。
【0031】
図4Eに示されるように、マクロブロック層は、DCTを行う単位であるDCTブロックからなる。マクロブロック層は、マクロブロックヘッダと複数のDCTブロックとで構成される。スライス層は、図4Dに示されるように、スライスヘッダ部と、1以上のマクロブロックより構成される。ピクチャ層は、図4Cに示されるように、ピクチャヘッダ部と、1以上のスライスとから構成される。ピクチャは、1画面に対応する。GOP層は、図4Bに示されるように、GOPヘッダ部と、フレーム内符号化に基づくピクチャであるIピクチャと、予測符号化に基づくピクチャであるPおよびBピクチャとから構成される。
【0032】
Iピクチャ(Intra-coded picture:イントラ符号化画像) は、符号化されるときその画像1枚の中だけで閉じた情報を使用するものである。従って、復号時には、Iピクチャ自身の情報のみで復号できる。Pピクチャ(Predictive-coded picture :順方向予測符号化画像)は、予測画像(差分をとる基準となる画像)として、時間的に前の既に復号されたIピクチャまたはPピクチャを使用するものである。動き補償された予測画像との差を符号化するか、差分を取らずに符号化するか、効率の良い方をマクロブロック単位で選択する。Bピクチャ(Bidirectionally predictive-coded picture :両方向予測符号化画像)は、予測画像(差分をとる基準となる画像)として、時間的に前の既に復号されたIピクチャまたはPピクチャ、時間的に後ろの既に復号されたIピクチャまたはPピクチャ、並びにこの両方から作られた補間画像の3種類を使用する。この3種類のそれぞれの動き補償後の差分の符号化と、イントラ符号化の中で、最も効率の良いものをマクロブロック単位で選択する。
【0033】
従って、マクロブロックタイプとしては、フレーム内符号化(Intra) マクロブロックと、過去から未来を予測する順方向(Forward) フレーム間予測マクロブロックと、未来から過去を予測する逆方向(Backward)フレーム間予測マクロブロックと、前後両方向から予測する両方向マクロブロックとがある。Iピクチャ内の全てのマクロブロックは、フレーム内符号化マクロブロックである。また、Pピクチャ内には、フレーム内符号化マクロブロックと順方向フレーム間予測マクロブロックとが含まれる。Bピクチャ内には、上述した4種類の全てのタイプのマクロブロックが含まれる。
【0034】
GOPには、最低1枚のIピクチャが含まれ、PおよびBピクチャは、存在しなくても許容される。最上層のシーケンス層は、図4Aに示されるように、シーケンスヘッダ部と複数のGOPとから構成される。
【0035】
MPEGのフォーマットにおいては、スライスが1つの可変長符号系列である。可変長符号系列とは、可変長符号を正しく復号化しなければデータの境界を検出できない系列である。
【0036】
また、シーケンス層、GOP層、ピクチャ層およびスライス層の先頭には、それぞれ、バイト単位に整列された所定のビットパターンを有するスタートコードが配される。この、各層の先頭に配されるスタートコードを、シーケンス層においてはシーケンスヘッダコード、他の階層においてはスタートコードと称し、ビットパターンが〔00 00 01 xx〕(16進表記)とされる。2桁ずつ示され、〔xx〕は、各層のそれぞれで異なるビットパターンが配されることを示す。
【0037】
すなわち、スタートコードおよびシーケンスヘッダコードは、4バイト(=32ビット)からなり、4バイト目の値に基づき、後に続く情報の種類を識別できる。これらスタートコードおよびシーケンスヘッダコードは、バイト単位で整列されているため、4バイトのパターンマッチングを行うだけで捕捉することができる。
【0038】
さらに、スタートコードに続く1バイトの上位4ビットが、後述する拡張データ領域の内容の識別子となっている。この識別子の値により、その拡張データの内容を判別することができる。
【0039】
なお、マクロブロック層およびマクロブロック内のDCTブロックには、このような、バイト単位に整列された所定のビットパターンを有する識別コードは、配されない。
【0040】
各層のヘッダ部について、より詳細に説明する。図4Aに示すシーケンス層では、先頭にシーケンスヘッダ2が配され、続けて、シーケンス拡張3、拡張およびユーザデータ4が配される。シーケンスヘッダ2の先頭には、シーケンスヘッダコード1が配される。また、図示しないが、シーケンス拡張3およびユーザデータ4の先頭にも、それぞれ所定のスタートコードが配される。シーケンスヘッダ2からから拡張およびユーザデータ4までがシーケンス層のヘッダ部とされる。
【0041】
シーケンスヘッダ2には、図5に各パラメータの内容と割当ビットが示されるように、シーケンスヘッダコード1、水平方向画素数および垂直方向ライン数からなる符号化画像サイズ、アスペクト比、フレームレート、ビットレート、VBV(Video Buffering Verifier)バッファサイズ、量子化マトリクスなど、シーケンス単位で設定される情報がそれぞれ所定のビット数を割り当てられて格納される。
【0042】
なお、図5および後述する図15までの各図において、繁雑さを避けるために、一部のパラメータが省略されている。
【0043】
シーケンスヘッダに続く拡張スタートコード後のシーケンス拡張3では、図6に示されるように、MPEG2で用いられるプロファイル、レベル、色差フォーマット、プログレッシブシーケンスなどの付加データが指定される。拡張およびユーザデータ4は、図7に示されるように、シーケンス表示()により、原信号のRGB変換特性や表示画サイズの情報を格納できると共に、シーケンススケーラブル拡張()により、スケーラビリティモードやスケーラビリティのレイヤ指定などを行うことができる。
【0044】
シーケンス層のヘッダ部に続けて、GOPが配される。GOPの先頭には、図4Bに示されるように、GOPヘッダ6およびユーザデータ7が配される。GOPヘッダ6およびユーザデータ7がGOPのヘッダ部とされる。GOPヘッダ6には、図8に示されるように、GOPのスタートコード5、タイムコード、GOPの独立性や正当性を示すフラグがそれぞれ所定のビット数を割り当てられて格納される。ユーザデータ7は、図9に示されるように、拡張データおよびユーザデータを含む。図示しないが、拡張データおよびユーザデータの先頭には、それぞれ所定のスタートコードが配される。
【0045】
GOP層のヘッダ部に続けて、ピクチャが配される。ピクチャの先頭には、図4Cに示されるように、ピクチャヘッダ9、ピクチャ符号化拡張10、ならびに、拡張およびユーザデータ11が配される。ピクチャヘッダ9の先頭には、ピクチャスタートコード8が配される。また、ピクチャ符号化拡張10、ならびに、拡張およびユーザデータ11の先頭には、それぞれ所定のスタートコードが配される。ピクチャヘッダ9から拡張およびユーザデータ11までがピクチャのヘッダ部とされる。
【0046】
ピクチャヘッダ9は、図10に示されるように、ピクチャスタートコード8が配されると共に、画面に関する符号化条件が設定される。ピクチャ符号化拡張10では、図11に示されるように、前後方向および水平/垂直方向の動きベクトルの範囲の指定や、ピクチャ構造の指定がなされる。また、ピクチャ符号化拡張10では、イントラマクロブロックのDC係数精度の設定、VLCタイプの選択、線型/非線型量子化スケールの選択、DCTにおけるスキャン方法の選択などが行われる。
【0047】
拡張およびユーザデータ11では、図12に示されるように、量子化マトリクスの設定や、空間スケーラブルパラメータの設定などが行われる。これらの設定は、ピクチャ毎に可能となっており、各画面の特性に応じた符号化を行うことができる。また、拡張およびユーザデータ11では、ピクチャの表示領域の設定を行うことが可能となっている。さらに、拡張およびユーザデータ11では、著作権情報を設定することもできる。
【0048】
ピクチャ層のヘッダ部に続けて、スライスが配される。スライスの先頭には、図4Dに示されるように、スライスヘッダ13が配され、スライスヘッド13の先頭に、スライススタートコード12が配される。図13に示されるように、スライススタートコード12は、当該スライスの垂直方向の位置情報を含む。スライスヘッダ13には、さらに、拡張されたスライス垂直位置情報や、量子化スケール情報などが格納される。
【0049】
スライス層のヘッダ部に続けて、マクロブロックが配される(図4E)。マクロブロックでは、マクロブロックヘッダ14に続けて複数のDCTブロックが配される。上述したように、マクロブロックヘッダ14にはスタートコードが配されない。図14に示されるように、マクロブロックヘッダ14は、マクロブロックの相対的な位置情報が格納されると共に、動き補償モードの設定、DCT符号化に関する詳細な設定などを指示する。
【0050】
マクロブロックヘッダ14に続けて、DCTブロックが配される。DCTブロックは、図15に示されるように、可変長符号化されたDCT係数およびDCT係数に関するデータが格納される。
【0051】
なお、図4では、各層における実線の区切りは、データがバイト単位に整列されていることを示し、点線の区切りは、データがバイト単位に整列されていないことを示す。すなわち、ピクチャ層までは、図16Aに一例が示されるように、符号の境界がバイト単位で区切られているのに対し、スライス層では、スライススタートコード12のみがバイト単位で区切られており、各マクロブロックは、図16Bに一例が示されるように、ビット単位で区切ることができる。同様に、マクロブロック層では、各DCTブロックをビット単位で区切ることができる。
【0052】
一方、復号および符号化による信号の劣化を避けるためには、符号化データ上で編集することが望ましい。このとき、PピクチャおよびBピクチャは、その復号に、時間的に前のピクチャあるいは前後のピクチャを必要とする。そのため、編集単位を1フレーム単位とすることができない。この点を考慮して、この実施の第1の形態では、1つのGOPが1枚のIピクチャからなるようにしている。
【0053】
また、例えば1フレーム分の記録データが記録される記録領域が所定のものとされる。MPEG2では、可変長符号化を用いているので、1フレーム期間に発生するデータを所定の記録領域に記録できるように、1フレーム分の発生データ量が制御される。さらに、この実施の第1の形態では、磁気テープへの記録に適するように、1スライスを1マクロブロックから構成すると共に、1マクロブロックを、所定長の固定枠に当てはめる。
【0054】
図17は、この実施の第1の形態によるMPEGストリームのヘッダを具体的に示す。図4で分かるように、シーケンス層、GOP層、ピクチャ層、スライス層およびマクロブロック層のそれぞれのヘッダ部は、シーケンス層の先頭から連続的に現れる。図17は、シーケンスヘッダ部分から連続した一例のデータ配列を示している。
【0055】
先頭から、12バイト分の長さを有するシーケンスヘッダ2が配され、続けて、10バイト分の長さを有するシーケンス拡張3が配される。シーケンス拡張3の次には、拡張およびユーザデータ4が配される。拡張およびユーザデータ4の先頭には、4バイト分のユーザデータスタートコードが配され、続くユーザデータ領域には、SMPTEの規格に基づく情報が格納される。
【0056】
シーケンス層のヘッダ部の次は、GOP層のヘッダ部となる。8バイト分の長さを有するGOPヘッダ6が配され、続けて拡張およびユーザデータ7が配される。拡張およびユーザデータ7の先頭には、4バイト分のユーザデータスタートコードが配され、続くユーザデータ領域には、既存の他のビデオフォーマットとの互換性をとるための情報が格納される。
【0057】
GOP層のヘッダ部の次は、ピクチャ層のヘッダ部となる。9バイトの長さを有するピクチャヘッダ9が配され、続けて9バイトの長さを有するピクチャ符号化拡張10が配される。ピクチャ符号化拡張10の後に、拡張およびユーザデータ11が配される。拡張およびユーザデータ11の先頭側133バイトに拡張およびユーザデータが格納され、続いて4バイトの長さを有するユーザデータスタートコード15が配される。ユーザデータスタートコード15に続けて、既存の他のビデオフォーマットとの互換性をとるための情報が格納される。さらに、ユーザデータスタートコード16が配され、ユーザデータスタートコード16に続けて、SMPTEの規格に基づくデータが格納される。ピクチャ層のヘッダ部の次は、スライスとなる。
【0058】
マクロブロックについて、さらに詳細に説明する。スライス層に含まれるマクロブロックは、複数のDCTブロックの集合であり、DCTブロックの符号化系列は、量子化されたDCT係数の系列を0係数の連続回数(ラン)とその直後の非0系列(レベル)を1つの単位として可変長符号化したものである。マクロブロックならびにマクロブロック内のDCTブロックには、バイト単位に整列した識別コードが付加されない。
【0059】
マクロブロックは、画面(ピクチャ)を16画素×16ラインの格子状に分割したものである。スライスは、例えばこのマクロブロックを水平方向に連結してなる。連続するスライスの前のスライスの最後のマクロブロックと、次のスライスの先頭のマクロブロックとは連続しており、スライス間でのマクロブロックのオーバーラップを形成することは、許されていない。また、画面のサイズが決まると、1画面当たりのマクロブロック数は、一意に決まる。
【0060】
画面上での垂直方向および水平方向のマクロブロック数を、それぞれmb_heightおよびmb_widthと称する。画面上でのマクロブロックの座標は、マクロブロックの垂直位置番号を、上端を基準に0から数えたmb_rowと、マクロブロックの水平位置番号を、左端を基準に0から数えたmb_columnとで表すように定められている。画面上でのマクロブロックの位置を一つの変数で表すために、macroblock_addressを、
macroblock_address=mb_row×mb_width+mb_column
このように定義する。
【0061】
ストリーム上でのスライスとマクロブロックの順は、macroblock_addressの小さい順でなければいけないと定められている。すなわち、ストリームは、画面の上から下、左から右の順に伝送される。
【0062】
MPEGでは、1スライスを1ストライプ(16ライン)で構成するのが普通であり、画面の左端から可変長符号化が始まり、右端で終わる。従って、VTRによってそのままMPEGエレメンタリストリームを記録した場合、高速再生時に、再生できる部分が画面の左端に集中し、均一に更新することができない。また、データのテープ上の配置を予測できないため、テープパターンを一定の間隔でトレースしたのでは、均一な画面更新ができなくなる。さらに、1箇所でもエラーが発生すると、画面右端まで影響し、次のスライスヘッダが検出されるまで復帰できない。このために、1スライスを1マクロブロックで構成するようにしている。
【0063】
図18は、この実施の第1の形態に適用可能な記録再生装置の記録側の構成の一例を示す。記録時には、端子100から入力されたディジタル信号がSDI(Serial Data Interface) 受信部101に供給される。SDIは、(4:2:2)コンポーネントビデオ信号とディジタルオーディオ信号と付加的データとを伝送するために、SMPTEによって規定されたインターフェイスである。SDI受信部101で、入力されたディジタル信号からディジタルビデオ信号とディジタルオーディオ信号とがそれぞれ抽出され、ディジタルビデオ信号は、MPEGエンコーダ102に供給され、ディジタルオーディオ信号は、ディレイ103を介してECCエンコーダ109に供給される。ディレイ103は、ディジタルオーディオ信号とディジタルビデオ信号との時間差を解消するためのものである。
【0064】
また、SDI受信部101では、入力されたディジタル信号から同期信号を抽出し、抽出された同期信号をタイミングジェネレータ104に供給する。タイミングジェネレータ104には、端子105から外部同期信号を入力することもできる。タイミングジェネレータ104では、入力されたこれらの同期信号および後述するSDTI受信部108から供給される同期信号のうち、指定された信号に基づきタイミングパルスを生成する。生成されたタイミングパルスは、この記録再生装置の各部に供給される。
【0065】
入力ビデオ信号は、MPEGエンコーダ102においてDCT(Discrete Cosine Transform) の処理を受け、係数データに変換され、係数データが可変長符号化される。MPEGエンコーダ102からの可変長符号化(VLC)データは、MPEG2に準拠したエレメンタリストリーム(ES)である。この出力は、記録側のマルチフォーマットコンバータ(以下、MFCと称する)106の一方の入力端に供給される。
【0066】
一方、入力端子107を通じて、SDTI(Serial Data Transport Interface) のフォーマットのデータが入力される。この信号は、SDTI受信部108で同期検出され、フレームメモリ170に一旦溜め込まれる。同期検出されて得られた同期信号は、上述したタイミングジェネレータ104に供給される。フレームメモリ170に溜め込まれた信号は、後述する記録側MFC106から供給されるリクエスト信号RQに従い読み出され、エレメンタリストリームが抜き出され、SDTI受信部108から出力される。このとき、SDTI受信部108から、出力されるエレメンタリストリームの有効期間を示すイネーブル信号ENが出力される。
【0067】
記録側MFC106のリクエスト信号RQに従いSDTI受信部108から出力されたエレメンタリストリームは、符号量計測部560に供給され、図3を用いて上述したように、メモリ531に一旦溜め込まれると共に、符号量計測器530で等長化単位の符号量を計測される。等長化単位は、例えばビデオ信号の1フレームである。
【0068】
この実施の第1の形態では、符号量の計測結果に基づき、等長化単位の符号量が、等長化単位に対して規定された符号総量を超えているときに、入力されたストリームの記録を停止させるような制御信号が符号量制御部560から出力される。この制御信号は、例えば後述するイコライザ110に供給され、等長化単位の符号量が、等長化単位に対して規定された符号総量を超えているときに、イコライザ110からの記録RF信号の出力がこの制御信号の制御に基づき停止される。イコライザ110と後述する回転ドラム111に取り付けられる磁気ヘッドとの間にスイッチ回路を設け、制御信号によりスイッチ回路の開閉状態を制御することで、記録を停止するようにしてもよい。なお、符号量計測部560による処理の詳細については、後述する。
【0069】
なお、この構成が後述する実施の第2〜第5の形態に適用されるときには、符号量計測部560からの制御信号の出力および制御信号によるイコライザ110などの制御は、不要となる。
【0070】
符号量計測部56で符号量を計測されたMPEG ESは、記録側MFC106の他方の入力端に供給される。
【0071】
この発明では、例えばMPEG ES(MPEGエレメンタリストリーム)を伝送するために、SDTI(Serial Data Transport Interface)−CP(Content Package) が使用される。このESは、4:2:2のコンポーネントであり、また、上述したように、全てIピクチャのストリームであり、1GOP=1ピクチャの関係を有する。SDTI−CPのフォーマットでは、MPEG ESがアクセスユニットへ分離され、また、フレーム単位のパケットにパッキングされている。SDTI−CPでは、十分な伝送帯域(クロックレートで27MHzまたは36MHz、ストリームビットレートで270M bpsまたは360M bps)を使用しており、1フレーム期間で、バースト的にESを送ることが可能である。
【0072】
すなわち、1フレーム期間のSAVの後からEAVまでの間に、システムデータ、ビデオストリーム、オーディオストリーム、AUXデータが配される。1フレーム期間全体にデータが存在せずに、その先頭から所定期間バースト状にデータが存在する。フレームの境界においてSDTI−CPのストリーム(ビデオおよびオーディオ)をストリームの状態でスイッチングすることができる。SDTI−CPは、クロック基準としてSMPTEタイムコードを使用したコンテンツの場合に、オーディオ、ビデオ間の同期を確立する機構を有する。さらに、SDTI−CPとSDIとが共存可能なように、フォーマットが決められている。
【0073】
上述したSDTI−CPを使用したインターフェースは、TS(Transport Stream)を転送する場合のように、エンコーダおよびデコーダがVBV(Video Buffer Verifier) バッファおよびTBs(Transport Buffers) を通る必要がなく、ディレイを少なくできる。また、SDTI−CP自体が極めて高速の転送が可能なこともディレイを一層少なくする。従って、放送局の全体を管理するような同期が存在する環境では、SDTI−CPを使用することが有効である。
【0074】
なお、SDTI受信部108では、さらに、入力されたSDTI−CPのストリームからディジタルオーディオ信号を抽出する。抽出されたディジタルオーディオ信号は、ECCエンコーダ109に供給される。
【0075】
記録側MFC106は、セレクタおよびストリームコンバータを内蔵する。さらに、上述した符号量計測部560を記録側MFC106に内蔵させることもできる。記録側MFC106は、例えば1個の集積回路内に構成される。記録側MFC106において行われる処理について説明する。上述したMPEGエンコーダ102およびSDTI受信部108から供給されたMPEG ESは、セレクタで何方か一方を選択され、ストリームコンバータに供給される。
【0076】
ストリームコンバータは、例えば可変長符号の復号を行うだけの簡易的なデコーダを有する。ストリームコンバータに供給されたMPEG ESは、簡易的にデコードされ、MPEG2の規定に基づきDCTブロック毎に並べられていたDCT係数が1マクロブロックを構成する複数のDCTブロックを通して、周波数成分毎にまとめられ、まとめられた周波数成分が並べ替えられる。また、ストリームコンバータにより、エレメンタリストリームの1スライスが1ストライプの場合には、1スライスが1マクロブロックからなるものにされる。さらに、ストリームコンバータにより、1マクロブロックで発生する可変長データの最大長が所定長に制限される。これは、高次のDCT係数を0とすることでなしうる。並べ替えられた変換エレメンタリストリームは、ECCエンコーダ109に供給される。
【0077】
ECCエンコーダ109は、大容量のメインメモリが接続され(図示しない)、パッキングおよびシャフリング部、オーディオ用外符号エンコーダ、ビデオ用外符号エンコーダ、内符号エンコーダ、オーディオ用シャフリング部およびビデオ用シャフリング部などを内蔵する。また、ECCエンコーダ109は、シンクブロック単位でIDを付加する回路や、同期信号を付加する回路を含む。ECCエンコーダ109は、例えば1個の集積回路で構成される。
【0078】
なお、実施の第1の形態では、ビデオデータおよびオーディオデータに対するエラー訂正符号としては、積符号が使用される。積符号は、ビデオデータまたはオーディオデータの2次元配列の縦方向に外符号の符号化を行い、その横方向に内符号の符号化を行い、データシンボルを2重に符号化するものである。外符号および内符号としては、リードソロモンコード(Reed-Solomon code) を使用できる。
【0079】
ECCエンコーダ109における処理について説明する。エレメンタリストリームのビデオデータは、可変長符号化されているため、各マクロブロックのデータの長さが不揃いである。パッキングおよびシャフリング部では、マクロブロックが固定枠に詰め込まれる。このとき、固定枠からはみ出たオーバーフロー部分は、固定枠のサイズに対して空いている領域に順に詰め込まれる。
【0080】
また、画像フォーマット、シャフリングパターンのバージョン等の情報を有するシステムデータが、後述するシスコン121から供給され、図示されない入力端から入力される。システムデータは、パッキングおよびシャフリング部に供給され、ピクチャデータと同様に記録処理を受ける。また、走査順に発生する1フレームのマクロブロックを並び替え、テープ上のマクロブロックの記録位置を分散させるシャフリングが行われる。シャフリングによって、変速再生時に断片的にデータが再生される時でも、画像の更新率を向上させることができる。
【0081】
パッキングおよびシャフリング部からのビデオデータおよびシステムデータ(以下、特に必要な場合を除き、システムデータを含む場合も単にビデオデータと称する)は、ビデオデータに対して外符号化の符号化を行うビデオ用外符号エンコーダに供給され、外符号パリティが付加される。外符号エンコーダの出力は、ビデオ用シャフリング部で、複数のECCブロックにわたってシンクブロック単位で順番を入れ替える、シャフリングがなされる。シンクブロック単位のシャフリングによって特定のECCブロックにエラーが集中することが防止される。シャフリング部でなされるシャフリングを、インターリーブと称することもある。ビデオ用シャフリング部の出力は、メインメモリに書き込まれる。
【0082】
一方、上述したように、SDTI受信部108あるいはディレイ103から出力されたディジタルオーディオ信号がECCエンコーダ109に供給される。この実施の第1の形態では、非圧縮のディジタルオーディオ信号が扱われる。ディジタルオーディオ信号は、これらに限らず、オーディオインターフェースを介して入力されるようにもできる。また、図示されない入力端子から、オーディオAUXが供給される。オーディオAUXは、補助的データであり、オーディオデータのサンプリング周波数等のオーディオデータに関連する情報を有するデータである。オーディオAUXは、オーディオデータに付加され、オーディオデータと同等に扱われる。
【0083】
オーディオAUXが付加されたオーディオデータ(以下、特に必要な場合を除き、AUXを含む場合も単にオーディオデータと称する)は、オーディオデータに対して外符号の符号化を行うオーディオ用外符号エンコーダに供給される。オーディオ用外符号エンコーダの出力がオーディオ用シャフリング部に供給され、シャフリング処理を受ける。オーディオシャフリングとして、シンクブロック単位のシャフリングと、チャンネル単位のシャフリングとがなされる。
【0084】
オーディオ用シャフリング部の出力は、メインメモリに書き込まれる。上述したように、メインメモリには、ビデオ用シャフリング部の出力も書き込まれており、メインメモリで、オーディオデータとビデオデータとが混合され、1チャンネルのデータとされる。
【0085】
メインメモリからデータが読み出され、シンクブロック番号を示す情報等を有するIDが付加され、内符号エンコーダに供給される。内符号エンコーダでは、供給されたデータに対して内符号の符号化を施す。内符号エンコーダの出力に対してシンクブロック毎の同期信号が付加され、シンクブロックが連続する記録データが構成される。
【0086】
ECCエンコーダ109から出力された記録データは、記録アンプなどを含むイコライザ110に供給され、記録RF信号に変換される。記録RF信号は、回転ヘッドが所定に設けられた回転ドラム111に供給され、磁気テープ112上に記録される。回転ドラム111には、実際には、隣接するトラックを形成するヘッドのアジマスが互いに異なる複数の磁気ヘッドが取り付けられている。
【0087】
なお、上述したように、イコライザ110では、符号量計測部560から供給される制御信号に基づき、記録RF信号の出力が制御される。これに限らず、イコライザ110と回転ドラム111との間に、符号量計測部560から供給される制御信号で開閉が制御されるスイッチ回路を設けてもよい。
【0088】
記録データに対して必要に応じてスクランブル処理を行っても良い。また、記録時にディジタル変調を行っても良く、さらに、パーシャル・レスポンスクラス4とビタビ符号を使用しても良い。なお、イコライザ110は、記録側の構成と再生側の構成とを共に含む。
【0089】
図19は、上述した回転ヘッドにより磁気テープ上に形成されるトラックフォーマットの一例を示す。この例では、1フレーム当たりのビデオおよびオーディオデータが4トラックで記録されている。互いに異なるアジマスの2トラックによって1セグメントが構成される。すなわち、4トラックは、4セグメントからなる。セグメントを構成する1組のトラックに対して、アジマスと対応するトラック番号〔0〕とトラック番号〔1〕が付される。トラックのそれぞれにおいて、両端側にビデオデータが記録されるビデオセクタが配され、ビデオセクタに挟まれて、オーディオデータが記録されるオーディオセクタが配される。この図19は、テープ上のセクタの配置を示すものである。
【0090】
この例では、4チャンネルのオーディオデータを扱うことができるようにされている。A1〜A4は、それぞれオーディオデータの1〜4chを示す。オーディオデータは、セグメント単位で配列を変えられて記録される。また、ビデオデータは、この例では、1トラックに対して4エラー訂正ブロック分のデータがインターリーブされ、Upper SideおよびLower Sideのセクタに分割され記録される。
【0091】
Lower Sideのビデオセクタには、システムデータが記録されるシステム領域(SYS)が所定位置に設けられる。システム領域は、例えば、Lower Sideのビデオセクタの先頭側と末尾側とに、トラック毎に交互に設けられる。
【0092】
なお、図19において、SATは、サーボロック用の信号が記録されるエリアである。また、各記録エリアの間には、所定の大きさのギャップが設けられる。
【0093】
図19は、1フレーム当たりのデータを4トラックで記録する例であるが、記録再生するデータのフォーマットによっては、1フレーム当たりのデータを8トラック、6トラックなどで記録するようにもできる。
【0094】
図19Bに示されるように、テープ上に記録されるデータは、シンクブロックと称される等間隔に区切られた複数のブロックからなる。図19Cは、シンクブロックの構成を概略的に示す。シンクブロックは、同期検出するためのSYNCパターン、シンクブロックのそれぞれを識別するためのID、後続するデータの内容を示すDID、データパケットおよびエラー訂正用の内符号パリティから構成される。データは、シンクブロック単位でパケットとして扱われる。すなわち、記録あるいは再生されるデータ単位の最小のものが1シンクブロックである。シンクブロックが多数並べられて(図19B)、例えばビデオセクタが形成される。
【0095】
図19Dは、システム領域SYSの一例のデータ構成を示す。図19Cに示されるシンクブロック中のデータ領域において、先頭から、システムデータに5バイト、MPEGヘッダに2バイト、ピクチャ情報に10バイト、ユーザデータに92バイトがそれぞれ割り当てられる。
【0096】
システムデータには、スイッチング点の有無およびその位置、ビデオのフォーマット(フレーム周波数、インターリーブ方法、アスペクト比など)、シャフリングのバージョン情報などが記録される。また、システムデータには、記録されたMPEG ESのシンタクスの適正レベルが6ビットを用いて記録される。
【0097】
MPEGヘッダは、シャトル再生時に必要なMPEGのヘッダ情報が記録される。ピクチャ情報には、他のディジタルVTRとの互換性を保つための情報が記録される。さらに、ユーザデータには、記録の年月日やカセット番号などが記録される。
【0098】
図18の説明に戻り、再生時には、磁気テープ112から回転ドラム111で再生された再生信号が再生アンプなどを含むイコライザ110の再生側の構成に供給される。イコライザ110では、再生信号に対して、等化や波形整形などがなされる。また、ディジタル変調の復調、ビタビ復号等が必要に応じてなされる。イコライザ110の出力は、ECCデコーダ113に供給される。
【0099】
ECCデコーダ113は、上述したECCエンコーダ109と逆の処理を行うもので、大容量のメインメモリと、内符号デコーダ、オーディオ用およびビデオ用それぞれのデシャフリング部ならびに外符号デコーダを含む。さらに、ECCデコーダ113は、ビデオ用として、デシャフリングおよびデパッキング部、データ補間部を含む。同様に、オーディオ用として、オーディオAUX分離部とデータ補間部を含む。ECCデコーダ113は、例えば1個の集積回路で構成される。
【0100】
ECCデコーダ113における処理について説明する。ECCデコーダ113では、先ず、同期検出を行いシンクブロックの先頭に付加されている同期信号を検出し、シンクブロックを切り出す。データは、再生データは、シンクブロック毎に内符号エンコーダに供給され、内符号のエラー訂正がなされる。内符号エンコーダの出力に対してID補間処理がなされ、内符号によりエラーとされたシンクブロックのID例えばシンクブロック番号が補間される。IDが補間された再生データは、ビデオデータとオーディオデータとに分離される。
【0101】
上述したように、ビデオデータは、MPEGのイントラ符号化で発生したDCT係数データおよびシステムデータを意味し、オーディオデータは、PCM(Pulse Code Modulation) データおよびオーディオAUXを意味する。
【0102】
分離されたオーディオデータは、オーディオ用デシャフリング部に供給され、記録側のシャフリング部でなされたシャフリングと逆の処理を行う。デシャフリング部の出力がオーディオ用の外符号デコーダに供給され、外符号によるエラー訂正がなされる。オーディオ用の外符号デコーダからは、エラー訂正されたオーディオデータが出力される。訂正できないエラーがあるデータに関しては、エラーフラグがセットされる。
【0103】
オーディオ用の外符号デコーダの出力から、オーディオAUX分離部でオーディオAUXが分離され、分離されたオーディオAUXがECCデコーダ113から出力される(経路は省略する)。オーディオAUXは、例えば後述するシスコン121に供給される。また、オーディオデータは、データ補間部に供給される。データ補間部では、エラーの有るサンプルが補間される。補間方法としては、時間的に前後の正しいデータの平均値で補間する平均値補間、前の正しいサンプルの値をホールドする前値ホールド等を使用できる。
【0104】
データ補間部の出力がECCデコーダ113からのオーディオデータの出力であって、ECCデコーダ113から出力されたオーディオデータは、ディレイ117およびSDTI出力部115に供給される。ディレイ117は、後述するMPEGデコーダ116でのビデオデータの処理による遅延を吸収するために設けられる。ディレイ117に供給されたオーディオデータは、所定の遅延を与えられて、SDI出力部118に供給される。
【0105】
分離されたビデオデータは、デシャフリング部に供給され、記録側のシャフリングと逆の処理がなされる。デシャフリング部は、記録側のシャフリング部でなされたシンクブロック単位のシャフリングを元に戻す処理を行う。デシャフリング部の出力が外符号デコーダに供給され、外符号によるエラー訂正がなされる。訂正できないエラーが発生した場合には、エラーの有無を示すエラーフラグがエラー有りを示すものとされる。
【0106】
外符号デコーダの出力がデシャフリングおよびデパッキング部に供給される。デシャフリングおよびデパッキング部は、記録側のパッキングおよびシャフリング部でなされたマクロブロック単位のシャフリングを元に戻す処理を行う。また、デシャフリングおよびデパッキング部では、記録時に施されたパッキングを分解する。すなわち、マクロブロック単位にデータの長さを戻して、元の可変長符号を復元する。さらに、デシャフリングおよびデパッキング部において、システムデータが分離され、ECCデコーダ113から出力され、後述するシスコン121に供給される。
【0107】
デシャフリングおよびデパッキング部の出力は、データ補間部に供給され、エラーフラグが立っている(すなわち、エラーのある)データが修整される。すなわち、変換前に、マクロブロックデータの途中にエラーがあるとされた場合には、エラー箇所以降の周波数成分のDCT係数が復元できない。そこで、例えばエラー箇所のデータをブロック終端符号(EOB)に置き替え、それ以降の周波数成分のDCT係数をゼロとする。同様に、高速再生時にも、シンクブロック長に対応する長さまでのDCT係数のみを復元し、それ以降の係数は、ゼロデータに置き替えられる。さらに、データ補間部では、ビデオデータの先頭に付加されているヘッダがエラーの場合に、ヘッダ(シーケンスヘッダ、GOPヘッダ、ピクチャヘッダ、ユーザデータ等)を回復する処理もなされる。
【0108】
DCTブロックに跨がって、DCT係数がDC成分および低域成分から高域成分へと並べられているため、このように、ある箇所以降からDCT係数を無視しても、マクロブロックを構成するDCTブロックのそれぞれに対して、満遍なくDCならびに低域成分からのDCT係数を行き渡らせることができる。
【0109】
データ補間部から出力されたビデオデータがECCデコーダ113の出力であって、ECCデコーダ113の出力は、再生側のマルチフォーマットコンバータ(以下、再生側MFCと略称する)114に供給される。再生側MFC114は、上述した記録側MFC106と逆の処理を行うものであって、ストリームコンバータを含む。再生側MFC114は、例えば1個の集積回路で構成される。
【0110】
ストリームコンバータでは、記録側のストリームコンバータと逆の処理がなされる。すなわち、DCTブロックに跨がって周波数成分毎に並べられていたDCT係数を、DCTブロック毎に並び替える。これにより、再生信号がMPEG2に準拠したエレメンタリストリームに変換される。
【0111】
また、ストリームコンバータの入出力は、記録側と同様に、マクロブロックの最大長に応じて、十分な転送レート(バンド幅)を確保しておく。マクロブロック(スライス)の長さを制限しない場合には、画素レートの3倍のバンド幅を確保するのが好ましい。
【0112】
ストリームコンバータの出力が再生側MFC114の出力であって、再生側MFC114の出力は、SDTI出力部115およびMPEGデコーダ116に供給される。
【0113】
MPEGデコーダ116は、エレメンタリストリームを復号し、ビデオデータを出力する。すなわち、MPEGデコーダ142は、逆量子化処理と、逆DCT処理とがなされる。復号ビデオデータは、SDI出力部118に供給される。上述したように、SDI出力部118には、ECCデコーダ113でビデオデータと分離されたオーディオデータがディレイ117を介して供給されている。SDI出力部118では、供給されたビデオデータとオーディオデータとを、SDIのフォーマットにマッピングし、SDIフォーマットのデータ構造を有するストリームへ変換される。SDI出力部118からのストリームが出力端子120から外部へ出力される。
【0114】
一方、SDTI出力部115には、上述したように、ECCデコーダ113でビデオデータと分離されたオーディオデータが供給されている。SDTI出力部115では、供給された、エレメンタリストリームとしてのビデオデータと、オーディオデータとをSDTIのフォーマットにマッピングし、SDTIフォーマットのデータ構造を有するストリームへ変換される。変換されたストリームは、出力端子119から外部へ出力される。
【0115】
図18において、シスコン121は、例えばマイクロコンピュータからなり、この記録再生装置の全体の動作を制御する。また、図示されないコントロールパネルに設けられたスイッチ類が操作されると、操作に応じた制御信号がシスコン121に供給される。この制御信号に基づき、この記録再生装置での記録、再生などの動作がシスコン121により制御される。一例として、コントロールパネルに設けられた記録スイッチ551を操作することで、入力端子100や入力端子107から入力されたビデオ信号を磁気テープ112に記録する動作が開始される。
【0116】
さらに、コントロールパネルには、LCD(Liquid Crystal Display)などによる表示部を設けることができる(図示しない)。シスコン121において生成された表示制御信号に基づき、表示部に所定の表示がなされる。この記録再生装置の各状態などが、表示部に表示される。
【0117】
サーボ122は、シスコン121と互いに通信を行いながら、磁気テープ112の走行制御や回転ドラム111の駆動制御などを行う。また、サーボ122において、回転ドラム111の加速状態が検出される。加速状態は、例えば回転ドラム111のFGパルスやPGパルスの間隔の時間変化を調べることで検出される。検出結果は、ドラム加速検出信号としてシスコン121に供給される。
【0118】
図20Aは、MPEGエンコーダ102のDCT回路から出力されるビデオデータ中のDCT係数の順序を示す。SDTI受信部108から出力されるMPEG ESについても同様である。以下では、MPEGエンコーダ102の出力を例に用いて説明する。DCTブロックにおいて左上のDC成分から開始して、水平ならびに垂直空間周波数が高くなる方向に、DCT係数がジグザグスキャンで出力される。その結果、図20Bに一例が示されるように、全部で64個(8画素×8ライン)のDCT係数が周波数成分順に並べられて得られる。
【0119】
このDCT係数がMPEGエンコーダのVLC部によって可変長符号化される。すなわち、最初の係数は、DC成分として固定的であり、次の成分(AC成分)からは、ゼロのランとそれに続くレベルに対応してコードが割り当てられる。従って、AC成分の係数データに対する可変長符号化出力は、周波数成分の低い(低次の)係数から高い(高次の)係数へと、AC1 ,AC2 ,AC3 ,・・・と並べられたものである。可変長符号化されたDCT係数をエレメンタリストリームが含んでいる。
【0120】
上述した記録側MFC106に内蔵される、記録側のストリームコンバータでは、供給された信号のDCT係数の並べ替えが行われる。すなわち、それぞれのマクロブロック内で、ジグザグスキャンによってDCTブロック毎に周波数成分順に並べられたDCT係数がマクロブロックを構成する各DCTブロックにわたって周波数成分順に並べ替えられる。
【0121】
図21は、この記録側ストリームコンバータにおけるDCT係数の並べ替えを概略的に示す。(4:2:2)コンポーネント信号の場合に、1マクロブロックは、輝度信号Yによる4個のDCTブロック(Y1 ,Y2 ,Y3 およびY4 )と、色度信号Cb,Crのそれぞれによる2個ずつのDCTブロック(Cb1 ,Cb2 ,Cr1 およびCr2 )からなる。
【0122】
上述したように、MPEGエンコーダ102では、MPEG2の規定に従いジグザグスキャンが行われ、図21Aに示されるように、各DCTブロック毎に、DCT係数がDC成分および低域成分から高域成分に、周波数成分の順に並べられる。一つのDCTブロックのスキャンが終了したら、次のDCTブロックのスキャンが行われ、同様に、DCT係数が並べられる。
【0123】
すなわち、マクロブロック内で、DCTブロックY1 ,Y2 ,Y3 およびY4 、DCTブロックCb1 ,Cb2 ,Cr1 およびCr2 のそれぞれについて、DCT係数がDC成分および低域成分から高域成分へと周波数順に並べられる。そして、連続したランとそれに続くレベルとからなる組に、〔DC,AC1 ,AC2 ,AC3 ,・・・〕と、それぞれ符号が割り当てられるように、可変長符号化されている。
【0124】
記録側ストリームコンバータでは、可変長符号化され並べられたDCT係数を、一旦可変長符号を解読して各係数の区切りを検出し、マクロブロックを構成する各DCTブロックに跨がって周波数成分毎にまとめる。この様子を、図21Bに示す。最初にマクロブロック内の8個のDCTブロックのDC成分をまとめ、次に8個のDCTブロックの最も周波数成分が低いAC係数成分をまとめ、以下、順に同一次数のAC係数をまとめるように、8個のDCTブロックに跨がって係数データを並び替える。
【0125】
並び替えられた係数データは、DC(Y1 ),DC(Y2 ),DC(Y3 ),DC(Y4 ),DC(Cb1 ),DC(Cb2 ),DC(Cr1 ),DC(Cr2 ),AC1 (Y1 ),AC1 (Y2 ),AC1 (Y3 ),AC1 (Y4 ),AC1 (Cb1 ),AC1 (Cb2 ),AC1 (Cr1 ),AC1 (Cr2 ),・・・である。ここで、DC、AC1 、AC2 、・・・は、図20を参照して説明したように、ランとそれに続くレベルとからなる組に対して割り当てられた可変長符号の各符号である。
【0126】
記録側ストリームコンバータで係数データの順序が並べ替えられた変換エレメンタリストリームは、ECCエンコーダ109に内蔵されるパッキングおよびシャフリング部に供給される。マクロブロックのデータの長さは、変換エレメンタリストリームと変換前のエレメンタリストリームとで同一である。また、MPEGエンコーダ102において、ビットレート制御によりGOP(1フレーム)単位に固定長化されていても、マクロブロック単位では、長さが変動している。パッキングおよびシャフリング部では、マクロブロックのデータを固定枠に当てはめる。
【0127】
図22は、パッキングおよびシャフリング部でのマクロブロックのパッキング処理を概略的に示す。マクロブロックは、所定のデータ長を持つ固定枠に当てはめられ、パッキングされる。このとき用いられる固定枠のデータ長を、記録および再生の際のデータの最小単位であるシンクブロックのデータ長と一致させている。これは、シャフリングおよびエラー訂正符号化の処理を簡単に行うためである。図22では、簡単のため、1フレームに8マクロブロックが含まれるものと仮定する。
【0128】
可変長符号化によって、図22Aに一例が示されるように、8マクロブロックの長さは、互いに異なる。この例では、固定枠である1シンクブロックのデータ領域の長さと比較して、マクロブロック#1のデータ,#3のデータおよび#6のデータがそれぞれ長く、マクロブロック#2のデータ,#5のデータ,#7のデータおよび#8のデータがそれぞれ短い。また、マクロブロック#4のデータは、1シンクブロックと略等しい長さである。
【0129】
パッキング処理によって、マクロブロックが1シンクブロック長の固定長枠に詰め込まれる。過不足無くデータを詰め込むことができるのは、1フレーム期間で発生するデータ量が固定量に制御されているからである。図22Bに一例が示されるように、1シンクブロックと比較して長いマクロブロックは、シンクブロック長に対応する位置で分割される。分割されたマクロブロックのうち、シンクブロック長からはみ出た部分(オーバーフロー部分)は、先頭から順に空いている領域に、すなわち、長さがシンクブロック長に満たないマクロブロックの後ろに、詰め込まれる。
【0130】
図22Bの例では、マクロブロック#1の、シンクブロック長からはみ出た部分が、先ず、マクロブロック#2の後ろに詰め込まれ、そこがシンクブロックの長さに達すると、マクロブロック#5の後ろに詰め込まれる。次に、マクロブロック#3の、シンクブロック長からはみ出た部分がマクロブロック#7の後ろに詰め込まれる。さらに、マクロブロック#6のシンクブロック長からはみ出た部分がマクロブロック#7の後ろに詰め込まれ、さらにはみ出た部分がマクロブロック#8の後ろに詰め込まれる。こうして、各マクロブロックがシンクブロック長の固定枠に対してパッキングされる。
【0131】
各マクロブロックに対応する可変長データの長さは、記録側ストリームコンバータにおいて予め調べておくことができる。これにより、このパッキング部では、VLCデータをデコードして内容を検査すること無く、マクロブロックのデータの最後尾を知ることができる。
【0132】
図23は、上述したECCエンコーダ139のより具体的な構成を示す。図23において、164がICに対して外付けのメインメモリ160のインターフェースである。メインメモリ160は、SDRAMで構成されている。インターフェース164によって、内部からのメインメモリ160に対する要求を調停し、メインメモリ160に対して書込み/読出しの処理を行う。また、パッキング部137a、ビデオシャフリング部137b、パッキング部137cによって、パッキングおよびシャフリング部137が構成される。
【0133】
図24は、メインメモリ160のアドレス構成の一例を示す。メインメモリ160は、例えば64MビットのSDRAMで構成される。メインメモリ160は、ビデオ領域250、オーバーフロー領域251およびオーディオ領域252を有する。ビデオ領域250は、4つのバンク(vbank#0、vbank#1、vbank#2およびvbank#3)からなる。4バンクのそれぞれは、1等長化単位のディジタルビデオ信号が格納できる。1等長化単位は、発生するデータ量を略目標値に制御する単位であり、例えばビデオ信号の1ピクチャ(Iピクチャ)である。図24中の、部分Aは、ビデオ信号の1シンクブロックのデータ部分を示す。1シンクブロックには、フォーマットによって異なるバイト数のデータが挿入される。複数のフォーマットに対応するために、最大のバイト数以上であって、処理に都合の良いバイト数例えば256バイトが1シンクブロックのデータサイズとされている。
【0134】
ビデオ領域の各バンクは、さらに、パッキング用領域250Aと内符号化エンコーダへの出力用領域250Bとに分けられる。オーバーフロー領域251は、上述のビデオ領域に対応して、4つのバンクからなる。さらに、オーディオデータ処理用の領域252をメインメモリ160が有する。
【0135】
この実施の第1の形態では、各マクロブロックのデータ長標識を参照することによって、パッキング部137aが固定枠長データと、固定枠を越える部分であるオーバーフローデータとをメインメモリ160の別々の領域に分けて記憶する。固定枠長データは、シンクブロックのデータ領域の長さ以下のデータであり、以下、ブロック長データと称する。ブロック長データを記憶する領域は、各バンクのパッキング処理用領域250Aである。ブロック長より短いデータ長の場合には、メインメモリ160の対応する領域に空き領域を生じる。ビデオシャフリング部137bが書込みアドレスを制御することによってシャフリングを行う。ここで、ビデオシャフリング部137bは、ブロック長データのみをシャフリングし、オーバーフロー部分は、シャフリングせずに、オーバーフローデータに割り当てられた領域に書込まれる。
【0136】
次に、パッキング部137cが外符号エンコーダ139へのメモリにオーバーフロー部分をパッキングして読み込む処理を行う。すなわち、メインメモリ160から外符号エンコーダ139に用意されている1ECCブロック分のメモリに対してブロック長のデータを読み込み、若し、ブロック長のデータに空き領域が有れば、そこにオーバーフロー部分を読み込んでブロック長にデータが詰まるようにする。そして、1ECCブロック分のデータを読み込むと、読み込み処理を一時中断し、外符号エンコーダ139によって外符号のパリティを生成する。外符号パリティは、外符号エンコーダ139のメモリに格納する。外符号エンコーダ139の処理が1ECCブロック分終了すると、外符号エンコーダ139からデータおよび外符号パリティを内符号を行う順序に並び替えて、メインメモリ160のパッキング処理用領域250Aと別の出力用領域250Bに書き戻す。ビデオシャフリング部140は、この外符号の符号化が終了したデータをメインメモリ160へ書き戻す時のアドレスを制御することによって、シンクブロック単位のシャフリングを行う。
【0137】
このようにブロック長データとオーバーフローデータとを分けてメインメモリ160の第1の領域250Aへのデータの書込み(第1のパッキング処理)、外符号エンコーダ139へのメモリにオーバーフローデータをパッキングして読み込む処理(第2のパッキング処理)、外符号パリティの生成、データおよび外符号パリティをメインメモリ160の第2の領域250Bに書き戻す処理が1ECCブロック単位でなされる。外符号エンコーダ139がECCブロックのサイズのメモリを備えることによって、メインメモリ160へのアクセスの頻度を少なくすることができる。
【0138】
そして、1ピクチャに含まれる所定数のECCブロック(例えば32個のECCブロック)の処理が終了すると、1ピクチャのパッキング、外符号の符号化が終了する。そして、インターフェース164を介してメインメモリ160の領域250Bから読出したデータがID付加部148、内符号エンコーダ147、同期付加部150で処理され、並列直列変換部124によって、同期付加部150の出力データがビットシリアルデータに変換される。出力されるシリアルデータがパーシャル・レスポンスクラス4のプリコーダ125により処理される。この出力が必要に応じてディジタル変調され、記録アンプ110を介して、回転ドラム111に設けられた回転ヘッドに供給される。
【0139】
なお、ECCブロック内にヌルシンクと称する有効なデータが配されないシンクブロックを導入し、記録ビデオ信号のフォーマットの違いに対してECCブロックの構成の柔軟性を持たせるようになされる。ヌルシンクは、パッキングおよびシャフリングブロック137のパッキング部137aにおいて生成され、メインメモリ160に書込まれる。従って、ヌルシンクがデータ記録領域を持つことになるので、これをオーバーフロー部分の記録用シンクとして使用することができる。
【0140】
オーディオデータの場合では、1フィールドのオーディオデータの偶数番目のサンプルと奇数番目のサンプルとがそれぞれ別のECCブロックを構成する。ECCの外符号の系列は、入力順序のオーディオサンプルで構成されるので、外符号系列のオーディオサンプルが入力される毎に外符号エンコーダ136が外符号パリティを生成する。外符号エンコーダ136の出力をメインメモリ160の領域252に書込む時のアドレス制御によって、シャフリング部137がシャフリング(チャンネル単位およびシンクブロック単位)を行う。
【0141】
さらに、126で示すCPUインターフェースが設けられ、システムコントローラとして機能する外部のCPU127からのデータを受け取り、内部ブロックに対してパラメータの設定が可能とされている。複数のフォーマットに対応するために、シンクブロック長、パリティ長を始め多くのパラメータを設定することが可能とされている。
【0142】
パラメータの1つとしての”パッキング長データ”は、パッキング部137aおよび137bに送られ、パッキング部137a、137bは、これに基づいて決められた固定枠(図22Aで「シンクブロック長」として示される長さ)にVLCデータを詰め込む。
【0143】
パラメータの1つとしての”パック数データ”は、パッキング部137bに送られ、パッキング部137bは、これに基づいて1シンクブロック当たりのパック数を決め、決められたパック数分のデータを外符号エンコーダ139に供給する。
【0144】
パラメータの1つとしての”ビデオ外符号パリティ数データ”は、外符号エンコーダ139に送られ、外符号エンコーダ139は、これに基づいた数のパリティが発声されるビデオデータの外符号の符号化を行う。
【0145】
パラメータの1つとしての”ID情報”および”DID情報”のそれぞれは、ID付加部148に送られ、ID付加部148は、これらID情報およびDID情報をメインメモリ160から読み出された単位長のデータ列に付加する。
【0146】
パラメータの1つとしての”ビデオ内符号用パリティ数データ”および”オーディオ内符号用パリティ数データ”のそれぞれは、内符号エンコーダ149に送られ、内符号エンコーダ149は、これらに基づいた数のパリティが発生されるビデオデータとオーディオデータの内符号の符号化を行う。なお、内符号エンコーダ149には、パラメータの1つである”シンク長データ”も送られており、これにより、内符号化されたデータの単位長(シンク長)が規制される。
【0147】
また、パラメータの1つとしてのシャフリングテーブルデータがビデオ用シャフリングテーブル(RAM)128vおよびオーディオ用シャフリングテーブル(RAM)128aに格納される。シャフリングテーブル128vは、ビデオシャフリング部137bおよび140のシャフリングのためのアドレス変換を行う。シャフリングテーブル128aは、オーディオシャフリング137のためのアドレス変換を行う。
【0148】
次に、符号量計測部560での処理について説明する。符号量計測器530では、入力されたエレメンタリストリームについて、等長化単位の区切りに対応するスタートコード間のデータ量を調べることで、符号量を知ることができる。この実施の第一の形態では、1GOP=1ピクチャとされているので、GOPヘッダ6から次のGOPヘッダ6までのクロックを調べることで、等長化単位の符号量を知ることができる。
【0149】
上述したように、SDTI受信部108では、エレメンタリストリームを出力する際に、エレメンタリストリームの有効期間に対応したイネーブル信号ENを共に出力している。符号量計測器530では、実際には、このイネーブル信号ENの長さによって等長化単位の符号量が調べられる。例えばデータ幅が8ビット(1バイト)であるとき、イネーブル信号ENが有効期間を表す状態(”H”状態)のクロック数を調べることで、符号量をバイト数で知ることができる。
【0150】
図25および図26を用いて、イネーブル信号ENによる符号量計測についてより説明する。図25は、SDTI受信部108と記録側MFC106との間のインターフェイスを概略的に示す。図26は、SDTI受信部108と記録側MFC106との間でやりとりされる信号の一例のタイムチャートを示す。なお、図25では、説明のため、符号量計測部560が記録側MFC106に内蔵されているものとする。
【0151】
SDTI受信部108と記録側MFC106との間は、記録側MFC106からSDTI受信部108にリクエスト信号RQを送るリクエスト信号線と、SDTI受信部108からSDTI受信部108にイネーブル信号ENおよびビットストリームを送るイネーブル信号EN付きビットストリーム線とで接続される。リクエスト信号RQは、例えば”H”状態で、SDTI受信部108に対してMPEG ESの出力を要求し、”L”状態で、出力の停止を要求する信号である。
【0152】
上述したように、記録側MFC106からのリクエスト信号RQに基づき、SDTI受信部108からMPEG ESおよびイネーブル信号ENが出力される。
【0153】
先ず、SDTI受信部108に入力されるストリームがフレーム毎に分離されており、SDTI受信部108においてフレーム境界(フレーム長さ)の判別が可能な場合について説明する。入力端子107に入力されたMPEG ESからSDTI受信部108で抜き出された同期信号に基づき、タイミングジェネレータ104で、フレーム同期信号が生成される。このフレーム同期信号が記録側MFC106に供給される。
【0154】
フレーム同期信号に基づき、記録系MFC106からSDTI受信部108に対して、リクエスト信号RQが送信される。SDTI受信部108では、このリクエスト信号RQの受信から、SDTI受信部108内での処理に必要な所定クロック(例えば2クロック)遅れて、イネーブル信号ENが”H”状態とされると共に、1フレーム分のビットストリーム(MPEG ES)が出力される。ビットストリームは、記録側MFC106のバッファに溜め込まれ、簡易的にデコードされてフレームの後端が検出される。
【0155】
例えば、1ピクチャ=1GOPとなっているこの実施の第1の形態では、GOPヘッダ6の後に来るスライスの個数と、最後のスライスに含まれるマクロブロックの個数を調べることで、フレーム後端を検出することができる。また、単にマクロブロックの個数を調べるようにしても良い。
【0156】
フレームの終端が検出されると、記録側MFC106からSDTI受信部108に対して送られるリクエスト信号RQが解除される。これを受けて、所定クロック遅れて、SDTI受信部108からのMPEG ESの出力が停止されると共に、イネーブル信号ENが解除され”L”状態にされる。符号量計測部560では、このイネーブル信号ENが”H”状態の期間のクロック数を計測することで、1フレーム分すなわち等長化単位の符号量を知ることができる。
【0157】
SDTI受信部108に入力されるストリームがフレーム毎に分離されていない場合について説明する。この場合、SDTI受信部108では、フレームの境界を知ることができないため、MPEG ESは、フレームとは無関係に、連続的に出力され、記録側MFC106のバッファに溜め込まれる。最初のフレームでは、記録側MFC106において、バッファに溜め込まれたMPEG ESがデコードされ、フレームの後端が検出されると、SDTI受信部108に対してリクエスト信号RQが”L”状態とされ、MPEG ESの出力停止が要求される。
【0158】
この要求に対して、SDTI受信部108では、上述したように、所定クロックの遅れを以て実際のストリーム出力が停止される。そのため、記録側MFC106では、バッファに溜め込まれたストリームの処理が終了してバッファからストリームが掃き出されないうちに、次のフレームのストリームが入力されることになる。
【0159】
すなわち、記録側MFC106において、バッファに最初に溜め込まれたフレームの後端が検出されると、SDTI受信部108に対して、ストリームの出力の停止を要求するリクエスト信号RQが送られると共に、そのフレームのストリームがバッファから掃き出される。送られたリクエスト信号RQによりストリームの出力が停止されるまでの間に供給された、次フレームのストリームが、バッファに溜め込まれる。
【0160】
記録側MFC106により、フレーム同期信号に基づきSDTI受信部108にリクエスト信号RQが送られ、次フレームのストリームが要求される。この要求により、前回のリクエスト信号RQによるストリーム出力停止で途切れた部分の続きのストリームがSDTI受信部108から出力され、記録側MFC106のバッファに溜め込まれる。記録側MFC106で、前回の要求で溜め込まれバッファに残っているストリームと、今回の要求でバッファに溜め込まれたストリームとがあわせて処理され、フレーム後端が検出される。
【0161】
フレーム後端が検出されると、上述と同様にして、記録側MFC106からSDTI受信部108に対して、ストリーム出力停止を要求するリクエスト信号RQが送られる。SDTI受信部108では、同様にして、所定クロック遅れてストリーム出力が停止され、記録側MFC106のバッファには、その次のフレームのストリームが所定クロック分溜め込まれる。この処理は、SDTI受信部108に対するストリームの入力が終了するまで繰り返されることになる。
【0162】
イネーブル信号ENは、ビットストリームと共に伝送され、ビットストリームの有効期間を示す。上述のようにして処理が繰り返されることにより、イネーブル信号ENの”H”状態の期間は、実質的に、SDTI受信部108から出力されるストリームの1フレーム期間と等しくなる。したがって、符号量計測部560でイネーブル信号ENの長さを計測することで、1フレーム分すなわち等長化単位の符号量を知ることができる。
【0163】
但し、この場合において、SDTI受信部108に供給されるストリームの最初のフレームは、イネーブル信号ENが1フレームより、所定クロック分、長くなり、最終フレームでは、所定クロック分、短くなる。
【0164】
なお、等長化単位の符号量の計測方法は、上述した方法に限られない。例えば、MPEG ESの各ヘッダを検出し、sequence_header_code、group_of_pictures_start_codeまたはpicture_start_codeから、次フレームのsequence_end_codeまでの長さを計測するようにしてもよい。同様に、sequence_header_code、group_of_pictures_start_codeまたはpicture_start_codeから、次フレームのsequence_header_code、group_of_pictures_start_codeまたはpicture_start_codeまでの長さを計測するようにもできる。これらの方法では、ヘッダ情報はバイト毎に整列されている単位なので(図16A参照)、可変長符号の復号を行う必要がない。各start_codeを検出するためのパターンマッチング手段と、クロックを計測するカウンタがあればよい。
【0165】
また、ストリームの入力時に、スタッフィングが取り除かれることがある。この場合には、削除されたスタッフィングは計測せずに、有効な記録情報量だけが抽出されるようにする。すなわち、記録されるべき符号量だけが計測されるようにする。
【0166】
ストリームからシーケンスヘッダ2のパラメータを抽出してbit_rate_valueを調べることも考えられるが、bit_rate_valueは、ピクチャ単位あるいはGOP単位の符号量を規定するものではないことと、上述のスタッフィングも含まれたビットレートであることから、好ましくない。
【0167】
次に、この発明の実施の第2の形態について説明する。この実施の第2の形態では、等長化単位の符号量が規定の量を超えたフレームを、例えばブラック表示やグレー表示を行うような、符号量の少ないフレームと差し替える。このとき、ピクチャヘッダ9におけるpicture_coding_typeをIピクチャを示す値に、マクロブロックヘッダ14におけるmacroblock_typeを「Intra」を示す値に、それぞれ変更する。さらに、そのフレームの全てのマクロブロックにおいて、DC成分をブラックやグレーを表す値とし、AC成分を0とする。
【0168】
このように、符号量が等長化単位に規定された符号量を超過したフレームを、予め決められた別のフレームで置き換えることによって、シンタクスエラーを回避すると共にテープフォーマットを遵守しながら、ストリームの連続性を維持することができる。
【0169】
なお、符号量が等長化単位に規定された符号量を超過したフレームを、ブラックやグレーを表示するフレームで置き換えるのは、これらが最も符号量が小さくなる画像パターンだからである。すなわち、色情報を持たない無彩色の単一画像を表示するフレームが符号量が少ないと考えられる。等長化単位の符号量が、等長化単位に対して規定された符号総量よりも小さくなる画像パターンであれば、他のものでも適用できる。
【0170】
図27は、この実施の第2の形態によるVTRの基本的な構成を示す。なお、図27において、上述した図3と共通する部分には同一の符号を付し、詳細な説明を省略する。この図27の構成では、上述した図3の構成に対して、符号量計測部560においてストリーム発生器532と、スイッチ回路533とが追加されている。
【0171】
ストリーム発生器532は、例えばブラックが表示されるようなストリームを発生し、出力する。スイッチ回路533は、符号量計測器530の計測結果に基づきメモリ531およびストリーム発生器532の出力を切り換えて、ECCエンコーダ514に供給する。端子512から入力されたストリームは、メモリ531に溜め込まれると共に、符号量計測器530に供給され、上述した実施の第1の形態のようにして等長化単位の符号量が計測される。メモリ531は、メモリ531に溜め込まれたストリームが、符号量計測器530による対応するストリームの符号量の計測が終了するまで出力されないように、制御される。
【0172】
計測された符号量が規定値を超えていなければ、スイッチ回路533でメモリ531側が選択され、メモリ531に溜め込まれているストリームが読み出される。メモリ531から読み出されたストリームは、スイッチ回路533およびスイッチ回路513を介してECCエンコーダ514に供給される。
【0173】
一方、符号量計測器530で計測された符号量が規定値を超えていれば、スイッチ回路533でストリーム発生器532側が選択され、ストリーム発生器532で発生されたブラックやグレーのストリームがスイッチ回路533およびスイッチ回路513を介してECCエンコーダ514に供給される。
【0174】
ストリーム発生器532は、例えば、メモリを有し、このメモリに、ブラックを表すマクロブロックまたはDCTブロックのデータや、各ヘッダ情報が予め格納される。このメモリに格納されたデータをクロックに従い順に読み出すことで、ストリーム発生器532からブラックを表すストリームを出力することができる。これに限らず、所定の手順に従って順次データを出力し、ブラックを表すストリームを出力するようにしてもよい。
【0175】
次に、この発明の実施の第3の形態について説明する。この実施の第3の形態では、等長化単位の符号量が規定の量を超えたフレームを、例えばMPEG2における前方参照を行うPピクチャのフレームに置き換える。等長化単位の符号量が規定の量を超えたフレームのストリームにおいて、ピクチャヘッダ9のpicture_coding_typeをPピクチャに変更し、全てのマクロブロックを前方参照差分=0、すなわちMC(Motion Compensation)=0、MV(Motion Vector)=0、Not Codedとする。
【0176】
このように、符号量が等長化単位に規定された符号量を超過したフレームを、前方参照を行うフレームで置き換えることによって、シンタクスエラーを回避すると共にテープフォーマットを遵守しながら、ストリームの連続性を維持することができる。さらに、置き換えられたフレームで形成される画像は、前方参照を行い形成されるので、元の画像と大きく異なることもない。
【0177】
この実施の第3の形態では、上述した図27の、実施の第2の形態の構成をそのまま適用することができる。ここで、ストリーム発生器532は、メモリを有し、このメモリに、上述した、ピクチャヘッダ9のpicture_coding_typeがPピクチャを示す値とされ、全てのマクロブロックが前方参照=0を示す値とされたフレームのストリームが予め記憶される。
【0178】
端子512から入力されたストリームは、メモリ531に溜め込まれると共に、符号量計測器530に供給され、上述した実施の第1の形態のようにして等長化単位の符号量が計測される。メモリ531は、メモリ531に溜め込まれたストリームが、符号量計測器530による対応するストリームの符号量の計測が終了するまで出力されないように、制御される。
【0179】
計測された符号量が規定値を超えていなければ、スイッチ回路533でメモリ531側が選択され、メモリ531に溜め込まれているストリームが読み出され、スイッチ回路533およびスイッチ回路513を介してECCエンコーダ514に供給される。一方、符号量計測器530で計測された符号量が規定値を超えていれば、スイッチ回路533でストリーム発生器532側が選択され、ストリーム発生器532で発生されたPピクチャのストリームがスイッチ回路533およびスイッチ回路513を介してECCエンコーダ514に供給される。
【0180】
なお、この実施の第3の形態は、picture_coding_typeとしてIピクチャしか許されない機器には適用できない。
【0181】
次に、この発明の実施の第4の形態について説明する。この実施の第4の形態では、等長化単位の符号量が規定の量を超えたフレームを、等長化単位の符号量が規定値を超えないことが既に確認されている、当該フレームよりも時間的に前のフレームのストリームで置換する。
【0182】
図28は、この実施の第4の形態によるVTRの基本的な構成を示す。なお、図28において、上述した図3と共通する部分には同一の符号を付し、詳細な説明を省略する。この図28の構成では、上述した図3の構成に対して、符号量計測部560においてメモリ540と、スイッチ回路541とが追加されている。
【0183】
端子512から入力されたストリームは、メモリ531に溜め込まれると共に、符号量計測器530に供給され、上述した実施の第1の形態のようにして等長化単位の符号量が計測される。メモリ531は、メモリ531に溜め込まれたストリームが、符号量計測器530による対応するストリームの符号量の計測が終了するまで出力されないように、制御される。
【0184】
符号量計測器530による計測の結果、等長化単位の符号量が規定値を超えていないとされれば、メモリ531から対応するストリームが読み出され、メモリ540に溜め込まれる。それと共に、スイッチ回路541でメモリ531側が選択され、メモリ531から読み出されたストリームは、スイッチ回路533およびスイッチ回路513を介してECCエンコーダ514に供給される。
【0185】
一方、符号量計測器530で計測された符号量が規定値を超えていれば、スイッチ回路533でメモリ540側が選択され、メモリ540に溜め込まれた過去のフレーム(前フレーム)のストリームが読み出され、スイッチ回路540およびスイッチ回路513を介してECCエンコーダ514に供給される。
【0186】
この実施の第4の形態によれば、計測の結果、等長化単位の符号量が規定値を越えていないストリームでフレーム単位で、メモリ540が更新される。そして、符号量が等長化単位に規定された符号量を超えたストリームがメモリ540に溜め込まれたストリームで置き換えられる。こうすることで、シンタクスエラーを回避すると共にテープフォーマットを遵守しながら、ストリームの連続性を維持することができる。さらに、符号量が等長化単位に規定された符号量を超えたストリームのフレームが、最も近い過去のフレームで置き換えられるため、形成される画像が元の画像と大きく異なることもない。
【0187】
次に、この発明の実施の第5の形態について説明する。この実施の第5の形態では、等長化単位の符号量が規定の量を超えたフレームに対し、各マクロブロックのDCT係数の高次成分を削除する。これにより、当該フレームの符号量を等長化単位の規定値以下に抑えることができる。
【0188】
図29は、この実施の第5の形態によるVTRの基本的な構成を示す。なお、図29において、上述した図3と共通する部分には同一の符号を付し、詳細な説明を省略する。この図29の構成では、上述した図3の構成に対して、符号量計測部560においてローパスフィルタ(LPF)550と、スイッチ回路551とが追加されている。LPF550は、DCT係数の高次成分を所定に削除するものである。
【0189】
端子512から入力されたストリームは、メモリ531に溜め込まれると共に、符号量計測器530に供給され、上述した実施の第1の形態のようにして等長化単位の符号量が計測される。メモリ531は、メモリ531に溜め込まれたストリームが、符号量計測器530による対応するストリームの符号量の計測が終了するまで出力されないように、制御される。
【0190】
符号量計測器530による計測の結果、等長化単位の符号量が規定値を超えていないとされれば、スイッチ回路551でメモリ531側が選択され、メモリ531から読み出されたストリームがスイッチ回路551およびスイッチ回路513を介してECCエンコーダ514に供給される。
【0191】
一方、符号量計測器530で計測された符号量が規定値を超えていれば、スイッチ回路551でLPF550側が選択される。メモリ531から読み出されたMPEG ESがLPF550に供給され、DCT係数の高次成分を所定に削除され、等長化単位の符号量が規定値以下に抑えられる。LPF550から出力されたMPEG ESは、スイッチ回路551およびスイッチ回路513を介してECCエンコーダ514に供給される。
【0192】
上述した、LPF550でのDCT係数の高次成分の削除方法としては、次の2通りが考えられる。
(1)フレーム中の全マクロブロックについて、所定次数以上のDCT係数を全て削除する。すなわち、DCT係数において周波数制限を行う。
(2)原則として、フレーム中の全マクロブロックについて、最高次のDCT係数を全て削除する。このとき、所定次数以下のDCT係数は、削除しない。
【0193】
上述の(2)の最高次のDCT係数を全て削除する方法で、所定次数以下のDCT係数を保護しているのは、フラットな画像などの、周波数成分が少ない画像を保護するためである。
【0194】
図30は、LPF550の構成の例を示す。図30Aは、入力されたストリームの可変長符号を復号化してDCT係数の高次成分を削除する一例の構成を示す。図30Aにおいて、入力されたMPEG ESの可変長符号が可変長符号復号器555で復号され、DCT係数が抜き出される。抜き出されたDCT係数に対して、上述した(1)の所定次数以上のDCT係数を全て削除する処理、あるいは、(2)の所定次数以下の係数を残しつつ最高次数のDCT係数を全て削除する処理が行われ、DCT係数の高次成分が削除される。DCT係数の高次成分が削除されたストリームは、可変長符号符号化器556に供給され、可変長符号化され、MPEG ESとされて出力される。
【0195】
図30Bは、入力されたストリームの可変長符号を分解してDCT係数の高次成分を削除する一例の構成を示す。入力されたMPEG ESの可変長符号が可変長符号分解器557で符号語に分解され、符号と符号長とが出力される。この符号と符号長とに基づき、所定次数以上のDCT係数、あるいは、最高次数のDCT係数および所定次数以下の係数の位置が判別され、それらが削除される。そして、(1)所定次数以上のDCT係数あるいは(2)所定次数以下の係数が残されつつ最高次数のDCT係数が削除されたストリームは、可変長符号接続器558に供給され、可変長符号が再接続され、MPEG ESとされて出力される。
【0196】
ここで、DCT係数の削除は、メモリを利用して行うことができる。例えば、図30Aの構成を例にとると、可変長符号復号器555で復号された出力は、メモリ上に展開される。そして、このメモリから可変長符号符号化器556によりデータが読み出される際に、所定にアドレス制御することにより、削除すべき次数以外のDCT係数を読み出すようにする。読み出されたDCT係数は、可変長符号符号化器556に供給され、可変長符号化されMPEG ESとされる。メモリを利用したこの処理は、図30Bの構成でも同様に適用することができる。
【0197】
なお、図30Aおよび図30Bで説明したLPF550の構成および動作は、記録側MFC106を制御して実現することができる。
【0198】
この実施の第5の形態によれば、可変長符号の復号化や分解を行い、それを再度符号化または接続する必要があるが、全画面から一様に情報が省略されるため、画面の特定の箇所に歪みが生じることがない。
【0199】
上述では、この発明がMPEG方式で圧縮符号化されたストリームに適用された場合について説明したが、これはこの例に限定されない。例えばJPEG(Joint Photographic Experts Group)のような、他の方式で圧縮符号化されたストリームが入力される機器に対して、この発明を広く適用させることができる。
【0200】
また、上述では、この発明がMPEG ESを記録媒体に記録する記録再生装置に適用されるように説明したが、これはこの例に限定されない。この発明は、記録再生装置に限らず、圧縮符号化されたストリームを扱う映像、音響機器に対して、広く適用することができる。
【0201】
さらに、上述では、記録媒体を磁気テープであるとして説明したが、これはこの例に限定されない。例えば、MO(Magneto-Optical)ディスクのようなディスク状記録媒体の場合でも、この発明を適用することができる。また、これに限らず、可変長符号でエンコードされたストリームを、等長化単位で規定された符号量で記録媒体に記録する記録機器であれば、例えばディスクレコーダやRAM(Random Access Memory)レコーダなどの、他の記録媒体を用いた記録機器にも適用することができる。
【0202】
さらにまた、上述では、この発明がビデオ信号を圧縮符号化したストリームを扱う記録再生装置に適用された場合について説明したが、これはこの例に限定されない。例えば、AC−3(Audio Code Number 3)、AAC(Advanced Audio Coding)、dts(Digital Theater Systems)、ATRAC(Adaptive Transform Acoustic Coding)といった、音声圧縮技術を用いた音響記録装置に、この発明の原理を適用することが可能である。
【0203】
また、上述では、入力されたMPEG ESにおいて等長化単位の符号量が規定値を超えているときに、記録の停止、ストリームの差し替えまたはDCT係数の削除を行うように説明したが、これはこの例に限定されるものではない。例えば、入力されたMPEG ESにおいて等長化単位の符号量が規定値を超えていても、記録媒体にはそのまま記録し、その際に、記録媒体の所定の領域、例えばシステム領域にその旨を記録するようにしても良い。この場合、この記録媒体を再生する際に、再生機側で、符号量が規定値を超えた等長化単位のストリームに対して所定の処理が施される。
【0204】
さらに、エンコーダがベースバンド信号をエンコードする際に等長化が行えないような場合に、この発明を適用することによって、エンコーダの能力不足を救済することができる。
【0205】
【発明の効果】
以上説明したように、この発明は、可変長符号を用いてエンコードされたストリームを、所定単位で等長化して記録媒体に記録する際に、入力されたストリームの等長化単位の符号量を計測し、計測された符号量が所定量以上である場合に対処可能とされている。そのため、規定のビットレートを超えるストリームが入力された場合でも、記録回路の破綻、記録媒体の破綻すなわち記録媒体上の記録フォーマットの破綻、再生画像における重大な画像の乱れ、不正な記録媒体の作成などのトラブルを防止できるという効果がある。
【0206】
また、エンコーダがベースバンド信号をエンコードする際に等長化が行えないような場合に、この発明を適用することによって、エンコーダの能力不足を救済することができるという効果がある。
【図面の簡単な説明】
【図1】磁気テープを記録媒体としてベースバンド信号の記録、再生を行うVTRの基本的な構成を示すブロック図である。
【図2】ビデオ信号がMPEG2方式でエンコードされたストリームの記録、再生を行うVTRの基本的な構成を示すブロック図である。
【図3】この発明の実施の第1の形態によるVTRの基本的な構成を示すブロック図である。
【図4】MPEG2のデータの階層構造を概略的に示す略線図である。
【図5】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図6】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図7】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図8】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図9】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図10】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図11】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図12】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図13】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図14】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図15】MPEG2のストリーム中に配されるデータの内容とビット割り当てを示す略線図である。
【図16】データのバイト単位の整列を説明するための図である。
【図17】MPEGストリームのヘッダを具体的に示す略線図である。
【図18】この発明に適用可能な記録再生装置の構成の一例を示すブロック図である。
【図19】磁気テープ上に形成されるトラックフォーマットの一例を示す略線図である。
【図20】ビデオエンコーダの出力の方法と可変長符号化を説明するための略線図である。
【図21】ビデオエンコーダの出力の順序の並び替えを説明するための略線図である。
【図22】順序の並び替えられたデータをシンクブロックにパッキングする処理を説明するための略線図である。
【図23】ECCエンコーダのより具体的な構成を示すブロック図である。
【図24】メインメモリのアドレス構成の一例を示す略線図である。
【図25】SDTI受信部と記録側MFCとの間のインターフェイスを概略的に示すブロック図である。
【図26】SDTI受信部と記録側MFCとの間でやりとりされる信号の一例のタイムチャートを示す。
【図27】この発明の実施の第2および第3の形態によるVTRの基本的な構成を示すブロック図である。
【図28】この発明の実施の第4の形態によるVTRの基本的な構成を示すブロック図である。
【図29】この発明の実施の第5の形態によるVTRの基本的な構成を示すブロック図である。
【図30】LPFの構成の例を示すブロック図である。
【符号の説明】
1・・・シーケンスヘッダコード、2・・・シーケンスヘッダ、3・・・シーケンス拡張、4・・・拡張およびユーザデータ、5・・・GOPスタートコード、6・・・GOPヘッダ、7・・・ユーザデータ、8・・・ピクチャスタートコード、9・・・ピクチャヘッダ、10・・・ピクチャ符号化拡張、11・・・拡張およびユーザデータ、12・・・スライススタートコード、13・・・スライスヘッダ、14・・・マクロブロックヘッダ、101・・・SDI受信部、102・・・MPEGエンコーダ、106・・・記録側マルチフォーマットコンバータ(MFC)、108・・・SDTI受信部、109・・・ECCエンコーダ、112・・・磁気テープ、113・・・ECCデコーダ、114・・・再生側MFC、115・・・SDTI出力部、116・・・MPEGデコーダ、118・・・SDI出力部、137a,137c・・・パッキング部、137b・・・ビデオシャフリング部、139・・・外符号エンコーダ、140・・・ビデオシャフリング、149・・・内符号エンコーダ、530・・・符号量計測器、531,540・・・メモリ、532・・・ストリーム発生器、550・・・LPF、560・・・符号量計測部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a recording apparatus and method for recording a data stream on a recording medium with the same length in a predetermined unit.
[0002]
[Prior art]
As represented by a digital VTR (Video Tape Recorder), a data recording / reproducing apparatus for recording a digital video signal and a digital audio signal on a recording medium and reproducing from the recording medium is known. Since a digital video signal has an enormous data capacity, it is generally compressed and encoded by a predetermined method and recorded on a recording medium. In recent years, MPEG2 (Moving Picture Experts Group 2) system is known as a standard system for compression coding.
[0003]
In the above-described image compression technology such as MPEG2, the data compression rate is increased by using a variable length code. Therefore, the code amount after compression of data per screen, for example, one frame or one field varies depending on the complexity of the image to be compressed.
[0004]
In the MPEG2 system described above, the slice layer is a variable length coding unit in data having a hierarchical structure from the lower layer to the upper layer in the order of the macroblock layer, slice layer, picture layer, GOP layer, and sequence layer. The macroblock layer further includes a plurality of DCT (Discrete Cosine Transform) blocks. A header portion for storing header information is provided at the head of each layer. For example, in the slice layer, the delimiter position of the variable length code is detected by detecting this header portion. The decoder that decodes the variable-length code decodes the variable-length code based on the detected delimiter position.
[0005]
For example, in MPEG2, the data arrangement defined by the standard is referred to as syntax.
[0006]
On the other hand, various image data formats are conceivable depending on the combination of the image size and the frame frequency, the scanning method, and the like. In video equipment for broadcasting or production, a predetermined restriction is generally given to the format of image data to be handled. The above-mentioned MPEG2 standard is considered to be able to flexibly cope with such various image formats.
[0007]
By the way, when a video signal input as a baseband signal is encoded as described above and recorded on a recording medium such as a magnetic tape, a stream is set in a predetermined unit, for example, a frame unit by an encoder of the device. Is isometric. The unit of equal length varies depending on the configuration of the recording apparatus. In addition to this, for example, one field and a plurality of frames can be set as the equal length unit. Hereinafter, it is assumed that equalization is performed in units of frames. The recording area on the recording medium is divided into a size corresponding to the length of the equal length, and the equal length stream is sequentially recorded in this area.
[0008]
In this way, by processing the variable-length encoded stream to the same length and recording it on the recording medium, it becomes possible to easily perform processing in units of frames for the video signal.
[0009]
Further, by recording the stream on the recording medium in equal length units, the recording medium is consumed in proportion to the recording time in which the equal length units are recorded. Therefore, it is possible to easily obtain an accurate value of the total recording amount (recording time) and the remaining amount of the recording medium, and to easily find a head by a high-speed search. Furthermore, there is an advantage that stabilization can be achieved by keeping the magnetic tape that is dynamically driven at a constant speed, such as when the recording medium is a magnetic tape.
[0010]
[Problems to be solved by the invention]
However, when the input stream is recorded with the same length, there is no guarantee that the equal length unit, that is, the code amount for each frame is within the upper limit of the length of the equal length. If this recording device records the stream for each frame in the order of input, the limit of the code amount (equalization amount) specified for equalization of the encoding amount of a certain frame. In the case of exceeding the frame length, only the equal length capacity is recorded in the stream of the frame, and the subsequent codes are divided.
[0011]
If the frame stream is divided in this way, there is a problem in that the lower end of the screen is lost in the reproduced image of the frame. Further, if the frame stream is divided and the frame does not end normally, a syntax error may occur at the boundary with the next frame during reproduction. There is a problem that syntax errors may cause runaway or hang-up of a decoder to which the stream is input.
[0012]
Furthermore, a recording device with low error tolerance designed on the assumption that the input stream is made to be the same length can fail at the stage of recording a stream that exceeds the upper limit of the length. There is sex. That is, there is a problem in that a code overflowing from the equalized amount enters the area of the next frame, and the capacity and recording position of the next frame are compressed by the overflowing code. As a result, the meaning of equalizing the area on the recording medium is lost.
[0013]
Furthermore, if the situation where the next frame in which the capacity and the recording position are compressed further compresses the next frame is repeated, there is a possibility that the recording system memory may eventually overflow. It was.
[0014]
Therefore, an object of the present invention is not to record a stream in which the code amount of the equal length unit exceeds the upper limit of the equal length when the variable length coded stream is recorded in a predetermined equal length unit. It is an object of the present invention to provide a recording apparatus and method.
[0015]
[Means for Solving the Problems]
  In order to solve the above-described problem, the present invention provides a recording apparatus for recording a stream encoded using a variable length code on a recording medium in a predetermined equal length unit.
  Input means for receiving a stream encoded using a variable-length code;
  The stream input to the input means is recorded on a recording medium in a predetermined equal length unit.FirstRecording means;
  Measuring means for measuring the code amount of a predetermined equal length unit of the stream input to the input means;
  Based on the measurement result of the measuring means, the code amount of the predetermined equal length unit of the input stream exceeds the total code amount defined for the predetermined equal length unit.The stream within the total code amount specified for the predetermined equalization unit and the total code amount specified for the predetermined equalization unit.streamWhenTheA stream that exceeds the total code amount defined for the first equalization unit and the predetermined equalization unit is read out separately and recorded in the second recording means, and is defined for the predetermined equalization unit. A second packing process that reads a stream that is smaller than the total code amount and that exceeds the total code amount defined for a predetermined equal-length unit in an area in which a free space has occurred; When reading is performed, reading is temporarily interrupted, parity of the outer code is generated, and write-back processing is performed to write back the second packed data and the parity of the outer code to the first recording unit.Control means and
It is a recording device characterized by having.
[0016]
  Further, the present invention provides a recording method for recording a stream encoded using a variable length code on a recording medium in a predetermined equal length unit.
  An input step in which a stream encoded using a variable length code is input;
  A measurement step for measuring a code amount of a predetermined equal length unit of the stream input in the input step;
  If the code amount of a predetermined equal length unit of the input stream exceeds the total code amount specified for the predetermined equal length unit, the code specified for the predetermined equal length unit A first packing step of separately recording a stream in the total amount and a stream exceeding a total code amount defined for a predetermined equal length unit in a recording unit;
  A stream that exceeds the total code amount specified for the predetermined equalization unit is read, and the predetermined code is added to the area where the free space area is smaller than the total code amount specified for the predetermined equalization unit. A second packing step for reading a stream that exceeds the total code amount defined for the lengthening unit;
  When a stream of a block of a predetermined unit is read, the reading is temporarily interrupted, the parity of the outer code is generated, and the second packed data and the parity of the outer code are written back to the recording means. Step back and
It is a recording method characterized by having.
[0017]
  As described above, the present invention records a stream encoded using an input variable length code on a recording medium in a predetermined equal length unit,If the code amount of a predetermined equal length unit of the input stream exceeds the total code amount specified for the predetermined equal length unit, the code specified for the predetermined equal length unit The stream within the total amount and the stream exceeding the total code amount specified for the predetermined equal length unit are separately recorded on the recording means, and the total code amount specified for the predetermined equal length unit is recorded. The excess stream is read, and is smaller than the total code amount specified for the predetermined equalization unit, and exceeds the total code amount specified for the predetermined equalization unit in the area where the free space is generated. When the stream is read and the stream of a predetermined unit block is read, the reading is temporarily interrupted, the parity of the outer code is generated, and the second packed data and the parity of the outer code are recorded. Write on ToTherefore, when a stream having a bit rate exceeding a specified value is input, unauthorized recording on the recording medium can be prevented.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
The concept of the present invention will be described below with reference to FIGS. FIG. 1 shows a basic configuration of a digital VTR (Video Tape Recorder) that records and reproduces a baseband signal using a magnetic tape as a recording medium. At the time of recording, a baseband signal that is an uncompressed digital video signal is input from a terminal 500. The baseband signal is supplied to an ECC (Error Correction Coding) encoder 511. The baseband signal supplied to the ECC encoder 501 is subjected to shuffling and error correction encoding processing, is recorded and encoded by the recording amplifier 502, is supplied to a rotating head (not shown), and is recorded on the magnetic tape 503 by the rotating head. The
[0019]
At the time of reproduction, a reproduction signal reproduced from the magnetic tape 503 by the rotary head is supplied to the reproduction amplifier 504 and decoded into a digital signal. The output of the reproduction amplifier 504 is supplied to the ECC decoder 505, where the error correction code is decoded and error corrected and deshuffled. The baseband signal output from the ECC decoder 505 is derived to the terminal 506.
[0020]
FIG. 2 shows a basic configuration of a digital VTR that records and reproduces a stream in which a video signal is encoded by the MPEG2 system. At the time of recording, a baseband signal is input from the terminal 510 and supplied to the MPEG encoder 511. The MPEG encoder 511 encodes the supplied baseband signal in a predetermined MPEG2 format and outputs it as a stream. The stream output from the MPEG encoder 511 is supplied to one input terminal of the selector 513. In addition, a stream encoded in advance in the MPEG2 system is input from a terminal 512. This stream is supplied to the other input terminal of the selector 513.
[0021]
In the selector 513, a stream supplied to one and the other input terminals is selected in advance and supplied to the ECC encoder 514. The stream is subjected to predetermined shuffling and error correction encoding processing by the ECC encoder 514, recording encoded by the recording amplifier 515, supplied to a rotating head (not shown), and recorded on the magnetic tape 516.
[0022]
At the time of reproduction, a reproduction signal reproduced from the magnetic tape 516 by the rotary head is supplied to the reproduction amplifier 517 and decoded into a digital signal. The output of the reproduction amplifier 517 is supplied to the ECC decoder 518, where the error correction code is decoded and error-corrected and deshuffled to obtain an MPEG2 stream. The stream output from the ECC decoder 518 is also supplied to the MPEG decoder 520. The stream supplied to the MPEG decoder 520 is decoded into a baseband signal and led to the terminal 521.
[0023]
In this way, if the video signal between devices can be transmitted as a stream, the same number of images can be transmitted with a smaller amount of information than the baseband signal. In contrast to the baseband connection that repeatedly deteriorates and compresses data every time data is transmitted and causes deterioration in image quality, image information can be transmitted without deterioration in image quality if stream connection is used. If the image is not processed, it can be said that the stream connection is more advantageous than the baseband connection.
[0024]
FIG. 3 shows a basic configuration of a VTR according to the present invention. In FIG. 3, the same reference numerals are given to portions corresponding to the configuration of FIG. 2 described above, and detailed description thereof is omitted. In FIG. 3, a code amount measuring device 530 for measuring the code amount of equal length units in the input stream and a memory 531 are added to the configuration of FIG. The stream input from the terminal 512 is also supplied to the memory 531 and the code amount measuring device 530, and the code amount measuring device 530 measures the code amount of an equal length unit, for example, one frame.
[0025]
If the code amount measured by the code amount measuring device 530 exceeds a predetermined value specified for the equal length unit, the code amount measuring device 530 sends the stream to the magnetic tape 516. A control signal for controlling recording is output. In the example of FIG. 3, this control signal is supplied to the recording amplifier 515 ', and the output of the recording RF signal is stopped. Furthermore, the recording operation itself may be stopped by supplying a control signal to a servo circuit (not shown).
[0026]
In this way, by measuring the code amount of the equal length unit of the input stream on the input side and controlling the recording based on the measurement result, the stream whose code amount of the equal length unit is equal to or greater than the specified amount Is prevented from being recorded on the recording medium.
[0027]
The memory 531 is provided to prevent the input stream from being recorded on the magnetic tape 516 before the measurement result by the code amount measuring device 530 is obtained. For example, the memory 531 is not necessary if a sufficient delay can be obtained by the processing in the ECC encoder 514.
[0028]
Next, an example in which the first embodiment is applied to a digital VTR will be described. This digital VTR is suitable for use in a broadcast station environment, and enables recording / reproduction of video signals of a plurality of different formats.
[0029]
Note that the application example of the first embodiment described below can be similarly applied to the second to fifth examples described later.
[0030]
In the first embodiment, for example, the MPEG2 system is adopted as the compression system. MPEG2 is a combination of motion compensation predictive coding and compression coding by DCT. The data structure of MPEG2 has a hierarchical structure. FIG. 4 schematically shows a hierarchical structure of a general MPEG2 data stream. As shown in FIG. 4, the data structure includes, from the bottom, the macroblock layer (FIG. 4E), the slice layer (FIG. 4D), the picture layer (FIG. 4C), the GOP layer (FIG. 4B), and the sequence layer (FIG. 4A). It has become.
[0031]
As shown in FIG. 4E, the macroblock layer is composed of DCT blocks that are units for performing DCT. The macroblock layer is composed of a macroblock header and a plurality of DCT blocks. As shown in FIG. 4D, the slice layer includes a slice header part and one or more macroblocks. As shown in FIG. 4C, the picture layer is composed of a picture header part and one or more slices. A picture corresponds to one screen. As shown in FIG. 4B, the GOP layer includes a GOP header part, an I picture that is a picture based on intra-frame coding, and a P and B picture that are pictures based on predictive coding.
[0032]
An I picture (Intra-coded picture) uses information that is closed only in one picture when it is encoded. Therefore, at the time of decoding, it can be decoded only with the information of the I picture itself. A P picture (Predictive-coded picture: a forward predictive coded picture) uses a previously decoded I picture or P picture that is temporally previous as a predicted picture (a picture that serves as a reference for obtaining a difference). . Whether the difference from the motion compensated predicted image is encoded or encoded without taking the difference is selected in units of macroblocks. A B picture (Bidirectionally predictive-coded picture) is a previously decoded I picture or P picture that is temporally previous, as a predicted picture (a reference image for obtaining a difference). Three types of I pictures or P pictures that have already been decoded and interpolated pictures made from both are used. Among the three types of motion-compensated difference encoding and intra-encoding, the most efficient one is selected for each macroblock.
[0033]
Therefore, the macroblock types include intra-frame (Intra) macroblocks, forward (Forward) inter-frame prediction macroblocks that predict the future from the past, and backward (Backward) frames that predict the past from the future. There are prediction macroblocks and bidirectional macroblocks that predict from both the front and rear directions. All macroblocks in an I picture are intraframe coded macroblocks. Further, the P picture includes an intra-frame encoded macro block and a forward inter-frame prediction macro block. The B picture includes all the four types of macroblocks described above.
[0034]
A GOP includes at least one I picture, and P and B pictures are allowed even if they do not exist. As shown in FIG. 4A, the uppermost sequence layer includes a sequence header portion and a plurality of GOPs.
[0035]
In the MPEG format, a slice is one variable length code sequence. A variable-length code sequence is a sequence in which a data boundary cannot be detected unless the variable-length code is correctly decoded.
[0036]
In addition, a start code having a predetermined bit pattern arranged in units of bytes is arranged at the heads of the sequence layer, the GOP layer, the picture layer, and the slice layer. The start code arranged at the head of each layer is referred to as a sequence header code in the sequence layer and a start code in other layers, and the bit pattern is [00 00 01 xx] (hexadecimal notation). Two digits are shown, and [xx] indicates that a different bit pattern is arranged in each layer.
[0037]
That is, the start code and the sequence header code are 4 bytes (= 32 bits), and the type of information that follows can be identified based on the value of the 4th byte. Since these start code and sequence header code are arranged in units of bytes, they can be captured only by performing 4-byte pattern matching.
[0038]
Further, the upper 4 bits of 1 byte following the start code is an identifier of the contents of the extended data area described later. Based on the value of this identifier, the contents of the extension data can be determined.
[0039]
Note that such identification codes having a predetermined bit pattern arranged in units of bytes are not arranged in the macroblock layer and the DCT blocks in the macroblock.
[0040]
The header part of each layer will be described in more detail. In the sequence layer shown in FIG. 4A, a sequence header 2 is arranged at the head, followed by a sequence extension 3, an extension, and user data 4. A sequence header code 1 is arranged at the head of the sequence header 2. Although not shown, predetermined start codes are also arranged at the beginning of the sequence extension 3 and the user data 4, respectively. The sequence header 2 to the extension and user data 4 are used as the header portion of the sequence layer.
[0041]
In the sequence header 2, as shown in FIG. 5, the contents of each parameter and the assigned bits, the encoded image size, aspect ratio, frame rate, bit, consisting of the sequence header code 1, the number of horizontal pixels and the number of vertical lines Information set in units of sequences, such as a rate, a VBV (Video Buffering Verifier) buffer size, a quantization matrix, and the like are each assigned a predetermined number of bits and stored.
[0042]
In FIG. 5 and FIGS. 15 to 15 described later, some parameters are omitted in order to avoid complexity.
[0043]
In sequence extension 3 after the extension start code following the sequence header, as shown in FIG. 6, additional data such as a profile, level, color difference format, progressive sequence, and the like used in MPEG2 are designated. As shown in FIG. 7, the extension and user data 4 can store information on the RGB conversion characteristics and display image size of the original signal by the sequence display (), and the scalability mode and the scalability by the sequence scalable extension (). Layer specification can be performed.
[0044]
A GOP is arranged after the header portion of the sequence layer. As shown in FIG. 4B, a GOP header 6 and user data 7 are arranged at the head of the GOP. The GOP header 6 and user data 7 are used as the header part of the GOP. As shown in FIG. 8, the GOP header 6 stores a GOP start code 5, a time code, and a flag indicating GOP independence and validity, each assigned a predetermined number of bits. As shown in FIG. 9, the user data 7 includes extended data and user data. Although not shown, predetermined start codes are arranged at the heads of the extension data and the user data, respectively.
[0045]
Pictures are arranged following the header of the GOP layer. As shown in FIG. 4C, a picture header 9, a picture encoding extension 10, and an extension and user data 11 are arranged at the head of the picture. A picture start code 8 is arranged at the head of the picture header 9. Further, predetermined start codes are arranged at the heads of the picture coding extension 10 and the extension and user data 11, respectively. The picture header 9 to the extension and user data 11 are used as a picture header.
[0046]
As shown in FIG. 10, the picture header 9 is provided with a picture start code 8 and an encoding condition for the screen. In the picture encoding extension 10, as shown in FIG. 11, the range of motion vectors in the front-rear direction and the horizontal / vertical direction and the picture structure are designated. In the picture encoding extension 10, DC coefficient accuracy of an intra macroblock, selection of a VLC type, selection of a linear / non-linear quantization scale, selection of a scanning method in DCT, and the like are performed.
[0047]
In the extension and user data 11, setting of a quantization matrix, setting of a spatial scalable parameter, and the like are performed as shown in FIG. These settings are possible for each picture, and encoding according to the characteristics of each screen can be performed. In addition, in the extension and user data 11, a picture display area can be set. Furthermore, copyright information can be set in the extension and user data 11.
[0048]
A slice is arranged following the header portion of the picture layer. As shown in FIG. 4D, a slice header 13 is arranged at the head of the slice, and a slice start code 12 is arranged at the head of the slice head 13. As shown in FIG. 13, the slice start code 12 includes position information of the slice in the vertical direction. The slice header 13 further stores extended slice vertical position information, quantization scale information, and the like.
[0049]
Subsequent to the header part of the slice layer, a macroblock is arranged (FIG. 4E). In the macro block, a plurality of DCT blocks are arranged following the macro block header 14. As described above, the start code is not arranged in the macroblock header 14. As shown in FIG. 14, the macroblock header 14 stores relative position information of macroblocks, and instructs setting of motion compensation modes, detailed settings regarding DCT encoding, and the like.
[0050]
Following the macroblock header 14, a DCT block is arranged. As shown in FIG. 15, the DCT block stores variable length coded DCT coefficients and data relating to the DCT coefficients.
[0051]
In FIG. 4, a solid line break in each layer indicates that the data is aligned in byte units, and a dotted line break indicates that the data is not aligned in byte units. That is, up to the picture layer, as shown in FIG. 16A, the code boundary is delimited in bytes, whereas in the slice layer, only the slice start code 12 is delimited in bytes. Each macroblock can be divided in bit units as shown in FIG. 16B. Similarly, in the macroblock layer, each DCT block can be divided in bit units.
[0052]
On the other hand, in order to avoid signal degradation due to decoding and encoding, it is desirable to edit on the encoded data. At this time, the P picture and the B picture require the temporally previous picture or the previous and subsequent pictures for decoding. For this reason, the editing unit cannot be set to one frame unit. In consideration of this point, in the first embodiment, one GOP is made up of one I picture.
[0053]
Further, for example, a recording area in which recording data for one frame is recorded is a predetermined one. Since MPEG2 uses variable length coding, the amount of data generated for one frame is controlled so that data generated in one frame period can be recorded in a predetermined recording area. Furthermore, in this first embodiment, one slice is composed of one macroblock so as to be suitable for recording on a magnetic tape, and one macroblock is applied to a fixed frame of a predetermined length.
[0054]
FIG. 17 specifically shows the header of the MPEG stream according to the first embodiment. As can be seen from FIG. 4, the header portions of the sequence layer, the GOP layer, the picture layer, the slice layer, and the macroblock layer appear continuously from the top of the sequence layer. FIG. 17 shows an example of a data array continuous from the sequence header portion.
[0055]
From the top, a sequence header 2 having a length of 12 bytes is arranged, and subsequently, a sequence extension 3 having a length of 10 bytes is arranged. Following the sequence extension 3, extension and user data 4 are arranged. A user data start code for 4 bytes is arranged at the head of the extension and user data 4, and information based on the SMPTE standard is stored in the following user data area.
[0056]
Next to the header portion of the sequence layer is the header portion of the GOP layer. A GOP header 6 having a length of 8 bytes is arranged, followed by extension and user data 7. A 4-byte user data start code is arranged at the head of the extension and user data 7, and information for compatibility with other existing video formats is stored in the subsequent user data area.
[0057]
Next to the header part of the GOP layer is the header part of the picture layer. A picture header 9 having a length of 9 bytes is arranged, followed by a picture coding extension 10 having a length of 9 bytes. After the picture encoding extension 10, the extension and user data 11 are arranged. The extension and user data are stored in the first 133 bytes of the extension and user data 11, followed by a user data start code 15 having a length of 4 bytes. Subsequent to the user data start code 15, information for compatibility with other existing video formats is stored. Further, a user data start code 16 is arranged, and following the user data start code 16, data based on the SMPTE standard is stored. Next to the header portion of the picture layer is a slice.
[0058]
The macro block will be described in more detail. The macroblock included in the slice layer is a set of a plurality of DCT blocks, and the coded sequence of the DCT block is a sequence of quantized DCT coefficients, the number of consecutive 0 coefficients (run), and the non-zero sequence immediately thereafter. (Level) is variable length encoded as one unit. Identification codes arranged in byte units are not added to the macroblock and the DCT block in the macroblock.
[0059]
The macro block is obtained by dividing a screen (picture) into a grid of 16 pixels × 16 lines. The slice is formed by, for example, connecting the macro blocks in the horizontal direction. The last macroblock of the previous slice and the first macroblock of the next slice are continuous, and it is not allowed to form macroblock overlap between slices. When the screen size is determined, the number of macro blocks per screen is uniquely determined.
[0060]
The numbers of vertical and horizontal macroblocks on the screen are referred to as mb_height and mb_width, respectively. The coordinates of the macroblock on the screen are expressed as mb_row, where the vertical position number of the macroblock is counted from 0 with respect to the upper end, and mb_column, where the horizontal position number of the macroblock is counted from 0 with respect to the left end. It is stipulated in. In order to represent the position of the macro block on the screen with one variable, macroblock_address is set as follows:
macroblock_address = mb_row × mb_width + mb_column
Define it like this.
[0061]
It is defined that the order of slices and macroblocks on the stream must be in the order of macroblock_address. That is, the stream is transmitted from the top to the bottom of the screen and from the left to the right.
[0062]
In MPEG, one slice is usually composed of one stripe (16 lines), and variable length coding starts from the left end of the screen and ends at the right end. Therefore, when the MPEG elementary stream is recorded as it is by the VTR, the reproducible part concentrates on the left end of the screen during high speed reproduction and cannot be uniformly updated. Further, since the arrangement of data on the tape cannot be predicted, uniform screen updating cannot be performed if the tape pattern is traced at a constant interval. Furthermore, if an error occurs even at one location, it affects the right edge of the screen and cannot be restored until the next slice header is detected. For this purpose, one slice is composed of one macroblock.
[0063]
FIG. 18 shows an example of the configuration of the recording side of the recording / reproducing apparatus applicable to the first embodiment. At the time of recording, a digital signal input from the terminal 100 is supplied to an SDI (Serial Data Interface) receiving unit 101. SDI is an interface defined by SMPTE for transmitting (4: 2: 2) component video signals, digital audio signals and additional data. The SDI receiver 101 extracts a digital video signal and a digital audio signal from the input digital signal, the digital video signal is supplied to the MPEG encoder 102, and the digital audio signal is sent to the ECC encoder 109 via the delay 103. To be supplied. The delay 103 is for eliminating the time difference between the digital audio signal and the digital video signal.
[0064]
Further, the SDI receiving unit 101 extracts a synchronization signal from the input digital signal and supplies the extracted synchronization signal to the timing generator 104. An external synchronization signal can also be input from the terminal 105 to the timing generator 104. The timing generator 104 generates a timing pulse based on a specified signal among these input synchronization signals and a synchronization signal supplied from an SDTI receiving unit 108 described later. The generated timing pulse is supplied to each part of the recording / reproducing apparatus.
[0065]
The input video signal is subjected to DCT (Discrete Cosine Transform) processing in the MPEG encoder 102, converted into coefficient data, and the coefficient data is variable-length encoded. The variable length coding (VLC) data from the MPEG encoder 102 is an elementary stream (ES) compliant with MPEG2. This output is supplied to one input terminal of a multi-format converter (hereinafter referred to as MFC) 106 on the recording side.
[0066]
On the other hand, SDTI (Serial Data Transport Interface) format data is input through the input terminal 107. This signal is synchronously detected by the SDTI receiving unit 108 and temporarily stored in the frame memory 170. The synchronization signal obtained by the synchronization detection is supplied to the timing generator 104 described above. The signal stored in the frame memory 170 is read according to a request signal RQ supplied from the recording side MFC 106 described later, an elementary stream is extracted, and is output from the SDTI receiving unit 108. At this time, the SDTI receiving unit 108 outputs an enable signal EN indicating the valid period of the output elementary stream.
[0067]
The elementary stream output from the SDTI receiving unit 108 according to the request signal RQ of the recording side MFC 106 is supplied to the code amount measuring unit 560 and temporarily stored in the memory 531 as described above with reference to FIG. The measuring device 530 measures the code amount of the equal length unit. The equal length unit is, for example, one frame of a video signal.
[0068]
In the first embodiment, when the code amount of the equal length unit exceeds the total code amount defined for the equal length unit based on the measurement result of the code amount, A control signal for stopping recording is output from the code amount control unit 560. This control signal is supplied to, for example, an equalizer 110 (to be described later). When the code amount of the equal length unit exceeds the total code amount defined for the equal length unit, the recording RF signal from the equalizer 110 is output. The output is stopped based on the control of this control signal. Recording may be stopped by providing a switch circuit between the equalizer 110 and a magnetic head attached to the rotary drum 111 described later, and controlling the open / close state of the switch circuit by a control signal. Details of the processing by the code amount measuring unit 560 will be described later.
[0069]
When this configuration is applied to second to fifth embodiments described later, the control signal output from the code amount measuring unit 560 and the control of the equalizer 110 and the like by the control signal are not necessary.
[0070]
The MPEG ES whose code amount is measured by the code amount measuring unit 56 is supplied to the other input end of the recording side MFC 106.
[0071]
In the present invention, for example, an SDTI (Serial Data Transport Interface) -CP (Content Package) is used to transmit MPEG ES (MPEG Elementary Stream). This ES is a component of 4: 2: 2, and as described above, all ES streams are I-picture streams and have a relationship of 1 GOP = 1 picture. In the SDTI-CP format, MPEG ES is separated into access units and packed into packets in frame units. In SDTI-CP, a sufficient transmission band (a clock rate of 27 MHz or 36 MHz and a stream bit rate of 270 Mbps or 360 Mbps) is used, and ES can be sent in bursts in one frame period.
[0072]
That is, system data, a video stream, an audio stream, and AUX data are arranged between SAV after one frame period and EAV. There is no data in one frame period, and there is data in bursts for a predetermined period from the beginning. An SDTI-CP stream (video and audio) can be switched in a stream state at the frame boundary. SDTI-CP has a mechanism for establishing synchronization between audio and video in the case of content using SMPTE time code as a clock reference. Furthermore, the format is determined so that SDTI-CP and SDI can coexist.
[0073]
The interface using SDTI-CP described above does not require the encoder and decoder to pass through the VBV (Video Buffer Verifier) buffer and TBs (Transport Buffers) as in the case of transferring TS (Transport Stream), and delay is reduced. it can. Further, the fact that SDTI-CP itself can transfer at extremely high speed further reduces the delay. Therefore, it is effective to use the SDTI-CP in an environment where there is synchronization that manages the entire broadcasting station.
[0074]
The SDTI receiving unit 108 further extracts a digital audio signal from the input SDTI-CP stream. The extracted digital audio signal is supplied to the ECC encoder 109.
[0075]
The recording side MFC 106 includes a selector and a stream converter. Further, the code amount measuring unit 560 described above can be incorporated in the recording side MFC 106. The recording side MFC 106 is configured in one integrated circuit, for example. Processing performed in the recording side MFC 106 will be described. One of the MPEG ESs supplied from the MPEG encoder 102 and the SDTI receiving unit 108 is selected by the selector and supplied to the stream converter.
[0076]
The stream converter has a simple decoder that only performs decoding of a variable-length code, for example. The MPEG ES supplied to the stream converter is simply decoded, and the DCT coefficients arranged for each DCT block based on the MPEG2 regulations are grouped for each frequency component through a plurality of DCT blocks constituting one macro block. The collected frequency components are rearranged. In addition, when one slice of an elementary stream has one stripe, the stream converter converts one slice to one macro block. Further, the maximum length of variable length data generated in one macro block is limited to a predetermined length by the stream converter. This can be done by setting the higher order DCT coefficients to zero. The rearranged conversion elementary stream is supplied to the ECC encoder 109.
[0077]
The ECC encoder 109 is connected to a large-capacity main memory (not shown), and includes a packing and shuffling unit, an audio outer code encoder, a video outer code encoder, an inner code encoder, an audio shuffling unit, and a video shuffling. Built-in parts. The ECC encoder 109 includes a circuit for adding an ID in sync block units and a circuit for adding a synchronization signal. The ECC encoder 109 is constituted by, for example, one integrated circuit.
[0078]
In the first embodiment, a product code is used as an error correction code for video data and audio data. In the product code, the outer code is encoded in the vertical direction of the two-dimensional array of video data or audio data, the inner code is encoded in the horizontal direction, and the data symbols are encoded doubly. As the outer code and the inner code, a Reed-Solomon code can be used.
[0079]
Processing in the ECC encoder 109 will be described. Since the video data of the elementary stream is variable-length encoded, the data lengths of the macroblocks are not uniform. In the packing and shuffling unit, the macroblock is packed in a fixed frame. At this time, the overflow portion that protrudes from the fixed frame is sequentially packed into an empty area with respect to the size of the fixed frame.
[0080]
Further, system data having information such as an image format and a shuffling pattern version is supplied from a syscon 121 described later and input from an input terminal (not shown). System data is supplied to the packing and shuffling unit, and is subjected to recording processing in the same manner as picture data. Further, shuffling is performed in which the macroblocks of one frame generated in the scanning order are rearranged to distribute the recording positions of the macroblocks on the tape. By shuffling, the image update rate can be improved even when data is reproduced piecewise during variable speed reproduction.
[0081]
Video data and system data from the packing and shuffling unit (hereinafter referred to simply as video data including system data unless otherwise required) is a video in which video data is encoded by outer coding. An outer code parity is added to the outer code encoder. The output of the outer code encoder is shuffled by the video shuffling unit, in which the order is changed in units of sync blocks over a plurality of ECC blocks. Shuffling in sync block units prevents errors from concentrating on a specific ECC block. The shuffling performed by the shuffling unit may be referred to as interleaving. The output of the video shuffling unit is written into the main memory.
[0082]
On the other hand, as described above, the digital audio signal output from the SDTI receiving unit 108 or the delay 103 is supplied to the ECC encoder 109. In the first embodiment, an uncompressed digital audio signal is handled. The digital audio signal is not limited thereto, and can be input via an audio interface. Audio AUX is supplied from an input terminal (not shown). The audio AUX is auxiliary data, and is data having information related to audio data such as a sampling frequency of the audio data. The audio AUX is added to the audio data and is handled in the same way as the audio data.
[0083]
Audio data to which audio AUX is added (hereinafter referred to simply as audio data even when AUX is included unless otherwise required) is supplied to an audio outer code encoder that encodes the outer code of the audio data. Is done. The output of the audio outer code encoder is supplied to the audio shuffling unit and subjected to a shuffling process. As audio shuffling, shuffling in sync blocks and shuffling in channels are performed.
[0084]
The output of the audio shuffling unit is written into the main memory. As described above, the output of the video shuffling unit is also written in the main memory. In the main memory, the audio data and the video data are mixed into one channel data.
[0085]
Data is read from the main memory, an ID including information indicating a sync block number is added, and the data is supplied to the inner code encoder. The inner code encoder encodes the supplied data with the inner code. A sync signal for each sync block is added to the output of the inner code encoder, and recording data in which the sync block is continuous is configured.
[0086]
The recording data output from the ECC encoder 109 is supplied to an equalizer 110 including a recording amplifier and converted into a recording RF signal. The recording RF signal is supplied to a rotating drum 111 provided with a rotating head and recorded on the magnetic tape 112. Actually, a plurality of magnetic heads having different azimuths of heads forming adjacent tracks are attached to the rotating drum 111.
[0087]
As described above, in the equalizer 110, the output of the recording RF signal is controlled based on the control signal supplied from the code amount measuring unit 560. However, the present invention is not limited thereto, and a switch circuit whose opening / closing is controlled by a control signal supplied from the code amount measuring unit 560 may be provided between the equalizer 110 and the rotary drum 111.
[0088]
You may perform a scramble process with respect to recording data as needed. Also, digital modulation may be performed during recording, and partial response class 4 and Viterbi code may be used. The equalizer 110 includes both a recording side configuration and a playback side configuration.
[0089]
FIG. 19 shows an example of a track format formed on the magnetic tape by the rotary head described above. In this example, video and audio data per frame are recorded in four tracks. One segment is composed of two tracks of different azimuths. That is, 4 tracks are composed of 4 segments. A track number [0] and a track number [1] corresponding to azimuth are assigned to a set of tracks constituting a segment. In each of the tracks, a video sector in which video data is recorded is disposed on both ends, and an audio sector in which audio data is recorded is disposed between the video sectors. FIG. 19 shows the arrangement of sectors on the tape.
[0090]
In this example, four channels of audio data can be handled. A1 to A4 indicate 1 to 4 channels of audio data, respectively. Audio data is recorded by changing the arrangement in segment units. In this example, video data is interleaved with four error correction blocks for one track, and is divided into upper side and lower side sectors and recorded.
[0091]
The lower side video sector is provided with a system area (SYS) in which system data is recorded at a predetermined position. The system area is provided alternately for each track, for example, at the head side and the tail side of the lower side video sector.
[0092]
In FIG. 19, SAT is an area where a servo lock signal is recorded. A gap having a predetermined size is provided between the recording areas.
[0093]
FIG. 19 shows an example in which data per frame is recorded in 4 tracks. However, depending on the format of data to be recorded and reproduced, data per frame can be recorded in 8 tracks, 6 tracks, and the like.
[0094]
As shown in FIG. 19B, the data recorded on the tape is made up of a plurality of blocks called “sink blocks” divided at equal intervals. FIG. 19C schematically shows the configuration of a sync block. The sync block includes a SYNC pattern for detecting synchronization, an ID for identifying each sync block, a DID indicating the content of subsequent data, a data packet, and an inner code parity for error correction. Data is handled as a packet in sync block units. That is, the smallest data unit to be recorded or reproduced is one sync block. A large number of sync blocks are arranged (FIG. 19B) to form, for example, a video sector.
[0095]
FIG. 19D shows an exemplary data structure of the system area SYS. In the data area in the sync block shown in FIG. 19C, 5 bytes are allocated to the system data, 2 bytes to the MPEG header, 10 bytes to the picture information, and 92 bytes to the user data from the top.
[0096]
The system data includes the presence and location of switching points, the video format (frame frequency, interleaving method, aspect ratio, etc.), shuffling version information, and the like. In the system data, the appropriate level of the recorded MPEG ES syntax is recorded using 6 bits.
[0097]
In the MPEG header, MPEG header information necessary for shuttle playback is recorded. Information for maintaining compatibility with other digital VTRs is recorded in the picture information. Furthermore, the date of recording, the cassette number, and the like are recorded in the user data.
[0098]
Returning to the description of FIG. 18, at the time of reproduction, a reproduction signal reproduced from the magnetic tape 112 on the rotary drum 111 is supplied to the reproduction side configuration of the equalizer 110 including a reproduction amplifier and the like. The equalizer 110 performs equalization, waveform shaping, and the like on the reproduction signal. Further, demodulation of digital modulation, Viterbi decoding, and the like are performed as necessary. The output of the equalizer 110 is supplied to the ECC decoder 113.
[0099]
The ECC decoder 113 performs processing reverse to the ECC encoder 109 described above, and includes a large-capacity main memory, an inner code decoder, audio and video deshuffling units, and an outer code decoder. Further, the ECC decoder 113 includes a deshuffling and depacking unit and a data interpolation unit for video. Similarly, for audio, an audio AUX separation unit and a data interpolation unit are included. The ECC decoder 113 is composed of, for example, one integrated circuit.
[0100]
Processing in the ECC decoder 113 will be described. First, the ECC decoder 113 detects synchronization, detects a synchronization signal added to the head of the sync block, and cuts out the sync block. The reproduced data is supplied to the inner code encoder for each sync block, and error correction of the inner code is performed. An ID interpolation process is performed on the output of the inner code encoder, and the ID of the sync block, for example, the sync block number, which is an error due to the inner code, is interpolated. The reproduction data in which the ID is interpolated is separated into video data and audio data.
[0101]
As described above, the video data means DCT coefficient data and system data generated by MPEG intra coding, and the audio data means PCM (Pulse Code Modulation) data and audio AUX.
[0102]
The separated audio data is supplied to the audio deshuffling unit, and the reverse processing to the shuffling performed by the recording side shuffling unit is performed. The output of the deshuffling unit is supplied to an outer code decoder for audio, and error correction using the outer code is performed. Audio-corrected audio data is output from the audio outer code decoder. For data with errors that cannot be corrected, an error flag is set.
[0103]
The audio AUX separation unit separates the audio AUX from the output of the audio outer code decoder, and the separated audio AUX is output from the ECC decoder 113 (the path is omitted). The audio AUX is supplied to, for example, a syscon 121 described later. The audio data is supplied to the data interpolation unit. In the data interpolation unit, the sample having an error is interpolated. As an interpolation method, average value interpolation for interpolating with the average value of correct data before and after time, pre-value hold for holding the value of the previous correct sample, and the like can be used.
[0104]
The output of the data interpolation unit is the output of audio data from the ECC decoder 113, and the audio data output from the ECC decoder 113 is supplied to the delay 117 and the SDTI output unit 115. The delay 117 is provided to absorb a delay caused by the video data processing in the MPEG decoder 116 described later. The audio data supplied to the delay 117 is given a predetermined delay and supplied to the SDI output unit 118.
[0105]
The separated video data is supplied to the deshuffling unit, and the reverse processing to the shuffling on the recording side is performed. The deshuffling unit performs processing for restoring the shuffling in units of sync blocks performed by the recording side shuffling unit. The output of the deshuffling unit is supplied to the outer code decoder, and error correction by the outer code is performed. When an error that cannot be corrected occurs, an error flag indicating the presence or absence of an error indicates that there is an error.
[0106]
The output of the outer code decoder is supplied to the deshuffling and depacking unit. The deshuffling and depacking unit performs processing for returning the macroblock unit shuffling performed by the packing and shuffling unit on the recording side. The deshuffling and depacking unit disassembles the packing applied at the time of recording. That is, the original variable length code is restored by returning the data length in units of macroblocks. Further, in the deshuffling and depacking unit, the system data is separated, output from the ECC decoder 113, and supplied to the syscon 121 described later.
[0107]
The output of the deshuffling and depacking unit is supplied to the data interpolation unit, and the data with the error flag set (that is, with an error) is corrected. That is, if there is an error in the middle of the macroblock data before conversion, the DCT coefficient of the frequency component after the error location cannot be restored. Therefore, for example, the data at the error location is replaced with a block end code (EOB), and the DCT coefficients of the frequency components thereafter are set to zero. Similarly, during high-speed reproduction, only DCT coefficients up to the length corresponding to the sync block length are restored, and the subsequent coefficients are replaced with zero data. Further, in the data interpolation unit, when the header added to the head of the video data is an error, the header (sequence header, GOP header, picture header, user data, etc.) is also recovered.
[0108]
Since the DCT coefficients are arranged from the DC component and the low-frequency component to the high-frequency component across the DCT block, a macroblock is configured even if the DCT coefficient is ignored from a certain point in this way. For each DCT block, DCT coefficients from DC and low frequency components can be distributed evenly.
[0109]
The video data output from the data interpolation unit is the output of the ECC decoder 113, and the output of the ECC decoder 113 is supplied to a playback-side multi-format converter (hereinafter referred to as playback-side MFC) 114. The reproduction side MFC 114 performs processing reverse to that of the recording side MFC 106 described above, and includes a stream converter. The reproduction side MFC 114 is configured by, for example, one integrated circuit.
[0110]
In the stream converter, the reverse process of the stream converter on the recording side is performed. That is, the DCT coefficients arranged for each frequency component across DCT blocks are rearranged for each DCT block. As a result, the reproduction signal is converted into an elementary stream compliant with MPEG2.
[0111]
As for the input / output of the stream converter, a sufficient transfer rate (bandwidth) is secured in accordance with the maximum length of the macroblock, as in the recording side. When the length of the macroblock (slice) is not limited, it is preferable to secure a bandwidth that is three times the pixel rate.
[0112]
The output of the stream converter is the output of the playback side MFC 114, and the output of the playback side MFC 114 is supplied to the SDTI output unit 115 and the MPEG decoder 116.
[0113]
The MPEG decoder 116 decodes the elementary stream and outputs video data. That is, the MPEG decoder 142 performs an inverse quantization process and an inverse DCT process. The decoded video data is supplied to the SDI output unit 118. As described above, the audio data separated from the video data by the ECC decoder 113 is supplied to the SDI output unit 118 via the delay 117. The SDI output unit 118 maps the supplied video data and audio data to an SDI format, and converts the data into a stream having an SDI format data structure. A stream from the SDI output unit 118 is output from the output terminal 120 to the outside.
[0114]
On the other hand, as described above, the audio data separated from the video data by the ECC decoder 113 is supplied to the SDTI output unit 115. In the SDTI output unit 115, the supplied video data and audio data as elementary streams are mapped to the SDTI format and converted into a stream having a data structure of the SDTI format. The converted stream is output from the output terminal 119 to the outside.
[0115]
In FIG. 18, a syscon 121 is composed of, for example, a microcomputer and controls the overall operation of the recording / reproducing apparatus. When switches provided on a control panel (not shown) are operated, a control signal corresponding to the operation is supplied to the syscon 121. Based on this control signal, operations such as recording and reproduction in the recording / reproducing apparatus are controlled by the syscon 121. As an example, an operation of recording a video signal input from the input terminal 100 or the input terminal 107 on the magnetic tape 112 is started by operating a recording switch 551 provided on the control panel.
[0116]
Furthermore, the control panel can be provided with a display unit such as an LCD (Liquid Crystal Display) (not shown). Based on the display control signal generated in the syscon 121, a predetermined display is made on the display unit. Each state of the recording / reproducing apparatus is displayed on the display unit.
[0117]
The servo 122 performs traveling control of the magnetic tape 112 and drive control of the rotary drum 111 while communicating with the syscon 121. Further, the servo 122 detects the acceleration state of the rotary drum 111. The acceleration state is detected, for example, by examining the time change of the FG pulse or PG pulse interval of the rotating drum 111. The detection result is supplied to the syscon 121 as a drum acceleration detection signal.
[0118]
FIG. 20A shows the order of DCT coefficients in the video data output from the DCT circuit of the MPEG encoder 102. The same applies to MPEG ES output from the SDTI receiving unit 108. Hereinafter, the output of the MPEG encoder 102 will be described as an example. Starting from the upper left DC component in the DCT block, DCT coefficients are output in a zigzag scan in the direction of increasing horizontal and vertical spatial frequencies. As a result, as shown in FIG. 20B, a total of 64 (8 pixels × 8 lines) DCT coefficients are arranged in order of frequency components.
[0119]
This DCT coefficient is variable length encoded by the VLC part of the MPEG encoder. That is, the first coefficient is fixed as a DC component, and a code is assigned from the next component (AC component) corresponding to a zero run and a subsequent level. Therefore, the variable length coding output for the coefficient data of the AC component is changed from the low (low order) coefficient of the frequency component to the high (high order) coefficient.1, AC2, ACThree, ... are arranged. The elementary stream includes variable length encoded DCT coefficients.
[0120]
In the recording-side stream converter incorporated in the recording-side MFC 106 described above, the DCT coefficients of the supplied signal are rearranged. That is, in each macroblock, the DCT coefficients arranged in the order of frequency components for each DCT block by zigzag scanning are rearranged in the order of frequency components over each DCT block constituting the macroblock.
[0121]
FIG. 21 schematically shows the rearrangement of DCT coefficients in this recording-side stream converter. In the case of a (4: 2: 2) component signal, one macroblock includes four DCT blocks (Y1, Y2, YThreeAnd YFour) And two DCT blocks (Cb) by chromaticity signals Cb and Cr, respectively.1, Cb2, Cr1And Cr2).
[0122]
As described above, in the MPEG encoder 102, zigzag scanning is performed in accordance with the provisions of MPEG2, and as shown in FIG. 21A, the DCT coefficient is changed from a DC component and a low frequency component to a high frequency component for each DCT block. Arranged in order of components. When the scan of one DCT block is completed, the next DCT block is scanned, and the DCT coefficients are arranged in the same manner.
[0123]
That is, in the macro block, the DCT block Y1, Y2, YThreeAnd YFour, DCT block Cb1, Cb2, Cr1And Cr2DCT coefficients are arranged in order of frequency from the DC component and the low-frequency component to the high-frequency component. Then, a set consisting of a continuous run and the following level is divided into [DC, AC1, AC2, ACThree,...], And variable length coding is performed so that codes are assigned.
[0124]
In the recording-side stream converter, the variable-length encoded and arranged DCT coefficients are once decoded by detecting the delimiter of each coefficient, and each frequency component straddling each DCT block constituting the macroblock. To summarize. This is shown in FIG. 21B. First, the DC components of the eight DCT blocks in the macroblock are gathered, then the AC coefficient components having the lowest frequency components of the eight DCT blocks are gathered, and then the AC coefficients of the same order are gathered in order. The coefficient data is rearranged across the DCT blocks.
[0125]
The rearranged coefficient data is DC (Y1), DC (Y2), DC (YThree), DC (YFour), DC (Cb1), DC (Cb2), DC (Cr1), DC (Cr2), AC1(Y1), AC1(Y2), AC1(YThree), AC1(YFour), AC1(Cb1), AC1(Cb2), AC1(Cr1), AC1(Cr2), ... Where DC, AC1, AC2,... Are each code of a variable length code assigned to a set consisting of a run and a subsequent level, as described with reference to FIG.
[0126]
The converted elementary stream in which the order of the coefficient data is rearranged by the recording-side stream converter is supplied to the packing and shuffling unit built in the ECC encoder 109. The data length of the macroblock is the same for the converted elementary stream and the elementary stream before conversion. Further, even if the MPEG encoder 102 has a fixed length in units of GOP (1 frame) by bit rate control, the length varies in units of macroblocks. In the packing and shuffling unit, the macroblock data is applied to the fixed frame.
[0127]
FIG. 22 schematically shows a macroblock packing process in the packing and shuffling unit. The macro block is applied to a fixed frame having a predetermined data length and packed. The data length of the fixed frame used at this time is made to coincide with the data length of the sync block which is the minimum unit of data at the time of recording and reproduction. This is because the shuffling and error correction coding processes are easily performed. In FIG. 22, it is assumed for simplicity that 8 macroblocks are included in one frame.
[0128]
As an example is shown in FIG. 22A by variable length coding, the lengths of 8 macroblocks are different from each other. In this example, the data of the macroblock # 1, the data of # 3, and the data of # 6 are longer than the length of the data area of one sync block, which is a fixed frame, respectively, and the data of the macroblock # 2, # 5 , # 7 data and # 8 data are short. Further, the data of the macro block # 4 has a length substantially equal to one sync block.
[0129]
By the packing process, macroblocks are packed into a fixed length frame having a length of one sync block. The reason why data can be packed without excess or deficiency is that the amount of data generated in one frame period is controlled to a fixed amount. As shown in an example in FIG. 22B, a macroblock that is longer than one sync block is divided at a position corresponding to the sync block length. Of the divided macroblocks, a portion (overflow portion) that protrudes from the sync block length is packed into an area that is vacant in order from the top, that is, after the macroblock whose length is less than the sync block length.
[0130]
In the example of FIG. 22B, the portion of the macro block # 1 that protrudes from the sync block length is first stuffed behind the macro block # 2, and when that reaches the length of the sync block, Stuffed into. Next, the portion of the macro block # 3 that protrudes from the sync block length is packed behind the macro block # 7. Further, the portion of the macro block # 6 that protrudes from the sync block length is packed behind the macro block # 7, and the portion that protrudes further is packed behind the macro block # 8. In this way, each macroblock is packed into a fixed frame having a sync block length.
[0131]
The length of the variable length data corresponding to each macroblock can be checked in advance in the recording side stream converter. As a result, the packing unit can know the end of the data of the macroblock without decoding the VLC data and checking the contents.
[0132]
FIG. 23 shows a more specific configuration of the ECC encoder 139 described above. In FIG. 23, reference numeral 164 denotes an interface of the main memory 160 externally attached to the IC. The main memory 160 is composed of SDRAM. The interface 164 arbitrates requests from the inside to the main memory 160 and performs write / read processing on the main memory 160. Also, the packing and shuffling unit 137 is configured by the packing unit 137a, the video shuffling unit 137b, and the packing unit 137c.
[0133]
FIG. 24 shows an example of the address configuration of the main memory 160. The main memory 160 is composed of, for example, a 64 Mbit SDRAM. The main memory 160 has a video area 250, an overflow area 251, and an audio area 252. The video area 250 includes four banks (vbank # 0, vbank # 1, vbank # 2, and vbank # 3). Each of the four banks can store a digital video signal in a unit of equal length. The equal length unit is a unit for controlling the amount of generated data to a substantially target value, and is, for example, one picture (I picture) of a video signal. A portion A in FIG. 24 indicates a data portion of one sync block of the video signal. In one sync block, data having a different number of bytes is inserted depending on the format. In order to support a plurality of formats, the number of bytes that is greater than the maximum number of bytes and is convenient for processing, for example, 256 bytes, is set as the data size of one sync block.
[0134]
Each bank of the video area is further divided into a packing area 250A and an output area 250B to the inner encoding encoder. The overflow area 251 is composed of four banks corresponding to the video area described above. Further, the main memory 160 has an audio data processing area 252.
[0135]
In the first embodiment, by referring to the data length indicator of each macroblock, the packing unit 137a separates the fixed frame length data and the overflow data that is a part exceeding the fixed frame into separate areas of the main memory 160. Memorize it separately. The fixed frame length data is data equal to or shorter than the length of the data area of the sync block, and is hereinafter referred to as block length data. The area for storing the block length data is the packing processing area 250A of each bank. When the data length is shorter than the block length, an empty area is generated in the corresponding area of the main memory 160. The video shuffling unit 137b performs shuffling by controlling the write address. Here, the video shuffling unit 137b shuffles only the block length data, and the overflow portion is written in the area allocated to the overflow data without being shuffled.
[0136]
Next, the packing unit 137c performs processing for packing the overflow portion into the memory to the outer code encoder 139 and reading it. That is, the block length data is read from the main memory 160 to the memory for one ECC block prepared in the outer code encoder 139, and if there is an empty area in the block length data, the overflow portion is added there. Read to block data in block length. When the data for one ECC block is read, the reading process is temporarily interrupted, and the outer code encoder 139 generates the parity of the outer code. The outer code parity is stored in the memory of the outer code encoder 139. When the processing of the outer code encoder 139 is completed for one ECC block, the data and outer code parity from the outer code encoder 139 are rearranged in the order in which the inner code is performed, and the packing processing area 250A of the main memory 160 and another output area 250B. Write back to The video shuffling unit 140 performs shuffling in units of sync blocks by controlling an address when the data whose outer code has been encoded is written back to the main memory 160.
[0137]
In this way, block length data and overflow data are divided and data is written to the first area 250A of the main memory 160 (first packing processing), and overflow data is packed and read into the memory to the outer code encoder 139. Processing (second packing processing), outer code parity generation, data and outer code parity are written back to the second area 250B of the main memory 160 in units of one ECC block. Since the outer code encoder 139 includes a memory having an ECC block size, the frequency of access to the main memory 160 can be reduced.
[0138]
When the processing of a predetermined number of ECC blocks (for example, 32 ECC blocks) included in one picture is completed, the packing of one picture and the encoding of the outer code are completed. Then, the data read from the area 250B of the main memory 160 via the interface 164 is processed by the ID adding unit 148, the inner code encoder 147, and the synchronization adding unit 150, and the parallel / serial conversion unit 124 outputs the output data of the synchronization adding unit 150. Is converted into bit serial data. The output serial data is processed by the partial response class 4 precoder 125. This output is digitally modulated as necessary, and is supplied to the rotary head provided on the rotary drum 111 via the recording amplifier 110.
[0139]
A sync block called null sync in which no valid data is arranged is introduced in the ECC block so that the configuration of the ECC block is flexible with respect to the difference in the format of the recording video signal. The null sync is generated in the packing unit 137 a of the packing and shuffling block 137 and written in the main memory 160. Accordingly, since the null sync has a data recording area, it can be used as a recording sync for the overflow portion.
[0140]
In the case of audio data, even-numbered samples and odd-numbered samples of audio data in one field constitute separate ECC blocks. Since the ECC outer code sequence is composed of audio samples in the input order, the outer code encoder 136 generates an outer code parity each time an outer code sequence audio sample is input. The shuffling unit 137 performs shuffling (channel unit and sync block unit) by address control when the output of the outer code encoder 136 is written to the area 252 of the main memory 160.
[0141]
Further, a CPU interface indicated by 126 is provided to receive data from an external CPU 127 functioning as a system controller and to set parameters for the internal blocks. In order to support a plurality of formats, it is possible to set many parameters including a sync block length and a parity length.
[0142]
“Packing length data” as one of the parameters is sent to the packing units 137a and 137b, and the packing units 137a and 137b are shown as fixed frames (“sync block length” in FIG. 22A) determined based on this. VLC data is packed into (length).
[0143]
"Pack number data" as one of the parameters is sent to the packing unit 137b, and the packing unit 137b determines the number of packs per sync block based on this, and the data for the determined number of packs is an outer code. This is supplied to the encoder 139.
[0144]
The “video outer code parity number data” as one of the parameters is sent to the outer code encoder 139, and the outer code encoder 139 encodes the outer code of the video data from which the number of parity is uttered. Do.
[0145]
Each of “ID information” and “DID information” as one of the parameters is sent to the ID adding unit 148, and the ID adding unit 148 reads the ID information and DID information from the main memory 160 in the unit length. Append to the data column.
[0146]
Each of the “intra-video code parity number data” and the “audio intra-code parity number data” as one of the parameters is sent to the inner code encoder 149, and the inner code encoder 149 has a number of parityes based on them. Encode the inner code of the video data and the audio data. Note that “sync length data”, which is one of the parameters, is also sent to the inner code encoder 149, thereby restricting the unit length (sync length) of the inner encoded data.
[0147]
Further, shuffling table data as one of the parameters is stored in the video shuffling table (RAM) 128v and the audio shuffling table (RAM) 128a. The shuffling table 128v performs address conversion for shuffling of the video shuffling units 137b and 140. The shuffling table 128a performs address conversion for the audio shuffling 137.
[0148]
Next, processing in the code amount measuring unit 560 will be described. The code amount measuring device 530 can know the code amount of the input elementary stream by checking the data amount between start codes corresponding to the equal length unit break. In the first embodiment, since 1 GOP = 1 picture, it is possible to know the code amount of the equal length unit by examining the clock from the GOP header 6 to the next GOP header 6.
[0149]
As described above, when outputting the elementary stream, the SDTI receiving unit 108 outputs the enable signal EN corresponding to the effective period of the elementary stream. In the code amount measuring device 530, the code amount of the equal length unit is actually checked based on the length of the enable signal EN. For example, when the data width is 8 bits (1 byte), the code amount can be known by the number of bytes by examining the number of clocks in a state (“H” state) in which the enable signal EN represents an effective period.
[0150]
The code amount measurement using the enable signal EN will be described with reference to FIGS. 25 and 26. FIG. FIG. 25 schematically shows an interface between the SDTI receiving unit 108 and the recording-side MFC 106. FIG. 26 shows a time chart of an example of signals exchanged between the SDTI receiving unit 108 and the recording side MFC 106. In FIG. 25, it is assumed that the code amount measuring unit 560 is built in the recording-side MFC 106 for the sake of explanation.
[0151]
Between the SDTI receiving unit 108 and the recording side MFC 106, a request signal line for sending a request signal RQ from the recording side MFC 106 to the SDTI receiving unit 108, and an enable signal EN and a bit stream are sent from the SDTI receiving unit 108 to the SDTI receiving unit 108. It is connected with a bit stream line with an enable signal EN. The request signal RQ is a signal for requesting the SDTI receiving unit 108 to output MPEG ES in the “H” state and requesting output stop in the “L” state, for example.
[0152]
As described above, the MPEG ES and the enable signal EN are output from the SDTI receiving unit 108 based on the request signal RQ from the recording side MFC 106.
[0153]
First, a case where the stream input to the SDTI receiving unit 108 is separated for each frame and the frame boundary (frame length) can be determined by the SDTI receiving unit 108 will be described. The timing generator 104 generates a frame synchronization signal based on the synchronization signal extracted by the SDTI reception unit 108 from the MPEG ES input to the input terminal 107. This frame synchronization signal is supplied to the recording side MFC 106.
[0154]
Based on the frame synchronization signal, a request signal RQ is transmitted from the recording MFC 106 to the SDTI receiver 108. In the SDTI receiving unit 108, the enable signal EN is set to the “H” state with a delay of a predetermined clock (for example, 2 clocks) required for processing in the SDTI receiving unit 108 from the reception of the request signal RQ. Minute bit stream (MPEG ES) is output. The bit stream is stored in the buffer of the recording side MFC 106 and is simply decoded to detect the rear end of the frame.
[0155]
For example, in the first embodiment in which 1 picture = 1 GOP, the trailing edge of the frame is detected by checking the number of slices following the GOP header 6 and the number of macroblocks included in the last slice. can do. Alternatively, the number of macro blocks may be simply checked.
[0156]
When the end of the frame is detected, the request signal RQ sent from the recording side MFC 106 to the SDTI receiving unit 108 is canceled. In response to this, the output of the MPEG ES from the SDTI receiving unit 108 is stopped with a predetermined clock delay, and the enable signal EN is canceled and set to the “L” state. The code amount measuring unit 560 can know the code amount of one frame, that is, the equal length unit, by measuring the number of clocks during the period when the enable signal EN is in the “H” state.
[0157]
A case where the stream input to the SDTI receiving unit 108 is not separated for each frame will be described. In this case, since the SDTI receiving unit 108 cannot know the boundary of the frame, the MPEG ES is continuously output regardless of the frame and stored in the buffer of the recording side MFC 106. In the first frame, the recording side MFC 106 decodes the MPEG ES stored in the buffer, and when the rear end of the frame is detected, the request signal RQ is set to the “L” state for the SDTI receiver 108, and the MPEG ES output stop is requested.
[0158]
In response to this request, the SDTI receiving unit 108 stops the actual stream output with a predetermined clock delay, as described above. Therefore, the recording-side MFC 106 inputs the stream of the next frame before the processing of the stream stored in the buffer is completed and the stream is not swept out of the buffer.
[0159]
That is, when the recording end MFC 106 detects the rear end of the frame first stored in the buffer, the request signal RQ requesting the stop of the stream output is sent to the SDTI receiving unit 108, and the frame Stream is flushed from the buffer. The stream of the next frame supplied until the stream output is stopped by the sent request signal RQ is stored in the buffer.
[0160]
The recording side MFC 106 sends a request signal RQ to the SDTI receiving unit 108 based on the frame synchronization signal, and requests a stream of the next frame. In response to this request, a stream following the portion interrupted by the stream output stop by the previous request signal RQ is output from the SDTI receiving unit 108 and stored in the buffer of the recording side MFC 106. The recording MFC 106 processes the stream accumulated in the previous request and remaining in the buffer, and the stream accumulated in the buffer in the current request, and detects the trailing edge of the frame.
[0161]
When the rear end of the frame is detected, the request signal RQ requesting the stream output stop is sent from the recording MFC 106 to the SDTI receiving unit 108 in the same manner as described above. Similarly, the SDTI receiving unit 108 stops stream output after a predetermined clock delay, and the stream of the next frame is stored in the buffer of the recording side MFC 106 for a predetermined clock. This process is repeated until the input of the stream to the SDTI receiving unit 108 is completed.
[0162]
The enable signal EN is transmitted together with the bit stream and indicates the valid period of the bit stream. By repeating the processing as described above, the period of the enable signal EN in the “H” state is substantially equal to one frame period of the stream output from the SDTI receiving unit 108. Therefore, by measuring the length of the enable signal EN by the code amount measuring unit 560, it is possible to know the code amount of one frame, that is, the equal length unit.
[0163]
However, in this case, the first frame of the stream supplied to the SDTI receiving unit 108 has the enable signal EN longer than the one frame by a predetermined clock, and the last frame is shorter by the predetermined clock.
[0164]
Note that the method of measuring the code amount of the equalization unit is not limited to the method described above. For example, each header of MPEG ES may be detected and the length from sequence_header_code, group_of_pictures_start_code, or picture_start_code to sequence_end_code of the next frame may be measured. Similarly, from sequence_header_code, group_of_pictures_start_code or picture_start_code to the length of sequence_header_code, group_of_pictures_start_code or picture_length of the next frame. In these methods, since the header information is a unit arranged for each byte (see FIG. 16A), there is no need to decode the variable length code. There may be a pattern matching means for detecting each start_code and a counter for measuring a clock.
[0165]
Also, stuffing may be removed when a stream is input. In this case, only the effective recording information amount is extracted without measuring the deleted stuffing. That is, only the code amount to be recorded is measured.
[0166]
Although it is conceivable to examine the bit_rate_value by extracting the parameter of the sequence header 2 from the stream, the bit_rate_value does not prescribe the code amount of the picture unit or the GOP unit, and the bit rate includes the above stuffing. This is not preferable.
[0167]
Next, a second embodiment of the present invention will be described. In the second embodiment, a frame in which the code amount of the equal length unit exceeds a specified amount is replaced with a frame with a small code amount, such as black display or gray display. At this time, the picture_coding_type in the picture header 9 is changed to a value indicating I picture, and the macroblock_type in the macroblock header 14 is changed to a value indicating “Intra”. Further, in all macroblocks of the frame, the DC component is set to a value representing black or gray, and the AC component is set to 0.
[0168]
In this way, by replacing a frame whose code amount exceeds the code amount specified in the equal length unit with another predetermined frame, avoiding syntax errors and complying with the tape format, Continuity can be maintained.
[0169]
The reason why the frames whose code amount exceeds the code amount defined in the equal length unit is replaced with a frame displaying black or gray because these are image patterns with the smallest code amount. That is, it is considered that a frame for displaying an achromatic single image having no color information has a small code amount. Other image patterns can be applied as long as the code amount of the equal length unit is smaller than the total code amount defined for the equal length unit.
[0170]
FIG. 27 shows a basic configuration of a VTR according to the second embodiment. Note that, in FIG. 27, the same reference numerals are given to portions common to FIG. 3 described above, and detailed description thereof is omitted. In the configuration of FIG. 27, a stream generator 532 and a switch circuit 533 are added to the code amount measuring unit 560 in addition to the configuration of FIG. 3 described above.
[0171]
The stream generator 532 generates and outputs a stream in which, for example, black is displayed. The switch circuit 533 switches the outputs of the memory 531 and the stream generator 532 based on the measurement result of the code amount measuring device 530 and supplies the same to the ECC encoder 514. The stream input from the terminal 512 is stored in the memory 531 and supplied to the code amount measuring device 530, and the code amount of the equal length unit is measured as in the first embodiment described above. The memory 531 is controlled so that the stream accumulated in the memory 531 is not output until the code amount measurement of the corresponding stream by the code amount measuring device 530 is completed.
[0172]
If the measured code amount does not exceed the specified value, the switch 531 selects the memory 531 side, and the stream stored in the memory 531 is read. The stream read from the memory 531 is supplied to the ECC encoder 514 via the switch circuit 533 and the switch circuit 513.
[0173]
On the other hand, if the code amount measured by the code amount measuring device 530 exceeds the specified value, the switch circuit 533 selects the stream generator 532 side, and the black or gray stream generated by the stream generator 532 is switched to the switch circuit. It is supplied to the ECC encoder 514 via the 533 and the switch circuit 513.
[0174]
The stream generator 532 includes, for example, a memory, in which data of a macro block or a DCT block representing black and each header information are stored in advance. By reading the data stored in the memory in order according to the clock, a stream representing black can be output from the stream generator 532. However, the present invention is not limited to this, and data may be sequentially output according to a predetermined procedure to output a stream representing black.
[0175]
Next explained is the third embodiment of the invention. In the third embodiment, a frame in which the code amount of the equal length unit exceeds a prescribed amount is replaced with a frame of a P picture that performs forward reference in MPEG2, for example. In a stream of frames in which the code amount of the equal length unit exceeds a prescribed amount, the picture_coding_type of the picture header 9 is changed to a P picture, and all macroblocks are forward-referenced difference = 0, that is, MC (Motion Compensation) = 0. , MV (Motion Vector) = 0, Not Coded.
[0176]
In this way, stream continuity can be avoided while avoiding syntax errors and complying with the tape format by replacing frames whose code amount exceeds the code amount specified in the equal length unit with frames that perform forward reference. Can be maintained. Furthermore, since the image formed by the replaced frame is formed by performing forward reference, it is not greatly different from the original image.
[0177]
In the third embodiment, the configuration of the second embodiment of FIG. 27 described above can be applied as it is. Here, the stream generator 532 has a memory, and in this memory, the picture_coding_type of the picture header 9 described above is set to a value indicating P picture, and all macroblocks are set to values indicating forward reference = 0. A stream of frames is stored in advance.
[0178]
The stream input from the terminal 512 is stored in the memory 531 and supplied to the code amount measuring device 530, and the code amount of the equal length unit is measured as in the first embodiment described above. The memory 531 is controlled so that the stream accumulated in the memory 531 is not output until the code amount measurement of the corresponding stream by the code amount measuring device 530 is completed.
[0179]
If the measured code amount does not exceed the prescribed value, the switch 531 selects the memory 531 side, the stream stored in the memory 531 is read out, and the ECC encoder 514 is passed through the switch circuit 533 and the switch circuit 513. To be supplied. On the other hand, if the code amount measured by the code amount measuring device 530 exceeds the prescribed value, the stream generator 532 side is selected by the switch circuit 533, and the P picture stream generated by the stream generator 532 is the switch circuit 533. And supplied to the ECC encoder 514 via the switch circuit 513.
[0180]
Note that the third embodiment is not applicable to a device that allows only I-pictures as picture_coding_type.
[0181]
Next explained is the fourth embodiment of the invention. In the fourth embodiment, a frame in which the code amount of the equal length unit exceeds the specified amount is already confirmed that the code amount of the equal length unit does not exceed the specified value. Is also replaced with the stream of the previous frame in time.
[0182]
FIG. 28 shows a basic configuration of a VTR according to the fourth embodiment. In FIG. 28, the same reference numerals are given to the portions common to FIG. 3 described above, and detailed description thereof is omitted. In the configuration in FIG. 28, a memory 540 and a switch circuit 541 are added in the code amount measuring unit 560 to the configuration in FIG. 3 described above.
[0183]
The stream input from the terminal 512 is stored in the memory 531 and supplied to the code amount measuring device 530, and the code amount of the equal length unit is measured as in the first embodiment described above. The memory 531 is controlled so that the stream accumulated in the memory 531 is not output until the code amount measurement of the corresponding stream by the code amount measuring device 530 is completed.
[0184]
As a result of the measurement by the code amount measuring device 530, if the code amount of the equal length unit does not exceed the specified value, the corresponding stream is read from the memory 531 and stored in the memory 540. At the same time, the switch circuit 541 selects the memory 531 side, and the stream read from the memory 531 is supplied to the ECC encoder 514 via the switch circuit 533 and the switch circuit 513.
[0185]
On the other hand, if the code amount measured by the code amount measuring device 530 exceeds the specified value, the switch circuit 533 selects the memory 540 side, and the stream of the past frame (previous frame) stored in the memory 540 is read. Then, it is supplied to the ECC encoder 514 via the switch circuit 540 and the switch circuit 513.
[0186]
According to the fourth embodiment, as a result of the measurement, the memory 540 is updated in units of frames in a stream in which the code amount in the equal length unit does not exceed the specified value. Then, the stream whose code amount exceeds the code amount defined in the equal length unit is replaced with the stream stored in the memory 540. By doing this, stream continuity can be maintained while avoiding syntax errors and complying with the tape format. Furthermore, since the frame of the stream whose code amount exceeds the code amount defined in the equal length unit is replaced with the nearest past frame, the formed image does not differ greatly from the original image.
[0187]
Next, a fifth embodiment of the present invention will be described. In the fifth embodiment, higher-order components of the DCT coefficient of each macroblock are deleted for a frame in which the code amount of the equalization unit exceeds a specified amount. Thereby, the code amount of the frame can be suppressed to a predetermined value or less of the equalization unit.
[0188]
FIG. 29 shows a basic configuration of a VTR according to the fifth embodiment. In FIG. 29, the same reference numerals are given to the portions common to FIG. 3 described above, and detailed description thereof is omitted. In the configuration of FIG. 29, a low-pass filter (LPF) 550 and a switch circuit 551 are added in the code amount measurement unit 560 to the configuration of FIG. 3 described above. The LPF 550 deletes a high-order component of the DCT coefficient in a predetermined manner.
[0189]
The stream input from the terminal 512 is stored in the memory 531 and supplied to the code amount measuring device 530, and the code amount of the equal length unit is measured as in the first embodiment described above. The memory 531 is controlled so that the stream accumulated in the memory 531 is not output until the code amount measurement of the corresponding stream by the code amount measuring device 530 is completed.
[0190]
As a result of the measurement by the code amount measuring device 530, if the code amount of the equal length unit does not exceed the specified value, the memory 531 side is selected by the switch circuit 551, and the stream read from the memory 531 is the switch circuit. 551 and the switch circuit 513 to be supplied to the ECC encoder 514.
[0191]
On the other hand, if the code amount measured by the code amount measuring device 530 exceeds the specified value, the switch circuit 551 selects the LPF 550 side. The MPEG ES read from the memory 531 is supplied to the LPF 550, the high-order component of the DCT coefficient is deleted in a predetermined manner, and the code amount of the equal length unit is suppressed to a predetermined value or less. The MPEG ES output from the LPF 550 is supplied to the ECC encoder 514 via the switch circuit 551 and the switch circuit 513.
[0192]
The following two methods are conceivable as the above-described method for deleting the high-order component of the DCT coefficient in the LPF 550.
(1) Delete all DCT coefficients of a predetermined order or more for all macroblocks in the frame. That is, frequency limitation is performed on the DCT coefficient.
(2) In principle, all the highest-order DCT coefficients are deleted from all macroblocks in the frame. At this time, DCT coefficients of a predetermined order or less are not deleted.
[0193]
The reason why the DCT coefficients of a predetermined order or less are protected by the method of deleting all the highest-order DCT coefficients in (2) above is to protect an image having a small frequency component such as a flat image.
[0194]
FIG. 30 shows an example of the configuration of the LPF 550. FIG. 30A shows an example configuration in which a variable-length code of an input stream is decoded and a high-order component of a DCT coefficient is deleted. In FIG. 30A, the variable length code of the input MPEG ES is decoded by the variable length code decoder 555, and the DCT coefficient is extracted. For the extracted DCT coefficients, the above-described process (1) of deleting all DCT coefficients of a predetermined order or higher, or (2) deleting all DCT coefficients of the highest order while leaving the coefficients of a predetermined order or less. The high-order component of the DCT coefficient is deleted. The stream from which the high-order component of the DCT coefficient has been deleted is supplied to the variable-length code encoder 556, subjected to variable-length encoding, converted into MPEG ES, and output.
[0195]
FIG. 30B shows an example configuration in which the variable-length code of the input stream is decomposed to remove higher-order components of the DCT coefficients. The input MPEG ES variable length code is decomposed into code words by the variable length code decomposer 557, and the code and the code length are output. Based on the code and the code length, the positions of DCT coefficients of a predetermined order or higher, or the DCT coefficients of the highest order and coefficients of a predetermined order or lower are determined and deleted. Then, (1) a DCT coefficient having a predetermined order or higher or (2) a stream in which the DCT coefficient having the highest order is deleted while a coefficient having a predetermined order or lower is left is supplied to the variable length code connector 558, and the variable length code is received. Reconnected and output as MPEG ES.
[0196]
Here, the deletion of the DCT coefficient can be performed using a memory. For example, taking the configuration of FIG. 30A as an example, the output decoded by the variable-length code decoder 555 is developed on a memory. Then, when data is read from the memory by the variable length code encoder 556, DCT coefficients other than the order to be deleted are read by performing predetermined address control. The read DCT coefficient is supplied to the variable length code encoder 556, and is variable length encoded into MPEG ES. This processing using the memory can be similarly applied to the configuration of FIG. 30B.
[0197]
Note that the configuration and operation of the LPF 550 described with reference to FIGS. 30A and 30B can be realized by controlling the recording-side MFC 106.
[0198]
According to the fifth embodiment, it is necessary to decode and decompose a variable length code and re-encode or connect it. However, since information is uniformly omitted from the entire screen, There is no distortion at a specific location.
[0199]
In the above description, the case where the present invention is applied to a stream compressed and encoded by the MPEG system has been described. However, the present invention is not limited to this example. For example, the present invention can be widely applied to devices such as JPEG (Joint Photographic Experts Group) to which a stream compression-encoded by another method is input.
[0200]
In the above description, the present invention has been described as applied to a recording / reproducing apparatus that records MPEG ES on a recording medium. However, the present invention is not limited to this example. The present invention can be widely applied not only to recording / reproducing apparatuses but also to video and audio equipment that handles compression-encoded streams.
[0201]
Further, in the above description, the recording medium is described as being a magnetic tape, but this is not limited to this example. For example, the present invention can be applied to a disk-shaped recording medium such as an MO (Magneto-Optical) disk. The present invention is not limited to this, and any recording device that records a stream encoded with a variable-length code on a recording medium with a code amount defined in an equal-length unit, for example, a disk recorder or a RAM (Random Access Memory) recorder The present invention can also be applied to a recording device using other recording media.
[0202]
Furthermore, in the above description, the case where the present invention is applied to a recording / reproducing apparatus that handles a stream obtained by compressing and encoding a video signal has been described, but this is not limited to this example. For example, the principle of the present invention is applied to an acoustic recording apparatus using audio compression technology such as AC-3 (Audio Code Number 3), AAC (Advanced Audio Coding), dts (Digital Theater Systems), and ATRAC (Adaptive Transform Acoustic Coding). It is possible to apply.
[0203]
In the above description, when the code amount of the equal length unit exceeds the specified value in the input MPEG ES, the recording is stopped, the stream is replaced, or the DCT coefficient is deleted. It is not limited to this example. For example, even if the code length of the equal length unit exceeds the specified value in the input MPEG ES, it is recorded as it is on the recording medium, and at that time, this is recorded in a predetermined area of the recording medium, for example, the system area. It may be recorded. In this case, when reproducing the recording medium, a predetermined process is performed on the stream of the equal length unit whose code amount exceeds the specified value on the reproducing device side.
[0204]
Furthermore, when the encoder cannot perform equal length when encoding a baseband signal, the present invention can be applied to relieve the encoder's insufficiency.
[0205]
【The invention's effect】
As described above, according to the present invention, when a stream encoded using a variable length code is equalized in a predetermined unit and recorded on a recording medium, the code amount of the equalized unit of the input stream is set. It is possible to cope with the case where the measured code amount is equal to or greater than a predetermined amount. Therefore, even when a stream exceeding the specified bit rate is input, the recording circuit fails, the recording medium fails, that is, the recording format on the recording medium breaks, the image is seriously disturbed in the reproduced image, and the illegal recording medium is created. It is effective in preventing troubles such as.
[0206]
In addition, when the encoder cannot perform equal length when encoding the baseband signal, the present invention can be applied to relieve the lack of encoder capability.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a basic configuration of a VTR that records and reproduces baseband signals using a magnetic tape as a recording medium.
FIG. 2 is a block diagram showing a basic configuration of a VTR that records and reproduces a stream in which a video signal is encoded by MPEG2.
FIG. 3 is a block diagram showing a basic configuration of a VTR according to the first embodiment of the present invention.
FIG. 4 is a schematic diagram schematically showing a hierarchical structure of MPEG2 data.
FIG. 5 is a schematic diagram showing data contents and bit allocation arranged in an MPEG2 stream.
FIG. 6 is a schematic diagram showing data contents and bit allocation arranged in an MPEG2 stream.
FIG. 7 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 8 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 9 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 10 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 11 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 12 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 13 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 14 is a schematic diagram illustrating data contents and bit allocation arranged in an MPEG2 stream.
FIG. 15 is a schematic diagram showing data contents and bit allocation arranged in an MPEG2 stream;
FIG. 16 is a diagram for explaining alignment of data in units of bytes.
FIG. 17 is a schematic diagram specifically showing a header of an MPEG stream.
FIG. 18 is a block diagram showing an example of the configuration of a recording / reproducing apparatus applicable to the present invention.
FIG. 19 is a schematic diagram illustrating an example of a track format formed on a magnetic tape.
FIG. 20 is a schematic diagram for explaining a video encoder output method and variable-length coding.
FIG. 21 is a schematic diagram for explaining rearrangement of the output order of the video encoder;
FIG. 22 is a schematic diagram for explaining a process of packing the rearranged data into a sync block;
FIG. 23 is a block diagram showing a more specific configuration of an ECC encoder.
FIG. 24 is a schematic diagram illustrating an example of an address configuration of a main memory.
FIG. 25 is a block diagram schematically showing an interface between an SDTI receiving unit and a recording-side MFC.
FIG. 26 shows a time chart of an example of signals exchanged between the SDTI receiving unit and the recording side MFC.
FIG. 27 is a block diagram showing a basic configuration of a VTR according to second and third embodiments of the present invention.
FIG. 28 is a block diagram showing a basic configuration of a VTR according to a fourth embodiment of the present invention.
FIG. 29 is a block diagram showing a basic configuration of a VTR according to a fifth embodiment of the present invention.
FIG. 30 is a block diagram illustrating an example of a configuration of an LPF.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Sequence header code, 2 ... Sequence header, 3 ... Sequence extension, 4 ... Extension and user data, 5 ... GOP start code, 6 ... GOP header, 7 ... User data, 8 ... picture start code, 9 ... picture header, 10 ... picture coding extension, 11 ... extension and user data, 12 ... slice start code, 13 ... slice header , 14 ... Macroblock header, 101 ... SDI receiver, 102 ... MPEG encoder, 106 ... Recording side multi-format converter (MFC), 108 ... SDTI receiver, 109 ... ECC Encoder, 112 ... magnetic tape, 113 ... ECC decoder, 114 ... playback MFC, 115 ... S TI output unit 116... MPEG decoder 118 118 SDI output unit 137 a 137 c packing unit 137 b video shuffling unit 139 outer code encoder 140 video Shuffling, 149 ... inner code encoder, 530 ... code quantity measuring device, 531, 540 ... memory, 532 ... stream generator, 550 ... LPF, 560 ... code quantity measuring unit

Claims (9)

可変長符号を用いて符号化されたストリームを所定の等長化単位で記録媒体に記録する記録装置において、
可変長符号を用いて符号化されたストリームが入力される入力手段と、
上記入力手段に入力された上記ストリームを所定の等長化単位で記録媒体に記録する第1の記録手段と、
上記入力手段に入力された上記ストリームの、上記所定の等長化単位の符号量を計測する計測手段と、
上記計測手段の計測結果に基づき、上記入力されたストリームの、上記所定の等長化単位の符号量が、上記所定の等長化単位に対して規定された符号総量を越えている場合、上記上記所定の等長化単位に対して規定された符号総量内のストリームと、上記所定の等長化単位に対して規定された符号総量を越えているストリーム分けて第2の記録手段に記録する第1のパッキング処理と、該所定の等長化単位に対して規定された符号総量を越えているストリームを読み出し、上記上記所定の等長化単位に対して規定された符号総量よりも小さく、空き領域が生じた領域に該所定の等長化単位に対して規定された符号総量を越えているストリームを読み込む第2のパッキング処理と、所定単位のブロック分の該ストリームを読み込んだ場合には、読み込みを一時中断し、外符号のパリティを生成し、上記第2のパッキング処理されたデータと、該外符号のパリティとを上記第1の記録手段に書き戻す書き戻し処理を行う制御手段と
を有することを特徴とする記録装置。
In a recording apparatus for recording a stream encoded using a variable length code on a recording medium in a predetermined equal length unit,
Input means for receiving a stream encoded using a variable-length code;
First recording means for recording the stream input to the input means on a recording medium in a predetermined equal length unit;
Measuring means for measuring a code amount of the predetermined equal length unit of the stream input to the input means;
When the code amount of the predetermined equal length unit of the input stream exceeds the total code amount defined for the predetermined equal length unit based on the measurement result of the measurement means , and stream in the code amount that has been defined for the predetermined equal length unit, the second recording means separately and stream exceeds the code amount that has been defined for the predetermined equal length units The first packing process to be recorded and a stream that exceeds the total code amount defined for the predetermined equal length unit are read out, and the stream is larger than the total code amount defined for the predetermined equal length unit. A second packing process for reading a stream that exceeds the total code amount defined for the predetermined equal length unit in an area where a small empty area has occurred, and when the stream for the predetermined unit block is read In , Suspends the reading, it generates a parity of outer code, and the second packing processing data, and a control means for the of the outer code parity performs processing written back is written back to the first recording means A recording apparatus comprising:
請求項1に記載の記録装置において、
上記制御手段は、上記記録手段による上記記録を停止するように制御することを特徴とする記録装置。
The recording apparatus according to claim 1,
The recording apparatus according to claim 1, wherein the control unit controls the recording unit to stop the recording.
請求項1に記載の記録装置において、
上記制御手段は、上記所定の等長化単位に対して上記規定された符号総量を超えている上記所定の等長化単位のストリームを、上記所定の等長化単位の符号量が上記規定された符号総量以内である他のストリームで置き換えるように制御することを特徴とする記録装置。
The recording apparatus according to claim 1,
The control means defines the stream of the predetermined equal length unit that exceeds the specified total code amount with respect to the predetermined equal length unit, and the code amount of the predetermined equal length unit is the predetermined. The recording apparatus is controlled so as to be replaced with another stream within the total code amount.
請求項3に記載の記録装置において、
単一の無彩色からなる画面を表示する上記所定の等長化単位のストリームを出力するストリーム出力手段をさらに有し、
上記他のストリームは、上記ストリーム出力手段から出力された上記所定の等長化単位のストリームであることを特徴とする記録装置。
The recording apparatus according to claim 3,
Stream output means for outputting a stream of the predetermined equal length unit for displaying a single achromatic screen;
The recording apparatus according to claim 1, wherein the other stream is a stream of the predetermined equal length unit output from the stream output means.
請求項3に記載の記録装置において、
上記計測手段の計測結果に基づき、上記入力されたストリームを上記記録媒体に記録する際に、上記所定の等長化単位に対して上記規定された符号総量を越えていない上記所定の等長化単位のストリームを記憶する記憶手段をさらに有し、
上記他のストリームは、上記記憶手段に記憶された上記所定の等長化単位のストリームであることを特徴とする記録装置。
The recording apparatus according to claim 3,
Based on the measurement result of the measuring means, when the input stream is recorded on the recording medium, the predetermined equal length not exceeding the specified total code amount with respect to the predetermined equal length unit. A storage means for storing the unit stream;
The recording apparatus according to claim 1, wherein the other stream is a stream of the predetermined equal length unit stored in the storage unit.
請求項1に記載の記録装置において、
上記制御手段は、上記規定された上記所定の等長化単位の上記規定された符号総量を超えている上記所定の等長化単位のストリームに対し、該ストリームの各マクロブロックについてDCT係数の高次成分を削除するように制御することを特徴とする記録装置。
The recording apparatus according to claim 1,
The control means, for a stream of the predetermined equal length unit exceeding the specified total code amount of the predetermined predetermined length unit, sets a high DCT coefficient for each macroblock of the stream. A recording apparatus that controls to delete a next component.
請求項6に記載の記録装置において、
上記各マクロブロックの所定次数以上の上記DCT係数を上記削除するようにしたことを特徴とする記録装置。
The recording apparatus according to claim 6, wherein
The recording apparatus according to claim 1, wherein the DCT coefficients of a predetermined order or more of each macroblock are deleted.
請求項6に記載の記録装置において、
上記各マクロブロックの、所定次数以下でなく、且つ、最高次数の上記DCT係数を全て削除するようにしたことを特徴とする記録装置。
The recording apparatus according to claim 6, wherein
A recording apparatus, wherein all the DCT coefficients not exceeding a predetermined order and having the highest order are deleted from each macroblock.
可変長符号を用いて符号化されたストリームを所定の等長化単位で記録媒体に記録する記録方法において、
可変長符号を用いて符号化されたストリームが入力される入力のステップと、
上記入力のステップに入力された上記ストリームの、上記所定の等長化単位の符号量を計測する計測のステップと、
入力されたストリームの、上記所定の等長化単位の符号量が、上記所定の等長化単位に対して規定された符号総量を越えている場合、上記上記所定の等長化単位に対して規定された符号総量内のストリームと、上記所定の等長化単位に対して規定された符号総量を越えているストリームとを分けて上記記録手段に記録する第1のパッキングのステップと、
該所定の等長化単位に対して規定された符号総量を越えているストリームを読み出し、上記上記所定の等長化単位に対して規定された符号総量よりも小さく、空き領域が生じた領域に該所定の等長化単位に対して規定された符号総量を越えているストリームを読み込む第2のパッキングのステップと
所定単位のブロック分の該ストリームを読み込んだ場合には、読み込みを一時中断し、外符号のパリティを生成し、上記第2のパッキング処理されたデータと、該外符号のパリティとを上記記録手段に書き戻す書き戻しのステップと
を有することを特徴とする記録方法。
In a recording method for recording a stream encoded using a variable length code on a recording medium in a predetermined equal length unit,
An input step in which a stream encoded using a variable length code is input;
A measurement step of measuring a code amount of the predetermined equal length unit of the stream input to the input step;
When the code amount of the predetermined equal length unit of the input stream exceeds the total code amount defined for the predetermined equal length unit, the code amount for the predetermined equal length unit A first packing step of separately recording a stream within a specified code total amount and a stream exceeding a code total amount specified for the predetermined equal length unit to the recording means;
A stream that exceeds the total code amount defined for the predetermined equal length unit is read, and the stream is smaller than the total code amount defined for the predetermined equal length unit and has an empty area. A second packing step of reading a stream that exceeds the total code amount defined for the predetermined equalization unit;
When the stream for a predetermined unit of block is read, the reading is temporarily interrupted to generate the parity of the outer code, and the second packing processed data and the parity of the outer code are stored in the recording means. And a write back step for writing back to the recording method.
JP2001193384A 2001-06-26 2001-06-26 Recording apparatus and method Expired - Fee Related JP4432284B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001193384A JP4432284B2 (en) 2001-06-26 2001-06-26 Recording apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001193384A JP4432284B2 (en) 2001-06-26 2001-06-26 Recording apparatus and method

Publications (2)

Publication Number Publication Date
JP2003009087A JP2003009087A (en) 2003-01-10
JP4432284B2 true JP4432284B2 (en) 2010-03-17

Family

ID=19031684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001193384A Expired - Fee Related JP4432284B2 (en) 2001-06-26 2001-06-26 Recording apparatus and method

Country Status (1)

Country Link
JP (1) JP4432284B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4994698B2 (en) 2006-04-13 2012-08-08 キヤノン株式会社 Information transmission apparatus and information transmission method

Also Published As

Publication number Publication date
JP2003009087A (en) 2003-01-10

Similar Documents

Publication Publication Date Title
JP4010066B2 (en) Image data recording apparatus and recording method, and image data recording / reproducing apparatus and recording / reproducing method
KR20020075897A (en) Stream processor
JP2003046944A (en) Signal processing equipment and method therefor, recording equipment and method therefor, regenerating equipment and method therefor, video camera, and image monitor
JP3921841B2 (en) Signal processing apparatus and method, and recording apparatus, reproducing apparatus, and recording / reproducing apparatus
JP4182641B2 (en) Data processing apparatus and method, and recording apparatus and method
US6643729B2 (en) Data processing apparatus and data recording apparatus
WO2001058171A1 (en) Recording device and method, and reproducing device and method
KR100739262B1 (en) Recording apparatus and method, and reproducing apparatus and method
JP2002204450A (en) Data processing unit and method
JP3775265B2 (en) Signal processing apparatus and method, recording / reproducing apparatus and method, and reproducing apparatus and method
JP2001169251A (en) Recording device and method, and reproducing device and method
US20020071491A1 (en) Signal processor
JP4432284B2 (en) Recording apparatus and method
KR100681992B1 (en) Recording apparatus and method
JP4038949B2 (en) Playback apparatus and method
JP2001155437A (en) Device and method for recording
JP2001169243A (en) Recorder and recording method, and reproducing device and reproducing method
JP3978903B2 (en) Data recording apparatus, data recording method, data processing apparatus, and data processing method
JP2000149455A (en) Data recorder and recording method, data recording and reproducing device and recording and reproducing method, and data recording medium
JP2000132914A (en) Data processor and data recorder
JP2000312341A (en) Data transmitter, method therefor, recorder and recording and reproducing device
JP2001218162A (en) Recording device and method
JP2000293435A (en) Device and method for reproducing data
JP2003006984A (en) Signal processor and its method
JP2002171241A (en) Stream transmitting device and its method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090826

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090901

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091102

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: 20091201

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091214

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees