JP5938935B2 - Moving picture coding apparatus and moving picture coding method - Google Patents

Moving picture coding apparatus and moving picture coding method Download PDF

Info

Publication number
JP5938935B2
JP5938935B2 JP2012035652A JP2012035652A JP5938935B2 JP 5938935 B2 JP5938935 B2 JP 5938935B2 JP 2012035652 A JP2012035652 A JP 2012035652A JP 2012035652 A JP2012035652 A JP 2012035652A JP 5938935 B2 JP5938935 B2 JP 5938935B2
Authority
JP
Japan
Prior art keywords
motion vector
search range
block
vector detection
unit
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.)
Expired - Fee Related
Application number
JP2012035652A
Other languages
Japanese (ja)
Other versions
JP2013172350A (en
Inventor
川上 健太郎
健太郎 川上
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2012035652A priority Critical patent/JP5938935B2/en
Publication of JP2013172350A publication Critical patent/JP2013172350A/en
Application granted granted Critical
Publication of JP5938935B2 publication Critical patent/JP5938935B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、動きベクトル検出を並列に行う動画像符号化装置、及び動画像符号化方法に関する。   The present invention relates to a moving picture coding apparatus and a moving picture coding method that perform motion vector detection in parallel.

H.264/AVC(Advanced Video Coding)(以下、H.264とも呼ぶ)などの動画像符号化は、動き補償と直交変換・量子化処理を用いたハイブリッド動画像符号化方式である。符号化対象の入力画像は、動きベクトル検出により、参照画像(以下、参照ピクチャとも呼ぶ)の中から類似している画像ブロック(以下、参照ブロックとも呼ぶ)が算出される。   H. Video coding such as H.264 / AVC (Advanced Video Coding) (hereinafter also referred to as H.264) is a hybrid video coding method using motion compensation and orthogonal transformation / quantization processing. For the input image to be encoded, a similar image block (hereinafter also referred to as a reference block) is calculated from a reference image (hereinafter also referred to as a reference picture) by motion vector detection.

H.264の符号化では、入力画像と参照ブロックの差分画像について直交変換・量子化処理を行い、得られた係数データをエントロピー符号化して出力する。参照ブロックを特定するためのどの参照ピクチャを使用したかの情報と、どのブロックサイズで動きベクトルを算出したかの情報と、動きベクトルの情報とは、別途エントロピー符号化して出力される。   H. In H.264 encoding, orthogonal transform / quantization processing is performed on a difference image between an input image and a reference block, and the obtained coefficient data is entropy-coded and output. Information on which reference picture used to identify the reference block, information on which block size the motion vector is calculated, and information on the motion vector are separately entropy-coded and output.

H.264の符号化技術には、入力画像を符号化するモードしてP_Skipがある。このP_Skipモードでは、どの参照ピクチャを使用したかの情報、動きベクトルを算出したブロックサイズの情報、及び動きベクトルの情報を符号化する代わりに、マクロブロックをP_Skipで符号化したことを示す情報を符号化する。   H. The H.264 encoding technique includes P_Skip as a mode for encoding an input image. In this P_Skip mode, instead of encoding information on which reference picture was used, information on the block size from which the motion vector was calculated, and information on the motion vector, information indicating that the macroblock was encoded with P_Skip. Encode.

P_Skipであることを示す符号は、どの参照ピクチャを選択したかの情報や動きベクトルの情報を符号化した場合と比較して少ない符号量となる。そのため、動画像の圧縮率が高まるため、このタイプのマクロブロックが多く出ることが望ましい。   The code indicating P_Skip has a smaller code amount than the information indicating which reference picture is selected and the information of the motion vector. For this reason, since the compression rate of moving images increases, it is desirable that many macroblocks of this type appear.

マクロブロックのタイプがP_Skipであることを受信した復号装置は、このマクロブロックにおいて隣接する周りのマクロブロックの参照ピクチャや動きベクトルからこれらのマクロブロックの参照ピクチャ、動きベクトルを復元する。よって、問題なく画像を復元することができる。この復元方法は、H.264の中で規定されている。   Receiving that the macroblock type is P_Skip, the decoding apparatus restores the reference pictures and motion vectors of these macroblocks from the neighboring macroblock reference pictures and motion vectors in the macroblock. Therefore, the image can be restored without any problem. This restoration method is described in H.264. H.264.

動きベクトル検出は、動きベクトル検出対象の参照ピクチャからの処理対象マクロブロックを中心とした矩形領域の画像データに対して行なわれる。参照ピクチャは、例えばSDRAM(Synchronous Dynamic Random Access Memory)などの外部メモリに保存される。   Motion vector detection is performed on image data in a rectangular area centered on a processing target macroblock from a reference picture that is a motion vector detection target. The reference picture is stored in an external memory such as SDRAM (Synchronous Dynamic Random Access Memory).

動きベクトル検出部は、SDRAMから画像データを読み込んで動きベクトル検出を行う。このときに読み込む画像データ量を減らすために、プリフェッチメモリを用いる技術がある。また、解像度の大きな画像を実時間で符号化するために、この動きベクトル検出部を複数備えた技術がある。   The motion vector detection unit reads the image data from the SDRAM and performs motion vector detection. In order to reduce the amount of image data read at this time, there is a technique using a prefetch memory. In addition, there is a technique that includes a plurality of motion vector detection units in order to encode a high-resolution image in real time.

動き探索部が探索した動きベクトルが有効であるか否かを判定し、有効と判定された動きベクトルの分布に基づいて動きベクトル探索範囲を判定する技術がある。   There is a technique for determining whether or not a motion vector searched by a motion search unit is valid, and determining a motion vector search range based on a distribution of motion vectors determined to be valid.

特開2008−141288号公報JP 2008-141288 A 特開2008−5545号公報JP 2008-5545 A 特開2009−296443号公報JP 2009-296443 A

まず、P_Skipについて説明する。図1は、処理対象ブロックと隣接ブロックとの関係を示す図である。図1に示す隣接ブロックAは、処理対象ブロックの左隣のブロック、隣接ブロックBは、処理対象ブロックの上隣のブロック、隣接ブロックCは右上隣のブロック、隣接ブロックDは、処理対象ブロックの左上隣のブロックである。   First, P_Skip will be described. FIG. 1 is a diagram illustrating a relationship between a processing target block and adjacent blocks. The adjacent block A shown in FIG. 1 is the block adjacent to the left of the processing target block, the adjacent block B is the upper adjacent block of the processing target block, the adjacent block C is the upper right adjacent block, and the adjacent block D is the processing target block. It is the block on the upper left.

ピクチャ上端のMB(マクロブロック)の場合、隣接ブロックB、C、Dは存在しない。ピクチャ左端のMBの場合、隣接ブロックAは存在しない。ピクチャ右端のMBの場合、隣接ブロックCは存在しない。   In the case of MB (macroblock) at the top of the picture, there are no adjacent blocks B, C, and D. In the case of MB at the left end of the picture, there is no adjacent block A. In the case of MB at the right end of the picture, there is no adjacent block C.

図2は、P_Skipマクロブロックの動きベクトルの算出処理を示すフローチャートである。図2に示す算出方法では、以下のようにP_Skipベクトルが決定される。
(1)(2)隣接Aまたは隣接Bが存在しないMBの場合、P_Skipベクトルは0ベクトルとなる(S11〜13、S18)。
(3)隣接Aの参照ピクチャインデックスref_idxL0Aが0かつ隣接Aの動きベクトルが0ベクトルの場合、P_Skipベクトルは0となる(S14、S18)。
(4)隣接Bの参照ピクチャインデックスref_idxL0Bが0かつ隣接Bの動きベクトルが0ベクトルの場合、P_Skipベクトルは0となる(S15、S18)。
(1)〜(4)のいずれにも当てはまらない場合、図3のフローチャートでP_Skipベクトルが決定される(S16、S17)。
FIG. 2 is a flowchart showing the calculation process of the motion vector of the P_Skip macroblock. In the calculation method shown in FIG. 2, the P_Skip vector is determined as follows.
(1) (2) In the case of an MB for which there is no adjacent A or adjacent B, the P_Skip vector is a 0 vector (S11-13, S18).
(3) When the reference picture index ref_idxL0A of adjacent A is 0 and the motion vector of adjacent A is a 0 vector, the P_Skip vector is 0 (S14, S18).
(4) When the reference picture index ref_idxL0B of adjacent B is 0 and the motion vector of adjacent B is a 0 vector, the P_Skip vector is 0 (S15, S18).
If none of (1) to (4) applies, the P_Skip vector is determined in the flowchart of FIG. 3 (S16, S17).

図3は、通常のP_Skipベクトル算出処理を示すフローチャートである。図3に示すように、隣接ブロックA、B、Cの各動きベクトルの各成分に対し、median値がP_Skipの動きベクトルとなる(S21〜S26)。なお、median(X、Y、Z)は3つの値X、Y、Zの内、中間の値を返す関数である。   FIG. 3 is a flowchart showing a normal P_Skip vector calculation process. As shown in FIG. 3, for each component of the motion vectors of adjacent blocks A, B, and C, the median value is a motion vector with P_Skip (S21 to S26). Median (X, Y, Z) is a function that returns an intermediate value among the three values X, Y, Z.

ここで、プリフェッチメモリを用いて複数の動きベクトル検出部が並列に動きベクトル検出を行う従来技術について説明する。図4は、従来技術の動作を説明するための図である。図4に示す例では、2つの動きベクトル検出部が並列に動きベクトルを検出する例を示す。以降では、2つの動きベクトル検出部をコア部1とコア部2とも呼ぶ。   Here, a conventional technique in which a plurality of motion vector detection units perform motion vector detection in parallel using a prefetch memory will be described. FIG. 4 is a diagram for explaining the operation of the prior art. The example shown in FIG. 4 shows an example in which two motion vector detection units detect a motion vector in parallel. Hereinafter, the two motion vector detection units are also referred to as a core unit 1 and a core unit 2.

図4に示すコア1は、コア部1の処理対象マクロブロックを示し、コア2は、コア部2の処理対象マクロブロックを示す。   A core 1 illustrated in FIG. 4 indicates a processing target macroblock of the core unit 1, and a core 2 indicates a processing target macroblock of the core unit 2.

H.264ではP_Skipベクトルの計算など、隣接ブロックA、B、C、Dをどのように符号化したかの情報が必要となる。そのため、2つのマクロブロックを並列に処理する場合、図4に示すようにコア1とコア2とは、垂直位置が1MBだけずれており、水平方向には2MB以上ずれている。   H. H.264 requires information on how adjacent blocks A, B, C, and D are encoded, such as calculation of a P_Skip vector. Therefore, when two macroblocks are processed in parallel, as shown in FIG. 4, the core 1 and the core 2 are shifted in vertical position by 1 MB and shifted in the horizontal direction by 2 MB or more.

図4に示すマクロブロックの関係であれば、各動きベクトル検出部で処理するマクロブロックの隣接ブロックA、B、C、Dについて、すでに符号化を完了していることが保証できる。   With the relationship of the macroblocks shown in FIG. 4, it can be guaranteed that the encoding has already been completed for the adjacent blocks A, B, C, and D of the macroblock processed by each motion vector detection unit.

参照ピクチャの内、動きベクトル検出部(コア部1)は、破線の範囲rg11を探索範囲として、この探索範囲rg11内の領域の画像を動きベクトル検出で使用する。動きベクトル検出部(コア部2)は、一点鎖線の範囲rg12を探索範囲として、この探索範囲rg12内の領域の画像を動きベクトル検出で使用する。   Among the reference pictures, the motion vector detection unit (core unit 1) uses a broken line range rg11 as a search range, and uses an image in the region within the search range rg11 for motion vector detection. The motion vector detection unit (core unit 2) uses the range rg12 of the alternate long and short dash line as a search range, and uses an image in the region within the search range rg12 for motion vector detection.

コア部1及びコア部2が、次の右隣のマクロブロックを対象に動きベクトル検出する際、探索範囲rg11の領域、探索範囲rg12の領域は、ともに右に1MB分シフトした領域となる。現在動きベクトル検出中のMBと次に動きベクトル検出を行うMBの参照ピクチャのうち、重複する領域はプリフェッチメモリ内に保存が維持され、新たに必要な領域ar12がSDRAMからプリフェッチメモリ内に読み込まれる。   When the core unit 1 and the core unit 2 detect a motion vector for the next right macroblock, the region of the search range rg11 and the region of the search range rg12 are both regions shifted by 1 MB to the right. Of the reference pictures of the current motion vector detection MB and the next reference vector of the motion vector detection MB, the overlapping area is maintained in the prefetch memory, and a newly required area ar12 is read from the SDRAM into the prefetch memory. .

読み込まれた領域ar12は、プリフェッチメモリの中で不要になる領域ar13を保存している領域に上書き保存される。図4に示す領域ar11は、プリフェッチメモリに保存されている画像領域を表す。   The read area ar12 is overwritten and saved in the area where the unnecessary area ar13 is saved in the prefetch memory. An area ar11 illustrated in FIG. 4 represents an image area stored in the prefetch memory.

動きベクトル検出では、より広い参照ピクチャ領域の中から最適な動きベクトルを検出した方が、処理対象マクロブロックにより似た参照ブロックを見つけ出せる可能性があるため望ましい。   In motion vector detection, it is preferable to detect an optimal motion vector from a wider reference picture area because a reference block more similar to the processing target macroblock may be found.

しかし、従来技術では、プリフェッチメモリが蓄積保存している領域ar11に比べて、動きベクトルの検出対象としている範囲(探索範囲rg11や探索範囲rg12)は小さい。よって、従来技術では、プリフェッチメモリ内の領域を効率よく用いて動きベクトルを検出していない。   However, in the conventional technique, the range (search range rg11 and search range rg12) that is a motion vector detection target is smaller than the area ar11 that is stored and stored in the prefetch memory. Therefore, in the prior art, the motion vector is not detected by efficiently using the area in the prefetch memory.

ここで、動きベクトル検出の探索範囲として、プリフェッチメモリ内の領域のうち垂直方向で最大の領域を利用する場合、次のような問題点がある。図5は、探索範囲を広げた場合の問題点を説明するための図である。   Here, when the maximum area in the vertical direction among the areas in the prefetch memory is used as the search range for motion vector detection, there are the following problems. FIG. 5 is a diagram for explaining a problem when the search range is expanded.

図5に示すように、例えば、コア部1では、探索範囲rg21で動きベクトル検出を行ったとし、マクロブロックB、マクロブロックCでの動きベクトルがmv_B,mv_Cになったとする。   As shown in FIG. 5, for example, in the core unit 1, it is assumed that motion vector detection is performed in the search range rg21, and the motion vectors in the macroblock B and the macroblock C are mv_B and mv_C.

このとき、コア部2で処理するMB(コア2)の上隣接ブロックBと右上隣接ブロックCの動きベクトルはmv_B、mv_Cとなることになる。ここで、コア2の左隣ブロックAの動きベクトルmv_Aが0ベクトルであれば、図2に示すフローチャートによりP_Skipベクトルmv_skipは0ベクトルとなる。   At this time, the motion vectors of the upper adjacent block B and the upper right adjacent block C of the MB (core 2) processed by the core unit 2 are mv_B and mv_C. Here, if the motion vector mv_A of the left adjacent block A of the core 2 is a 0 vector, the P_Skip vector mv_skip is a 0 vector according to the flowchart shown in FIG.

しかし、隣接ブロックAの動きベクトルmv_Aが0ベクトルでないときは、mv_A,mv_B,mv_Cのmedianによりmv_skipが計算される。このとき、図5に示すように、mv_B,mv_Cがともに下方向に大きなベクトルの場合、mv_skipはmedian値をとるため、mv_skipも下方向に大きなベクトルとなる。   However, when the motion vector mv_A of the adjacent block A is not a 0 vector, mv_skip is calculated by the median of mv_A, mv_B, and mv_C. At this time, as shown in FIG. 5, when both mv_B and mv_C are large vectors in the downward direction, mv_skip has a median value, so mv_skip is also a large vector in the downward direction.

この場合、コア2に対するmv_skipの位置の参照ブロックは、プリフェッチメモリの保持範囲外になる。よって、コア部2で処理するマクロブロックは、P_Skipの位置の参照ブロックが処理対象マクロブロックとの間で類似度(差分絶対値和)を計算することができない。つまり、MBをP_Skipで符号化してよいかどうかの判定ができなくなり、符号化効率の良いP_Skipが選択されなくなってしまう。   In this case, the reference block at the position of mv_skip for the core 2 is outside the prefetch memory holding range. Therefore, the macro block processed by the core unit 2 cannot calculate the similarity (sum of absolute differences) between the reference block at the position of P_Skip and the processing target macro block. That is, it becomes impossible to determine whether or not the MB can be encoded with P_Skip, and P_Skip with high encoding efficiency is not selected.

そこで、開示の技術は、適切に探索範囲を広げることで符号化効率を向上させることができる動画像符号化装置及び動画像符号化方法を提供することを目的とする。   Therefore, an object of the disclosed technique is to provide a moving picture coding apparatus and a moving picture coding method that can improve coding efficiency by appropriately expanding a search range.

開示の一態様における動画像符号化装置は、ブロックライン毎に並列に動きベクトル検出を行って動画像の符号化を行う動画像符号化装置であって、それぞれの動きベクトル検出で用いられる参照画像の探索範囲を含む領域を記憶する記憶部と、処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、前記記憶部に記憶された領域内の探索範囲を可変にして、該処理対象ブロックの動きベクトル検出を行う複数の動きベクトル検出部と、を備え、前記記憶部は、各動きベクトル検出部で用いられ、処理対象ブロックから水平方向及び垂直方向それぞれに所定画素数を設定した基準の所定領域を示す基準探索範囲を含む領域を記憶し、前記複数の動きベクトル検出部は、前記左隣接ブロックの動きベクトルが、前記基準探索範囲以内の領域を指す場合には、前記記憶部に記憶された領域の垂直成分を最大にした探索範囲に対して動きベクトル検出を行い、前記左隣接ブロックの動きベクトルが、前記基準探索範囲の垂直成分を超える領域を指す場合には、前記処理対象ブロックに対して前記基準探索範囲を用いて動きベクトル検出を行うA moving image encoding device according to an aspect of the disclosure is a moving image encoding device that performs motion vector detection in parallel for each block line and encodes a moving image, and is a reference image used in each motion vector detection A storage unit that stores an area including the search range of the block, and based on a motion vector of a left adjacent block with respect to the processing target block, the search range in the region stored in the storage unit is made variable, and the motion of the processing target block A plurality of motion vector detection units that perform vector detection, and the storage unit is used in each motion vector detection unit, and is a reference predetermined region in which a predetermined number of pixels are set in each of the horizontal direction and the vertical direction from the processing target block A region including a reference search range indicating, the plurality of motion vector detection units, the motion vector of the left adjacent block is the reference search range A motion vector is detected for the search range in which the vertical component of the region stored in the storage unit is maximized, and the motion vector of the left adjacent block is the vertical of the reference search range. When a region exceeding the component is indicated, motion vector detection is performed on the processing target block using the reference search range .

開示の技術によれば、適切に探索範囲を広げることで符号化効率を向上させることができる。   According to the disclosed technique, it is possible to improve the encoding efficiency by appropriately widening the search range.

処理対象ブロックと隣接ブロックとの関係を示す図。The figure which shows the relationship between a process target block and an adjacent block. P_Skipマクロブロックの動きベクトルの算出処理を示すフローチャート。The flowchart which shows the calculation process of the motion vector of a P_Skip macroblock. 通常のP_Skipベクトル算出処理を示すフローチャート。The flowchart which shows a normal P_Skip vector calculation process. 従来技術の動作を説明するための図。The figure for demonstrating operation | movement of a prior art. 探索範囲を広げた場合の問題点を説明するための図。The figure for demonstrating the problem at the time of extending a search range. 実施例における動画像符号化装置の構成の一例を示すブロック図。The block diagram which shows an example of a structure of the moving image encoder in an Example. 各動きベクトル検出部で算出される符号化コストの一例を示す図。The figure which shows an example of the encoding cost calculated in each motion vector detection part. 保持される参照ピクチャの領域の遷移例を示す図。The figure which shows the example of a transition of the area | region of the reference picture hold | maintained. 左隣接ブロックの動きベクトルについて説明するための図。The figure for demonstrating the motion vector of a left adjacent block. P_Skipで候補ベクトルとなる動きベクトルを有する左隣接ブロックの一例を示す図。The figure which shows an example of the left adjacent block which has the motion vector used as a candidate vector by P_Skip. 探索範囲テーブル(その1)の一例を示す図。The figure which shows an example of a search range table (the 1). 探索範囲テーブル(その2)の一例を示す図。The figure which shows an example of a search range table (the 2). 処理対象ブロックが16×16の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial stage search range in case a process target block is 16x16. 処理対象ブロックが16×16の場合の制限された探索範囲の一例を示す図。The figure which shows an example of the search range restricted when a process target block is 16x16. 処理対象ブロックが上16×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is upper 16 * 8. 処理対象ブロックが下16×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is lower 16x8. 処理対象ブロックが下16×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is lower 16x8. 処理対象ブロックが左8×16の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is 8 * 16 left. 処理対象ブロックが左8×16の場合の制限された探索範囲の一例を示す図。The figure which shows an example of the limited search range in case a process target block is 8 * 16 left. 処理対象ブロックが右8×16の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial stage search range in case a process target block is right 8x16. 処理対象ブロックが左上8×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is 8 * 8 on the upper left. 処理対象ブロックが右上8×8の場合の初期探索範囲の一例を示す図The figure which shows an example of the initial search range in case a process target block is upper right 8x8 処理対象ブロックが左下8×8の場合の初期探索範囲の一例を示す図The figure which shows an example of the initial search range in case a process target block is lower left 8x8 処理対象ブロックが左下8×8の場合の制限された探索範囲の一例を示す図。The figure which shows an example of the limited search range in case a process target block is lower left 8x8. 処理対象ブロックが右下8×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is lower right 8x8. 処理対象ブロックが16×16の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial stage search range in case a process target block is 16x16. 処理対象ブロックが16×16の場合の制限された探索範囲の一例を示す図。The figure which shows an example of the search range restricted when a process target block is 16x16. 処理対象ブロックが上16×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is upper 16 * 8. 処理対象ブロックが下16×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is lower 16x8. 処理対象ブロックが下16×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is lower 16x8. 処理対象ブロックが左8×16の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is 8 * 16 left. 処理対象ブロックが左8×16の場合の制限された探索範囲の一例を示す図。The figure which shows an example of the limited search range in case a process target block is 8 * 16 left. 処理対象ブロックが右8×16の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial stage search range in case a process target block is right 8x16. 処理対象ブロックが左上8×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is 8 * 8 on the upper left. 処理対象ブロックが右上8×8の場合の初期探索範囲の一例を示す図The figure which shows an example of the initial search range in case a process target block is upper right 8x8 処理対象ブロックが左下8×8の場合の初期探索範囲の一例を示す図The figure which shows an example of the initial search range in case a process target block is lower left 8x8 処理対象ブロックが左下8×8の場合の制限された探索範囲の一例を示す図。The figure which shows an example of the limited search range in case a process target block is lower left 8x8. 処理対象ブロックが右下8×8の場合の初期探索範囲の一例を示す図。The figure which shows an example of the initial search range in case a process target block is lower right 8x8. 全体制御部における動画像符号化の制御処理の一例を示すフローチャート。The flowchart which shows an example of the control processing of the moving image encoding in a whole control part. 動きベクトル検出処理の一例を示すフローチャート。The flowchart which shows an example of a motion vector detection process. 探索範囲の決定処理(その1)の一例を示すフローチャート。The flowchart which shows an example of the determination process (the 1) of a search range. 探索範囲の決定処理(その2)の一例を示すフローチャート。The flowchart which shows an example of the determination process (the 2) of a search range. 動画像符号化装置のハードウェアの一例を示すブロック図。The block diagram which shows an example of the hardware of a moving image encoder.

以下、添付図面を参照しながら実施例について詳細に説明する。   Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

[実施例]
<構成>
図6は、実施例における動画像符号化装置1の構成の一例を示すブロック図である。実施例における動画像符号化装置1は、動画像符号化部10と、第1記憶部20とを有する。
[Example]
<Configuration>
FIG. 6 is a block diagram illustrating an example of a configuration of the video encoding device 1 in the embodiment. The moving image encoding apparatus 1 in the embodiment includes a moving image encoding unit 10 and a first storage unit 20.

動画像符号化装置1は、例えば、ハードワイヤードロジックにより構成された専用の回路やマッピング情報により回路構成が変更されるFPGA(Field Programmable Gate Array)などにより実現される。また、動画像符号化装置1は、例えば、プロセッサやDSPおよびメモリなどで構成されるコンピュータを、インストールしたプログラムで動作させることにより実現される。   The moving image encoding apparatus 1 is realized by, for example, a dedicated circuit configured by hard-wired logic or an FPGA (Field Programmable Gate Array) whose circuit configuration is changed by mapping information. In addition, the moving image encoding apparatus 1 is realized by operating a computer including a processor, a DSP, a memory, and the like with an installed program, for example.

動画像符号化部10は、例えばLSI(Large Scale Integration)により実現され、第1記憶部20は、外部メモリとしてのSDRAMとして実現されうる。   The moving image encoding unit 10 is realized by, for example, LSI (Large Scale Integration), and the first storage unit 20 can be realized as an SDRAM as an external memory.

図6に示す動画像符号化部10は、符号化規格に準拠した符号化を行う。動画像符号化部10は、例えば、H.264エンコーダである。実施例に適用できる符号化規格は、H.264以外にも、P_Skipのモードと同様の処理を含む符号化規格であればよい。   The moving image encoding unit 10 illustrated in FIG. 6 performs encoding conforming to the encoding standard. The moving image encoding unit 10 is, for example, H.264. H.264 encoder. An encoding standard applicable to the embodiment is H.264. In addition to H.264, any encoding standard including processing similar to the P_Skip mode may be used.

第1記憶部20は、例えばカメラで撮像された符号化処理対象の画像、動きベクトル検出で使用する参照ピクチャ、符号化処理が完了して得られた符号化データなどを蓄積保存する。   The first storage unit 20 accumulates and stores, for example, an image to be encoded captured by a camera, a reference picture used for motion vector detection, encoded data obtained after the encoding process is completed, and the like.

次に、動画像符号化部10について詳細に説明する。動画像符号化部10は、全体制御部100と、第2記憶部200と、第1動きベクトル検出部300と、第2動きベクトル検出部400と、第1符号化部500と、第2符号化部600とを有する。   Next, the moving image encoding unit 10 will be described in detail. The moving image encoding unit 10 includes an overall control unit 100, a second storage unit 200, a first motion vector detection unit 300, a second motion vector detection unit 400, a first encoding unit 500, and a second code. And a conversion unit 600.

全体制御部100は、第2記憶部200と、第1動きベクトル検出部300と、第2動きベクトル検出部400とを制御する。例えば、全体制御部100は、第1動きベクトル検出部300と、第2動きベクトル検出部400とを同時に2つのマクロブロック(MB)の動きベクトルを並列に検出するよう制御する。   The overall control unit 100 controls the second storage unit 200, the first motion vector detection unit 300, and the second motion vector detection unit 400. For example, the overall control unit 100 controls the first motion vector detection unit 300 and the second motion vector detection unit 400 to simultaneously detect the motion vectors of two macroblocks (MB) in parallel.

第2記憶部200は、第1動きベクトル検出部300と、第2動きベクトル検出部400とで用いられる参照ピクチャの探索範囲を含む領域を記憶する。例えば、第2記憶部200は、図4や図5に示す保持領域ar11を記憶し、MBの処理が進む度に、保持する領域の破棄と更新を繰り返す。   The second storage unit 200 stores a region including a reference picture search range used by the first motion vector detection unit 300 and the second motion vector detection unit 400. For example, the second storage unit 200 stores the holding area ar11 illustrated in FIG. 4 and FIG. 5 and repeats discarding and updating of the holding area each time MB processing proceeds.

第2記憶部200は、例えばプリフェッチRAMなどである。第2記憶部200に記憶された参照ピクチャの領域は、第1動きベクトル検出部300や第2動きベクトル検出部400により読み出される。   The second storage unit 200 is, for example, a prefetch RAM. The area of the reference picture stored in the second storage unit 200 is read by the first motion vector detection unit 300 and the second motion vector detection unit 400.

第1動きベクトル検出部300及び第2動きベクトル検出部400は、処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、第2記憶部200に記憶された領域内の探索範囲を可変にして、処理対象ブロックの動きベクトル検出を行う。処理対象ブロックは、例えば処理対象のマクロブロックやサブマクロブロックである。   The first motion vector detection unit 300 and the second motion vector detection unit 400 change the search range in the region stored in the second storage unit 200 based on the motion vector of the left adjacent block with respect to the processing target block, The motion vector of the processing target block is detected. The processing target block is, for example, a processing target macro block or a sub macro block.

以下では、第1動きベクトル検出部300の構成について説明するが、第2動きベクトル検出部400は、第1動きベクトル検出部300と同様の構成を有する。   Hereinafter, the configuration of the first motion vector detection unit 300 will be described, but the second motion vector detection unit 400 has the same configuration as the first motion vector detection unit 300.

第1動きベクトル検出部300は、制御部301と、隣接ブロックベクトル保存メモリ302と、差分絶対値和計算部303と、原画メモリ304と、比較部305と、結果保存メモリ306と、判定部307とを有する。   The first motion vector detection unit 300 includes a control unit 301, an adjacent block vector storage memory 302, a difference absolute value sum calculation unit 303, an original picture memory 304, a comparison unit 305, a result storage memory 306, and a determination unit 307. And have.

制御部301は、全体制御部100から信号を受け取り、第1動きベクトル検出部300全体の制御を行う。また、制御部301は、評価対象の動きベクトルのベクトルコストを計算し、比較部305に通知する。   The control unit 301 receives a signal from the overall control unit 100 and controls the first motion vector detection unit 300 as a whole. In addition, the control unit 301 calculates the vector cost of the motion vector to be evaluated, and notifies the comparison unit 305 of the vector cost.

制御部301は、処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、処理対象ブロックの探索範囲を決定し、差分絶対値和計算部303に通知する。また、制御部301は、さらに処理対象ブロックのブロックサイズや位置に基づいて、探索範囲を決定してもよい。探索範囲の決定方法については後述する。   The control unit 301 determines the search range of the processing target block based on the motion vector of the left adjacent block with respect to the processing target block, and notifies the difference absolute value sum calculation unit 303 of it. In addition, the control unit 301 may determine the search range based on the block size and position of the processing target block. A method for determining the search range will be described later.

隣接ブロックベクトル保存メモリ302は、後述する判定部307が出力するmb_type及び動きベクトルに基づき、後に動きベクトル検出を行うMBの隣接ブロックとしての動きベクトルと参照フレーム番号とを保存する。   The adjacent block vector storage memory 302 stores a motion vector and a reference frame number as an adjacent block of an MB for which motion vector detection will be performed later based on mb_type and a motion vector output from the determination unit 307 described later.

差分絶対値和計算部303は、原画メモリ304と、第2記憶部200とからそれぞれ処理対象MBのデータと、参照ブロックのデータとを取得し、差分絶対値和の計算を行う。差分絶対値和計算部303は、制御部301から通知された探索範囲の参照ブロックを第2記憶部200から取得する。   The difference absolute value sum calculation unit 303 obtains the data of the processing target MB and the data of the reference block from the original image memory 304 and the second storage unit 200, respectively, and calculates the difference absolute value sum. The difference absolute value sum calculation unit 303 acquires the reference block of the search range notified from the control unit 301 from the second storage unit 200.

比較部305は、差分絶対値和計算部303から取得した差分絶対値和と、制御部301から取得したベクトルコストとを加算した値と、結果保存メモリ306に保存されている最小コストとを比較する。   The comparison unit 305 compares the value obtained by adding the difference absolute value sum acquired from the difference absolute value sum calculation unit 303 and the vector cost acquired from the control unit 301 with the minimum cost stored in the result storage memory 306. To do.

比較部305は、加算された「差分絶対値和+ベクトルコスト(総コスト)」の方が小さいと判定した場合は、結果保存メモリ306に記憶された内容を、加算された「差分絶対値和+ベクトルコスト」で上書きする。これにより、1つの処理対象ブロックに対して、最小となる「差分絶対値和+ベクトルコスト」が結果保存メモリ306に記憶される。   When the comparison unit 305 determines that the added “difference absolute value sum + vector cost (total cost)” is smaller, the content stored in the result storage memory 306 is added to the added “difference absolute value sum”. Overwrite with “+ vector cost”. As a result, the minimum “sum of absolute values + vector cost” is stored in the result storage memory 306 for one processing target block.

結果保存メモリ306は、比較部305から出力される「差分絶対値和+ベクトルコスト」を処理対象ブロック毎に記憶する。   The result storage memory 306 stores “difference absolute value sum + vector cost” output from the comparison unit 305 for each processing target block.

判定部307は、結果保存メモリ306に記憶された内容を読み出し、合計コストが小さいモードをmb_typeとして選択し、mb_typeとmb_typeに対応する動きベクトルとを第1符号化部500に出力する。   The determination unit 307 reads the content stored in the result storage memory 306, selects a mode with a small total cost as mb_type, and outputs a motion vector corresponding to mb_type and mb_type to the first encoding unit 500.

第1動きベクトル検出部300と第2動きベクトル検出部400とは、お互いに他方の動きベクトル検出部のmb_typeと動きベクトルを取得し、自身の隣接ブロックベクトル保存メモリに格納する。   The first motion vector detection unit 300 and the second motion vector detection unit 400 obtain the mb_type and motion vector of the other motion vector detection unit from each other, and store them in their adjacent block vector storage memory.

第2動きベクトル検出部400は、上記と同様の処理を行い、mb_typeとmb_typeに対応する動きベクトルとを第2符号化部600に出力する。   Second motion vector detection section 400 performs the same processing as described above, and outputs mb_type and a motion vector corresponding to mb_type to second encoding section 600.

第1符号化部500又は第2符号化部600は、対応する動きベクトル検出部から取得したmb_typeと動きベクトルとに基づいて、処理対象MBを符号化し、符号化データであるビットストリームを生成する。   The first encoding unit 500 or the second encoding unit 600 encodes the processing target MB based on the mb_type and the motion vector acquired from the corresponding motion vector detection unit, and generates a bit stream that is encoded data. .

また、第1符号化部500又は第2符号化部600は、生成したビットストリームを第1記憶部20に書き込む。このとき、第1符号化部500又は第2符号化部600は、動きベクトルで指定される参照ブロックを第2記憶部200から読み出して用いる。また、第1符号化部500又は第2符号化部600は、次以降に処理するピクチャの参照ピクチャとして使用するため、再構成画像を第1記憶部20に書き出す。再構成画像は、ローカルデコード画像などとも呼ばれる。   Further, the first encoding unit 500 or the second encoding unit 600 writes the generated bit stream in the first storage unit 20. At this time, the first encoding unit 500 or the second encoding unit 600 reads the reference block specified by the motion vector from the second storage unit 200 and uses it. Also, the first encoding unit 500 or the second encoding unit 600 writes the reconstructed image to the first storage unit 20 in order to use it as a reference picture for pictures to be processed after the next. The reconstructed image is also called a local decoded image.

(符号化コスト)
図7は、各動きベクトル検出部で算出される符号化コストの一例を示す図である。図7に示す例では、処理対象ブロックは、16×16、16×8、8×16、8×8のマクロブロック、又はP_Skipがある。なお、処理対象ブロックは、4×4まで分割されたサブブロックを用いるようにしてもよい。以下では、8×8を最小のブロックサイズとして説明する。
(Encoding cost)
FIG. 7 is a diagram illustrating an example of the coding cost calculated by each motion vector detection unit. In the example illustrated in FIG. 7, the processing target blocks include 16 × 16, 16 × 8, 8 × 16, and 8 × 8 macroblocks or P_Skip. The processing target block may be a sub-block divided up to 4 × 4. Below, 8x8 is demonstrated as the minimum block size.

差分絶対値和計算部303で、各ブロックサイズでの差分絶対値和が計算され、制御部301で、各ブロックサイズでの動きベクトルコストが計算される。判定部307では、各ブロックサイズで符号化コスト(総コスト)が最小となるブロックサイズを示すmb_typeやその動きベクトルが出力される。   The difference absolute value sum calculation unit 303 calculates the difference absolute value sum for each block size, and the control unit 301 calculates the motion vector cost for each block size. The determination unit 307 outputs mb_type indicating the block size that minimizes the coding cost (total cost) at each block size and its motion vector.

(第2記憶部に保持される領域の遷移)
次に、第2記憶部200に記憶される参照ピクチャの領域が、1MB処理する毎にどのように遷移するかについて説明する。図8は、保持される参照ピクチャの領域の遷移例を示す図である。図8に示す例では、例えば動きベクトル検出を、水平方向±32、垂直方向±16画素の領域に対して行うとする。
(Transition of the area held in the second storage unit)
Next, how the reference picture area stored in the second storage unit 200 changes each time 1 MB processing is described. FIG. 8 is a diagram illustrating a transition example of the area of the reference picture to be held. In the example shown in FIG. 8, for example, it is assumed that motion vector detection is performed on regions of ± 32 pixels in the horizontal direction and ± 16 pixels in the vertical direction.

この水平方向±32、垂直方向±16を、ここでは基準探索範囲と呼ぶ。また、基準探索範囲は、第2記憶部に記憶される領域内で、処理対象ブロックから水平方向、及び垂直方向に対称に範囲を広げていった場合の限界範囲をいう。   Here, the horizontal direction ± 32 and the vertical direction ± 16 are referred to as a reference search range. The reference search range is a limit range when the range is expanded symmetrically in the horizontal direction and the vertical direction from the processing target block within the area stored in the second storage unit.

図8の(1)に示す領域ar101は、初期読込み領域を示す。領域ar101は、水平方向48(16+32)画素、垂直方向32(16+16)画素の矩形領域である。ブロックb101は、例えば第2動きベクトル検出部400(コア部2)により処理される16×16のマクロブロックを示す。ブロックb101の動きベクトル検出が終了すると、第2記憶部200に記憶される参照ピクチャの領域が更新される。   An area ar101 shown in (1) of FIG. 8 indicates an initial reading area. The area ar101 is a rectangular area having 48 (16 + 32) pixels in the horizontal direction and 32 (16 + 16) pixels in the vertical direction. A block b101 indicates a 16 × 16 macroblock processed by the second motion vector detection unit 400 (core unit 2), for example. When the motion vector detection of the block b101 is completed, the reference picture area stored in the second storage unit 200 is updated.

図8の(2)に示す領域ar102は、ブロックb101の処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。第2動きベクトル検出部400は、ブロックを1つ右に移動させ、ブロックb102に対し、動きベクトル検出を行う。   An area ar102 illustrated in (2) of FIG. 8 indicates an area that is read from the first storage unit 20 when the processing of the block b101 ends and the area of the reference picture is updated. The second motion vector detection unit 400 moves the block to the right by one and performs motion vector detection for the block b102.

図8の(3)に示す領域ar103は、ブロックb102の処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。第2動きベクトル検出部400は、ブロックを1つ右に移動させ、ブロックb103に対し、動きベクトル検出を行う。   An area ar103 illustrated in (3) of FIG. 8 indicates an area that is read from the first storage unit 20 when the processing of the block b102 ends and the area of the reference picture is updated. The second motion vector detection unit 400 moves the block to the right by one and performs motion vector detection for the block b103.

また、図8の(3)に示すブロックb151は、例えば第1動きベクトル検出部300(コア部1)により処理される16×16のマクロブロックを示す。   A block b151 illustrated in (3) of FIG. 8 represents a 16 × 16 macroblock processed by the first motion vector detection unit 300 (core unit 1), for example.

図8の(4)に示す領域ar104は、ブロックb103の処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。第2動きベクトル検出部400は、ブロックを1つ右に移動させ、ブロックb104に対し、動きベクトル検出を行う。第1動きベクトル検出部300は、ブロックを1つ右に移動させ、ブロックb152に対し、動きベクトル検出を行う。   An area ar104 illustrated in (4) of FIG. 8 indicates an area read from the first storage unit 20 when the processing of the block b103 is completed and the area of the reference picture is updated. The second motion vector detection unit 400 moves the block to the right by one and performs motion vector detection for the block b104. The first motion vector detection unit 300 moves the block to the right by one and performs motion vector detection for the block b152.

図8の(5)に示す領域ar105は、ブロックb104の処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。第2動きベクトル検出部400は、ブロックを1つ右に移動させ、ブロックb105に対し、動きベクトル検出を行う。第1動きベクトル検出部300は、ブロックを1つ右に移動させ、ブロックb153に対し、動きベクトル検出を行う。   An area ar105 illustrated in (5) of FIG. 8 indicates an area that is read from the first storage unit 20 when the processing of the block b104 is completed and the area of the reference picture is updated. The second motion vector detection unit 400 moves the block to the right by one and performs motion vector detection for the block b105. The first motion vector detection unit 300 moves a block to the right and performs motion vector detection on the block b153.

図8の(6)に示す領域ar106は、ブロックb105の処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。図8の(6)に示す領域ar151は、第2記憶部200に記憶された領域から領域ar106を更新する時に不要な領域として削除(破棄)される領域を示す。   An area ar106 illustrated in (6) of FIG. 8 indicates an area that is read from the first storage unit 20 when the processing of the block b105 is completed and the area of the reference picture is updated. An area ar151 illustrated in (6) of FIG. 8 indicates an area that is deleted (discarded) as an unnecessary area when the area ar106 is updated from the area stored in the second storage unit 200.

第2動きベクトル検出部400は、ブロックを1つ右に移動させ、ブロックb106に対し、動きベクトル検出を行う。第1動きベクトル検出部300は、ブロックを1つ右に移動させ、ブロックb154に対し、動きベクトル検出を行う。   The second motion vector detection unit 400 moves the block to the right by one and performs motion vector detection for the block b106. The first motion vector detection unit 300 moves a block to the right and performs motion vector detection on the block b154.

図8の(7)に示す領域ar107は、ブロックb107の1つ左のブロックの処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。図8の(7)に示す領域ar152は、第2記憶部200に記憶された領域から領域ar107を更新する時に不要な領域として削除(破棄)される領域を示す。   An area ar107 illustrated in (7) of FIG. 8 indicates an area that is read from the first storage unit 20 when the processing of the block to the left of the block b107 is completed and the reference picture area is updated. An area ar152 illustrated in (7) of FIG. 8 indicates an area that is deleted (discarded) as an unnecessary area when the area ar107 is updated from the area stored in the second storage unit 200.

第2動きベクトル検出部400は、ブロックを1つ右に移動させ、ブロックb107に対し、動きベクトル検出を行う。第1動きベクトル検出部300は、ブロックを1つ右に移動させ、ブロックb155に対し、動きベクトル検出を行う。   The second motion vector detection unit 400 moves the block to the right by one and performs motion vector detection for the block b107. The first motion vector detection unit 300 moves the block to the right by one and performs motion vector detection for the block b155.

図8の(8)に示す領域ar108は、ブロックb107の処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。図8の(8)に示す領域ar153は、第2記憶部200に記憶された領域から領域ar108を更新する時に不要な領域として削除(破棄)される領域を示す。   An area ar108 illustrated in (8) of FIG. 8 indicates an area that is read from the first storage unit 20 when the processing of the block b107 is completed and the area of the reference picture is updated. An area ar153 illustrated in (8) of FIG. 8 indicates an area that is deleted (discarded) as an unnecessary area when the area ar108 is updated from the area stored in the second storage unit 200.

第2動きベクトル検出部400は、ブロックを1つ右に移動させ、ブロックb108に対し、動きベクトル検出を行う。第1動きベクトル検出部300は、ブロックを1つ右に移動させ、ブロックb156に対し、動きベクトル検出を行う。   The second motion vector detection unit 400 moves the block to the right by one and performs motion vector detection for the block b108. The first motion vector detection unit 300 moves the block to the right by one and performs motion vector detection for the block b156.

図8の(9)に示す領域ar109は、ブロックb108の処理が終わり、参照ピクチャの領域が更新されるときに、第1記憶部20から読み込まれる領域を示す。図8の(9)に示す領域ar154は、第2記憶部200に記憶された領域から領域ar109を更新する時に不要な領域として削除(破棄)される領域を示す。   An area ar109 illustrated in (9) of FIG. 8 indicates an area that is read from the first storage unit 20 when the processing of the block b108 ends and the area of the reference picture is updated. An area ar154 illustrated in (9) of FIG. 8 indicates an area that is deleted (discarded) as an unnecessary area when the area ar109 is updated from the area stored in the second storage unit 200.

第2動きベクトル検出部400は、処理ブロックを、ブロックライン2つ下の左端に移動させ、ブロックb109に対し、動きベクトル検出を行う。第1動きベクトル検出部300は、ブロックを1つ右に移動させ、ブロックb157に対し、動きベクトル検出を行う。   The second motion vector detection unit 400 moves the processing block to the left end two blocks below, and performs motion vector detection on the block b109. The first motion vector detection unit 300 moves the block to the right by one and performs motion vector detection for the block b157.

以上の処理を繰り返すことで、第2記憶部200に記憶される参照ピクチャの領域が遷移する。実施例における各動きベクトル検出部は、第2記憶部200に記憶される参照ピクチャの領域からできるだけ広い探索範囲を決定し、動きベクトルの検出を行う。このとき、各動きベクトル検出部は、P_Skipの発生確率を下げることなく、探索範囲を決定する。   By repeating the above processing, the area of the reference picture stored in the second storage unit 200 changes. Each motion vector detection unit in the embodiment determines a search range as wide as possible from the reference picture area stored in the second storage unit 200 and detects a motion vector. At this time, each motion vector detection unit determines the search range without reducing the probability of occurrence of P_Skip.

<探索範囲の決定>
次に、探索範囲の決定処理について説明する。まず、処理対象ブロックの探索範囲を決定するのに用いられる、左隣接ブロックの動きベクトルについて説明する。
<Determination of search range>
Next, search range determination processing will be described. First, the motion vector of the left adjacent block used for determining the search range of the processing target block will be described.

図9は、左隣接ブロックの動きベクトルについて説明するための図である。図9に示すブロックb201は、最大サイズの処理対象ブロックであり、ブロックb202は、符号化済みの左隣接ブロックである。最大サイズの処理対象ブロックは、例えば16×16のマクロブロックである。   FIG. 9 is a diagram for explaining the motion vector of the left adjacent block. A block b201 shown in FIG. 9 is a processing block of the maximum size, and a block b202 is an encoded left adjacent block. The maximum size processing target block is, for example, a 16 × 16 macroblock.

図9に示すように、処理対象ブロックに対する左隣接ブロックは、最大サイズの処理対象ブロックの左に隣接する最大サイズのブロックのうち、左下画素を含むブロックである。図9に示す例では、左隣接ブロックb202の左下画素を含むブロックの動きベクトルが、1つ下のブロックラインの処理時に、H.264のP_Skipで用いられる隣接ブロックの候補ベクトルとなる。候補ベクトルとは、P_Skipのmedian処理の対象となる動きベクトルをいう。   As illustrated in FIG. 9, the left adjacent block for the processing target block is a block including the lower left pixel among the maximum size blocks adjacent to the left of the maximum size processing target block. In the example shown in FIG. 9, when the motion vector of the block including the lower left pixel of the left adjacent block b202 is processed in the next lower block line, H.264 is processed. This is a candidate vector of an adjacent block used in H.264 P_Skip. A candidate vector refers to a motion vector that is a target of media processing of P_Skip.

図10は、P_Skipで候補ベクトルとなる動きベクトルを有する左隣接ブロックの一例を示す図である。図10(A)に示す例では、左隣接ブロックのmb_typeが16×16の場合、16×16のブロックb301の動きベクトルが、1つ下のブロックラインの処理時のP_Skipで候補ベクトルとして用いられる。   FIG. 10 is a diagram illustrating an example of a left adjacent block having a motion vector that is a candidate vector in P_Skip. In the example shown in FIG. 10A, when the mb_type of the left adjacent block is 16 × 16, the motion vector of the 16 × 16 block b301 is used as a candidate vector in P_Skip when processing the next lower block line. .

図10(B)に示す例では、左隣接ブロックのmb_typeが16×8の場合、下16×8のブロックb302の動きベクトルが、1つ下のブロックラインの処理時のP_Skipで候補ベクトルとして用いられる。   In the example shown in FIG. 10B, when the mb_type of the left adjacent block is 16 × 8, the motion vector of the lower 16 × 8 block b302 is used as a candidate vector in P_Skip when processing the next lower block line. It is done.

図10(C)に示す例では、左隣接ブロックのmb_typeが8×16の場合、左8×16のブロックb303の動きベクトルが、1つ下のブロックラインの処理時のP_Skipで候補ベクトルとして用いられる。   In the example shown in FIG. 10C, when the mb_type of the left adjacent block is 8 × 16, the motion vector of the left 8 × 16 block b303 is used as a candidate vector in P_Skip when processing the next lower block line. It is done.

図10(D)に示す例では、左隣接ブロックのmb_typeが8×8の場合、左下8×8のブロックb304の動きベクトルが、1つ下のブロックラインの処理時のP_Skipで候補ベクトルとして用いられる。図10に示すブロックサイズ、位置にあるブロックb301〜b304のブロックを、以降では候補ブロックとも呼ぶ。   In the example illustrated in FIG. 10D, when the mb_type of the left adjacent block is 8 × 8, the motion vector of the lower left 8 × 8 block b304 is used as a candidate vector in P_Skip when processing the next lower block line. It is done. The blocks b301 to b304 located at the block size and position shown in FIG. 10 are hereinafter also referred to as candidate blocks.

図10に示すように、1つ下のブロックラインの処理時に、上の隣接ブロックとしてP_Skipの候補ブロックにならない上16×8、右8×16、左上8×8、右上8×8、右下8×8のブロックについては、探索範囲を基準探索範囲よりも広げてもよい。これらのブロックを、以降では、非候補ブロックとも呼ぶ。   As shown in FIG. 10, upper 16 × 8, right 8 × 16, upper left 8 × 8, upper right 8 × 8, lower right, which do not become P_Skip candidate blocks as upper adjacent blocks when processing the next lower block line For an 8 × 8 block, the search range may be wider than the reference search range. Hereinafter, these blocks are also referred to as non-candidate blocks.

つまり、処理対象ブロックが、非候補ブロックである場合は、各動きベクトル検出部は、基準探索範囲よりも広い範囲で動きベクトル検出を行う。基準探索範囲よりも広い範囲とは、例えば、第2記憶部200に記憶された領域の垂直成分を最大にした探索範囲である。   That is, when the processing target block is a non-candidate block, each motion vector detection unit performs motion vector detection in a range wider than the reference search range. The range wider than the reference search range is, for example, a search range in which the vertical component of the region stored in the second storage unit 200 is maximized.

また、処理対象ブロックが、候補ブロックである場合であっても、左隣の処理済候補ブロックの動きベクトルが、基準探索範囲以内の領域を指す動きベクトルであれば、各動きベクトル検出部は、基準探索範囲よりも広い範囲で動きベクトル検出を行う。   Further, even if the processing target block is a candidate block, if the motion vector of the processed candidate block on the left is a motion vector indicating a region within the reference search range, each motion vector detection unit Motion vector detection is performed in a wider range than the reference search range.

また、処理対象ブロックが、候補ブロックである場合、左隣の処理済候補ブロックの動きベクトルが、基準探索範囲よりも広い範囲内の領域を指す動きベクトルであれば、各動きベクトル検出部は、基準探索範囲内で動きベクトル検出を行う。   Further, when the processing target block is a candidate block, if the motion vector of the processed candidate block on the left is a motion vector indicating a region within a range wider than the reference search range, each motion vector detection unit, Motion vector detection is performed within the reference search range.

なぜなら、図5に示すように、水平方向に隣接するブロック同士で基準探索範囲よりも広い範囲内の領域を指す動きベクトルとなった場合、1つ下のブロックラインの処理時に、P_Skipの動きベクトルが第2記憶部200に記憶された領域外を指すことになるからである。   This is because, as shown in FIG. 5, when a motion vector indicating an area within a range wider than the reference search range is obtained between blocks adjacent in the horizontal direction, the motion vector of P_Skip is processed during processing of the next lower block line. This is because it indicates the outside of the area stored in the second storage unit 200.

そこで、水平方向で連続して大きい動きベクトルが求められないように、大きい動きベクトルが求められた場合には、次のブロックの探索範囲を基準探索範囲に制限する。これにより、P_Skipの動きベクトルが指す位置の参照ブロックが、第2記憶部200に記憶された領域内であることを保証することができる。なお、大きい動きベクトルとは、基準探索範囲よりも広い範囲内の参照ブロックを指す動きベクトルをいう。   Therefore, when a large motion vector is obtained so that a large motion vector is not continuously obtained in the horizontal direction, the search range of the next block is limited to the reference search range. Accordingly, it can be ensured that the reference block at the position indicated by the motion vector of P_Skip is within the area stored in the second storage unit 200. A large motion vector refers to a motion vector indicating a reference block within a range wider than the standard search range.

また、各動きベクトル検出部は、処理対象ブロックのブロックサイズや位置によらず、水平方向のブロックで連続して大きい動きベクトルが求められないように処理してもよい。この処理だけでも、P_Skipの発生確率を低下させずに探索範囲を広げることで符号化効率を向上させることができる。   Further, each motion vector detection unit may perform processing so that a large motion vector is not continuously obtained in a horizontal block regardless of the block size and position of the processing target block. Even with this processing alone, it is possible to improve the coding efficiency by expanding the search range without reducing the probability of occurrence of P_Skip.

(探索範囲テーブル)
次に、各動きベクトル検出部で決定される初期の探索範囲について説明する。図11は、探索範囲テーブル(その1)の一例を示す図である。図11に示す探索範囲テーブルは、例えば偶数行のマクロブロックを処理する第1動きベクトル検出部300が用いる探索範囲テーブルである。
(Search range table)
Next, an initial search range determined by each motion vector detection unit will be described. FIG. 11 is a diagram illustrating an example of the search range table (part 1). The search range table illustrated in FIG. 11 is a search range table used by the first motion vector detection unit 300 that processes even-numbered macroblocks, for example.

この探索範囲テーブルは、例えば制御部301により保持される。制御部301は、全体制御部100から処理対象ブロックのブロックサイズと位置とを通知されたときに、探索範囲テーブルを用いて初期の探索範囲を決定し、差分絶対値和計算部303に通知する。   This search range table is held by the control unit 301, for example. When notified by the overall control unit 100 of the block size and position of the processing target block, the control unit 301 determines an initial search range using the search range table and notifies the difference absolute value sum calculation unit 303 of the initial search range. .

初期の探索範囲と呼ぶ理由は、左隣接ブロックの動きベクトルが大きい動きベクトルであった場合、探索範囲が制限され、探索範囲が変わるからである。   The reason for calling the initial search range is that when the motion vector of the left adjacent block is a large motion vector, the search range is limited and the search range changes.

図12は、探索範囲テーブル(その2)の一例を示す図である。図12に示す探索範囲テーブルは、例えば奇数行のマクロブロックを処理する第2動きベクトル検出部400が用いる探索範囲テーブルである。この探索範囲テーブルは、例えば第2動きベクトル検出部400の制御部により保持される。初期の探索範囲の決定については、第1動きベクトル検出部300の処理と同様である。   FIG. 12 is a diagram illustrating an example of the search range table (part 2). The search range table shown in FIG. 12 is a search range table used by the second motion vector detection unit 400 that processes, for example, odd-numbered macroblocks. This search range table is held by the control unit of the second motion vector detection unit 400, for example. The determination of the initial search range is the same as the processing of the first motion vector detection unit 300.

なお、図11、12に示す例は、基準探索範囲を、水平±32、垂直±16とした場合の例である。   The examples shown in FIGS. 11 and 12 are examples in which the reference search range is horizontal ± 32 and vertical ± 16.

(探索範囲の具体例)
次に、各動きベクトル検出部で決定される探索範囲の具体例について説明する。まず、第1動きベクトル検出部300により決定される探索範囲について説明する。なお、以降の図面において、水平、垂直ともピクチャ外にある矢印の矢印方向を+とする。
(Specific example of search range)
Next, a specific example of the search range determined by each motion vector detection unit will be described. First, the search range determined by the first motion vector detection unit 300 will be described. In the following drawings, the direction of the arrow outside the picture in both horizontal and vertical directions is +.

図13Aは、処理対象ブロックが16×16の場合の初期探索範囲の一例を示す図である。図13Aに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平±32、垂直+32、−16を初期の探索範囲と決定する。   FIG. 13A is a diagram illustrating an example of an initial search range when the processing target block is 16 × 16. As illustrated in FIG. 13A, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal ± 32, vertical +32, and −16 as initial search ranges.

図13Bは、処理対象ブロックが16×16の場合の制限された探索範囲の一例を示す図である。図13Bに示すように、制御部301は、左隣の候補ブロック(図10参照)の動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。これは、1つ下のブロックラインの処理時(コア部2による処理時)にP_Skipの動きベクトルが、第2記憶部200に記憶された領域内の位置を参照することを保証するためである。   FIG. 13B is a diagram illustrating an example of a limited search range when the processing target block is 16 × 16. As illustrated in FIG. 13B, when the motion vector of the candidate block on the left (see FIG. 10) is a large motion vector, the control unit 301 limits the search range to the reference search range (horizontal ± 32, vertical ± 16). To do. This is to ensure that the motion vector of P_Skip refers to the position in the area stored in the second storage unit 200 when processing the next lower block line (when processing by the core unit 2). .

図14Aは、処理対象ブロックが上16×8の場合の初期探索範囲の一例を示す図である。図14Aに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平±32、垂直+40、−16を初期の探索範囲と決定する。なお、上16×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 14A is a diagram illustrating an example of an initial search range when the processing target block is the upper 16 × 8. As illustrated in FIG. 14A, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal ± 32, vertical +40, and −16 as initial search ranges. Since the upper 16 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

図14Bは、処理対象ブロックが下16×8の場合の初期探索範囲の一例を示す図である。図14Bに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平±32、垂直+32、−24を初期の探索範囲と決定する。   FIG. 14B is a diagram illustrating an example of an initial search range when the processing target block is lower 16 × 8. As illustrated in FIG. 14B, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal ± 32, vertical +32, and −24 as initial search ranges.

図14Cは、処理対象ブロックが下16×8の場合の制限された探索範囲の一例を示す図である。図14Cに示すように、制御部301は、左隣の候補ブロックの動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。   FIG. 14C is a diagram illustrating an example of a limited search range when the processing target block is lower 16 × 8. As illustrated in FIG. 14C, when the motion vector of the candidate block on the left is a large motion vector, the control unit 301 restricts the search range to the reference search range (horizontal ± 32, vertical ± 16).

図15Aは、処理対象ブロックが左8×16の場合の初期探索範囲の一例を示す図である。図15Aに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平+40、−32、垂直+32、−16を初期の探索範囲と決定する。   FIG. 15A is a diagram illustrating an example of an initial search range when the processing target block is 8 × 16 left. As illustrated in FIG. 15A, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal +40, −32, vertical +32, and −16 as initial search ranges.

図15Bは、処理対象ブロックが左8×16の場合の制限された探索範囲の一例を示す図である。図15Bに示すように、制御部301は、左隣の候補ブロックの動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。   FIG. 15B is a diagram illustrating an example of a limited search range when the processing target block is 8 × 16 left. As illustrated in FIG. 15B, when the motion vector of the candidate block on the left is a large motion vector, the control unit 301 restricts the search range to the reference search range (horizontal ± 32, vertical ± 16).

図15Cは、処理対象ブロックが右8×16の場合の初期探索範囲の一例を示す図である。図15Cに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平+32、−40、垂直+32、−16を初期の探索範囲と決定する。なお、右8×16のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 15C is a diagram illustrating an example of an initial search range when the processing target block is 8 × 16 on the right. As illustrated in FIG. 15C, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal +32, −40, vertical +32, and −16 as initial search ranges. Since the right 8 × 16 block is a non-candidate block, this initial search range is used for motion vector detection.

図16Aは、処理対象ブロックが左上8×8の場合の初期探索範囲の一例を示す図である。図16Aに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平+40、−32、垂直+40、−16を初期の探索範囲と決定する。なお、左上8×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 16A is a diagram illustrating an example of an initial search range when the processing target block is the upper left 8 × 8. As illustrated in FIG. 16A, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal +40, −32, vertical +40, and −16 as the initial search range. Since the upper left 8 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

図16Bは、処理対象ブロックが右上8×8の場合の初期探索範囲の一例を示す図である。図16Bに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平+32、−40、垂直+40、−16を初期の探索範囲と決定する。なお、右上8×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 16B is a diagram illustrating an example of an initial search range when the processing target block is an upper right 8 × 8. As illustrated in FIG. 16B, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal +32, −40, vertical +40, and −16 as the initial search range. Since the upper right 8 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

図16Cは、処理対象ブロックが左下8×8の場合の初期探索範囲の一例を示す図である。図16Cに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平+40、−32、垂直+32、−24を初期の探索範囲と決定する。   FIG. 16C is a diagram illustrating an example of the initial search range when the processing target block is the lower left 8 × 8. As illustrated in FIG. 16C, using the search range table illustrated in FIG. 11, the control unit 301 determines horizontal +40, −32, vertical +32, and −24 as the initial search range.

図16Dは、処理対象ブロックが左下8×8の場合の制限された探索範囲の一例を示す図である。図16Dに示すように、制御部301は、左隣の候補ブロックの動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。   FIG. 16D is a diagram illustrating an example of a limited search range when the processing target block is the lower left 8 × 8. As illustrated in FIG. 16D, when the motion vector of the candidate block on the left is a large motion vector, the control unit 301 limits the search range to the reference search range (horizontal ± 32, vertical ± 16).

図16Eは、処理対象ブロックが右下8×8の場合の初期探索範囲の一例を示す図である。図16Eに示すように、図11に示す探索範囲テーブルを用いて、制御部301は、水平+32、−40、垂直+32、−24を初期の探索範囲と決定する。なお、右下8×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 16E is a diagram illustrating an example of the initial search range when the processing target block is the lower right 8 × 8. As illustrated in FIG. 16E, the control unit 301 determines horizontal +32, −40, vertical +32, and −24 as initial search ranges using the search range table illustrated in FIG. Since the lower right 8 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

次に、第2動きベクトル検出部400により決定される探索範囲について説明する。図17Aは、処理対象ブロックが16×16の場合の初期探索範囲の一例を示す図である。図17Aに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平±32、垂直+16、−32を初期の探索範囲と決定する。   Next, the search range determined by the second motion vector detection unit 400 will be described. FIG. 17A is a diagram illustrating an example of an initial search range when the processing target block is 16 × 16. As illustrated in FIG. 17A, using the search range table illustrated in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal ± 32, vertical +16, and −32 as initial search ranges.

図17Bは、処理対象ブロックが16×16の場合の制限された探索範囲の一例を示す図である。図17Bに示すように、第2動きベクトル検出部400の制御部は、左隣の候補ブロック(図10参照)の動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。これは、1つ下のブロックラインの処理時(コア部1による処理時)にP_Skipの動きベクトルが、第2記憶部200に記憶された領域内の位置を参照することを保証するためである。   FIG. 17B is a diagram illustrating an example of a limited search range when the processing target block is 16 × 16. As illustrated in FIG. 17B, the control unit of the second motion vector detection unit 400 sets the search range as the reference search range (horizontal ± 32) when the motion vector of the candidate block on the left (see FIG. 10) is a large motion vector. , Vertical ± 16). This is to ensure that the motion vector of P_Skip refers to the position in the area stored in the second storage unit 200 when processing the next lower block line (when processing by the core unit 1). .

図18Aは、処理対象ブロックが上16×8の場合の初期探索範囲の一例を示す図である。図18Aに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平±32、垂直+24、−32を初期の探索範囲と決定する。なお、上16×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 18A is a diagram illustrating an example of the initial search range when the processing target block is the upper 16 × 8. As shown in FIG. 18A, using the search range table shown in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal ± 32, vertical +24, and −32 as initial search ranges. Since the upper 16 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

図18Bは、処理対象ブロックが下16×8の場合の初期探索範囲の一例を示す図である。図18Bに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平±32、垂直+16、−40を初期の探索範囲と決定する。   FIG. 18B is a diagram illustrating an example of an initial search range when the processing target block is lower 16 × 8. As illustrated in FIG. 18B, using the search range table illustrated in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal ± 32, vertical +16, and −40 as the initial search range.

図18Cは、処理対象ブロックが下16×8の場合の制限された探索範囲の一例を示す図である。図18Cに示すように、第2動きベクトル検出部400の制御部は、左隣の候補ブロックの動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。   FIG. 18C is a diagram illustrating an example of a limited search range when the processing target block is lower 16 × 8. As illustrated in FIG. 18C, the control unit of the second motion vector detection unit 400 determines that the search range is the reference search range (horizontal ± 32, vertical ± 16) when the motion vector of the candidate block on the left is a large motion vector. Limit to.

