JP2016181799A - Moving picture encoding system, moving picture encoding method and program for encoding moving picture - Google Patents

Moving picture encoding system, moving picture encoding method and program for encoding moving picture Download PDF

Info

Publication number
JP2016181799A
JP2016181799A JP2015060969A JP2015060969A JP2016181799A JP 2016181799 A JP2016181799 A JP 2016181799A JP 2015060969 A JP2015060969 A JP 2015060969A JP 2015060969 A JP2015060969 A JP 2015060969A JP 2016181799 A JP2016181799 A JP 2016181799A
Authority
JP
Japan
Prior art keywords
motion
block
motion vector
search
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015060969A
Other languages
Japanese (ja)
Inventor
芙美代 鷹野
Fumiyo Takano
芙美代 鷹野
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2015060969A priority Critical patent/JP2016181799A/en
Publication of JP2016181799A publication Critical patent/JP2016181799A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To encode moving pictures with a low calculation amount while suppressing degradation of the encoding efficiency.SOLUTION: Rough searching means 1 includes first motion searching means 3 for calculating a difference value between a current image pixel and a reference image pixel on a first size block basis and selecting, as a first motion vector, a motion vector for which the cost calculated on the basis of an index obtained from the difference value is minimum, second motion searching means 4 for selecting, as a second motion vector, a motion vector for which the cost calculated on the basis of an index obtained from a difference value calculated by the first motion search means on a second size block basis is minimum, the second size being smaller than the first size, and vector correction means 5 for correcting the motion vector using the cost magnitude relationship between the cost of the first motion vector and the cost of the second motion vector. The searching means 2 includes block size selecting means 6 for determining the block size on the basis of the motion vector selected by fine searching means 2.SELECTED DRAWING: Figure 15

Description

本発明は、動画像符号化システム、動画像符号化方法、および動画像符号化用プログラムに関する。   The present invention relates to a moving image encoding system, a moving image encoding method, and a moving image encoding program.

近年、動画像の解像度向上要求が年々高まっており、それに伴って、符号化技術もMPEG−2,H.264/MPEG−4 AVC(以下H.264),H.265/HEVC(以下H.265)と圧縮効率を向上するように進歩してきた。これらの符号化方式は、フレーム間の動き補償予測を用いて情報を圧縮することにより高い符号化効率を達成している。なお、非特許文献1にはH.265規格に基づく処理の内容が記載されている。H.265動画像符号化の処理は、CU(Coding Unit)と呼ばれる最大64×64画素のブロック単位で行われる。   In recent years, the demand for improving the resolution of moving images has been increasing year by year. H.264 / MPEG-4 AVC (hereinafter referred to as H.264), H.264. Advances have been made to improve compression efficiency with H.265 / HEVC (hereinafter H.265). These encoding schemes achieve high encoding efficiency by compressing information using motion compensation prediction between frames. Non-Patent Document 1 discloses H.264. The contents of processing based on the H.265 standard are described. H. The H.265 video encoding process is performed in units of blocks of up to 64 × 64 pixels called CU (Coding Unit).

動き補償予測は、符号化対象フレームと符号化済みの参照フレームの間の動き情報を用いて参照フレームの画像を補正し、補正された画像(予測画像)と符号化対象となる現画像の差分情報とフレーム間の動きを表す情報のみを符号化することにより動画像情報を圧縮する技術である。フレーム間の動きは移動量を表す動きベクトルによって表現される。参照フレームと符号化対象フレーム間の動き情報を算出する処理を動き推定という。動き推定では、デコード画像に発生するノイズ量を抑えつつ符号化する情報量も最小化できる動き情報を算出することが重要である。   In motion compensated prediction, the image of the reference frame is corrected using motion information between the encoding target frame and the encoded reference frame, and the difference between the corrected image (predicted image) and the current image to be encoded is calculated. This is a technique for compressing moving image information by encoding only information representing information and motion between frames. The motion between frames is expressed by a motion vector representing the amount of movement. The process of calculating the motion information between the reference frame and the encoding target frame is called motion estimation. In motion estimation, it is important to calculate motion information that can minimize the amount of information to be encoded while suppressing the amount of noise generated in the decoded image.

このため、近年の動画像符号化装置では、RD(Rate−Distortion)最適化と呼ばれる手法が広く用いられている。RD最適化は、多数の動きベクトル候補に対して、J=D+λRと表されるレート歪みコストを算出し、これが最小になるものを動きベクトルとして採用する技術である。ここで、Dは差分画像に発生する歪み量、Rは動き情報の符号化で発生する符号量、λは画像の複雑さなどに依存する重み係数である。動き情報は、動きベクトル情報やCUサイズ情報を含む。歪み量Dとして、一般に、符号化対象フレーム画像の画素と予測画像の画素の絶対値差分和SAD(Sum of Absolute Difference)が用いられる。SADは、以下の式(1)により計算される。   For this reason, a technique called RD (Rate-Distortion) optimization is widely used in recent video coding apparatuses. The RD optimization is a technique for calculating a rate distortion cost expressed as J = D + λR for a large number of motion vector candidates, and adopting the one that minimizes this as a motion vector. Here, D is the amount of distortion generated in the difference image, R is the amount of code generated by encoding the motion information, and λ is a weighting factor that depends on the complexity of the image. The motion information includes motion vector information and CU size information. As the distortion amount D, an absolute value difference sum SAD (Sum of Absolute Difference) between a pixel of the encoding target frame image and a pixel of the predicted image is generally used. SAD is calculated by the following equation (1).

Figure 2016181799
Figure 2016181799

ここで、S(x,y)は動きベクトルが指し示す参照フレーム画像の画像ブロック内の相対的な座標(x,y)における画素値、C(x,y)は符号化対象フレームの画像である現画像の座標(x,y)における画素値を示す。多数の動きベクトル候補のレート歪みコストを算出するRD最適化による動きベクトル探索は演算量が非常に多いことが課題である。   Here, S (x, y) is a pixel value at relative coordinates (x, y) in the image block of the reference frame image indicated by the motion vector, and C (x, y) is an image of the encoding target frame. The pixel value at the coordinates (x, y) of the current image is shown. The problem is that the motion vector search by RD optimization for calculating the rate distortion cost of a large number of motion vector candidates has a very large amount of calculation.

H.265/HEVCでは、CUサイズが可変であるため効率的に符号量が圧縮され、利用者が、最大サイズ64×64のブロックを階層的に四分木分割した64×64,32×32,16×16,8×8画素サイズのCUから最適なCUサイズを選択することができる。さらに動き補償予測では、2N×2NサイズのCUを動き情報を保持する単位であるPU(Prediction Unit)に分割し処理が行われる。利用者は、PUサイズとして、2N×2N,2N×N,N×2NまたはN×Nサイズから最適なブロックサイズを選択することができる。そのため、H.265/HEVCを用いると、平坦な部分では大きなブロックで符号化することで動き情報の符号量を削減することができ、細かな変化のある部分は小さなブロックで符号化することで差分画像の歪み量を削減することができる。   H. In H.265 / HEVC, since the CU size is variable, the code amount is efficiently compressed, and the user hierarchically divides the block of the maximum size 64 × 64 into a quadtree, and is 64 × 64, 32 × 32, 16 An optimal CU size can be selected from CUs of × 16, 8 × 8 pixel size. Furthermore, in motion compensation prediction, a 2N × 2N size CU is divided into PUs (Prediction Units), which are units for holding motion information, and processing is performed. The user can select an optimal block size from 2N × 2N, 2N × N, N × 2N, or N × N size as the PU size. Therefore, H.H. When H.265 / HEVC is used, the coding amount of motion information can be reduced by coding with a large block in a flat part, and the difference image distortion by coding with a small block in a part with small changes. The amount can be reduced.

しかし、最適なCU,PUサイズを選択するためには全てのCUサイズにおける全てのPUサイズの動きベクトル探索を行い各ブロックサイズのRDコストを比較して最小コストとなるCU,PUサイズを決定する必要がある。CU,PUサイズの選択は画質に大きな影響を与える一方で、多数のCU、PUサイズに対する動きベクトル探索処理の演算量は非常に多い。特に、4Kなど高解像度向けの実用的なエンコーダの実装では全てのCU、PUサイズでの動きベクトル探索を実施するのは現実的ではない。特に、H.265では選択できるブロックサイズの種類が13種類であり、H.264の7種類に比べて増えたため、演算量がさらに多くなっている。   However, in order to select an optimal CU and PU size, motion vector searches of all PU sizes in all CU sizes are performed, and the RD cost of each block size is compared to determine the CU and PU size that are the minimum cost. There is a need. While the selection of the CU and PU sizes has a great influence on the image quality, the amount of calculation of the motion vector search process for a large number of CU and PU sizes is very large. In particular, in a practical encoder implementation for high resolution such as 4K, it is not realistic to perform motion vector search in all CU and PU sizes. In particular, H.C. In H.265, there are 13 types of block sizes that can be selected. Since it increased compared with 7 types of H.264, the amount of calculation is further increased.

以下では、CUとPUを合わせたものをブロックと称する。低演算量で複数のブロックサイズのコストを算出する手法として、SAD再利用法がある。これは、同一ベクトルの4つのブロックのSADの合計値が1階層大きいブロックのSAD値と等しくなることを利用するものである。同一動きベクトルであれば、例えば、64×64ブロックのSADは4つの内包する32×32ブロックのSADの合計である。同様に、32×32ブロックは4つの16×16ブロック、16×16ブロックは4つの8×8ブロック、8×8ブロックは4つの4×4ブロックのSADを合計することによりSAD値を得ることができる。ただし、算出する動きベクトルが下位階層ブロックの全ての動きベクトルと同一でなければ、SAD値を合計しても求める動きベクトルのSAD値とはならない。   Below, what combined CU and PU is called a block. As a method for calculating the cost of a plurality of block sizes with a low calculation amount, there is an SAD reuse method. This utilizes the fact that the total SAD value of four blocks of the same vector is equal to the SAD value of a block one layer higher. For the same motion vector, for example, the SAD of 64 × 64 blocks is the sum of the four SADs of 32 × 32 blocks included. Similarly, the 32 × 32 block obtains the SAD value by summing the SAD of the four 16 × 16 blocks, the 16 × 16 block of the four 8 × 8 blocks, and the 8 × 8 block of the four 4 × 4 blocks. Can do. However, if the motion vector to be calculated is not the same as all the motion vectors of the lower layer block, even if the SAD values are summed, the SAD value of the motion vector to be obtained is not obtained.

最下階層ブロックにおける動き探索のアルゴリズムとして探索範囲の全てのSAD値を算出してコストを比較する全探索法を用いた場合には、すべてのブロックサイズで同一の動きベクトル候補のコストが算出される。そのため、最小ブロックにおける動き探索の過程で得られる各候補ベクトルのSAD値からすべてのサイズのブロックの全候補ベクトルのSAD値を算出することができる。   When the full search method for calculating all the SAD values in the search range and comparing the costs is used as the motion search algorithm in the lowest hierarchy block, the cost of the same motion vector candidate is calculated for all block sizes. The Therefore, the SAD values of all candidate vectors of blocks of all sizes can be calculated from the SAD values of each candidate vector obtained in the process of motion search in the smallest block.

一方で、全探索法は探索範囲の全てのコストを比較する必要があるため、最小ブロックの動き探索だけでも非常に演算量が大きく、特に4Kなどの高解像度向けの実用的なエンコーダでは現実的ではない。演算量を削減するためにダイヤモンドサーチなど適応的に探索位置、探索範囲を変更する探索手法もあるが、この探索手法ではブロックごとにSAD値を計算する候補ベクトルが異なるため、大きなサイズのブロックにSAD値を再利用できないことが多い。   On the other hand, since the full search method needs to compare all costs in the search range, the amount of calculation is very large even with only the motion search of the minimum block, which is practical in practical encoders for high resolution such as 4K. is not. There is a search method that adaptively changes the search position and search range, such as diamond search, in order to reduce the amount of calculation. However, in this search method, the candidate vector for calculating the SAD value is different for each block. Often, SAD values cannot be reused.

非特許文献2には、全探索よりも演算量の少ない階層探索を用いることで、最小ブロックにおける探索量を削減しながらSAD値再利用を行う方法が示されている。階層探索では、まず縮小画像を用いて広範囲の粗探索を行う。次に粗探索で得られた最小コストとなる動きベクトルの周辺の狭範囲のみを元サイズの画像で密探索する。これにより、広範囲を少ない演算量で探索することができる。   Non-Patent Document 2 shows a method of reusing SAD values while reducing the search amount in the minimum block by using a hierarchical search with a smaller amount of calculation than the full search. In the hierarchical search, first, a broad search is performed using a reduced image. Next, only a narrow range around the motion vector having the minimum cost obtained by the coarse search is densely searched with the original size image. Thereby, a wide range can be searched with a small amount of calculation.

非特許文献2では、例えば、まず画像を1/2に縮小した上で4×4ブロック単位(縮小前の元サイズでは8×8ブロック相当)の粗探索を行う。次の密探索では粗探索の最小コストの動きベクトルの周辺を探索するが、この時元サイズにおける4つの4×4ブロックは粗探索における縮小時には同一の4×4ブロックに含まれている。そのため、密探索でも探索範囲が同一すなわち同一の候補ベクトル群を探索することとなる。   In Non-Patent Document 2, for example, the image is first reduced to ½, and then a rough search is performed in units of 4 × 4 blocks (equivalent to 8 × 8 blocks in the original size before reduction). In the next dense search, a search is made around the motion vector having the minimum cost of the coarse search. At this time, four 4 × 4 blocks at the original size are included in the same 4 × 4 block at the time of reduction in the coarse search. For this reason, even in the dense search, the same search range, that is, the same candidate vector group is searched.

これにより、4×4ブロックと8×8ブロックのレート歪みコスト計算におけるSAD値は再利用可能であり、4×4ブロックの動き探索で得られるSAD値を合計するだけで8×8ブロックの候補ベクトルのSAD値が得られる。また、16×16以上のブロックについても、4つの4×4ブロックごとに探索範囲は異なるが、全ての4×4ブロックにおけるSAD値が計算されている候補ベクトルに限りSAD値の再利用によりコストが計算できる。   As a result, the SAD values in the rate distortion cost calculation of the 4 × 4 block and the 8 × 8 block can be reused, and the 8 × 8 block candidate can be obtained simply by adding the SAD values obtained by the motion search of the 4 × 4 block. The SAD value of the vector is obtained. In addition, for a block of 16 × 16 or more, the search range is different for each of the four 4 × 4 blocks, but the cost is obtained by reusing the SAD value only for the candidate vectors for which the SAD values in all the 4 × 4 blocks are calculated. Can be calculated.

粗探索の探索範囲が狭い場合、粗探索で得られる最小コストベクトルは狭い探索範囲内に限定される。すなわち、ばらつきが小さい。密探索では粗探索で得られた最小コストベクトルの周辺を探索するので、粗探索で得られる最小コストベクトルのばらつきが小さければ、4×4ブロックにおける密探索での探索範囲のばらつきも小さくなる。そのため、粗探索での探索範囲が狭い場合には、全ての16×16ブロック内の全ての4×4ブロックで同一候補ベクトルのSAD値を計算する可能性がある、すなわち16×16ブロックでSAD値の再利用ができる可能性が少なくない。   When the search range of the coarse search is narrow, the minimum cost vector obtained by the coarse search is limited to the narrow search range. That is, the variation is small. In the dense search, the periphery of the minimum cost vector obtained by the coarse search is searched. Therefore, if the variation of the minimum cost vector obtained by the coarse search is small, the variation of the search range in the dense search in the 4 × 4 block is also small. Therefore, when the search range in the coarse search is narrow, the SAD value of the same candidate vector may be calculated in all 4 × 4 blocks in all 16 × 16 blocks, that is, SAD in 16 × 16 blocks. There is a high possibility that the value can be reused.

