JP2013102278A - Moving image decoder, moving image decoding method and moving image decoding program - Google Patents
Moving image decoder, moving image decoding method and moving image decoding program Download PDFInfo
- Publication number
- JP2013102278A JP2013102278A JP2011243642A JP2011243642A JP2013102278A JP 2013102278 A JP2013102278 A JP 2013102278A JP 2011243642 A JP2011243642 A JP 2011243642A JP 2011243642 A JP2011243642 A JP 2011243642A JP 2013102278 A JP2013102278 A JP 2013102278A
- Authority
- JP
- Japan
- Prior art keywords
- quantization parameter
- adjacent
- block
- decoding
- target block
- 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
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、動画像の復号技術に関し、特に量子化パラメータの予測符号化を利用した動画像の復号技術に関する。 The present invention relates to a moving picture decoding technique, and more particularly to a moving picture decoding technique using predictive coding of quantization parameters.
MPEG−2 Part2(以下MPEG−2と呼ぶ)やMPEG−4 Part10/H.264(以下AVCと呼ぶ)等のデジタル動画像符号化では、画像を所定の大きさのブロックに分割して符号化を行い、予測誤差信号(又は単に画像信号)に対する量子化の粗さを示す量子化パラメータを伝送する。符号化側でこの量子化パラメータを所定ブロック単位で可変制御することにより、符号量を制御することや主観画質を向上させることが可能である。 MPEG-2 Part 2 (hereinafter referred to as MPEG-2) and MPEG-4 Part 10 / H. In digital video coding such as H.264 (hereinafter referred to as AVC), an image is divided into blocks of a predetermined size and coded to indicate the roughness of quantization for a prediction error signal (or simply an image signal). Transmit quantization parameters. By variably controlling the quantization parameter in units of predetermined blocks on the encoding side, it is possible to control the code amount and improve the subjective image quality.
主観画質を向上させる量子化パラメータの制御としては、Adaptive Quantization(適応量子化)が度々用いられる。適応量子化では、視覚的に劣化の目立ちやすい平坦部ではより細かく量子化され、劣化の比較的目立ちにくい絵柄の複雑な部分でより粗く量子化されるように、各マクロブロックのアクティビティによって変化させる。即ち、符号化されたときの割り当てビット量が大きくなりやすいアクティビティの高いマクロブロックにおいては、大きい量子化スケールが設定されるように、量子化パラメータを変化させ、その結果、符号化された画像のデータにおいてビット数が出来るだけ少なくなるように制御しながら、主観画質を向上させることになる。 As a control of the quantization parameter for improving the subjective image quality, Adaptive Quantization (adaptive quantization) is often used. In adaptive quantization, it is changed according to the activity of each macroblock so that it is quantized more finely in the flat part that is visually noticeable, and coarser in the complicated part of the pattern that is relatively inconspicuous. . That is, in a macroblock with a high activity that tends to have a large allocated bit amount when encoded, the quantization parameter is changed so that a large quantization scale is set. Subjective image quality is improved while controlling the number of bits to be as small as possible in the data.
MPEG−2では符号化/復号する順序で1つ前のブロックの量子化パラメータと符号化対象ブロックの量子化パラメータが同一であるかどうかを判断し、同一でない場合には量子化パラメータを伝送する。AVCでは符号化/復号する順序で1つ前のブロックの量子化パラメータを予測値として、符号化対象ブロックの量子化パラメータを差分符号化する。これは、一般的に符号量制御は符号化順に行うため、符号化順で1つ前のブロックの量子化パラメータが最も符号化ブロックの量子化パラメータに近いということに基いており、伝送する量子化パラメータの情報量を抑制することを狙っている。 In MPEG-2, it is determined whether the quantization parameter of the previous block and the quantization parameter of the encoding target block are the same in the encoding / decoding order, and if not, the quantization parameter is transmitted. . In AVC, the quantization parameter of the previous block in the encoding / decoding order is used as a prediction value, and the quantization parameter of the encoding target block is differentially encoded. This is based on the fact that since the code amount control is generally performed in the coding order, the quantization parameter of the previous block in the coding order is closest to the quantization parameter of the coding block. It aims to suppress the amount of information of the conversion parameter.
従来の量子化パラメータの制御では、符号化済みの左側のブロックの量子化パラメータを予測量子化パラメータとして、符号化対象のブロックの量子化パラメータとの差分を算出し、算出された差分量子化パラメータを符号化することで、量子化パラメータの符号量を削減した。しかしながら、画面内のコンテンツによっては、例えば図3に示されるように、符号化対象のブロック内の画像と符号化済みの左側のブロック内の画像の特徴が異なる場合、適応量子化にて算出される量子化パラメータは差が大きくなるので、一意に左側のブロックとの量子化パラメータ予測を実行しても差分量子化パラメータが大きくなり、符号量が増加する課題があった。 In the conventional quantization parameter control, the difference between the quantization parameter of the encoding target block is calculated using the quantization parameter of the encoded left block as a prediction quantization parameter, and the calculated difference quantization parameter is calculated. The amount of code of the quantization parameter was reduced by encoding. However, depending on the content in the screen, for example, as shown in FIG. 3, when the characteristics of the image in the encoding target block and the image in the encoded left block are different, it is calculated by adaptive quantization. Therefore, there is a problem that even if the prediction of the quantization parameter with the left block is executed uniquely, the difference quantization parameter becomes large and the code amount increases.
本発明はこうした状況に鑑みてなされたものであり、その目的は、量子化パラメータの符号量を削減して、符号化効率を向上させる技術を提供することにある。 The present invention has been made in view of such circumstances, and an object of the present invention is to provide a technique for improving the coding efficiency by reducing the code amount of the quantization parameter.
上記課題を解決するために、本発明のある態様の動画像復号装置は、動画像の各ピクチャを分割したブロック単位で前記動画像が符号化されたビットストリームを復号する動画像復号装置であって、前記ビットストリームをブロック単位に復号して復号対象ブロックの差分量子化パラメータを抽出する復号部(202)と、前記量子化パラメータを含む符号化情報を記憶する符号化情報格納メモリから前記復号対象ブロックの周囲に隣接する複数の復号済みの隣接ブロックの量子化パラメータを読み出し、複数の前記隣接ブロックの量子化パラメータから前記復号対象ブロックの予測量子化パラメータを算出する予測量子化パラメータ算出部(205)と、前記復号対象ブロックの差分量子化パラメータと前記予測量子化パラメータとの加算をにより前記復号対象ブロックの量子化パラメータを生成する量子化パラメータ生成部(203)とを備える。 In order to solve the above-described problem, a moving picture decoding apparatus according to an aspect of the present invention is a moving picture decoding apparatus that decodes a bitstream in which the moving picture is encoded in blocks obtained by dividing each picture of the moving picture. A decoding unit (202) that decodes the bitstream in units of blocks to extract a differential quantization parameter of a decoding target block, and the decoding from a coding information storage memory that stores coding information including the quantization parameter A prediction quantization parameter calculation unit that reads quantization parameters of a plurality of neighboring blocks that have been decoded adjacent to the periphery of the target block, and calculates a prediction quantization parameter of the decoding target block from a plurality of quantization parameters of the adjacent blocks ( 205) and addition of the difference quantization parameter of the decoding target block and the prediction quantization parameter And a quantization parameter generating unit (203) for generating a quantization parameter of the current block by.
本発明の別の態様は、動画像復号方法である。この方法は、動画像の各ピクチャを分割したブロック単位で前記動画像が符号化されたビットストリームを復号する動画像復号方法であって、前記ビットストリームをブロック単位に復号して復号対象ブロックの差分量子化パラメータを抽出する復号ステップと、前記量子化パラメータを含む符号化情報を記憶する符号化情報格納メモリから前記復号対象ブロックの周囲に隣接する複数の復号済みの隣接ブロックの量子化パラメータを読み出し、複数の前記隣接ブロックの量子化パラメータから前記復号対象ブロックの予測量子化パラメータを算出する予測量子化パラメータ算出ステップと、前記復号対象ブロックの差分量子化パラメータと前記予測量子化パラメータとの加算をにより前記復号対象ブロックの量子化パラメータを生成する量子化パラメータ生成ステップとを備える。 Another aspect of the present invention is a video decoding method. This method is a moving picture decoding method for decoding a bit stream in which the moving picture is encoded in units of blocks obtained by dividing each picture of the moving picture, and decoding the bit stream in units of blocks to decode a decoding target block. A decoding step for extracting a differential quantization parameter; and quantization parameters of a plurality of decoded adjacent blocks adjacent to the periphery of the block to be decoded from a coding information storage memory for storing coding information including the quantization parameter. A prediction quantization parameter calculating step of calculating a prediction quantization parameter of the decoding target block from a plurality of quantization parameters of the adjacent blocks, and adding the difference quantization parameter of the decoding target block and the prediction quantization parameter; The amount by which the quantization parameter of the decoding target block is generated And a parameter generation step.
なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above-described constituent elements and a conversion of the expression of the present invention between a method, an apparatus, a system, a recording medium, a computer program, etc. are also effective as an aspect of the present invention.
本発明によれば、量子化パラメータの符号量を削減して、符号化効率を向上させることができる。 According to the present invention, it is possible to improve the coding efficiency by reducing the code amount of the quantization parameter.
本発明の実施の形態は、ピクチャを矩形ブロックに分割し、ブロック単位に量子化・符号化を行う動画像符号化において、処理対象のブロックの量子化パラメータの符号量を削減するために、既符号化済みの周囲のブロックの符号化情報から最適な予測量子化パラメータを導出し、予測量子化パラメータとの差分を算出して、符号化する符号量制御技術を提供する。 In the embodiment of the present invention, in order to reduce the code amount of the quantization parameter of the block to be processed in moving picture coding in which a picture is divided into rectangular blocks and quantization / encoding is performed on a block basis, Provided is a code amount control technique for deriving an optimal prediction quantization parameter from encoding information of surrounding blocks that have already been encoded, calculating a difference from the prediction quantization parameter, and performing encoding.
本発明を実施する好適な動画像符号化装置100及び動画像復号装置200について説明する。図1は本発明を実施する動画像符号化装置100の構成を示すブロック図であり、画像メモリ101、残差信号生成部102、直交変換・量子化部103、第2の符号化ビット列生成部104、逆量子化・逆直交変換部105、復号画像信号重畳部106、復号画像メモリ107、予測画像生成部108、アクティビティ算出部109、量子化パラメータ算出部110、差分量子化パラメータ生成部111、第1の符号化ビット列生成部112、符号化情報格納メモリ113、予測量子化パラメータ算出部114及び符号化ビット列多重化部115から構成される。尚、各ブロック間を結ぶ太実線の矢印はピクチャの画像信号、細実線の矢印は符号化を制御するパラメータ信号の流れを表すものである。
画像メモリ101は、撮影/表示時間順に供給された符号化対象の画像信号を一時格納する。画像メモリ101は、格納された符号化対象の画像信号を、所定の画素ブロック単位で、残差信号生成部102、予測画像生成部108及びアクティビティ算出部109に供給する。その際、撮影/表示時間順に格納された画像は、符号化順序に並べ替えられて、画素ブロック単位で、画像メモリ101から出力される。
A preferred moving image encoding
The
残差信号生成部102は、符号化する画像信号と予測画像生成部108にて生成された予測信号との引き算を行い残差信号を生成し、直交変換・量子化部103に供給する。
直交変換・量子化部103は、残差信号に対して直交変換及び量子化を行い、直交変換・量子化された残差信号を生成し、第2の符号化ビット列生成部104と逆量子化・逆直交変換部10に供給する。
The residual
The orthogonal transform /
第2の符号化ビット列生成部104は、直交変換及び量子化された残差信号を規定のシンタックス規則に従ってエントロピー符号化して第2の符号化ビット列を生成し、符号化ビット列多重化部115に供給する。
The second encoded bit
逆量子化・逆直交変換部105は、直交変換・量子化部103から供給された直交変換・量子化された残差信号を逆量子化及び逆直交変換して残差信号を算出し、復号画像信号重畳部106に供給する。
The inverse quantization / inverse
復号画像信号重畳部106は、予測画像生成部108により生成された予測画像信号と逆量子化・逆直交変換部105で逆量子化及び逆直交変換された残差信号を重畳して復号画像を生成し、復号画像メモリ107に格納する。尚、復号画像に対して符号化によるブロック歪等の歪を減少させるフィルタリング処理を施して、復号画像メモリ107に格納されることもあり、その場合、必要に応じてデブロッキングフィルタ等のポストフィルタの情報を識別するフラグ等の予測された符号化情報を符号化情報格納メモリ113に格納する。
The decoded image signal
予測画像生成部108は、画像メモリ101から供給される画像信号と復号画像メモリ107から供給される復号画像信号から、予測モードを基にフレーム内予測或いはフレーム間予測を行い、予測画像信号を生成する。フレーム内予測は、画像メモリ101から供給される画像信号を所定のブロック単位で分割された符号化対象ブロックと、復号画像メモリ107から供給される符号化対象ブロックと同じフレーム内に存在する符号化対象ブロックに隣接する周囲の符号化済みブロックの画素信号を用いて予測画像信号を生成する。フレーム間予測は、画像メモリ101から供給される画像信号を所定のブロック単位で分割された符号化対象ブロックのフレーム(符号化フレーム)の時系列で前または後ろに数フレーム離れた復号画像メモリ107に格納されている符号化済みフレームを参照フレームとし、符号化フレームと参照フレームとの間でブロックマッチングを行い、動きベクトルと呼ばれる動き量を求め、この動き量を基に参照フレームから動き補償を行い、予測画像信号を生成する。こうして生成された予測画像信号を残差信号生成部102に供給する。予測画像生成部108にて得られた動きベクトル等の符号化情報は、必要に応じて符号化情報格納メモリ113に格納する。尚、予測画像生成部108で、複数の予測モードの選択が可能である場合、生成された予測画像信号と元の画像信号との間の歪量等を評価することにより、最適な予測モードを決定し、決定された予測モードによる予測により生成された予測画像信号を選択し、残差信号生成部102に供給することも可能である。
The predicted
アクティビティ算出部109は、画像メモリ101から供給される符号化対象ブロックの画像の複雑さや滑らかさを示す係数であるアクティビティが計算され、量子化パラメータ算出部110に供給する。アクティビティ算出部109の詳細な構成と動作は、後述する実施例にて説明する。
The
量子化パラメータ算出部110は、アクティビティ算出部109にて算出されたアクティビティによって、符号化対象ブロックの量子化パラメータを算出し、差分量子化パラメータ生成部111及び符号化情報格納メモリ113に供給する。量子化パラメータ算出部110の詳細な構成と動作は、後述する実施例にて説明する。
The quantization
差分量子化パラメータ生成部111は、量子化パラメータ算出部110にて算出された量子化パラメータに対して、予測量子化パラメータ算出部114にて算出された予測量子化パラメータと引き算を行い、差分量子化パラメータを算出し、第1の符号化ビット列生成部112に供給する。
The difference quantization
第1の符号化ビット列生成部112は、差分量子化パラメータ生成部111によって算出された差分量子化パラメータを規定のシンタックス規則に従って符号化して第1の符号化ビット列を生成し、符号化ビット列多重化部115に供給する。
The first encoded bit
符号化情報格納メモリ113は、符号化が終了したブロックの量子化パラメータを格納する。また、図1に結線を図示していないが、予測画像生成部108にて生成される予測モードや動きベクトル等の符号化情報も、次の符号化対象ブロックを符号化に必要な情報として格納する。更に、ピクチャやスライス単位で生成される符号化情報も必要に応じて格納する。
The encoding
予測量子化パラメータ算出部114は、符号化対象ブロックの周囲に隣接する既符号化済みのブロックの量子化パラメータや符号化情報を用いて、予測量子化パラメータを算出し、差分量子化パラメータ生成部111に供給する。予測量子化パラメータ算出部114の詳細な構成と動作は、後述する実施例にて説明する。
The prediction quantization
符号化ビット列多重化部115は、第1の符号化ビット列と第2の符号化ビット列を規定のシンタックス規則に従って多重化し、ビットストリームを出力する。
The encoded bit
図2は図1の動画像符号化装置100に対応した実施の形態に係る動画像復号装置200の構成を示すブロック図である。実施の形態の動画像復号装置200は、ビット列分離部201、第1符号化ビット列復号部202、量子化パラメータ生成部203、符号化情報格納メモリ204、予測量子化パラメータ算出部205、第2符号化ビット列復号部206、逆量子化・逆直交変換部207、復号画像信号重畳部208、予測画像生成部209及び復号画像メモリ210を備える。尚、図1の動画像符号化装置100と同様に、各ブロック間を結ぶ太実線の矢印はピクチャの画像信号、細実線の矢印は符号化を制御するパラメータ信号の流れを表すものである。
FIG. 2 is a block diagram showing a configuration of a moving
図2の動画像復号装置200の復号処理は、図1の動画像符号化装置100の内部に設けられている復号処理に対応するものであるから、図2の逆量子化・逆直交変換部207、復号画像信号重畳部208、予測画像生成部209、復号画像メモリ210及び符号化情報格納メモリ204の各構成は、図1の動画像符号化装置100の逆量子化・逆直交変換部105、復号画像信号重畳部106、予測画像生成部108、復号画像メモリ107及び符号化情報格納メモリ113の各構成とそれぞれ対応する機能を有する。
The decoding process of the moving
ビット列分離部201に供給されるビットストリームは規定のシンタックスの規則に従って分離し、分離された符号化ビット列が第1符号化ビット列復号部202、第2符号化ビット列復号部206に供給される。
The bit stream supplied to the bit
第1符号化ビット列復号部202は、供給された符号化ビット列を復号して予測モード、動きベクトル、差分量子化パラメータ等に関する符号化情報を出力し、差分量子化パラメータを量子化パラメータ生成部203に与えるとともに、符号化情報を符号化情報格納メモリ204に格納する。
The first encoded bit
量子化パラメータ生成部203は、第1符号化ビット列復号部202から供給される差分量子化パラメータと予測量子化パラメータ算出部205にて算出される量子化パラメータとを加算して量子化パラメータを算出し、逆量子化・逆直交変換部207及び符号化情報格納メモリ204に供給する。
The quantization
符号化情報格納メモリ113は、復号が終了したブロックの量子化パラメータを格納する。更に、第1符号化ビット列復号部202にて復号されたブロック単位の符号化情報だけでなく、ピクチャやスライス単位で生成される符号化情報も必要に応じて格納する。また、図2に結線を図示していないが、復号された予測モードや動きベクトル等の符号化情報を予測画像生成部209に供給する。
The encoded
予測量子化パラメータ算出部205は、復号対象ブロックの周囲に隣接する既復号済みのブロックの量子化パラメータや符号化情報を用いて、予測量子化パラメータを算出し、量子化パラメータ生成部203に供給する。予測量子化パラメータ算出部205は動画像符号化装置100の予測量子化パラメータ算出部114と同等の機能を有しており、詳細な構成と動作は後述する実施例にて説明する。
The predicted quantization
第2符号化ビット列復号部206は、供給された符号化ビット列を復号して直交変換・量子化された残差信号を算出し、直交変換・量子化された残差信号を逆量子化・逆直交変換部207に与える。
The second encoded bit
逆量子化・逆直交変換部207は、第2符号化ビット列復号部206で復号された直交変換・量子化された残差信号に対して、量子化パラメータ生成部203にて生成された量子化パラメータを用いて、逆直交変換及び逆量子化を行い、逆直交変換・逆量子化された残差信号を得る。
The inverse quantization / inverse
復号画像信号重畳部208は、予測画像生成部209で生成された予測画像信号と、逆量子化・逆直交変換部207により逆直交変換・逆量子化された残差信号とを重畳することにより、復号画像信号を生成し、出力するとともに復号画像メモリ210に格納する。復号画像メモリ210に格納する際には、復号画像に対して符号化によるブロック歪等を減少させるフィルタリング処理を施して、復号画像メモリ210に格納されることもある。
The decoded image
予測画像生成部209は、第2符号化ビット列復号部206で復号される予測モードや動きベクトル等の符号化情報、更に符号化情報格納メモリ204から符号化情報を基にして、復号画像メモリ210から供給される復号画像信号から予測画像信号を生成し、復号画像信号重畳部208に供給する。
The predicted
以下の実施例では、動画像符号化装置100の中で太点線に囲まれた諸部120、特に予測量子化パラメータ算出部114と、動画像復号装置200の中で太点線に囲まれた諸部220、特に予測量子化パラメータ算出部205とで共通に実施される予測量子化パラメータを算出する方法の詳細について説明する。
In the following embodiment,
[実施例1]
まず、本発明の動画像符号化装置100の中で太点線で囲まれた諸部120の各部の動作について説明する。諸部120では、最初に画像メモリ101から所定画素サイズ単位の画素ブロックを符号化対象ブロックとして、アクティビティ算出部109に供給される。
アクティビティ算出部109では、一般に人間の視覚特性はエッジの少ない低周波成分に敏感である為、視覚的に劣化の目立ちやすい平坦部ではより細かく量子化し、劣化の比較的目立ちにくい絵柄の複雑な部分でより粗く量子化するように、所定ブロック単位に画像の複雑さや滑らかさを表現するアクティビティを算出する。
[Example 1]
First, the operation of each section of the
In the
アクティビティの一例として、MPEG−2 TestModel5(TM5)に記載される符号化対象ブロック内の画素の分散値による算出が挙げられる。分散値はブロック内の画像を構成する画素の平均からの散らばりの度合いを示す値であり、ブロック内に画像が平坦である(輝度変化が小さい)程小さく、複雑な絵柄である(輝度変化が大きい)もの程値が大きくなるので、ブロックのアクティビティとして利用する。ブロック内の画素値をp(x,y)で表すと、ブロックのアクティビティactは次式で算出される。 As an example of the activity, calculation based on the variance value of the pixels in the encoding target block described in MPEG-2 TestModel 5 (TM5) can be given. The variance value is a value indicating the degree of dispersion from the average of the pixels constituting the image in the block. The flatter the image in the block (the smaller the luminance change), the smaller the value, and the more complex the image (the luminance change is). The larger the value, the larger the value, so use it as a block activity. When the pixel value in the block is represented by p (x, y), the activity act of the block is calculated by the following equation.
ここで、BLKは符号化対象ブロックの画素総数であり、p_meanはブロック内の画素の平均値である。 Here, BLK is the total number of pixels in the encoding target block, and p_mean is the average value of the pixels in the block.
また、以上のような分散に限らず、符号化対象ブロック内の画素に対して、水平方向及び垂直方向で隣接する画素との差分絶対値をとり、ブロック内で総和をとっても良い。この場合でも、画像が平坦である場合は小さく、エッジが多い複雑な絵柄部分では大きい値となり、アクティビティとして利用可能である。次式により算出される。 Further, the present invention is not limited to the above-described distribution, and the absolute value of the difference between the pixels in the encoding target block and the adjacent pixels in the horizontal direction and the vertical direction may be taken, and the sum in the block may be taken. Even in this case, it is small when the image is flat, and a large value is obtained in a complicated picture portion having many edges, and can be used as an activity. It is calculated by the following formula.
こうして算出されたアクティビティactは量子化パラメータ算出部110に供給される。
The activity act calculated in this way is supplied to the quantization
量子化パラメータ算出部110は、アクティビティ算出部109で算出されたアクティビティactを基にして、符号化対象ブロックの最適な量子化パラメータQPを算出する。
The quantization
量子化パラメータ算出部110は、直前に符号化したフレーム内の平均アクティビティをavg_actとして記録しておき、符号化対象ブロックの正規化アクティビティNactを次式により算出する。
The quantization
ここで、上式の係数2は量子化パラメータのダイナミックレンジを表す値であり、0.5〜2.0の範囲をとる正規化アクティビティNactが算出される。
Here, the
尚、avg_actは、符号化過程の前に、予めフレーム内の全てのブロックに対してアクティビティを算出し、その平均値をavg_actとしてもよい。更に、avc_actは符号化情報格納メモリ113に格納しておいてもよく、必要に応じて量子化パラメータ算出部110が符号化情報格納メモリ113からavg_actを取得してもよい。
Note that avg_act may be calculated in advance for all blocks in the frame before the encoding process, and the average value may be avg_act. Furthermore, avc_act may be stored in the encoded
算出された正規化アクティビティNactを基準となる量子化パラメータbaseQPと次式の如く乗算を行い、符号化対象ブロックの量子化パラメータQPを得る。 The calculated normalization activity Nact is multiplied by the reference quantization parameter baseQP as shown in the following equation to obtain the quantization parameter QP of the encoding target block.
ここで、baseQPは符号化対象ブロックを含むフレーム或いはスライスを代表する量子化パラメータであってもよい。また、MPEG−2 TM5に記載されているレート制御方法により、ピクチャ数フレーム分を1つのグループ(以下、GOP(Group Of Picture)と称す)とし、そのGOPの中でピクチャタイプ別に符号量を配分し、配分された符号量を仮想バッファ制御を用いたレート制御で算出されるブロック単位の量子化パラメータとしてもよい。更に、直前に符号化したフレームや符号化済みの同じ符号化タイプ(画像内符号化或いは画像間符号化)のフレームの平均量子化パラメータであってもよく、本発明では特に算出方法について限定しない。 Here, the baseQP may be a quantization parameter representing a frame or a slice including the encoding target block. In addition, according to the rate control method described in MPEG-2 TM5, the number of frames for a picture is grouped into one group (hereinafter referred to as GOP (Group Of Picture)), and the code amount is allocated for each picture type in the GOP. The allocated code amount may be used as a quantization parameter for each block calculated by rate control using virtual buffer control. Further, it may be an average quantization parameter of a frame encoded immediately before or a frame of the same encoded type (intra-image encoding or inter-image encoding) that has been encoded, and the calculation method is not particularly limited in the present invention. .
尚、baseQPは符号化時に算出或いは供給され、量子化パラメータ算出部110の内部或いは符号化情報格納メモリ113に格納し、随時取得してもよい。
The baseQP may be calculated or supplied at the time of encoding, stored in the quantization
こうして算出された符号化対象ブロックの量子化パラメータは、符号化情報格納メモリ113及び差分量子化パラメータ生成部111に供給される。
The quantization parameter of the encoding target block calculated in this way is supplied to the encoding
符号化情報格納メモリ113は、量子化パラメータ算出部110にて算出された量子化パラメータや既に符号化が終了した過去の符号化対象ブロックの量子化パラメータが格納されるだけでなく、符号化対象ブロックの符号化となる動きベクトルや予測モード等の符号化情報も格納され、必要に応じて各部が符号化情報を取得する。
The encoding
予測量子化パラメータ算出部114は、符号化情報格納メモリ113から符号化対象ブロックの周囲の既符号化済みの隣接ブロックの量子化パラメータやその他符号化情報を用いて、符号化対象ブロックの量子化パラメータを効率良く符号化、伝送する為の予測量子化パラメータを算出する。
The predicted quantization
量子化パラメータを効率良く符号化、伝送する為には、量子化パラメータのまま符号化するよりも、周囲の既符号化済みのブロックの量子化パラメータとの差分(差分量子化パラメータ)をとって、その差分量子化パラメータを符号化、伝送する方が効率が良い。符号化対象ブロックと周囲の隣接ブロックとは、隣接している為、同じ或いは似た絵柄となることが多いので、各ブロックで比較的近い量子化パラメータが算出される傾向がある。その為、H.264では、ラスタスキャン順に符号化対象ブロックの直前に符号化をした左隣に隣接するブロックの量子化パラメータを予測量子化パラメータとし、符号化対象ブロックの量子化パラメータと予測量子化パラメータとの差分をとり、差分量子化パラメータを符号化、伝送する方法を採用した。 In order to efficiently encode and transmit the quantization parameter, the difference (difference quantization parameter) from the quantization parameter of the surrounding already-encoded block is taken rather than encoding the quantization parameter as it is. It is more efficient to encode and transmit the differential quantization parameter. Since the encoding target block and neighboring neighboring blocks are adjacent to each other, they often have the same or similar patterns, and therefore, relatively close quantization parameters tend to be calculated for each block. Therefore, H.H. In H.264, the quantization parameter of the block adjacent to the left adjacent to the encoding target block encoded immediately before the encoding target block is used as the prediction quantization parameter, and the difference between the quantization parameter of the encoding target block and the prediction quantization parameter is used. The difference quantization parameter was encoded and transmitted.
しかしながら、図3が示される事例では、一意に左隣のブロックの量子化パラメータを予測量子化パラメータとすると、符号化対象ブロックと左の隣接ブロックとの画像の絵柄が異なるので、それぞれの量子化パラメータに影響を及ぼし、差分量子化パラメータも大きな値となり、発生符号量も大きくなり、効率的な符号化、伝送が出来ない恐れが生じる。
そこで、本発明に係る予測量子化パラメータ算出部114は、左隣のブロックから予測量子化パラメータを一意に選択せず、周囲の既符号化済みのブロックから最適な予測量子化パラメータを選択或いは算出して、差分量子化パラメータの発生符号量の効率を向上させる。
However, in the example shown in FIG. 3, if the quantization parameter of the left adjacent block is a predictive quantization parameter, the picture pattern of the encoding target block and the left adjacent block are different. This affects the parameters, the differential quantization parameter also becomes a large value, the generated code amount increases, and there is a possibility that efficient encoding and transmission cannot be performed.
Therefore, the prediction quantization
図4は符号化対象ブロックと周囲に隣接する既符号化済みのブロックとの配置の定義を示す。本発明では説明の都合上、各ブロックのサイズを同じものとして表記しているが、例えば動き予測等でブロックサイズを変えて、最適な動き予測を行う場合にでも、符号化対象ブロックの左上の点を基準として、その周囲に隣接するブロックを選抜することで実現可能である。 FIG. 4 shows the definition of the arrangement of the block to be encoded and the already encoded blocks adjacent to the surrounding. In the present invention, the size of each block is described as the same for convenience of explanation. However, even when optimal motion prediction is performed by changing the block size by motion prediction or the like, the upper left of the block to be encoded is displayed. This can be realized by selecting adjacent blocks around the point as a reference.
図5の記載の記号QPx(x=L,A,AL)は、図4で定義された周囲の既符号化済みの隣接ブロックの量子化パラメータを表す。予測量子化パラメータ算出部114は、図5に示される左と左上、上と左上との比較により、予測量子化パラメータを判定する。
The symbol QPx (x = L, A, AL) shown in FIG. 5 represents the quantization parameter of the surrounding already-encoded adjacent block defined in FIG. The predicted quantization
予測量子化パラメータ算出部114の動作について説明する。図6は実施例1における予測量子化パラメータ算出部114の動作を示すフローチャートである。
The operation of the predicted quantization
まず、符号化情報格納メモリ113から符号化対象ブロックに隣接する周囲の既符号化済みのブロックの量子化パラメータを取得する(S100)。符号化対象ブロックの左上の基準位置情報から、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当するブロックの量子化パラメータを予測量子化パラメータ算出部114に供給する。
First, the quantization parameter of the surrounding already-encoded block adjacent to the encoding target block is acquired from the encoding information storage memory 113 (S100). The storage area stored in the encoding
画像の左端或いは上端に符号化対象ブロックが位置している場合、左或いは上及び左上の隣接ブロックは存在しない。ここで、量子化パラメータは常に正値をとることに着目して、隣接ブロックが存在しない場合、隣接ブロックの量子化パラメータQPx(x=L,A,AL)を0に設定して、予測量子化パラメータ算出部114に供給する。
When the encoding target block is located at the left end or the upper end of the image, there is no left or upper and upper left adjacent block. Here, focusing on the fact that the quantization parameter always takes a positive value, if there is no adjacent block, the quantization parameter QPx (x = L, A, AL) of the adjacent block is set to 0, and the predicted quantum To the optimization
次に左と上の隣接ブロックが存在するか否かを判定する(S101)。左及び上の隣接ブロックの量子化パラメータがともに正の場合、両方が存在するので、S105に進む。そうでない場合、即ち一方が存在しない場合はS102に進む。 Next, it is determined whether the left and upper adjacent blocks exist (S101). If the quantization parameters of the left and upper adjacent blocks are both positive, both exist, and the process proceeds to S105. If not, that is, if one does not exist, the process proceeds to S102.
次に左及び上の隣接ブロックがともに存在しないか否かを判定する(S102)。即ち、左及び上の隣接ブロックの量子化パラメータがともに0の場合、両方ともに存在しないので、予測量子化パラメータとして左及び上の隣接ブロックの量子化パラメータを参照出来ない。そこで、直前に符号化を終了したブロックの量子化パラメータを予測量子化パラメータとする。 Next, it is determined whether or not both the left and upper adjacent blocks exist (S102). That is, when the quantization parameters of the left and upper adjacent blocks are both 0, both of them do not exist, so the quantization parameters of the left and upper adjacent blocks cannot be referred to as the prediction quantization parameter. Therefore, the quantization parameter of the block that has just been encoded is used as the prediction quantization parameter.
尚、画像の左上端のブロックが符号化対象ブロックである場合は、左と上の隣接ブロック、更に直前に符号化したブロックが存在しないので、ピクチャ或いはスライスの量子化パラメータを予測量子化パラメータとする(S103)。 If the block at the upper left corner of the image is the encoding target block, there are no adjacent blocks on the left and above, and there is no block encoded immediately before, so the picture or slice quantization parameter is used as the prediction quantization parameter. (S103).
左或いは上の隣接ブロックのどちらか一方が存在する場合、正である一方の量子化パラメータを予測量子化パラメータとする(S104)。 When either one of the left or upper adjacent blocks exists, one positive quantization parameter is set as a predicted quantization parameter (S104).
左及び上の隣接ブロックの両方が存在する場合、最初に左の隣接ブロックの量子化パラメータQPLと左上の隣接ブロックの量子化パラメータQPALとの一致判定を行う(S105)。QPLとQPALが一致する場合、上の隣接ブロックの量子化パラメータQPAを予測量子化パラメータとする(S106)。この場合、一例として図3で示される量子化パラメータの配置が考えられるので、OPAを選択することは適当と言える。また、QPAもQPL及びQPALと一致する場合は、全ての隣接ブロックの量子化パラメータが同じとなり、QPAの選択は問題ない。 When both the left and upper adjacent blocks exist, first, the matching determination between the quantization parameter QPL of the left adjacent block and the quantization parameter QPAL of the upper left adjacent block is performed (S105). If QPL and QPAL match, the quantization parameter QPA of the adjacent block above is set as the predicted quantization parameter (S106). In this case, since the arrangement of the quantization parameters shown in FIG. 3 can be considered as an example, it can be said that it is appropriate to select OPA. If QPA also matches QPL and QPAL, the quantization parameters of all adjacent blocks are the same, and there is no problem in selecting QPA.
QPLとQPALが一致しない場合、S107に進む。次に、QPAとQPALとの一致判定を行う(S107)。QPAとQPALが一致する場合、左の隣接ブロックの量子化パラメータQPLを予測量子化パラメータとする(S108)。前述したQPLとQPALの一致の場合と同様の判定を考慮すれば、QPLが選択される。QPAとQPALが一致しない場合、QPLとQPAの平均値を予測量子化パラメータとする(S109)。この場合、左、上及び左上の隣接ブロックの量子化パラメータが全て異なるので、QPL或いはQPAのどちらか一方を選択するには十分な条件判定が出来ない。そこで、QPLとQPAの平均を予測量子化パラメータとして、均等な判定値とする。こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。
If QPL and QPAL do not match, the process proceeds to S107. Next, a match determination between QPA and QPAL is performed (S107). When QPA and QPAL match, the quantization parameter QPL of the left adjacent block is set as the predicted quantization parameter (S108). Considering the same determination as in the case of the above-mentioned coincidence of QPL and QPAL, QPL is selected. If QPA and QPAL do not match, the average value of QPL and QPA is set as the predicted quantization parameter (S109). In this case, since the quantization parameters of the left, upper, and upper left adjacent blocks are all different, it is not possible to determine a sufficient condition for selecting either QPL or QPA. Therefore, an average of QPL and QPA is used as a predictive quantization parameter, and an equal determination value is set. The predicted quantization parameter calculated in this way is supplied to the differential quantization
差分量子化パラメータ生成部111は、量子化パラメータ算出部110にて算出された符号化対象ブロックの量子化パラメータに対して、予測量子化パラメータ算出部114にて算出された予測量子化パラメータと引き算を行い、差分量子化パラメータを算出する。予測量子化パラメータは復号時にも復号済みの周囲の隣接ブロックから符号化時と同様に算出されるので、差分符号化パラメータを符号化対象とすることで、符号化と復号で矛盾が生じず、量子化パラメータの符号量を削減することが可能となる。算出された差分量子化パラメータは第1の符号化ビット列生成部112に供給される。
The difference quantization
第1の符号化ビット列生成部112は、差分量子化パラメータ生成部111によって算出された差分量子化パラメータを規定のシンタックス規則に従ってエントロピー符号化して第1の符号化ビット列を生成する。
The first encoded bit
図7に差分量子化パラメータのエントロピー符号化に使用される符号化変換テーブルの一例を示す。これは符号付き指数ゴロム符号化と呼ばれるテーブルであり、差分量子化パラメータの絶対値が小さい程短い符号長が与えられる。 FIG. 7 shows an example of a coding conversion table used for entropy coding of the differential quantization parameter. This is a table called signed exponential Golomb coding, and a shorter code length is given as the absolute value of the differential quantization parameter is smaller.
一般に画像をブロックで分割した場合、隣接したブロックでは似たような画像となるので、アクティビティが近い値となり、算出されるブロックの量子化パラメータも近い値になる。その為、差分量子化パラメータの発生頻度は、0が最も高く、絶対値が大きくなるにつれて低くなる傾向となり、図7のテーブルもその特徴を反映して、発生頻度が高い値に対して短い符号長を割り当てられている。予測量子化パラメータが符号化対象ブロックの量子化パラメータに近い値で予測されれば、0に近い差分量子化パラメータが算出され、発生符号量を抑制することが可能となる。 In general, when an image is divided into blocks, similar images are obtained in adjacent blocks. Therefore, the activity is a close value, and the calculated quantization parameter of the block is also a close value. Therefore, the occurrence frequency of the difference quantization parameter tends to be the highest at 0 and lower as the absolute value becomes larger, and the table in FIG. Assigned a length. If the predicted quantization parameter is predicted with a value close to the quantization parameter of the encoding target block, a differential quantization parameter close to 0 is calculated, and the generated code amount can be suppressed.
第1の符号化ビット列生成部112は、差分量子化パラメータに対応する符号ビット列を図7のテーブルから抽出し、その符号ビット列を符号化ビット列多重化部115に供給する。
The first encoded bit
上述した本実施例の動画像符号化装置100に対応する動画像復号装置200の中で太点線で囲まれた諸部220の各部の動作について説明する。
The operation of each unit of the
諸部220では、最初に第1符号化ビット列復号部202にて復号された差分量子化パラメータが量子化パラメータ生成部203に供給される。また、差分量子化パラメータ以外の符号化情報が必要に応じて符号化情報格納メモリ204に格納される。
In the
量子化パラメータ生成部203では、第1符号化ビット列復号部202から供給される差分量子化パラメータと予測量子化パラメータ算出部205にて算出される量子化パラメータとを加算して、復号対象ブロックの量子化パラメータを算出し、逆量子化・逆直交変換部207及び符号化情報格納メモリ204に供給する。
In the quantization
符号化情報格納メモリ204は、復号が終了したブロックの量子化パラメータが格納される。更に、第1符号化ビット列復号部202にて復号されたブロック単位の符号化情報だけでなく、ピクチャやスライス単位で生成される符号化情報も必要に応じて格納される。
The encoded
予測量子化パラメータ算出部205は、復号対象ブロックの周囲に隣接する既復号済みのブロックの量子化パラメータや符号化情報を用いて、予測量子化パラメータを算出し、量子化パラメータ生成部203に供給する。量子化パラメータ生成部203で算出された量子化パラメータは符号化情報格納メモリ204に格納され、次の復号対象ブロックの予測量子化パラメータの算出時に、復号対象ブロックの周囲に位置する復号済みの隣接ブロックを判定し、隣接ブロックの量子化パラメータを符号化情報格納メモリ204から取得する。こうして得られる復号済みの隣接ブロックの量子化パラメータは、動画像符号化装置100の予測量子化パラメータ算出部114が符号化情報格納メモリ113から取得する量子化パラメータと同一である。予測量子化パラメータ算出部205は動画像符号化装置100の予測量子化パラメータ算出部114と同等の機能を有しているので、符号化情報格納メモリ204から供給される隣接ブロックの量子化パラメータが同じであれば、符号化時と同一の予測量子化パラメータが算出される。
The predicted quantization
予測量子化パラメータ算出部205では、符号化済みの隣接ブロックを復号済みの隣接ブロックと変更する以外同様の処理を行うので、量子化パラメータ予測の説明は割愛する。
こうして符号化側で算出された予測量子化パラメータが、復号側でも矛盾無く算出されることになる。
The prediction quantization
Thus, the predicted quantization parameter calculated on the encoding side is calculated without any contradiction on the decoding side.
また、予測量子化パラメータ算出部114及び205の予測量子化パラメータの判定処理において、S105で一致と判定された場合にのみ、上の隣接ブロックの量子化パラメータを選択し、それ以外は左の隣接ブロックの量子化パラメータ選択するこようにして、負荷の軽い判定とすることも可能である。この手法は、符号化及び復号がラスタースキャン順(画面の左上から右下への順次走査)に行われることから、左の符号化済み或いは復号済みの隣接ブロックを優先することとして、簡易的な判定を行うものである。
In addition, in the prediction quantization parameter determination process of the prediction quantization
上述の予測量子化パラメータの判定処理において、図6のS101の左と上の隣接ブロックの量子化パラメータがともに正である、即ち左と上の隣接ブロックがともに存在すると判定された場合から説明する。 In the above-described prediction quantization parameter determination processing, description will be made from the case where it is determined that the quantization parameters of the left and upper adjacent blocks in S101 of FIG. 6 are both positive, that is, both the left and upper adjacent blocks exist. .
図8は、左と上の隣接ブロックがともに存在すると判定された後の簡易判定処理の動作を表すフローチャートである。左及び上の隣接ブロックの両方が存在する場合、QPLとQPALとの一致判定を行う(S110)。QPLとQPALが一致する場合、上の隣接ブロックの量子化パラメータQPAを予測量子化パラメータとする(S111)。QPLとQPALが一致しない場合、左の隣接ブロックの量子化パラメータQPLを予測量子化パラメータとする(S112)。こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。
FIG. 8 is a flowchart showing the operation of the simple determination process after it is determined that both the left and upper adjacent blocks exist. If both the left and upper adjacent blocks exist, a match determination between QPL and QPAL is performed (S110). If QPL and QPAL match, the quantization parameter QPA of the adjacent block above is set as the predicted quantization parameter (S111). If QPL and QPAL do not match, the quantization parameter QPL of the left adjacent block is set as the prediction quantization parameter (S112). The predicted quantization parameter calculated in this way is supplied to the differential quantization
更に、左と左上の隣接ブロックの量子化パラメータの差分絶対値をΔL、上と左上の隣接ブロックの量子化パラメータの差分絶対値をΔAとして、ΔLとΔAの比較に基づいて、左或いは上の量子化パラメータを予測量子化パラメータとして選択することも可能である。 Further, the difference absolute value of the quantization parameter between the left and upper left adjacent blocks is ΔL, the difference absolute value of the quantization parameter of the upper and left adjacent blocks is ΔA, and based on the comparison between ΔL and ΔA, It is also possible to select the quantization parameter as the predicted quantization parameter.
符号化対象ブロックとその周囲の既符号化済みの隣接ブロックにおいて、図9で示すようにΔL及びΔAは左と左上、上と左上の隣接ブロックの量子化パラメータの差分絶対値を表し、それぞれ次式で表される。 In the encoding target block and its neighboring neighboring blocks, ΔL and ΔA represent the absolute values of the quantization parameters of the left and upper left, the upper and upper left neighboring blocks, as shown in FIG. It is expressed by a formula.
ΔAがΔLよりも大きくなる場合は、QPAとQPALとの差が大きい場合であり、上と左上の隣接ブロックの間で画像の滑らかさ或いは複雑さが左と左上の隣接ブロック間よりも異なっている(変化が大きい)と推察される。その為、図10の太点線で示されるように、符号化対象ブロックとその周囲の既符号化済みの隣接ブロックにおいて、左2つのブロック(左と左上の隣接ブロック)と右2つのブロック(符号化対象ブロックと上の隣接ブロック)とで量子化パラメータの差が生じると考えられるので、符号化対象ブロックの量子化パラメータは左の隣接ブロックの量子化パラメータよりも上の隣接ブロックの量子化パラメータに近いと判定する。 When ΔA becomes larger than ΔL, the difference between QPA and QPAL is large, and the smoothness or complexity of the image between the upper and upper left adjacent blocks differs from that between the left and upper left adjacent blocks. It is inferred that there is a large change. Therefore, as shown by the thick dotted line in FIG. 10, in the encoding target block and the neighboring neighboring blocks that have already been coded, the left two blocks (left and upper left neighboring blocks) and the right two blocks (codes) The quantization parameter of the encoding target block is higher than the quantization parameter of the adjacent block on the left. It is determined that it is close to.
以上の判定をフローチャートにしたものが図11である。図11を用いて、図6のS101の左と上の隣接ブロックの量子化パラメータがともに正である、即ち左と上の隣接ブロックがともに存在すると判定された場合から説明する。 FIG. 11 is a flowchart showing the above determination. A case will be described with reference to FIG. 11 where it is determined that the quantization parameters of the left and upper adjacent blocks in S101 of FIG. 6 are both positive, that is, both the left and upper adjacent blocks exist.
左及び上の隣接ブロックの両方が存在する場合、ΔLとΔAとの比較判定を行う(S113)。ΔAがΔLよりも大きい場合、上の隣接ブロックの量子化パラメータQPAを予測量子化パラメータとする(S114)。そうでない場合、左の隣接ブロックの量子化パラメータQPLを予測量子化パラメータとする(S115)。こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。
When both the left and upper adjacent blocks exist, a comparison determination between ΔL and ΔA is performed (S113). When ΔA is larger than ΔL, the quantization parameter QPA of the upper adjacent block is set as the predicted quantization parameter (S114). Otherwise, the quantization parameter QPL of the left adjacent block is set as the prediction quantization parameter (S115). The predicted quantization parameter calculated in this way is supplied to the differential quantization
[実施例2]
本実施例において、予測量子化パラメータの算出を行う場合に、動画像符号化装置100の予測量子化パラメータ算出部114で参照する隣接ブロックは符号化済みのブロックであり、動画像復号装置200の予測量子化パラメータ算出部205で参照する隣接ブロックは復号済みのブロックである。符号化側で参照される符号化済みのブロックは、符号化内部で次の符号化の為に局部復号されたブロックであり、復号側で参照される復号済みブロックと同じである。その為、予測量子化パラメータ算出部114及び205の機能も共通であり、それぞれで算出される予測量子化パラメータも同じある。以降の実施例では、予測量子化パラメータの算出について、符号化と復号で切り分けず、共通の機能として符号化側で説明する。
[Example 2]
In the present embodiment, when predictive quantization parameters are calculated, adjacent blocks referred to by the predictive quantization
実施例2における予測量子化パラメータ算出部114の動作について説明する。図12は実施例2における予測量子化パラメータ算出部114の動作を示すフローチャートである。
The operation of the predicted quantization
最初に、符号化情報格納メモリ113から符号化対象ブロックに隣接する周囲の既符号化済みのブロックの量子化パラメータを取得する(S200)。符号化対象ブロックの左上の基準位置情報から、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当するブロックの量子化パラメータを予測量子化パラメータ算出部114に供給する。画像の左端或いは上端に符号化対象ブロックが位置している場合、左或いは上及び左上の隣接ブロックは存在しない。ここで、量子化パラメータは常に正値をとることに着目して、隣接ブロックが存在しない場合、隣接ブロックの量子化パラメータQPx(x=L,A,AL)を0に設定して、予測量子化パラメータ算出部114に供給する。次に左と上の隣接ブロックが存在するか否かを判定する(S201)。左及び上の隣接ブロックの量子化パラメータがともに正の場合、両方が存在するので、S205に進む。そうでない場合、即ち一方が存在しない場合はS202に進む。S202からS204の処理過程について実施例1と同様なので割愛する。
First, the quantization parameter of the surrounding already-encoded block adjacent to the encoding target block is acquired from the encoding information storage memory 113 (S200). The storage area stored in the encoding
左及び上の隣接ブロックの両方が存在する場合、左の隣接ブロックの量子化パラメータQPLと左上の隣接ブロックの量子化パラメータQPALとの差分絶対値ΔLが閾値THL未満か否かを判定する(S205)。差分絶対値ΔLは次式で算出される。 When both the left and upper adjacent blocks exist, it is determined whether or not the difference absolute value ΔL between the quantization parameter QPL of the left adjacent block and the quantization parameter QPAL of the upper left adjacent block is less than the threshold value THL (S205). ). The difference absolute value ΔL is calculated by the following equation.
ΔLがTHL未満となる場合、状態判定フラグSLを”1”に設定する(S206)。一方、ΔLがTHL未満でない場合、状態判定フラグSLを”0”に設定する(S207)。実施例2では、QPLとQPALとが閾値THL未満で収まる場合、左と左上の各隣接ブロックは量子化パラメータが一致していると判断することとし、実施例1におけるQPLとQPALの一致と同様の判定を行う。その為、状態判定フラグSLが”1”となる場合はQPAを予測量子化パラメータとすることを表す。次に、上の隣接ブロックの量子化パラメータQPAとQPALとの差分絶対値ΔAが閾値THA未満か否かを判定する(S208)。差分絶対値ΔAは次式で算出される。 When ΔL is less than THL, the state determination flag SL is set to “1” (S206). On the other hand, if ΔL is not less than THL, the state determination flag SL is set to “0” (S207). In the second embodiment, when QPL and QPAL are less than the threshold THL, it is determined that the left and upper left neighboring blocks have the same quantization parameter, which is similar to the match between QPL and QPAL in the first embodiment. Judgment is made. Therefore, when the state determination flag SL is “1”, this indicates that QPA is used as a prediction quantization parameter. Next, it is determined whether or not the difference absolute value ΔA between the quantization parameters QPA and QPAL of the adjacent block above is less than a threshold value THA (S208). The difference absolute value ΔA is calculated by the following equation.
ΔAがTHA未満となる場合、状態判定フラグSAを”1”に設定する(S209)。一方、ΔAがTHA未満でない場合、状態判定フラグSAを”0”に設定する(S210)。実施例2では、QPAとQPALとが閾値THA未満で収まる場合、上と左上の各隣接ブロックは量子化パラメータが一致していると判断することとし、実施例1におけるQPAとQPALの一致と同様の判定を行う。その為、状態判定フラグSAが”1”となる場合はQPLを予測量子化パラメータとすることを表す。状態判定フラグSL及びSAに基づいて、予測量子化パラメータを算出する(S211)。図13は差分絶対値ΔL及びΔAと閾値THL及びTHAとの比較を状態判定フラグSL及びSAと関連付けを行った2次元配置図である。左下の原点0を基準に、横軸をΔLの大きさ、縦軸をΔAの大きさをとり、閾値THL及びTHAによって4つに領域に区分され、それぞれの領域で選択する予測量子化パラメータを示す(図13中に領域1〜4で示される)。
When ΔA is less than THA, the state determination flag SA is set to “1” (S209). On the other hand, if ΔA is not less than THA, the state determination flag SA is set to “0” (S210). In the second embodiment, when QPA and QPAL are less than the threshold THA, it is determined that the upper and upper left adjacent blocks have the same quantization parameter, which is the same as the matching of QPA and QPAL in the first embodiment. Judgment is made. Therefore, when the state determination flag SA is “1”, this indicates that QPL is used as a predicted quantization parameter. A predicted quantization parameter is calculated based on the state determination flags SL and SA (S211). FIG. 13 is a two-dimensional layout diagram in which the comparison between the absolute difference values ΔL and ΔA and the threshold values THL and THA is associated with the state determination flags SL and SA. Taking the
領域1
状態判定フラグSLが”1”、SAが”0”の場合であり、左と左上の隣接ブロックの量子化パラメータの差が小さく、上と左上の量子化パラメータの差が大きくなり、図3に示される事例のように縦方向のブロックで量子化パラメータが近似していると考えられる。その為、符号化対象ブロックの量子化パラメータは上の隣接ブロックの量子化パラメータQPAに近い値になると判断し、予測量子化パラメータをQPAとする。
This is a case where the state determination flag SL is “1” and SA is “0”. The difference between the quantization parameters of the left and upper left adjacent blocks is small, and the difference between the upper and upper left quantization parameters is large. As shown in the example shown, it is considered that the quantization parameter is approximated by blocks in the vertical direction. Therefore, it is determined that the quantization parameter of the encoding target block is close to the quantization parameter QPA of the adjacent block above, and the predicted quantization parameter is QPA.
領域2
状態判定フラグSLが”0”、SAが”1”の場合であり、領域1と同様の判断を行うと、横方向のブロックで量子化パラメータが近似していると考えられ、符号化対象ブロックの量子化パラメータは左の隣接ブロックの量子化パラメータQPLに近い値になると判断し、予測量子化パラメータをQPLとする。
This is a case where the state determination flag SL is “0” and the SA is “1”. When the same determination as that in the
領域3
状態判定フラグSL及びSAがともに”0”の場合である。即ち、QPL及びQPAがともにQPALとの差分絶対値が大きい場合であり、左、上及び左上の隣接ブロックの量子化パラメータが全て異なるので、QPL或いはQPAのどちらか一方を選択するには十分な条件判定が出来ない。そこで、QPLとQPAの平均を予測量子化パラメータとして、均等な判定値とする。
This is a case where the state determination flags SL and SA are both “0”. That is, both QPL and QPA have a large difference absolute value from QPAL, and the quantization parameters of the adjacent blocks on the left, top, and top left are all different, which is sufficient to select either QPL or QPA. Condition judgment is not possible. Therefore, an average of QPL and QPA is used as a predictive quantization parameter, and an equal determination value is set.
領域4
状態判定フラグSL及びSAがともに”1”の場合である。即ち、QPL及びQPAがともにQPALとの差分絶対値が小さい場合であり、どちらか一方を選択せず、QPLとQPAの平均値を予測量子化パラメータとする。
This is a case where the state determination flags SL and SA are both “1”. That is, both QPL and QPA have a small difference absolute value from QPAL, and either one is not selected, and the average value of QPL and QPA is used as the predicted quantization parameter.
こうして判定、算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。
The predicted quantization parameter determined and calculated in this way is supplied to the differential quantization
閾値THL及びTHAを1とすると、量子化パラメータは正整数であるので、実施例1と同等の判定となる。但し、上述した領域4は、左、上及び左上の全ての値が同じとなるので、平均値処理を必要としない。また、判定として各隣接ブロックの量子化パラメータの一致を調べるだけで済み、差分絶対値を演算で算出する必要が無い為、処理負荷を低減した実施例2のスペシャルケースとなり、高い実効性を備えるものである。
When the thresholds THL and THA are set to 1, the quantization parameter is a positive integer, so the determination is the same as in the first embodiment. However, since all the values in the
閾値THL及びTHAはあまり大きな値に設定すると、平均値の発生確率が高くなり、予測量子化パラメータの参照先に偏りがある場合には有効性が弱くなるので、2前後に設定することが望ましい。 If the thresholds THL and THA are set to a very large value, the probability of occurrence of the average value increases, and the effectiveness becomes weak when the reference destination of the predicted quantization parameter is biased. .
また、図13の領域3及び4において、予測量子化パラメータとしてQPLとQPAの平均値をとることとしたが、ΔL及びΔAの比較を行い、予測量子化パラメータとして参照する隣接ブロックの量子化パラメータを判定してもよい。図12のフローチャートのS211の中で、或いはS211の後に、ΔLとΔAを比較する。ΔLが大きい場合はQPA、ΔAが大きい場合はQPL、同じ大きさの場合はQPLとQPAの平均値を予測量子化パラメータとする。
Further, in
[実施例3]
実施例3における予測量子化パラメータ算出部114の動作について説明する。実施例1との相違は、左或いは上の隣接ブロックの量子化パラメータを予測量子化パラメータとして参照していたのを、予測量子化パラメータの判定に基づいて、左及び上の隣接ブロックの量子化パラメータに重み付けを行い、算出される値を予測量子化パラメータとする点である。
[Example 3]
The operation of the predicted quantization
図14は実施例3における予測量子化パラメータ算出部114の動作を示すフローチャートである。図14のフローチャートのS300からS304までは実施例1の図6のS100からS104までと同じであるので、説明を割愛し、S301の左と上の隣接ブロックの量子化パラメータがともに正である、即ち左と上の隣接ブロックがともに存在すると判定された場合から説明する。
FIG. 14 is a flowchart illustrating the operation of the predicted quantization
左及び上の隣接ブロックの両方が存在する場合、QPLとQPALとの一致判定を行う(S305)。QPLとQPALが一致する場合、上の隣接ブロックの量子化パラメータの重み付け係数FAを5、左の隣接ブロックの量子化パラメータの重み付け係数FLを3とし、上の隣接ブロックの量子化パラメータに対して重み付けを大きくする(S306)。QPLとQPALが一致しない場合、S307に進み、QPAとQPALとの一致判定を行う(S307)。QPAとQPALが一致する場合、FAを3、FLを5として、左の隣接ブロックの量子化パラメータに対して重み付けを大きくする(S308)。QPAとQPALが一致しない場合、FAとFLをともに4とし、左と上の隣接ブロックの量子化パラメータに対する重み付けを均等化する(S309)。これはQPLとQPAの平均値を算出することと等価であり、実施例1と同等となる。決定した重み付け係数からと各量子化パラメータから次式にて予測量子化パラメータpredQPを算出する(S310)。 If both the left and upper adjacent blocks exist, a match determination between QPL and QPAL is performed (S305). When QPL and QPAL match, the weighting coefficient FA of the quantization parameter of the upper adjacent block is set to 5, the weighting coefficient FL of the quantization parameter of the left adjacent block is set to 3, and the quantization parameter of the upper adjacent block is The weighting is increased (S306). If QPL and QPAL do not match, the process proceeds to S307, and a match determination between QPA and QPAL is performed (S307). If QPA and QPAL match, FA is set to 3 and FL is set to 5, and the weighting is increased for the quantization parameter of the left adjacent block (S308). If QPA and QPAL do not match, both FA and FL are set to 4, and the weights for the quantization parameters of the left and upper adjacent blocks are equalized (S309). This is equivalent to calculating the average value of QPL and QPA, and is equivalent to the first embodiment. A predicted quantization parameter predQP is calculated from the determined weighting coefficient and each quantization parameter by the following equation (S310).
ここで、上式の分母はFA+FLであり、分子の2は四捨五入の為に加算される(FA+FL)/2の値である。 Here, the denominator of the above formula is FA + FL, and 2 of the numerator is a value of (FA + FL) / 2 added for rounding off.
こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。
The predicted quantization parameter calculated in this way is supplied to the differential quantization
また、予測量子化パラメータの判定処理において、S305で一致と判定された場合にのみ、上の隣接ブロックの量子化パラメータの重み付け係数を大きくして、それ以外は左の隣接ブロックの量子化パラメータの重み付け係数を大きくするこようにして、負荷の軽い判定とすることも可能である。この手法は、符号化及び復号がラスタースキャン順(画面の左上から右下への順次走査)に行われることから、左の隣接ブロックの量子化パラメータの重み付け係数への重み付けを優先することとして、簡易的な判定を行うものである。 Also, in the predictive quantization parameter determination process, the weighting coefficient of the quantization parameter of the upper adjacent block is increased only when it is determined to match in S305, and the quantization parameter of the left adjacent block is otherwise set. It is also possible to make the determination with a light load by increasing the weighting coefficient. In this method, since encoding and decoding are performed in raster scan order (sequential scanning from the upper left of the screen to the lower right), priority is given to weighting the weighting coefficient of the quantization parameter of the left adjacent block. This is a simple determination.
上述の予測量子化パラメータの判定処理において、図14のS301の左と上の隣接ブロックの量子化パラメータがともに正である、即ち左と上の隣接ブロックがともに存在すると判定された場合から説明する。 In the above-described prediction quantization parameter determination processing, description will be made from the case where it is determined that the quantization parameters of the left and upper adjacent blocks in S301 in FIG. 14 are both positive, that is, both the left and upper adjacent blocks exist. .
図15は、左と上の隣接ブロックがともに存在すると判定された後の簡易判定処理の動作を表すフローチャートである。左及び上の隣接ブロックの両方が存在する場合、QPLとQPALとの一致判定を行う(S311)。QPLとQPALが一致する場合、上の隣接ブロックの量子化パラメータの重み付け係数FAを5、左の隣接ブロックの量子化パラメータの重み付け係数FLを3とし、上の隣接ブロックの量子化パラメータに対して重み付けを大きくする(S312)。QPLとQPALが一致しない場合、FAを3、FAを5として、左の隣接ブロックの量子化パラメータに対して重み付けを大きくする(S313)。決定した重み付け係数に基づいて、上述したS310にて予測量子化パラメータpredQPを算出する。 FIG. 15 is a flowchart showing the operation of the simple determination process after it is determined that both the left and upper adjacent blocks exist. If both the left and upper adjacent blocks exist, a match determination between QPL and QPAL is performed (S311). When QPL and QPAL match, the weighting coefficient FA of the quantization parameter of the upper adjacent block is set to 5, the weighting coefficient FL of the quantization parameter of the left adjacent block is set to 3, and the quantization parameter of the upper adjacent block is The weighting is increased (S312). If QPL and QPAL do not match, FA is set to 3, FA is set to 5, and the weighting is increased for the quantization parameter of the left adjacent block (S313). Based on the determined weighting coefficient, the predicted quantization parameter predQP is calculated in S310 described above.
更に、実施例2の判定処理とも組合せは可能である。この場合、図13で示される差分絶対値ΔL及びΔAと閾値THL及びTHAとの比較を状態判定フラグSL及びSAと関連付けを行った2次元配置図に対して、各領域に重み付け係数を設定しておくことで可能となる。図16に重み付け係数を設定した2次元配置の一例を示す。領域1はFAを5、FLを3とし、領域2はFAを3、FLを5とし、残りの領域3及び4ではFA、FLともに4と設定する。状態判定フラグにより選択された領域の重み付け係数により、予測量子化パラメータを算出する。こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。
Further, it can be combined with the determination processing of the second embodiment. In this case, with respect to the two-dimensional layout diagram in which the comparison between the absolute difference values ΔL and ΔA and the threshold values THL and THA shown in FIG. It becomes possible by keeping. FIG. 16 shows an example of a two-dimensional arrangement in which weighting coefficients are set. In
尚、ここでは重み付け係数FA及びFLの係数の組合せとして、(FA,FL)=(5,3)、(4,4)、(3,5)としたが、これ以外の係数を設定してもよい。但し、計算の高速化を重視する場合、FA+FLが2の冪乗で表される変数を選択することが望ましい。 In this case, (FA, FL) = (5, 3), (4, 4), (3, 5) is set as the combination of the weighting coefficients FA and FL, but other coefficients are set. Also good. However, when importance is attached to speeding up the calculation, it is desirable to select a variable in which FA + FL is expressed as a power of 2.
[実施例4]
実施例4における予測量子化パラメータ算出部114の動作について説明する。図17は実施例4における予測量子化パラメータ算出部114の動作を示すフローチャートである。
[Example 4]
The operation of the predicted quantization
最初に、符号化情報格納メモリ113から符号化対象ブロックに隣接する周囲の既符号化済みのブロックの量子化パラメータを取得する(S400)。符号化対象ブロックの左上の基準位置情報から、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当するブロックの量子化パラメータを予測量子化パラメータ算出部114に供給する。画像の左端或いは上端に符号化対象ブロックが位置している場合、左或いは上及び左上の隣接ブロックは存在しない。ここで、量子化パラメータは常に正値をとることに着目して、隣接ブロックが存在しない場合、隣接ブロックの量子化パラメータQPx(x=L,A,AL)を0に設定して、予測量子化パラメータ算出部114に供給する。次に左と上の隣接ブロックが存在するか否かを判定する(S401)。左及び上の隣接ブロックの量子化パラメータがともに正の場合、両方が存在するので、S405に進む。そうでない場合、即ち一方が存在しない場合はS402に進む。S402からS404の処理過程について実施例1至乃3と同様なので割愛する。
First, the quantization parameter of the surrounding already-encoded block adjacent to the encoding target block is acquired from the encoding information storage memory 113 (S400). The storage area stored in the encoding
左及び上の隣接ブロックの両方が存在する場合、左の隣接ブロックの量子化パラメータQPLと左上の隣接ブロックの量子化パラメータQPALとの差分絶対値ΔL及び上の隣接ブロックの量子化パラメータQPAと左上の隣接ブロックの量子化パラメータQPALとの差分絶対値ΔAとを算出する。算出されたΔLとΔAとの差分をとり、その差分をパラメータDで除算を行い、得られる商を量子化ファクターδとすると、δは次式から算出される(S405)。 When both the left and upper adjacent blocks exist, the absolute difference ΔL between the quantization parameter QPL of the left adjacent block and the quantization parameter QPAL of the upper left adjacent block and the quantization parameter QPA of the upper adjacent block and the upper left The difference absolute value ΔA from the quantization parameter QPAL of the adjacent block is calculated. Taking the difference between the calculated ΔL and ΔA, dividing the difference by the parameter D, and setting the obtained quotient as the quantization factor δ, δ is calculated from the following equation (S405).
ここで、パラメータDは、ΔLとΔAとの差分をD単位に量子化するステップであり、図18に示されるように、パラメータDによりΔLとΔAとの差分の量子化値としてδが算出される。 Here, the parameter D is a step of quantizing the difference between ΔL and ΔA in units of D. As shown in FIG. 18, δ is calculated as a quantized value of the difference between ΔL and ΔA by the parameter D. The
本実施例では、上式で得られたδに応じて、左及び上の隣接ブロックの量子化パラメータに係る重み付け係数を変更して、予測量子化パラメータを算出する。ΔLとΔAとの差分が正で大きい場合は、左と左上の隣接ブロックの量子化パラメータとの差が大きい場合である。符号化対象ブロックとその周囲の既符号化済みの隣接ブロックは、上2つのブロック(上と左上の隣接ブロック)と下2つのブロック(左の隣接ブロックと符号化対象ブロック)との間で量子化パラメータの差が生じる傾向にある。この場合、符号化対象ブロックは左の隣接ブロックに近い量子化パラメータをとると判定し、左の隣接ブロックの量子化パラメータに対する重み付けを大きくする。 In the present embodiment, the predicted quantization parameter is calculated by changing the weighting coefficient related to the quantization parameter of the left and upper adjacent blocks according to δ obtained by the above equation. The case where the difference between ΔL and ΔA is positive and large is a case where the difference between the quantization parameter of the left and upper left adjacent blocks is large. The encoding target block and the surrounding encoded neighboring blocks are quantum between the upper two blocks (the upper and upper left adjacent blocks) and the lower two blocks (the left adjacent block and the encoding target block). There is a tendency for the difference in the conversion parameters to occur. In this case, it is determined that the encoding target block has a quantization parameter close to that of the left adjacent block, and the weight for the quantization parameter of the left adjacent block is increased.
逆に、ΔLとΔAとの差分が負で大きい場合は、上と左上の隣接ブロックの量子化パラメータとの差が大きい場合である。符号化対象ブロックとその周囲の既符号化済みの隣接ブロックは、左2つのブロック(左と左上の隣接ブロック)と右2つのブロック(上の隣接ブロックと符号化対象ブロック)との間で量子化パラメータの差が生じる傾向にある。この場合、符号化対象ブロックは上の隣接ブロックに近い量子化パラメータをとると判定し、上の隣接ブロックの量子化パラメータに対する重み付けを大きくする。 Conversely, when the difference between ΔL and ΔA is negative and large, the difference between the quantization parameters of the upper and upper left adjacent blocks is large. The encoding target block and its neighboring neighboring blocks that have already been encoded are quantized between the left two blocks (left and upper left adjacent blocks) and the right two blocks (upper adjacent blocks and encoding target blocks). There is a tendency for the difference in the conversion parameters to occur. In this case, it is determined that the encoding target block has a quantization parameter close to that of the upper adjacent block, and the weighting on the quantization parameter of the upper adjacent block is increased.
ΔLとΔAとの差分が0に近い場合は、符号化対象の左及び上の隣接ブロックが近い量子化パラメータとなる場合である。この場合、左と上の隣接ブロックの量子化パラメータに対する重み付けを均等化する。 When the difference between ΔL and ΔA is close to 0, the left and upper adjacent blocks to be encoded become close quantization parameters. In this case, the weights for the quantization parameters of the left and upper adjacent blocks are equalized.
このように、量子化ファクターδに応じて左と上の隣接ブロックの量子化パラメータの重み付け係数を可変させて、最適な予測量子化パラメータを算出する為に、以下ではδの正規化を行う。 In this way, in order to vary the weighting coefficient of the quantization parameter of the left and upper adjacent blocks according to the quantization factor δ and calculate the optimal prediction quantization parameter, δ is normalized below.
まず、δの上限MAX及び下限MINを設定し、δをMAX及びMINの範囲内に収まる値に制限する(S406)。ここで、MINは−MAXと等価であり、MAX及びMINは後工程のS408で設定されるテーブルの標本数に合わせるように設定する。次に、δにオフセット値offsetを加算してindexを算出する(S407)。indexは後工程のS408で設定されるテーブルのインデックスであり、0を含む整数として表される。その為、δにoffsetを加算して、正整数に変換する。offsetにはMAXが設定され、indexの最小数はδ+offset=−MIN+MAX=0として表すことが可能となる。算出されたindexから該当する重み付け係数の変換テーブルから読み出す(S408)。ここでは、MAX=2とした場合の例を用いて説明する。 First, an upper limit MAX and a lower limit MIN of δ are set, and δ is limited to a value that falls within the range of MAX and MIN (S406). Here, MIN is equivalent to -MAX, and MAX and MIN are set so as to match the number of samples in the table set in S408 in the subsequent process. Next, the index is calculated by adding the offset value offset to δ (S407). The index is an index of the table set in S408 in the subsequent process, and is expressed as an integer including 0. Therefore, offset is added to δ and converted to a positive integer. MAX is set in offset, and the minimum number of indexes can be expressed as δ + offset = −MIN + MAX = 0. It reads from the conversion table of the corresponding weighting coefficient from the calculated index (S408). Here, description will be made using an example in which MAX = 2.
図19はMAXを2として場合に、ΔLとΔAとの差分からδを算出し、上限と下限を設けた場合の変換例である。δは−2≦δ≦2の範囲で5つの整数値をとるので、これら5つの値に合わせて、重み付け係数のテーブルが設定される。図20に重み付け係数のテーブルの一例を示す。重み付け係数のテーブルの中でMAXの値となるindex(この場合2となる)で左及び上の隣接ブロックの量子化パラメータに対する重み付けを均等とし、indexが小さくなるに従い、上の隣接ブロックの量子化パラメータに対する重み付け係数FAを大きくし、indexが大きくなるに従い、左の隣接ブロックの量子化パラメータに対する重み付け係数FLを大きくなるように設定する。続いて、indexで指定される重み付け係数の組(FA,FL)を選択して、予測量子化パラメータを算出する(S409)。決定した重み付け係数からと各量子化パラメータから次式にて予測量子化パラメータpredQPを算出する。 FIG. 19 shows a conversion example when δ is calculated from the difference between ΔL and ΔA when MAX is 2, and an upper limit and a lower limit are provided. Since δ takes five integer values in a range of −2 ≦ δ ≦ 2, a table of weighting coefficients is set according to these five values. FIG. 20 shows an example of a weighting coefficient table. In the weighting coefficient table, the index that is the MAX value (in this case, 2) equalizes the weights for the quantization parameters of the left and upper adjacent blocks, and as the index becomes smaller, the quantization of the upper adjacent blocks The weighting coefficient FA for the parameter is increased, and the weighting coefficient FL for the quantization parameter of the left adjacent block is set to increase as the index increases. Subsequently, a set of weighting coefficients (FA, FL) designated by the index is selected, and a prediction quantization parameter is calculated (S409). A predicted quantization parameter predQP is calculated from the determined weighting coefficient and each quantization parameter by the following equation.
ここで、上式の分母はFA+FLであり、分子の2は四捨五入の為に加算される(FA+FL)/2の値である。 Here, the denominator of the above formula is FA + FL, and 2 of the numerator is a value of (FA + FL) / 2 added for rounding off.
以上のようにして、予測量子化パラメータが算出される。上述した実施例では、パラメータDによる除算を行った為、図18で示されるように0近傍付近の発生頻度が高くなる傾向にあるので、図21で示されるように均等分割をして発生頻度を均等化しても構わない。この場合、S405の量子化ファクターδの演算方式を変更することで解決される。 As described above, the predicted quantization parameter is calculated. In the embodiment described above, since the division by the parameter D is performed, the occurrence frequency in the vicinity of 0 tends to increase as shown in FIG. 18, so the occurrence frequency is obtained by performing equal division as shown in FIG. May be equalized. In this case, the problem is solved by changing the calculation method of the quantization factor δ in S405.
尚、ここでは重み付け係数FA及びFLの係数の組合せとして、(4,0)、(3,1)、(2,2)としたが、これ以外の係数を設定してもよい。但し、計算の高速化を重視する場合、FA+FLが2の冪乗で表される変数を選択することが望ましい。 In this case, the combination of the weighting coefficients FA and FL is (4, 0), (3, 1), (2, 2), but other coefficients may be set. However, when importance is attached to speeding up the calculation, it is desirable to select a variable in which FA + FL is expressed as a power of 2.
また、δを演算として除算を行っているが、パラメータDを2の冪乗の値とし、δの演算をシフト演算やビットマスクにより、処理を高速化することも可能である。 Further, although division is performed using δ as an operation, it is also possible to speed up the processing by setting the parameter D to a power of 2 and performing the operation of δ by a shift operation or a bit mask.
実施の形態の動画像符号化装置によれば、符号化対象のブロック毎に符号化される量子化パラメータを、周囲の符号化済みのブロックの量子化パラメータ及び符号化情報を用いて、最適な予測量子化パラメータを予測して算出し、量子化パラメータと予測量子化パラメータとの差分をとり符号化することで、画質を変化させずに、量子化パラメータの符号量を削減して、符号化効率を向上させることが出来る。 According to the moving picture coding apparatus of the embodiment, the quantization parameter to be coded for each block to be coded is optimized using the quantization parameter and coding information of the surrounding coded blocks. By predicting and calculating the predictive quantization parameter, encoding by taking the difference between the quantization parameter and the predictive quantization parameter, the coding amount of the quantization parameter is reduced and coding is performed without changing the image quality. Efficiency can be improved.
また、符号化側と復号側で、量子化パラメータ予測の共通の機能として実装出来るので、回路規模を縮小することが出来る。これは、符号化済みの隣接ブロックが符号化側では次の符号化対象ブロックの予測の為に局部復号したブロックとなり、復号済みブロックと同一である為、符号化側と復号側で矛盾を生じないように量子化パラメータ予測の判定を実現したことによる。 Further, since the encoding side and the decoding side can be implemented as a common function for predicting the quantization parameter, the circuit scale can be reduced. This is because the encoded adjacent block is a locally decoded block for the prediction of the next block to be encoded on the encoding side, and is the same as the decoded block, so there is a contradiction between the encoding side and the decoding side. This is because the determination of the prediction of the quantization parameter is realized.
以上述べた実施の形態の動画像符号化装置が出力する動画像の符号化ストリームは、実施の形態で用いられた符号化方法に応じて復号することができるように特定のデータフォーマットを有しており、動画像符号化装置に対応する動画像復号装置がこの特定のデータフォーマットの符号化ストリームを復号することができる。 The moving image encoded stream output from the moving image encoding apparatus of the embodiment described above has a specific data format so that it can be decoded according to the encoding method used in the embodiment. Therefore, the moving picture decoding apparatus corresponding to the moving picture encoding apparatus can decode the encoded stream of this specific data format.
動画像符号化装置と動画像復号装置の間で符号化ストリームをやりとりするために、有線または無線のネットワークが用いられる場合、符号化ストリームを通信路の伝送形態に適したデータ形式に変換して伝送してもよい。その場合、動画像符号化装置が出力する符号化ストリームを通信路の伝送形態に適したデータ形式の符号化データに変換してネットワークに送信する動画像送信装置と、ネットワークから符号化データを受信して符号化ストリームに復元して動画像復号装置に供給する動画像受信装置とが設けられる。 When a wired or wireless network is used to exchange an encoded stream between a moving image encoding device and a moving image decoding device, the encoded stream is converted into a data format suitable for the transmission form of the communication path. It may be transmitted. In that case, a video transmission apparatus that converts the encoded stream output from the video encoding apparatus into encoded data in a data format suitable for the transmission form of the communication channel and transmits the encoded data to the network, and receives the encoded data from the network Then, a moving image receiving apparatus that restores the encoded stream and supplies the encoded stream to the moving image decoding apparatus is provided.
動画像送信装置は、動画像符号化装置が出力する符号化ストリームをバッファするメモリと、符号化ストリームをパケット化するパケット処理部と、パケット化された符号化データをネットワークを介して送信する送信部とを含む。動画像受信装置は、パケット化された符号化データをネットワークを介して受信する受信部と、受信された符号化データをバッファするメモリと、符号化データをパケット処理して符号化ストリームを生成し、動画像復号装置に提供するパケット処理部とを含む。 The moving image transmitting apparatus is a memory that buffers the encoded stream output from the moving image encoding apparatus, a packet processing unit that packetizes the encoded stream, and transmission that transmits the packetized encoded data via the network. Part. The moving image receiving apparatus generates a coded stream by packetizing the received data, a receiving unit that receives the packetized coded data via a network, a memory that buffers the received coded data, and packet processing. And a packet processing unit provided to the video decoding device.
以上の符号化及び復号に関する処理は、ハードウェアを用いた伝送、蓄積、受信装置として実現することができるのは勿論のこと、ROM(リード・オンリ・メモリ)やフラッシュメモリ等に記憶されているファームウェアや、コンピュータ等のソフトウェアによっても実現することができる。そのファームウェアプログラム、ソフトウェアプログラムをコンピュータ等で読み取り可能な記録媒体に記録して提供することも、有線あるいは無線のネットワークを通してサーバから提供することも、地上波あるいは衛星ディジタル放送のデータ放送として提供することも可能である。 The above processing relating to encoding and decoding can be realized as a transmission, storage, and reception device using hardware, and is stored in a ROM (Read Only Memory), a flash memory, or the like. It can also be realized by firmware or software such as a computer. The firmware program and software program can be recorded on a computer-readable recording medium, provided from a server through a wired or wireless network, or provided as a data broadcast of terrestrial or satellite digital broadcasting Is also possible.
以上、本発明を実施の形態をもとに説明した。実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described based on the embodiments. The embodiments are exemplifications, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are within the scope of the present invention. .
100 動画像符号化装置、 101 画像メモリ、 102 残差信号生成部、 103 直交変換・量子化部、 104 第2の符号化ビット列生成部、 105 逆量子化・逆直交変換部、 106 復号画像信号重畳部、 107 復号画像メモリ、 108 予測画像生成部、 109 アクティビティ算出部、 110 量子化パラメータ算出部、 111 差分量子化パラメータ生成部、 112 第1の符号化ビット列生成部、 113 符号化情報格納メモリ、 114 予測量子化パラメータ算出部、 115 符号化ビット列多重化部、 200 動画像復号装置、 201 ビット列分離部、 202 第1符号化ビット列復号部、 203 量子化パラメータ生成部、 204 符号化情報格納メモリ、 205 予測量子化パラメータ算出部、 206 第2符号化ビット列復号部、 207 逆量子化・逆直交変換部、 208 復号画像信号重畳部、 209 予測画像生成部、 210 復号画像メモリ。
DESCRIPTION OF
Claims (10)
前記ビットストリームをブロック単位に復号して復号対象ブロックの差分量子化パラメータを抽出する復号部と、
前記量子化パラメータを含む符号化情報を記憶する符号化情報格納メモリから前記復号対象ブロックの周囲に隣接する複数の復号済みの隣接ブロックの量子化パラメータを読み出し、複数の前記隣接ブロックの量子化パラメータから前記復号対象ブロックの予測量子化パラメータを算出する予測量子化パラメータ算出部と、
前記復号対象ブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記復号対象ブロックの量子化パラメータを生成する量子化パラメータ生成部とを備えることを特徴とする動画像復号装置。 A moving picture decoding apparatus for decoding a bit stream in which the moving picture is encoded in blocks obtained by dividing each picture of the moving picture,
A decoding unit that decodes the bitstream in units of blocks and extracts a differential quantization parameter of a decoding target block;
Reading quantization parameters of a plurality of decoded neighboring blocks adjacent to the periphery of the decoding target block from a coding information storage memory that stores coding information including the quantization parameter, and a plurality of quantization parameters of the neighboring blocks A predictive quantization parameter calculating unit for calculating a predictive quantization parameter of the decoding target block from:
A moving picture decoding apparatus comprising: a quantization parameter generation unit configured to generate a quantization parameter of the decoding target block by adding the difference quantization parameter of the decoding target block and the prediction quantization parameter.
前記ビットストリームをブロック単位に復号して復号対象ブロックの差分量子化パラメータを抽出する復号ステップと、
前記量子化パラメータを含む符号化情報を記憶する符号化情報格納メモリから前記復号対象ブロックの周囲に隣接する複数の復号済みの隣接ブロックの量子化パラメータを読み出し、複数の前記隣接ブロックの量子化パラメータから前記復号対象ブロックの予測量子化パラメータを算出する予測量子化パラメータ算出ステップと、
前記復号対象ブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記復号対象ブロックの量子化パラメータを生成する量子化パラメータ生成ステップとを備えることを特徴とする動画像復号方法。 A moving picture decoding method for decoding a bit stream in which the moving picture is encoded in blocks obtained by dividing each picture of the moving picture,
A decoding step of decoding the bitstream in units of blocks and extracting a differential quantization parameter of a decoding target block;
Reading quantization parameters of a plurality of decoded neighboring blocks adjacent to the periphery of the decoding target block from a coding information storage memory that stores coding information including the quantization parameter, and a plurality of quantization parameters of the neighboring blocks A predictive quantization parameter calculating step of calculating a predictive quantization parameter of the decoding target block from:
A moving picture decoding method comprising: a quantization parameter generation step of generating a quantization parameter of the decoding target block by adding the difference quantization parameter of the decoding target block and the prediction quantization parameter.
前記ビットストリームをブロック単位に復号して復号対象ブロックの差分量子化パラメータを抽出する復号ステップと、
前記量子化パラメータを含む符号化情報を記憶する符号化情報格納メモリから前記復号対象ブロックの周囲に隣接する複数の復号済みの隣接ブロックの量子化パラメータを読み出し、複数の前記隣接ブロックの量子化パラメータから前記復号対象ブロックの予測量子化パラメータを算出する予測量子化パラメータ算出ステップと、
前記復号対象ブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記復号対象ブロックの量子化パラメータを生成する量子化パラメータ生成ステップとをコンピュータに実行させることを特徴とする動画像復号プログラム。 A moving picture decoding program for decoding a bitstream in which the moving picture is encoded in units of blocks obtained by dividing each picture of the moving picture,
A decoding step of decoding the bitstream in units of blocks and extracting a differential quantization parameter of a decoding target block;
Reading quantization parameters of a plurality of decoded neighboring blocks adjacent to the periphery of the decoding target block from a coding information storage memory that stores coding information including the quantization parameter, and a plurality of quantization parameters of the neighboring blocks A predictive quantization parameter calculating step of calculating a predictive quantization parameter of the decoding target block from:
A moving picture decoding program that causes a computer to execute a quantization parameter generation step of generating a quantization parameter of the decoding target block by adding the differential quantization parameter of the decoding target block and the prediction quantization parameter .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011243642A JP2013102278A (en) | 2011-11-07 | 2011-11-07 | Moving image decoder, moving image decoding method and moving image decoding program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011243642A JP2013102278A (en) | 2011-11-07 | 2011-11-07 | Moving image decoder, moving image decoding method and moving image decoding program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013102278A true JP2013102278A (en) | 2013-05-23 |
Family
ID=48622513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011243642A Pending JP2013102278A (en) | 2011-11-07 | 2011-11-07 | Moving image decoder, moving image decoding method and moving image decoding program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013102278A (en) |
-
2011
- 2011-11-07 JP JP2011243642A patent/JP2013102278A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20170230661A1 (en) | Moving picture coding device, moving picture coding method, and moving picture coding program, and moving picture decoding device, moving picture decoding method, and moving picture decoding program | |
RU2693316C9 (en) | A moving picture decoding device, a moving picture decoding method, a computer readable recoding medium having a moving picture decoding program for decoding a bitstream | |
JP6315133B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding program | |
JP2008004984A (en) | Image processor and method, program, and recording medium | |
JP5664746B2 (en) | Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program | |
JP4775132B2 (en) | Image processing apparatus and method, program, and recording medium | |
JP6319411B2 (en) | Image decoding device | |
JP2013102277A (en) | Moving image encoder, moving image encoding method and moving image encoding program | |
JP6315138B2 (en) | Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program | |
JP2013106317A (en) | Moving image decoder, moving image decoding method and moving image decoding program | |
JP2013102278A (en) | Moving image decoder, moving image decoding method and moving image decoding program | |
JP2013106316A (en) | Moving image encoder, moving image encoding method and moving image encoding program | |
WO2013094217A1 (en) | Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, video decoding program |