JP2005323299A - Method for searching motion vector, and encoding device - Google Patents

Method for searching motion vector, and encoding device Download PDF

Info

Publication number
JP2005323299A
JP2005323299A JP2004141529A JP2004141529A JP2005323299A JP 2005323299 A JP2005323299 A JP 2005323299A JP 2004141529 A JP2004141529 A JP 2004141529A JP 2004141529 A JP2004141529 A JP 2004141529A JP 2005323299 A JP2005323299 A JP 2005323299A
Authority
JP
Japan
Prior art keywords
motion vector
divided
search
region
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004141529A
Other languages
Japanese (ja)
Inventor
Nobuyuki Nishimura
信幸 西村
Sadaatsu Kato
禎篤 加藤
Chunsen Bun
チュンセン ブン
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.)
NTT Docomo Inc
NTT Software Corp
Original Assignee
NTT Docomo Inc
NTT Software 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 NTT Docomo Inc, NTT Software Corp filed Critical NTT Docomo Inc
Priority to JP2004141529A priority Critical patent/JP2005323299A/en
Publication of JP2005323299A publication Critical patent/JP2005323299A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce operation quantity concerning motion vector search by an encoding device of moving pictures which performs motion compensation, using segmented patterns. <P>SOLUTION: A motion vector of each segmented area in a predetermined segmented pattern, which is one of a plurality of segmented patterns, is searched and the obtained motion vector is stored in a motion vector storing means. For one segmented area in one segmented pattern other than the predetermined segmented pattern, the center of search of the one segmented area is obtained, by using the motion vector of the segmented area in the predetermined segmented pattern, corresponding to the one segmented area, and the motion vector of the one segmented area is searched using the center of search. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、動画像の符号化技術に関し、特に動画像の符号化における動き補償の技術に関する。   The present invention relates to a moving picture coding technique, and more particularly to a motion compensation technique in moving picture coding.

動画像の符号化技術においては、画面の動きが少なければほとんど同じフレームが繰り返されるという動画像の性質に着目し、フレーム間で変化が生じた差分のみを符号化する技術が用いられている。その中で、画像の中の一部に動きがある場合でも効率的に符号化を行う技術として、動き補償(MC:Motion Compensation)の技術が一般に用いられている。   In the moving picture coding technique, a technique for coding only a difference in which a change has occurred between frames is used by paying attention to the nature of a moving picture in which almost the same frame is repeated if the motion of the screen is small. Among them, a motion compensation (MC) technique is generally used as a technique for performing efficient coding even when there is motion in a part of an image.

動き補償とは、符号化対象フレームの画像と前フレーム(以下、参照フレームと呼ぶ)の同じ位置の画像との差分をとるのではなく、符号化対象フレームにおける画像と似た画像の位置を参照フレームから探索し、その探索された画像と符号化対象フレームの画像との差分をとるものである。符号化対象フレームにおける画像と似た画像の位置を参照フレームから探索することを一般に動き推定(あるいは動き予測)(ME:Motion Estimation)と呼ぶが、ここではこれを動きベクトル探索と呼ぶ。   Motion compensation refers to the position of an image similar to the image in the encoding target frame, not the difference between the image of the encoding target frame and the image at the same position in the previous frame (hereinafter referred to as a reference frame). The search is performed from the frame, and the difference between the searched image and the image of the encoding target frame is obtained. Searching for a position of an image similar to the image in the encoding target frame from the reference frame is generally called motion estimation (ME), but here it is called motion vector search.

動きベクトル探索について、図1を用いて説明する。図1に示すように、動きベクトル探索は、フレーム全体でなくフレームの一部を切り出した領域単位で行われる。すなわち、フレームをあるサイズ(例えば16画素×16画素の矩形領域、MPEG等ではマクロブロックという。本明細書ではこれを単位領域と呼ぶ)に区切り、領域毎に水平成分と垂直成分を持つ動きベクトルを求めるための探索を行う。具体的には、図1における符号化対象フレームの領域Aと同じ位置にある参照フレームの領域B及びその周囲と、領域Aとを比較することにより、領域Aに対する差分が最小となる領域を参照フレームの中から探索する。図1では領域Cが探索された領域である。領域Aから領域Cへの移動量を動きベクトルという。符号化の過程では、この動きベクトルと、領域Aと領域Cの差分が符号化されることになる。   The motion vector search will be described with reference to FIG. As shown in FIG. 1, the motion vector search is performed in units of regions obtained by cutting out a part of the frame, not the entire frame. That is, a frame is divided into a certain size (for example, a rectangular area of 16 pixels × 16 pixels, called a macroblock in MPEG, etc., which is called a unit area in this specification), and a motion vector having a horizontal component and a vertical component in each area. Search to find Specifically, by comparing the region A with the region B of the reference frame at the same position as the region A of the encoding target frame in FIG. 1 and the region A, the region with the smallest difference with respect to the region A is referred to. Search from the frame. In FIG. 1, the area C is the searched area. The amount of movement from region A to region C is called a motion vector. In the encoding process, the motion vector and the difference between the region A and the region C are encoded.

動きベクトル探索について更に説明する。   The motion vector search will be further described.