しかし、低解像度処理では探索範囲が狭くてよいが、特に高解像度処理では圧縮効率のために探索範囲を広くする必要がある。例えば、ある物体が画面の半分横に動いたとすると、1920×1080画素画像では探索範囲が960画素あれば動きを捉えられるが、3840×2160画素画像では探索範囲が1920画素ないと動きを捉えられないからである。探索範囲を広くすると、密探索での探索範囲がばらつきやすく、SAD値を再利用して、16×16以上のサイズのブロックのコストを計算するのが困難になる。   However, although the search range may be narrow in low resolution processing, it is necessary to widen the search range for compression efficiency, particularly in high resolution processing. For example, if a certain object moves half a side of the screen, a 1920 × 1080 pixel image can capture a motion if the search range is 960 pixels, but a 3840 × 2160 pixel image can capture a motion if the search range is not 1920 pixels. Because there is no. If the search range is widened, the search range in the dense search is likely to vary, and it becomes difficult to calculate the cost of a block having a size of 16 × 16 or more by reusing the SAD value.

また、非特許文献2で対象としているH.264/AVCではブロックサイズは4×4から16×16までだったが、H.265/HEVCでは4×4から64×64とブロック階層がより深い。そのため、H.265/HEVCの高圧縮効率を達成するためには大きなブロックサイズをより積極的に選択する必要がある。非特許文献2に記載されている技術では、16×16よりもさらに大きなブロックではSAD値の再利用が困難になる。例えば64×64のような大きなブロックのSAD値を求めるには、内包されている256個の全ての4×4ブロックで同一候補ベクトルのSAD値が計算されていなければならない。非特許文献2に記載されている技術では、SAD値が再利用できずコストが計算できないブロックサイズは選択されないため、64×64などの大きなサイズのブロックを選択できる可能性が低くなり、圧縮効率が悪化する。   In addition, the H.C. In H.264 / AVC, the block size was 4 × 4 to 16 × 16. In H.265 / HEVC, the block hierarchy is deeper from 4 × 4 to 64 × 64. Therefore, H.H. In order to achieve the high compression efficiency of H.265 / HEVC, it is necessary to select a large block size more aggressively. With the technique described in Non-Patent Document 2, it is difficult to reuse the SAD value in a block larger than 16 × 16. For example, in order to obtain the SAD value of a large block such as 64 × 64, the SAD value of the same candidate vector must be calculated in all the 256 4 × 4 blocks included. In the technique described in Non-Patent Document 2, since a block size for which the SAD value cannot be reused and the cost cannot be calculated is not selected, the possibility that a block having a large size such as 64 × 64 can be selected is reduced. Gets worse.

ITU-T Recommendation H.265 '' High efficiency video coding,'' Apr 2013.ITU-T Recommendation H.265 '' High efficiency video coding, '' Apr 2013. Ates, H.F., Altunbasak, Y. "SAD reuse in hierarchical motion estimation for the H.264 encoder", Proc. Acoustics, Speech, and Signal Processing, vol.2, pp.ii/905,ii/908, March 2005.Ates, H.F., Altunbasak, Y. "SAD reuse in hierarchical motion estimation for the H.264 encoder", Proc. Acoustics, Speech, and Signal Processing, vol.2, pp.ii / 905, ii / 908, March 2005.

図16は、非特許文献2に記載されている動き推定を実現するシステムの構成例である。図17は、図16に示すサブ探索部の構成例を示すブロック図である。図16に示す動き推定システムは、現画像と参照画像を例えば1/2サイズに縮小する縮小部15と、16×16ブロック単位ごとに処理を行い、縮小画像を用いて広範囲を探索する粗探索部11と、狭範囲を詳細に探索する密探索部12から構成される。   FIG. 16 is a configuration example of a system that realizes motion estimation described in Non-Patent Document 2. FIG. 17 is a block diagram illustrating a configuration example of the sub search unit illustrated in FIG. The motion estimation system shown in FIG. 16 performs a rough search for searching a wide range using a reduced image by performing a process for each 16 × 16 block unit, and a reduction unit 15 that reduces the current image and the reference image to 1/2 size, for example. It is comprised from the part 11 and the dense search part 12 which searches a narrow range in detail.

粗探索部11は、縮小された探索範囲内の全ベクトルを候補として選出する第1の候補ベクトル選出部13と、縮小された現画像と参照画像を用いて、選出された候補ベクトルのうちレート歪みコストが最小となる動きベクトルを探索する第1の動き探索部14からなる。第1の動き探索部14は、例えば16×16を1/2に縮小した8×8ブロックにおいて4つの4×4ブロックに対して動きベクトルを探索する。   The coarse search unit 11 uses a first candidate vector selection unit 13 that selects all vectors within the reduced search range as candidates, and uses the reduced current image and reference image to select a rate from the selected candidate vectors. The first motion search unit 14 searches for a motion vector that minimizes the distortion cost. For example, the first motion search unit 14 searches for a motion vector for four 4 × 4 blocks in an 8 × 8 block obtained by reducing 16 × 16 to ½.

密探索部12は、16×16ブロック内の4つの8×8ブロックに対してそれぞれ4×4ブロック単位と8×8ブロック単位の動き探索を行うサブ探索部18と、16×16ブロックにおける候補ベクトルを選出する第3の候補ベクトル選出部16と、選出された候補ベクトルを16×16ブロックの単位で探索する第2の動き探索部17とブロックサイズを4×4,8×8,16×16から選択するブロックサイズ選択部19とからなる。   The dense search unit 12 includes a sub search unit 18 that performs motion search in units of 4 × 4 blocks and 8 × 8 blocks for four 8 × 8 blocks in a 16 × 16 block, and candidates in the 16 × 16 blocks. A third candidate vector selection unit 16 that selects vectors, a second motion search unit 17 that searches the selected candidate vectors in units of 16 × 16 blocks, and block sizes of 4 × 4, 8 × 8, and 16 × 16 is a block size selection unit 19 that selects from 16.

サブ探索部18は、図17に示すように、4×4ブロックと8×8ブロックの密探索での候補ベクトルを選出する第2の候補ベクトル選出部20と、選出された候補ベクトルを4×4ブロック単位で探索する第3の動き探索部21と、8×8ブロック単位で探索する第4の動き探索部22とからなる。   As shown in FIG. 17, the sub search unit 18 selects a candidate vector in a dense search of 4 × 4 blocks and 8 × 8 blocks, a second candidate vector selection unit 20, and selects the selected candidate vectors 4 ×. It consists of a third motion search unit 21 that searches in units of 4 blocks and a fourth motion search unit 22 that searches in units of 8 × 8 blocks.

第2の候補ベクトル選出部20は、対応する8×8ブロックにおける第1の動き探索部14が出力した動きベクトルを起点として得られる候補ベクトルを選出する。第2の候補ベクトル選出部20は、例えば、第1の動き探索部14が出力した動きベクトルの周囲の9ベクトルを候補ベクトルとして選出する。第3の動き探索部21は、選出された候補ベクトルに対して4×4ブロック単位でSADを算出して動き探索を行いレート歪みコストが最小となる動きベクトルを選択する。第3の動き探索部21は、さらに各候補ベクトルに対するSAD値を第2の動き探索部22に出力する。第4の動き探索部22は、各候補ベクトルに対して、第3の動き探索部21が算出したSADを4ブロック分合計することで8×8ブロックのSADを算出してレート歪みコストを算出し、最小コストとなる動きベクトルを選択する。   The second candidate vector selection unit 20 selects a candidate vector obtained from the motion vector output from the first motion search unit 14 in the corresponding 8 × 8 block. For example, the second candidate vector selection unit 20 selects nine vectors around the motion vector output from the first motion search unit 14 as candidate vectors. The third motion search unit 21 calculates a SAD in units of 4 × 4 blocks for the selected candidate vector, performs a motion search, and selects a motion vector that minimizes the rate distortion cost. The third motion search unit 21 further outputs the SAD value for each candidate vector to the second motion search unit 22. For each candidate vector, the fourth motion search unit 22 calculates the rate distortion cost by calculating the SAD of 8 × 8 blocks by adding the SAD calculated by the third motion search unit 21 for four blocks. Then, the motion vector having the minimum cost is selected.

図16に示す、第3の候補ベクトル選出部16は、第2の候補ベクトル選出部20が選出した候補ベクトルのうち、16×16ブロックが内包する4つの8×8ブロックすべてで選出された候補ベクトルのみを16×16ブロックの候補ベクトルとして選出する。4つの8×8ブロックの探索範囲が異なれば16×16ブロックの候補ベクトルは選出されないこともある。   The third candidate vector selection unit 16 shown in FIG. 16 is selected by all four 8 × 8 blocks included in the 16 × 16 block among the candidate vectors selected by the second candidate vector selection unit 20. Only vectors are selected as 16 × 16 block candidate vectors. If the search ranges of four 8 × 8 blocks are different, a candidate vector of 16 × 16 blocks may not be selected.

第2の動き探索部17は、第3の候補ベクトル選出部16が選出した各候補ベクトルに対して、第1の動き探索部21が算出したSADを16ブロック分合計することにより16×16ブロックのSADを算出してレート歪みコストを算出し、最小コストとなる動きベクトルを選択する。   The second motion search unit 17 adds 16 blocks of the SAD calculated by the first motion search unit 21 to each candidate vector selected by the third candidate vector selection unit 16 to obtain 16 × 16 blocks. The SAD is calculated to calculate the rate distortion cost, and the motion vector having the minimum cost is selected.

ブロックサイズ選択部19は、第3の動き探索部21、第4の動き探索部22、第2の動き探索部17から出力されるレート歪みコストから、16×16ブロックのコストを最小化するブロックサイズを選択し、選択されたサイズの動きベクトルとともに出力する。   The block size selection unit 19 is a block that minimizes the cost of 16 × 16 blocks from the rate distortion cost output from the third motion search unit 21, the fourth motion search unit 22, and the second motion search unit 17. Select a size and output it with a motion vector of the selected size.

上記のような、非特許文献2に記載された技術では、演算量は削減しながらも、平坦な画面のときにも大きいサイズのブロックが選択されにくく圧縮効率が低下することが課題である。   The technique described in Non-Patent Document 2 as described above has a problem in that the amount of calculation is reduced, but a block having a large size is not easily selected even on a flat screen, and the compression efficiency is lowered.

そこで、本発明は、符号化効率(圧縮効率及び画質)の劣化を抑えながら、低演算量で動画像を符号化する動画像符号化システム、方法およびプログラムを提供することを目的とする。   Accordingly, an object of the present invention is to provide a moving image encoding system, method, and program for encoding a moving image with a low amount of computation while suppressing deterioration in encoding efficiency (compression efficiency and image quality).

本発明による動画像符号化システムは、現画像と参照画像との間の動きベクトルを用いる動画像符号化システムであって、探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択する粗探索手段と、粗探索手段が選択した動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択する密探索手段とを備え、粗探索手段は、第1のサイズのブロック単位で現画像画素と参照画像画素の差分値を算出し、差分値から得られる指標により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択する第1の動き探索手段と、第1のサイズより大きい第2のサイズのブロック単位で、第1の動き探索手段が算出した差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択する第2の動き探索手段と、第1の動きベクトルのコストと第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正手段とを含み、
密探索手段は、当該密探索手段が選択した動きベクトルにもとづいてブロックサイズを決定するブロックサイズ選択手段を含むことを特徴とする。
A moving image coding system according to the present invention is a moving image coding system that uses a motion vector between a current image and a reference image, and performs motion search of a part of vectors within a search range to select a motion vector. A coarse search means and a fine search means for selecting a motion vector by performing a motion search of a predetermined range of vectors around the motion vector selected by the coarse search means, wherein the coarse search means is in block units of the first size. A first motion search means for calculating a difference value between a current image pixel and a reference image pixel, and selecting a motion vector having a minimum cost calculated by an index obtained from the difference value as a first motion vector; The second motion vector having the smallest cost calculated by the index obtained from the difference value calculated by the first motion search means in a block unit of the second size larger than the second size. Includes a second motion search means for selecting as a motion vector, and a vector correction means for correcting the motion vector using the cost magnitude relationship between the cost and the second motion vector of the first motion vector,
The fine search means includes block size selection means for determining a block size based on the motion vector selected by the fine search means.

本発明による動画像符号化方法は、探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択し、選択された動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択することにより、現画像と参照画像との間の動きベクトルを検出して符号化を行う動画像符号化方法であって、第1のサイズのブロック単位で現画像画素と参照画像画素の差分値を算出し、差分値から得られる指標により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択し、第1のサイズより大きい第2のサイズのブロック単位で、差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択し、第1の動きベクトルのコストと第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正し、修正された動きベクトルの周囲の所定範囲のベクトルの動き探索を行うことにより選択された動きベクトルにもとづいて、ブロックサイズを決定することを特徴とする。   The moving image encoding method according to the present invention selects a motion vector by performing a motion search of a part of a vector within a search range, and selects a motion vector by performing a motion search of a vector within a predetermined range around the selected motion vector. A motion image encoding method for performing encoding by detecting a motion vector between a current image and a reference image, wherein a difference value between the current image pixel and the reference image pixel in units of a first size block And the motion vector that minimizes the cost calculated by the index obtained from the difference value is selected as the first motion vector, and obtained from the difference value in block units of the second size larger than the first size. A motion vector that minimizes the cost calculated by the selected index is selected as the second motion vector, and the magnitude of the cost of the first motion vector and the cost of the second motion vector Correct the motion vector, based on the motion vector selected by performing motion search vector in a predetermined range around the modified motion vector, and determines the block size used.

本発明による動画像符号化プログラムは、コンピュータに、探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択し、選択された動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択することにより、現画像と参照画像との間の動きベクトルを検出して符号化を行わせるための動画像符号化プログラムであって、コンピュータに、第1のサイズのブロック単位で現画像画素と参照画像画素の差分値を算出し、差分値から得られる指標により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択する第1の動き探索処理と、第1のサイズより大きい第2のサイズのブロック単位で、差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択する第2の動き探索処理と、第1の動きベクトルのコストと第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正処理と、修正された動きベクトルの周囲の所定範囲のベクトルの動き探索を行うことにより選択された動きベクトルにもとづいて、ブロックサイズを決定するブロックサイズ決定処理とを実行させることを特徴とする。   The moving image encoding program according to the present invention performs a motion search of a part of a vector within a search range by selecting a motion vector, and performs a motion search of a vector within a predetermined range around the selected motion vector. A moving image encoding program for detecting a motion vector between a current image and a reference image by selecting a vector and encoding the detected motion vector. The computer encodes a current image in block units of a first size. A first motion search process for calculating a difference value between an image pixel and a reference image pixel, and selecting a motion vector having a minimum cost calculated by an index obtained from the difference value as a first motion vector; The motion vector that minimizes the cost calculated by the index obtained from the difference value in a block unit of the second size larger than the size is the second motion vector. A second motion search process to be selected, a vector correction process for correcting the motion vector using the magnitude relationship between the cost of the first motion vector and the cost of the second motion vector, and the surroundings of the corrected motion vector A block size determination process for determining a block size is executed based on a motion vector selected by performing a motion search of a predetermined range of vectors.

本発明によれば、符号化効率(圧縮効率及び画質)の劣化を抑えながら、低演算量で動画像を符号化することができる。   According to the present invention, it is possible to encode a moving image with a low calculation amount while suppressing deterioration in encoding efficiency (compression efficiency and image quality).

第1の実施形態における動画像符号化システムの構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoding system in 1st Embodiment. 第1の実施形態における動画像符号化システムの動作の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of operation | movement of the moving image encoding system in 1st Embodiment. 第1の実施形態における動画像符号化システムの粗探索部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the rough search part of the moving image encoding system in 1st Embodiment. 第1の実施形態における動画像符号化システムの密探索部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the dense search part of the moving image encoding system in 1st Embodiment. 第2の実施形態における動画像符号化システムの構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoding system in 2nd Embodiment. 第2の実施形態における動画像符号化システムのサブ探索部の構成を示すブロック図である。It is a block diagram which shows the structure of the sub search part of the moving image encoding system in 2nd Embodiment. 第2の実施形態における動画像符号化システムの動作の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of operation | movement of the moving image encoding system in 2nd Embodiment. 第2の実施形態における動画像符号化システムの粗探索部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the rough search part of the moving image encoding system in 2nd Embodiment. 第2の実施形態における動画像符号化システムの密探索部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the dense search part of the moving image encoding system in 2nd Embodiment. 第3の実施形態における動画像符号化システムの構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoding system in 3rd Embodiment. 第3の実施形態における動画像符号化システムのサブ探索部の構成を示すブロック図である。It is a block diagram which shows the structure of the sub search part of the moving image encoding system in 3rd Embodiment. 第3の実施形態における動画像符号化システムの第2階層探索部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the 2nd hierarchy search part of the moving image encoding system in 3rd Embodiment. 第3の実施形態における動画像符号化システムの第3階層探索部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the 3rd hierarchy search part of the moving image encoding system in 3rd Embodiment. 第3の実施形態における動画像符号化システムの第4階層探索部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the 4th hierarchy search part of the moving image encoding system in 3rd Embodiment. 本発明による動画像符号化システムの概要を示すブロック図である。It is a block diagram which shows the outline | summary of the moving image encoding system by this invention. 非特許文献2に記載されている動き推定を実現するシステムの構成例を示すブロック図である。It is a block diagram which shows the structural example of the system which implement | achieves the motion estimation described in the nonpatent literature 2. 図16に示すサブ探索部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the sub search part shown in FIG.

次に、発明を実施するための形態を、図面を参照して詳細に説明する。   Next, embodiments for carrying out the invention will be described in detail with reference to the drawings.

実施形態1.
本発明では、粗探索においてもSAD値を再利用して複数サイズのブロックのレート歪みコストを比較し、その結果により粗探索における動きベクトル、ひいては密探索における探索範囲を修正することを特徴とする。これにより、多数の小ブロックで同一の候補ベクトルを探索する可能性を高め、大きなサイズのブロックを選択しやすくなり、圧縮効率が向上できる。本実施形態では、粗探索において縮小画像を用いずにおおまかなベクトルを探索する探索法である粗密探索による例を説明する。
Embodiment 1. FIG.
In the present invention, the SAD value is reused also in the coarse search, the rate distortion costs of the blocks of a plurality of sizes are compared, and the motion vector in the coarse search and thus the search range in the dense search are corrected based on the result. . This increases the possibility of searching for the same candidate vector in a large number of small blocks, makes it easy to select a large size block, and improves the compression efficiency. In the present embodiment, an example based on a coarse / fine search, which is a search method for searching a rough vector without using a reduced image in the coarse search, will be described.

図1は、本実施形態の動画像符号化システムの構成を示すブロック図である。本実施形態における動画像符号化システムは、例えば8×8ブロック単位で、広範囲を大まかに探索する粗探索部101と、粗探索部101が出力する動きベクトルを取得し、粗探索の結果の周囲の所定範囲(狭範囲)を詳細に動き探索し動きベクトルを選択する密探索部102とを備える。また、動画像符号化システムは、密探索部102が選択した動きベクトルを用いて現画像の符号化を行う。密探索部102は、粗探索部101が出力する動きベクトルを取得する。図1に示す各構成要素は、例えば、特定の演算処理等を行うよう設計されたハードウェア、またはプログラムに従って動作するコンピュータによって実現される。また、そのプログラムは、非一時的でコンピュータが読み取り可能な記憶媒体に記憶される。   FIG. 1 is a block diagram showing a configuration of a moving image coding system according to the present embodiment. The moving image coding system according to the present embodiment obtains a rough search unit 101 that roughly searches a wide range, for example, in units of 8 × 8 blocks, and a motion vector output by the coarse search unit 101, and surrounds the result of the coarse search And a dense search unit 102 that performs motion search in detail within a predetermined range (narrow range) and selects a motion vector. The moving image encoding system encodes the current image using the motion vector selected by the dense search unit 102. The dense search unit 102 acquires a motion vector output from the coarse search unit 101. Each component shown in FIG. 1 is realized by, for example, hardware designed to perform specific arithmetic processing or the like, or a computer that operates according to a program. The program is stored in a non-transitory computer-readable storage medium.

粗探索部101は、第1の候補ベクトル選出部103と、4つの第1の動き探索部104と、第2の動き探索部105と、ベクトル修正部106とを含む。密探索部102は、4つの第2の候補ベクトル選出部107と第3の候補ベクトル選出部108と、4つの第3の動き探索部109と、第4の動き探索部110と、ブロックサイズを決定するブロックサイズ選択部111とを含む。第2の動き探索部105および第4の動き探索部110は、8×8ブロックの動き探索を行い、第1の動き探索部104および第3の動き探索部109は、8×8ブロックに内包される4つの4×4ブロックそれぞれの動き探索を行う。本実施形態の動画像符号化システムは、粗探索部101が第2の動き探索部105とベクトル修正部106とを備えることを特徴とする。   The rough search unit 101 includes a first candidate vector selection unit 103, four first motion search units 104, a second motion search unit 105, and a vector correction unit 106. The dense search unit 102 includes four second candidate vector selection units 107, a third candidate vector selection unit 108, four third motion search units 109, a fourth motion search unit 110, and a block size. A block size selection unit 111 to be determined. The second motion search unit 105 and the fourth motion search unit 110 perform motion search of 8 × 8 blocks, and the first motion search unit 104 and the third motion search unit 109 include in 8 × 8 blocks. The motion search of each of the 4 × 4 blocks to be performed is performed. The moving image coding system according to the present embodiment is characterized in that the coarse search unit 101 includes a second motion search unit 105 and a vector correction unit 106.

第1の候補ベクトル選出部103は、広い探索範囲から、一部の候補ベクトルをまばらに選出する。たとえば、第1の候補ベクトル選出部103は、所定の探索範囲の全てのベクトルのうち縦横4ベクトルおきに候補ベクトルを選出する。これにより、全ベクトル数の1/16個のベクトルが選出されることになる。第1の候補ベクトル選出部103は、選出した候補ベクトルを4つの第1の動き探索部104と第2の動き探索部105に出力する。これにより、4つの第1の動き探索部104と第2の動き探索部105には、同一の候補ベクトルが入力される。   The first candidate vector selection unit 103 sparsely selects some candidate vectors from a wide search range. For example, the first candidate vector selection unit 103 selects candidate vectors every four vertical and horizontal vectors among all the vectors in a predetermined search range. As a result, 1/16 of the total number of vectors is selected. The first candidate vector selection unit 103 outputs the selected candidate vectors to the four first motion search units 104 and the second motion search unit 105. Accordingly, the same candidate vector is input to the four first motion search units 104 and the second motion search unit 105.

第1の動き探索部104は、選出された候補ベクトルに対して4×4ブロック単位で、現画像画素と参照画像画素の差分値を算出し、差分値から得られる指標(SAD値)を算出して動き探索を行い、複数の候補ベクトルの中から、最小コストとなる動きベクトルを選択する。第1の動き探索部104は、探索の過程で得られる各候補ベクトルに対応するSAD値を第2の動き探索部105に出力する。   The first motion search unit 104 calculates a difference value between the current image pixel and the reference image pixel in units of 4 × 4 blocks with respect to the selected candidate vector, and calculates an index (SAD value) obtained from the difference value. Then, a motion search is performed, and a motion vector having a minimum cost is selected from a plurality of candidate vectors. The first motion search unit 104 outputs the SAD value corresponding to each candidate vector obtained in the search process to the second motion search unit 105.

第2の動き探索部105は、各候補ベクトルに対して、第1の動き探索部104が算出したSAD値を4ブロック分合計することにより8×8ブロックのSAD値を算出してレート歪みコストを算出し、複数の候補ベクトルの中から、最小コストとなる動きベクトルを選択する。このとき8×8ブロックに内包する4つの4×4ブロックの動きベクトルそれぞれと8×8ブロックの動きベクトルは必ずしも同一にはならない。   The second motion search unit 105 calculates an SAD value of 8 × 8 blocks by summing up the SAD values calculated by the first motion search unit 104 for each candidate vector for four blocks, thereby generating a rate distortion cost. And a motion vector having the minimum cost is selected from a plurality of candidate vectors. At this time, each of the four 4 × 4 block motion vectors included in the 8 × 8 block and the motion vector of the 8 × 8 block are not necessarily the same.

ベクトル修正部106は、第1の動き探索部104により4つの4×4ブロックについて算出された動きベクトルのレート歪みコストの合計と、第2の動き探索部105により8×8ブロックについて算出された動きベクトルのレート歪みコストを比較する。8×8ブロックのレート歪みコストが小さければ、ベクトル修正部106は、4つの4×4ブロックにおける動きベクトルを8×8ブロックにおける動きベクトルで修正(更新)し出力する。修正された4つの4×4ブロックの動きベクトルは同一となる。4×4ブロックのレート歪みコストの合計が8×8ブロックのレート歪みコストよりも小さければ、動きベクトル修正部106は、修正は行わない。その場合、4つの4×4ブロックの動きベクトルは必ずしも同一にはならない。   The vector correction unit 106 calculates the sum of the motion vector rate distortion costs calculated for the four 4 × 4 blocks by the first motion search unit 104 and the 8 × 8 blocks by the second motion search unit 105. Compare rate distortion costs of motion vectors. If the rate distortion cost of the 8 × 8 block is small, the vector correction unit 106 corrects (updates) the motion vectors in the 4 × 4 blocks with the motion vectors in the 8 × 8 block and outputs the motion vectors. The four modified 4 × 4 block motion vectors are the same. If the sum of the rate distortion costs of the 4 × 4 blocks is smaller than the rate distortion costs of the 8 × 8 blocks, the motion vector correction unit 106 does not perform correction. In that case, the motion vectors of the four 4 × 4 blocks are not necessarily the same.

密探索部102において、第2の候補ベクトル選出部107は、各4×4ブロックの候補ベクトルを選出する。例えば、同一ブロックにおいて粗探索で得られた動きベクトルの周囲±4ベクトルの範囲にある81個のベクトルを候補ベクトルとする。   In the dense search unit 102, the second candidate vector selection unit 107 selects candidate vectors of 4 × 4 blocks. For example, 81 vectors in the range of ± 4 vectors around the motion vector obtained by the coarse search in the same block are set as candidate vectors.

第3の候補ベクトル選出部108は、8×8ブロックの候補ベクトルを選出する。具体的には、第2の候補ベクトル選出部107が選出した候補ベクトルのうち、8×8ブロックが内包する4つの4×4ブロックすべてで選出された候補ベクトルのみを8×8ブロックの候補ベクトルとして選出する。粗探索で得られた4つの4×4ブロックの動きベクトルが同一であれば、4つの4×4ブロックと8×8ブロックの候補ベクトルは同一となる。4つの4×4ブロックの粗探索で得られた動きベクトルが異なれば8×8ブロックの候補ベクトルは選出されないこともある。   The third candidate vector selection unit 108 selects 8 × 8 block candidate vectors. Specifically, among candidate vectors selected by the second candidate vector selection unit 107, only candidate vectors selected by all four 4 × 4 blocks included in the 8 × 8 block are selected as 8 × 8 block candidate vectors. Elected as. If the motion vectors of the four 4 × 4 blocks obtained by the coarse search are the same, the candidate vectors of the four 4 × 4 blocks and the 8 × 8 block are the same. If motion vectors obtained by four 4 × 4 block coarse searches are different, an 8 × 8 block candidate vector may not be selected.

第3の動き探索部109は、第2の候補ベクトル選出部107により選出された候補ベクトルに対して4×4ブロック単位で現画像画素と参照画像画素の差分値を算出し、前記差分値を集計することにより得られる指標(SAD値)を算出して動き探索を行う。そして、第3の動き探索部109は、最小コストとなる動きベクトルを選択する。第3の動き探索部109は、各候補ベクトルに対応するSAD値を第4の動き探索部110に出力する。   The third motion search unit 109 calculates a difference value between the current image pixel and the reference image pixel in units of 4 × 4 blocks with respect to the candidate vector selected by the second candidate vector selection unit 107, and calculates the difference value. A motion search is performed by calculating an index (SAD value) obtained by aggregation. Then, the third motion search unit 109 selects a motion vector having the minimum cost. The third motion search unit 109 outputs the SAD value corresponding to each candidate vector to the fourth motion search unit 110.

第4の動き探索部110は、第3の候補ベクトル選出部108が選出した各候補ベクトルに対して、第3の動き探索部109が算出したSAD値を4ブロック分合計することにより8×8ブロックのSAD値を算出する。また、第4の動き探索部110は、SAD値を用いてレート歪みコストを算出し、最小コストとなる動きベクトルを選択する。   The fourth motion search unit 110 adds the SAD values calculated by the third motion search unit 109 for four blocks to each candidate vector selected by the third candidate vector selection unit 108 to obtain 8 × 8. Calculate the SAD value of the block. Further, the fourth motion search unit 110 calculates a rate distortion cost using the SAD value, and selects a motion vector having the minimum cost.

ブロックサイズ選択部111は、第3の動き探索部109が4つの4×4ブロックについて算出した動きベクトルのレート歪みコストの合計と、第4の動き探索部110が8×8ブロックについて算出した動きベクトルのレート歪みコストを比較し、小さい方のブロックサイズとそのブロックにおける動きベクトルを出力する。   The block size selection unit 111 includes the sum of the rate distortion costs of the motion vectors calculated by the third motion search unit 109 for four 4 × 4 blocks, and the motion calculated by the fourth motion search unit 110 for 8 × 8 blocks. The rate distortion costs of the vectors are compared, and the smaller block size and the motion vector in that block are output.

次に本実施形態の動作例を、図2から図4を用いて説明する。図2は、第1の実施形態における動画像符号化システムの動作の概要を示すフローチャートである。図2に示すように、本実施形態における動き推定では、まず、粗探索部101が、ある8×8ブロックの探索範囲に対して動き探索を行い動きベクトルを選択する(ステップS101)。次に、密探索部102が、粗探索部101が選択した動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択する(ステップS102)。全8×8ブロックの処理が終了していなければ(ステップS103のNO)ステップS101に戻り、ステップS103がYESになるまで繰り返す。   Next, an operation example of this embodiment will be described with reference to FIGS. FIG. 2 is a flowchart showing an outline of the operation of the moving image coding system according to the first embodiment. As shown in FIG. 2, in the motion estimation in the present embodiment, first, the coarse search unit 101 performs a motion search on a search range of a certain 8 × 8 block and selects a motion vector (step S101). Next, the dense search unit 102 performs a motion search for a vector in a predetermined range around the motion vector selected by the coarse search unit 101 and selects a motion vector (step S102). If all 8 × 8 blocks have not been processed (NO in step S103), the process returns to step S101 and is repeated until step S103 becomes YES.

次に、ステップS101における粗探索について図3を用いて詳細に説明する。図3は、第1の実施形態における動画像符号化システムの粗探索部の動作を示すフローチャートである。   Next, the rough search in step S101 will be described in detail with reference to FIG. FIG. 3 is a flowchart showing the operation of the coarse search unit of the moving picture coding system according to the first embodiment.

まず、第1の候補ベクトル選出部103は、候補ベクトルを選出する(ステップS111)。たとえば、第1の候補ベクトル選出部103は、探索範囲の全てのベクトルのうち縦横4ベクトルおきに候補ベクトルを選出する。次に、第1の候補ベクトル選出部103が未処理の候補ベクトルを一つ選択する(ステップS112)。   First, the first candidate vector selection unit 103 selects candidate vectors (step S111). For example, the first candidate vector selection unit 103 selects candidate vectors every four vertical and horizontal vectors among all the vectors in the search range. Next, the first candidate vector selection unit 103 selects one unprocessed candidate vector (step S112).

第1の動き探索部104は、8×8ブロック内の4×4ブロックに対してステップS112で選択された候補ベクトルにおける4×4ブロックのSADを算出する(ステップS113)。8×8ブロック内の4つの4×4ブロックのSAD算出処理が終了していなければ(ステップS114のNO)、第1の動き探索部104は、ステップS113のSAD算出処理を各4×4ブロックに対して繰り返す。   The first motion search unit 104 calculates the SAD of the 4 × 4 block in the candidate vector selected in step S112 for the 4 × 4 block in the 8 × 8 block (step S113). If the SAD calculation process for four 4 × 4 blocks in the 8 × 8 block is not completed (NO in step S114), the first motion search unit 104 performs the SAD calculation process in step S113 for each 4 × 4 block. Repeat for.

4つのブロックのSAD算出処理が終了すれば(ステップS114のYES)、第2の動き探索部105は、4つの4×4ブロックのSADを合計した値を8×8ブロックのSADとして設定する(ステップS115)。すべての候補ベクトルのSAD算出処理が終了していなければ、ステップS112に戻る(ステップS116のNO)。すなわち、ステップS112からステップS115がすべての候補ベクトルに対して繰り返される。   When the SAD calculation process for four blocks is completed (YES in step S114), the second motion search unit 105 sets the sum of the four 4 × 4 block SADs as the 8 × 8 block SAD ( Step S115). If the SAD calculation process for all candidate vectors has not been completed, the process returns to step S112 (NO in step S116). That is, step S112 to step S115 are repeated for all candidate vectors.

