JP4184249B2 - Image encoding device - Google Patents

Image encoding device Download PDF

Info

Publication number
JP4184249B2
JP4184249B2 JP2003413226A JP2003413226A JP4184249B2 JP 4184249 B2 JP4184249 B2 JP 4184249B2 JP 2003413226 A JP2003413226 A JP 2003413226A JP 2003413226 A JP2003413226 A JP 2003413226A JP 4184249 B2 JP4184249 B2 JP 4184249B2
Authority
JP
Japan
Prior art keywords
image
block
prediction method
prediction
encoding
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
JP2003413226A
Other languages
Japanese (ja)
Other versions
JP2005175903A (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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2003413226A priority Critical patent/JP4184249B2/en
Publication of JP2005175903A publication Critical patent/JP2005175903A/en
Application granted granted Critical
Publication of JP4184249B2 publication Critical patent/JP4184249B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は画像符号化装置に関し、特に静止画像および動画像データを符号化する画像符号化装置に関するものである。   The present invention relates to an image encoding device, and more particularly to an image encoding device that encodes still image and moving image data.

次世代の動画像符号化方式として、従来方式より更なる符号化効率の向上を目指した動画像符号化方式である、以下の非特許文献1に記載された技術が知られている。本技術ではイントラ予測と呼ばれる画像符号化技術により、従来の動画像符号化方式に比べ符号化効率が向上している。   As a next-generation moving image encoding method, a technique described in Non-Patent Document 1 below, which is a moving image encoding method aiming at further improvement in encoding efficiency compared to the conventional method, is known. In the present technology, encoding efficiency is improved by an image encoding technique called intra prediction as compared with a conventional moving image encoding system.

以下、本技術で用いられるイントラ予測について説明する。本技術では、画像を複数のブロックに分割しブロック毎に符号化を行う。イントラ予測は、符号化対象であるブロックの画像に対し、既に符号化済みの近隣ブロックの画像を基に、当該ブロックの画像の予測画像を作成するための予測方法である。イントラ予測により作成された適切な予測画像と符号化対象の画像の差分画像を符号化することで符号化効率が向上する。   Hereinafter, intra prediction used in the present technology will be described. In the present technology, an image is divided into a plurality of blocks and encoding is performed for each block. Intra prediction is a prediction method for creating a predicted image of an image of a block on the basis of an image of a neighboring block that has already been encoded with respect to an image of a block to be encoded. Encoding efficiency is improved by encoding a difference image between an appropriate prediction image created by intra prediction and an image to be encoded.

また本技術では、図10(a)に示すように、符号化対象の画像は複数の16x16画素単位のブロックに分割される。各ブロックは更に、図10(b)に示すように16等分され、4x4画素単位のサブブロックに分割される。なお、以下の説明ではブロック内の各画素値をXijkと表す。ここでi、jはそれぞれサブブロック内の水平、垂直位置(0≦i,j<4)、kは図10(b)に示される当該ブロック内の各サブブロックを示すサブブロック識別ID(0≦k<16)とする。   Further, in the present technology, as illustrated in FIG. 10A, the image to be encoded is divided into a plurality of blocks each having a size of 16 × 16 pixels. Each block is further divided into 16 equal parts as shown in FIG. 10B and divided into sub-blocks of 4 × 4 pixel units. In the following description, each pixel value in the block is represented as Xijk. Here, i and j are horizontal and vertical positions (0 ≦ i, j <4) in the sub-block, respectively, and k is a sub-block identification ID (0 indicating each sub-block in the block shown in FIG. 10B). ≦ k <16).

図11に本技術で用いられるイントラ予測における予測方法の一例として、4x4画素のサブブロックを単位とした場合を示す。   FIG. 11 shows a case where a sub-block of 4 × 4 pixels is used as a unit as an example of a prediction method in intra prediction used in the present technology.

イントラ予測で用いられる予測方法は1種類ではなく、4x4画素ブロックの場合、図11(a)に示すように、予測方式aからiまでの9通りが存在する。図11(a)における矢印は、それぞれの予測方法の予測方向の違いを模式的に表しており、これについては、図11(b)から(e)の例を用いて説明する。   The prediction method used in intra prediction is not one type, but in the case of a 4 × 4 pixel block, there are nine prediction methods a to i as shown in FIG. The arrows in FIG. 11A schematically represent the difference in the prediction direction of each prediction method, and this will be described using the examples of FIGS. 11B to 11E.

図11(b)から(e)は、それぞれ予測方式aからdによって作成されたサブブロックの予測画像、および予測画像を作成する際に参照する周辺ブロックに属する9画素の画素の関係を表す説明図である。   FIGS. 11B to 11E illustrate the relationship between the predicted images of the sub-blocks created by the prediction methods a to d, and the relationship of the nine pixels belonging to the peripheral blocks that are referred to when the predicted images are created. FIG.

なお、図中の数値は当該画素の画素値を表している。例えば、予測方式aの場合、図11(a)の水平方向への矢印が示す通り、図11(b)では、サブブロックの左側に隣接する4画素を基に水平方向への予測が行われ予測画像が作成されている。   In addition, the numerical value in a figure represents the pixel value of the said pixel. For example, in the case of the prediction method a, as shown by the arrow in the horizontal direction in FIG. 11A, in FIG. 11B, prediction in the horizontal direction is performed based on the four pixels adjacent to the left side of the sub-block. A prediction image has been created.

同様に、予測方式bでは図11(a)および図11(c)に示すように垂直方向の予測により上側に隣接する4画素を基に予測画像が作成され、予測方式dでは、図11(a)および図11(e)に示すように斜め方向の予測によって隣接9画素を基に予測画像が作成されている。   Similarly, in the prediction method b, as shown in FIGS. 11A and 11C, a prediction image is created based on four pixels adjacent on the upper side by vertical prediction, and in the prediction method d, FIG. As shown in a) and FIG. 11 (e), a prediction image is created based on the adjacent nine pixels by the oblique prediction.

ただし例外的に予測方式cは、その他の予測方式と異なり特定の予測方向を持たない予測方式であり、図11(d)に示すように、隣接9画素の平均値によって予測画像が作成される。図11(b)から(e)に示した予測方式aからd以外の予測方式については同様の方法で予測方向に従った予測画像が作成されるため説明を省略する。   However, unlike the other prediction methods, the prediction method c is an exceptional prediction method that does not have a specific prediction direction. As shown in FIG. 11D, a prediction image is created by the average value of adjacent nine pixels. . The prediction methods other than the prediction methods a to d shown in FIGS. 11B to 11E are not described because a prediction image according to the prediction direction is created by the same method.

なお予測方式は、輝度成分4x4画素のサブブロックに対し上記aからiまでの9通り、輝度成分の16x16画素のブロックに対し4通り、色差成分のブロックに対し4通りが用意されており、予測方式としてブロックサイズおよび予測方向の組み合わせが多数存在する。   Note that there are nine prediction methods prepared from a to i for the luminance component 4 × 4 pixel sub-block, four for the luminance component 16 × 16 pixel block, and four for the color difference component block. There are many combinations of block size and prediction direction as methods.

従来の画像符号化装置では、図12の動作フローに示すように、複数ある予測方式のうち1つを選択し、その予測方式での発生符号量を推定し(S1)、同様に全ての予測方式について発生符号量の推定を繰り返し(S2)、発生符号量の推定結果から、最も発生符号量が少ないと予想される予測方式を選択して符号化を行い(S3)、全てのブロックについてS1〜S3を繰り返す(S4)。   In the conventional image coding apparatus, as shown in the operation flow of FIG. 12, one of a plurality of prediction methods is selected, the generated code amount in the prediction method is estimated (S1), and all predictions are similarly performed. The estimation of the generated code amount is repeated for the method (S2), the prediction method that is expected to have the smallest generated code amount is selected from the estimation result of the generated code amount, and encoding is performed (S3). -S3 is repeated (S4).

なお発生符号量の推定としては、実際に当該予測方式による符号化を行い、その発生符号量を計測する方法や、符号化対象の画像と予測画像の誤差の大きさから推定する方法が用いられる。   For the estimation of the amount of generated code, a method of actually encoding by the prediction method and measuring the generated code amount or a method of estimating from the magnitude of error between the encoding target image and the predicted image is used. .

