[go: up one dir, main page]

JP2012147290A - Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program - Google Patents

Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program Download PDF

Info

Publication number
JP2012147290A
JP2012147290A JP2011004645A JP2011004645A JP2012147290A JP 2012147290 A JP2012147290 A JP 2012147290A JP 2011004645 A JP2011004645 A JP 2011004645A JP 2011004645 A JP2011004645 A JP 2011004645A JP 2012147290 A JP2012147290 A JP 2012147290A
Authority
JP
Japan
Prior art keywords
block
pixels
conversion
size
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2011004645A
Other languages
Japanese (ja)
Inventor
Mitsuru Maeda
充 前田
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 JP2011004645A priority Critical patent/JP2012147290A/en
Priority to PCT/JP2012/000154 priority patent/WO2012096184A1/en
Publication of JP2012147290A publication Critical patent/JP2012147290A/en
Pending legal-status Critical Current

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/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/46Embedding additional information in the video signal during the compression process

Landscapes

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

Abstract

【課題】 複数のモードを持つイントラ予測を行う符号化方式においては、選ばれたモードの識別のためイントラ予測モード情報をサイド情報として符号化しなければならず、そのためのビットが必要であった。
【解決手段】 符号化制御パラメータを設定し、第1のサイズを持つブロックの画素データを周波数変換し、変換係数の一部を除いて所定の値に置き換えて変換を行い、第1のサイズより小さい第2のサイズを持つブロックの画素データを周波数変換し、前記符号化制御パラメータに基づき、第1の変換工程の使用を制限し、前記決定されたブロックサイズに基づいて前記第1の変換工程の出力または前記第2の変換工程の出力を制御して符号化する。
【選択図】 図1
PROBLEM TO BE SOLVED: To encode intra prediction mode information as side information for identifying a selected mode in an encoding method for performing intra prediction having a plurality of modes, and a bit for that is required.
An encoding control parameter is set, pixel data of a block having a first size is subjected to frequency conversion, a part of the conversion coefficient is removed and replaced with a predetermined value, and conversion is performed. The pixel data of a block having a small second size is frequency-converted, the use of the first conversion step is restricted based on the encoding control parameter, and the first conversion step is performed based on the determined block size Or the output of the second conversion step is controlled and encoded.
[Selection] Figure 1

Description

本発明は画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラムに関し、特に画像を複数のサイズのブロックに分割して符号化・復号する符号化方法に関する。   The present invention relates to an image encoding device, an image encoding method and program, an image decoding device, an image decoding method and a program, and more particularly to an encoding method for encoding and decoding an image by dividing the image into blocks of a plurality of sizes.

動画像の圧縮記録方法として、H.264/MPEG−4 AVC(以下H.264)が知られている。H.264符号化方式は1セグメント地上波デジタル放送などで広く使われている。H.264符号化方式の特徴は、従来の符号化方式に加えて4×4画素単位で整数変換を用い、イントラ予測が複数用意されている点にある。またH.264符号化方式では16×16のマクロブロックを符号化の単位としており、その内部を4×4ブロックに分割し、変換を行う単位としている。またイントラ符号化の一部では8×8ブロックでの変換も採用されている。更に、H.264符号化方式をベースとして改良技術として、例えば、H.264のブロックサイズを、64画素×64画素のブロックまで拡張する技術がある。   As a method for compressing and recording a moving image, H.264 is used. H.264 / MPEG-4 AVC (hereinafter referred to as H.264) is known. H. The H.264 encoding method is widely used in one-segment digital terrestrial broadcasting. H. The H.264 encoding method is characterized in that a plurality of intra predictions are prepared using integer conversion in units of 4 × 4 pixels in addition to the conventional encoding method. H. In the H.264 encoding method, a 16 × 16 macroblock is used as a unit for encoding, and the inside thereof is divided into 4 × 4 blocks and used as a unit for conversion. In addition, conversion by 8 × 8 blocks is also adopted in a part of intra coding. Further, H.C. As an improved technique based on the H.264 encoding method, for example, H.264. There is a technique for expanding the block size of H.264 to a block of 64 pixels × 64 pixels.

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 ITU−T H.264 Advanced video coding for generic audiovisual servicesITU-TH. H.264 Advanced video coding for generic audiovisual services

しかしながら、64画素×64画素ブロックや32画素×32画素ブロックなどの大きなブロックでは直交変換の演算自体のコストも高く、発生する係数も非常に多くなるため、これをシーケンシャルに符号化すると符号化に時間がかかる。一方で、その係数を削減して符号化を行い、符号量を圧縮する方法として、直交変換後に高周波の係数を強制的に0にする方式が知られている。また、32画素×32画素ブロックの際に64個の係数のみを送る方式が考えられる。これを採用することで大きなブロックで伝送する係数を低減することができ、圧縮効率を向上させることが可能になった。   However, in a large block such as a 64 pixel × 64 pixel block or a 32 pixel × 32 pixel block, the cost of the orthogonal transform itself is high and the number of generated coefficients is very large. take time. On the other hand, as a method of reducing the coefficient and performing encoding and compressing the code amount, a method of forcibly setting a high frequency coefficient to 0 after orthogonal transformation is known. Further, a method of sending only 64 coefficients in a 32 pixel × 32 pixel block is conceivable. By adopting this, the coefficient transmitted in a large block can be reduced, and the compression efficiency can be improved.

ところが、当然、高周波の係数を一律に落としてしまうため、高周波が再現されず、画質の大きな劣化を伴うことになった。H.264でも採用されているような動き補償やイントラ予測による残差成分には高周波がより多く含まれるのでさらに劣化が大きくなる。また、量子化ステップが小さければ量子化後に0以外の値を持つ量子化係数は非常に多くなるが、一律に高周波を0にするため、量子化ステップを下げても画質が上がらないという問題も生じている。   However, since the high frequency coefficient is reduced uniformly, the high frequency is not reproduced and the image quality is greatly deteriorated. H. Since the residual component by motion compensation and intra prediction, which is also employed in H.264, contains more high frequency, the deterioration is further increased. Also, if the quantization step is small, the number of quantization coefficients having a value other than 0 after quantization becomes very large. However, since the high frequency is uniformly set to 0, there is a problem that the image quality does not increase even if the quantization step is lowered. Has occurred.

また、大きなブロックサイズの変換は画素の入出力、変換係数の入出力も多く、演算コストも非常に高いものとなっている。   In addition, conversion with a large block size involves many input / output of pixels and input / output of conversion coefficients, and the calculation cost is very high.

上述の問題点を解決するため、本発明の画像符号化装置は以下の構成を有する。すなわち、符号化制御パラメータを設定する設定手段と、第1のサイズを持つブロックの画素データを周波数変換し、変換係数の一部を除いて所定の値に置き換えて変換を行う第1の変換手段と、前記第1のサイズより小さい第2のサイズを持つブロックの画素データを周波数変換する第2の変換手段と、前記符号化制御パラメータに基づき、前記第1の変換手段の使用を制限するブロックサイズ決定手段と、前記決定されたブロックサイズに基づいて前記第1の変換手段の出力または前記第2の変換手段の出力を制御して符号化する符号化手段とを有することを特徴とする。   In order to solve the above-described problems, the image coding apparatus of the present invention has the following configuration. That is, a setting unit that sets an encoding control parameter, and a first conversion unit that performs frequency conversion on pixel data of a block having a first size and replaces the data with a predetermined value except for a part of the conversion coefficient. A second conversion unit that frequency-converts pixel data of a block having a second size smaller than the first size, and a block that restricts use of the first conversion unit based on the encoding control parameter It comprises size determining means and encoding means for controlling and encoding the output of the first converting means or the output of the second converting means based on the determined block size.

本発明により、大きなブロックでの変換係数の固定値による置き換えを制限することで、画質の向上を図ることができる。特に、係数の発生に大きく寄与する量子化パラメータに関連してブロックサイズを決定することで、好適にブロックサイズを制限することができる。また、ブロックサイズの制限を行うことで、ブロック分割を表す符号化データを削減できるという効果がある。   According to the present invention, it is possible to improve the image quality by restricting replacement with a fixed value of the transform coefficient in a large block. In particular, the block size can be suitably limited by determining the block size in relation to the quantization parameter that greatly contributes to the generation of coefficients. In addition, by limiting the block size, there is an effect that encoded data representing block division can be reduced.

第1実施形態の画像符号化装置の構成を表すブロック図である。It is a block diagram showing the structure of the image coding apparatus of 1st Embodiment. 第1実施形態の変換ブロックサイズ決定部の構成を表すブロック図である。It is a block diagram showing the structure of the conversion block size determination part of 1st Embodiment. 変換ブロックの係数の値の配置を表した図である。It is a figure showing arrangement | positioning of the value of the coefficient of a conversion block. 変換ブロックの配置の一例を表した図である。It is a figure showing an example of arrangement | positioning of a conversion block. 変換ブロックの配置の一例を表した図である。It is a figure showing an example of arrangement | positioning of a conversion block. 第1実施形態の直交変換部の詳細を表すブロック図である。It is a block diagram showing the detail of the orthogonal transformation part of 1st Embodiment. 第1実施形態の画像符号化装置の別な構成を表すブロック図である。It is a block diagram showing another structure of the image coding apparatus of 1st Embodiment. 第1実施形態の変換ブロックサイズ決定部の別な構成を表すブロック図である。It is a block diagram showing another structure of the conversion block size determination part of 1st Embodiment. 第1実施形態の画像符号化処理の動作を示すフローチャート図である。It is a flowchart figure which shows the operation | movement of the image coding process of 1st Embodiment. 第1実施形態の画像符号化装置の別な構成を表すブロック図である。It is a block diagram showing another structure of the image coding apparatus of 1st Embodiment. 第1実施形態の分割フラグ符号化処理の動作を示すフローチャート図である。It is a flowchart figure which shows the operation | movement of the division | segmentation flag encoding process of 1st Embodiment. 第2実施形態の画像符号化装置の構成を表すブロック図である。It is a block diagram showing the structure of the image coding apparatus of 2nd Embodiment. 第2実施形態の分割フラグ符号化処理の動作を示すフローチャート図である。It is a flowchart figure which shows the operation | movement of the division | segmentation flag encoding process of 2nd Embodiment. 第2実施形態の画像符号化装置の別な構成を表すブロック図である。It is a block diagram showing another structure of the image coding apparatus of 2nd Embodiment. 第2実施形態の画像符号化装置の別な構成を表すブロック図である。It is a block diagram showing another structure of the image coding apparatus of 2nd Embodiment. 第3実施形態の画像復号装置の構成を表すブロック図である。It is a block diagram showing the structure of the image decoding apparatus of 3rd Embodiment. 第3実施形態の逆直交変換部の詳細を表すブロック図である。It is a block diagram showing the detail of the inverse orthogonal transformation part of 3rd Embodiment. 第3実施形態の画像復号処理の動作を示すフローチャート図である。It is a flowchart figure which shows the operation | movement of the image decoding process of 3rd Embodiment. 第3実施形態の分割フラグ復号処理の動作を示すフローチャート図である。It is a flowchart figure which shows the operation | movement of the division flag decoding process of 3rd Embodiment. 第4実施形態の画像復号装置の構成を表すブロック図である。It is a block diagram showing the structure of the image decoding apparatus of 4th Embodiment. 第4実施形態の分割フラグ復号処理の動作を示すフローチャート図である。It is a flowchart figure which shows the operation | movement of the division | segmentation flag decoding process of 4th Embodiment. 第4実施形態の画像復号装置の別な構成を表すブロック図である。It is a block diagram showing another structure of the image decoding apparatus of 4th Embodiment. 本発明の画像符号化装置、復号装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図である。It is a 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.

以下、添付の図面を参照して、本願発明をその好適な実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。   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から図11を使って説明する。
図1は本発明の第1の実施形態である画像符号化装置の構成を示すブロック図である。図1において、1は画像データを入力する端子である。2は画像データを一時的に格納するバッファである。3は画像を複数の基本ブロックに分割する基本ブロック分割部である。本実施形態では説明を容易にするため、基本ブロックのサイズを32画素×32画素として説明するが、これに限定されない。4は基本ブロックを分割して直交変換を行うブロックのサイズの変換ブロックを形成する変換ブロックサイズ・分割決定部である。ここでは変換ブロックとして、ブロック分割を行わない32画素×32画素、16画素×16画素、8画素×8画素、4画素×4画素のそれぞれ変換ブロックに分割されるものとする。ただし、分割の方法はこれに限定されない。
<Embodiment 1>
An embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a block diagram showing a configuration of an image encoding apparatus according to the first embodiment of the present invention. In FIG. 1, reference numeral 1 denotes a terminal for inputting image data. A buffer 2 temporarily stores image data. Reference numeral 3 denotes a basic block dividing unit that divides an image into a plurality of basic blocks. In the present embodiment, for ease of explanation, the basic block size is described as 32 pixels × 32 pixels, but the present invention is not limited to this. Reference numeral 4 denotes a transform block size / division determination unit that divides a basic block and forms a transform block having a block size for performing orthogonal transform. Here, the conversion block is divided into conversion blocks of 32 pixels × 32 pixels, 16 pixels × 16 pixels, 8 pixels × 8 pixels, and 4 pixels × 4 pixels, which are not divided into blocks. However, the division method is not limited to this.

8は分割された変換ブロック単位でイントラ予測や動き補償予測を行い、予測誤差を算出する予測部である。9は前記予測誤差に対して直交変換を行い空間周波数の係数を得る直交変換部である。本実施形態では周波数変換としてDCT変換を例にとり説明するがこれに限定されず、アダマール変換等の変換でももちろん構わない。直交変換部9は、変換ブロック分割・サイズ決定部4で分割された複数種の変換ブロックサイズに対応する直交変換を行う機能を備えている。ただし、32画素×32画素、16画素×16画素の直交変換については、係数の内、低周波の8画素×8画素の係数のみを演算し、それ以外は0を出力する。図3は変換ブロックの係数の値の配置を表した図である。図3(a)は32画素×32画素の直交変換後の係数を表す図であり、同様に図3(b)は16画素×16画素の直交変換後の係数を表す図である。いずれの図においても黒塗りの画素は直交変換によって求められた係数を保持するが、それ以外の白抜きで表された画素は0の値となる。なお、この保持される係数の配置はこれに限定されない。   A prediction unit 8 performs intra prediction or motion compensation prediction in units of divided transform blocks, and calculates a prediction error. An orthogonal transform unit 9 obtains a spatial frequency coefficient by performing orthogonal transform on the prediction error. In the present embodiment, DCT conversion is described as an example of frequency conversion, but the present invention is not limited to this. Of course, conversion such as Hadamard conversion may be used. The orthogonal transformation unit 9 has a function of performing orthogonal transformation corresponding to a plurality of types of transformation block sizes divided by the transformation block division / size determination unit 4. However, for the orthogonal transformation of 32 pixels × 32 pixels and 16 pixels × 16 pixels, only the low frequency 8 pixels × 8 pixels coefficients are calculated, and 0 is output otherwise. FIG. 3 is a diagram showing the arrangement of the coefficient values of the transform block. FIG. 3A is a diagram illustrating coefficients after orthogonal transformation of 32 pixels × 32 pixels. Similarly, FIG. 3B is a diagram illustrating coefficients after orthogonal transformation of 16 pixels × 16 pixels. In any of the figures, the black pixel holds the coefficient obtained by the orthogonal transformation, but other white pixels have a value of zero. The arrangement of the retained coefficients is not limited to this.

10は得られた係数に対して、量子化パラメータ(符号化制御パラメータ)に従って量子化を行い、量子化係数を得る量子化部である。11は各種ヘッダや各ブロックの量子化パラメータ等を符号化し、さらに前記量子化係数に対してエントロピー符号化を行うエントロピー符号化部である。エントロピー符号化の方式は特に限定されないが、算術符号やハフマン符号による符号化を行う。   A quantization unit 10 quantizes the obtained coefficient in accordance with a quantization parameter (encoding control parameter) to obtain a quantization coefficient. Reference numeral 11 denotes an entropy encoding unit that encodes various headers, quantization parameters of each block, and the like, and further performs entropy encoding on the quantized coefficients. The entropy encoding method is not particularly limited, but encoding by arithmetic code or Huffman code is performed.

5は不図示のユーザが画質を制御するための指示を受ける端子であり、6はその指示に従って、量子化部10に設定する量子化パラメータの初期値を生成する量子化ステップ設定部である。7は前記量子化パラメータの初期値を参照して変換ブロック分割部で分割する際に最大の変換ブロックサイズを決定する最大変換ブロックサイズ決定部である。   Reference numeral 5 denotes a terminal that receives an instruction for a user (not shown) to control the image quality, and reference numeral 6 denotes a quantization step setting unit that generates an initial value of a quantization parameter to be set in the quantization unit 10 in accordance with the instruction. Reference numeral 7 denotes a maximum transform block size determination unit that determines the maximum transform block size when the transform block partition unit divides by referring to the initial value of the quantization parameter.