すべての候補ベクトルのSAD算出処理が終了すれば(ステップS116のYES)、第1の動き探索部104は、ステップS113で算出された各候補ベクトルのSADを用いて4×4ブロックのレート歪みコストを算出し、コストが最小となる動きベクトルを選択する(ステップS117)。4つのブロックの動きベクトル探索が終了していなければ(ステップS118のNO)、第1の動き探索部104は、終了していないブロックに対してステップS117の処理を行う。すなわち、第1の動き探索部104は、ステップS117の処理を4つの4×4ブロックに対して繰り返す。   When the SAD calculation processing for all candidate vectors is completed (YES in step S116), the first motion search unit 104 uses the SAD of each candidate vector calculated in step S113 to rate rate distortion costs of 4 × 4 blocks. And the motion vector that minimizes the cost is selected (step S117). If the motion vector search for the four blocks has not ended (NO in step S118), the first motion search unit 104 performs the process of step S117 on the block that has not ended. That is, the first motion search unit 104 repeats the process of step S117 for four 4 × 4 blocks.

4つのブロックの動きベクトル探索が終了すれば(ステップS118のYES)、第2の動き探索部105は、ステップS115で算出された8×8ブロックのSADを用いて各候補ベクトルのレート歪みコストを算出し、コストが最小となる動きベクトルを選択する(ステップS119)。ベクトル修正部106は、4つの4×4ブロックのコストの合計と8×8ブロックのコストを比較し、4×4ブロックのコストの合計の方が大きければ(ステップS120のYES)、4つの4×4ブロックの動きベクトルを全て8×8ブロックの動きベクトルで修正する(ステップS121)。   When the motion vector search of the four blocks is completed (YES in step S118), the second motion search unit 105 calculates the rate distortion cost of each candidate vector using the 8 × 8 block SAD calculated in step S115. The motion vector that calculates and minimizes the cost is selected (step S119). The vector correction unit 106 compares the total cost of four 4 × 4 blocks with the cost of 8 × 8 blocks, and if the total cost of 4 × 4 blocks is larger (YES in step S120), the four four All the motion vectors of the × 4 block are corrected with the motion vector of the 8 × 8 block (step S121).

次に、ステップS102の密探索について図4を用いて詳細に説明する。図4は、第1の実施形態における動画像符号化システムの密探索部の動作を示すフローチャートである。   Next, the fine search in step S102 will be described in detail with reference to FIG. FIG. 4 is a flowchart showing the operation of the dense search unit of the moving picture coding system according to the first embodiment.

第2の候補ベクトル選出部107は、4×4ブロックごとに、粗探索で得られた動きベクトルのたとえば周囲±4ベクトルの範囲にある81個のベクトルを候補ベクトルとして算出する(ステップS130)。4つの4×4ブロックにおけるステップS130が終了していなければ(ステップS144のNO)、第2の候補ベクトル選出部107は、終了していないブロックに対してステップS130の処理を繰り返す。   The second candidate vector selection unit 107 calculates, for each 4 × 4 block, 81 vectors in the range of, for example, surrounding ± 4 vectors of motion vectors obtained by the coarse search as candidate vectors (step S130). If step S130 in the four 4 × 4 blocks has not been completed (NO in step S144), second candidate vector selection unit 107 repeats the process in step S130 for the blocks that have not been completed.

4つの4×4ブロックにおけるステップS130が終了すれば(ステップS144のYES)、第3の候補ベクトル選出部108は、8×8ブロックの候補ベクトルを選出する(ステップS131)。第3の候補ベクトル選出部108は、ステップS131において具体的には、ステップS130で選出した4×4ブロックの候補ベクトルのうち、8×8ブロックが内包する4つの4×4ブロックすべてで選出された候補ベクトルのみを8×8ブロックの候補ベクトルとして選出する。次に、第3の動き探索部109が、未処理の8×8ブロックの候補ベクトルをひとつ選択し(ステップS132)、各4×4ブロックにおけるSAD値を計算する(ステップS133)。   When step S130 for four 4 × 4 blocks is completed (YES in step S144), third candidate vector selection unit 108 selects an 8 × 8 block candidate vector (step S131). Specifically, in step S131, the third candidate vector selection unit 108 selects all four 4 × 4 blocks included in the 8 × 8 block among the 4 × 4 block candidate vectors selected in step S130. Only the candidate vectors are selected as 8 × 8 block candidate vectors. Next, the third motion search unit 109 selects one unprocessed 8 × 8 block candidate vector (step S132), and calculates the SAD value in each 4 × 4 block (step S133).

4つの4×4ブロックのSAD値の算出が終了すれば(ステップS134のYES)、第4の動き探索部110は、4つの4×4ブロックのSADを合計した値を8×8ブロックのSADとして設定する(ステップS135)。すべての8×8候補ベクトルの処理が終了していなければ(ステップS136のNO)、ステップS132に戻る。すなわち、密探索部102は、ステップS132からステップS135までをすべての8×8候補ベクトルに対して繰り返す。   When the calculation of the SAD values of the four 4 × 4 blocks is completed (YES in step S134), the fourth motion search unit 110 adds the SAD of the four 4 × 4 blocks to the SAD of the 8 × 8 block. (Step S135). If all the 8 × 8 candidate vectors have not been processed (NO in step S136), the process returns to step S132. That is, the dense search unit 102 repeats steps S132 to S135 for all 8 × 8 candidate vectors.

すべての8×8候補ベクトルの処理が終了すれば(ステップS136のYES)、第4の動き探索部110は、ステップS135で算出された8×8ブロックのSADを用いて各候補ベクトルのレート歪みコストを算出し、コストが最小となる動きベクトルを選択する(ステップS137)。   When the processing of all 8 × 8 candidate vectors is completed (YES in step S136), the fourth motion search unit 110 uses the SAD of the 8 × 8 block calculated in step S135 to rate distortion each candidate vector. The cost is calculated, and the motion vector that minimizes the cost is selected (step S137).

次に、第3の動き探索部109は、4つの4×4ブロックそれぞれに対して、ステップS130で選出した4×4ブロックの候補ベクトルのうち、ステップS132からステップS135の処理を行っていないベクトル、すなわち8×8ブロックの候補ベクトルに含まれない候補ベクトルを一つ選択し(ステップS138)、4×4ブロックのSADを算出する(ステップS139)。第3の動き探索部109は、ステップS138からステップS139を4×4ブロックの全ての候補ベクトルに対して繰り返す。ここで、8×8ブロックの候補ベクトルと処理する4×4ブロックの候補ベクトルが全て同じであれば、ステップS138からステップS141の処理は実施されない。   Next, the third motion search unit 109 does not perform the processing from step S132 to step S135 among the 4 × 4 block candidate vectors selected in step S130 for each of the four 4 × 4 blocks. That is, one candidate vector not included in the 8 × 8 block candidate vector is selected (step S138), and the SAD of the 4 × 4 block is calculated (step S139). The third motion search unit 109 repeats steps S138 to S139 for all candidate vectors of 4 × 4 blocks. If the 8 × 8 block candidate vectors and the 4 × 4 block candidate vectors to be processed are all the same, the processing from step S138 to step S141 is not performed.

すべての候補ベクトルの処理が終了すると(ステップS140のYES)、第4の動き探索部110は、ステップS139で算出された4×4ブロックのSADを用いて各候補ベクトルのレート歪みコストを算出し、コストが最小となる動きベクトルを選択する(ステップS141)。密探索部102は、ステップS138からステップS141を4つの4×4ブロックに対して繰り返す。   When the processing of all candidate vectors is completed (YES in step S140), the fourth motion search unit 110 calculates the rate distortion cost of each candidate vector using the 4 × 4 block SAD calculated in step S139. The motion vector that minimizes the cost is selected (step S141). The dense search unit 102 repeats steps S138 to S141 for four 4 × 4 blocks.

4つの4×4ブロックのステップS138からステップS141の処理が終了すると(ステップS142のYES)、ブロックサイズ選択部111は、4つの4×4ブロックのコストの合計と8×8ブロックのコストを比較し、小さい方のブロックサイズと動きベクトルを出力する(ステップS143)。   When the processing from step S138 to step S141 for four 4 × 4 blocks is completed (YES in step S142), the block size selection unit 111 compares the total cost of four 4 × 4 blocks with the cost of 8 × 8 blocks. Then, the smaller block size and motion vector are output (step S143).

本実施形態では、各画素の絶対値差分とSADの算出は4×4ブロックの動き探索である第1の動き探索部104と第3の動き探索部109のみが行う。そして、8×8ブロックの動き探索を行う第2の動き探索部105と第4の動き探索部110は、それぞれ第1の動き探索部104と第3の動き探索部109で得たSADの和のみを計算する。このため、本実施形態における動画像符号化システムは、動画4×4,8×8ブロックそれぞれに対して各画素の絶対値差分を算出してコストを計算する動き探索を行うよりも演算量を削減できる。また、密探索部102のみでSAD再利用を行う非特許文献2に記載された技術に対してもSAD演算数が増えることはない。   In the present embodiment, the absolute value difference of each pixel and the SAD are calculated only by the first motion search unit 104 and the third motion search unit 109, which are 4 × 4 block motion searches. Then, the second motion search unit 105 and the fourth motion search unit 110 that perform the motion search of 8 × 8 blocks are the sums of the SADs obtained by the first motion search unit 104 and the third motion search unit 109, respectively. Only calculate. For this reason, the moving image coding system according to the present embodiment has a larger amount of computation than the motion search for calculating the absolute value difference of each pixel and calculating the cost for each of the moving image 4 × 4, 8 × 8 blocks. Can be reduced. Further, the number of SAD operations does not increase even for the technique described in Non-Patent Document 2 in which SAD reuse is performed only by the dense search unit 102.

また、本実施形態の動画像符号化システムは、粗探索においても4つの4×4ブロックと8×8ブロックのレート歪みコスト比較を行い、8×8ブロックのレート歪みコストの方が小さい、すなわち8×8ブロックが適している可能性が高い場合には、4つの4×4ブロックの動きベクトルを同一とすることで密探索において8×8ブロックの候補ベクトルを多く選出することができる。そして、ブロックサイズ選択部111が8×8ブロックを選択する可能性が高くなり、またより適した8×8ブロックの動きベクトルが算出できるようになる。その結果、符号化効率が向上する。   In addition, the moving image coding system according to the present embodiment compares the rate distortion costs of four 4 × 4 blocks and 8 × 8 blocks even in a rough search, and the rate distortion cost of 8 × 8 blocks is smaller. When there is a high possibility that the 8 × 8 block is suitable, it is possible to select many candidate vectors of the 8 × 8 block in the dense search by making the motion vectors of the four 4 × 4 blocks the same. Then, there is a high possibility that the block size selection unit 111 selects an 8 × 8 block, and a more suitable 8 × 8 block motion vector can be calculated. As a result, encoding efficiency is improved.

また、本実施形態の動画像符号化システムは、粗探索の結果で8×8ブロックのコストの方が小さいとしても、密探索の探索範囲を変更するが、最終的なブロックサイズを限定しない。そのため、密探索の結果では小さいブロックのコストの方が小さければ、最終的には小さいブロックを選択する。よって密探索が終了するまで細かい動きをとらえる小さなブロックを選択する可能性がなくなることはない。   In addition, the moving image coding system according to the present embodiment changes the search range of the dense search even if the cost of the 8 × 8 block is smaller as a result of the coarse search, but does not limit the final block size. Therefore, if the cost of a small block is smaller as a result of the dense search, a small block is finally selected. Therefore, there is no possibility of selecting a small block that captures a fine movement until the dense search is completed.

本実施形態では、4×4ブロックと8×8ブロックでSAD値を再利用してブロックサイズを選択する例を述べたが、これに限らず8×8ブロックと16×16ブロックなど他のブロックサイズでSAD値を再利用したり、4×4ブロックのSAD値を8×8,16×16,32×32,64×64など複数のブロックサイズのブロックのSAD値に再利用してもよい。ブロックは正方形でなくともよく、例えば、ブロックサイズが4×8,8×4などでもよい。また、探索段階が、粗探索と密探索の2段階ではなく、3以上の多段階であってもよい。特に、小さいブロックサイズのSADをより大きいブロックサイズのSADに再利用する場合に、本実施形態における大きいブロックが選択されやすくなる効果が大きくなる。   In this embodiment, the example in which the block size is selected by reusing the SAD value in the 4 × 4 block and the 8 × 8 block has been described. However, the present invention is not limited to this, and other blocks such as the 8 × 8 block and the 16 × 16 block are used. SAD values may be reused by size, or SAD values of 4 × 4 blocks may be reused as SAD values of blocks having a plurality of block sizes such as 8 × 8, 16 × 16, 32 × 32, 64 × 64, etc. . The blocks need not be square, and for example, the block size may be 4 × 8, 8 × 4, or the like. Further, the search stage may be three stages or more, not the two stages of the coarse search and the fine search. In particular, when the SAD having a small block size is reused for the SAD having a larger block size, the effect of easily selecting a large block in the present embodiment is increased.

また、本実施形態では、歪み量の指標としてSADを用いているが、二乗差和SSD(Sum of Squared Difference)など、内包する小ブロックの値の合計が大ブロックの値となる他の指標を用いてもよい。   In this embodiment, SAD is used as a distortion amount index. However, other indices such as a sum of squared difference (SSD) sum of small block values included in the large block value are used. It may be used.

実施形態2.
本実施形態は、動き探索アルゴリズムに縮小画像を用いた階層探索を用いることを特徴とする。階層探索では、縮小した画像で粗探索を行い、本来のサイズの画像で密探索を行うことで、高探索精度で広範囲の探索が可能である。
Embodiment 2. FIG.
The present embodiment is characterized by using a hierarchical search using a reduced image as a motion search algorithm. In the hierarchical search, a wide search can be performed with high search accuracy by performing a coarse search with a reduced image and a dense search with an original size image.

本実施形態の構成例を図5から図6に示す。本実施形態の構成は、第1の実施形態の構成に画像を縮小する縮小部204が追加された構成である。図5は、第2の実施形態における動画像符号化システムの構成を示すブロック図である。図6は、第2の実施形態における動画像符号化システムのサブ探索部の構成を示すブロック図である。図5および図6に示す各構成要素は、例えば、特定の演算処理等を行うよう設計されたハードウェア、またはプログラムに従って動作するコンピュータによって実現される。また、そのプログラムは、非一時的でコンピュータが読み取り可能な記憶媒体に記憶される。   Configuration examples of the present embodiment are shown in FIGS. The configuration of this embodiment is a configuration in which a reduction unit 204 that reduces an image is added to the configuration of the first embodiment. FIG. 5 is a block diagram illustrating a configuration of a moving image coding system according to the second embodiment. FIG. 6 is a block diagram illustrating a configuration of a sub search unit of the moving image coding system according to the second embodiment. Each component shown in FIGS. 5 and 6 is realized by, for example, hardware designed to perform specific arithmetic processing or the like, or a computer that operates according to a program. The program is stored in a non-transitory computer-readable storage medium.

縮小部204は、例えば縦横1/2ずつに現画像と参照画像それぞれを縮小する。本実施形態における粗探索部201,密探索部202は、16×16サイズブロックごとに処理を行う。また、第1の候補ベクトル選出部203は、縮小画像における探索範囲の全てのベクトルを候補ベクトルとして選出する。画像を縦横1/2に縮小しているので、候補ベクトル数は全探索の1/4となる。縮小された画像で第1の動き探索部104と第2の動き探索部105はそれぞれ4×4ブロックと8×8ブロックの動き探索を第1の実施形態と同様にSAD再利用を用いて行う。ベクトル修正部106も第1の実施形態と同様に4×4ブロックの動きベクトルを修正する。縮小画像における4×4ブロック、8×8ブロックは縮小しない画像の8×8ブロック、16×16ブロックに対応する。   The reduction unit 204 reduces the current image and the reference image, for example, by 1/2 in the vertical and horizontal directions. The coarse search unit 201 and the fine search unit 202 in this embodiment perform processing for each 16 × 16 size block. The first candidate vector selection unit 203 selects all vectors in the search range in the reduced image as candidate vectors. Since the image is reduced to 1/2 in the vertical and horizontal directions, the number of candidate vectors is 1/4 of the total search. In the reduced image, the first motion search unit 104 and the second motion search unit 105 perform motion search of 4 × 4 blocks and 8 × 8 blocks, respectively, using SAD reuse as in the first embodiment. . Similarly to the first embodiment, the vector correction unit 106 corrects the motion vector of 4 × 4 blocks. The 4 × 4 block and the 8 × 8 block in the reduced image correspond to the 8 × 8 block and the 16 × 16 block of the image that is not reduced.