符号化対象の画像と予測画像の誤差ekを用いて推定を行う場合、誤差ekは、当該サブブロックの画像の画素値をXijk、それに対応する予測画像の画素値をYijkとすると次式で表される。   When estimation is performed using the error ek between the encoding target image and the predicted image, the error ek is expressed by the following equation, where Xijk is the pixel value of the image of the sub-block and Yijk is the corresponding pixel value of the predicted image. Is done.

Figure 0004184249
Figure 0004184249

上式の推定においては、通常、差分絶対値和(n=1)あるいは差分二乗和(n=2)が用いられる。なお、誤差eが小さいほど発生符号量は少なく、誤差eが大きいほど発生符号量が多いものとして発生符号量の推定が行われる。
Final Commitee Draft ISO/IEC 14496−10
In the above estimation, the sum of absolute differences (n = 1) or the sum of squared differences (n = 2) is usually used. Note that the generated code amount is estimated as the generated code amount is small as the error e is small and the generated code amount is large as the error e is large.
Final Committee Draft ISO / IEC 14496-10

従来の画像符号化装置では、複数ある予測方式のうち最適な予測方式を選択するため、全ての予測方式について、発生符号量を推定し最適なものを選択する必要があり、符号化に必要な演算量が膨大になるという問題点があった。   In the conventional image encoding apparatus, since an optimal prediction method is selected from among a plurality of prediction methods, it is necessary to estimate the amount of generated codes and select an optimal one for all prediction methods, which is necessary for encoding. There was a problem that the amount of calculation became enormous.

この発明は上記問題点を解決するためになされたものであり、符号化に必要な演算量を減少させることができる画像符号化装置を提供することを目的としている。   The present invention has been made to solve the above-described problems, and an object thereof is to provide an image encoding apparatus that can reduce the amount of calculation required for encoding.

本発明は上記目的を達成するためになされたものであり、本発明の第1の画像符号化装置は、ブロック分割された画像に対し、前記ブロック毎あるいは前記ブロックを更に分割したサブブロック毎に変更可能な複数の予測方式を用いてフレーム内予測符号化を行う画像符号化装置であって、前記複数の予測方式の一部を所定の条件で予測方式候補とし、前記予測方式候補から当該ブロックの予測方式を決定する特徴を備える。   The present invention has been made in order to achieve the above object, and the first image encoding device of the present invention provides a block-divided image for each block or each sub-block obtained by further dividing the block. An image encoding apparatus that performs intraframe prediction encoding using a plurality of changeable prediction methods, wherein a part of the plurality of prediction methods is set as a prediction method candidate under a predetermined condition, and the block from the prediction method candidate It has a feature that determines the prediction method.

また、前記所定の条件は、画像の圧縮率であり、該圧縮率が高い場合には、前記予測方式候補に占める前記ブロック毎の予測方式の割合を高く、該圧縮率が低い場合には、前記予測方式候補に占める前記サブブロック毎の予測方式の割合を高くする特徴を備える。 Further , the predetermined condition is an image compression rate, and when the compression rate is high, the ratio of the prediction method for each block in the prediction method candidate is high, and when the compression rate is low, A feature of increasing the ratio of the prediction method for each sub-block in the prediction method candidates is provided.

本発明の第1の画像符号化装置は、所定の条件に基づき予測方式候補を選択するため、予測方式決定のために全ての予測方式での符号量推定を必要とせず、予測方式決定のための演算量を抑えることが可能である。   The first image encoding apparatus of the present invention selects a prediction method candidate based on a predetermined condition, and therefore does not require code amount estimation in all prediction methods for determining a prediction method, and for determining a prediction method. It is possible to reduce the amount of computation of

また、予測方式と画像の圧縮率の相関を利用して、適切な予測方式候補を選択することが可能である。 It is also possible to select an appropriate prediction method candidate using the correlation between the prediction method and the image compression rate.

本発明の実施の形態の一例における画像符号化装置について以下、詳細に説明する。   An image encoding device according to an example of an embodiment of the present invention will be described in detail below.

本発明の実施の形態の一例における画像符号化装置は、入力画像を複数のブロックに分割し、ブロック毎に符号化を行う。さらに画像符号化装置は、分割されたブロック毎に予め定められた複数の予測方式から1つの予測方式を選択し、選択した予測方式に基づき隣接ブロックに属する画像から当該ブロックに対する予測画像を作成する。あるいは、ブロックをさらに複数のサブブロックに分割し、サブブロック毎に予め定められた複数の予測方式から1つの予測方式を選択し、選択した予測方式に基づき隣接サブブロックに属する画像から当該サブブロックに対する予測画像を作成する。   An image encoding apparatus according to an example of an embodiment of the present invention divides an input image into a plurality of blocks and performs encoding for each block. Furthermore, the image encoding apparatus selects one prediction method from a plurality of prediction methods determined in advance for each of the divided blocks, and creates a prediction image for the block from images belonging to adjacent blocks based on the selected prediction method. . Alternatively, the block is further divided into a plurality of sub-blocks, one prediction method is selected from a plurality of prediction methods predetermined for each sub-block, and the sub-block is selected from images belonging to adjacent sub-blocks based on the selected prediction method. Create a predicted image for.

さらに画像符号化装置は、当該ブロックあるいは当該サブブロックの入力画像と予測画像との差分画像を生成し、差分画像と選択した予測方式の種別の符号化を行う。このような符号化方式としては上述の非特許文献1の技術がある。   Further, the image encoding device generates a difference image between the input image of the block or the sub-block and the prediction image, and performs encoding of the difference image and the selected prediction method type. As such an encoding method, there is the technique of Non-Patent Document 1 described above.

当該技術では、16x16画素のブロック単位の4通りの予測方式、4x4画素のサブブロック単位の9通りの予測方式が用いられるが、本発明の符号化方式はこれらのブロックおよびサブブロックサイズ、予測方式に限定されるものではなく、上記に示すような符号化方式であればいかなる符号化方式であっても適応可能である。なお、以下の実施例では図10に示すブロック、およびサブブロックの場合について説明する。   In this technique, four types of prediction methods in units of 16 × 16 pixels are used, and nine types of prediction methods in units of 4 × 4 pixels are used. The encoding method of the present invention uses these blocks, subblock sizes, and prediction methods. However, the present invention is not limited to this, and any encoding scheme can be applied as long as it is as described above. In the following embodiment, the case of the block and sub block shown in FIG. 10 will be described.

図1は本発明の第1の実施形態における画像符号化装置の構成を示すブロック図である。   FIG. 1 is a block diagram showing a configuration of an image encoding device according to the first embodiment of the present invention.

図1において、11は複数の予測方式から適切な予測方式を決定する予測方式を決定する予測方式制御部、12は予測方式制御部11により決定された予測方式に基づき予測画像を生成する予測画像生成部、13は予測画像と符号化対象となる画像を入力として差分画像を生成する差分画像生成部、14は差分画像および予測方式の種別を符号化する画像符号化部、15は差分画像と予測画像を合成する画像合成部、16は動画像を蓄積する画像蓄積部、17はユーザ操作により本画像符号化装置の録画モードを決定する録画モード選択部、18は符号化データを記録蓄積する磁気ディスク、着脱可能な光磁気ディスク、半導体メモリカード等の記録媒体である。   In FIG. 1, 11 is a prediction method control unit that determines a prediction method for determining an appropriate prediction method from a plurality of prediction methods, and 12 is a prediction image that generates a prediction image based on the prediction method determined by the prediction method control unit 11. A generating unit, 13 is a difference image generating unit that generates a difference image by inputting a prediction image and an image to be encoded, 14 is an image encoding unit that encodes the type of the difference image and the prediction method, and 15 is a difference image. An image synthesis unit for synthesizing the predicted image, 16 an image accumulation unit for accumulating moving images, 17 a recording mode selection unit for determining a recording mode of the image coding apparatus by a user operation, and 18 for recording and accumulating encoded data. It is a recording medium such as a magnetic disk, a removable magneto-optical disk, or a semiconductor memory card.

なお、記録媒体18の代わりに通信手段を設け、符号化データが当該通信手段を通して送信される構成を採用しても構わない。   Note that a configuration may be employed in which communication means is provided instead of the recording medium 18 and the encoded data is transmitted through the communication means.

本実施形態の画像符号化装置による符号化の動作について図2の動作フローを参照しながら説明する。   An encoding operation by the image encoding apparatus according to the present embodiment will be described with reference to the operation flow of FIG.