15は量子化部10で生成された量子化係数から係数を復元する逆量子化部であり、16は前記復元された係数に直交変換部9の逆変換を行い、予測誤差を復元する逆直交変換部である。17は前記予測誤差と予測結果を加算する予測誤差加算部である。18は復号した画像を格納しておくフレームメモリである。19はフレームメモリ18の内容と入力される変換ブロック単位の画像データを比較して動き検出を行った動き補償を行う動き補償部である。20は前記動き検出の結果である動きベクトルを符号化して動きベクトル符号を生成する動きベクトル符号化器である。21は変換ブロック分割・サイズ決定部4で基本ブロックを変換ブロックに分割した状態の情報を符号化し、ブロック分割符号を生成するブロック分割情報符号化部である。12はエントロピー符号化部11、動きベクトル符号化部20、ブロック分割情報符号化部21からの出力を統合、整列してビットストリームとして出力する多重化部である。13は前記ビットストリームを外部に出力する端子である。14はビットストリームの符号量に基づき、量子化パラメータを制御するレート制御部である。
上記の構成において、画像符号化処理の動作について説明する。
Reference numeral 15 denotes an inverse quantization unit that restores a coefficient from the quantized coefficient generated by the quantization unit 10, and reference numeral 16 denotes an inverse orthogonal that performs inverse transformation of the restored coefficient by the orthogonal transformation unit 9 to restore a prediction error. It is a conversion unit. Reference numeral 17 denotes a prediction error adding unit that adds the prediction error and the prediction result. A frame memory 18 stores the decoded image. Reference numeral 19 denotes a motion compensation unit that performs motion compensation by performing motion detection by comparing the contents of the frame memory 18 and input image data in units of transform blocks. Reference numeral 20 denotes a motion vector encoder that encodes a motion vector as a result of the motion detection to generate a motion vector code. Reference numeral 21 denotes a block division information encoding unit that encodes information in a state where the basic block is divided into conversion blocks by the conversion block division / size determination unit 4 and generates a block division code. Reference numeral 12 denotes a multiplexing unit that integrates and aligns outputs from the entropy encoding unit 11, the motion vector encoding unit 20, and the block division information encoding unit 21, and outputs the result as a bit stream. Reference numeral 13 denotes a terminal for outputting the bit stream to the outside. A rate control unit 14 controls the quantization parameter based on the bitstream code amount.
In the above configuration, the operation of the image encoding process will be described.

処理に先立ち、不図示のユーザは符号化する際の画質に関して端子5を経由して量子化パラメータ設定部6に指示を送る。量子化パラメータ設定部6はユーザが高画質を望んでいれば小さな値の量子化パラメータを設定し、低画質でもビットを削減することを望んでいれば大きな値の量子化パラメータを設定する。本実施形態では説明を容易にするため、量子化パラメータQPを小さい値QSに設定する高画質モードと、量子化パラメータQPを大きな値QLに設定する高効率モードの設定が行えるものとして説明を行う。ただし、設定の方法はこれに限定されない。   Prior to the processing, a user (not shown) sends an instruction to the quantization parameter setting unit 6 via the terminal 5 regarding the image quality at the time of encoding. The quantization parameter setting unit 6 sets a small value quantization parameter if the user desires high image quality, and sets a large value quantization parameter if the user desires to reduce bits even with low image quality. In the present embodiment, for ease of explanation, it is assumed that a high image quality mode in which the quantization parameter QP is set to a small value QS and a high efficiency mode in which the quantization parameter QP is set to a large value QL can be set. . However, the setting method is not limited to this.

量子化パラメータ設定部6で設定された量子化パラメータは最大変換ブロックサイズ決定部7とレート制御部14に入力される。最大変換ブロックサイズ決定部7は入力された量子化パラメータQPの値がQLであれば、その変換のブロックサイズを最大32画素×32画素とする。また、入力された量子化パラメータQPの値がQSであれば、その変換のブロックサイズの最大を8画素×8画素に限定する。   The quantization parameter set by the quantization parameter setting unit 6 is input to the maximum transform block size determination unit 7 and the rate control unit 14. If the value of the input quantization parameter QP is QL, the maximum transform block size determining unit 7 sets the transform block size to a maximum of 32 pixels × 32 pixels. Further, if the value of the input quantization parameter QP is QS, the maximum block size of the conversion is limited to 8 pixels × 8 pixels.

外部から端子1を介して順次、画像データが入力され、バッファ2に蓄積される。基本ブロック分割部3は入力される順に32画素×32画素のブロックを切り出し、変換ブロック分割・サイズ決定部4に入力する。   Image data is sequentially input from the outside via the terminal 1 and stored in the buffer 2. The basic block dividing unit 3 cuts out a block of 32 pixels × 32 pixels in the order of input and inputs the block to the transform block dividing / size determining unit 4.

変換ブロック分割・サイズ決定部4において、各ブロックサイズで分割した際の符号化コストを算出してコストが小さい分割の組み合わせを選択する。図2に変換ブロック分割・サイズ決定部4の詳細な構成の一例を表すブロック図を示す。図2においては、31は基本ブロック3から基本ブロックの画素データを入力する端子である。32は入力された画素データを格納するバッファである。   The transform block division / size determination unit 4 calculates a coding cost when dividing by each block size, and selects a combination of divisions with a low cost. FIG. 2 is a block diagram showing an example of a detailed configuration of the transform block division / size determination unit 4. In FIG. 2, reference numeral 31 denotes a terminal for inputting basic block pixel data from the basic block 3. A buffer 32 stores the input pixel data.

33はバッファ32に格納された32画素×32画素に対してDCT変換を行う32×32変換部である。34はバッファ32に格納された32画素×32画素に対して縦横4分割にし、各16画素×16画素のブロックに対してDCT変換を行う16×16変換部である。35はバッファ32に格納された32画素×32画素に対して縦横4分割にし、各8画素×8画素のブロックに対してDCT変換を行う8×8変換部である。36はバッファ32に格納された32画素×32画素に対して縦横8分割にし、各4画素×4画素のブロックに対してDCT変換を行う4×4変換部である。   Reference numeral 33 denotes a 32 × 32 conversion unit that performs DCT conversion on the 32 pixels × 32 pixels stored in the buffer 32. Reference numeral 34 denotes a 16 × 16 conversion unit which divides the 32 pixels × 32 pixels stored in the buffer 32 into four parts in the vertical and horizontal directions and performs DCT conversion on each block of 16 pixels × 16 pixels. Reference numeral 35 denotes an 8 × 8 conversion unit that divides the 32 pixels × 32 pixels stored in the buffer 32 vertically and horizontally into four and performs DCT conversion on each 8 pixel × 8 pixel block. Reference numeral 36 denotes a 4 × 4 conversion unit that divides the 32 pixels × 32 pixels stored in the buffer 32 into 8 parts in the vertical and horizontal directions and performs DCT conversion on each 4 pixel × 4 pixel block.

37から40はコスト算出部であり、それぞれの入力になる直交変換結果を入力し、符号化コストを算出する。算出の方法としてラグランジュ乗数を用いてブロックのコストを求める方法がある。また、コストの算出方法はこれに限定されず、例えば、各変換ブロックでの分散やエッジ量等のアクティビティを用いて判定する方法などがある。   Reference numerals 37 to 40 denote cost calculation units which input orthogonal transformation results as respective inputs and calculate encoding costs. As a calculation method, there is a method of obtaining a block cost using a Lagrange multiplier. In addition, the cost calculation method is not limited to this, and for example, there is a method of determination using activities such as distribution and edge amount in each conversion block.

41から44は対応するコスト算出部37から40に対応して、求められたコストを変換ブロック単位で蓄積するコストバッファである。45はこれらのコストバッファに格納された各変換ブロックのコストを読み出し、基本ブロック内でもっともコストが小さくなるような組み合わせを選択する変換ブロック分割決定部である。46は変換ブロック分割決定部45の出力である選択された組み合わせの情報を変換ブロックの分割情報として出力する端子であり、図1の予測部8、直交変換部9、動き補償部19、ブロック分割情報符号化部21に出力される。   Reference numerals 41 to 44 denote cost buffers corresponding to the corresponding cost calculation units 37 to 40 for accumulating the obtained costs in units of conversion blocks. Reference numeral 45 denotes a transform block division determination unit that reads the cost of each transform block stored in these cost buffers and selects a combination that minimizes the cost in the basic block. 46 is a terminal for outputting information on the selected combination, which is the output of the transform block division determining unit 45, as transform block division information. The prediction unit 8, the orthogonal transform unit 9, the motion compensation unit 19, and the block division in FIG. The information is output to the information encoding unit 21.

47は前記変換ブロック分割情報を受け取り、バッファ32から前記変換ブロック分割情報に従って、変換ブロックを切り出して出力する変換ブロック分割部であり、48は前記分割された変換ブロックの画素データを順次出力する端子である。   47 is a transform block dividing unit that receives the transform block partition information and cuts out and outputs transform blocks from the buffer 32 according to the transform block partition information, and 48 is a terminal that sequentially outputs the pixel data of the split transform blocks. It is.

49は図1の最大変換ブロックサイズ決定部7から変換ブロックの最大サイズを入力する端子である。本実施形態では量子化パラメータの値がQLであれば32を、QSであれば8を入力する。50は端子49からの入力に従って、32×32変換部33、コスト算出部37、コストバッファ41、16×16変換部34、コスト算出部38、コストバッファ42を動作させるか否かを制御する制御器である。制御の信号はこれらに加えて、変換ブロック分割決定部45にも入力される。   49 is a terminal for inputting the maximum size of the transform block from the maximum transform block size determining unit 7 in FIG. In this embodiment, 32 is input if the value of the quantization parameter is QL, and 8 is input if the value is QS. 50 is a control for controlling whether or not to operate the 32 × 32 conversion unit 33, the cost calculation unit 37, the cost buffer 41, the 16 × 16 conversion unit 34, the cost calculation unit 38, and the cost buffer 42 in accordance with the input from the terminal 49. It is a vessel. In addition to these, the control signal is also input to the transform block division determining unit 45.

上記の構成において、変換ブロック分割処理の動作について説明する。
端子49から変換ブロックの最大サイズが制御器50に入力される。制御器50は変換ブロックの最大サイズが32であれば、32×32変換部33、コスト算出部37、コストバッファ41、16×16変換部34、コスト算出部38、コストバッファ42を動作する状態に設定する。また、変換ブロックの最大サイズが8であれば、32×32変換部33、コスト算出部37、コストバッファ41、16×16変換部34、コスト算出部38、コストバッファ42を休止する状態に設定する。この時、ハードウェアに供給する電源も切断する。
The operation of transform block division processing in the above configuration will be described.
The maximum size of the conversion block is input from the terminal 49 to the controller 50. If the maximum size of the conversion block is 32, the controller 50 operates the 32 × 32 conversion unit 33, the cost calculation unit 37, the cost buffer 41, the 16 × 16 conversion unit 34, the cost calculation unit 38, and the cost buffer 42. Set to. Further, if the maximum size of the conversion block is 8, the 32 × 32 conversion unit 33, the cost calculation unit 37, the cost buffer 41, the 16 × 16 conversion unit 34, the cost calculation unit 38, and the cost buffer 42 are set in a paused state. To do. At this time, the power supplied to the hardware is also cut off.

端子31から基本ブロックの画素データ(32画素×32画素)を入力し、バッファ32に蓄積する。
制御器50が32×32変換部33、コスト算出部37、コストバッファ41、16×16変換部34、コスト算出部38、コストバッファ42を動作させているとする。その時、バッファ32のデータを32×32変換部33、16×16変換部34、8×8変換部35、4×4変換部36が変換ブロックサイズごとに読み出す。そして、それぞれのサイズでDCT変換を行い、その変換係数を各々に接続されたコスト算出部37から40に入力する。
Pixel data (32 pixels × 32 pixels) of the basic block is input from the terminal 31 and stored in the buffer 32.
Assume that the controller 50 operates the 32 × 32 conversion unit 33, the cost calculation unit 37, the cost buffer 41, the 16 × 16 conversion unit 34, the cost calculation unit 38, and the cost buffer 42. At that time, the 32 × 32 conversion unit 33, 16 × 16 conversion unit 34, 8 × 8 conversion unit 35, and 4 × 4 conversion unit 36 read the data in the buffer 32 for each conversion block size. Then, DCT conversion is performed at each size, and the conversion coefficient is input to the cost calculation units 37 to 40 connected to each size.

コスト算出部37から40はその係数から符号化コストを算出し、各々に接続されたコストバッファに蓄積される。コストバッファ41では変換ブロックを32画素×32画素とした場合の1個のコストが格納される。コストバッファ42では変換ブロックを16画素×16画素とした場合の4個のコストがその位置に従って格納される。コストバッファ43では変換ブロックを8画素×8画素とした場合の16個のコストがその位置に従って格納される。コストバッファ44では変換ブロックを4画素×4画素とした場合の64個のコストがその位置に従って格納される。   The cost calculation units 37 to 40 calculate the encoding cost from the coefficients and store them in the cost buffers connected to each. The cost buffer 41 stores one cost when the conversion block is 32 pixels × 32 pixels. In the cost buffer 42, four costs when the conversion block is 16 pixels × 16 pixels are stored according to the position. In the cost buffer 43, 16 costs when the conversion block is 8 pixels × 8 pixels are stored according to the position. In the cost buffer 44, 64 costs when the conversion block is 4 pixels × 4 pixels are stored according to the position.

一方、制御器50が32×32変換部33、コスト算出部37、コストバッファ41、16×16変換部34、コスト算出部38、コストバッファ42を休止させているとする。その時、バッファ32のデータを8×8変換部35、4×4変換部36が変換ブロックサイズごとに読み出し、それぞれのサイズでDCT変換を行い、その変換係数を各々に接続されたコスト算出部39と40に入力する。   On the other hand, it is assumed that the controller 50 pauses the 32 × 32 conversion unit 33, the cost calculation unit 37, the cost buffer 41, the 16 × 16 conversion unit 34, the cost calculation unit 38, and the cost buffer 42. At that time, the data of the buffer 32 is read by the 8 × 8 conversion unit 35 and the 4 × 4 conversion unit 36 for each conversion block size, DCT conversion is performed at each size, and the conversion coefficient is connected to the cost calculation unit 39 connected to each. And 40.

コスト算出部39と40はその係数から符号化コストを算出し、各々に接続されたコストバッファに蓄積される。コストバッファ43では変換ブロックを8画素×8画素とした場合の16個のコストがその位置に従って格納される。コストバッファ44では変換ブロックを4画素×4画素とした場合の64個のコストがその位置に従って格納される。   The cost calculation units 39 and 40 calculate the encoding cost from the coefficients and store them in the cost buffers connected to each. In the cost buffer 43, 16 costs when the conversion block is 8 pixels × 8 pixels are stored according to the position. In the cost buffer 44, 64 costs when the conversion block is 4 pixels × 4 pixels are stored according to the position.

全てのコストがコストバッファ41から44に入力されたら、変換ブロック分割決定部45は制御器50がコストバッファ41から44の全てを動作させていれば、これらのコストを比較し、もっともコストの低い分割の組み合わせを選択する。   If all the costs are input to the cost buffers 41 to 44, the transform block division determination unit 45 compares these costs if the controller 50 operates all of the cost buffers 41 to 44, and the lowest cost is obtained. Select a combination of splits.

図4に図1の量子化パラメータ設定部6で高効率モードが選択されて、変換ブロックの最大サイズが32となった場合の変換ブロック分割の一例を示す。32画素×32画素のブロックは16画素×16画素の変換ブロックAとD、8画素×8画素の変換ブロックのBA、BB、BC、BD、CB、CD、さらに4画素×4画素の変換ブロックのCAA、CAB、CAC、CAD、CBA、CBB、CBC、CBDに分割されている。   FIG. 4 shows an example of transform block division when the high-efficiency mode is selected by the quantization parameter setting unit 6 in FIG. 1 and the maximum transform block size is 32. The 32 pixel × 32 pixel block is a 16 pixel × 16 pixel conversion block A and D, an 8 pixel × 8 pixel conversion block BA, BB, BC, BD, CB, CD, and a 4 pixel × 4 pixel conversion block. Are divided into CAA, CAB, CAC, CAD, CBA, CBB, CBC, and CBD.

すなわち、ブロック分割の状態とサイズについて「32画素×32画素のブロックは16画素×16画素ブロックに分割される」「16画素×16画素のブロックAは分割されない」「16画素×16画素のブロックBは8画素×8画素ブロックに分割される」「8画素×8画素のブロックBAは分割されない」「8画素×8画素のブロックBBは分割されない」「8画素×8画素のブロックBCは分割されない」「8画素×8画素のブロックBDは分割されない」「16画素×16画素のブロックCは8画素×8画素ブロックに分割される」「8画素×8画素のブロックCAは4画素×4画素ブロックに分割される」「8画素×8画素のブロックCBは分割されない」「8画素×8画素のブロックCCは4画素×4画素ブロックに分割される」「8画素×8画素のブロックCDは分割されない」「16画素×16画素のブロックDは分割されない」と表され、これが変換ブロックの分割情報となる。   That is, regarding the state and size of block division, “a block of 32 pixels × 32 pixels is divided into 16 pixel × 16 pixel blocks”, “block A of 16 pixels × 16 pixels is not divided”, and a block of 16 pixels × 16 pixels B is divided into 8 pixel × 8 pixel blocks ”“ 8 pixel × 8 pixel block BA is not divided ”“ 8 pixel × 8 pixel block BB is not divided ”“ 8 pixel × 8 pixel block BC is divided "The block BD of 8 pixels x 8 pixels is not divided" "The block C of 16 pixels x 16 pixels is divided into 8 pixels x 8 pixels block" "The block CA of 8 pixels x 8 pixels is 4 pixels x 4 “Divided into pixel blocks” “Block CB of 8 pixels × 8 pixels is not divided” “Block CC of 8 pixels × 8 pixels is divided into 4 pixels × 4 pixel blocks” “8 strokes” × 8 pixel block CD of block D undivided "" 16 × 16 pixels is represented as divided not ", which is the division information of the transform block.

