JP2013150318A - Video decoding device, video decoding method, and video decoding program - Google Patents

Video decoding device, video decoding method, and video decoding program Download PDF

Info

Publication number
JP2013150318A
JP2013150318A JP2012279015A JP2012279015A JP2013150318A JP 2013150318 A JP2013150318 A JP 2013150318A JP 2012279015 A JP2012279015 A JP 2012279015A JP 2012279015 A JP2012279015 A JP 2012279015A JP 2013150318 A JP2013150318 A JP 2013150318A
Authority
JP
Japan
Prior art keywords
block
quantization parameter
encoded
prediction
adjacent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012279015A
Other languages
Japanese (ja)
Other versions
JP6064581B2 (en
Inventor
Katsuyoshi Nishitani
勝義 西谷
Hiroya Nakamura
博哉 中村
Motoharu Ueda
基晴 上田
Shigeru Fukushima
茂 福島
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.)
JVCKenwood Corp
Original Assignee
JVCKenwood 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
Priority to JP2012279015A priority Critical patent/JP6064581B2/en
Priority to TW106101557A priority patent/TWI603611B/en
Application filed by JVCKenwood Corp filed Critical JVCKenwood Corp
Priority to TW106132455A priority patent/TWI638564B/en
Priority to TW101149238A priority patent/TWI578764B/en
Priority to PCT/JP2012/008199 priority patent/WO2013094217A1/en
Priority to TW109101397A priority patent/TWI726579B/en
Priority to TW107128852A priority patent/TWI685249B/en
Publication of JP2013150318A publication Critical patent/JP2013150318A/en
Priority to US14/296,032 priority patent/US9667986B2/en
Application granted granted Critical
Publication of JP6064581B2 publication Critical patent/JP6064581B2/en
Priority to US15/497,595 priority patent/US9900600B2/en
Priority to US15/497,677 priority patent/US9743089B1/en
Priority to US15/498,155 priority patent/US9894364B2/en
Priority to US15/498,150 priority patent/US9936198B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce coding amount of a quantization parameter to improve coding efficiency.SOLUTION: In the video decoding device for decoding a bit stream in which a video is coded by dividing a first block obtained by dividing each picture of the video in a predetermined size, into one or more second blocks, a predictive quantization parameter derivation part 205 derives the predictive quantization parameter of the second block, using one or more quantization parameters of a third block which is close to the second block. The predictive quantization parameter derivation part 205, when the third block which is close to the second block is in a position exceeding a boundary of the first block, derives the predictive quantization parameter of the second block using the quantization parameter of a fourth block which is decoded before the second block is decoded.

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 block to be encoded are the same in the encoding / decoding order, and if not, the quantization parameter is transmitted. To do. 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.

特開2011−91772号公報JP 2011-91772 A

従来の量子化パラメータの制御では、符号化済みの左側のブロックの量子化パラメータを予測量子化パラメータとして、符号化対象のブロックの量子化パラメータとの差分を算出し、算出された差分量子化パラメータを符号化することで、量子化パラメータの符号量を削減した。しかしながら、画面内のコンテンツによっては、例えば図8に示されるように、符号化対象のブロック内の画像と符号化済みの左側のブロック内の画像の特徴が異なる場合、適応量子化にて算出される量子化パラメータは差が大きくなるので、一意に左側のブロックとの量子化パラメータ予測を実行しても差分量子化パラメータが大きくなり、符号量が増加する課題があった。   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. 8, 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.

また、符号量制御により算出される量子化パラメータは、通常画面の左上から右下に向かうラスタスキャン順に行われる為、符号化対象のブロックサイズが小さくなると、スライス間で処理順番が離れてしまう。その為、符号化対象のブロックが上に近接する符号化済みブロックの量子化パラメータを予測に使用する場合、近接しているが、符号量制御での処理順番が離れているので、符号量制御で算出される量子化パラメータが符号化対象のブロックと上に近接する符号化済みブロックとで必ずしも同じ或いは近い値になる見込みが無く、差分量子化パラメータの符号量が削減出来るとは言えないという課題があった。   In addition, since the quantization parameter calculated by the code amount control is performed in the raster scan order from the upper left to the lower right of the normal screen, the processing order is separated between slices when the block size to be encoded is reduced. Therefore, when the quantization parameter of the encoded block that is close to the encoding target block is used for prediction, it is close but the processing order in the code amount control is far away, so the code amount control The quantization parameter calculated in step 1 is not necessarily the same or close to the encoding target block and the encoded block adjacent to the upper side, and it cannot be said that the code amount of the differential quantization parameter can be reduced. There was a problem.

本発明はこうした状況に鑑みてなされたものであり、その目的は、量子化パラメータの符号量を削減して、符号化効率を向上させる技術を提供することにある。   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.

上記課題を解決するために、本発明のある態様の動画像復号装置は、動画像の各ピクチャを所定サイズで分割した第1のブロックの中を更に1つ或いは複数の第2のブロックに分割して前記動画像が符号化されたビットストリームを復号する動画像復号装置であって、前記ビットストリームを復号して前記第2のブロックの差分量子化パラメータを抽出する復号部(202)と、前記第2のブロックに近接する1つ或いは複数の第3のブロックの量子化パラメータを用いて、前記第2のブロックの予測量子化パラメータを導出する予測量子化パラメータ導出部(205)と、前記第2のブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記第2のブロックの量子化パラメータを生成する量子化パラメータ生成部(203)とを備える。前記予測量子化パラメータ導出部(205)は、前記第2のブロックに近接する前記第3のブロックが前記第1のブロックの境界を越えた位置にある場合は、前記第2のブロックより前に復号された第4のブロックの量子化パラメータを用いて前記第2のブロックの予測量子化パラメータを導出する。   In order to solve the above problems, a moving picture decoding apparatus according to an aspect of the present invention further divides a first block obtained by dividing each picture of a moving picture by a predetermined size into one or a plurality of second blocks. A decoding unit (202) that decodes the bitstream in which the moving image is encoded, and that decodes the bitstream and extracts the differential quantization parameter of the second block; A prediction quantization parameter deriving unit (205) for deriving a prediction quantization parameter of the second block using a quantization parameter of one or a plurality of third blocks adjacent to the second block; A quantization parameter generation unit that generates the quantization parameter of the second block by adding the difference quantization parameter of the second block and the predicted quantization parameter ( 03) and a. The predictive quantization parameter deriving unit (205), before the second block, when the third block close to the second block is located beyond the boundary of the first block, The predicted quantization parameter of the second block is derived using the decoded quantization parameter of the fourth block.

本発明の別の態様もまた、動画像復号装置である。この装置は、動画像の各ピクチャを所定サイズで分割したブロックの中を更に1つ或いは複数の符号化ブロックに分割して符号化ブロック単位で前記動画像が符号化されたビットストリームを復号する動画像復号装置であって、前記ビットストリームを復号ブロック単位に復号して復号ブロックの差分量子化パラメータを抽出する復号部(202)と、前記復号ブロックの動き補償予測における予測モードに応じて、前記復号ブロックに隣接する復号済みの隣接ブロックの量子化パラメータを用いて前記復号ブロックの予測量子化パラメータを導出する予測量子化パラメータ導出部(205)と、前記復号ブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記復号ブロックの量子化パラメータを生成する量子化パラメータ生成部(203)とを備える。前記予測量子化パラメータ導出部(205)は、前記復号ブロックの所定の方向に隣接する隣接ブロックが前記所定サイズのブロックの境界を越えた位置にある場合は、前記所定の方向に隣接する隣接ブロックとは異なる他の復号済みブロックの量子化パラメータを用いて前記復号ブロックの予測量子化パラメータを導出する。   Another aspect of the present invention is also a video decoding device. The apparatus further divides a block obtained by dividing each picture of a moving image by a predetermined size into one or a plurality of encoded blocks, and decodes a bitstream in which the moving image is encoded in units of encoded blocks. In accordance with a prediction unit in the motion compensation prediction of the decoded block, a decoding unit (202) that decodes the bitstream in units of a decoded block and extracts a differential quantization parameter of the decoded block, which is a video decoding device, A predictive quantization parameter deriving unit (205) for deriving a predictive quantization parameter of the decoded block using a quantization parameter of a decoded adjacent block adjacent to the decoded block; a differential quantization parameter of the decoded block; A quantization parameter for generating a quantization parameter of the decoded block by addition with a prediction quantization parameter Comprising meter generating unit (203). The predictive quantization parameter deriving unit (205), when an adjacent block adjacent to the decoded block in a predetermined direction is located beyond a boundary of the predetermined size block, is adjacent to the predetermined block The prediction quantization parameter of the decoded block is derived using the quantization parameter of another decoded block different from.

本発明のさらに別の態様は、動画像復号方法である。この方法は、動画像の各ピクチャを所定サイズで分割した第1のブロックの中を更に1つ或いは複数の第2のブロックに分割して前記動画像が符号化されたビットストリームを復号する動画像復号方法であって、前記ビットストリームを復号して前記第2のブロックの差分量子化パラメータを抽出する復号ステップと、前記第2のブロックに近接する1つ或いは複数の第3のブロックの量子化パラメータを用いて、前記第2のブロックの予測量子化パラメータを導出する予測量子化パラメータ導出ステップと、前記第2のブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記第2のブロックの量子化パラメータを生成する量子化パラメータ生成ステップとを備える。前記予測量子化パラメータ導出ステップは、前記第2のブロックに近接する前記第3のブロックが前記第1のブロックの境界を越えた位置にある場合は、前記第2のブロックより前に復号された第4のブロックの量子化パラメータを用いて前記第2のブロックの予測量子化パラメータを導出する。   Yet another aspect of the present invention is a video decoding method. In this method, a first block obtained by dividing each picture of a moving image by a predetermined size is further divided into one or a plurality of second blocks, and a moving picture for decoding a bitstream in which the moving image is encoded is decoded. An image decoding method comprising: a decoding step of decoding the bitstream to extract a differential quantization parameter of the second block; and a quantum of one or a plurality of third blocks adjacent to the second block A predictive quantization parameter deriving step for deriving a predictive quantization parameter of the second block using the quantization parameter; and adding the difference quantization parameter of the second block and the predictive quantization parameter to generate the second quantization parameter. A quantization parameter generation step for generating a quantization parameter for each block. The predictive quantization parameter derivation step is decoded before the second block when the third block adjacent to the second block is located beyond the boundary of the first block. The predicted quantization parameter of the second block is derived using the quantization parameter of the fourth block.

なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。   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.

実施の形態に係る予測量子化パラメータの導出方法を具備した動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder which comprised the derivation | leading-out method of the prediction quantization parameter which concerns on embodiment. 実施の形態に係る予測量子化パラメータの導出方法を具備した動画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus provided with the derivation method of the prediction quantization parameter which concerns on embodiment. MPEG−2 TM5の画面内の符号量制御を説明する図である。It is a figure explaining the code amount control in the screen of MPEG-2 TM5. H.264の量子化パラメータ予測方法を示す図である。H. It is a figure which shows the H.264 quantization parameter prediction method. 階層ツリー符号化を使用した場合の符号化処理順の一例を示す図である。It is a figure which shows an example of the encoding process order at the time of using hierarchy tree encoding. 階層ツリー符号化により分割されたツリーブロック内部の左上の符号化ブロックの量子化パラメータの予測を示す図である。It is a figure which shows prediction of the quantization parameter of the encoding block of the upper left inside the tree block divided | segmented by hierarchy tree encoding. 階層ツリー符号化により分割されたツリーブロック内部の符号化処理順の一例を示す図である。It is a figure which shows an example of the encoding process order inside the tree block divided | segmented by hierarchy tree encoding. 符号化対象の符号化ブロックと近接する既符号化済みの周囲のブロックに対して、絵柄が左及び左上のブロックに含まれる一例を表す図である。It is a figure showing an example with which a design is contained in the block on the left and the upper left with respect to the surrounding block which has already been encoded close to the encoding block of encoding object. MPEG−2 TM5の画面内の符号量制御において、上下で近接する符号化ブロックの位置を説明する図である。FIG. 4 is a diagram for explaining the positions of adjacent coding blocks in the upper and lower sides in code amount control within a screen of MPEG-2 TM5. 本実施の形態の予測量子化パラメータ導出部の詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of the prediction quantization parameter derivation | leading-out part of this Embodiment. 本実施の形態で規定するイントラ予測モードの値と予測方向を説明する図である。It is a figure explaining the value and prediction direction of the intra prediction mode prescribed | regulated by this Embodiment. 差分量子化パラメータの符号付き指数符号付ゴロム符号化テーブルの一例を表す図である。It is a figure showing an example of a Golomb encoding table with a signed exponent sign of a difference quantization parameter. 符号化対象ツリーブロックと符号化済みツリーブロックとの関係を示す図である。It is a figure which shows the relationship between an encoding object tree block and an encoded tree block. 階層ツリー符号化により分割されたツリーブロック内部の符号化ブロックと符号化済みブロックの関係を示す図である。It is a figure which shows the relationship between the encoding block inside the tree block divided | segmented by hierarchy tree encoding, and the encoded block. 第1の実施例において、符号化ブロックの予測量子化パラメータの参照先を表す図である。In a 1st Example, it is a figure showing the reference place of the prediction quantization parameter of an encoding block. 近接する既符号化済みの周囲のブロックの量子化パラメータを、符号化ブロックの予測量子化パラメータとして参照先として示す一例を表す図である。It is a figure showing an example which shows as a reference destination the quantization parameter of the adjacent block of an already encoded near as a prediction quantization parameter of an encoding block. 第1の実施例の第1の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 1st prediction quantization parameter derivation part of the 1st example. 第1の実施例の第1の予測量子化パラメータ導出部の別の動作を説明する為のフローチャートである。It is a flowchart for demonstrating another operation | movement of the 1st prediction quantization parameter derivation part of the 1st example. 第2の実施例において、符号化ブロックの予測量子化パラメータの参照先を表す図である。In a 2nd Example, it is a figure showing the reference destination of the prediction quantization parameter of an encoding block. 第2の実施例の第1の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 1st prediction quantization parameter derivation part of the 2nd example. 第3の実施例において、符号化ブロックの予測量子化パラメータの参照先を表す図である。In a 3rd Example, it is a figure showing the reference place of the prediction quantization parameter of an encoding block. 第3の実施例の第1の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 1st prediction quantization parameter derivation part of the 3rd example. 第4の実施例において、符号化ブロックの予測量子化パラメータの参照先を表す図である。In a 4th Example, it is a figure showing the reference destination of the prediction quantization parameter of an encoding block. 第4の実施例の第1の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 1st prediction quantization parameter derivation part of the 4th example. 第5の実施例において、符号化ブロックの予測量子化パラメータの参照先を表す図である。In a 5th Example, it is a figure showing the reference place of the prediction quantization parameter of an encoding block. 第5の実施例の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the prediction quantization parameter derivation | leading-out part of a 5th Example. 本実施の形態で規定するイントラ予測モードの値と予測方向を説明する図である。It is a figure explaining the value and prediction direction of the intra prediction mode prescribed | regulated by this Embodiment. 第6の実施例の第2の予測量子化パラメータ導出部304の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 2nd prediction quantization parameter derivation | leading-out part 304 of a 6th Example. イントラ予測モードをイントラ予測方向に変換するテーブルを説明する図である。It is a figure explaining the table which converts intra prediction mode into an intra prediction direction. 第6の実施例にてイントラ予測モードの予測方向で参照する近接ブロックの量子化パラメータの設定を説明する図である。It is a figure explaining the setting of the quantization parameter of the adjacent block referred in the prediction direction of intra prediction mode in a 6th Example. 第6の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向による判定処理の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating the detailed operation | movement of the determination process by an intra prediction direction in the 2nd prediction quantization parameter derivation part of the 6th example. 第6の実施例にてイントラ予測モードの予測方向で重み付け係数の設定を説明する図である。It is a figure explaining the setting of a weighting coefficient by the prediction direction of intra prediction mode in a 6th Example. 第6の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向による判定処理の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating the detailed operation | movement of the determination process by an intra prediction direction in the 2nd prediction quantization parameter derivation part of the 6th example. 第6の実施例にてイントラ予測モードの予測方向で別の重み付け係数の設定を説明する図である。It is a figure explaining the setting of another weighting coefficient by the prediction direction of intra prediction mode in a 6th Example. 第6の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が図34で示される所定範囲に収まる場合の詳細な動作を説明する為のフローチャートである。FIG. 35 is a flowchart for explaining detailed operation when the intra prediction direction falls within a predetermined range shown in FIG. 34 in the second predictive quantization parameter deriving unit of the sixth embodiment. 第7の実施例において、符号化ブロックの予測量子化パラメータの参照先を表す図である。In a 7th Example, it is a figure showing the reference place of the prediction quantization parameter of an encoding block. 第7の実施例の第2の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 2nd prediction quantization parameter derivation part of the 7th example. 第7の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向による判定処理の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating the detailed operation | movement of the determination process by an intra prediction direction in the 2nd prediction quantization parameter derivation part of the 7th example. 第8の実施例の第2の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 2nd prediction quantization parameter derivation part of the 8th example. 第8の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向による判定処理の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating the detailed operation | movement of the determination process by an intra prediction direction in the 2nd prediction quantization parameter derivation part of the 8th example. 第8の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が0である場合の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating detailed operation | movement when the intra prediction direction is 0 in the 2nd prediction quantization parameter derivation part of the 8th example. 第8の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が18未満である場合の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating a detailed operation | movement when the intra prediction direction is less than 18 in the 2nd prediction quantization parameter derivation part of the 8th example. 第8の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が18以上である場合の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating detailed operation | movement when the intra prediction direction is 18 or more in the 2nd prediction quantization parameter derivation part of the 8th example. 第8の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が0である場合の判定処理で重み付き係数を切り換える詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating the detailed operation | movement which switches a weighted coefficient by the determination process in case the intra prediction direction is 0 in the 2nd prediction quantization parameter derivation part of an 8th Example. 第8の実施例の第2の予測量子化パラメータ導出部で図34で示されるイントラ予測方向による判定処理で重み付き係数を切り換える詳細な動作を説明する為のフローチャートである。FIG. 35 is a flowchart for explaining a detailed operation of switching weighted coefficients in the determination process based on the intra prediction direction shown in FIG. 34 in the second predictive quantization parameter deriving unit of the eighth embodiment. 予測量子化パラメータ導出部の別の詳細な構成を示すブロック図である。It is a block diagram which shows another detailed structure of a prediction quantization parameter derivation | leading-out part. 第9の実施例の第2の予測量子化パラメータ導出部の動作を説明する為のフローチャートである。It is a flowchart for demonstrating operation | movement of the 2nd prediction quantization parameter derivation part of the 9th example. 第9の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向による判定処理の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating the detailed operation | movement of the determination process by an intra prediction direction in the 2nd prediction quantization parameter derivation part of the 9th example. 第9の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が0である場合の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating detailed operation | movement when the intra prediction direction is 0 in the 2nd prediction quantization parameter derivation part of the 9th example. 第9の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が18未満である場合の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating detailed operation | movement when the intra prediction direction is less than 18 in the 2nd prediction quantization parameter derivation part of the 9th example. 第9の実施例の第2の予測量子化パラメータ導出部でイントラ予測方向が18以上である場合の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating detailed operation | movement when the intra prediction direction is 18 or more in the 2nd prediction quantization parameter derivation part of the 9th example. 再演算判定部の詳細な動作を説明する為のフローチャートである。It is a flowchart for demonstrating the detailed operation | movement of a recalculation determination part. 量子化グループの一例を説明する図である。It is a figure explaining an example of a quantization group. 量子化グループ単位の量子化パラメータの予測の一例を説明する図である。It is a figure explaining an example of prediction of the quantization parameter of a quantization group unit.

本発明の実施の形態は、ピクチャを所定サイズの矩形ブロックに分割し、更にそのブロックを1つ或いは複数の符号化ブロックに分割し、符号化ブロック単位に量子化・符号化を行う動画像符号化において、処理対象のブロックの量子化パラメータの符号量を削減するために、周囲の符号化済みブロックの符号化情報から最適な予測量子化パラメータを導出し、予測量子化パラメータとの差分を算出して、符号化する符号量制御技術を提供する。   The embodiment of the present invention divides a picture into rectangular blocks of a predetermined size, further divides the block into one or a plurality of encoded blocks, and performs video coding that performs quantization / encoding in units of encoded blocks In order to reduce the coding amount of the quantization parameter of the block to be processed, the optimal prediction quantization parameter is derived from the coding information of the surrounding coded blocks and the difference from the prediction quantization parameter is calculated. Thus, a code amount control technique for encoding is provided.

本発明を実施する好適な動画像符号化装置100及び動画像復号装置200について説明する。図1は本発明を実施する動画像符号化装置100の構成を示すブロック図であり、画像メモリ101、残差信号生成部102、直交変換・量子化部103、第2の符号化ビット列生成部104、逆量子化・逆直交変換部105、復号画像信号重畳部106、復号画像メモリ107、予測画像生成部108、アクティビティ算出部109、量子化パラメータ算出部110、差分量子化パラメータ生成部111、第1の符号化ビット列生成部112、符号化情報格納メモリ113、予測量子化パラメータ導出部114及び符号化ビット列多重化部115から構成される。尚、各ブロック間を結ぶ太実線の矢印はピクチャの画像信号、細実線の矢印は符号化を制御するパラメータ信号の流れを表すものである。   A preferred moving image encoding apparatus 100 and moving image decoding apparatus 200 that implement the present invention will be described. FIG. 1 is a block diagram showing the configuration of a moving picture coding apparatus 100 that implements the present invention, in which an image memory 101, a residual signal generation unit 102, an orthogonal transform / quantization unit 103, and a second encoded bit string generation unit. 104, an inverse quantization / inverse orthogonal transform unit 105, a decoded image signal superimposing unit 106, a decoded image memory 107, a predicted image generation unit 108, an activity calculation unit 109, a quantization parameter calculation unit 110, a differential quantization parameter generation unit 111, A first encoded bit string generation unit 112, an encoded information storage memory 113, a predicted quantization parameter derivation unit 114, and an encoded bit string multiplexing unit 115 are configured. The thick solid arrows connecting the blocks represent picture image signals, and the thin solid arrows represent the flow of parameter signals for controlling encoding.

画像メモリ101は、撮影/表示時間順に供給された符号化対象の画像信号を一時格納する。画像メモリ101は、格納された符号化対象の画像信号を、所定の画素ブロック単位で、残差信号生成部102、予測画像生成部108及びアクティビティ算出部109に供給する。その際、撮影/表示時間順に格納された画像は、符号化順序に並べ替えられて、画素ブロック単位で、画像メモリ101から出力される。   The image memory 101 temporarily stores image signals to be encoded supplied in the order of shooting / display time. The image memory 101 supplies the stored image signal to be encoded to the residual signal generation unit 102, the predicted image generation unit 108, and the activity calculation unit 109 in units of predetermined pixel blocks. At this time, the images stored in the order of shooting / display time are rearranged in the encoding order and output from the image memory 101 in units of pixel blocks.

残差信号生成部102は、符号化する画像信号と予測画像生成部108にて生成された予測信号との引き算を行い残差信号を生成し、直交変換・量子化部103に供給する。   The residual signal generation unit 102 subtracts the image signal to be encoded from the prediction signal generated by the prediction image generation unit 108 to generate a residual signal, and supplies the residual signal to the orthogonal transform / quantization unit 103.

直交変換・量子化部103は、残差信号に対して直交変換及び量子化を行い、直交変換・量子化された残差信号を生成し、第2の符号化ビット列生成部104と逆量子化・逆直交変換部105に供給する。   The orthogonal transform / quantization unit 103 performs orthogonal transform and quantization on the residual signal, generates an orthogonal transform / quantized residual signal, and performs inverse quantization with the second encoded bit string generation unit 104. Supply to the inverse orthogonal transform unit 105.

第2の符号化ビット列生成部104は、直交変換及び量子化された残差信号を規定のシンタックス規則に従ってエントロピー符号化して第2の符号化ビット列を生成し、符号化ビット列多重化部115に供給する。   The second encoded bit sequence generation unit 104 generates a second encoded bit sequence by entropy encoding the orthogonally transformed and quantized residual signal according to a prescribed syntax rule, and the encoded bit sequence multiplexing unit 115 Supply.

逆量子化・逆直交変換部105は、直交変換・量子化部103から供給された直交変換・量子化された残差信号を逆量子化及び逆直交変換して残差信号を算出し、復号画像信号重畳部106に供給する。   The inverse quantization / inverse orthogonal transform unit 105 calculates a residual signal by performing inverse quantization and inverse orthogonal transform on the orthogonal transform / quantized residual signal supplied from the orthogonal transform / quantization unit 103 to perform decoding. This is supplied to the image signal superimposing unit 106.

復号画像信号重畳部106は、予測画像生成部108により生成された予測画像信号と逆量子化・逆直交変換部105で逆量子化及び逆直交変換された残差信号を重畳して復号画像を生成し、復号画像メモリ107に格納する。尚、復号画像に対して符号化によるブロック歪等の歪を減少させるフィルタリング処理を施して、復号画像メモリ107に格納されることもあり、その場合、必要に応じてデブロッキングフィルタ等のポストフィルタの情報を識別するフラグ等の予測された符号化情報を符号化情報格納メモリ113に格納する。   The decoded image signal superimposing unit 106 superimposes the predicted image signal generated by the predicted image generating unit 108 and the residual signal subjected to inverse quantization and inverse orthogonal transform by the inverse quantization / inverse orthogonal transform unit 105 to generate a decoded image. It is generated and stored in the decoded image memory 107. The decoded image may be subjected to a filtering process for reducing distortion such as block distortion due to encoding, and may be stored in the decoded image memory 107. In that case, a post filter such as a deblocking filter may be used as necessary. Predicted encoded information such as a flag for identifying the information is stored in the encoded information storage memory 113.

予測画像生成部108は、画像メモリ101から供給される画像信号と復号画像メモリ107から供給される復号画像信号から、予測モードを基にフレーム内予測(イントラ予測)或いはフレーム間予測(インター予測)を行い、予測画像信号を生成する。イントラ予測は、画像メモリ101から供給される画像信号を所定のブロック単位で分割された符号化対象のブロックと、復号画像メモリ107から供給される符号化対象のブロックと同じフレーム内に存在する符号化対象のブロックに近接する周囲の符号化済みブロックの画素信号を用いて予測画像信号を生成する。インター予測は、画像メモリ101から供給される画像信号を所定のブロック単位で分割された符号化対象のブロックのフレーム(符号化フレーム)の時系列で前または後ろに数フレーム離れた復号画像メモリ107に格納されている符号化済みフレームを参照フレームとし、符号化フレームと参照フレームとの間でブロックマッチングを行い、動きベクトルと呼ばれる動き量を求め、この動き量を基に参照フレームから動き補償を行い、予測画像信号を生成する。こうして生成された予測画像信号を残差信号生成部102に供給する。予測画像生成部108にて得られた動きベクトル等の符号化情報は、必要に応じて符号化情報格納メモリ113に格納する。更に、予測画像生成部108では、複数の予測モードの選択が可能である場合、生成された予測画像信号と元の画像信号との間の歪量等を評価することにより、最適な予測モードを決定し、決定された予測モードによる予測により生成された予測画像信号を選択し、残差信号生成部102に供給するとともに、予測モードがイントラ予測である場合はイントラ予測モードを符号化情報格納メモリ113及び第1の符号化ビット列生成部に供給する。イントラ予測モードの詳細な説明は後述する。   The predicted image generation unit 108 uses an image signal supplied from the image memory 101 and a decoded image signal supplied from the decoded image memory 107, based on a prediction mode, for intra-frame prediction (intra prediction) or inter-frame prediction (inter prediction). To generate a predicted image signal. Intra prediction is a coding target block obtained by dividing an image signal supplied from the image memory 101 by a predetermined block unit and a coding target block supplied from the decoded image memory 107 in the same frame. A prediction image signal is generated using pixel signals of surrounding encoded blocks adjacent to the block to be converted. In the inter prediction, the decoded image memory 107 is separated by several frames before or behind in the time series of the frames (encoded frames) of the block to be encoded obtained by dividing the image signal supplied from the image memory 101 in a predetermined block unit. The encoded frame stored in is used as a reference frame, block matching is performed between the encoded frame and the reference frame, a motion amount called a motion vector is obtained, and motion compensation is performed from the reference frame based on this motion amount. To generate a predicted image signal. The predicted image signal generated in this way is supplied to the residual signal generation unit 102. Coding information such as a motion vector obtained by the predicted image generation unit 108 is stored in the coding information storage memory 113 as necessary. Furthermore, when a plurality of prediction modes can be selected, the prediction image generation unit 108 evaluates the distortion amount between the generated prediction image signal and the original image signal, and thereby selects an optimum prediction mode. The prediction image signal generated by the prediction in the determined prediction mode is selected and supplied to the residual signal generation unit 102. When the prediction mode is intra prediction, the intra prediction mode is selected as the encoded information storage memory. 113 and the first encoded bit string generator. Detailed description of the intra prediction mode will be described later.

アクティビティ算出部109は、画像メモリ101から供給される符号化対象のブロックの画像の複雑さや滑らかさを示す係数であるアクティビティが計算され、量子化パラメータ算出部110に供給する。アクティビティ算出部109の詳細な構成と動作は、後述する実施例にて説明する。   The activity calculation unit 109 calculates an activity that is a coefficient indicating the complexity and smoothness of the image of the encoding target block supplied from the image memory 101, and supplies it to the quantization parameter calculation unit 110. The detailed configuration and operation of the activity calculation unit 109 will be described in an embodiment described later.

量子化パラメータ算出部110は、アクティビティ算出部109にて算出されたアクティビティによって、符号化対象のブロックの量子化パラメータを算出し、差分量子化パラメータ生成部111及び符号化情報格納メモリ113に供給する。量子化パラメータ算出部110の詳細な構成と動作は、後述する実施例にて説明する。   The quantization parameter calculation unit 110 calculates the quantization parameter of the block to be encoded based on the activity calculated by the activity calculation unit 109, and supplies the quantization parameter to the differential quantization parameter generation unit 111 and the encoded information storage memory 113. . The detailed configuration and operation of the quantization parameter calculation unit 110 will be described in an embodiment described later.

差分量子化パラメータ生成部111は、量子化パラメータ算出部110にて算出された量子化パラメータに対して、予測量子化パラメータ導出部114にて導出された予測量子化パラメータと引き算を行い、差分量子化パラメータを算出し、第1の符号化ビット列生成部112に供給する。   The difference quantization parameter generation unit 111 performs subtraction on the quantization parameter calculated by the quantization parameter calculation unit 110 and the prediction quantization parameter derived by the prediction quantization parameter derivation unit 114 to obtain the difference quantum. The calculation parameter is calculated and supplied to the first encoded bit string generation unit 112.

第1の符号化ビット列生成部112は、差分量子化パラメータ生成部111によって算出された差分量子化パラメータを規定のシンタックス規則に従って符号化して第1の符号化ビット列を生成し、符号化ビット列多重化部115に供給する。   The first encoded bit sequence generation unit 112 generates a first encoded bit sequence by encoding the differential quantization parameter calculated by the differential quantization parameter generation unit 111 according to a specified syntax rule, and generates an encoded bit sequence multiplexed To the conversion unit 115.

符号化情報格納メモリ113は、符号化が終了したブロックの量子化パラメータを格納する。また、図1に結線を図示していないが、予測画像生成部108にて生成される予測モードや動きベクトル等の符号化情報も、次の符号化対象のブロックを符号化に必要な情報として格納する。更に、ピクチャやスライス単位で生成される符号化情報も必要に応じて格納する。   The encoding information storage memory 113 stores the quantization parameter of the block that has been encoded. Although the connection is not shown in FIG. 1, the encoding information such as the prediction mode and the motion vector generated by the prediction image generation unit 108 is also used as information necessary for encoding the next encoding target block. Store. Furthermore, encoded information generated in units of pictures and slices is also stored as necessary.

予測量子化パラメータ導出部114は、符号化対象のブロックの周囲に近接する既符号化済みのブロックの量子化パラメータや符号化情報を用いて、予測量子化パラメータを導出し、差分量子化パラメータ生成部111に供給する。予測量子化パラメータ導出部114の詳細な構成と動作は、後述する実施例にて説明する。   The predictive quantization parameter deriving unit 114 derives a predictive quantization parameter using quantization parameters and coding information of already-encoded blocks that are close to the periphery of the block to be encoded, and generates a differential quantization parameter. Supplied to the unit 111. The detailed configuration and operation of the predicted quantization parameter deriving unit 114 will be described in an embodiment described later.

符号化ビット列多重化部115は、第1の符号化ビット列と第2の符号化ビット列を規定のシンタックス規則に従って多重化し、ビットストリームを出力する。   The encoded bit string multiplexing unit 115 multiplexes the first encoded bit string and the second encoded bit string in accordance with a specified syntax rule, and outputs a bit stream.

図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 picture decoding apparatus 200 according to an embodiment corresponding to the moving picture encoding apparatus 100 of FIG. The moving picture decoding apparatus 200 according to the embodiment includes a bit string separation unit 201, a first encoded bit string decoding unit 202, a quantization parameter generation unit 203, an encoded information storage memory 204, a predicted quantization parameter derivation unit 205, and a second code. A decoded bit string decoding unit 206, an inverse quantization / inverse orthogonal transform unit 207, a decoded image signal superimposing unit 208, a predicted image generating unit 209, and a decoded image memory 210. As in the moving picture encoding apparatus 100 of FIG. 1, the thick solid line arrows connecting the blocks represent picture image signals, and the thin solid line arrows represent the flow of parameter signals for controlling encoding.

図2の動画像復号装置200の復号処理は、図1の動画像符号化装置100の内部に設けられている復号処理に対応するものであるから、図2の逆量子化・逆直交変換部207、復号画像信号重畳部208、予測画像生成部209、復号画像メモリ210及び符号化情報格納メモリ204の各構成は、図1の動画像符号化装置100の逆量子化・逆直交変換部105、復号画像信号重畳部106、予測画像生成部108、復号画像メモリ107及び符号化情報格納メモリ113の各構成とそれぞれ対応する機能を有する。   The decoding process of the moving picture decoding apparatus 200 in FIG. 2 corresponds to the decoding process provided in the moving picture encoding apparatus 100 in FIG. 1, and therefore the inverse quantization / inverse orthogonal transform unit in FIG. 2. 207, the decoded image signal superimposing unit 208, the predicted image generating unit 209, the decoded image memory 210, and the encoded information storage memory 204 are configured by the inverse quantization / inverse orthogonal transform unit 105 of the moving image encoding apparatus 100 in FIG. , The decoded image signal superimposing unit 106, the predicted image generating unit 108, the decoded image memory 107, and the encoded information storage memory 113.

ビット列分離部201に供給されるビットストリームは規定のシンタックスの規則に従って分離し、分離された符号化ビット列が第1符号化ビット列復号部202、第2符号化ビット列復号部206に供給される。   The bit stream supplied to the bit string separation unit 201 is separated according to a rule of a prescribed syntax, and the separated encoded bit string is supplied to the first encoded bit string decoding unit 202 and the second encoded bit string decoding unit 206.

第1符号化ビット列復号部202は、供給された符号化ビット列を復号して予測モード、動きベクトル、差分量子化パラメータ等に関する符号化情報を出力し、差分量子化パラメータを量子化パラメータ生成部203に与えるとともに、符号化情報を符号化情報格納メモリ204に格納する。   The first encoded bit string decoding unit 202 decodes the supplied encoded bit string, outputs encoding information related to the prediction mode, motion vector, differential quantization parameter, and the like, and converts the differential quantization parameter to the quantization parameter generation unit 203. And the encoded information is stored in the encoded information storage memory 204.

量子化パラメータ生成部203は、第1符号化ビット列復号部202から供給される差分量子化パラメータと予測量子化パラメータ導出部205にて導出される量子化パラメータとを加算して量子化パラメータを算出し、逆量子化・逆直交変換部207及び符号化情報格納メモリ204に供給する。   The quantization parameter generation unit 203 adds the difference quantization parameter supplied from the first encoded bit string decoding unit 202 and the quantization parameter derived by the prediction quantization parameter deriving unit 205 to calculate the quantization parameter. And supplied to the inverse quantization / inverse orthogonal transform unit 207 and the encoded information storage memory 204.

符号化情報格納メモリ113は、復号が終了したブロックの量子化パラメータを格納する。更に、第1符号化ビット列復号部202にて復号されたブロック単位の符号化情報だけでなく、ピクチャやスライス単位で生成される符号化情報も必要に応じて格納する。また、図2に結線を図示していないが、復号された予測モードや動きベクトル等の符号化情報を予測画像生成部209に供給する。   The encoded information storage memory 113 stores the quantization parameter of the block that has been decoded. Furthermore, not only the block unit encoded information decoded by the first encoded bit string decoding unit 202 but also the encoded information generated in units of pictures and slices are stored as necessary. Although not shown in FIG. 2, the encoded information such as the decoded prediction mode and motion vector is supplied to the prediction image generation unit 209.

予測量子化パラメータ導出部205は、復号対象ブロックの周囲に近接する既復号済みのブロックの量子化パラメータや符号化情報を用いて、予測量子化パラメータを導出し、量子化パラメータ生成部203に供給する。予測量子化パラメータ導出部205は動画像符号化装置100の予測量子化パラメータ導出部114と同等の機能を有しており、詳細な構成と動作は後述する実施例にて説明する。   The predicted quantization parameter deriving unit 205 derives a predicted quantization parameter using the quantization parameters and coding information of the already decoded blocks that are close to the periphery of the decoding target block, and supplies the predicted quantization parameter to the quantization parameter generating unit 203. To do. The predictive quantization parameter deriving unit 205 has a function equivalent to that of the predictive quantization parameter deriving unit 114 of the video encoding device 100, and a detailed configuration and operation will be described in an embodiment described later.

第2符号化ビット列復号部206は、供給された符号化ビット列を復号して直交変換・量子化された残差信号を算出し、直交変換・量子化された残差信号を逆量子化・逆直交変換部207に与える。   The second encoded bit string decoding unit 206 decodes the supplied encoded bit string to calculate an orthogonally transformed / quantized residual signal, and dequantizes / inverts the orthogonally transformed / quantized residual signal. This is given to the orthogonal transform unit 207.

逆量子化・逆直交変換部207は、第2符号化ビット列復号部206で復号された直交変換・量子化された残差信号に対して、量子化パラメータ生成部203にて生成された量子化パラメータを用いて、逆直交変換及び逆量子化を行い、逆直交変換・逆量子化された残差信号を得る。   The inverse quantization / inverse orthogonal transform unit 207 generates a quantization signal generated by the quantization parameter generation unit 203 for the orthogonal transform / quantized residual signal decoded by the second encoded bit string decoding unit 206. Using the parameters, inverse orthogonal transform and inverse quantization are performed to obtain a residual signal subjected to inverse orthogonal transform and inverse quantization.

復号画像信号重畳部208は、予測画像生成部209で生成された予測画像信号と、逆量子化・逆直交変換部207により逆直交変換・逆量子化された残差信号とを重畳することにより、復号画像信号を生成し、出力するとともに復号画像メモリ210に格納する。復号画像メモリ210に格納する際には、復号画像に対して符号化によるブロック歪等を減少させるフィルタリング処理を施して、復号画像メモリ210に格納されることもある。   The decoded image signal superimposing unit 208 superimposes the predicted image signal generated by the predicted image generating unit 209 and the residual signal subjected to inverse orthogonal transform / inverse quantization by the inverse quantization / inverse orthogonal transform unit 207. The decoded image signal is generated, output, and stored in the decoded image memory 210. When stored in the decoded image memory 210, the decoded image may be stored in the decoded image memory 210 after filtering processing for reducing block distortion or the like due to encoding is performed on the decoded image.

予測画像生成部209は、第2符号化ビット列復号部206で復号される予測モードや動きベクトル等の符号化情報、更に符号化情報格納メモリ204から符号化情報を基にして、復号画像メモリ210から供給される復号画像信号から予測画像信号を生成し、復号画像信号重畳部208に供給する。   The predicted image generation unit 209 uses the decoded image memory 210 based on the encoded information such as the prediction mode and motion vector decoded by the second encoded bit string decoding unit 206 and the encoded information from the encoded information storage memory 204. A predicted image signal is generated from the decoded image signal supplied from, and supplied to the decoded image signal superimposing unit 208.

次に、動画像符号化装置100の中で太点線に囲まれた諸部120、特に予測量子化パラメータ導出部114と、動画像復号装置200の中で太点線に囲まれた諸部220、特に予測量子化パラメータ導出部205とで共通に実施される予測量子化パラメータを導出する方法の詳細について説明する。   Next, various parts 120 surrounded by a thick dotted line in the moving picture coding apparatus 100, in particular, a predictive quantization parameter deriving part 114, and various parts 220 surrounded by a thick dotted line in the moving picture decoding apparatus 200, In particular, details of a method for deriving a predictive quantization parameter that is commonly performed by the predictive quantization parameter deriving unit 205 will be described.

まず、本実施の形態の動画像符号化装置100の中で太点線で囲まれた諸部120の各部の動作について説明する。諸部120では、画像メモリ101から供給される所定画素サイズ単位の画素ブロックを符号化ブロックとし、そのブロックを量子化する為の量子化パラメータを決定する。量子化パラメータは主に符号量制御と適応量子化のアルゴリズムによって決定される。最初にアクティビティ算出部109における適応量子化の手法について説明する。   First, the operation of each section of the sections 120 surrounded by the thick dotted line in the moving picture coding apparatus 100 according to the present embodiment will be described. The units 120 use a pixel block of a predetermined pixel size unit supplied from the image memory 101 as a coding block, and determine a quantization parameter for quantizing the block. The quantization parameter is mainly determined by code amount control and adaptive quantization algorithms. First, an adaptive quantization method in the activity calculation unit 109 will be described.

アクティビティ算出部109では、一般に人間の視覚特性はエッジの少ない低周波成分に敏感である為、視覚的に劣化の目立ちやすい平坦部ではより細かく量子化し、劣化の比較的目立ちにくい絵柄の複雑な部分でより粗く量子化するように、所定ブロック単位に画像の複雑さや滑らかさを表現するアクティビティを算出する。   In the activity calculation unit 109, since human visual characteristics are generally sensitive to low-frequency components with few edges, a more complex portion of a pattern that is quantized more finely on a flat part that is visually conspicuous and is relatively inconspicuous. The activity expressing the complexity and smoothness of the image is calculated for each predetermined block so as to quantize more roughly.

アクティビティの一例として、MPEG−2 TestModel5(TM5)に記載される符号化ブロック内の画素の分散値による算出が挙げられる。分散値はブロック内の画像を構成する画素の平均からの散らばりの度合いを示す値であり、ブロック内に画像が平坦である(輝度変化が小さい)程小さく、複雑な絵柄である(輝度変化が大きい)もの程値が大きくなるので、ブロックのアクティビティとして利用する。ブロック内の画素値をp(x,y)で表すと、ブロックのアクティビティactは次式で算出される。   As an example of the activity, there is a calculation based on a variance value of pixels in a coding block described in MPEG-2 TestModel 5 (TM5). 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.

Figure 2013150318
Figure 2013150318

ここで、BLKは符号化ブロックの画素総数であり、p_meanはブロック内の画素の平均値である。   Here, BLK is the total number of pixels in the coding block, and p_mean is the average value of the pixels in the block.

また、以上のような分散に限らず、符号化ブロック内の画素に対して、水平方向及び垂直方向で近接する画素との差分絶対値をとり、ブロック内で総和をとっても良い。この場合でも、画像が平坦である場合は小さく、エッジが多い複雑な絵柄部分では大きい値となり、アクティビティとして利用可能である。次式により算出される。   Further, the present invention is not limited to the above variance, and the absolute value of the difference between the pixels in the coding block and the pixels adjacent 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.

Figure 2013150318
Figure 2013150318

こうして算出されたアクティビティactは量子化パラメータ算出部110に供給される。   The activity act calculated in this way is supplied to the quantization parameter calculation unit 110.

次に、符号量制御について説明する。本実施の形態の動画像符号化装置100では、特に符号量制御を実現する部を設けていないが、符号量制御では発生符号量に基づき符号化ブロックの量子化パラメータを決定する為、量子化パラメータ算出部110の中にその機能を包含することとして説明する。   Next, code amount control will be described. The moving image coding apparatus 100 according to the present embodiment does not particularly include a unit that realizes the code amount control. However, in the code amount control, the quantization parameter of the coding block is determined based on the generated code amount. It is assumed that the function is included in the parameter calculation unit 110.

符号量制御はフレーム等の所定単位の発生符号量を目標符号量付近に合わせることを目的としており、符号化済ブロックの発生符号量が目標符号量よりも多いと判断した場合には以降に符号化するブロックに相対的に粗い量子化を適用し、符号化済ブロックの発生符号量が目標符号量よりも少ないと判断した場合には以降に符号化するブロックに相対的に細かい量子化を適用するものである。   Code amount control is aimed at adjusting the generated code amount of a predetermined unit such as a frame to the vicinity of the target code amount, and when it is determined that the generated code amount of the encoded block is larger than the target code amount, If relatively coarse quantization is applied to the block to be encoded, and it is determined that the generated code amount of the encoded block is less than the target code amount, relatively fine quantization is applied to the block to be encoded thereafter. To do.

具体的な符号量制御のアルゴリズムについて、図3を用いて説明する。   A specific code amount control algorithm will be described with reference to FIG.

まず、フレーム毎に目標符号量(T)を決定する。一般的にはIピクチャ>Pピクチャ>参照Bピクチャ>非参照BピクチャとなるようにTを決定する。例えば、動画像の目標ビットレートが5Mbpsであり、1秒間にIピクチャが1枚、Pピクチャが3枚、参照Bピクチャが11枚、非参照Bピクチャが15枚ある場合において、ピクチャタイプ別の目標符号量をTi、Tp、Tbr、Tbとすると、Ti:Tp:Tbr:Tb=4:3:2:1の比率となるように目標符号量を制御したい場合、Ti=400kbit、Tp=300kbit、Tbr=200kbit、Tb=100kbitとなる。但し、ピクチャタイプ別の割当符号量は本発明の本質には影響しない。   First, a target code amount (T) is determined for each frame. In general, T is determined so that I picture> P picture> reference B picture> non-reference B picture. For example, when the target bit rate of a moving image is 5 Mbps, there are 1 I picture, 3 P pictures, 11 reference B pictures, and 15 non-reference B pictures per second, Assuming that the target code amount is Ti, Tp, Tbr, Tb, when it is desired to control the target code amount so that the ratio of Ti: Tp: Tbr: Tb = 4: 3: 2: 1, Ti = 400 kbit, Tp = 300 kbit. , Tbr = 200 kbit, Tb = 100 kbit. However, the allocated code amount for each picture type does not affect the essence of the present invention.

次に、フレーム内の符号量制御について説明する。量子化パラメータを決定する単位であるブロックの数をN、発生符号量をB、目標符号量との差分ビットをDとすると、

Figure 2013150318
となる。ここで、jは符号化ブロックの符号化処理順カウント番号である。D(0)は目標符号量差分の初期値である。 Next, code amount control within a frame will be described. When the number of blocks, which are units for determining the quantization parameter, is N, the generated code amount is B, and the difference bit from the target code amount is D
Figure 2013150318
It becomes. Here, j is the encoding processing order count number of the encoding block. D (0) is an initial value of the target code amount difference.

符号量制御による量子化パラメータbQPは以下のように決定される。

Figure 2013150318
The quantization parameter bQP by code amount control is determined as follows.
Figure 2013150318

ここで、rは目標符号量差分を量子化パラメータに変換する比例係数である。この比例係数rは使用可能な量子化パラメータに応じて決定される。   Here, r is a proportional coefficient for converting the target code amount difference into a quantization parameter. The proportional coefficient r is determined according to the available quantization parameter.

量子化パラメータ算出部110は、符号化ブロック毎にアクティビティ算出部109で算出されたアクティビティactを使って、符号量制御にて算出された符号化ブロックの量子化パラメータを変化させる。以下では、符号化ブロック毎に算出するので、符号量制御による量子化パラメータの符号化処理順カウント番号を削除し、bQPで表すものとする。   The quantization parameter calculation unit 110 changes the quantization parameter of the coding block calculated by the code amount control using the activity act calculated by the activity calculation unit 109 for each coding block. In the following, since the calculation is performed for each coding block, the coding processing order count number of the quantization parameter by the code amount control is deleted and represented by bQP.

量子化パラメータ算出部110は、アクティビティ算出部109で算出されたアクティビティactを基にして、符号化ブロックの最適な量子化パラメータQPを算出する。   The quantization parameter calculation unit 110 calculates an optimal quantization parameter QP for the coding block based on the activity act calculated by the activity calculation unit 109.

量子化パラメータ算出部110は、直前に符号化したフレーム内の平均アクティビティをavg_actとして記録しておき、符号化ブロックの正規化アクティビティNactを次式により算出する。   The quantization parameter calculation unit 110 records the average activity in the frame encoded immediately before as avg_act, and calculates the normalized activity Nact of the encoded block by the following equation.

Figure 2013150318
Figure 2013150318

ここで、上式の係数2は量子化パラメータのダイナミックレンジを表す値であり、0.5〜2.0の範囲をとる正規化アクティビティNactが算出される。   Here, the coefficient 2 in the above equation is a value representing the dynamic range of the quantization parameter, and a normalized activity Nact having a range of 0.5 to 2.0 is calculated.

尚、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 information storage memory 113, and the quantization parameter calculation unit 110 may acquire avg_act from the encoded information storage memory 113 as necessary.

算出された正規化アクティビティNactを基準となる量子化パラメータbQPと次式の如く乗算を行い、符号化ブロックの量子化パラメータQPを得る。   The calculated normalization activity Nact is multiplied by the reference quantization parameter bQP as in the following equation to obtain the quantization parameter QP of the coding block.

Figure 2013150318
Figure 2013150318

尚、bQPは上述したように符号量制御で算出されるブロック単位の量子化パラメータとしたが、固定値として符号化ブロックを含むフレーム或いはスライスを代表する量子化パラメータであってもよい。また、直前に符号化したフレームの平均量子化パラメータであってもよく、本実施の形態では特に算出方法について限定しない。   Note that bQP is a quantization parameter for each block calculated by code amount control as described above, but may be a quantization parameter representative of a frame or slice including a coding block as a fixed value. Moreover, the average quantization parameter of the frame encoded immediately before may be used, and the calculation method is not particularly limited in the present embodiment.

こうして算出された符号化ブロックの量子化パラメータは、符号化情報格納メモリ113及び差分量子化パラメータ生成部111に供給される。   The quantization parameter of the coding block calculated in this way is supplied to the coding information storage memory 113 and the differential quantization parameter generation unit 111.

符号化情報格納メモリ113は、量子化パラメータ算出部110にて算出された量子化パラメータや既に符号化が終了した過去の符号化ブロックの量子化パラメータが格納されるだけでなく、符号化ブロックの符号化となる動きベクトルや予測モード等の符号化情報も格納され、必要に応じて各部が符号化情報を取得する。   The encoded information storage memory 113 not only stores the quantization parameters calculated by the quantization parameter calculation unit 110 and the quantization parameters of past encoded blocks that have already been encoded, Encoding information such as a motion vector to be encoded and a prediction mode is also stored, and each unit acquires the encoding information as necessary.

予測量子化パラメータ導出部114は、符号化情報格納メモリ113から符号化ブロックの周囲の既符号化済みの近接ブロックの量子化パラメータやその他符号化情報を用いて、符号化ブロックの量子化パラメータを効率良く符号化、伝送する為の予測量子化パラメータを導出する。   The predicted quantization parameter derivation unit 114 uses the quantization parameter of the already-encoded neighboring block around the coding block and other coding information from the coding information storage memory 113 to calculate the quantization parameter of the coding block. Predictive quantization parameters for efficient coding and transmission are derived.

量子化パラメータを効率良く符号化、伝送する為には、量子化パラメータのまま符号化するよりも、既符号化済みのブロックの量子化パラメータとの差分(差分量子化パラメータ)をとって、その差分量子化パラメータを符号化、伝送する方が効率が良い。符号量制御の観点から見れば、符号化処理順で直前の符号化済みブロックの量子化パラメータを予測量子化パラメータとすると伝送する差分量子化パラメータの値が小さくなり、符号量は小さくなる。一方、適応量子化の観点から見れば、符号化ブロックと周囲の近接ブロックとは近接している為、同じ或いは似た絵柄となることが多いので、符号化ブロックに近接するブロックのアクティビティは符号化ブロックのアクティビティと近い値となり、近接ブロックの量子化パラメータを予測量子化パラメータとすると伝送する差分量子化パラメータの値が小さくなり、符号量は小さくなる。その為、H.264では、図4で示されるように、量子化パラメータを伝送する単位がマクロブロック(16x16画素群)で固定されており、ラスタスキャン順に符号化ブロックより前、ないし直前に符号化をした左隣に近接するブロックの量子化パラメータを予測量子化パラメータとし、符号化ブロックの量子化パラメータと予測量子化パラメータとの差分をとり、差分量子化パラメータを符号化、伝送する方法が採用されている。つまり、H.264では符号量制御を想定した量子化パラメータの予測に最適化されている。但し、H.264は後述する階層ツリー符号化を行わないので、画像の左端以外は、直前のブロックが左ブロックである為、近接ブロックの量子化パラメータを予測量子化パラメータとして使用することになり、適応量子化を想定した予測にもほぼ最適化されていると言える。その為、H.264のように、量子化パラメータを伝送する単位が固定され、階層ツリー符号化を行わないような構成の場合には、量子化パラメータの予測は直前の符号化済みブロックが最適だと言える。   In order to efficiently encode and transmit the quantization parameter, rather than encoding the quantization parameter as it is, the difference (difference quantization parameter) with the quantization parameter of the already coded block is taken, It is more efficient to encode and transmit the differential quantization parameter. From the viewpoint of code amount control, if the quantization parameter of the immediately previous coded block in the coding processing order is the predicted quantization parameter, the value of the differential quantization parameter to be transmitted is small, and the code amount is small. On the other hand, from the viewpoint of adaptive quantization, since the coded block and the neighboring neighboring blocks are close to each other, the same or similar pattern is often obtained. If the quantization parameter of the adjacent block is set as the predictive quantization parameter, the value of the differential quantization parameter to be transmitted becomes small and the code amount becomes small. Therefore, H.H. In H.264, as shown in FIG. 4, the unit for transmitting the quantization parameter is fixed in a macro block (16 × 16 pixel group), and the left adjacent data encoded before or immediately before the encoded block in the raster scan order. A method is adopted in which the quantization parameter of the block adjacent to the block is used as the prediction quantization parameter, the difference between the quantization parameter of the coding block and the prediction quantization parameter is taken, and the difference quantization parameter is encoded and transmitted. That is, H.I. H.264 is optimized for prediction of quantization parameters assuming code amount control. However, H. Since H.264 does not perform hierarchical tree coding, which will be described later, since the immediately preceding block is the left block except for the left end of the image, the quantization parameter of the adjacent block is used as the prediction quantization parameter, and adaptive quantization is performed. It can be said that it is almost optimized for forecasting. Therefore, H.H. When the unit for transmitting the quantization parameter is fixed as in H.264 and the hierarchical tree coding is not performed, it can be said that the immediately preceding coded block is optimal for prediction of the quantization parameter.

しかしながら、階層ツリー符号化を行う場合、H.264と同様に直前のブロックの量子化パラメータを予測量子化パラメータとして使用すると、符号量制御には最適化されるが、適応量子化を用いて量子化パラメータを伝送する場合、最適な予測値とはならず、差分量子化パラメータの符号量が増大してしまうという課題が生じる。   However, when performing hierarchical tree coding, As in the case of H.264, when the quantization parameter of the immediately preceding block is used as the prediction quantization parameter, it is optimized for code amount control. However, when transmitting the quantization parameter using adaptive quantization, In other words, there arises a problem that the code amount of the differential quantization parameter increases.

ここで、階層ツリー符号化について説明する。ここで言う階層ツリー符号化とは、ツリーブロック単位(ここでは64x64ブロックとする)でそれぞれ符号化単位を表すdepthを決定し、決定されたdepthで符号化ブロック単位の符号化を行う。これにより、画像の精細度に依存した最適なdepthを決定して符号化を行うことができ、符号化効率を大幅に向上する。   Here, hierarchical tree coding will be described. Hierarchical tree coding here refers to determining a depth representing a coding unit in tree block units (here, 64 × 64 blocks), and performing coding in coding block units using the determined depth. As a result, it is possible to determine the optimum depth depending on the definition of the image and perform the encoding, thereby greatly improving the encoding efficiency.

図5に階層ツリー符号化構造の符号化処理順序を示す。図5の上図に示されるように、画面内を所定の同一サイズの正方の矩形の単位にて均等分割する。この単位をツリーブロックと呼び、画像内での符号化/復号ブロックを特定するためのアドレス管理の基本単位とする。ツリーブロックは画像内のテクスチャ等に応じて、符号化処理を最適にすべく、必要に応じてツリーブロック内を階層的に4分割して、ブロックサイズの小さいブロックにすることが出来る。このように小さなブロックに分割して構成される階層的なブロック構造をツリーブロック構造と呼び、この分割されたブロックを符号化ブロック(CU:Coding Unit)と呼び、符号化及び復号を行う際の処理の基本単位とする。図5の下図はツリーブロックを4分割してできた各CUのうち、左下を除く3つのCUさらに4分割した例である。本実施例においては、CU単位で量子化パラメータを設定するものとする。ツリーブロックは最大サイズの符号化ブロックでもある。   FIG. 5 shows the encoding processing order of the hierarchical tree encoding structure. As shown in the upper diagram of FIG. 5, the inside of the screen is equally divided in units of square rectangles having a predetermined same size. This unit is called a tree block, and is a basic unit of address management for specifying an encoding / decoding block in an image. The tree block can be divided into four hierarchical blocks as necessary to make the block smaller in size in order to optimize the encoding process according to the texture in the image. Such a hierarchical block structure divided into small blocks is called a tree block structure, and this divided block is called a coding block (CU: Coding Unit) for encoding and decoding. The basic unit of processing. The lower diagram of FIG. 5 shows an example in which three CUs except the lower left are further divided into four CUs obtained by dividing the tree block into four. In this embodiment, it is assumed that the quantization parameter is set for each CU. The tree block is also the maximum size coding block.

このような階層ツリー符号化では、符号化順序は図4のH.264のようなラスタスキャン順(左〜右)と異なる為、量子化パラメータが直前の符号化済みブロックと左の近接ブロックとで等しくならない場合がある。例えば階層ツリー符号化の一例として、図6で示されるように、符号化対象とするツリーブロックの中の左上の符号化ブロック(図6中の斜線部の矩形)は、左に近接するツリーブロックの中で分割されたブロックのうち、最後に符号化された右下の符号化済みブロック(図6中の灰色部の矩形)の量子化パラメータを予測に用いる。また、図7に示されるように、符号化対象とするツリーブロックの中の左下の符号化ブロック(図7中の斜線部の矩形)は、同じツリーブロックの中で分割され、直前に符号化されたブロック(図7中の灰色部の矩形)の量子化パラメータを予測に用いることになる。その為、直前の符号化済みブロックから量子化パラメータを予測するだけでは、符号量制御に最適化された予測は行うことが出来ても、分割によってブロック間の距離を隔てる為に、適応量子化に適した予測を行うことが出来ないので、差分量子化パラメータの符号量が増大し、符号化効率を低減させてしまう。   In such hierarchical tree coding, the coding order is H.264 in FIG. Since this is different from the raster scan order (left to right) such as H.264, the quantization parameter may not be equal between the immediately preceding coded block and the left neighboring block. For example, as an example of hierarchical tree coding, as shown in FIG. 6, the upper left coding block (the shaded rectangle in FIG. 6) in the tree block to be coded is a tree block adjacent to the left. The quantization parameter of the lower right encoded block (the gray rectangle in FIG. 6) encoded last is used for prediction. Also, as shown in FIG. 7, the lower left coding block (shaded rectangle in FIG. 7) in the tree block to be coded is divided in the same tree block and coded immediately before. The quantization parameter of the block (the gray rectangle in FIG. 7) is used for prediction. Therefore, even if the prediction optimized for the code amount control can be performed only by predicting the quantization parameter from the previous coded block, adaptive quantization is used to separate the distance between the blocks by division. Therefore, the code amount of the differential quantization parameter increases, and the coding efficiency is reduced.

また、H.264のように一意に左隣のブロックの量子化パラメータを予測量子化パラメータとすると、例えば図8で示される事例の場合、符号化ブロックと左の近接ブロックとの画像の絵柄が異なるので、それぞれの量子化パラメータに影響を及ぼし、差分量子化パラメータも大きな値となり、発生符号量も大きくなり、効率的な符号化、伝送が出来ない恐れが生じる。   H. For example, in the case of the example shown in FIG. 8, since the picture pattern of the encoded block and the adjacent block on the left are different, the quantization parameter of the block on the left adjacent to the left like 264 is a predictive quantization parameter. The difference quantization parameter also becomes a large value, the amount of generated codes increases, and there is a possibility that efficient encoding and transmission cannot be performed.

その解決策として、左の近接ブロックから予測量子化パラメータを一意に選択せず、既符号化済みの上の近接ブロックの量子化パラメータを予測量子化パラメータとする方法が考えられる。   As a solution to this, a method is conceivable in which the predicted quantization parameter is not selected from the left neighboring block, and the quantization parameter of the already-encoded neighboring block is used as the predicted quantization parameter.

しかしながら、ツリーブロック境界を越えて上の近接ブロックから量子化パラメータを予測する場合、符号量制御による量子化パラメータの算出を考慮すると、符号化ブロックよりもかなり過去の時点で算出された量子化パラメータである為、図9に示されるように、符号化ブロックの処理順jに対して、上の近接ブロックの処理順iは、ブロックとしてピクチャ内で近接していても、符号化処理順ではi<<jとなるので、符号量制御の観点から見れば、必ずしも符号化ブロックの量子化パラメータが上の近接ブロックの量子化パラメータと相関性が高いとは言えないことになる。   However, when the quantization parameter is predicted from the neighboring block above the tree block boundary, the quantization parameter calculated at a considerably earlier time than the coding block is considered in consideration of the calculation of the quantization parameter by the code amount control. Therefore, as shown in FIG. 9, the processing order i of the upper neighboring block with respect to the processing order j of the coding block is i in the coding processing order even if it is close as a block in the picture. Since << j, from the viewpoint of code amount control, it cannot be said that the quantization parameter of the coding block is highly correlated with the quantization parameter of the upper neighboring block.

更に、復号過程の高速化の為に、ツリーブロックスライス毎に並列処理を実施する場合には、ツリーブロック境界を越えて上の近接ブロックの量子化パラメータを予測に使用することは出来なくなるので、ツリーブロック境界を越えて上の近接ブロックを参照することにより効率的な符号化、伝送が出来ない恐れが生じる。   Furthermore, when performing parallel processing for each tree block slice to speed up the decoding process, the quantization parameter of the adjacent block above the tree block boundary cannot be used for prediction. By referring to the neighboring block above the tree block boundary, there is a possibility that efficient coding and transmission cannot be performed.

そこで、本発明の実施の形態に係る予測量子化パラメータ導出部114は、符号化ブロックの上に近接するツリーブロックの近接ブロックを量子化パラメータの予測に使用せずに、周囲の既符号化済みのブロックから最適な予測量子化パラメータを導出して、差分量子化パラメータの発生符号量の効率を向上させる。   Therefore, the predictive quantization parameter deriving unit 114 according to the embodiment of the present invention does not use the neighboring blocks of the tree block adjacent on the coding block for the prediction of the quantization parameter, and the surrounding already coded The optimal predictive quantization parameter is derived from this block, and the efficiency of the generated code amount of the differential quantization parameter is improved.

図10は予測量子化パラメータ導出部114は詳細な構成を示す図である。予測量子化パラメータ導出部114はスイッチ301、メモリ302、第1の予測量子化パラメータ導出部303及び第2の予測量子化パラメータ導出部304から構成される。   FIG. 10 is a diagram showing a detailed configuration of the predicted quantization parameter deriving unit 114. The predicted quantization parameter derivation unit 114 includes a switch 301, a memory 302, a first predicted quantization parameter derivation unit 303, and a second predicted quantization parameter derivation unit 304.

符号化情報格納メモリ113から供給される符号化ブロックの周囲の既符号化済みの近接ブロックの量子化パラメータや符号化ブロックの予測モード等の符号化情報はメモリ302に一時記憶されるとともに、スイッチ301に符号化ブロックの予測モードが供給される。   Encoding information such as quantization parameters of already-encoded neighboring blocks and encoding block prediction modes around the encoding block supplied from the encoding information storage memory 113 are temporarily stored in the memory 302, and the switch The prediction mode of the encoded block is supplied to 301.

スイッチ301は予測モードに応じて量子化パラメータの予測を行う導出部を切り換える。予測モードがインター予測の場合は第1の予測量子化パラメータ導出部303、予測モードがイントラ予測の場合は第2の予測量子化パラメータ導出部304で予測量子化パラメータを導出する。   The switch 301 switches a derivation unit that performs prediction of the quantization parameter according to the prediction mode. When the prediction mode is inter prediction, the first prediction quantization parameter deriving unit 303 derives the prediction quantization parameter, and when the prediction mode is intra prediction, the second prediction quantization parameter deriving unit 304 derives the prediction quantization parameter.

第1の予測量子化パラメータ導出部303は、メモリ302から符号化ブロックの周囲の既符号化済みの近接ブロックの量子化パラメータの相対比較により、予測量子化パラメータを導出する。   The first predictive quantization parameter deriving unit 303 derives a predictive quantization parameter from the memory 302 by relative comparison of quantization parameters of neighboring blocks that have already been encoded around the encoded block.

一方、第2の予測量子化パラメータ導出部304は、メモリ302から符号化ブロックの周囲の既符号化済みの近接ブロックの量子化パラメータと、予測画像生成部108で予測モードとしてイントラ予測が選択された場合に、イントラ予測にて参照する近接ブロックの画素の方向を示すイントラ予測モード(以下、intraPredModeと称す)により、予測量子化パラメータを導出する。   On the other hand, the second predictive quantization parameter deriving unit 304 selects from the memory 302 the quantization parameters of the already-encoded neighboring blocks around the encoded block and intra prediction as the prediction mode by the predictive image generation unit 108. In this case, the prediction quantization parameter is derived by an intra prediction mode (hereinafter referred to as intraPredMode) indicating the pixel direction of the adjacent block referred to in the intra prediction.

ここで、イントラ予測の詳細を説明する。イントラ予測では、同じ画面内の周囲の復号済みのブロックの画素の値から符号化ブロックの画素の値を予測する。本発明の動画像符号化装置100及び動画像復号装置200では、34通りのイントラ予測モードから選択して、イントラ予測する。   Here, details of intra prediction will be described. In the intra prediction, the pixel value of the encoded block is predicted from the pixel values of the surrounding decoded blocks in the same screen. In the video encoding device 100 and the video decoding device 200 of the present invention, 34 intra prediction modes are selected and intra prediction is performed.

図11は本実施の形態で規定するイントラ予測モードの値と予測方向を説明する図である。実線の矢印はイントラ予測で参照する方向を示し、矢印の終点から始点に向かってイントラ予測を行う。番号はイントラ予測モードの値を示す。イントラ予測モードは、上の復号済みのブロックから垂直方向に予測する垂直予測(イントラ予測モードintraPredMode=0)、左の復号済みのブロックから水平方向に予測する水平予測(イントラ予測モードintraPredMode=1)、周囲の復号済みのブロックから平均値を算出することにより予測する平均値予測(イントラ予測モードintraPredMode=2)、周囲の復号済みのブロックから斜め45度の角度で右下方向に予測する平均値予測(intraPredMode=3)に加えて、周囲の復号済みのブロックから様々な角度で斜め方向に予測する30通りの角度予測(イントラ予測モードintraPredMode=4,5,…,33)を定義する。   FIG. 11 is a diagram for explaining the value of the intra prediction mode and the prediction direction defined in the present embodiment. A solid arrow indicates a direction to be referred to in the intra prediction, and the intra prediction is performed from the end point of the arrow toward the start point. The number indicates the value of the intra prediction mode. In the intra prediction mode, vertical prediction (intra prediction mode intraPredMode = 0) predicting in the vertical direction from the above decoded block, and horizontal prediction (intra prediction mode intraPredMode = 1) predicting in the horizontal direction from the left decoded block. An average value prediction that is predicted by calculating an average value from surrounding decoded blocks (intra prediction mode intraPredMode = 2), and an average value that is predicted in the lower right direction at an oblique angle of 45 degrees from the surrounding decoded blocks In addition to the prediction (intraPredMode = 3), 30 angle predictions (intra prediction mode intraPredMode = 4, 5,..., 33) for predicting diagonally at various angles from surrounding decoded blocks are defined.

イントラ予測モードは、輝度信号、色差信号それぞれに用意され、輝度信号用のイントラ予測モードをイントラ輝度予測モード、色差信号用のイントラ予測モードをイントラ色差予測モードと定義する。イントラ輝度予測モードの符号化及び復号においては、周辺のブロックのイントラ輝度予測モードとの相関性を利用し、符号化側で周辺のブロックのイントラ輝度予測モードから予測出来ると判断された場合は、参照するブロックを特定する情報を伝送し、周辺のブロックのイントラ輝度予測モードから予測するよりもイントラ輝度予測モードに別の値を設定した方が良いと判断された場合に、更にイントラ輝度予測モードの値を符号化、または復号する仕組みを用いる。周辺のブロックのイントラ輝度予測モードから符号化・復号対象ブロックのイントラ輝度予測モードを予測することにより、伝送する符号量を削減できる。一方、イントラ色差予測モードの符号化及び復号においては、色差信号の予測ブロックと同じ位置の輝度信号の予測ブロックのイントラ輝度予測モードとの相関性を利用し、符号化側でイントラ輝度予測モードから予測出来ると判断された場合はイントラ輝度予測モードの値からイントラ色差予測モードの値を予測し、イントラ輝度予測モードから予測するよりもイントラ色差予測モードに独自の値を設定した方が良いと判断した場合に、イントラ色差予測モードの値を符号化、または復号する仕組みを用いる。イントラ輝度予測モードからイントラ色差予測モードを予測することにより、伝送する符号量を削減出来る。本実施の形態では、特に断らない限り、イントラ輝度予測モードをイントラ予測モードとする。   The intra prediction mode is prepared for each of the luminance signal and the color difference signal, and the intra prediction mode for the luminance signal is defined as the intra luminance prediction mode, and the intra prediction mode for the color difference signal is defined as the intra color difference prediction mode. In the encoding and decoding of the intra luminance prediction mode, using the correlation with the intra luminance prediction mode of the surrounding block, when it is determined that the encoding side can predict from the intra luminance prediction mode of the surrounding block, When it is determined that it is better to set a different value for the intra luminance prediction mode than for predicting from the intra luminance prediction mode of the surrounding blocks by transmitting information specifying the block to be referred to, the intra luminance prediction mode is further increased. A mechanism for encoding or decoding the value of is used. By predicting the intra luminance prediction mode of the block to be encoded / decoded from the intra luminance prediction modes of the neighboring blocks, the amount of code to be transmitted can be reduced. On the other hand, in the coding and decoding of the intra chrominance prediction mode, the correlation between the prediction block of the luminance signal at the same position as the prediction block of the chrominance signal and the intra luminance prediction mode of the prediction block is used. If it is determined that the prediction can be made, the value of the intra color difference prediction mode is predicted from the value of the intra luminance prediction mode, and it is determined that it is better to set a unique value for the intra color difference prediction mode than to predict from the intra luminance prediction mode. In such a case, a mechanism for encoding or decoding the value of the intra color difference prediction mode is used. By predicting the intra color difference prediction mode from the intra luminance prediction mode, the amount of code to be transmitted can be reduced. In the present embodiment, unless otherwise specified, the intra luminance prediction mode is set to the intra prediction mode.

予測画像生成部108では、この34通りのイントラ予測モードの中から、最も符号化効率の高いイントラ予測モードを選択し、予測モードがイントラ予測が選択された場合に、予測モードとともにイントラ予測モードが符号化情報格納メモリ113を介して、予測量子化パラメータ導出部114に供給する。   The predicted image generation unit 108 selects the intra prediction mode with the highest coding efficiency from the 34 intra prediction modes, and when the intra prediction mode is selected as the prediction mode, the intra prediction mode is selected together with the prediction mode. This is supplied to the predictive quantization parameter deriving unit 114 via the encoded information storage memory 113.

第2の予測量子化パラメータ導出部304は、このイントラ予測モードに基づいて、予測量子化パラメータを導出する。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   The second predicted quantization parameter deriving unit 304 derives a predicted quantization parameter based on this intra prediction mode. The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

差分量子化パラメータ生成部111は、量子化パラメータ算出部110にて算出された符号化ブロックの量子化パラメータに対して、予測量子化パラメータ導出部114にて導出された予測量子化パラメータと引き算を行い、差分量子化パラメータを算出する。予測量子化パラメータは復号時にも復号済みの周囲の近接ブロックから符号化時と同様に導出されるので、差分符号化パラメータを符号化対象とすることで、符号化と復号で矛盾が生じず、量子化パラメータの符号量を削減することが可能となる。算出された差分量子化パラメータは第1の符号化ビット列生成部112に供給される。   The differential quantization parameter generation unit 111 subtracts the prediction quantization parameter derived by the prediction quantization parameter deriving unit 114 from the quantization parameter of the coding block calculated by the quantization parameter calculation unit 110. And calculate a differential quantization parameter. Since the predictive quantization parameter is derived from the neighboring neighboring blocks that have already been decoded at the time of decoding as well as at the time of encoding, there is no contradiction in encoding and decoding by making the differential encoding parameter an encoding target, It is possible to reduce the code amount of the quantization parameter. The calculated difference quantization parameter is supplied to the first encoded bit string generation unit 112.

第1の符号化ビット列生成部112は、差分量子化パラメータ生成部111によって算出された差分量子化パラメータを規定のシンタックス規則に従ってエントロピー符号化して第1の符号化ビット列を生成する。図12に差分量子化パラメータのエントロピー符号化に使用される符号化変換テーブルの一例を示す。これは符号付き指数ゴロム符号化と呼ばれるテーブルであり、差分量子化パラメータの絶対値が小さい程短い符号長が与えられる。一般に画像をブロックで分割した場合、近接したブロックでは似たような画像となるので、アクティビティが近い値となり、算出されるブロックの量子化パラメータも近い値になる。その為、差分量子化パラメータの発生頻度は、0が最も高く、絶対値が大きくなるにつれて低くなる傾向となり、図12のテーブルもその特徴を反映して、発生頻度が高い値に対して短い符号長を割り当てられている。予測量子化パラメータが符号化ブロックの量子化パラメータに近い値で予測されれば、0に近い差分量子化パラメータが算出され、発生符号量を抑制することが可能となる。第1の符号化ビット列生成部112は、差分量子化パラメータに対応する符号ビット列を図12のテーブルから抽出し、その符号ビット列を符号化ビット列多重化部115に供給する。   The first encoded bit string generation unit 112 generates a first encoded bit string by entropy encoding the differential quantization parameter calculated by the differential quantization parameter generation unit 111 according to a specified syntax rule. FIG. 12 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. In general, when an image is divided into blocks, similar images are obtained in adjacent blocks, so that 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 coding block, a difference quantization parameter close to 0 is calculated, and the generated code amount can be suppressed. The first encoded bit string generation unit 112 extracts a code bit string corresponding to the differential quantization parameter from the table of FIG. 12, and supplies the code bit string to the encoded bit string multiplexing unit 115.

上述した本実施例の動画像符号化装置100に対応する動画像復号装置200の中で太点線で囲まれた諸部220の各部の動作について説明する。   The operation of each unit of the units 220 surrounded by the thick dotted line in the video decoding device 200 corresponding to the video encoding device 100 of the above-described embodiment will be described.

諸部220では、最初に第1符号化ビット列復号部202にて復号された差分量子化パラメータが量子化パラメータ生成部203に供給される。また、差分量子化パラメータ以外の符号化情報が必要に応じて符号化情報格納メモリ204に格納される。   In the units 220, the differential quantization parameter first decoded by the first encoded bit string decoding unit 202 is supplied to the quantization parameter generation unit 203. Also, encoded information other than the differential quantization parameter is stored in the encoded information storage memory 204 as necessary.

量子化パラメータ生成部203では、第1符号化ビット列復号部202から供給される差分量子化パラメータと予測量子化パラメータ導出部205にて導出される量子化パラメータとを加算して、復号ブロックの量子化パラメータを算出し、逆量子化・逆直交変換部207及び符号化情報格納メモリ204に供給する。   The quantization parameter generation unit 203 adds the differential quantization parameter supplied from the first encoded bit string decoding unit 202 and the quantization parameter derived by the prediction quantization parameter deriving unit 205 to obtain the quantization of the decoded block. The quantization parameter is calculated and supplied to the inverse quantization / inverse orthogonal transform unit 207 and the encoded information storage memory 204.

符号化情報格納メモリ204は、復号が終了したブロックの量子化パラメータが格納される。更に、第1符号化ビット列復号部202にて復号されたブロック単位の符号化情報だけでなく、ピクチャやスライス単位で生成される符号化情報も必要に応じて格納される。   The encoded information storage memory 204 stores the quantization parameter of the block that has been decoded. Furthermore, not only the block unit encoded information decoded by the first encoded bit string decoding unit 202 but also the encoded information generated in units of pictures and slices are stored as necessary.

予測量子化パラメータ導出部205は、復号ブロックの周囲に近接する既復号済みのブロックの量子化パラメータや符号化情報を用いて、予測量子化パラメータを導出し、量子化パラメータ生成部203に供給する。量子化パラメータ生成部203で算出された量子化パラメータは符号化情報格納メモリ204に格納され、次の復号ブロックの予測量子化パラメータの導出時に、復号ブロックの周囲に位置する復号済みの近接ブロックを判定し、近接ブロックの量子化パラメータを符号化情報格納メモリ204から取得する。こうして得られる復号済みの近接ブロックの量子化パラメータは、動画像符号化装置100の予測量子化パラメータ導出部114が符号化情報格納メモリ113から取得する量子化パラメータと同一である。予測量子化パラメータ導出部205は動画像符号化装置100の予測量子化パラメータ導出部114と同等の機能を有しているので、符号化情報格納メモリ204から供給される近接ブロックの量子化パラメータが同じであれば、符号化時と同一の予測量子化パラメータが導出される。   The predicted quantization parameter deriving unit 205 derives a predicted quantization parameter using the quantization parameters and coding information of already decoded blocks that are close to the periphery of the decoded block, and supplies them to the quantization parameter generating unit 203. . The quantization parameter calculated by the quantization parameter generation unit 203 is stored in the encoding information storage memory 204. When the predicted quantization parameter of the next decoding block is derived, the decoded neighboring blocks located around the decoding block are stored. The quantization parameter of the adjacent block is obtained from the encoded information storage memory 204. The quantization parameter of the decoded adjacent block obtained in this way is the same as the quantization parameter acquired from the encoded information storage memory 113 by the prediction quantization parameter deriving unit 114 of the video encoding device 100. Since the predictive quantization parameter deriving unit 205 has the same function as the predictive quantization parameter deriving unit 114 of the video encoding device 100, the quantization parameter of the adjacent block supplied from the encoded information storage memory 204 is If they are the same, the same predictive quantization parameter as that at the time of encoding is derived.

予測量子化パラメータ導出部205では、符号化済みの近接ブロックを復号済みの近接ブロックと変更する以外同様の処理を行うので、量子化パラメータ予測の説明は割愛する。   The predictive quantization parameter deriving unit 205 performs the same processing except that the encoded adjacent block is changed to the decoded adjacent block, and thus description of the quantization parameter prediction is omitted.

こうして符号化側で導出された予測量子化パラメータが、復号側でも矛盾無く導出されることになる。   Thus, the predicted quantization parameter derived on the encoding side is derived on the decoding side without any contradiction.

本実施の形態において、予測量子化パラメータの導出を行う場合に、動画像符号化装置100の予測量子化パラメータ導出部114で参照する近接ブロックは符号化済みのブロックであり、動画像復号装置200の予測量子化パラメータ導出部205で参照する近接ブロックは復号済みのブロックである。符号化側で参照される符号化済みのブロックは、符号化内部で次の符号化の為に局部復号されたブロックであり、復号側で参照される復号済みブロックと同じである。その為、予測量子化パラメータ導出部114及び205の機能も共通であり、それぞれで導出される予測量子化パラメータも同じある。以降の実施例では、予測量子化パラメータの導出について、符号化と復号で切り分けず、共通の機能として符号化側で説明する。   In the present embodiment, when predictive quantization parameters are derived, the adjacent blocks referred to by the predictive quantization parameter deriving unit 114 of the video encoding device 100 are already encoded blocks, and the video decoding device 200 The adjacent block referred to by the predicted quantization parameter deriving unit 205 is a decoded block. The encoded block that is referred to on the encoding side is a block that is locally decoded for the next encoding within the encoding, and is the same as the decoded block that is referred to on the decoding side. Therefore, the functions of the predictive quantization parameter deriving units 114 and 205 are also common, and the predictive quantization parameters derived by each are the same. In the following embodiments, the derivation of the prediction quantization parameter will be described on the encoding side as a common function without being divided between encoding and decoding.

以下、予測量子化パラメータ導出部114及び205で共通に実施される予測量子化パラメータを導出する方法の詳細について説明する。   Hereinafter, the details of the method for deriving the predicted quantization parameter that is commonly performed by the predicted quantization parameter deriving units 114 and 205 will be described.

[実施例1]
実施例1における第1の予測量子化パラメータ導出部303の詳細な動作について説明する。実施例1では、符号化対象の符号化ブロックが上のツリーブロックと近接する場合に、符号化順序でかなり過去となる上のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止するが、符号化順序で過去ではあるが、上のツリーブロック程過去ではない左に近接するツリーブロックの符号化済みブロックの量子化パラメータを予測に使用する。
[Example 1]
A detailed operation of the first predictive quantization parameter deriving unit 303 in the first embodiment will be described. In the first embodiment, when the coding block to be coded is close to the upper tree block, the quantization parameter of the coded block in the upper tree block that is considerably past in the coding order is used for prediction. Although it is prohibited, the quantization parameter of the coded block of the tree block adjacent to the left which is past in the coding order but not as old as the upper tree block is used for the prediction.

図13に示されるように、符号化はツリーブロック単位に画面の左上から右下に向かってラスタスキャン順に行われる。今、符号化対象ツリーブロックを図13中の斜線矩形で表すと、符号化済みのツリーブロックは図13中の灰色部分で表される。ツリーブロック内部では符号化条件に応じて、階層ツリー符号化がなされることから、符号化ブロックはツリーブロック以下のサイズに分割にされるので、符号化対象ツリーブロック内部の符号化ブロックと上のツリーブロック内部の符号化済みブロックとは近接しているものの、符号化処理順では大きく離れていることになる。その為、符号量制御により算出される量子化パラメータは、符号化処理順で算出されるので、符号化ブロックの量子化パラメータと上のツリーブロック内部の符号化済みブロックの量子化パラメータが近い値になるとは言えない。そこで、実施例1では上のツリーブロックを量子化パラメータの予測に使用せず、符号化処理順の近い左のツリーブロックのみを使用する。   As shown in FIG. 13, encoding is performed in the order of raster scanning from the upper left to the lower right of the screen in units of tree blocks. If the encoding target tree block is represented by a hatched rectangle in FIG. 13, the encoded tree block is represented by a gray portion in FIG. Since hierarchical tree coding is performed in the tree block according to the coding conditions, the coding block is divided into a size equal to or smaller than the tree block. Although it is close to the encoded block inside the tree block, it is far away in the encoding processing order. Therefore, since the quantization parameter calculated by the code amount control is calculated in the order of encoding processing, the quantization parameter of the encoding block is close to the quantization parameter of the encoded block in the upper tree block. I can't say. Therefore, in the first embodiment, the upper tree block is not used for the prediction of the quantization parameter, but only the left tree block in the encoding processing order is used.

また、図14で示されるように、ツリーブロックの中の符号化ブロックを図14中の斜線矩形とすると、実細線が符号化処理順を表し、符号化ブロックまでに符号化されたブロックは図14中の灰色部分で表される。同じツリーブロック内部では符号化ブロックと符号化済みブロックの符号化処理順が離れておらず、同じ或いは似た絵柄となることが多いので、同じツリーブロック内部では上の符号化済みブロックの量子化パラメータを予測に使用することは有効である。実施例1では、符号化処理順で近い符号化済みブロックよりも、近接する符号化済みブロックを予測に使用することを優先する。   Further, as shown in FIG. 14, when the encoding block in the tree block is a hatched rectangle in FIG. 14, the solid thin line represents the encoding processing order, and the blocks encoded up to the encoding block are shown in FIG. 14 is represented by a gray portion. Within the same tree block, the coding process order of the coded block and the coded block is not separated, and the same or similar pattern is often obtained. It is useful to use parameters for prediction. In the first embodiment, priority is given to using an adjacent encoded block for prediction rather than an encoded block close in the encoding processing order.

図15は分割されたツリーブロック内部の各符号化ブロックが参照する符号化済みブロックの方向を太矢印で表す。図15中の実細線は符号化処理順を表しており、符号化ブロックは符号化処理順で近い符号化済みブロックよりも、近接する符号化済みブロックを優先する。図15中のツリーブロックの上端に位置するBLK0及びBLK1は上のツリーブロックと境界を接しているので、上に近接する符号化済みブロックの量子化パラメータを予測に使用せず、左に近接する符号化済みブロックの量子化パラメータのみを使用する。BLK2及びBLK3は上に近接する符号化済みブロックが同じツリーブロック内部にあるので、上の符号化済みブロックの量子化パラメータと左の符号化済みブロックの量子化パラメータとを予測に使用する。   FIG. 15 shows the direction of the encoded block referred to by each encoded block in the divided tree block by a thick arrow. The solid thin line in FIG. 15 represents the encoding process order, and the encoded block gives priority to the adjacent encoded block over the encoded block close in the encoding process order. Since BLK0 and BLK1 located at the upper end of the tree block in FIG. 15 are in contact with the upper tree block, the quantization parameter of the encoded block adjacent to the upper side is not used for prediction, and is adjacent to the left. Only the quantization parameters of the encoded block are used. Since BLK2 and BLK3 have encoded blocks adjacent to each other in the same tree block, the quantization parameter of the upper encoded block and the quantization parameter of the left encoded block are used for prediction.

図16は本実施の形態で定義する符号化ブロックと周囲に近接する既符号化済みのブロックとの配置を示す。本実施の形態では説明の都合上、各ブロックのサイズを同じものとして表記しているが、例えば動き予測等でブロックサイズを変えて、最適な動き予測を行う場合にでも、符号化ブロックの左上の点を基準として、その周囲に近接するブロックを選抜することで実現可能である。   FIG. 16 shows the arrangement of the encoded blocks defined in the present embodiment and the already encoded blocks adjacent to the surroundings. In this embodiment, 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, for example, motion prediction, the upper left of the encoded block This can be realized by selecting a block close to the periphery of the above point as a reference.

図16の記載の記号QPx(x=L,A,AL)は、周囲の既符号化済みの近接ブロックの量子化パラメータを表す。第1の予測量子化パラメータ導出部303は、図16に示される左と上の近接ブロックの量子化パラメータの有無により、予測量子化パラメータを判定する。   A symbol QPx (x = L, A, AL) shown in FIG. 16 represents a quantization parameter of a neighboring block that has already been encoded. The first predictive quantization parameter deriving unit 303 determines the predictive quantization parameter based on the presence / absence of the quantization parameter of the left and upper neighboring blocks shown in FIG.

第1の予測量子化パラメータ導出部303の動作について説明する。図17は実施例1における第1の予測量子化パラメータ導出部303の動作を示すフローチャートである。   The operation of the first predictive quantization parameter deriving unit 303 will be described. FIG. 17 is a flowchart illustrating the operation of the first predictive quantization parameter deriving unit 303 in the first embodiment.

まず、符号化対象の符号化ブロックの位置情報が取得される(S100)。符号化ブロックの位置情報は、画面の左上を基点として、符号化ブロックを含むツリーブロックの左上の位置が求められ、更にツリーブロックの左上の位置から符号化ブロックの位置が求められる。次に符号化ブロックが上のツリーブロックと近接しているか否かが判定される(S101)。   First, position information of a coding block to be coded is acquired (S100). As the position information of the encoded block, the upper left position of the tree block including the encoded block is obtained from the upper left corner of the screen, and the position of the encoded block is obtained from the upper left position of the tree block. Next, it is determined whether or not the encoded block is close to the upper tree block (S101).

符号化ブロックが上のツリーブロックと近接している場合(S101のYes)、即ち符号化ブロックがツリーブロックの上端に位置している場合は上の近接ブロックが上のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に上の近接ブロックを使用しない。ここで、量子化パラメータは常に正値をとることに着目して、上の近接ブロックを使用しない場合、上の近接ブロックの量子化パラメータQPAを0に設定する(S102)。   If the encoded block is close to the upper tree block (Yes in S101), that is, if the encoded block is located at the upper end of the tree block, the upper adjacent block is included in the upper tree block. Therefore, the tree block boundary is crossed, so the upper neighboring block is not used for the quantization parameter prediction. Here, focusing on the fact that the quantization parameter always takes a positive value, when the upper neighboring block is not used, the quantization parameter QPA of the upper neighboring block is set to 0 (S102).

一方、符号化ブロックが上のツリーブロックと近接していない場合(S101のNo)、即ち上の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、符号化ブロックの左上の基準位置情報から、メモリ302から符号化ブロックの上に近接する既符号化済みのブロックの量子化パラメータQPAを取得する(S103)。この時、符号化ブロックの左上の基準位置情報に基づいて、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する周囲の符号化済みブロックの量子化パラメータが予測量子化パラメータ導出部114内部のメモリ302に供給され、メモリ302中から上の近接ブロックの量子化パラメータを取得する。   On the other hand, if the encoded block is not adjacent to the upper tree block (No in S101), that is, if the upper adjacent block is located in the same tree block as the encoded block, From the reference position information at the upper left, the quantization parameter QPA of the already encoded block close to the encoded block is acquired from the memory 302 (S103). At this time, the storage area stored in the encoded information storage memory 113 is accessed based on the reference position information at the upper left of the encoded block, and the quantization parameter of the corresponding surrounding encoded block is the predicted quantization parameter. It is supplied to the memory 302 inside the deriving unit 114, and the quantization parameter of the upper neighboring block is acquired from the memory 302.

続いて、符号化ブロックの左に近接する符号化済みブロックが存在するか否かを判定する(S104)。左に近接ブロックが存在する場合(S104のYes)、メモリ302から符号化ブロックの左に近接する符号化済みのブロックの量子化パラメータQPLを取得する(S105)。左の近接ブロックが存在しない場合(S104のNo)、左の近接ブロックの量子化パラメータQPLを0に設定する(S106)。   Subsequently, it is determined whether there is an encoded block adjacent to the left of the encoded block (S104). When the adjacent block exists on the left (Yes in S104), the quantization parameter QPL of the encoded block adjacent to the left of the encoded block is acquired from the memory 302 (S105). If the left adjacent block does not exist (No in S104), the quantization parameter QPL of the left adjacent block is set to 0 (S106).

次に、左及び上の近接ブロックの量子化パラメータがともに正であるか否かを判定する(S107)。左及び上の近接ブロックの量子化パラメータがともに正の場合(S107のYes)、左及び上の両方の近接ブロックが存在するので、左と上の近接ブロックの量子化パラメータの平均値を予測量子化パラメータとする(S111)。一方、左及び上の近接ブロックの量子化パラメータがともに正でない場合(S107のNo)、即ち少なくとも左或いは上のどちらか一方の近接ブロックの量子化パラメータが0であり、少なくとも左或いは上のどちらか一方の近接ブロックが存在しないことになる。この場合はS108に進む。   Next, it is determined whether the quantization parameters of the left and upper neighboring blocks are both positive (S107). If the quantization parameters of the left and upper neighboring blocks are both positive (Yes in S107), since both the left and upper neighboring blocks exist, the average value of the quantization parameters of the left and upper neighboring blocks is estimated quantum. (S111). On the other hand, if the quantization parameter of the left and upper neighboring blocks is not positive (No in S107), that is, the quantization parameter of at least one of the left or upper neighboring blocks is 0, and at least either the left or upper one One of the adjacent blocks does not exist. In this case, the process proceeds to S108.

次に、左及び上の近接ブロックの量子化パラメータがともに0であるか否かを判定する(S108)。即ち、左及び上の近接ブロックの量子化パラメータがともに0の場合、両方ともに存在しないので、予測量子化パラメータとして左及び上の近接ブロックの量子化パラメータを参照出来ない。そこで、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする。尚、画像の左上端のブロックが符号化ブロックである場合は、左と上の近接ブロック、更に符号化対象の符号化ブロックより前、ないし直前に符号化したブロックが存在しないので、ピクチャ或いはスライスの量子化パラメータを予測量子化パラメータとする(S109)。左或いは上の近接ブロックのどちらか一方が存在する場合、正である一方の量子化パラメータを予測量子化パラメータとする(S110)。こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   Next, it is determined whether the quantization parameters of the left and upper neighboring blocks are both 0 (S108). That is, when the quantization parameters of the left and upper neighboring blocks are both 0, both of them do not exist, so the quantization parameters of the left and upper neighboring blocks cannot be referred to as the prediction quantization parameters. Therefore, the quantization parameter (prevQP) of the block encoded before or immediately before the encoding block to be encoded is set as the predicted quantization parameter. If the block at the upper left corner of the image is an encoded block, there is no block encoded before and immediately before the encoding block to be encoded, and the adjacent block on the left and upper, so a picture or slice Is set as a predicted quantization parameter (S109). When either the left or upper neighboring block exists, one positive quantization parameter is set as a predicted quantization parameter (S110). The predicted quantization parameter calculated in this way is supplied to the differential quantization parameter generation unit 111.

また、第1の予測量子化パラメータ導出部303は、図16に示される符号化ブロックの周囲の左、上及び左上の近接ブロックの量子化パラメータにより、予測量子化パラメータを判定することも可能である。上述した手法との相違は、予測量子化パラメータの判定に基づいて、左及び上の近接ブロックの量子化パラメータに重み付けを行い、導出される値を予測量子化パラメータとする点である。   Also, the first predictive quantization parameter deriving unit 303 can determine the predictive quantization parameter based on the quantization parameters of the neighboring blocks on the left, top, and top left around the coding block shown in FIG. is there. The difference from the above-described method is that, based on the determination of the predicted quantization parameter, the quantization parameter of the left and upper neighboring blocks is weighted, and the derived value is used as the predicted quantization parameter.

図18は第1の予測量子化パラメータ導出部303の動作を示すフローチャートである。図18のフローチャートのS200からS210の処理過程は、上述した図17のフローチャートのS100からS110と同様なので説明を割愛し、左及び上の近接ブロックの量子化パラメータがともに正であるか否かの判定において(S207)、左及び上の近接ブロックの量子化パラメータがともに正の場合(S207のYes)から説明する。左及び上の近接ブロックの量子化パラメータがともに正の場合、左及び上の両方の近接ブロックが存在する。この時、左上の近接ブロックも存在するので、符号化ブロックの左上の基準位置情報から、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する左上の近接ブロックの量子化パラメータQPALを予測量子化パラメータ導出部114に供給する(S211)。   FIG. 18 is a flowchart showing the operation of the first predictive quantization parameter deriving unit 303. The processing steps from S200 to S210 in the flowchart of FIG. 18 are the same as S100 to S110 in the flowchart of FIG. 17 described above, so the description thereof will be omitted, and whether the quantization parameters of the left and upper neighboring blocks are both positive or not. In the determination (S207), the description starts from the case where the quantization parameters of the left and upper neighboring blocks are both positive (Yes in S207). If the quantization parameters of the left and top neighboring blocks are both positive, there are both left and top neighboring blocks. At this time, since the upper left neighboring block also exists, the storage area stored in the coding information storage memory 113 is accessed from the upper left reference position information of the coding block, and the quantization parameter of the corresponding upper left neighboring block is obtained. QPAL is supplied to the predictive quantization parameter deriving unit 114 (S211).