なお本画像符号化装置は、録画画像サイズ、録画品質等をパラメータ化した複数の録画モードを備え、予めユーザが録画モード選択部17を用いて、当該画像の録画モードを決定しているものとする。   The image encoding apparatus includes a plurality of recording modes in which the recording image size, recording quality, and the like are parameterized, and the user determines the recording mode of the image using the recording mode selection unit 17 in advance. To do.

符号化が開始されるとまず、予測方式制御部11が当該画像に用いる予測方式候補を決定する(S1)。   When encoding is started, first, the prediction method control unit 11 determines a prediction method candidate used for the image (S1).

予測方式候補は、ユーザが事前に決定した当該画像の記録モードを基にした制御情報と所定のしきい値を比較することで決定する。   The prediction method candidate is determined by comparing control information based on the recording mode of the image determined in advance by the user with a predetermined threshold value.

例えば制御情報として当該画像の解像度を用いる場合について説明する。ただし以下の説明では、解像度を表現する符号化パラメータとして当該画像を構成する画素数Inを用いるものとし、画素数Inが大きいほど解像度が高いことを示す。また、予測方式候補は画素数Inと所定のしきい値TH1を用いて次のように決定する。   For example, a case where the resolution of the image is used as control information will be described. However, in the following description, the number of pixels constituting the image is used as an encoding parameter expressing the resolution, and the larger the number of pixels In, the higher the resolution. The prediction method candidate is determined as follows using the number of pixels In and a predetermined threshold value TH1.

In>TH1の場合、ブロック単位の全ての予測方式を当該画像の予測方式候補とする。   When In> TH1, all prediction methods in units of blocks are set as prediction method candidates for the image.

In≦TH1の場合、サブブロック単位の全ての予測方式を当該画像の予測方式候補とする。   In the case of In ≦ TH1, all prediction methods in units of sub-blocks are set as prediction method candidates for the image.

なお、Inとしては、画像データ中の輝度データの水平画素数や全画素数(水平画素数x垂直画素数)を用いることができる。   As In, the number of horizontal pixels of luminance data in the image data or the total number of pixels (the number of horizontal pixels × the number of vertical pixels) can be used.

一般に解像度の低い画像は解像度の高い画像に比べ隣接画素間の相関が低いため、ブロック単位の予測方式での予測効率が低下する。一方解像度が高い場合は、ブロック単位、サブブロック単位それぞれの予測方式間での予測効率の差が小さい。よって、ブロック単位の予測方式を用いた方が、予測方式を示す符号量を抑圧することが可能なため符号化効率が良い。したがって予め実験により適切なしきい値TH1を定めることで画像解像度に応じた適切な予測方式候補を選択することが可能である。   In general, an image with a low resolution has a lower correlation between adjacent pixels than an image with a high resolution, so that prediction efficiency in a block-based prediction method is lowered. On the other hand, when the resolution is high, the difference in prediction efficiency between the prediction methods for each block and each sub-block is small. Therefore, the coding efficiency is better when the block-based prediction method is used because the amount of code indicating the prediction method can be suppressed. Therefore, it is possible to select an appropriate prediction method candidate according to the image resolution by previously determining an appropriate threshold value TH1 through experiments.

また、ブロック単位あるいはサブブロック単位のいずれか一方のみを予測方式候補とするのではなく、複数のしきい値を用いて、予測方式候補に占めるブロック単位、サブブロック単位の予測方式の占める割合を段階的に切り替える方式でも構わない。例えば、しきい値TH1、TH2を用いて、
In>TH1の場合、ブロック単位の全ての予測方式を当該画像の予測方式候補とする。
Also, instead of using only one block unit or sub-block unit as a prediction method candidate, a plurality of threshold values are used to determine the ratio of the block-unit and sub-block unit prediction methods to the prediction method candidate. A method of switching in stages may be used. For example, using threshold values TH1 and TH2,
When In> TH1, all prediction methods in units of blocks are set as prediction method candidates for the image.

TH2<In≦TH1の場合、一般に予測効率の高い予測方式をブロック単位、サブブロック単位それぞれの全ての予測方式からそれぞれ半数づつ選び、当該画像の予測方式候補とする。   In the case of TH2 <In ≦ TH1, in general, a prediction method with high prediction efficiency is selected by half each of all prediction methods in block units and sub-block units, respectively, and set as a prediction method candidate for the image.

といった3段階に予測方式候補を切り替えることで、画像解像度に応じた、より適切な予測方式候補を選択することが可能である。   By switching the prediction method candidates in three stages, it is possible to select a more appropriate prediction method candidate according to the image resolution.

また高画質録画モード、長時間録画モードといった録画モードに関する制御情報を基に予測方式候補を決定してもよい。すなわち1ブロック当りの割り当て符号量Icを録画モードに対応する符号化パラメータとし、所定のしきい値TH3を用いて、予測方式候補を決定することが可能である。例えば、
Ic<TH3ならば、ブロック単位の全ての予測方式を当該画像の予測方式候補とする。
Further, prediction method candidates may be determined based on control information related to recording modes such as a high-quality recording mode and a long-time recording mode. That is, it is possible to determine a prediction method candidate using the allocated code amount Ic per block as an encoding parameter corresponding to the recording mode and using the predetermined threshold value TH3. For example,
If Ic <TH3, all prediction methods in block units are set as prediction method candidates for the image.

Ic≧TH3ならば、サブブロック単位の全ての予測方式を当該画像の予測方式候補とする。   If Ic ≧ TH3, all prediction methods in units of sub-blocks are set as prediction method candidates for the image.

1ブロック当りの割り当て符号量が少ない場合、符号化により生成される画像の品質が低下するため、予測精度が低下し各予測方式間の予測効率の差は小さくなる。また符号量全体に占める予測方式を示す符号量の割合が相対的に高くなる。ゆえに1ブロック当りの割り当て符号量が少ない場合は、ブロック単位の予測方式を選択することで、予測方式の符号化に必要な符号量を抑制し符号化効率を高めることが可能である。一方、1ブロック当りの割り当て符号量が多い場合は、相対的に予測精度の高いサブブロック単位の予測方式を選択することで符号化効率を高めることが可能である。   When the allocated code amount per block is small, the quality of an image generated by encoding is reduced, so that the prediction accuracy is reduced and the difference in prediction efficiency between the prediction methods is reduced. In addition, the ratio of the code amount indicating the prediction method in the entire code amount is relatively high. Therefore, when the allocated code amount per block is small, by selecting a prediction method for each block, it is possible to suppress the code amount necessary for encoding the prediction method and increase the encoding efficiency. On the other hand, when the allocated code amount per block is large, it is possible to increase the encoding efficiency by selecting a prediction method in units of sub-blocks with relatively high prediction accuracy.

したがって予め実験により適切なしきい値TH3を定めることで1ブロック当りの割り当て符号量に応じた適切な予測方式候補を選択することが可能である。また画像解像度を用いた場合と同様、複数のしきい値を用いて、段階的に予測方式候補を選択することも可能である。   Therefore, it is possible to select an appropriate prediction method candidate corresponding to the allocated code amount per block by previously determining an appropriate threshold value TH3 through experiments. As in the case of using the image resolution, it is also possible to select the prediction method candidates step by step using a plurality of threshold values.

なお上記の説明では、録画モードに対応する符号化パラメータとして1ブロック当たりの割り当て符号量Icを用いたが、その逆数である圧縮率Irを用いても構わない。その場合、予測方式候補の決定方法は例えば、
Ir>TH3’ならば、ブロック単位の全ての予測方式を当該画像の予測方式候補とする。
In the above description, the allocated code amount Ic per block is used as the encoding parameter corresponding to the recording mode. However, the compression rate Ir that is the inverse thereof may be used. In that case, the prediction method candidate determination method is, for example,
If Ir> TH3 ′, all prediction methods in block units are set as prediction method candidates for the image.

Ir≦TH3’ならば、サブブロック単位の全ての予測方式を当該画像の予測方式候補とする。   If Ir ≦ TH3 ′, all prediction methods for each sub-block are set as prediction method candidates for the image.

といった構成で実現可能である。   It is realizable by the structure of.

