JP2002209216A - Image coding device and image coding method - Google Patents

Image coding device and image coding method

Info

Publication number
JP2002209216A
JP2002209216A JP2001001804A JP2001001804A JP2002209216A JP 2002209216 A JP2002209216 A JP 2002209216A JP 2001001804 A JP2001001804 A JP 2001001804A JP 2001001804 A JP2001001804 A JP 2001001804A JP 2002209216 A JP2002209216 A JP 2002209216A
Authority
JP
Japan
Prior art keywords
motion vector
image
vector
value
prediction
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.)
Withdrawn
Application number
JP2001001804A
Other languages
Japanese (ja)
Inventor
Takefumi Nagumo
武文 名雲
Yoichi Yagasaki
陽一 矢ヶ崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2001001804A priority Critical patent/JP2002209216A/en
Publication of JP2002209216A publication Critical patent/JP2002209216A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent the number of required bits for coding a motion vector from extremely increasing even when a predictive vector can not be calculated with sufficient accuracy. SOLUTION: In the case that each predictive vector sufficiently comes true at each motion vector and difference vectors between the predictive vectors and the motion vectors are distributed with a concentration to around zero in a VLC(Variable-Length Coding) unit 16, an F-code is decided from a maximum value of the motion vectors so that the ratio of a fixed length coding part is made small. In the case that the prediction accuracy of the predictive vector is insufficient and difference vectors between the predictive vectors and the motion vectors are not distributed with the concentration to around zero, the F-code is decided larger than a minimum required value so that the ratio of a variable length coding part is made small.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像符号化装置及
び画像符号化方法に関し、特に、動画像データを伝送路
を介して送受信する際に好適な画像符号化装置及び画像
符号化方法に関する。
The present invention relates to an image encoding apparatus and an image encoding method, and more particularly to an image encoding apparatus and an image encoding method suitable for transmitting and receiving moving image data via a transmission path.

【0002】[0002]

【従来の技術】例えば、テレビ会議システム、テレビ電
話システム等のような動画像データを遠隔地に伝送する
システムにおいては、伝送路を効率良く利用するため
に、動画像データをライン相関やフレーム間相関を利用
して圧縮符号化することによってデータ容量を縮小して
送受信している。
2. Description of the Related Art For example, in a system for transmitting moving image data to a remote place, such as a video conference system or a video telephone system, the moving image data is line-correlated or inter-frame-connected in order to use a transmission path efficiently. Data is transmitted and received with a reduced data capacity by performing compression encoding using correlation.

【0003】動画像の高能率符号化方式の例として、M
PEG(Moving Picture Experts Group)によって標準
化されたMPEG方式がある。MPEG方式では、動き
補償予測符号化と離散コサイン(Discrete Cosine Tran
sform;DCT)符号化とを組み合わせたハイブリッド
方式が採用されている。MPEG方式では、様々なアプ
リケーションや機能に対応するためにいくつかのプロフ
ァイル及びレベルが定義されている。中でも、最も基本
となるのがメインプロファイルメインレベル(Main Pro
file at Main Level;MP@ML)である。
As an example of a high-efficiency coding method for a moving image, M
There is an MPEG standardized by the Moving Picture Experts Group (PEG). In the MPEG system, motion-compensated prediction coding and discrete cosine (Discrete Cosine Tran
sform; DCT) coding. In the MPEG system, several profiles and levels are defined to support various applications and functions. Among them, the most basic is the main profile main level (Main Pro
file at Main Level; MP @ ML).

【0004】従来の画像符号化装置では、各マクロブロ
ック毎に予測ベクトルを算出し、その予測ベクトルと符
号化する動きベクトルとの差の値として得られる差分ベ
クトルに対して符号化を行っている。動きベクトルと予
測ベクトルとの差分ベクトルは、フレーム毎に設定され
た動きベクトルの符号化範囲を示すフラグ値により、可
変ビット長を有する動きベクトルの概略部(可変長符号
化部)と、固定ビット長を有する動きベクトルの詳細部
(固定長符号化部)とに分割されて符号化されている。
In a conventional image coding apparatus, a prediction vector is calculated for each macroblock, and coding is performed on a difference vector obtained as a difference value between the prediction vector and a motion vector to be coded. . The difference vector between the motion vector and the prediction vector is represented by a flag value indicating the encoding range of the motion vector set for each frame, and a general part of a motion vector having a variable bit length (variable length encoding unit) and a fixed bit. It is divided and encoded into a detailed part (fixed-length encoding part) of a motion vector having a length.

【0005】MPEG方式に基づくMPEG1,MPE
G2,及びMPEG4等では、動きベクトルの予測ベク
トルは、符号化するマクロブロックの位置に対して、よ
り近傍のマクロブロックの動きベクトルを用いて、MP
EG1,MPEG2,及びMPEG4でそれぞれ定めら
れた方法に基づいて算出されている。
[0005] MPEG1, MPE based on MPEG system
In G2, MPEG4, and the like, a motion vector prediction vector is calculated using the motion vector of a macroblock closer to the position of the macroblock to be encoded.
It is calculated based on the methods defined in EG1, MPEG2, and MPEG4, respectively.

【0006】[0006]

【発明が解決しようとする課題】ところが、分解された
動きベクトルの概略部を符号化する際に使用するVLC
(Variable-Length Coding)テーブルは、予測ベクトル
の精度が十分であることを前提として作成されたもので
ある。つまり、VLCテーブルは、予測ベクトルと動き
ベクトルとの差の値として算出される差分ベクトルが零
付近に集中することを仮定して作成されたものである。
However, the VLC used when coding the generalized part of the decomposed motion vector is used.
The (Variable-Length Coding) table is created on the assumption that the accuracy of the prediction vector is sufficient. That is, the VLC table is created on the assumption that the difference vector calculated as the value of the difference between the prediction vector and the motion vector is concentrated near zero.

【0007】ところが、画像全体にわたって輝度変化が
少なく、あるフレーム内で輝度値が一定しているような
画像や、川の流れのような画像の場合では、隣接するマ
クロブロック間で動きベクトルの相関が少なくなること
が多い。このとき、近傍のマクロブロック間の動きベク
トルから算出された予測ベクトルと、実際に符号化する
マクロブロックの動きベクトルとの差分ベクトルは、大
となる。
However, in the case of an image in which the luminance change is small over the entire image and the luminance value is constant in a certain frame, or in an image such as a river flow, the correlation between motion vectors between adjacent macroblocks. Often decreases. At this time, the difference vector between the prediction vector calculated from the motion vector between neighboring macroblocks and the motion vector of the macroblock to be actually coded is large.

【0008】そのため、従来の画像符号化装置は、動き
ベクトルにVLC符号化を施したとき、符号化コードの
コード長が大となる場合が多発することにより、結果と
して、動きベクトルの発生ビット量が増大し、符号化画
像の画質が劣化するという問題点があった。
[0008] Therefore, in the conventional image coding apparatus, when VLC coding is performed on a motion vector, the code length of the coded code frequently becomes large. And the image quality of the encoded image is degraded.

【0009】本発明は、このような従来の実情に鑑みて
提案されたものであり、予測ベクトルの算出が十分な精
度で行えない場合であっても、動きベクトルの発生ビッ
ト量の増大を防ぐことを可能とする画像符号化装置及び
画像符号化方法を提供することを目的とする。
The present invention has been proposed in view of such a conventional situation, and prevents an increase in the amount of generated motion vector bits even when the prediction vector cannot be calculated with sufficient accuracy. It is an object of the present invention to provide an image encoding device and an image encoding method that enable the above.

【0010】[0010]

【課題を解決するための手段】本発明にかかる画像符号
化装置は、入力した画像処理情報から動きベクトルを検
出し、可変長符号化部と固定長符号化部とに分割して符
号化する画像符号化装置において、画像処理情報に基づ
く画像内の動きベクトルの相関値を検出し、相関値と画
像内の動きベクトルの最大値とを用いて動きベクトルの
符号化可能範囲を表すフラグ値を決定するフラグ値決定
手段を備えることにより上述した目的を達成する。
An image coding apparatus according to the present invention detects a motion vector from input image processing information, and divides the motion vector into a variable length coding section and a fixed length coding section to perform coding. In the image encoding device, a correlation value of a motion vector in the image based on the image processing information is detected, and a flag value indicating a coding range of the motion vector is calculated using the correlation value and the maximum value of the motion vector in the image. The above-mentioned object is achieved by providing the flag value determining means for determining.

【0011】ここで、フラグ値決定手段は、相関値を動
きベクトルと予測ベクトルとから算出し、相関値が零付
近に集中する場合には、固定長符号化部の割合が少なく
なるように動きベクトルの最大値に基づいてフラグ値を
決定し、相関値が零付近から分散している場合には、可
変長符号化部が少なくなるように動きベクトルの最大値
に基づいてフラグ値を決定することがあげられる。
Here, the flag value determining means calculates a correlation value from the motion vector and the prediction vector. If the correlation value is concentrated near zero, the flag value is determined so as to reduce the ratio of the fixed length coding unit. The flag value is determined based on the maximum value of the vector, and when the correlation value is dispersed from near zero, the flag value is determined based on the maximum value of the motion vector so that the number of variable length coding units is reduced. There are things.

【0012】本発明にかかる画像符号化方法は、入力し
た画像処理情報から動きベクトルを検出し、可変長符号
化部と固定長符号化部とに分割して符号化する画像符号
化方法において、画像処理情報に基づく画像内の動きベ
クトルの相関値を検出し、相関値と画像内の動きベクト
ルの最大値とを用いて動きベクトルの符号化可能範囲を
表すフラグ値を決定するフラグ値決定工程を備えること
により上述した目的を達成する。
An image encoding method according to the present invention comprises the steps of: detecting a motion vector from input image processing information; dividing the motion vector into a variable length encoding unit and a fixed length encoding unit; A flag value determining step of detecting a correlation value of a motion vector in the image based on the image processing information and determining a flag value representing a coding range of the motion vector using the correlation value and the maximum value of the motion vector in the image With the provision of the above, the above-mentioned object is achieved.

【0013】ここで、フラグ値決定工程では、相関値が
動きベクトルと予測ベクトルとの差の値とから算出さ
れ、相関値が零付近に集中する場合には、固定長符号化
部の割合が少なくなるように動きベクトルの最大値に基
づいてフラグ値が決定され、相関値が零付近から分散し
ている場合には、可変長符号化部が少なくなるように動
きベクトルの最大値に基づいてフラグ値が決定されるこ
とがあげられる。
Here, in the flag value determining step, the correlation value is calculated from the difference between the motion vector and the prediction vector, and when the correlation value is concentrated near zero, the ratio of the fixed length coding unit is reduced. The flag value is determined based on the maximum value of the motion vector so as to decrease, and when the correlation value is dispersed from near zero, the flag value is determined based on the maximum value of the motion vector so that the number of variable-length coding units decreases. The flag value is determined.

【0014】[0014]

【発明の実施の形態】以下、本発明の実施の形態として
示す画像符号化装置の一構成例を図面を参考にして詳細
に説明する。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an example of a configuration of an image coding apparatus according to an embodiment of the present invention.

【0015】本発明の実施の形態として示す画像符号化
装置は、画像(以下、フレームと記す。)内の動きベク
トルの相関が低く、予測ベクトルの計算精度が低下する
場合であっても、動きベクトルと上記予測ベクトルとか
ら相関値を算出し、この相関値が零付近に集中する場合
には、固定長符号化部の割合が少なくなるように動きベ
クトルの最大値に基づいてフラグ値を決定し、相関値が
零付近から分散している場合には、可変長符号化部の割
合が少なくなるように動きベクトルの最大値に基づいて
フラグ値を決定することによって、動きベクトルの符号
化に必要なビット数の極端な増加を防ぐことを可能とし
たものである。
The image encoding apparatus shown as an embodiment of the present invention has the advantage that even when the correlation between motion vectors in an image (hereinafter, referred to as a frame) is low and the calculation accuracy of a prediction vector is reduced, the motion vector is not changed. A correlation value is calculated from the vector and the prediction vector, and when the correlation value is concentrated near zero, the flag value is determined based on the maximum value of the motion vector so that the ratio of the fixed-length coding unit is reduced. However, when the correlation values are scattered from near zero, the flag value is determined based on the maximum value of the motion vector so that the ratio of the variable length coding unit is reduced. This makes it possible to prevent an excessive increase in the required number of bits.

【0016】本発明の実施の形態の一構成例として示す
画像符号化装置1は、MPEG(Moving Picture Exper
ts Group)方式に基づいてメインプロファイルメインレ
ベル(Main Profile at Main Level;MP@ML)で画
像情報を符号化する画像符号化装置であって、図1に示
すように、画像データを一時的に記憶する第1のフレー
ムメモリ11及び第2のフレームメモリ21と、動きベ
クトルを検出する動きベクトル検出器12と、画像デー
タと予測画像データとの差分を演算する第1の演算器1
3と、第2の演算器20と、離散コサイン変換を施す離
散コサイン変換器(以下、DCT器と記す。)14と、
量子化ステップにしたがってDCT係数を量子化係数へ
と変換する量子化器15と、可変長符号化を施す可変長
符号化器(以下、VLC器と記す。)16と、符号化デ
ータを蓄積するバッファ17と、量子化ステップにした
がって量子化係数をDCT係数に変換する逆量子化器1
8と、逆離散コサイン変換を施すIDCT器19と、予
測画像データを抽出する動き補償器22とを備えてい
る。
An image coding apparatus 1 shown as one configuration example of an embodiment of the present invention has an MPEG (Moving Picture Experer).
This is an image encoding device that encodes image information at a main profile at a main level (MP @ ML) based on a ts Group method. As shown in FIG. A first frame memory 11 and a second frame memory 21 for storing, a motion vector detector 12 for detecting a motion vector, and a first calculator 1 for calculating a difference between image data and predicted image data
3, a second computing unit 20, a discrete cosine transformer (hereinafter referred to as a DCT unit) 14 for performing a discrete cosine transform,
A quantizer 15 that converts DCT coefficients into quantized coefficients in accordance with a quantization step, a variable-length encoder (hereinafter, referred to as a VLC unit) 16 that performs variable-length encoding, and stores encoded data. A buffer 17 and an inverse quantizer 1 for converting a quantized coefficient into a DCT coefficient according to a quantization step
8, an IDCT unit 19 for performing an inverse discrete cosine transform, and a motion compensator 22 for extracting predicted image data.

【0017】画像符号化装置1において、第1のフレー
ムメモリ11は、符号化すべき画像データを入力して、
一時的に記憶する。
In the image encoding device 1, a first frame memory 11 receives image data to be encoded,
Remember temporarily.

