JP2009021673A - Coded parameter determining method, coded parameter determining device, coded parameter determining program and computer-readable recording medium recording the program - Google Patents

Coded parameter determining method, coded parameter determining device, coded parameter determining program and computer-readable recording medium recording the program Download PDF

Info

Publication number
JP2009021673A
JP2009021673A JP2007180910A JP2007180910A JP2009021673A JP 2009021673 A JP2009021673 A JP 2009021673A JP 2007180910 A JP2007180910 A JP 2007180910A JP 2007180910 A JP2007180910 A JP 2007180910A JP 2009021673 A JP2009021673 A JP 2009021673A
Authority
JP
Japan
Prior art keywords
block
mode
prediction mode
cost
determined
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
JP2007180910A
Other languages
Japanese (ja)
Other versions
JP4709187B2 (en
Inventor
Yukihiro Bando
幸浩 坂東
Kazuya Hayase
和也 早瀬
Masayuki Takamura
誠之 高村
Kazuto Kamikura
一人 上倉
Yoshiyuki Yashima
由幸 八島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2007180910A priority Critical patent/JP4709187B2/en
Publication of JP2009021673A publication Critical patent/JP2009021673A/en
Application granted granted Critical
Publication of JP4709187B2 publication Critical patent/JP4709187B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To establish a technique for preventing deterioration in image quality in a skip mode and reducing code amount of the skip mode in determining a coded parameter by minimizing a cost function using coded distortion weighted on the basis of time spatial visual characteristics. <P>SOLUTION: The coded parameter determining method includes: coding target block, when a prediction mode of minimum cost selected by calculating the cost by using a distortion quantity weighted using a sensitivity coefficient indicating time spatial visual sensitivity is a skip mode, the skip mode is not determined as it is as the optimum prediction mode of the block, but the displacement quantity to be used in coding is compared to the estimated displacement quantity calculated prior to coding; and when the difference between the two displacement quantities is large and the estimated displacement quantity is large, the prediction mode of the minimum cost selected by calculating the cost by using the unweighted distortion quantity is determined as a prediction mode. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、動画像符号化で用いられる符号化パラメータ決定方法およびその装置と、その符号化パラメータ決定方法の実現に用いられる符号化パラメータ決定プログラムおよびそのプログラムを記録したコンピュータ読み取り可能な記録媒体とに関し、特に、時空間視覚感度を考慮して動画像の符号化を行うときに、復号画像の主観品質を保ちながら効率的に符号量を削減できるようにする符号化パラメータの決定を実現する符号化パラメータ決定方法およびその装置と、その符号化パラメータ決定方法の実現に用いられる符号化パラメータ決定プログラムおよびそのプログラムを記録したコンピュータ読み取り可能な記録媒体とに関する。   The present invention relates to an encoding parameter determination method and apparatus used in moving image encoding, an encoding parameter determination program used to realize the encoding parameter determination method, and a computer-readable recording medium on which the program is recorded. In particular, when encoding a moving image in consideration of spatio-temporal visual sensitivity, a code that realizes determination of an encoding parameter that can efficiently reduce the amount of code while maintaining the subjective quality of the decoded image The present invention relates to an encoding parameter determination method and apparatus, an encoding parameter determination program used for realizing the encoding parameter determination method, and a computer-readable recording medium on which the program is recorded.

[二乗誤差規範のコスト関数を用いる符号化方式]
H.264では、イントラ予測および可変形状動き補償の導入に伴い、従来の標準化方式と比べて、予測モードの種類が増加している。このため、一定の主観画質を保持しつつ符号量を削減するには、適切な予測モードを選択する必要がある。H.264の参照ソフトウェアJM(非特許文献1参照)では、以下のR−Dコストを最小化する予測モードを選択している。なお、以下の表記において、「^X」(Xは文字)における記号^は、「X」の上に付く記号を示している。
[Encoding method using cost function of square error criterion]
H. In H.264, with the introduction of intra prediction and variable shape motion compensation, the types of prediction modes are increasing compared to the conventional standardized method. For this reason, in order to reduce the amount of codes while maintaining a constant subjective image quality, it is necessary to select an appropriate prediction mode. H. In the H.264 reference software JM (see Non-Patent Document 1), the following prediction mode that minimizes the RD cost is selected. In the following notation, the symbol ^ in “^ X” (where X is a letter) indicates a symbol attached to “X”.

Figure 2009021673
Figure 2009021673

ここで、Sは原信号、qは量子化パラメータ、mは予測モードを表す番号であり、^Sm,q は原信号Sに対して予測モードmを用いて予測し、量子化パラメータqを用いて量子化した場合の復号信号である。また、λはモード選択に用いるラグランジェの未定乗数である。さらに、D(S,^Sm,q )は次式に示す二乗誤差和である。 Here, S is an original signal, q is a quantization parameter, m is a number representing a prediction mode, ^ S m, q is predicted for the original signal S using the prediction mode m, and the quantization parameter q is It is a decoded signal when quantized by using. Further, λ is a Lagrange's undetermined multiplier used for mode selection. Further, D (S, ^ S m, q ) is a sum of square errors shown in the following equation.

Figure 2009021673
Figure 2009021673

ここで、SY ,SU ,SV はそれぞれ原信号のY,U,V成分であり、^SY m,q ,^SU m,q ,^SV m,q はそれぞれ復号信号のY,U,V成分である。 Here, S Y , S U , and S V are Y, U, and V components of the original signal, respectively, and ^ S Y m, q , SS U m, q , and SS V m, q are respectively the decoded signals. Y, U and V components.

H.264における復号信号の算出方法を以下に示す。なお、説明に用いる記号を下記の表にまとめる。   H. The calculation method of the decoded signal in H.264 is shown below. The symbols used for the explanation are summarized in the following table.

Figure 2009021673
Figure 2009021673

H.264の符号化処理では、モード番号mの予測を用いた場合の予測誤差信号Rm (=S−Pm )に対して、変換行列Φを用いた直交変換が次式のように施される。 H. In the H.264 encoding process, the orthogonal transformation using the transformation matrix Φ is applied to the prediction error signal R m (= S−P m ) when the prediction of the mode number m is used as follows: .

Figure 2009021673
Figure 2009021673

ここで、Φt は変換行列Φに対する転置行列を表す。なお、変換行列Φは次式で表される整数要素の直交行列である。 Here, Φ t represents a transposed matrix with respect to the transformation matrix Φ. Note that the transformation matrix Φ is an orthogonal matrix of integer elements expressed by the following equation.

Figure 2009021673
Figure 2009021673

次に、行列Φが非正規行列であるため、次式に示すように、行列の正規化に相当する処理を行う。   Next, since the matrix Φ is a non-normal matrix, processing equivalent to matrix normalization is performed as shown in the following equation.

n =N(C)
さらに、Cn に対して、量子化パラメータqを用いた量子化が次式のとおり施される。なお、H.264の参照ソフトウェアJMでは、正規化は量子化の中に組み込まれている。
C n = N (C)
Further, quantization using the quantization parameter q is performed on C n as follows. H. In the H.264 reference software JM, normalization is built into quantization.

V=Q(Cn
一方、H.264の復号処理では、Vに対して、次式のように逆量子化を施し、変換係数の復号値を得る。
V = Q (C n )
On the other hand, H. In the H.264 decoding process, V is inversely quantized as in the following equation to obtain a decoded value of a transform coefficient.

Figure 2009021673
Figure 2009021673

次に、^Cq に対して、次式のように逆変換を施し、予測誤差の復号信号を得る。 Next, inverse transformation is applied to { circumflex over (C) } q as shown in the following equation to obtain a prediction error decoded signal.

Figure 2009021673
Figure 2009021673

最後に、次式により、符号化対象画像の復号信号を得る。   Finally, a decoded signal of the encoding target image is obtained by the following equation.

Figure 2009021673
Figure 2009021673

[主観画質を考慮した歪み量への重み付け]
前述の通り、H.264の参照ソフトウェアJMで用いられている主観画質の尺度は二乗誤差である。しかし、この二乗誤差は必ずしも、主観的な画質劣化を反映した歪み量ではない。例えば、高周波数成分の変化は低周波成分の変化に比べて、視覚的には検知されにくい。しかし、こうした視覚特性を利用していない符号化器(例えば、JM)には、符号量の効率的な削減に関して、改良の余地が残る。
[Weighting distortion amount considering subjective image quality]
As described above, H.P. The measure of subjective image quality used in the H.264 reference software JM is a square error. However, this square error is not necessarily a distortion amount reflecting subjective image quality degradation. For example, a change in a high frequency component is less visually detected than a change in a low frequency component. However, an encoder (for example, JM) that does not use such visual characteristics still has room for improvement in terms of efficient code amount reduction.

そこで、時空間周波数成分に対して視覚感度に差があることを利用する検討がなされている。直交変換係数に対して、視覚感度に応じて空間周波数成分毎に歪み量の重み付けを行うことで、主観画質に対応した歪み量を定義する。さらに、時間方向の視覚感度も考慮して、上述の重み付けされた歪み量に対して、変移量に応じてさらに重み付けを行う。こうして時空間の視覚感度に基づき重み付けされた歪み量を、符号化パラメータ選択のコスト関数において用いる。   Therefore, studies have been made to use the difference in visual sensitivity with respect to spatio-temporal frequency components. A distortion amount corresponding to the subjective image quality is defined by weighting the distortion amount for each spatial frequency component in accordance with the visual sensitivity with respect to the orthogonal transform coefficient. Further, in consideration of the visual sensitivity in the time direction, the above-described weighted distortion amount is further weighted in accordance with the shift amount. Thus, the weighting amount weighted based on the visual sensitivity of the space time is used in the cost function for selecting the encoding parameter.

量子化誤差信号に対する視覚感度に基づく重み付けについて、以下に説明する。ここでは、次式のR−Dコストを用いることを想定している。   The weighting based on the visual sensitivity for the quantization error signal will be described below. Here, it is assumed that the RD cost of the following equation is used.

Figure 2009021673
Figure 2009021673

ここで、Cm はモード番号mを用いた場合の予測残差信号Rm に対する変換係数であり、^Cm,q はCm を量子化パラメータqで量子化・逆量子化して得られる係数の復号値である。このR−Dコストの計算に用いる歪み量として、以下の重み付け歪み量を用いる。 Here, C m is a transform coefficient for the prediction residual signal R m when the mode number m is used, and ^ C m, q is a coefficient obtained by quantizing and dequantizing C m with the quantization parameter q. Is the decoded value. The following weighted distortion amount is used as the distortion amount used for calculating the RD cost.

Figure 2009021673
Figure 2009021673

ここで、16/Nおよび8/Nを囲む記号は、小数部分の切り捨てを意味する。また、CY(i) m[k,l],CU(i) m[k,l],CV(i) m[k,l]はCm の要素であり、マクロブロック(Y成分の場合には16×16[画素]、U,V成分の場合には8×8[画素])内のサブブロック(N×N[画素])のうち、ラスター走査においてi番目に走査されるサブブロックに含まれる変換係数である。また、^CY(i) m,q[k,l]、^CU(i) m,q[k,l]、^CV(i) m,q[k,l]は^Cm,q の要素であり、マクロブロック(Y成分の場合には16×16[画素]、U,V成分の場合には8×8[画素])内のサブブロック(N×N[画素])のうち、ラスター走査においてi番目に走査されるサブブロックに含まれる復号変換係数である。 Here, the symbols surrounding 16 / N and 8 / N mean truncation of the decimal part. C Y (i) m [k, l], C U (i) m [k, l], and C V (i) m [k, l] are elements of C m , and are macroblocks (Y component) Of the sub-block (N × N [pixel]) in 16 × 16 [pixel] in the case of U, V component and 8 × 8 [pixel] in the case of U and V components) is scanned i-th in the raster scan. This is a conversion coefficient included in the sub-block. ^ C Y (i) m, q [k, l], ^ C U (i) m, q [k, l] and ^ C V (i) m, q [k, l] are ^ C m , q elements and sub-blocks (N × N [pixels]) in a macroblock (16 × 16 [pixels] for Y components and 8 × 8 [pixels] for U and V components) Among them, the decoding transform coefficient included in the i-th scanned sub-block in raster scanning.

さらに、WY k,l ,WU k,l ,WV k,l は1以下に設定される重み係数であり、空間周波数および時間周波数が高いほど、小さな値をとる。 Further, W Y k, l , W U k, l and W V k, l are weighting factors set to 1 or less, and take a smaller value as the spatial frequency and time frequency are higher.

上式において、WY k,l ,WU k,l ,WV k,l を小さな値に設定することは、量子化歪みD(Cm ,^Cm,q )を小さく見積もることに相当する。なお、直交変換の正規性より、すべてのk,1に対して、WY k,l =1,WU k,l =1,WV k,l =1とすれば、上述の重み付け歪み量は二乗誤差和と等価となる。
K.P.Lim and G.Sullivan and T.Wiegand, Text Description of Joint Model Reference Encoding Methods and Decoding Concealment Methods. Joint Video Team (JVT )of ISO/IEC MPEG and ITU-T VCEG, JVT-R95, Jan., 2006.
In the above equation, setting W Y k, l , W U k, l , W V k, l to a small value is equivalent to estimating the quantization distortion D (C m , ^ C m, q ) to be small. To do. From the normality of orthogonal transformation, if W Y k, l = 1, W U k, l = 1, W V k, l = 1 for all k, 1 , the above-mentioned weighted distortion amount Is equivalent to the sum of squared errors.
KPLim and G. Sullivan and T. Wiegand, Text Description of Joint Model Reference Encoding Methods and Decoding Concealment Methods. Joint Video Team (JVT) of ISO / IEC MPEG and ITU-T VCEG, JVT-R95, Jan., 2006.

H.264では、直上、直左、直左上のマクロブロックの動きベクトルを用いて、符号化対象のマクロブロックの動きベクトルに対する予測ベクトルを生成する。   H. In H.264, a prediction vector for a motion vector of a macroblock to be encoded is generated using the motion vectors of the macroblock immediately above, immediately left, and immediately above left.

スキップモード以外の予測モードの場合には、この予測ベクトルとの差分情報を用いて、動きベクトルを表現する。   In the case of a prediction mode other than the skip mode, a motion vector is expressed using difference information from this prediction vector.

一方、スキップモードの場合には、動きベクトルとして、この予測ベクトルを用いる。さらに、フレーム間予測残差は零値として、復号信号を生成する。   On the other hand, in the skip mode, this prediction vector is used as a motion vector. Further, the inter-frame prediction residual is set to zero and a decoded signal is generated.

このため、予測ベクトルが異なる絵柄の領域を参照することになれば、スキップモードのマクロブロックに大きな符号化歪みが重畳することになる。一方、符号量は極めて微小に抑えることができる。   For this reason, if reference is made to a region of a picture with a different prediction vector, a large coding distortion is superimposed on the skip mode macroblock. On the other hand, the amount of codes can be kept extremely small.

こうした符号化歪みと符号量とはトレードオフの関係にあるため、JMと呼ばれるH.264の符号化器では、符号化歪みと符号量との加重和としてラグランジェのコスト関数を導入し、このトレードオフのバランスを勘案し、予測モードの選択を行っている。   Since such coding distortion and code amount are in a trade-off relationship, H.J. In the H.264 encoder, a Lagrangian cost function is introduced as a weighted sum of encoding distortion and code amount, and a prediction mode is selected in consideration of this trade-off balance.

しかるに、前述のコントラスト感度関数に基づく歪み量への重み付け(WY k,l ,WU k,l ,WV k,l による重み付け)を行った場合、スキップモードが大きな画質劣化を含んでいるにもかかわらず、スキップモードが最適な予測モードとして選択される場合がある。 However, when weighting is applied to the distortion amount based on the above-described contrast sensitivity function (weighting by W Y k, l , W U k, l , W V k, l ), the skip mode includes large image quality degradation. Nevertheless, the skip mode may be selected as the optimal prediction mode.

このような画質劣化が発生するということは、符号化歪みに対する重み付けを行う際に、スキップモードに関しては、このモードの持つ特異性を考慮する必要性があることを示唆している。しかしながら、従来技術では、そのような検討がなされていない。   The occurrence of such image quality degradation suggests that it is necessary to consider the peculiarity of this mode with respect to the skip mode when weighting the coding distortion. However, such a study has not been made in the prior art.

本発明はかかる事情に鑑みてなされたものであって、時空間視覚特性に基づき重み付けされた符号化歪みを用いたコスト関数の最小化により、符号化パラメータの決定を行う際に、スキップモードの主観画質を適切に評価した符号化歪みの尺度を導入することで、スキップモードにおける画質劣化を回避し、スキップモードの符号量削減のメリットを最大限享受しうる新たな符号化パラメータ決定技術を確立することを目的とする。   The present invention has been made in view of such circumstances, and in determining the encoding parameter by minimizing the cost function using the encoding distortion weighted based on the spatio-temporal visual characteristics, the skip mode is used. Established a new coding parameter determination technology that can avoid degradation of image quality in skip mode and enjoy the maximum benefit of code amount reduction in skip mode by introducing a measure of coding distortion that appropriately evaluates subjective image quality The purpose is to do.

〔1〕第1の構成
前記の目的を達成するために、本発明の符号化パラメータ決定装置は、フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行う画像符号化に用いる符号化パラメータを決定するために、(イ)符号化対象のブロックについて、符号化処理に先立って、画像信号の時間的な動きを示す推定変位量を算出する算出手段と、(ロ)時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードであるブロックを判断対象として、そのブロックを符号化する際に用いる変位量と算出手段の算出した推定変位量とを比較して、その2つの変位量の乖離度が規定の閾値より大きく、かつ、推定変位量の大きさが規定の閾値より大きいのか否かを判断することで、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当するのか否かを判断する判断手段と、(ハ)判断手段が該当のブロックでないと判断した判断対象のブロックについては、スキップモードをそのブロックの最適な予測モードとして決定し、判断手段が該当のブロックであると判断した判断対象のブロックについては、重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードをそのブロックの最適な予測モードとして決定する決定手段と、(ニ)重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードでないブロックについて、その予測モードをそのブロックの最適な予測モードとして決定する第2の決定手段と、(ホ)判断手段が判断対象とするブロックについて、重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードもまたスキップモードである場合には、判断手段による判断処理を行うことなく、スキップモードをそのブロックの最適な予測モードとして決定する第3の決定手段とを備えるように構成する。
[1] First Configuration To achieve the above object, the coding parameter determination apparatus of the present invention performs transform coding and quantization on a prediction error signal obtained by intraframe prediction and interframe prediction. In order to determine the encoding parameters used for image encoding that performs information compression by (i), the estimated displacement amount indicating the temporal movement of the image signal is calculated prior to the encoding process for the block to be encoded. And (b) a block in which the prediction mode with the lowest cost selected by calculating the cost using the weighted distortion amount using the sensitivity coefficient indicating the spatiotemporal visual sensitivity is the skip mode. As a comparison between the amount of displacement used when encoding the block and the estimated amount of displacement calculated by the calculation means, the difference between the two amounts of displacement is greater than a prescribed threshold, In addition, by determining whether or not the size of the estimated displacement amount is larger than a prescribed threshold, it is determined whether or not the block is likely to fall in image quality deterioration when encoded in the skip mode. (C) For a block to be determined that the determination means determines that it is not the corresponding block, the skip mode is determined as the optimum prediction mode of the block, and the determination target that the determination means determines to be the corresponding block is determined. For a block, a determination means for determining a prediction mode with the least cost selected by calculating a cost using an unweighted distortion amount as an optimal prediction mode of the block; and (d) a weighted distortion amount. Prediction of the block with the least cost prediction mode selected by calculating the cost using the skip mode A second determination unit that determines the mode as the optimum prediction mode of the block, and (e) a block selected by the determination unit is selected by calculating a cost using an unweighted distortion amount When the prediction mode with the lowest cost is also the skip mode, a third determination unit that determines the skip mode as the optimum prediction mode of the block without performing the determination process by the determination unit is provided. .

以上の各処理手段が動作することで実現される本発明の符号化パラメータ決定方法はコンピュータプログラムでも実現できるものであり、このコンピュータプログラムは、適当なコンピュータ読み取り可能な記録媒体に記録して提供されたり、ネットワークを介して提供され、本発明を実施する際にインストールされてCPUなどの制御手段上で動作することにより本発明を実現することになる。   The encoding parameter determination method of the present invention realized by the operation of each of the above processing means can also be realized by a computer program, and this computer program is provided by being recorded on an appropriate computer-readable recording medium. Alternatively, the present invention is realized by being provided via a network, installed when the present invention is carried out, and operating on a control means such as a CPU.

このように構成される本発明の符号化パラメータ決定装置では、符号化対象のブロックについて、時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモード(動きベクトルとして予測ベクトルを用いることを指示する予測モード)である場合には、そのブロックの最適な予測モードして、そのままスキップモードを決定するのではなくて、符号化する際に用いる変位量と符号化に先立って算出した推定変位量とを比較して、その2つの変位量の乖離が大きく、かつ、推定変位量が大きい場合には、重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードをそのブロックの最適な予測モードとして決定するようにする。   In the coding parameter determination apparatus of the present invention configured as described above, a block is selected by calculating a cost using a distortion amount weighted using a sensitivity coefficient indicating spatiotemporal visual sensitivity for a block to be coded. If the prediction mode with the lowest cost is a skip mode (a prediction mode instructing to use a prediction vector as a motion vector), the optimal prediction mode for the block is not determined and the skip mode is not determined as it is. The displacement amount used for encoding is compared with the estimated displacement amount calculated prior to encoding, and if the difference between the two displacement amounts is large and the estimated displacement amount is large, no weighting is performed. The prediction mode with the lowest cost selected by calculating the cost using the amount of distortion is determined as the optimal prediction mode for the block. That.

〔2〕第2の構成
また、前記の目的を達成するために、本発明の符号化パラメータ決定装置は、フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行う画像符号化に用いる符号化パラメータを決定するために、(イ)符号化対象のブロックについて、符号化処理に先立って、画像信号の時間的な動きを示す推定変位量を算出する算出手段と、(ロ)時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードであるブロックを判断対象として、そのブロックを符号化する際に用いる変位量と算出手段の算出した推定変位量とを比較して、その2つの変位量の乖離度が規定の閾値より大きく、かつ、推定変位量の大きさが規定の閾値より大きいのか否かを判断することで、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当するのか否かを判断する判断手段と、(ハ)判断手段が該当のブロックでないと判断した判断対象のブロックについては、スキップモードをそのブロックの最適な予測モードとして決定し、判断手段が該当のブロックであると判断した判断対象のブロックについては、コスト最小のスキップモードの次にコストの小さなものとして選択された予測モードをそのブロックの最適な予測モードとして決定する決定手段と、(ニ)重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードでないブロックについて、その予測モードをそのブロックの最適な予測モードとして決定する第2の決定手段と、(ホ)判断手段が判断対象とするブロックについて、重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードもまたスキップモードである場合には、判断手段による判断処理を行うことなく、スキップモードをそのブロックの最適な予測モードとして決定する第3の決定手段とを備えるように構成する。
[2] Second Configuration Further, in order to achieve the above object, the coding parameter determination apparatus of the present invention performs transform coding and prediction on a prediction error signal obtained by intraframe prediction and interframe prediction. In order to determine encoding parameters used for image encoding for performing information compression by quantization, (a) an estimated displacement amount indicating temporal movement of an image signal prior to encoding processing for a block to be encoded And (b) a block in which the prediction mode with the lowest cost selected by calculating the cost using the distortion amount weighted using the sensitivity coefficient indicating the spatiotemporal visual sensitivity is the skip mode. As a judgment target, the displacement amount used when coding the block is compared with the estimated displacement amount calculated by the calculation means, and the difference between the two displacement amounts is larger than a prescribed threshold value. And whether or not the estimated displacement amount is larger than a predetermined threshold value, it is determined whether or not the block corresponds to a block that is likely to have a large image quality deterioration when encoded in the skip mode. And (c) for the block to be determined that the determining unit determines not to be the corresponding block, the skip mode is determined as the optimum prediction mode of the block, and the determination unit determines that the block is the corresponding block With respect to the target block, using a determination unit that determines the prediction mode selected as the next lowest cost after the skip mode with the lowest cost as the optimum prediction mode of the block, and (d) using the weighted distortion amount The prediction mode selected for the block with the lowest cost selected by calculating the cost is not the skip mode. And (2) a minimum cost selected by calculating the cost using the unweighted distortion amount for the block to be determined by (2) the determination unit. If the prediction mode is also the skip mode, the third determination means for determining the skip mode as the optimum prediction mode for the block without performing the determination process by the determination means is provided.

以上の各処理手段が動作することで実現される本発明の符号化パラメータ決定方法はコンピュータプログラムでも実現できるものであり、このコンピュータプログラムは、適当なコンピュータ読み取り可能な記録媒体に記録して提供されたり、ネットワークを介して提供され、本発明を実施する際にインストールされてCPUなどの制御手段上で動作することにより本発明を実現することになる。   The encoding parameter determination method of the present invention realized by the operation of each of the above processing means can also be realized by a computer program, and this computer program is provided by being recorded on an appropriate computer-readable recording medium. Alternatively, the present invention is realized by being provided via a network, installed when the present invention is carried out, and operating on a control means such as a CPU.

このように構成される本発明の符号化パラメータ決定装置では、符号化対象のブロックについて、時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモード(動きベクトルとして予測ベクトルを用いることを指示する予測モード)である場合には、そのブロックの最適な予測モードして、そのままスキップモードを決定するのではなくて、符号化する際に用いる変位量と符号化に先立って算出した推定変位量とを比較して、その2つの変位量の乖離が大きく、かつ、推定変位量が大きい場合には、コスト最小のスキップモードの次にコストの小さなものとして選択された予測モードをそのブロックの最適な予測モードとして決定するようにする。   In the coding parameter determination apparatus of the present invention configured as described above, a block is selected by calculating a cost using a distortion amount weighted using a sensitivity coefficient indicating spatiotemporal visual sensitivity for a block to be coded. If the prediction mode with the lowest cost is a skip mode (a prediction mode instructing to use a prediction vector as a motion vector), the optimal prediction mode for the block is not determined and the skip mode is not determined as it is. The amount of displacement used for encoding is compared with the estimated amount of displacement calculated prior to encoding. When the difference between the two amounts of displacement is large and the estimated amount of displacement is large, the cost is minimized. The prediction mode selected as the next lowest cost after the skip mode is determined as the optimum prediction mode of the block.

〔3〕本発明について
このように、本発明では、あるブロックについて、重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードである場合には、そのブロックの最適な予測モードして、そのままスキップモードを決定するのではなくて、符号化する際に用いる変位量と符号化に先立って算出した推定変位量とを比較して、その2つの変位量の乖離が大きく、かつ、推定変位量が大きい場合には、コスト最小で選択されたものの、スキップモードで符号化したのでは大きな画質劣化を含んでいる可能性が高いことを考慮して、スキップモード以外の予測モードをそのブロックの最適な予測モードとして決定するようにするという構成を採る。
[3] About the present invention As described above, in the present invention, when the prediction mode with the minimum cost selected by calculating the cost using the weighted distortion amount for a certain block is the skip mode, Rather than determining the skip mode as the optimum prediction mode of the block, the displacement amount used for encoding is compared with the estimated displacement amount calculated prior to encoding, and the two displacement amounts are compared. If the discrepancy between the two is large and the estimated displacement is large, it is selected with the lowest cost, but it is highly possible that coding with the skip mode is likely to include a large image quality degradation. A configuration is adopted in which a prediction mode other than the mode is determined as the optimum prediction mode of the block.

スキップモードが大きな画質劣化を含んでいるにもかかわらず、最適な予測モードとして選択される原因を、以下で考察する。   The reason why the skip mode is selected as the optimum prediction mode despite the large image quality degradation will be considered below.

従来法では、各マクロブロックの真の変移量を符号化処理に先立ち推定する。ここで得られる変移量を推定変移量と呼ぶ。この推定変移量を用いて歪み量に対する重み付けを行う。符号化処理で用いる変移量は、別途、符号化器で算出する。この変移量を符号化器変移量と呼ぶ。   In the conventional method, the true shift amount of each macroblock is estimated prior to the encoding process. The amount of change obtained here is called an estimated amount of change. The estimated amount of displacement is used to weight the amount of distortion. The shift amount used in the encoding process is separately calculated by an encoder. This shift amount is called an encoder shift amount.

従来法では、推定変移量と符号化器変移量とが大きく乖離しないことを前提としている。これに対して、スキップモードの場合、動き探索を行う訳ではないため、符号化器変移量である予測ベクトルが推定変移量と大きく乖離する可能性がある。その結果、異なる絵柄の領域を参照することになれば、大きな符号化歪みが発生する。   In the conventional method, it is assumed that the estimated shift amount and the encoder shift amount do not greatly deviate. On the other hand, in the skip mode, since the motion search is not performed, there is a possibility that the prediction vector that is the encoder shift amount greatly deviates from the estimated shift amount. As a result, if a different picture area is referred to, a large coding distortion occurs.

しかし、推定変移量が大きな場合には、こうした大きな符号化歪みが発生したとしても、重み付けにより、その符号化歪みは小さく見積もられる。その結果、コストが小さくなり、最適モードとして選択される可能性がある。   However, when the estimated shift amount is large, even if such a large coding distortion occurs, the coding distortion is estimated to be small by weighting. As a result, the cost is reduced and the optimum mode may be selected.

そこで、本発明では、推定変移量と符号化器変移量との乖離度を考慮して、歪み量に対する重み付けを行う。すなわち、推定変移量と符号化器変移量とが大きく乖離し、かつ、推定変移量が大きな場合には、前述の画質劣化の可能性が高まるため、重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードを用いることを決定したり、重み付けがされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モード(スキップモード)の次にコストの小さなものとして選択された予測モードを用いることを決定するようにするのである。   Therefore, in the present invention, the distortion amount is weighted in consideration of the degree of deviation between the estimated shift amount and the encoder shift amount. In other words, if the estimated shift amount and the encoder shift amount deviate greatly, and the estimated shift amount is large, the possibility of the above-mentioned image quality degradation increases, so the cost is calculated using the unweighted distortion amount. The cost next to the prediction mode with the lowest cost selected (skip mode) is determined by calculating the cost using the weighted distortion amount. It is decided to use a prediction mode selected as a small one.

次に、推定変移量と符号化器変移量との乖離度を評価する評価関数、および推定変移量の大きさを評価する評価関数について説明する。   Next, an evaluation function for evaluating the degree of deviation between the estimated shift amount and the encoder shift amount, and an evaluation function for evaluating the magnitude of the estimated shift amount will be described.

[推定変位量の参照フレームと符号化器変移量の参照フレームとが同一の場合]
以下では、マクロブロックに対する推定変移量を“^d=(^dx ,^dy )”と表し、符号化器変移量を“d=(dx,dy)”と表す。
[When the estimated displacement reference frame is the same as the encoder displacement reference frame]
The following represents a macro block for the estimated displacement amount "^ d = (^ d x , ^ d y)" and the encoder displacement amount "d = (dx, dy) " represents a.

次の2つの条件(1)(2)を満たす場合、歪み量に対する重み付けは行わないこととする。   When the following two conditions (1) and (2) are satisfied, no weighting is applied to the distortion amount.

Figure 2009021673
Figure 2009021673

ここで、d()は2つのベクトルの乖離度を表す関数であり、例えば、下記の式(1)で表される2つのベクトルの内積や、下記の式(2)で表される2つのベクトルの距離や、下記の式(3)で表される2つのベクトルの距離などを用いる。   Here, d () is a function representing the degree of divergence between two vectors. For example, the inner product of two vectors represented by the following expression (1) or two expressions represented by the following expression (2): A vector distance, a distance between two vectors represented by the following equation (3), or the like is used.

Figure 2009021673
Figure 2009021673

また、条件(2)の左辺は、下記の式(4)で表されるベクトルの絶対値ノルムである。ここで、θ,ψは外部から与えられる閾値である。   The left side of the condition (2) is the absolute value norm of the vector represented by the following formula (4). Here, θ and ψ are thresholds given from the outside.

Figure 2009021673
Figure 2009021673

[推定変移量の参照フレームと符号化器変移量の参照フレームとが異なる場合]
処理対象のマクロブロックが第tフレームに存在し、推定変移量が第t−re フレームを参照し、符号化器変移量が第t−rc フレームを参照する場合にあって、次の2つの条件を満たす場合、歪み量に対する重み付けは行わないこととする。
[When the estimated transition amount reference frame is different from the encoder transition amount reference frame]
Macroblock to be processed is present in the t-th frame, the estimated displacement amount refers to the t-th-r e frame, the encoder displacement amount is in the case of referring to the t-r c frame, the next 2 When one condition is satisfied, weighting is not performed on the distortion amount.

Figure 2009021673
Figure 2009021673

つまり、推定変移量の参照フレームと符号化器変移量の参照フレームとが異なる場合、2つの変移量を隣接フレーム間の変移量に正規化した値を評価に用いる。また、rc ,re は正負いずれの値もとりうる。正値の場合は前方予測、負値の場合は後方予測にあたる。このため、各変移量をrc ,re で除算するのは、ベクトルの長さの正規化とあわせて、ベクトルの方向が異なる場合に、両ベクトルの方向をそろえる意味も有る。 That is, when the estimated shift amount reference frame and the encoder shift amount reference frame are different, a value obtained by normalizing the two shift amounts to the shift amount between adjacent frames is used for evaluation. Further, r c, r e can take both positive and negative values. A positive value corresponds to forward prediction, and a negative value corresponds to backward prediction. Thus, for dividing each displacement amount in r c, r e, together with the length normalization of the vector, when the direction of the vector are different, also it means there align the direction of both vectors.

[Bフレームにおけるスキップモードの場合]
Bフレームにおけるスキップモードの場合、符号化器変移量の算出方法として2種類の方法(spatial directとtemporal direct)が規定されている。
[Skip mode in B frame]
In the case of the skip mode in the B frame, two types of methods (spatial direct and temporal direct) are defined as methods for calculating the encoder shift amount.

(i)temporal direct の場合
符号化器変移量は、アンカーピクチャ(通常、表示順序で符号化対象フレームの後方の一番近い参照フレーム)において、符号化対象ブロックと同一位置にあるブロックであるアンカーブロックの変移量(アンカー変移量と呼ぶ)を用いて設定する。アンカー変移量をdCol とし、アンカーピクチャとその参照フレームとの間の時間間隔をtd とし、同参照フレームと符号化対象フレームとの間の時間間隔をtb として、双方向予測の動きベクトルは以下のように求められる。
(I) In the case of temporal direct The encoder shift amount is an anchor which is a block located at the same position as the encoding target block in the anchor picture (usually, the nearest reference frame behind the encoding target frame in the display order). This is set using the block shift amount (referred to as anchor shift amount). Bi-predicted motion vector, where d Col is the anchor displacement, t d is the time interval between the anchor picture and its reference frame, and t b is the time interval between the reference frame and the encoding target frame Is obtained as follows.

Figure 2009021673
Figure 2009021673

双方向予測の動きベクトルは、いずれも、アンカー変移量から求まることが上式より分かる。そこで、次の2つの条件を満たす場合、歪み量に対する重み付けは行わないこととする。   It can be seen from the above equation that the bi-directional motion vector can be obtained from the anchor shift amount. Therefore, when the following two conditions are satisfied, the distortion amount is not weighted.

Figure 2009021673
Figure 2009021673

見かけ上、双方向予測の動きベクトルは2本であっても、2つのベクトルの方向はアンカー変移量と従属な関係にある。このため、推定変移量とアンカー変移量とについて評価すれば、双方向予測の2つのベクトルと推定変移量との各乖離度を得ることができる。このため、上式では、推定変移量とアンカー変移量の乖離度を評価尺度として用いている。   Apparently, even if there are two bi-directional motion vectors, the directions of the two vectors are dependent on the anchor shift amount. For this reason, if the estimated shift amount and the anchor shift amount are evaluated, the respective divergence degrees between the two vectors of bidirectional prediction and the estimated shift amount can be obtained. For this reason, in the above equation, the degree of deviation between the estimated shift amount and the anchor shift amount is used as an evaluation scale.

(ii)spatial directの場合
アンカー変移量の値によって、以下のいずれかを決定する。
(Ii) Spatial direct One of the following is determined according to the value of the anchor displacement.

・双方向予測の動きベクトルを零ベクトルに設定する
・近傍マクロブロックの動きベクトルから導出する
双方向予測の動きベクトルをdL0及びdL1とし、各参照フレームを第t−rc0フレーム及び第t−rc1フレームとすると、次の条件を満たす場合、歪み量に対する重み付けは行わないこととする。
- a motion vector of the bidirectional prediction to be derived from the motion vectors of-neighboring macroblocks to set the motion vector of the bidirectional prediction to zero vector and d L0 and d L1, each reference frame the t-r c0 frame and the t Assuming that −rc 1 frame is used, weighting is not applied to the distortion amount when the following condition is satisfied.

Figure 2009021673
Figure 2009021673

本発明では、このような評価関数を用いて、符号化する際に用いる変位量(符号化器変移量)と符号化に先立って算出した推定変位量との乖離度と、その推定変位量の大きさとを評価して、それに基づいて、スキップモードで符号化したのでは大きな画質劣化を含んでいる可能性が高いことを判断する場合は、スキップモード以外の予測モードをそのブロックの最適な予測モードとして決定するようにするのである。   In the present invention, using such an evaluation function, the degree of deviation between the displacement amount (encoder displacement amount) used for encoding and the estimated displacement amount calculated prior to encoding, and the estimated displacement amount When the size is evaluated and it is determined that coding in the skip mode is likely to include large image quality degradation based on the size, a prediction mode other than the skip mode is selected as the optimal prediction of the block. The mode is determined.

本発明では、時空間コントラスト感度関数に基づく歪み量への重み付けを行った場合、スキップモードが大きな画質劣化を含んでいるにもかかわらず、最適な予測モードとして選択されることがないよう、スキップモードの主観画質を適切に評価した符号化歪みの尺度を導入することで、画質劣化の誘発を回避している。   In the present invention, when weighting is applied to the distortion amount based on the spatio-temporal contrast sensitivity function, the skip mode is selected so as not to be selected as the optimum prediction mode even though the skip mode includes a large image quality degradation. By introducing a measure of coding distortion that appropriately evaluates the subjective image quality of the mode, image quality degradation is avoided.

これにより、本発明によれば、スキップモードにおける画質劣化を回避し、スキップモードの符号量削減のメリットを最大限享受することが可能となる。つまり、動きベクトルとして予測ベクトルを用いることを指示するスキップモードに対しても、視覚的には検知され難い領域に対して符号量の削減を行うため、復号画像の主観画質を保ちながら、効率的に符号量を削減できるようになる。   As a result, according to the present invention, it is possible to avoid image quality deterioration in the skip mode and enjoy the maximum benefit of code amount reduction in the skip mode. In other words, even in the skip mode that instructs to use a prediction vector as a motion vector, the code amount is reduced for a region that is difficult to detect visually, so that it is efficient while maintaining the subjective image quality of the decoded image. Therefore, the amount of codes can be reduced.

以下、実施の形態に従って本発明を詳細に説明する。   Hereinafter, the present invention will be described in detail according to embodiments.

図1に、本発明を具備する映像符号化装置1の装置構成を図示する。   FIG. 1 shows a device configuration of a video encoding device 1 having the present invention.

本発明を具備する映像符号化装置1は、H.264に従って動画像を符号化する処理を行うものであり、この図に示すように、符号化対象マクロブロックの符号化に用いる符号化パラメータを決定する符号化パラメータ決定部10と、符号化パラメータ決定部10の決定した符号化パラメータを使って符号化対象マクロブロックを符号化する符号化部20とを備える。   The video encoding apparatus 1 provided with the present invention is an H.264 standard. H.264 is used to perform processing for encoding a moving image. As shown in this figure, an encoding parameter determination unit 10 that determines an encoding parameter used for encoding an encoding target macroblock, and an encoding parameter determination And an encoding unit 20 that encodes the encoding target macroblock using the encoding parameter determined by the unit 10.

この符号化パラメータ決定部10は、符号化パラメータの1つである予測モードを決定するために、符号化対象フレーム信号と参照フレーム信号と量子化パラメータとを入力として、符号化対象マクロブロックの予測モードを決定するという処理を行う予測モード決定部11を備えるものであり、そして、この予測モード決定部11は、その決定を行うために、符号化対象マクロブロックの推定変位量を算出する推定変位量算出部12を備える。   The encoding parameter determination unit 10 receives the encoding target frame signal, the reference frame signal, and the quantization parameter as inputs to determine a prediction mode that is one of the encoding parameters, and predicts the encoding target macroblock. A prediction mode determination unit 11 that performs a process of determining a mode, and the prediction mode determination unit 11 calculates an estimated displacement of an encoding target macroblock in order to perform the determination. An amount calculation unit 12 is provided.

図2に、符号化パラメータ決定部10の実行するフローチャートの一例を図示する。ここで、このフローチャートでは、符号化パラメータ決定部10が量子化パラメータおよび予測モードを決定することを想定している。   FIG. 2 illustrates an example of a flowchart executed by the encoding parameter determination unit 10. Here, in this flowchart, it is assumed that the encoding parameter determination unit 10 determines the quantization parameter and the prediction mode.

符号化パラメータ決定部10は、符号化対象マクロブロックの符号化に用いる量子化パラメータおよび予測モードを決定する場合には、図2のフローチャートに示すように、先ず最初に、ステップS10で、レジスタCに対して大きな値を示す初期コストを格納するとともに、レジスタMに対して意味のない値を格納することで、レジスタCおよびレジスタMを初期化する。   When determining the quantization parameter and the prediction mode to be used for encoding the encoding target macroblock, the encoding parameter determination unit 10 firstly, in step S10, in the register C, as shown in the flowchart of FIG. Register C and register M are initialized by storing an initial cost indicating a large value for, and storing a meaningless value for register M.

続いて、ステップS11で、量子化パラメータの値を格納する変数QPに、量子化パラメータの最小値QPmin を設定する。   Subsequently, in step S11, the minimum value QPmin of the quantization parameter is set to the variable QP that stores the value of the quantization parameter.

続いて、ステップS12で、変数QPに設定した量子化パラメータを指定して予測モード決定部11を起動することで、変数QPに設定した量子化パラメータにおける最適な予測モードを決定する。このとき実行する予測モードの決定処理については、図3及び図5のフローチャートに従って後述する。   Subsequently, in step S12, the quantization mode set in the variable QP is designated and the prediction mode determination unit 11 is activated to determine the optimum prediction mode for the quantization parameter set in the variable QP. The prediction mode determination process executed at this time will be described later according to the flowcharts of FIGS. 3 and 5.

続いて、ステップS13で、変数QPに設定した量子化パラメータと、ステップS12で決定した予測モードとを用いて符号化する場合のコストを算出する。   Subsequently, in step S13, the cost for encoding using the quantization parameter set in the variable QP and the prediction mode determined in step S12 is calculated.

続いて、ステップS14で、ステップS13で算出したコストがレジスタCに格納されるコストよりも小さいのか否かを判断する。   Subsequently, in step S14, it is determined whether or not the cost calculated in step S13 is smaller than the cost stored in the register C.

この判断処理に従って、ステップS13で算出したコストの方が小さいことを判断するときには、ステップS15に進んで、ステップS13で算出したコストをレジスタCに格納し、続くステップS16で、変数QPに設定した量子化パラメータと、ステップS12で決定した予測モードの識別情報との組情報をレジスタMに格納する。一方、ステップS13で算出したコストの方が大きいことを判断するときには、このステップS15,16の処理を省略する。   When it is determined that the cost calculated in step S13 is smaller according to this determination process, the process proceeds to step S15, the cost calculated in step S13 is stored in the register C, and the variable QP is set in the subsequent step S16. The set information of the quantization parameter and the identification information of the prediction mode determined in step S12 is stored in the register M. On the other hand, when it is determined that the cost calculated in step S13 is larger, the processes in steps S15 and S16 are omitted.

続いて、ステップS17で、変数QPに設定した量子化パラメータの値がその最大値QPmax を超えたのか否かを判断して、最大値QPmax を超えていないことを判断するときには、ステップS18に進んで、変数QPに設定した量子化パラメータの値を規定量ΔQPだけ増分させてから、ステップS12の処理に戻る。   Subsequently, in step S17, it is determined whether or not the value of the quantization parameter set in the variable QP exceeds the maximum value QPmax. When determining that the value does not exceed the maximum value QPmax, the process proceeds to step S18. Thus, the value of the quantization parameter set in the variable QP is incremented by the specified amount ΔQP, and the process returns to step S12.

このようにして、ステップS12〜ステップS18の処理を繰り返していくことで、ステップS17で、変数QPに設定した量子化パラメータの値がその最大値QPmax を超えたことを判断すると、ステップS19に進んで、レジスタMに格納される量子化パラメータおよび予測モードを用いて符号化することを決定して、量子化パラメータおよび予測モードの決定処理を終了する。   When it is determined in this way that the value of the quantization parameter set in the variable QP exceeds the maximum value QPmax in step S17 by repeating the processing in steps S12 to S18, the process proceeds to step S19. Thus, it is determined that the encoding is performed using the quantization parameter and the prediction mode stored in the register M, and the determination process of the quantization parameter and the prediction mode is ended.

〔1〕第1の実施形態例
図3に、予測モード決定部11の実行するフローチャートの一実施形態例を図示する。
[1] First Embodiment FIG. 3 illustrates an embodiment of a flowchart executed by the prediction mode determination unit 11.

次に、このフローチャートに従って、本実施形態例において予測モード決定部11が実行する予測モードの決定処理について詳細に説明する。   Next, according to this flowchart, the prediction mode determination process executed by the prediction mode determination unit 11 in the present embodiment will be described in detail.

予測モード決定部11は、符号化対象マクロブロックについて量子化パラメータを指定して予測モードの決定要求が発行されると、図3のフローチャートに示すように、先ず最初に、ステップS100で、レジスタXに対して予測モードの初期値(初期値となる予測モードの識別情報)を設定し、さらに、R−Dコストを格納することになる2つのレジスタC0,C1に対して大きな値を示す初期コストを格納するとともに、予測モードの識別情報を格納することになる2つのレジスタM0,M1に対して意味のない値を格納することで、レジスタX,C0,C1,M0,M1を初期化する。   When a prediction mode determination request is issued by designating a quantization parameter for the encoding target macroblock, the prediction mode determination unit 11 first, as shown in the flowchart of FIG. Is set to the initial value of the prediction mode (prediction mode identification information as the initial value), and the initial cost indicating a large value for the two registers C0 and C1 that store the RD cost. And the registers X, C0, C1, M0, and M1 are initialized by storing meaningless values in the two registers M0 and M1 that store the prediction mode identification information.

なお、以下に説明するように、これらのレジスタX,C0,C1,M0,M1の他に、符号量を格納するレジスタαと、未定乗数を格納するレジスタβと、重み付き歪み量を格納するレジスタγ0と、重みなし歪み量を格納するレジスタγ1という4つのレジスタを使用している。   As will be described below, in addition to these registers X, C0, C1, M0, and M1, a register α that stores a code amount, a register β that stores an undetermined multiplier, and a weighted distortion amount are stored. Four registers are used: a register γ0 and a register γ1 that stores an unweighted distortion amount.

続いて、ステップS101で、符号化対象マクロブロックの変移量を推定する。この推定手法については、外部より与えられるものとする。例えば、H.264の参照ソフトJMが算出する動きベクトルを、以下で使用する変移量の推定値として用いることも可能である。あるいは、符号化対象マクロブロックと参照マクロブロックとの絶対値誤差和を最小化する規範に従って、推定変位量を算出することも可能である。   Subsequently, in step S101, the shift amount of the encoding target macroblock is estimated. This estimation method is assumed to be given from the outside. For example, H.M. It is also possible to use a motion vector calculated by the H.264 reference software JM as an estimated value of the shift amount used below. Alternatively, it is also possible to calculate the estimated displacement amount according to a standard for minimizing the sum of absolute value errors between the encoding target macroblock and the reference macroblock.

続いて、ステップS102で、レジスタXの予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、その予測モードを用いて符号化する場合の符号量を算出し、その算出した値をレジスタαに書き出す。具体的な算出方法は、H.264の参照ソフトJMの方法に従う。   Subsequently, in step S102, the prediction mode of the register X, the prediction vector, the quantization parameter, the encoding target frame signal, and the reference frame signal are input, and the code amount when encoding using the prediction mode is calculated. The calculated value is written to the register α. The specific calculation method is as follows. It follows the method of H.264 reference software JM.

続いて、ステップS103で、レジスタXの予測モード、量子化パラメータを入力として、その予測モードを用いて符号化する場合の未定乗数を算出し、その算出した値をレジスタβに書き出す。具体的な算出方法は、H.264の参照ソフトJMの方法に従う。   Subsequently, in step S103, the prediction mode and the quantization parameter of the register X are input, an undetermined multiplier for encoding using the prediction mode is calculated, and the calculated value is written to the register β. The specific calculation method is as follows. It follows the method of H.264 reference software JM.

続いて、ステップS104で、最初に、ステップS101で算出した推定変位量に基づいて重みを決定し、次に、レジスタXの予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、それらの入力信号とその決定した重みとに基づいて、その予測モードを用いて符号化する場合の重み付き歪み量を算出し、その算出した値をレジスタγ0に書き出す。具体的な算出方法は、前述した式(D)(〔数9〕に示した式)に従う。   Subsequently, in step S104, a weight is first determined based on the estimated displacement calculated in step S101, and then the prediction mode, prediction vector, quantization parameter, encoding target frame signal, reference frame of the register X are determined. Based on the input signal and the determined weight, the weighted distortion amount when encoding using the prediction mode is calculated, and the calculated value is written to the register γ0. A specific calculation method follows the above-described formula (D) (the formula shown in [Equation 9]).

続いて、ステップS105で、レジスタαに格納される符号量と、レジスタβに格納される未定乗数と、レジスタγ0に格納される重み付き歪み量とを読み出して、R−Dコストを算出する。具体的な算出方法は、前述した式(C)(〔数8〕に示した式)に従う。   Subsequently, in step S105, the code amount stored in the register α, the undetermined multiplier stored in the register β, and the weighted distortion amount stored in the register γ0 are read to calculate the RD cost. A specific calculation method follows the above-described formula (C) (the formula shown in [Equation 8]).

続いて、ステップS106で、その算出したR−DコストとレジスタC0の値とを比較して、その算出したR−Dコストの方がレジスタC0の値よりも小さいことを判断するときには、ステップS107に進んで、その算出したR−DコストをレジスタC0に格納し、続くステップS108で、レジスタXに格納されている予測モードの識別情報をレジスタM0に格納する。一方、ステップS106で、算出したR−Dコストの方がレジスタC0の値よりも大きいことを判断するときには、このステップS107,108の処理を省略する。   Subsequently, in step S106, when the calculated RD cost is compared with the value of the register C0 and it is determined that the calculated RD cost is smaller than the value of the register C0, step S107 is performed. Then, the calculated RD cost is stored in the register C0, and in step S108, the prediction mode identification information stored in the register X is stored in the register M0. On the other hand, when it is determined in step S106 that the calculated RD cost is larger than the value of the register C0, the processes in steps S107 and 108 are omitted.

このステップS104〜ステップS108の処理と並列処理する形で、ステップS104x〜ステップS108xの処理を実行する。   The processes in steps S104x to S108x are executed in parallel with the processes in steps S104 to S108.

すなわち、ステップS104xで、レジスタXの予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、その予測モードを用いて符号化する場合の重みなし歪み量を算出し、その算出した値をレジスタγ1に書き出す。具体的な算出方法は、前述した式(D)(〔数9〕に示した式)で重み付けがない(Wk,l Y =Wk,l U =Wk,l V =1)ものとしたものに従うか、あるいは、前述した式(B)(〔数2〕に示した式)に従う。 That is, in step S104x, the prediction mode, the prediction vector, the quantization parameter, the encoding target frame signal, and the reference frame signal of the register X are input, and the unweighted distortion amount when encoding using the prediction mode is calculated. The calculated value is written in the register γ1. As a specific calculation method, there is no weighting (W k, l Y = W k, l U = W k, l V = 1) in the above-described formula (D) (the formula shown in [Equation 9]). Or according to the above-described formula (B) (the formula shown in [Equation 2]).

続いて、ステップS105xで、レジスタαに格納される符号量と、レジスタβに格納される未定乗数と、レジスタγ1に格納される重みなし歪み量とを読み出して、R−Dコストを算出する。具体的な算出方法は、前述した式(C)(〔数8〕に示した式)で歪み量を重みなしの値を用いるものに従うか、あるいは、前述した式(A)(〔数1〕に示した式)に従う。   Subsequently, in step S105x, the code amount stored in the register α, the undetermined multiplier stored in the register β, and the unweighted distortion amount stored in the register γ1 are read to calculate the RD cost. The specific calculation method is based on the above-described equation (C) (the equation shown in [Equation 8]) using a distortion-free value, or the above-described equation (A) ([Equation 1]). Follow the formula shown in

続いて、ステップS106xで、その算出したR−DコストとレジスタC1の値とを比較して、その算出したR−Dコストの方がレジスタC1の値よりも小さいことを判断するときには、ステップS107xに進んで、その算出したR−DコストをレジスタC1に格納し、続くステップS108xで、レジスタXに格納されている予測モードの識別情報をレジスタM1に格納する。一方、ステップS106xで、算出したR−Dコストの方がレジスタC1の値よりも大きいことを判断するときには、このステップS107x,108xの処理を省略する。   Subsequently, in step S106x, when the calculated RD cost is compared with the value of the register C1, and it is determined that the calculated RD cost is smaller than the value of the register C1, step S107x Then, the calculated RD cost is stored in the register C1, and in step S108x, the prediction mode identification information stored in the register X is stored in the register M1. On the other hand, when it is determined in step S106x that the calculated RD cost is larger than the value of the register C1, the processes in steps S107x and 108x are omitted.

ステップS108,ステップS108xの処理を終了すると、続いて、ステップS109で、全ての予測モードを処理したのか否かを判断して、全ての予測モードを処理してないことを判断するときには、ステップS110に進んで、予め定められる順番に従って未処理の予測モードの中から予測モードを1つ選択して、その選択した予測モードの識別情報をレジスタXに格納してから、ステップS102に処理に戻る。   When the processes of step S108 and step S108x are finished, subsequently, in step S109, it is determined whether or not all prediction modes have been processed, and when it is determined that not all prediction modes have been processed, step S110 is performed. Then, one prediction mode is selected from the unprocessed prediction modes in accordance with a predetermined order, the identification information of the selected prediction mode is stored in the register X, and the process returns to step S102.

このようにして、ステップS102〜ステップS110の処理を繰り返していくことで、ステップS109で、全ての予測モードを処理したことを判断すると、ステップS111に進んで、レジスタM0に格納される予測モードの識別情報がスキップモードであることを示しているのか否かを判断する。   In this manner, by repeating the processing of step S102 to step S110, when it is determined in step S109 that all prediction modes have been processed, the process proceeds to step S111, and the prediction mode stored in the register M0 is determined. It is determined whether or not the identification information indicates a skip mode.

すなわち、重み付き歪み量を用いて評価したR−Dコスト最小の予測モードがスキップモードであるのか否かを判断するのである。   That is, it is determined whether or not the prediction mode with the minimum RD cost evaluated using the weighted distortion amount is the skip mode.

このステップS111の判断処理に従って、レジスタM0に格納される予測モードの識別情報がスキップモードでないことを判断するときには、スキップモードによる画質劣化が問題とならないことから、ステップS115に進んで、レジスタM0に格納される予測モードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   When it is determined that the prediction mode identification information stored in the register M0 is not the skip mode according to the determination process in step S111, the image quality deterioration due to the skip mode does not matter, so the process proceeds to step S115 and is stored in the register M0. The stored prediction mode is output as the optimum prediction mode for the encoding target block, and the process is terminated.

一方、ステップS111の判断処理に従って、レジスタM0に格納される予測モードの識別情報がスキップモードであることを判断するときには、ステップS112に進んで、レジスタM1に格納される予測モードの識別情報がスキップモードであることを示しているのか否かを判断する。   On the other hand, when it is determined that the prediction mode identification information stored in the register M0 is the skip mode according to the determination process in step S111, the process proceeds to step S112, and the prediction mode identification information stored in the register M1 is skipped. It is determined whether or not the mode is indicated.

すなわち、重みなし歪み量を用いて評価したR−Dコスト最小の予測モードがスキップモードであるのか否かを判断するのである。   That is, it is determined whether or not the prediction mode with the minimum RD cost evaluated using the unweighted distortion amount is the skip mode.

このステップS112の判断処理に従って、レジスタM1に格納される予測モードの識別情報がスキップモードであることを判断するときには、重み付き歪み量を用いても、重みなし歪み量を用いてもスキップモードが選択されたことから、ステップS115に進んで、レジスタM0に格納される予測モードであるスキップモードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   When it is determined that the prediction mode identification information stored in the register M1 is the skip mode according to the determination process in step S112, the skip mode is set regardless of whether the weighted distortion amount or the unweighted distortion amount is used. Since it has been selected, the process proceeds to step S115, the skip mode, which is the prediction mode stored in the register M0, is output as the optimum prediction mode for the block to be encoded, and the process is terminated.

一方、このステップS112の判断処理に従って、レジスタM1に格納される予測モードの識別情報がスキップモードでないことを判断するときは、ステップS113に進んで、ステップS101で推定した推定変位量と符号化対象ブロックの予測ベクトルとの乖離度が閾値より大きく、かつ、その推定変位量の大きさが閾値より大きいのか否かの判定を行う。   On the other hand, when it is determined that the prediction mode identification information stored in the register M1 is not the skip mode according to the determination process in step S112, the process proceeds to step S113, and the estimated displacement amount and the encoding target estimated in step S101 are processed. It is determined whether the degree of deviation from the predicted vector of the block is greater than a threshold and whether the estimated displacement is greater than the threshold.

すなわち、ステップS111でR−Dコスト最小の予測モードがスキップモードである判断していることで、実際に符号化する場合には周辺のマクロブロックの動きベクトルから求められる予測ベクトルを動きベクトルとして用いることになることから、ステップS101で推定した推定変位量とその予測ベクトルとを判断対象として、2つの変位量の乖離度が閾値より大きく、かつ、推定変位量の大きさが閾値より大きいのか否かの判定を行うのである。   That is, since it is determined in step S111 that the prediction mode with the minimum RD cost is the skip mode, the prediction vector obtained from the motion vectors of the surrounding macroblocks is used as the motion vector when actually encoding. Therefore, whether or not the difference between the two displacement amounts is larger than the threshold value and the estimated displacement amount is larger than the threshold value with the estimated displacement amount estimated in step S101 and the predicted vector as a determination target. This determination is made.

このステップS113の判断処理に従って、2つの変位量の乖離度が閾値より大きく、かつ、推定変位量の大きさが閾値より大きいという条件が成立することを判断するときには、ステップS114に進んで、レジスタM1に格納される予測モードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   When it is determined that the condition that the degree of deviation between the two displacement amounts is greater than the threshold value and the estimated displacement amount is greater than the threshold value according to the determination process in step S113, the process proceeds to step S114 and the register is registered. The prediction mode stored in M1 is output as the optimal prediction mode for the encoding target block, and the process is terminated.

一方、このステップS113の判断処理に従って、2つの変位量の乖離度が閾値より大きく、かつ、推定変位量の大きさが閾値より大きいという条件が成立しないことを判断するときには、ステップS115に進んで、レジスタM0に格納される予測モードであるスキップモードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   On the other hand, when it is determined that the condition that the degree of deviation between the two displacement amounts is greater than the threshold value and the estimated displacement amount is greater than the threshold value is not satisfied according to the determination process in step S113, the process proceeds to step S115. Then, the skip mode, which is the prediction mode stored in the register M0, is output as the optimum prediction mode for the encoding target block, and the process is terminated.

このようにして、本実施形態例では、予測モード決定部11は、符号化対象マクロブロックについて、重み付きの歪み量を使って求められたR−Dコスト最小の予測モードがスキップモードであっても、スキップモードで符号化したのでは大きな画質劣化を含んでいる可能性が高いことを判断する場合には、重みなしの歪み量を使って求められたR−Dコスト最小の予測モードを最適な予測モードとして決定するように処理するのである。   Thus, in this embodiment, the prediction mode determination unit 11 determines that the prediction mode with the minimum RD cost obtained using the weighted distortion amount for the encoding target macroblock is the skip mode. However, when it is determined that coding in the skip mode is likely to include large image quality deterioration, the prediction mode with the minimum RD cost obtained using the unweighted distortion amount is optimal. It is processed so as to be determined as a proper prediction mode.

図4に、本実施形態例を実現する予測モード決定部11の装置構成の一例を図示する。   FIG. 4 illustrates an example of a device configuration of the prediction mode determination unit 11 that realizes the present embodiment.

ここで、100は変位量記憶部、101は予測ベクトル算出部、102は予測ベクトル記憶部、103は初期モード設定部、104はモード記憶部、105は符号量算出部、106は符号量記憶部、107は重み付き歪み量算出部、108は重み付き歪み量記憶部、109は重みなし歪み量算出部、110は重みなし歪み量記憶部、111は未定乗数算出部、112は未定乗数記憶部、113はコスト算出部、114はコスト記憶部、115は重みなしコスト算出部、116は重みなしコスト記憶部、117は最小コスト判定部、118は最小コスト記憶部、119は重みなし最小コスト記憶部、120はモード更新部、121は最適モード記憶部、122は重みなし最適モード記憶部、123は最終モード判定部、124はモード設定部、125は最適モード出力部である。   Here, 100 is a displacement amount storage unit, 101 is a prediction vector calculation unit, 102 is a prediction vector storage unit, 103 is an initial mode setting unit, 104 is a mode storage unit, 105 is a code amount calculation unit, and 106 is a code amount storage unit 107 is a weighted distortion amount calculation unit, 108 is a weighted distortion amount storage unit, 109 is an unweighted distortion amount calculation unit, 110 is an unweighted distortion amount storage unit, 111 is an undetermined multiplier calculation unit, and 112 is an undetermined multiplier storage unit. 113 is a cost calculation unit, 114 is a cost storage unit, 115 is an unweighted cost calculation unit, 116 is an unweighted cost storage unit, 117 is a minimum cost determination unit, 118 is a minimum cost storage unit, and 119 is an unweighted minimum cost storage. , 120 is a mode update unit, 121 is an optimal mode storage unit, 122 is an unweighted optimal mode storage unit, 123 is a final mode determination unit, 124 is a mode setting unit, 25 is the optimal mode output unit.

次に、これらの各処理部について説明する。   Next, each of these processing units will be described.

〔変位量記憶部100〕
変位量記憶部100は、図示しない推定変位量算出部の算出した符号化対象マクロブロックについての推定変位量を格納する。この推定変位量の推定方法としては、例えば、H.264の参照ソフトJMが算出する動きベクトルを変移量の推定値として用いることも可能である。あるいは、符号化対象マクロブロックと参照マクロブロックとの絶対値誤差和を最小化する規範に従って、推定変位量を算出することも可能である。
[Displacement storage unit 100]
The displacement amount storage unit 100 stores the estimated displacement amount for the encoding target macroblock calculated by the estimated displacement amount calculation unit (not shown). As an estimation method of the estimated displacement amount, for example, H.264. It is also possible to use a motion vector calculated by the H.264 reference software JM as an estimated value of the shift amount. Alternatively, it is also possible to calculate the estimated displacement amount according to a standard for minimizing the sum of absolute value errors between the encoding target macroblock and the reference macroblock.

〔予測ベクトル算出部101〕
予測ベクトル算出部101は、符号化対象マクロブロックに隣接するマクロブロックの動きベクトル、マクロブロックの分割情報を入力として、符号化対象マクロブロックに対する予測ベクトルを算出し、予測ベクトル記憶部102に書き出す。具体的な算出方法は、H.264の規定に従う。
[Predicted vector calculation unit 101]
Prediction vector calculation section 101 receives the motion vector of the macroblock adjacent to the encoding target macroblock and the macroblock division information as input, calculates a prediction vector for the encoding target macroblock, and writes it to prediction vector storage section 102. The specific calculation method is as follows. H.264 is followed.

〔初期モード設定部103〕
初期モード設定部103は、予測モードの初期値をモード記憶部104に書き出す。
[Initial mode setting unit 103]
The initial mode setting unit 103 writes the initial value of the prediction mode in the mode storage unit 104.

〔符号量算出部105〕
符号量算出部105は、モード記憶部104の記憶する予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、その予測モードを用いて符号化する場合の符号量を算出し、その算出した値を符号量記憶部106に書き出す。具体的な算出方法は、H.264の参照ソフトJMの方法に従う。
[Code amount calculation unit 105]
The code amount calculation unit 105 receives the prediction mode, the prediction vector, the quantization parameter, the encoding target frame signal, and the reference frame signal stored in the mode storage unit 104, and encodes using the prediction mode. And the calculated value is written in the code amount storage unit 106. The specific calculation method is as follows. It follows the method of H.264 reference software JM.

〔重み付き歪み量算出部107〕
重み付き歪み量算出部107は、変位量記憶部100に記憶される推定変位量に基づいて重みを決定するとともに、モード記憶部104の記憶する予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、それらの入力信号とその決定した重みとに基づいて、その予測モードを用いて符号化する場合の重み付き歪み量を算出し、その算出した値を重み付き歪み量記憶部108に書き出す。具体的な算出方法は、前述した式(D)(〔数9〕に示した式)に従う。
[Weighted distortion amount calculation unit 107]
The weighted distortion amount calculation unit 107 determines the weight based on the estimated displacement amount stored in the displacement amount storage unit 100, and stores the prediction mode, prediction vector, quantization parameter, and encoding target stored in the mode storage unit 104. Calculates the weighted distortion amount when encoding using the prediction mode based on the input signal and the determined weight, with the frame signal and the reference frame signal as input, and the calculated value is weighted. Write to the distortion amount storage unit 108. A specific calculation method follows the above-described formula (D) (the formula shown in [Equation 9]).

〔重みなし歪み量算出部109〕
重みなし歪み量算出部109は、モード記憶部104の記憶する予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、その予測モードを用いて符号化する場合の重みなし歪み量を算出し、その算出した値を重みなし歪み量記憶部110に書き出す。具体的な算出方法は、前述した式(D)(〔数9〕に示した式)で重み付けがないものとしたものに従うか、あるいは、前述した式(B)(〔数2〕に示した式)に従う。
[Unweighted distortion amount calculation unit 109]
The unweighted distortion amount calculation unit 109 receives the prediction mode, the prediction vector, the quantization parameter, the encoding target frame signal, and the reference frame signal stored in the mode storage unit 104 and performs encoding using the prediction mode. The unweighted distortion amount is calculated, and the calculated value is written in the unweighted distortion amount storage unit 110. The specific calculation method is based on the above formula (D) (the formula shown in [Equation 9]) with no weighting, or the above formula (B) (shown in [Equation 2]). Follow the formula.

〔未定乗数算出部111〕
未定乗数算出部111は、モード記憶部104の記憶する予測モード、量子化パラメータを入力として、その予測モードを用いて符号化する場合の未定乗数を算出し、その算出した値を未定乗数記憶部112に書き出す。具体的な算出方法は、H.264の参照ソフトJMの方法に従う。
[Undetermined multiplier calculation unit 111]
The undetermined multiplier calculation unit 111 receives the prediction mode and quantization parameter stored in the mode storage unit 104, calculates an undetermined multiplier when encoding using the prediction mode, and calculates the calculated value to the undetermined multiplier storage unit. Write to 112. The specific calculation method is as follows. It follows the method of H.264 reference software JM.

〔コスト算出部113〕
コスト算出部113は、符号量記憶部106に記憶される符号量と、重み付き歪み量記憶部108に記憶される重み付き歪み量と、未定乗数記憶部112に記憶される未定乗数とを読み出して、R−Dコストを算出して、その算出した値をコスト記憶部114に書き出す。具体的な算出方法は、前述した式(C)(〔数8〕に示した式)に従う。
[Cost calculation unit 113]
The cost calculation unit 113 reads the code amount stored in the code amount storage unit 106, the weighted distortion amount stored in the weighted distortion amount storage unit 108, and the undetermined multiplier stored in the undetermined multiplier storage unit 112. Then, the RD cost is calculated, and the calculated value is written in the cost storage unit 114. A specific calculation method follows the above-described formula (C) (the formula shown in [Equation 8]).

〔重みなしコスト算出部115〕
重みなしコスト算出部115は、符号量記憶部106に記憶される符号量と、重みなし歪み量記憶部110に記憶される重みなし歪み量と、未定乗数記憶部112に記憶される未定乗数とを読み出して、R−Dコストを算出し、その算出した値を重みなしコスト記憶部116に書き出す。具体的な算出方法は、前述した式(C)(〔数8〕に示した式)で歪み量を重みなしの値を用いるものに従うか、あるいは、前述した式(A)(〔数1〕に示した式)に従う。
[Unweighted cost calculation unit 115]
The weightless cost calculation unit 115 includes a code amount stored in the code amount storage unit 106, an unweighted distortion amount stored in the unweighted distortion amount storage unit 110, and an undetermined multiplier stored in the undetermined multiplier storage unit 112. , The RD cost is calculated, and the calculated value is written in the unweighted cost storage unit 116. The specific calculation method is based on the above-described equation (C) (the equation shown in [Equation 8]) using a distortion-free value, or the above-described equation (A) ([Equation 1]). Follow the formula shown in

〔最小コスト判定部117〕
最小コスト判定部117は、コスト記憶部114に記憶されるR−Dコストと、最小コスト記憶部118に記憶される最小コストとを読み出して、そのR−Dコストがその最小コストよりも小さいのか否かの判定を行い、そのR−Dコストがその最小コストよりも小さい場合には、そのR−Dコストを最小コスト記憶部118に書き出すとともに、モード更新部120に制御を渡す。一方、そのR−Dコストがその最小コストよりも大きい場合には、最終モード判定部123に制御を渡す。
[Minimum cost determination unit 117]
The minimum cost determination unit 117 reads out the RD cost stored in the cost storage unit 114 and the minimum cost stored in the minimum cost storage unit 118, and whether the RD cost is smaller than the minimum cost. If the RD cost is smaller than the minimum cost, the RD cost is written to the minimum cost storage unit 118 and control is passed to the mode update unit 120. On the other hand, if the RD cost is greater than the minimum cost, control is passed to the final mode determination unit 123.

そして、重みなしコスト記憶部116に記憶されるR−Dコストと、重みなし最小コスト記憶部119に記憶される最小コストとを読み出して、そのR−Dコストがその最小コストよりも小さいのか否かの判定を行い、そのR−Dコストがその最小コストよりも小さい場合には、そのR−Dコストを重みなし最小コスト記憶部119に書き出すとともに、モード更新部120に制御を渡す。一方、そのR−Dコストがその最小コストよりも大きい場合には、最終モード判定部123に制御を渡す。   Then, the RD cost stored in the non-weighted cost storage unit 116 and the minimum cost stored in the non-weighted minimum cost storage unit 119 are read, and whether or not the RD cost is smaller than the minimum cost. If the RD cost is smaller than the minimum cost, the RD cost is written to the weightless minimum cost storage unit 119 and control is passed to the mode update unit 120. On the other hand, if the RD cost is greater than the minimum cost, control is passed to the final mode determination unit 123.

〔モード更新部120〕
モード更新部120は、最小コスト判定部117が最小コスト記憶部118にR−Dコストを書き出すときに、そのR−Dコストの算出元となった予測モード(その時点でモード記憶部104に記憶されている予測モード)の識別情報を最適モード記憶部121に書き出してから、最終モード判定部123に制御を渡す。
[Mode update unit 120]
When the minimum cost determination unit 117 writes the RD cost to the minimum cost storage unit 118, the mode update unit 120 predicts the prediction mode that is the calculation source of the RD cost (stored in the mode storage unit 104 at that time). Is written to the optimum mode storage unit 121, and control is passed to the final mode determination unit 123.

そして、最小コスト判定部117が重みなし最小コスト記憶部119にR−Dコストを書き出すときに、そのR−Dコストの算出元となった予測モード(その時点でモード記憶部104に記憶されている予測モード)の識別情報を重みなし最適モード記憶部122に書き出してから、最終モード判定部123に制御を渡す。   Then, when the minimum cost determination unit 117 writes the RD cost to the weightless minimum cost storage unit 119, the prediction mode that is the calculation source of the RD cost (stored in the mode storage unit 104 at that time) Is written to the optimum mode storage unit 122 without weight, and then the control is passed to the final mode determination unit 123.

〔最終モード判定部123〕
最終モード判定部123は、最小コスト判定部117やモード更新部120から制御が渡されると、モード設定部124が全ての予測モードの設定を終了したのか否かを判断して、全ての予測モードの設定を終了したことを判断するときには、最適モード出力部125に対して最適な予測モードの出力を指示し、全ての予測モードの設定を終了していないことを判断するときには、モード設定部124に対して次の予測モードの設定を指示する。
[Final mode determination unit 123]
When control is passed from the minimum cost determination unit 117 or the mode update unit 120, the final mode determination unit 123 determines whether or not the mode setting unit 124 has finished setting all prediction modes, and determines all prediction modes. When determining that the setting of the prediction mode has been completed, the optimal mode output unit 125 is instructed to output the optimum prediction mode. When determining that all the prediction modes have not been set, the mode setting unit 124 is selected. Is instructed to set the next prediction mode.

〔モード設定部124〕
モード設定部124は、最終モード判定部123から予測モードの設定指示があると、モード記憶部104に対して次の予測モードを設定する。
[Mode setting unit 124]
When there is a prediction mode setting instruction from the final mode determination unit 123, the mode setting unit 124 sets the next prediction mode in the mode storage unit 104.

〔最適モード出力部125〕
最適モード出力部125は、最終モード判定部123から最適な予測モードの出力指示があると、最適モード記憶部121に記憶される予測モードがスキップモードであるのか否かの判定を行い、スキップモードでない場合には、最適モード記憶部121に記憶される予測モードを符号化対象ブロックの最適な予測モードとして出力する。
[Optimum mode output unit 125]
The optimal mode output unit 125 determines whether or not the prediction mode stored in the optimal mode storage unit 121 is the skip mode when there is an instruction to output the optimal prediction mode from the final mode determination unit 123. Otherwise, the prediction mode stored in the optimum mode storage unit 121 is output as the optimum prediction mode of the encoding target block.

一方、最適モード記憶部121に記憶される予測モードがスキップモードである場合には、重みなし最適モード記憶部122に記憶される予測モードがスキップモードであるのか否かの判定を行い、スキップモードである場合には、最適モード記憶部121に記憶されるスキップモードを符号化対象ブロックの最適な予測モードとして出力する。   On the other hand, when the prediction mode stored in the optimal mode storage unit 121 is the skip mode, it is determined whether or not the prediction mode stored in the unweighted optimal mode storage unit 122 is the skip mode. If it is, the skip mode stored in the optimum mode storage unit 121 is output as the optimum prediction mode of the encoding target block.

一方、最適モード記憶部121に記憶される予測モードがスキップモードで、重みなし最適モード記憶部122に記憶される予測モードがスキップモードでない場合には、変位量記憶部100に記憶される推定変位量と、予測ベクトル記憶部102に記憶される予測ベクトルとを読み出して、その推定変位量とその予測ベクトルとの乖離度を算出するとともに、変移推定量の大きさを算出して、その乖離度が閾値よりも大きく、かつ、その変移推定量の大きさが閾値よりも大きいのか否かの判定を行う。そして、その判定結果に基づいて、推定変位量と予測ベクトルとの乖離度が大きく、かつ、変移推定量が大きいという条件が成立する場合には、重みなし最適モード記憶部122に記憶される予測モードを符号化対象ブロックの最適な予測モードとして出力し、その条件が成立しない場合には、最適モード記憶部121に記憶されるスキップモードを符号化対象ブロックの最適な予測モードとして出力する。   On the other hand, when the prediction mode stored in the optimal mode storage unit 121 is the skip mode and the prediction mode stored in the unweighted optimal mode storage unit 122 is not the skip mode, the estimated displacement stored in the displacement amount storage unit 100 The amount and the prediction vector stored in the prediction vector storage unit 102 are read out, and the degree of deviation between the estimated displacement amount and the prediction vector is calculated, and the magnitude of the displacement estimation amount is calculated, and the degree of deviation is calculated. Is larger than the threshold value, and it is determined whether or not the magnitude of the transition estimation amount is larger than the threshold value. Then, based on the determination result, when the condition that the degree of deviation between the estimated displacement amount and the prediction vector is large and the displacement estimation amount is large is satisfied, the prediction stored in the unweighted optimum mode storage unit 122 The mode is output as the optimal prediction mode of the encoding target block, and when the condition is not satisfied, the skip mode stored in the optimal mode storage unit 121 is output as the optimal prediction mode of the encoding target block.

この図4に示す構成に従って、予測モード決定部11は、図3のフローチャートの処理を実行することで、符号化対象マクロブロックについて、重み付きの歪み量を使って求められたR−Dコスト最小の予測モードがスキップモードであっても、スキップモードで符号化したのでは大きな画質劣化を含んでいる可能性が高いことを判断する場合には、重みなしの歪み量を使って求められたR−Dコスト最小の予測モードを符号化対象ブロックの最適な予測モードとして決定するように処理するのである。   According to the configuration shown in FIG. 4, the prediction mode determination unit 11 performs the processing of the flowchart of FIG. 3 to minimize the RD cost obtained using the weighted distortion amount for the encoding target macroblock. Even if the prediction mode is the skip mode, when it is determined that there is a high possibility that the image is encoded in the skip mode, the image quality is greatly deteriorated. -D The processing is performed so as to determine the prediction mode with the lowest cost as the optimum prediction mode of the encoding target block.

〔2〕第2の実施形態例
図5に、予測モード決定部11の実行するフローチャートの他の実施形態例を図示する。
[2] Second Embodiment FIG. 5 illustrates another embodiment of the flowchart executed by the prediction mode determination unit 11.

次に、このフローチャートに従って、本実施形態例において予測モード決定部11が実行する予測モードの決定処理について詳細に説明する。   Next, according to this flowchart, the prediction mode determination process executed by the prediction mode determination unit 11 in the present embodiment will be described in detail.

予測モード決定部11は、符号化対象マクロブロックについて量子化パラメータを指定して予測モードの決定要求が発行されると、図5のフローチャートに示すように、先ず最初に、ステップS200で、レジスタXに対して予測モードの初期値(初期値となる予測モードの識別情報)を設定し、さらに、R−Dコストを格納することになる3つのレジスタC0,C1,C2に対して大きな値を示す初期コストを格納するとともに、予測モードの識別情報を格納することになる3つのレジスタM0,M1,M2に対して意味のない値を格納することで、レジスタX,C0〜C2,M0〜M2を初期化する。   When a prediction mode determination request is issued by designating a quantization parameter for a macroblock to be encoded and a prediction mode determination request is issued, first, as shown in the flowchart of FIG. Is set to the initial value of the prediction mode (prediction mode identification information to be an initial value), and the three registers C0, C1, and C2 that store the RD cost have large values. By storing an insignificant value for the three registers M0, M1, and M2 that store the initial cost and the identification information of the prediction mode, the registers X, C0 to C2, and M0 to M2 are stored. initialize.

なお、以下に説明するように、これらのレジスタX,C0〜C2,M0〜M2の他に、符号量を格納するレジスタαと、未定乗数を格納するレジスタβと、重み付き歪み量を格納するレジスタγ0と、重みなし歪み量を格納するレジスタγ1という4つのレジスタを使用している。   As will be described below, in addition to these registers X, C0 to C2, and M0 to M2, a register α that stores a code amount, a register β that stores an undetermined multiplier, and a weighted distortion amount are stored. Four registers are used: a register γ0 and a register γ1 that stores an unweighted distortion amount.

続いて、ステップS201で、符号化対象マクロブロックの変移量を推定する。この推定手法については、外部より与えられるものとする。例えば、H.264の参照ソフトJMが算出する動きベクトルを、以下で使用する変移量の推定値として用いることも可能である。あるいは、符号化対象マクロブロックと参照マクロブロックとの絶対値誤差和を最小化する規範に従って、推定変位量を算出することも可能である。   Subsequently, in step S201, the shift amount of the encoding target macroblock is estimated. This estimation method is assumed to be given from the outside. For example, H.M. It is also possible to use a motion vector calculated by the H.264 reference software JM as an estimated value of the shift amount used below. Alternatively, it is also possible to calculate the estimated displacement amount according to a standard for minimizing the sum of absolute value errors between the encoding target macroblock and the reference macroblock.

続いて、ステップS202で、レジスタXの予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、その予測モードを用いて符号化する場合の符号量を算出し、その算出した値をレジスタαに書き出す。具体的な算出方法は、H.264の参照ソフトJMの方法に従う。   Subsequently, in step S202, the prediction mode, the prediction vector, the quantization parameter, the encoding target frame signal, and the reference frame signal of the register X are input, and the code amount when encoding using the prediction mode is calculated. The calculated value is written to the register α. The specific calculation method is as follows. It follows the method of H.264 reference software JM.

続いて、ステップS203で、レジスタXの予測モード、量子化パラメータを入力として、その予測モードを用いて符号化する場合の未定乗数を算出し、その算出した値をレジスタβに書き出す。具体的な算出方法は、H.264の参照ソフトJMの方法に従う。   Subsequently, in step S203, the prediction mode of the register X and the quantization parameter are input, an undetermined multiplier for encoding using the prediction mode is calculated, and the calculated value is written to the register β. The specific calculation method is as follows. It follows the method of H.264 reference software JM.

続いて、ステップS204で、最初に、ステップS201で算出した推定変位量に基づいて重みを決定し、次に、レジスタXの予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、それらの入力信号とその決定した重みとに基づいて、その予測モードを用いて符号化する場合の重み付き歪み量を算出し、その算出した値をレジスタγ0に書き出す。具体的な算出方法は、前述した式(D)(〔数9〕に示した式)に従う。   Subsequently, in step S204, a weight is first determined based on the estimated displacement calculated in step S201, and then the prediction mode, prediction vector, quantization parameter, encoding target frame signal, reference frame of the register X are determined. Based on the input signal and the determined weight, the weighted distortion amount when encoding using the prediction mode is calculated, and the calculated value is written to the register γ0. A specific calculation method follows the above-described formula (D) (the formula shown in [Equation 9]).

続いて、ステップS205で、レジスタαに格納される符号量と、レジスタβに格納される未定乗数と、レジスタγ0に格納される重み付き歪み量とを読み出して、R−Dコストを算出する。具体的な算出方法は、前述した式(C)(〔数8〕に示した式)に従う。   Subsequently, in step S205, the code amount stored in the register α, the undetermined multiplier stored in the register β, and the weighted distortion amount stored in the register γ0 are read, and the RD cost is calculated. A specific calculation method follows the above-described formula (C) (the formula shown in [Equation 8]).

続いて、ステップS206で、その算出したR−DコストとレジスタC0の値とを比較して、その算出したR−Dコストの方がレジスタC0の値よりも小さいことを判断するときには、ステップS207に進んで、その算出したR−DコストをレジスタC0に格納し、続くステップS208で、レジスタXに格納されている予測モードの識別情報をレジスタM0に格納する。   Subsequently, in step S206, when the calculated RD cost is compared with the value of the register C0 and it is determined that the calculated RD cost is smaller than the value of the register C0, step S207 is performed. Then, the calculated RD cost is stored in the register C0, and in step S208, the prediction mode identification information stored in the register X is stored in the register M0.

一方、ステップS206の判断処理で、ステップS205で算出したR−Dコストの方がレジスタC0の値よりも大きいことを判断するときには、ステップS209に進んで、その算出したR−DコストとレジスタC2の値とを比較し、その算出したR−Dコストの方がレジスタC2の値よりも小さいことを判断するときには、ステップS210に進んで、その算出したR−DコストをレジスタC2に格納し、続くステップS211で、レジスタXに格納されている予測モードの識別情報をレジスタM1に格納する。一方、ステップS209で、その算出したR−Dコストの方が大きいことを判断するときには、このステップS210,211の処理を省略する。   On the other hand, when it is determined in step S206 that the RD cost calculated in step S205 is larger than the value in the register C0, the process proceeds to step S209, where the calculated RD cost and the register C2 are registered. When it is determined that the calculated RD cost is smaller than the value of the register C2, the process proceeds to step S210, and the calculated RD cost is stored in the register C2. In subsequent step S211, the prediction mode identification information stored in the register X is stored in the register M1. On the other hand, when it is determined in step S209 that the calculated RD cost is higher, the processes in steps S210 and 211 are omitted.

このようにして、レジスタC0には、これまでの処理の求められた最小コストが格納されるとともに、それに対応して、レジスタM0には、その最小コストを実現する予測モードの識別情報が格納され、そして、レジスタC2には、これまでの処理の求められた最小コストに続く小さなコストが格納されるとともに、それに対応して、レジスタM0には、その最小コストに続く小さなコストを実現する予測モードの識別情報が格納されることになる。   In this way, the register C0 stores the minimum cost that has been obtained so far, and correspondingly, the register M0 stores prediction mode identification information that realizes the minimum cost. In addition, the register C2 stores a small cost following the required minimum cost of the processing so far, and correspondingly, the register M0 has a prediction mode for realizing the small cost following the minimum cost. The identification information is stored.

このステップS204〜ステップS211の処理と並列処理する形で、ステップS204x〜ステップS208xの処理を実行する。   The processes in steps S204x to S208x are executed in parallel with the processes in steps S204 to S211.

すなわち、ステップS204xで、レジスタXの予測モード、予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、その予測モードを用いて符号化する場合の重みなし歪み量を算出し、その算出した値をレジスタγ1に書き出す。具体的な算出方法は、前述した式(D)(〔数9〕に示した式)で重み付けがないものとしたものに従うか、あるいは、前述した式(B)(〔数2〕に示した式)に従う。   That is, in step S204x, the prediction mode, the prediction vector, the quantization parameter, the encoding target frame signal, and the reference frame signal of the register X are input, and the unweighted distortion amount when encoding using the prediction mode is calculated. The calculated value is written in the register γ1. The specific calculation method is based on the above formula (D) (the formula shown in [Equation 9]) with no weighting, or the above formula (B) (shown in [Equation 2]). Follow the formula.

続いて、ステップS205xで、レジスタαに格納される符号量と、レジスタβに格納される未定乗数と、レジスタγ1に格納される重みなし歪み量とを読み出して、R−Dコストを算出する。具体的な算出方法は、前述した式(C)(〔数8〕に示した式)で歪み量を重みなしの値を用いるものに従うか、あるいは、前述した式(A)(〔数1〕に示した式)に従う。   Subsequently, in step S205x, the code amount stored in the register α, the undetermined multiplier stored in the register β, and the unweighted distortion amount stored in the register γ1 are read to calculate the RD cost. The specific calculation method is based on the above-described equation (C) (the equation shown in [Equation 8]) using a distortion-free value, or the above-described equation (A) ([Equation 1]). Follow the formula shown in

続いて、ステップS206xで、その算出したR−DコストとレジスタC1の値とを比較して、その算出したR−Dコストの方がレジスタC1の値よりも小さいことを判断するときには、ステップS207xに進んで、その算出したR−DコストをレジスタC1に格納し、続くステップS208xで、レジスタXに格納されている予測モードの識別情報をレジスタM1に格納する。一方、ステップS206xで、算出したR−Dコストの方がレジスタC1の値よりも大きいことを判断するときには、このステップS207x,208xの処理を省略する。   Subsequently, in step S206x, when the calculated RD cost is compared with the value of the register C1, and it is determined that the calculated RD cost is smaller than the value of the register C1, step S207x Then, the calculated RD cost is stored in the register C1, and the identification information of the prediction mode stored in the register X is stored in the register M1 in the subsequent step S208x. On the other hand, when it is determined in step S206x that the calculated RD cost is larger than the value of the register C1, the processes in steps S207x and 208x are omitted.

ステップS208,ステップS208x,ステップS211の処理を終了すると、続いて、ステップS212で、全ての予測モードを処理したのか否かを判断して、全ての予測モードを処理してないことを判断するときには、ステップS213に進んで、予め定められる順番に従って未処理の予測モードの中から予測モードを1つ選択し、その選択した予測モードの識別情報をレジスタXに格納してから、ステップS202に処理に戻る。   When the processing of step S208, step S208x, and step S211 is completed, then, in step S212, it is determined whether or not all prediction modes have been processed, and it is determined that not all prediction modes have been processed. Then, the process proceeds to step S213, one prediction mode is selected from the unprocessed prediction modes according to a predetermined order, the identification information of the selected prediction mode is stored in the register X, and the process proceeds to step S202. Return.

このようにして、ステップS202〜ステップS213の処理を繰り返していくことで、ステップS212で、全ての予測モードを処理したことを判断すると、ステップS214に進んで、レジスタM0に格納される予測モードの識別情報がスキップモードであることを示しているのか否かを判断する。   In this manner, by repeating the processing of step S202 to step S213, when it is determined in step S212 that all prediction modes have been processed, the process proceeds to step S214, and the prediction mode stored in the register M0 is determined. It is determined whether or not the identification information indicates a skip mode.

すなわち、重み付き歪み量を用いて評価したR−Dコスト最小の予測モードがスキップモードであるのか否かを判断するのである。   That is, it is determined whether or not the prediction mode with the minimum RD cost evaluated using the weighted distortion amount is the skip mode.

このステップS214の判断処理に従って、レジスタM0に格納される予測モードの識別情報がスキップモードでないことを判断するときには、スキップモードによる画質劣化が問題とならないことから、ステップS218に進んで、レジスタM0に格納される予測モードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   When it is determined that the prediction mode identification information stored in the register M0 is not the skip mode according to the determination process in step S214, the image quality deterioration due to the skip mode does not matter, so the process proceeds to step S218, and the register M0 is stored. The stored prediction mode is output as the optimum prediction mode for the encoding target block, and the process is terminated.

一方、ステップS214の判断処理に従って、レジスタM0に格納される予測モードの識別情報がスキップモードであることを判断するときには、ステップS215に進んで、レジスタM1に格納される予測モードの識別情報がスキップモードであることを示しているのか否かを判断する。   On the other hand, when it is determined that the prediction mode identification information stored in the register M0 is the skip mode according to the determination process in step S214, the process proceeds to step S215, and the prediction mode identification information stored in the register M1 is skipped. It is determined whether or not the mode is indicated.

すなわち、重みなし歪み量を用いて評価したR−Dコスト最小の予測モードがスキップモードであるのか否かを判断するのである。   That is, it is determined whether or not the prediction mode with the minimum RD cost evaluated using the unweighted distortion amount is the skip mode.

このステップS215の判断処理に従って、レジスタM1に格納される予測モードの識別情報がスキップモードであることを判断するときには、重み付き歪み量を用いても、重みなし歪み量を用いてもスキップモードが選択されたことから、ステップS218に進んで、レジスタM0に格納される予測モードであるスキップモードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   When it is determined that the prediction mode identification information stored in the register M1 is the skip mode according to the determination process in step S215, the skip mode is set regardless of whether the weighted distortion amount or the unweighted distortion amount is used. Since it has been selected, the process proceeds to step S218, the skip mode, which is the prediction mode stored in the register M0, is output as the optimum prediction mode for the block to be encoded, and the process is terminated.

一方、このステップS215の判断処理に従って、レジスタM1に格納される予測モードの識別情報がスキップモードでないことを判断するときは、ステップS216に進んで、ステップS201で推定した推定変位量と符号化対象ブロックの予測ベクトルとの乖離度が閾値より大きく、かつ、その推定変位量の大きさが閾値より大きいのか否かの判定を行う。   On the other hand, when it is determined that the prediction mode identification information stored in the register M1 is not the skip mode according to the determination process in step S215, the process proceeds to step S216, and the estimated displacement amount and the encoding target estimated in step S201 are processed. It is determined whether the degree of deviation from the predicted vector of the block is greater than a threshold and whether the estimated displacement is greater than the threshold.

すなわち、ステップS214でR−Dコスト最小の予測モードがスキップモードである判断していることで、実際に符号化する場合には周辺のマクロブロックの動きベクトルから求められる予測ベクトルを動きベクトルとして用いることになることから、ステップS201で推定した推定変位量とその予測ベクトルとを判断対象として、2つの変位量の乖離度が閾値より大きく、かつ、推定変位量の大きさが閾値より大きいのか否かの判定を行うのである。   That is, since it is determined in step S214 that the prediction mode with the minimum RD cost is the skip mode, the prediction vector obtained from the motion vectors of the surrounding macroblocks is used as the motion vector when actually encoding. Therefore, whether or not the difference between the two displacement amounts is larger than the threshold value and the estimated displacement amount is larger than the threshold value with the estimated displacement amount estimated in step S201 and the predicted vector as a determination target. This determination is made.

このステップS216の判断処理に従って、2つの変位量の乖離度が閾値より大きく、かつ、推定変位量の大きさが閾値より大きいという条件が成立することを判断するときには、ステップS217に進んで、レジスタM2に格納される予測モードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   When it is determined that the condition that the degree of deviation between the two displacement amounts is greater than the threshold value and the estimated displacement amount is greater than the threshold value according to the determination processing in step S216, the process proceeds to step S217, where The prediction mode stored in M2 is output as the optimal prediction mode for the encoding target block, and the process is terminated.

一方、このステップS216の判断処理に従って、2つの変位量の乖離度が閾値より大きく、かつ、推定変位量の大きさが閾値より大きいという条件が成立しないことを判断するときには、ステップS218に進んで、レジスタM0に格納される予測モードであるスキップモードを符号化対象ブロックの最適な予測モードとして出力して、処理を終了する。   On the other hand, when it is determined that the condition that the degree of deviation between the two displacement amounts is greater than the threshold value and the estimated displacement amount is greater than the threshold value is not satisfied according to the determination process in step S216, the process proceeds to step S218. Then, the skip mode, which is the prediction mode stored in the register M0, is output as the optimum prediction mode for the encoding target block, and the process is terminated.

このようにして、本実施形態例では、予測モード決定部11は、符号化対象マクロブロックについて、重み付きの歪み量を使って求められたR−Dコスト最小の予測モードがスキップモードであっても、スキップモードで符号化したのでは大きな画質劣化を含んでいる可能性が高いことを判断する場合には、その次に小さなR−Dコストの予測モードを最適な予測モードとして決定するのである。   Thus, in this embodiment, the prediction mode determination unit 11 determines that the prediction mode with the minimum RD cost obtained using the weighted distortion amount for the encoding target macroblock is the skip mode. However, when it is determined that coding in the skip mode is likely to include large image quality degradation, the prediction mode with the next smallest RD cost is determined as the optimum prediction mode. .

図6に、本実施形態例を実現する予測モード決定部11の装置構成の一例を図示する。   FIG. 6 illustrates an example of a device configuration of the prediction mode determination unit 11 that realizes the present embodiment.

この図6に示す装置構成と図4に示す装置構成との違いは、この図6に示す構成では、新たに準最小コスト記憶部200および準最適モード記憶部201を備えるとともに、 図4に示す最小コスト判定部117とは異なる処理を実行する最小コスト判定部117αと、図4に示すモード更新部120とは異なる処理を実行するモード更新部120αと、図4に示す最適モード出力部125とは異なる処理を実行する最適モード出力部125αとを備えるという点である。   The difference between the device configuration shown in FIG. 6 and the device configuration shown in FIG. 4 is that the configuration shown in FIG. A minimum cost determination unit 117α that executes processing different from the minimum cost determination unit 117, a mode update unit 120α that executes processing different from the mode update unit 120 shown in FIG. 4, and an optimum mode output unit 125 shown in FIG. Is provided with an optimum mode output unit 125α that executes different processes.

次に、これらの各処理部について説明するが、変位量記憶部100、予測ベクトル算出部101、初期モード設定部103、符号量算出部105、重み付き歪み量算出部107、重みなし歪み量算出部109、未定乗数算出部111、コスト算出部113および重みなしコスト算出部115の処理については、図4で説明したものと同じであるので、その説明を省略する。   Next, each of these processing units will be described. The displacement amount storage unit 100, the prediction vector calculation unit 101, the initial mode setting unit 103, the code amount calculation unit 105, the weighted distortion amount calculation unit 107, and the unweighted distortion amount calculation. The processing of unit 109, undetermined multiplier calculation unit 111, cost calculation unit 113, and unweighted cost calculation unit 115 is the same as that described with reference to FIG.

〔最小コスト判定部117α〕
最小コスト判定部117αは、コスト記憶部114に記憶されるR−Dコストと、最小コスト記憶部118に記憶される最小コストとを読み出して、そのR−Dコストがその最小コストよりも小さいのか否かの判定を行い、そのR−Dコストがその最小コストよりも小さい場合には、そのR−Dコストを最小コスト記憶部118に書き出すとともに、モード更新部120αに制御を渡す。
[Minimum cost determination unit 117α]
The minimum cost determination unit 117α reads out the RD cost stored in the cost storage unit 114 and the minimum cost stored in the minimum cost storage unit 118, and whether the RD cost is smaller than the minimum cost. If the RD cost is smaller than the minimum cost, the RD cost is written to the minimum cost storage unit 118 and control is passed to the mode update unit 120α.

一方、そのR−Dコストがその最小コストよりも大きい場合には、コスト記憶部114に記憶されるR−Dコストと、準最小コスト記憶部200に記憶される準最小コスト(2番目に小さなコスト)とを読み出して、そのR−Dコストがその準最小コストよりも小さいのか否かの判定を行い、そのR−Dコストがその準最小コストよりも小さい場合には、そのR−Dコストを準最小コスト記憶部200に書き出すとともに、モード更新部120αに制御を渡す。一方、そのR−Dコストがその準最小コストよりも大きい場合には、最終モード判定部123に制御を渡す。   On the other hand, when the RD cost is larger than the minimum cost, the RD cost stored in the cost storage unit 114 and the quasi-minimum cost stored in the quasi-minimum cost storage unit 200 (second smallest) Cost), and it is determined whether or not the RD cost is smaller than the quasi-minimum cost. If the RD cost is smaller than the quasi-minimum cost, the RD cost is read. Is written to the quasi-minimum cost storage unit 200 and control is passed to the mode update unit 120α. On the other hand, if the RD cost is greater than the quasi-minimum cost, control is passed to the final mode determination unit 123.