次に選択された予測方式候補から符号化対象のブロックで用いる予測方式を決定する(S2)。なお、サブブロック単位の予測方式を用いる場合には、サブブロック毎に用いる予測方式を決定する。選択された予測方式候補から当該ブロックで用いる予測方式を決定する方法はいかなる方法を用いても構わない。例えば、各予測方式候補について従来手法と同様、発生符号量を推定し発生符号量が最小となる予測方式を用いることができる。   Next, a prediction method to be used for the block to be encoded is determined from the selected prediction method candidates (S2). In addition, when using the prediction method per subblock, the prediction method used for every subblock is determined. Any method may be used as a method for determining a prediction method used in the block from the selected prediction method candidates. For example, a prediction method that estimates the generated code amount for each prediction method candidate and minimizes the generated code amount can be used.

なお予測方式候補に選択された予測方式が1種類のみの場合、このステップは省略可能である。   Note that this step can be omitted when only one type of prediction method is selected as a prediction method candidate.

次に決定した予測方式に基づき当該ブロックの符号化を行う(S3)。予測画像生成部11は指定された予測方式に基づき画像蓄積部16に蓄積された符号化済み画像を参照し、当該ブロックあるいは当該サブブロックの予測画像を生成する。差分画像生成部13は、当該ブロックあるいは当該サブブロックの符号化対象の画像と予測画像の差分画像を作成し、画像符号化部14が当該ブロックあるいは当該サブブロックの予測方式の種別および差分画像の符号化を行い、符号化データは順次、記録媒体18に蓄積される。また符号化された差分画像は、画像合成部15にて予測画像と合成され、当該ブロックあるいは当該サブブロックの符号化画像として画像蓄積部16に蓄積され、他のブロックおよびサブブロックの予測に用いられる。   Next, the block is encoded based on the determined prediction method (S3). The predicted image generation unit 11 refers to the encoded image stored in the image storage unit 16 based on the designated prediction method, and generates a predicted image of the block or the subblock. The difference image generation unit 13 creates a difference image between the image to be encoded of the block or the subblock and the prediction image, and the image encoding unit 14 determines the type of the prediction method and the difference image of the block or the subblock. Encoding is performed, and the encoded data is sequentially stored in the recording medium 18. The encoded difference image is synthesized with the predicted image by the image synthesizing unit 15 and accumulated in the image accumulating unit 16 as an encoded image of the block or the sub-block, and used for prediction of other blocks and sub-blocks. It is done.

上記S2〜S3の動作を符号化対象画像の全てのブロックについて繰り返し(S4)、当該画像の符号化が完了する。   The operations of S2 to S3 are repeated for all the blocks of the encoding target image (S4), and the encoding of the image is completed.

このようにして、本発明により記録媒体に18に蓄積された符号化データは以下のような特徴をもっている。   In this way, the encoded data stored in the recording medium 18 according to the present invention has the following characteristics.

(1) 高解像度の画像におけるブロック単位の予測方式の割合は、低解像度の画像におけるブロック単位の予測方式の割合に比べ高い。   (1) The ratio of the block unit prediction method in the high resolution image is higher than the ratio of the block unit prediction method in the low resolution image.

(2) ブロック当たりの割り当て符号量Icが大きい場合のブロック単位の予測方式の割合は、Icが小さい場合のブロック単位の予測方式の割合に比べ高い。   (2) The ratio of the block unit prediction method when the allocated code amount Ic per block is large is higher than the ratio of the block unit prediction method when Ic is small.

以上説明したように、本実施形態の画像符号化装置では、録画モードを基にした制御情報に応じて適切な予測方式候補を選択することで、全ての予測方式での発生符号量の推定を必要とせず、少ない演算量で予測方式を決定することができる。   As described above, the image coding apparatus according to the present embodiment estimates the amount of generated codes in all prediction methods by selecting an appropriate prediction method candidate according to control information based on the recording mode. This is not necessary, and the prediction method can be determined with a small amount of calculation.

また、記録媒体に18に蓄積された符号化データは上記(1)、(2)のような特徴を持つため、画像の解像度や割り当て符号量に応じた適切な予測方式を選択することができ、符号化後の画質を向上させることが出来る。   Also, since the encoded data stored in the recording medium 18 has the characteristics as described in (1) and (2) above, it is possible to select an appropriate prediction method according to the resolution of the image and the allocated code amount. The image quality after encoding can be improved.

図3は本発明の第2の実施形態における画像符号化装置の構成を示すブロック図である。   FIG. 3 is a block diagram showing the configuration of the image coding apparatus according to the second embodiment of the present invention.

図2において、21は各ブロックの発生符号量を計測し、当該計測結果に基づき量子化幅等の符号化パラメータをブロック毎に順次変更することで発生符号量の制御を行う符号量制御部21である。他の構成要素については、実施例1の構成要素と同一のため、同一符号を付与し説明を省略する。   In FIG. 2, reference numeral 21 denotes a code amount control unit 21 that controls the generated code amount by measuring the generated code amount of each block and sequentially changing the encoding parameter such as the quantization width on the basis of the measurement result. It is. The other constituent elements are the same as those in the first embodiment, and thus the same reference numerals are given and description thereof is omitted.

本実施形態の画像符号化装置による符号化の動作について図4の動作フローを参照しながら説明する。   An encoding operation by the image encoding apparatus according to the present embodiment will be described with reference to the operation flow of FIG.

符号化が開始されるとまず、予測方式制御部11が当該ブロックに用いる予測方式候補を決定する(S1)。   When encoding is started, first, the prediction method control unit 11 determines a prediction method candidate to be used for the block (S1).

予測方式候補は、符号量制御部21によって決定される当該ブロックの割り当て符号量あるいは、当該ブロックの量子化に用いる量子化幅を制御情報として予測方式制御部11に入力し、所定のしきい値と比較することで決定する。制御情報として当該ブロックの割り当て符号量を用いる場合の予測方式候補決定の方法は、実施例1の場合と同じであり説明を省略し、ここでは量子化幅Iqと所定のしきい値TH4を用いて予測方式候補を決定する場合について説明する。例えば、
Iq>TH4ならば、ブロック単位の全ての予測方式を当該画像の予測方式候補とする。
The prediction scheme candidate is input to the prediction scheme control unit 11 as control information by the code amount allocated to the block determined by the code amount control unit 21 or the quantization width used for the quantization of the block, and has a predetermined threshold value. It is determined by comparing with. The prediction method candidate determination method in the case of using the allocated code amount of the block as the control information is the same as in the first embodiment, and the description thereof is omitted. Here, the quantization width Iq and a predetermined threshold value TH4 are used. A case where a prediction method candidate is determined will be described. For example,
If Iq> TH4, all prediction methods in block units are set as prediction method candidates for the image.

Iq≦TH4ならば、サブブロック単位の全ての予測方式を当該画像の予測方式候補とする。   If Iq ≦ TH4, all prediction methods for each sub-block are set as prediction method candidates for the image.

量子化幅が大きい場合、符号化により生成される画像の品質が低下するため、予測精度が低下し各予測方式間の予測効率の差は小さくなる。また、符号量全体に占める予測方式を示す符号量の割合が相対的に高くなる。ゆえに量子化幅が大きい場合には、ブロック単位の予測方式を選択することで、予測方式の符号化に必要な符号量を抑制し符号化効率を高めることが可能である。一方、量子化幅が小さい場合には、相対的に予測精度の高いサブブロック単位の予測方式を選択することで符号化効率を高めることが可能である。   When the quantization width is large, the quality of the image generated by the encoding is lowered, so that the prediction accuracy is lowered and the difference in prediction efficiency between the prediction methods is reduced. In addition, the ratio of the code amount indicating the prediction method in the entire code amount is relatively high. Therefore, when the quantization width is large, it is possible to suppress the amount of code required for encoding the prediction scheme and increase the encoding efficiency by selecting a block-unit prediction scheme. On the other hand, when the quantization width is small, it is possible to increase the coding efficiency by selecting a prediction method in units of sub-blocks with relatively high prediction accuracy.

したがって、予め実験により適切なしきい値TH4を定めることで当該ブロックの量子化幅に応じた適切な予測方式候補を選択することが可能である。また、実施例1の場合と同様、複数のしきい値を用いて、段階的に予測方式候補を選択することも可能である。   Therefore, it is possible to select an appropriate prediction method candidate corresponding to the quantization width of the block by previously determining an appropriate threshold value TH4 through experiments. As in the case of the first embodiment, it is also possible to select a prediction method candidate step by step using a plurality of threshold values.

