JP2003179931A - Device, method and program for encoding moving image - Google Patents

Device, method and program for encoding moving image

Info

Publication number
JP2003179931A
JP2003179931A JP2001376507A JP2001376507A JP2003179931A JP 2003179931 A JP2003179931 A JP 2003179931A JP 2001376507 A JP2001376507 A JP 2001376507A JP 2001376507 A JP2001376507 A JP 2001376507A JP 2003179931 A JP2003179931 A JP 2003179931A
Authority
JP
Japan
Prior art keywords
picture
coding
macroblock
unit
macro block
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.)
Pending
Application number
JP2001376507A
Other languages
Japanese (ja)
Inventor
Kazuyoshi Moriya
和喜 森屋
Takaharu Tokunaga
隆治 徳永
Miyuki Kawamura
深雪 川村
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.)
CEDGE KK
Axell Corp
Original Assignee
CEDGE KK
Axell 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 CEDGE KK, Axell Corp filed Critical CEDGE KK
Priority to JP2001376507A priority Critical patent/JP2003179931A/en
Publication of JP2003179931A publication Critical patent/JP2003179931A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method for encoding a moving image in which cost of a moving image processing system is reduced, and a recording medium in which a program for encoding a moving image is stored and which can be read out with a computer. <P>SOLUTION: This device for encoding a moving image uses an I picture, a B picture and a P picture as well as an MPEG2. When the I picture, the B picture, and the P picture are encoded, processing such as inter-frame prediction coding in forward direction, in backward direction, and intra-coding are done. And further, a macro block which is already encoded in the same frame is used as a reference image for prediction coding. <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、動画像符号化方法
および動画像符号化プログラムを格納したコンピュータ
読み取り可能な記録媒体に関し、さらに言えば、例えば
MPEG(Moving Picture Experts Group)2のように、符
号化情報量を低減することができる動画像符号化方法
と、その方法を実施する動画像符号化プログラムを格納
したコンピュータ読み取り可能な記録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a moving picture coding method and a computer readable recording medium storing a moving picture coding program.
The present invention relates to a moving picture coding method such as MPEG (Moving Picture Experts Group) 2 that can reduce the amount of coded information, and a computer-readable recording medium that stores a moving picture coding program that implements the method.

【0002】[0002]

【従来の技術】現在、多用されているMPEG2は、連
続するピクチャ間に存在する相関を利用し、「動き補
償」と呼ばれる技術によって符号化情報量を低減する符
号化方式仕様である。「動き補値」に必要な「動き推
定」では、あるピクチャ内の画像領域を参照値とし、そ
の参照値と符号化対象となるピクチャ内の画像領域との
差分が最小となるような、参照領域の空間的な相対位置
(すなわち「動きベクトル」)が求められる。
2. Description of the Related Art MPEG2, which is widely used at present, is a coding system specification which utilizes the correlation existing between consecutive pictures and reduces the amount of coded information by a technique called "motion compensation". In the “motion estimation” necessary for the “complementary motion value”, an image area in a certain picture is used as a reference value, and a reference value that minimizes the difference between the reference value and the image area in the picture to be encoded is used. The spatial relative position (or "motion vector") of the region is determined.

【0003】MPEG2では、ビデオシーケンス内のピ
クチャを次の三つのタイプに分類して符号化を行う。す
なわち、イントラピクチャ(Intra-coded picture,I
ピクチャ)、予測符号化ピクチャ(Predictive-coded p
icture,Pピクチャ)、双方向予測符号化ピクチャ(Bi
directionally predictive-Coded picture,Bピクチ
ャ)である。図9に示すように、少なくとも一つのIピ
クチャ、Pピクチャ、Bピクチャが結合して一つのピク
チャ・グループ(すなわち、GOP)を構成する。そし
て、複数のピクチャ・グループが結合して一連の符号化
情報、すなわちビット・ストリームを構成する。
In MPEG2, pictures in a video sequence are classified into the following three types and encoded. That is, an intra picture (Intra-coded picture, I
Picture), predictive-coded picture (Predictive-coded p
icture, P picture), bidirectional predictive coding picture (Bi
directionally predictive-Coded picture, B picture). As shown in FIG. 9, at least one I picture, P picture, and B picture are combined to form one picture group (that is, GOP). Then, a plurality of picture groups are combined to form a series of encoded information, that is, a bit stream.

【0004】Iピクチャは、常にピクチャ・グループの
先頭に配置される。Pピクチャは、常にピクチャ・グル
ープの末尾に配置されるが、必要に応じてピクチャーグ
ループの先頭と末尾以外の位置にも配置される。図9の
例では、Pピクチャはピクチャ・グループ(GOP)の
末尾と中央にそれぞれ配置されている。Bピクチャは、
IピクチャとそのIピクチャに隣接するPピクチャの間
に少なくとも1個、配置される。図9の例では、Iピク
チャと中央のPピクチャの問に二つのBピクチャが配置
され、中央のPピクチャと末尾のPピクチャの間にさら
に二つのBピクチャが配置されている。
The I picture is always placed at the head of the picture group. The P picture is always arranged at the end of the picture group, but may be arranged at positions other than the beginning and end of the picture group as necessary. In the example of FIG. 9, P pictures are arranged at the end and the center of the picture group (GOP), respectively. B picture is
At least one I picture is arranged between the I picture and the P picture adjacent to the I picture. In the example of FIG. 9, two B pictures are arranged between the I picture and the central P picture, and two more B pictures are arranged between the central P picture and the last P picture.

【0005】Iピクチャは、他のピクチャ(すなわちP
ピクチャとBピクチャ)の情報を使用せず、ピクチャ自
身の持つ情報のみを用いて符号化(フレーム内符号化)
されるピクチャである。Pピクチャは、過去のIピクチ
ャまたは未来のPピクチャを「参照ピクチャ(参照画
像)」として使用し、時間軸上で前向きの予測符号化
(フレーム間順方向予測符号化)がされるピクチャであ
る。すなわち、Bピクチャは、過去及び将来の画像、す
なわち、Iピクチャ及びPピクチャのいずれか,または
Iピクチャ及びPピクチャの双方を、「参照ピクチャ」
として使用し、時間軸上で前向きと後向き(フレーム間
逆方向予測符号化)の双方向の予測符号化が行われるピ
クチャである。
An I picture is another picture (ie P
Coding using only the information that the picture itself does not use (picture and B picture) information (intra-frame coding)
It is a picture to be displayed. The P picture is a picture that uses forward I pictures or future P pictures as a “reference picture (reference image)” and is subjected to forward predictive coding (interframe forward predictive coding) on the time axis. . That is, a B picture is a reference picture that is a past or future picture, that is, either an I picture or a P picture, or both an I picture and a P picture.
, And is a picture for which bidirectional predictive coding of forward and backward (interframe backward predictive coding) is performed on the time axis.

【0006】[0006]

【発明が解決しようとする課題】上述したMPEG2に
よれば、かなり高いレベルで符号化情報量を低減できる
ことが知られているが、近年、処理すべき動画像の情報
量が増加する傾向にあるため、符号化効率をいっそう高
めることが望まれている。これは、伝送帯域をより狭く
し且つ格納領域をより少なくすることによって、動画像
処理システムのコストを低減できるからである。マルチ
メディア化が進む中、限られた通信容量において、画像
データ等の大容量通信を多くの利用者が利用できるよう
にするために、通信スピードの高速化とともに、より圧
縮効率の高い画像符号化が求められている。
According to the above-mentioned MPEG2, it is known that the coded information amount can be reduced at a considerably high level, but in recent years, the information amount of moving images to be processed tends to increase. Therefore, it is desired to further improve the coding efficiency. This is because the cost of the moving image processing system can be reduced by narrowing the transmission band and reducing the storage area. As multimedia is advancing, in order to enable many users to use large-capacity communication such as image data with a limited communication capacity, image coding with higher compression efficiency along with faster communication speed Is required.

【0007】本発明はこのような背景の下になされたも
ので、動画像処理システムのコストを低減できる動画像
符号化方法と、動画像符号化プログラムを格納したコン
ピュータ読み取り可能な記録媒体とを提供することにあ
る。
The present invention has been made under such a background, and provides a moving picture coding method capable of reducing the cost of a moving picture processing system and a computer-readable recording medium storing a moving picture coding program. To provide.

【0008】[0008]

【課題を解決するための手段】本発明の符号化装置は、
イントラ符号化を行うIピクチャ,フレーム間順方向予
測符号化及びフレーム間逆方向予測符号化を行うBピク
チャ,フレーム間順方向予測符号化を行うPピクチャを
使用する動画符号化装置であり、Iピクチャ,Bピクチ
ャ及びPピクチャの符号化を行う場合、フレーム間順方
向予測符号化,フレーム間逆方向予測符号化,イントラ
符号化の処理に加えて、同一フレーム内の符号化の終了
したマクロブロックを、予測符号化のための参照画像と
して用いることを特徴とする。
The encoding device of the present invention is
A moving picture coding apparatus using an I picture for intra coding, a B picture for interframe forward predictive coding and interframe backward predictive coding, and a P picture for interframe forward predictive coding. When encoding a picture, a B picture, and a P picture, in addition to the inter-frame forward predictive encoding, the inter-frame backward predictive encoding, and the intra-encoding process, the encoded macro block in the same frame is completed. Is used as a reference image for predictive coding.

【0009】本発明の符号化方法は、イントラ符号化を
行うIピクチャ,フレーム間順方向予測符号化及びフレ
ーム間逆方向予測符号化を行うBピクチャ,フレーム間
順方向予測符号化を行うPピクチャを使用する動画符号
化方法であり、Iピクチャ,Bピクチャ及びPピクチャ
の符号化を行う過程において、フレーム間順方向予測符
号化,フレーム間逆方向予測符号化,イントラ符号化の
過程に加えて、同一フレーム内の符号化の終了したマク
ロブロックを、予測符号化のための参照画像として用い
る過程を有することを特徴とする符号化方法。
The encoding method of the present invention is an I picture for intra coding, a B picture for interframe forward predictive coding and interframe backward predictive coding, and a P picture for interframe forward predictive coding. In the process of encoding I-pictures, B-pictures and P-pictures, in addition to the processes of inter-frame forward prediction coding, inter-frame backward prediction coding, and intra-coding, A coding method, comprising: using a coded macroblock in the same frame as a reference image for predictive coding.

【0010】本発明の符号化プログラムは、イントラ符
号化を行うIピクチャ,フレーム間順方向予測符号化及
びフレーム間逆方向予測符号化を行うBピクチャ,フレ
ーム間順方向予測符号化を行うPピクチャを使用する、
請求項1に記載の符号化装置を動作させる動画符号化プ
ログラムであり、Iピクチャ,Bピクチャ及びPピクチ
ャの符号化を行う処理において、フレーム間順方向予測
符号化,フレーム間逆方向予測符号化,イントラ符号化
の処理に加えて、同一フレーム内の符号化の終了したマ
クロブロックを、予測符号化のための参照画像として用
いる処理を含む符号化処理をコンピュータに実行させる
ことを特徴とする。
The encoding program of the present invention is an I picture for intra encoding, a B picture for performing interframe forward predictive encoding and an interframe backward predictive encoding, and a P picture for performing interframe forward predictive encoding. To use,
A moving picture coding program for operating the coding apparatus according to claim 1, wherein in a process of coding an I picture, a B picture and a P picture, interframe forward prediction coding and interframe backward prediction coding are performed. In addition to the intra-coding process, the computer is caused to execute a coding process including a process of using the coded macroblock in the same frame as a reference image for predictive coding.

【0011】本発明のコンピュータ読み取り可能な記録
媒体は、イントラ符号化を行うIピクチャ,フレーム間
順方向予測符号化及びフレーム間逆方向予測符号化を行
うBピクチャ,フレーム間順方向予測符号化を行うPピ
クチャを使用する、請求項1に記載の符号化装置を動作
させる動画符号化プログラムが記録された記録媒体であ
り、Iピクチャ,Bピクチャ及びPピクチャの符号化を
行う処理において、フレーム間順方向予測符号化,フレ
ーム間逆方向予測符号化,イントラ符号化の処理に加え
て、同一フレーム内の符号化の終了したマクロブロック
を、予測符号化のための参照画像として用いる処理を含
む符号化処理をコンピュータに実行させる動画符号化プ
ログラムを記録している。
A computer-readable recording medium according to the present invention has an I picture for intra coding, a B picture for interframe forward predictive coding and an interframe backward predictive coding, and an interframe forward predictive coding. A recording medium in which a moving picture coding program for operating the coding apparatus according to claim 1, which uses P pictures to be carried out, is recorded, and in a process of coding I pictures, B pictures and P pictures A code including processing of using forward-predictive coding, inter-frame backward predictive coding, and intra-coding, as well as processing of using a coded macroblock in the same frame as a reference image for predictive coding A moving image encoding program that causes a computer to execute the encoding process is recorded.

【0012】[0012]

【発明の実施の形態】以下、図面を参照して本発明の実
施形態について説明する。図1及び図8は、各々、本発
明の一実施形態の動画符号化に用いる符号器と復号器の
構成例を示す機能ブロック図である。この構成自体は、
MPEG2に従った動画像処理に使用されるものと同様
である。 <符号器>まず、図1の符号器の構成について説明す
る。本発明の符号器は、符号化の終了した、同一フレー
ム内にあるマクロブロックを、予測符号化のための参照
画像として用いることを特徴としている。ピクチャ並べ
換え部11は、外部機器から、圧縮されていないデジタ
ル入力画像信号を入力し、このデジタル入力画像から複
数のピクチャを生成する。ここで、上記ピクチャとは、
それ自身を1枚の静止画として扱うことができるフレー
ムまたはフィールドを意味している。この各ピクチャ
は、各々、一つの輝度信号と二つの色差信号とのデータ
の組み合わせから構成される。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. 1 and 8 are functional block diagrams showing configuration examples of an encoder and a decoder used for video encoding according to an embodiment of the present invention. This configuration itself is
This is the same as that used for moving image processing according to MPEG2. <Encoder> First, the configuration of the encoder of FIG. 1 will be described. The encoder of the present invention is characterized in that a macroblock, which has been encoded and is present in the same frame, is used as a reference image for predictive encoding. The picture rearrangement unit 11 inputs an uncompressed digital input image signal from an external device and generates a plurality of pictures from this digital input image. Here, the picture is
It means a frame or field that can be treated as one still image. Each picture is composed of a combination of data of one luminance signal and two color difference signals.

【0013】ピクチャ並べ替え部11は、MPEG2と
同様に、予測符号化を行うため、上記ピクチャをIピク
チャ,Bピクチャ,Pピクチャの三つのタイプに分け
る。また、ピクチャ並べ換え部11は、生成されたIピ
クチャ、Bピクチャ,Pピクチャを、予測符号化処理に
適した順序に並べ換えて出力する。すなわち、Iピクチ
ャのマクロブロックタイプは、フレーム間予測を行わず
にイントラ符号化(フレーム内符号化)フレームのデー
タから構成され、他のP及びBフレームの予測に用いる
ために最初に出力される。上記マクロブロックは、ピク
チャを16×16ドットの領域に分解した構成であり、
4×4ドット領域からなる4つのブロックから構成され
ている。
The picture rearrangement unit 11 divides the picture into three types of I picture, B picture, and P picture in order to perform predictive coding similarly to MPEG2. Also, the picture rearrangement unit 11 rearranges the generated I picture, B picture, and P picture in an order suitable for the predictive coding process and outputs the rearranged pictures. That is, the macroblock type of the I picture is composed of intra-coded (intra-frame coded) frame data without performing inter-frame prediction, and is output first for use in prediction of other P and B frames. . The macroblock has a structure in which a picture is decomposed into 16 × 16 dot areas,
It is composed of four blocks each consisting of a 4 × 4 dot area.

【0014】Pピクチャのマクロブロックタイプは、I
ピクチャと同様に、イントラ符号化フレームのデータ
と、Iピクチャ(参照画像として使用)から予測するこ
とで再生されるインターフレーム(順方向フレーム予測
画面)のデータとから構成されている。Bピクチャのマ
クロブロックタイプは、Iピクチャと同様なイントラ符
号化フレームのデータと、Pピクチャと同様なIピクチ
ャ(参照画像として使用)からの予測することで再生さ
れるインターフレーム(順方向フレーム予測画面)のデ
ータと、Pピクチャ(参照画像として使用)からの予測
することで再生されるバックワードフレーム(逆方向フ
レーム予測画面)のデータとから構成されている。この
ため、ピクチャ並べ替え部11は、符号化に必要な順番
に、ピクチャ順を並べ換えた画像信号を、Iピクチャ、
Pピクチャ、Bピクチャの順に、動き推定部12に出力
する。
The macroblock type of a P picture is I
Like a picture, it is composed of intra-coded frame data and inter-frame (forward frame prediction screen) data reproduced by prediction from an I picture (used as a reference image). The macroblock type of a B picture is an interframe (forward frame prediction) reproduced by predicting from an intra-coded frame data similar to an I picture and an I picture (used as a reference image) similar to a P picture. Screen) and backward frame (reverse frame prediction screen) data reproduced by prediction from a P picture (used as a reference image). Therefore, the picture rearrangement unit 11 rearranges the image signals rearranged in the order of pictures into I-pictures in the order necessary for encoding.
The P picture and the B picture are output to the motion estimation unit 12 in this order.

