JPH06276482A - Picture signal coding method, coder, decoding method and decoder - Google Patents

Picture signal coding method, coder, decoding method and decoder

Info

Publication number
JPH06276482A
JPH06276482A JP6075693A JP6075693A JPH06276482A JP H06276482 A JPH06276482 A JP H06276482A JP 6075693 A JP6075693 A JP 6075693A JP 6075693 A JP6075693 A JP 6075693A JP H06276482 A JPH06276482 A JP H06276482A
Authority
JP
Japan
Prior art keywords
picture
slice
image
intra
image signal
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.)
Granted
Application number
JP6075693A
Other languages
Japanese (ja)
Other versions
JP3240737B2 (en
Inventor
Yoichi Yagasaki
陽一 矢ヶ崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP6075693A priority Critical patent/JP3240737B2/en
Publication of JPH06276482A publication Critical patent/JPH06276482A/en
Application granted granted Critical
Publication of JP3240737B2 publication Critical patent/JP3240737B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To reduce number of bits of a variable length code produced at decod ing by adding a flag used to discriminate whether or not sliced data consist of a macro block subject to in-picture coding for each slicing to a bit stream. CONSTITUTION:A coded motion picture is inputted from a picture input terminal 110. The inputted picture signal is fed to a field memory group 111, from which an object block picture signal S1 being an object of coding at present is fed to a hybrid coder 112. The hybrid coder 112 executes hybrid coding in combination with motion compensation prediction coding and transformation coding such as DCT. Data S2 outputted from the hybrid coder 112 are subject to variable length coding such as Huffman coding at a VLC (variable length coding) device 113, the data are stored in a buffer memory 114 and sent at a predetermined transmission rate as a bet stream from an output terminal 115.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、光ディスクや磁気テー
プ等の蓄積系記録媒体を用いて動画像のデータ圧縮を行
う情報記録装置及び情報再生装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information recording apparatus and an information reproducing apparatus for compressing moving image data by using a storage system recording medium such as an optical disk or a magnetic tape.

【0002】[0002]

【従来の技術】近年、例えばテレビ会議システムやテレ
ビ電話システム等のような映像信号及び音声信号を遠隔
地に伝送する、いわゆる信号伝送システムにおいては、
伝送路を効率良く利用するため、映像信号や音声信号を
符号化することにより情報の伝送効率を高めることが行
われている。
2. Description of the Related Art Recently, in a so-called signal transmission system for transmitting video signals and audio signals to a remote place, such as a video conference system and a video telephone system,
In order to use the transmission path efficiently, it has been attempted to improve the transmission efficiency of information by encoding video signals and audio signals.

【0003】特に、動画像データは情報量が極めて多い
ため、この情報を長時間記録する場合には、映像信号を
高能率符号化して記録すると共に、その記録された信号
を読み出したときに能率良く復号化する手段が不可欠と
なり、このような要求に応えるべく、映像信号の相関を
利用した高能率符号化方式が提案されており、その高能
率符号化方式の1つにMPEG(Moving Picture Expert
s Group)方式がある。
In particular, since moving image data has an extremely large amount of information, when this information is recorded for a long time, the video signal is highly efficient coded and recorded, and the recorded signal is efficiently read. A means for good decoding is indispensable, and in order to meet such a demand, a high-efficiency coding method utilizing the correlation of video signals has been proposed. One of the high-efficiency coding methods is MPEG (Moving Picture Expert).
s Group) method.

【0004】このMPEG方式は、まず、フレーム間相
関を利用して、映像信号の画像フレーム間の差分を取る
ことにより時間軸方向の冗長度を落とし、その後、ライ
ン相関を利用して、離散コサイン変換(DCT)等の処
理を用いて空間軸方向の冗長度を落とすことにより映像
信号を能率良く符号化している。
This MPEG system first reduces the redundancy in the time axis direction by taking the difference between the image frames of the video signal by utilizing the inter-frame correlation, and then by using the line correlation, the discrete cosine is used. The video signal is efficiently coded by reducing the redundancy in the spatial axis direction by using processing such as conversion (DCT).

【0005】フレーム間相関を利用すると、例えば図4
の(A)に示すように、時刻t=t 1 、t2 、t3 にお
いて、フレーム画像PC1、PC2、PC3がそれぞれ
発生しているとき、フレーム画像PC1とPC2との画
像信号の差を演算して、図4の(B)に示すように画像
PC12を生成し、また、図4の(A)のフレーム画像
PC2とPC3との画像信号の差を演算して、図4の
(B)の画像PC23を生成する。通常、時間的に隣接
するフレーム画像は、それほど大きな変化がないため、
2つのフレーム画像の差を演算したときの差分信号は小
さな値となる。
When interframe correlation is used, for example, FIG.
As shown in (A) of FIG. 1, T2, T3To
And the frame images PC1, PC2, and PC3 are
When it occurs, the image of frame image PC1 and PC2
The difference between the image signals is calculated, and the image is displayed as shown in FIG.
The PC12 is generated and the frame image of FIG.
By calculating the difference between the image signals of PC2 and PC3,
The image PC 23 of (B) is generated. Usually adjacent in time
Since the frame image to be changed does not change so much,
The difference signal when calculating the difference between two frame images is small
It will be a small value.

【0006】すなわち、図4の(B)に示す画像PC1
2においては、図4の(A)のフレーム画像PC1とP
C2の画像信号の差として、図4の(B)の画像PC1
2の図中斜線で示す部分の信号が得られ、また、図4の
(B)に示す画像PC23においては、図4の(A)の
フレーム画像PC2とPC3の画像信号の差として、図
4の(B)の画像PC23の図中斜線で示す部分の信号
が得られる。そこで、この差分信号を符号化すれば、符
号量を圧縮することができる。
That is, the image PC1 shown in FIG.
2, the frame images PC1 and P of FIG.
As a difference between the image signals of C2, the image PC1 of FIG.
4 is obtained as a difference between the image signals of the frame images PC2 and PC3 of FIG. 4A in the image PC23 shown in FIG. 4B. The signal of the portion of the image PC23 of (B) indicated by the diagonal lines in the figure is obtained. Therefore, if this difference signal is encoded, the code amount can be compressed.

【0007】しかしながら、上記差分信号のみを伝送し
たのでは元の画像を復元することはできないため、各フ
レームの画像を、Iピクチャ(Intra-coded picture:画
像内符号化又はイントラ符号化画像)、Pピクチャ(Pre
dictive-coded picture :前方予測符号化画像)、Bピ
クチャ(Bidirectionaliy predictive-coded picture:
両方向予測符号化画像)のいずれかのピクチャとし、画
像信号を圧縮符号化するようにしている。
However, since the original image cannot be restored by transmitting only the difference signal, the image of each frame is converted into an I picture (Intra-coded picture: intra-coded or intra-coded image). P picture (Pre
dictive-coded picture: Bi-directional iy predictive-coded picture:
The image signal is compressed and coded as one of the pictures (bidirectional predictive coded image).

【0008】即ち、例えば、図5の(A)及び(B)に
示すように、フレームF1からフレームF17までの1
7フレームの画像信号をグループオブピクチャとし、処
理の1単位とする。そして、その先頭のフレームF1の
画像信号はIピクチャとして符号化し、第2番目のフレ
ームF2はBピクチャとして、また第3番目のフレーム
F3はPピクチャとして、それぞれ処理する。以下、第
4番目以降のフレームF4からフレームF17は、Bピ
クチャ又はPピクチャとして交互に処理する。
That is, for example, as shown in FIGS. 5A and 5B, 1 from frame F1 to frame F17
An image signal of 7 frames is used as a group of pictures and is used as one unit of processing. Then, the image signal of the leading frame F1 is encoded as an I picture, the second frame F2 is processed as a B picture, and the third frame F3 is processed as a P picture. Hereinafter, the fourth and subsequent frames F4 to F17 are alternately processed as a B picture or a P picture.

【0009】Iピクチャの画像信号としては、その1フ
レーム分の画像信号をそのまま伝送する。これに対し
て、Pピクチャの画像信号としては、基本的には、図5
の(A)に示すように、それより時間的に先行するIピ
クチャ又はPピクチャの画像信号からの差分を符号とし
て伝送する。さらに、Bピクチャの画像信号としては、
基本的には、図5の(B)に示すように、時間的に先行
するフレーム又は後行するフレームの両方の平均値から
の差分を求め、その差分を符号化して伝送する。
As the image signal of the I picture, the image signal for one frame is transmitted as it is. On the other hand, as the image signal of the P picture, basically, as shown in FIG.
(A), the difference from the image signal of the I picture or P picture preceding it in time is transmitted as a code. Further, as the image signal of B picture,
Basically, as shown in FIG. 5B, a difference from the average value of both the temporally preceding frame and the temporally following frame is obtained, and the difference is encoded and transmitted.

【0010】図6の(A)及び(B)は、このようにし
て、動画像信号を符号化する方法の原理を示している。
尚、図6の(A)には動画像信号のフレームのデータ
を、図6の(B)には伝送されるフレームデータを模式
的に示している。この図6に示すように、最初のフレー
ムF1はIピクチャ、すなわち非補間フレームとして処
理されるため、そのまま伝送データF1X(伝送非補間
フレームデータ)として伝送路に伝送される(画像内符
号化)。これに対して、第2のフレームF2はBピクチ
ャ、すなわち補間フレームとして処理されるため、時間
的に先行する上記フレームF1と、時間的に後行するフ
レームF3(フレーム間符号化の非補間フレーム)の平
均値との差分が演算され、その差分が伝送データ(伝送
補間フレームデータ)F2Xとして伝送される。
FIGS. 6A and 6B show the principle of the method of encoding a moving image signal in this way.
Note that FIG. 6A schematically shows frame data of a moving image signal, and FIG. 6B schematically shows frame data to be transmitted. As shown in FIG. 6, since the first frame F1 is processed as an I picture, that is, a non-interpolation frame, it is directly transmitted to the transmission path as transmission data F1X (transmission non-interpolation frame data) (intra-picture coding). . On the other hand, since the second frame F2 is processed as a B picture, that is, an interpolation frame, the frame F1 preceding in time and the frame F3 following in time (a non-interpolation frame of inter-frame coding) ) Is calculated, and the difference is transmitted as transmission data (transmission interpolation frame data) F2X.

【0011】但し、このBピクチャとしての処理は、さ
らに細かく説明すると、4種類存在する。その第1の処
理は、元のフレームF2のデータを図中破線の矢印SP
1で示すように、そのまま伝送データF2Xとして伝送
するものであり(画像内符号化)、Iピクチャにおける
場合と同様の処理となる。第2の処理は、時間的に後行
するフレームF3からの差分を演算し、図中破線の矢印
SP2で示すように、その差分を伝送するものである
(後方予測符号化)。第3の処理は、図中破線の矢印S
P3で示すように、時間的に先行するフレームF1との
差分を伝送するものである(前方予測符号化)。さら
に、第4の処理は、図中破線の矢印SP4で示すよう
に、時間的に先行するフレームF1と、後行するフレー
ムF3の平均値との差分を生成し、これを伝送データF
2Xとして伝送するものである(両方向予測符号化)。
However, there are four types of processing as the B picture, which will be described in more detail. In the first process, the data of the original frame F2 is converted into an arrow SP with a broken line in the figure.
As shown by 1, the data is transmitted as it is as the transmission data F2X (intra-picture coding), and the same processing as in the I picture is performed. The second process is to calculate a difference from the frame F3 that is temporally following and transmit the difference as indicated by a dashed arrow SP2 in the figure (backward predictive coding). The third process is the dashed arrow S in the figure.
As indicated by P3, the difference from the frame F1 preceding in time is transmitted (forward predictive coding). Further, in the fourth processing, as shown by a broken line arrow SP4 in the figure, a difference between the temporally preceding frame F1 and the average value of the following frame F3 is generated, and this difference is transmitted data F
It is transmitted as 2X (bidirectional predictive coding).

【0012】この4種類の方法のうち、伝送データが最
も少なくなる方法が採用される。
Of these four methods, the method that minimizes the amount of transmitted data is adopted.

【0013】尚、差分データを伝送するときには、差分
を演算する対象となるフレームの画像(予測画像)との
間の動きベクトルx1(前方予測符号化の場合のフレー
ムF1とF2との間の動きベクトル)、もしくは動きベ
クトルx2(後方予測符号化の場合のフレームF3とF
2との間の動きベクトル)、又は動きベクトルx1とx
2の両方(両方向予測の場合)が、差分データと共に伝
送される。
When transmitting the difference data, the motion vector x1 between the image of the frame for which the difference is to be calculated (predicted image) (the motion between the frames F1 and F2 in the case of forward predictive coding). Vector) or motion vector x2 (frames F3 and F in the case of backward prediction coding)
2), or motion vectors x1 and x
Both of the two (for bidirectional prediction) are transmitted with the difference data.

【0014】また、PピクチャのフレームF3(フレー
ム間符号化の非補間フレーム)は、時間的に先行するフ
レームF1を予測画像として、このフレームF1との差
分信号(破線矢印SP3で示す)と、動きベクトルx3
が演算され、これが伝送データF3Xとして伝送される
(前方予測符号化)。あるいはまた、元のフレームF3
のデータがそのまま伝送データF3Xとして伝送(破線
矢印SP1で示す)される(画像内符号化)。このPピ
クチャにおいて、いずれの方法により伝送されるかは、
Bピクチャにおける場合と同様であり、伝送データがよ
り少なくなる方が選択される。
A frame F3 (non-interpolation frame for inter-frame coding) of a P picture has a temporally preceding frame F1 as a prediction image and a difference signal (shown by a broken line arrow SP3) from the frame F1. Motion vector x3
Is calculated and transmitted as transmission data F3X (forward predictive coding). Alternatively, the original frame F3
Is transmitted as it is as transmission data F3X (indicated by a dashed arrow SP1) (intra-picture encoding). In this P picture, which method is used for transmission is
Similar to the case of B picture, the one with less transmission data is selected.

【0015】尚、BピクチャのフレームF4とPピクチ
ャのフレームF5も上述の方法と同様に処理され、伝送
データF4X、F5X、動きベクトルx4、x5、x6
等が得られる。
The B-picture frame F4 and the P-picture frame F5 are processed in the same manner as described above, and the transmission data F4X, F5X, the motion vectors x4, x5, x6.
Etc. are obtained.

【0016】図7は、上述した原理に基づいて、動画像
信号を符号化して伝送し、これを復号化する装置の構成
例を示している。符号化装置1は、入力された映像信号
を符号化し、伝送路としての記録媒体3に伝送して記録
するようになされている。そして、復号化装置2は、記
録媒体3に記録された信号を再生し、これを復号して出
力するようになされている。
FIG. 7 shows an example of the configuration of an apparatus which encodes and transmits a moving image signal based on the above-mentioned principle, and decodes the encoded moving image signal. The encoding device 1 is configured to encode the input video signal, transmit it to the recording medium 3 as a transmission path, and record it. Then, the decoding device 2 reproduces the signal recorded on the recording medium 3, decodes the signal, and outputs the decoded signal.

【0017】先ず、符号化装置1においては、入力端子
10を介して入力された映像信号VDが前処理回路11
に入力され、そこで輝度信号と色信号(この例の場合、
色差信号)が分離され、それぞれA/D(アナログ/デ
ィジタル)変換器12、13でA/D変換される。A/
D変換器12、13によりA/D変換されてディジタル
信号となった映像信号は、フレームメモリ14に送られ
て記憶される。このフレームメモリ14では、輝度信号
を輝度信号フレームメモリ15に、また、色差信号を色
差信号フレームメモリ16に、それぞれ記憶させる。
First, in the encoding device 1, the video signal VD input via the input terminal 10 is processed by the preprocessing circuit 11.
To the luminance and chrominance signals (in this example,
Color difference signals) are separated and A / D converted by A / D (analog / digital) converters 12 and 13, respectively. A /
The video signal converted into a digital signal by A / D conversion by the D converters 12 and 13 is sent to and stored in the frame memory 14. In the frame memory 14, the luminance signal is stored in the luminance signal frame memory 15, and the color difference signal is stored in the color difference signal frame memory 16, respectively.

【0018】次に、フォーマット変換回路17は、フレ
ームメモリ14に記憶されたフレームフォーマットの信
号を、ブロックフォーマットの信号に変換する。即ち、
図8の(A)に示すように、フレームメモリ14に記憶
された映像信号は、1ライン当りHドットのラインがV
ライン集められたフレームフォーマットのデータとされ
ている。フォーマット変換回路17は、この1フレーム
の信号を、16ラインを単位としてN個のスライスに区
分する。そして、各スライスは、図8の(B)に示すよ
うに、M個のマクロブロックに分割される。各マクロブ
ロックは、図8の(C)に示すように、16×16個の
画素(ドット)に対応する輝度信号により構成され、こ
の輝度信号は、図8の(C)に示すように、さらに8×
8ドットを単位とするブロックY[1]からY[4]に
区分される。そして、この16×16ドットの輝度信号
には、8×8ドットのCb信号と、8×8ドットのCr
信号が対応される。
Next, the format conversion circuit 17 converts the frame format signal stored in the frame memory 14 into a block format signal. That is,
As shown in FIG. 8A, in the video signal stored in the frame memory 14, H dot lines are V lines per line.
It is the data in the frame format in which lines are collected. The format conversion circuit 17 divides this 1-frame signal into N slices in units of 16 lines. Then, each slice is divided into M macroblocks, as shown in FIG. As shown in (C) of FIG. 8, each macroblock is composed of luminance signals corresponding to 16 × 16 pixels (dots), and this luminance signal is, as shown in (C) of FIG. 8x more
The blocks are divided into blocks Y [1] to Y [4] in units of 8 dots. Then, the luminance signal of 16 × 16 dots includes a Cb signal of 8 × 8 dots and a Cr signal of 8 × 8 dots.
The signals are matched.

