JP2011142564A - Device, method, and program for encoding dynamic image - Google Patents

Device, method, and program for encoding dynamic image Download PDF

Info

Publication number
JP2011142564A
JP2011142564A JP2010002960A JP2010002960A JP2011142564A JP 2011142564 A JP2011142564 A JP 2011142564A JP 2010002960 A JP2010002960 A JP 2010002960A JP 2010002960 A JP2010002960 A JP 2010002960A JP 2011142564 A JP2011142564 A JP 2011142564A
Authority
JP
Japan
Prior art keywords
pixels
pixel
motion vector
reduced
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2010002960A
Other languages
Japanese (ja)
Other versions
JP5353719B2 (en
Inventor
Tomohito Shimada
智史 島田
Akira Nakagawa
章 中川
Yoshikazu Shimada
美和 嶋田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010002960A priority Critical patent/JP5353719B2/en
Publication of JP2011142564A publication Critical patent/JP2011142564A/en
Application granted granted Critical
Publication of JP5353719B2 publication Critical patent/JP5353719B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To control the detection of an erroneous size-reduced moving vector without incrementing the arithmetic operation cost for a dynamic image as an encoding object having high-frequency components in the vertical or horizontal direction. <P>SOLUTION: In the hierarchical search of the moving vectors, a size-reduced image is generated by image sampling after storing the pixels not always present in the same column of the input frame in the same column or storing the pixels not always present in the same row of the input image in the same row. Thereafter, moving vector search is conducted in association with the respective pixels of the generated size-reduced image on the basis of coordinates in the input frame. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は動画像を圧縮・伸張する技術に関する。   The present invention relates to a technique for compressing / decompressing moving images.

近年、動画像をデジタル信号として取り扱い、デジタル動画像データを圧縮符号化して記録、伝送することが一般化している。動画像圧縮の符号化フォーマットとして、国際標準規格であるMPEG(Moving Picture Experts Group)やH.26xなどが用いられている。   In recent years, it has become common to handle moving images as digital signals and to record and transmit digital moving image data after compression encoding. As an encoding format for moving image compression, MPEG (Moving Picture Experts Group), which is an international standard, or H.264. 26x or the like is used.

これらの動画像圧縮符号化方式は、動き補償フレーム間予測を採用している。動き補償フレーム間予測の技術では、符号化対象の画像フレームを複数のブロックに分割し、ブロック単位に処理を行う。   These video compression encoding systems employ motion compensated interframe prediction. In the motion compensation interframe prediction technique, an image frame to be encoded is divided into a plurality of blocks, and processing is performed in units of blocks.

すなわち、各ブロックを対象として、時間的に前に符号化処理された画像フレーム(以下、参照フレームと呼ぶ)の中のその対象ブロックの近傍に位置する動き探索範囲から、上記対象ブロックと同じ大きさの複数のブロック(以下、参照ブロックと呼ぶ)を切り出し、これらの参照ブロックのうちで、上記対象ブロックに最も近似した参照ブロックを探し出す。   That is, from the motion search range located in the vicinity of the target block in an image frame (hereinafter referred to as a reference frame) previously encoded with respect to each block, the same size as the target block is set. A plurality of blocks (hereinafter referred to as reference blocks) are cut out, and among these reference blocks, a reference block closest to the target block is searched for.

次に、最も近似した参照ブロックの位置座標に関する情報と,その対象ブロックと探し出された参照ブロックとの差分情報を符号化し、それによりその対象ブロックに対する符号列を生成する。各対象ブロックと、そのブロックから見た探し出された参照ブロックの相対位置座標を動きベクトルという。このような動きベクトル探索は、H.264,MPEG−2,MPEG−4,VC−1など,通常の動画像信号の符号化処理で行われる。
[従来の動きベクトル探索方法]
以下、このような動きベクトルを探索するための従来の動きベクトル探索方法を説明する。
Next, information on the position coordinates of the closest reference block and difference information between the target block and the searched reference block are encoded, thereby generating a code string for the target block. The relative position coordinates of each target block and the searched reference block viewed from the block are called motion vectors. Such a motion vector search is described in H.264. 264, MPEG-2, MPEG-4, VC-1, and the like are performed by a normal moving image signal encoding process.
[Conventional motion vector search method]
Hereinafter, a conventional motion vector search method for searching for such a motion vector will be described.

図1は、符号化対象となるフレーム(符号化フレーム)について説明する図である。符号化フレーム10は、n×m画素のマクロブロックを複数有しており、例えば図1では、横16画素、縦16画素から構成されるマクロブロック11を複数有するものとしている。縦1088画素,横1920画素からなるHDTV(High Definition TV)解像度の動画像の場合であれば、マクロブロックは縦68個(=1088/16),横120個(=1920/16)が並ぶことになる。符号化の対象とするブロックを符号化ブロックといい、例として図1のマクロブロック12を符号化ブロックとする。   FIG. 1 is a diagram illustrating a frame to be encoded (encoded frame). The encoding frame 10 includes a plurality of n × m pixel macroblocks. For example, in FIG. 1, the encoding frame 10 includes a plurality of macroblocks 11 including 16 horizontal pixels and 16 vertical pixels. In the case of an HDTV (High Definition TV) resolution moving image composed of 1088 pixels vertically and 1920 pixels horizontally, there are 68 macroblocks (= 1088/16) and 120 macroblocks (= 1920/16). become. A block to be encoded is referred to as an encoded block, and as an example, the macro block 12 in FIG. 1 is referred to as an encoded block.

図2は、従来の動きベクトル探索方法で動きベクトルを探索するための参照フレーム20の構成を説明するための図である。参照フレーム20は、符号化フレーム10よりも時間的に前に符号化処理されたフレームであり、符号化フレーム10と同一の形状、同数の画素を有している。   FIG. 2 is a diagram for explaining the configuration of the reference frame 20 for searching for a motion vector by a conventional motion vector search method. The reference frame 20 is a frame that has been encoded before the encoded frame 10 in time, and has the same shape and the same number of pixels as the encoded frame 10.

参照フレーム20には、符号化ブロック12よりも大きい長方形状をした参照領域21が、参照フレーム20において符号化ブロック12と対応する領域を含むように設定されている。この参照領域21の中に、符号化ブロック12と同一の大きさ,形状をした参照ブロック22を設定する。参照ブロック22の符号化ブロックからの相対位置(Sx,Sy)を動きベクトル候補23とする。   In the reference frame 20, a reference area 21 having a rectangular shape larger than that of the encoding block 12 is set so as to include an area corresponding to the encoding block 12 in the reference frame 20. A reference block 22 having the same size and shape as the encoding block 12 is set in the reference area 21. A relative position (Sx, Sy) of the reference block 22 from the encoded block is set as a motion vector candidate 23.

図1に示す符号化ブロック11が動きベクトルを探索する対象として選択されると、参照ブロック22を参照領域21の中において1画素ずつ移動させながら、符号化ブロック11の中に配置された画素の画素値と参照ブロック22の中に配置された画素の画素値との間で、数式1で表される差分絶対値和SAD(Sum of Absolute Difference)を計算する。   When the coding block 11 shown in FIG. 1 is selected as a motion vector search target, the reference block 22 is moved one pixel at a time in the reference area 21, and the pixels arranged in the coding block 11 are moved. A difference absolute value sum SAD (Sum of Absolute Difference) expressed by Equation 1 is calculated between the pixel value and the pixel value of the pixel arranged in the reference block 22.

Figure 2011142564
ただし,Σはx=0,1,2,・・・,n−1,y=0,1,2,・・・,m−1で和を取ることを表し、nは符号化ブロック12の水平方向の画素数、mは符号化ブロックの垂直方向の画素数、C(x,y)は符号化ブロック12のy行x列の位置にある画素の画素値、Sxは参照位置の水平方向の変位量、Syは参照位置の垂直方向の変位量、R(x+Sx,y+Sy)は変位(Sx,Sy)の参照ブロックのy行x列の位置にある画素の画素値を表す。そして、絶対差分値和SADが最小となる参照ブロック22の符号化ブロック12に対する動きベクトル候補(Sx,Sy)23を動きベクトルとして選択する。動き補償フレーム間予測では,符号化フレームに含まれる他のブロックについても同様の処理を行い、動きベクトルを検出する。
Figure 2011142564
Where Σ represents summing at x = 0, 1, 2,..., N−1, y = 0, 1, 2,. The number of pixels in the horizontal direction, m is the number of pixels in the vertical direction of the coding block, C (x, y) is the pixel value of the pixel at the position of y row and x column of the coding block 12, and Sx is the horizontal direction of the reference position , Sy represents the vertical displacement of the reference position, and R (x + Sx, y + Sy) represents the pixel value of the pixel at the position of row y and column x of the reference block of displacement (Sx, Sy). Then, a motion vector candidate (Sx, Sy) 23 for the coding block 12 of the reference block 22 that minimizes the absolute difference value sum SAD is selected as a motion vector. In motion compensation inter-frame prediction, similar processing is performed on other blocks included in the encoded frame to detect a motion vector.

このように、参照領域21において総当り的に参照ブロック22を決めて動きベクトルを探索する方法を全探索法という。このような全探索法は、参照領域21におけるすべての画素を総当り的に調べるため、演算量が莫大になる。
[動きベクトルの階層的探索方法]
そこで、動きベクトル探索にかかる演算量を削減する方法として階層的探索法が知られている。図3は、階層的探索法における縮小符号化画像30を説明するための模式図であり、図4は、階層的探索法における縮小参照画像40を説明するための模式図であり、図5は図3の探索結果と図4の探索の関連を説明するための模式図である。
A method of searching for a motion vector by deciding the reference block 22 in the reference area 21 in this way is called a full search method. In such a full search method, since all the pixels in the reference area 21 are examined brute-force, the calculation amount becomes enormous.
[Hierarchical search method of motion vectors]
Therefore, a hierarchical search method is known as a method for reducing the amount of calculation for motion vector search. FIG. 3 is a schematic diagram for explaining the reduced encoded image 30 in the hierarchical search method, FIG. 4 is a schematic diagram for explaining the reduced reference image 40 in the hierarchical search method, and FIG. FIG. 5 is a schematic diagram for explaining the relationship between the search result of FIG. 3 and the search of FIG. 4.

階層的探索法では,まず、符号化フレーム10を水平方向にa1分の1に縮小し,垂直方向にa2分の1に縮小した縮小符号化画像30を作成する。縮小符号化画像30は符号化フレーム10と同数のマクロブロックを有する。ただし,1つのマクロブロック31に含まれる画素数は、水平方向が1/a1倍に,垂直方向が1/a2倍となる。符号化ブロック12も縮小され、縮小符号化ブロック32となる。同様に、参照フレーム20を水平方向にa1分の1に縮小し、垂直方向にa2分の1に縮小した縮小参照画像40を作成する。縮小参照画像40において参照領域21は水平方向に1/a1倍に、垂直方向に1/a2倍となった縮小参照領域41となる。各縮小符号化ブロックについて縮小参照領域41で縮小動きベクトル43を探索することを1次探索という。   In the hierarchical search method, first, a reduced encoded image 30 in which the encoded frame 10 is reduced by a1 in the horizontal direction and reduced by a2 in the vertical direction is created. The reduced encoded image 30 has the same number of macroblocks as the encoded frame 10. However, the number of pixels included in one macroblock 31 is 1 / a1 times in the horizontal direction and 1 / a2 times in the vertical direction. The encoding block 12 is also reduced to become a reduced encoding block 32. Similarly, a reduced reference image 40 in which the reference frame 20 is reduced by a1 in the horizontal direction and reduced by a2 in the vertical direction is created. In the reduced reference image 40, the reference area 21 becomes a reduced reference area 41 that is 1 / a1 times in the horizontal direction and 1 / a2 times in the vertical direction. Searching the reduced motion vector 43 in the reduced reference area 41 for each reduced encoded block is called primary search.

1次探索で検出された縮小動きベクトル43を水平方向にa1倍,垂直方向にa2倍したベクトル52を起点として参照領域51を定め、符号化ブロック12と参照フレーム20の間で動きベクトル53を探索することを2次探索という。この2次探索で求められた動きベクトル53を、符号化ブロック12の動きベクトルとする。   A reference area 51 is defined starting from a vector 52 obtained by multiplying the reduced motion vector 43 detected in the primary search by a1 in the horizontal direction and a2 in the vertical direction, and the motion vector 53 is defined between the encoding block 12 and the reference frame 20. Searching is called secondary search. The motion vector 53 obtained by this secondary search is used as the motion vector of the coding block 12.

一つの符号化ブロックについて動きベクトルを検出するために必要な演算量は、例えば、参照領域を水平±7、垂直±7の15×15画素によって構成される領域とした場合、前述した全探索法においては、15×15=225回の16×16画素のマッチング、つまり、57600回の画素マッチングが必要となる。一方、水平1/4、垂直1/4の階層的探索法においては、1次探索における(15/4)×(15/4)=約25回の4×4画素のマッチングと,2次探索における4×4=16回の16×16画素のマッチング、つまり4496回の画素マッチングによって動きベクトル53を検出することができる。従って、画素マッチングにかかる演算量は、前述した全探索法における演算量の約1/12となる。   The amount of computation required to detect a motion vector for one coding block is, for example, when the reference area is an area composed of 15 × 15 pixels of horizontal ± 7 and vertical ± 7, the above-described full search method In this case, 15 × 15 = 225 matching of 16 × 16 pixels, that is, 57600 pixel matching is required. On the other hand, in the horizontal 1/4 and vertical 1/4 hierarchical search methods, (15/4) × (15/4) = about 25 times 4 × 4 pixel matching and secondary search in the primary search. The motion vector 53 can be detected by 4 × 4 = 16 16 × 16 pixel matchings, that is, 4496 pixel matchings. Therefore, the calculation amount for pixel matching is about 1/12 of the calculation amount in the above-described full search method.

この階層的探索法による動きベクトル探索法は非特許文献1で説明されており、例えば特許文献1にこれを用いた技術が開示されている。   The motion vector search method based on this hierarchical search method is described in Non-Patent Document 1, and for example, Patent Document 1 discloses a technique using this.

また、ライン毎にサンプリングし、偶数ラインのサンプリング開始位置を横方向のサンプリング間隔の1/2ずらしてサンプリングした画像を圧縮・伸張する技術が特許文献2に開示されている。   Japanese Patent Application Laid-Open No. 2003-228561 discloses a technique for sampling for each line and compressing / decompressing an image obtained by shifting the sampling start position of an even line by ½ the horizontal sampling interval.

トリケップス出版 ”MPEG技術” (White series No.152)片山泰男 pp.29−127Triques Publishing "MPEG Technology" (White series No. 152) Yasuo Katayama pp. 29-127

特開平7−154801号公報Japanese Unexamined Patent Publication No. 7-154801 特開平5−30494号公報JP-A-5-30494

階層的探索法により動きベクトル探索を行なう場合に、1次探索において誤った縮小動きベクトルを検出すると、2次探索の動きベクトル探索範囲内に本来得るべき最適な動きベクトル候補が存在せず、誤った動きベクトルを検出する可能性がある。   When a motion vector search is performed by the hierarchical search method, if an erroneous reduced motion vector is detected in the primary search, there is no optimal motion vector candidate that should be originally obtained in the motion vector search range of the secondary search, There is a possibility of detecting a motion vector.

しかしながら、1次探索に用いる画像はサブサンプリングにより解像度が入力画像より低い画像であるので、符号化フレーム、もしくは参照フレームに含まれる高い周波数成分を表しきれていない。符号化ブロック、もしくは参照ブロックが高い周波数成分で表現される特徴要素を有する場合は、サブサンプリングにより特徴要素を表現しきれないため、1次探索において誤った縮小動きベクトルを検出し、結果として誤った動きベクトルを算出する可能性がある。   However, since the image used for the primary search is an image whose resolution is lower than that of the input image due to sub-sampling, the high frequency components included in the encoded frame or the reference frame cannot be expressed. If the coding block or the reference block has a feature element expressed by a high frequency component, the feature element cannot be expressed by sub-sampling. Therefore, an erroneous reduced motion vector is detected in the primary search, resulting in an error. There is a possibility to calculate a motion vector.

そこで本願においては、水平方向、もしくは垂直方向に高い周波数成分を有するフレームに対して、演算コストを増加させずに誤った縮小動きベクトルの検出を抑制することを目的とする。   Therefore, an object of the present application is to suppress detection of an erroneous reduced motion vector without increasing the calculation cost for a frame having a high frequency component in the horizontal direction or the vertical direction.

上記の目的を達成するために、本願の動画像符号化装置は、入力フレームから作成した縮小画像における動きベクトルを検出し、前記入力フレームにおける動きベクトルの探索を前記縮小画像における動きベクトルに基づいて行ない、複数の入力フレームについて、垂直方向に第1の所定間隔で配置された行において、水平方向に第2の所定の間隔で配置され、画素の位置を前記第1の所定間隔を空けた行に含まれる画素と所定の列数ずらして配置された画素で形成される画素群か、もしくは水平方向に前記第2の所定間隔で配置された列において、垂直方向に前記第1の所定の間隔で配置され、画素の位置を前記第2の所定間隔を空けた列に含まれる画素と所定の行数ずらして配置された画素で形成される画素群をサンプリングし、それぞれの入力フレームから縮小画像を作成するサンプリング処理部と、前記作成された縮小画像間において、各画素の読み出し位置を前記入力フレームにおける位置的な対応関係に応じて補正して、前記作成された縮小画像における動きベクトルの探索を行なう動きベクトル検出部とを有する。   In order to achieve the above object, the moving image encoding apparatus of the present application detects a motion vector in a reduced image created from an input frame, and searches for a motion vector in the input frame based on the motion vector in the reduced image. For a plurality of input frames, rows arranged at a first predetermined interval in the vertical direction are arranged at a second predetermined interval in the horizontal direction, and the positions of the pixels are spaced at the first predetermined interval. Or a pixel group formed of pixels arranged with a predetermined number of columns shifted from the pixels included in the pixel, or the first predetermined interval in the vertical direction in columns arranged at the second predetermined interval in the horizontal direction A pixel group formed by pixels arranged at a predetermined number of rows from the pixels included in the second predetermined interval and the positions of the pixels. Between the sampling processing unit that creates a reduced image from the input frame and the created reduced image, the readout position of each pixel is corrected according to the positional correspondence in the input frame, and the created reduction A motion vector detection unit that searches for a motion vector in the image.

また、本願の動画像符号化装置の前記サンプリング処理部が、整数a1,a2,b1,b2を、b1,b2はいずれかが0であり、b2はa1より小さく、b1はa2よりも小さいとして、数式2で定義されるベクトルV1,V2を用いて、前記入力フレームにおいて所定の画素を始点として前記ベクトルV1,V2それぞれの整数倍の和で示される位置にある画素をサンプリングして前記縮小画像を作成する。   Further, the sampling processing unit of the moving picture coding apparatus of the present application assumes that the integers a1, a2, b1, and b2 are any one of b1 and b2, b2 is smaller than a1, and b1 is smaller than a2. Using the vectors V1 and V2 defined by Equation 2, the reduced image is obtained by sampling a pixel at a position indicated by a sum of integer multiples of the vectors V1 and V2 starting from a predetermined pixel in the input frame. Create

Figure 2011142564
本願の動画像符号化方法は、入力フレームから作成した縮小画像における動きベクトルを検出し、前記入力フレームにおける動きベクトルの探索を前記縮小画像における動きベクトルに基づいて行なう方法であって、複数の入力フレームについて、垂直方向に第1の所定間隔で配置された行において、水平方向に第2の所定の間隔で配置され、画素の位置を前記第1の所定間隔を空けた行に含まれる画素と所定の列数ずらして配置された画素で形成される画素群か、もしくは水平方向に前記第2の所定間隔で配置された列において、垂直方向に前記第1の所定の間隔で配置され、画素の位置を前記第2の所定間隔を空けた列に含まれる画素と所定の行数ずらして配置された画素で形成される画素群をサンプリングし、それぞれの入力フレームから縮小画像を作成し、前記作成された縮小画像の各画素の読み出し位置を前記入力フレームにおける位置的な対応関係に応じて補正して、前記作成された縮小画像における動きベクトルの探索を行なう。
Figure 2011142564
The moving image encoding method of the present application is a method for detecting a motion vector in a reduced image created from an input frame, and performing a search for a motion vector in the input frame based on the motion vector in the reduced image. With respect to the frame, in the rows arranged at the first predetermined intervals in the vertical direction, the pixels are arranged at the second predetermined intervals in the horizontal direction, and the positions of the pixels are included in the rows at the first predetermined intervals. A pixel group formed by pixels arranged by shifting a predetermined number of columns or arranged in the vertical direction at the first predetermined interval in a column arranged at the second predetermined interval in the horizontal direction. A pixel group formed by pixels arranged with a predetermined number of rows shifted from the pixels included in the second predetermined-spaced column are sampled, and each input frame is sampled. Create a et reduced image, the reading position of each pixel in the created reduced image is corrected according to the positional relationship in the input frame, performing a search of motion vectors in the reduced image created in the above.

本願の動画像符号化プログラムは、入力フレームから作成した縮小画像における動きベクトルを検出し、前記入力フレームにおける動きベクトルの探索を前記縮小画像における動きベクトルに基づいて行なうことをコンピュータに実行させる動画像符号化プログラムであって、複数の入力フレームについて、垂直方向に第1の所定間隔で配置された行において、水平方向に第2の所定の間隔で配置され、画素の位置を前記第1の所定間隔を空けた行に含まれる画素と所定の列数ずらして配置された画素で形成される画素群か、もしくは水平方向に前記第2の所定間隔で配置された列において、垂直方向に前記第1の所定の間隔で配置され、画素の位置を前記第2の所定間隔を空けた列に含まれる画素と所定の行数ずらして配置された画素で形成される画素群をサンプリングし、それぞれの入力フレームから縮小画像を作成するステップと、前記作成された縮小画像の各画素の読み出し位置を前記入力フレームにおける位置的な対応関係に応じて補正して、前記作成された縮小画像における動きベクトルの探索を行なうステップとをコンピュータに実行させる。   The moving image encoding program of the present application detects a motion vector in a reduced image created from an input frame, and causes a computer to execute a search for a motion vector in the input frame based on the motion vector in the reduced image. An encoding program, wherein a plurality of input frames are arranged at a second predetermined interval in a horizontal direction in rows arranged at a first predetermined interval in a vertical direction, and the pixel positions are set to the first predetermined interval. In a pixel group formed by pixels arranged with a predetermined number of columns shifted from pixels included in spaced rows, or in a column arranged at the second predetermined interval in the horizontal direction, the first in the vertical direction. The pixels are arranged at a predetermined interval of 1, and the pixel positions are formed by shifting the pixel positions from the pixels included in the second predetermined interval and a predetermined number of rows. Sampling the pixel group to be created, creating a reduced image from each input frame, and correcting the readout position of each pixel of the created reduced image according to the positional correspondence in the input frame, And a step of searching for a motion vector in the generated reduced image.

本発明によると、動きベクトルを階層的に探索する場合に、入力フレームにおいて必ずしも同一の列、又は行にない画素を同一の列、又は行に格納した縮小画像を用いて1次探索を行なうことで、垂直方向、もしくは水平方向に高い周波数成分を有するフレームに関する動きベクトル探索において、誤った動きベクトルを検出することを抑制する。   According to the present invention, when a motion vector is searched hierarchically, a primary search is performed using reduced images in which pixels that are not necessarily in the same column or row in the input frame are stored in the same column or row. Thus, the detection of an erroneous motion vector is suppressed in the motion vector search for a frame having a high frequency component in the vertical direction or the horizontal direction.

符号化フレームを説明する図The figure explaining an encoding frame 動きベクトル探索を説明する図Diagram explaining motion vector search 縮小符号化画像を説明する図The figure explaining a reduction coding picture 縮小動きベクトル探索を説明する図The figure explaining reduction motion vector search 縮小動きベクトルを用いた2次探索を説明する図The figure explaining the secondary search using a reduced motion vector サンプリング例1を説明する図The figure explaining the example 1 of a sampling サンプリング例2を説明する図The figure explaining the example 2 of a sampling 画像が表現しうる周波数領域を説明する図The figure explaining the frequency domain which an image can express 縮小符号化ブロックと縮小参照画像における各画素の対応関係を説明する図The figure explaining the correspondence of each pixel in a reduction coding block and a reduction reference picture 図9の各画素の対応関係を説明する図The figure explaining the correspondence of each pixel of FIG. 図10の対応関係の補正について説明する図The figure explaining the correction | amendment of the correspondence of FIG. 縮小符号化ブロックと縮小参照画像において図11で補正した対応関係を説明 する図The figure explaining the correspondence corrected in FIG. 11 between the reduced coding block and the reduced reference image 動画像符号化装置の構成例を示す図The figure which shows the structural example of a moving image encoder. 動きベクトル計算手段の構成を示す図The figure which shows the structure of a motion vector calculation means 1次探索部の構成を示す図(第一実施例)The figure which shows the structure of a primary search part (1st Example). サンプリング処理部の構成を示す図Diagram showing the configuration of the sampling processing unit 動きベクトル検出部の構成を示す図The figure which shows the structure of a motion vector detection part. サンプリング処理のフローを示す図Diagram showing sampling process flow 1次探索における縮小動きベクトル探索のフローを示した図The figure which showed the flow of the reduction motion vector search in a primary search 図6のサンプリング例に適したローパスフィルタ行列Low-pass filter matrix suitable for the sampling example of FIG. 図7のサンプリング例に適したローパスフィルタ行列Low-pass filter matrix suitable for the sampling example of FIG. 1次探索部の構成を示す図(第二実施例)The figure which shows the structure of a primary search part (2nd Example). サンプリング方法の切り替え判断のフローを示す図Diagram showing sampling method switching decision flow サンプリング方法の切り替え処理のフローを示す図Diagram showing the flow of sampling method switching processing サンプリング方法の切り替え処理に伴う1次探索の追加フローを示す図The figure which shows the additional flow of the primary search accompanying the switching process of a sampling method

本発明の技術について、適宜図を参照しつつ説明する。
[サンプリングする画素の配置]
まず、1次探索の対象となる縮小画像をどのような配置にある画素をサンプリングして作成するのかを説明する。
The technique of the present invention will be described with reference to the drawings as appropriate.
[Placement of pixels to be sampled]
First, a description will be given of how the pixels in the reduced image to be subjected to the primary search are sampled and created.

後に詳述するが、1次探索において参照ブロックを符号化ブロックと相対的に位置をずらして画素を対応させるためには、参照画像と符号化画像でサンプリングする画素の配置は同じであり、且つ周期的な配置でなければならない。サンプリングする画素の配置についての周期性は、サンプリングされる画素間をつなぐ2つのベクトルで表すことが可能である。この2つのベクトルを並進ベクトルV1,V2とする。   As will be described in detail later, in order to associate the reference block with the encoded block by shifting the position of the reference block relative to the encoded block, the arrangement of the pixels sampled in the reference image and the encoded image is the same, and Must be a periodic arrangement. The periodicity of the arrangement of pixels to be sampled can be represented by two vectors that connect the pixels to be sampled. These two vectors are referred to as translation vectors V1 and V2.

サンプリング例1として、図6に入力フレームにおける16×16画素のマクロブロック63とマクロブロックをサンプリングして作成した縮小マクロブロック64を示している。マクロブロック63において、●で示した画素をサンプリングして、縮小マクロブロック64作成される。マクロブロック63内のサンプリングする画素間の関係を表す並進ベクトルV1,V2は61と62である。図7は、サンプリング例2であり、マクロブロック73から●で示した画素をサンプリングして縮小マクロブロック74を作成しており、並進ベクトルは71と72である。   As sampling example 1, FIG. 6 shows a 16 × 16 pixel macroblock 63 in an input frame and a reduced macroblock 64 created by sampling the macroblock. In the macro block 63, the reduced macro block 64 is created by sampling the pixels indicated by ●. Translation vectors V1 and V2 representing the relationship between the sampling pixels in the macroblock 63 are 61 and 62, respectively. FIG. 7 shows a sampling example 2, in which the pixels indicated by ● are sampled from the macroblock 73 to create a reduced macroblock 74, and the translation vectors are 71 and 72.

並進ベクトルの設定には任意性があるが、簡単のため、片方の並進ベクトルは水平方向か垂直方向に合わせることにする。具体的には、ライン方向のサンプリング間隔a1と位相ズレb1によるベクトルV1(a1,b1)と、位相ズレb2とライン間隔a2によるベクトルV2(b2,a2)とすると良い。ちなみに位相ズレb1とb2は、それぞれ0≦b2<a1,0≦b1<a2の整数値であり、どちらかは0である。入力画像の画素のうち、ある1つの画素から並進ベクトルV1,V2それぞれが整数倍されたものの和(m1×V1+m2×V2(m1,m2は整数))で示される位置にある画素が、サンプリングされる画素である。   Although the translation vector can be arbitrarily set, for the sake of simplicity, one translation vector is set in the horizontal direction or the vertical direction. Specifically, the vector V1 (a1, b1) based on the sampling interval a1 in the line direction and the phase shift b1 and the vector V2 (b2, a2) based on the phase shift b2 and the line interval a2 are preferable. Incidentally, the phase shifts b1 and b2 are integer values of 0 ≦ b2 <a1 and 0 ≦ b1 <a2, respectively, and one of them is 0. Among the pixels of the input image, a pixel at a position indicated by the sum (m1 × V1 + m2 × V2 (m1 and m2 are integers)) obtained by multiplying the translation vectors V1 and V2 by an integer from one pixel is sampled Pixels.

これは、サンプリングされる画素の配置は、並進ベクトルの起点となる位置の画素と、起点から並進ベクトルV1で示される位置の画素と、起点から並進ベクトルV2で示される位置の画素の3つの画素に基づいて決定されるとしても良い。この3つの画素の間の位置関係は、ベクトルV1,−V1,V2,−V2,V1−V2,V2−V1の6通りの関係がある。選択された画素に対して、この6通りの関係のいずれかを満たす画素をさらに選択していき、最終的に選択された画素群がサンプリングされる画素である。選択された全ての画素が、ある1つの画素から並進ベクトルV1,V2それぞれが整数倍されたものの和で示される位置にある画素という条件と同じことである。   This is because the arrangement of pixels to be sampled is three pixels: a pixel at a position that is the starting point of the translation vector, a pixel at a position indicated by the translation vector V1 from the starting point, and a pixel at a position indicated by the translation vector V2 from the starting point. It may be determined based on. The positional relationship between the three pixels has six relationships of vectors V1, -V1, V2, -V2, V1-V2, and V2-V1. With respect to the selected pixel, a pixel satisfying any one of these six relationships is further selected, and the finally selected pixel group is a pixel to be sampled. All of the selected pixels have the same condition as a pixel at a position indicated by the sum of one pixel obtained by multiplying the translation vectors V1 and V2 by integers.

サンプリング間隔がa1であるため、水平方向は1/a1に縮小され、ライン間隔がa2であるため、垂直方向は1/a2の解像度に縮小される。例えば図6のサンプリング例1では、並進ベクトルV1,V2をベクトル61(4,0)、ベクトル62(0,2)とした場合であり、図7のサンプリング例2は、並進ベクトルV1,V2をベクトル71(4,0)、ベクトル72(2,2)とした場合であるといえる。どちらのサンプリング例においても、水平方向は1/4、垂直方向は1/2に縮小されている。   Since the sampling interval is a1, the horizontal direction is reduced to 1 / a1, and since the line interval is a2, the vertical direction is reduced to 1 / a2. For example, sampling example 1 in FIG. 6 is a case where translation vectors V1 and V2 are vector 61 (4, 0) and vector 62 (0, 2). Sampling example 2 in FIG. It can be said that the vector 71 (4, 0) and the vector 72 (2, 2) are used. In both sampling examples, the horizontal direction is reduced to ¼ and the vertical direction is reduced to ½.

以後、サンプリングの対象となる入力フレームを原画像といい、サンプリングされたものを縮小画像ということにする。原画像の解像度をN×M画素とし、各画素の画素値をOrg(Ox,Oy)する。この画素値OrgはY,Cb,Crの輝度値Yであっても良いし、R,G,Bの画素値のいずれかであっても良い。座標Ox,Oyは、0≦Ox<N, 0≦Oy<Mの範囲の整数である。縮小画像における各画素の画素値をRed(Rx,Ry)とし、座標Rx,Ryは、0≦Rx<N/a1, 0≦Ry<M/a2の範囲内の整数である。また、サンプリングされる画素のうち0≦Ox<a1, 0≦Oy<a2である画素の座標を(x1,y1)としておく。その場合、原画像と縮小画像の座標は数式3で対応付けられる。   Hereinafter, an input frame to be sampled is referred to as an original image, and a sampled image is referred to as a reduced image. The resolution of the original image is N × M pixels, and the pixel value of each pixel is Org (Ox, Oy). The pixel value Org may be a luminance value Y of Y, Cb, and Cr, or may be any of R, G, and B pixel values. The coordinates Ox and Oy are integers in the range of 0 ≦ Ox <N and 0 ≦ Oy <M. The pixel value of each pixel in the reduced image is Red (Rx, Ry), and the coordinates Rx, Ry are integers in the range of 0 ≦ Rx <N / a1, 0 ≦ Ry <M / a2. Also, the coordinates of the pixels that are 0 ≦ Ox <a1 and 0 ≦ Oy <a2 among the pixels to be sampled are set to (x1, y1). In that case, the coordinates of the original image and the reduced image are associated by Equation 3.

Figure 2011142564
このように配置が決められたサンプリング対象の画素は、b1=0の場合であれば、ライン毎にサンプリング開始位置をずらすことでサンプリング可能である。即ち、0からM/a2までの各Ryについてa2*Ry+y1のラインを、サンプリング開始位置をmod(b2*Ry+x1,a1)として、サンプリング間隔a1おきに画素をサンプリングすればよい。
Figure 2011142564
The pixels to be sampled whose arrangement is determined in this way can be sampled by shifting the sampling start position for each line if b1 = 0. That is, for each Ry from 0 to M / a2, the a2 * Ry + y1 line is set to the sampling start position mod (b2 * Ry + x1, a1), and the pixels may be sampled every sampling interval a1.

b2=0の場合はサンプリングされる画素のうち、同一のRyであるものが原画像において同一のラインでないため、b1=0の場合と同様にライン毎のサンプリングができない。この場合、それぞれの(Rx,Ry)に対し、Ox,Oyの値それぞれを指定して読み出さなくてはならない。
[縮小画像の周波数領域]
次に、サンプリング対象とする画素の配置によって縮小画像が表現可能な周波数領域について説明する。
When b2 = 0, among the sampled pixels, those with the same Ry are not the same line in the original image. Therefore, sampling for each line cannot be performed as in the case of b1 = 0. In this case, it is necessary to specify and read the values of Ox and Oy for each (Rx, Ry).
[Frequency domain of reduced image]
Next, the frequency region in which a reduced image can be expressed by the arrangement of pixels to be sampled will be described.

原画像においては、画素情報が1画素間隔で配置されているため、1画素を周期とする周波数を1としたときに、例えば水平方向に表現可能な最大周波数|ν|は|ν|=1/2である(単位は1/ピクセル)。垂直方向にも同様であり、原画像の表現可能な周波数領域は、数式4に示す領域となる。周波数空間の水平方向の変数をνx、垂直方向の変数をνyとしている。   In the original image, pixel information is arranged at an interval of one pixel. Therefore, when the frequency with one pixel as a period is set to 1, for example, the maximum frequency | ν | that can be expressed in the horizontal direction is | ν | = 1. / 2 (unit is 1 / pixel). The same applies to the vertical direction, and the frequency region in which the original image can be expressed is the region shown in Equation 4. The variable in the horizontal direction of the frequency space is νx, and the variable in the vertical direction is νy.

Figure 2011142564
また、図6のサンプリング例1の場合(V1=(4,0)、V2=(0,2)のとき)、作成した縮小画像で表現可能な周波数領域は数式5で示す領域となる。
Figure 2011142564
Further, in the case of sampling example 1 in FIG. 6 (when V1 = (4, 0), V2 = (0, 2)), the frequency region that can be expressed by the generated reduced image is the region represented by Equation 5.

Figure 2011142564
また、図7のサンプリング例2の場合(V1=(4,0)、V2=(2,2)のとき)、作成した縮小画像で表現可能な周波数領域は数式6で示す領域となる。
Figure 2011142564
Further, in the case of sampling example 2 in FIG. 7 (when V1 = (4, 0), V2 = (2, 2)), the frequency region that can be expressed by the generated reduced image is the region represented by Equation 6.

Figure 2011142564
これらの周波数領域は図8に図示しており、原画像が表現可能な周波数領域がA1であり、図6のサンプリング例1のサンプリングで作成された縮小画像が表現しうる周波数領域はA2であり、図7のサンプリング例2のサンプリングで作成された縮小画像が表現しうる周波数領域はA3である。いずれの領域も0≦νx,0≦νyの範囲のみを図示している。
Figure 2011142564
These frequency regions are illustrated in FIG. 8, the frequency region in which the original image can be represented is A1, and the frequency region that can be represented by the reduced image created by the sampling of the sampling example 1 in FIG. 6 is A2. The frequency region that can be expressed by the reduced image created by the sampling of the sampling example 2 in FIG. 7 is A3. In any region, only the ranges of 0 ≦ νx and 0 ≦ νy are illustrated.

図8の周波数領域を比較すると、サンプリング例2の場合、作成した縮小画像の表現しうる周波数の領域A3は、サンプリング例1で作成した縮小画像が表現しうる周波数の領域A2よりも水平方向について高周波数の領域を占めている。そのため水平方向に高周波数成分を含む原画像の場合、サンプリング例2のサンプリングをおこなうことで、サンプリング例1のサンプリングを行なった場合よりも縮小画像が水平方向の高周波成分を表現しうるので、1次探索による誤った縮小動きベクトルの検出を抑制することができる。   Comparing the frequency regions of FIG. 8, in the case of sampling example 2, the region A3 of the frequency that can be expressed by the created reduced image is more horizontal than the region A2 of the frequency that can be expressed by the reduced image created in sampling example 1. Occupies a high frequency range. Therefore, in the case of an original image including a high frequency component in the horizontal direction, by performing the sampling of sampling example 2, the reduced image can express a high frequency component in the horizontal direction as compared with the case of sampling of sampling example 1. Detection of an erroneous reduced motion vector by the next search can be suppressed.

比較するサンプリングのパターンによって垂直方向の高周波数について改善することも可能である。サンプリング例1とサンプリング例2では、縮小率を変えずに水平方向の解像度を改善できる。   It is also possible to improve the vertical high frequency depending on the sampling pattern to be compared. In sampling example 1 and sampling example 2, the horizontal resolution can be improved without changing the reduction ratio.

上記の例に限らず、定義したV1=(a1,b1),V2=(b2,a2)についても表現可能な周波数領域を示す。V1,V2の定め方には任意性があったが、表現可能な最も高い周波数を求める必要があるので、サンプリングする画素の位置関係を示すベクトルは絶対値が小さいものがよい。そこで、V1,V2,V1−V2のうち、絶対値の小さいものから順に2つのベクトルをW1,W2とする。W1=(wx1,wy1),W2=(wx2,wy2)としておく。   In addition to the above example, a frequency region that can be expressed for the defined V1 = (a1, b1) and V2 = (b2, a2) is shown. The method of determining V1 and V2 is arbitrary, but since it is necessary to obtain the highest frequency that can be expressed, it is preferable that the vector indicating the positional relationship of the pixels to be sampled has a small absolute value. Therefore, of V1, V2, and V1-V2, the two vectors are set to W1 and W2 in order from the smallest absolute value. It is assumed that W1 = (wx1, wy1) and W2 = (wx2, wy2).

ベクトルW1、もしくはベクトルW2の位置関係で位相が反転する周波数成分は、その方向に表現しうる最大の周波数成分となる。そのため、ベクトルW1、W2の位置関係で位相が反転しないもの、つまり変位のベクトルW1(wx1,wy1)、もしくはW2(wx2,wy2)と周波数のベクトル(νx,νy)の内積が1/2に満たない周波数成分は、表現しうる周波数成分である。また、−W1,−W2についても同様である。その領域は数式7で表され、その領域内の周波数成分についてはベクトルW1,W2、つまりベクトルV1,V2に基づいて配置された画素のみで表現できる。   The frequency component whose phase is inverted due to the positional relationship of the vector W1 or the vector W2 is the maximum frequency component that can be expressed in that direction. For this reason, the inner product of the vectors W1 and W2 whose phase does not invert, that is, the displacement vector W1 (wx1, wy1) or W2 (wx2, wy2) and the frequency vector (νx, νy) is halved. The frequency component that is not satisfied is a frequency component that can be expressed. The same applies to -W1 and -W2. The region is expressed by Equation 7, and the frequency components in the region can be expressed only by the pixels arranged based on the vectors W1 and W2, that is, the vectors V1 and V2.

Figure 2011142564
例えば、V1=(4,0)、V2=(1,2)であるとすると、|V2|<|V1−V2|<|V1|であるため、ベクトルW1,W2はW1=V1−V2=(3,−2),W2=V2=(1,2)となる。その場合は数式8で示す周波数領域を表現可能である。
Figure 2011142564
For example, if V1 = (4,0) and V2 = (1,2), then | V2 | <| V1-V2 | <| V1 |. Therefore, the vectors W1 and W2 are W1 = V1-V2 = (3, -2), W2 = V2 = (1,2). In that case, the frequency region shown in Formula 8 can be expressed.

Figure 2011142564
[縮小画像同士の画素のマッチング方法]
しかしながら、既に説明した原画像において異なる列、行に属する画素を同一の列、又は行に格納して作成した縮小画像を用いた場合、1次探索を適切に行なうことができない。これは差分絶対値和(SAD)を計算する際に、縮小符号化ブロックの画素と対応する参照ブロックの画素の原画像における位置が異なる場合があるためである。
Figure 2011142564
[Method for matching pixels between reduced images]
However, when a reduced image created by storing pixels belonging to different columns and rows in the same column or row in the already described original image is used, the primary search cannot be performed appropriately. This is because, when calculating the sum of absolute differences (SAD), the position of the pixel of the reduced coding block and the pixel of the corresponding reference block in the original image may be different.

対応する画素の位置が原画像において異なるとは、例えば図10に示すような場合である。図9〜図12において縮小参照画像の画素を□で表し、縮小符号化ブロックの画素を●とする。サンプリング例2によって作成された縮小画像を用いて縮小参照画像と縮小符号化ブロックを対応させた場合に、縮小画像において図9に示す画素の対応となっているが、原画像においては図10に示すように画素の位置関係が対応していない。言い換えれば、符号化ブロック100内において、縮小参照画像の画素□と縮小符号化ブロックの画素●は、矢印102に示すとおり重なっていない。この場合、そもそも位置的に対応していない画素間で差分絶対値を算出して和をとることになるため、画像同士の近似度合いを適切に評価できず、誤った縮小動きベクトルを検出する恐れがある。   The corresponding pixel positions differ in the original image, for example, as shown in FIG. 9 to 12, the pixel of the reduced reference image is represented by □, and the pixel of the reduced coding block is represented by ●. When the reduced reference image and the reduced encoded block are associated with each other using the reduced image created by the sampling example 2, the correspondence between the pixels shown in FIG. 9 in the reduced image is shown, but in the original image in FIG. As shown, the pixel positional relationship does not correspond. In other words, in the coding block 100, the pixel □ of the reduced reference image and the pixel ● of the reduced coding block do not overlap as shown by the arrow 102. In this case, since the difference absolute value is calculated between the pixels that do not correspond to each other in the first place and the sum is calculated, the degree of approximation between the images cannot be appropriately evaluated, and an erroneous reduced motion vector may be detected. There is.

そこで、縮小動きベクトル92に縮小率の逆数を乗じたベクトル101を補正して、縮小動きベクトル92に対応する原画像における動きベクトルをベクトル111とすればよい。図11に見るように、ベクトル101を補正してベクトル111で示した参照ブロック内においては画素が位置的に対応している。   Therefore, the vector 101 obtained by multiplying the reduced motion vector 92 by the reciprocal of the reduction rate may be corrected so that the motion vector in the original image corresponding to the reduced motion vector 92 is the vector 111. As shown in FIG. 11, the pixels correspond to each other in the reference block indicated by the vector 111 after correcting the vector 101.

補正してもブロック内での画素の配置が同じでなければ対応させることができないため、縮小画像を作成する際のサンプリングパターンは周期的でなければならない。   Even if the correction is made, if the arrangement of the pixels in the block is not the same, the correspondence cannot be made. Therefore, the sampling pattern for creating the reduced image must be periodic.

しかし、動きベクトルを補正して対応させた場合、本来対応するべき画素が矢印112に示すように対応していない。この矢印112で示したズレは縮小画像における1画素分に相当するので、縮小参照画像から画素を読み出す列を補正すればよい。つまり図12に示すように、補正しない場合には領域91の画素を縮小参照画像から読み出していたのに対して、補正により領域121の画素の読み出しを行なえばよい。具体的には以下の制御を行なう必要がある。   However, when the motion vector is corrected and made to correspond, the pixel that should originally correspond does not correspond as shown by the arrow 112. Since the shift indicated by the arrow 112 corresponds to one pixel in the reduced image, the column for reading out pixels from the reduced reference image may be corrected. In other words, as shown in FIG. 12, when correction is not performed, the pixels in the region 91 are read out from the reduced reference image, whereas the pixels in the region 121 may be read out by correction. Specifically, it is necessary to perform the following control.

まず、縮小動きベクトル候補が原画像においてどのようなベクトルであるかを説明する。縮小動きベクトルを(sx,sy)とした場合、縮小動きベクトルを原画像に対応させたベクトルを(Sx,Sy)とすると、Sx,Syは数式9で示される。縮小動きベクトル(sx,sy)は縮小参照領域内に候補をとり、sx,sy,Sx,Syは整数であり、負の整数も定義しうる。   First, what kind of vector the reduced motion vector candidate is in the original image will be described. Assuming that the reduced motion vector is (sx, sy), assuming that the vector in which the reduced motion vector corresponds to the original image is (Sx, Sy), Sx and Sy are expressed by Equation 9. The reduced motion vector (sx, sy) takes a candidate in the reduced reference area, and sx, sy, Sx, Sy are integers, and negative integers can also be defined.

Figure 2011142564
縮小符号化画像の画素値Red1(Rx1,Ry1)を縮小参照画像の画素値Red2(Rx2,Ry2)と対応付けるには、原画像における座標が一致していなくてはならない。まず、縮小符号化画像の画素値Red1の座標(Rx1,Ry1)を原画像の座標(Ox,Oy)に対応付けると、数式10となる。
Figure 2011142564
In order to associate the pixel value Red1 (Rx1, Ry1) of the reduced encoded image with the pixel value Red2 (Rx2, Ry2) of the reduced reference image, the coordinates in the original image must match. First, when the coordinates (Rx1, Ry1) of the pixel value Red1 of the reduced encoded image are associated with the coordinates (Ox, Oy) of the original image, Expression 10 is obtained.

Figure 2011142564
この数式10に示した座標(Ox,Oy)を原画像に対応させた縮小動きベクトル(sx,sy)移動させた位置は数式11となる。η1は符号化縮小画像の画素のサンプリング時のズレ量η1であり、η2は縮小動きベクトル候補の原画像とのズレ量である。η1は、縮小符号化画像のライン毎に値が決まり、サンプリング時に計算したものを保存していても良いし、縮小参照画像から読み出す際にラインRy1を指定するたびに算出しても良い。η2は縮小動きベクトル候補を設定した時点で算出する。
Figure 2011142564
The position obtained by moving the coordinate (Ox, Oy) shown in Equation 10 to the reduced motion vector (sx, sy) corresponding to the original image is Equation 11. η1 is a deviation amount η1 at the time of sampling of pixels of the encoded reduced image, and η2 is a deviation amount from the original image of the reduced motion vector candidate. The value of η1 is determined for each line of the reduced encoded image, and the value calculated at the time of sampling may be stored, or may be calculated every time the line Ry1 is specified when reading from the reduced reference image. η2 is calculated when the reduced motion vector candidate is set.

Figure 2011142564
Figure 2011142564

Figure 2011142564
数式11からさらにb1,b2のいずれか0となるので、b1=0の場合を説明する。原画像の座標と縮小画像の座標の対応を表す数式から縮小参照画像においての座標(Rx2,Ry2)は数式13となる。
Figure 2011142564
Since either of b1 and b2 is 0 from Equation 11, the case of b1 = 0 will be described. The coordinates (Rx2, Ry2) in the reduced reference image are represented by Expression 13 from the expression representing the correspondence between the coordinates of the original image and the coordinates of the reduced image.

Figure 2011142564
Figure 2011142564

Figure 2011142564
数式13では、縮小参照画像における縮小参照画像の画素の読み出し位置のずれをξとしている。数式14で定義されるξを求めることで、読み出し位置のずれを補正できる。また、読み出し位置のずれ量ξは、上式の計算を行なわず、η1+η2≧a1ならばξ=1とし、η1+η2<a1ならばξ=0としてパターン化してもよい。
Figure 2011142564
In Equation 13, the shift in the readout position of the pixel of the reduced reference image in the reduced reference image is ξ. By obtaining ξ defined by Equation 14, the reading position shift can be corrected. The reading position deviation amount ξ may be patterned so that ξ = 1 if η1 + η2 ≧ a1 and ξ = 0 if η1 + η2 <a1 without calculating the above equation.

また、サンプリングされる画素の配置、つまり、並進ベクトルV1,V2とx1,y1によって縮小参照画像からの読み出しズレξのパターンを決めてしまっても良い。例えばサンプリング例2のベクトル71(4,0)、ベクトル72(2,2)を並進ベクトルとした場合であれば、syとRyが奇数か偶数かによってξを指定し、読み出し位置を制御することができる。簡単のため、x1=0としておく。縮小動きベクトルのy方向syが偶数である場合には、η2は0であり、η1は必ずa1よりも小さいため、縮小参照ブロックのどのラインにおいても読み出し位置のズレξは0である。一方、syが奇数である場合は、η2は2となり、Ry1が奇数のときにη1=2であるためξ=1で、Ry1が偶数のときにη1=0であるためξ=0となる。つまり、syが奇数のときのみ、Ry1の偶奇に合わせて読み出し位置のずれξを制御するとすれば良い。   Also, the pattern of the read deviation ξ from the reduced reference image may be determined by the arrangement of the pixels to be sampled, that is, the translation vectors V1, V2 and x1, y1. For example, if the vector 71 (4, 0) and the vector 72 (2, 2) in the sampling example 2 are translation vectors, ξ is specified depending on whether sy and Ry are odd or even, and the reading position is controlled. Can do. For simplicity, x1 = 0 is set. When the y direction sy of the reduced motion vector is an even number, η2 is 0 and η1 is always smaller than a1, so that the deviation ξ of the read position is 0 in any line of the reduced reference block. On the other hand, when sy is an odd number, η2 is 2, and when Ry1 is an odd number, η1 = 2, ξ = 1, and when Ry1 is an even number, η1 = 0, so ξ = 0. That is, only when sy is an odd number, the reading position shift ξ may be controlled in accordance with the even or odd of Ry1.

b1=0のときのみ読み出しの列方向のズレξを定義したが、b2=0の場合は、列方向に読み出し位置のズレを同様に定義し、制御すればよい。   The reading column direction deviation ξ is defined only when b1 = 0, but when b2 = 0, the reading position deviation in the column direction is similarly defined and controlled.

この方法で縮小参照画像から画素を読み出し、符号化ブロックの画素と対応する画素とで差分絶対値を算出することで、原画像において異なる位置にある画素を対応させることに起因する誤った縮小動きベクトルを検出することを防ぐことができる。2次探索は、この方法で検出した縮小動きベクトル(sx,sy)に縮小率の逆数を乗じて、上に説明したように補正したベクトルを起点に行なえばよい。   By using this method to read out pixels from the reduced reference image and calculate the absolute difference between the pixels in the encoded block and the corresponding pixels, erroneous reduction movement caused by matching pixels at different positions in the original image It is possible to prevent detection of vectors. The secondary search may be performed starting from a vector corrected as described above by multiplying the reduced motion vector (sx, sy) detected by this method by the reciprocal of the reduction rate.

本発明の具体的な構成について、図を参照しつつ説明する。なお、以下の説明はあくまで例示であり、具体的な構成を限定するものでない。   A specific configuration of the present invention will be described with reference to the drawings. In addition, the following description is an illustration to the last and does not limit a specific structure.

本発明の動画像符号化装置は、例えば図13の構成で実施される。動きベクトル計算手段1307は入力画像を復号画像記憶手段1306に記憶された参照フレームと対応付けて動きベクトル探索を行い、入力フレームの各符号化ブロックについての動きベクトルを出力する。   The moving picture encoding apparatus of the present invention is implemented with the configuration shown in FIG. 13, for example. The motion vector calculation unit 1307 performs a motion vector search by associating the input image with the reference frame stored in the decoded image storage unit 1306, and outputs a motion vector for each coding block of the input frame.

動きベクトル探索の演算コストを少なくする方法として階層的探索法がある。階層的探索法は既に説明したとおりであり、縮小画像を用いた動きベクトル探索(1次探索)により縮小動きベクトルを求め、求められた縮小動きベクトルに基づいて原画像を用いた動きベクトル探索(2次探索)を行なう方法である。   There is a hierarchical search method as a method for reducing the calculation cost of motion vector search. The hierarchical search method is as described above. A reduced motion vector is obtained by motion vector search (primary search) using a reduced image, and a motion vector search using an original image based on the obtained reduced motion vector ( (Secondary search).

この階層的探索法で動きベクトル探索を行なう場合、動きベクトル探索部は図14の構成となる。動きベクトル計算手段1307は、入力フレームから縮小画像を作成し、縮小動きベクトルを求める1次探索部141と、入力フレームに対して1次探索部141で求められた縮小動きベクトルに基づいて動きベクトルを求める2次探索部142で構成される。   When a motion vector search is performed by this hierarchical search method, the motion vector search unit has the configuration shown in FIG. The motion vector calculation unit 1307 creates a reduced image from the input frame and obtains a reduced motion vector, and a motion vector based on the reduced motion vector obtained by the primary search unit 141 for the input frame. Is formed by a secondary search unit 142 for obtaining.

1次探索部141における縮小動きベクトルの検出について、以下に本願の実施形態を説明する。
[第一の実施形態]
階層的探索法によって動きベクトルを探索する動きベクトル計算手段1307の1次探索部141は、例えば図15の構成で実施することが考えられる。
An embodiment of the present application will be described below with regard to detection of a reduced motion vector in the primary search unit 141.
[First embodiment]
The primary search unit 141 of the motion vector calculation unit 1307 that searches for a motion vector by a hierarchical search method may be implemented with the configuration of FIG. 15, for example.

図15の構成では、1次探索部をサンプリング処理部151と、画像記憶部152と、動きベクトル検出部153で構成している。サンプリング処理部151は各入力フレームについてサンプリングした画素で構成される画像を画像記憶部152に出力する。動きベクトル検出部153は画像記憶部152に記憶された画像を用いて動きベクトル探索を行ない、各符号化ブロックの動きベクトルを検出する。画像記憶部152はサンプリング処理部151でサンプリングされた画像を記憶し、動きベクトル検出部153の読み出し指示に応じて記憶している画像を読み出し、動きベクトル検出部153に出力する。   In the configuration of FIG. 15, the primary search unit includes a sampling processing unit 151, an image storage unit 152, and a motion vector detection unit 153. The sampling processing unit 151 outputs an image composed of pixels sampled for each input frame to the image storage unit 152. The motion vector detection unit 153 performs a motion vector search using the image stored in the image storage unit 152 and detects a motion vector of each encoded block. The image storage unit 152 stores the image sampled by the sampling processing unit 151, reads the stored image in response to a read instruction from the motion vector detection unit 153, and outputs it to the motion vector detection unit 153.

サンプリング処理部151は、例えば図16に示すように画素データ抽出部161とサンプリング位置制御部162で構成される。サンプリング位置制御部162は読み出すべき画素の座標と読み出した画素を格納する座標を画素データ抽出部161に指示する。画素データ抽出部161は、サンプリング位置制御部162で指示された画素について、その画素値を読み込み、サンプリング位置制御部162の指示に基づいて画素値を格納して画像記憶部152に出力する。サンプリング処理の付加的処理として、画素データ抽出部161はローパスフィルタの機能を有していても良い。   The sampling processing unit 151 includes a pixel data extraction unit 161 and a sampling position control unit 162, for example, as shown in FIG. The sampling position control unit 162 instructs the pixel data extraction unit 161 to specify the coordinates of the pixel to be read and the coordinates for storing the read pixel. The pixel data extraction unit 161 reads the pixel value of the pixel instructed by the sampling position control unit 162, stores the pixel value based on the instruction of the sampling position control unit 162, and outputs it to the image storage unit 152. As an additional process of the sampling process, the pixel data extraction unit 161 may have a low-pass filter function.

動きベクトル検出部153は、例えば図17に示すようにSAD計算部171、読み出し位置制御部172、縮小動きベクトル候補生成部173、ブロックアドレス制御部174、SAD評価部175で構成される。   For example, as shown in FIG. 17, the motion vector detection unit 153 includes a SAD calculation unit 171, a read position control unit 172, a reduced motion vector candidate generation unit 173, a block address control unit 174, and a SAD evaluation unit 175.

ブロックアドレス制御部174は、符号化する画像のどの符号化ブロックを符号化するかを指定し、指示情報を読み出し位置制御部172に出力する。縮小動きベクトル候補生成部173は縮小参照領域内で1画素ずつずらしながら縮小動きベクトル候補を生成し、読み出し位置制御部172に出力する。読み出し位置制御部172は指示された符号化ブロックの位置と縮小動きベクトル候補に応じて、縮小符号化画像の指示された画素の情報と、縮小参照画像の指示された画素の情報を読み出し、SAD計算部171に出力する。SAD計算部171は対応する画素の差分絶対値和SADを計算し、SAD評価部175に出力する。SAD評価部175では、一つの縮小符号化ブロックに対する複数の縮小動きベクトル候補の中で、最大の差分絶対値和SADを与える縮小動きベクトル候補を縮小動きベクトルとして出力する。   The block address control unit 174 specifies which encoding block of the image to be encoded is to be encoded, and outputs the instruction information to the read position control unit 172. The reduced motion vector candidate generation unit 173 generates reduced motion vector candidates while shifting one pixel at a time within the reduced reference area, and outputs the reduced motion vector candidates to the readout position control unit 172. The reading position control unit 172 reads out the information of the designated pixel of the reduced coded image and the information of the designated pixel of the reduced reference image according to the designated position of the coded block and the reduced motion vector candidate, and performs SAD The result is output to the calculation unit 171. The SAD calculation unit 171 calculates the difference absolute value sum SAD of the corresponding pixels and outputs it to the SAD evaluation unit 175. The SAD evaluation unit 175 outputs, as a reduced motion vector, a reduced motion vector candidate that gives the maximum difference absolute value sum SAD among a plurality of reduced motion vector candidates for one reduced coding block.

次に、入力フレームをサブサンプリングして縮小画像を作成する処理のフローについて図18を参照して説明する。このフローでは、縮小画像の画素の座標(Rx,Ry)毎に、原画像において対応する画素情報を読み込み、縮小画像を1フレーム作成する。   Next, a flow of processing for creating a reduced image by sub-sampling an input frame will be described with reference to FIG. In this flow, for each pixel coordinate (Rx, Ry) of the reduced image, corresponding pixel information in the original image is read, and one frame of the reduced image is created.

まず、縮小画像での座標(0,0)に対応する原画像での座標を特定する。(Rx,Ry)=(0,0)として(S100)、サンプリングするラインを指定する(S101)。次にS101で指定したラインのサンプリング開始位置を指定する(S102)。指定された原画像の画素情報を読み出し、縮小画像の(0,0)に格納する(S103,S104)。S101で指定したラインの読み出しを終えていなければ(S105)、原画像においてサンプリング間隔a1移動させた位置を指定し(S107)、指定された画素情報を読み出す。このフローを縮小画像の指定ラインの画素全てに画素情報を格納する(S106のNOルート)まで繰り返す。   First, the coordinates in the original image corresponding to the coordinates (0, 0) in the reduced image are specified. As (Rx, Ry) = (0, 0) (S100), a line to be sampled is designated (S101). Next, the sampling start position of the line designated in S101 is designated (S102). The pixel information of the designated original image is read out and stored in (0, 0) of the reduced image (S103, S104). If the reading of the line designated in S101 has not been completed (S105), the position moved by the sampling interval a1 in the original image is designated (S107), and the designated pixel information is read out. This flow is repeated until the pixel information is stored in all the pixels on the designated line of the reduced image (NO route in S106).

縮小画像の指定されたラインにある画素全てに画素情報を格納した場合は、ラインを再指定し(S108)、さらにサンプリング開始位置を再指定し(S102)、ライン内の画素のサンプリングを行なう。縮小画像の全てのラインについてサンプリングを行なった場合(S106のYESルート)、入力された画像のサンプリングを終えたものとする(S109)。   When pixel information is stored in all the pixels in the designated line of the reduced image, the line is designated again (S108), the sampling start position is designated again (S102), and the pixels in the line are sampled. When sampling has been performed for all lines of the reduced image (YES route of S106), it is assumed that sampling of the input image has been completed (S109).

次に、縮小動きベクトル探索のフローについて図19を参照して説明する。   Next, a reduced motion vector search flow will be described with reference to FIG.

まず、符号化フレームと参照フレームを指示する情報を読み込む(S200)。指示された符号化フレームの縮小符号化画像から縮小符号化ブロックを順に選択する(S201)。縮小符号化ブロックの位置に応じて縮小参照領域を設定し、縮小参照領域内で順に縮小動きベクトル候補を選択する(S202)。   First, information indicating an encoded frame and a reference frame is read (S200). A reduced coding block is sequentially selected from the reduced coded image of the designated coded frame (S201). A reduced reference area is set according to the position of the reduced encoded block, and reduced motion vector candidates are selected in order within the reduced reference area (S202).

S203〜S206のフローでは、指定された縮小参照ブロックについての評価値を算出する。縮小符号化ブロックのラインRy1を順に指定し(S203)、ラインRy1と縮小動きベクトル候補からズレ値ξを算出する(S204)。さらに、縮小符号化ブロックの画素をズレ値ξも考慮して縮小参照領域の画素と対応付ける。対応づけられた画素同士で差分絶対値和を計算し、積分する。対象とした縮小符号化ブロックと縮小参照ブロックの全ての画素について対応させて、差分絶対値を積分したら、積分値を縮小動きベクトル候補の評価値とする。   In the flow from S203 to S206, the evaluation value for the designated reduced reference block is calculated. The line Ry1 of the reduced coding block is designated in order (S203), and a deviation value ξ is calculated from the line Ry1 and the reduced motion vector candidate (S204). Further, the pixels of the reduced coding block are associated with the pixels of the reduced reference region in consideration of the deviation value ξ. The sum of absolute differences is calculated between the associated pixels and integrated. When the absolute difference values are integrated in correspondence with all the pixels of the target reduced coding block and the reduced reference block, the integrated value is set as the evaluation value of the reduced motion vector candidate.

全ての縮小動きベクトル候補について評価値を算出したら(S208)、評価値が最大となる縮小動きベクトル候補を選択し、縮小符号化ブロックの縮小動きベクトルとして出力する(S209)。S202〜S209のフローを全ての縮小符号化ブロックについて行なっていなければ、残りの縮小符号化ブロックを選択して、再度S202〜S209のフローを行なう。全ての縮小符号化ブロックについて縮小動きベクトルを算出したら、動きベクトル探索の対象としていた参照フレームと符号化フレームの1次探索を終了する。   When the evaluation values are calculated for all the reduced motion vector candidates (S208), the reduced motion vector candidate having the maximum evaluation value is selected and output as the reduced motion vector of the reduced encoded block (S209). If the flow of S202 to S209 is not performed for all the reduced coding blocks, the remaining reduced coding blocks are selected, and the flow of S202 to S209 is performed again. When the reduced motion vectors are calculated for all the reduced encoded blocks, the primary search of the reference frame and the encoded frame that are the target of the motion vector search is finished.

サンプリング処理部151でサンプリングすることによって、折り返しノイズが発生し、1次探索の精度を下げてしまうことも考えられる。そのために画素データ抽出部161で指定された位置にある画素の画素値を読み出す前に、その画素にフィルタ処理を施すとよい。サンプリングされた画素による画像は、サンプリングの仕方によって表現しうる周波数領域が異なるため、サンプリングの仕方に合った周波数領域のみを通過させるローパスフィルタを用いる。   Sampling by the sampling processing unit 151 may cause aliasing noise and reduce the accuracy of the primary search. Therefore, before reading out the pixel value of the pixel at the position specified by the pixel data extraction unit 161, it is preferable to perform a filtering process on the pixel. Since the frequency domain that can be expressed differs depending on how the sampling is performed, the low-pass filter that passes only the frequency domain that matches the sampling method is used.

例えば、サンプリング例1であれば、サンプリングする画素の周囲の画素も含めて図20のフィルタを掛け合わせることによって折り返しノイズを抑止する。また、サンプリング例2であれば、サンプリングする画素の周囲の画素も含めて図21のフィルタを掛け合わせることによって折り返しノイズを抑止できる。
[第二の実施形態]
第一の実施形態に、入力フレームの周波数特性によってサンプリング方法を切り替える構成を付加することも考えられる。例えば、図22に示すように、新たに周波数解析部220とパターン指示部221を設けた構成が考えられる。
For example, in the case of sampling example 1, aliasing noise is suppressed by multiplying the filter of FIG. 20 including pixels around the pixel to be sampled. In the case of sampling example 2, aliasing noise can be suppressed by multiplying the filter of FIG. 21 including pixels around the pixel to be sampled.
[Second Embodiment]
It is also conceivable to add a configuration for switching the sampling method according to the frequency characteristics of the input frame to the first embodiment. For example, as shown in FIG. 22, a configuration in which a frequency analysis unit 220 and a pattern instruction unit 221 are newly provided is conceivable.

周波数解析部220は、入力フレームの周波数解析を行い、入力フレームにどの周波数成分が多く含まれているかを算出する。この周波数解析部220は動きベクトル計算手段1207内に設けずに、例えば図13の直交変換手段1301が兼ねても良い。   The frequency analysis unit 220 performs frequency analysis of the input frame and calculates which frequency component is included in the input frame. The frequency analysis unit 220 may not be provided in the motion vector calculation unit 1207 but may also serve as, for example, the orthogonal transform unit 1301 in FIG.

パターン指示部221は、周波数解析部220の解析結果に基づいて、入力フレームが有する周波数成分の情報を表現可能なサンプリングパターンを決定し、サンプリング位置制御部162と読み出し位置制御部172に指示する。サンプリングパターンは、すでに説明したように、例えば並進ベクトルV1,V2、もしくは並進ベクトルで関係付けられる3つの画素によって決められる。   Based on the analysis result of the frequency analysis unit 220, the pattern instruction unit 221 determines a sampling pattern that can represent information on frequency components included in the input frame, and instructs the sampling position control unit 162 and the reading position control unit 172. As already described, the sampling pattern is determined by, for example, the translation vectors V1 and V2 or three pixels related by the translation vector.

パターン指示部221は、図22に示すように候補選択部222と、候補評価部223と、候補設定部224を設けた構成としても良い。   The pattern instruction unit 221 may be configured to include a candidate selection unit 222, a candidate evaluation unit 223, and a candidate setting unit 224 as shown in FIG.

候補設定部224は、サンプリングのパターンと、そのパターンに従って配置された画素で表現可能な周波数領域が設定されている。候補評価部223は候補設定部224に設定された情報を読み出し、周波数解析部220で算出した周波数分布が各パターンの周波数領域内にどの程度含まれているかを算出する。算出した値は各パターンと関連づけて候補選択部222に出力する。候補選択部222では、各パターンのうち表現可能な周波数領域が周波数解析部220で算出した周波数分布を最も多く含むパターンを選択する。選択したパターンをサンプリング位置制御部162と、読み出し位置制御部172に出力する。   In the candidate setting unit 224, a sampling pattern and a frequency region that can be expressed by pixels arranged according to the pattern are set. The candidate evaluation unit 223 reads the information set in the candidate setting unit 224 and calculates how much the frequency distribution calculated by the frequency analysis unit 220 is included in the frequency domain of each pattern. The calculated value is output to the candidate selection unit 222 in association with each pattern. The candidate selection unit 222 selects a pattern in which the frequency region that can be expressed among the patterns includes the most frequency distribution calculated by the frequency analysis unit 220. The selected pattern is output to the sampling position control unit 162 and the reading position control unit 172.

前述のように周波数解析部220は動きベクトル計算手段1307内に設けても良いし、直交変換手段1301が兼ねても良い。直交変換手段1301が周波数解析部を兼ねる場合は、マクロブロック単位で周波数分布を得ることになるので、1つの入力フレーム内の全ての符号化ブロックについての周波数分布を重畳して周波数分布を評価すると良い。また、周波数解析部を動きベクトル計算手段1307内に設けた場合は、各マクロブロックで周波数分布を求めた結果を重畳しても良いし、1フレーム全体の周波数分布を算出しても良い。   As described above, the frequency analysis unit 220 may be provided in the motion vector calculation unit 1307, or may be used as the orthogonal transform unit 1301. When the orthogonal transform unit 1301 also serves as a frequency analysis unit, the frequency distribution is obtained in units of macroblocks. Therefore, when the frequency distribution is evaluated by superimposing the frequency distributions for all the coding blocks in one input frame. good. When the frequency analysis unit is provided in the motion vector calculation unit 1307, the result of obtaining the frequency distribution in each macro block may be superimposed, or the frequency distribution of the entire frame may be calculated.

動画像符号化開始時には、予め何らかのサンプリングのパターンを決めておく。サンプリングのパターンが、入力フレームが有する周波数成分の情報を最も失わないサンプリングのパターンでない場合にはパターンを切り替える必要があるが、その場合は図23のフローで切り替え処理に移行すると良い。   At the start of video encoding, some sampling pattern is determined in advance. If the sampling pattern is not the sampling pattern that loses the most of the frequency component information of the input frame, it is necessary to switch the pattern. In this case, it is preferable to shift to the switching process in the flow of FIG.

始めにカウンタを0にする(S301)。カウンタは、頻繁に配置パターンが切り替わることを防ぐための付加的な構成要素であり、なくても良い。次に周波数解析部220にて入力フレームの周波数分布を算出する(S302)。サンプリングパターンの候補を予め設定しておき、候補毎に評価値を算出する(S303)。評価値が最大となるサンプリングのパターン候補を選択し、現在のサンプリングのパターンと同じであるかを判断する(S304)。現在のパターンと同じであれば、現在のパターンのままサンプリング処理して縮小動きベクトル探索を行なう。評価値が最大のパターンと現在のパターンが異なる場合は、カウンタを1あげる(S305)。S305で1あげたカウンタが所定数に達していた場合にサンプリングパターンの切り替え処理に移行する(S306,S307)。カウンタが所定数に達しない場合、S301に戻りカウンタを0にする。   First, the counter is set to 0 (S301). The counter is an additional component for preventing frequent switching of the arrangement pattern, and may be omitted. Next, the frequency analysis unit 220 calculates the frequency distribution of the input frame (S302). Sampling pattern candidates are set in advance, and an evaluation value is calculated for each candidate (S303). A sampling pattern candidate that maximizes the evaluation value is selected, and it is determined whether or not it is the same as the current sampling pattern (S304). If it is the same as the current pattern, a reduced motion vector search is performed by sampling the current pattern. If the pattern having the largest evaluation value is different from the current pattern, the counter is incremented by 1 (S305). When the counter incremented by 1 in S305 has reached a predetermined number, the process proceeds to sampling pattern switching processing (S306, S307). If the counter does not reach the predetermined number, the process returns to S301 and the counter is set to zero.

サンプリングパターンを切り替える場合のサンプリング処理は、図24のフローを行なう。S307に移行した場合、新しいサンプリングパターンをサンプリング位置制御部162に出力する(S400)。サンプリング位置制御部162は、新しいパターンが入力され、処理中のサンプリング処理が終了する(S109)と、サンプリングパターンを切り替える(S401)。パターンの切り替えは、a1,a2,b1,b2,x1,y1のパラメータを再設定すれば良い。サンプリングパターンを切り替えたら、次の入力フレームのサンプリング処理に移行する(S100)。縮小画像には、どのサンプリングパターンで作成された縮小画像であるかを示すラベルを付加しておくと良い。またラベルを付加せずとも、サンプリングパターンを切り替え処理の次にサンプリングした縮小画像にフラグ等の目印をつけておくだけでも良い。   The sampling process when switching the sampling pattern performs the flow of FIG. When the process proceeds to S307, a new sampling pattern is output to the sampling position control unit 162 (S400). The sampling position control unit 162 switches the sampling pattern (S401) when the new pattern is input and the sampling process being processed is completed (S109). The pattern can be switched by resetting the parameters a1, a2, b1, b2, x1, and y1. After switching the sampling pattern, the process proceeds to the sampling process for the next input frame (S100). A label indicating which sampling pattern is used for the reduced image is preferably added to the reduced image. Further, a mark such as a flag may be added to the reduced image sampled after the switching process of the sampling pattern without adding a label.

また、サンプリングパターンの切り替え処理後の縮小動きベクトル探索における読み出し処理については、複数フレームにわたる処理であるため、切り替え前と切り替え後の縮小画像同士はブロックマッチングできない。どのフレームを用いて動きベクトル探索を行なうか(符号化フレームの選択と参照フレームの指示)に基づいて、読み出し位置制御手段172動き1次探索が可能かを判断する必要がある。1次探索が不可能である場合には、階層探索を行なわないことが考えられる。その場合は、図25のフローで行なえばよい。   In addition, since the readout process in the reduced motion vector search after the sampling pattern switching process is a process over a plurality of frames, the reduced images before and after switching cannot be block-matched. Based on which frame is used to perform the motion vector search (encoding frame selection and reference frame instruction), it is necessary to determine whether the reading position control means 172 can perform a primary motion search. When the primary search is impossible, it is considered that the hierarchical search is not performed. In that case, the flow of FIG.

まず、動きベクトル探索をどのフレームについて行なうかを指示する情報が入力される(S200)。サンプリング処理部151で作成した縮小画像に、どのサンプリングパターンでサンプリングしたかを表すラベルを付していた場合、S200で指示された縮小符号化フレームと縮小参照フレームでそのラベルの情報が異なるかを判断する(S500)。ラベルの情報が同じであれば、その2つの縮小画像は同じパターンでサンプリングされたものであるので、縮小動きベクトル探索が可能であり、1次探索のフローに移行する(S201)。また、ラベル情報が異なる場合は、縮小画像同士で各画素の原画像における位置が対応しないため、動きベクトル探索を行なうことができない。そこで、1次探索を行なわず、2次探索部でのみ動きベクトル探索を行なう。この場合、2次探索部において、階層的探索法ではなく、全探索法で動きベクトル探索を行なう。   First, information indicating which frame the motion vector search is to be performed is input (S200). If the reduced image created by the sampling processing unit 151 has a label indicating which sampling pattern is used for sampling, whether the information of the label is different between the reduced encoded frame instructed in S200 and the reduced reference frame. Judgment is made (S500). If the label information is the same, the two reduced images have been sampled in the same pattern, so that a reduced motion vector search is possible, and the flow proceeds to the primary search flow (S201). Also, when the label information is different, the position of each pixel in the original image does not correspond between the reduced images, so that a motion vector search cannot be performed. Therefore, the primary search is not performed, and the motion vector search is performed only at the secondary search unit. In this case, in the secondary search unit, the motion vector search is performed not by the hierarchical search method but by the full search method.

10 符号化フレーム
11 符号化フレーム10のマクロブロック
12 符号化ブロック
20 参照フレーム
21 参照領域
22 参照ブロック
23 動きベクトル候補
30 縮小符号化画像
31 縮小マクロブロック
32 縮小符号化ブロック
40 縮小参照画像
41 縮小参照領域
42 縮小参照ブロック
43 縮小動きベクトル候補
51 参照領域
52 縮小動きベクトルを水平方向にa1倍、垂直方向にa2倍にしたベクトル
53 動きベクトル候補
54 参照ブロック
61 並進ベクトルV1
62 並進ベクトルV2
63 入力フレームのマクロブロック
64 縮小画像のマクロブロック
71 並進ベクトルV1
72 並進ベクトルV2
73 入力フレームのマクロブロック
74 縮小画像のマクロブロック
A1 入力フレームが画像を表現可能な周波数領域
A2 サンプリング例1で作成した縮小画像が画像を表現可能な周波数領域
A3 サンプリング例2で作成した縮小画像が画像を表現可能な周波数領域
91 縮小参照ブロック読み出し領域
92 縮小動きベクトル候補
100 符号化ブロックをベクトル101だけ移動させたもの
101 縮小動きベクトルを水平方向にa1倍、垂直方向にa2倍にしたベクトル
110 符号化ブロックをベクトル111だけ移動させたもの
111 101を補正したベクトル
121 補正後の縮小参照ブロック読み出し領域
151 サンプリング処理部
152 画像記憶部
153 動きベクトル検出部
161 画素データ抽出部
162 サンプリング位置制御部
171 SAD計算部
172 読み出し位置制御部
173 縮小動きベクトル候補生成部
174 ブロックアドレス制御部
175 SAD評価部
DESCRIPTION OF SYMBOLS 10 Encoding frame 11 Macroblock of encoding frame 10 12 Encoding block 20 Reference frame 21 Reference area 22 Reference block 23 Motion vector candidate 30 Reduced encoded image 31 Reduced macroblock 32 Reduced encoded block 40 Reduced reference image 41 Reduced reference Area 42 reduced reference block 43 reduced motion vector candidate 51 reference area 52 vector obtained by reducing the reduced motion vector by a1 times in the horizontal direction and a2 times in the vertical direction 53 motion vector candidates 54 reference block 61 translation vector V1
62 Translation vector V2
63 Macroblock of input frame 64 Macroblock of reduced image 71 Translation vector V1
72 Translation vector V2
73 Macroblock of input frame 74 Macroblock of reduced image A1 Frequency region where input frame can represent image A2 Frequency region where reduced image created in sampling example 1 can represent image A3 Reduced image created in sampling example 2 Frequency domain that can represent an image 91 Reduced reference block read area 92 Reduced motion vector candidate 100 Vector obtained by moving the encoded block by the vector 101 101 Vector obtained by multiplying the reduced motion vector by a1 in the horizontal direction and a2 in the vertical direction 110 A coded block moved by a vector 111 111 A vector obtained by correcting 111 101 A reduced reference block read area after correction 151 A sampling processing unit 152 An image storage unit 153 A motion vector detection unit 161 A pixel data extraction unit 162 A sample Grayed position control unit 171 SAD calculation unit 172 reads the position control unit 173 reduces the motion vector candidate generation unit 174 block address control unit 175 SAD evaluation unit

Claims (9)

入力フレームから作成した縮小画像における動きベクトルを検出し、前記入力フレームにおける動きベクトルの探索を前記縮小画像における動きベクトルに基づいて行なう動画像符号化装置において、
複数の入力フレームについて、垂直方向に第1の所定間隔で配置された行において、水平方向に第2の所定の間隔で配置され、画素の位置を前記第1の所定間隔を空けた行に含まれる画素と所定の列数ずらして配置された画素で形成される画素群か、もしくは水平方向に前記第2の所定間隔で配置された列において、垂直方向に前記第1の所定の間隔で配置され、画素の位置を前記第2の所定間隔を空けた列に含まれる画素と所定の行数ずらして配置された画素で形成される画素群をサンプリングし、それぞれの入力フレームから縮小画像を作成するサンプリング処理部と、
前記作成された縮小画像間において、各画素の読み出し位置を前記入力フレームにおける位置的な対応関係に応じて補正して、前記作成された縮小画像における動きベクトルの探索を行なう動きベクトル検出部と
を有することを特徴とする動画像符号化装置
In a moving image encoding apparatus that detects a motion vector in a reduced image created from an input frame and performs a search for a motion vector in the input frame based on the motion vector in the reduced image.
For a plurality of input frames, in rows arranged at first predetermined intervals in the vertical direction, pixels are arranged at second predetermined intervals in the horizontal direction, and pixel positions are included in the rows spaced at the first predetermined intervals. A pixel group formed of pixels arranged with a predetermined number of columns shifted from the pixels to be arranged, or arranged at the first predetermined interval in the vertical direction in a column arranged at the second predetermined interval in the horizontal direction A pixel group formed by pixels arranged by shifting the position of pixels by a predetermined number of rows from the pixels included in the second predetermined interval, and creating a reduced image from each input frame A sampling processing unit to perform,
A motion vector detection unit that corrects the readout position of each pixel according to the positional correspondence in the input frame between the created reduced images and searches for a motion vector in the created reduced image; A moving picture coding apparatus comprising:
前記動きベクトル検出部が、
動きベクトルを探索する前記作成された縮小画像のうち、参照対象の縮小画像について画素の読み出し位置を補正すること
を特徴とする請求項1に記載の動画像符号化装置
The motion vector detection unit is
2. The moving picture encoding apparatus according to claim 1, wherein a pixel reading position of a reduced image to be referred to is corrected among the created reduced images for searching for a motion vector.
前記サンプリング処理部が、
整数a1,a2,b1,b2を、b1,b2はいずれかが0であり、b2はa1より小さく、b1はa2よりも小さいとして、
V1=(a1,b1)
V2=(b2,a2)
と定義されるベクトルV1,V2を用いて、前記入力フレームにおいて所定の画素を始点として前記ベクトルV1,V2それぞれの整数倍の和で示される位置にある画素をサンプリングして前記縮小画像を作成すること
を特徴とする請求項1、又は請求項2に記載の動画像符号化装置
The sampling processing unit
Integers a1, a2, b1, b2, b1 and b2 are either 0, b2 is smaller than a1, and b1 is smaller than a2,
V1 = (a1, b1)
V2 = (b2, a2)
Using the vectors V1 and V2 defined as follows, the reduced image is created by sampling the pixels at the positions indicated by the sum of integer multiples of the vectors V1 and V2 starting from a predetermined pixel in the input frame. The moving picture coding apparatus according to claim 1 or 2,
前記サンプリング処理部において、
ベクトルV1,V2を定義する整数a1,a2,b1,b2の比が
a1:a2:b1:b2=2:1:0:1
である場合に、前記入力フレームにおいて所定の画素を始点として前記ベクトルV1,V2それぞれの整数倍の和で示される位置にある画素をサンプリングすること
を特徴とする請求項3記載の動画像符号化装置
In the sampling processing unit,
The ratio of integers a1, a2, b1, b2 defining vectors V1, V2 is a1: a2: b1: b2 = 2: 1: 0: 1
4. The moving picture coding according to claim 3, wherein a pixel at a position indicated by a sum of integer multiples of each of the vectors V 1 and V 2 is sampled starting from a predetermined pixel in the input frame. apparatus
前記入力フレームの周波数分布を算出する周波数解析部と、
前記周波数分布に基づいて前記ベクトルV1,V2を決定し、前記サンプリング処理部に指示するパターン指示部とを新たにそなえ、
前記サンプリング処理部が、前記ベクトルV1,V2に基づいてサンプリングする画素を決定すること
を特徴とする請求項4記載の動画像符号化装置
A frequency analysis unit for calculating a frequency distribution of the input frame;
The vectors V1 and V2 are determined based on the frequency distribution, and a pattern designating unit that instructs the sampling processing unit is newly provided.
5. The moving picture encoding apparatus according to claim 4, wherein the sampling processing unit determines pixels to be sampled based on the vectors V1 and V2.
前記パターン指示部が、
複数組の前記ベクトルV1,V2の候補を記憶する候補記憶部と、
前記候補毎に、前記周波数分布のうち、前記候補に基づいた配置の画素のみで表現可能な周波数領域に含まれる周波数成分を評価する候補評価部と、
前記候補評価部の評価に基づき、前記入力フレームの前記周波数成分を最も多く含む周波数領域に対応する前記候補を1つ選択し、選択された前記候補を前記サンプリング処理部に指示する候補選択部と
を有することを特徴とする請求項5記載の動画像符号化装置
The pattern instruction unit is
A candidate storage unit that stores a plurality of candidates for the vectors V1 and V2, and
For each candidate, a candidate evaluation unit that evaluates a frequency component included in a frequency region that can be expressed by only pixels arranged based on the candidate in the frequency distribution;
Based on the evaluation of the candidate evaluation unit, a candidate selection unit that selects one of the candidates corresponding to the frequency region including the most frequency components of the input frame, and instructs the sampling processing unit to select the selected candidate; The moving picture coding apparatus according to claim 5, further comprising:
前記候補記憶部が、
a1:a2:b1:b2=2:1:0:1
である整数a1,a2,b1,b2で定義される前記ベクトルV1,V2を候補の1つとし、
前記候補とa1,a2の値が同じであり、
a1:a2:b1:b2=1:1:0:0
である整数a1,a2,b1,b2で定義される前記ベクトルV1,V2を候補の1つとすること
を特徴とする請求項5又は請求項6記載の動画像符号化装置
The candidate storage unit
a1: a2: b1: b2 = 2: 1: 0: 1
Let the vectors V1, V2 defined by the integers a1, a2, b1, b2 as one of the candidates,
The candidates and a1, a2 have the same value,
a1: a2: b1: b2 = 1: 1: 0: 0
7. The moving picture coding apparatus according to claim 5, wherein the vectors V1 and V2 defined by the integers a1, a2, b1, and b2 are one of candidates.
入力フレームから作成した縮小画像における動きベクトルを検出し、前記入力フレームにおける動きベクトルの探索を前記縮小画像における動きベクトルに基づいて行なう動画像符号化方法において、
複数の入力フレームについて、同一の行に属し、間に画素を選択されない2つの画素と、前記2つの画素間の列に属する画素とを選択するか、もしくは、同一の列に属し、間に画素を選択されない2つの画素と、前記2つの画素間の行に属する画素とを選択し、
前記選択された画素のいずれかに対し、前記選択された画素の画素同士の位置関係のいずれかを満たす画素をさらに選択することにより形成される画素群をサンプリングし、それぞれの入力フレームから縮小画像を作成し、
前記作成された縮小画像の各画素の読み出し位置を前記入力フレームにおける位置的な対応関係に応じて補正して、前記作成された縮小画像における動きベクトルの探索を行なうこと
を特徴とする動画像符号化方法
In a moving image encoding method for detecting a motion vector in a reduced image created from an input frame and performing a search for a motion vector in the input frame based on the motion vector in the reduced image,
For two or more input frames, select two pixels that belong to the same row and for which no pixel is selected and a pixel that belongs to a column between the two pixels, or belong to the same column and have a pixel in between Selecting two pixels that are not selected and pixels belonging to a row between the two pixels,
A pixel group formed by further selecting a pixel that satisfies any of the positional relationships between the pixels of the selected pixel with respect to any of the selected pixels is sampled, and a reduced image is obtained from each input frame. Create
A moving image code comprising: correcting a read position of each pixel of the generated reduced image according to a positional correspondence in the input frame and searching for a motion vector in the generated reduced image Method
入力フレームから作成した縮小画像における動きベクトルを検出し、前記入力フレームにおける動きベクトルの探索を前記縮小画像における動きベクトルに基づいて行なうことをコンピュータに実行させる動画像符号化プログラムにおいて、
複数の入力フレームについて、同一の行に属し、間に画素を選択されない2つの画素と、前記2つの画素間の列に属する画素とを選択するか、もしくは、同一の列に属し、間に画素を選択されない2つの画素と、前記2つの画素間の行に属する画素とを選択し、
前記選択された画素のいずれかに対し、前記選択された画素の画素同士の位置関係のいずれかを満たす画素をさらに選択することにより形成される画素群をサンプリングし、それぞれの入力フレームから縮小画像を作成するステップと、
前記作成された縮小画像の各画素の読み出し位置を前記入力フレームにおける位置的な対応関係に応じて補正して、前記作成された縮小画像における動きベクトルの探索を行なうステップと
をコンピュータに実行させることを特徴とする動画像符号化プログラム



In a moving image encoding program for causing a computer to detect a motion vector in a reduced image created from an input frame and to perform a search for a motion vector in the input frame based on the motion vector in the reduced image,
For two or more input frames, select two pixels that belong to the same row and for which no pixel is selected and a pixel that belongs to a column between the two pixels, or belong to the same column and have a pixel in between Selecting two pixels that are not selected and pixels belonging to a row between the two pixels,
A pixel group formed by further selecting a pixel that satisfies any of the positional relationships between the pixels of the selected pixel with respect to any of the selected pixels is sampled, and a reduced image is obtained from each input frame. The steps of creating
Correcting a read position of each pixel of the generated reduced image according to a positional correspondence in the input frame, and causing the computer to execute a motion vector search in the generated reduced image. Video coding program characterized by



JP2010002960A 2010-01-08 2010-01-08 Moving picture coding apparatus, moving picture coding method, and moving picture coding program Expired - Fee Related JP5353719B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010002960A JP5353719B2 (en) 2010-01-08 2010-01-08 Moving picture coding apparatus, moving picture coding method, and moving picture coding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010002960A JP5353719B2 (en) 2010-01-08 2010-01-08 Moving picture coding apparatus, moving picture coding method, and moving picture coding program

Publications (2)

Publication Number Publication Date
JP2011142564A true JP2011142564A (en) 2011-07-21
JP5353719B2 JP5353719B2 (en) 2013-11-27

Family

ID=44458100

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010002960A Expired - Fee Related JP5353719B2 (en) 2010-01-08 2010-01-08 Moving picture coding apparatus, moving picture coding method, and moving picture coding program

Country Status (1)

Country Link
JP (1) JP5353719B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013232843A (en) * 2012-05-01 2013-11-14 Canon Inc Video encoder and video encoding method
CN110120015A (en) * 2018-02-05 2019-08-13 韩华泰科株式会社 The method and apparatus for reducing the noise of image

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0530494A (en) * 1991-07-24 1993-02-05 Hitachi Ltd Picture encoding and decoding device
JPH08289301A (en) * 1995-04-11 1996-11-01 Hitachi Ltd Image coding device
JPH1042300A (en) * 1996-07-25 1998-02-13 Sanyo Electric Co Ltd Motion vector detection device
JP2004200894A (en) * 2002-12-17 2004-07-15 Mitsubishi Electric Corp Motion vector detecting method, motion vector detecting apparatus, and image encoder
JP2007129333A (en) * 2005-11-01 2007-05-24 Mitsubishi Electric Corp Motion vector detector and method of detecting motion vector
JP2008283505A (en) * 2007-05-11 2008-11-20 Nec Corp Motion vector detecting method, device and program
JP2009295029A (en) * 2008-06-06 2009-12-17 Sony Corp Moving quantity detection device and moving quantity detection method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0530494A (en) * 1991-07-24 1993-02-05 Hitachi Ltd Picture encoding and decoding device
JPH08289301A (en) * 1995-04-11 1996-11-01 Hitachi Ltd Image coding device
JPH1042300A (en) * 1996-07-25 1998-02-13 Sanyo Electric Co Ltd Motion vector detection device
JP2004200894A (en) * 2002-12-17 2004-07-15 Mitsubishi Electric Corp Motion vector detecting method, motion vector detecting apparatus, and image encoder
JP2007129333A (en) * 2005-11-01 2007-05-24 Mitsubishi Electric Corp Motion vector detector and method of detecting motion vector
JP2008283505A (en) * 2007-05-11 2008-11-20 Nec Corp Motion vector detecting method, device and program
JP2009295029A (en) * 2008-06-06 2009-12-17 Sony Corp Moving quantity detection device and moving quantity detection method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013232843A (en) * 2012-05-01 2013-11-14 Canon Inc Video encoder and video encoding method
CN110120015A (en) * 2018-02-05 2019-08-13 韩华泰科株式会社 The method and apparatus for reducing the noise of image
KR20190094705A (en) * 2018-02-05 2019-08-14 한화테크윈 주식회사 Method and Apparatus for Noise Reduction
KR102467240B1 (en) * 2018-02-05 2022-11-15 한화테크윈 주식회사 Method and Apparatus for Noise Reduction

Also Published As

Publication number Publication date
JP5353719B2 (en) 2013-11-27

Similar Documents

Publication Publication Date Title
JP6101709B2 (en) Video decoding device
KR20110008653A (en) Method and apparatus for predicting motion vector and method and apparatus of encoding/decoding a picture using the same
KR20180019688A (en) Picture prediction method and picture prediction apparatus
JP2006254349A (en) Motion vector detecting method and apparatus, and computer program for executing motion vector detection processing on computer
JP2007124408A (en) Motion vector detector and motion vector detecting method
WO2012086829A1 (en) Movement estimation device, movement estimation method, movement estimation program, and video image encoding device
CN112292861B (en) Sub-pixel accurate correction method based on error surface for decoding end motion vector correction
KR20110122167A (en) Compressed dynamic image encoding device, compressed dynamic image decoding device, compressed dynamic image encoding method and compressed dynamic image decoding method
JP2010206664A (en) Image encoding device, image encoding control method, and program
JP2004328633A (en) Motion predicting and compensating apparatus and method thereof
JP5353719B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP5716437B2 (en) Image coding apparatus, image coding method, and image coding program
US11882308B2 (en) Image decoding device, image encoding device, image processing system, and program
CN114727114B (en) Method and device for determining motion vector
JP6390275B2 (en) Encoding circuit and encoding method
JP2010081635A (en) Apparatus, method and program for motion compensation prediction coding
JP4797999B2 (en) Image encoding / decoding device
JP2010161747A (en) Apparatus and method for generating sub-pixel, and motion compensating apparatus
JP2006254347A (en) Image encoding device
JP2007312425A (en) Image encoding method, image decoding method, image encoding apparatus, image decoding apparatus, image encoding program, image decoding program and recording medium with the programs recorded thereon
JP5571262B2 (en) Image encoding method and image decoding method
JP2008085674A (en) Motion detecting apparatus and method
WO1999044369A1 (en) Device and method for coding image
JP5720399B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
WO2012153440A1 (en) Prediction vector generation method, prediction vector generation device, prediction vector generation program, image encoding method, image encoding device, image encoding program, image decoding method, image decoding device, and image decoding program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130507

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130708

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130730

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130812

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees