JP2009260494A - Image coding apparatus and its control method - Google Patents

Image coding apparatus and its control method Download PDF

Info

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
Application number
JP2008104945A
Other languages
Japanese (ja)
Inventor
Yukiro Chiba
幸郎 千葉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2008104945A priority Critical patent/JP2009260494A/en
Publication of JP2009260494A publication Critical patent/JP2009260494A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To perform prediction coding in a frame by reducing operation resources required for prediction mode selection while achieving high throughput processing performance. <P>SOLUTION: A mode 0/1 prediction value calculation unit 1003 calculates a prediction value of either one of prediction modes 0, 1 of a 4×4 pixel block. A mode 3/4 prediction value calculation unit 1006 calculates a prediction value of either one of prediction modes 3, 4 of the 4×4 pixel block. A mode 5/6 prediction value calculation unit 1009 calculates a prediction value of either one of prediction modes 5, 6 of the 4×4 pixel block. A mode 7/8 prediction value calculation unit 1012 calculates a prediction value of either one of prediction modes 7, 8 of the 4×4 pixel block. At first, a prediction error is calculated based on a prediction mode due to prediction mode 0, 3, 5, 7; and in the next cycle, the prediction error is calculated based on a prediction mode due to the prediction modes 1, 4, 6, 8. Then, an intra prediction control unit 1019 decides the most efficient prediction mode according to prediction errors of the all prediction modes. <P>COPYRIGHT: (C)2010,JPO&INPIT

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, mode 0 in FIG. 11 is predicted in the vertical direction, and mode 1 in FIG. 12 is predicted in the horizontal direction. Although not shown in the figure, mode 2 uses an average value of 13 reference samples as a predicted value. Mode 3 in FIG. 13 is prediction in the left diagonal downward direction, and mode 4 in FIG. 14 is prediction in the right diagonal downward direction. Mode 5 in FIG. 15 is prediction to the right vertical diagonally downward direction, and mode 6 in FIG. 16 is prediction to the right horizontal diagonally downward direction. Mode 7 in FIG. 17 is prediction in the left vertical diagonal downward direction, and mode 8 in FIG. 18 is prediction in the right horizontal diagonal upward direction.

また、色差信号に対するフレーム内予測は8×8色差ブロックに対する4つの予測モードが用意されている。輝度信号、色差信号のいずれにおいても、どの予測モードを使用してフレーム内予測符号化を行うかはユーザーの判断に委ねられており、高い符号化効率を達成するために最適な予測モードを選択することが重要となっている。
ISO/IEC 14496−10;“Information technology−−Coding of audio−visual objects−−Part 10:Advanced video coding”;ISO/IEC;2003−12−01
Also, four prediction modes for 8 × 8 color difference blocks are prepared for intra-frame prediction for color difference signals. It is up to the user to decide which prediction mode to use for intra-frame prediction coding for either luminance signals or chrominance signals, and select the optimal prediction mode to achieve high coding efficiency. It is important to do.
ISO / IEC 14496-10; "Information technology--Coding of audio-visual objects--Part 10: Advanced video coding"; ISO / IEC; 2003-12-01

しかしながら、輝度信号に対する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 intra-frame prediction unit 101, a prediction scheme selection unit 102, an orthogonal transformation unit 103, a quantization unit 104, and an entropy encoding unit 105. In addition, this apparatus includes an entropy decoding unit 106, an inverse quantization unit 107, an inverse orthogonal transform unit 108, a loop filter 109, a motion compensation unit 110, and an inter-frame decoding unit that decodes encoded data generated by the entropy encoding unit 105. A motion prediction unit 111 and a reference frame storage unit 112 are included. The input source of the moving image data may be a video camera or a storage medium storing moving image data.

図1は、フレーム内予測部101のブロック構成図である。フレーム内予測部101は、1フレーム内の着目画素ブロックを符号化する際に、その着目画素ブロックに隣接し、符号化処理済みのブロック内の参照画像を格納する参照画像データ記憶部1001を有する。また、本装置は、着目ブロック内の画素データ(輝度データ)を格納する4×4ブロック記憶部1002を有する。他の構成は以下の説明する通りである。   FIG. 1 is a block configuration diagram of the intra-frame prediction unit 101. The intra-frame prediction unit 101 includes a reference image data storage unit 1001 that stores a reference image in a block that has been encoded and adjacent to the target pixel block when encoding the target pixel block in one frame. . In addition, the apparatus includes a 4 × 4 block storage unit 1002 that stores pixel data (luminance data) in the block of interest. Other configurations are as described below.

モード0/1予測値演算部1003は、予測モード0または1における着目ブロック内の各画素の予測値を算出する。モード0/1予測誤差算出部1004は、予測モード0または1における着目ブロック内の各画素の予測誤差を算出する。モード0/1SAD算出部1005は、予測モード0または1における着目ブロック内の予測誤差のSAD(Sum of Absolute Difference)を算出する。   The mode 0/1 predicted value calculation unit 1003 calculates a predicted value of each pixel in the block of interest in the prediction mode 0 or 1. The mode 0/1 prediction error calculation unit 1004 calculates the prediction error of each pixel in the block of interest in the prediction mode 0 or 1. The mode 0/1 SAD calculation unit 1005 calculates a SAD (Sum of Absolute Difference) of the prediction error in the block of interest in the prediction mode 0 or 1.

モード3/4予測値算出部1006は予測モード3または4における予測値を算出する。モード3/4予測誤差算出部1007は、予測モード3または4における予測誤差を算出する。モード3/4SAD算出部1008は、予測モード3または4における着目ブロック内の予測誤差のSADを算出する。   A mode 3/4 predicted value calculation unit 1006 calculates a predicted value in the prediction mode 3 or 4. The mode 3/4 prediction error calculation unit 1007 calculates the prediction error in the prediction mode 3 or 4. The mode 3/4 SAD calculation unit 1008 calculates the SAD of the prediction error in the block of interest in the prediction mode 3 or 4.

モード5/6予測値算出部1009は予測モード5または6における予測値を算出する。モード5/6予測誤差算出部1010は、予測モード5または6における予測誤差を算出する。モード5/6SAD算出部1011は、予測モード5または6におけるSADを算出する。   A mode 5/6 predicted value calculation unit 1009 calculates a predicted value in the prediction mode 5 or 6. The mode 5/6 prediction error calculation unit 1010 calculates the prediction error in the prediction mode 5 or 6. The mode 5/6 SAD calculation unit 1011 calculates the SAD in the prediction mode 5 or 6.

モード7/8予測値算出部1012は予測モード7または8における予測値を算出する。モード7/8予測誤差算出部1013は予測モード7または8における予測誤差を算出する。モード7/8SAD算出部1014は予測モード7または8におけるSADを算出する。   The mode 7/8 predicted value calculation unit 1012 calculates the predicted value in the prediction mode 7 or 8. A mode 7/8 prediction error calculation unit 1013 calculates a prediction error in prediction mode 7 or 8. The mode 7/8 SAD calculation unit 1014 calculates the SAD in the prediction mode 7 or 8.

モード2予測値算出部1015は予測モード2における予測値を算出する。モード2予測誤差算出部1016は予測モード2における予測誤差を算出する。モード2SAD算出部1017は予測モード2におけるSADを算出する。   The mode 2 predicted value calculation unit 1015 calculates a predicted value in the prediction mode 2. The mode 2 prediction error calculation unit 1016 calculates a prediction error in the prediction mode 2. The mode 2 SAD calculation unit 1017 calculates the SAD in the prediction mode 2.

SAD記憶部1018は、各SAD算出部で算出したSADを一時的に記憶する。イントラ予測制御部1019は、SAD記憶部1018に記憶された各SADの中から最小となるSADを検索し、その最小SADを算出した予測モードを決定する。   The SAD storage unit 1018 temporarily stores the SAD calculated by each SAD calculation unit. The intra prediction control unit 1019 searches for the smallest SAD from each SAD stored in the SAD storage unit 1018 and determines the prediction mode in which the minimum SAD is calculated.

通常、予測誤差が小さい値であるほど、符号長の短い符号語を割り当てることで、符号化効率を高めている。換言すれば、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 prediction control unit 1019 searches for the smallest SAD, determines which of the prediction modes having the minimum value is 0 to 8, and sets the determination result as the final prediction mode.

選択部1020は、内部に、各予測誤差算出部からの予測誤差を格納するバッファを有し、イントラ予測制御部1019が決定した予測モードに応じた予測誤差を選択し、予測方式選択部1020に出力する。このとき、選択部1020は、選択した予測モードを特定する情報も、予測方式選択部102に出力する。   The selection unit 1020 has an internal buffer for storing the prediction error from each prediction error calculation unit, selects a prediction error corresponding to the prediction mode determined by the intra prediction control unit 1019, and sends it to the prediction method selection unit 1020. Output. At this time, the selection unit 1020 also outputs information specifying the selected prediction mode to the prediction method selection unit 102.