次に、左の近接ブロックの量子化パラメータQPLと左上の近接ブロックの量子化パラメータQPALとの一致判定を行う(S212)。QPLとQPALが一致する場合、上の近接ブロックの量子化パラメータの重み付け係数FA、左の近接ブロックの量子化パラメータの重み付け係数FLとすると、FA>FLとなるように上の近接ブロックの量子化パラメータに対して重み付けを大きく設定する(S213)。例えば、FAを3、FLを1に設定する。この場合、一例として図8で示される量子化パラメータの配置が考えられるので、上の近接ブロックの量子化パラメータの重み付けを大きく設定することは適当と言える。また、QPAもQPL及びQPALと一致する場合は、全ての近接ブロックの量子化パラメータが同じとなるので問題ない。QPLとQPALが一致しない場合、S214に進み、QPAとQPALとの一致判定を行う(S214)。QPAとQPALが一致する場合、FA<FLとなるように左の近接ブロックの量子化パラメータに対して重み付けを大きく設定する(S215)。例えば、FAを1、FLを3に設定する。QPAとQPALが一致しない場合、FAとFLを同じ重み付けとし、左と上の近接ブロックの量子化パラメータに対する重み付けを均等化する(S216)。この場合、左、上及び左上の近接ブロックの量子化パラメータが全て異なるので、QPL或いはQPAのどちらか一方の重み付けを大きく設定するには十分な条件判定が出来ない。そこで、QPLとQPAの平均を予測量子化パラメータとして、均等な判定値とし、例えば、FAを2、FLを2に設定する。決定した重み付け係数からと各量子化パラメータから次式にて予測量子化パラメータpredQPを導出する(S217)。   Next, it is determined whether or not the quantization parameter QPL of the left neighboring block and the quantization parameter QPAL of the upper left neighboring block match (S212). When QPL and QPAL match, if the weighting factor FA of the quantization parameter of the upper neighboring block and the weighting factor FL of the quantization parameter of the left neighboring block, the quantization of the upper neighboring block is such that FA> FL. A large weight is set for the parameter (S213). For example, FA is set to 3 and FL is set to 1. In this case, since the arrangement of the quantization parameters shown in FIG. 8 can be considered as an example, it can be said that it is appropriate to set the weights of the quantization parameters of the upper neighboring blocks large. In addition, when QPA matches QPL and QPAL, the quantization parameters of all adjacent blocks are the same, so there is no problem. If QPL and QPAL do not match, the process proceeds to S214, and a match determination between QPA and QPAL is performed (S214). If QPA and QPAL match, weighting is set larger for the quantization parameter of the adjacent block on the left so that FA <FL (S215). For example, FA is set to 1 and FL is set to 3. If QPA and QPAL do not match, FA and FL are set to the same weight, and the weights for the quantization parameters of the adjacent blocks on the left and the top are equalized (S216). In this case, since the quantization parameters of the left, upper, and upper left neighboring blocks are all different, it is not possible to perform sufficient condition determination to set a large weight for 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. For example, FA is set to 2 and FL is set to 2. A predicted quantization parameter predQP is derived from the determined weighting coefficient and each quantization parameter by the following equation (S217).

Figure 2013150318
Figure 2013150318

ここで、上式の分母はFA+FLであり、分子の2は四捨五入の為に加算される(FA+FL)/2の値である。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   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. The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

更に、図18中のS212のQPLとQPAL及びS214のQPAとQPALの同一判定に代わって、左と左上の近接ブロックの量子化パラメータの差分絶対値をΔL、上と左上の近接ブロックの量子化パラメータの差分絶対値をΔAとして、ΔLとΔAの比較に基づいて、左或いは上の量子化パラメータを予測量子化パラメータとして選択することも可能である。   Further, instead of the same determination of QPL and QPAL of S212 and QPA and QPAL of S214 in FIG. It is also possible to select the left or upper quantization parameter as the predicted quantization parameter based on the comparison between ΔL and ΔA, with the parameter difference absolute value as ΔA.

符号化ブロックとその周囲の既符号化済みの近接ブロックにおいて、ΔL及びΔAは左と左上、上と左上の近接ブロックの量子化パラメータの差分絶対値を表し、それぞれ次式で表される。   In the coded block and the neighboring blocks that have already been coded, ΔL and ΔA represent the absolute value of the difference between the quantization parameters of the left and upper left, and the upper and upper left neighboring blocks, respectively, and are expressed by the following equations.

Figure 2013150318
Figure 2013150318

Figure 2013150318
Figure 2013150318

ΔAがΔLよりも大きくなる場合は、QPAとQPALとの差が大きい場合であり、上と左上の近接ブロックの間で画像の滑らかさ或いは複雑さが左と左上の近接ブロック間よりも異なっている(変化が大きい)と推察される。その為、符号化ブロックとその周囲の既符号化済みの近接ブロックにおいて、左2つのブロック(左と左上の近接ブロック)と右2つのブロック(符号化ブロックと上の近接ブロック)とで量子化パラメータの差が生じると考えられるので、符号化ブロックの量子化パラメータは左の近接ブロックの量子化パラメータよりも上の近接ブロックの量子化パラメータに近いと判定する。   When ΔA is larger than ΔL, the difference between QPA and QPAL is large, and the smoothness or complexity of the image differs between the upper and upper left neighboring blocks than between the left and upper left neighboring blocks. It is inferred that there is a large change. Therefore, in the coding block and the neighboring blocks that have already been coded, quantization is performed with the left two blocks (left and upper left neighboring blocks) and the right two blocks (coded block and upper neighboring blocks). Since a parameter difference is considered to occur, it is determined that the quantization parameter of the coding block is close to the quantization parameter of the neighboring block above the quantization parameter of the left neighboring block.

復号処理の場合は、予測量子化パラメータ導出部を303から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現する。   In the case of decoding processing, the prediction quantization parameter derivation unit replaces the code from 303 to 205 and the encoding information storage memory from 302 to 204, and the output destination of the prediction quantization parameter is changed from the difference quantization parameter generation unit 111 to the quantization parameter. By using the generation unit 203, equivalent processing is realized.

[実施例2]
実施例2における第1の予測量子化パラメータ導出部303及び205の動作について説明する。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を303から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。実施例2では、実施例1と同様に、符号化対象の符号化ブロックに近接する左と上の符号化済みブロックの量子化パラメータを予測に使用する。一方、実施例1との相違は、符号化ブロックが上のツリーブロックと近接する場合と同様に、左のツリーブロックと近接する場合に、左のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止する点である。これは、符号化ブロックの量子化パラメータの算出が符号化制御の符号化処理順に基づいて行われるので、ツリーブロック内部に比べてツリーブロック間では符号化処理順が符号化ブロック間で離れてしまい、ツリーブロック間で符号化ブロックが近接していたとしても、符号量制御で算出される符号化ブロックの量子化パラメータが必ずしも近い値にならず、予測量子化パラメータとして適さないことがある為である。そこで、実施例2では、符号化または復号対象の符号化ブロックが左或いは上のツリーブロックと近接する場合には、左或いは上のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用せず、符号化処理順で符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータに置き換えて使用することとする。
[Example 2]
The operation of the first predictive quantization parameter derivation units 303 and 205 in the second embodiment will be described. Although the encoding process will be described here, in the case of the decoding process, the encoding is decoding, and the prediction quantization parameter derivation unit is replaced with code 303 to 205, and the encoding information storage memory is replaced with code 302 to 204. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. In the second embodiment, as in the first embodiment, the quantization parameters of the left and upper encoded blocks adjacent to the encoding block to be encoded are used for prediction. On the other hand, the difference from the first embodiment is that when the encoded block is close to the upper tree block, the quantization of the encoded block in the left tree block is performed when the encoded block is close to the left tree block. The use of parameters for prediction is prohibited. This is because the quantization parameter of the coding block is calculated based on the coding processing order of the coding control, so that the coding processing order is separated between the coding blocks between the tree blocks as compared to the inside of the tree block. Even if coding blocks are close to each other between the tree blocks, the quantization parameter of the coding block calculated by the code amount control is not necessarily a close value and may not be suitable as a predictive quantization parameter. is there. Therefore, in the second embodiment, when the encoding block to be encoded or decoded is close to the left or upper tree block, the quantization parameter of the encoded block in the left or upper tree block is predicted. Not used, but replaced with the quantization parameter of the block encoded before or immediately before the encoding block to be encoded in the encoding processing order.

図19は分割されたツリーブロック内部の各符号化ブロックが参照する符号化済みブロックの方向を太矢印で表す。図19中の実細線は符号化処理順を表しており、符号化ブロックは、符号化ブロックを含むツリーブロック内部で近接する符号化済みブロックの量子化パラメータを原則使用する。図20中のツリーブロックの上端に位置するBLK0は左及び上のツリーブロックと境界を接しているので、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを左及び上に近接する符号化済みブロックの量子化パラメータに置き換えて予測に使用する。BLK1は上のツリーブロックと境界を接しているので、上に近接する符号化済みブロックの量子化パラメータを予測に使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータに置き換えて、左に近接する符号化済みブロックの量子化パラメータとともに予測に使用する。BLK2は左のツリーブロックと境界を接しているので、左に近接する符号化済みブロックの量子化パラメータを予測に使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータに置き換えて、上に近接する符号化済みブロックの量子化パラメータとともに予測に使用する。BLK3は左及び上に近接する符号化済みブロックが同じツリーブロック内部にあるので、上の符号化済みブロックの量子化パラメータと左の符号化済みブロックの量子化パラメータとを予測に使用する。   FIG. 19 shows the direction of the encoded block referred to by each encoded block in the divided tree block by a thick arrow. The solid thin line in FIG. 19 represents the order of encoding processing, and the encoding block uses in principle the quantization parameters of the adjacent encoded blocks within the tree block including the encoding block. Since BLK0 located at the upper end of the tree block in FIG. 20 borders the left and upper tree blocks, the quantization parameter of the block encoded before or immediately before the encoding block to be encoded is set to the left. And it replaces with the quantization parameter of the coded block which adjoins on the top, and uses it for prediction. Since BLK1 is bordered by the upper tree block, the quantization parameter of the encoded block adjacent to the upper side is not used for prediction, and the block encoded before or immediately before the encoding block to be encoded is used. Is used for prediction together with the quantization parameter of the coded block adjacent to the left. Since BLK2 is in contact with the left tree block, the quantization parameter of the encoded block adjacent to the left is not used for prediction, and the block is encoded before or immediately before the encoding block to be encoded. Is used for prediction together with the quantization parameter of the coded block close to the top. BLK3 uses the quantization parameter of the upper encoded block and the quantization parameter of the left encoded block for prediction since the adjacent encoded blocks on the left and upper sides are inside the same tree block.

図20は実施例2における第1の予測量子化パラメータ導出部303の動作を示すフローチャートである。   FIG. 20 is a flowchart illustrating the operation of the first predictive quantization parameter deriving unit 303 in the second embodiment.

まず、符号化対象の符号化ブロックの位置情報が取得される(S300)。符号化ブロックの位置情報は、画面の左上を基点として、符号化ブロックを含むツリーブロックの左上の位置が求められ、更にツリーブロックの左上の位置から符号化ブロックの位置が求められる。次に符号化ブロックが上のツリーブロックと近接しているか否かが判定される(S301)。符号化ブロックが上のツリーブロックと近接している場合(S301のYes)、即ち符号化ブロックがツリーブロックの上端に位置している場合は上の近接ブロックが上のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に上の近接ブロックを使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化した符号化ブロックの量子化パラメータprevQPをQPAに設定する(S302)。   First, position information of a coding block to be coded is acquired (S300). As the position information of the encoded block, the upper left position of the tree block including the encoded block is obtained from the upper left corner of the screen, and the position of the encoded block is obtained from the upper left position of the tree block. Next, it is determined whether or not the encoded block is close to the upper tree block (S301). If the encoded block is close to the upper tree block (Yes in S301), that is, if the encoded block is located at the upper end of the tree block, the upper adjacent block is included in the upper tree block. Therefore, since the tree block boundary is exceeded, the quantization block prevQP of the coding block coded before or just before the coding block to be coded is used without using the upper neighboring block for the quantization parameter prediction. QPA is set (S302).

一方、符号化ブロックが上のツリーブロックと近接していない場合(S301のNo)、即ち上の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの上に近接する既符号化済みのブロックの量子化パラメータQPAを取得する(S303)。この時、符号化ブロックの左上の基準位置情報に基づいて、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する周囲の符号化済みブロックの量子化パラメータが予測量子化パラメータ導出部114内部のメモリ302に供給され、メモリ302の中から上の近接ブロックの量子化パラメータを取得する。   On the other hand, if the encoded block is not adjacent to the upper tree block (No in S301), that is, if the upper adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPA of the already-encoded block close to the quantization block is acquired (S303). At this time, the storage area stored in the encoded information storage memory 113 is accessed based on the reference position information at the upper left of the encoded block, and the quantization parameter of the corresponding surrounding encoded block is the predicted quantization parameter. It is supplied to the memory 302 inside the deriving unit 114, and the quantization parameter of the upper neighboring block is acquired from the memory 302.

続いて、符号化ブロックが左のツリーブロックと近接しているか否かが判定される(S304)。符号化ブロックが左のツリーブロックと近接している場合(S304のYes)、即ち符号化ブロックがツリーブロックの左端に位置している場合は左の近接ブロックが左のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に左の近接ブロックを使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化した符号化ブロックの量子化パラメータprevQPをQPLに設定する(S306)。   Subsequently, it is determined whether or not the encoded block is close to the left tree block (S304). If the encoded block is close to the left tree block (Yes in S304), that is, if the encoded block is located at the left end of the tree block, the left adjacent block is included in the left tree block. Therefore, the tree block boundary is crossed, so that the left neighboring block is not used for the quantization parameter prediction, and the quantization parameter prevQP of the coding block coded before or just before the coding block to be coded is set. QPL is set (S306).

一方、符号化ブロックが左のツリーブロックと近接していない場合(S304のNo)、即ち左の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの左に近接する既符号化済みのブロックの量子化パラメータQPLを取得する(S306)。最後に左と上の近接ブロックの量子化パラメータの平均値を予測量子化パラメータとする(S307)。こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   On the other hand, if the encoded block is not close to the left tree block (No in S304), that is, if the left adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPL of the already-encoded block adjacent to the left of the quantization block is acquired (S306). Finally, the average value of the quantization parameters of the adjacent blocks on the left and upper is set as the predicted quantization parameter (S307). The predicted quantization parameter calculated in this way is supplied to the differential quantization parameter generation unit 111.

実施例2では、左及び上の近接ブロックがツリーブロック境界を越える場合には、それぞれの量子化パラメータを符号化対象の符号化ブロックより前、ないし直前に符号化した符号化ブロックの量子化パラメータとして代用する為、必ず非0の値を備えるので、実施例1よりも量子化パラメータの値の判定処理を削減することが可能となる。   In the second embodiment, when the left and upper neighboring blocks exceed the tree block boundary, the quantization parameters of the coding blocks coded before or immediately before the coding block to be coded are encoded. Therefore, it is possible to reduce the determination process of the quantization parameter value as compared with the first embodiment.

[実施例3]
実施例3における第1の予測量子化パラメータ導出部303及び205の動作について説明する。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を303から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。実施例1との相違は、符号化または復号対象の符号化ブロックが上のツリーブロックと近接する場合と同様に、左のツリーブロックと近接する場合に、左のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止する点である。即ち、ツリーブロック境界を越えての符号化済みブロックの量子化パラメータを予測に使用するのは、ツリーブロック内部で最初の符号化処理順の符号化ブロックが符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを使用する場合のみに制限する。
[Example 3]
The operation of the first predictive quantization parameter derivation units 303 and 205 in the third embodiment will be described. Although the encoding process will be described here, in the case of the decoding process, the encoding is decoding, and the prediction quantization parameter derivation unit is replaced with code 303 to 205, and the encoding information storage memory is replaced with code 302 to 204. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. The difference from the first embodiment is that, when the encoding block to be encoded or decoded is close to the upper tree block, the encoding in the left tree block is already performed when it is close to the left tree block. The point is to prohibit the use of block quantization parameters for prediction. That is, the quantization parameter of the encoded block that exceeds the tree block boundary is used for the prediction. Or, it is limited only when the quantization parameter of the block coded immediately before is used.

図21は分割されたツリーブロック内部の各符号化ブロックが参照する符号化済みブロックの方向を太矢印で表す。図21中の実細線は符号化処理順を表しており、符号化ブロックは、符号化ブロックを含むツリーブロック内部で近接する符号化済みブロックの量子化パラメータを使用する。   FIG. 21 shows the direction of the encoded block referred to by each encoded block in the divided tree block by a thick arrow. The solid thin line in FIG. 21 represents the order of encoding processing, and the encoding block uses the quantization parameter of the encoded block that is close within the tree block including the encoding block.

図21中のツリーブロックの上端に位置するBLK0は左及び上のツリーブロックと境界を接しているので、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータのみ予測に使用する。BLK1は上のツリーブロックと境界を接しているので、上に近接する符号化済みブロックの量子化パラメータを予測に使用せず、左に近接する符号化済みブロックの量子化パラメータのみ予測に使用する。BLK2は左のツリーブロックと境界を接しているので、左に近接する符号化済みブロックの量子化パラメータを予測に使用せず、上に近接する符号化済みブロックの量子化パラメータのみ予測に使用する。BLK3は左及び上に近接する符号化済みブロックが同じツリーブロック内部にあるので、上の符号化済みブロックの量子化パラメータと左の符号化済みブロックの量子化パラメータとを予測に使用する。   Since BLK0 located at the upper end of the tree block in FIG. 21 is in contact with the left and upper tree blocks, only the quantization parameter of the block encoded before or immediately before the encoding block to be encoded is predicted. Used for. Since BLK1 is bounded by the upper tree block, the quantization parameter of the encoded block adjacent to the upper side is not used for prediction, and only the quantization parameter of the encoded block adjacent to the left is used for prediction. . Since BLK2 is bounded by the left tree block, the quantization parameter of the encoded block adjacent to the left is not used for prediction, and only the quantization parameter of the encoded block adjacent to the left is used for prediction. . BLK3 uses the quantization parameter of the upper encoded block and the quantization parameter of the left encoded block for prediction since the adjacent encoded blocks on the left and upper sides are inside the same tree block.

図22は実施例3における第1の予測量子化パラメータ導出部303の動作を示すフローチャートである。図22のフローチャートのS400からS403及びS407からS411までは実施例1の図17のS100からS103及びS107からS111までと同じであるので、説明を割愛し、符号化ブロックが上のツリーブロックと近接しているか否か判定された後のS404からの相違のみ説明する。   FIG. 22 is a flowchart illustrating the operation of the first predictive quantization parameter deriving unit 303 in the third embodiment. Since S400 to S403 and S407 to S411 in the flowchart of FIG. 22 are the same as S100 to S103 and S107 to S111 of FIG. 17 of the first embodiment, the description is omitted and the coding block is close to the upper tree block. Only the difference from S404 after it is determined whether or not it is determined will be described.

符号化ブロックと上のツリーブロックとの近接判定後に、符号化ブロックが左のツリーブロックと近接しているか否かが判定される(S404)。符号化ブロックが左のツリーブロックと近接している場合(S404のYes)、即ち符号化ブロックがツリーブロックの左端に位置している場合は左の近接ブロックが左のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に左の近接ブロックを使用しない。ここで、量子化パラメータは常に正値をとることに着目して、左の近接ブロックを使用しない場合、左の近接ブロックの量子化パラメータQPLを0に設定する(S405)。一方、符号化ブロックが左のツリーブロックと近接していない場合(S404のNo)、即ち左の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの左に近接する既符号化済みのブロックの量子化パラメータQPLを取得する(S406)。こうして取得された左及び上の近接ブロックの量子化パラメータから予測量子化パラメータが導出され、予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   After the proximity determination between the encoded block and the upper tree block, it is determined whether or not the encoded block is adjacent to the left tree block (S404). If the encoded block is close to the left tree block (Yes in S404), that is, if the encoded block is located at the left end of the tree block, the left adjacent block is included in the left tree block. Therefore, since the tree block boundary is exceeded, the left adjacent block is not used for the quantization parameter prediction. Here, focusing on the fact that the quantization parameter always takes a positive value, when the left adjacent block is not used, the quantization parameter QPL of the left adjacent block is set to 0 (S405). On the other hand, if the encoded block is not adjacent to the left tree block (No in S404), that is, if the left adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPL of the already coded block adjacent to the left of the quantization block is acquired (S406). A predicted quantization parameter is derived from the quantization parameters of the left and upper neighboring blocks acquired in this way, and the predicted quantization parameter is supplied to the differential quantization parameter generation unit 111.

[実施例4]
実施例4における第1の予測量子化パラメータ導出部303及び205の動作について説明する。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を303から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。実施例4では、符号化または復号対象の符号化ブロックが左或いは上のツリーブロックと近接する場合に、左或いは上のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止する。更に、左に近接する符号化済みブロックの量子化パラメータを予測に使用することを原則とし、左に近接する符号化ブロックが存在しない或いはツリーブロック境界を越えた位置に存在する場合は、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを予測に使用する。
[Example 4]
The operation of the first predictive quantization parameter deriving units 303 and 205 in the fourth embodiment will be described. Although the encoding process will be described here, in the case of the decoding process, the encoding is decoding, and the prediction quantization parameter derivation unit is replaced with code 303 to 205, and the encoding information storage memory is replaced with code 302 to 204. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. In the fourth embodiment, when the encoding block to be encoded or decoded is close to the left or upper tree block, the quantization parameter of the encoded block in the left or upper tree block is used for prediction. Is prohibited. Furthermore, in principle, the quantization parameter of the encoded block adjacent to the left is used for the prediction, and if there is no encoded block adjacent to the left or located beyond the tree block boundary, the encoding is performed. The quantization parameter of the block encoded before or immediately before the target encoded block is used for prediction.

図23は分割されたツリーブロック内部の各符号化ブロックが参照する符号化済みブロックの方向を太矢印で表す。図23中の実細線は符号化処理順を表しており、符号化ブロックは、符号化ブロックを含むツリーブロック内部で左に近接する符号化済みブロックの量子化パラメータを予測に原則使用する。   In FIG. 23, the direction of the encoded block referred to by each encoded block in the divided tree block is represented by a thick arrow. The solid thin line in FIG. 23 represents the encoding processing order, and the encoding block uses in principle the quantization parameter of the encoded block adjacent to the left inside the tree block including the encoding block for prediction.

図23中のツリーブロックの上端に位置するBLK0は左及び上のツリーブロックと境界を接しているので、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを予測に使用する。BLK1及びBLK3は、左に近接する符号化済みブロックが同じツリーブロック内部にあるので、左の符号化済みブロックの量子化パラメータを予測に使用する。BLK2は左のツリーブロックと境界を接しているので、左に近接する符号化済みブロックの量子化パラメータを予測に使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを予測に使用する。   Since BLK0 located at the upper end of the tree block in FIG. 23 is in contact with the left and upper tree blocks, the quantization parameter of the block encoded before or immediately before the encoding block to be encoded is predicted. Used for. BLK1 and BLK3 use the quantization parameter of the left encoded block for prediction because the encoded block adjacent to the left is inside the same tree block. Since BLK2 is in contact with the left tree block, the quantization parameter of the encoded block adjacent to the left is not used for prediction, and the block is encoded before or immediately before the encoding block to be encoded. Are used for prediction.

図24は実施例4における第1の予測量子化パラメータ導出部303の動作を示すフローチャートである。まず、符号化対象の符号化ブロックの位置情報が取得される(S500)。符号化ブロックの位置情報は、画面の左上を基点として、符号化ブロックを含むツリーブロックの左上の位置が求められ、更にツリーブロックの左上の位置から符号化ブロックの位置が求められる。次に符号化ブロックが左のツリーブロックと近接しているか否かが判定される(S501)。符号化ブロックが左のツリーブロックと近接している場合(S304のYes)、即ち符号化ブロックがツリーブロックの左端に位置している場合は左の近接ブロックが左のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に左の近接ブロックを使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化した符号化ブロックの量子化パラメータprevQPを予測量子化パラメータとして設定する(S502)。一方、符号化ブロックが左のツリーブロックと近接していない場合(S501のNo)、即ち左の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの左に近接する既符号化済みのブロックの量子化パラメータQPLを取得する(S503)。この時、符号化ブロックの左上の基準位置情報に基づいて、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する周囲の符号化済みブロックの量子化パラメータが予測量子化パラメータ導出部114内部のメモリ302に供給され、メモリ302中から左の近接ブロックの量子化パラメータを取得し、予測量子化パラメータとして設定する。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   FIG. 24 is a flowchart illustrating the operation of the first predictive quantization parameter deriving unit 303 in the fourth embodiment. First, position information of a coding block to be coded is acquired (S500). As the position information of the encoded block, the upper left position of the tree block including the encoded block is obtained from the upper left corner of the screen, and the position of the encoded block is obtained from the upper left position of the tree block. Next, it is determined whether or not the encoded block is close to the left tree block (S501). If the encoded block is close to the left tree block (Yes in S304), that is, if the encoded block is located at the left end of the tree block, the left adjacent block is included in the left tree block. Therefore, since the tree block boundary is exceeded, the quantization parameter prevQP of the coding block coded before or just before the coding block to be coded is used without using the left neighboring block for the quantization parameter prediction. The prediction quantization parameter is set (S502). On the other hand, if the encoded block is not adjacent to the left tree block (No in S501), that is, if the left adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPL of the already-encoded block adjacent to the left of the quantization block is acquired (S503). At this time, the storage area stored in the encoded information storage memory 113 is accessed based on the reference position information at the upper left of the encoded block, and the quantization parameter of the corresponding surrounding encoded block is the predicted quantization parameter. The quantization parameter of the adjacent block on the left is acquired from the memory 302 inside the derivation unit 114, and set as the prediction quantization parameter. The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

実施例4では、符号化ブロックの符号化済みの左の近接ブロックの量子化パラメータを原則予測に使用するようにしたので、これまでの実施例に比べて判定処理が簡便化され、回路規模を抑えることが可能となる。   In the fourth embodiment, the quantization parameter of the left adjacent block that has been encoded in the encoded block is used in principle for prediction, so that the determination process is simplified and the circuit scale is reduced compared to the previous embodiments. It becomes possible to suppress.

[実施例5]
実施例5における第1の予測量子化パラメータ導出部303及び205の動作について説明する。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を303から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。実施例5は実施例1と2の組合せであり、符号化または復号対象の符号化ブロックが左のツリーブロックと近接する場合は、左に近接するツリーブロックの符号化済みブロックの量子化パラメータを予測に使用を許可する。符号化ブロックが上のツリーブロックと近接する場合は、上のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止し、上のツリーブロックの中の符号化済みブロックの量子化パラメータに代わりに符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを予測に使用する。
[Example 5]
The operation of the first predictive quantization parameter derivation units 303 and 205 in the fifth embodiment will be described. Although the encoding process will be described here, in the case of the decoding process, the encoding is decoding, and the prediction quantization parameter derivation unit is replaced with code 303 to 205, and the encoding information storage memory is replaced with code 302 to 204. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. The fifth embodiment is a combination of the first and second embodiments. When the encoding block to be encoded or decoded is close to the left tree block, the quantization parameter of the encoded block of the tree block adjacent to the left is set. Allow use for prediction. If the coded block is close to the upper tree block, it is prohibited to use the quantization parameter of the coded block in the upper tree block for prediction, and the coded block in the upper tree block is used. Instead of the quantization parameter, the quantization parameter of the block coded before or just before the coding block to be coded is used for prediction.

図25は分割されたツリーブロック内部の各符号化ブロックが参照する符号化済みブロックの方向を太矢印で表す。図25中の実細線は符号化処理順を表しており、符号化対象の符号化ブロックは符号化処理順で近い符号化済みブロックよりも、近接する符号化済みブロックを優先する。   FIG. 25 shows the direction of the encoded block referred to by each encoded block in the divided tree block by a thick arrow. The solid thin line in FIG. 25 represents the encoding process order, and the encoding block to be encoded gives priority to the adjacent encoded block over the encoded block close in the encoding process order.

図25中のツリーブロックの上端に位置するBLK0及びBLK1は上のツリーブロックと境界を接しているので、上に近接する符号化済みブロックの量子化パラメータを予測に使用せず、代わりに符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータと左に近接する符号化済みブロックの量子化パラメータを予測に使用する。BLK2及びBLK3は上に近接する符号化済みブロックが同じツリーブロック内部にあるので、上の符号化済みブロックの量子化パラメータと左の符号化済みブロックの量子化パラメータとを予測に使用する。   Since BLK0 and BLK1 located at the upper end of the tree block in FIG. 25 are bounded by the upper tree block, the quantization parameter of the encoded block adjacent to the upper side is not used for prediction, and encoding is performed instead. The quantization parameter of the block coded before or immediately before the target coding block and the quantization parameter of the coded block adjacent to the left are used for prediction. Since BLK2 and BLK3 have encoded blocks adjacent to each other in the same tree block, the quantization parameter of the upper encoded block and the quantization parameter of the left encoded block are used for prediction.

実施例5における第1の予測量子化パラメータ導出部303の詳細な動作について説明する。図26は実施例5における第1の予測量子化パラメータ導出部303の動作を示すフローチャートである。   A detailed operation of the first predictive quantization parameter deriving unit 303 in the fifth embodiment will be described. FIG. 26 is a flowchart illustrating the operation of the first predictive quantization parameter deriving unit 303 in the fifth embodiment.

まず、符号化対象の符号化ブロックの位置情報が取得される(S600)。符号化ブロックの位置情報は、画面の左上を基点として、符号化ブロックを含むツリーブロックの左上の位置が求められ、更にツリーブロックの左上の位置から符号化ブロックの位置が求められる。次に符号化ブロックが上のツリーブロックと近接しているか否かが判定される(S601)。符号化ブロックが上のツリーブロックと近接している場合(S601のYes)、即ち符号化ブロックがツリーブロックの上端に位置している場合は上の近接ブロックが上のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に上の近接ブロックを使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化した符号化ブロックの量子化パラメータprevQPをQPAに設定する(S602)。   First, position information of a coding block to be coded is acquired (S600). As the position information of the encoded block, the upper left position of the tree block including the encoded block is obtained from the upper left corner of the screen, and the position of the encoded block is obtained from the upper left position of the tree block. Next, it is determined whether or not the encoded block is close to the upper tree block (S601). If the encoded block is close to the upper tree block (Yes in S601), that is, if the encoded block is located at the upper end of the tree block, the upper adjacent block is included in the upper tree block. Therefore, since the tree block boundary is exceeded, the quantization block prevQP of the coding block coded before or just before the coding block to be coded is used without using the upper neighboring block for the quantization parameter prediction. QPA is set (S602).

一方、符号化ブロックが上のツリーブロックと近接していない場合(S601のNo)、即ち上の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの上に近接する既符号化済みのブロックの量子化パラメータQPAを取得する(S603)。この時、符号化ブロックの左上の基準位置情報に基づいて、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する周囲の符号化済みブロックの量子化パラメータが予測量子化パラメータ導出部114内部のメモリ302に供給され、メモリ302中から上の近接ブロックの量子化パラメータを取得する。   On the other hand, if the encoded block is not adjacent to the upper tree block (No in S601), that is, if the upper adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPA of the already-encoded block close to the quantization block is acquired (S603). At this time, the storage area stored in the encoded information storage memory 113 is accessed based on the reference position information at the upper left of the encoded block, and the quantization parameter of the corresponding surrounding encoded block is the predicted quantization parameter. It is supplied to the memory 302 inside the deriving unit 114, and the quantization parameter of the upper neighboring block is acquired from the memory 302.

続いて、符号化ブロックの左に近接する符号化済みブロックが存在するか否かを判定する(S604)。左に近接ブロックが存在する場合(S604のYes)、符号化ブロックの左上の基準位置情報から、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する左の近接ブロックの量子化パラメータQPLを予測量子化パラメータ導出部114に供給する(S605)。左の近接ブロックが存在しない場合(S104のNo)、左の近接ブロックの量子化パラメータQPLを0に設定する(S606)。   Subsequently, it is determined whether there is an encoded block adjacent to the left of the encoded block (S604). When the adjacent block exists on the left (Yes in S604), the storage area stored in the encoded information storage memory 113 is accessed from the reference position information on the upper left of the encoded block, and the quantum of the corresponding left adjacent block is determined. The quantization parameter QPL is supplied to the predicted quantization parameter deriving unit 114 (S605). If there is no left neighboring block (No in S104), the quantization parameter QPL of the left neighboring block is set to 0 (S606).

次に左の近接ブロックの量子化パラメータが正であるか否かを判定する(S607)。左の近接ブロックの量子化パラメータが正の場合(S607のYes)、左の近接ブロックが存在するので、左と上の近接ブロックの量子化パラメータの平均値を予測量子化パラメータとする(S608)。一方、左の近接ブロックの量子化パラメータが正でない場合(S607のNo)、即ち左の近接ブロックの量子化パラメータが0であり、左の近接ブロックが存在しないことになる。この場合には、QPAを予測量子化パラメータとする(S609)。こうして算出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   Next, it is determined whether the quantization parameter of the left adjacent block is positive (S607). When the quantization parameter of the left neighboring block is positive (Yes in S607), since the left neighboring block exists, the average value of the quantization parameters of the left and upper neighboring blocks is set as the predicted quantization parameter (S608). . On the other hand, when the quantization parameter of the left neighboring block is not positive (No in S607), that is, the quantization parameter of the left neighboring block is 0, and the left neighboring block does not exist. In this case, QPA is used as a predictive quantization parameter (S609). The predicted quantization parameter calculated in this way is supplied to the differential quantization parameter generation unit 111.