【0015】動き推定部12は、ピクチャの種類を検出
し、各々の種類に対応した符号化モードを選択し、この
符号化モードを動き予測部20に各ピクチャに対応させ
て出力する。すなわち、動き推定部12は、入力される
符号化を行う画像信号(ピクチャ)がIピクチャであれ
ば、Iピクチャであることを示す識別信号とともに、同
一フレーム内のすでに符号化が終了しているマクロブロ
ックに相似性の高いマクロブロックがある場合、このマ
クロブロックを相似マクロブロックとし、同一フレーム
内符号化を行ったことを示す符号化モードのモード信号
を、この符号化されるマクロブロックのマクロブロック
アドレスと、符号化されるマクロブロックと上記相似マ
クロブロックとの座標値の差である動きベクトルととも
に動き予測部20へ出力する。一方、動き推定部12
は、同一フレーム内に相似性の高いマクロブロックが無
い場合、そのままの状態で使用することを示す符号化モ
ードのモード信号を動き予測部20へ出力し、そのまま
の状態で減算部13に出力する。
The motion estimation unit 12 detects the type of picture, selects a coding mode corresponding to each type, and outputs this coding mode to the motion prediction unit 20 in association with each picture. That is, if the input image signal (picture) to be encoded is an I picture, the motion estimation unit 12 has already completed encoding in the same frame together with an identification signal indicating that the image is an I picture. When a macro block has a macro block with a high similarity, this macro block is regarded as a similar macro block, and the mode signal of the coding mode indicating that intra-frame coding has been performed is used as the macro block of the macro block to be coded. It outputs to the motion prediction unit 20 together with the block address and the motion vector which is the difference in coordinate value between the encoded macro block and the similar macro block. On the other hand, the motion estimation unit 12
Outputs a mode signal of a coding mode indicating that the macro block is used as it is to the motion prediction unit 20 when there is no macro block having high similarity in the same frame, and outputs to the subtraction unit 13 as it is. .

【0016】また、動き推定部12は、入力される符号
化を行う画像がPピクチャ及びBピクチャのいずれかで
あれば、構成するマクロブロックに対して相似性の高い
相似マクロブロックを、GOPにおける他の近傍のピク
チャ(PピクチャであればIピクチャ,Bピクチャであ
ればI,Pピクチャ)から抽出して、この符号化される
マクロブロックのマクロブロックアドレスと、符号化さ
れるマクロブロックと相似マクロブロックとの座標値の
差である動きベクトルと、このいずれの近傍のピクチャ
から抽出したかを示す符号化モードのモード信号(フレ
ーム間順方向予測符号化,フレーム間逆方向予測符号化
のいずれか)とを動き予測部20へ出力する。
Further, the motion estimation unit 12 determines, in the GOP, a similar macroblock having a high similarity to the macroblocks to be formed if the input image to be encoded is either a P picture or a B picture. The macroblock address of the macroblock to be coded is extracted from other nearby pictures (I picture for P picture, I and P picture for B picture) and similar to the coded macroblock. A motion vector, which is the difference in coordinate value from the macroblock, and a mode signal of a coding mode indicating which of the neighboring pictures are extracted (either interframe forward prediction coding or interframe backward prediction coding). Are output to the motion prediction unit 20.

【0017】さらに、動き推定部12は、入力される符
号化される画像がPピクチャやBピクチャのいずれかで
あれば、同一フレーム内のすでに符号化が終了している
マクロブロックに相似性の高いマクロブロックがある場
合、ピクチャの種類を示す識別信号と、同一フレーム内
符号化を行ったことを示す符号化モード(同一フレーム
内予測符号化)のモード信号とを、この符号化されるマ
クロブロックのマクロブロックアドレスと、符号化され
るマクロブロックと相似マクロブロックとの座標値の差
である動きベクトルとともに動き予測部20へ出力す
る。ここで、動き推定部12は、同一フレーム内予測符
号化,フレーム間順方向予測符号化,及びフレーム間逆
方向予測符号化のいずれで行った場合に、最も相似性
(相関性)が高いかを判定して、最も相似性の高い符号
化モードを使用することとなる。
Furthermore, if the input image to be encoded is either a P picture or a B picture, the motion estimator 12 is similar to a macroblock in the same frame that has already been encoded. When there is a high macroblock, the identification signal indicating the type of picture and the mode signal of the coding mode (intraframe predictive coding) indicating that the same intraframe coding has been performed are used as the macro to be coded. The result is output to the motion prediction unit 20 together with the motion vector which is the difference between the macroblock address of the block and the coordinate value of the encoded macroblock and the similar macroblock. Here, which of the intra-frame predictive coding, the inter-frame forward predictive coding, and the inter-frame backward predictive coding is performed by the motion estimation unit 12 has the highest similarity (correlation)? And the coding mode with the highest similarity is used.

【0018】しかしながら、動き推定部12は、入力さ
れる符号化される画像がPピクチャ及びBピクチャのい
ずれかであっても、構成するマクロブロックに対して、
所定の範囲内の相似性を有する相似マクロブロックが抽
出されない場合、ピクチャの種類を示す識別信号と、動
き予測部20にそのままの状態で使用することを示す符
号化モードのモード信号と、このマクロブロックの識別
信号とを出力し、このマクロブロックをIピクチャと同
様にそのままの状態で、減算回路13へ出力することと
なる。
However, the motion estimator 12 determines whether the input coded image is a P picture or a B picture for the constituent macroblocks.
When a similar macro block having similarity within a predetermined range is not extracted, an identification signal indicating the type of picture, a mode signal of a coding mode indicating that the motion prediction unit 20 is used as it is, and a macro of this macro. The block identification signal is output, and this macroblock is output to the subtraction circuit 13 in the same state as the I picture.

【0019】動き予測部20は、GOP単位で各ピクチ
ャ及び各マクロブロックの識別信号を記憶し、各マクロ
ブロックの符号化モードに基づき、減算部13に対し
て、必要に応じて(相似ブロックのあるマクロブロック
に対してのみ)減算指令を送るとともに、減算に用いる
相似マクロブロックの画像データ(参照画像)とをピク
チャ蓄積部21から抽出して供給する。減算器13は、
減算指令が無い(入力されたマクロブロックに相似マク
ロブロックがない)場合、そのままの状態でマクロブロ
ックを通過させ、減算指令がある(入力されたマクロブ
ロックに相似マクロブロックがない)場合、この相似マ
クロブロックとの差分データ、すなわち残差予測信号を
出力する。
The motion prediction unit 20 stores the identification signals of each picture and each macroblock in GOP units, and, based on the coding mode of each macroblock, requests the subtraction unit 13 (if the similar blocks A subtraction command is sent to only a certain macroblock, and image data (reference image) of a similar macroblock used for subtraction is extracted from the picture storage unit 21 and supplied. The subtractor 13 is
If there is no subtraction command (there is no similar macro block to the input macro block), the macro block is passed through as it is, and if there is a subtraction command (the input macro block does not have a similar macro block), this similarity The difference data from the macroblock, that is, the residual prediction signal is output.

【0020】DCT部14は、減算処理を行わない、そ
のままの状態マクロブロック,または減算を行った残差
予測信号のマクロブロックを、各々ブロックに分割し
て、各ブロックに対して、MPEG2と同様なDCT
(離散コサイン変換)処理を行う。量子化部15は、上
記DCT処理により求められた各ブロックのDCT係数
を所定の除数(量子化ステップ)で除算して、余りを丸
めて符号化(量子化)を行う(MPEG2と同様な符号
化処理)。
The DCT unit 14 divides a macro block of the state as it is without subtraction processing or a macro block of the residual prediction signal subjected to subtraction into each block, and each block is similar to MPEG2. DCT
(Discrete cosine transform) processing is performed. The quantizer 15 divides the DCT coefficient of each block obtained by the DCT processing by a predetermined divisor (quantization step), rounds the remainder, and performs coding (quantization) (code similar to MPEG2). Process).

【0021】逆量子化部17は、量子化部15から出力
される量子化された各ブロックのDCT係数に上記所定
の除数(量子化ステップ)を乗算し、逆量子化の処理を
行う。IDCT(逆離散コサイン変換)部18は、MP
EG2と同様な逆DCT処理を行い、復号したブロック
からマクロブロックを再構成し、このマクロブロックを
加算器19へ出力する。
The inverse quantizing unit 17 multiplies the quantized DCT coefficient of each block output from the quantizing unit 15 by the predetermined divisor (quantization step) to perform the inverse quantization process. The IDCT (Inverse Discrete Cosine Transform) unit 18 uses the MP
Inverse DCT processing similar to that of EG2 is performed, a macroblock is reconstructed from the decoded block, and this macroblock is output to the adder 19.

【0022】ここで、動き予測部20は、各マクロブロ
ックの符号化モードに基づき、加算器19に対して、必
要に応じて(再構成されたマクロブロックが残差予測信
号である場合のみ)加算指令を送るとともに、加算に用
いる相似マクロブロックの画像データとをピクチャ蓄積
部21から抽出して供給する。加算器19は、加算指令
が無い(入力されたマクロブロックが残差予測信号でな
くそのままの状態である)場合、そのままの状態でマク
ロブロックを通過させ、加算指令がある(入力されたマ
クロブロックが残差予測信号である)場合、復号された
残差予測信号と供給された相似マクロブロックとを加算
して、マクロブロックの再生を行う。
Here, the motion predicting section 20 determines, as necessary, to the adder 19 based on the coding mode of each macroblock (only when the reconstructed macroblock is a residual prediction signal). While sending the addition command, the image data of the similar macroblock used for the addition is extracted from the picture storage unit 21 and supplied. If there is no addition command (the input macroblock is not the residual prediction signal and is in the state as it is), the adder 19 passes the macroblock as it is, and the addition command is issued (the input macroblock is input). Is a residual prediction signal), the decoded residual prediction signal and the supplied similar macroblock are added to reproduce the macroblock.

【0023】ピクチャ蓄積部21は、加算器19から出
力される、再生されたマクロブロックによりピクチャを
構成して、これらのピクチャを蓄積する。ここで、ピク
チャ蓄積部21に蓄積されるピクチャは、Iピクチャと
Pピクチャとの2種類である(ここで、Iピクチャ及び
Pピクチャである理由は、動作の項において説明す
る)。
The picture accumulating section 21 composes pictures from the reproduced macroblocks output from the adder 19 and accumulates these pictures. Here, there are two types of pictures accumulated in the picture accumulating unit 21, that is, an I picture and a P picture (the reason for the I picture and the P picture is explained in the operation section).

【0024】可変長符号化部16は、量子化手段15か
ら入力する量子化されたブロックを、MPEG2と同様
な方法で可変長符号化を行い、2進符号化されたブロッ
クをマクロブロック単位で、多重化部22へ出力する。
多重化手段22は、可変長符号化部16から送られる2
進符号化されたマクロブロックと、動きベクトルのデー
タと、符号化モードを示す符号化信号とを多重化し、バ
ッファ23に出力する。
The variable-length coding unit 16 performs variable-length coding on the quantized block input from the quantizing means 15 in the same manner as MPEG2, and the binary-coded block is macroblock unit. , To the multiplexing unit 22.
The multiplexing means 22 is sent from the variable length coding unit 16 2
The binary-coded macroblock, the motion vector data, and the coded signal indicating the coding mode are multiplexed and output to the buffer 23.

【0025】バッファ23は、多重化された2進符号化
・量子化DCT出力信号と動きベクトル信号と符号化モ
ード信号とを一時的に蓄積し、所定形式のビットストリ
ームに整形して出力する。このビットストリームは、所
定の伝送路を介して復号器(例えば、図8の復号器3
1)に伝送される。なお、バッファ23は、伝送路に出
力するビットレートに対応して、量子化部15から出力
されるビットのビットレート制御を行う。
The buffer 23 temporarily stores the multiplexed binary coded / quantized DCT output signal, the motion vector signal, and the coding mode signal, shapes the bit stream in a predetermined format, and outputs the bit stream. This bit stream is transmitted to a decoder (for example, the decoder 3 in FIG. 8) via a predetermined transmission path.
1) is transmitted. The buffer 23 controls the bit rate of the bits output from the quantizer 15 in accordance with the bit rate output to the transmission path.

【0026】次に、図1及び図2,3,4,5,6を参
照して、本発明の一実施形態による符号器1の動作例の
説明を行う。ここで、図2は、上述した符号器1におい
て実行される動画像符号化処理を説明するGOP(グル
ープ・オブ・ピクチャ)の構成例を示す概念図である。
また、図3〜6は、各ピクチャのマクロブロックに対す
る相似マクロブロックの抽出処理を説明する、ピクチャ
の構成を示す概念図である。ピクチャ並べ替え部11
は、時系列に入力されるピクチャを、例えば、図2に示
すGOP単位にIピクチャ{n},Bピクチャ{n+
1,n+2},Pピクチャ{n+3},Bピクチャ{n
+4,n+5},Pピクチャ{n+6}として分類し、
これらのピクチャを、{n,n+3,n+1,n+2,
n+6,n+4,n+5}の順番に並べ換えて出力す
る。図3〜図5において、MBIはIピクチャを示し、
MBPはPピクチャを示し、MBBはBピクチャを示し
ている。
Next, an operation example of the encoder 1 according to the embodiment of the present invention will be described with reference to FIGS. Here, FIG. 2 is a conceptual diagram showing a configuration example of a GOP (Group of Pictures) for explaining the moving picture coding process executed in the above-mentioned encoder 1.
3 to 6 are conceptual diagrams showing the structure of a picture for explaining the extraction processing of similar macroblocks to the macroblock of each picture. Picture sorting section 11
Is a picture input in time series, for example, I picture {n}, B picture {n + in GOP units shown in FIG.
1, n + 2}, P picture {n + 3}, B picture {n
+4, n + 5}, P picture {n + 6},
Let these pictures be {n, n + 3, n + 1, n + 2,
n + 6, n + 4, n + 5} are rearranged in this order and output. 3 to 5, MBI indicates an I picture,
MBP indicates a P picture and MBB indicates a B picture.

【0027】動き推定部12は、入力される各ピクチャ
に対して、図7に示すフローチャートに従い符号化を行
う。ステップS1において、動き推定部12は、GOP
単位におけるIピクチャ,Bピクチャ,Pピクチャのい
ずれであるかを判定し、これらのピクチャを入力された
順にターゲットピクチャとして設定する。
The motion estimation unit 12 encodes each input picture according to the flowchart shown in FIG. In step S1, the motion estimation unit 12 causes the GOP
It is determined whether the picture is an I picture, a B picture, or a P picture in the unit, and these pictures are set as the target pictures in the input order.

【0028】次に、ステップS2において、動き推定部
12は、ターゲットピクチャを16×16ドットのマク
ロブロックに分割する。ここでは、動き推定部12は、
図3〜図6に示すように、各ピクチャを、縦方向に8
行、横方向に6列のマトリクスに分割、すなわち、48
個のマクロブロックに分割する。以下、各マクロブロッ
クは、Iピクチャ,Pピクチャ,Bピクチャに各々対応
して、MI(m(マトリクスの行番号),n(マトリク
スの列番号)),MP(m,n),MB(m,n)(m=
1〜6の整数、n=1〜8の整数)として表す。
Next, in step S2, the motion estimation section 12 divides the target picture into 16 × 16 dot macroblocks. Here, the motion estimation unit 12
As shown in FIGS. 3 to 6, each picture is vertically
Divided into a matrix of 6 rows and 6 columns in the horizontal direction, that is, 48
Divide into macroblocks. Hereinafter, each macroblock corresponds to an I picture, a P picture, and a B picture, respectively, and MI (m (row number of matrix), n (column number of matrix)), MP (m, n), and MB (m , N) (m =
It represents as an integer of 1 to 6, and n = an integer of 1 to 8).

【0029】そして、ステップS3において、動き推定
部12は、分割したターゲットピクチャがIピクチャで
あるか否かの判定を行う。ここで、動き推定部12は、
このターゲットピクチャがIピクチャであると判定した
場合、符号化の処理をステップS6へ進める。
Then, in step S3, the motion estimation section 12 determines whether or not the divided target picture is an I picture. Here, the motion estimation unit 12
If it is determined that this target picture is an I picture, the encoding process proceeds to step S6.

【0030】次に、ステップS6において、動き推定部
12は、図6に示すように、ターゲット・ピクチャTに
対する符号化処理を、すべてのマクロブロックMIにつ
いて、例えば、矢印の順序により行う。すなわち、動き
推定部12は、左上角(第1行第1列)のマクロブロッ
クMI(1,1)から符号化処理を開始してから右方向
に進み、右上角(第1行第8列)のマクロブロックMI
(1,8)で一旦終了する。このマクロブロックMI
(1,1)〜マクロブロックMI(1,8)が、各ピク
チャないにおいて、マクロブロックを識別するマクロブ
ロックアドレスである。そして、動き推定部12は、直
ちに第2行に移り、第2行第1列のマクロブロックMI
(2,1)から第2行第8列のマクロブロックMI
(2,8)まで進む。以下、同様にして、動き推定部1
2は、第3行〜第6行について同じ動きを繰り返し、第
6行第8列のマクロブロックMI(6,8)で終了す
る。
Next, in step S6, the motion estimation unit 12 performs the encoding process on the target picture T for all macroblocks MI, for example, in the order of arrows, as shown in FIG. That is, the motion estimation unit 12 starts the encoding process from the macro block MI (1,1) in the upper left corner (first row, first column) and proceeds to the right, and then moves to the upper right corner (first row, eighth column). ) Macro block MI
It ends once with (1, 8). This macroblock MI
(1,1) to macroblock MI (1,8) are macroblock addresses for identifying macroblocks in each picture. Then, the motion estimation unit 12 immediately moves to the second row, and the macroblock MI in the second row and the first column.
Macro block MI from (2, 1) to the second row and eighth column
Proceed to (2,8). Hereinafter, similarly, the motion estimation unit 1
2 repeats the same movement for the third row to the sixth row, and ends at the macroblock MI (6,8) in the sixth row and eighth column.

【0031】動き推定部12は、Iピクチャの符号化
を、例えば、Iピクチャにおいて符号化が終了したマク
ロブロック(現在符号化を行っている自身)を参照マク
ロブロックとして参照して、新たに符号化するマクロブ
ロックと相似している相似マクロブロックの検出を行
う。すなわち、動き推定部12は、マクロブロックMI
(1,1)の符号化を行うが、Iピクチャであり、参照
できるマクロブロックがなく、イントラ符号化を行うた
め、そのままの状態で、マクロブロックを減算器13へ
出力し、イントラ符号化であることを示す符号化モード
のモード信号を動き予測部20へ出力する。このとき、
動き推定部12は、相似マクロブロックがないため、動
きベクトルのデータを動き予測部20に出力しない。
The motion estimator 12 refers to the coding of the I picture, for example, by referring to the macroblock that has been coded in the I picture (currently coding itself) as a reference macroblock and newly codes the code. Similar macroblocks that are similar to the macroblock to be converted are detected. That is, the motion estimation unit 12 uses the macroblock MI
Although (1, 1) is encoded, it is an I picture, and there is no macro block that can be referred to. Since intra encoding is performed, the macro block is output to the subtractor 13 as it is and The mode signal of the coding mode indicating that there is is output to the motion prediction unit 20. At this time,
The motion estimation unit 12 does not output the motion vector data to the motion prediction unit 20 because there is no similar macroblock.