上記の様に、予測モード0と1、モード3と4、モード5と6、モード7と8を共通の構成にて行なうのは、予測値算出のために参照する画素位置が異なるものの、それらの予測値算出のための演算内容が共通であるのが理由である。なお、ここでは、MPEG−4AVC/H.264を例にしているので、1つの構成で実現可能な予測モードは最大で2つとなるが、演算内容が共通な予測モードが2以上ある符号化方式の場合には、当然、1つの構成で2以上の予測モードに対応することも可能である。   As described above, prediction modes 0 and 1, modes 3 and 4, modes 5 and 6, and modes 7 and 8 are performed in a common configuration, although pixel positions to be referred to for prediction value calculation are different. This is because the calculation contents for calculating the predicted value are the same. Here, MPEG-4AVC / H. Since H.264 is taken as an example, the maximum number of prediction modes that can be realized with one configuration is two. However, in the case of an encoding method having two or more prediction modes with common operation contents, naturally one configuration is used. It is possible to support two or more prediction modes.

図4は、イントラ予測部1019によるフレーム内予測部101全体の動作制御シーケンスを表すフローチャートである。また、図6は、図1に示した参照画像データ記憶部1001、乃至、予測誤差選択部1020で構成される図3のフレーム内予測部101による、イントラ予測→整数変換→量子化→逆量子化→逆整数変換までの一連の動作において、各処理が要する処理サイクル数を時系列に表したタイミングチャートである。   FIG. 4 is a flowchart showing an operation control sequence of the entire intra-frame prediction unit 101 by the intra prediction unit 1019. FIG. 6 illustrates intra prediction → integer conversion → quantization → inverse quantum by the intra-frame prediction unit 101 of FIG. 3 including the reference image data storage unit 1001 illustrated in FIG. 1 or the prediction error selection unit 1020. 4 is a timing chart showing the number of processing cycles required for each process in a series of operations from conversion to inverse integer conversion in time series.

以後、上記画像符号化装置の実施形態における動作形態について、その符号化処理に係わる一連の動作、特にフレーム内予測部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 intra-frame prediction unit 101 and a prediction error is output. This will be described with reference to FIGS. 1, 3, 4, and 6.

図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 intra-frame prediction unit 101 of FIG. 3 configured by the reference image data storage unit 1001 to the difference selection unit 1020 shown in FIG. 1, as shown in FIG. 6, intra prediction → integer conversion → quantization → inverse quantization → In processing cycle 0 (see FIG. 6), a series of operations up to inverse integer conversion is processed in a total of 9 processing cycles. Intra prediction control unit 1019 sets prediction mode 0 to the mode 0/1 predicted value calculation unit, Prediction mode 3 for mode 3/4 prediction value calculation unit 1006, prediction mode 5 for mode 5/6 prediction value calculation unit 1009, and prediction mode 7 for mode 7/8 prediction value calculation unit 1012 Is set (step S101). That is, the intra prediction control unit 1019 functions as a prediction mode setting unit for each prediction value calculation unit.

またイントラ予測制御部1019は、予測モード0/3/5/7が選択されたことをSAD記憶部1018にも通知する。SAD記憶部1018は、この通知を受けて、各予測モード毎に予め定義されたアドレス位置に、合算結果であるSADを格納する。   The intra prediction control unit 1019 also notifies the SAD storage unit 1018 that the prediction mode 0/3/5/7 has been selected. Upon receiving this notification, the SAD storage unit 1018 stores the SAD that is the summation result at the address position defined in advance for each prediction mode.

モード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 mode 0/1 predicted value calculation unit 1003 calculates a predicted value in the prediction mode 0 using the reference sample input from the reference image data storage unit 1001. The mode 0/1 prediction error calculation unit 1004 calculates the prediction error using the block image data whose prediction value is input from the 4 × 4 block storage unit 1002. The calculated prediction errors (4 × 4) are output to the mode 0/1 SAD calculation unit 1005 and the selection unit 1020. The selection unit 1020 temporarily stores this prediction error in an internal buffer. The mode 0/1 SAD calculation unit 1005 calculates the SAD using the input prediction error and outputs it to the SAD storage unit 1018. Similarly, SADs calculated in the prediction modes 3, 5, and 7 are stored in the SAD storage unit 1018, and prediction errors in the prediction modes 3, 5, and 7 are stored in the internal buffer of the selection unit 1020.