そして、重みなしコスト記憶部116に記憶されるR−Dコストと、重みなし最小コスト記憶部119に記憶される最小コストとを読み出して、そのR−Dコストがその最小コストよりも小さいのか否かの判定を行い、そのR−Dコストがその最小コストよりも小さい場合には、そのR−Dコストを重みなし最小コスト記憶部119に書き出すとともに、モード更新部120αに制御を渡す。一方、そのR−Dコストがその最小コストよりも大きい場合には、最終モード判定部123に制御を渡す。   Then, the RD cost stored in the non-weighted cost storage unit 116 and the minimum cost stored in the non-weighted minimum cost storage unit 119 are read, and whether or not the RD cost is smaller than the minimum cost. If the RD cost is smaller than the minimum cost, the RD cost is written to the weightless minimum cost storage unit 119 and control is passed to the mode update unit 120α. On the other hand, if the RD cost is greater than the minimum cost, control is passed to the final mode determination unit 123.

〔モード更新部120α〕
モード更新部120αは、最小コスト判定部117αが最小コスト記憶部118にR−Dコストを書き出すときに、そのR−Dコストの算出元となった予測モード(その時点でモード記憶部104に記憶されている予測モード)の識別情報を最適モード記憶部121に書き出してから、最終モード判定部123に制御を渡す。
[Mode update unit 120α]
When the minimum cost determination unit 117α writes the RD cost to the minimum cost storage unit 118, the mode update unit 120α stores the prediction mode that is the calculation source of the RD cost (stored in the mode storage unit 104 at that time). Is written to the optimum mode storage unit 121, and control is passed to the final mode determination unit 123.

そして、最小コスト判定部117αが準最小コスト記憶部200にR−Dコストを書き出すときに、そのR−Dコストの算出元となった予測モード(その時点でモード記憶部104に記憶されている予測モード)の識別情報を準最適モード記憶部201に書き出してから、最終モード判定部123に制御を渡す。   Then, when the minimum cost determination unit 117α writes the RD cost to the quasi-minimum cost storage unit 200, the prediction mode that is the calculation source of the RD cost (stored in the mode storage unit 104 at that time) After the identification information of (prediction mode) is written in the suboptimal mode storage unit 201, control is passed to the final mode determination unit 123.

そして、最小コスト判定部117αが重みなし最小コスト記憶部119にR−Dコストを書き出すときに、そのR−Dコストの算出元となった予測モード(その時点でモード記憶部104に記憶されている予測モード)の識別情報を重みなし最適モード記憶部122に書き出してから、最終モード判定部123に制御を渡す。   When the minimum cost determination unit 117α writes the RD cost to the unweighted minimum cost storage unit 119, the prediction mode that is the calculation source of the RD cost (stored in the mode storage unit 104 at that time) Is written to the optimum mode storage unit 122 without weight, and then the control is passed to the final mode determination unit 123.

〔最終モード判定部123〕
最終モード判定部123は、最小コスト判定部117αやモード更新部120αから制御が渡されると、モード設定部124が全ての予測モードの設定を終了したのか否かを判断して、全ての予測モードの設定を終了したことを判断するときには、最適モード出力部125αに対して最適な予測モードの出力を指示し、全ての予測モードの設定を終了していないことを判断するときには、モード設定部124に対して次の予測モードの設定を指示する。
[Final mode determination unit 123]
When the control is passed from the minimum cost determination unit 117α or the mode update unit 120α, the final mode determination unit 123 determines whether or not the mode setting unit 124 has finished setting all prediction modes, and determines all prediction modes. When determining that the setting of the prediction mode has been completed, the optimal mode output unit 125α is instructed to output the optimal prediction mode. When determining that all the prediction modes have not been set, the mode setting unit 124 Is instructed to set the next prediction mode.