【0032】そして、動き予測部20は、動き推定部1
2からイントラ符号化を示すモード信号が入力されるた
め、このモード信号に対応するマクロブロックMI
(1,1)が減算器13に入力した時点で、減算器13
に対して減算指令を出力しない。このとき、減算器13
は、動き予測部20から減算指令がこないため、入力さ
れたマクロブロックMI(1,1)をそのままの状態で
出力する。次に、DCT部14は、このマクロブロック
MI(1,1)を、4×4ドットのブロックに分割し、
各ブロックのDCT処理を行い、この処理結果をマクロ
ブロックMID(1,1)として量子化部15へ出力す
る。
Then, the motion predicting section 20 includes the motion estimating section 1
Since a mode signal indicating intra coding is input from 2, the macro block MI corresponding to this mode signal is input.
When (1, 1) is input to the subtractor 13, the subtractor 13
The subtraction command is not output to. At this time, the subtractor 13
Does not receive a subtraction command from the motion prediction unit 20, and therefore outputs the input macroblock MI (1,1) as it is. Next, the DCT unit 14 divides this macroblock MI (1,1) into blocks of 4 × 4 dots,
DCT processing of each block is performed, and the processing result is output to the quantizer 15 as a macroblock MID (1,1).

【0033】そして、量子化部15は、入力されるマク
ロブロックMID(1,1)を量子化し、処理結果をマク
ロブロックMIQ(1,1)として出力する。これによ
り、可変長符号化16は、上記マクロブロックMIQ
(1,1)を可変長符号化し、マクロブロックMIV
(1,1)として出力する。次に、多重化部22は、上
記マクロブロックMIV(1,1)を、イントラ符号化で
あることを示す符号化モードのモード信号(符号化する
画像がIピクチャであることを示す、ピクチャの種類を
示す識別信号を含む)と多重化して、バッファ23へ出
力する。
The quantizer 15 quantizes the input macroblock MID (1,1) and outputs the processing result as the macroblock MIQ (1,1). As a result, the variable length coding 16 determines that the macroblock MIQ
(1,1) is variable length coded to generate macroblock MIV
Output as (1,1). Next, the multiplexing unit 22 encodes the macroblock MIV (1,1) into a mode signal of a coding mode indicating that the macroblock MIV (1,1) is to be intra-coded (a picture signal indicating that an image to be coded is an I picture. (Including an identification signal indicating the type) and output to the buffer 23.

【0034】また、逆量子化部17は、量子化部15の
出力するマクロブロックMIQ(1,1)の逆量子化を行
い、マクロブロックMID'(1,1)を再生し、IDC
T部18へ出力する。以下、復号されたブロックには、
復号結果が非可逆的なため、元のマクロブロックと区別
するために、「'」をマクロブロックの名称に添付す
る。そして、IDCT部18は、入力されるマクロブロ
ックMID'(1,1)に対して、逆離散コサイン変換を
行い、マクロブロックMI'(1,1)を再生して、加算
器19へ出力する。
The inverse quantizer 17 inversely quantizes the macroblock MIQ (1,1) output from the quantizer 15 to reproduce the macroblock MID '(1,1), and the IDC
Output to the T section 18. Hereafter, the decoded block contains
Since the decoding result is irreversible, "'" is attached to the name of the macroblock in order to distinguish it from the original macroblock. Then, the IDCT unit 18 performs inverse discrete cosine transform on the input macroblock MID ′ (1,1), reproduces the macroblock MI ′ (1,1), and outputs it to the adder 19. .

【0035】このとき、加算器19は、このマクロブロ
ックMI'(1,1)が、イントラ符号化されたマクロブ
ロックMI(1,1)に対応しているため、動き予測部
20から加算指令が出力されないため、マクロブロック
MI(1,1)に、何のデータも加算されずに、ピクチ
ャ蓄積部21のIピクチャの識別番号に対応する領域に
記憶される。すなわち、ピクチャ蓄積部21には、バッ
ファ23からビットストリームとして送信され、受信先
で再生されるIピクチャの画像と同様の、再生された画
像が蓄積される(記憶される)。
At this time, since the macroblock MI '(1,1) corresponds to the intra-coded macroblock MI (1,1), the adder 19 issues an addition command from the motion prediction unit 20. Is not output, no data is added to the macroblock MI (1,1) and is stored in the area corresponding to the identification number of the I picture in the picture storage unit 21. That is, the picture storage unit 21 stores (stores) a reproduced image similar to the image of the I picture transmitted from the buffer 23 as a bit stream and reproduced at the reception destination.

【0036】そして、動き推定部12は、図3に示すよ
うに、符号化が進み、マクロブロックMI(4,4)の
符号化を行う場合、マクロブロックMI(4,4)と、
ピクチャ蓄積部21から読み出したマクロブロックMI'
(1,1)〜MI'(4,3)各々との、差分データを演
算し、マクロブロックMI'(4,1)がマクロブロック
MI'(1,1)〜MI'(4,3)のうち、マクロブロッ
クMI(4,4)との差分データが最も小さく、所定の
相似度を超えている(差分データが設定された値以下で
ある)と判定すると、マクロブロックMI'(4,1)を
相似マクロブロックとして抽出する。
Then, as shown in FIG. 3, the motion estimation unit 12 advances the coding, and when the macroblock MI (4, 4) is coded, the motion estimation section 12 defines the macroblock MI (4, 4),
Macroblock MI ′ read from the picture storage unit 21
The difference data with respect to each of (1, 1) to MI '(4, 3) is calculated, and the macroblock MI' (4, 1) is converted into macroblocks MI '(1, 1) to MI' (4, 3). Among them, when it is determined that the difference data with the macro block MI (4, 4) is the smallest and exceeds the predetermined similarity (the difference data is less than or equal to the set value), the macro block MI ′ (4, 4). 1) is extracted as a similar macroblock.

【0037】したがって、動き推定部12は、マクロブ
ロックMI(4,4)の符号化を行うが、マクロブロッ
クMI'(4,1)を相似マクロブロックとするため、同
一フレーム内予測符号化(同一ピクチャ内のマクロブロ
ックを相似ブロックとした符号化)を行うことを示す符
号化モードのモード信号を動き予測部20へ出力すると
ともに、マクロブロックMI(4,4)を減算器13へ
出力する。このとき、動き推定部12は、マスクブロッ
クMI(4,4)の位置に対応した、マスクブロックM
I'(4,1)の相対位置を示す動きベクトルを、動き予
測部20及び多重化部22へ出力する。
Therefore, the motion estimation unit 12 encodes the macro block MI (4,4), but since the macro block MI '(4,1) is a similar macro block, the same intra-frame prediction encoding ( A mode signal of a coding mode indicating that macroblocks in the same picture are encoded as similar blocks) is output to the motion prediction unit 20 and the macroblocks MI (4,4) are output to the subtractor 13. . At this time, the motion estimation unit 12 has the mask block M corresponding to the position of the mask block MI (4,4).
The motion vector indicating the relative position of I ′ (4,1) is output to the motion prediction unit 20 and the multiplexing unit 22.

【0038】そして、動き予測部20は、動き推定部1
2から同一フレーム内予測符号化を示すモード信号が入
力されるため、このモード信号に対応するマクロブロッ
クMI(4,4)が減算器13に入力された時点で、減
算器13に対して減算指令を出力するとともに、ピクチ
ャ蓄積部21から減算に用いるマクロブロックMI'
(4,1)を読み出し、減算器13へ出力する。このと
き、減算器13は、動き予測部20から減算指令及び減
算に用いるマクロブロックMI'(4,1)のデータが入
力されるため、入力されたマクロブロックMI(4,
4)からマクロブロックMI'(4,1)を減算して、こ
の減算結果を残差予測データMS(4,4)として、D
CT部14へ出力する。
Then, the motion predicting section 20 includes the motion estimating section 1
Since a mode signal indicating the same intraframe predictive coding is input from 2, the subtraction is performed on the subtractor 13 at the time when the macroblock MI (4, 4) corresponding to this mode signal is input to the subtractor 13. A macroblock MI ′ used for subtraction from the picture storage unit 21 while outputting a command.
(4, 1) is read and output to the subtractor 13. At this time, the subtractor 13 receives the subtraction command and the data of the macroblock MI ′ (4,1) used for the subtraction from the motion prediction unit 20, and thus the input macroblock MI (4,4).
4), the macroblock MI '(4, 1) is subtracted, and the subtraction result is used as residual prediction data MS (4, 4) to obtain D
Output to the CT unit 14.

【0039】次に、DCT部14は、このマクロブロッ
クMI(4,4)の残差予測データMS(4,4)を、4
×4ドットのブロックに分割し、各ブロックのDCT処
理を行い、この処理結果をマクロブロックMSD(4,
4)として量子化部15へ出力する。そして、量子化部
15は、入力されるマクロブロックMSD(4,4)を量
子化し、処理結果をマクロブロックMSQ(4,4)とし
て出力する。これにより、可変長符号化16は、上記マ
クロブロックMSQ(4,4)を可変長符号化し、マクロ
ブロックMSV(4,4)として出力する。次に、多重化
部22は、上記マクロブロックMSV(4,4)を、フレ
ーム間順方向予測符号化であることを示す符号化モード
のモード信号(符号化する画像がIピクチャであること
を示す、ピクチャの種類を示す識別信号を含む)と多重
化して、バッファ23へ出力する。
Next, the DCT unit 14 outputs the residual prediction data MS (4,4) of this macroblock MI (4,4) to 4
It is divided into blocks of × 4 dots, DCT processing of each block is performed, and the processing result is defined as macroblock MSD (4,
4) to the quantizer 15. Then, the quantizer 15 quantizes the input macroblock MSD (4, 4) and outputs the processing result as the macroblock MSQ (4, 4). As a result, the variable length coding 16 performs variable length coding on the macroblock MSQ (4,4) and outputs it as the macroblock MSV (4,4). Next, the multiplexing unit 22 encodes the macroblock MSV (4, 4) into a mode signal of an encoding mode indicating that the macroblock MSV (4, 4) is forward prediction encoding between frames (the image to be encoded is an I picture. (Including an identification signal indicating the type of picture) shown in FIG.

【0040】また、逆量子化部17は、量子化部15の
出力するマクロブロックMSQ(4,4)の逆量子化を行
い、マクロブロックMSD'(4,4)を再生し、IDC
T部18へ出力する。そして、IDCT部18は、入力
されるマクロブロックMSD'(4,4)に対して、逆離
散コサイン変換を行い、残差予測信号MS'(4,4)を
再生して、加算器19へ出力する。
The inverse quantizer 17 inversely quantizes the macroblock MSQ (4,4) output from the quantizer 15 to reproduce the macroblock MSD '(4,4), and IDC
Output to the T section 18. Then, the IDCT unit 18 performs an inverse discrete cosine transform on the input macroblock MSD '(4, 4), reproduces the residual prediction signal MS' (4, 4), and sends it to the adder 19. Output.

【0041】このとき、加算器19は、この予測残差信
号MS'(4,4)が、同一フレーム内予測符号化された
マクロブロックMI(4,4)に対応しているため、動
き予測部20から加算指令が出力され、動き予測部20
がピクチャ蓄積部21から読み出したマクロブロックM
I'(4,1)と、予測算差信号MS'(4,4)とが加算
されて、マクロブロックMI'(4,4)が復号化され
る。そして、加算器19は、この復号化されたマクロブ
ロックMI'(4,4)を、ピクチャ蓄積部21のIピク
チャの識別番号に対応する領域に記憶する。
At this time, since the prediction residual signal MS '(4, 4) corresponds to the macroblock MI (4, 4) that has been intraframe-prediction coded, the adder 19 performs the motion prediction. The addition command is output from the unit 20, and the motion prediction unit 20
The macroblock M read from the picture storage unit 21
I ′ (4,1) and the prediction difference signal MS ′ (4,4) are added to decode the macroblock MI ′ (4,4). Then, the adder 19 stores the decoded macroblock MI ′ (4,4) in the area corresponding to the identification number of the I picture in the picture storage unit 21.

【0042】一方、動き推定部12は、同様に、MI
(4,7)の符号化を行う場合、MI(4,7)と、M
I'(1,1)〜MI’(4,6)各々との、差分データ
を演算し、MI'(1,1)〜MI'(4,6)のうち、マ
クロブロックMI'(2,4)がマクロブロックM(4,
7)との差分データが最も小さいと判断するが、所定の
相似度を超えていない(差分データが設定された値を越
えている)と判定すると、マクロブロックMI'(2,
4)を相似マクロブロックとして使用せず、マクロブロ
ックMI'(1,1)と同様に、イントラ符号化を行うこ
とととする。したがって、動き推定部12は、同一フレ
ーム内予測符号化することを示す符号化モードのモード
信号を動き予測部20へ出力する。以降のマクロブロッ
クMI(4,7)処理は、マクロブロックMI(1,1)
と同様のため、説明を省略する。
On the other hand, the motion estimation unit 12 similarly
When encoding (4,7), MI (4,7) and M
Difference data from each of I '(1,1) to MI' (4,6) is calculated, and macro blocks MI '(2,6) out of MI' (1,1) to MI '(4,6) are calculated. 4) is the macroblock M (4,
It is determined that the difference data with 7) is the smallest, but if it is determined that the similarity does not exceed the predetermined similarity (the difference data exceeds the set value), the macroblock MI ′ (2,
It is assumed that 4) is not used as a similar macroblock, and that intra-coding is performed in the same manner as the macroblock MI ′ (1,1). Therefore, the motion estimation unit 12 outputs to the motion prediction unit 20 a mode signal of a coding mode indicating that the same intraframe predictive coding is to be performed. The subsequent macroblock MI (4, 7) processing is performed by the macroblock MI (1, 1).
Since it is the same as, the description will be omitted.

【0043】そして、動き推定部12は、Iピクチャに
おけるマクロブロックMI(6,8)の符号化が終了す
ると、全てのマクロブロックの符号化が終了したとし
て、処理をステップS1に戻す。この時点で、ピクチャ
蓄積部21には、一度符号化(予測符号化,DCT処
理,量子化等により)されて、復号化された状態のIピ
クチャの画像データが格納されている。
Then, when the coding of the macroblock MI (6,8) in the I picture is completed, the motion estimation unit 12 determines that the coding of all the macroblocks is completed and returns the process to step S1. At this point, the picture storage unit 21 stores the I-picture image data that has been encoded (by predictive encoding, DCT processing, quantization, etc.) and then decoded.

【0044】そして、ステップS1において、ピクチャ
並べ替え部11は、次に入力されるPピクチャ(N+
3)をターゲットピクチャとして設定する。次に、ステ
ップS2において、動き推定部12は、ターゲットピク
チャを16×16ドットのマクロブロックに分割する。
ここでは、動き推定部12は、図3〜図6に示すよう
に、Pピクチャを、縦方向に8行、横方向に6列のマト
リクスに分割、すなわち、48個のマクロブロック(マ
クロブロックMP(1,1)〜MP(6,8))に分割す
る。
Then, in step S1, the picture rearranging section 11 inputs the P picture (N +
3) is set as the target picture. Next, in step S2, the motion estimation unit 12 divides the target picture into macroblocks of 16 × 16 dots.
Here, as shown in FIGS. 3 to 6, the motion estimation unit 12 divides the P picture into a matrix of 8 rows in the vertical direction and 6 columns in the horizontal direction, that is, 48 macro blocks (macro block MP (1,1) to MP (6,8)).

【0045】そして、ステップS3において、動き推定
部12は、分割したターゲットピクチャがIピクチャで
あるか否かの判定を行う。ここで、動き推定部12は、
このターゲットピクチャがIピクチャでないと判定し、
処理をステップS4へ進める。次に、ステップS4にお
いて、動き推定部12は、分割したターゲットピクチャ
がPピクチャであるか否かの判定を行う。ここで、動き
推定部12は、このターゲットピクチャがPピクチャで
あると判定した場合、符号化の処理をステップS7へ進
める。
Then, in step S3, the motion estimation section 12 determines whether or not the divided target picture is an I picture. Here, the motion estimation unit 12
It is determined that this target picture is not an I picture,
The process proceeds to step S4. Next, in step S4, the motion estimation unit 12 determines whether or not the divided target picture is a P picture. Here, when the motion estimation unit 12 determines that the target picture is a P picture, the motion estimation unit 12 advances the encoding process to step S7.

【0046】次に、ステップS7において、動き推定部
12は、図6に示すように、ターゲットピクチャTに対
する符号化処理を、すでに述べたIピクチャのときと同
様に、すべてのマクロブロックMPについて、例えば、
矢印の順序により行う。すなわち、動き推定部12は、
左上角(第1行第1列)のマクロブロックMP(1,
1)から符号化処理を開始してから右方向に進み、右上
角(第1行第8列)のマクロブロックMP(1,8)で
一旦終了する。そして、動き推定部12は、直ちに第2
行に移り、第2行第1列のマクロブロックMP(2,
1)から第2行第8列のマクロブロックMP(2,8)
まで進む。以下、同様にして、動き推定部12は、第3
行〜第6行について同じ動きを繰り返し、第6行第8列
のマクロブロックMP(6,8)で終了する。
Next, in step S7, as shown in FIG. 6, the motion estimation unit 12 performs the coding process on the target picture T for all macroblocks MP as in the case of the I picture already described. For example,
Follow the order of the arrows. That is, the motion estimation unit 12
Macro block MP (1, in the upper left corner (first row, first column))
After starting the encoding process from 1), the process proceeds to the right, and ends at the macro block MP (1,8) at the upper right corner (first row, eighth column). Then, the motion estimation unit 12 immediately outputs the second
Moving to the row, the macroblock MP (2, row 1, column 1)
1) to macro block MP (2,8) in the second row and eighth column
Proceed to. Thereafter, in the same manner, the motion estimation unit 12 determines the third
The same movement is repeated for the rows to the sixth row, and ends at the macroblock MP (6,8) in the sixth row and eighth column.

【0047】動き推定部12は、Pピクチャの符号化
を、例えば、ピクチャ蓄積部21に格納されているIピ
クチャと、符号化が終了したPピクチャ(現在符号化を
行っている自身)のマクロブロックとを参照マクロブロ
ック(及び参照画像)として参照して、新たに符号化す
るマクロブロックと相似している相似マクロブロックの
検出を行う。すなわち、動き推定部12は、マクロブロ
ックMP(1,1)の符号化を、ピクチャ蓄積部21に
蓄積されているIピクチャのマクロブロックを、参照マ
クロブロックとして、符号化を行う。
The motion estimator 12 encodes P-pictures, for example, macros of I-pictures stored in the picture accumulator 21 and P-pictures that have been encoded (currently encoding themselves). The block is referred to as a reference macroblock (and a reference image), and a similar macroblock that is similar to the macroblock to be newly encoded is detected. That is, the motion estimation unit 12 encodes the macroblock MP (1,1) using the I-picture macroblock stored in the picture storage unit 21 as a reference macroblock.

【0048】そして、動き推定部12は、図4に示すよ
うに、マクロブロックMP(1,1)から符号化を開始
し、符号化が進み、マクロブロックMP(1,6)の符
号化を行うとき、マクロブロックMP(1,6)と、ピ
クチャ蓄積部21に格納されているIピクチャのマクロ
ブロックMI'(1,1)〜MI'(6,8),Pピクチャ
のマクロブロックMP'(1,1)〜MP'(1,5)各々
との差分データを演算して求め、マクロブロックMI'
(5,6)がマクロブロックMI'(1,1)〜MI'
(6,8),マクロブロックMP'(1,1)〜MP'
(1,5)のうち、マクロブロックMP(1,6)との
差分データが最も小さく、所定の相似度を超えている
(差分データが設定された値以下である)と判定する
と、マクロブロックMI'(5,6)を相似マクロブロッ
クとして抽出する。
Then, as shown in FIG. 4, the motion estimator 12 starts the coding from the macroblock MP (1,1), the coding advances, and the coding of the macroblock MP (1,6) starts. When performing, the macroblock MP (1,6), the macroblocks MI ′ (1,1) to MI ′ (6,8) of the I-picture stored in the picture storage unit 21, and the macroblock MP ′ of the P-picture. (1,1) to MP '(1,5) Difference data with each of them is calculated to obtain the macro block MI'.
(5, 6) is the macroblock MI '(1, 1) to MI'
(6, 8), macroblocks MP '(1, 1) to MP'
Of the (1, 5), the difference data with the macro block MP (1, 6) is the smallest, and if it is determined that the similarity exceeds a predetermined similarity (the difference data is less than or equal to a set value), the macro block MI ′ (5,6) is extracted as a similar macroblock.

【0049】したがって、動き推定部12は、マクロブ
ロックMP(1,6)の符号化を行うが、マクロブロッ
クMI'(5,6)を相似マクロブロックとするため、フ
レーム間順方向予測符号化(過去のピクチャ,すなわち
Iピクチャ内のマクロブロックを相似ブロックとした符
号化)を行うことを示す符号化モードのモード信号を動
き予測部20へ出力するとともに、マクロブロックMI
(1,6)を減算器13へ出力する。このとき、動き推
定部12は、マスクブロックMI(1,6)の位置に対
応した、マスクブロックMI'(5,6)の相対位置を示
す動きベクトルを、動き予測部20及び多重化部22へ
出力する。
Therefore, the motion estimation unit 12 encodes the macro block MP (1,6), but since the macro block MI '(5,6) is a similar macro block, the inter-frame forward prediction encoding is performed. A mode signal of a coding mode indicating that (previous picture, that is, a macro block in an I picture is encoded as a similar block) is output to the motion prediction unit 20, and the macro block MI is also output.
(1,6) is output to the subtractor 13. At this time, the motion estimation unit 12 uses the motion vector indicating the relative position of the mask block MI ′ (5,6) corresponding to the position of the mask block MI (1,6) as the motion prediction unit 20 and the multiplexing unit 22. Output to.

【0050】そして、動き予測部20は、動き推定部1
2からフレーム間順方向予測符号化を示すモード信号が
入力されるため、このモード信号に対応するマクロブロ
ックMP(1,6)が減算器13に入力された時点で、
減算器13に対して減算指令を出力するとともに、ピク
チャ蓄積部21から減算に用いるマクロブロックMI'
(5,6)を読み出し、減算器13へ出力する。このと
き、減算器13は、動き予測部20から減算指令及び減
算に用いるマクロブロックMI'(5,6)のデータが入
力されるため、入力されたマクロブロックMP(1,
6)からマクロブロックMI'(5,6)を減算して、こ
の減算結果を残差予測データMS(1,6)として、D
CT部14へ出力する。
Then, the motion prediction section 20 is connected to the motion estimation section 1
Since the mode signal indicating the inter-frame forward predictive coding is input from 2, the macro block MP (1,6) corresponding to this mode signal is input to the subtractor 13,
The subtraction command is output to the subtractor 13, and the macro block MI ′ used for subtraction from the picture storage unit 21.
(5, 6) is read and output to the subtractor 13. At this time, the subtractor 13 receives the subtraction command and the data of the macroblock MI '(5, 6) used for the subtraction from the motion prediction unit 20, and thus the input macroblock MP (1,
6), the macroblock MI '(5, 6) is subtracted, and the subtraction result is used as residual prediction data MS (1, 6) to obtain D
Output to the CT unit 14.

【0051】次に、DCT部14は、このマクロブロッ
クMP(1,6)の残差予測データMS(1,6)を、4
×4ドットのブロックに分割し、各ブロックのDCT処
理を行い、この処理結果をマクロブロックMSD(1,
6)として量子化部15へ出力する。そして、量子化部
15は、入力されるマクロブロックMSD(1,6)を量
子化し、処理結果をマクロブロックMSQ(1,6)とし
て出力する。これにより、可変長符号化16は、上記マ
クロブロックMSQ(1,6)を可変長符号化し、マクロ
ブロックMSV(1,6)として出力する。次に、多重化
部22は、上記マクロブロックMSV(1,6)を、フレ
ーム間順方向予測符号化であることを示す符号化モード
のモード信号(符号化する画像がPピクチャであること
を示す、ピクチャの種類を示す識別信号を含む) と、
マスクブロックMI(1,6)及びマスクブロックMI'
(5,6)の相対位置を示す動きベクトルとともに多重
化し、バッファ23へ出力する。
Next, the DCT unit 14 outputs the residual prediction data MS (1,6) of this macroblock MP (1,6) to 4
It is divided into blocks of × 4 dots, DCT processing of each block is performed, and the processing result is defined as macroblock MSD (1,
6) to the quantizer 15. Then, the quantization unit 15 quantizes the input macroblock MSD (1,6) and outputs the processing result as the macroblock MSQ (1,6). As a result, the variable length coding 16 performs variable length coding on the macroblock MSQ (1,6) and outputs it as the macroblock MSV (1,6). Next, the multiplexing unit 22 encodes the macroblock MSV (1,6) into a mode signal of an encoding mode indicating that the macroblock MSV (1,6) is forward prediction encoding (the image to be encoded is a P picture. , Including the identification signal indicating the type of picture)
Mask block MI (1,6) and mask block MI '
It is multiplexed with the motion vector indicating the relative position of (5, 6) and output to the buffer 23.

【0052】そして、バッファ23は、マクロブロック
MSV(1,6),モード信号,動きベクトルが多重化さ
れたビットストリームを出力する。また、逆量子化部1
7は、量子化部15の出力するマクロブロックMSQ
(1,6)の逆量子化を行い、マクロブロックMSD'
(1,6)を再生し、IDCT部18へ出力する。そし
て、IDCT部18は、入力されるマクロブロックMS
D'(1,6)に対して、逆離散コサイン変換を行い、残
差予測信号MS'(1,6)を再生して、加算器19へ出
力する。
Then, the buffer 23 outputs a bit stream in which the macro block MSV (1,6), the mode signal and the motion vector are multiplexed. In addition, the inverse quantizer 1
7 is a macro block MSQ output from the quantizer 15.
Inverse quantization of (1,6) is performed and macroblock MSD '
(1,6) is reproduced and output to the IDCT unit 18. Then, the IDCT section 18 receives the input macroblock MS
Inverse discrete cosine transform is performed on D ′ (1,6) to reproduce the residual prediction signal MS ′ (1,6), which is output to the adder 19.

【0053】このとき、加算器19は、この予測残差信
号MS'(1,6)が、フレーム内予測符号化されたマク
ロブロックMP(1,6)に対応しているため、動き予
測部20から加算指令が出力され、動き予測部20がピ
クチャ蓄積部21から読み出したマクロブロックMI'
(5,6)と、予測算差信号MS'(1,6)とが加算さ
れて、マクロブロックMP'(1,6)が復号化される。
そして、加算器19は、この復号化されたマクロブロッ
クMP'(1,6)を、ピクチャ蓄積部21のPピクチャ
の識別番号に対応する領域に記憶する。
At this time, since the prediction residual signal MS '(1,6) corresponds to the intra-frame predictive-coded macroblock MP (1,6), the adder 19 calculates the motion prediction unit. 20 outputs an addition command, and the motion prediction unit 20 reads the macroblock MI ′ from the picture storage unit 21.
(5, 6) and the prediction difference signal MS '(1, 6) are added to decode the macroblock MP' (1, 6).
Then, the adder 19 stores the decoded macroblock MP '(1, 6) in the area corresponding to the identification number of the P picture in the picture storage unit 21.

【0054】そして、動き推定部12は、さらに、符号
化が進み、マクロブロックMP(5,6)の符号化を行
うとき、マクロブロックMP(5,6)と、ピクチャ蓄
積部21に格納されているIピクチャのマクロブロック
MI'(1,1)〜MI'(6,8),Pピクチャのマクロ
ブロックMP'(1,1)〜MP'(5,5)各々との差分
データを演算して求め、マクロブロックMP'(2,3)
がマクロブロックMI'(1,1)〜MI'(6,8),マ
クロブロックMP'(1,1)〜MP'(5,5)のうち、
マクロブロックMP(5,6)との差分データが最も小
さく、所定の相似度を超えている(差分データが設定さ
れた値以下である)と判定すると、マクロブロックMP'
(2,3)を相似マクロブロックとして抽出する。
Then, the motion estimation unit 12 is further stored in the picture storage unit 21 and the macro block MP (5, 6) when the coding proceeds and the macro block MP (5, 6) is coded. The difference data between each of the I picture macroblocks MI '(1,1) to MI' (6,8) and the P picture macroblocks MP '(1,1) to MP' (5,5). Macro block MP '(2,3)
Among the macro blocks MI '(1,1) to MI' (6,8) and the macro blocks MP '(1,1) to MP' (5,5),
When it is determined that the difference data with the macro block MP (5, 6) is the smallest and exceeds the predetermined similarity (the difference data is less than or equal to the set value), the macro block MP '
(2, 3) is extracted as a similar macroblock.

【0055】したがって、動き推定部12は、マクロブ
ロックMP(5,6)の符号化を行うが、マクロブロッ
クMP'(2,3)を相似マクロブロックとするため、同
一フレーム内予測符号化(現在符号化処理を行っている
ピクチャ,すなわちPピクチャ内のマクロブロックを相
似ブロックとした符号化)を行うことを示す符号化モー
ドのモード信号を動き予測部20へ出力するとともに、
マクロブロックMP(5,6)を減算器13へ出力す
る。このとき、動き推定部12は、マスクブロックMP
(5,6)の位置に対応した、マスクブロックMP'
(2,3)の相対位置を示す動きベクトルを、動き予測
部20及び多重化部22へ出力する。
Therefore, the motion estimation unit 12 encodes the macroblock MP (5, 6), but since the macroblock MP '(2, 3) is a similar macroblock, the same intraframe prediction encoding ( A mode signal of a coding mode indicating that a picture currently being coded, that is, a macro block in a P picture is coded as a similar block is output to the motion prediction unit 20, and
The macro block MP (5, 6) is output to the subtractor 13. At this time, the motion estimation unit 12 determines that the mask block MP
Mask block MP 'corresponding to the position of (5, 6)
The motion vector indicating the relative position of (2, 3) is output to the motion prediction unit 20 and the multiplexing unit 22.

【0056】そして、動き予測部20は、動き推定部1
2から同一内予測符号化を示すモード信号が入力される
ため、このモード信号に対応するマクロブロックMP
(5,6)が減算器13に入力された時点で、減算器1
3に対して減算指令を出力するとともに、ピクチャ蓄積
部21から減算に用いるマクロブロックMP'(2,3)
を読み出し、減算器13へ出力する。このとき、減算器
13は、動き予測部20から減算指令及び減算に用いる
マクロブロックMP'(5,6)のデータが入力されるた
め、入力されたマクロブロックMP(5,6)からマク
ロブロックMP'(2,3)を減算して、この減算結果を
残差予測データMS(5,6)として、DCT部14へ
出力する。
Then, the motion predicting section 20 includes the motion estimating section 1
Since the mode signal indicating the same intra prediction coding is input from 2, the macro block MP corresponding to this mode signal is input.
When (5, 6) is input to the subtractor 13, the subtracter 1
3, a subtraction command is output, and a macro block MP '(2, 3) used for subtraction from the picture storage unit 21.
Is read out and output to the subtracter 13. At this time, the subtractor 13 receives the subtraction command and the data of the macroblock MP '(5, 6) used for the subtraction from the motion prediction unit 20, so that the input macroblock MP (5, 6) to the macroblock MP (5, 6) MP '(2, 3) is subtracted, and the subtraction result is output to the DCT unit 14 as residual prediction data MS (5, 6).