【0018】動きベクトル検出器12は、第1のフレー
ムメモリ11に記憶された画像データを、例えば16画
素×16画素等で構成されるマクロブロック単位で読み
出し、動きベクトルを検出する。ここで、動きベクトル
検出器12は、各フレームの画像データをフレーム内符
号化画像(以下、Iピクチャと記す。)、前方予測符号
化画像(以下、Pピクチャと記す。)、両方向予測符号
化画像(以下、Bピクチャと記す。)のうちの何れかの
画像として処理する。シーケンシャルに入力される各フ
レームの画像を、Iピクチャ、Pピクチャ、及びBピク
チャのうちの何れのピクチャとして処理するかは、例え
ば、I,B,P,B,P,・・・B,Pの順番で処理さ
れるといったように、予め決められている。
The motion vector detector 12 reads out the image data stored in the first frame memory 11 in units of macroblocks composed of, for example, 16 × 16 pixels, and detects a motion vector. Here, the motion vector detector 12 converts the image data of each frame into an intra-frame coded image (hereinafter, referred to as an I picture), a forward prediction coded image (hereinafter, referred to as a P picture), and bidirectional prediction coding. The image is processed as any one of the images (hereinafter, referred to as a B picture). Which of an I picture, a P picture, and a B picture is to be processed as an image of each sequentially input frame is determined by, for example, I, B, P, B, P,. Are determined in advance so as to be processed in the order of

【0019】すなわち、動きベクトル検出器12は、第
1のフレームメモリ11に記憶された画像データのう
ち、予め定められた所定の参照フレームを参照し、参照
したフレームと符号化の対象となっているフレームの1
6画素×16画素ラインのマクロブロック(小ブロッ
ク)とをブロックマッチング(パターンマッチング)す
ることにより、マクロブロックの動きベクトルを検出し
ている。
That is, the motion vector detector 12 refers to a predetermined reference frame among the image data stored in the first frame memory 11 and becomes a target of encoding with the referenced frame. Frame 1
By performing block matching (pattern matching) with a macroblock (small block) of 6 pixels × 16 pixel lines, a motion vector of the macroblock is detected.

【0020】MPEGでは、画像予測の形式を表す画像
予測モードとして、イントラ符号化(フレーム内符号
化)、前方予測符号化、後方予測符号化、両方向予測符
号化の4種類の予測モードを備えている。Iピクチャ
は、イントラ符号化された画像データを表し、Pピクチ
ャは、イントラ符号化、前方予測符号化の何れかで符号
化された画像データを表し、Bピクチャは、イントラ符
号化、前方予測符号化、後方予測符号化、両方向予測符
号化の何れかで符号化された画像データを表すことが決
められている。
In MPEG, four types of prediction modes, i.e., intra coding (intra-frame coding), forward prediction coding, backward prediction coding, and bidirectional prediction coding, are provided as image prediction modes representing the format of image prediction. I have. An I picture represents intra-coded image data, a P picture represents image data encoded by any of intra coding and forward prediction coding, and a B picture represents intra coding and forward prediction coding. It is determined to represent image data encoded by any one of encoding, backward prediction encoding, and bidirectional prediction encoding.

【0021】動きベクトル検出器12は、Iピクチャに
対して、予測モードとしてイントラ符号化を設定する。
この場合、動きベクトル検出器12は、動きベクトルの
検出は行わず、イントラ予測モードを可変長符号化器
(以下、VLC器と記す。)16、及び動き補償器22
に出力する。
The motion vector detector 12 sets intra coding as a prediction mode for the I picture.
In this case, the motion vector detector 12 does not detect a motion vector, and sets the intra prediction mode to a variable length encoder (hereinafter, referred to as a VLC unit) 16 and a motion compensator 22.
Output to

【0022】また、動きベクトル検出器12は、Pピク
チャに対して前方予測を行い、その動きベクトルを検出
する。さらに、動きベクトル検出器12は、前方予測を
行うことにより生じる予測誤差と、符号化対象のマクロ
ブロック(Pピクチャのマクロブロック)の、例えば分
散とを比較する。
The motion vector detector 12 performs forward prediction on the P picture and detects the motion vector. Further, the motion vector detector 12 compares a prediction error caused by performing forward prediction with, for example, a variance of a coding-target macroblock (P-picture macroblock).

【0023】その結果、マクロブロックの分散の方が予
測誤差より小さい場合、動きベクトル検出器12は、イ
ントラ符号化を予測モードとして設定し、動きベクトル
をVLC器16及び動き補償器22へと出力する。ま
た、マクロブロックの分散の方が予測誤差よりも大きい
場合、動きベクトル検出器12は、予測モードとして前
方予測符号化を設定し、検出した動きベクトルとともに
VLC器16及び動き補償器22へと出力する。
As a result, when the variance of the macroblock is smaller than the prediction error, the motion vector detector 12 sets the intra coding as the prediction mode and outputs the motion vector to the VLC unit 16 and the motion compensator 22. I do. If the variance of the macroblock is larger than the prediction error, the motion vector detector 12 sets forward prediction encoding as the prediction mode, and outputs the predicted motion vector to the VLC unit 16 and the motion compensator 22 together with the detected motion vector. I do.

【0024】さらに、動きベクトル検出器12は、Bピ
クチャに対しては、前方予測符号化、後方予測符号化、
及び両方向予測符号化を行い、それぞれの動きベクトル
を検出する。動きベクトル検出器12は、前方予測、後
方予測、及び両方向予測についての予測誤差が最小にな
るもの(以下、適宜、最小予測誤差と記す。)を検出
し、その最小予測誤差と、符号化対象のマクロブロック
(Bピクチャのマクロブロック)の、例えば分散とを比
較する。
Further, the motion vector detector 12 performs forward prediction coding, backward prediction coding,
And bidirectional predictive coding to detect respective motion vectors. The motion vector detector 12 detects a prediction error of the forward prediction, the backward prediction, and the bidirectional prediction (hereinafter, appropriately referred to as a minimum prediction error), and determines the minimum prediction error and the encoding target. Are compared with, for example, the variance of the macroblock (macroblock of the B picture).

【0025】その結果、マクロブロックの分散の方が最
小予測誤差より小さい場合、動きベクトル検出器12
は、予測モードとしてイントラ符号化を設定し、動きベ
クトルをVLC器16及び動き補償器22に出力する。
また、マクロブロックの分散の方が最小予測誤差より大
きい場合、動きベクトル検出器12は、予測モードとし
て、その最小予測誤差が得られた予測モードを設定し、
対応する動きベクトルとともにVLC器16及び動き補
償器22に出力する。
As a result, if the variance of the macroblock is smaller than the minimum prediction error, the motion vector detector 12
Sets intra coding as a prediction mode, and outputs a motion vector to the VLC unit 16 and the motion compensator 22.
If the variance of the macroblock is larger than the minimum prediction error, the motion vector detector 12 sets the prediction mode in which the minimum prediction error is obtained as the prediction mode,
Output to the VLC unit 16 and the motion compensator 22 together with the corresponding motion vector.

【0026】第1の演算器13は、動きベクトル検出器
12が第1のフレームメモリ11から読み出した画像デ
ータと同一のマクロブロックを第1のフレームメモリ1
1から読み出し、そのマクロブロックと動き補償器22
からの予測画像データとの差を算出する。この差の値
は、DCT器14に供給される。
The first arithmetic unit 13 stores the same macroblock as the image data read from the first frame memory 11 by the motion vector detector 12 in the first frame memory 1.
1 and its macroblock and motion compensator 22
Is calculated from the predicted image data. The value of this difference is supplied to the DCT unit 14.

【0027】DCT器14は、第1の演算器13からの
画像データに対してDCT(離散コサイン変換)処理を
施す。その結果得られたDCT係数が量子化器15に供
給される。
The DCT unit 14 performs DCT (Discrete Cosine Transform) processing on the image data from the first computing unit 13. The DCT coefficient obtained as a result is supplied to the quantizer 15.

【0028】量子化器15では、バッファ17のデータ
蓄積量とバッファ17に記憶されているデータ量とバッ
ファフィードバックとに対応して量子化ステップ(量子
化スケール)が設定され、そのときの量子化ステップで
DCT器14からのDCT係数が量子化される。この量
子化されたDCT係数(以下、適宜、量子化係数とい
う)は、設定された量子化ステップとともにVLC器1
6に供給される。
In the quantizer 15, a quantization step (quantization scale) is set in accordance with the amount of data stored in the buffer 17, the amount of data stored in the buffer 17, and the buffer feedback. In the step, the DCT coefficient from the DCT unit 14 is quantized. The quantized DCT coefficient (hereinafter, appropriately referred to as a quantization coefficient) is transmitted to the VLC unit 1 together with the set quantization step.
6.