密探索では粗探索により決定された動きベクトルの周囲を縮小しない画像を用いて探索する。密探索部202は、8×8ブロックごとに処理する4つのサブ探索部205と、16×16ブロックの候補ベクトルを算出する第3の候補ベクトル選出部206と、16×16ブロックの動き探索を行う第4の動き探索部207とを備える。   In the dense search, the search is performed using an image that is not reduced around the motion vector determined by the coarse search. The dense search unit 202 performs four sub search units 205 that process each 8 × 8 block, a third candidate vector selection unit 206 that calculates a candidate vector of 16 × 16 blocks, and a motion search of 16 × 16 blocks. And a fourth motion search unit 207 to perform.

図6に示すサブ探索部205は、8×8ブロックごとに4×4ブロックと8×8ブロックの動き探索を行う。サブ探索部205は、第2の候補ベクトル選出部107と第3の動き探索部109と第5の動き探索部112とを備える。   The sub search unit 205 shown in FIG. 6 performs motion search of 4 × 4 blocks and 8 × 8 blocks for each 8 × 8 block. The sub search unit 205 includes a second candidate vector selection unit 107, a third motion search unit 109, and a fifth motion search unit 112.

第2の候補ベクトル選出部107は、各4×4ブロックの候補ベクトルを選出する。たとえば粗探索で得られた動きベクトルの周囲±1ベクトルの範囲にある9個のベクトルを候補ベクトルとする。4つの4×4ブロックは、粗探索では同一の8×8ブロックに対応するため、密探索における4×4ブロックそれぞれの候補ベクトルと8×8ブロックの候補ベクトルは必ず全て同一である。   The second candidate vector selection unit 107 selects 4 × 4 block candidate vectors. For example, nine vectors in the range of ± 1 vector around the motion vector obtained by the coarse search are set as candidate vectors. Since the four 4 × 4 blocks correspond to the same 8 × 8 block in the coarse search, the candidate vectors of the 4 × 4 block and the candidate vector of the 8 × 8 block in the dense search are all the same.

第3の動き探索部109は、第2の候補ベクトル選出部107により選出された候補ベクトルに対して4×4ブロック単位で動き探索を行い最小コストとなる動きベクトルを選択する。第3の動き探索部109は、各候補ベクトルに対するSAD値を第5の動き探索部112に出力する。   The third motion search unit 109 performs a motion search in units of 4 × 4 blocks on the candidate vectors selected by the second candidate vector selection unit 107, and selects a motion vector having the minimum cost. The third motion search unit 109 outputs the SAD value for each candidate vector to the fifth motion search unit 112.

第5の動き探索部112は、第2の候補ベクトル選出部107が選出した各候補ベクトルに対して、第3の動き探索部109が算出したSADを4ブロック分合計することにより8×8ブロックのSADを算出してレート歪みコストを算出し、最小コストとなる動きベクトルを選択する。   The fifth motion search unit 112 sums four blocks of the SAD calculated by the third motion search unit 109 for each candidate vector selected by the second candidate vector selection unit 107 to obtain 8 × 8 blocks. The SAD is calculated to calculate the rate distortion cost, and the motion vector having the minimum cost is selected.

第3の候補ベクトル選出部206は、16×16ブロックの候補ベクトルを選出する。具体的には、第2の候補ベクトル選出部107が選出した候補ベクトルのうち、16×16ブロックが内包する4つの8×8ブロックすべてについて選出された候補ベクトルのみを16×16ブロックの候補ベクトルとして選出する。4つの8×8ブロックの探索範囲が異なれば16×16ブロックの候補ベクトルは選出されないこともある。   The third candidate vector selection unit 206 selects a 16 × 16 block candidate vector. Specifically, among the candidate vectors selected by the second candidate vector selection unit 107, only candidate vectors selected for all four 8 × 8 blocks included in the 16 × 16 block are selected as 16 × 16 block candidate vectors. Elected as. If the search ranges of four 8 × 8 blocks are different, a candidate vector of 16 × 16 blocks may not be selected.

第4の動き探索部207は、第3の候補ベクトル選出部206が選出した各候補ベクトルに対して、第3の動き探索部109が算出したSADを16ブロック分合計することにより16×16ブロックのSADを算出してレート歪みコストを算出し、最小コストとなる動きベクトルを選択する。   The fourth motion search unit 207 adds 16 blocks of SAD calculated by the third motion search unit 109 to each candidate vector selected by the third candidate vector selection unit 206 to obtain 16 × 16 blocks. The SAD is calculated to calculate the rate distortion cost, and the motion vector having the minimum cost is selected.

ブロックサイズ選択部208は、16つの4×4ブロックについて算出された動きベクトルのレート歪みコストの合計と、4つの8×8ブロックで求めた動きベクトルのレート歪みコストの合計と、16×16ブロックで求めた動きベクトルのレート歪みコストを比較し、最小のブロックサイズとそのブロックにおける動きベクトルを出力する。   The block size selection unit 208 calculates the sum of the rate distortion costs of the motion vectors calculated for the 16 4 × 4 blocks, the sum of the rate distortion costs of the motion vectors calculated for the four 8 × 8 blocks, and the 16 × 16 blocks. Compare the rate distortion cost of the motion vector obtained in step 1, and output the minimum block size and the motion vector in that block.

次に本実施形態の動作例を図7から図9を用いて説明する。図7は、第2の実施形態における動画像符号化システムの動作の概要を示すフローチャートである。図7に示すように、本実施形態の動画像符号化システムにおける動き推定では、まず、縮小部204が、現画像と参照画像を例えば縦横1/2に縮小する(ステップS201)。   Next, an operation example of the present embodiment will be described with reference to FIGS. FIG. 7 is a flowchart showing an outline of the operation of the moving picture coding system according to the second embodiment. As shown in FIG. 7, in the motion estimation in the moving image coding system according to the present embodiment, first, the reduction unit 204 reduces the current image and the reference image to, for example, ½ in the vertical and horizontal directions (step S201).

そして、粗探索部201は、ある16×16ブロックの探索範囲に対して縮小された画像で動き探索を行い動きベクトルを選択する(ステップS202)。次に、密探索部202は、粗探索部201が選択した動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択する(ステップS203)。全ブロックの処理が終了していなければ(ステップS204のNO)ステップS202に戻り、ステップS204がYESになるまでステップS202からステップS204の処理が繰り返される。画像が1/2に縮小されているのでステップS202では、16×16ブロックの縦横1/2サイズである8×8ブロック単位で処理が行われることになる。   Then, the rough search unit 201 performs a motion search on an image reduced with respect to a search range of a certain 16 × 16 block and selects a motion vector (step S202). Next, the dense search unit 202 selects a motion vector by performing a motion search of a predetermined range of vectors around the motion vector selected by the coarse search unit 201 (step S203). If all the blocks have not been processed (NO in step S204), the process returns to step S202, and the processes from step S202 to step S204 are repeated until step S204 becomes YES. Since the image has been reduced to ½, in step S202, processing is performed in units of 8 × 8 blocks, which are ½ size of 16 × 16 blocks.

次に、ステップS202の粗探索について図8を用いて、詳細に説明する。図8は、第2の実施形態における動画像符号化システムの粗探索部の動作を示すフローチャートである。図8に示す本実施形態における粗探索は、図3に示す実施形態1におけるステップS101の粗探索のうち、第1の候補ベクトル選出部203の動作であるステップS211のみが異なる。ステップS211では、第1の候補ベクトル選出部203は、縮小画像における探索範囲の全てのベクトルを候補ベクトルとして選出する。図3に示す実施形態1と同様の処理については説明を省略する。   Next, the rough search in step S202 will be described in detail with reference to FIG. FIG. 8 is a flowchart showing the operation of the coarse search unit of the video encoding system in the second embodiment. The coarse search in the present embodiment shown in FIG. 8 is different from the coarse search in step S101 in the first embodiment shown in FIG. 3 only in step S211 which is the operation of the first candidate vector selection unit 203. In step S211, the first candidate vector selection unit 203 selects all vectors in the search range in the reduced image as candidate vectors. The description of the same processing as that of the first embodiment shown in FIG. 3 is omitted.

次にステップS203の密探索について図9を用いて詳細に説明する。図9は、第2の実施形態における動画像符号化システムの密探索部の動作を示すフローチャートである。粗探索での4×4ブロックは密探索での8×8ブロックに、粗探索での8×8ブロックは密探索での16×16ブロックにそれぞれ対応する。   Next, the fine search in step S203 will be described in detail with reference to FIG. FIG. 9 is a flowchart showing the operation of the dense search unit of the video encoding system in the second embodiment. The 4 × 4 block in the coarse search corresponds to the 8 × 8 block in the fine search, and the 8 × 8 block in the coarse search corresponds to the 16 × 16 block in the fine search.

第2の候補ベクトル選出部107は、8×8ブロックごとに、たとえば粗探索で4×4ブロックの動きベクトルとして得られたベクトルの周囲±1ベクトルの範囲にある9個のベクトルを候補ベクトルとして算出する(ステップS231)。この8×8ブロックの候補ベクトルは、内包する4つの4×4ブロックの候補ベクトルとしても使用される。   For each 8 × 8 block, the second candidate vector selection unit 107 uses, for example, nine vectors in the range of ± 1 vector around the vector obtained as a motion vector of 4 × 4 blocks in the coarse search as candidate vectors. Calculate (step S231). The 8 × 8 block candidate vectors are also used as four 4 × 4 block candidate vectors.

4つの8×8ブロックにおけるステップS231の処理が終了すれば(ステップS230のYES)、第3の候補ベクトル選出部206は、16×16ブロックの候補ベクトルを選出する(ステップS232)。ステップS232では、第3の候補ベクトル選出部206は、ステップS231で選出された8×8ブロックの候補ベクトルのうち、16×16ブロックが内包する4つの8×8ブロックすべてで選出された候補ベクトルのみを16×16ブロックの候補ベクトルとして選出する。   If the process of step S231 in four 8 × 8 blocks is completed (YES in step S230), the third candidate vector selection unit 206 selects a candidate vector of 16 × 16 blocks (step S232). In step S232, the third candidate vector selection unit 206 selects candidate vectors selected from all four 8 × 8 blocks included in the 16 × 16 block among the 8 × 8 block candidate vectors selected in step S231. Are selected as candidate vectors of 16 × 16 blocks.

次に、第3の動き探索部109は、未処理の16×16ブロックの候補ベクトルをひとつ選択する(ステップS233)。そして、第3の動き探索部109は、16×16ブロックに内包する16個の4×4ブロックにおけるSAD値を計算する(ステップS133a)。   Next, the third motion search unit 109 selects one unprocessed 16 × 16 block candidate vector (step S233). Then, the third motion search unit 109 calculates SAD values in 16 4 × 4 blocks included in the 16 × 16 block (step S133a).

16個の4×4ブロックのSAD値の算出が終了すれば(ステップS235のYES)、第5の動き探索部112は、4つの4×4ブロックのSADを合計した値を8×8ブロックのSADとして設定する(ステップS135a)。また、第4の動き探索部207は、16つの4×4ブロックのSADを合計した値を16×16ブロックのSADとして設定する(ステップS236)。密探索部202は、ステップS233からステップS236までをすべての16×16ブロックの候補ベクトルに対して繰り返す。   When the calculation of the 16 4 × 4 block SAD values is completed (YES in step S235), the fifth motion search unit 112 adds the value obtained by adding the four 4 × 4 block SADs to the 8 × 8 block. The SAD is set (step S135a). Further, the fourth motion search unit 207 sets a value obtained by summing up the 16 4 × 4 block SADs as the 16 × 16 block SADs (step S236). The dense search unit 202 repeats Step S233 to Step S236 for all 16 × 16 block candidate vectors.

すべての16×16ブロックの候補ベクトルの処理が終了すれば(ステップS237のYES)、第4の動き探索部207は、ステップS236で算出された16×16ブロックのSADを用いて各候補ベクトルのレート歪みコストを算出し、コストが最小となる動きベクトルを選択する(ステップS238)。   When the processing of all 16 × 16 block candidate vectors is completed (YES in step S237), the fourth motion search unit 207 uses the 16 × 16 block SAD calculated in step S236 to calculate each candidate vector. The rate distortion cost is calculated, and the motion vector that minimizes the cost is selected (step S238).

次に、第3の動き探索部109は、8×8ブロックに内包する4つの4×4ブロックそれぞれに対して、ステップS231で選出した8×8ブロックの候補ベクトルのうち、ステップS233からステップS237の処理を行っていないベクトル、すなわち16×16ブロックの候補ベクトルに含まれない候補ベクトルを一つ選択し(ステップS239)、4×4ブロックのSADを算出する(ステップS133b)。ステップS239とステップS133bを4つの4×4ブロックに対して繰り返す。   Next, the third motion search unit 109 performs step S233 to step S237 out of the 8 × 8 block candidate vectors selected in step S231 for each of the four 4 × 4 blocks included in the 8 × 8 block. One candidate vector that is not included in the above process, that is, a candidate vector that is not included in the candidate vector of the 16 × 16 block is selected (step S239), and the SAD of the 4 × 4 block is calculated (step S133b). Steps S239 and S133b are repeated for four 4 × 4 blocks.

8×8ブロック内の4つの4×4ブロックにおけるステップS239とステップS133bの処理が終了すると(ステップS245のYES)、第5の動き探索部112は、4つの4×4ブロックのSADを合計した値を8×8ブロックのSADとして設定する(ステップS135b)。密探索部202は、ステップS239からステップS246を8×8ブロックの全ての候補ベクトルに対して繰り返す。ここで、16×16ブロックの候補ベクトルと処理する8×8ブロックの候補ベクトルが全て同じであれば、ステップS239からステップS246は実施されない。   When the processing of step S239 and step S133b in the four 4 × 4 blocks in the 8 × 8 block ends (YES in step S245), the fifth motion search unit 112 sums up the SADs of the four 4 × 4 blocks. The value is set as an SAD of 8 × 8 blocks (step S135b). The dense search unit 202 repeats steps S239 to S246 for all candidate vectors of 8 × 8 blocks. If the 16 × 16 block candidate vectors and the 8 × 8 block candidate vectors to be processed are all the same, steps S239 to S246 are not performed.

すべての候補ベクトルの処理が終了すると(ステップS246のYES)、第3の動き探索部109は、ステップS133bで算出された4×4ブロックのSADを用いて各候補ベクトルのレート歪みコストを算出し、コストが最小となる4×4ブロックの動きベクトルを選択する(ステップS141)。   When the processing of all candidate vectors is completed (YES in step S246), the third motion search unit 109 calculates the rate distortion cost of each candidate vector using the 4 × 4 block SAD calculated in step S133b. Then, the motion vector of the 4 × 4 block that minimizes the cost is selected (step S141).

第5の動き探索部112は、ステップS135bで算出された8×8ブロックのSADを用いて各候補ベクトルのレート歪みコストを算出し、コストが最小となる8×8ブロックの動きベクトルを選択する(ステップS137)。ステップS239からステップS137を4つの8×8ブロックに対して繰り返す。4つの8×8ブロックのステップS239からステップS137の処理が終了すると(ステップS247のYES)、ブロック選択部208が決定したブロックサイズと動きベクトルを出力する(ステップS238)。   The fifth motion search unit 112 calculates the rate distortion cost of each candidate vector using the 8 × 8 block SAD calculated in step S135b, and selects the 8 × 8 block motion vector that minimizes the cost. (Step S137). Steps S239 to S137 are repeated for four 8 × 8 blocks. When the processing from step S239 to step S137 for four 8 × 8 blocks is completed (YES in step S247), the block size and motion vector determined by the block selection unit 208 are output (step S238).

ステップS248では、ブロックサイズ選択部208は、まず各8×8ブロックについて4つの4×4ブロックのコストの合計と8×8ブロックのコストを比較し、小さい方のブロックサイズを選択する。そして、ブロックサイズ選択部208は、選択された8×8もしくは4つの4×4のコストを4つの8×8ブロック分合計した値と16×16のコストを比較し、最小となるブロックサイズを決定する。16×16サイズのコストが最小ではない場合、4つの8×8ブロックにおけるブロックサイズは独立であり、8×8を選択したブロックと4×4を選択したブロックが混在してよい。   In step S248, the block size selection unit 208 first compares the total cost of four 4 × 4 blocks with the cost of 8 × 8 blocks for each 8 × 8 block, and selects the smaller block size. Then, the block size selection unit 208 compares the selected 8 × 8 or four 4 × 4 costs for the four 8 × 8 blocks with the cost of 16 × 16, and determines the minimum block size. decide. When the cost of the 16 × 16 size is not the minimum, the block sizes of the four 8 × 8 blocks are independent, and the block that has selected 8 × 8 and the block that has selected 4 × 4 may be mixed.

本実施形態では、探索アルゴリズムに階層探索を用いることで、より大きなブロックサイズ内の小ブロックの密探索での候補ベクトルが同一となりやすく、より大きなブロックサイズが選択されやすくなり、圧縮効率が向上する。   In this embodiment, by using a hierarchical search for the search algorithm, candidate vectors in a dense search of a small block within a larger block size are likely to be the same, a larger block size is easily selected, and compression efficiency is improved. .

実施形態3.
本実施形態の動画像符号化システムの構成は、第2の実施形態に示した構成よりも階層探索を多階層に用いることを特徴とする。図10は、第3の実施形態における動画像符号化システムの構成を示すブロック図である。また、図11は、第3の実施形態における動画像符号化システムのサブ探索部の構成を示すブロック図である。図10および図11に示す各構成要素は、例えば、特定の演算処理等を行うよう設計されたハードウェア、またはプログラムに従って動作するコンピュータによって実現される。また、そのプログラムは、非一時的でコンピュータが読み取り可能な記憶媒体に記憶される。
Embodiment 3. FIG.
The configuration of the moving picture coding system according to the present embodiment is characterized in that hierarchical search is used in multiple layers as compared with the configuration shown in the second embodiment. FIG. 10 is a block diagram illustrating a configuration of a moving image encoding system according to the third embodiment. FIG. 11 is a block diagram illustrating a configuration of a sub search unit of the moving picture coding system according to the third embodiment. Each component shown in FIGS. 10 and 11 is realized by, for example, hardware designed to perform specific arithmetic processing or the like, or a computer that operates according to a program. The program is stored in a non-transitory computer-readable storage medium.

本実施形態の動画像符号化システム構成は、画像を1/8に縮小する縮小部391と、1/4に縮小する縮小部392と、1/2に縮小する縮小部393と、各縮小画像における動き探索とベクトル修正を行う第1階層探索部301と、第2階層探索部302と,第3階層探索部303と,縮小しない画像における動き探索とブロックサイズ選択を行う第4階層探索部304とを備える。   The moving image coding system configuration of the present embodiment includes a reduction unit 391 that reduces an image to 8, a reduction unit 392 that reduces the image to ¼, a reduction unit 393 that reduces the image to ½, and each reduced image. A first hierarchical search unit 301 that performs motion search and vector correction in FIG. 2, a second hierarchical search unit 302, a third hierarchical search unit 303, and a fourth hierarchical search unit 304 that performs motion search and block size selection in an image that is not reduced. With.

第1階層探索部301は、縮小された8×8ブロック単位で処理を行う。第2階層探索部302は、縮小された16×16ブロック単位で処理を行う。第3階層探索部303は、縮小された32×32ブロック単位で処理を行う。第4階層探索部304は、64×64ブロック単位処理を行う。   The first hierarchy search unit 301 performs processing in units of reduced 8 × 8 blocks. Second hierarchy search unit 302 performs processing in units of reduced 16 × 16 blocks. The third hierarchy search unit 303 performs processing in units of reduced 32 × 32 blocks. The fourth hierarchy search unit 304 performs 64 × 64 block unit processing.

第1階層探索部301の構成は第2の実施形態における粗探索部201の構成と同一である。   The configuration of the first hierarchy search unit 301 is the same as the configuration of the coarse search unit 201 in the second embodiment.

第2階層探索部302における第3の候補ベクトル選出部206,第4の動き探索部207は、第2の実施形態における密探索部202の各構成要素と同一である。サブ探索部385は、第2の実施形態におけるサブ探索部205にベクトル修正部389を追加した構成である。   The third candidate vector selection unit 206 and the fourth motion search unit 207 in the second hierarchy search unit 302 are the same as the components of the dense search unit 202 in the second embodiment. The sub search unit 385 has a configuration in which a vector correction unit 389 is added to the sub search unit 205 in the second embodiment.

ベクトル修正部389は、ベクトル修正部106と同様に8×8ブロックのコストが4つの4×4ブロックのコストの合計よりも小さければ、4つの4×4ブロックの動きベクトルを8×8ブロックにおける動きベクトルに修正し出力する。   Similar to the vector correction unit 106, the vector correction unit 389 converts the motion vectors of four 4 × 4 blocks into the 8 × 8 block if the cost of the 8 × 8 block is smaller than the total cost of the four 4 × 4 blocks. Correct to motion vector and output.

ベクトル修正部308は、さらに第4の動き探索部207から取得した16×16ブロックのコストとサブ探索部385から得られるコストを比較し、16×16ブロックのコストが小さければ、16つの4×4ブロックの動きベクトルを16×16ブロックにおける動きベクトルに修正し出力する。   The vector correction unit 308 further compares the cost of the 16 × 16 block acquired from the fourth motion search unit 207 with the cost obtained from the sub search unit 385. If the cost of the 16 × 16 block is small, The motion vector of 4 blocks is corrected to a motion vector of 16 × 16 blocks and output.

第3階層探索部303は、4つの第2階層探索部302と、32×32ブロックの候補ベクトルを算出する第4の候補ベクトル選出部316と、32×32ブロックの動き探索を行う第6の動き探索部317とベクトル修正部318を備える。第2階層探索部302は、16×16ブロック単位で処理を行う。   The third hierarchy search unit 303 includes four second hierarchy search units 302, a fourth candidate vector selection unit 316 that calculates a 32 × 32 block candidate vector, and a sixth search that performs a 32 × 32 block motion search. A motion search unit 317 and a vector correction unit 318 are provided. Second hierarchy search unit 302 performs processing in units of 16 × 16 blocks.

第4の候補ベクトル選出部316は、第2階層探索部302における内包する64つの4×4ブロックすべてで選出された候補ベクトルのみを32×32ブロックの候補ベクトルとして選出する。   The fourth candidate vector selection unit 316 selects only candidate vectors selected in all 64 4 × 4 blocks included in the second hierarchy search unit 302 as 32 × 32 block candidate vectors.

第6の動き探索部317は、第4の候補ベクトル選出部316で選出した各候補ベクトルに対して、第2階層探索部302内部の第3の動き探索部109が算出した4×4ブロックのSADを64ブロック分合計することで32×32ブロックのSADを求めてレート歪みコストを算出し、最小コストとなる動きベクトルを選択する。   For each candidate vector selected by the fourth candidate vector selection unit 316, the sixth motion search unit 317 calculates 4 × 4 blocks calculated by the third motion search unit 109 inside the second hierarchy search unit 302. The SAD of 64 blocks is totaled to obtain the SAD of 32 × 32 blocks, the rate distortion cost is calculated, and the motion vector having the minimum cost is selected.

ベクトル修正部318は、第6の動き探索部317で得られた32×32ブロックのコストと第2階層探索部302の結果のコストを比較し、32×32ブロックのコストが小さければ、64つの4×4ブロックの動きベクトルを32×32ブロックにおける動きベクトルに修正し出力する。   The vector correction unit 318 compares the cost of the 32 × 32 block obtained by the sixth motion search unit 317 with the cost of the result of the second hierarchy search unit 302. If the cost of the 32 × 32 block is small, A 4 × 4 block motion vector is corrected to a 32 × 32 block motion vector and output.

第4階層探索部304は、4つの第3階層探索部303と、64×64ブロックの候補ベクトルを算出する第5の候補ベクトル選出部326と、64×64ブロックの動き探索を行う第7の動き探索部327とブロック選択部328とを備える。   The fourth hierarchy search unit 304 includes four third hierarchy search units 303, a fifth candidate vector selection unit 326 that calculates 64 × 64 block candidate vectors, and a seventh search that performs 64 × 64 block motion search. A motion search unit 327 and a block selection unit 328 are provided.

第3階層探索部303は、32×32ブロック単位で処理を行う。第5の候補ベクトル選出部326は、第3階層探索部303における内包する256つの4×4ブロックすべてで選出された候補ベクトルのみを64×64ブロックの候補ベクトルとして選出する。   The third hierarchy search unit 303 performs processing in units of 32 × 32 blocks. The fifth candidate vector selection unit 326 selects only candidate vectors selected by all 256 4 × 4 blocks included in the third hierarchy search unit 303 as 64 × 64 block candidate vectors.

第7の動き探索部327は、第5の候補ベクトル選出部326が選出した各候補ベクトルに対して、第3階層探索部303内部の第3の動き探索部109が算出した4×4ブロックのSADを256ブロック分合計することで64×64ブロックのSADを求めてレート歪みコストを算出し、最小コストとなる動きベクトルを選択する。   For each candidate vector selected by the fifth candidate vector selection unit 326, the seventh motion search unit 327 calculates the 4 × 4 blocks calculated by the third motion search unit 109 inside the third hierarchy search unit 303. The SAD of 256 blocks is totaled to obtain the SAD of 64 × 64 blocks, the rate distortion cost is calculated, and the motion vector having the minimum cost is selected.

ブロックサイズ選択部328は、第3階層探索部303が算出した4×4ブロック、8×8ブロック、16×16ブロック、32×32ブロックの動きベクトルのコストの合計それぞれと、第7の動き探索部327が算出した4×64ブロックの動きベクトルのコストを比較し、最小のブロックサイズとそのブロックにおける動きベクトルを出力する。   The block size selection unit 328 includes each of the total motion vector costs of the 4 × 4 block, the 8 × 8 block, the 16 × 16 block, and the 32 × 32 block calculated by the third hierarchy search unit 303, and the seventh motion search. The cost of the motion vector of the 4 × 64 block calculated by the unit 327 is compared, and the minimum block size and the motion vector in the block are output.

次に、本実施形態における動画像符号化システムの第2〜4階層探索部の動作を説明する。第1階層探索部301の動作は、第2の実施形態における粗探索の動作と同様であるため、図示および説明を省略する。図12は、第3の実施形態における動画像符号化システムの第2階層探索部の動作を示すフローチャートである。図12におけるステップS231からステップS237は、図9に示す第2の実施形態における密探索の動作と同じであるため、説明を省略する。   Next, the operation of the second to fourth hierarchical search units of the video encoding system in the present embodiment will be described. Since the operation of the first hierarchy search unit 301 is the same as the operation of the coarse search in the second embodiment, illustration and description thereof are omitted. FIG. 12 is a flowchart showing the operation of the second hierarchy search unit of the video encoding system in the third embodiment. Steps S231 to S237 in FIG. 12 are the same as the dense search operation in the second embodiment shown in FIG.

ベクトル修正部389は、ベクトル修正部106と同様に8×8ブロックのコストと4つの4×4ブロックのコストの合計を比較する。8×8ブロックのコストが小さければ(ステップS321のYES)、ベクトル修正部389は、4つの4×4ブロックの動きベクトルを8×8ブロックにおける動きベクトルに修正し出力する(ステップS322)。   Similar to the vector correction unit 106, the vector correction unit 389 compares the cost of the 8 × 8 block with the total cost of the four 4 × 4 blocks. If the cost of the 8 × 8 block is small (YES in step S321), the vector correction unit 389 corrects the motion vectors of the 4 × 4 blocks to the motion vectors in the 8 × 8 block and outputs them (step S322).

ベクトル修正部308は、さらに第4の動き探索部207から取得した16×16ブロックのコストとサブ探索部385から得られたコストを比較する。16×16ブロックのコストが小さければ(ステップS323のYES)、ベクトル修正部308は、16つの4×4ブロックの動きベクトルを16×16ブロックにおける動きベクトルに修正し出力する(ステップS324)。   The vector correction unit 308 further compares the cost of the 16 × 16 block acquired from the fourth motion search unit 207 with the cost acquired from the sub search unit 385. If the cost of the 16 × 16 block is small (YES in step S323), the vector correction unit 308 corrects the motion vector of the 16 4 × 4 blocks to the motion vector in the 16 × 16 block and outputs the motion vector (step S324).

図13は、第3の実施形態における動画像符号化システムの第3階層探索部の動作を示すフローチャートである。第4の候補ベクトル選出部316は、第2階層探索部302における内包する64つの4×4ブロックすべてで選出された候補ベクトルのみを32×32ブロックの候補ベクトルとして選出する(ステップS331)。 FIG. 13 is a flowchart showing the operation of the third hierarchy search unit of the video encoding system in the third embodiment. The fourth candidate vector selection unit 316 selects only candidate vectors selected in all 64 4 × 4 blocks included in the second hierarchical search unit 302 as 32 × 32 block candidate vectors (step S331).

第6の動き探索部317は、第4の候補ベクトル選出部316が選出した各候補ベクトルに対して、第2階層探索部内部の第3の動き探索部109が算出した4×4ブロックのSADを64ブロック分合計することにより32×32ブロックのSADを算出する(ステップS332)。また、第6の動き探索部317は、算出した32×32ブロックのSADを用いてレート歪みコストを算出し、最小コストとなる動きベクトルを選択する(ステップS333)。   For each candidate vector selected by the fourth candidate vector selection unit 316, the sixth motion search unit 317 calculates the 4 × 4 block SAD calculated by the third motion search unit 109 inside the second hierarchy search unit. Is calculated for 64 blocks to calculate SAD of 32 × 32 blocks (step S332). Also, the sixth motion search unit 317 calculates a rate distortion cost using the calculated 32 × 32 block SAD, and selects a motion vector having the minimum cost (step S333).

ベクトル修正部318は、第6の動き探索部317から得られた32×32ブロックのコストと第2階層探索部302から得られた4×4ブロックのコストを比較する。32×32ブロックのコストが小さければ(ステップS334のYES)、64つの4×4ブロックの動きベクトルを32×32ブロックにおける動きベクトルに修正し出力する(ステップS335)。   The vector correction unit 318 compares the 32 × 32 block cost obtained from the sixth motion search unit 317 with the 4 × 4 block cost obtained from the second hierarchy search unit 302. If the cost of the 32 × 32 block is small (YES in step S334), the 64 4 × 4 block motion vectors are corrected to the motion vector in the 32 × 32 block and output (step S335).

図14は、第3の実施形態における動画像符号化システムの第4階層探索部の動作を示すフローチャートである。第5の候補ベクトル選出部326は、第3階層探索部303における内包する256つの4×4ブロックすべてで選出された候補ベクトルのみを64×64ブロックの候補ベクトルとして選出する(ステップS341)。 FIG. 14 is a flowchart showing the operation of the fourth layer search unit of the video encoding system in the third embodiment. The fifth candidate vector selection unit 326 selects only candidate vectors selected in all 256 4 × 4 blocks included in the third hierarchy search unit 303 as 64 × 64 block candidate vectors (step S341).

第7の動き探索部327は、第5の候補ベクトル選出部326が選出した各候補ベクトルに対して、第3階層探索部303内部の第1の動き探索部109が算出した4×4ブロックのSADを256ブロック分合計することにより64×64ブロックのSADを算出する(ステップS342)。また、第7の動き探索部327は、レート歪みコストを算出し、最小コストとなる動きベクトルを選択する(ステップS343)。   For each candidate vector selected by the fifth candidate vector selection unit 326, the seventh motion search unit 327 calculates the 4 × 4 blocks calculated by the first motion search unit 109 in the third hierarchy search unit 303. A SAD of 64 × 64 blocks is calculated by summing up 256 blocks of SAD (step S342). Further, the seventh motion search unit 327 calculates a rate distortion cost and selects a motion vector having the minimum cost (step S343).