[実施例6]
実施例6では、第2の予測量子化パラメータ導出部304及び205の動作について説明する。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を304から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。第2の予測量子化パラメータ導出部304は、予測画像生成部108で符号化ブロックの予測モードがイントラ予測を選択した場合に、イントラ予測で参照する近接ブロックの画素の方向を示すイントラ予測モードに基づいて、予測量子化パラメータを選択或いは導出する。
[Example 6]
In the sixth embodiment, operations of the second prediction quantization parameter derivation units 304 and 205 will be described. Although the encoding process will be described here, in the case of the decoding process, the encoding is decoding, and the prediction quantization parameter derivation unit is replaced with codes 304 to 205, and the encoding information storage memory is replaced with codes 302 to 204. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. The second predictive quantization parameter deriving unit 304 switches to the intra prediction mode indicating the pixel direction of the neighboring block referred to in the intra prediction when the prediction mode of the encoded block is selected by the predicted image generation unit 108 as the prediction mode of the encoded block. Based on this, a prediction quantization parameter is selected or derived.

図27は、符号化ブロックの予測モードがイントラ予測の場合に、イントラ予測モードの予測方向と予測量子化パラメータとして選択する左及び上の近接ブロックとの関係を示す図である。イントラ予測では、イントラ予測モードが示す予測方向の近接ブロックの画素から予測信号を生成して、符号化効率が高く、歪量の少ないイントラ予測モードが選択される。その為、イントラ予測モードが上側を選択する場合は上の近接ブロックとの相関性が高く、イントラ予測モードが左側を選択する場合は左の近接ブロックとの相関性が高いと判断される。ブロック間の相関性が高い方が、ブロック内の絵柄や複雑度合い(アクティビティ)が似ており、アクティビティから算出される量子化パラメータも近い値になる。そこで、本実施例6では、符号化ブロックの量子化パラメータの高効率で符号化、伝送する為に、符号化ブロックと相関性が高い近接ブロックをイントラ予測モードで予測判定し、判定された近接ブロックの量子化パラメータを予測量子化パラメータとして選択する。   FIG. 27 is a diagram illustrating a relationship between the prediction direction of the intra prediction mode and the left and upper neighboring blocks selected as the prediction quantization parameter when the prediction mode of the encoded block is intra prediction. In intra prediction, a prediction signal is generated from pixels in adjacent blocks in the prediction direction indicated by the intra prediction mode, and an intra prediction mode with high coding efficiency and low distortion is selected. Therefore, when the intra prediction mode selects the upper side, it is determined that the correlation with the upper neighboring block is high, and when the intra prediction mode selects the left side, the correlation with the left neighboring block is high. The higher the correlation between blocks, the more similar the pattern and the degree of complexity (activity) in the blocks, and the closer the quantization parameter calculated from the activity is. Therefore, in the sixth embodiment, in order to encode and transmit the quantization parameter of the coding block with high efficiency, a proximity block having high correlation with the coding block is predicted and determined in the intra prediction mode, and the determined proximity is determined. A block quantization parameter is selected as a predictive quantization parameter.

図28は実施例6における第2の予測量子化パラメータ導出部304の動作を示すフローチャートである。実施例6では、符号化ブロックが上のツリーブロックと近接する場合に、上のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止するが、左に近接するツリーブロックの符号化済みブロックの量子化パラメータを予測に使用することとする。   FIG. 28 is a flowchart illustrating the operation of the second predictive quantization parameter deriving unit 304 in the sixth embodiment. In the sixth embodiment, when the encoded block is close to the upper tree block, the quantization parameter of the encoded block in the upper tree block is prohibited from being used for prediction, but the tree close to the left is used. The quantization parameter of the encoded block of the block is used for prediction.

まず、符号化対象の符号化ブロックの位置情報が取得される(S700)。符号化ブロックの位置情報は、画面の左上を基点として、符号化ブロックを含むツリーブロックの左上の位置が求められ、更にツリーブロックの左上の位置から符号化ブロックの位置が求められる。次に符号化ブロックが上のツリーブロックと近接しているか否かが判定される(S701)。   First, position information of a coding block to be coded is acquired (S700). As the position information of the encoded block, the upper left position of the tree block including the encoded block is obtained from the upper left corner of the screen, and the position of the encoded block is obtained from the upper left position of the tree block. Next, it is determined whether or not the encoded block is close to the upper tree block (S701).

符号化ブロックが上のツリーブロックと近接している場合(S701のYes)、即ち符号化ブロックがツリーブロックの上端に位置している場合は上の近接ブロックが上のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に上の近接ブロックを使用しない。ここで、量子化パラメータは常に正値をとることに着目して、上の近接ブロックを使用しない場合、上の近接ブロックの量子化パラメータQPAを0に設定する(S702)。   If the encoded block is close to the upper tree block (Yes in S701), that is, if the encoded block is located at the upper end of the tree block, the upper adjacent block is included in the upper tree block. Therefore, the tree block boundary is crossed, so the upper neighboring block is not used for the quantization parameter prediction. Here, focusing on the fact that the quantization parameter always takes a positive value, when the upper neighboring block is not used, the quantization parameter QPA of the upper neighboring block is set to 0 (S702).

一方、符号化ブロックが上のツリーブロックと近接していない場合(S701のNo)、即ち上の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの上に近接する既符号化済みのブロックの量子化パラメータQPAを取得する(S703)。この時、符号化ブロックの左上の基準位置情報に基づいて、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する周囲の符号化済みブロックの量子化パラメータが予測量子化パラメータ導出部114内部のメモリ302に供給され、メモリ302から上の近接ブロックの量子化パラメータを取得する。   On the other hand, if the encoded block is not close to the upper tree block (No in S701), that is, if the upper adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPA of the already-encoded block close to the quantization block is acquired (S703). At this time, the storage area stored in the encoded information storage memory 113 is accessed based on the reference position information at the upper left of the encoded block, and the quantization parameter of the corresponding surrounding encoded block is the predicted quantization parameter. This is supplied to the memory 302 inside the deriving unit 114, and the quantization parameter of the upper neighboring block is acquired from the memory 302.

続いて、符号化ブロックの左に近接する符号化済みブロックが存在するか否かを判定する(S704)。左に近接ブロックが存在する場合(S704のYes)、メモリ302から符号化ブロックの左に近接する符号化済みのブロックの量子化パラメータQPLを取得する(S705)。左の近接ブロックが存在しない場合(S704のNo)、左の近接ブロックの量子化パラメータQPLを0に設定する(S706)。   Subsequently, it is determined whether there is an encoded block adjacent to the left of the encoded block (S704). When the adjacent block exists on the left (Yes in S704), the quantization parameter QPL of the encoded block adjacent to the left of the encoded block is acquired from the memory 302 (S705). If the left adjacent block does not exist (No in S704), the quantization parameter QPL of the left adjacent block is set to 0 (S706).

次に、左及び上の近接ブロックの量子化パラメータがともに正であるか否かを判定する(S707)。左及び上の近接ブロックの量子化パラメータがともに正の場合(S707のYes)、左及び上の両方の近接ブロックが存在する。その為、イントラ予測モードで示される予測方向で指定される近接ブロックを参照し、その量子化パラメータを取得することが可能であるので、この場合はイントラ予測モードで示される予測方向に基づく予測判定を行う。   Next, it is determined whether the quantization parameters of the left and upper neighboring blocks are both positive (S707). When the quantization parameters of the left and top neighboring blocks are both positive (Yes in S707), both the left and top neighboring blocks exist. Therefore, it is possible to obtain the quantization parameter by referring to the adjacent block specified in the prediction direction indicated in the intra prediction mode. In this case, the prediction determination based on the prediction direction indicated in the intra prediction mode I do.

一方、左及び上の近接ブロックの量子化パラメータがともに正でない場合(S707のNo)、即ち少なくとも左或いは上のどちらか一方の近接ブロックの量子化パラメータが0であり、少なくとも左或いは上のどちらか一方の近接ブロックが存在しないことになる。その為、イントラ予測モードで示される予測方向で指定される近接ブロックが存在しないことも有り得るので、この場合はイントラ予測モードで示される予測方向に基づく予測判定を行わず、左或いは上の近接ブロックの存在有無、即ち左或いは上の近接ブロックの量子化パラメータが0であるか否かにより判定を行う。最初に上の近接ブロックの量子化パラメータが0であるか否かを判定する(S710)。上の近接ブロックの量子化パラメータが0でない場合(S710のNo)、上の近接ブロックの量子化パラメータを予測量子化パラメータとする(S711)。一方、0である場合(S710のYes)、予測量子化パラメータとして上の近接ブロックの量子化パラメータを参照出来ないので、S712の判定に進む。次に、左の近接ブロックの量子化パラメータが0であるか否かの判定する(S712)。左の近接ブロックの量子化パラメータが0でない場合(S712のNo)、左の近接ブロックの量子化パラメータを予測量子化パラメータとする(S713)。一方、0である場合(S712のYes)、即ち、左及び上の近接ブロックの量子化パラメータがともに0であり、両方ともに存在しないので、予測量子化パラメータとして左及び上の近接ブロックの量子化パラメータを参照出来ない。そこで、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする。尚、画像の左上端のブロックが符号化ブロックである場合は、左と上の近接ブロック、更に符号化対象の符号化ブロックより前、ないし直前に符号化したブロックが存在しないので、ピクチャ或いはスライスの量子化パラメータを予測量子化パラメータとする(S714)。   On the other hand, if the quantization parameter of the left and upper neighboring blocks is not positive (No in S707), that is, the quantization parameter of at least either the left or upper neighboring block is 0, and at least either the left or upper One of the adjacent blocks does not exist. Therefore, there may be no adjacent block specified in the prediction direction indicated in the intra prediction mode. In this case, the prediction block based on the prediction direction indicated in the intra prediction mode is not performed, and the adjacent block on the left or above Is determined based on the presence or absence of the data, that is, whether the quantization parameter of the adjacent block on the left or above is 0. First, it is determined whether the quantization parameter of the upper neighboring block is 0 (S710). When the quantization parameter of the upper neighboring block is not 0 (No in S710), the quantization parameter of the upper neighboring block is set as a predicted quantization parameter (S711). On the other hand, if it is 0 (Yes in S710), the quantization parameter of the above adjacent block cannot be referred to as the predicted quantization parameter, and thus the process proceeds to S712. Next, it is determined whether or not the quantization parameter of the left adjacent block is 0 (S712). If the quantization parameter of the left neighboring block is not 0 (No in S712), the quantization parameter of the left neighboring block is set as the predicted quantization parameter (S713). On the other hand, if it is 0 (Yes in S712), that is, the quantization parameters of the left and upper neighboring blocks are both 0, and neither exists, the quantization of the left and upper neighboring blocks as the predicted quantization parameter The parameter cannot be referenced. Therefore, the quantization parameter (prevQP) of the block encoded before or immediately before the encoding block to be encoded is set as the predicted quantization parameter. If the block at the upper left corner of the image is an encoded block, there is no block encoded before and immediately before the encoding block to be encoded, and the adjacent block on the left and upper, so a picture or slice Is set as a predicted quantization parameter (S714).

S707の判定に戻って、左及び上の近接ブロックの量子化パラメータがともに正の場合(S707のYes)は、メモリ302から符号化ブロックのイントラ予測モードintraPredModeを取得する。イントラ予測モードも周囲の符号化済みブロックの量子化パラメータの取得と同様に、符号化ブロックの左上の基準位置情報に基づいて、符号化情報格納メモリ113に格納された記憶領域をアクセスして、メモリ302に供給され、メモリ302から取得する。   Returning to the determination in S707, if the quantization parameters of the left and upper neighboring blocks are both positive (Yes in S707), the intra prediction mode intraPredMode of the encoded block is acquired from the memory 302. Similarly to the acquisition of the quantization parameter of the surrounding encoded block, the intra prediction mode accesses the storage area stored in the encoded information storage memory 113 based on the reference position information at the upper left of the encoded block, The data is supplied to the memory 302 and acquired from the memory 302.

イントラ予測モードは図27で示される予測方向に対して割り当てられた番号である。以下の判定処理を容易にする為に、イントラ予測モードを図29に示される変換テーブルを用いてイントラ予測方向(以下、intraPredDirecと称す)に変換する。イントラ予測方向は、intraPredDirec=0をイントラ予測における周囲の復号済みのブロックから平均値を算出することにより予測する平均値予測(intraPredMode=2)に割り当て、それ以外の1〜33を図30で示されるイントラ予測モードの予測方向の右上(intraPredMode=6)から左下(intraPredMode=9)に向けて対応付けるようにして割り当てられる。この変換テーブルにより、取得したイントラ予測モードをイントラ予測方向に変換する(S708)。変換されたイントラ予測方向に基づき量子化パラメータの予測を行う(S709)。図30で示されるイントラ予測モードの予測方向の閾値としてTHが設定され、ここではTHをイントラ予測方向の値で18に設定することとし、イントラ予測方向が18未満であれば上の近接ブロックの量子化パラメータ、18以上であれば左の近接ブロックの量子化パラメータを予測量子化パラメータとして導出することとする。   The intra prediction mode is a number assigned to the prediction direction shown in FIG. In order to facilitate the following determination processing, the intra prediction mode is converted into an intra prediction direction (hereinafter referred to as intraPredDirec) using the conversion table shown in FIG. As intra prediction directions, intraPredDirec = 0 is assigned to average value prediction (intraPredMode = 2) that is predicted by calculating an average value from surrounding decoded blocks in intra prediction, and other 1-33 are shown in FIG. Assigned in such a manner as to correspond from the upper right (intraPredMode = 6) to the lower left (intraPredMode = 9) of the prediction direction of the intra prediction mode. With this conversion table, the acquired intra prediction mode is converted into the intra prediction direction (S708). The quantization parameter is predicted based on the converted intra prediction direction (S709). 30 is set as the threshold value of the prediction direction of the intra prediction mode shown in FIG. 30. Here, TH is set to 18 as the value of the intra prediction direction. If the quantization parameter is 18 or more, the quantization parameter of the left neighboring block is derived as the predicted quantization parameter.

図31を用いて、イントラ予測方向による量子化パラメータの予測の詳細な動作を説明する。最初に、変換されたイントラ予測方向が0であるか否かを判定する(S720)。イントラ予測方向が0となるのは平均値予測によるイントラ予測が行われる場合である(S720のYes)である。この場合、左或いは上の近接ブロックのどちらか一方を優先して選択せず、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとする(S721)。一方、イントラ予測方向が0でない場合(S720のNo)、イントラ予測方向が18未満が否かを判定する(S722)。イントラ予測方向が18未満となる場合(S722のYes)、図27で示されるように上の近接ブロックの参照することとし、上の近接ブロックの量子化パラメータQPAを予測量子化パラメータとする(S723)。一方、イントラ予測方向が18以上である場合(S722のNo)、左の近接ブロックの参照することとし、左の近接ブロックの量子化パラメータQPLを予測量子化パラメータとする(S724)。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   The detailed operation of predicting the quantization parameter based on the intra prediction direction will be described with reference to FIG. First, it is determined whether or not the converted intra prediction direction is 0 (S720). The intra prediction direction becomes 0 when intra prediction based on average value prediction is performed (Yes in S720). In this case, either the left or the upper neighboring block is not preferentially selected, and the average value of the quantization parameters QPL and QPA of the left and upper neighboring blocks is set as the predicted quantization parameter (S721). On the other hand, when the intra prediction direction is not 0 (No in S720), it is determined whether the intra prediction direction is less than 18 (S722). When the intra prediction direction is less than 18 (Yes in S722), the upper neighboring block is referred to as shown in FIG. 27, and the quantization parameter QPA of the upper neighboring block is used as the predicted quantization parameter (S723). ). On the other hand, when the intra prediction direction is 18 or more (No in S722), the left neighboring block is referred to, and the quantization parameter QPL of the left neighboring block is used as the predicted quantization parameter (S724). The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

以上のように、実施例6における第2の予測量子化パラメータ導出部304では、図30で示されるイントラ予測モードの予測方向の判定に基づいて、左或いは上の近接ブロックの量子化パラメータを予測量子化パラメータとして導出したが、左及び上の近接ブロックの量子化パラメータに重み付けを行い、導出される重み付け平均値を予測量子化パラメータとすることも可能である。   As described above, the second prediction quantization parameter derivation unit 304 in the sixth embodiment predicts the quantization parameter of the left or upper neighboring block based on the determination of the prediction direction of the intra prediction mode shown in FIG. Although derived as the quantization parameter, it is also possible to weight the quantization parameter of the adjacent block on the left and the upper and use the derived weighted average value as the predicted quantization parameter.

上の近接ブロックの量子化パラメータの重み付け係数FA、左の近接ブロックの量子化パラメータの重み付け係数FLとすると、図32で示されるイントラ予測モードの予測方向に対して、閾値としてTH(=18)を設定し、イントラ予測方向が18未満であればFA>FLとなるように上の近接ブロックの量子化パラメータに対して重み付けを大きく設定し、18以上であればFA<FLとなるように左の近接ブロックの量子化パラメータに対して重み付けを大きく設定する。   Assuming that the weighting factor FA of the quantization parameter of the upper neighboring block and the weighting factor FL of the quantization parameter of the left neighboring block are given as threshold values for the prediction direction of the intra prediction mode shown in FIG. 32, TH (= 18) If the intra prediction direction is less than 18, the weighting is set to be large for the quantization parameter of the above adjacent block so that FA> FL, and if it is 18 or more, the left is set so that FA <FL. A large weight is set for the quantization parameter of the adjacent block.

図33は第2の予測量子化パラメータ導出部304の動作を示すフローチャートである図28のイントラ予測方向による量子化パラメータの予測(S709)の詳細な動作を説明する図である。   FIG. 33 is a flowchart illustrating the operation of the second prediction quantization parameter deriving unit 304 and is a diagram for explaining the detailed operation of quantization parameter prediction (S709) in the intra prediction direction of FIG.

最初に、変換されたイントラ予測方向が0であるか否かを判定する(S730)。イントラ予測方向が0となるのは平均値予測によるイントラ予測が行われる場合である(S730のYes)である。この場合、左或いは上の近接ブロックのどちらか一方を優先して選択せず、左及び上の近接ブロックの量子化パラメータの重み付き係数FLとFAを同じ値に設定する(S731)。例えば、FA=FL=2に設定する。一方、イントラ予測方向が0でない場合(S730のNo)、イントラ予測方向が18未満が否かを判定する(S732)。イントラ予測方向が18未満となる場合(S732のYes)、FA>FLとなるように上の近接ブロックの量子化パラメータに対して重み付けを大きく設定する(S733)。例えば、FAを3、FLを1に設定する。一方、イントラ予測方向が18以上である場合(S732のNo)、FA<FLとなるように左の近接ブロックの量子化パラメータに対して重み付けを大きく設定する(S734)。例えば、FAを1、FLを3に設定する。   First, it is determined whether or not the converted intra prediction direction is 0 (S730). The intra prediction direction is 0 when intra prediction based on average value prediction is performed (Yes in S730). In this case, either the left or the upper neighboring block is not preferentially selected, and the weighted coefficients FL and FA of the left and upper neighboring blocks are set to the same value (S731). For example, FA = FL = 2 is set. On the other hand, when the intra prediction direction is not 0 (No in S730), it is determined whether the intra prediction direction is less than 18 (S732). When the intra prediction direction is less than 18 (Yes in S732), a large weight is set for the quantization parameter of the upper neighboring block so that FA> FL (S733). For example, FA is set to 3 and FL is set to 1. On the other hand, when the intra prediction direction is 18 or more (No in S732), a large weight is set for the quantization parameter of the left neighboring block so that FA <FL (S734). For example, FA is set to 1 and FL is set to 3.

以上のようにして、決定した重み付け係数からと各量子化パラメータから次式にて予測量子化パラメータpredQPを導出する(S735)。   As described above, the predicted quantization parameter predQP is derived from the determined weighting coefficient and each quantization parameter by the following equation (S735).

Figure 2013150318
Figure 2013150318

ここで、上式の分母はFA+FLであり、分子の2は四捨五入の為に加算される(FA+FL)/2の値である。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   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. The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

尚、ここでは重み付け係数FA及びFLの係数の組合せとして、(FA,FL)=(3,1)、(2,2)、(1,3)としたが、これ以外の係数を設定してもよい。但し、計算の高速化を重視する場合、FA+FLが2の冪乗で表される変数を選択することが望ましい。上述した予測量子化パラメータの導出式をビットシフト演算で行うと次式で表される。   Here, (FA, FL) = (3, 1), (2, 2), (1, 3) 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. When the above-described predictive quantization parameter derivation formula is performed by a bit shift operation, it is expressed by the following formula.

Figure 2013150318
Figure 2013150318

また、重み付け係数FA及びFLの係数の組合せとして、(FA,FL)=(3,1)を(FA,FL)=(4,0)、(FA,FL)=(1,3)を(FA,FL)=(0,4)とすると、前者では上の近接ブロック、後者では左の近接ブロックとなり、これは実施例6と同じ結果となる。但し、実施例6では、QPAとQPLの平均値を算出する場合のみ計算処理を行い、平均値を予測量子化パラメータとしない場合は左或いは上の近接ブロックの量子化パラメータを選択するだけで済む為、処理の簡略化と高速化を実現することが可能となる。   Further, as a combination of the coefficients of the weighting coefficients FA and FL, (FA, FL) = (3, 1) is set to (FA, FL) = (4, 0), (FA, FL) = (1, 3) is set to ( If FA, FL) = (0, 4), the former is the upper adjacent block, and the latter is the left adjacent block. This is the same result as in the sixth embodiment. However, in the sixth embodiment, calculation processing is performed only when the average value of QPA and QPL is calculated, and when the average value is not used as the prediction quantization parameter, it is only necessary to select the quantization parameter of the adjacent block on the left or the upper side. Therefore, it is possible to realize simplification and speeding up of processing.

尚、実施例6では、左或いは上の近接ブロックの量子化パラメータの参照判定として、イントラ予測方向の閾値THを18としたが、この値でなくてもよく、動画像符号化装置100及び動画像復号装置200で矛盾が生じない限り、暗黙的に設定出来るものとする。また、ヘッダー情報にイントラ予測方向の閾値を設定して、シーケンス、ピクチャ、スライス等の単位で変更してもよい。   In the sixth embodiment, the threshold TH of the intra prediction direction is set to 18 as the reference determination of the quantization parameter of the adjacent block on the left or the upper side. However, the threshold TH may not be this value. As long as there is no contradiction in the image decoding apparatus 200, it can be set implicitly. In addition, a threshold value for the intra prediction direction may be set in the header information, and may be changed in units such as a sequence, a picture, and a slice.

更に、イントラ予測モードの予測方向の閾値数を増やして、閾値で区切られるイントラ予測モードの予測方向の領域の範囲毎に左及び上の近接ブロックの量子化パラメータの重み付け係数を変更して設定するようにしてもよい。   Further, the number of thresholds in the prediction direction of the intra prediction mode is increased, and the weighting coefficients of the quantization parameters of the left and upper neighboring blocks are changed and set for each range of the prediction direction region of the intra prediction mode divided by the threshold. You may do it.

図34はイントラ予測モードの予測方向を閾値THLO及びTHHIにより3つの領域に分割した一例を示す図である。閾値THLO及びTHHIは図34中に太点線で示され、閾値にて区切られた領域の範囲内で同じ重み付け係数に設定される。THLOよりも右側にあるイントラ予測モードでは、主に符号化ブロックの上に近接している符号化済みブロックの画素信号を用いてイントラ予測を行うので、上の近接ブロックとの相関性が高い。一方、THHIから下側にあるイントラ予測モードでは、主に符号化ブロックの左に近接している符号化済みブロックの画素信号を用いてイントラ予測を行うので、左の近接ブロックとの相関性が高い。その為、イントラ予測モードがTHLOより右側にある場合は上の近接ブロックの量子化パラメータに対して重み付けを大きくし(FA>FL)、THHIから下側にある場合は左の近接ブロックの量子化パラメータに対して重み付けを大きくする(FA<FL)。また、THLOからTHHIの間にあるイントラ予測モードでは、符号化ブロックの左及び上に近接している符号化済みブロックの一方に偏らないので、左と上の近接ブロックの量子化パラメータに対する重み付けを均等にする(FA=FL)。尚、閾値THLO及びTHHIはイントラ予測方向の値であり、実施例6ではTHLOを13、THHIを22とする。   FIG. 34 is a diagram illustrating an example in which the prediction direction in the intra prediction mode is divided into three regions by threshold values THLO and THHI. The threshold values THLO and THHI are indicated by thick dotted lines in FIG. 34, and are set to the same weighting coefficient within the range of the region delimited by the threshold values. In the intra prediction mode on the right side of THLO, intra prediction is performed mainly using the pixel signal of the encoded block that is close to the encoded block, and therefore, the correlation with the adjacent block above is high. On the other hand, in the intra prediction mode below THHI, intra prediction is performed mainly using the pixel signal of the encoded block that is close to the left of the encoded block, so the correlation with the left adjacent block is high. high. Therefore, when the intra prediction mode is on the right side of THLO, the quantization parameter of the upper neighboring block is increased in weight (FA> FL), and when it is below THHI, the quantization of the left neighboring block is performed. Increase the weight for the parameter (FA <FL). In addition, in the intra prediction mode between THLO and THHI, since it is not biased to one of the encoded blocks that are close to the left and the top of the encoded block, the quantization parameter of the adjacent block on the left and the top is weighted. Equalize (FA = FL). The threshold values THLO and THHI are values in the intra prediction direction. In the sixth embodiment, THLO is 13 and THHI is 22.

図35は第2の予測量子化パラメータ導出部304の動作を示すフローチャートである図28のイントラ予測方向による量子化パラメータの予測(S709)の詳細な動作を説明する図である。   FIG. 35 is a flowchart illustrating the operation of the second predictive quantization parameter deriving unit 304 and explains the detailed operation of the prediction of the quantization parameter (S709) in the intra prediction direction of FIG.

最初に、変換されたイントラ予測方向が0であるか否かを判定する(S740)。イントラ予測方向が0となるのは平均値予測によるイントラ予測が行われる場合である(S740のYes)である。この場合、左或いは上の近接ブロックのどちらか一方を優先して選択せず、左及び上の近接ブロックの量子化パラメータの重み付き係数FLとFAを同じ値に設定する(S741)。例えば、FA=FL=2に設定する。一方、イントラ予測方向が0でない場合(S740のNo)、最初に、イントラ予測方向が閾値THLO未満か否かが判定される(S742)。イントラ予測方向がTHLO未満である場合(S742のYes)、FA>FLとなるように上の近接ブロックの量子化パラメータに対して重み付けを大きく設定する(S743)。例えば、FAを3、FLを1に設定する。イントラ予測方向がTHLO以上である場合(S742のNo)、イントラ予測方向が閾値THHI未満か否かが判定される(S744)。イントラ予測方向がTHHI未満でない、即ちTHHI以上である場合(S744のNo)、FA<FLとなるように左の近接ブロックの量子化パラメータに対して重み付けを大きく設定する(S745)。例えば、FAを1、FLを3に設定する。イントラ予測方向がTHHI未満である場合(S744のYes)、左と上の近接ブロックの量子化パラメータに対する重み付けを均等化するので、S741に進む。   First, it is determined whether or not the converted intra prediction direction is 0 (S740). The intra prediction direction is 0 when intra prediction based on average value prediction is performed (Yes in S740). In this case, either the left or the upper neighboring block is not selected with priority, and the weighted coefficients FL and FA of the left and upper neighboring blocks are set to the same value (S741). For example, FA = FL = 2 is set. On the other hand, when the intra prediction direction is not 0 (No in S740), first, it is determined whether or not the intra prediction direction is less than a threshold value THLO (S742). When the intra prediction direction is less than THLO (Yes in S742), a large weight is set for the quantization parameter of the upper neighboring block so that FA> FL (S743). For example, FA is set to 3 and FL is set to 1. If the intra prediction direction is greater than or equal to THLO (No in S742), it is determined whether or not the intra prediction direction is less than a threshold value THHI (S744). If the intra prediction direction is not less than THHI, that is, is greater than or equal to THHI (No in S744), a large weight is set for the quantization parameter of the left adjacent block so that FA <FL (S745). For example, FA is set to 1 and FL is set to 3. If the intra prediction direction is less than THHI (Yes in S744), the weighting for the quantization parameters of the left and upper neighboring blocks is equalized, so the process proceeds to S741.

以上のようにして、決定した重み付け係数からと各量子化パラメータから次式にて予測量子化パラメータpredQPを導出する(S746)。   As described above, the predicted quantization parameter predQP is derived from the determined weighting coefficient and each quantization parameter by the following equation (S746).

Figure 2013150318
Figure 2013150318

ここで、上式の分母はFA+FLであり、分子の2は四捨五入の為に加算される(FA+FL)/2の値である。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   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. The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

尚、ここでは重み付け係数FA及びFLの係数の組合せとして、(FA,FL)=(3,1)、(2,2)、(1,3)としたが、これ以外の係数を設定してもよい。但し、計算の高速化を重視する場合、FA+FLが2の冪乗で表される変数を選択することが望ましい。上述した予測量子化パラメータの導出式をビットシフト演算で行うと次式で表される。   Here, (FA, FL) = (3, 1), (2, 2), (1, 3) 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. When the above-described predictive quantization parameter derivation formula is performed by a bit shift operation, it is expressed by the following formula.

Figure 2013150318
Figure 2013150318

上述した重み付け係数FA及びFLの係数の組合せとして、(FA,FL)=(3,1)を(FA,FL)=(4,0)、(FA,FL)=(1,3)を(FA,FL)=(0,4)とすると、前者では上の近接ブロック、後者では左の近接ブロックとなる。この場合、THLOからTHHIの間にあるイントラ予測モードの予測方向でQPAとQPLの平均値を算出する計算処理を行い、それ以外の平均値を予測量子化パラメータとしない場合は左或いは上の近接ブロックの量子化パラメータを選択するだけで実現出来る。その為、処理の簡略化と高速化が可能となる。   As combinations of the weighting coefficients FA and FL described above, (FA, FL) = (3, 1) is set to (FA, FL) = (4, 0), (FA, FL) = (1, 3) is set to ( If FA, FL) = (0, 4), the former is the upper adjacent block, and the latter is the left adjacent block. In this case, calculation processing is performed to calculate the average value of QPA and QPL in the prediction direction of the intra prediction mode between THLO and THHI, and if the other average values are not used as the prediction quantization parameter, the left or upper proximity This can be realized simply by selecting the quantization parameter of the block. As a result, the processing can be simplified and speeded up.

また、実施例6では、閾値THLO及びTHHIの値をそれぞれイントラ予測方向の値で13、22としたが、これらの値でなくてもよく、動画像符号化装置100及び動画像復号装置200で矛盾が生じない限り、暗黙的に設定出来るものとする。   In the sixth embodiment, the values of the thresholds THLO and THHI are set to 13 and 22 in the intra prediction direction, respectively. However, these values may not be used, and the moving picture coding apparatus 100 and the moving picture decoding apparatus 200 may be different. As long as no contradiction arises, it can be set implicitly.

更に、実施例6では、閾値THLO及びTHHIにて、イントラ予測モードの予測方向を3つの領域に分割したが、閾値の数を増やして、分割数を増やしてもよい。但し、各領域で設定される重み付け係数FA及びFLの係数は、計算の高速化を重視する場合、FA+FLが2の冪乗で表される変数を選択することが望ましい。   Furthermore, in the sixth embodiment, the prediction direction of the intra prediction mode is divided into three regions using the threshold values THLO and THHI. However, the number of divisions may be increased by increasing the number of threshold values. However, as the weighting coefficients FA and FL set in each region, it is desirable to select a variable in which FA + FL is expressed as a power of 2 when importance is placed on speeding up the calculation.

尚、実施例6では、符号化ブロックが上のツリーブロックと近接する場合に、上のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止するが、左に近接するツリーブロックの符号化済みブロックの量子化パラメータを予測に使用することとして説明したが、上に加え左のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止する場合でも適用出来る。この場合、S701〜S703の上のツリーブロックの近接判定を上から左に、QPAをQPLに変更したものをS704〜S706の判定分岐に入れ換えるだけで実現出来る。   In the sixth embodiment, when the encoded block is close to the upper tree block, it is prohibited to use the quantization parameter of the encoded block in the upper tree block for prediction, but it is close to the left. In the above description, the quantization parameter of the encoded block of the tree block to be used is used for prediction, but the quantization parameter of the encoded block in the left tree block in addition to the above is prohibited from being used for prediction. Even if applicable. In this case, the proximity determination of the tree block above S701 to S703 can be realized only from the top to the left, and by replacing the QPA changed to QPL with the determination branch of S704 to S706.

[実施例7]
実施例7における第2の予測量子化パラメータ導出部304及び205の動作について説明する。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を304から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。実施例7では、実施例6と同様に、符号化ブロックに近接する左と上の符号化済みブロックの量子化パラメータを予測に使用する。一方、実施例6との相違は、符号化ブロックが上のツリーブロックと近接する場合と同様に、左のツリーブロックと近接する場合に、左のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止する点である。これは、符号化ブロックの量子化パラメータの算出が符号化制御の符号化処理順に基づいて行われるので、ツリーブロック内部に比べてツリーブロック間では符号化処理順が符号化ブロック間で離れてしまい、ツリーブロック間で符号化ブロックが近接していたとしても、符号量制御で算出される符号化ブロックの量子化パラメータが必ずしも近い値にならず、予測量子化パラメータとして適さないことがある為である。そこで、実施例7では、実施例2と同様に、符号化または復号対象の符号化ブロックが左或いは上のツリーブロックと近接する場合には、左或いは上のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用せず、符号化処理順で符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータに置き換えて使用することとする。
[Example 7]
The operation of the second predicted quantization parameter derivation units 304 and 205 in the seventh embodiment will be described. Although the encoding process will be described here, in the case of the decoding process, the encoding is decoding, and the prediction quantization parameter derivation unit is replaced with codes 304 to 205, and the encoding information storage memory is replaced with codes 302 to 204. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. In the seventh embodiment, as in the sixth embodiment, the quantization parameters of the left and upper encoded blocks close to the encoded block are used for prediction. On the other hand, the difference from the sixth embodiment is that when the encoded block is close to the upper tree block, when the encoded block is close to the left tree block, the quantized blocks in the left tree block are quantized. The use of parameters for prediction is prohibited. This is because the quantization parameter of the coding block is calculated based on the coding processing order of the coding control, so that the coding processing order is separated between the coding blocks between the tree blocks as compared to the inside of the tree block. Even if coding blocks are close to each other between the tree blocks, the quantization parameter of the coding block calculated by the code amount control is not necessarily a close value and may not be suitable as a predictive quantization parameter. is there. Therefore, in the seventh embodiment, similarly to the second embodiment, when the encoding block to be encoded or decoded is close to the left or upper tree block, the encoded block in the left or upper tree block is used. The quantization parameter is not used for prediction, but is used in place of the quantization parameter of the block encoded before or immediately before the encoding block to be encoded in the encoding processing order.

図36は、図19で示される分割されたツリーブロック内部の中から、符号化ブロックBLK1の周辺を拡大した図である。図36のBLK1が参照する符号化済みブロックの方向を太矢印で表す。図36中の実細線は符号化処理順を表しており、符号化ブロックは、符号化ブロックを含むツリーブロック内部で近接する符号化済みブロックの量子化パラメータを原則使用する。BLK1は上のツリーブロックと境界を接しているので、上に近接する符号化済みブロックの量子化パラメータを予測に使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)に置き換えて、左に近接する符号化済みブロックの量子化パラメータとともに予測に使用する。ここで、BLK1は予測モードとしてイントラ予測と判定され、イントラ予測モードが23であることとすると、イントラ予測モードの予測方向は図36中の太点線で表される。イントラ予測モードが23の場合、予測方向としては上側になるので、上の近接ブロックを参照するように判定される。しかし、BLK1は上のツリーブロックと境界を接しているので、上の近接ブロックの量子化パラメータを参照出来ず、置き換えた符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを参照することになる。符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータは、実際にイントラ予測モードの予測方向で判定される上の近接ブロックの量子化パラメータとは異なるが、符号化処理順では最も近い量子化パラメータなので、予測量子化パラメータの精度の劣化を極力抑えることが出来る。また、符号化ブロックに近接する左及び上の近接ブロックの量子化パラメータが符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータで置き換えることで、常に左及び上の近接ブロックに非0の量子化パラメータが存在することになり、実施例6のように左及び上の近接ブロックの量子化パラメータが共に存在するか否かで、イントラ予測モードに基づく量子化パラメータの予測と他の処理に切り換える必要が無く、判定分岐も不要となる。その為、実施例6よりも量子化パラメータの予測の判定処理を簡略化することが可能となる。   FIG. 36 is an enlarged view of the periphery of the coding block BLK1 in the divided tree block shown in FIG. The direction of the encoded block referred to by BLK1 in FIG. 36 is represented by a thick arrow. The solid thin line in FIG. 36 represents the encoding processing order, and the encoding block uses in principle the quantization parameter of the encoded block that is close within the tree block including the encoding block. Since BLK1 is bordered by the upper tree block, the quantization parameter of the encoded block adjacent to the upper side is not used for prediction, and the block encoded before or immediately before the encoding block to be encoded is used. Is used for prediction together with the quantization parameter of the coded block adjacent to the left. Here, if BLK1 is determined to be intra prediction as the prediction mode and the intra prediction mode is 23, the prediction direction of the intra prediction mode is represented by a thick dotted line in FIG. When the intra prediction mode is 23, since the prediction direction is on the upper side, it is determined to refer to the upper adjacent block. However, since BLK1 is bounded by the upper tree block, it cannot refer to the quantization parameter of the upper neighboring block, and the quantum of the block encoded before or immediately before the encoding block to be encoded that has been replaced. Refer to the conversion parameter. The quantization parameter of the block coded before or immediately before the coding block to be coded is different from the quantization parameter of the upper neighboring block which is actually determined in the prediction direction of the intra prediction mode. Since the quantization parameter is the closest in the processing order, it is possible to suppress deterioration in accuracy of the predicted quantization parameter as much as possible. In addition, by replacing the quantization parameters of the adjacent blocks on the left and top adjacent to the coding block with the quantization parameters of the block coded before or just before the coding block to be coded, the left and top are always changed. The non-zero quantization parameter exists in the adjacent block, and the quantization parameter based on the intra prediction mode depends on whether the left and upper adjacent block quantization parameters exist as in the sixth embodiment. There is no need to switch between prediction and other processing, and no decision branch is required. Therefore, the quantization parameter prediction determination process can be simplified as compared with the sixth embodiment.

図37は実施例7における第2の予測量子化パラメータ導出部304の動作を示すフローチャートである。   FIG. 37 is a flowchart showing the operation of the second predictive quantization parameter deriving unit 304 in the seventh embodiment.

まず、符号化対象の符号化ブロックの位置情報が取得される(S800)。符号化ブロックの位置情報は、画面の左上を基点として、符号化ブロックを含むツリーブロックの左上の位置が求められ、更にツリーブロックの左上の位置から符号化ブロックの位置が求められる。次に符号化ブロックが上のツリーブロックと近接しているか否かが判定される(S801)。符号化ブロックが上のツリーブロックと近接している場合(S801のYes)、即ち符号化ブロックがツリーブロックの上端に位置している場合は上の近接ブロックが上のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に上の近接ブロックを使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化した符号化ブロックの量子化パラメータprevQPをQPAに設定する(S802)。一方、符号化ブロックが上のツリーブロックと近接していない場合(S801のNo)、即ち上の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの上に近接する既符号化済みのブロックの量子化パラメータQPAを取得する(S803)。この時、符号化ブロックの左上の基準位置情報に基づいて、符号化情報格納メモリ113に格納された記憶領域をアクセスして、該当する周囲の符号化済みブロックの量子化パラメータが予測量子化パラメータ導出部114内部のメモリ302に供給され、メモリ302の中から上の近接ブロックの量子化パラメータを取得する。   First, the position information of the encoding block to be encoded is acquired (S800). As the position information of the encoded block, the upper left position of the tree block including the encoded block is obtained from the upper left corner of the screen, and the position of the encoded block is obtained from the upper left position of the tree block. Next, it is determined whether or not the encoded block is close to the upper tree block (S801). If the encoded block is close to the upper tree block (Yes in S801), that is, if the encoded block is located at the upper end of the tree block, the upper adjacent block is included in the upper tree block. Therefore, since the tree block boundary is exceeded, the quantization block prevQP of the coding block coded before or just before the coding block to be coded is used without using the upper neighboring block for the quantization parameter prediction. QPA is set (S802). On the other hand, if the encoded block is not close to the upper tree block (No in S801), that is, if the upper adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPA of the already-encoded block adjacent on the quantization block is acquired (S803). At this time, the storage area stored in the encoded information storage memory 113 is accessed based on the reference position information at the upper left of the encoded block, and the quantization parameter of the corresponding surrounding encoded block is the predicted quantization parameter. It is supplied to the memory 302 inside the deriving unit 114, and the quantization parameter of the upper neighboring block is acquired from the memory 302.

続いて、符号化ブロックが左のツリーブロックと近接しているか否かが判定される(S804)。符号化ブロックが左のツリーブロックと近接している場合(S804のYes)、即ち符号化ブロックがツリーブロックの左端に位置している場合は左の近接ブロックが左のツリーブロックの中に含まれる為、ツリーブロック境界を越えてしまうので、量子化パラメータ予測に左の近接ブロックを使用せず、符号化対象の符号化ブロックより前、ないし直前に符号化した符号化ブロックの量子化パラメータprevQPをQPLに設定する(S805)。一方、符号化ブロックが左のツリーブロックと近接していない場合(S804のNo)、即ち左の近接ブロックが符号化ブロックと同一のツリーブロックの中に位置している場合は、メモリ302から符号化ブロックの左に近接する既符号化済みのブロックの量子化パラメータQPLを取得する(S806)。   Subsequently, it is determined whether or not the encoded block is close to the left tree block (S804). If the encoded block is close to the left tree block (Yes in S804), that is, if the encoded block is located at the left end of the tree block, the left adjacent block is included in the left tree block. Therefore, the tree block boundary is crossed, so that the left neighboring block is not used for the quantization parameter prediction, and the quantization parameter prevQP of the coding block coded before or just before the coding block to be coded is set. QPL is set (S805). On the other hand, if the encoded block is not adjacent to the left tree block (No in S804), that is, if the left adjacent block is located in the same tree block as the encoded block, the code is read from the memory 302. The quantization parameter QPL of the already-encoded block adjacent to the left of the quantization block is acquired (S806).

次に、メモリ302から符号化ブロックのイントラ予測モードintraPredModeを取得し、イントラ予測方向intraPredDirecに変換する(S807)。イントラ予測方向への変換は実施例6と同様なので、説明は割愛する。変換されたイントラ予測方向に基づき量子化パラメータの予測を行う(S808)。ここでは、実施例6と同様に、図30で示されるイントラ予測モードの予測方向の閾値THをイントラ予測方向の値で18に設定することとし、イントラ予測方向が18未満であれば上の近接ブロックの量子化パラメータ、18以上であれば左の近接ブロックの量子化パラメータを予測量子化パラメータとして導出することとする。   Next, the intra prediction mode intraPredMode of the encoded block is acquired from the memory 302 and converted into the intra prediction direction intraPredDirec (S807). Since the conversion to the intra prediction direction is the same as in the sixth embodiment, the description is omitted. The quantization parameter is predicted based on the converted intra prediction direction (S808). Here, as in the sixth embodiment, the threshold TH of the prediction direction in the intra prediction mode shown in FIG. 30 is set to 18 as the value of the intra prediction direction. If the quantization parameter of the block is 18 or more, the quantization parameter of the left neighboring block is derived as the predicted quantization parameter.

図38を用いて、イントラ予測方向による量子化パラメータの予測の詳細な動作を説明する。最初に、変換されたイントラ予測方向が0であるか否かを判定する(S810)。イントラ予測方向が0となるのは平均値予測によるイントラ予測が行われる場合である(S810のYes)である。この場合、左或いは上の近接ブロックのどちらか一方を優先して選択せず、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとする(S811)。一方、イントラ予測方向が0でない場合(S810のNo)、イントラ予測方向が18未満が否かを判定する(S812)。イントラ予測方向が18未満となる場合(S812のYes)、上の近接ブロックの参照することとし、上の近接ブロックの量子化パラメータQPAを予測量子化パラメータとする(S813)。一方、イントラ予測方向が18以上である場合(S812のNo)、左の近接ブロックの参照することとし、左の近接ブロックの量子化パラメータQPLを予測量子化パラメータとする(S814)。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   The detailed operation of the prediction of the quantization parameter by the intra prediction direction will be described with reference to FIG. First, it is determined whether or not the converted intra prediction direction is 0 (S810). The intra prediction direction becomes 0 when intra prediction based on average value prediction is performed (Yes in S810). In this case, either the left or upper neighboring block is not selected preferentially, and the average value of the quantization parameters QPL and QPA of the left and upper neighboring blocks is set as the predicted quantization parameter (S811). On the other hand, when the intra prediction direction is not 0 (No in S810), it is determined whether the intra prediction direction is less than 18 (S812). When the intra prediction direction is less than 18 (Yes in S812), the upper neighboring block is referred to, and the quantization parameter QPA of the upper neighboring block is used as the predicted quantization parameter (S813). On the other hand, when the intra prediction direction is 18 or more (No in S812), the left neighboring block is referred to, and the quantization parameter QPL of the left neighboring block is used as the predicted quantization parameter (S814). The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

図38で示されるように、実施例7のイントラ予測方向に基づく量子化パラメータの予測(S808)は実施例6のイントラ予測方向に基づく量子化パラメータの予測(S709)と同様である。その為、実施例6において、イントラ予測モードの予測方向に応じて左及び上の近接ブロックの量子化パラメータに重み付け係数を設定する場合、更に、図34で示されるようにイントラ予測モードの予測方向の閾値数を増やして、閾値で区切られるイントラ予測モードの予測方向の領域の範囲毎に左及び上の近接ブロックの量子化パラメータの重み付け係数を設定する場合にも、実施例7では同様に実施可能であるので、ここでは説明を割愛する。   As shown in FIG. 38, the prediction of the quantization parameter based on the intra prediction direction in the seventh embodiment (S808) is the same as the prediction of the quantization parameter based on the intra prediction direction in the sixth embodiment (S709). Therefore, in the sixth embodiment, when the weighting coefficient is set to the quantization parameter of the left and upper neighboring blocks according to the prediction direction of the intra prediction mode, the prediction direction of the intra prediction mode is further illustrated as shown in FIG. In the case where the left and upper neighboring block quantization parameter weighting coefficients are set for each range of the prediction direction area of the intra prediction mode divided by the threshold, the same applies to the seventh embodiment. Since it is possible, the explanation is omitted here.

[実施例8]
実施例8における第2の予測量子化パラメータ導出部304及び205の動作について説明する。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を304から205、符号化情報格納メモリを302から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。実施例1との相違は、符号化または復号対象の符号化ブロックが上のツリーブロックと近接する場合と同様に、左のツリーブロックと近接する場合に、左のツリーブロックの中の符号化済みブロックの量子化パラメータを予測に使用することを禁止する点である。即ち、ツリーブロック境界を越えての符号化済みブロックの量子化パラメータを予測に使用するのは、ツリーブロック内部で最初の符号化処理順の符号化ブロックが符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを使用する場合のみに制限する。更に、イントラ予測方向による量子化パラメータの予測を行う前に、左及び上の符号化済みの近接ブロックがともにツリーブロックの境界を越えた位置にない場合、即ち左及び上の近接ブロックの量子化パラメータが非0であるか否かの判定を省略し、直接イントラ予測モードによる量子化パラメータの予測を行うことで、実施例6におけるイントラ予測モードによる量子化パラメータの予測を行わない場合の判定処理(S710〜S714)を削減した点である。
[Example 8]
The operation of the second predicted quantization parameter derivation units 304 and 205 in the eighth embodiment will be described. Although the encoding process will be described here, in the case of the decoding process, the encoding is decoding, and the prediction quantization parameter derivation unit is replaced with codes 304 to 205, and the encoding information storage memory is replaced with codes 302 to 204. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. The difference from the first embodiment is that, when the encoding block to be encoded or decoded is close to the upper tree block, the encoding in the left tree block is already performed when it is close to the left tree block. The point is to prohibit the use of block quantization parameters for prediction. That is, the quantization parameter of the encoded block that exceeds the tree block boundary is used for the prediction. Or, it is limited only when the quantization parameter of the block coded immediately before is used. Further, before the quantization parameter is predicted by the intra prediction direction, if the left and upper coded neighboring blocks are not located beyond the tree block boundary, that is, the left and upper neighboring blocks are quantized. Determination processing when the prediction of the quantization parameter in the intra prediction mode according to the sixth embodiment is not performed by omitting the determination whether the parameter is non-zero and performing the prediction of the quantization parameter in the direct intra prediction mode. (S710 to S714) is reduced.

実施例8では、イントラ予測モードの予測方向で判定された近接ブロックがツリーブロックの境界を越えた位置にない場合は、判定された近接ブロックの量子化パラメータから予測量子化パラメータを導出し、イントラ予測モードの予測方向で判定された近接ブロックがツリーブロックの境界を越えた位置にある場合は、判定された近接ブロックの量子化パラメータを使用することが出来ないので、他の近接ブロックの量子化パラメータや符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを有効か判定し、予測量子化パラメータとして導出する。   In the eighth embodiment, when the adjacent block determined in the prediction direction of the intra prediction mode is not located at a position beyond the boundary of the tree block, a prediction quantization parameter is derived from the quantization parameter of the determined adjacent block, and the intra block is calculated. If the adjacent block determined in the prediction direction of the prediction mode is located beyond the boundary of the tree block, the quantization parameter of the determined adjacent block cannot be used, so that quantization of other adjacent blocks is performed. It is determined whether a parameter or a quantization parameter of a block coded before or just before the coding block to be coded is valid, and is derived as a predicted quantization parameter.

図39は実施例8における第1の予測量子化パラメータ導出部303の動作を示すフローチャートである。図39のフローチャートのS900からS903及びS907 は実施例6の図28のS700からS703及びS708、S904からS906は実施例7の図37のS804からS806と同じであるので、説明を割愛し、イントラ予測方向による量子化パラメータの予測S908の詳細な動作のみ説明する。   FIG. 39 is a flowchart showing the operation of the first predictive quantization parameter deriving unit 303 in the eighth embodiment. In the flowchart of FIG. 39, S900 to S903 and S907 are the same as S700 to S703 and S708 of FIG. 28 in the sixth embodiment, and S904 to S906 are the same as S804 to S806 of FIG. Only the detailed operation of the quantization parameter prediction S908 according to the prediction direction will be described.

図40を用いて、イントラ予測方向による量子化パラメータの予測(S908)の詳細な動作を説明する。ここでは、実施例6と同様に、図30で示されるイントラ予測モードの予測方向の閾値THをイントラ予測方向の値で18に設定することとし、イントラ予測方向が閾値THによって量子化パラメータの予測を切り換えて、予測量子化パラメータを導出することとする。   The detailed operation of the prediction of the quantization parameter based on the intra prediction direction (S908) will be described with reference to FIG. Here, similarly to the sixth embodiment, the threshold TH of the prediction direction in the intra prediction mode shown in FIG. 30 is set to 18 as the value of the intra prediction direction, and the prediction of the quantization parameter is performed based on the threshold TH. And predictive quantization parameters are derived.

最初に、変換されたイントラ予測方向が0であるか否かを判定する(S910)。イントラ予測方向が0となるのは平均値予測によるイントラ予測が行われる場合である(S910のYes)である。この場合、method1(S911)に進む。一方、イントラ予測方向が0でない場合(S910のNo)、イントラ予測方向が18未満が否かを判定する(S912)。イントラ予測方向が18未満となる場合(S912のYes)、method2(S913)に進み、イントラ予測方向が18以上である場合(S912のNo)、method3(S914)に進む。   First, it is determined whether or not the converted intra prediction direction is 0 (S910). The intra prediction direction is 0 when intra prediction based on average value prediction is performed (Yes in S910). In this case, the process proceeds to method1 (S911). On the other hand, when the intra prediction direction is not 0 (No in S910), it is determined whether or not the intra prediction direction is less than 18 (S912). When the intra prediction direction is less than 18 (Yes in S912), the process proceeds to method 2 (S913), and when the intra prediction direction is 18 or more (No in S912), the process proceeds to method 3 (S914).

まず、method1の処理を図41を用いて説明する。S910においてイントラ予測方向が0(S910のYes)と判定されるのは平均値予測によるイントラ予測が行われる場合である。この場合、左或いは上の近接ブロックのどちらか一方を優先して選択せず、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとすることになる為、最初に左及び上の近接ブロックの量子化パラメータがともに正であるか否かを判定する(S920)。左及び上の近接ブロックの量子化パラメータがともに正の場合(S920のYes)、左及び上の両方の近接ブロックが存在する。その為、イントラ予測モードで示される方向で指定される近接ブロックを参照し、その量子化パラメータを取得することが可能であるので、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとする(S921)。   First, method1 will be described with reference to FIG. In S910, the intra prediction direction is determined to be 0 (Yes in S910) when intra prediction based on average value prediction is performed. In this case, either the left or the upper neighboring block is not preferentially selected, and the average value of the quantization parameters QPL and QPA of the left and upper neighboring blocks is used as the predicted quantization parameter. Next, it is determined whether the quantization parameters of the left and upper neighboring blocks are both positive (S920). When the quantization parameters of the left and top neighboring blocks are both positive (Yes in S920), both the left and top neighboring blocks exist. Therefore, since it is possible to obtain the quantization parameter by referring to the neighboring block specified in the direction indicated by the intra prediction mode, the average value of the quantization parameters QPL and QPA of the left and upper neighboring blocks Is a predicted quantization parameter (S921).

一方、左及び上の近接ブロックの量子化パラメータがともに正でない場合(S920のNo)、即ち少なくとも左或いは上のどちらか一方の近接ブロックの量子化パラメータが0であり、少なくとも左或いは上のどちらか一方の近接ブロックが存在しないことになる。その為、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとすることは出来ないので、左或いは上の近接ブロックの存在有無、即ち左或いは上の近接ブロックの量子化パラメータが0であるか否かにより、取り得る量子化パラメータを予測量子化パラメータとする。   On the other hand, if the quantization parameter of the left and upper neighboring blocks is not positive (No in S920), that is, the quantization parameter of at least one of the left or upper neighboring blocks is 0, and at least either the left or upper one One of the adjacent blocks does not exist. For this reason, the average value of the quantization parameters QPL and QPA of the left and upper neighboring blocks cannot be used as the predicted quantization parameter. Depending on whether or not the quantization parameter is 0, a possible quantization parameter is set as a predicted quantization parameter.

最初に上の近接ブロックの量子化パラメータが0であるか否かを判定する(S922)。上の近接ブロックの量子化パラメータが0でない場合(S922のNo)、上の近接ブロックの量子化パラメータを予測量子化パラメータとする(S923)。一方、0である場合(S922のYes)、予測量子化パラメータとして上の近接ブロックの量子化パラメータを参照出来ないので、S924の判定に進む。次に、左の近接ブロックの量子化パラメータが0であるか否かの判定する(S924)。左の近接ブロックの量子化パラメータが0でない場合(S924のNo)、左の近接ブロックの量子化パラメータを予測量子化パラメータとする(S925)。一方、0である場合(S924のYes)、即ち、左及び上の近接ブロックの量子化パラメータがともに0であり、両方ともに存在しないので、予測量子化パラメータとして左及び上の近接ブロックの量子化パラメータを参照出来ない。そこで、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする(S926)。尚、画像の左上端のブロックが符号化ブロックである場合は、左と上の近接ブロック、更に符号化対象の符号化ブロックより前、ないし直前に符号化したブロックが存在しないので、ピクチャ或いはスライスの量子化パラメータを予測量子化パラメータとする。   First, it is determined whether or not the quantization parameter of the upper adjacent block is 0 (S922). When the quantization parameter of the upper neighboring block is not 0 (No in S922), the quantization parameter of the upper neighboring block is set as a predicted quantization parameter (S923). On the other hand, if it is 0 (Yes in S922), the quantization parameter of the upper neighboring block cannot be referred to as the predicted quantization parameter, and thus the process proceeds to S924. Next, it is determined whether the quantization parameter of the left adjacent block is 0 (S924). When the quantization parameter of the left neighboring block is not 0 (No in S924), the quantization parameter of the left neighboring block is set as the predicted quantization parameter (S925). On the other hand, if it is 0 (Yes in S924), that is, the quantization parameters of the left and upper neighboring blocks are both 0 and neither exists, the quantization of the left and upper neighboring blocks as the prediction quantization parameter. The parameter cannot be referenced. Therefore, the quantization parameter (prevQP) of the block coded before or just before the coding block to be coded is set as the prediction quantization parameter (S926). If the block at the upper left corner of the image is an encoded block, there is no block encoded before and immediately before the encoding block to be encoded, and the adjacent block on the left and upper, so a picture or slice The quantization parameter is used as a predicted quantization parameter.

次に、method2の処理を図42を用いて説明する。S912においてイントラ予測方向が18未満(S912のYes)と判定されたので、上の符号化済みの近接ブロックの量子化パラメータを予測量子化パラメータを選択することになる為、最初に上の近接ブロックの量子化パラメータが0であるか否かを判定する(S930)。上の近接ブロックの量子化パラメータが0でない場合(S930のNo)、上の近接ブロックの量子化パラメータを予測量子化パラメータとする(S931)。一方、0である場合(S930のYes)、予測量子化パラメータとして上の近接ブロックの量子化パラメータを参照出来ないので、S932の判定に進む。次に、左の近接ブロックの量子化パラメータが0であるか否かの判定する(S932)。左の近接ブロックの量子化パラメータが0でない場合(S932のNo)、左の近接ブロックの量子化パラメータを予測量子化パラメータとする(S933)。一方、0である場合(S932のYes)、即ち、左及び上の近接ブロックの量子化パラメータがともに0であり、両方ともに存在しないので、予測量子化パラメータとして左及び上の近接ブロックの量子化パラメータを参照出来ない。そこで、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする(S934)。尚、画像の左上端のブロックが符号化ブロックである場合は、左と上の近接ブロック、更に符号化対象の符号化ブロックより前、ないし直前に符号化したブロックが存在しないので、ピクチャ或いはスライスの量子化パラメータを予測量子化パラメータとする。   Next, method 2 will be described with reference to FIG. Since it is determined in S912 that the intra prediction direction is less than 18 (Yes in S912), the prediction parameter is selected as the quantization parameter of the upper coded neighboring block. It is determined whether or not the quantization parameter is 0 (S930). When the quantization parameter of the upper neighboring block is not 0 (No in S930), the quantization parameter of the upper neighboring block is set as the predicted quantization parameter (S931). On the other hand, when it is 0 (Yes in S930), the quantization parameter of the upper adjacent block cannot be referred to as the predicted quantization parameter, and thus the process proceeds to S932. Next, it is determined whether the quantization parameter of the left adjacent block is 0 (S932). When the quantization parameter of the left neighboring block is not 0 (No in S932), the quantization parameter of the left neighboring block is set as the predicted quantization parameter (S933). On the other hand, if it is 0 (Yes in S932), that is, the quantization parameters of the left and upper neighboring blocks are both 0 and neither exists, the quantization of the left and upper neighboring blocks as the prediction quantization parameter. The parameter cannot be referenced. Therefore, the quantization parameter (prevQP) of the block coded before or just before the coding block to be coded is set as the prediction quantization parameter (S934). If the block at the upper left corner of the image is an encoded block, there is no block encoded before and immediately before the encoding block to be encoded, and the adjacent block on the left and upper, so a picture or slice The quantization parameter is used as a predicted quantization parameter.

続いて、method3の処理を図43を用いて説明する。S912においてイントラ予測方向が18以上(S912のNo)と判定されたので、左の符号化済みの近接ブロックの量子化パラメータを予測量子化パラメータを選択することになる為、最初に左の近接ブロックの量子化パラメータが0であるか否かを判定する(S940)。左の近接ブロックの量子化パラメータが0でない場合(S940のNo)、左の近接ブロックの量子化パラメータを予測量子化パラメータとする(S941)。一方、0である場合(S940のYes)、予測量子化パラメータとして左の近接ブロックの量子化パラメータを参照出来ないので、S942の判定に進む。次に、上の近接ブロックの量子化パラメータが0であるか否かの判定する(S942)。上の近接ブロックの量子化パラメータが0でない場合(S942のNo)、上の近接ブロックの量子化パラメータを予測量子化パラメータとする(S943)。一方、0である場合(S942のYes)、即ち、左及び上の近接ブロックの量子化パラメータがともに0であり、両方ともに存在しないので、予測量子化パラメータとして左及び上の近接ブロックの量子化パラメータを参照出来ない。そこで、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする(S944)。尚、画像の左上端のブロックが符号化ブロックである場合は、左と上の近接ブロック、更に符号化対象の符号化ブロックより前、ないし直前に符号化したブロックが存在しないので、ピクチャ或いはスライスの量子化パラメータを予測量子化パラメータとする。   Next, method 3 will be described with reference to FIG. Since the intra prediction direction is determined to be 18 or more in S912 (No in S912), the predictive quantization parameter is selected as the quantization parameter of the left encoded neighboring block. It is determined whether or not the quantization parameter is zero (S940). When the quantization parameter of the left neighboring block is not 0 (No in S940), the quantization parameter of the left neighboring block is set as the predicted quantization parameter (S941). On the other hand, if it is 0 (Yes in S940), the quantization parameter of the left adjacent block cannot be referred to as the predicted quantization parameter, and thus the process proceeds to S942. Next, it is determined whether or not the quantization parameter of the upper neighboring block is 0 (S942). When the quantization parameter of the upper neighboring block is not 0 (No in S942), the quantization parameter of the upper neighboring block is set as the predicted quantization parameter (S943). On the other hand, if it is 0 (Yes in S942), that is, the quantization parameters of the left and upper neighboring blocks are both 0 and neither exists, the quantization of the left and upper neighboring blocks as the prediction quantization parameter. The parameter cannot be referenced. Therefore, the quantization parameter (prevQP) of the block encoded before or immediately before the encoding block to be encoded is set as the prediction quantization parameter (S944). If the block at the upper left corner of the image is an encoded block, there is no block encoded before and immediately before the encoding block to be encoded, and the adjacent block on the left and upper, so a picture or slice The quantization parameter is used as a predicted quantization parameter.

以上のようなイントラ予測方向に分岐された各methodにおいて、イントラ予測方向で判定された近接ブロックの量子化パラメータが0となる場合は、以降の判定を行わずに符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとして、判定処理を簡略化することも可能である。method1では、左及び上の近接ブロックの量子化パラメータがともに正であるか否かを判定(S920)で、左及び上の近接ブロックの量子化パラメータがともに正でない場合(S920のNo)、S922以降の判定処理を行わずに符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする(S926)。method2では、上の近接ブロックの量子化パラメータが0であるか否かを判定(S930)で、0である場合(S930のYes)、S932以降の判定処理を行わずに符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする(S934)。method3では、左の近接ブロックの量子化パラメータが0であるか否かを判定(S940)で、0である場合(S940のYes)、S942以降の判定処理を行わずに符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする(S944)。
こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。
In each method branched in the intra prediction direction as described above, when the quantization parameter of the adjacent block determined in the intra prediction direction is 0, the encoding block to be encoded is performed without performing the subsequent determination. It is also possible to simplify the determination process using the quantization parameter (prevQP) of the block encoded before or immediately before as the prediction quantization parameter. In method 1, it is determined whether the quantization parameters of the left and upper neighboring blocks are both positive (S920). If the quantization parameters of the left and upper neighboring blocks are not positive (No in S920), S922 is determined. The quantization parameter (prevQP) of the block encoded before or immediately before the encoding block to be encoded without performing the subsequent determination process is set as the prediction quantization parameter (S926). In method 2, it is determined whether or not the quantization parameter of the upper adjacent block is 0 (S 930). If it is 0 (Yes in S 930), the encoding process is performed without performing the determination process after S 932. The quantization parameter (prevQP) of the block encoded before or immediately before the block is set as the predicted quantization parameter (S934). In method 3, it is determined whether the quantization parameter of the left adjacent block is 0 (S940). If it is 0 (Yes in S940), the encoding of the encoding target is performed without performing the determination processing after S942. The quantization parameter (prevQP) of the block encoded before or immediately before the block is set as the predicted quantization parameter (S944).
The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