【0029】VLC器16では、量子化器15より供給
される量子化係数が、例えばハフマン符号などの可変長
符号に変換され、バッファ17に出力される。さらに、
VLC器16は、量子化器15からの量子化ステップ、
動きベクトル検出器12からの予測モード、すなわちイ
ントラ符号化(フレーム内予測符号化)、前方予測符号
化、後方予測符号化、または両方向予測符号化の中から
選択された予測モードと動きベクトルとを可変長符号化
し、その結果得られる符号化データをバッファ17へと
供給する。
In the VLC unit 16, the quantized coefficients supplied from the quantizer 15 are converted into a variable length code such as a Huffman code and output to the buffer 17. further,
The VLC unit 16 performs a quantization step from the quantizer 15,
A prediction mode from the motion vector detector 12, that is, a prediction mode and a motion vector selected from intra coding (intra-frame predictive coding), forward predictive coding, backward predictive coding, or bidirectional predictive coding. Variable-length coding is performed, and the resulting coded data is supplied to the buffer 17.

【0030】バッファ17は、VLC器16からの符号
化データを一時的に蓄積することにより、符号化データ
のデータ量を平滑化し、符号化ビットストリームとして
出力する。あるいは図示しない記録媒体に記録する。ま
た、バッファ17は、符号化データのデータ蓄積量を量
子化器15に供給する。量子化器15は、バッファ17
からの符号化データのデータ蓄積量にしたがって、量子
化ステップを設定する。すなわち、量子化器15は、バ
ッファ17がオーバーフローしそうになると量子化ステ
ップを大きくして量子化係数のデータ量を低下させ、バ
ッファ17がアンダフローしそうになると量子化ステッ
プを小さくして量子化係数のデータ量を増大させる。こ
のように、量子化器15は、バッファ17のオーバフロ
ーとアンダフローとを防止している。
The buffer 17 temporarily stores the encoded data from the VLC unit 16, smoothes the data amount of the encoded data, and outputs the encoded data as an encoded bit stream. Alternatively, it is recorded on a recording medium (not shown). The buffer 17 supplies the data storage amount of the encoded data to the quantizer 15. The quantizer 15 includes a buffer 17
The quantization step is set according to the data storage amount of the encoded data from. That is, when the buffer 17 is about to overflow, the quantizer 15 increases the quantization step to reduce the data amount of the quantization coefficient, and when the buffer 17 is about to underflow, the quantization step decreases the quantization step to reduce the quantization coefficient. Increase the amount of data. Thus, the quantizer 15 prevents the buffer 17 from overflowing and underflowing.

【0031】量子化器15が出力する量子化係数と量子
化ステップとは、VLC器16のみならず逆量子化器1
8にも供給される。逆量子化器18では、量子化器15
からの量子化係数が量子化器15からの量子化ステップ
にしたがって逆量子化されることにより、DCT係数に
変換される。このDCT係数は、逆DCT器(以下、I
DCT器と記す。)19に供給される。
The quantization coefficient and the quantization step output from the quantizer 15 are determined not only by the VLC unit 16 but also by the inverse quantizer 1.
8 as well. In the inverse quantizer 18, the quantizer 15
Are inversely quantized in accordance with the quantization step from the quantizer 15 to be converted into DCT coefficients. This DCT coefficient is calculated by using an inverse DCT unit (hereinafter, I
It is referred to as DCT unit. ) 19.

【0032】IDCT器19では、DCT係数が逆DC
T処理され、その結果として得られるデータが演算器1
10に供給される。イントラ符号化である場合には、I
DCT器19からのデータは、第2の演算器20を通過
して、局所的に復号された符号化画像データ(以下、局
所復号画像データと記す。)として、第2のフレームメ
モリ21に直接供給される。この局所復号画像データ
は、受信側で得られる画像データと同一のものである。
In the IDCT unit 19, the DCT coefficient is
T processing, and the resulting data
10 is supplied. For intra coding, I
The data from the DCT unit 19 passes through the second arithmetic unit 20 and is directly sent to the second frame memory 21 as locally decoded image data (hereinafter, referred to as locally decoded image data). Supplied. This locally decoded image data is the same as the image data obtained on the receiving side.

【0033】第2の演算器20で得られた局所復号画像
データは、第2のフレームメモリ21にて記憶され、そ
の後、前方予測符号化、後方予測符号化、及び両方向予
測符号化される画像に対する参照画像データとして用い
られる。
The locally decoded image data obtained by the second arithmetic unit 20 is stored in the second frame memory 21 and then subjected to forward prediction coding, backward prediction coding, and bidirectional prediction coding. Is used as reference image data.

【0034】動き補償器22は、動きベクトル検出器1
2から予測モードと動きベクトルとのを受信すると、そ
の予測モード及び動きベクトルにしたがって、第2のフ
レームメモリ21に記億されている局所復号画像データ
を読み出し、読み出された画像データを予測画像データ
として第1の演算器13及び第2の演算器20に供給す
る。
The motion compensator 22 includes a motion vector detector 1
2, the local decoded image data stored in the second frame memory 21 is read in accordance with the prediction mode and the motion vector, and the read image data is read as the predicted image. The data is supplied to the first computing unit 13 and the second computing unit 20 as data.

【0035】動き補償器22は、動きベクトル検出器1
2から予測モードのみを受信した場合、特に予測モード
がイントラ符号化モードである場合には、予測画像デー
タを出力しない。このとき第1の演算器13及び第2の
演算器20は、演算処理を行わず、第1のフレームメモ
リ11から読み出したマクロブロックをDCT器14に
対して、直接出力する。
The motion compensator 22 includes the motion vector detector 1
When only the prediction mode is received from No. 2, especially when the prediction mode is the intra-coding mode, no predicted image data is output. At this time, the first arithmetic unit 13 and the second arithmetic unit 20 directly output the macroblock read from the first frame memory 11 to the DCT unit 14 without performing the arithmetic processing.

【0036】ここで、VLC器16の構成を図2を用い
て詳細に説明する。VLC器16は、具体的には、入力
されたベクトルと1フレーム内の動きベクトルとを格納
するMVバッファ31と、動きベクトルを概略部(可変
長符号化部)と詳細部(固定長符号化部)とに分解する
動きベクトル分解器32と、分解された動きベクトルの
概略部分を符号化する動きベクトル概略部符号化器33
と、分解された動きベクトルの詳細部分を符号化する動
きベクトル詳細部符号化器34と、動きベクトルの符号
化可能範囲を示すF_codeフラグを決定するF_code検出器
35と、動きベクトルに対して予測値を計算する予測ベ
クトル作成器36と、MVバッファ31より入力された
動きベクトルと予測ベクトル作成器36で作成された予
測ベクトルとの差分値を作成する加算器37とを備えて
構成されている。
Here, the configuration of the VLC unit 16 will be described in detail with reference to FIG. Specifically, the VLC unit 16 includes an MV buffer 31 that stores the input vector and the motion vector in one frame, and converts the motion vector into a general part (variable length coding part) and a detailed part (fixed length coding). A motion vector decomposer 32 for decomposing the motion vector and a motion vector general part coder 33 for encoding a general part of the decomposed motion vector.
A motion vector detail unit encoder 34 for encoding a detail portion of the decomposed motion vector; an F_code detector 35 for determining an F_code flag indicating a range in which the motion vector can be encoded; The prediction vector generator 36 calculates a value, and an adder 37 generates a difference value between the motion vector input from the MV buffer 31 and the prediction vector generated by the prediction vector generator 36. .

