JP4937224B2 - Image encoding device - Google Patents

Image encoding device Download PDF

Info

Publication number
JP4937224B2
JP4937224B2 JP2008255611A JP2008255611A JP4937224B2 JP 4937224 B2 JP4937224 B2 JP 4937224B2 JP 2008255611 A JP2008255611 A JP 2008255611A JP 2008255611 A JP2008255611 A JP 2008255611A JP 4937224 B2 JP4937224 B2 JP 4937224B2
Authority
JP
Japan
Prior art keywords
block size
inter
intra
prediction
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008255611A
Other languages
Japanese (ja)
Other versions
JP2009005413A (en
Inventor
渉 浅野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008255611A priority Critical patent/JP4937224B2/en
Publication of JP2009005413A publication Critical patent/JP2009005413A/en
Application granted granted Critical
Publication of JP4937224B2 publication Critical patent/JP4937224B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像符号化装置に関する。   The present invention relates to an image encoding device.

H.264(MPEG−4 AVC)はイントラ符号化モードとインター符号化モードとを備える動画像符号化方式である。一般的なH.264の動画像符号化装置はこれら各モードを適応的に使い分ける。各モードの選択方法には、例えば、各モードの符号化コストが最小となる予測ブロックサイズと直交変換ブロックサイズとの組み合わせを求め、それら符号化コストの小さいほうのモードを最適なモードとして選択する方法がある。   H. H.264 (MPEG-4 AVC) is a moving picture coding system having an intra coding mode and an inter coding mode. General H.P. H.264 video encoding apparatus uses these modes adaptively. As a method for selecting each mode, for example, a combination of a prediction block size and an orthogonal transform block size that minimizes the coding cost of each mode is obtained, and the mode with the smaller coding cost is selected as the optimum mode. There is a way.

予測ブロックサイズは、イントラ符号化モード、インター符号化モードの場合共に、予測画像と入力画像の差分値の絶対値和(SAD)である符号化コストを計算し、符号化コストが最小のものが選択される。   As for the prediction block size, in both the intra coding mode and the inter coding mode, the coding cost which is the absolute value sum (SAD) of the difference values between the predicted image and the input image is calculated, and the coding cost is the smallest. Selected.

一方、直交変換ブロックサイズは、イントラ符号化モードにおいては、予測ブロックサイズが決まると直交変換ブロックサイズが一意に決まる。しかしながら、インター符号化においては、予測ブロックサイズが決まっても直交変換ブロックサイズが一意に決まらない場合がある。したがって、インター符号化モードにおいては、直交変換ブロックサイズを決定するために、他の処理が必要となる。   On the other hand, the orthogonal transform block size is uniquely determined when the prediction block size is determined in the intra coding mode. However, in inter coding, the orthogonal transform block size may not be uniquely determined even if the prediction block size is determined. Therefore, in the inter coding mode, another process is required to determine the orthogonal transform block size.

例えば、H.264のリファレンスソフトであるJMは、原画像と予測画像との差分値をアダマール変換して生成された変換係数の絶対値和(SATD)を用いて、直交変換ブロックサイズを決定する。   For example, H.M. JM, which is H.264 reference software, determines an orthogonal transform block size using a sum of absolute values (SATD) of transform coefficients generated by Hadamard transform of a difference value between an original image and a predicted image.

また、特開2007−110568(特許文献1)は、原画像から画像の特性を表す特徴量を用いて直交変換ブロックサイズを選択する。より具体的には、分散値を用いて原画像をエッジ部と平坦部に分別し、エッジ部で4x4変換を用いる。
特開2007−110568公報
Japanese Patent Application Laid-Open No. 2007-110568 (Patent Document 1) selects an orthogonal transform block size from an original image using a feature amount that represents image characteristics. More specifically, the original image is classified into an edge portion and a flat portion using the variance value, and 4 × 4 transformation is used at the edge portion.
JP2007-110568

直交変換ブロックサイズを決定するために、画像符号化処理には直接必要ない特別な演算処理が行われる。その結果、演算コストが増加するという課題がある。   In order to determine the orthogonal transform block size, a special calculation process that is not directly required for the image encoding process is performed. As a result, there is a problem that the calculation cost increases.

本発明は、画像符号化装置においてインター符号化モードの直交変換ブロックサイズを決定するための演算コストを削減することを目的とする。   An object of the present invention is to reduce an operation cost for determining an orthogonal transform block size in an inter coding mode in an image coding apparatus.

上記目的を達成するために、本発明の実施形態に係る画像符号化装置は、入力画像のマクロブロックを可変な予測ブロックサイズのブロック単位で動き補償予測して得られる差分画像を可変な直交変換ブロックサイズのブロック単位で直交変換・量子化する画像符号化装置において、イントラ予測及びインター予測で使用可能な複数のブロックサイズのそれぞれに従って、入力画像のマクロブロックを分割して入力ブロック画像を生成する分割部と、イントラ予測で使用可能なブロックサイズのそれぞれに従ってイントラ予測を行って、前記マクロブロックのイントラ予測画像を生成するイントラ予測部と、インター予測で使用可能なブロックサイズのそれぞれに従ってインター予測を行って、前記マクロブロックのそれぞれからインター予測画像を生成するインター予測部と、前記マクロブロックから前記イントラ予測画像のそれぞれを減算して前記ブロックサイズ毎のイントラ差分画像を求める第1の減算部と、前記マクロブロックから前記インター予測画像のそれぞれを減算して前記ブロックサイズ毎のインター差分画像を求める第2の減算部と、
前記イントラ差分画像から前記ブロックサイズ毎のイントラ符号化コストを計算するイントラ符号化コスト計算部と、前記インター差分画像から前記ブロックサイズ毎のインター符号化コストを計算するインター符号化コスト計算部と、前記イントラ符号化コストに基づいてイントラ予測ブロックサイズを選択するとともに、前記イントラ予測ブロックサイズに対してあらかじめ定められた1つのイントラ直交変換ブロックサイズを選択するイントラモード選択部と、前記インター符号化コストに基づいてインター予測ブロックサイズを選択するインター予測サイズ選択部と、前記インター予測ブロックサイズに対して1つの直交変換ブロックサイズでの直交変換が使用可能である場合にはその直交変換ブロックサイズをインター直交変換ブロックサイズとして選択し、前記インター予測ブロックサイズに対して複数の直交変換ブロックサイズが使用可能である場合には前記イントラ直交変換ブロックサイズをインター直交変換ブロックサイズとして選択するインター直交変換ブロックサイズ選択部と、イントラ予測とインター予測のうちの一方の予測モードをインター符号化コストとイントラ符号化コストとに基づいて選択するとともに、前記イントラ予測ブロックサイズと前記イントラ直交変換ブロックサイズとの組み合わせと前記インター予測ブロックサイズと前記インター直交変換ブロックサイズとの組み合わせとのうちの一方の組み合わせを前記マクロブロックの予測ブロックサイズと直交変換サイズとの組み合わせとして前記選択された予測モードに応じて選択するイントラ/インター選択部とを備える。
In order to achieve the above object, an image coding apparatus according to an embodiment of the present invention performs variable orthogonal transform on a differential image obtained by motion compensation prediction of a macroblock of an input image in units of blocks having a variable prediction block size. In an image coding apparatus that performs orthogonal transform / quantization in block units of a block size, an input block image is generated by dividing a macroblock of the input image according to each of a plurality of block sizes that can be used for intra prediction and inter prediction. An intra prediction unit that generates an intra prediction image of the macroblock by performing intra prediction according to each of the block sizes that can be used in the intra prediction, and an inter prediction according to each of the block sizes that can be used in the inter prediction. From each of the macroblocks. An inter prediction unit that generates an image, a first subtraction unit that subtracts each of the intra prediction images from the macroblock to obtain an intra difference image for each block size, and each of the inter prediction images from the macroblock. A second subtracting unit for subtracting and obtaining an inter difference image for each block size;
An intra coding cost calculation unit that calculates an intra coding cost for each block size from the intra difference image; an inter coding cost calculation unit that calculates an inter coding cost for each block size from the inter difference image; An intra mode selection unit that selects an intra prediction block size based on the intra coding cost and selects one intra orthogonal transform block size that is predetermined for the intra prediction block size; and the inter coding cost An inter prediction size selection unit that selects an inter prediction block size based on the inter prediction block size, and when orthogonal transform with one orthogonal transform block size is usable for the inter prediction block size, Orthogonal transformation block An inter-orthogonal transform block size selection unit that selects the intra-orthogonal transform block size as an inter-orthogonal transform block size when a plurality of orthogonal transform block sizes can be used for the inter-predicted block size. In addition, one prediction mode of intra prediction and inter prediction is selected based on the inter coding cost and the intra coding cost, and the combination of the intra prediction block size and the intra orthogonal transform block size and the inter prediction A combination of a block size and a combination of the inter-orthogonal transform block size is selected as a combination of the prediction block size of the macroblock and the orthogonal transform size according to the selected prediction mode. And a tiger / inter selection unit.

本発明に係る画像符号化装置によれば、インター符号化モードの直交変換ブロックサイズを決定するための演算コストを削減することができる。   According to the image coding apparatus according to the present invention, it is possible to reduce the calculation cost for determining the orthogonal transform block size in the inter coding mode.

図1は、本実施形態の画像符号化装置100を示すブロック図である。   FIG. 1 is a block diagram showing an image encoding device 100 of the present embodiment.

本実施形態の画像符号化装置100は、分割部101と減算部102とモード選択部103と変換・量子化部104と符号化部105と逆量子化・逆変換部106と加算部107と参照画像記憶部108と予測画像生成部109とを備える。   The image encoding device 100 according to the present exemplary embodiment includes a dividing unit 101, a subtracting unit 102, a mode selecting unit 103, a transform / quantization unit 104, an encoding unit 105, an inverse quantization / inverse transform unit 106, and an addition unit 107. An image storage unit 108 and a predicted image generation unit 109 are provided.

分割部101は、入力画像(16画素×16画素サイズのマクロブロック)を複数のパターンのブロックサイズのブロックに分割しブロック画像として出力する。イントラ符号化モードの場合、各マクロブロックは16×16、8×8及び4×4のいずれかのブロックサイズで均等に分割される。すなわち、3通りの分割パターンが存在する。インター符号化モードの場合、各マクロブロックは16×16、16×8、8×16、8×4、4×8、8×8、及び4×4のいずれかのブロックサイズで均等に分割される。すなわち、7通りの分割パターンが存在する。   The dividing unit 101 divides an input image (macroblock having a size of 16 pixels × 16 pixels) into blocks having a plurality of pattern block sizes and outputs the blocks as block images. In the case of the intra coding mode, each macroblock is equally divided into any block size of 16 × 16, 8 × 8, and 4 × 4. That is, there are three division patterns. In the inter coding mode, each macroblock is equally divided into block sizes of 16x16, 16x8, 8x16, 8x4, 4x8, 8x8, and 4x4. The That is, there are seven division patterns.

減算部102は、各ブロックサイズのブロック画像から、後述する予測画像生成部109からの予測画像を減算した各ブロックサイズの差分画像を出力する。   The subtraction unit 102 outputs a difference image of each block size obtained by subtracting a prediction image from a prediction image generation unit 109 described later from the block image of each block size.

モード選択部103は、減算部102から入力される各ブロックサイズの差分画像を元に後述する所定の処理を行うことにより、最適な符号化モード情報を選択し、選択した最適な符号化モード情報に対応する差分画像を出力する。符号化モード情報は、イントラ符号化モードであるかインター符号化モードであるかを示す符号化モードの情報と、予測ブロックサイズの情報と、直交変換ブロックサイズの情報とを含む。   The mode selection unit 103 selects optimal encoding mode information by performing predetermined processing described later based on the difference image of each block size input from the subtraction unit 102, and selects the selected optimal encoding mode information. The difference image corresponding to is output. The coding mode information includes information on a coding mode indicating whether the mode is an intra coding mode or an inter coding mode, information on a prediction block size, and information on an orthogonal transform block size.

変換・量子化部104は、モード選択部から入力される最適な符号化モード情報に対応する差分画像を、変換、量子化し、量子化データを生成する。   The transform / quantization unit 104 transforms and quantizes the difference image corresponding to the optimal coding mode information input from the mode selection unit, and generates quantized data.

符号化部105は、量子化データを符号化し、符号化データを生成する。符号化部105は、例えば、可変長符号化または算術符号化を用いる。   The encoding unit 105 encodes the quantized data and generates encoded data. The encoding unit 105 uses, for example, variable length encoding or arithmetic encoding.

逆量子化・逆変換部106は、変換・量子化部104から入力された量子化データを逆量子化および逆変換して、逆量子化後差分画像を生成する。   The inverse quantization / inverse transform unit 106 performs inverse quantization and inverse transform on the quantized data input from the transform / quantization unit 104 to generate a post-inverse-quantized difference image.

加算部107は、逆量子化後差分画像に予測画像を加算して、局所復号画像を求める。   The adder 107 adds the predicted image to the difference image after inverse quantization to obtain a locally decoded image.

参照画像記憶部108は、局所復号画像を参照画像として記憶する。   The reference image storage unit 108 stores the locally decoded image as a reference image.

予測画像生成部109は、参照画像記憶部108に記憶された参照画像を参照して、分割部101から入力された各ブロックサイズのブロック画像の予測画像を求める。   The predicted image generation unit 109 refers to the reference image stored in the reference image storage unit 108 and obtains a predicted image of the block image of each block size input from the dividing unit 101.

図2は、本実施形態の画像符号化装置100の動作を示すフローチャートである。図1、図2及び図3を参照して、本実施形態にかかる画像符号化装置100の動作を説明する。   FIG. 2 is a flowchart showing the operation of the image encoding device 100 of the present embodiment. With reference to FIGS. 1, 2 and 3, the operation of the image coding apparatus 100 according to the present embodiment will be described.

分割部101が、入力画像(16画素×16画素のサイズのマクロブロック)を複数のパターンのブロックサイズのブロックに分割し、ブロック画像を出力する(S101)。   The dividing unit 101 divides an input image (macroblock having a size of 16 pixels × 16 pixels) into blocks having a plurality of pattern block sizes, and outputs a block image (S101).

予測画像生成部109は、分割部101からの各ブロックサイズのブロック画像に類似する画像を参照画像記憶部108から取得し予測画像として出力する(S102)。   The predicted image generation unit 109 acquires an image similar to the block image of each block size from the dividing unit 101 from the reference image storage unit 108 and outputs it as a predicted image (S102).

減算部102が、各ブロックサイズのブロック画像から予測画像を減算して、各ブロックサイズの差分画像を出力する(S103)。   The subtraction unit 102 subtracts the predicted image from the block image of each block size, and outputs a difference image of each block size (S103).

モード選択部103が、各ブロックサイズの差分画像に対して、後述する所定の処理を行い、最適な符号化モード情報を選択する。また、モード選択部103は、選択した最適な符号化モード情報に対応する差分画像を出力する(S104)。   The mode selection unit 103 performs a predetermined process to be described later on the difference image of each block size, and selects optimal encoding mode information. Further, the mode selection unit 103 outputs a difference image corresponding to the selected optimal encoding mode information (S104).

ここで、モード選択部103が選択した最適な符号化モード情報のうち、予測ブロックサイズは、変換・量子化部104と符号化部105と予測画像生成部109に出力される。また、直交変換ブロックサイズは、変換・量子化部104及び符号化部105に出力される。また、最適な符号化モード情報に対応する差分画像は、変換・量子化部104に出力される。   Here, among the optimal encoding mode information selected by the mode selection unit 103, the prediction block size is output to the transform / quantization unit 104, the encoding unit 105, and the predicted image generation unit 109. The orthogonal transform block size is output to the transform / quantization unit 104 and the encoding unit 105. In addition, the difference image corresponding to the optimal encoding mode information is output to the transform / quantization unit 104.

変換・量子化部104は、最適な符号化モード情報に対応する差分画像につき、変換と量子化を行い量子化データを生成する(S105)。ここで、変換は、最適な符号化モード情報に対応する差分画像につき、直交変換ブロックサイズのブロックサイズにより直交変換を行う。直交変換されたデータに対して、量子化を行い、量子化データを生成する。量子化データは、逆量子化・逆変換部106と符号化部105に出力される。   The transform / quantization unit 104 transforms and quantizes the difference image corresponding to the optimum coding mode information to generate quantized data (S105). Here, the transformation performs orthogonal transformation with the block size of the orthogonal transformation block size for the difference image corresponding to the optimal coding mode information. Quantization is performed on the orthogonally transformed data to generate quantized data. The quantized data is output to the inverse quantization / inverse transform unit 106 and the encoding unit 105.

符号化部105は、量子化データを符号化して、符号化データを出力する(S106)。符号化に際しては、予測ブロックサイズと直交変換ブロックサイズを参照して、符号化を行う。   The encoding unit 105 encodes the quantized data and outputs the encoded data (S106). In encoding, encoding is performed with reference to the prediction block size and the orthogonal transform block size.

逆量子化・逆変換部106は量子化データを逆量子化・逆変換して逆量子化後差分画像を生成する(S107)。   The inverse quantization / inverse transform unit 106 performs inverse quantization / inverse transform on the quantized data to generate a difference image after inverse quantization (S107).

加算部107は、逆量子化後差分画像に対して、予測画像生成部109から入力された予測画像を加算し、局所復号画像を出力する(S108)。ここで、予測画像は、最適な符号化モード情報に対応する差分画像に対応する予測画像である。   The addition unit 107 adds the predicted image input from the predicted image generation unit 109 to the post-inverse quantization difference image, and outputs a locally decoded image (S108). Here, the predicted image is a predicted image corresponding to the difference image corresponding to the optimal coding mode information.

参照画像記憶部108が局所復号画像を参照画像として記憶する(S109)。   The reference image storage unit 108 stores the locally decoded image as a reference image (S109).

図4は、本実施形態に係る画像符号化装置100の予測画像生成部109とモード選択部103の詳細を示すブロック図である。モード選択部103が、最適な符号化モード情報をどのように選択するかについて説明する。   FIG. 4 is a block diagram illustrating details of the predicted image generation unit 109 and the mode selection unit 103 of the image encoding device 100 according to the present embodiment. A description will be given of how the mode selection unit 103 selects optimal encoding mode information.

予測画像生成部109は、イントラ予測部109Aとインター予測部109Bとを備える。モード選択部103は、イントラ符号化コスト計算部103Aとイントラモード選択部103Bと、インター符号化コスト計算部103Cと、インターブロックサイズ選択部103Dと、インター変換サイズ選択部103Eと、イントラ/インター選択部103Fとを備える。   The predicted image generation unit 109 includes an intra prediction unit 109A and an inter prediction unit 109B. The mode selection unit 103 includes an intra coding cost calculation unit 103A, an intra mode selection unit 103B, an inter coding cost calculation unit 103C, an inter block size selection unit 103D, an inter transform size selection unit 103E, and an intra / inter selection. Part 103F.

イントラ予測部109Aとインター予測部109Bは、それぞれ、参照画像記憶部108から入力された参照画像を参照して、各ブロックサイズのブロック画像に対応する予測画像を求める。イントラ予測部109Aは、参照画像記憶部108から入力画像と同一フレーム内で既に符号化された領域の参照画像を参照してイントラ予測(フレーム内予測)を行う。インター予測部109Bは入力画像とは異なるフレームの参照画像を参照してインター予測(フレーム間予測)を行う。   Each of the intra prediction unit 109A and the inter prediction unit 109B refers to the reference image input from the reference image storage unit 108, and obtains a prediction image corresponding to the block image of each block size. The intra prediction unit 109A performs intra prediction (intraframe prediction) with reference to a reference image in an area already encoded in the same frame as the input image from the reference image storage unit 108. The inter prediction unit 109B performs inter prediction (interframe prediction) with reference to a reference image of a frame different from the input image.

第1の減算部102A、第2の減算部102Bは、それぞれ各ブロックサイズのブロック画像からイントラ予測部109Aとインター予測部109Bのそれぞれから出力されたイントラ予測画像、インター予測画像を減算して、各ブロックサイズのイントラ差分画像と各ブロックサイズのインター差分画像とを生成する。   The first subtraction unit 102A and the second subtraction unit 102B subtract the intra prediction image and the inter prediction image output from each of the intra prediction unit 109A and the inter prediction unit 109B from the block images of the respective block sizes, respectively. An intra difference image of each block size and an inter difference image of each block size are generated.

イントラ符号化コスト計算部103Aとインター符号化コスト計算部103Cは、それぞれ、マクロブロック毎の各ブロックサイズのイントラ差分画像と各ブロックサイズのインター差分画像の符号化コストを計算する。ここで、符号化コストとは、例えば、予測画像とブロック画像との差分値の絶対値和(SAD)である。   The intra coding cost calculation unit 103A and the inter coding cost calculation unit 103C respectively calculate the coding costs of the intra difference image of each block size and the inter difference image of each block size for each macroblock. Here, the coding cost is, for example, the absolute value sum (SAD) of the difference values between the predicted image and the block image.

イントラモード選択部103Bは、イントラ符号化コスト計算部103Aから出力された符号化コストが最小の符号化コストのブロックサイズをイントラ予測ブロックサイズとして選択する。イントラモード選択部103Bは、図3(a)に示すテーブルを参照して、イントラ予測ブロックサイズに対応する直交変換ブロックサイズであるイントラ直交変換ブロックサイズを求める。   The intra mode selection unit 103B selects the block size of the encoding cost with the minimum encoding cost output from the intra encoding cost calculation unit 103A as the intra prediction block size. The intra mode selection unit 103B refers to the table illustrated in FIG. 3A to obtain an intra orthogonal transform block size that is an orthogonal transform block size corresponding to the intra prediction block size.

インターブロックサイズ選択部103Dは、インター符号化コスト計算部103Cから出力された符号化コストが最小の符号化コストに対応するブロックサイズをインター予測ブロックサイズとして選択する。   The inter block size selection unit 103D selects, as the inter prediction block size, the block size corresponding to the encoding cost with the minimum encoding cost output from the inter encoding cost calculation unit 103C.

インター変換サイズ選択部103Eは、インター直交変換ブロックサイズを決定する。図3(b)はインター符号化モードの場合の予測ブロックサイズと直交変換ブロックサイズとの関係を示す。インター符号化モードでは、インター予測ブロックサイズが8×8未満の場合、使用可能な直交変換ブロックサイズは4×4のみである。一方、インター予測ブロックサイズが8×8以上の場合、使用可能な直交変換ブロックサイズは4×4または8×8である。   The inter transform size selection unit 103E determines the inter orthogonal transform block size. FIG. 3B shows the relationship between the prediction block size and the orthogonal transform block size in the inter coding mode. In the inter coding mode, when the inter prediction block size is less than 8 × 8, the usable orthogonal transform block size is only 4 × 4. On the other hand, when the inter prediction block size is 8 × 8 or more, the usable orthogonal transform block size is 4 × 4 or 8 × 8.

インター変換サイズ選択部103Eは、インター予測ブロックサイズが8×8以上の場合、イントラモード選択部103Bが選択したイントラ直交変換ブロックサイズを直交変換ブロックサイズとして選択する。   When the inter prediction block size is 8 × 8 or more, the inter transform size selection unit 103E selects the intra orthogonal transform block size selected by the intra mode selection unit 103B as the orthogonal transform block size.

イントラ/インター選択部103Fは、イントラ符号化モードにおける最小の符号化コストと、インター符号化モードにおける最小の符号化コストとを比較し、符号化コストの小さい符号化モードを選択する。そして、イントラ/インター選択部103Fは、最適な符号化モード情報を選択する。そして、イントラ/インター選択部103Fは、最適な符号化情報と最適な符号化情報に対応する符号化コストと差分画像とを出力する。   The intra / inter selection unit 103F compares the minimum encoding cost in the intra encoding mode with the minimum encoding cost in the inter encoding mode, and selects an encoding mode with a low encoding cost. Then, the intra / inter selecting unit 103F selects optimal encoding mode information. Then, the intra / inter selecting unit 103F outputs the optimal encoding information, the encoding cost corresponding to the optimal encoding information, and the difference image.

図4を用いて、本実施形態の画像符号化装置100の動作方法について説明する。   The operation method of the image coding apparatus 100 of the present embodiment will be described using FIG.

イントラ符号化モードにおいて、イントラ予測部109Aが、参照画像記憶部108から入力された参照画像と各ブロックサイズのブロック画像とを比較して、予測画像を出力する。   In the intra coding mode, the intra prediction unit 109A compares the reference image input from the reference image storage unit 108 with the block image of each block size, and outputs a predicted image.

第1の減算部102Aが、各ブロックサイズのブロック画像から予測画像を減算して、差分画像(イントラ差分画像)を出力する。   The first subtraction unit 102A subtracts the prediction image from the block image of each block size, and outputs a difference image (intra difference image).

イントラ符号化コスト計算部103Aが、マクロブロック毎に、イントラ差分画像の符号化コストであるイントラ符号化コストを計算する。   The intra coding cost calculation unit 103A calculates the intra coding cost that is the coding cost of the intra difference image for each macroblock.

イントラ符号化モード選択部が、マクロブロック毎に、イントラ符号化コストのうち、最小の符号化コストの最小のモードの1つのブロック画像サイズをイントラ予測ブロックサイズとして選択する。また、イントラ予測ブロックサイズからイントラ直交変換ブロックサイズも決定する。   The intra coding mode selection unit selects, as the intra prediction block size, one block image size of the mode having the smallest coding cost among the intra coding costs for each macroblock. Further, the intra orthogonal transform block size is also determined from the intra prediction block size.

インター符号化モードにおいて、インター予測部109Bが、参照画像記憶部108から入力された参照画像と各ブロックサイズのブロック画像とを比較して、予測画像を出力する。   In the inter coding mode, the inter prediction unit 109B compares the reference image input from the reference image storage unit 108 with the block image of each block size, and outputs a predicted image.

第2の減算部102Bが、各ブロックサイズのブロック画像から予測画像を減算して、差分画像(インター差分画像)を出力する。   The second subtracting unit 102B subtracts the predicted image from the block image of each block size and outputs a difference image (inter difference image).

インター符号化コスト計算部103Cが、マクロブロック毎に、インター差分画像の符号化コストであるインター符号化コストを計算する。   The inter coding cost calculation unit 103C calculates the inter coding cost that is the coding cost of the inter difference image for each macroblock.

インターブロックサイズ選択部103Dが、インター符号化コストのうち、最小の符号化コストの最小のモードの1つのブロック画像サイズをインター予測ブロックサイズとして選択する。また、インター符号化コストにより、動きベクトルも決定する。   The inter block size selection unit 103D selects, as the inter prediction block size, one block image size of the mode with the minimum encoding cost among the inter encoding costs. Also, a motion vector is determined based on the inter coding cost.

インター変換サイズ選択部103Eは、インター直交変換ブロックサイズを選択する。   The inter transform size selection unit 103E selects an inter orthogonal transform block size.

図3に示されるように、インター予測ブロックサイズが、8×4、4×8、又は4×4の場合、直交変換ブロックサイズは、4×4と一意に決まる。従って、インター変換サイズ選択部103Eは、インター直交変換ブロックサイズとして、4×4と選択する。   As illustrated in FIG. 3, when the inter prediction block size is 8 × 4, 4 × 8, or 4 × 4, the orthogonal transform block size is uniquely determined to be 4 × 4. Accordingly, the inter transform size selection unit 103E selects 4 × 4 as the inter orthogonal transform block size.

一方、インター予測ブロックサイズが、16×16、16×8、又は8×16、8×8の場合、インター変換サイズ選択部103Eは、イントラ直交変換ブロックサイズを直交変換ブロックサイズとして選択する。   On the other hand, when the inter prediction block size is 16 × 16, 16 × 8, 8 × 16, or 8 × 8, the inter transform size selection unit 103E selects the intra orthogonal transform block size as the orthogonal transform block size.

次に、イントラ/インター選択部103Fは、イントラ符号化コストの最小の符号化コストとインター符号化コストの最小の符号化コストとを比較し、符号化コストが小さい符号化モードを選択する。そして、イントラ/インター選択部103Fは、最適な符号化モード情報と最適な符号化情報に対応する符号化コストと差分画像とを出力する。   Next, the intra / inter selecting unit 103F compares the encoding cost with the minimum intra encoding cost with the encoding cost with the minimum inter encoding cost, and selects an encoding mode with a low encoding cost. Then, the intra / inter selecting unit 103F outputs the optimal encoding mode information, the encoding cost corresponding to the optimal encoding information, and the difference image.

本実施形態に係る画像符号化装置100においては、インター符号化モードの直交変換ブロックサイズの選択において、イントラモード選択部103Bが選択した直交変換ブロックサイズを選択することにより、演算コストを減少させることができる。H/Wの場合、イントラ予測部109A及びイントラモード選択部103Bは、常に動作するため、イントラモード選択部103Bの結果を用いてインター符号化モードの直交変換ブロックサイズを選択しても追加の演算は必要ないため、従来、直交変換ブロックサイズの決定の際に用いていたアダマール変換等の分だけ少ない演算コストで直交変換ブロックサイズを選択することができる。   In the image coding apparatus 100 according to the present embodiment, in selecting the orthogonal transform block size in the inter coding mode, the computation cost is reduced by selecting the orthogonal transform block size selected by the intra mode selection unit 103B. Can do. In the case of H / W, since the intra prediction unit 109A and the intra mode selection unit 103B always operate, even if the orthogonal transform block size of the inter coding mode is selected using the result of the intra mode selection unit 103B, additional calculation is performed. Therefore, it is possible to select the orthogonal transform block size with a small calculation cost by the Hadamard transform or the like conventionally used in determining the orthogonal transform block size.

また、本実施形態に係る画像符号化装置100においては、イントラモード選択部103Bは、予測ブロックサイズによって予測画像が異なり、予測ブロックサイズが決まると直交変換ブロックサイズが自動的に決まるので、SADを評価値とすることで、直交変換ブロックサイズを決定でき、アダマール変換等の分だけ少ない演算コストで直交変換ブロックサイズを選択することができる。   Further, in the image encoding device 100 according to the present embodiment, the intra mode selection unit 103B has different prediction images depending on the prediction block size, and the orthogonal transform block size is automatically determined when the prediction block size is determined. By using the evaluation value, the orthogonal transform block size can be determined, and the orthogonal transform block size can be selected at a calculation cost that is reduced by Hadamard transform or the like.

また、インター符号化モードの予測ブロックサイズの選択は、エッジを含むブロックやテクスチャの細かいブロックで小さいブロックサイズが選択され易い傾向がありその様なブロックで直交変換ブロックのサイズを小さくするとリンギング歪みが抑制できるため、本実施系に係る画像符号化装置100においては、視覚的に良好な直交変換ブロックサイズの選択が可能である。
なお、本発明は上記本実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。
In addition, when selecting a prediction block size in the inter coding mode, there is a tendency that a small block size tends to be selected for a block including an edge or a fine texture block. If the orthogonal transform block size is reduced in such a block, ringing distortion is caused. Since the image encoding apparatus 100 according to the present embodiment can be suppressed, it is possible to select a visually good orthogonal transform block size.
Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the components without departing from the scope of the invention in the implementation stage.

例えば、HD(High Definition)などの高解像度画像では、8×8未満の予測のサイズを使用しないこともある。HDなどの高解像度画像では、8×8未満の予測のサイズは符号化効率の向上に寄与しないためである。   For example, in a high-resolution image such as HD (High Definition), a prediction size less than 8 × 8 may not be used. This is because in a high-resolution image such as HD, a prediction size of less than 8 × 8 does not contribute to an improvement in coding efficiency.

また、本実施形態においては、インター変換サイズ選択部は、インター予測ブロックサイズが8×8以上の場合、イントラモード選択部が選択したイントラ直交変換ブロックサイズを直交変換ブロックサイズとして選択しているが、インター変換サイズ選択部は、イントラ予測ブロックサイズの結果を基に、インター直交変換ブロックサイズを決定しても良い。例えば、イントラ予測ブロックサイズが、8×8以上の場合、インター符号化モードは、イントラモード選択部の予測ブロックサイズの結果を基に、直交変換ブロックサイズを8×8と決定する。また、インター変換サイズ選択部は、イントラ符号化コスト計算部が計算する符号化コストを基に、インター直交変換ブロックサイズを決定しても良い。例えば、イントラ符号化コスト計算部におけるブロックサイズが8×8と4×4の符号化コストを比較し、符号化コストが小さいブロックサイズに対応する直交変換ブロックサイズをインター直交変換ブロックのサイズとする方法がある。   Moreover, in this embodiment, when the inter prediction block size is 8 × 8 or more, the inter transform size selection unit selects the intra orthogonal transform block size selected by the intra mode selection unit as the orthogonal transform block size. The inter transform size selection unit may determine the inter orthogonal transform block size based on the result of the intra prediction block size. For example, when the intra prediction block size is 8 × 8 or more, the inter coding mode determines the orthogonal transform block size as 8 × 8 based on the result of the prediction block size of the intra mode selection unit. The inter transform size selection unit may determine the inter orthogonal transform block size based on the coding cost calculated by the intra coding cost calculation unit. For example, the coding cost of the block size of 8 × 8 and 4 × 4 in the intra coding cost calculation unit is compared, and the orthogonal transform block size corresponding to the block size with the small coding cost is set as the size of the inter orthogonal transform block. There is a way.

本実施形態にかかる画像符号化装置を示すブロック図The block diagram which shows the image coding apparatus concerning this embodiment 本実施形態にかかる画像符号化装置の動作を示すフローチャートThe flowchart which shows operation | movement of the image coding apparatus concerning this embodiment. 符号化モード情報を示す図The figure which shows encoding mode information 本実施形態に係る画像符号化装置の予測画像生成部とモード選択部の詳細を示すブロック図The block diagram which shows the detail of the estimated image generation part of the image coding apparatus which concerns on this embodiment, and a mode selection part

符号の説明Explanation of symbols

100・・・画像符号化装置
101・・・分割部
102・・・減算部
102A・・・第1の減算部
102B・・・第2の減算部
103・・・モード選択部
103A・・・イントラ符号化コスト計算部
103B・・・イントラモード選択部
103C・・・インター符号化コスト計算部
103D・・・インターブロックサイズ選択部
103E・・・インター変換サイズ選択部
103F・・・イントラ/インター選択部
104・・・変換/量子化部
105・・・符号化部
106・・・逆量子化/逆変換部
107・・・加算部
108・・・参照画像記憶部
109・・・予測画像生成部
109A・・・イントラ予測部
109B・・・インター予測部
DESCRIPTION OF SYMBOLS 100 ... Image coding apparatus 101 ... Division | segmentation part 102 ... Subtraction part 102A ... 1st subtraction part 102B ... 2nd subtraction part 103 ... Mode selection part 103A ... Intra Coding cost calculation unit 103B ... Intra mode selection unit 103C ... Inter coding cost calculation unit 103D ... Inter block size selection unit 103E ... Inter transform size selection unit 103F ... Intra / inter selection unit 104 ... transform / quantization unit 105 ... encoding unit 106 ... inverse quantization / inverse transform unit 107 ... addition unit 108 ... reference image storage unit 109 ... predicted image generation unit 109A ... Intra prediction unit 109B ... Inter prediction unit

Claims (1)

入力画像のマクロブロックを可変な予測ブロックサイズのブロック単位で動き補償予測して得られる差分画像を可変な直交変換ブロックサイズのブロック単位で直交変換・量子化する画像符号化装置において、
イントラ予測及びインター予測で使用可能な複数のブロックサイズのそれぞれに従って、入力画像のマクロブロックを分割して入力ブロック画像を生成する分割部と、
イントラ予測で使用可能なブロックサイズのそれぞれに従ってイントラ予測を行って、前記マクロブロックのイントラ予測画像を生成するイントラ予測部と、
インター予測で使用可能なブロックサイズのそれぞれに従ってインター予測を行って、前記マクロブロックのそれぞれからインター予測画像を生成するインター予測部と、
前記マクロブロックから前記イントラ予測画像のそれぞれを減算して前記ブロックサイズ毎のイントラ差分画像を求める第1の減算部と、
前記マクロブロックから前記インター予測画像のそれぞれを減算して前記ブロックサイズ毎のインター差分画像を求める第2の減算部と、
前記イントラ差分画像から前記ブロックサイズ毎のイントラ符号化コストを計算するイントラ符号化コスト計算部と、
前記インター差分画像から前記ブロックサイズ毎のインター符号化コストを計算するインター符号化コスト計算部と、
前記イントラ符号化コストに基づいてイントラ予測ブロックサイズを選択するとともに、前記イントラ予測ブロックサイズに対してあらかじめ定められた1つのイントラ直交変換ブロックサイズを選択するイントラモード選択部と、
前記インター符号化コストに基づいてインター予測ブロックサイズを選択するインター予測サイズ選択部と、
前記インター予測ブロックサイズに対して1つの直交変換ブロックサイズでの直交変換が使用可能である場合にはその直交変換ブロックサイズをインター直交変換ブロックサイズとして選択し、前記インター予測ブロックサイズに対して複数の直交変換ブロックサイズが使用可能である場合には前記イントラ直交変換ブロックサイズをインター直交変換ブロックサイズとして選択するインター直交変換ブロックサイズ選択部と、
イントラ予測とインター予測のうちの一方の予測モードをインター符号化コストとイントラ符号化コストとに基づいて選択するとともに、前記イントラ予測ブロックサイズと前記イントラ直交変換ブロックサイズとの組み合わせと前記インター予測ブロックサイズと前記インター直交変換ブロックサイズとの組み合わせとのうちの一方の組み合わせを前記マクロブロックの予測ブロックサイズと直交変換サイズとの組み合わせとして前記選択された予測モードに応じて選択するイントラ/インター選択部と、
を備える画像符号化装置。
In an image encoding device that orthogonally transforms and quantizes a differential image obtained by motion compensation prediction of a macroblock of an input image in units of a variable prediction block size, in units of a block of a variable orthogonal transform block size,
A dividing unit that divides a macroblock of an input image according to each of a plurality of block sizes usable in intra prediction and inter prediction, and generates an input block image;
An intra prediction unit that performs intra prediction according to each of the block sizes that can be used in intra prediction, and generates an intra prediction image of the macroblock;
An inter prediction unit that performs inter prediction according to each of the block sizes that can be used in inter prediction, and generates an inter prediction image from each of the macroblocks;
A first subtraction unit that subtracts each of the intra-predicted images from the macroblock to obtain an intra difference image for each block size;
A second subtraction unit that subtracts each of the inter prediction images from the macroblock to obtain an inter difference image for each block size;
An intra coding cost calculation unit for calculating an intra coding cost for each block size from the intra difference image;
An inter coding cost calculation unit for calculating an inter coding cost for each block size from the inter difference image;
An intra mode selection unit that selects an intra prediction block size based on the intra coding cost, and that selects one intra orthogonal transform block size that is predetermined for the intra prediction block size;
An inter prediction size selection unit that selects an inter prediction block size based on the inter coding cost;
When orthogonal transform with one orthogonal transform block size can be used for the inter prediction block size, the orthogonal transform block size is selected as an inter orthogonal transform block size, and a plurality of the inter prediction block sizes are selected. An inter-orthogonal transform block size selection unit that selects the intra-orthogonal transform block size as an inter-orthogonal transform block size when the orthogonal transform block size is usable,
One prediction mode of intra prediction and inter prediction is selected based on the inter coding cost and the intra coding cost, and the combination of the intra prediction block size and the intra orthogonal transform block size and the inter prediction block An intra / inter selection unit that selects one combination of a size and a combination of the inter-orthogonal transform block size as a combination of a prediction block size and an orthogonal transform size of the macroblock according to the selected prediction mode When,
An image encoding device comprising:
JP2008255611A 2008-09-30 2008-09-30 Image encoding device Expired - Fee Related JP4937224B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008255611A JP4937224B2 (en) 2008-09-30 2008-09-30 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008255611A JP4937224B2 (en) 2008-09-30 2008-09-30 Image encoding device

Publications (2)

Publication Number Publication Date
JP2009005413A JP2009005413A (en) 2009-01-08
JP4937224B2 true JP4937224B2 (en) 2012-05-23

Family

ID=40321209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008255611A Expired - Fee Related JP4937224B2 (en) 2008-09-30 2008-09-30 Image encoding device

Country Status (1)

Country Link
JP (1) JP4937224B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9357219B2 (en) 2009-04-08 2016-05-31 Sharp Kabushiki Kaisha Video encoding apparatus and video decoding apparatus
CN104717502B (en) 2009-04-08 2018-06-22 夏普株式会社 Dynamic image encoding device and moving image decoding apparatus
JP5363581B2 (en) * 2009-09-16 2013-12-11 株式会社日立製作所 Video decoding method and video encoding method
EP3101897B1 (en) * 2010-04-09 2021-10-20 Xylene Holding S.A. Moving image encoding device and method, moving image decoding device and method, bitstream
US9215470B2 (en) 2010-07-09 2015-12-15 Qualcomm Incorporated Signaling selected directional transform for video coding
CN106713931B (en) * 2010-09-30 2019-09-03 三菱电机株式会社 Dynamic image encoding device and its method, moving image decoding apparatus and its method
US10992958B2 (en) 2010-12-29 2021-04-27 Qualcomm Incorporated Video coding using mapped transforms and scanning modes
US9788019B2 (en) * 2011-03-09 2017-10-10 Hfi Innovation Inc. Method and apparatus of transform unit partition with reduced complexity
US9787982B2 (en) * 2011-09-12 2017-10-10 Qualcomm Incorporated Non-square transform units and prediction units in video coding
JP5832263B2 (en) * 2011-12-07 2015-12-16 株式会社日立国際電気 Image coding apparatus and image coding method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8081678B2 (en) * 2003-02-21 2011-12-20 Panasonic Corporation Picture coding method and picture decoding method
JP4130617B2 (en) * 2003-09-04 2008-08-06 株式会社東芝 Moving picture coding method and moving picture coding apparatus
JP2007110568A (en) * 2005-10-14 2007-04-26 Matsushita Electric Ind Co Ltd Image coding device
JP4908180B2 (en) * 2006-12-20 2012-04-04 株式会社東芝 Video encoding device
JP4635016B2 (en) * 2007-02-16 2011-02-16 株式会社東芝 Information processing apparatus and inter prediction mode determination method
JP4748603B2 (en) * 2007-02-28 2011-08-17 株式会社Kddi研究所 Video encoding device

Also Published As

Publication number Publication date
JP2009005413A (en) 2009-01-08

Similar Documents

Publication Publication Date Title
JP4937224B2 (en) Image encoding device
JP5846676B2 (en) Intra prediction mode decoding method and apparatus
JP5905613B2 (en) Video decoding device
WO2010001917A1 (en) Image processing device and method
JP2007329693A (en) Image encoding device and method
US8189667B2 (en) Moving picture encoding apparatus
JP2013535919A (en) Prediction block generator
JP2006180196A (en) Moving picture compression coding method, moving picture compression coding apparatus, and program
JP2011015171A (en) Coding apparatus, control method for the same, and computer program
KR101623064B1 (en) Video encoding device, video encoding method and video encoding program
JP5326828B2 (en) Moving picture coding apparatus and moving picture coding method
JP4786612B2 (en) Predicted motion vector generation apparatus for moving picture encoding apparatus
JP2007228519A (en) Image encoding device and image encoding method
JP2010041191A (en) Image encoding method and image encoding device
JP5552078B2 (en) Encoder
JP5328629B2 (en) Encoder and image conversion apparatus
JP5295053B2 (en) Prediction signal generation method, prediction signal generation device, and prediction signal generation program
JP5183573B2 (en) Video encoding device
JP4971817B2 (en) Image encoding device
JP4719650B2 (en) Image encoding device
JP2012070152A (en) Video encoding device, video encoding method and program
JP2013138502A (en) Coding apparatus, control method of the same, and computer program
JP2008092137A (en) Image coding apparatus and image coding method
JP6080726B2 (en) Moving picture encoding apparatus, intra prediction mode determination method, and program
JP5521859B2 (en) Moving picture coding apparatus and method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081015

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110318

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20111125

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20111205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120117

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120124

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120221

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150302

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4937224

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150302

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees