JP2002112274A - Processing time adaptive image coding method and recording medium for its program - Google Patents

Processing time adaptive image coding method and recording medium for its program

Info

Publication number
JP2002112274A
JP2002112274A JP2000303509A JP2000303509A JP2002112274A JP 2002112274 A JP2002112274 A JP 2002112274A JP 2000303509 A JP2000303509 A JP 2000303509A JP 2000303509 A JP2000303509 A JP 2000303509A JP 2002112274 A JP2002112274 A JP 2002112274A
Authority
JP
Japan
Prior art keywords
motion search
time
motion
encoding
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2000303509A
Other languages
Japanese (ja)
Other versions
JP3670566B2 (en
Inventor
Hideaki Kimata
英明 木全
Yoshiyuki Yashima
由幸 八島
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2000303509A priority Critical patent/JP3670566B2/en
Publication of JP2002112274A publication Critical patent/JP2002112274A/en
Application granted granted Critical
Publication of JP3670566B2 publication Critical patent/JP3670566B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a processing time adaptive image coding method that can encode a moving picture in real time even when the processing time differs depending on an execution environment of an encoding program. SOLUTION: A coding object time that is a time for encoding one frame is set on the basis of a predetermined frame rate prior to encoding and motion search instruction number information that is number of processing instructions for motion search executed by an arithmetic unit is stored according to a motion search method preset before the encoding. In the case of the encoding, a coding time of each frame is measured, a motion search object time for motion search of a succeeding frame is set on the basis of the preset coding object time and the measured coding time after the end of encoding of one frame, the motion search method is decided from the motion search object time according to the motion search instruction number information stored in advance and the motion search processing is controlled by the method.

Description

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

【0001】[0001]

【発明が属する技術分野】本発明は,動画像符号化の技
術に関し,特に符号化処理の実行環境に応じて符号化の
処理時間が異なる場合にも探索精度を切り替えることな
どにより,実時間で動画像を符号化できるようにした処
理時間適応画像符号化方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a moving picture coding technique, and more particularly to a technique for real-time coding by switching search precision even when the coding processing time varies depending on the execution environment of the coding processing. The present invention relates to a processing time adaptive image encoding method capable of encoding a moving image.

【0002】[0002]

【従来の技術】動画像符号化では,一般的に符号化効率
向上のために動き補償フレーム間予測符号化方法が用い
られる。この方法は,現フレームの原画像と,それ以前
に符号化された他のフレームの復号画像から作られる参
照画像との間で,対応する画素間の画像情報の差分(予
測誤差と呼ぶ)を符号化する。参照画像の作成には,過
去や未来のフレームを使う方法や,過去や未来のフレー
ムをアフィン変換して作成する方法がある。
2. Description of the Related Art In moving picture coding, a motion-compensated inter-frame predictive coding method is generally used to improve coding efficiency. In this method, a difference (referred to as a prediction error) of image information between corresponding pixels between an original image of a current frame and a reference image formed from a decoded image of another frame encoded earlier is referred to. Encode. The reference image can be created by using a past or future frame or by affine-transforming a past or future frame.

【0003】また,予測誤差の符号化では,まず予測誤
差について離散コサイン変換(DCT)などの周波数変
換を行い,その係数を量子化した後に可変長符号化す
る。画面内の同じ位置での画素間の予測誤差よりも平行
移動した位置の予測誤差の方が小さい場合には,符号化
効率を向上するために,平行移動した位置の予測誤差を
符号化する。平行移動量は動きベクトルとして符号化さ
れる。
In encoding prediction errors, first, the prediction errors are subjected to frequency transformation such as discrete cosine transform (DCT), and the coefficients are quantized, followed by variable length encoding. When the prediction error of the position shifted in parallel is smaller than the prediction error between pixels at the same position in the screen, the prediction error of the position shifted in parallel is encoded in order to improve encoding efficiency. The translation amount is encoded as a motion vector.

【0004】一般的には,画面を小領域に,例えば縦横
16画素のマクロブロックで区切り,その小領域毎に動
きベクトルを設定する。例えば,マクロブロック内の画
素に対して動きベクトルだけ同様に平行移動した位置の
画素を設定し,これらの画素間の予測誤差をDCTす
る。また,小領域内の各画素に対して同じ動きベクトル
を設定するのではなく,隣接小領域の動きベクトルを使
い,個々の画素の平行移動量を計算で求める方法もあ
る。
In general, a screen is divided into small areas, for example, by macroblocks of 16 pixels vertically and horizontally, and a motion vector is set for each of the small areas. For example, a pixel at a position that is similarly translated by a motion vector with respect to a pixel in a macroblock is set, and DCT is performed on a prediction error between these pixels. Also, instead of setting the same motion vector for each pixel in the small area, there is also a method of calculating the parallel movement amount of each pixel using the motion vector of the adjacent small area.

【0005】参考文献:G.J.Sullivan and R.L.Baker:"
Motion Compensation for video compression using co
ntorol grid interpolation",IEEE ICA SSP '91, pp.27
13-2716,1991。
Reference: GJ Sullivan and RLBaker: "
Motion Compensation for video compression using co
ntorol grid interpolation ", IEEE ICA SSP '91, pp.27
13-2716,1991.

【0006】また,平行移動量が整数ではない場合に
は,参照画像内で対応する位置に画素がないため,参照
画像の周辺画素の画像情報から計算により求める。
If the translation amount is not an integer, there is no pixel at the corresponding position in the reference image, and thus the value is calculated from the image information of the peripheral pixels of the reference image.

【0007】この平行移動量を求める処理は「動き探
索」と呼ばれる。一般的には,画面を縦横16画素のマ
クロブロックで区切り,そのマクロブロック毎に動きベ
クトルを求める。マクロブロック内の全画素に対する予
測誤差の評価関数としては,マクロブロック内のすべて
の画素の画像情報の絶対値差分の和や分散等が用いられ
る。これらの値が小さい位置の動きベクトルを選択する
と予測誤差の符号化効率が高くなるため,これらの値が
最も小さくなる位置を求める。
[0007] The process of obtaining the amount of translation is called "motion search". In general, a screen is divided by a macroblock of 16 pixels in length and width, and a motion vector is obtained for each macroblock. As the evaluation function of the prediction error for all the pixels in the macroblock, the sum or the variance of the absolute value differences of the image information of all the pixels in the macroblock is used. If a motion vector at a position where these values are small is selected, the encoding efficiency of the prediction error will be high. Therefore, a position where these values are minimized is determined.

【0008】また,探索範囲を大きくするほど,動きベ
クトルの候補が増えるため符号化効率の高い動きベクト
ルを求めることができる。映像符号化方式H.263で
は,動きベクトルの表現上の制限により探索範囲は最大
で縦横16画素ずれた位置になる。この様子を図1に示
す。この探索範囲内を1画素ずつずらしながら,絶対値
差分和や分散を計算し,これらの値が最小となる位置を
求める。
Further, as the search range is enlarged, the number of motion vector candidates increases, so that a motion vector with high coding efficiency can be obtained. Video coding system In 263, the search range is shifted by a maximum of 16 pixels in the vertical and horizontal directions due to the restriction on the expression of the motion vector. This is shown in FIG. The absolute value difference sum and the variance are calculated while shifting the search range one pixel at a time, and the position where these values are minimum is obtained.

【0009】しかし,探索範囲を大きくするほど,動き
探索の演算量が増える。動き探索の演算量を減らすため
に様々な手法が用いられている。以下に例を3つ挙げ
る。
However, as the search range is enlarged, the amount of calculation for motion search increases. Various techniques have been used to reduce the amount of computation for motion search. The following are three examples.

【0010】[方法1]:絶対値差分和や分散を計算す
る画素数を少なくする。例えば,マクロブロック内の縦
横16画素(合計256画素)のうち,64画素で計算
する。マクロブロック内で64画素を選択した例を図2
に示す。図2において,黒丸で示した画素を選択する
と,64画素の計算となる。
[Method 1]: The number of pixels for calculating the sum of absolute differences and the variance is reduced. For example, calculation is performed with 64 pixels out of 16 pixels in the vertical and horizontal directions (total of 256 pixels) in the macro block. FIG. 2 shows an example in which 64 pixels are selected in a macro block.
Shown in In FIG. 2, when a pixel indicated by a black circle is selected, the calculation is performed for 64 pixels.

【0011】[方法2]:探索範囲内で絶対値差分和や
分散を計算する位置を少なくする。例えば2画素ずつず
らしながら探索する。2画素ずつずらしながら探索する
様子を図3に示す。
[Method 2]: The number of positions for calculating the sum of absolute differences and the variance within the search range is reduced. For example, the search is performed while shifting by two pixels. FIG. 3 shows how the search is performed while shifting by two pixels.

【0012】[方法3]:木探索する。例えば,予めあ
る探索位置の候補を決めておき,その位置の周辺のみを
探索する。
[Method 3]: Tree search is performed. For example, a candidate for a certain search position is determined in advance, and only the vicinity of the position is searched.

【0013】また,動き補償フレーム間予測符号化方法
の1つに,カメラのパンニング等の画面全体の動きを計
測して,画面全体をアフィン変換して参照画像を作成
し,予測誤差を求めるグローバル動き補償方法がある。
この際のアフィン変換のパラメータをグローバル動きベ
クトルと呼び,グローバル動きベクトルを求める処理を
グローバル動き探索と呼ぶ。映像符号化方式MPEG−
4では,グローバル動き補償と,アフィン変換を使わな
い動き補償を組み合わせることが可能である。例えば,
マクロブロック毎に,グローバル動き補償とアフィン変
換を使わない動き補償を選択することができる。符号化
効率の高い方を選択することによって,フレーム全体の
符号化効率を向上することができる。
[0013] One of the motion-compensated inter-frame prediction coding methods is to measure the motion of the entire screen such as panning of a camera, affine-transform the entire screen to create a reference image, and obtain a prediction error. There is a motion compensation method.
The parameter of the affine transformation at this time is called a global motion vector, and the process of obtaining the global motion vector is called global motion search. Video encoding system MPEG-
In No. 4, it is possible to combine global motion compensation and motion compensation that does not use affine transformation. For example,
Global motion compensation and motion compensation that does not use affine transformation can be selected for each macroblock. By selecting the one with the higher coding efficiency, the coding efficiency of the entire frame can be improved.

【0014】グローバル動き探索では,画面全体をアフ
ィン変換して画面全体の予測誤差が最も小さくなるアフ
ィン変換パラメータを決定する方法もあるが,マクロブ
ロック毎の動き探索の結果を利用する方法もある。この
場合には,各マクロブロックの画面内の位置と動きベク
トルから,アフィン変換パラメータを決定して,それを
グローバル動きベクトルとする。動き探索の範囲を大き
くするほど,予測誤差のより小さいグローバル動きベク
トルが求められるが,逆に範囲が大きくなると演算量が
大きくなる。
In the global motion search, there is a method of affine-transforming the entire screen to determine an affine transformation parameter that minimizes the prediction error of the entire screen, but there is also a method of using the result of the motion search for each macroblock. In this case, an affine transformation parameter is determined from the position of each macroblock in the screen and the motion vector, and is determined as a global motion vector. As the range of the motion search is increased, a global motion vector having a smaller prediction error is obtained. Conversely, as the range is increased, the amount of calculation increases.

【0015】[0015]

【発明が解決しようとする課題】上記のように,動き探
索の探索範囲を大きくすると,演算量が大きくなる。そ
のため,実時間で動画像を符号化することを目的とした
場合,演算量が大きくなると符号化が間に合わず,目的
の符号化速度の符号化データを得られない問題が発生す
る。特に,固定フレームレートの符号化データを出力す
ることを目的とした場合には,1フレームの符号化が実
時間でできない場合に,固定フレームレートを維持でき
ない。
As described above, when the search range of the motion search is increased, the amount of calculation increases. Therefore, when the purpose is to encode a moving image in real time, if the amount of calculation increases, encoding cannot be performed in time, and a problem occurs in that encoded data at a target encoding speed cannot be obtained. In particular, when the purpose is to output coded data at a fixed frame rate, the fixed frame rate cannot be maintained if one frame cannot be coded in real time.

【0016】動画像符号化をハードウェアで実行する場
合には,1つの演算命令に対してハードウェアでの演算
処理速度が一対一に決まる。したがって,演算量が最大
に大きくなった場合にも符号化が実行できるように,予
めハードウェアの処理速度を設計すれば,符号化が間に
合わない問題は発生しない。
In the case where video encoding is executed by hardware, the operation processing speed in hardware is determined one-to-one for one operation instruction. Therefore, if the processing speed of the hardware is designed in advance so that the encoding can be executed even when the amount of calculation is maximized, the problem that the encoding cannot be completed does not occur.

【0017】他方,ソフトウェアで実行する場合には,
演算処理速度が機械に依存するため,1つの演算命令に
対して実際の演算処理速度が一対一に決まらない。その
ため,演算処理速度の小さい機械上で実行する場合には
符号化が間に合わない問題が発生する。また,パーソナ
ルコンピュータ(PC)のように,同じ機械上で他のプ
ログラムが実行される場合がある。この場合には,動画
像符号化の最中に他のプログラムが実行されると,機械
の演算処理がそのプログラムに割かれるために,符号化
を実行できなくなり,結果的に符号化速度が低下する。
このように符号化の最中に,符号化のための演算処理が
実行されない時間が発生する問題がある。
On the other hand, when executing by software,
Since the arithmetic processing speed depends on the machine, the actual arithmetic processing speed is not determined one-to-one for one arithmetic instruction. Therefore, when it is executed on a machine with a low arithmetic processing speed, there is a problem that encoding cannot be performed in time. Other programs may be executed on the same machine, such as a personal computer (PC). In this case, if another program is executed during the moving image encoding, the arithmetic operation of the machine is devoted to the program, so that the encoding cannot be performed, and as a result, the encoding speed decreases. I do.
As described above, during the encoding, there is a problem that a time period during which the arithmetic processing for the encoding is not performed occurs.

【0018】[0018]

【課題を解決するための手段】パーソナルコンピュータ
のような機械の演算処理速度は,CPUのキャッシユへ
のアクセス速度やメモリへのアクセス速度等にも依存し
て決まるものであるが,主にプログラム中の演算命令を
実行するCPUの処理速度に依存する。また,実際に演
算を行うのはCPUであるため,1つの演算命令に対す
るCPUの命令処理回数が,機械の演算処理速度とな
る。すなわち,1つの演算命令に対するCPUの命令処
理回数をCPUの動作周波数で除算した結果が,その機
械上における1つの演算命令の処理時間となる。したが
って,例えば1フレームを符号化する処理時間を求める
には,符号化を行っている間のCPUの命令処理回数を
計測し,それをCPUの動作周波数で除算すればよい。
同様に,動き探索処理を実行する処理時間は,それを行
っている間のCPUの命令処理回数を計測すれば求める
ことができる。
The arithmetic processing speed of a machine such as a personal computer is determined depending on the access speed of the CPU to the cache, the access speed to the memory, and the like. And the processing speed of the CPU executing the operation instruction. Further, since the CPU actually performs the operation, the number of instruction processings of the CPU for one operation instruction is the operation processing speed of the machine. That is, the result of dividing the number of instruction processings of the CPU for one operation instruction by the operating frequency of the CPU is the processing time of one operation instruction on the machine. Therefore, for example, in order to determine the processing time for encoding one frame, the number of instruction processings of the CPU during encoding is measured, and the result is divided by the operating frequency of the CPU.
Similarly, the processing time for executing the motion search processing can be obtained by measuring the number of instruction processings of the CPU during the execution of the motion search processing.

【0019】このように,CPUの命令処理回数から処
理時間を計測することができる。また,本来CPUが実
行するべき符号化処理に必要な命令処理回数は,プログ
ラムの構成にのみ依存する。そのため,例えば動き探索
処理のように1フレーム符号化するために必要な処理命
令数が固定な処理の場合では,必要な命令処理回数を実
行前に予め求めておくことが可能である。予測誤差の符
号化では,フレーム毎にDCTの演算回数が異なる等で
処理命令数が異なる。
As described above, the processing time can be measured from the number of instruction processings of the CPU. Further, the number of instruction processes required for the encoding process that should be performed by the CPU depends only on the configuration of the program. Therefore, for example, in a case where the number of processing instructions necessary for encoding one frame is fixed, such as a motion search processing, it is possible to obtain the required number of instruction processing times before execution. In the encoding of the prediction error, the number of processing instructions differs because the number of DCT operations differs for each frame.

【0020】ただし,上記課題においても述べた通り,
符号化の最中に他のプログラムが実行される場合もあ
る。CPUは時分割で動作するため,他のプログラムが
実行されている間はCPUは符号化処理を行わない。し
たがって,符号化を行っている間のCPUの命令処理回
数には,他のプログラムを実行するための命令も含まれ
る。これが,符号化の最中に他のプログラムが実行され
ると符号化速度が低下する原因となる。
However, as mentioned in the above problem,
Other programs may be executed during the encoding. Since the CPU operates in a time-sharing manner, the CPU does not perform the encoding process while another program is being executed. Therefore, the instruction processing count of the CPU during encoding includes an instruction for executing another program. This causes the encoding speed to decrease when another program is executed during the encoding.

【0021】本発明は,上記の課題を解決するため,探
索精度を切り替えることなどにより,動きベクトル探索
やグローバル動きベクトル探索に要する処理命令数を変
更することを特徴とする。具体的には,以下の方法を用
いる。
The present invention is characterized by changing the number of processing instructions required for a motion vector search or a global motion vector search by switching search accuracy or the like in order to solve the above problem. Specifically, the following method is used.

【0022】第1の発明では,演算器で動き探索を行
い,動き補償フレーム間予測符号化方式を用いて動画像
を符号化する動画像符号化方法において,符号化前に予
め定められたフレームレートから1フレームを符号化す
る時間である符号化目標時間を設定し,符号化前に予め
設定した動き探索方法に対して,演算器で実行する動き
探索の処理命令数である動き探索命令数情報を記憶して
おき,符号化時に各フレームの符号化時間を計測し,1
フレーム符号化終了後に,前記設定した符号化目標時間
と前記計測した符号化時間とから,次のフレームの動き
探索を行うための動き探索目標時間を設定し,前記記憶
しておいた動き探索命令数情報に従って,動き探索目標
時間から動き探索方法を決定して動き探索処理を制御す
る。
According to a first aspect of the present invention, in a moving picture coding method for performing a motion search by a computing unit and coding a moving picture using a motion compensation inter-frame predictive coding method, a predetermined frame before coding is determined. A coding target time which is a time for encoding one frame from the rate is set, and the number of motion search instructions which is the number of motion search processing instructions to be executed by the arithmetic unit with respect to the motion search method set in advance before coding. Information is stored, and the encoding time of each frame is measured during encoding.
After completion of frame encoding, a motion search target time for performing motion search of the next frame is set from the set encoding target time and the measured encoding time, and the stored motion search command is stored. According to the numerical information, a motion search method is determined from the motion search target time to control the motion search process.

【0023】ここで,動き探索命令数情報とは,実質的
に命令数に相当する情報であればよく,例えば時間に換
算した値のような情報でもよい。以降に述べる発明でも
同様である。
Here, the motion search command number information may be information substantially corresponding to the number of commands, and may be, for example, information such as a value converted into time. The same applies to the inventions described below.

【0024】この第1の発明によれば,符号化前に予め
設定した各動き探索方法に対して,演算器で実行する動
き探索の処理命令数を求めておくので,動き探索時間が
設定されたときに,その時間に実行される処理命令数を
求めて動き探索方法を決定することができる。
According to the first aspect of the present invention, the number of motion search processing instructions to be executed by the arithmetic unit is obtained for each motion search method set before encoding, so that the motion search time is set. Then, the motion search method can be determined by obtaining the number of processing instructions executed at that time.

【0025】例えば,次の2種類の動き探索を予め設定
しているとする。
For example, it is assumed that the following two types of motion search are set in advance.

【0026】[方法A]:マクロブロック内の全画素に
対して絶対値差分和を求める。探索範囲内で1画素ずつ
ずらして絶対値差分和を求め,絶対値差分和が最も小さ
い位置の平行移動量を動きベクトルとする。
[Method A]: The sum of absolute value differences is obtained for all pixels in the macroblock. The absolute value difference sum is obtained by shifting one pixel at a time within the search range, and the translation amount at the position where the absolute value difference sum is the smallest is defined as the motion vector.

【0027】[方法B]:マクロブロック内の全画素に
対して絶対値差分和を求める。探索範囲内で2画素ずつ
ずらして絶対値差分和を求め,絶対値差分和が最も小さ
い位置の平行移動量を動きベクトルとする。
[Method B]: Sum of absolute value differences is obtained for all pixels in the macroblock. The absolute value difference sum is obtained by shifting each pixel within the search range, and the translation amount at the position where the absolute value difference sum is the smallest is defined as the motion vector.

【0028】符号化前に,予め方法Aと方法Bで動き探
索を行った場合に,演算器で実行する命令数を求めてお
く。この結果,方法Aが10命令で方法Bが5命令であ
るとする。その後で,演算器を備えた符号化器で符号化
する際に動き探索時間が設定され,これが演算器で7命
令分であったとする。この場合,方法Aでは7命令内で
動き探索を完了できないが,方法Bでは7命令内で完了
できる。従っで,方法Bを選択し動き探索を実行すれ
ば,実時間で符号化できることになる。
Before coding, the number of instructions to be executed by the arithmetic unit when motion search is performed by methods A and B is obtained in advance. As a result, it is assumed that method A has 10 instructions and method B has 5 instructions. After that, it is assumed that a motion search time is set when encoding is performed by an encoder having an arithmetic unit, and this is equivalent to seven instructions in the arithmetic unit. In this case, the method A cannot complete the motion search within seven instructions, but the method B can complete the motion search within seven instructions. Therefore, if the method B is selected and a motion search is performed, encoding can be performed in real time.

【0029】第2の発明では,演算器で動き探索を行
い,動き補償フレーム間予測符号化方式を用いて動画像
を符号化する動画像符号化方法において,符号化前に予
め定められたフレームレートから1フレームを符号化す
る時間である符号化目標時間を設定し,符号化前に予め
設定した動き探索方法に対して,演算器で実行する動き
探索の処理命令数である動き探索命令数情報を記憶して
おき,符号化時に各フレームの符号化時間を計測し,1
フレーム符号化終了後に,前記設定した符号化目標時間
と前記計測した符号化時間とから,次のフレームの動き
探索を行うための動き探索目標時間を設定し,前記記憶
しておいた動き探索命令数情報に従って,動き探索目標
時間から動き探索方法を決定し動き探索処理を制御し,
その動き探索処理の実行時間を計測し,実際に計測され
た動き探索時間から,前記記憶しておいた動き探索命令
数情報を更新する。
According to a second aspect of the present invention, in a moving picture coding method for performing a motion search by a computing unit and coding a moving picture by using a motion compensation inter-frame predictive coding method, a predetermined frame before coding is determined. A coding target time which is a time for encoding one frame from the rate is set, and the number of motion search instructions which is the number of motion search processing instructions to be executed by the arithmetic unit with respect to the motion search method set in advance before coding. Information is stored, and the encoding time of each frame is measured during encoding.
After completion of frame encoding, a motion search target time for performing motion search of the next frame is set from the set encoding target time and the measured encoding time, and the stored motion search command is stored. According to the numerical information, the motion search method is determined from the motion search target time, and the motion search process is controlled.
The execution time of the motion search process is measured, and the stored motion search command number information is updated from the actually measured motion search time.

【0030】この第2の発明によれば,第1の発明にお
いて符号化前に予め設定しておいた動き探索の処理命令
数を,実際に動き探索を実行する符号化器で処理した命
令数で更新することができる。この方法は,符号化前に
予め正確な処理命令数を求めることができない場合に好
適である。例えば,処理速度の異なる演算器を組み合わ
せて符号化器を構成する場合においては,符号化器の総
合的な処理速度が分からないが,実際に数フレーム符号
化して動き探索に必要な処理時間を求め,命令数を求め
ることができる。また,CPUのような汎用的な演算器
で符号化処理を行う場合には,定期的に他のプログラム
がCPUを使う場合があるため,実際の符号化にかかる
処理時間がわからない。しかし,本発明によれば,実際
に符号化して動き探索に必要な処理時間を求め,命令数
を求めることができる。
According to the second invention, the number of motion search processing instructions set in advance in the first invention before encoding is reduced by the number of instructions actually processed by the encoder for executing the motion search. Can be updated. This method is suitable when it is not possible to determine the exact number of processing instructions before encoding. For example, when an encoder is configured by combining arithmetic units with different processing speeds, the overall processing speed of the encoder is not known, but the processing time required for motion search by actually coding several frames is not known. And the number of instructions. In addition, when the encoding process is performed by a general-purpose arithmetic unit such as a CPU, the processing time required for the actual encoding is not known because other programs may periodically use the CPU. However, according to the present invention, it is possible to obtain the processing time required for the motion search by actually performing encoding, and to obtain the number of instructions.

【0031】第3の発明では,演算器で動き探索とグロ
ーバル動き探索を行い,動き補償フレーム間予測符号化
方式を用いて動画像を符号化する動画像符号化方法にお
いて,符号化前に予め定められたフレームレートから1
フレームを符号化する時間である符号化目標時間を設定
し,符号化前に予め設定した動き探索方法に対して,演
算器で実行する動き探索の処理命令数である動き探索命
令数情報を記憶しておき,また符号化前に予め設定した
グローバル動き探索方法に対して,演算器で実行する動
き探索の処理命令数であるグローバル動き探索命令数情
報を記憶しておき,符号化時に各フレームの符号化時間
を計測し,1フレーム符号化終了後に,前記設定した符
号化目標時間と前記計測した符号化時間とから,次のフ
レームの動き探索とグローバル動き探索を行うための動
き探索目標時間を設定し,動き探索目標時間から,前記
記憶しておいた動き探索命令数情報とグローバル動き探
索命令数情報に従って,動き探索方法とグローバル動き
探索方法を決定し,動き探索処理とグローバル動き探索
処理を制御する。
According to a third aspect of the present invention, in a moving picture coding method in which a motion search and a global motion search are performed by an arithmetic unit and a moving picture is coded by using a motion compensated inter-frame predictive coding method, 1 from the set frame rate
A coding target time, which is a time for coding a frame, is set, and information on the number of motion search instructions, which is the number of processing instructions for a motion search to be executed by a computing unit, is stored for a motion search method set before coding. In addition, information on the number of global motion search instructions, which is the number of processing instructions for motion search executed by the arithmetic unit, for the global motion search method set in advance before encoding is stored. , And after the completion of one frame encoding, the motion search target time for performing the motion search for the next frame and the global motion search from the set encoding target time and the measured encoding time. Is set, and a motion search method and a global motion search method are determined from the motion search target time according to the stored number of motion search command information and global motion search command information. Controlling the motion search and the global motion search.

【0032】この第3の発明によれば,動き探索の他に
グローバル動き探索を行う場合にも,第1の発明と同様
に,動き探索を目標時間内に実行できるように,動き探
索方法とグローバル動き探索方法を決定することができ
る。
According to the third aspect, when performing a global motion search in addition to the motion search, as in the first aspect, the motion search method and the motion search method can be executed within the target time. A global motion search method can be determined.

【0033】第4の発明では,演算器で動き探索とグロ
ーバル動き探索を行い,動き補償フレーム間予測符号化
方式を用いて動画像を符号化する動画像符号化方法にお
いて,符号化前に予め定められたフレームレートから1
フレームを符号化する時間である符号化目標時間を設定
し,符号化前に予め設定した動き探索方法に対して,演
算器で実行する動き探索の処理命令数である動き探索命
令数情報を記憶しておき,また符号化前に予め設定した
グローバル動き探索方法に対して,演算器で実行する動
き探索の処理命令数であるグローバル動き探索命令数情
報を記憶しておき,符号化時に各フレームの符号化時間
を計測し,1フレーム符号化終了後に,前記設定した符
号化目標時間と前記計測した符号化時間とから,次のフ
レームの動き探索とグローバル動き探索を行うための動
き探索目標時間を設定し,動き探索目標時間から,前記
記憶しておいた動き探索命令数情報とグローバル動き探
索命令数情報とに従って,動き探索方法とグローバル動
き探索方法を決定し,動き探索処理とグローバル動き探
索処理を制御し,その動き探索処理の実行時間を計測
し,実際に計測された動き探索時間から,前記記憶して
おいた動き探索命令数情報を更新し,またグローバル動
き探索処理の実行時間を計測し,実際に計測されたグロ
ーバル動き探索時間から,前記記憶しておいたグローバ
ル動き探索命令数情報を更新する。
According to a fourth aspect of the present invention, in a moving picture coding method for performing a motion search and a global motion search by a computing unit and coding a moving picture using a motion compensation inter-frame predictive coding method, 1 from the set frame rate
A coding target time, which is a time for coding a frame, is set, and information on the number of motion search instructions, which is the number of processing instructions for a motion search to be executed by a computing unit, is stored for a motion search method set before coding. In addition, information on the number of global motion search instructions, which is the number of processing instructions for motion search executed by the arithmetic unit, for the global motion search method set in advance before encoding is stored. , And after the completion of one frame encoding, the motion search target time for performing the motion search for the next frame and the global motion search from the set encoding target time and the measured encoding time. Is set, and the motion search method and the global motion search method are determined from the motion search target time in accordance with the stored number of motion search commands and global motion search command information. Controlling the motion search process and the global motion search process, measuring the execution time of the motion search process, updating the stored motion search instruction number information from the actually measured motion search time, and The execution time of the global motion search process is measured, and the stored global motion search command number information is updated from the actually measured global motion search time.

【0034】この第4の発明によれば,動き探索の他に
グローバル動き探索を行う場合にも,第2の発明と同様
に,実際に符号化して動き探索に必要な処理時間を求
め,動き探索に必要な命令数を求めることができる。
According to the fourth aspect of the present invention, when performing a global motion search in addition to the motion search, similarly to the second aspect of the present invention, the processing time required for the motion search is obtained by actually coding the motion search. The number of instructions required for the search can be obtained.

【0035】第5の発明では,演算器で画面内を分割し
た領域毎にブロック動き探索を行い,動き補償フレーム
間予測符号化方式を用いて動画像を符号化する動画像符
号化方法において,符号化前に予め定められたフレーム
レートから1フレームを符号化する時間である符号化目
標時間を設定し,符号化前に予め設定した動き探索方法
に対して,演算器で実行する動き探索の処理命令数であ
る動き探索命令数情報を記憶しておき,符号化時に各フ
レームの符号化時間を計測し,1フレーム符号化終了後
に,前記設定した符号化目標時間と前記計測した符号化
時間とから,次のフレームの動き探索を行うための動き
探索目標時間を設定し,ブロック動き探索処理で実行さ
れる領域毎の動き探索時間を計測し,その計測したブロ
ック毎の動き探索時間を,フレーム単位で合計したフレ
ーム動き探索時間を求め,前記記憶しておいた動き探索
命令数情報に従って,動き探索目標時間とフレーム動き
探索時間から動き探索方法を決定して動き探索処理を制
御する。
According to a fifth aspect of the present invention, there is provided a moving picture coding method for performing a block motion search for each divided area of a screen by a computing unit and coding the moving picture using a motion compensation inter-frame predictive coding method. A coding target time, which is a time for coding one frame from a predetermined frame rate before coding, is set, and a motion search executed by an arithmetic unit is performed in accordance with a motion search method set before coding. The number of motion search instructions, which is the number of processing instructions, is stored, and the encoding time of each frame is measured during encoding. After the encoding of one frame is completed, the set encoding target time and the measured encoding time are measured. From the above, a motion search target time for performing a motion search for the next frame is set, a motion search time for each region executed in the block motion search process is measured, and the measured motion search for each block is performed. To determine the motion search method from the target motion search time and the frame motion search time in accordance with the stored motion search command count information to control the motion search process. I do.

【0036】この第5の発明によれば,領域毎に動き探
索を実行して動き探索時間を計測し,その時間の合計値
と動き探索目標時間を比較することができる。これは,
符号化最中に実際に符号化器が処理した動き探索の命令
数が,符号化前に予め設定しておいた動き探索の処理命
令数と異なる場合に好適である。例えば,動き探索時間
の合計値が目標時間よりも大きくなった場合には,その
フレームの動き探索を強制終了させることができる。領
域としてはマクロブロックや,マクロブロックの集合で
あるスライスを適用することができる。強制終了した場
合に探索できなかった領域には,0ベクトル(静止)
や,前フレームの同じ位置の動きベクトルや,周囲の領
域の動きベクトルを,その領域の動きベクトルとして使
用することもできる。
According to the fifth aspect, a motion search is performed for each area to measure a motion search time, and the total value of the time can be compared with the motion search target time. this is,
This is suitable when the number of motion search instructions actually processed by the encoder during encoding is different from the number of motion search processing instructions set in advance before encoding. For example, when the total value of the motion search time becomes longer than the target time, the motion search of the frame can be forcibly terminated. As a region, a macroblock or a slice that is a set of macroblocks can be applied. 0 vector (stationary) in the area that could not be searched when forced termination
Alternatively, a motion vector at the same position in the previous frame or a motion vector of a surrounding area can be used as a motion vector of the area.

【0037】第6の発明では,演算器で画面内を分割し
た領域毎にブロック動き探索とグローバル動き探索を行
い,動き補償フレーム間予測符号化方式を用いて動画像
を符号化する動画像符号化方法において,符号化前に予
め定められたフレームレートから1フレームを符号化す
る時間である符号化目標時間を設定し,符号化前に予め
設定した動き探索方法に対して,演算器で実行する動き
探索の処理命令数である動き探索命令数情報を記憶して
おき,また符号化前に予め設定したグローバル動き探索
方法に対して,演算器で実行する動き探索の処理命令数
であるグローバル動き探索命令数情報を記憶しておき,
符号化時に各フレームの符号化時間を計測し,1フレー
ム符号化終了後に,前記設定した符号化目標時間と前記
計測した符号化時間とから,次のフレームの動き探索を
行うための動き探索目標時間であるローカル動き探索目
標時間と,グローバル動き探索を行うための動き探索目
標時間であるグローバル動き探索目標時間を設定し,ブ
ロック動き探索処理で実行される領域毎の動き探索時間
を計測し,その計測したブロック毎の動き探索時間を,
フレーム単位で合計したフレーム動き探索時間を求め,
グローバルブロック動き探索処理で実行される領域毎の
動き探索時間を計測し,その計測したブロック毎の動き
探索時間を,フレーム単位で合計したフレームグローバ
ル動き探索時間を求め,前記記憶しておいた動き探索命
令数情報に従って,ローカル動き探索目標時間とフレー
ム動き探索時間とから動き探索方法を決定して動き探索
処理を制御し,また前記記憶しておいたグローバル動き
探索命令数情報に従って,グローバル動き探索目標時間
とフレームグローバル動き探索時間とからグローバル動
き探索方法を決定し,グローバル動き探索処理を制御す
る。
According to the sixth aspect of the present invention, a moving image code for performing a block motion search and a global motion search for each divided area of a screen by a computing unit, and coding the moving image using a motion compensation inter-frame predictive coding method. In the encoding method, a coding target time, which is a time for encoding one frame from a predetermined frame rate before encoding, is set, and the arithmetic unit executes the motion search method set in advance before encoding. The information on the number of motion search instructions, which is the number of motion search processing instructions to be executed, is stored, and the number of motion search processing instructions to be executed by the arithmetic unit is compared with the global motion search method set before encoding. The number of motion search instructions is stored,
At the time of encoding, the encoding time of each frame is measured, and after one frame encoding is completed, a motion search target for performing a motion search of the next frame is determined from the set encoding target time and the measured encoding time. Set the local motion search target time, which is the time, and the global motion search target time, which is the motion search target time for performing the global motion search, and measure the motion search time for each area executed in the block motion search process. The measured motion search time for each block is
Find the total frame motion search time for each frame,
The motion search time for each area executed in the global block motion search processing is measured, and the frame global motion search time obtained by summing up the measured motion search times for each block is calculated for each frame. A motion search method is determined from the local motion search target time and the frame motion search time in accordance with the search command number information to control the motion search process, and the global motion search is determined according to the stored global motion search command number information. A global motion search method is determined from the target time and the frame global motion search time, and the global motion search process is controlled.

【0038】第6の発明によれば,動き探索の他にグロ
ーバル動き探索を行う場合にも,第5の発明と同様に,
例えば,符号化最中に実際に符号化器が処理した動き探
索やグローバル動き探索の命令数が,符号化前に予め設
定しておいた動き探索やグローバル動き探索の処理命令
数と異なる場合に,動き探索時間とグローバル動き探索
の合計値が目標時間よりも大きくなった場合には,その
フレームの動き探索やグローバル動き探索を強制終了さ
せることができる。
According to the sixth aspect, when performing a global motion search in addition to the motion search, similar to the fifth aspect,
For example, when the number of motion search and global motion search instructions actually processed by the encoder during encoding is different from the number of motion search and global motion search processing instructions preset before encoding. When the total value of the motion search time and the global motion search becomes larger than the target time, the motion search and the global motion search for that frame can be forcibly terminated.

【0039】第7の発明では,演算器で画面内を分割し
た領域毎にブロック動き探索を行い,動き補償フレーム
間予測符号化方式を用いて動画像を符号化する動画像符
号化方法において,符号化前に予め定められたフレーム
レートから1フレームを符号化する時間である符号化目
標時間を設定し,符号化前に予め設定した動き探索方法
に対して,演算器で実行する動き探索の処理命令数であ
る動き探索命令数情報を記憶しておき,入力画像の画像
情報から,画面内の各領域の画像統計情報を検出し,検
出した画像統計情報から,動き探索する領域の順序を決
定し,1フレームの符号化時間を計測し,1フレーム符
号化終了後に,前記設定した符号化目標時間と前記計測
した符号化時間とから,次のフレームの動き探索を行う
ための動き探索目標時間を設定し,ブロック動き探索処
理で実行される領域毎の動き探索時間を計測し,その計
測したブロック毎の動き探索時間をフレーム単位で合計
したフレーム動き探索時間を求め,前記記憶しておいた
動き探索命令数情報に従って,動き探索目標時間とフレ
ーム動き探索時間とから動き探索方法を決定し動き探索
処理を制御する。
According to a seventh aspect of the present invention, there is provided a moving picture coding method for performing a block motion search for each divided area of a screen by a computing unit and coding the moving picture using a motion compensation inter-frame predictive coding method. A coding target time, which is a time for coding one frame from a predetermined frame rate before coding, is set, and a motion search executed by an arithmetic unit is performed in accordance with a motion search method set before coding. The number of motion search instructions, which is the number of processing instructions, is stored. Image statistical information of each area in the screen is detected from the image information of the input image, and the order of the area for motion search is determined from the detected image statistical information. The encoding time of one frame is determined, and after the encoding of one frame is completed, a motion search target for performing a motion search of the next frame is determined from the set encoding target time and the measured encoding time. A time is set, a motion search time for each area executed in the block motion search process is measured, and a frame motion search time obtained by summing the measured motion search times for each block in frame units is obtained and stored. A motion search method is determined from the target motion search time and the frame motion search time according to the information on the number of motion search commands, and the motion search process is controlled.

【0040】この第7の発明によれば,第5の発明のよ
うにフレーム内の途中で動き探索を終了する場合におい
て,動き探索をする前に予め,各領域に対して動き探索
の順序を設定することが可能である。これは,例えば動
き探索をする前に,画面内の各領域が動領域かどうかを
測定して,動領域を静止領域よりも先に動き探索処理す
ることが可能となる。動き探索の前に静止領域と判断さ
れた領域の動き探索で,動き探索時間の合計値が目標時
間よりも大きくなり,そのフレームの動き探索を強制終
了したとしても,静止領域であるため,その領域の動き
ベクトルを0ベクトルとすることができる。これによ
り,実際に動きベクトルを求めた場合からの符号化効率
の低下を軽減できる。
According to the seventh aspect, when the motion search is completed in the middle of the frame as in the fifth aspect, the order of the motion search for each area is determined before the motion search. It is possible to set. For example, before performing a motion search, it is possible to measure whether each area in the screen is a moving area and to perform a motion search process on the moving area before the still area. In the motion search of the area determined to be a static area before the motion search, the total value of the motion search time becomes larger than the target time, and even if the motion search for that frame is forcibly terminated, it is still. The motion vector of the region can be a zero vector. As a result, it is possible to reduce a decrease in coding efficiency from a case where a motion vector is actually obtained.

【0041】第8の発明では,演算器で画面内を分割し
た領域毎にブロック動き探索とグローバル動き探索を行
い,動き補償フレーム間予測符号化方式を用いて動画像
を符号化する動画像符号化方法において,符号化前に予
め定められたフレームレートから1フレームを符号化す
る時間である符号化目標時間を設定し,符号化前に予め
設定した動き探索方法に対して,演算器で実行する動き
探索の処理命令数である動き探索命令数情報を記憶して
おき,また符号化前に予め設定したグローバル動き探索
方法に対して,演算器で実行する動き探索の処理命令数
であるグローバル動き探索命令数情報を記憶しておき,
入力画像の画像情報から,画面内の各領域の画像統計情
報を検出し,その検出した画像統計情報から,動き探索
する領域の順序を決定し,1フレームの符号化時間を計
測し,1フレーム符号化終了後に,前記設定した符号化
目標時間と前記計測した符号化時間とから,次のフレー
ムの動き探索を行うための動き探索目標時間であるロー
カル動き探索目標時間と,グローバル動き探索を行うた
めの動き探索目標時間であるグローバル動き探索目標時
間を設定し,ブロック動き探索処理で実行される領域毎
の動き探索時間を計測し,その計測したブロック毎の動
き探索時間をフレーム単位で合計したフレーム動き探索
時間を求め,グローバルブロック動き探索処理で実行さ
れる領域毎の動き探索時間を計測し,その計測したブロ
ック毎の動き探索時間をフレーム単位で合計したフレー
ムグローバル動き探索時間を求め,前記記憶しておいた
動き探索命令数情報に従って,ローカル動き探索目標時
間とフレーム動き探索時間とから動き探索方法を決定
し,動き探索処理を制御し,前記記憶しておいたグロー
バル動き探索命令数情報に従って,グローバル動き探索
目標時間とフレームグローバル動き探索時間からグロー
バル動き探索方法を決定し,グローバル動き探索処理を
制御する。
According to the eighth aspect of the present invention, a moving image code for performing a block motion search and a global motion search for each divided area of a screen by a computing unit, and coding the moving image using a motion compensation inter-frame predictive coding method. In the encoding method, a coding target time, which is a time for encoding one frame from a predetermined frame rate before encoding, is set, and the arithmetic unit executes the motion search method set in advance before encoding. The information on the number of motion search instructions, which is the number of motion search processing instructions to be executed, is stored, and the number of motion search processing instructions to be executed by the arithmetic unit is compared with the global motion search method set before encoding. The number of motion search instructions is stored,
Image statistical information of each area in the screen is detected from the image information of the input image, the order of the area for motion search is determined from the detected image statistical information, the encoding time of one frame is measured, and one frame is calculated. After the coding is completed, a local motion search target time, which is a motion search target time for performing a motion search for the next frame, and a global motion search are performed based on the set coding target time and the measured coding time. The global motion search target time, which is the target time for motion search, is set, the motion search time for each region executed in the block motion search process is measured, and the measured motion search time for each block is totaled for each frame. Find the frame motion search time, measure the motion search time for each area executed in the global block motion search process, and search for the measured motion for each block. A frame global motion search time is calculated by summing the time intervals in frame units, and a motion search method is determined from the local motion search target time and the frame motion search time in accordance with the stored motion search command number information. , And a global motion search method is determined from the global motion search target time and the frame global motion search time according to the stored global motion search command number information, and the global motion search process is controlled.

【0042】この第8の発明によれば,第7の発明と同
様に,動き探索をする前に,予め各領域に対して動き探
索の順序を設定することにより,フレーム途中で動き探
索を強制終了する際の符号化効率の低下を軽減できる。
さらに,動き探索をする前に,予め各領域に対して動き
探索をするかどうかを決定しておき,符号化の最中では
その領域のみ動き探索をし,グローバル動き探索に割り
当てる時間を多くすることが可能である。例えば,動き
探索をする前に,予め各領域が動領域か静止領域かを判
定しておき,動領域のみ動き探索をして,静止領域は動
き探索をしない。これにより,静止領域の動き探索のた
めの時間をグローバル動き探索に割り当てることができ
る。
According to the eighth aspect, similarly to the seventh aspect, the motion search is forcibly performed in the middle of the frame by setting the order of the motion search for each area before performing the motion search. It is possible to reduce a decrease in encoding efficiency at the time of termination.
In addition, before performing a motion search, it is determined in advance whether or not to perform a motion search for each region, and during the encoding, a motion search is performed only in that region, and the time allocated to the global motion search is increased. It is possible. For example, before performing a motion search, it is determined in advance whether each region is a moving region or a still region, and only the moving region is searched for a motion, and the still region is not searched for a motion. As a result, the time for the motion search in the still area can be allocated to the global motion search.

【0043】以上の処理方法をコンピュータによって実
現するためのソフトウェアプログラムは,コンピュータ
が読み取り可能な可搬媒体メモリ,半導体メモリ,ハー
ドディスクなどの適当な記録媒体に格納することができ
る。
A software program for realizing the above-described processing method by a computer can be stored in an appropriate recording medium such as a computer-readable portable medium memory, a semiconductor memory, and a hard disk.

【0044】[0044]

【発明の実施の形態】以下,本発明の実施の形態を図面
を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0045】第1の実施例では,符号化前に予め,各動
き探索方法に対する処理命令数と,各グローバル動き探
索方法に対する処理命令数を設定しておき,この値に従
って,実時間で動画像を符号化する仕組みを述べる。
In the first embodiment, before encoding, the number of processing instructions for each motion search method and the number of processing instructions for each global motion search method are set in advance. Is described below.

【0046】動作周波数500MHzのCPUを搭載し
たコンピュータ上で,画面の大きさがCIF(横352
画素,縦288画素)の動画像をフレームレートが毎秒
10フレームで符号化する場合の動作を示す。
On a computer equipped with a CPU having an operating frequency of 500 MHz, the screen size is CIF (352 horizontal).
The operation when encoding a moving image of (pixels, 288 pixels vertically) at a frame rate of 10 frames per second will be described.

【0047】動き探索方法としては下記の方法Aと方法
Bと方法Cを用意する。画面内のマクロブロックに対し
てすべて同じ方法を適用する。
As a motion search method, the following methods A, B and C are prepared. Apply the same method to all macroblocks in the screen.

【0048】[方法A]:マクロブロック内の全画素に
対して絶対値差分和を求める。探索範囲は縦16画素・
横16画素とする。探索範囲内で1画素ずつずらして絶
対値差分和を求め,絶対値差分和が最も小さい位置の平
行移動量を動きベクトルとする。
[Method A]: Sum of absolute value differences is obtained for all pixels in a macroblock. The search range is 16 pixels vertically.
The width is 16 pixels. The absolute value difference sum is obtained by shifting one pixel at a time within the search range, and the translation amount at the position where the absolute value difference sum is the smallest is defined as the motion vector.

【0049】[方法B]:マクロブロック内の全画素に
対して絶対値差分和を求める。探索範囲は縦16画素・
横16画素とする。探索範囲内で2画素ずつずらして絶
対値差分和を求め,絶対値差分和が最も小さい位置の平
行移動量を動きベクトルとする。
[Method B]: Sum of absolute value differences is obtained for all pixels in a macroblock. The search range is 16 pixels vertically.
The width is 16 pixels. The absolute value difference sum is obtained by shifting each pixel within the search range, and the translation amount at the position where the absolute value difference sum is the smallest is defined as the motion vector.

【0050】[方法C]:すべてのマクロブロックの動
きベクトルを0ベクトルとする。
[Method C]: The motion vectors of all macroblocks are set to 0 vectors.

【0051】方法Aの動き探索の命令数は1000万
で,方法Bの動き探索の命令数は500万で,方法Cの
命令数は1万であるとする。
Assume that the number of instructions for the motion search in the method A is 10 million, the number of instructions for the motion search in the method B is 5 million, and the number of instructions for the method C is 10,000.

【0052】また,グローバル動き探索方法としては,
まずどちらも画面を縦8画素・横8画素のブロックに分
割し,そのブロック単位に動き探索をする。全ブロック
の動き探索が終わった後で,動きベクトルに対するブロ
ック数を集計し,最もブロック数が多い動きベクトルを
グローバル動きベクトルとする。ブロック単位の動き探
索には,下記の方法Dと方法Eと方法Fを用意する。画
面内のブロックに対してすべて同じ方法を適用する。
As a global motion search method,
First, in each case, the screen is divided into blocks of 8 pixels vertically and 8 pixels horizontally, and motion search is performed for each block. After the motion search for all blocks is completed, the number of blocks for the motion vector is totaled, and the motion vector with the largest number of blocks is set as a global motion vector. For the motion search in block units, the following methods D, E and F are prepared. Apply the same method to all blocks in the screen.

【0053】[方法D]:ブロック内の全画素に対して
絶対値差分和を求める。探索範囲は縦32画素・横32
画素とする。探索範囲内で1画素ずつずらして絶対値差
分和を求め,絶対値差分和が最も小さい位置の平行移動
量を動きベクトルとする。
[Method D]: Sum of absolute value differences is obtained for all pixels in the block. The search range is 32 pixels vertically and 32 pixels horizontally
Pixels. The absolute value difference sum is obtained by shifting one pixel at a time within the search range, and the translation amount at the position where the absolute value difference sum is the smallest is defined as the motion vector.

【0054】[方法E]:ブロック内の全画素に対して
絶対値差分和を求める。探索範囲は縦32画素・横32
画素とする。探索範囲内で2画素ずつすらして絶対値差
分和を求め,絶対値差分和が最も小さい位置の平行移動
量を動きベクトルとする。
[Method E]: The sum of absolute value differences is obtained for all pixels in the block. The search range is 32 pixels vertically and 32 pixels horizontally
Pixels. The absolute value difference sum is obtained even by two pixels within the search range, and the parallel movement amount at the position where the absolute value difference sum is the smallest is defined as the motion vector.

【0055】[方法F]:すべてのブロックの動きベク
トルを0ベクトルとする。
[Method F]: The motion vectors of all blocks are set to 0 vectors.

【0056】方法Dを採用した場合のグローバル動き探
索の命令数は3000万で,方法Eを採用した場合のグ
ローバル動き探索の命令数は1500万で,方法Fを採
用した場合のグローバル動き探索の命令数は1万である
とする。
The number of instructions in the global motion search when the method D is adopted is 30 million, the number of instructions in the global motion search when the method E is adopted is 15 million, and the number of instructions in the global motion search when the method F is adopted. Assume that the number of instructions is 10,000.

【0057】図4に,第1の実施例における符号化方法
の処理手順を示す。なお,図4に示す各ブロックに表記
した「部」は「手順」と読み替えることができる。他の
実施例も同様である。
FIG. 4 shows a processing procedure of the encoding method in the first embodiment. Note that “parts” described in each block shown in FIG. 4 can be read as “procedures”. The same applies to other embodiments.

【0058】図4の動き探索制御部(動き探索制御手
順)106では,予め設定された方法Aまたは方法Bま
たは方法Cの中からいずれかを,また,方法Dまたは方
法Eまたは方法Fの中からいずれかを選択する。
The motion search control unit (motion search control procedure) 106 shown in FIG. 4 selects one of the preset methods A, B, and C, and the method D, the method E, or the method F. Select one from

【0059】選択するフローを図5に示す。動き探索目
標時間をtarget_me_timeとし,方法Aか
ら方法Fまでの命令数を時間に変換した値を,me_t
ime[i](i=1:方法A,i=2:方法B,i=
3:方法C,1=4:方法D,i=5:方法E,i=
6:方法F)とする。以下の選択を行う。
FIG. 5 shows the flow of selection. The motion search target time is set to target_me_time, and the value obtained by converting the number of instructions from method A to method F into time is me_t
im [i] (i = 1: method A, i = 2: method B, i =
3: Method C, 1 = 4: Method D, i = 5: Method E, i =
6: Method F). Make the following selections:

【0060】me_time[1]とme_time
[4]の和が,動き探索目標時間(target_me
_time)より小さい場合,方法Aと方法Dを選択す
る(ステップS10)。
Me_time [1] and me_time
The sum of [4] is the motion search target time (target_me
If it is smaller than _time), the method A and the method D are selected (step S10).

【0061】me_time[1]とme_time
[5]の和が,動き探索目標時間(target_me
_time)より小さい場合,方法Aと方法Eを選択す
る(ステップS11)。
Me_time [1] and me_time
The sum of [5] is the motion search target time (target_me
If it is smaller than _time), method A and method E are selected (step S11).

【0062】me_time[1]とme_time
[6]の和が,動き探索目標時間(target_me
_time)より小さい場合,方法Aと方法Fを選択す
る(ステップS12)。
Me_time [1] and me_time
The sum of [6] is the motion search target time (target_me
If it is smaller than _time), method A and method F are selected (step S12).

【0063】me_time[2]とme_time
[6]の和が,動き探索目標時間(target_me
_time)より小さい場合,方法Bと方法Fを選択す
る(ステップS13)。
Me_time [2] and me_time
The sum of [6] is the motion search target time (target_me
If it is smaller than _time), the method B and the method F are selected (step S13).

【0064】me_time[3]とme_time
[6]の和が,動き探索目標時間(target_me
_time)より小さい場合,方法Cと方法Fを選択す
る(ステップS14)。
Me_time [3] and me_time
The sum of [6] is the motion search target time (target_me
If it is smaller than _time), the method C and the method F are selected (step S14).

【0065】以上のように,いずれの組み合わせを選択
した場合にも,動き探索とグローバル動き探索が動き探
索目標時間以内に処理されるように選択する。方法Cと
方法Fを選択した場合に動き探索目標時間以内とならな
い場合(ステップS14でNOの場合)には,そのフレ
ームを符号化せずに,次のフレームを符号化開始するも
のとする。この場合,動き探索目標時間には,1フレー
ム符号化するための符号化目標時間が加算される。
As described above, no matter which combination is selected, the selection is made so that the motion search and the global motion search are processed within the motion search target time. If it is not within the motion search target time when the methods C and F are selected (NO in step S14), the encoding of the next frame is started without encoding the frame. In this case, an encoding target time for encoding one frame is added to the motion search target time.

【0066】まず,符号化開始前に目標時間設定部10
1にて,フレームレートが毎秒10フレームであること
から,符号化目標時間として100msecを設定す
る。また,動きパラメータ記憶部102にて方法Aから
方法Cまでの処理命令数を記憶し,グローバル動きパラ
メータ記憶部103にて方法Dから方法Fまでの処理命
令数を記憶する。
First, before starting the encoding, the target time setting unit 10
In step 1, since the frame rate is 10 frames per second, 100 msec is set as the target encoding time. The motion parameter storage unit 102 stores the number of processing instructions from method A to method C, and the global motion parameter storage unit 103 stores the number of processing instructions from method D to method F.

【0067】本実施例では,処理命令数に対応する実際
の時間は以下の通りとなる。
In this embodiment, the actual time corresponding to the number of processing instructions is as follows.

【0068】 me_time[1]=1000万/500MHz*1000msec =20msec me_time[2]=500万/500MHz*1000msec =10msec me_time[3]=1万/500MHz*1000msec =0.02msec me_time[4]=3000万/500MHz*1000msec =60msec me_time[5]=1500万/500MHz*1000msec =30msec me_time[6]=1万/500MHz*1000msec =0.02msec 続いて,符号化を開始後のJ番目とJ+1番目のフレー
ムの符号化手順を説明する。J−1番目のフレームでは
符号化目標時間に符号化が間に合わず,J番目のフレー
ムでは符号化目標時間に符号化が間に合ったとする。前
提として,J−1番目のフレームに対して動き探索に方
法Aを使い,グローバル動き探索に方法Dを使って,符
号化時間計測部104において計測した符号化時間が1
10msecであったとする。すなわち,10msec
の遅延が発生している。
Me_time [1] = 10 million / 500 MHz * 1000 msec = 20 msec me_time [2] = 5 million / 500 MHz * 1000 msec = 10 msec me_time [3] = 10,000 / 500 MHz * 1000 msec = 0.02 msec me_time [4] = 3000 10,000 / 500 MHz * 1000 msec = 60 msec me_time [5] = 15 million / 500 MHz * 1000 msec = 30 msec me_time [6] = 10,000 / 500 MHz * 1000 msec = 0.02 msec Subsequently, the J-th and J + 1-th after coding is started A frame encoding procedure will be described. It is assumed that the encoding is not in time for the encoding target time in the J-1st frame, and the encoding is in time for the encoding target time in the Jth frame. It is assumed that the coding time measured by the coding time measuring unit 104 is 1 using the method A for the motion search and the method D for the global motion search for the J-1st frame.
It is assumed that the time is 10 msec. That is, 10 msec
The delay has occurred.

【0069】この状況において,まず動き探索時間設定
部105にて,J番目のフレームに対する動き探索目標
時間を求める。方法Aと方法Dを使って符号化時間が1
10msecであったことから,動き探索以外の処理の
時間は, 110msec−(方法Aの時間+方法Dの時間) =110msec−(20msec+60msec)=30msec と計算できる。
In this situation, the motion search time setting section 105 first obtains a motion search target time for the J-th frame. Using method A and method D, the encoding time is 1
Since it was 10 msec, the processing time other than the motion search can be calculated as 110 msec− (method A time + method D time) = 110 msec− (20 msec + 60 msec) = 30 msec.

【0070】次のフレームで10msecの遅延から回
復することを踏まえ,動き探索目標時間target_
me_timeは, 100msec−(遅延時間)−(動き探索以外の時間) =100msec−10msec−30msec=60msec と設定する。動き探索制御部106では,図5の選択フ
ローに従って,方法Aと方法Eを選択する。
Considering the recovery from the delay of 10 msec in the next frame, the motion search target time target_
me_time is set as 100 msec− (delay time) − (time other than motion search) = 100 msec−10 msec−30 msec = 60 msec. The motion search control unit 106 selects the method A and the method E according to the selection flow of FIG.

【0071】画像入力部107にて,1フレーム分の画
像情報を取得する。動き探索部108では,方法Aで動
き探索を行い,グローバル動き探索部109では,方法
Eでグローバル動き探索を行う。フレーム間予測符号化
部110では,動き探索部108で求められた動きベク
トルとグローバル動き探索部109で求められたグロー
バル動きベクトルを用いてJ番目のフレームの画像情報
を符号化する。局所復号部111では,符号化データを
復号する。符号化時間計測部104は,J番目のフレー
ムの符号化時間を計測する。符号化時間は55msec
であったとする。
The image input unit 107 acquires one frame of image information. The motion search unit 108 performs a motion search using the method A, and the global motion search unit 109 performs a global motion search using the method E. The inter-frame prediction encoding unit 110 encodes the image information of the J-th frame using the motion vector obtained by the motion search unit 108 and the global motion vector obtained by the global motion search unit 109. The local decoding unit 111 decodes the encoded data. The encoding time measuring unit 104 measures the encoding time of the J-th frame. The encoding time is 55 msec
Assume that

【0072】この場合,J−1番目のフレームにて発生
した10msecの遅延がなくなり,実時間で符号化で
きていることになる。このように,前フレームで実時間
に符号化できない場合であっても,次のフレームの動き
探索時間を調整することにより,次のフレームで遅延を
解消することができる。
In this case, the delay of 10 msec generated in the J-1st frame is eliminated, and the encoding is performed in real time. As described above, even when it is not possible to perform encoding in real time in the previous frame, the delay can be eliminated in the next frame by adjusting the motion search time of the next frame.

【0073】続いて,動き探索時間設定部105にて,
J+1番目のフレームに対する動き探索目標時間を求め
る。方法Aと方法Eを使って符号化時間が55msec
であったことから,動き探索以外の処理の時間は, 55msec−(方法Aの時間+方法Eの時間) =50msec−(20msec+30msec)=5msec と計算できる。そのため動き探索目標時間target
_me_timeは, 100msec−(動き探索以外の時間)=100ms
ec−5msec=95msec と設定する。動き探索制御部106では,図5の選択フ
ローに従って,方法Aと方法Dを選択する。
Subsequently, in the motion search time setting unit 105,
A motion search target time for the (J + 1) th frame is obtained. 55 msec coding time using method A and method E
Therefore, the time of the processing other than the motion search can be calculated as 55 msec− (time of method A + time of method E) = 50 msec− (20 msec + 30 msec) = 5 msec. Therefore, the motion search target time target
_Me_time is 100 ms- (time other than motion search) = 100 ms
ec−5 msec = 95 msec. The motion search control unit 106 selects the method A and the method D according to the selection flow of FIG.

【0074】画像入力部107にて,1フレーム分の画
像情報を取得する。動き探索部108では,方法Aで動
き探索を行い,グローバル動き探索部109では,方法
Dでグローバル動き探索を行う。フレーム間予測符号化
部110では,動き探索部108で求められた動きベク
トルとグローバル動き探索部109で求められたグロー
バル動きベクトルを用いてJ番目のフレームの画像情報
を符号化する。局所復号部111では,符号化データを
復号する。符号化時間計測部104は,J+1番目のフ
レームの符号化時間を計測する。
The image input unit 107 acquires one frame of image information. The motion search unit 108 performs a motion search using the method A, and the global motion search unit 109 performs a global motion search using the method D. The inter-frame prediction encoding unit 110 encodes the image information of the J-th frame using the motion vector obtained by the motion search unit 108 and the global motion vector obtained by the global motion search unit 109. The local decoding unit 111 decodes the encoded data. The encoding time measuring unit 104 measures the encoding time of the (J + 1) th frame.

【0075】このように前フレームの符号化時間が符号
化目標時間以内であった場合には,次のフレームの動き
探索処理時間を多くすることにより,前フレームよりも
符号化効率を上げることが可能である。
As described above, when the encoding time of the previous frame is within the encoding target time, it is possible to increase the encoding efficiency over the previous frame by increasing the motion search processing time of the next frame. It is possible.

【0076】第1の実施例のように,符号化前に予め,
各動き探索方法に対する処理命令数と,各グローバル動
き探索方法に対する処理命令数を設定しておき,この値
に従って動き探索処理やグローバル動き探索処理を変更
することにより,実時間で動画像を符号化できる。
As in the first embodiment, before encoding,
The number of processing instructions for each motion search method and the number of processing instructions for each global motion search method are set, and moving images are encoded in real time by changing the motion search processing and global motion search processing according to these values. it can.

【0077】なお,第1の実施例では,動きベクトル探
索とグローバル動き探索の処理命令数を変更する方法と
して,探索範囲内で1画素ずつずらす方法(方法Aと方
法D),探索範囲内で2画素ずつずらす方法(方法Bと
方法E),動きベクトルが0ベクトルの場合のみ計算す
る方法(方法Cと方法F)を示したが,3画素もしくは
それ以上の画素数ずらすことにより処理命令数をさらに
削減することも可能である。また,動きベクトルの探索
範囲が縦16画素・横16画素,グローバル動き探索の
探索範囲が縦32画素・横32画素の場合のみ示した
が,探索範囲を拡大または縮小することにより処理命令
数を変更することも可能である。以下に示す第2〜第4
の実施例でも同様である。
In the first embodiment, as a method for changing the number of processing instructions for the motion vector search and the global motion search, a method of shifting one pixel at a time within the search range (method A and method D), and a method of changing the number of processing instructions at the search range. The method of shifting two pixels at a time (methods B and E) and the method of calculating only when the motion vector is a zero vector (methods C and F) have been described. However, the number of processing instructions can be reduced by shifting the number of pixels by three or more pixels. Can be further reduced. Also, only the case where the search range of the motion vector is 16 pixels vertically and 16 pixels horizontally and the search range of the global motion search is 32 pixels vertically and 32 pixels horizontally, the number of processing instructions is reduced by expanding or reducing the search range. It can be changed. The second to fourth shown below
The same applies to the embodiment.

【0078】また,グローバル動き探索を用いない場合
には,図4に示す第1の実施例において,グローバル動
きパラメータ記憶部103の処理およびグローバル動き
探索部109の処理を省略した手順になることは説明す
るまでもない。以下に示す他の実施例においても同様で
ある。
When the global motion search is not used, the procedure in which the processing of the global motion parameter storage section 103 and the processing of the global motion search section 109 are omitted in the first embodiment shown in FIG. Needless to explain. The same applies to other embodiments described below.

【0079】第2の実施例では,符号化前に予め,各動
き探索方法に対する処理命令数と,各グローバル動き探
索方法に対する処理命令数とを設定しておき,この値に
従って動画像を符号化し,符号化途中でこれらの処理命
令数を変更する仕組みを述べる。
In the second embodiment, the number of processing instructions for each motion search method and the number of processing instructions for each global motion search method are set before encoding, and the moving picture is encoded according to these values. A mechanism for changing the number of processing instructions during encoding will be described.

【0080】動作周波数500MHzのCPUを搭載し
たコンピュータ上で,画面の大きさがCIF(横352
画素,縦288画素)の動画像をフレームレートが毎秒
10フレームで符号化する場合の動作を示す。
On a computer equipped with a CPU with an operating frequency of 500 MHz, the screen size is CIF (352 horizontal).
The operation when encoding a moving image of (pixels, 288 pixels vertically) at a frame rate of 10 frames per second will be described.

【0081】動き探索方法には,第1の実施例と同じく
方法Aと方法Bと方法Cを用意し,グローバル動き探索
方法には,第1の実施例と同じく方法Dと方法Eと方法
Fを用意する。動き探索方法とグローバル動き探索方法
は,画面内のマクロブロックに対してすべで同じ方法を
適用する。
The method A, the method B, and the method C are prepared as in the first embodiment, and the global motion search method is the method D, the method E, and the method F as in the first embodiment. Prepare The same motion search method and global motion search method are applied to all macroblocks in a screen.

【0082】図6に,第2の実施例における符号化方法
の処理手順を示す。ここで,動き探索制御部206に
て,動き予測方法とグローバル動き探索方法の選択フロ
ーは,第1の実施例と同じく図5とする。
FIG. 6 shows a processing procedure of an encoding method according to the second embodiment. Here, the selection flow of the motion prediction method and the global motion search method in the motion search control unit 206 is the same as that in the first embodiment shown in FIG.

【0083】符号化を開始後のJ番目とJ+1番目のフ
レームの符号化手順を説明する。J−1番目のフレーム
では,符号化目標時間に符号化が間に合わず,J番目の
フレームでは,符号化目標時間に符号化が間に合った場
合を示す。前提として,J−1番目のフレームに対し
て,動き探索に方法Aを使い,グローバル動き探索に方
法Dを使って,符号化時間計測部204において計測し
た符号化時間が120msecであったとする。すなわ
ち20msecの遅延が発生している。
The encoding procedure of the J-th and J + 1-th frames after starting the encoding will be described. In the J-th frame, the encoding is not in time for the target encoding time, and in the J-th frame, the encoding is in time for the target encoding time. As a premise, it is assumed that the coding time measured by the coding time measuring unit 204 is 120 msec using the method A for the motion search and the method D for the global motion search for the J-1st frame. That is, a delay of 20 msec occurs.

【0084】また,動き探索時間計測部212にて計測
された動き探索時間は40msecであり,グローバル
動き探索時間計測部214にて計測されたグローバル動
き探索時間は60msecであるとする。
It is assumed that the motion search time measured by the motion search time measuring section 212 is 40 msec, and the global motion search time measured by the global motion search time measuring section 214 is 60 msec.

【0085】また,動きパラメータ記憶部202にて記
憶している各方法の命令数は,方法Aは1000万で,
方法Bは500万で,方法Cは1万であるとする。グロ
ーバル動きパラメータ記憶部203にて記憶している各
方法の命令数は,方法Dは3000万で,方法Eは15
00万で,方法Fは1万であるとする。
The number of instructions of each method stored in the motion parameter storage unit 202 is 10 million for the method A.
It is assumed that method B is 5 million and method C is 10,000. The number of instructions of each method stored in the global motion parameter storage unit 203 is 30 million for method D and 15 for method E.
It is assumed that the method F is 10,000 and the method F is 10,000.

【0086】この状況において,まずJ番目のフレーム
に対する動き探索命令数とグローバル動き探索命令数の
更新を行う。動きパラメータ更新部213にて,方法A
の命令数を40msec*500MHz=2000万
に,グローバル動きパラメータ更新部215にて,方法
Dの命令数を 60msec*500MHz=3000万 に更新する。
In this situation, first, the number of motion search commands and the number of global motion search commands for the J-th frame are updated. Method A in the motion parameter updating unit 213
Is updated to 40 msec * 500 MHz = 20 million, and the global motion parameter updating unit 215 updates the number of instructions of method D to 60 msec * 500 MHz = 30 million.

【0087】したがって,処理命令数に対応する実際の
時間は以下の通りとなる。
Therefore, the actual time corresponding to the number of processing instructions is as follows.

【0088】 me_time[1]=2000万/500MHz*1000msec =40msec me_time[2]=500万/500MHz*1000msec =10msec me_time[3]=1万/500MHz*1000msec =0.02msec me_time[4]=3000万/500MHz*1000msec =60msec me_time[5]=1500万/500MHz*1000msec =30msec me_time[6]=1万/500MHz*1000msec =0.02msec 続いて動き探索時間設定部205にて,J番目のフレー
ムに対する動き探索目標時間を求める。方法Aと方法D
を使って符号化時間が120msecであったことか
ら,動き探索以外の処理の時間は, 120msec−(方法Aの時間+方法Dの時間) =120msec−(40msec+60msec) =20msec と計算できる。
Me_time [1] = 20 million / 500 MHz * 1000 msec = 40 msec me_time [2] = 5 million / 500 MHz * 1000 msec = 10 msec me_time [3] = 10,000 / 500 MHz * 1000 msec = 0.02 msec me_time [4] = 3000 10,000 / 500 MHz * 1000 msec = 60 msec me_time [5] = 15 million / 500 MHz * 1000 msec = 30 msec me_time [6] = 10,000 / 500 MHz * 1000 msec = 0.02 msec Subsequently, the motion search time setting unit 205 sets the J-th frame. To find the motion search target time for. Method A and Method D
Since the encoding time was 120 msec using, the processing time other than the motion search can be calculated as follows: 120 msec− (time of method A + time of method D) = 120 msec− (40 msec + 60 msec) = 20 msec.

【0089】次のフレームで20msecの遅延から回
復することを踏まえ,動き探索目標時間target_
me_timeは, 100msec−(遅延時間)−(動き探索以外の時
間) =100msec−20msec−20msec =60msec と設定する。動き探索制御部206では,図5のフロー
に従って,方法Aと方法Fを選択する。
In consideration of the recovery from the delay of 20 msec in the next frame, the motion search target time target_
me_time is set as 100 msec− (delay time) − (time other than motion search) = 100 msec−20 msec−20 msec = 60 msec. The motion search control unit 206 selects the method A and the method F according to the flow of FIG.

【0090】画像入力部207にて,1フレーム分の画
像情報を取得する。動き探索部208では方法Aで動き
探索を行い,グローバル動き探索部209では方法Fで
グローバル動き探索を行う。フレーム間予測符号化部2
10では,動き探索部208で求められた動きベクトル
とグローバル動き探索部209で求められたグローバル
動きベクトルを用いてJ番目のフレームの画像情報を符
号化する。局所復号部211では,符号化データを復号
する。符号化時間計測部204では,J番目のフレーム
の符号化時間を計測する。符号化時間は55msecで
あったとする。また,動き探索時間計測部212にて計
測された動き探索時間は40msecであり,グローバ
ル動き探索時間計測部214にて計測されたグローバル
動き探索時間は0.1msecであるとする。
The image input unit 207 acquires one frame of image information. The motion search unit 208 performs a motion search using the method A, and the global motion search unit 209 performs a global motion search using the method F. Inter-frame prediction encoding unit 2
In step 10, the image information of the J-th frame is encoded using the motion vector obtained by the motion search unit 208 and the global motion vector obtained by the global motion search unit 209. The local decoding unit 211 decodes the encoded data. The encoding time measuring unit 204 measures the encoding time of the J-th frame. It is assumed that the encoding time is 55 msec. Also, it is assumed that the motion search time measured by the motion search time measurement unit 212 is 40 msec, and the global motion search time measured by the global motion search time measurement unit 214 is 0.1 msec.

【0091】この状況において,まずJ+1番目のフレ
ームに対する動き探索命令数とグローバル動き探索命令
数の更新を行う。動きパラメータ更新部213にて,方
法Aの命令数を40msec*500MHz=2000
万に,グローバル動きパラメータ更新部215にて,方
法Fの命令数を 0.1msec*500MHz=5万 に更新する。
In this situation, first, the number of motion search commands and the number of global motion search commands for the (J + 1) th frame are updated. In the motion parameter updating unit 213, the number of instructions of the method A is set to 40 msec * 500 MHz = 2000.
The number of instructions of the method F is updated to 0.1 msec * 500 MHz = 50,000 by the global motion parameter updating unit 215.

【0092】したがって,処理命令数に対応する実際の
時間は以下の通りとなる。
Therefore, the actual time corresponding to the number of processing instructions is as follows.

【0093】 me_time[1]=2000万/500MHz*1000msec =40msec me_time[2]=500万/500MHz*1000msec =10msec me_time[3]=1万/500MHz*1000msec =0.02msec me_time[4]=3000万/500MHz*1000msec =60msec me_time[5]=1500万/500MHz*1000msec =30msec me_time[6]=5万/500MHz*1000msec =0.1msec 続いて動き探索時間設定部205にて,J+1番目のフ
レームに対する動き探索目標時間を求める。方法Aと方
法Fを使って符号化時間が55msecであったことか
ら,動き探索以外の処理の時間は, 55msec−(方法Aの時間+方法Eの時間) =55msec−(40msec+0.1msec) =14.9msec と計算することができる。そのため,動き探索目標時間
target_me_timeは, 100msec−(動き探索以外の時間) =100msec−14.9msec =85.1msec と設定する。動き探索制御部206では,図5のフロー
に従って,方法Aと方法Eを選択する。
Me_time [1] = 20 million / 500 MHz * 1000 msec = 40 msec me_time [2] = 5 million / 500 MHz * 1000 msec = 10 msec me_time [3] = 10,000 / 500 MHz * 1000 msec = 0.02 msec me_time [4] = 3000 10,000 / 500 MHz * 1000 msec = 60 msec me_time [5] = 15 million / 500 MHz * 1000 msec = 30 msec me_time [6] = 50,000 / 500 MHz * 1000 msec = 0.1 msec Subsequently, the motion search time setting unit 205 sets the J + 1-th frame. To find the motion search target time for. Since the encoding time was 55 msec using the method A and the method F, the processing time other than the motion search was 55 msec− (the time of the method A + the time of the method E) = 55 msec− (40 msec + 0.1 msec) = It can be calculated as 14.9 msec. Therefore, the motion search target time target_me_time is set as 100 msec− (time other than motion search) = 100 msec−14.9 msec = 85.1 msec. The motion search control unit 206 selects the method A and the method E according to the flow of FIG.

【0094】画像入力部207にて,1フレーム分の画
像情報を取得する。動き探索部208では,方法Aで動
き探索を行い,グローバル動き探索部209では,方法
Eでグローバル動き探索を行う。フレーム間予測符号化
部210では,動き探索部208で求められた動きベク
トルとグローバル動き探索部209で求められたグロー
バル動きベクトルを用いてJ+1番目のフレームの画像
情報を符号化する。局所復号部211では,符号化デー
タを復号する。符号化時間計測部204は,J+1番目
のフレームの符号化時間を計測する。
An image input unit 207 acquires image information for one frame. The motion search unit 208 performs a motion search using the method A, and the global motion search unit 209 performs a global motion search using the method E. The inter-frame predictive coding unit 210 codes the image information of the (J + 1) th frame using the motion vector obtained by the motion search unit 208 and the global motion vector obtained by the global motion search unit 209. The local decoding unit 211 decodes the encoded data. The encoding time measuring unit 204 measures the encoding time of the (J + 1) th frame.

【0095】このように第2の実施例では,前フレーム
の符号化から,その演算器における動き探索命令数とグ
ローバル動き探索命令数を求めて更新することにより,
その演算器の演算処理速度に応じた動き探索方法とグロ
ーバル動き探索方法の選択をすることができる。
As described above, in the second embodiment, the number of motion search instructions and the number of global motion search instructions in the arithmetic unit are obtained and updated from the encoding of the previous frame, thereby obtaining
It is possible to select a motion search method and a global motion search method according to the arithmetic processing speed of the arithmetic unit.

【0096】また第2の実施例において,動き探索部2
08の処理を実行した後に,動き探索時間計測部212
で動き探索時間を計測して,この時間も使って再度グロ
ーバル動き探索を実行する際の動き探索目標時間を再設
定する方法も好適である。例えば,J+1番目のフレー
ムにおける動き探索時間が20msecであったとする
と,J+1番目のフレームのグローバル動き探索のため
の動き探索目標時間を, target_me_time =85.1msec−20msec=65.1msec と設定する。この情報に基づいて,再度グローバル動き
探索方法を決定する。この選択フローを図7に示す。こ
の選択フローに従って方法Dを選択して(ステップS2
0),グローバル動き探索を行う。グローバル動きベク
トルを求めた後の動作は図6の処理手順と同じである。
In the second embodiment, the motion search unit 2
08, the motion search time measuring unit 212
It is also preferable to measure the motion search time by using, and use this time to reset the motion search target time when performing the global motion search again. For example, assuming that the motion search time in the (J + 1) th frame is 20 msec, the motion search target time for the global motion search in the (J + 1) th frame is set as target_me_time = 85.1 msec-20 msec = 65.1 msec. The global motion search method is determined again based on this information. FIG. 7 shows this selection flow. Method D is selected according to this selection flow (step S2
0), global motion search is performed. The operation after obtaining the global motion vector is the same as the processing procedure of FIG.

【0097】図7の選択フローでは,target_m
e_timeがme_time[4]より大きい場合に
(ステップS20),方法Dを選択し,target_
me_timeがme_time[4]以下で,かつm
e_time[5]より大きい場合には(ステップS2
1),方法Eを選択する。さらに,target_me
_timeがme_time[5]以下で,かつme_
time[6]より大きい場合には(ステップS2
2),方法Fを選択し,me_time[6]以下であ
ればグローバル動き補償は行わない。
In the selection flow of FIG. 7, target_m
If e_time is greater than me_time [4] (step S20), method D is selected and target_
me_time is less than or equal to me_time [4] and m
If it is larger than e_time [5] (step S2
1), Method E is selected. Furthermore, target_me
_Time is less than or equal to me_time [5] and me_
If it is larger than time [6] (step S2
2), Method F is selected, and if it is less than me_time [6], global motion compensation is not performed.

【0098】このように,動き探索後にグローバル動き
探索のための動き探索目標時間を再設定することによ
り,予測誤差のより少ないグローバル動きベクトルを求
めることも可能となる。
As described above, by resetting the motion search target time for the global motion search after the motion search, a global motion vector with a smaller prediction error can be obtained.

【0099】第3の実施例では,符号化前に予め,各動
き探索方法に対する処理命令数を設定しておき,この値
に従って,実時間で動画像を符号化する仕組みを述べ
る。ただし,第1の実施例と異なり,動き探索時間をマ
クロブロック単位に計測して動き探索を制御する。また
符号化前に予めマクロブロック毎に動き探索の優先順位
を決定する。以下の例では,動き探索目標時間以内にす
べてのマクロブロックに対して動き探索を実行できない
場合に,強制終了する動作例を示す。
In the third embodiment, a description will be given of a mechanism in which the number of processing instructions for each motion search method is set in advance before encoding, and a moving image is encoded in real time according to this value. However, unlike the first embodiment, the motion search is controlled by measuring the motion search time in macroblock units. Prior to encoding, the priority of motion search is determined for each macroblock in advance. The following example shows an operation example of forcibly terminating when a motion search cannot be performed on all macroblocks within the motion search target time.

【0100】動作周波数500MHzのCPUを搭載し
たコンピュータ上で,画面の大きさがCIF(横352
画素,縦288画素)の動画像をフレームレートが毎秒
10フレームで符号化する場合の動作を示す。
On a computer equipped with a CPU having an operating frequency of 500 MHz, the screen size is CIF (352 horizontal).
The operation when encoding a moving image of (pixels, 288 pixels vertically) at a frame rate of 10 frames per second will be described.

【0101】動き探索方法には,第1の実施例に記載の
方法Aと方法Bを用意する。方法Aの動き探索の命令数
は1000万で,方法Bの動き探索の命令数は500万
であるとする。ただし,第1の実施例と異なり,動き探
索方法は,画面内のマクロブロックに対して適宜変更す
る。図8に第3の実施例における符号化方法の処理手順
を示す。ここで,動き探索制御部306にて行う動き予
測方法の選択フローを図9に示す。
As a motion search method, a method A and a method B described in the first embodiment are prepared. It is assumed that the number of instructions for the motion search in the method A is 10 million and the number of instructions for the motion search in the method B is 5 million. However, different from the first embodiment, the motion search method is appropriately changed for a macroblock in a screen. FIG. 8 shows a processing procedure of the encoding method in the third embodiment. FIG. 9 shows a flow of selecting a motion prediction method performed by the motion search control unit 306.

【0102】ブロック動き探索時間計測部312にて計
測されたブロック毎の動き探索時間をフレーム単位で合
計し,その合計したフレーム動き探索時間をtotal
_me_timeとし,動き探索目標時間をtarge
t_me_timeとし,方法Aと方法Bまでの命令数
を時間に変換した値を,me_time[i](i=
1:方法A,i=2:方法B)とする。動き探索をした
マクロブロック数count_MBは,動き探索処理を
行った回数をカウントすることにより計測するものとす
る。画面中のマクロブロック数をtotal_MBとす
る。
The motion search time for each block measured by the block motion search time measuring unit 312 is totaled for each frame, and the total frame motion search time is calculated as total.
_Me_time, and target motion search time
t_me_time, and the value obtained by converting the number of instructions up to method A and method B into time is me_time [i] (i =
1: Method A, i = 2: Method B). The number of macroblocks count_MB for which the motion search has been performed is measured by counting the number of times the motion search process has been performed. It is assumed that the number of macro blocks in the screen is total_MB.

【0103】また,ブロック優先度検出部316では,
画面内のエッジ画素を検出し,マクロブロック毎にエッ
ジ画素数をカウントする。エッジは視覚的な品質を維持
するのに重要であるため,画像の品質を向上するために
重要である。そのため,エッジ画素を多く含むマクロブ
ロックの符号化効率を向上しておく必要がある。探索ブ
ロック決定部317では,エッジ画素数の多い順番にマ
クロブロックの番号を並べたリストを作成する。
Further, the block priority detection section 316
Edge pixels in the screen are detected, and the number of edge pixels is counted for each macroblock. Since edges are important for maintaining visual quality, they are important for improving image quality. Therefore, it is necessary to improve the coding efficiency of a macroblock including many edge pixels. The search block determination unit 317 creates a list in which the numbers of the macroblocks are arranged in the descending order of the number of edge pixels.

【0104】このような手順の構成における本実施例の
動作を示す。まず,符号化開始前に目標時間設定部30
1にて,フレームレートが毎秒10フレームであること
から,符号化目標時間として100msecを設定す
る。また,動きパラメータ記憶部302にて,方法Aと
方法Bの処理命令数を記憶する。
The operation of the present embodiment in such a procedure configuration will be described. First, before starting the encoding, the target time setting unit 30
In step 1, since the frame rate is 10 frames per second, 100 msec is set as the target encoding time. Further, the motion parameter storage unit 302 stores the number of processing instructions of the method A and the method B.

【0105】続いて,符号化を開始後のJ番目のフレー
ムの符号化手順を説明する。前提として,J−1番目の
フレームにおける符号化時間計測部304において計測
した符号化時間が90msecであったとする。また,
total_me_timeは80msecであったと
する。
Next, the encoding procedure of the J-th frame after the start of encoding will be described. As a premise, it is assumed that the encoding time measured by the encoding time measuring unit 304 in the J-1st frame is 90 msec. Also,
It is assumed that total_me_time is 80 msec.

【0106】この状況において,まず動き探索時間設定
部305にて,J番目のフレームに対する動き探索目標
時間を求める。符号化時間が90msecであったこと
から,動き探索以外の処理の時間は, 90msec−80msec=10msec と計算できる。次のフレームでの動き探索目標時間ta
rget_me_timeは, 100msec−(動き探索以外の時間) =100msec−10msec=90msec と設定する。このため,最初のマクロブロックでは,動
き探索方法Aを選択する。
In this situation, first, the motion search time setting section 305 obtains a motion search target time for the J-th frame. Since the encoding time is 90 msec, the processing time other than the motion search can be calculated as 90 msec−80 msec = 10 msec. Motion search target time ta in the next frame
rget_me_time is set as 100 msec− (time other than motion search) = 100 msec−10 msec = 90 msec. Therefore, the motion search method A is selected for the first macroblock.

【0107】画像入力部307にて1フレーム分の画像
情報を取得する。ブロック優先度検出部316では,エ
ッジ検出を行い,マクロブロック毎にエッジ画素数をカ
ウントする。探索ブロック決定部317では,エッジ画
素の多いマクロブロック順にマクロブロック番号を並べ
たリストを作成する。ここで作成したリストの例を,図
10に示す。ブロック動き探索部308では,図9の選
択フローに従って動き探索方法を決定し,図10のリス
トの順にマクロブロック単位に動き探索をする。
The image input unit 307 acquires one frame of image information. The block priority detection unit 316 performs edge detection, and counts the number of edge pixels for each macroblock. The search block determination unit 317 creates a list in which the macroblock numbers are arranged in the order of the macroblocks with more edge pixels. FIG. 10 shows an example of the list created here. The block motion search unit 308 determines a motion search method according to the selection flow in FIG. 9 and performs a motion search in macroblock units in the order of the list in FIG.

【0108】動き方法の選択では,図9に示すようにt
otal_MBとcount_MBとの差をtotal
_MBで割ったものとme_time[1]との積が,
target_me_timeとtotal_me_t
imeとの差より小さい場合に(ステップS30),方
法Aを選択する。そうでない場合,total_MBと
count_MBとの差をtotal_MBで割ったも
のとme_time[2]との積を計算し,それが,t
arget_me_timeとtotal_me_ti
meとの差より小さい場合(ステップS31),方法B
を選択する。それ以外の場合には,動き探索を中止す
る。
In the selection of the motion method, as shown in FIG.
The difference between total_MB and count_MB is calculated as total
_MB divided by me_time [1] is
target_me_time and total_me_t
If the difference is smaller than the difference (step S30), the method A is selected. Otherwise, calculate the product of the difference between total_MB and count_MB divided by total_MB and me_time [2], which is
target_me_time and total_me_ti
If it is smaller than the difference from me (step S31), method B
Select In other cases, the motion search is stopped.

【0109】マクロブロック番号200番のマクロブロ
ックを符号化した後で,フレーム動き探索時間が69.
9999999msecとなったとすると,図9の選択
フローに従って,図10のリストに記載されているマク
ロブロックのうち,200番より後のマクロブロックに
ついては動き探索を行わない。動き探索を行わないマク
ロブロックの動きベクトルは0ベクトルとする。
After encoding the macro block of macro block number 200, the frame motion search time is set to 69.
If it is 9999999 msec, the motion search is not performed on the macroblocks after the 200th among the macroblocks listed in the list of FIG. 10 according to the selection flow of FIG. The motion vector of a macroblock for which no motion search is performed is 0 vector.

【0110】フレーム間予測符号化部310では,ブロ
ック動き探索部308で求められた動きベクトルを用い
てJ番目のフレームの画像情報を符号化する。局所復号
部311では,符号化データを復号する。符号化時間計
測部304は,J番目のフレームの符号化時間を計測す
る。
The inter-frame predictive coding unit 310 codes the image information of the J-th frame using the motion vector obtained by the block motion search unit 308. The local decoding unit 311 decodes the encoded data. The encoding time measuring unit 304 measures the encoding time of the J-th frame.

【0111】このように,マクロブロック単位に動き探
索処理時間を計測することによって,フレーム途中で動
き探索処理を終了することが可能である。また,フレー
ム途中で動き探索を終了する場合であっても,符号化す
る前に予め各マクロブロックを動き探索する順序を決め
ておくことにより,エッジ画素を多く含むマクロブロッ
クの符号化効率を向上し,画像品質の劣化を軽減するこ
とが可能である。
As described above, it is possible to end the motion search processing in the middle of the frame by measuring the motion search processing time for each macroblock. Even if the motion search is terminated in the middle of a frame, the coding efficiency of a macroblock containing many edge pixels is improved by determining the order of motion search for each macroblock before coding. However, it is possible to reduce the deterioration of the image quality.

【0112】第4の実施例では,符号化前に予め,各動
き探索方法に対する処理命令数と,各グローバル動き探
索方法に対する処理命令数とを設定しておき,この値に
従って,実時間で動画像を符号化する仕組みを述べる。
ただし,第1の実施例と異なり,動き探索時間をマクロ
ブロック単位に計測して動き探索を制御し,グローバル
動き探索時間をマクロブロック単位に計測してグローバ
ル動き探索を制御する。また,符号化前に予めマクロブ
ロック毎に動き探索とグローバル動き探索の優先順位を
決定する。以下の例では,ブロック動き探索部408に
おいて,ローカル動き探索目標時間以内にすべてのマク
ロブロックに対して動き探索を実行できない場合に,強
制終了する動作例を示す。
In the fourth embodiment, before encoding, the number of processing instructions for each motion search method and the number of processing instructions for each global motion search method are set in advance, and moving images are recorded in real time according to these values. A mechanism for encoding an image will be described.
However, different from the first embodiment, the motion search time is measured in macroblock units to control the motion search, and the global motion search time is measured in macroblock units to control the global motion search. Prior to encoding, the priorities of motion search and global motion search are determined for each macroblock in advance. In the following example, an operation example in which the block motion search unit 408 forcibly terminates when a motion search cannot be executed for all macroblocks within the local motion search target time.

【0113】動作周波数500MHzのCPUを搭載し
たコンピュータ上で,画面の大きさがCIF(横352
画素,縦288画素)の動画像をフレームレートが毎秒
10フレームで符号化する場合の動作を示す。
On a computer equipped with a CPU having an operating frequency of 500 MHz, the screen size is CIF (352 horizontal).
The operation when encoding a moving image of (pixels, 288 pixels vertically) at a frame rate of 10 frames per second will be described.

【0114】動き探索方法には,第1の実施例と同じく
方法Aと方法Bを用意し,グローバル動き探索方法に
は,第1の実施例と同じく方法Dと方法Eを用意する。
方法Aの動き探索の命令数は1000万で,方法Bの動
き探索の命令数は500万であるとする。方法Dを採用
した場合のグローバル動き探索の命令数は3000万
で,方法Eを採用した場合のグローバル動き探索の命令
数は1500万であるとする。ただし,第1の実施例と
異なり,動き探索方法とグローバル動き探索方法は,画
面内のマクロブロックに対して適宜変更する。
For the motion search method, methods A and B are prepared as in the first embodiment, and for the global motion search method, methods D and E are prepared as in the first embodiment.
It is assumed that the number of instructions for the motion search in the method A is 10 million and the number of instructions for the motion search in the method B is 5 million. It is assumed that the number of instructions in the global motion search when the method D is adopted is 30 million, and the number of instructions in the global motion search when the method E is adopted is 15 million. However, different from the first embodiment, the motion search method and the global motion search method are appropriately changed for a macroblock in a screen.

【0115】図11に,第4の実施例における符号化方
法の処理手順を示す。動き探索時間設定部405では,
動き探索目標時間target_me_timeからロ
ーカル動き探索目標時間target_local_m
e_timeとグローバル動き探索目標時間targe
t_global_me_timeを決定する。方法A
と方法Bの命令数を時間に変換した値を,me_tim
e[i](i=1:方法A,i=2:方法B)とし,方
法Dと方法Eの命令数を時間に変換した値を,me_t
ime[i](i=4:方法D,i=5:方法E)とす
る。次の式に従って求める。
FIG. 11 shows a processing procedure of an encoding method according to the fourth embodiment. In the motion search time setting unit 405,
From the motion search target time target_me_time to the local motion search target time target_local_m
e_time and global motion search target time target
Determine t_global_me_time. Method A
And the value obtained by converting the number of instructions in method B into time is me_tim
e [i] (i = 1: method A, i = 2: method B), and the value obtained by converting the number of instructions of method D and method E into time is me_t
It is assumed that im [i] (i = 4: method D, i = 5: method E). It is calculated according to the following equation.

【0116】 target_local_me_time =target_me_time*me_time
[1]/(me_time[l]+me_time
[4]) target_global_me_time =target_me_time−target_lo
cal_me_time 動き探索制御部406における動き予測方法の選択フロ
ーを図12に,グローバル動き予測方法の選択フローを
図13に示す。
Target_local_me_time = target_me_time * me_time
[1] / (me_time [l] + me_time
[4]) target_global_me_time = target_me_time-target_lo
cal_me_time FIG. 12 shows a flow of selecting a motion prediction method in the motion search control unit 406, and FIG. 13 shows a flow of selecting a global motion prediction method.

【0117】ブロック動き探索時間計測部412にて計
測されたブロック毎の動き探索時間をフレーム単位で合
計し,その合計したフレーム動き探索時間をtotal
_local_me_timeとする。動き探索をした
マクロブロック数count_MBは,動き探索処理を
行った回数をカウントすることにより計測するものとす
る。画面中のマクロブロック数をtotal_MBとす
る。
The motion search time for each block measured by the block motion search time measuring unit 412 is totaled for each frame, and the total frame motion search time is calculated as total.
_Local_me_time. The number of macroblocks count_MB for which the motion search has been performed is measured by counting the number of times the motion search process has been performed. It is assumed that the number of macro blocks in the screen is total_MB.

【0118】グローバルブロック動き探索時間計測部4
19にて計測されたブロック毎の動き探索時間をフレー
ム単位で合計したフレームグローバル動き探索時間をt
otal_global_me_timeとする。
Global block motion search time measuring section 4
The frame global motion search time obtained by summing the motion search time for each block measured at step 19 in frame units is t
Let it be total_global_me_time.

【0119】また,各フレームの画素の画像情報は0〜
255までの値を取るものとし,ブロック優先度検出部
416では,現フレームの原画像と前フレームの局所復
号画像との間で同一位置の画素間の差分の絶対値を求
め,差分絶対値が50以上となる画素(ここでは動画素
と呼ぶ)の数をマクロブロック毎に計測する。動画素が
多いほど,そのマクロブロックは動領域と判定できる。
探索ブロック決定部417では,動画素の数の多い順番
にマクロブロックの番号を並べたリストを作成する。
The image information of the pixels in each frame is 0 to
The block priority detection unit 416 calculates the absolute value of the difference between pixels at the same position between the original image of the current frame and the locally decoded image of the previous frame, and determines the absolute value of the difference. The number of pixels of 50 or more (here, called moving pixels) is measured for each macroblock. As the number of video elements increases, the macroblock can be determined as a moving area.
The search block determination unit 417 creates a list in which the numbers of the macroblocks are arranged in the descending order of the number of moving pixels.

【0120】このような手順の構成における本実施例の
動作を示す。まず,符号化開始前に目標時間設定部40
1にて,フレームレートが毎秒10フレームであること
から,符号化目標時間として100msecを設定す
る。また,動きパラメータ記憶部402にて,方法Aと
方法Bの処理命令数を記憶する。
The operation of the present embodiment in such a procedure configuration will be described. First, a target time setting unit 40 before encoding starts.
In step 1, since the frame rate is 10 frames per second, 100 msec is set as the target encoding time. Further, the motion parameter storage unit 402 stores the number of processing instructions of the method A and the method B.

【0121】続いて,符号化を開始後のJ番目のフレー
ムの符号化手順を説明する。前提として,J−1番目の
フレームにおける符号化時間計測部404において計測
した符号化時間が100msecであったとする。ま
た,total_local_me_timeは20m
secであり,total_g1obal_me_ti
meは50msecであったとする。
Next, the encoding procedure of the J-th frame after the start of encoding will be described. It is assumed that the encoding time measured by the encoding time measuring unit 404 in the J-1st frame is 100 msec. The total_local_me_time is 20 m
sec and total_g1obal_me_ti
It is assumed that me is 50 msec.

【0122】この状況において,まず動き探索時間設定
部405にて,J番目のフレームに対する動き探索目標
時間を求める。符号化時間が100msecであったこ
とから,動き探索以外の処理の時間は, 100msec−20msec−50msec=30m
sec と計算できる。次のフレームでの動き探索目標時間ta
rget_me_timeは, 100msec−(動き探索以外の時間) =100msec−30msec=70msec と設定する。これから,ローカル動き探索目標時間ta
rget_local_me_timeとグローバル動
き探索目標時間target_global_me_t
imeとを求める。
In this situation, first, the motion search time setting section 405 obtains a motion search target time for the J-th frame. Since the encoding time was 100 msec, the processing time other than the motion search is 100 msec−20 msec−50 msec = 30 m
sec. Motion search target time ta in the next frame
rget_me_time is set as follows: 100 msec− (time other than motion search) = 100 msec−30 msec = 70 msec. From now on, the local motion search target time ta
rget_local_me_time and global motion search target time target_global_me_t
and im.

【0123】 target_local_me_time =70msec*20msec/(20msec+60msec) =17.5msec target_global_me_time =70msec−17.5msec =52.5msec 画像入力部407にて1フレーム分の画像情報を取得す
る。ブロック優先度検出部416では,現フレームの原
画像と前フレームの局所復号画像との間の絶対値差分を
求め,動画素の数をマクロブロック毎にカウントする。
探索ブロック決定部417では,動画素数の多いマクロ
ブロック順にマクロブロック番号を並べたリストを作成
する。ここで作成したリストは図10と同じとする。
Target_local_me_time = 70 msec * 20 msec / (20 msec + 60 msec) = 17.5 msec target_global_me_time = 70 msec−17.5 msec = 52.5 msec Image input unit 407 acquires one frame of image information. The block priority detection unit 416 calculates the absolute value difference between the original image of the current frame and the locally decoded image of the previous frame, and counts the number of moving pixels for each macroblock.
The search block determination unit 417 creates a list in which the macroblock numbers are arranged in the order of the macroblock having the largest number of moving pixels. The list created here is the same as in FIG.

【0124】ブロック動き探索部408では,図12の
選択フローに従って動き探索方法を決定し,図10のリ
ストの順にマクロブロック単位に動き探索をする。マク
ロブロック番号100番のマクロブロックを符号化した
後で,フレーム動き探索時間が17.49999999
msecとなったとすると,図12の選択フローに従っ
て図10のリストに記載されているマクロブロックのう
ち,100番より後のマクロブロックについては動き探
索を行わない。動き探索を行わないマクロブロックの動
きベクトルは0ベクトルとする。
The block motion search section 408 determines a motion search method according to the selection flow in FIG. 12, and performs a motion search in macroblock units in the order of the list in FIG. After encoding the macroblock of macroblock number 100, the frame motion search time is 17.499999999.
If msec is reached, the motion search is not performed on the macroblocks after the 100th among the macroblocks listed in the list of FIG. 10 according to the selection flow of FIG. The motion vector of a macroblock for which no motion search is performed is 0 vector.

【0125】グローバルブロック動き探索部409で
は,図13の選択フローに従ってグローバル動き探索方
法を決定し,図10のリストの順にマクロブロック単位
に動き探索をする。マクロブロック番号50番のマクロ
ブロックを符号化した後で,フレームグローバル動き探
索時間が52.49999999msecとなったとす
ると,図13の選択フローに従って図10のリストに記
載されているマクロブロックのうち,50番より後のマ
クロブロックについては動き探索を行わない。動き探索
を行わないマクロブロックの動きベクトルは0ベクトル
とする。これらのマクロブロック単位の動きベクトルの
うち,最もマクロブロック数の多い動きベクトルをグロ
ーバル動きベクトルとする。
The global block motion search section 409 determines a global motion search method according to the selection flow in FIG. 13, and performs a motion search in macroblock units in the order of the list in FIG. Assuming that the frame global motion search time becomes 52.499999999 msec after encoding the macroblock of macroblock number 50, among the macroblocks listed in the list of FIG. 10 according to the selection flow of FIG. No motion search is performed for macroblocks after the number. The motion vector of a macroblock for which no motion search is performed is 0 vector. Of these motion vectors in units of macroblocks, the motion vector having the largest number of macroblocks is defined as a global motion vector.

【0126】フレーム間予測符号化部410では,ブロ
ック動き探索部408で求められた動きベクトルとグロ
ーバルブロック動き探索部409で求められたグローバ
ル動きベクトルを用いて,J番目のフレームの画像情報
を符号化する。局所復号部411では,符号化データを
復号する。符号化時間計測部404は,J番目のフレー
ムの符号化時間を計測する。
The inter-frame predictive coding unit 410 codes the image information of the J-th frame using the motion vector obtained by the block motion search unit 408 and the global motion vector obtained by the global block motion search unit 409. Become The local decoding unit 411 decodes the encoded data. The encoding time measuring unit 404 measures the encoding time of the J-th frame.

【0127】このように,動き探索目標時間からローカ
ル動き探索目標時間とグローバル動き探索目標時間を設
定し,マクロブロック単位に動き探索処理時間やグロー
バル動き探索処理時間を計測することによって,フレー
ム途中で動き探索処理やグローバル動き探索処理時間を
終了することが可能である。
As described above, the local motion search target time and the global motion search target time are set from the motion search target time, and the motion search processing time and the global motion search processing time are measured for each macroblock. It is possible to end the motion search processing and the global motion search processing time.

【0128】また,すべてのマクロブロックに対してブ
ロック動き探索部408が,予め設定したローカル動き
探索目標時間以内に終了した場合には,余った時間をグ
ローバル動き探索目標時間に加算することも好適であ
る。例えば,ブロック動き探索時間計測部412で計測
されたフレーム動き探索時間が9msecでブロック動
き探索部408を終了した場合,グローバル動き探索目
標時間target_global_me_timeを 52.5msec+(17.5msec−9msec)
=61msec に設定する。この値に従って図13の選択フローに従っ
てグローバル動き探索方法を決定する。この場合は最初
のマクロブロックに対して方法Dが選択される。その
後,図11の手順に従って符号化する。
When the block motion search section 408 finishes within a preset local motion search target time for all macroblocks, it is preferable to add the remaining time to the global motion search target time. It is. For example, if the frame motion search time measured by the block motion search time measuring unit 412 is 9 msec and the block motion search unit 408 is finished, the global motion search target time target_global_me_time is set to 52.5 msec + (17.5 msec-9 msec).
= 61 msec. According to this value, the global motion search method is determined according to the selection flow of FIG. In this case, method D is selected for the first macroblock. Thereafter, encoding is performed according to the procedure shown in FIG.

【0129】このように,ブロック動き探索処理が目標
よりも早く終了した場合には,グローバル動き探索目標
時間を再度決定することにより,予測誤差のより少ない
グローバル動きベクトルを求めることができる。
As described above, when the block motion search processing is completed earlier than the target, a global motion vector having a smaller prediction error can be obtained by determining the global motion search target time again.

【0130】なお,図12の動き探索の選択フローおよ
び図13のグローバル動き探索の選択フローに示す選択
アルゴリズムは,前述した図9の例と同様であるので,
各ステップごとの詳細な説明は省略する。
The selection algorithm shown in the selection flow of the motion search shown in FIG. 12 and the selection flow of the global motion search shown in FIG. 13 is the same as the example shown in FIG.
Detailed description for each step is omitted.

【0131】[0131]

【発明の効果】本発明によれば,符号化前に予め,各動
き探索方法に対する処理命令数と,各グローバル動き探
索方法に対する処理命令数を設定しておき,この値に従
って動き探索処理やグローバル動き探索処理を変更する
ことにより,実時間で動画像を符号化できる。すなわ
ち,パーソナルコンピュータで符号化する場合のよう
に,他のプログラムが実行される間に符号化処理が停止
したり,機種によりCPUの処理速度が異なるため,同
一のプログラムでも実行環境により処理時間が異なるよ
うな場合にも,動きベクトル探索に要する時間を調節し
て,実時間で動画像を符号化することができるようにな
る。
According to the present invention, the number of processing instructions for each motion search method and the number of processing instructions for each global motion search method are set before encoding, and the motion search processing and global By changing the motion search processing, a moving image can be encoded in real time. That is, as in the case of encoding with a personal computer, the encoding process is stopped while another program is being executed, or the processing speed of the CPU differs depending on the model. Even in a different case, the time required for the motion vector search can be adjusted, and the moving image can be encoded in real time.

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

【図1】マクロブロックと探索範囲の関係を示す図であ
る。
FIG. 1 is a diagram illustrating a relationship between a macroblock and a search range.

【図2】画素の選択方法の例を示す図である。FIG. 2 is a diagram illustrating an example of a pixel selection method.

【図3】探索位置を2画素ずつずらす例を説明する図で
ある。
FIG. 3 is a diagram illustrating an example in which a search position is shifted by two pixels.

【図4】第1の実施例の手順を説明する図である。FIG. 4 is a diagram illustrating the procedure of the first embodiment.

【図5】第1の実施例における動き探索の選択フローで
ある。
FIG. 5 is a flowchart illustrating a motion search selection flow according to the first embodiment;

【図6】第2の実施例の手順を説明する図である。FIG. 6 is a diagram illustrating a procedure of the second embodiment.

【図7】第2の実施例におけるグローバル動き探索の選
択フローである。
FIG. 7 is a selection flow of a global motion search in the second embodiment.

【図8】第3の実施例の手順を説明する図である。FIG. 8 is a diagram for explaining the procedure of the third embodiment.

【図9】第3の実施例における動き探索の選択フローで
ある。
FIG. 9 is a flowchart illustrating a motion search selection flow according to the third embodiment.

【図10】動き探索をするマクロブロックの順序の例を
示す図である。
FIG. 10 is a diagram illustrating an example of the order of macroblocks for which motion search is performed.

【図11】第4の実施例の手順を説明する図である。FIG. 11 is a diagram illustrating a procedure according to a fourth embodiment.

【図12】第4の実施例における動き探索の選択フロー
である。
FIG. 12 is a flowchart illustrating a motion search selection flow according to a fourth embodiment.

【図13】第4の実施例におけるグローバル動き探索の
選択フローである。
FIG. 13 is a selection flow of a global motion search in the fourth embodiment.

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

101 目標時間設定部 102 動きパラメータ記憶部 103 グローバル動きパラメータ記憶部 104 符号化時間計測部 105 動き探索時間設定部 106 動き探索制御部 107 画像入力部 108 動き探索部 109 グローバル動き探索部 110 フレーム間予測符号化部 111 局所復号部 Reference Signs List 101 Target time setting unit 102 Motion parameter storage unit 103 Global motion parameter storage unit 104 Encoding time measurement unit 105 Motion search time setting unit 106 Motion search control unit 107 Image input unit 108 Motion search unit 109 Global motion search unit 110 Inter-frame prediction Encoding unit 111 Local decoding unit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C059 KK01 KK11 KK15 KK17 KK21 MA05 MA23 MB00 ME01 NN01 NN03 NN08 NN09 NN21 NN28 PP04 SS20 TA61 TA63 TC10 TC11 TC18 TD04 TD05 TD06 TD07 TD08 TD11 5J064 BA01 BA09 BA16 BB12 BD01 ──────────────────────────────────────────────────続 き Continued on the front page F-term (reference)

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 演算器で動き探索を行い,動き補償フレ
ーム間予測符号化方式を用いて動画像を符号化する動画
像符号化方法において,画像を入力する画像入力ステッ
プと,動き探索をする動き探索ステップと,動き探索ス
テップにて求めた動きベクトルを使って動き補償フレー
ム間予測符号化を行うフレーム間予測符号化ステップ
と,符号化データを復号する局所復号ステップと,を実
行する動画像符号化方法であって,符号化前に予め定め
られたフレームレートから1フレームを符号化する時間
である符号化目標時間を設定する目標時間設定ステップ
と,符号化前に予め設定した動き探索方法に対して,演
算器で実行する動き探索の処理命令数である動き探索命
令数情報を記憶しておく動きパラメータ記憶ステップ
と,1フレームの符号化時間を計測する符号化時間計測
ステップと,1フレーム符号化終了後に,目標時間設定
ステップにて設定される符号化目標時間と符号化時間計
測ステップにて計測される符号化時間とから,次のフレ
ームの動き探索を行うための動き探索目標時間を設定す
る動き探索時間設定ステップと,動きパラメータ記憶ス
テップにて記憶してある動き探索命令数情報に従って,
動き探索目標時間から動き探索方法を決定し動き探索処
理を制御する動き探索制御ステップと,を実行すること
を特徴とする処理時間適応画像符号化方法。
An image input step of inputting an image and a motion search are performed in a moving image coding method for performing a motion search by an arithmetic unit and coding the moving image using a motion compensation inter-frame predictive coding method. A moving image that executes a motion search step, an inter-frame predictive encoding step of performing motion-compensated inter-frame predictive encoding using the motion vector obtained in the motion search step, and a local decoding step of decoding encoded data An encoding method, comprising: a target time setting step of setting an encoding target time which is a time for encoding one frame from a predetermined frame rate before encoding; and a motion search method preset before encoding. A motion parameter storing step of storing information on the number of motion search instructions, which is the number of processing instructions for motion search executed by the arithmetic unit, and encoding of one frame From the encoding time measuring step for measuring the time, and the encoding target time set in the target time setting step and the encoding time measured in the encoding time measuring step after one frame encoding is completed, According to a motion search time setting step of setting a motion search target time for performing a motion search of a frame, and motion search command number information stored in a motion parameter storage step,
A motion search control step of determining a motion search method from a motion search target time and controlling a motion search process; and performing a motion search adaptive image encoding method.
【請求項2】 演算器で動き探索を行い,動き補償フレ
ーム間予測符号化方式を用いて動画像を符号化する動画
像符号化方法において,画像を入力する画像入力ステッ
プと,動き探索をする動き探索ステップと,動き探索ス
テップにて求めた動きベクトルを使って動き補償フレー
ム間予測符号化を行うフレーム間予測符号化ステップ
と,符号化データを復号する局所復号ステップと,を実
行する動画像符号化方法であって,符号化前に予め定め
られたフレームレートから1フレームを符号化する時間
である符号化目標時間を設定する目標時間設定ステップ
と,符号化前に予め設定した動き探索方法に対して,演
算器で実行する動き探索の処理命令数である動き探索命
令数情報を記憶しておく動きパラメータ記憶ステップ
と,1フレームの符号化時間を計測する符号化時間計測
ステップと,1フレーム符号化終了後に,目標時間設定
ステップにて設定される符号化目標時間と符号化時間計
測ステップにて計測される符号化時間とから,次のフレ
ームの動き探索を行うための動き探索目標時間を設定す
る動き探索時間設定ステップと,動きパラメータ記憶ス
テップにて記憶してある動き探索命令数情報に従って,
動き探索目標時間から動き探索方法を決定し動き探索処
理を制御する動き探索制御ステップと,動き探索ステッ
プの実行時間を測定する動き探索時間計測ステップと,
動き探索時間計測ステップにて計測された動き探索時間
から,動きパラメータ記憶ステップに記憶してある動き
探索命令数情報を更新する動きパラメータ更新ステップ
と,を実行することを特徴とする処理時間適応画像符号
化方法。
2. A moving picture coding method for performing a motion search by an arithmetic unit and coding a moving picture by using a motion compensation inter-frame predictive coding method, wherein an image input step of inputting an image and a motion search are performed. A moving image that executes a motion search step, an inter-frame predictive encoding step of performing motion-compensated inter-frame predictive encoding using the motion vector obtained in the motion search step, and a local decoding step of decoding encoded data An encoding method, comprising: a target time setting step of setting an encoding target time which is a time for encoding one frame from a predetermined frame rate before encoding; and a motion search method preset before encoding. A motion parameter storing step of storing information on the number of motion search instructions, which is the number of processing instructions for motion search executed by the arithmetic unit, and encoding of one frame From the encoding time measuring step for measuring the time, and the encoding target time set in the target time setting step and the encoding time measured in the encoding time measuring step after one frame encoding is completed, According to a motion search time setting step of setting a motion search target time for performing a motion search of a frame, and motion search command number information stored in a motion parameter storage step,
A motion search control step for determining a motion search method from the motion search target time and controlling the motion search process; a motion search time measuring step for measuring the execution time of the motion search step;
A motion parameter updating step of updating the motion search command number information stored in the motion parameter storage step from the motion search time measured in the motion search time measuring step; Encoding method.
【請求項3】 演算器で動き探索とグローバル動き探索
を行い,動き補償フレーム間予測符号化方式を用いて動
画像を符号化する動画像符号化方法において,画像を入
力する画像入力ステップと,動き探索をする動き探索ス
テップと,グローバル動き探索をするグローバル動き探
索ステップと,動き探索ステップにて求めた動きベクト
ルとグローバル動き探索ステップにて求めたグローバル
動きベクトルを使って動き補償フレーム間予測符号化を
行うフレーム間予測符号化ステップと,符号化データを
復号する局所復号ステップと,を実行する動画像符号化
方法であって,符号化前に予め定められたフレームレー
トから1フレームを符号化する時間である符号化目標時
間を設定する目標時間設定ステップと,符号化前に予め
設定した動き探索方法に対して,演算器で実行する動き
探索の処理命令数である動き探索命令数情報を記憶して
おく動きパラメータ記憶ステップと,符号化前に予め設
定したグローバル動き探索方法に対して,演算器で実行
する動き探索の処理命令数であるグローバル動き探索命
令数情報を記憶しておくグローバル動きパラメータ記憶
ステップと,1フレームの符号化時間を計測する符号化
時間計測ステップと,1フレーム符号化終了後に,目標
時間設定ステップにて設定される符号化目標時間と符号
化時間計測ステップにて計測される符号化時間とから,
次のフレームの動き探索とグローバル動き探索を行うた
めの動き探索目標時間を設定する動き探索時間設定ステ
ップと,動き探索目標時間から,動きパラメータ記憶ス
テップにて記憶してある動き探索命令数情報とグローバ
ル動きパラメータ記憶ステップにて記憶してあるグロー
バル動き探索命令数情報に従って,動き探索方法とグロ
ーバル動き探索方法を決定し,動き探索処理とグローバ
ル動き探索処理を制御する動き探索制御ステップと,を
実行することを特徴とする処理時間適応画像符号化方
法。
3. A moving picture coding method for performing a motion search and a global motion search in an arithmetic unit and coding a moving picture using a motion compensation inter-frame predictive coding method, comprising: A motion search step for performing a motion search, a global motion search step for performing a global motion search, and a motion compensation inter-frame prediction code using the motion vector obtained in the motion search step and the global motion vector obtained in the global motion search step. A moving picture coding method for performing an inter-frame predictive coding step of performing coding and a local decoding step of decoding coded data, wherein one frame is coded from a predetermined frame rate before coding. Target time setting step for setting an encoding target time, which is the time to perform, and a motion search method preset before encoding. A motion parameter storage step for storing information on the number of motion search instructions, which is the number of motion search processing instructions executed by the arithmetic unit, and a global motion search method set in advance before encoding. A global motion parameter storage step for storing information on the number of global motion search instructions that are the number of motion search processing instructions to be executed by the encoder, an encoding time measuring step for measuring the encoding time of one frame, and one frame encoding After the end, from the encoding target time set in the target time setting step and the encoding time measured in the encoding time measuring step,
A motion search time setting step for setting a motion search target time for performing a motion search for the next frame and a global motion search; and information on the number of motion search instructions stored in the motion parameter storage step from the motion search target time. A motion search method and a global motion search method are determined according to the global motion search command number information stored in the global motion parameter storage step, and a motion search control step for controlling the motion search process and the global motion search process is executed. Processing time adaptive image encoding method.
【請求項4】 演算器で動き探索とグローバル動き探索
を行い,動き補償フレーム間予測符号化方式を用いて動
画像を符号化する動画像符号化方法において,画像を入
力する画像入力ステップと,動き探索をする動き探索ス
テップと,グローバル動き探索をするグローバル動き探
索ステップと,動き探索ステップにて求めた動きベクト
ルとグローバル動き探索ステップにて求めたグローバル
動きベクトルを使って動き補償フレーム間予測符号化を
行うフレーム間予測符号化ステップと,符号化データを
復号する局所復号ステップと,を実行する動画像符号化
方法であって,符号化前に予め定められたフレームレー
トから1フレームを符号化する時間である符号化目標時
間を設定する目標時間設定ステップと,符号化前に予め
設定した動き探索方法に対して,演算器で実行する動き
探索の処理命令数である動き探索命令数情報を記憶して
おく動きパラメータ記憶ステップと,符号化前に予め設
定したグローバル動き探索方法に対して,演算器で実行
する動き探索の処理命令数であるグローバル動き探索命
令数情報を記憶しておくグローバル動きパラメータ記憶
ステップと,1フレームの符号化時間を計測する符号化
時間計測ステップと,1フレーム符号化終了後に,目標
時間設定ステップにて設定される符号化目標時間と符号
化時間計測ステップにて計測される符号化時間とから,
次のフレームの動き探索とグローバル動き探索を行うた
めの動き探索目標時間を設定する動き探索時間設定ステ
ップと,動き探索目標時間から,動きパラメータ記憶ス
テップにて記憶してある動き探索命令数情報とグローバ
ル動きパラメータ記憶ステップにて記憶してあるグロー
バル動き探索命令数情報に従って,動き探索方法とグロ
ーバル動き探索方法を決定し,動き探索処理とグローバ
ル動き探索処理を制御する動き探索制御ステップと,動
き探索ステップの実行時間を測定する動き探索時間計測
ステップと,動き探索時間計測ステップにて計測された
動き探索時間から,動きパラメータ記憶ステップに記憶
してある動き探索命令数情報を更新する動きパラメータ
更新ステップと,グローバル動き探索ステップの実行時
間を測定するグローバル動き探索時間計測ステップと,
グローバル動き探索時間計測ステップにて計測されたグ
ローバル動き探索時間から,グローバル動きパラメータ
記憶ステップに記憶してあるグローバル動き探索命令数
情報を更新するグローバル動きパラメータ更新ステップ
と,を実行することを特徴とする処理時間適応画像符号
化方法。
4. A moving picture coding method for performing a motion search and a global motion search in an arithmetic unit and coding a moving picture using a motion compensated inter-frame predictive coding method, comprising the steps of: A motion search step for performing a motion search, a global motion search step for performing a global motion search, and a motion compensation inter-frame prediction code using the motion vector obtained in the motion search step and the global motion vector obtained in the global motion search step. A moving picture coding method for performing an inter-frame predictive coding step of performing coding and a local decoding step of decoding coded data, wherein one frame is coded from a predetermined frame rate before coding. Target time setting step for setting an encoding target time, which is the time to perform, and a motion search method preset before encoding. A motion parameter storage step for storing information on the number of motion search instructions, which is the number of motion search processing instructions executed by the arithmetic unit, and a global motion search method set in advance before encoding. A global motion parameter storage step for storing information on the number of global motion search instructions that are the number of motion search processing instructions to be executed by the encoder, an encoding time measuring step for measuring the encoding time of one frame, and one frame encoding After the end, from the encoding target time set in the target time setting step and the encoding time measured in the encoding time measuring step,
A motion search time setting step for setting a motion search target time for performing a motion search for the next frame and a global motion search; and information on the number of motion search instructions stored in the motion parameter storage step from the motion search target time. A motion search control step for determining a motion search method and a global motion search method in accordance with the global motion search command number information stored in the global motion parameter storage step, and controlling the motion search process and the global motion search process; A motion search time measurement step for measuring the execution time of the step, and a motion parameter update step for updating the information of the number of motion search instructions stored in the motion parameter storage step from the motion search time measured in the motion search time measurement step And a global measure the execution time of the global motion search step. And Bal motion search time measurement step,
Performing a global motion parameter updating step of updating information on the number of global motion search commands stored in the global motion parameter storage step from the global motion search time measured in the global motion search time measuring step. Processing time adaptive image coding method.
【請求項5】 演算器で動き探索を行い,動き補償フレ
ーム間予測符号化方式を用いて動画像を符号化する動画
像符号化方法において,画像を入力する画像入力ステッ
プと,画面内を領域に分割し,領域毎に動き探索をする
ブロック動き探索ステップと,動き探索ステップにて求
めた領域毎に動きベクトルを使って動き補償フレーム間
予測符号化を行うフレーム間予測符号化ステップと,符
号化データを復号する局所復号ステップと,を実行する
動画像符号化方法であって,符号化前に予め定められた
フレームレートから1フレームを符号化する時間である
符号化目標時間を設定する目標時間設定ステップと,符
号化前に予め設定した動き探索方法に対して,演算器で
実行する動き探索の処理命令数である動き探索命令数情
報を記憶しておく動きパラメータ記憶ステップと,1フ
レームの符号化時間を計測する符号化時間計測ステップ
と,1フレーム符号化終了後に,目標時間設定ステップ
にて設定される符号化目標時間と符号化時間計測ステッ
プにて計測される符号化時間とから,次のフレームの動
き探索を行うための動き探索目標時間を設定する動き探
索時間設定ステップと,ブロック動き探索ステップで実
行される領域毎の動き探索時間を測定するブロック動き
探索時間計測ステップと,ブロック動き探索時間計測ス
テップにて計測されたブロック毎の動き探索時間を,フ
レーム単位で合計したフレーム動き探索時間を求めるブ
ロック動き探索時間加算ステップと,動きパラメータ記
憶ステップにて記憶してある動き探索命令数情報に従っ
て,動き探索目標時間とフレーム動き探索時間から動き
探索方法を決定し動き探索処理を制御する動き探索制御
ステップと,を実行することを特徴とする処理時間適応
画像符号化方法。
5. A moving picture coding method for performing a motion search by a computing unit and coding a moving picture by using a motion compensation inter-frame predictive coding method, comprising: an image inputting step of inputting an image; A block motion search step for performing motion search for each area, an inter-frame prediction coding step for performing motion compensation inter-frame prediction coding using a motion vector for each area obtained in the motion search step, A local decoding step of decoding encoded data, comprising: setting a target encoding time which is a time for encoding one frame from a predetermined frame rate before encoding. A time setting step and a method for storing motion search instruction number information, which is the number of motion search processing instructions to be executed by the arithmetic unit, for a motion search method set in advance before encoding. A parameter storing step, a coding time measuring step for measuring the coding time of one frame, and a coding target time and coding time measuring step set in a target time setting step after the completion of one frame coding. From the measured coding time, a motion search time setting step for setting a motion search target time for performing a motion search for the next frame, and a motion search time for each region executed in the block motion search step are measured. A block motion search time measuring step, a block motion search time adding step for calculating a frame motion search time obtained by summing, for each frame, a motion search time for each block measured in the block motion search time measuring step, and a motion parameter storage step Target time and frame motion according to the number of motion search commands stored in Processing time adaptive image coding method characterized by executing a motion search control step of controlling the determined motion search motion estimation method from search time, the.
【請求項6】 演算器で動き探索とグローバル動き探索
を行い,動き補償フレーム間予測符号化方式を用いて動
画像を符号化する動画像符号化方法において,画像を入
力する画像入力ステップと,画面内を領域に分割し,領
域毎に動き探索をするブロック動き探索ステップと,画
面内を領域に分割し,領域毎に動き探索をしてグローバ
ル動きベクトルを求めるグローバルブロック動き探索ス
テップと,ブロック動き探索ステップにて求めた領域毎
の動きベクトルとグローバルブロック動き探索ステップ
にて求めたグローバル動きベクトルを使って動き補償フ
レーム間予測符号化を行うフレーム間予測符号化ステッ
プと,符号化データを復号する局所復号ステップと,を
実行する動画像符号化方法であって,符号化前に予め定
められたフレームレートから1フレームを符号化する時
間である符号化目標時間を設定する目標時間設定ステッ
プと,符号化前に予め設定した動き探索方法に対して,
演算器で実行する動き探索の処理命令数である動き探索
命令数情報を記憶しておく動きパラメータ記憶ステップ
と,符号化前に予め設定したグローバル動き探索方法に
対して,演算器で実行する動き探索の処理命令数である
グローバル動き探索命令数情報を記憶しておくグローバ
ル動きパラメータ記憶ステップと,1フレームの符号化
時間を計測する符号化時間計測ステップと,1フレーム
符号化終了後に,目標時間設定ステップにて設定される
符号化目標時間と符号化時間計測ステップにて計測され
る符号化時間とから,次のフレームの動き探索を行うた
めの動き探索目標時間であるローカル動き探索目標時間
と,グローバル動き探索を行うための動き探索目標時間
であるグローバル動き探索目標時間を設定する動き探索
時間設定ステップと,ブロック動き探索ステップで実行
される領域毎の動き探索時間を測定するブロック動き探
索時間計測ステップと,ブロック動き探索時間計測ステ
ップにて計測されたブロック毎の動き探索時間を,フレ
ーム単位で合計したフレーム動き探索時間を求めるブロ
ック動き探索時間加算ステップと,グローバルブロック
動き探索ステップで実行される領域毎の動き探索時間を
測定するグローバルブロック動き探索時間計測ステップ
と,グローバルブロック動き探索時間計測ステップにて
計測されたブロック毎の動き探索時間を,フレーム単位
で合計したフレームグローバル動き探索時間を求めるグ
ローバルブロック動き探索時間加算ステップと,動きパ
ラメータ記憶ステップにて記憶してある動き探索命令数
情報に従って,ローカル動き探索目標時間とフレーム動
き探索時間から動き探索方法を決定し動き探索処理を制
御する動き探索制御ステップと,グローバル動きパラメ
ータ記憶ステップにて記憶してあるグローバル動き探索
命令数情報に従って,グローバル動き探索目標時間とフ
レームグローバル動き探索時間からグローバル動き探索
方法を決定しグローバル動き探索処理を制御するグロー
バル動き探索制御ステップと,を実行することを特徴と
する処理時間適応画像符号化方法。
6. A moving picture coding method for performing a motion search and a global motion search in a computing unit and coding a moving picture using a motion compensated inter-frame predictive coding method, comprising: A block motion search step for dividing the screen into regions and performing a motion search for each region; a global block motion search step for dividing the screen into regions and performing a motion search for each region to obtain a global motion vector; An inter-frame predictive coding step of performing motion-compensated inter-frame predictive coding using the motion vector for each area obtained in the motion search step and the global motion vector obtained in the global block motion search step, and decoding of encoded data A video decoding method for performing a local decoding step of performing A target time setting step of setting an encoding target time which is a time for encoding one frame from a frame, and a motion search method set in advance before encoding.
A motion parameter storage step for storing information on the number of motion search instructions, which is the number of processing instructions for motion search executed by the arithmetic unit, and a motion executed by the arithmetic unit with respect to a global motion search method set before encoding. A global motion parameter storing step for storing information on the number of global motion search instructions, which is the number of search processing instructions, an encoding time measuring step for measuring the encoding time of one frame, and a target time after one frame encoding is completed From the coding target time set in the setting step and the coding time measured in the coding time measuring step, a local motion search target time, which is a motion search target time for performing a motion search of the next frame, and , A motion search time setting step for setting a global motion search target time which is a motion search target time for performing a global motion search The block motion search time measuring step for measuring the motion search time for each region executed in the block motion search step and the motion search time for each block measured in the block motion search time measuring step are summed up in frame units. A block motion search time adding step for obtaining a frame motion search time, a global block motion search time measuring step for measuring a motion search time for each area executed in the global block motion search step, and a global block motion search time measuring step. A local block motion search time adding step for obtaining a frame global motion search time obtained by summing the measured motion search times for each block, and a local motion search command number information stored in the motion parameter storage step. Motion search eyes A motion search control step for determining a motion search method from the time and the frame motion search time and controlling the motion search processing; and a global motion search target time according to the number of global motion search instructions stored in the global motion parameter storage step. A global motion search control step of determining a global motion search method from a frame global motion search time and controlling a global motion search process.
【請求項7】 演算器で動き探索を行い,動き補償フレ
ーム間予測符号化方式を用いて動画像を符号化する動画
像符号化方法において,画像を入力する画像入力ステッ
プと,画面内を領域に分割し,領域毎に動き探索をする
ブロック動き探索ステップと,動き探索ステップにて求
めた領域毎に動きベクトルを使って動き補償フレーム間
予測符号化を行うフレーム間予測符号化ステップと,符
号化データを復号する局所復号ステップと,を実行する
動画像符号化方法であって,符号化前に予め定められた
フレームレートから1フレームを符号化する時間である
符号化目標時間を設定する目標時間設定ステップと,符
号化前に予め設定した動き探索方法に対して,演算器で
実行する動き探索の処理命令数である動き探索命令数情
報を記憶しておく動きパラメータ記憶ステップと,入力
画像の画像情報から,画面内の各領域の画像統計情報を
検出するブロック優先度検出ステップと,画像統計情報
から,動き探索する領域の順序を決定する探索ブロック
決定ステップと,1フレームの符号化時間を計測する符
号化時間計測ステップと,1フレーム符号化終了後に,
目標時間設定ステップにて設定される符号化目標時間と
符号化時間計測ステップにて計測される符号化時間とか
ら,次のフレームの動き探索を行うための動き探索目標
時間を設定する動き探索時間設定ステップと,ブロック
動き探索ステップで実行される領域毎の動き探索時間を
測定するブロック動き探索時間計測ステップと,ブロッ
ク動き探索時間計測ステップにて計測されたブロック毎
の動き探索時間を,フレーム単位で合計したフレーム動
き探索時間を求めるブロック動き探索時間加算ステップ
と,動きパラメータ記憶ステップにて記憶してある動き
探索命令数情報に従って,動き探索目標時間とフレーム
動き探索時間から動き探索方法を決定し動き探索処理を
制御する動き探索制御ステップと,を実行することを特
徴とする処理時間適応画像符号化方法。
7. A moving picture coding method for performing a motion search by a computing unit and coding a moving picture by using a motion compensation inter-frame predictive coding method, comprising: a picture inputting step of inputting a picture; A block motion search step for performing motion search for each area, an inter-frame prediction coding step for performing motion compensation inter-frame prediction coding using a motion vector for each area obtained in the motion search step, A local decoding step of decoding encoded data, comprising: setting a target encoding time which is a time for encoding one frame from a predetermined frame rate before encoding. A time setting step and a method for storing motion search instruction number information, which is the number of motion search processing instructions to be executed by the arithmetic unit, for a motion search method set in advance before encoding. A block priority detecting step of detecting image statistical information of each area in the screen from image information of an input image, and a search block determining step of determining an order of a motion search area from the image statistical information. And an encoding time measuring step for measuring the encoding time of one frame, and after the encoding of one frame,
A motion search time for setting a motion search target time for performing a motion search for the next frame from the coding target time set in the target time setting step and the coding time measured in the coding time measuring step. The setting step, a block motion search time measuring step for measuring a motion search time for each area executed in the block motion search step, and a motion search time for each block measured in the block motion search time measuring step are calculated in frame units. A motion search method is determined from the target motion search time and the frame motion search time in accordance with the block motion search time addition step for obtaining the frame motion search time summed in the above and the motion search command number information stored in the motion parameter storage step. Performing a motion search control step of controlling the motion search process; Response image coding method.
【請求項8】 演算器で動き探索とグローバル動き探索
を行い,動き補償フレーム間予測符号化方式を用いて動
画像を符号化する動画像符号化方法において,画像を入
力する画像入力ステップと,画面内を領域に分割し,領
域毎に動き探索をするブロック動き探索ステップと,画
面内を領域に分割し,領域毎に動き探索をしてグローバ
ル動きベクトルを求めるグローバルブロック動き探索ス
テップと,ブロック動き探索ステップにて求めた領域毎
の動きベクトルとグローバルブロック動き探索ステップ
にて求めたグローバル動きベクトルを使って動き補償フ
レーム間予測符号化を行うフレーム間予測符号化ステッ
プと,符号化データを復号する局所復号ステップと,を
実行する動画像符号化方法であって,符号化前に予め定
められたフレームレートから1フレームを符号化する時
間である符号化目標時間を設定する目標時間設定ステッ
プと,符号化前に予め設定した動き探索方法に対して,
演算器で実行する動き探索の処理命令数である動き探索
命令数情報を記憶しておく動きパラメータ記憶ステップ
と,符号化前に予め設定したグローバル動き探索方法に
対して,演算器で実行する動き探索の処理命令数である
グローバル動き探索命令数情報を記憶しておくグローバ
ル動きパラメータ記憶ステップと,入力画像の画像情報
から,画面内の各領域の画像統計情報を検出するブロッ
ク優先度検出ステップと,画像統計情報から,動き探索
する領域の順序を決定する探索ブロック決定ステップ
と,1フレームの符号化時間を計測する符号化時間計測
ステップと,1フレーム符号化終了後に,目標時間設定
ステップにて設定される符号化目標時間と符号化時間計
測ステップにて計測される符号化時間とから,次のフレ
ームの動き探索を行うための動き探索目標時間であるロ
ーカル動き探索目標時間と,グローバル動き探索を行う
ための動き探索目標時間であるグローバル動き探索目標
時間を設定する動き探索時間設定ステップと,ブロック
動き探索ステップで実行される領域毎の動き探索時間を
測定するブロック動き探索時間計測ステップと,ブロッ
ク動き探索時間計測ステップにて計測されたブロック毎
の動き探索時間を,フレーム単位で合計したフレーム動
き探索時間を求めるブロック動き探索時間加算ステップ
と,グローバルブロック動き探索ステップで実行される
領域毎の動き探索時間を測定するグローバルブロック動
き探索時間計測ステップと,グローバルブロック動き探
索時間計測ステップにて計測されたブロック毎の動き探
索時間を,フレーム単位で合計したフレームグローバル
動き探索時間を求めるグローバルブロック動き探索時間
加算ステップと,動きパラメータ記憶ステップにて記憶
してある動き探索命令数情報に従って,ローカル動き探
索目標時間とフレーム動き探索時間から動き探索方法を
決定し動き探索処理を制御する動き探索制御ステップ
と,グローバル動きパラメータ記憶ステップにて記憶し
てあるグローバル動き探索命令数情報に従って,グロー
バル動き探索目標時間とフレームグローバル動き探索時
間からグローバル動き探索方法を決定しグローバル動き
探索処理を制御するグローバル動き探索制御ステップ
と,を実行することを特徴とする処理時間適応画像符号
化方法。
8. A moving picture coding method for performing a motion search and a global motion search in an arithmetic unit and coding a moving picture using a motion compensated inter-frame predictive coding method, comprising the steps of: A block motion search step for dividing the screen into regions and performing a motion search for each region; a global block motion search step for dividing the screen into regions and performing a motion search for each region to obtain a global motion vector; An inter-frame predictive coding step of performing motion-compensated inter-frame predictive coding using the motion vector for each area obtained in the motion search step and the global motion vector obtained in the global block motion search step, and decoding of encoded data A video decoding method for performing a local decoding step of performing A target time setting step of setting an encoding target time which is a time for encoding one frame from a frame, and a motion search method set in advance before encoding.
A motion parameter storage step for storing information on the number of motion search instructions, which is the number of processing instructions for motion search executed by the arithmetic unit, and a motion executed by the arithmetic unit with respect to a global motion search method set before encoding. A global motion parameter storing step of storing information on the number of global motion search instructions, which is the number of search processing instructions, and a block priority detecting step of detecting image statistical information of each area in the screen from the image information of the input image. A search block determining step of determining an order of a region for motion search from image statistical information, an encoding time measuring step of measuring an encoding time of one frame, and a target time setting step after the end of one frame encoding. A motion search for the next frame is performed based on the set encoding target time and the encoding time measured in the encoding time measuring step. And a block motion search step for setting a local motion search target time, which is a motion search target time, and a global motion search target time, which is a motion search target time for performing a global motion search. Block motion search time measuring step for measuring the motion search time for each area, and the block motion for calculating the frame motion search time by summing the frame motion search time for each block measured in the block motion search time measurement step A global block motion search time measuring step for measuring a motion search time for each area performed in the search time adding step, a global block motion search step, and a motion search for each block measured in the global block motion search time measuring step The total time in frames The motion search method is determined from the local motion search target time and the frame motion search time according to the global block motion search time adding step for obtaining the global motion search time and the motion search command number information stored in the motion parameter storage step. A global motion search method is determined from a global motion search target time and a frame global motion search time according to the motion search control step for controlling the search process and the global motion search command number information stored in the global motion parameter storage step. A global motion search control step of controlling a motion search process.
【請求項9】 請求項1から請求項8までのいずれか1
項に記載の処理時間適応画像符号化方法をコンピュータ
に実行させるためのプログラムを記録したことを特徴と
する処理時間適応画像符号化プログラムの記録媒体。
9. Any one of claims 1 to 8
A recording medium for a processing time adaptive image encoding program, which stores a program for causing a computer to execute the processing time adaptive image encoding method described in the section.
JP2000303509A 2000-10-03 2000-10-03 Processing time adaptive image encoding method and program recording medium Expired - Fee Related JP3670566B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000303509A JP3670566B2 (en) 2000-10-03 2000-10-03 Processing time adaptive image encoding method and program recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000303509A JP3670566B2 (en) 2000-10-03 2000-10-03 Processing time adaptive image encoding method and program recording medium

Publications (2)

Publication Number Publication Date
JP2002112274A true JP2002112274A (en) 2002-04-12
JP3670566B2 JP3670566B2 (en) 2005-07-13

Family

ID=18784700

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000303509A Expired - Fee Related JP3670566B2 (en) 2000-10-03 2000-10-03 Processing time adaptive image encoding method and program recording medium

Country Status (1)

Country Link
JP (1) JP3670566B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002152760A (en) * 2000-10-11 2002-05-24 Samsung Electronics Co Ltd Hybrid type high-speed motion estimate method and its device
JP2004320667A (en) * 2003-04-21 2004-11-11 National Institute Of Information & Communication Technology Real-time content editing method, system and program therefor
JP2005531979A (en) * 2002-06-28 2005-10-20 クゥアルコム・インコーポレイテッド Video coding with compulsory computation
JP2005318411A (en) * 2004-04-30 2005-11-10 Canon Inc Image processor and its control method
WO2007029640A1 (en) * 2005-09-09 2007-03-15 Sony Corporation Image processing device and method, program, and recording medium
JP2007183901A (en) * 2005-12-30 2007-07-19 Altek Corp Method for processing moving image
JP2007243287A (en) * 2006-03-06 2007-09-20 Nec Corp Motion vector detecting method, motion vector detecting apparatus and program for motion vector detection
JP2009124570A (en) * 2007-11-16 2009-06-04 Canon Inc Video processing apparatus, video processing method, video processing program, and storage medium
JP2011211498A (en) * 2010-03-30 2011-10-20 Sanyo Electric Co Ltd Image coding apparatus and method
JP2013048465A (en) * 2006-06-27 2013-03-07 Marvell World Trade Ltd Systems and methods for motion compensated picture rate converter
US8879636B2 (en) 2007-05-25 2014-11-04 Synopsys, Inc. Adaptive video encoding apparatus and methods
JP2018107683A (en) * 2016-12-27 2018-07-05 富士通株式会社 Dynamic image coding device and dynamic image decoding device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002152760A (en) * 2000-10-11 2002-05-24 Samsung Electronics Co Ltd Hybrid type high-speed motion estimate method and its device
JP2005531979A (en) * 2002-06-28 2005-10-20 クゥアルコム・インコーポレイテッド Video coding with compulsory computation
JP2004320667A (en) * 2003-04-21 2004-11-11 National Institute Of Information & Communication Technology Real-time content editing method, system and program therefor
JP2005318411A (en) * 2004-04-30 2005-11-10 Canon Inc Image processor and its control method
WO2007029640A1 (en) * 2005-09-09 2007-03-15 Sony Corporation Image processing device and method, program, and recording medium
JP2007074592A (en) * 2005-09-09 2007-03-22 Sony Corp Image processing apparatus and method thereof, program, and recording medium
CN101305616B (en) * 2005-09-09 2010-09-29 索尼株式会社 Image processing device and method
JP2007183901A (en) * 2005-12-30 2007-07-19 Altek Corp Method for processing moving image
JP4670688B2 (en) * 2006-03-06 2011-04-13 日本電気株式会社 Motion vector detection method, motion vector detection device, and motion vector detection program
JP2007243287A (en) * 2006-03-06 2007-09-20 Nec Corp Motion vector detecting method, motion vector detecting apparatus and program for motion vector detection
JP2013048465A (en) * 2006-06-27 2013-03-07 Marvell World Trade Ltd Systems and methods for motion compensated picture rate converter
US8879636B2 (en) 2007-05-25 2014-11-04 Synopsys, Inc. Adaptive video encoding apparatus and methods
JP2009124570A (en) * 2007-11-16 2009-06-04 Canon Inc Video processing apparatus, video processing method, video processing program, and storage medium
JP2011211498A (en) * 2010-03-30 2011-10-20 Sanyo Electric Co Ltd Image coding apparatus and method
JP2018107683A (en) * 2016-12-27 2018-07-05 富士通株式会社 Dynamic image coding device and dynamic image decoding device
US10893290B2 (en) 2016-12-27 2021-01-12 Fujitsu Limited Apparatus for moving image coding, apparatus for moving image decoding, and non-transitory computer-readable storage medium

Also Published As

Publication number Publication date
JP3670566B2 (en) 2005-07-13

Similar Documents

Publication Publication Date Title
JP4338654B2 (en) Motion vector detection apparatus and method, and image coding apparatus capable of using the motion vector detection apparatus
KR101217627B1 (en) Method and apparatus for estimating motion vector based on block
JP2002112274A (en) Processing time adaptive image coding method and recording medium for its program
RU2519525C2 (en) Motion vector predictive encoding method, motion vector predictive decoding method, moving picture encoding apparatus, moving picture decoding apparatus, and programmes thereof
KR20070088322A (en) Apparatus and method for computing motion vector
KR20070033345A (en) How to retrieve global motion vector
CN109640097B (en) Adaptive factor video affine motion estimation method
JP5613319B2 (en) Video encoding apparatus, video encoding method, and video encoding program
KR100490730B1 (en) Method and apparatus for motion estimation using of adaptive search pattern for video sequence compression
JP2002247584A (en) Method and device for encoding image, program for image encoding processing, and recording medium for the program
JP3276073B2 (en) Motion vector detection device and motion vector detection method
JPH10341440A (en) Moving image encoding method and device therefor
CN114040209A (en) Motion estimation method, motion estimation device, electronic equipment and storage medium
JPH0262178A (en) Motion detection system for picture processor
JP2000350209A (en) Method and device for high-speed movement estimation for real-time moving video encoding
JPH10304371A (en) Moving vector detecting device
US6332001B1 (en) Method of coding image data
JP2007097063A (en) Motion picture encoding program, motion picture encoding method and motion picture encoding apparatus
JP3860435B2 (en) Moving picture coding apparatus and method, moving picture coding processing program, and recording medium for the program
JP2008072608A (en) Apparatus and method for encoding image
JP2004364333A (en) Image encoding apparatus
EP3637769B1 (en) Method and device for determining video frame complexity measure
KR0160458B1 (en) Moving picture compressing device and method for estimation of motion vector with mask block matching method
JPH10108190A (en) Method for detecting motion of image
Zhang et al. Distortion-Aware Convolutional Neural Network-Based Interpolation Filter for AVS3

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050111

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050223

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050412

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050414

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D02

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

Free format text: PAYMENT UNTIL: 20090422

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090422

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100422

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110422

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees