JP2002171524A - Data processing apparatus and method - Google Patents
Data processing apparatus and methodInfo
- Publication number
- JP2002171524A JP2002171524A JP2000363426A JP2000363426A JP2002171524A JP 2002171524 A JP2002171524 A JP 2002171524A JP 2000363426 A JP2000363426 A JP 2000363426A JP 2000363426 A JP2000363426 A JP 2000363426A JP 2002171524 A JP2002171524 A JP 2002171524A
- Authority
- JP
- Japan
- Prior art keywords
- code
- data
- block
- stream
- dct
- 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.)
- Abandoned
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
(57)【要約】 (修正有)
【課題】 可変長符号を復号化する際にVLCテーブル
に存在しない不正なコードが入力されても安定的に動作
できるようにする。
【解決手段】 可変長符号化されたストリームの、DC
Tブロック以前のヘッダ部でVLCテーブルミスマッチ
が発生すれば(S11)、ヘッダ部が既定値と置き換え
られ、DCTブロックが灰色表示などを行うDC成分の
ブロックと置き換えられ、EOBが付加され、マクロブ
ロックが打ち切られる(S12)。VLCテーブルミス
マッチがヘッダ部に発生せず、DC係数部に発生すれば
(S14)、DC成分のDCTブロックが灰色表示など
を行うブロックと置き換えられ、EOBが付加され、マ
クロブロックが打ち切られる(S15)。VLCテーブ
ルミスマッチがDC係数部でも発生せず、AC係数部に
発生していれば(S16)、その位置からEOBが付加
され、マクロブロックが打ち切られる(S17)。
(57) [Summary] (With correction) [PROBLEMS] To enable stable operation even when an invalid code that does not exist in the VLC table is input when decoding a variable length code. SOLUTION: A variable-length-encoded stream of DC
If a VLC table mismatch occurs in the header section before the T block (S11), the header section is replaced with a default value, the DCT block is replaced with a DC component block that performs gray display, an EOB is added, and a macro block is added. Is terminated (S12). If the VLC table mismatch does not occur in the header portion but occurs in the DC coefficient portion (S14), the DCT block of the DC component is replaced with a block that performs gray display, an EOB is added, and the macro block is aborted (S15). ). If the VLC table mismatch does not occur in the DC coefficient part but occurs in the AC coefficient part (S16), EOB is added from that position and the macroblock is aborted (S17).
Description
【0001】[0001]
【発明の属する技術分野】この発明は、テーブルを参照
して可変長符号を復号化する場合に、テーブルに存在し
ない不正な可変長符号が入力されても、安定的に処理を
行うことができるようなデータ処理装置および方法に関
する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is capable of performing stable processing when decoding a variable length code with reference to a table, even if an invalid variable length code not present in the table is input. Such a data processing apparatus and method.
【0002】[0002]
【従来の技術】近年では、ディジタルビデオ信号を圧縮
符号化する方式として、MPEG(Moving Pictures Exp
erts Group)と称される符号化方式が広く用いられてい
る。MPEG2は、DCT(Discrete Cosine Transfor
m)と予測符号化を用いた動画圧縮の規格である。1フレ
ーム分の画像データを所定サイズのマクロブロックに分
割し、マクロブロック単位で動きベクトルを用いて予測
符号化され、マクロブロックがさらに分割されたDCT
ブロック単位でDCTが行われ、可変長符号化される。
現状では、より拡張性が高く高画質が得られるようにさ
れたMPEG2が主流となっている。2. Description of the Related Art In recent years, MPEG (Moving Pictures Exposure) has been used as a method for compressing and encoding digital video signals.
erts Group) is widely used. MPEG2 uses DCT (Discrete Cosine Transfor
m) and a video compression standard using predictive coding. DCT obtained by dividing one frame of image data into macroblocks of a predetermined size, performing predictive coding using a motion vector in macroblock units, and further dividing the macroblock.
DCT is performed for each block, and variable-length coding is performed.
At present, MPEG2, which has higher expandability and can obtain high image quality, is mainly used.
【0003】MPEG2のデータは、階層構造を有する
データストリームからなる。階層は、上位からシーケン
ス層、GOP(Group Of Picture)層、ピクチャ層、スラ
イス層、マクロブロック層となっており、各層は、それ
ぞれ1以上の下位構造を含む。各層は、それぞれヘッダ
部を有する。また、マクロブロック層を除く各層には、
ヘッダ部に先んじてスタートコードが配される。[0003] MPEG2 data is composed of a data stream having a hierarchical structure. The layers are a sequence layer, a GOP (Group Of Picture) layer, a picture layer, a slice layer, and a macroblock layer from the top, and each layer includes one or more lower structures. Each layer has a header part. In addition, each layer except the macroblock layer includes
A start code is provided prior to the header.
【0004】マクロブロックは、16画素×16画素か
らなるブロックであり、1以上のマクロブロックで1ス
ライスが構成される。一方、1ピクチャは、1画面に対
応し、スライスは、ピクチャを跨ることができない。ま
た、スライスヘッダは、画面の左端には必ず来るように
される。スライススタートコードには、当該スライスの
垂直方向の位置情報が含まれ、スライスヘッダには、拡
張されたスライス垂直位置情報や量子化スケール情報な
どが格納される。A macro block is a block composed of 16 pixels × 16 pixels, and one or more macro blocks constitute one slice. On the other hand, one picture corresponds to one screen, and a slice cannot cross pictures. In addition, the slice header always comes at the left end of the screen. The slice start code includes vertical position information of the slice, and the slice header stores extended slice vertical position information, quantization scale information, and the like.
【0005】また、近年では、例えば放送局などにおい
て、各機器間でのディジタルビデオ信号の伝送や、磁気
テープなどの記録媒体へのディジタルビデオ信号の記録
を、ディジタルビデオ信号をMPEGストリームのまま
用いて行うシステムが出現している。このようなシステ
ムでは、例えば、MPEGのエレメンタリストリーム
は、SDTI(Serial Data Transport Interface)に乗
せられて伝送され、受信側で例えばSDTIからMPE
Gエレメンタリストリームが取り出され、所定の処理が
なされる。In recent years, for example, in a broadcasting station or the like, transmission of a digital video signal between devices or recording of a digital video signal on a recording medium such as a magnetic tape is performed using the digital video signal as an MPEG stream. A system that does this has emerged. In such a system, for example, an MPEG elementary stream is transmitted on an SDTI (Serial Data Transport Interface), and is transmitted from the SDTI to the MPE on the receiving side.
The G elementary stream is extracted, and a predetermined process is performed.
【0006】[0006]
【発明が解決しようとする課題】ところで、MPEG2
のデータストリームは、上述したように可変長符号(以
降、VLC:Variable Length Codes)を用いて符号化
されている。可変長符号化は、そのデータの発生頻度に
応じた符号長を、所定のテーブル(以降、VLCテーブ
ルと称する)に基づいて割り当てることでなされる。復
号時には、VLCテーブルが参照されてVLCが解読さ
れる。By the way, MPEG2
Is encoded using variable length codes (hereinafter, VLC: Variable Length Codes) as described above. The variable length coding is performed by assigning a code length according to the frequency of occurrence of the data based on a predetermined table (hereinafter, referred to as a VLC table). At the time of decoding, the VLC table is referenced to decode the VLC.
【0007】VLCは、エラーが発生したような場合、
次のヘッダ(スタートコード)が検出されるまで、信頼
できなくなる。図51を用いて、このことについて説明
する。図51Aは、正常なストリームを示す。MPEG
のストリームは、例えばこのようにデータ幅が8ビット
(1バイト)のストリームである。データ列400にお
いて、スライス層の先頭を示す32ビット(4バイト)
からなるスライススタートコード(slice_sta
rt_code)に続けて、スライスヘッダのパラメー
タである5ビットからなるquantizer_sca
le_code、1ビットからなるextra_bit
_slice、マクロブロック層のパラメータである可
変長符号のmacro_address_increm
ent、macroblock_typeが配され、さ
らに続けて所定のパラメータが配される。[0007] When an error occurs, the VLC
Unreliable until the next header (start code) is detected. This will be described with reference to FIG. FIG. 51A shows a normal stream. MPEG
Is a stream having a data width of 8 bits (1 byte) as described above. 32 bits (4 bytes) indicating the start of the slice layer in the data string 400
Start code (slice_sta)
rt_code) and a 5-bit quantizer_sca which is a parameter of the slice header.
le_code, extra_bit consisting of 1 bit
_Slice, macro_address_increm of a variable-length code that is a parameter of the macroblock layer
ent and macroblock_type are arranged, followed by predetermined parameters.
【0008】データ列400内のslice_star
t_codeによって示されるスライス層内のあるDC
Tブロックのデータ列401において、図51Aの例で
は、VLCが所定のVLCテーブル(例えばMPEGに
規定されるDCT Coefficients Tab
le 1)に基づき、各行がそれぞれ意味を有する以下
のようなストリームになっている。Slice_star in the data string 400
some DC in the slice layer indicated by t_code
In the data sequence 401 of the T block, in the example of FIG. 51A, the VLC is a predetermined VLC table (for example, DCT Coefficients Tab specified in MPEG).
Based on le 1), each line has the following meaningful stream.
【0009】・・・・・ 0100 0000_0001_0010_0 0001_010 0010_0110_1 100 ・・・・・... 0100 0000 — 0001 — 0010 — 0 0001 — 010 0010 — 0110 — 1 100.
【0010】このようなストリームに対し、斜線部の位
置でビット反転が発生し、図51Bの位置にエラーが発
生したとする。すると、ストリームは、図51Cのよう
に変化する。これを、上述した所定のVLCテーブルに
当てはめると、次のようになる。It is assumed that bit inversion occurs in such a stream at the position of the hatched portion, and an error occurs in the position of FIG. 51B. Then, the stream changes as shown in FIG. 51C. When this is applied to the above-mentioned predetermined VLC table, the following is obtained.
【0011】・・・・・ 0100 0000_0101_0010_0000_1010_
0010 0110 1100 ・・・・・... 0100 0000 — 0101 — 0010 — 0000 — 1010 —
0010 0110 1100 ・ ・ ・ ・ ・
【0012】この変化したストリームにおいて、上述し
たVLCテーブル(DCT Coefficients
Table 1)に基づき、2行目は、escape
(0000_01)+run 18(01_0010)
+level 162(0000_1010_001
0)を意味し、3行目は、EOB(End Of Block)を意味
する。このように、VLCは、1ビットだけのビット反
転で、元のストリームとは全く異なるVLCとして解か
れてしまう可能性がある。したがって、エラーが発生し
たVLC以降は、例えVLCが解けたとしても信頼でき
ず、次のスタートコード402までのデータを捨てる必
要がある。なお、スタートコードは、図51に示される
ように、バイトアラインされた32ビットのユニークな
コードであるため、検出が可能であり、エラーから復帰
することができる。In the changed stream, the VLC table (DCT Coefficients) described above is used.
Based on Table 1), the second line is Escape
(0000_01) + run 18 (01_0010)
+ Level 162 (0000_1010_001
0), and the third line means EOB (End Of Block). As described above, the VLC may be solved as a VLC completely different from the original stream by bit inversion of only one bit. Therefore, after the VLC in which an error has occurred, even if the VLC is unreliable, it is not reliable, and data up to the next start code 402 needs to be discarded. Since the start code is a 32-bit unique code byte-aligned as shown in FIG. 51, the start code can be detected and can recover from an error.
【0013】そのため、MPEGのストリームを復号化
するMPEGデコーダでは、例えばビット反転が発生し
たり、ストリームが途切れたりしたような、不正なMP
EGストリームが入力されると、MPEGにより定めら
れたシンタクスに存在しない、すなわち、復号時に参照
されるVLCテーブルに存在しないVLCにより、ハン
グアップなどの障害が発生する可能性があるという問題
点があった。これにより、安定的なシステムを実現する
ことが難しくなるという問題点があった。Therefore, in an MPEG decoder for decoding an MPEG stream, an illegal MP such as a bit inversion or a broken stream may occur.
When an EG stream is input, there is a problem that a failure such as a hang-up may occur due to a VLC that does not exist in the syntax defined by MPEG, that is, does not exist in the VLC table referred to during decoding. Was. As a result, there is a problem that it is difficult to realize a stable system.
【0014】したがって、この発明の目的は、MPEG
ストリームを扱うようなシステムにおいて、VLCの復
号時に参照されるVLCテーブルに存在しない、不正な
VLCが入力されても安定的に動作できるデータ処理装
置および方法を提供することにある。Therefore, an object of the present invention is to provide an MPEG
It is an object of the present invention to provide a data processing apparatus and method that can operate stably even when an invalid VLC that is not present in a VLC table referred to when decoding a VLC is input in a system that handles a stream.
【0015】[0015]
【課題を解決するための手段】この発明は、上述した課
題を解決するために、可変長符号化されたストリームを
処理するデータ処理装置において、可変長符号化された
ストリームの可変長符号から、可変長符号を表すパラメ
ータに対応していない符号を検出する検出手段と、検出
手段による検出結果の内容に応じて、ストリームを修正
する修正手段と、検出手段による検出後に、次の処理開
始を指示する指示手段とを有することを特徴とするデー
タ処理装置である。SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention provides a data processing apparatus for processing a stream which has been subjected to variable-length encoding. Detecting means for detecting a code that does not correspond to the parameter representing the variable-length code, correcting means for correcting the stream according to the content of the detection result by the detecting means, and instructing to start the next processing after detection by the detecting means A data processing device comprising:
【0016】また、この発明は、可変長符号化されたス
トリームを処理するデータ処理方法において、可変長符
号化されたストリームの可変長符号のうち、可変長符号
を表すパラメータと合致していないものを検出する検出
のステップと、検出のステップによる検出結果の内容に
応じて、ストリームを修正する修正のステップと、検出
のステップによる検出後に、次の処理開始を指示する指
示のステップとを有することを特徴とするデータ処理方
法である。According to the present invention, there is provided a data processing method for processing a variable-length coded stream, wherein a variable-length code of the variable-length coded stream does not match a parameter representing the variable-length code. Detecting a stream, correcting the stream according to the content of the detection result in the detection step, and instructing to start the next process after the detection in the detection step. This is a data processing method characterized by the following.
【0017】上述したように、この発明は、所定ブロッ
ク単位で可変長符号化されたストリームの可変長符号か
ら、可変長符号を表すパラメータに対応していない符号
を検出し、検出結果の内容に応じてストリームを修正す
ると共に、検出後に次の処理開始を指示するようにして
いるため、イレギュラーな可変長符号を含むストリーム
が入力されても安定的に動作することができる。As described above, the present invention detects a code that does not correspond to a parameter representing a variable-length code from a variable-length code of a stream that has been subjected to variable-length coding in a predetermined block unit, and Since the stream is modified accordingly and the start of the next process is instructed after the detection, even if a stream including an irregular variable length code is input, it can operate stably.
【0018】[0018]
【発明の実施の形態】以下、この発明をディジタルVT
R(Video Tape Recoder)に対して適用した一実施形態に
ついて説明する。この一実施形態は、放送局の環境で使
用して好適なものである。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described with reference to a digital VT.
An embodiment applied to R (Video Tape Recorder) will be described. This embodiment is suitable for use in a broadcast station environment.
【0019】この一実施形態では、圧縮方式としては、
例えばMPEG2方式が採用される。MPEG2は、動
き補償予測符号化と、DCTによる圧縮符号化とを組み
合わせたものである。MPEG2のデータ構造は、階層
構造をなしている。図1は、一般的なMPEG2のデー
タストリームの階層構造を概略的に示す。図1に示され
るように、データ構造は、下位から、マクロブロック層
(図1E)、スライス層(図1D)、ピクチャ層(図1
C)、GOP層(図1B)およびシーケンス層(図1
A)となっている。In this embodiment, the compression method is as follows.
For example, the MPEG2 system is adopted. MPEG2 is a combination of motion-compensated predictive coding and DCT-based compression coding. The data structure of MPEG2 has a hierarchical structure. FIG. 1 schematically shows a hierarchical structure of a general MPEG2 data stream. As shown in FIG. 1, the data structure includes a macroblock layer (FIG. 1E), a slice layer (FIG. 1D), and a picture layer (FIG.
C), GOP layer (FIG. 1B) and sequence layer (FIG. 1)
A).
【0020】図1Eに示されるように、マクロブロック
層は、DCTを行う単位であるDCTブロックからな
る。マクロブロック層は、マクロブロックヘッダと複数
のDCTブロックとで構成される。スライス層は、図1
Dに示されるように、スライスヘッダ部と、1以上のマ
クロブロックより構成される。ピクチャ層は、図1Cに
示されるように、ピクチャヘッダ部と、1以上のスライ
スとから構成される。ピクチャは、1画面に対応する。
GOP層は、図1Bに示されるように、GOPヘッダ部
と、フレーム内符号化に基づくピクチャであるIピクチ
ャと、予測符号化に基づくピクチャであるPおよびBピ
クチャとから構成される。As shown in FIG. 1E, the macroblock layer is composed of DCT blocks, which are units for performing DCT. The macro block layer includes a macro block header and a plurality of DCT blocks. Fig. 1
As shown in D, it is composed of a slice header section and one or more macroblocks. As shown in FIG. 1C, the picture layer includes a picture header section and one or more slices. A picture corresponds to one screen.
As shown in FIG. 1B, the GOP layer includes a GOP header, I pictures that are pictures based on intra-frame coding, and P and B pictures that are pictures based on predictive coding.
【0021】Iピクチャ(Intra-coded picture:イント
ラ符号化画像) は、符号化されるときその画像1枚の中
だけで閉じた情報を使用するものである。従って、復号
時には、Iピクチャ自身の情報のみで復号できる。Pピ
クチャ(Predictive-coded picture :順方向予測符号化
画像)は、予測画像(差分をとる基準となる画像)とし
て、時間的に前の既に復号されたIピクチャまたはPピ
クチャを使用するものである。動き補償された予測画像
との差を符号化するか、差分を取らずに符号化するか、
効率の良い方をマクロブロック単位で選択する。Bピク
チャ(Bidirectionally predictive-coded picture :両
方向予測符号化画像)は、予測画像(差分をとる基準と
なる画像)として、時間的に前の既に復号されたIピク
チャまたはPピクチャ、時間的に後ろの既に復号された
IピクチャまたはPピクチャ、並びにこの両方から作ら
れた補間画像の3種類を使用する。この3種類のそれぞ
れの動き補償後の差分の符号化と、イントラ符号化の中
で、最も効率の良いものをマクロブロック単位で選択す
る。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, decoding can be performed using only 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 which is temporally previous as a predicted picture (a reference picture for taking a difference). . Whether to encode the difference from the motion-compensated predicted image, to encode without taking the difference,
The more efficient one is selected for each macroblock. A B picture (Bidirectionally predictive-coded picture) is a temporally previous I-picture or P-picture which is temporally preceding, and a temporally backward I-picture, We use three types of I-pictures or P-pictures already decoded, as well as interpolated pictures made from both. Among the three types of difference coding after motion compensation and intra coding, the most efficient one is selected for each macroblock.
【0022】従って、マクロブロックタイプとしては、
フレーム内符号化(Intra) マクロブロックと、過去から
未来を予測する順方向(Forward) フレーム間予測マクロ
ブロックと、未来から過去を予測する逆方向(Backward)
フレーム間予測マクロブロックと、前後両方向から予測
する両方向マクロブロックとがある。Iピクチャ内の全
てのマクロブロックは、フレーム内符号化マクロブロッ
クである。また、Pピクチャ内には、フレーム内符号化
マクロブロックと順方向フレーム間予測マクロブロック
とが含まれる。Bピクチャ内には、上述した4種類の全
てのタイプのマクロブロックが含まれる。Therefore, as the macroblock type,
Intra-frame coding (Intra) macroblocks, predicting the future from the past (Forward) Interframe predicting macroblocks, and predicting the future from the future (Backward)
There are an inter-frame prediction macro block and a bi-directional macro block predicted from both forward and backward directions. All macroblocks in an I picture are intra-coded macroblocks. The P picture includes an intra-frame coded macro block and a forward inter-frame predicted macro block. The B picture includes all four types of macroblocks described above.
【0023】GOPには、最低1枚のIピクチャが含ま
れ、PおよびBピクチャは、存在しなくても許容され
る。最上層のシーケンス層は、図1Aに示されるよう
に、シーケンスヘッダ部と複数のGOPとから構成され
る。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. 1A, the uppermost sequence layer includes a sequence header section and a plurality of GOPs.
【0024】MPEGのフォーマットにおいては、スラ
イスが1つの可変長符号系列である。可変長符号系列と
は、可変長符号を正しく復号化しなければデータの境界
を検出できない系列である。In the MPEG format, a slice is one variable-length code sequence. A variable-length code sequence is a sequence from which a data boundary cannot be detected unless the variable-length code is correctly decoded.
【0025】また、シーケンス層、GOP層、ピクチャ
層およびスライス層の先頭には、それぞれ、バイト単位
に整列された所定のビットパターンを有するスタートコ
ードが配される。この、各層の先頭に配されるスタート
コードを、シーケンス層においてはシーケンスヘッダコ
ード、他の階層においてはスタートコードと称し、ビッ
トパターンが〔00 00 01 xx〕(以下、〔〕
による表記は、16進表記であることを示す)とされ
る。2桁ずつ示され、〔xx〕は、各層のそれぞれで異
なるビットパターンが配されることを示す。At the head of the sequence layer, GOP layer, picture layer and slice layer, a start code having a predetermined bit pattern arranged in byte units is arranged. The start code arranged at the top of each layer is called a sequence header code in the sequence layer and a start code in other layers, and the bit pattern is [00 00 01 xx] (hereinafter []).
Is a hexadecimal notation). Two digits are shown, and [xx] indicates that a different bit pattern is arranged in each of the layers.
【0026】すなわち、スタートコードおよびシーケン
スヘッダコードは、4バイト(=32ビット)からな
り、4バイト目の値に基づき、後に続く情報の種類を識
別できる。これらスタートコードおよびシーケンスヘッ
ダコードは、バイト単位で整列されているため、4バイ
トのパターンマッチングを行うだけで捕捉することがで
きる。That is, the start code and the sequence header code are composed of 4 bytes (= 32 bits), and can identify the type of subsequent information based on the value of the 4th byte. Since these start codes and sequence header codes are arranged in byte units, they can be captured only by performing 4-byte pattern matching.
【0027】さらに、スタートコードに続く1バイトの
上位4ビットが、後述する拡張データ領域の内容の識別
子となっている。この識別子の値により、その拡張デー
タの内容を判別することができる。Further, the upper 4 bits of 1 byte following the start code are identifiers of the contents of the extended data area described later. The content of the extension data can be determined from the value of the identifier.
【0028】なお、マクロブロック層およびマクロブロ
ック内のDCTブロックには、このような、バイト単位
に整列された所定のビットパターンを有する識別コード
は、配されない。It should be noted that such an identification code having a predetermined bit pattern aligned in byte units is not allocated to the macro block layer and the DCT block in the macro block.
【0029】各層のヘッダ部について、より詳細に説明
する。図1Aに示すシーケンス層では、先頭にシーケン
スヘッダ2が配され、続けて、シーケンス拡張3、拡張
およびユーザデータ4が配される。シーケンスヘッダ2
の先頭には、シーケンスヘッダコード1が配される。ま
た、図示しないが、シーケンス拡張3およびユーザデー
タ4の先頭にも、それぞれ所定のスタートコードが配さ
れる。シーケンスヘッダ2から拡張およびユーザデータ
4までがシーケンス層のヘッダ部とされる。The header section of each layer will be described in more detail. In the sequence layer shown in FIG. 1A, a sequence header 2 is arranged at the head, and a sequence extension 3, an extension and user data 4 are arranged subsequently. Sequence header 2
Is arranged at the head of the sequence header code 1. Although not shown, a predetermined start code is also arranged at the head of each of the sequence extension 3 and the user data 4. From the sequence header 2 to the extension and user data 4 are used as the header part of the sequence layer.
【0030】シーケンスヘッダ2には、図2に内容と割
当ビットが示されるように、シーケンスヘッダコード
1、水平方向画素数および垂直方向ライン数からなる符
号化画像サイズ、アスペクト比、フレームレート、ビッ
トレート、VBV(Video Buffering Verifier)バッファ
サイズ、量子化マトリクスなど、シーケンス単位で設定
される情報がそれぞれ所定のビット数を割り当てられて
格納される。As shown in FIG. 2, the sequence header 2 includes a sequence header code 1, an encoded image size including the number of horizontal pixels and the number of vertical lines, an aspect ratio, a frame rate, and a bit. Information set in units of a sequence, such as a rate, a VBV (Video Buffering Verifier) buffer size, and a quantization matrix, is assigned a predetermined number of bits and stored.
【0031】シーケンスヘッダに続く拡張スタートコー
ド後のシーケンス拡張3では、図3に示されるように、
MPEG2で用いられるプロファイル、レベル、クロマ
(色差)フォーマット、プログレッシブシーケンスなど
の付加データが指定される。拡張およびユーザデータ4
は、図4に示されるように、シーケンス表示()によ
り、原信号のRGB変換特性や表示画サイズの情報を格
納できると共に、シーケンススケーラブル拡張()によ
り、スケーラビリティモードやスケーラビリティのレイ
ヤ指定などを行うことができる。In sequence extension 3 after the extension start code following the sequence header, as shown in FIG.
Additional data such as a profile, a level, a chroma (color difference) format, and a progressive sequence used in MPEG2 are specified. Extension and user data 4
As shown in FIG. 4, the sequence display () can store the information of the RGB conversion characteristics and the display image size of the original signal, and the sequence scalable extension () specifies the scalability mode and the scalability layer. be able to.
【0032】シーケンス層のヘッダ部に続けて、GOP
が配される。GOPの先頭には、図1Bに示されるよう
に、GOPヘッダ6およびユーザデータ7が配される。
GOPヘッダ6およびユーザデータ7がGOPのヘッダ
部とされる。GOPヘッダ6には、図5に示されるよう
に、GOPのスタートコード5、タイムコード、GOP
の独立性や正当性を示すフラグがそれぞれ所定のビット
数を割り当てられて格納される。ユーザデータ7は、図
6に示されるように、拡張データおよびユーザデータを
含む。図示しないが、拡張データおよびユーザデータの
先頭には、それぞれ所定のスタートコードが配される。Following the header of the sequence layer, GOP
Is arranged. At the head of the GOP, a GOP header 6 and user data 7 are arranged as shown in FIG. 1B.
The GOP header 6 and the user data 7 are used as a GOP header. As shown in FIG. 5, the GOP header 6 includes a GOP start code 5, a time code, a GOP
Flags indicating the independence and the validity of each are assigned a predetermined number of bits and stored. As shown in FIG. 6, the user data 7 includes extension data and user data. Although not shown, a predetermined start code is arranged at the head of each of the extension data and the user data.
【0033】GOP層のヘッダ部に続けて、ピクチャが
配される。ピクチャの先頭には、図1Cに示されるよう
に、ピクチャヘッダ9、ピクチャ符号化拡張10、なら
びに、拡張およびユーザデータ11が配される。ピクチ
ャヘッダ9の先頭には、ピクチャスタートコード8が配
される。また、ピクチャ符号化拡張10、ならびに、拡
張およびユーザデータ11の先頭には、それぞれ所定の
スタートコードが配される。ピクチャヘッダ9から拡張
およびユーザデータ11までがピクチャのヘッダ部とさ
れる。Following the header section of the GOP layer, a picture is arranged. As shown in FIG. 1C, a picture header 9, a picture coding extension 10, and extension and user data 11 are arranged at the head of the picture. At the head of the picture header 9, a picture start code 8 is arranged. A predetermined start code is provided at the head of the picture coding extension 10 and the extension and user data 11, respectively. The part from the picture header 9 to the extension and user data 11 is the header part of the picture.
【0034】ピクチャヘッダ9は、図7に示されるよう
に、ピクチャスタートコード8が配されると共に、画面
に関する符号化条件が設定される。ピクチャ符号化拡張
10では、図8に示されるように、前後方向および水平
/垂直方向の動きベクトルの範囲の指定や、ピクチャ構
造の指定がなされる。また、ピクチャ符号化拡張10で
は、イントラマクロブロックのDC係数精度の設定、V
LCタイプの選択、線型/非線型量子化スケールの選
択、DCTにおけるスキャン方法の選択などが行われ
る。In the picture header 9, as shown in FIG. 7, a picture start code 8 is arranged, and coding conditions for a picture are set. In the picture coding extension 10, as shown in FIG. 8, the range of the motion vector in the front-back direction and the horizontal / vertical direction and the picture structure are specified. In the picture coding extension 10, the setting of the DC coefficient accuracy of the intra macroblock,
Selection of an LC type, selection of a linear / non-linear quantization scale, selection of a scanning method in DCT, and the like are performed.
【0035】拡張およびユーザデータ11では、図9に
示されるように、量子化マトリクスの設定や、空間スケ
ーラブルパラメータの設定などが行われる。これらの設
定は、ピクチャ毎に可能となっており、各画面の特性に
応じた符号化を行うことができる。また、拡張およびユ
ーザデータ11では、ピクチャの表示領域の設定を行う
ことが可能となっている。さらに、拡張およびユーザデ
ータ11では、著作権情報を設定することもできる。In the extension and user data 11, as shown in FIG. 9, setting of a quantization matrix, setting of a spatial scalable parameter, and the like are performed. These settings can be made for each picture, and encoding can be performed according to the characteristics of each screen. Further, in the extension and user data 11, it is possible to set the display area of the picture. Further, copyright information can be set in the extension and user data 11.
【0036】ピクチャ層のヘッダ部に続けて、スライス
が配される。スライスの先頭には、図1Dに示されるよ
うに、スライスヘッダ13が配され、スライスヘッド1
3の先頭に、スライススタートコード12が配される。
図10に示されるように、スライススタートコード12
は、当該スライスの垂直方向の位置情報を含む。スライ
スヘッダ13には、さらに、拡張されたスライス垂直位
置情報や、量子化スケール情報などが格納される。Following the header part of the picture layer, slices are arranged. At the head of the slice, as shown in FIG. 1D, a slice header 13 is arranged, and the slice head 1
3, a slice start code 12 is provided.
As shown in FIG.
Contains vertical position information of the slice. The slice header 13 further stores extended slice vertical position information, quantization scale information, and the like.
【0037】スライス層のヘッダ部に続けて、マクロブ
ロックが配される(図1E)。マクロブロックでは、マ
クロブロックヘッダ14に続けて複数のDCTブロック
が配される。上述したように、マクロブロックヘッダ1
4にはスタートコードが配されない。図11に示される
ように、マクロブロックヘッダ14は、マクロブロック
の相対的な位置情報が格納されると共に、動き補償モー
ドの設定、DCT符号化に関する詳細な設定などを指示
する。Following the header portion of the slice layer, a macro block is arranged (FIG. 1E). In the macro block, a plurality of DCT blocks are arranged following the macro block header 14. As described above, the macroblock header 1
4 has no start code. As shown in FIG. 11, the macroblock header 14 stores the relative position information of the macroblock, and instructs the setting of the motion compensation mode, the detailed setting related to the DCT coding, and the like.
【0038】マクロブロックヘッダ14に続けて、DC
Tブロックが配される。DCTブロックは、図12に示
されるように、可変長符号化されたDCT係数およびD
CT係数に関するデータが格納される。Following the macroblock header 14, DC
A T block is provided. As shown in FIG. 12, the DCT block includes a variable-length coded DCT coefficient and D
Data on CT coefficients is stored.
【0039】なお、図1では、各層における実線の区切
りは、データがバイト単位に整列されていることを示
し、点線の区切りは、データがバイト単位に整列されて
いないことを示す。すなわち、ピクチャ層までは、図1
3Aに一例が示されるように、符号の境界がバイト単位
で区切られているのに対し、スライス層では、スライス
スタートコード12のみがバイト単位で区切られてお
り、各マクロブロックは、図13Bに一例が示されるよ
うに、ビット単位で区切ることができる。同様に、マク
ロブロック層では、各DCTブロックをビット単位で区
切ることができる。In FIG. 1, a solid line delimiter in each layer indicates that data is aligned in byte units, and a dotted line delimiter indicates that data is not aligned in byte units. That is, up to the picture layer, FIG.
As shown in an example in FIG. 3A, the boundaries of the codes are separated in units of bytes, whereas in the slice layer, only the slice start code 12 is separated in units of bytes, and each macroblock is shown in FIG. 13B. As an example is shown, it can be divided on a bit-by-bit basis. Similarly, in the macroblock layer, each DCT block can be divided in bit units.
【0040】一方、復号および符号化による信号の劣化
を避けるためには、符号化データ上で編集することが望
ましい。このとき、PピクチャおよびBピクチャは、そ
の復号に、時間的に前のピクチャあるいは前後のピクチ
ャを必要とする。そのため、編集単位を1フレーム単位
とすることができない。この点を考慮して、この一実施
形態では、1つのGOPが1枚のIピクチャからなるよ
うにしている。On the other hand, in order to avoid signal deterioration due to decoding and encoding, it is desirable to edit the encoded data. At this time, the P picture and the B picture require a temporally preceding picture or a preceding and succeeding picture for decoding. Therefore, the editing unit cannot be set to one frame unit. In consideration of this point, in this embodiment, one GOP is made up of one I picture.
【0041】また、例えば1フレーム分の記録データが
記録される記録領域が所定のものとされる。MPEG2
では、可変長符号化を用いているので、1フレーム期間
に発生するデータを所定の記録領域に記録できるよう
に、1フレーム分の発生データ量が制御される。さら
に、この一実施形態では、磁気テープへの記録に適する
ように、1スライスを1マクロブロックから構成すると
共に、1マクロブロックを、所定長の固定枠に当てはめ
る。For example, a recording area in which recording data for one frame is recorded is a predetermined area. MPEG2
Since the variable length coding is used, the amount of generated data for one frame is controlled so that data generated during one frame period can be recorded in a predetermined recording area. Further, in this 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 having a predetermined length.
【0042】図14は、この一実施形態におけるMPE
Gストリームのヘッダを具体的に示す。図1で分かるよ
うに、シーケンス層、GOP層、ピクチャ層、スライス
層およびマクロブロック層のそれぞれのヘッダ部は、シ
ーケンス層の先頭から連続的に現れる。図14は、シー
ケンスヘッダ部分から連続した一例のデータ配列を示し
ている。FIG. 14 shows the MPE in this embodiment.
The header of the G stream is specifically shown. As can be seen from FIG. 1, the respective header portions of the sequence layer, the GOP layer, the picture layer, the slice layer, and the macroblock layer appear continuously from the head of the sequence layer. FIG. 14 shows an example of a data array that is continuous from the sequence header portion.
【0043】先頭から、12バイト分の長さを有するシ
ーケンスヘッダ2が配され、続けて、10バイト分の長
さを有するシーケンス拡張3が配される。シーケンス拡
張3の次には、拡張およびユーザデータ4が配される。
拡張およびユーザデータ4の先頭には、4バイト分のユ
ーザデータスタートコードが配され、続くユーザデータ
領域には、SMPTEの規格に基づく情報が格納され
る。From the beginning, a sequence header 2 having a length of 12 bytes is arranged, followed by a sequence extension 3 having a length of 10 bytes. Subsequent to the sequence extension 3, extension and user data 4 are arranged.
A 4-byte user data start code is arranged at the head of the extension and user data 4, and information based on the SMPTE standard is stored in the subsequent user data area.
【0044】シーケンス層のヘッダ部の次は、GOP層
のヘッダ部となる。8バイト分の長さを有するGOPヘ
ッダ6が配され、続けて拡張およびユーザデータ7が配
される。拡張およびユーザデータ7の先頭には、4バイ
ト分のユーザデータスタートコードが配され、続くユー
ザデータ領域には、既存の他のビデオフォーマットとの
互換性をとるための情報が格納される。The header part of the sequence layer is followed by the header part of the GOP layer. A GOP header 6 having a length of 8 bytes is arranged, followed by extension and user data 7. At the beginning of the extension and user data 7, a 4-byte user data start code is arranged, and in the subsequent user data area, information for ensuring compatibility with other existing video formats is stored.
【0045】GOP層のヘッダ部の次は、ピクチャ層の
ヘッダ部となる。9バイトの長さを有するピクチャヘッ
ダ9が配され、続けて9バイトの長さを有するピクチャ
符号化拡張10が配される。ピクチャ符号化拡張10の
後に、拡張およびユーザデータ11が配される。拡張お
よびユーザデータ11の先頭側133バイトに拡張およ
びユーザデータが格納され、続いて4バイトの長さを有
するユーザデータスタートコード15が配される。ユー
ザデータスタートコード15に続けて、既存の他のビデ
オフォーマットとの互換性をとるための情報が格納され
る。さらに、ユーザデータスタートコード16が配さ
れ、ユーザデータスタートコード16に続けて、SMP
TEの規格に基づくデータが格納される。ピクチャ層の
ヘッダ部の次は、スライスとなる。The header part of the GOP layer is followed by 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 coding 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. Following the user data start code 15, information for compatibility with another existing video format is stored. Further, a user data start code 16 is provided.
Data based on the TE standard is stored. Next to the header part of the picture layer is a slice.
【0046】マクロブロックについて、さらに詳細に説
明する。スライス層に含まれるマクロブロックは、複数
のDCTブロックの集合であり、DCTブロックの符号
化系列は、量子化されたDCT係数の系列を0係数の連
続回数(ラン)とその直後の非0系列(レベル)を1つ
の単位として可変長符号化したものである。マクロブロ
ックならびにマクロブロック内のDCTブロックには、
バイト単位に整列した識別コードが付加されない。The macro block will be described in more detail. The macro block included in the slice layer is a set of a plurality of DCT blocks, and the coded sequence of the DCT block is obtained by converting the sequence of quantized DCT coefficients into the number of consecutive 0 coefficients (run) and the non-zero sequence immediately after it. (Level) is variable-length coded as one unit. Macro blocks and DCT blocks within the macro block include:
Identification codes aligned in byte units are not added.
【0047】マクロブロックは、画面(ピクチャ)を1
6画素×16ラインの格子状に分割したものである。ス
ライスは、例えばこのマクロブロックを水平方向に連結
してなる。連続するスライスの前のスライスの最後のマ
クロブロックと、次のスライスの先頭のマクロブロック
とは連続しており、スライス間でのマクロブロックのオ
ーバーラップを形成することは、許されていない。ま
た、画面のサイズが決まると、1画面当たりのマクロブ
ロック数は、一意に決まる。The macro block is composed of one screen (picture).
It is divided into a grid of 6 pixels × 16 lines. A slice is formed by connecting these macroblocks in the horizontal direction, for example. The last macroblock of the previous slice of a continuous slice and the first macroblock of the next slice are continuous, and it is not allowed to form a macroblock overlap between slices. When the size of the screen is determined, the number of macroblocks per screen is uniquely determined.
【0048】画面上での垂直方向および水平方向のマク
ロブロック数を、それぞれmb_heightおよびm
b_widthと称する。画面上でのマクロブロックの
座標は、マクロブロックの垂直位置番号を、上端を基準
に0から数えたmb_rowと、マクロブロックの水平
位置番号を、左端を基準に0から数えたmb_colu
mnとで表すように定められている。画面上でのマクロ
ブロックの位置を一つの変数で表すために、macro
block_addressを、macroblock
_address=mb_row×mb_width+
mb_columnこのように定義する。The numbers of macroblocks in the vertical and horizontal directions on the screen are mb_height and m, respectively.
Called b_width. The coordinates of the macroblock on the screen are the vertical position number of the macroblock, mb_row counted from 0 based on the upper end, and the horizontal position number of the macroblock, and mb_col counted from 0 based on the left end.
mn. To represent the position of the macroblock on the screen with one variable, macro
block_address is set to macroblock
_Address = mb_row × mb_width +
mb_column is defined in this way.
【0049】ストリーム上でのスライスとマクロブロッ
クの順は、macroblock_addressの小
さい順でなければいけないと定められている。すなわ
ち、ストリームは、画面の上から下、左から右の順に伝
送される。It is specified that the order of slices and macroblocks on a stream must be in the order of smaller macroblock_address. That is, the streams are transmitted from top to bottom of the screen and from left to right.
【0050】MPEGでは、1スライスを1ストライプ
(16ライン)で構成するのが普通であり、画面の左端
から可変長符号化が始まり、右端で終わる。従って、V
TRによってそのままMPEGエレメンタリストリーム
を記録した場合、高速再生時に、再生できる部分が画面
の左端に集中し、均一に更新することができない。ま
た、データのテープ上の配置を予測できないため、テー
プパターンを一定の間隔でトレースしたのでは、均一な
画面更新ができなくなる。さらに、1箇所でもエラーが
発生すると、画面右端まで影響し、次のスライスヘッダ
が検出されるまで復帰できない。このために、1スライ
スを1マクロブロックで構成するようにしている。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, V
When the MPEG elementary stream is recorded as it is by the TR, at the time of high-speed reproduction, the reproducible portion is concentrated on the left end of the screen and cannot be uniformly updated. Further, since the arrangement of the data on the tape cannot be predicted, if the tape pattern is traced at a constant interval, the screen cannot be uniformly updated. Furthermore, if an error occurs even at one location, it affects the right edge of the screen and cannot return until the next slice header is detected. For this purpose, one slice is composed of one macroblock.
【0051】図15は、この一実施形態による記録再生
装置の構成の一例を示す。記録時には、端子100から
入力されたディジタル信号がSDI(Serial data Inter
face) 受信部101に供給される。SDIは、(4:
2:2)コンポーネントビデオ信号とディジタルオーデ
ィオ信号と付加的データとを伝送するために、SMPT
Eによって規定されたインターフェイスである。SDI
受信部101で、入力されたディジタル信号からディジ
タルビデオ信号とディジタルオーディオ信号とがそれぞ
れ抽出され、ディジタルビデオ信号は、MPEGエンコ
ーダ102に供給され、ディジタルオーディオ信号は、
ディレイ103を介してECCエンコーダ109に供給
される。ディレイ103は、ディジタルオーディオ信号
とディジタルビデオ信号との時間差を解消するためのも
のである。FIG. 15 shows an example of the configuration of a recording / reproducing apparatus according to this embodiment. At the time of recording, the digital signal input from the terminal 100 is SDI (Serial Data Inter
face) It is supplied to the receiving unit 101. SDI is (4:
2: 2) SMPT for transmitting component video signals, digital audio signals and additional data
The interface specified by E. SDI
In the receiving unit 101, a digital video signal and a digital audio signal are respectively extracted from the input digital signal, the digital video signal is supplied to an MPEG encoder 102, and the digital audio signal is
The signal is supplied to the ECC encoder 109 via the delay 103. The delay 103 is for eliminating a time difference between the digital audio signal and the digital video signal.
【0052】また、SDI受信部101では、入力され
たディジタル信号から同期信号を抽出し、抽出された同
期信号をタイミングジェネレータ104に供給する。タ
イミングジェネレータ104には、端子105から外部
同期信号を入力することもできる。タイミングジェネレ
ータ104では、入力されたこれらの同期信号および後
述するSDTI受信部108から供給される同期信号の
うち、指定された信号に基づきタイミングパルスを生成
する。生成されたタイミングパルスは、この記録再生装
置の各部に供給される。The SDI receiver 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 be input to the timing generator 104 from a terminal 105. The timing generator 104 generates a timing pulse based on a specified signal among the input synchronization signal and a synchronization signal supplied from an SDTI receiving unit 108 described later. The generated timing pulse is supplied to each section of the recording / reproducing apparatus.
【0053】入力ビデオ信号は、MPEGエンコーダ1
02においてDCT(Discrete Cosine Transform) の処
理を受け、係数データに変換され、係数データが可変長
符号化される。MPEGエンコーダ102からの可変長
符号化(VLC)データは、MPEG2に準拠したエレ
メンタリストリーム(ES)である。この出力は、記録
側のマルチフォーマットコンバータ(以下、MFCと称
する)106の一方の入力端に供給される。The input video signal is supplied to the MPEG encoder 1
In 02, the signal undergoes DCT (Discrete Cosine Transform) processing, is converted into coefficient data, and the coefficient data is subjected to variable length coding. The variable length coded (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 recording-side multi-format converter (hereinafter, referred to as MFC) 106.
【0054】一方、入力端子107を通じて、SDTI
(Serial data Transport Interface) のフォーマットの
データが入力される。この信号は、SDTI受信部10
8で同期検出される。そして、フレームメモリ170に
バッファリングされ、エレメンタリストリームが抜き出
される。抜き出されたエレメンタリストリームは、記録
側MFC106から供給される信号readyによって
読み出しタイミングを制御されてフレームメモリ170
から読み出され、記録側MFC106の他方の入力端に
供給される。SDTI受信部108で同期検出されて得
られた同期信号は、上述したタイミングジェネレータ1
04に供給される。On the other hand, through the input terminal 107, the SDTI
(Serial data Transport Interface) format data is input. This signal is transmitted to the SDTI receiving unit 10
At 8, synchronization is detected. Then, it is buffered in the frame memory 170, and the elementary stream is extracted. The readout timing of the extracted elementary stream is controlled by a signal ready supplied from the recording side MFC 106, and the frame memory 170 is read out.
, And supplied to the other input end of the recording MFC 106. The synchronization signal obtained by synchronous detection by the SDTI receiving unit 108 is the same as that of the timing generator 1 described above.
04.
【0055】一実施形態では、例えばMPEG ES
(MPEGエレメンタリストリーム)を伝送するため
に、SDTI(Serial data Transport Interface)−C
P(Content Package) が使用される。このESは、4:
2:2のコンポーネントであり、また、上述したよう
に、全てIピクチャのストリームであり、1GOP=1
ピクチャの関係を有する。SDTI−CPのフォーマッ
トでは、MPEG ESがアクセスユニットへ分離さ
れ、また、フレーム単位のパケットにパッキングされて
いる。SDTI−CPでは、十分な伝送帯域(クロック
レートで27MHzまたは36MHz、ストリームビットレ
ートで270M bpsまたは360M bps)を使用してお
り、1フレーム期間で、バースト的にESを送ることが
可能である。In one embodiment, for example, MPEG ES
In order to transmit (MPEG elementary stream), SDTI (Serial Data Transport Interface) -C
P (Content Package) is used. This ES is 4:
2: 2 components, and as described above, all are I-picture streams, and 1 GOP = 1
It has a picture relationship. In the SDTI-CP format, the MPEG ES is separated into access units and is packed in packets in frame units. The SDTI-CP uses a sufficient transmission band (27 MHz or 36 MHz at a clock rate and 270 Mbps or 360 Mbps at a stream bit rate), and can transmit ES in bursts in one frame period.
【0056】すなわち、1フレーム期間のSAVの後か
らEAVまでの間に、システムデータ、ビデオストリー
ム、オーディオストリーム、AUXデータが配される。
1フレーム期間全体にデータが存在せずに、その先頭か
ら所定期間バースト状にデータが存在する。フレームの
境界においてSDTI−CPのストリーム(ビデオおよ
びオーディオ)をストリームの状態でスイッチングする
ことができる。SDTI−CPは、クロック基準として
SMPTEタイムコードを使用したコンテンツの場合
に、オーディオ、ビデオ間の同期を確立する機構を有す
る。さらに、SDTI−CPとSDIとが共存可能なよ
うに、フォーマットが決められている。That is, system data, a video stream, an audio stream, and AUX data are arranged after the SAV of one frame period until the EAV.
There is no data in the entire one frame period, but data exists in a burst form for a predetermined period from the beginning. SDTI-CP streams (video and audio) can be switched in stream states at frame boundaries. The SDTI-CP has a mechanism for establishing synchronization between audio and video for content using SMPTE time code as a clock reference. Further, the format is determined so that SDTI-CP and SDI can coexist.
【0057】SDTI受信部108では、入力されたス
トリームに基づき、データの有効区間を示すイネーブル
信号enableを出力する。イネーブル信号は、例え
ばデータが有効な区間では”H”レベル、無効区間で
は”L”レベルとなるような信号である。イネーブル信
号は、例えば記録側MFC106に供給される。The SDTI receiving unit 108 outputs an enable signal “enable” indicating a valid section of the data based on the input stream. The enable signal is, for example, a signal that becomes “H” level in a data valid section and “L” level in an invalid section. The enable signal is supplied to, for example, the recording-side MFC 106.
【0058】上述したSDTI−CPを使用したインタ
ーフェースは、TS(Transport Stream)を転送する場合
のように、エンコーダおよびデコーダがVBV(Video B
uffer Verifier) バッファおよびTBs(Transport Buf
fers) を通る必要がなく、ディレイを少なくできる。ま
た、SDTI−CP自体が極めて高速の転送が可能なこ
ともディレイを一層少なくする。従って、放送局の全体
を管理するような同期が存在する環境では、SDTI−
CPを使用することが有効である。In the interface using the SDTI-CP, the encoder and the decoder are VBV (Video B-Video), as in the case of transferring a TS (Transport Stream).
buffer Verifier) Buffers and TBs (Transport Buf
fers), so there is less delay. Further, the fact that the SDTI-CP itself is capable of extremely high-speed transfer further reduces the delay. Therefore, in an environment where synchronization exists to manage the entire broadcast station, SDTI-
It is effective to use CP.
【0059】なお、SDTI受信部108では、さら
に、入力されたSDTI−CPのストリームからディジ
タルオーディオ信号を抽出する。抽出されたディジタル
オーディオ信号は、ECCエンコーダ109に供給され
る。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.
【0060】記録側MFC106は、セレクタおよびス
トリームコンバータを内蔵する。記録側MFC106
は、例えば後述する再生側MFC114とモードを切り
替えることにより共用される。記録側MFC106にお
いて行われる処理について説明する。上述したMPEG
エンコーダ102およびSDTI受信部108から供給
されたMPEG ESは、セレクタで何方か一方を選択
され、ストリームコンバータに供給される。The recording MFC 106 has a built-in selector and stream converter. Recording MFC 106
Is shared by, for example, switching the mode with a reproduction-side MFC 114 described later. The processing performed in the recording MFC 106 will be described. MPEG as described above
One of the MPEG ESs supplied from the encoder 102 and the SDTI receiving unit 108 is selected by a selector and supplied to a stream converter.
【0061】ストリームコンバータでは、MPEG2の
規定に基づきDCTブロック毎に並べられていたDCT
係数を、1マクロブロックを構成する複数のDCTブロ
ックを通して、周波数成分毎にまとめ、まとめた周波数
成分を並べ替える。また、ストリームコンバータは、エ
レメンタリストリームの1スライスが1ストライプの場
合には、1スライスを1マクロブロックからなるものに
する。さらに、ストリームコンバータは、1マクロブロ
ックで発生する可変長データの最大長を所定長に制限す
る。これは、高次のDCT係数を0とすることでなしう
る。In the stream converter, the DCT arranged for each DCT block in accordance with the MPEG2
The coefficients are grouped for each frequency component through a plurality of DCT blocks constituting one macroblock, and the grouped frequency components are rearranged. When one slice of the elementary stream is one stripe, the stream converter makes one slice consist of one macroblock. Further, the stream converter limits the maximum length of variable length data generated in one macroblock to a predetermined length. This can be achieved by setting the higher-order DCT coefficient to zero.
【0062】また、詳細は後述するが、ストリームコン
バータでは、上述のDCT係数の並べ替えの際に、供給
されたMPEG ESの可変長符号を所定のVLCテー
ブルを参照しながら解き、並べ替えを行った後に再び可
変長符号化する。この、可変長符号を解く際に、ストリ
ーム中にVLCテーブルに存在しない、VLCテーブル
に対してミスマッチであるコードがあるかどうかが検出
される。ストリーム中に、VLCテーブルのミスマッチ
であるコードが存在するときには、直ちに可変長符号を
解く処理が中止され、次のスタートコードが見つかるま
で入力されたストリームが破棄される。また、VLCミ
スマッチが存在するストリームは、所定に修正されて出
力される。As will be described in detail later, in the stream converter, when the above-described DCT coefficients are rearranged, the supplied MPEG ES variable length code is solved with reference to a predetermined VLC table, and rearrangement is performed. After that, variable length coding is performed again. When solving this variable length code, it is detected whether or not there is a code in the stream that does not exist in the VLC table and that does not match the VLC table. If there is a code that is a mismatch of the VLC table in the stream, the process of decoding the variable length code is immediately stopped, and the input stream is discarded until the next start code is found. Also, a stream in which a VLC mismatch exists is corrected and output in a predetermined manner.
【0063】記録側MFC106において並べ替えられ
た変換エレメンタリストリームは、ECCエンコーダ1
09に供給される。ECCエンコーダ109は、大容量
のメインメモリが接続され(図示しない)、パッキング
およびシャフリング部、オーディオ用外符号エンコー
ダ、ビデオ用外符号エンコーダ、内符号エンコーダ、オ
ーディオ用シャフリング部およびビデオ用シャフリング
部などを内蔵する。また、ECCエンコーダ109は、
シンクブロック単位でIDを付加する回路や、同期信号
を付加する回路を含む。ECCエンコーダ109は、例
えば1個の集積回路で構成される。The converted elementary stream rearranged in the recording MFC 106 is the ECC encoder 1
09. The ECC encoder 109 is connected to a large-capacity main memory (not shown), and includes a packing and shuffling unit, an outer code encoder for audio, an outer code encoder for video, an inner code encoder, a shuffling unit for audio, and shuffling for video. Built-in parts. In addition, the ECC encoder 109
It includes a circuit for adding an ID in sync block units and a circuit for adding a synchronization signal. The ECC encoder 109 is composed of, for example, one integrated circuit.
【0064】なお、一実施形態では、ビデオデータおよ
びオーディオデータに対するエラー訂正符号としては、
積符号が使用される。積符号は、ビデオデータまたはオ
ーディオデータの2次元配列の縦方向に外符号の符号化
を行い、その横方向に内符号の符号化を行い、データシ
ンボルを2重に符号化するものである。外符号および内
符号としては、リードソロモンコード(Reed-Solomon co
de) を使用できる。In one embodiment, the error correction code for video data and audio data is
The product code is used. The product code encodes an outer code in a vertical direction of a two-dimensional array of video data or audio data, encodes an inner code in a horizontal direction thereof, and encodes data symbols doubly. Reed-Solomon code (Reed-Solomon code)
de) can be used.
【0065】ECCエンコーダ109における処理につ
いて説明する。変換エレメンタリストリームのビデオデ
ータは、可変長符号化されているため、各マクロブロッ
クのデータの長さが不揃いである。パッキングおよびシ
ャフリング部では、マクロブロックが固定枠に詰め込ま
れる。このとき、固定枠からはみ出たオーバーフロー部
分は、固定枠のサイズに対して空いている領域に順に詰
め込まれる。The processing in the ECC encoder 109 will be described. Since the video data of the converted elementary stream is variable-length coded, the data length of each macroblock is not uniform. In the packing and shuffling sections, macroblocks are packed in fixed frames. At this time, the overflow portion that protrudes from the fixed frame is sequentially packed into an area that is vacant with respect to the size of the fixed frame.
【0066】また、画像フォーマット、シャフリングパ
ターンのバージョン等の情報を有するシステムデータ
が、後述するシスコン121から供給され、図示されな
い入力端から入力される。システムデータは、パッキン
グおよびシャフリング部に供給され、ピクチャデータと
同様に記録処理を受ける。システムデータは、ビデオA
UXとして記録される。また、走査順に発生する1フレ
ームのマクロブロックを並び替え、テープ上のマクロブ
ロックの記録位置を分散させるシャフリングが行われ
る。シャフリングによって、変速再生時に断片的にデー
タが再生される時でも、画像の更新率を向上させること
ができる。Further, system data having information such as an image format and a version of a shuffling pattern is supplied from a system controller 121 described later, and is input from an input terminal (not shown). The system data is supplied to a packing and shuffling unit, and undergoes recording processing in the same manner as picture data. System data is video A
Recorded as UX. Also, shuffling is performed in which the macroblocks of one frame generated in the scanning order are rearranged and the recording positions of the macroblocks on the tape are dispersed. Shuffling can improve the image update rate even when data is reproduced in pieces during variable speed reproduction.
【0067】パッキングおよびシャフリング部からのビ
デオデータおよびシステムデータ(以下、特に必要な場
合を除き、システムデータを含む場合も単にビデオデー
タと称する)は、ビデオデータに対して外符号化の符号
化を行うビデオ用外符号エンコーダに供給され、外符号
パリティが付加される。外符号エンコーダの出力は、ビ
デオ用シャフリング部で、複数のECCブロックにわた
ってシンクブロック単位で順番を入れ替える、シャフリ
ングがなされる。シンクブロック単位のシャフリングに
よって特定のECCブロックにエラーが集中することが
防止される。シャフリング部でなされるシャフリング
を、インターリーブと称することもある。ビデオ用シャ
フリング部の出力は、メインメモリに書き込まれる。Video data and system data from the packing and shuffling unit (hereinafter, also referred to as video data even when system data is included unless otherwise required) are obtained by encoding the video data by outer coding. , And an outer code parity is added. The output of the outer code encoder is shuffled by a video shuffling unit to change the order in sync block units over a plurality of ECC blocks. The shuffling in sync block units prevents errors from concentrating on a specific ECC block. Shuffling performed by the shuffling unit may be referred to as interleaving. The output of the video shuffling unit is written to the main memory.
【0068】一方、上述したように、SDTI受信部1
08あるいはディレイ103から出力されたディジタル
オーディオ信号がECCエンコーダ109に供給され
る。この一実施形態では、非圧縮のディジタルオーディ
オ信号が扱われる。ディジタルオーディオ信号は、これ
らに限らず、オーディオインターフェースを介して入力
されるようにもできる。また、図示されない入力端子か
ら、オーディオAUXが供給される。オーディオAUX
は、補助的データであり、オーディオデータのサンプリ
ング周波数等のオーディオデータに関連する情報を有す
るデータである。オーディオAUXは、オーディオデー
タに付加され、オーディオデータと同等に扱われる。On the other hand, as described above, the SDTI receiving unit 1
08 or the digital audio signal output from the delay 103 is supplied to the ECC encoder 109. In this embodiment, an uncompressed digital audio signal is handled. The digital audio signal is not limited to these, and may be input via an audio interface. An audio AUX is supplied from an input terminal (not shown). Audio AUX
Is auxiliary data, which is data having information related to audio data such as the sampling frequency of audio data. The audio AUX is added to the audio data and is treated equivalently to the audio data.
【0069】オーディオAUXが付加されたオーディオ
データ(以下、特に必要な場合を除き、AUXを含む場
合も単にオーディオデータと称する)は、オーディオデ
ータに対して外符号の符号化を行うオーディオ用外符号
エンコーダに供給される。オーディオ用外符号エンコー
ダの出力がオーディオ用シャフリング部に供給され、シ
ャフリング処理を受ける。オーディオシャフリングとし
て、シンクブロック単位のシャフリングと、チャンネル
単位のシャフリングとがなされる。The audio data to which the audio AUX is added (hereinafter, unless otherwise required, the audio data including the AUX is also simply referred to as audio data) is an audio outer code for encoding the audio data with an outer code. Supplied to the encoder. The output of the audio outer code encoder is supplied to the audio shuffling unit, and undergoes shuffling processing. As audio shuffling, shuffling in sync block units and shuffling in channel units are performed.
【0070】オーディオ用シャフリング部の出力は、メ
インメモリに書き込まれる。上述したように、メインメ
モリには、ビデオ用シャフリング部の出力も書き込まれ
ており、メインメモリで、オーディオデータとビデオデ
ータとが混合され、1チャンネルのデータとされる。The output of the audio shuffling unit is written to the main memory. As described above, the output of the video shuffling unit is also written in the main memory, and the main memory mixes audio data and video data into one-channel data.
【0071】メインメモリからデータが読み出され、シ
ンクブロック番号を示す情報等を有するIDが付加さ
れ、内符号エンコーダに供給される。内符号エンコーダ
では、供給されたデータに対して内符号の符号化を施
す。内符号エンコーダの出力に対してシンクブロック毎
の同期信号が付加され、シンクブロックが連続する記録
データが構成される。Data is read from the main memory, added with an ID having information indicating a sync block number, and supplied to the inner code encoder. The inner code encoder encodes the supplied data with the inner code. A synchronization signal for each sync block is added to the output of the inner code encoder, thereby forming recording data in which the sync blocks are continuous.
【0072】ECCエンコーダ109から出力された記
録データは、記録アンプなどを含むイコライザ110に
供給され、記録RF信号に変換される。記録RF信号
は、回転ヘッドが所定に設けられた回転ドラム111に
供給され、磁気テープ112上に記録される。回転ドラ
ム111には、実際には、隣接するトラックを形成する
ヘッドのアジマスが互いに異なる複数の磁気ヘッドが取
り付けられている。The recording data output from the ECC encoder 109 is supplied to an equalizer 110 including a recording amplifier and the like, and is converted into a recording RF signal. The recording RF signal is supplied to a rotating drum 111 provided with a rotating head in a predetermined manner, and is recorded on a magnetic tape 112. Actually, a plurality of magnetic heads having different azimuths of heads forming adjacent tracks are attached to the rotating drum 111.
【0073】記録データに対して必要に応じてスクラン
ブル処理を行っても良い。また、記録時にディジタル変
調を行っても良く、さらに、パーシャル・レスポンスク
ラス4とビタビ符号を使用しても良い。なお、イコライ
ザ110は、記録側の構成と再生側の構成とを共に含
む。The recording data may be scrambled as required. Further, digital modulation may be performed at the time of recording, and a partial response class 4 and Viterbi code may be used. Note that the equalizer 110 includes both a configuration on the recording side and a configuration on the reproduction side.
【0074】図16は、上述した回転ヘッドにより磁気
テープ上に形成されるトラックフォーマットの一例を示
す。この例では、1フレーム当たりのビデオおよびオー
ディオデータが4トラックで記録されている。互いに異
なるアジマスの2トラックによって1セグメントが構成
される。すなわち、4トラックは、2セグメントからな
る。セグメントを構成する1組のトラックに対して、ア
ジマスと対応するトラック番号FIG. 16 shows an example of a track format formed on a magnetic tape by the rotary head described above. In this example, video and audio data per frame are recorded on four tracks. One segment is composed of two tracks having different azimuths. That is, four tracks are composed of two segments. Track number corresponding to azimuth for a set of tracks constituting a segment
〔0〕とトラック番号
〔1〕が付される。トラックのそれぞれにおいて、両端
側にビデオデータが記録されるビデオセクタが配され、
ビデオセクタに挟まれて、オーディオデータが記録され
るオーディオセクタが配される。この図16は、テープ
上のセクタの配置を示すものである。[0] and a track number [1] are assigned. In each of the tracks, video sectors on which video data is recorded are arranged at both ends,
An audio sector in which audio data is recorded is arranged between video sectors. FIG. 16 shows the arrangement of sectors on the tape.
【0075】この例では、4チャンネルのオーディオデ
ータを扱うことができるようにされている。A1〜A4
は、それぞれオーディオデータの1〜4chを示す。オ
ーディオデータは、セグメント単位で配列を変えられて
記録される。また、ビデオデータは、この例では、1ト
ラックに対して4エラー訂正ブロック分のデータがイン
ターリーブされ、Upper SideおよびLowe
r Sideのセクタに分割され記録される。In this example, four channels of audio data can be handled. A1 to A4
Indicates audio data channels 1 to 4 respectively. The audio data is recorded with its arrangement changed in segment units. In this example, in this example, data of four error correction blocks is interleaved for one track, and Upper Side and Low
It is divided into sectors of r Side and recorded.
【0076】Lower Sideのビデオセクタに
は、所定位置にシステム領域(SYS)が設けられる。
システム領域は、例えば、Lower Sideのビデ
オセクタの先頭側と末尾側とに、トラック毎に交互に設
けられる。A system area (SYS) is provided at a predetermined position in the video sector of the lower side.
The system area is provided alternately for each track, for example, at the beginning and end of a lower side video sector.
【0077】なお、図16において、SATは、サーボ
ロック用の信号が記録されるエリアである。また、各記
録エリアの間には、所定の大きさのギャップが設けられ
る。In FIG. 16, SAT is an area in which a servo lock signal is recorded. A gap having a predetermined size is provided between the recording areas.
【0078】図16は、1フレーム当たりのデータを4
トラックで記録する例であるが、記録再生するデータの
フォーマットによっては、1フレーム当たりのデータを
8トラック、6トラックなどで記録するようにもでき
る。FIG. 16 shows that the data per frame is 4
In this example, data is recorded on a track. Depending on the format of data to be recorded / reproduced, data per frame can be recorded on eight tracks, six tracks, or the like.
【0079】図16Bに示されるように、テープ上に記
録されるデータは、シンクブロックと称される等間隔に
区切られた複数のブロックからなる。図16Cは、シン
クブロックの構成を概略的に示す。シンクブロックは、
同期検出するためのSYNCパターン、シンクブロック
のそれぞれを識別するためのID、後続するデータの内
容を示すDID、データパケットおよびエラー訂正用の
内符号パリティから構成される。データは、シンクブロ
ック単位でパケットとして扱われる。すなわち、記録あ
るいは再生されるデータ単位の最小のものが1シンクブ
ロックである。シンクブロックが多数並べられて(図1
6B)、例えばビデオセクタが形成される。As shown in FIG. 16B, the data recorded on the tape is composed of a plurality of blocks divided at equal intervals called sync blocks. FIG. 16C schematically shows the configuration of a sync block. The sync block is
It is composed of a SYNC pattern for synchronous detection, 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 packets in sync block units. That is, the smallest data unit to be recorded or reproduced is one sync block. Many sync blocks are arranged (Fig. 1
6B) For example, a video sector is formed.
【0080】図15の説明に戻り、再生時には、磁気テ
ープ112から回転ドラム111で再生された再生信号
が再生アンプなどを含むイコライザ110の再生側の構
成に供給される。イコライザ110では、再生信号に対
して、等化や波形整形などがなされる。また、ディジタ
ル変調の復調、ビタビ復号等が必要に応じてなされる。
イコライザ110の出力は、ECCデコーダ113に供
給される。Referring back to FIG. 15, at the time of reproduction, a reproduction signal reproduced from the magnetic tape 112 by 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 and waveform shaping on the reproduced 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.
【0081】ECCデコーダ113は、上述したECC
エンコーダ109と逆の処理を行うもので、大容量のメ
インメモリと、内符号デコーダ、オーディオ用およびビ
デオ用それぞれのデシャフリング部ならびに外符号デコ
ーダを含む。さらに、ECCデコーダ113は、ビデオ
用として、デシャフリングおよびデパッキング部、デー
タ補間部を含む。同様に、オーディオ用として、オーデ
ィオAUX分離部とデータ補間部を含む。ECCデコー
ダ113は、例えば1個の集積回路で構成される。The ECC decoder 113 performs the above-described ECC
It performs processing reverse to that of the encoder 109, and includes a large-capacity main memory, an inner code decoder, a deshuffling unit for audio and video, and an outer code decoder. Further, the ECC decoder 113 includes a deshuffling and depacking unit and a data interpolation unit for video. Similarly, an audio AUX separation unit and a data interpolation unit are included for audio. The ECC decoder 113 is composed of, for example, one integrated circuit.
【0082】ECCデコーダ113における処理につい
て説明する。ECCデコーダ113では、先ず、同期検
出を行いシンクブロックの先頭に付加されている同期信
号を検出し、シンクブロックを切り出す。再生データ
は、シンクブロック毎に内符号デコーダに供給され、内
符号のエラー訂正がなされる。内符号デコーダの出力に
対してID補間処理がなされ、内符号によりエラーとさ
れたシンクブロックのID例えばシンクブロック番号が
補間される。IDが補間された再生データは、ビデオデ
ータとオーディオデータとに分離される。The processing in the ECC decoder 113 will be described. The ECC decoder 113 first detects synchronization and detects a synchronization signal added to the beginning of a sync block, and cuts out the sync block. The reproduction data is supplied to the inner code decoder for each sync block, and error correction of the inner code is performed. The ID interpolation processing is performed on the output of the inner code decoder, and the ID of the sync block in which the error occurred due to the inner code, for example, the sync block number, is interpolated. The playback data with the interpolated ID is separated into video data and audio data.
【0083】上述したように、ビデオデータは、MPE
Gのイントラ符号化で発生したDCT係数データおよび
システムデータを意味し、オーディオデータは、PCM
(Pulse Code Modulation) データおよびオーディオAU
Xを意味する。As described above, the video data is the MPE
G means DCT coefficient data and system data generated in intra coding of G, and audio data is PCM
(Pulse Code Modulation) Data and audio AU
Means X.
【0084】分離されたオーディオデータは、オーディ
オ用デシャフリング部に供給され、記録側のシャフリン
グ部でなされたシャフリングと逆の処理を行う。デシャ
フリング部の出力がオーディオ用の外符号デコーダに供
給され、外符号によるエラー訂正がなされる。オーディ
オ用の外符号デコーダからは、エラー訂正されたオーデ
ィオデータが出力される。訂正できないエラーがあるデ
ータに関しては、エラーフラグがセットされる。The separated audio data is supplied to an audio deshuffling unit, and performs a process reverse to the shuffling performed by the recording-side shuffling unit. The output of the deshuffling unit is supplied to an outer code decoder for audio, and error correction by the outer code is performed. The audio outer code decoder outputs error-corrected audio data. An error flag is set for data having an uncorrectable error.
【0085】オーディオ用の外符号デコーダの出力か
ら、オーディオAUX分離部でオーディオAUXが分離
され、分離されたオーディオAUXがECCデコーダ1
13から出力される(経路は省略する)。オーディオA
UXは、例えば後述するシスコン121に供給される。
また、オーディオデータは、データ補間部に供給され
る。データ補間部では、エラーの有るサンプルが補間さ
れる。補間方法としては、時間的に前後の正しいデータ
の平均値で補間する平均値補間、前の正しいサンプルの
値をホールドする前値ホールド等を使用できる。The audio AUX is separated from the output of the audio outer code decoder by the audio AUX separation unit, and the separated audio AUX is output from the ECC decoder 1.
13 (the path is omitted). Audio A
The UX is supplied to, for example, a system controller 121 described later.
The audio data is supplied to a data interpolation unit. In the data interpolating unit, an erroneous sample is interpolated. As the interpolation method, it is possible to use an average value interpolation for interpolating with the average value of correct data before and after in time, a previous value hold for holding a previous correct sample value, and the like.
【0086】データ補間部の出力がECCデコーダ11
3からのオーディオデータの出力であって、ECCデコ
ーダ113から出力されたオーディオデータは、ディレ
イ117およびSDTI出力部115に供給される。デ
ィレイ117は、後述するMPEGデコーダ116での
ビデオデータの処理による遅延を吸収するために設けら
れる。ディレイ117に供給されたオーディオデータ
は、所定の遅延を与えられて、SDI出力部118に供
給される。The output of the data interpolation unit is the ECC decoder 11
The audio data output from the ECC decoder 113 is output to the delay 117 and the SDTI output unit 115. The delay 117 is provided to absorb a delay caused by processing of video data in the MPEG decoder 116 described later. The audio data supplied to the delay 117 is supplied with a predetermined delay to the SDI output unit 118.
【0087】分離されたビデオデータは、デシャフリン
グ部に供給され、記録側のシャフリングと逆の処理がな
される。デシャフリング部は、記録側のシャフリング部
でなされたシンクブロック単位のシャフリングを元に戻
す処理を行う。デシャフリング部の出力が外符号デコー
ダに供給され、外符号によるエラー訂正がなされる。訂
正できないエラーが発生した場合には、エラーの有無を
示すエラーフラグがエラー有りを示すものとされる。The separated video data is supplied to a deshuffling unit, and the reverse processing of the shuffling on the recording side is performed. The deshuffling unit performs a process of restoring the shuffling in sync block units performed by the shuffling unit on the recording side. 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 the error is set to indicate the presence of the error.
【0088】外符号デコーダの出力がデシャフリングお
よびデパッキング部に供給される。デシャフリングおよ
びデパッキング部は、記録側のパッキングおよびシャフ
リング部でなされたマクロブロック単位のシャフリング
を元に戻す処理を行う。また、デシャフリングおよびデ
パッキング部では、記録時に施されたパッキングを分解
する。すなわち、マクロブロック単位にデータの長さを
戻して、元の可変長符号を復元する。さらに、デシャフ
リングおよびデパッキング部において、システムデータ
が分離され、ECCデコーダ113から出力され、後述
するシスコン121に供給される。The output of the outer code decoder is supplied to a deshuffling and depacking unit. The deshuffling and depacking unit performs processing for restoring shuffling in macroblock units performed by the packing and shuffling unit on the recording side. In the deshuffling and depacking unit, the packing performed at the time of recording is disassembled. That is, the length of the data is returned in units of macroblocks, and the original variable length code is restored. Further, in the deshuffling and depacking unit, the system data is separated, output from the ECC decoder 113, and supplied to the system controller 121 described later.
【0089】デシャフリングおよびデパッキング部の出
力は、データ補間部に供給され、エラーフラグが立って
いる(すなわち、エラーのある)データが修整される。
すなわち、変換前に、マクロブロックデータの途中にエ
ラーがあるとされた場合には、エラー箇所以降の周波数
成分のDCT係数が復元できない。そこで、例えばエラ
ー箇所以降の周波数成分のDCT係数をゼロとする。同
様に、高速再生時にも、シンクブロック長に対応する長
さまでのDCT係数のみを復元し、それ以降の係数は、
ゼロデータに置き替えられる。さらに、データ補間部で
は、ビデオデータの先頭に付加されているヘッダがエラ
ーの場合に、ヘッダ(シーケンスヘッダ、GOPヘッ
ダ、ピクチャヘッダ、ユーザデータ等)を回復する処理
もなされる。The output of the deshuffling and depacking unit is supplied to a data interpolation unit, and data for which an error flag is set (that is, an error exists) is corrected.
That is, if it is determined that there is an error in the macroblock data before the conversion, the DCT coefficients of the frequency components after the error location cannot be restored. Therefore, for example, the DCT coefficient of the frequency component after the error point is set to zero. Similarly, at the time of high-speed reproduction, only the DCT coefficients up to the length corresponding to the sync block length are restored.
Replaced with zero data. Further, in the data interpolation section, when the header added to the head of the video data is an error, processing for recovering the header (sequence header, GOP header, picture header, user data, etc.) is also performed.
【0090】データ補間部から出力されたビデオデータ
およびエラーフラグがECCデコーダ113の出力であ
って、ECCデコーダ113の出力は、再生側のマルチ
フォーマットコンバータ(以下、再生側MFCと略称す
る)114に供給される。なお、ECCデコーダ113
から出力されたストリームは、上述した記録側MFC1
06でMPEGストリームのDCT係数が並べ替えられ
た変換エレメンタリストリームに対応する。The video data and error flag output from the data interpolation unit are the output of the ECC decoder 113, and the output of the ECC decoder 113 is output to a reproduction-side multi-format converter (hereinafter, abbreviated as a reproduction-side MFC) 114. Supplied. The ECC decoder 113
Is output from the recording side MFC1 described above.
06 corresponds to the transformed elementary stream in which the DCT coefficients of the MPEG stream are rearranged.
【0091】再生側MFC114は、上述した記録側M
FC106と逆の処理を行うものであって、ストリーム
コンバータを含む。再生側MFC114は、例えば1個
の集積回路で構成される。ストリームコンバータでは、
データ補間部からのエラーフラグを用いてエラーのある
ビデオデータに対して、適切な位置でブロック終端符号
(EOB:End Of Block)を付加し、データを打ち切
る。The reproduction-side MFC 114 is the recording-side MFC 114 described above.
It performs the reverse process of the FC 106 and includes a stream converter. The reproduction-side MFC 114 is composed of, for example, one integrated circuit. In the stream converter,
An end-of-block (EOB: End Of Block) is added to video data having an error at an appropriate position using the error flag from the data interpolation unit, and the data is terminated.
【0092】DCTブロックに跨がって、DCT係数が
DC成分および低域成分から高域成分へと並べられてい
るため、このように、ある箇所以降からDCT係数を無
視しても、マクロブロックを構成するDCTブロックの
それぞれに対して、満遍なくDCならびに低域成分から
のDCT係数を行き渡らせることができる。Since the DCT coefficients are arranged from the DC component and the low-frequency component to the high-frequency component across the DCT block, even if the DCT coefficients are ignored from a certain point onward, the macro block , DCT coefficients from DC and low-frequency components can be distributed evenly to each of the DCT blocks constituting.
【0093】また、ストリームコンバータでは、記録側
のストリームコンバータと逆の処理がなされる。すなわ
ち、DCTブロックに跨がって周波数成分毎に並べられ
ていたDCT係数を、DCTブロック毎に並び替える。
また、再生側MFC114では、供給されたストリーム
からシーケンス拡張3を検出し、クロマフォーマットの
情報を抜き出す。ストリームコンバータにおける上述の
DCT係数の並び替えの際に、抜き出されたクロマフォ
ーマットの情報に基づき所定にタイミング制御を行う。
これにより、再生信号がMPEG2に準拠したエレメン
タリストリームに変換される。[0093] In the stream converter, a process reverse to that of the stream converter on the recording side is performed. That is, the DCT coefficients arranged for each frequency component across the DCT blocks are rearranged for each DCT block.
Further, the reproduction side MFC 114 detects the sequence extension 3 from the supplied stream and extracts the information of the chroma format. When the DCT coefficients are rearranged in the stream converter, predetermined timing control is performed based on the extracted chroma format information.
Thereby, the reproduced signal is converted into an elementary stream conforming to MPEG2.
【0094】さらに、詳細は後述するが、ストリームコ
ンバータでは、上述のDCT係数の並べ替えの際に、供
給された変換ストリームの可変長符号を所定のVLCテ
ーブルを参照しながら解き、並べ替えを行った後に再び
可変長符号化する。この、可変長符号を解く際に、スト
リーム中にVLCテーブルに存在しない、VLCテーブ
ルに対してミスマッチであるコードがあるかどうかが検
出される。ストリーム中に、VLCテーブルのミスマッ
チであるコードが存在するときには、直ちに可変長符号
を解く処理が中止され、次のスタートコードが見つかる
まで入力されたストリームが破棄される。また、VLC
ミスマッチが存在するストリームは、所定に修正されて
出力される。As will be described later in detail, in the stream converter, when the above-described DCT coefficients are rearranged, the variable length code of the supplied converted stream is solved with reference to a predetermined VLC table, and rearranged. After that, variable length coding is performed again. When solving this variable length code, it is detected whether or not there is a code in the stream that does not exist in the VLC table and that does not match the VLC table. If there is a code that is a mismatch of the VLC table in the stream, the process of decoding the variable length code is immediately stopped, and the input stream is discarded until the next start code is found. Also, VLC
The stream having the mismatch is output after being corrected in a predetermined manner.
【0095】なお、ストリームコンバータの入出力は、
記録側と同様に、マクロブロックの最大長に応じて、十
分な転送レート(バンド幅)を確保しておく。マクロブ
ロック(スライス)の長さを制限しない場合には、画素
レートの3倍のバンド幅を確保するのが好ましい。The input and output of the stream converter are as follows.
As with the recording side, a sufficient transfer rate (bandwidth) is secured according to the maximum length of the macroblock. If the length of the macroblock (slice) is not limited, it is preferable to secure a bandwidth three times the pixel rate.
【0096】ストリームコンバータの出力が再生側MF
C114の出力であって、再生側MFC114の出力
は、SDTI出力部115およびMPEGデコーダ11
6に供給される。The output of the stream converter is the reproduction side MF
The output of the reproduction side MFC 114 is output from the SDTI output unit 115 and the MPEG decoder 11.
6.
【0097】MPEGデコーダ116は、エレメンタリ
ストリームを復号し、ビデオデータを出力する。すなわ
ち、MPEGデコーダ116は、逆量子化処理と、逆D
CT処理とがなされる。復号ビデオデータは、SDI出
力部118に供給される。上述したように、SDI出力
部118には、ECCデコーダ113でビデオデータと
分離されたオーディオデータがディレイ117を介して
供給されている。SDI出力部118では、供給された
ビデオデータとオーディオデータとを、SDIのフォー
マットにマッピングし、SDIフォーマットのデータ構
造を有するストリームへ変換される。SDI出力部11
8からのストリームが出力端子120から外部へ出力さ
れる。[0097] The MPEG decoder 116 decodes the elementary stream and outputs video data. That is, the MPEG decoder 116 performs the inverse quantization process and the inverse D
CT processing is performed. The decoded video data is supplied to the SDI output unit 118. As described above, audio data separated from 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 into an SDI format, and converts the data into a stream having a data structure in the SDI format. SDI output unit 11
8 is output from the output terminal 120 to the outside.
【0098】一方、SDTI出力部115には、上述し
たように、ECCデコーダ113でビデオデータと分離
されたオーディオデータが供給されている。SDTI出
力部115では、供給された、エレメンタリストリーム
としてのビデオデータと、オーディオデータとをSDT
Iのフォーマットにマッピングし、SDTIフォーマッ
トのデータ構造を有するストリームへ変換される。変換
されたストリームは、出力端子119から外部へ出力さ
れる。On the other hand, the SDTI output section 115 is supplied with the audio data separated from the video data by the ECC decoder 113 as described above. The SDTI output unit 115 converts the supplied video data and audio data as elementary streams into SDDT
I format and converted to a stream having a data structure of SDTI format. The converted stream is output from the output terminal 119 to the outside.
【0099】図15において、シスコン121は、例え
ばマイクロコンピュータからなり、この記録再生装置の
全体の動作を制御する。またサーボ122は、シスコン
121と互いに通信を行いながら、磁気テープ112の
走行制御や回転ドラム111の駆動制御などを行う。In FIG. 15, the system controller 121 is composed of, for example, a microcomputer and controls the entire operation of the recording / reproducing apparatus. Further, the servo 122 performs the running control of the magnetic tape 112 and the drive control of the rotating drum 111 while communicating with the system controller 121.
【0100】ここで、クロマフォーマットについて、概
略的に説明する。図17、図18および図19は、それ
ぞれクロマフォーマット4:4:4、4:2:2および
4:2:0を説明するための図である。これらのうち、
図17A、図18Aおよび図19Aは、輝度信号Yおよ
び色差信号Cb、Crのサイズおよびサンプリングの位
相を示す。図において、「×」が輝度信号Yの位相を示
し、重なった2つの「○」は、色差信号Cb、Crの位
相を示す。Here, the chroma format will be schematically described. FIGS. 17, 18 and 19 are diagrams for explaining the chroma formats 4: 4: 4, 4: 2: 2 and 4: 2: 0, respectively. Of these,
FIGS. 17A, 18A and 19A show the size of the luminance signal Y and the color difference signals Cb and Cr and the sampling phase. In the figure, “x” indicates the phase of the luminance signal Y, and two overlapping “「 ”indicate the phases of the color difference signals Cb and Cr.
【0101】クロマフォーマット4:4:4は、図17
Aに示されるように、色差信号Cb、Crと輝度信号Y
のサイズおよびサンプリング位相は、互いに一致してい
る。したがって、8画素×8画素からなるDCTブロッ
クが4個でなるマクロブロックで考えた場合、図17B
に示されるように、色差信号Cb、Crのマトリクス
は、水平および垂直両次元で、輝度信号Yのマトリクス
と同じサイズの4ブロックからなる。FIG. 17 shows the chroma format 4: 4: 4.
As shown in A, the color difference signals Cb and Cr and the luminance signal Y
Have the same size and sampling phase. Therefore, in the case of a macro block including four DCT blocks each including 8 × 8 pixels, FIG.
As shown in (1), the matrix of the color difference signals Cb and Cr consists of four blocks of the same size as the matrix of the luminance signal Y in both horizontal and vertical dimensions.
【0102】これに対して、クロマフォーマット4:
2:2は、図18Aに示されるように、色差信号Cb、
Crのサイズは、輝度信号Yのサイズに対して、水平方
向で1/2になっている。したがって、マクロブロック
で考えると、色差信号Cb、Crのマトリクスは、水平
方向の次元で輝度信号Yのマトリクスの1/2になって
いる。On the other hand, chroma format 4:
2: 2 is the color difference signal Cb, as shown in FIG. 18A.
The size of Cr is half the size of the luminance signal Y in the horizontal direction. Therefore, considering the macroblock, the matrix of the color difference signals Cb and Cr is half the matrix of the luminance signal Y in the horizontal dimension.
【0103】さらに、クロマフォーマット4:2:0
は、図19Aに示されるように、色差信号Cb、Crの
サイズは、輝度信号Yのサイズに対して、水平および垂
直方向の両次元でそれぞれ1/2になっている。したが
って、マクロブロックで考えると、色差信号Cb、Cr
のマトリクスは、水平および垂直方向の両次元で、それ
ぞれ輝度信号Yのマトリクスの1/2になっている。Further, the chroma format 4: 2: 0
In FIG. 19A, the sizes of the color difference signals Cb and Cr are b each of the size of the luminance signal Y in both the horizontal and vertical directions, as shown in FIG. 19A. Therefore, considering the macro block, the color difference signals Cb, Cr
Are half the matrix of the luminance signal Y in both the horizontal and vertical directions.
【0104】なお、上述の図17B、図18Bおよび図
19Bに示されるように、マクロブロックにおいて、マ
クロブロックを構成するDCTブロックには、図に示さ
れるように、左上から1、2、3および4の番号をそれ
ぞれ付して表す。図17〜図19に示される各マクロブ
ロック内のブロックの符号化順序は、クロマフォーマッ
トが4:4:4の場合で、図17Bに示されるように、
Y1、Y2、Y3、Y 4、Cb1、Cr1、Cb2、C
r2、Cb3、Cr3、Cb4およびCr4の順とな
る。同様に、クロマフォーマット4:2:2の場合で、
図18Bに示されるように、Y1、Y2、Y3、Y4、
Cb1、Cr1、Cb2およびCr2の順となり、クロ
マフォーマット4:2:0の場合で、図19Bに示され
るように、Y1、Y2、Y3、Y4、Cb1およびCr
1の順となる。Note that FIG. 17B, FIG.
As shown in FIG.
The DCT blocks that make up the black block are shown in the figure.
Numbers 1, 2, 3 and 4 from the upper left
Each is represented. Each macro block shown in FIGS.
The coding order of the blocks in the lock is
Is 4: 4: 4, and as shown in FIG. 17B,
Y1, Y2, Y3, Y 4, Cb1, Cr1, Cb2, C
r2, Cb3, Cr3, Cb4And Cr4In order
You. Similarly, for chroma format 4: 2: 2,
As shown in FIG. 18B, Y1, Y2, Y3, Y4,
Cb1, Cr1, Cb2And Cr2In the order of
Format 4: 2: 0, as shown in FIG.
Y1, Y2, Y3, Y4, Cb1And Cr
1It becomes the order of.
【0105】図20Aは、MPEGエンコーダ102の
DCT回路から出力されるビデオデータ中のDCT係数
の順序を示す。SDTI受信部108から出力されるM
PEG ESについても同様である。以下では、MPE
Gエンコーダ102の出力を例に用いて説明する。DC
Tブロックにおいて左上のDC成分から開始して、水平
ならびに垂直空間周波数が高くなる方向に、DCT係数
がジグザグスキャンで出力される。その結果、図20B
に一例が示されるように、全部で64個(8画素×8ラ
イン)のDCT係数が周波数成分順に並べられて得られ
る。FIG. 20A shows the order of DCT coefficients in video data output from the DCT circuit of the MPEG encoder 102. M output from SDTI receiving section 108
The same applies to PEG ES. In the following, MPE
A description will be given using the output of the G encoder 102 as an example. DC
Starting from the upper left DC component in the T block, DCT coefficients are output in a zigzag scan in a direction in which the horizontal and vertical spatial frequencies increase. As a result, FIG.
As shown in FIG. 1, a total of 64 (8 pixels × 8 lines) DCT coefficients are obtained by being arranged in order of frequency components.
【0106】このDCT係数がMPEGエンコーダのV
LC部によって可変長符号化される。すなわち、最初の
係数は、DC成分として固定的であり、次の成分(AC
成分)からは、ゼロのランとそれに続くレベルに対応し
てコードが割り当てられる。従って、AC成分の係数デ
ータに対する可変長符号化出力は、周波数成分の低い
(低次の)係数から高い(高次の)係数へと、AC1,
AC2,AC3,・・・と並べられたものである。可変長
符号化されたDCT係数をエレメンタリストリームが含
んでいる。This DCT coefficient is equal to the V of the MPEG encoder.
Variable length coding is performed by the LC unit. That is, the first coefficient is fixed as a DC component, and the next component (AC
From the component), codes are assigned corresponding to the run of zero and the subsequent level. Therefore, the variable-length coded output for the coefficient data of the AC component is converted from the low (low-order) coefficient of the frequency component to the high (high-order) coefficient of AC 1 ,
AC 2 , AC 3 ,... The elementary stream includes DCT coefficients subjected to variable length coding.
【0107】上述した記録側MFC106に内蔵され
る、記録側のストリームコンバータでは、供給された信
号のDCT係数の並べ替えが行われる。すなわち、それ
ぞれのマクロブロック内で、ジグザグスキャンによって
DCTブロック毎に周波数成分順に並べられたDCT係
数がマクロブロックを構成する各DCTブロックにわた
って周波数成分順に並べ替えられる。In the recording-side stream converter built in the recording-side MFC 106, the DCT coefficients of the supplied signal are rearranged. That is, in each macroblock, DCT coefficients arranged in order of frequency components for each DCT block by zigzag scan are rearranged in order of frequency components over each DCT block constituting the macroblock.
【0108】図21は、この記録側ストリームコンバー
タにおけるDCT係数の並べ替えを概略的に示す。
(4:2:2)コンポーネント信号の場合に、1マクロ
ブロックは、輝度信号Yによる4個のDCTブロック
(Y1,Y2,Y3およびY4)と、色差信号Cb,Crの
それぞれによる2個ずつのDCTブロック(Cb1,C
b2,Cr1およびCr2)からなる。FIG. 21 schematically shows rearrangement of DCT coefficients in the recording-side stream converter.
In the case of a (4: 2: 2) component signal, one macroblock is composed of four DCT blocks (Y 1 , Y 2 , Y 3 and Y 4 ) based on a luminance signal Y and color difference signals Cb and Cr. Two DCT blocks (Cb 1 , Cb 1
b 2 , Cr 1 and Cr 2 ).
【0109】上述したように、MPEGエンコーダ10
2では、MPEG2の規定に従いジグザグスキャンが行
われ、図21Aに示されるように、各DCTブロック毎
に、DCT係数がDC成分および低域成分から高域成分
に、周波数成分の順に並べられる。一つのDCTブロッ
クのスキャンが終了したら、次のDCTブロックのスキ
ャンが行われ、同様に、DCT係数が並べられる。As described above, the MPEG encoder 10
In 2, the zigzag scan is performed in accordance with the rules of MPEG2, and as shown in FIG. 21A, the DCT coefficients are arranged in order of frequency components from DC components and low-frequency components to high-frequency components for each DCT block. When scanning of one DCT block is completed, scanning of the next DCT block is performed, and similarly, DCT coefficients are arranged.
【0110】すなわち、マクロブロック内で、DCTブ
ロックY1,Y2,Y3およびY4、DCTブロックC
b1,Cr1,Cb2およびCr2のそれぞれについて、D
CT係数がDC成分および低域成分から高域成分へと周
波数順に並べられる。そして、連続したランとそれに続
くレベルとからなる組に、〔DC,AC1,AC2,AC
3,・・・〕と、それぞれ符号が割り当てられるよう
に、可変長符号化されている。That is, in the macro block, DCT blocks Y 1 , Y 2 , Y 3 and Y 4 , DCT block C
For each of b 1 , Cr 1 , Cb 2 and Cr 2 , D
The CT coefficients are arranged in order of frequency from the DC component and the low frequency component to the high frequency component. Then, [DC, AC 1 , AC 2 , AC
3, a..], So that codes are assigned, are variable length coded.
【0111】記録側ストリームコンバータでは、可変長
符号化され並べられたDCT係数を、一旦可変長符号を
解読して各係数の区切りを検出し、マクロブロックを構
成する各DCTブロックに跨がって周波数成分毎にまと
める。この様子を、図21Bに示す。最初にマクロブロ
ック内の8個のDCTブロックのDC成分をまとめ、次
に8個のDCTブロックの最も周波数成分が低いAC係
数成分をまとめ、以下、順に同一次数のAC係数をまと
めるように、8個のDCTブロックに跨がって係数デー
タを並び替える。In the recording-side stream converter, the variable-length coded and arranged DCT coefficients are once decoded by decoding the variable-length code to detect a break of each coefficient, and are straddled over each DCT block constituting a macroblock. Summarize for each frequency component. This is shown in FIG. 21B. First, the DC components of the eight DCT blocks in the macroblock are summarized, the AC coefficient components of the eight DCT blocks having the lowest frequency components are summarized, and the AC coefficients of the same order are grouped in order. The coefficient data is rearranged across the DCT blocks.
【0112】並び替えられた係数データは、DC
(Y1),DC(Y2),DC(Y3),DC(Y4),D
C(Cb1),DC(Cr1),DC(Cb2),DC
(Cr2),AC1(Y1),AC1(Y2),AC
1(Y3),AC1(Y4),AC1(Cb1),AC1(C
r1),AC1(Cb2),AC1(Cr2),・・・であ
る。ここで、DC、AC1、AC2、・・・は、図20を
参照して説明したように、ランとそれに続くレベルとか
らなる組に対して割り当てられた可変長符号の各符号で
ある。The rearranged coefficient data is DC
(Y 1 ), DC (Y 2 ), DC (Y 3 ), DC (Y 4 ), D
C (Cb 1 ), DC (Cr 1 ), DC (Cb 2 ), DC
(Cr 2 ), AC 1 (Y 1 ), AC 1 (Y 2 ), AC
1 (Y 3 ), AC 1 (Y 4 ), AC 1 (Cb 1 ), AC 1 (C
r 1 ), AC 1 (Cb 2 ), AC 1 (Cr 2 ),. Here, DC, AC 1 , AC 2 ,... Are the respective codes of the variable length codes assigned to the set consisting of the run and the subsequent level, as described with reference to FIG. .
【0113】記録側ストリームコンバータで係数データ
の順序が並べ替えられた変換エレメンタリストリーム
は、ECCエンコーダ109に内蔵されるパッキングお
よびシャフリング部に供給される。マクロブロックのデ
ータの長さは、変換エレメンタリストリームと変換前の
エレメンタリストリームとで同一である。また、MPE
Gエンコーダ102において、ビットレート制御により
GOP(1フレーム)単位に固定長化されていても、マ
クロブロック単位では、長さが変動している。パッキン
グおよびシャフリング部では、マクロブロックのデータ
を固定枠に当てはめる。The conversion elementary stream in which the order of the coefficient data is rearranged by the recording-side stream converter is supplied to a 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. MPE
In the G encoder 102, even if the length is fixed in GOP (one frame) units by bit rate control, the length varies in macroblock units. In the packing and shuffling unit, the data of the macroblock is applied to a fixed frame.
【0114】図22は、パッキングおよびシャフリング
部でのマクロブロックのパッキング処理を概略的に示
す。マクロブロックは、所定のデータ長を持つ固定枠に
当てはめられ、パッキングされる。このとき用いられる
固定枠のデータ長を、記録および再生の際のデータの最
小単位であるシンクブロックのデータ格納領域であるペ
イロードのデータ長と一致させている。これは、シャフ
リングおよびエラー訂正符号化の処理を簡単に行うため
である。図22では、簡単のため、1フレームに8マク
ロブロックが含まれるものと仮定する。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 is packed. The data length of the fixed frame used at this time matches the data length of the payload, which is the data storage area of the sync block, which is the minimum unit of data during recording and reproduction. This is to simplify the processing of shuffling and error correction coding. In FIG. 22, for simplicity, it is assumed that one frame includes eight macroblocks.
【0115】可変長符号化によって、図22Aに一例が
示されるように、8マクロブロックの長さは、互いに異
なる。この例では、固定枠である1シンクブロックのデ
ータ領域(ペイロード)の長さと比較して、マクロブロ
ック#1のデータ,#3のデータおよび#6のデータが
それぞれ長く、マクロブロック#2のデータ,#5のデ
ータ,#7のデータおよび#8のデータがそれぞれ短
い。また、マクロブロック#4のデータは、ペイロード
と略等しい長さである。As shown in an example in FIG. 22A, the lengths of eight macroblocks are different from each other due to the variable length coding. In this example, as compared with the length of the data area (payload) of one sync block, which is a fixed frame, the data of macro block # 1, the data of # 3 and the data of # 6 are each longer, and the data of macro block # 2 is longer. , # 5, # 7 and # 8 are short. The data of the macro block # 4 has a length substantially equal to the payload.
【0116】パッキング処理によって、マクロブロック
がペイロード長の固定長枠に詰め込まれる。過不足無く
データを詰め込むことができるのは、1フレーム期間で
発生するデータ量が固定量に制御されているからであ
る。図22Bに一例が示されるように、ペイロードと比
較して長いマクロブロックは、ペイロード長に対応する
位置で分割される。分割されたマクロブロックのうち、
ペイロード長からはみ出た部分(オーバーフロー部分)
は、先頭から順に空いている領域に、すなわち、長さが
ペイロード長に満たないマクロブロックの後ろに、詰め
込まれる。By the packing process, the macro block is packed in a fixed length frame of the payload length. Data can be packed without excess or shortage because 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 longer than the payload is divided at a position corresponding to the payload length. Of the divided macroblocks,
Portion outside the payload length (overflow portion)
Are packed in an area that is empty from the beginning, that is, after a macroblock whose length is less than the payload length.
【0117】図22Bの例では、マクロブロック#1
の、ペイロード長からはみ出た部分が、先ず、マクロブ
ロック#2の後ろに詰め込まれ、そこがペイロードの長
さに達すると、マクロブロック#5の後ろに詰め込まれ
る。次に、マクロブロック#3の、ペイロード長からは
み出た部分がマクロブロック#7の後ろに詰め込まれ
る。さらに、マクロブロック#6のペイロード長からは
み出た部分がマクロブロック#7の後ろに詰め込まれ、
さらにはみ出た部分がマクロブロック#8の後ろに詰め
込まれる。こうして、各マクロブロックがペイロード長
の固定枠に対してパッキングされる。In the example of FIG. 22B, macro block # 1
The portion that extends beyond the payload length is first packed after the macroblock # 2, and when it reaches the length of the payload, it is packed after the macroblock # 5. Next, the portion of the macroblock # 3 that extends beyond the payload length is packed after the macroblock # 7. In addition, the portion of the macro block # 6 that extends beyond the payload length is packed after the macro block # 7,
Further, the protruding portion is packed behind macro block # 8. Thus, each macroblock is packed into a fixed frame of the payload length.
【0118】各マクロブロックに対応する可変長データ
の長さは、記録側ストリームコンバータにおいて予め調
べておくことができる。これにより、このパッキング部
では、VLCデータをデコードして内容を検査すること
無く、マクロブロックのデータの最後尾を知ることがで
きる。The length of the variable-length data corresponding to each macroblock can be checked in advance by the recording-side stream converter. This allows the packing unit to know the end of the macroblock data without decoding the VLC data and checking the contents.
【0119】上述したように、この一実施形態では、マ
クロブロック内でのDCT係数の並べ替えや、1ピクチ
ャ単位でのマクロブロックデータのペイロードへのパッ
キングといった処理を行っている。そのため、例えばテ
ープのドロップアウトなどによりエラー訂正符号のエラ
ー訂正能力を超えてエラーが発生したような場合でも、
画質の劣化を少なく抑えることができる。As described above, in this embodiment, processes such as rearrangement of DCT coefficients in a macroblock and packing of macroblock data into a payload in units of one picture are performed. Therefore, even if an error occurs beyond the error correction capability of the error correction code due to, for example, tape dropout,
Image quality degradation can be suppressed to a small extent.
【0120】図23および図24を用いて、係数並び替
えおよびパッキングによる効果について説明する。ここ
では、クロマフォーマットが4:2:2の例について説
明する。図23は、DCTブロックおよびDCT係数が
MPEG ESに準じて供給される場合を示す。この場
合には、図23Aのように、スライスヘッダやマクロブ
ロック(MB)ヘッダに続けて、DCTブロックが輝度
信号Y1〜Y4、色差信号Cb1、Cr1、Cb2およ
びCr2の順に並べられている。各々のブロックでは、
DCT係数がDC成分およびAC成分の低次から高次へ
と並べられている。The effects of coefficient rearrangement and packing will be described with reference to FIGS. 23 and 24. Here, an example in which the chroma format is 4: 2: 2 will be described. FIG. 23 shows a case where DCT blocks and DCT coefficients are supplied according to MPEG ES. In this case, as shown in FIG. 23A, followed by a slice header or a macroblock (MB) header, DCT blocks the luminance signal Y 1 to Y 4, in the order of the color difference signals Cb 1, Cr 1, Cb 2, and Cr 2 Are lined up. In each block,
The DCT coefficients are arranged from the low order to the high order of the DC component and the AC component.
【0121】ここで、例えばECCデコーダなどにおい
て、エラー訂正符号のエラー訂正能力を超えて、図23
Aの位置Aのタイミング、すなわち、ブロックCb1の
高次係数にエラーが発生したとする。上述したように、
MPEGでは、スライスが1つの可変長符号系列を構成
している。そのため、一度エラーが発生すると、エラー
位置から次のスライスヘッダが検出されるまでのデータ
は信頼できない。したがって、1スライス=1マクロブ
ロックで構成されるこのストリームでは、このマクロブ
ロック内の位置A以降のデータの復号化ができないこと
になる。Here, for example, in an ECC decoder or the like, the error correction capability of the error correction code exceeds
Timing position A of A, i.e., an error occurs in the high-order coefficients of the block Cb 1. As mentioned above,
In MPEG, a slice forms one variable-length code sequence. Therefore, once an error occurs, data from the error position to the detection of the next slice header is not reliable. Therefore, in this stream composed of one slice = 1 macroblock, it is not possible to decode data subsequent to position A in this macroblock.
【0122】その結果、図23Bに一例が示されるよう
に、色差信号のブロックCr1、Cb2およびCr
2は、DC成分すらも再現することができない。したが
って、ブロックY1およびY2に相当する部分Bは、ブ
ロックCb1の高次およびそれ以外の色差信号のブロッ
クが再現できないため、ブロックCb1の低次係数で得
られる異常な色の画像となってしまう。また、ブロック
Y3およびY4に相当する部分Cは、輝度信号しか再現
されないため、モノクロームの画像となってしまう。As a result, as shown in an example in FIG. 23B, the blocks Cr 1 , Cb 2 and Cr
No. 2 cannot reproduce even the DC component. Therefore, the portion B corresponding to the blocks Y 1 and Y 2, since the block order and other color difference signal blocks Cb 1 can not be reproduced, the image of the abnormal color obtained by low-order coefficient block Cb 1 turn into. The portion C corresponding to the block Y 3 and Y 4, the luminance signal only is reproduced, resulting in a monochrome image.
【0123】図24は、この一実施形態によるDCT係
数の並び替えを行った変換ストリームを示す。この例で
も、図23の場合と同様に、位置Aでエラーが発生した
ものとする。変換ストリームにおいては、図24Aに一
例が示されるように、スライスヘッダやマクロブロック
ヘッダに続けて、各DCTブロックを跨いでDCT係数
が成分毎にまとめられたブロックが、DC成分およびA
C成分の低次から高次へと並べられている。FIG. 24 shows a transform stream in which DCT coefficients are rearranged according to this embodiment. Also in this example, it is assumed that an error has occurred at the position A, as in the case of FIG. In the transform stream, as shown in an example in FIG. 24A, a block in which DCT coefficients are grouped for each component across DCT blocks, following a slice header or a macroblock header, is divided into a DC component and A block.
The C components are arranged from the lower order to the higher order.
【0124】この場合でも、エラー位置以降のデータ
は、次のスライスヘッダが検出されるまで信頼できず、
このマクロブロック内のエラー位置A以降のデータは、
再現されない。しかしながら、この変換ストリームで
は、エラーによって復号不能となるデータは、各DCT
ブロック内のDCT係数におけるAC成分の高次側であ
り、各DCTブロックのDCT係数におけるDC成分お
よびAC成分の低次側は、均等に得られることになる。
したがって、図24Bに示されるように、高次のAC成
分が再現されないために、画像の詳細な部分は欠ける
が、上述のMPEGESの場合のように、モノクローム
になったり、2つある色差成分のうち片方が欠けたよう
な異常な色になることは、殆どの場合回避できることに
なる。Even in this case, data after the error position cannot be relied on until the next slice header is detected.
The data after the error position A in this macro block is
Not reproduced. However, in this converted stream, the data that cannot be decoded due to the error is each DCT
The higher order side of the AC component in the DCT coefficient in the block, and the lower order side of the DC component and the AC component in the DCT coefficient of each DCT block are obtained evenly.
Therefore, as shown in FIG. 24B, the high-order AC component is not reproduced, so that the detailed part of the image is lacking. However, as in the case of the above-mentioned MPEGES, the image becomes monochrome or the two color difference components In most cases, an abnormal color in which one of them is missing can be avoided.
【0125】これにより、上述のパッキングにより他の
固定枠長に格納されたデータが再現できなくても、ある
程度の画質が確保できることになる。そのため、高速再
生などの際の画質の劣化が抑えられる。Thus, even if the data stored in another fixed frame length cannot be reproduced by the above-mentioned packing, a certain image quality can be secured. Therefore, deterioration of image quality at the time of high-speed reproduction or the like can be suppressed.
【0126】なお、VLCにエラーが発生した場合、次
のヘッダ(スタートコード)が検出されるまで、データ
が信頼できなくなる。VLCは、データの出現頻度に応
じた長さの符号長が割り当てられた所定のテーブルを用
いてデータ列が変換される。そのため、可変長符号化さ
れたデータ列において1ビットだけがビット反転して
も、意味の異なるVLCとして解かれてしまう可能性が
ある。そのため、エラーが発生した以降のVLCは、例
え解けたとしても信頼できず、信頼できるデータが現れ
るまでの間、データを捨てる必要がある。上述したよう
に、マクロブロック層を除く各層のスタートコードは、
符号の境界がバイト単位で区切られているユニークなコ
ードからなる。したがって、このスタートコードを検出
することで、エラーから復帰することが可能である。If an error occurs in the VLC, data becomes unreliable until the next header (start code) is detected. In the VLC, a data sequence is converted using a predetermined table to which a code length having a length corresponding to the appearance frequency of data is assigned. Therefore, even if only one bit in the variable-length-encoded data string is bit-inverted, it may be resolved as a VLC having a different meaning. Therefore, the VLC after the occurrence of the error is unreliable even if it is unraveled, and it is necessary to discard the data until reliable data appears. As described above, the start code of each layer except the macroblock layer is
It consists of a unique code with code boundaries separated by bytes. Therefore, it is possible to recover from an error by detecting this start code.
【0127】図25は、上述したECCエンコーダ10
9のより具体的な構成を示す。図25において、164
がICに対して外付けのメインメモリ160のインター
フェースである。メインメモリ160は、SDRAMで
構成されている。インターフェース164によって、内
部からのメインメモリ160に対する要求を調停し、メ
インメモリ160に対して書込み/読出しの処理を行
う。また、パッキング部137a、ビデオシャフリング
部137b、パッキング部137cによって、パッキン
グおよびシャフリング部137が構成される。FIG. 25 shows the ECC encoder 10 described above.
9 shows a more specific configuration. In FIG. 25, 164
Is an interface of the main memory 160 external to the IC. The main memory 160 is composed of an SDRAM. The interface 164 arbitrates an internal request for the main memory 160, and performs write / read processing on the main memory 160. The packing and shuffling unit 137 is constituted by the packing unit 137a, the video shuffling unit 137b, and the packing unit 137c.
【0128】図26は、メインメモリ160のアドレス
構成の一例を示す。メインメモリ160は、例えば64
MビットのSDRAMで構成される。メインメモリ16
0は、ビデオ領域250、オーバーフロー領域251お
よびオーディオ領域252を有する。ビデオ領域250
は、4つのバンク(vbank#0、vbank#1、
vbank#2およびvbank#3)からなる。4バ
ンクのそれぞれは、1等長化単位のディジタルビデオ信
号が格納できる。1等長化単位は、発生するデータ量を
略目標値に制御する単位であり、例えばビデオ信号の1
ピクチャ(Iピクチャ)である。図26中の、部分A
は、ビデオ信号の1シンクブロックのデータ部分を示
す。1シンクブロックには、フォーマットによって異な
るバイト数のデータが挿入される。複数のフォーマット
に対応するために、最大のバイト数以上であって、処理
に都合の良いバイト数例えば256バイトが1シンクブ
ロックのデータサイズとされている。FIG. 26 shows an example of the address configuration of the main memory 160. The main memory 160 is, for example, 64
It is composed of an M-bit SDRAM. Main memory 16
0 has a video area 250, an overflow area 251 and an audio area 252. Video area 250
Are four banks (vbank # 0, vbank # 1,
vbank # 2 and vbank # 3). Each of the four banks can store a digital video signal of one equal length unit. One equalization unit is a unit for controlling the amount of generated data to a substantially target value, for example, one unit of a video signal.
This is a picture (I picture). Part A in FIG.
Indicates a data portion of one sync block of the video signal. Data of a different number of bytes is inserted into one sync block depending on the format. In order to support a plurality of formats, the data size of one sync block is equal to or larger than the maximum number of bytes and is a number of bytes convenient for processing, for example, 256 bytes.
【0129】ビデオ領域の各バンクは、さらに、パッキ
ング用領域250Aと内符号化エンコーダへの出力用領
域250Bとに分けられる。オーバーフロー領域251
は、上述のビデオ領域に対応して、4つのバンクからな
る。さらに、オーディオデータ処理用の領域252をメ
インメモリ160が有する。Each bank in the video area is further divided into a packing area 250A and an output area 250B to the inner encoding encoder. Overflow area 251
Consists of four banks corresponding to the above-mentioned video area. Further, the main memory 160 has an area 252 for audio data processing.
【0130】この一実施形態では、各マクロブロックの
データ長標識を参照することによって、パッキング部1
37aが固定枠長データと、固定枠を越える部分である
オーバーフローデータとをメインメモリ160の別々の
領域に分けて記憶する。固定枠長データは、シンクブロ
ックのデータ領域(ペイロード)の長さ以下のデータで
あり、以下、ブロック長データと称する。ブロック長デ
ータを記憶する領域は、各バンクのパッキング処理用領
域250Aである。ブロック長より短いデータ長の場合
には、メインメモリ160の対応する領域に空き領域を
生じる。ビデオシャフリング部137bが書込みアドレ
スを制御することによってシャフリングを行う。ここ
で、ビデオシャフリング部137bは、ブロック長デー
タのみをシャフリングし、オーバーフロー部分は、シャ
フリングせずに、オーバーフローデータに割り当てられ
た領域に書込まれる。In this embodiment, the packing unit 1 is referred to by referring to the data length indicator of each macro block.
Reference numeral 37a stores the fixed frame length data and the overflow data, which is a portion beyond the fixed frame, in separate areas of the main memory 160 and stores them. The fixed frame length data is data that is shorter than the length of the data area (payload) 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. If the data length is shorter than the block length, an empty area is created 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 to the area assigned to the overflow data without shuffling.
【0131】次に、パッキング部137cが外符号エン
コーダ139へのメモリにオーバーフロー部分をパッキ
ングして読み込む処理を行う。すなわち、メインメモリ
160から外符号エンコーダ139に用意されている1
ECCブロック分のメモリに対してブロック長のデータ
を読み込み、若し、ブロック長のデータに空き領域が有
れば、そこにオーバーフロー部分を読み込んでブロック
長にデータが詰まるようにする。そして、1ECCブロ
ック分のデータを読み込むと、読み込み処理を一時中断
し、外符号エンコーダ139によって外符号のパリティ
を生成する。外符号パリティは、外符号エンコーダ13
9のメモリに格納する。外符号エンコーダ139の処理
が1ECCブロック分終了すると、外符号エンコーダ1
39からデータおよび外符号パリティを内符号を行う順
序に並び替えて、メインメモリ160のパッキング処理
用領域250Aと別の出力用領域250Bに書き戻す。
ビデオシャフリング部140は、この外符号の符号化が
終了したデータをメインメモリ160へ書き戻す時のア
ドレスを制御することによって、シンクブロック単位の
シャフリングを行う。Next, the packing section 137c performs processing of packing and reading the overflow portion into the memory for the outer code encoder 139. That is, 1 is prepared from the main memory 160 to the outer code encoder 139.
The data of the block length is read into the memory of the ECC block, and if there is a free area in the data of the block length, an overflow portion is read there to block the data to the block length. When data for one ECC block is read, the reading process is temporarily suspended, and the outer code encoder 139 generates parity of the outer code. The outer code parity is the outer code encoder 13
9 is stored in the memory. When the processing of the outer code encoder 139 is completed for one ECC block, the outer code encoder 1
From 39, the data and the outer code parity are rearranged in the order of performing the inner code, and are written back to the packing processing area 250A of the main memory 160 and another output area 250B.
The video shuffling unit 140 performs shuffling on a sync block basis by controlling an address at the time of writing back the data on which the encoding of the outer code has been completed to the main memory 160.
【0132】このようにブロック長データとオーバーフ
ローデータとを分けてメインメモリ160の第1の領域
250Aへのデータの書込み(第1のパッキング処
理)、外符号エンコーダ139へのメモリにオーバーフ
ローデータをパッキングして読み込む処理(第2のパッ
キング処理)、外符号パリティの生成、データおよび外
符号パリティをメインメモリ160の第2の領域250
Bに書き戻す処理が1ECCブロック単位でなされる。
外符号エンコーダ139がECCブロックのサイズのメ
モリを備えることによって、メインメモリ160へのア
クセスの頻度を少なくすることができる。As described above, the block length data and the overflow data are separated and the data is written into the first area 250A of the main memory 160 (first packing process), and the overflow data is packed into the memory of the outer code encoder 139. (The second packing process), the generation of the outer code parity, and the data and the outer code parity in the second area 250 of the main memory 160.
The process of writing back to B is performed in units of one ECC block.
Since the outer code encoder 139 includes the memory having the size of the ECC block, the frequency of access to the main memory 160 can be reduced.
【0133】そして、1ピクチャに含まれる所定数のE
CCブロック(例えば32個のECCブロック)の処理
が終了すると、1ピクチャのパッキング、外符号の符号
化が終了する。そして、インターフェース164を介し
てメインメモリ160の領域250Bから読出したデー
タがID付加部148、内符号エンコーダ149、同期
付加部150で処理され、並列直列変換部124によっ
て、同期付加部150の出力データがビットシリアルデ
ータに変換される。出力されるシリアルデータがパーシ
ャル・レスポンスクラス4のプリコーダ125により処
理される。この出力が必要に応じてディジタル変調さ
れ、記録アンプ110を介して、回転ドラム111に設
けられた回転ヘッドに供給される。A predetermined number of Es contained in one picture
When the processing of the CC block (for example, 32 ECC blocks) is completed, the packing of one picture and the encoding of the outer code are completed. The data read from the area 250B of the main memory 160 via the interface 164 is processed by the ID addition unit 148, the inner code encoder 149, and the synchronization addition unit 150, and the output data of the synchronization addition unit 150 is output by the parallel / serial conversion unit 124. Is converted to bit serial data. The output serial data is processed by the partial response class 4 precoder 125. This output is digitally modulated as required, and is supplied via a recording amplifier 110 to a rotating head provided on a rotating drum 111.
【0134】なお、ECCブロック内にヌルシンクと称
する有効なデータが配されないシンクブロックを導入
し、記録ビデオ信号のフォーマットの違いに対してEC
Cブロックの構成の柔軟性を持たせるようになされる。
ヌルシンクは、パッキングおよびシャフリングブロック
137のパッキング部137aにおいて生成され、メイ
ンメモリ160に書込まれる。従って、ヌルシンクがデ
ータ記録領域を持つことになるので、これをオーバーフ
ロー部分の記録用シンクとして使用することができる。It is to be noted that a sync block called null sync, in which valid data is not arranged, is introduced into the ECC block, and an ECC block is provided for the difference in recording video signal format.
The configuration of the C block is made flexible.
The null sink is generated in the packing unit 137a of the packing and shuffling block 137, and written into the main memory 160. Therefore, since the null sync has a data recording area, it can be used as a recording sync for the overflow portion.
【0135】オーディオデータの場合では、1フィール
ドのオーディオデータの偶数番目のサンプルと奇数番目
のサンプルとがそれぞれ別のECCブロックを構成す
る。ECCの外符号の系列は、入力順序のオーディオサ
ンプルで構成されるので、外符号系列のオーディオサン
プルが入力される毎に外符号エンコーダ136が外符号
パリティを生成する。外符号エンコーダ136の出力を
メインメモリ160の領域252に書込む時のアドレス
制御によって、シャフリング部137がシャフリング
(チャンネル単位およびシンクブロック単位)を行う。In the case of audio data, even-numbered samples and odd-numbered samples of one-field audio data form different 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 address control when writing the output of the outer code encoder 136 to the area 252 of the main memory 160 causes the shuffling unit 137 to perform shuffling (in units of channels and units of sync blocks).
【0136】さらに、126で示すCPUインターフェ
ースが設けられ、システムコントローラとして機能する
外部のCPU127からのデータを受け取り、内部ブロ
ックに対してパラメータの設定が可能とされている。複
数のフォーマットに対応するために、シンクブロック
長、パリティ長を始め多くのパラメータを設定すること
が可能とされている。Further, a CPU interface indicated by 126 is provided, receives data from an external CPU 127 functioning as a system controller, and sets parameters for 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.
【0137】パラメータの1つとしての”パッキング長
データ”は、パッキング部137aおよび137bに送
られ、パッキング部137a、137bは、これに基づ
いて決められた固定枠(図22Aで「ペイロード長」と
して示される長さ)にVLCデータを詰め込む。The “packing length data” as one of the parameters is sent to the packing units 137a and 137b, and the packing units 137a and 137b determine the fixed frame (“payload length” in FIG. 22A). At the indicated length).
【0138】パラメータの1つとしての”パック数デー
タ”は、パッキング部137bに送られ、パッキング部
137bは、これに基づいて1シンクブロック当たりの
パック数を決め、決められたパック数分のデータを外符
号エンコーダ139に供給する。[0138] "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 the data and the data for the determined number of packs. Is supplied to the outer code encoder 139.
【0139】パラメータの1つとしての”ビデオ外符号
パリティ数データ”は、外符号エンコーダ139に送ら
れ、外符号エンコーダ139は、これに基づいた数のパ
リティが発生されるビデオデータの外符号の符号化を行
う。"Video outer code parity number data" as one of the parameters is sent to outer code encoder 139, and outer code encoder 139 outputs the outer code of the video data from which the number of parities is generated based on this. Perform encoding.
【0140】パラメータの1つとしての”ID情報”お
よび”DID情報”のそれぞれは、ID付加部148に
送られ、ID付加部148は、これらID情報およびD
ID情報をメインメモリ160から読み出された単位長
のデータ列に付加する。Each of “ID information” and “DID information” as one of the parameters is sent to the ID adding section 148, and the ID adding section 148
The ID information is added to the unit-length data string read from the main memory 160.
【0141】パラメータの1つとしての”ビデオ内符号
用パリティ数データ”および”オーディオ内符号用パリ
ティ数データ”のそれぞれは、内符号エンコーダ149
に送られ、内符号エンコーダ149は、これらに基づい
た数のパリティが発生されるビデオデータとオーディオ
データの内符号の符号化を行う。なお、内符号エンコー
ダ149には、パラメータの1つである”シンク長デー
タ”も送られており、これにより、内符号化されたデー
タの単位長(シンク長)が規制される。Each of “parameter number data for video inner code” and “parity number data for audio inner code” as one of the parameters is an inner code encoder 149.
And the inner code encoder 149 encodes the inner code of the video data and the audio data from which the number of parities are generated based on these. It should be noted that “sink length data”, which is one of the parameters, is also sent to the inner code encoder 149, whereby the unit length (sink length) of the inner-coded data is regulated.
【0142】また、パラメータの1つとしてのシャフリ
ングテーブルデータがビデオ用シャフリングテーブル
(RAM)128vおよびオーディオ用シャフリングテ
ーブル(RAM)128aに格納される。シャフリング
テーブル128vは、ビデオシャフリング部137bお
よび140のシャフリングのためのアドレス変換を行
う。シャフリングテーブル128aは、オーディオシャ
フリング137のためのアドレス変換を行う。The shuffling table data as one of the parameters is stored in a video shuffling table (RAM) 128v and an audio shuffling table (RAM) 128a. The shuffling table 128v performs an address conversion for shuffling the video shuffling units 137b and 140. The shuffling table 128a performs an address conversion for the audio shuffling 137.
【0143】上述したように、MPEGにおいては、デ
ータの出現率に応じて所定の符号長が割り当てられる可
変長符号(VLC)を用いてストリームの圧縮符号化が
行われる。ストリームの可変長符号化は、可変長符号を
表すパラメータとして、データ値と可変長符号とが対応
付けられたVLCテーブルが参照されて行われる。VL
Cテーブルは、可変長符号化を行うデータの種類に応じ
て、様々なものが用意されている。図27〜図39は、
MPEGにおいて用いられるVLCテーブルの例を示
す。なお、これら図27〜図39は、ITU−T Re
c.H.262(1995E)規格書より転記されたも
のである。As described above, in MPEG, a stream is compression-encoded using a variable length code (VLC) to which a predetermined code length is assigned according to the appearance rate of data. Variable-length encoding of a stream is performed by referring to a VLC table in which data values and variable-length codes are associated as parameters representing variable-length codes. VL
Various C tables are prepared according to the type of data to be subjected to variable-length coding. FIG. 27 to FIG.
4 shows an example of a VLC table used in MPEG. FIGS. 27 to 39 show ITU-T Re.
c. H. 262 (1995E).
【0144】図27〜図29は、マクロブロックヘッダ
14に含まれるパラメータに関するVLCテーブルであ
って、図27は、macroblock_addres
s_incrementのためのVLCテーブルであ
る。increment_valueに示される値に応
じて、それぞれVLCコードが割り当てられている。以
下のVLCテーブルにおいても、同様な表記がされる。
図28および図29は、それぞれIピクチャおよびPピ
クチャにおけるmacroblock_typeのため
のVLCテーブルである。FIGS. 27 to 29 show VLC tables related to parameters included in the macroblock header 14. FIG. 27 shows macroblock_addresses.
It is a VLC table for s_increment. VLC codes are assigned according to the values indicated in increment_value. The same notation is used in the following VLC table.
FIGS. 28 and 29 are VLC tables for macroblock_type in I and P pictures, respectively.
【0145】図30〜図39は、DCTブロックに含ま
れるパラメータに関するVLCテーブルである。図30
および図31は、それぞれdct_dc_size_l
uminanceおよびdct_dc_size_ch
rominanceのためのVLCテーブルである。FIGS. 30 to 39 are VLC tables related to parameters included in the DCT block. FIG.
And FIG. 31 respectively show dct_dc_size_l
uminance and dct_dc_size_ch
It is a VLC table for romance.
【0146】図32〜図35、ならびに、図36〜図3
9は、図20を用いて既に説明した、DCT係数のラン
およびレベルに関するVLCテーブルである。図32〜
図35は、一連の図であって、DCT係数テーブル0
(DCT coefficients Table
0)と称されるVLCテーブルを示す。同様に、図36
〜図39は、一連の図であって、DCT係数テーブル1
(DCT coefficients Table
1)と称されるVLCテーブルを示す。これらのテーブ
ルでは、1対のランおよびレベルに対して一つのVLC
コードが割り当てられる。FIGS. 32 to 35 and FIGS. 36 to 3
Reference numeral 9 denotes a VLC table relating to the run and level of the DCT coefficient, which has already been described with reference to FIG. FIG.
FIG. 35 is a series of diagrams, each showing a DCT coefficient table 0.
(DCT coefficients Table
2 shows a VLC table called 0). Similarly, FIG.
FIG. 39 to FIG. 39 are a series of diagrams, each showing a DCT coefficient table 1
(DCT coefficients Table
1 shows a VLC table referred to as 1). In these tables, one VLC for a pair of runs and levels
A code is assigned.
【0147】DCT係数テーブル0においては、VLC
コード「10」がDCTブロックの最後を示すEOBで
あるとされ、VLCコード「0000_01」がエスケ
ープコードであると定められる。同様に、DCT係数テ
ーブル1においては、VLCコード「0110」がDC
Tブロックの最後を示すEOBであると定められる。エ
スケープコードは、DCT係数テーブル0と同じく、V
LCコード「0000_01」である。In DCT coefficient table 0, VLC
The code “10” is determined to be the EOB indicating the end of the DCT block, and the VLC code “0000 — 01” is determined to be the escape code. Similarly, in DCT coefficient table 1, VLC code “0110”
It is determined that the EOB indicates the end of the T block. The escape code is the same as DCT coefficient table 0,
The LC code is “0000 — 01”.
【0148】図40および図41は、それぞれ固定長符
号(FLC)のテーブルを示す。上述したDCT係数テ
ーブル0および1は、ランおよびレベルの対について、
図32〜図35、ならびに、図36〜図39にそれぞれ
示されるように、発生頻度の高い113個のVLCが用
意されている。このDCT係数テーブル0および1に用
意されていないランおよびレベルの対については、VL
Cコードのエスケープコードに続けられる、図40およ
び図41にそれぞれ示される、ランおよびレベルのFL
Cによって表現される。FIGS. 40 and 41 show tables of fixed-length codes (FLC), respectively. The DCT coefficient tables 0 and 1 described above show that for run and level pairs,
As shown in FIGS. 32 to 35 and FIGS. 36 to 39, 113 VLCs having a high frequency of occurrence are prepared. For run and level pairs not provided in DCT coefficient tables 0 and 1, VL
The run and level FLs shown in FIGS. 40 and 41, respectively, following the C code escape code
Expressed by C.
【0149】VLCの復号化の際には、例えば上述した
ようなVLCテーブルが参照される。ここで、可変長符
号化されたストリームの復号化時に、VLCテーブルに
存在しないVLCに遭遇し、VLCテーブルのミスマッ
チが発生した場合について、図42を用いて説明する。In decoding the VLC, for example, the above-described VLC table is referred to. Here, a case where a VLC that does not exist in the VLC table is encountered when decoding a variable-length-encoded stream and a mismatch occurs in the VLC table will be described with reference to FIG.
【0150】図42Aは、正常なストリームであって、
スライススタートコードに続けてマクロブロック、DC
T係数の順に伝送され、マクロブロックが終了したら、
次のスライススタートコードが伝送される。この図42
の例では、DCT係数は、上述したDCT係数テーブル
1が用いられて可変長符号化され、DCT係数テーブル
1を用いた部分の可変長符号が下記のようになってい
る。FIG. 42A shows a normal stream.
Macroblock, DC following slice start code
Transmitted in the order of the T coefficient, and when the macroblock ends,
The next slice start code is transmitted. FIG. 42
In the example, the DCT coefficient is subjected to variable-length coding using the DCT coefficient table 1 described above, and the variable-length code of the portion using the DCT coefficient table 1 is as follows.
【0151】・・・・・ 0100 0000_0001_0010_0 0001_010 0010_0110_1 100 ・・・・・... 0100 0000 — 0001 — 0010 — 0 0001 — 010 0010 — 0110 — 1 100.
【0152】この図42Aに示されるストリームにおい
て、伝送エラーなどにより位置Aでストリームが例えば
瞬断されると、ストリームは、図42Bに示されるよう
になり、上述した可変長符号は、下記のようになる。In the stream shown in FIG. 42A, if the stream is momentarily interrupted at a position A due to a transmission error or the like, the stream becomes as shown in FIG. 42B. become.
【0153】・・・・・ 0100 0000_0001_0010_0 0001_010 0010_01 ・・・・・... 0100 0000_0001_0010_0 0001_010 0010_01 ...
【0154】この可変長符号のうち、第4行目のコード
「0010_01」は、DCT係数テーブル1に存在し
ないVLCである。したがって、このストリームの可変
長符号を解くことができなくなってしまうことになる。
デコーダによっては、このような所定のVLCテーブル
に存在しないコードが入力されると、予期せぬコードが
入力されたとしてハングアップなどを起こしてしまう場
合があり得る。一旦ハングアップを起こしてしまうと、
例えば電源を切るなどの手段によって初期化をしない限
り、デコーダは、正常な状態に復帰できない。In the variable length code, the code “0010 — 01” in the fourth row is a VLC that does not exist in the DCT coefficient table 1. Therefore, the variable length code of this stream cannot be solved.
When a code that does not exist in such a predetermined VLC table is input to some decoders, a hang-up or the like may occur as an unexpected code is input. Once it hangs up,
The decoder cannot return to a normal state unless it is initialized by, for example, turning off the power.
【0155】そこで、この発明では、MPEGストリー
ムの可変長符号を解く際に、VLCテーブルに存在しな
いコードに遭遇したら、直ちに可変長符号を解く処理を
止め、次のスタートコードが検出されるまで、入力され
るMPEGストリームを破棄する。上述の図42Bを例
にとると、このストリームに対応したVLCテーブルに
存在しないコードであるコード「0010_01」か
ら、次のスタートコードの直前までを破棄する。ここで
は、スライススタートコード〔00 00 0101
(〜AF)〕の直前までが破棄される。Therefore, according to the present invention, when a variable length code of an MPEG stream is encountered, if a code that does not exist in the VLC table is encountered, the process of decoding the variable length code is immediately stopped, and until the next start code is detected. Discard the input MPEG stream. In the example of FIG. 42B described above, the code from the code “0010 — 01” that does not exist in the VLC table corresponding to this stream to immediately before the next start code is discarded. Here, the slice start code [00 00 0101
(~ AF)] is discarded.
【0156】この処理により、例えば後段に接続された
デコーダに、VLCテーブル上に存在しないコードが入
力されることが回避できる。By this processing, for example, it is possible to avoid inputting a code that does not exist on the VLC table to a decoder connected at the subsequent stage.
【0157】ただし、上述の処理によりVLCテーブル
に存在しないコード以降を打ち切ったストリームを、そ
のまま後段の信号処理ブロックに出力した場合に、問題
が生じるおそれがある。例えば、DCTブロックのそれ
ぞれにはブロックの終端を示すEOBが付加され、その
マクロブロック内のEOBの数をカウントすることで、
当該マクロブロックが終了したかどうかを知ることがで
きる。上述の処理によりストリームを部分的に破棄して
しまうと、1つのマクロブロックにおけるEOBの数が
規定数よりも少なくなり、MPEGのシンタクス違反と
なってしまう可能性がある。However, there is a possibility that a problem may occur if the stream after the code which does not exist in the VLC table is cut off by the above-described processing and is directly output to the subsequent signal processing block. For example, an EOB indicating the end of the block is added to each DCT block, and by counting the number of EOBs in the macro block,
It is possible to know whether or not the macro block has ended. If the stream is partially discarded by the above processing, the number of EOBs in one macroblock becomes smaller than the specified number, and there is a possibility that the syntax of the MPEG is violated.
【0158】後段の信号処理ブロックにおいて、入力さ
れるストリームに、規定される全てのEOBが含まれて
いることが期待されている場合、EOBの数が少ない
と、この信号処理ブロックの動作が止まってしまうおそ
れがある。例えば、この信号処理ブロックが、1マクロ
ブロック内に規定数のEOBブロックを検出するまで次
の処理に進まないようにされている場合などが考えられ
る。In the subsequent signal processing block, when it is expected that the input stream contains all the specified EOBs, if the number of EOBs is small, the operation of this signal processing block stops. There is a risk that it will. For example, the signal processing block may not proceed to the next processing until a specified number of EOB blocks are detected in one macroblock.
【0159】この発明では、上述した、VLCテーブル
に存在しないコードから次のヘッダまでのストリームを
破棄する処理に加えて、この間を、MPEGのシンタク
スエラーが無いようにストリームを修正して出力する。According to the present invention, in addition to the above-described process of discarding a stream from a code that does not exist in the VLC table to the next header, the stream is corrected and output so that there is no MPEG syntax error.
【0160】詳細は後述するが、実際には、VLC復号
部において、入力されたストリームに対してVLCテー
ブルのミスマッチが生じていないかどうかの検出が行わ
れ、検出結果に基づき、VLCミスマッチが生じている
位置を示す信号table_mismatchがVLC
復号部から出力される。例えば、信号table_mi
smatchが”H”状態で、その位置にVLCミスマ
ッチが発生していることが示される。この信号tabl
e_mismatchに基づき、上述のストリームの破
棄と修正とが行われる。Although the details will be described later, in actuality, the VLC decoding unit detects whether or not a mismatch of the VLC table has occurred in the input stream, and based on the detection result, the VLC mismatch occurs. The signal table_mismatch indicating the current position is VLC
Output from the decoding unit. For example, the signal table_mi
When smatch is in the “H” state, it indicates that a VLC mismatch has occurred at that position. This signal tabl
The stream is discarded and corrected based on e_mismatch.
【0161】この一実施形態によるストリーム修正処理
について説明する。MPEGストリームのDCT係数が
並べ替えられた変換ストリームと、MPEGストリーム
とでは処理が異なる。[0161] The stream correction processing according to this embodiment will be described. The processing is different between a converted stream in which DCT coefficients of an MPEG stream are rearranged and an MPEG stream.
【0162】また、対象となるVLCテーブルにより処
理が異なる。この一実施形態では、対象となるVLCテ
ーブルを、(1)dct_coefficients
(上述のDCT係数テーブル0または1)のVLCテー
ブル、(2)dct_dc_size_luminan
ceのVLCテーブル、(3)dct_dc_size
_chrominanceのVLCテーブル、(4)m
acroblock_typeのVLCテーブルおよび
(5)macroblock_address_inc
rementのVLCテーブルとしている。The processing differs depending on the target VLC table. In this embodiment, the target VLC table is defined as (1) dct_coefficients
VLC table of (DCT coefficient table 0 or 1 described above), (2) dct_dc_size_luminan
VLC table of ce, (3) dct_dc_size
VLC table of _chrominance, (4) m
VLC table of acroblock_type and (5) macroblock_address_inc
The VLC table is a VLC table of the element.
【0163】これらのうち、(1)のdct_coef
ficientsのVLCテーブルは、DCTブロック
のDCT係数に関する処理である。(2)のdct_d
c_size_luminanceのVLCテーブルお
よび(3)のdct_dc_size_chromin
anceのVLCテーブルは、それぞれ輝度ブロックお
よび色差ブロックにおけるDC係数のDCTブロックに
関する処理である。また、(4)のmacrobloc
k_typeのVLCテーブルおよび(5)のmacr
oblock_address_incrementの
VLCテーブルは、それぞれヘッダに関する処理であ
る。Among them, dct_coef of (1)
The VLC table of “fients” is a process related to the DCT coefficient of the DCT block. Dct_d of (2)
VLC table of c_size_luminance and dct_dc_size_chromin of (3)
The VLC table of annce is a process related to a DCT block of DC coefficients in a luminance block and a chrominance block, respectively. In addition, the macroblock of (4)
VLC table of k_type and macr of (5)
The VLC table of obblock_address_increment is a process related to a header.
【0164】先ず、変換ストリームの場合の、上述の
(1)〜(5)に示すVLCテーブルのミスマッチに対
する処理について、図43〜図45を用いて説明する。
図43は、(1)のdct_coefficients
のVLCテーブルに関してミスマッチが発生した例を示
す。図43Aに示されるように、スライスヘッダおよび
マクロブロックヘッダに続いてDCT係数が伝送され
る。変換ストリームであるので、係数は、DC成分のD
CT係数DCが先頭に配され、その後にAC成分のDC
T係数が低周波成分から高周波成分へと、DCT係数A
C1、AC2、・・・、AC63と配される。なお、AC成
分は、これら全てが常に配されるわけではない。First, the processing for the mismatch of the VLC table shown in the above (1) to (5) in the case of the converted stream will be described with reference to FIGS. 43 to 45.
FIG. 43 is a diagram illustrating the dct_coefficients of (1).
An example in which a mismatch has occurred in the VLC table of FIG. As shown in FIG. 43A, a DCT coefficient is transmitted following a slice header and a macroblock header. Since this is a transformed stream, the coefficients are
The CT coefficient DC is placed at the head, and then the DC of the AC component
When the T coefficient changes from a low frequency component to a high frequency component, the DCT coefficient A
C 1, AC 2, ···, it is arranged with the AC 63. Note that all of the AC components are not always arranged.
【0165】そして、最後のAC成分のDCT係数の後
ろに、EOBが配される。DC成分およびAC成分のD
CT係数とEOBのそれぞれは、さらに、輝度成分Yに
よるDCTブロックY1、Y2、Y3およびY4、ならび
に、色差成分Cb、CrによるDCTブロックCb1、
Cr1、Cb2およびCr2からなる。この配列は、図4
3、図44および図45において共通である。[0165] The EOB is arranged after the DCT coefficient of the last AC component. D of DC and AC components
Each of the CT coefficient and EOB is further divided into DCT blocks Y 1 , Y 2 , Y 3 and Y 4 by the luminance component Y, and DCT blocks Cb 1 by the color difference components Cb and Cr,
It consists of Cr 1 , Cb 2 and Cr 2 . This arrangement is shown in FIG.
3, common in FIG. 44 and FIG.
【0166】ここで、図43Bに一例が示されるよう
に、AC成分のAC2における輝度成分YのDCTブロ
ックY4の位置で信号table_mismatch
が”H”状態とされ、このDCT係数にVLCミスマッ
チが存在するものとする。変換ストリームは、VLCな
ので、これ以降のデータは信頼できないことになる。[0166] Here, as an example in FIG. 43B is shown, the signal table_mismatch at the position of the DCT blocks Y 4 of the luminance component Y in AC 2 of the AC component
Is set to the “H” state, and a VLC mismatch exists in this DCT coefficient. Since the conversion stream is a VLC, the data thereafter is not reliable.
【0167】この場合、図43Cに一例が示されるよう
に、VLCミスマッチが存在するAC成分のDCT係数
AC2において、VLCミスマッチが存在する輝度成分
のDCTブロックY4およびそれ以降の各成分のDCT
ブロックCb1、Cr1、Cb2、Cr2、Y1、Y2、Y3
が、DCT係数テーブルのEOBを示すVLCと置き換
えられる。AC3以降のDCT係数は、捨てられ、その
マクロブロックは、打ち切られる。[0167] In this case, as exemplified in FIG. 43C is shown, in the DCT coefficients AC 2 of the AC component VLC mismatch is present, the DCT blocks Y 4 and each subsequent component of the luminance component VLC mismatch exists DCT
Blocks Cb 1 , Cr 1 , Cb 2 , Cr 2 , Y 1 , Y 2 , Y 3
Is replaced with VLC indicating EOB in the DCT coefficient table. DCT coefficients of AC 3 and later discarded, the macro block is terminated.
【0168】このとき、当該マクロブロック内の全ての
DCTブロックにEOBが付加されているように考慮さ
れる。すなわち、当該マクロブロック内に、規定数のE
OBが存在するように考慮される。このように修正され
たストリームは、図43Cのようになる。At this time, it is considered that EOB is added to all DCT blocks in the macro block. That is, the specified number of E
It is considered that OB is present. The stream thus modified is as shown in FIG. 43C.
【0169】図44は、(2)のdct_dc_siz
e_luminanceのVLCテーブルおよび(3)
のdct_dc_size_chrominanceの
VLCテーブルに関してミスマッチが発生した例を示
す。図44Aは、上述の図43Aと同一の図である。FIG. 44 shows dct_dc_siz of (2).
e_luminance VLC table and (3)
7 shows an example in which a mismatch has occurred in the VLC table of dct_dc_size_chrominance. FIG. 44A is the same as FIG. 43A described above.
【0170】ここで、図44Bに点線で示されるよう
に、DC成分の輝度成分YのDCTブロック(この例で
は、DCTブロックY4)の位置でtable_mis
matchが”H”状態とされ、dct_dc_siz
e_luminanceのテーブルにVLCミスマッチ
が存在する場合、図44Dに一例が示されるように、V
LCミスマッチが存在するDCT係数(Y4、DC)
は、例えば灰色表示を表すdct_dc_size_l
uminanceのVLCおよびdct_dc_dif
ferentialで置換される。それ以降のDCT係
数は、例えば灰色表示を表すdct_dc_size_
chrominanceのVLCおよびdct_dc_
differentialで置換される。さらに、各ブ
ロックにEOBが付加され、そのマクロブロックが打ち
切られる。Here, as shown by the dotted line in FIG. 44B, table_mis is set at the position of the DCT block (in this example, DCT block Y 4 ) of the luminance component Y of the DC component.
match is set to the “H” state, and dct_dc_siz
If there is a VLC mismatch in the e_luminance table, as shown in FIG.
DCT coefficient with LC mismatch (Y 4 , DC)
Is, for example, dct_dc_size_l representing gray display.
uminance VLC and dct_dc_dif
replaced with ferential. DCT coefficients after that are, for example, dct_dc_size_ representing gray display.
Chrominance VLC and dct_dc_
replaced by differential. Further, EOB is added to each block, and the macro block is terminated.
【0171】なお、図44Bにtable_misma
tchが実線で”H”状態とされるように、DC成分に
おける色差成分Cr2のDCT係数Cr2の位置でtab
le_mismatchが”H”状態とされ、このDC
T係数においてdct_dc_size_chromi
nanceのVLCミスマッチが存在する場合も考えら
れる。It should be noted that table_misma is shown in FIG. 44B.
The tab at the position of the DCT coefficient Cr 2 of the color difference component Cr 2 in the DC component so that tch is set to the “H” state by the solid line.
le_mismatch is set to the “H” state, and this DC
Dct_dc_size_chromi in T coefficient
It is also conceivable that a nonce VLC mismatch exists.
【0172】このように、色差成分Cr、Cbのうち何
れか一方のDCTブロックだけにVLCミスマッチが存
在する場合、そのまま、VLCミスマッチが存在する一
方のDCTブロックだけを灰色表示のDCTブロックに
置き換えてしまうと、そのブロックは、画面表示上で異
常な色のブロックとなってしまう。これは、マクロブロ
ックとしては、対になる他方の色差ブロックのDC成分
のDCTブロックと演算を行うためである。この実施の
一形態では、このような事態を避けるために、図44C
の#1に示されるように、対になる他方の色差成分(C
b2)のDCTブロックまで遡って、上述したように灰
色表示のDCTブロックに置き換える。As described above, when the VLC mismatch exists in only one of the color difference components Cr and Cb, only the one DCT block in which the VLC mismatch exists is replaced by the gray DCT block. Then, the block becomes a block of an abnormal color on the screen display. This is because, as a macroblock, the DCT block of the DC component of the other color difference block forming a pair is operated. In this embodiment, in order to avoid such a situation, FIG.
As shown in # 1, the other color difference component (C
Go back to the DCT block of b 2 ), and replace it with the gray DCT block as described above.
【0173】その後、さらに各DCTブロックにEOB
が付加され、そのマクロブロックが打ち切られる。修正
されたストリームは、図44Cのようになる。Thereafter, EOB is further added to each DCT block.
Is added, and the macroblock is aborted. The modified stream is as shown in FIG. 44C.
【0174】図45は、ヘッダ部分、例えばスライスヘ
ッダやマクロブロックヘッダにVLCミスマッチが存在
する場合の例である。これは、上述した(4)のmac
roblock_typeのVLCテーブルあるいは
(5)のmacroblock_address_in
crementのVLCテーブルに関してミスマッチが
発生した場合に対応する。図45Aは、上述の図43A
と同一である。FIG. 45 shows an example in which a VLC mismatch exists in a header portion, for example, a slice header or a macroblock header. This is based on the mac of (4) described above.
VLC table of roblock_type or macroblock_address_in of (5)
This corresponds to a case where a mismatch has occurred with respect to the VLC table of the “crement”. FIG. 45A is similar to FIG.
Is the same as
【0175】先ず、(4)のmacroblock_t
ypeのVLCテーブルに関してVLCミスマッチが発
生した場合について説明する。より具体的には、Iピク
チャであれば、上述した図28によればVLCコードが
「00」でVLCミスマッチとなる。table_mi
smatchは、図45Bに示されるように、ヘッダ部
の対応する位置で”H”状態とされる。First, macroblock_t of (4)
A case where a VLC mismatch has occurred in the VLC table of type y will be described. More specifically, if the picture is an I picture, the VLC code is “00” and a VLC mismatch occurs according to FIG. 28 described above. table_mi
As shown in FIG. 45B, smatch is set to the “H” state at a corresponding position in the header section.
【0176】この場合、macroblock_typ
eがmacroblock_intraを表すmacr
oblock_typeのVLCで置換される。例え
ば、図45Cの#2に示される部分において、macr
oblock_typeがVLCコード「1」で置換さ
れる。その後、必要であれば、dct_typeが付加
される。例えば、図45Cの#2に示される部分におい
て、dct_typeが「1」で置換される。In this case, macroblock_type
e is a macro representing macroblock_intra
It is replaced by the VLC of obblock_type. For example, in the portion indicated by # 2 in FIG.
obblock_type is replaced with VLC code “1”. Thereafter, if necessary, dct_type is added. For example, in the part indicated by # 2 in FIG. 45C, dct_type is replaced with “1”.
【0177】さらに、輝度成分のDCTブロックY1、
Y2、Y3およびY4が例えば灰色表示を表すdct_d
c_size_luminanceのVLCおよびdc
t_dc_differentialで置換され、色差
成分のDCTブロックCb1、Cr1、Cb2およびCr2
が例えば灰色表示を表すdct_dc_size_ch
rominanceのVLCおよびdct_dc_di
fferentialで置換される。さらに、各DCT
ブロックにEOBが付加され、そのマクロブロックが打
ち切られる。修正されたストリームは、図45Cのよう
になる。Further, the DCT block Y 1 of the luminance component,
Dct_d in which Y 2 , Y 3 and Y 4 represent, for example, gray display
VLC and dc of c_size_luminance
DCT blocks Cb 1 , Cr 1 , Cb 2 and Cr 2 which are replaced by t_dc_differential and have color difference components
Is, for example, dct_dc_size_ch representing gray display.
VLC and dct_dc_di of romance
Replaced with "ferential". In addition, each DCT
EOB is added to the block, and the macroblock is aborted. The modified stream is as shown in FIG. 45C.
【0178】(5)のmacroblock_addr
ess_incrementのVLCテーブルに関して
VLCミスマッチが発生した場合について説明する。こ
の場合には、マクロブロックのmb_rowおよびmb
_columnの連続性を利用し、1つ前のマクロブロ
ックのmb_rowおよびmb_columnからVL
Cミスマッチが発生したマクロブロックのmb_row
およびmb_columnを求める。求められたmb_
rowおよびmb_columnに基づき、macro
block_address_incrementのV
LCが置換される。引き続き、macroblock_
typeが例えばmacroblock_intraを
表すmacroblock_typeのVLC「1」で
置換される。(5) macroblock_addr
A case where a VLC mismatch has occurred in the VLC table of ess_increment will be described. In this case, the mb_row and mb of the macroblock
Using the continuity of the _column, the VL from the mb_row and mb_column of the immediately preceding macroblock
Mb_row of macroblock where C mismatch occurred
And mb_column. Mb_ found
macro based on row and mb_column
V of block_address_increment
LC is replaced. Then, macroblock_
For example, type is replaced with VLC “1” of macroblock_type representing macroblock_intra.
【0179】その後、必要であれば、dct_type
が付加される。例えば、図45Cの#2に示される部分
において、dct_typeが「1」で置換される。さ
らに、輝度成分のDCTブロックY1、Y2、Y3および
Y4が例えば灰色表示を表すdct_dc_size_
luminanceのVLCおよびdct_dc_di
fferentialで置換され、色差成分のDCTブ
ロックCb1、Cr1、Cb2およびCr2が例えば灰色表
示を表すdct_dc_size_chrominan
ceのVLCおよびdct_dc_different
ialで置換される。さらに、各DCTブロックにEO
Bが付加され、そのマクロブロックが打ち切られる。修
正されたストリームは、図45Cのようになる。After that, if necessary, dct_type
Is added. For example, in the part indicated by # 2 in FIG. 45C, dct_type is replaced with “1”. Further, the DCT blocks Y 1 , Y 2 , Y 3 and Y 4 of the luminance component are, for example, dct_dc_size_ representing gray display.
Luminance VLC and dct_dc_di
DCT blocks Cb 1 , Cr 1 , Cb 2 and Cr 2 of the chrominance components are replaced by different, for example, dct_dc_size_chrominan representing gray display
ce VLC and dct_dc_different
ial. Furthermore, EO is assigned to each DCT block.
B is added and the macroblock is aborted. The modified stream is as shown in FIG. 45C.
【0180】次に、MPEGストリームの場合の、上述
の(1)〜(5)に示すVLCテーブルのミスマッチに
対する処理について、図46〜図48を用いて説明す
る。図46は、(1)のdct_coefficien
tsのVLCテーブルに関してミスマッチが発生した例
を示す。図46Aに示されるように、スライスヘッダお
よびマクロブロックヘッダに続いて輝度成分Yによる輝
度ブロックY1のデータが伝送される。輝度ブロックY1
に続けて、輝度ブロックY2、Y3、Y4、色差成分C
b、Crによる色差ブロックCb1、Cr1、Cb2およ
びCr2が並べられる。Next, the processing for the mismatch of the VLC table shown in the above (1) to (5) in the case of the MPEG stream will be described with reference to FIGS. 46 to 48. FIG. 46 shows dct_coefficien of (1).
An example in which a mismatch has occurred in the VLC table of ts will be described. As shown in FIG. 46A, data of the luminance block Y 1 by the luminance component Y Following the slice header and macroblock header is transmitted. Luminance block Y 1
Followed by the luminance blocks Y 2 , Y 3 , Y 4 and the color difference component C
The color difference blocks Cb 1 , Cr 1 , Cb 2 and Cr 2 by b and Cr are arranged.
【0181】輝度ブロックY1、Y2、Y3およびY4、な
らびに、色差ブロックCb1、Cr1、Cb2およびCr2
のそれぞれにおいて、DC成分のDCT係数を先頭に、
AC成分のDCT係数が低次から高次へと並べられ、最
後にEOBが付加される。この配列は、図47および図
48でも同様である。The luminance blocks Y 1 , Y 2 , Y 3 and Y 4 and the color difference blocks Cb 1 , Cr 1 , Cb 2 and Cr 2
, With the DCT coefficient of the DC component at the top,
The DCT coefficients of the AC component are arranged from the lower order to the higher order, and finally EOB is added. This arrangement is the same in FIGS. 47 and 48.
【0182】ここで、図46Bに一例が示されるよう
に、輝度ブロックY3におけるAC成分のDCT係数A
C3の位置でtable_mismatchが”H”状
態となり、このDCT係数でVLCミスマッチが発生し
ているものとする。MPEGストリームは、VLCなの
で、これ以降のデータは信頼できないことになる。[0182] Here, as an example in FIG. 46B is shown, DCT coefficients of the AC components in the luminance block Y 3 A
Table_mismatch becomes "H" state at the position of C 3, it is assumed that the VLC mismatch occurs in the DCT coefficients. Since the MPEG stream is a VLC, the data thereafter is unreliable.
【0183】この場合には、VLCミスマッチが存在す
るDCT係数がEOBを表すVLCで置換され、そのマ
クロブロックが打ち切られる。例えば、図46Cに一例
が示されるように、VLCミスマッチが存在する輝度ブ
ロックY3におけるAC成分のDCT係数AC3がEOB
に置き換えられ、輝度ブロックY3のブロックが打ち切
られる。MPEGストリームの場合は、この輝度ブロッ
クY3のブロックの後ろに続く輝度信号Y4および色差信
号Cb1、Cr1、Cb2、Cr2のブロックでは、DC成
分さえ再現できないことになる。In this case, the DCT coefficient having the VLC mismatch is replaced with VLC representing EOB, and the macro block is aborted. For example, as exemplified in FIG. 46C is shown, DCT coefficients AC 3 of the AC components in the luminance block Y 3 which VLC mismatch exists EOB
Replaced by a block of the luminance block Y 3 is aborted. For MPEG stream, this luminance block Y luminance signal follows the third block Y 4 and the color difference signals Cb 1, Cr 1, Cb 2 , the Cr 2 blocks, it will not even be reproduced DC component.
【0184】そこで、この実施の一形態では、MPEG
のシンタクス違反を回避するため、これらのブロック
が、例えば灰色表示を表すDC成分のDCTブロックに
置き換えられると共に各ブロックにEOBが付加され、
そのマクロブロックが打ち切られる。Therefore, in this embodiment, MPEG
In order to avoid the syntax violation of the above, these blocks are replaced with DCT blocks of DC components representing gray display, for example, and EOB is added to each block,
The macroblock is aborted.
【0185】また、この図46の例において、色差ブロ
ックCb、Crの途中でVLCテーブルのミスマッチが
発生した場合、後述するような、マクロブロックにおけ
る1対の色差ブロックCb、Crでの演算により、マク
ロブロックが異常な色表示になってしまうおそれがあ
る。これを避けるために、後述するように、対になる色
差ブロックを遡って灰色表示などのDCTブロックへの
置き換えとEOBの付加とが行われる。In the example of FIG. 46, when a mismatch of the VLC table occurs in the middle of the chrominance blocks Cb and Cr, a calculation is performed on a pair of chrominance blocks Cb and Cr in the macro block as described later. There is a possibility that the macro block will be displayed in an abnormal color. In order to avoid this, as will be described later, a pair of color difference blocks is retroactively replaced with a DCT block such as gray display and an EOB is added.
【0186】図47は、(3)のdct_dc_siz
e_chrominanceのVLCテーブルに関して
ミスマッチが発生した例を示す。図47Aは、上述の図
46Aと同一の図である。FIG. 47 shows dct_dc_siz of (3).
An example in which a mismatch has occurred in the VLC table of e_chrominance is shown. FIG. 47A is the same as FIG. 46A described above.
【0187】図47Bに示されるような位置でtabl
e_mismatchが”H”状態となり、色差ブロッ
クCr2のDC成分のDCT係数DCにおいてVLCテ
ーブルのミスマッチが発生しているものとする。この場
合には、そのDCTブロックが、例えば灰色表示を表す
dct_dc_size_chrominanceのV
LCおよびdct_dc_differentialで
置換されDC成分のDCTブロックとされると共に、E
OBが付加され、そのマクロブロックが打ち切られる。At the position shown in FIG. 47B, tabl
It is assumed that e_mismatch is in the “H” state, and a VLC table mismatch has occurred in the DCT coefficient DC of the DC component of the color difference block Cr 2 . In this case, the DCT block is, for example, V of dct_dc_size_chrominance representing gray display.
It is replaced by LC and dct_dc_differential to make a DCT block of a DC component, and E
OB is added and the macroblock is aborted.
【0188】このように、色差成分Cr、Cbのうち何
れか一方のDCTブロックだけにVLCミスマッチが存
在する場合、そのまま、VLCミスマッチが存在する一
方のDCTブロックだけを灰色表示のDCTブロックに
置き換えてしまうと、そのブロックは、画面表示上で異
常な色のブロックとなってしまう。これは、マクロブロ
ックとしては、対になる他方の色差ブロックのDC成分
のDCTブロックと演算を行うためである。この実施の
一形態では、このような事態を避けるために、図47C
の#1に示されるように、対になる他方の色差成分のD
CTブロックまで遡って、上述したように灰色表示のD
CTブロックに置き換える。これにより、当該マクロブ
ロックの輝度ブロックY3およびY4に相当する領域は、
異常な色とはならず、モノクロームの画像として再現で
きる。As described above, when the VLC mismatch exists in only one of the color difference components Cr and Cb, only the one DCT block in which the VLC mismatch exists is replaced by the gray DCT block. Then, the block becomes a block of an abnormal color on the screen display. This is because, as a macroblock, the DCT block of the DC component of the other color difference block forming a pair is operated. In this embodiment, in order to avoid such a situation, FIG.
As shown in # 1, D of the other color difference component forming a pair
Going back to the CT block, as described above,
Replace with a CT block. Thus, the area corresponding to the luminance blocks Y 3 and Y 4 of the macro block is
The color is not abnormal and can be reproduced as a monochrome image.
【0189】その後、さらに各DCTブロックにEOB
が付加され、そのマクロブロックが打ち切られる。修正
されたストリームは、図47Cのようになる。After that, EOB is further added to each DCT block.
Is added, and the macroblock is aborted. The modified stream is as shown in FIG. 47C.
【0190】なお、DC成分の輝度成分YのDCTブロ
ック、例えばDCTブロックY4の位置でtable_
mismatchが”H”状態とされ、dct_dc_
size_luminanceのテーブルにVLCミス
マッチが存在する場合、VLCミスマッチが存在するD
CT係数(Y4、DC)は、例えば灰色表示を表すdc
t_dc_size_luminanceのVLCおよ
びdct_dc_differentialで置換され
る。それ以降のDCT係数は、例えば灰色表示を表すd
ct_dc_size_chrominanceのVL
Cおよびdct_dc_differentialで置
換される。さらに、各ブロックにEOBが付加され、そ
のマクロブロックが打ち切られる。修正されたストリー
ムは、図47Dのようになる。[0190] Incidentally, the DCT blocks of the luminance component Y of the DC component, for example at the location of the DCT blocks Y 4 table_
Mismatch is set to the “H” state, and dct_dc_
If a VLC mismatch exists in the size_luminance table,
The CT coefficient (Y 4 , DC) is, for example, dc representing gray display.
Replaced by VLC of t_dc_size_luminance and dct_dc_differential. The subsequent DCT coefficients are, for example, d representing gray display.
ct_dc_size_chrominance VL
Replaced by C and dct_dc_differential. Further, EOB is added to each block, and the macro block is terminated. The modified stream is as shown in FIG. 47D.
【0191】図48は、ヘッダ部分、例えばスライスヘ
ッダやマクロブロックヘッダにVLCミスマッチが存在
する場合の例である。これは、上述した(4)のmac
roblock_typeのVLCテーブルあるいは
(5)のmacroblock_address_in
crementのVLCテーブルに関してミスマッチが
発生した場合に対応する。図48Aは、上述の図46A
と同一である。FIG. 48 shows an example in which a VLC mismatch exists in a header portion, for example, a slice header or a macroblock header. This is based on the mac of (4) described above.
VLC table of roblock_type or macroblock_address_in of (5)
This corresponds to a case where a mismatch has occurred with respect to the VLC table of the “crement”. FIG. 48A is similar to FIG.
Is the same as
【0192】先ず、(4)のmacroblock_t
ypeのVLCテーブルに関してVLCミスマッチが発
生した場合について説明する。より具体的には、Iピク
チャであれば、上述した図28によればVLCコードが
「00」でVLCミスマッチとなる。table_mi
smatchは、図48Bに示されるように、ヘッダ部
の対応する位置で”H”状態とされる。First, macroblock_t of (4)
A case where a VLC mismatch has occurred in the VLC table of type y will be described. More specifically, if the picture is an I picture, the VLC code is “00” and a VLC mismatch occurs according to FIG. 28 described above. table_mi
As shown in FIG. 48B, smatch is set to the “H” state at a corresponding position in the header section.
【0193】この場合、macroblock_typ
eがmacroblock_intraを表すmacr
oblock_typeのVLCで置換される。例え
ば、図48Cの#2に示される部分において、macr
oblock_typeがVLCコード「1」で置換さ
れる。In this case, macroblock_type
e is a macro representing macroblock_intra
It is replaced by the VLC of obblock_type. For example, in the portion indicated by # 2 in FIG.
obblock_type is replaced with VLC code “1”.
【0194】その後、必要であれば、dct_type
が付加される。例えば、図48Cの#2に示される部分
において、dct_typeが「1」で置換される。さ
らに、輝度成分のDCTブロックY1、Y2、Y3および
Y4が例えば灰色表示を表すdct_dc_size_
luminanceのVLCおよびdct_dc_di
fferentialで置換され、修正される。色差ブ
ロックでは、色差成分のDCTブロックCb1、Cr1、
Cb2およびCr2が例えば灰色表示を表すdct_dc
_size_chrominanceのVLCおよびd
ct_dc_differentialで置換され、修
正される。さらに、各DCTブロックにEOBが付加さ
れ、そのマクロブロックが打ち切られる。修正されたス
トリームは、図48Cのようになる。After that, if necessary, dct_type
Is added. For example, in the portion indicated by # 2 in FIG. 48C, dct_type is replaced with “1”. Further, the DCT blocks Y 1 , Y 2 , Y 3 and Y 4 of the luminance component are, for example, dct_dc_size_ representing gray display.
Luminance VLC and dct_dc_di
replaced with "ferential" and modified. In the color difference block, DCT blocks Cb 1 , Cr 1 ,
Dct_dc in which Cb 2 and Cr 2 represent, for example, gray display
_Size_chrominance VLC and d
Replaced with ct_dc_differential and modified. Further, EOB is added to each DCT block, and the macro block is aborted. The modified stream is as shown in FIG. 48C.
【0195】(5)のmacroblock_addr
ess_incrementのVLCテーブルに関して
VLCミスマッチが発生した場合について説明する。こ
の場合には、マクロブロックのmb_rowおよびmb
_columnの連続性を利用し、1つ前のマクロブロ
ックのmb_rowおよびmb_columnからVL
Cミスマッチが発生したマクロブロックのmb_row
およびmb_columnを求める。求められたmb_
rowおよびmb_columnに基づき、macro
block_address_incrementのV
LCが置換される。引き続き、macroblock_
typeが例えばmacroblock_intraを
表すmacroblock_typeのVLC「1」で
置換される。(5) macroblock_addr
A case where a VLC mismatch has occurred in the VLC table of ess_increment will be described. In this case, the mb_row and mb of the macroblock
Using the continuity of the _column, the VL from the mb_row and mb_column of the immediately preceding macroblock
Mb_row of macroblock where C mismatch occurred
And mb_column. Mb_ found
macro based on row and mb_column
V of block_address_increment
LC is replaced. Then, macroblock_
For example, type is replaced with VLC “1” of macroblock_type representing macroblock_intra.
【0196】その後、必要であれば、dct_type
が付加される。例えば、図48Cの#2に示される部分
において、dct_typeが「1」で置換される。さ
らに、輝度成分のDCTブロックY1、Y2、Y3および
Y4が例えば灰色表示を表すdct_dc_size_
luminanceのVLCおよびdct_dc_di
fferentialで置換され、修正される。色差ブ
ロックでは、色差成分のDCTブロックCb1、Cr1、
Cb2およびCr2が例えば灰色表示を表すdct_dc
_size_chrominanceのVLCおよびd
ct_dc_differentialで置換され、修
正される。さらに、各DCTブロックにEOBが付加さ
れ、そのマクロブロックが打ち切られる。修正されたス
トリームは、図48Cのようになる。After that, if necessary, dct_type
Is added. For example, in the portion indicated by # 2 in FIG. 48C, dct_type is replaced with “1”. Further, the DCT blocks Y 1 , Y 2 , Y 3 and Y 4 of the luminance component are, for example, dct_dc_size_ representing gray display.
Luminance VLC and dct_dc_di
replaced with "ferential" and modified. In the color difference block, DCT blocks Cb 1 , Cr 1 ,
Dct_dc in which Cb 2 and Cr 2 represent, for example, gray display
_Size_chrominance VLC and d
Replaced with ct_dc_differential and modified. Further, EOB is added to each DCT block, and the macro block is aborted. The modified stream is as shown in FIG. 48C.
【0197】この発明の一実施形態では、このようにし
て変換ストリームやMPEGストリームの修正を行う。
上述では、灰色表示を行うDC値のDCTブロックを用
いてブロックを置換することで、ストリームの修正を行
うように説明したが、これはこの例に限定されない。修
正に用いるブロックのDC値は、灰色表示に限られず、
一つ前のブロックのDC値を用いるようにしてもよい。
また、黒色や赤色表示のブロックを用いても構わない。
なお、ここでいうDC値とは、MPEGに定められるd
ct_dc_size_luminanceとdct_
dc_differential、あるいは、dct_
dc_size_chrominanceとdct_d
c_differentialを示す。In the embodiment of the present invention, the conversion stream and the MPEG stream are corrected in this way.
In the above description, it has been described that the stream is corrected by replacing the block using the DCT block of the DC value for performing gray display, but this is not limited to this example. The DC value of the block used for correction is not limited to gray display,
The DC value of the immediately preceding block may be used.
Further, a block for displaying black or red may be used.
Note that the DC value here is d defined in MPEG.
ct_dc_size_luminance and dct_
dc_differential or dct_
dc_size_chrominance and dct_d
Indicates c_differential.
【0198】図49は、上述した、この一実施形態によ
るストリーム修正処理を示す一例のフローチャートであ
る。このストリーム修正処理は、1フレーム毎に完結す
る処理である。フレームが開始されると、最初のステッ
プS10で可変長符号の復号化(VLD)が行われる。
所定のVLCテーブルを参照して、入力されたストリー
ムを解き、可変長符号が復号化される。FIG. 49 is a flowchart showing an example of the above-described stream correction processing according to this embodiment. This stream correction process is a process that is completed for each frame. When the frame starts, decoding (VLD) of a variable length code is performed in the first step S10.
The input stream is solved with reference to a predetermined VLC table, and the variable length code is decoded.
【0199】次のステップS11で、可変長符号が復号
化されたストリームにおいて、DCTブロック以前のヘ
ッダ部にVLCテーブルのミスマッチが無いかどうかが
判断される。若し、ヘッダ部にVLCテーブルのミスマ
ッチが発生していると判断されれば、処理はステップS
12に移行し、ヘッダ部が予め用意されたヘッダ情報に
置き換えられる。さらに、DC成分のDCT係数が例え
ば灰色表示を行うデータに置き換えられると共に、DC
成分のDCT係数の直後にEOBが付加され、そのマク
ロブロックが打ち切られる。そして、処理はステップS
13に移行する。In the next step S11, it is determined whether or not there is a mismatch in the VLC table in the header portion before the DCT block in the stream in which the variable length code has been decoded. If it is determined that a mismatch of the VLC table has occurred in the header portion, the process proceeds to step S
Then, the process proceeds to step 12, where the header part is replaced with the prepared header information. Further, the DCT coefficient of the DC component is replaced with, for example, data for displaying gray, and the DCT coefficient is also changed.
EOB is added immediately after the DCT coefficient of the component, and the macroblock is truncated. Then, the process proceeds to step S
Go to step 13.
【0200】一方、ステップS11でブロック以前のヘ
ッダ部にVLCテーブルのミスマッチが発生していない
と判断されれば、処理はステップS14に移行する。ス
テップS14では、DC成分のDCTブロックの位置に
VLCテーブルのミスマッチが発生しているかどうかが
判断される。若し、DC成分のDCTブロックの位置に
VLCテーブルのミスマッチが発生していると判断され
れば、処理はステップS15に移行する。ステップS1
5では、VLCテーブルのミスマッチが発生した位置の
DCTブロックおよびそれ以降のDC成分のDCT係数
を灰色表示を行うDCT係数と置き換える。さらに、E
OBが付加され、そのマクロブロックが打ち切られる。
そして、処理はステップS13に移行する。On the other hand, if it is determined in step S11 that no VLC table mismatch has occurred in the header portion before the block, the process proceeds to step S14. In step S14, it is determined whether or not a VLC table mismatch has occurred at the position of the DCT block of the DC component. If it is determined that a mismatch of the VLC table has occurred at the position of the DCT block of the DC component, the process proceeds to step S15. Step S1
In step 5, the DCT block at the position where the mismatch has occurred in the VLC table and the DCT coefficients of the DC components thereafter are replaced with DCT coefficients for displaying gray. Furthermore, E
OB is added and the macroblock is aborted.
Then, the process proceeds to step S13.
【0201】また、ステップS14でDC成分のDCT
係数の位置にVLCテーブルのミスマッチが発生してい
ないと判断されれば、処理はステップS16に移行す
る。ステップS16では、AC成分のDCT係数の位置
にVLCテーブルのミスマッチが発生しているかどうか
が判断される。若し、AC成分のDCT係数の位置にV
LCテーブルのミスマッチが発生していると判断されれ
ば、処理はステップS17に移行する。ステップS17
では、VLCテーブルのミスマッチが発生した位置のD
CT係数およびそのDCT係数以降のDCTブロックを
EOBと置き換える。そして、処理はステップS13に
移行する。In step S14, the DCT of the DC component
If it is determined that no mismatch in the VLC table has occurred at the coefficient position, the process proceeds to step S16. In step S16, it is determined whether or not a VLC table mismatch has occurred at the position of the DCT coefficient of the AC component. V at the position of the DCT coefficient of the AC component
If it is determined that a mismatch has occurred in the LC table, the process proceeds to step S17. Step S17
Then, D at the position where the mismatch occurs in the VLC table
The CT coefficient and the DCT block following the DCT coefficient are replaced with EOB. Then, the process proceeds to step S13.
【0202】一方、ステップS16で、AC成分のDC
Tブロックの位置にVLCテーブルのミスマッチが発生
していないと判断されれば、処理はステップS13に移
行する。On the other hand, in step S16, the DC of the AC component
If it is determined that no VLC table mismatch has occurred at the position of the T block, the process proceeds to step S13.
【0203】ステップS13では、DCT係数の並び替
えが行われる。例えば、再生側MFC114では、スト
リームが変換ストリームからMPEG ESに並び替え
られる。同様に、記録側MFC106では、ストリーム
がMPEG ESから変換ストリームへと並び替えられ
る。そして、ステップS18で、当該フレームの最終マ
クロブロックまでの処理が終了したかどうかが判断され
る。最終マクロブロックまでの処理が終了したと判断さ
れれば、一連のフローチャートが終了される。一方、最
終マクロブロックまでの処理が終了していないと判断さ
れれば、処理はステップS10に戻され、次のマクロブ
ロックについて同様の処理がなされる。At step S13, the rearrangement of the DCT coefficients is performed. For example, in the reproduction side MFC 114, the stream is rearranged from the converted stream to the MPEG ES. Similarly, in the recording side MFC 106, the stream is rearranged from the MPEG ES to the converted stream. Then, in step S18, it is determined whether the processing up to the last macroblock of the frame has been completed. If it is determined that the processing up to the last macro block has been completed, a series of flowcharts is completed. On the other hand, if it is determined that the processing up to the last macroblock has not been completed, the processing returns to step S10, and the same processing is performed for the next macroblock.
【0204】上述した処理は、記録側MFC106およ
び再生側MFC114においてそれぞれ行われる。記録
側MFC106および再生側MFC114は、同様な構
成で実現可能なので、以下、再生側MFC114を中心
に説明する。図50は、再生側MFC114の一例の構
成を示す。なお、記録側MFC106と再生側MFC1
14とは、構成を共有することができる。The above-described processing is performed in the recording MFC 106 and the reproducing MFC 114, respectively. Since the recording side MFC 106 and the reproduction side MFC 114 can be realized with the same configuration, the following description will be made focusing on the reproduction side MFC 114. FIG. 50 shows a configuration example of the reproduction-side MFC 114. The recording MFC 106 and the reproduction MFC 1
14, the configuration can be shared.
【0205】再生時には、ECCデコーダ113から出
力された変換ストリームが再生側MFC114に入力さ
れ、遅延回路300および検出回路301に供給され
る。At the time of reproduction, the converted stream output from the ECC decoder 113 is input to the reproduction side MFC 114 and supplied to the delay circuit 300 and the detection circuit 301.
【0206】図50において、CPU_IF310は、
この再生側MFC114とシスコン121との間の通信
を制御するインターフェイスである。シスコン121か
ら出力された各種の命令やデータは、このCPU_IF
310を介して再生側MFC114の各部に供給され
る。Referring to FIG. 50, CPU_IF 310
An interface for controlling communication between the reproduction side MFC 114 and the system controller 121. Various commands and data output from the system controller 121 are stored in the CPU_IF
The signal is supplied to each section of the reproduction-side MFC 114 via 310.
【0207】検出回路301は、供給された変換ストリ
ームからスライススタートコード12を検出する。スラ
イススタートコード12は、バイト単位で区切られた4
バイト(32ビット)からなり、最後の1バイトに当該
スライスの垂直方向の位置情報が示され、〔00 00
01 01〕〜〔00 00 01 AF〕の範囲の
値をとる。したがって、検出回路301では、例えばバ
イト毎のパターンマッチングを行うことで、スライスス
タートコード12を検出することができる。上述したよ
うに、この一実施形態では、1スライスが1マクロブロ
ックとされているため、スライススタートコード12を
検出することで、マクロブロックの先頭が検出されるこ
とになる。The detection circuit 301 detects the slice start code 12 from the supplied conversion stream. The slice start code 12 is composed of four bytes separated by bytes.
It consists of bytes (32 bits), and the last one byte indicates the vertical position information of the slice, and [00 00
01 01] to [00 00 01 AF]. Therefore, the detection circuit 301 can detect the slice start code 12 by performing pattern matching for each byte, for example. As described above, in this embodiment, since one slice is one macroblock, the start of the macroblock is detected by detecting the slice start code 12.
【0208】検出回路301の検出結果は、信号sli
ce_start_code_detとして出力され、
タイミングジェネレータ302に供給される。タイミン
グジェネレータ302は、信号slice_start
_code_detによってリセットされ、マクロブロ
ック毎に繰り返される信号である、信号vld_tim
ingsおよび信号vlc_timingsを出力す
る。これら信号vld_timingsおよび信号vl
c_timingsは、マクロブロックを構成する輝度
信号Y1、Y2、Y3およびY4、ならびに、色差信号
Cb1、Cr1、Cb2およびCr2のそれぞれによる
ブロックの種類や、これら各ブロックのDCT係数にお
けるDC成分およびAC成分、さらには、各ヘッダの種
類を表すコントロール信号である。The detection result of the detection circuit 301 is the signal sli
output as ce_start_code_det,
It is supplied to the timing generator 302. The timing generator 302 outputs the signal slice_start
Signal vld_tim, which is a signal that is reset by _code_det and is repeated for each macroblock
ings and the signal vlc_timings. These signals vld_timings and signal vl
c_timings is the type of block by each of the luminance signals Y 1 , Y 2 , Y 3 and Y 4 and the color difference signals Cb 1 , Cr 1 , Cb 2 and Cr 2 constituting the macroblock, and the DCT of each of these blocks It is a control signal indicating the DC component and the AC component in the coefficient, and the type of each header.
【0209】信号vld_timingsは、VLD3
03およびとミスマッチタイミングジェネレータ304
にそれぞれ供給される。また、vlc_timings
は、後述するVLC308に供給される。[0209] The signal vld_timing is output from the VLD3
03 and the mismatch timing generator 304
Respectively. Also, vlc_timings
Is supplied to a VLC 308 described later.
【0210】なお、再生側MFC114においては変換
ストリームのデータ並びを示す信号vld_timin
gsがタイミングジェネレータ302から出力され、記
録側MFC106においてはMPEGストリームのデー
タ並びを示す信号vld_timingsがタイミング
ジェネレータ302から出力される。[0210] In the reproduction side MFC 114, a signal vld_timin indicating the data arrangement of the converted stream is provided.
gs is output from the timing generator 302, and a signal vld_timings indicating the data arrangement of the MPEG stream is output from the timing generator 302 in the recording-side MFC 106.
【0211】一方、遅延回路300に供給された変換ス
トリームは、上述した検出回路301などによる検出デ
ィレイを吸収するために所定の遅延を与えられ、位相調
整されて出力される。遅延回路300から出力された変
換ストリームは、可変長符号を復号化する可変長符号復
号器(VLD)303に供給される。On the other hand, the converted stream supplied to the delay circuit 300 is given a predetermined delay in order to absorb the detection delay by the detection circuit 301 and the like, and is output after being phase-adjusted. The converted stream output from the delay circuit 300 is supplied to a variable length code decoder (VLD) 303 that decodes a variable length code.
【0212】シスコン121から再生側MFC114に
対して、可変長符号の復号モードを指示する信号vld
_settingsが供給される。信号vld_set
tingsは、CPU_IF310を介してVLD30
3に供給される。VLD303では、信号vld_se
ttingsnにより指示されるモードに従い、入力さ
れたストリームを解釈する。すなわち、記録側MFC1
06では、MPEGストリームのデータ並びを示す信号
vld_timingsに従い復号化がなされ、再生側
MFC114では、変換ストリームのデータ並びを示す
信号vld_timingsに従い復号化がなされる。A signal vld instructing the decoding mode of the variable length code from the system controller 121 to the reproduction side MFC 114.
_Settings is supplied. Signal vld_set
tings is the VLD 30 via the CPU_IF 310.
3 is supplied. In the VLD 303, the signal vld_se
The input stream is interpreted in accordance with the mode indicated by tentingsn. That is, the recording side MFC1
In 06, decoding is performed in accordance with a signal vld_timings indicating the data arrangement of the MPEG stream, and in the reproduction side MFC 114, decoding is performed in accordance with the signal vld_timings indicating the data arrangement of the converted stream.
【0213】VLD303は、入力されたストリームの
可変長符号を解くために参照されるVLCテーブルを有
する。例えば、上述した信号vld_timingsお
よび信号vld_settingsに基づき、VLCテ
ーブルを所定に選択し、選択されたVLCテーブルを用
いて、入力されたストリームの可変長符号を解く。[0213] The VLD 303 has a VLC table that is referred to for solving the variable length code of the input stream. For example, based on the signals vld_timings and vld_settings described above, a VLC table is selected in a predetermined manner, and the variable-length code of the input stream is solved using the selected VLC table.
【0214】このときに、入力されたストリームについ
て、VLCテーブルのミスマッチが発生していないかど
うか検出される。検出の結果、VLD303において、
VLCミスマッチが発生したことを示すミスマッチ信号
がVLCミスマッチが発生した位置に応じて、以下に記
すように発生される。At this time, it is detected whether or not a mismatch of the VLC table has occurred in the input stream. As a result of the detection, in the VLD 303,
A mismatch signal indicating that a VLC mismatch has occurred is generated as described below according to the position where the VLC mismatch has occurred.
【0215】(1)dct_coefficients
のVLCテーブルにミスマッチが発生した場合には、信
号dct_coefficients_mismatc
hが発生される。(1) dct_coefficients
When a mismatch occurs in the VLC table of the signal dct_coefficients_mismatc
h is generated.
【0216】(2)dct_dc_size_lumi
nanceのVLCテーブルにミスマッチが発生した場
合には、信号dct_dc_luminance_mi
smatchが発生される。(2) dct_dc_size_lumi
If a mismatch occurs in the VLC table of the nonce, the signal dct_dc_luminance_mi
Smatch is generated.
【0217】(3)dct_dc_chrominan
ceのVLCテーブルにミスマッチが発生した場合に
は、信号dct_dc_chrominance_mi
smatchが発生される。(3) dct_dc_chrominan
If a mismatch occurs in the VLC table of ce, the signal dct_dc_chrominance_mi
Smatch is generated.
【0218】(4)macroblock_typeの
VLCテーブルにミスマッチが発生した場合には、信号
macroblock_type_mismatchが
発生される。(4) When a mismatch occurs in the VLC table of macroblock_type, a signal macroblock_type_mismatch is generated.
【0219】(5)macroblock_addre
ss_incrementのVLCテーブルにミスマッ
チが発生した場合には、信号macroblock_a
ddress_increment_mismatch
が発生される。(5) macroblock_addre
If a mismatch occurs in the VLC table of ss_increment, the signal macroblock_a
address_increment_mismatch
Is generated.
【0220】VLD303で発生されたこれらの信号
は、ミスマッチタイミングジェネレータ304に供給さ
れる。ミスマッチタイミングジェネレータ304では、
VLD303から供給されたこれらのミスマッチ信号
と、タイミングジェネレータ302から供給された信号
vld_timingsとに基づき、ストリーム修正を
行うタイミングを示すタイミング信号である、信号mi
smatch_timingsが発生される。信号mi
smatch_timingsは、セレクタ306に選
択制御信号として供給される。[0220] These signals generated by VLD 303 are supplied to mismatch timing generator 304. In the mismatch timing generator 304,
A signal mi, which is a timing signal indicating a timing for performing stream correction based on these mismatch signals supplied from the VLD 303 and the signal vld_timings supplied from the timing generator 302.
smart_timings is generated. Signal mi
smart_timing is supplied to the selector 306 as a selection control signal.
【0221】なお、VLD303では、VLCテーブル
のミスマッチが検出されたときには、直ちに可変長符号
の復号化処理が止められる。復号化処理は、検出回路3
01で次のスライススタートコードが検出され、タイミ
ングジェネレータ302がリセットされることにより、
再開される。VLD303において、VLCテーブルの
ミスマッチが検出され可変長符号の復号化処理が止めら
れてから、検出回路301で次のスライススタートコー
ドが検出されるまで、入力されたストリームが破棄され
る。[0221] In the VLD 303, when a mismatch of the VLC table is detected, the decoding process of the variable length code is immediately stopped. The decoding process is performed by the detection circuit 3
01, the next slice start code is detected and the timing generator 302 is reset,
Will be resumed. The input stream is discarded until the detection circuit 301 detects the next slice start code after the VLD 303 detects a mismatch in the VLC table and stops decoding of the variable length code.
【0222】VLD303で変換ストリームの可変長符
号が復号化されたストリームは、VLD303から出力
され、セレクタ306の第1の選択入力端に入力される
と共に、Cb/Cr遡り用遅延回路312に供給され
る。Cb/Cr遡り用遅延回路312の出力は、セレク
タ306の第2の選択入力端に入力される。セレクタ3
06の第3の選択入力端には、置換用データ発生回路3
05(後述する)から出力された、置換用のデータが供
給される。セレクタ306は、上述の信号mismat
ch_timingsに基づき第1、第2および第3の
選択入力端が選択され、入力信号が切り替えられる。The stream obtained by decoding the variable length code of the converted stream by the VLD 303 is output from the VLD 303, input to the first selection input terminal of the selector 306, and supplied to the Cb / Cr tracing delay circuit 312. You. The output of the Cb / Cr tracing delay circuit 312 is input to the second selection input terminal of the selector 306. Selector 3
06 is connected to a third selection input terminal.
05 (described later) is supplied. The selector 306 outputs the signal mismat described above.
The first, second, and third selection input terminals are selected based on ch_timings, and input signals are switched.
【0223】置換用データ発生回路305では、欠損し
たDCTブロックと置き換えるためのデータが予め用意
される。置換用データ発生回路305には、スライスヘ
ッダおよびマクロブロックヘッダといったヘッダデータ
が予め用意される。また、置換用データ発生回路305
には、輝度ブロックY1〜Y4、色差ブロックCb1、C
r1、Cb2およびCr2それぞれの例えば灰色表示を表
すDC成分のDCTブロックのデータが予め用意され
る。さらに、置換用データ発生回路305には、EOB
のデータが予め用意される。これらの予め用意されたデ
ータは、例えば置換用データ発生回路305が有するメ
モリに記憶される。In replacement data generating circuit 305, data for replacing a missing DCT block is prepared in advance. Header data such as a slice header and a macro block header is prepared in advance in the replacement data generation circuit 305. Also, the replacement data generation circuit 305
Include luminance blocks Y 1 to Y 4 and color difference blocks Cb 1 and Cb 1 .
Data of DCT blocks of DC components representing, for example, gray display of each of r 1 , Cb 2 and Cr 2 is prepared in advance. Further, the replacement data generation circuit 305 has EOB
Are prepared in advance. These prepared data are stored in a memory included in the replacement data generation circuit 305, for example.
【0224】置換用データ発生回路305では、シスコ
ン121による指示に基づきCPU_IF310を介し
て供給される信号mismatch_replaceに
従い、上述した、予め用意され記憶されたデータを適切
に選択し、セレクタ306に供給する。The replacement data generation circuit 305 appropriately selects the previously prepared and stored data according to the signal mismatch_replace supplied via the CPU_IF 310 based on the instruction from the system controller 121 and supplies the data to the selector 306.
【0225】信号mismatch_timings
が”H”状態のとき、セレクタ306において第3の選
択入力端が選択され、VLD303から出力されたスト
リームが、置換用データ発生回路305から信号mis
match_replaceに基づき選択され供給され
た上述の置換用データと置き換えられる。Signal mismatch_timings
Is in the “H” state, the third selection input terminal is selected by the selector 306, and the stream output from the VLD 303 is supplied from the replacement data generation circuit 305 to the signal mis.
The data is replaced with the above-described replacement data selected and supplied based on the match_replace.
【0226】なお、色差ブロックCr1やCr2にミスマ
ッチが存在する場合には、上述したように、対になる色
差ブロックCb1やCb2まで遡ってストリーム修正処理
を行う。このときには、セレクタ306において第2お
よび第3の選択入力端が選択され、Cb/Cr遡り用遅
延回路312でVLD303からの出力が遅延されたデ
ータを用いてストリーム修正処理が行われる。When there is a mismatch in the color difference blocks Cr 1 and Cr 2 , as described above, the stream correction processing is performed by going back to the pair of color difference blocks Cb 1 and Cb 2 . At this time, the second and third selection input terminals are selected by the selector 306, and the stream correction processing is performed using the data whose output from the VLD 303 has been delayed by the Cb / Cr tracing delay circuit 312.
【0227】セレクタ306から出力されたストリーム
は、一旦メモリ307およびメモリ313に書き込まれ
る。メモリ307に書き込まれたストリームは、可変長
符号化器(VLC)308にアドレス制御されること
で、データの並びがMPEGストリームの並びに変換さ
れて読み出される。VLC308によるメモリ307の
読み出しアドレスの制御は、シスコン121からCPU
_IF310を介してVLC308に供給された信号v
lc_settingsと、タイミングジェネレータ3
02から供給されたタイミング信号vlc_timin
gsとに基づきなされるThe stream output from selector 306 is temporarily written to memory 307 and memory 313. The stream written in the memory 307 is subjected to address control by a variable length encoder (VLC) 308, so that the data arrangement is converted into an MPEG stream and read. The read address of the memory 307 by the VLC 308 is controlled by the system controller 121 from the CPU.
Signal v supplied to the VLC 308 via the _IF 310
lc_settings and timing generator 3
02 supplied from the timing signal vlc_timin
gs
【0228】メモリ313は、スライスヘッダおよびマ
クロブロックヘッダを遅延させるためのメモリである。
これらのヘッダにVLCテーブルのミスマッチが存在す
る場合には、上述した第3の方法に示されるように、置
換用データ発生回路305において、ヘッダの先頭か
ら、予め用意された規定値によって置き換えがなされ
る。メモリ313により、この処理のための遅延が与え
られる。The memory 313 is a memory for delaying the slice header and the macro block header.
If there is a mismatch in the VLC table in these headers, the replacement data generation circuit 305 replaces the headers from the beginning of the headers with a prescribed value prepared in advance, as described in the third method. You. Memory 313 provides a delay for this processing.
【0229】並びを所定に変換されてメモリ307から
読み出されたデータは、VLC308に供給される。ま
た、スライスヘッダやマクロブロックヘッダにVLCテ
ーブルのミスマッチが存在する場合には、置き換えられ
たヘッダデータがメモリ313で遅延され、VLC30
8に供給される。VLC308に供給されたこれらのデ
ータは、可変長符号化されると共に、8ビットまたは1
6ビットなどにビット整列され、MPEG ESとされ
て出力される。The data whose arrangement has been converted to a predetermined value and which has been read from the memory 307 is supplied to the VLC 308. If there is a mismatch in the VLC table in the slice header or macroblock header, the replaced header data is delayed in the memory 313, and the VLC 30
8 is supplied. These data supplied to the VLC 308 are variable-length coded and 8 bits or 1 bit.
The data is bit-aligned into 6 bits and output as MPEG ES.
【0230】記録側MFC106においては、VLD3
03に対して、MPEG ESのデータ並びのタイムス
ロットを示す信号vld_timingsが供給され
る。VLD303に供給されたMPEG ESは、この
vld_timingsに基づき可変長符号が復号化さ
れる。また、VLC308に対して、変換ストリームの
データ並びのタイムスロットを示す信号vlc_tim
ingsが供給される。VLC308に供給されたスト
リームは、この信号vlc_timingsに基づきデ
ータ並びを変換され、変換ストリームとされ、出力され
る。In the recording side MFC 106, VLD3
03 is supplied with a signal vld_timings indicating a time slot of an MPEG ES data sequence. The MPEG ES supplied to the VLD 303 has a variable-length code decoded based on the vld_timings. In addition, for the VLC 308, a signal vlc_tim indicating a time slot of the data sequence of the conversion stream.
ings is supplied. The stream supplied to the VLC 308 is converted in data sequence based on the signal vlc_timings, converted into a converted stream, and output.
【0231】[0231]
【発明の効果】以上説明したように、この発明では、可
変長符号の復号化の際に、入力ストリームのVLCテー
ブルに対するミスマッチが検出され、VLCテーブルの
ミスマッチが発生した位置に対応してストリームの修正
が行われる。そのため、VLCテーブルに存在しないよ
うなイレギュラーなストリームが発生してもストリーム
を修正することができ、MPEGのシンタクスエラーを
回避することができるという効果がある。As described above, according to the present invention, when decoding a variable-length code, a mismatch of an input stream with respect to a VLC table is detected, and a stream of a stream corresponding to a position where a mismatch occurs in a VLC table is detected. Modifications are made. Therefore, even if an irregular stream that does not exist in the VLC table occurs, the stream can be corrected, and there is an effect that an MPEG syntax error can be avoided.
【0232】例えば、ストリームの瞬断などが発生し、
入力ストリームがMPEGのシンタクスに存在しないV
LCコードに変化してしまっても、MPEGのシンタク
スエラーを回避することができ、このストリームを受け
取ったデコーダがハングアップするような事態を回避で
きる。そのため、この発明を例えば放送業務用のVTR
などに適用することで、安定的なシステムを実現するこ
とができるという効果がある。For example, instantaneous interruption of the stream occurs,
V whose input stream does not exist in the MPEG syntax
Even if the code is changed to an LC code, it is possible to avoid a syntax error of MPEG, and to avoid a situation where a decoder receiving this stream hangs up. Therefore, the present invention is applied to, for example, a VTR for broadcasting
By applying the present invention to a system, there is an effect that a stable system can be realized.
【図1】MPEG2のデータの階層構造を概略的に示す
略線図である。FIG. 1 is a schematic diagram schematically showing a hierarchical structure of MPEG2 data.
【図2】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 2 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図3】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 3 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図4】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 4 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図5】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 5 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図6】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 6 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図7】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 7 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図8】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 8 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図9】MPEG2のストリーム中に配されるデータの
内容とビット割り当てを示す略線図である。FIG. 9 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図10】MPEG2のストリーム中に配されるデータ
の内容とビット割り当てを示す略線図である。FIG. 10 is a schematic diagram illustrating the contents and bit allocation of data arranged in an MPEG2 stream.
【図11】MPEG2のストリーム中に配されるデータ
の内容とビット割り当てを示す略線図である。FIG. 11 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図12】MPEG2のストリーム中に配されるデータ
の内容とビット割り当てを示す略線図である。FIG. 12 is a schematic diagram showing the contents and bit allocation of data arranged in an MPEG2 stream.
【図13】データのバイト単位の整列を説明するための
図である。FIG. 13 is a diagram illustrating alignment of data in byte units.
【図14】一実施形態におけるMPEGストリームのヘ
ッダを具体的に示す略線図である。FIG. 14 is a schematic diagram specifically illustrating an MPEG stream header according to an embodiment.
【図15】一実施形態による記録再生装置の構成の一例
を示すブロック図である。FIG. 15 is a block diagram illustrating an example of a configuration of a recording / reproducing device according to an embodiment.
【図16】磁気テープ上に形成されるトラックフォーマ
ットの一例を示す略線図である。FIG. 16 is a schematic diagram illustrating an example of a track format formed on a magnetic tape.
【図17】クロマフォーマットを説明するための略線図
である。FIG. 17 is a schematic diagram for explaining a chroma format.
【図18】クロマフォーマットを説明するための略線図
である。FIG. 18 is a schematic diagram illustrating a chroma format.
【図19】クロマフォーマットを説明するための略線図
である。FIG. 19 is a schematic diagram illustrating a chroma format.
【図20】ビデオエンコーダの出力の方法と可変長符号
化を説明するための略線図である。FIG. 20 is a schematic diagram for explaining an output method of a video encoder and variable-length encoding.
【図21】ビデオエンコーダの出力の順序の並び替えを
説明するための略線図である。FIG. 21 is a schematic diagram for explaining rearrangement of an output order of a video encoder.
【図22】順序の並び替えられたデータをシンクブロッ
クにパッキングする処理を説明するための略線図であ
る。FIG. 22 is a schematic diagram for explaining a process of packing data in a rearranged order into a sync block.
【図23】係数並び替えおよびパッキングによる効果に
ついて説明するための略線図である。FIG. 23 is a schematic diagram for describing effects of coefficient rearrangement and packing.
【図24】係数並び替えおよびパッキングによる効果に
ついて説明するための略線図である。FIG. 24 is a schematic diagram for describing effects of coefficient rearrangement and packing.
【図25】ECCエンコーダのより具体的な構成を示す
ブロック図である。FIG. 25 is a block diagram showing a more specific configuration of the ECC encoder.
【図26】メインメモリのアドレス構成の一例を示す略
線図である。FIG. 26 is a schematic diagram illustrating an example of an address configuration of a main memory.
【図27】macroblock_address_i
ncrementのためのVLCテーブルを示す略線図
である。FIG. 27: macroblock_address_i
FIG. 14 is a schematic diagram illustrating a VLC table for ncrement.
【図28】Iピクチャのmacroblock_typ
eのためのVLCテーブルを示す略線図である。FIG. 28 is macroblock_type of an I picture.
FIG. 14 is a schematic diagram illustrating a VLC table for e.
【図29】Pピクチャのmacroblock_typ
eのためのVLCテーブルを示す略線図である。FIG. 29 is macroblock_type of a P picture
FIG. 14 is a schematic diagram illustrating a VLC table for e.
【図30】dct_dc_size_luminanc
eのためのVLCテーブルをしめす略線図である。FIG. 30: dct_dc_size_luminanc
FIG. 14 is a schematic diagram illustrating a VLC table for e.
【図31】dct_dc_size_chromina
nceのためのVLCテーブルを示す略線図である。FIG. 31: dct_dc_size_chromina
FIG. 14 is a schematic diagram illustrating a VLC table for the nce.
【図32】DCT coefficients Tab
le 0のためのVLCテーブルを示す略線図である。FIG. 32: DCT coefficients Tab
FIG. 7 is a schematic diagram illustrating a VLC table for le 0.
【図33】DCT coefficients Tab
le 0のためのVLCテーブルを示す略線図である。FIG. 33: DCT coefficients Tab
FIG. 7 is a schematic diagram illustrating a VLC table for le 0.
【図34】DCT coefficients Tab
le 0のためのVLCテーブルを示す略線図である。FIG. 34: DCT coefficients Tab
FIG. 7 is a schematic diagram illustrating a VLC table for le 0.
【図35】DCT coefficients Tab
le 0のためのVLCテーブルを示す略線図である。FIG. 35: DCT coefficients Tab
FIG. 7 is a schematic diagram illustrating a VLC table for le 0.
【図36】DCT coefficients Tab
le 1のためのVLCテーブルを示す略線図である。FIG. 36: DCT coefficients Tab
FIG. 4 is a schematic diagram illustrating a VLC table for le 1;
【図37】DCT coefficients Tab
le 1のためのVLCテーブルを示す略線図である。FIG. 37. DCT coefficients Tab
FIG. 4 is a schematic diagram illustrating a VLC table for le 1;
【図38】DCT coefficients Tab
le 1のためのVLCテーブルを示す略線図である。FIG. 38: DCT coefficients Tab
FIG. 4 is a schematic diagram illustrating a VLC table for le 1;
【図39】DCT coefficients Tab
le 1のためのVLCテーブルを示す略線図である。FIG. 39. DCT coefficients Tab
FIG. 4 is a schematic diagram illustrating a VLC table for le 1;
【図40】固定長符号のテーブルを示す略線図である。FIG. 40 is a schematic diagram showing a table of fixed-length codes.
【図41】固定長符号のテーブルを示す略線図である。FIG. 41 is a schematic diagram illustrating a table of fixed-length codes.
【図42】VLCテーブルに存在しないVLCに遭遇
し、VLCテーブルのミスマッチが発生した場合につい
て説明するための略線図である。FIG. 42 is a schematic diagram for explaining a case where a VLC that does not exist in the VLC table is encountered and a VLC table mismatch occurs.
【図43】変換ストリームの場合の、dct_coef
ficientsのVLCテーブルに関してミスマッチ
が発生した例を示す略線図である。FIG. 43: dct_coef in case of a conversion stream
FIG. 14 is a schematic diagram illustrating an example in which a mismatch has occurred with respect to the VLC table of the employees.
【図44】変換ストリームの場合の、dct_dc_s
ize_luminanceおよびdct_dc_si
ze_chrominanceのVLCテーブルに関し
てミスマッチが発生した例を示す略線図である。FIG. 44: dct_dc_s in case of a conversion stream
size_luminance and dct_dc_si
FIG. 14 is a schematic diagram illustrating an example in which a mismatch has occurred in a VLC table of ze_chrominance.
【図45】変換ストリームの場合の、スライスヘッダお
よびマクロブロックヘッダにVLCミスマッチが存在す
る場合の例を示す略線図である。FIG. 45 is a schematic diagram illustrating an example where a VLC mismatch exists in a slice header and a macroblock header in the case of a converted stream.
【図46】MPEG ESの場合のdct_coeff
icientsのVLCテーブルに関してミスマッチが
発生した例を示す略線図である。FIG. 46: dct_coeff in the case of MPEG ES
FIG. 11 is a schematic diagram illustrating an example in which a mismatch has occurred with respect to a VLC table of the clients.
【図47】MPEG ESの場合のdct_dc_si
ze_chrominanceのVLCテーブルに関し
てミスマッチが発生した例を示す略線図である。FIG. 47: dct_dc_si in the case of MPEG ES
FIG. 14 is a schematic diagram illustrating an example in which a mismatch has occurred in a VLC table of ze_chrominance.
【図48】MPEG ESの場合のスライスヘッダおよ
びマクロブロックヘッダにVLCミスマッチが存在する
場合の例を示す略線図である。FIG. 48 is a schematic diagram showing an example of a case where a VLC mismatch exists in a slice header and a macroblock header in the case of MPEG ES.
【図49】一実施形態によるストリーム修正処理を示す
一例のフローチャートである。FIG. 49 is a flowchart illustrating an example of a stream correction process according to an embodiment;
【図50】再生側MFC114の一例の構成を示すブロ
ック図である。FIG. 50 is a block diagram showing a configuration example of a reproduction-side MFC 114.
【図51】VLCがエラーの発生により次のヘッダが検
出されるまで信頼できなくなることを説明するための略
線図である。FIG. 51 is a schematic diagram for explaining that the VLC becomes unreliable until the next header is detected due to the occurrence of an error.
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・・・磁気テープ、1
13・・・ECCデコーダ、114・・・再生側MF
C、115・・・SDTI出力部、116・・・MPE
Gデコーダ、118・・・SDI出力部、137a,1
37c・・・パッキング部、137b・・・ビデオシャ
フリング部、139・・・外符号エンコーダ、140・
・・ビデオシャフリング、149・・・内符号エンコー
ダ、170・・・フレームメモリ、301・・・検出回
路、302・・・タイミングジェネレータ、303・・
・VLD、304・・・ミスマッチタイミングジェネレ
ータ、305・・・置換用データ発生回路、306・・
・セレクタ、307・・・メモリ、308・・・VLC1 ... 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 ... Macro block header,
101: SDI receiver, 102: MPEG encoder, 106: Multi-format converter (MFC) on recording side, 108: SDTI receiver, 109
... ECC encoder, 112 ... Magnetic tape, 1
13: ECC decoder, 114: reproduction side MF
C, 115: SDTI output unit, 116: MPE
G decoder, 118... SDI output unit, 137a, 1
37c: packing unit, 137b: video shuffling unit, 139: outer code encoder, 140
..Video shuffling, 149 ... inner code encoder, 170 ... frame memory, 301 ... detection circuit, 302 ... timing generator, 303 ...
VLD, 304: mismatch timing generator, 305: replacement data generation circuit, 306
・ Selector, 307 ・ ・ ・ Memory, 308 ・ ・ ・ VLC
───────────────────────────────────────────────────── フロントページの続き (72)発明者 藤堂 晋 東京都品川区北品川6丁目7番35号 ソニ ー株式会社内 (72)発明者 松本 英之 東京都品川区北品川6丁目7番35号 ソニ ー株式会社内 Fターム(参考) 5C059 KK00 MA00 MA04 MA05 MA14 MA23 MC14 MC24 MC32 MC34 ME03 ME06 PP05 PP06 PP07 PP16 RB03 RB09 RB10 RB12 RC02 RC09 RF01 RF07 RF09 RF21 SS11 UA05 UA31 5J064 AA01 BA09 BA16 BB08 BC01 BC02 BC11 BD03 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Susumu Todo 6-35, Kita-Shinagawa, Shinagawa-ku, Tokyo Inside Sony Corporation (72) Inventor Hideyuki Matsumoto 6-35, Kita-Shinagawa, Shinagawa-ku, Tokyo Sony Corporation F-term (reference)
Claims (9)
るデータ処理装置において、 可変長符号化されたストリームの可変長符号から、該可
変長符号を表すパラメータに対応していない符号を検出
する検出手段と、 上記検出手段による検出結果の内容に応じて、上記スト
リームを修正する修正手段と、 上記検出手段による検出後に、次の処理開始を指示する
指示手段とを有することを特徴とするデータ処理装置。1. A data processing apparatus for processing a variable-length coded stream, comprising: detecting a code that does not correspond to a parameter representing the variable-length code from a variable-length code of the variable-length coded stream. Means for correcting the stream in accordance with the content of the detection result by the detection means; and instruction means for instructing the start of the next processing after the detection by the detection means. apparatus.
て、 上記ストリームは、所定ブロック単位で上記可変長符号
化され、上記修正手段は、上記検出手段により上記ブロ
ックの位置を表す符号が上記パラメータに対応していな
いことが検出された場合には、該ブロックの前のブロッ
クの上記位置を表す符号を用いて上記修正を行うように
したことを特徴とするデータ処理装置。2. The data processing device according to claim 1, wherein the stream is subjected to the variable-length coding in units of a predetermined block, and the correction unit sets the code indicating the position of the block by the detection unit to the parameter. If it is detected that the block does not correspond to the above, the correction is performed using a code representing the position of the block before the block.
て、 上記ストリームは、所定ブロック単位で上記可変長符号
化され、上記修正手段は、上記検出手段により上記ブロ
ックの符号化タイプを表す符号が上記パラメータに対応
していないことが検出された場合には、当該ブロックが
それ自身で完結することを示すパラメータを用いて上記
修正を行うようにしたことを特徴とするデータ処理装
置。3. The data processing apparatus according to claim 1, wherein the stream is subjected to the variable-length coding in units of a predetermined block, and the correction unit uses a code representing the coding type of the block by the detection unit. A data processing apparatus, wherein when it is detected that the block does not correspond to the parameter, the correction is performed using a parameter indicating that the block is completed by itself.
て、 上記ストリームは、所定ブロック単位で上記可変長符号
化され、上記修正手段は、上記検出手段により輝度成分
の符号長を示す符号が上記パラメータに対応していない
ことが検出された場合には、輝度の所定値の直流成分を
示す符号で上記パラメータに対応していない上記符号の
置き換えを行うことを特徴とするデータ処理装置。4. The data processing device according to claim 1, wherein the stream is subjected to the variable-length coding in a predetermined block unit, and the correction unit sets a code indicating a code length of a luminance component by the detection unit. A data processing apparatus characterized in that, when it is detected that the parameter does not correspond to a parameter, the code that does not correspond to the parameter is replaced with a code indicating a DC component of a predetermined value of luminance.
て、 上記ストリームは、所定ブロック単位で上記可変長符号
化され、上記修正手段は、上記検出手段により色差成分
の符号長を示す符号が上記パラメータに対応していない
ことが検出された場合には、色差の所定値の直流成分を
示す符号で上記パラメータに対応していない上記符号の
置き換えを行うことを特徴とするデータ処理装置。5. The data processing apparatus according to claim 1, wherein the stream is subjected to the variable-length coding in a predetermined block unit, and the correction unit sets a code indicating a code length of a color difference component by the detection unit. A data processing device, wherein when it is detected that the parameter does not correspond to a parameter, the code that does not correspond to the parameter is replaced with a code indicating a DC component of a predetermined value of color difference.
て、 上記修正手段は、1対の色差成分のうち時間的に後に伝
送される色差成分について、該色差成分の符号長を示す
符号が上記パラメータに対応していないことが検出され
たら、該色差成分と対になる色差成分に遡って上記置き
換えを行うようにしたことを特徴とするデータ処理装
置。6. The data processing device according to claim 5, wherein the correction unit is configured to change a code indicating a code length of the color difference component of a pair of color difference components transmitted later in time among the pair of color difference components. A data processing device for performing the above-mentioned replacement by going back to a color difference component paired with the color difference component when it is detected that the color difference component does not correspond to the parameter.
て、 上記ストリームは、所定ブロック単位で上記可変長符号
化され、上記修正手段は、上記検出手段により上記ブロ
ック中の量子化係数を示す符号が上記パラメータに対応
していないことが検出されたら、上記ブロックの終端を
示す符号で上記パラメータに対応していない上記符号の
置き換えを行うことを特徴とするデータ処理装置。7. The data processing apparatus according to claim 1, wherein the stream is subjected to the variable-length coding in units of a predetermined block, and the correction unit uses a code indicating a quantization coefficient in the block by the detection unit. A data processing device that, when it is detected that does not correspond to the parameter, replaces the code that does not correspond to the parameter with a code indicating the end of the block.
て、 上記ストリームはMPEGの規定に基づくストリームで
あることを特徴とするデータ処理装置。8. The data processing apparatus according to claim 1, wherein the stream is a stream based on MPEG.
るデータ処理方法において、 可変長符号化されたストリームの可変長符号のうち、該
可変長符号を表すパラメータと合致していないものを検
出する検出のステップと、 上記検出のステップによる検出結果の内容に応じて、上
記ストリームを修正する修正のステップと、 上記検出のステップによる検出後に、次の処理開始を指
示する指示のステップとを有することを特徴とするデー
タ処理方法。9. A data processing method for processing a variable length coded stream, wherein a variable length code of a variable length coded stream that does not match a parameter representing the variable length code is detected. A detection step; a modification step of modifying the stream according to the content of the detection result of the detection step; and an instruction step of instructing the start of the next processing after the detection by the detection step. A data processing method characterized by the following.
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000363426A JP2002171524A (en) | 2000-11-29 | 2000-11-29 | Data processing apparatus and method |
| PCT/JP2001/010374 WO2002045420A1 (en) | 2000-11-29 | 2001-11-28 | Stream processor |
| US10/182,157 US7035337B2 (en) | 2000-11-29 | 2001-11-28 | Stream processing apparatus |
| KR1020027009721A KR100838902B1 (en) | 2000-11-29 | 2001-11-28 | Stream processing unit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000363426A JP2002171524A (en) | 2000-11-29 | 2000-11-29 | Data processing apparatus and method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2002171524A true JP2002171524A (en) | 2002-06-14 |
Family
ID=18834542
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000363426A Abandoned JP2002171524A (en) | 2000-11-29 | 2000-11-29 | Data processing apparatus and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2002171524A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013521717A (en) * | 2010-03-02 | 2013-06-10 | クゥアルコム・インコーポレイテッド | Enabling delta compression and motion prediction and metadata modification to render images on a remote display |
| JP2016076761A (en) * | 2014-10-03 | 2016-05-12 | 株式会社ニコン | Image processing apparatus and image processing program |
-
2000
- 2000-11-29 JP JP2000363426A patent/JP2002171524A/en not_active Abandoned
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013521717A (en) * | 2010-03-02 | 2013-06-10 | クゥアルコム・インコーポレイテッド | Enabling delta compression and motion prediction and metadata modification to render images on a remote display |
| JP2016076761A (en) * | 2014-10-03 | 2016-05-12 | 株式会社ニコン | Image processing apparatus and image processing program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100838902B1 (en) | Stream processing unit | |
| JP4010066B2 (en) | Image data recording apparatus and recording method, and image data recording / reproducing apparatus and recording / reproducing method | |
| US7536080B2 (en) | Signal processing apparatus | |
| KR20000068770A (en) | Digital camcorder apparatus with mpeg-2-compatible videocomp ression | |
| JP3921841B2 (en) | Signal processing apparatus and method, and recording apparatus, reproducing apparatus, and recording / reproducing apparatus | |
| JP2000138897A (en) | Data processing device and data recording device | |
| US6970938B2 (en) | Signal processor | |
| WO2001058171A1 (en) | Recording device and method, and reproducing device and method | |
| KR100739262B1 (en) | Recording apparatus and recording method, reproducing apparatus and reproducing method | |
| JP2002142192A (en) | Signal processing apparatus and method, and recording apparatus and method | |
| JP2000324448A (en) | Data recording device, data recording / reproducing device, data recording method, and data recording / reproducing method | |
| JP2003061046A (en) | Signal processing apparatus and method, recording and reproducing apparatus and method, and reproducing apparatus and method | |
| JP2002171524A (en) | Data processing apparatus and method | |
| JP2002171241A (en) | Stream transmission apparatus and method | |
| KR20010101937A (en) | Recording apparatus and method | |
| JP2000132914A (en) | Data processing device and data recording device | |
| JP4038949B2 (en) | Playback apparatus and method | |
| JP2001169243A (en) | Recording apparatus and method, and reproducing apparatus and method | |
| JP2001218162A (en) | Recording device and method | |
| JP2000149455A (en) | Data recording device and recording method, data recording / reproducing device, recording / reproducing method, and data recording medium | |
| JP3978903B2 (en) | Data recording apparatus, data recording method, data processing apparatus, and data processing method | |
| JP3257243B2 (en) | Digital video signal recording method and recording apparatus | |
| JP2000123485A (en) | Recording device and method | |
| JP2000312341A (en) | Data transmission device and method, recording device, and recording / reproducing device | |
| JP2001346163A (en) | Recording apparatus and method, reproducing apparatus and method, and recording / reproducing apparatus and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070201 |
|
| A762 | Written abandonment of application |
Free format text: JAPANESE INTERMEDIATE CODE: A762 Effective date: 20090812 |