【0057】次に、DCT部14は、このマクロブロッ
クMP(5,6)の残差予測データMS(5,6)を、4
×4ドットのブロックに分割し、各ブロックのDCT処
理を行い、この処理結果をマクロブロックMSD(5,
6)として量子化部15へ出力する。そして、量子化部
15は、入力されるマクロブロックMSD(5,6)を量
子化し、処理結果をマクロブロックMSQ(5,6)とし
て出力する。これにより、可変長符号化16は、上記マ
クロブロックMSQ(5,6)を可変長符号化し、マクロ
ブロックMSV(5,6)として出力する。次に、多重化
部22は、上記マクロブロックMSV(5,6)を、同一
フレーム内予測符号化であることを示す符号化モードの
モード信号(符号化する画像がPピクチャであることを
示す、ピクチャの種類を示す識別信号を含む)と、マス
クブロックMP(5,6)及びマスクブロックMP'
(2,3)の相対位置を示す動きベクトルとともに多重
化し、バッファ23へ出力する。
Next, the DCT unit 14 outputs the residual prediction data MS (5,6) of this macroblock MP (5,6) to 4
It is divided into blocks of × 4 dots, DCT processing is performed on each block, and the processing result is set to macroblock MD (5,
6) to the quantizer 15. Then, the quantizer 15 quantizes the input macroblock MSD (5, 6) and outputs the processing result as the macroblock MSQ (5, 6). As a result, the variable length coding 16 performs variable length coding on the macroblock MSQ (5, 6) and outputs it as the macroblock MSV (5, 6). Next, the multiplexing unit 22 encodes the macroblock MSV (5, 6) into a mode signal in a coding mode indicating that the macroblock MSV (5, 6) is in the same frame predictive coding (indicating that the image to be coded is a P picture. , And a mask block MP (5, 6) and a mask block MP ′.
It is multiplexed with the motion vector indicating the relative position of (2, 3) and output to the buffer 23.

【0058】そして、バッファ23は、マクロブロック
MSV(5,6),モード信号,動きベクトルが多重化さ
れたビットストリームを出力する。また、逆量子化部1
7は、量子化部15の出力するマクロブロックMSQ
(5,6)の逆量子化を行い、マクロブロックMSD'
(5,6)を再生し、IDCT部18へ出力する。そし
て、IDCT部18は、入力されるマクロブロックMS
D'(5,6)に対して、逆離散コサイン変換を行い、残
差予測信号MS'(5,6)を再生して、加算器19へ出
力する。
Then, the buffer 23 outputs a bit stream in which the macro block MSV (5, 6), the mode signal and the motion vector are multiplexed. In addition, the inverse quantizer 1
7 is a macro block MSQ output from the quantizer 15.
Inverse quantization of (5, 6) is performed, and macroblock MSD '
(5, 6) is reproduced and output to the IDCT unit 18. Then, the IDCT section 18 receives the input macroblock MS
The inverse discrete cosine transform is performed on D ′ (5,6) to reproduce the residual prediction signal MS ′ (5,6) and output to the adder 19.

【0059】このとき、加算器19は、この予測残差信
号MS'(5,6)が、同一フレーム内予測符号化された
マクロブロックMP(5,6)に対応しているため、動
き予測部20から加算指令が出力され、動き予測部20
がピクチャ蓄積部21から読み出したマクロブロックM
P'(2,3)と、予測算差信号MS'(5,6)とが加算
されて、マクロブロックMP'(5,6)が復号化され
る。そして、加算器19は、この復号化されたマクロブ
ロックMP'(5,6)を、ピクチャ蓄積部21のPピク
チャの識別番号に対応する領域に記憶する。
At this time, since the prediction residual signal MS '(5, 6) corresponds to the same intra-frame predictive-coded macroblock MP (5, 6), the adder 19 performs motion prediction. The addition command is output from the unit 20, and the motion prediction unit 20
The macroblock M read from the picture storage unit 21
The macro block MP '(5, 6) is decoded by adding P' (2, 3) and the prediction difference signal MS '(5, 6). Then, the adder 19 stores the decoded macroblock MP '(5, 6) in the area corresponding to the identification number of the P picture in the picture storage unit 21.

【0060】そして、動き推定部12は、さらに、符号
化が進み、マクロブロックMP(6,3)の符号化を行
うとき、マクロブロックMP(6,3)と、ピクチャ蓄
積部21に格納されているIピクチャのマクロブロック
MI'(1,1)〜MI'(6,8),Pピクチャのマクロ
ブロックMP'(1,1)〜MP'(6,2)各々との差分
データを演算して求め、マクロブロックMI'(5,6)
がマクロブロックMI'(1,1)〜MI'(6,8),マ
クロブロックMP'(1,1)〜MP'(6,2)のうち、
マクロブロックMP(6,3)との差分データが最も小
さいと判定する。
Then, the motion estimation unit 12 is further stored in the picture storage unit 21 and the macro block MP (6, 3) when the coding proceeds and the macro block MP (6, 3) is coded. The difference data between each of the I picture macro blocks MI '(1,1) to MI' (6,8) and the P picture macro blocks MP '(1,1) to MP' (6,2). Macro block MI '(5,6)
Among the macroblocks MI ′ (1,1) to MI ′ (6,8) and macroblocks MP ′ (1,1) to MP ′ (6,2),
It is determined that the difference data with the macroblock MP (6, 3) is the smallest.

【0061】次に、動き推定部12は、上記差分データ
が所定の相似度を超えていない(差分データが設定され
た値を越えている)と判定すると、イントラ符号化を行
うことを示す符号化モードのモード信号を、動き予測部
20へ出力する。以下の符号化処理については、すでに
述べたマクロブロックMI(1,1)と同様の処理のた
め、説明を省略する。最終的に、バッファ23は、マク
ロブロックMSV(6,3),モード信号が多重化された
ビットストリームを出力する。そして、加算器19は、
この復号化されたマクロブロックMP'(6,3)を、ピ
クチャ蓄積部21のPピクチャの識別番号に対応する領
域に記憶する。次に、動き推定部12は、Pピクチャに
おけるマクロブロックMP(6,8)の符号化が終了す
ると、全てのマクロブロックの符号化が終了したとし
て、処理をステップS1に戻す。この時点で、ピクチャ
蓄積部21には、一度符号化(予測符号化,DCT処
理,量子化等により)されて、復号化された状態のIピ
クチャ及びPピクチャの画像データが格納されている。
Next, when the motion estimation unit 12 determines that the difference data does not exceed the predetermined similarity (the difference data exceeds the set value), a code indicating that intra coding is to be performed. The mode signal of the conversion mode is output to the motion prediction unit 20. The following encoding process is the same as that of the macro block MI (1,1) already described, and thus the description thereof is omitted. Finally, the buffer 23 outputs the bitstream in which the macroblock MSV (6,3) and the mode signal are multiplexed. And the adder 19
The decoded macro block MP '(6, 3) is stored in the area corresponding to the identification number of the P picture in the picture storage unit 21. Next, when the encoding of the macroblock MP (6, 8) in the P picture is completed, the motion estimation unit 12 determines that the encoding of all macroblocks is completed, and returns the process to step S1. At this point, the picture storage unit 21 stores the image data of the I picture and P picture that have been coded once (by predictive coding, DCT processing, quantization, etc.) and decoded.

【0062】図7に戻り、ステップS1において、ピク
チャ並べ替え部11は、次に入力されるBピクチャ(N
+1)をターゲットピクチャとして設定する。次に、ス
テップS2において、動き推定部12は、ターゲットピ
クチャを16×16ドットのマクロブロックに分割す
る。ここでは、動き推定部12は、図3〜図6に示すよ
うに、Bピクチャ(n+1)を、縦方向に8行、横方向
に6列のマトリクスに分割、すなわち、48個のマクロ
ブロック(マクロブロックMB(1,1)〜MB(6,
8))に分割する。
Returning to FIG. 7, in step S1, the picture rearranging unit 11 inputs the B picture (N
+1) is set as the target picture. Next, in step S2, the motion estimation unit 12 divides the target picture into macroblocks of 16 × 16 dots. Here, as shown in FIGS. 3 to 6, the motion estimation unit 12 divides the B picture (n + 1) into a matrix having 8 rows in the vertical direction and 6 columns in the horizontal direction, that is, 48 macro blocks ( Macro blocks MB (1,1) to MB (6,
8)).

【0063】そして、ステップS3において、動き推定
部12は、分割したターゲットピクチャがIピクチャで
あるか否かの判定を行う。ここで、動き推定部12は、
このターゲットピクチャがIピクチャでないと判定し、
処理をステップS4へ進める。ステップS4において、
動き推定部12は、分割したターゲットピクチャがPピ
クチャであるか否かの判定を行う。ここで、動き推定部
12は、このターゲットピクチャがPピクチャでないと
判定した場合、Bピクチャと判定し、符号化の処理をス
テップS5へ進める。
Then, in step S3, the motion estimation section 12 determines whether or not the divided target picture is an I picture. Here, the motion estimation unit 12
It is determined that this target picture is not an I picture,
The process proceeds to step S4. In step S4,
The motion estimation unit 12 determines whether the divided target picture is a P picture. Here, when it is determined that the target picture is not a P picture, the motion estimation unit 12 determines that the target picture is a B picture, and advances the encoding process to step S5.

【0064】次に、ステップS5において、動き推定部
12は、図6に示すように、ターゲットピクチャTに対
する符号化処理を、すでに述べたI,Pピクチャのとき
と同様に、すべてのマクロブロックMBについて、例え
ば、矢印の順序により行う。すなわち、動き推定部12
は、左上角(第1行第1列)のマクロブロックMB
(1,1)から符号化処理を開始してから右方向に進
み、右上角(第1行第8列)のマクロブロックMB
(1,8)で一旦終了する。そして、動き推定部12
は、直ちに第2行に移り、第2行第1列のマクロブロッ
クMB(2,1)から第2行第8列のマクロブロックMB
(2,8)まで進む。以下、同様にして、動き推定部1
2は、第3行〜第6行について同じ動きを繰り返し、第
6行第8列のマクロブロックMB(6,8)で終了す
る。
Next, in step S5, as shown in FIG. 6, the motion estimation unit 12 performs the coding process for the target picture T on all macroblocks MB as in the case of the I and P pictures already described. Is performed in the order of arrows, for example. That is, the motion estimation unit 12
Is the macroblock MB in the upper left corner (first row, first column)
After starting the encoding process from (1, 1), the process proceeds to the right, and the macro block MB in the upper right corner (first row, eighth column)
It ends once with (1, 8). Then, the motion estimation unit 12
Immediately moves to the second row, and the macroblock MB (2,1) in the second row and the first column to the macroblock MB in the second row and the eighth column
Proceed to (2,8). Hereinafter, similarly, the motion estimation unit 1
2 repeats the same movement for the third to sixth rows, and ends at the macroblock MB (6,8) in the sixth row and eighth column.

【0065】動き推定部12は、Bピクチャの符号化
を、例えば、ピクチャ蓄積部21に格納されているIピ
クチャ及びPピクチャと、符号化が終了したBピクチャ
(現在符号化を行っている自身)のマクロブロックとを
参照マクロブロックとして参照して、新たに符号化する
マクロブロックと相似している相似マクロブロックの検
出を行う。すなわち、動き推定部12は、マクロブロッ
クMB(1,1)の符号化を、ピクチャ蓄積部21に蓄
積されているIピクチャ及びBピクチャのマクロブロッ
クを、参照マクロブロックとして、符号化を行う。
The motion estimator 12 encodes B pictures, for example, I and P pictures stored in the picture accumulator 21 and B pictures that have been encoded (currently encoding itself. ) Is referred to as a reference macroblock, and a similar macroblock that is similar to the macroblock to be newly encoded is detected. That is, the motion estimator 12 encodes the macroblock MB (1, 1) using the I and B picture macroblocks accumulated in the picture accumulator 21 as reference macroblocks.

【0066】そして、動き推定部12は、図5に示すよ
うに、マクロブロックMB(1,1)から符号化を開始
し、符号化が進み、マクロブロックMB(2,3)の符
号化を行うとき、マクロブロックMP(2,3)と、ピ
クチャ蓄積部21に格納されているIピクチャのマクロ
ブロックMI'(1,1)〜MI'(6,8),Pピクチャ
のマクロブロックMP'(1,1)〜MP'(6,8),B
ピクチャのマクロブロックMB(1,1)〜MB(2,
2)各々との差分データを演算して求め、マクロブロッ
クMI'(5,3)がマクロブロックMI'(1,1)〜M
I'(6,8),マクロブロックMP'(1,1)〜MP'
(6,8),マクロブロックMB(1,1)〜MB(2,
2)のうち、マクロブロックMB(2,3)との差分デ
ータが最も小さく、所定の相似度を超えている(差分デ
ータが設定された値以下である)と判定すると、マクロ
ブロックMI'(5,3)を相似マクロブロックとして抽
出する。
Then, as shown in FIG. 5, the motion estimator 12 starts the coding from the macro block MB (1,1), the coding progresses, and the coding of the macro block MB (2,3) is carried out. When performing, the macroblock MP (2,3), the macroblocks MI ′ (1,1) to MI ′ (6,8) of the I picture stored in the picture storage unit 21, and the macroblock MP ′ of the P picture. (1,1) to MP '(6,8), B
Picture macroblocks MB (1,1) to MB (2,2
2) The difference data with each is calculated to obtain macroblocks MI ′ (5,3) as macroblocks MI ′ (1,1) to M.
I '(6,8), macroblocks MP' (1,1) to MP '
(6, 8), macroblocks MB (1, 1) to MB (2,
In 2), when it is determined that the difference data with the macro block MB (2, 3) is the smallest and exceeds the predetermined similarity (the difference data is less than or equal to the set value), the macro block MI ′ ( 5, 3) are extracted as similar macroblocks.

【0067】したがって、動き推定部12は、マクロブ
ロックMB(2,3)の符号化を行うが、マクロブロッ
クMI'(5,3)を相似マクロブロックとするため、フ
レーム間順方向予測符号化(過去のピクチャ,すなわち
Iピクチャ内のマクロブロックを相似ブロックとした符
号化)を行うことを示す符号化モードのモード信号を動
き予測部20へ出力するとともに、マクロブロックMB
(2,3)を減算器13へ出力する。このとき、動き推
定部12は、マスクブロックMB(2,3)の位置に対
応した、マスクブロックMI'(5,3)の相対位置を示
す動きベクトルを、動き予測部20及び多重化部22へ
出力する。
Therefore, the motion estimation unit 12 encodes the macro block MB (2,3), but since the macro block MI '(5,3) is a similar macro block, the inter-frame forward prediction encoding is performed. A mode signal of a coding mode indicating that (previous picture, that is, a macro block in an I picture is encoded as a similar block) is output to the motion prediction unit 20, and the macro block MB
It outputs (2, 3) to the subtractor 13. At this time, the motion estimation unit 12 uses the motion vector indicating the relative position of the mask block MI ′ (5,3) corresponding to the position of the mask block MB (2,3) as the motion prediction unit 20 and the multiplexing unit 22. Output to.

【0068】そして、動き予測部20は、動き推定部1
2からフレーム間順方向予測符号化を示すモード信号が
入力されるため、このモード信号に対応するマクロブロ
ックMB(2,3)が減算器13に入力された時点で、
減算器13に対して減算指令を出力するとともに、ピク
チャ蓄積部21から減算に用いるマクロブロックMI'
(5,3)を読み出し、減算器13へ出力する。このと
き、減算器13は、動き予測部20から減算指令及び減
算に用いるマクロブロックMI'(5,3)のデータが入
力されるため、入力されたマクロブロックMP(2,
3)からマクロブロックMI'(5,3)を減算して、こ
の減算結果を残差予測データMS(2,3)として、D
CT部14へ出力する。
Then, the motion predicting section 20 has the motion estimating section 1
Since the mode signal indicating the inter-frame forward predictive coding is input from 2, the macro block MB (2,3) corresponding to this mode signal is input to the subtractor 13,
The subtraction command is output to the subtractor 13, and the macro block MI ′ used for subtraction from the picture storage unit 21.
(5, 3) is read and output to the subtractor 13. At this time, the subtractor 13 receives the subtraction command and the data of the macroblock MI ′ (5,3) used for the subtraction from the motion prediction unit 20, so that the input macroblock MP (2,3) is input.
Macroblock MI '(5, 3) is subtracted from 3), and the subtraction result is used as residual prediction data MS (2, 3) to obtain D
Output to the CT unit 14.

【0069】次に、DCT部14は、このマクロブロッ
クMB(2,3)の残差予測データMS(2,3)を、4
×4ドットのブロックに分割し、各ブロックのDCT処
理を行い、この処理結果をマクロブロックMSD(2,
3)として量子化部15へ出力する。そして、量子化部
15は、入力されるマクロブロックMSD(2,3)を量
子化し、処理結果をマクロブロックMSQ(2,3)とし
て出力する。これにより、可変長符号化16は、上記マ
クロブロックMSQ(2,3)を可変長符号化し、マクロ
ブロックMSV(2,3)として出力する。次に、多重化
部22は、上記マクロブロックMSV(2,3)を、フレ
ーム間順方向予測符号化であることを示す符号化モード
のモード信号(符号化する画像がBピクチャであること
を示す、ピクチャの種類を示す識別信号を含む)と、マ
スクブロックMB(2,3)及びマスクブロックMI'
(5,3)の相対位置を示す動きベクトルとともに多重
化し、バッファ23へ出力する。
Next, the DCT unit 14 outputs the residual prediction data MS (2,3) of this macroblock MB (2,3) to 4
It is divided into blocks of × 4 dots, DCT processing is performed on each block, and the processing result is set to macroblock MD (2,
3) to the quantizer 15. Then, the quantizer 15 quantizes the input macroblock MSD (2,3) and outputs the processing result as the macroblock MSQ (2,3). As a result, the variable length coding 16 performs variable length coding on the macro block MSQ (2,3) and outputs it as the macro block MSV (2,3). Next, the multiplexing unit 22 sets the mode signal of the coding mode indicating that the macroblock MSV (2,3) is the interframe forward predictive coding (that the picture to be coded is a B picture). (Including the identification signal indicating the type of picture), the mask block MB (2, 3) and the mask block MI ′.
It is multiplexed with the motion vector indicating the relative position of (5, 3) and output to the buffer 23.

【0070】そして、バッファ23は、マクロブロック
MSV(2,3),モード信号,動きベクトルが多重化さ
れたビットストリームを出力する。また、逆量子化部1
7は、量子化部15の出力するマクロブロックMSQ
(2,3)の逆量子化を行い、マクロブロックMSD'
(2,3)を再生し、IDCT部18へ出力する。そし
て、IDCT部18は、入力されるマクロブロックMS
D'(2,3)に対して、逆離散コサイン変換を行い、残
差予測信号MS'(2,3)を再生して、加算器19へ出
力する。
Then, the buffer 23 outputs a bitstream in which the macroblock MSV (2,3), the mode signal and the motion vector are multiplexed. In addition, the inverse quantizer 1
7 is a macro block MSQ output from the quantizer 15.
Inverse quantization of (2,3) is performed and macroblock MSD '
(2, 3) is reproduced and output to the IDCT unit 18. Then, the IDCT section 18 receives the input macroblock MS
Inverse discrete cosine transform is performed on D ′ (2,3) to reproduce the residual prediction signal MS ′ (2,3), which is output to the adder 19.

【0071】このとき、加算器19は、この予測残差信
号MS'(2,3)が、フレーム間順方向予測符号化され
たマクロブロックMB(2,3)に対応しているため、
動き予測部20から加算指令が出力され、動き予測部2
0がピクチャ蓄積部21から読み出したマクロブロック
MI'(5,3)と、予測算差信号MS'(2,3)とが加
算されて、マクロブロックMB'(2,3)が復号化され
る。そして、加算器19は、この復号化されたマクロブ
ロックMB'(2,3)を、ピクチャ蓄積部21のBピク
チャの識別番号に対応する領域に記憶する。
At this time, since the prediction residual signal MS '(2, 3) corresponds to the inter-frame forward predictive-coded macroblock MB (2, 3), the adder 19
The motion prediction unit 20 outputs an addition command, and the motion prediction unit 2
0 is added from the macroblock MI ′ (5,3) read from the picture storage unit 21 and the prediction difference signal MS ′ (2,3) to decode the macroblock MB ′ (2,3). It Then, the adder 19 stores the decoded macro block MB ′ (2,3) in the area corresponding to the identification number of the B picture in the picture storage unit 21.

【0072】そして、動き推定部12は、さらに、符号
化が進み、マクロブロックMB(5,3)の符号化を行
うとき、マクロブロックMB(5,3)と、ピクチャ蓄
積部21に格納されているIピクチャのマクロブロック
MI'(1,1)〜MI'(6,8),Pピクチャのマクロ
ブロックMP'(1,1)〜MP'(6,8),Bピクチャ
のマクロブロックMB(1,1)〜MB(5,2)各々と
の差分データを演算して求め、マクロブロックMB'
(2,6)がマクロブロックMI'(1,1)〜MI'
(6,8),マクロブロックMP'(1,1)〜MP'
(6,8),BピクチャのマクロブロックMB(1,
1)〜MB(5,2)のうち、マクロブロックMB(5,
3)との差分データが最も小さく、所定の相似度を超え
ている(差分データが設定された値以下である)と判定
すると、マクロブロックMB'(2,6)を相似マクロブ
ロックとして抽出する。
Then, the motion estimation unit 12 is further stored in the picture storage unit 21 and the macro block MB (5,3) when the coding is further advanced and the macro block MB (5,3) is coded. I picture macro blocks MI '(1,1) to MI' (6,8), P picture macro blocks MP '(1,1) to MP' (6,8), B picture macro block MB The difference data between (1, 1) to MB (5, 2) is calculated to obtain the macro block MB '.
(2, 6) is the macroblock MI '(1, 1) to MI'
(6, 8), macroblocks MP '(1, 1) to MP'
(6, 8), B picture macroblock MB (1,
Of 1) to MB (5,2), the macroblock MB (5,5)
When it is determined that the difference data with 3) is the smallest and exceeds the predetermined similarity (the difference data is less than or equal to the set value), the macro block MB '(2,6) is extracted as a similarity macro block. .

【0073】したがって、動き推定部12は、マクロブ
ロックMB(5,3)の符号化を行うが、マクロブロッ
クMB'(2,6)を相似マクロブロックとするため、同
一フレーム内予測符号化(現在符号化処理を行っている
ピクチャ,すなわちBピクチャ内のマクロブロックを相
似ブロックとした符号化)を行うことを示す符号化モー
ドのモード信号を動き予測部20へ出力するとともに、
マクロブロックMB(5,3)を減算器13へ出力す
る。このとき、動き推定部12は、マスクブロックMB
(5,3)の位置に対応した、マスクブロックMB'
(2,6)の相対位置を示す動きベクトルを、動き予測
部20及び多重化部22へ出力する。
Therefore, the motion estimation unit 12 encodes the macro block MB (5,3), but since the macro block MB '(2,6) is a similar macro block, the same intra-frame prediction encoding ( A mode signal of a coding mode indicating that a picture currently being coded, that is, a macro block in a B picture is coded as a similar block is output to the motion prediction unit 20, and
The macro block MB (5,3) is output to the subtractor 13. At this time, the motion estimation unit 12 determines that the mask block MB
Mask block MB 'corresponding to the position of (5, 3)
The motion vector indicating the relative position of (2, 6) is output to the motion prediction unit 20 and the multiplexing unit 22.

【0074】そして、動き予測部20は、動き推定部1
2から同一内予測符号化を示すモード信号が入力される
ため、このモード信号に対応するマクロブロックMB
(5,3)が減算器13に入力された時点で、減算器1
3に対して減算指令を出力するとともに、ピクチャ蓄積
部21から減算に用いるマクロブロックMB'(2,6)
を読み出し、減算器13へ出力する。このとき、減算器
13は、動き予測部20から減算指令及び減算に用いる
マクロブロックMB'(2,6)のデータが入力されるた
め、入力されたマクロブロックMB(5,3)からマク
ロブロックMB'(2,6)を減算して、この減算結果を
残差予測データMS(5,3)として、DCT部14へ
出力する。
Then, the motion predicting section 20 includes the motion estimating section 1
Since the mode signal indicating the same intra prediction coding is input from 2, the macro block MB corresponding to this mode signal is input.
When (5, 3) is input to the subtractor 13, the subtracter 1
3, a subtraction command is output, and the macro block MB ′ (2,6) used for subtraction from the picture storage unit 21.
Is read out and output to the subtracter 13. At this time, the subtractor 13 receives the subtraction command and the data of the macro block MB ′ (2,6) used for the subtraction from the motion prediction unit 20, so that the macro block MB (5,3) to the macro block is input. MB '(2,6) is subtracted, and the subtraction result is output to the DCT unit 14 as residual prediction data MS (5,3).

【0075】次に、DCT部14は、このマクロブロッ
クMB(5,3)の残差予測データMS(5,3)を、4
×4ドットのブロックに分割し、各ブロックのDCT処
理を行い、この処理結果をマクロブロックMSD(5,
3)として量子化部15へ出力する。そして、量子化部
15は、入力されるマクロブロックMSD(5,3)を量
子化し、処理結果をマクロブロックMSQ(5,3)とし
て出力する。これにより、可変長符号化16は、上記マ
クロブロックMSQ(5,3)を可変長符号化し、マクロ
ブロックMSV(5,3)として出力する。次に、多重化
部22は、上記マクロブロックMSV(5,3)を、同一
フレーム内予測符号化であることを示す符号化モードの
モード信号(符号化する画像がBピクチャであることを
示す、ピクチャの種類を示す識別信号を含む)と、マス
クブロックMB(5,3)及びマスクブロックMB'
(2,6)の相対位置を示す動きベクトルとともに多重
化し、バッファ23へ出力する。
Next, the DCT unit 14 outputs the residual prediction data MS (5,3) of this macroblock MB (5,3) to 4
It is divided into blocks of × 4 dots, DCT processing is performed on each block, and the processing result is set to macroblock MD (5,
3) to the quantizer 15. Then, the quantizer 15 quantizes the input macroblock MSD (5,3) and outputs the processing result as the macroblock MSQ (5,3). As a result, the variable length coding 16 performs variable length coding on the macro block MSQ (5,3) and outputs it as the macro block MSV (5,3). Next, the multiplexing unit 22 encodes the macroblock MSV (5, 3) into a mode signal of an encoding mode indicating that the macroblock MSV (5, 3) is in the same frame predictive encoding (indicating that the image to be encoded is a B picture). , And a mask block MB (5, 3) and a mask block MB ′.
It is multiplexed with the motion vector indicating the relative position of (2, 6) and output to the buffer 23.

【0076】そして、バッファ23は、マクロブロック
MSV(5,3),モード信号,動きベクトルが多重化さ
れたビットストリームを出力する。また、逆量子化部1
7は、量子化部15の出力するマクロブロックMSQ
(5,3)の逆量子化を行い、マクロブロックMSD'
(5,3)を再生し、IDCT部18へ出力する。そし
て、IDCT部18は、入力されるマクロブロックMS
D'(5,3)に対して、逆離散コサイン変換を行い、残
差予測信号MS'(5,3)を再生して、加算器19へ出
力する。
Then, the buffer 23 outputs a bitstream in which the macroblock MSV (5,3), the mode signal and the motion vector are multiplexed. In addition, the inverse quantizer 1
7 is a macro block MSQ output from the quantizer 15.
Inverse quantization of (5, 3) is performed and macroblock MSD '
(5, 3) is reproduced and output to the IDCT unit 18. Then, the IDCT section 18 receives the input macroblock MS
The inverse discrete cosine transform is performed on D ′ (5,3) to reproduce the residual prediction signal MS ′ (5,3), which is output to the adder 19.

【0077】このとき、加算器19は、この予測残差信
号MS'(5,3)が、同一フレーム内予測符号化された
マクロブロックMB(5,3)に対応しているため、動
き予測部20から加算指令が出力され、動き予測部20
がピクチャ蓄積部21から読み出したマクロブロックM
B'(2,6)と、予測算差信号MS'(5,3)とが加算
されて、マクロブロックMB'(5,3)が復号化され
る。そして、加算器19は、この復号化されたマクロブ
ロックMB'(5,3)を、ピクチャ蓄積部21のBピク
チャの識別番号に対応する領域に記憶する。
At this time, since the prediction residual signal MS ′ (5,3) corresponds to the macroblock MB (5,3) that has been predictively coded in the same frame, the adder 19 performs the motion prediction. The addition command is output from the unit 20, and the motion prediction unit 20
The macroblock M read from the picture storage unit 21
B '(2,6) and the prediction difference signal MS' (5,3) are added to decode the macroblock MB '(5,3). Then, the adder 19 stores the decoded macroblock MB ′ (5,3) in the area corresponding to the identification number of the B picture in the picture storage unit 21.

【0078】そして、動き推定部12は、さらに、符号
化が進み、図5に示すマクロブロックMB(6,6)の
符号化を行うとき、マクロブロックMB(6,6)と、
ピクチャ蓄積部21に格納されているIピクチャのマク
ロブロックMI'(1,1)〜MI'(6,8),Pピクチ
ャのマクロブロックMP'(1,1)〜MP'(6,8),
BピクチャのマクロブロックMB(1,1)〜MB(6,
5)各々との差分データを演算して求め、マクロブロッ
クMP'(5,3)がマクロブロックMI'(1,1)〜M
I'(6,8),マクロブロックMP'(1,1)〜MP'
(6,8),マクロブロックMB(1,1)〜MB(6,
5)のうち、マクロブロックMB(6,6)との差分デ
ータが最も小さく、所定の相似度を超えている(差分デ
ータが設定された値以下である)と判定すると、マクロ
ブロックMP'(5,3)を相似マクロブロックとして抽
出する。
Then, the motion estimation unit 12 is further encoded, and when the macroblock MB (6, 6) shown in FIG. 5 is encoded, the macroblock MB (6, 6),
Macroblocks MI ′ (1,1) to MI ′ (6,8) of I pictures and macroblocks MP ′ (1,1) to MP ′ (6,8) of P pictures stored in the picture storage unit 21. ,
B picture macroblocks MB (1, 1) to MB (6,
5) The difference data with each is calculated to obtain macroblocks MP '(5,3) as macroblocks MI' (1,1) to M '.
I '(6,8), macroblocks MP' (1,1) to MP '
(6, 8), macro blocks MB (1, 1) to MB (6,
In 5), when it is determined that the difference data with the macro block MB (6, 6) is the smallest and exceeds the predetermined similarity (the difference data is less than or equal to the set value), the macro block MP ′ ( 5, 3) are extracted as similar macroblocks.

【0079】したがって、動き推定部12は、マクロブ
ロックMB(6,6)の符号化を行うが、マクロブロッ
クMP'(5,3)を相似マクロブロックとするため、フ
レーム間逆方向予測符号化(未来のピクチャ,すなわち
Pピクチャ内のマクロブロックを相似ブロックとした符
号化)を行うことを示す符号化モードのモード信号を動
き予測部20へ出力するとともに、マクロブロックMB
(6,6)を減算器13へ出力する。このとき、動き推
定部12は、マスクブロックMB(6,6)の位置に対
応した、マクロブロックMP'(5,3)の相対位置を示
す動きベクトルを、動き予測部20及び多重化部22へ
出力する。
Therefore, the motion estimation unit 12 encodes the macro block MB (6, 6), but since the macro block MP '(5, 3) is a similar macro block, the inter-frame backward prediction encoding is performed. A mode signal of a coding mode indicating that (a future picture, that is, a macro block in a P picture is encoded as a similar block) is output to the motion prediction unit 20 and the macro block MB
(6, 6) is output to the subtractor 13. At this time, the motion estimation unit 12 uses the motion vector indicating the relative position of the macro block MP ′ (5,3) corresponding to the position of the mask block MB (6,6) as the motion prediction unit 20 and the multiplexing unit 22. Output to.

【0080】そして、動き予測部20は、動き推定部1
2からフレーム間逆方向予測符号化を示すモード信号が
入力されるため、このモード信号に対応するマクロブロ
ックMB(6,6)が減算器13に入力された時点で、
減算器13に対して減算指令を出力するとともに、ピク
チャ蓄積部21から減算に用いるマクロブロックMP'
(5,3)を読み出し、減算器13へ出力する。このと
き、減算器13は、動き予測部20から減算指令及び減
算に用いるマクロブロックMP'(5,3)のデータが入
力されるため、入力されたマクロブロックMB(6,
6)からマクロブロックMP'(5,3)を減算して、こ
の減算結果を残差予測データMS(6,6)として、D
CT部14へ出力する。
Then, the motion predicting section 20 includes the motion estimating section 1
Since the mode signal indicating the inter-frame backward prediction coding is input from 2, the macro block MB (6, 6) corresponding to this mode signal is input to the subtractor 13,
The subtraction command is output to the subtractor 13, and the macroblock MP ′ used for subtraction from the picture storage unit 21.
(5, 3) is read and output to the subtractor 13. At this time, the subtractor 13 receives the subtraction command and the data of the macro block MP '(5, 3) used for the subtraction from the motion prediction unit 20, and thus the input macro block MB (6,
The macro block MP '(5, 3) is subtracted from 6), and the subtraction result is used as residual prediction data MS (6, 6) to obtain D
Output to the CT unit 14.

【0081】次に、DCT部14は、このマクロブロッ
クMB(6,6)の残差予測データMS(6,6)を、4
×4ドットのブロックに分割し、各ブロックのDCT処
理を行い、この処理結果をマクロブロックMSD(6,
6)として量子化部15へ出力する。そして、量子化部
15は、入力されるマクロブロックMSD(6,6)を量
子化し、処理結果をマクロブロックMSQ(6,6)とし
て出力する。これにより、可変長符号化16は、上記マ
クロブロックMSQ(6,6)を可変長符号化し、マクロ
ブロックMSV(6,6)として出力する。次に、多重化
部22は、上記マクロブロックMSV(6,6)を、フレ
ーム間逆方向予測符号化であることを示す符号化モード
のモード信号(符号化する画像がBピクチャであること
を示す、ピクチャの種類を示す識別信号を含む)と、マ
スクブロックMB(6,6)及びマスクブロックMP'
(5,3)の相対位置を示す動きベクトルとともに多重
化し、バッファ23へ出力する。
Next, the DCT unit 14 outputs the residual prediction data MS (6,6) of this macroblock MB (6,6) to 4
It is divided into blocks of × 4 dots, DCT processing of each block is performed, and the processing result is set to the macro block MSD (6,
6) to the quantizer 15. Then, the quantization unit 15 quantizes the input macroblock MSD (6, 6) and outputs the processing result as the macroblock MSQ (6, 6). As a result, the variable length coding 16 performs variable length coding on the macroblock MSQ (6, 6) and outputs it as the macroblock MSV (6, 6). Next, the multiplexing unit 22 encodes the macroblock MSV (6, 6) into a mode signal in a coding mode indicating that the macroblock MSV (6, 6) is backward predictive coding between frames (that the picture to be coded is a B picture. (Including an identification signal indicating the type of picture), a mask block MB (6, 6) and a mask block MP '.
It is multiplexed with the motion vector indicating the relative position of (5, 3) and output to the buffer 23.

【0082】そして、バッファ23は、マクロブロック
MSV(6,6),モード信号,動きベクトルが多重化さ
れたビットストリームを出力する。また、逆量子化部1
7は、量子化部15の出力するマクロブロックMSQ
(6,6)の逆量子化を行い、マクロブロックMSD'
(6,6)を再生し、IDCT部18へ出力する。そし
て、IDCT部18は、入力されるマクロブロックMS
D'(6,6)に対して、逆離散コサイン変換を行い、残
差予測信号MS'(6,6)を再生して、加算器19へ出
力する。
Then, the buffer 23 outputs a bit stream in which the macro block MSV (6, 6), the mode signal and the motion vector are multiplexed. In addition, the inverse quantizer 1
7 is a macro block MSQ output from the quantizer 15.
Inverse quantization of (6, 6) is performed and macroblock MSD '
(6, 6) is reproduced and output to the IDCT unit 18. Then, the IDCT section 18 receives the input macroblock MS
The inverse discrete cosine transform is performed on D ′ (6,6) to reproduce the residual prediction signal MS ′ (6,6), which is output to the adder 19.

【0083】このとき、加算器19は、この予測残差信
号MS'(6,6)が、フレーム間逆方向予測符号化され
たマクロブロックMB(6,6)に対応しているため、
動き予測部20から加算指令が出力され、動き予測部2
0がピクチャ蓄積部21から読み出したマクロブロック
MP'(5,3)と、予測算差信号MS'(6,6)とが加
算されて、マクロブロックMB'(6,6)が復号化され
る。そして、加算器19は、この復号化されたマクロブ
ロックMB'(6,6)を、ピクチャ蓄積部21のBピク
チャの識別番号に対応する領域に記憶する。
At this time, since the prediction residual signal MS '(6, 6) corresponds to the macroblock MB (6, 6) which has been subjected to the inter-frame backward prediction coding, the adder 19
The motion prediction unit 20 outputs an addition command, and the motion prediction unit 2
0 is added from the macro block MP ′ (5,3) read from the picture storage unit 21 and the prediction difference signal MS ′ (6,6) to decode the macro block MB ′ (6,6). It Then, the adder 19 stores the decoded macroblock MB '(6, 6) in the area corresponding to the identification number of the B picture in the picture storage unit 21.

【0084】そして、動き推定部12は、さらに、符号
化が進み、マクロブロックMB(6,8)の符号化を行
うとき、マクロブロックMB(6,8)と、ピクチャ蓄
積部21に格納されているIピクチャのマクロブロック
MI'(1,1)〜MI'(6,8),Pピクチャのマクロ
ブロックMP'(1,1)〜MP'(6,8),Bピクチャ
のマクロブロックMB'(1,1)〜MB'(6,7)各々
との差分データを演算して求め、マクロブロックMI'
(5,6)がマクロブロックMI'(1,1)〜MI'
(6,8),マクロブロックMP'(1,1)〜MP'
(6,8),BピクチャのマクロブロックMB'(1,
1)〜MB'(6,7)のうち、マクロブロックMB
(6,8)との差分データが最も小さいと判定する。
Then, the motion estimation unit 12 is further stored in the macro block MB (6,8) and the picture storage unit 21 when the coding is further advanced and the macro block MB (6,8) is coded. I picture macro blocks MI '(1,1) to MI' (6,8), P picture macro blocks MP '(1,1) to MP' (6,8), B picture macro block MB The macro block MI 'is calculated by calculating the difference data with each of' (1, 1) to MB '(6, 7).
(5, 6) is the macroblock MI '(1, 1) to MI'
(6, 8), macroblocks MP '(1, 1) to MP'
(6, 8), macroblock MB 'of B picture (1,
Macro block MB among 1) to MB '(6, 7)
It is determined that the difference data with (6, 8) is the smallest.

【0085】次に、動き推定部12は、上記差分データ
が所定の相似度を超えていない(差分データが設定され
た値を越えている)と判定すると、イントラ符号化を行
うことを示す符号化モードのモード信号を、動き予測部
20へ出力する。以下の符号化処理については、すでに
述べたマクロブロックMI(1,1)及びマクロブロッ
クMP(6,3)と同様の処理のため、説明を省略す
る。最終的に、バッファ23は、マクロブロックMSV
(6,8),モード信号が多重化されたビットストリー
ムを出力する。そして、加算器19は、この復号化され
たマクロブロックMB'(6,8)を、ピクチャ蓄積部2
1のBピクチャの識別番号に対応する領域に記憶する。
Next, when the motion estimation unit 12 determines that the difference data does not exceed the predetermined similarity (the difference data exceeds the set value), the code indicating that intra coding is to be performed. The mode signal of the conversion mode is output to the motion prediction unit 20. The following encoding processing is the same as the processing of the macro block MI (1,1) and the macro block MP (6,3) already described, and thus the description thereof is omitted. Finally, the buffer 23 stores the macroblock MSV
(6, 8), A bitstream in which mode signals are multiplexed is output. Then, the adder 19 outputs the decoded macroblock MB ′ (6,8) to the picture storage unit 2
It is stored in the area corresponding to the identification number of B picture 1.

【0086】次に、動き推定部12は、Bピクチャ(n
+1)におけるマクロブロックMB(6,8)の符号化
が終了すると、全てのマクロブロックの符号化が終了し
たとして、処理をステップS1に戻す。この時点で、ピ
クチャ蓄積部21には、一度符号化(予測符号化,DC
T処理,量子化等により)されて、復号化された状態の
Iピクチャ(n),Pピクチャ(n+3)及びBピクチ
ャ(n+1)の画像データが格納されている。
Next, the motion estimation section 12 determines the B picture (n
When the encoding of the macro block MB (6, 8) in +1) is completed, it is determined that the encoding of all macro blocks is completed, and the process is returned to step S1. At this point, the picture storage unit 21 is once coded (predictive coding, DC
Image data of I picture (n), P picture (n + 3), and B picture (n + 1) in a decoded state after being subjected to T processing, quantization, etc. is stored.

【0087】そして、動き推定部12は、次のBピクチ
ャ(n+2)の画像符号化を行うため、ステップ1へ戻
り、上述したBピクチャ(n+1)に対して行った図7
のフローチャートの各ステップの処理を、Bピクチャ
(n+2)に対して行う。すなわち、上述してきた図7
のフローチャートに基づく画像符号化処理を、{n,n
+3,n+1,n+2,n+6,n+4,n+5}の順
番に従って入力されるフレームの画像毎に繰り返して行
う。
Then, the motion estimator 12 returns to step 1 in order to perform image coding of the next B picture (n + 2), and performs the above B picture (n + 1) as shown in FIG.
The process of each step of the flowchart of (1) is performed on the B picture (n + 2). That is, FIG. 7 described above
Image encoding processing based on the flowchart of {n, n
+3, n + 1, n + 2, n + 6, n + 4, n + 5} are repeated for each frame image input.

【0088】<復号器>次に、図8の復号器の構成につ
いて説明する。例えば、復号器31において、符号化さ
れた順番、すなわち、Iピクチャ{n},Pピクチャ
{n+3},Bピクチャ{n+1,n+2},…の順番
で、ビットストリームが入力され、各ピクチャが順次、
復号されることとなる。バッファ41は、符号器1によ
り生成され、伝送路に出力された多重化されたビットス
トリームを受信し、この受信したビットストリームを分
離部42に出力する。分離部42は、入力される上記ビ
ットストリームを、マクロブロックMSV,動きベクト
ル,およびモード信号に分離し、この符号化されたマク
ロブロックデータであるマクロブロックMSVを可変長復
号化部43に出力する。また、分離部42は、動きベク
トルとモード信号(各符号化されたピクチャの種類を示
す識別番号)とを、動き予測部49に出力する。
<Decoder> Next, the configuration of the decoder shown in FIG. 8 will be described. For example, in the decoder 31, the bit stream is input in the order of encoding, that is, I picture {n}, P picture {n + 3}, B picture {n + 1, n + 2}, ... ,
It will be decrypted. The buffer 41 receives the multiplexed bitstream generated by the encoder 1 and output to the transmission path, and outputs the received bitstream to the separation unit 42. The separation unit 42 separates the input bit stream into a macro block MSV, a motion vector, and a mode signal, and outputs the encoded macro block data, the macro block MSV, to the variable length decoding unit 43. . Further, the separation unit 42 outputs the motion vector and the mode signal (identification number indicating the type of each coded picture) to the motion prediction unit 49.

【0089】このとき、分離部42は、ビットストリー
ムに含まれる量子化ステップサイズを抽出し、逆量子化
部44で行われる逆量子化で使用されるため、逆量子化
部44へこの抽出した量子化ステップサイズを出力す
る。そして、可変長復号化部43は、上述した可変長符
号化部15で使用された可変長符号化に対して、逆の処
理の可変長復号化を行い、入力されるマクロブロックM
SVを復号し、復号結果としてマクロブロックMSQとして
出力する。逆量子化部44は、可変長復号化部43から
出力されたマクロブロックMSQに対して、符号器1にお
ける量子化部15で使用された量子化処理に対して、逆
の処理、すなわち、上記量子化ステップサイズを用いて
逆量子化処理を行い、入力されるマクロブロックMSQの
逆量子化の結果として、マクロブロックMSDとして出力
する。
At this time, the separation unit 42 extracts the quantization step size included in the bit stream and uses it in the inverse quantization performed by the inverse quantization unit 44. Output the quantization step size. Then, the variable-length decoding unit 43 performs variable-length decoding which is the reverse process of the variable-length coding used in the above-described variable-length coding unit 15, and inputs the macroblock M.
The SV is decoded and is output as a macroblock MSQ as a decoding result. The inverse quantization unit 44 performs an inverse process on the macroblock MSQ output from the variable length decoding unit 43 with respect to the quantization process used by the quantization unit 15 in the encoder 1, that is, the above process. Inverse quantization processing is performed using the quantization step size, and as a result of inverse quantization of the input macroblock MSQ, it is output as a macroblock MSD.

【0090】IDCT部45は、逆量子化部44から出
力されるマクロブロックMSDに対して、符号器1のDC
T部14で使用されたのとは逆の処理を行い、マクロブ
ロックMSDの逆コサイン変換処理を行い、マクロブロッ
クMSDが入力される(符号化された順番で入力される)
毎に、各々Iピクチャ,Pピクチャ及びBピクチャの符
号化結果である残差予測データMSとして、加算器46
へ出力する。加算器46は、分離部41から入力される
モード信号(符号化モードとピクチャの首位を示す識別
番号と)及びマクロブロックアドレスに基づき、IDC
T部45から入力される上記残差予測データMSと、ピ
クチャ蓄積部48に記憶されている、すでに復号された
をIピクチャ,Pピクチャ及びBピクチャのいずれかと
を加算して、入力された残差予測データMSに対応する
画像の復号を行う。
The IDCT unit 45 applies the DC of the encoder 1 to the macroblock MSD output from the inverse quantization unit 44.
The process opposite to that used in the T unit 14 is performed, the inverse cosine transform process of the macroblock MSD is performed, and the macroblock MSD is input (input in the encoded order).
For each of them, an adder 46
Output to. The adder 46, based on the mode signal (coding mode and the identification number indicating the top of the picture) and the macroblock address input from the separation unit 41, performs IDC
The residual prediction data Ms input from the T unit 45 and the already decoded I picture, P picture, or B picture stored in the picture accumulating unit 48 are added, and the input residual The image corresponding to the difference prediction data MS is decoded.

【0091】また、加算器46は、この復号した画像
(Iピクチャ,Pピクチャ及びBピクチャ)を、ピクチ
ャ蓄積部48に記憶させるとともに、動き予測部49に
及びピクチャ並び替え部47とに出力する。ピクチャ並
べ替え部47は、加算器46から入力される、復号され
た各ピクチャのマクロブロックを、ピクチャ単位にまと
めて、各ピクチャの画像を再生して、順次、各ピクチャ
の画像をピクチャ蓄積部48へ蓄積する。
Further, the adder 46 stores the decoded image (I picture, P picture and B picture) in the picture accumulating section 48 and outputs it to the motion predicting section 49 and the picture rearranging section 47. . The picture rearrangement unit 47 collects the decoded macroblocks of each picture, which are input from the adder 46, on a picture-by-picture basis, reproduces the images of the pictures, and sequentially stores the images of the pictures. Accumulate to 48.

【0092】そして、ピクチャ並べ替え部47は、GO
P単位において、Iピクチャ{n},Pピクチャ{n+
3},Bピクチャ{n+1,n+2},…の順番で入力
されるピクチャを、Iピクチャ{n},Bピクチャ{n
+1,n+2},Pピクチャ{n+3}の順番に並べ替
え、すなわち、符号器1におけるピクチャ並べ替え部1
1に入力される画像信号の順番に並び替えて出力画像と
して外部装置に対して出力する。
Then, the picture rearrangement unit 47
In P units, I picture {n}, P picture {n +
3}, B pictures {n + 1, n + 2}, ... Input pictures in the order I picture {n}, B picture {n
+1, n + 2} and P pictures {n + 3} are rearranged in this order, that is, the picture rearrangement unit 1 in the encoder 1
1 is rearranged in the order of the image signals input and output as an output image to an external device.

【0093】次に、動き予測部49における復号につい
て説明する。動き予測部49は、ピクチャの種類(Iピ
クチャ,Bピクチャ,Pピクチャ)と、動きベクトル
と、モード信号が復号するイントラ符号化,同一フレー
ム内予測符号化,フレーム間順方向予測符号化,フレー
ム間逆方向予測符号化のいずれかであるか、さらに復号
化するピクチャの種類を示す識別番号とに基づき、復号
される画像に対応した復号処理を行う。例えば、動き予
測部49は、IDCT部45から残差予測データMS
(4,7)が入力され、モード信号が同一フレーム内予
測符号化を示しており、図3に示すマクロブロックMI
(4,7)(マクロブロックアドレス)を復号する場
合、モード信号に含まれている複合するピクチャの種類
を示す識別信号と動きベクトルから、すでに複合されて
内部に格納されているマクロブロックMI'(2,4)の
画像を読み出し、加算器46へ加算信号とともに出力す
る。
Next, the decoding in the motion prediction unit 49 will be described. The motion prediction unit 49 includes a picture type (I picture, B picture, P picture), motion vector, and intra coding that is decoded by a mode signal, intra-frame predictive coding, inter-frame forward predictive coding, and frame. The decoding process corresponding to the image to be decoded is performed based on either the inter-reverse prediction coding or the identification number indicating the type of the picture to be decoded. For example, the motion prediction unit 49 receives the residual prediction data MS from the IDCT unit 45.
(4, 7) is input, the mode signal indicates the same intraframe predictive coding, and the macroblock MI shown in FIG.
When (4, 7) (macroblock address) is decoded, the macroblock MI ′ already composited and stored internally from the identification signal and the motion vector indicating the type of the composite picture included in the mode signal. The image of (2, 4) is read and output to the adder 46 together with the addition signal.

【0094】これにより、加算器46は、入力される残
差予測データMS(4,7)に対して、上記マクロブロ
ックMI'(2,4)を加算して、加算結果をマクロブロ
ックMI'(4,7)として、動き予測部49へ出力す
る。そして、動き予測部49は、MI'(6,8)の符号
化が終了すると、復号された各マクロブロックMIを組
み立て、Iピクチャ{n}を再生して、このIピクチャ
を、ピクチャ並び替え部47へ出力するとともに、ピク
チャ蓄積部48へ記憶させる。
As a result, the adder 46 adds the macro block MI '(2, 4) to the input residual prediction data MS (4, 7) and outputs the addition result as the macro block MI'. (4, 7) is output to the motion prediction unit 49. Then, when the coding of MI ′ (6,8) is completed, the motion prediction unit 49 assembles each decoded macroblock MI, reproduces the I picture {n}, and rearranges the I pictures. The image is output to the unit 47 and stored in the picture storage unit 48.

【0095】次に、動き予測部49は、IDCT部45
から残差予測データMS(1,6)が入力され、モード
信号がフレーム間順方向予測符号化を示しており、図4
に示すMP(1,6)を復号する場合、モード信号に含
まれているピクチャの種類を示す識別信号がPピクチャ
であることに基づき、すでに複合されてピクチャ蓄積部
48に格納されているIピクチャの画像を読み出し、こ
の読み出したIピクチャと動きベクトルとに基づき、I
ピクチャ(参照画像)のマクロブロックMI'(5,6)
を参照マクロブロックとして、加算器46へ加算信号と
ともに出力する。
Next, the motion prediction section 49 has the IDCT section 45.
Residual prediction data MS (1, 6) is input from the mode signal, and the mode signal indicates the inter-frame forward prediction coding.
In the case of decoding MP (1, 6) shown in (1), since the identification signal indicating the type of picture included in the mode signal is a P picture, the I already stored in the picture storage unit 48 is already combined. The picture image is read out, and based on the read out I picture and motion vector, I
Picture (reference image) macroblock MI '(5, 6)
Is output as a reference macroblock to the adder 46 together with the addition signal.

【0096】これにより、加算器46は、入力される残
差予測データMS(1,6)に対して、上記マクロブロ
ックMI'(5,6)を加算して、加算結果をマクロブロ
ックMP'(1,6)として、動き予測部49へ出力す
る。そして、動き予測部49は、IDCT部45から残
差予測データMS(6,3)が入力され、モード信号が
イントラ符号化を示していると、この残差予測データM
S(6,3)が参照画像なしに符号化されたものと認識
し、この残差予測データMS(6,3)のみから、マク
ロブロックMP'(6,3)を復号する。
As a result, the adder 46 adds the macro block MI '(5, 6) to the input residual prediction data MS (1, 6) and outputs the addition result as the macro block MP'. (1,6) is output to the motion prediction unit 49. Then, when the residual prediction data Ms (6, 3) is input from the IDCT unit 45 and the mode signal indicates intra coding, the motion prediction unit 49 receives the residual prediction data M.
Recognizing that S (6,3) has been encoded without a reference image, the macroblock MP '(6,3) is decoded only from this residual prediction data MS (6,3).

【0097】このとき、動き予測部49は、加算器46
へ参照画像のマクロブロックと加算信号とを出力しな
い。そして、動き予測部49は、MP'(6,8)の符号
化が終了すると、復号された各マクロブロックMPを組
み立て、Pピクチャ{n+3}を再生して、このPピク
チャを、ピクチャ並び替え部47へ出力するとともに、
ピクチャ蓄積部48へ記憶させる。
At this time, the motion prediction unit 49 uses the adder 46
The macro block of the reference image and the addition signal are not output. Then, when the encoding of MP '(6,8) is completed, the motion prediction unit 49 assembles each decoded macroblock MP, reproduces the P picture {n + 3}, and rearranges this P picture in picture order. While outputting to the section 47,
The picture is stored in the picture storage unit 48.

【0098】次に、動き予測部49は、IDCT部45
から残差予測データMS(6,6)が入力され、モード
信号がフレーム間逆方向予測符号化を示しており、図5
に示すMB(6,6)を復号する場合、モード信号に含
まれているピクチャの種類を示す識別信号がBピクチャ
であることに基づき、すでに複合されてピクチャ蓄積部
48に格納されているPピクチャ(参照画像)の画像を
読み出し、この読み出したPピクチャと動きベクトルと
に基づき、PピクチャのマクロブロックMP'(5,3)
を参照マクロベクトルとして、加算器46へ加算信号と
ともに出力する。
Next, the motion prediction section 49 has the IDCT section 45.
Residual prediction data MS (6, 6) is input from the mode signal, and the mode signal indicates the inter-frame backward prediction coding.
When decoding MB (6, 6) shown in (1), P is already combined and stored in the picture accumulating unit 48 based on the fact that the identification signal indicating the type of picture included in the mode signal is a B picture. An image of a picture (reference image) is read, and based on the read P picture and motion vector, macroblock MP '(5, 3) of the P picture
Is output as a reference macro vector to the adder 46 together with the addition signal.

【0099】これにより、加算器46は、入力される残
差予測データMS(6,6)に対して、上記マクロブロ
ックMP'(5,3)を加算して、加算結果をマクロブロ
ックMB'(6,6)として、動き予測部49へ出力す
る。そして、動き予測部49は、MP'(6,8)の符号
化が終了すると、復号された各マクロブロックMPを組
み立て、Pピクチャ{n+3}を再生して、このPピク
チャを、ピクチャ並び替え部47へ出力するとともに、
ピクチャ蓄積部48へ記憶させる。
As a result, the adder 46 adds the macro block MP '(5, 3) to the residual prediction data MS (6, 6) that is input, and outputs the addition result to the macro block MB'. (6, 6) is output to the motion prediction unit 49. Then, when the encoding of MP '(6,8) is completed, the motion prediction unit 49 assembles each decoded macroblock MP, reproduces the P picture {n + 3}, and rearranges the P pictures in the picture rearrangement. While outputting to the section 47,
The picture is stored in the picture storage unit 48.

【0100】上述してきたように、動き予測部49は、
逆コサイン変換された残差予測信号MSから、動きベク
トルと,モード信号に示された予測符号化の方式及び参
照画像とに基づき、各ピクチャの画像の復号を行う。な
お、符号化のモードが同一フレーム内予測符号化以外の
符号化及び復号化の処理は、MPEG2と同様である。
As described above, the motion prediction unit 49
The image of each picture is decoded from the residual cosine transformed residual prediction signal Ms based on the motion vector and the prediction coding method and reference image indicated by the mode signal. The coding and decoding processes other than the intra-frame predictive coding in the same coding mode are the same as those in MPEG2.

【0101】以上述べたように、本発明の一実施形態の
動画像符号化方法では、符号化すべきIピクチャ、Pピ
クチャまたはBピクチャをターゲットピクチャに設定
し、そのターゲット・ピクチャを複数のマクロブロック
MBに分割する。そして、それらマクロブロックMBに
ついて所定順序で符号化処理を行い、ターゲット・ピク
チャTの符号化情報を生成する。
As described above, in the moving picture coding method according to the embodiment of the present invention, an I picture, P picture or B picture to be coded is set as a target picture, and the target picture is set to a plurality of macroblocks. Divide into MB. Then, the macroblocks MB are subjected to coding processing in a predetermined order to generate coding information of the target picture T.

【0102】したがって、本願発明の動画像符号化装置
は、ターゲットピクチャの画像を符号化する際に、ター
ゲットピクチャがIピクチャであれば、同一フレーム
(符号化を行っているIピクチャ)内のすでに符号化が
終了したマクロブロックを参照ブロックとして符号化に
用い、また、ターゲットピクチャがPピクチャであれ
ば、過去のIピクチャ(参照画像)及び同一フレーム
(符号化を行っているPピクチャ)内のすでに符号化が
終了したマクロブロックを参照ブロックとして符号化に
用い、さらに、ターゲットピクチャがBピクチャであれ
ば、過去Iピクチャまたは将来のPピクチャを参照画像
として用いるだけでなく、同一フレーム(符号化を行っ
ているBピクチャ)内のすでに符号化が終了したマクロ
ブロックを参照ブロックとして符号化に用いているた
め、各ピクチャの符号化処理の際に参照する画像の情報
量が増加し、相似性のあるマクロブロックを検索できる
確率が増加して符号化効率を上昇させ、かつ、参照マク
ロブロック(または参照画像)が相似性の高いものを抽
出できるため、より復号した後の画像が符号化前の画像
に近い状態にすることが可能とする。なお、上記した本
発明実施形態においては、動画像符号化器及び復号器の
それぞれで実行される手順をコンピュータ読取り可能な
記録媒体に記録し、この記録媒体に記録されたプログラ
ムをコンピュータシステムに読み込ませ、実行すること
により本発明の利用者属性登録情報自動更新装置が実現
されるものとする。ここでいうコンピュータシステムと
は、OSや周辺機器等のハードウアを含むものである。
Therefore, when the moving picture coding apparatus of the present invention codes the image of the target picture, if the target picture is an I picture, it is already in the same frame (I picture being coded). The encoded macroblock is used as a reference block for encoding, and if the target picture is a P picture, the past I picture (reference image) and the same frame (encoding P picture) If a macroblock that has already been encoded is used as a reference block for encoding, and if the target picture is a B picture, not only the past I picture or future P picture is used as a reference image, but also the same frame (encoding B-pictures that are being processed) refer to already-encoded macroblocks Since it is used for encoding, the amount of information of the image referred to in the encoding process of each picture increases, the probability that macro blocks with similarities can be searched for increases, and the encoding efficiency increases. In addition, since the reference macroblock (or the reference image) having high similarity can be extracted, the image after decoding can be brought into a state closer to the image before encoding. In the above-described embodiment of the present invention, the procedures executed by each of the moving picture encoder and the decoder are recorded in a computer-readable recording medium, and the program recorded in this recording medium is read into the computer system. Then, the user attribute registration information automatic updating apparatus of the present invention is realized by executing the above. The computer system mentioned here includes an OS and hardware such as peripheral devices.

【0103】更に、「コンピュータシステム」は、WW
Wシステムを利用している場合であれば、ホームページ
提供環境(あるいは表示環境)も含むものとする。ま
た、「コンピュータ読取り可能な記録媒体」とは、フレ
キシブルディスク、光磁気ディスク、ROM、CD−R
OM等の可搬媒体、コンピュータシステムに内蔵される
ハードディスク等の記憶装置のことをいう。さらに「コ
ンピュータ読取り可能な記録媒体」とは、インターネッ
ト等のネットワークや電話回線等の通信回線を介してプ
ログラムが送信された場合のシステムやクライアントと
なるコンピュータシステム内部の揮発性メモリ(RA
M)のように、一定時間プログラムを保持しているもの
も含むものとする。
Furthermore, "computer system" is a WW
If the W system is used, the homepage providing environment (or display environment) is also included. The "computer-readable recording medium" means a flexible disk, a magneto-optical disk, a ROM, a CD-R.
A portable medium such as an OM or a storage device such as a hard disk built in a computer system. Further, the "computer-readable recording medium" means a volatile memory (RA) inside a computer system which is a system or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line.
As in M), the one holding the program for a certain period of time is also included.

【0104】また、上記プログラムは、このプログラム
を記憶装置等に格納したコンピュータシステムから、伝
送媒体を介して、あるいは、伝送媒体中の伝送波により
他のコンピュータシステムに伝送されてもよい。ここ
で、プログラムを伝送する「伝送媒体」は、インターネ
ット等のネットワーク(通信網)や電話回線等の通信回
線(通信線)のように情報を伝送する機能を有する媒体
のことをいう。また、上記プログラムは、前述した機能
の一部を実現するためのものであっても良い。さらに、
前述した機能をコンピュータシステムにすでに記録され
ているプログラムとの組み合わせで実現できるもの、い
わゆる差分ファイル(差分プログラム)であっても良
い。
The above program may be transmitted from a computer system that stores the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the "transmission medium" for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. Further, the program may be a program for realizing some of the functions described above. further,
It may be a so-called difference file (difference program) that can realize the above-mentioned functions in combination with a program already recorded in the computer system.

【0105】以上、本発明の一実施形態を図面を参照し
て詳述してきたが、具体的な構成はこの実施形態に限ら
れるものではなく、本発明の要旨を逸脱しない範囲の設
計変更等があっても本発明に含まれる。
Although one embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to this embodiment, and design changes within the scope not departing from the gist of the present invention. Even so, it is included in the present invention.

【0106】[0106]

【発明の効果】本発明の動画符号化装置によれば、ター
ゲットピクチャの画像を符号化する際に、過去のIピク
チャまたは将来のPピクチャを参照画像として使用する
だけでなく、ターゲットピクチャ自身において、すでに
符号化されたマクロブロックを参照画像として用いるた
め、符号化化処理の際に参照する情報量が増加し、動画
像の符号化効率を向上させることが可能となる。
According to the moving picture coding apparatus of the present invention, when a picture of a target picture is coded, not only a past I picture or a future P picture is used as a reference picture but also the target picture itself is used. Since the already-encoded macroblock is used as the reference image, the amount of information to be referred to in the encoding process increases, and the encoding efficiency of the moving image can be improved.

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

【図1】 本発明の一実施形態による符号器1の構成例
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration example of an encoder 1 according to an embodiment of the present invention.

【図2】 本発明の一実施形態の動画像符号化方法を示
す概念図である。
FIG. 2 is a conceptual diagram showing a moving image coding method according to an embodiment of the present invention.

【図3】 本発明の一実施形態の動画像符号化方法にお
けるIピクチャの符号化方法を示す概念図である。
FIG. 3 is a conceptual diagram showing an I-picture encoding method in the moving image encoding method according to the embodiment of the present invention.

【図4】 本発明の一実施形態の動画像符号化方法にお
けるPピクチャの符号化方法を示す概念図である。
FIG. 4 is a conceptual diagram showing a P picture encoding method in the moving image encoding method according to the embodiment of the present invention.

【図5】 本発明の一実施形態の動画像符号化方法にお
けるBピクチャの符号化方法を示す概念図である。
FIG. 5 is a conceptual diagram showing a B picture encoding method in the moving image encoding method according to the embodiment of the present invention.

【図6】 本発明の一実施形態の動画像符号化方法にお
けるターゲット・ピクチャのマクロブロックヘの分割方
法の一例を示す概念図である。。
FIG. 6 is a conceptual diagram showing an example of a method of dividing a target picture into macroblocks in the moving picture coding method according to the embodiment of the present invention. .

【図7】 本発明の一実施形態の動画像符号化方法の各
ステップを示すフローチャートである。
FIG. 7 is a flowchart showing each step of the moving picture coding method according to the embodiment of the present invention.

【図8】 本発明の一実施形態の動画像符号化方法に使
用する復号器の構成例を示す機能ブロック図である。
FIG. 8 is a functional block diagram showing a configuration example of a decoder used in the moving picture coding method according to the embodiment of the present invention.

【図9】 従来の動画像符号化方法を示す概念図であ
る。
FIG. 9 is a conceptual diagram showing a conventional moving image encoding method.

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

1 符号器 2 復号器 11,47 ピクチャ並べ替え部 12 動き推定部 13 減算部 14 DCT部 15 量子化部 16 可変長符号化部 17,44 逆量子化部 18,45 IDCT部 19,46 加算部 20,49 動き予測部 21,48 ピクチャ蓄積部 22 多重化部 23,41 バッファ 42 分離部 43 可変長復号化部 1 encoder 2 decoder 11,47 Picture rearranging unit 12 Motion estimation section 13 Subtraction unit 14 DCT section 15 Quantizer 16 Variable length coding unit 17,44 Dequantizer 18,45 IDCT section 19,46 adder 20,49 Motion prediction unit 21,48 picture storage 22 Multiplexer 23,41 buffer 42 Separation part 43 Variable Length Decoding Unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 徳永 隆治 茨城県つくば市吾妻4−201−508 (72)発明者 川村 深雪 東京都三鷹市上連雀1丁目1番5−601号 シェッジ有限会社内 Fターム(参考) 5C059 MA00 MA04 MA05 MA14 MA23 MC11 MC38 ME01 NN21 PP05 PP06 PP07 PP16 UA02 UA05 UA33 UA38 5J064 AA02 AA03 AA05 BA09 BA16 BB01 BB03 BC01 BC08 BC14   ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Ryuji Tokunaga             4-201-508 Azuma, Tsukuba, Ibaraki (72) Inventor Miyuki Kawamura             1-5-1-5 Kamifenjaku, Mitaka City, Tokyo               Sedge Ltd. F-term (reference) 5C059 MA00 MA04 MA05 MA14 MA23                       MC11 MC38 ME01 NN21 PP05                       PP06 PP07 PP16 UA02 UA05                       UA33 UA38                 5J064 AA02 AA03 AA05 BA09 BA16                       BB01 BB03 BC01 BC08 BC14

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 イントラ符号化を行うIピクチャ,フレ
ーム間順方向予測符号化及びフレーム間逆方向予測符号
化を行うBピクチャ,フレーム間順方向予測符号化を行
うPピクチャを使用する動画符号化装置であり、 Iピクチャ,Bピクチャ及びPピクチャの符号化を行う
場合、フレーム間順方向予測符号化,フレーム間逆方向
予測符号化,イントラ符号化の処理に加えて、同一フレ
ーム内の符号化の終了したマクロブロックを、予測符号
化のための参照画像として用いることを特徴とする符号
化装置。
1. A moving picture coding using an I picture for intra coding, a B picture for interframe forward predictive coding and an interframe backward predictive coding, and a P picture for interframe forward predictive coding. When encoding an I picture, a B picture, and a P picture, which is a device, in addition to the interframe forward predictive coding, the interframe backward predictive coding, and the intra coding, the coding in the same frame is performed. An encoding device characterized by using the completed macroblock as a reference image for predictive encoding.
【請求項2】 イントラ符号化を行うIピクチャ,フレ
ーム間順方向予測符号化及びフレーム間逆方向予測符号
化を行うBピクチャ,フレーム間順方向予測符号化を行
うPピクチャを使用する動画符号化方法であり、 Iピクチャ,Bピクチャ及びPピクチャの符号化を行う
過程において、フレーム間順方向予測符号化,フレーム
間逆方向予測符号化,イントラ符号化の過程に加えて、
同一フレーム内の符号化の終了したマクロブロックを、
予測符号化のための参照画像として用いる過程を有する
ことを特徴とする符号化方法。
2. A moving picture coding using an I picture for intra coding, a B picture for interframe forward predictive coding and an interframe backward predictive coding, and a P picture for interframe forward predictive coding. In the process of encoding I-picture, B-picture and P-picture, in addition to the process of inter-frame forward predictive coding, inter-frame backward predictive coding and intra-coding,
The encoded macroblock in the same frame is
An encoding method comprising the step of using as a reference image for predictive encoding.
【請求項3】 イントラ符号化を行うIピクチャ,フレ
ーム間順方向予測符号化及びフレーム間逆方向予測符号
化を行うBピクチャ,フレーム間順方向予測符号化を行
うPピクチャを使用する、請求項1に記載の符号化装置
を動作させる動画符号化プログラムであり、 Iピクチャ,Bピクチャ及びPピクチャの符号化を行う
処理において、フレーム間順方向予測符号化,フレーム
間逆方向予測符号化,イントラ符号化の処理に加えて、
同一フレーム内の符号化の終了したマクロブロックを、
予測符号化のための参照画像として用いる処理を含む符
号化処理をコンピュータに実行させることを特徴とする
符号化プログラム。
3. An I picture for performing intra coding, a B picture for performing interframe forward predictive coding and interframe backward predictive coding, and a P picture for performing interframe forward predictive coding are used. 1 is a moving picture coding program for operating the coding apparatus according to 1. In addition to the encoding process,
The encoded macroblock in the same frame is
An encoding program for causing a computer to execute an encoding process including a process used as a reference image for predictive encoding.
【請求項4】 イントラ符号化を行うIピクチャ,フレ
ーム間順方向予測符号化及びフレーム間逆方向予測符号
化を行うBピクチャ,フレーム間順方向予測符号化を行
うPピクチャを使用する、請求項1に記載の符号化装置
を動作させる動画符号化プログラムが記録された記録媒
体であり、 Iピクチャ,Bピクチャ及びPピクチャの符号化を行う
処理において、フレーム間順方向予測符号化,フレーム
間逆方向予測符号化,イントラ符号化の処理に加えて、
同一フレーム内の符号化の終了したマクロブロックを、
予測符号化のための参照画像として用いる処理を含む符
号化処理をコンピュータに実行させる動画符号化プログ
ラムを記録した、コンピュータ読み取り可能な記録媒
体。
4. An I picture for performing intra coding, a B picture for performing interframe forward predictive coding and interframe backward predictive coding, and a P picture for performing interframe forward predictive coding are used. 1 is a recording medium in which a moving picture coding program for operating the coding apparatus described in 1 is recorded. In a process of coding an I picture, a B picture, and a P picture, interframe forward predictive coding and interframe reverse coding are performed. In addition to directional predictive coding and intra coding,
The encoded macroblock in the same frame is
A computer-readable recording medium in which a moving picture coding program for causing a computer to execute a coding process including a process used as a reference image for predictive coding is recorded.
JP2001376507A 2001-12-10 2001-12-10 Device, method and program for encoding moving image Pending JP2003179931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001376507A JP2003179931A (en) 2001-12-10 2001-12-10 Device, method and program for encoding moving image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001376507A JP2003179931A (en) 2001-12-10 2001-12-10 Device, method and program for encoding moving image

Publications (1)

Publication Number Publication Date
JP2003179931A true JP2003179931A (en) 2003-06-27

Family

ID=19184684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001376507A Pending JP2003179931A (en) 2001-12-10 2001-12-10 Device, method and program for encoding moving image

Country Status (1)

Country Link
JP (1) JP2003179931A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011526124A (en) * 2008-06-27 2011-09-29 トムソン ライセンシング Method and apparatus for texture compression using patch-based sampling texture synthesis
US8699569B2 (en) 2006-06-16 2014-04-15 Casio Computer Co., Ltd. Motion picture encoding device and method, motion picture decoding device and method, motion picture recording device, program, and data structure

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0324888A (en) * 1989-06-21 1991-02-01 Matsushita Electric Ind Co Ltd Encoder for moving image signal
JPH0537786A (en) * 1991-07-26 1993-02-12 Sony Corp Picture data encoder and decoder
JPH09322176A (en) * 1995-12-20 1997-12-12 Sanyo Electric Co Ltd Encoding mode selecting method, moving image encoding device, encoding method, recording method and transmitting method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0324888A (en) * 1989-06-21 1991-02-01 Matsushita Electric Ind Co Ltd Encoder for moving image signal
JPH0537786A (en) * 1991-07-26 1993-02-12 Sony Corp Picture data encoder and decoder
JPH09322176A (en) * 1995-12-20 1997-12-12 Sanyo Electric Co Ltd Encoding mode selecting method, moving image encoding device, encoding method, recording method and transmitting method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8699569B2 (en) 2006-06-16 2014-04-15 Casio Computer Co., Ltd. Motion picture encoding device and method, motion picture decoding device and method, motion picture recording device, program, and data structure
JP2011526124A (en) * 2008-06-27 2011-09-29 トムソン ライセンシング Method and apparatus for texture compression using patch-based sampling texture synthesis

Similar Documents

Publication Publication Date Title
US6408096B2 (en) Method for computational graceful degradation in an audiovisual compression system
JP3072035B2 (en) Two-stage video film compression method and system
JP4261630B2 (en) Image encoding apparatus and method, and computer-readable recording medium on which an image encoding program is recorded
JP3856262B2 (en) Motion compensation encoding apparatus, motion compensation encoding method, and motion compensation code recording medium
US7961788B2 (en) Method and apparatus for video encoding and decoding, and recording medium having recorded thereon a program for implementing the method
JP2002532029A (en) Efficient macroblock header coding for video compression
JPH0998429A (en) Digital video signal encoding device and decoding device therefor
KR19990082456A (en) Image data compression device and method
KR100227298B1 (en) Code amount controlling method for coded pictures
KR100824161B1 (en) Image processing apparatus
US20070133689A1 (en) Low-cost motion estimation apparatus and method thereof
JP3980659B2 (en) Video encoding method and apparatus, video decoding method and apparatus.
JP3463291B2 (en) Method and apparatus for decoding and displaying a compressed digital video sequence
JP3852366B2 (en) Encoding apparatus and method, decoding apparatus and method, and program
JP3426668B2 (en) Video coding method
JPH10271516A (en) Compression coder, coding method, decoder and decoding method
JP4895995B2 (en) Video decoding method
KR101363044B1 (en) Method and apparatus for determining encoding mode of video image, method and apparatus for encoding/decoding video image using the same and recording medium storing program for performing the method thereof
JPH06225279A (en) Coding/decoding methods and coding/decoding devices
JP6678357B2 (en) Motion vector selection and prediction method in video coding system
JP3818819B2 (en) Image coding method conversion apparatus, image coding method conversion method, and recording medium
JP2003179931A (en) Device, method and program for encoding moving image
KR100385620B1 (en) Improved MPEG coding method, moving picture transmitting system and method thereof
JP5017086B2 (en) Video decoding method
JPH0795536A (en) Device and method for reversely reproducing moving image

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040427

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040609

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050324

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050329

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050519

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050905