図19Aは、処理対象ブロックが左8×16の場合の初期探索範囲の一例を示す図である。図19Aに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平+40、−32、垂直+16、−32を初期の探索範囲と決定する。   FIG. 19A is a diagram illustrating an example of an initial search range when the processing target block is 8 × 16 left. As illustrated in FIG. 19A, using the search range table illustrated in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal +40, −32, vertical +16, and −32 as initial search ranges.

図19Bは、処理対象ブロックが左8×16の場合の制限された探索範囲の一例を示す図である。図19Bに示すように、第2動きベクトル検出部400の制御部は、左隣の候補ブロックの動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。   FIG. 19B is a diagram illustrating an example of a limited search range when the processing target block is 8 × 16 left. As illustrated in FIG. 19B, the control unit of the second motion vector detection unit 400 determines that the search range is a reference search range (horizontal ± 32, vertical ± 16) when the motion vector of the candidate block on the left is a large motion vector. Limit to.

図19Cは、処理対象ブロックが右8×16の場合の初期探索範囲の一例を示す図である。図19Cに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平+32、−40、垂直+16、−32を初期の探索範囲と決定する。なお、右8×16のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 19C is a diagram illustrating an example of an initial search range when the processing target block is 8 × 16 on the right. As illustrated in FIG. 19C, using the search range table illustrated in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal +32, −40, vertical +16, and −32 as the initial search range. Since the right 8 × 16 block is a non-candidate block, this initial search range is used for motion vector detection.