実施例8のイントラ予測方向に基づく量子化パラメータの予測(S908)は、実施例6のイントラ予測方向に基づく量子化パラメータの予測(S709)と同様に、イントラ予測モードの予測方向に応じて左及び上の近接ブロックの量子化パラメータに重み付け係数を設定する場合、更に、図34で示されるようにイントラ予測モードの予測方向の閾値数を増やして、閾値で区切られるイントラ予測モードの予測方向の領域の範囲毎に左及び上の近接ブロックの量子化パラメータの重み付け係数を設定する場合にも実施可能である。ここでは、図34で示されるようにイントラ予測モードの予測方向の閾値数を増やして、閾値で区切られるイントラ予測モードの予測方向の領域の範囲毎に左及び上の近接ブロックの量子化パラメータの重み付け係数を設定する場合の一例として、イントラ予測方向に基づく量子化パラメータの予測(S908)に適用した場合について説明する。実施例6で説明されたその他の事例についても、以下で説明する実施例8を適用する場合と同様に可能であるので、説明を割愛する。   The prediction of the quantization parameter based on the intra prediction direction of the eighth embodiment (S908) is performed according to the prediction direction of the intra prediction mode, similarly to the prediction of the quantization parameter based on the intra prediction direction of the sixth embodiment (S709). When the weighting coefficient is set to the quantization parameter of the adjacent block above, the number of thresholds in the prediction direction of the intra prediction mode is further increased as shown in FIG. This can also be implemented when setting the weighting coefficient of the quantization parameter of the left and upper neighboring blocks for each area range. Here, as shown in FIG. 34, the number of thresholds in the prediction direction of the intra prediction mode is increased, and the quantization parameter of the adjacent block on the left and the upper is separated for each range of the prediction direction region of the intra prediction mode divided by the threshold. As an example of setting a weighting coefficient, a case where the present invention is applied to quantization parameter prediction based on the intra prediction direction (S908) will be described. Other cases described in the sixth embodiment are also possible in the same manner as in the case where the eighth embodiment described below is applied, and thus the description thereof is omitted.

図44は、図34で示されるようにイントラ予測モードの予測方向の閾値数を増やして、閾値で区切られるイントラ予測モードの予測方向の領域の範囲毎に左及び上の近接ブロックの量子化パラメータの重み付け係数を設定する場合に、イントラ予測方向に基づく量子化パラメータの予測(S908)の詳細な動作を示すフローチャートである。実施例6と同様に、図34で示されるイントラ予測モードの予測方向を閾値THLO及びTHHIにより3つの領域に分割し、THLOを13、THHIを22にそれぞれ設定することとし、イントラ予測方向が閾値で区切られた領域毎に決められた量子化パラメータの予測を切り換えて、予測量子化パラメータを導出することとする。   44, the number of thresholds in the prediction direction of the intra prediction mode is increased as shown in FIG. 34, and the quantization parameter of the adjacent block on the left and the upper is separated for each range of the prediction direction region in the intra prediction mode divided by the threshold 5 is a flowchart showing detailed operation of quantization parameter prediction based on the intra prediction direction (S908) when setting the weighting coefficient. As in the sixth embodiment, the prediction direction of the intra prediction mode shown in FIG. 34 is divided into three regions by threshold values THLO and THHI, and THLO is set to 13 and THHI is set to 22, respectively. The prediction quantization parameter is derived by switching the prediction of the quantization parameter determined for each region divided by.

最初に、変換されたイントラ予測方向が0であるか否かを判定する(S950)。イントラ予測方向が0となるのは平均値予測によるイントラ予測が行われる場合である(S950のYes)である。この場合、method1(S951)に進む。一方、イントラ予測方向が0でない場合(S950のNo)、イントラ予測方向がTHLO未満が否かを判定する(S952)。イントラ予測方向がTHLO未満である場合(S952のYes)、method2(S953)に進む。イントラ予測方向がTHLO以上である場合(S952のNo)、イントラ予測方向が閾値THHI未満か否かが判定される(S954)。イントラ予測方向がTHHI未満でない、即ちTHHI以上である場合(S954のNo)、method3(S955)に進む。イントラ予測方向がTHHI未満である場合(S954のYes)、左と上の近接ブロックの量子化パラメータに対する重み付けを均等化するので、S951に進む。   First, it is determined whether or not the converted intra prediction direction is 0 (S950). The intra prediction direction becomes 0 when intra prediction based on average value prediction is performed (Yes in S950). In this case, the process proceeds to method1 (S951). On the other hand, when the intra prediction direction is not 0 (No in S950), it is determined whether the intra prediction direction is less than THLO (S952). When the intra prediction direction is less than THLO (Yes in S952), the process proceeds to method2 (S953). If the intra prediction direction is greater than or equal to THLO (No in S952), it is determined whether or not the intra prediction direction is less than a threshold value THHI (S954). When the intra prediction direction is not less than THHI, that is, is equal to or higher than THHI (No in S954), the process proceeds to method3 (S955). If the intra prediction direction is less than THHI (Yes in S954), the weighting for the quantization parameter of the left and upper neighboring blocks is equalized, so the process proceeds to S951.

次に、method2(S953)の詳細な動作について説明する。図45はmethod2(S953)の詳細な動作を説明するフローチャートである。重み付け平均を求める場合、左及び上の近接ブロックがともに存在しなければならない。その為、左及び上の近接ブロックの量子化パラメータがともに正であるか否かを判定する(S960)。左及び上の近接ブロックの量子化パラメータがともに正の場合(S960のYes)、左及び上の両方の近接ブロックが存在するので、FA>FL>0となるように上の近接ブロックの量子化パラメータに対して重み付けを大きく設定する(S961)。例えば、FAを3、FLを1に設定する。一方、左及び上の近接ブロックの量子化パラメータがともに正でない場合(S960のNo)、即ち少なくとも左或いは上のどちらか一方の近接ブロックの量子化パラメータが0であり、少なくとも左或いは上のどちらか一方の近接ブロックが存在しないことになる。その為、左及び上の近接ブロックの量子化パラメータから重み付き平均を求めることが出来ないので、左或いは上の近接ブロックの存在有無、即ち左或いは上の近接ブロックの量子化パラメータが0であるか否かにより、取り得る量子化パラメータを予測量子化パラメータとする。最初に上の近接ブロックの量子化パラメータが0であるか否かを判定する(S962)。   Next, detailed operation of method2 (S953) will be described. FIG. 45 is a flowchart for explaining the detailed operation of method2 (S953). When determining the weighted average, both the left and top neighboring blocks must be present. Therefore, it is determined whether the quantization parameters of the left and upper neighboring blocks are both positive (S960). When the quantization parameters of the left and upper neighboring blocks are both positive (Yes in S960), since both the left and upper neighboring blocks exist, the upper neighboring block is quantized so that FA> FL> 0. A large weight is set for the parameter (S961). For example, FA is set to 3 and FL is set to 1. On the other hand, if the quantization parameter of the left and upper neighboring blocks is not positive (No in S960), that is, the quantization parameter of at least one of the left or upper neighboring blocks is 0, and at least either the left or upper one One of the adjacent blocks does not exist. Therefore, the weighted average cannot be obtained from the quantization parameters of the left and upper neighboring blocks, so the presence or absence of the left or upper neighboring block, that is, the quantization parameter of the left or upper neighboring block is 0. Depending on whether or not, a possible quantization parameter is set as a predicted quantization parameter. First, it is determined whether or not the quantization parameter of the upper neighboring block is 0 (S962).

上の近接ブロックの量子化パラメータが0でない場合(S962のNo)、上の近接ブロックの量子化パラメータを予測量子化パラメータとする為に、左の近接ブロックの量子化パラメータの重み付き係数FLを0に設定する(S963)。例えば、FAを4、FLを0に設定する。一方、0である場合(S962のYes)、予測量子化パラメータとして上の近接ブロックの量子化パラメータを参照出来ないので、S964の判定に進む。次に、左の近接ブロックの量子化パラメータが0であるか否かの判定する(S964)。左の近接ブロックの量子化パラメータが0でない場合(S964のNo)、左の近接ブロックの量子化パラメータを予測量子化パラメータとする為に、上の近接ブロックの量子化パラメータの重み付き係数FAを0に設定する(S965)。例えば、FAを0、FLを4に設定する。一方、0である場合(S964のYes)、即ち、左及び上の近接ブロックの量子化パラメータがともに0であり、両方ともに存在しないので、予測量子化パラメータとして左及び上の近接ブロックの量子化パラメータを参照出来ない。そこで、符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータ(prevQP)を予測量子化パラメータとする(S967)。左及び上の近接ブロックの量子化パラメータの重み付き係数が設定された場合は、決定した重み付け係数からと各量子化パラメータから次式にて予測量子化パラメータpredQPを導出する(S966)。   If the quantization parameter of the upper neighboring block is not 0 (No in S962), the weighting coefficient FL of the quantization parameter of the left neighboring block is set to be the predicted quantization parameter. It is set to 0 (S963). For example, FA is set to 4 and FL is set to 0. On the other hand, if it is 0 (Yes in S962), the quantization parameter of the above adjacent block cannot be referred to as the predicted quantization parameter, and thus the process proceeds to S964. Next, it is determined whether or not the quantization parameter of the left adjacent block is 0 (S964). If the quantization parameter of the left neighboring block is not 0 (No in S964), the weighted coefficient FA of the quantization parameter of the upper neighboring block is set to be the predicted quantization parameter. It is set to 0 (S965). For example, FA is set to 0 and FL is set to 4. On the other hand, when it is 0 (Yes in S964), that is, the quantization parameters of the left and upper neighboring blocks are both 0, and both of them do not exist. The parameter cannot be referenced. Therefore, the quantization parameter (prevQP) of the block encoded before or immediately before the encoding block to be encoded is set as the prediction quantization parameter (S967). When the weighted coefficient of the quantization parameter of the left and upper neighboring blocks is set, the predicted quantization parameter predQP is derived from the determined weighting coefficient and each quantization parameter by the following equation (S966).

Figure 2013150318
Figure 2013150318

ここで、上式の分母はFA+FLであり、分子の2は四捨五入の為に加算される(FA+FL)/2の値である。こうして導出された予測量子化パラメータは差分量子化パラメータ生成部111に供給される。   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. The predicted quantization parameter derived in this way is supplied to the differential quantization parameter generation unit 111.

method1(S951)及びmethod3(S955)についても、method2と同様の判定処理で実現される。但し、S961における左及び上の近接ブロックの量子化パラメータの重み付き係数の設定を、method1ではFA=FL≠0、method3では0<FA<FLとなるように重み付けを設定する必要がある。   Method1 (S951) and method3 (S955) are also realized by the same determination process as method2. However, it is necessary to set the weighting coefficients for the quantization parameters of the left and upper neighboring blocks in S961 so that FA = FL ≠ 0 in method1 and 0 <FA <FL in method3.

尚、ここでは重み付け係数FA及びFLの係数の組合せ以外の係数を設定してもよい。但し、計算の高速化を重視する場合、FA+FLが2の冪乗で表される変数を選択することが望ましい。上述した予測量子化パラメータの導出式をビットシフト演算で行うと次式で表される。   Here, coefficients other than the combination of the weighting coefficients FA and FL 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. When the above-described predictive quantization parameter derivation formula is performed by a bit shift operation, it is expressed by the following formula.

Figure 2013150318
Figure 2013150318

上述した重み付け係数FA及びFLの係数の組合せとして、(FA,FL)=(3,1)を(FA,FL)=(4,0)、(FA,FL)=(1,3)を(FA,FL)=(0,4)とすると、前者では上の近接ブロック、後者では左の近接ブロックとなる。この場合、THLOからTHHIの間にあるイントラ予測モードの予測方向でQPAとQPLの平均値を算出する計算処理を行い、それ以外の平均値を予測量子化パラメータとしない場合は左或いは上の近接ブロックの量子化パラメータを選択するだけで実現出来る。その為、処理の簡略化と高速化が可能となる。   As combinations of the weighting coefficients FA and FL described above, (FA, FL) = (3, 1) is set to (FA, FL) = (4, 0), (FA, FL) = (1, 3) is set to ( If FA, FL) = (0, 4), the former is the upper adjacent block, and the latter is the left adjacent block. In this case, calculation processing is performed to calculate the average value of QPA and QPL in the prediction direction of the intra prediction mode between THLO and THHI, and if the other average values are not used as the prediction quantization parameter, the left or upper proximity This can be realized simply by selecting the quantization parameter of the block. As a result, the processing can be simplified and speeded up.

また、実施例8では、閾値THLO及びTHHIの値をそれぞれイントラ予測方向の値で13、22としたが、これらの値でなくてもよく、動画像符号化装置100及び動画像復号装置200で矛盾が生じない限り、暗黙的に設定出来るものとする。   In the eighth embodiment, the values of the thresholds THLO and THHI are set to 13 and 22 in the intra prediction direction, respectively. However, these values may not be used, and the moving picture encoding apparatus 100 and the moving picture decoding apparatus 200 may As long as no contradiction arises, it can be set implicitly.

更に、実施例8では、閾値THLO及びTHHIにて、イントラ予測モードの予測方向を3つの領域に分割したが、閾値の数を増やして、分割数を増やしてもよい。但し、各領域で設定される重み付け係数FA及びFLの係数は、計算の高速化を重視する場合、FA+FLが2の冪乗で表される変数を選択することが望ましい。   Furthermore, in the eighth embodiment, the prediction direction in the intra prediction mode is divided into three regions using the thresholds THLO and THHI. However, the number of divisions may be increased by increasing the number of thresholds. However, as the weighting coefficients FA and FL set in each region, it is desirable to select a variable in which FA + FL is expressed as a power of 2 when importance is placed on speeding up the calculation.

[実施例9]
実施例6及び8では、符号化対象の符号化ブロックのイントラ予測モードの予測方向に基づいて判定される近接ブロックがツリーブロックの境界を越えた位置にある場合があった。実施例6では、イントラ予測モードによる量子化パラメータの予測を可能とする為に、予め左及び上の近接ブロックがともにツリーブロックの境界を越えた位置にあるか否かを判定し、ともに越えた位置に無い場合にのみイントラ予測モードによる量子化パラメータの予測を実施し、そうでない(少なくとも一方の近接ブロックがツリーブロックの境界を越えた位置にある)場合はイントラ予測モードによる量子化パラメータの予測を実施しなかった。実施例8では、イントラ予測モードの予測方向で判定された近接ブロックがツリーブロックの境界を越えた位置にある場合は、判定された近接ブロックの量子化パラメータを使用することが出来ないので、他の近接ブロックの量子化パラメータや符号化対象の符号化ブロックより前、ないし直前に符号化したブロックの量子化パラメータを有効か判定し、予測量子化パラメータとして導出した。このように、符号化対象の符号化ブロックのイントラ予測モードの予測方向で判定された近接ブロックがツリーブロックの境界を越えた位置にある場合には、イントラ予測モードの予測方向と参照先の近接ブロックの位置とが合致しないので、イントラ予測モードよる判定の精度が低下する恐れがある。また、本来符号化ブロックがイントラ予測であっても、周囲に符号化済みの近接ブロックがツリーブロックの境界を越えた位置にあり、イントラ予測モードによる判定が出来ない場合がある。そこで、実施例9では、第2の予測量子化パラメータ導出部でイントラ予測モードによる判定と参照する近接ブロックの位置が合致しない場合はイントラ予測モードによる判定結果を採用せず、第1の予測量子化パラメータ導出部で再判定を行うことで、量子化パラメータの予測精度を向上させるものである。尚、ここでは符号化処理について説明するが、復号処理の場合は、符号化が復号となり、予測量子化パラメータ導出部を114から205、符号化情報格納メモリを113から204に符号を置き換え、予測量子化パラメータの出力先を差分量子化パラメータ生成部111から量子化パラメータ生成部203とすることで、同等の処理を実現するものとする。
[Example 9]
In the sixth and eighth embodiments, there is a case where the adjacent block determined based on the prediction direction of the intra prediction mode of the coding block to be coded is located beyond the boundary of the tree block. In the sixth embodiment, in order to enable prediction of the quantization parameter in the intra prediction mode, it is determined in advance whether or not the left and upper neighboring blocks are both in positions exceeding the boundary of the tree block, and both are exceeded. Predict quantization parameter in intra prediction mode only when not in position, otherwise predict prediction of quantization parameter in intra prediction mode (if at least one neighboring block is beyond the boundary of tree block) Was not implemented. In the eighth embodiment, when the adjacent block determined in the prediction direction of the intra prediction mode is located beyond the boundary of the tree block, the quantization parameter of the determined adjacent block cannot be used. Next, it is determined whether the quantization parameter of the neighboring block or the quantization parameter of the block coded before or just before the coding block to be coded is valid, and is derived as the predicted quantization parameter. As described above, when the adjacent block determined in the prediction direction of the intra prediction mode of the coding block to be encoded is located beyond the boundary of the tree block, the prediction direction of the intra prediction mode and the proximity of the reference destination Since the position of the block does not match, there is a possibility that the accuracy of the determination by the intra prediction mode is lowered. Even if the originally encoded block is intra-prediction, there may be a case where a neighboring block that has already been encoded is located at a position beyond the boundary of the tree block and cannot be determined in the intra-prediction mode. Thus, in the ninth embodiment, when the second prediction quantization parameter derivation unit does not match the determination in the intra prediction mode with the position of the adjacent block to be referenced, the determination result in the intra prediction mode is not adopted, and the first prediction quantum By performing redetermination in the quantization parameter deriving unit, the prediction accuracy of the quantization parameter is improved. Although the encoding process will be described here, in the decoding process, the encoding is decoding, and the prediction quantization parameter deriving unit 114 to 205 and the encoding information storage memory 113 to 204 are replaced with codes. It is assumed that equivalent processing is realized by changing the output destination of the quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203.

実施例9の判定を適用した予測量子化パラメータ導出部114及び205の詳細な構成を図46に示す。予測量子化パラメータ導出部114及び205はスイッチ401、メモリ402、第1の予測量子化パラメータ導出部403、第2の予測量子化パラメータ導出部404及び再演算判定部405から構成される。図46のスイッチ401から第1の予測量子化パラメータ導出部403の諸部は、図10のスイッチ301から第1の予測量子化パラメータ導出部303の諸部と同じ機能を有しているので、説明を割愛する。図46の第2の予測量子化パラメータ導出部404に、上述した図10の第2の予測量子化パラメータ導出部304と異なる機能に変更したので、その差異について説明する。   FIG. 46 shows a detailed configuration of the predictive quantization parameter deriving units 114 and 205 to which the determination of the ninth embodiment is applied. The predicted quantization parameter derivation units 114 and 205 include a switch 401, a memory 402, a first predicted quantization parameter derivation unit 403, a second predicted quantization parameter derivation unit 404, and a recalculation determination unit 405. 46 have the same functions as those of the first predictive quantization parameter deriving unit 303 from the switch 301 of FIG. I will omit the explanation. Since the second predictive quantization parameter deriving unit 404 in FIG. 46 has been changed to a function different from that of the second predictive quantization parameter deriving unit 304 in FIG. 10 described above, the difference will be described.

図47は、実施例6で説明した第2の予測量子化パラメータ導出部304に対して、実施例9の機能を適用した第2の予測量子化パラメータ導出部404の動作を説明するフローチャートである。S1000からS1009までの処理は上述した第2の予測量子化パラメータ導出部304と同様であり、説明を割愛する。上述した第2の予測量子化パラメータ導出部304との差異は、左及び上の近接ブロックの量子化パラメータがともに正であるか否かを判定(S1007)し、左及び上の近接ブロックの量子化パラメータの少なくとも1つがともに正でない場合(S1007のNo)、イントラ予測モードによる量子化パラメータの予測を行わず、予測量子化パラメータ(predQP)を0に設定する(S1010)ようにした点である。第2の予測量子化パラメータ導出部304では、符号化ブロックがイントラ予測であっても、周囲に符号化済みの近接ブロックがツリーブロックの境界を越えた位置にあり、近接ブロックの量子化パラメータが0に設定され、イントラ予測モードによる量子化パラメータの予測が出来ない場合、イントラ予測モードに関係無く、近接ブロックの存在有無で判定していた。第2の予測量子化パラメータ導出部404では、イントラ予測モードによる量子化パラメータの予測のみ実施するようにし、イントラ予測モードによる量子化パラメータの予測で判定出来ない場合は、後述する再演算判定部405で第1の予測量子化パラメータ導出部403で再判定を行う判断をさせる為に予測量子化パラメータを0に設定する。導出された予測量子化パラメータは再演算判定部405に供給される。   47 is a flowchart for explaining the operation of the second predictive quantization parameter deriving unit 404 in which the function of the ninth embodiment is applied to the second predictive quantization parameter deriving unit 304 described in the sixth embodiment. . The processing from S1000 to S1009 is the same as that of the second predictive quantization parameter deriving unit 304 described above, and a description thereof will be omitted. The difference from the second predicted quantization parameter derivation unit 304 described above is whether or not the quantization parameters of the left and upper neighboring blocks are both positive (S1007), and the quantum of the left and upper neighboring blocks is determined. If at least one of the quantization parameters is not positive (No in S1007), the prediction quantization parameter (predQP) is set to 0 without performing the prediction of the quantization parameter in the intra prediction mode (S1010). . In the second predictive quantization parameter deriving unit 304, even if the encoded block is intra-predicted, neighboring encoded neighboring blocks are at positions beyond the boundary of the tree block, and the quantization parameter of the adjacent block is set. When it is set to 0 and the quantization parameter cannot be predicted in the intra prediction mode, the determination is made based on the presence or absence of the adjacent block regardless of the intra prediction mode. The second predictive quantization parameter deriving unit 404 performs only the prediction of the quantization parameter in the intra prediction mode, and when it cannot be determined by the prediction of the quantization parameter in the intra prediction mode, the recalculation determining unit 405 described later. Thus, the prediction quantization parameter is set to 0 in order to make the first prediction quantization parameter deriving unit 403 perform determination again. The derived prediction quantization parameter is supplied to the recalculation determination unit 405.

図48は、実施例8で説明した第2の予測量子化パラメータ導出部304のイントラ予測方向による量子化パラメータの予測(S908)に対して、実施例9の機能を適用した第2の予測量子化パラメータ導出部404のイントラ予測方向による量子化パラメータの予測の動作を説明するフローチャートである。実施例8と同様に、図30で示されるイントラ予測モードの予測方向の閾値THをイントラ予測方向の値で18に設定することとし、イントラ予測方向が閾値THによって量子化パラメータの予測を切り換えて、予測量子化パラメータを導出することとする。最初に、変換されたイントラ予測方向が0であるか否かを判定する(S1020)。イントラ予測方向が0となるのは平均値予測によるイントラ予測が行われる場合である(S1020のYes)である。この場合、method1(S1021)に進む。一方、イントラ予測方向が0でない場合(S1020のNo)、イントラ予測方向が18未満が否かを判定する(S1022)。イントラ予測方向が18未満となる場合(S1022のYes)、method2(S1023)に進み、イントラ予測方向が18以上である場合(S1022のNo)、method3(S1024)に進む。   FIG. 48 shows the second predicted quantum obtained by applying the function of the ninth embodiment to the prediction of the quantization parameter based on the intra prediction direction of the second predicted quantization parameter deriving unit 304 described in the eighth embodiment (S908). 10 is a flowchart for explaining an operation of predicting a quantization parameter based on an intra prediction direction of the quantization parameter deriving unit 404. As in the eighth embodiment, the threshold TH of the prediction direction in the intra prediction mode shown in FIG. 30 is set to 18 as the value of the intra prediction direction, and the prediction of the quantization parameter is switched according to the threshold TH. Let us derive the predictive quantization parameter. First, it is determined whether or not the converted intra prediction direction is 0 (S1020). The intra prediction direction is 0 when intra prediction based on average value prediction is performed (Yes in S1020). In this case, the process proceeds to method1 (S1021). On the other hand, when the intra prediction direction is not 0 (No in S1020), it is determined whether the intra prediction direction is less than 18 (S1022). When the intra prediction direction is less than 18 (Yes in S1022), the process proceeds to method2 (S1023), and when the intra prediction direction is 18 or more (No in S1022), the process proceeds to method3 (S1024).

まず、method1の処理を図49を用いて説明する。S1020においてイントラ予測方向が0(S1020のYes)と判定されるのは平均値予測によるイントラ予測が行われる場合である。この場合、左或いは上の近接ブロックのどちらか一方を優先して選択せず、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとすることになる為、最初に左及び上の近接ブロックの量子化パラメータがともに正であるか否かを判定する(S1030)。左及び上の近接ブロックの量子化パラメータがともに正の場合(S1030のYes)、左及び上の両方の近接ブロックが存在する。その為、イントラ予測モードで示される方向で指定される近接ブロックを参照し、その量子化パラメータを取得することが可能であるので、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとする(S1031)。一方、左及び上の近接ブロックの量子化パラメータがともに正でない場合(S1030のNo)、即ち少なくとも左或いは上のどちらか一方の近接ブロックの量子化パラメータが0であり、少なくとも左或いは上のどちらか一方の近接ブロックが存在しないことになる。その為、左及び上の近接ブロックの量子化パラメータQPLとQPAの平均値を予測量子化パラメータとすることは出来ないので、予測量子化パラメータを0に設定する(S1032)。   First, method1 will be described with reference to FIG. In S1020, the intra prediction direction is determined to be 0 (Yes in S1020) when intra prediction based on average value prediction is performed. In this case, either the left or the upper neighboring block is not preferentially selected, and the average value of the quantization parameters QPL and QPA of the left and upper neighboring blocks is used as the predicted quantization parameter. Next, it is determined whether the quantization parameters of the left and upper neighboring blocks are both positive (S1030). When the quantization parameters of the left and top neighboring blocks are both positive (Yes in S1030), both the left and top neighboring blocks exist. Therefore, since it is possible to obtain the quantization parameter by referring to the neighboring block specified in the direction indicated by the intra prediction mode, the average value of the quantization parameters QPL and QPA of the left and upper neighboring blocks Is a predicted quantization parameter (S1031). On the other hand, if the quantization parameter of the left and upper neighboring blocks is not positive (No in S1030), that is, the quantization parameter of at least one of the left or upper neighboring blocks is 0, and at least either the left or upper one One of the adjacent blocks does not exist. For this reason, since the average value of the quantization parameters QPL and QPA of the adjacent blocks on the left and the upper cannot be used as the prediction quantization parameter, the prediction quantization parameter is set to 0 (S1032).

次に、method2の処理を図50を用いて説明する。S1022においてイントラ予測方向が18未満(S1022のYes)と判定されたので、上の符号化済みの近接ブロックの量子化パラメータを予測量子化パラメータを選択することになる為、最初に上の近接ブロックの量子化パラメータが0であるか否かを判定する(S1040)。上の近接ブロックの量子化パラメータが0でない場合(S1040のNo)、上の近接ブロックの量子化パラメータを予測量子化パラメータとする(S1041)。一方、0である場合(S1040のYes)、予測量子化パラメータとして上の近接ブロックの量子化パラメータを参照出来ないので、予測量子化パラメータを0に設定する(S1042)。   Next, method 2 will be described with reference to FIG. Since it is determined in S1022 that the intra prediction direction is less than 18 (Yes in S1022), the predicted quantization parameter is selected as the quantization parameter of the upper coded neighboring block. It is determined whether or not the quantization parameter is 0 (S1040). When the quantization parameter of the upper neighboring block is not 0 (No in S1040), the quantization parameter of the upper neighboring block is set as the predicted quantization parameter (S1041). On the other hand, if it is 0 (Yes in S1040), the quantization parameter of the above adjacent block cannot be referred to as the prediction quantization parameter, so the prediction quantization parameter is set to 0 (S1042).

続いて、method3の処理を図51を用いて説明する。S1022においてイントラ予測方向が18以上(S1022のNo)と判定されたので、左の符号化済みの近接ブロックの量子化パラメータを予測量子化パラメータを選択することになる為、最初に左の近接ブロックの量子化パラメータが0であるか否かを判定する(S1050)。左の近接ブロックの量子化パラメータが0でない場合(S1050のNo)、左の近接ブロックの量子化パラメータを予測量子化パラメータとする(S1051)。一方、0である場合(S1050のYes)、予測量子化パラメータとして左の近接ブロックの量子化パラメータを参照出来ないので、予測量子化パラメータを0に設定する(S1052)。   Next, method 3 will be described with reference to FIG. Since the intra prediction direction is determined to be 18 or more in S1022 (No in S1022), the quantization parameter of the left encoded neighboring block is selected as the prediction quantization parameter. It is determined whether or not the quantization parameter is 0 (S1050). When the quantization parameter of the left neighboring block is not 0 (No in S1050), the quantization parameter of the left neighboring block is set as the predicted quantization parameter (S1051). On the other hand, if it is 0 (Yes in S1050), the quantization parameter of the adjacent block on the left cannot be referred to as the prediction quantization parameter, so the prediction quantization parameter is set to 0 (S1052).

以上のように、イントラ予測方向に分岐された各methodにおいて、イントラ予測方向で判定された近接ブロックの量子化パラメータが0となる場合は、近接ブロックがツリーブロックの境界を越えた位置にある、若しくは画面外にある場合であり、イントラ予測方向で判定された近接ブロックの量子化パラメータにより予測量子化パラメータを導出することが出来ない。そこで、イントラ予測モードによる量子化パラメータの予測で判定出来ないことを表す為に、予測量子化パラメータを0に設定する。導出された予測量子化パラメータは再演算判定部405に供給される。   As described above, in each method branched in the intra prediction direction, when the quantization parameter of the adjacent block determined in the intra prediction direction is 0, the adjacent block is in a position beyond the boundary of the tree block. Or it is a case where it is outside a screen and a prediction quantization parameter cannot be derived | led-out by the quantization parameter of the adjacent block determined by the intra prediction direction. Therefore, the prediction quantization parameter is set to 0 in order to indicate that the determination cannot be made by the prediction of the quantization parameter in the intra prediction mode. The derived prediction quantization parameter is supplied to the recalculation determination unit 405.

こうして、第2の予測量子化パラメータ導出部404で導出された予測量子化パラメータ(predQP)が再演算判定部405に供給される。   Thus, the predicted quantization parameter (predQP) derived by the second predicted quantization parameter deriving unit 404 is supplied to the recalculation determining unit 405.

再演算判定部405の詳細な動作を図52を用いて説明する。再演算判定部405には、第2の予測量子化パラメータ導出部404から予測量子化パラメータが供給される(S1100)。再演算判定部405は、供給される予測量子化パラメータが0であるか否かを判定する(S1101)。予測量子化パラメータが0である場合、第2の予測量子化パラメータ導出部404で適切な判定結果が得られなかったとみなし、第1の予測量子化パラメータ導出部403で再度予測量子化パラメータの導出を促す(S1102)。予測量子化パラメータが0でない場合、第2の予測量子化パラメータ導出部404で導出された予測量子化パラメータを差分量子化パラメータ生成部111に供給する。   The detailed operation of the recalculation determination unit 405 will be described with reference to FIG. The recalculation determination unit 405 is supplied with the predicted quantization parameter from the second predicted quantization parameter derivation unit 404 (S1100). The recalculation determination unit 405 determines whether or not the supplied prediction quantization parameter is 0 (S1101). If the predicted quantization parameter is 0, it is considered that the second predicted quantization parameter deriving unit 404 has not obtained an appropriate determination result, and the first predicted quantization parameter deriving unit 403 derives the predicted quantization parameter again. (S1102). When the predicted quantization parameter is not 0, the predicted quantization parameter derived by the second predicted quantization parameter deriving unit 404 is supplied to the differential quantization parameter generating unit 111.

以上のようにして、第2の予測量子化パラメータ導出部でイントラ予測モードによる判定と参照する近接ブロックの位置が合致しない場合はイントラ予測モードによる判定結果を採用せず、第1の予測量子化パラメータ導出部で再判定を行うことが可能となる。   As described above, when the second prediction quantization parameter deriving unit does not match the determination in the intra prediction mode with the position of the adjacent block to be referenced, the determination result in the intra prediction mode is not adopted, and the first prediction quantization is performed. Re-determination can be performed by the parameter deriving unit.

実施例9では、第2の予測量子化パラメータ導出部404でイントラ予測モードによる判定と参照する近接ブロックの位置が合致しない場合はイントラ予測モードによる判定結果を採用せず、予測量子化パラメータを0として出力するようにした点を除けば、実施例6及び8の第2の予測量子化パラメータ導出部304のイントラ予測モードによる量子化パラメータの予測判定と何ら変更されていない。その為、実施例6において、イントラ予測モードの予測方向に応じて左及び上の近接ブロックの量子化パラメータに重み付け係数を設定する場合、更に、図34で示されるようにイントラ予測モードの予測方向の閾値数を増やして、閾値で区切られるイントラ予測モードの予測方向の領域の範囲毎に左及び上の近接ブロックの量子化パラメータの重み付け係数を設定する場合にも、実施例9では同様に実施可能であるので、ここでは説明を割愛する。   In the ninth embodiment, when the second prediction quantization parameter deriving unit 404 does not match the determination in the intra prediction mode with the position of the adjacent block to be referenced, the determination result in the intra prediction mode is not adopted, and the prediction quantization parameter is set to 0. In other words, the quantization parameter prediction determination by the intra prediction mode of the second prediction quantization parameter deriving unit 304 of the sixth and eighth embodiments is not changed. Therefore, in the sixth embodiment, when the weighting coefficient is set to the quantization parameter of the left and upper neighboring blocks according to the prediction direction of the intra prediction mode, the prediction direction of the intra prediction mode is further illustrated as shown in FIG. In the case of setting the weighting coefficient of the quantization parameter of the left and upper neighboring blocks for each range of the prediction direction area of the intra prediction mode divided by the threshold, Since it is possible, the explanation is omitted here.

実施の形態の動画像符号化装置によれば、符号化対象のブロック毎に符号化される量子化パラメータを、周囲の符号化済みブロックの量子化パラメータを用いて、量子化パラメータの予測を行い、最適な予測量子化パラメータを導出し、量子化パラメータと予測量子化パラメータとの差分をとり符号化することで、画質を変化させずに、量子化パラメータの符号量を削減して、符号化効率を向上させることが出来る。   According to the moving image encoding apparatus of the embodiment, the quantization parameter encoded for each block to be encoded is predicted using the quantization parameter of the surrounding encoded block. Deriving the optimal prediction quantization parameter, encoding the difference between the quantization parameter and the prediction quantization parameter, and reducing the coding amount of the quantization parameter 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 neighboring block is a locally decoded block for prediction of the next encoded block on the encoding side and is the same as the decoded block, so there is no contradiction between the encoding side and the decoding side. As described above, the determination of the quantization parameter prediction is realized.

尚、上述の説明では、符号化ブロックを単位として量子化パラメータの予測を行ったが、ツリーブロック内の分割を増やし、ブロックサイズの小さい符号化ブロックが多く発生すると、符号量制御における符号化ブロック当たりの割当符号量は小さくなり過ぎて、量子化パラメータが適切に算出されない場合がある。また、符号化及び復号時に量子化パラメータ等の符号化情報を記憶しておく動画像符号化装置100及び動画像復号装置200の符号化情報格納メモリ113及び204のメモリ量を増加させることにもなる。そこで、量子化パラメータを符号化、伝送する単位として量子化グループというブロックを新たに設定し、このブロック単位に量子化パラメータの予測を行うことにしてもよい。   In the above description, the prediction of the quantization parameter is performed in units of coding blocks. However, when the number of blocks in the tree block is increased and a large number of coding blocks having a small block size are generated, the coding block in the code amount control is used. In some cases, the assigned code amount per hit becomes too small, and the quantization parameter is not appropriately calculated. Further, it is possible to increase the amount of memory of the encoding information storage memories 113 and 204 of the moving image encoding apparatus 100 and the moving image decoding apparatus 200 that store encoding information such as quantization parameters at the time of encoding and decoding. Become. Therefore, a block called a quantization group may be newly set as a unit for encoding and transmitting the quantization parameter, and the quantization parameter may be predicted for this block unit.

量子化グループはツリーブロックのサイズに従って決定されるブロックであり、そのサイズはツリーブロックのブロックの辺の長さに1/2n倍(nは0以上の整数)を乗じた値で表される。即ち、ツリーブロックのブロックの辺の長さをnビット右にシフトした値が量子化グループの辺の長さとなる。この値はツリーブロック構造と同じようにブロックサイズが決定されるので、ツリーブロックとの親和性が高い。また、ツリーブロック内を均等サイズで分割されるので、符号化情報格納メモリ113及び204に記憶される量子化パラメータの管理や読み出しを簡便化することが出来る。   The quantization group is a block determined according to the size of the tree block, and the size is represented by a value obtained by multiplying the length of the block side of the tree block by 1 / 2n times (n is an integer of 0 or more). That is, a value obtained by shifting the length of the side of the block of the tree block to the right by n bits becomes the length of the side of the quantization group. Since this value determines the block size in the same manner as the tree block structure, it has a high affinity with the tree block. Further, since the tree block is divided into equal sizes, management and readout of the quantization parameters stored in the encoded information storage memories 113 and 204 can be simplified.

図53はツリーブロック内部をツリーブロック構造で分割した一例を示す。ツリーブロックのブロックサイズは64×64とし、ツリーブロック内部を階層的に4分割し、1回目の分割で32×32ブロック(図53中の点線矩形)、2回目の分割で16×16ブロック(図53中の斜線矩形)、3回目の分割で8×8ブロック(図53中の白抜き矩形)の符号化ブロックに分割される。ここで、量子化グループを16×16の矩形ブロックとすると、量子化グループは図53の太点線で表され、量子化グループ単位に量子化パラメータの予測を行う。   FIG. 53 shows an example in which the inside of a tree block is divided by a tree block structure. The block size of the tree block is 64 × 64, the inside of the tree block is hierarchically divided into four, 32 × 32 blocks (dotted rectangle in FIG. 53) in the first division, and 16 × 16 blocks in the second division ( The hatched rectangles in FIG. 53 are divided into 8 × 8 block (white rectangles in FIG. 53) encoded blocks in the third division. Here, assuming that the quantization group is a 16 × 16 rectangular block, the quantization group is represented by a thick dotted line in FIG. 53, and the quantization parameter is predicted for each quantization group.

符号化対象の符号化ブロックが量子化グループのブロックサイズよりも大きい場合(32×32ブロック)、例えば図53の点描矩形で表される符号化ブロックの内部は量子化グループで4つに分割される。量子化グループにより4分割されているものの、この符号化ブロックの量子化パラメータは1つであるので、符号化ブロックのサイズが量子化グループより大きい場合は、符号化ブロックの量子化パラメータの予測後の差分量子化パラメータを符号化、伝送し、4つに分割された量子化グループそれぞれに対応する符号化情報格納メモリ113及び204のメモリ領域に同じ量子化パラメータを記憶する。メモリ内部で量子化パラメータが重複することになるが、量子化パラメータの予測での周囲の符号化済みブロックの量子化パラメータのアクセスしやすくなる。   When the encoding block to be encoded is larger than the quantization group block size (32 × 32 blocks), for example, the inside of the encoding block represented by the dotted rectangle in FIG. 53 is divided into four by the quantization group. The Although it is divided into four by the quantization group, there is only one quantization parameter for this coding block. Therefore, when the size of the coding block is larger than the quantization group, after the prediction of the quantization parameter of the coding block Are encoded and transmitted, and the same quantization parameter is stored in the memory areas of the encoded information storage memories 113 and 204 corresponding to the respective four quantization groups. Although the quantization parameter overlaps in the memory, it becomes easy to access the quantization parameter of the surrounding encoded block in the prediction of the quantization parameter.

符号化対象の符号化ブロックが量子化グループのブロックサイズと同じ場合(16×16ブロック)、上述した符号化ブロック単位での量子化パラメータの予測の場合と同じである。   When the encoding block to be encoded is the same as the block size of the quantization group (16 × 16 blocks), it is the same as the above-described prediction of the quantization parameter in units of encoding blocks.

符号化対象の符号化ブロックが量子化グループのブロックサイズより小さい場合(8×8ブロック)、例えば図53の白抜き矩形で表される符号化ブロックであり、量子化グループの中に4つの符号化ブロックが収納されるので、量子化グループの中の符号化ブロックは個々で量子化パラメータを備えるのではなく、量子化グループ内で1つの量子化パラメータを備え、その量子化パラメータに個々の符号化ブロックを符号化することとする。尚、量子化グループの量子化パラメータとして、量子化グループ内の4つの符号化ブロックの量子化パラメータから1つを代表値として選択、平均値等算出方法があるが、ここでは特に限定しない。   When the coding block to be coded is smaller than the block size of the quantization group (8 × 8 blocks), for example, the coding block is represented by a white rectangle in FIG. 53, and four codes are included in the quantization group. Since the quantization block is accommodated, the coding blocks in the quantization group do not have individual quantization parameters, but have one quantization parameter in the quantization group, and each quantization parameter has an individual code. The encoded block is encoded. In addition, as a quantization parameter of the quantization group, there is a method of selecting one of the quantization parameters of the four coding blocks in the quantization group as a representative value and calculating an average value, but there is no particular limitation here.

図54は符号化ブロックが量子化グループのブロックサイズより小さい場合の量子化パラメータの予測の一例を示す。図54の中の斜線矩形は符号化対象の符号化ブロック、灰色矩形は符号化ブロックを含む量子化グループが量子化パラメータの予測で使用する符号化済みブロックを示し、細実線は符号化処理順を表す。量子化パラメータの予測は、処理対象の量子化グループの左上隅の画素の位置を基準にして行う。上に近接する符号化済みブロックの量子化パラメータを予測に使用する場合は、図54の中の斜線矩形は符号化対象の符号化ブロックを含む量子化グループの左上隅の画素に対して、1画素上に近接する画素を含む符号化済みブロックの位置を算出し、その位置に該当するアドレスに記憶されている量子化パラメータを符号化情報格納メモリ113及び204から呼び出す。同様にして、左に近接する符号化済みブロックの量子化パラメータを予測に使用する場合は、符号化対象の符号化ブロックを含む量子化グループの左上隅の画素に対して、1画素左に近接する画素を含む符号化済みブロックの位置を算出し、その位置に該当するアドレスに記録されている量子化パラメータを符号化情報格納メモリ113及び204から呼び出す。符号化対象の符号化ブロックを含む量子化グループの左上隅の画素の左及び上に近接する画素を含む符号化済みブロックがツリーブロックの境界を越えている場合には、符号化対象の符号化ブロックより前、ないし直前に符号化した符号化済みブロックの量子化パラメータを使用するので、符号化で符号化情報格納メモリ113及び204に量子化パラメータを記憶した時に記憶したメモリ上のアドレスを一時記憶しておき、符号化対象の符号化ブロックより前、ないし直前の位置に該当するアドレスに記憶されている量子化パラメータを符号化情報格納メモリ113及び204から呼び出す。こうして、符号化対象の符号化ブロックの量子化パラメータの予測が可能となる。   FIG. 54 shows an example of quantization parameter prediction when the encoded block is smaller than the block size of the quantization group. In FIG. 54, the hatched rectangle indicates the encoding block to be encoded, the gray rectangle indicates the encoded block used by the quantization group including the encoding block for prediction of the quantization parameter, and the thin solid line indicates the encoding processing order. Represents. The prediction of the quantization parameter is performed with reference to the pixel position at the upper left corner of the quantization group to be processed. When the quantization parameter of the encoded block close to the top is used for prediction, the hatched rectangle in FIG. 54 is 1 for the pixel in the upper left corner of the quantization group including the encoding block to be encoded. The position of the encoded block including the pixel adjacent to the pixel is calculated, and the quantization parameter stored at the address corresponding to the position is called from the encoded information storage memories 113 and 204. Similarly, when the quantization parameter of an encoded block close to the left is used for prediction, the pixel at the upper left corner of the quantization group including the encoding block to be encoded is close to the left by one pixel. The position of the encoded block including the pixel to be calculated is calculated, and the quantization parameter recorded at the address corresponding to the position is called from the encoded information storage memories 113 and 204. When the encoded block including the pixel adjacent to the left and the upper left pixel of the quantization group including the encoding block to be encoded exceeds the boundary of the tree block, encoding of the encoding target is performed. Since the quantization parameter of the encoded block encoded before or immediately before the block is used, the memory address stored when the quantization parameter is stored in the encoded information storage memories 113 and 204 by encoding is temporarily stored. The quantization parameter stored in advance and stored at the address corresponding to the position before or immediately before the encoding block to be encoded is called from the encoding information storage memories 113 and 204. In this way, it is possible to predict the quantization parameter of the encoding block to be encoded.

以上のように、量子化グループ単位の量子化パラメータの予測も上述した符号化ブロック単位の量子化パラメータの予測と同様に行うことが可能である。   As described above, the prediction of the quantization parameter for each quantization group can be performed in the same manner as the prediction of the quantization parameter for each coding block.

尚、量子化グループのブロックサイズは、ビットストリームのヘッダー情報にブロックサイズを直接記述しても良いし、ツリーブロックサイズの1/2n倍(nは0以上の整数)にするかを表すビットシフト量を記述しても良い。例えば、ピクチャのヘッダー情報の中に、ピクチャ単位で量子化パラメータ予測を行い、差分量子化パラメータをビットストリーム中に記述し伝送するか否かを指定するフラグcu_qp_delta_enable_flagを定義し、更にフラグcu_qp_delta_enable_flagを有効とする("1"に設定)場合にのみ、量子化グループのサイズを決定するパラメータdiff_cu_qp_delta_depthをビットストリームに記述する。量子化グループのサイズは、ツリーブロックのサイズが2nで示される場合に、指数nからdiff_cu_qp_delta_depthを引いた値を指数とした2の冪乗で表されることになる。また、特にビットストリームに記述せずに、符号化と復号で暗黙に量子化グループのサイズを決めておいても良い。   Note that the block size of the quantization group may be described directly in the header information of the bitstream, or a bit shift indicating whether to make the block size 1 / 2n times (n is an integer of 0 or more) the tree block size. An amount may be described. For example, in the header information of a picture, a quantization parameter prediction is performed in units of pictures, a flag cu_qp_delta_enable_flag that specifies whether or not to transmit the differential quantization parameter in the bitstream is defined, and the flag cu_qp_delta_enable_flag is enabled Only when it is set (set to “1”), the parameter diff_cu_qp_delta_depth for determining the size of the quantization group is described in the bitstream. The size of the quantization group is represented by a power of 2 with the value obtained by subtracting diff_cu_qp_delta_depth from the index n when the tree block size is represented by 2n. In addition, the quantization group size may be determined implicitly by encoding and decoding without being described in the bitstream.

以上述べた実施の形態の動画像符号化装置が出力する動画像の符号化ストリームは、実施の形態で用いられた符号化方法に応じて復号することができるように特定のデータフォーマットを有しており、動画像符号化装置に対応する動画像復号装置がこの特定のデータフォーマットの符号化ストリームを復号することができる。   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 復号画像メモリ、 301 スイッチ、 302 メモリ、 303 第1の予測量子化パラメータ導出部、 304 第2の予測量子化パラメータ導出部、 401 スイッチ、 402 メモリ、 403 第1の予測量子化パラメータ導出部、 404 第2の予測量子化パラメータ導出部、 405 再演算判定部。   DESCRIPTION OF SYMBOLS 100 Moving image encoding apparatus, 101 Image memory, 102 Residual signal generation part, 103 Orthogonal transformation / quantization part, 104 2nd encoding bit stream generation part, 105 Inverse quantization / inverse orthogonal transformation part, 106 Decoded image signal Superimposition unit, 107 decoded image memory, 108 predicted image generation unit, 109 activity calculation unit, 110 quantization parameter calculation unit, 111 differential quantization parameter generation unit, 112 first encoded bit string generation unit, 113 encoded information storage memory 114 Predictive quantization parameter deriving unit, 115 Encoded bit stream multiplexing unit, 200 Moving picture decoding device, 201 Bit sequence separating unit, 202 First encoded bit sequence decoding unit, 203 Quantization parameter generating unit, 204 Encoding information storage memory 205 Prediction quantization parameter deriving unit 206 second encoded bit string decoding unit, 207 inverse quantization / inverse orthogonal transform unit, 208 decoded image signal superimposing unit, 209 prediction image generation unit, 210 decoded image memory, 301 switch, 302 memory, 303 first prediction quantization A parameter deriving unit, 304 a second predicted quantization parameter deriving unit, 401 switch, 402 memory, 403 first predicted quantization parameter deriving unit, 404 second predicted quantization parameter deriving unit, and 405 recalculation determining unit.

Claims (8)

動画像の各ピクチャを所定サイズで分割した第1のブロックの中を更に1つ或いは複数の第2のブロックに分割して前記動画像が符号化されたビットストリームを復号する動画像復号装置であって、
前記ビットストリームを復号して前記第2のブロックの差分量子化パラメータを抽出する復号部と、
前記第2のブロックに近接する1つ或いは複数の第3のブロックの量子化パラメータを用いて、前記第2のブロックの予測量子化パラメータを導出する予測量子化パラメータ導出部と、
前記第2のブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記第2のブロックの量子化パラメータを生成する量子化パラメータ生成部とを備え、
前記予測量子化パラメータ導出部は、前記第2のブロックに近接する前記第3のブロックが前記第1のブロックの境界を越えた位置にある場合は、前記第2のブロックより前に復号された第4のブロックの量子化パラメータを用いて前記第2のブロックの予測量子化パラメータを導出することを特徴とする動画像復号装置。
A moving picture decoding apparatus for decoding a bit stream in which a moving picture is encoded by dividing a first block obtained by dividing each picture of a moving picture into a predetermined size into one or a plurality of second blocks. There,
A decoding unit for decoding the bitstream and extracting a differential quantization parameter of the second block;
A predictive quantization parameter deriving unit for deriving a predictive quantization parameter of the second block using quantization parameters of one or more third blocks adjacent to the second block;
A quantization parameter generation unit that generates a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predicted quantization parameter;
The predictive quantization parameter derivation unit is decoded before the second block when the third block adjacent to the second block is located beyond the boundary of the first block. A moving picture decoding apparatus, wherein a predictive quantization parameter of the second block is derived using a quantization parameter of a fourth block.
前記予測量子化パラメータ導出部は、前記第3のブロックのうち前記第2のブロックの上に近接する第6のブロックが前記第1のブロックの境界を越えた位置にある場合は、前記第3のブロックのうち前記第2のブロックの左に近接する第5のブロックの量子化パラメータを前記予測量子化パラメータとして導出し、前記第6のブロックが前記第1のブロックの境界を越えていない位置にある場合は、前記第5のブロック及び前記第6のブロックの量子化パラメータに基づいて前記予測量子化パラメータを導出することを特徴とする請求項1に記載の動画像復号装置。   The predictive quantization parameter deriving unit, when the sixth block adjacent to the second block among the third blocks is located beyond the boundary of the first block, A quantization parameter of a fifth block adjacent to the left of the second block is derived as the prediction quantization parameter, and the position where the sixth block does not exceed the boundary of the first block 2. The moving picture decoding apparatus according to claim 1, wherein the predictive quantization parameter is derived based on quantization parameters of the fifth block and the sixth block. 前記予測量子化パラメータ導出部は、前記第3のブロックのうち前記第2のブロックの左に近接する第5のブロック及び前記第2のブロックの上に近接する第6のブロックが共に前記第1のブロックの境界を越えていない位置にある場合は、前記第5のブロック及び前記第6のブロックの量子化パラメータに基づいて前記予測量子化パラメータを導出し、前記第5のブロック及び前記第6のブロックのうちの一方の近接ブロックが前記第1のブロックの境界を越えた位置にある場合は、その境界を越えた位置にある近接ブロックの量子化パラメータの換わりに、前記第2のブロックより前に復号された前記第4のブロックの量子化パラメータを用いると共に、その境界を越えていない位置にある近接ブロックの量子化パラメータを用いて前記予測量子化パラメータを導出し、前記第5のブロック及び前記第6のブロックが共に前記第1のブロックの境界を越えた位置にある場合は、前記第2のブロックより前に復号された前記第4のブロックの量子化パラメータを前記予測量子化パラメータとして導出することを特徴とする請求項1に記載の動画像復号装置。   The predictive quantization parameter deriving unit includes a fifth block that is close to the left of the second block and a sixth block that is close to the second block among the third blocks. The predicted quantization parameter is derived based on the quantization parameters of the fifth block and the sixth block, and the fifth block and the sixth block If one of the neighboring blocks is located at a position beyond the boundary of the first block, instead of the quantization parameter of the neighboring block located at the position beyond the boundary, the second block Using the previously decoded quantization parameter of the fourth block and using the quantization parameter of a neighboring block that does not cross its boundary, Deriving a quantization parameter, and when the fifth block and the sixth block are both located beyond the boundary of the first block, the first block decoded before the second block The moving picture decoding apparatus according to claim 1, wherein a quantization parameter of four blocks is derived as the predicted quantization parameter. 前記予測量子化パラメータ導出部は、前記第3のブロックのうち前記第2のブロックの左に近接する第5のブロックが前記第1のブロックの境界を越えた位置にある場合は、前記第2のブロックより前に復号された前記第4のブロックの量子化パラメータを前記予測量子化パラメータとして導出し、前記第5のブロックが前記第1のブロックの境界を越えていない位置にある場合は、前記第5のブロックの量子化パラメータを前記予測量子化パラメータとして導出することを特徴とする請求項1に記載の動画像復号装置。   The predictive quantization parameter deriving unit, when the fifth block adjacent to the left of the second block among the third blocks is located beyond the boundary of the first block, When the quantization parameter of the fourth block decoded before the block of the first block is derived as the prediction quantization parameter, and the fifth block is in a position not exceeding the boundary of the first block, The moving picture decoding apparatus according to claim 1, wherein the quantization parameter of the fifth block is derived as the predicted quantization parameter. 前記第2のブロックのサイズ情報を、ビットストリームの中から抽出し、前記第2のブロックのサイズとして設定することを特徴とする請求項1から4のいずれかに記載の動画像復号装置。   5. The moving picture decoding apparatus according to claim 1, wherein size information of the second block is extracted from a bit stream and set as a size of the second block. 6. 動画像の各ピクチャを所定サイズで分割したブロックの中を更に1つ或いは複数の符号化ブロックに分割して符号化ブロック単位で前記動画像が符号化されたビットストリームを復号する動画像復号装置であって、
前記ビットストリームを復号ブロック単位に復号して復号ブロックの差分量子化パラメータを抽出する復号部と、
前記復号ブロックの動き補償予測における予測モードに応じて、前記復号ブロックに隣接する復号済みの隣接ブロックの量子化パラメータを用いて前記復号ブロックの予測量子化パラメータを導出する予測量子化パラメータ導出部と、
前記復号ブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記復号ブロックの量子化パラメータを生成する量子化パラメータ生成部とを備え、
前記予測量子化パラメータ導出部は、前記復号ブロックの所定の方向に隣接する隣接ブロックが前記所定サイズのブロックの境界を越えた位置にある場合は、前記所定の方向に隣接する隣接ブロックとは異なる他の復号済みブロックの量子化パラメータを用いて前記復号ブロックの予測量子化パラメータを導出することを特徴とする動画像復号装置。
A moving picture decoding apparatus that further divides a block obtained by dividing each picture of a moving picture by a predetermined size into one or a plurality of coding blocks and decodes a bit stream in which the moving picture is coded in units of coding blocks. Because
A decoding unit that decodes the bitstream in units of decoding blocks and extracts differential quantization parameters of the decoding blocks;
A predictive quantization parameter deriving unit for deriving a predictive quantization parameter of the decoded block using a quantization parameter of a decoded adjacent block adjacent to the decoded block according to a prediction mode in motion compensation prediction of the decoded block; ,
A quantization parameter generating unit that generates a quantization parameter of the decoded block by adding the difference quantization parameter of the decoded block and the predicted quantization parameter;
The predictive quantization parameter deriving unit is different from the adjacent block adjacent in the predetermined direction when the adjacent block adjacent to the decoded block in a predetermined direction is located beyond the boundary of the block of the predetermined size A moving picture decoding apparatus characterized by deriving a predicted quantization parameter of the decoded block using a quantization parameter of another decoded block.
動画像の各ピクチャを所定サイズで分割した第1のブロックの中を更に1つ或いは複数の第2のブロックに分割して前記動画像が符号化されたビットストリームを復号する動画像復号方法であって、
前記ビットストリームを復号して前記第2のブロックの差分量子化パラメータを抽出する復号ステップと、
前記第2のブロックに近接する1つ或いは複数の第3のブロックの量子化パラメータを用いて、前記第2のブロックの予測量子化パラメータを導出する予測量子化パラメータ導出ステップと、
前記第2のブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記第2のブロックの量子化パラメータを生成する量子化パラメータ生成ステップとを備え、
前記予測量子化パラメータ導出ステップは、前記第2のブロックに近接する前記第3のブロックが前記第1のブロックの境界を越えた位置にある場合は、前記第2のブロックより前に復号された第4のブロックの量子化パラメータを用いて前記第2のブロックの予測量子化パラメータを導出することを特徴とする動画像復号方法。
A moving picture decoding method for decoding a bit stream in which a moving picture is encoded by dividing a first block obtained by dividing each picture of a moving picture by a predetermined size into one or a plurality of second blocks. There,
A decoding step of decoding the bitstream to extract a differential quantization parameter of the second block;
A predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using a quantization parameter of one or more third blocks adjacent to the second block;
A quantization parameter generating step of generating a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predicted quantization parameter;
The predictive quantization parameter derivation step is decoded before the second block when the third block adjacent to the second block is located beyond the boundary of the first block. A moving picture decoding method, wherein a predicted quantization parameter of the second block is derived using a quantization parameter of a fourth block.
動画像の各ピクチャを所定サイズで分割した第1のブロックの中を更に1つ或いは複数の第2のブロックに分割して前記動画像が符号化されたビットストリームを復号する動画像復号プログラムであって、
前記ビットストリームを復号して前記第2のブロックの差分量子化パラメータを抽出する復号ステップと、
前記第2のブロックに近接する1つ或いは複数の第3のブロックの量子化パラメータを用いて、前記第2のブロックの予測量子化パラメータを導出する予測量子化パラメータ導出ステップと、
前記第2のブロックの差分量子化パラメータと前記予測量子化パラメータとの加算により前記第2のブロックの量子化パラメータを生成する量子化パラメータ生成ステップとをコンピュータに実行させ、
前記予測量子化パラメータ導出ステップは、前記第2のブロックに近接する前記第3のブロックが前記第1のブロックの境界を越えた位置にある場合は、前記第2のブロックより前に復号された第4のブロックの量子化パラメータを用いて前記第2のブロックの予測量子化パラメータを導出することを特徴とする動画像復号プログラム。
A moving picture decoding program for decoding a bit stream in which a moving picture is encoded by dividing a first block obtained by dividing each picture of a moving picture into a predetermined size into one or a plurality of second blocks. There,
A decoding step of decoding the bitstream to extract a differential quantization parameter of the second block;
A predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using a quantization parameter of one or more third blocks adjacent to the second block;
Causing the computer to execute a quantization parameter generation step of generating a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predicted quantization parameter;
The predictive quantization parameter derivation step is decoded before the second block when the third block adjacent to the second block is located beyond the boundary of the first block. A moving picture decoding program, wherein a predictive quantization parameter of the second block is derived using a quantization parameter of a fourth block.
JP2012279015A 2011-12-21 2012-12-21 Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program Active JP6064581B2 (en)

Priority Applications (12)

Application Number Priority Date Filing Date Title
TW106101557A TWI603611B (en) 2011-12-21 2012-12-21 Motion picture encoding apparatus, motion picture encoding method, and recording medium for moving picture encoding program
TW106132455A TWI638564B (en) 2011-12-21 2012-12-21 Dynamic image decoding device, dynamic image decoding method, and recording medium recorded with dynamic image decoding program
TW101149238A TWI578764B (en) 2011-12-21 2012-12-21 Dynamic image decoding device, dynamic image decoding method, and dynamic image decoding program
PCT/JP2012/008199 WO2013094217A1 (en) 2011-12-21 2012-12-21 Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, video decoding program
TW109101397A TWI726579B (en) 2011-12-21 2012-12-21 Moving image coding device, moving image coding method, moving image decoding device, and moving image decoding method
TW107128852A TWI685249B (en) 2011-12-21 2012-12-21 Dynamic image encoding device, dynamic image encoding method, and recording medium storing dynamic image encoding program
JP2012279015A JP6064581B2 (en) 2011-12-21 2012-12-21 Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
US14/296,032 US9667986B2 (en) 2011-12-21 2014-06-04 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
US15/497,595 US9900600B2 (en) 2011-12-21 2017-04-26 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
US15/497,677 US9743089B1 (en) 2011-12-21 2017-04-26 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
US15/498,155 US9894364B2 (en) 2011-12-21 2017-04-26 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
US15/498,150 US9936198B2 (en) 2011-12-21 2017-04-26 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

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2011280221 2011-12-21
JP2011280221 2011-12-21
JP2012279015A JP6064581B2 (en) 2011-12-21 2012-12-21 Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2016234827A Division JP6252664B2 (en) 2011-12-21 2016-12-02 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program

Publications (2)

Publication Number Publication Date
JP2013150318A true JP2013150318A (en) 2013-08-01
JP6064581B2 JP6064581B2 (en) 2017-01-25

Family

ID=49047362

Family Applications (5)

Application Number Title Priority Date Filing Date
JP2012279015A Active JP6064581B2 (en) 2011-12-21 2012-12-21 Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP2016234827A Active JP6252664B2 (en) 2011-12-21 2016-12-02 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP2017104455A Active JP6315137B2 (en) 2011-12-21 2017-05-26 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP2017104454A Active JP6315136B2 (en) 2011-12-21 2017-05-26 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP2017104456A Active JP6315138B2 (en) 2011-12-21 2017-05-26 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program

Family Applications After (4)

Application Number Title Priority Date Filing Date
JP2016234827A Active JP6252664B2 (en) 2011-12-21 2016-12-02 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP2017104455A Active JP6315137B2 (en) 2011-12-21 2017-05-26 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP2017104454A Active JP6315136B2 (en) 2011-12-21 2017-05-26 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP2017104456A Active JP6315138B2 (en) 2011-12-21 2017-05-26 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program

Country Status (1)

Country Link
JP (5) JP6064581B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542753A (en) * 2021-07-27 2021-10-22 杭州当虹科技股份有限公司 AVS3 video coding method and encoder

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8542730B2 (en) * 2008-02-22 2013-09-24 Qualcomm, Incorporated Fast macroblock delta QP decision
US20110274162A1 (en) * 2010-05-04 2011-11-10 Minhua Zhou Coding Unit Quantization Parameters in Video Coding
US9235774B2 (en) * 2010-06-10 2016-01-12 Thomson Licensing Methods and apparatus for determining quantization parameter predictors from a plurality of neighboring quantization parameters
CA2826676C (en) * 2011-03-11 2020-12-29 Sony Corporation Image processing apparatus and method
CN102685478B (en) * 2011-03-11 2015-04-29 华为技术有限公司 Encoding method and device, and decoding method and device
KR20130049523A (en) * 2011-11-04 2013-05-14 오수미 Apparatus for generating intra prediction block
KR20130049526A (en) * 2011-11-04 2013-05-14 오수미 Method for generating reconstructed block

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
JPN6013010177; Hirofumi Aoki, et al.: 'Non-CE4: Rate control friendly spatial QP prediction' Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 7th M JCTVC-G1028, 20111127, pp.1-9 *
JPN6013010180; Muhammed Coban, et al.: 'CE4 Subtest 2: QP prediction from spatially neighboring CUs (test 2.3.b, 2.3.c)' Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 6th M JCTVC-F332, 20110711, pp.1-6 *
JPN6013010181; Hiroya Nakamura, et al.: 'Non-CE4: Compatible QP prediction with RC and AQ' Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 8th M JCTVC-H0204, 20120207, pp.1-12 *
JPN6015051636; K. Sato, et al.: 'Description of Core Experiment 4: Quantization' Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 7th M JCTVC-G1204 (version 2), 20111219, pp.1-12 *
JPN6015051637; Hiroya Nakamura, et al.: 'Non-CE4 : QP prediction using spatial QP' Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 7th M JCTVC-G353, 20111123, pp.1-6 *
JPN6016022207; Thomas Wiegand, et al.: 'WD3: Working Draft 3 of High-Efficiency Video Coding' Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 5th M JCTVC-E603, 20110627 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542753A (en) * 2021-07-27 2021-10-22 杭州当虹科技股份有限公司 AVS3 video coding method and encoder
CN113542753B (en) * 2021-07-27 2022-07-08 杭州当虹科技股份有限公司 AVS3 video coding method and encoder

Also Published As

Publication number Publication date
JP6315136B2 (en) 2018-04-25
JP6252664B2 (en) 2017-12-27
JP6064581B2 (en) 2017-01-25
JP2017063489A (en) 2017-03-30
JP2017169234A (en) 2017-09-21
JP6315137B2 (en) 2018-04-25
JP2017175649A (en) 2017-09-28
JP2017175650A (en) 2017-09-28
JP6315138B2 (en) 2018-04-25

Similar Documents

Publication Publication Date Title
TWI726579B (en) Moving image coding device, moving image coding method, moving image decoding device, and moving image decoding method
WO2013088721A1 (en) Video coding device, video coding method, video coding program, video decoding device, video decoding method, and video decoding program
JP6315134B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP5664746B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
JP6315136B2 (en) Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP6070874B2 (en) Moving picture encoding apparatus, moving picture encoding method, moving picture encoding program, transmission apparatus, transmission method, and transmission program
WO2013094217A1 (en) Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, video decoding program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150331

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151222

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160614

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160621

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20161122

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161205

R150 Certificate of patent or registration of utility model

Ref document number: 6064581

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150