上記のように、動きベクトル探索では符号化対象フレームの着目領域との差分が最小となる参照フレームの領域を探索するが、具体的な差分としては、図2に示したように、例えばSAD(Sum of Absolute Difference:各画素の差分絶対値の和)を利用する。参照フレームと符号化対象フレームの時間間隔は一般に短いため、参照フレームと符号化対象フレームとの差分が最小となる参照フレーム内の領域の位置は、一般的に符号化対象フレームの矩形領域と同じ位置の近傍に存在する。このため、例えば、図3に示すように、符号化対象フレームの領域と同じ位置の周囲±16画素の範囲から動きベクトル探索を行うことで最適な動きベクトルを探索できる。しかし、図3に示す方法では探索点数は(16×2+1)2=1089点となり、膨大な演算が必要となる。   As described above, in the motion vector search, a reference frame region that minimizes the difference from the region of interest of the encoding target frame is searched. As a specific difference, for example, as shown in FIG. Sum of Absolute Difference: Sum of absolute differences of each pixel). Since the time interval between the reference frame and the encoding target frame is generally short, the position of the area in the reference frame that minimizes the difference between the reference frame and the encoding target frame is generally the same as the rectangular area of the encoding target frame. It exists in the vicinity of the position. For this reason, for example, as shown in FIG. 3, an optimal motion vector can be searched by performing a motion vector search from a range of ± 16 pixels around the same position as the region of the encoding target frame. However, in the method shown in FIG. 3, the number of search points is (16 × 2 + 1) 2 = 1089 points, and enormous calculation is required.

この欠点を補うために、ある領域のSADを算出する際に、それまでに算出したSADの最小値を超えた時点で、その領域のSADの計算を打ち切る手法がある。この手法を、図4〜図7を用いて説明する。   In order to compensate for this drawback, there is a technique in which, when calculating the SAD of a certain area, the calculation of the SAD of the area is terminated when the SAD minimum value calculated so far is exceeded. This method will be described with reference to FIGS.

ここでは説明のために、符号化対象フレームの矩形領域(対象領域)に対して、参照フレームの矩形領域(参照領域)として3つの探索点、すなわち3つの参照領域(参照領域1、参照領域2、参照領域3)に着目する。図4に各領域と画素毎の値を示している。図5は、対象領域と参照領域1との間のSAD算出過程を示し、図6は、対象領域と参照領域2との間のSAD算出過程を示し、図7は、対象領域と参照領域3との間のSAD算出過程を示す。図5〜図7には、画素毎に差分絶対値を求め、それらを累積することによりSADを算出することが示されている。   Here, for the sake of explanation, three search points, that is, three reference areas (reference area 1 and reference area 2) are defined as rectangular areas (reference areas) of the reference frame with respect to the rectangular area (target area) of the encoding target frame. Focus on the reference region 3). FIG. 4 shows values for each region and each pixel. 5 shows an SAD calculation process between the target area and the reference area 1, FIG. 6 shows an SAD calculation process between the target area and the reference area 2, and FIG. The SAD calculation process between is shown. 5 to 7 show that the SAD is calculated by obtaining the absolute difference value for each pixel and accumulating them.

参照領域1→参照領域2→参照領域3の順に探索する場合、SADの最小値はこの順に更新されるため、全ての画素の組み合わせについて差分絶対値と累積を求める必要がある。これに対し、参照領域3→参照領域2→参照領域1の順に探索する場合、参照領域3のSADは3参照領域中の最小値である12であり、参照領域2におけるSAD算出処理(図6)においては、画素番号3の時点でその最小値を超えるので、以降の演算を省略し、参照領域1のSAD算出処理に移行する。また、参照領域1におけるSAD算出処理(図5)においては、画素番号1以降の演算を省略できる。これにより動きベクトル探索における演算量を削減できる。   When searching in the order of reference area 1 → reference area 2 → reference area 3, since the minimum value of SAD is updated in this order, it is necessary to obtain absolute difference values and accumulations for all pixel combinations. On the other hand, when searching in the order of the reference area 3 → reference area 2 → reference area 1, the SAD of the reference area 3 is 12 which is the minimum value in the 3 reference areas, and the SAD calculation process in the reference area 2 (FIG. 6). ) Exceeds the minimum value at the time of pixel number 3, the subsequent calculation is omitted, and the process proceeds to the SAD calculation process for the reference area 1. Further, in the SAD calculation process in the reference area 1 (FIG. 5), the calculation after pixel number 1 can be omitted. As a result, the amount of calculation in the motion vector search can be reduced.