次に選択された予測方式候補から符号化対象のブロックで用いる予測方式を決定する(S2)。なお、サブブロック単位の予測方式を用いる場合には、サブブロック毎に用いる予測方式を決定する。選択された予測方式候補から当該ブロックで用いる予測方式を決定する方法はいかなる方法を用いても構わない。例えば、各予測方式候補について従来手法と同様、発生符号量を推定し発生符号量が最小となる予測方式を用いることができる。   Next, a prediction method to be used for the block to be encoded is determined from the selected prediction method candidates (S2). In addition, when using the prediction method per subblock, the prediction method used for every subblock is determined. Any method may be used as a method for determining a prediction method used in the block from the selected prediction method candidates. For example, a prediction method that estimates the generated code amount for each prediction method candidate and minimizes the generated code amount can be used.

なお予測方式候補に選択された予測方式が1種類のみの場合、このステップは省略可能である。   Note that this step can be omitted when only one type of prediction method is selected as a prediction method candidate.

次に決定した予測方式に基づき当該ブロックの符号化を行う(S3)。予測画像生成部11は指定された予測方式に基づき画像蓄積部16に蓄積された符号化済み画像を参照し、当該ブロックあるいは当該サブブロックの予測画像を生成する。差分画像生成部13は、当該ブロックあるいは当該サブブロックの符号化対象の画像と予測画像の差分画像を作成し、画像符号化部14は、当該ブロックあるいは当該サブブロックの予測方式の種別および差分画像を符号化し、符号化データは順次、記録媒体18に蓄積される。   Next, the block is encoded based on the determined prediction method (S3). The predicted image generation unit 11 refers to the encoded image stored in the image storage unit 16 based on the designated prediction method, and generates a predicted image of the block or the subblock. The difference image generation unit 13 creates a difference image between the encoding target image of the block or the subblock and the prediction image, and the image encoding unit 14 determines the type of prediction method and the difference image of the block or the subblock. And the encoded data are sequentially stored in the recording medium 18.

なお符号化における量子化幅は、符号量制御部21により決定された量子化幅を用いる。また、符号量制御部21は当該ブロックの発生符号量を計測し、以降のブロックの符号化に用いる量子化幅を決定する。また画像符号化部14で符号化された差分画像は、画像合成部15にて予測画像と合成され、当該ブロックあるいは当該サブブロックの符号化画像として画像蓄積部16に蓄積され、他のブロックおよびサブブロックの予測に用いられる。   Note that the quantization width determined by the code amount control unit 21 is used as the quantization width in encoding. Further, the code amount control unit 21 measures the generated code amount of the block, and determines the quantization width used for the subsequent block encoding. The difference image encoded by the image encoding unit 14 is combined with the predicted image by the image combining unit 15 and stored in the image storage unit 16 as the encoded image of the block or the sub-block. Used for sub-block prediction.

上記S1〜S3の動作を符号化対象画像の全てのブロックについて繰り返し(S4)、当該画像の符号化が完了する。   The operations of S1 to S3 are repeated for all the blocks of the encoding target image (S4), and the encoding of the image is completed.

このようにして本発明により記録媒体18に蓄積された符号化データは、量子化幅Iqの大きいブロックにおけるブロック単位の予測方式の割合は、Iqの小さいブロックにおけるブロック単位の予測方式の割合に比べ高い特徴をもっている。   Thus, the encoded data stored in the recording medium 18 according to the present invention is such that the ratio of the block unit prediction method in the block with the large quantization width Iq is compared with the ratio of the block unit prediction method in the block with the small Iq. It has high characteristics.

以上説明したように、本実施形態の画像符号化装置では、ブロック毎に制御情報に応じて適切な予測方式候補を選択し、全ての予測方式での発生符号量の推定を必要とせず、少ない演算量で予測方式を決定することができる。   As described above, in the image coding apparatus according to the present embodiment, an appropriate prediction method candidate is selected for each block according to control information, and it is not necessary to estimate the amount of generated code in all prediction methods. The prediction method can be determined by the amount of calculation.

また、記録媒体18に蓄積された符号化データは上記のような特徴を持つため、ブロック毎の量子化幅に応じた適切な予測方式を選択することができ、符号化後の画質を向上させることが出来る。   Further, since the encoded data stored in the recording medium 18 has the above-described characteristics, an appropriate prediction method can be selected according to the quantization width for each block, and the image quality after encoding is improved. I can do it.

図5は、本発明の第3の実施形態における画像符号化装置の構成を示すブロック図である。   FIG. 5 is a block diagram showing a configuration of an image encoding device according to the third embodiment of the present invention.

図3において、31は差分画像の符号化により発生する符号量を推定する符号量推定部、32は画像符号化部14と符号量推定部31のいずれか一方を選択し差分画像を出力するための切り替えスイッチである。前述の実施例と同一の構成要素については、同一符号を付与し、説明を省略する。   In FIG. 3, 31 is a code amount estimation unit for estimating a code amount generated by encoding a difference image, and 32 is for selecting either the image encoding unit 14 or the code amount estimation unit 31 and outputting a difference image. Switch. The same components as those in the previous embodiment are given the same reference numerals, and the description thereof is omitted.

本実施形態の画像符号化装置における符号化の動作について図6の動作フローを参照しながら以下説明する。   An encoding operation in the image encoding apparatus of the present embodiment will be described below with reference to the operation flow of FIG.

符号化が開始されるとまず、予測方式制御部11は、ブロック単位の複数の予測方式から所定の予測方式を1つ選択し、当該予測方式を用いて予測画像生成部12にて当該ブロックの予測画像を、差分画像生成部13にて当該ブロックの差分画像をそれぞれ生成し、符号量推定部31にて当該予測方式での当該ブロックの推定符号量Cbを求める。   When encoding is started, first, the prediction method control unit 11 selects one predetermined prediction method from a plurality of prediction methods in block units, and the prediction image generation unit 12 uses the prediction method to select the block. A difference image generation unit 13 generates a difference image of the block, and a code amount estimation unit 31 obtains an estimated code amount Cb of the block in the prediction method.

同様に予測方式制御部11が、サブブロック単位の複数の予測方式から所定の予測方式を1つ選択し、当該ブロックを構成する全てのサブブロックについて、予測画像生成部12にて予測画像、差分画像生成部13にて差分画像をそれぞれ生成し、符号量推定部31にて当該予測方式での当該ブロックの推定符号量Csを求める(S1)。   Similarly, the prediction method control unit 11 selects one predetermined prediction method from a plurality of prediction methods in units of sub-blocks, and the prediction image generation unit 12 predicts prediction images and differences for all sub-blocks constituting the block. The image generation unit 13 generates a difference image, and the code amount estimation unit 31 obtains an estimated code amount Cs of the block in the prediction method (S1).

なお当該符号量推定に用いる予測方式は、任意の予測方式を選択可能であるが、各予測方式の一般的な予測効率を予め定め、ブロック単位およびサブブロック単位それぞれの予測方式から一般に最も予測効率の良い予測方式を選択することで符号化効率を高めることが可能である。   Note that an arbitrary prediction method can be selected as the prediction method used for the code amount estimation. However, the general prediction efficiency of each prediction method is determined in advance, and the prediction efficiency is generally the highest among the prediction methods for each block and sub-block. It is possible to increase the encoding efficiency by selecting a good prediction method.

また当該符号量推定に用いる予測方式は、ブロック毎に異なる予測方式を用いる構成でも構わない。例えば、当該画像の符号化に際し、各予測方式の使用頻度を計測し、当該ブロックの符号化時点で使用頻度の最も高い予測方式を用いることで、符号化効率を高めることが可能である。なお、当該予測方式の使用頻度計測結果は、制御情報として予測方式制御部11に入力する。   Moreover, the structure which uses a different prediction method for every block may be sufficient as the prediction method used for the said code amount estimation. For example, when encoding the image, it is possible to increase the encoding efficiency by measuring the frequency of use of each prediction method and using the prediction method having the highest use frequency at the time of encoding the block. The use frequency measurement result of the prediction method is input to the prediction method control unit 11 as control information.

次に予測方式制御部11は、符号量推定部17の符号量推定結果と所定のしきい値TH5に基づき当該ブロックの符号化に用いる予測方式候補を決定する(S2)。例えば、
S1における符号量推定の結果がCb≧Cs+TH5の場合、サブブロック単位の全ての予測方式を当該ブロックにおける予測方式候補とする。
Next, the prediction method control unit 11 determines a prediction method candidate used for encoding the block based on the code amount estimation result of the code amount estimation unit 17 and the predetermined threshold value TH5 (S2). For example,
When the result of the code amount estimation in S1 is Cb ≧ Cs + TH5, all prediction methods in units of sub-blocks are set as prediction method candidates in the block.

S1における符号量推定の結果がCb<Cs+TH5の場合、ブロック単位の全ての予測方式を当該ブロックにおける予測方式候補とする。   When the result of the code amount estimation in S1 is Cb <Cs + TH5, all prediction methods for each block are set as prediction method candidates in the block.

なおしきい値TH5は、外部から与えられる制御情報Iの関数TH5=F(I)としてIに応じて変更可能な構成でも構わない。   The threshold TH5 may be configured to be changeable according to I as a function TH5 = F (I) of the control information I given from the outside.

例えば、制御情報として隣接ブロックの符号化にブロック単位の予測方式が用いられた割合Ibを用いて、
TH5=F(Ib)=α1・Ib+β1 (α1、β1は所定の定数)
とする。この場合、隣接ブロックでブロック単位の予測方式が多く用いられている場合には、ブロック単位の予測方式が選択されやすくなるようにTH5の値を大きく、隣接ブロックでサブブロック単位での予測方式が多く用いられている場合には、サブブロック単位の予測方式が選択されやすくなるようTH5の値を小さくする。
For example, by using a ratio Ib in which a block-based prediction method is used for encoding adjacent blocks as control information,
TH5 = F (Ib) = α1 · Ib + β1 (α1 and β1 are predetermined constants)
And In this case, when a block-based prediction method is frequently used in adjacent blocks, the value of TH5 is increased so that the block-based prediction method is easily selected, and a prediction method in sub-block units is set in adjacent blocks. When many are used, the value of TH5 is reduced so that the prediction method in units of sub-blocks can be easily selected.

このような構成とすることで、隣接ブロック間の画像の相関を利用し、高い精度で最適な予測方式を選択することが可能となり、符号化効率を向上させることが可能である。なおF(Ib)は上記のIbの1次関数に限らず、予め実験を基に隣接ブロックと当該ブロックの相関関係を求めることで得られた任意の関数でよい。例えば、図7のグラフに示すような関数であっても構わない。   With such a configuration, it is possible to select an optimal prediction method with high accuracy using the correlation of images between adjacent blocks, and it is possible to improve coding efficiency. Note that F (Ib) is not limited to the linear function of Ib, but may be an arbitrary function obtained by obtaining a correlation between an adjacent block and the block based on an experiment in advance. For example, a function as shown in the graph of FIG. 7 may be used.

また制御情報として当該ブロックの符号化に用いる量子化幅Iqを用いる場合には、例えば、
TH5=F(Iq)=α2・Iq+β2 (α2、β2は所定の定数)
とする。この場合、量子化幅Iqが大きい場合には、ブロック単位の予測方式が選択されやすくなるようにTH5が大きく、量子化幅Iqが小さい場合には、サブブロック単位の予測方式が選択されやすくなるようにTH5の値は小さくなる以上のような構成とすることで、実施例2の場合同様、当該ブロックの量子化幅に応じて、適切な予測方式候補を選択することが可能である。
When using the quantization width Iq used for encoding the block as control information, for example,
TH5 = F (Iq) = α2 · Iq + β2 (α2 and β2 are predetermined constants)
And In this case, when the quantization width Iq is large, TH5 is large so that a block-based prediction method is easily selected, and when the quantization width Iq is small, a sub-block-based prediction method is easily selected. Thus, by adopting a configuration as described above in which the value of TH5 becomes smaller, it is possible to select an appropriate prediction method candidate according to the quantization width of the block, as in the second embodiment.

なおF(Iq)もF(Ib)の場合同様、上記Iqの1次関数に限らず、所定の実験結果に基づく任意の関数であって構わない。   Note that F (Iq) is not limited to the linear function of Iq, but may be an arbitrary function based on a predetermined experimental result, as in the case of F (Ib).

また制御情報として当該ブロックの割り当て符号量Icを用いて、
TH5=F(Ic)=−α3・Ic+β3 (α3、β3は所定の定数)
として、予測候補を決定しても構わない。
Further, using the allocated code amount Ic of the block as control information,
TH5 = F (Ic) = − α3 · Ic + β3 (α3 and β3 are predetermined constants)
As such, prediction candidates may be determined.

なおいずれの制御情報を用いる場合も実施例1,2の場合と同様、複数のしきい値を用いて、予測方式候補を段階的に切り替える構成であって構わない。   Note that when any control information is used, the configuration may be such that prediction method candidates are switched in stages using a plurality of threshold values as in the first and second embodiments.

次に選択された予測方式候補から当該ブロックで用いる予測方式を決定する(S3)。なお、サブブロック単位の予測方式を用いる場合には、サブブロック毎に当該予測方式候補から用いる予測方式を決定する。選択された予測方式候補から当該ブロックで用いる予測方式を決定する方法はいかなる方法を用いても構わない。   Next, a prediction method used in the block is determined from the selected prediction method candidates (S3). In addition, when using the prediction method per subblock, the prediction method used from the said prediction method candidate is determined for every subblock. Any method may be used as a method for determining a prediction method used in the block from the selected prediction method candidates.

例えば、各予測方式候補について従来手法と同様に発生符号量を推定し、発生符号量が最小となる予測方式を用いる。なお予測方式候補に選択された予測方式が1種類のみの場合、このステップは省略可能である。   For example, the generated code amount is estimated for each prediction method candidate in the same manner as the conventional method, and a prediction method that minimizes the generated code amount is used. Note that this step can be omitted when only one type of prediction method is selected as a prediction method candidate.

次に決定した予測方式に基づき当該ブロックの符号化を行う(S4)。予測画像生成部11は、指定された予測方式に基づき、画像蓄積部16に蓄積された符号化済み画像を参照し、当該ブロックあるいは当該サブブロックの予測画像を生成する。差分画像生成部13は、当該ブロックあるいは当該サブブロックの符号化対象の画像と予測画像の差分画像を作成し、画像符号化部14が当該ブロックあるいは当該サブブロックの予測方式の種別および差分画像を符号化し、符号化データは順次、記録媒体18に蓄積される。符号化された差分画像は、画像合成部15にて予測画像と合成され、当該ブロックあるいは当該サブブロックの符号化画像として画像蓄積部16に蓄積される。   Next, the block is encoded based on the determined prediction method (S4). The predicted image generation unit 11 refers to the encoded image stored in the image storage unit 16 based on the designated prediction method, and generates a predicted image of the block or the subblock. The difference image generation unit 13 creates a difference image between the image to be encoded of the block or the subblock and the prediction image, and the image encoding unit 14 determines the type of the prediction method and the difference image of the block or the subblock. The encoded data is sequentially stored in the recording medium 18. The encoded difference image is combined with the predicted image by the image combining unit 15 and stored in the image storage unit 16 as the encoded image of the block or the sub-block.

上記S1〜S4の動作を符号化対象画像の全てのブロックについて繰り返し(S5)、当該画像の符号化が完了する。   The operations of S1 to S4 are repeated for all the blocks of the encoding target image (S5), and the encoding of the image is completed.

このようにして本発明により記録媒体18に蓄積された符号化データは、以下のような特徴をもっている。   Thus, the encoded data stored in the recording medium 18 according to the present invention has the following characteristics.

(1) 隣接ブロックにブロック単位の予測方式が用いられている割合Ibが高い時の当該ブロックのブロック単位の予測方式の割合は、Ibが低い時の当該ブロックの予測方式の割合に比べ高い。   (1) When the ratio Ib in which the block unit prediction method is used for adjacent blocks is high, the block unit prediction method ratio of the block is higher than the block prediction method ratio when Ib is low.

(2) 量子化幅Iqの大きいブロックにおけるブロック単位の予測方式の割合は、Iqの小さいブロックのブロック単位の予測方式の割合に比べ高い。   (2) The ratio of the block unit prediction method in the block having a large quantization width Iq is higher than the ratio of the block unit prediction method in the block having a small Iq.