図20Aは、処理対象ブロックが左上8×8の場合の初期探索範囲の一例を示す図である。図20Aに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平+40、−32、垂直+24、−32を初期の探索範囲と決定する。なお、左上8×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 20A is a diagram illustrating an example of an initial search range when the processing target block is the upper left 8 × 8. As illustrated in FIG. 20A, using the search range table illustrated in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal +40, −32, vertical +24, and −32 as initial search ranges. Since the upper left 8 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

図20Bは、処理対象ブロックが右上8×8の場合の初期探索範囲の一例を示す図である。図20Bに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平+32、−40、垂直+24、−32を初期の探索範囲と決定する。なお、右上8×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 20B is a diagram illustrating an example of an initial search range when the processing target block is 8 × 8 in the upper right. As illustrated in FIG. 20B, using the search range table illustrated in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal +32, −40, vertical +24, and −32 as initial search ranges. Since the upper right 8 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

図20Cは、処理対象ブロックが左下8×8の場合の初期探索範囲の一例を示す図である。図20Cに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平+40、−32、垂直+16、−40を初期の探索範囲と決定する。   FIG. 20C is a diagram illustrating an example of the initial search range when the processing target block is the lower left 8 × 8. As illustrated in FIG. 20C, using the search range table illustrated in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal +40, −32, vertical +16, and −40 as the initial search range.