ブロックサイズ選択部328は、第3階層探索部303で求めた4×4ブロック、8×8ブロック、16×16ブロック、32×32ブロックの動きベクトルのコストの各合計と、第7の動き探索部327で求めた64×64ブロックの動きベクトルのコストを比較し、最小のブロックサイズとそのブロックにおける動きベクトルを出力する(ステップS344)。   The block size selection unit 328 calculates the sum of the motion vector costs of the 4 × 4 block, the 8 × 8 block, the 16 × 16 block, and the 32 × 32 block obtained by the third hierarchy search unit 303, and the seventh motion search. The cost of the motion vector of the 64 × 64 block obtained by the unit 327 is compared, and the minimum block size and the motion vector in the block are output (step S344).

本実施形態では、各階層におけるベクトル修正により、フレーム間の動きが複雑であっても64×64ブロック内の全ての4×4ブロックの候補ベクトルが同一、つまり64×64ブロックのコスト比較ができる可能性が高くなる。これにより、大きいブロックサイズを含む、より画像に適したブロックサイズを選択することができる。
画像の縮小率やブロックサイズは上記に限定するものではない。
In this embodiment, the vector correction in each layer enables the candidate vectors of all 4 × 4 blocks in the 64 × 64 block to be the same, that is, the cost comparison of 64 × 64 blocks, even if the motion between frames is complicated. The possibility increases. Thereby, it is possible to select a block size more suitable for an image including a large block size.
The image reduction ratio and block size are not limited to the above.

図15は、本発明による動画像符号化システムの概要を示すブロック図である。本発明による動画像符号化システムは、現画像と参照画像との間の動きベクトルを用いる動画像符号化システムであって、探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択する粗探索手段1と、粗探索手段1が選択した動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択する密探索手段2とを備える。粗探索手段1は、第1のサイズのブロック単位で現画像画素と参照画像画素の差分値を算出し、差分値から得られる指標により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択する第1の動き探索手段3と、第1のサイズより小さい第2のサイズのブロック単位で、第1の動き探索手段が算出した差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択する第2の動き探索手段4と、第1の動きベクトルのコストと第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正手段5とを含む。密探索手段2は、当該密探索手段2が選択した動きベクトルにもとづいてブロックサイズを決定するブロックサイズ選択手段6を含む。   FIG. 15 is a block diagram showing an outline of a moving picture coding system according to the present invention. A moving image coding system according to the present invention is a moving image coding system that uses a motion vector between a current image and a reference image, and performs motion search of a part of vectors within a search range to select a motion vector. Coarse search means 1 and dense search means 2 for selecting a motion vector by performing a motion search of a predetermined range of vectors around the motion vector selected by the coarse search means 1 are provided. The coarse search means 1 calculates a difference value between the current image pixel and the reference image pixel in units of a block of the first size, and calculates a motion vector that minimizes the cost calculated by an index obtained from the difference value as the first motion. The cost calculated by the index obtained from the difference value calculated by the first motion search means in the block unit of the first motion search means 3 to be selected as a vector and the second size smaller than the first size is minimized. Second motion search means 4 for selecting a motion vector to be used as the second motion vector, and vector correction for correcting the motion vector using the magnitude relationship between the cost of the first motion vector and the cost of the second motion vector Means 5. The fine search means 2 includes a block size selection means 6 that determines a block size based on the motion vector selected by the fine search means 2.

また、上記の各実施形態には、以下の(1)〜(6)に示す動画像符号化システムも示されている。   Also, in each of the above embodiments, the moving image encoding system shown in the following (1) to (6) is also shown.

(1)現画像と参照画像との間の動きベクトルを用いる動画像符号化システムであって、探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択する粗探索手段(例えば、粗探索部101、粗探索部201または第1階層探索部301)と、粗探索手段が選択した動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択する密探索手段(例えば、密探索部102、密探索部202または第4階層探索部304)とを備え、粗探索手段は、第1のサイズのブロック(例えば、4×4ブロック)単位で現画像画素と参照画像画素の差分値を算出し、差分値から得られる指標(例えば、SAD値)により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択する第1の動き探索手段(例えば、第1の動き探索部104)と、第1のサイズより小さい第2のサイズのブロック(例えば、8×8ブロック)単位で、第1の動き探索手段が算出した差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択する第2の動き探索手段(例えば、第2の動き探索部105)と、第1の動きベクトルのコストと第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正手段(例えば、ベクトル修正部106、ベクトル修正部308、またはベクトル修正部318)とを含み、密探索手段は、当該密探索手段が選択した動きベクトルにもとづいてブロックサイズを決定するブロックサイズ選択手段(例えば、ブロックサイズ選択部111、ブロックサイズ選択部208またはブロックサイズ選択部328)を含む動画像符号化システム。 (1) A moving image coding system that uses a motion vector between a current image and a reference image, and performs coarse search means (for example, coarse search) that performs motion search of a part of a vector within a search range and selects a motion vector. The search unit 101, the coarse search unit 201, or the first hierarchical search unit 301) and a fine search unit (for example, a fine search unit) that performs motion search of a predetermined range of vectors around the motion vector selected by the coarse search unit and selects a motion vector. The coarse search means includes a difference between the current image pixel and the reference image pixel in units of a first size block (for example, 4 × 4 blocks). A first motion search means (for example, selecting a motion vector having a minimum cost calculated by an index (for example, SAD value) obtained from the difference value as the first motion vector. The first motion search unit 104) and an index obtained from the difference value calculated by the first motion search means in units of blocks (for example, 8 × 8 blocks) having a second size smaller than the first size. A second motion search means (for example, the second motion search unit 105) that selects a motion vector that minimizes the calculated cost as the second motion vector; the cost of the first motion vector and the second motion Vector correction means (for example, the vector correction section 106, the vector correction section 308, or the vector correction section 318) that corrects the motion vector using the magnitude relationship of the vector costs, and the dense search means Block size selection means (for example, block size selection unit 111, block size selection unit 20) that determines the block size based on the selected motion vector Or moving picture coding system including a block size selector 328).

(2)動画像符号化システムは、粗探索手段が、探索範囲内の複数の動きベクトルのうちの一部を第1の候補ベクトルとして選出する第1の候補ベクトル選出手段(例えば、第1の候補ベクトル選出部103、または第1の候補ベクトル選出部203)を備え、第1の動き探索手段が、第1のサイズのブロック単位で、第1の候補ベクトルに対して動き探索を行い、第1の候補ベクトルの中から、現画像画素と参照画像画素の差分値から得られる指標から算出するコストが最小となる動きベクトルを選択し、第2の動き探索手段は、第2のサイズのブロック単位で、第1の候補ベクトルに対して当該第2のサイズのブロックが内包する第1のサイズのブロックについて動き探索を行い、第1の候補ベクトルの中から、第1の動き探索手段が算出した画素差分値を集計することにより得られる指標から算出するコストが最小となる動きベクトルを選択し、第1のサイズのブロックは、第2のサイズのブロックを分割して複数得られるブロックであり、ベクトル修正手段は、第1の動きベクトルのコストの合計が第2の動きベクトルのコストよりも大きければ、第1のサイズのブロックにおける第1の動きベクトルを第2のサイズのブロックにおける第2の動きベクトルで更新するように構成されていてもよい。 (2) In the moving image encoding system, the coarse search means selects first candidate vector selection means (for example, the first candidate vector) in which a part of the plurality of motion vectors within the search range is selected as the first candidate vector. A candidate vector selection unit 103 or a first candidate vector selection unit 203), wherein the first motion search means performs a motion search on the first candidate vector in units of blocks of the first size, The motion vector that minimizes the cost calculated from the index obtained from the difference value between the current image pixel and the reference image pixel is selected from the one candidate vector, and the second motion search means selects the block of the second size For each unit, a motion search is performed for the first size block included in the second size block with respect to the first candidate vector, and the first motion search means calculates from the first candidate vector. The motion vector that minimizes the cost calculated from the index obtained by summing the pixel difference values obtained is selected, and the first size block is a block obtained by dividing the second size block. The vector correction means converts the first motion vector in the first size block to the second size in the second size block if the total cost of the first motion vector is greater than the cost of the second motion vector. It may be configured to update with the motion vector.