以上説明したように本実施形態の画像符号化装置では、ブロック単位およびサブブロック単位それぞれを代表する予測方式による符号量推定に基づき、当該ブロックで用いる予測方式候補を選択するため、全ての予測方式での発生符号量推定を必要とせず、少ない演算量で予測方式を決定することができる。   As described above, in the image coding apparatus according to the present embodiment, all prediction schemes are selected in order to select prediction scheme candidates to be used in the block based on the code amount estimation by the prediction scheme representing each block unit and subblock unit. Therefore, it is possible to determine the prediction method with a small amount of calculation without requiring estimation of the generated code amount.

また、制御情報の利用により、適切な予測方式候補の選定が可能であり、符号化効率の高い予測方式を効率よく決定することができる。   Further, by using the control information, it is possible to select an appropriate prediction method candidate, and it is possible to efficiently determine a prediction method with high coding efficiency.

また、記録媒体18に蓄積された符号化データは上記(1)、(2)のような特徴を持つため、隣接ブロックとの予測方式の相関あるいはブロック毎の量子化幅に応じた適切な予測方式を選択することができ、符号化後の画質を向上させることが出来る。   Also, since the encoded data stored in the recording medium 18 has the characteristics as described in (1) and (2) above, appropriate prediction according to the correlation of the prediction method with adjacent blocks or the quantization width for each block. The method can be selected, and the image quality after encoding can be improved.

図8は、本発明の第4の実施形態における画像符号化装置の構成を示すブロック図である。   FIG. 8 is a block diagram showing a configuration of an image encoding device according to the fourth embodiment of the present invention.

図8において、41は入力画像の解析を行う画像解析部である。前述の実施例と同一の構成要素については、同一符号を付与し、説明を省略する。   In FIG. 8, reference numeral 41 denotes an image analysis unit for analyzing an input image. The same components as those in the previous embodiment are given the same reference numerals, and the description thereof is omitted.

本実施形態の画像符号化装置の動作について、図9の動作フローを参照しながら以下説明する。   The operation of the image coding apparatus according to the present embodiment will be described below with reference to the operation flow of FIG.

符号化が開始されるとまず、画像解析部21が符号化対象のブロックにおける画像の特徴解析を行う(S1)。特徴解析は、符号化対象のブロック内の各サブブロックにおける画像の類似度を評価することで行う。   When encoding is started, first, the image analysis unit 21 performs image feature analysis in the block to be encoded (S1). The feature analysis is performed by evaluating the image similarity in each sub-block in the encoding target block.

特徴解析に用いる類似度Sとしては、例えば、サブブロック毎に、   As the similarity S used for feature analysis, for example, for each sub-block,

Figure 0004184249
Figure 0004184249

なおこの場合、Sが小さいほど、サブブロック間のばらつきが小さく類似度が高い、Sが大きいほどサブブロック間のばらつきが大きく類似度が低いと判断する。   In this case, it is determined that the smaller the S, the smaller the variation between the sub-blocks and the higher the similarity, and the larger the S, the greater the variation between the sub-blocks and the lower the similarity.

あるいは所定のサブブロックを1つ選び、当該サブブロックの画像と当該ブロック内の他のサブブロックにおける画像との差分をサブブロック毎に求め、差分の大きさの合計により類似度を評価する方法を用いても構わない。   Alternatively, a method of selecting one predetermined sub-block, obtaining a difference between the image of the sub-block and an image of another sub-block in the block for each sub-block, and evaluating the similarity based on the sum of the differences. You may use.

例えば、図10におけるサブブロックインデックスk=0のサブブロックとそれ以外のサブブロックにおける画像との差分の大きさの合計を用いる場合、類似度Sは、次式で表される。   For example, when using the sum of the magnitudes of differences between the sub-block index k = 0 in FIG. 10 and the image in the other sub-blocks, the similarity S is expressed by the following equation.

Figure 0004184249
Figure 0004184249

なおこの場合、Sが小さいほど、サブブロック間の誤差が少なく類似度が高い、Sが大きいほどサブブロック間の誤差が大きく類似度が低いと判断する。   In this case, it is determined that the smaller the S, the smaller the error between the sub-blocks and the higher the similarity, and the larger the S, the greater the error between the sub-blocks and the lower the similarity.

次に予測方式制御部11は、画像特徴解析の結果と所定のしきい値TH6、TH7(ただしTH6<TH7)に基づき当該ブロックの符号化に用いる予測方式候補を決定する(S2)。例えば、
S<TH6あるいはTH7≦Sならば、ブロック単位の全ての符号化方式を当該ブロックの予測方式候補とする。
Next, the prediction method control unit 11 determines a prediction method candidate used for encoding the block based on the result of the image feature analysis and predetermined threshold values TH6 and TH7 (where TH6 <TH7) (S2). For example,
If S <TH6 or TH7 ≦ S, all coding methods in units of blocks are set as prediction method candidates for the block.

TH6≦S<TH7ならば、サブブロック単位の全ての符号化方式を当該ブロックの予測方式候補とする。   If TH6 ≦ S <TH7, all coding schemes in units of sub-blocks are set as prediction scheme candidates for the block.

サブブロック間の類似度が高い場合(Sが小さい場合)、ブロック単位、サブブロック単位いずれの予測方式を用いた場合でも高い予測精度が得られ、ブロック単位、サブブロック単位いずれの予測方式を用いても、差分画像の符号化効率の差は小さい。よってブロック単位の予測方式を選択することで、予測方式を示す符号量を抑制し符号化効率を高めることが可能である。   When the degree of similarity between sub-blocks is high (when S is small), high prediction accuracy can be obtained using either the block unit or sub-block unit prediction method, and either block unit or sub-block unit prediction method is used. However, the difference in coding efficiency of the difference image is small. Therefore, by selecting a prediction method in units of blocks, it is possible to suppress the amount of code indicating the prediction method and increase the coding efficiency.

一方サブブロック間の類似度が低い場合(Sが大きい場合)は、ブロック単位、サブブロック単位いずれの予測方式を用いた場合も予測精度が低く、やはりブロック単位、サブブロック単位いずれの予測方式を用いても差分画像の符号化効率の差は小さい。よってブロック単位の予測方式を選択することで、予測方式を示す符号量を抑制し符号化効率を高めることが可能である。   On the other hand, when the degree of similarity between sub-blocks is low (when S is large), the prediction accuracy is low even when using a prediction method in units of blocks or sub-blocks. Even if it is used, the difference in coding efficiency of the difference image is small. Therefore, by selecting a prediction method in units of blocks, it is possible to suppress the amount of code indicating the prediction method and increase the coding efficiency.

上記以外の場合は、予測精度の高いサブブロック単位の予測方式を選択することで、符号化効率を高めることが可能である。   In cases other than the above, it is possible to increase the coding efficiency by selecting a prediction method in units of sub-blocks with high prediction accuracy.

なお実施例1〜3の場合と同様、しきい値TH6、TH7を制御情報に応じて変更する構成としても良いし、さらにしきい値を増やし予測方式候補に占めるブロック単位およびサブブロック単位の予測方式の割合を段階的に変える構成であっても構わない。   As in the case of the first to third embodiments, the threshold values TH6 and TH7 may be changed according to the control information. Further, the threshold value is increased and predictions in block units and sub-block units occupying the prediction scheme candidates are possible. A configuration in which the ratio of the method is changed in stages may be used.

次に選択された予測方式候補から当該ブロックで用いる予測方式を決定する(S3)。なお、サブブロック単位の予測方式を用いる場合には、サブブロック毎に用いる予測方式を決定する。選択された予測方式候補から当該ブロックで用いる予測方式を決定する方法はいかなる方法を用いても構わない。例えば、従来手法と同様に、全ての予測方式候補について発生符号量を推定し、発生符号量が最小となる予測方式を用いる。   Next, a prediction method used in the block is determined from the selected prediction method candidates (S3). In addition, when using the prediction method per subblock, the prediction method used for every subblock is determined. Any method may be used as a method for determining a prediction method used in the block from the selected prediction method candidates. For example, as in the conventional method, the generated code amount is estimated for all prediction method candidates, and a prediction method that minimizes the generated code amount is used.

なお予測方式候補に選択された予測方式が1種類のみの場合、このステップは省略可能である。   Note that this step can be omitted when only one type of prediction method is selected as a prediction method candidate.