〔モード設定部124〕
モード設定部124は、最終モード判定部123から予測モードの設定指示があると、モード記憶部104に対して次の予測モードを設定する。
[Mode setting unit 124]
When there is a prediction mode setting instruction from the final mode determination unit 123, the mode setting unit 124 sets the next prediction mode in the mode storage unit 104.

〔最適モード出力部125α〕
最適モード出力部125αは、最終モード判定部123から最適モードの出力指示があると、最適モード記憶部121に記憶される予測モードがスキップモードであるのか否かの判定を行い、スキップモードでない場合には、最適モード記憶部121に記憶される予測モードを符号化対象ブロックの最適な予測モードとして出力する。
[Optimum mode output unit 125α]
When there is an instruction to output the optimal mode from the final mode determination unit 123, the optimal mode output unit 125α determines whether or not the prediction mode stored in the optimal mode storage unit 121 is the skip mode. In this case, the prediction mode stored in the optimum mode storage unit 121 is output as the optimum prediction mode of the encoding target block.

一方、最適モード記憶部121に記憶される予測モードがスキップモードである場合には、重みなし最適モード記憶部122に記憶される予測モードがスキップモードであるのか否かの判定を行い、スキップモードである場合には、最適モード記憶部121に記憶されるスキップモードを符号化対象ブロックの最適な予測モードとして出力する。   On the other hand, when the prediction mode stored in the optimal mode storage unit 121 is the skip mode, it is determined whether or not the prediction mode stored in the unweighted optimal mode storage unit 122 is the skip mode. If it is, the skip mode stored in the optimum mode storage unit 121 is output as the optimum prediction mode of the encoding target block.

一方、最適モード記憶部121に記憶される予測モードがスキップモードで、重みなし最適モード記憶部122に記憶される予測モードがスキップモードでない場合には、変位量記憶部100に記憶される推定変位量と、予測ベクトル記憶部102に記憶される予測ベクトルとを読み出して、その推定変位量とその予測ベクトルとの乖離度を算出するとともに、変移推定量の大きさを算出して、その乖離度が閾値よりも大きく、かつ、その変移推定量の大きさが閾値よりも大きいのか否かの判定を行う。そして、その判定結果に基づいて、推定変位量と予測ベクトルとの乖離度が大きく、かつ、変移推定量が大きいという条件が成立する場合には、準最適モード記憶部201に記憶される予測モードを符号化対象ブロックの最適な予測モードとして出力し、その条件が成立しない場合には、最適モード記憶部121に記憶されるスキップモードを符号化対象ブロックの最適な予測モードとして出力する。   On the other hand, when the prediction mode stored in the optimal mode storage unit 121 is the skip mode and the prediction mode stored in the unweighted optimal mode storage unit 122 is not the skip mode, the estimated displacement stored in the displacement amount storage unit 100 The amount and the prediction vector stored in the prediction vector storage unit 102 are read out, and the degree of deviation between the estimated displacement amount and the prediction vector is calculated, and the magnitude of the displacement estimation amount is calculated, and the degree of deviation is calculated. Is larger than a threshold value, and it is determined whether or not the magnitude of the transition estimation amount is larger than the threshold value. Then, based on the determination result, when the condition that the deviation between the estimated displacement amount and the prediction vector is large and the displacement estimation amount is large is satisfied, the prediction mode stored in the suboptimal mode storage unit 201 Is output as the optimal prediction mode of the encoding target block, and when the condition is not satisfied, the skip mode stored in the optimal mode storage unit 121 is output as the optimal prediction mode of the encoding target block.

