JP2012104940A - Moving image encoder, moving image encoding method and program - Google Patents

Moving image encoder, moving image encoding method and program Download PDF

Info

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
Application number
JP2010249968A
Other languages
Japanese (ja)
Inventor
Kazuya Yokohari
和也 横張
Yasuyuki Nakajima
靖之 中島
Atsushi Sagata
淳 嵯峨田
Kazuto Kamikura
一人 上倉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2010249968A priority Critical patent/JP2012104940A/en
Publication of JP2012104940A publication Critical patent/JP2012104940A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a moving image encoder capable of improving subjective image quality and improving encoding efficiency.SOLUTION: The moving image encoder includes: a first encoding part for encoding input video signals using a prescribed first quantization parameter and generating a bit stream; a decoding part for decoding the bit stream generated by the first encoding part and generating decoded video signals and encoding information for the time of first encoding; an evaluation part for calculating an image quality degradation evaluation index indicating the degree of distortion in the decoded video signals on the basis of a difference between the decoded video signals decoded by the decoding part and the input video signals; a quantization parameter calculation part for calculating a second quantization parameter on the basis of the image quality degradation evaluation index calculated by the evaluation part and the encoding information, outputted by the decoding part, including a slice type, a macro block type and a macro block generation code amount; and a second encoding part for encoding the input video signals using the second quantization parameter calculated by the quantization parameter calculation part.

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 picture coding apparatus 20 that performs coding combining prediction coding and block division transform coding. The moving picture coding apparatus 20 includes a predictive coding unit 21, a block division transform coding unit 22, and a quantization unit 23. The predictive encoding unit 21 receives a video signal to be encoded (hereinafter referred to as an input video signal), and performs intraframe prediction encoding and motion compensation interframe prediction encoding on a macroblock in the input video signal. I do. Then, the predictive encoding unit 21 outputs the generated prediction error signal to the block division transform encoding unit 22. The block division transform encoding unit 22 performs discrete cosine transform on the input prediction error signal, thereby transforming the frequency component into a frequency component and using the transformed frequency component as an orthogonal transform coefficient. This removes spatial redundancy. The quantization unit 23 rounds the result obtained by dividing the orthogonal transform coefficient transformed by the block division transform coding unit 22 by a specified value (hereinafter referred to as a quantization step) to an integer value, and quantizes the result rounded to an integer value. It is a digitized value. That is, the quantization unit 23 associates the input orthogonal transform coefficient with one of the predetermined quantization representative values. As a result, the code amount is significantly reduced while allowing distortion due to quantization.

ここで、符号化を行う際、量子化部23は、最初に各マクロブロックに対して量子化パラメータ(0から51までの整数値)を決定し、決定した量子化パラメータに基づいて量子化ステップを導出する。量子化パラメータとは、量子化ステップを決定するパラメータである。例えば、H.264/AVCでは量子化パラメータと量子化ステップの対数が比例する。具体的には、量子化パラメータが6増加すると量子化ステップが2倍になる。そして、量子化部23は、直交変換係数を量子化ステップで除算した結果を整数値に丸めることにより量子化値を算出する。   Here, when performing encoding, the quantization unit 23 first determines a quantization parameter (an integer value from 0 to 51) for each macroblock, and performs a quantization step based on the determined quantization parameter. Is derived. The quantization parameter is a parameter that determines the quantization step. For example, H.M. In H.264 / AVC, the logarithm of the quantization parameter and the quantization step is proportional. Specifically, when the quantization parameter is increased by 6, the quantization step is doubled. Then, the quantization unit 23 calculates a quantization value by rounding the result obtained by dividing the orthogonal transform coefficient by the quantization step to an integer value.

非特許文献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.

ITU-T Rec. H.264 - ISO/IEC 14496-10, "Advanced video codingfor generic audiovisual service",Mar. 2010. http://www.itu.int/rec/T-REC-H.264 2009, 2009.ITU-T Rec. H.264-ISO / IEC 14496-10, "Advanced video coding for generic audiovisual service", Mar. 2010. http://www.itu.int/rec/T-REC-H.264 2009, 2009. Zhou Wang, Alan Conrad Bovik, Hamid Rahim Sheikh, Eero P. Simoncelli, "Image QualityAssessment: From Error Visibility to Structural Similarity," IEEE Transactions on Image Pro-cessing, vol. 13, no. 4, pp. 600-612, Apr. 2004.Zhou Wang, Alan Conrad Bovik, Hamid Rahim Sheikh, Eero P. Simoncelli, "Image Quality Assessment: From Error Visibility to Structural Similarity," IEEE Transactions on Image Pro-cessing, vol. 13, no. 4, pp. 600-612, Apr. 2004. "マクロブロックのレート・歪特性に着目した高効率2パス符号化アルゴリズムの検討"、横張和也、嵯峨田淳、上倉一人、情報処理学会「第68回オーディオビジュアル複合情報処理研究発表会」Vol.2010-AVM-68 No.2、平成22年2月25日"Study of high-efficiency two-pass coding algorithm focusing on rate / distortion characteristics of macroblock", Kazuya Yokobari, Satoshi Tomita, Kazuo Uekura, Information Processing Society of Japan "68th Audio-Visual Complex Information Processing" .2010-AVM-68 No.2, February 25, 2010

従来技術では、量子化部23において量子化を行うことで符号量を削減しているが、この時量子化による歪みを許容しているため、歪みが発生する場合がある。しかしながら、発生した歪みがどの様な歪みなのか、どの程度歪んでいるのかを、事前に知る事は出来ない。それ故、量子化する際に用いる量子化パラメータを事前に最適化することは困難であり、その結果、量子化による歪みが画像の品質に悪影響を与える場合がある、という問題がある。   In the prior art, the amount of code is reduced by performing quantization in the quantizing unit 23. However, since distortion due to quantization is allowed at this time, distortion may occur. However, it is impossible to know in advance how much the generated distortion is and how much it is distorted. Therefore, it is difficult to optimize in advance the quantization parameter used for quantization, and as a result, there is a problem that distortion due to quantization may adversely affect image quality.

本発明は、このような事情に鑑みてなされたもので、符号化する際に用いる適切な量子化パラメータを設定し、量子化による歪みを抑えることにより、主観画像品質を向上し、符号化効率を向上させることができる動画像符号化装置、動画像符号化方法及びプログラムを提供することを目的とする。   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(x)に関し、

Figure 2012104940
マクロブロック番号をiとし、前記画質劣化評価指標を前記レート歪み曲線f(x)とし、前記マクロブロック発生符号量を正規化した値をxとして式(1)におけるa を式(2)により算出し、
Figure 2012104940
発生符号量に対する前記画質劣化評価指標を表す目標符号化効率をEpicとして、マクロブロック発生符号量の目標値である目標マクロブロック発生符号量TMbBitを式(3)により算出し、
Figure 2012104940
前記マクロブロック発生符号量をg(y)とし、α、βを前記スライスタイプ及びマクロブロックタイプより所定の値から選択し、前記第一量子化パラメータをyとして、定数γを式(4)により算出し、
Figure 2012104940
前記目標マクロブロック発生符号量をTMbBitとし、α、β、γの値として、第二量子化パラメータyを式(5)により算出し、
Figure 2012104940
前記第二量子化パラメータを算出することを特徴とする。 In the present invention, the quantization parameter calculation unit relates to a rate distortion curve f (x i ) defined by Equation (1),
Figure 2012104940
The macro block number is i, the image quality degradation evaluation index is the rate distortion curve f (x i ), the value obtained by normalizing the macro block generation code amount is x i , and a i in the equation (1) is expressed by the equation (2) )
Figure 2012104940
A target coding efficiency TMbBit i , which is a target value of the macroblock generation code amount, is calculated by Equation (3), where E pic is the target coding efficiency representing the image quality degradation evaluation index for the generated code amount,
Figure 2012104940
The macroblock generation code amount is g (y i ), α i and β i are selected from predetermined values from the slice type and macro block type, the first quantization parameter is y i , and the constant γ i is Calculated by equation (4),
Figure 2012104940
The target macroblock generation code amount is set to TMbBit i, and the second quantization parameter y i is calculated by Equation (5) as the values of α i , β i , and γ i .
Figure 2012104940
The second quantization parameter is calculated.

本発明は、第一符号化部と、復号部と、評価部と、量子化パラメータ算出部と、第二符号化部と備える動画像符号化装置における動画像符号化方法であって、前記第一符号化部が、入力映像信号に対し、所定の第一量子化パラメータを用いて符号化を行いビットストリームを生成する第一符号化ステップと、前記復号部が、前記第一符号化ステップにより生成したビットストリームを復号して復号映像信号および第一符号化時の符号化情報を生成する復号ステップと、前記評価部が、前記復号ステップにより復号した復号映像信号と前記入力映像信号との差分に基づいて、前記復号映像信号における歪みの度合いを示す画質劣化評価指標を算出する評価ステップと、前記量子化パラメータ算出部が、前記評価ステップにより算出した画質劣化評価指標と前記復号ステップにより生成されたスライスタイプ、マクロブロックタイプ及びマクロブロック発生符号量を含む符号化情報に基づいて第二量子化パラメータを算出する量子化パラメータ算出ステップと、前記第二符号化部が、前記量子化パラメータ算出ステップにより算出した第二量子化パラメータを用いて前記入力映像信号に対し符号化を行う第二符号化ステップとを有することを特徴とする。   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(x)に関し、