また、図5に、図1の量子化パラメータ設定部6で高画質モードが選択されて、変換ブロックの最大サイズが8となった場合の変換ブロック分割の一例を示す。8画素×8画素の変換ブロックのAA、AB、AC、AD、BA、BB、BC、BD、CB、CD、DA、DB、DC、DDと4画素×4画素の変換ブロックのCAA、CAB、CAC、CAD、CBA、CBB、CBC、CBDに分割されている。図4の16画素×16画素の変換ブロックは8画素×8画素の変換ブロックに再分割されている。この時、図5の変換ブロックの分割情報は「32画素×32画素のブロックは16画素×16画素ブロックに分割される」「16画素×16画素のブロックAは8画素×8画素ブロックに分割される」「8画素×8画素のブロックAAは分割されない」「8画素×8画素のブロックABは分割されない」「8画素×8画素のブロックACは分割されない」「8画素×8画素のブロックADは分割されない」「16画素×16画素のブロックBは8画素×8画素ブロックに分割される」「8画素×8画素のブロックBAは分割されない」「8画素×8画素のブロックBBは分割されない」「8画素×8画素のブロックBCは分割されない」「8画素×8画素のブロックBDは分割されない」「16画素×16画素のブロックCは8画素×8画素ブロックに分割される」「8画素×8画素のブロックCAは4画素×4画素ブロックに分割される」「8画素×8画素のブロックCBは分割されない」「8画素×8画素のブロックCCは4画素×4画素ブロックに分割される」「8画素×8画素のブロックCDは分割されない」「16画素×16画素のブロックDは8画素×8画素ブロックに分割される」「8画素×8画素のブロックDAは分割されない」「8画素×8画素のブロックDBは分割されない」「8画素×8画素のブロックDCは分割されない」「8画素×8画素のブロックDDは分割されない」となる。   FIG. 5 shows an example of transform block division when the high quality mode is selected by the quantization parameter setting unit 6 in FIG. 1 and the maximum transform block size is 8. 8-pixel x 8-pixel conversion block AA, AB, AC, AD, BA, BB, BC, BD, CB, CD, DA, DB, DC, DD and 4-pixel x 4-pixel conversion block CAA, CAB, It is divided into CAC, CAD, CBA, CBB, CBC, and CBD. The 16 pixel × 16 pixel conversion block in FIG. 4 is subdivided into 8 pixel × 8 pixel conversion blocks. At this time, the division information of the conversion block of FIG. 5 is “32 pixel × 32 pixel block is divided into 16 pixel × 16 pixel block” “16 pixel × 16 pixel block A is divided into 8 pixel × 8 pixel block” "8 pixel x 8 pixel block AA is not divided" "8 pixel x 8 pixel block AB is not divided" "8 pixel x 8 pixel block AC is not divided" "8 pixel x 8 pixel block "AD is not divided" "Block B of 16 pixels x 16 pixels is divided into 8 pixels x 8 pixel blocks" "Block BA of 8 pixels x 8 pixels is not divided" "Block BB of 8 pixels x 8 pixels is divided Not "" 8 pixel x 8 pixel block BC is not divided "" 8 pixel x 8 pixel block BD is not divided "" 16 pixel x 16 pixel block C is 8 pixel x 8 pixel block "8 pixel x 8 pixel block CA is divided into 4 pixel x 4 pixel block" "8 pixel x 8 pixel block CB is not divided" "8 pixel x 8 pixel block CC is 4 pixels "Divided into 4 pixel blocks" "block CD of 8 pixels x 8 pixels is not divided" "block D of 16 pixels x 16 pixels is divided into 8 pixels x 8 pixel blocks" "8 pixels x 8 pixels The block DA is not divided, “the block DB of 8 pixels × 8 pixels is not divided”, the block DC of 8 pixels × 8 pixels is not divided, and the block DD of 8 pixels × 8 pixels is not divided.

これらの変換ブロックの分割情報は変換ブロック分割決定部45から端子46を介して、図1の予測部8、直交変換部9、動き補償部19、ブロック分割情報符号化部21に出力されると同時に変換ブロック分割部47に入力される。変換ブロック分割部47では変換ブロックの分割情報に基づき、順にバッファ32から変換ブロックのデータを読み出して、端子48から図1の予測部8及び動き補償部19に出力する。   When the division information of these transform blocks is output from the transform block division determination unit 45 to the prediction unit 8, the orthogonal transformation unit 9, the motion compensation unit 19, and the block division information encoding unit 21 in FIG. At the same time, it is input to the transform block division unit 47. The transform block division unit 47 sequentially reads transform block data from the buffer 32 based on the transform block division information and outputs the data from the terminal 48 to the prediction unit 8 and the motion compensation unit 19 in FIG.

図1に戻り、変換ブロックサイズ・分割決定部4で生成された変換ブロック分割情報と変換ブロックの画素データは予測部8と動き補償部19に入力される。動き補償部19では画素ブロックのデータに基づき、フレームメモリ18から当該変換ブロックに対して動き予測を行い、動きベクトルと参照する画素ブロックを生成して予測部8に入力する。また、動きベクトルは動きベクトル符号化部20で符号化され、動きベクトル符号データとして多重化部12に入力される。   Returning to FIG. 1, the transform block division information generated by the transform block size / division determination unit 4 and the pixel data of the transform block are input to the prediction unit 8 and the motion compensation unit 19. The motion compensation unit 19 performs motion prediction on the converted block from the frame memory 18 based on the pixel block data, generates a pixel block to be referred to as a motion vector, and inputs the pixel block to the prediction unit 8. The motion vector is encoded by the motion vector encoding unit 20 and input to the multiplexing unit 12 as motion vector code data.

予測部8では入力された画素データに対してイントラ予測を行い、動き補償部19から入力された動き補償の予測結果と比較し、予測誤差の小さいものを選択し予測モードを決定する。選択された予測結果と入力された画素ブロックとの差分をとり、予測誤差データを生成する。生成された予測誤差データは直交変換部9に入力される。また、その時に使用された予測結果は予測誤差加算部17に入力される。また、予測モードは多重化部12に出力される。   The prediction unit 8 performs intra prediction on the input pixel data, compares it with the prediction result of motion compensation input from the motion compensation unit 19, selects the one with a small prediction error, and determines the prediction mode. The difference between the selected prediction result and the input pixel block is taken to generate prediction error data. The generated prediction error data is input to the orthogonal transform unit 9. The prediction result used at that time is input to the prediction error adding unit 17. The prediction mode is output to the multiplexing unit 12.

直交変換部9は予測誤差に対して変換ブロックの分割情報の示す直交変換を行う。直交変換部9の詳細なブロック図を図6に示す。図6において、60は図1の変換ブロックサイズ・分割決定部4から変換ブロック分割情報を入力する端子である。61は図1の最大変換ブロックサイズ決定部7から変換ブロックの最大サイズを入力する端子である。62は図2の制御器50と同様に、端子61からの入力に従って、32×32変換部65、16×16変換部66を動作させるか否かを制御する制御器である。   The orthogonal transform unit 9 performs orthogonal transform indicated by transform block division information on the prediction error. A detailed block diagram of the orthogonal transform unit 9 is shown in FIG. In FIG. 6, reference numeral 60 denotes a terminal for inputting transformed block division information from the transformed block size / division determination unit 4 in FIG. Reference numeral 61 denotes a terminal for inputting the maximum size of the transform block from the maximum transform block size determination unit 7 in FIG. Similar to the controller 50 in FIG. 2, 62 is a controller that controls whether or not to operate the 32 × 32 conversion unit 65 and the 16 × 16 conversion unit 66 in accordance with the input from the terminal 61.

63は図1の予測部8から予測誤差データを入力する端子である。64、69はセレクタであり、端子60から入力された変換ブロック分割情報の変換ブロックサイズに基づいて入力先または出力先を選択する。   63 is a terminal for inputting prediction error data from the prediction unit 8 of FIG. Reference numerals 64 and 69 denote selectors that select an input destination or an output destination based on the transform block size of the transform block division information input from the terminal 60.

65は入力された32画素×32画素の変換ブロックに対してDCT変換を行い32×32の係数データを得る32×32変換部である。34は入力された16画素×16画素の変換ブロックに対してDCT変換を行い16×16の係数データを得る16×16変換部である。67はバッファ32に入力された8画素×8画素の変換ブロックに対してDCT変換を行い8×8の係数データを得る8×8変換部である。68はバッファ32に入力された4画素×4画素の変換ブロックに対してDCT変換を行い4×4の係数データを得る4×4変換部である。   Reference numeral 65 denotes a 32 × 32 conversion unit that performs DCT conversion on an input conversion block of 32 × 32 pixels to obtain 32 × 32 coefficient data. Reference numeral 34 denotes a 16 × 16 conversion unit that performs DCT conversion on the input 16 pixel × 16 pixel conversion block to obtain 16 × 16 coefficient data. Reference numeral 67 denotes an 8 × 8 conversion unit that performs DCT conversion on the 8 pixel × 8 pixel conversion block input to the buffer 32 and obtains 8 × 8 coefficient data. Reference numeral 68 denotes a 4 × 4 conversion unit that performs DCT conversion on a 4 pixel × 4 pixel conversion block input to the buffer 32 and obtains 4 × 4 coefficient data.

70は各変換で得られた係数データを出力する端子である。上記の構成において、直交変換処理の動作について説明する。   Reference numeral 70 denotes a terminal for outputting coefficient data obtained by each conversion. In the above configuration, the operation of orthogonal transform processing will be described.

処理に先立ち、端子61から変換ブロックの最大サイズが入力され、制御器62に入力される。制御器62は変換ブロックの最大サイズが32であれば、32×32変換部65、16×16変換部66を動作する状態に設定する。また、変換ブロックの最大サイズが8であれば、32×32変換部65、16×16変換部66を休止する状態に設定する。この時、ハードウェアに供給する電源も切断する。   Prior to processing, the maximum size of the conversion block is input from the terminal 61 and input to the controller 62. If the maximum size of the conversion block is 32, the controller 62 sets the 32 × 32 conversion unit 65 and the 16 × 16 conversion unit 66 to operate. If the maximum size of the conversion block is 8, the 32 × 32 conversion unit 65 and the 16 × 16 conversion unit 66 are set in a paused state. At this time, the power supplied to the hardware is also cut off.

端子60から変換ブロック分割情報が入力され、セレクタ64とセレクタ69に入力される。入力された変換ブロックサイズが32であれば、セレクタ64はその出力先を32×32変換部65とし、セレクタ69はその入力先を32×32変換部65とする。以下同様に、入力された変換ブロックサイズが16であれば、セレクタ64はその出力先を16×16変換部65とし、セレクタ69はその入力先を16×16変換部66とする。入力された変換ブロックサイズが8であれば、セレクタ64はその出力先を8×8変換部65とし、セレクタ69はその入力先を8×8変換部67とする。入力された変換ブロックサイズが4であれば、セレクタ64はその出力先を4×4変換部65とし、セレクタ69はその入力先を4×4変換部68とする。   The transform block division information is input from the terminal 60 and input to the selector 64 and the selector 69. If the input conversion block size is 32, the selector 64 sets the output destination to the 32 × 32 conversion unit 65, and the selector 69 sets the input destination to the 32 × 32 conversion unit 65. Similarly, if the input conversion block size is 16, the selector 64 sets the output destination to the 16 × 16 conversion unit 65, and the selector 69 sets the input destination to the 16 × 16 conversion unit 66. If the input conversion block size is 8, the selector 64 sets the output destination to the 8 × 8 conversion unit 65, and the selector 69 sets the input destination to the 8 × 8 conversion unit 67. If the input conversion block size is 4, the selector 64 sets the output destination to the 4 × 4 conversion unit 65, and the selector 69 sets the input destination to the 4 × 4 conversion unit 68.

端子63から入力された変換ブロックの画素データはセレクタ64で該当するサイズの変換部に入力される。各変換部で変換して得られた変換ブロックの係数データはセレクタ69を介して端子70から出力される。この時、32×32変換部65では図3(a)に示す8×8の部分の値が計算され、その他の白い部分は0となるように変換される。同様に、16×16変換部66では図3(b)に示す8×8の部分の値が計算され、その他の白い部分は0となるように変換される。   The pixel data of the conversion block input from the terminal 63 is input to the conversion unit of the corresponding size by the selector 64. The coefficient data of the conversion block obtained by conversion by each conversion unit is output from the terminal 70 via the selector 69. At this time, the 32 × 32 conversion unit 65 calculates the value of the 8 × 8 portion shown in FIG. 3A, and converts the other white portions to 0. Similarly, the 16 × 16 conversion unit 66 calculates the value of the 8 × 8 portion shown in FIG. 3B, and converts the other white portions to 0.

図1に戻り、直交変換部9で生成された係数データは量子化部10に入力される。量子化部10ではレート制御部14で決定された量子化パラメータを用いて量子化を行い、量子化係数データを生成し、エントロピー符号化部11に出力する。合わせて、この時使用した量子化パラメータもエントロピー符号化部11に出力される。エントロピー符号化部11は入力された量子化パラメータ、量子化係数等を符号化する。符号化の方法は特に限定しないが、例えば、量子化パラメータは直前の変換ブロックの量子化で使用した量子化パラメータとの差分をハフマン符号化する。量子化係数もH.264符号化方式同様に1次元の配列にし、可変長符号化することで実現される。   Returning to FIG. 1, the coefficient data generated by the orthogonal transform unit 9 is input to the quantization unit 10. The quantization unit 10 performs quantization using the quantization parameter determined by the rate control unit 14, generates quantized coefficient data, and outputs the quantized coefficient data to the entropy encoding unit 11. In addition, the quantization parameter used at this time is also output to the entropy encoder 11. The entropy encoding unit 11 encodes the input quantization parameter, quantization coefficient, and the like. The encoding method is not particularly limited. For example, the difference between the quantization parameter and the quantization parameter used in the quantization of the immediately preceding transform block is Huffman encoded. The quantization coefficient is also H.264. Like the H.264 encoding method, it is realized by making a one-dimensional array and performing variable length encoding.

一方、量子化部10で得られた量子化係数データは逆量子化部15に入力され、量子化パラメータを用いて逆量子化を行い、係数データを復元する。復元された係数データは逆直交変換部16に入力され、予測誤差データを復元する。復元された予測誤差データは予測誤差加算部17に入力され、予測部8で生成されたイントラ予測の予測値または動き補償によって得られた予測値が入力され、加算されてフレームメモリ18の対応する領域に格納される。   On the other hand, the quantized coefficient data obtained by the quantizing unit 10 is input to the inverse quantizing unit 15 and is dequantized using the quantization parameter to restore the coefficient data. The restored coefficient data is input to the inverse orthogonal transform unit 16 to restore the prediction error data. The restored prediction error data is input to the prediction error adding unit 17, and the prediction value of intra prediction generated by the prediction unit 8 or the prediction value obtained by motion compensation is input and added to correspond to the frame memory 18. Stored in the area.

また、変換ブロックサイズ・分割決定部4で決定された変換ブロックの分割情報はブロック分割情報符号化部21で符号化される。変換ブロック分割情報は左上、右上、左下、右下の順で符号化されるものとして説明する。分割されていれば1を、分割されていなければ0を割り当てて符号化するものとする。   Further, the division information of the transformation block determined by the transformation block size / division decision unit 4 is encoded by the block division information encoding unit 21. In the following description, it is assumed that the transform block division information is encoded in the order of upper left, upper right, lower left, and lower right. It is assumed that 1 is encoded if it is divided and 0 is allocated if it is not divided.

最初に、基本ブロックに対して分割が生じているので、基本ブロックが分割されていることを表す基本ブロック分割フラグに1を設定する。もし分割がされずに32画素×32画素の変換が行われるのであれば、基本ブロック分割フラグに0を設定する。続いて16画素×16画素の変換ブロックAについて、分割が行われているか否かの情報をAブロック分割フラグとして表す。すなわち、分割されていればこの値は1となり、そうでなければ0となる。ブロックAが再度分割され、8画素×8画素のブロックに分割される場合、再度、4画素×4画素のブロックに分割されるか否かのブロック分割フラグを設定する。   First, since the basic block is divided, 1 is set to the basic block division flag indicating that the basic block is divided. If conversion of 32 pixels × 32 pixels is performed without division, the basic block division flag is set to 0. Subsequently, information indicating whether or not the 16-pixel × 16-pixel conversion block A is divided is represented as an A block division flag. That is, this value is 1 if it is divided, and 0 otherwise. When the block A is divided again and divided into blocks of 8 pixels × 8 pixels, a block division flag indicating whether or not the block A is divided again into blocks of 4 pixels × 4 pixels is set.