【0019】このように、ブロックフォーマットに変換
されたデータは、フォーマット変換回路17からエンコ
ーダ18に供給され、ここでエンコード(符号化)が行
われる。その詳細については、図9を参照して後述す
る。
The data converted into the block format as described above is supplied from the format conversion circuit 17 to the encoder 18, where it is encoded. The details will be described later with reference to FIG.

【0020】エンコーダ18によりエンコードされた信
号は、ビットストリームとして伝送路に出力され、例え
ば記録媒体3に記録される。この記録媒体3より再生さ
れたデータは、復号化装置2のデコーダ31に供給さ
れ、デコード(復号化)される。デコーダ31の詳細に
ついては、図12を参照して後述する。
The signal encoded by the encoder 18 is output to the transmission path as a bit stream and recorded on the recording medium 3, for example. The data reproduced from the recording medium 3 is supplied to the decoder 31 of the decoding device 2 and decoded (decoded). Details of the decoder 31 will be described later with reference to FIG.

【0021】デコーダ31によりデコードされたデータ
は、フォーマット変換回路32に入力され、上記ブロッ
クフォーマットから上記フレームフォーマットに変換さ
れる。そして、このフレームフォーマットの輝度信号
は、フレームメモリ33の輝度信号フレームメモリ34
に送られて記憶され、色差信号は色差信号フレームメモ
リ35に送られて記憶される。輝度信号フレームメモリ
34と色差信号フレームメモリ35より読み出された輝
度信号と色差信号は、D/A変換器36、37によりそ
れぞれD/A変換され、後処理回路38に供給され、こ
の後処理回路38で合成される。この出力映像信号は、
出力端子30から図示しない、例えばCRTなどのディ
スプレイに出力され、表示される。
The data decoded by the decoder 31 is input to the format conversion circuit 32 and converted from the block format to the frame format. The luminance signal of this frame format is stored in the luminance signal frame memory 34 of the frame memory 33.
Is sent to and stored in the color difference signal frame memory 35. The luminance signal and the color difference signal read from the luminance signal frame memory 34 and the color difference signal frame memory 35 are D / A converted by the D / A converters 36 and 37, respectively, and supplied to the post-processing circuit 38, which performs the post-processing. It is synthesized in the circuit 38. This output video signal is
It is output from the output terminal 30 to a display (not shown) such as a CRT and is displayed.

【0022】次に図9を参照して、エンコーダ18の構
成例について説明する。
Next, a configuration example of the encoder 18 will be described with reference to FIG.

【0023】先ず、入力端子49を介して供給された符
号化されるべき画像データは、前記マクロブロック単位
で動きベクトル検出回路50に入力される。動きベクト
ル検出回路50は、予め設定されている所定のシーケン
スに従って、各フレームの画像データを、Iピクチャ、
Pピクチャ、またはBピクチャとして処理する。ここ
で、シーケンシャルに入力される各フレームの画像を、
I,P,Bのいずれのピクチャとして処理するかは、予
め定められている(例えば、図5に示したように、フレ
ームF1からF17により構成されるグループオブピク
チャが、I,B,P,B,P,・・・B,Pとして処理
される)。
First, the image data to be encoded, which is supplied through the input terminal 49, is input to the motion vector detection circuit 50 in units of the macro blocks. The motion vector detection circuit 50 converts the image data of each frame into an I-picture, according to a preset predetermined sequence.
It is processed as a P picture or a B picture. Here, the images of each frame that are sequentially input are
Which of I, P, and B pictures is to be processed is predetermined (for example, as shown in FIG. 5, the group of pictures composed of frames F1 to F17 is I, B, P, or B, P, ... B, P).

【0024】上記Iピクチャとして処理されるフレーム
(例えば、前記フレームF1)の画像データは、動きベ
クトル検出回路50からフレームメモリ51の前方原画
像部51aに転送されて記憶され、Bピクチャとして処
理されるフレーム(例えばフレームF2)の画像データ
は、原画像部(参照原画像部)51bに転送されて記憶
され、Pピクチャとして処理されるフレーム(例えばフ
レームF3)の画像データは、後方原画像部51cに転
送されて記憶される。
The image data of the frame to be processed as the I picture (for example, the frame F1) is transferred from the motion vector detection circuit 50 to the front original image portion 51a of the frame memory 51, stored therein, and processed as the B picture. Image data of a frame (for example, frame F2) to be stored in the original image portion (reference original image portion) 51b is stored, and image data of a frame (for example, frame F3) processed as a P picture is rearward original image portion. It is transferred to 51c and stored.

【0025】また、次のタイミングにおいて、さらにB
ピクチャ(例えば、前記フレームF4)またはPピクチ
ャ(例えばフレームF5)として処理すべきフレームの
画像が入力されたとき、それまで後方原画像部51cに
記憶されていた最初のPピクチャ(フレームF3)の画
像データは、後方原画像51cに転送されて記憶され
る。
At the next timing, B
When an image of a frame to be processed as a picture (for example, the frame F4) or a P picture (for example, frame F5) is input, the first P picture (frame F3) stored in the backward original image portion 51c until then is input. The image data is transferred to and stored in the rear original image 51c.

【0026】また、次のタイミングにおいて、さらにB
ピクチャ(例えば、前記フレームF4)又はPピクチャ
(例えばフレームF5)として処理すべきフレームの画
像が入力されたとき、それまで後方原画像部51cに記
憶されていた最初のPピクチャ(フレームF3)の画像
データが、前方原画像部51aに転送され、次のBピク
チャ(フレームF4)の画像データが、原画像部51b
に記憶(上書き)され、次のPピクチャ(フレームF
5)の画像データが、後方原画像部51cに記憶(上書
き)される。このような動作が順次繰り返される。
At the next timing, B
When an image of a frame to be processed as a picture (for example, the frame F4) or a P picture (for example, frame F5) is input, the first P picture (frame F3) stored in the backward original image portion 51c until then is input. The image data is transferred to the front original image portion 51a, and the image data of the next B picture (frame F4) is transferred to the original image portion 51b.
Is stored (overwritten) in the next P picture (frame F
The image data of 5) is stored (overwritten) in the rear original image portion 51c. Such an operation is sequentially repeated.

【0027】上記フレームメモリ51に記憶された各ピ
クチャの信号は、そこから読み出され、予測モード切り
換え回路52において、フレーム予測モード処理、また
はフィールド予測モード処理が行なわれる。さらにまた
予測判定回路54の制御の下に、演算部53において、
画像内予測、前方予測、後方予測、または両方向予測の
演算が行われる。これらの処理のうち、いずれの処理を
行うかは、予測誤差信号(処理の対象とされている参照
画像と、これに対する予測画像との差分)に対応して決
定される。このため、動きベクトル検出回路50は、こ
の判定に用いられる予測誤差信号の絶対値和(自乗和で
もよい)を生成する。
The signal of each picture stored in the frame memory 51 is read therefrom, and the prediction mode switching circuit 52 performs frame prediction mode processing or field prediction mode processing. Furthermore, under the control of the prediction determination circuit 54, in the calculation unit 53,
Intra-picture prediction, forward prediction, backward prediction, or bidirectional prediction is performed. Which of these processes is to be performed is determined in accordance with the prediction error signal (the difference between the reference image to be processed and the predicted image for this). Therefore, the motion vector detection circuit 50 generates the sum of absolute values (or the sum of squares) of the prediction error signal used for this determination.

【0028】ここで、予測モード切り換え回路52にお
けるフレーム予測モードとフィールド予測モードについ
て説明する。
Here, the frame prediction mode and field prediction mode in the prediction mode switching circuit 52 will be described.

【0029】フレーム予測モードが設定された場合にお
いては、予測モード切り換え回路52は、動きベクトル
検出回路50より供給される4個の輝度ブロックY
[1]からY[4]を、そのまま後段の演算部53に出
力する。即ち、この場合においては、図10の(A)に
示すように、各輝度ブロックに奇数フィールドのライン
のデータと、偶数フィールドのラインのデータとが混在
した状態となっている。尚、図10の各マクロブロック
中の実線は奇数フィールドのライン(第1フィールドの
ライン)のデータを、破線は偶数フィールドのライン
(第2フィールドのライン)のデータを示し、図10の
図中(a)及び(b)は動き補償の単位を示している。
上記フレーム予測モードにおいては、4個の輝度ブロッ
ク(マクロブロック)を単位として予測が行われ、4個
の輝度ブロックに対して1個の動きベクトルが対応され
る。
When the frame prediction mode is set, the prediction mode switching circuit 52 supplies the four luminance blocks Y supplied from the motion vector detection circuit 50.
[1] to Y [4] are directly output to the arithmetic unit 53 in the subsequent stage. That is, in this case, as shown in FIG. 10A, the data of the odd field lines and the data of the even field lines are mixed in each luminance block. The solid lines in each macroblock of FIG. 10 represent the data of the odd field lines (the first field lines), and the broken lines represent the data of the even field lines (the second field lines). (A) and (b) show units of motion compensation.
In the frame prediction mode, prediction is performed in units of four luminance blocks (macro blocks), and one motion vector is associated with each of the four luminance blocks.

【0030】これに対して、予測モード切り換え回路5
2は、フィールド予測モードが設定された場合、図10
の(A)に示す構成で動きベクトル検出回路50より入
力される信号を、図10の(B)に示すように、4個の
輝度ブロックのうち、輝度ブロックY[1]とY[2]
を、例えば奇数フィールドのラインのドットによりのみ
構成させ、他の2個の輝度ブロックY[3]とY[4]
を、偶数フィールドのラインのデータにより構成させ
て、演算部53に出力する。この場合においては、2個
の輝度ブロックY[1]とY[2]に対して、1個の動
きベクトルが対応され、他の2個の輝度ブロックY
[3]とY[4]に対して、他の1個の動きベクトルが
対応される。
On the other hand, the prediction mode switching circuit 5
2 corresponds to FIG. 10 when the field prediction mode is set.
The signal input from the motion vector detection circuit 50 in the configuration shown in (A) of FIG. 10 is converted into the luminance blocks Y [1] and Y [2] among the four luminance blocks as shown in (B) of FIG.
Is composed only of dots of lines in odd fields, and the other two luminance blocks Y [3] and Y [4]
Is composed of the data of the lines of the even fields and is output to the arithmetic unit 53. In this case, one motion vector corresponds to the two luminance blocks Y [1] and Y [2], and the other two luminance blocks Y
Another motion vector is associated with [3] and Y [4].

【0031】図9の構成に即して説明すると、動きベク
トル検出回路50は、フレーム予測モードにおける予測
誤差の絶対値和と、フィールド予測モードにおける予測
誤差の絶対値和を、予測モード切り換え回路52に出力
する。予測モード切り換え回路52は、フレーム予測モ
ードとフィールド予測モードにおける予測誤差の絶対値
和を比較し、その値が小さい予測モードに対応する上述
した処理を施して、データを演算部53に出力する。
Describing according to the configuration of FIG. 9, the motion vector detection circuit 50 calculates the sum of absolute values of prediction errors in the frame prediction mode and the sum of absolute values of prediction errors in the field prediction mode into the prediction mode switching circuit 52. Output to. The prediction mode switching circuit 52 compares the absolute value sums of the prediction errors in the frame prediction mode and the field prediction mode, performs the above-described processing corresponding to the prediction mode having the smaller value, and outputs the data to the calculation unit 53.

【0032】但し、このような処理は、実際には動きベ
クトル検出回路50で行われる。即ち、動きベクトル検
出回路50は、決定されたモードに対応する構成の信号
を予測モード切り換え回路52に出力し、予測モード切
り換え回路52は、その信号を、そのまま後段の演算部
53に出力する。
However, such processing is actually performed by the motion vector detection circuit 50. That is, the motion vector detection circuit 50 outputs a signal having a configuration corresponding to the determined mode to the prediction mode switching circuit 52, and the prediction mode switching circuit 52 outputs the signal as it is to the arithmetic unit 53 in the subsequent stage.

【0033】尚、色差信号は、フレーム予測モードの場
合、図10の(A)に示すように、奇数フィールドのラ
インのデータと偶数フィールドのラインのデータとが混
在する状態で、演算部53に供給される。また、フィー
ルド予測モードの場合、図10の(B)に示すように、
各色差ブロックCb、Crの上半分(4ライン)が、輝
度ブロックY[1]、Y[2]に対応する奇数フィール
ドの色差信号とされ、下半分(4ライン)が、輝度ブロ
ックY[3]、Y[4]に対応する偶数フィールドの色
差信号とされる。
In the frame prediction mode, the color-difference signal is supplied to the arithmetic unit 53 in a state where the data of the odd field lines and the data of the even field lines are mixed, as shown in FIG. Supplied. In the field prediction mode, as shown in FIG.
The upper half (4 lines) of each color difference block Cb, Cr is set as an odd field color difference signal corresponding to the luminance blocks Y [1], Y [2], and the lower half (4 lines) is the luminance block Y [3]. ], Y [4] and color difference signals of even fields.

【0034】また、動きベクトル検出回路50は、次の
ようにして、予測判定回路54において、画像内予測、
前方予測、後方予測、または両方向予測のいずれの予測
を行なうかを決定するための予測誤差の絶対値和を生成
する。
Further, the motion vector detection circuit 50 uses the prediction determination circuit 54 to predict the intra-image,
A sum of absolute values of prediction errors for determining whether to perform forward prediction, backward prediction, or bidirectional prediction is generated.

【0035】即ち、画像内予測の予測誤差の絶対値和と
して、参照画像のマクロブロックの信号Aijの和ΣAij
の絶対値|ΣAij|と、マクロブロックの信号Aijの絶
対値|Aij|の和Σ|Aij|の差を求める。また、前方
予測の予測誤差の絶対値和として、参照画像のマクロブ
ロックの信号Aijと、予測画像のマクロブロックの信号
Bijの差(Aij−Bij)の絶対値|Aij−Bij|の和Σ
|Aij−Bij|を求める。また、後方予測と両方向予測
の予測誤差の絶対値和も、前方予測における場合と同様
に(その予測画像を前方予測における場合と異なる予測
画像に変更して)求める。
That is, the sum ΣAij of the signals Aij of the macroblocks of the reference image is used as the sum of the absolute values of the prediction errors of the intra-picture prediction.
Of the absolute value | ΣAij | of the macroblock signal and the sum Σ | Aij | of the absolute value | Aij | of the macroblock signal Aij. Also, as the sum of absolute values of prediction errors in forward prediction, the sum Σ of absolute values | Aij-Bij | of the difference (Aij-Bij) between the signal Aij of the macroblock of the reference image and the signal Bij of the macroblock of the predicted image.
| Aij-Bij | is calculated. Further, the sum of absolute values of the prediction errors of the backward prediction and the bidirectional prediction is also obtained in the same manner as in the case of forward prediction (the predicted image is changed to a predicted image different from that in forward prediction).

【0036】これらの絶対値和は、予測判定回路54に
供給される。予測判定回路54は、前方予測、後方予測
および両方向予測の予測誤差の絶対値和のうち、最も小
さいものを、インター(inter) 予測の予測誤差の絶対値
和として選択する。さらに、このインター予測の予測誤
差の絶対値和と、画像内予測の予測誤差の絶対値和とを
比較し、その小さい方を選択し、この選択した絶対値和
に対応するモードを予測モードとして選択する。即ち、
画像内予測の予測誤差の絶対値和の方が小さければ、画
像内予測モードが設定される。インター予測の予測誤差
の絶対値和の方が小さければ、前方予測、後方予測また
は両方向予測モードのうち、対応する絶対値和が最も小
さかったモードが設定される。
The sum of these absolute values is supplied to the prediction determination circuit 54. The prediction determination circuit 54 selects the smallest sum of absolute values of prediction errors of forward prediction, backward prediction, and bidirectional prediction as the sum of absolute values of prediction errors of inter prediction. Further, the sum of the absolute values of the prediction errors of the inter prediction and the sum of the absolute values of the prediction errors of the intra-picture prediction are compared, the smaller one is selected, and the mode corresponding to the selected sum of the absolute values is set as the prediction mode. select. That is,
If the sum of absolute values of prediction errors in intra-picture prediction is smaller, the intra-picture prediction mode is set. If the sum of absolute values of prediction errors in inter prediction is smaller, the mode in which the corresponding sum of absolute values is the smallest is set among the forward prediction, backward prediction, and bidirectional prediction modes.

【0037】このように、動きベクトル検出回路50
は、参照画像のマクロブロックの信号を、フレームまた
はフィールド予測モードのうち、予測モード切り換え回
路52により選択されたモードに対応する図10で示し
たような構成で、予測モード切り換え回路52を介して
演算部53に供給すると共に、4つの予測モードのう
ち、予測判定回路54により選択された予測モードに対
応する予測画像と参照画像との間の動きベクトルを検出
し、後述する可変長符号化回路58と動き補償回路64
に出力する。尚、上述したように、この動きベクトルと
しては、対応する予測誤差の絶対値和が最小となるもの
が選択される。
In this way, the motion vector detection circuit 50
Has a configuration as shown in FIG. 10 in which the signal of the macroblock of the reference image corresponds to the mode selected by the prediction mode switching circuit 52 among the frame or field prediction modes, and is transmitted via the prediction mode switching circuit 52. A motion vector between the prediction image and the reference image corresponding to the prediction mode selected by the prediction determination circuit 54, out of the four prediction modes, is detected while being supplied to the calculation unit 53, and a variable length coding circuit described later is described. 58 and motion compensation circuit 64
Output to. As described above, the motion vector that minimizes the sum of the absolute values of the corresponding prediction errors is selected.