Figure 2012104940
マクロブロック番号をiとし、前記画質劣化評価指標を前記レート歪み曲線f(x)とし、前記マクロブロック発生符号量を正規化した値をxとして式(6)におけるa を式(2)により算出し、
Figure 2012104940
発生符号量に対する前記画質劣化評価指標を表す目標符号化効率をEpicとして、マクロブロック発生符号量の目標値である目標マクロブロック発生符号量TMbBitを式(8)により算出し、
Figure 2012104940
前記マクロブロック発生符号量をg(y)とし、α、βを前記スライスタイプ及びマクロブロックタイプより所定の値から選択し、前記第一量子化パラメータをyとして、定数γを式(9)により算出し、
Figure 2012104940
前記目標マクロブロック発生符号量をTMbBitとし、α、β、γの値として、第二量子化パラメータyを式(10)により算出し、
Figure 2012104940
前記第二量子化パラメータを算出することを特徴とする。 In the present invention, the quantization parameter calculation step relates to a rate distortion curve f (x i ) defined by Equation (6),
Figure 2012104940
The macro block number is i, the image quality degradation evaluation index is the rate distortion curve f (x i ), the value obtained by normalizing the macro block generation code amount is x i , and a i in the equation (6) is expressed by the equation (2). )
Figure 2012104940
A target coding efficiency TMbBit i , which is a target value of the macroblock generated code quantity, is calculated by Expression (8), where E pic is the target coding efficiency representing the image quality degradation evaluation index with respect to the generated code quantity,
Figure 2012104940
The macroblock generation code amount is g (y i ), α i and β i are selected from predetermined values from the slice type and macro block type, the first quantization parameter is y i , and the constant γ i is Calculated by equation (9),
Figure 2012104940
The target macroblock generation code amount is set as TMbBit i , α i , β i , and γ i are calculated as values of the second quantization parameter y i according to Equation (10),
Figure 2012104940
The second quantization parameter is calculated.

動画像符号化装置上のコンピュータに、請求項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.

本実施形態による動画像符号化装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the moving image encoder by this embodiment. 本実施形態による符号化処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the encoding process by this embodiment. 本実施形態における動画像符号化装置にて実験を行った結果を示すグラフである。It is a graph which shows the result of having experimented with the moving image encoder in this embodiment. 従来技術における動画像符号化装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the moving image encoder in a prior art.

以下、本発明の一実施形態を、図面を参照して詳しく説明する。図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 picture encoding apparatus 10 according to the present embodiment. The moving image encoding apparatus 10 includes a first encoding unit 11, a decoding unit 12, an evaluation unit 13, a quantization parameter calculation unit 14, and a second encoding unit 15. The first encoding unit 11 receives a video signal to be encoded (hereinafter referred to as an input video signal), encodes the input video signal, and sets the encoded result as a bit stream. Then, the first encoding unit 11 outputs the bit stream to the decoding unit 12. Specifically, the first encoding unit 11 first performs predictive encoding and block division transform encoding on each macroblock in the input video signal. Next, the first encoding unit 11 divides an orthogonal transform coefficient, which is a result of performing block division transform coding, by a quantization step. Then, the first encoding unit 11 rounds the division result to an integer value and calculates a quantized value. At this time, the first encoding unit 11 calculates a quantization step from the quantization parameter set in advance for each macroblock. In the present embodiment, the logarithm of the quantization parameter and the quantization step is proportional. For this reason, the first encoding unit 11 calculates the quantization step QS using the following equation (11). Here, QP is a quantization parameter. Hereinafter, the encoding performed by the first encoding unit 11 is referred to as first encoding.

Figure 2012104940
Figure 2012104940

復号部12は、入力されたビットストリームを復号し、復号した結果を復号映像信号とする。そして、復号部12は、復号映像信号を評価部13に出力し、復号時に取得したビットストリームの符号化情報を量子化パラメータ算出部14及び第二符号化部15に出力する。符号化情報とは、入力映像信号を第一符号化した際の情報であり、マクロブロックタイプ及びマクロブロック発生符号量を含む。マクロブロックタイプとは、マクロブロックを予測符号化及びブロック分割変換符号化した結果である。マクロブロック発生符号量(発生符号量)は、マクロブロックを符号化した際に発生する符号量である。   The decoding unit 12 decodes the input bit stream and uses the decoded result as a decoded video signal. Then, the decoding unit 12 outputs the decoded video signal to the evaluation unit 13, and outputs the encoded information of the bitstream acquired at the time of decoding to the quantization parameter calculation unit 14 and the second encoding unit 15. The encoding information is information when the input video signal is first encoded, and includes a macroblock type and a macroblock generation code amount. The macro block type is a result of predictive coding and block division transform coding of a macro block. The macroblock generated code amount (generated code amount) is a code amount generated when a macroblock is encoded.

評価部13は、入力映像信号と復号映像信号を入力とし、各マクロブロックにおける入力映像信号と復号映像信号の差分(以下、差分信号とする)に基づいて、第一符号化による画質劣化評価指標を算出する。画質劣化評価指標は、歪みの度合いを示す指標である。本実施形態における画質劣化評価指標は、各マクロブロック内の輝度値の差分、分散、共分散の指標より求めるSSIMである。SSIMは、値が大きいほど画像の歪みが小さく、値が小さいほど歪みが大きいことを表す。なお、画質劣化評価指標は、差分信号の差分絶対値和または差分自乗和でもよい。そして、評価部13は、画質劣化評価指標を量子化パラメータ算出部14に出力する。ここで、評価部13は、SSIMを次の式(12)により算出する。xは入力映像信号における画像、yは復号映像信号における画像を表す。また、α、β、γは定数である。 The evaluation unit 13 receives the input video signal and the decoded video signal, and based on the difference between the input video signal and the decoded video signal in each macroblock (hereinafter referred to as a differential signal), the image quality degradation evaluation index by the first encoding Is calculated. The image quality degradation evaluation index is an index indicating the degree of distortion. The image quality degradation evaluation index in the present embodiment is an SSIM obtained from the luminance value difference, variance, and covariance indices in each macroblock. SSIM indicates that the larger the value, the smaller the image distortion, and the smaller the value, the larger the distortion. The image quality degradation evaluation index may be a sum of absolute differences or a sum of squares of the difference signals. Then, the evaluation unit 13 outputs the image quality degradation evaluation index to the quantization parameter calculation unit 14. Here, the evaluation unit 13 calculates the SSIM by the following equation (12). x represents an image in the input video signal, and y represents an image in the decoded video signal. Α 1 , β 1 , and γ 1 are constants.

Figure 2012104940
Figure 2012104940

式(12)を構成する要素はそれぞれ次の式(13)、式(14)、式(15)にて定義される。   Elements constituting the expression (12) are defined by the following expressions (13), (14), and (15), respectively.

Figure 2012104940
Figure 2012104940

Figure 2012104940
Figure 2012104940

Figure 2012104940
Figure 2012104940

ここで、l(x,y)は輝度値比較関数、c(x,y)はコントラスト値比較関数、s(x,y)は構造比較関数である。また、ここで用いられているμは次の式(16)にて定義される。ここで、lxは、入力映像信号における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.

Figure 2012104940
Figure 2012104940

また、μは次の式(17)にて定義される。ここで、lyは、復号映像信号における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.

Figure 2012104940
Figure 2012104940

また、σは次の式(18)にて定義される。 Σ x is defined by the following equation (18).

Figure 2012104940
Figure 2012104940

また、σは次の式(19)にて定義される。 Σ y is defined by the following equation (19).

Figure 2012104940
Figure 2012104940

また、σxyは次の式(20)にて定義される。 Σ xy is defined by the following equation (20).

Figure 2012104940
Figure 2012104940

量子化パラメータ算出部14は、復号部12から出力された符号化情報と評価部13から出力された画質劣化評価指標に基づいて、第二符号化部15が符号化を行う際に用いる量子化パラメータをマクロブロック毎に算出する。ここで、量子化パラメータ算出部14は、符号化情報としてはマクロブロック発生符号量を用いる。量子化パラメータの決定方法の詳細については後述する。そして、量子化パラメータ算出部14は、各マクロブロックにおける量子化パラメータの組合せである量子化パラメータセットを第二符号化部15に出力する。   The quantization parameter calculation unit 14 is a quantization used when the second encoding unit 15 performs encoding based on the encoding information output from the decoding unit 12 and the image quality degradation evaluation index output from the evaluation unit 13. Parameters are calculated for each macroblock. Here, the quantization parameter calculation unit 14 uses a macroblock generation code amount as the encoding information. Details of the quantization parameter determination method will be described later. Then, the quantization parameter calculation unit 14 outputs a quantization parameter set that is a combination of quantization parameters in each macroblock to the second encoding unit 15.

第二符号化部15は、入力映像信号と、量子化パラメータ算出部14により出力された量子化パラメータセットと、復号部12により出力された符号化情報を用いて符号化を行う。つまり、第二符号化部15は、符号化情報に含まれるマクロブロックタイプに対して量子化パラメータセットで指定された値を適用しながら符号化を行い、符号化した結果を符号化ストリームとして出力する。具体的には、第二符号化部15は、まず、量子化パラメータセットにて指定された量子化パラメータから量子化ステップを算出する。そして、第二符号化部15は、マクロブロックタイプを量子化ステップで除算し、除算した結果を整数値に丸めて量子化値を算出する。以下、第二符号化部15における符号化を第二符号化とする。   The second encoding unit 15 performs encoding using the input video signal, the quantization parameter set output by the quantization parameter calculation unit 14, and the encoding information output by the decoding unit 12. That is, the second encoding unit 15 performs encoding while applying the value specified by the quantization parameter set to the macroblock type included in the encoding information, and outputs the encoded result as an encoded stream. To do. Specifically, the second encoding unit 15 first calculates a quantization step from the quantization parameter specified in the quantization parameter set. Then, the second encoding unit 15 divides the macroblock type by the quantization step, rounds the result of the division to an integer value, and calculates a quantization value. Hereinafter, the encoding in the second encoding unit 15 is referred to as second encoding.

次に、図2を参照して動画像符号化装置10による符号化処理について説明する。図2は、本実施形態による符号化処理の手順を示すフローチャートである。まず、ステップS101において、第一符号化部11が、入力映像信号に対して第一符号化を行う。次に、ステップS102において、復号部12が、第一符号化を行った結果であるビットストリームを復号する。そして、ステップS103において、評価部13が、入力映像信号と復号映像信号の差分から画像劣化評価指標SSIMを算出する。   Next, the encoding process by the moving image encoding device 10 will be described with reference to FIG. FIG. 2 is a flowchart showing the procedure of the encoding process according to this embodiment. First, in step S101, the first encoding unit 11 performs first encoding on the input video signal. Next, in step S102, the decoding unit 12 decodes the bitstream that is the result of the first encoding. In step S103, the evaluation unit 13 calculates an image degradation evaluation index SSIM from the difference between the input video signal and the decoded video signal.

次に、ステップS104において、量子化パラメータ算出部14が、目標符号化効率(Epic)の算出を行う。ここで、目標符号化効率Epic=(∂D/∂R)とは、発生符号量に対する歪みを表す値である.Dは歪みを表し、評価部13で得られる画質劣化評価指標の値である。つまり、DにはSSIMの値が入る。また、Rは符号化情報に含まれるマクロブロック発生符号量が入る。例えば、第一符号化の結果におけるマクロブロック発生符号量の平均値(平均マクロブロック発生符号量)とSSIMの平均値(平均SSIM)を用いる場合は、Epic=(∂D/∂R)=平均SSIM/平均マクロブロック発生符号量である。 Next, in step S104, the quantization parameter calculation unit 14 calculates the target encoding efficiency (E pic ). Here, the target coding efficiency E pic = (∂D / ∂R) is a value representing distortion with respect to the generated code amount. D represents distortion and is a value of an image quality degradation evaluation index obtained by the evaluation unit 13. That is, the value of SSIM is entered in D. Also, R is a macroblock generation code amount included in the encoding information. For example, when using the average value of the macroblock generation code amount (average macroblock generation code amount) and the SSIM average value (average SSIM) in the first encoding result, E pic = (∂D / ∂R) = Average SSIM / average macroblock generation code amount.

次に、ステップS105において、量子化パラメータ算出部14は、各マクロブロックにおけるレート歪み曲線f(x)を求める。ここで、xの添え字であるiは、正の整数であり、i番目のマクロブロックを意味する。レート歪み曲線f(x)は次の式(21)で定義する。 Next, in step S105, the quantization parameter calculation unit 14 obtains a rate distortion curve f (x i ) in each macroblock. Here, i, which is a subscript of x, is a positive integer and means the i-th macroblock. The rate distortion curve f (x i ) is defined by the following equation (21).

Figure 2012104940
Figure 2012104940

ここでxは、復号部12より得られる第一符号化時のマクロブロック発生符号量を正規化した値である。また、f(x)は、評価部13により得られる第一符号化時の画質劣化評価指標が入る。aはf(x)を一意に定める変数である。すなわち、量子化パラメータ算出部14は、式(21)式を求めるために、次の式(22)によりaを算出する。 Here, x i is a value obtained by normalizing the macroblock generation code amount at the time of the first encoding obtained from the decoding unit 12. Further, f (x i ) is an image quality degradation evaluation index at the time of the first encoding obtained by the evaluation unit 13. a i is a variable that uniquely defines f (x i ). That is, the quantization parameter calculation unit 14 calculates a i by the following equation (22) in order to obtain the equation (21).

Figure 2012104940
Figure 2012104940

ここで、マクロブロック発生符号量は0から3200ビットまでと定義されるが、式(22)ではマクロブロック発生符号量を3200で割り、値域を0から1までとしたものがxに入る。 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(x)上で目標符号化効率Epicを満たす目標発生符号量TMbBitを求める。目標発生符号量TMbBitとは、第二符号化におけるマクロブロック発生符号量の目標値である。目標符号化効率Epic=(∂D/∂R)は定義より、f(x)上における傾きを意味することは明らかである。すなわち、f(x)をxについて微分したf′(x)とEpicが等しくなるようなxが目標発生符号量TMbBitであると言える。そこで、量子化パラメータ算出部14は、次の式(23)式を用いてTMbBitを求める。 Next, in step S106, the quantization parameter calculation unit 14 obtains a target generated code amount TMbBit i that satisfies the target encoding efficiency E pic on the rate distortion curve f (x i ). The target generated code amount TMbBit i is a target value of the macroblock generated code amount in the second encoding. It is clear from the definition that the target encoding efficiency E pic = (∂D / ∂R) means a slope on f (x i ). That is, it can be said that f (x i) was differentiated for x i f '(x i) and as E pic equals x i is the target generated code amount TMbBit i. Therefore, the quantization parameter calculation unit 14 obtains TMbBit i using the following equation (23).

Figure 2012104940
Figure 2012104940

ここで、x=TMbBitであるため、量子化パラメータ算出部14は、次の式(24)により目標発生符号量TMbBitを求める。 Here, since x i = TMbBit i , the quantization parameter calculation unit 14 calculates the target generated code amount TMbBit i by the following equation (24).

Figure 2012104940
Figure 2012104940

次に、ステップS107およびステップS108において、量子化パラメータ算出部14は、第二符号化後のマクロブロック発生符号量が先程求めたTMbBitとなる量子化パラメータを求めるために量子化パラメータ対マクロブロック発生符号量の関係を表す曲線(QP−GenBit曲線:g(y))を算出する。量子化パラメータとマクロブロック発生符号量の値には、量子化パラメータの増加に従いマクロブロック発生符号量が減少していくという単調減少の関係がある。また、単調減少における減少幅が徐々に減少していくという特徴があるため、QP−GenBit曲線((g(y))を式(25)の様に二次式で定義する。 Next, in step S107 and step S108, the quantization parameter calculation unit 14 determines the quantization parameter to macroblock so as to obtain a quantization parameter for which the macroblock generation code amount after the second encoding is the TMbBit i obtained previously. A curve (QP-GenBit curve: g (y i )) representing the relationship between the generated code amounts is calculated. The quantization parameter and the macroblock generation code amount have a monotonically decreasing relationship in which the macroblock generation code amount decreases as the quantization parameter increases. In addition, since there is a feature that the decrease width in the monotonous decrease gradually decreases, the QP-GenBit curve ((g (y i )) is defined by a quadratic expression like Expression (25).

Figure 2012104940
Figure 2012104940

ここで、yは第二符号化時の量子化パラメータ、α、βは復号部12より得られる第一符号化時に用いたスライスタイプおよびマクロブロックタイプにより定められる定数、γはg(y)を一意に定める定数、g(y)はマクロブロック発生符号量である。また、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 decoding unit 12, and γ i is g (y i) uniquely define constant, g (y i) is the macroblock generated code amount. I represents the i-th macroblock.

QP−GenBit曲線はスライスタイプやマクロブロックタイプによって、同一量子化パラメータ時のマクロブロック発生符号量が大きく異なる。そのため、スライスタイプやマクロブロックタイプを考慮しない場合、QP−GenBit曲線と量子化パラメータ対マクロブロック発生符号量の相関係数が小さくなることが考えられる。そこで、ステップS107では、より相関係数が大きくなるQP−GenBit曲線の形状を定めるにあたり、復号部12より得られる第一符号化時のスライスタイプおよびマクロブロックタイプから、αおよびβを設定する。 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 decoding unit 12 in determining the shape of the QP-GenBit curve with a larger correlation coefficient. To do.

スライスタイプとはスライスの種類を表す値であり、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.

Figure 2012104940
Figure 2012104940

マクロブロックタイプとはマクロブロックの種類を表す値であり、スライスタイプに応じて定められている。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.

Figure 2012104940
Figure 2012104940

Figure 2012104940
Figure 2012104940

Figure 2012104940
Figure 2012104940

Figure 2012104940
Figure 2012104940

ここで、表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軸方向の位置を定めるαおよびβの値をスライスタイプ、マクロブロックタイプ毎に事前に定めておく。αおよびβを決定するにあたり、実験により予め複数のマクロブロックについて量子化パラメータ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.

ここで得られた二次曲線のy とyの係数をそれぞれα(SliceType;MBType)及び、β(SliceType;MBType)と定め、復号部12より得られる第一符号化時に用いたスライスタイプおよびマクロブロックタイプに応じて式(26)、式(27)の通りαおよびβを定める。 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 decoding unit 12 Α i and β i are determined according to the types (26) and (27) according to the type and the macroblock type.

Figure 2012104940
Figure 2012104940

Figure 2012104940
Figure 2012104940

ここで、スライスタイプの分類については必ずしも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 macroblock types 1 to 24, the tendency of the QP-GenBit curve may be similar. At this time, it can be considered that a total of three macro block types of 0, 1 to 24, and 25 exist in the I slice. Here, α (SliceType; MBType) and β (SliceType; MBType) are determined as shown in Table 6.

Figure 2012104940
Figure 2012104940

表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において設定したαおよびβを代入し、γを求め、各マクロブロックのQP−GenBit曲線(g(y))を一意に定める。 Next, in step S108, when obtaining the quantization parameter at the time of the second encoding, the quantization parameter calculation unit 14 firstly calculates the quantization at the time of the first encoding obtained from the decoding unit 12 to Expression (28). By substituting the parameters, the macro block generation code amount and α i and β i set in step S107, γ i is obtained, and the QP-GenBit curve (g (y i )) of each macro block is uniquely determined.

Figure 2012104940
Figure 2012104940

次に、ステップS109において、量子化パラメータ算出部14は、式(25)で求めたQPGenBit曲線(g(y))を一意に定める変数γおよび、式(23)で求めた目標発生符号量TMbBitを式(29)へ代入し、第二符号化時の量子化パラメータyiを求める。 Next, in step S109, the quantization parameter calculation unit 14 determines the variable γ i that uniquely determines the QPGenBit curve (g (y i )) obtained by Expression (25) and the target generated code obtained by Expression (23). Substituting the quantity TMbBit i into equation (29), the quantization parameter yi at the time of the second encoding is obtained.

Figure 2012104940
Figure 2012104940

ここで、yの解を一意に求めるために、0<y<51という制約を設ける。そして、ステップS110において、量子化パラメータ算出部14は、全てのマクロブロックについて、量子化パラメータyを出力したか否かを判定する。全てのマクロブロックにおける量子化パラメータyを算出した場合には、ステップS111へ進む。一方、全てのマクロブロックにおける量子化パラメータyを算出していない場合には、ステップS105へ戻る。そして、全てのマクロブロックについてyを求めた後、ステップS111において、第二符号化部15が、量子化パラメータyを用いて第二符号化を行う。 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 parameter calculation unit 14 determines whether or not the quantization parameter y i has been output for all macroblocks. If the quantization parameter y i has been calculated for all macroblocks, the process proceeds to step S111. On the other hand, if the quantization parameter y i has not been calculated for all macroblocks, the process returns to step S105. Then, after obtaining y i for all macroblocks, in step S111, the second encoding unit 15 performs second encoding using the quantization parameter y 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 image encoding apparatus 10 according to the present embodiment. In this figure, the horizontal axis represents the macroblock generated code amount (unit: kbit / s), and the vertical axis represents the image quality degradation evaluation index SSIM. A solid line 101 indicates the result of the second encoding, and a solid line 102 indicates the result of the first encoding. The experiment in this figure was conducted for the standard definition television (SDTV) size (720 × 480), interlace, and the number of frames of 450 frames, which are one of standard images in ITE (Video Information Media Society). SSIM indicates that the larger the value, the smaller the image distortion, and the smaller the value, the larger the distortion. For this reason, as shown in the figure, it can be confirmed that the result of the second encoding is improved in encoding efficiency as compared with the result of the first encoding.

このように、本実施形態によれば、動画像符号化装置10は、画像劣化評価指標から量子化パラメータを算出し、算出した量子化パラメータを用いて第二符号化を行っている。このため、最適な量子化パラメータを設定可能となり、主観的な画像品質が向上し符号化効率を向上することができる。   As described above, according to the present embodiment, the moving image encoding apparatus 10 calculates the quantization parameter from the image degradation evaluation index, and performs the second encoding using the calculated quantization parameter. For this reason, it becomes possible to set an optimal quantization parameter, subjective image quality can be improved, and coding efficiency can be improved.

また、図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 SYMBOLS 10 ... Moving image encoding device, 11 ... 1st encoding part, 12 ... Decoding part, 13 ... Evaluation part, 14 ... Quantization parameter calculation part, 15 ... 2nd encoding part

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.
前記評価部は、SSIM(Structural SIMilarity)を用いて前記画質劣化評価指標を算出することを特徴とする請求項1に記載の動画像符号化装置。   The moving image encoding apparatus according to claim 1, wherein the evaluation unit calculates the image quality degradation evaluation index using SSIM (Structural SIMularity). 前記量子化パラメータ算出部は、式(1)にて定義されたレート歪み曲線f(x)に関し、
Figure 2012104940
マクロブロック番号をiとし、前記画質劣化評価指標を前記レート歪み曲線f(x)とし、前記マクロブロック発生符号量を正規化した値をxとして式(1)におけるa を式(2)により算出し、
Figure 2012104940
発生符号量に対する前記画質劣化評価指標を表す目標符号化効率をEpicとして、マクロブロック発生符号量の目標値である目標マクロブロック発生符号量TMbBitを式(3)により算出し、
Figure 2012104940
前記マクロブロック発生符号量をg(y)とし、α、βを前記スライスタイプ及びマクロブロックタイプより所定の値から選択し、前記第一量子化パラメータをyとして、定数γを式(4)により算出し、
Figure 2012104940
前記目標マクロブロック発生符号量をTMbBitとし、α、β、γの値として、第二量子化パラメータyを式(5)により算出し、
Figure 2012104940
前記第二量子化パラメータを算出することを特徴とする請求項1または2に記載の動画像符号化装置。
The quantization parameter calculation unit relates to the rate distortion curve f (x i ) defined by Equation (1).
Figure 2012104940
The macro block number is i, the image quality degradation evaluation index is the rate distortion curve f (x i ), the value obtained by normalizing the macro block generation code amount is x i , and a i in the equation (1) is expressed by the equation (2) )
Figure 2012104940
A target coding efficiency TMbBit i , which is a target value of the macroblock generation code amount, is calculated by Equation (3), where E pic is the target coding efficiency representing the image quality degradation evaluation index for the generated code amount,
Figure 2012104940
The macroblock generation code amount is g (y i ), α i and β i are selected from predetermined values from the slice type and macro block type, the first quantization parameter is y i , and the constant γ i is Calculated by equation (4),
Figure 2012104940
The target macroblock generation code amount is set to TMbBit i, and the second quantization parameter y i is calculated by Equation (5) as the values of α i , β i , and γ i .
Figure 2012104940
The moving image encoding apparatus according to claim 1, wherein the second quantization parameter is calculated.
第一符号化部と、復号部と、評価部と、量子化パラメータ算出部と、第二符号化部と備える動画像符号化装置における動画像符号化方法であって、
前記第一符号化部が、入力映像信号に対し、所定の第一量子化パラメータを用いて符号化を行いビットストリームを生成する第一符号化ステップと、
前記復号部が、前記第一符号化ステップにより生成したビットストリームを復号して復号映像信号および第一符号化時の符号化情報を生成する復号ステップと、
前記評価部が、前記復号ステップにより復号した復号映像信号と前記入力映像信号との差分に基づいて、前記復号映像信号における歪みの度合いを示す画質劣化評価指標を算出する評価ステップと、
前記量子化パラメータ算出部が、前記評価ステップにより算出した画質劣化評価指標と前記復号ステップにより生成されたスライスタイプ、マクロブロックタイプ及びマクロブロック発生符号量を含む符号化情報に基づいて第二量子化パラメータを算出する量子化パラメータ算出ステップと、
前記第二符号化部が、前記量子化パラメータ算出ステップにより算出した第二量子化パラメータを用いて前記入力映像信号に対し符号化を行う第二符号化ステップと
を有することを特徴とする動画像符号化方法。
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.
前記評価ステップは、SSIM(Structural SIMilarity)を用いて前記画質劣化評価指標を算出することを特徴とする請求項4に記載の動画像符号化方法。   5. The moving picture encoding method according to claim 4, wherein the evaluation step calculates the image quality degradation evaluation index using SSIM (Structural SIMularity). 前記量子化パラメータ算出ステップは、式(6)にて定義されたレート歪み曲線f(x)に関し、
Figure 2012104940
マクロブロック番号をiとし、前記画質劣化評価指標を前記レート歪み曲線f(x)とし、前記マクロブロック発生符号量を正規化した値をxとして式(7)におけるa を式(2)により算出し、
Figure 2012104940
発生符号量に対する前記画質劣化評価指標を表す目標符号化効率をEpicとして、マクロブロック発生符号量の目標値である目標マクロブロック発生符号量TMbBitを式(8)により算出し、
Figure 2012104940
前記マクロブロック発生符号量をg(y)とし、α、βを前記スライスタイプ及びマクロブロックタイプより所定の値から選択し、前記第一量子化パラメータをyとして、定数γを式(9)により算出し、
Figure 2012104940
前記目標マクロブロック発生符号量をTMbBitとし、α、β、γの値として、第二量子化パラメータyを式(10)により算出し、
Figure 2012104940
前記第二量子化パラメータを算出することを特徴とする請求項4または5に記載の動画像符号化方法。
The quantization parameter calculation step relates to the rate distortion curve f (x i ) defined by Equation (6),
Figure 2012104940
The macro block number is i, the image quality degradation evaluation index is the rate distortion curve f (x i ), the value obtained by normalizing the macro block generation code amount is x i , and a i in the equation (7) is expressed by the equation (2). )
Figure 2012104940
A target coding efficiency TMbBit i , which is a target value of the macroblock generated code quantity, is calculated by Expression (8), where E pic is the target coding efficiency representing the image quality degradation evaluation index with respect to the generated code quantity,
Figure 2012104940
The macroblock generation code amount is g (y i ), α i and β i are selected from predetermined values from the slice type and macro block type, the first quantization parameter is y i , and the constant γ i is Calculated by equation (9),
Figure 2012104940
The target macroblock generation code amount is set as TMbBit i , α i , β i , and γ i are calculated as values of the second quantization parameter y i according to Equation (10),
Figure 2012104940
6. The moving picture coding method according to claim 4, wherein the second quantization parameter is calculated.
動画像符号化装置上のコンピュータに、請求項4から6のいずれかの項に記載の動画像符号化方法を実行させることを特徴とするコンピュータプログラム。   A computer program for causing a computer on a moving image encoding apparatus to execute the moving image encoding method according to any one of claims 4 to 6.
JP2010249968A 2010-11-08 2010-11-08 Moving image encoder, moving image encoding method and program Pending JP2012104940A (en)

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)

* Cited by examiner, † Cited by third party
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

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSNG201001030006; 横張和也、中島靖之、嵯峨田淳、上倉一人: 'マクロブロックのレート・歪み特性およびマクロブロックタイプに着目した2パス符号化アルゴリズム' 映像情報メディア学会技術報告 Vol.34,No.45, 20101104, p.35-39, (社)映像情報メディア学会 *
JPN6013019455; 横張和也、中島靖之、嵯峨田淳、上倉一人: 'マクロブロックのレート・歪み特性およびマクロブロックタイプに着目した2パス符号化アルゴリズム' 映像情報メディア学会技術報告 Vol.34,No.45, 20101104, p.35-39, (社)映像情報メディア学会 *

Cited By (6)

* Cited by examiner, † Cited by third party
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