図4のブロックの分割について、
1 32画素×32画素のブロックは16画素×16画素ブロックに分割される
0 16画素×16画素のブロックAは分割されない
1 16画素×16画素のブロックBは8画素×8画素ブロックに分割される
0 8画素×8画素のブロックBAは分割されない
0 8画素×8画素のブロックBBは分割されない
0 8画素×8画素のブロックBCは分割されない
0 8画素×8画素のブロックBDは分割されない
1 16画素×16画素のブロックCは8画素×8画素ブロックに分割される
1 8画素×8画素のブロックCAは4画素×4画素ブロックに分割される
0 8画素×8画素のブロックCBは分割されない
1 8画素×8画素のブロックCCは4画素×4画素ブロックに分割される
0 8画素×8画素のブロックCDは分割されない
0 16画素×16画素のブロックDは分割されない
といった状態になる。同様に図5のブロック分割については下記のような変換ブロックの分割フラグを生成する。
1 32画素×32画素のブロックは16画素×16画素ブロックに分割される
1 16画素×16画素のブロックAは8画素×8画素ブロックに分割される
0 8画素×8画素のブロックAAは分割されない
0 8画素×8画素のブロックABは分割されない
0 8画素×8画素のブロックACは分割されない
0 8画素×8画素のブロックADは分割されない
1 16画素×16画素のブロックBは8画素×8画素ブロックに分割される
0 8画素×8画素のブロックBAは分割されない
0 8画素×8画素のブロックBBは分割されない
0 8画素×8画素のブロックBCは分割されない
0 8画素×8画素のブロックBDは分割されない
1 16画素×16画素のブロックCは8画素×8画素ブロックに分割される
1 8画素×8画素のブロックCAは4画素×4画素ブロックに分割される
0 8画素×8画素のブロックCBは分割されない
1 8画素×8画素のブロックCCは4画素×4画素ブロックに分割される
0 8画素×8画素のブロックCDは分割されない
1 16画素×16画素のブロックDは8画素×8画素ブロックに分割される
0 8画素×8画素のブロックDAは分割されない
0 8画素×8画素のブロックDBは分割されない
0 8画素×8画素のブロックDCは分割されない
0 8画素×8画素のブロックDDは分割されない
となる。
Regarding the division of the block of FIG.
1 A block of 32 pixels × 32 pixels is divided into 16 pixel × 16 pixel blocks 0 A block A of 16 pixels × 16 pixels is not divided 1 A block B of 16 pixels × 16 pixels is divided into 8 pixels × 8 pixel blocks 0 The block BA of 8 pixels × 8 pixels is not divided 0 The block BB of 8 pixels × 8 pixels is not divided 0 The block BC of 8 pixels × 8 pixels is not divided 0 The block BD of 8 pixels × 8 pixels is not divided 1 16 pixel × 16 pixel block C is divided into 8 pixel × 8 pixel block 1 8 pixel × 8 pixel block CA is divided into 4 pixel × 4 pixel block 0 8 pixel × 8 pixel block CB is divided No 1 8 pixel × 8 pixel block CC is divided into 4 pixel × 4 pixel block 0 8 pixel × 8 pixel block CD is not divided 0 16 pixel × 1 The 6-pixel block D is not divided. Similarly, for the block division of FIG. 5, the following division block division flags are generated.
1 Block of 32 pixels x 32 pixels is divided into 16 pixels x 16 pixel blocks 1 Block A of 16 pixels x 16 pixels is divided into blocks of 8 pixels x 8 pixels 0 Block AA of 8 pixels x 8 pixels is divided 0 No 8-pixel x 8-pixel block AB is divided 0 8-pixel x 8-pixel block AC is not divided 0 8-pixel x 8-pixel block AD is not divided 1 16-pixel x 16-pixel block B is 8 pixels x Divided into 8 pixel blocks 0 Block BA of 8 pixels x 8 pixels is not divided 0 Block BB of 8 pixels x 8 pixels is not divided 0 Block BC of 8 pixels x 8 pixels is not divided 0 8 pixels x 8 pixels Block BD is not divided 1 16 pixel × 16 pixel block C is divided into 8 pixel × 8 pixel block 1 8 pixel × 8 pixel block CA is 4 The block CB of 8 pixels × 8 pixels is not divided 1 The block CC of 8 pixels × 8 pixels is divided into 4 pixels × 4 pixels blocks 0 The block CD of 8 pixels × 8 pixels Is not divided 1 Block D of 16 pixels x 16 pixels is divided into 8 pixels x 8 pixels block 0 Block DA of 8 pixels x 8 pixels is not divided 0 Block DB of 8 pixels x 8 pixels is not divided 0 8 pixels The block DC of × 8 pixels is not divided. 0 The block DD of 8 pixels × 8 pixels is not divided.

符号の順番はこれに限定されず、例えば、最初に32画素×32画素のブロックの分割フラグ、16画素×16画素ブロックへの分割が行われるのであれば、それに続いて16画素×16画素ブロックの分割フラグ4ビットと続けていけてもよい。4画素×4画素ブロックはそれ以下のサイズの変換ブロックがないため、分割フラグ情報は生成しない。   The order of the codes is not limited to this. For example, if a division flag of a block of 32 pixels × 32 pixels is first divided into 16 pixels × 16 pixel blocks, then a 16 pixel × 16 pixel block is subsequently performed. It may be continued with 4 bits of the division flag. Since the 4 pixel × 4 pixel block has no conversion block of a smaller size, no division flag information is generated.

図11に分割フラグの符号化の流れをフローチャートによって説明する。
ステップS051にて、基本ブロックが16画素×16画素の変換ブロックに分割されているか否かを判定し、分割されているのであればステップS053に進み、そうでなければステップS052に進む。
FIG. 11 is a flowchart for explaining the flow of encoding the division flag.
In step S051, it is determined whether or not the basic block is divided into 16 pixel × 16 pixel conversion blocks. If divided, the process proceeds to step S053; otherwise, the process proceeds to step S052.

ステップS052にて、基本ブロックが16画素×16画素の変換ブロックに分割されていないので符号“0”を分割フラグに割り当てる。その後、変換ブロックの分割がないので、符号化処理を終了する。   In step S052, since the basic block is not divided into 16 pixel × 16 pixel conversion blocks, code “0” is assigned to the division flag. Thereafter, since there is no division of the transform block, the encoding process is terminated.

ステップS053にて、基本ブロックが16画素×16画素の変換ブロックに分割されていないので符号“1”を分割フラグに割り当て、続いて、16画素×16画素ブロック内の処理を行う。   In step S053, since the basic block is not divided into conversion blocks of 16 pixels × 16 pixels, the code “1” is assigned to the division flag, and subsequently, the processing in the 16 pixels × 16 pixel block is performed.

ステップS054にて、左上から右下の順番で対象となっている16画素×16画素の変換ブロックが8画素×8画素の変換ブロックに分割されているか否かを判定する。分割されているのであればステップS056に進み、そうでなければステップS054に進む。   In step S054, it is determined whether or not the target 16 pixel × 16 pixel conversion block is divided into 8 pixel × 8 pixel conversion blocks in the order from upper left to lower right. If so, the process proceeds to step S056; otherwise, the process proceeds to step S054.

ステップS055にて、16画素×16画素の変換ブロックが8画素×8画素の変換ブロックに分割されていないので符号“0”を分割フラグに割り当てる。その後、ステップS061に進む。   In step S055, since the 16 pixel × 16 pixel conversion block is not divided into 8 pixel × 8 pixel conversion blocks, code “0” is assigned to the division flag. Thereafter, the process proceeds to step S061.

ステップS056にて、16画素×16画素の変換ブロックが8画素×8画素の変換ブロックに分割されていないので符号“1”を分割フラグに割り当て、ステップS057に進む。   In step S056, since the 16 pixel × 16 pixel conversion block is not divided into 8 pixel × 8 pixel conversion blocks, code “1” is assigned to the division flag, and the process proceeds to step S057.

ステップS057にて、左上から右下の順番で対象となっている8画素×8画素の変換ブロックが4画素×4画素の変換ブロックに分割されているか否かを判定する。分割されているのであればステップS059に進み、そうでなければステップS058に進む。   In step S057, it is determined whether or not the target 8 pixel × 8 pixel conversion block is divided into 4 pixel × 4 pixel conversion blocks in the order from upper left to lower right. If so, the process proceeds to step S059; otherwise, the process proceeds to step S058.

ステップS058にて、8画素×8画素の変換ブロックが4画素×4画素の変換ブロックに分割されていないので符号“0”を分割フラグに割り当てる。その後、ステップS060に進む。   In step S058, since the conversion block of 8 pixels × 8 pixels is not divided into conversion blocks of 4 pixels × 4 pixels, code “0” is assigned to the division flag. Thereafter, the process proceeds to step S060.

ステップS059にて、8画素×8画素の変換ブロックが4画素×4画素の変換ブロックに分割されていないので符号“1”を分割フラグに割り当て、ステップS060に進む。   In step S059, since the 8 pixel × 8 pixel conversion block is not divided into 4 pixel × 4 pixel conversion blocks, code “1” is assigned to the division flag, and the process proceeds to step S060.

ステップS060にて、処理していた16画素×16画素の変換ブロックの全ての8画素×8画素の変換ブロックの符号化が終わったか否かを判定し、終了していれば、ステップS061に進む。そうでなければ次の8画素×8画素の変換ブロックを処理するためにステップS057に戻る。   In step S060, it is determined whether or not all the 8 pixel × 8 pixel conversion blocks of the processed 16 pixel × 16 pixel conversion block have been encoded, and if completed, the process proceeds to step S061. . Otherwise, the process returns to step S057 to process the next conversion block of 8 pixels × 8 pixels.

ステップS061にて、処理していた32画素×32画素の変換ブロックの全ての16画素×16画素の変換ブロックの符号化が終わったか否かを判定し、終了していれば、分割フラグの符号化処理を終了する。そうでなければ次の8画素×8画素の変換ブロックを処理するためにステップS057に戻る。   In step S061, it is determined whether or not all 16 pixel × 16 pixel conversion blocks of the processed 32 pixel × 32 pixel conversion block have been encoded. The process is terminated. Otherwise, the process returns to step S057 to process the next conversion block of 8 pixels × 8 pixels.

このように、エントロピー符号化部11から量子化パラメータ、量子化係数、予測部8から予測モード、動きベクトル符号化部20から動きベクトルの各符号データと、ブロック分割情報符号化部21で符号化された分割フラグは多重化部12に入力される。多重化部12では所定の順にそれぞれの符号データが整列されて、ビットストリームとして端子13から出力される。   As described above, the entropy encoding unit 11 encodes the quantization parameter and the quantization coefficient, the prediction unit 8 encodes the prediction mode, the motion vector encoding unit 20 encodes the motion vector, and the block division information encoding unit 21 encodes the encoded data. The divided flag is input to the multiplexing unit 12. In the multiplexing unit 12, the respective code data are arranged in a predetermined order and output from the terminal 13 as a bit stream.

また、ビットストリームはレート制御部14に入力され、量子化パラメータ設定部6で設定した量子化パラメータを参照して新たな量子化パラメータが生成される。例えば、量子化パラメータ設定部6で設定した量子化パラメータから変更できる幅を設定してその中で制御を実現するようにする。
以上、符号化の処理の簡単な流れを、図面を用いて説明する。
The bit stream is input to the rate control unit 14, and a new quantization parameter is generated with reference to the quantization parameter set by the quantization parameter setting unit 6. For example, a width that can be changed from the quantization parameter set by the quantization parameter setting unit 6 is set, and control is realized therein.
The simple flow of the encoding process will be described with reference to the drawings.

図9は符号化処理の全体をフローチャートで表した図である。
ステップS001にて、処理を始めるにあたり、画質を決定する量子化パラメータを設定する。
FIG. 9 is a flowchart showing the entire encoding process.
In step S001, a quantization parameter for determining image quality is set when processing is started.

ステップS002にて、設定された量子化パラメータを用いて、使用する変換ブロックの最大サイズを決定する。例えば、設定された量子化パラメータQPと閾値Thとを比較し、量子化パラメータQPが閾値Thより大きければ、変換ブロックの最大サイズを基本ブロックのサイズとする。量子化パラメータQPが閾値Th以下であれば変換ブロックの最大サイズを変換後に変数を0に置き換えることのないブロックサイズと制限する。   In step S002, the maximum size of the transform block to be used is determined using the set quantization parameter. For example, the set quantization parameter QP is compared with the threshold Th, and if the quantization parameter QP is larger than the threshold Th, the maximum size of the transform block is set as the size of the basic block. If the quantization parameter QP is equal to or smaller than the threshold Th, the maximum size of the transform block is limited to a block size in which the variable is not replaced with 0 after the transformation.

ステップS003にて、1フレーム分の画像データを読み込む。
ステップS004にて、読み込まれた1フレーム画像データを基本ブロック(本実施形態では64画素×64画素のブロックに分割する。)
ステップS005にて、1つの基本ブロックデータを読み込み、ブロック分割を行った場合の各サイズでのコストを算出し、コストの総和が最小になるように変換ブロックの分割方法を決定する。
In step S003, image data for one frame is read.
In step S004, the read one-frame image data is divided into basic blocks (in this embodiment, divided into blocks of 64 pixels × 64 pixels).
In step S005, one basic block data is read, the cost at each size when block division is performed is calculated, and the transform block division method is determined so that the total cost is minimized.

ステップS006にて、決定されたブロック分割の情報を符号化する。
ステップS007にて、分割された変換ブロックを順に読み出し、イントラ予測や動画の場合は動き補償を行い、予測値を算出する。
In step S006, the determined block division information is encoded.
In step S007, the divided transform blocks are sequentially read, and in the case of intra prediction or moving image, motion compensation is performed to calculate a prediction value.

ステップS008にて、算出された変換ブロックの予測値と入力を比較し、予測誤差を算出し、その予測誤差をそれぞれのサイズの直交変換を行う。変換後、量子化パラメータによって量子化し、量子化結果を符号化する。   In step S008, the prediction value of the calculated transform block is compared with the input, a prediction error is calculated, and the prediction error is subjected to orthogonal transform of each size. After conversion, quantization is performed using a quantization parameter, and the quantization result is encoded.

ステップS009にて、量子化結果に対して逆量子化、逆直交変換を行い、予測誤差を再生し、ステップS006で算出した予測値と加算し、再生画像を生成して、これを保持する。   In step S009, inverse quantization and inverse orthogonal transform are performed on the quantization result, the prediction error is reproduced, added to the prediction value calculated in step S006, and a reproduced image is generated and held.

ステップS010にて、処理している基本ブロック内の変換ブロックについてステップS007からステップS009の処理が終了したか否かを判定する。終了していれば、ステップS011に進み、終了していなければ次の変換ブロックを対象にしてステップS007からステップS009を行う。   In step S010, it is determined whether or not the processing from step S007 to step S009 has been completed for the conversion block in the basic block being processed. If completed, the process proceeds to step S011, and if not completed, steps S007 to S009 are performed for the next conversion block.

ステップS011にて、符号化された量子化パラメータや量子化係数の符号データ、その他の符号データを出力する。
ステップS012にて、フレーム内の全ての基本ブロックに対して、ステップS005からステップS011までの処理が終了していれば、ステップS012に進み、終了していなければ次の基本ブロックを対象にしてステップS003からステップS012を行う。
In step S011, the encoded quantization parameter, the code data of the quantization coefficient, and other code data are output.
If it is determined in step S012 that the processing from step S005 to step S011 has been completed for all the basic blocks in the frame, the process proceeds to step S012, and if not completed, the next basic block is targeted. Step S012 is performed from S003.

ステップS013にて、画像データの次のフレームがあるか否かを判定し、次フレームがあればステップS003からの処理を行い、もしなければ処理を終了する。   In step S013, it is determined whether or not there is a next frame of the image data. If there is a next frame, the process from step S003 is performed, and if not, the process ends.

以上説明した方法で、分割する際に最大の変換ブロックサイズを決定することにより、係数が強制的に0になる大きな変換ブロックの使用を制限することにより、画質の劣化を効率的に抑制することができる。また、量子化係数の発生を制御する量子化パラメータに基づいてその制御を行うことにより、画質制御を好適に行うことが可能になる。   By determining the maximum transform block size at the time of division by the method described above, the use of a large transform block whose coefficient is forced to 0 is restricted, thereby effectively suppressing image quality degradation. Can do. Further, by performing the control based on the quantization parameter for controlling the generation of the quantization coefficient, the image quality control can be suitably performed.

また、大きな変換ブロックは計算が複雑で、回路規模も大きく消費電力も高いことから、これを最大の変換ブロックサイズが大きな変換ブロックを制限することで、計算量の削減や消費電力の抑制を行うことができるようになる。また、本実施形態では復号側は通常の復号を行うことで画像を再生することができる。   In addition, since the large conversion block is complicated to calculate, the circuit scale is large, and the power consumption is high, by limiting the conversion block with the largest conversion block size, the calculation amount is reduced and the power consumption is suppressed. Will be able to. In the present embodiment, the decoding side can reproduce an image by performing normal decoding.

なお、本実施形態では基本ブロックサイズ、ブロックの分割方法はこれに限定されない。例えば、基本ブロックサイズは64画素×64画素と大きなものを採用しても構わないし、分割方法も例えば8画素×4画素といった長方形でも構わない。   In the present embodiment, the basic block size and the block division method are not limited thereto. For example, the basic block size may be as large as 64 pixels × 64 pixels, and the division method may be a rectangle such as 8 pixels × 4 pixels.

また、本実施形態では量子化パラメータ設定部6で設定した量子化パラメータによって最大変換ブロックサイズを決定し、レート制御14においてその量子化パラメータが大きく変動しないように設定したがこれに限定されない。図7に示すようにレート制御部22で決定された新たな量子化パラメータを最大変換ブロックサイズ決定部23に入力してこれを元にフレームやスライス単位で最大変換ブロックサイズを決定しても構わない。   In the present embodiment, the maximum transform block size is determined by the quantization parameter set by the quantization parameter setting unit 6 and set so that the quantization parameter does not fluctuate greatly in the rate control 14, but the present invention is not limited to this. As shown in FIG. 7, the new quantization parameter determined by the rate control unit 22 may be input to the maximum conversion block size determination unit 23 and the maximum conversion block size may be determined in units of frames or slices based on the new quantization parameter. Absent.

また、本実施形態では変換ブロックサイズ・分割決定部4の構成を図2のように示したが、これに限定されず、各分割でのコストの算出をより正確なものとするため、図8のように構成しても構わない。各ブロックサイズでのコスト算出の前に各ブロックサイズでの予測誤差を用いる方法である。すなわち、80は端子であり、図1のフレームメモリ18から動き予測に必要な参照フレームの画像データを入力する。81は32画素×32画素の単位でイントラ予測または動き補償による予測を行う32×32予測部であり、85は32画素×32画素で動きベクトル探索を行い、予測データを算出する32×32動き補償部である。以下、16×16変換部34の前に16×16予測部82と16×16動き補償部86を、8×8変換部35の前に8×8予測部83と8×8動き補償部87を、4×4変換部36の前に4×4予測部84と4×4動き補償部88を備える。さらには、ここで生成した予測誤差を後段の処理に送ることで、図1の予測部8、動き補償部19を削減することできる。   Further, in the present embodiment, the configuration of the transform block size / division determination unit 4 is shown in FIG. 2, but the present invention is not limited to this, and in order to more accurately calculate the cost in each division, FIG. You may comprise as follows. This is a method of using a prediction error in each block size before calculating the cost in each block size. That is, reference numeral 80 denotes a terminal which inputs reference frame image data necessary for motion prediction from the frame memory 18 of FIG. 81 is a 32 × 32 prediction unit that performs prediction by intra prediction or motion compensation in units of 32 pixels × 32 pixels, and 85 is a 32 × 32 motion that calculates a prediction data by performing a motion vector search with 32 pixels × 32 pixels. Compensation unit. Hereinafter, the 16 × 16 prediction unit 82 and the 16 × 16 motion compensation unit 86 are provided before the 16 × 16 conversion unit 34, and the 8 × 8 prediction unit 83 and the 8 × 8 motion compensation unit 87 are provided before the 8 × 8 conversion unit 35. Is provided with a 4 × 4 prediction unit 84 and a 4 × 4 motion compensation unit 88 before the 4 × 4 conversion unit 36. Furthermore, by sending the prediction error generated here to subsequent processing, the prediction unit 8 and the motion compensation unit 19 in FIG. 1 can be reduced.

また、図10に示すように最大変換ブロックサイズの決定において、量子化パラメータのみならず、量子化マトリックスを考慮することも可能である。すなわち、ステップS002において、設定された量子化パラメータQPと閾値Thとを比較する例について説明したが、量子化パラメータQPのみならず、その量子化マトリックスQM[0〜i](iは変換ブロックのサイズで与えられる)を考慮してもよい。図10では量子化マトリックスQM[0〜i]を設定する量子化マトリックス設定部110があり、ここで設定された量子化マトリックスQM[0〜i]と量子化パラメータQPを用いて、係数Qsumを算出する。
Qsum=Σ(QM[m]×QP)
この係数Qsumと閾値Thmとを比較して、量子化パラメータQsumが閾値Thmより大きければ、変換ブロックの最大サイズを基本ブロックのサイズとする。量子化パラメータQsumが閾値Thm以下であれば変換ブロックの最大サイズを変換後に変数を0に置き換えることのないブロックサイズと制限してもよい。
Further, as shown in FIG. 10, it is possible to consider not only the quantization parameter but also the quantization matrix in determining the maximum transform block size. That is, the example in which the set quantization parameter QP and the threshold value Th are compared in step S002 has been described. However, not only the quantization parameter QP but also the quantization matrix QM [0-i] (i is the transform block). May be considered). In FIG. 10, there is a quantization matrix setting unit 110 that sets the quantization matrix QM [0-i], and the coefficient Qsum is calculated using the quantization matrix QM [0-i] and the quantization parameter QP set here. calculate.
Qsum = Σ (QM [m] × QP)
The coefficient Qsum is compared with the threshold Thm, and if the quantization parameter Qsum is larger than the threshold Thm, the maximum size of the transform block is set as the size of the basic block. If the quantization parameter Qsum is equal to or smaller than the threshold Thm, the maximum size of the transform block may be limited to a block size in which the variable is not replaced with 0 after the transform.

なお、本実施形態ではフレーム間差分を用いた動画像の符号化を例にとって説明したが、これに限定されず、イントラ予測のみを使うことで、静止画像の符号化に用いることができることは自明である。   Although the present embodiment has been described with reference to an example of encoding a moving image using inter-frame differences, it is not limited to this, and it is obvious that only intra prediction can be used to encode a still image. It is.

<実施形態2>
第1の実施形態においては、最大変換ブロックサイズを用いて、変換ブロックのサイズの制限を行う例を示したが、本実施形態では、最大変換ブロックサイズを用いて、ブロック分割の符号化方法の制御を合わせて行う例を説明する。
<Embodiment 2>
In the first embodiment, an example in which the size of the transform block is limited using the maximum transform block size has been described. However, in the present embodiment, the encoding method for block division is used using the maximum transform block size. An example of performing control together will be described.

図12において、107は最大変換ブロックサイズ決定部7で決定された最大変換ブロックサイズを符号化する最大変換ブロックサイズ符号化部である。121はブロック分割情報符号化部であり、第1実施形態のブロック分割情報符号化部21とは最大変換ブロックサイズ決定部7から最大ブロックサイズが入力されることが異なる。112は多重化部である。   In FIG. 12, reference numeral 107 denotes a maximum transform block size encoding unit that encodes the maximum transform block size determined by the maximum transform block size determination unit 7. Reference numeral 121 denotes a block division information encoding unit, which is different from the block division information encoding unit 21 of the first embodiment in that the maximum block size is input from the maximum transform block size determination unit 7. Reference numeral 112 denotes a multiplexing unit.

ブロック分割情報符号化部121の処理を図13のフローチャートを用いて説明する。なお、図13の中で第1の実施形態の図11と同じ処理を行うステップに関しては同番号を付与し、説明を省略する。   The processing of the block division information encoding unit 121 will be described with reference to the flowchart of FIG. In FIG. 13, steps that perform the same processes as those in FIG. 11 of the first embodiment are given the same numbers, and descriptions thereof are omitted.

ステップS151にて、最大変換ブロックサイズ決定部7から入力された変換ブロックの最大サイズが16画素×16画素の変換ブロックか否かを判定する。変換ブロックの最大サイズが16画素×16画素の変換ブロックであればステップS054に進み、そうでなければステップS152に進む。   In step S151, it is determined whether or not the maximum size of the transform block input from the maximum transform block size determination unit 7 is a transform block of 16 pixels × 16 pixels. If the maximum size of the conversion block is a conversion block of 16 pixels × 16 pixels, the process proceeds to step S054; otherwise, the process proceeds to step S152.

ステップS152にて、変換ブロックの最大サイズが8画素×8画素の変換ブロックか否かを判定する。変換ブロックの最大サイズが8画素×8画素の変換ブロックであればステップS059に進み、そうでなければステップS055に進む。   In step S152, it is determined whether the maximum size of the conversion block is a conversion block of 8 pixels × 8 pixels. If the maximum size of the conversion block is a conversion block of 8 pixels × 8 pixels, the process proceeds to step S059; otherwise, the process proceeds to step S055.

以下、ステップS051は最大変換ブロックサイズが32画素×32画素の場合に行われる。この場合、第1の実施形態と同様にステップS051からステップS061の処理を行い、分割フラグを符号化する。   Hereinafter, step S051 is performed when the maximum conversion block size is 32 pixels × 32 pixels. In this case, similarly to the first embodiment, the processing from step S051 to step S061 is performed, and the division flag is encoded.

ステップS151にて最大変換ブロックサイズが16画素×16画素と判定されれば、ステップS054からステップSS061の処理を行い、分割フラグを符号化する。これにより、分割フラグは16画素×16画素の変換ブロックに対する分割(16画素×16画素、8画素×8画素、及び、4画素×4画素)の情報を符号化することになる。   If it is determined in step S151 that the maximum transform block size is 16 pixels × 16 pixels, the processing from step S054 to step SS061 is performed, and the division flag is encoded. Thereby, the division flag encodes information of division (16 pixels × 16 pixels, 8 pixels × 8 pixels, and 4 pixels × 4 pixels) with respect to the conversion block of 16 pixels × 16 pixels.

ステップS152にて最大変換ブロックサイズが8画素×8画素と判定されれば、ステップS054からステップSS061の処理を行い、分割フラグを符号化する。これにより、分割フラグは8画素×8画素の変換ブロックに対する分割(8画素×8画素、及び、4画素×4画素)の情報を符号化することになる。   If it is determined in step S152 that the maximum transform block size is 8 pixels × 8 pixels, the process from step S054 to step SS061 is performed, and the division flag is encoded. Thereby, the division flag encodes information of division (8 pixels × 8 pixels and 4 pixels × 4 pixels) with respect to the conversion block of 8 pixels × 8 pixels.

以上の動作により、図5のブロック分割については、その最大変換ブロックサイズが8画素×8画素であれば、
0 8画素×8画素のブロックAAは分割されない
0 8画素×8画素のブロックABは分割されない
0 8画素×8画素のブロックACは分割されない
0 8画素×8画素のブロックADは分割されない
0 8画素×8画素のブロックBAは分割されない
0 8画素×8画素のブロックBBは分割されない
0 8画素×8画素のブロックBCは分割されない
0 8画素×8画素のブロックBDは分割されない
1 8画素×8画素のブロックCAは4画素×4画素ブロックに分割される
0 8画素×8画素のブロックCBは分割されない
1 8画素×8画素のブロックCCは4画素×4画素ブロックに分割される
0 8画素×8画素のブロックCDは分割されない
0 8画素×8画素のブロックDAは分割されない
0 8画素×8画素のブロックDBは分割されない
0 8画素×8画素のブロックDCは分割されない
0 8画素×8画素のブロックDDは分割されない
となる。第1実施形態で説明した図5の分割フラグの符号化に比べ、
1 32画素×32画素のブロックは16画素×16画素ブロックに分割される
1 16画素×16画素のブロックAは8画素×8画素ブロックに分割される
1 16画素×16画素のブロックBは8画素×8画素ブロックに分割される
1 16画素×16画素のブロックCは8画素×8画素ブロックに分割される
1 16画素×16画素のブロックDは8画素×8画素ブロックに分割される
といった符号が省略できる。
With the above operation, for the block division of FIG. 5, if the maximum conversion block size is 8 pixels × 8 pixels,
0 Block 8A of 8 pixels × 8 pixels is not divided 0 Block AB of 8 pixels × 8 pixels is not divided 0 Block AC of 8 pixels × 8 pixels is not divided 0 Block AD of 8 pixels × 8 pixels is not divided 0 8 The block BA of 8 pixels × 8 pixels is not divided 0 The block BB of 8 pixels × 8 pixels is not divided 0 The block BC of 8 pixels × 8 pixels is not divided 0 The block BD of 8 pixels × 8 pixels is not divided 1 8 pixels × 8 pixel block CA is divided into 4 pixel × 4 pixel block 0 8 pixel × 8 pixel block CB is not divided 1 8 pixel × 8 pixel block CC is divided into 4 pixel × 4 pixel block 0 8 The block CD of 8 pixels × 8 pixels is not divided 0 The block DA of 8 pixels × 8 pixels is not divided 0 The block DB of 8 pixels × 8 pixels is not divided Block DC 0 8 pixels × 8 pixels is the block DD 0 8 pixels × 8 pixels are not divided is not divided. Compared to the encoding of the division flag in FIG. 5 described in the first embodiment,
1 Block of 32 pixels x 32 pixels is divided into 16 pixels x 16 pixel blocks 1 Block A of 16 pixels x 16 pixels is divided into 8 pixels x 8 pixel blocks 1 Block B of 16 pixels x 16 pixels is 8 1 × 16 pixel × 16 pixel block C is divided into 8 × 8 pixel block 1 16 × 16 pixel block D is divided into 8 × 8 pixel block The sign can be omitted.

また、最大変換ブロックサイズは最大変換ブロックサイズ符号化部107で符号化される。符号化方法は特に限定しない。例えば、最大変換ブロックサイズが32画素×32画素であればインデックス“0”を、16画素×16画素であればインデックス“1”を、8画素×8画素であればインデックス“2”を割り振り、2ビットの符号で表現することができる。   The maximum transform block size is encoded by the maximum transform block size encoding unit 107. The encoding method is not particularly limited. For example, if the maximum transform block size is 32 pixels × 32 pixels, an index “0” is assigned, if it is 16 pixels × 16 pixels, an index “1” is assigned, and if it is 8 pixels × 8 pixels, an index “2” is assigned, It can be expressed by a 2-bit code.

符号化された最大ブロックサイズと分割フラグは多重化部112で所定の順にそれぞれの符号データが整列されて、ビットストリームとして端子13から出力される。   The encoded maximum block size and the division flag are output from the terminal 13 as a bit stream by the multiplexing unit 112 aligning the respective code data in a predetermined order.

以上説明した方法で、分割する際に最大の変換ブロックサイズにしたがって、ブロック分割を表す符号を決定することにより、少ない符号量で第1実施形態と同様に、画質の劣化を効率的に抑制することができる。   With the method described above, by determining a code representing block division according to the maximum transform block size at the time of division, it is possible to efficiently suppress deterioration in image quality with a small amount of code as in the first embodiment. be able to.

なお、最大ブロックサイズは量子化パラメータによって決定したが、これに限定されず、個別に設定しても構わない。   Although the maximum block size is determined by the quantization parameter, it is not limited to this and may be set individually.

また、第1、2の実施形態では最大ブロックサイズを基本ブロックサイズと高域を強制的に0にしない例を説明したが、これに限定されず、上記のようにその中間を備え、16画素×16画素とすることも可能である。   In the first and second embodiments, the example in which the maximum block size is not set to the basic block size and the high frequency is forcibly set to 0 has been described. However, the present invention is not limited to this. It is also possible to use x16 pixels.

また、本実施形態では必ず最大変換ブロックサイズを設定するように構成したが、これに限定されず図14の構成をとることも可能である。図14において、端子151は不図示のユーザが設定した最大変換ブロックサイズを用いて符号化するか否かを入力する端子である。最大変換ブロックサイズ決定部158は第1の実施形態の最大変換ブロックサイズ決定部7とは端子151の指示に従って最大変換ブロックサイズの決定を制御する点が異なる。157は最大変換ブロックサイズ符号化部であるが、上記の最大変換ブロックサイズ符号化部157とは端子151からの入力を受ける点が異なる。122は多重化部であり図14の多重化部112とはプロファイルの符号データを受け取ることにある
端子151から最大変換ブロックサイズを設定して符号化を行う場合は、上記の説明と変わらず、最大変換ブロックサイズを決定して最大変換ブロックサイズを符号化して伝送する。端子151から最大変換ブロックサイズを設定しない場合は、最大変換ブロックサイズ決定部158は最大変換ブロックサイズを基本ブロックのサイズ32画素×32画素に固定する。また、最大変換ブロックサイズ符号化部157は動作せず、最大変換ブロックサイズの符号化は行わない。このようにすることで、従来の方式との互換性を保つこともできるようになる。
In the present embodiment, the maximum conversion block size is always set. However, the present invention is not limited to this, and the configuration shown in FIG. 14 can be adopted. In FIG. 14, a terminal 151 is a terminal for inputting whether or not encoding is performed using a maximum transform block size set by a user (not shown). The maximum conversion block size determination unit 158 is different from the maximum conversion block size determination unit 7 of the first embodiment in that the determination of the maximum conversion block size is controlled according to the instruction of the terminal 151. Reference numeral 157 denotes a maximum transform block size encoding unit, which is different from the maximum transform block size encoding unit 157 in that it receives an input from a terminal 151. Reference numeral 122 denotes a multiplexing unit. The encoding unit 112 in FIG. 14 is to receive code data of a profile. When encoding is performed by setting the maximum transform block size from the terminal 151, the same as described above, The maximum transform block size is determined, and the maximum transform block size is encoded and transmitted. When the maximum conversion block size is not set from the terminal 151, the maximum conversion block size determination unit 158 fixes the maximum conversion block size to the basic block size of 32 pixels × 32 pixels. Further, the maximum transform block size encoding unit 157 does not operate, and the maximum transform block size is not encoded. By doing so, compatibility with the conventional method can be maintained.

また、最大変換ブロックサイズを用いて符号化するか否かをビットストリームの属性を表すヘッダ情報に含めることによって実現しても構わない。例えば、H.264符号化方式にあるSEI符号を用いて記述しても良いし、また、本発明を使用するプロファイルを用いても構わない。図15において、160はプロファイル設定部であり、端子151から最大変換ブロックサイズを設定して符号化を行う場合は、最大変換ブロックサイズ符号を用いるプロファイル(例えば拡張プロファイル)とし、符号化を行わない場合は基本プロファイルとする。これらのプロファイルを識別する符号を生成し、多重化部122に入力され、プロファイルを識別する符号をビットストリームに埋め込む。   Moreover, you may implement | achieve by including in the header information showing the attribute of a bit stream whether it encodes using the largest conversion block size. For example, H.M. The SEI code in the H.264 encoding method may be used for description, or a profile using the present invention may be used. In FIG. 15, reference numeral 160 denotes a profile setting unit. When encoding is performed by setting the maximum transform block size from the terminal 151, a profile using the maximum transform block size code (for example, an extension profile) is used, and encoding is not performed. In this case, the basic profile is used. Codes for identifying these profiles are generated and input to the multiplexing unit 122, and the codes for identifying the profiles are embedded in the bitstream.

これにより、ビットストリームの早い段階で最大ブロックサイズによる制御を行うか否かが早い段階で明確になる。ビットストリームの早い段階で制御の可否が分かれば、変換部の省電力化と早期に行うことができるようになる。   This makes it clear at an early stage whether or not to perform control based on the maximum block size at an early stage of the bitstream. If it is determined whether or not control is possible at an early stage of the bitstream, it is possible to save power in the conversion unit and perform it at an early stage.

<実施形態3>
図16は、本発明の第3の実施形態に係る画像復号装置の構成を示すブロック図である。本実施形態では、第1実施形態で生成された符号化データの復号を例にとって説明する。
<Embodiment 3>
FIG. 16 is a block diagram showing a configuration of an image decoding apparatus according to the third embodiment of the present invention. In the present embodiment, a description will be given by taking the decoding of the encoded data generated in the first embodiment as an example.

図16において、201は第1の実施形態で生成されたビットストリームを入力する端子であり、202は第1の実施形態の図1に記載された多重化部12の逆の処理によって、それぞれの符号に分離する分離部である。203は分離部202から量子化パラメータの符号を受け取り、復号する量子化パラメータ復号部である。204は復号された量子化パラメータから最大変換ブロックサイズを算出する最大変換ブロックサイズ設定部である。205は量子化係数の符号データを復号するエントロピー復号部(周波数復号部)である。206は量子化パラメータ復号部203で復号された量子化パラメータを用いて逆量子化を行う逆量子化部(逆周波数変換部)である。207は逆量子化で得られた係数データを復号して予測誤差データを再生する逆直交変換部である。208は分離部202で分離された予測に関する符号を復号し、フレームメモリ213から復号済み画像を読み出して予測を行う予測部である。第1実施形態の図1に記載の予測部8と同様の機能を果たす。209は動きベクトルの符号を復号し、動きベクトルを再生して、動き補償部210に入力する動きベクトル復号部である。210は再生された動きベクトルに基づいてフレームメモリ213から動き補償を行う動き補償部である。211は予測部208で生成された予測データと逆直交変換部207で再生した予測誤差データを加算して復号画像を生成する予測誤差加算部である。212は復号されて得た各変換ブロックの再生画像データを基本ブロックにまとめる基本ブロック合成部である。213は復号画像を保持するフレームメモリである。214は第1実施形態の図1に記載のブロック分割情報符号化部21で符号化された復号するブロック分割情報復号部である。215は端子であり、復号した画像データを外部に出力する端子である。   In FIG. 16, 201 is a terminal for inputting the bit stream generated in the first embodiment, and 202 is each processed by the reverse processing of the multiplexing unit 12 described in FIG. 1 of the first embodiment. It is a separation unit that separates into codes. A quantization parameter decoding unit 203 receives the quantization parameter code from the separation unit 202 and decodes it. A maximum transform block size setting unit 204 calculates the maximum transform block size from the decoded quantization parameter. Reference numeral 205 denotes an entropy decoding unit (frequency decoding unit) that decodes code data of quantized coefficients. Reference numeral 206 denotes an inverse quantization unit (inverse frequency conversion unit) that performs inverse quantization using the quantization parameter decoded by the quantization parameter decoding unit 203. An inverse orthogonal transform unit 207 decodes coefficient data obtained by inverse quantization and reproduces prediction error data. Reference numeral 208 denotes a prediction unit that decodes the code related to the prediction separated by the separation unit 202, reads the decoded image from the frame memory 213, and performs prediction. It performs the same function as the prediction unit 8 described in FIG. 1 of the first embodiment. A motion vector decoding unit 209 decodes a motion vector code, reproduces the motion vector, and inputs the decoded motion vector to the motion compensation unit 210. A motion compensation unit 210 performs motion compensation from the frame memory 213 based on the reproduced motion vector. A prediction error adding unit 211 generates a decoded image by adding the prediction data generated by the prediction unit 208 and the prediction error data reproduced by the inverse orthogonal transform unit 207. Reference numeral 212 denotes a basic block synthesizing unit that collects reproduced image data of each transform block obtained by decoding into basic blocks. A frame memory 213 holds a decoded image. Reference numeral 214 denotes a block division information decoding unit that performs decoding performed by the block division information encoding unit 21 illustrated in FIG. 1 according to the first embodiment. Reference numeral 215 denotes a terminal that outputs the decoded image data to the outside.

上記の構成において、端子201からビットストリームが入力され、分離部202に入力される。分離部202は量子化パラメータに関する符号を量子化パラメータ復号部203に送る。量子化された係数の符号化データはエントロピー復号部205に送る。予測モード、予測の手法等に関する符号化データは予測部208に送る。ブロック分割の情報を表す符号化データはブロック分割情報復号部214に入力される。最初に量子化パラメータの符号化データを読み込み、復号して、量子化パラメータQPを復号する。最大変換ブロックサイズ設定部204は第1実施形態の最大変換ブロックサイズ決定部7と同様に復号された量子化パラメータQPの値がQLであれば、その変換のブロックサイズを最大32画素×32画素とする。また、入力された量子化パラメータQPの値がQSであれば、その変換のブロックサイズの最大を8画素×8画素に限定する。変換ブロックサイズの最大値はエントロピー復号部205、逆量子化部206、逆直交変換部207、動き補償部210、基本ブロック合成部212に入力される。   In the above configuration, a bit stream is input from the terminal 201 and input to the separation unit 202. The separation unit 202 sends a code related to the quantization parameter to the quantization parameter decoding unit 203. The encoded data of the quantized coefficient is sent to the entropy decoding unit 205. Encoded data related to the prediction mode, the prediction method, and the like are sent to the prediction unit 208. Encoded data representing block division information is input to the block division information decoding unit 214. First, the encoded data of the quantization parameter is read and decoded, and the quantization parameter QP is decoded. If the value of the quantization parameter QP decoded as in the maximum transform block size determination unit 7 of the first embodiment is QL, the maximum transform block size setting unit 204 sets the transform block size to a maximum of 32 pixels × 32 pixels. And Further, if the value of the input quantization parameter QP is QS, the maximum block size of the conversion is limited to 8 pixels × 8 pixels. The maximum value of the transform block size is input to the entropy decoding unit 205, the inverse quantization unit 206, the inverse orthogonal transform unit 207, the motion compensation unit 210, and the basic block synthesis unit 212.

量子化係数の符号化データはエントロピー復号部205に入力され、復号を行い、量子化結果を復号する。量子化結果は逆量子化部206に入力され、量子化パラメータ復号部203で復号された量子化パラメータを用いて逆量子化を行い、係数データを得る。係数データは逆直交変換部207に入力され、第1実施形態の図1に記載の逆直交変換部の変換と同様の変換を行い、予測誤差を再生する。再生された予測誤差は予測誤差加算部211に入力される。   The encoded data of the quantized coefficient is input to the entropy decoding unit 205, performs decoding, and decodes the quantization result. The quantization result is input to the inverse quantization unit 206, and inverse quantization is performed using the quantization parameter decoded by the quantization parameter decoding unit 203 to obtain coefficient data. The coefficient data is input to the inverse orthogonal transform unit 207, performs the same transform as the transform of the inverse orthogonal transform unit described in FIG. 1 of the first embodiment, and reproduces the prediction error. The reproduced prediction error is input to the prediction error adding unit 211.

逆直交変換部207の詳細について、図17を用いて説明する。図6において、260は図16の変換ブロック分割復号部214から変換ブロック分割情報を入力する端子である。261は図16の最大変換ブロックサイズ設定部204から変換ブロックの最大サイズを入力する端子である。262は図2の制御器50と同様に、端子261からの入力に従って、32×32変換部265、16×16変換部266を動作させるか否かを制御する制御器である。   Details of the inverse orthogonal transform unit 207 will be described with reference to FIG. In FIG. 6, reference numeral 260 denotes a terminal for inputting transformed block division information from the transformed block division decoding unit 214 of FIG. Reference numeral 261 denotes a terminal for inputting the maximum size of the transform block from the maximum transform block size setting unit 204 in FIG. Similarly to the controller 50 in FIG. 2, the controller 262 controls whether or not to operate the 32 × 32 conversion unit 265 and the 16 × 16 conversion unit 266 in accordance with the input from the terminal 261.

263は図16の予測部8から予測誤差データを入力する端子である。264、269はセレクタであり、端子260から入力された変換ブロック分割情報の変換ブロックサイズに基づいて入力先または出力先を選択する。   263 is a terminal for inputting prediction error data from the prediction unit 8 of FIG. Reference numerals 264 and 269 denote selectors that select an input destination or an output destination based on the transform block size of the transform block division information input from the terminal 260.

265は入力された32画素×32画素の変換ブロックに対して逆DCT変換を行い32×32の画像データを得る32×32逆変換部である。266は入力された16画素×16画素の変換ブロックに対して逆DCT変換を行い16×16の画像データを得る16×16逆変換部である。267は入力された8画素×8画素の変換ブロックに対して逆DCT変換を行い8×8の画像データを得る8×8逆変換部である。268は入力された4画素×4画素の変換ブロックに対して逆DCT変換を行い4×4の画像データを得る4×4逆変換部である。   Reference numeral 265 denotes a 32 × 32 inverse transform unit that performs inverse DCT transform on the input 32 pixel × 32 pixel transform block to obtain 32 × 32 image data. Reference numeral 266 denotes a 16 × 16 inverse conversion unit that performs inverse DCT conversion on the input 16 pixel × 16 pixel conversion block to obtain 16 × 16 image data. Reference numeral 267 denotes an 8 × 8 inverse transform unit that performs inverse DCT transform on the input 8 pixel × 8 pixel transform block to obtain 8 × 8 image data. Reference numeral 268 denotes a 4 × 4 inverse transform unit that performs inverse DCT transform on the input 4 pixel × 4 pixel transform block to obtain 4 × 4 image data.

270は各変換で得られた係数データを出力する端子である。上記の構成において、直交変換処理の動作について説明する。
処理に先立ち、端子261から変換ブロックの最大サイズが入力され、制御器262に入力される。制御器262は変換ブロックの最大サイズが32であれば、32×32逆変換部265、16×16逆変換部266を動作する状態に設定する。また、変換ブロックの最大サイズが8であれば、32×32逆変換部265、16×16逆変換部266を休止する状態に設定する。この時、ハードウェアに供給する電源も切断する。
A terminal 270 outputs coefficient data obtained by each conversion. In the above configuration, the operation of orthogonal transform processing will be described.
Prior to processing, the maximum size of the transform block is input from the terminal 261 and input to the controller 262. If the maximum size of the transform block is 32, the controller 262 sets the 32 × 32 inverse transform unit 265 and the 16 × 16 inverse transform unit 266 to operate. If the maximum size of the transform block is 8, the 32 × 32 inverse transform unit 265 and the 16 × 16 inverse transform unit 266 are set to a paused state. At this time, the power supplied to the hardware is also cut off.

端子260から復号された変換ブロック分割情報が入力され、セレクタ264とセレクタ269に入力される。設定された変換ブロックサイズが32であれば、セレクタ264はその出力先を32×32逆変換部265とし、セレクタ269はその入力先を32×32逆変換部265とする。以下同様に、入力された変換ブロックサイズが16であれば、セレクタ264はその出力先を16×16逆変換部266とし、セレクタ269はその入力先を16×16逆変換部266とする。入力された変換ブロックサイズが8であれば、セレクタ264はその出力先を8×8逆変換部267とし、セレクタ269はその入力先を8×8逆変換部267とする。入力された変換ブロックサイズが4であれば、セレクタ264はその出力先を4×4逆変換部268とし、セレクタ69はその入力先を4×4変換部268とする。   The transformed block division information decoded from the terminal 260 is input to the selector 264 and the selector 269. If the set transform block size is 32, the selector 264 sets the output destination to the 32 × 32 inverse transform unit 265, and the selector 269 sets the input destination to the 32 × 32 inverse transform unit 265. Similarly, if the input transform block size is 16, the selector 264 sets the output destination to the 16 × 16 inverse transform unit 266, and the selector 269 sets the input destination to the 16 × 16 inverse transform unit 266. If the input transform block size is 8, the selector 264 sets the output destination to the 8 × 8 inverse transform unit 267 and the selector 269 sets the input destination to the 8 × 8 inverse transform unit 267. If the input conversion block size is 4, the selector 264 sets the output destination to the 4 × 4 inverse conversion unit 268, and the selector 69 sets the input destination to the 4 × 4 conversion unit 268.

端子263から入力された変換ブロックの係数データはセレクタ264で該当するサイズの逆変換部に入力される。各逆変換部で変換して得られた変換ブロックの予測誤差はセレクタ269を介して端子270から出力される。   The coefficient data of the transform block input from the terminal 263 is input to the inverse transform unit having the corresponding size by the selector 264. The prediction error of the conversion block obtained by conversion in each inverse conversion unit is output from the terminal 270 via the selector 269.

図16に戻り、予測の方法、予測のモード等の符号を予測部208は受け取り、復号する。これにより、イントラ予測であれば、フレームメモリ213から予測に用いる画素を予測モードで選択して予測データを再生する。動き補償であれば、動きベクトルの符号データを動きベクトル復号部209で復号し、この動きベクトルに基づいて、動き補償部210はフレームメモリ213から予測データを生成する。   Returning to FIG. 16, the prediction unit 208 receives and decodes codes such as a prediction method and a prediction mode. Thereby, if it is intra prediction, the pixel used for prediction will be selected from the frame memory 213 in prediction mode, and prediction data will be reproduced | regenerated. In the case of motion compensation, the motion vector code data is decoded by the motion vector decoding unit 209, and the motion compensation unit 210 generates prediction data from the frame memory 213 based on the motion vector.

一方、分離部202で分離されたブロック分割を表す分割フラグはブロック分割情報復号部214で復号され、基本ブロック内の分割状況を取得する。
予測データは予測誤差加算部211に入力され、前述の予測誤差に加算され、再生画像を得る。得られた再生画像は基本ブロック合成部212によって前記基本ブロック内の分割状況に基づいて基本ブロックとして合成される。その後、基本ブロック単位でフレームメモリ213に格納される。再生画像は端子215を介して外部に出力される。
On the other hand, the division flag indicating the block division separated by the separation unit 202 is decoded by the block division information decoding unit 214, and the division state in the basic block is acquired.
Prediction data is input to the prediction error adding unit 211 and added to the above-described prediction error to obtain a reproduced image. The obtained reproduced image is synthesized as a basic block by the basic block synthesis unit 212 based on the division status in the basic block. Thereafter, the data is stored in the frame memory 213 in units of basic blocks. The reproduced image is output to the outside via the terminal 215.

図18は、第3実施形態に係る画像復号装置における画像復号処理を示すフローチャートである。
ステップS201にて、フレームの最初のブロックの量子化パラメータの値QPを復号する。
FIG. 18 is a flowchart showing an image decoding process in the image decoding apparatus according to the third embodiment.
In step S201, the quantization parameter value QP of the first block of the frame is decoded.

ステップS202にて、復号された量子化パラメータQPの値がQLであれば、その変換のブロックサイズを最大32画素×32画素と設定する。また、入力された量子化パラメータQPの値がQSであれば、その変換のブロックサイズの最大を8画素×8画素と設定する。   In step S202, if the value of the decoded quantization parameter QP is QL, the block size of the conversion is set to a maximum of 32 pixels × 32 pixels. Further, if the value of the input quantization parameter QP is QS, the maximum block size of the conversion is set to 8 pixels × 8 pixels.

ステップS203にて、基本ブロック内のブロック分割情報を後述する方法で復号し、変換ブロックのサイズ、位置を獲得する。
ステップS204にて、イントラ予測や動き補償によって予測データを生成する。
In step S203, the block division information in the basic block is decoded by a method to be described later, and the size and position of the transform block are acquired.
In step S204, prediction data is generated by intra prediction or motion compensation.

ステップS205にて、係数の符号データを復号し、予測誤差の量子化結果を取得する。   In step S205, the code data of the coefficient is decoded, and the quantization result of the prediction error is acquired.

ステップS206にて、得られた予測誤差の量子化結果を逆量子化して逆変換を施すことで予測誤差を再生する。再生した予測誤差をステップS204で生成された予測データを加算し、画像データを復元する。   In step S206, the quantization result of the obtained prediction error is inversely quantized and subjected to inverse transformation to reproduce the prediction error. The prediction data generated in step S204 is added to the reproduced prediction error to restore the image data.

ステップS207にて、復元された変換ブロックの画像データはステップS202で取得したブロック分割情報に基づいて基本ブロックを合成する。   In step S207, the restored block image data is synthesized with the basic block based on the block division information acquired in step S202.

ステップS208にて、基本ブロック内の全ての変換ブロックについて処理が終了したか否かを判定する。全ての変換ブロックの復号処理が終了していればステップS209に進む。そうでなければ次の変換ブロックの処理を行うため、ステップS204に進む。   In step S208, it is determined whether or not the processing has been completed for all transform blocks in the basic block. If the decoding process for all the transform blocks has been completed, the process proceeds to step S209. Otherwise, the process proceeds to step S204 to process the next conversion block.

ステップS209にて、フレーム内の全ての基本ブロックについて処理が終了したか否かを判定する。全ての基本ブロックの復号処理が終了していればステップS211に進む。そうでなければ次の基本ブロックの処理を行うため、ステップS203に進む。   In step S209, it is determined whether or not the processing has been completed for all basic blocks in the frame. If the decoding process for all the basic blocks has been completed, the process proceeds to step S211. Otherwise, the process proceeds to step S203 to process the next basic block.

ステップS210にて、復号された1フレーム分の画像データを出力する。
ステップS211にて、次に復号するフレームがあるか否かを判定する。全てのフレームの復号処理が終了していれば画像の復号処理を終了する。そうでなければ次のフレームの処理を行うため、ステップS201に進む。
In step S210, the decoded image data for one frame is output.
In step S211, it is determined whether there is a frame to be decoded next. If the decoding process for all the frames has been completed, the image decoding process is terminated. Otherwise, the process proceeds to step S201 to process the next frame.

図19に分割フラグの復号処理のフローチャートを示す。
ステップS251にて、入力された分割フラグが“0”か“1”かを判定し、“0”であれば、ステップS252に進み、そうでなければ、ステップS253に進む。
FIG. 19 shows a flowchart of the division flag decoding process.
In step S251, it is determined whether the input division flag is “0” or “1”. If “0”, the process proceeds to step S252. Otherwise, the process proceeds to step S253.

ステップS252にて、基本ブロックは分割されず、32画素×32画素で変換ブロックの処理が行われるとし、分割フラグの復号処理を終了する。   In step S252, the basic block is not divided, and the conversion block processing is performed with 32 pixels × 32 pixels, and the division flag decoding processing ends.

ステップS253にて、分割フラグが“1”を示しているので16画素×16画素の変換ブロックに分割されているとする。   In step S253, since the division flag indicates “1”, it is assumed that the division block is divided into 16 pixels × 16 pixels.

ステップS254にて、続いて入力された分割フラグが“0”か“1”かを判定し、“0”であれば、ステップS255に進み、そうでなければ、ステップS256に進む。   In step S254, it is determined whether the subsequently input division flag is “0” or “1”. If “0”, the process proceeds to step S255, and if not, the process proceeds to step S256.

ステップS255にて、16画素×16画素の変換ブロックは分割されず、16画素×16画素で変換ブロックの処理が行われるとし、ステップS261に進む。   In step S255, it is assumed that the conversion block of 16 pixels × 16 pixels is not divided, and the conversion block processing is performed with 16 pixels × 16 pixels, and the process proceeds to step S261.

ステップS256にて、分割フラグが“1”を示しているので8画素×8画素の変換ブロックに分割されているとする。
ステップS257にて、続いて入力された分割フラグが“0”か“1”かを判定し、“0”であれば、ステップS258に進み、そうでなければ、ステップS259に進む。
In step S256, since the division flag indicates “1”, it is assumed that the division block is divided into 8 pixels × 8 pixels.
In step S257, it is determined whether the subsequently input division flag is “0” or “1”. If “0”, the process proceeds to step S258; otherwise, the process proceeds to step S259.

ステップS258にて、8画素×8画素の変換ブロックは分割されず、8画素×8画素で変換ブロックの処理が行われるとし、ステップS260に進む。
ステップS259にて、分割フラグが“1”を示しているので4画素×4画素の変換ブロックに分割されているとする。
ステップS260にて、8画素×8画素の変換ブロック内の4画素×4画素の変換ブロックの有無について復号処理が終了したか否かを判定する。終了していればステップS261に進み、そうでなければ次の8画素×8画素の変換ブロックの処理を行うためにステップS257に進む。
In step S258, the converted block of 8 pixels × 8 pixels is not divided, and the process of the converted block is performed with 8 pixels × 8 pixels, and the process proceeds to step S260.
In step S259, since the division flag indicates “1”, it is assumed that the division block is divided into 4 pixel × 4 pixel conversion blocks.
In step S260, it is determined whether or not the decoding process is completed for the presence or absence of a 4 pixel × 4 pixel conversion block in the 8 pixel × 8 pixel conversion block. If completed, the process proceeds to step S261; otherwise, the process proceeds to step S257 in order to process the next 8 pixel × 8 pixel conversion block.

ステップS261にて、16画素×16画素の変換ブロック内の8画素×8画素以下の変換ブロックの有無について復号処理が終了したか否かを判定する。終了していれば分割フラグの復号処理を終了する。そうでなければ次の16画素×16画素の変換ブロックの処理を行うためにステップS254に進む。
以上の構成と動作により、第1実施形態で生成されたビットストリームにおいて、最大変換ブロックサイズの設定を量子化パラメータから行うことで復号側でも演算量の削減や消費電力の低減が可能になる。
さらに、逆量子化部206、逆直交変換部207、動き補償部210においては、バッファのサイズを適応的に確保することにより、メモリ等のハードウェア資源を有効に活用できる。動き補償部210では最大変換ブロックサイズを取得することで、フレームメモリ213からの読み出しの時のバッファを適応的に確保する。
In step S261, it is determined whether or not the decoding process is completed with respect to the presence or absence of a conversion block of 8 pixels × 8 pixels or less in the conversion block of 16 pixels × 16 pixels. If completed, the division flag decoding process ends. Otherwise, the process proceeds to step S254 to process the next 16 pixel × 16 pixel conversion block.
With the configuration and operation described above, in the bit stream generated in the first embodiment, the maximum transform block size is set from the quantization parameter, so that the amount of computation and power consumption can be reduced even on the decoding side.
Furthermore, in the inverse quantization unit 206, the inverse orthogonal transform unit 207, and the motion compensation unit 210, hardware resources such as a memory can be effectively used by adaptively securing the buffer size. The motion compensation unit 210 adaptively secures a buffer for reading from the frame memory 213 by acquiring the maximum transform block size.

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

図20において、第3の実施形態の図16と同じ機能を果たすブロックについては同じ番号を付与し、説明を省略する。
302は第1の実施形態の図14に記載された多重化部112の逆の処理によって、それぞれの符号に分離する分離部である。304は分離部302で分離された最大変換ブロックサイズを示す符号を復号する最大変換ブロックサイズ復号部である。314はブロック分割情報復号部であり、最大変換ブロックサイズ復号部から最大変換ブロックサイズの情報を取得してブロック分割情報を復号する。
In FIG. 20, blocks having the same functions as those in FIG. 16 of the third embodiment are assigned the same numbers, and descriptions thereof are omitted.
Reference numeral 302 denotes a demultiplexing unit that demultiplexes each code by the reverse process of the multiplexing unit 112 described in FIG. 14 of the first embodiment. A maximum transform block size decoding unit 304 decodes a code indicating the maximum transform block size separated by the separation unit 302. Reference numeral 314 denotes a block division information decoding unit that obtains information on the maximum conversion block size from the maximum conversion block size decoding unit and decodes the block division information.

上記の構成において、画像の復号処理の動作について説明する。
ビットストリームが端子201から入力され、分離部302に入力される。分離部302ではヘッダ情報、量子化パラメータの符号、最大変換ブロックサイズの符号、係数データの符号、動きベクトルの符号、ブロック分割情報の符号を入力し、それぞれを分離して後段に出力する。最大変換ブロックサイズの符号は最大変換ブロックサイズ復号部304に入力され、復号される。第2の実施形態ではそのサイズをインデックスとして符号化している。これを復号し、最大変換ブロックサイズが32画素×32画素/8画素×8画素のいずれかを取得する。取得した最大変換ブロックサイズの情報は関係する各部とブロック分割情報復号部314に入力する。
The operation of the image decoding process in the above configuration will be described.
A bit stream is input from the terminal 201 and input to the separation unit 302. The separation unit 302 inputs header information, a quantization parameter code, a maximum transform block size code, a coefficient data code, a motion vector code, and a block division information code, which are separated and output to the subsequent stage. The code of the maximum transform block size is input to the maximum transform block size decoding unit 304 and decoded. In the second embodiment, the size is encoded as an index. This is decoded, and the maximum conversion block size is acquired as 32 pixels × 32 pixels / 8 pixels × 8 pixels. The acquired information on the maximum transform block size is input to the related units and the block division information decoding unit 314.

ブロック分割情報復号部314は、最大変換ブロックサイズを最大変換ブロックサイズ復号部304から入力し、ブロック分割情報を表す分割フラグを分離部から入力する。   The block division information decoding unit 314 inputs the maximum transformation block size from the maximum transformation block size decoding unit 304 and inputs a division flag representing the block division information from the separation unit.

図21にその詳細な処理をフローチャートにして示す。図21において、図19と機能を果たすステップは同じ番号を付与し、その説明を省略する。   FIG. 21 is a flowchart showing the detailed processing. In FIG. 21, the steps having the same functions as those in FIG. 19 are given the same numbers, and the description thereof is omitted.

ステップS301にて、最大変換ブロックサイズが16画素×16画素であるか否かを判定し、そうであればステップS254に進み、そうでなければステップS302に進む。   In step S301, it is determined whether or not the maximum transform block size is 16 pixels × 16 pixels. If so, the process proceeds to step S254, and if not, the process proceeds to step S302.

ステップS302にて、最大変換ブロックサイズが8画素×8画素であるか否かを判定し、そうであればステップS257に進み、そうでなければステップS251に進む。   In step S302, it is determined whether or not the maximum conversion block size is 8 pixels × 8 pixels. If so, the process proceeds to step S257, and if not, the process proceeds to step S251.

以上の動作により、最大変換ブロックサイズが32画素×32画素であれば、ステップS251からステップS261の処理を行う。最大変換ブロックサイズが16画素×16画素であれば、ステップS254からステップS261の処理を行う。最大変換ブロックサイズが8画素×8画素であれば、ステップS257からステップS261の処理を行う。   With the above operation, if the maximum conversion block size is 32 pixels × 32 pixels, the processing from step S251 to step S261 is performed. If the maximum conversion block size is 16 pixels × 16 pixels, the processing from step S254 to step S261 is performed. If the maximum conversion block size is 8 pixels × 8 pixels, the processing from step S257 to step S261 is performed.

以上の構成と動作により、第2実施形態で生成されたビットストリームにおいて、最大変換ブロックサイズの設定を量子化パラメータから行うことで復号側でも演算量の削減や消費電力の低減が可能になる。すなわち、最大変換ブロックサイズが符号化されているため、第1実施形態の符号に比べ、短い符号に対しても同様の効果を得ることができる。   With the above configuration and operation, in the bitstream generated in the second embodiment, the maximum transform block size is set from the quantization parameter, so that the amount of computation and power consumption can be reduced even on the decoding side. That is, since the maximum transform block size is encoded, the same effect can be obtained for a short code as compared with the code of the first embodiment.

なお、第2の実施形態において、最大変換ブロックサイズを用いて符号化するか否かをビットストリームの属性を表すヘッダ情報に含める方法について説明した。この符号に対しても図22に示す構成をとることで復号できる。すなわち、ビットストリームに埋め込まれたプロファイルを識別する符号を分離器402が分離し、プロファイル復号部453に入力する。プロファイル復号部453は最大変換ブロックサイズ符号を用いるプロファイル(例えば拡張プロファイル)か符号化を行わない場合は基本プロファイルを復号する。拡張プロファイルであれば、最大変換ブロックサイズ復号部404を動作させて最大変換ブロックサイズを取得する。そうでなければ最大変換ブロックサイズを32に固定して出力するように設定することで同様の効果を得ることができる。   Note that, in the second embodiment, a method has been described in which whether or not encoding is performed using the maximum transform block size is included in the header information indicating the attribute of the bitstream. This code can also be decoded by taking the configuration shown in FIG. That is, the code | symbol which identifies the profile embedded in the bit stream is isolate | separated by the separator 402, and it inputs into the profile decoding part 453. FIG. The profile decoding unit 453 decodes a profile using the maximum transform block size code (for example, an extended profile) or a basic profile when encoding is not performed. If the profile is an extended profile, the maximum transform block size decoding unit 404 is operated to obtain the maximum transform block size. Otherwise, the same effect can be obtained by setting the maximum transform block size to 32 and outputting it.

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

図20において、第3の実施形態の図16と同じ機能を果たすブロックについては同じ番号を付与し、説明を省略する。   In FIG. 20, blocks having the same functions as those in FIG. 16 of the third embodiment are assigned the same numbers, and descriptions thereof are omitted.

302は第1の実施形態の図14に記載された多重化部112の逆の処理によって、それぞれの符号に分離する分離部である。304は分離部302で分離された最大変換ブロックサイズを示す符号を復号する最大変換ブロックサイズ復号部である。314はブロック分割情報復号部であり、最大変換ブロックサイズ復号部から最大変換ブロックサイズの情報を取得してブロック分割情報を復号する。   Reference numeral 302 denotes a demultiplexing unit that demultiplexes each code by the reverse process of the multiplexing unit 112 described in FIG. 14 of the first embodiment. A maximum transform block size decoding unit 304 decodes a code indicating the maximum transform block size separated by the separation unit 302. Reference numeral 314 denotes a block division information decoding unit that obtains information on the maximum conversion block size from the maximum conversion block size decoding unit and decodes the block division information.

上記の構成において、画像の復号処理の動作について説明する。
ビットストリームが端子201から入力され、分離部302に入力される。分離部302ではヘッダ情報、量子化パラメータの符号、最大変換ブロックサイズの符号、係数データの符号、動きベクトルの符号、ブロック分割情報の符号を入力し、それぞれを分離して後段に出力する。最大変換ブロックサイズの符号は最大変換ブロックサイズ復号部304に入力され、復号される。第2の実施形態ではそのサイズをインデックスとして符号化している。これを復号し、最大変換ブロックサイズが32画素×32画素/8画素×8画素のいずれかを取得する。取得した最大変換ブロックサイズの情報は関係する各部とブロック分割情報復号部314に入力する。
The operation of the image decoding process in the above configuration will be described.
A bit stream is input from the terminal 201 and input to the separation unit 302. The separation unit 302 inputs header information, a quantization parameter code, a maximum transform block size code, a coefficient data code, a motion vector code, and a block division information code, which are separated and output to the subsequent stage. The code of the maximum transform block size is input to the maximum transform block size decoding unit 304 and decoded. In the second embodiment, the size is encoded as an index. This is decoded, and the maximum conversion block size is acquired as 32 pixels × 32 pixels / 8 pixels × 8 pixels. The acquired information on the maximum transform block size is input to the related units and the block division information decoding unit 314.

ブロック分割情報復号部314は、最大変換ブロックサイズを最大変換ブロックサイズ復号部304から入力し、ブロック分割情報を表す分割フラグを分離部から入力する。   The block division information decoding unit 314 inputs the maximum transformation block size from the maximum transformation block size decoding unit 304 and inputs a division flag representing the block division information from the separation unit.