また、予測モード2予測値算出部1015、予測モード2予測誤差算出部1016、予測モード2SAD算出部1017は、処理サイクル0(以下に説明する処理サイクル1でも構わない)において、その処理を実行するものとする。従って、サイクル0では、予測モード0、2、3、5、7のSADがSAD記憶部1018に格納され、その予測誤差が選択部1020の内部バッファにそれぞれ格納されることになる。   Further, the prediction mode 2 prediction value calculation unit 1015, the prediction mode 2 prediction error calculation unit 1016, and the prediction mode 2 SAD calculation unit 1017 execute the processing in the processing cycle 0 (which may be processing cycle 1 described below). Shall. Accordingly, in cycle 0, the SADs of the prediction modes 0, 2, 3, 5, and 7 are stored in the SAD storage unit 1018, and the prediction errors are stored in the internal buffer of the selection unit 1020, respectively.

処理サイクル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 prediction control unit 1019 sets the prediction mode 1 for the mode 0/1 predicted value calculation unit 1003. Also, the prediction mode 4 for the mode 3/4 prediction value calculation unit 1006, the prediction mode 6 for the mode 5/6 prediction value calculation unit 1009, and the mode 7/8 prediction value calculation unit 1012. Sets the prediction mode 8 (step S102).

またイントラ予測制御部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 prediction control unit 1019 also notifies the SAD storage unit 1018 that the prediction mode 1/4/6/8 has been selected. A mode 0/1 prediction value calculation unit 1003 calculates a prediction value in prediction mode 1 using a reference sample input from the reference image data storage unit 1001, and a mode 0/1 prediction error calculation unit 1004 converts the prediction value to 4 ×. A prediction error is calculated using block image data input from the 4-block storage unit 1002. The calculated prediction error is output to the selection unit 1020 and the mode 0/1 SAD calculation unit 1004. The mode 0/1 SAD calculation unit 1005 calculates the SAD using the input prediction error and outputs it to the SAD storage unit 1018. Similarly, SADs calculated in the prediction modes 4, 6, 8, and 2 are stored in the SAD storage unit 1018, and the prediction error of each prediction mode is stored in the internal buffer of the selection unit 1020.

以上のようにして、全予測モードの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 prediction control unit 1019 responds to the SAD calculated by all the prediction modes 0 to 8 stored in the SAD storage unit 1018 by the processing cycles 0 and 1. The prediction mode with the smallest SAD value is determined as the final prediction mode (step S103). Next, the intra prediction control unit 1019 notifies the selected prediction mode to the selection unit 1020 (step S104). As a result, the selection unit 1020 outputs a prediction error corresponding to the determined prediction mode among prediction errors of each prediction mode stored in the internal buffer, and also outputs information indicating the prediction mode (step S105). . When this output process is completed, the selection unit 1020 sets the prediction error of each prediction mode stored in the internal buffer so that it can be discarded or overwritten.

次に、図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 mode 0/1 predicted value calculation unit 1003, the mode 0/1 prediction error calculation unit 1004, and the mode 0/1 SAD calculation unit 1005 illustrated in FIG. 1 will be described with reference to FIG.

In the figure, 3001 is a reference sample (0, -1) stored in the reference image data storage unit 1001, and 3002 is a reference sample (-1, 0) (see FIG. 10). 3003 is an image sample (0,0) stored in the 4 × 4 block storage unit 1002, 3004 is an image sample (0,1), 3005 is an image sample (1,0), and 3006 is an image sample (0,2). , 3007 are image samples (2, 0), 3008 are image samples (0, 3), and 3009 are image samples (3, 0).

なお、これらサンプルの座標は、着目画素ブロック内の基準位置に対する相対的なものであることに注意されたい。例えば、予測モード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 prediction mode 0, the reference position in the pixel block of interest is (i, 0) (i = 0, 1, 2, 3). Accordingly, for example, the pixel data (luminance data) indicated by the sample (0, −1) is the pixel value at the coordinates (0 + i, −1 + 0), that is, the coordinates (i, −1). Similarly, the sample (0, 3) has a pixel value of coordinates (i, 3).

モード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 mode 0, i = 0, 1, 2, 3 changes in four stages, so when i = 0, four prediction errors are calculated by the dividers 3010 to 3013, and their absolute values are calculated by ABS calculation. Calculation is performed by the units 3014 to 3017. Further, the absolute values are added by adders 3018 to 3020. The adder 3021 adds the values held in the register 3022 and stores the addition result in the register 3022 again. This register 3022 is initialized to “0” when calculating the SAD of one block.

上記の処理を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 adder 3021 calculates the SAD of the block of interest. Therefore, when i = 3, the addition result of the adder 3021 is stored in the SAD storage unit 1018 as the mode 0 SAD of the block of interest.

一方、モード1の場合、着目ブロックの基準位置は(0,i)(i=0、1、2、3)となる。ここで、変動する座標がY軸(垂直軸)上であることに注意されたい。かかる点を除いて、各処理部の処理はモード0と同じである。   On the other hand, in mode 1, the reference position of the block of interest is (0, i) (i = 0, 1, 2, 3). Note that the changing coordinates are on the Y-axis (vertical axis). Except for this point, the processing of each processing unit is the same as mode 0.

上記の通り、予測モード0/1においては、予測値を得るのに演算を行う必要はなく、所望の参照サンプルがそのまま使用される。除算器3010〜3013が、モード0/1予測誤差算出部1004に対応し、絶対値化するABS演算器3014〜1017、および加算器3018〜3019がモード0/1SAD算出部1005に対応する。予測値を選択する回路と、予測誤差を算出する回路、SADを算出する回路が予測モード0と1において共用されていることに注意されたい。   As described above, in prediction mode 0/1, it is not necessary to perform an operation to obtain a predicted value, and a desired reference sample is used as it is. The dividers 3010 to 3013 correspond to the mode 0/1 prediction error calculation unit 1004, and the ABS calculators 3014 to 1017 and the adders 3018 to 3019 that convert to absolute values correspond to the mode 0/1 SAD calculation unit 1005. Note that the prediction mode selection circuit, the prediction error calculation circuit, and the SAD calculation circuit are shared in prediction modes 0 and 1.

図9は、図1に示したモード3/4予測値算出部1006、モード3/4予測誤差算出部1007、モード3/4SAD算出部1008の詳細を示すブロック図である。   FIG. 9 is a block diagram showing details of the mode 3/4 predicted value calculation unit 1006, the mode 3/4 prediction error calculation unit 1007, and the mode 3/4 SAD calculation unit 1008 shown in FIG.

図中、4001〜4006は参照画像データ記憶部1001に記憶された参照サンプルである(図10参照)。4007は定数2である。4008〜4015は4×4ブロック記憶部1002に記憶された画像サンプルである(図10参照)。   In the figure, reference numerals 4001 to 4006 denote reference samples stored in the reference image data storage unit 1001 (see FIG. 10). 4007 is a constant 2. Reference numerals 4008 to 4015 denote image samples stored in the 4 × 4 block storage unit 1002 (see FIG. 10).

予測モード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 prediction mode 3/4 correspond to the mode 3/4 prediction value calculation unit 1006. The dividers 4021 to 4024 correspond to the mode 3/4 prediction error calculation unit 1007. Also, the ABS calculators 4025 to 4028, the adders 4029 to 4032, and the register 4033 that convert to absolute values correspond to the mode 3/4 SAD calculation unit 1007. The shifter 4017 is a circuit that shifts the input value by one bit in the upper direction, that is, doubles the input value. Similarly, the shifter 4020 is a circuit that shifts the input value by 2 bits in the lower direction, that is, makes the input value ¼.

この構成における動作も、先に説明した予測モード0/1と同様であり、予測値を選択する回路と、予測誤差を算出する回路、SADを算出する回路が予測モード3と4において共用されていることに注意されたい。なお、定数“2”を加算器4018で加算するのは、シフタ4020にて1/4にした際に、小数点以下を切り上げるためのものである。   The operation in this configuration is the same as in the prediction mode 0/1 described above, and the prediction mode selection circuit, the prediction error calculation circuit, and the SAD calculation circuit are shared in the prediction modes 3 and 4. Note that The addition of the constant “2” by the adder 4018 is for rounding up the fractional part when the shifter 4020 makes the quarter.

上記説明から、他の予測モード5乃至8についても同様に構成できることは明らかであろう。   From the above description, it will be apparent that the other prediction modes 5 to 8 can be similarly configured.

なお、上記実施形態では、フレーム内予測部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 intra-frame prediction unit 101. However, the intra-frame prediction encoding process for the 16 × 16 luminance block and the 8 × 8 color difference block is also described. The same applies.

以上説明したように、本実施形態によれば、各予測値演算部に、予測モードを順次設定して、全予測モードの予測誤差の算出させる。この結果、各モード毎に独立した回路構成にした場合と比べて、実質的に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 intra-frame prediction unit 101 will be described below.

図2は、本第2の実施形態を適用した画像符号化装置のフレーム内予測部101のブロック構成図である。   FIG. 2 is a block configuration diagram of the intra-frame prediction unit 101 of the image coding apparatus to which the second embodiment is applied.

本装置は、参照画像データ記憶部2001、4×4ブロック記憶部2002をはじめ以下に示す構成を備える。   The apparatus includes a reference image data storage unit 2001, a 4 × 4 block storage unit 2002, and the following configuration.

モード0/1予測値算出部2003は予測モード0または1における予測値を算出する。モード0/1予測誤差算出部2004は予測モード0または1における予測誤差を算出する。モード01/2SAD算出部2005は予測モード0または1におけるSAD(Sum of Absolute Difference)を算出する。   The mode 0/1 predicted value calculation unit 2003 calculates a predicted value in the prediction mode 0 or 1. A mode 0/1 prediction error calculation unit 2004 calculates a prediction error in the prediction mode 0 or 1. A mode 01/2 SAD calculation unit 2005 calculates a SAD (Sum of Absolute Difference) in the prediction mode 0 or 1.

モード3/4予測値算出部2006は、予測モード3または4における予測値を算出する。モード3/4予測誤差算出部2007は予測モード3または4における予測誤差を算出する。SAD算出部2008は予測モード3または4におけるSAD(Sum of Absolute Difference)を算出する。   The mode 3/4 predicted value calculation unit 2006 calculates the predicted value in the prediction mode 3 or 4. A mode 3/4 prediction error calculation unit 2007 calculates a prediction error in the prediction mode 3 or 4. The SAD calculation unit 2008 calculates a SAD (Sum of Absolute Difference) in the prediction mode 3 or 4.

モード7/8予測値算出部2009は、予測モード7または8における予測値を算出する。モード7/8予測誤差算出部2010は予測モード7または8における予測誤差を算出する。モード7/8SAD算出部2011は、予測モード7または8におけるSADを算出する。   The mode 7/8 predicted value calculation unit 2009 calculates the predicted value in the prediction mode 7 or 8. The mode 7/8 prediction error calculation unit 2010 calculates the prediction error in the prediction mode 7 or 8. The mode 7/8 SAD calculation unit 2011 calculates the SAD in the prediction mode 7 or 8.

モード5予測値算出部2012は予測モード5における予測値を算出する。モード5予測誤差算出部2013は予測モード5における予測誤差を算出する。モード5SAD算出部2014は予測モード5におけるSADを算出する。   The mode 5 predicted value calculation unit 2012 calculates the predicted value in the prediction mode 5. A mode 5 prediction error calculation unit 2013 calculates a prediction error in the prediction mode 5. The mode 5 SAD calculation unit 2014 calculates the SAD in the prediction mode 5.

モード6予測値算出部2015は、予測モード6における予測値を算出する。モード6予測誤差算出部2016は予測モード6における予測誤差を算出する。モード6SAD算出部2017は、予測モード6におけるSADを算出する。   The mode 6 predicted value calculation unit 2015 calculates a predicted value in the prediction mode 6. A mode 6 prediction error calculation unit 2016 calculates a prediction error in the prediction mode 6. The mode 6 SAD calculation unit 2017 calculates the SAD in the prediction mode 6.

モード2予測値算出部は、予測モード2における予測値を算出する。モード2予測誤差算出部2019は予測モード2における予測誤差を算出する。モード2SAD算出部2020は予測モード2におけるSADを算出する。   The mode 2 predicted value calculation unit calculates a predicted value in the prediction mode 2. A mode 2 prediction error calculation unit 2019 calculates a prediction error in the prediction mode 2. The mode 2 SAD calculation unit 2020 calculates the SAD in the prediction mode 2.