【0038】予測判定回路54は、動きベクトル検出回
路50が前方原画像部51aよりIピクチャの画像デー
タを読み出しているとき、予測モードとして、フレーム
(画像)内予測モード(動き補償を行わないモード)を
設定し、演算部53のスイッチ53dを接点a側に切り
換える。これにより、Iピクチャの画像データがDCT
モード切り換え回路55に入力される。
When the motion vector detection circuit 50 is reading the image data of the I picture from the front original image portion 51a, the prediction determination circuit 54 uses the intra-frame (image) prediction mode (the mode in which motion compensation is not performed) as the prediction mode. ) Is set, and the switch 53d of the calculation unit 53 is switched to the contact a side. As a result, the image data of the I picture is DCT
It is input to the mode switching circuit 55.

【0039】このDCTモード切り換え回路55は、図
11の(A)または(B)に示すように、4個の輝度ブ
ロックのデータを、奇数フィールドのラインと偶数フィ
ールドのラインが混在する状態(フレームDCTモー
ド)、または、分離された状態(フィールドDCTモー
ド)、のいずれかの状態にして、DCT回路56に出力
する。即ち、DCTモード切り換え回路55は、奇数フ
ィールドと偶数フィールドのデータを混在してDCT処
理した場合における符号化効率と、分離した状態におい
てDCT処理した場合の符号化効率とを比較し、符号化
効率の良好なモードを選択する。
The DCT mode switching circuit 55, as shown in FIG. 11A or 11B, is a state in which the data of four luminance blocks are mixed with the lines of the odd field and the lines of the even field (frame). Either the DCT mode) or the separated state (field DCT mode) is output to the DCT circuit 56. That is, the DCT mode switching circuit 55 compares the coding efficiency in the case where the data of the odd field and the even field are mixed and is subjected to the DCT processing with the coding efficiency in the case where the DCT processing is performed in the separated state, and the coding efficiency is compared. Choose a good mode for.

【0040】例えば、入力された信号を、図11の
(A)に示すように、奇数フィールドと偶数フィールド
のラインが混在する構成とし、上下に隣接する奇数フィ
ールドのラインの信号と偶数フィールドのラインの信号
の差を演算し、さらにその絶対値の和(または自乗和)
を求める。また、入力された信号を、図11の(B)に
示すように、奇数フィールドと偶数フィールドのライン
が分離した構成とし、上下に隣接する奇数フィールドの
ライン同士の信号の差と、偶数フィールドのライン同士
の信号の差を演算し、それぞれの絶対値の和(または自
乗和)を求める。さらに、両者(絶対値和)を比較し、
小さい値に対応するDCTモードを設定する。即ち、前
者の方が小さければ、フレームDCTモードを設定し、
後者の方が小さければ、フィールドDCTモードを設定
する。そして、選択したDCTモードに対応する構成の
データをDCT回路56に出力するとともに、選択した
DCTモードを示すDCTフラグを、可変長符号化回路
58と動き補償回路64に出力する。
For example, as shown in FIG. 11A, the input signal has a structure in which lines of odd fields and even fields are mixed, and signals of lines of odd fields and lines of even fields which are vertically adjacent to each other are arranged. The difference between the signals of is calculated, and the sum (or sum of squares) of the absolute values is calculated.
Ask for. Further, as shown in FIG. 11B, the input signal has a structure in which the lines of the odd field and the even field are separated, and the difference between the signals of the lines of the odd fields vertically adjacent to each other and the The difference between the signals on the lines is calculated, and the sum (or sum of squares) of the absolute values of the respective lines is calculated. Furthermore, comparing both (sum of absolute values),
Set the DCT mode corresponding to the smaller value. That is, if the former is smaller, set the frame DCT mode,
If the latter is smaller, the field DCT mode is set. Then, the data having the configuration corresponding to the selected DCT mode is output to the DCT circuit 56, and the DCT flag indicating the selected DCT mode is output to the variable length coding circuit 58 and the motion compensation circuit 64.

【0041】予測モード切り換え回路52における予測
モード(図11参照)と、このDCTモード切り換え回
路55におけるDCTモード(図12参照)を比較して
明らかなように、輝度ブロックに関しては、両者の各モ
ードにおけるデータ構造は実質的に同一である。
As is clear from a comparison between the prediction mode in the prediction mode switching circuit 52 (see FIG. 11) and the DCT mode in the DCT mode switching circuit 55 (see FIG. 12), with respect to the luminance block, each mode of the both. The data structures in are substantially the same.

【0042】予測モード切り換え回路52において、フ
レーム予測モード(奇数ラインと偶数ラインが混在する
モード)が選択された場合、DCTモード切り換え回路
55においても、フレームDCTモード(奇数ラインと
偶数ラインが混在するモード)が選択される可能性が高
く、また予測モード切り換え回路52において、フィー
ルド予測モード(奇数フィールドと偶数フィールドのデ
ータが分離されたモード)が選択された場合、DCTモ
ード切り換え回路55において、フィールドDCTモー
ド(奇数フィールドと偶数フィールドのデータが分離さ
れたモード)が選択される可能性が高い。
When the frame prediction mode (a mode in which odd lines and even lines are mixed) is selected in the prediction mode switching circuit 52, the frame DCT mode (in which odd lines and even lines are mixed) is also selected in the DCT mode switching circuit 55. If the field prediction mode (mode in which the data in the odd field and the data in the even field are separated) is selected in the prediction mode switching circuit 52, the field in the DCT mode switching circuit 55 is high. There is a high possibility that the DCT mode (mode in which the data of the odd field and the data of the even field are separated) is selected.

【0043】しかしながら、必ずしも常にそのようにな
されるわけではなく、予測モード切り換え回路52にお
いては、予測誤差の絶対値和が小さくなるようにモード
が決定され、DCTモード切り換え回路55において
は、符号化効率が良好となるようにモードが決定され
る。
However, this is not always the case, and the prediction mode switching circuit 52 determines the mode so that the sum of the absolute values of the prediction errors becomes smaller, and the DCT mode switching circuit 55 encodes the mode. The mode is determined so that the efficiency is good.

【0044】DCTモード切り換え回路55より出力さ
れたIピクチャの画像データは、DCT回路56に入力
され、DCT(離散コサイン変換)処理され、DCT係
数に変換される。このDCT係数は、量子化回路57に
入力され、後段の送信バッファ59のデータ蓄積量(バ
ッファ蓄積量)に対応した量子化ステップで量子化され
た後、可変長符号化回路58に入力される。
The I-picture image data output from the DCT mode switching circuit 55 is input to the DCT circuit 56, subjected to DCT (discrete cosine transform) processing, and converted into DCT coefficients. The DCT coefficient is input to the quantization circuit 57, quantized in a quantization step corresponding to the data storage amount (buffer storage amount) of the transmission buffer 59 in the subsequent stage, and then input to the variable length coding circuit 58. .