図20Dは、処理対象ブロックが左下8×8の場合の制限された探索範囲の一例を示す図である。図20Dに示すように、第2動きベクトル検出部400の制御部は、左隣の候補ブロックの動きベクトルが大きい動きベクトルである場合、探索範囲を基準探索範囲(水平±32、垂直±16)に制限する。   FIG. 20D is a diagram illustrating an example of a limited search range when the processing target block is the lower left 8 × 8. As illustrated in FIG. 20D, the control unit of the second motion vector detection unit 400 determines that the search range is the reference search range (horizontal ± 32, vertical ± 16) when the motion vector of the candidate block on the left is a large motion vector. Limit to.

図20Eは、処理対象ブロックが右下8×8の場合の初期探索範囲の一例を示す図である。図20Eに示すように、図12に示す探索範囲テーブルを用いて、第2動きベクトル検出部400の制御部は、水平+32、−40、垂直+16、−40を初期の探索範囲と決定する。なお、右下8×8のブロックは、非候補ブロックであるので、この初期の探索範囲が動きベクトル検出で用いられる。   FIG. 20E is a diagram illustrating an example of the initial search range when the processing target block is the lower right 8 × 8. As shown in FIG. 20E, using the search range table shown in FIG. 12, the control unit of the second motion vector detection unit 400 determines horizontal +32, −40, vertical +16, and −40 as the initial search range. Since the lower right 8 × 8 block is a non-candidate block, this initial search range is used for motion vector detection.