図21にその詳細な処理をフローチャートにして示す。図21において、図19と機能を果たすステップは同じ番号を付与し、その説明を省略する。
ステップS301にて、最大変換ブロックサイズが16画素×16画素であるか否かを判定し、そうであればステップS254に進み、そうでなければステップS302に進む。
FIG. 21 is a flowchart showing the detailed processing. In FIG. 21, the steps having the same functions as those in FIG. 19 are given the same numbers, and the description thereof is omitted.
In step S301, it is determined whether or not the maximum transform block size is 16 pixels × 16 pixels. If so, the process proceeds to step S254, and if not, the process proceeds to step S302.

ステップS302にて、最大変換ブロックサイズが8画素×8画素であるか否かを判定し、そうであればステップS257に進み、そうでなければステップS251に進む。   In step S302, it is determined whether or not the maximum conversion block size is 8 pixels × 8 pixels. If so, the process proceeds to step S257, and if not, the process proceeds to step S251.

以上の動作により、最大変換ブロックサイズが32画素×32画素であれば、ステップS251からステップS261の処理を行う。最大変換ブロックサイズが16画素×16画素であれば、ステップS254からステップS261の処理を行う。最大変換ブロックサイズが8画素×8画素であれば、ステップS257からステップS261の処理を行う。   With the above operation, if the maximum conversion block size is 32 pixels × 32 pixels, the processing from step S251 to step S261 is performed. If the maximum conversion block size is 16 pixels × 16 pixels, the processing from step S254 to step S261 is performed. If the maximum conversion block size is 8 pixels × 8 pixels, the processing from step S257 to step S261 is performed.

以上の構成と動作により、第2実施形態で生成されたビットストリームにおいて、最大変換ブロックサイズの設定を量子化パラメータから行うことで復号側でも演算量の削減や消費電力の低減が可能になる。すなわち、最大変換ブロックサイズが符号化されているため、第1実施形態の符号に比べ、短い符号に対しても同様の効果を得ることができる。   With the above configuration and operation, in the bitstream generated in the second embodiment, the maximum transform block size is set from the quantization parameter, so that the amount of computation and power consumption can be reduced even on the decoding side. That is, since the maximum transform block size is encoded, the same effect can be obtained for a short code as compared with the code of the first embodiment.

なお、第2の実施形態において、最大変換ブロックサイズを用いて符号化するか否かをビットストリームの属性を表すヘッダ情報に含める方法について説明した。この符号に対しても図22に示す構成をとることで復号できる。すなわち、ビットストリームに埋め込まれたプロファイルを識別する符号を分離器402が分離し、プロファイル復号部453に入力する。プロファイル復号部453は最大変換ブロックサイズ符号を用いるプロファイル(例えば拡張プロファイル)か符号化を行わない場合は基本プロファイルを復号する。拡張プロファイルであれば、最大変換ブロックサイズ復号部404を動作させて最大変換ブロックサイズを取得する。そうでなければ最大変換ブロックサイズを32に固定して出力するように設定することで同様の効果を得ることができる。   Note that, in the second embodiment, a method has been described in which whether or not encoding is performed using the maximum transform block size is included in the header information indicating the attribute of the bitstream. This code can also be decoded by taking the configuration shown in FIG. That is, the code | symbol which identifies the profile embedded in the bit stream is isolate | separated by the separator 402, and it inputs into the profile decoding part 453. FIG. The profile decoding unit 453 decodes a profile using the maximum transform block size code (for example, an extended profile) or a basic profile when encoding is not performed. If the profile is an extended profile, the maximum transform block size decoding unit 404 is operated to obtain the maximum transform block size. Otherwise, the same effect can be obtained by setting the maximum transform block size to 32 and outputting it.

<実施形態6>
上述した各処理部はハードウェアでもって構成しているものとして上記実施形態では説明した。しかし、上述した各処理部で行なう処理をコンピュータプログラムでもって構成しても良い。
<Embodiment 6>
The above-described embodiments have been described on the assumption that each processing unit described above is configured by hardware. However, the processing performed by each processing unit described above may be configured by a computer program.

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

CPU2301は、RAM2302やROM2303に格納されているコンピュータプログラムやデータを用いてコンピュータ全体の制御を行うと共に、上記各実施形態に係る画像処理装置が行うものとして上述した各処理を実行する。即ち、CPU2301は、上述した各処理部として機能することになる。   The CPU 2301 controls the entire computer using computer programs and data stored in the RAM 2302 and the ROM 2303, and executes each process described above as performed by the image processing apparatus according to each of the above embodiments. That is, the CPU 2301 functions as each processing unit described above.

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

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

外部記憶装置2306は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置2306には、OS(オペレーティングシステム)や、上述した各部の機能をCPU2301に実現させるためのコンピュータプログラムが保存されている。更には、外部記憶装置2306には、処理対象としての各画像データが保存されていても良い。   The external storage device 2306 is a mass information storage device represented by a hard disk drive device. The external storage device 2306 stores an OS (Operating System) and computer programs for causing the CPU 2301 to realize the functions of the above-described units. Furthermore, each image data as a processing target may be stored in the external storage device 2306.

外部記憶装置2306に保存されているコンピュータプログラムやデータは、CPU2301による制御に従って適宜RAM2302にロードされ、CPU2301による処理対象となる。I/F2307には、LANやインターネット等のネットワーク、投影装置や表示装置などの他の機器を接続することができ、本コンピュータはこのI/F2307を介して様々な情報を取得したり、送出したりすることができる。2308は上述の各部を繋ぐバスである。   Computer programs and data stored in the external storage device 2306 are appropriately loaded into the RAM 2302 under the control of the CPU 2301 and are processed by the CPU 2301. The I / F 2307 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 2307. Can be. Reference numeral 2308 denotes a bus connecting the above-described units.

上述の構成からなる作動は前述のフローチャートで説明した作動をCPU2301が中心となってその制御を行う。   The operation having the above-described configuration is controlled by the CPU 2301 centering on 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.

本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するコンピュータプログラムのコードが格納されることになる。   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.

Claims (10)

符号化制御パラメータを設定する設定手段と、
第1のサイズを持つブロックの画素データを周波数変換し、変換係数の一部を除いて所定の値に置き換えて変換を行う第1の変換手段と、
前記第1のサイズより小さい第2のサイズを持つブロックの画素データを周波数変換する第2の変換手段と、
前記符号化制御パラメータに基づき、前記第1の変換手段の使用を制限するブロックサイズ決定手段と、
前記決定されたブロックサイズに基づいて前記第1の変換手段の出力または前記第2の変換手段の出力を制御して符号化する符号化手段と、
を有することを特徴とする画像符号化装置。
Setting means for setting encoding control parameters;
First conversion means for performing frequency conversion on pixel data of a block having a first size and converting the pixel data to a predetermined value except for a part of the conversion coefficient;
Second conversion means for frequency-converting pixel data of a block having a second size smaller than the first size;
A block size determining means for restricting the use of the first converting means based on the encoding control parameter;
Encoding means for controlling and encoding the output of the first conversion means or the output of the second conversion means based on the determined block size;
An image encoding apparatus comprising:
前記ブロックサイズ決定手段が前記符号化制御パラメータの値と閾値を比較し、前記符号化制御パラメータの値が前記閾値よりも小さい場合に第2のサイズのブロックのみを用い、そうでなければ第1および第2のサイズのブロックを用いることを決定することを特徴とする請求項1に記載の画像符号化装置。   The block size determining means compares the value of the encoding control parameter with a threshold value, and uses only the block of the second size when the value of the encoding control parameter is smaller than the threshold value; The image coding apparatus according to claim 1, wherein the use of the second size block and the second size block is determined. 前記符号化手段が前記ブロックサイズ決定手段の結果に基づき、符号化する際のブロックを選択することを特徴とする請求項1に記載の画像符号化装置。   The image encoding apparatus according to claim 1, wherein the encoding unit selects a block for encoding based on a result of the block size determining unit. 前記符号化制御パラメータは量子化ステップから算出される値であることを特徴とする請求項1に記載の画像符号化装置。   The image coding apparatus according to claim 1, wherein the coding control parameter is a value calculated from a quantization step. 前記符号化制御パラメータによるブロックサイズの制御を行うか否かの情報を符号化することを特徴とする請求項1に記載の画像符号化装置。   The image encoding apparatus according to claim 1, wherein information indicating whether to control a block size according to the encoding control parameter is encoded. 画像符号化装置を制御する画像符号化方法であって、
符号化制御パラメータを設定する設定工程と、
第1のサイズを持つブロックの画素データを周波数変換し、変換係数の一部を除いて所定の値に置き換えて変換を行う第1の変換工程と、
第1のサイズより小さい第2のサイズを持つブロックの画素データを周波数変換する第2の変換工程と、
前記符号化制御パラメータに基づき、第1の変換工程の使用を制限するブロックサイズ決定工程と、
前記決定されたブロックサイズに基づいて前記第1の変換工程の出力または前記第2の変換工程の出力を制御して符号化する符号化工程と、
を有することを特徴とする画像符号化方法。
An image encoding method for controlling an image encoding device, comprising:
A setting step for setting an encoding control parameter;
A first conversion step in which pixel data of a block having a first size is subjected to frequency conversion, and conversion is performed by replacing a predetermined value except for a part of the conversion coefficient;
A second conversion step of frequency-converting pixel data of a block having a second size smaller than the first size;
A block size determination step for restricting the use of the first conversion step based on the encoding control parameter;
An encoding step of controlling and encoding the output of the first conversion step or the output of the second conversion step based on the determined block size;
An image encoding method characterized by comprising:
量子化ステップを表す符号化データを復号し、符号化制御パラメータを復元する復号手段と、
ブロックまたはブロック内を再分割したブロック内の係数を表す符号化データを復号する周波数復号手段と、
第1のサイズを持つブロックのデータを逆周波数変換し、画素データを生成する第1の逆変換手段と、
第1のサイズより小さい第2のサイズを持つブロックのデータを逆周波数変換し、画素データを生成する第2の逆変換手段と、
前記符号化制御パラメータに基づき、符号化されているブロックサイズを獲得するブロックサイズ復元手段と、
前記周波数復号手段の結果を前記獲得されたブロックサイズに基づいて前記第1の逆変換手段または前記第2の逆変換手段への入力を制御して画像データを復号する復号手段と、
を有することを特徴とする画像復号装置。
Decoding means for decoding encoded data representing a quantization step and restoring encoding control parameters;
A frequency decoding means for decoding encoded data representing a block or a coefficient in a block obtained by re-dividing the block;
First inverse transform means for inverse frequency transforming data of a block having a first size to generate pixel data;
A second inverse transform means for performing inverse frequency transform on data of a block having a second size smaller than the first size to generate pixel data;
A block size restoring means for obtaining a coded block size based on the coding control parameter;
Decoding means for decoding the image data by controlling the input to the first inverse transform means or the second inverse transform means based on the obtained block size, the result of the frequency decoding means;
An image decoding apparatus comprising:
画像復号装置を制御する画像復号方法であって、
量子化ステップを表す符号化データを復号し、符号化制御パラメータを復元する復号工程と、
ブロックまたはブロック内を再分割したブロック内の係数を表す符号化データを復号する周波数復号工程と、
第1のサイズを持つブロックのデータを逆周波数変換し、画素データを生成する第1の逆変換工程と、
第1のサイズより小さい第2のサイズを持つブロックのデータを逆周波数変換し、画素データを生成する第2の逆変換工程と、
前記符号化制御パラメータに基づき、符号化されているブロックサイズを獲得するブロックサイズ復元工程と、
前記周波数復号工程の結果を前記獲得されたブロックサイズに基づいて前記第1の逆変換工程または前記第2の逆変換工程への入力を制御して画像データを復号する復号工程と、
を有することを特徴とする画像復号方法。
An image decoding method for controlling an image decoding device, comprising:
A decoding step of decoding encoded data representing a quantization step and restoring an encoding control parameter;
A frequency decoding step of decoding encoded data representing a block or a coefficient in a block obtained by re-dividing the block;
A first inverse transform step of inverse frequency transforming data of a block having a first size to generate pixel data;
A second inverse transformation step of inverse frequency transforming data of a block having a second size smaller than the first size to generate pixel data;
Based on the encoding control parameter, a block size restoration step for obtaining the encoded block size;
A decoding step of decoding image data by controlling an input to the first inverse transformation step or the second inverse transformation step based on the obtained block size based on the result of the frequency decoding step;
An image decoding method characterized by comprising:
コンピュータが読み出して実行することにより、前記コンピュータを、請求項1に記載の画像符号化装置として機能させることを特徴とするプログラム。   A program that causes a computer to function as the image encoding device according to claim 1 by being read and executed by the computer. コンピュータが読み出して実行することにより、前記コンピュータを、請求項7に記載の画像復号装置として機能させることを特徴とするプログラム。   A program that causes the computer to function as the image decoding device according to claim 7 by being read and executed by the computer.
JP2011004645A 2011-01-13 2011-01-13 Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program Pending JP2012147290A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2011004645A JP2012147290A (en) 2011-01-13 2011-01-13 Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program
PCT/JP2012/000154 WO2012096184A1 (en) 2011-01-13 2012-01-12 Image encoding apparatus, image encoding method, program, image decoding apparatus, image decoding method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011004645A JP2012147290A (en) 2011-01-13 2011-01-13 Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program

Publications (1)

Publication Number Publication Date
JP2012147290A true JP2012147290A (en) 2012-08-02

Family

ID=46507089

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011004645A Pending JP2012147290A (en) 2011-01-13 2011-01-13 Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program

Country Status (2)

Country Link
JP (1) JP2012147290A (en)
WO (1) WO2012096184A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015076666A (en) * 2013-10-07 2015-04-20 日本電気株式会社 Block structure determination circuit and information compression circuit
JP2015211269A (en) * 2014-04-24 2015-11-24 富士通株式会社 Moving image encoding device, moving image encoding method and computer program for moving image encoding
CN105284110A (en) * 2013-07-31 2016-01-27 松下电器(美国)知识产权公司 Image coding method, and image coding device
WO2019188465A1 (en) * 2018-03-30 2019-10-03 ソニー株式会社 Image encoding device, image encoding method, image decoding device, and image decoding method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111316641B (en) 2018-05-03 2022-08-09 Lg电子株式会社 Method and apparatus for decoding image using transform according to block size

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04211575A (en) * 1990-04-27 1992-08-03 Ricoh Co Ltd Orthogonal convertion operation device
JPH11146403A (en) * 1997-11-12 1999-05-28 Matsushita Electric Ind Co Ltd Video signal encoding device, video signal encoding method, and video signal encoding program storage medium
US8179962B2 (en) * 2004-09-08 2012-05-15 Panasonic Corporation Motion image encoding method and motion image decoding method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105284110A (en) * 2013-07-31 2016-01-27 松下电器(美国)知识产权公司 Image coding method, and image coding device
CN105284110B (en) * 2013-07-31 2019-04-23 太阳专利托管公司 Image coding method and image coding device
JP2015076666A (en) * 2013-10-07 2015-04-20 日本電気株式会社 Block structure determination circuit and information compression circuit
JP2015211269A (en) * 2014-04-24 2015-11-24 富士通株式会社 Moving image encoding device, moving image encoding method and computer program for moving image encoding
WO2019188465A1 (en) * 2018-03-30 2019-10-03 ソニー株式会社 Image encoding device, image encoding method, image decoding device, and image decoding method

Also Published As

Publication number Publication date
WO2012096184A1 (en) 2012-07-19

Similar Documents

Publication Publication Date Title
JP5197630B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP5432355B2 (en) Method and apparatus for intra-predictive video coding
EP3512199B1 (en) Image coding apparatus, method for coding image, program therefor, image decoding apparatus, method for decoding image, and program therefor
JP2008306719A (en) Video encoding method and apparatus, decoding method and apparatus using inter-color compensation
JP2008193627A (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP5871628B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
KR20200091848A (en) Method for intra prediction and apparatus thereof
JP7536484B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP2012147290A (en) Image coding apparatus, image coding method, program, image decoding apparatus, image decoding method, and program
TW202101990A (en) Image coding device, image decoding device, method, and program
JP5378939B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, and program
JP5706264B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, and image decoding program
JP2007013298A (en) Image coding apparatus
JP2017073602A (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program
US10448035B2 (en) Information compression device, information compression method, non-volatile recording medium, and video coding device
TWI803709B (en) Image encoding device, image decoding device, control method and program thereof
JP5235818B2 (en) Moving picture coding apparatus, moving picture coding apparatus control method, and program
JP2018110313A (en) Moving picture coding apparatus, moving picture coding method, moving picture coding computer program, moving picture decoding apparatus, moving picture decoding method, and moving picture decoding computer program
JP2010010768A (en) Image encoding apparatus and image encoding method
US20130215965A1 (en) Video encoding and decoding using an epitome
JP2006191287A (en) Image coding apparatus, image coding method, and image coding program
JP2006135786A (en) Lossless video encoding device, lossless video encoding method, lossless video decoding device, lossless video decoding method, lossless video encoding program, lossless video decoding program, and recording medium for those programs
JP2013197628A (en) Moving picture encoding apparatus, moving picture encoding method, and program
JP2011199629A (en) Moving image coding apparatus, moving image coding method, moving image coding computer program and video transmission device