SAD記憶部2021が、各SAD算出部で算出されたSADを一時的に記憶する。まら、イントラ予測制御部2022はSAD記憶部2021に格納された各SADの中から最小のSADを検索して、予測モードを決定する。選択部2023は、各予測誤差算出部で算出した予測誤差を記憶するため、内部にバッファメモリを有する。そして、選択部2023は、イントラ予測制御部2022が決定した予測モードに対応する予測誤差をバッファメモリから読出し、出力する。このとき、決定した予測モードを特定する情報も併せて出力する。1ブロック分の予測誤差の出力を終えると、選択部2023は内部のバッファを消去、もしくは、上書き可能にする。   The SAD storage unit 2021 temporarily stores the SAD calculated by each SAD calculation unit. Furthermore, the intra prediction control unit 2022 searches for the smallest SAD from among the SADs stored in the SAD storage unit 2021, and determines the prediction mode. The selection unit 2023 has a buffer memory therein in order to store the prediction error calculated by each prediction error calculation unit. Then, the selection unit 2023 reads the prediction error corresponding to the prediction mode determined by the intra prediction control unit 2022 from the buffer memory and outputs it. At this time, information specifying the determined prediction mode is also output. When the output of the prediction error for one block is completed, the selection unit 2023 enables the internal buffer to be erased or overwritten.

図5は、イントラ予測制御部2022によるフレーム内予測部101全体の動作制御シーケンスを表すフローチャートである。図7は、図2に示した参照画像データ記憶部2001〜予測誤差選択部2023で構成される図3のフレーム内予測部101による、イントラ予測→整数変換→量子化→逆量子化→逆整数変換までの一連の動作において、各処理が要する処理サイクル数を時系列に表したタイミングチャートである。   FIG. 5 is a flowchart showing an operation control sequence of the entire intra-frame prediction unit 101 by the intra prediction control unit 2022. 7 shows intra prediction → integer conversion → quantization → inverse quantization → inverse integer by the intra-frame prediction unit 101 in FIG. 3 including the reference image data storage unit 2001 to the prediction error selection unit 2023 shown in FIG. 5 is a timing chart showing the number of processing cycles required for each process in a series of operations up to conversion in time series.

以後、上記画像符号化装置の実施形態における動作形態について、その符号化処理に係わる一連の動作、特にフレーム内予測部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 intra-frame prediction unit 101 and a prediction error is output. This will be described with reference to FIGS. 2, 3, 5, and 7.

図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 intra-frame prediction unit 101 of FIG. 3 configured by the reference image data storage unit 2001 to the selection unit 2023 shown in FIG. 2, intra prediction → integer conversion → quantization → inverse quantization → inverse as shown in FIG. A series of operations up to integer conversion is processed in a total of 9 processing cycles, but unlike FIG. 6, the next 4 × 4 block intra-frame predictive encoding process can be started when processing cycle 6 is completed. It is. In processing cycle 7, it is noted that the inverse integer conversion process of 4 × 4 luminance block # 1 and the intra-frame prediction process for prediction mode 0/3/7 of 4 × 4 luminance block # 2 are executed simultaneously. I want. Note that this is possible because prediction mode 0/3/7 does not use the reconstructed image for 4 × 4 luminance block # 1 as a reference sample.

処理サイクル「−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 prediction control unit 2022 performs the prediction mode 0 for the mode 0/1 predicted value calculation unit 2003 and the mode 3/4 predicted value calculation unit 2006. The prediction mode 3 is preferentially set for the mode 7/8 predicted value calculation unit 2009 (step S201). The intra prediction control unit 2022 also notifies the SAD storage unit 2021 that the prediction mode 0/3/7 has been selected. The mode 0/1 predicted value calculation unit 2003 calculates a predicted value in the prediction mode 0 using the reference sample input from the reference image data storage unit 2001. A mode 0/1 prediction error calculation unit 2004 calculates a prediction error using block image data whose prediction value is input from the 4 × 4 block storage unit 2002. Further, the mode 0/1 SAD calculation unit 2005 calculates SAD using the prediction error, and outputs the SAD to the SAD storage unit 2021 and the selection unit 2023. Hereinafter, the SAD calculated in the prediction modes 3 and 7 is similarly stored in the SAD storage unit 2021.

処理サイクル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 prediction control unit 2022 uses the prediction mode 1 for the mode 0/1 prediction value calculation unit 2003 and the prediction mode 4 for the mode 3/4 prediction value calculation unit 2006. For the mode 7/8 predicted value calculation unit 2009, the prediction mode 8 is selected (S202). The intra prediction control unit 2022 also notifies the SAD storage unit 2021 that the prediction mode 1/4/8 has been selected. A mode 0/1 prediction value calculation unit 2003 calculates a prediction value in prediction mode 1 using a reference sample input from the reference image data storage unit 2001, and a mode 0/1 prediction error calculation unit 2004 uses the prediction value as 4 ×. A prediction error is calculated using block image data input from the 4-block storage unit 2002. Further, the mode 0/1 SAD calculation unit 2005 calculates SAD using the prediction error, and outputs the SAD to the SAD storage unit 2021. In the same manner, SADs calculated in the prediction modes 4, 8, 5, 6, and 2 are similarly stored in the SAD storage unit 2021.

処理サイクル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 prediction control unit 2022 minimizes the SAD calculated by all the prediction modes 0 to 8 stored in the SAD storage unit 2021 by the processing cycles −1 and 0. The SAD value is searched, and the prediction mode in which the reference SAD value is calculated is determined as the final prediction mode (step S203). Next, the intra prediction control unit 2022 notifies the selection unit 2023 of the selected prediction mode (step S204). As a result, the selection unit 2023 outputs the prediction error of the corresponding prediction mode and information specifying the prediction mode stored in the internal buffer memory (step S205).

上記説明したように、本第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 intra-frame prediction unit 101. However, the intra-frame prediction code for the 16 × 16 luminance block and the 8 × 8 color difference block is described. The present invention can also be applied in the same way.

[他の実施形態]
上記第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.

第1の実施形態におけるフレーム内予測部のブロック構成図である。It is a block block diagram of the intra-frame prediction part in 1st Embodiment. 第2の実施形態におけるフレーム内予測部のブロック構成図である。It is a block block diagram of the intra-frame prediction part in 2nd Embodiment. 実施形態における画像符号化装置のブロック構成図である。It is a block block diagram of the image coding apparatus in embodiment. 第1の実施形態におけるフレーム内予測部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the estimation part in a flame | frame in 1st Embodiment. 第2の実施形態におけるフレーム内予測部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the prediction part in a flame | frame in 2nd Embodiment. 第1の実施形態における符号化処理のシーケンスを示す図である。It is a figure which shows the sequence of the encoding process in 1st Embodiment. 第2の実施形態における符号化処理のシーケンスを示す図である。It is a figure which shows the sequence of the encoding process in 2nd Embodiment. 第1の実施形態におけるモード0/1予測値算出部、モード0/1予測誤差算出部、及び、モード0/1SAD算出部の詳細を示すブロック構成図である。It is a block block diagram which shows the detail of the mode 0/1 prediction value calculation part in 1st Embodiment, the mode 0/1 prediction error calculation part, and the mode 0/1 SAD calculation part. 第1の実施形態におけるモード3/4予測値算出部、モード3/4予測誤差算出部、及び、モード3/4SAD算出部の詳細を示すブロック構成図である。It is a block block diagram which shows the detail of the mode 3/4 prediction value calculation part in 1st Embodiment, the mode 3/4 prediction error calculation part, and the mode 3/4 SAD calculation part. 4×4輝度ブロック内の画素と、予測に使用する参照画像サンプルの相対位置関係を表す図である。It is a figure showing the relative positional relationship of the pixel in a 4x4 brightness | luminance block, and the reference image sample used for prediction. 予測モード0における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 0. FIG. 予測モード1における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 1. FIG. 予測モード3における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 3. FIG. 予測モード4における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 4. FIG. 予測モード5における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 5. FIG. 予測モード6における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 6. FIG. 予測モード7における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 7. FIG. 予測モード8における予測方向を示す図である。It is a figure which shows the prediction direction in the prediction mode 8. FIG.

Claims (4)

入力した1フレームの画像データから、複数の画素で構成される画素ブロック単位に、複数の予測モードのいずれかを用いて予測誤差を算出し、算出した予測誤差を符号化手段で符号化する画像符号化装置であって、
前記複数の予測モードの中で、予測値算出のための演算内容が共通で、予測値算出のために参照する画素位置が異なる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.
複数の予測モードの中で、予測値算出のための演算内容が共通で、予測値算出のために参照する画素位置が異なる2以上の予測モードについて、当該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.
JP2008104945A 2008-04-14 2008-04-14 Image coding apparatus and its control method Withdrawn JP2009260494A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (6)

* Cited by examiner, † Cited by third party
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