この手法を活用することにより、図8に示すように、動きベクトル算出済みの周辺の領域から対象領域の動きベクトルを予測し、その動きベクトルが示す点を探索中心とし、例えばらせん状に所定の範囲の探索点をスキャンして、動きベクトル探索処理を高速化する手法がある。
UB Video Inc. “Emerging H.264 Standard: Overview and TMS320DM642-Based Solutions for Real-Time Video Applications” 12-2002 (URL: http://www.ubvideo.com/public/h.264_white_paper.pdf)
By utilizing this method, as shown in FIG. 8, the motion vector of the target region is predicted from the peripheral region for which the motion vector has been calculated, and the point indicated by the motion vector is used as a search center, for example, a predetermined shape in a spiral shape. There is a method of scanning a search point in a range to speed up a motion vector search process.
UB Video Inc. “Emerging H.264 Standard: Overview and TMS320DM642-Based Solutions for Real-Time Video Applications” 12-2002 (URL: http://www.ubvideo.com/public/h.264_white_paper.pdf)

さて、新しい動画像符号化規格であるH.264(例えば非特許文献1参照)が標準化段階にある。H.264では、従来の動画像符号化方式より圧縮効率を改善するために新たな符号化手法を用いている。その中の一つとして、16×16画素の矩形領域(マクロブロック)を、4×4画素の領域を最小単位として図9に示す分割パターン(H.264では分割モードという)に分割し、16×16領域内の複雑な部分と平坦な部分の状況等に応じて、複数の分割モードの中から最適な分割モードを選択して、動き補償を行う。これにより、量子化後の生成符号量を削減している。なお、本明細書では、マクロブロック等の単位領域を分割した後の当該単位領域のことを分割パターン又は分割モードと呼ぶこととする。また、単位領域における分割された領域のことを分割領域と呼ぶこととする。   Now, a new video coding standard, H.264. H.264 (see Non-Patent Document 1, for example) is in the standardization stage. H. H.264 uses a new encoding method in order to improve the compression efficiency over the conventional moving image encoding method. As one of them, a rectangular area (macroblock) of 16 × 16 pixels is divided into division patterns (referred to as a division mode in H.264) shown in FIG. Motion compensation is performed by selecting an optimal division mode from a plurality of division modes according to the situation of a complicated portion and a flat portion in the × 16 region. Thereby, the amount of generated codes after quantization is reduced. In this specification, the unit area after dividing a unit area such as a macroblock is referred to as a division pattern or a division mode. A divided area in the unit area is referred to as a divided area.

H.264では、各分割モードの各分割領域において動きベクトル探索を行う。そして、複数の分割モードの中で、符号化コストが最小となる分割モードを選択している。この方法は符号量削減という利点があるが、各分割モードにおける各分割領域で動きベクトル探索が必要であるため、従来の規格に比べて演算量が増加するという問題がある。   H. In H.264, a motion vector search is performed in each divided region of each division mode. Then, the division mode that minimizes the coding cost is selected from among the plurality of division modes. This method has the advantage of reducing the amount of code, but requires a motion vector search in each divided region in each division mode, so that there is a problem that the amount of calculation increases compared to the conventional standard.

ここで、図8に示した動きベクトル探索方法を用いれば、単純に画素をずらしながら探索を行う図3の方法と比較して演算量を削減することは可能である。例えば、図10に示すように、分割モード3の下側半分を対象領域とした場合の動きベクトル探索に際し、動きベクトル算出済みの周辺の領域A、B、Cの各動きベクトルの水平成分、垂直成分毎の中央値を対象領域の探索中心とし、そこから所定の範囲を図8で説明した方法で探索を行う。しかし、この方法を用いた場合、例えばオブジェクトの境界が図10に点線で示す位置にある場合、点線の上側と下側とでは動きが異なる場合が多く、周辺の領域A、B、Cから予測した探索中心は対象領域の動きベクトルと大きく異なると考えられる。従って、最適な動きベクトルを探索するには広範囲の演算を行わなければならず、演算量の増加は避けられない。   Here, if the motion vector search method shown in FIG. 8 is used, it is possible to reduce the amount of calculation compared to the method of FIG. For example, as shown in FIG. 10, in the motion vector search in the case where the lower half of the division mode 3 is the target region, the horizontal components and vertical components of the motion vectors of the surrounding regions A, B, and C for which motion vectors have been calculated The median value for each component is set as the search center of the target region, and a predetermined range is searched from there by the method described in FIG. However, when this method is used, for example, when the boundary of the object is at the position indicated by the dotted line in FIG. 10, the movement is often different between the upper side and the lower side of the dotted line, and prediction is performed from the surrounding areas A, B, and C. The search center thus obtained is considered to be significantly different from the motion vector of the target region. Therefore, in order to search for an optimal motion vector, a wide range of calculations must be performed, and an increase in the amount of calculations is inevitable.

本発明は上記の点に鑑みてなされたものであり、分割パターンを用いて動き補償を行う動画像の符号化装置において、動きベクトル探索に関わる演算量を削減することを目的とする。   The present invention has been made in view of the above points, and an object of the present invention is to reduce the amount of calculation related to motion vector search in a moving image encoding apparatus that performs motion compensation using divided patterns.

上記の課題は、動画像におけるフレームの単位領域を複数の分割方法で分割した複数の分割パターンを用いて動き補償を行う符号化装置において実行される動きベクトル探索方法であって、前記複数の分割パターンのうちの一つである所定の分割パターンにおける各分割領域の動きベクトルを探索し、得られた動きベクトルを動きベクトル格納手段に格納する格納ステップと、前記所定の分割パターン以外の一の分割パターンにおける一の分割領域について、前記動きベクトル格納手段から読み出した、当該一の分割領域に対応する前記所定の分割パターンにおける分割領域の動きベクトルを用いることにより、当該一の分割領域の探索中心を求め、当該探索中心を用いて前記一の分割領域の動きベクトルを探索するステップを、前記所定の分割パターン以外の分割パターンの各分割領域に対して実行する動きベクトル探索ステップとを有する動きベクトル探索方法により解決できる。   The above-described problem is a motion vector search method executed in an encoding device that performs motion compensation using a plurality of division patterns obtained by dividing a unit region of a frame in a moving image by a plurality of division methods. A step of searching for a motion vector of each divided region in a predetermined divided pattern that is one of the patterns, and storing the obtained motion vector in a motion vector storage means; and another division other than the predetermined divided pattern By using the motion vector of the divided area in the predetermined divided pattern corresponding to the one divided area, which is read from the motion vector storage unit, for one divided area in the pattern, the search center of the one divided area is determined. And searching for a motion vector of the one divided region using the search center. It can be solved by the motion vector search method and a motion vector search step to be executed for each divided region of the divided pattern other than the split pattern.

また、上記の課題は、動画像におけるフレーム内の単位領域を複数の分割方法で分割した複数の分割パターンを用いて動き補償を行う符号化装置であって、前記複数の分割パターンのうちの一つである所定の分割パターンにおける各分割領域の動きベクトルを探索する第1の動きベクトル探索手段と、前記第1の動きベクトル探索手段により探索された動きベクトルを格納する動きベクトル格納手段と、前記所定の分割パターン以外の分割パターンの各分割領域に対して動きベクトルを探索する第2の動きベクトル探索手段と、前記第1の動きベクトル探索手段及び前記第2の動きベクトル探索手段により探索された動きベクトルを用いて動き補償を行う動き補償手段とを有し、前記第2の動きベクトル探索手段は、前記所定の分割パターン以外の一の分割パターンにおける一の分割領域について、前記動きベクトル格納手段から読み出した、当該一の分割領域に対応する前記所定の分割パターンにおける分割領域の動きベクトルを用いることにより、当該一の分割領域の探索中心を求め、当該探索中心を用いて前記一の分割領域の動きベクトルを探索する符号化装置によっても解決できる。   In addition, the above-described problem is an encoding apparatus that performs motion compensation using a plurality of division patterns obtained by dividing a unit region in a frame of a moving image by a plurality of division methods, and one of the plurality of division patterns. First motion vector search means for searching for a motion vector of each divided region in a predetermined division pattern, motion vector storage means for storing a motion vector searched by the first motion vector search means, Searched by a second motion vector search means for searching for a motion vector for each divided region of a divided pattern other than a predetermined divided pattern, the first motion vector search means and the second motion vector search means Motion compensation means for performing motion compensation using a motion vector, and the second motion vector search means includes the predetermined division pattern. By using the motion vector of the divided area in the predetermined divided pattern corresponding to the one divided area, which is read from the motion vector storage unit, for the one divided area in the other divided pattern, the one divided area This can also be solved by an encoding device that obtains a search center of a region and searches for the motion vector of the one divided region using the search center.

本発明に係る動きベクトル探索方法によれば、所定の分割パターンにおける各分割領域の動きベクトルを予め探索し、求めた動きベクトルを動きベクトル格納手段に蓄積し、それ以外の分割パターンにおける分割領域の動きベクトル探索における探索中心を、その分割領域に対応する領域に対して既に求めた動きベクトルを用いて算出することとしたので、最適な動きベクトルに近い探索中心を求めることができる。従って、探索範囲を絞ることができ、結果として動きベクトル探索に係る演算量を削減できる。   According to the motion vector search method of the present invention, the motion vector of each divided region in a predetermined divided pattern is searched in advance, the obtained motion vector is accumulated in the motion vector storage means, and the divided regions in the other divided patterns are stored. Since the search center in the motion vector search is calculated using the motion vector already obtained for the region corresponding to the divided region, the search center close to the optimum motion vector can be obtained. Therefore, the search range can be narrowed down, and as a result, the amount of calculation related to motion vector search can be reduced.

次に、図面を参照して本発明の実施の形態について説明する。本発明の実施の形態はH.264の分割モードをベースとしているが、本発明は分割パターンを用いて動き補償を行う動画像符号化方式全般に適用可能である。   Next, embodiments of the present invention will be described with reference to the drawings. The embodiment of the present invention is described in H.264. Although the H.264 division mode is used as a base, the present invention can be applied to all moving picture encoding systems that perform motion compensation using a division pattern.

(処理概要)
まず、本発明に係る処理の概要について説明する。図10と同じ分割モード3の場合を例にとり、図11を用いて説明する。
(Outline of processing)
First, an overview of processing according to the present invention will be described. The case of the same division mode 3 as in FIG. 10 will be described as an example with reference to FIG.

図11に示すように、分割モード1〜7の動きベクトル探索を行うに際し、最も分割数の多い分割モード7の各分割領域の動きベクトル探索を最初に行い、他の分割モードの動きベクトル探索では、その分割モードを構成する各分割領域に対して既に求められている動きベクトルから求めた探索中心を利用する。例えば分割モード3の場合、図11における領域a〜hに対し、分割モード7の動きベクトル探索で既に求められている動きベクトルを利用する。すなわち、分割モード6〜分割モード1の各分割領域は必ず分割モード7の分割領域の組み合わせで構成することができ、また、分割モード7の動きベクトル探索を既に行っているので、分割モード6〜分割モード1の各分割領域の探索中心を決定するために分割モード7の動きベクトルを用いることが可能である。   As shown in FIG. 11, when performing motion vector search in the division modes 1 to 7, the motion vector search of each division region in the division mode 7 having the largest number of divisions is performed first, and in the motion vector search in other division modes, The search center obtained from the motion vector already obtained for each divided region constituting the divided mode is used. For example, in the case of the division mode 3, the motion vector already obtained by the motion vector search in the division mode 7 is used for the areas a to h in FIG. That is, each of the divided areas of the division mode 6 to the division mode 1 can be configured by a combination of the divided areas of the division mode 7 and the motion vector search of the division mode 7 has already been performed. In order to determine the search center of each divided region in the division mode 1, the motion vector in the division mode 7 can be used.

より具体的には、分割モード3の下半分の領域の動きベクトルを求める場合、例えば領域a〜hの既に算出された動きベクトルの水平成分の平均値、垂直成分の平均値からなる点、もしくは、水平成分の中央値、垂直成分の中央値からなる点を探索中心として動きベクトル探索を行う。なお、既に算出された動きベクトルから対象領域の探索中心を求める方法はこれに限られるものではない。   More specifically, when the motion vector of the lower half area of the division mode 3 is obtained, for example, a point composed of the average value of the horizontal components and the average value of the vertical components of the motion vectors already calculated in the areas a to h, or Then, the motion vector search is performed with the point consisting of the median of the horizontal component and the median of the vertical component as the search center. Note that the method for obtaining the search center of the target region from the already calculated motion vector is not limited to this.

上記の方法を用いることにより、図10に示す位置にオブジェクトの境界が存在したとしても、該当領域において既に求められた動きベクトルをそのまま用いるので、その領域に動きがあったとしてもその動きが反映された探索中心を求めて、動きベクトル探索に用いることができる。探索中心として精度のよい値を用いることができるので、動きベクトル探索の範囲を狭くすることができ、演算量を減少させることが可能である。   By using the above method, even if the boundary of the object exists at the position shown in FIG. 10, the motion vector already obtained in the corresponding area is used as it is, so that even if there is movement in that area, the movement is reflected. The obtained search center can be obtained and used for motion vector search. Since a highly accurate value can be used as the search center, the motion vector search range can be narrowed, and the amount of calculation can be reduced.

(装置構成)
本発明の動きベクトル探索方法が適用される符号化装置の一例を図12に示す。図12は、動き補償を行う一般的な符号化装置の主要構成を示すブロック図であり、本発明の動きベクトル探索は、図12の動きベクトル探索部10で行われる。また、図12の動き補償部20では、直前のフレームの画像データを使用し、次のフレームの予測画像を作成している。図12に示す符号化装置は、ハードウェアとして実現することもできるし、各部の処理をコンピュータに実行させるプログラムを用いて実現することもできる。なお、H.264における符号化装置の構成は、例えば非特許文献1に記載されている。
(Device configuration)
An example of an encoding apparatus to which the motion vector search method of the present invention is applied is shown in FIG. FIG. 12 is a block diagram showing the main configuration of a general coding apparatus that performs motion compensation. The motion vector search of the present invention is performed by the motion vector search unit 10 of FIG. In addition, the motion compensation unit 20 in FIG. 12 uses the image data of the immediately preceding frame to create a predicted image of the next frame. The encoding apparatus shown in FIG. 12 can be realized as hardware, or can be realized using a program that causes a computer to execute the processing of each unit. H. The configuration of the encoding device in H.264 is described in Non-Patent Document 1, for example.

このような符号化装置は、動画像の画像処理を実行する装置であればどのような装置にでも搭載することができる。符号化装置を搭載する装置の例としては、携帯電話機、パーソナルコンピュータ、ビデオカメラ等がある。   Such an encoding device can be installed in any device that performs image processing of moving images. As an example of an apparatus equipped with an encoding apparatus, there are a mobile phone, a personal computer, a video camera, and the like.

図13に、本実施の形態における動きベクトル探索部10の構成を示す。   FIG. 13 shows the configuration of the motion vector search unit 10 in the present embodiment.

図13に示すように、動きベクトル探索部10は、各分割モード毎の動きベクトル探索部101〜107(図ではMEと略記している)、モード判定部110、探索中心設定部111、動きベクトルメモリ部112を備えている。各動きベクトル探索部101〜107には、符号化対象フレームと参照フレーム、及び探索中心が入力され、該当の分割モードにおける動きベクトル探索が実行される。そして、探索の結果得られた動きベクトルと、符号化コスト(動きベクトルを符号化するのに必要な符号化ビット数とSADを合算した値)がモード判定部110に入力される。モード判定部110では、符号化コストが最小となる分割モードを選択し、選択された分割モードとその分割モードの動きベクトルを出力する。また、分割モード7の動きベクトル探索部107から出力された動きベクトルは、動きベクトルメモリ部112に蓄積される。また、動きベクトルメモリ部112は既に符号化済みの動きベクトルも蓄積する。探索中心設定部111は、動きベクトルメモリ部112に蓄積された動きベクトルを用いることにより、各分割モードでの動きベクトル探索における探索中心を設定する。   As shown in FIG. 13, the motion vector search unit 10 includes motion vector search units 101 to 107 (abbreviated as ME in the drawing) for each division mode, a mode determination unit 110, a search center setting unit 111, a motion vector. A memory unit 112 is provided. Each of the motion vector search units 101 to 107 receives the encoding target frame, the reference frame, and the search center, and executes a motion vector search in the corresponding division mode. Then, the motion vector obtained as a result of the search and the coding cost (the value obtained by adding the number of coding bits necessary for coding the motion vector and SAD) are input to the mode determination unit 110. The mode determination unit 110 selects a division mode that minimizes the coding cost, and outputs the selected division mode and a motion vector of the division mode. Further, the motion vector output from the motion vector search unit 107 in the division mode 7 is accumulated in the motion vector memory unit 112. The motion vector memory unit 112 also stores motion vectors that have already been encoded. The search center setting unit 111 sets the search center in the motion vector search in each division mode by using the motion vector stored in the motion vector memory unit 112.

(詳細動作)
次に、図14、図15のフローチャートを参照して動きベクトル探索部10の動作をより詳細に説明する。図14は、全体の処理手順を示し、図15は、図14におけるステップS2の処理手順を示す。なお、以下の処理は符号化対象フレームにおける各単位領域毎に行われるものである。また、各フローチャートに従った処理の実行は、図示しない制御部が各処理部に命令を出すことにより行うことが可能である。
(Detailed operation)
Next, the operation of the motion vector search unit 10 will be described in more detail with reference to the flowcharts of FIGS. FIG. 14 shows the overall processing procedure, and FIG. 15 shows the processing procedure of step S2 in FIG. The following process is performed for each unit area in the encoding target frame. Moreover, the execution of the processing according to each flowchart can be performed when a control unit (not shown) issues a command to each processing unit.

図14のフローチャートに示すように、まず分割モード7の動きベクトル探索部107が分割モード7の各分割領域についての動きベクトルを算出し、動きベクトルメモリ部112に格納する(ステップS1)。   As shown in the flowchart of FIG. 14, first, the motion vector search unit 107 in the division mode 7 calculates a motion vector for each division region in the division mode 7 and stores it in the motion vector memory unit 112 (step S1).

より詳細には、探索中心設定部111が動きベクトルメモリ部112に蓄積されている既に符号化済みの動きベクトルを取得し、例えば図10に示した領域A、B、Cの動きベクトルの中央値を探索中心として決定し、それを分割モード7の動きベクトル探索部107に出力する。分割モード7の動きベクトル探索部107は、符号化対象フレーム、参照フレーム及び探索中心の入力を受け、分割領域(4×4画素の領域)毎に動きベクトル探索を行う。このときの動きベクトル探索範囲は通常の範囲(例えば±16画素)とする。そして、分割モード7の動きベクトル探索部107は、動きベクトル探索により得られた動きベクトルに加えて、その動きベクトルを符号化するのに必要な符号化ビット数とSADを合算した符号化コストをモード判定部110に対して出力する。   More specifically, the search center setting unit 111 acquires the already encoded motion vector stored in the motion vector memory unit 112, and for example, the median of the motion vectors of the regions A, B, and C shown in FIG. Is determined as the search center, and is output to the motion vector search unit 107 in the division mode 7. The motion vector search unit 107 in the division mode 7 receives the input of the encoding target frame, the reference frame, and the search center, and performs a motion vector search for each divided region (4 × 4 pixel region). The motion vector search range at this time is a normal range (for example, ± 16 pixels). Then, the motion vector search unit 107 in the division mode 7 adds an encoding cost obtained by adding the number of encoding bits necessary for encoding the motion vector and SAD in addition to the motion vector obtained by the motion vector search. Output to the mode determination unit 110.

分割モード7の各領域についての動きベクトルを算出した後に、分割モード1〜分割モード6の各領域について、探索範囲を絞り込んで動きベクトル探索を行い、算出された動きベクトルと符号化コストがモード判定部110に出力される(ステップS2)。   After calculating the motion vector for each region in the division mode 7, the search range is narrowed down for each region in the division mode 1 to the division mode 6, and the calculated motion vector and the coding cost are determined as a mode. Is output to the unit 110 (step S2).

そして、モード判定部は、符号化コストが最小となる分割モードと、その分割モードにおける動きベクトルを出力する(ステップS3)。   Then, the mode determination unit outputs a division mode that minimizes the coding cost and a motion vector in the division mode (step S3).

次に、分割モード1〜分割モード6の各領域についての動きベクトル探索処理について、図15のフローチャートを参照して説明する。   Next, motion vector search processing for each region in the division mode 1 to division mode 6 will be described with reference to the flowchart of FIG.

まず、分割モードが選択される(ステップS21)。例えば分割モード1から順番に分割モード6まで動きベクトル探索を行うことにすれば、分割モード1から順番に分割モード6までの選択が行われることになる。   First, a division mode is selected (step S21). For example, if the motion vector search is performed from the division mode 1 to the division mode 6 in order, the selection from the division mode 1 to the division mode 6 is performed in order.

次に、選択された分割モードの動きベクトル探索部は、当該分割モードの中の1つの分割領域を選択する(ステップS22)。選択された領域は、探索中心設定部111に通知される。探索中心設定部111は、動きベクトルメモリ部112に格納されている分割モード7に対して既に探索済みの動きベクトルの中から、通知された領域に対応する動きベクトルを取得し、これらの平均値もしくは中央値を、探索中心となる動きベクトル予測値として決定し、該当の分割モードの動きベクトル探索部に出力する(ステップS23)。   Next, the motion vector search unit of the selected division mode selects one division region in the division mode (step S22). The selected area is notified to the search center setting unit 111. The search center setting unit 111 acquires a motion vector corresponding to the notified area from the motion vectors already searched for the division mode 7 stored in the motion vector memory unit 112, and averages these values. Alternatively, the median value is determined as a motion vector prediction value serving as a search center, and is output to the motion vector search unit in the corresponding division mode (step S23).

その分割モードの動きベクトル探索部は、探索中心、符号化対象フレーム、参照フレームの入力を受け、該当分割領域に対する動きベクトル探索を行う(ステップS24)。このときの探索中心は分割モード7での動きベクトル探索で得られた動きベクトルから予測した予測精度の高い値であるため、動きベクトル探索範囲は通常の範囲より絞り込んでも符号化効率はほとんど低下しない。このため動きベクトル探索範囲は±1〜4画素程度とすることが可能である。   The motion vector search unit in the division mode receives the search center, the encoding target frame, and the reference frame, and performs a motion vector search for the corresponding divided region (step S24). Since the search center at this time is a value with high prediction accuracy predicted from the motion vector obtained by the motion vector search in the division mode 7, even if the motion vector search range is narrowed down from the normal range, the coding efficiency is hardly lowered. . For this reason, the motion vector search range can be about ± 1 to 4 pixels.

選択された分割モードにおいて全ての分割領域に対する動きベクトル探索が終了していなければ(ステップS25のNo)、ステップS22に戻り、次の領域に対して動きベクトル探索処理を行う。   If the motion vector search for all the divided areas is not completed in the selected division mode (No in step S25), the process returns to step S22, and the motion vector search process is performed for the next area.

全ての分割領域に対する動きベクトル探索が終了した場合(ステップS25のYes)、分割モード1〜分割モード6のうち動きベクトル探索が終了していない分割モードがあれば(ステップS26のNo)ステップS21に戻り、次の分割モードに対する動きベクトル探索処理を実行する。分割モード1〜分割モード6のうち動きベクトル探索が終了すれば(ステップS26のYes)、図14のステップS2の処理が終了となる。   When the motion vector search for all the divided regions is completed (Yes in step S25), if there is a divided mode in which the motion vector search is not completed among the divided modes 1 to 6 (No in step S26), the process proceeds to step S21. Returning, the motion vector search process for the next division mode is executed. When the motion vector search is finished in the division modes 1 to 6 (Yes in step S26), the process in step S2 in FIG. 14 is finished.

なお、上記の例では、最も分割数の多い分割モード7の各分割領域に対して探索した動きベクトルを動きベクトルメモリ部112に格納し、その動きベクトルを使用することにより他の分割モードの分割領域の動きベクトルを求めていたが、他の分割モードの分割領域の動きベクトルを求めるために使用する動きベクトルは分割モード7のものでなくてもよい。   In the above example, the motion vector searched for each divided region of the division mode 7 having the largest number of divisions is stored in the motion vector memory unit 112, and the division of another division mode is performed by using the motion vector. Although the motion vector of the area has been obtained, the motion vector used for obtaining the motion vector of the divided area of another division mode may not be that of the division mode 7.

例えば、分割モード6の各分割領域の動きベクトルを用いて、それより分割数の小さい分割モード1〜分割モード4の各分割領域の動きベクトルを上記と同様の方法で求めることが可能である。この場合、分割モード5、分割モード7の各分割領域については、分割モード6において対応する分割領域の動きベクトルを用いるようにする。従って、例えば、分割モード6のある分割領域の動きベクトルが、その分割領域に対応する分割モード7の複数の分割領域の各々に使用される。またこの場合、図13において、分割モード6に対応する動きベクトル探索部106により探索された動きベクトルが動きベクトルメモリ112に格納され、探索中心設定部111により他の分割モードの探索中心設定の処理に用いられることになる。   For example, by using the motion vector of each divided region in the division mode 6, it is possible to obtain the motion vector of each divided region in the division mode 1 to the division mode 4 having a smaller number of divisions by the same method as described above. In this case, for each of the divided regions in the division mode 5 and the division mode 7, the motion vector of the corresponding divided region in the division mode 6 is used. Therefore, for example, the motion vector of a certain divided area in the dividing mode 6 is used for each of the divided areas in the divided mode 7 corresponding to the divided area. In this case, in FIG. 13, the motion vector searched by the motion vector search unit 106 corresponding to the division mode 6 is stored in the motion vector memory 112, and the search center setting unit 111 performs search center setting processing in another division mode. Will be used.

どの分割モードをベースとするかは、一定時間内の画像の変化量、フレーム内における一様な部分と複雑な部分の状況等の評価手段を設け、その評価手段が決定する。もしくは、動きの早いシーン等、外部から入力された情報に基づき決定する。   Which division mode is the base is determined by an evaluation unit that determines the amount of change in the image within a certain period of time, the situation of the uniform portion and the complicated portion in the frame, and the like. Alternatively, it is determined based on information input from the outside, such as a fast-moving scene.

これまでに説明したように、周囲の領域の動きベクトルを利用して対象領域の探索中心を予測する方法では、オブジェクトの境界が対象領域と周囲の領域との間にある場合等に探索中心の精度が低くなることから、最適な動きベクトルを探索するためには広範囲を探索する必要があり、膨大な演算量が必要になるという問題があったところ、本実施の形態で説明した動きベクトル探索方法によれば、既に探索済みの動きベクトルを利用して探索中心を求めるため、精度の高い探索中心を得ることができ、探索範囲を絞り込んでも最適な動きベクトルを算出できる。従って、符号化効率を低下させることなく演算量を削減でき、動きベクトル探索処理を高速化することができる。   As described above, in the method of predicting the search center of the target region using the motion vector of the surrounding region, the search center of the target region is located when the boundary of the object is between the target region and the surrounding region. Since the accuracy is lowered, it is necessary to search a wide range in order to search for an optimal motion vector, and there is a problem that an enormous amount of computation is required. The motion vector search described in this embodiment According to the method, since the search center is obtained by using the already searched motion vector, a highly accurate search center can be obtained, and an optimal motion vector can be calculated even if the search range is narrowed down. Therefore, the amount of calculation can be reduced without reducing the coding efficiency, and the motion vector search process can be speeded up.

なお、本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内において、種々変更・応用が可能である。   The present invention is not limited to the above-described embodiment, and various modifications and applications can be made within the scope of the claims.

動きベクトル探索を説明するための図であるIt is a figure for demonstrating a motion vector search 符号化対象フレームの領域と参照フレームの領域との差分を説明するための図である。It is a figure for demonstrating the difference of the area | region of an encoding object frame, and the area | region of a reference frame. 動きベクトル探索の範囲の例を示す図である。It is a figure which shows the example of the range of a motion vector search. 効率的に動きベクトル探索を行う方法の例を説明するために使用する対象領域と参照領域を示す図である。It is a figure which shows the object area | region and reference area which are used in order to demonstrate the example of the method of performing a motion vector search efficiently. 対象領域と参照領域1との間のSAD算出過程を示す図である。It is a figure which shows the SAD calculation process between an object area | region and the reference area. 対象領域と参照領域2との間のSAD算出過程を示す図である。It is a figure which shows the SAD calculation process between the object area | region and the reference area. 対象領域と参照領域3との間のSAD算出過程を示す図である。FIG. 5 is a diagram illustrating a SAD calculation process between a target area and a reference area 3. 効率的に動きベクトル探索を行う方法の例を説明するための図である。It is a figure for demonstrating the example of the method of performing a motion vector search efficiently. 分割モードを示す図である。It is a figure which shows division mode. 分割モード3の下側半分を対象領域とした場合の従来の動きベクトル探索方法を説明するための図である。It is a figure for demonstrating the conventional motion vector search method when the lower half of the division mode 3 is made into the object area | region. 本発明に係る処理の概要を説明するための図である。It is a figure for demonstrating the outline | summary of the process which concerns on this invention. 本発明の動きベクトル探索方法が適用される符号化装置の一例を示すブロック図である。It is a block diagram which shows an example of the encoding apparatus with which the motion vector search method of this invention is applied. 動きベクトル探索部10の構成を示す図である。3 is a diagram illustrating a configuration of a motion vector search unit 10. FIG. 動きベクトル探索部10の全体の処理手順を示すフローチャートである。3 is a flowchart showing an overall processing procedure of a motion vector search unit 10. 図14におけるステップS2の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of step S2 in FIG.

符号の説明Explanation of symbols

10 動きベクトル探索部
20 動き補償部
101〜107 各分割モード毎の動きベクトル探索部
110 モード判定部
111 探索中心設定部
112 動きベクトルメモリ部
DESCRIPTION OF SYMBOLS 10 Motion vector search part 20 Motion compensation part 101-107 Motion vector search part 110 for each division mode Mode determination part 111 Search center setting part 112 Motion vector memory part

Claims (2)

動画像におけるフレームの単位領域を複数の分割方法で分割した複数の分割パターンを用いて動き補償を行う符号化装置において実行される動きベクトル探索方法であって、
前記複数の分割パターンのうちの一つである所定の分割パターンにおける各分割領域の動きベクトルを探索し、得られた動きベクトルを動きベクトル格納手段に格納する格納ステップと、
前記所定の分割パターン以外の一の分割パターンにおける一の分割領域について、前記動きベクトル格納手段から読み出した、当該一の分割領域に対応する前記所定の分割パターンにおける分割領域の動きベクトルを用いることにより、当該一の分割領域の探索中心を求め、当該探索中心を用いて前記一の分割領域の動きベクトルを探索するステップを、前記所定の分割パターン以外の分割パターンの各分割領域に対して実行する動きベクトル探索ステップと
を有することを特徴とする動きベクトル探索方法。
A motion vector search method executed in an encoding device that performs motion compensation using a plurality of division patterns obtained by dividing a unit region of a frame in a moving image by a plurality of division methods,
A storage step of searching for a motion vector of each divided region in a predetermined divided pattern that is one of the plurality of divided patterns, and storing the obtained motion vector in a motion vector storage means;
By using the motion vector of the divided area in the predetermined divided pattern corresponding to the one divided area read from the motion vector storage means for one divided area in the other divided pattern other than the predetermined divided pattern. The step of obtaining the search center of the one divided region and searching for the motion vector of the one divided region using the search center is executed for each divided region of the divided pattern other than the predetermined divided pattern. A motion vector search method comprising: a motion vector search step.
動画像におけるフレーム内の単位領域を複数の分割方法で分割した複数の分割パターンを用いて動き補償を行う符号化装置であって、
前記複数の分割パターンのうちの一つである所定の分割パターンにおける各分割領域の動きベクトルを探索する第1の動きベクトル探索手段と、
前記第1の動きベクトル探索手段により探索された動きベクトルを格納する動きベクトル格納手段と、
前記所定の分割パターン以外の分割パターンの各分割領域に対して動きベクトルを探索する第2の動きベクトル探索手段と、
前記第1の動きベクトル探索手段及び前記第2の動きベクトル探索手段により探索された動きベクトルを用いて動き補償を行う動き補償手段とを有し、
前記第2の動きベクトル探索手段は、前記所定の分割パターン以外の一の分割パターンにおける一の分割領域について、前記動きベクトル格納手段から読み出した、当該一の分割領域に対応する前記所定の分割パターンにおける分割領域の動きベクトルを用いることにより、当該一の分割領域の探索中心を求め、当該探索中心を用いて前記一の分割領域の動きベクトルを探索することを特徴とする符号化装置。
An encoding device that performs motion compensation using a plurality of division patterns obtained by dividing a unit region in a moving image in a frame by a plurality of division methods,
First motion vector search means for searching for a motion vector of each divided region in a predetermined divided pattern that is one of the plurality of divided patterns;
Motion vector storage means for storing a motion vector searched by the first motion vector search means;
Second motion vector search means for searching for a motion vector for each divided region of a divided pattern other than the predetermined divided pattern;
Motion compensation means for performing motion compensation using the motion vectors searched by the first motion vector search means and the second motion vector search means,
The second motion vector search means reads the predetermined division pattern corresponding to the one division area read from the motion vector storage means for one division area in one division pattern other than the predetermined division pattern. A coding apparatus, wherein a search center of the one divided region is obtained by using a motion vector of the divided region, and a motion vector of the one divided region is searched using the search center.
JP2004141529A 2004-05-11 2004-05-11 Method for searching motion vector, and encoding device Pending JP2005323299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004141529A JP2005323299A (en) 2004-05-11 2004-05-11 Method for searching motion vector, and encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004141529A JP2005323299A (en) 2004-05-11 2004-05-11 Method for searching motion vector, and encoding device

Publications (1)

Publication Number Publication Date
JP2005323299A true JP2005323299A (en) 2005-11-17

Family

ID=35470212

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004141529A Pending JP2005323299A (en) 2004-05-11 2004-05-11 Method for searching motion vector, and encoding device

Country Status (1)

Country Link
JP (1) JP2005323299A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017209A (en) * 2006-07-06 2008-01-24 Canon Inc Motion vector detecting device, motion vector detecting method, computer program, and storage medium
JP2017126884A (en) * 2016-01-14 2017-07-20 日本電信電話株式会社 Dictionary generation method, dictionary generation device and dictionary generation program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008017209A (en) * 2006-07-06 2008-01-24 Canon Inc Motion vector detecting device, motion vector detecting method, computer program, and storage medium
JP2017126884A (en) * 2016-01-14 2017-07-20 日本電信電話株式会社 Dictionary generation method, dictionary generation device and dictionary generation program

Similar Documents

Publication Publication Date Title
JP4166781B2 (en) Motion vector detection apparatus and motion vector detection method
JP6726340B2 (en) Image predictive decoding method
US20160080765A1 (en) Encoding system using motion estimation and encoding method using motion estimation
JP2007060164A (en) Apparatus and method for detecting motion vector
US20070098075A1 (en) Motion vector estimating device and motion vector estimating method
JP2005303984A (en) Motion vector detecting device and method thereof, and image encoding apparatus capable of utilizing the motion vector detecting device
JP2006313950A (en) Image coding apparatus, and image coding method
US20090310678A1 (en) Image encoding apparatus, method of controlling the same and computer program
JP2009188996A (en) Video image codec apparatus, and method thereof
JP2011029863A (en) Decoding processing method
JP2007214641A (en) Coder, decoder, image processing apparatus, and program for allowing computer to execute image processing method
JP2005244749A (en) Dynamic image encoding device
JP2008154072A (en) Dynamic image coding apparatus and dynamic image coding method
JP2007158855A (en) Motion vector detector and motion vector detecting method
JP2007166545A (en) Motion vector detection device and method
JP4488805B2 (en) Motion vector detection apparatus and method
JP2005323299A (en) Method for searching motion vector, and encoding device
US11528485B2 (en) Encoding apparatus and program
JP4429996B2 (en) Moving picture coding program, moving picture coding method, and moving picture coding apparatus
JP4032049B2 (en) Motion vector detection method and apparatus
JP2009267726A (en) Moving image encoding apparatus, recorder, moving image encoding method, moving image encoding program
JP2006254347A (en) Image encoding device
JP2006217486A (en) Motion compensation type ip conversion processor and processing method
JP2004364333A (en) Image encoding apparatus
JP2006014183A (en) Image encoding device and method, and program therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070507

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090224

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090707