JP2009260494A - Image coding apparatus and its control method - Google Patents
Image coding apparatus and its control method Download PDFInfo
- Publication number
- JP2009260494A JP2009260494A JP2008104945A JP2008104945A JP2009260494A JP 2009260494 A JP2009260494 A JP 2009260494A JP 2008104945 A JP2008104945 A JP 2008104945A JP 2008104945 A JP2008104945 A JP 2008104945A JP 2009260494 A JP2009260494 A JP 2009260494A
- Authority
- JP
- Japan
- Prior art keywords
- prediction
- mode
- calculated
- unit
- prediction mode
- 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.)
- Withdrawn
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
本発明は動画像の画像符号化技術、特にフレーム内予測符号化に関するものである。 The present invention relates to an image coding technique for moving images, and more particularly to intra-frame predictive coding.
従来、CD−ROM等の光ディスクやハードディスク等の蓄積媒体に静止画像を保存・表示するための符号化方式としてISO(国際標準化機構)により標準化されたJPEG方式が広く用いられている。また、動画像と音声を同様な蓄積媒体に保存・表示したり、通信路を介して放送、または双方向通信したりするための符号化方式としてISOにより標準化されたMPEG方式が広く用いられている。 Conventionally, the JPEG system standardized by ISO (International Organization for Standardization) has been widely used as an encoding system for storing and displaying still images on a storage medium such as an optical disk such as a CD-ROM or a hard disk. In addition, the MPEG system standardized by ISO is widely used as an encoding system for storing and displaying moving images and audio on a similar storage medium, broadcasting over a communication channel, or bidirectional communication. Yes.
動画像と音声の符号化方式であるMPEG方式は、符号化効率の向上を目的として年々その符号化方式が改良されており、1992年にMPEG−1、1994年にMPEG−2、1999年にはMPEG−4、2003年にはMPEG−4AVC/H.264がそれぞれ国際標準として規定されている。 The MPEG method, which is a moving image and audio encoding method, has been improved year by year for the purpose of improving the encoding efficiency. MPEG-1 in 1992, MPEG-2 in 1994, MPEG-2 in 1999 MPEG-4, and in 2003 MPEG-4AVC / H. H.264 is defined as an international standard.
MPEG−4においては、符号化効率の向上はもちろんのこと、符号誤り訂正機能の強化や、符号化対象毎に最適な符号化を施すオブジェクト符号化の導入なども実現されている。さらには、MEPG−4シンタックス上のビジュアル層とオーディオ層を包含するファイル形式などを規定するシステム層においては、利用者が要求する任意の時刻の動画像または音声データに容易にアクセスできる仕組みを提供している。 In MPEG-4, not only improvement in coding efficiency but also enhancement of a code error correction function and introduction of object coding for performing optimum coding for each coding target are realized. Furthermore, the system layer that defines the file format including the visual layer and the audio layer on the MPEG-4 syntax has a mechanism that allows easy access to moving image or audio data at any time requested by the user. providing.
また、MPEG−4AVC/H.264では、MPEG−4に対して更なる符号化効率向上を目指してフレーム間予測、フレーム内予測、エントロピー符号化などにおいて多種多様な新規符号化ツールが採用されている。特に本発明で着目しているフレーム内予測においては、輝度信号に対するフレーム内予測として4×4画像ブロック単位での予測方式とグラデーション画像などに有効とされる16×16画像ブロック単位での予測方式が規定されており、4×4輝度ブロックに対して9つ、16×16輝度ブロックに対して4つの予測モードが用意されている。 In addition, MPEG-4 AVC / H. H.264 employs a wide variety of new encoding tools for inter-frame prediction, intra-frame prediction, entropy encoding, and the like with the aim of further improving the encoding efficiency with respect to MPEG-4. In particular, in the intra-frame prediction focused on in the present invention, a prediction method in units of 4 × 4 image blocks and a prediction method in units of 16 × 16 image blocks that are effective for gradation images and the like as intra-frame prediction for luminance signals. Are defined for the 4 × 4 luminance block and four prediction modes for the 16 × 16 luminance block.
図10に、4×4輝度ブロックとフレーム内予測に使用する参照画像サンプルの相対位置関係を示す。符号化対象の4×4輝度ブロックは、図中(0,0)、(1,0)、(2,0)、(3,0)、(0,1)、(1,1)、(2,1)、(3,1)、(0,2)、(1,2)、(2,2)、(3,2)、(0,3)、(1,3)、(2,3)、(3,3)の16サンプルで表現されている。一方、参照画像サンプルは4×4輝度ブロックの周囲に位置し、且つ、符号化済みである。図示では、(−1,−1)、(0,−1)、(1,−1)、(2,−1)、(3,−1)、(4,−1)、(5,−1)、(6,−1)、(7,−1)、(−1,0)、(−1,1)、(−1,2)、(−1,3)の13サンプルで表現されている。 FIG. 10 shows the relative positional relationship between the 4 × 4 luminance block and the reference image sample used for intra-frame prediction. The 4 × 4 luminance blocks to be encoded are (0,0), (1,0), (2,0), (3,0), (0,1), (1,1), ( 2,1), (3,1), (0,2), (1,2), (2,2), (3,2), (0,3), (1,3), (2, 3) and 16 samples of (3, 3). On the other hand, the reference image sample is located around the 4 × 4 luminance block and has been encoded. In the figure, (-1, -1), (0, -1), (1, -1), (2, -1), (3, -1), (4, -1), (5,- 1), (6, -1), (7, -1), (-1, 0), (-1, 1), (-1, 2), (-1, 3). ing.
図11乃至図18に、各予測モードにおいて、符号化対象16個の各サンプルとそれに対する予測値を算出するために使用される参照サンプルとの位置関係を表す概念図を示す。使用される参照サンプルから符号化対象画像サンプルへの方向を見てみると、図11のモード0は垂直方向への予測、図12のモード1は水平方向への予測となる。また、図示されないが、モード2は13個の参照サンプルの平均値を予測値とする。図13のモード3は左対角下方向への予測、図14のモード4は右対角下方向への予測である。図15のモード5は右垂直斜め下方向への予測、図16のモード6は右水平斜め下方向への予測である。図17のモード7は左垂直斜め下方向への予測、そして、図18のモード8は右水平斜め上方向への予測となっている。
FIGS. 11 to 18 are conceptual diagrams showing the positional relationship between 16 samples to be encoded and reference samples used to calculate a prediction value for each sample in each prediction mode. Looking at the direction from the reference sample to be used to the encoding target image sample,
また、色差信号に対するフレーム内予測は8×8色差ブロックに対する4つの予測モードが用意されている。輝度信号、色差信号のいずれにおいても、どの予測モードを使用してフレーム内予測符号化を行うかはユーザーの判断に委ねられており、高い符号化効率を達成するために最適な予測モードを選択することが重要となっている。
しかしながら、輝度信号に対する13予測モード、色差信号に対する4予測モードの内、どの予測モードを使用するかを決定するためには、処理対象ブロックで使用する予測値の算出と、処理対象ブロックから予測値を減算して得られる予測残差の算出、さらにSAD(Sum of Absolute Difference)など指標値の算出が必要となり、これをすべての予測モードに対して行う膨大な演算が必要となる。
さらに、4×4輝度ブロックのフレーム内予測を行うためには、直前の隣接4×4輝度ブロックをフレーム内予測、直交変換、量子化した後、逆量子化、逆直交変換して再構成される参照画像データが必要であり、スループット処理性能を向上させるにはこの一連の処理を短期間で完了する必要がある。
However, in order to determine which prediction mode to use among 13 prediction modes for luminance signals and 4 prediction modes for color difference signals, calculation of a prediction value used in the processing target block and prediction value from the processing target block are performed. It is necessary to calculate a prediction residual obtained by subtracting, and to calculate an index value such as SAD (Sum of Absolute Difference), and enormous operations are required to perform this for all prediction modes.
Furthermore, in order to perform intra-frame prediction of a 4 × 4 luminance block, the immediately preceding adjacent 4 × 4 luminance block is intra-frame predicted, orthogonally transformed, quantized, and then reconstructed by inverse quantization and inverse orthogonal transformation. In order to improve throughput processing performance, it is necessary to complete this series of processing in a short period of time.
本発明はかかる問題点に鑑みなされたものであり、高いスループット処理性能を実現しながら、予測モード選択に必要な演算資源を低減させたフレーム内予測符号化技術を提供しようとするものである。 The present invention has been made in view of such problems, and an object of the present invention is to provide an intra-frame predictive coding technique that reduces computational resources necessary for prediction mode selection while realizing high throughput processing performance.
この課題を解決するため、本発明の画像符号化装置は以下の構成を備える。すなわち、
入力した1フレームの画像データから、複数の画素で構成される画素ブロック単位に、複数の予測モードのいずれかを用いて予測誤差を算出し、算出した予測誤差を符号化手段で符号化する画像符号化装置であって、
前記複数の予測モードの中で、予測値算出のための演算内容が共通で、予測値算出のために参照する画素位置が異なる2以上の予測モードについて、当該2以上の予測モードのいずれか一方の予測モードで予測値を算出する複数の予測値算出手段と、
該複数の予測値算出手段で算出した予測値に基づき、着目画素ブロック内の各画素の予測誤差を算出する複数の予測誤差算出手段と、
該複数の予測誤差算出手段で算出した着目画素ブロック内の各画素の予測誤差の絶対値の合計を算出する複数の合算手段と、
前記複数の予測値算出手段それぞれに対し、それぞれが実行可能な予測モードを順次設定して、それぞれにて予測値の算出を実行させ、前記予測誤差算出手段、及び、前記合算手段による合算を行なわせる予測モード設定手段と、
前記合算手段による、処理すべき全予測モードの前記絶対値の合計の演算が終了したとき、最小の合算結果を算出した予測モードを、前記着目画素ブロックの予測モードとして決定する決定手段とを備える。
In order to solve this problem, the image coding apparatus of the present invention has the following configuration. That is,
An image in which a prediction error is calculated using one of a plurality of prediction modes for each pixel block composed of a plurality of pixels from one frame of input image data, and the calculated prediction error is encoded by an encoding unit. An encoding device comprising:
Among two or more prediction modes, one of the two or more prediction modes is used for two or more prediction modes having the same calculation content for calculating a prediction value and different pixel positions referred to for calculation of the prediction value. A plurality of prediction value calculation means for calculating a prediction value in the prediction mode,
A plurality of prediction error calculation means for calculating a prediction error of each pixel in the pixel block of interest based on the prediction values calculated by the plurality of prediction value calculation means;
A plurality of summing means for calculating the sum of absolute values of prediction errors of the respective pixels in the target pixel block calculated by the plurality of prediction error calculating means;
For each of the plurality of predicted value calculation means, a prediction mode that can be executed is sequentially set, and a predicted value is calculated for each of them, and the prediction error calculation means and the summation means perform summation. Prediction mode setting means for
Determining means for determining, as the prediction mode of the pixel block of interest, a prediction mode in which the minimum sum is calculated when the calculation of the sum of the absolute values of all prediction modes to be processed by the summing means is completed; .
本発明によれば、高いスループット処理性能を実現しながら、予測モード選択に必要な演算資源を低減させてフレーム内予測符号化を行なうことが可能になる。 According to the present invention, it is possible to perform intraframe predictive coding while reducing computational resources necessary for prediction mode selection while realizing high throughput processing performance.
以下、本発明の実施の形態について図面を参照しながら詳細に説明する。なお、実施形態では、MPEG−4AVC/H.264符号化方式に適用した例を説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the embodiment, MPEG-4 AVC / H. An example applied to the H.264 encoding method will be described.
[第1の実施形態]
図3は、第1の実施形態における画素ブロック単位に符号化する画像符号化装置のブロック構成図である。本装置は、フレーム内予測部101、予測方式選択部102、直交変換部103、量子化部104、エントロピー符号化部105を有する。また、本装置は、エントロピー符号化部105で生成された符号化データを復号するエントロピー復号化部106、逆量子化部107、逆直交変換部108、ループフィルタ109、動き補償部110、フレーム間動き予測部111、参照フレーム記憶部112を有する。なお、動画像データの入力源は、ビデオカメラでも構わないし、動画像データを格納した記憶媒体でも構わない。
[First Embodiment]
FIG. 3 is a block configuration diagram of an image encoding device that performs encoding in units of pixel blocks in the first embodiment. This apparatus includes an
図1は、フレーム内予測部101のブロック構成図である。フレーム内予測部101は、1フレーム内の着目画素ブロックを符号化する際に、その着目画素ブロックに隣接し、符号化処理済みのブロック内の参照画像を格納する参照画像データ記憶部1001を有する。また、本装置は、着目ブロック内の画素データ(輝度データ)を格納する4×4ブロック記憶部1002を有する。他の構成は以下の説明する通りである。
FIG. 1 is a block configuration diagram of the
モード0/1予測値演算部1003は、予測モード0または1における着目ブロック内の各画素の予測値を算出する。モード0/1予測誤差算出部1004は、予測モード0または1における着目ブロック内の各画素の予測誤差を算出する。モード0/1SAD算出部1005は、予測モード0または1における着目ブロック内の予測誤差のSAD(Sum of Absolute Difference)を算出する。
The
モード3/4予測値算出部1006は予測モード3または4における予測値を算出する。モード3/4予測誤差算出部1007は、予測モード3または4における予測誤差を算出する。モード3/4SAD算出部1008は、予測モード3または4における着目ブロック内の予測誤差のSADを算出する。
A
モード5/6予測値算出部1009は予測モード5または6における予測値を算出する。モード5/6予測誤差算出部1010は、予測モード5または6における予測誤差を算出する。モード5/6SAD算出部1011は、予測モード5または6におけるSADを算出する。
A
モード7/8予測値算出部1012は予測モード7または8における予測値を算出する。モード7/8予測誤差算出部1013は予測モード7または8における予測誤差を算出する。モード7/8SAD算出部1014は予測モード7または8におけるSADを算出する。
The
モード2予測値算出部1015は予測モード2における予測値を算出する。モード2予測誤差算出部1016は予測モード2における予測誤差を算出する。モード2SAD算出部1017は予測モード2におけるSADを算出する。
The
SAD記憶部1018は、各SAD算出部で算出したSADを一時的に記憶する。イントラ予測制御部1019は、SAD記憶部1018に記憶された各SADの中から最小となるSADを検索し、その最小SADを算出した予測モードを決定する。
The
通常、予測誤差が小さい値であるほど、符号長の短い符号語を割り当てることで、符号化効率を高めている。換言すれば、SADが小さいほど、符号化効率が高くなると言える。そこで、イントラ予測制御部1019は、最小となるSADを検索し、その最小値となった予測モードが0乃至8のいずれであるかを判定し、その判定結果を最終的な予測モードとする。
Usually, the smaller the prediction error is, the higher the coding efficiency is by assigning a codeword having a shorter code length. In other words, it can be said that the smaller the SAD, the higher the encoding efficiency. Therefore, the intra
選択部1020は、内部に、各予測誤差算出部からの予測誤差を格納するバッファを有し、イントラ予測制御部1019が決定した予測モードに応じた予測誤差を選択し、予測方式選択部1020に出力する。このとき、選択部1020は、選択した予測モードを特定する情報も、予測方式選択部102に出力する。
The
上記の様に、予測モード0と1、モード3と4、モード5と6、モード7と8を共通の構成にて行なうのは、予測値算出のために参照する画素位置が異なるものの、それらの予測値算出のための演算内容が共通であるのが理由である。なお、ここでは、MPEG−4AVC/H.264を例にしているので、1つの構成で実現可能な予測モードは最大で2つとなるが、演算内容が共通な予測モードが2以上ある符号化方式の場合には、当然、1つの構成で2以上の予測モードに対応することも可能である。
As described above,
図4は、イントラ予測部1019によるフレーム内予測部101全体の動作制御シーケンスを表すフローチャートである。また、図6は、図1に示した参照画像データ記憶部1001、乃至、予測誤差選択部1020で構成される図3のフレーム内予測部101による、イントラ予測→整数変換→量子化→逆量子化→逆整数変換までの一連の動作において、各処理が要する処理サイクル数を時系列に表したタイミングチャートである。
FIG. 4 is a flowchart showing an operation control sequence of the entire
以後、上記画像符号化装置の実施形態における動作形態について、その符号化処理に係わる一連の動作、特にフレーム内予測部101による予測モードを決定し予測誤差を出力するまでの予測符号化処理手順を図1、図3、図4、図6を用いて説明する。
Hereinafter, with regard to the operation mode in the embodiment of the image encoding device, a series of operations related to the encoding process, particularly a prediction encoding process procedure until a prediction mode is determined by the
図1に示した参照画像データ記憶部1001乃至差選択部1020で構成される図3のフレーム内予測部101では、図6に示したようにイントラ予測→整数変換→量子化→逆量子化→逆整数変換までの一連の動作を合計9処理サイクルで処理する
処理サイクル0(図6参照)においては、イントラ予測制御部1019は、モード0/1予測値算出部に対して予測モード0を、モード3/4予測値算出部1006に対して予測モード3を、モード5/6予測値算出部1009に対して予測モード5を、モード7/8予測値算出部1012に対しては予測モード7を設定する(ステップS101)。つまり、イントラ予測制御部1019は、各予測値算出部に対する予測モード設定手段として機能する。
In the
またイントラ予測制御部1019は、予測モード0/3/5/7が選択されたことをSAD記憶部1018にも通知する。SAD記憶部1018は、この通知を受けて、各予測モード毎に予め定義されたアドレス位置に、合算結果であるSADを格納する。
The intra
モード0/1予測値算出部1003は参照画像データ記憶部1001から入力する参照サンプルを用いて予測モード0により予測値を算出する。モード0/1予測誤差算出部1004はその予測値を4×4ブロック記憶部1002から入力するブロック画像データを用いて予測誤差を算出する。算出された予測誤差(4×4個)は、モード0/1SAD算出部1005及び選択部1020に出力される。選択部1020は、この予測誤差を一時的に内部のバッファに格納する。モード0/1SAD算出部1005は入力した予測誤差を用いてSADを算出し、SAD記憶部1018に出力する。以下、同様に予測モード3、5、7により算出されたSADがSAD記憶部1018に記憶されると共に、予測モード3、5、7の予測誤差が選択部1020の内部バッファに格納される。
The
また、予測モード2予測値算出部1015、予測モード2予測誤差算出部1016、予測モード2SAD算出部1017は、処理サイクル0(以下に説明する処理サイクル1でも構わない)において、その処理を実行するものとする。従って、サイクル0では、予測モード0、2、3、5、7のSADがSAD記憶部1018に格納され、その予測誤差が選択部1020の内部バッファにそれぞれ格納されることになる。
Further, the
処理サイクル1(図6参照)においては、イントラ予測制御部1019は、モード0/1予測値算出部1003に対して予測モード1を設定する。また、モード3/4予測値算出部1006に対して予測モード4を、モード5/6予測値算出部1009に対して予測モード6を、そして、モード7/8予測値算出部1012に対しては予測モード8を設定する(ステップS102)。
In the processing cycle 1 (see FIG. 6), the intra
またイントラ予測制御部1019は、予測モード1/4/6/8が選択されたことをSAD記憶部1018にも通知する。モード0/1予測値算出部1003は参照画像データ記憶部1001から入力する参照サンプルを用いて予測モード1により予測値を算出し、モード0/1予測誤差算出部1004はその予測値を4×4ブロック記憶部1002から入力するブロック画像データを用いて予測誤差を算出する。算出された予測誤差は、選択部1020、モード0/1SAD算出部1004に出力される。モード0/1SAD算出部1005は入力した予測誤差を用いてSADを算出し、SAD記憶部1018に出力する。以下、同様に予測モード4、6、8、および2により算出されたSADがSAD記憶部1018に記憶され、各予測モードの予測誤差が選択部1020の内部バッファに格納される。
The intra
以上のようにして、全予測モードのSADの算出が終了する。 As described above, the calculation of SAD in all prediction modes ends.
この後、処理サイクル2(図6参照)にて、イントラ予測制御部1019は、処理サイクル0、1によってSAD記憶部1018に記憶されたすべての予測モード0〜8によって算出されたSADに応じて、最もSAD値の小さい予測モードを最終的な予測モードとして決定する(ステップS103)。次に、イントラ予測制御部1019は、決定した予測モードを選択部1020へ通知する(ステップS104)。この結果、選択部1020は、内部のバッファに格納された各予測モードの予測誤差のうち、決定した予測モードに対応する予測誤差を出力すると共に、予測モードを示す情報も出力する(ステップS105)。尚、この出力処理を終えると、選択部1020は、内部のバッファに格納された各予測モードの予測誤差を破棄、もしくは、上書き可能に設定する。
Thereafter, in the processing cycle 2 (see FIG. 6), the intra
次に、図8を用いて、図1に示した、モード0/1予測値算出部1003、モード0/1予測誤差算出部1004、モード0/1SAD算出部1005を説明する。
図中、3001は参照画像データ記憶部1001に記憶された参照サンプル(0,−1)、3002は参照サンプル(−1,0)である(図10参照)。3003は4×4ブロック記憶部1002に記憶された画像サンプル(0,0)、3004は画像サンプル(0,1)、3005は画像サンプル(1,0)、3006は画像サンプル(0,2)、3007は画像サンプル(2,0)、3008は画像サンプル(0,3)、3009は画像サンプル(3,0)である。
Next, the
In the figure, 3001 is a reference sample (0, -1) stored in the reference image
なお、これらサンプルの座標は、着目画素ブロック内の基準位置に対する相対的なものであることに注意されたい。例えば、予測モード0では、着目画素ブロック内の基準位置は(i、0)(i=0、1、2、3)となる。従って、例えばサンプル(0、−1)で示される画素データ(輝度データ)は、座標(0+i,−1+0)、すなわち、座標(i,−1)の画素値となる。同様に、サンプル(0,3)は、座標(i,3)の画素値となる。
Note that the coordinates of these samples are relative to the reference position in the pixel block of interest. For example, in the
モード0では、i=0、1、2、3と4段階に渡って変化するので、i=0の場合に4個の予測誤差が除算器3010乃至3013で算出され、その絶対値がABS演算器3014乃至3017で演算される。更に、各絶対値が加算器3018乃至3020で合算される。加算器3021は、レジスタ3022内の保持された値を加算し、その加算結果を再びレジスタ3022に格納する。このレジスタ3022は、1ブロックのSADを算出する際に“0”に初期化されるものである。
In
上記の処理をi=0、1、2、3について実行してき、i=3になった場合、加算器3021は、着目ブロックのSADを算出することになる。従って、i=3になった場合、加算器3021の加算結果を着目ブロックのモード0のSADとしてSAD記憶部1018に格納する。
When the above processing is executed for i = 0, 1, 2, 3 and i = 3, the
一方、モード1の場合、着目ブロックの基準位置は(0,i)(i=0、1、2、3)となる。ここで、変動する座標がY軸(垂直軸)上であることに注意されたい。かかる点を除いて、各処理部の処理はモード0と同じである。
On the other hand, in
上記の通り、予測モード0/1においては、予測値を得るのに演算を行う必要はなく、所望の参照サンプルがそのまま使用される。除算器3010〜3013が、モード0/1予測誤差算出部1004に対応し、絶対値化するABS演算器3014〜1017、および加算器3018〜3019がモード0/1SAD算出部1005に対応する。予測値を選択する回路と、予測誤差を算出する回路、SADを算出する回路が予測モード0と1において共用されていることに注意されたい。
As described above, in
図9は、図1に示したモード3/4予測値算出部1006、モード3/4予測誤差算出部1007、モード3/4SAD算出部1008の詳細を示すブロック図である。
FIG. 9 is a block diagram showing details of the
図中、4001〜4006は参照画像データ記憶部1001に記憶された参照サンプルである(図10参照)。4007は定数2である。4008〜4015は4×4ブロック記憶部1002に記憶された画像サンプルである(図10参照)。
In the figure,
予測モード3/4の予測値を算出する回路である4016〜4020が、モード3/4予測値算出部1006に対応する。また、除算器4021〜4024が、モード3/4予測誤差算出部1007に対応する。また、絶対値化するABS演算器4025〜4028、加算器4029〜4032、及び、レジスタ4033がモード3/4SAD算出部1007に対応する。なお、シフタ4017は、入力した値を上位方向に1ビットシフトする、すなわち、入力した値を2倍にする回路である。同様にシフタ4020は、入力した値を下位方向に2ビットシフトする、すなわち、入力した値を1/4にする回路である。
4016 to 4020 which are circuits for calculating the prediction value of the
この構成における動作も、先に説明した予測モード0/1と同様であり、予測値を選択する回路と、予測誤差を算出する回路、SADを算出する回路が予測モード3と4において共用されていることに注意されたい。なお、定数“2”を加算器4018で加算するのは、シフタ4020にて1/4にした際に、小数点以下を切り上げるためのものである。
The operation in this configuration is the same as in the
上記説明から、他の予測モード5乃至8についても同様に構成できることは明らかであろう。
From the above description, it will be apparent that the
なお、上記実施形態では、フレーム内予測部101として4×4輝度ブロックに対するフレーム内予測符号化処理を説明したが、16×16輝度ブロックおよび8×8色差ブロックに対するフレーム内予測符号化処理においても同様に適用可能である。
In the above-described embodiment, the intra-frame prediction encoding process for the 4 × 4 luminance block has been described as the
以上説明したように、本実施形態によれば、各予測値演算部に、予測モードを順次設定して、全予測モードの予測誤差の算出させる。この結果、各モード毎に独立した回路構成にした場合と比べて、実質的に1/2の規模でイントラ予測符号化処理が実現できるようになる。 As described above, according to the present embodiment, the prediction mode is sequentially set in each prediction value calculation unit, and the prediction error of all prediction modes is calculated. As a result, the intra prediction encoding process can be realized on a scale substantially ½ compared to the case where the circuit configuration is independent for each mode.
[第2の実施形態]
次に、MPEG−4AVC/H.264符号化に適用した第2の実施形態を説明する。
装置全体の構成は、図3と同様であるものとし、以下では、フレーム内予測部101について説明することとする。
[Second Embodiment]
Next, MPEG-4 AVC / H. A second embodiment applied to H.264 encoding will be described.
The overall configuration of the apparatus is the same as that in FIG. 3, and the
図2は、本第2の実施形態を適用した画像符号化装置のフレーム内予測部101のブロック構成図である。
FIG. 2 is a block configuration diagram of the
本装置は、参照画像データ記憶部2001、4×4ブロック記憶部2002をはじめ以下に示す構成を備える。
The apparatus includes a reference image
モード0/1予測値算出部2003は予測モード0または1における予測値を算出する。モード0/1予測誤差算出部2004は予測モード0または1における予測誤差を算出する。モード01/2SAD算出部2005は予測モード0または1におけるSAD(Sum of Absolute Difference)を算出する。
The
モード3/4予測値算出部2006は、予測モード3または4における予測値を算出する。モード3/4予測誤差算出部2007は予測モード3または4における予測誤差を算出する。SAD算出部2008は予測モード3または4におけるSAD(Sum of Absolute Difference)を算出する。
The
モード7/8予測値算出部2009は、予測モード7または8における予測値を算出する。モード7/8予測誤差算出部2010は予測モード7または8における予測誤差を算出する。モード7/8SAD算出部2011は、予測モード7または8におけるSADを算出する。
The
モード5予測値算出部2012は予測モード5における予測値を算出する。モード5予測誤差算出部2013は予測モード5における予測誤差を算出する。モード5SAD算出部2014は予測モード5におけるSADを算出する。
The
モード6予測値算出部2015は、予測モード6における予測値を算出する。モード6予測誤差算出部2016は予測モード6における予測誤差を算出する。モード6SAD算出部2017は、予測モード6におけるSADを算出する。
The
モード2予測値算出部は、予測モード2における予測値を算出する。モード2予測誤差算出部2019は予測モード2における予測誤差を算出する。モード2SAD算出部2020は予測モード2におけるSADを算出する。
The
SAD記憶部2021が、各SAD算出部で算出されたSADを一時的に記憶する。まら、イントラ予測制御部2022はSAD記憶部2021に格納された各SADの中から最小のSADを検索して、予測モードを決定する。選択部2023は、各予測誤差算出部で算出した予測誤差を記憶するため、内部にバッファメモリを有する。そして、選択部2023は、イントラ予測制御部2022が決定した予測モードに対応する予測誤差をバッファメモリから読出し、出力する。このとき、決定した予測モードを特定する情報も併せて出力する。1ブロック分の予測誤差の出力を終えると、選択部2023は内部のバッファを消去、もしくは、上書き可能にする。
The
図5は、イントラ予測制御部2022によるフレーム内予測部101全体の動作制御シーケンスを表すフローチャートである。図7は、図2に示した参照画像データ記憶部2001〜予測誤差選択部2023で構成される図3のフレーム内予測部101による、イントラ予測→整数変換→量子化→逆量子化→逆整数変換までの一連の動作において、各処理が要する処理サイクル数を時系列に表したタイミングチャートである。
FIG. 5 is a flowchart showing an operation control sequence of the entire
以後、上記画像符号化装置の実施形態における動作形態について、その符号化処理に係わる一連の動作、特にフレーム内予測部101による予測モードを決定し予測誤差を出力するまでの予測符号化処理手順を図2、図3、図5、図7を用いて説明する。
Hereinafter, with regard to the operation mode in the embodiment of the image encoding device, a series of operations related to the encoding process, particularly a prediction encoding process procedure until a prediction mode is determined by the
図2に示した参照画像データ記憶部2001乃至選択部2023で構成される図3のフレーム内予測部101では、図7に示したようにイントラ予測→整数変換→量子化→逆量子化→逆整数変換までの一連の動作を合計9処理サイクルで処理するが、図6とは異なり、処理サイクル6が完了した時点で次の4×4ブロックのフレーム内予測符号化処理を開始することが可能である。処理サイクル7では、4×4輝度ブロック#1の逆整数変換処理と、4×4輝度ブロック#2の予測モード0/3/7に対するフレーム内予測処理とが同時に実行されていることに注意されたい。さらにこれは、予測モード0/3/7は4×4輝度ブロック#1に対する再構成画像を参照サンプルとして使用しないことから可能となっている注意されたい。
In the
処理サイクル「−1」(図7参照)においては、イントラ予測制御部2022は、モード0/1予測値算出部2003に対して予測モード0を、モード3/4予測値算出部2006に対して予測モード3を、モード7/8予測値算出部2009に対しては予測モード7を優先的に設定する(ステップS201)。またイントラ予測制御部2022は、予測モード0/3/7が選択されたことをSAD記憶部2021にも通知する。モード0/1予測値算出部2003は参照画像データ記憶部2001から入力する参照サンプルを用いて予測モード0により予測値を算出する。モード0/1予測誤差算出部2004はその予測値を4×4ブロック記憶部2002から入力するブロック画像データを用いて予測誤差を算出する。さらに、モード0/1SAD算出部2005はその予測誤差を用いてSADを算出し、SAD記憶部2021、選択部2023に出力する。以下、同様に予測モード3、7により算出されたSADがSAD記憶部2021に記憶される。
In the processing cycle “−1” (see FIG. 7), the intra
処理サイクル0(図7参照)においては、イントラ予測制御部2022は、モード0/1予測値算出部2003に対して予測モード1を、モード3/4予測値算出部2006に対して予測モード4を、モード7/8予測値算出部2009に対しては予測モード8を選択する(S202)。またイントラ予測制御部2022は、予測モード1/4/8が選択されたことをSAD記憶部2021にも通知する。モード0/1予測値算出部2003は参照画像データ記憶部2001から入力する参照サンプルを用いて予測モード1により予測値を算出し、モード0/1予測誤差算出部2004はその予測値を4×4ブロック記憶部2002から入力するブロック画像データを用いて予測誤差を算出する。さらに、モード0/1SAD算出部2005はその予測誤差を用いてSADを算出し、SAD記憶部2021に出力する。以下、同様に予測モード4、8、および5、6、2により算出されたSADがSAD記憶部2021に記憶される。
In the processing cycle 0 (see FIG. 7), the intra
処理サイクル1(図7参照)においては、イントラ予測制御部2022は、処理サイクル−1、0によってSAD記憶部2021に記憶されたすべての予測モード0〜8によって算出されたSADに応じて、最小SAD値を検索し、その参照SAD値を算出した予測モードを最終的な予測モードとして決定する(ステップS203)。次に、イントラ予測制御部2022は、選択した予測モードを選択部2023に通知する(ステップS204)。この結果、選択部2023は、内部のバッファメモリに格納された中で、該当する予測モードの予測誤差、及び、その予測モードを特定する情報を出力する(ステップS205)。
In the processing cycle 1 (see FIG. 7), the intra
上記説明したように、本第2の実施形態においては、第1の実施形態よりも高速なスループットを達成する構成となっている。 As described above, the second embodiment is configured to achieve a higher throughput than the first embodiment.
なお、本第2の実施形態においては、フレーム内予測部101として4×4輝度ブロックに対するフレーム内予測符号化処理を説明したが、16×16輝度ブロックおよび8×8色差ブロックに対するフレーム内予測符号化処理においても同様に適用可能である。
In the second embodiment, the intra-frame prediction encoding process for the 4 × 4 luminance block is described as the
[他の実施形態]
上記第1,第2の実施形態では、ハードウェアによって実現する例を説明したが、コンピュータが実行するコンピュータプログラムによって実現しても構わない。この場合、コンピュータプログラムは、同じプロシージャ(又は関数)を、複数のモードで共有できるので、コンピュータプログラムのサイズは小さなものとすることができる。
[Other Embodiments]
In the first and second embodiments, the example realized by hardware has been described, but may be realized by a computer program executed by a computer. In this case, since the computer program can share the same procedure (or function) in a plurality of modes, the size of the computer program can be small.
また、通常、コンピュータプログラムは、CD−ROM等のコンピュータ可読記憶媒体に格納されており、それをコンピュータが有する読取り部(CD−ROMドライブ等)にセットし、システムにコピーもしくはインストールすることで実行可能になる。従って、かかるコンピュータ可読記憶媒体も本発明の範疇に入ることも明らかである。 In addition, the computer program is usually stored in a computer-readable storage medium such as a CD-ROM, and is set in a reading unit (CD-ROM drive or the like) of the computer and copied or installed in the system. It becomes possible. Therefore, it is obvious that such a computer readable storage medium falls within the scope of the present invention.
Claims (4)
前記複数の予測モードの中で、予測値算出のための演算内容が共通で、予測値算出のために参照する画素位置が異なる2以上の予測モードについて、当該2以上の予測モードのいずれか一方の予測モードで予測値を算出する複数の予測値算出手段と、
該複数の予測値算出手段で算出した予測値に基づき、着目画素ブロック内の各画素の予測誤差を算出する複数の予測誤差算出手段と、
該複数の予測誤差算出手段で算出した着目画素ブロック内の各画素の予測誤差の絶対値の合計を算出する複数の合算手段と、
前記複数の予測値算出手段それぞれに対し、それぞれが実行可能な予測モードを順次設定して、それぞれにて予測値の算出を実行させ、前記予測誤差算出手段、及び、前記合算手段による合算を行なわせる予測モード設定手段と、
前記合算手段による、処理すべき全予測モードの前記絶対値の合計の演算が終了したとき、最小の合算結果を算出した予測モードを、前記着目画素ブロックの予測モードとして決定する決定手段と
を備えることを特徴とする画像符号化装置。 An image in which a prediction error is calculated using one of a plurality of prediction modes for each pixel block composed of a plurality of pixels from one frame of input image data, and the calculated prediction error is encoded by an encoding unit. An encoding device comprising:
Among two or more prediction modes, one of the two or more prediction modes is used for two or more prediction modes having the same calculation content for calculating a prediction value and different pixel positions referred to for calculation of the prediction value. A plurality of prediction value calculation means for calculating a prediction value in the prediction mode,
A plurality of prediction error calculation means for calculating a prediction error of each pixel in the pixel block of interest based on the prediction values calculated by the plurality of prediction value calculation means;
A plurality of summing means for calculating the sum of absolute values of prediction errors of the respective pixels in the target pixel block calculated by the plurality of prediction error calculating means;
For each of the plurality of predicted value calculation means, a prediction mode that can be executed is sequentially set, and a predicted value is calculated for each of them, and the prediction error calculation means and the summation means perform summation. Prediction mode setting means for
Determining means for determining, as the prediction mode of the pixel block of interest, a prediction mode in which the minimum sum is calculated when the summation of the absolute values of all prediction modes to be processed by the summing means is completed. An image encoding apparatus characterized by that.
前記決定手段で決定した予測モードに対応する予測誤差を前記記憶手段に記憶された中から選択し、前記符号化手段へ出力する選択手段と
を備えることを特徴とする請求項1に記載の画像符号化装置。 Storage means for storing prediction errors calculated by the plurality of prediction error calculation means;
The image according to claim 1, further comprising: a selecting unit that selects a prediction error corresponding to the prediction mode determined by the determining unit from among those stored in the storage unit, and outputs the selected error to the encoding unit. Encoding device.
前記着目画素ブロックの直前の画素ブロック内の画素を参照して予測値を得る予測モードと、前記直前の画素ブロックよりも前に符号化したブロック内の画素を参照して予測値を得る予測モードとに分けた場合、前記予測モード設定手段は、前記直前の画素ブロックよりも前に符号化したブロック内の画素を参照して予測値を得る予測モードを優先して設定することを特徴とする請求項1又は2に記載の画像符号化装置。 Furthermore, in order to obtain a pixel value of a pixel to be referred to in each prediction mode, a decoding unit that decodes the encoded data obtained by the encoding unit is provided.
A prediction mode for obtaining a prediction value by referring to a pixel in a pixel block immediately before the pixel block of interest and a prediction mode for obtaining a prediction value by referring to a pixel in a block encoded before the previous pixel block The prediction mode setting means preferentially sets a prediction mode for obtaining a prediction value by referring to a pixel in a block encoded before the previous pixel block. The image coding apparatus according to claim 1 or 2.
該複数の予測値算出手段で算出した予測値に基づき、複数の画素で構成される画素ブロック内の各画素の予測誤差を算出する複数の予測誤差算出手段と、
該複数の予測誤差算出手段で算出した前記画素ブロック内の各画素の予測誤差の絶対値の合計を算出する複数の合算手段とを有し、
入力した1フレームの画像データから、前記画素ブロック単位に、複数の予測モードのいずれかを用いて予測誤差を算出し、算出した予測誤差を符号化手段で符号化する画像符号化装置の制御方法であって、
前記複数の予測値算出手段それぞれに対し、それぞれが実行可能な予測モードを順次設定して、それぞれにて予測値の算出を実行させ、前記予測誤差算出手段、及び、前記合算手段による合算を行なわせる予測モード設定工程と、
前記合算手段による、処理すべき全予測モードの前記絶対値の合計の演算が終了したとき、最小の合算結果を算出した予測モードを、前記着目画素ブロックの予測モードとして決定する決定工程と
を備えることを特徴とする画像符号化装置の制御方法。 Among two or more prediction modes, calculation contents for calculating a prediction value are common, and two or more prediction modes having different pixel positions to be referred to for prediction value calculation are either one of the two or more prediction modes. A plurality of prediction value calculation means for calculating a prediction value in the prediction mode;
A plurality of prediction error calculation means for calculating a prediction error of each pixel in a pixel block composed of a plurality of pixels based on the prediction values calculated by the plurality of prediction value calculation means;
A plurality of summing means for calculating the sum of absolute values of prediction errors of the respective pixels in the pixel block calculated by the plurality of prediction error calculating means;
A method for controlling an image coding apparatus, wherein a prediction error is calculated from one frame of input image data using any one of a plurality of prediction modes for each pixel block, and the calculated prediction error is encoded by an encoding unit. Because
For each of the plurality of predicted value calculation means, a prediction mode that can be executed is sequentially set, and a predicted value is calculated for each of them, and the prediction error calculation means and the summation means perform summation. Prediction mode setting process
A determination step of determining, as the prediction mode of the pixel block of interest, a prediction mode in which a minimum summation result is calculated when the calculation of the sum of the absolute values of all prediction modes to be processed by the summing unit is completed. A control method for an image encoding device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008104945A JP2009260494A (en) | 2008-04-14 | 2008-04-14 | Image coding apparatus and its control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008104945A JP2009260494A (en) | 2008-04-14 | 2008-04-14 | Image coding apparatus and its control method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009260494A true JP2009260494A (en) | 2009-11-05 |
Family
ID=41387382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008104945A Withdrawn JP2009260494A (en) | 2008-04-14 | 2008-04-14 | Image coding apparatus and its control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009260494A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101491864B1 (en) * | 2009-11-30 | 2015-02-11 | 한국전자통신연구원 | hybrid predicting apparatus for entropy encoding, and method therefor |
WO2015045272A1 (en) * | 2013-09-30 | 2015-04-02 | 日本電気株式会社 | Intra prediction circuit |
WO2015045271A1 (en) * | 2013-09-30 | 2015-04-02 | 日本電気株式会社 | Intra prediction circuit and intra prediction method |
JP2016171561A (en) * | 2015-03-09 | 2016-09-23 | パナソニックIpマネジメント株式会社 | In-screen prediction device, in-screen prediction method and in-screen prediction circuit |
-
2008
- 2008-04-14 JP JP2008104945A patent/JP2009260494A/en not_active Withdrawn
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101491864B1 (en) * | 2009-11-30 | 2015-02-11 | 한국전자통신연구원 | hybrid predicting apparatus for entropy encoding, and method therefor |
WO2015045272A1 (en) * | 2013-09-30 | 2015-04-02 | 日本電気株式会社 | Intra prediction circuit |
WO2015045271A1 (en) * | 2013-09-30 | 2015-04-02 | 日本電気株式会社 | Intra prediction circuit and intra prediction method |
JPWO2015045272A1 (en) * | 2013-09-30 | 2017-03-09 | 日本電気株式会社 | Intra prediction circuit |
JPWO2015045271A1 (en) * | 2013-09-30 | 2017-03-09 | 日本電気株式会社 | Intra prediction circuit and intra prediction method |
JP2016171561A (en) * | 2015-03-09 | 2016-09-23 | パナソニックIpマネジメント株式会社 | In-screen prediction device, in-screen prediction method and in-screen prediction circuit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11070802B2 (en) | Moving image coding device, moving image decoding device, moving image coding/decoding system, moving image coding method and moving image decoding method | |
US9743088B2 (en) | Video encoder and video encoding method | |
KR101775936B1 (en) | Video coding methods and apparatus | |
JP2022521515A (en) | Methods, devices, and programs for cross-component filtering | |
JP2021516016A (en) | Methods and equipment for residual code prediction in the conversion region | |
US8660177B2 (en) | Parallel entropy coding | |
JP2014532384A (en) | Detecting the availability of adjacent video units for video coding | |
JP7448558B2 (en) | Methods and devices for image encoding and decoding | |
CN115668915A (en) | Image encoding method, image decoding method and related devices | |
KR20230145063A (en) | Upsampling of reference pixels for intra-prediction in video coding | |
KR20230145064A (en) | Intra-block copy scratch framebuffer | |
JPWO2008136164A1 (en) | Decoding circuit, decoding method, and image reproducing apparatus | |
JP2009260494A (en) | Image coding apparatus and its control method | |
JP2010081498A (en) | Image compression coding method and apparatus | |
JP7279084B2 (en) | Method and apparatus for intra prediction | |
WO2022022622A1 (en) | Image coding method, image decoding method, and related apparatus | |
US20110051815A1 (en) | Method and apparatus for encoding data and method and apparatus for decoding data | |
KR20140031974A (en) | Image coding method, image decoding method, image coding device, image decoding device, image coding program, and image decoding program | |
KR20220157455A (en) | Methods and devices for image encoding and decoding | |
CN110662074B (en) | Motion vector determination method and device | |
WO2021100450A1 (en) | Intra prediction device, image encoding device, image decoding device, and program | |
JP2013110517A (en) | Motion vector encoding device, motion vector encoding method and program, motion vector decoding device, motion vector decoding method and program | |
JP2006165699A (en) | Image encoder and image encoding method | |
JP2009021786A (en) | Image encoding device and method | |
WO2023154359A1 (en) | Methods and devices for multi-hypothesis-based prediction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20110705 |