次に決定した予測方式に基づき当該ブロックの符号化を行う(S4)。予測画像生成部11は、指定された予測方式に基づき、画像蓄積部16に蓄積された符号化済み画像を参照し、当該ブロックあるいは当該サブブロックの予測画像を生成する。差分画像生成部13は、当該ブロックあるいは当該サブブロックの符号化対象の画像と予測画像の差分画像を作成し、画像符号化部14が当該ブロックあるいは当該サブブロックの予測方式の種別および差分画像を符号化し、符号化データは順次、記録媒体18に蓄積される。符号化された差分画像は、画像合成部15にて予測画像と合成され、当該ブロックあるいは当該サブブロックの符号化画像として画像蓄積部16に蓄積される。   Next, the block is encoded based on the determined prediction method (S4). The predicted image generation unit 11 refers to the encoded image stored in the image storage unit 16 based on the designated prediction method, and generates a predicted image of the block or the subblock. The difference image generation unit 13 creates a difference image between the image to be encoded of the block or the subblock and the prediction image, and the image encoding unit 14 determines the type of the prediction method and the difference image of the block or the subblock. The encoded data is sequentially stored in the recording medium 18. The encoded difference image is combined with the predicted image by the image combining unit 15 and stored in the image storage unit 16 as the encoded image of the block or the sub-block.

なお、実施例1〜3の場合と同様、制御情報Iに応じてしきい値TH6,TH7を変更する構成とした場合、本発明により記録媒体18に蓄積された符号化データは、制御情報Iに応じてブロック単位の予測方式の割合が変化する特徴をもつ。   As in the first to third embodiments, when the threshold values TH6 and TH7 are changed according to the control information I, the encoded data stored in the recording medium 18 according to the present invention is the control information I. The ratio of the prediction method for each block changes according to the above.

以上説明したように本実施形態の画像符号化装置では、画像の特徴解析結果に基づき、当該ブロックで用いる予測方式候補を選定するため、全ての予測方式での発生符号量推定を必要とせず、少ない演算量で予測方式を決定することができる。   As described above, the image coding apparatus according to the present embodiment selects a prediction method candidate to be used in the block based on the result of image feature analysis, and therefore does not need to estimate a generated code amount in all prediction methods. The prediction method can be determined with a small amount of calculation.

また、記録媒体18に蓄積された符号化データは上記のような特徴を持つため、制御情報に応じた適切な予測方式を選択することができ、符号化後の画質を向上させることができる。   In addition, since the encoded data stored in the recording medium 18 has the above characteristics, an appropriate prediction method according to the control information can be selected, and the image quality after encoding can be improved.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

本発明の第1の実施形態における画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus in the 1st Embodiment of this invention. 第1の実施形態の画像符号化装置の動作フローを示す図である。It is a figure which shows the operation | movement flow of the image coding apparatus of 1st Embodiment. 本発明の第2の実施形態における画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus in the 2nd Embodiment of this invention. 第2の実施形態の画像符号化装置の動作フローを示す図である。It is a figure which shows the operation | movement flow of the image coding apparatus of 2nd Embodiment. 本発明の第3の実施形態における画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus in the 3rd Embodiment of this invention. 第3の実施形態の画像符号化装置の動作フローを示す図である。It is a figure which shows the operation | movement flow of the image coding apparatus of 3rd Embodiment. 関数F(Ib)の例を示す図である。It is a figure which shows the example of the function F (Ib). 本発明の第4の実施形態における画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus in the 4th Embodiment of this invention. 第4の実施形態の画像符号化装置の動作フローを示す図である。It is a figure which shows the operation | movement flow of the image coding apparatus of 4th Embodiment. ブロックおよびサブブロックの概要を示す図である。It is a figure which shows the outline | summary of a block and a subblock. 予測方式の概要を示す図である。It is a figure which shows the outline | summary of a prediction system. 従来の画像符号化装置の動作フローを示す図である。It is a figure which shows the operation | movement flow of the conventional image coding apparatus.

符号の説明Explanation of symbols

11 予測方式制御部、12 予測画像生成部、13 差分画像生成部、14 画像符号化部、15 画像合成部、16 画像蓄積部、17 録画モード選択部、18 記録媒体、21 符号量制御部、31 符号量推定部、32 切り替えスイッチ、41 画像解析部。   DESCRIPTION OF SYMBOLS 11 Prediction system control part, 12 Prediction image generation part, 13 Difference image generation part, 14 Image encoding part, 15 Image composition part, 16 Image storage part, 17 Recording mode selection part, 18 Recording medium, 21 Code amount control part, 31 Code amount estimation unit, 32 changeover switch, 41 image analysis unit.

Claims (1)

ブロック分割された画像に対し、前記ブロック毎あるいは前記ブロックを更に分割したサブブロック毎に変更可能な複数の予測方式を用いてフレーム内予測符号化を行う画像符号化装置において、
前記複数の予測方式の一部を所定の条件で予測方式候補とし、前記予測方式候補から当該ブロックの予測方式を決定し、
前記所定の条件は、画像の圧縮率であり、該圧縮率が高い場合には、前記予測方式候補に占める前記ブロック毎の予測方式の割合を高く、該圧縮率が低い場合には、前記予測方式候補に占める前記サブブロック毎の予測方式の割合を高くすることを特徴とする、画像符号化装置。
In an image encoding device that performs intra-frame prediction encoding using a plurality of prediction schemes that can be changed for each block or for each sub-block obtained by further dividing the block, on a block-divided image,
A part of the plurality of prediction methods is set as a prediction method candidate under a predetermined condition, a prediction method of the block is determined from the prediction method candidate ,
The predetermined condition is an image compression rate. When the compression rate is high, the ratio of the prediction method for each block in the prediction method candidate is high, and when the compression rate is low, the prediction is performed. An image coding apparatus characterized by increasing a ratio of a prediction method for each sub-block in a method candidate .
JP2003413226A 2003-12-11 2003-12-11 Image encoding device Expired - Fee Related JP4184249B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003413226A JP4184249B2 (en) 2003-12-11 2003-12-11 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003413226A JP4184249B2 (en) 2003-12-11 2003-12-11 Image encoding device

Publications (2)

Publication Number Publication Date
JP2005175903A JP2005175903A (en) 2005-06-30
JP4184249B2 true JP4184249B2 (en) 2008-11-19

Family

ID=34733416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003413226A Expired - Fee Related JP4184249B2 (en) 2003-12-11 2003-12-11 Image encoding device

Country Status (1)

Country Link
JP (1) JP4184249B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008022405A (en) 2006-07-14 2008-01-31 Sony Corp Image processing apparatus and method, and program
JP5007761B2 (en) * 2010-07-12 2012-08-22 ソニー株式会社 Image processing apparatus and method, program, and recording medium

Also Published As

Publication number Publication date
JP2005175903A (en) 2005-06-30

Similar Documents

Publication Publication Date Title
US9781443B2 (en) Motion vector encoding/decoding method and device and image encoding/decoding method and device using same
CN103024382B (en) Dynamic image encoding device, dynamic image encoding method, dynamic image decoding device and dynamic image decoding method
JP5211263B2 (en) Method and apparatus for local multiple hypothesis prediction during video coding of coding unit
JP4898467B2 (en) Coding mode determination method and apparatus for variable block size motion prediction
CN103748880B (en) The coding method of image sequence and the coding/decoding method and device of device and image sequence
CN101283600B (en) Reference image selection method and device
JP2005151017A (en) Image coding apparatus
WO2017122604A1 (en) Moving image encoding device, moving image encoding method, and recording medium for recording moving image encoding program
JP5216710B2 (en) Decryption processing method
JP2008522506A (en) Temporal prediction in video coding.
EP2034742A2 (en) Video coding method and device
JP2005348280A (en) Image encoding method, image encoding apparatus, image encoding program, and computer readable recording medium recorded with the program
JP2006020217A (en) Image coder
JP4184249B2 (en) Image encoding device
JP4868539B2 (en) Video encoding apparatus and decoding apparatus
JP2006005659A (en) Device and method for image encoding
KR101842551B1 (en) Method for deciding motion partition mode and encoder
CN113422951B (en) Decoding and encoding method, device and equipment
KR20170075974A (en) Apparatus and Method for Encoding and Decoding of Image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080605

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080801

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

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

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

Free format text: PAYMENT UNTIL: 20110912

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120912

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130912

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees