JP2012104940A - Moving image encoder, moving image encoding method and program - Google Patents
Moving image encoder, moving image encoding method and program Download PDFInfo
- Publication number
- JP2012104940A JP2012104940A JP2010249968A JP2010249968A JP2012104940A JP 2012104940 A JP2012104940 A JP 2012104940A JP 2010249968 A JP2010249968 A JP 2010249968A JP 2010249968 A JP2010249968 A JP 2010249968A JP 2012104940 A JP2012104940 A JP 2012104940A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- quantization parameter
- unit
- video signal
- macroblock
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、動画像符号化装置、動画像符号化方法及びプログラムに関する。 The present invention relates to a moving image encoding apparatus, a moving image encoding method, and a program.
現在、動画像の符号化を行う際には、予測符号化とブロック分割変換符号化を行う。予測符号化では、フレーム内予測符号化及び動き補償フレーム間予測符号化(例えば、非特許文献1参照)を行うことにより予測誤差信号を生成する。予測誤差信号とは、マクロブロックにおける画素値と該画素値の予測値との差分を表す信号である。マクロブロックとは、隣接する複数の画素(例えば、8×8画素)を集めた領域であり、符号化を行う対象である。フレーム内予測符号化では、隣接する符号化済みのマクロブロックの画素値からマクロブロックにおける画素値を予測することにより、高い圧縮率を実現している。一方、動き補償フレーム間予測符号化では、隣り合うフレーム間の差分信号を用いるフレーム間予測符号化に加えて、フレームにある物体が符号化済みのフレームからどれだけ動いたかを表す情報(動きベクトル)を用いてマクロブロックの画素値を予測する。これにより、高い圧縮率を実現する。ブロック分割変換符号化では、フレーム内予測符号化及び動き補償フレーム間予測符号化による予測誤差信号を符号化する。すなわち、マクロブロック単位で予測誤差信号に離散コサイン変換(DCT)を行うことにより、高い圧縮率を実現している。 Currently, when encoding a moving image, predictive encoding and block division transform encoding are performed. In predictive coding, a prediction error signal is generated by performing intraframe predictive coding and motion compensation interframe predictive coding (see, for example, Non-Patent Document 1). The prediction error signal is a signal representing a difference between a pixel value in a macroblock and a predicted value of the pixel value. A macroblock is an area in which a plurality of adjacent pixels (for example, 8 × 8 pixels) are collected, and is an object to be encoded. In intra-frame predictive coding, a high compression rate is realized by predicting pixel values in a macroblock from pixel values of adjacent coded macroblocks. On the other hand, in motion compensation interframe predictive coding, in addition to interframe predictive coding using a difference signal between adjacent frames, information indicating how much an object in a frame has moved from a coded frame (motion vector) ) Is used to predict the pixel value of the macroblock. Thereby, a high compression rate is realized. In block division transform coding, a prediction error signal is coded by intraframe prediction coding and motion compensation interframe prediction coding. That is, a high compression rate is realized by performing discrete cosine transform (DCT) on the prediction error signal in units of macroblocks.
図4は、予測符号化とブロック分割変換符号化を組み合わせた符号化を行う動画像符号化装置20の機能構成を示すブロック図である。動画像符号化装置20は、予測符号化部21と、ブロック分割変換符号化部22と、量子化部23とを含んで構成される。予測符号化部21は、符号化の対象である映像信号(以下、入力映像信号とする)を入力とし、入力映像信号におけるマクロブロックに対してフレーム内予測符号化及び動き補償フレーム間予測符号化を行う。そして、予測符号化部21は、生成した予測誤差信号をブロック分割変換符号化部22に出力する。ブロック分割変換符号化部22は、入力された予測誤差信号に対して離散コサイン変換を行うことにより、周波数成分に変換し、変換した周波数成分を直交変換係数とする。これにより、空間的な冗長度を取り除く。量子化部23は、ブロック分割変換符号化部22が変換した直交変換係数を指定した値(以下、量子化ステップとする)で除算した結果を整数値に丸め、整数値に丸めた結果を量子化値とする。つまり、量子化部23は、入力された直交変換係数を所定の量子化代表値のいずれかに対応付けする。これにより、量子化による歪みを許しながら大幅な符号量の削減を行う。
FIG. 4 is a block diagram showing a functional configuration of the moving
ここで、符号化を行う際、量子化部23は、最初に各マクロブロックに対して量子化パラメータ(0から51までの整数値)を決定し、決定した量子化パラメータに基づいて量子化ステップを導出する。量子化パラメータとは、量子化ステップを決定するパラメータである。例えば、H.264/AVCでは量子化パラメータと量子化ステップの対数が比例する。具体的には、量子化パラメータが6増加すると量子化ステップが2倍になる。そして、量子化部23は、直交変換係数を量子化ステップで除算した結果を整数値に丸めることにより量子化値を算出する。
Here, when performing encoding, the
非特許文献2には、画像の類似度を客観的に評価する手法であるSSIM(Structural SIMilarity)が記載されている。また、非特許文献3では、マクロブロック単位での符号化効率を向上させ、高圧縮を実現することができるアルゴリズムが提案されている。 Non-Patent Document 2 describes SSIM (Structural SIMilarity), which is a method for objectively evaluating the similarity of images. Non-Patent Document 3 proposes an algorithm that can improve the encoding efficiency in units of macroblocks and realize high compression.
従来技術では、量子化部23において量子化を行うことで符号量を削減しているが、この時量子化による歪みを許容しているため、歪みが発生する場合がある。しかしながら、発生した歪みがどの様な歪みなのか、どの程度歪んでいるのかを、事前に知る事は出来ない。それ故、量子化する際に用いる量子化パラメータを事前に最適化することは困難であり、その結果、量子化による歪みが画像の品質に悪影響を与える場合がある、という問題がある。
In the prior art, the amount of code is reduced by performing quantization in the quantizing
本発明は、このような事情に鑑みてなされたもので、符号化する際に用いる適切な量子化パラメータを設定し、量子化による歪みを抑えることにより、主観画像品質を向上し、符号化効率を向上させることができる動画像符号化装置、動画像符号化方法及びプログラムを提供することを目的とする。 The present invention has been made in view of such circumstances, and by setting appropriate quantization parameters used for encoding and suppressing distortion due to quantization, the subjective image quality is improved and the encoding efficiency is improved. An object of the present invention is to provide a moving picture coding apparatus, a moving picture coding method, and a program capable of improving the above.
本発明は、入力映像信号に対し、所定の第一量子化パラメータを用いて符号化を行いビットストリームを生成する第一符号化部と、前記第一符号化部が生成したビットストリームを復号して復号映像信号および第一符号化時の符号化情報を生成する復号部と、前記復号部が復号した復号映像信号と前記入力映像信号との差分に基づいて、前記復号映像信号における歪みの度合いを示す画質劣化評価指標を算出する評価部と、前記評価部が算出した画質劣化評価指標と前記復号部が出力したスライスタイプ、マクロブロックタイプ及びマクロブロック発生符号量を含む符号化情報に基づいて第二量子化パラメータを算出する量子化パラメータ算出部と、前記量子化パラメータ算出部が算出した第二量子化パラメータを用いて前記入力映像信号に対し符号化を行う第二符号化部とを備えることを特徴とする。 The present invention includes a first encoding unit that encodes an input video signal using a predetermined first quantization parameter to generate a bitstream, and decodes the bitstream generated by the first encoding unit. A decoding unit that generates a decoded video signal and encoding information at the time of first encoding, and a degree of distortion in the decoded video signal based on a difference between the decoded video signal decoded by the decoding unit and the input video signal Based on coding information including an evaluation unit that calculates an image quality deterioration evaluation index indicating the image quality deterioration evaluation index calculated by the evaluation unit, and a slice type, a macroblock type, and a macroblock generation code amount output by the decoding unit A quantization parameter calculation unit for calculating a second quantization parameter and a second quantization parameter calculated by the quantization parameter calculation unit for the input video signal. Characterized in that it is provided with a second encoding unit for encoding.
本発明は、前記評価部は、SSIM(Structural SIMilarity)を用いて前記画質劣化評価指標を算出することを特徴とする。 The present invention is characterized in that the evaluation unit calculates the image quality degradation evaluation index using SSIM (Structural SIMularity).
本発明は、前記量子化パラメータ算出部は、式(1)にて定義されたレート歪み曲線f(xi)に関し、
本発明は、第一符号化部と、復号部と、評価部と、量子化パラメータ算出部と、第二符号化部と備える動画像符号化装置における動画像符号化方法であって、前記第一符号化部が、入力映像信号に対し、所定の第一量子化パラメータを用いて符号化を行いビットストリームを生成する第一符号化ステップと、前記復号部が、前記第一符号化ステップにより生成したビットストリームを復号して復号映像信号および第一符号化時の符号化情報を生成する復号ステップと、前記評価部が、前記復号ステップにより復号した復号映像信号と前記入力映像信号との差分に基づいて、前記復号映像信号における歪みの度合いを示す画質劣化評価指標を算出する評価ステップと、前記量子化パラメータ算出部が、前記評価ステップにより算出した画質劣化評価指標と前記復号ステップにより生成されたスライスタイプ、マクロブロックタイプ及びマクロブロック発生符号量を含む符号化情報に基づいて第二量子化パラメータを算出する量子化パラメータ算出ステップと、前記第二符号化部が、前記量子化パラメータ算出ステップにより算出した第二量子化パラメータを用いて前記入力映像信号に対し符号化を行う第二符号化ステップとを有することを特徴とする。 The present invention is a moving picture coding method in a moving picture coding apparatus including a first coding unit, a decoding unit, an evaluation unit, a quantization parameter calculation unit, and a second coding unit, A first encoding step in which an encoding unit encodes an input video signal using a predetermined first quantization parameter to generate a bitstream; and the decoding unit performs the first encoding step. A decoding step of decoding the generated bit stream to generate a decoded video signal and encoded information at the time of first encoding, and a difference between the decoded video signal decoded by the decoding unit and the input video signal by the decoding step Based on the evaluation step of calculating an image quality deterioration evaluation index indicating the degree of distortion in the decoded video signal, and the image quality deterioration calculated by the quantization parameter calculation unit in the evaluation step A quantization parameter calculating step for calculating a second quantization parameter based on encoding information including a valence index and a slice type, a macroblock type, and a macroblock generation code amount generated by the decoding step; and the second encoding And a second encoding step of encoding the input video signal using the second quantization parameter calculated in the quantization parameter calculating step.
本発明は、前記評価ステップは、SSIM(Structural SIMilarity)を用いて前記画質劣化評価指標を算出することを特徴とする。 The present invention is characterized in that the evaluation step calculates the image quality degradation evaluation index by using SSIM (Structural SIMularity).
本発明は、前記量子化パラメータ算出ステップは、式(6)にて定義されたレート歪み曲線f(xi)に関し、
動画像符号化装置上のコンピュータに、請求項4から6のいずれかの項に記載の動画像符号化方法を実行させることを特徴とする。 A computer on a moving image encoding apparatus is caused to execute the moving image encoding method according to any one of claims 4 to 6.
本発明によれば、映像入力信号を一度符号化した結果に対する画質劣化評価指標を用いて、再度映像入力信号を符号化する際に用いる量子化パラメータを算出している。このため、適切な量子化パラメータが設定可能となり、主観的な画像品質が向上し、符号化効率を向上することができる。 According to the present invention, the quantization parameter used when the video input signal is encoded again is calculated using the image quality degradation evaluation index for the result of encoding the video input signal once. For this reason, an appropriate quantization parameter can be set, subjective image quality can be improved, and coding efficiency can be improved.
以下、本発明の一実施形態を、図面を参照して詳しく説明する。図1は、本実施形態による動画像符号化装置10の機能構成を示すブロック図である。動画像符号化装置10は、第一符号化部11と、復号部12と、評価部13と、量子化パラメータ算出部14と、第二符号化部15とを含んで構成される。第一符号化部11は、符号化の対象となる映像信号(以下、入力映像信号とする)を入力とし、入力映像信号に対して符号化を行い、符号化した結果をビットストリームとする。そして、第一符号化部11は、ビットストリームを復号部12に出力する。具体的には、第一符号化部11は、まず、入力映像信号における各マクロブロックに対して予測符号化とブロック分割変換符号化を行う。次に、第一符号化部11は、ブロック分割変換符号化を行った結果である直交変換係数を量子化ステップで除算する。そして、第一符号化部11は、除算した結果を整数値に丸めて量子化値を算出する。このとき、第一符号化部11は、予め各マクロブロックに設定された量子化パラメータから量子化ステップを算出する。本実施形態では、量子化パラメータと量子化ステップの対数が比例する。このため、第一符号化部11は、次の式(11)により量子化ステップQSを算出する。ここで、QPは量子化パラメータである。以下、第一符号化部11が行う符号化を第一符号化とする。
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing a functional configuration of a moving
復号部12は、入力されたビットストリームを復号し、復号した結果を復号映像信号とする。そして、復号部12は、復号映像信号を評価部13に出力し、復号時に取得したビットストリームの符号化情報を量子化パラメータ算出部14及び第二符号化部15に出力する。符号化情報とは、入力映像信号を第一符号化した際の情報であり、マクロブロックタイプ及びマクロブロック発生符号量を含む。マクロブロックタイプとは、マクロブロックを予測符号化及びブロック分割変換符号化した結果である。マクロブロック発生符号量(発生符号量)は、マクロブロックを符号化した際に発生する符号量である。
The
評価部13は、入力映像信号と復号映像信号を入力とし、各マクロブロックにおける入力映像信号と復号映像信号の差分(以下、差分信号とする)に基づいて、第一符号化による画質劣化評価指標を算出する。画質劣化評価指標は、歪みの度合いを示す指標である。本実施形態における画質劣化評価指標は、各マクロブロック内の輝度値の差分、分散、共分散の指標より求めるSSIMである。SSIMは、値が大きいほど画像の歪みが小さく、値が小さいほど歪みが大きいことを表す。なお、画質劣化評価指標は、差分信号の差分絶対値和または差分自乗和でもよい。そして、評価部13は、画質劣化評価指標を量子化パラメータ算出部14に出力する。ここで、評価部13は、SSIMを次の式(12)により算出する。xは入力映像信号における画像、yは復号映像信号における画像を表す。また、α1、β1、γ1は定数である。
The
式(12)を構成する要素はそれぞれ次の式(13)、式(14)、式(15)にて定義される。 Elements constituting the expression (12) are defined by the following expressions (13), (14), and (15), respectively.
ここで、l(x,y)は輝度値比較関数、c(x,y)はコントラスト値比較関数、s(x,y)は構造比較関数である。また、ここで用いられているμxは次の式(16)にて定義される。ここで、lxiは、入力映像信号におけるi番目のマクロブロックの輝度値である。また、Nは正の整数であり、マクロブロック数である。 Here, l (x, y) is a luminance value comparison function, c (x, y) is a contrast value comparison function, and s (x, y) is a structure comparison function. Further, μ x used here is defined by the following equation (16). Here, lx i is the luminance value of the i-th macroblock in the input video signal. N is a positive integer and is the number of macroblocks.
また、μyは次の式(17)にて定義される。ここで、lyiは、復号映像信号におけるi番目のマクロブロックの輝度値である。 Μ y is defined by the following equation (17). Here, ly i is the luminance value of the i-th macroblock in the decoded video signal.
また、σxは次の式(18)にて定義される。 Σ x is defined by the following equation (18).
また、σyは次の式(19)にて定義される。 Σ y is defined by the following equation (19).
また、σxyは次の式(20)にて定義される。 Σ xy is defined by the following equation (20).
量子化パラメータ算出部14は、復号部12から出力された符号化情報と評価部13から出力された画質劣化評価指標に基づいて、第二符号化部15が符号化を行う際に用いる量子化パラメータをマクロブロック毎に算出する。ここで、量子化パラメータ算出部14は、符号化情報としてはマクロブロック発生符号量を用いる。量子化パラメータの決定方法の詳細については後述する。そして、量子化パラメータ算出部14は、各マクロブロックにおける量子化パラメータの組合せである量子化パラメータセットを第二符号化部15に出力する。
The quantization
第二符号化部15は、入力映像信号と、量子化パラメータ算出部14により出力された量子化パラメータセットと、復号部12により出力された符号化情報を用いて符号化を行う。つまり、第二符号化部15は、符号化情報に含まれるマクロブロックタイプに対して量子化パラメータセットで指定された値を適用しながら符号化を行い、符号化した結果を符号化ストリームとして出力する。具体的には、第二符号化部15は、まず、量子化パラメータセットにて指定された量子化パラメータから量子化ステップを算出する。そして、第二符号化部15は、マクロブロックタイプを量子化ステップで除算し、除算した結果を整数値に丸めて量子化値を算出する。以下、第二符号化部15における符号化を第二符号化とする。
The
次に、図2を参照して動画像符号化装置10による符号化処理について説明する。図2は、本実施形態による符号化処理の手順を示すフローチャートである。まず、ステップS101において、第一符号化部11が、入力映像信号に対して第一符号化を行う。次に、ステップS102において、復号部12が、第一符号化を行った結果であるビットストリームを復号する。そして、ステップS103において、評価部13が、入力映像信号と復号映像信号の差分から画像劣化評価指標SSIMを算出する。
Next, the encoding process by the moving
次に、ステップS104において、量子化パラメータ算出部14が、目標符号化効率(Epic)の算出を行う。ここで、目標符号化効率Epic=(∂D/∂R)とは、発生符号量に対する歪みを表す値である.Dは歪みを表し、評価部13で得られる画質劣化評価指標の値である。つまり、DにはSSIMの値が入る。また、Rは符号化情報に含まれるマクロブロック発生符号量が入る。例えば、第一符号化の結果におけるマクロブロック発生符号量の平均値(平均マクロブロック発生符号量)とSSIMの平均値(平均SSIM)を用いる場合は、Epic=(∂D/∂R)=平均SSIM/平均マクロブロック発生符号量である。
Next, in step S104, the quantization
次に、ステップS105において、量子化パラメータ算出部14は、各マクロブロックにおけるレート歪み曲線f(xi)を求める。ここで、xの添え字であるiは、正の整数であり、i番目のマクロブロックを意味する。レート歪み曲線f(xi)は次の式(21)で定義する。
Next, in step S105, the quantization
ここでxiは、復号部12より得られる第一符号化時のマクロブロック発生符号量を正規化した値である。また、f(xi)は、評価部13により得られる第一符号化時の画質劣化評価指標が入る。aiはf(xi)を一意に定める変数である。すなわち、量子化パラメータ算出部14は、式(21)式を求めるために、次の式(22)によりaiを算出する。
Here, x i is a value obtained by normalizing the macroblock generation code amount at the time of the first encoding obtained from the
ここで、マクロブロック発生符号量は0から3200ビットまでと定義されるが、式(22)ではマクロブロック発生符号量を3200で割り、値域を0から1までとしたものがxiに入る。 Here, the macroblock generation code amount is defined as 0 to 3200 bits, but in equation (22), the macroblock generation code amount is divided by 3200 and the value range from 0 to 1 enters x i .
次に、ステップS106において、量子化パラメータ算出部14は、レート歪み曲線f(xi)上で目標符号化効率Epicを満たす目標発生符号量TMbBitiを求める。目標発生符号量TMbBitiとは、第二符号化におけるマクロブロック発生符号量の目標値である。目標符号化効率Epic=(∂D/∂R)は定義より、f(xi)上における傾きを意味することは明らかである。すなわち、f(xi)をxiについて微分したf′(xi)とEpicが等しくなるようなxiが目標発生符号量TMbBitiであると言える。そこで、量子化パラメータ算出部14は、次の式(23)式を用いてTMbBitiを求める。
Next, in step S106, the quantization
ここで、xi=TMbBitiであるため、量子化パラメータ算出部14は、次の式(24)により目標発生符号量TMbBitiを求める。
Here, since x i = TMbBit i , the quantization
次に、ステップS107およびステップS108において、量子化パラメータ算出部14は、第二符号化後のマクロブロック発生符号量が先程求めたTMbBitiとなる量子化パラメータを求めるために量子化パラメータ対マクロブロック発生符号量の関係を表す曲線(QP−GenBit曲線:g(yi))を算出する。量子化パラメータとマクロブロック発生符号量の値には、量子化パラメータの増加に従いマクロブロック発生符号量が減少していくという単調減少の関係がある。また、単調減少における減少幅が徐々に減少していくという特徴があるため、QP−GenBit曲線((g(yi))を式(25)の様に二次式で定義する。
Next, in step S107 and step S108, the quantization
ここで、yiは第二符号化時の量子化パラメータ、αi、βiは復号部12より得られる第一符号化時に用いたスライスタイプおよびマクロブロックタイプにより定められる定数、γiはg(yi)を一意に定める定数、g(yi)はマクロブロック発生符号量である。また、iはi番目のマクロブロックを示す。
Here, y i is a quantization parameter at the time of second encoding, α i and β i are constants determined by the slice type and macroblock type used at the time of the first encoding obtained from the
QP−GenBit曲線はスライスタイプやマクロブロックタイプによって、同一量子化パラメータ時のマクロブロック発生符号量が大きく異なる。そのため、スライスタイプやマクロブロックタイプを考慮しない場合、QP−GenBit曲線と量子化パラメータ対マクロブロック発生符号量の相関係数が小さくなることが考えられる。そこで、ステップS107では、より相関係数が大きくなるQP−GenBit曲線の形状を定めるにあたり、復号部12より得られる第一符号化時のスライスタイプおよびマクロブロックタイプから、αiおよびβiを設定する。
In the QP-GenBit curve, the macroblock generation code amount at the same quantization parameter differs greatly depending on the slice type and the macroblock type. Therefore, when the slice type and macroblock type are not taken into consideration, the correlation coefficient between the QP-GenBit curve and the quantization parameter versus the macroblock generation code amount may be small. Therefore, in step S107, α i and β i are set from the slice type and macroblock type at the time of the first encoding obtained from the
スライスタイプとはスライスの種類を表す値であり、H.264/AVCの場合は0から9の値をとり表1の様に定義されている。 The slice type is a value representing the type of slice. In the case of H.264 / AVC, values from 0 to 9 are defined as shown in Table 1.
マクロブロックタイプとはマクロブロックの種類を表す値であり、スライスタイプに応じて定められている。Iスライスの場合は表2、SIスライスの場合は表3、PスライスおよびSPスライスの場合は表4、Bスライスの場合は表5の様に定義されている。 The macroblock type is a value representing the type of macroblock and is determined according to the slice type. Table 1 is defined for I slices, Table 3 for SI slices, Table 4 for P slices and SP slices, and Table 5 for B slices.
ここで、表4中のP_Skipおよび、表5中のB_Skipについてはマクロブロックに対する情報が存在していないため、マクロブロックタイプも存在しておらず空欄となっている。 Here, for P_Skip in Table 4 and B_Skip in Table 5, there is no information about the macroblock, so the macroblock type does not exist and is blank.
QP−GenBit曲線の形状およびX軸方向の位置を定めるαiおよびβiの値をスライスタイプ、マクロブロックタイプ毎に事前に定めておく。αiおよびβiを決定するにあたり、実験により予め複数のマクロブロックについて量子化パラメータ0から51について符号化を行い、マクロブロック発生符号量およびSSIMのデータをとる。そして、符号化結果より、スライスタイプおよびマクロブロックタイプ毎に分類しそれぞれにおいて平均マクロブロック発生符号量及び平均SSIMを各量子化パラメータについてとり、それらの点(52点)に対して最小二乗法を用いることで近似曲線を求める。 The values of α i and β i that determine the shape of the QP-GenBit curve and the position in the X-axis direction are determined in advance for each slice type and macroblock type. In determining α i and β i , a plurality of macroblocks are previously encoded for quantization parameters 0 to 51 by experiment to obtain macroblock generation code amount and SSIM data. Then, from the encoding result, classification is performed for each slice type and macroblock type, and the average macroblock generation code amount and average SSIM are taken for each quantization parameter, and the least square method is applied to those points (52 points). An approximate curve is obtained by using this.
ここで得られた二次曲線のyi 2とyiの係数をそれぞれα(SliceType;MBType)及び、β(SliceType;MBType)と定め、復号部12より得られる第一符号化時に用いたスライスタイプおよびマクロブロックタイプに応じて式(26)、式(27)の通りαiおよびβiを定める。
The coefficients of y i 2 and y i of the quadratic curve obtained here are defined as α (SliceType; MBType) and β (SliceType; MBType), respectively, and the slice used at the time of the first encoding obtained from the
ここで、スライスタイプの分類については必ずしも0から9の値の全10種類を用いる必要はない。例えばスライスタイプが0と5の場合はどちらもPスライスなので、それらを同一であると扱うことも可能である。この時、スライスタイプ0と5のデータをまとめてからα(SliceType;MBType)、β(SliceType;MBType)の計算を行っても良い。 Here, it is not always necessary to use all 10 types of values from 0 to 9 for the classification of slice types. For example, when the slice types are 0 and 5, since both are P slices, they can be treated as being the same. At this time, α (SliceType; MBType) and β (SliceType; MBType) may be calculated after combining the data of slice types 0 and 5.
同様に、マクロブロックの分類についても、必要に応じていくつかのマクロブロックタイプを集約して考えても良い。例えばIスライスの場合はマクロブロックタイプ1から24までは予測モードが全て同一なので、QP−GenBit曲線の傾向が似ていることが考えられる。この時、マクロブロックタイプは0、1〜24、25の合計3つのマクロブロックタイプがIスライスに存在すると考えることが可能である。ここでは表6のようにα(SliceType;MBType)、β(SliceType;MBType)を定める。
Similarly, regarding macroblock classification, several macroblock types may be aggregated as necessary. For example, in the case of an I slice, since the prediction modes are the same for
表6においては、IスライスおよびPスライスのマクロブロックに対して値を定め、その他のスライスタイプおよびマクロブロックタイプについては全てその他の欄にある値を用いるようにしている。また、スライスタイプおよびマクロブロックタイプの分類方法は表6の限りではない。 In Table 6, values are determined for macro blocks of I slices and P slices, and values in other columns are used for all other slice types and macro block types. Further, the classification method of the slice type and the macroblock type is not limited to Table 6.
次に、ステップS108において、第二符号化時の量子化パラメータを求めるにあたり、量子化パラメータ算出部14は、まずはじめに式(28)に、復号部12より得られる第一符号化時の量子化パラメータおよびマクロブロック発生符号量およびステップS107において設定したαiおよびβiを代入し、γiを求め、各マクロブロックのQP−GenBit曲線(g(yi))を一意に定める。
Next, in step S108, when obtaining the quantization parameter at the time of the second encoding, the quantization
次に、ステップS109において、量子化パラメータ算出部14は、式(25)で求めたQPGenBit曲線(g(yi))を一意に定める変数γiおよび、式(23)で求めた目標発生符号量TMbBitiを式(29)へ代入し、第二符号化時の量子化パラメータyiを求める。
Next, in step S109, the quantization
ここで、yiの解を一意に求めるために、0<yi<51という制約を設ける。そして、ステップS110において、量子化パラメータ算出部14は、全てのマクロブロックについて、量子化パラメータyiを出力したか否かを判定する。全てのマクロブロックにおける量子化パラメータyiを算出した場合には、ステップS111へ進む。一方、全てのマクロブロックにおける量子化パラメータyiを算出していない場合には、ステップS105へ戻る。そして、全てのマクロブロックについてyiを求めた後、ステップS111において、第二符号化部15が、量子化パラメータyiを用いて第二符号化を行う。
Here, in order to uniquely find a solution of y i , a constraint of 0 <y i <51 is provided. In step S110, the quantization
このように、αi、βiの定数をスライスタイプ・マクロブロックタイプにより定めるようにしたため、マクロブロック発生符号量から量子化パラメータを求めることができるようになり、結果的に符号化効率の改善を実現することができる。 As described above, since the constants α i and β i are determined by the slice type and the macro block type, the quantization parameter can be obtained from the macro block generation code amount, and as a result, the coding efficiency is improved. Can be realized.
図3は、本実施形態における動画像符号化装置10にて実験を行った結果を示すグラフである。本図において、横軸はマクロブロック発生符号量(単位はkbit/s)であり、縦軸は画質劣化評価指標SSIMである。また、実線101は第二符号化を行った結果を示しており、実線102は第一符号化を行った結果を示している。本図における実験は、ITE(映像情報メディア学会)における標準画像の一つであるSoccer AcctionのSDTV(Standard Definition Television)サイズ(720×480)、インタレース、フレーム数450フレームについて行った。SSIMは、値が大きいほど画像の歪みが小さく、値が小さいほど歪みが大きいことを表す。このため、図示するように、第二符号化を行った結果は、第一符号化を行った結果と比べて符号化効率が向上していることが確認できる。
FIG. 3 is a graph showing a result of an experiment performed by the moving
このように、本実施形態によれば、動画像符号化装置10は、画像劣化評価指標から量子化パラメータを算出し、算出した量子化パラメータを用いて第二符号化を行っている。このため、最適な量子化パラメータを設定可能となり、主観的な画像品質が向上し符号化効率を向上することができる。
As described above, according to the present embodiment, the moving
また、図2に示す各ステップを実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、符号化処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものであってもよい。また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。 2 is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed, thereby executing an encoding process. You may go. Here, the “computer system” may include an OS and hardware such as peripheral devices. Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used. The “computer-readable recording medium” means a flexible disk, a magneto-optical disk, a ROM, a writable nonvolatile memory such as a flash memory, a portable medium such as a CD-ROM, a hard disk built in a computer system, etc. This is a storage device.
さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。 Further, the “computer-readable recording medium” means a volatile memory (for example, DRAM (Dynamic DRAM) in a computer system that becomes a server or a client when a program is transmitted through a network such as the Internet or a communication line such as a telephone line. Random Access Memory)), etc., which hold programs for a certain period of time. The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.
以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to
映像入力信号を一度符号化した結果に対する画質劣化評価指標を用いて、再度映像入力信号を符号化する際に用いる量子化パラメータを算出することが不可欠な用途にも適用できる。 The present invention can also be applied to an application in which it is indispensable to calculate a quantization parameter used when encoding a video input signal again using an image quality degradation evaluation index for a result of encoding the video input signal once.
10…動画像符号化装置、11…第一符号化部、12…復号部、13…評価部、14…量子化パラメータ算出部、15…第二符号化部
DESCRIPTION OF
Claims (7)
前記第一符号化部が生成したビットストリームを復号して復号映像信号および第一符号化時の符号化情報を生成する復号部と、
前記復号部が復号した復号映像信号と前記入力映像信号との差分に基づいて、前記復号映像信号における歪みの度合いを示す画質劣化評価指標を算出する評価部と、
前記評価部が算出した画質劣化評価指標と前記復号部が出力したスライスタイプ、マクロブロックタイプ及びマクロブロック発生符号量を含む符号化情報に基づいて第二量子化パラメータを算出する量子化パラメータ算出部と、
前記量子化パラメータ算出部が算出した第二量子化パラメータを用いて前記入力映像信号に対し符号化を行う第二符号化部と
を備えることを特徴とする動画像符号化装置。 A first encoding unit that encodes an input video signal using a predetermined first quantization parameter to generate a bitstream;
A decoding unit that decodes the bitstream generated by the first encoding unit to generate a decoded video signal and encoding information at the time of the first encoding;
An evaluation unit that calculates an image quality degradation evaluation index indicating a degree of distortion in the decoded video signal based on a difference between the decoded video signal decoded by the decoding unit and the input video signal;
A quantization parameter calculation unit that calculates the second quantization parameter based on the image quality degradation evaluation index calculated by the evaluation unit and the encoding information including the slice type, macroblock type, and macroblock generation code amount output by the decoding unit When,
A video encoding device comprising: a second encoding unit that encodes the input video signal using the second quantization parameter calculated by the quantization parameter calculation unit.
前記第一符号化部が、入力映像信号に対し、所定の第一量子化パラメータを用いて符号化を行いビットストリームを生成する第一符号化ステップと、
前記復号部が、前記第一符号化ステップにより生成したビットストリームを復号して復号映像信号および第一符号化時の符号化情報を生成する復号ステップと、
前記評価部が、前記復号ステップにより復号した復号映像信号と前記入力映像信号との差分に基づいて、前記復号映像信号における歪みの度合いを示す画質劣化評価指標を算出する評価ステップと、
前記量子化パラメータ算出部が、前記評価ステップにより算出した画質劣化評価指標と前記復号ステップにより生成されたスライスタイプ、マクロブロックタイプ及びマクロブロック発生符号量を含む符号化情報に基づいて第二量子化パラメータを算出する量子化パラメータ算出ステップと、
前記第二符号化部が、前記量子化パラメータ算出ステップにより算出した第二量子化パラメータを用いて前記入力映像信号に対し符号化を行う第二符号化ステップと
を有することを特徴とする動画像符号化方法。 A moving image encoding method in a moving image encoding device including a first encoding unit, a decoding unit, an evaluation unit, a quantization parameter calculation unit, and a second encoding unit,
The first encoding unit encodes the input video signal using a predetermined first quantization parameter to generate a bitstream; and
A decoding step in which the decoding unit decodes the bitstream generated in the first encoding step to generate a decoded video signal and encoding information at the time of the first encoding;
An evaluation step in which the evaluation unit calculates an image quality degradation evaluation index indicating a degree of distortion in the decoded video signal based on a difference between the decoded video signal decoded in the decoding step and the input video signal;
The quantization parameter calculation unit is configured to perform second quantization based on encoding information including an image quality degradation evaluation index calculated in the evaluation step and a slice type, a macroblock type, and a macroblock generation code amount generated in the decoding step. A quantization parameter calculating step for calculating a parameter;
The second encoding unit has a second encoding step for encoding the input video signal using the second quantization parameter calculated in the quantization parameter calculating step. Encoding method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010249968A JP2012104940A (en) | 2010-11-08 | 2010-11-08 | Moving image encoder, moving image encoding method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010249968A JP2012104940A (en) | 2010-11-08 | 2010-11-08 | Moving image encoder, moving image encoding method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012104940A true JP2012104940A (en) | 2012-05-31 |
Family
ID=46394880
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010249968A Pending JP2012104940A (en) | 2010-11-08 | 2010-11-08 | Moving image encoder, moving image encoding method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2012104940A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015033510A1 (en) | 2013-09-09 | 2015-03-12 | 日本電気株式会社 | Video-encoding device, video-encoding method, and program |
US10116944B2 (en) | 2014-02-10 | 2018-10-30 | Nec Corporation | Video encoding device, video encoding method, and program |
US10298941B2 (en) | 2014-02-10 | 2019-05-21 | Nec Corporation | Video encoding device, video encoding method, and program |
JP2020053820A (en) * | 2018-09-26 | 2020-04-02 | 株式会社Preferred Networks | Quantization and encoder creation method, compressor creation method, compressor creation apparatus, and program |
CN112585968A (en) * | 2018-08-27 | 2021-03-30 | Ati科技无限责任公司 | Benefit-based bit rate allocation for video coding |
-
2010
- 2010-11-08 JP JP2010249968A patent/JP2012104940A/en active Pending
Non-Patent Citations (2)
Title |
---|
CSNG201001030006; 横張和也、中島靖之、嵯峨田淳、上倉一人: 'マクロブロックのレート・歪み特性およびマクロブロックタイプに着目した2パス符号化アルゴリズム' 映像情報メディア学会技術報告 Vol.34,No.45, 20101104, p.35-39, (社)映像情報メディア学会 * |
JPN6013019455; 横張和也、中島靖之、嵯峨田淳、上倉一人: 'マクロブロックのレート・歪み特性およびマクロブロックタイプに着目した2パス符号化アルゴリズム' 映像情報メディア学会技術報告 Vol.34,No.45, 20101104, p.35-39, (社)映像情報メディア学会 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015033510A1 (en) | 2013-09-09 | 2015-03-12 | 日本電気株式会社 | Video-encoding device, video-encoding method, and program |
US10116944B2 (en) | 2014-02-10 | 2018-10-30 | Nec Corporation | Video encoding device, video encoding method, and program |
US10298941B2 (en) | 2014-02-10 | 2019-05-21 | Nec Corporation | Video encoding device, video encoding method, and program |
CN112585968A (en) * | 2018-08-27 | 2021-03-30 | Ati科技无限责任公司 | Benefit-based bit rate allocation for video coding |
JP2020053820A (en) * | 2018-09-26 | 2020-04-02 | 株式会社Preferred Networks | Quantization and encoder creation method, compressor creation method, compressor creation apparatus, and program |
JP7233875B2 (en) | 2018-09-26 | 2023-03-07 | 株式会社Preferred Networks | Creation method, computer and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5283628B2 (en) | Video decoding method and video encoding method | |
US8249145B2 (en) | Estimating sample-domain distortion in the transform domain with rounding compensation | |
KR101375664B1 (en) | Method and apparatus of encoding/decoding image using diffusion property of image | |
JP2006140758A (en) | Method, apparatus and program for encoding moving image | |
US7970050B2 (en) | Method and apparatus for encoding and decoding data in intra mode based on multiple scanning | |
JP2008507190A (en) | Motion compensation method | |
JP2006180497A (en) | Method and apparatus for generating quantization matrix that can be used for encoding image or picture sequence | |
CN101009839A (en) | Method for video encoding or decoding based on orthogonal transform and vector quantization, and apparatus thereof | |
Dar et al. | Motion-compensated coding and frame rate up-conversion: Models and analysis | |
US11134250B2 (en) | System and method for controlling video coding within image frame | |
JPWO2006101126A1 (en) | Encoding device and moving image recording system provided with encoding device | |
KR100694093B1 (en) | Apparatus for and method of predicting coefficients of video block | |
JP5377395B2 (en) | Encoding device, decoding device, and program | |
JP2012104940A (en) | Moving image encoder, moving image encoding method and program | |
JP7343817B2 (en) | Encoding device, encoding method, and encoding program | |
KR20050012782A (en) | A method and system for optimizing image sharpness during coding | |
JP6837110B2 (en) | Video decoding method | |
JP2004215275A (en) | Motion compensation based improved noise prediction method and apparatus, and moving image encoding method and apparatus using the same | |
JP5306282B2 (en) | Moving picture coding apparatus, moving picture coding method, and program | |
JPH07203430A (en) | Image coding device | |
JP2013121044A (en) | Image encoder and image encoding method | |
JP5358485B2 (en) | Image encoding device | |
JP5937926B2 (en) | Image encoding device, image decoding device, image encoding program, and image decoding program | |
JP4243286B2 (en) | Encoding method | |
JP2008153802A (en) | Moving picture encoding device and moving picture encoding program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130123 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130417 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130423 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20130605 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20130726 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130820 |