JP6891325B2 - Image coding method - Google Patents

Image coding method Download PDF

Info

Publication number
JP6891325B2
JP6891325B2 JP2020128514A JP2020128514A JP6891325B2 JP 6891325 B2 JP6891325 B2 JP 6891325B2 JP 2020128514 A JP2020128514 A JP 2020128514A JP 2020128514 A JP2020128514 A JP 2020128514A JP 6891325 B2 JP6891325 B2 JP 6891325B2
Authority
JP
Japan
Prior art keywords
quantization matrix
quantization
coefficient
unit
image
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
JP2020128514A
Other languages
Japanese (ja)
Other versions
JP2020184804A (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
Priority claimed from JP2019053563A external-priority patent/JP6743225B2/en
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2020128514A priority Critical patent/JP6891325B2/en
Publication of JP2020184804A publication Critical patent/JP2020184804A/en
Priority to JP2021088226A priority patent/JP7279109B2/en
Application granted granted Critical
Publication of JP6891325B2 publication Critical patent/JP6891325B2/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 an image coding method.

動画像の圧縮記録方法として、H.264/MPEG−4 AVC(以下H.264)が知られている。(非特許文献1)
H.264においてはscaling_list情報を符号化することにより、量子化マトリクスの各係数を任意の値に変更することができる。非特許文献1によれば、直前の係数に差分値であるdelta_scaleを加算することで量子化マトリクスの各係数は任意の値をとることができる。
As a method for compressing and recording moving images, H.I. 264 / MPEG-4 AVC (hereinafter referred to as H.264) is known. (Non-Patent Document 1)
H. In 264, each coefficient of the quantization matrix can be changed to an arbitrary value by encoding the scaling_list information. According to Non-Patent Document 1, each coefficient of the quantization matrix can take an arbitrary value by adding the difference value delta_scale to the immediately preceding coefficient.

近年、H.264の後継としてさらに高効率な符号化方式の国際標準化を行う活動が開始された。JCT−VC(Joint Collaborative Team on Video Coding)がISO/IECとITU−Tの間で設立された。このJCT−VCにおいて、HEVC(High Efficiency Video Coding)符号化方式(以下、HEVC)として標準化が進められている。 In recent years, H. As a successor to 264, activities to carry out international standardization of more efficient coding methods have started. JCT-VC (Joint Collaboration Team on Video Coding) was established between ISO / IEC and ITU-T. In this JCT-VC, standardization is being promoted as a HEVC (High Efficiency Video Coding) coding method (hereinafter referred to as HEVC).

この方式では、符号化効率向上のため、従来の離散コサインベースの直交変換方法に加えて離散サイン変換といった直交変換方法が検討されている。また、カメラなどで撮影した自然映像だけでなく、PC画面やゲームといった人工映像における符号化効率向上のため、直交変換を行わない変換スキップ技術といった方法も検討されている。(非特許文献2) In this method, in order to improve the coding efficiency, an orthogonal transform method such as a discrete sine transform is being studied in addition to the conventional discrete cosine-based orthogonal transform method. Further, in order to improve the coding efficiency not only in natural images taken by a camera or the like but also in artificial images such as PC screens and games, a method such as a conversion skip technique that does not perform orthogonal conversion is being studied. (Non-Patent Document 2)

ITU−T H.264 (03/2010) Advancedvideo coding for generic audiovisual servicesITU-T H. 264 (03/2010) Advancedvideo coding for generic audiovisual services JCT−VC 寄書 JCTVC−I1003.doc インターネット< http://phenix.int−evry.fr/jct/doc_end_user/documents/9_Geneva/wg11/ >JCT-VC Contribution JCTVC-I1003. doc internet <http: // phenix. int-every. fr / junction / doc_end_user / documents / 9_Geneva / wg11 />

一般的に画像の圧縮においては、主観画質の向上のため、直交変換を行った後の変換係数のうち、低周波成分にあたる係数をより小さな値で量子化し、高周波成分にあたる係数をより大きな値で量子化することが多い。この場合、図5(a)に示されるような量子化マトリクスを用いて周波数成分による重み付け量子化を行うことが一般的である。この量子化マトリクス500は、低周波成分にあたる係数がより小さく、高周波成分にあたる係数がより大きい。 Generally, in image compression, in order to improve subjective image quality, among the conversion coefficients after orthogonal transformation, the coefficient corresponding to the low frequency component is quantized with a smaller value, and the coefficient corresponding to the high frequency component is set to a larger value. Often quantized. In this case, it is common to perform weighted quantization by frequency components using a quantization matrix as shown in FIG. 5A. The quantization matrix 500 has a smaller coefficient corresponding to a low frequency component and a larger coefficient corresponding to a high frequency component.

一方、HEVCにおいて、特に前述の変換スキップ技術を用いた場合には直交変換が行われないため、量子化対象の係数は全て同一の周波数成分を有している。このため、変換スキップ技術を用いた場合は前述の重み付け量子化を行うことは好ましくなく、図5(b)に示されるような全ての係数が同一の値をもつフラットな量子化マトリクス501を用いて量子化処理を行う必要がある。そのため、フラットな量子化マトリクス501の情報をより少ない符号量で符号化できることが望ましいが、特に上述のHEVCにおいては、効率良く符号化できる仕組みが存在せず、結果として不必要に符号量が多くなってしまっていた。 On the other hand, in HEVC, especially when the above-mentioned conversion skip technique is used, orthogonal transformation is not performed, so that the coefficients to be quantized all have the same frequency component. Therefore, when the conversion skip technique is used, it is not preferable to perform the above-mentioned weighted quantization, and a flat quantization matrix 501 in which all the coefficients have the same value as shown in FIG. 5B is used. It is necessary to perform quantization processing. Therefore, it is desirable that the information of the flat quantization matrix 501 can be encoded with a smaller amount of code. However, especially in the above-mentioned HEVC, there is no mechanism for efficiently coding, and as a result, the amount of code is unnecessarily large. It had become.

したがって、本発明は上述した課題を解決するためになされたものであり、フラットな量子化マトリクスをより少ない符号量で効率よく符号化する方法を導入することにより、高効率の量子化マトリクス符号化・復号を実現することを目的としている。 Therefore, the present invention has been made to solve the above-mentioned problems, and by introducing a method for efficiently coding a flat quantization matrix with a smaller amount of code, highly efficient quantization matrix coding can be performed. -The purpose is to realize decoding.

上述の問題点を解決するため、本発明の画像符号化方法は以下の構成を有する。すなわち、画像を直交変換する変換ステップと、画像を直交変換せずに、当該画像のビット深度を調整する調整ステップと、画像を直交変換することにより得られた係数、あるいは、画像を直交変換せずにビット深度が調整された係数に対して、全ての係数が同一の値である量子化マトリクスに基づいて量子化することにより量子化係数を得る量子化ステップと、前記量子化係数、前記量子化係数が直交変換された係数であるか否かを示す変換スキップ判定情報、全ての係数が同一の値である量子化マトリクスであるか否かを示す参照情報を符号化する符号化ステップと、を有し、
前記量子化ステップにおいて、画像を直交変換せずにビット深度が調整された係数に対して全ての係数が同一の値である量子化マトリクスを用いて量子化を行う場合、前記量子化係数がイントラ予測を用いて符号化されたものであるのかインター予測を用いて符号化されたものであるのかにかかわらず全ての係数が同一の値である量子化マトリクスを用いて量子化を行い、前記符号化ステップにおいて、量子化係数が直交変換された係数ではないことを示す変換スキップ判定情報、および、全ての係数が同一の値である量子化マトリクスであるか否かを示す参照情報が符号化されることを特徴とする。
In order to solve the above-mentioned problems, the image coding method of the present invention has the following configuration. That is, a conversion step for orthogonally transforming an image, an adjustment step for adjusting the bit depth of the image without orthogonally transforming the image, and a coefficient obtained by orthogonally transforming the image, or for orthogonally transforming the image. The quantization step of obtaining the quantization coefficient by quantization based on the quantization matrix in which all the coefficients have the same value with respect to the coefficient whose bit depth is adjusted without the above, the quantization coefficient, and the quantum. Conversion skip determination information indicating whether or not the conversion coefficient is an orthogonally converted coefficient, a coding step for encoding reference information indicating whether or not all the coefficients are quantization matrices having the same value, and Have,
In the quantization step, when quantization is performed using a quantization matrix in which all the coefficients have the same value with respect to the coefficient whose bit depth is adjusted without orthogonally transforming the image, the quantization coefficient is intra. Quantization is performed using a quantization matrix in which all the coefficients are the same value regardless of whether they are encoded using prediction or inter-prediction. In the quantization step, conversion skip determination information indicating that the quantization coefficient is not an orthogonally converted coefficient and reference information indicating whether or not all the coefficients are quantization matrices having the same value are encoded. It is characterized by that.

本発明により、量子化マトリクス符号化のための符号量を削減し、高効率の符号化・復号が可能になる。 INDUSTRIAL APPLICABILITY According to the present invention, the amount of coding for quantization matrix coding can be reduced, and highly efficient coding / decoding becomes possible.

実施形態1における画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the image coding apparatus in Embodiment 1. 実施形態2における画像復号装置の構成を示すブロック図The block diagram which shows the structure of the image decoding apparatus in Embodiment 2. 実施形態3における画像符号化装置の構成を示すブロック図The block diagram which shows the structure of the image coding apparatus in Embodiment 3. 実施形態4における画像復号装置の構成を示すブロック図The block diagram which shows the structure of the image decoding apparatus in Embodiment 4. (a)、(b)量子化マトリクスの一例を示す図(A), (b) The figure which shows an example of the quantization matrix. 実施形態1に係る画像符号化装置における画像符号化処理を示すフローチャートA flowchart showing an image coding process in the image coding apparatus according to the first embodiment. 実施形態2に係る画像復号装置における画像復号処理を示すフローチャートA flowchart showing an image decoding process in the image decoding apparatus according to the second embodiment. 実施形態3に係る画像符号化装置における画像符号化処理を示すフローチャートA flowchart showing an image coding process in the image coding apparatus according to the third embodiment. 実施形態4に係る画像復号装置における画像復号処理を示すフローチャートA flowchart showing an image decoding process in the image decoding apparatus according to the fourth embodiment. (a)、(b)、(c)ビットストリーム構造の一例を示す図(A), (b), (c) The figure which shows an example of the bit stream structure. 符号化対象の量子化マトリクスと量子化マトリクス参照情報との関係の一例を示す図The figure which shows an example of the relationship between the quantization matrix to be encoded and the quantization matrix reference information. 本発明の画像符号化装置、復号装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図A block diagram showing a configuration example of computer hardware applicable to the image coding device and decoding device of the present invention.

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

<実施形態1>
以下、本発明の実施形態を、図面を用いて説明する。図1は本実施形態の画像符号化装置を示すブロック図である。
<Embodiment 1>
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an image coding apparatus of this embodiment.

図1において、101は画像データ(以下、画像)を入力する端子である。102は入力された画像を複数のブロックに分割するブロック分割部である。103はブロック分割部102で分割された各ブロックを、ブロック単位で予測を行い、予測方法を決定し、それに従って差分値算出を行い、予測誤差を算出する予測部である。予測部103ではイントラ予測若しくは動き補償予測も行うものとする。イントラ予測は一般的には、周囲の画素データから予測値を算出するために、複数の参照方法の中から最適なものを予測方法として選択することで実現する。 In FIG. 1, 101 is a terminal for inputting image data (hereinafter referred to as an image). Reference numeral 102 denotes a block dividing unit that divides the input image into a plurality of blocks. Reference numeral 103 denotes a prediction unit that predicts each block divided by the block division unit 102 in block units, determines a prediction method, calculates a difference value according to the prediction method, and calculates a prediction error. The prediction unit 103 also performs intra prediction or motion compensation prediction. Intra-prediction is generally realized by selecting the most suitable prediction method from a plurality of reference methods in order to calculate a prediction value from surrounding pixel data.

104は各ブロックの予測誤差に対して直交変換を行う変換部であり、入力されたブロックのサイズまたはそれを細分化したサイズを単位に直交変換を行い、直交変換係数を算出する。以下では直交変換を行うブロックを変換ブロックと呼称する。直交変換に関しては特に限定しないが、離散コサイン変換やアダマール変換等を用いてもよい。また、本実施形態では説明のため、8×8画素のブロック単位の予測誤差を縦横2分割し、4×4画素の変換ブロック単位で直交変換を行うものとするが、変換ブロックの大きさ、形状はこれに限定されない。ブロックと同一の大きさの変換ブロックを用いて直交変換を行っても良いし、ブロックを縦横2分割よりもさらに細かい単位で分割した変換ブロックを用いて直交変換を行っても良い。 Reference numeral 104 denotes a conversion unit that performs orthogonal conversion with respect to the prediction error of each block, performs orthogonal conversion in units of the size of the input block or the size obtained by subdividing it, and calculates the orthogonal conversion coefficient. Hereinafter, the block that performs orthogonal transformation is referred to as a conversion block. The orthogonal transform is not particularly limited, but a discrete cosine transform, a Hadamard transform, or the like may be used. Further, in the present embodiment, for the sake of explanation, the prediction error in the block unit of 8 × 8 pixels is divided into two in the vertical and horizontal directions, and the orthogonal transformation is performed in the conversion block unit of 4 × 4 pixels. The shape is not limited to this. Orthogonal transformation may be performed using a conversion block having the same size as the block, or orthogonal transformation may be performed using a conversion block in which the block is divided into smaller units than the vertical and horizontal divisions.

107は量子化マトリクスを生成し、格納する量子化マトリクス保持部である。格納される量子化マトリクスの生成方法については特に限定しないが、ユーザが量子化マトリクスを入力しても良いし、入力画像の特性から算出しても、初期値として予め指定されたものを使用してももちろん良い。本実施形態では、図5(a)や(b)に示されるような4×4画素の変換ブロックに対応した二次元の量子化マトリクスが生成され、格納されるものとする。 Reference numeral 107 denotes a quantization matrix holding unit that generates and stores a quantization matrix. The method of generating the stored quantization matrix is not particularly limited, but the user may input the quantization matrix, or even if it is calculated from the characteristics of the input image, the one specified in advance as the initial value is used. But of course it's good. In the present embodiment, it is assumed that a two-dimensional quantization matrix corresponding to a conversion block of 4 × 4 pixels as shown in FIGS. 5A and 5B is generated and stored.

105は量子化マトリクス保持部107に格納された量子化マトリクスによって、前記直交変換係数を量子化する量子化部である。この量子化によって量子化係数を得ることができる。106はこのようにして得られた量子化係数を符号化して量子化係数符号データを生成する係数符号化部である。符号化の方法は特に限定しないが、ハフマン符号や算術符号などを用いることができる。108は量子化マトリクス保持部107に格納された量子化マトリクスが、所定の量子化マトリクスと一致するか否かを判定する量子化マトリクス判定部である。より具体的には符号化対象の量子化マトリクスが、既に符号化済みの量子化マトリクス、予め定められた量子化マトリクスもしくは係数が全て同一の値を持つフラットな量子化マトリクスであるか否かを判定する。この予め定められた量子化マトリクスは量子化マトリクス保持部107に格納されているとする。但しこれに限定されない。例えば、量子化マトリクス判定部108に格納されていても構わない。 Reference numeral 105 denotes a quantization unit that quantizes the orthogonal transformation coefficient by the quantization matrix stored in the quantization matrix holding unit 107. The quantization coefficient can be obtained by this quantization. Reference numeral 106 denotes a coefficient coding unit that encodes the quantization coefficient thus obtained to generate the quantization coefficient code data. The coding method is not particularly limited, but a Huffman code, an arithmetic code, or the like can be used. Reference numeral 108 denotes a quantization matrix determination unit for determining whether or not the quantization matrix stored in the quantization matrix holding unit 107 matches a predetermined quantization matrix. More specifically, whether or not the quantization target to be encoded is an already encoded quantization matrix, a predetermined quantization matrix, or a flat quantization matrix in which all the coefficients have the same value. judge. It is assumed that this predetermined quantization matrix is stored in the quantization matrix holding unit 107. However, it is not limited to this. For example, it may be stored in the quantization matrix determination unit 108.

109は量子化マトリクス判定部108における判定を示す情報やその他の量子化マトリクスに関する情報をヘッダとして符号化して量子化マトリクスヘッダ符号を生成する量子化マトリクスヘッダ符号化部である。110は符号化対象の量子化マトリクスの各係数を符号化して量子化マトリクス係数符号を生成する量子化マトリクス係数符号化部である。 Reference numeral 109 denotes a quantization matrix header coding unit that generates a quantization matrix header code by encoding information indicating a determination in the quantization matrix determination unit 108 and other information related to the quantization matrix as a header. Reference numeral 110 denotes a quantization matrix coefficient coding unit that encodes each coefficient of the quantization matrix to be encoded to generate a quantization matrix coefficient code.

111はヘッダ情報や予測、変換に関する符号を生成するとともに、前述の各符号化部で生成された符号データを統合してビットストリームを形成して出力する統合符号化部である。具体的には、係数符号化部106で生成された量子化係数符号データや量子化マトリクスヘッダ符号化部109で生成された量子化マトリクスヘッダ符号、量子化マトリクス係数符号化部110で生成された量子化マトリクス係数符号を統合する。ここで予測、変換に関する符号とは、例えば選択した予測方法や変換ブロックの分割の様子等の符号である。112は統合符号化部111で生成されたビットストリームを外部に出力する端子である。 Reference numeral 111 denotes an integrated coding unit that generates a code related to header information, prediction, and conversion, and integrates the code data generated by each of the above-mentioned coding units to form a bit stream and output the code. Specifically, the quantization coefficient code data generated by the coefficient coding unit 106, the quantization matrix header code generated by the quantization matrix header coding unit 109, and the quantization matrix coefficient coding unit 110 are generated. Integrate the quantization matrix coefficient code. Here, the code related to prediction and conversion is, for example, a code such as a selected prediction method or a state of division of conversion blocks. Reference numeral 112 denotes a terminal for outputting the bit stream generated by the integrated coding unit 111 to the outside.

上記画像符号化装置における画像の符号化動作を以下に説明する。本実施形態では動画像データをピクチャ単位に入力する構成となっているが、1ピクチャ分の静止画像データを入力する構成としても構わない。また、本実施形態では、説明を容易にするため、イントラ予測符号化の処理のみを説明するが、これに限定されずインター予測符号化の処理においても適用可能である。本実施形態では説明のため、ブロック分割部102においては8×8画素のブロックに分割するものとして説明するが、これに限定されない。 The image coding operation in the image coding apparatus will be described below. In the present embodiment, the moving image data is input in units of pictures, but the still image data for one picture may be input. Further, in the present embodiment, only the intra-predictive coding process will be described for ease of explanation, but the present embodiment is not limited to this, and can be applied to the inter-predictive coding process. In the present embodiment, for the sake of explanation, the block division unit 102 will be described as being divided into blocks of 8 × 8 pixels, but the present embodiment is not limited to this.

<量子化マトリクス係数の符号化>
最初に、量子化マトリクス保持部107は量子化マトリクスを生成する。符号化処理に用いられる直交変換のサイズである変換ブロックサイズに応じて、量子化マトリクスが決定される。量子化マトリクスの係数の決定方法は特に限定しない。例えば、所定の初期値を用いても良いし、個別に設定しても良い。また、画像の特性に応じて設定して生成されても構わない。
<Code-coding of quantization matrix coefficient>
First, the quantization matrix holding unit 107 generates a quantization matrix. The quantization matrix is determined according to the conversion block size, which is the size of the orthogonal transformation used in the coding process. The method for determining the coefficients of the quantization matrix is not particularly limited. For example, a predetermined initial value may be used or may be set individually. Further, it may be set and generated according to the characteristics of the image.

量子化マトリクス保持部107には、このようにして生成された量子化マトリクスが保持されている。図5(a)、(b)は4×4画素の変換ブロックに対応する量子化マトリクスの一例である。説明を簡易にするため、4×4画素の変換ブロックに対応した16画素分の構成とし、太枠内の各正方形は係数を表しているものとする。本実施形態では、図5(a)、(b)に示された量子化マトリクスが二次元形状で保持されているものとするが、量子化マトリクス内の係数はもちろんこれに限定されない。例えば、本実施形態に加えて8×8画素の変換ブロックサイズも用いる場合には、8×8画素変換ブロックに対応する他の量子化マトリクスを保持することになる。 The quantization matrix holding unit 107 holds the quantization matrix thus generated. 5 (a) and 5 (b) are examples of a quantization matrix corresponding to a conversion block of 4 × 4 pixels. For the sake of simplicity, it is assumed that the configuration is 16 pixels corresponding to the conversion block of 4 × 4 pixels, and each square in the thick frame represents a coefficient. In the present embodiment, it is assumed that the quantization matrix shown in FIGS. 5A and 5B is held in a two-dimensional shape, but the coefficients in the quantization matrix are of course not limited to this. For example, when a conversion block size of 8 × 8 pixels is also used in addition to the present embodiment, another quantization matrix corresponding to the 8 × 8 pixel conversion block is held.

量子化マトリクス判定部108は符号化対象の量子化マトリクスを量子化マトリクス保持部107から順に読み出す。そして所定の量子化マトリクスと一致するか否かを判定し、符号化対象の量子化マトリクスが所定の量子化マトリクスと一致することを示す一致情報を生成する。本実施形態では、符号化済みの量子化マトリクス、図5(a)に示されたデフォルトの量子化マトリクスもしくは図5(b)に示されたフラットな量子化マトリクスのいずれかと一致するか否かを判定する。符号化済みの量子化マトリクスは量子化マトリクス保持部107に格納されており、図5(a)および図5(b)に示された量子化マトリクスも量子化マトリクス保持部107に予め記憶されているものとする。符号化対象の量子化マトリクスがいずれかと一致すると判定された場合は、さらにどの量子化マトリクスと一致するかを示す参照情報を生成する。この参照情報は一致情報とともに量子化マトリクスヘッダ符号化部109に出力する。この場合、量子化マトリクス係数符号化部110には何も出力せず、動作しない。一方、いずれの量子化マトリクスとも一致しない場合は、一致情報のみを量子化マトリクスヘッダ符号化部109に出力しつつ、符号化対象の量子化マトリクスを量子化マトリクス係数符号化部110に出力する。本実施形態では、所定の量子化マトリクスの中に符号化対象の量子化マトリクスと一致するものがある場合には一致情報は1となり、そうでない場合は0となるものとするが、値と状態との組合せはこれに限定されない。 The quantization matrix determination unit 108 reads out the quantization matrix to be encoded in order from the quantization matrix holding unit 107. Then, it is determined whether or not it matches the predetermined quantization matrix, and matching information indicating that the quantization matrix to be encoded matches the predetermined quantization matrix is generated. In this embodiment, whether it matches either the encoded quantization matrix, the default quantization matrix shown in FIG. 5 (a), or the flat quantization matrix shown in FIG. 5 (b). To judge. The encoded quantization matrix is stored in the quantization matrix holding unit 107, and the quantization matrix shown in FIGS. 5 (a) and 5 (b) is also stored in the quantization matrix holding unit 107 in advance. It is assumed that there is. If it is determined that the quantization matrix to be encoded matches any of them, reference information indicating which quantization matrix matches is further generated. This reference information is output to the quantization matrix header coding unit 109 together with the matching information. In this case, nothing is output to the quantization matrix coefficient coding unit 110 and the operation does not occur. On the other hand, if it does not match any of the quantization matrices, only the match information is output to the quantization matrix header coding unit 109, and the quantization target to be encoded is output to the quantization matrix coefficient coding unit 110. In the present embodiment, if there is a predetermined quantization matrix that matches the quantization target quantization matrix, the match information is 1, and if not, it is 0. However, the value and the state are set. The combination with is not limited to this.

図11は本実施形態における符号化対象の量子化マトリクスと参照情報との関係の一例を示す図である。本実施形態では、YCbCr色空間で入力された画像のY成分の量子化に対応する第一、Cb成分の量子化に対応する第二、Cr成分の量子化に対応する第三の3種類の量子化マトリクスが存在するものとするが、これに限定されない。変換ブロックサイズや予測方法、色空間の組み合わせによってより多くの量子化マトリクスを定義しても構わない。また、本実施形態では図5(a)に示された量子化マトリクスをデフォルト4×4、図5(b)に示された量子化マトリクスをフラット4×4の量子化マトリクスであるものとするが、使用される量子化マトリクスはこれらに限定されない。 FIG. 11 is a diagram showing an example of the relationship between the quantization matrix to be encoded and the reference information in the present embodiment. In this embodiment, there are three types: the first corresponding to the quantization of the Y component of the image input in the YCbCr color space, the second corresponding to the quantization of the Cb component, and the third corresponding to the quantization of the Cr component. It is assumed that a quantization matrix exists, but the present invention is not limited to this. More quantization matrices may be defined by the combination of conversion block size, prediction method, and color space. Further, in the present embodiment, the quantization matrix shown in FIG. 5 (a) is a default 4 × 4, and the quantization matrix shown in FIG. 5 (b) is a flat 4 × 4 quantization matrix. However, the quantization matrix used is not limited to these.

例えば、符号化対象量子化マトリクスが第一(4x4Y)であり、デフォルト4×4と一致する場合、参照情報は0とする。また、フラット4×4と一致する場合、参照情報は1とする。このようなフラット4×4と一致することが、符号化対象の量子化マトリクスの係数が全て同一の値であることを示すフラット情報となる。同様に、符号化対象量子化マトリクスが第二(4x4Cb)の場合、デフォルト4×4と一致すれば参照情報は0とし、符号化済みの第一(4x4Y)と一致すれば参照情報は1となる。また、フラット4×4と一致すれば参照情報は2とする。符号化対象量子化マトリクスが第三(4x4Cr)の場合も同様である。 For example, if the quantization target quantization matrix is the first (4x4Y) and matches the default 4x4, the reference information is set to 0. If it matches the flat 4 × 4, the reference information is set to 1. Matching with such flat 4 × 4 provides flat information indicating that the coefficients of the quantization matrix to be coded are all the same value. Similarly, when the coded object quantization matrix is the second (4x4Cb), the reference information is set to 0 if it matches the default 4x4, and the reference information is set to 1 if it matches the coded first (4x4Y). Become. If it matches the flat 4 × 4, the reference information is set to 2. The same applies when the quantization target quantization matrix is the third (4x4Cr).

量子化マトリクスヘッダ符号化部109では、量子化マトリクス判定部108から入力された一致情報および必要に応じて参照情報を符号化して量子化マトリクスヘッダ符号を生成する。本実施形態では、符号化対象の量子化マトリクスが符号化装置に予め記憶されている量子化マトリクスもしくは符号化済みの量子化マトリクスのいずれかと一致する場合には、一致情報および参照情報の両方を符号化する。一方、上記のいずれの量子化マトリクスとも一致しない場合には、一致情報のみを符号化する。符号化の方法は特に限定しないが、ハフマン符号や算術符号などを用いることができる。生成された量子化マトリクスヘッダ符号は統合符号化部111に出力される。 The quantization matrix header coding unit 109 encodes the matching information input from the quantization matrix determination unit 108 and the reference information as needed to generate the quantization matrix header code. In the present embodiment, when the quantization matrix to be coded matches either the quantization matrix stored in the coding device or the coded quantization matrix, both the matching information and the reference information are displayed. To encode. On the other hand, if it does not match any of the above quantization matrices, only the match information is encoded. The coding method is not particularly limited, but a Huffman code, an arithmetic code, or the like can be used. The generated quantization matrix header code is output to the integrated coding unit 111.

量子化マトリクス係数符号化部110では、量子化マトリクス判定部108から入力された符号化対象の量子化マトリクスを符号化して量子化マトリクス係数符号を生成する。本実施形態では、符号化対象の量子化マトリクスが符号化装置に予め記憶されている量子化マトリクスや符号化済みの量子化マトリクスとは一致しない場合に限り、量子化マトリクス係数符号化部110は動作する。符号化方式としては、本実施形態では、各係数をそのまま符号化する、直前の係数との差分を符号化する、DPCM、他の量子化マトリクスとの差分を符号化するといった方式を用いることとするが、方式はこれらに限定されない。また、符号化装置に予め記憶されていないフラットな量子化マトリクスを符号化する場合には代表値のみを符号化するような方式をとってもよい。また、これらと合わせて同じ値が続くときは符号化を打ち切る符号を挿入することにより量子化マトリクスの符号量を抑制することもできる。 The quantization matrix coefficient coding unit 110 encodes the quantization target quantization matrix input from the quantization matrix determination unit 108 to generate a quantization matrix coefficient code. In the present embodiment, the quantization matrix coefficient coding unit 110 sets the quantization matrix coefficient coding unit 110 only when the quantization matrix to be coded does not match the quantization matrix stored in advance in the coding device or the coded quantization matrix. Operate. As the coding method, in the present embodiment, a method of coding each coefficient as it is, coding the difference from the immediately preceding coefficient, and coding the difference from DPCM or another quantization matrix is used. However, the method is not limited to these. Further, when coding a flat quantization matrix that is not stored in advance in the coding device, a method of coding only the representative value may be adopted. Further, when the same value continues in combination with these, the code amount of the quantization matrix can be suppressed by inserting a code for terminating the coding.

統合符号化部111では画像の符号化に必要なヘッダ情報を符号化し、入力された量子化マトリクスヘッダ符号および量子化マトリクス係数符号を統合する。 The integrated coding unit 111 encodes the header information necessary for coding the image, and integrates the input quantization matrix header code and the quantization matrix coefficient code.

なお、量子化マトリクス判定部108と量子化マトリクスヘッダ符号化部109と量子化マトリクス係数符号化部110は、1つの処理部である量子化マトリクス符号化部として機能してもよい。 The quantization matrix determination unit 108, the quantization matrix header coding unit 109, and the quantization matrix coefficient coding unit 110 may function as one processing unit, the quantization matrix coding unit.

<画像の符号化>
端子101から入力された1ピクチャ分の画像はブロック分割部102に入力され、8×8画素のブロック単位に分割される。分割された画像は予測部103に入力される。予測部103ではブロック単位の予測が行われ、予測誤差が生成される。変換部104では、予測部103で生成された予測誤差を変換ブロックサイズに分割して直交変換を行い、直交変換係数を生成する。そして、直交変換係数を量子化部105に入力する。本実施形態では、8×8画素のブロック単位の予測誤差を4×4画素の変換ブロック単位に分割して直交変換を行うものとする。量子化部105では、変換部104から出力された直交変換係数を量子化マトリクス保持部107に格納されている量子化マトリクスを用いて量子化して量子化係数を生成する。生成された量子化係数は係数符号化部106に入力される。係数符号化部106では、量子化部105で生成された量子化係数を符号化し、量子化係数符号データを生成して統合符号化部111に出力する。統合符号化部111はブロック単位で予測、変換に関する符号を生成し、前記ヘッダの符号化データとともに、ブロック単位の符号、係数符号化部106で生成された量子化係数符号データを統合し、ビットストリームを生成して端子112から出力する。
<Image coding>
The image for one picture input from the terminal 101 is input to the block division unit 102, and is divided into block units of 8 × 8 pixels. The divided image is input to the prediction unit 103. The prediction unit 103 makes a block-by-block prediction, and a prediction error is generated. The conversion unit 104 divides the prediction error generated by the prediction unit 103 into conversion block sizes, performs orthogonal transformation, and generates an orthogonal transformation coefficient. Then, the orthogonal transformation coefficient is input to the quantization unit 105. In the present embodiment, the prediction error in block units of 8 × 8 pixels is divided into conversion block units of 4 × 4 pixels to perform orthogonal conversion. The quantization unit 105 generates a quantization coefficient by quantizing the orthogonal transformation coefficient output from the conversion unit 104 using the quantization matrix stored in the quantization matrix holding unit 107. The generated quantization coefficient is input to the coefficient coding unit 106. The coefficient coding unit 106 encodes the quantization coefficient generated by the quantization unit 105, generates the quantization coefficient code data, and outputs the quantization coefficient code data to the integrated coding unit 111. The integrated coding unit 111 generates a code related to prediction and conversion in block units, integrates the code in block units and the quantization coefficient code data generated by the coefficient coding unit 106 together with the coding data of the header, and bits. A stream is generated and output from the terminal 112.

図10に実施形態1で出力されるビットストリームの例を示す。シーケンスヘッダに量子化マトリクスの符号データが含まれ、ヘッダ符号や各係数の符号化結果で構成されている。図10(a)は第1から第3までの量子化マトリクスの全てが異なりかつフラットな量子化マトリクスともデフォルトの量子化マトリクスとも異なる場合のビットストリームの例である。すなわち、第1から第3までの各量子化マトリクスヘッダ符号には、一致情報の0が符号化されており、各量子化マトリクス係数符号には各量子化マトリクスの係数が符号化されている。但し、符号化の位置はこれに限定されない。ピクチャヘッダ部やその他のヘッダ部に符号化される構成をとってももちろん構わない。 FIG. 10 shows an example of the bit stream output in the first embodiment. The sequence header contains the code data of the quantization matrix, and is composed of the header code and the coded result of each coefficient. FIG. 10A is an example of a bitstream in which all of the first to third quantization matrices are different and different from the flat quantization matrix and the default quantization matrix. That is, 0 of the matching information is encoded in each of the first to third quantization matrix header codes, and the coefficient of each quantization matrix is encoded in each quantization matrix coefficient code. However, the coding position is not limited to this. Of course, a configuration in which the picture header portion and other header portions are encoded may be used.

図10(b)は第1から第3までの量子化マトリクスの全てがフラットな量子化マトリクスであった場合のビットストリームの例である。この場合、第1の量子化マトリクスヘッダ符号には、一致情報の1とフラットな量子化マトリクスを示す参照情報の1が符号化されている。また、第2の量子化マトリクスヘッダ符号には、一致情報の1とフラットな量子化マトリクスを示す参照情報の2が符号化されている。この場合においては、参照情報が1であっても、参照対象の第1の量子化マトリクスもフラットな量子化マトリクスであるため、ビットストリームの復号結果は同一となる。同様に、第3の量子化マトリクスヘッダ符号には、一致情報の1とフラットな量子化マトリクスを示す参照情報の2が符号化されている。この場合も、参照情報が1もしくは2であっても、参照対象の第1または第2の量子化マトリクスもフラットな量子化マトリクスであるため、ビットストリームの復号結果は同一となる。 FIG. 10B is an example of a bit stream when all of the first to third quantization matrices are flat quantization matrices. In this case, 1 of the match information and 1 of the reference information indicating the flat quantization matrix are encoded in the first quantization matrix header code. Further, in the second quantization matrix header code, 1 of match information and 2 of reference information indicating a flat quantization matrix are encoded. In this case, even if the reference information is 1, the first quantization matrix to be referred to is also a flat quantization matrix, so that the decoding results of the bitstreams are the same. Similarly, in the third quantization matrix header code, 1 of the match information and 2 of the reference information indicating the flat quantization matrix are encoded. In this case as well, even if the reference information is 1 or 2, the first or second quantization matrix to be referred to is also a flat quantization matrix, so that the decoding result of the bit stream is the same.

図10(c)は第1の量子化マトリクスはフラットな量子化マトリクスともデフォルトの量子化マトリクスとも異なるが、第2、第3の量子化マトリクスは第1の量子化マトリクスと同一である場合のビットストリームの例である。この場合、第1の量子化マトリクスヘッダ符号には、一致情報の0が符号化されており、第1量子化マトリクス係数符号には第1量子化マトリクスの係数が符号化されている。また、第2の量子化マトリクスヘッダ符号には、一致情報の1と第1の量子化マトリクスへの参照を示す参照情報の1が符号化されている。同様に第3の量子化マトリクスヘッダ符号には、一致情報の1と第2の量子化マトリクスへの参照を示す参照情報の1が符号化されている。 FIG. 10C shows a case where the first quantization matrix is different from the flat quantization matrix and the default quantization matrix, but the second and third quantization matrices are the same as the first quantization matrix. This is an example of a bit stream. In this case, 0 of the matching information is encoded in the first quantization matrix header code, and the coefficient of the first quantization matrix is encoded in the first quantization matrix coefficient code. Further, in the second quantization matrix header code, 1 of the match information and 1 of the reference information indicating a reference to the first quantization matrix are encoded. Similarly, in the third quantization matrix header code, 1 of the match information and 1 of the reference information indicating a reference to the second quantization matrix are encoded.

図6は実施形態1に係る画像符号化装置における画像符号化処理を示すフローチャートである。まず、ステップS601にて、量子化マトリクス保持部107は量子化マトリクスを生成する。ステップS602にて、量子化マトリクス判定部108は符号化対象の量子化マトリクスが所定の量子化マトリクスが一致するか否かを判定し、一致情報を生成する。本実施形態では、符号化済みの量子化マトリクス、予め符号化装置に記憶されている図5(a)に示されたデフォルトの量子化マトリクスもしくは図5(b)に示されたフラットな量子化マトリクスのいずれかと一致するか否かを判定する。符号化対象の量子化マトリクスが上記のいずれかの量子化マトリクスと一致すると判定された場合は、さらにどの量子化マトリクスと一致するかを示す参照情報を生成する。 FIG. 6 is a flowchart showing an image coding process in the image coding apparatus according to the first embodiment. First, in step S601, the quantization matrix holding unit 107 generates a quantization matrix. In step S602, the quantization matrix determination unit 108 determines whether or not the quantization matrix to be encoded matches a predetermined quantization matrix, and generates match information. In this embodiment, the encoded quantization matrix, the default quantization matrix shown in FIG. 5 (a) stored in advance in the coding apparatus, or the flat quantization shown in FIG. 5 (b). Determine if it matches any of the matrices. When it is determined that the quantization matrix to be encoded matches any of the above quantization matrices, reference information indicating which quantization matrix matches is further generated.

ステップS603にて、量子化マトリクスヘッダ符号化部109は、ステップS602で生成された一致情報および参照情報を符号化して量子化マトリクスヘッダ符号を生成する。ステップS604にて画像符号化装置は前述の一致情報に基づいて、符号化対象の量子化マトリクスの係数を符号化するか否かを判定する。対象の量子化マトリクスの係数を符号化する場合にはステップS605に進み、そうでない場合はステップS606に進む。 In step S603, the quantization matrix header coding unit 109 encodes the matching information and the reference information generated in step S602 to generate a quantization matrix header code. In step S604, the image coding apparatus determines whether or not to encode the coefficient of the quantization matrix to be encoded based on the above-mentioned matching information. If the coefficients of the target quantization matrix are encoded, the process proceeds to step S605, otherwise the process proceeds to step S606.

ステップS605にて、量子化マトリクス係数符号化部110はステップS601で生成された量子化マトリクスを符号化し、量子化マトリクス係数符号を生成する。ステップS606にて、画像符号化装置は量子化マトリクスを全て符号化したか否かの判定を行い、終了していればステップS607に進み、そうでなければ次の量子化マトリクスを対象としてステップS601に戻る。ステップS607にて、統合符号化部111はビットストリームのヘッダ部の符号化を行い、出力する。本実施形態では、図10に示される例のシーケンスヘッダおよびピクチャヘッダの符号化を行い、出力するものとする。 In step S605, the quantization matrix coefficient coding unit 110 encodes the quantization matrix generated in step S601 to generate a quantization matrix coefficient code. In step S606, the image coding apparatus determines whether or not all the quantization matrices have been encoded, and if it is completed, the process proceeds to step S607, and if not, the next quantization matrix is targeted in step S601. Return to. In step S607, the integrated coding unit 111 encodes the header part of the bit stream and outputs it. In the present embodiment, the sequence header and the picture header of the example shown in FIG. 10 are encoded and output.

ステップS608にて、ブロック分割部102は、ピクチャ単位の入力画像をブロック単位に分割する。ステップS609にて、予測部103はブロック単位の予測を行い、予測誤差を生成する。ステップS610にて、変換部104はステップS609で生成された予測誤差に対して変換ブロックサイズに分割して直交変換を行い、直交変換係数を生成する。ステップS611にて、量子化部105はステップS610で生成された直交変換係数を、ステップS601で生成されて量子化マトリクス保持部107に格納された量子化マトリクスを用いて量子化して量子化係数を生成する。ステップS612にて、係数符号化部106はステップS611で生成された量子化係数を符号化し、量子化係数符号データを生成する。ステップS613にて、画像符号化装置は、当該ブロック内の全ての変換ブロックの符号化が終了したか否かの判定を行い、終了していればステップS614に進み、終了していなければ次の変換ブロックを対象としてステップS610に戻る。ステップS614にて、画像符号化装置は、全てのブロックの符号化が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次のブロックを対象としてステップS608に戻る。 In step S608, the block division unit 102 divides the input image for each picture into block units. In step S609, the prediction unit 103 makes a block-by-block prediction and generates a prediction error. In step S610, the conversion unit 104 divides the prediction error generated in step S609 into conversion block sizes and performs orthogonal conversion to generate an orthogonal conversion coefficient. In step S611, the quantization unit 105 quantizes the orthogonal transformation coefficient generated in step S610 using the quantization matrix generated in step S601 and stored in the quantization matrix holding unit 107 to obtain the quantization coefficient. Generate. In step S612, the coefficient coding unit 106 encodes the quantization coefficient generated in step S611 and generates the quantization coefficient code data. In step S613, the image coding apparatus determines whether or not the coding of all the conversion blocks in the block is completed, and if it is completed, the process proceeds to step S614, and if not, the next The process returns to step S610 for the conversion block. In step S614, the image coding apparatus determines whether or not the coding of all the blocks is completed, and if so, stops all operations and ends the process, otherwise the next Return to step S608 for the block of.

以上の構成と動作により、特にステップS602からステップS604によって、フラットな量子化マトリクスを符号化する際に、他の量子化マトリクスと一致する場合、冗長な符号を送る必要が無いため、符号量を削減したビットストリームを構成することができる。これにより、フラットな量子化マトリクスの係数を一つずつ符号化するよりも少ない符号量でビットストリームを生成することができる。 With the above configuration and operation, especially when encoding a flat quantization matrix from step S602 to step S604, if it matches with another quantization matrix, it is not necessary to send a redundant code, so the code amount can be reduced. A reduced bitstream can be configured. This makes it possible to generate a bitstream with a smaller amount of code than encoding the coefficients of a flat quantization matrix one by one.

なお、本実施形態においては、イントラ予測のみを用いるピクチャを例にとって説明したが、インター予測を使用できるピクチャにおいても対応できることは明らかである。さらに、本実施形態では説明のためにブロックを8×8画素、変換ブロックを4×4画素としたが、これに限定されない。例えば16×16画素や32×32画素などのブロックサイズへの変更が可能であり、また、ブロックの形状も正方形に限定されず、16×8画素などの長方形でも良い。また、変換ブロックサイズはブロックサイズの縦横それぞれ半分としたが、同じ大きさでも構わないし、縦横それぞれ半分よりもさらに細かいサイズでももちろん構わない。 In the present embodiment, a picture using only intra-prediction has been described as an example, but it is clear that a picture in which inter-prediction can be used can also be used. Further, in the present embodiment, the block is 8 × 8 pixels and the conversion block is 4 × 4 pixels for the sake of explanation, but the present invention is not limited to this. For example, the block size can be changed to 16 × 16 pixels or 32 × 32 pixels, and the shape of the block is not limited to a square, and may be a rectangle such as 16 × 8 pixels. Further, although the conversion block size is halved in each of the vertical and horizontal directions, the same size may be used, and of course, the size may be smaller than half in each of the vertical and horizontal directions.

<実施形態2>
図2は、本発明の実施形態2に係る画像復号装置の構成を示すブロック図である。本実施形態では、実施形態1で生成されたビットストリームの復号について説明する。
<Embodiment 2>
FIG. 2 is a block diagram showing a configuration of an image decoding device according to a second embodiment of the present invention. In this embodiment, decoding of the bitstream generated in the first embodiment will be described.

図2において、201は符号化されたビットストリームを入力する端子である。202は入力されたビットストリームのヘッダ情報を復号し、ビットストリームから必要な符号を分離して後段へ出力する復号・分離部である。復号・分離部202は図1の統合符号化部111と逆の動作を行う。 In FIG. 2, 201 is a terminal for inputting an encoded bit stream. Reference numeral 202 denotes a decoding / separation unit that decodes the header information of the input bit stream, separates the necessary code from the bit stream, and outputs it to the subsequent stage. The decoding / separation unit 202 performs the reverse operation of the integrated coding unit 111 of FIG.

203はビットストリームのヘッダ情報から分離された量子化マトリクスヘッダ符号を復号し、一致情報および参照情報を復元する量子化マトリクスヘッダ復号部である。204はビットストリームから分離された量子化マトリクス係数符号を復号し、量子化マトリクスの各係数を復元する量子化マトリクス係数復号部である。205は得られた一致情報および参照情報あるいは量子化マトリクスの各係数から復号対象の量子化マトリクスを再構成する量子化マトリクス再構成部である。206は量子化マトリクス再構成部205で得られた量子化マトリクスを格納しておく量子化マトリクス保持部である。実施形態1の量子化マトリクス判定部108が格納している所定の量子化マトリクスはこれに保持されているものとする。但し、これに限定されない。量子化マトリクス再構成部205に格納されていても構わない。また、量子化マトリクスヘッダ復号部203と量子化マトリクス係数復号部204と量子化マトリクス再構成部205はひとつの処理部である量子化マトリクス復号部として機能してもよい。 Reference numeral 203 denotes a quantization matrix header decoding unit that decodes the quantization matrix header code separated from the bitstream header information and restores the match information and the reference information. Reference numeral 204 denotes a quantization matrix coefficient decoding unit that decodes the quantization matrix coefficient code separated from the bit stream and restores each coefficient of the quantization matrix. Reference numeral 205 denotes a quantization matrix reconstruction unit that reconstructs the quantization matrix to be decoded from the obtained match information and reference information or each coefficient of the quantization matrix. Reference numeral 206 denotes a quantization matrix holding unit for storing the quantization matrix obtained by the quantization matrix reconstruction unit 205. It is assumed that the predetermined quantization matrix stored in the quantization matrix determination unit 108 of the first embodiment is held therein. However, the present invention is not limited to this. It may be stored in the quantization matrix reconstruction unit 205. Further, the quantization matrix header decoding unit 203, the quantization matrix coefficient decoding unit 204, and the quantization matrix reconstruction unit 205 may function as one processing unit, the quantization matrix decoding unit.

一方、207は復号・分離部202で分離された量子化係数符号データから量子化係数符号を復号し、量子化係数を復元する係数復号部である。208は量子化マトリクス保持部206に格納された量子化マトリクスを用いて量子化係数に逆量子化を行い、直交変換係数を得る逆量子化部である。209は図1の変換部104の逆となる逆直交変換を行い、予測誤差を得る逆変換部である。210は予測誤差と復号済みの画像からブロックの画像を復元する予測再構成部である。 On the other hand, 207 is a coefficient decoding unit that decodes the quantization coefficient code from the quantization coefficient code data separated by the decoding / separation unit 202 and restores the quantization coefficient. Reference numeral 208 denotes an inverse quantization unit that performs inverse quantization on the quantization coefficient using the quantization matrix stored in the quantization matrix holding unit 206 to obtain an orthogonal conversion coefficient. Reference numeral 209 denotes an inverse conversion unit that performs an inverse orthogonal transformation opposite to that of the conversion unit 104 in FIG. 1 to obtain a prediction error. Reference numeral 210 denotes a prediction reconstruction unit that restores the block image from the prediction error and the decoded image.

上記画像復号装置における画像の復号動作を以下に説明する。本実施形態では実施形態1で生成された動画像ビットストリームをピクチャ単位で入力する構成となっているが、1ピクチャ分の静止画像ビットストリームを入力する構成としても構わない。また、本実施形態では説明を容易にするため、イントラ予測復号処理のみを説明するが、これに限定されずインター予測復号処理においても適用可能である。 The image decoding operation in the image decoding device will be described below. In the present embodiment, the moving image bitstream generated in the first embodiment is input in units of pictures, but a still image bitstream for one picture may be input. Further, in the present embodiment, only the intra-predictive decoding process will be described for ease of explanation, but the present embodiment is not limited to this and can be applied to the inter-predictive decoding process.

図2において、端子201から入力された1ピクチャ分のビットストリームは復号・分離部202に入力され、画像を再生するのに必要なヘッダ情報が復号され、さらに後段で使用される符号が分離されて出力される。ヘッダ情報に含まれる量子化マトリクスヘッダ符号は量子化マトリクスヘッダ復号部203に出力される。本実施形態では、図10に示されるビットストリームの例のシーケンスヘッダおよびピクチャヘッダが入力・復号され、符号が出力されるものとする。 In FIG. 2, the bit stream for one picture input from the terminal 201 is input to the decoding / separation unit 202, the header information necessary for reproducing the image is decoded, and the code used in the subsequent stage is further separated. Is output. The quantization matrix header code included in the header information is output to the quantization matrix header decoding unit 203. In the present embodiment, it is assumed that the sequence header and the picture header of the bitstream example shown in FIG. 10 are input / decoded and the code is output.

量子化マトリクスヘッダ復号部203では、まず、入力された量子化マトリクスヘッダ符号を復号し、一致情報を復元する。一致情報が復号対象の量子化マトリクスと一致するマトリクスが存在していることを意味する1であった場合には、さらに量子化マトリクスヘッダ符号から参照情報を再生する。復元された参照情報は量子化マトリクス再構成部205に出力される。一方、一致情報が一致するマトリクスが存在しないことを意味する0であった場合には、復号対象の量子化マトリクスの係数を復号する必要性があることを示す情報を復号・分離部202に出力する。本実施形態では一致情報が上述の情報であるものとするが、同様の意味を持つ情報であればその形態は特に限定されない。 The quantization matrix header decoding unit 203 first decodes the input quantization matrix header code and restores the matching information. If the match information is 1, which means that a matrix that matches the quantization matrix to be decoded exists, the reference information is further reproduced from the quantization matrix header code. The restored reference information is output to the quantization matrix reconstruction unit 205. On the other hand, if the match information is 0, which means that there is no matching matrix, information indicating that it is necessary to decode the coefficient of the quantization matrix to be decoded is output to the decoding / separation unit 202. To do. In the present embodiment, it is assumed that the matching information is the above-mentioned information, but the form is not particularly limited as long as the information has the same meaning.

復号・分離部202では、量子化マトリクスヘッダ復号部203から復号対象の量子化マトリクスの係数を復号する必要性があることを示す情報が入力された場合、量子化マトリクス係数復号部204に量子化マトリクス係数符号データを出力する。量子化マトリクス係数復号部204では、入力された量子化マトリクス係数符号データが復号され、復号対象の量子化マトリクスの各係数が復元される。再生された量子化マトリクスの各係数は量子化マトリクス再構成部205に出力される。 In the decoding / separation unit 202, when information indicating that it is necessary to decode the coefficient of the quantization matrix to be decoded is input from the quantization matrix header decoding unit 203, the quantization matrix coefficient decoding unit 204 is quantized. Outputs matrix coefficient code data. In the quantization matrix coefficient decoding unit 204, the input quantization matrix coefficient code data is decoded, and each coefficient of the quantization matrix to be decoded is restored. Each coefficient of the regenerated quantization matrix is output to the quantization matrix reconstruction unit 205.

量子化マトリクス再構成部205では、量子化マトリクスヘッダ復号部203から入力された参照情報もしくは量子化マトリクス係数復号部204から入力された量子化マトリクスの各係数から復号対象の量子化マトリクスを再構成する。量子化マトリクス係数復号部204から量子化マトリクスの各係数が入力された場合には、入力された各係数を用いて量子化マトリクスを再構成し、量子化マトリクス保持部206に出力する。一方、量子化マトリクスヘッダ復号部203から参照情報が入力された場合には、参照情報に基づいて、参照先の量子化マトリクスを量子化マトリクス保持部206から読み出し、復号対象の量子化マトリクスを再構成する。そして再構成された量子化マトリクスは量子化マトリクス保持部206に出力される。量子化マトリクス保持部206では、入力された量子化マトリクスを格納し、必要に応じて量子化マトリクス再構成部205および逆量子化部208に出力される。 The quantization matrix reconstruction unit 205 reconstructs the quantization target to be decoded from the reference information input from the quantization matrix header decoding unit 203 or each coefficient of the quantization matrix input from the quantization matrix coefficient decoding unit 204. To do. When each coefficient of the quantization matrix is input from the quantization matrix coefficient decoding unit 204, the quantization matrix is reconstructed using each input coefficient and output to the quantization matrix holding unit 206. On the other hand, when the reference information is input from the quantization matrix header decoding unit 203, the reference destination quantization matrix is read from the quantization matrix holding unit 206 based on the reference information, and the quantization target quantization matrix is re-read. Configure. Then, the reconstructed quantization matrix is output to the quantization matrix holding unit 206. The quantization matrix holding unit 206 stores the input quantization matrix and outputs it to the quantization matrix reconstruction unit 205 and the inverse quantization unit 208 as needed.

復号・分離部202で分離された符号のうち、量子化係数符号データは係数復号部207に入力される。そして、係数復号部207は変換ブロックごとに量子化係数符号データを復号し、量子化係数を復元し、逆量子化部208に出力する。逆量子化部208は、係数復号部207で復元された量子化係数および量子化マトリクス保持部206に格納されている量子化マトリクスを入力する。そして、前記量子化マトリクスを用いて逆量子化を行い、直交変換係数を復元し、逆変換部209に出力する。逆変換部209は、直交変換係数を入力し、図1の変換部104の逆となる逆直交変換を行い、予測誤差を復元し、予測再構成部210に出力する。予測再構成部210は、入力された予測誤差に復号済みの周囲の画素データから予測を行ってブロック単位の画像を復元し、端子211から出力する。 Of the codes separated by the decoding / separation unit 202, the quantization coefficient code data is input to the coefficient decoding unit 207. Then, the coefficient decoding unit 207 decodes the quantization coefficient code data for each conversion block, restores the quantization coefficient, and outputs the quantization coefficient to the inverse quantization unit 208. The inverse quantization unit 208 inputs the quantization coefficient restored by the coefficient decoding unit 207 and the quantization matrix stored in the quantization matrix holding unit 206. Then, inverse quantization is performed using the quantization matrix, the orthogonal transformation coefficient is restored, and the orthogonal transformation coefficient is output to the inverse transformation unit 209. The inverse conversion unit 209 inputs the orthogonal transformation coefficient, performs the inverse orthogonal transformation which is the reverse of the conversion unit 104 in FIG. 1, restores the prediction error, and outputs the prediction error to the prediction reconstruction unit 210. The prediction reconstruction unit 210 predicts the input prediction error from the peripheral pixel data that has been decoded, restores the image in block units, and outputs the image from the terminal 211.

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

まず、ステップS701にて、復号・分離部202がヘッダ情報を復号し、符号を後段に出力するために分離する。本実施形態では、図10に示されるビットストリームの例のシーケンスヘッダおよびピクチャヘッダが入力・復号され、続く符号が該当するブロックに出力されるものとする。ステップS702にて、量子化マトリクスヘッダ復号部203は、まず、分離された量子化マトリクスヘッダ符号を復号し、一致情報を復元する。一致情報が復号対象の量子化マトリクスと一致するマトリクスが存在していることを意味する1であった場合には、さらに量子化マトリクスヘッダ符号から参照情報を再生する。逆に復号対象の量子化マトリクスと一致するマトリクスが存在しないことを意味する0であった場合には、本ステップではこれ以上の動作は行わない。 First, in step S701, the decoding / separation unit 202 decodes the header information and separates the header information in order to output the code to the subsequent stage. In the present embodiment, it is assumed that the sequence header and the picture header of the bitstream example shown in FIG. 10 are input / decoded, and the subsequent codes are output to the corresponding block. In step S702, the quantization matrix header decoding unit 203 first decodes the separated quantization matrix header code and restores the matching information. If the match information is 1, which means that a matrix that matches the quantization matrix to be decoded exists, the reference information is further reproduced from the quantization matrix header code. On the contrary, if it is 0, which means that there is no matrix matching the quantization matrix to be decoded, no further operation is performed in this step.

ステップS703にて、画像復号装置はステップS702で生成された一致情報に基づいて、復号対象の量子化マトリクスの係数を復号するか否かを判定する。対象の量子化マトリクスの係数を復号する場合にはステップS704に進み、そうでない場合はステップS705に進む。ステップS704にて、量子化マトリクス係数復号部204は量子化マトリクス係数符号データを復号し、復号対象の量子化マトリクスの各係数を再生する。ステップS705にて、量子化マトリクス再構成部205はステップS702で復元された参照情報もしくはステップS704で復元された量子化マトリクスの各係数から復号対象の量子化マトリクスを再構成する。 In step S703, the image decoding apparatus determines whether or not to decode the coefficient of the quantization matrix to be decoded based on the matching information generated in step S702. If the coefficient of the target quantization matrix is decoded, the process proceeds to step S704, otherwise the process proceeds to step S705. In step S704, the quantization matrix coefficient decoding unit 204 decodes the quantization matrix coefficient code data and reproduces each coefficient of the quantization matrix to be decoded. In step S705, the quantization matrix reconstruction unit 205 reconstructs the quantization matrix to be decoded from the reference information restored in step S702 or each coefficient of the quantization matrix restored in step S704.

ステップS706にて、画像復号装置は全ての量子化マトリクスが復号されたか否かの判定を行い、完了していればステップS707へと進み、そうでなければ次の量子化マトリクスを対象として、ステップS702に戻る。ステップS707にて、係数復号部207は変換ブロック単位でビットストリームから分離された量子化係数符号データを復号し、量子化係数を復元する。ステップS708にて、逆量子化部208はステップS705で再生された量子化マトリクスを用いてステップS707にて再生された量子化係数を逆量子化し、直交変換係数を復元する。ステップS709にて、逆変換部209はステップS708で復元された直交変換係数に対し、逆直交変換を行い、予測誤差を復元する。 In step S706, the image decoding apparatus determines whether or not all the quantization matrices have been decoded, and if it is completed, the process proceeds to step S707. If not, the next quantization matrix is targeted at the step. Return to S702. In step S707, the coefficient decoding unit 207 decodes the quantization coefficient code data separated from the bit stream in units of conversion blocks, and restores the quantization coefficient. In step S708, the inverse quantization unit 208 inversely quantizes the quantization coefficient reproduced in step S707 using the quantization matrix reproduced in step S705, and restores the orthogonal transformation coefficient. In step S709, the inverse conversion unit 209 performs inverse orthogonal transformation on the orthogonal transformation coefficient restored in step S708 to restore the prediction error.

ステップS710にて、画像復号装置は、当該ブロック内の全ての変換ブロックの復号が終了したか否かの判定を行い、終了していればステップS711に進み、終了していなければ次の変換ブロックを対象としてステップS707に戻る。ステップS711にて、予測再構成部210は復号済みの周囲の画素データから予測を行い、ステップS709で復元された予測誤差に加算して、ブロックの復号画像を生成する。ステップS712にて、画像復号装置は、全てのブロックの復号が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次のブロックを対象として、ステップS707に戻る。 In step S710, the image decoding apparatus determines whether or not the decoding of all the conversion blocks in the block is completed, and if it is completed, the process proceeds to step S711. If not, the next conversion block is not completed. Return to step S707. In step S711, the prediction reconstruction unit 210 makes a prediction from the peripheral pixel data that has been decoded, adds it to the prediction error restored in step S709, and generates a decoded image of the block. In step S712, the image decoding device determines whether or not the decoding of all blocks has been completed, and if so, stops all operations and ends the process, otherwise the next block Return to step S707.

以上の構成と動作により、実施形態1で生成された一致情報などの少ない符号量で表された符号を含むビットストリームの復号を行い、再生画像を得ることができる。 With the above configuration and operation, a bit stream containing a code represented by a small amount of code such as the match information generated in the first embodiment can be decoded to obtain a reproduced image.

なお、実施形態1と同様にブロックのサイズ、変換ブロックのサイズ、ブロックの形状についてはこれに限定されない。また、1つのシーケンスのビットストリーム中で量子化マトリクス符号データを複数回含めることで、量子化マトリクスの更新をすることも可能である。復号・分離部202で量子化マトリクスヘッダ符号を検出し、量子化マトリクスヘッダ復号部203で一致情報および必要に応じて参照情報を再生する。さらに一致情報に応じて、量子化マトリクス係数復号部204では復号対象の量子化マトリクスの係数を復元する。次に、量子化マトリクス再構成部205では参照情報あるいは量子化マトリクスの各係数から復号対象の量子化マトリクスを復元する。そして、復元された量子化マトリクスのデータを量子化マトリクス保持部206の該当する量子化マトリクスに置き換える。この際、全ての量子化マトリクスを書き換えても良いし、書き換える量子化マトリクスを判別することでその一部を変更することも可能である。 As in the first embodiment, the block size, the conversion block size, and the block shape are not limited to this. It is also possible to update the quantization matrix by including the quantization matrix code data a plurality of times in the bit stream of one sequence. The decoding / separation unit 202 detects the quantization matrix header code, and the quantization matrix header decoding unit 203 reproduces the matching information and the reference information as needed. Further, according to the matching information, the quantization matrix coefficient decoding unit 204 restores the coefficients of the quantization matrix to be decoded. Next, the quantization matrix reconstruction unit 205 restores the quantization matrix to be decoded from the reference information or each coefficient of the quantization matrix. Then, the restored quantization matrix data is replaced with the corresponding quantization matrix of the quantization matrix holding unit 206. At this time, all the quantization matrices may be rewritten, or a part of the quantization matrix may be changed by determining the quantization matrix to be rewritten.

また、本実施形態では1ピクチャ分の符号データを蓄積してから処理を行う方式を例にとって説明したが、これに限定されない。例えば、ブロック単位や複数のブロックで構成されるスライス単位といった入力方法でも構わない。さらにはブロック等の構成ではなく、固定長のパケット等に分割されているものでも構わない。 Further, in the present embodiment, a method of accumulating code data for one picture and then performing processing has been described as an example, but the present invention is not limited to this. For example, an input method such as a block unit or a slice unit composed of a plurality of blocks may be used. Further, it may be divided into fixed-length packets or the like instead of a block or the like.

<実施形態3>
図3は本実施形態の画像符号化装置を示すブロック図である。図3において、実施形態1の図1と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。
<Embodiment 3>
FIG. 3 is a block diagram showing an image coding apparatus of this embodiment. In FIG. 3, the same numbers are assigned to the parts that perform the same functions as those in FIG. 1 of the first embodiment, and the description thereof will be omitted.

303は図1の予測部103同様、ブロック分割部102で分割された各ブロックを、ブロック単位で予測を行い、予測方法を決定し、それに従って差分値算出を行い、予測誤差を算出する予測部である。321は予測部303で生成された予測誤差に対して、直交変換を行うか否かを判定し、後段に予測誤差を出力するとともに判定結果を変換スキップ判定情報として後段に出力する変換制御部である。304は図1の変換部104同様、各ブロックの予測誤差に対して直交変換を行う変換部であり、入力されたブロックのサイズまたはそれを細分化したブロックを単位に直交変換を行い、直交変換係数を算出する。 Similar to the prediction unit 103 of FIG. 1, the prediction unit 303 predicts each block divided by the block division unit 102 in block units, determines a prediction method, calculates a difference value according to the prediction method, and calculates a prediction error. Is. 321 is a conversion control unit that determines whether or not to perform orthogonal transformation with respect to the prediction error generated by the prediction unit 303, outputs the prediction error in the subsequent stage, and outputs the determination result as conversion skip determination information in the subsequent stage. is there. Like the conversion unit 104 in FIG. 1, 304 is a conversion unit that performs orthogonal conversion with respect to the prediction error of each block, and performs orthogonal conversion in units of the input block size or the subdivided blocks to perform orthogonal conversion. Calculate the coefficient.

322は後段の量子化部305における量子化処理との整合性を取るために予測誤差のビット深度調整を行うビット深度調整部である。ここでのビット深度調整の度合いは入力映像のビット深度や変換部304における直交変換に伴うビット深度調整、量子化部305における量子化処理に伴うビット深度調整および量子化マトリクスの係数値などによって定まるものとする。例えば、本実施形態においては、所定値である13と入力画像のビット深度との差の分だけ予測誤差を左側にビットシフトすることによりビット深度調整を行うものとする。すなわち、入力画像のビット深度が8ビットであれば、5ビット分予測誤差を左側にビットシフトするものとする。ただし、ビット深度調整に用いられる値はこれに限定されない。 Reference numeral 322 denotes a bit depth adjusting unit that adjusts the bit depth of the prediction error in order to obtain consistency with the quantization process in the quantization unit 305 in the subsequent stage. The degree of bit depth adjustment here is determined by the bit depth of the input video, the bit depth adjustment associated with the orthogonal conversion in the conversion unit 304, the bit depth adjustment associated with the quantization process in the quantization unit 305, the coefficient value of the quantization matrix, and the like. Shall be. For example, in the present embodiment, the bit depth is adjusted by bit-shifting the prediction error to the left by the difference between the predetermined value 13 and the bit depth of the input image. That is, if the bit depth of the input image is 8 bits, the prediction error by 5 bits is bit-shifted to the left. However, the value used for bit depth adjustment is not limited to this.

305は量子化マトリクス保持部107に格納された量子化マトリクスによって、変換部304で生成された直交変換係数もしくはビット深度調整部322でビット深度調整をされた予測誤差を量子化する量子化部である。311はヘッダ情報や予測、変換に関する符号を生成するとともに、前述の各符号化部で生成された符号データを統合してビットストリームを形成して出力する統合符号化部である。図1の統合符号化部111とは変換スキップ判定情報をさらに符号化して符号データを生成し、ビットストリームを形成して出力する点が異なる。 Reference numeral 305 is a quantization unit that quantizes the orthogonal transformation coefficient generated by the conversion unit 304 or the prediction error adjusted by the bit depth adjustment unit 322 by the quantization matrix stored in the quantization matrix holding unit 107. is there. Reference numeral 311 is an integrated coding unit that generates a code related to header information, prediction, and conversion, and integrates the code data generated by each of the above-mentioned coding units to form a bit stream and output the code. It differs from the integrated coding unit 111 of FIG. 1 in that the conversion skip determination information is further encoded to generate code data, and a bit stream is formed and output.

上記画像符号化装置における画像の符号化動作を以下に説明する。 The image coding operation in the image coding apparatus will be described below.

予測部303では、まず、ブロック単位の予測が行われ、予測誤差が生成される。生成された予測誤差は変換制御部321に出力される。変換制御部321では、入力された予測誤差に対し直交変換を行うか否かを決定する。そして、直交変換を行う場合には予測誤差を変換部304に出力し、直交変換を行わない場合には予測誤差をビット深度調整部322に出力する。直交変換を行うか否かの決定方法は特に限定しないが、画像の特徴や直交変換後の変換係数の大きさなどから決定しても良い。また、決定された判定結果を変換スキップ判定情報として統合符号化部311に出力する。変換部304では、変換制御部321から入力された予測誤差を変換ブロックサイズ単位で直交変換を行い、直交変換係数を生成する。 First, the prediction unit 303 makes a block-by-block prediction, and a prediction error is generated. The generated prediction error is output to the conversion control unit 321. The conversion control unit 321 determines whether or not to perform orthogonal conversion with respect to the input prediction error. Then, when the orthogonal transformation is performed, the prediction error is output to the conversion unit 304, and when the orthogonal transformation is not performed, the prediction error is output to the bit depth adjusting unit 322. The method for determining whether or not to perform the orthogonal transformation is not particularly limited, but it may be determined from the characteristics of the image, the magnitude of the conversion coefficient after the orthogonal transformation, and the like. Further, the determined determination result is output to the integrated coding unit 311 as conversion skip determination information. The conversion unit 304 performs orthogonal conversion on the prediction error input from the conversion control unit 321 in units of conversion block sizes to generate an orthogonal conversion coefficient.

一方、ビット深度調整部322では、変換制御部321から入力された予測誤差を変換ブロック単位でビット深度調整を行い、ビット深度調整された予測誤差を生成する。量子化部305では、変換部304から出力された直交変換係数あるいはビット深度調整部322から出力されたビット深度調整された予測誤差に対し、量子化マトリクス保持部107に格納されている量子化マトリクスを用いて量子化し、量子化係数を生成する。生成された量子化係数は係数符号化部106に入力される。 On the other hand, the bit depth adjustment unit 322 adjusts the bit depth of the prediction error input from the conversion control unit 321 in units of conversion blocks, and generates a bit depth-adjusted prediction error. In the quantization unit 305, the quantization matrix stored in the quantization matrix holding unit 107 with respect to the orthogonal conversion coefficient output from the conversion unit 304 or the bit depth adjusted prediction error output from the bit depth adjustment unit 322. Quantize using to generate the quantization coefficient. The generated quantization coefficient is input to the coefficient coding unit 106.

統合符号化部311では画像の符号化に必要なヘッダ情報を符号化し、入力された量子化マトリクスヘッダ符号および量子化マトリクス係数符号を統合する。統合符号化部311では図1の統合符号化部111で符号化するヘッダ情報に加えて変換制御部321から入力された変換スキップ判定情報もさらに符号化する。 The integrated coding unit 311 encodes the header information necessary for coding the image, and integrates the input quantization matrix header code and the quantization matrix coefficient code. In the integrated coding unit 311, in addition to the header information encoded by the integrated coding unit 111 of FIG. 1, the conversion skip determination information input from the conversion control unit 321 is further encoded.

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

ステップS820にて、変換制御部321はステップS609で生成された予測誤差に対し直交変換を行うか否かを決定して変換スキップ判定情報を生成する。ステップS821にて、変換スキップ判定情報に基づいて、直交変換を行うのであればステップS610に進み、行わないのであればステップS822に進む。ステップS822にて、ビット深度調整部322はステップS609で生成された予測誤差を変換ブロック単位でビット深度調整を行い、ビット深度調整された予測誤差を生成する。ステップS811にて、量子化部305はステップS610で生成された直交変換係数もしくはステップS822で生成されたビット深度調整された予測誤差を、ステップS601で生成された量子化マトリクスを用いて量子化し、量子化係数を生成する。ステップS823にて、統合符号化部311はステップS821で生成された変換スキップ判定情報を符号化する。 In step S820, the conversion control unit 321 determines whether or not to perform orthogonal transformation with respect to the prediction error generated in step S609, and generates conversion skip determination information. In step S821, if orthogonal transformation is performed based on the conversion skip determination information, the process proceeds to step S610, and if not, the process proceeds to step S822. In step S822, the bit depth adjustment unit 322 adjusts the bit depth of the prediction error generated in step S609 in units of conversion blocks, and generates a bit depth-adjusted prediction error. In step S811, the quantization unit 305 quantizes the orthogonal transformation coefficient generated in step S610 or the bit depth-adjusted prediction error generated in step S822 using the quantization matrix generated in step S601. Generate a quantization coefficient. In step S823, the integrated coding unit 311 encodes the conversion skip determination information generated in step S821.

以上の構成と動作により、特にステップS820からステップS823によって、変換スキップに対応するフラットな量子化マトリクスを符号化する際に、冗長な符号を送る必要が無いため、符号量を削減したビットストリームを構成することができる。
本実施形態においては、変換ブロック単位で変換スキップ判定情報が符号化される構成としたが、変換スキップ判定情報が符号化される単位はこれに限定されない。ブロック単位で符号化しても良いし、各色成分で共通した変換スキップ判定情報を用いて符号量を節約する構成をとることも可能である。符号化の方法は特に限定しないが、ハフマン符号や算術符号などを用いることができる。
With the above configuration and operation, especially when encoding a flat quantization matrix corresponding to conversion skip in steps S820 to S823, it is not necessary to send a redundant code, so that a bit stream with a reduced amount of code can be obtained. Can be configured.
In the present embodiment, the conversion skip determination information is encoded in units of conversion blocks, but the unit in which the conversion skip determination information is encoded is not limited to this. It may be encoded in block units, or it is also possible to adopt a configuration that saves the code amount by using the conversion skip determination information common to each color component. The coding method is not particularly limited, but a Huffman code, an arithmetic code, or the like can be used.

<実施形態4>
図4は本実施形態の画像復号装置を示すブロック図である。図4において、実施形態2の図2と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。本実施形態では、実施形態3で生成されたビットストリームの復号について説明する。
<Embodiment 4>
FIG. 4 is a block diagram showing an image decoding device of the present embodiment. In FIG. 4, the same numbers are assigned to the portions that perform the same functions as those in FIG. 2 of the second embodiment, and the description thereof will be omitted. In this embodiment, decoding of the bitstream generated in the third embodiment will be described.

402は入力されたビットストリームのヘッダ情報を復号し、ビットストリームから必要な符号を分離して後段へ出力する復号・分離部である。復号・分離部402は図3の統合符号化部311と逆の動作を行う。図2の復号・分離部202とは変換スキップ判定情報をさらに復号・再生して後段に出力するところが異なる。408は量子化マトリクス保持部206に格納された量子化マトリクスを用いて量子化係数に逆量子化を行い、逆量子化係数を再生する逆量子化部である。本実施形態における逆量子化係数は実施形態3における直交変換係数もしくはビット深度調整された予測誤差に相当する。 Reference numeral 402 denotes a decoding / separation unit that decodes the header information of the input bit stream, separates the necessary code from the bit stream, and outputs it to the subsequent stage. The decoding / separation unit 402 performs the reverse operation of the integrated coding unit 311 of FIG. It differs from the decoding / separation unit 202 of FIG. 2 in that the conversion skip determination information is further decoded / reproduced and output to the subsequent stage. Reference numeral 408 is an inverse quantization unit that performs inverse quantization on the quantization coefficient using the quantization matrix stored in the quantization matrix holding unit 206 and reproduces the inverse quantization coefficient. The inverse quantization coefficient in the present embodiment corresponds to the orthogonal transformation coefficient or the bit depth-adjusted prediction error in the third embodiment.

421は復号・分離部402から入力された変換スキップ判定情報に基づいて、逆直交変換を行うか否かを判定し、後段に逆量子化係数を出力する逆変換制御部である。409は図3の変換部304の逆となる逆直交変換を行い、予測誤差を再生する逆変換部である。422は図3のビット深度調整部322の逆となるビット深度調整を行い、予測誤差を再生するビット深度逆調整部である。ここでのビット深度逆調整の度合いは出力画像のビット深度や、逆変換部409における逆直交変換に伴うビット深度調整、逆量子化部408における量子化処理に伴うビット深度調整および量子化マトリクスの係数値などによって定まるものとする。例えば、本実施形態においては、13と出力画像のビット深度との差の分だけ係数を右側にビットシフトすることによりビット深度逆調整を行うものとする。すなわち、出力画像のビット深度が8ビットであれば、5ビット分予測誤差を右側にビットシフトするものとする。ただし、ビット深度逆調整に用いられる値はこれに限定されない。410は予測誤差と復号済みの画像からブロックの画像を再生する予測再構成部である。 Reference numeral 421 is an inverse conversion control unit that determines whether or not to perform inverse orthogonal transformation based on the conversion skip determination information input from the decoding / separation unit 402 and outputs the inverse quantization coefficient in the subsequent stage. Reference numeral 409 is an inverse conversion unit that performs an inverse orthogonal transformation that is the reverse of the conversion unit 304 of FIG. 3 and reproduces a prediction error. Reference numeral 422 is a bit depth reverse adjustment unit that adjusts the bit depth, which is the reverse of the bit depth adjustment unit 322 of FIG. 3, and reproduces the prediction error. The degree of bit depth reverse adjustment here is the bit depth of the output image, the bit depth adjustment associated with the inverse orthogonal conversion in the inverse conversion unit 409, the bit depth adjustment associated with the quantization processing in the inverse quantization unit 408, and the quantization matrix. It shall be determined by the coefficient value and the like. For example, in the present embodiment, the bit depth reverse adjustment is performed by bit-shifting the coefficient to the right by the difference between 13 and the bit depth of the output image. That is, if the bit depth of the output image is 8 bits, the prediction error by 5 bits is bit-shifted to the right. However, the value used for the bit depth reverse adjustment is not limited to this. Reference numeral 410 denotes a prediction reconstruction unit that reproduces a block image from the prediction error and the decoded image.

上記画像復号装置における画像の復号動作を以下に説明する。 The image decoding operation in the image decoding device will be described below.

図4において、端子201から入力された1ピクチャ分のビットストリームは復号・分離部402に入力され、画像を再生するのに必要なヘッダ情報が復号され、さらに後段で使用される符号が分離され、適宜出力される。ヘッダ情報に含まれる量子化マトリクスヘッダ符号は量子化マトリクスヘッダ復号部203に出力される。また、復号・分離部402では、量子化マトリクスヘッダ復号部203から復号対象の量子化マトリクスの係数を復号する必要性があることを示す情報が入力された場合、量子化マトリクス係数復号部204に量子化マトリクス係数符号データを出力する。さらに復号・分離部402では、ビットストリームから変換ブロック単位で逆直交変換を行うか否かを示す変換スキップ判定情報を復号・再生し、逆変換制御部421に出力する。 In FIG. 4, the bit stream for one picture input from the terminal 201 is input to the decoding / separation unit 402, the header information necessary for reproducing the image is decoded, and the code used in the subsequent stage is further separated. , Is output as appropriate. The quantization matrix header code included in the header information is output to the quantization matrix header decoding unit 203. Further, in the decoding / separation unit 402, when information indicating that it is necessary to decode the coefficient of the quantization matrix to be decoded is input from the quantization matrix header decoding unit 203, the quantization matrix coefficient decoding unit 204 receives information. Quantization matrix Coefficient code data is output. Further, the decoding / separation unit 402 decodes / reproduces the conversion skip determination information indicating whether or not the inverse orthogonal transformation is performed in units of conversion blocks from the bit stream, and outputs the information to the inverse conversion control unit 421.

逆量子化部408では、係数復号部207で再生された量子化係数および量子化マトリクス保持部206に格納されている量子化マトリクスを入力する。そして、前記量子化マトリクスを用いて逆量子化を行い、逆量子化係数を再生し、逆変換制御部421に出力する。逆変換制御部421では、復号・分離部402から入力された変換スキップ判定情報に基づいて、入力された逆量子化係数に対し逆直交変換を行うか否かを決定する。そして、逆直交変換を行う場合には逆量子化係数を逆変換部409に出力し、行わない場合には逆量子化係数をビット深度逆調整部422に出力する。逆変換部209では、入力された逆量子化係数である直交変換係数に対し、図3の変換部304の逆となる逆直交変換を行い、予測誤差を再生し、予測再構成部410に出力する。 In the inverse quantization unit 408, the quantization coefficient reproduced by the coefficient decoding unit 207 and the quantization matrix stored in the quantization matrix holding unit 206 are input. Then, the inverse quantization is performed using the quantization matrix, the inverse quantization coefficient is reproduced, and it is output to the inverse transformation control unit 421. The inverse transformation control unit 421 determines whether or not to perform inverse orthogonal transformation on the input inverse quantization coefficient based on the conversion skip determination information input from the decoding / separation unit 402. Then, when the inverse orthogonal transformation is performed, the inverse quantization coefficient is output to the inverse conversion unit 409, and when the inverse quantization coefficient is not performed, the inverse quantization coefficient is output to the bit depth inverse adjustment unit 422. The inverse conversion unit 209 performs an inverse orthogonal transformation that is the reverse of the conversion unit 304 of FIG. 3 with respect to the input orthogonal conversion coefficient, reproduces the prediction error, and outputs the prediction error to the prediction reconstruction unit 410. To do.

一方、ビット深度逆調整部422では、逆変換制御部421から入力された逆量子化係数であるビット深度調整された予測誤差を変換ブロック単位でビット深度逆調整を行い、予測誤差を再生し、予測再構成部410に出力する。予測再構成部410では、入力された予測誤差に復号済みの周囲の画素データから予測を行ってブロック単位の画像を再生し、端子211から出力する。 On the other hand, the bit depth reverse adjustment unit 422 performs bit depth reverse adjustment in units of conversion blocks for the bit depth adjusted prediction error, which is the inverse quantization coefficient input from the reverse conversion control unit 421, and reproduces the prediction error. Output to the prediction reconstruction unit 410. The prediction reconstruction unit 410 predicts the input prediction error from the peripheral pixel data that has been decoded, reproduces the image in block units, and outputs the image from the terminal 211.

図9は実施形態4に係る画像復号装置における画像復号処理を示すフローチャートである。実施形態2の図7と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。
ステップS921にて、復号・分離部402はビットストリームから変換ブロック単位で逆直交変換を行うか否かを示す変換スキップ判定情報を復号・再生する。ステップS922にて、ステップS921で生成された変換スキップ判定情報に基づいた判定を行う。逆直交変換を行う場合はS709に進み、そうでない場合はS923に進む。ステップS923にて、ビット深度逆調整部422はステップS708で生成された逆量子化係数を変換ブロック単位でビット深度逆調整を行い、予測誤差を再生する。
FIG. 9 is a flowchart showing an image decoding process in the image decoding apparatus according to the fourth embodiment. The same numbers are assigned to the parts that perform the same functions as those in FIG. 7 of the second embodiment, and the description thereof will be omitted.
In step S921, the decoding / separation unit 402 decodes / reproduces the conversion skip determination information indicating whether or not the inverse orthogonal transformation is performed from the bit stream in units of conversion blocks. In step S922, a determination is made based on the conversion skip determination information generated in step S921. If the inverse orthogonal transform is performed, the process proceeds to S709, otherwise the process proceeds to S923. In step S923, the bit depth reverse adjustment unit 422 reverse-adjusts the bit depth of the inverse quantization coefficient generated in step S708 in units of conversion blocks, and reproduces the prediction error.

以上の構成と動作により、変換スキップ処理を有した画像復号装置においても、実施形態3で生成された、量子化マトリクス一致情報等で少ない符号量で表されたフラットな量子化マトリクスの復号を行い、再生画像を得ることができる。 With the above configuration and operation, even in the image decoding apparatus having the conversion skip processing, the flat quantization matrix generated in the third embodiment and represented by a small amount of code in the quantization matrix matching information or the like is decoded. , A reproduced image can be obtained.

また、本実施形態においては、変換ブロックごとに変換スキップ判定情報が存在する構成としたが、ヘッダ部分にフラグを持ち、それによって復号装置が変換スキップ処理を有するか否かを切り替える構成をとっても良い。その場合、変換スキップ処理を用いる場合のみフラットな量子化マトリクスを記憶しておき参照対象とし、そうでない場合は参照対象から外すような構成をとっても良い。 Further, in the present embodiment, the conversion skip determination information exists for each conversion block, but it may be configured to have a flag in the header portion and thereby switch whether or not the decoding device has the conversion skip processing. .. In that case, the flat quantization matrix may be stored and used as a reference target only when the conversion skip process is used, and may be excluded from the reference target otherwise.

<実施形態5>
図1、図2、図3、図4に示した各処理部はハードウェアでもって構成しているものとして上記実施形態では説明した。しかし、図1、図2、図3、図4に示した各処理部で行なう処理をコンピュータプログラムでもって構成しても良い。
<Embodiment 5>
Each of the processing units shown in FIGS. 1, 2, 3 and 4 has been described in the above embodiment as being configured by hardware. However, the processing performed by each of the processing units shown in FIGS. 1, 2, 3 and 4 may be configured by a computer program.

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

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

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

ROM1203には、本コンピュータの設定データや、ブートプログラムなどが格納されている。操作部1204は、キーボードやマウスなどにより構成されており、本コンピュータのユーザが操作することで、各種の指示をCPU1201に対して入力することができる。出力部1205は、CPU1201による処理結果を出力する。また出力部1205は例えば液晶ディスプレイのような表示装置で構成して処理結果を表示することができる。 The ROM 1203 stores the setting data of the computer, the boot program, and the like. The operation unit 1204 is composed of a keyboard, a mouse, and the like, and can be operated by a user of the computer to input various instructions to the CPU 1201. The output unit 1205 outputs the processing result by the CPU 1201. Further, the output unit 1205 can be configured by a display device such as a liquid crystal display to display the processing result.

外部記憶装置1206は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置1206には、OS(オペレーティングシステム)や、図1、図2、図3、図4に示した各部の機能をCPU1201に実現させるためのコンピュータプログラムが保存されている。更には、外部記憶装置1206には、処理対象としての各画像が保存されていても良い。 The external storage device 1206 is a large-capacity information storage device typified by a hard disk drive device. The external storage device 1206 stores an OS (operating system) and a computer program for realizing the functions of the respective parts shown in FIGS. 1, 2, 3, and 4 in the CPU 1201. Further, each image as a processing target may be stored in the external storage device 1206.

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

上述の構成からなる作動は前述のフローチャートで説明した作動をCPU1201が中心となってその制御を行う。 The CPU 1201 plays a central role in controlling the operation described in the above-mentioned flowchart for the operation having the above configuration.

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

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

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

Claims (1)

画像符号化方法であって、
画像を直交変換する変換ステップと、
画像を直交変換せずに、当該画像のビット深度を調整する調整ステップと、
画像を直交変換することにより得られた係数、あるいは、画像を直交変換せずにビット深度が調整された係数に対して、全ての係数が同一の値である量子化マトリクスに基づいて量子化することにより量子化係数を得る量子化ステップと、
前記量子化係数、前記量子化係数が直交変換された係数であるか否かを示す変換スキップ判定情報、全ての係数が同一の値である量子化マトリクスであるか否かを示す参照情報を符号化する符号化ステップと、を有し、
前記量子化ステップにおいて、画像を直交変換せずにビット深度が調整された係数に対して全ての係数が同一の値である量子化マトリクスを用いて量子化を行う場合、前記量子化係数がイントラ予測を用いて符号化されたものであるのかインター予測を用いて符号化されたものであるのかにかかわらず全ての係数が同一の値である量子化マトリクスを用いて量子化を行い、
前記符号化ステップにおいて、量子化係数が直交変換された係数ではないことを示す変換スキップ判定情報、および、全ての係数が同一の値である量子化マトリクスであるか否かを示す参照情報が符号化されることを特徴とする画像符号化方法。
It is an image coding method
A conversion step that converts an image orthogonally, and
An adjustment step that adjusts the bit depth of the image without orthogonal transformation of the image,
Quantization is performed based on a quantization matrix in which all the coefficients are the same value with respect to the coefficient obtained by orthogonally transforming the image or the coefficient for which the bit depth is adjusted without orthogonally transforming the image. The quantization step to obtain the quantization coefficient by
The quantization coefficient, the conversion skip determination information indicating whether or not the quantization coefficient is an orthogonally converted coefficient, and the reference information indicating whether or not all the coefficients are the same value are coded. With a coding step to quantize,
In the quantization step, when quantization is performed using a quantization matrix in which all the coefficients have the same value with respect to the coefficient whose bit depth is adjusted without orthogonally transforming the image, the quantization coefficient is intra. Quantization is performed using a quantization matrix in which all coefficients are the same value regardless of whether they are encoded using prediction or inter-prediction.
In the coding step, the conversion skip determination information indicating that the quantization coefficient is not an orthogonally converted coefficient and the reference information indicating whether or not all the coefficients are the same value in the quantization matrix are coded. An image coding method characterized by being quantized.
JP2020128514A 2019-03-20 2020-07-29 Image coding method Active JP6891325B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2020128514A JP6891325B2 (en) 2019-03-20 2020-07-29 Image coding method
JP2021088226A JP7279109B2 (en) 2020-07-29 2021-05-26 Image decoding method and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019053563A JP6743225B2 (en) 2019-03-20 2019-03-20 Image decoding apparatus, image decoding method and program
JP2020128514A JP6891325B2 (en) 2019-03-20 2020-07-29 Image coding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2019053563A Division JP6743225B2 (en) 2019-03-20 2019-03-20 Image decoding apparatus, image decoding method and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2021088226A Division JP7279109B2 (en) 2020-07-29 2021-05-26 Image decoding method and program

Publications (2)

Publication Number Publication Date
JP2020184804A JP2020184804A (en) 2020-11-12
JP6891325B2 true JP6891325B2 (en) 2021-06-18

Family

ID=73044262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020128514A Active JP6891325B2 (en) 2019-03-20 2020-07-29 Image coding method

Country Status (1)

Country Link
JP (1) JP6891325B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2492333B (en) * 2011-06-27 2018-12-12 British Broadcasting Corp Video encoding and decoding using transforms
JP6168365B2 (en) * 2012-06-12 2017-07-26 サン パテント トラスト Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus
US10257520B2 (en) * 2012-06-26 2019-04-09 Velos Media, Llc Modified coding for transform skipping

Also Published As

Publication number Publication date
JP2020184804A (en) 2020-11-12

Similar Documents

Publication Publication Date Title
US11122283B2 (en) Image coding apparatus, image coding method, and program, and image decoding apparatus, image decoding method and program
CN107087170B (en) Encoding device, encoding method, decoding device, and decoding method
JP6324590B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP6157114B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP6041554B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP2024015184A (en) Image decoding device and method, and program
US20240089448A1 (en) Image encoding apparatus, image decoding apparatus, control methods thereof, and non-transitory computer-readable storage medium
JP2013012887A (en) Image encoding apparatus, image encoding method and program, image decoding apparatus, image decoding method and program
JP6541763B2 (en) Image decoding apparatus, image decoding method and program
JP6272441B2 (en) Image decoding apparatus, image decoding method and program
JP6891325B2 (en) Image coding method
US20220201288A1 (en) Image encoding device, image encoding method, image decoding device, image decoding method, and non-transitory computer-readable storage medium
JP7279109B2 (en) Image decoding method and program
JP6743225B2 (en) Image decoding apparatus, image decoding method and program
WO2014002422A1 (en) Image encoding apparatus, image encoding method and program, image decoding apparatus, and image decoding method and program
JP2020010320A (en) Image encoding device, image decoding device, control method of them, and program
JP6686095B2 (en) Decoding device, decoding method, program, and storage medium
JP6953576B2 (en) Coding device, coding method, program and storage medium
US20230007311A1 (en) Image encoding device, image encoding method and storage medium, image decoding device, and image decoding method and storage medium
US20220210421A1 (en) Image encoding apparatus, image decoding apparatus, methods for the same, and non-transitory computer-readable storage medium
WO2023181546A1 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP2018142969A (en) Image encoding apparatus, image encoding method and program, image decoding apparatus, 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: 20200729

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210414

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210526

R151 Written notification of patent or utility model registration

Ref document number: 6891325

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151