【0037】MVバッファ31は、入力された動きベク
トルと1フレーム内の動きベクトルとを格納する一時記
憶手段である。MVバッファ31に蓄積された動きベク
トルは、予測ベクトル作成器36、加算器37及びF_co
de検出器35へと出力される。
The MV buffer 31 is temporary storage means for storing the input motion vector and the motion vector in one frame. The motion vector accumulated in the MV buffer 31 is calculated by a prediction vector creator 36, an adder 37, and F_co.
It is output to the de detector 35.

【0038】動きベクトル分解器32では、後述する加
算器37からの差分ベクトルと、後述するF_code検出器
35からのF_codeとをそれぞれ入力し、入力したベクト
ルを概略部分と詳細部分とに分割する。動きベクトル分
解器32における分割の処理動作の詳細は、後述する。
入力した差分ベクトルは、mvを動きベクトル、residual
を動きベクトル詳細部、vlc_code_magnitudeを動きベク
トル概略部としたとき、以下に表す演算によって分解さ
れる。 if(mv==0){ residual=0; vlc_code_magnitude=0; }else{ int scale factor=1<<(fcode-1); residual=(abs(mv)-1)% scale_factor; vlc_code_magnitude=((abs(diff_vector)-residual+(scale_factor-1)) /scale_factor×sign(mv); } 動きベクトル分解器32は、分解して得られた動きベク
トル概略部を動きベクトル概略部符号化器33へ出力
し、動きベクトルの詳細部を動きベクトル詳細部34へ
と出力する。
The motion vector decomposer 32 receives a difference vector from an adder 37 described later and an F_code from an F_code detector 35 described later, and divides the input vector into a general part and a detailed part. The details of the division processing operation in the motion vector decomposer 32 will be described later.
For the input difference vector, mv is a motion vector, residual
Is the motion vector detail part, and vlc_code_magnitude is the motion vector outline part. if (mv == 0) {residual = 0; vlc_code_magnitude = 0;} else {int scale factor = 1 <<(fcode-1); residual = (abs (mv) -1)% scale_factor; vlc_code_magnitude = ((abs (diff_vector) -residual + (scale_factor-1)) / scale_factor × sign (mv);} The motion vector decomposer 32 outputs the motion vector rough part obtained by the decomposition to the motion vector rough part encoder 33, The detailed portion of the motion vector is output to the motion vector detailed portion 34.

【0039】また、動きベクトル概略部符号化器33で
は、入力された動きベクトル概略部を以下の表1に示す
VLC(可変長符号化)テーブルに基づいて符号化し、
符号化して得られたビットストリームを動きベクトル詳
細部符号化器34へと出力する。
The motion vector outline section encoder 33 encodes the input motion vector outline section based on a VLC (variable length coding) table shown in Table 1 below.
The bit stream obtained by encoding is output to the motion vector detail part encoder 34.

【0040】[0040]

【表1】 [Table 1]

【0041】動きベクトル詳細部符号化器34では、入
力した動きベクトル詳細部分を固定ビットとして符号化
する。このとき、動きベクトル詳細部は(F_code-1)b
itで符号化される。この符号化されたビットは、ビット
ストリームの一部として出力される。また、F_codeフラ
グが1の場合には、動きベクトル詳細部符号化器34
は、何も出力しない。
The motion vector detail part encoder 34 encodes the inputted motion vector detail part as fixed bits. At this time, the motion vector detail part is (F_code-1) b
It is encoded with it. The encoded bits are output as part of a bit stream. If the F_code flag is 1, the motion vector detail part encoder 34
Produces no output.

【0042】F_code検出器35は、MVバッファ31に
蓄積された1フレームの全マクロブロックの動きベクト
ルを参照し、F_codeフラグを決定する。F_codeフラグ
は、動きベクトルの符号化可能範囲を示し、以下の表2
に示すような値として定められている。
The F_code detector 35 determines the F_code flag with reference to the motion vectors of all macroblocks of one frame stored in the MV buffer 31. The F_code flag indicates the range in which the motion vector can be encoded.
Are defined as shown in FIG.

【0043】[0043]

【表2】 [Table 2]

【0044】例えば、F_codeの値が1の場合、[−1
6,15.5]の動きベクトルの符号化が可能となる。
通常、F_codeは、フレーム内の動きベクトルの最大値に
合わせて設定され、最大の動きベクトルをカバーする最
小のF_code値が設定されている。このようにして決定さ
れたF_code値は、F_code検出器35から動きベクトル分
解器32へと出力される。
For example, if the value of F_code is 1, [-1
6,15.5].
Normally, F_code is set according to the maximum value of the motion vector in the frame, and the minimum F_code value covering the maximum motion vector is set. The F_code value determined in this way is output from the F_code detector 35 to the motion vector decomposer 32.

【0045】予測ベクトル作成器36では、MVバッフ
ァ31に蓄積された動きベクトルの情報に基づいて、各
マクロブロックの動きベクトルに対し予測値を計算す
る。作成された予測ベクトルは、加算器37へと出力さ
れる。予測ベクトルを算出するに際しては、画像符号化
方式毎に定められた方法が用いられる。
The prediction vector generator 36 calculates a prediction value for the motion vector of each macroblock based on the information of the motion vector stored in the MV buffer 31. The created prediction vector is output to the adder 37. When calculating the prediction vector, a method determined for each image coding method is used.

【0046】加算器37は、各マクロブロック毎に、M
Vバッファ31から符号化を行う動きベクトルを入力
し、予測ベクトル作成器36から対応するマクロブロッ
クの動きベクトルの予測値を入力する。加算器37で
は、MVバッファ31より入力された動きベクトルと予
測ベクトル作成器36で作成された予測ベクトルとの差
分値(以下、差分ベクトルと記す。)を作成し、この差
分ベクトルを動きベクトル分解器32へと出力する。画
像符号化装置1では、以上のように動画像データをライ
ン相関、フレーム間相関等を利用してデータ容量を圧縮
符号化している。
The adder 37 calculates M
The motion vector to be coded is input from the V buffer 31, and the predicted value of the motion vector of the corresponding macro block is input from the predicted vector creator 36. The adder 37 creates a difference value (hereinafter, referred to as a difference vector) between the motion vector input from the MV buffer 31 and the prediction vector created by the prediction vector creation unit 36, and decomposes the difference vector into a motion vector. Output to the unit 32. As described above, the image encoding device 1 compresses and encodes the moving image data using the line correlation, the inter-frame correlation, and the like.

【0047】続いて、上述のような構成からなるVLC
器16が入力された差分ベクトルを概略部分と詳細部分
とに分解する動作について詳細に説明する。
Subsequently, the VLC having the above configuration
The operation of the unit 16 for decomposing the input difference vector into a general part and a detailed part will be described in detail.

【0048】VLC器16へ入力された動きベクトル
は、MVバッファ31へ入力される。MVバッファ31
では、入力された動きベクトルを格納し、必要に応じて
予測ベクトル作成器36及び加算器37へ送出する。
The motion vector input to the VLC unit 16 is input to the MV buffer 31. MV buffer 31
Then, the input motion vector is stored and sent to the predicted vector creator 36 and the adder 37 as needed.

【0049】予測ベクトル作成器36では、MVバッフ
ァ31からの動きベクトルを受けて、MPEG1、MP
EG2、またはMPEG4の画像符号化方式の各規格に
基づいて、MVバッファ31に格納される動きベクトル
情報を用いて各マクロブロックの予測ベクトルを作成す
る。予測ベクトル作成器36は、各マクロブロック毎に
計算した予測ベクトルをF_code検出器35及び加算器3
7に送出する。
The prediction vector creator 36 receives the motion vector from the MV buffer 31 and
A prediction vector of each macro block is created using the motion vector information stored in the MV buffer 31 based on each standard of the image coding scheme of EG2 or MPEG4. The prediction vector creator 36 outputs the prediction vector calculated for each macroblock to the F_code detector 35 and the adder 3.
7

【0050】F_code検出器35は、入力された動きベク
トルの最大値を検出し、検出された動きベクトルの最大
値に基づいて、全ての動きベクトルを包括するようなF_
codeを検出する。さらに、F_code検出器35では、予測
ベクトル作成器36より出力された予測ベクトルと動き
ベクトルとを比較しフレーム内の動きベクトルと予測ベ
クトルとの間に十分な相関があるか否かを検出する。
The F_code detector 35 detects the maximum value of the input motion vector, and based on the maximum value of the detected motion vector, the F_code detector 35 includes all the motion vectors.
Detect code. Further, the F_code detector 35 compares the motion vector with the motion vector output from the motion vector generator 36 and detects whether there is a sufficient correlation between the motion vector and the motion vector in the frame.

【0051】F_code検出器35は、フレーム全体にわた
って、動きベクトルと予測ベクトルとの相関が十分高い
と判断した場合、上述した動きベクトルの最大値に基づ
いて決定されたF_codeを動きベクトル分解器32へと出
力する。
When the F_code detector 35 determines that the correlation between the motion vector and the prediction vector is sufficiently high over the entire frame, the F_code detector 35 sends the F_code determined based on the maximum value of the motion vector to the motion vector decomposer 32. Is output.

【0052】また、F_code検出器35は、フレーム全体
にわたって、動きベクトルと予測ベクトルとの相関が低
いと判断した場合、上述した動きベクトルの最大値に基
づいて決定されたF_codeよりも大きい値を持つF_codeへ
変更し、変更後のF_codeを動きベクトル分解器32へと
出力する。
When the F_code detector 35 determines that the correlation between the motion vector and the prediction vector is low over the entire frame, the F_code detector 35 has a value larger than the F_code determined based on the maximum value of the motion vector described above. Change to F_code, and output the changed F_code to motion vector decomposer 32.

【0053】つまり、画像符号化装置1においてVLC
器16は、各動きベクトルに対し、予測ベクトルが十分
に当たっており、差分後のベクトルが零付近に集中する
場合には、固定長符号化部の割合が少なくなるように動
きベクトルの最大値よりF_codeを決定する。また、予測
ベクトルの予測精度が不十分であり、差分後のベクトル
が零付近に集中しない場合には、可変長符号化部の割合
が少なくなるように、F_codeの値を最低限必要とされる
値より大きく設定して符号化を行う。このように画像符
号化装置1は、検出された予測ベクトルと動きベクトル
の相関よりF_codeの値を変化させることを特徴としてい
る。
That is, in the image encoding device 1, VLC
When the prediction vector sufficiently satisfies each motion vector and the vector after the difference is concentrated near zero, the F_code is larger than the maximum value of the motion vector so that the ratio of the fixed-length coding unit is reduced. To determine. Further, when the prediction accuracy of the prediction vector is insufficient and the vector after the difference is not concentrated near zero, the value of the F_code is required at a minimum so that the ratio of the variable length coding unit is reduced. Encoding is performed by setting a value larger than the value. As described above, the image coding apparatus 1 is characterized in that the value of F_code is changed based on the correlation between the detected prediction vector and the motion vector.

【0054】上述の手段により出力されたF_codeは、動
きベクトル分解器32及び動きベクトル詳細部符号化器
34に出力される。
The F_code output by the above means is output to the motion vector decomposer 32 and the motion vector detail unit encoder 34.

【0055】また、加算器37では、MVバッファより
出力された動きベクトルと予測ベクトル作成器36より
出力された予測ベクトルとから差分ベクトルを作成し、
この差分ベクトルを動きベクトル分解器32へと送出す
る。
The adder 37 creates a difference vector from the motion vector output from the MV buffer and the prediction vector output from the prediction vector generator 36.
This difference vector is sent to the motion vector decomposer 32.

【0056】動きベクトル分解器32は、加算器37か
らの差分ベクトルを従来例で示した動作によって、差分
ベクトルの概略を示す概略部と詳細部を示す部分とに分
解し、差分ベクトルの概略部分を動きベクトル概略部符
号化器33へ、また差分ベクトルの詳細部分を動きベク
トル詳細部符号化器34へと出力する。
The motion vector decomposer 32 decomposes the difference vector from the adder 37 into a general part showing the outline of the differential vector and a part showing the detailed part by the operation shown in the conventional example, and Is output to the motion vector outline part encoder 33, and the detailed part of the difference vector is output to the motion vector outline part encoder 34.

【0057】動きベクトル概略部符号化器33は、動き
ベクトル分解器32より出力された差分ベクトルの概略
部を入力し、VLCテーブルを用いて符合化する。符号
化された動きベクトルの概略部は、ビットストリームと
して出力される。
The motion vector outline part encoder 33 receives the outline part of the difference vector output from the motion vector decomposer 32 and encodes it using a VLC table. The outline of the encoded motion vector is output as a bit stream.

【0058】一方、動きベクトル詳細部符号化器34
は、動きベクトル分解器より出力された差分ベクトルの
詳細部分、及びF_code検出器35より出力されたF_code
を入力し、差分ベクトルの詳細部分を(f_code-1)ビ
ットの固定ビットで符号化し、ビットストリームとして
出力する。
On the other hand, the motion vector detail part encoder 34
Is the detailed part of the difference vector output from the motion vector decomposer, and the F_code output from the F_code detector 35.
Is input, and the detailed part of the difference vector is encoded with (f_code-1) fixed bits, and the resultant is output as a bit stream.

【0059】以上説明したように、VLC器16は、各
動きベクトルと予測ベクトルとの相関に基づいて、F_co
deの値を変化させることが可能である。
As described above, the VLC unit 16 calculates F_co based on the correlation between each motion vector and the prediction vector.
It is possible to change the value of de.

【0060】なお、F_codeの値を変更する際には、動き
ベクトルの最大値に基づいて、F_codeを一定値だけ増加
させてもよいし、動きベクトルと予測ベクトルとの相関
の度合いに対応してF_codeの増加分を可変とすることに
よって、相関が低いときほど大きなF_code値を出力する
ようにしてもよい。
When the value of F_code is changed, F_code may be increased by a fixed value based on the maximum value of the motion vector, or may be changed according to the degree of correlation between the motion vector and the prediction vector. By making the increment of the F_code variable, a larger F_code value may be output as the correlation is lower.

【0061】また、本実施の形態では、F_code検出器3
5において、動きベクトルと予測ベクトルとが入力され
るとしているが、これに限定されることはなく、動きベ
クトルだけを入力し、F_code検出器35の内部で予測ベ
クトルを検出し、動きベクトルと予測ベクトルとの相関
を求めてもよい。
In this embodiment, the F_code detector 3
5, it is assumed that a motion vector and a prediction vector are input. However, the present invention is not limited to this. Only a motion vector is input, a prediction vector is detected inside the F_code detector 35, and the motion vector and the prediction vector are detected. The correlation with the vector may be obtained.

【0062】また、予測ベクトルとの相関を検出する
際、動きベクトルのみをF_code検出器35に入力し、予
測ベクトルと動きベクトルの相関を近似することも可能
である。
When detecting the correlation with the prediction vector, it is also possible to input only the motion vector to the F_code detector 35 to approximate the correlation between the prediction vector and the motion vector.

【0063】さらに、動きベクトルだけでなく、画像画
像符号化装置1に入力された入力画像そのもの、及び加
算器37の出力データ等をF_code検出器35において、
動きベクトルと予測ベクトルとの相関の計算に用いても
よい。
Further, not only the motion vector but also the input image itself input to the image coding apparatus 1 and the output data of the adder 37 are output to the F_code detector 35 by the F_code detector 35.
It may be used for calculating a correlation between a motion vector and a prediction vector.

【0064】また、MPEGによる画像符号化方式のみ
でなく、F_codeを用い、動きベクトルを可変長部号化部
(概略部)と固定長符号化部(詳細部)とに分割して符
号化を行う画像圧縮方式に対して広く応用可能である。
In addition to the image coding method based on MPEG, the F_code is used to divide the motion vector into a variable length coding section (schematic section) and a fixed length coding section (detailed section) to perform coding. It is widely applicable to the image compression method to be performed.

【0065】[0065]

【発明の効果】本発明にかかる画像符号化装置は、入力
した画像処理情報から動きベクトルを検出し、可変長符
号化部と固定長符号化部とに分割して符号化する画像符
号化装置において、画像処理情報に基づく画像内の動き
ベクトルの相関値を検出し、相関値と画像内の動きベク
トルの最大値とを用いて動きベクトルの符号化可能範囲
を表すフラグ値を決定するフラグ値決定手段を備える。
An image coding apparatus according to the present invention detects a motion vector from input image processing information and divides the motion vector into a variable length coding section and a fixed length coding section for coding. A flag value for detecting a correlation value of a motion vector in the image based on the image processing information, and determining a flag value representing a coding range of the motion vector using the correlation value and the maximum value of the motion vector in the image A determining means;

【0066】ここで、本発明にかかる画像符号化装置
は、フラグ値決定手段において、相関値を動きベクトル
と予測ベクトルとから算出し、相関値が零付近に集中す
る場合には、固定長符号化部の割合が少なくなるように
動きベクトルの最大値に基づいてフラグ値を決定し、相
関値が零付近から分散している場合には、可変長符号化
部が少なくなるように動きベクトルの最大値に基づいて
フラグ値を決定する。
Here, in the image coding apparatus according to the present invention, the flag value determining means calculates the correlation value from the motion vector and the prediction vector, and when the correlation value is concentrated near zero, the fixed-length code The flag value is determined based on the maximum value of the motion vector so that the ratio of the motion vector decreases, and when the correlation value is dispersed from near zero, the motion vector The flag value is determined based on the maximum value.

【0067】したがって、本発明にかかる画像符号化装
置は、予測ベクトルの算出が十分な精度で行えない場合
でも、可変長符号化部における符号化コードのコード長
が大となることを防止し、動きベクトルの発生ビット量
の増大から生じる符号化画像の画質劣化を防止すること
が可能である。
Therefore, the image coding apparatus according to the present invention prevents the code length of the coded code in the variable length coding unit from being increased even when the prediction vector cannot be calculated with sufficient accuracy. It is possible to prevent the image quality of the encoded image from deteriorating due to an increase in the amount of generated bits of the motion vector.

【0068】本発明にかかる画像符号化方法は、入力し
た画像処理情報から動きベクトルを検出し、可変長符号
化部と固定長符号化部とに分割して符号化する画像符号
化方法において、画像処理情報に基づく画像内の動きベ
クトルの相関値を検出し、相関値と画像内の動きベクト
ルの最大値とを用いて動きベクトルの符号化可能範囲を
表すフラグ値を決定するフラグ値決定工程を備える。
An image encoding method according to the present invention comprises the steps of: detecting a motion vector from input image processing information; dividing the motion vector into a variable length encoding unit and a fixed length encoding unit; A flag value determining step of detecting a correlation value of a motion vector in the image based on the image processing information and determining a flag value representing a coding range of the motion vector using the correlation value and the maximum value of the motion vector in the image Is provided.

【0069】ここで、本発明にかかる画像符号化方法
は、フラグ値決定工程において、相関値を動きベクトル
と予測ベクトルとから算出し、相関値が零付近に集中す
る場合には、固定長符号化部の割合が少なくなるように
動きベクトルの最大値に基づいてフラグ値を決定し、相
関値が零付近から分散してい場合には、可変長符号化部
が少なくなるように動きベクトルの最大値に基づいてフ
ラグ値を決定する。
Here, in the image encoding method according to the present invention, in the flag value determining step, the correlation value is calculated from the motion vector and the prediction vector, and when the correlation value is concentrated near zero, the fixed-length code The flag value is determined based on the maximum value of the motion vector so as to reduce the ratio of the motion vector, and when the correlation value is dispersed from near zero, the maximum value of the motion vector is Determine the flag value based on the value.

【0070】したがって、本発明にかかる画像符号化方
法によれば、予測ベクトルの算出が十分な精度で行えな
い場合でも、可変長符号化部における符号化コードのコ
ード長が大となることが防止され、動きベクトルの発生
ビット量の増大から生じる符号化画像の画質劣化が防止
される。
Therefore, according to the image encoding method of the present invention, even when the prediction vector cannot be calculated with sufficient accuracy, it is possible to prevent the code length of the encoded code in the variable length encoding unit from becoming large. Thus, it is possible to prevent the image quality of the encoded image from deteriorating due to an increase in the amount of generated bits of the motion vector.

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

【図1】本発明の実施の形態として示す画像符号化装置
の構成を説明するブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an image encoding device shown as an embodiment of the present invention.

【図2】本発明の実施の形態として示す画像符号化装置
におけるVLC器の構成を説明するブロック図である。
FIG. 2 is a block diagram illustrating a configuration of a VLC unit in the image encoding device shown as an embodiment of the present invention.

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

1 画像符号化装置、11 第1のフレームメモリ、1
2 動きベクトル検出器、13 第1の演算器、14
DCT変換器、15 量子化器、16 VLC、17
バッファ、18 逆量子化器、19 IDCT器、20
第2の演算器、21 第2のフレームメモリ、22
動き補償器、31 MVバッファ、32動きベクトル分
解器、33 動きベクトル概略部符号化器、34 動き
ベクトル詳細部符号化器、35 f_code検出器、36
予測ベクトル作成器、37 加算器
1 image encoding device, 11 first frame memory, 1
2 motion vector detector, 13 first computing unit, 14
DCT converter, 15 quantizer, 16 VLC, 17
Buffer, 18 inverse quantizer, 19 IDCT unit, 20
Second arithmetic unit, 21 Second frame memory, 22
Motion compensator, 31 MV buffer, 32 motion vector decomposer, 33 motion vector rough part encoder, 34 motion vector detail part encoder, 35 f_code detector, 36
Prediction vector generator, 37 adder

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C059 KK22 MA00 MA04 MA14 MA23 MC11 ME01 ME13 NN01 NN28 PP05 PP06 PP07 SS06 TA25 TA46 TB07 TC03 TC12 TD04 UA02 UA31 5J064 AA02 BA01 BA09 BA16 BB03 BC01 BC16 BD02  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5C059 KK22 MA00 MA04 MA14 MA23 MC11 ME01 ME13 NN01 NN28 PP05 PP06 PP07 SS06 TA25 TA46 TB07 TC03 TC12 TD04 UA02 UA31 5J064 AA02 BA01 BA09 BA16 BB03 BC01 BC16 BD02

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 入力した画像処理情報から動きベクトル
を検出し、可変長符号化部と固定長符号化部とに分割し
て符号化する画像符号化装置において、 上記画像処理情報に基づく画像内の動きベクトルの相関
値を検出し、上記相関値と画像内の動きベクトルの最大
値とを用いて動きベクトルの符号化可能範囲を表すフラ
グ値を決定するフラグ値決定手段を備えることを特徴と
する画像符号化装置。
An image encoding apparatus for detecting a motion vector from input image processing information and dividing and encoding the motion vector into a variable-length encoding unit and a fixed-length encoding unit. Detecting a correlation value of the motion vector, and using a flag value determining means for determining a flag value representing a coding range of the motion vector using the correlation value and the maximum value of the motion vector in the image, Image encoding device.
【請求項2】 上記フラグ値決定手段は、動きベクトル
の符号化時に使用する予測ベクトルと動きベクトルとを
用いて上記相関値を検出することを特徴とする請求項1
記載の画像符号化装置。
2. The method according to claim 1, wherein the flag value determination unit detects the correlation value using a prediction vector and a motion vector used when coding the motion vector.
The image encoding device according to claim 1.
【請求項3】 上記フラグ値決定手段は、上記相関値を
上記動きベクトルと上記予測ベクトルとから算出し、上
記相関値が零付近に集中する場合には、固定長符号化部
の割合が少なくなるように動きベクトルの最大値に基づ
いてフラグ値を決定することを特徴とする請求項2記載
の画像符号化装置。
3. The flag value determining means calculates the correlation value from the motion vector and the prediction vector, and when the correlation value is concentrated near zero, the ratio of the fixed length encoding unit is small. 3. The image coding apparatus according to claim 2, wherein the flag value is determined based on the maximum value of the motion vector.
【請求項4】 上記フラグ値決定手段は、上記相関値を
上記動きベクトルと上記予測ベクトルとから算出し、上
記相関値が零付近から分散している場合には、可変長符
号化部の割合が少なくなるように動きベクトルの最大値
に基づいてフラグ値を決定することを特徴とする請求項
2記載の画像符号化装置。
4. The flag value determining means calculates the correlation value from the motion vector and the prediction vector. If the correlation value is dispersed from near zero, the flag value determining means determines the ratio of the variable length coding unit. 3. The image encoding apparatus according to claim 2, wherein the flag value is determined based on the maximum value of the motion vector so as to reduce.
【請求項5】 上記フラグ値決定手段は、入力された画
像処理情報に基づく画像と動きベクトルに基づいて作成
された予測画像とを用いて上記相関値を算出することを
特徴とする請求項1記載の画像符号化装置。
5. The method according to claim 1, wherein the flag value determining means calculates the correlation value using an image based on the input image processing information and a predicted image generated based on a motion vector. The image encoding device according to claim 1.
【請求項6】 入力した画像処理情報から動きベクトル
を検出し、可変長符号化部と固定長符号化部とに分割し
て符号化する画像符号化方法において、上記画像処理情
報に基づく画像内の動きベクトルの相関値を検出し、上
記相関値と画像内の動きベクトルの最大値とを用いて動
きベクトルの符号化可能範囲を表すフラグ値を決定する
フラグ値決定工程を備えることを特徴とする画像符号化
方法。
6. An image encoding method for detecting a motion vector from input image processing information, dividing the motion vector into a variable-length encoding unit and a fixed-length encoding unit, and encoding the image. Detecting a correlation value of the motion vector of the motion vector, the flag value determining step of determining a flag value representing a coding range of the motion vector using the correlation value and the maximum value of the motion vector in the image, Image encoding method.
【請求項7】 上記フラグ値決定工程では、動きベクト
ルの符号化時に使用する予測ベクトルと動きベクトルと
を用いて上記相関値が検出されることを特徴とする請求
項6記載の画像符号化方法。
7. The image encoding method according to claim 6, wherein in the flag value determining step, the correlation value is detected using a prediction vector and a motion vector used when encoding the motion vector. .
【請求項8】 上記フラグ値決定工程では、上記相関値
が上記動きベクトルと上記予測ベクトルとから算出さ
れ、上記相関値が零付近に集中する場合には、固定長符
号化部の割合が少なくなるように動きベクトルの最大値
に基づいてフラグ値が決定されることを特徴とする請求
項7記載の画像符号化方法。
8. In the flag value determining step, the correlation value is calculated from the motion vector and the prediction vector, and when the correlation value is concentrated near zero, the ratio of the fixed length encoding unit is small. The image encoding method according to claim 7, wherein the flag value is determined based on the maximum value of the motion vector.
【請求項9】 上記フラグ値決定工程では、上記相関値
が上記動きベクトルと上記予測ベクトルとから算出さ
れ、上記相関値が零付近から分散している場合には、可
変長符号化部の割合が少なくなるように動きベクトルの
最大値に基づいてフラグ値が決定されることを特徴とす
る請求項7記載の画像符号化方法。
9. In the flag value determining step, the correlation value is calculated from the motion vector and the prediction vector, and when the correlation value is dispersed from near zero, the ratio of the variable length coding unit 8. The image encoding method according to claim 7, wherein the flag value is determined based on the maximum value of the motion vector so that the number of motion vectors decreases.
【請求項10】 上記フラグ値決定工程では、入力され
た画像処理情報に基づく画像と動きベクトルに基づいて
作成された予測画像とを用いて上記相関値が算出される
ことを特徴とする請求項6記載の画像符号化方法。
10. The flag value determining step includes calculating the correlation value using an image based on the input image processing information and a predicted image generated based on a motion vector. 7. The image coding method according to 6.
JP2001001804A 2001-01-09 2001-01-09 Image coding device and image coding method Withdrawn JP2002209216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001001804A JP2002209216A (en) 2001-01-09 2001-01-09 Image coding device and image coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001001804A JP2002209216A (en) 2001-01-09 2001-01-09 Image coding device and image coding method

Publications (1)

Publication Number Publication Date
JP2002209216A true JP2002209216A (en) 2002-07-26

Family

ID=18870396

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001001804A Withdrawn JP2002209216A (en) 2001-01-09 2001-01-09 Image coding device and image coding method

Country Status (1)

Country Link
JP (1) JP2002209216A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7899117B2 (en) 2004-05-26 2011-03-01 Panasonic Corporation Apparatus and method for encoding motion vector, and program and medium therefor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7899117B2 (en) 2004-05-26 2011-03-01 Panasonic Corporation Apparatus and method for encoding motion vector, and program and medium therefor

Similar Documents

Publication Publication Date Title
US7050499B2 (en) Video encoding apparatus and method and video encoding mode converting apparatus and method
EP1551186B1 (en) Video coding apparatus with resolution converter
JPH05115061A (en) Motion vector coder and decoder
KR20000023276A (en) Method for controlling frame-level rate
KR20050089838A (en) Video encoding with skipping motion estimation for selected macroblocks
US20050243917A1 (en) H.263/MPEG video encoder using average histogram difference and method for controlling the same
JP2004215275A (en) Motion compensation based improved noise prediction method and apparatus, and moving image encoding method and apparatus using the same
JPH09322176A (en) Encoding mode selecting method, moving image encoding device, encoding method, recording method and transmitting method
EP1374595B1 (en) Video coding method and device
US8774264B2 (en) Image insertion device for compressed video data
US7133448B2 (en) Method and apparatus for rate control in moving picture video compression
JP2002209216A (en) Image coding device and image coding method
KR100744435B1 (en) An improved early detection of all-zero dct coefficients for fast video encoding
JP3963296B2 (en) Video transmission rate conversion device
US20020106021A1 (en) Method and apparatus for reducing the amount of computation of the video images motion estimation
JP2005303555A (en) Moving image encoding apparatus and its method
JP3690259B2 (en) High-speed moving image encoding apparatus and high-speed moving image encoding method
JPH0951538A (en) Encoding method for image signal
JP2002204449A (en) Quantization unit setting device, quantization unit setting method, coder and coding method, and information recording medium
US20060181650A1 (en) Encoding method and device
JP2005151167A (en) Encoding apparatus and encoding program for predicting movement compensation
JP3934772B2 (en) Variable transfer rate encoding method and apparatus
JP4359273B2 (en) Coding mode selection method
JPH0456492A (en) Moving image encoding control system
JP2004328799A (en) Motion picture coding apparatus and motion picture coding method

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080401