【0045】可変長符号化回路58は、量子化回路57
より供給される量子化ステップ(スケール)に対応し
て、量子化回路57より供給される画像データ(この場
合は、Iピクチャのデータ)を、例えばハフマン(Huffm
an) 符号などの可変長符号に変換し、送信バッファ59
に出力する。可変長符号化回路58には、また、量子化
回路57より量子化ステップ(スケール)、予測判定回
路54より予測モード(画像内予測、前方予測、後方予
測、または両方向予測のいずれが設定されたかを示すモ
ード)、動きベクトル検出回路50より動きベクトル、
予測モード切り換え回路52より予測フラグ(フレーム
予測モードまたはフィールド予測モードのいずれが設定
されたかを示すフラグ)、及びDCTモード切り換え回
路55が出力するDCTフラグ(フレームDCTモード
またはフィールドDCTモードのいずれが設定されたか
を示すフラグ)が入力されており、これらも可変長符号
化される。
The variable length coding circuit 58 is a quantization circuit 57.
The image data (in this case, I picture data) supplied from the quantization circuit 57 corresponding to the supplied quantization step (scale) is, for example, Huffman (Huffm).
an) Converted into a variable length code such as code, and transmitted to the transmission buffer 59
Output to. In the variable-length coding circuit 58, the quantization step (scale) is set by the quantization circuit 57, and the prediction mode (whether intra-picture prediction, forward prediction, backward prediction, or bidirectional prediction is set by the prediction determination circuit 54). , A motion vector from the motion vector detection circuit 50,
The prediction flag (which indicates whether the frame prediction mode or the field prediction mode is set) is set by the prediction mode switching circuit 52, and the DCT flag (either the frame DCT mode or the field DCT mode is set by the DCT mode switching circuit 55 is set. Has been input, and these are also variable length coded.

【0046】送信バッファ59は、入力されたデータを
一時蓄積し、蓄積量に対応するデータを量子化回路57
に出力する。送信バッファ59は、そのデータ残量が許
容上限値まで増量すると、量子化制御信号によって量子
化回路57の量子化スケールを大きくすることにより、
量子化データのデータ量を低下させる。また、これとは
逆に、データ残量が許容下限値まで減少すると、送信バ
ッファ59は、量子化制御信号によって量子化回路57
の量子化スケールを小さくすることにより、量子化デー
タのデータ量を増大させる。このようにして、送信バッ
ファ59のオーバフローまたはアンダフローが防止され
る。そして、送信バッファ59に蓄積されたデータは、
所定のタイミングで読み出され、出力端子69を介して
伝送路に出力され、例えば前記記録媒体3に記録され
る。
The transmission buffer 59 temporarily accumulates the input data, and quantizes the data corresponding to the accumulated amount in the quantizing circuit 57.
Output to. When the remaining amount of data increases to the allowable upper limit value, the transmission buffer 59 increases the quantization scale of the quantization circuit 57 by the quantization control signal,
The amount of quantized data is reduced. On the contrary, when the data remaining amount decreases to the allowable lower limit value, the transmission buffer 59 uses the quantization control signal to quantize circuit 57.
The data amount of the quantized data is increased by reducing the quantization scale of. In this way, overflow or underflow of the transmission buffer 59 is prevented. Then, the data accumulated in the transmission buffer 59 is
It is read at a predetermined timing, is output to the transmission path via the output terminal 69, and is recorded on the recording medium 3, for example.

【0047】一方、量子化回路57より出力されたIピ
クチャのデータは、逆量子化回路60に入力され、量子
化回路57より供給される量子化ステップに対応して逆
量子化される。逆量子化回路60の出力は、IDCT
(逆DCT)回路61に入力され、逆DCT処理された
後、演算器62を介してフレームメモリ63の前方予測
画像部63aに供給され、記憶される。
On the other hand, the I picture data output from the quantization circuit 57 is input to the inverse quantization circuit 60 and inversely quantized in accordance with the quantization step supplied from the quantization circuit 57. The output of the inverse quantization circuit 60 is IDCT
After being input to the (inverse DCT) circuit 61 and subjected to inverse DCT processing, it is supplied to and stored in the forward predicted image portion 63a of the frame memory 63 via the calculator 62.

【0048】ところで、動きベクトル検出回路50は、
シーケンシャルに入力される各フレームの画像データ
を、例えば、前述したように、I、B、P、B、P、B
・・・のピクチャとしてそれぞれ処理する場合、最初に
入力されたフレームの画像データをIピクチャとして処
理した後、次に入力されたフレームの画像をBピクチャ
として処理する前に、さらにその次に入力されたフレー
ムの画像データをPピクチャとして処理する。Bピクチ
ャは後方予測を伴うため、後方予測画像としてのPピク
チャが先に用意されていないと、復号することができな
いからである。
By the way, the motion vector detection circuit 50
The image data of each frame that is sequentially input is, for example, I, B, P, B, P, B as described above.
, Respectively, after processing the image data of the first input frame as an I picture, and before processing the image of the next input frame as a B picture, further input The image data of the selected frame is processed as a P picture. This is because the B picture is accompanied by backward prediction and cannot be decoded unless the P picture as a backward predicted image is prepared in advance.

【0049】そこで動きベクトル検出回路50は、Iピ
クチャの処理の次に、後方原画像部51cに記憶されて
いるPピクチャの画像データの処理を開始する。そし
て、上述した場合と同様に、マクロブロック単位でのフ
レーム間差分(予測誤差)の絶対値和が、動きベクトル
検出回路50から予測モード切り換え回路52と予測判
定回路54に供給される。予測モード切り換え回路52
と予測判定回路54は、このPピクチャのマクロブロッ
クの予測誤差の絶対値和に対応して、フレーム/フィー
ルド予測モード、または画像内予測、前方予測、後方予
測、もしくは両方向予測の予測モードを設定する。
Then, the motion vector detecting circuit 50 starts the processing of the image data of the P picture stored in the rear original image portion 51c after the processing of the I picture. Then, as in the case described above, the absolute value sum of the inter-frame difference (prediction error) in macroblock units is supplied from the motion vector detection circuit 50 to the prediction mode switching circuit 52 and the prediction determination circuit 54. Prediction mode switching circuit 52
And the prediction determination circuit 54 sets the frame / field prediction mode, or the prediction mode of intra-picture prediction, forward prediction, backward prediction, or bidirectional prediction in accordance with the sum of the absolute values of the prediction errors of the macroblock of the P picture. To do.

【0050】演算部53はフレーム内予測モードが設定
されたとき、スイッチ53dを上述したように接点a側
に切り換える。従って、このデータは、Iピクチャのデ
ータと同様に、DCTモード切り換え回路55、DCT
回路56、量子化回路57、可変長符号化回路58、送
信バッファ59を介して伝送路に伝送される。また、こ
のデータは、逆量子化回路60、IDCT回路61、演
算器62を介してフレームメモリ63の後方予測画像部
63bに供給され、記憶される。
When the intra-frame prediction mode is set, the arithmetic unit 53 switches the switch 53d to the contact a side as described above. Therefore, this data is similar to the I picture data in that the DCT mode switching circuit 55, DCT
It is transmitted to the transmission line via the circuit 56, the quantization circuit 57, the variable length coding circuit 58, and the transmission buffer 59. Further, this data is supplied to and stored in the backward prediction image section 63b of the frame memory 63 via the inverse quantization circuit 60, the IDCT circuit 61, and the computing unit 62.

【0051】一方、前方予測モードの時、スイッチ53
dが接点bに切り換えられると共に、フレームメモリ6
3の前方予測画像部63aに記憶されている画像(いま
の場合、Iピクチャの画像)データが読み出され、動き
補償回路64により、動きベクトル検出回路50が出力
する動きベクトルに対応して動き補償される。すなわ
ち、動き補償回路64は、予測判定回路54より前方予
測モードの設定が指令されたとき、前方予測画像部63
aの読み出しアドレスを、動きベクトル検出回路50が
現在出力しているマクロブロックの位置に対応する位置
から動きベクトルに対応する分だけずらしてデータを読
み出し、予測画像データを生成する。
On the other hand, in the forward prediction mode, the switch 53
d is switched to the contact b, and the frame memory 6
The image data (in this case, an I-picture image) stored in the forward predictive image unit 63a of No. 3 is read out, and the motion compensation circuit 64 makes a motion corresponding to the motion vector output from the motion vector detection circuit 50. Will be compensated. That is, the motion compensation circuit 64, when the prediction determination circuit 54 commands the setting of the forward prediction mode, the forward prediction image unit 63.
The read address of a is shifted by an amount corresponding to the motion vector from the position corresponding to the position of the macro block currently output by the motion vector detection circuit 50, and the data is read to generate predicted image data.

【0052】動き補償回路64より出力された予測画像
データは、演算器53aに供給される。演算器53a
は、予測モード切り換え回路52より供給された参照画
像のマクロブロックのデータから、動き補償回路64よ
り供給された、このマクロブロックに対応する予測画像
データを減算し、その差分(予測誤差)を出力する。こ
の差分データは、DCTモード切り換え回路55、DC
T回路56、量子化回路57、可変長符号化回路58、
送信バッファ59を介して伝送路に伝送される。また、
この差分データは、逆量子化回路60、IDCT回路6
1により局所的に復号され、演算器62に入力される。
The predicted image data output from the motion compensation circuit 64 is supplied to the calculator 53a. Calculator 53a
Subtracts the predicted image data corresponding to this macroblock supplied from the motion compensation circuit 64 from the data of the macroblock of the reference image supplied from the prediction mode switching circuit 52, and outputs the difference (prediction error). To do. This difference data is the DCT mode switching circuit 55, DC
T circuit 56, quantization circuit 57, variable length coding circuit 58,
It is transmitted to the transmission line via the transmission buffer 59. Also,
This difference data is stored in the inverse quantization circuit 60 and the IDCT circuit 6
It is locally decoded by 1 and input to the calculator 62.

【0053】この演算器62には、また、演算器53a
に供給されている予測画像データと同一のデータが供給
されている。演算器62は、IDCT回路61が出力す
る差分データに、動き補償回路64が出力する予測画像
データを加算する。これにより、元の(復号した)Pピ
クチャの画像データが得られる。このPピクチャの画像
データは、フレームメモリ63の後方予測画像部63b
に供給され、記憶される。
The computing unit 62 also includes a computing unit 53a.
The same data as the predicted image data supplied to the computer is supplied. The calculator 62 adds the predicted image data output by the motion compensation circuit 64 to the difference data output by the IDCT circuit 61. As a result, the image data of the original (decoded) P picture is obtained. The image data of this P picture is stored in the backward prediction image portion 63b of the frame memory 63.
Are stored and stored in.

【0054】動きベクトル検出回路50は、このよう
に、IピクチャとPピクチャのデータが前方予測画像部
63aと後方予測画像部63bにそれぞれ記憶された
後、次にBピクチャの処理を実行する。予測モード切り
換え回路52と予測判定回路54は、マクロブロック単
位でのフレーム間差分の絶対値和の大きさに対応して、
フレーム/フィールドモードを設定し、また、予測モー
ドをフレーム内予測モード、前方予測モード、後方予測
モード、または両方向予測モードのいずれかに設定す
る。
In this way, the motion vector detection circuit 50 executes the process of the B picture after the data of the I picture and the P picture are stored in the forward predicted image portion 63a and the backward predicted image portion 63b, respectively. The prediction mode switching circuit 52 and the prediction determination circuit 54 correspond to the magnitude of the sum of absolute values of inter-frame differences in macroblock units,
The frame / field mode is set, and the prediction mode is set to either the intra-frame prediction mode, the forward prediction mode, the backward prediction mode, or the bidirectional prediction mode.

【0055】上述したように、フレーム内予測モードま
たは前方予測モードの時、スイッチ53dは接点aまた
はbに切り換えられる。このとき、Pピクチャにおける
場合と同様の処理が行われ、データが伝送される。これ
に対して、後方予測モードまたは両方向予測モードが設
定された時、スイッチ53dは、接点cまたはdにそれ
ぞれ切り換えられる。
As described above, in the intra-frame prediction mode or the forward prediction mode, the switch 53d is switched to the contact a or b. At this time, the same processing as in the P picture is performed and the data is transmitted. On the other hand, when the backward prediction mode or the bidirectional prediction mode is set, the switch 53d is switched to the contact c or d, respectively.

【0056】スイッチ53dが接点cに切り換えられて
いる後方予測モードの時、後方予測画像部63bに記憶
されている画像(いまの場合、Pピクチャの画像)デー
タが読み出され、動き補償回路64により、動きベクト
ル検出回路50が出力する動きベクトルに対応して動き
補償される。すなわち、動き補償回路64は、予測判定
回路54より後方予測モードの設定が指令されたとき、
後方予測画像部63bの読み出しアドレスを、動きベク
トル検出回路50がいま出力しているマクロブロックの
位置に対応する位置から動きベクトルに対応する分だけ
ずらしてデータを読み出し、予測画像データを生成す
る。
In the backward prediction mode in which the switch 53d is switched to the contact c, the image (in this case, P picture image) data stored in the backward predicted image portion 63b is read out and the motion compensation circuit 64 is read. Thus, motion compensation is performed corresponding to the motion vector output by the motion vector detection circuit 50. That is, when the prediction determination circuit 54 instructs the motion compensation circuit 64 to set the backward prediction mode,
The read address of the backward predicted image portion 63b is shifted from the position corresponding to the position of the macro block currently output by the motion vector detection circuit 50 by the amount corresponding to the motion vector, and the data is read to generate predicted image data.

【0057】動き補償回路64より出力された予測画像
データは、演算器53bに供給される。演算器53b
は、予測モード切り換え回路52より供給された参照画
像のマクロブロックのデータから、動き補償回路64よ
り供給された予測画像データを減算し、その差分を出力
する。この差分データは、DCTモード切り換え回路5
5、DCT回路56、量子化回路57、可変長符号化回
路58、送信バッファ59を介して伝送路に伝送され
る。
The predicted image data output from the motion compensation circuit 64 is supplied to the calculator 53b. Calculator 53b
Subtracts the predicted image data supplied from the motion compensation circuit 64 from the data of the macroblock of the reference image supplied from the prediction mode switching circuit 52, and outputs the difference. This difference data is stored in the DCT mode switching circuit 5
5, the DCT circuit 56, the quantization circuit 57, the variable length coding circuit 58, and the transmission buffer 59.

【0058】スイッチ53dが接点dに切り換えられて
いる両方向予測モードの時、前方予測画像部63aに記
憶されている画像(いまの場合、Iピクチャの画像)デ
ータと、後方予測画像部63bに記憶されている画像
(いまの場合、Pピクチャの画像)データが読み出さ
れ、動き補償回路64により、動きベクトル検出回路5
0が出力する動きベクトルに対応して動き補償される。
すなわち、動き補償回路64は、予測判定回路54より
両方向予測モードの設定が指令されたとき、前方予測画
像部63aと後方予測画像部63bの読み出しアドレス
を、動きベクトル検出回路50がいま出力しているマク
ロブロックの位置に対応する位置から動きベクトル(こ
の場合の動きベクトルは、前方予測画像用と後方予測画
像用の2つとなる)に対応する分だけずらしてデータを
読み出し、予測画像データを生成する。
In the bidirectional prediction mode in which the switch 53d is switched to the contact point d, the image data (in this case, the I picture image) stored in the forward predicted image portion 63a and the backward predicted image portion 63b are stored. The image data (in this case, the image of the P picture) being read is read out, and the motion compensation circuit 64 causes the motion vector detection circuit 5
Motion compensation is performed according to the motion vector output by 0.
That is, the motion compensation circuit 64, when the bidirectional prediction mode setting is instructed by the prediction determination circuit 54, the motion vector detection circuit 50 now outputs the read addresses of the forward predicted image portion 63a and the backward predicted image portion 63b. The data is read out by shifting the amount corresponding to the motion vector (in this case, there are two for the forward prediction image and the backward prediction image) from the position corresponding to the position of the existing macroblock, and the prediction image data is generated. To do.

【0059】動き補償回路64より出力された予測画像
データは、演算器53cに供給される。演算器53c
は、動きベクトル検出回路50より供給された参照画像
のマクロブロックのデータから、動き補償回路64より
供給された予測画像データの平均値を減算し、その差分
を出力する。この差分データは、DCTモード切り換え
回路55、DCT回路56、量子化回路57、可変長符
号化回路58、送信バッファ59を介して伝送路に伝送
される。
The predicted image data output from the motion compensation circuit 64 is supplied to the calculator 53c. Calculator 53c
Subtracts the average value of the predicted image data supplied from the motion compensation circuit 64 from the macroblock data of the reference image supplied from the motion vector detection circuit 50, and outputs the difference. This difference data is transmitted to the transmission line via the DCT mode switching circuit 55, the DCT circuit 56, the quantization circuit 57, the variable length coding circuit 58, and the transmission buffer 59.

【0060】Bピクチャの画像は、他の画像の予測画像
とされることがないため、フレームメモリ63には記憶
されない。
The B picture image is not stored in the frame memory 63 because it is not used as a predicted image of another image.

【0061】尚、フレームメモリ63において、前方予
測画像部63aと後方予測画像部63bは、必要に応じ
てバンク切り換えが行われ、所定の参照画像に対して、
一方または他方に記憶されているものを、前方予測画像
あるいは後方予測画像として切り換えて出力することが
できる。
In the frame memory 63, the forward predictive image portion 63a and the backward predictive image portion 63b are bank-switched as necessary, and a predetermined reference image
What is stored in one or the other can be switched and output as a forward prediction image or a backward prediction image.

【0062】以上においては、輝度ブロックを中心とし
て説明をしたが、色差ブロックについても同様に、図1
0および図11に示すマクロブロックを単位として処理
され、伝送される。尚、色差ブロックを処理する場合の
動きベクトルは、対応する輝度ブロックの動きベクトル
を垂直方向と水平方向に、それぞれ1/2にしたものが
用いられる。
In the above description, the description has been centered on the luminance block, but the same applies to the color difference block in FIG.
0 and the macro block shown in FIG. 11 is processed as a unit and transmitted. The motion vector used for processing the color difference block is obtained by halving the motion vector of the corresponding luminance block in each of the vertical direction and the horizontal direction.

【0063】次に、図12は、図7のデコーダ31の一
例の構成を示すブロック図である。伝送路(記録媒体
3)を介して伝送された符号化された画像データは、図
示せぬ受信回路で受信されたり、再生装置で再生され、
受信バッファ81に一時記憶された後、復号回路90の
可変長復号化回路82に供給される。可変長復号化回路
82は、受信バッファ81より供給されたデータを可変
長復号化し、動きベクトル、予測モード、予測フラグお
よびDCTフラグを動き補償回路87に、また、量子化
ステップを逆量子化回路83に、それぞれ出力すると共
に、復号された画像データを逆量子化回路83に出力す
る。
Next, FIG. 12 is a block diagram showing the structure of an example of the decoder 31 shown in FIG. The encoded image data transmitted via the transmission path (recording medium 3) is received by a receiving circuit (not shown) or reproduced by a reproducing device.
After being temporarily stored in the reception buffer 81, it is supplied to the variable length decoding circuit 82 of the decoding circuit 90. The variable length decoding circuit 82 performs variable length decoding on the data supplied from the reception buffer 81, the motion vector, the prediction mode, the prediction flag and the DCT flag to the motion compensation circuit 87, and the quantization step to the dequantization circuit. And outputs the decoded image data to the inverse quantization circuit 83.

【0064】逆量子化回路83は、可変長復号化回路8
2より供給された画像データを、同じく可変長復号化回
路82より供給された量子化ステップに従って逆量子化
し、IDCT回路84に出力する。逆量子化回路83よ
り出力されたデータ(DCT係数)は、IDCT回路8
4で、逆DCT処理され、演算器85に供給される。
The inverse quantization circuit 83 is used in the variable length decoding circuit 8
The image data supplied from No. 2 is inversely quantized according to the quantization step supplied from the variable length decoding circuit 82, and output to the IDCT circuit 84. The data (DCT coefficient) output from the inverse quantization circuit 83 is the IDCT circuit 8
In step 4, inverse DCT processing is performed and the result is supplied to the calculator 85.

【0065】IDCT回路84より供給された画像デー
タが、Iピクチャのデータである場合、そのデータは演
算器85より出力され、演算器85に後に入力される画
像データ(PまたはBピクチャのデータ)の予測画像デ
ータ生成のために、フレームメモリ86の前方予測画像
部86aに供給されて記憶される。また、このデータ
は、フォーマット変換回路32(図7)に出力される。
When the image data supplied from the IDCT circuit 84 is I-picture data, the data is output from the arithmetic unit 85 and input to the arithmetic unit 85 later (P or B-picture data). Is generated and supplied to the forward prediction image unit 86a of the frame memory 86 to be stored therein. Further, this data is output to the format conversion circuit 32 (FIG. 7).

【0066】IDCT回路84より供給された画像デー
タが、その1フレーム前の画像データを予測画像データ
とするPピクチャのデータであって、前方予測モードの
データである場合、フレームメモリ86の前方予測画像
部86aに記憶されている、1フレーム前の画像データ
(Iピクチャのデータ)が読み出され、動き補償回路8
7で可変長復号化回路82より出力された動きベクトル
に対応する動き補償が施される。そして、演算器85に
おいて、IDCT回路84より供給された画像データ
(差分のデータ)と加算され、出力される。この加算さ
れたデータ、即ち、復号されたPピクチャのデータは、
演算器85に後に入力される画像データ(Bピクチャま
たはPピクチャのデータ)の予測画像データ生成のため
に、フレームメモリ86の後方予測画像部86bに供給
されて記憶される。
When the image data supplied from the IDCT circuit 84 is P picture data in which the image data one frame before is the predicted image data and is the data in the forward prediction mode, the forward prediction of the frame memory 86 is performed. The image data of one frame before (image data of I picture) stored in the image portion 86a is read out, and the motion compensation circuit 8
At 7, motion compensation corresponding to the motion vector output from the variable length decoding circuit 82 is performed. Then, in the calculator 85, the image data (difference data) supplied from the IDCT circuit 84 is added and output. The added data, that is, the decoded P picture data is
In order to generate predictive image data of image data (B-picture or P-picture data) input later to the calculator 85, it is supplied and stored in the backward predictive image section 86b of the frame memory 86.

【0067】Pピクチャのデータであっても、画像内予
測モードのデータは、Iピクチャのデータと同様に、演
算器85で特に処理は行わず、そのまま後方予測画像部
86bに記憶される。このPピクチャは、次のBピクチ
ャの次に表示されるべき画像であるため、この時点で
は、まだフォーマット変換回路32へ出力されない(上
述したように、Bピクチャの後に入力されたPピクチャ
が、Bピクチャより先に処理され、伝送されている)。
Even in the case of P-picture data, the intra-picture prediction mode data is stored in the backward-prediction image section 86b as it is without any special processing by the calculator 85, like the I-picture data. Since this P picture is an image to be displayed next to the next B picture, it is not yet output to the format conversion circuit 32 at this point (as described above, the P picture input after the B picture is Processed and transmitted prior to B-pictures).

【0068】IDCT回路84より供給された画像デー
タが、Bピクチャのデータである場合、可変長復号化回
路82より供給された予測モードに対応して、フレーム
メモリ86の前方予測画像部86aに記憶されているI
ピクチャの画像データ(前方予測モードの場合)、後方
予測画像部86bに記憶されているPピクチャの画像デ
ータ(後方予測モードの場合)、または、その両方の画
像データ(両方向予測モードの場合)が読み出され、動
き補償回路87において、可変長復号化回路82より出
力された動きベクトルに対応する動き補償が施されて、
予測画像が生成される。但し、動き補償を必要としない
場合(画像内予測モードの場合)、予測画像は生成され
ない。
When the image data supplied from the IDCT circuit 84 is B picture data, it is stored in the forward predicted image portion 86a of the frame memory 86 in accordance with the prediction mode supplied from the variable length decoding circuit 82. Has been I
The image data of the picture (in the case of the forward prediction mode), the image data of the P picture stored in the backward prediction image portion 86b (in the case of the backward prediction mode), or both image data (in the case of bidirectional prediction mode) The motion compensation circuit 87 reads out and performs motion compensation corresponding to the motion vector output from the variable length decoding circuit 82,
A predicted image is generated. However, when motion compensation is not required (in the case of the intra-picture prediction mode), the predicted picture is not generated.

【0069】このようにして、動き補償回路87で動き
補償が施されたデータは、演算器85において、IDC
T回路84の出力と加算される。この加算出力は、フォ
ーマット変換回路32に出力される。但し、この加算出
力はBピクチャのデータであり、他の画像の予測画像生
成のために利用されることがないため、フレームメモリ
86には記憶されない。
The data thus motion-compensated by the motion compensating circuit 87 is sent to the calculator 85 for IDC.
It is added to the output of the T circuit 84. This addition output is output to the format conversion circuit 32. However, since this addition output is B picture data and is not used for generating a predicted image of another image, it is not stored in the frame memory 86.

【0070】Bピクチャの画像が出力された後、後方予
測画像部86bに記憶されているPピクチャの画像デー
タが読み出され、動き補償回路87を介して演算器85
に供給される。但し、このとき、動き補償は行われな
い。
After the B picture image is output, the P picture image data stored in the backward prediction image section 86b is read out, and the arithmetic unit 85 is passed through the motion compensation circuit 87.
Is supplied to. However, at this time, motion compensation is not performed.

【0071】尚、このデコーダ31には、図9のエンコ
ーダ18における予測モード切り換え回路52とDCT
モード切り換え回路55に対応する回路が図示されてい
ないが、これらの回路に対応する処理、即ち、奇数フィ
ールドと偶数フィールドのラインの信号が分離された構
成を、元の混在する構成に必要に応じて戻す処理は、動
き補償回路87が実行する。
The decoder 31 includes a prediction mode switching circuit 52 and a DCT in the encoder 18 of FIG.
Although the circuits corresponding to the mode switching circuit 55 are not shown, the processing corresponding to these circuits, that is, the configuration in which the signals of the lines in the odd field and the even field are separated is necessary for the original mixed configuration. The motion compensation circuit 87 executes the process of returning.

【0072】また、以上においては、輝度信号の処理に
ついて説明したが、色差信号の処理も同様に行われる。
但し、この場合、動きベクトルは、輝度信号用のもの
を、垂直方向および水平方向に1/2にしたものが用い
られる。
Although the processing of the luminance signal has been described above, the processing of the color difference signal is also performed in the same manner.
However, in this case, the motion vector used for the luminance signal is halved in the vertical and horizontal directions.

【0073】図13に、上記MPEG方式中のMPEG
1方式での1画像(ピクチャ)のデータのフォーマット
を示す。ここで、画像の単位をフレームとして説明する
が、インターレース画像についてはフィールドを画像の
単位としてもよい。
FIG. 13 shows the MPEG in the MPEG system.
The format of data of one image (picture) in one system is shown. Here, although the image unit is described as a frame, a field may be used as an image unit for an interlaced image.

【0074】図13の(a)に示すビデオシーケンス層
は、画像サイズや画像レート等が同じである1つ又は複
数の図13の(b)に示すグループオブピクチャ層から
構成される。このグループオブピクチャ層は図13の
(c)に示すようであり、1枚又は複数枚のIピクチャ
と、0枚又は複数枚のIピクチャ以外のピクチャ、すな
わちPピクチャ及び/又はBピクチャとから構成され
る。このIピクチャ、Pピクチャ及びBピクチャは、上
述のように符号化方式に伴って分類される。また、この
ピクチャ層は、図13の(d)に示すような、少なくと
も1つ又は複数のスライス層から構成される。
The video sequence layer shown in FIG. 13 (a) is composed of one or a plurality of group of picture layers shown in FIG. 13 (b) having the same image size and image rate. This group of picture layer is as shown in (c) of FIG. 13, and is composed of one or a plurality of I pictures and 0 or a plurality of pictures other than I pictures, that is, P pictures and / or B pictures. Composed. The I picture, P picture, and B picture are classified according to the encoding method as described above. The picture layer is composed of at least one or a plurality of slice layers as shown in (d) of FIG.

【0075】上記スライス層は、図13の(e)に示す
ピクチャ内の走査順に連なる1つ又は複数のマクロブロ
ックで構成される。このスライスの先頭では、最初のマ
クロブロックは画像内での位置を示すデータを持ってお
り、エラーが起こった場合でも画像データを復帰するこ
とができるように考えられている。そのため、スライス
の長さ及び開始位置は任意であり、伝送路のエラー状態
によって変更できるようになっている。
The slice layer is composed of one or a plurality of macroblocks which are continuous in the scanning order within the picture shown in FIG. At the beginning of this slice, the first macroblock has data indicating its position in the image, and it is thought that the image data can be restored even if an error occurs. Therefore, the slice length and start position are arbitrary and can be changed according to the error state of the transmission path.

【0076】また、図13の(f)に示す、上記マクロ
ブロック層の各マクロブロックは、例えば画像信号が
4:2:0コンポーネント信号である場合、左右及び上
下に隣あった4つの輝度ブロックと、画像上では同じ位
置にあたるCb 、Cr それぞれの色差ブロックの全部で
6つのブロックから構成される。上記それぞれのブロッ
クの伝送の順は、Y0、Y1、Y2、Y3、Cb、Cr
である。動き補償モードにどのブロックを用いるか、予
測誤差を送るか否か等の判断は、このマクロブロック単
位で行われる。このブロック層は、輝度または色差の隣
あった例えば8ライン×8画素から構成され、例えばD
CT(Discrete Cosine Transform )変換はこのブロッ
ク単位で行われる。
Further, each macroblock of the macroblock layer shown in FIG. 13 (f) has four luminance blocks adjacent to each other in the left, right, top and bottom when the image signal is a 4: 2: 0 component signal, for example. The color difference blocks Cb and Cr corresponding to the same position on the image are composed of a total of six blocks. The order of transmission of each block is Y0, Y1, Y2, Y3, Cb, Cr.
Is. The determination of which block to use in the motion compensation mode, whether to send a prediction error, or the like is made in units of this macroblock. This block layer is composed of, for example, 8 lines × 8 pixels adjacent to each other in luminance or color difference, and is, for example, D
CT (Discrete Cosine Transform) conversion is performed in this block unit.

【0077】尚、上記スライスの先頭に付加されるスタ
ートコードのビットパターンは、ビットストリーム中の
み発生され、それ以外では発生が禁止されている独特
(ユニーク)なコードであるため、伝送路内でエラーが
起こった場合には、スライス単位での画像データの復帰
が可能となる。このスタートコードは32ビットのコー
ドで表され、16進数表示では、24ビットの“000
001”のコードと、この24ビットのコードに続く、
スタートコードの種類を識別する8ビットのコードとの
組合せである。
Since the bit pattern of the start code added to the head of the slice is a unique code that is generated only in the bit stream and is prohibited from being generated in other bits, it is not possible to use it in the transmission path. When an error occurs, image data can be restored in slice units. This start code is represented by a 32-bit code. In hexadecimal notation, 24-bit "000" is displayed.
001 ”code and this 24-bit code,
It is a combination with an 8-bit code that identifies the type of start code.

【0078】表1に、それぞれのスタートコードの種類
を示す。
Table 1 shows the type of each start code.

【0079】[0079]

【表1】 [Table 1]

【0080】このスタートコードは、32ビットのコー
ド中の下位8ビットで区別され、その識別コードは、1
6進数表示で、00からFFまでの値をもつ。ここで、
32ビットで示される"slice_start _codes"の下位8
ビットは、上記スライスの画像上での垂直位置を表す。
例えば、1画像の画枠の縦のサイズが480ラインであ
る場合、スライスの垂直位置は、1から30(=480/16)
までの値をとる。上記MPEG1方式では、このスライ
スの垂直位置の値は1から175(16進数表示で、0
1〜AF)まで用意されているから、画枠の縦のサイズ
が2800( =175 ×16) ラインまでのスライスの垂直
位置を表示することが可能である。
This start code is distinguished by the lower 8 bits in the 32-bit code, and its identification code is 1
It is a hexadecimal number and has a value from 00 to FF. here,
Lower 8 of "slice_start_codes" indicated by 32 bits
The bit represents the vertical position of the slice on the image.
For example, when the vertical size of the image frame of one image is 480 lines, the vertical position of the slice is 1 to 30 (= 480/16).
Takes a value up to. In the MPEG1 system, the value of the vertical position of this slice is 1 to 175 (0 in hexadecimal notation).
1 to AF) are prepared, it is possible to display the vertical position of the slice up to 2800 (= 175 × 16) lines in the vertical size of the image frame.

【0081】上記スライスの垂直位置の値は、上記画像
復号化装置において、受信したスタートコードがスライ
スであるか否を識別するための識別コードになってい
る。即ち、上記画像復号化装置では、受信したスタート
コードの下位8ビットが16進数表示で01〜AFであ
る場合には、次に続く情報がスライス層のものであるこ
とを認識することができる。
The value of the vertical position of the slice serves as an identification code for identifying whether or not the received start code is a slice in the image decoding apparatus. That is, in the image decoding apparatus, when the lower 8 bits of the received start code are 01 to AF in hexadecimal notation, it is possible to recognize that the information that follows is of the slice layer.

【0082】[0082]

【発明が解決しようとする課題】ところで、図14に示
すように、画像内符号化を行うときの単位領域は、フレ
ームもしくはフィールド等の画面全体ではなく、さらに
小さい領域を単位領域として用いる場合がある。この場
合には、その領域には、フレーム内もしくはフィールド
内符号化、及びフレーム内もしくはフィールド内復号化
が施される。このとき、この領域がPピクチャもしくは
Bピクチャ内に存在する場合には、Pピクチャもしくは
Bピクチャに応じた符号化及び復号化方法を用いる必要
がある。
By the way, as shown in FIG. 14, the unit area for intra-picture coding is not the entire screen such as a frame or field, but a smaller area may be used as the unit area. is there. In this case, the area is subjected to intra-frame or intra-field coding and intra-frame or intra-field decoding. At this time, when this area exists in the P picture or the B picture, it is necessary to use the encoding and decoding method according to the P picture or the B picture.

【0083】よって、このPピクチャもしくはBピクチ
ャに応じてフレーム内もしくはフィールド内符号化及び
復号化方法を用いる必要がある領域は、実質的にはIピ
クチャの一部分と見なすことができるにもかかわらず、
Iピクチャにおける符号化及び復号化方法を用いること
はできずに、PピクチャもしくはBピクチャにおける符
号化及び復号化方法を用いるため、冗長な符号化及び復
号化を行うことになる。
Therefore, the area in which the intra-frame or intra-field encoding and decoding method needs to be used according to the P picture or the B picture can be regarded as a part of the I picture substantially. ,
Since the encoding / decoding method for the I picture cannot be used and the encoding / decoding method for the P picture or B picture is used, redundant encoding / decoding is performed.

【0084】また、上記MPEG方式では、スライスの
同期をとるために特別なコードが設定されている。MP
EG1方式では、このコードは、表1に示すようにスタ
ートコードとして定義されている。このスタートコード
の位置は、同期をとりやすいように、8ビット毎の区切
りの位置に決められているため、このスタートコードの
前には任意の数の0を入れることができる。従って、バ
ッファが空きになることを防ぐために、このスタートコ
ード内の表1に slice start codes で示されるスラ
イススタートコードの前に非常に多くの数の0を入れる
ため、従来では、スライススタートコードの内の最後の
8ビットが全て0で終わることを禁止し、連続する0を
8ビットおきに検出することにより、その8ビットがス
ライススタートコードに含まれるか否かを判別する方法
がある。
In the MPEG system, a special code is set to synchronize slices. MP
In the EG1 system, this code is defined as a start code as shown in Table 1. Since the position of this start code is determined to be a position of every 8 bits for easy synchronization, an arbitrary number of 0's can be inserted before this start code. Therefore, to prevent the buffer from becoming empty, slice 1 start Since a very large number of 0's are inserted before the slice start code indicated by codes, conventionally, it is prohibited to end the last 8 bits of the slice start code with all 0s, and consecutive 0s are 8 bits. There is a method of determining whether or not the 8 bits are included in the slice start code by detecting every 8 bits.

【0085】しかし、上述のような方法では、検出して
いる連続した8ビットのコードが上記スライススタート
コードに含まれるか否かを判別することはできるが、ス
ライススタートコードの32ビット中のどの部分である
かを特定することはできないので、スライススタートコ
ードの開始位置を特定することはできない。
However, according to the method as described above, it is possible to judge whether or not the detected continuous 8-bit code is included in the slice start code. Since it is not possible to specify whether it is a part, it is not possible to specify the start position of the slice start code.

【0086】さらに、上記画像内符号化、すなわちフレ
ーム内もしくはフィールド内符号化が行われた領域では
画像間予測符号化を行っていないため、原理的には、フ
レーム内もしくはフィールド内の画像データのみで復号
化を行うことができるはずである。しかし、上記MPE
G1方式では、上述のような画像間予測符号化を行わ
ず、フレーム内もしくはフィールド内符号化が行われた
領域の画像データを復号するために必要な情報が、その
領域のヘッダ中に存在しないので、上記フレーム内もし
くはフィールド内符号化が行われた領域の画像データを
復号することができない。
Furthermore, since intra-picture predictive coding is not performed in the area where the above-mentioned intra-picture coding, that is, intra-frame or intra-field coding, is performed, in principle, only image data within a frame or within a field. You should be able to decrypt with. However, the above MPE
In the G1 system, the above-mentioned inter-picture predictive coding is not performed, and the information necessary for decoding the image data of the area in which the intra-frame or intra-field coding is performed does not exist in the header of the area. Therefore, it is not possible to decode the image data in the area in which the intra-frame or intra-field coding is performed.

【0087】[0087]

【課題を解決するための手段】本発明の複数の画素から
成るマクロブロック単位で画像信号データを符号化する
際に選択される符号化モードとして、少なくとも画像内
符号化モードを含む画像信号符号化方法において、上記
マクロブロックを複数個配列して成るスライス毎に、画
像内符号化モードとするか否かを判別するためのフラグ
を付加することを特徴とする。
According to the present invention, an image signal coding including at least an intra-picture coding mode is selected as a coding mode selected when coding image signal data in units of a macroblock composed of a plurality of pixels. In the method, a flag for determining whether or not the intra-picture coding mode is set is added to each slice formed by arranging a plurality of the macroblocks.

【0088】また、上記スライスの先頭を示すスライス
スタートコードの最下位ビットを用いて上記フラグを付
加することを特徴とする。
The flag is added by using the least significant bit of the slice start code indicating the head of the slice.

【0089】さらに、1枚の画像であるピクチャ毎に符
号化される方式に従って複数のピクチャタイプに分類さ
れ、上記ピクチャタイプとして、少なくとも画像内符号
化ピクチャと画像間予測符号化ピクチャとを含み、上記
画像内符号化ピクチャでは上記マクロブロック毎の符号
化に関する情報を表すマクロブロックタイプを所定の可
変長符号で符号化し、画像間予測符号化ピクチャではマ
クロブロックタイプを他の可変長符号で符号化する画像
信号符号化方法において、上記画像内符号化として示さ
れたスライス内の全マクロブロックタイプを上記所定の
可変長符号で符号化を行い、上記フラグを付加されたス
ライス毎に、当該スライスを復号するための情報を付加
することを特徴とする。
Further, each picture which is one image is classified into a plurality of picture types according to a coding method, and the picture types include at least an intra-picture coded picture and an inter-picture predictive coded picture, In the intra-picture coded picture, the macroblock type representing the information regarding the coding for each macroblock is coded by a predetermined variable length code, and in the inter-picture predictive coded picture, the macroblock type is coded by another variable length code. In the image signal coding method, the whole macroblock type in the slice shown as the intra-picture coding is coded by the predetermined variable length code, and for each slice to which the flag is added, the slice is It is characterized by adding information for decoding.

【0090】上記複数の画素から成るマクロブロック単
位で画像信号データを符号化する際に選択される符号化
モードとして、少なくとも画像内符号化モードを含む画
像信号符号化方法を用いる画像信号符号化装置において
は、上記マクロブロックを複数個配列して成るスライス
毎に、画像内符号化モードとするか否かを判別するため
のフラグを付加する制御部を設けて成ることを特徴とす
る。
An image signal coding apparatus that uses an image signal coding method including at least an intra-picture coding mode as a coding mode selected when coding image signal data in units of macroblocks composed of a plurality of pixels. In the above, a control unit for adding a flag for determining whether or not the intra-picture coding mode is set is provided for each slice formed by arranging the plurality of macroblocks.

【0091】また、複数の画素から成るマクロブロック
単位で画像信号データを符号化する際に選択される符号
化モードとして、少なくとも画像内符号化モードを含む
画像信号符号化方法において、上記マクロブロックを複
数個配列して成るスライス毎に、画像内符号化モードと
するか否かを判別するためのフラグを検出したスライス
単位で画像内復号化を行い、上記スライスの先頭を示す
スライススタートコードの最下位ビットを用いて上記フ
ラグを付加し、上記スライススタートコードの前に連続
して存在するゼロ列を検出する際に、このゼロを8ビッ
トおきに検出することにより、上記スライススタートコ
ードの先頭を検出し、上記フラグを付加されたスライス
毎に、当該スライスを復号するための情報を用いて復号
化を行うことを特徴とする。
Further, in the image signal coding method including at least the intra-picture coding mode as the coding mode selected when the image signal data is coded in the macro block unit composed of a plurality of pixels, For each slice formed by arranging multiple images, intra-picture decoding is performed for each slice in which a flag for determining whether to use the intra-picture coding mode is detected, and the maximum of the slice start code indicating the beginning of the slice is The flag is added by using the lower bits, and when detecting a series of zeros that continuously exist before the slice start code, the zeros are detected every 8 bits to detect the beginning of the slice start code. For each slice to which the above flag has been detected and added, decoding is performed using information for decoding the slice. To.

【0092】さらに、複数の画素から成るマクロブロッ
ク単位で画像信号データを符号化する際に選択される符
号化モードとして、少なくとも画像内符号化モードを含
む画像信号符号化方法を用いる画像信号復号化装置にお
いては、上記マクロブロックを複数個配列して成るスラ
イス毎に、画像内符号化モードとするか否かを判別する
ためのフラグを検出したスライス単位で画像内復号化を
行うことを特徴とする。
Further, the image signal decoding using the image signal encoding method including at least the intra-image encoding mode as the encoding mode selected when encoding the image signal data in units of macroblocks composed of a plurality of pixels The apparatus is characterized by performing intra-picture decoding for each slice formed by arranging a plurality of the macro blocks, in units of slices in which a flag for determining whether or not the intra-picture coding mode is set is detected. To do.

【0093】ここで、上記所定の可変長符号とはIピク
チャのマクロブロックタイプを示す可変長符号化コード
のことを示し、上記他の可変長符号とはPピクチャ及び
Bピクチャのマクロブロックタイプを示す可変長符号化
コードのことを示すものである。
Here, the predetermined variable length code means a variable length coding code indicating the macroblock type of I picture, and the other variable length code means the macroblock type of P picture and B picture. It shows the variable length code shown.

【0094】[0094]

【作用】本発明においては、フレーム内もしくはフィー
ルド内符号化されているか否かを判別するフラグを用い
ることにより、発生する可変長符号化コードのビット数
を低減することができる。
In the present invention, it is possible to reduce the number of bits of the generated variable length code by using the flag for determining whether or not the frame or field is coded.

【0095】また、上記フラグをスライススタートコー
ドの最下位ビットに付加するため、上記スライススター
トコードの開始位置を特定することができる。
Since the flag is added to the least significant bit of the slice start code, the start position of the slice start code can be specified.

【0096】さらに、上記フラグを用いることにより、
画像内符号化が行われたスライスでは、そのスライスヘ
ッダ内に付加された情報のみで、上記画像内符号化が行
われたスライスの画像データを復号することができる。
Furthermore, by using the above flag,
For a slice that has been intra-coded, the image data of the slice that has been intra-coded can be decoded only with the information added in the slice header.

【0097】[0097]

【実施例】先ず、本発明の画像信号符号化方法の好まし
い実施例について説明する。マクロブロックを複数個配
列して成るスライス毎に、画像内符号化モードであるか
否かを判別するフラグを付加し、Iピクチャによる画像
間符号化モード内に存在する画像内符号化モードで符号
化されたマクロブロックの可変長符号化コードのビット
数を低減する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, a preferred embodiment of the image signal coding method of the present invention will be described. A flag for determining whether or not the intra-picture coding mode is set is added to each slice formed by arranging a plurality of macroblocks, and coding is performed in the intra-picture coding mode existing in the inter-picture coding mode by the I picture. The number of bits of the variable length code of the converted macroblock is reduced.