以上より、各動きベクトル検出部は、処理対象ブロックのブロックサイズと位置、及び左隣接ブロックの動きベクトルに基づいて、探索範囲を可変にして動きベクトル検出を行う。なお、各動きベクトル検出部は、処理対象ブロックの左隣接ブロックの動きベクトルのみに基づいて、探索範囲を可変にしてもよい。   As described above, each motion vector detection unit performs motion vector detection by changing the search range based on the block size and position of the processing target block and the motion vector of the left adjacent block. Note that each motion vector detection unit may vary the search range based only on the motion vector of the block adjacent to the left of the processing target block.

<動作>
次に、動画像符号化装置1の動作について説明する。図21は、全体制御部100における動画像符号化の制御処理の一例を示すフローチャートである。図21に示す処理は、1ピクチャに対する処理である。
<Operation>
Next, the operation of the video encoding device 1 will be described. FIG. 21 is a flowchart illustrating an example of a moving image coding control process in the overall control unit 100. The process shown in FIG. 21 is a process for one picture.

図21に示すステップS101で、全体制御部100は、第2記憶部200に対して、初期領域の読み込み指示を行う。処理領域は、例えば図8の(1)に示す領域ar101である。   In step S101 illustrated in FIG. 21, the overall control unit 100 instructs the second storage unit 200 to read an initial area. The processing area is, for example, an area ar101 shown in (1) of FIG.

ステップS102で、全体制御部100は、各動きベクトル検出部に対して、1MBの動きベクトル検出処理の開始を指示する。動きベクトル検出処理については図22を用いて後述する。   In step S102, the overall control unit 100 instructs each motion vector detection unit to start a 1 MB motion vector detection process. The motion vector detection process will be described later with reference to FIG.

ステップS103で、全体制御部100は、各動きベクトル検出部から動きベクトルの検出完了の通知を受けると、未処理のMBが残っていないかを判定する。全てのMBで処理が完了していれば(ステップS103−YES)この処理は終了し、未処理のMBがあれば(ステップS103−NO)ステップS104に進む。   In step S <b> 103, upon receiving notification of completion of motion vector detection from each motion vector detection unit, the overall control unit 100 determines whether or not an unprocessed MB remains. If the process is completed for all MBs (step S103—YES), this process ends. If there is an unprocessed MB (step S103—NO), the process proceeds to step S104.

ステップS104で、全体制御部100は、第2記憶部200に対し、次のMBの動きベクトル検出を行うために、保持されている参照ピクチャの領域の更新を指示する。この更新の例については、図8を参照されたい。ステップS104の処理が終わると、次のMBで動きベクトル検出処理を行うため、ステップS02に進む。   In step S104, the overall control unit 100 instructs the second storage unit 200 to update the area of the held reference picture in order to perform motion vector detection for the next MB. See FIG. 8 for an example of this update. When the process in step S104 is completed, the process proceeds to step S02 in order to perform a motion vector detection process in the next MB.

次に、処理対象ブロックに対する動きベクトル検出処理について説明する。図22は、動きベクトル検出処理の一例を示すフローチャートである。図22に示す例では、第1動きベクトル検出部300が1MBに対して行う処理を説明するが、第2動きベクトル検出部でも同様の処理を行う。   Next, motion vector detection processing for the processing target block will be described. FIG. 22 is a flowchart illustrating an example of a motion vector detection process. In the example illustrated in FIG. 22, the process performed by the first motion vector detection unit 300 for 1 MB is described, but the same process is performed by the second motion vector detection unit.

ステップS201で、制御部301は、処理対象MBにおける処理対象ブロックのブロックサイズ及び位置が異なる処理対象ブロックの選択を行う。例えば、制御部301は、16×16、上16×8、下16×8、左8×16、右8×16、左上8×8、右上8×8、左下8×8、右下8×8の順で選択する。   In step S201, the control unit 301 selects processing target blocks having different block sizes and positions of the processing target blocks in the processing target MB. For example, the control unit 301 has 16 × 16, upper 16 × 8, lower 16 × 8, left 8 × 16, right 8 × 16, upper left 8 × 8, upper right 8 × 8, lower left 8 × 8, lower right 8 ×. Select in order of 8.

ステップS202で、制御部301は、処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、又は左隣接ブロックの動きベクトル、処理対象ブロックのブロックサイズ及び位置に基づいて、探索範囲を決定する。この決定処理は、図23を用いて後述する。   In step S202, the control unit 301 determines a search range based on the motion vector of the left adjacent block with respect to the processing target block, or based on the motion vector of the left adjacent block, the block size and the position of the processing target block. This determination process will be described later with reference to FIG.

ステップS203で、差分絶対値和計算部303は、決定された探索範囲の中で差分絶対値和が最小となる動きベクトルを検出する。比較部305は、より差分絶対値和が小さい動きベクトルが見つかると、結果保存メモリ306に保存し、暫定的な動きベクトルと最小差分絶対値和を上書きしていく。   In step S203, the difference absolute value sum calculation unit 303 detects a motion vector having the minimum difference absolute value sum in the determined search range. When a motion vector having a smaller difference absolute value sum is found, the comparison unit 305 stores the motion vector in the result storage memory 306 and overwrites the temporary motion vector and the minimum difference absolute value sum.

ステップS204で、制御部301は、全ての処理対象ブロックで処理が完了したか否かを判定する。全ての処理対象ブロックで処理が終了すれば(ステップS204−YES)ステップS205に進み、全ての処理対象ブロックで処理が終了していなければ(ステップS204−NO)ステップS201に戻る。   In step S204, the control unit 301 determines whether the processing has been completed for all the processing target blocks. If the processing is completed for all the processing target blocks (step S204—YES), the process proceeds to step S205. If the processing is not completed for all the processing target blocks (step S204—NO), the process returns to step S201.

ステップS205で、差分絶対値和計算部303は、16×16のブロックサイズでP_Skipベクトルの位置での差分絶対値和を計算する。比較部305は、P_Skipベクトルと差分絶対値和とを結果保存メモリ306に書き込む。ステップS205の終了時点で、図7に示すような内容が、結果保存メモリ306に保持される。   In step S205, the difference absolute value sum calculation unit 303 calculates the difference absolute value sum at the position of the P_Skip vector with a block size of 16 × 16. The comparison unit 305 writes the P_Skip vector and the sum of absolute differences in the result storage memory 306. At the end of step S205, the contents as shown in FIG.

ステップS206で、判定部307は、結果保存メモリ306の内容を読み出し、ブロックサイズ16×16,16×8,8×16,8×8,P_Skipに対して総コストを計算し、総コストが最小となるブロックサイズmb_typeを決定する。   In step S206, the determination unit 307 reads the contents of the result storage memory 306, calculates the total cost for the block size 16 × 16, 16 × 8, 8 × 16, 8 × 8, P_Skip, and the total cost is the minimum. The block size mb_type is determined.

ステップS207で、判定部307は、決定したmb_typeとmb_typeに対応する動きベクトルとを、隣接ブロックベクトル保存メモリ302に書き込む。   In step S <b> 207, the determination unit 307 writes the determined mb_type and the motion vector corresponding to the mb_type in the adjacent block vector storage memory 302.

ステップS208で、判定部307は、決定したmb_typeとmb_typeに対応する動きベクトルとを、第1符号化部500と、第2動きベクトル検出部400とに出力する。   In step S208, the determination unit 307 outputs the determined mb_type and the motion vector corresponding to the mb_type to the first encoding unit 500 and the second motion vector detection unit 400.

次に、探索範囲の決定処理について説明する。図23は、探索範囲の決定処理(その1)の一例を示すフローチャートである。図23に示す処理は、第1動きベクトル検出部300において、処理対象ブロック毎に行われる探索範囲の決定処理である。   Next, search range determination processing will be described. FIG. 23 is a flowchart illustrating an example of search range determination processing (part 1). The process illustrated in FIG. 23 is a search range determination process performed for each processing target block in the first motion vector detection unit 300.

ステップS301で、制御部301は、処理対象ブロックのブロックサイズや位置に基づいて図11を参照し、初期の探索範囲を決定する。   In step S301, the control unit 301 determines an initial search range with reference to FIG. 11 based on the block size and position of the processing target block.

ステップS302で、制御部301は、処理対象ブロックが候補ブロックであり、左隣接MBのMVの垂直成分が、基準探索範囲の垂直成分を超えているかを判定する。具体的には、候補ブロックは、例えば16×16、下16×8、左8×16、左下8×8であり、基準探索範囲の垂直成分は、例えば+16である。   In step S302, the control unit 301 determines whether the processing target block is a candidate block and the MV vertical component of the left adjacent MB exceeds the vertical component of the reference search range. Specifically, the candidate blocks are, for example, 16 × 16, lower 16 × 8, left 8 × 16, and lower left 8 × 8, and the vertical component of the reference search range is, for example, +16.

ステップS302の条件を満たせば(ステップS302−YES)ステップS303に進み、この条件を満たさなければ(ステップS302−NO)決定処理が終了する。   If the condition of step S302 is satisfied (step S302—YES), the process proceeds to step S303. If this condition is not satisfied (step S302—NO), the determination process ends.

ステップS303で、制御部301は、決定された初期の探索範囲を、基準探索範囲に変更する。基準探索範囲は、例えば水平±32、垂直±16である。   In step S303, the control unit 301 changes the determined initial search range to the reference search range. The reference search range is, for example, horizontal ± 32 and vertical ± 16.

図24は、探索範囲の決定処理(その2)の一例を示すフローチャートである。図24に示す処理は、第2動きベクトル検出部400において、処理対象ブロック毎に行われる探索範囲の決定処理である。   FIG. 24 is a flowchart illustrating an example of search range determination processing (part 2). The processing illustrated in FIG. 24 is search range determination processing performed for each processing target block in the second motion vector detection unit 400.

ステップS401で、第2動きベクトル検出部400の制御部は、処理対象ブロックのブロックサイズや位置に基づいて図12を参照し、初期の探索範囲を決定する。   In step S401, the control unit of the second motion vector detection unit 400 determines an initial search range with reference to FIG. 12 based on the block size and position of the processing target block.

ステップS402で、第2動きベクトル検出部400の制御部は、処理対象ブロックが候補ブロックであり、左隣接MBのMVの垂直成分が、基準探索範囲の垂直成分を超えているかを判定する。具体的には、候補ブロックは、例えば16×16、下16×8、左8×16、左下8×8であり、基準探索範囲の垂直成分は、例えば+16である。   In step S402, the control unit of the second motion vector detection unit 400 determines whether the processing target block is a candidate block and the vertical component of the MV of the left adjacent MB exceeds the vertical component of the reference search range. Specifically, the candidate blocks are, for example, 16 × 16, lower 16 × 8, left 8 × 16, and lower left 8 × 8, and the vertical component of the reference search range is, for example, +16.

ステップS402の条件を満たせば(ステップS402−YES)ステップS403に進み、この条件を満たさなければ(ステップS402−NO)決定処理が終了する。   If the condition of step S402 is satisfied (step S402-YES), the process proceeds to step S403, and if this condition is not satisfied (step S402-NO), the determination process ends.

ステップS403で、第2動きベクトル検出部400の制御部は、決定された初期の探索範囲を、基準探索範囲に変更する。基準探索範囲は、例えば水平±32、垂直±16である。   In step S403, the control unit of the second motion vector detection unit 400 changes the determined initial search range to the reference search range. The reference search range is, for example, horizontal ± 32 and vertical ± 16.

上記のように、探索範囲を決定することで、全てのMBでP_Skipベクトルが第2記憶部200内の領域を指すことを保証できる。   As described above, by determining the search range, it can be guaranteed that the P_Skip vector points to an area in the second storage unit 200 in all MBs.

以上、実施例によれば、適切に探索範囲を広げることで符号化効率を向上させることができる。また、実施例によれば、P_Skipの発生確率を低下させずに探索範囲を広げることができ、P_SkipのMVが指す領域は、第2記憶部200内にあることを保証することができる。   As described above, according to the embodiment, it is possible to improve the encoding efficiency by appropriately expanding the search range. In addition, according to the embodiment, the search range can be expanded without reducing the occurrence probability of P_Skip, and it can be ensured that the area pointed to by the MV of P_Skip is in the second storage unit 200.

[変形例]
上記実施例では、説明を簡単にするため、2つの動きベクトル検出部を用いて説明したが、3つ以上の動きベクトル検出部であっても、実施例で説明した処理を拡張すれば、実施例同様に探索範囲を可変にすることができる。
[Modification]
In the above embodiment, the description has been made using two motion vector detection units for the sake of simplification. However, even if there are three or more motion vector detection units, if the processing described in the embodiment is extended, the implementation can be performed. As in the example, the search range can be made variable.

また、動画像符号化装置は、動画像符号化部10を表し、第1記憶部20は、動画像符号化部10から外部に存在するということで、外部メモリと表してもよい。つまり、動画像符号化装置とは、動画像符号化部10のLSI部分を表してもよいし、動画像符号化部10と第1記憶部20とを含む装置を表してもよい。   In addition, the moving image coding apparatus represents the moving image coding unit 10, and the first storage unit 20 may be represented as an external memory because it exists outside the moving image coding unit 10. That is, the moving image encoding device may represent an LSI part of the moving image encoding unit 10 or an apparatus including the moving image encoding unit 10 and the first storage unit 20.

図25は、動画像符号化装置2のハードウェアの一例を示すブロック図である。図25に示す例では、上記実施例の処理を動画像符号化プログラムとし、動画像符号化装置2の制御部501で動画像符号化プログラムを読み取らせ、上記実施例の処理を実行させる。   FIG. 25 is a block diagram illustrating an example of hardware of the video encoding device 2. In the example shown in FIG. 25, the processing of the above embodiment is a moving image coding program, and the moving image coding program is read by the control unit 501 of the moving image coding apparatus 2 to execute the processing of the above embodiment.

図25に示す動画像符号化装置2は、制御部701と、主記憶部702と、補助記憶部703と、ドライブ装置704と、ネットワークI/F部706と、入力部707と、表示部708を有する。これら各構成は、バスを介して相互にデータ送受信可能に接続されている。   The moving picture encoding apparatus 2 illustrated in FIG. 25 includes a control unit 701, a main storage unit 702, an auxiliary storage unit 703, a drive device 704, a network I / F unit 706, an input unit 707, and a display unit 708. Have These components are connected to each other via a bus so as to be able to transmit and receive data.

制御部701は、コンピュータの中で、各装置の制御やデータの演算、加工を行うCPUである。また、制御部701は、主記憶部702や補助記憶部703に記憶された動画像符号化プログラムを実行する演算装置であり、入力部707や記憶装置からデータを受け取り、演算、加工した上で、表示部708や記憶装置などに出力する。   The control unit 701 is a CPU that controls each device, calculates data, and processes in a computer. The control unit 701 is an arithmetic device that executes a moving image encoding program stored in the main storage unit 702 or the auxiliary storage unit 703. The control unit 701 receives data from the input unit 707 or the storage device, calculates and processes the data. The data is output to the display unit 708, a storage device, or the like.

主記憶部702は、ROM(Read Only Memory)やRAM(Random Access Memory)などであり、制御部701が実行する基本ソフトウェアであるOSやアプリケーションソフトウェアなどのプログラムやデータを記憶又は一時保存する記憶装置である。   The main storage unit 702 is a ROM (Read Only Memory), a RAM (Random Access Memory), or the like, and a storage device that stores or temporarily stores programs and data such as an OS and application software that are basic software executed by the control unit 701. It is.

実施例における第2記憶部200は、例えばプリフェッチRAMであり、動きベクトル検出部の各メモリは、例えばRAMであり、第1記憶部20は、例えばSDRAMである。   The second storage unit 200 in the embodiment is, for example, a prefetch RAM, each memory of the motion vector detection unit is, for example, a RAM, and the first storage unit 20 is, for example, an SDRAM.

補助記憶部703は、HDD(Hard Disk Drive)などであり、アプリケーションソフトウェアなどに関連するデータを記憶する記憶装置である。   The auxiliary storage unit 703 is an HDD (Hard Disk Drive) or the like, and is a storage device that stores data related to application software or the like.

ドライブ装置704は、記録媒体705、例えばフレキシブルディスクからプログラムを読み出し、記憶装置にインストールする。   The drive device 704 reads the program from the recording medium 705, for example, a flexible disk, and installs it in the storage device.

また、記録媒体705に、所定のプログラムを格納し、この記録媒体705に格納されたプログラムはドライブ装置704を介して動画像符号化装置30にインストールされる。インストールされた所定のプログラムは、動画像符号化装置30により実行可能となる。   In addition, a predetermined program is stored in the recording medium 705, and the program stored in the recording medium 705 is installed in the moving image encoding apparatus 30 via the drive device 704. The installed predetermined program can be executed by the moving image encoding device 30.

ネットワークI/F部706は、有線及び/又は無線回線などのデータ伝送路により構築されたLAN(Local Area Network)、WAN(Wide Area Network)などのネットワークを介して接続された通信機能を有する周辺機器と動画像符号化装置2とのインターフェースである。   The network I / F unit 706 has a communication function connected via a network such as a LAN (Local Area Network) or a WAN (Wide Area Network) constructed by a data transmission path such as a wired and / or wireless line. This is an interface between the device and the moving image encoding apparatus 2.

入力部707は、カーソルキー、数字入力及び各種機能キー等を備えたキーボード、表示部708の表示画面上でキーの選択等を行うためのマウスやスライスパット等を有する。また、入力部707は、ユーザが制御部701に操作指示を与えたり、データを入力したりするためのユーザインターフェースである。   The input unit 707 includes a keyboard having cursor keys, numeric input, various function keys, and the like, and a mouse and a slice pad for performing key selection on the display screen of the display unit 708. The input unit 707 is a user interface for a user to give an operation instruction to the control unit 701 and input data.

表示部708は、CRT(Cathode Ray Tube)やLCD(Liquid Crystal Display)等を含み、制御部701から入力される表示データに応じた表示が行われる。   The display unit 708 includes a CRT (Cathode Ray Tube), an LCD (Liquid Crystal Display), and the like, and performs display according to display data input from the control unit 701.

例えば、全体制御部100や、各動きベクトル検出部、各符号化部は、制御部701やワークメモリとしての主記憶部702などにより実現されうる。   For example, the overall control unit 100, each motion vector detection unit, and each encoding unit can be realized by the control unit 701, the main storage unit 702 as a work memory, or the like.

このように、上記実施例で説明した動画像符号化処理は、コンピュータに実行させるためのプログラムとして実現されてもよい。このプログラムをサーバ等からインストールしてコンピュータに実行させることで、前述した動画像符号化処理を実現することができる。例えば、前述した動きベクトル検出処理は、プログラムとして実現されてもよい。   Thus, the moving image encoding process described in the above embodiment may be realized as a program for causing a computer to execute. By installing this program from a server or the like and causing it to be executed by a computer, the above-described moving image encoding process can be realized. For example, the motion vector detection process described above may be realized as a program.

また、この動画像符号化プログラムを記録媒体705に記録し、このプログラムが記録された記録媒体705をコンピュータや携帯端末に読み取らせて、前述した動画像符号化処理を実現させることも可能である。   It is also possible to record the moving picture coding program on the recording medium 705 and cause the computer or portable terminal to read the recording medium 705 on which the program is recorded, thereby realizing the moving picture coding process described above. .

なお、記録媒体705は、CD−ROM、フレキシブルディスク、光磁気ディスク等の様に情報を光学的,電気的或いは磁気的に記録する記録媒体、ROM、フラッシュメモリ等の様に情報を電気的に記録する半導体メモリ等、様々なタイプの記録媒体を用いることができる。また、前述した実施例で説明した各処理部は、1つ又は複数の処理部を1つ又は複数の集積回路に実装されてもよい。   The recording medium 705 is a recording medium that records information optically, electrically, or magnetically, such as a CD-ROM, a flexible disk, a magneto-optical disk, etc., or information electrically, such as a ROM, flash memory, or the like. Various types of recording media such as a semiconductor memory for recording can be used. In addition, each processing unit described in the above-described embodiments may be implemented by mounting one or more processing units on one or more integrated circuits.

以上、実施例について詳述したが、この実施例に限定されるものではなく、特許請求の範囲に記載された範囲内において、上記実施例や変形例以外にも種々の変形及び変更が可能である。   Although the embodiment has been described in detail above, the present invention is not limited to this embodiment, and various modifications and changes other than the above-described embodiment and modifications can be made within the scope described in the claims. is there.

なお、以上の実施例に関し、さらに以下の付記を開示する。
(付記1)
ブロックライン毎に並列に動きベクトル検出を行って動画像の符号化を行う動画像符号化装置であって、
それぞれの動きベクトル検出で用いられる参照画像の探索範囲を含む領域を記憶する記憶部と、
処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、前記記憶部に記憶された領域内の探索範囲を可変にして、該処理対象ブロックの動きベクトル検出を行う複数の動きベクトル検出部と、
を備える動画像符号化装置。
(付記2)
前記記憶部は、
各動きベクトル検出部で用いられる基準の所定領域を示す基準探索範囲を含む領域を記憶し、
前記複数の動きベクトル検出部は、
前記記憶部に記憶される領域の垂直成分を最大にした探索範囲に対して動きベクトル検出を行い、前記左隣接ブロックの動きベクトルが、前記基準探索範囲の垂直成分を超える領域を指す場合には、前記処理対象ブロックに対して前記基準探索範囲を用いて動きベクトル検出を行う付記1記載の動画像符号化装置。
(付記3)
前記複数の動きベクトル検出部は、
前記処理対象ブロックのサイズ及び位置にさらに基づいて、前記探索範囲を可変にする付記1又は2記載の動画像符号化装置。
(付記4)
前記複数の動きベクトル検出部は、
前記処理対象ブロックが、H.264のP_Skipで用いられる隣接ブロックとなるブロックであれば、前記基準探索範囲に対して動きベクトル検出を行う付記3記載の動画像符号化装置。
(付記5)
各ブロックサイズの処理対象ブロックの符号化処理が完了すると、前記参照画像を記憶する画像記憶部から次の処理対象ブロックで探索範囲となる領域の一部を読出し、前記記憶部に記憶される領域の更新を制御する全体制御部をさらに備える付記1乃至4いずれか一項に記載の動画像符号化装置。
(付記6)
複数の動きベクトル検出部でブロックライン毎に並列に動きベクトル検出を行って、動画像の符号化を行う動画像符号化装置が実行する動画像符号化方法であって、
それぞれの動きベクトル検出で用いられる参照画像の探索範囲を含む領域を記憶部に記憶し、
各動きベクトル検出部で、処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、前記記憶部に記憶された領域内の探索範囲を可変にして、該処理対象ブロックの動きベクトル検出を行う処理を有する動画像符号化方法。
In addition, the following additional remarks are disclosed regarding the above Example.
(Appendix 1)
A moving image encoding apparatus that performs motion vector detection in parallel for each block line and encodes a moving image,
A storage unit for storing a region including a search range of a reference image used in each motion vector detection;
A plurality of motion vector detection units for varying the search range in the region stored in the storage unit based on the motion vector of the left adjacent block with respect to the processing target block, and detecting a motion vector of the processing target block;
A video encoding device comprising:
(Appendix 2)
The storage unit
Storing a region including a reference search range indicating a predetermined reference region used in each motion vector detection unit;
The plurality of motion vector detection units,
When a motion vector is detected for a search range in which the vertical component of the region stored in the storage unit is maximized, and the motion vector of the left adjacent block indicates a region exceeding the vertical component of the reference search range The moving picture coding apparatus according to supplementary note 1, wherein motion vector detection is performed on the processing target block using the reference search range.
(Appendix 3)
The plurality of motion vector detection units,
The moving image encoding apparatus according to appendix 1 or 2, wherein the search range is made variable based further on the size and position of the processing target block.
(Appendix 4)
The plurality of motion vector detection units,
The processing target block is H.264. The moving picture coding apparatus according to supplementary note 3, wherein a motion vector is detected for the reference search range if the block is an adjacent block used in H.264 P_Skip.
(Appendix 5)
When the encoding process of the processing target block of each block size is completed, a part of the area that is the search range in the next processing target block is read from the image storage unit that stores the reference image, and is stored in the storage unit The moving picture encoding device according to any one of supplementary notes 1 to 4, further comprising an overall control unit that controls updating of the video.
(Appendix 6)
A moving image encoding method executed by a moving image encoding apparatus that performs motion vector detection in parallel for each block line by a plurality of motion vector detection units and encodes a moving image,
Storing a region including a search range of a reference image used in each motion vector detection in a storage unit;
In each motion vector detection unit, based on the motion vector of the left adjacent block with respect to the processing target block, the search range in the region stored in the storage unit is made variable, and the motion vector detection of the processing target block is performed A moving image encoding method.

1、2 動画像符号化装置
10 動画像符号化部
20 第1記憶部
100 全体制御部
200 第2記憶部
300 第1動きベクトル検出部
301 制御部
302 隣接ブロックベクトル保存メモリ
303 差分絶対値和計算部
304 原画メモリ
305 比較部
306 結果保存メモリ
307 判定部
400 第2動きベクトル検出部
500 第1符号化部
600 第2符号化部
701 制御部
702 主記憶部
1 and 2 Moving picture coding apparatus 10 Moving picture coding unit 20 First storage unit 100 Overall control unit 200 Second storage unit 300 First motion vector detection unit 301 Control unit 302 Adjacent block vector storage memory 303 Difference absolute value sum calculation Unit 304 original image memory 305 comparison unit 306 result storage memory 307 determination unit 400 second motion vector detection unit 500 first encoding unit 600 second encoding unit 701 control unit 702 main storage unit

Claims (3)

ブロックライン毎に並列に動きベクトル検出を行って動画像の符号化を行う動画像符号化装置であって、
それぞれの動きベクトル検出で用いられる参照画像の探索範囲を含む領域を記憶する記憶部と、
処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、前記記憶部に記憶された領域内の探索範囲を可変にして、該処理対象ブロックの動きベクトル検出を行う複数の動きベクトル検出部と、
を備え、
前記記憶部は、
各動きベクトル検出部で用いられ、処理対象ブロックから水平方向及び垂直方向それぞれに所定画素数を設定した基準の所定領域を示す基準探索範囲を含む領域を記憶し、
前記複数の動きベクトル検出部は、
前記左隣接ブロックの動きベクトルが、前記基準探索範囲以内の領域を指す場合には、前記記憶部に記憶された領域の垂直成分を最大にした探索範囲に対して動きベクトル検出を行い、前記左隣接ブロックの動きベクトルが、前記基準探索範囲の垂直成分を超える領域を指す場合には、前記処理対象ブロックに対して前記基準探索範囲を用いて動きベクトル検出を行う動画像符号化装置。
A moving image encoding apparatus that performs motion vector detection in parallel for each block line and encodes a moving image,
A storage unit for storing a region including a search range of a reference image used in each motion vector detection;
A plurality of motion vector detection units for varying the search range in the region stored in the storage unit based on the motion vector of the left adjacent block with respect to the processing target block, and detecting a motion vector of the processing target block;
With
The storage unit
Used in each motion vector detection unit, storing an area including a reference search range indicating a predetermined reference area in which a predetermined number of pixels is set in each of the horizontal direction and the vertical direction from the processing target block;
The plurality of motion vector detection units,
When the motion vector of the left adjacent block indicates an area within the reference search range, motion vector detection is performed on the search range that maximizes the vertical component of the area stored in the storage unit, and the left A moving picture encoding apparatus that performs motion vector detection using the reference search range for the processing target block when a motion vector of an adjacent block indicates an area exceeding a vertical component of the reference search range.
前記複数の動きベクトル検出部は、
前記処理対象ブロックが、H.264のP_Skipで用いられる隣接ブロックとならないブロックであれば、前記記憶部に記憶された領域の垂直成分を最大にした探索範囲に対して動きベクトル検出を行う請求項記載の動画像符号化装置。
The plurality of motion vector detection units,
The processing target block is H.264. If a block that do not neighbor blocks used in the 264 P_Skip the video encoding apparatus according to claim 1, wherein performing the motion vector detection for the search range to maximize the vertical component of the stored in the storage area .
複数の動きベクトル検出部でブロックライン毎に並列に動きベクトル検出を行って、動画像の符号化を行う動画像符号化装置が実行する動画像符号化方法であって、
それぞれの動きベクトル検出で用いられる参照画像の探索範囲を含む領域を記憶部に記憶し、
各動きベクトル検出部で、処理対象ブロックに対する左隣接ブロックの動きベクトルに基づいて、前記記憶部に記憶された領域内の探索範囲を可変にして、該処理対象ブロックの動きベクトル検出を行う処理を有し、
前記記憶部は、
各動きベクトル検出部で用いられ、処理対象ブロックから水平方向及び垂直方向それぞれに所定画素数を設定した基準の所定領域を示す基準探索範囲を含む領域を記憶し、
前記複数の動きベクトル検出部は、
前記左隣接ブロックの動きベクトルが、前記基準探索範囲以内の領域を指す場合には、前記記憶部に記憶された領域の垂直成分を最大にした探索範囲に対して動きベクトル検出を行い、前記左隣接ブロックの動きベクトルが、前記基準探索範囲の垂直成分を超える領域を指す場合には、前記処理対象ブロックに対して前記基準探索範囲を用いて動きベクトル検出を行う動画像符号化方法。
A moving image encoding method executed by a moving image encoding apparatus that performs motion vector detection in parallel for each block line by a plurality of motion vector detection units and encodes a moving image,
Storing a region including a search range of a reference image used in each motion vector detection in a storage unit;
In each motion vector detection unit, based on the motion vector of the left adjacent block with respect to the processing target block, the search range in the region stored in the storage unit is made variable, and the motion vector detection of the processing target block is performed Have
The storage unit
Used in each motion vector detection unit, storing an area including a reference search range indicating a predetermined reference area in which a predetermined number of pixels is set in each of the horizontal direction and the vertical direction from the processing target block;
The plurality of motion vector detection units,
When the motion vector of the left adjacent block indicates an area within the reference search range, motion vector detection is performed on the search range that maximizes the vertical component of the area stored in the storage unit, and the left A moving picture coding method for performing motion vector detection using the reference search range for the processing target block when a motion vector of an adjacent block indicates an area exceeding a vertical component of the reference search range.
JP2012035652A 2012-02-21 2012-02-21 Moving picture coding apparatus and moving picture coding method Expired - Fee Related JP5938935B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012035652A JP5938935B2 (en) 2012-02-21 2012-02-21 Moving picture coding apparatus and moving picture coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012035652A JP5938935B2 (en) 2012-02-21 2012-02-21 Moving picture coding apparatus and moving picture coding method

Publications (2)

Publication Number Publication Date
JP2013172350A JP2013172350A (en) 2013-09-02
JP5938935B2 true JP5938935B2 (en) 2016-06-22

Family

ID=49266018

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012035652A Expired - Fee Related JP5938935B2 (en) 2012-02-21 2012-02-21 Moving picture coding apparatus and moving picture coding method

Country Status (1)

Country Link
JP (1) JP5938935B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102301298B1 (en) 2014-04-17 2021-09-10 가부시키가이샤 아데카 Layered substance-containing liquid and method for producing same
EP3272813A4 (en) 2015-03-18 2018-08-22 Adeka Corporation Liquid containing layered-substance and method for producing same
JP6728870B2 (en) 2016-03-28 2020-07-22 富士通株式会社 Image compression apparatus, image compression method, and image compression program
WO2018117013A1 (en) 2016-12-19 2018-06-28 株式会社Adeka Solution containing layered substance, and method for producing same
JP7201906B2 (en) * 2019-01-15 2023-01-11 日本電信電話株式会社 Reference area determination device and program

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63144626A (en) * 1986-12-09 1988-06-16 Fujitsu Ltd Dynamic vector detecting system
WO2001010135A1 (en) * 1999-07-29 2001-02-08 Mitsubishi Denki Kabushiki Kaisha Moving vector detecting method
JPWO2005036887A1 (en) * 2003-10-14 2006-12-28 日本電気株式会社 Motion vector search method, motion vector search device, and motion vector search program
JP2006333100A (en) * 2005-05-26 2006-12-07 Matsushita Electric Ind Co Ltd Image coding unit
US20090110077A1 (en) * 2006-05-24 2009-04-30 Hiroshi Amano Image coding device, image coding method, and image coding integrated circuit
JP4910576B2 (en) * 2006-09-04 2012-04-04 富士通株式会社 Moving image processing device
JP2008136177A (en) * 2006-10-27 2008-06-12 Matsushita Electric Ind Co Ltd Motion detection apparatus, mos (metal-oxide semiconductor) integrated circuit and video system
JP4764807B2 (en) * 2006-11-30 2011-09-07 富士通セミコンダクター株式会社 Motion vector detection apparatus and motion vector detection method

Also Published As

Publication number Publication date
JP2013172350A (en) 2013-09-02

Similar Documents

Publication Publication Date Title
US11831891B2 (en) Image coding method, image decoding method, image coding apparatus, and image decoding apparatus
JP2019198092A (en) Picture prediction method and related apparatus
JP4166781B2 (en) Motion vector detection apparatus and motion vector detection method
JP5115498B2 (en) Image coding apparatus, image coding control method, and program
JP5938935B2 (en) Moving picture coding apparatus and moving picture coding method
US10455229B2 (en) Prediction mode selection method, apparatus and device
JP2006246431A (en) Image coding apparatus and method
JPWO2007136088A1 (en) Image encoding apparatus, image encoding method, and integrated circuit for image encoding
JPWO2014054267A1 (en) Image coding apparatus and image coding method
KR100580194B1 (en) Sub pixel motion estimation method and apparatus reducing a bit precision
US20150350670A1 (en) Coding apparatus, computer system, coding method, and computer product
JP2007129370A (en) Motion vector detecting apparatus and method
CN105763879A (en) Methods, Systems And Devices Including Encoder For Image Processing
JP5906993B2 (en) Encoding apparatus, encoding method, and program
JP2015165644A (en) Image encoder and image encoding method
JP4429996B2 (en) Moving picture coding program, moving picture coding method, and moving picture coding apparatus
JP2013207402A (en) Image encoding device and program
JP2016025541A (en) Moving image encoder, moving image encoding method, and program
JP6728870B2 (en) Image compression apparatus, image compression method, and image compression program
JP6110724B2 (en) Image processing apparatus, encoding apparatus, and encoding program
JP2019057886A (en) Encoder, encoding method, and program
JP2018186456A (en) Image encoding apparatus, image encoding method, and program
JP2019016896A (en) Image processing system, and image processing method
JP6308409B2 (en) Moving picture coding apparatus and moving picture coding method
JP5637010B2 (en) Motion vector detection apparatus, motion vector detection method, and motion vector detection program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141007

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150915

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151028

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160112

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160302

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: 20160419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160502

R150 Certificate of patent or registration of utility model

Ref document number: 5938935

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees