JP4819856B2 - Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program - Google Patents
Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program Download PDFInfo
- Publication number
- JP4819856B2 JP4819856B2 JP2008209861A JP2008209861A JP4819856B2 JP 4819856 B2 JP4819856 B2 JP 4819856B2 JP 2008209861 A JP2008209861 A JP 2008209861A JP 2008209861 A JP2008209861 A JP 2008209861A JP 4819856 B2 JP4819856 B2 JP 4819856B2
- Authority
- JP
- Japan
- Prior art keywords
- spatial frequency
- weighted
- calculating
- block
- component
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 99
- 230000035945 sensitivity Effects 0.000 claims description 86
- 230000008569 process Effects 0.000 claims description 68
- 238000013139 quantization Methods 0.000 claims description 51
- 238000004364 calculation method Methods 0.000 claims description 43
- 230000000007 visual effect Effects 0.000 claims description 42
- 230000009466 transformation Effects 0.000 claims description 18
- 239000011159 matrix material Substances 0.000 claims description 15
- 230000002123 temporal effect Effects 0.000 claims description 8
- 230000006835 compression Effects 0.000 claims description 6
- 238000007906 compression Methods 0.000 claims description 6
- 230000006870 function Effects 0.000 description 51
- 238000012545 processing Methods 0.000 description 19
- 238000006243 chemical reaction Methods 0.000 description 11
- 230000007704 transition Effects 0.000 description 10
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 8
- 230000009467 reduction Effects 0.000 description 7
- 238000010606 normalization Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000006073 displacement reaction Methods 0.000 description 4
- 238000002474 experimental method Methods 0.000 description 3
- 239000012491 analyte Substances 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は、予測誤差信号に対して変換符号化および量子化による情報圧縮を行うことで動画像を符号化する動画像符号化方法およびその装置と、その動画像符号化方法の実現に用いられる動画像符号化プログラムおよびそのプログラムを記録したコンピュータ読み取り可能な記録媒体とに関する。 INDUSTRIAL APPLICABILITY The present invention is a moving image coding method and apparatus for coding a moving image by performing information compression by transform coding and quantization on a prediction error signal, and the moving image coding method. The present invention relates to a moving image encoding program 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”.
ここで、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.
ここで、SY ,SU ,SV はそれぞれ原信号のY,U,V成分であり、^SY m,q ,^SU m,q ,^SV m,q はそれぞれ復号信号のY,U,V成分である。また、x0 ,y0 はブロックの中で原点に最も近い位置の座標値である。 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. Further, x 0 and y 0 are coordinate values at positions closest to the origin in the block.
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.
原信号Sに対して、モード番号mの予測方法を用いた場合の予測信号をPm とする。H.264の符号化処理では、モード番号mの予測方法を用いた場合の予測誤差信号Rm (=S−Pm )に対して、変換行列〜Φを用いた直交変換が次式のように施される。なお、以下の表記において、「〜X」(Xは文字)における記号〜は、「X」の上に付く記号を示している。 Let P m be the prediction signal when the prediction method of mode number m is used for the original signal S. H. In the H.264 encoding process, the orthogonal transformation using the transformation matrix to Φ is applied to the prediction error signal R m (= S−P m ) when the prediction method of the mode number m is used as follows: Is done. In the following notation, the symbol “˜X” (where X is a letter) indicates a symbol attached to “X”.
ここで、〜Φt は変換行列〜Φに対する転置行列を表す。なお、変換行列〜Φは次式で表される整数要素の直交行列である。 Here, ~ Φ t represents a transposed matrix for the transformation matrix ~ Φ. Note that the transformation matrix to Φ is an orthogonal matrix of integer elements expressed by the following equation.
次に、行列〜Φが非正規行列であるため、次に示すような行列の正規化に相当する処理を行う。 Next, since the matrices Φ are non-normal matrices, processing corresponding to matrix normalization as shown below is performed.
これは、式(3)において、〜Φの代わりに次式のΦを用いることにあたる。 This is equivalent to using Φ of the following expression instead of ˜Φ in the expression (3).
さらに、Cm に対して、量子化パラメータqを用いた量子化が次式のとおり施される。なお、H.264の参照ソフトウェアJMでは、正規化は量子化の中に組み込まれている。 Further, the quantization using the quantization parameter q is performed on C m as follows. H. In the H.264 reference software JM, normalization is built into quantization.
一方、H.264の復号処理では、Vに対して、次式のように逆量子化を施し、変換係数の復号値^Cm,q を得る。 On the other hand, H. In the H.264 decoding process, V is inversely quantized as in the following equation to obtain a decoded coefficient ^ C m, q of the transform coefficient.
次に、この^Cm,q に対して、次式のように逆変換を施し、予測誤差の復号信号を得る。 Next, inverse transform is applied to this ^ C m, q as shown in the following equation to obtain a prediction error decoded signal.
最後に、次式により、符号化対象画像の復号信号を得る。 Finally, a decoded signal of the encoding target image is obtained by the following equation.
[主観画質を考慮した歪み量への重み付け]
前述の通り、H.264の参照ソフトウェア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.
しかし、こうした視覚特性を利用していない符号化器(例えば、JM)には、符号量の効率的な削減に関して、改良の余地が残る。 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.
そこで、時空間周波数成分に対して視覚感度に差があることを利用する検討がなされている。例えば、変移量に応じて適応的に量子化ステップ幅を設定する検討があげられる(特許文献1参照)。 Therefore, studies have been made to use the difference in visual sensitivity with respect to spatio-temporal frequency components. For example, there is a study of adaptively setting the quantization step width according to the amount of shift (see Patent Document 1).
また、時空間の視覚感度に基づき重み付けされた歪み量を符号化パラメータ選択のコスト関数において用いる検討があげられる(非特許文献2参照)。 Further, there is a study of using a distortion amount weighted on the basis of spatio-temporal visual sensitivity in a cost function for selecting an encoding parameter (see Non-Patent Document 2).
この非特許文献2に記載された方法では、直交変換係数に対して、視覚感度に応じて空間周波数成分毎に歪み量の重み付けを行うことで、主観画質に対応した歪み量を定義する。さらに、時間方向の視覚感度も考慮して、前述の重み付けされた歪み量に対して、変移量に応じてさらに重み付けを行う。こうして時空間の視覚感度に基づき重み付けされた歪み量を符号化パラメータ選択のコスト関数において用いる。
In the method described in
量子化誤差信号に対する視覚感度に基づく重み付けについて、以下、説明する。以下に示す方法(本発明も同様)では、次式のR−Dコストを用いることを想定している。 The weighting based on the visual sensitivity for the quantization error signal will be described below. In the following method (the same applies to the present invention), it is assumed that the RD cost of the following equation is used.
ここで、Cm はモード番号mを用いた場合の予測誤差信号Rm に対する変換係数であり、^Cm,q はCm を量子化パラメータqで量子化・逆量子化して得られる変換係数の復号値である。このR−Dコストの計算に用いる歪み量として、以下の重み付け歪み量を用いる。 Here, C m is a transform coefficient for the prediction error signal R m when the mode number m is used, and ^ C m, q is a transform 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.
ここで、Cm s(i)[k,l](s=Y,U,V)はCm の要素であり、マクロブロック(Y成分の場合には16×16[画素],U,V成分の場合には8×8[画素])内のサブブロック(N×N[画素])のうち、ラスター走査においてi番目に走査されるサブブロックに含まれる変換係数である。また、^Cm,q s(i)[k,l](s=Y,U,V)は^Cm,q の要素であり、マクロブロック(Y成分の場合には16×16[画素],U,V成分の場合には8×8[画素])内のサブブロック(N×N[画素])のうち、ラスター走査においてi番目に走査されるサブブロックに含まれる復号変換係数である。 Here, C m s (i) [k, l] (s = Y, U, V) is an element of C m , and a macroblock (16 × 16 [pixel], U, V in the case of Y component) In the case of components, it is a conversion coefficient included in the i-th sub-block scanned in the raster scanning among the sub-blocks (N × N [pixels]) in 8 × 8 [pixels]). ^ C m, q s (i) [k, l] (s = Y, U, V) is an element of ^ C m, q , and a macroblock (16 × 16 [pixels in the case of Y component) ], U, and V components, the decoding transform coefficients included in the i-th sub-block scanned in the raster scan among the sub-blocks (N × N [pixels]) in 8 × 8 [pixels]). is there.
さらに、Wk,l s (s=Y,U,V)は1以下に設定される重み係数であり、以下では、感度係数と呼ぶ。式(12)において、Wk,l s を小さな値に設定することは、量子化歪み〜D(Cm ,^Cm,q )を小さく見積もることに相当する。 Further, W k, l s (s = Y, U, V) is a weighting coefficient set to 1 or less, and is hereinafter referred to as a sensitivity coefficient. In Expression (12), setting W k, l s to a small value corresponds to estimating the quantization distortion to D (C m , ^ C m, q ) to be small.
なお、直交変換の正規性より、Wk,l s =1(∀k,l;s=Y,U,V)とすれば、前述の重み付け歪み量は二乗誤差和と等価となる。 From the normality of orthogonal transformation, if W k, l s = 1 (∀k, l; s = Y, U, V), the above-described weighted distortion amount is equivalent to the square error sum.
Wk,l s (s=Y,U,V)は空間周波数および時間周波数が高いほど、小さな値をとる。具体的な算出法は非特許文献2で検討されている。
前述のコントラスト感度関数に基づく歪み量への重み付けを行う方法(非特許文献2に記載された方法)では、マクロブロック単位に感度関数による重み付けを行うため、重み付け後の歪み量にブロック境界における不連続性(ブロック歪み)が反映されない。 In the above-described method of weighting the distortion amount based on the contrast sensitivity function (the method described in Non-Patent Document 2), the sensitivity function is weighted in units of macroblocks. Continuity (block distortion) is not reflected.
動き補償によるフレーム間予測と直交変換を組み合わせたブロックベースの符号化方式(例えば、H.264)では、ブロック歪みは特徴的な符号化歪みである。このため、ブロック歪みが考慮されていない場合、得られた重み付き歪み量が主観画質を正しく反映できないケースが発生する。 In a block-based coding scheme (for example, H.264) that combines inter-frame prediction based on motion compensation and orthogonal transform, block distortion is a characteristic coding distortion. For this reason, when the block distortion is not taken into consideration, a case where the obtained weighted distortion amount cannot correctly reflect the subjective image quality occurs.
本発明はかかる事情に鑑みてなされたものであって、動き補償によるフレーム間予測と直交変換を組み合わせたブロックベースの符号化方式(例えば、H.264)に対して、ブロック歪みを含む主観画質を適切に評価した符号化歪みの尺度を導入することを実現することで、符号化パラメータの選択に用いるコスト関数として、ブロック歪みを含む主観画質を反映したものを実現できるようにする新たな動画像符号化技術の提供を目的とする。 The present invention has been made in view of the above circumstances, and has a subjective image quality including block distortion as compared with a block-based encoding method (for example, H.264) that combines inter-frame prediction based on motion compensation and orthogonal transform. By introducing a measure of coding distortion that appropriately evaluates the video, a new video that enables the implementation of a cost function used to select coding parameters that reflects subjective image quality including block distortion An object is to provide an image encoding technique.
非特許文献2に記載された従来法の符号化歪み尺度においてブロック歪みが反映されなかった原因を、以下に考察する。
The reason why the block distortion is not reflected in the coding distortion scale of the conventional method described in Non-Patent
従来法では、各マクロブロックのDCT係数に対して、コントラスト感度関数に基づき重み付けを行っていた。このため、各マクロブロック内の波形に対するコントラスト感度は反映していたが、隣接ブロック間の不連続性については考慮されていなかった。 In the conventional method, the DCT coefficient of each macroblock is weighted based on the contrast sensitivity function. For this reason, the contrast sensitivity with respect to the waveform in each macroblock was reflected, but the discontinuity between adjacent blocks was not considered.
図10に示す1次元信号を例に取ると、各ブロック(ブロックk−1,ブロックk,ブロックk+1)のDCT係数に対して重み付けを行うブロックに閉じた処理では、ブロック間の不連続性(ブロックk−1とブロックkの間の不連続性、あるいは、ブロックkとブロックk+1の間の不連続性)は知り得ない。 Taking the one-dimensional signal shown in FIG. 10 as an example, in a process closed to blocks that weight the DCT coefficients of each block (block k-1, block k, block k + 1), discontinuity between blocks ( The discontinuity between block k-1 and block k, or the discontinuity between block k and block k + 1) is not known.
そこで、本発明では、ブロック内の波形とあわせて、隣接ブロック間の不連続性も考慮した周波数分析を行い、コントラスト感度関数に基づき歪み量に対する重み付けを行うようにする。 Therefore, in the present invention, frequency analysis is performed in consideration of discontinuity between adjacent blocks together with the waveform in the block, and the distortion amount is weighted based on the contrast sensitivity function.
[感度係数の算出]
本発明では、各ブロック内の歪み量に対して、時空間視覚感度関数に基づく重み付けを行う。この重み付けの係数の算出において、入力となるのは変換係数と変移量(動きベクトルのような画像信号の時間的な動きを示すもの)である。ここで、イントラ予測を行うフレームについても、フレーム間における画像信号の時間的な動きを求めることで変移量を求めることができる。
[Calculation of sensitivity coefficient]
In the present invention, the distortion amount in each block is weighted based on the spatiotemporal visual sensitivity function. In the calculation of the weighting coefficient, input is a conversion coefficient and a shift amount (indicating temporal movement of an image signal such as a motion vector). Here, also for a frame for which intra prediction is performed, a shift amount can be obtained by obtaining temporal movement of an image signal between frames.
なお、以下では、縦幅Hの画像を視距離rHにおいて観測する場合を考える。rを視距離パラメータと呼ぶ。また、以下では、表現を簡略化するために、Y,U,Vの区別を表す添え字を省略し、Y成分について議論する。なお、U,V成分についても以下と同様に議論できる。 In the following, a case where an image having a vertical width H is observed at a viewing distance rH is considered. r is called a viewing distance parameter. Also, in the following, in order to simplify the expression, the subscript indicating the distinction between Y, U, and V is omitted, and the Y component will be discussed. The U and V components can be discussed in the same manner as described below.
直交変換による2次元信号の変換とは、その直交変換の基底画像を用いて信号を表現することである。変換行列Φ(N×N行列)の第k列ベクトル(N次元ベクトル)をφk とすると、同行列に対する基底画像は、
fk,l (x,y)=φk [y]φl [x]t (0≦x,y≦N−1)
という式より得られる。なお、H.264の場合、Nとして取りうる値は4または8のいずれかである。ここで、φl t はφl の転置ベクトルである。
The transformation of a two-dimensional signal by orthogonal transformation is to express a signal using a base image of the orthogonal transformation. When the k-th column vector (N-dimensional vector) of the transformation matrix Φ (N × N matrix) is φ k , the base image for the matrix is
f k, l (x, y) = φ k [y] φ l [x] t (0 ≦ x, y ≦ N−1)
It can be obtained from the formula H. In the case of H.264, the possible value for N is either 4 or 8. Here, φ l t is a transposed vector of φ l .
N×N[画素]の領域における予測誤差信号Rm [x,y](Nix ≦x≦Nix +N−1,Niy ≦y≦Niy +N−1)をRm (ix,iy) と略記し、以降、基準ブロックと呼ぶ。ここで、ix,iy は、基準ブロックの位置を指し示す整数値である。さらに、対応する直交変換係数をCm (ix,iy) [k,l](0≦k,l≦N−1)とすると、同予測誤差信号Rm (ix,iy) は次式のように表せる。 Predictive error signal R m [x, y] (Ni x ≦ x ≦ Ni x + N−1, Ni y ≦ y ≦ Ni y + N−1) in the region of N × N [pixel] is expressed as R m (ix, iy). And abbreviated as “reference block” hereinafter. Here, i x and i y are integer values indicating the position of the reference block. Further, assuming that the corresponding orthogonal transform coefficient is C m (ix, iy) [k, l] (0 ≦ k, l ≦ N−1), the prediction error signal R m (ix, iy) is given by It can be expressed as
Mx ×My 個の基準ブロック(Rm (ix,iy) )から構成されるMx N×My N画素を含む予測誤差信号Rm [x,y](Nix0≦x≦N(ix0+Mx )−1,Niy0≦y≦N(iy0+My )−1)(分析対象ブロックと呼ぶ)に対して、ブロック歪みを考慮した主観画質を考察する。 M x × M y-number of reference block (R m (ix, iy) ) composed of M x N × M y prediction including N pixel error signal R m [x, y] ( Ni x0 ≦ x ≦ N ( For i x0 + M x ) −1, Ni y0 ≦ y ≦ N (i y0 + M y ) −1) (referred to as an analysis target block), the subjective image quality considering block distortion is considered.
ここで、この分析対象ブロックはMx ×My 個の基準ブロックから構成されるものであることから、この分析対象ブロックをフーリエ変換すると、基準ブロック内のみならず隣接する基準ブロック間の不連続性(ブロック歪み)についても評価できるようになる。 Here, since the analyzed block is intended to be composed of M x × M y-number of reference blocks, when Fourier transform the analyte block, discontinuity between adjacent reference blocks not only the reference block It becomes possible to evaluate the property (block distortion).
分析対象ブロックと各基準ブロックとの関係を表すためには、次式に示すように、Rm (ix,iy) に対して、ゼロ埋め込みにより、Mx N×My N画素の信号を得る。 To represent the relationship between the analyzed block and the reference block, as shown in the following formula, R m (ix, iy) with respect to, the zero padded, obtaining a signal of M x N × M y N pixels .
同様に、次式に示すように、各基底画像fk,l (x,y)(0≦x,y≦N−1)に対して、ゼロ埋め込みにより、Mx N×My N画素の信号を得る。 Similarly, as shown in the following equation, the base image f k, with respect to l (x, y) (0 ≦ x, y ≦ N-1), the zero padded, the M x N × M y N pixels Get a signal.
ゼロ埋め込みの結果得られる〜fk,l (p) (x,y)(x=0,....,Mx N−1;y=0,....,My N−1;p=0,....,Mx My −1)を修正基底画像と呼ぶ。例えば、N=4,Mx =2,My =2の場合には、図1に示すように、網掛け部の4×4画素に基底画像が配置され、それ以外の位置にゼロ値がパディングされる。 Zero padding the resulting ~f k, l (p) ( x, y) (x = 0, ...., M x N-1; y = 0, ...., M y N-1; p = 0, ...., referred to as a M x M y -1) a modified base image. For example, in the case of N = 4, M x = 2 , M y = 2 , as shown in FIG. 1, is arranged the base image in 4 × 4 pixels shaded portion, are the zero value to the other position Padded.
ここで、図1(a)はix =ix0+1,iy =iy0に対応し、図1(b)はix =ix0,iy =iy0に対応し、図1(c)はix =ix0+1,iy =iy0+1に対応し、図1(d)はix =ix0,iy =iy0+1に対応する。 Here, FIG. 1A corresponds to i x = i x0 +1, i y = i y0 , and FIG. 1B corresponds to i x = i x0 , i y = i y0 , and FIG. ) Corresponds to i x = i x0 +1, i y = i y0 +1, and FIG. 1D corresponds to i x = i x0 , i y = i y0 +1.
このとき、分析対象ブロックは修正基底画像を用いて次式のように表せる。 At this time, the analysis target block can be expressed as follows using the corrected base image.
この式(16)の両辺のフーリエ変換(F[・]で表記)は、フーリエ変換の線形性により、次式のように表せる。 The Fourier transform (represented by F [•]) on both sides of the equation (16) can be expressed as the following equation due to the linearity of the Fourier transform.
ここで、この式(17)は、分析対象ブロックをフーリエ変換することで得られるフーリエ変換係数(基準ブロック内の周波数成分のみならず隣接する基準ブロック間の不連続性に起因する周波数成分)は、修正基底画像をフーリエ変換することで得られるフーリエ変換係数の線形和で表されるということを意味している。 Here, this equation (17) is obtained by applying a Fourier transform coefficient (frequency component due to discontinuity between adjacent reference blocks as well as frequency components in the reference block) obtained by performing Fourier transform on the analysis target block. This means that the corrected base image is represented by a linear sum of Fourier transform coefficients obtained by performing Fourier transform.
F[〜fk,l (ix,iy) ]は、Mx N×My N次元の複素数ベクトルであり、その第(ux,uy )要素は次式のように表されるフーリエ変換係数である。なお、以下では、N=2m とおく。 F [~f k, l (ix , iy)] is a complex vector of M x N × M y N-dimensional, the first (u x, u y) elements Fourier transform is expressed by the following equation It is a coefficient. In the following, it is assumed that N = 2 m .
ここで、jは虚数単位である。また、ux,uy を空間周波数インデックスと呼ぶ。 Here, j is an imaginary unit. U x and u y are referred to as spatial frequency indexes.
このようにして、フーリエ変換の対象をfk,l (x,y)ではなく、〜fk,l (x,y)とすることで、ブロックの不連続性に起因する周波数成分も考慮した周波数分析を行うことが可能となる。 In this way, the frequency component due to the discontinuity of the block is also taken into account by setting the target of the Fourier transform to ˜f k, l (x, y) instead of f k, l (x, y). Frequency analysis can be performed.
上記のフーリエ変換係数Fk,l (ux,uy )(0≦ux ≦Mx N−1,0≦uy ≦My N−1)に対して、以下の重み付けを行う。なお、(dx,dy )は、分析対象ブロックに対して推定された変移量とする。 Fourier transform coefficients of the F k, relative to l (u x, u y) (0 ≦ u x ≦ M x N-1,0 ≦ u y ≦ M y N-1), performs the weighting of the following. Note that (d x, dy ) is a transition amount estimated for the analysis target block.
以下、〜Fk,l (ux,uy )について説明する。ここで、^g(η,d)はコントラスト感度などの視覚系の特性に基づき設定される関数であり、視覚感度関数と呼ぶ。視覚感度関数の設定については、例えば、後述の[視覚感度関数の設定1]あるいは[視覚感度関数の設定2]に示す方法がある。 Hereinafter, ~ F k, l (ux , u y ) will be described. Here, {circumflex over (g)} (η, d) is a function set based on visual system characteristics such as contrast sensitivity, and is called a visual sensitivity function. As for the setting of the visual sensitivity function, for example, there is a method shown in [Visual sensitivity function setting 1] or [Visual sensitivity function setting 2] described later.
予測誤差信号Rm の(k,l)基底の成分に対する感度係数Wk,l s (dx,dy )を、次式の電力比として定義する。 The sensitivity coefficient W k, l s (d x, d y ) for the (k, l) basis component of the prediction error signal R m is defined as the power ratio of the following equation.
このとき、輝度成分と色差成分でモデルパラメータを変更することも可能である。 At this time, it is also possible to change the model parameter with the luminance component and the color difference component.
式(20)の意味するところについて説明するならば、分析対象ブロックはMx ×My 個の基準ブロックから構成されるものであることから、分析対象ブロックをフーリエ変換すると、ブロック内のみならず隣接ブロック間の不連続性についても評価できるようになる。一方、式(17)に示すように、分析対象ブロックをフーリエ変換するということは、修正基底画像をフーリエ変換することで得られるフーリエ変換係数の線形和(直交変換係数を係数とする線形和)を算出することと等価である。 If explained the meaning of the formula (20), since the analyzed block is intended to be composed of M x × M y-number of reference blocks, if the analyte block Fourier transform, not only in the block It also becomes possible to evaluate discontinuity between adjacent blocks. On the other hand, as shown in Expression (17), Fourier transform of the analysis target block means that a linear sum of Fourier transform coefficients obtained by Fourier transform of the corrected base image (linear sum using orthogonal transform coefficients as coefficients). Is equivalent to calculating.
そこで、本発明では、ブロック内のみならず隣接ブロック間の不連続性についても評価できるようにするために、式(17)の右辺の{・}の中に記載される部分の二乗和(式(20)の分母に相当するもの)を算出するようにするとともに、式(19)で重み付けされたそれに対応する二乗和(式(20)の分子に相当するもの)を算出するようにして、その比値である式(20)に従って、予測誤差信号Rm の(k,l)基底の成分に対する感度係数Wk,l s (dx,dy )を算出するようにするのである。 Therefore, in the present invention, in order to be able to evaluate not only the block but also the discontinuity between adjacent blocks, the sum of squares of the part described in {•} on the right side of the equation (17) (formula (Corresponding to the denominator of (20)) and calculating the sum of squares corresponding to the weight weighted by equation (19) (corresponding to the numerator of equation (20)), The sensitivity coefficient W k, l s (d x, d y ) for the (k, l) basis component of the prediction error signal R m is calculated according to the ratio (20).
ちなみに、式(20)の分母の算出値をk,lについて総和をとったものは、式(16)の二乗和に相当し、これから、式(20)の分母は予測誤差信号の電力に相当するものとなる。 Incidentally, the sum of the calculated values of the denominator of Equation (20) with respect to k and l corresponds to the sum of squares of Equation (16), and from this, the denominator of Equation (20) corresponds to the power of the prediction error signal. To be.
このようにして決定される感度係数Wk,l s (dx,dy )は、空間周波数および時間周波数に応じた値を示すものであることから、主観画質に対応した歪み量を定義することができるようになる。しかも、ブロック内の波形とあわせて、隣接ブロック間の不連続性も考慮した周波数分析を行うことで決定されることから、ブロック歪みを含む主観画質に対応した歪み量を定義することができるようになる。 Since the sensitivity coefficient W k, l s (d x, dy ) determined in this way indicates a value corresponding to the spatial frequency and the temporal frequency, the amount of distortion corresponding to the subjective image quality is defined. Will be able to. Moreover, since it is determined by performing a frequency analysis taking into account the discontinuity between adjacent blocks together with the waveform in the block, it is possible to define a distortion amount corresponding to subjective image quality including block distortion. become.
すなわち、視覚的に検知されにくい時空間周波数成分の歪み量については、感度係数Wk,l s (dx,dy )の値が相対的に小さなものとなることで相対的に小さな値として評価し、一方、視覚的に検知されやすい時空間周波数成分の歪み量については、感度係数Wk,l s (dx,dy )の値が相対的に大きなものとなることで相対的に大きな値として評価することから、主観画質に対応した歪み量を定義することができるようになるのである。しかも、この感度係数Wk,l s (dx,dy )の値がブロック内の波形とあわせて、隣接ブロック間の不連続性も考慮した周波数分析を行うことで決定されることから、ブロック歪みを含む主観画質に対応した歪み量を定義することができるようになるのである。 That is, the distortion amount of the spatio-temporal frequency component that is difficult to detect visually is set to a relatively small value because the sensitivity coefficient W k, l s (d x, dy ) is relatively small. On the other hand, the distortion amount of the spatio-temporal frequency component that is easy to detect visually is relatively high because the value of the sensitivity coefficient W k, l s (d x, dy ) becomes relatively large. Since the evaluation is performed as a large value, the distortion amount corresponding to the subjective image quality can be defined. Moreover, since the value of the sensitivity coefficient W k, l s (d x, dy ) is determined by performing frequency analysis in consideration of discontinuity between adjacent blocks together with the waveform in the block, The distortion amount corresponding to the subjective image quality including the block distortion can be defined.
次に、視覚感度関数の設定方法の一例である[視覚感度関数の設定1]および[視覚感度関数の設定2]について説明する。 Next, [visual sensitivity function setting 1] and [visual sensitivity function setting 2], which are examples of the visual sensitivity function setting method, will be described.
[視覚感度関数の設定1]
次式のようなコントラスト感度関数を考える。
[Visual Sensitivity Function Setting 1]
Consider a contrast sensitivity function such as:
ここで、a1,a2,a3,a4 は視覚感度関数の関数形を定めるパラメータ(以後、モデルパラメータと呼ぶ)であり、例えば、
(a1,a2,a3,a4 )=( 6.1 , 7.31 , 2 , 45.9 )
というような値が用いられる。
Here, a 1 , a 2 , a 3 , and a 4 are parameters (hereinafter referred to as model parameters) that define the function form of the visual sensitivity function.
(A 1, a 2, a 3, a 4) = (6.1, 7.31, 2, 45.9)
Such a value is used.
また、ηは単位視野角内の明暗対の個数を表す空間周波数[cycle/degree]である。ここで、ηは一次元の空間周波数であることに注意する。 Also, η is a spatial frequency [cycle / degree] representing the number of light-dark pairs within the unit viewing angle. Note that η is a one-dimensional spatial frequency.
このとき、ηと空間周波数インデックス(ux またはuy のいずれか)との間には、
η(u,r)=θ(r,H)u/2MN ・・・ 式(22)
の関係がある。
At this time, between η and the spatial frequency index (either u x or u y ),
η (u, r) = θ (r, H) u / 2MN Equation (22)
There is a relationship.
ここで、u=ux の場合、M=Mx であり、u=uy の場合、M=My である。また、θ(r,H)は縦幅Hの画像を視距離rHにおいて観測する場合の一画素あたりの角度[degrees/pixel] であり、
θ(r,H)=(1/H)×arctan(1/r)×(180/π)
・・・ 式(23)
という式により与えられる。
In the case of u = u x, a M = M x, the case of u = u y, is M = M y. Θ (r, H) is an angle [degrees / pixel] per pixel when an image having a vertical width H is observed at a viewing distance rH.
θ (r, H) = (1 / H) × arctan (1 / r) × (180 / π)
... Formula (23)
Is given by the expression
ωは単位時間当たりの角度の変化量[degrees/sec] である。このとき、ωと変移量d(dx またはdy のいずれか)との間には、
ω(d)=tan-1(fr d/rH) ・・・ 式(24)
の関係がある。ここで、fr はフレームレートである。
ω is the angle change per unit time [degrees / sec]. At this time, between the ω the displacement amount d (either d x or d y) is
ω (d) = tan -1 ( f r d / rH) ··· formula (24)
There is a relationship. Here, fr is a frame rate.
式(22)および式(24)を式(21)に代入し、コントラスト感度関数g(η,ω)をu,dの関数として表した次式の^g(u,d)
^g(u,d)=g(η(u),ω(d)) ・・・ 式(25)
を視覚感度関数とする。
By substituting Equation (22) and Equation (24) into Equation (21) and expressing the contrast sensitivity function g (η, ω) as a function of u and d, ^ g (u, d)
^ G (u, d) = g (η (u), ω (d)) Equation (25)
Is a visual sensitivity function.
[視覚感度関数の設定2]
次のようなコントラスト感度関数を考える。
[Visual sensitivity function setting 2]
Consider the following contrast sensitivity function.
ここで、b1,b2,b3,b4 は視覚感度関数の関数形を定めるパラメータ(以後、モデルパラメータと呼ぶ)であり、例えば、
(b1,b2,b3,b4 )= ( 0.4992 , 0.2964 , -0.114 , 1.1 )
(b1,b2,b3,b4 )= ( 0.2 , 0.45 , -0.18 , 1 )
(b1,b2,b3,b4 )= ( 0.31 , 0.69 , -0.29 , 1 )
(b1,b2,b3,b4 )= ( 0.246 , 0.615 , -0.25 , 1 )
というような値をとる。
Here, b 1 , b 2 , b 3 , and b 4 are parameters (hereinafter referred to as model parameters) that define the function form of the visual sensitivity function.
(B 1, b 2, b 3, b 4) = (0.4992, 0.2964, -0.114, 1.1)
(B 1, b 2, b 3, b 4) = (0.2, 0.45, -0.18, 1)
(B 1, b 2, b 3, b 4) = (0.31, 0.69, -0.29, 1)
(B 1, b 2, b 3, b 4) = (0.246, 0.615, -0.25, 1)
It takes such a value.
また、ηは単位視野角内の明暗対の個数を表す空間周波数[cycle/degree]である。ここで、ηは一次元の空間周波数であることに注意する。 Also, η is a spatial frequency [cycle / degree] representing the number of light-dark pairs within the unit viewing angle. Note that η is a one-dimensional spatial frequency.
このとき、ηと空間周波数インデックス(ux またはuy のいずれか)との間には、
η(u,r)=θ(r,H)u/2MN ・・・ 式(27)
の関係がある。
At this time, between η and the spatial frequency index (either u x or u y ),
η (u, r) = θ (r, H) u / 2MN Equation (27)
There is a relationship.
ここで、u=ux の場合、M=Mx であり、u=uy の場合、M=My である。また、θ(r,H)は縦幅Hの画像を視距離rHにおいて観測する場合の一画素あたりの角度[degrees/pixel] であり、
θ(r,H)=(1/H)×arctan(1/r)×(180/π)
・・・ 式(28)
という式により与えられる。
In the case of u = u x, a M = M x, the case of u = u y, is M = M y. Θ (r, H) is an angle [degrees / pixel] per pixel when an image having a vertical width H is observed at a viewing distance rH.
θ (r, H) = (1 / H) × arctan (1 / r) × (180 / π)
... Formula (28)
Is given by the expression
また、rは変移量dの大きさに応じて適応的に変化させるものとする。例えば、次式のような設定法である。ここで、Aは閾値であり、r1 >r2 とする。 Further, r is adaptively changed according to the magnitude of the shift amount d. For example, the setting method is as follows. Here, A is a threshold value, and r 1 > r 2 .
式(27)および式(28)を式(26)に代入し、コントラスト感度関数g(η)をu,dの関数として表した次式の^g(u,d)
^g(u,d)=g(η(u,r(d)) ・・・ 式(30)
を視覚感度関数とする。
By substituting Equation (27) and Equation (28) into Equation (26) and expressing the contrast sensitivity function g (η) as a function of u and d, ^ g (u, d)
^ G (u, d) = g (η (u, r (d)) (30)
Is a visual sensitivity function.
以上に説明した構成に従って、本発明によれば、ブロック歪みを含む主観画質を適切に評価した符号化歪みの尺度を導入することができるようになり、これにより、符号化パラメータの選択に用いるコスト関数として、ブロック歪みを含む主観画質を反映したものを実現できるようになることで、高能率の符号化を実現できるようになるとともに、符号量の削減を実現できるようになる。 In accordance with the configuration described above, according to the present invention, it is possible to introduce a measure of coding distortion that appropriately evaluates subjective image quality including block distortion, thereby reducing the cost used to select coding parameters. By realizing a function that reflects subjective image quality including block distortion as a function, it is possible to realize highly efficient coding and to reduce the amount of codes.
次に、本発明により構成される動画像符号化装置の構成について説明する。 Next, the configuration of the moving picture coding apparatus constructed according to the present invention will be described.
本発明の動画像符号化装置は、画像信号、あるいは、フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行うことで動画像を符号化する構成を採るときに、(イ)変換行列の対象となる複数のブロックで構成される分析対象ブロックに対応付けて定義されて、1つのブロックに変換行列の基底画像が配置され、他のブロックにゼロ値が埋め込まれることで構成されるブロックの数分の修正基底画像について算出された空間周波数成分を記憶する記憶手段と、(ロ)分析対象ブロックの画像信号の時間的な動きを示す変移量を推定する推定手段と、(ハ)記憶手段から修正基底画像の空間周波数成分を読み出して、その空間周波数成分の空間周波数インデックスと推定手段の推定した変移量とに基づいて、その空間周波数成分に割り当てられる視覚感度値を算出して、その空間周波数成分を重み付けする重み付け手段と、(ニ)重み付け手段の重み付けをした空間周波数成分と、その重み付けをしない空間周波数成分と、分析対象ブロックを構成するブロックの変換係数とに基づいて、予測誤差信号の各基底成分についての重要度を算出する算出手段と、(ホ)算出手段の算出した重要度を用いて重み付けされた符号化の歪み量を用いて符号化コストを評価することで、符号化パラメータを決定する決定手段とを備え、(ヘ)前記算出手段は、変換係数の二乗和と重み付けをした空間周波数成分の二乗ノルム和との乗算値と、変換係数の二乗和と重み付けをしない空間周波数成分の二乗ノルム和との乗算値とを求めて、その2つの乗算値の割り算値に従って重要度を算出するように構成する。 The moving image encoding apparatus of the present invention encodes a moving image by performing information compression by transform encoding and quantization on an image signal or a prediction error signal obtained by intra-frame prediction and inter-frame prediction. (A) is defined in association with an analysis target block composed of a plurality of blocks to be converted matrix, and a base image of the conversion matrix is arranged in one block, Storage means for storing spatial frequency components calculated for the number of corrected base images corresponding to the number of blocks configured by embedding zero values in the block, and (b) showing temporal movement of the image signal of the analysis target block (C) reading out the spatial frequency component of the modified base image from the storage means, and estimating the spatial frequency index of the spatial frequency component and the estimation means The visual sensitivity value assigned to the spatial frequency component is calculated based on the determined shift amount, the weighting means for weighting the spatial frequency component, (d) the spatial frequency component weighted by the weighting means, A calculation means for calculating the importance of each base component of the prediction error signal based on the spatial frequency component without weighting and the transform coefficient of the block constituting the analysis target block; and (e) the importance calculated by the calculation means Determining means for determining an encoding parameter by evaluating an encoding cost using an amount of encoding distortion weighted using a degree , and (f) the calculating means includes a square sum of transform coefficients, Find the product of the squared norm sum of the weighted spatial frequency components and the product of the square sum of the transform coefficients and the squared norm sum of the unweighted spatial frequency components. , Configured to calculate the importance according quotient of the two multiplied values.
ここで、修正基底画像について算出された空間周波数成分を記憶する記憶手段を備えるようにするのは、修正基底画像の空間周波数成分が符号化対象の画像とは関係なく求めることができることで、その都度算出することが不要であるからである。 Here, the storage means for storing the spatial frequency component calculated for the corrected base image is provided because the spatial frequency component of the corrected base image can be obtained regardless of the image to be encoded. This is because it is not necessary to calculate each time.
この構成を採るときに、重み付け手段は、水平方向の空間周波数インデックスと推定手段の推定した変移量の水平成分とに基づいて水平方向の視覚感度値を算出するとともに、垂直方向の空間周波数インデックスと推定手段の推定した変移量の垂直成分とに基づいて垂直方向の視覚感度値を算出することで、記憶手段から読み出した修正基底画像の空間周波数成分に割り当てられる視覚感度値を算出することがある。 When adopting this configuration, the weighting means calculates the visual sensitivity value in the horizontal direction based on the horizontal spatial frequency index and the horizontal component of the displacement estimated by the estimating means, and the vertical spatial frequency index and The visual sensitivity value assigned to the spatial frequency component of the corrected base image read from the storage means may be calculated by calculating the visual sensitivity value in the vertical direction based on the vertical component of the shift amount estimated by the estimation means. .
このように、空間周波数成分および動きの方向依存性を考慮するのは、時空間領域における視覚系の検知機構が空間的エッジ方向および動きの方向に依存するためである。例えば、縦縞が移動する場合、動きとして認識できるのは、動きの水平方向成分のみとなる。つまり、時空間周波数に対する視覚感度を評価する際は、空間周波数成分のエッジ方向および変移方向を考慮する必要がある。このことを考慮して、重み付け手段は、空間周波数成分および動きの方向依存性を考慮する形で視覚感度値を算出することがある。 The reason why the spatial frequency component and the direction dependency of the motion are considered in this way is because the detection mechanism of the visual system in the spatio-temporal region depends on the spatial edge direction and the direction of motion. For example, when the vertical stripe moves, only the horizontal component of the movement can be recognized as the movement. That is, when evaluating the visual sensitivity with respect to the spatio-temporal frequency, it is necessary to consider the edge direction and the transition direction of the spatial frequency component. In consideration of this, the weighting means may calculate the visual sensitivity value in consideration of the spatial frequency component and the direction dependency of motion.
以上の各処理手段が動作することで実現される本発明の動画像符号化方法はコンピュータプログラムでも実現できるものであり、このコンピュータプログラムは、適当なコンピュータ読み取り可能な記録媒体に記録して提供されたり、ネットワークを介して提供され、本発明を実施する際にインストールされてCPUなどの制御手段上で動作することにより本発明を実現することになる。 The moving image encoding 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 a suitable 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.
このようにして、本発明では、画像信号、あるいは、フレーム内予測およびフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行うことで動画像を符号化する動画像符号化において、歪み量、符号量、未定乗数からなるラグランジェのコスト関数に基づいて、動画像符号化における動き補償ブロックサイズ・インター予測モード・量子化パラメータや、静止画像符号化におけるイントラ予測モード・量子化パラメータなどの符号化パラメータを決定する際に、ブロック内の空間周波数成分および隣接ブロック間の不連続性に関する空間周波数成分を測定し、さらに、得られた空間周波数成分と動き推定により得られた動きベクトルとに基づいて時間周波数成分を推定して、時空間周波数の成分毎に、視覚感度関数に基づき重要度を算出し、その重要度に基づき、周波数毎に重み付けされた二乗誤差として得られる歪み量を用いて符号量との加重和としてコスト関数を設定し、そのコスト関数を最小化するモードを選択することにより符号化パラメータを選択するようにする。 Thus, in the present invention, a moving image is encoded by performing information compression by transform coding and quantization on an image signal or a prediction error signal obtained by intra-frame prediction and inter-frame prediction. In moving picture coding, based on Lagrangian cost functions consisting of distortion, coding quantity, and undetermined multiplier, motion compensation block size, inter prediction mode, quantization parameter in moving picture coding, and still picture coding When determining coding parameters such as intra prediction mode and quantization parameter, the spatial frequency component in the block and the spatial frequency component related to discontinuity between adjacent blocks are measured, and the obtained spatial frequency component and motion are also measured. Estimate temporal frequency components based on the motion vector obtained by estimation, and The cost function is calculated based on the visual sensitivity function, and the cost function is set as a weighted sum with the code amount using the distortion amount obtained as a square error weighted for each frequency based on the importance. The encoding parameter is selected by selecting a mode that minimizes.
本発明では、動き補償によるフレーム間予測と直交変換を組み合わせたブロックベースの符号化方式に対して、空間周波数成分の方向および変移量の方向を考慮することにより時空間周波数を推定して、ブロック歪みを含む主観画質を適切に評価した符号化歪みの尺度を導入する。 In the present invention, for a block-based coding scheme that combines inter-frame prediction by motion compensation and orthogonal transform, the spatio-temporal frequency is estimated by considering the direction of the spatial frequency component and the direction of the shift amount, We introduce a measure of coding distortion that appropriately evaluates subjective image quality including distortion.
これにより、本発明によれば、符号化パラメータの選択に用いるコスト関数として、ブロック歪みを含む主観画質を反映したものを実現できるようになることで、高能率の符号化を実現できるようになるとともに、符号量の削減を実現できるようになる。 As a result, according to the present invention, it is possible to realize a cost function used for selecting an encoding parameter that reflects subjective image quality including block distortion, thereby realizing highly efficient encoding. At the same time, the amount of code can be reduced.
以下、実施の形態に従って本発明を詳細に説明する。 Hereinafter, the present invention will be described in detail according to embodiments.
図2に、本発明の適用される動画像符号化装置1の装置構成を図示する。
FIG. 2 illustrates a device configuration of a moving
本発明の適用される動画像符号化装置1は、H.264に従って動画像を符号化する処理を行うものであり、この図に示すように、符号化に用いる符号化パラメータを選択する符号化パラメータ選択部10と、符号化パラメータ選択部10の選択した符号化パラメータを使って動画像の符号化を実行する符号化部11とを備える。
The moving
図3〜図5に、符号化パラメータ選択部10が本発明を実現すべく実行するフローチャートの一例を図示する。ここで、このフローチャートでは、符号化パラメータ選択部10が符号化パラメータとして最適な予測モードを選択することを想定している。
3 to 5 show examples of flowcharts executed by the encoding
符号化パラメータ選択部10は、本発明に従って符号化に用いる最適な予測モードを選択する場合には、図3のフローチャートに示すように、まず最初に、ステップS101で、予測モードの初期値(初期値となる予測モード)を設定する。
When selecting the optimal prediction mode used for encoding according to the present invention, the encoding
続いて、ステップS102で、最小コストを格納するレジスタ(以下、最小コストレジスタと称することがある)に対して大きな値を示す初期コストを格納するとともに、最適な予測モードを格納するレジスタ(以下、最適モードレジスタと称することがある)に対して意味のない値を格納することで、これらのレジスタを初期化する。 Subsequently, in step S102, an initial cost indicating a large value is stored in a register for storing a minimum cost (hereinafter also referred to as a minimum cost register), and a register for storing an optimal prediction mode (hereinafter, referred to as a minimum cost register). These registers are initialized by storing meaningless values for (sometimes referred to as optimal mode registers).
続いて、ステップS103で、変移量(前述した(dx,dy ))を推定し、各候補ベクトルの予測誤差をテーブルに格納する。この変移量の推定方法については、外部より与えられるものとする。例えば、H.264の参照ソフトウェアJMが算出する動きベクトルを、以下で使用する変移量の推定値として用いることも可能である。 Subsequently, in step S103, the shift amount ((d x, d y ) described above) is estimated, and the prediction error of each candidate vector is stored in a table. The method for estimating the amount of displacement is 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.
続いて、ステップS104で、設定されている処理対象の予測モード、その予測モードによる予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、その予測モードを用いて符号化する場合の符号量を算出する。具体的な算出方法は、H.264の参照ソフトウェアJMの方法に従う。 Subsequently, in step S104, the set prediction mode of the processing target, the prediction vector based on the prediction mode, the quantization parameter, the encoding target frame signal, and the reference frame signal are input, and encoding is performed using the prediction mode. The code amount in the case is calculated. The specific calculation method is as follows. According to the H.264 reference software JM method.
続いて、ステップS105で、最初に、ステップS103で推定した変移量に基づいて時空間視覚感度を考慮した重みを決定し、次に、設定されている処理対象の予測モード、その予測モードによる予測ベクトル、量子化パラメータ、符号化対象フレーム信号、参照フレーム信号を入力として、それらの入力信号とその決定した重みとに基づいて、その予測モードを用いて符号化する場合の重み付き歪み量を算出する。具体的な算出方法については、図4および図5のフローチャートで説明する。 Subsequently, in step S105, first, a weight considering the spatiotemporal visual sensitivity is determined based on the amount of transition estimated in step S103, and then, the prediction mode to be processed and the prediction based on the prediction mode are determined. Calculates the weighted distortion amount when encoding using the prediction mode based on the input signal and the determined weight based on the vector, quantization parameter, encoding target frame signal, and reference frame signal. To do. A specific calculation method will be described with reference to the flowcharts of FIGS.
続いて、ステップS106で、設定されている処理対象の予測モード、量子化パラメータを入力として、その予測モードを用いて符号化する場合の未定乗数を算出する。 Subsequently, in step S106, the prediction mode to be processed and the quantization parameter that have been set are input, and an undetermined multiplier for encoding using the prediction mode is calculated.
続いて、ステップS107で、ステップS104で算出した符号量と、ステップS105で算出した重み付き歪み量と、ステップS106で算出した未定乗数とに基づいて、式(11)で示されるR−Dコストを算出する。 Subsequently, in step S107, based on the code amount calculated in step S104, the weighted distortion amount calculated in step S105, and the undetermined multiplier calculated in step S106, the RD cost represented by Expression (11) is used. Is calculated.
続いて、ステップS108で、算出したR−Dコストと最小コストレジスタに格納されているコストとを比較して、算出したR−Dコストの方が最小コストレジスタに格納されているコストよりも小さいことを判断するときには、ステップS109に進んで、算出したR−Dコストを最小コストレジスタに格納し、続くステップS110で、設定されている処理対象の予測モードの識別情報を最適モードレジスタに格納する。 Subsequently, in step S108, the calculated RD cost is compared with the cost stored in the minimum cost register, and the calculated RD cost is smaller than the cost stored in the minimum cost register. When judging this, the process proceeds to step S109, where the calculated RD cost is stored in the minimum cost register, and in the subsequent step S110, the set identification information of the prediction mode to be processed is stored in the optimum mode register. .
一方、ステップS108で、算出したR−Dコストの方が最小コストレジスタに格納されているコストよりも大きいことを判断するときには、このステップS109,110の処理を省略する。 On the other hand, when it is determined in step S108 that the calculated RD cost is higher than the cost stored in the minimum cost register, the processes in steps S109 and 110 are omitted.
続いて、ステップS111で、全ての予測モードについて処理したのか否かを判断して、全ての予測モードについて処理していないことを判断するときには、ステップS112に進んで、予め定められる順番に従って未処理の予測モードの中から予測モードを1つ選択することで処理対象の予測モードを更新してから、ステップS104の処理に戻る。 Subsequently, in step S111, it is determined whether or not processing has been performed for all prediction modes, and when it is determined that processing has not been performed for all prediction modes, the process proceeds to step S112, and unprocessed according to a predetermined order. After the prediction mode to be processed is updated by selecting one prediction mode from among the prediction modes, the process returns to step S104.
一方、ステップS111で、全ての予測モードについて処理したことを判断するときには、ステップS113に進んで、最適モードレジスタに格納されている予測モードを最適な予測モードとして符号化部11に出力して、処理を終了する。 On the other hand, when it is determined in step S111 that all prediction modes have been processed, the process proceeds to step S113, and the prediction mode stored in the optimum mode register is output to the encoding unit 11 as the optimum prediction mode. The process ends.
次に、図4のフローチャートに従って、図3のフローチャートのステップS105で実行する重み付き歪み量の算出処理について説明する。 Next, the calculation processing of the weighted distortion amount executed in step S105 of the flowchart of FIG. 3 will be described according to the flowchart of FIG.
この重み付き歪み量の算出処理は、式(12)の算出式を計算することで実行するものである。なお、以下のフローチャートでは、説明の便宜上、一次元的なインデックスi(k,lを指すインデックス)での処理で説明している。 The calculation processing of the weighted distortion amount is executed by calculating the calculation formula of Formula (12). In the following flowchart, for the sake of convenience of explanation, the processing using a one-dimensional index i (index indicating k, l) is described.
符号化パラメータ選択部10は、図3のフローチャートのステップS105の処理に入ると、図4のフローチャートに示すように、まず最初に、ステップS201で、変換係数を正規化する。
When entering the process of step S105 in the flowchart of FIG. 3, the encoding
続いて、ステップS202で、式(12)中の^Cm,q s(i)[k,l](s=Y,U,V)で示される各変換係数の復号値を求める。 Subsequently, in step S202, a decoded value of each transform coefficient indicated by ^ Cm, qs (i) [k, l] (s = Y, U, V) in the equation (12) is obtained.
続いて、ステップS203で、図3のフローチャートのステップS103で推定した変移量(前述した(dx,dy ))を読み込む。なお、この変移量は図5のフローチャートの実行にあたって必要となるものであり、この段階で読み込んでおく。 Subsequently, in step S203, the shift amount (the above-described (d x, d y )) estimated in step S103 of the flowchart of FIG. 3 is read. This amount of change is necessary for executing the flowchart of FIG. 5, and is read at this stage.
続いて、ステップS204で、式(12)中に記載される感度係数Wk,l s (s=Y,U,V)を設定する。具体的な設定方法については図5のフローチャートで説明する。なお、このとき設定する感度係数が図3のフローチャートのステップS105で説明した重みに相当する。 Subsequently, in step S204, the sensitivity coefficient W k, l s (s = Y, U, V) described in the equation (12) is set. A specific setting method will be described with reference to the flowchart of FIG. The sensitivity coefficient set at this time corresponds to the weight described in step S105 of the flowchart of FIG.
続いて、ステップS205で、iを指定するカウンタiを0に初期化し、さらに、レジスタSを0に初期化する。 In step S205, a counter i designating i is initialized to 0, and a register S is initialized to 0.
続いて、ステップS206で、式(12)中に記載される
|Cm s(i)[k,l]−^Cm,q s(i)[k,l]|2
ただし、s=Y,U,V
の算出式に従って、変換係数の第i成分についての符号化歪みの歪み量を算出する。
Subsequently, in step S206, | C m s (i) [k, l] − ^ C m, q s (i) [k, l] | 2 described in equation (12)
However, s = Y, U, V
The amount of coding distortion for the i-th component of the transform coefficient is calculated according to the following equation.
続いて、ステップS207で、ステップS206で算出した符号化歪みの歪み量に対して、ステップS204で設定した感度係数Wk,l s (s=Y,U,V)を乗ずることで、変換係数の第i成分についての重み付き歪み量を算出する。 Subsequently, in step S207, the transform coefficient is obtained by multiplying the distortion amount of the coding distortion calculated in step S206 by the sensitivity coefficient W k, l s (s = Y, U, V) set in step S204. The weighted distortion amount for the i-th component is calculated.
続いて、ステップS208で、ステップS207で算出した乗算値をレジスタSに加算する。 Subsequently, in step S208, the multiplication value calculated in step S207 is added to the register S.
続いて、ステップS209で、変換係数の全成分について処理したのか否かを判断して、変換係数の全成分について処理していないことを判断するときには、ステップS210に進んで、変換係数の全成分を処理すべく、カウンタiに1を加算してから、ステップS206の処理に戻る。 Subsequently, in step S209, it is determined whether or not all components of the transform coefficient have been processed, and when it is determined that all components of the transform coefficient have not been processed, the process proceeds to step S210 and all components of the transform coefficient are processed. 1 is added to the counter i to return to step S206.
一方、ステップS209で、変換係数の全成分について処理したことを判断するときには、重み付き歪み量の算出処理を終了したことを判断して、ステップS211に進んで、図3のフローチャートのステップS105の算出結果として、レジスタSに格納されている重み付き歪み量を出力して、処理を終了する。 On the other hand, when it is determined in step S209 that all components of the transform coefficient have been processed, it is determined that the processing for calculating the weighted distortion amount has been completed, and the process proceeds to step S211 where step S105 in the flowchart of FIG. As a calculation result, the weighted distortion amount stored in the register S is output, and the process ends.
次に、図5のフローチャートに従って、図4のフローチャートのステップS204で実行する感度係数Wk,l s の設定処理について説明する。 Next, the sensitivity coefficient W k, l s setting process executed in step S204 of the flowchart of FIG. 4 will be described with reference to the flowchart of FIG.
この感度係数Wk,l s の設定処理は、式(20)の算出式を計算することで実行するものである。 The setting process of the sensitivity coefficient W k, l s is executed by calculating the calculation formula of Expression (20).
符号化パラメータ選択部10は、図4のフローチャートのステップS204の処理に入ると、図5のフローチャートに示すように、まず最初に、ステップS301で、基底画像を入力として、修正基底画像のDFT係数を算出して出力するという処理を行う“処理4”を実行する。
When the encoding
このとき算出した修正基底画像のDFT係数については再利用されることになるので、テーブル(後述する図7に示す修正基底画像DFT係数記憶部2102)に格納することになる。
Since the DFT coefficient of the corrected base image calculated at this time is reused, it is stored in a table (a corrected base image DFT
続いて、ステップS302で、“処理4”で得た修正基底画像のDFT係数と、DCT係数とを入力として、分析対象ブロックに対する予測誤差電力(式(20)の分母)を算出して出力するという処理を行う“処理2”を実行する。
Subsequently, in step S302, the DFT coefficient and DCT coefficient of the modified base image obtained in “
続いて、ステップS303で、“処理4”で得た修正基底画像のDFT係数と、DCT係数と、分析対象ブロックの動きベクトルと、コントラスト関数とを入力として、分析対象ブロックに対する予測誤差電力(式(20)の分子)を算出して出力するという処理を行う“処理3”を実行する。
Subsequently, in step S303, the DFT coefficient of the modified base image obtained in “
続いて、ステップS304で、“処理2”で得た予測誤差電力(式(20)の分母)と、“処理3”で得た予測誤差電力(式(20)の分子)とを入力として、モード選択のコスト関数における歪み量に対しての感度係数(重み)を算出して出力するという処理を行う“処理1”を実行する。
Subsequently, in step S304, the prediction error power obtained in “
次に、“処理1”、“処理2”、“処理3”、“処理4”の詳細なフローチャートについて説明する。なお、以下に説明する“処理1”のフローチャートでは、説明の便宜上、設定した感度係数に基づいて図3のフローチャートのステップS107の処理(コスト関数の算出処理)まで実行することで説明している。
Next, detailed flowcharts of “
[1]“処理4”
入力:第k,l基底画像(k,l=0,....,N−1)
出力:修正基底画像に対するDFT係数
処理:
(1)位置情報を示すインデックスix,iy を読み込む
(2)l=0
(3)k=0
(4)第k,l基底画像fk,l (ix,iy) を読み込む
(5)(4)の基底画像に対して、(1)の位置情報に応じたゼロパディングにより、 Mx N×Mx Nの画像〜fk,l (ix,iy) を生成する。ここで得られた画像を修正 基底画像と呼ぶ。具体的な生成方法は式(15)
(6)(5)の修正基底画像に対してDFTを実施し、修正基底画像内の周波数成分の 分布を算出する。具体的な算出方法は式(18)
(7)k=k+1
(8)k=Nならば(9)へ、そうでなければ(4)へ
(9)l=l+1
(10)l=Nならば終了、そうでなければ(3)へ
このフローチャートに従って、符号化パラメータ選択部10は、“処理4”において、基底画像fk,l (ix,iy) を入力として、修正基底画像のDFT係数Fk,l (ix,iy) (ux,uy )を算出するという処理を行うのである。
[1] “
Input: k-th, l-th base image (k, l = 0,..., N−1)
Output: DFT coefficient for modified base image
(1) Reading indexes i x and i y indicating position information (2) l = 0
(3) k = 0
(4) Read the kth, l-th base image f k, l (ix, iy) (5) For the base image of (4), zero padding according to the position information of (1) gives M x N × M x N images ~ f k, l (ix, iy) are generated. The image obtained here is called the modified base image. The specific generation method is the equation (15).
(6) DFT is performed on the modified base image of (5), and the distribution of frequency components in the modified base image is calculated. The specific calculation method is formula (18).
(7) k = k + 1
(8) If k = N, go to (9), otherwise go to (4) (9) l = l + 1
(10) If l = N, end, otherwise go to (3) According to this flowchart, the encoding
このようにして算出された修正基底画像のDFT係数Fk,l (ix,iy) (ux,uy )は、テーブル(後述する図7の修正基底画像DFT係数記憶部2102)に記憶されることになる。
The DFT coefficients F k, l (ix, iy) ( ux , u y ) of the corrected base image calculated in this way are stored in a table (a corrected base image DFT
[2]“処理2”
入力:修正基底画像のDFT係数(k,l=0,....,N−1,
ix =0,....,Mx −1,iy =0,....,My −1)
:DCT係数
出力:分析対象ブロックに対する予測誤差電力E[k,l](式(20)の分母)
ここで、E[k,l]は配列
処理:
(1)l=0
(2)k=0
(3)E[k,l]=0
(4)iy =0
(5)ix =0
(6)S=0
(7)uy =0
(8)ux =0
(9)位置インデックスix,iy の第k,l修正基底画像のDFT係数のux,uy 成分 を、前述のテーブルから読み込む
(10)直前に読み込んだ複素数の二乗ノルムFk,l (ix,iy) (ux,uy )2 を計算する
(11)S=S+Fk,l (ix,iy) (ux,uy )2
(12)ux =ux +1
(13)ux =NMx ならば次へ、そうでなければ(9)へ
(14)uy =uy +1
(15)uy =NMy ならば次へ、そうでなければ(8)へ
(16)第k,l基底のDCT係数C(ix,iy) [k,l]を、読み込む
(17)E[k,l]=E[k,l]+C(ix,iy) [k,l]2 S
(18)ix =ix +1
(19)ix =Mx ならば次へ、そうでなければ(6)へ
(20)iy =iy +1
(21)iy =My ならば次へ、そうでなければ(5)へ
(22)k=k+1
(23)k=Nならば次へ、そうでなければ(3)へ
(24)l=l+1
(25)l=Nならば終了、そうでなければ(2)へ
このフローチャートに従って、符号化パラメータ選択部10は、“処理2”において、“処理4”で得た修正基底画像のDFT係数Fk,l (ix,iy) (ux,uy )と、DCT係数C(ix,iy) [k,l]とを入力として、分析対象ブロックに対する予測誤差電力E[k,l](式(20)の分母)を算出するという処理を行うのである。
[2] “
Input: DFT coefficient of modified base image (k, l = 0,..., N−1,
i x = 0, ..., M x -1, i y = 0, ..., M y -1)
: DCT coefficient Output: Prediction error power E [k, l] for the analysis target block (denominator of equation (20))
Where E [k, l] is an array process:
(1) l = 0
(2) k = 0
(3) E [k, l] = 0
(4) i y = 0
(5) i x = 0
(6) S = 0
(7) u y = 0
(8) u x = 0
(9) Read the u x, u y components of the DFT coefficients of the kth, lth modified base image of the position index i x, i y from the above table. (10) Complex square norm F k, l read immediately before (ix, iy) (u x , u y) 2 to calculate the (11) S = S + F k, l (ix, iy) (u x, u y) 2
(12) u x = u x +1
(13) If u x = NM x , go to the next step, otherwise go to (9) (14) u y = u y +1
(15) If u y = NM y , go to the next, otherwise go to (8) (16) Read the DCT coefficient C (ix, iy) [k, l] of the kth and lth basis (17) E [K, l] = E [k, l] + C (ix, iy) [k, l] 2 S
(18) i x = i x +1
(19) If i x = M x , go to the next step, otherwise go to (6) (20) i y = i y +1
(21) i y = M y if to the next, if not to (5) (22) k = k + 1
(23) If k = N, go to the next, otherwise go to (3) (24) l = l + 1
(25) If l = N, end; otherwise, go to (2) According to this flowchart, the encoding
[3]“処理3”
入力:修正基底画像のDFT係数(k,l=0,....,N−1,
ix =0,....,Mx −1,iy =0,....,My −1)
:DCT係数
:分析対象ブロックの動きベクトル(dx,dy )
:コントラスト感度関数^g(η,ω)
出力:分析対象ブロックに対する予測誤差電力^E(dx,dy )[k,l](式(20 )の分子)
ここで、^E(dx,dy )[k,l]は配列
処理:
(0)変移量記憶部208から、動きベクトル(dx,dy )を読み込む
(1)l=0
(2)k=0
(3)^E(dx,dy )[k,l]=0
(4)iy =0
(5)ix =0
(6)^S=0
(7)uy =0
(8)ux =0
(9)位置インデックスix,iy の第k,l修正基底画像のDFT係数のux,uy 成分 を、前述のテーブルから読み込む
(10)直前に読み込んだ複素数の二乗ノルムFk,l (ix,iy) (ux,uy )2 を計算する
(11)^g(ηx,dx )および^g(ηy,dy )を計算する。具体的な計算は、例えば 式(21)により求める
(12)^S=^S+Fk,l (ix,iy) (ux,uy )2 ^g(ηx,dx )2 ^g(ηy,dy )2
(13)ux =ux +1
(14)ux =NMx ならば次へ、そうでなければ(9)へ
(15)uy =uy +1
(16)uy =NMy ならば次へ、そうでなければ(8)へ
(17)第k,l基底のDCT係数C(ix,iy) [k,l]を読み込む
(18)^E(dx,dy )[k,l]=^E(dx,dy )[k,l]+C(ix,iy) [k, l]2 ^S
(19)ix =ix +1
(20)ix =Mx ならば次へ、そうでなければ(6)へ
(21)iy =iy +1
(22)iy =My ならば次へ、そうでなければ(5)へ
(23)k=k+1
(24)k=Nならば次へ、そうでなければ(3)へ
(25)l=l+1
(26)l=Nならば終了、そうでなければ(2)へ
このフローチャートに従って、符号化パラメータ選択部10は、“処理3”において、“処理4”で得た修正基底画像のDFT係数Fk,l (ix,iy) (ux,uy )と、DCT係数C(ix,iy) [k,l]と、分析対象ブロックの動きベクトル(dx,dy )と、コントラスト感度関数^g(η,ω)とを入力として、分析対象ブロックに対する予測誤差電力^E(dx,dy )[k,l](式(20)の分子)を算出するという処理を行うのである。
[3] “
Input: DFT coefficient of modified base image (k, l = 0,..., N−1,
i x = 0, ..., M x -1, i y = 0, ..., M y -1)
: DCT coefficient: Motion vector (d x, dy ) of the analysis target block
: Contrast sensitivity function ^ g (η, ω)
Output: Prediction error power ^ E (d x, dy ) [k, l] (numerator of equation (20)) for the analysis target block
Here, ^ E (d x, d y ) [k, l] is an array process:
(0) The motion vector (d x, dy ) is read from the transition
(2) k = 0
(3) ^ E (d x, d y ) [k, l] = 0
(4) i y = 0
(5) i x = 0
(6) ^ S = 0
(7) u y = 0
(8) u x = 0
(9) Read the u x, u y components of the DFT coefficients of the kth, lth modified base image of the position index i x, i y from the above table. (10) Complex square norm F k, l read immediately before (ix, iy) (u x , u y) 2 to calculate the (11) ^ g (η x , d x) and ^ g (η y, d y ) is calculated. Concrete calculation is obtained, for example, by equation (21) (12) ^ S = ^ S + F k, l (ix, iy) (u x, u y) 2 ^ g (η x, d x) 2 ^ g ( η y, d y ) 2
(13) u x = u x +1
(14) If u x = NM x , go to the next step, otherwise go to (9) (15) u y = u y +1
(16) If u y = NM y , go to the next step, otherwise go to (8) (17) Read the DCT coefficient C (ix, iy) [k, l] of the kth and lth basis (18) ^ E (Dx , dy ) [k, l] = ^ E (dx , dy ) [k, l] + C (ix, iy) [k, l] 2 ^ S
(19) i x = i x +1
(20) If i x = M x , go to the next step, otherwise go to (6) (21) i y = i y +1
(22) If i y = M y , go to the next step, otherwise go to (5) (23) k = k + 1
(24) If k = N, go to the next step, otherwise go to (3) (25) l = l + 1
(26) If l = N, end; otherwise, go to (2). According to this flowchart, the encoding
[4]“処理1”
入力:“処理2”で求めたE[k,l](k,l=0,....,N−1)
:“処理3”で求めた^E(dx,dy )[k,l](k,l=0,....,N−1)
出力:モード選択のコスト関数における歪み量に対しての重み(感度係数)
処理:
(1)l=0,D’=0
(2)k=0
(3)D=0
(4)iy =0
(5)ix =0
(6)位置インデックスix,iy の基準ブロックにおけるDCTの第k,l成分の係数 の二乗値e[k,l](ix,iy) を読み込む
(7)E[k,l]を読み込む
(8)^E(dx,dy )[k,l]を読み込む
(9)重み係数を計算する
W(dx,dy )[k,l]=^E(dx,dy )[k,l]/E[k,l]
(10)D=D+e[k,l](ix,iy)
(11)ix =ix +1
(12)ix =Mx ならば次へ、そうでなければ(6)へ
(13)iy =iy +1
(14)iy =My ならば次へ、そうでなければ(5)へ
(15)D’=D’+D*W[k,l]
(16)k=k+1
(17)k=Nならば次へ、そうでなければ(3)へ
(18)l=l+1
(19)l=Nならば終了、そうでなければ(2)へ
(20)位置インデックスix,iy の基準ブロックにおける符号量の推定値α(ix,iy) を 算出し、分析対象ブロック内の符号量の総和の推定値A=Σix,iy α(ix,iy) を 算出する
(21)コスト関数Jを算出する。J=D’+λA
このフローチャートに従って、符号化パラメータ選択部10は、“処理1”において、“処理2”で得た分析対象ブロックに対する予測誤差電力E[k,l](式(20)の分母)と、“処理3”で時空間の視覚感度を考慮して得た分析対象ブロックに対する予測誤差電力^E(dx,dy )[k,l](式(20)の分子)とを入力として、
W(dx,dy )[k,l]=^E(dx,dy )[k,l]/E[k,l]
という算出式(式(20))に従って、モード選択のコスト関数における歪み量に対しての重みW(dx,dy )[k,l](前述の感度係数Wk,l s (dx,dy ))を算出するという処理を行うのである。
[4] “
Input: E [k, l] obtained in “
: ^ E (d x, d y ) [k, l] (k, l = 0,..., N−1) obtained in “
Output: Weight for the amount of distortion in the cost function of mode selection (sensitivity coefficient)
processing:
(1) l = 0, D ′ = 0
(2) k = 0
(3) D = 0
(4) i y = 0
(5) i x = 0
(6) position index i x, reads the k of the DCT in the reference block of the i y, square value e of the coefficients of l component [k, l] (ix, iy) read (7) E [k, l] and (8) Read {circumflex over (E) } (d x, d y ) [k, l] (9) Calculate the weighting coefficient W (d x, d y ) [k, l] = ^ E (d x, d y ) [K, l] / E [k, l]
(10) D = D + e [k, l] (ix, iy)
(11) i x = i x +1
(12) If i x = M x , go to the next step, otherwise go to (6) (13) i y = i y +1
(14) i y = M y if to the next, otherwise (5) to (15) D '= D' + D * W [k, l]
(16) k = k + 1
(17) If k = N, go to the next, otherwise go to (3) (18) l = l + 1
(19) l = N if finished, calculates otherwise (2) to (20) position index i x, the estimated value of the code amount in the reference block of the i y alpha (ix, iy), the analysis target block (21) The cost function J is calculated. (21) Calculate the estimated value A = Σ ix, iy α (ix, iy) . J = D '+ λA
According to this flowchart, the encoding
W (dx , dy ) [k, l] = ^ E (dx , dy ) [k, l] / E [k, l]
According to the calculation formula (formula (20)), the weight W (d x, d y ) [k, l] (the aforementioned sensitivity coefficient W k, l s (d x , d y )) is calculated.
このようにして、符号化パラメータ選択部10は、図3〜図5のフローチャートを実行することで、動画像の符号化に用いる予測モードを選択するにあたって、予測モードの選択に用いるコスト関数として、ブロック歪みを含む主観画質を反映したものを実現できるようになり、これにより、符号化部11は高能率の符号化を実現できるようになるとともに、符号量を削減できるようになる。
In this way, the encoding
図6および図7に、図3〜図5のフローチャートを実行すべく構成される符号化パラメータ選択部10の装置構成を図示する。
6 and 7 illustrate the device configuration of the encoding
次に、この図6および図7に従って、符号化パラメータ選択部10の装置構成について説明する。
Next, the apparatus configuration of the encoding
符号化パラメータ選択部10は、図3のフローチャートを実行するために、図6に示すように、(1)符号化対象のブロックの変移量の推定値を記憶する変移量記憶部101と、(2)符号化対象のブロックの予測ベクトルを算出する予測ベクトル算出部102と、(3)予測ベクトル算出部102の算出した予測ベクトルを記憶する予測ベクトル記憶部103と、(4)予測モードの初期値を設定する初期モード設定部104と、(5)処理対象となる予測モードを設定するモード設定部105と、(6)初期モード設定部104やモード設定部105の設定した予測モードを記憶するモード記憶部106と、(7)モード記憶部106の記憶する予測モードで符号化した場合の符号量を算出する符号量算出部107と、(8)符号量算出部107の算出した符号量を記憶する符号量記憶部108と、(9)モード記憶部106の記憶する予測モードで符号化した場合の重み付き歪み量を算出する重み付き歪み量算出部109と、(10)重み付き歪み量算出部109の算出した重み付き歪み量を記憶する重み付き歪み量記憶部110と、(11)モード記憶部106の記憶する予測モードで符号化した場合の未定乗数を算出する未定乗数算出部111と、(12)未定乗数算出部111の算出した未定乗数を記憶する未定乗数記憶部112と、(13)符号量と重み付き歪み量と未定乗数とに基づいて、モード記憶部106の記憶する予測モードで符号化した場合の符号化コストを算出するコスト算出部113と、(14)コスト算出部113の算出した符号化コストを記憶するコスト記憶部114と、(15)これまでに得た最小コストを記憶する最小コスト記憶部115と、(16)最小コスト記憶部115の記憶する最小コストを参照しつつ、コスト算出部113の算出した符号化コストがこれまでに得た最小コストであるのか否かを判定する最小コスト判定部116と、(17)最適な予測モードを記憶する最適モード記憶部117と、(18)最小コスト判定部116が最小コストであることを判断したときに、モード記憶部106の記憶する予測モードに従って最適モード記憶部117の記憶する予測モードを更新する最適モード更新部118と、(19)最小コスト判定部116が最小コストでないと判定したときには、直ちに予測モードの全てを処理したのか否かを判定し、一方、最小コスト判定部116が最小コストであることを判定したときには、最適モード更新部118からの指示を受けて予測モードの全てを処理したのか否かを判定して、最終の予測モードでないことを判断するときには、モード設定部105に対して次の予測モードの設定を指示する最終モード判定部119と、(20)最終モード判定部119が最終の予測モードであることを判断するときに、最適モード記憶部117の記憶する予測モードを最適な予測モードとして出力する最適モード出力部120とを備える。
In order to execute the flowchart of FIG. 3, the encoding
符号化パラメータ選択部10は、この装置構成に従って、図3のフローチャートを実行するのである。
The encoding
図7に、図4および図5のフローチャートを実行する重み付き歪み量算出部109の装置構成を図示する。
FIG. 7 illustrates a device configuration of the weighted distortion
重み付き歪み量算出部109は、図4および図5のフローチャートを実行するために、図7に示すように、(1)変換係数を正規化する変換係数正規化部201と、(2)変換係数正規化部201の変換した正規化変換係数を記憶する正規化変換係数記憶部202と、(3)変換係数を復号する変換係数復号部203と、(4)変換係数復号部203の復号した復号変換係数を記憶する復号変換係数記憶部204と、(5)正規化変換係数記憶部202の記憶する変換係数と、復号変換係数記憶部204の記憶する変換係数とに基づいて、変換係数の第i成分(iは更新されていく)の符号化歪みの歪み量を算出する歪み量算出部205と、(6)歪み量算出部205の算出した歪み量を記憶する歪み量記憶部206と、(7)現在処理している変換係数の第i成分の値iを記憶する変換係数インデックス記憶部207と、(8)分析対象ブロックの変移量の推定値を記憶する変移量記憶部208と、(9)基底画像を記憶する基底画像記憶部209と、(10)変移量記憶部208の記憶する変移量と、基底画像記憶部209の記憶する基底画像と、正規化変換係数記憶部202の記憶する変換係数と、コントラスト感度関数とに基づいて、感度係数Wk,l を算出する感度係数算出部210と、(11)感度係数算出部210の算出した感度係数Wk,l を記憶する感度係数記憶部211と、(12)歪み量記憶部206の記憶する歪み量と、感度係数記憶部211の記憶する感度係数Wk,l とを乗算することで、重み付けの歪み量を算出する感度係数乗算部212と、(13)感度係数乗算部212の算出した歪み量を記憶する歪み量記憶部213と、(14)歪み量記憶部213に順次格納されていく歪み量の総和を算出することで重み付き歪み量を算出する歪み量和算出部214とを備える。
In order to execute the flowcharts of FIGS. 4 and 5, the weighted distortion
そして、感度係数算出部210は、(1)前述した“処理4”の処理を実行する処理4実行部2101と、(2)処理4実行部2101により算出された修正基底画像のDFT係数を記憶する修正基底画像DFT係数記憶部2102と、(3)修正基底画像DFT係数記憶部2102の記憶する修正基底画像DFT係数と、正規化変換係数記憶部202の記憶する変換係数とを入力として、前述した“処理2”の処理を実行する処理2実行部2103と、(4)修正基底画像DFT係数記憶部2102の記憶する修正基底画像DFT係数と、正規化変換係数記憶部202の記憶する変換係数と、変移量記憶部208の記憶する変移量と、コントラスト関数とを入力として、前述した“処理3”の処理を実行する処理3実行部2104と、(5)処理2実行部2103により算出された予測誤差電力と、処理3実行部2104により算出された予測誤差電力とを入力として、前述した“処理1”の処理の内の感度係数の算出に係わる処理を実行する処理1実行部2105とを備える。
Then, the sensitivity coefficient calculation unit 210 stores (1) the
重み付き歪み量算出部109は、この装置構成に従って、図4および図5のフローチャートを実行するのである。
The weighted distortion
以上に説明した実施の形態では、符号化パラメータ選択部10が符号化パラメータとして最適な予測モードを選択することで説明したが、本発明は、予測モード以外の符号化パラメータを選択する場合にもそのまま適用できるものである。
In the embodiment described above, the encoding
例えば、符号化パラメータ選択部10が符号化パラメータとして最適な量子化パラメータを選択する場合には、符号化パラメータ選択部10は、図3のフローチャートに代えて、図8のフローチャートを実行することになる。
For example, when the encoding
すなわち、符号化パラメータ選択部10は、符号化対象マクロブロックの符号化に用いる最適な量子化パラメータを決定する場合には、図8のフローチャートに示すように、まず最初に、ステップS401で、量子化パラメータの初期値(初期値となる量子化パラメータ)を設定する。
That is, when determining the optimal quantization parameter used for encoding the macroblock to be encoded, the encoding
続いて、ステップS402で、最小コストを格納するレジスタ(最小コストレジスタ)に対して大きな値を示す初期コストを格納するとともに、最適な量子化パラメータを格納するレジスタ(以下、最適量子化パラメータレジスタと称することがある)に対して意味のない値を格納することで、これらのレジスタを初期化する。 Subsequently, in step S402, an initial cost indicating a large value is stored with respect to a register (minimum cost register) for storing a minimum cost, and a register for storing an optimal quantization parameter (hereinafter referred to as an optimal quantization parameter register). These registers are initialized by storing meaningless values.
続いて、ステップS403で、変移量(前述した(dx,dy ))を推定し、各候補ベクトルの予測誤差をテーブルに格納する。この変移量の推定方法については、外部より与えられるものとする。例えば、H.264の参照ソフトウェアJMが算出する動きベクトルを、以下で使用する変移量の推定値として用いることも可能である。 Subsequently, in step S403, the shift amount ((d x, d y ) described above) is estimated, and the prediction error of each candidate vector is stored in a table. The method for estimating the amount of displacement is 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.
続いて、ステップS404で、設定されている量子化パラメータ、符号化に用いる予測モード、その予測モードによる予測ベクトル、符号化対象フレーム信号、参照フレーム信号を入力として、その量子化パラメータを用いて符号化する場合の符号量を算出する。 Subsequently, in step S404, the set quantization parameter, the prediction mode used for encoding, the prediction vector based on the prediction mode, the encoding target frame signal, and the reference frame signal are input, and the encoding is performed using the quantization parameter. The amount of code for conversion is calculated.
続いて、ステップS405で、最初に、ステップS403で推定した変移量に基づいて時空間視覚感度を考慮した重みを決定し、次に、設定されている量子化パラメータ、符号化に用いる予測モード、その予測モードによる予測ベクトル、符号化対象フレーム信号、参照フレーム信号を入力として、それらの入力信号とその決定した重みとに基づいて、その量子化パラメータを用いて符号化する場合の重み付き歪み量を算出する。具体的な算出方法については、図4および図5のフローチャートで説明した通りである。 Subsequently, in step S405, first, a weight considering the spatiotemporal visual sensitivity is determined based on the amount of transition estimated in step S403, and then the set quantization parameter, the prediction mode used for encoding, Weighted distortion amount when encoding using the prediction parameter, the encoding target frame signal, and the reference frame signal in the prediction mode, and encoding using the quantization parameter based on the input signal and the determined weight Is calculated. A specific calculation method is as described in the flowcharts of FIGS.
続いて、ステップS406で、設定されている量子化パラメータ、符号化に用いる予測モードを入力として、その量子化パラメータを用いて符号化する場合の未定乗数を算出する。 Subsequently, in step S406, the set quantization parameter and the prediction mode used for encoding are input, and an undetermined multiplier when encoding using the quantization parameter is calculated.
続いて、ステップS407で、ステップS404で算出した符号量と、ステップS405で算出した重み付き歪み量と、ステップS406で算出した未定乗数とに基づいて、式(11)で示されるR−Dコストを算出する。 Subsequently, in step S407, based on the code amount calculated in step S404, the weighted distortion amount calculated in step S405, and the undetermined multiplier calculated in step S406, the RD cost represented by Expression (11) is used. Is calculated.
続いて、ステップS408で、算出したR−Dコストと最小コストレジスタに格納されているコストとを比較して、算出したR−Dコストの方が最小コストレジスタに格納されているコストよりも小さいことを判断するときには、ステップS409に進んで、算出したR−Dコストを最小コストレジスタに格納し、続くステップS410で、設定されている量子化パラメータを最適量子化パラメータレジスタに格納する。一方、ステップS408で、算出したR−Dコストの方が最小コストレジスタに格納されているコストよりも大きいことを判断するときには、このステップS409,410の処理を省略する。 Subsequently, in step S408, the calculated RD cost is compared with the cost stored in the minimum cost register, and the calculated RD cost is smaller than the cost stored in the minimum cost register. When this is determined, the process proceeds to step S409, where the calculated RD cost is stored in the minimum cost register, and in step S410, the set quantization parameter is stored in the optimum quantization parameter register. On the other hand, when it is determined in step S408 that the calculated RD cost is higher than the cost stored in the minimum cost register, the processes in steps S409 and 410 are omitted.
続いて、ステップS411で、全ての量子化パラメータについて処理したのか否かを判断して、全ての量子化パラメータについて処理していないことを判断するときには、ステップS412に進んで、予め定められる順番に従って未処理の量子化パラメータの中から量子化パラメータを1つ選択することで処理対象の量子化パラメータを更新してから、ステップS404の処理に戻る。 Subsequently, in step S411, it is determined whether or not all the quantization parameters have been processed, and when it is determined that all the quantization parameters have not been processed, the process proceeds to step S412 in accordance with a predetermined order. After the quantization parameter to be processed is updated by selecting one quantization parameter from the unprocessed quantization parameters, the process returns to step S404.
一方、ステップS411で、全ての量子化パラメータについて処理したことを判断するときには、ステップS413に進んで、最適量子化パラメータレジスタに格納されている量子化パラメータを最適な量子化パラメータとして出力して、処理を終了する。 On the other hand, when it is determined in step S411 that all the quantization parameters have been processed, the process proceeds to step S413, and the quantization parameter stored in the optimum quantization parameter register is output as the optimum quantization parameter. The process ends.
図9に、図8のフローチャートを実行すべく構成される符号化パラメータ選択部10の装置構成を図示する。ここで、図7に示したものと同じものについては同一の記号で示してある。
FIG. 9 illustrates a device configuration of the encoding
この図9に示すように、符号化パラメータ選択部10は、図8のフローチャートを実行するために、前述の初期モード設定部104に代えて初期量子化パラメータ設定部304を備え、前述のモード設定部105に代えて量子化パラメータ設定部305を備え、前述のモード記憶部106に代えて量子化パラメータ記憶部306を備え、前述の最適モード記憶部117に代えて最適量子化パラメータ記憶部317を備え、前述の最適モード更新部118に代えて最適量子化パラメータ更新部318を備え、前述の最終モード判定部119に代えて最終量子化パラメータ判定部319を備え、前述の最適モード出力部120に代えて最適量子化パラメータ出力部320を備えることになる。
As shown in FIG. 9, the encoding
最後に、本発明の有効性を検証するために行った実験について説明する。 Finally, an experiment conducted to verify the effectiveness of the present invention will be described.
この実験は、本発明を参照ソフトウェアJSVM(version 8.0.[3])に実装して、無改造のJSVMと比較することで行った。 This experiment was performed by implementing the present invention in the reference software JSVM (version 8.0. [3]) and comparing it with an unmodified JSVM.
下記の表に、実験条件を示す。符号化対象のシーケンスは、サイズ352×288[pixels]、フレームレート30[fps] である。符号化処理は、先頭の120フレームに対して実施した。式(30)におけるパラメータはr1 =8,r2 =6,A=5とした。また、基準ブロックのサイズを与えるパラメータはN=4とし、分析対象ブロックのサイズを与えるパラメータはMx =My =4とした。 The following table shows the experimental conditions. The encoding target sequence has a size of 352 × 288 [pixels] and a frame rate of 30 [fps]. The encoding process was performed on the first 120 frames. The parameters in equation (30) were r 1 = 8, r 2 = 6, A = 5. Further, the parameter that gives the size of the reference block is N = 4, and the parameter that gives the size of the analysis target block is M x = M y = 4.
下記の表に、符号量の比較結果を示す。いずれのシーケンス、QP値においても、本発明によって符号量の削減が図られていることが確認できる。なお、両手法の復号画像には、主観的な画質の差が認められないことを確認している。さらに、JSVMに対する本発明の相対的な符号量削減率を評価するために、JSVMの符号量および本発明の符号量を各々RJSVM,ROursとして、
{(ROurs−RJSVM)/RJSVM}×100%
という式で示される符号量削減率を下記の表の3列目の括弧内に示す。この結果、本発明は、JSVMに対して平均5.3%の符号量低減を実現していることが確認できた。
The following table shows the comparison results of the code amount. In any sequence and QP value, it can be confirmed that the code amount is reduced by the present invention. It has been confirmed that there is no subjective difference in image quality between the decoded images of both methods. Further, in order to evaluate the relative code amount reduction rate of the present invention with respect to JSVM, the code amount of JSVM and the code amount of the present invention are respectively represented as R JSVM and R Ours .
{(R Ours -R JSVM ) / R JSVM } × 100%
The code amount reduction rate represented by the formula is shown in parentheses in the third column of the following table. As a result, it has been confirmed that the present invention achieves an average code amount reduction of 5.3% with respect to JSVM.
下記の表に、符号化モードの割合を示す。ここで、ここで、SKIPの列はスキップモードの割合を示しており、INTERの列はスキップモードを除くインター予測の割合を示しており、INTRAの列は全てのイントラ予測モードの選択された割合を示している。この表に示すように、本発明のビットレートの削減は、発生符号量の少ないスキップモードを多く選択することで実現していることが分かる。 The following table shows the ratio of the encoding mode. Here, the SKIP column indicates the skip mode ratio, the INTER column indicates the inter prediction ratio excluding the skip mode, and the INTRA column indicates the selected ratio of all intra prediction modes. Is shown. As shown in this table, it can be seen that the reduction of the bit rate according to the present invention is realized by selecting many skip modes with a small amount of generated codes.
さらに、ブロック歪みについての評価結果を示す。各フレーム(X×Y[画素])の位置(x,y)における復号画素値をS(x,y)とし、水平・垂直方向の画素間差分値を各々
δh (x,y)=S(x+1,y)−S(x,y)
δv (x,y)=S(x,y+1)−S(x,y)
とする。このとき、
Δ={Σ1 Σ2 |δh (Nix,iy )|}/{2Y(X/N−1)}
+{Σ3 Σ4 |δv (ix,Niy )|}/{2X(Y/N−1)}
ただし、Σ1 は、ix =1〜(X/N−1)の総和
Σ2 は、iy =0〜(Y−1)の総和
Σ3 は、iy =1〜(Y/N−1)の総和
Σ4 は、ix =0〜(X−1)の総和
という式で表されるブロック境界における画素間差分値の平均値Δを用いて、隣接ブロック間の不連続性を評価する。
Furthermore, the evaluation result about block distortion is shown. The decoded pixel value at the position (x, y) of each frame (X × Y [pixel]) is S (x, y), and the inter-pixel difference values in the horizontal and vertical directions are respectively δ h (x, y) = S. (X + 1, y) -S (x, y)
δ v (x, y) = S (x, y + 1) −S (x, y)
And At this time,
Δ = {Σ 1 Σ 2 | δ h (Ni x, i y ) |} / {2Y (X / N−1)}
+ {Σ 3 Σ 4 | δ v (ix , Ni y ) |} / {2X (Y / N−1)}
Where Σ 1 is the sum of i x = 1 to (X / N−1)
Σ 2 is the sum of i y = 0 to (Y−1)
Σ 3 is the sum of i y = 1 to (Y / N−1)
Σ 4 evaluates the discontinuity between adjacent blocks by using the average value Δ of the inter-pixel difference value at the block boundary expressed by the formula of the sum of i x = 0 to (X−1).
下記の表に、JSVMおよび本発明に対するΔの全フレーム平均値を示す。なお、各行の2列目の値と3列目の値を各々ΔJSVM,ΔOursとして、
{(ΔOurs−ΔJSVM)/ΔJSVM}×100%
という式で示されるブロック歪み削減率を下記の表の3列目の括弧内に示す。この結果、本発明は、JSVMに対して平均1.2%のブロック歪み低減を実現していることが確認できた。
The table below shows the total frame average of Δ for JSVM and the present invention. In addition, the value in the second column and the value in the third column of each row are set as Δ JSVM and Δ Ours respectively.
{(Δ Ours −Δ JSVM ) / Δ JSVM } × 100%
The block distortion reduction rate represented by the formula is shown in parentheses in the third column of the following table. As a result, it was confirmed that the present invention achieved an average 1.2% block distortion reduction with respect to JSVM.
本実験によって、本発明によれば、JSVMに対して符号量を低減し、さらに、ブロック歪みも低減できることが確認できた。本発明では、隣接ブロック間の依存関係を考慮した周波数分析を行っている。このため、隣接ブロック間の不連続性は、水平・垂直方向のエッジとして、コントラスト感度関数が大きな重みを与える周波数成分として分析される。つまり、大きな感度係数の値が設定される。この感度係数により重み付けされた歪み尺度がコスト関数に用いられるため、ブロック間の不連続性をもたらす成分の歪みは回避され、結果としてブロック歪みが低減したものと考察される。 From this experiment, it was confirmed that according to the present invention, the code amount can be reduced with respect to JSVM, and further, block distortion can be reduced. In the present invention, frequency analysis is performed in consideration of the dependency between adjacent blocks. For this reason, the discontinuity between adjacent blocks is analyzed as a frequency component to which the contrast sensitivity function gives a large weight as horizontal and vertical edges. That is, a large sensitivity coefficient value is set. Since a distortion measure weighted by this sensitivity coefficient is used in the cost function, distortion of components that cause discontinuity between blocks is avoided, and it is considered that block distortion is reduced as a result.
本発明は、フレーム内予測やフレーム間予測により得られた予測誤差信号に対して、変換符号化および量子化による情報圧縮を行うことで動画像を符号化する場合に適用できるものであり、本発明を適用することで、符号化パラメータの選択に用いるコスト関数として、ブロック歪みを含む主観画質を反映したものを実現できるようになることで、高能率の符号化を実現できるようになるとともに、符号量の削減を実現できるようになる。 The present invention can be applied to a case where a moving image is encoded by performing information compression by transform coding and quantization on a prediction error signal obtained by intra-frame prediction or inter-frame prediction. By applying the invention, it becomes possible to realize a cost function used for selecting an encoding parameter that reflects subjective image quality including block distortion, thereby realizing highly efficient encoding. The amount of code can be reduced.
201 変換係数正規化部
202 正規化変換係数記憶部
203 変換係数復号部
204 復号変換係数記憶部
205 歪み量算出部
206 歪み量記憶部
207 変換係数インデックス記憶部
208 変移量記憶部
209 基底画像記憶部
210 感度係数算出部
211 感度係数記憶部
212 感度係数乗算部
213 歪み量記憶部
214 歪み量和算出部
2101 処理4実行部
2102 修正基底画像DFT係数記憶部
2103 処理2実行部
2104 処理3実行部
2105 処理1実行部
DESCRIPTION OF
Claims (6)
変換行列の対象となる複数のブロックで構成される分析対象ブロックに対応付けて定義されて、1つのブロックに変換行列の基底画像が配置され、他のブロックにゼロ値が埋め込まれることで構成されるブロックの数分の修正基底画像について算出された空間周波数成分を記憶する記憶手段から、その修正基底画像の空間周波数成分を読み出す過程と、
前記分析対象ブロックの画像信号の時間的な動きを示す変移量を推定する過程と、
前記読み出した空間周波数成分の空間周波数インデックスと前記変移量とに基づいて、その空間周波数成分に割り当てられる視覚感度値を算出して、その空間周波数成分を重み付けする過程と、
前記重み付けをした空間周波数成分と、その重み付けをしない空間周波数成分と、前記分析対象ブロックを構成するブロックの変換係数とに基づいて、予測誤差信号の各基底成分についての重要度を算出する過程と、
前記重要度を用いて重み付けされた符号化の歪み量を用いて符号化コストを評価することで、符号化パラメータを決定する過程とを有し、
前記算出する過程では、前記変換係数の二乗和と前記重み付けをした空間周波数成分の二乗ノルム和との乗算値と、前記変換係数の二乗和と前記重み付けをしない空間周波数成分の二乗ノルム和との乗算値とを求めて、その2つの乗算値の割り算値に従って前記重要度を算出することを、
特徴とする動画像符号化方法。 A moving picture coding method for coding a moving picture by performing information compression by transform coding and quantization on an image signal or a prediction error signal obtained by intra-frame prediction and inter-frame prediction. ,
It is defined by associating with the analysis target block consisting of multiple blocks that are the target of the transformation matrix, and is configured by placing the base image of the transformation matrix in one block and embedding zero values in other blocks A process of reading the spatial frequency components of the corrected base image from the storage means for storing the spatial frequency components calculated for the corrected base images for the number of blocks
Estimating a shift amount indicating temporal movement of the image signal of the analysis target block;
Calculating a visual sensitivity value assigned to the spatial frequency component based on the spatial frequency index of the read spatial frequency component and the shift amount, and weighting the spatial frequency component;
Calculating importance for each base component of the prediction error signal based on the weighted spatial frequency component, the non-weighted spatial frequency component, and the transform coefficient of the block constituting the analysis target block; ,
Determining a coding parameter by evaluating a coding cost using a coding distortion weighted using the importance , and
In the process of calculating, a multiplication value of the square sum of the transform coefficients and the square norm sum of the weighted spatial frequency components, and a square sum of the square sum of the transform coefficients and the square frequency norm sum of the non-weighted spatial frequency components. Obtaining a multiplication value and calculating the importance according to a division value of the two multiplication values ;
A moving image encoding method as a feature.
前記重み付けする過程では、水平方向の空間周波数インデックスと前記変移量の水平成分とに基づいて水平方向の視覚感度値を算出するとともに、垂直方向の空間周波数インデックスと前記変移量の垂直成分とに基づいて垂直方向の視覚感度値を算出することで、前記読み出した空間周波数成分に割り当てられる視覚感度値を算出することを、
特徴とする動画像符号化方法。 The moving image encoding method according to claim 1,
In the weighting process, a visual sensitivity value in the horizontal direction is calculated based on the horizontal spatial frequency index and the horizontal component of the shift amount, and based on the vertical spatial frequency index and the vertical component of the shift amount. Calculating a visual sensitivity value assigned to the read spatial frequency component by calculating a vertical visual sensitivity value,
A moving image encoding method as a feature.
変換行列の対象となる複数のブロックで構成される分析対象ブロックに対応付けて定義されて、1つのブロックに変換行列の基底画像が配置され、他のブロックにゼロ値が埋め込まれることで構成されるブロックの数分の修正基底画像について算出された空間周波数成分を記憶する記憶手段と、
前記分析対象ブロックの画像信号の時間的な動きを示す変移量を推定する推定手段と、
前記記憶手段から修正基底画像の空間周波数成分を読み出して、その空間周波数成分の空間周波数インデックスと前記変移量とに基づいて、その空間周波数成分に割り当てられる視覚感度値を算出して、その空間周波数成分を重み付けする重み付け手段と、
前記重み付けをした空間周波数成分と、その重み付けをしない空間周波数成分と、前記分析対象ブロックを構成するブロックの変換係数とに基づいて、予測誤差信号の各基底成分についての重要度を算出する算出手段と、
前記重要度を用いて重み付けされた符号化の歪み量を用いて符号化コストを評価することで、符号化パラメータを決定する決定手段とを備え、
前記算出手段は、前記変換係数の二乗和と前記重み付けをした空間周波数成分の二乗ノルム和との乗算値と、前記変換係数の二乗和と前記重み付けをしない空間周波数成分の二乗ノルム和との乗算値とを求めて、その2つの乗算値の割り算値に従って前記重要度を算出することを、
特徴とする動画像符号化装置。 A moving image encoding apparatus that encodes a moving image by performing information compression by transform coding and quantization on an image signal or a prediction error signal obtained by intra-frame prediction and inter-frame prediction. ,
It is defined by associating with the analysis target block consisting of multiple blocks that are the target of the transformation matrix, and is configured by placing the base image of the transformation matrix in one block and embedding zero values in other blocks Storage means for storing spatial frequency components calculated for the corrected base images for the number of blocks
Estimating means for estimating a shift amount indicating temporal movement of the image signal of the analysis target block;
The spatial frequency component of the corrected base image is read from the storage means, and the visual sensitivity value assigned to the spatial frequency component is calculated based on the spatial frequency index of the spatial frequency component and the shift amount, and the spatial frequency is calculated. A weighting means for weighting the components;
Calculation means for calculating importance for each base component of the prediction error signal based on the weighted spatial frequency component, the non-weighted spatial frequency component, and the transform coefficient of the block constituting the analysis target block When,
To assess the coding cost by using the distortion amount of the weighted coded using the importance degree, e Bei and determining means for determining the encoding parameters,
The calculating means multiplies a multiplication value of a square sum of the transform coefficients and a square norm sum of the weighted spatial frequency components, and a multiplication of a square sum of the transform coefficients and a square norm sum of the non-weighted spatial frequency components. And calculating the importance according to a division value of the two multiplication values ,
A moving image encoding device.
前記重み付け手段は、水平方向の空間周波数インデックスと前記変移量の水平成分とに基づいて水平方向の視覚感度値を算出するとともに、垂直方向の空間周波数インデックスと前記変移量の垂直成分とに基づいて垂直方向の視覚感度値を算出することで、前記読み出した空間周波数成分に割り当てられる視覚感度値を算出することを、
特徴とする動画像符号化装置。 In the moving image encoding device according to claim 3 ,
The weighting means calculates a visual sensitivity value in the horizontal direction based on a horizontal spatial frequency index and a horizontal component of the shift amount, and based on a vertical spatial frequency index and the vertical component of the shift amount. By calculating the visual sensitivity value in the vertical direction, calculating the visual sensitivity value assigned to the read spatial frequency component,
A moving image encoding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008209861A JP4819856B2 (en) | 2008-08-18 | 2008-08-18 | Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008209861A JP4819856B2 (en) | 2008-08-18 | 2008-08-18 | Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010045722A JP2010045722A (en) | 2010-02-25 |
JP4819856B2 true JP4819856B2 (en) | 2011-11-24 |
Family
ID=42016694
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008209861A Expired - Fee Related JP4819856B2 (en) | 2008-08-18 | 2008-08-18 | Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4819856B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4709074B2 (en) * | 2006-06-09 | 2011-06-22 | 日本電信電話株式会社 | Moving picture encoding method, apparatus, program thereof, and recording medium recording the program |
JP2008209860A (en) * | 2007-02-28 | 2008-09-11 | Seiko Epson Corp | Microlens array substrate manufacturing method, light modulation device manufacturing method, and light modulation device |
JP4681011B2 (en) * | 2008-01-31 | 2011-05-11 | 日本電信電話株式会社 | Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program |
JP4824708B2 (en) * | 2008-01-31 | 2011-11-30 | 日本電信電話株式会社 | Moving picture encoding method, apparatus, program, and computer-readable recording medium |
-
2008
- 2008-08-18 JP JP2008209861A patent/JP4819856B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010045722A (en) | 2010-02-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11070839B2 (en) | Hybrid video coding | |
JP5266342B2 (en) | Video intra prediction method and apparatus | |
US9883207B2 (en) | Methods and apparatus for adaptive coupled pre-processing and post-processing filters for video encoding and decoding | |
JP4752631B2 (en) | Image coding apparatus and image coding method | |
US8588301B2 (en) | Image coding apparatus, control method therefor and computer program | |
JP5396600B2 (en) | Image coding method and apparatus for implementing improved prediction, corresponding decoding method and apparatus, signal and computer program | |
JP2009094828A (en) | Image encoding device, image encoding method, image decoding device, and image decoding method | |
JPWO2011121894A1 (en) | Image encoding device, image decoding device, image encoding method, and image decoding method | |
JP4709187B2 (en) | ENCODING PARAMETER DETERMINING METHOD, ENCODING PARAMETER DETERMINING DEVICE, ENCODING PARAMETER DETERMINING PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM | |
JP4786612B2 (en) | Predicted motion vector generation apparatus for moving picture encoding apparatus | |
CN112740691A (en) | Method and apparatus for encoding and decoding a data stream representing at least one image | |
US8897585B2 (en) | Prediction of pixels in image coding | |
JP4709074B2 (en) | Moving picture encoding method, apparatus, program thereof, and recording medium recording the program | |
JP6837110B2 (en) | Video decoding method | |
JP4709179B2 (en) | Encoding parameter selection method, encoding parameter selection device, encoding parameter selection program, and recording medium therefor | |
JP4681011B2 (en) | Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program | |
JP4819856B2 (en) | Moving picture coding method, moving picture coding apparatus, moving picture coding program, and computer-readable recording medium recording the program | |
JP4820800B2 (en) | Image coding method, image coding apparatus, and image coding program | |
JP4819855B2 (en) | Moving picture quantization method, moving picture quantization apparatus, moving picture quantization program, and computer-readable recording medium recording the program | |
CN112313955B (en) | Method and device for encoding and decoding a data stream representing at least one image | |
JP4697802B2 (en) | Video predictive coding method and apparatus | |
CN113412618B (en) | Method and device for encoding and decoding a data stream representing at least one image | |
JP7657723B2 (en) | Method and device for encoding and decoding a data stream representing at least one image - Patents.com | |
CN112740690B (en) | Method and device for encoding and decoding a data stream representing at least one image | |
JP2007096479A (en) | Inter-layer prediction coding method and apparatus, inter-layer prediction decoding method and apparatus, and program for them, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20100331 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100720 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110621 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110712 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110812 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110830 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110901 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140909 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4819856 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
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 |
|
LAPS | Cancellation because of no payment of annual fees |