この図6に示す構成に従って、予測モード決定部11は、図5のフローチャートの処理を実行することで、符号化対象マクロブロックについて、重み付きの歪み量を使って求められたR−Dコスト最小の予測モードがスキップモードであっても、スキップモードで符号化したのでは大きな画質劣化を含んでいる可能性が高いことを判断する場合には、その次に小さなR−Dコストの予測モードを最適な予測モードとして決定するように処理するのである。   In accordance with the configuration shown in FIG. 6, the prediction mode determination unit 11 executes the processing of the flowchart in FIG. 5 to minimize the RD cost obtained using the weighted distortion amount for the encoding target macroblock. Even if the prediction mode is the skip mode, when it is determined that there is a high possibility that the image is coded in the skip mode, the image quality is likely to contain a large deterioration in image quality. Processing is performed so as to determine the optimum prediction mode.

〔3〕本発明の有効性を検証するために行った実験の実験結果について
本発明の有効性を検証するために、本発明をH.264の参照ソフトウェアJSMV(version 8.0.1)に実装し、デフォルトのJSMVとの比較実験を行った。
[3] Experimental results of experiments conducted to verify the effectiveness of the present invention In order to verify the effectiveness of the present invention, It was implemented in H.264 reference software JSMV (version 8.0.1) and compared with the default JSMV.

この実験で用いた符号化対象のシーケンスは、サイズ352×288[pixles]の“Mobile&Calender", "City”である。また、いずれのシーケンスもフレームレート30[fps] である。GOP構造はI,Pピクチャからなり、Iピクチャの挿入間隔を15フレームとした。量子化パラメータはI,Pピクチャいずれに対してもQP=28とした。   The encoding target sequence used in this experiment is “Mobile & Calender”, “City” of size 352 × 288 [pixles]. Each sequence has a frame rate of 30 [fps]. The GOP structure consists of I and P pictures, and the I picture insertion interval is 15 frames. The quantization parameter is QP = 28 for both I and P pictures.

この実験により得られた符号量の比較結果を下記の表に示す。   The following table shows the comparison results of the code amounts obtained by this experiment.

Figure 2009021673
Figure 2009021673

この実験結果から、本発明は、JSMVに対して1.15〜4.14%の符号量低減を実現していることを確認できた。これにより本発明の有効性を検証することができた。なお、この実験で得た両手法の復号画像には、主観的な画質の差が認められないことを確認している。   From this experimental result, it has been confirmed that the present invention realizes a code amount reduction of 1.15 to 4.14% with respect to JSMV. Thus, the effectiveness of the present invention could be verified. Note that it has been confirmed that there is no subjective difference in image quality between the decoded images of both methods obtained in this experiment.

本発明は、動きベクトルとして予測ベクトルを用いることを指示するスキップモードを持つ動画像符号化に適用できるものであり、本発明を適用することで、スキップモードにおける画質劣化を回避しつつ、スキップモードの符号量削減のメリットを最大限享受することができるようになる。   The present invention can be applied to moving picture coding having a skip mode instructing to use a prediction vector as a motion vector. By applying the present invention, skipping image quality deterioration in the skip mode can be avoided. It is possible to enjoy the maximum benefit of reducing the amount of codes.

本発明を具備する映像符号化装置の装置構成図である。It is an apparatus block diagram of the video coding apparatus which comprises this invention. 符号化パラメータ決定部の実行するフローチャートである。It is a flowchart which an encoding parameter determination part performs. 予測モード決定部の実行するフローチャートである。It is a flowchart which a prediction mode determination part performs. 予測モード決定部の装置構成図である。It is an apparatus block diagram of a prediction mode determination part. 予測モード決定部の実行するフローチャートである。It is a flowchart which a prediction mode determination part performs. 予測モード決定部の装置構成図である。It is an apparatus block diagram of a prediction mode determination part.

符号の説明Explanation of symbols

1 映像符号化装置
10 符号化パラメータ決定部
11 予測モード決定部
12 推定変位量算出部
20 符号化部
100 変位量記憶部
101 予測ベクトル算出部
102 予測ベクトル記憶部
103 初期モード設定部
104 モード記憶部
105 符号量算出部
106 符号量記憶部
107 重み付き歪み量算出部
108 重み付き歪み量記憶部
109 重みなし歪み量算出部
110 重みなし歪み量記憶部
111 未定乗数算出部
112 未定乗数記憶部
113 コスト算出部
114 コスト記憶部
115 重みなしコスト算出部
116 重みなしコスト記憶部
117 最小コスト判定部
118 最小コスト記憶部
119 重みなし最小コスト記憶部
120 モード更新部
121 最適モード記憶部
122 重みなし最適モード記憶部
123 最終モード判定部
124 モード設定部
125 最適モード出力部
200 準最小コスト記憶部
201 準最適モード記憶部
DESCRIPTION OF SYMBOLS 1 Video coding apparatus 10 Encoding parameter determination part 11 Prediction mode determination part 12 Estimated displacement amount calculation part 20 Encoding part 100 Displacement amount memory | storage part 101 Prediction vector calculation part 102 Prediction vector memory | storage part 103 Initial mode setting part 104 Mode storage part 105 Code amount calculation unit 106 Code amount storage unit 107 Weighted distortion amount calculation unit 108 Weighted distortion amount storage unit 109 Unweighted distortion amount calculation unit 110 Unweighted distortion amount storage unit 111 Undetermined multiplier calculation unit 112 Undetermined multiplier storage unit 113 Cost Calculation unit 114 Cost storage unit 115 Weightless cost calculation unit 116 Weightless cost storage unit 117 Minimum cost determination unit 118 Minimum cost storage unit 119 Weightless minimum cost storage unit 120 Mode update unit 121 Optimal mode storage unit 122 Weightless optimal mode storage Part 123 Final mode Tough 124 mode setting unit 125 optimum mode output unit 200 sub-minimal cost storage unit 201 suboptimal mode storage unit

Claims (12)

フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行う画像符号化に用いる符号化パラメータを決定する符号化パラメータ決定方法であって、
符号化対象のブロックについて、符号化処理に先立って、画像信号の時間的な動きを示す推定変位量を算出する過程と、
時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードであるブロックを判断対象として、そのブロックを符号化する際に用いる変位量と前記推定変位量とに基づいて、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当するのか否かを判断する過程と、
前記該当のブロックでないと判断した前記判断対象のブロックについては、スキップモードをそのブロックの最適な予測モードとして決定し、前記該当のブロックであると判断した前記判断対象のブロックについては、前記重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードをそのブロックの最適な予測モードとして決定する過程とを備えることを、
特徴とする符号化パラメータ決定方法。
An encoding parameter determination method for determining an encoding parameter used for image encoding for performing information compression by transform encoding and quantization for a prediction error signal obtained by intra-frame prediction and inter-frame prediction,
For a block to be encoded, a process of calculating an estimated displacement amount indicating temporal movement of an image signal prior to the encoding process;
A block whose coding mode is the skip prediction mode selected by the cost calculation using the weighted distortion amount using the sensitivity coefficient indicating the spatio-temporal visual sensitivity is used as a determination target, and the block is encoded. A process of determining whether or not a block is likely to have a high image quality degradation when encoded in the skip mode, based on the displacement amount used at the time and the estimated displacement amount;
For the block to be determined that is determined not to be the corresponding block, the skip mode is determined as the optimum prediction mode of the block, and for the block to be determined that is determined to be the corresponding block, the weighting is determined. Determining a least cost prediction mode selected by calculating a cost using an undistorted amount as an optimal prediction mode of the block,
A characteristic encoding parameter determination method.
フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行う画像符号化に用いる符号化パラメータを決定する符号化パラメータ決定方法であって、
符号化対象のブロックについて、符号化処理に先立って、画像信号の時間的な動きを示す推定変位量を算出する過程と、
時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードであるブロックを判断対象として、そのブロックを符号化する際に用いる変位量と前記推定変位量とに基づいて、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当するのか否かを判断する過程と、
前記該当のブロックでないと判断した前記判断対象のブロックについては、スキップモードをそのブロックの最適な予測モードとして決定し、前記該当のブロックであると判断した前記判断対象のブロックについては、前記コスト最小のスキップモードの次にコストの小さなものとして選択された予測モードをそのブロックの最適な予測モードとして決定する過程とを備えることを、
特徴とする符号化パラメータ決定方法。
An encoding parameter determination method for determining an encoding parameter used for image encoding for performing information compression by transform encoding and quantization for a prediction error signal obtained by intra-frame prediction and inter-frame prediction,
For a block to be encoded, a process of calculating an estimated displacement amount indicating temporal movement of an image signal prior to the encoding process;
A block whose coding mode is the skip prediction mode selected by the cost calculation using the weighted distortion amount using the sensitivity coefficient indicating the spatio-temporal visual sensitivity is used as a determination target, and the block is encoded. A process of determining whether or not a block is likely to have a high image quality degradation when encoded in the skip mode, based on the displacement amount used at the time and the estimated displacement amount;
For the block to be determined that is not the corresponding block, the skip mode is determined as the optimum prediction mode of the block, and the cost minimum is determined for the block to be determined that the block is determined to be the corresponding block. Determining a prediction mode selected as the next lowest cost mode as the optimal prediction mode of the block,
A characteristic encoding parameter determination method.
請求項1又は2に記載の符号化パラメータ決定方法において、
前記判断する過程では、前記変位量と前記推定変位量とを比較して、その2つの変位量の乖離度が規定の閾値より大きく、かつ、前記推定変位量の大きさが規定の閾値より大きい場合に、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当すると判断することを、
特徴とする符号化パラメータ決定方法。
The encoding parameter determination method according to claim 1 or 2,
In the determining process, the displacement amount is compared with the estimated displacement amount, and the difference between the two displacement amounts is larger than a prescribed threshold value, and the estimated displacement amount is larger than the prescribed threshold value. In this case, it is determined that the block is likely to have a large image quality deterioration when encoded in the skip mode.
A characteristic encoding parameter determination method.
請求項1ないし3のいずれか1項に記載の符号化パラメータ決定方法において、
前記重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードでないブロックについて、その予測モードをそのブロックの最適な予測モードとして決定する過程を備えることを、
特徴とする符号化パラメータ決定方法。
In the encoding parameter determination method according to any one of claims 1 to 3,
For a block whose prediction mode with the lowest cost selected by calculating the cost using the weighted distortion amount is not the skip mode, the step of determining the prediction mode as the optimum prediction mode of the block,
A characteristic encoding parameter determination method.
請求項1ないし4のいずれか1項に記載の符号化パラメータ決定方法において、
前記判断対象のブロックについて、前記重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードもまたスキップモードである場合には、前記判断処理を行うことなく、スキップモードをそのブロックの最適な予測モードとして決定する過程を備えることを、
特徴とする符号化パラメータ決定方法。
The encoding parameter determination method according to any one of claims 1 to 4,
In the case where the prediction mode with the minimum cost selected by calculating the cost using the unweighted distortion amount is also the skip mode for the determination target block, the skip mode is performed without performing the determination process. Comprising determining the optimal prediction mode for the block,
A characteristic encoding parameter determination method.
フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行う画像符号化に用いる符号化パラメータを決定する符号化パラメータ決定装置であって、
符号化対象のブロックについて、符号化処理に先立って、画像信号の時間的な動きを示す推定変位量を算出する手段と、
時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードであるブロックを判断対象として、そのブロックを符号化する際に用いる変位量と前記推定変位量とに基づいて、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当するのか否かを判断する手段と、
前記該当のブロックでないと判断した前記判断対象のブロックについては、スキップモードをそのブロックの最適な予測モードとして決定し、前記該当のブロックであると判断した前記判断対象のブロックについては、前記重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードをそのブロックの最適な予測モードとして決定する手段とを備えることを、
特徴とする符号化パラメータ決定装置。
An encoding parameter determination device that determines an encoding parameter used for image encoding for performing information compression by transform encoding and quantization for a prediction error signal obtained by intra-frame prediction and inter-frame prediction,
For an encoding target block, prior to encoding processing, means for calculating an estimated displacement amount indicating temporal movement of an image signal;
A block whose coding mode is the skip prediction mode selected by the cost calculation using the weighted distortion amount using the sensitivity coefficient indicating the spatio-temporal visual sensitivity is used as a determination target, and the block is encoded. Means for determining whether or not the block corresponds to a block that is highly likely to deteriorate image quality when encoded in the skip mode, based on the displacement amount used at the time and the estimated displacement amount;
For the block to be determined that is determined not to be the corresponding block, the skip mode is determined as the optimum prediction mode of the block, and for the block to be determined that is determined to be the corresponding block, the weighting is determined. Means for determining a prediction mode with the lowest cost selected by calculating a cost using an undistorted amount as an optimal prediction mode of the block,
An encoding parameter determination device as a feature.
フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行う画像符号化に用いる符号化パラメータを決定する符号化パラメータ決定装置であって、
符号化対象のブロックについて、符号化処理に先立って、画像信号の時間的な動きを示す推定変位量を算出する手段と、
時空間視覚感度を示す感度係数を用いて重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードであるブロックを判断対象として、そのブロックを符号化する際に用いる変位量と前記推定変位量とに基づいて、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当するのか否かを判断する手段と、
前記該当のブロックでないと判断した前記判断対象のブロックについては、スキップモードをそのブロックの最適な予測モードとして決定し、前記該当のブロックであると判断した前記判断対象のブロックについては、前記コスト最小のスキップモードの次にコストの小さなものとして選択された予測モードをそのブロックの最適な予測モードとして決定する手段とを備えることを、
特徴とする符号化パラメータ決定装置。
An encoding parameter determination device that determines an encoding parameter used for image encoding for performing information compression by transform encoding and quantization for a prediction error signal obtained by intra-frame prediction and inter-frame prediction,
For an encoding target block, prior to encoding processing, means for calculating an estimated displacement amount indicating temporal movement of an image signal;
A block whose coding mode is the skip prediction mode selected by the cost calculation using the weighted distortion amount using the sensitivity coefficient indicating the spatio-temporal visual sensitivity is used as a determination target, and the block is encoded. Means for determining whether or not the block corresponds to a block that is highly likely to deteriorate image quality when encoded in the skip mode, based on the displacement amount used at the time and the estimated displacement amount;
For the block to be determined that is not the corresponding block, the skip mode is determined as the optimum prediction mode of the block, and the cost minimum is determined for the block to be determined that the block is determined to be the corresponding block. Determining a prediction mode selected as the next lowest cost mode of the skip mode as an optimal prediction mode of the block,
An encoding parameter determination device as a feature.
請求項6又は7に記載の符号化パラメータ決定装置において、
前記判断する手段は、前記変位量と前記推定変位量とを比較して、その2つの変位量の乖離度が規定の閾値より大きく、かつ、前記推定変位量の大きさが規定の閾値より大きい場合に、スキップモードで符号化すると画質劣化が大きくなる可能性の高いブロックに該当すると判断することを、
特徴とする符号化パラメータ決定装置。
The encoding parameter determination apparatus according to claim 6 or 7,
The means for determining compares the displacement amount with the estimated displacement amount, and the difference between the two displacement amounts is greater than a prescribed threshold value, and the magnitude of the estimated displacement amount is greater than a prescribed threshold value. In this case, it is determined that the block is likely to have a large image quality deterioration when encoded in the skip mode.
An encoding parameter determination device as a feature.
請求項6ないし8のいずれか1項に記載の符号化パラメータ決定装置において、
前記重み付けされた歪み量を用いてコストを算出することで選択されたコスト最小の予測モードがスキップモードでないブロックについて、その予測モードをそのブロックの最適な予測モードとして決定する手段を備えることを、
特徴とする符号化パラメータ決定装置。
In the encoding parameter determination device according to any one of claims 6 to 8,
For a block in which the prediction mode with the lowest cost selected by calculating the cost using the weighted distortion amount is not the skip mode, means for determining the prediction mode as the optimum prediction mode of the block,
An encoding parameter determination device as a feature.
請求項6ないし9のいずれか1項に記載の符号化パラメータ決定装置において、
前記判断対象のブロックについて、前記重み付けがされない歪み量を用いてコストを算出することで選択されたコスト最小の予測モードもまたスキップモードである場合には、前記判断処理を行うことなく、スキップモードをそのブロックの最適な予測モードとして決定する手段を備えることを、
特徴とする符号化パラメータ決定装置。
The encoding parameter determination device according to any one of claims 6 to 9,
In the case where the prediction mode with the minimum cost selected by calculating the cost using the unweighted distortion amount is also the skip mode for the determination target block, the skip mode is performed without performing the determination process. Comprising means for determining as the optimal prediction mode for the block,
An encoding parameter determination device as a feature.
請求項1ないし5のいずれか1項に記載の符号化パラメータ決定方法の実現に用いられる処理をコンピュータに実行させるための符号化パラメータ決定プログラム。   An encoding parameter determination program for causing a computer to execute processing used to realize the encoding parameter determination method according to any one of claims 1 to 5. 請求項1ないし5のいずれか1項に記載の符号化パラメータ決定方法の実現に用いられる処理をコンピュータに実行させるための符号化パラメータ決定プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which an encoding parameter determination program for causing a computer to execute processing used to realize the encoding parameter determination method according to any one of claims 1 to 5 is recorded.
JP2007180910A 2007-07-10 2007-07-10 ENCODING PARAMETER DETERMINING METHOD, ENCODING PARAMETER DETERMINING DEVICE, ENCODING PARAMETER DETERMINING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM Active JP4709187B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007180910A JP4709187B2 (en) 2007-07-10 2007-07-10 ENCODING PARAMETER DETERMINING METHOD, ENCODING PARAMETER DETERMINING DEVICE, ENCODING PARAMETER DETERMINING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007180910A JP4709187B2 (en) 2007-07-10 2007-07-10 ENCODING PARAMETER DETERMINING METHOD, ENCODING PARAMETER DETERMINING DEVICE, ENCODING PARAMETER DETERMINING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM

Publications (2)

Publication Number Publication Date
JP2009021673A true JP2009021673A (en) 2009-01-29
JP4709187B2 JP4709187B2 (en) 2011-06-22

Family

ID=40360944

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007180910A Active JP4709187B2 (en) 2007-07-10 2007-07-10 ENCODING PARAMETER DETERMINING METHOD, ENCODING PARAMETER DETERMINING DEVICE, ENCODING PARAMETER DETERMINING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM

Country Status (1)

Country Link
JP (1) JP4709187B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011151546A (en) * 2010-01-20 2011-08-04 Mega Chips Corp Image encoding device and image converting device
WO2011122659A1 (en) * 2010-03-30 2011-10-06 シャープ株式会社 Encoder apparatus and decoder apparatus
JP2012525763A (en) * 2009-04-28 2012-10-22 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Distortion weighting
JP2013514714A (en) * 2009-12-16 2013-04-25 エレクトロニクス アンド テレコミュニケーションズ リサーチ インスチチュート Adaptive video encoding apparatus and method
JP2013085252A (en) * 2011-10-12 2013-05-09 Thomson Licensing Method and device for determining saliency value of block of video frame blockwise predictive encoded in data stream
JP2014204208A (en) * 2013-04-02 2014-10-27 日本電信電話株式会社 Prediction mode determination method, dynamic image encoding device, and prediction mode determination program
JP2017500830A (en) * 2013-11-04 2017-01-05 マグナム セミコンダクター, インコーポレイテッド Method and apparatus for multipath adaptive quantization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10336675A (en) * 1997-05-30 1998-12-18 Toshiba Corp Moving image encoding method and device
JP2005348093A (en) * 2004-06-03 2005-12-15 Sony Corp Image processor, program and method thereof
JP2006005466A (en) * 2004-06-15 2006-01-05 Toshiba Corp Method and device of encoding image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10336675A (en) * 1997-05-30 1998-12-18 Toshiba Corp Moving image encoding method and device
JP2005348093A (en) * 2004-06-03 2005-12-15 Sony Corp Image processor, program and method thereof
JP2006005466A (en) * 2004-06-15 2006-01-05 Toshiba Corp Method and device of encoding image

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012525763A (en) * 2009-04-28 2012-10-22 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Distortion weighting
US10728541B2 (en) 2009-12-16 2020-07-28 Electronics And Telecommunications Research Institute Adaptive image encoding device and method
JP2013514714A (en) * 2009-12-16 2013-04-25 エレクトロニクス アンド テレコミュニケーションズ リサーチ インスチチュート Adaptive video encoding apparatus and method
US10419752B2 (en) 2009-12-16 2019-09-17 Electronics And Telecommunications Research Institute Adaptive image encoding device and method
US10708580B2 (en) 2009-12-16 2020-07-07 Electronics And Telecommunications Research Institute Adaptive image encoding device and method
US11659159B2 (en) 2009-12-16 2023-05-23 Electronics And Telecommunications Research Institute Adaptive image encoding device and method
US11805243B2 (en) 2009-12-16 2023-10-31 Electronics And Telecommunications Research Institute Adaptive image encoding device and method
US11812012B2 (en) 2009-12-16 2023-11-07 Electronics And Telecommunications Research Institute Adaptive image encoding device and method
JP2011151546A (en) * 2010-01-20 2011-08-04 Mega Chips Corp Image encoding device and image converting device
WO2011122659A1 (en) * 2010-03-30 2011-10-06 シャープ株式会社 Encoder apparatus and decoder apparatus
JP2013085252A (en) * 2011-10-12 2013-05-09 Thomson Licensing Method and device for determining saliency value of block of video frame blockwise predictive encoded in data stream
JP2014204208A (en) * 2013-04-02 2014-10-27 日本電信電話株式会社 Prediction mode determination method, dynamic image encoding device, and prediction mode determination program
JP2017500830A (en) * 2013-11-04 2017-01-05 マグナム セミコンダクター, インコーポレイテッド Method and apparatus for multipath adaptive quantization

Also Published As

Publication number Publication date
JP4709187B2 (en) 2011-06-22

Similar Documents

Publication Publication Date Title
US11538198B2 (en) Apparatus and method for coding/decoding image selectively using discrete cosine/sine transform
US8165195B2 (en) Method of and apparatus for video intraprediction encoding/decoding
KR100785589B1 (en) Image encoding apparatus and image decoding apparatus
KR101177031B1 (en) Method and apparatus for minimizing number of reference pictures used for inter-coding
JP4542447B2 (en) Image encoding / decoding device, encoding / decoding program, and encoding / decoding method
KR100716999B1 (en) Method for intra prediction using the symmetry of video, method and apparatus for encoding and decoding video using the same
KR100727969B1 (en) Apparatus for encoding and decoding image, and method theroff, and a recording medium storing program to implement the method
JP4709187B2 (en) ENCODING PARAMETER DETERMINING METHOD, ENCODING PARAMETER DETERMINING DEVICE, ENCODING PARAMETER DETERMINING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM
KR101215614B1 (en) Apparatus for encoding and decoding image, and method theroff, and a recording medium storing program to implement the method
KR100727970B1 (en) Apparatus for encoding and decoding image, and method theroff, and a recording medium storing program to implement the method
JP4519933B2 (en) Moving picture coding apparatus and moving picture coding method
US20070171970A1 (en) Method and apparatus for video encoding/decoding based on orthogonal transform and vector quantization
US20090232211A1 (en) Method and apparatus for encoding/decoding image based on intra prediction
KR20070047522A (en) Method and apparatus for encoding and decoding of video
KR100694093B1 (en) Apparatus for and method of predicting coefficients of video block
US8189673B2 (en) Method of and apparatus for predicting DC coefficient of video data unit
JP4884703B2 (en) Image spatial prediction encoding method, encoding device, decoding method, and decoding device
JP4709074B2 (en) Moving picture encoding method, apparatus, program thereof, and recording medium recording the program
JP2006100871A (en) Coder, coding method, program of coding method, and recording medium with the program recorded thereon
JP4709179B2 (en) Encoding parameter selection method, encoding parameter selection device, encoding parameter selection program, and recording medium therefor
CN112740691A (en) Method and device for encoding and decoding a data stream representing at least one image
US20070064790A1 (en) Apparatus and method for video encoding/decoding and recording medium having recorded thereon program for the method
JP4819856B2 (en) Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090715

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20100331

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101203

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110215

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110315

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110317

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350