(3)動画像符号化システムは、密探索手段が、粗探索手段が選択した動きベクトルを起点として得られる動きベクトルである第2の候補ベクトルを選出する第2の候補ベクトル選出手段(例えば、第2の候補ベクトル選出部107)と、第2の候補ベクトルのうち、第2のサイズのブロックが内包するすべての第1のサイズのブロックにおいて第2の候補ベクトルが選出されている場合に、当該第2の候補ベクトルを第3の候補ベクトルとして選出する第3の候補ベクトル選出手段(例えば、第3の候補ベクトル選出部108、第3の候補ベクトル選出部206)と、第1のサイズのブロック単位で、第2の候補ベクトルに対して現画像画素と参照画像画素の差分値を算出し、差分値を集計することにより得られる指標からコストを算出し、当該コストが最小となる動きベクトルを第3の動きベクトルとして選択する第3の動き探索手段(例えば、第3の動き探索部109)と、第2のサイズのブロック単位で、第3の候補ベクトルに対して、当該第2のサイズのブロックが内包する第1のサイズのブロックについて第3の動き探索手段が算出した差分値から得られる指標からコストを算出し、当該コストが最小となる動きベクトルを第4の動きベクトルとして選択する第4の動き探索手段(例えば、第4の動き探索部110または第4の動き探索部207)とを備え、ブロックサイズ選択手段が、第2のサイズのブロックに内包する第1のサイズのブロックにおける第3の動きベクトルのコストの合計と、第2のサイズのブロックにおける第4の動きベクトルのコストにもとづいて、いずれかのブロックサイズを選択し、選択したブロックサイズのブロックにおいて算出した動きベクトルを出力するように構成されていてもよい。 (3) In the moving image encoding system, the dense search means selects second candidate vector selection means (for example, a second candidate vector that is a motion vector obtained using the motion vector selected by the coarse search means as a starting point (for example, The second candidate vector selection unit 107), and when the second candidate vector is selected in all the first size blocks included in the second size block among the second candidate vectors, Third candidate vector selection means (for example, third candidate vector selection unit 108, third candidate vector selection unit 206) for selecting the second candidate vector as a third candidate vector, and a first size In block units, the difference value between the current image pixel and the reference image pixel is calculated for the second candidate vector, and the cost is calculated from the index obtained by aggregating the difference values. Third motion search means (for example, the third motion search unit 109) that selects a motion vector that minimizes the cost as the third motion vector, and a third candidate vector in units of blocks of the second size On the other hand, the cost is calculated from the index obtained from the difference value calculated by the third motion search means for the first size block included in the second size block, and the motion vector that minimizes the cost 4th motion search means (for example, the 4th motion search part 110 or the 4th motion search part 207), and the block size selection means is a block of the second size. Based on the total cost of the third motion vector in the block of the first size included in the block and the cost of the fourth motion vector in the block of the second size. Te, select one of the block size, it may be configured to output a motion vector calculated at block of the selected block size.

(4)動画像符号化システムは、密探索手段が、第1のサイズのブロックより小さいサイズのブロック単位で、第3の動き探索手段が算出した差分値から得られる指標により算出されるコストが最小となる動きベクトルを選択する少なくとも一つの動き探索手段(例えば、第5の動き探索部112)をさらに備え、ブロックのサイズは、所定の最大サイズを階層的に分割したサイズであり、ブロックサイズ選択手段が、第3の動き探索手段(例えば、第3の動き探索部109)、第4の動き探索手段(例えば、第4の動き探索部207)および動き探索手段(例えば、第5の動き探索部112)を含む3つ以上の動き探索手段から得た動きベクトルを取得し、ブロックサイズを選択するように構成されていてもよい。このような構成によれば、探索アルゴリズムに階層探索を用いることで、より大きなブロックサイズ内の小ブロックの密探索での候補ベクトルが同一となりやすく、より大きなブロックサイズが選択されやすくなり、圧縮効率が向上する。 (4) In the moving image encoding system, the cost calculated by the index obtained from the difference value calculated by the third motion search means in the block search unit having a size smaller than that of the first size block by the dense search means. It further includes at least one motion search means (for example, the fifth motion search unit 112) that selects a minimum motion vector, and the block size is a size obtained by hierarchically dividing a predetermined maximum size, and the block size The selection means includes third motion search means (eg, third motion search unit 109), fourth motion search means (eg, fourth motion search unit 207), and motion search means (eg, fifth motion The motion vector obtained from three or more motion search means including the search unit 112) may be acquired and a block size may be selected. According to such a configuration, by using a hierarchical search as a search algorithm, candidate vectors in a dense search of a small block within a larger block size are likely to be the same, a larger block size is easily selected, and compression efficiency is improved. Will improve.

(5)動画像符号化システムは、現画像と参照画像とを縮小する縮小手段(例えば、縮小部204、または縮小部391)を備え、粗探索手段は、縮小されたブロックサイズにおいて動き探索を行うように構成されていてもよい。 (5) The moving image encoding system includes a reduction unit (for example, the reduction unit 204 or the reduction unit 391) that reduces the current image and the reference image, and the coarse search unit performs a motion search in the reduced block size. It may be configured to do.

(6)動画像符号化システムは、異なる縮小率に現画像と参照画像とを縮小する複数の縮小手段(例えば、縮小部391、縮小部392または縮小部393)と、縮小手段から画像を取得し、所定の最大サイズを階層的に分割した異なるサイズのブロックについて動き探索を行う1つ以上の階層探索手段(例えば、第2階層探索部302または3階層探索部303)をさらに備え、密探索部(例えば、4階層探索部304)および各階層探索手段(例えば、第2階層探索部302または3階層探索部303)は、1階層上位の探索手段が行う処理を行い動きベクトルを選択する上位階層探索手段(例えば、サブ探索部385、第2階層探索部302または3階層探索部303)と、対象階層の候補ベクトルを選出する対象階層候補ベクトル選出手段(例えば、第3の候補ベクトル選出部206、第4の候補ベクトル選出部316または第5の候補ベクトル選出部326)と、対象階層の動き探索を行い動きベクトルを選択する対象階層動き探索手段(例えば、第4の動き探索部207、第6の動き探索部317または第7の動き探索部327)と上位階層探索手段が選択した動きベクトルのコストと、対象階層動き探索手段が選択した動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正手段(例えば、ベクトル修正部308、ベクトル修正部318またはベクトル修正部328)とを含むように構成されていてもよい。 (6) The moving image coding system acquires a plurality of reduction units (for example, the reduction unit 391, the reduction unit 392, or the reduction unit 393) that reduce the current image and the reference image at different reduction rates, and images from the reduction unit And further comprising one or more hierarchy search means (for example, the second hierarchy search section 302 or the three hierarchy search section 303) for performing motion search on blocks of different sizes obtained by hierarchically dividing a predetermined maximum size. Units (for example, the four-layer search unit 304) and each layer search unit (for example, the second layer search unit 302 or the three-layer search unit 303) perform processing performed by the search unit one layer higher and select a motion vector. Hierarchy search means (for example, sub search unit 385, second hierarchy search unit 302 or three hierarchy search unit 303), and target hierarchy candidate vector selection for selecting candidate vectors for the target hierarchy Means (for example, third candidate vector selection unit 206, fourth candidate vector selection unit 316 or fifth candidate vector selection unit 326), and target hierarchy motion search means for selecting a motion vector by performing a motion search of the target hierarchy (For example, the fourth motion search unit 207, the sixth motion search unit 317, or the seventh motion search unit 327) and the cost of the motion vector selected by the upper layer search unit and the motion selected by the target layer motion search unit Vector correction means (for example, the vector correction unit 308, the vector correction unit 318, or the vector correction unit 328) that corrects the motion vector using the magnitude relation of the cost of the vector may be included.

本発明は、符号化効率を保ちつつ演算量を削減することができるため、高解像度映像の高速処理を実現することができ、例えば、高解像度処理を要求する撮像システムやトランスコードシステムなどに有用である。   Since the present invention can reduce the amount of calculation while maintaining the encoding efficiency, it can realize high-speed processing of high-resolution video, and is useful for, for example, an imaging system or a transcoding system that requires high-resolution processing. It is.

1 粗探索手段
2 密探索手段
3 第1の動き探索手段
4 第2の動き探索手段
5 ベクトル修正手段
6 ブロックサイズ選択手段
101、201 粗探索部
102、202 密探索部
104 第1の動き探索部
105 第2の動き探索部
106、308、318 ベクトル修正部
111、208、328 ブロックサイズ選択部
1 coarse search means 2 dense search means 3 first motion search means 4 second motion search means 5 vector correction means 6 block size selection means 101, 201 coarse search parts 102, 202 dense search part 104 first motion search part 105 Second motion search unit 106, 308, 318 Vector correction unit 111, 208, 328 Block size selection unit

Claims (8)

現画像と参照画像との間の動きベクトルを用いる動画像符号化システムであって、
探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択する粗探索手段と、
前記粗探索手段が選択した動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択する密探索手段とを備え、
前記粗探索手段は、
第1のサイズのブロック単位で現画像画素と参照画像画素の差分値を算出し、前記差分値から得られる指標により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択する第1の動き探索手段と、
前記第1のサイズより大きい第2のサイズのブロック単位で、前記第1の動き探索手段が算出した差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択する第2の動き探索手段と、
前記第1の動きベクトルのコストと前記第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正手段とを含み、
前記密探索手段は、
当該密探索手段が選択した前記動きベクトルにもとづいてブロックサイズを決定するブロックサイズ選択手段を含む
ことを特徴とする動画像符号化システム。
A video encoding system using a motion vector between a current image and a reference image,
A coarse search means for selecting a motion vector by performing a motion search of a part of the vectors within the search range;
Fine search means for selecting a motion vector by performing a motion search of a predetermined range of vectors around the motion vector selected by the coarse search means,
The rough search means includes
A difference value between the current image pixel and the reference image pixel is calculated for each block of the first size, and a motion vector having a minimum cost calculated by an index obtained from the difference value is selected as the first motion vector. 1 motion search means;
The motion vector that minimizes the cost calculated by the index obtained from the difference value calculated by the first motion search means in a block unit of the second size larger than the first size is used as the second motion vector. A second motion search means to select;
Vector correction means for correcting a motion vector using a magnitude relationship between the cost of the first motion vector and the cost of the second motion vector;
The dense search means includes:
A moving picture coding system comprising block size selection means for determining a block size based on the motion vector selected by the dense search means.
粗探索手段は、
探索範囲内の動きベクトルのうちの一部を第1の候補ベクトルとして選出する第1の候補ベクトル選出手段を備え、
第1の動き探索手段は、第1のサイズのブロック単位で、第1の候補ベクトルに対して動き探索を行い、前記第1の候補ベクトルの中から、現画像画素と参照画像画素の差分値から得られる指標から算出するコストが最小となる動きベクトルを選択し、

第2の動き探索手段は、第2のサイズのブロック単位で、第1の候補ベクトルに対して当該第2のサイズのブロックが内包する第1のサイズのブロックについて動き探索を行い、前記第1の候補ベクトルの中から、前記第1の動き探索手段が算出した画素差分値を集計することにより得られる指標から算出するコストが最小となる動きベクトルを選択し、
前記第1のサイズのブロックは、前記第2のサイズのブロックを分割して複数得られるブロックであり、
ベクトル修正手段は、第1の動きベクトルのコストの合計が第2の動きベクトルのコストよりも大きければ、前記第1のサイズのブロックにおける第1の動きベクトルを前記第2のサイズのブロックにおける第2の動きベクトルで更新する
請求項1記載の動画像符号化システム。
The coarse search means
First candidate vector selection means for selecting a part of motion vectors within the search range as a first candidate vector;
The first motion search means performs a motion search on the first candidate vector in units of blocks of the first size, and the difference value between the current image pixel and the reference image pixel from the first candidate vector. Select the motion vector that minimizes the cost calculated from the index obtained from

The second motion search means performs a motion search on a first size block included in the second size block with respect to the first candidate vector in units of a second size block, and Selecting a motion vector that minimizes the cost calculated from the index obtained by aggregating the pixel difference values calculated by the first motion search means from the candidate vectors of
The first size block is a block obtained by dividing the second size block to obtain a plurality of blocks,
The vector correction means may convert the first motion vector in the first size block into the second size block if the total cost of the first motion vector is greater than the cost of the second motion vector. The moving picture coding system according to claim 1, wherein the moving picture coding system is updated with two motion vectors.
密探索手段は、
粗探索手段が選択した動きベクトルを起点として得られる動きベクトルである第2の候補ベクトルを選出する第2の候補ベクトル選出手段と、
第2の候補ベクトルのうち、第2のサイズのブロックが内包するすべての第1のサイズのブロックにおいて前記第2の候補ベクトルが選出されている場合に、当該第2の候補ベクトルを第3の候補ベクトルとして選出する第3の候補ベクトル選出手段と、
第1のサイズのブロック単位で、前記第2の候補ベクトルに対して現画像画素と参照画像画素の差分値を算出し、前記差分値を集計することにより得られる指標からコストを算出し、当該コストが最小となる動きベクトルを第3の動きベクトルとして選択する第3の動き探索手段と、
第2のサイズのブロック単位で、前記第3の候補ベクトルに対して、当該第2のサイズのブロックが内包する第1のサイズのブロックについて前記第3の動き探索手段が算出した差分値から得られる指標からコストを算出し、当該コストが最小となる動きベクトルを第4の動きベクトルとして選択する第4の動き探索手段とを備え、
ブロックサイズ選択手段は、
前記第2のサイズのブロックに内包する前記第1のサイズのブロックにおける第3の動きベクトルのコストの合計と、前記第2のサイズのブロックにおける前記第4の動きベクトルのコストにもとづいて、いずれかのブロックサイズを選択し、選択したブロックサイズのブロックにおいて算出した動きベクトルを出力する
請求項1または請求項2記載の動画像符号化システム。
The dense search means
Second candidate vector selection means for selecting a second candidate vector that is a motion vector obtained from the motion vector selected by the coarse search means;
Among the second candidate vectors, when the second candidate vector is selected in all the first size blocks included in the second size block, the second candidate vector is selected as the third candidate vector. Third candidate vector selection means for selecting candidate vectors;
Calculating a difference value between a current image pixel and a reference image pixel with respect to the second candidate vector in a block of a first size, calculating a cost from an index obtained by aggregating the difference values, A third motion search means for selecting a motion vector having a minimum cost as the third motion vector;
Obtained from the difference value calculated by the third motion search means for the first size block included in the second size block with respect to the third candidate vector in units of second size blocks. A fourth motion search means for calculating a cost from the index and selecting a motion vector that minimizes the cost as a fourth motion vector;
Block size selection means
Based on the total cost of the third motion vector in the block of the first size included in the block of the second size and the cost of the fourth motion vector in the block of the second size, The moving picture coding system according to claim 1, wherein the block size is selected, and a motion vector calculated in a block having the selected block size is output.
密探索手段は、第2のサイズのブロックより大きいサイズのブロック単位で、第3の動き探索手段が算出した差分値から得られる指標により算出されるコストが最小となる動きベクトルを選択する少なくとも一つの動き探索手段をさらに備え、
前記ブロックのサイズは、所定の最大サイズを階層的に分割したサイズであり、
ブロックサイズ選択手段は、第3の動き探索手段、第4の動き探索手段および前記動き探索手段を含む3つ以上の動き探索手段から得た動きベクトルを取得し、ブロックサイズを選択する
請求項3記載の動画像符号化システム。
The dense search means selects at least one motion vector that minimizes the cost calculated by the index obtained from the difference value calculated by the third motion search means in block units of a size larger than the second size block. Two motion search means,
The size of the block is a size obtained by hierarchically dividing a predetermined maximum size,
The block size selection unit acquires a motion vector obtained from three or more motion search units including a third motion search unit, a fourth motion search unit, and the motion search unit, and selects a block size. The moving image encoding system described.
現画像と参照画像とを縮小する縮小手段を備え、
粗探索手段は、縮小されたブロックサイズにおいて動き探索を行う
請求項1から請求項4のうちのいずれか1項に記載の動画像符号化システム。
A reduction means for reducing the current image and the reference image;
The moving image encoding system according to any one of claims 1 to 4, wherein the coarse search means performs a motion search with a reduced block size.
異なる縮小率に現画像と参照画像とを縮小する複数の縮小手段と、
前記縮小手段から画像を取得し、所定の最大サイズを階層的に分割した異なるサイズのブロックについて動き探索を行う1つ以上の階層探索手段をさらに備え、
密探索部および各前記階層探索手段は、
1階層上位の探索手段が行う処理の少なくとも一部を行い動きベクトルを選択する上位階層探索手段と、
対象階層の候補ベクトルを選出する対象階層候補ベクトル選出手段と、
対象階層の動き探索を行い動きベクトルを選択する対象階層動き探索手段と
前記上位階層探索手段が選択した動きベクトルのコストと、前記対象階層動き探索手段が選択した動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正手段とを含む
請求項5に記載の動画像符号化システム。
A plurality of reduction means for reducing the current image and the reference image to different reduction ratios;
One or more hierarchical search means for acquiring an image from the reduction means and performing a motion search on blocks of different sizes obtained by hierarchically dividing a predetermined maximum size;
The dense search unit and each of the hierarchy search means
Upper hierarchy search means for selecting a motion vector by performing at least a part of processing performed by the search means higher by one hierarchy;
Target hierarchy candidate vector selection means for selecting candidate vectors for the target hierarchy;
Using target hierarchy motion search means for performing motion search of the target hierarchy and selecting a motion vector, using the magnitude relationship between the cost of the motion vector selected by the higher hierarchy search means and the cost of the motion vector selected by the target hierarchy motion search means The moving image encoding system according to claim 5, further comprising: vector correcting means for correcting the motion vector.
探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択し、選択された前記動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択することにより、現画像と参照画像との間の動きベクトルを検出して符号化を行う動画像符号化方法であって、
第1のサイズのブロック単位で現画像画素と参照画像画素の差分値を算出し、前記差分値から得られる指標により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択し、
前記第1のサイズより大きい第2のサイズのブロック単位で、前記差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択し、
前記第1の動きベクトルのコストと前記第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正し、
修正された前記動きベクトルの周囲の所定範囲のベクトルの動き探索を行うことにより選択された動きベクトルにもとづいて、ブロックサイズを決定する
ことを特徴とする動画像符号化方法。
The current image and the reference image are selected by performing a motion search of a part of the vectors in the search range and selecting a motion vector, and performing a motion search of a vector in a predetermined range around the selected motion vector and selecting a motion vector. A moving image encoding method for detecting and encoding a motion vector between
Calculating a difference value between a current image pixel and a reference image pixel in a block unit of a first size, and selecting a motion vector having a minimum cost calculated by an index obtained from the difference value as the first motion vector;
Selecting, as a second motion vector, a motion vector that minimizes the cost calculated by the index obtained from the difference value in block units of a second size larger than the first size;
Correcting a motion vector using a magnitude relationship between the cost of the first motion vector and the cost of the second motion vector;
A moving picture encoding method comprising: determining a block size based on a motion vector selected by performing a motion search for a vector in a predetermined range around the corrected motion vector.
コンピュータに、
探索範囲内の一部のベクトルの動き探索を行い動きベクトルを選択し、選択された前記動きベクトルの周囲の所定範囲のベクトルの動き探索を行い動きベクトルを選択することにより、現画像と参照画像との間の動きベクトルを検出して符号化を行わせるための動画像符号化プログラムであって、
コンピュータに、
第1のサイズのブロック単位で現画像画素と参照画像画素の差分値を算出し、前記差分値から得られる指標により算出されるコストが最小となる動きベクトルを第1の動きベクトルとして選択する第1の動き探索処理と、
前記第1のサイズより大きい第2のサイズのブロック単位で、前記差分値から得られる指標により算出されるコストが最小となる動きベクトルを第2の動きベクトルとして選択する第2の動き探索処理と、
前記第1の動きベクトルのコストと前記第2の動きベクトルのコストの大小関係を用いて動きベクトルを修正するベクトル修正処理と、
修正された前記動きベクトルの周囲の所定範囲のベクトルの動き探索を行うことにより選択された動きベクトルにもとづいて、ブロックサイズを決定するブロックサイズ決定処理とを
実行させるための動画像符号化プログラム。
On the computer,
The current image and the reference image are selected by performing a motion search of a part of the vectors in the search range and selecting a motion vector, and performing a motion search of a vector in a predetermined range around the selected motion vector and selecting a motion vector. A video encoding program for detecting and encoding a motion vector between
On the computer,
A difference value between the current image pixel and the reference image pixel is calculated for each block of the first size, and a motion vector having a minimum cost calculated by an index obtained from the difference value is selected as the first motion vector. 1 motion search process;
A second motion search process for selecting, as a second motion vector, a motion vector having a minimum cost calculated by an index obtained from the difference value in a block unit of a second size larger than the first size; ,
A vector correction process for correcting a motion vector using a magnitude relationship between the cost of the first motion vector and the cost of the second motion vector;
A moving picture encoding program for executing block size determination processing for determining a block size based on a motion vector selected by performing motion search of a vector in a predetermined range around the corrected motion vector.
JP2015060969A 2015-03-24 2015-03-24 Moving picture encoding system, moving picture encoding method and program for encoding moving picture Pending JP2016181799A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015060969A JP2016181799A (en) 2015-03-24 2015-03-24 Moving picture encoding system, moving picture encoding method and program for encoding moving picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015060969A JP2016181799A (en) 2015-03-24 2015-03-24 Moving picture encoding system, moving picture encoding method and program for encoding moving picture

Publications (1)

Publication Number Publication Date
JP2016181799A true JP2016181799A (en) 2016-10-13

Family

ID=57131976

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015060969A Pending JP2016181799A (en) 2015-03-24 2015-03-24 Moving picture encoding system, moving picture encoding method and program for encoding moving picture

Country Status (1)

Country Link
JP (1) JP2016181799A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018191246A (en) * 2017-05-11 2018-11-29 キヤノン株式会社 Moving image encoding device, moving image encoding method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018191246A (en) * 2017-05-11 2018-11-29 キヤノン株式会社 Moving image encoding device, moving image encoding method and program

Similar Documents

Publication Publication Date Title
RU2696237C2 (en) Video decoding method
TWI634777B (en) Method of searching reference patches
JP5612215B2 (en) Block information encoding / decoding method using quadtree and apparatus using the method
JP5918354B2 (en) Reference picture list management method and apparatus using the method
JP2020527001A (en) Point group encoder
CN110383841B (en) Method, encoder, decoder and medium for video encoding or decoding
WO2010064396A1 (en) Moving picture decoding method and moving picture encoding method
JP2017139771A (en) Image encoding and decoding method and device
JP2010016453A (en) Image encoding apparatus and method, image decoding apparatus and method, and program
JP5306485B2 (en) Motion vector predictive coding method, motion vector predictive decoding method, moving picture coding apparatus, moving picture decoding apparatus, and programs thereof
JP2011114572A (en) Image encoding apparatus, image decoding apparatus, image encoding method, and image decoding method
JP2014204207A (en) Block size determination method, video encoder, and program
RU2721160C1 (en) Method and device for decoding image based on intra prediction in image encoding system
JP2016134860A (en) Dynamic image encoding device, dynamic image encoding method and dynamic image encoding computer program
JP6962193B2 (en) A recording medium that stores a moving image coding device, a moving image coding method, and a moving image coding program.
RU2562414C1 (en) Method for fast selection of spatial prediction mode in hevc coding system
JP2016181799A (en) Moving picture encoding system, moving picture encoding method and program for encoding moving picture
US20210334603A1 (en) Dividing pattern determination device capable of reducing amount of computation, dividing pattern determination method, learning device, learning method, and storage medium
JP2011019190A (en) Image processing apparatus, and image processing method
US11528485B2 (en) Encoding apparatus and program
KR102306884B1 (en) Image encoding apparatus, image decoding apparatus and program
JP2017050744A (en) Image encoding apparatus, image encoding method and program
JP6992815B2 (en) Video coding device, video coding method and video coding program
JP7027044B2 (en) Image coding device, image coding method and program
KR102009634B1 (en) Method and apparatus for coding image compensation information and decoding using the same