JP6686095B2 - Decoding device, decoding method, program, and storage medium - Google Patents

Decoding device, decoding method, program, and storage medium Download PDF

Info

Publication number
JP6686095B2
JP6686095B2 JP2018188340A JP2018188340A JP6686095B2 JP 6686095 B2 JP6686095 B2 JP 6686095B2 JP 2018188340 A JP2018188340 A JP 2018188340A JP 2018188340 A JP2018188340 A JP 2018188340A JP 6686095 B2 JP6686095 B2 JP 6686095B2
Authority
JP
Japan
Prior art keywords
block
sub
quantization parameter
decoding
reproduced
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.)
Active
Application number
JP2018188340A
Other languages
Japanese (ja)
Other versions
JP2019022224A (en
Inventor
前田 充
充 前田
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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2018188340A priority Critical patent/JP6686095B2/en
Publication of JP2019022224A publication Critical patent/JP2019022224A/en
Priority to JP2020059111A priority patent/JP6953576B2/en
Application granted granted Critical
Publication of JP6686095B2 publication Critical patent/JP6686095B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は符号化装置、符号化方法及びプログラム、復号装置、復号方法及びプログラムに関し、特に画像中の量子化パラメータの予測符号化方法に関する。   The present invention relates to a coding device, a coding method and program, a decoding device, a decoding method and program, and more particularly to a predictive coding method of a quantization parameter in an image.

動画像の圧縮記録方法として、H.264/MPEG−4 AVC(以下、H.264)が知られている(非特許文献1)。H.264は1セグメント地上波デジタル放送などで広く使われている。   As a compression recording method of a moving image, H.264 is used. H.264 / MPEG-4 AVC (hereinafter, H.264) is known (Non-Patent Document 1). H. H.264 is widely used in 1-segment digital terrestrial broadcasting.

H.264においてはmb_qp_delta符号を用いて、マクロブロック(16画素×16画素)単位に量子化パラメータを変更することできる。非特許文献1に記載されている7−23式によれば、直前に復号されたマクロブロックの量子化パラメータQPYPREVに差分値であるmb_qp_deltaを加算することで、マクロブロック(16画素×16画素)単位に量子化パラメータを変更している。 H. In H.264, the quantization parameter can be changed for each macroblock (16 pixels × 16 pixels) using the mb_qp_delta code. According to the 7-23 formula described in Non-Patent Document 1, by adding the difference value mb_qp_delta to the quantization parameter QPY PREV of the macroblock decoded immediately before, the macroblock (16 pixels × 16 pixels ) The quantization parameter is changed in units.

近年、H.264の後継としてさらに高効率な符号化方式であるHEVC(High Efficiency Video Coding)の国際標準化を行う活動が開始された。本活動では、対象となる画面サイズの増大に伴い、従来のマクロブロック(16画素×16画素)より大きなブロックサイズでの分割が検討されている。非特許文献2によれば、この大きなサイズの基本ブロックはLCTB(Largest Coding Tree Block)と呼ばれている。そのサイズは64画素×64画素として検討が進められている(非特許文献2)。LCTBはさらに分割されて、細かなサブブロックを形成し、変換や量子化等を行うサブブロックとしてCTB(Conding Tree Block)に分割される。分割の方法としてはブロック内を縦横2分割していく領域四分木構造となっている。   In recent years, H. As a successor to H.264, activities to carry out international standardization of HEVC (High Efficiency Video Coding), which is a more efficient encoding method, have been started. In this activity, with the increase of the target screen size, division with a larger block size than the conventional macroblock (16 pixels × 16 pixels) is being considered. According to Non-Patent Document 2, this large-sized basic block is called LCTB (Large Coding Tree Block). The size is being examined as 64 pixels × 64 pixels (Non-Patent Document 2). The LCTB is further divided to form fine sub-blocks, and is divided into CTBs (Condition Tree Blocks) as sub-blocks for conversion and quantization. As a dividing method, an area quadtree structure is used in which the block is divided into two vertically and horizontally.

図2(a)に領域四分木構造の様子を表す。太枠の10000は基本ブロックを表し、説明を簡易にするため、64画素×64画素の構成とする。10001と10010はサブブロックであり、16画素×16画素のサブブロックとする。10002〜10009もサブブロックであり、8画素×8画素のサブブロックとする。このように細かく分割して、変換等の符号化処理を行う。   FIG. 2A shows the state of the area quadtree structure. A thick frame 10000 represents a basic block, and has a structure of 64 pixels × 64 pixels for simplification of description. Sub-blocks 10001 and 10010 are 16-pixel × 16-pixel sub-blocks. 10002 to 10009 are also sub-blocks, which are sub-blocks of 8 pixels × 8 pixels. In this way, the data is finely divided and encoding processing such as conversion is performed.

ISO/IEC 14496−10;2004 Information technology――Coding of audio−visual objects ―― Part 10: Advanced Video CodingISO / IEC 14496-10; 2004 Information technology--Coding of audio-visual objects--Part 10: Advanced Video Coding JCT−VC 寄書 JCTVC−A205.doc < http://wftp3.itu.int/av−arch/jctvc−site/2010_04_A_Dresden/>JCT-VC Contribution JCTVC-A205. doc <http: // wftp3. itu. int / av-arch / jctvc-site / 2010_04_A_Dresden />

HEVCにおいて、量子化パラメータの制御をH.264のマクロブロックと同様に基本ブロック単位で行うことが考えられている。しかしながら、実際にはサブブロック単位で量子化パラメータ制御を行うことが画質の観点から望ましい。この場合、サブブロック単位で量子化パラメータ制御を行うことにより、より細かい単位での量子化ができることが期待できる。   In HEVC, the control of the quantization parameter is controlled by H.264. Like the H.264 macroblock, it is considered to be performed in basic block units. However, in practice, it is desirable to perform the quantization parameter control in sub-block units from the viewpoint of image quality. In this case, it can be expected that quantization can be performed in smaller units by controlling the quantization parameter in sub-block units.

しかしながら、より細かい単位での量子化ができても、領域四分木構造に従って処理が行われるので、サブブロック単位での並列処理を効率よく行えず、符号化・復号処理の高速化を図ることができなかった。具体的には、図2(a)において、16画素×16画素のサブブロック10001につづき、8画素×8画素のサブブロック10002から10009が番号の順に処理され、最後に16画素×16画素のサブブロック10010が処理される。前のサブブロックの量子化パラメータを予測値として差分でそれぞれのサブブロックの量子化パラメータが算出されるため、これらは逐次処理を行う必要がある。このため、サブブロック単位での並列処理が効率よく行えないことになる。   However, even if quantization can be performed in smaller units, the processing is performed according to the area quadtree structure, so parallel processing cannot be performed efficiently in sub-block units, and encoding / decoding processing can be speeded up. I couldn't. Specifically, in FIG. 2A, sub-block 10001 of 16 pixels × 16 pixels, sub-blocks 10002 to 10009 of 8 pixels × 8 pixels are processed in numerical order, and finally, sub-blocks of 16 pixels × 16 pixels are processed. Sub-block 10010 is processed. Since the quantization parameter of each sub-block is calculated by the difference using the quantization parameter of the previous sub-block as a prediction value, it is necessary to sequentially perform these. Therefore, parallel processing cannot be performed efficiently in sub-block units.

さらに、各サブブロックで量子化パラメータの最適化を図った場合、量子化パラメータの差分値の取得は領域四分木構造に従って処理が行われるため、差分値にばらつきが発生する。例えば、図2(b)に各サブブロックの中央に量子化パラメータ値を示す。本図では左上から右下に量子化パラメータ値がなだらかに変化した場合を想定している。このような場合は通常の自然画像では起こりやすい現象である。サブブロック10001の量子化パラメータは12であり、サブブロック10002ではその差分が+2となる。順に、+4、−6、+6、−6、±0、+2、+4、+2となっている。このように領域四分木構造に従った場合、値が乱高下するため、発生する符号が大きくなるといった問題が生じる。   Furthermore, when the quantization parameter is optimized in each sub-block, the difference value of the quantization parameter is acquired according to the area quadtree structure, so that the difference value varies. For example, the quantization parameter value is shown in the center of each sub-block in FIG. In this figure, it is assumed that the quantization parameter value changes from upper left to lower right. Such a case is a phenomenon that easily occurs in a normal natural image. The subblock 10001 has a quantization parameter of 12, and the subblock 10002 has a difference of +2. In order, +4, -6, +6, -6, ± 0, +2, +4, +2. In this way, when the area quadtree structure is followed, the values fluctuate so much that the generated code becomes large.

したがって、本発明は上述した課題を解決するためになされたものであり、各サブブロックの符号化・復号を並列に行うことを可能とし、高速な処理を実現するとともに高効率の量子化パラメータ符号化・復号を実現することを目的としている。   Therefore, the present invention has been made in order to solve the above-mentioned problems, and enables encoding / decoding of each sub-block in parallel, realizes high-speed processing and achieves a highly efficient quantization parameter code. It is intended to realize encryption / decryption.

上述の問題点を解決するため、本発明の復号装置は以下の構成を有する。すなわち、四分木構造によって表現される複数のブロックのうちの1つのブロックに含まれるサブブロックの量子化パラメータと所定のパラメータとの差分値に関する符号データを復号する復号手段と、
前記所定のパラメータとしての第1のサブブロックの量子化パラメータと、前記復号手段によって取得された差分値とを加算することにより、前記第1のサブブロックより後に符号化された第2のサブブロックの量子化パラメータを取得し、
前記所定のパラメータとして、第3のサブブロックより前に符号化された少なくとも2つのサブブロックの量子化パラメータの平均を四捨五入した値に基づくパラメータと、前記復号手段によって取得された差分値とを加算することにより、前記第3のサブブロックの量子化パラメータを取得する取得手段と、
前記第1のサブブロック、前記第2のサブブロック、および前記第3のサブブロックの量子化された係数を復号する係数復号手段と、
前記取得手段によって取得された第1の量子化パラメータを用いて前記第1のサブブロックの量子化された係数を逆量子化することにより、前記第1のサブブロックの直交変換係数を再生し、前記取得手段によって取得された第2の量子化パラメータを用いて前記第2のサブブロックの量子化された係数を逆量子化することにより、前記第2のサブブロックの直交変換係数を再生し、前記取得手段によって取得された第3の量子化パラメータを用いて前記第3のサブブロックの量子化された係数を逆量子化することにより、前記第3のサブブロックの直交変換係数を再生する逆量子化手段と、
前記逆量子化手段によって再生された前記第1のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第1のサブブロックの予測誤差を再生し、前記逆量子化手段によって再生された前記第2のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第2のサブブロックの予測誤差を再生し、前記逆量子化手段によって再生された前記第3のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第3のサブブロックの予測誤差を再生する逆変換手段と、
前記逆変換手段によって再生された前記第1のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第1のサブブロックの画像を再生し、前記逆変換手段によって再生された前記第2のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第2のサブブロックの画像を再生し、および前記逆変換手段によって再生された前記第3のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第3のサブブロックの画像を再生する再生手段と、
を備えることを特徴とする。
In order to solve the above problems, the decoding device of the present invention has the following configuration. That is, a decoding unit that decodes coded data relating to a difference value between a quantization parameter of a sub-block included in one block of a plurality of blocks represented by a quadtree structure and a predetermined parameter,
A second sub-block coded after the first sub-block by adding the quantization parameter of the first sub-block as the predetermined parameter and the difference value acquired by the decoding means. Get the quantization parameter of
As the predetermined parameter, a parameter based on a value obtained by rounding off the average of the quantization parameters of at least two sub-blocks encoded before the third sub-block and the difference value obtained by the decoding means are added. Acquisition means for acquiring the quantization parameter of the third sub-block,
Coefficient decoding means for decoding the quantized coefficients of the first sub-block, the second sub-block, and the third sub-block,
Dequantizing the quantized coefficient of the first sub-block using the first quantization parameter acquired by the acquisition means to reproduce the orthogonal transform coefficient of the first sub-block, Dequantizing the quantized coefficient of the second sub-block using the second quantization parameter acquired by the acquisition means to reproduce the orthogonal transform coefficient of the second sub-block, Inverse of reconstructing the orthogonal transform coefficient of the third sub-block by dequantizing the quantized coefficient of the third sub-block using the third quantization parameter obtained by the obtaining means. Quantizing means,
The prediction error of the first sub-block is reproduced by performing an inverse orthogonal transform on the orthogonal transform coefficient of the first sub-block reproduced by the inverse quantizer, and is reproduced by the inverse quantizer. The prediction error of the second sub-block is reproduced by performing the inverse orthogonal transform on the orthogonal transform coefficient of the second sub-block, and the third sub-block of the third sub-block reproduced by the inverse quantizer is reproduced. Inverse transform means for reproducing the prediction error of the third sub-block by performing inverse orthogonal transform on the orthogonal transform coefficient;
Reproducing the image of the first sub-block based on the prediction error of the first sub-block reproduced by the inverse transforming means and the decoded pixel data of the surroundings or the pixel data of the previous frame, Reproducing the image of the second sub-block based on the prediction error of the second sub-block reproduced by the inverse transforming means, and the decoded pixel data of the surroundings or the pixel data of the previous frame, and Reproducing means for reproducing the image of the third sub-block based on the prediction error of the third sub-block reproduced by the inverse transforming means and the decoded pixel data of the surroundings or the pixel data of the previous frame. ,
It is characterized by including.

本発明により、符号量を抑え、かつ高効率の処理で量子化パラメータの符号化・復号が可能になる。   According to the present invention, it is possible to encode / decode a quantization parameter with high efficiency processing while suppressing the code amount.

実施形態1における画像符号化装置の構成を示すブロック図FIG. 3 is a block diagram showing the configuration of the image encoding device according to the first embodiment. ブロック分割の一例を示す図Diagram showing an example of block division 実施形態1に係る画像符号化装置における量子化パラメータ符号化部の詳細なブロック図Detailed block diagram of the quantization parameter coding unit in the image coding apparatus according to the first embodiment. 実施形態1に係る画像符号化装置における画像符号化処理を示すフローチャートThe flowchart which shows the image coding process in the image coding apparatus which concerns on Embodiment 1. 符号化時の並列処理を表す図Diagram showing parallel processing during encoding 実施形態2に係る画像復号装置の構成を示すブロック図3 is a block diagram showing the configuration of an image decoding device according to Embodiment 2. FIG. 実施形態2に係る量子化パラメータ復号部の詳細なブロック図Detailed block diagram of the quantization parameter decoding unit according to the second embodiment 実施形態2における画像復号装置における画像復号処理を示すフローチャートThe flowchart which shows the image decoding process in the image decoding apparatus in Embodiment 2. 復号時の並列処理を表す図Diagram showing parallel processing at the time of decoding 実施形態3に係る画像符号化装置の構成を示すブロック図FIG. 3 is a block diagram showing the configuration of an image encoding device according to a third embodiment. 実施形態3に係る画像符号化装置における量子化パラメータ符号化部の詳細なブロック図Detailed block diagram of the quantization parameter coding unit in the image coding apparatus according to the third embodiment. 実施形態3に係る画像符号化装置における画像符号化処理を示すフローチャートThe flowchart which shows the image coding process in the image coding apparatus which concerns on Embodiment 3. 実施形態4に係る画像復号装置の構成を示すブロック図A block diagram showing a configuration of an image decoding apparatus according to a fourth embodiment. 実施形態4に係る画像復号装置における量子化パラメータ復号部の詳細なブロック図Detailed block diagram of the quantization parameter decoding unit in the image decoding device according to the fourth embodiment. 実施形態2における画像復号装置における画像復号処理を示すフローチャートThe flowchart which shows the image decoding process in the image decoding apparatus in Embodiment 2. 実施形態5に係る画像符号化装置における量子化パラメータ符号化部の詳細なブロック図Detailed block diagram of the quantization parameter coding unit in the image coding apparatus according to the fifth embodiment. 実施形態5に係る画像符号化装置における画像符号化処理を示すフローチャートThe flowchart which shows the image coding process in the image coding apparatus which concerns on Embodiment 5. 実施形態6に係る画像復号装置における量子化パラメータ復号部の詳細なブロック図Detailed block diagram of the quantization parameter decoding unit in the image decoding device according to the sixth embodiment. 実施形態6における画像復号装置における画像復号処理を示すフローチャートThe flowchart which shows the image decoding process in the image decoding apparatus in Embodiment 6. 本発明の画像符号化装置、復号装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図Block diagram showing a configuration example of computer hardware applicable to the image encoding device and the decoding device of the present invention

以下、添付の図面を参照して、本願発明をその好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。   Hereinafter, the present invention will be described in detail based on its preferred embodiments with reference to the accompanying drawings. The configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations.

<実施形態1>
以下、本発明の実施形態を、図面を用いて説明する。図1は本実施形態の画像符号化装置を示すブロック図である。図1において、1000は画像データを入力する端子である。
1001は入力画像を複数の基本ブロック単位でブロックを切り出し、必要に応じてサブブロックに分割するブロック分割部である。量子化制御はサブブロック単位で行うことになる。説明を容易にするために、入力画像は8ビットの画素値を持つこととするが、これに限定されない。また、基本ブロックのサイズを64画素×64画素とし、サブブロックの最小サイズを8画素×8画素とする。この場合、基本ブロックは、4つのサブブロックを包含することになる。またブロックの分割に関しては縦横1/2のサイズに4分割する方法を例にとって説明するが、これにブロックの形状、サイズは限定されない。基本ブロックはサブブロックを最低限2つ以上包含していればよい。サブブロックの分割に関しては、特に限定されない。例えば全体をサブブロックに分割し、エッジ量などを算出しクラスタリングして分割を行っても構わない。すなわち、エッジが多く集まる部分は細かくサブブロックを設定し、平坦な部分は大きなサブブロックを設定する。1002は基本ブロックの量子化パラメータ、および各サブブロックの量子化パラメータを決定する量子化パラメータ決定部である。
<Embodiment 1>
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an image coding apparatus according to this embodiment. In FIG. 1, 1000 is a terminal for inputting image data.
Reference numeral 1001 denotes a block dividing unit that cuts out the input image into a plurality of basic block units and divides the blocks into sub-blocks as necessary. Quantization control will be performed in sub-block units. For ease of explanation, the input image has an 8-bit pixel value, but is not limited to this. The size of the basic block is 64 pixels × 64 pixels, and the minimum size of the sub block is 8 pixels × 8 pixels. In this case, the basic block will include four sub-blocks. Further, regarding division of blocks, a method of dividing into four vertically and horizontally ½ size will be described as an example, but the shape and size of the block are not limited to this. The basic block may include at least two sub-blocks. The sub-block division is not particularly limited. For example, the whole may be divided into sub-blocks, the edge amount or the like may be calculated, and clustering may be performed. That is, a subblock is set finely in a portion where many edges are gathered, and a large subblock is set in a flat portion. Reference numeral 1002 denotes a quantization parameter determination unit that determines the quantization parameter of the basic block and the quantization parameter of each sub block.

1003はブロック分割部1001で分割された各サブブロックを、サブブロック単位で予測を行い、各サブブロックの予測誤差を算出するブロック予測部である。静止画または動画の場合のイントラフレームではイントラ予測を行い、動画の場合は動き補償予測も行うものとする。1004は各サブブロックの予測誤差に対して直交変換を行い、直交変換係数を算出するブロック変換部である。直交変換に関しては特に限定しないが、離散コサイン変換やアダマール変換等を用いてもよい。1005は量子化パラメータ決定部1002で決定されたサブブロック単位の量子化パラメータによって前記直交変換係数を量子化するブロック量子化部である。この量子化によって量子化係数を得ることができる。1006はこのようにして得られたサブブロック単位の量子化係数を可変長符号化して量子化係数符号データを生成するブロック符号化部である。符号化の方法は特に限定しないが、ハフマン符号や算術符号等を用いることができる。1007はブロック再生画像生成部である。ブロック量子化部、ブロック変換部1004の逆の動作を行って予測誤差を再生し、ブロック予測部1003の結果から基本ブロックの復号画像を生成する。再生された画像データは保持され、ブロック予測部1003での予測に用いられる。   Reference numeral 1003 denotes a block predicting unit that predicts each subblock divided by the block dividing unit 1001 in subblock units and calculates a prediction error of each subblock. Intra prediction is performed for intra frames in the case of still images or moving images, and motion compensation prediction is also performed for moving images. A block transform unit 1004 performs orthogonal transform on the prediction error of each sub-block to calculate orthogonal transform coefficients. The orthogonal transform is not particularly limited, but discrete cosine transform, Hadamard transform, or the like may be used. Reference numeral 1005 denotes a block quantizer that quantizes the orthogonal transform coefficient according to the quantization parameter for each sub-block determined by the quantization parameter determiner 1002. A quantization coefficient can be obtained by this quantization. Reference numeral 1006 denotes a block coding unit that performs variable-length coding on the thus obtained quantized coefficient in sub-block units to generate quantized coefficient code data. The encoding method is not particularly limited, but Huffman code, arithmetic code, or the like can be used. Reference numeral 1007 is a block reproduction image generation unit. The block quantization unit and the block conversion unit 1004 perform the opposite operations to reproduce the prediction error, and generate a decoded image of the basic block from the result of the block prediction unit 1003. The reproduced image data is held and used for prediction in the block prediction unit 1003.

1008は量子化パラメータ決定部1002で決定した基本ブロックの量子化パラメータおよび各サブブロックの量子化パラメータを符号化して量子化パラメータ符号データを生成する量子化パラメータ符号化部である。   Reference numeral 1008 denotes a quantization parameter encoding unit that encodes the quantization parameter of the basic block and the quantization parameter of each sub block determined by the quantization parameter determination unit 1002 to generate quantization parameter code data.

1009は統合符号化部である。ヘッダ情報や予測に関する符号を生成するとともに、量子化パラメータ符号化部1008で生成された量子化パラメータ符号データおよびブロック符号化部1006で生成された量子化係数符号データを統合する。1010は端子であり、統合符号化部1009で統合されて生成されたビットストリームを外部に出力する端子である。   Reference numeral 1009 is an integrated encoding unit. Codes relating to header information and prediction are generated, and the quantization parameter code data generated by the quantization parameter coding unit 1008 and the quantization coefficient code data generated by the block coding unit 1006 are integrated. Reference numeral 1010 denotes a terminal, which is a terminal for outputting the bit stream integrated and generated by the integrated encoding unit 1009 to the outside.

上記画像符号化装置における画像の符号化動作を以下に説明する。本実施形態では動画像データをフレーム単位に入力する構成となっているが、1フレーム分の静止画像データを入力する構成としても構わない。   An image encoding operation in the image encoding device will be described below. In the present embodiment, moving image data is input in frame units, but still image data for one frame may be input.

端子1000から入力された1フレーム分の画像データはブロック分割部1001に入力され、64画素×64画素の基本ブロックに分割される。さらに必要に応じて最小8画素×8画素のサブブロックに分割される。サブブロックの分割に関する情報と分割された画像データは量子化パラメータ決定部1002とブロック予測部1003に入力される。   The image data for one frame input from the terminal 1000 is input to the block division unit 1001 and divided into basic blocks of 64 pixels × 64 pixels. Further, it is divided into subblocks of a minimum of 8 pixels × 8 pixels as needed. Information regarding sub-block division and the divided image data are input to the quantization parameter determination unit 1002 and the block prediction unit 1003.

ブロック予測部1003ではブロック再生画像生成部1007に保持されている再生画像を参照して予測を行い、予測誤差を生成してブロック変換部1004及びブロック再生画像生成部1007に入力する。ブロック変換部1004では入力された予測誤差に対して直交変換を行い、直交変換係数を求め、ブロック量子化部1005に入力する。   The block prediction unit 1003 performs prediction by referring to the reproduction image held in the block reproduction image generation unit 1007, generates a prediction error, and inputs the prediction error to the block conversion unit 1004 and the block reproduction image generation unit 1007. The block transform unit 1004 performs an orthogonal transform on the input prediction error to obtain an orthogonal transform coefficient, which is input to the block quantizer 1005.

一方、量子化パラメータ決定部1002では入力された各サブブロック単位で発生した符号量を鑑みて、サブブロック単位で画質と符号量のバランスから最適な量子化パラメータを決定する。例えば、特開平4−323961号公報に記載されているような手法を用いることができる。決定された各サブブロックの量子化パラメータはブロック量子化部1005、ブロック再生画像生成部1007、量子化パラメータ符号化部1008に入力される。   On the other hand, the quantization parameter determination unit 1002 determines the optimum quantization parameter for each sub-block unit from the balance between the image quality and the code amount, in consideration of the input code amount generated for each sub-block unit. For example, the method described in Japanese Patent Laid-Open No. 4-323961 can be used. The determined quantization parameter of each sub-block is input to the block quantization unit 1005, the block reproduction image generation unit 1007, and the quantization parameter coding unit 1008.

ブロック量子化部1005において、ブロック変換部1004から出力された直交変換係数を量子化パラメータ決定部1002で決定した量子化パラメータで量子化して量子化係数を生成する。生成された量子化係数はブロック符号化部1006とブロック再生画像生成部1007に入力される。ブロック再生画像生成部1007では入力された量子化係数を量子化パラメータ決定部1002で決定した量子化パラメータで直交変換係数を再生する。直交変換係数は逆直交変換されて予測誤差を再生する。再生された予測誤差は予測時に参照した画素値等によって再生画像として生成され、保持される。一方、ブロック符号化部1006では量子化係数を符号化し、量子化係数符号データを生成して統合符号化部1009に出力する。   The block quantization unit 1005 quantizes the orthogonal transform coefficient output from the block transform unit 1004 with the quantization parameter determined by the quantization parameter determination unit 1002 to generate a quantized coefficient. The generated quantized coefficient is input to the block encoding unit 1006 and the block reproduction image generation unit 1007. The block reproduction image generation unit 1007 reproduces the input quantized coefficient with the quantization parameter determined by the quantization parameter determination unit 1002. The orthogonal transform coefficient is inverse orthogonally transformed to reproduce the prediction error. The reproduced prediction error is generated and held as a reproduced image based on the pixel value or the like referred to during prediction. On the other hand, the block coding unit 1006 codes the quantized coefficient, generates quantized coefficient code data, and outputs the quantized coefficient code data to the integrated coding unit 1009.

量子化パラメータ決定部1002で決定された量子化パラメータは量子化パラメータ符号化部1008で基本ブロック単位に符号化される。   The quantization parameter determined by the quantization parameter determination unit 1002 is encoded by the quantization parameter encoding unit 1008 in basic block units.

図3に量子化パラメータ符号化部1008の詳細なブロック図を示す。図3において、1は図1の量子化パラメータ決定部1002から各サブブロックの量子化パラメータを入力する端子である。2は入力された各サブブロックの量子化パラメータを一旦格納する量子化パラメータ保持部である。3は格納された各サブブロックの量子化パラメータから基本ブロックの量子化パラメータを決定する基本ブロック量子化パラメータ決定部である。4は基本ブロック量子化パラメータを符号化して基本ブロック量子化パラメータ符号を生成する基本ブロック量子化パラメータ符号化部である。5は生成された基本ブロック量子化パラメータ符号を図1の統合符号化部1009に出力する端子である。6は基本ブロック量子化パラメータを用いて各サブブロックの量子化パラメータとの差分を求めるサブブロック量子化パラメータ差分部である。7は前記差分を符号化してサブブロック量子化パラメータ差分値符号を生成するサブブロック量子化パラメータ符号化部である。8はサブブロック量子化パラメータ符号を図1の統合符号化部1009に出力する端子である。   FIG. 3 shows a detailed block diagram of the quantization parameter coding unit 1008. In FIG. 3, reference numeral 1 is a terminal for inputting the quantization parameter of each sub-block from the quantization parameter determination unit 1002 of FIG. Reference numeral 2 is a quantization parameter holding unit that temporarily stores the input quantization parameter of each sub-block. Reference numeral 3 is a basic block quantization parameter determination unit that determines the quantization parameter of the basic block from the stored quantization parameter of each sub block. Reference numeral 4 denotes a basic block quantization parameter coding unit that codes a basic block quantization parameter to generate a basic block quantization parameter code. Reference numeral 5 is a terminal for outputting the generated basic block quantization parameter code to the integrated coding unit 1009 in FIG. Reference numeral 6 denotes a sub-block quantization parameter difference unit that obtains a difference from the quantization parameter of each sub-block using the basic block quantization parameter. Reference numeral 7 denotes a sub-block quantization parameter coding unit that codes the difference to generate a sub-block quantization parameter difference value code. Reference numeral 8 is a terminal for outputting the sub-block quantization parameter code to the integrated coding unit 1009 in FIG.

以上の構成において、量子化パラメータ保持部2は端子1から入力されるサブブロック量子化パラメータを基本ブロック単位で格納する。格納されたら、基本ブロック量子化パラメータ決定部3は基本ブロック量子化パラメータ算出を行う。本実施形態ではサブブロック量子化パラメータの平均値を算出する。図2(b)の場合、その平均値は14.6となる。量子化パラメータの符号化が整数単位であれば、四捨五入を行い、基本ブロック量子化パラメータを15とする。決定された基本ブロック量子化パラメータは基本ブロック量子化パラメータ符号化部4とサブブロック量子化パラメータ差分部6に入力される。基本ブロック量子化パラメータ符号化部4は入力された基本ブロック量子化パラメータをゴロム符号化で符号化し、基本ブロック量子化パラメータ符号を生成して端子5を経由して出力する。   In the above configuration, the quantization parameter holding unit 2 stores the sub-block quantization parameter input from the terminal 1 in basic block units. Once stored, the basic block quantization parameter determination unit 3 calculates a basic block quantization parameter. In this embodiment, the average value of the sub-block quantization parameters is calculated. In the case of FIG. 2B, the average value is 14.6. If the coding of the quantization parameter is an integer unit, it is rounded off and the basic block quantization parameter is set to 15. The determined basic block quantization parameter is input to the basic block quantization parameter coding unit 4 and the sub block quantization parameter difference unit 6. The basic block quantization parameter coding unit 4 codes the input basic block quantization parameter by Golomb coding, generates a basic block quantization parameter code, and outputs it via a terminal 5.

一方、サブブロック量子化パラメータ差分部6では各サブブロック量子化パラメータと基本ブロック量子化パラメータとの差分を算出する。図2(b)の場合、差分値は領域四分木構造の順で−3、−1、+3、−3、+3、−3、−3、−1、−1、+5となる。これらの差分値はサブブロック量子化パラメータ符号化部7に入力される。サブブロック量子化パラメータ符号化部7ではこれらの値を変化の有無とともに符号化する。まず、最初のサブブロック10001の量子化パラメータは基本ブロック量子化パラメータの15とは異なる。そこで、変化があったことを表す1ビットの値“1”と差分値“−3”をゴロム符号化によって符号化し、サブブロック量子化パラメータ差分値符号化データとして端子8から出力する。続いて、第2番目のサブブロック10002のサブブロック量子化パラメータの差分値を符号化する。この差分値は基本ブロック量子化パラメータと異なるため、変化があったことを表す1ビットの値“1”と−1をゴロム符号化した符号を端子8から出力する。以後、同様に変化があったことを表す1ビットの値“1”とサブブロック量子化パラメータの差分値を符号化し、サブブロック量子化パラメータ差分値符号化データを生成する。   On the other hand, the sub-block quantization parameter difference unit 6 calculates the difference between each sub-block quantization parameter and the basic block quantization parameter. In the case of FIG. 2B, the difference values are -3, -1, +3, -3, +3, -3, -3, -1, -1, +5 in the order of the area quadtree structure. These difference values are input to the sub-block quantization parameter coding unit 7. The sub-block quantization parameter coding unit 7 codes these values together with the presence or absence of changes. First, the quantization parameter of the first sub-block 10001 is different from the basic block quantization parameter of 15. Therefore, the 1-bit value "1" indicating that there has been a change and the difference value "-3" are encoded by Golomb encoding and output from the terminal 8 as sub-block quantization parameter difference value encoded data. Then, the difference value of the sub-block quantization parameter of the second sub-block 10002 is encoded. Since this difference value is different from the basic block quantization parameter, a code obtained by Golomb-coding 1-bit values “1” and −1 indicating that there is a change is output from the terminal 8. Thereafter, similarly, a 1-bit value "1" indicating that there is a change and the difference value between the sub-block quantization parameters are encoded to generate sub-block quantization parameter difference value encoded data.

図1に戻り、統合符号化部1009は画像のシーケンス、フレームのヘッダといった符号を生成し、各基本ブロックに関しては、ブロック予測部1003から予測のモードといった情報を取得して符号化する。続いて量子化パラメータ符号化部1008から基本ブロック量子化パラメータ符号を入力する。以後、サブブロックごとにサブブロック量子化パラメータ差分値符号化データと各量子化係数符号データを統合してビットストリームとして端子1010から出力する。   Returning to FIG. 1, the integrated encoding unit 1009 generates a code such as an image sequence and a frame header, and acquires information such as a prediction mode from the block prediction unit 1003 and encodes each basic block. Then, the basic block quantization parameter code is input from the quantization parameter coding unit 1008. After that, the sub-block quantization parameter difference value encoded data and each quantized coefficient encoded data are integrated for each sub-block and output from the terminal 1010 as a bit stream.

図4は、実施形態1に係る画像符号化装置における画像符号化処理を示すフローチャートである。まず、ステップS001にて、統合符号化部1009はシーケンス、フレームのヘッダといった符号を生成して出力する。   FIG. 4 is a flowchart showing an image coding process in the image coding apparatus according to the first embodiment. First, in step S001, the integrated coding unit 1009 generates and outputs a code such as a sequence or a frame header.

ステップS002にて、ブロック分割部1001は入力された画像に対して、基本ブロックを画像の左上から順に切り出す。   In step S002, the block division unit 1001 sequentially cuts out the basic blocks of the input image from the upper left of the image.

ステップS003にて、ブロック分割部1001はさらに基本ブロックをサブブロックに分割する。   In step S003, the block division unit 1001 further divides the basic block into sub-blocks.

ステップS004にて、各サブブロックの量子化パラメータを決定する。ステップS005にて、ステップS004で求められたサブブロック量子化パラメータから基本ブロックの量子化パラメータを決定する。本実施例では説明のため、基本ブロック内のサブブロックの量子化パラメータの平均値を基本ブロックの量子化パラメータとして算出する。   In step S004, the quantization parameter of each sub-block is determined. In step S005, the quantization parameter of the basic block is determined from the sub-block quantization parameter obtained in step S004. In this embodiment, for the sake of explanation, the average value of the quantization parameters of the sub-blocks in the basic block is calculated as the quantization parameter of the basic block.

ステップS006にて、ステップS005で決定された基本ブロック量子化パラメータをゴロム符号化して基本ブロック量子化パラメータ符号として出力する。   In step S006, the basic block quantization parameter determined in step S005 is Golomb encoded and output as a basic block quantization parameter code.

ステップS007にて、サブブロック単位でサブブロック量子化パラメータの符号化を行う。領域四分木構造の順で基本ブロックと同じ量子化パラメータを使用する場合は1ビットの符号“0”を符号として出力する。異なる場合は、1ビットの符号“1”に続いてサブブロック量子化パラメータと基本ブロック量子化パラメータとの差分を符号化して出力する。   In step S007, the sub-block quantization parameter is encoded in sub-block units. When the same quantization parameter as that of the basic block is used in the order of the area quadtree structure, the 1-bit code “0” is output as the code. If they are different, the difference between the sub-block quantization parameter and the basic block quantization parameter is encoded and output following the 1-bit code “1”.

ステップS008にて、サブブロックの画像データに対して、予測を行い、予測誤差に対して、直交変換、量子化を行い、得られた量子化係数を符号化して量子化係数符号データを出力する。   In step S008, prediction is performed on the image data of the sub block, orthogonal transformation and quantization are performed on the prediction error, the obtained quantized coefficient is encoded, and quantized coefficient code data is output. .

ステップS009にて、得られた量子化係数を逆量子化、逆変換を行い、予測誤差を算出する。この予測誤差と再生画像からの予測値から当該サブブロックの再生画像を生成する。   In step S009, the obtained quantized coefficient is inversely quantized and inversely transformed to calculate a prediction error. A reproduced image of the sub-block is generated from the prediction error and the predicted value from the reproduced image.

ステップS010にて、画像符号化装置は、当該基本ブロック内の全てのサブブロックの符号化が終了したか否かの判定を行い、終了していればステップS011に進み、終了していなければ次のサブブロックを対象としてステップS007に戻る。   In step S010, the image coding apparatus determines whether or not coding of all sub-blocks in the basic block is completed. If completed, the process proceeds to step S011. The process returns to step S007 for the sub-block of.

ステップS011にて、画像符号化装置は、全ての基本ブロックの符号化が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次の基本ブロックを対象としてステップS002に戻る。   In step S011, the image coding apparatus determines whether or not coding of all basic blocks is completed, and if completed, stops all operations and terminates processing, and otherwise. The process returns to step S002 for the next basic block.

以上の構成と動作により、特にステップS005からステップS009の処理により、基本ブロック量子化パラメータを用いて各サブブロック量子化パラメータの差分値を符号化することで発生する符号量を抑制することができる。   With the above configuration and operation, the amount of code generated by encoding the difference value of each sub-block quantization parameter using the basic block quantization parameter can be suppressed, particularly by the processing of steps S005 to S009. .

なお、本実施形態では平均値をそのまま用いたが、これに限定されず、平均値に最も近い実在するサブブロック量子化パラメータを選択しても構わない。例えば、図2(b)の例では平均値は前述の通り14.6であるが、四捨五入ではなく、最も近い実在するサブブロック量子化パラメータの値、14を用いても構わない。このようにすることで変化を表す符号を“0”とすることができ、伝送するサブブロック量子化パラメータ差分値もより少なくできる。   Although the average value is used as it is in the present embodiment, the present invention is not limited to this, and an actual sub-block quantization parameter closest to the average value may be selected. For example, in the example of FIG. 2B, the average value is 14.6 as described above, but the nearest real sub-block quantization parameter value, 14, may be used instead of rounding. By doing so, the code indicating the change can be set to “0”, and the sub-block quantization parameter difference value to be transmitted can be further reduced.

さらに本構成において、予測、量子化、変換、符号化を並列に効率よく行うことが可能になり、高速化を図ることができる効果もある。   Further, in this configuration, prediction, quantization, conversion, and encoding can be efficiently performed in parallel, and there is an effect that speedup can be achieved.

図5に、図2(a)に示した基本ブロックのサブブロックを量子化・変換・符号化する例を示す。ここでは説明のために符号化処理に使用するプロセッサを3つと仮定する。これらのプロセッサ(A〜C)で各サブブロックの量子化パラメータ(QP)の算出、量子化パラメータ差分値(ΔQP)の算出・符号化、予測誤差の直交変換・量子化、量子化係数の符号化を行う場合を例にとる。この時、別プロセッサでこれらの符号を統合することとする。   FIG. 5 shows an example of quantizing / transforming / encoding the sub-block of the basic block shown in FIG. Here, for the sake of explanation, it is assumed that there are three processors used in the encoding process. These processors (A to C) calculate the quantization parameter (QP) of each sub-block, calculate and encode the quantization parameter difference value (ΔQP), orthogonally transform and quantize the prediction error, and code the quantization coefficient. Take the case of conversion as an example. At this time, these codes are integrated by another processor.

図5(a)は従来の並列処理の例を表した図である。最初にプロセッサAにサブブロック10001の処理を、プロセッサBにサブブロック10002の処理を、プロセッサCにサブブロック10003の処理を割り当てる。QPの算出に関してはブロックの大きさや画像の複雑度等によって処理時間が変わる。ブロックサイズの大きいサブブロック10001の量子化パラメータ算出はサブブロック10002やサブブロック10003より時間がかかる傾向にある。   FIG. 5A is a diagram showing an example of conventional parallel processing. First, the processor A is assigned the processing of the sub-block 10001, the processor B is assigned the processing of the sub-block 10002, and the processor C is assigned the processing of the sub-block 10003. Regarding the calculation of QP, the processing time changes depending on the block size, the image complexity, and the like. The calculation of the quantization parameter of the sub-block 10001 having a large block size tends to take more time than the sub-block 10002 and the sub-block 10003.

量子化パラメータ算出に続き、量子化パラメータ差分値算出を行う。サブブロック10002のサブブロック量子化パラメータ差分値の算出はサブブロック10001のサブブロック量子化パラメータ算出が終了しなければ求められない。したがってこの間、プロセッサAでのサブブロック10001のサブブロック量子化パラメータの算出までプロセッサBは待機状態になる。また、サブブロック10002の量子化パラメータ算出がサブブロック10003より時間がかかった場合、サブブロック10003の差分値の算出はサブブロック10002のサブブロック量子化パラメータの算出が終了しなければ求められない。この間、プロセッサBでのサブブロック10002のサブブロック量子化パラメータの算出までプロセッサCは待機状態になる。   Following the quantization parameter calculation, the quantization parameter difference value is calculated. The calculation of the sub-block quantization parameter difference value of the sub-block 10002 cannot be calculated unless the calculation of the sub-block quantization parameter of the sub-block 10001 is completed. Therefore, during this period, the processor B is in a standby state until the processor A calculates the sub-block quantization parameter of the sub-block 10001. Further, if the calculation of the quantization parameter of the sub-block 10002 takes longer than that of the sub-block 10003, the calculation of the difference value of the sub-block 10003 is not required until the calculation of the sub-block quantization parameter of the sub-block 10002 is completed. During this time, the processor C is in a standby state until the processor B calculates the sub-block quantization parameter of the sub-block 10002.

これに対して、図5(b)は本実施形態での並列処理の例を表した図である。従来の場合と同様に、プロセッサAにサブブロック10001の処理を、プロセッサBにサブブロック10002の処理を、プロセッサCにサブブロック10003の処理を割り当てる。サブブロック量子化パラメータの算出に続き、サブブロック量子化パラメータ差分値の算出を行う。サブブロック10002のサブブロック量子化パラメータ差分値の算出は、基本ブロック量子化パラメータが算出済みなので、サブブロック量子化パラメータの算出の直後から開始できる。以上により本発明によって並列化を効率よく行うことができる。特に複数のサイズのサブブロックが混在する場合、処理の間隔を縮める効果が大きくなる。   On the other hand, FIG. 5B is a diagram showing an example of parallel processing in this embodiment. As in the conventional case, the process of the sub-block 10001 is assigned to the processor A, the process of the sub-block 10002 is assigned to the processor B, and the process of the sub-block 10003 is assigned to the processor C. Following the calculation of the sub-block quantization parameter, the sub-block quantization parameter difference value is calculated. The calculation of the sub-block quantization parameter difference value of the sub-block 10002 can be started immediately after the calculation of the sub-block quantization parameter because the basic block quantization parameter has already been calculated. As described above, parallelization can be efficiently performed by the present invention. In particular, when sub-blocks of a plurality of sizes are mixed, the effect of shortening the processing interval becomes large.

なお、本実施形態においては、基本ブロック量子化パラメータの値そのものを符号化したが、前に処理した基本ブロック量子化パラメータを用いて予測を行い符号化してもよい。   In the present embodiment, the basic block quantization parameter value itself is encoded, but prediction may be performed using the previously processed basic block quantization parameter for encoding.

さらに、本実施形態では説明のために基本ブロックを64画素×64画素、サブブロックを8画素×8画素までとしたが、これに限定されない。例えば基本ブロックは128画素×128画素等のブロックサイズへの変更が可能であり、また、基本ブロック、サブブロックの形状も正方形に限定されず、8画素×4画素などの長方形で発明の本質は変わらない。   Further, in the present embodiment, the basic block is set to 64 pixels × 64 pixels and the sub block is set to 8 pixels × 8 pixels for the sake of description, but the present invention is not limited to this. For example, the basic block can be changed to a block size such as 128 pixels × 128 pixels, and the shapes of the basic block and the sub-block are not limited to squares, and a rectangle of 8 pixels × 4 pixels can form the essence of the invention. does not change.

また、本実施形態では基本ブロック量子化パラメータを各サブブロック量子化パラメータの平均値としたが、これに限定されない。例えばサブブロックの中央値としても構わないし、最も頻度の高いサブブロック量子化パラメータの値としてももちろん構わない。このように算出方法を複数用意し、最も効率の良い基本ブロック量子化パラメータを選択してももちろん構わない。   Further, in the present embodiment, the basic block quantization parameter is the average value of each sub block quantization parameter, but the present invention is not limited to this. For example, the median value of the sub-blocks may be used, or the sub-block quantization parameter with the highest frequency may be used. As described above, it is of course possible to prepare a plurality of calculation methods and select the most efficient basic block quantization parameter.

なお、サブブロック量子化パラメータ差分値符号化データとして変化の有無を表す符号を1ビット付与して符号化を行ったが、これに限定されず、変化がない場合でもサブブロック量子化パラメータ差分値を符号化してももちろん構わない。   It should be noted that the sub-block quantization parameter difference value encoded data is coded by adding 1 bit of a code indicating the presence or absence of change, but the present invention is not limited to this, and the sub-block quantization parameter difference value is not changed. Of course, it does not matter if it is encoded.

なお、本実施形態で基本ブロック量子化パラメータ、サブブロック量子化パラメータ差分値および量子化係数の符号化にゴロム符号化を用いて説明したが、これに限定されない。例えばハフマン符号化やその他の算術符号化であってももちろん構わないし、値を符号化せずにそのままの値を出力しても構わない。   In addition, although Golomb coding is used for coding the basic block quantization parameter, the sub-block quantization parameter difference value, and the quantization coefficient in the present embodiment, the present invention is not limited to this. For example, Huffman coding or other arithmetic coding may be used, and the value may be output without being coded.

なお、本実施形態においては、イントラ予測を用いるフレームを例にとって説明したが、予測に動き補償を行うインター予測を使用できるフレームにおいても対応できることは明らかである。   In the present embodiment, the frame using intra prediction is described as an example, but it is obvious that a frame that can use inter prediction for performing motion compensation for prediction can also be applied.

<実施形態2>
本実施形態では、実施形態1の符号化方法を用いて符号化された符号データを復号する画像復号方法について説明する。図6は、本発明の実施形態2に係る画像復号装置の構成を示すブロック図である。
<Embodiment 2>
In the present embodiment, an image decoding method for decoding coded data coded using the coding method of the first embodiment will be described. FIG. 6 is a block diagram showing the configuration of the image decoding device according to the second embodiment of the present invention.

1100は符号化されたビットストリームを入力する端子である。1101はビットストリームのヘッダ情報の復号、ビットストリームから必要な符号を分離して後段へ出力する復号・分離部である。復号・分離部1101は図1の統合符号化部1009の逆の動作を行う。1102は量子化パラメータの符号化データを復号する量子化パラメータ復号部である。1103は各サブブロックの量子化係数符号を復号し、量子化係数を再生するブロック復号部である。1104は量子化パラメータ復号部1102で再生されたサブブロック量子化パラメータによって量子化係数に逆量子化を行い、直交変換係数を再生するブロック逆量子化部である。1105は図1のブロック変換部1004の逆直交変換を行い、予測誤差を再生するブロック逆変換部である。1106は予測誤差と復号済みの画像データからサブブロックの画像データを再生するブロック再生部である。1107は再生されたサブブロックの画像データをそれぞれの位置に配置し、基本ブロックの画像データを再生するブロック合成部である。   1100 is a terminal for inputting an encoded bit stream. Reference numeral 1101 denotes a decoding / separation unit that decodes the header information of the bitstream, separates the necessary code from the bitstream, and outputs the code to the subsequent stage. The decoding / separation unit 1101 performs the reverse operation of the integrated coding unit 1009 in FIG. A quantization parameter decoding unit 1102 decodes the encoded data of the quantization parameter. A block decoding unit 1103 decodes the quantized coefficient code of each sub-block and reproduces the quantized coefficient. Reference numeral 1104 denotes a block dequantization unit that dequantizes the quantized coefficient using the subblock quantization parameter regenerated by the quantization parameter decoding unit 1102 and regenerates the orthogonal transform coefficient. A block inverse transform unit 1105 performs inverse orthogonal transform of the block transform unit 1004 of FIG. 1 to reproduce a prediction error. A block reproduction unit 1106 reproduces sub-block image data from the prediction error and the decoded image data. Reference numeral 1107 denotes a block synthesizing unit for arranging reproduced sub-block image data at respective positions and reproducing the basic block image data.

上記画像復号装置における画像の復号動作を以下に説明する。本実施形態では実施形態1で生成された動画像ビットストリームをフレーム単位に入力する構成となっているが、1フレーム分の静止画像ビットストリームを入力する構成としても構わない。   The image decoding operation in the image decoding apparatus will be described below. In this embodiment, the moving image bitstream generated in the first embodiment is input in frame units, but a still image bitstream for one frame may be input.

図6において、端子1100から入力された1フレーム分のストリームデータは復号・分離部1101に入力され、画像を再生するのに必要なヘッダ情報が復号される。これに続く基本ブロック量子化パラメータ符号を量子化パラメータ復号部1102に入力する。さらにそれに続くサブブロック量子化パラメータ差分値符号も量子化パラメータ復号部1102に入力する。   In FIG. 6, the stream data for one frame input from the terminal 1100 is input to the decoding / separation unit 1101 and the header information necessary for reproducing the image is decoded. The subsequent basic block quantization parameter code is input to the quantization parameter decoding unit 1102. Further, the subsequent sub-block quantization parameter difference value code is also input to the quantization parameter decoding unit 1102.

図7は量子化パラメータ復号部1102の詳細を表すブロック図である。101は図6の復号・分離部1101から基本ブロック量子化パラメータ符号を入力する端子である。102は図6の復号・分離部1101からサブブロック量子化パラメータ差分符号化データを入力する端子である。103は基本ブロック量子化パラメータ符号を入力して復号し、基本ブロック量子化パラメータを再生する基本ブロック量子化パラメータ復号部である。104はサブブロック量子化パラメータ差分値符号化データを復号し、各サブブロック量子化パラメータ差分値を再生するサブブロック量子化パラメータ復号部である。105は再生された基本ブロック量子化パラメータと各サブブロック量子化パラメータ差分値を加算して各サブブロック量子化パラメータを再生するサブブロック量子化パラメータ加算部である。106は再生された各サブブロック量子化パラメータを図6のブロック逆量子化部1104に出力する端子である。   FIG. 7 is a block diagram showing details of the quantization parameter decoding unit 1102. Reference numeral 101 is a terminal for inputting a basic block quantization parameter code from the decoding / separation unit 1101 in FIG. Reference numeral 102 denotes a terminal for inputting sub-block quantization parameter difference encoded data from the decoding / separation unit 1101 in FIG. Reference numeral 103 denotes a basic block quantization parameter decoding unit which inputs and decodes a basic block quantization parameter code and reproduces a basic block quantization parameter. A sub-block quantization parameter decoding unit 104 decodes the sub-block quantization parameter difference value encoded data and reproduces each sub-block quantization parameter difference value. Reference numeral 105 denotes a sub-block quantization parameter adding unit that adds the reproduced basic block quantization parameter and each sub-block quantization parameter difference value to reproduce each sub-block quantization parameter. Reference numeral 106 denotes a terminal for outputting the reproduced sub-block quantization parameters to the block dequantization unit 1104 in FIG.

端子101から入力された基本ブロック量子化パラメータ符号は基本ブロック量子化パラメータ復号部103に入力され、ゴロム符号の復号により、基本ブロック量子化パラメータを再生し、これを保持する。   The basic block quantization parameter code input from the terminal 101 is input to the basic block quantization parameter decoding unit 103, and by decoding the Golomb code, the basic block quantization parameter is reproduced and held.

端子102から入力されたサブブロック量子化パラメータ差分値符号化データはサブブロック量子化パラメータ復号部104に入力され、ゴロム符号の復号により、サブブロック量子化パラメータ差分値を再生する。すなわち、基本ブロック量子化パラメータに対して変化の有無を表す1ビットを復号し、変化がない場合はサブブロック量子化パラメータ差分値として0を出力する。変化がある場合は続いてサブブロック量子化パラメータ差分値を復号し、出力する。サブブロック量子化パラメータ加算部105で再生された基本ブロック量子化パラメータにサブブロック量子化パラメータ差分値を加算してサブブロック量子化パラメータを再生し、端子106から出力する。   The sub-block quantization parameter difference value encoded data input from the terminal 102 is input to the sub-block quantization parameter decoding unit 104, and the Golomb code is decoded to reproduce the sub-block quantization parameter difference value. That is, 1 bit indicating whether or not there is a change in the basic block quantization parameter is decoded, and when there is no change, 0 is output as the sub block quantization parameter difference value. If there is a change, the sub-block quantization parameter difference value is subsequently decoded and output. The sub-block quantization parameter difference value is added to the basic block quantization parameter reproduced by the sub-block quantization parameter addition unit 105 to reproduce the sub-block quantization parameter, and the sub-block quantization parameter is output from the terminal 106.

図6に戻り、復号・分離部1101において分離されたサブブロックの量子化係数符号データはブロック復号部1103に入力され、ゴロム符号の復号により各量子化係数が再生される。サブブロックの量子化係数が再生されたら、ブロック逆量子化部1104に入力される。ブロック逆量子化部1104では、入力されたサブブロックの量子化係数とサブブロック量子化パラメータから逆量子化を行い、直交変換係数を再生する。再生された直交変換係数はブロック逆変換部1105にて逆変換を行い、予測誤差を再生する。再生された予測誤差はブロック再生部1106に入力され、復号済みの周囲の画素データ、または前のフレームの画素データから予測を行ってサブブロックの画像データを再生する。ブロック合成部1107は再生されたサブブロックの画像データをそれぞれの位置に配置し、基本ブロックの画像データを再生する。再生された基本ブロックの画像データは端子1108を介して外部に出力される。また、ブロック再生部1106に入力され、予測値算出に使用される。   Returning to FIG. 6, the quantized coefficient code data of the sub-block separated by the decoding / separation unit 1101 is input to the block decoding unit 1103, and each quantized coefficient is reproduced by decoding the Golomb code. When the quantized coefficient of the sub-block is reproduced, it is input to the block inverse quantization unit 1104. The block dequantization unit 1104 dequantizes the input subblock quantized coefficient and subblock quantized parameter to regenerate the orthogonal transform coefficient. The reproduced orthogonal transform coefficient is inversely transformed by the block inverse transform unit 1105 to reproduce the prediction error. The reproduced prediction error is input to the block reproduction unit 1106, and prediction is performed from the decoded surrounding pixel data or the pixel data of the previous frame to reproduce the sub-block image data. The block synthesizing unit 1107 arranges the reproduced sub-block image data at respective positions, and reproduces the basic block image data. The reproduced basic block image data is output to the outside via the terminal 1108. Also, it is input to the block reproducing unit 1106 and used for calculation of a prediction value.

図8は、実施形態2に係る画像復号装置における画像復号処理を示すフローチャートである。まず、ステップS101にて、復号・分離部1101がヘッダ情報を復号する。   FIG. 8 is a flowchart showing an image decoding process in the image decoding device according to the second embodiment. First, in step S101, the decoding / separation unit 1101 decodes the header information.

ステップS102にて、基本ブロック量子化パラメータ復号部103は基本ブロック量子化パラメータ符号を復号し、基本ブロック量子化パラメータを再生する。   In step S102, the basic block quantization parameter decoding unit 103 decodes the basic block quantization parameter code and reproduces the basic block quantization parameter.

ステップS103にて、サブブロック量子化パラメータ復号部104はサブブロック量子化パラメータ差分値符号化データを復号し、サブブロック量子化パラメータ差分値を再生する。さらに、基本ブロック量子化パラメータを加算し、サブブロック量子化パラメータを再生する。   In step S103, the sub-block quantization parameter decoding unit 104 decodes the sub-block quantization parameter difference value encoded data and reproduces the sub-block quantization parameter difference value. Further, the basic block quantization parameter is added to reproduce the sub-block quantization parameter.

ステップS104にて、サブブロックの量子化係数符号データを復号し、量子化係数を再生し、逆量子化、逆直交変換を行い、予測誤差を再生する。さらに復号済みの周囲の画素データまたは前のフレームの画素データから予測を行い、サブブロックの復号画像を再生する。   In step S104, the quantized coefficient code data of the sub-block is decoded, the quantized coefficient is reproduced, inverse quantization and inverse orthogonal transform are performed, and the prediction error is reproduced. Further, prediction is performed from the decoded surrounding pixel data or the pixel data of the previous frame, and the decoded image of the sub-block is reproduced.

ステップS105にて、サブブロックの復号画像を基本ブロックの復号画像に配置する。ステップS106にて、画像復号装置は、当該基本ブロック内の全てのサブブロックの復号が終了したか否かの判定を行い、終了していればステップS107に進み、終了していなければ次のサブブロックを対象としてステップS103に戻る。   In step S105, the decoded image of the sub-block is arranged in the decoded image of the basic block. In step S106, the image decoding device determines whether or not the decoding of all the sub-blocks in the basic block is completed. If the decoding is completed, the process proceeds to step S107, and if not completed, the next sub-block is decoded. The process returns to step S103 for the block.

ステップS107にて、基本ブロックの復号画像をフレームの復号画像に配置する。ステップS108にて、画像復号装置は、全ての基本ブロックの復号が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次の基本ブロックを対象としてステップS102に戻る。   In step S107, the decoded image of the basic block is arranged in the decoded image of the frame. In step S108, the image decoding apparatus determines whether or not the decoding of all the basic blocks is completed, and if completed, stops all the operations and ends the processing. The process returns to step S102 for the basic block.

以上の構成と動作により、実施形態1で生成された、符号量が削減されたビットストリームの復号を行い、再生画像を得ることができる。   With the above configuration and operation, it is possible to decode the bit stream generated in the first embodiment and having a reduced code amount, and obtain a reproduced image.

さらにサブブロックごとに区切り記号などで符号が識別できる形式であれば、サブブロックの量子化パラメータの再生、サブブロックの逆量子化、逆変換、画像データの再生を並列に効率的に行うことができ、高速な復号が行えるという効果もある。   Furthermore, if the code can be identified by a delimiter for each sub-block, it is possible to efficiently reproduce the sub-block quantization parameter, the sub-block inverse quantization, the inverse transform, and the image data in parallel. It is also possible to perform high-speed decoding.

図9に図2(a)に示した基本ブロックのサブブロックを復号・逆量子化・逆変換して予測誤差を再生する例を示す。実施形態1の図5と同様にここでは説明のために使用するプロセッサを3つと仮定する。これらのプロセッサで各サブブロックの量子化パラメータ差分値(ΔQP)の復号、量子化パラメータ(QP)の再生、量子化係数の復号、量子化係数の逆量子化・逆直交変換を行う場合を例にとる。この時、別プロセッサでこれらの符号を分離することとする。   FIG. 9 shows an example of reproducing the prediction error by decoding / inverse-quantizing / inverse-transforming the sub-block of the basic block shown in FIG. Similar to FIG. 5 of the first embodiment, it is assumed here that there are three processors used for description. An example of the case where these processors perform decoding of the quantization parameter difference value (ΔQP) of each sub-block, reproduction of the quantization parameter (QP), decoding of the quantization coefficient, and inverse quantization / inverse orthogonal transform of the quantization coefficient Take At this time, these codes are separated by another processor.

図9(a)は従来の並列処理の例を表した図である。最初にプロセッサAにサブブロック10001の処理を、プロセッサBにサブブロック10002の処理を、プロセッサCにサブブロック10003の処理を割り当てる。プロセッサAは先頭なので、サブブロック量子化パラメータそのものを復号し、プロセッサBおよびCは各サブブロック量子化パラメータ差分値を復号し、続いてサブブロック量子化パラメータの再生を行う。これはサブブロック量子化パラメータの予測値となる前のサブブロックのサブブロック量子化パラメータとサブブロック量子化パラメータ差分値の加算によって実現する。   FIG. 9A is a diagram showing an example of conventional parallel processing. First, the processor A is assigned the processing of the sub-block 10001, the processor B is assigned the processing of the sub-block 10002, and the processor C is assigned the processing of the sub-block 10003. Since the processor A is the head, the sub-block quantization parameter itself is decoded, the processors B and C decode each sub-block quantization parameter difference value, and subsequently the sub-block quantization parameter is reproduced. This is achieved by adding the sub-block quantization parameter difference value of the sub-block before it becomes the predicted value of the sub-block quantization parameter and the sub-block quantization parameter difference value.

サブブロック10002のサブブロック量子化パラメータの再生はサブブロック10001の量子化パラメータの復号が終了しなければ求められない。したがってこの間、プロセッサAでのサブブロック10001の量子化パラメータの再生までプロセッサBは待機状態になる。   The reproduction of the sub-block quantization parameter of the sub-block 10002 is not required until the decoding of the quantization parameter of the sub-block 10001 is completed. Therefore, during this period, the processor B is in a standby state until the processor A reproduces the quantization parameter of the sub-block 10001.

また、サブブロック10002の量子化パラメータ再生も同様で、プロセッサBでのサブブロック10002の量子化パラメータの再生までの間、プロセッサCは待機状態になる。以後、処理が終了したプロセッサに順次、領域四分木構造の順、すなわち、サブブロック10004、サブブロック10005、サブブロック10006の順に処理される。サブブロック10006のサブブロック量子化パラメータの再生はサブブロック10005の量子化パラメータの再生が終了しなければ求められない。したがってこの間、プロセッサAでのサブブロック10005の量子化パラメータの再生までプロセッサCは待機状態になる。   The same applies to the reproduction of the quantization parameter of the sub block 10002, and the processor C is in the standby state until the reproduction of the quantization parameter of the sub block 10002 in the processor B. After that, the processors that have completed processing are sequentially processed in the order of the area quadtree structure, that is, in the order of subblock 10004, subblock 10005, and subblock 10006. The reproduction of the sub-block quantization parameter of the sub-block 10006 is not required until the reproduction of the quantization parameter of the sub-block 10005 is completed. Therefore, during this period, the processor C is in a standby state until the processor A reproduces the quantization parameter of the sub-block 10005.

これに対して、図9(b)は本実施形態での並列処理の例を表した図である。まず、プロセッサAは基本ブロック量子化パラメータを復号して保持しておく。以下、従来の場合と同様に、プロセッサAにサブブロック10001の処理を、プロセッサBにサブブロック10002の処理を、プロセッサCにサブブロック10003の処理を割り当てる。サブブロック量子化パラメータ差分値の復号に続き、サブブロック量子化パラメータの再生を行う。サブブロック10002の量子化パラメータの再生は、基本ブロック量子化パラメータが再生済みなので、サブブロック量子化パラメータ差分値の復号の直後から開始できる。本発明によって並列化を効率よく行うことができる。特に複数のサイズのサブブロックが混在する場合、処理の間隔を縮める効果が大きくなる。   On the other hand, FIG. 9B is a diagram showing an example of parallel processing in this embodiment. First, the processor A decodes and holds the basic block quantization parameter. Hereinafter, as in the conventional case, the process of the sub-block 10001 is assigned to the processor A, the process of the sub-block 10002 is assigned to the processor B, and the process of the sub-block 10003 is assigned to the processor C. Following the decoding of the sub-block quantization parameter difference value, the sub-block quantization parameter is reproduced. The reproduction of the quantization parameter of the sub-block 10002 can be started immediately after the decoding of the sub-block quantization parameter difference value because the basic block quantization parameter has already been reproduced. The present invention enables efficient parallelization. In particular, when sub-blocks of a plurality of sizes are mixed, the effect of shortening the processing interval becomes large.

また、画像データからその一部を切り出す編集等のアプリケーションを考えた時、例えば、図2(a)のサブブロック10008のみを切り出す場合を考える。従来例であれば、サブブロック10001から1007までの復号が必要である。本発明によればサブブロック10001とサブブロック10006のみを復号すればイントラ予測を含めても復号できることが分かる。このように復号処理をスキップすることで処理の速度を向上させることができる。   Further, when considering an application such as editing for cutting out a part of the image data, for example, consider a case where only the sub-block 10008 in FIG. 2A is cut out. In the case of the conventional example, decoding of sub-blocks 10001 to 1007 is required. According to the present invention, it can be seen that if only subblock 10001 and subblock 10006 are decoded, decoding can be performed even if intra prediction is included. By skipping the decoding process in this way, the processing speed can be improved.

また、実施形態1と同様にブロックのサイズ、処理ユニットのサイズ、参照する処理ユニットとその画素の配置、符号についてはこれに限定されない。   Further, similarly to the first embodiment, the block size, the processing unit size, the processing unit to be referred to, the pixel arrangement thereof, and the code are not limited to these.

なお、本実施形態で基本ブロック量子化パラメータ、サブブロック量子化パラメータ差分値および量子化係数の復号にゴロム符号化を用いて説明したが、これに限定されない。例えばハフマン符号化やその他の算術符号化であってももちろん構わないし、値を符号化せずにそのままの値を出力しても構わない。   It should be noted that although Golomb coding is used for decoding the basic block quantization parameter, the sub-block quantization parameter difference value, and the quantization coefficient in the present embodiment, the present invention is not limited to this. For example, Huffman coding or other arithmetic coding may be used, and the value may be output without being coded.

なお、本実施形態においては、イントラ予測を用いるフレームを例にとって説明したが、予測に動き補償を行うインター予測を使用できるフレームにおいても対応できることは明らかである。   In the present embodiment, the frame using intra prediction is described as an example, but it is obvious that a frame that can use inter prediction for performing motion compensation for prediction can also be applied.

<実施形態3>
図10は本実施形態の画像符号化装置を示すブロック図である。本実施形態では、先頭のサブブロックの量子化パラメータを基本ブロック量子化パラメータとし、個別に基本ブロック量子化パラメータを符号化しない。また変化の有無を表す符号がないことが実施形態1と異なる点である。ただし、実施形態1と同様に変化の有無を表す符号を用いた符号化を行っても構わない。図10において、実施形態1の図1と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。
<Embodiment 3>
FIG. 10 is a block diagram showing the image coding apparatus according to this embodiment. In the present embodiment, the quantization parameter of the first sub-block is the basic block quantization parameter, and the basic block quantization parameter is not individually encoded. The difference from the first embodiment is that there is no code indicating the presence or absence of change. However, as in the first embodiment, encoding may be performed using a code indicating the presence or absence of change. In FIG. 10, parts having the same functions as those in FIG. 1 of the first embodiment are designated by the same reference numerals, and description thereof will be omitted.

1208はサブブロック量子化パラメータの符号化を行い、量子化パラメータ符号データを生成する量子化パラメータ符号化部である。1209は統合符号化部である。ヘッダ情報や予測に関する符号を生成するとともに、量子化パラメータ符号化部1208で生成された量子化パラメータ符号データおよびブロック符号化部1006で生成された量子化係数符号データを統合する。   Reference numeral 1208 denotes a quantization parameter encoding unit that encodes sub-block quantization parameters and generates quantization parameter code data. 1209 is an integrated encoding unit. Codes relating to header information and prediction are generated, and the quantization parameter code data generated by the quantization parameter coding unit 1208 and the quantization coefficient code data generated by the block coding unit 1006 are integrated.

図11に量子化パラメータ符号化部1208の詳細なブロック図を示す。図11において、実施形態1の図3と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 11 shows a detailed block diagram of the quantization parameter coding unit 1208. In FIG. 11, the same numbers are given to the portions that perform the same functions as those in FIG. 3 of the first embodiment, and the description will be omitted.

200はセレクタであり、入力されたサブブロック量子化パラメータのサブブロックの位置に応じて出力先を選択する。203は基本ブロックの領域四分木構造順で先頭のサブブロックの量子化パラメータを基本ブロック量子化パラメータとして保持する基本ブロック量子化パラメータ保持部である。206は続く各サブブロックの量子化パラメータと基本ブロック量子化パラメータとの差分値を算出するサブブロック量子化パラメータ差分部である。207は先頭のサブブロックの量子化パラメータと各サブブロックのサブブロック量子化パラメータ差分値を符号化するサブブロック量子化パラメータ符号化部である。   A selector 200 selects an output destination according to the position of the sub-block of the input sub-block quantization parameter. Reference numeral 203 denotes a basic block quantization parameter holding unit that holds the quantization parameter of the first sub block in the area quadtree structure order of the basic block as a basic block quantization parameter. A sub-block quantization parameter difference unit 206 calculates a difference value between the quantization parameter of each subsequent sub-block and the basic block quantization parameter. Reference numeral 207 denotes a sub-block quantization parameter coding unit that codes the quantization parameter of the head sub-block and the sub-block quantization parameter difference value of each sub-block.

上記の構成において、実施形態1と同様に、サブブロック量子化パラメータを端子1から領域四分木構造の順に入力する。セレクタ200は領域四分木構造順で先頭のサブブロックの量子化パラメータについては基本ブロック量子化パラメータ保持部203に出力する。それ以降のサブブロック量子化パラメータに関してはサブブロック量子化パラメータ差分部206に出力する。   In the above configuration, as in the first embodiment, sub-block quantization parameters are input from terminal 1 in the order of the area quadtree structure. The selector 200 outputs the quantization parameter of the first subblock in the area quadtree structure order to the basic block quantization parameter holding unit 203. The subsequent sub-block quantization parameters are output to the sub-block quantization parameter difference unit 206.

先頭のサブブロックのサブブロックは基本ブロック量子化パラメータとして基本ブロック量子化パラメータ保持部203で保持される。その後、先頭の量子化パラメータはサブブロック量子化パラメータ差分部206にも入力される。当該サブブロック量子化パラメータは基本ブロックの先頭であるため、差分の算出は行わず、そのまま後段のサブブロック量子化パラメータ符号化部207に出力する。サブブロック量子化パラメータ符号化部207では入力されたサブブロック量子化パラメータをゴロム符号によって符号化し、端子8からサブブロック量子化パラメータ符号化データとして出力する。   The sub-block of the first sub-block is held in the basic block quantization parameter holding unit 203 as a basic block quantization parameter. After that, the leading quantization parameter is also input to the sub-block quantization parameter difference unit 206. Since the sub-block quantization parameter is at the head of the basic block, the difference is not calculated and is output as it is to the sub-block quantization parameter coding unit 207 in the subsequent stage. The sub-block quantization parameter coding unit 207 codes the input sub-block quantization parameter by Golomb code and outputs it from the terminal 8 as sub-block quantization parameter coded data.

続いて、端子1から領域四分木構造の順にサブブロック量子化パラメータが入力され、セレクタ200を介して、サブブロック量子化パラメータ差分部206に入力される。サブブロック量子化パラメータ差分部206では入力されたサブブロック量子化パラメータと基本ブロック量子化パラメータ保持部203に保持されている基本ブロック量子化パラメータとの差分値を算出する。サブブロック量子化パラメータ符号化部207では量子化パラメータ差分値をゴロム符号により符号化し、サブブロック量子化パラメータ差分値符号化データを生成し、サブブロック量子化パラメータ符号化データとして端子8から出力する。以後、基本ブロック内のサブブロックのサブブロック量子化パラメータに関して、差分を求め、符号化する。   Then, the sub-block quantization parameter is input from the terminal 1 in the order of the region quadtree structure, and is input to the sub-block quantization parameter difference unit 206 via the selector 200. The sub-block quantization parameter difference unit 206 calculates a difference value between the input sub-block quantization parameter and the basic block quantization parameter held in the basic block quantization parameter holding unit 203. The sub-block quantization parameter encoding unit 207 encodes the quantization parameter difference value by Golomb code to generate sub-block quantization parameter difference value encoded data, which is output from the terminal 8 as sub-block quantization parameter encoded data. . After that, the difference is obtained and encoded with respect to the sub-block quantization parameter of the sub-block in the basic block.

図12は、実施形態3に係る画像符号化装置における画像符号化処理を示すフローチャートである。図12において、実施形態1の図4と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 12 is a flowchart showing an image coding process in the image coding apparatus according to the third embodiment. In FIG. 12, parts having the same functions as those in FIG. 4 of the first embodiment are designated by the same reference numerals, and description thereof will be omitted.

ステップS001からステップS004までは実施形態1と同様にサブブロック分割とサブブロック量子化パラメータの決定を行う。   From step S001 to step S004, sub-block division and sub-block quantization parameter determination are performed as in the first embodiment.

ステップS205にて、先頭のサブブロック量子化パラメータを基本ブロック量子化パラメータとして保持する。   In step S205, the top sub-block quantization parameter is held as a basic block quantization parameter.

ステップS206にて、入力されたサブブロックが基本ブロックの先頭のサブブロックか否かを判定し、先頭であればステップS208に進み、そうでなければ、ステップS207に進む。ステップS207にて、ステップS205で保持された基本ブロック量子化パラメータと入力されたサブブロック量子化パラメータとの差分を算出する。   In step S206, it is determined whether or not the input sub-block is the head sub-block of the basic block, and if it is the head, the process proceeds to step S208, and if not, the process proceeds to step S207. In step S207, the difference between the basic block quantization parameter held in step S205 and the input sub-block quantization parameter is calculated.

ステップS208にて、入力されたサブブロック量子化パラメータ、ないしサブブロック量子化パラメータ差分値をゴロム符号により符号化し、サブブロック量子化パラメータ符号化データとして出力する。
ステップS008、ステップS009は実施形態1と同様に動作する。ステップS210にて基本ブロック内の全てのサブブロックについて処理が終わったか否かを判定する。終了していなければ次のサブブロックの処理のためにステップS206に進む。終わっていればステップS011に進む。以後、実施形態1と同様に画像全体の符号化を行う。以上の構成と動作により、基本ブロック量子化パラメータを先頭のサブブロック量子化パラメータとすることで、基本ブロック量子化パラメータを送らずに済むので、符号化効率を向上させる効果がある。
In step S208, the input sub-block quantization parameter or sub-block quantization parameter difference value is encoded by Golomb code and output as sub-block quantization parameter encoded data.
Steps S008 and S009 operate as in the first embodiment. In step S210, it is determined whether the processing has been completed for all sub blocks in the basic block. If not completed, the process proceeds to step S206 to process the next sub-block. If it is finished, the process proceeds to step S011. After that, the entire image is encoded as in the first embodiment. With the above configuration and operation, by setting the basic block quantization parameter as the leading sub-block quantization parameter, it is not necessary to send the basic block quantization parameter, which has the effect of improving the coding efficiency.

また、実施形態1と同様に並列処理を効果的に行うことも可能になる。すなわち、図5(a)にてプロセッサBとCは最初についてはプロセッサAの先頭のサブブロック量子化パラメータの算出を待つ必要がある。しかし、以後、サブブロック10005の量子化パラメータ差分値の算出はサブブロック10004の処理を待たずに行えるようになる。   Further, it is possible to effectively perform parallel processing as in the first embodiment. That is, in FIG. 5A, the processors B and C must wait for the calculation of the sub-block quantization parameter at the head of the processor A for the first time. However, thereafter, the calculation of the quantization parameter difference value of the sub block 10005 can be performed without waiting for the processing of the sub block 10004.

なお、実施形態1の基本ブロック量子化パラメータを符号化する方法と本実施形態の基本ブロック量子化パラメータを先頭のサブブロック量子化パラメータとすることを切り替える符号を設け、符号化効率の良い方を選択してももちろん構わない。   It should be noted that a code that switches between the method of encoding the basic block quantization parameter of the first embodiment and the method of using the basic block quantization parameter of the present embodiment as the top sub-block quantization parameter is provided, and the one with higher encoding efficiency is selected. Of course it doesn't matter.

なお、先頭のサブブロック量子化パラメータ(基本ブロック量子化パラメータ)と後続のサブブロック量子化パラメータ差分値について同じ符号化を施すように説明したが、これに限定されない。それぞれ個別の符号化方法を適用してももちろん構わない。   In addition, although the same encoding is applied to the leading sub-block quantization parameter (basic block quantization parameter) and the subsequent sub-block quantization parameter difference value, the present invention is not limited to this. It goes without saying that individual coding methods may be applied.

なお、本実施形態で基本ブロック量子化パラメータ、サブブロック量子化パラメータ差分値および量子化係数の符号化にゴロム符号化を用いて説明したが、これに限定されない。例えばハフマン符号化やその他の算術符号化であってももちろん構わない。   In addition, although Golomb coding is used for coding the basic block quantization parameter, the sub-block quantization parameter difference value, and the quantization coefficient in the present embodiment, the present invention is not limited to this. For example, Huffman coding or other arithmetic coding may be used.

なお、本実施形態においては、イントラ予測を用いるフレームを例にとって説明したが、予測に動き補償を行うインター予測を使用できるフレームにおいても対応できることは明らかである。   In the present embodiment, the frame using intra prediction is described as an example, but it is obvious that a frame that can use inter prediction for performing motion compensation for prediction can also be applied.

<実施形態4>
本実施形態では、実施形態3の符号化方法を用いて符号化された符号データを復号する画像復号方法について説明する。図13は実施形態3の符号化方法を用いて符号化された符号データを復号する画像復号装置を示すブロック図である。図13において、実施形態2の図6と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。
<Embodiment 4>
In this embodiment, an image decoding method for decoding coded data that has been coded using the coding method of the third embodiment will be described. FIG. 13 is a block diagram showing an image decoding apparatus that decodes coded data that has been coded using the coding method according to the third embodiment. In FIG. 13, parts having the same functions as those in FIG. 6 of the second embodiment are designated by the same reference numerals, and the description thereof will be omitted.

図13において、1301は復号・分離部であり、ビットストリームのヘッダ情報の復号、ビットストリームから必要な符号を分離して後段へ出力する。1302は量子化パラメータ復号部でありサブブロック量子化パラメータを再生する。実施形態2の図10における復号・分離部301、量子化パラメータ復号部302とは量子化パラメータの符号データが異なる。   In FIG. 13, a decoding / separating unit 1301 decodes header information of the bitstream, separates a necessary code from the bitstream, and outputs it to the subsequent stage. A quantization parameter decoding unit 1302 reproduces sub-block quantization parameters. The decoding / separating unit 301 and the quantization parameter decoding unit 302 in FIG. 10 of the second embodiment are different in the coded data of the quantization parameter.

上記画像復号装置における画像の復号動作を以下に説明する。本実施形態では実施形態3で生成された動画像ビットストリームをフレーム単位に入力する構成となっているが、1フレーム分の静止画像ビットストリームを入力する構成としても構わない。   The image decoding operation in the image decoding apparatus will be described below. In the present embodiment, the moving image bitstream generated in the third embodiment is input in frame units, but a still image bitstream for one frame may be input.

実施形態2と同様に、端子1100から入力された1フレーム分のストリームデータは復号・分離部1301に入力され、画像を再生するのに必要なヘッダ情報が復号される。これに続くサブブロック量子化パラメータ符号化データを領域四分木構造の順に量子化パラメータ復号部1302に入力する。   Similar to the second embodiment, the one-frame stream data input from the terminal 1100 is input to the decoding / separation unit 1301 and the header information necessary for reproducing the image is decoded. Subsequent sub-block quantization parameter coded data is input to the quantization parameter decoding unit 1302 in the order of the area quadtree structure.

図14は量子化パラメータ復号部1302の詳細なブロック図である。図14において、実施形態2の図7と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 14 is a detailed block diagram of the quantization parameter decoding unit 1302. In FIG. 14, parts that perform the same functions as those in FIG. 7 of the second embodiment are given the same numbers and description thereof is omitted.

304はサブブロック量子化パラメータ及びサブブロック量子化パラメータ差分値符号化データを復号し、各サブブロック量子化パラメータ差分値を再生するサブブロック量子化パラメータ復号部である。300はセレクタであり、入力されたサブブロック量子化パラメータのサブブロックの位置に応じて出力先を選択する。310は最初に復号されたサブブロック量子化パラメータを基本ブロック量子化パラメータとして保持する基本量子化パラメータ保持部である。305は保持された基本ブロック量子化パラメータと各サブブロック量子化パラメータ差分値を加算して各サブブロック量子化パラメータを再生するサブブロック量子化パラメータ加算部である。   A sub-block quantization parameter decoding unit 304 decodes the sub-block quantization parameter and the sub-block quantization parameter difference value encoded data, and reproduces each sub-block quantization parameter difference value. A selector 300 selects an output destination according to the position of the sub-block of the input sub-block quantization parameter. Reference numeral 310 denotes a basic quantization parameter holding unit that holds the first decoded sub-block quantization parameter as a basic block quantization parameter. A sub-block quantization parameter addition unit 305 reproduces each sub-block quantization parameter by adding the held basic block quantization parameter and each sub-block quantization parameter difference value.

上記の構成において、基本ブロックの復号の開始時に、セレクタ300は出力先を基本ブロック量子化パラメータ保持部310とする。端子102から入力された基本ブロックの先頭サブブロックのサブブロック量子化パラメータ符号化データはサブブロック量子化パラメータ復号部104に入力され、ゴロム符号の復号により、サブブロック量子化パラメータを再生する。この先頭サブブロックのサブブロック量子化パラメータはセレクタ300を介して基本ブロック量子化パラメータ保持部310に入力され、当該基本ブロックの処理中、保持される。また、サブブロック量子化パラメータ加算部305にも先頭サブブロックのサブブロック量子化パラメータが入力される。サブブロック量子化パラメータ加算部305は先頭サブブロックに関しては差分値ではないので、再生されたサブブロック量子化パラメータを端子106から出力する。先頭のサブブロック量子化パラメータが基本ブロック量子化パラメータ保持部310に記録されたら、セレクタ300は出力先をサブブロック量子化パラメータ加算部305とする。   In the above configuration, at the start of decoding the basic block, the selector 300 sets the output destination to the basic block quantization parameter holding unit 310. The sub-block quantization parameter coded data of the head sub-block of the basic block input from the terminal 102 is input to the sub-block quantization parameter decoding unit 104, and the sub-block quantization parameter is reproduced by decoding the Golomb code. The sub-block quantization parameter of the head sub-block is input to the basic block quantization parameter holding unit 310 via the selector 300 and held during the processing of the basic block. Further, the sub-block quantization parameter of the head sub-block is also input to the sub-block quantization parameter addition unit 305. The sub-block quantization parameter addition unit 305 outputs the reproduced sub-block quantization parameter from the terminal 106 because it is not the difference value for the head sub-block. When the head sub-block quantization parameter is recorded in the basic block quantization parameter holding unit 310, the selector 300 sets the output destination to the sub-block quantization parameter addition unit 305.

続いて、2番目以降のサブブロック量子化パラメータ差分値符号化データがサブブロック量子化パラメータ復号部304に入力される。入力されたサブブロック量子化パラメータ差分値符号化データはゴロム符号の復号により、サブブロック量子化パラメータ差分値を再生する。サブブロック量子化パラメータ加算部305では、保持された基本ブロック量子化パラメータにセレクタ300を介して入力されたサブブロック量子化パラメータ差分値を加算する。このようにして、サブブロック量子化パラメータを再生し、端子106から出力する。以後、基本ブロック内のサブブロックのサブブロック量子化パラメータに関して、復号を行い、サブブロック量子化パラメータ差分値を求め、加算してサブブロック量子化パラメータを再生する。   Subsequently, the second and subsequent sub-block quantization parameter difference value encoded data are input to the sub-block quantization parameter decoding unit 304. The input sub-block quantization parameter difference value encoded data reproduces the sub-block quantization parameter difference value by decoding the Golomb code. The sub-block quantization parameter addition unit 305 adds the sub-block quantization parameter difference value input via the selector 300 to the held basic block quantization parameter. In this way, the sub-block quantization parameter is reproduced and output from the terminal 106. After that, the sub-block quantization parameter of the sub-block in the basic block is decoded, the sub-block quantization parameter difference value is calculated, and added to reproduce the sub-block quantization parameter.

図15は、本実施形態における画像復号処理を示すフローチャートである。図15において、実施形態2の図8と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 15 is a flowchart showing the image decoding process in this embodiment. In FIG. 15, parts having the same functions as those in FIG. 8 of the second embodiment are designated by the same reference numerals, and description thereof will be omitted.

ステップS101は実施形態2と同様にヘッダ情報の復号を行う。ステップS310にて、復号するサブブロックが基本ブロックの先頭のサブブロックか否かを判定し、先頭サブブロックであれば、ステップS311に進み、そうでなければステップS303に進む。   In step S101, the header information is decoded as in the second embodiment. In step S310, it is determined whether or not the subblock to be decoded is the head subblock of the basic block. If the subblock is the head subblock, the process proceeds to step S311; otherwise, the process proceeds to step S303.

ステップS311にて、入力されたサブブロック量子化パラメータに関する符号はサブブロック量子化パラメータの符号化データである。これをゴロム符号で復号する。復号結果を基本ブロック量子化パラメータとして保持する。その後、先頭のサブブロックの復号画像生成のため、ステップS104に進む。   In step S311, the code relating to the input sub-block quantization parameter is the encoded data of the sub-block quantization parameter. This is decoded by Golomb code. The decoding result is held as a basic block quantization parameter. After that, in order to generate a decoded image of the first sub block, the process proceeds to step S104.

ステップS303にて、入力されたサブブロック量子化パラメータに関する符号はサブブロック量子化パラメータ差分値の符号化データである。これをゴロム符号で復号し、サブブロック量子化パラメータ差分値を再生する。再生されたサブブロック量子化パラメータ差分値はステップS311で保持されている基本ブロック量子化パラメータと加算される。加算された結果がサブブロック量子化パラメータとなる。2番目以降のサブブロックの復号画像生成のため、ステップS104に進む。   In step S303, the code relating to the input sub-block quantization parameter is the encoded data of the sub-block quantization parameter difference value. This is decoded by Golomb code to reproduce the sub-block quantization parameter difference value. The reproduced sub-block quantization parameter difference value is added to the basic block quantization parameter held in step S311. The added result becomes the sub-block quantization parameter. In order to generate the decoded image of the second and subsequent sub-blocks, the process proceeds to step S104.

以下、実施形態2と同様に、サブブロックの復号画像の生成、フレーム画像の再生が行われる。   Hereinafter, as in the second embodiment, the sub-block decoded image is generated and the frame image is reproduced.

以上の構成と動作により、実施形態3で生成した、個別に基本量子化パラメータの符号化を行わず符号量を抑えた符号化データを復号することができる。   With the above configuration and operation, it is possible to decode the coded data generated in the third embodiment and having a reduced code amount without individually coding the basic quantization parameters.

また、実施形態2と同様に並列処理を効果的に行うことも可能になる。すなわち、図9(b)にてプロセッサAの量子化パラメータの復号の代わりに基本ブロックの先頭サブブロック量子化パラメータの復号が基本ブロック量子化パラメータの復号および先頭のサブブロック量子化パラメータ差分値の復号を置き換えることになる。これによりBとCは最初についてはプロセッサAの先頭のサブブロック量子化パラメータの復号を待つ必要があるが、以後、全てのサブブロックの量子化パラメータの再生は他のサブブロックの処理を待たずに行えるようになる。   Further, it is possible to effectively perform parallel processing as in the second embodiment. That is, in FIG. 9B, instead of decoding the quantization parameter of the processor A, decoding of the head sub-block quantization parameter of the basic block is performed by decoding the basic block quantization parameter and the head sub-block quantization parameter difference value. It will replace the decryption. As a result, B and C need to wait for the decoding of the sub-block quantization parameter at the beginning of the processor A at the beginning, but thereafter, the reproduction of the quantization parameter of all sub-blocks does not wait for the processing of other sub-blocks. You will be able to.

なお、本実施形態で基本ブロック量子化パラメータ、サブブロック量子化パラメータ差分値および量子化係数の復号にゴロム符号化を用いて説明したが、これに限定されない。例えばハフマン符号化やその他の算術符号化であってももちろん構わない。   It should be noted that although Golomb coding is used for decoding the basic block quantization parameter, the sub-block quantization parameter difference value, and the quantization coefficient in the present embodiment, the present invention is not limited to this. For example, Huffman coding or other arithmetic coding may be used.

なお、実施形態3で基本ブロック量子化パラメータを符号化する方法と本実施形態の基本ブロック量子化パラメータを先頭のサブブロック量子化パラメータとすることを切り替える符号を設けた場合、その符号を解釈し、図8のステップS102を実行する。もしくは、図15のステップS310、S311,S303を実行するかを選択すればよい。   If a code for switching between the method of coding the basic block quantization parameter in the third embodiment and the method of setting the basic block quantization parameter of the present embodiment as the head sub-block quantization parameter is provided, the code is interpreted. , Step S102 of FIG. 8 is executed. Alternatively, it may be selected whether to execute steps S310, S311, and S303 in FIG.

なお、本実施形態においては、イントラ予測を用いるフレームを例にとって説明したが、予測に動き補償を行うインター予測を使用できるフレームにおいても対応できることは明らかである。   In the present embodiment, the frame using intra prediction is described as an example, but it is obvious that a frame that can use inter prediction for performing motion compensation for prediction can also be applied.

<実施形態5>
本実施形態では、直前の基本ブロックのサブブロック量子化パラメータを用いて基本ブロック量子化パラメータを決定する実施の形態を説明する。
本実施形態では符号化装置は実施形態3の図10と同じ構成をとる。ただし、量子化パラメータ符号化部1208の構成が異なる。
<Fifth Embodiment>
In the present embodiment, an embodiment will be described in which the basic block quantization parameter is determined using the sub-block quantization parameter of the immediately previous basic block.
In the present embodiment, the encoding device has the same configuration as that of FIG. 10 of the third embodiment. However, the configuration of the quantization parameter coding unit 1208 is different.

図16は本実施形態の量子化パラメータ符号化部1208の詳細な構成を示すブロック図である。   FIG. 16 is a block diagram showing a detailed configuration of the quantization parameter coding unit 1208 of this embodiment.

図16において、400はセレクタであり、入力されたサブブロック量子化パラメータの基本ブロックの位置に応じて入力先を選択する。410は1つ前の基本ブロックのサブブロック量子化パラメータを保持するサブブロック量子化パラメータ保持部である。403は基本ブロック量子化パラメータ決定部である。サブブロック量子化パラメータ保持部410が保持するサブブロック量子化パラメータから符号化処理する基本ブロックの基本ブロック量子化パラメータを決定する。406はサブブロック量子化パラメータ差分部であり、基本ブロック量子化パラメータと各サブブロック量子化パラメータとの差分値を算出する。407は先頭のサブブロックの量子化パラメータと各サブブロックのサブブロック量子化パラメータ差分値を符号化するサブブロック量子化パラメータ符号化部である。   In FIG. 16, reference numeral 400 denotes a selector, which selects an input destination according to the position of the basic block of the input sub-block quantization parameter. A sub-block quantization parameter holding unit 410 holds the sub-block quantization parameter of the immediately preceding basic block. Reference numeral 403 is a basic block quantization parameter determination unit. The basic block quantization parameter of the basic block to be encoded is determined from the sub block quantization parameter held by the sub block quantization parameter holding unit 410. A sub-block quantization parameter difference unit 406 calculates a difference value between the basic block quantization parameter and each sub-block quantization parameter. Reference numeral 407 is a sub-block quantization parameter coding unit that codes the quantization parameter of the first sub-block and the sub-block quantization parameter difference value of each sub-block.

上記構成において、実施形態3と同様に、端子1000から画像データが入力され、ブロック分割部1001でサブブロックに分割され、量子化パラメータ決定部1002で各サブブロックの量子化パラメータが決定される。決定されたサブブロック量子化パラメータは量子化パラメータ符号化部1208に入力される。   In the above configuration, as in the third embodiment, image data is input from the terminal 1000, divided into sub-blocks by the block division unit 1001, and the quantization parameter of each sub-block is determined by the quantization parameter determination unit 1002. The determined sub-block quantization parameter is input to the quantization parameter coding unit 1208.

図16に移り、入力されたサブブロック量子化パラメータは画像の先頭の基本ブロックの先頭サブブロックであれば、セレクタ400は端子1からの入力を選択する。入力されたサブブロック量子化パラメータはサブブロック量子化パラメータ保持部410とサブブロック量子化パラメータ差分部406、セレクタ400を経由して基本ブロック量子化パラメータ決定部403に入力される。サブブロック量子化パラメータ保持部410は次の基本ブロックの処理のためにサブブロック量子化パラメータを保持する。基本ブロック量子化パラメータ決定部403は実施形態3の基本ブロック量子化パラメータ保持部203と同様に入力されたサブブロック量子化パラメータを基本ブロック量子化パラメータとして保持する。サブブロック量子化パラメータ差分部406は実施形態3のサブブロック量子化パラメータ差分部206と同様に、サブブロック量子化パラメータをそのまま出力する。サブブロック量子化パラメータ符号化部407はこの先頭のサブブロック量子化パラメータをゴロム符号で符号化し、端子8から出力する。   16, if the input sub-block quantization parameter is the head sub-block of the head basic block of the image, the selector 400 selects the input from the terminal 1. The input sub block quantization parameter is input to the basic block quantization parameter determination unit 403 via the sub block quantization parameter holding unit 410, the sub block quantization parameter difference unit 406, and the selector 400. The sub-block quantization parameter holding unit 410 holds the sub-block quantization parameter for processing the next basic block. The basic block quantization parameter determination unit 403 holds the input sub block quantization parameter as a basic block quantization parameter, as in the basic block quantization parameter holding unit 203 of the third embodiment. The sub-block quantization parameter difference unit 406 outputs the sub-block quantization parameter as it is, similar to the sub-block quantization parameter difference unit 206 of the third embodiment. The sub-block quantization parameter encoding unit 407 encodes this head sub-block quantization parameter with Golomb code and outputs it from the terminal 8.

以後、画像の先頭の基本ブロックの他のサブブロック量子化パラメータは端子1から入力され、サブブロック量子化パラメータ保持部410とサブブロック量子化パラメータ差分部406に入力される。サブブロック量子化パラメータ差分部406では基本ブロック量子化パラメータ決定部403から出力される基本ブロック量子化パラメータと入力との差分値を算出する。差分値はサブブロック量子化パラメータ符号化部407に入力され、実施形態3と同様に符号化され、端子8から出力される。   After that, the other sub-block quantization parameters of the basic block at the beginning of the image are input from the terminal 1, and are input to the sub-block quantization parameter holding unit 410 and the sub-block quantization parameter difference unit 406. The sub-block quantization parameter difference unit 406 calculates the difference value between the basic block quantization parameter output from the basic block quantization parameter determination unit 403 and the input. The difference value is input to the sub-block quantization parameter encoding unit 407, encoded as in the third embodiment, and output from the terminal 8.

一方、続いて入力される画像の先頭ではない基本ブロックについてその処理を説明する。基本ブロックの符号化処理に先立ち、セレクタ400は入力先にサブブロック量子化パラメータ保持部410を選択する。基本ブロック量子化パラメータ決定部403は保持されているサブブロック量子化パラメータの平均値を算出し、これを基本ブロック量子化パラメータとする。その後、端子1から当該基本ブロックのサブブロック量子化パラメータがサブブロック量子化パラメータ差分部406に入力される。サブブロック量子化パラメータ差分部406では基本ブロック量子化パラメータ決定部403から出力される基本ブロック量子化パラメータと入力との差分値を算出する。差分値はサブブロック量子化パラメータ符号化部407に入力され、実施形態3と同様に符号化され、端子8から出力される。   On the other hand, the processing will be described for a basic block that is not the beginning of an image that is subsequently input. Prior to the encoding process of the basic block, the selector 400 selects the sub-block quantization parameter holding unit 410 as the input destination. The basic block quantization parameter determination unit 403 calculates the average value of the held sub block quantization parameters and sets this as the basic block quantization parameter. After that, the sub-block quantization parameter of the basic block is input from the terminal 1 to the sub-block quantization parameter difference unit 406. The sub-block quantization parameter difference unit 406 calculates the difference value between the basic block quantization parameter output from the basic block quantization parameter determination unit 403 and the input. The difference value is input to the sub-block quantization parameter encoding unit 407, encoded as in the third embodiment, and output from the terminal 8.

図17は、実施形態5に係る画像符号化装置における画像符号化処理を示すフローチャートである。図17において、実施形態1の図4と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 17 is a flowchart showing the image coding process in the image coding apparatus according to the fifth embodiment. In FIG. 17, parts having the same functions as those in FIG. 4 of the first embodiment are designated by the same reference numerals, and description thereof will be omitted.

ステップS001からS003は実施形態1と同様にヘッダ情報の符号化、基本ブロックの分割、サブブロックの分割を行う。ステップS401にて、当該基本ブロックが画像の先頭か否かを判定する。先頭であれば、ステップS402にすすみ、そうでなければステップS409に進む。ステップS402にて、先頭基本ブロックの先頭のサブブロックか否かを判定する。先頭のサブブロックであれば、ステップS403に進み、そうでなければ、ステップS406に進む。   In steps S001 to S003, header information is encoded, basic blocks are divided, and sub-blocks are divided, as in the first embodiment. In step S401, it is determined whether the basic block is the head of the image. If it is the head, the process proceeds to step S402, and if not, the process proceeds to step S409. In step S402, it is determined whether the sub block is the head sub block of the head basic block. If it is the first sub-block, the process proceeds to step S403, and if not, the process proceeds to step S406.

ステップS403にて、先頭基本ブロックの先頭サブブロックのサブブロック量子化パラメータを決定し、次の基本ブロックの処理の際に参照できるように保持する。ステップS404にて、ステップS403で決定されたサブブロック量子化パラメータを基本ブロック量子化パラメータとして保持する。ステップS405にて、ステップS403で決定されたサブブロック量子化パラメータを符号化し、ステップS008に進む。ステップS406にて、当該サブブロックのサブブロック量子化パラメータを決定し、次の基本ブロックの処理の際に参照できるように保持する。   In step S403, the sub-block quantization parameter of the first sub-block of the first basic block is determined and held so that it can be referred to when the next basic block is processed. In step S404, the sub-block quantization parameter determined in step S403 is held as a basic block quantization parameter. In step S405, the sub-block quantization parameter determined in step S403 is encoded, and the process proceeds to step S008. In step S406, the sub-block quantization parameter of the sub-block is determined and held so that it can be referred to when the next basic block is processed.

ステップS407にて、ステップS406で決定されたサブブロック量子化パラメータからステップS404で保持された基本ブロック量子化パラメータを引く。これにより当該サブブロックのサブブロック量子化パラメータ差分値を算出する。ステップS408にて、ステップS407で算出された量子化パラメータ差分値を符号化し、量子化パラメータ差分値符号化データを生成し、ステップS008に進む。ステップS409にて、先頭ではない基本ブロックの先頭のサブブロックか否かを判定する。先頭のサブブロックであれば、ステップS410に進み、そうでなければ、ステップS406に進む。ステップS410にて、ステップS403ないしステップS406にて保持された前の基本ブロックのサブブロック量子化パラメータを参照して、当該基本ブロックの基本ブロック量子化パラメータを算出する。本実施形態では前記サブブロック量子化パラメータの平均値を算出し、これを基本ブロック量子化パラメータとする。ステップS411にて、当該サブブロックのサブブロック量子化パラメータを決定し、次の基本ブロックの処理の際に参照できるように保持する。   In step S407, the basic block quantization parameter held in step S404 is subtracted from the sub-block quantization parameter determined in step S406. Thereby, the sub-block quantization parameter difference value of the sub-block is calculated. In step S408, the quantization parameter difference value calculated in step S407 is encoded to generate quantization parameter difference value encoded data, and the process proceeds to step S008. In step S409, it is determined whether the sub-block is the head sub-block of the basic block that is not the head. If it is the first sub-block, the process proceeds to step S410, and if not, the process proceeds to step S406. In step S410, the basic block quantization parameter of the basic block is calculated with reference to the sub-block quantization parameter of the previous basic block held in steps S403 to S406. In this embodiment, the average value of the sub-block quantization parameters is calculated and used as the basic block quantization parameter. In step S411, the sub-block quantization parameter of the sub-block is determined and held so that it can be referred to when the next basic block is processed.

ステップS412にて、ステップS411で決定されたサブブロック量子化パラメータからステップS410で算出された基本ブロック量子化パラメータを引く。これにより当該サブブロックのサブブロック量子化パラメータ差分値を算出する。   In step S412, the basic block quantization parameter calculated in step S410 is subtracted from the sub-block quantization parameter determined in step S411. Thereby, the sub-block quantization parameter difference value of the sub-block is calculated.

ステップS413にて、ステップS412で算出された量子化パラメータ差分値を符号化し、量子化パラメータ差分値符号化データを生成し、ステップS008に進む。ステップS414にて、画像符号化装置は、当該基本ブロック内の全てのサブブロックの符号化が終了したか否かの判定を行い、終了していればステップS011に進み、終了していなければ次のサブブロックを対象としてステップS401に戻る。ステップS008、ステップS009,ステップS011は実施形態1と同様に動作し、画像全体の符号化を行う。   In step S413, the quantization parameter difference value calculated in step S412 is encoded to generate quantization parameter difference value encoded data, and the process proceeds to step S008. In step S414, the image coding apparatus determines whether or not coding of all the sub-blocks in the basic block is completed. If completed, the process proceeds to step S011. The process returns to step S401 for the sub-block of. Steps S008, S009, and S011 operate in the same manner as in the first embodiment, and the entire image is encoded.

以上の構成と動作により、前の基本ブロックのサブブロック量子化パラメータを用いて基本ブロック量子化パラメータを決定するので、当該基本ブロックの処理を開始すると同時に基本ブロック量子化パラメータの決定が行える。このため処理の遅延を最小限に抑える効果がある。また、基本ブロック量子化パラメータを前の基本ブロックのサブブロック量子化パラメータから産出することで、基本ブロック量子化パラメータを送らずに済むので、符号化効率が向上する効果もある。   With the above configuration and operation, since the basic block quantization parameter is determined using the sub-block quantization parameter of the previous basic block, the basic block quantization parameter can be determined at the same time when the processing of the basic block is started. Therefore, there is an effect of minimizing the processing delay. Further, since the basic block quantization parameter is generated from the sub-block quantization parameter of the previous basic block, it is not necessary to send the basic block quantization parameter, which also has an effect of improving the coding efficiency.

また、実施形態1と同様に並列処理を効果的に行うことも可能になる。すなわち、図5(b)にて符号化以前に基本ブロック量子化パラメータが前の基本ブロックのサブブロック量子化パラメータによって算出されている。これにより全サブブロックの量子化パラメータ差分値の算出はそれぞれのサブブロックの処理を待たずに行えるようになる。   Further, it is possible to effectively perform parallel processing as in the first embodiment. That is, in FIG. 5B, the basic block quantization parameter is calculated before encoding by the sub-block quantization parameter of the previous basic block. As a result, the calculation of the quantization parameter difference values for all subblocks can be performed without waiting for the processing of each subblock.

なお、本実施形態では画像の先頭の基本ブロックの時のみ先頭サブブロックのサブブロック量子化パラメータをそのまま符号化したが、これに限定されない。つまり複数の基本ブロックからなるスライスのような構成をとり、その先頭の基本ブロックに対して同様な処理を行っても構わない。   Note that, in the present embodiment, the sub-block quantization parameter of the head sub-block is directly encoded only when the head basic block of the image is used, but the present invention is not limited to this. In other words, a slice-like structure composed of a plurality of basic blocks may be used and the same processing may be performed on the first basic block.

また、本実施形態では前の基本ブロックのサブブロック量子化パラメータを参照して決定したが、これに限定されず、前の基本ブロックの最後のサブブロック量子化パラメータを当該基本ブロックの基本ブロック量子化パラメータとしても構わない。さらには周囲の基本ブロックのサブブロック量子化パラメータまたは基本ブロック量子化パラメータを参照してももちろん構わない。   Further, in the present embodiment, the determination is made by referring to the sub-block quantization parameter of the previous basic block, but the present invention is not limited to this, and the last sub-block quantization parameter of the previous basic block is set to the basic block quantum of the basic block. It may be used as a conversion parameter. Further, it is of course possible to refer to sub-block quantization parameters or basic block quantization parameters of surrounding basic blocks.

また、本実施形態では基本ブロック量子化パラメータを前の基本ブロックの各サブブロック量子化パラメータの平均値としたが、これに限定されない。例えばサブブロックの中央値としても構わないし、最も頻度の高いサブブロック量子化パラメータの値としてももちろん構わない。このように算出方法を複数用意し、最も効率の良い基本ブロック量子化パラメータを選択してその方法を表す符号を用いて符号化してももちろん構わない。   Further, in the present embodiment, the basic block quantization parameter is the average value of each sub-block quantization parameter of the previous basic block, but the present invention is not limited to this. For example, the median value of the sub-blocks may be used, or the sub-block quantization parameter with the highest frequency may be used. As described above, it is of course possible to prepare a plurality of calculation methods, select the most efficient basic block quantization parameter, and perform coding using a code representing the method.

なお、本実施形態においては、イントラ予測を用いるフレームを例にとって説明したが、予測に動き補償を行うインター予測を使用できるフレームにおいても対応できることは明らかである。   In the present embodiment, the frame using intra prediction is described as an example, but it is obvious that a frame that can use inter prediction for performing motion compensation for prediction can also be applied.

<実施形態6>
本実施形態では、実施形態5の符号化方法を用いて符号化された符号データを復号する画像復号方法について説明する。本実施形態では符号化装置は実施形態4の図13と同じ構成をとる。ただし、量子化パラメータ復号部1302の構成が異なる。
<Sixth Embodiment>
In the present embodiment, an image decoding method for decoding coded data coded using the coding method of the fifth embodiment will be described. In the present embodiment, the encoding device has the same configuration as that of FIG. 13 of the fourth embodiment. However, the configuration of the quantization parameter decoding unit 1302 is different.

図18は、本発明の実施形態6に係る量子化パラメータ復号部1302の構成を示すブロック図である。図18において、実施形態4の図14と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 18 is a block diagram showing the configuration of the quantization parameter decoding unit 1302 according to the sixth embodiment of the present invention. In FIG. 18, parts having the same functions as those in FIG. 14 of the fourth embodiment are designated by the same reference numerals, and description thereof will be omitted.

500はセレクタであり、入力されたサブブロック量子化パラメータのサブブロック及びそのサブブロックの基本ブロックの位置に応じて出力先を選択する。501はサブブロック量子化パラメータ自体が符号化されている場合に符号を復号し、サブブロック量子化パラメータを再生するサブブロック量子化パラメータ復号部である。502はサブブロック量子化パラメータ差分値が符号化されている場合に符号を復号し、サブブロック量子化パラメータ差分値を再生するサブブロック量子化パラメータ差分値復号部である。503はセレクタであり、入力されたサブブロック量子化パラメータのサブブロック及びそのサブブロックの基本ブロックの位置に応じて入力先を選択する。504は基本ブロック量子化パラメータを決定する基本ブロック量子化パラメータ決定部である。505は決定された基本ブロック量子化パラメータと各サブブロック量子化パラメータ差分値を加算して各サブブロック量子化パラメータを再生するサブブロック量子化パラメータ加算部である。506はセレクタであり、入力されたサブブロック量子化パラメータのサブブロック及びそのサブブロックの基本ブロックの位置に応じて入力先を選択する。507は再生されたサブブロック量子化パラメータを保持するサブブロック量子化パラメータ保持部である。   A selector 500 selects an output destination according to the position of the sub-block of the input sub-block quantization parameter and the basic block of the sub-block. A sub-block quantization parameter decoding unit 501 decodes a code when the sub-block quantization parameter itself is encoded and reproduces the sub-block quantization parameter. A sub-block quantization parameter difference value decoding unit 502 decodes the code when the sub-block quantization parameter difference value is encoded and reproduces the sub-block quantization parameter difference value. A selector 503 selects an input destination according to the position of the input sub-block quantization parameter sub-block and the basic block of the sub-block. A basic block quantization parameter determination unit 504 determines a basic block quantization parameter. A sub-block quantization parameter addition unit 505 reproduces each sub-block quantization parameter by adding the determined basic block quantization parameter and each sub-block quantization parameter difference value. A selector 506 selects an input destination according to the position of the input sub-block quantization parameter sub-block and the basic block of the sub-block. A sub-block quantization parameter holding unit 507 holds the reproduced sub-block quantization parameter.

上記画像復号装置における画像の復号動作を以下に説明する。本実施形態では動画像ビットストリームをフレーム単位に入力する構成となっているが、1フレーム分の静止画像ビットストリームを入力する構成としても構わない。   The image decoding operation in the image decoding apparatus will be described below. In the present embodiment, the moving image bitstream is input in frame units, but a still image bitstream for one frame may be input.

1フレーム分のビットストリームの復号処理に先立ち、セレクタ500は出力先をサブブロック量子化パラメータ復号部501とし、セレクタ503は入力先をサブブロック量子化パラメータ復号部501とする。セレクタ505は入力先をサブブロック量子化パラメータ復号部501とする。   Prior to the decoding processing of the bit stream for one frame, the selector 500 sets the output destination to the sub-block quantization parameter decoding unit 501, and the selector 503 sets the input destination to the sub-block quantization parameter decoding unit 501. The selector 505 sets the input destination to the sub-block quantization parameter decoding unit 501.

まず先頭基本ブロックのサブブロック量子化パラメータの符号化データがセレクタ500を介してサブブロック量子化パラメータ復号部501に入力される。サブブロック量子化パラメータ復号部501はゴロム符号を用いて復号し、サブブロック量子化パラメータを再生する。このサブブロック量子化パラメータはセレクタ503を介して基本ブロック量子化パラメータ決定部504に入力される。基本ブロック量子化パラメータ決定部504は前記サブブロック量子化パラメータのサブブロックが先頭基本ブロックの先頭サブブロックであることから、入力をそのまま保持して基本ブロック量子化パラメータとする。また、サブブロック量子化パラメータ復号部501で再生されたサブブロック量子化パラメータはセレクタ506を介して端子106から出力される。また、サブブロック量子化パラメータはサブブロック量子化パラメータ保持部507で保持される。   First, the encoded data of the sub-block quantization parameter of the first basic block is input to the sub-block quantization parameter decoding unit 501 via the selector 500. The sub-block quantization parameter decoding unit 501 decodes using the Golomb code to reproduce the sub-block quantization parameter. This sub-block quantization parameter is input to the basic block quantization parameter determination unit 504 via the selector 503. Since the sub-block of the sub-block quantization parameter is the head sub-block of the head basic block, the basic block quantization parameter determination unit 504 holds the input as it is and sets it as the basic block quantization parameter. In addition, the sub-block quantization parameter reproduced by the sub-block quantization parameter decoding unit 501 is output from the terminal 106 via the selector 506. The sub-block quantization parameter holding unit 507 holds the sub-block quantization parameter.

その後、セレクタ500は出力先をサブブロック量子化パラメータ差分値復号部502とし、セレクタ503は入力先をサブブロック量子化パラメータ保持部507とする。セレクタ506は入力先をサブブロック量子化パラメータ加算部305とする。   After that, the selector 500 sets the output destination to the sub-block quantization parameter difference value decoding unit 502, and the selector 503 sets the input destination to the sub-block quantization parameter holding unit 507. The selector 506 sets the input destination to the sub-block quantization parameter addition unit 305.

続くサブブロックのサブブロック量子化パラメータ差分値符号化データが入力されると、セレクタ500を介してサブブロック量子化パラメータ差分値復号部502に入力される。サブブロック量子化パラメータ差分値復号部502ではサブブロック量子化パラメータ差分値符号化データを復号してサブブロック量子化パラメータ差分値を再生する。サブブロック量子化パラメータ加算部305では、基本ブロック量子化パラメータにサブブロック量子化パラメータ差分値を加算し、サブブロック量子化パラメータを再生する。再生されたサブブロック量子化パラメータは端子106から出力される。また、サブブロック量子化パラメータはサブブロック量子化パラメータ保持部507で保持される。   When the sub block quantization parameter difference value encoded data of the subsequent sub block is input, it is input to the sub block quantization parameter difference value decoding unit 502 via the selector 500. The sub-block quantization parameter difference value decoding unit 502 decodes the sub-block quantization parameter difference value encoded data to reproduce the sub-block quantization parameter difference value. The sub-block quantization parameter addition unit 305 adds the sub-block quantization parameter difference value to the basic block quantization parameter to reproduce the sub-block quantization parameter. The reproduced sub-block quantization parameter is output from the terminal 106. The sub-block quantization parameter holding unit 507 holds the sub-block quantization parameter.

続く基本ブロックのサブブロック量子化パラメータ差分値符号化データが入力される。この時、基本ブロック量子化パラメータ決定部504は前の基本ブロックのサブブロック量子化パラメータをサブブロック量子化パラメータ保持部507から読み出す。読み出されたサブブロック量子化パラメータの平均値を求め、当該基本ブロックの基本ブロック量子化パラメータとする。   Sub-block quantization parameter difference value encoded data of the following basic block is input. At this time, the basic block quantization parameter determination unit 504 reads the sub block quantization parameter of the previous basic block from the sub block quantization parameter holding unit 507. The average value of the read sub-block quantization parameters is calculated and used as the basic block quantization parameter of the basic block.

入力されたサブブロック量子化パラメータ差分値符号化データはサブブロック量子化パラメータ差分値復号部502で復号され、サブブロック量子化パラメータ差分値を再生する。サブブロック量子化パラメータ加算部305でサブブロック量子化パラメータを再生し、端子106から出力し、サブブロック量子化パラメータ保持部507で保持する。
続いて入力されるサブブロック量子化パラメータ差分値符号化データに関しても同様にサブブロック量子化パラメータ差分値を再生し多のち、サブブロック量子化パラメータを再生する。再生されたサブブロック量子化パラメータは端子106から出力され、サブブロック量子化パラメータ保持部507で保持される。
The input sub-block quantization parameter difference value encoded data is decoded by the sub-block quantization parameter difference value decoding unit 502 to reproduce the sub-block quantization parameter difference value. The sub-block quantization parameter addition unit 305 reproduces the sub-block quantization parameter, outputs it from the terminal 106, and holds it in the sub-block quantization parameter holding unit 507.
Similarly, for the sub-block quantization parameter difference value encoded data that is subsequently input, the sub-block quantization parameter difference value is reproduced in the same manner, and then the sub-block quantization parameter is reproduced. The reproduced sub-block quantization parameter is output from the terminal 106 and held in the sub-block quantization parameter holding unit 507.

図19は、実施形態6に係る画像復号装置における画像復号処理を示すフローチャートである。   FIG. 19 is a flowchart showing the image decoding process in the image decoding device according to the sixth embodiment.

ステップS101は実施形態2と同様にヘッダ情報の復号を行う。ステップS501にて、復号するサブブロックの基本ブロックが画像の先頭か否かを判定し、先頭基本ブロックであれば、ステップS502に進み、そうでなければステップS504に進む。   In step S101, the header information is decoded as in the second embodiment. In step S501, it is determined whether the basic block of the sub-block to be decoded is the head of the image. If it is the head basic block, the process proceeds to step S502, and if not, the process proceeds to step S504.

ステップS502にて、復号するサブブロックが基本ブロックの先頭のサブブロックか否かを判定し、先頭ブロックであれば、ステップS503に進み、そうでなければステップS506に進む。ステップS503にて、入力されたサブブロック量子化パラメータに関する符号はサブブロック量子化パラメータの符号化データである。これをゴロム符号で復号する。復号結果を基本ブロック量子化パラメータとして保持する。と同時に次の基本ブロックの基本ブロック量子化パラメータを決定する際に参照するために別途保持しておく。その後、先頭のサブブロックの復号画像生成のため、ステップS104に進む。
ステップS504にて、復号するサブブロックが基本ブロックの先頭のサブブロックか否かを判定し、先頭ブロックであれば、ステップS505に進み、そうでなければステップS506に進む。
In step S502, it is determined whether or not the sub block to be decoded is the head sub block of the basic block. If the sub block is the head block, the process proceeds to step S503, and if not, the process proceeds to step S506. In step S503, the code relating to the input sub-block quantization parameter is the encoded data of the sub-block quantization parameter. This is decoded by Golomb code. The decoding result is held as a basic block quantization parameter. At the same time, it is held separately for reference when determining the basic block quantization parameter of the next basic block. After that, in order to generate a decoded image of the first sub block, the process proceeds to step S104.
In step S504, it is determined whether or not the subblock to be decoded is the head subblock of the basic block. If the subblock is the head block, the process proceeds to step S505, and if not, the process proceeds to step S506.

ステップS505にて、保持されている前の基本ブロックのサブブロック量子化パラメータから平均値を求め、基本ブロック量子化パラメータとして算出する。以後、ステップS506に進む。   In step S505, an average value is obtained from the sub-block quantization parameters of the previous basic block that have been held, and the average value is calculated as the basic block quantization parameter. After that, the process proceeds to step S506.

ステップS506にて、入力されたサブブロック量子化パラメータに関する符号はサブブロック量子化パラメータ差分値符号化データである。これをゴロム符号で復号し、サブブロック量子化パラメータ差分値を再生する。再生されたサブブロック量子化パラメータ差分値はステップS503ないしはステップS505で保持または算出されていた基本ブロック量子化パラメータと加算される。加算された結果がサブブロック量子化パラメータとなる。以後、サブブロックの復号画像生成のため、ステップS104に進む。以下、実施形態4と同様に、サブブロックの復号画像の生成、フレーム画像の再生が行われる。   In step S506, the code regarding the input sub-block quantization parameter is the sub-block quantization parameter difference value encoded data. This is decoded by Golomb code to reproduce the sub-block quantization parameter difference value. The reproduced sub-block quantization parameter difference value is added to the basic block quantization parameter held or calculated in step S503 or step S505. The added result becomes the sub-block quantization parameter. After that, the process proceeds to step S104 to generate a decoded image of the sub block. Hereinafter, similarly to the fourth embodiment, the sub-block decoded image is generated and the frame image is reproduced.

以上の構成と動作により、実施形態5で生成された基本ブロック量子化パラメータ値を符号化しないビットストリームを復号することができる。   With the above configuration and operation, it is possible to decode a bitstream that does not encode the basic block quantization parameter value generated in the fifth embodiment.

また、実施形態2と同様に並列処理を効果的に行うことも可能になる。すなわち、図9(b)にてプロセッサAの基本ブロック量子化パラメータの復号の代わりに前の基本ブロックのサブブロック量子化パラメータによる基本ブロック量子化パラメータの算出と置き換えることになる。これにより、全てのサブブロックの量子化パラメータの再生は他のサブブロックの処理を待たずに行えるようになる。   Further, it is possible to effectively perform parallel processing as in the second embodiment. That is, instead of decoding the basic block quantization parameter of the processor A in FIG. 9B, it is replaced with calculation of the basic block quantization parameter by the sub-block quantization parameter of the previous basic block. As a result, the reproduction of the quantization parameters of all subblocks can be performed without waiting for the processing of other subblocks.

なお、本実施形態では基本ブロック量子化パラメータを前の基本ブロックの各サブブロック量子化パラメータの平均値としたが、実施形態5の基本ブロック量子化パラメータの算出方法と同じ方法であればこれに限定されない。例えばサブブロックの中央値としても構わないし、最も頻度の高いサブブロック量子化パラメータの値としてももちろん構わない。これらの情報はサブブロック量子化パラメータ保持部507に保持されているサブブロック量子化パラメータから導出できる。   In the present embodiment, the basic block quantization parameter is the average value of the sub-block quantization parameters of the previous basic block. However, if the same method as the basic block quantization parameter calculation method of the fifth embodiment is used, Not limited. For example, the median value of the sub-blocks may be used, or the sub-block quantization parameter with the highest frequency may be used. Such information can be derived from the sub-block quantization parameter held in the sub-block quantization parameter holding unit 507.

また、符号化側でこのように算出方法を複数用意し、最も効率の良い基本ブロック量子化パラメータを選択してその方法を表す符号を用いて符号化しても、復号して同様にサブブロック量子化パラメータを算出できる。   In addition, even if a plurality of calculation methods are prepared on the encoding side and the most efficient basic block quantization parameter is selected and coded using a code representing the method, decoding is performed and sub-block quantum is similarly performed. The calculation parameter can be calculated.

なお、本実施形態においては、イントラ予測を用いるフレームを例にとって説明したが、予測に動き補償を行うインター予測を使用できるフレームにおいても対応できることは明らかである
<実施形態7>
図1、図3、図6、図7、図10、図11、図13、図14、図16、図18に示した各処理部はハードウェアでもって構成しているものとして上記実施形態では説明した。しかし、これらの図に示した各処理部で行なう処理をコンピュータプログラムでもって構成しても良い。
In addition, in the present embodiment, a frame using intra prediction has been described as an example, but it is clear that a frame that can use inter prediction that performs motion compensation for prediction can also be supported.
In the above embodiment, it is assumed that each processing unit shown in FIGS. 1, 3, 6, 7, 10, 10, 11, 13, 14, 16 and 18 is configured by hardware. explained. However, the processing performed by each processing unit shown in these figures may be configured by a computer program.

図20は、上記各実施形態に係る画像表示装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図である。   FIG. 20 is a block diagram showing an example of the hardware configuration of a computer applicable to the image display device according to each of the above embodiments.

CPU1401は、RAM1402やROM1403に格納されているコンピュータプログラムやデータを用いてコンピュータ全体の制御を行うと共に、上記各実施形態に係る画像処理装置が行うものとして上述した各処理を実行する。即ち、CPU1401は、図1、図3、図6、図7、図10、図11、図13、図14、図16、図18に示した各処理部として機能することになる。   The CPU 1401 controls the entire computer using the computer programs and data stored in the RAM 1402 and the ROM 1403, and also executes the processes described above as the processes performed by the image processing apparatus according to each of the above embodiments. That is, the CPU 1401 functions as each processing unit shown in FIGS. 1, 3, 6, 7, 7, 10, 11, 13, 14, 16 and 18.

RAM1402は、外部記憶装置1406からロードされたコンピュータプログラムやデータ、I/F(インターフェース)1409を介して外部から取得したデータなどを一時的に記憶するためのエリアを有する。更に、RAM1402は、CPU1401が各種の処理を実行する際に用いるワークエリアを有する。即ち、RAM1402は、例えば、フレームメモリとして割当てたり、その他の各種のエリアを適宜提供することができる。   The RAM 1402 has an area for temporarily storing a computer program or data loaded from the external storage device 1406, data acquired from the outside via an I / F (interface) 1409, and the like. Further, the RAM 1402 has a work area used when the CPU 1401 executes various processes. That is, the RAM 1402 can be allocated as, for example, a frame memory or can appropriately provide other various areas.

ROM1403には、本コンピュータの設定データや、ブートプログラムなどが格納されている。操作部1404は、キーボードやマウスなどにより構成されており、本コンピュータのユーザが操作することで、各種の指示をCPU1401に対して入力することができる。表示部1405は、CPU1401による処理結果を表示する。また表示部1405は例えば液晶ディスプレイのようなホールド型の表示装置や、フィールドエミッションタイプの表示装置のようなインパルス型の表示装置で構成される。   The ROM 1403 stores setting data of the computer, a boot program, and the like. The operation unit 1404 is composed of a keyboard, a mouse and the like, and can be operated by the user of the computer to input various instructions to the CPU 1401. The display unit 1405 displays the processing result by the CPU 1401. Further, the display unit 1405 is configured by a hold type display device such as a liquid crystal display or an impulse type display device such as a field emission type display device.

外部記憶装置1406は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置1406には、OS(オペレーティングシステム)や、図1、図3、図6、図7、図10、図11、図13、図14、図16、図18に示した各部の機能をCPU1401に実現させるためのコンピュータプログラムが保存されている。更には、外部記憶装置1406には、処理対象としての各画像データが保存されていても良い。   The external storage device 1406 is a large capacity information storage device represented by a hard disk drive device. The external storage device 1406 has an OS (Operating System) and functions of each unit shown in FIGS. 1, 3, 6, 7, 7, 10, 11, 14, 16, and 18. A computer program to be realized by the CPU 1401 is stored. Furthermore, each image data to be processed may be stored in the external storage device 1406.

外部記憶装置1406に保存されているコンピュータプログラムやデータは、CPU1401による制御に従って適宜RAM1402にロードされ、CPU1401による処理対象となる。I/F1407には、LANやインターネット等のネットワーク、投影装置や表示装置などの他の機器を接続することができ、本コンピュータはこのI/F1407を介して様々な情報を取得したり、送出したりすることができる。1408は上述の各部を繋ぐバスである。   The computer programs and data stored in the external storage device 1406 are appropriately loaded into the RAM 1402 under the control of the CPU 1401 and are processed by the CPU 1401. The I / F 1407 can be connected to a network such as a LAN or the Internet, and other devices such as a projection device and a display device. The computer acquires and sends various information via the I / F 1407. You can 1408 is a bus connecting the above-mentioned units.

上述の構成からなる作動は前述のフローチャートで説明した作動をCPU1401が中心となってその制御を行う。   The operation having the above-described configuration is controlled mainly by the CPU 1401 which is the operation described in the above flowchart.

また、CPUがマルチコアである場合、それぞれのコアに各処理のスレッドを割り当てることで並列処理を効率よく行うことができる。   Further, when the CPU is a multi-core, parallel processing can be efficiently performed by assigning threads for each processing to each core.

<その他の実施形態>
本発明の目的は、前述した機能を実現するコンピュータプログラムのコードを記録した記憶媒体を、システムに供給し、そのシステムがコンピュータプログラムのコードを読み出し実行することによっても達成される。この場合、記憶媒体から読み出されたコンピュータプログラムのコード自体が前述した実施形態の機能を実現し、そのコンピュータプログラムのコードを記憶した記憶媒体は本発明を構成する。また、そのプログラムのコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した機能が実現される場合も含まれる。
<Other embodiments>
The object of the present invention is also achieved by supplying a storage medium storing a code of a computer program that realizes the above-described functions to a system, and the system reading and executing the code of the computer program. In this case, the computer program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the computer program code constitutes the present invention. Further, it includes a case where an operating system (OS) running on a computer performs some or all of actual processing based on the instructions of the code of the program, and the processing realizes the above-described functions. .

さらに、以下の形態で実現しても構わない。すなわち、記憶媒体から読み出されたコンピュータプログラムコードを、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込む。そして、そのコンピュータプログラムのコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行って、前述した機能が実現される場合も含まれる。   Further, it may be realized in the following forms. That is, the computer program code read from the storage medium is written in the memory provided in the function expansion card inserted in the computer or the function expansion unit connected to the computer. Then, based on the instructions of the code of the computer program, a case where the CPU or the like included in the function expansion card or the function expansion unit performs some or all of the actual processing to realize the above-described functions is also included.

本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するコンピュータプログラムのコードが格納されることになる。   When the present invention is applied to the storage medium, the storage medium stores the code of the computer program corresponding to the above-described flowchart.

Claims (3)

入力画像の量子化処理を行うための量子化パラメータを復号する復号装置であって、
四分木構造によって表現される複数のブロックのうちの1つのブロックに含まれるサブブロックの量子化パラメータと所定のパラメータとの差分値に関する符号データを復号する復号手段と、
前記所定のパラメータとしての第1のサブブロックの量子化パラメータと、前記復号手段によって取得された差分値とを加算することにより、前記第1のサブブロックより後に符号化された第2のサブブロックの量子化パラメータを取得し、
前記所定のパラメータとして、第3のサブブロックより前に符号化された少なくとも2つのサブブロックの量子化パラメータの平均を四捨五入した値に基づくパラメータと、前記復号手段によって取得された差分値とを加算することにより、前記第3のサブブロックの量子化パラメータを取得する取得手段と、
前記第1のサブブロック、前記第2のサブブロック、および前記第3のサブブロックの量子化された係数を復号する係数復号手段と、
前記取得手段によって取得された第1の量子化パラメータを用いて前記第1のサブブロックの量子化された係数を逆量子化することにより、前記第1のサブブロックの直交変換係数を再生し、前記取得手段によって取得された第2の量子化パラメータを用いて前記第2のサブブロックの量子化された係数を逆量子化することにより、前記第2のサブブロックの直交変換係数を再生し、前記取得手段によって取得された第3の量子化パラメータを用いて前記第3のサブブロックの量子化された係数を逆量子化することにより、前記第3のサブブロックの直交変換係数を再生する逆量子化手段と、
前記逆量子化手段によって再生された前記第1のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第1のサブブロックの予測誤差を再生し、前記逆量子化手段によって再生された前記第2のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第2のサブブロックの予測誤差を再生し、前記逆量子化手段によって再生された前記第3のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第3のサブブロックの予測誤差を再生する逆変換手段と、
前記逆変換手段によって再生された前記第1のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第1のサブブロックの画像を再生し、前記逆変換手段によって再生された前記第2のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第2のサブブロックの画像を再生し、および前記逆変換手段によって再生された前記第3のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第3のサブブロックの画像を再生する再生手段と、
を備えることを特徴とする復号装置。
A decoding device for decoding a quantization parameter for performing a quantization process on an input image,
Decoding means for decoding coded data relating to a difference value between a quantization parameter of a sub-block included in one block of a plurality of blocks represented by the quadtree structure and a predetermined parameter,
The second sub-block coded after the first sub-block by adding the quantization parameter of the first sub-block as the predetermined parameter and the difference value acquired by the decoding means. Get the quantization parameter of
As the predetermined parameter, a parameter based on a value obtained by rounding off the average of the quantization parameters of at least two sub-blocks encoded before the third sub-block and the difference value obtained by the decoding means are added. Acquisition means for acquiring the quantization parameter of the third sub-block,
Coefficient decoding means for decoding the quantized coefficients of the first sub-block, the second sub-block, and the third sub-block,
Dequantizing the quantized coefficient of the first sub-block using the first quantization parameter acquired by the acquisition means to reproduce the orthogonal transform coefficient of the first sub-block, Dequantizing the quantized coefficient of the second sub-block using the second quantization parameter acquired by the acquisition means to reproduce the orthogonal transform coefficient of the second sub-block, Inverse of reconstructing the orthogonal transform coefficient of the third sub-block by dequantizing the quantized coefficient of the third sub-block using the third quantization parameter obtained by the obtaining means. Quantizing means,
The prediction error of the first sub-block is reproduced by performing an inverse orthogonal transform on the orthogonal transform coefficient of the first sub-block reproduced by the inverse quantizer, and is reproduced by the inverse quantizer. The prediction error of the second sub-block is reproduced by performing the inverse orthogonal transform on the orthogonal transform coefficient of the second sub-block, and the third sub-block of the third sub-block reproduced by the inverse quantizer is reproduced. Inverse transform means for reproducing the prediction error of the third sub-block by performing inverse orthogonal transform on the orthogonal transform coefficient;
Reproducing the image of the first sub-block based on the prediction error of the first sub-block reproduced by the inverse transforming means and the decoded pixel data of the surroundings or the pixel data of the previous frame, Reproducing the image of the second sub-block based on the prediction error of the second sub-block reproduced by the inverse transforming means, and the decoded pixel data of the surroundings or the pixel data of the previous frame, and Reproducing means for reproducing the image of the third sub-block based on the prediction error of the third sub-block reproduced by the inverse transforming means and the decoded pixel data of the surroundings or the pixel data of the previous frame. ,
A decoding device comprising:
入力画像の量子化処理を行うための量子化パラメータを復号する復号方法であって、
四分木構造によって表現される複数のブロックのうちの1つのブロックに含まれるサブブロックの量子化パラメータと所定のパラメータとの差分値に関する符号データを復号する復号工程と、
前記所定のパラメータとしての第1のサブブロックの量子化パラメータと、前記復号工程において取得された差分値とを加算することにより、前記第1のサブブロックより後に符号化された第2のサブブロックの量子化パラメータを取得し、
前記所定のパラメータとして、第3のサブブロックより前に符号化された少なくとも2つのサブブロックの量子化パラメータの平均を四捨五入した値に基づくパラメータと、前記復号工程において取得された差分値とを加算することにより、前記第3のサブブロックの量子化パラメータを取得する取得工程と、
前記第1のサブブロック、前記第2のサブブロック、および前記第3のサブブロックの量子化された係数を復号する係数復号工程と、
前記取得工程において取得された第1の量子化パラメータを用いて前記第1のサブブロックの量子化された係数を逆量子化することにより、前記第1のサブブロックの直交変換係数を再生し、前記取得工程において取得された第2の量子化パラメータを用いて前記第2のサブブロックの量子化された係数を逆量子化することにより、前記第2のサブブロックの直交変換係数を再生し、前記取得工程において取得された第3の量子化パラメータを用いて前記第3のサブブロックの量子化された係数を逆量子化することにより、前記第3のサブブロックの直交変換係数を再生する逆量子化工程と、
前記逆量子化工程において再生された前記第1のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第1のサブブロックの予測誤差を再生し、前記逆量子化工程において再生された前記第2のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第2のサブブロックの予測誤差を再生し、前記逆量子化工程において再生された前記第3のサブブロックの直交変換係数に対して逆直交変換を行うことにより前記第3のサブブロックの予測誤差を再生する逆変換工程と、
前記逆変換工程において再生された前記第1のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第1のサブブロックの画像を再生し、前記逆変換工程において再生された前記第2のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第2のサブブロックの画像を再生し、および前記逆変換工程において再生された前記第3のサブブロックの予測誤差、および周囲の復号済の画素データまたは前のフレームの画素データに基づいて、前記第3のサブブロックの画像を再生する再生工程と、
を備えることを特徴とする復号方法。
A decoding method for decoding a quantization parameter for performing a quantization process on an input image,
A decoding step of decoding coded data relating to a difference value between a quantization parameter of a sub-block included in one block of a plurality of blocks represented by a quadtree structure and a predetermined parameter;
The second sub-block coded after the first sub-block by adding the quantization parameter of the first sub-block as the predetermined parameter and the difference value acquired in the decoding step. Get the quantization parameter of
As the predetermined parameter, a parameter based on a value obtained by rounding off the average of the quantization parameters of at least two sub-blocks encoded before the third sub-block and the difference value obtained in the decoding step are added. An acquisition step of acquiring the quantization parameter of the third sub-block,
A coefficient decoding step of decoding quantized coefficients of the first sub-block, the second sub-block, and the third sub-block,
Dequantizing the quantized coefficient of the first sub-block using the first quantization parameter acquired in the acquisition step to reproduce the orthogonal transform coefficient of the first sub-block, Dequantizing the quantized coefficient of the second sub-block using the second quantization parameter acquired in the acquisition step to reproduce the orthogonal transform coefficient of the second sub-block, Inverse of reconstructing the orthogonal transform coefficient of the third sub-block by dequantizing the quantized coefficient of the third sub-block using the third quantization parameter acquired in the acquisition step. The quantization process,
The prediction error of the first sub-block is reproduced by performing an inverse orthogonal transform on the orthogonal transform coefficient of the first sub-block reproduced in the inverse quantization step, and is reproduced in the inverse quantization step. The prediction error of the second sub-block is reproduced by performing the inverse orthogonal transform on the orthogonal transform coefficient of the second sub-block, and the prediction error of the third sub-block reproduced in the inverse quantization step is reproduced. An inverse transform step of reproducing the prediction error of the third sub-block by performing an inverse orthogonal transform on the orthogonal transform coefficient,
Reproducing the image of the first sub-block based on the prediction error of the first sub-block reproduced in the inverse transforming step and the decoded pixel data of the surroundings or the pixel data of the previous frame, Reconstructing the image of the second sub-block based on the prediction error of the second sub-block reconstructed in the inverse transforming step and surrounding decoded pixel data or pixel data of the previous frame, and A reproducing step of reproducing the image of the third sub-block based on the prediction error of the third sub-block reproduced in the inverse transforming step and the decoded pixel data of the surroundings or the pixel data of the previous frame; ,
A decoding method comprising:
コンピュータが読み出して実行することにより、前記コンピュータを、請求項1に記載の復号装置として機能させることを特徴とするプログラム。   A program that causes the computer to function as the decoding device according to claim 1, when the program is read and executed by the computer.
JP2018188340A 2018-10-03 2018-10-03 Decoding device, decoding method, program, and storage medium Active JP6686095B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018188340A JP6686095B2 (en) 2018-10-03 2018-10-03 Decoding device, decoding method, program, and storage medium
JP2020059111A JP6953576B2 (en) 2018-10-03 2020-03-27 Coding device, coding method, program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018188340A JP6686095B2 (en) 2018-10-03 2018-10-03 Decoding device, decoding method, program, and storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2017103758A Division JP6415637B2 (en) 2017-05-25 2017-05-25 Decoding device, decoding method, program, and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2020059111A Division JP6953576B2 (en) 2018-10-03 2020-03-27 Coding device, coding method, program and storage medium

Publications (2)

Publication Number Publication Date
JP2019022224A JP2019022224A (en) 2019-02-07
JP6686095B2 true JP6686095B2 (en) 2020-04-22

Family

ID=65354570

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018188340A Active JP6686095B2 (en) 2018-10-03 2018-10-03 Decoding device, decoding method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP6686095B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2681025C (en) * 2007-03-20 2015-10-13 Fujitsu Limited Video encoding and decoding apparatus and method using quantization in sub-blocks
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
JP6415637B2 (en) * 2017-05-25 2018-10-31 キヤノン株式会社 Decoding device, decoding method, program, and storage medium

Also Published As

Publication number Publication date
JP2019022224A (en) 2019-02-07

Similar Documents

Publication Publication Date Title
JP5875236B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP6415637B2 (en) Decoding device, decoding method, program, and storage medium
JP2013012887A (en) Image encoding apparatus, image encoding method and program, image decoding apparatus, image decoding method and program
JP6686095B2 (en) Decoding device, decoding method, program, and storage medium
JP6039163B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP6953576B2 (en) Coding device, coding method, program and storage medium
JP7358135B2 (en) Image encoding device, image encoding method, and program; image decoding device, image decoding method, and program
JP6743225B2 (en) Image decoding apparatus, image decoding method and program
JP6150912B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP7508675B2 (en) Image encoding device, image encoding method, and program, image decoding device, image decoding method, and program
JP7508676B2 (en) Image encoding device, image encoding method, and program, image decoding device, image decoding method, and program
JP2018067961A (en) Image decoder, image decoding method and program
JP7358136B2 (en) Image encoding device, image encoding method, and program; image decoding device, image decoding method, and program
JP2021044708A (en) Image encoding device, image encoding method and program, image decoding device, and image decoding method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181003

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A132

Effective date: 20190820

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191016

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: 20200303

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200401

R151 Written notification of patent or utility model registration

Ref document number: 6686095

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151