【0098】また、上記フラグをstructure flagとし
て、上記スライスの先頭を示すスライススタートコード
の最下位ビットに用いて示し、画像信号復号化するとき
には上記フラグstructure flagによりスライススター
トコードの開始位置を検出する。
Also, the above flag is set to structure As a flag, it is shown by using the least significant bit of the slice start code that indicates the beginning of the slice, and the above flag structure The start position of the slice start code is detected by flag.

【0099】さらに、上記スライスヘッダ内に、スライ
ス全体が画像内符号化、即ちフレーム内もしくはフィー
ルド内符号化で符号化されるときには、例えばビデオシ
ーケンスヘッダ内の Intra quantizer matrix、ピク
チャ層内の Picture structure 、Interlaced progre
ssive flag、 Intra dc precision 及びQscale type
等をスライス層内に重複してもつ。この後、上記符号化
されたデータを復号化するときには、上記フラグstruct
ure flagにより示されたスライスは画像内符号化され
ていることが判別されるため、もし、スライス層よりも
上位の階層のデータが存在しない場合にも、上記各フラ
グの情報に基づいてIピクチャにおける符号化を行う。
上記各フラグについての詳細な説明は後述する。
In addition, the slice header is set in the slice header.
The entire frame is intra-coded, i.e.
When coded with intra-field coding, for example, video
Intra in sequence header quantizer matrix, pic
Picture in Cha layer structure, Interlaced progre
ssive flag, Intra dc precision and Qscale type
Etc. are duplicated in the slice layer. After this, the above encoding
The above flag struct
ure The slice indicated by flag is intra-coded
If the slice layer is
Even if there is no upper layer data,
The I-picture is encoded based on the information of the group.
A detailed description of each flag will be given later.

【0100】次に、本発明に係る符号化装置の一実施例
の構成図を図1に示す。本発明における基本的な符号化
方法は上記MPEG方式による符号化方法と同じであ
る。
Next, FIG. 1 shows a block diagram of an embodiment of an encoding apparatus according to the present invention. The basic encoding method in the present invention is the same as the encoding method based on the MPEG method.

【0101】本符号化装置の基本的な動作を制御するた
めの画枠サイズ、符号化情報の出力ビットレート、動き
予測補償方法等の情報は、メモリ118に記憶されてい
る。これらの情報は、信号S25として出力される。符
号化される動画像は、画像入力端子110より入力され
る。入力された画像信号はフィールドメモリ群111へ
供給される。このフイールドメモリ群111からは、現
在符号化を行う対象のブロック画素信号S1が、ハイブ
リッド符号化器112に供給される。
Information such as an image frame size for controlling the basic operation of the present encoding device, an output bit rate of encoded information, and a motion prediction / compensation method is stored in the memory 118. These pieces of information are output as the signal S25. The moving image to be encoded is input from the image input terminal 110. The input image signal is supplied to the field memory group 111. From the field memory group 111, the block pixel signal S1 to be currently encoded is supplied to the hybrid encoder 112.

【0102】このハイブリッド符号化器112では、動
画像の高能率符号化方式として動き補償予測符号化とD
CT等の変換符号化を組み合わせたハイブリッド(hybri
d)符号化を行う。このハイブリッド符号化器112から
出力されるデータS2は、VLC(可変長符号化)器1
13でハフマン符号などに可変長符号化され、バッファ
メモリ114に蓄積された後、出力端子15からビット
ストリームとして一定の伝送レートで送出される。
In this hybrid encoder 112, motion compensation predictive coding and D
Hybrid that combines transform coding such as CT
d) Encode. The data S2 output from the hybrid encoder 112 is the VLC (variable length encoder) 1
At 13, variable-length coding such as Huffman coding is performed, and after being accumulated in the buffer memory 114, it is sent from the output terminal 15 as a bit stream at a constant transmission rate.

【0103】上記ビットストリームは、上述のように6
つの層、即ちビデオシーケンス層、グループオブピクチ
ャ層、ピクチャ層、スライス層、マクロブロック層、ブ
ロック層の各層から構成される。これらの層中でビデオ
シーケンス層、グループオブピクチャ層、ピクチャ層、
スライス層の各層には、先頭にそれらの層の開始を示す
スタートコードを付加し、その後にヘッダ情報を伝送す
る。また、それぞれのスタートコードを伝送するタイミ
ングは、それぞれビデオシーケンススタートフラグS2
0,グループオブピクチャスタートフラグS21,ピク
チャスタートフラグS22,スライススタートフラグS
23が立てられた時である。上記各スタートフラグ中で
ビデオシーケンススタートフラグS20、グループオブ
ピクチャスタートフラグS21及びピクチャスタートフ
ラグS22は、ピクチャカウンタ116から出力され、
スライススタートフラグS23はマクロブロックカウン
タ117から出力される。
The above bitstream has 6 bits as described above.
It is composed of three layers, namely, a video sequence layer, a group of picture layer, a picture layer, a slice layer, a macroblock layer and a block layer. Among these layers are video sequence layer, group of picture layer, picture layer,
A start code indicating the start of each of the slice layers is added to the head of the slice layer, and then the header information is transmitted. The timing of transmitting each start code is the same as the video sequence start flag S2.
0, group of picture start flag S21, picture start flag S22, slice start flag S
It is when 23 was set up. The video sequence start flag S20, the group of picture start flag S21, and the picture start flag S22 among the above start flags are output from the picture counter 116,
The slice start flag S23 is output from the macroblock counter 117.

【0104】上記ピクチャカウンタ116は、現在、フ
ィールドメモリ群111から読み出されて符号化が行わ
れる対象画像(ピクチャ)の先頭を検出して出力される
信号S30に同期して、その数をカウントする。また、
このピクチャカウンタ116においてビデオシーケンス
層の符号化が開始されるときには、このピクチャカウン
タ116はリセットされ、同時に、上記ビデオシーケン
ススタートフラグS20が立てられる。また、上記ピク
チャスタートフラグS22は、上記ピクチャカウンタ1
16が信号S30を受信するときに立てられ、上記グル
ープオブピクチャスタートフラグS21は、ピクチャカ
ウンタ116によりカウントされた数が予め決められた
グループオブピクチャ長、即ちグループオブピクチャを
作るピクチャの数の倍数になるときに立てられる。この
グループオブピクチャ長は、普通は、例えば12フレー
ム又は15フレームであり、このループオブピクチャ長
の情報は、現在符号を行っている画像の符号化のための
制御情報が記憶されているメモリ118に記憶されてい
る。
The picture counter 116 counts the number of the target images (pictures) currently read from the field memory group 111 and encoded and is synchronized with the signal S30 output. To do. Also,
When the coding of the video sequence layer is started in the picture counter 116, the picture counter 116 is reset, and at the same time, the video sequence start flag S20 is set. The picture start flag S22 is set to the picture counter 1
16 is set when receiving the signal S30, and the group of picture start flag S21 is a multiple of the number of pictures counted by the picture counter 116, that is, a predetermined group of picture length, that is, the number of pictures forming the group of picture. Is set up when it becomes. The group-of-picture length is usually, for example, 12 frames or 15 frames, and the loop-of-picture length information is stored in the memory 118 in which control information for encoding the image currently being encoded is stored. Remembered in.

【0105】上記マクロブロックカウンタ117は、現
在、フィールドメモリ群111から読み出されて符号化
が行われる対象マクロブロックの先頭を検出して出力さ
れる信号S31に同期して、その数をカウントする。マ
クロブロックカウンタ117は、上記信号S30を受信
したときにリセットされる。また、上記スライススター
トフラグS23は、上記マクロブロックカウンタ117
によりカウントされた数が予め決められたスライス長、
即ちスライスを作るマクロブロックの数の倍数になると
立てられる。このスライス長は、伝送路内での上記ビッ
トストリームの伝送中に発生するエラーの状態によって
変更できる。一般的には、上記伝送中のエラーの確率が
高い場合ほど、上記スライス長は短くなる。このときの
指定されるスライス長はメモリ118に記憶されてい
る。
The macroblock counter 117 counts the number of the target macroblocks currently read out from the field memory group 111 and encoded, in synchronization with the signal S31 outputted. . The macroblock counter 117 is reset when the signal S30 is received. Further, the slice start flag S23 is set to the macro block counter 117.
The slice length is a predetermined slice length,
That is, it is set to be a multiple of the number of macroblocks that make up a slice. This slice length can be changed according to the state of an error that occurs during transmission of the bit stream in the transmission path. Generally, the higher the probability of error during transmission, the shorter the slice length. The designated slice length at this time is stored in the memory 118.

【0106】上記ビデオシーケンススタートフラグS2
0、グループオブピクチャスタートフラグS21、ピク
チャスタートフラグS22、スライススタートフラグS
23の内のいずれかのフラグが立つことにより、上記V
LC(可変長符号化)器113は、それぞれの層のスタ
ートコードを出力する。そして、メモリ118内に記憶
されている各層のデータを符号化するための制御情報を
ヘッダ情報としてVLC器113から出力する。
Video sequence start flag S2
0, group of picture start flag S21, picture start flag S22, slice start flag S
When any one of the flags 23 is set, the above V
The LC (variable length coding) unit 113 outputs the start code of each layer. Then, the control information for encoding the data of each layer stored in the memory 118 is output from the VLC unit 113 as header information.

【0107】スライスヘッダを出力する際のビットスト
リームのシンタックスについて、その詳細を説明する。
表2に、本実施例におけるスライス層のスライスヘッダ
のシンタックスを示す。
The details of the bitstream syntax when outputting the slice header will be described.
Table 2 shows the syntax of the slice header of the slice layer in this embodiment.

【0108】[0108]

【表2】 [Table 2]

【0109】このスライスヘッダでは、画像上のスライ
スの垂直位置を伝送する。このスライス垂直位置は、
(1)式により計算される。 slice _vertical_position = mb _address/mb_width +1 ...(1)
In this slice header, the vertical position of the slice on the image is transmitted. This slice vertical position is
It is calculated by the equation (1). slice _vertical_position = mb _address / mb_width +1. . . (1)

【0110】この(1)式内のmb_address は、上記マ
クロブロックカウンタ117でカウントされる数であ
る。なお、画像内の最初のマクロブロックでは、このmb
_address の値は0である。また、mb_width は、画像
の画枠の横一列に入るマクロブロックの個数であり、例
えば画枠の横サイズが720画素である場合には、mb_
width の値は45(=720/16)となる。スライス
垂直位置計算回路119において、(1)式により計算
されたスライスの垂直位置の値は、出力フォーマット変
換器120に入力される。この出力フォーマット変換器
120では、上記計算されたスライスの垂直位置の値
は、画像の画枠の縦サイズの値であるS26により、必
要に応じて出力フォーマット変換が行われる。
Mb_address in the equation (1) is the number counted by the macroblock counter 117. In the first macro block in the image, this mb
The value of _address is 0. In addition, mb_width is the number of macroblocks in a horizontal row of the image frame of the image. For example, when the horizontal size of the image frame is 720 pixels, mb_width
The value of width is 45 (= 720/16). The slice vertical position calculation circuit 119 inputs the value of the vertical position of the slice calculated by the equation (1) to the output format converter 120. In the output format converter 120, the value of the calculated vertical position of the slice is subjected to S26, which is the value of the vertical size of the image frame of the image, to perform the output format conversion as necessary.

【0111】次に、上述の画像信号符号化装置に対応す
る画像信号復号化装置について図2に基づいて説明す
る。
Next, an image signal decoding device corresponding to the above-mentioned image signal encoding device will be described with reference to FIG.

【0112】入力端子130からの入力ビットストリー
ム信号は、バッファメモリ131に蓄積された後、逆V
LC(可変長符号化)器132に供給される。このビッ
トストリームは、上述のように6つの層、即ちビデオシ
ーケンス層、グループオブピクチャ層、ピクチャ層、ス
ライス層、マクロブロック層、ブロック層の各層から構
成される。逆VLC器132は、このビデオシーケンス
層、グループオブピクチャ層、ピクチャ層、スライス層
の各層の先頭に開始位置を示すスタートコードを受信
し、それぞれの層のヘッダ情報を復号化し、得られた画
像復号化のための制御情報をメモリ136に記憶する。
これらの情報は、S104として出力される。その後
に、画像の復号化処理を制御するヘッダ情報を受信す
る。
The input bitstream signal from the input terminal 130 is stored in the buffer memory 131 and then inverted V
It is supplied to an LC (variable length coding) unit 132. As described above, this bit stream is composed of six layers, that is, a video sequence layer, a group of pictures layer, a picture layer, a slice layer, a macroblock layer, and a block layer. The inverse VLC unit 132 receives the start code indicating the start position at the beginning of each of the video sequence layer, the group of picture layer, the picture layer, and the slice layer, decodes the header information of each layer, and obtains the obtained image. The control information for decoding is stored in the memory 136.
These pieces of information are output as S104. After that, the header information that controls the image decoding process is received.

【0113】ここで、スライスヘッダを復号した際に得
られる、現在のスライスの画像上での垂直位置の値の復
号方法について以下に説明する。
Here, a method of decoding the value of the vertical position on the image of the current slice, which is obtained when the slice header is decoded, will be described below.

【0114】このスライスの垂直位置の値S70の復元
は、スライス垂直位置復元器134で行われる。この値
S70の復元方法は、画像の画枠の縦サイズの値S60
により異なる。この画像の画枠の縦サイズの値S60は
ピクチャヘッダ情報を復号した際に得られ、メモリ13
6に記憶される。
The slice vertical position restoring unit 134 restores the slice vertical position value S70. The restoration method of this value S70 is performed by using the value S60 of the vertical size of the image frame
Depends on The vertical size value S60 of the image frame of this image is obtained when the picture header information is decoded, and is stored in the memory 13
6 is stored.

【0115】上記スライス層の次には、マクロブロック
層のデータ信号S80が受信され、ハイブリッド復号化
器133に供給される。このハイブリッド復号化器13
3では、動画像の高能率符号化方式として、動き補償と
逆DCT等の変換符号化を組み合わせたハイブリッド(h
ybrid)復号化を行う。復号されたマクロブロック層のデ
ータS81は、出力端子135から出力される。
After the slice layer, the macroblock layer data signal S80 is received and supplied to the hybrid decoder 133. This hybrid decoder 13
3 is a high-efficiency coding method for moving images, a hybrid (h) that combines motion compensation and transform coding such as inverse DCT.
ybrid) Decrypt. The decoded macroblock layer data S81 is output from the output terminal 135.

【0116】以上のようにして、ビットストリームデー
タから画像データを復元する。
As described above, the image data is restored from the bit stream data.

【0117】次に、フレーム内もしくはフィールド内符
号化による画像内符号化されたマクロブロックが存在す
るか否かを判別するためのフラグを付加する方法につい
て説明する。
Next, a method of adding a flag for determining whether or not there is an intra-picture coded macroblock by intra-frame or intra-field coding will be described.

【0118】即ち、図14中のPピクチャP2、P5、
P8、P11の各フレーム内のAの斜線で示された領域
は、画像間予測符号化が行われるべきPピクチャ内の一
部であり、複数のマクロブロックから成る領域が画面上
の分散されているときに、この画像内符号化されたマク
ロブロックが存在するか否かを判別するためのフラグを
新たに設ける。
That is, the P pictures P2, P5,
The hatched area A in each frame of P8 and P11 is a part of the P picture in which the inter-picture predictive coding is to be performed, and areas composed of a plurality of macroblocks are dispersed on the screen. When this is present, a flag is newly provided to determine whether or not this intra-picture coded macroblock exists.

【0119】ここで、上記MPEG方式のシンタックス
は階層となっているが、最も下位で同期コードが用いら
れている単位はスライスである。このため、本実施例で
は、スライスヘッダに上記画像内符号化されたマクロブ
ロックが存在するか否かを検出するためのフラグを設け
る。例えば、本実施例では、スライスをマクロブロック
の画面上の1列とし、あるスライスがフレーム内符号化
されたマクロブロックで構成されているか否かを示すフ
ラグを設ける。
Here, the syntax of the MPEG system is hierarchical, but the lowest unit in which the synchronization code is used is a slice. For this reason, in this embodiment, a flag is provided in the slice header for detecting whether or not the intra-coded macroblock exists. For example, in the present embodiment, the slice is one column on the screen of the macroblock, and a flag indicating whether or not a certain slice is composed of intraframe-encoded macroblocks is provided.

【0120】例えば、図14中のPピクチャP2、P
5、P8、P11のフレーム内のAで示された画像内符
号化された領域のスライスには、フレーム内符号化され
たマクロブロックが存在し、Bで示された別のスライス
には、フレーム内符号化されていないマクロブロックが
存在するので、この2種類のスライスを区別するフラグ
Structure flagを設ける。上記フレーム内符号化された
マクロブロックを含むスライスのときには上記フラグに
1をセットし、上記フレーム内符号化されていないマク
ロブロックを含むスライスのときには上記フラグをリセ
ットする。
For example, the P pictures P2 and P in FIG.
In the slice of the intra-picture coded area indicated by A in the frame of P5, P8, and P11, the intra-coded macroblock exists, and in the other slice indicated by B, the frame Since there is a macroblock that has not been intra-coded, a flag that distinguishes these two types of slices
Provide a Structure flag. The flag is set to 1 when the slice includes the intra-frame coded macroblock, and the flag is reset when the slice includes the non-frame-coded macroblock.

【0121】上記フラグに1がセットされているときに
は、このスライスがPピクチャもしくはBピクチャ中に
存在しても、フレーム内符号化されているマクロブロッ
クが存在するので、PピクチャもしくはBピクチャのた
めに用意されている全てのマクロブロックタイプの情報
が必要となるわけではなく、Iピクチャにおけるマクロ
ブロックのタイプだけで充分である。即ち、上記フラグ
に1がセットされているスライス内に限っては、Iピク
チャにおける符号化及び復号化を適用できる。
When the above flag is set to 1, even if this slice exists in a P picture or B picture, there is a macroblock which is intra-frame coded, so that it is a P picture or B picture. It is not necessary to have information on all the macroblock types prepared in 1., the type of macroblock in the I picture is sufficient. That is, the coding and decoding in the I picture can be applied only in the slice in which the flag is set to 1.

【0122】ここで、上記Iピクチャ、Pピクチャ、及
びBピクチャのそれぞれのマクロブロックタイプの可変
長符号化テーブルを表3、表4、表5に示す。
Tables 3, 4, and 5 show variable length coding tables for the macroblock types of the I picture, P picture, and B picture, respectively.

【0123】[0123]

【表3】 [Table 3]

【0124】[0124]

【表4】 [Table 4]

【0125】[0125]

【表5】 [Table 5]

【0126】この表3、表4、表5においては、マクロ
ブロックタイプを示すための量子幅の指定、前方動きベ
クトル、後方動きベクトル、符号化ブロック表示、画像
内ベクトル、コンパチブルマクロブロックの各項目によ
り上記3タイプのピクチャ内のそれぞれのマクロブロッ
クに対する可変長符号化コードを発生する。
In Table 3, Table 4, and Table 5, each item of the designation of the quantum width for indicating the macroblock type, the forward motion vector, the backward motion vector, the coded block display, the intra-image vector, and the compatible macroblock is shown. Generates a variable length coded code for each macroblock in the above three types of pictures.

【0127】表4及び表5に示されるように、Pピクチ
ャもしくはBピクチャ内における、フレーム内符号化マ
クロブロックのタイプは、量子化幅の指定が存在しなけ
れば可変長符号化コードは“00011”となり、量子
化幅の指定が存在すれば可変長符号化コードは“000
001”となる。
As shown in Tables 4 and 5, the type of the intra-frame coding macroblock in the P picture or the B picture is the variable length coding code "00011" unless the quantization width is specified. If the quantization width is specified, the variable length coding code is “000
It becomes 001 ".

【0128】ところが、Iピクチャにおけるマクロブロ
ックのタイプは、量子化幅の指定が存在しなければ
“1”、量子化幅の指定が存在すれば“01”であるの
で、それぞれ4ビットずつ短い。このため、符号化処理
においては、予めフレーム内符号化することがわかって
いるので、Iピクチャにおける符号化及び復号化を適用
すれば、マクロブロックのタイプ毎に、4ビットずつ可
変長符号化コードによるビット数を削減することができ
る。
However, the type of the macroblock in the I picture is "1" if the quantization width is not specified, and is "01" if the quantization width is specified. Therefore, in the encoding process, it is known in advance that the intra-frame encoding is performed. Therefore, if the encoding and the decoding in the I picture are applied, the variable length encoding code is 4 bits for each macro block type. The number of bits due to can be reduced.

【0129】上記フラグは、たとえば、表2に示すよう
に、上記MPEG方式のシンタックスの内部に導入す
る。本発明の実施例による図1の画像信号符号化装置に
おいては、予めフレーム内符号化を行うスライスについ
て画像情報記憶用メモリ18の上記フラグをセットして
おき、そのスライスのヘッダに上記フラグを書き込む。
The above-mentioned flag is introduced inside the syntax of the MPEG system as shown in Table 2, for example. In the image signal encoding apparatus of FIG. 1 according to the embodiment of the present invention, the flag of the image information storage memory 18 is set in advance for a slice to be intra-frame encoded, and the flag is written in the header of the slice. .

【0130】また、本発明の実施例による図2の復号化
装置に入力ビットストリームを復号するとき、上記フラ
グを用いる。まず、スライススタートコードを検出す
る。このスライススタートコードが検出されると、スラ
イスヘッダの所定の位置を復号し、上記フラグStructur
e flagを検出する。このとき、このフラグに1がセット
されているならば、そのスライスヘッダに続くビットス
トリームは、次のスライスのスライスヘッダが検出され
るまで、Iピクチャにおける復号化方法によって復号化
される。
Also, when the input bitstream is decoded by the decoding apparatus of FIG. 2 according to the embodiment of the present invention, the above flag is used. First, the slice start code is detected. When this slice start code is detected, the predetermined position of the slice header is decoded and the above flag Structur
e Detect the flag. At this time, if this flag is set to 1, the bitstream following the slice header is decoded by the decoding method for the I picture until the slice header of the next slice is detected.

【0131】しかし、上記フラグが0であるならば、そ
のスライスヘッダに続くビットストリームは、次のスラ
イスのスライスヘッダが検出されるまで、そのスライス
が属するピクチャにおける復号化方法によって復号化さ
れる。例えば、図2の復号化装置の逆VLC回路132
において復号したフラグの内容を、復号情報記憶用メモ
リ136にセットしておき、その情報を信号S104と
して用いながら復号化を行う。
However, if the flag is 0, the bitstream following the slice header is decoded by the decoding method in the picture to which the slice belongs until the slice header of the next slice is detected. For example, the inverse VLC circuit 132 of the decoding device of FIG.
The contents of the flag decoded in (1) are set in the decoded information storage memory 136, and the decoding is performed using the information as the signal S104.

【0132】次に、32ビットのスライススタートコー
ドの開始位置を特定する方法について説明する。
Next, a method for specifying the start position of the 32-bit slice start code will be described.

【0133】ここでは、スライススタートコードの最下
位ビットをstructure _flagとして用いる。本発明によ
るスライススタートコードと従来のスライススタートコ
ードとを比較する場合、スライスの垂直位置を示す sli
ce vertical positionは1から始まるので、2進数表
示で0000 0000 0000 0000 0000 0001 0000 0001 の値で
表されることは、理論的には起こらない。このため、上
記値をとるコードは禁止する。
Here, the least significant bit of the slice start code is used as structure_flag. When comparing a slice start code according to the present invention with a conventional slice start code, sli indicating the vertical position of the slice
ce vertical Since the position starts from 1, it is theoretically not possible to represent it with a value of 0000 0000 0000 0000 0000 0001 0000 0001 in binary. Therefore, the code that takes the above value is prohibited.

【0134】従って、連続した0000 0001 というコード
は、スタートコードの内の16ビットからのコードであ
ることが特定できる。反対に、連続した0000 0001 以外
の値をとるコードは、スライススタートコードの内の2
4ビットからのコードであることが特定できる。このた
め、8ビットおきに検出する際に、上記検出したコード
の内容から、スタートコードの開始位置を特定すること
ができ、従来に比べて高速な処理を行うことができる。
Therefore, it is possible to specify that the continuous code of 0000 0001 is a code from 16 bits of the start code. On the contrary, the code that takes a value other than consecutive 0000 0001 is 2 of the slice start codes.
It can be specified that the code is from 4 bits. Therefore, when detecting every 8 bits, the start position of the start code can be specified from the content of the detected code, and the processing can be performed faster than in the conventional case.

【0135】具体的には、検出したコードが、連続した
0000 0001 という8ビットのコードであった場合には、
この8ビットのコードに続く次の8ビットがスタートコ
ードの種類を示すことがわかる。また、連続した8ビッ
トのコードの値が0000 0001以外の場合には、その8ビ
ットのコード自身がスタートコードの種類を示すので、
その時点から処理を始めることができる。この処理のフ
ローチャートを図3に示す。
Specifically, the detected codes are consecutive
If it is an 8-bit code of 0000 0001,
It can be seen that the next 8 bits following this 8-bit code indicate the type of start code. If the value of the continuous 8-bit code is other than 0000 0001, the 8-bit code itself indicates the type of start code.
The process can start from that point. A flowchart of this process is shown in FIG.

【0136】図3のステップSP1で上記スライススタ
ートコード中の連続した8ビットのコードを読み出し、
ステップSP2で上記読み出したコードの8ビットが全
て0であるか否かを判別する。全て0であれば、ステッ
プSP3に進んで、次の連続した8ビットのコードを読
み出すが、全て0でなければステップSP12に進ん
で、上記コードを可変長符号化コードとして解析した
後、解析は終了したか否かを判別する。
At step SP1 in FIG. 3, the continuous 8-bit code in the slice start code is read out,
In step SP2, it is determined whether or not all 8 bits of the read code are 0. If all 0s, the process proceeds to step SP3 to read the next continuous 8-bit code. If not all 0s, the process proceeds to step SP12 to analyze the above code as a variable length code, and then to analyze. It is determined whether or not it has ended.

【0137】上記ステップSP3で読み出した連続した
8ビットのコードについても、ステップSP4で全て0
であるか否かを判別し、全て0でなければ上述のように
ステップSP12に進んで、上記コードを可変長符号化
コードとして解析する。
The continuous 8-bit code read in step SP3 is also set to 0 in step SP4.
If it is not all 0, the process proceeds to step SP12 as described above, and the code is analyzed as a variable length code.

【0138】上記ステップSP4で上記読み出した8ビ
ットのコードが全て0であると判別されたならば、ステ
ップSP5に進んで、さらに、次の連続した8ビットの
コードを読み出し、ステップSP6で上記コードが全て
0であるか否かを判別する。全て0なければ、上述のよ
うにステップSP12に進んで、上記コードを可変長符
号化コードとして解析する。
If it is determined in step SP4 that the read 8-bit codes are all 0, the process proceeds to step SP5, the next consecutive 8-bit code is read, and the code is read in step SP6. Are all 0 or not. If they are not all 0, the process proceeds to step SP12 as described above and the above code is analyzed as a variable length code.

【0139】ステップSP6で上記読み出したコードが
全て0であると判別されたときには、ステップSP7に
進んで次の連続した8ビットのコードをスキップする。
この後、次の連続した8ビットのコードがスライススタ
ートコードの下位の8ビットである可能性があるので、
ステップSP8で次の連続した8ビットのコードを読み
出す。この読み出した8ビットのコードを、ステップS
P9において、全て0であるか否かを判別する。
When it is judged at step SP6 that all the read codes are 0, the routine proceeds to step SP7, where the next consecutive 8-bit code is skipped.
After this, the next consecutive 8-bit code may be the lower 8 bits of the slice start code, so
At step SP8, the next consecutive 8-bit code is read. This read 8-bit code is used in step S
In P9, it is determined whether or not all are 0.

【0140】上記8ビットのコードが全て0であるなら
ば、スタートコードを表していないので、ステップSP
7に戻り、さらに次の連続した8ビットのコードを読み
出す。また、上記8ビットのコードが0000 0001 である
ならば、次の連続した8ビットのコードがスタートコー
ドを表すコードであるため、ステップSP10で次の連
続した8ビットのコードを読み出し、ステップSP11
でスタートコードの最後の8ビットとして解析した後、
ステップSP12で可変長符号化コードとして、さらに
解析する。
If all the 8-bit codes are 0, it means that the start code is not represented.
Returning to 7, the next consecutive 8-bit code is read. If the 8-bit code is 0000 0001, the next consecutive 8-bit code is the code representing the start code. Therefore, in step SP10, the next consecutive 8-bit code is read out, and in step SP11.
After parsing as the last 8 bits of the start code with
In step SP12, it is further analyzed as a variable length code.

【0141】さらに、上記読み出した8ビットのコード
が、0000 0000 及び0000 00001のどちらの値でもない場
合には、ステップSP11で上記読み出した8ビットの
コードをスタートコードの最後の8ビットとして解析し
た後、ステップSP12で可変長符号化コードとして、
さらに解析する。
Further, when the read 8-bit code is neither 0000 0000 nor 0000 00001, the read 8-bit code is analyzed as the last 8 bits of the start code in step SP11. After that, in step SP12, as a variable length code,
Further analyze.

【0142】ステップSP12では、現在読み出されて
いる連続した8ビットのコードが解析された後、ステッ
プSP13で解析は終了したか否かを判別し、終了して
いないならば、ステップSP1に戻り、次の連続した8
ビットのコードを読み出す。
At step SP12, the currently read continuous 8-bit code is analyzed, then at step SP13, it is judged whether or not the analysis is completed, and if not completed, the processing returns to step SP1. , The next consecutive 8
Read the bit code.

【0143】さらに、上述したようにスライスがフレー
ム内符号化されたマクロブロックから形成されているか
否かを判別するためのフラグに1がセットされている場
合に、上記スライス内の全てのマクロブロックがフレー
ム内符号化されているならば、表6に示すビデオシーケ
ンスヘッダ内の画像内符号化によるマクロブロック用We
ighting Matrixの値を示す Intra quantizer matrix
や、表7に示すピクチャ層内のピクチャの符号化の単位
を示す Picture structure 、画面のフォーマットを示
すInterlaced progressive flag、DCT変換のDC
成分の量子化の精度を示す Intra dc precision 、及
び量子化ステップサイズの種類を示すQscale type等の
フラグをスライスヘッダ内に複写してもつ。また、スラ
イスヘッダ以外の所定の位置に配置してもよい。
Further, when 1 is set in the flag for determining whether or not the slice is formed from the intra-frame coded macro block as described above, all the macro blocks in the slice are Is intra-frame encoded, the We for macroblocks by intra-image encoding in the video sequence header shown in Table 6 is used.
Intra indicating the value of the ighting Matrix quantizer matrix
Or Picture showing the unit of picture coding in the picture layer shown in Table 7. structure, Interlaced indicating the format of the screen progressive flag, DC for DCT conversion
Intra indicating the accuracy of component quantization dc precision and Qscale indicating the type of quantization step size The flags such as type are duplicated and held in the slice header. Further, it may be arranged at a predetermined position other than the slice header.

【0144】[0144]

【表6】 [Table 6]

【0145】[0145]

【表7】 [Table 7]

【0146】上記フラグ Picture structure の内容は
表8の(a)に、フラグInterlaced progressive flag
の内容は表8の(b)に、フラグ Intra dc precisio
nの内容は表8の(c)に、フラグ Intra dc precisi
on の内容は表8の(d)に示す。
The flag Picture The content of structure is
The flag Interlaced is shown in (a) of Table 8. progressive flag
Table 8 (b) shows the content of the flag Intra dc precisio
The content of n is shown in (c) of Table 8 with the flag Intra. dc precisi
The contents of on are shown in (d) of Table 8.

【0147】[0147]

【表8】 [Table 8]

【0148】上記それぞれのフラグが付加されて符号化
が行われた画像データを復号するときには、上記それぞ
れのフラグの内容により、スライス毎に、フレーム内符
号化が行われたマクロブロックから構成されているスラ
イスであるか否かを判別することができる。
When the image data encoded by adding the respective flags is decoded, each slice is composed of macroblocks which are intra-frame encoded according to the contents of the respective flags. It is possible to determine whether or not the slice is an existing slice.

【0149】もし、あるスライスがフレーム内符号化さ
れたマクロブロックから構成されている場合において、
そのスライスを復号する際に、そのスライスの上位の階
層であるピクチャ層、グループオブピクチャ層及びビデ
オシーケンス層等が復号され、既に必要な情報を得てい
るならば、従来の復号化を行う。
If a slice consists of intra-frame coded macroblocks,
When the slice is decoded, the picture layer, the group of picture layer, the video sequence layer, etc., which are higher layers of the slice, are decoded, and if the necessary information is already obtained, the conventional decoding is performed.

【0150】これに対して、そのスライスの上位の階層
であるピクチャ層、グループオブピクチャ層及びビデオ
シーケンス層等が復号されておらず、必要な情報が得ら
れていない場合にも、そのスライスに付加されている上
述したそれぞれのフラグの情報を読み出すことにより、
そのフレーム内復号化されたマクロブロックで構成され
るスライスの画像データを復号することができる。
On the other hand, even when the picture layer, the group of picture layer, the video sequence layer, etc., which are higher layers of the slice, have not been decoded and necessary information has not been obtained, the slice is also recorded. By reading the information of each of the above-mentioned flags that have been added,
It is possible to decode the image data of the slice formed of the intra-frame decoded macroblock.

【0151】例えば、上記それぞれのフラグをスライス
ヘッダ中にもつ場合のスライスヘッダのシンタックスを
表9及び表10に示す。
For example, Tables 9 and 10 show the syntax of the slice header when each of the above flags is included in the slice header.

【0152】[0152]

【表9】 [Table 9]

【0153】[0153]

【表10】 [Table 10]

【0154】表9は上記画像内符号化されたマクロブロ
ックが存在するか否かを判別するためのフラグstructur
e flagが単独で存在する場合のシンタックスを示すも
のであり、表10は上記フラグstructure flagがスラ
イススタートコードの最下位ビットで示される場合のシ
ンタックスを示すものである。
Table 9 shows a flag structur for determining whether or not the intra-picture coded macroblock exists.
e Table 10 shows the syntax when the flag exists independently, and Table 10 shows the above flag structure. This shows the syntax when flag is indicated by the least significant bit of the slice start code.

【0155】この場合、送信される情報の内で Intra
quantizer matrixフラグのWeighting Matrixの値が大
きいことがわかる。上記MPEG1方式では、このWeig
hting Matrixは8ビットの精度であるため、Weighting
Matrixの情報を送信するには多くのビット数が必要にな
る。このWeighting Matrixの値による影響はそれほど大
きくないと考えられるため、上記スライスヘッダのシン
タックス内からWeighting Matrixの値を省略したシンタ
ックスを用い、上記Weighting Matrixの値を適当に設定
して復号化を行うことにより、完全ではないが画像デー
タの復号を行うことができる。
In this case, Intra is included in the information to be transmitted.
quantizer It can be seen that the value of Weighting Matrix of the matrix flag is large. In the MPEG1 system, the Weig
Since the hting Matrix has an 8-bit precision, Weighting Matrix
A large number of bits are required to send the Matrix information. Since it is considered that the effect of this Weighting Matrix value is not so large, using the syntax omitting the value of Weighting Matrix from the syntax of the above slice header, set the value of the above Weighting Matrix appropriately and perform decoding. By doing so, the image data can be decoded, though not completely.

【0156】即ち、上記復号化を行う場合には、上記We
ighting Matrixの値として、スライスヘッダ内に設定さ
れている値を用いたり、復号化装置内に設定されている
値を用いたり、上述のようにスライスヘッダ内にWeight
ing Matrixの値がないときのための値を用いたりするこ
とになる。
That is, when performing the above decoding, the We
As the value of the ighting Matrix, the value set in the slice header is used, the value set in the decoding device is used, or the Weight is set in the slice header as described above.
The value used when there is no ing Matrix value will be used.

【0157】尚、本発明は上記実施例のみに限定される
ものではなく、その他の様々な構成が取り得ることは勿
論である。
The present invention is not limited to the above-mentioned embodiments, and it goes without saying that various other structures can be adopted.

【0158】[0158]

【発明の効果】以上の説明からも明らかなように、本発
明に係る画像信号符号化方法では、スライス毎に、画像
内符号化されているマクロブロックから構成されている
か否かを判別するためのフラグを付加することにより、
画像内符号化されているスライスにおいては、Iピクチ
ャによる符号化及び復号化を適用することができるの
で、統一のとれた符号化及び復号化を行うことができ、
さらに、復号化時に発生する可変長符号化コードのビッ
ト数を低減することができる。
As is clear from the above description, in the image signal coding method according to the present invention, it is determined whether or not each slice is composed of intra-coded macroblocks. By adding the flag of
Since it is possible to apply the encoding and decoding by the I picture to the slice that is intra-image encoded, it is possible to perform unified encoding and decoding,
Further, it is possible to reduce the number of bits of the variable length code generated at the time of decoding.

【0159】また、スライスの先頭を示すスライススタ
ートコードの最下位ビットを用いて上記画像内符号化さ
れているマクロブロックから構成されているか否かを判
別するためのフラグを付加することにより、スタートコ
ードの前に存在するゼロ列を検出する際に、8ビットお
きに検出したコードの内容からスタートコードの開始位
置を特定することができるので、従来よりも高速に処理
を行うことができる。
Also, by adding a flag for determining whether or not the intra-picture-encoded macro block is formed by using the least significant bit of the slice start code indicating the head of the slice, the start is started. When the zero string existing before the code is detected, the start position of the start code can be specified from the content of the code detected every 8 bits, so that the processing can be performed faster than before.

【0160】さらに、上記フラグの付加により、画像内
符号化されているマクロブロックで構成されていると判
別されたスライスでは、このスライスの内部に復号化を
行う際に必要な情報も付加されているので、このスライ
スよりも上部の階層に属する情報を必要とせず、このス
ライス単独でスライス内の画像データを完全、もしくは
擬似的に復号することができる。
Further, in the slice determined by the addition of the above flag to be composed of intra-picture-encoded macroblocks, information necessary for decoding is also added to the inside of this slice. Therefore, information belonging to a layer higher than this slice is not required, and the image data in the slice can be completely or artificially decoded by this slice alone.

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

【図1】本発明に係る画像信号符号化装置の概略的な構
成図である。
FIG. 1 is a schematic configuration diagram of an image signal encoding device according to the present invention.

【図2】本発明に係る画像信号復号化装置の概略的な構
成図である。
FIG. 2 is a schematic configuration diagram of an image signal decoding apparatus according to the present invention.

【図3】本発明の実施例の方法を示すフローチャート図
である。
FIG. 3 is a flowchart showing a method according to an embodiment of the present invention.

【図4】高能率符号化の原理を説明する図である。FIG. 4 is a diagram illustrating the principle of high efficiency encoding.

【図5】画像データを圧縮する場合におけるピクチャの
タイプを説明する図である。
[Fig. 5] Fig. 5 is a diagram for describing a type of a picture when image data is compressed.

【図6】動画像信号を符号化する原理を説明する図であ
る。
FIG. 6 is a diagram illustrating the principle of encoding a moving image signal.

【図7】従来の画像信号符号化装置と復号化装置の構成
例を示すブロック回路図である。
FIG. 7 is a block circuit diagram showing a configuration example of a conventional image signal encoding device and decoding device.

【図8】図7におけるフォーマット変換回路17のフォ
ーマット変換の動作を説明する図である。
FIG. 8 is a diagram illustrating a format conversion operation of the format conversion circuit 17 in FIG.

【図9】図7におけるエンコーダ18の構成例を示すブ
ロック回路図である。
9 is a block circuit diagram showing a configuration example of an encoder 18 in FIG.

【図10】図9の予測モード切り換え回路52の動作を
説明する図である。
10 is a diagram for explaining the operation of the prediction mode switching circuit 52 of FIG.

【図11】図9のDCTモード切り換え回路55の動作
を説明する図である。
11 is a diagram illustrating the operation of the DCT mode switching circuit 55 in FIG.

【図12】図7のデコーダ31の構成例を示すブロック
回路図である。
12 is a block circuit diagram showing a configuration example of a decoder 31 of FIG.

【図13】従来のMPEG1方式による画像信号のフォ
ーマットを示す図である。
FIG. 13 is a diagram showing a format of an image signal according to the conventional MPEG1 method.

【図14】フレーム内符号化されたマクロブロックを示
す図である。
[Fig. 14] Fig. 14 is a diagram illustrating intra-frame encoded macroblocks.

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

111・・・・・・・・・フィールドメモリ群 112・・・・・・・・・ハイブリッド符号化器 113・・・・・・・・・VLC(可変長符号化)器 114、131・・・・・バッファ 116・・・・・・・・・ピクチャカウンタ 117・・・・・・・・・マクロブロックカウンタ 118・・・・・・・・・画像符号化制御情報記憶用メ
モリ 119・・・・・・・・・スライス垂直位置計算回路 120・・・・・・・・・出力フォーマット変換器 132・・・・・・・・・逆VLC(可変長符号化)器 133・・・・・・・・・ハイブリッド復号化器 134・・・・・・・・・スライス垂直位置復元器 136・・・・・・・・・復号化制御情報記憶用メモリ 200・・・・・・・・・マスク器 141、201・・・・・シフト器
111 --- Field memory group 112 --- Hybrid encoder 113 --- VLC (variable length encoder) 114, 131 ...・ ・ ・ Buffer 116 ・ ・ ・ ・ ・ ・ ・ ・ Picture counter 117 ・ ・ ・ ・ ・ ・ ・ Macro block counter 118 ・ ・ ・ ・ ・ ・ ・ Memory for storing image coding control information 119 ・ ・・ ・ ・ ・ ・ ・ ・ Slice vertical position calculation circuit 120 ・ ・ ・ ・ Output format converter 132 ・ ・ ・ ・ ・ Inverse VLC (Variable length coding) device 133 ・ ・ ・ ・・ ・ ・ ・ ・ Hybrid decoder 134 ・ ・ ・ ・ Slice vertical position restorer 136 ・ ・ ・ ・ ・ Memory for storing decoding control information 200 ・ ・ ・ ・・ Mask device 141, 201 ... Shift device

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 複数の画素から成るマクロブロック単位
で画像信号データを符号化する際に選択される符号化モ
ードとして、少なくとも画像内符号化モードを含む画像
信号符号化方法において、 上記マクロブロックを複数個配列して成るスライス毎
に、画像内符号化モードとするか否かを判別するための
フラグを付加することを特徴とする画像信号符号化方
法。
1. An image signal encoding method including at least an intra-image encoding mode as an encoding mode selected when encoding image signal data in units of macroblocks each including a plurality of pixels, wherein the macroblock is An image signal encoding method, characterized in that a flag for determining whether or not the intra-image encoding mode is set is added to each of a plurality of slices.
【請求項2】 上記スライスの先頭を示すスライススタ
ートコードの最下位ビットを用いて上記フラグを付加す
ることを特徴とする請求項1記載の画像信号符号化方
法。
2. The image signal encoding method according to claim 1, wherein the flag is added using the least significant bit of a slice start code indicating the head of the slice.
【請求項3】 1枚の画像であるピクチャ毎に符号化さ
れる方式に従って複数のピクチャタイプに分類され、上
記ピクチャタイプとして、少なくとも画像内符号化ピク
チャと画像間予測符号化ピクチャとを含み、上記画像内
符号化ピクチャでは上記マクロブロック毎の符号化に関
する情報を表すマクロブロックタイプを所定の可変長符
号で符号化し、画像間予測符号化ピクチャではマクロブ
ロックタイプを他の可変長符号で符号化する画像信号符
号化方法において、 上記画像内符号化として示されたスライス内の全マクロ
ブロックタイプを上記所定の可変長符号で符号化を行う
ことを特徴とする請求項1及び2記載の画像信号符号化
方法。
3. A picture is classified into a plurality of picture types according to a method of being coded for each picture that is one image, and the picture types include at least an intra-picture coded picture and an inter-picture predictive coded picture, In the intra-picture coded picture, the macroblock type representing the information regarding the coding for each macroblock is coded by a predetermined variable length code, and in the inter-picture predictive coded picture, the macroblock type is coded by another variable length code. 3. The image signal encoding method according to claim 1, wherein all macroblock types in the slice indicated as the intra-image encoding are encoded by the predetermined variable length code. Encoding method.
【請求項4】 上記フラグを付加されたスライス毎に、
当該スライスを復号するための情報を付加することを特
徴とする請求項1記載の画像信号符号化方法。
4. For each slice to which the flag is added,
The image signal encoding method according to claim 1, wherein information for decoding the slice is added.
【請求項5】 複数の画素から成るマクロブロック単位
で画像信号データを符号化する際に選択される符号化モ
ードとして、少なくとも画像内符号化モードを含む画像
信号符号化方法を用いる画像信号符号化装置において、 上記マクロブロックを複数個配列して成るスライス毎
に、画像内符号化モードとするか否かを判別するための
フラグを付加する制御部を設けて成ることを特徴とする
画像信号符号化装置。
5. An image signal encoding method using an image signal encoding method including at least an intra-image encoding mode as an encoding mode selected when encoding image signal data in units of macroblocks composed of a plurality of pixels. In the apparatus, an image signal code comprising a control unit for adding a flag for determining whether or not the intra-picture coding mode is set for each slice formed by arranging a plurality of the macro blocks Device.
【請求項6】 複数の画素から成るマクロブロック単位
で画像信号データを符号化する際に選択される符号化モ
ードとして、少なくとも画像内符号化モードを含む画像
信号符号化方法において、 上記マクロブロックを複数個配列して成るスライス毎
に、画像内符号化モードとするか否かを判別するための
フラグを検出したスライス単位で画像内復号化を行うこ
とを特徴とする画像信号復号化方法。
6. An image signal encoding method including at least an intra-image encoding mode as an encoding mode selected when encoding image signal data in units of macroblocks composed of a plurality of pixels. An image signal decoding method characterized by performing intra-picture decoding for each slice in which a plurality of slices are arranged and in which a flag for determining whether or not to use the intra-picture coding mode is detected.
【請求項7】 上記スライスの先頭を示すスライススタ
ートコードの最下位ビットを用いて上記フラグを付加
し、上記スライススタートコードの前に連続して存在す
るゼロ列を検出する際に、このゼロを8ビットおきに検
出することにより、上記スライススタートコードの先頭
を検出することを特徴とする請求項6記載の画像信号復
号化方法。
7. The zero is added when the flag is added by using the least significant bit of a slice start code indicating the head of the slice and a series of zeros existing consecutively before the slice start code is detected. 7. The image signal decoding method according to claim 6, wherein the head of the slice start code is detected by detecting every 8 bits.
【請求項8】 上記フラグを付加されたスライス毎に、
当該スライスを復号するための情報を用いて復号化を行
うことを特徴とする請求項7記載の画像信号符号化方
法。
8. For each slice to which the flag is added,
The image signal encoding method according to claim 7, wherein decoding is performed using information for decoding the slice.
【請求項9】 複数の画素から成るマクロブロック単位
で画像信号データを符号化する際に選択される符号化モ
ードとして、少なくとも画像内符号化モードを含む画像
信号符号化方法を用いる画像信号復号化装置において、 上記マクロブロックを複数個配列して成るスライス毎
に、画像内符号化モードとするか否かを判別するための
フラグを検出したスライス単位で画像内復号化を行うこ
とを特徴とする画像信号復号化装置。
9. An image signal decoding method using an image signal encoding method including at least an intra-image encoding mode as an encoding mode selected when encoding image signal data in units of macroblocks composed of a plurality of pixels. The apparatus is characterized in that intra-picture decoding is performed for each slice formed by arranging a plurality of the macroblocks, in units of slices in which a flag for determining whether to use the intra-picture coding mode is detected. Image signal decoding device.
JP6075693A 1993-03-19 1993-03-19 Image signal encoding method and apparatus, decoding method and apparatus Expired - Fee Related JP3240737B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6075693A JP3240737B2 (en) 1993-03-19 1993-03-19 Image signal encoding method and apparatus, decoding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6075693A JP3240737B2 (en) 1993-03-19 1993-03-19 Image signal encoding method and apparatus, decoding method and apparatus

Publications (2)

Publication Number Publication Date
JPH06276482A true JPH06276482A (en) 1994-09-30
JP3240737B2 JP3240737B2 (en) 2001-12-25

Family

ID=13151441

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6075693A Expired - Fee Related JP3240737B2 (en) 1993-03-19 1993-03-19 Image signal encoding method and apparatus, decoding method and apparatus

Country Status (1)

Country Link
JP (1) JP3240737B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003030556A1 (en) * 2001-09-18 2003-04-10 Matsushita Electric Industrial Co., Ltd. Image encoding method and image decoding method
JP2007027805A (en) * 2005-07-12 2007-02-01 Nippon Telegr & Teleph Corp <Ntt> Video image coding apparatus, video image coding method, video image coding program, and computer-readable recording medium recording this program
JP2009290901A (en) * 2009-09-07 2009-12-10 Nippon Telegr & Teleph Corp <Ntt> Image coding apparatus, method and program, and computer-readable recording medium with program recorded thereon

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003030556A1 (en) * 2001-09-18 2003-04-10 Matsushita Electric Industrial Co., Ltd. Image encoding method and image decoding method
CN1298171C (en) * 2001-09-18 2007-01-31 松下电器产业株式会社 Image encoding method and image decoding method
JP2007027805A (en) * 2005-07-12 2007-02-01 Nippon Telegr & Teleph Corp <Ntt> Video image coding apparatus, video image coding method, video image coding program, and computer-readable recording medium recording this program
JP2009290901A (en) * 2009-09-07 2009-12-10 Nippon Telegr & Teleph Corp <Ntt> Image coding apparatus, method and program, and computer-readable recording medium with program recorded thereon
JP4643736B2 (en) * 2009-09-07 2011-03-02 日本電信電話株式会社 Video encoding apparatus, video encoding method, video encoding program, and computer-readable recording medium recording the program

Also Published As

Publication number Publication date
JP3240737B2 (en) 2001-12-25

Similar Documents

Publication Publication Date Title
JP3163830B2 (en) Image signal transmission method and apparatus
KR100766740B1 (en) Apparatus and method for converting data using encoding history information
JP2006148970A (en) Image data coding method and computer readable medium recording program therefor
JPH0998429A (en) Digital video signal encoding device and decoding device therefor
JP3911035B2 (en) Moving picture coding method and moving picture coding apparatus
US5991445A (en) Image processing apparatus
JP3980659B2 (en) Video encoding method and apparatus, video decoding method and apparatus.
JP3599942B2 (en) Moving picture coding method and moving picture coding apparatus
JPH07231449A (en) Encoder and decoder for picture signal
JP3240737B2 (en) Image signal encoding method and apparatus, decoding method and apparatus
JP3246074B2 (en) Video encoding device and video decoding device
JPH0795536A (en) Device and method for reversely reproducing moving image
JPH06276481A (en) Picture signal coding and decoding method and recording medium
JP3271091B2 (en) Image signal encoding method and apparatus, decoding method and apparatus
JP3480980B2 (en) Image signal transmission method and apparatus, and image signal decoding method and apparatus
JP3481207B2 (en) Image signal transmission method and apparatus, and image signal decoding method and apparatus
JP3516621B2 (en) Encoding device and method
JP3516622B2 (en) Decoding apparatus and method
JP3500340B2 (en) Coding apparatus and method
JP3164110B2 (en) Encoding device and method
JP3307379B2 (en) Decoding apparatus and method
JP4596277B2 (en) Encoding device, encoding method, decoding device, and decoding method
JPH10164594A (en) Compression encoding method for moving image and device therefor
JPH09238345A (en) Image signal coding method and device therefor, image signal transmission method, image signal decoding method, device therefor and recording medium
JPH07203372A (en) Method for arraying video data and its encoding device and decoding device therefor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20010918

LAPS Cancellation because of no payment of annual fees