JP6039163B2 - Image encoding device, image encoding method and program, image decoding device, image decoding method and program - Google Patents

Image encoding device, image encoding method and program, image decoding device, image decoding method and program Download PDF

Info

Publication number
JP6039163B2
JP6039163B2 JP2011091346A JP2011091346A JP6039163B2 JP 6039163 B2 JP6039163 B2 JP 6039163B2 JP 2011091346 A JP2011091346 A JP 2011091346A JP 2011091346 A JP2011091346 A JP 2011091346A JP 6039163 B2 JP6039163 B2 JP 6039163B2
Authority
JP
Japan
Prior art keywords
block
sub
quantization parameter
encoding
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
JP2011091346A
Other languages
Japanese (ja)
Other versions
JP2012227612A (en
JP2012227612A5 (en
Inventor
前田 充
充 前田
真悟 志摩
真悟 志摩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2011091346A priority Critical patent/JP6039163B2/en
Priority to PCT/JP2012/002525 priority patent/WO2012140889A1/en
Publication of JP2012227612A publication Critical patent/JP2012227612A/en
Publication of JP2012227612A5 publication Critical patent/JP2012227612A5/ja
Application granted granted Critical
Publication of JP6039163B2 publication Critical patent/JP6039163B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は画像符号化方法・復号方法に関し、特に画像中の量子化パラメータの予測符号化方法・復号方法に関する。   The present invention relates to an image encoding method / decoding method, and more particularly to a predictive encoding method / decoding method of a quantization parameter in an image.

動画像の圧縮記録方法として、H.264/MPEG−4 AVC(以下H.264)が知られている。(非特許文献1)
H.264においてはmb_qp_delta符号を用いて、マクロブロック(16画素×16画素)単位に量子化パラメータを変更することできる。非特許文献1に記載されている7−23式によれば、ブロックの符号化の順に復号されたマクロブロックの量子化パラメータQPYPREVに差分値であるmb_qp_deltaを加算することで量子化パラメータを変更している。
近年、H.264の後継としてさらに高効率な符号化方式の国際標準化を行う活動が開始された。JCT−VC(Joint Collaborative Team on Video Coding)がISO/IECとITU−Tの間で設立され、HEVC(High Efficiency Video Coding)符号化方式(以下、HEVC)として標準化が進められている。対象となる画面サイズの増大に伴い、従来のマクロブロック(16画素×16画素)より大きなブロックサイズでの分割が検討されている。この大きなサイズの基本ブロックはLCU(Largest Coding Unit)と呼ばれ、そのサイズは最大64画素×64画素として検討が進められている。(非特許文献2)LCUはさらに分割されて、細かなサブブロックを形成し、変換や量子化等を行うサブブロックとしてCU(Conding Unit)に分割される。分割の方法としてはブロック内を縦横2分割していく領域四分木構造となっている。
図2(a)に領域四分木構造の様子を表す。太枠の1000は基本ブロックを表し、説明を簡易にするため、64画素×64画素の構成とする。1001と1010はサブブロックであり、32画素×32画素のサブブロックとする。1002〜1009もサブブロックであり、16画素×16画素のサブブロックとする。このように細かく分割して、変換等の符号化処理を行う。
As a method of compressing and recording moving images, H.264 H.264 / MPEG-4 AVC (hereinafter referred to as H.264) is known. (Non-Patent Document 1)
H. In H.264, the quantization parameter can be changed in units of macroblocks (16 pixels × 16 pixels) using the mb_qp_delta code. According to Equation 7-23 described in Non-Patent Document 1, the quantization parameter is changed by adding mb_qp_delta which is a difference value to the quantization parameter QPYPPREV of the macroblock decoded in the order of block coding. ing.
In recent years, H.C. As a successor to H.264, activities to start international standardization of a more efficient coding method have started. JCT-VC (Joint Collaborative Team on Video Coding) was established between ISO / IEC and ITU-T, and standardized as HEVC (High Efficiency Video Coding) (hereinafter, HEVC). With an increase in the target screen size, division with a block size larger than a conventional macroblock (16 pixels × 16 pixels) is being studied. This basic block having a large size is called an LCU (Large Coding Unit), and the size of the basic block is being studied as a maximum of 64 pixels × 64 pixels. (Non-Patent Document 2) The LCU is further divided to form fine sub-blocks, and is divided into CUs (Conding Units) as sub-blocks for performing transformation, quantization, and the like. As a division method, an area quadtree structure in which a block is divided into two vertically and horizontally is used.
FIG. 2A shows the state of the area quadtree structure. A thick frame 1000 represents a basic block, and has a structure of 64 pixels × 64 pixels in order to simplify the description. Reference numerals 1001 and 1010 denote sub-blocks, which are sub-blocks of 32 pixels × 32 pixels. Reference numerals 1002 to 1009 are also sub-blocks, which are 16-pixel × 16-pixel sub-blocks. In this way, it is divided finely and an encoding process such as conversion is performed.

ISO/IEC14496−10:2004Information technology−−Coding of audio−visual objects−−Part10:Advanced Video CodingISO / IEC14496-10: 2004 Information technology--Coding of audio-visual objects--Part10: Advanced Video Coding JCT−VC 寄書 JCTVC−A205.doc インターネット< http://wftp3.itu.int/av−arch/jctvc−site/2010_04_A_Dresden/>JCT-VC contribution JCTVC-A205. doc Internet <http: // wftp3. itu. int / av-arch / jctvc-site / 2010_04_A_Dresden /> JCT−VC 寄書 JCTVC−E391.doc インターネット< http://phenix.int−evry.fr/jct/doc_end_USER/documents/5_Geneva/wg11/JCTVC−E392−v3.zip>JCT-VC contribution JCTVC-E391. doc Internet <http: // phenix. int-evry. fr / jct / doc_end_USER / documents / 5_Geneva / wg11 / JCTVC-E392-v3. zip>

HEVCにおいて、量子化パラメータの制御をH.264のマクロブロックと同様に基本ブロック単位で行うことが考えられている。しかしながら、実際にはサブブロック単位で量子化パラメータ制御を行うことが画質の観点から望ましい。
サブブロック単位で量子化パラメータ制御を行う場合、基本ブロックは領域四分木構造に従って処理される。すなわち、図2(a)において、32画素×32画素のサブブロック1001につづき、16画素×16画素のサブブロック1002から1009が番号の順に処理され、最後に32画素×32画素のサブブロック1010が処理される。前のサブブロックの量子化パラメータを予測値として差分が算出され、それぞれのサブブロックの量子化パラメータが符号化される。図2(d)にその様子を示す。矢印は量子化パラメータの予測の方向を表している。これは符号化と同じ順番であるため、符号量制御を行いながら処理を行うことができる。このため、処理時間の遅延が少なく、リアルタイムでの符号化が必要なアプリケーションには非常に有効である。
しかしながら、各サブブロックで量子化パラメータの最適化を図った場合、量子化パラメータの差分値の取得は領域四分木構造に従って処理が行われるため、差分値にばらつきがみられる。例えば、図2(b)に各サブブロックの量子化パラメータ値を示す。本図では左上から右下に量子化パラメータの値がなだらかに変化した場合を想定している。サブブロック1001の量子化パラメータは12であり、サブブロック1002ではその差分が+2となる。順に、+4、−6、+6、−6、±0、+2、+4、+2となっている。よって、このように領域四分木構造に従った場合、値が乱高下するため、発生する符号が大きくなるといった問題が生じる。
画像では隣接するサブブロック間では量子化パラメータは似た値になることが知られている。これを利用して、上述した問題を解決するために、図2(e)のように、処理対象のサブブロックの左に隣接するサブブロックがある場合、その量子化パラメータを予測値とする方法が考えられる。また、JCT−VCに「CU−Level QP Prediction」(非特許文献3)では、図2(f)、(g)のように、サブブロック単位で横方向のサブブロックの量子化パラメータを予測値とする方法も提案されている。図2(f)は左側にサブブロックが存在する場合を表す。この場合、左側のサブブロックの量子化パラメータから予測を行うことができる。一方、図2(g)は画像の左端のようなサブブロックであり、左側にサブブロックが存在しない場合の量子化パラメータの予測を表している。
しかしながら、これらの方法では例えば急激に量子化パラメータを変更せざるを得ない場合に対応できない。すなわち、図2(c)はサブブロック1001まで符号化したところで符号量が増大し符号量を減少させるために、サブブロック1002から急激に量子化パラメータの値を大きくした例を示している。この場合、例えば図2(e)の予測値の参照順ではサブブロック1002及びサブブロック1004に対して22と20のような大きな差分値が発生してしまう。この点、図2(d)の参照順ではサブブロック1002に対してのみ大きな差分値22が発生するものの、サブブロック1004に対しては−6という比較的小さな差分値になる。
したがって、本発明は上述した課題を解決するためになされたものであり、その用途に応じて、処理時間の遅延が少ない符号化と高効率な符号化を適応的に使用することを目的としている。また、符号化モードを用いて、軽微な変更で更に符号化効率の向上を実現することを目的としている。
In HEVC, the quantization parameter is controlled by H.264. Similar to the H.264 macroblock, it is considered to perform the basic block unit. However, in practice, it is desirable from the viewpoint of image quality to perform quantization parameter control in units of sub-blocks.
When quantization parameter control is performed in units of sub-blocks, basic blocks are processed according to a region quadtree structure. That is, in FIG. 2A, the sub-block 1001 of 32 pixels × 32 pixels is followed by the sub-blocks 1002 to 1009 of 16 pixels × 16 pixels, and finally the sub-block 1010 of 32 pixels × 32 pixels. Is processed. A difference is calculated using the quantization parameter of the previous sub-block as a predicted value, and the quantization parameter of each sub-block is encoded. This is shown in FIG. The arrow represents the direction of prediction of the quantization parameter. Since this is the same order as encoding, it is possible to perform processing while performing code amount control. For this reason, there is little delay in processing time and it is very effective for an application that requires real-time encoding.
However, when the quantization parameter is optimized in each sub-block, the difference value of the quantization parameter is obtained in accordance with the region quadtree structure. For example, FIG. 2B shows the quantization parameter value of each sub-block. In this figure, it is assumed that the quantization parameter value changes gently from the upper left to the lower right. The quantization parameter of the sub-block 1001 is 12, and the difference is +2 in the sub-block 1002. In order, +4, −6, +6, −6, ± 0, +2, +4, and +2. Therefore, when the area quadtree structure is used in this way, the value fluctuates, causing a problem that the generated code becomes large.
In the image, it is known that the quantization parameter has a similar value between adjacent sub-blocks. Using this, in order to solve the above-described problem, as shown in FIG. 2E, when there is a subblock adjacent to the left of the subblock to be processed, the quantization parameter is used as a predicted value. Can be considered. Further, in “CU-Level QP Prediction” (Non-patent Document 3) in JCT-VC, as shown in FIGS. 2 (f) and 2 (g), the quantization parameter of the horizontal sub-block is predicted for each sub-block. A method has also been proposed. FIG. 2 (f) shows a case where a sub-block exists on the left side. In this case, prediction can be performed from the quantization parameter of the left sub-block. On the other hand, FIG. 2G is a sub-block as shown at the left end of the image, and represents the prediction of the quantization parameter when there is no sub-block on the left side.
However, these methods cannot cope with, for example, a case where the quantization parameter must be changed suddenly. That is, FIG. 2C shows an example in which the value of the quantization parameter is suddenly increased from the sub-block 1002 in order to increase the code amount and decrease the code amount when the sub-block 1001 is encoded. In this case, for example, large difference values such as 22 and 20 are generated for the sub-block 1002 and the sub-block 1004 in the reference order of the predicted values in FIG. In this regard, in the reference order of FIG. 2D, a large difference value 22 is generated only for the sub-block 1002, but a relatively small difference value of −6 is obtained for the sub-block 1004.
Therefore, the present invention has been made to solve the above-described problems, and an object thereof is to adaptively use coding with less processing time delay and highly efficient coding according to the application. . It is another object of the present invention to further improve the encoding efficiency with minor changes using the encoding mode.

上述課題を解決するため、本発明の画像符号化装置は以下の構成を備える。即ち、画像に含まれるブロックを符号化する画像符号化装置であって、前記画像の符号化モード、前記ブロックの符号化モード、及び前記ブロックに含まれる処理対象のサブブロックの符号化モードのうち、少なくともいずれか1つを取得する取得手段と、前記取得手段によって取得された符号化モードがイントラ予測モードである場合に、前記処理対象のサブブロックの量子化パラメータと、当該処理対象のサブブロックとの位置関係に基づく第1のサブブロックの量子化パラメータとの差分値を符号化し、前記取得手段によって取得された符号化モードがインター予測モードである場合に、前記処理対象のサブブロックの量子化パラメータと、前記処理対象のサブブロックとの符号化順序関係に基づく第2のサブブロックの量子化パラメータとの差分値を符号化する符号化手段とを有することを特徴とする。In order to solve the above-described problems, an image encoding device of the present invention has the following configuration. That is, an image encoding device that encodes a block included in an image, the encoding mode of the image, the encoding mode of the block, and the encoding mode of a sub-block to be processed included in the block , An acquisition unit that acquires at least one, and when the encoding mode acquired by the acquisition unit is an intra prediction mode, the quantization parameter of the sub-block to be processed and the sub-block to be processed When the difference value from the quantization parameter of the first sub-block based on the positional relationship with the first sub-block is encoded, and the encoding mode acquired by the acquisition unit is the inter prediction mode, the quantum of the sub-block to be processed The quantization parameter of the second sub-block based on the coding order relationship between the quantization parameter and the sub-block to be processed. And having a coding means for coding a difference value between data.

本発明により、処理時間の遅延が少ない符号化と高効率な符号化を適応的に使用することが可能になる。また、スライスやピクチャの符号化モードに合わせて量子化パラメータの予測方法を変更することにより、それぞれの符号化モードで最適な量子化パラメータの差分符号化が行えるようになる。   According to the present invention, it is possible to adaptively use coding with less processing time delay and highly efficient coding. Also, by changing the prediction method of the quantization parameter in accordance with the coding mode of the slice or picture, the optimum differential encoding of the quantization parameter can be performed in each coding mode.

実施形態1における画像符号化装置の構成を示すブロック図1 is a block diagram illustrating a configuration of an image encoding device according to a first embodiment. (a)〜(g)ブロック分割と量子化パラメータの予測の一例を示す図(A)-(g) The figure which shows an example of block division and prediction of a quantization parameter 実施形態1に係る画像符号化装置における量子化パラメータ符号化部の詳細なブロック図Detailed block diagram of a quantization parameter encoding unit in the image encoding device according to the first embodiment 実施形態1に係る画像符号化装置における画像符号化処理を示すフローチャート7 is a flowchart showing image encoding processing in the image encoding apparatus according to the first embodiment. 実施形態1で生成されるビットストリームの一例を示す図The figure which shows an example of the bit stream produced | generated in Embodiment 1. 実施形態2に係る画像復号装置の構成を示すブロック図FIG. 6 is a block diagram illustrating a configuration of an image decoding device according to a second embodiment. 実施形態2に係る量子化パラメータ復号部の詳細なブロック図Detailed block diagram of quantization parameter decoding unit according to embodiment 2 実施形態2における画像復号装置における画像復号処理を示すフローチャート7 is a flowchart illustrating image decoding processing in the image decoding apparatus according to the second embodiment. 実施形態3に係る画像符号化装置における量子化パラメータ符号化部の詳細なブロック図Detailed block diagram of a quantization parameter encoding unit in the image encoding device according to the third embodiment 実施形態3に係る画像符号化装置における画像符号化処理を示すフローチャート10 is a flowchart showing image encoding processing in the image encoding apparatus according to the third embodiment. 実施形態4に係る画像復号装置における量子化パラメータ復号部の詳細なブロック図Detailed block diagram of a quantization parameter decoding unit in the image decoding apparatus according to the fourth embodiment 実施形態4における画像復号装置における画像復号処理を示すフローチャート10 is a flowchart illustrating image decoding processing in the image decoding apparatus according to the fourth embodiment. 実施形態5に係る画像符号化装置の構成を示すブロック図FIG. 7 is a block diagram illustrating a configuration of an image encoding device according to a fifth embodiment. 実施形態5に係る画像符号化装置における量子化パラメータ符号化部の詳細なブロック図Detailed block diagram of a quantization parameter encoding unit in the image encoding device according to the fifth embodiment 実施形態5に係る画像符号化装置における画像符号化処理を示すフローチャート10 is a flowchart showing image encoding processing in the image encoding device according to the fifth embodiment. 実施形態6に係る画像復号装置の構成をブロック図The block diagram of the structure of the image decoding apparatus which concerns on Embodiment 6. FIG. 実施形態6に係る画像復号装置における量子化パラメータ復号部の詳細なブロック図Detailed block diagram of the quantization parameter decoding unit in the image decoding apparatus according to the sixth embodiment 実施形態6における画像復号装置における画像復号処理を示すフローチャート10 is a flowchart showing image decoding processing in the image decoding apparatus according to the sixth embodiment. 実施形態7に係る画像復号装置の構成をブロック図The block diagram of the structure of the image decoding apparatus which concerns on Embodiment 7. FIG. 実施形態7に係る画像復号装置における量子化パラメータ復号部の詳細なブロック図Detailed block diagram of the quantization parameter decoding unit in the image decoding apparatus according to the seventh embodiment 実施形態7における画像復号装置における画像復号処理を示すフローチャート10 is a flowchart showing image decoding processing in the image decoding apparatus according to the seventh embodiment. 実施形態7で生成されるビットストリームの一例を示す図FIG. 10 is a diagram illustrating an example of a bitstream generated in the seventh embodiment. 実施形態8に係る画像復号装置の構成をブロック図The block diagram of the structure of the image decoding apparatus which concerns on Embodiment 8. FIG. 実施形態8に係る画像符号化装置における量子化パラメータ符号化部の詳細なブロック図Detailed block diagram of a quantization parameter encoding unit in the image encoding device according to the eighth embodiment 実施形態8に係る画像符号化装置における画像符号化処理を示すフローチャート10 is a flowchart showing image encoding processing in the image encoding device according to the eighth embodiment. 本発明の画像符号化装置、復号装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図The block diagram which shows the structural example of the hardware of the computer applicable to the image coding apparatus of this invention, and a decoding apparatus. 実施形態1で生成される別なビットストリームの一例を示す図示すブロック図FIG. 3 is a block diagram illustrating an example of another bit stream generated in the first embodiment.

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

<実施形態1>
以下、本発明の実施形態を、図面を用いて説明する。図1は本実施形態の画像符号化装置を示すブロック図である。
<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 encoding apparatus according to this embodiment.

図1において、11000は画像データを入力する端子である。11001は入力画像を複数の基本ブロック単位でブロックを切り出し、必要に応じてサブブロックに分割するブロック分割部である。説明を容易にするために、入力画像は8ビットの画素値を持つこととするが、これに限定されない。また、基本ブロックのサイズを64画素×64画素とし、サブブロックの最小サイズを8画素×8画素とする。またブロックの分割に関しては縦横1/2のサイズに4分割する方法を例にとって説明するが、これにブロックの形状、サイズは限定されない。サブブロックの分割に関しては、特に限定されない。例えば全体をサブブロックに分割し、エッジ量などを算出しクラスタリングして分割を行っても構わない。すなわち、エッジが多く集まる部分は細かくサブブロックを設定し、平坦な部分は大きなサブブロックを設定する。サブブロックの分割の状態はサブブロックごとに分割の有無を四分木分割の順番に表したサブブロック分割情報として後段に出力する。   In FIG. 1, reference numeral 11000 denotes a terminal for inputting image data. Reference numeral 11001 denotes a block dividing unit that cuts out an input image in units of a plurality of basic blocks and divides the input image into sub blocks as necessary. For ease of explanation, the input image has an 8-bit pixel value, but the present invention is not limited to this. Further, the basic block size is 64 pixels × 64 pixels, and the sub-block minimum size is 8 pixels × 8 pixels. Further, the block division will be described by taking an example of a method of dividing the block into four halves, but the shape and size of the block are not limited thereto. The division of the subblock is not particularly limited. For example, the whole may be divided into sub-blocks, and the amount of edges may be calculated and clustered for clustering. That is, a sub-block is set finely in a portion where many edges gather, and a large sub-block is set in a flat portion. The sub-block division state is output to the subsequent stage as sub-block division information indicating the presence or absence of division for each sub-block in the order of quadtree division.

サブブロックの量子化パラメータの差分値を算出するためのサブブロックの量子化パラメータ予測値の算出方法について図2(e)及び(f)を用いて説明する。図2(e)は画像の左端等で基本ブロックの左にサブブロックがない場合を示している。図2(f)は左側に符号化済みの基本ブロックが存在する場合を示している。両者において、各サブブロックは左隣りで当該サブブロックの左上隅の画素が接するサブブロックの量子化パラメータを予測値とする。もし、左側に参照可能なサブブロックがない場合、図2(d)の復号する順と同じように参照を行う。図2(e)に示すように、サブブロック1006及び1008において、サブブロックの符号化の順に符号化されたサブブロック1005及び1007の量子化パラメータを参照する。   A method for calculating a prediction parameter value of a sub-block for calculating a difference value of the quantization parameter of the sub-block will be described with reference to FIGS. 2 (e) and 2 (f). FIG. 2E shows a case where there is no sub-block at the left end of the basic block at the left end of the image. FIG. 2 (f) shows a case where an encoded basic block exists on the left side. In both cases, each subblock is adjacent to the left, and the quantization parameter of the subblock that is in contact with the pixel in the upper left corner of the subblock is used as a predicted value. If there is no sub-block that can be referred to on the left side, reference is made in the same order as in FIG. As shown in FIG. 2E, in the sub-blocks 1006 and 1008, the quantization parameters of the sub-blocks 1005 and 1007 encoded in the order of sub-block encoding are referred to.

11002は処理対象ブロックである各サブブロックの量子化パラメータを決定する量子化パラメータ決定部である。
11003はブロック分割部11001で分割された各基本ブロックを、サブブロック単位で予測を行い、差分値算出を行い、各サブブロックの予測誤差を算出するブロック予測部である。静止画または動画の場合のイントラフレームではイントラ予測を行い、動画の場合は動き補償予測も行うものとする。
11004は各サブブロックの予測誤差に対して直交変換を行い、直交変換係数を算出するブロック変換部である。直交変換に関しては特に限定しないが、離散コサイン変換やアダマール変換等を用いてもよい。11005は量子化パラメータ決定部11002で決定された量子化パラメータによって前記直交変換係数を量子化するブロック量子化部である。この量子化によって量子化係数を得ることができる。
11006はこのようにして得られた量子化係数を符号化して量子化係数符号データを生成するブロック符号化部である。符号化の方法は特に限定しないが、ハフマン符号や算術符号等を用いることができる。11007はブロック再生画像生成部である。ブロック量子化部11005、ブロック変換部11004の逆の動作を行って予測誤差を再生し、ブロック予測部11003の結果から基本ブロックの復号画像を生成する。再生された画像データは保持され、ブロック予測部11003での予測に用いられる。
11011は操作部であり、ユーザが、処理時間の遅延が少ない符号化か高効率な符号化かを選択する操作部である。処理時間の遅延が少ない符号化を実施する場合は0を、高効率な符号化の場合は1を選択フラグとして出力する。11008は量子化パラメータ決定部11002で決定した各サブブロックの量子化パラメータを符号化して量子化パラメータ符号データを生成する量子化パラメータ符号化部である。
11009は統合符号化部である。ヘッダ情報や予測に関する符号を生成するとともに、量子化パラメータ符号化部11008で生成された量子化パラメータ符号データおよびブロック符号化部11006で生成された量子化係数符号データを統合する。11010は端子であり、統合符号化部11009で統合されて生成されたビットストリームを外部に出力する端子である。
Reference numeral 11002 denotes a quantization parameter determination unit that determines the quantization parameter of each sub-block that is a processing target block.
11003 is a block prediction unit that predicts each basic block divided by the block dividing unit 11001 in units of subblocks, calculates a difference value, and calculates a prediction error of each subblock. It is assumed that intra prediction is performed in an intra frame in the case of a still image or a moving image, and motion compensation prediction is also performed in the case of a moving image.
Reference numeral 11004 denotes a block transform unit that performs orthogonal transform on the prediction error of each sub-block and calculates orthogonal transform coefficients. Although it does not specifically limit regarding orthogonal transformation, you may use discrete cosine transformation, Hadamard transformation, etc. Reference numeral 11005 denotes a block quantization unit that quantizes the orthogonal transform coefficient using the quantization parameter determined by the quantization parameter determination unit 11002. A quantization coefficient can be obtained by this quantization.
Reference numeral 11006 denotes a block encoding unit that generates quantization coefficient code data by encoding the quantization coefficient thus obtained. The encoding method is not particularly limited, but a Huffman code, an arithmetic code, or the like can be used. Reference numeral 11007 denotes a block reproduction image generation unit. The inverse operation of the block quantization unit 11005 and the block transform unit 11004 is performed to reproduce the prediction error, and the decoded image of the basic block is generated from the result of the block prediction unit 11003. The reproduced image data is held and used for prediction by the block prediction unit 11003.
Reference numeral 11011 denotes an operation unit which is used by the user to select between encoding with less processing time delay and encoding with high efficiency. If encoding is performed with a small processing time delay, 0 is output as a selection flag, and 1 is output as a selection flag for highly efficient encoding. Reference numeral 11008 denotes a quantization parameter encoding unit that generates quantization parameter code data by encoding the quantization parameter of each subblock determined by the quantization parameter determination unit 11002.
Reference numeral 11009 denotes an integrated encoding unit. Codes relating to header information and prediction are generated, and the quantization parameter code data generated by the quantization parameter encoding unit 11008 and the quantization coefficient code data generated by the block encoding unit 11006 are integrated. Reference numeral 11010 denotes a terminal, which is a terminal that outputs the bit stream generated by the integration encoding unit 11009 to the outside.

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

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

ブロック予測部11003ではブロック再生画像生成部11007に保持されている再生画像を参照して予測を行い、予測誤差を生成してブロック変換部11004及びブロック再生画像生成部11007に入力する。ブロック変換部11004では入力された予測誤差に対して直交変換を行い、直交変換係数を求め、ブロック量子化部11005に入力する。   The block prediction unit 11003 performs prediction with reference to the reproduction image held in the block reproduction image generation unit 11007, generates a prediction error, and inputs the prediction error to the block conversion unit 11004 and the block reproduction image generation unit 11007. The block transform unit 11004 performs orthogonal transform on the input prediction error, obtains an orthogonal transform coefficient, and inputs it to the block quantization unit 11005.

一方、量子化パラメータ決定部11002では入力された各サブブロック単位で発生した符号量を鑑みて、サブブロック単位で画質と符号量のバランスから最適な量子化パラメータを決定する。決定された各サブブロックの量子化パラメータはブロック量子化部11005、ブロック再生画像生成部11007、量子化パラメータ符号化部11008に入力される。また、ブロック分割部11001から分割情報も同様に入力される。   On the other hand, the quantization parameter determination unit 11002 determines an optimal quantization parameter from the balance of image quality and code amount in units of subblocks in consideration of the input code amount generated in units of subblocks. The determined quantization parameter of each sub-block is input to the block quantization unit 11005, the block reproduction image generation unit 11007, and the quantization parameter encoding unit 11008. In addition, division information is similarly input from the block division unit 11001.

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

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

図3に量子化パラメータ符号化部11008の詳細なブロック図を示す。図3において、1は図1の量子化パラメータ決定部11002から各サブブロックの量子化パラメータとサブブロック分割情報を入力する端子である。2は入力された各サブブロックの量子化パラメータを一旦格納する量子化パラメータ保持部である。3は符号化の順に符号化されたサブブロックの量子化パラメータを格納する量子化パラメータ保持部である。例えば、直前に符号化されたサブブロックの量子化パラメータを保持する。4は、符号化するサブブロックの周囲に存在する符号化されたサブブロック(本実施形態では左)の量子化パラメータを格納する量子化パラメータ保持部である。4に格納される量子化パラメータはサブブロック分割情報に基づいてリセットが行われる。例えば、図2(a)であれば、サブブロック1002の符号化時にはサブブロック1001の量子化パラメータが保持されている。また、サブブロック1005の符号化時にはサブブロック1001からサブブロック1004の量子化パラメータが保持されている。サブブロック1006やサブブロック1008では横に符号化されたサブブロックがない。この時、量子化パラメータ保持部4はリセットされる。   FIG. 3 shows a detailed block diagram of the quantization parameter encoding unit 11008. In FIG. 3, 1 is a terminal for inputting the quantization parameter and sub-block division information of each sub-block from the quantization parameter determination unit 11002 of FIG. Reference numeral 2 denotes a quantization parameter holding unit that temporarily stores the input quantization parameter of each sub-block. Reference numeral 3 denotes a quantization parameter holding unit that stores quantization parameters of sub-blocks encoded in the order of encoding. For example, the quantization parameter of the sub-block encoded immediately before is held. Reference numeral 4 denotes a quantization parameter holding unit that stores quantization parameters of encoded sub-blocks (left in this embodiment) existing around the sub-block to be encoded. The quantization parameter stored in 4 is reset based on the sub-block division information. For example, in FIG. 2A, the quantization parameter of the sub-block 1001 is held when the sub-block 1002 is encoded. In addition, when the sub block 1005 is encoded, the quantization parameters of the sub block 1001 to the sub block 1004 are held. In the sub-block 1006 and the sub-block 1008, there is no sub-block encoded horizontally. At this time, the quantization parameter holding unit 4 is reset.

5は量子化パラメータ保持部4に格納された各サブブロックの量子化パラメータから符号化するサブブロックの量子化パラメータの予測値を決定するサブブロック量子化パラメータ予測値決定部である。   Reference numeral 5 denotes a sub-block quantization parameter prediction value determination unit that determines the prediction value of the quantization parameter of the sub-block to be encoded from the quantization parameter of each sub-block stored in the quantization parameter holding unit 4.

6は図1の操作部11011から選択フラグを受け取る端子である。7は受け取った選択信号を符号化する選択フラグ符号化部である。以後、この符号化結果をqp_delta_select_flag符号と呼称する。8はこのqp_delta_select_flag符号を出力する端子である。9はセレクタであり、端子6から入力される選択フラグに基づいて、入力先を選択する。選択フラグが0であれば、量子化パラメータ保持部3からの出力を、1であれば、量子化パラメータ予測値決定部5からの出力を選択して入力する。10はサブブロック量子化パラメータ差分部である。量子化パラメータ保持部2で保持された量子化パラメータからセレクタ9の出力値を減算し、サブブロック量子化パラメータ差分値を算出する。11はサブブロック量子化パラメータ差分値を符号化するサブブロック量子化パラメータ符号化部である。生成された符号化データはcu_qp_delta符号として図1の統合符号部11009に出力される。   Reference numeral 6 denotes a terminal for receiving a selection flag from the operation unit 11011 in FIG. A selection flag encoding unit 7 encodes the received selection signal. Hereinafter, this encoding result is referred to as a qp_delta_select_flag code. Reference numeral 8 denotes a terminal for outputting the qp_delta_select_flag code. A selector 9 selects an input destination based on a selection flag input from the terminal 6. If the selection flag is 0, the output from the quantization parameter holding unit 3 is selected, and if the selection flag is 1, the output from the quantization parameter predicted value determination unit 5 is selected and input. Reference numeral 10 denotes a sub-block quantization parameter difference unit. The sub block quantization parameter difference value is calculated by subtracting the output value of the selector 9 from the quantization parameter held in the quantization parameter holding unit 2. Reference numeral 11 denotes a sub-block quantization parameter encoding unit that encodes the sub-block quantization parameter difference value. The generated encoded data is output as a cu_qp_delta code to the integrated encoding unit 11009 in FIG.

以上の構成において、処理に先駆け、端子6から選択フラグが入力され、セレクタ9と選択フラグ符号化部7に入力される。選択フラグ符号化部7は入力された選択フラグを符号化してqp_delta_select_flag符号を端子8から出力する。また、セレクタ9は選択フラグが0であれば、量子化パラメータ保持部3の出力を、そうでなければ、量子化パラメータ予測値決定部5の出力を入力として選択する。   In the above configuration, prior to processing, a selection flag is input from the terminal 6 and input to the selector 9 and the selection flag encoding unit 7. The selection flag encoding unit 7 encodes the input selection flag and outputs a qp_delta_select_flag code from the terminal 8. If the selection flag is 0, the selector 9 selects the output of the quantization parameter holding unit 3 as an input, and otherwise selects the output of the quantization parameter predicted value determination unit 5 as an input.

量子化パラメータ保持部2は端子1から入力されるサブブロック量子化パラメータを格納する。これと並行して、量子化パラメータ予測値決定部5は量子化パラメータ保持部3及び4から周囲のサブブロックの量子化パラメータから当該サブブロックの量子化パラメータ予測値を決定する。量子化パラメータ保持部4を参照し、サブブロック分割情報に基づいて、符号化するサブブロックの周囲(本実施形態では左側)に符号化済みのサブブロックがあるか否かを判定する。もし、量子化パラメータ保持部4に当該サブブロックの左上隅の画素が接する位置のサブブロックが符号化済みであれば、そのサブブロックの量子化パラメータを予測値とする。符号化済みでなければ、ブロックの符号化の順に符号化したサブブロックが該当する場合は量子化パラメータ保持部3から量子化パラメータを予測値とする。   The quantization parameter holding unit 2 stores a sub-block quantization parameter input from the terminal 1. In parallel with this, the quantization parameter prediction value determination unit 5 determines the quantization parameter prediction value of the subblock from the quantization parameters of the surrounding subblocks from the quantization parameter holding units 3 and 4. The quantization parameter holding unit 4 is referred to, and based on the subblock division information, it is determined whether there is an encoded subblock around the subblock to be encoded (left side in the present embodiment). If the sub-block at the position where the pixel in the upper left corner of the sub-block is in contact with the quantization parameter holding unit 4 has been encoded, the quantization parameter of that sub-block is used as the predicted value. If not already encoded, if a sub-block encoded in the order of block encoding is applicable, the quantization parameter holding unit 3 sets the quantization parameter as a predicted value.

セレクタ9は選択フラグが0であれば、復号する順に従って量子化パラメータの予測値を決定するので、量子化パラメータ保持部3の出力をサブブロック量子化パラメータ差分部10に入力する。選択フラグが1であれば、符号化効率向上のため、符号化するサブブロックの左隣または、ブロックの符号化の順に符号化されたサブブロックの量子化パラメータを予測値とする。このため、サブブロック量子化パラメータ予測値決定部5の出力をサブブロック量子化パラメータ差分部10に入力する。   If the selection flag is 0, the selector 9 determines the prediction value of the quantization parameter according to the decoding order, and therefore inputs the output of the quantization parameter holding unit 3 to the sub-block quantization parameter difference unit 10. If the selection flag is 1, in order to improve coding efficiency, the quantization parameter of the sub-block coded on the left side of the sub-block to be coded or in the coding order of the block is used as the predicted value. For this reason, the output of the sub-block quantization parameter prediction value determination unit 5 is input to the sub-block quantization parameter difference unit 10.

サブブロック量子化パラメータ差分部10は符号化するサブブロックの量子化パラメータを量子化パラメータ保持部2から読み出し、セレクタ9から入力された量子化パラメータ予測値を減算し、差分値をサブブロック量子化パラメータ符号化部11に入力する。サブブロック量子化パラメータ符号化部11は入力された量子化パラメータ差分値をゴロム符号化してcu_qp_delta符号を端子12から出力する。   The sub-block quantization parameter difference unit 10 reads the quantization parameter of the sub-block to be encoded from the quantization parameter holding unit 2, subtracts the quantization parameter prediction value input from the selector 9, and sub-quantizes the difference value. Input to the parameter encoding unit 11. The sub-block quantization parameter encoding unit 11 performs Golomb encoding on the input quantization parameter difference value and outputs a cu_qp_delta code from the terminal 12.

図1に戻り、統合符号化部11009は画像のシーケンス、フレームのヘッダといった符号を生成する。また、シーケンスのヘッダ(H.264ではSuquence Parameter Set(SPS))にqp_delta_select_flag符号を挿入する。各基本ブロックに関しては、ブロック予測部11003から予測のモードといった情報を取得して符号化する。続いて量子化パラメータ符号化部11008から基本ブロックの分割状況を表すサブブロック分割情報を入力し、符号化する。符号化の方法は特に限定しないが、非特許分献2に記載の方法を使うことができる。以後、サブブロックごとにcu_qp_delta符号と各量子化係数符号データをビットストリームとして端子11010から出力する。   Returning to FIG. 1, the integrated encoding unit 11009 generates codes such as an image sequence and a frame header. Further, the qp_delta_select_flag code is inserted into the sequence header (Sequence Parameter Set (SPS) in H.264). For each basic block, information such as a prediction mode is acquired from the block prediction unit 11003 and encoded. Subsequently, sub-block division information indicating the division status of the basic block is input from the quantization parameter encoding unit 11008 and encoded. The encoding method is not particularly limited, but the method described in Non-Patent Document 2 can be used. Thereafter, the cu_qp_delta code and each quantized coefficient code data are output from the terminal 11010 as a bit stream for each sub-block.

図4は、実施形態1に係る画像符号化装置における画像符号化処理を示すフローチャートである。まず、ステップS001にて、★ユーザは操作部11011から処理時間の遅延が少ない符号化か高効率な符号化かを選択する。選択された機能に合わせて、選択フラグを生成する。   FIG. 4 is a flowchart illustrating image encoding processing in the image encoding device according to the first embodiment. First, in step S001, the user selects, from the operation unit 11011, encoding with little processing time delay or encoding with high efficiency. A selection flag is generated according to the selected function.

ステップS002にて、選択フラグを符号化し、qp_delta_select_flag符号を生成する。
ステップS003にて、統合符号化部11009はシーケンス、フレームのヘッダといった符号を生成し、qp_delta_select_flag符号を含めて出力する。
ステップS004にて、ブロック分割部11001は入力された画像に対して、基本ブロックを画像の左上から順に切り出す。
ステップS005にて、ブロック分割部11001はさらに基本ブロックをサブブロックに分割する。
ステップS006にて、量子化パラメータ決定部11002は、各サブブロックの量子化パラメータを決定する。
ステップS007にて、量子化パラメータ符号化部11008は、ステップS001で決定した選択フラグが復号する順に量子化パラメータの予測を行うモードを示すものか否かを判定する。もし、復号する順に量子化パラメータの予測を行うモード(選択フラグが0)を選択していれば、ステップS008に進み、そうでなければステップS009に進む。
ステップS008にて、量子化パラメータ符号化部11008は、ブロックの符号化の順に符号化したサブブロックの量子化パラメータを予測値として決定する。
ステップS009にて、量子化パラメータ符号化部11008は、符号化するサブブロックの周囲(本実施形態では左隣)または、ブロックの符号化の順に符号化されたサブブロックの量子化パラメータを予測値として決定する。
ステップS010にて、量子化パラメータ符号化部11008は、符号化するサブブロックの量子化パラメータから予測値を引き、サブブロックの量子化パラメータ差分値を算出する。
ステップS011にて、量子化パラメータ符号化部11008は、サブブロック量子化パラメータ差分値にゴロム符号化を行い、cu_qp_delta符号を出力する。
ステップS012にて、サブブロックの画像データに対して、予測を行い、予測誤差に対して、直交変換、量子化を行い、得られた量子化係数を符号化して量子化係数符号データを出力する。
ステップS013にて、得られた量子化係数を逆量子化、逆変換を行い、予測誤差を算出する。この予測誤差と再生画像から当該サブブロックの再生画像を生成する。
ステップS014にて、画像符号化装置は、当該基本ブロック内の全てのサブブロックの符号化が終了したか否かの判定を行い、終了していればステップS015に進み、終了していなければ次のサブブロックを対象としてステップS005に戻る。
ステップS015にて、画像符号化装置は、全ての基本ブロックの符号化が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次の基本ブロックを対象としてステップS004に戻る。
In step S002, the selection flag is encoded to generate a qp_delta_select_flag code.
In step S003, the integrated encoding unit 11009 generates codes such as a sequence and a frame header, and outputs the codes including a qp_delta_select_flag code.
In step S004, the block dividing unit 11001 cuts out the basic blocks in order from the upper left of the image with respect to the input image.
In step S005, block division section 11001 further divides the basic block into sub-blocks.
In step S006, the quantization parameter determination unit 11002 determines the quantization parameter of each sub-block.
In step S007, the quantization parameter encoding unit 11008 determines whether or not the selection flag determined in step S001 indicates a mode for performing quantization parameter prediction in the decoding order. If the mode for selecting the quantization parameter (selection flag is 0) is selected in the decoding order, the process proceeds to step S008, and if not, the process proceeds to step S009.
In step S008, the quantization parameter encoding unit 11008 determines the quantization parameter of the sub-block encoded in the order of block encoding as a predicted value.
In step S009, the quantization parameter encoding unit 11008 predicts the quantization parameter of the sub-block encoded around the sub-block to be encoded (in the present embodiment, on the left side) or in the order of the block encoding. Determine as.
In step S010, the quantization parameter encoding unit 11008 subtracts the prediction value from the quantization parameter of the sub-block to be encoded, and calculates the quantization parameter difference value of the sub-block.
In step S011, the quantization parameter encoding unit 11008 performs Golomb encoding on the sub-block quantization parameter difference value, and outputs a cu_qp_delta code.
In step S012, prediction is performed on the image data of the sub-block, orthogonal transformation and quantization are performed on the prediction error, the obtained quantized coefficient is encoded, and quantized coefficient code data is output. .
In step S013, the obtained quantization coefficient is inversely quantized and inversely transformed to calculate a prediction error. A reproduction image of the sub-block is generated from the prediction error and the reproduction image.
In step S014, the image coding apparatus determines whether or not the coding of all the sub-blocks in the basic block has been finished. If finished, the process proceeds to step S015. Return to step S005 for the sub-block.
In step S015, the image encoding apparatus determines whether or not encoding of all the basic blocks has been completed, and if completed, stops all operations and ends the processing, otherwise The process returns to step S004 for the next basic block.

この結果、図5に示すようなビットストリームを生成することができる。シーケンスヘッダ(Sequence Parameter Set)20001にqp_delta_select_flag符号20005が含まれ、本符号化データの量子化パラメータの差分値を求めるための予測値の算出方法を特定できる。また、基本ブロック(LCU)には分割情報を符号化したsplit_coding_flag符号20010が含まれている。さらに、各サブブロックの符号化データ(cording_unit())には各サブブロックの量子化パラメータ差分値の符号化結果であるcu_qp_delta符号20009が含まれている。   As a result, a bit stream as shown in FIG. 5 can be generated. A sequence header (Sequence Parameter Set) 20001 includes a qp_delta_select_flag code 20005, and a prediction value calculation method for obtaining a difference value of a quantization parameter of the encoded data can be specified. The basic block (LCU) includes a split_coding_flag code 20010 obtained by encoding the division information. Further, the encoded data (coding_unit ()) of each subblock includes a cu_qp_delta code 20009 that is an encoding result of the quantization parameter difference value of each subblock.

以上の構成と動作により、特にステップS005からステップS011の処理により、用途に適合した各サブブロック量子化パラメータの差分値を符号化ができる。さらに、本実施形態では説明のために基本ブロックを64画素×64画素、サブブロックを8画素×8画素までとしたが、これに限定されない。例えば基本ブロックは128画素×128画素等のブロックサイズへの変更が可能であり、また、基本ブロック、サブブロックの形状も正方形に限定されず、8画素×4画素などの長方形でもよい。   With the above configuration and operation, it is possible to encode the difference value of each sub-block quantization parameter suitable for the application, particularly by the processing from step S005 to step S011. Furthermore, in this embodiment, for the purpose of explanation, the basic block is 64 pixels × 64 pixels and the sub-block is 8 pixels × 8 pixels. However, the present invention is not limited to this. For example, the basic block can be changed to a block size of 128 pixels × 128 pixels, and the shapes of the basic block and sub-block are not limited to squares, but may be rectangles such as 8 pixels × 4 pixels.

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

さらに、復号する順ではない場合の量子化パラメータの参照についてもこれに限定されない。さらにはサブブロックの中に複数の直交変換サイズのブロックが存在してももちろん構わない。さらに、本実施形態ではqp_delta_select_flag符号20005をシーケンスヘッダ(Sequence Parameter Set)20001に含む形をとった。しかしこれに限定されずピクチャヘッダ(Picture Parameter Set)20002やスライスヘッダ(Slice Header)20007など他のヘッダに含む形をとってももちろん構わない。図27にスライスヘッダ(Slice Header)20007にqp_delta_select_flag符号20030を挿入したビットストリームの一例を示す。   Furthermore, the reference of the quantization parameter when the decoding order is not used is not limited to this. Further, there may be a plurality of orthogonal transform size blocks in the sub-block. Furthermore, in the present embodiment, the qp_delta_select_flag code 20005 is included in the sequence header (Sequence Parameter Set) 20001. However, the present invention is not limited to this. Of course, other headers such as a picture header (Picture Header Set) 20002 and a slice header (Slice Header) 20007 may be used. FIG. 27 shows an example of a bit stream in which qp_delta_select_flag code 20030 is inserted into slice header 20007.

なお、本実施形態で復号する順で量子化パラメータを予測する手段と符号化するサブブロックの周囲のサブブロックの量子化パラメータから予測する手段を備えていた。しかしいずれか一方しか存在しない場合には、存在する手段を表すqp_delta_select_flag符号が挿入される。   In this embodiment, there are provided means for predicting quantization parameters in the order of decoding and means for predicting from quantization parameters of subblocks around the subblock to be encoded. However, when only one of them exists, a qp_delta_select_flag code representing the existing means is inserted.

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

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

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

図6において、端子1100から入力された1フレーム分のストリームデータは復号・分離部1101に入力され、画像を再生するのに必要なヘッダ情報が復号される。ヘッダに含まれるqp_delta_select_flag符号20005は選択フラグ復号部1109に入力され、量子化パラメータの再生を行う予測の方法を選択するフラグが再生される。選択フラグは量子化パラメータ復号部1102に入力される。   In FIG. 6, stream data for one frame input from a terminal 1100 is input to a decoding / separating unit 1101, and header information necessary for reproducing an image is decoded. The qp_delta_select_flag code 20005 included in the header is input to the selection flag decoding unit 1109, and a flag for selecting a prediction method for reproducing the quantization parameter is reproduced. The selection flag is input to the quantization parameter decoding unit 1102.

また、基本ブロック単位で分割情報(split_coding_flag符号20010)も復号・分離部1101で復号され、量子化パラメータ復号部1102に入力される。これに続くサブブロックごとにサブブロックの量子化パラメータ差分値符号(cu_qp_delta符号)ともに量子化パラメータ復号部1102に入力する。   Further, the division information (split_coding_flag code 20010) in units of basic blocks is also decoded by the decoding / separating unit 1101 and input to the quantization parameter decoding unit 1102. The sub-block quantization parameter difference value code (cu_qp_delta code) is input to the quantization parameter decoding unit 1102 for each subsequent sub-block.

図7は量子化パラメータ復号部1102の詳細を表すブロック図である。100は復号・分離部1101から復号するサブブロックを含む基本ブロックのサブブロックの分割情報を入力する端子である。101は選択フラグ復号部1109から選択フラグを入力する端子である。102は図5の復号・分離部1101からサブブロック量子化パラメータ差分符号(cu_qp_delta符号20009)を入力する端子である。103はサブブロック量子化パラメータ差分符号を入力して復号し、サブブロック量子化パラメータの差分値を再生するサブブロック量子化パラメータ差分値復号部である。104は決定されたサブブロック量子化パラメータの予測値とサブブロック量子化パラメータ差分値を加算してサブブロック量子化パラメータを再生するサブブロック量子化パラメータ加算部である。105は再生されたサブブロック量子化パラメータを図6のブロック逆量子化部1104に出力する端子である。   FIG. 7 is a block diagram showing details of the quantization parameter decoding unit 1102. Reference numeral 100 denotes a terminal for inputting subblock division information of a basic block including a subblock to be decoded from the decoding / separating unit 1101. Reference numeral 101 denotes a terminal for inputting a selection flag from the selection flag decoding unit 1109. Reference numeral 102 denotes a terminal for inputting a sub-block quantization parameter difference code (cu_qp_delta code 20009) from the decoding / separation unit 1101 in FIG. Reference numeral 103 denotes a sub-block quantization parameter difference value decoding unit that receives and decodes a sub-block quantization parameter difference code and reproduces a difference value of the sub-block quantization parameter. Reference numeral 104 denotes a sub-block quantization parameter adding unit that adds the determined predicted value of the sub-block quantization parameter and the sub-block quantization parameter difference value to reproduce the sub-block quantization parameter. Reference numeral 105 denotes a terminal for outputting the reproduced sub-block quantization parameter to the block inverse quantization unit 1104 in FIG.

端子101から入力された選択フラグがセレクタ109に入力される。セレクタ109は、選択フラグが0であれば、量子化パラメータ保持部106を入力先とする。選択フラグが1であれば、量子化パラメータ予測値決定部108を入力先とする。   A selection flag input from the terminal 101 is input to the selector 109. If the selection flag is 0, the selector 109 uses the quantization parameter holding unit 106 as an input destination. If the selection flag is 1, the quantization parameter predicted value determination unit 108 is set as an input destination.

端子102から入力されたサブブロック量子化パラメータ差分値符号はサブブロック量子化パラメータ差分値復号部103に入力され、ゴロム符号の復号により、サブブロック量子化パラメータ差分値を再生し、サブブロック量子化パラメータ加算部104に入力する。サブブロック量子化パラメータ加算部104はセレクタ109を介して入力されるサブブロック量子化パラメータの予測値とサブブロック量子化パラメータ差分値を加算し、サブブロック量子化パラメータを再生する。再生されたサブブロック量子化パラメータは端子105から図6のブロック逆量子化部1104に出力される。また、再生されたサブブロック量子化パラメータは量子化パラメータ保持部106と量子化パラメータ保持部107に入力される。量子化パラメータ保持部106は常に前に復号されたサブブロックの量子化パラメータを保持している。量子化パラメータ保持部107は、実施形態1の図3の量子化パラメータ保持部4と同様に、復号の対象となるサブブロックの左側に存在する量子化パラメータを保持する。   The sub-block quantization parameter difference value code input from the terminal 102 is input to the sub-block quantization parameter difference value decoding unit 103, and the sub-block quantization parameter difference value is reproduced by decoding the Golomb code. Input to the parameter addition unit 104. The sub-block quantization parameter adding unit 104 adds the predicted value of the sub-block quantization parameter and the sub-block quantization parameter difference value input via the selector 109, and reproduces the sub-block quantization parameter. The reproduced sub-block quantization parameter is output from the terminal 105 to the block inverse quantization unit 1104 in FIG. The reproduced sub-block quantization parameter is input to the quantization parameter holding unit 106 and the quantization parameter holding unit 107. The quantization parameter holding unit 106 always holds the quantization parameter of the sub-block decoded previously. The quantization parameter holding unit 107 holds the quantization parameter existing on the left side of the sub-block to be decoded, similarly to the quantization parameter holding unit 4 in FIG. 3 of the first embodiment.

量子化パラメータ予測値決定部108は端子100からサブブロックの分割情報を入力する。また、量子化パラメータ保持部106からブロックの符号化の順に復号したサブブロックの量子化パラメータと、量子化パラメータ保持部107から周囲の(本実施形態では左)サブブロックの量子化パラメータを入力する。分割情報に従って、当該サブブロックの左上隅の画素が接する位置のサブブロックの量子化パラメータを予測値とする。もし、左側に該当するサブブロックがない場合は、量子化パラメータ保持部106のブロックの符号化の順に復号したサブブロックの量子化パラメータを予測値とする。   The quantization parameter predicted value determination unit 108 inputs sub-block division information from the terminal 100. Further, the quantization parameter of the sub-block decoded from the quantization parameter holding unit 106 in the order of the block coding, and the quantization parameter of the surrounding (left in this embodiment) sub-block are input from the quantization parameter holding unit 107. . According to the division information, the quantization parameter of the sub-block at the position where the pixel at the upper left corner of the sub-block touches is used as the predicted value. If there is no corresponding sub-block on the left side, the quantization parameter of the sub-block decoded in the order of coding of the block in the quantization parameter holding unit 106 is set as the predicted value.

セレクタ109は選択フラグが0の時、すなわち、復号する順にサブブロックの量子化パラメータの予測値を決定する場合は、量子化パラメータ保持部106を入力先とする。選択フラグが0の時、すなわち、周囲のサブブロックから量子化パラメータを決定する場合は量子化パラメータ予測値決定部108を入力先とする。   When the selection flag is 0, that is, when the prediction value of the quantization parameter of the sub-block is determined in the decoding order, the selector 109 uses the quantization parameter holding unit 106 as an input destination. When the selection flag is 0, that is, when the quantization parameter is determined from the surrounding sub-blocks, the quantization parameter prediction value determination unit 108 is set as the input destination.

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

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

まず、ステップS101にて、復号・分離部1101がヘッダ情報を復号する。ステップS102にて、qp_delta_select_flag符号20005を選択フラグ復号部1109で復号する。
ステップS103にて、サブブロック量子化パラメータ復号部103はサブブロック量子化パラメータ差分値符号化データを復号し、サブブロック量子化パラメータ差分値を再生する。
ステップS102で復号して得られた選択フラグが復号する順に量子化パラメータの予測を行うモード(処理時間の遅延が少ない符号化)を選択したか否かを判定する。もし、復号する順に量子化パラメータの予測を行うモード(選択フラグが0)を選択していれば、ステップS105に進み、そうでなければステップS106に進む。
ステップS105にて、ブロックの符号化の順に復号したサブブロックの量子化パラメータを予測値として決定する。
ステップS106にて、復号するサブブロックの周囲(本実施形態では左隣)または、ブロックの符号化の順に符号化されたサブブロックの量子化パラメータを予測値として決定する。
ステップS107にて、ステップS105またはステップS106にて得られた量子化パラメータの予測値とステップS103で得られた差分値を加算し、サブブロック量子化パラメータを再生する。
ステップS108にて、サブブロックの量子化係数符号データを復号し、量子化係数を再生し、逆量子化、逆直交変換を行い、予測誤差を再生する。さらに復号済みの周囲の画素データまたは前のフレームの画素データから予測を行い、サブブロックの復号画像を再生する。
ステップS109にて、サブブロックの復号画像を基本ブロックの復号画像に配置する。ステップS110にて、画像復号装置は、当該基本ブロック内の全てのサブブロックの復号が終了したか否かの判定を行い、終了していればステップS111に進み、終了していなければ次のサブブロックを対象としてステップS103に戻る。
ステップS111にて、基本ブロックの復号画像をフレームの復号画像に配置する。ステップS112にて、画像復号装置は、全ての基本ブロックの復号が終了したか否かの判定を行い、終了していれば全ての動作を停止して処理を終了し、そうでなければ次の基本ブロックを対象としてステップS103に戻る。
First, in step S101, the decoding / separating unit 1101 decodes the header information. In step S102, the selection flag decoding unit 1109 decodes the qp_delta_select_flag code 20005.
In step S103, the sub-block quantization parameter decoding unit 103 decodes the sub-block quantization parameter difference value encoded data and reproduces the sub-block quantization parameter difference value.
It is determined whether or not a mode (encoding with a small processing time delay) in which quantization parameters are predicted in the order of decoding by the selection flag obtained by decoding in step S102 is selected. If the mode for selecting the quantization parameter (selection flag is 0) is selected in the decoding order, the process proceeds to step S105, and if not, the process proceeds to step S106.
In step S105, the quantization parameter of the sub-block decoded in the order of block coding is determined as a predicted value.
In step S106, the quantization parameter of the sub-block encoded around the sub-block to be decoded (in the present embodiment, on the left side) or in the coding order of the block is determined as a predicted value.
In step S107, the predicted value of the quantization parameter obtained in step S105 or step S106 and the difference value obtained in step S103 are added to reproduce the sub-block quantization parameter.
In step S108, the quantization coefficient code data of the sub-block is decoded, the quantization coefficient is reproduced, inverse quantization and inverse orthogonal transformation are performed, and the prediction error is reproduced. Further, prediction is performed from the decoded surrounding pixel data or the pixel data of the previous frame, and the decoded image of the sub-block is reproduced.
In step S109, the decoded image of the sub-block is arranged in the decoded image of the basic block. In step S110, the image decoding apparatus determines whether or not the decoding of all the subblocks in the basic block has been completed. If the decoding has been completed, the process proceeds to step S111. Return to step S103 for the block.
In step S111, the decoded image of the basic block is arranged in the decoded image of the frame. In step S112, the image decoding apparatus determines whether or not the decoding of all the basic blocks has been completed. If the decoding has been completed, the image decoding apparatus stops all the operations and ends the process. The process returns to step S103 for the basic block.

以上の構成と動作により、実施形態1で生成された、用途ごとに異なるビットストリームの復号を行い、再生画像を得ることができる。   With the above configuration and operation, it is possible to decode a different bitstream generated according to the first embodiment and obtain a reproduced image.

また、実施形態1と同様にブロックのサイズ、処理ユニットのサイズ、参照する処理ユニットとその画素の配置、符号についてはこれに限定されない。さらに、復号する順ではない場合の量子化パラメータの参照についてもこれに限定されない。
なお、本実施形態でサブブロック量子化パラメータ、サブブロック量子化パラメータ差分値および量子化係数の復号にゴロム符号化を用いて説明したが、これに限定されない。例えばハフマン符号化やその他の算術符号化であってももちろん構わない。
Further, as in the first embodiment, the block size, the processing unit size, the arrangement of reference processing units and their pixels, and the codes are not limited thereto. Furthermore, the reference of the quantization parameter when the decoding order is not used is not limited to this.
Although the present embodiment has been described using Golomb coding for decoding the sub-block quantization parameter, the sub-block quantization parameter difference value, and the quantization coefficient, the present invention is not limited to this. For example, Huffman coding or other arithmetic coding may be used.

<実施形態3>
本実施形態では符号化装置は実施形態1の図1と同じ構成をとる。ただし、量子化パラメータ符号化部11008の構成が異なる。
<Embodiment 3>
In this embodiment, the encoding apparatus has the same configuration as that of FIG. However, the configuration of the quantization parameter encoding unit 11008 is different.

図9は本実施形態の量子化パラメータ符号化部11008の詳細な構成を示すブロック図である。図9において、実施形態1の図1と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 9 is a block diagram showing a detailed configuration of the quantization parameter encoding unit 11008 of this embodiment. In FIG. 9, the same numbers are assigned to portions that perform the same functions as those in FIG. 1 of the first embodiment, and description thereof is omitted.

200は端子1から入力されるサブブロックの分割情報を入力し、符号化するサブブロックがフレームやスライスの端部か否かを判定する端部判定部である。端部判定部200は当該サブブロックが端部に位置するのであれば端部判定信号として1をそうでなければ0を出力する。
201は量子化パラメータ保持部4に格納された各サブブロックの量子化パラメータから符号化するサブブロックの量子化パラメータの予測値を決定するサブブロック量子化パラメータ予測値決定部である。すなわち、符号化処理を行うサブブロックの周囲(本実施形態では左)のサブブロックの量子化パラメータを参照して予測値を決定する。
202は符号化されたサブブロックの量子化パラメータを格納する量子化パラメータ保持部である。量子化パラメータ保持部202は量子化パラメータ保持部107から順に量子化パラメータを受け取る。これにより、符号化されたサブブロックの量子化パラメータを符号化対象のサブブロックの上のサブブロックまでの量子化パラメータを保持する。
203は量子化パラメータ保持部202に格納された各サブブロックの量子化パラメータから符号化するサブブロックの量子化パラメータの予測値を決定する端部量子化パラメータ予測値決定部である。すなわち、サブブロックがフレームやスライスの左端にあたる場合、符号化処理を行うサブブロックの上側のサブブロックの量子化パラメータを参照して予測値を決定する。
204はセレクタであり、実施形態1の図3のセレクタ9と同様に端子6から入力される選択フラグによって入力先を選択する。選択フラグが0であれば、量子化パラメータ保持部3を入力先に選択する。選択フラグが1であれば、端部量子化パラメータ予測値決定部203を入力先に選択する。
205もセレクタであり、端部判定部200からの端部判定信号に基づいて入力先を選択する。端部判定信号が0であれば、セレクタ204を、そうでなければ量子化パラメータ予測値決定部201を入力先として選択する。
Reference numeral 200 denotes an edge determination unit that receives division information of a sub-block input from the terminal 1 and determines whether or not the sub-block to be encoded is an edge of a frame or a slice. The edge determination unit 200 outputs 1 as an edge determination signal if the subblock is located at the edge, and outputs 0 if not.
201 is a sub-block quantization parameter prediction value determination unit that determines a prediction value of a quantization parameter of a sub-block to be encoded from the quantization parameter of each sub-block stored in the quantization parameter holding unit 4. That is, the prediction value is determined with reference to the quantization parameter of the sub-block around the sub-block to be encoded (left in this embodiment).
Reference numeral 202 denotes a quantization parameter holding unit that stores the quantization parameter of the encoded sub-block. The quantization parameter holding unit 202 receives the quantization parameters in order from the quantization parameter holding unit 107. As a result, the quantization parameters of the encoded sub-block are retained up to the sub-block above the sub-block to be encoded.
Reference numeral 203 denotes an end quantization parameter prediction value determination unit that determines the prediction value of the quantization parameter of the subblock to be encoded from the quantization parameter of each subblock stored in the quantization parameter holding unit 202. That is, when a subblock corresponds to the left end of a frame or a slice, a prediction value is determined with reference to the quantization parameter of the upper subblock of the subblock to be encoded.
Reference numeral 204 denotes a selector, which selects an input destination by a selection flag input from the terminal 6 in the same manner as the selector 9 in FIG. If the selection flag is 0, the quantization parameter holding unit 3 is selected as the input destination. If the selection flag is 1, the end quantization parameter prediction value determination unit 203 is selected as an input destination.
Reference numeral 205 denotes a selector that selects an input destination based on an end determination signal from the end determination unit 200. If the edge determination signal is 0, the selector 204 is selected as the input destination, and if not, the quantization parameter predicted value determination unit 201 is selected as the input destination.

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

図9に移り、実施形態1と同様に選択フラグ符号化部7は入力された選択フラグを符号化してqp_delta_select_flag符号を端子8から出力する。また、セレクタ204は選択フラグが0であれば、量子化パラメータ保持部3の出力を、そうでなければ、端部量子化パラメータ予測値決定部203の出力を入力として選択する。量子化パラメータ保持部2は端子1から入力されるサブブロック量子化パラメータを格納する。   9, the selection flag encoding unit 7 encodes the input selection flag and outputs a qp_delta_select_flag code from the terminal 8 as in the first embodiment. If the selection flag is 0, the selector 204 selects the output of the quantization parameter holding unit 3 as an input, and otherwise selects the output of the end quantization parameter predicted value determination unit 203 as an input. The quantization parameter holding unit 2 stores a sub-block quantization parameter input from the terminal 1.

これと並行して、量子化パラメータ予測値決定部201は量子化パラメータ保持部4から周囲(本実施形態では左)のサブブロックの量子化パラメータから当該サブブロックの量子化パラメータ予測値を決定する。量子化パラメータ保持部4を参照し、当該サブブロックの左上隅の画素が接する位置のサブブロックの量子化パラメータを予測値と決定する。
また、端部量子化パラメータ予測値決定部202は量子化パラメータ保持部202から周囲(本実施形態では上)のサブブロックの量子化パラメータから当該サブブロックの量子化パラメータ予測値を決定する。量子化パラメータ保持部202を参照し、当該サブブロックの左上隅の画素が接する位置のサブブロックの量子化パラメータを予測値と決定する。
量子化パラメータ保持部3はブロックの符号化の順に符号化した(例えば、直前に符号化された)サブブロックの量子化パラメータを予測値とする。
In parallel with this, the quantization parameter prediction value determination unit 201 determines the quantization parameter prediction value of the sub block from the quantization parameter of the surrounding sub block (left in the present embodiment) from the quantization parameter holding unit 4. . With reference to the quantization parameter holding unit 4, the quantization parameter of the sub-block at the position where the pixel at the upper left corner of the sub-block touches is determined as the predicted value.
Also, the end quantization parameter prediction value determination unit 202 determines the quantization parameter prediction value of the sub block from the quantization parameter of the surrounding (upper in the present embodiment) sub block from the quantization parameter holding unit 202. With reference to the quantization parameter holding unit 202, the quantization parameter of the sub-block at the position where the pixel in the upper left corner of the sub-block touches is determined as the predicted value.
The quantization parameter holding unit 3 uses the quantization parameter of the sub-block coded in the coding order of the blocks (for example, coded immediately before) as a predicted value.

セレクタ204は選択フラグが0であれば、復号する順に従って量子化パラメータの予測値を決定するので、量子化パラメータ保持部3の出力をセレクタ205に入力する。選択フラグが1であれば、符号化効率向上のため、符号化するサブブロックの左隣のサブブロックの量子化パラメータを予測値とする。このため、端部量子化パラメータ予測値決定部202の出力をセレクタ205に入力する。   If the selection flag is 0, the selector 204 determines the predicted value of the quantization parameter according to the decoding order, and therefore inputs the output of the quantization parameter holding unit 3 to the selector 205. If the selection flag is 1, the quantization parameter of the sub-block adjacent to the left of the sub-block to be encoded is used as the predicted value in order to improve the encoding efficiency. For this reason, the output of the end quantization parameter predicted value determination unit 202 is input to the selector 205.

一方、端部判定部200は入力された分割情報と処理の進捗から符号化するサブブロックがフレームまたはスライスの端部に位置するかどうかを判定して端部判定信号を生成する。   On the other hand, the edge determination unit 200 determines whether the sub-block to be encoded is located at the edge of the frame or the slice based on the input division information and the progress of the process, and generates an edge determination signal.

セレクタ205は端部判定信号が0であれば、処理するサブブロックは端部ではないと判定し、量子化パラメータ予測値決定部201を入力先に選択する。この時、符号化するサブブロックの左隣の量子化パラメータが予測値となり、サブブロック量子化パラメータ差分部10に入力される。また、端部判定信号が1であれば、処理するサブブロックは端部であると判定し、セレクタ204を入力先に選択する。この時、選択フラグが0であれば、復号する順に選択された量子化パラメータが、1であれば、符号化するサブブロックの直上の量子化パラメータが予測値となり、サブブロック量子化パラメータ差分部10に入力される。以下、実施形態1と同様に差分値を求め、符号化されて、サブブロック量子化パラメータ差分符号であるcu_qp_delta符号を端子12から出力する。   If the edge determination signal is 0, the selector 205 determines that the sub-block to be processed is not an edge, and selects the quantization parameter prediction value determination unit 201 as an input destination. At this time, the quantization parameter on the left of the sub-block to be encoded becomes a predicted value and is input to the sub-block quantization parameter difference unit 10. If the edge determination signal is 1, it is determined that the sub-block to be processed is an edge, and the selector 204 is selected as the input destination. At this time, if the selection flag is 0, if the quantization parameter selected in the decoding order is 1, the quantization parameter immediately above the sub-block to be encoded becomes the predicted value, and the sub-block quantization parameter difference unit 10 is input. Thereafter, the difference value is obtained and encoded in the same manner as in the first embodiment, and a cu_qp_delta code that is a sub-block quantization parameter difference code is output from the terminal 12.

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

ステップS001からステップS006にて、実施形態1と同様に量子化パラメータの予測方法を選択し、選択モードを決定して、ヘッダ情報とともに符号化する。フレームを基本ブロックに分割し、さらにサブブロックに分割する。さらにそれぞれのサブブロックの量子化パラメータを決定する。   In step S001 to step S006, a quantization parameter prediction method is selected as in the first embodiment, a selection mode is determined, and encoding is performed together with header information. The frame is divided into basic blocks and further divided into sub-blocks. Further, the quantization parameter of each sub-block is determined.

ステップS200にて、サブブロックの分割情報から符号化するサブブロックがフレームやスライスの端部にあるか否かを判定する。すなわち、符号化するサブブロックの左隣に符号化済みの参照可能なサブブロックが存在するか否かを判定する。存在するならばステップS009に進む。そうでなければステップS201に進む。
ステップS201にて、実施形態1の図4のステップS007と同様に選択フラグが0であれば、ステップS008に進み、そうでなければステップS202に進む。
ステップS202にて、符号化対象のサブブロックの左上隅の画素が接する直上のサブブロックの量子化パラメータを予測値とする。符号化対象のサブブロックがフレームまたはスライスの左上に存在する場合、予測値はスライスで指定された量子化パラメータとするがこれに限定されない
以後、ステップS010からステップS013を行い、サブブロック量子化パラメータの差分値の算出と符号化、サブブロックの予測誤差の符号化と再生画像の生成を全てのサブブロック、基本ブロックに対して行う。
In step S200, it is determined whether or not the subblock to be encoded is located at the end of the frame or slice from the subblock division information. That is, it is determined whether there is an encoded reference sub-block on the left side of the sub-block to be encoded. If it exists, the process proceeds to step S009. Otherwise, the process proceeds to step S201.
In step S201, if the selection flag is 0 as in step S007 of FIG. 4 of the first embodiment, the process proceeds to step S008, and if not, the process proceeds to step S202.
In step S202, the quantization parameter of the sub block immediately above which the pixel at the upper left corner of the sub block to be encoded touches is set as a predicted value. If the sub-block to be encoded exists in the upper left of the frame or slice, the prediction value is the quantization parameter specified in the slice, but is not limited to this. Thereafter, Step S010 to Step S013 are performed, and the sub-block quantization parameter is set. Difference values are calculated and encoded, sub-block prediction errors are encoded, and reproduced images are generated for all sub-blocks and basic blocks.

量子化パラメータの予測に関して図2(g)を用いて説明を加える。図2(e)の実施形態1で用いた予測と比較して、サブブロック1006とサブブロック1008の予測が異なる。選択フラグが0であれば、復号する順の予測が行われるため、実施形態1と同様に端部のこれらのサブブロックは符号順で予測される。選択フラグが1であれば、これらのサブブロックは端部量子化パラメータの予測決定部202からの出力で予測する。すなわち、隣接する直上のサブブロックの量子化パラメータから予測を行い、図2(g)のようになる。   The quantization parameter prediction will be described with reference to FIG. Compared with the prediction used in Embodiment 1 of FIG. 2E, the prediction of the sub-block 1006 and the sub-block 1008 is different. If the selection flag is 0, since the decoding order is predicted, these sub-blocks at the end are predicted in the code order as in the first embodiment. If the selection flag is 1, these sub-blocks are predicted by the output from the end quantization parameter prediction determination unit 202. That is, prediction is performed from the quantization parameter of the adjacent sub-block immediately above, as shown in FIG.

以上の構成と動作により、端部においても復号する順に量子化パラメータを予測するか周囲の参照できる量子化パラメータから予測するかを選択することにより、端部でも処理時間の遅延を優先するか、符号化効率を優先するか選択できる効果がある。   With the above configuration and operation, by selecting whether to predict the quantization parameter in the decoding order in the end portion or predicting from the quantization parameter that can be referred to in the vicinity, priority is given to the delay of the processing time at the end portion, There is an effect that it is possible to select whether to give priority to the encoding efficiency.

なお、実施形態1の図4のステップS009では左隣に参照するサブブロックがない場合は復号する順に予測を行う方法で説明したが、これの代わりに図10のステップS201、ステップS008、ステップS202を用いてももちろん構わない。
なお、本実施形態で基本ブロック量子化パラメータ、サブブロック量子化パラメータ差分値および量子化係数の符号化にゴロム符号化を用いて説明したが、これに限定されない。例えばハフマン符号化やその他の算術符号化であってももちろん構わない。
Note that, in step S009 of FIG. 4 of the first exemplary embodiment, the method of performing prediction in the decoding order when there is no sub-block to be referred to on the left is described, but instead of this, steps S201, S008, and S202 of FIG. Of course you can use.
In the present embodiment, the basic block quantization parameter, the sub-block quantization parameter difference value, and the quantization coefficient are encoded using Golomb coding. However, the present invention is not limited to this. For example, Huffman coding or other arithmetic coding may be used.

<実施形態4>
本実施形態では符号化装置は実施形態2の図6と同じ構成をとる。ただし、量子化パラメータ復号部1102の構成が異なる。本実施形態では、実施形態3で生成された符号化データの復号を例にとって説明する。
<Embodiment 4>
In the present embodiment, the encoding apparatus has the same configuration as that of FIG. However, the configuration of the quantization parameter decoding unit 1102 is different. In the present embodiment, a description will be given by taking the decoding of the encoded data generated in the third embodiment as an example.

図11は本実施形態の量子化パラメータ復号部1102の詳細な構成を示すブロック図である。図11において、実施形態2の図7と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。
図11において、300は復号対象となるサブブロックがフレームまたはスライスの端部にあるか否かを判定する端部判定部である。実施形態3の図7の端部判定部200と同様に動作し、端部判定信号を生成する。
FIG. 11 is a block diagram showing a detailed configuration of the quantization parameter decoding unit 1102 of this embodiment. In FIG. 11, the same numbers are assigned to portions that perform the same functions as those in FIG. 7 of the second embodiment, and description thereof is omitted.
In FIG. 11, reference numeral 300 denotes an end determination unit that determines whether or not a sub-block to be decoded is at the end of a frame or a slice. It operates in the same manner as the edge determination unit 200 in FIG. 7 of the third embodiment, and generates an edge determination signal.

301は量子化パラメータ保持部107に格納された各サブブロックの量子化パラメータから復号するサブブロックの量子化パラメータの予測値を決定するサブブロック量子化パラメータ予測値決定部である。すなわち、本実施形態では復号処理を行うサブブロックの左のサブブロックの量子化パラメータを参照して予測値を決定する。
302は復号されたサブブロックの量子化パラメータを格納する量子化パラメータ保持部である。量子化パラメータ保持部302は量子化パラメータ保持部107から順に量子化パラメータを受け取る。これにより、復号されたサブブロックの量子化パラメータを復号対象のサブブロックの上のサブブロックまでの量子化パラメータを保持する。
303は量子化パラメータ保持部302に格納された各サブブロックの量子化パラメータから復号するサブブロックの量子化パラメータの予測値を決定する端部量子化パラメータ予測値決定部である。すなわち、復号処理を行うサブブロックの上のサブブロックの量子化パラメータを参照して予測値を決定する。
304はセレクタであり、実施形態2の図7のセレクタ109と同様に端子101から入力される選択フラグによって入力先を選択する。選択フラグが0であれば、量子化パラメータ保持部106を入力先に選択する。選択フラグが1であれば、端部量子化パラメータ予測値決定部303を入力先に選択する。
305もセレクタであり、端部判定部300からの端部判定信号に基づいて入力先を選択する。端部判定信号が0であれば、セレクタ304を、そうでなければ量子化パラメータ予測値決定部301を入力先として選択する。
Reference numeral 301 denotes a sub-block quantization parameter prediction value determination unit that determines a prediction value of a quantization parameter of a sub-block to be decoded from the quantization parameter of each sub-block stored in the quantization parameter holding unit 107. That is, in this embodiment, the prediction value is determined with reference to the quantization parameter of the left sub-block of the sub-block to be decoded.
Reference numeral 302 denotes a quantization parameter holding unit that stores the quantization parameter of the decoded sub-block. The quantization parameter holding unit 302 receives the quantization parameters in order from the quantization parameter holding unit 107. As a result, the quantization parameters of the decoded sub-block are held up to the sub-block above the sub-block to be decoded.
Reference numeral 303 denotes an end quantization parameter prediction value determination unit that determines a prediction value of a quantization parameter of a subblock to be decoded from a quantization parameter of each subblock stored in the quantization parameter holding unit 302. That is, the prediction value is determined with reference to the quantization parameter of the sub-block above the sub-block to be decoded.
Reference numeral 304 denotes a selector, which selects an input destination by a selection flag input from the terminal 101 as in the selector 109 of FIG. 7 of the second embodiment. If the selection flag is 0, the quantization parameter holding unit 106 is selected as an input destination. If the selection flag is 1, the end quantization parameter prediction value determination unit 303 is selected as an input destination.
Reference numeral 305 denotes a selector that selects an input destination based on an end determination signal from the end determination unit 300. If the edge determination signal is 0, the selector 304 is selected as the input destination, and if not, the quantization parameter predicted value determination unit 301 is selected as the input destination.

上記画像復号装置における画像の復号動作を以下に説明する。実施形態2と同様に、端子100からサブブロックの分割情報、端子101から選択フラグ、端子102からサブブロックの量子化パラメータ差分値符号(cu_qp_delta符号)が入力される。
上記の構成において、端子102から入力されたサブブロックのサブブロック量子化パラメータ差分値符号はサブブロック量子化パラメータ差分値復号部103に入力され、ゴロム符号の復号により、サブブロック量子化パラメータ差分値を再生する。サブブロック量子化パラメータ加算部104はセレクタ305を介して入力されるサブブロック量子化パラメータの予測値とサブブロック量子化パラメータ差分値を加算し、サブブロック量子化パラメータを再生する。また、量子化パラメータ保持部106と量子化パラメータ保持部107に入力される。量子化パラメータ保持部302は量子化パラメータ保持部107から、今後符号化対象サブブロックの上になることがある量子化パラメータを入力し、格納する。
An image decoding operation in the image decoding apparatus will be described below. As in the second embodiment, subblock division information is input from the terminal 100, a selection flag is input from the terminal 101, and a quantization parameter difference value code (cu_qp_delta code) of the subblock is input from the terminal 102.
In the above configuration, the sub-block quantization parameter difference value code of the sub-block input from the terminal 102 is input to the sub-block quantization parameter difference value decoding unit 103, and the sub-block quantization parameter difference value is obtained by decoding the Golomb code. Play. The sub-block quantization parameter adding unit 104 adds the predicted value of the sub-block quantization parameter and the sub-block quantization parameter difference value input via the selector 305, and reproduces the sub-block quantization parameter. Also input to the quantization parameter holding unit 106 and the quantization parameter holding unit 107. The quantization parameter holding unit 302 receives from the quantization parameter holding unit 107 and stores the quantization parameter that may be on the sub-block to be encoded in the future.

実施形態2と同様に、量子化パラメータ保持部106は常に復号する順に前に復号されたサブブロックの量子化パラメータを保持している。量子化パラメータ保持部107は、復号の対象となるサブブロックの周囲(本実施形態では左)に存在する量子化パラメータを保持する。   Similar to the second embodiment, the quantization parameter holding unit 106 always holds the quantization parameters of the sub-blocks previously decoded in the decoding order. The quantization parameter holding unit 107 holds a quantization parameter existing around the sub-block to be decoded (left in the present embodiment).

量子化パラメータ予測値決定部303は量子化パラメータ保持部107から上にあるサブブロックの量子化パラメータを入力する。本実施形態では、当該サブブロックの左上隅の画素が接する位置のサブブロックの量子化パラメータを予測値とする。   The quantization parameter prediction value determination unit 303 inputs the quantization parameter of the upper sub-block from the quantization parameter holding unit 107. In the present embodiment, the quantization parameter of the sub-block at the position where the pixel at the upper left corner of the sub-block touches is used as the predicted value.

セレクタ304は選択フラグが0の時、すなわち、復号する順にサブブロックの量子化パラメータの予測値を決定する場合は、量子化パラメータ保持部106を入力先とする。選択フラグが0の時、すなわち、周囲のサブブロックから量子化パラメータを決定する場合は量子化パラメータ予測値決定部303を入力先とする。   When the selection flag is 0, that is, when the prediction value of the quantization parameter of the sub-block is determined in the decoding order, the selector 304 uses the quantization parameter holding unit 106 as an input destination. When the selection flag is 0, that is, when the quantization parameter is determined from the surrounding sub-blocks, the quantization parameter prediction value determination unit 303 is set as the input destination.

図12は、実施形態4に係る画像復号装置における画像復号処理を示すフローチャートである。図12において、実施形態2の図8と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 12 is a flowchart illustrating image decoding processing in the image decoding apparatus according to the fourth embodiment. In FIG. 12, the same numbers are assigned to portions that perform the same functions as those in FIG. 8 of the second embodiment, and description thereof is omitted.

ステップS101とステップS102によって、実施形態2と同様にヘッダ情報と量子化パラメータ予測方法を表す絵qp_delta_select_flag符号の復号を行う。ステップS103でcu_qp_delta符号を復号して、サブブロックの量子化パラメータの差分値を算出する。   In steps S101 and S102, the picture qp_delta_select_flag code representing the header information and the quantization parameter prediction method is decoded as in the second embodiment. In step S103, the cu_qp_delta code is decoded, and the difference value of the quantization parameter of the sub-block is calculated.

ステップS300にて、サブブロックの分割情報から復号するサブブロックがフレームやスライスの端部にあるか否かを判定する。すなわち、復号するサブブロックの左隣に符号化済みの参照可能なサブブロックが存在するか否かを判定する。存在するならばステップS106に進む。そうでなければステップS301に進む。
ステップS301にて、量子化パラメータ復号部1102は、実施形態1の図4のステップS007と同様に選択フラグが0であれば、ステップS105に進み、そうでなければステップS302に進む。
ステップS302にて、量子化パラメータ復号部1102は、符号化対象のサブブロックの左上隅の画素が接する直上のサブブロックの量子化パラメータを予測値とする。符号化対象のサブブロックがフレームまたはスライスの左上に存在する場合、予測値はスライスで指定された量子化パラメータとするが、これに限定されない。
以後、ステップS107からステップS112を行い、サブブロック量子化パラメータの再生、サブブロックの予測誤差の復号と再生画像の生成を全てのサブブロック、基本ブロックに対して行う。
In step S300, it is determined whether or not a sub-block to be decoded from the sub-block division information is at the end of the frame or slice. That is, it is determined whether or not an encoded referenceable sub-block exists on the left side of the sub-block to be decoded. If it exists, the process proceeds to step S106. Otherwise, the process proceeds to step S301.
In step S301, the quantization parameter decoding unit 1102 proceeds to step S105 if the selection flag is 0 as in step S007 of FIG. 4 of the first embodiment, otherwise proceeds to step S302.
In step S302, the quantization parameter decoding unit 1102 uses the quantization parameter of the sub block immediately above which the pixel in the upper left corner of the sub block to be encoded is in contact as a predicted value. When the sub-block to be encoded exists in the upper left of the frame or slice, the prediction value is a quantization parameter specified by the slice, but is not limited thereto.
Thereafter, Steps S107 to S112 are performed, and subblock quantization parameters are reproduced, subblock prediction errors are decoded, and reproduced images are generated for all subblocks and basic blocks.

以上の構成と動作により、実施形態3で生成した、端部においても復号する順に量子化パラメータを予測するか、周囲の参照できる量子化パラメータから予測するかを選択した符号化データを復号することができる。   With the above configuration and operation, decoding encoded data that is generated in the third embodiment and that selects whether to predict the quantization parameter in the decoding order at the end or from the quantization parameter that can be referred to in the surroundings is decoded. Can do.

なお、本実施形態で基本ブロック量子化パラメータ、サブブロック量子化パラメータ差分値および量子化係数の復号にゴロム符号化を用いて説明したが、これに限定されない。例えばハフマン符号化やその他の算術符号化であってももちろん構わない。なお、実施形態2の図8におけるステップS106では左隣に参照するサブブロックがない場合は復号する順に予測を行う方法で説明したが、これの代わりに図12のステップS301、ステップS105、ステップS302を用いてももちろん構わない。   In the present embodiment, the basic block quantization parameter, the sub-block quantization parameter difference value, and the quantization coefficient have been described using Golomb coding, but the present invention is not limited to this. For example, Huffman coding or other arithmetic coding may be used. Note that, in step S106 in FIG. 8 of the second embodiment, the method of performing prediction in the decoding order when there is no sub-block to be referred to on the left side has been described. Of course you can use.

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

11100はスライス単位で符号化モードを決定するスライス符号化モード決定部である。ここでは説明を簡単にするため、フレーム内符号化を行いイントラ符号化のモードと動き補償を行って符号化するインター符号化のモードを例にとる。11103はブロック予測部であり、スライスの符号化モードによって、イントラ予測か動き補償による予測を行う。11108は量子化パラメータ符号化部である。実施形態1の図1の量子化パラメータ符号化部11008とはスライス符号化モードを入力する点にある。   Reference numeral 11100 denotes a slice encoding mode determination unit that determines an encoding mode in units of slices. Here, for the sake of simplicity of explanation, an intra coding mode in which intra-frame coding is performed and an inter coding mode in which motion compensation is performed for coding are taken as an example. Reference numeral 11103 denotes a block prediction unit, which performs prediction by intra prediction or motion compensation according to the coding mode of the slice. Reference numeral 11108 denotes a quantization parameter encoding unit. The quantization parameter encoding unit 11008 in FIG. 1 of the first embodiment is that a slice encoding mode is input.

フレームの符号化に先立ち、スライス符号化モード決定部11100は当該フレームのスライスをイントラ符号化するかインター符号化するかを決定する。例えば、それまで入力されたフレームの枚数から、周期的にイントラ符号化モードを選択し、残りはインター符号化モードを選択することができる。決定されたスライス符号化モードは量子化パラメータ符号化部11108とブロック予測部11103に入力される。ブロック予測部11103ではスライスがイントラ予測を行う場合、そのイントラ予測を行ったモードも合わせて出力する。例えば、非特許文献1に記載の8つの予測モードを用いてもよい。この予測モードは量子化パラメータ符号化部11108に入力される。   Prior to frame encoding, the slice encoding mode determination unit 11100 determines whether a slice of the frame is intra-encoded or inter-encoded. For example, the intra coding mode can be selected periodically from the number of frames input so far, and the inter coding mode can be selected for the rest. The determined slice encoding mode is input to the quantization parameter encoding unit 11108 and the block prediction unit 11103. When the slice performs intra prediction in the block prediction unit 11103, the mode in which the intra prediction is performed is also output. For example, the eight prediction modes described in Non-Patent Document 1 may be used. This prediction mode is input to the quantization parameter encoding unit 11108.

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

400は図13のスライス符号化モード決定部11100からスライスの符号化モードを入力する端子である。401は端子400から入力されたスライスの符号化モードと端子6から入力される選択フラグからセレクタ9の入力先を選択する選択信号を生成する制御部である。402は端子であり、図13のブロック予測部11103から係数の予測に用いたられるイントラ予測モードを入力する。403は端子402から入力されたイントラ予測モードに従って周囲のサブブロックの量子化パラメータを選択する量子化パラメータ予測値決定部である。   Reference numeral 400 denotes a terminal for inputting a slice coding mode from the slice coding mode determination unit 11100 in FIG. A control unit 401 generates a selection signal for selecting the input destination of the selector 9 from the coding mode of the slice input from the terminal 400 and the selection flag input from the terminal 6. Reference numeral 402 denotes a terminal which inputs an intra prediction mode used for coefficient prediction from the block prediction unit 11103 in FIG. Reference numeral 403 denotes a quantization parameter prediction value determination unit that selects quantization parameters of surrounding sub-blocks according to the intra prediction mode input from the terminal 402.

処理に先駆け、選択フラグ符号化部7で入力された選択フラグを符号化してqp_delta_select_flag符号を端子8から出力する。   Prior to the processing, the selection flag input by the selection flag encoding unit 7 is encoded and a qp_delta_select_flag code is output from the terminal 8.

また、スライスの符号化の先頭で、スライスの符号化モードが端子400から制御部401に入力される。
制御部401は入力されたスライス符号化モードと選択フラグからセレクタ9の選択信号を生成する。すなわち、選択フラグが0であり、スライスの符号化モードがイントラ予測であれば、セレクタ9の入力先を量子化パラメータ保持部3とする。この時の制御信号は0となる。選択フラグが0であり、スライスの符号化モードがインター予測であれば、セレクタ9の入力先を量子化パラメータ保持部3とする。この時の制御信号は0となる。選択フラグが1であり、スライスの符号化モードがイントラ予測であれば、セレクタ9の入力先を量子化パラメータ予測値決定部403とする。この時の制御信号は1となる。選択フラグが1であり、スライスの符号化モードがインター予測であれば、セレクタ9の入力先を量子化パラメータ保持部3とする。この時の制御信号は0となる。
Also, at the beginning of the encoding of the slice, the encoding mode of the slice is input from the terminal 400 to the control unit 401.
The control unit 401 generates a selection signal for the selector 9 from the input slice encoding mode and the selection flag. That is, if the selection flag is 0 and the coding mode of the slice is intra prediction, the input destination of the selector 9 is set to the quantization parameter holding unit 3. The control signal at this time is 0. If the selection flag is 0 and the coding mode of the slice is inter prediction, the input destination of the selector 9 is the quantization parameter holding unit 3. The control signal at this time is 0. If the selection flag is 1 and the coding mode of the slice is intra prediction, the input destination of the selector 9 is the quantization parameter prediction value determination unit 403. The control signal at this time is 1. If the selection flag is 1 and the slice encoding mode is inter prediction, the input destination of the selector 9 is the quantization parameter holding unit 3. The control signal at this time is 0.

量子化パラメータ予測値決定部403は端子402から入力されたイントラ予測モードを入力する。非特許文献1に記載されているイントラ予測を行った場合、予測モードが0、3、5、7の場合は符号化対象のサブブロックの上に存在するサブブロックの量子化パラメータを参照する。予測モード1、6、8の場合は左に存在するサブブロックの量子化パラメータを参照する。予測モード2、4の場合は上と左のサブブロックの量子化パラメータの平均値を予測値に用いる。本実施形態では、予測モードと量子化パラメータの参照対象の組み合わせは上記の通りとするが、これに限定されない。   The quantization parameter prediction value determination unit 403 inputs the intra prediction mode input from the terminal 402. When intra prediction described in Non-Patent Document 1 is performed, when the prediction mode is 0, 3, 5, or 7, the quantization parameter of the sub-block existing on the sub-block to be encoded is referred to. For prediction modes 1, 6, and 8, reference is made to the quantization parameter of the sub-block present on the left. In the prediction modes 2 and 4, the average value of the quantization parameters of the upper and left sub-blocks is used as the prediction value. In the present embodiment, the combination of the prediction mode and the quantization parameter reference target is as described above, but is not limited to this.

セレクタ9は制御信号が0であれば、量子化パラメータ保持部3の出力を、そうでなければ、量子化パラメータ予測値決定部403の出力を入力として選択する。セレクタ9を介して得られた量子化パラメータはサブブロック量子化パラメータ差分部10と量子化パラメータ保持部3及び4に入力される。
セレクタ9は制御信号が0であれば、復号する順に従って量子化パラメータの予測値を決定するので、量子化パラメータ保持部3の出力をサブブロック量子化パラメータ差分部10に入力する。制御信号が1であれば、符号化効率向上のため、イントラ予測モードに従って、符号化するサブブロックの左隣または上のサブブロックの量子化パラメータを予測値とする。このため、サブブロック量子化パラメータ予測値決定部403の出力をサブブロック量子化パラメータ差分部10に入力する。
If the control signal is 0, the selector 9 selects the output of the quantization parameter holding unit 3 as an input, and otherwise selects the output of the quantization parameter predicted value determination unit 403 as an input. The quantization parameter obtained via the selector 9 is input to the sub-block quantization parameter difference unit 10 and the quantization parameter holding units 3 and 4.
If the control signal is 0, the selector 9 determines the prediction value of the quantization parameter according to the decoding order, and therefore inputs the output of the quantization parameter holding unit 3 to the sub-block quantization parameter difference unit 10. If the control signal is 1, in order to improve the coding efficiency, the quantization parameter of the sub-block adjacent to or above the sub-block to be coded is set as the predicted value according to the intra prediction mode. For this reason, the output of the sub-block quantization parameter prediction value determination unit 403 is input to the sub-block quantization parameter difference unit 10.

サブブロック量子化パラメータ差分部10は符号化するサブブロックの量子化パラメータを量子化パラメータ保持部2から読み出し、セレクタ9から入力された量子化パラメータ予測値を引き差分を サブブロック量子化パラメータ符号化部11に入力する。サブブロック量子化パラメータ符号化部11は入力された量子化パラメータ差分値をゴロム符号化してcu_qp_delta符号を端子12から出力する。   The sub-block quantization parameter difference unit 10 reads out the quantization parameter of the sub-block to be encoded from the quantization parameter holding unit 2, subtracts the quantization parameter prediction value input from the selector 9, and subtracts the difference into the sub-block quantization parameter encoding. Input to section 11. The sub-block quantization parameter encoding unit 11 performs Golomb encoding on the input quantization parameter difference value and outputs a cu_qp_delta code from the terminal 12.

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

ステップS001からステップS003にて、実施形態1と同様に量子化パラメータの予測方法を選択し、選択モードを決定して、ヘッダ情報とともに符号化する。
ステップS401にて、スライスモード決定部11100は、スライスの先頭でスライスの符号化モードを決定し、符号化を行い、slice_type符号を生成する。図5にスライスのヘッダの符号化データの様子を示す。slice_type符号20011はスライスヘッダに含まれる。
ステップS004からステップS006で、ブロック分割部11001は、フレームを基本ブロックに分割し、さらにサブブロックに分割する。さらにそれぞれのサブブロックの量子化パラメータを決定する。
ステップS402にて、量子化パラメータ符号化部11108は、スライス符号化モードがイントラ符号化モードかインター符号化モードかを判定する。イントラ符号化モードならばステップS403に進む。インター符号化モードでならばステップS008に進む。
ステップS403にて、量子化パラメータ符号化部11108は、実施形態1の図4のステップS007と同様に選択フラグが0であれば、ステップS008に進み、そうでなければステップS404に進む。
ステップS404にて、量子化パラメータ符号化部11108は、符号化対象のサブブロックのイントラ予測モードに従って周囲のサブブロックの量子化パラメータから予測値を決定する。
以後、ステップS010からステップS016を行い、サブブロック量子化パラメータの差分値の算出と符号化、サブブロックの予測誤差の符号化と再生画像の生成を全てのサブブロック、基本ブロック、スライスに対して行う。
In steps S001 to S003, a quantization parameter prediction method is selected in the same manner as in the first embodiment, a selection mode is determined, and encoding is performed together with header information.
In step S401, the slice mode determination unit 11100 determines the coding mode of the slice at the head of the slice, performs coding, and generates a slice_type code. FIG. 5 shows the state of the encoded data of the header of the slice. The slice_type code 20011 is included in the slice header.
In step S004 to step S006, the block dividing unit 11001 divides the frame into basic blocks and further divides them into sub-blocks. Further, the quantization parameter of each sub-block is determined.
In step S402, the quantization parameter encoding unit 11108 determines whether the slice encoding mode is an intra encoding mode or an inter encoding mode. If it is the intra coding mode, the process proceeds to step S403. If it is in the inter coding mode, the process proceeds to step S008.
In step S403, the quantization parameter encoding unit 11108 proceeds to step S008 if the selection flag is 0 as in step S007 of FIG. 4 of the first embodiment, and proceeds to step S404 otherwise.
In step S404, the quantization parameter encoding unit 11108 determines a prediction value from the quantization parameters of surrounding subblocks according to the intra prediction mode of the subblock to be encoded.
Thereafter, Steps S010 to S016 are performed to calculate and encode the difference value of the sub-block quantization parameter, encode the prediction error of the sub-block, and generate a reproduced image for all the sub-blocks, basic blocks, and slices. Do.

以上の構成と動作により、用途に適合した各サブブロック量子化パラメータの差分値を符号化ができるまた、インター符号化の場合、画像の構成と量子化パラメータの相関が低いため、復号する順に量子化パラメータの予測を行ってもよい。また、イントラ符号化の場合は画像の特性に合った量子化パラメータの予測を行うことができる。これらによって処理時間の遅延の減少と画質の向上の両方を行える効果もある。   With the above configuration and operation, the difference value of each sub-block quantization parameter suitable for the application can be encoded.In the case of inter encoding, since the correlation between the image configuration and the quantization parameter is low, the quantization order is increased. A prediction parameter may be predicted. In addition, in the case of intra coding, it is possible to predict a quantization parameter that matches the characteristics of an image. These also have the effect of reducing both the processing time delay and improving the image quality.

なお、本実施形態ではサブブロック量子化パラメータの予測にイントラ予測モードを用いたが、これに限定されず、実施形態1や実施形態2のよそくの方法やそれ以外の方法でも構わない。   In this embodiment, the intra prediction mode is used for the prediction of the sub-block quantization parameter. However, the present invention is not limited to this, and the method described in Embodiments 1 and 2 or other methods may be used.

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

本実施形態ではスライス単位で符号化モードを決定したが、これに限定されず、MPEG‐1、2、4のようにフレームやピクチャ単位で符号化モードを設定できる場合はこれを用いても構わない。さらに、細かな単位としてマクロブロック等の基本ブロック単位で用いてももちろん構わない。   In the present embodiment, the encoding mode is determined in units of slices, but the present invention is not limited to this. If the encoding mode can be set in units of frames or pictures as in MPEG-1, 2, 4, this may be used. Absent. Further, as a fine unit, it may of course be used in basic block units such as macroblocks.

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

1501はスライスの符号化タイプの符号化データ(slice_type符号)を復号するスライス符号化モード復号部である。1502は量子化パラメータ復号部であり、実施形態2の図6の量子化パラメータ復号部1102とはスライス符号化モードを入力する点が異なる。   Reference numeral 1501 denotes a slice coding mode decoding unit that decodes coded data (slice_type code) of a slice coding type. Reference numeral 1502 denotes a quantization parameter decoding unit, which is different from the quantization parameter decoding unit 1102 in FIG. 6 of the second embodiment in that a slice encoding mode is input.

図16において、端子1100から入力された1フレーム分のストリームデータは復号・分離部1101に入力され、画像を再生するのに必要なヘッダ情報が復号される。ヘッダに含まれるqp_delta_select_flag符号20005は選択フラグ復号部1109に入力され、量子化パラメータの再生を行う予測の方法を選択するフラグが再生される。選択フラグは量子化パラメータ復号部1502に入力される。   In FIG. 16, the stream data for one frame input from the terminal 1100 is input to the decoding / separating unit 1101, and header information necessary for reproducing an image is decoded. The qp_delta_select_flag code 20005 included in the header is input to the selection flag decoding unit 1109, and a flag for selecting a prediction method for reproducing the quantization parameter is reproduced. The selection flag is input to the quantization parameter decoding unit 1502.

さらに、スライスの先頭において、スライス符号化モードを表す符号(slice_type符号20011)がスライス符号化モード復号部1501に入力され、復号されてスライスの符号化モードが再生される。再生されたスライス符号化モードは量子化パラメータ復号部1502に入力される。   Furthermore, a code representing the slice coding mode (slice_type code 20011) is input to the slice coding mode decoding unit 1501 at the head of the slice, and is decoded to reproduce the coding mode of the slice. The reproduced slice encoding mode is input to the quantization parameter decoding unit 1502.

また、基本ブロック単位で分割情報(split_coding_flag符号20010)も復号・分離部1101で復号され、量子化パラメータ復号部1102に入力される。これに続くサブブロックごとにサブブロックの量子化パラメータ差分値符号(cu_qp_delta符号)ともに量子化パラメータ復号部1502に入力する。   Further, the division information (split_coding_flag code 20010) in units of basic blocks is also decoded by the decoding / separating unit 1101 and input to the quantization parameter decoding unit 1102. The sub-block quantization parameter difference value code (cu_qp_delta code) is input to the quantization parameter decoding unit 1502 for each subsequent sub-block.

図17は、本発明の実施形態6に係る量子化パラメータ復号部1502の構成を示すブロック図である。本実施形態では、実施形態5で生成された符号化データの復号を例にとって説明する。
図17において、実施形態2の図7と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。
FIG. 17 is a block diagram showing a configuration of a quantization parameter decoding unit 1502 according to Embodiment 6 of the present invention. In the present embodiment, a description will be given by taking the decoding of the encoded data generated in the fifth embodiment as an example.
In FIG. 17, the same numbers are assigned to portions that perform the same functions as those in FIG. 7 of the second embodiment, and description thereof is omitted.

501は端子であり、スライス符号化モード復号部1501で再生されたスライス符号化モードが入力される。502は端子501から入力されたスライスの符号化モードと端子101から入力される選択フラグからセレクタ109の入力先を選択する選択信号を生成する制御部である。503は端子402から入力されたイントラ予測モードに従って周囲のサブブロックの量子化パラメータを選択する量子化パラメータ予測値決定部である。   Reference numeral 501 denotes a terminal to which the slice coding mode reproduced by the slice coding mode decoding unit 1501 is input. A control unit 502 generates a selection signal for selecting the input destination of the selector 109 from the coding mode of the slice input from the terminal 501 and the selection flag input from the terminal 101. Reference numeral 503 denotes a quantization parameter prediction value determination unit that selects quantization parameters of surrounding sub-blocks according to the intra prediction mode input from the terminal 402.

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

スライス単位の復号処理に先立ち、スライスの符号化モードが端子501から制御部502に入力される。
制御部502は入力されたスライス符号化モードと選択フラグからセレクタ109の選択信号を生成する。すなわち、選択フラグが0であり、スライスの符号化モードがイントラ予測であれば、セレクタ9の入力先を量子化パラメータ保持部106とする。この時の制御信号は0となる。選択フラグが0であり、スライスの符号化モードがインター予測であれば、セレクタ109の入力先を量子化パラメータ保持部106とする。この時の制御信号は0となる。選択フラグが1であり、スライスの符号化モードがイントラ予測であれば、セレクタ109の入力先を量子化パラメータ予測値決定部503とする。この時の制御信号は1となる。選択フラグが1であり、スライスの符号化モードがインター予測であれば、セレクタ109の入力先を量子化パラメータ保持部106とする。この時の制御信号は0となる。
Prior to the decoding process in units of slices, the coding mode of the slice is input from the terminal 501 to the control unit 502.
The control unit 502 generates a selection signal for the selector 109 from the input slice encoding mode and the selection flag. That is, if the selection flag is 0 and the slice encoding mode is intra prediction, the input destination of the selector 9 is the quantization parameter holding unit 106. The control signal at this time is 0. If the selection flag is 0 and the slice encoding mode is inter prediction, the input destination of the selector 109 is set to the quantization parameter holding unit 106. The control signal at this time is 0. If the selection flag is 1 and the coding mode of the slice is intra prediction, the input destination of the selector 109 is the quantization parameter prediction value determination unit 503. The control signal at this time is 1. When the selection flag is 1 and the coding mode of the slice is inter prediction, the input destination of the selector 109 is the quantization parameter holding unit 106. The control signal at this time is 0.

量子化パラメータ予測値決定部503は端子501から入力されたイントラ予測モードを入力するイントラ予測を行った場合、予測モードが0、3、5、7の場合は符号化対象のサブブロックの上に存在するサブブロックの量子化パラメータを参照する。予測モード1、6、8の場合は左に存在するサブブロックの量子化パラメータを参照する。予測モード2、4の場合は上と左のサブブロックの量子化パラメータの平均値を予測値に用いる。本実施形態では予測モードと量子化パラメータの参照対象の組み合わせは上記の通りとするが、これに限定されない。   When the prediction parameter determination unit 503 performs intra prediction in which the intra prediction mode input from the terminal 501 is input, when the prediction mode is 0, 3, 5, or 7, the quantization parameter prediction value determination unit 503 is over the sub block to be encoded. Refer to the quantization parameter of an existing sub-block. For prediction modes 1, 6, and 8, reference is made to the quantization parameter of the sub-block present on the left. In the prediction modes 2 and 4, the average value of the quantization parameters of the upper and left sub-blocks is used as the prediction value. In the present embodiment, the combination of the reference target of the prediction mode and the quantization parameter is as described above, but is not limited to this.

セレクタ109を介して入力されたサブブロックの量子化パラメータの予測値はサブブロック量子化パラメータ加算部104に入力され、復号された差分値に加算されて量子化パラメータを再生する。再生された量子化パラメータは端子105からブロック逆量子化部1104に出力される。また、量子化パラメータ保持部106及び量子化パラメータ保持部107に入力され、以後のサブブロックの量子化の予測値算出に用いられる。   The prediction value of the quantization parameter of the sub-block input via the selector 109 is input to the sub-block quantization parameter adding unit 104, and added to the decoded difference value to reproduce the quantization parameter. The reproduced quantization parameter is output from the terminal 105 to the block inverse quantization unit 1104. Further, it is input to the quantization parameter holding unit 106 and the quantization parameter holding unit 107, and is used to calculate the predicted value of the subsequent sub-block quantization.

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

ステップS101からステップS102にて、復号分離部1101と選択フラグ復号部1109は、ヘッダ情報とそれに含まれるqp_delta_select_flag符号の復号を行う。
ステップS501にて、スライス復号化モード復号部1501は、スライスヘッダに含まれるslice_type符号を復号し、スライス符号化モードを取得する。
ステップS103からサブブロック単位での処理を行う。ステップS103にて、量子化パラメータ復号部1502は、量子化パラメータ差分値符号であるcu_qp_delta符号を復号し、量子化パラメータ差分値を再生する。
ステップS502にて、量子化パラメータ復号部1502は、スライス符号化モードがイントラ符号化モードかインター符号化モードかを判定する。イントラ符号化モードならばステップS503に進む。インター符号化モードでならばステップS105に進む。
ステップS503にて、量子化パラメータ復号部1502は、実施形態2の図8のステップS104と同様に判定し、選択フラグが0であれば、ステップS105に進み、そうでなければステップS504に進む。
ステップS504にて、量子化パラメータ復号部1502は、復号対象のサブブロックのイントラ予測モードに従って周囲のサブブロックの量子化パラメータから予測値を決定する。
In steps S101 to S102, the decoding / separating unit 1101 and the selection flag decoding unit 1109 decode the header information and the qp_delta_select_flag code included therein.
In step S501, the slice decoding mode decoding unit 1501 decodes the slice_type code included in the slice header, and acquires the slice encoding mode.
Processing is performed in units of sub-blocks from step S103. In step S103, the quantization parameter decoding unit 1502 decodes the cu_qp_delta code that is the quantization parameter difference value code, and reproduces the quantization parameter difference value.
In step S502, the quantization parameter decoding unit 1502 determines whether the slice coding mode is an intra coding mode or an inter coding mode. If it is the intra coding mode, the process proceeds to step S503. If it is in the inter coding mode, the process proceeds to step S105.
In step S503, the quantization parameter decoding unit 1502 determines in the same manner as in step S104 in FIG. 8 of the second embodiment. If the selection flag is 0, the process proceeds to step S105. Otherwise, the process proceeds to step S504.
In step S504, the quantization parameter decoding unit 1502 determines a prediction value from the quantization parameters of the surrounding subblocks according to the intra prediction mode of the subblock to be decoded.

以後、ステップS107からステップS113を行い、サブブロック量子化パラメータの差分値の再生、サブブロックの予測誤差の復号と再生画像の生成を全てのサブブロック、基本ブロック、スライスに対して行う。   Thereafter, Steps S107 to S113 are performed, and reproduction of subblock quantization parameter difference values, decoding of subblock prediction errors and generation of reproduced images are performed for all subblocks, basic blocks, and slices.

以上の構成と動作により、各サブブロック量子化パラメータの差分値を符号化ができるスライス等の符号化モードを参照して量子化パラメータの予測を適応的に変更して処理時間の遅延の減少と画質の向上の両方を行えるビットストリームを復号することができる。   With the above configuration and operation, the processing time delay can be reduced by adaptively changing the prediction of the quantization parameter with reference to the coding mode such as a slice that can encode the difference value of each sub-block quantization parameter. It is possible to decode a bitstream that can both improve image quality.

<実施形態7>
図19は本実施形態の画像符号化装置を示すブロック図である。図19において、実施形態5の図13と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。実施形態5の図13とは操作部11011が不要な点が異なる。14008は量子化パラメータ符号化部である。実施形態5の図13の量子化パラメータ符号化部11008とは選択フラグが入力されない点にある。
<Embodiment 7>
FIG. 19 is a block diagram showing an image encoding apparatus according to this embodiment. In FIG. 19, the same numbers are assigned to portions that perform the same functions as those in FIG. 13 of the fifth embodiment, and description thereof is omitted. 13 is different from FIG. 13 of the fifth embodiment in that the operation unit 11011 is unnecessary. Reference numeral 14008 denotes a quantization parameter encoding unit. The quantization parameter encoding unit 11008 of FIG. 13 in the fifth embodiment is that a selection flag is not input.

実施形態5と同様に、フレームの符号化に先立ち、スライス符号化モード決定部11100は当該フレームのスライスをイントラ符号化するかインター符号化するかを決定する。決定されたスライス符号化モードは量子化パラメータ符号化部14008とブロック予測部11103に入力される。   Similar to the fifth embodiment, prior to frame encoding, the slice encoding mode determination unit 11100 determines whether a slice of the frame is intra-encoded or inter-encoded. The determined slice coding mode is input to the quantization parameter coding unit 14008 and the block prediction unit 11103.

図20は本実施形態の量子化パラメータ符号化部14008の詳細な構成を示すブロック図である。図20において、実施形態5の図14と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。   FIG. 20 is a block diagram showing a detailed configuration of the quantization parameter encoding unit 14008 of this embodiment. In FIG. 20, the same numbers are assigned to portions that perform the same functions as those in FIG. 14 of the fifth embodiment, and the description thereof is omitted.

600はセレクタであり、端子400から入力されるスライス符号化モードによって入力先を切り替える。   Reference numeral 600 denotes a selector that switches the input destination according to the slice encoding mode input from the terminal 400.

実施形態5と同様に、量子化パラメータ決定部11002で決定された量子化パラメータが量子化パラメータ保持部2に格納される。   As in the fifth embodiment, the quantization parameter determined by the quantization parameter determination unit 11002 is stored in the quantization parameter holding unit 2.

端子400から入力されたスライス符号化モードはセレクタ600に入力される。スライスの符号化モードがイントラ予測であれば、セレクタ600の入力先を量子化パラメータ予測値決定部403とする。スライスの符号化モードがインター予測であれば、セレクタ600の入力先を量子化パラメータ保持部3とする。   The slice encoding mode input from the terminal 400 is input to the selector 600. If the coding mode of the slice is intra prediction, the input destination of the selector 600 is the quantization parameter prediction value determination unit 403. If the coding mode of the slice is inter prediction, the input destination of the selector 600 is the quantization parameter holding unit 3.

量子化パラメータ予測値決定部403は実施形態5と同様にイントラ予測モードに従って周囲のサブブロックの量子化パラメータから予測値を算出する。   The quantization parameter prediction value determination unit 403 calculates a prediction value from the quantization parameters of surrounding sub-blocks according to the intra prediction mode, as in the fifth embodiment.

セレクタ600を介して得られた量子化パラメータはサブブロック量子化パラメータ差分部10と量子化パラメータ保持部3及び4に入力される。量子化パラメータ保持部3及び4は以後のサブブロックの量子化パラメータの予測のために使われる。   The quantization parameter obtained via the selector 600 is input to the sub-block quantization parameter difference unit 10 and the quantization parameter holding units 3 and 4. The quantization parameter holding units 3 and 4 are used for the prediction of the quantization parameter of the subsequent sub-block.

以後、実施形態5と同様にサブブロック量子化パラメータ差分部10で量子化パラメータ差分値を算出し、サブブロック量子化パラメータ符号化部11で符号化し、cu_qp_delta符号を端子12から出力する。   Thereafter, as in the fifth embodiment, the sub-block quantization parameter difference unit 10 calculates the quantization parameter difference value, the sub-block quantization parameter encoding unit 11 encodes the cu_qp_delta code, and outputs the cu_qp_delta code from the terminal 12.

図21は、実施形態7に係る画像符号化装置における画像符号化処理を示すフローチャートである。図21において、実施形態5の図15と異なる点はステップS001、ステップS003、ステップS403が無い点である。   FIG. 21 is a flowchart illustrating image encoding processing in the image encoding device according to the seventh embodiment. 21 is different from FIG. 15 of the fifth embodiment in that step S001, step S003, and step S403 are not provided.

統合符号化部11009は、実施形態5と同様にステップS002でヘッダの符号化を行う。その後、各スライスの符号化処理を行う。ステップS401ではスライスの符号化モードの決定とその符号化を行う。   The integrated encoding unit 11009 encodes the header in step S002 as in the fifth embodiment. Thereafter, encoding processing of each slice is performed. In step S401, the encoding mode of the slice is determined and encoded.

ステップS004からステップS006でフレームを基本ブロックに分割し、さらにサブブロックに分割する。さらにそれぞれのサブブロックの量子化パラメータを決定する。
ステップS402にて、量子化パラメータ符号化部14008は、スライス符号化モードがイントラ符号化モードかインター符号化モードかを判定する。イントラ符号化モードならばステップS403に進む。インター符号化モードでならばステップS008に進む。
ステップS404にて、量子化パラメータ符号化部14008は、符号化対象のサブブロックのイントラ予測モードに従って周囲のサブブロックの量子化パラメータから予測値を決定する。
In steps S004 to S006, the frame is divided into basic blocks and further divided into sub-blocks. Further, the quantization parameter of each sub-block is determined.
In step S402, the quantization parameter encoding unit 14008 determines whether the slice encoding mode is an intra encoding mode or an inter encoding mode. If it is the intra coding mode, the process proceeds to step S403. If it is in the inter coding mode, the process proceeds to step S008.
In step S404, the quantization parameter encoding unit 14008 determines a prediction value from the quantization parameters of surrounding subblocks according to the intra prediction mode of the subblock to be encoded.

以後、ステップS010からステップS016を行い、サブブロック量子化パラメータの差分値の算出と符号化、サブブロックの予測誤差の符号化と再生画像の生成を全てのサブブロック、基本ブロック、スライスに対して行う。   Thereafter, Steps S010 to S016 are performed to calculate and encode the difference value of the sub-block quantization parameter, encode the prediction error of the sub-block, and generate a reproduced image for all the sub-blocks, basic blocks, and slices. Do.

図22に本実施形態で生成されたビットストリームの一例を示す。シーケンスヘッダ(Sequence Parameter Set)20001にqp_delta_select_flag符号20005が含まれていない。スライスの符号化モードを表す符号slice_type符号20011がスライスヘッダに含まれている。   FIG. 22 shows an example of the bit stream generated in this embodiment. The sequence header (Sequence Parameter Set) 20001 does not include the qp_delta_select_flag code 20005. A slice_type code 20011 representing the coding mode of the slice is included in the slice header.

以上の構成と動作により、符号化モードを選択フラグの代わりに用いることで、そのオーバーヘッドを削減できる。さらに、簡易な構成で各サブブロック量子化パラメータの差分値を符号化ができるスライス等の符号化モードを参照して量子化パラメータの予測を適応的に変更して処理時間の遅延の減少と画質の向上の両方を行うことができる。   With the above configuration and operation, the overhead can be reduced by using the encoding mode instead of the selection flag. Furthermore, the processing time delay and image quality can be reduced by adaptively changing the prediction of the quantization parameter by referring to a coding mode such as a slice that can encode the difference value of each sub-block quantization parameter with a simple configuration. Both can be improved.

本実施形態ではスライス単位で符号化モードを決定したが、これに限定されず、MPEG‐1、2、4のようにフレームやピクチャ単位で符号化モードを設定できる場合はこれを用いても構わない。さらに、細かな単位としてマクロブロック等の基本ブロック単位で用いてももちろん構わない。   In the present embodiment, the encoding mode is determined in units of slices, but the present invention is not limited to this. If the encoding mode can be set in units of frames or pictures as in MPEG-1, 2, 4, this may be used. Absent. Further, as a fine unit, it may of course be used in basic block units such as macroblocks.

<実施形態8>
図23は本実施形態の画像復号装置を示すブロック図である。図23において、実施形態6の図16と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。実施形態6の図16とは選択フラグ復号部1109が不要な点が異なる。また、本実施形態は実施形態7で生成されたビットストリーム(図22)を復号する。
<Embodiment 8>
FIG. 23 is a block diagram showing an image decoding apparatus according to this embodiment. In FIG. 23, parts having the same functions as those in FIG. 16 of the sixth embodiment are denoted by the same reference numerals and description thereof is omitted. It differs from FIG. 16 of Embodiment 6 in that the selection flag decoding unit 1109 is unnecessary. Further, the present embodiment decodes the bit stream (FIG. 22) generated in the seventh embodiment.

図23において、端子1100から入力された1フレーム分のストリームデータは復号・分離部1101に入力され、画像を再生するのに必要なヘッダ情報が復号される。   In FIG. 23, stream data for one frame input from a terminal 1100 is input to a decoding / separating unit 1101, and header information necessary for reproducing an image is decoded.

さらに、スライスの先頭において、スライス符号化モードを表す符号(slice_type符号20011)がスライス符号化モード復号部1501に入力され、復号されてスライスの符号化モードが再生される。再生されたスライス符号化モードは量子化パラメータ復号部1502に入力される。   Furthermore, a code representing the slice coding mode (slice_type code 20011) is input to the slice coding mode decoding unit 1501 at the head of the slice, and is decoded to reproduce the coding mode of the slice. The reproduced slice encoding mode is input to the quantization parameter decoding unit 1502.

また、基本ブロック単位で分割情報(split_coding_flag符号20010)も復号・分離部1101で復号され、量子化パラメータ復号部1102に入力される。これに続くサブブロックごとにサブブロックの量子化パラメータ差分値符号(cu_qp_delta符号)ともに量子化パラメータ復号部1502に入力する。   Further, the division information (split_coding_flag code 20010) in units of basic blocks is also decoded by the decoding / separating unit 1101 and input to the quantization parameter decoding unit 1102. The sub-block quantization parameter difference value code (cu_qp_delta code) is input to the quantization parameter decoding unit 1502 for each subsequent sub-block.

図24は、本発明の実施形態8に係る量子化パラメータ復号部1502の構成を示すブロック図である。本実施形態では、実施形態7で生成された符号化データの復号を例にとって説明する。
図24において、実施形態6の図17と同様の機能を果たす部分に関しては同じ番号を付与し、説明を省略する。600はセレクタであり、端子400から入力されるスライス符号化モードによって入力先を切り替える。
FIG. 24 is a block diagram showing a configuration of a quantization parameter decoding unit 1502 according to Embodiment 8 of the present invention. In the present embodiment, a description will be given by taking the decoding of the encoded data generated in the seventh embodiment as an example.
In FIG. 24, the same reference numerals are given to portions that perform the same functions as those in FIG. 17 of the sixth embodiment, and description thereof is omitted. Reference numeral 600 denotes a selector that switches the input destination according to the slice encoding mode input from the terminal 400.

実施形態5と同様に、スライス単位の復号処理に先立ち、スライスの符号化モードが端子501からセレクタ701に入力される。
セレクタ701は入力されたスライス符号化モードがイントラ予測であれば、入力先を量子化パラメータ予測値決定部503とする。スライスの符号化モードがインター予測であれば、入力先を量子化パラメータ保持部106とする。
Similar to the fifth embodiment, prior to the decoding process in units of slices, the coding mode of the slice is input from the terminal 501 to the selector 701.
When the input slice encoding mode is intra prediction, the selector 701 sets the input destination as the quantization parameter prediction value determination unit 503. If the coding mode of the slice is inter prediction, the input destination is the quantization parameter holding unit 106.

以下、実施形態6と同様に、量子化パラメータ予測値決定部503は端子501から入力されたイントラ予測モードに従って周囲のサブブロックの量子化パラメータから予測値を算出する。   Hereinafter, similarly to the sixth embodiment, the quantization parameter prediction value determination unit 503 calculates a prediction value from the quantization parameters of surrounding sub-blocks according to the intra prediction mode input from the terminal 501.

セレクタ701を介して入力されたサブブロックの量子化パラメータの予測値はサブブロック量子化パラメータ加算部104に入力され、復号された差分値に加算されて量子化パラメータを再生する。再生された量子化パラメータは端子105からブロック逆量子化部1104に出力される。また、量子化パラメータ保持部106及び量子化パラメータ保持部107に入力され、以後のサブブロックの量子化の予測値算出に用いられる。   The prediction value of the quantization parameter of the sub-block input via the selector 701 is input to the sub-block quantization parameter adding unit 104 and added to the decoded difference value to reproduce the quantization parameter. The reproduced quantization parameter is output from the terminal 105 to the block inverse quantization unit 1104. Further, it is input to the quantization parameter holding unit 106 and the quantization parameter holding unit 107, and is used to calculate the predicted value of the subsequent sub-block quantization.

図25は、実施形態6に係る画像復号装置における画像復号処理を示すフローチャートである。図25において、実施形態6の図18と異なる点はステップS002、ステップS503が無い点である。   FIG. 25 is a flowchart illustrating image decoding processing in the image decoding apparatus according to the sixth embodiment. 25 differs from FIG. 18 of the sixth embodiment in that there are no steps S002 and S503.

ステップS101にて、ヘッダ情報との復号を行う。ステップS501にて、スライス符号化モード復号部1501は、スライスヘッダに含まれるslice_type符号を復号し、スライス符号化モードを取得する。
ステップS103からサブブロック単位での処理を行う。ステップS103にて、量子化パラメータ復号部1502は、量子化パラメータ差分値符号であるcu_qp_delta符号を復号し、量子化パラメータ差分値を再生する。
ステップS502にて、量子化パラメータ復号部1502は、スライス符号化モードがイントラ符号化モードかインター符号化モードかを判定する。イントラ符号化モードならばステップS504に進む。インター符号化モードでならばステップS105に進む。
ステップS504にて、量子化パラメータ復号部1502は、復号対象のサブブロックのイントラ予測モードに従って周囲のサブブロックの量子化パラメータから予測値を決定する。
In step S101, the header information is decoded. In step S501, the slice encoding mode decoding unit 1501 decodes the slice_type code included in the slice header, and acquires the slice encoding mode.
Processing is performed in units of sub-blocks from step S103. In step S103, the quantization parameter decoding unit 1502 decodes the cu_qp_delta code that is the quantization parameter difference value code, and reproduces the quantization parameter difference value.
In step S502, the quantization parameter decoding unit 1502 determines whether the slice coding mode is an intra coding mode or an inter coding mode. If it is the intra coding mode, the process proceeds to step S504. If it is in the inter coding mode, the process proceeds to step S105.
In step S504, the quantization parameter decoding unit 1502 determines a prediction value from the quantization parameters of the surrounding subblocks according to the intra prediction mode of the subblock to be decoded.

以後、ステップS107からステップS113を行い、サブブロック量子化パラメータの差分値の再生、サブブロックの予測誤差の復号と再生画像の生成を全てのサブブロック、基本ブロック、スライスに対して行う。   Thereafter, Steps S107 to S113 are performed, and reproduction of subblock quantization parameter difference values, decoding of subblock prediction errors and generation of reproduced images are performed for all subblocks, basic blocks, and slices.

以上の構成と動作により、各サブブロック量子化パラメータの差分値を符号化ができるスライス等の符号化モードを参照して量子化パラメータの予測を適応的に変更して処理時間の遅延の減少と画質の向上の両方を行えるビットストリームを復号することができる。   With the above configuration and operation, the processing time delay can be reduced by adaptively changing the prediction of the quantization parameter with reference to the coding mode such as a slice that can encode the difference value of each sub-block quantization parameter. It is possible to decode a bitstream that can both improve image quality.

また、実施形態1から8において、選択フラグは0と1の値しか持たないように説明したが、これに限定されない。実施形態1、3、5の其々の符号化方法を切り替えらえるように複数ビットで表す値であってももちろん構わない。
本実施形態においてスライス単位の符号化モードに基づいて予測値を復号する順に求めるか、周囲のサブブロックの量子化パラメータからも求めるかを判定したが、基本ブロック単位で判定しても構わない。例えば、H.264のマクロブロックの符号化モードに基づいて判定しても構わない。
In the first to eighth embodiments, the selection flag is described as having only values of 0 and 1. However, the present invention is not limited to this. Of course, a value represented by a plurality of bits may be used so that the encoding methods of the first, third, and fifth embodiments can be switched.
In the present embodiment, it is determined whether the prediction values are obtained in the order of decoding based on the coding mode in units of slices or from the quantization parameters of the surrounding sub-blocks, but may be determined in units of basic blocks. For example, H.M. The determination may be made based on the encoding mode of H.264 macroblock.

<実施形態9>
図1、図3、図6、図7、図9、図11、図13、図14、図16、図17、図19、図20、図23、図24に示した各処理部はハードウェアでもって構成しているものとして上記実施形態では説明した。しかし、これらの図に示した各処理部で行なう処理をコンピュータプログラムでもって構成しても良い。
図26は、上記各実施形態に係る画像表示装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図である。
<Ninth Embodiment>
1, 3, 6, 7, 9, 11, 13, 14, 16, 17, 19, 20, 23, and 24 are hardware components. It has been described in the above embodiment as being configured. However, the processing performed by each processing unit shown in these figures may be configured by a computer program.
FIG. 26 is a block diagram illustrating a configuration example of computer hardware applicable to the image display device according to each of the above embodiments.

CPU1401は、RAM1402やROM1403に格納されているコンピュータプログラムやデータを用いてコンピュータ全体の制御を行うと共に、上記各実施形態に係る画像処理装置が行うものとして上述した各処理を実行する。即ち、CPU1401は、図1、図3、図6、図7、図9、図11、図13、図14、図16、図17、図19、図20、図23、図24に示した各処理部として機能することになる。
RAM1402は、外部記憶装置1406からロードされたコンピュータプログラムやデータ、I/F(インターフェース)1409を介して外部から取得したデータなどを一時的に記憶するためのエリアを有する。更に、RAM1402は、CPU1401が各種の処理を実行する際に用いるワークエリアを有する。即ち、RAM1402は、例えば、フレームメモリとして割当てたり、その他の各種のエリアを適宜提供することができる。
ROM1403には、本コンピュータの設定データや、ブートプログラムなどが格納されている。操作部1404は、キーボードやマウスなどにより構成されており、本コンピュータのユーザが操作することで、各種の指示をCPU1401に対して入力することができる。表示部1405は、CPU1401による処理結果を表示する。また表示部1405は例えば液晶ディスプレイのようなホールド型の表示装置や、フィールドエミッションタイプの表示装置のようなインパルス型の表示装置で構成される。
The CPU 1401 controls the entire computer using computer programs and data stored in the RAM 1402 and the ROM 1403, and executes each process described above as performed by the image processing apparatus according to each of the above embodiments. That is, the CPU 1401 has the configurations shown in FIGS. 1, 3, 6, 7, 9, 11, 13, 14, 16, 17, 19, 20, 23, and 24. It will function as a processing unit.
The RAM 1402 has an area for temporarily storing computer programs and data loaded from the external storage device 1406, data acquired from the outside via an I / F (interface) 1409, and the like. Further, the RAM 1402 has a work area used when the CPU 1401 executes various processes. That is, the RAM 1402 can be allocated as, for example, a frame memory or can provide other various areas as appropriate.
The ROM 1403 stores setting data of the computer, a boot program, and the like. The operation unit 1404 is configured by a keyboard, a mouse, and the like, and can input various instructions to the CPU 1401 when operated by a user of the computer. A display unit 1405 displays a processing result by the CPU 1401. The display unit 1405 is configured by a hold type display device such as a liquid crystal display or an impulse type display device such as a field emission type display device.

外部記憶装置1406は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置1406には、OS(オペレーティングシステム)や、図1、図6、図13、図16、図19、図23に示した各部の機能をCPU1401に実現させるためのコンピュータプログラムが保存されている。更には、外部記憶装置1406には、処理対象としての各画像データが保存されていても良い。
外部記憶装置1406に保存されているコンピュータプログラムやデータは、CPU1401による制御に従って適宜RAM1402にロードされ、CPU1401による処理対象となる。I/F1407には、LANやインターネット等のネットワーク、投影装置や表示装置などの他の機器を接続することができ、本コンピュータはこのI/F1407を介して様々な情報を取得したり、送出したりすることができる。1408は上述の各部を繋ぐバスである。
上述の構成からなる作動は前述のフローチャートで説明した作動をCPU1401が中心となってその制御を行う。
The external storage device 1406 is a mass information storage device represented by a hard disk drive device. The external storage device 1406 stores an OS (operating system) and computer programs for causing the CPU 1401 to realize the functions of the respective units shown in FIGS. 1, 6, 13, 16, 19, and 23. Yes. Further, each image data as a processing target may be stored in the external storage device 1406.
Computer programs and data stored in the external storage device 1406 are appropriately loaded into the RAM 1402 under the control of the CPU 1401 and are processed by the CPU 1401. The I / F 1407 can be connected to a network such as a LAN or the Internet, and other devices such as a projection device and a display device. The computer can acquire and send various information via the I / F 1407. Can be. A bus 1408 connects the above-described units.
The operation having the above-described configuration is controlled by the CPU 1401 as the operation described in the above flowchart.

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

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

本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するコンピュータプログラムのコードが格納されることになる。
本実施形態においてスライス単位の符号化モードに基づいて予測値を復号する順に求めるか、周囲のサブブロックの量子化パラメータからも求めるかを判定したが、基本ブロック単位で判定しても構わない。例えば、H.264のマクロブロックの符号化モードでmb_type符号の復号結果に基づいて判定しても構わない。
When the present invention is applied to the above storage medium, the computer program code corresponding to the flowchart described above is stored in the storage medium.
In the present embodiment, it is determined whether the prediction values are obtained in the order of decoding based on the coding mode in units of slices or from the quantization parameters of the surrounding sub-blocks, but may be determined in units of basic blocks. For example, H.M. The determination may be made based on the decoding result of the mb_type code in the H.264 macroblock encoding mode.

Claims (16)

画像に含まれるブロックを符号化する画像符号化装置であって、
前記画像の符号化モード、前記ブロックの符号化モード、及び前記ブロックに含まれる処理対象のサブブロックの符号化モードのうち、少なくともいずれか1つを取得する取得手段と、
前記取得手段によって取得された符号化モードがイントラ予測モードである場合に、前記処理対象のサブブロックの量子化パラメータと、当該処理対象のサブブロックとの位置関係に基づく第1のサブブロックの量子化パラメータとの差分値を符号化し、前記取得手段によって取得された符号化モードがインター予測モードである場合に、前記処理対象のサブブロックの量子化パラメータと、前記処理対象のサブブロックとの符号化順序関係に基づく第2のサブブロックの量子化パラメータとの差分値を符号化する符号化手段と、
を有することを特徴とする画像符号化装置。
An image encoding device for encoding a block included in an image,
Obtaining means for obtaining at least one of the coding mode of the image, the coding mode of the block, and the coding mode of a processing target sub-block included in the block;
When the encoding mode acquired by the acquisition unit is an intra prediction mode, the quantization parameter of the first sub-block based on the quantization parameter of the sub-block to be processed and the positional relationship between the sub-block to be processed When the encoding mode acquired by the acquisition unit is an inter prediction mode, the quantization parameter of the processing target sub-block and the code of the processing target sub-block are encoded. Encoding means for encoding a difference value with the quantization parameter of the second sub-block based on the encoding order relationship;
An image encoding apparatus comprising:
前記第1のサブブロックは、前記処理対象のサブブロックに隣接する位置のサブブロックであることを特徴とする請求項1に記載の画像符号化装置。   The image coding apparatus according to claim 1, wherein the first sub-block is a sub-block at a position adjacent to the processing target sub-block. 前記第2のサブブロックは、前記処理対象のサブブロックの直前に符号化されたサブブロックであることを特徴とする請求項1又は請求項2に記載の画像符号化装置。   The image coding apparatus according to claim 1 or 2, wherein the second sub-block is a sub-block coded immediately before the sub-block to be processed. 前記符号化手段は、前記処理対象のサブブロックが前記ブロックの左端に位置する場合に、前記処理対象のサブブロックの量子化パラメータと、前記処理対象のサブブロックとの位置関係に基づく前記第1のサブブロックの量子化パラメータとの差分値を符号化することを特徴とする請求項1乃至請求項3のいずれか一項に記載の画像符号化装置。   The encoding means, when the processing target sub-block is located at the left end of the block, the first parameter based on the positional relationship between the quantization parameter of the processing target sub-block and the processing target sub-block. The image encoding device according to any one of claims 1 to 3, wherein a difference value with a quantization parameter of each sub-block is encoded. 前記符号化手段は、前記処理対象のサブブロックが前記ブロックの左端に位置する場合に、前記処理対象のサブブロックの量子化パラメータと、前記処理対象のサブブロックの上に位置する前記第1のサブブロックの量子化パラメータとの差分値を符号化することを特徴とする請求項1乃至請求項4のいずれか一項に記載の画像符号化装置。   The encoding means, when the sub-block to be processed is located at the left end of the block, the quantization parameter of the sub-block to be processed and the first sub-block located on the sub-block to be processed The image encoding device according to any one of claims 1 to 4, wherein a difference value with a quantization parameter of a sub-block is encoded. 前記符号化手段は、前記取得手段によって取得された符号化モードがイントラ予測モードである場合に、前記ブロックに含まれるサブブロックであって前記処理対象のサブブロックと隣接する位置のサブブロックのうち、前記画像のイントラ予測の方向に基づくサブブロックである前記第1のサブブロックと、前記処理対象のサブブロックとの差分値を符号化することを特徴とする請求項1乃至請求項5のいずれか一項に記載の画像符号化装置。   When the encoding mode acquired by the acquiring unit is an intra prediction mode, the encoding unit is a sub-block included in the block and is located among sub-blocks adjacent to the processing target sub-block. 6. The difference value between the first sub-block which is a sub-block based on the direction of intra prediction of the image and the sub-block to be processed is encoded. 6. The image encoding device according to claim 1. 画像に含まれるブロックを符号化したデータを復号する画像復号装置であって、前記ブロックに含まれる処理対象のサブブロックの量子化パラメータと所定のパラメータとの差分値に関する符号データを復号する復号手段と、
前記画像の符号化モード、前記ブロックの符号化モード、及び前記処理対象のサブブロックの符号化モードのうち、少なくともいずれか1つを取得する第1の取得手段と、前記第1の取得手段によって取得された符号化モードがイントラ予測モードである場合に、前記処理対象のサブブロックとの位置関係に基づく第1のサブブロックの量子化パラメータと、前記復号手段によって復号された差分値とを用いて、前記処理対象のサブブロックの量子化パラメータを取得し、
前記第1の取得手段によって取得された符号化モードがインター予測モードである場合に、前記処理対象のサブブロックとの符号化順序関係に基づく第2のサブブロックの量子化パラメータと、前記復号手段によって復号された差分値とを用いて、前記処理対象のサブブロックの量子化パラメータを取得する第2の取得手段と、
を有することを特徴とする画像復号装置。
An image decoding apparatus for decoding data obtained by encoding a block included in an image, and decoding means for decoding code data related to a difference value between a quantization parameter of a processing target sub-block included in the block and a predetermined parameter When,
A first acquisition unit that acquires at least one of the encoding mode of the image, the encoding mode of the block, and the encoding mode of the sub-block to be processed; and the first acquisition unit. When the acquired encoding mode is the intra prediction mode, the quantization parameter of the first sub-block based on the positional relationship with the sub-block to be processed and the difference value decoded by the decoding unit are used. To obtain the quantization parameter of the processing target sub-block,
When the encoding mode acquired by the first acquisition unit is an inter prediction mode, the quantization parameter of the second sub-block based on the encoding order relationship with the sub-block to be processed, and the decoding unit Second acquisition means for acquiring a quantization parameter of the sub-block to be processed using the difference value decoded by
An image decoding apparatus comprising:
前記第1のサブブロックは、前記処理対象のサブブロックに隣接する位置のサブブロックであることを特徴とする請求項7に記載の画像復号装置。   The image decoding apparatus according to claim 7, wherein the first sub-block is a sub-block at a position adjacent to the processing target sub-block. 前記第2のサブブロックは、前記処理対象のサブブロックの直前に符号化されたサブブロックであることを特徴とする請求項7又は請求項8に記載の画像復号装置。   The image decoding apparatus according to claim 7 or 8, wherein the second sub-block is a sub-block encoded immediately before the processing target sub-block. 前記第2の取得手段は、前記処理対象のサブブロックが前記ブロックの左端に位置する場合に、前記処理対象のサブブロックとの位置関係に基づく前記第1のサブブロックの量子化パラメータと、前記復号手段によって復号された差分値とを用いて、前記処理対象のサブブロックの量子化パラメータを取得することを特徴とする請求項7乃至請求項9のいずれか一項に記載の画像復号装置。   The second acquisition means, when the sub-block to be processed is located at the left end of the block, the quantization parameter of the first sub-block based on the positional relationship with the sub-block to be processed, 10. The image decoding apparatus according to claim 7, wherein a quantization parameter of the sub-block to be processed is acquired using a difference value decoded by a decoding unit. 11. 前記第2の取得手段は、前記処理対象のサブブロックが前記ブロックの左端に位置する場合に、前記処理対象のサブブロックの上に位置する前記第1のサブブロックの量子化パラメータと、前記復号手段によって復号された差分値とを用いて、前記処理対象のサブブロックの量子化パラメータを取得することを特徴とする請求項7乃至請求項10のいずれか一項に記載の画像復号装置。   The second obtaining means, when the sub-block to be processed is located at the left end of the block, the quantization parameter of the first sub-block located above the sub-block to be processed, and the decoding The image decoding device according to any one of claims 7 to 10, wherein a quantization parameter of the sub-block to be processed is acquired using the difference value decoded by the unit. 前記第2の取得手段は、前記第1の取得手段によって取得された符号化モードがイントラ予測モードである場合に、前記ブロックに含まれるサブブロックであって前記処理対象のサブブロックと隣接する位置のサブブロックのうち、前記画像のイントラ予測の方向に基づくサブブロックである前記第1のサブブロックと、前記復号手段によって復号された差分値とを用いて、前記処理対象のサブブロックの量子化パラメータを取得することを特徴とする請求項7乃至請求項11のいずれか一項に記載の画像復号装置。 The second acquisition unit is a sub-block included in the block and adjacent to the sub-block to be processed when the encoding mode acquired by the first acquisition unit is an intra prediction mode. Among the sub-blocks, the first sub-block, which is a sub-block based on the direction of intra prediction of the image, and the difference value decoded by the decoding means, and the quantization of the sub-block to be processed The image decoding device according to any one of claims 7 to 11, wherein a parameter is acquired. 画像に含まれるブロックを符号化する画像符号化方法であって、
前記画像の符号化モード、前記ブロックの符号化モード、及び前記ブロックに含まれる処理対象のサブブロックの符号化モードのうち、少なくともいずれか1つを取得する取得工程と、
前記取得工程によって取得された符号化モードがイントラ予測モードである場合に、前記処理対象のサブブロックの量子化パラメータと、当該処理対象のサブブロックとの位置関係に基づく第1のサブブロックの量子化パラメータとの差分値を符号化し、前記取得工程によって取得された符号化モードがインター予測モードである場合に、前記処理対象のサブブロックの量子化パラメータと、前記処理対象のサブブロックとの符号化順序関係に基づく第2のサブブロックの量子化パラメータとの差分値を符号化する符号化工程と、
を有することを特徴とする画像符号化方法。
An image encoding method for encoding a block included in an image,
An acquisition step of acquiring at least one of the encoding mode of the image, the encoding mode of the block, and the encoding mode of a processing target sub-block included in the block;
When the encoding mode acquired by the acquisition step is an intra prediction mode, the quantum of the first sub-block based on the quantization parameter of the sub-block to be processed and the positional relationship between the sub-block to be processed When the encoding mode acquired by the acquisition step is an inter prediction mode, the quantization parameter of the processing target sub-block and the code of the processing target sub-block are encoded. An encoding step of encoding a difference value with the quantization parameter of the second sub-block based on the encoding order relationship;
An image encoding method characterized by comprising:
画像に含まれるブロックを符号化したデータを復号する画像復号方法であって、前記ブロックに含まれる処理対象のサブブロックの量子化パラメータと所定のパラメータとの差分値に関する符号データを復号する復号工程と、
前記画像の符号化モード、前記ブロックの符号化モード、及び前記処理対象のサブブロックの符号化モードのうち、少なくともいずれか1つを取得する第1の取得工程と、前記第1の取得工程によって取得された符号化モードがイントラ予測モードである場合に、前記処理対象のサブブロックとの位置関係に基づく第1のサブブロックの量子化パラメータと、前記復号工程によって復号された差分値とを用いて、前記処理対象のサブブロックの量子化パラメータを取得し、
前記第1の取得工程によって取得された符号化モードがインター予測モードである場合に、前記処理対象のサブブロックとの符号化順序関係に基づく第2のサブブロックの量子化パラメータと、前記復号工程によって復号された差分値とを用いて、前記処理対象のサブブロックの量子化パラメータを取得する第2の取得工程と、
を有することを特徴とする画像復号装置。
An image decoding method for decoding data obtained by encoding a block included in an image, the decoding step for decoding code data relating to a difference value between a quantization parameter of a processing target sub-block included in the block and a predetermined parameter When,
A first acquisition step of acquiring at least one of the encoding mode of the image, the encoding mode of the block, and the encoding mode of the sub-block to be processed; and the first acquisition step. When the acquired encoding mode is the intra prediction mode, the quantization parameter of the first sub-block based on the positional relationship with the processing target sub-block and the difference value decoded by the decoding step are used. To obtain the quantization parameter of the processing target sub-block,
When the encoding mode acquired by the first acquisition step is an inter prediction mode, the quantization parameter of the second sub-block based on the encoding order relationship with the processing target sub-block, and the decoding step A second acquisition step of acquiring the quantization parameter of the sub-block to be processed using the difference value decoded by
An image decoding apparatus comprising:
コンピュータが読み出して実行することにより、前記コンピュータを、請求項1乃至請求項6のいずれか一項に記載の画像符号化装置として機能させることを特徴とするプログラム。   A program that causes a computer to function as the image encoding device according to any one of claims 1 to 6 when the computer reads and executes the program. コンピュータが読み出して実行することにより、前記コンピュータを、請求項7乃至請求項12のいずれか一項に記載の画像復号装置として機能させることを特徴とするプログラム。   A program that causes a computer to function as the image decoding device according to any one of claims 7 to 12, when the computer reads and executes the program.
JP2011091346A 2011-04-15 2011-04-15 Image encoding device, image encoding method and program, image decoding device, image decoding method and program Active JP6039163B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2011091346A JP6039163B2 (en) 2011-04-15 2011-04-15 Image encoding device, image encoding method and program, image decoding device, image decoding method and program
PCT/JP2012/002525 WO2012140889A1 (en) 2011-04-15 2012-04-12 Image encoding apparatus, image encoding method, image encoding program, image decoding apparatus, image decoding method, and image decoding program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011091346A JP6039163B2 (en) 2011-04-15 2011-04-15 Image encoding device, image encoding method and program, image decoding device, image decoding method and program

Publications (3)

Publication Number Publication Date
JP2012227612A JP2012227612A (en) 2012-11-15
JP2012227612A5 JP2012227612A5 (en) 2014-05-29
JP6039163B2 true JP6039163B2 (en) 2016-12-07

Family

ID=47009080

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011091346A Active JP6039163B2 (en) 2011-04-15 2011-04-15 Image encoding device, image encoding method and program, image decoding device, image decoding method and program

Country Status (2)

Country Link
JP (1) JP6039163B2 (en)
WO (1) WO2012140889A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120016980A (en) 2010-08-17 2012-02-27 한국전자통신연구원 Image encoding and decoding method and the same apparatus
KR20210031783A (en) * 2018-04-01 2021-03-22 주식회사 비원영상기술연구소 Image encoding/decoding method and apparatus

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070230564A1 (en) * 2006-03-29 2007-10-04 Qualcomm Incorporated Video processing with scalability
CA2681025C (en) * 2007-03-20 2015-10-13 Fujitsu Limited Video encoding and decoding apparatus and method using quantization in sub-blocks
US8897359B2 (en) * 2008-06-03 2014-11-25 Microsoft Corporation Adaptive quantization for enhancement layer video coding
JP5241622B2 (en) * 2008-07-02 2013-07-17 キヤノン株式会社 Encoding apparatus and encoding method

Also Published As

Publication number Publication date
JP2012227612A (en) 2012-11-15
WO2012140889A1 (en) 2012-10-18

Similar Documents

Publication Publication Date Title
JP5875236B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
EP3090553B1 (en) Block vector prediction in video and image coding/decoding
JP2022020694A (en) Method for video image decoding, device, and computer program
JP2022513457A (en) Methods and equipment for color conversion in VVC
JP2024019495A (en) Image encoder, image decoder, image encoding method, and image decoding method
JP2013012887A (en) Image encoding apparatus, image encoding method and program, image decoding apparatus, image decoding method and program
JP6415637B2 (en) Decoding device, decoding method, program, and storage medium
JP6039163B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
US20230067360A1 (en) Image coding apparatus, image coding method, and program, and image decoding apparatus, image decoding method, and program
KR20220019289A (en) An image encoding apparatus, an image decoding apparatus, an image encoding method, an image decoding method, and a non-transitory computer-readable storage medium storing a computer program
JP6686095B2 (en) Decoding device, decoding method, program, and storage medium
JP6953576B2 (en) Coding device, coding method, program and storage medium
JP6150912B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
WO2021049277A1 (en) Image coding device and image decoding device
JP2014049875A (en) Image encoder, image decoder, image encoding program, and image decoding program
KR20220019283A (en) Image encoding apparatus, image decoding apparatus, image encoding method, image decoding method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140411

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140411

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150331

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150601

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160401

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161104

R151 Written notification of patent or utility model registration

Ref document number: 6039163

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151