JP2007208802A - Image encoding apparatus and image encoding method - Google Patents
Image encoding apparatus and image encoding method Download PDFInfo
- Publication number
- JP2007208802A JP2007208802A JP2006027031A JP2006027031A JP2007208802A JP 2007208802 A JP2007208802 A JP 2007208802A JP 2006027031 A JP2006027031 A JP 2006027031A JP 2006027031 A JP2006027031 A JP 2006027031A JP 2007208802 A JP2007208802 A JP 2007208802A
- Authority
- JP
- Japan
- Prior art keywords
- encoding
- image
- prediction mode
- intra prediction
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、インター予測モード及びイントラ予測モードのうち、符号化効率の良い方の符号化モードを選択して符号化を行う画像符号化装置及び画像符号化方法に関する。 The present invention relates to an image coding apparatus and an image coding method that perform coding by selecting a coding mode with higher coding efficiency from among an inter prediction mode and an intra prediction mode.
最近になり、MPEG−2の符号化を用いるデジタル地上波放送の送信電力もフルパワーとされるなど、本格的なデジタル映像時代が到来してきた。
一方、通信の分野ではさらに符号化効率の良い、H.264と称されるMPEG4−AVCを採用する開発もなされている。H.264符号化方式を実時間で実行可能な経済的なLSIができることは好ましい。
Recently, a full-fledged digital video era has come, such as the transmission power of digital terrestrial broadcasting using MPEG-2 encoding being full power.
On the other hand, in the field of communication, H.P. Development using MPEG4-AVC called H.264 has also been made. H. It is preferable that an economical LSI capable of executing the H.264 encoding method in real time can be obtained.
特許文献1には、実時間符号化を行うため、並列処理のために隣接ブロックの必要なベクトル情報等が得られない場合でも、高速な符号化処理を実現可能な画像情報符号化装置が開示されている。即ち、MPEG4/AVC等の画像符号化方式に基づく画像圧縮情報を出力する画像情報符号化装置で、所定のブロックがスキップモードや、スペーシャルダイレクトモードであるか否かのモード判定を行う際に、所定の隣接ブロックの全てについて動きベクトル情報等が計算されている必要がある。全体の処理を高速化するために各ブロックについて並列処理を行っている場合は、所定の隣接ブロックの動きベクトル情報等が全て得られるとは限らない。この場合に、隣接ブロックの動きベクトル情報等の計算を待つことなくモード判定が行えるよう、隣接ブロックの代わりに、他の近傍ブロックの動きベクトル情報等を擬似的に用いてモード判定を行うようにした画像情報符号化装置が開示されている。
しかしながら、特許文献1に開示されている画像情報符号化装置では、エンコード時に処理量の多い動きベクトル検出、動き補償、可変長符号化及びデブロックフィルタなどの処理を専用のハードウエアを用いて並列処理することにより実時間の符号化を行っている。専用ハードウエアを用いる場合では処理の全てをソフトウエアにより行うのに比し、低価格なエンコーダとして実現することは困難であった。
However, in the image information encoding device disclosed in
そこで、本発明は、上記のような問題点を解消するためになされたもので、インターモード及びイントラモードで予測し、符号化効率の高い方のモードにより予測して行う画像信号の符号化をソフトウエアにより実時間で実行可能とする画像符号化装置及び画像符号化方法を提供することを目的とする。 Accordingly, the present invention has been made to solve the above-described problems, and predicts an image in an inter mode and an intra mode, and predicts an image with a higher encoding efficiency. An object is to provide an image encoding apparatus and an image encoding method that can be executed in real time by software.
本願発明における第1の発明は、動ベクトルを探索しつつ行うインター予測モードによる仮符号化及びイントラ予測モードによる仮符号化の結果を用いて、順次供給される画像の本符号化を行う画像符号化装置において、現在本符号化対象となっている現符号化対象画像の本符号化を行って符号化データを生成する符号化部と、前記順次供給される画像に対する前記インター予測モードによる仮符号化を連続して行うインター予測部と、前記符号化データの復号を行って前記現符号化対象画像の次に符号化対象となる次符号化対象画像の前記イントラ予測モードによる仮符号化で用いる参照画像を生成する復号部と、前記参照画像を用いて前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行うイントラ予測部と、前記次符号化対象画像に対する前記インター予測モードによる仮符号化での発生符号量と、同画像に対する前記イントラ予測モードによる仮符号化での発生符号量とを比較して、前記発生符号量の少ない方の予測モードを選択する選択部と、前記選択部で前記インター予測モードが選択された場合は前記インター予測モードによる仮符号化で探索して得られた前記動ベクトルを用いて前記インター予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせ、前記選択部で前記イントラ予測モードが選択された場合は前記イントラ予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせる第1の制御部と、前記インター予測部が前記次符号化対象画像に対する仮符号化を行っている期間に、前記符号化部に前記現符号化対象画像に対する前記符号化データの生成を行わせ、前記復号部に生成された前記符号化データに対する前記参照画像の生成を行わせ、前記イントラ予測部に生成された前記参照画像を用いた前記次符号化対象画像に対する仮符号化を行わせるよう制御し、前記順次供給される画像に対する前記符号化部での本符号化動作と前記イントラ予測部による仮符号化動作と前記復号部による参照画像生成動作とを順次行わせる第2の制御部と、を備えたことを特徴とする画像符号化装置を提供する。
第2の発明は、動ベクトルを探索しつつ行うインター予測モードによる仮符号化及びイントラ予測モードによる仮符号化の結果を用いて、順次供給される画像の本符号化を行う画像符号化方法において、現在符号化対象となっている現符号化対象画像の本符号化を行って符号化データを生成する符号化ステップと、前記順次供給される画像に対する前記インター予測モードによる仮符号化を連続して行うインター予測ステップと、前記符号化データの復号を行って前記現符号化対象画像の次に符号化対象となる次符号化対象画像の前記イントラ予測モードによる仮符号化で用いる参照画像を生成する復号ステップと、前記参照画像を用いて前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行うイントラ予測ステップと、前記次符号化対象画像に対する前記インター予測モードによる仮符号化での発生符号量と、同画像に対する前記イントラ予測モードによる仮符号化での発生符号量とを比較して、前記発生符号量の少ない方の予測モードを選択する選択ステップと、前記選択ステップで前記インター予測モードが選択された場合は前記符号化ステップでの前記次符号化対象画像の本符号化を前記インター予測モードによる仮符号化で探索して得られた前記動ベクトルを用いて行う符号化とし、前記選択ステップで前記イントラ予測モードが選択された場合は前記符号化ステップでの前記次符号化対象画像の本符号化を前記イントラ予測モードにより行う符号化とするよう制御する第1の制御ステップと、前記インター予測ステップで前記次符号化対象画像に対する仮符号化を行っている期間に、前記現符号化対象画像に対する前記符号化データの生成を行わせる前記符号化ステップと、前記次符号化対象画像の前記イントラ予測モードによる仮符号化で用いる参照画像の生成を行わせる前記復号ステップと、前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行わせる前記イントラ予測ステップとを行わせるよう制御する第2の制御ステップと、を有して前記画像の本符号化を行うことを特徴とする画像符号化方法を提供する。
The first invention in the present invention is an image code for performing main encoding of sequentially supplied images using the results of provisional coding in inter prediction mode and provisional coding in intra prediction mode performed while searching for motion vectors. In the encoding apparatus, an encoding unit that performs main encoding of the current encoding target image that is currently the main encoding target to generate encoded data, and a temporary code in the inter prediction mode for the sequentially supplied images An inter-prediction unit that continuously performs encoding, and is used for provisional encoding in the intra prediction mode of the next encoding target image that is to be encoded next to the current encoding target image by decoding the encoded data A decoding unit that generates a reference image; an intra prediction unit that performs provisional encoding of the next encoding target image using the intra prediction mode using the reference image; and the next code Comparing the generated code amount in the temporary encoding in the inter prediction mode for the target image with the generated code amount in the temporary encoding in the intra prediction mode for the same image, the prediction mode with the smaller generated code amount A selection unit that selects the inter-prediction mode, and when the inter-prediction mode is selected by the selection unit, the next code according to the inter-prediction mode using the motion vector obtained by searching by provisional encoding in the inter-prediction mode The encoding unit performs main encoding of the encoding target image, and when the selection unit selects the intra prediction mode, the encoding unit performs main encoding of the next encoding target image in the intra prediction mode. The first control unit to be performed and the inter prediction unit to the encoding unit during the period in which the inter-prediction unit performs temporary encoding on the next encoding target image The next generation using the reference image generated by the intra prediction unit by generating the encoded data for the target image, generating the reference image for the encoded data generated by the decoding unit. Control is performed to perform provisional encoding on the encoding target image, and the main encoding operation in the encoding unit, the temporary encoding operation by the intra prediction unit, and the reference image generation by the decoding unit for the sequentially supplied images An image encoding apparatus comprising: a second control unit that sequentially performs operations.
According to a second aspect of the present invention, there is provided an image encoding method for performing main encoding of sequentially supplied images using a result of provisional encoding in inter prediction mode and provisional encoding in intra prediction mode performed while searching for a motion vector. An encoding step of performing main encoding of a current encoding target image that is a current encoding target to generate encoded data, and temporary encoding in the inter prediction mode for the sequentially supplied images. An inter-prediction step, and decoding of the encoded data to generate a reference image used in provisional encoding of the next encoding target image to be encoded next to the current encoding target image in the intra prediction mode A decoding step, an intra prediction step of performing temporary encoding of the next encoding target image using the intra prediction mode using the reference image, Compare the generated code amount in the temporary encoding in the inter prediction mode with respect to the encoding target image and the generated code amount in the temporary encoding in the intra prediction mode with respect to the image, and A selection step of selecting a prediction mode, and if the inter prediction mode is selected in the selection step, search for the main encoding of the next encoding target image in the encoding step by provisional encoding in the inter prediction mode When the intra prediction mode is selected in the selection step, the encoding of the next encoding target image in the encoding step is performed as the intra prediction. A first control step for controlling the encoding to be performed according to the mode, and the next encoding target image in the inter prediction step The encoding step for generating the encoded data for the current encoding target image during a period of encoding, and a reference image used for provisional encoding of the next encoding target image in the intra prediction mode And a second control step for performing control so as to perform the decoding step for generating the image and the intra prediction step for performing the temporary encoding of the next encoding target image in the intra prediction mode. An image encoding method is provided that performs the main encoding of the image.
本発明によれば、現在本符号化対象となっている現符号化対象画像の本符号化を行って符号化データを生成する符号化部と、順次供給される画像に対するインター予測モードによる仮符号化を連続して行うインター予測部と、前記符号化データの復号を行って前記現符号化対象画像の次に符号化対象となる次符号化対象画像のイントラ予測モードによる仮符号化で用いる参照画像を生成する復号部と、前記参照画像を用いて前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行うイントラ予測部と、前記次符号化対象画像に対する前記インター予測モードによる仮符号化での発生符号量と、同画像に対する前記イントラ予測モードによる仮符号化での発生符号量とを比較して、前記発生符号量の少ない方の予測モードを選択する選択部と、前記選択部で前記インター予測モードが選択された場合は前記インター予測モードによる仮符号化で探索して得られた動ベクトルを用いて前記インター予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせ、前記選択部で前記イントラ予測モードが選択された場合は前記イントラ予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせる第1の制御部と、前記インター予測部が前記次符号化対象画像に対する仮符号化を行っている期間に、前記符号化部に前記現符号化対象画像に対する前記符号化データの生成を行わせ、前記復号部に生成された前記符号化データに対する前記参照画像の生成を行わせ、前記イントラ予測部に生成された前記参照画像を用いた前記次符号化対象画像に対する仮符号化を行わせるよう制御し、前記順次供給される画像に対する前記符号化部での本符号化動作と前記イントラ予測部による仮符号化動作と前記復号部による参照画像生成動作とを順次行わせる第2の制御部とを備えた格別な構成があるので、インターモード及びイントラモードで予測し、符号化効率の高い方のモードにより予測して行う画像信号の符号化をソフトウエアにより実時間で実行可能とする画像符号化装置及び画像符号化方法を実現できる。 According to the present invention, the encoding unit that generates the encoded data by performing the main encoding of the current encoding target image that is currently the main encoding target, and the provisional encoding in the inter prediction mode for the sequentially supplied images An inter prediction unit that continuously performs encoding, and a reference that is used in provisional encoding in the intra prediction mode of the next encoding target image that is to be encoded next to the current encoding target image by decoding the encoded data A decoding unit that generates an image; an intra prediction unit that performs provisional encoding of the next encoding target image in the intra prediction mode using the reference image; and a temporary code in the inter prediction mode for the next encoding target image And the generated code amount in the provisional encoding in the intra prediction mode for the same image is compared, and the prediction mode with the smaller generated code amount is selected. When the inter prediction mode is selected by the selection unit and the selection unit, the motion vector obtained by searching by provisional encoding in the inter prediction mode is used to determine the next encoding target image in the inter prediction mode. First encoding is performed by the encoding unit, and when the intra prediction mode is selected by the selection unit, the encoding unit performs main encoding of the next encoding target image in the intra prediction mode. 1, in a period in which the inter prediction unit performs temporary encoding on the next encoding target image, the encoding unit generates the encoded data for the current encoding target image, The decoding unit generates the reference image for the encoded data, and the intra prediction unit uses the reference image generated for the next encoding target image. And sequentially performing the main encoding operation in the encoding unit, the temporary encoding operation by the intra prediction unit, and the reference image generation operation by the decoding unit for the sequentially supplied images. Since there is a special configuration provided with a second control unit to be performed, the image signal encoding is performed by software by predicting in the inter mode and the intra mode and predicting in the mode with the higher encoding efficiency. An image encoding device and an image encoding method that can be executed in time can be realized.
以下に本発明の実施例に係る画像符号化装置について図1〜図5を用いて説明する。
図1は、本発明の実施に係る画像符号化装置の構成例を示すブロック図である。図2は、本発明の実施に係る画像符号化装置の動作例を示す図である。図3は、本発明の実施に係る画像符号化装置の要部の構成例を示す図である。図4は、本発明の実施に係る画像符号化装置の動作例を説明するための図(その1)である。図5は、本発明の実施に係る画像符号化装置の動作例を説明するための図(その2)である。
Hereinafter, an image coding apparatus according to an embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a block diagram illustrating a configuration example of an image encoding device according to an embodiment of the present invention. FIG. 2 is a diagram illustrating an operation example of the image coding apparatus according to the embodiment of the present invention. FIG. 3 is a diagram illustrating a configuration example of a main part of the image encoding device according to the embodiment of the present invention. FIG. 4 is a diagram (No. 1) for explaining an operation example of the image coding device according to the embodiment of the present invention. FIG. 5 is a diagram (No. 2) for explaining an operation example of the image coding device according to the embodiment of the present invention.
その画像符号化装置はインターモード及びイントラモードで予測し、符号化効率の高い方のモードにより予測して行う画像信号の実時間符号化をソフトウエア実行により実現するという目的を、現在本符号化対象となっている現符号化対象画像の本符号化を行って符号化データを生成する符号化部と、順次供給される画像に対するインター予測モードによる仮符号化を連続して行うインター予測部と、前記符号化データの復号を行って前記現符号化対象画像の次に符号化対象となる次符号化対象画像のイントラ予測モードによる仮符号化で用いる参照画像を生成する復号部と、前記参照画像を用いて前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行うイントラ予測部と、前記次符号化対象画像に対する前記インター予測モードによる仮符号化での発生符号量と、同画像に対する前記イントラ予測モードによる仮符号化での発生符号量とを比較して、前記発生符号量の少ない方の予測モードを選択する選択部と、前記選択部で前記インター予測モードが選択された場合は前記インター予測モードによる仮符号化で探索して得られた動ベクトルを用いて前記インター予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせ、前記選択部で前記イントラ予測モードが選択された場合は前記イントラ予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせる第1の制御部と、前記インター予測部が前記次符号化対象画像に対する仮符号化を行っている期間に、前記符号化部に前記現符号化対象画像に対する前記符号化データの生成を行わせ、前記復号部に生成された前記符号化データに対する前記参照画像の生成を行わせ、前記イントラ予測部に生成された前記参照画像を用いた前記次符号化対象画像に対する仮符号化を行わせるよう制御し、前記順次供給される画像に対する前記符号化部での本符号化動作と前記イントラ予測部による仮符号化動作と前記復号部による参照画像生成動作とを順次行わせる第2の制御部とを備えるようにして実現した。 The image encoding device is currently used for the purpose of realizing real-time encoding of an image signal that is predicted in inter mode and intra mode and predicted in the mode with higher encoding efficiency by software execution. An encoding unit that performs the main encoding of the current current encoding target image and generates encoded data; an inter prediction unit that continuously performs temporary encoding in inter prediction mode for sequentially supplied images; A decoding unit that decodes the encoded data and generates a reference image used in provisional encoding in an intra prediction mode of a next encoding target image to be encoded next to the current encoding target image; and the reference An intra prediction unit that performs temporary encoding of the next encoding target image in the intra prediction mode using an image, and the inter prediction mode for the next encoding target image. A selection unit that selects a prediction mode with a smaller amount of generated code by comparing a generated code amount in temporary encoding with a code and a generated code amount in temporary encoding with the intra prediction mode for the same image; When the inter prediction mode is selected by the selection unit, main encoding of the next encoding target image in the inter prediction mode using a motion vector obtained by searching by provisional encoding in the inter prediction mode. First control for causing the encoding unit to perform main encoding of the next encoding target image in the intra prediction mode when the intra prediction mode is selected by the selection unit. Generating the encoded data for the current encoding target image in the encoding unit during a period in which the inter prediction unit performs temporary encoding for the next encoding target image. Causing the decoding unit to generate the reference image with respect to the encoded data, and the intra prediction unit to perform temporary encoding on the next encoding target image using the reference image. Second control for sequentially performing a main encoding operation in the encoding unit, a temporary encoding operation by the intra prediction unit, and a reference image generation operation by the decoding unit for the sequentially supplied images. This is realized by providing a part.
画像符号化装置の構成について述べる。
図1に示す画像符号化装置10はインター符号化部1と、イントラ予測処理部21、モード判定部22、及び符号化・復号化部23よりなるイントラ符号化部2と、制御部3とより構成される。制御部3は図示しないCPUを格納し、回路部各部の動作を制御する。
図3に示す画像符号化装置10のイントラ予測処理部21は、予測画像生成器211、選択器212、残差演算器213、アダマール変換器214、絶対値総和器215、SATD(Sum of Absolute Transform Differences)評価器216、及び予測モード指示器217より構成される。符号化・復号化部23は直交変換器231、量子化器232、逆量子化器233、逆直交変換器234、及び画像メモリ部235より構成される。画像メモリ部235は復号画像を記憶する。
The configuration of the image encoding device will be described.
The
The intra prediction processing unit 21 of the
画像符号化装置10の動作について述べる。
まず、第1フレーム目の処理について述べる。
水平及び垂直が16画素×16画素に分割されたマクロブロック画像がインター符号化部1及びイントラ符号化部2のイントラ予測処理部21に入力される。インター符号化部1は入力画像を次のフレームで入力される入力画像の動き予測を行うため、入力画像を図示しない画像メモリ(フレームメモリ)に記憶する。イントラ予測処理部21はマクロブロック画像を16個の4×4画素ブロックに分割し、そのマクロブロック画像の左側及び上側に隣接される画素ブロックから予測しつつ4×4画素のイントラ予測仮符号化を行う。同様に4個の8×8画素ブロックに分割した画像のイントラ予測仮符号化、及び16×16画素ブロックの画像のイントラ予測仮符号化を行う。イントラ予測仮符号化は、それぞれの画素ブロックの直交変換を、DCT(discrete cosine transform)で行う代わりに演算が簡易なアダマール変換で行う。アダマール変換の変換時間はDCTによる直交変換に比し短時間で演算できる。符号化方法を評価するための評価結果を簡易に得ることが出来る。
The operation of the
First, the processing of the first frame will be described.
A macroblock image obtained by dividing horizontal and vertical into 16 pixels × 16 pixels is input to the intra prediction processing unit 21 of the
モード判定部22は、4×4画素ブロック画像のイントラ予測仮符号化、8×8画素ブロックの分割画像のイントラ予測仮符号化、及び16×16画素ブロック画像のイントラ予測仮符号化のそれぞれで得られた発生符号量を比較する。最も小さな発生符号量を与えるイントラ予測仮符号化を判定する。符号化・復号化部23は、モード判定されたイントラ予測仮符号化の結果を用い、入力されたマクロブロック画像を画素ブロックに分割してイントラ予測符号化を行う。そのイントラ予測符号化はDCTで直交変換を行う正規のイントラ予測符号化(以降、正規の符号化のことを本符号化と述べることもある。)である。本符号化して得られた予測符号化データは図示しないエントロピー符号化部に供給されて可変長符号化がなされる。また、符号化・復号化部23は予測符号化データを復号化し、得られらマクロブロックの復号化画像はイントラ予測用参照画像としてイントラ予測処理部21に供給される。復号化画像は図示しないデブロックフィルタに供給される。さらに、復号化画像は次フレーム以降での動ベクトル探索用に用いる参照画像としてフレームメモリの所定のマクロブロックの位置に記憶される。
The
次に、第2フレーム目以降について述べる。
インター符号化部1は、符号化及び復号化されて記憶されているフレーム画像データを参照して動き予測を行う。動き予測は入力されるブロック画像に類似する参照画像の位置を探索により求める。動ベクトルは最も小さな平均自乗誤差を与える参照画像の位置の関係からを求める。演算量が多い工程である。求められた動ベクトルを用い入力画像の仮符号化を行う。仮符号化は入力画像と参照画像との差分をアダマール変換して求める。イントラ符号化部2は、上記と同様に4×4画素ブロック画像のイントラ予測仮符号化、8×8画素ブロックの分割画像のイントラ予測仮符号化、及び16×16画素ブロック画像の画素ブロックのイントラ予測仮符号化をそれぞれについて行う。
モード判定部22はインター符号化部1でなされた仮符号化により得られた発生符号量と、イントラ符号化部2でなされた仮符号化により得られた4×4画素、8×8画素、及び16×16画素ブロックのそれぞれに分割した場合での発生符号量とを比較し、最も小さな発生符号量を与える符号化モードが判定される。符号化・復号化部23は、判定された符号化モードにより入力画像を正規な方法で、本符号化、及び復号化を行う。インター予測による符号化が判定された場合には仮符号化で探索して求められた動ベクトルが用いられて本符号化される。イントラ予測による符号化が判定された場合には、4×4画素、8×8画素、及び16×16画素のブロック分割のうち、最も小さな発生符号量を与えたブロック分割による本符号化がなされる。
Next, the second and subsequent frames will be described.
The
The
図2を参照してさらに説明する。
同図(A)はインター予測符号化が行われる時間を示し、(B)はイントラ予測符号化及び、符号化・復号化のなされる時間を示す。(n)は予測符号化を行うマクロブロックの順序が第n回目であることを示している。
(A)でのインター予測は、インター予測(n−1)、インター予測(n)、インター予測(n+1)が続けて行われる。それらのインター予測では上記の仮符号化のみを行う。(B)での処理はイントラ予測(n−1)、符号化復号化(n−1)、イントラ予測(n)、符号化復号化(n)、イントラ予測(n+1)、符号化復号化(n+1)の順に行われる。仮符号化と、本符号化及び復号化とが繰り返し行われる。即ち、時刻t1から開始されたインター予測(n−1)は時刻t3で終了し、その直後からインター予測(n)が行われる。イントラ予測(n−1)はt2から開始されt3で終了する。t3〜t4では符号化復号化(n−1)が行われる。
This will be further described with reference to FIG.
FIG. 4A shows the time for performing inter prediction encoding, and FIG. 4B shows the time for intra prediction encoding and encoding / decoding. (N) indicates that the order of macroblocks for predictive coding is the nth time.
Inter prediction in (A) is performed in succession by inter prediction (n-1), inter prediction (n), and inter prediction (n + 1). In these inter predictions, only the provisional encoding described above is performed. The processing in (B) includes intra prediction (n−1), coding / decoding (n−1), intra prediction (n), coding / decoding (n), intra prediction (n + 1), coding / decoding ( n + 1). The temporary encoding, the main encoding, and the decoding are repeatedly performed. That is, the inter prediction (n−1) started from time t1 ends at time t3, and inter prediction (n) is performed immediately thereafter. Intra prediction (n-1) starts at t2 and ends at t3. From t3 to t4, encoding / decoding (n-1) is performed.
n回目の処理に関しては、インター予測はt3から開始され、イントラ予測はt4から開始される。t5において終了したインター予測及びイントラ予測での両者の仮符号化が終了する。その時点でモード判定部はいずれの仮符号化で得られた発生符号量が小さいかを判定する。t5〜t6の期間に本符号化及び復号化を行う。インター予測で符号化するとして判定された場合でも正規のインター予測符号化及び復号化は(B)のt5〜t6の期間に実行される。フレーム単位で過去に本符号化及び復号化がなされて生成されたフレーム画像を参照画像として、マクロブロック画像に対する動ベクトルの探索を行うインター符号化(n+1)は、インター符号化(n)の直後のt5から開始できる。
インター符号化をハードウエアで行う場合は、そのハードウエアのインター符号化を行う回路部にインター予測仮符号化、正規のインター予測符号化、及び復号化を行う回路が配置される。従ってインター予測(n)はt4〜t5の期間に行われる。それに比し本画像符号化装置10の場合では正規のインター予測符号化、及び復号化はイントラ符号化部の機能を用いて実行するため、(n)のインター予測仮符号化をt3〜t5の期間に実行させることができる。
Regarding the n-th process, inter prediction is started from t3, and intra prediction is started from t4. The provisional encoding of both the inter prediction and the intra prediction ended at t5 ends. At that time, the mode determination unit determines which of the provisional encodings the generated code amount is small. The main encoding and decoding are performed during the period from t5 to t6. Even when it is determined that encoding is performed by inter prediction, normal inter prediction encoding and decoding are performed in a period from t5 to t6 in (B). Inter coding (n + 1) for searching for a motion vector for a macroblock image using a frame image generated by performing main coding and decoding in the past as a frame unit as a reference image is immediately after inter coding (n). You can start at t5.
When inter coding is performed by hardware, a circuit that performs inter prediction temporary coding, normal inter prediction coding, and decoding is arranged in a circuit unit that performs hardware inter coding. Therefore, the inter prediction (n) is performed in the period from t4 to t5. On the other hand, in the case of the present
次に、詳細に説明する。
図3を参照し、イントラ予測処理部21及び符号化・復号化部23について述べる。
最初に、イントラ予測処理について説明する。
まず、予測画像生成器211は、符号化・復号化部23の画像メモリ部235に記憶される過去に符号化及び復号化のなされた画像データを基にイントラ予測に用いる予測画像を生成する。選択器212は、イントラ予測処理時に、同図中のa側に入力される信号を選択して出力する。残差演算器213は入力画像と予測画像とを比較し、残差を演算する。アダマール変換器214は残差を簡易的に直交変換する。絶対値総和器215はアダマール変換して得られた係数値の絶対値の総和を求める。SATD評価器216は4×4画素、8×8画素、及び16×16画素のそれぞれのブロック分割で求められた係数値の絶対値の総和を評価し、最も小さな絶対値の総和を与える場合のブロック分割数と係数値の絶対値の総和を出力する。
Next, this will be described in detail.
The intra prediction processing unit 21 and the encoding / decoding unit 23 will be described with reference to FIG.
First, the intra prediction process will be described.
First, the predicted
符号化・復号化部23について述べる。
符号化・復号化部23はイントラ予測時にはイントラ予測に用いる参照画像を符号化及び復号化して生成すると共に、モード判定部22で判定されたモードに従って本符号化及び復号化を行う。
イントラ予測時の処理について述べる。
直交変換器231は残差演算器213で生成された残差データの正規の直交変換、即ちDCTを行い、係数データを得る。量子化器232は係数データを所定の量子化幅(量子化ステップ)で量子化し、量子化データを生成する。逆量子化器233は量子化データを逆量子化して係数データを得る。逆直交変換器234は係数データの逆DCT変換を行い、復号化残差データを得る。画像メモリ部235は、選択器212を介して予測画像生成器211で生成された予測画像(参照画像)を取得し、その予測画像と復号化残差データとより復号化画像データを生成する。復号化画像データは予測画像生成器211に供給され、そこで以降の符号化に用いるための予測画像として用いられる。
The encoding / decoding unit 23 will be described.
The encoding / decoding unit 23 generates and encodes and decodes a reference image used for intra prediction at the time of intra prediction, and performs main encoding and decoding according to the mode determined by the
The processing at the time of intra prediction will be described.
The
モード判定部22でイントラ符号化を行うとして判定された場合の処理について述べる。
イントラ予測処理部21の残差演算器213は、本符号化を行うための入力画像と、予測画像生成器211で生成される本符号化用の予測画像とを比較し残差データを得る。符号化・復号化部23の直交変換器231は残差データのDCT変換を行う。量子化器232は残差データの量子化を行い、得られた量子化データを予測符号化データとして図示しないエントロピー符号器に出力する。
A process when it is determined that the
The
モード判定部22でインター符号化を行うとして判定された場合の処理について述べる。
インター符号化部1で仮符号化時に得られた動ベクトルが用いられて生成された予測画像(参照画像)は選択器212のb側に入力される。選択器212は、予測モード指示器217を介して供給されるモード判定部22の判定結果を基にb側に入力されるデータを選択する。残差演算器213は入力画像と予測画像とを比較し残差データを生成する。直交変換器231は残差データをDCT変換して係数データを得、量子化器232はその係数データを量子化し、得られる量子化データを予測符号化データとして出力する。逆量子化器233及び逆直交変換器234で予測符号化データを逆量子化及び逆DCTして復号残差データを得る。画像メモリ部235は、選択器212を介して入力される予測画像と復号残差データとを基に復号化画像データを生成し、その復号化画像データを内部に設けられる画像メモリに記憶する。復号化画像データは符号化、復号化時に生じるブロックノイズを減衰させるための図示しないデブロックフィルタに供給される。予測画像生成器211は、復号化画像データを用いて次回以降に符号化する入力画像の予測画像データ(参照画像データ)を生成する。
Processing when the
A predicted image (reference image) generated using the motion vector obtained at the time of provisional encoding in the
図4を参照して予測画像について述べる。
同図において、(n)は符号化を行う16×16画素のマクロブロック画像である。(n−1)は直前に符号化したマクロブロック画像であり、(n+1)は次に符号化するマクロブロック画像である。(m−1)〜(m+1)は(n−1)〜(n+1)のマクロブロックの上側に隣接して配置される過去に本符号化及び復号化されたマクロブロック画像である。
マクロブロック画像(n)を符号化する時に用いる画像データは(n−1)の右側の16個の画素、(m−1)の右下の1画素、(m)の下側の16個の画素、及び(m+1)の下側の16個の画素である。予測画像生成器211は、過去に符号化・復号化部23で得られた復号化画像データを用いてこれらの予測画像としての画素のデータを生成しておく。
The predicted image will be described with reference to FIG.
In the figure, (n) is a 16 × 16 pixel macroblock image to be encoded. (N−1) is a macroblock image encoded immediately before, and (n + 1) is a macroblock image to be encoded next. (M−1) to (m + 1) are macroblock images that have been main-encoded and decoded in the past and arranged adjacent to the upper side of the macroblocks (n−1) to (n + 1).
The image data used when encoding the macroblock image (n) is 16 pixels on the right side of (n−1), 1 pixel on the lower right side of (m−1), and 16 pixels on the lower side of (m). Pixels and 16 pixels below (m + 1). The predicted
図5を参照してイントラ予測符号化時に用いる予測画像について述べる。
同図において、(n)は図4に示したと同様、符号化するマクロブロックである。イントラ予測符号化は16個の4×4画素ブロック、4個の8×8画素ブロック又は1個の16×16画素ブロックで予測符号化される。同図の斜線で示す4×4画素ブロックは、その左側及び上側に示す9個の網点を付した画素のデータが用いられて予測符号化がなされる。符号化・復号化部23は、(n)のマクロブロックの仮符号化時に本符号化及び復号化を行って予測画像生成用の復号化画像データを生成する。
符号化・復号化部23で行われる本符号化及び復号化は、イントラ予測符号化時の予測画像生成用、イントラ予測符号化と判定された場合の本符号化及び復号化、さらにはインター予測符号化と判定された場合の本符号化及び復号化を実行する。そのため、インター符号化部1はモード判定のためのインター仮符号化のみを行えばよい。直交変換もアダマール変換を用いる。イントラ符号化部2はインター符号化時の後半の演算を行う。インター符号化部1は前半の演算に係る動ベクトル演算を主に行えばよいため、ソフトウエア処理による実時間の符号化演算が可能となる。
The prediction image used at the time of intra prediction encoding is described with reference to FIG.
In the figure, (n) is a macroblock to be encoded, as shown in FIG. Intra-prediction encoding is predictive encoding with 16 4 × 4 pixel blocks, 4 8 × 8 pixel blocks, or 1 16 × 16 pixel block. The 4 × 4 pixel block indicated by diagonal lines in the figure is subjected to predictive encoding using the data of the pixels with nine halftone dots shown on the left and upper sides thereof. The encoding / decoding unit 23 performs the main encoding and decoding at the time of the temporary encoding of the macroblock (n) to generate decoded image data for generating a predicted image.
The main encoding and decoding performed by the encoding / decoding unit 23 is for predictive image generation at the time of intra prediction encoding, main encoding and decoding when determined to be intra prediction encoding, and further inter prediction. The main encoding and decoding when it is determined to be encoding is executed. Therefore, the
以上のように、本実施例で示した画像符号化装置10によれば、現在本符号化対象となっている現符号化対象画像の本符号化を行って符号化データを生成する符号化部231、232と、順次供給される画像に対するインター予測モードによる仮符号化を連続して行うインター予測部1と、前記符号化データの復号を行って前記現符号化対象画像の次に符号化対象となる次符号化対象画像のイントラ予測モードによる仮符号化で用いる参照画像を生成する復号部233、234と、前記参照画像を用いて前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行うイントラ予測部21と、前記次符号化対象画像に対する前記インター予測モードによる仮符号化での発生符号量と、同画像に対する前記イントラ予測モードによる仮符号化での発生符号量とを比較して、前記発生符号量の少ない方の予測モードを選択する選択部22と、前記選択部で前記インター予測モードが選択された場合は前記インター予測モードによる仮符号化で探索して得られた動ベクトルを用いて前記インター予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせ、前記選択部で前記イントラ予測モードが選択された場合は前記イントラ予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせる第1の制御部3と、前記インター予測部1が前記次符号化対象画像に対する仮符号化を行っている期間に、前記符号化部231、232に前記現符号化対象画像に対する前記符号化データの生成を行わせ、前記復号部233、234に生成された前記符号化データに対する前記参照画像の生成を行わせ、前記イントラ予測部21に生成された前記参照画像を用いた前記次符号化対象画像に対する仮符号化を行わせるよう制御し、前記順次供給される画像に対する前記符号化部231、232での本符号化動作と前記イントラ予測部21による仮符号化動作と前記復号部231、232による参照画像生成動作とを順次行わせる第2の制御部3とを備えた格別な構成があるので、インターモード及びイントラモードで予測し、符号化効率の高い方のモードにより予測して行う画像信号の符号化をソフトウエアにより実時間で実行可能とする画像符号化装置を実現できる。
As described above, according to the
1 インター符号化部
2 イントラ符号化部
21 イントラ予測処理部
22 モード判定部
23 符号化・復号化部
211 予測画像生成器
212 選択器
213 残差演算器
214 アダマール変換器
215 絶対値総和器
216 SATD評価器
217 予測モード指示器
231 直交変換器
232 量子化器
233 逆量子化器
234 逆直交変換器
235 画像メモリ部
DESCRIPTION OF
Claims (2)
現在本符号化対象となっている現符号化対象画像の本符号化を行って符号化データを生成する符号化部と、
前記順次供給される画像に対する前記インター予測モードによる仮符号化を連続して行うインター予測部と、
前記符号化データの復号を行って前記現符号化対象画像の次に符号化対象となる次符号化対象画像の前記イントラ予測モードによる仮符号化で用いる参照画像を生成する復号部と、
前記参照画像を用いて前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行うイントラ予測部と、
前記次符号化対象画像に対する前記インター予測モードによる仮符号化での発生符号量と、同画像に対する前記イントラ予測モードによる仮符号化での発生符号量とを比較して、前記発生符号量の少ない方の予測モードを選択する選択部と、
前記選択部で前記インター予測モードが選択された場合は前記インター予測モードによる仮符号化で探索して得られた前記動ベクトルを用いて前記インター予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせ、前記選択部で前記イントラ予測モードが選択された場合は前記イントラ予測モードによる前記次符号化対象画像の本符号化を前記符号化部に行わせる第1の制御部と、
前記インター予測部が前記次符号化対象画像に対する仮符号化を行っている期間に、前記符号化部に前記現符号化対象画像に対する前記符号化データの生成を行わせ、前記復号部に生成された前記符号化データに対する前記参照画像の生成を行わせ、前記イントラ予測部に生成された前記参照画像を用いた前記次符号化対象画像に対する仮符号化を行わせるよう制御し、前記順次供給される画像に対する前記符号化部での本符号化動作と前記イントラ予測部による仮符号化動作と前記復号部による参照画像生成動作とを順次行わせる第2の制御部と、
を備えたことを特徴とする画像符号化装置。 In an image encoding device that performs main encoding of sequentially supplied images using the results of provisional encoding in inter prediction mode performed while searching for motion vectors and provisional encoding in intra prediction mode,
An encoding unit that performs main encoding of the current encoding target image that is currently the main encoding target and generates encoded data;
An inter prediction unit that continuously performs temporary encoding in the inter prediction mode for the sequentially supplied images;
A decoding unit that decodes the encoded data and generates a reference image to be used for provisional encoding in the intra prediction mode of a next encoding target image to be encoded next to the current encoding target image;
An intra prediction unit that performs provisional encoding of the next encoding target image in the intra prediction mode using the reference image;
The generated code amount is small by comparing the generated code amount in the temporary encoding in the inter prediction mode for the next encoding target image with the generated code amount in the temporary encoding in the intra prediction mode for the same image. A selection unit for selecting a prediction mode of
When the selection unit selects the inter prediction mode, the encoding of the next encoding target image in the inter prediction mode is performed using the motion vector obtained by searching by provisional encoding in the inter prediction mode. First control for causing the encoding unit to perform main encoding of the next encoding target image in the intra prediction mode when the intra prediction mode is selected by the selection unit. And
During the period when the inter prediction unit performs provisional encoding on the next encoding target image, the encoding unit generates the encoded data for the current encoding target image, and the decoding unit generates the encoded data. The reference image is generated for the encoded data, and the intra prediction unit is controlled to perform provisional encoding on the next encoding target image using the reference image generated. A second control unit that sequentially performs a main encoding operation in the encoding unit, a provisional encoding operation by the intra prediction unit, and a reference image generation operation by the decoding unit,
An image encoding apparatus comprising:
現在符号化対象となっている現符号化対象画像の本符号化を行って符号化データを生成する符号化ステップと、
前記順次供給される画像に対する前記インター予測モードによる仮符号化を連続して行うインター予測ステップと、
前記符号化データの復号を行って前記現符号化対象画像の次に符号化対象となる次符号化対象画像の前記イントラ予測モードによる仮符号化で用いる参照画像を生成する復号ステップと、
前記参照画像を用いて前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行うイントラ予測ステップと、
前記次符号化対象画像に対する前記インター予測モードによる仮符号化での発生符号量と、同画像に対する前記イントラ予測モードによる仮符号化での発生符号量とを比較して、前記発生符号量の少ない方の予測モードを選択する選択ステップと、
前記選択ステップで前記インター予測モードが選択された場合は前記符号化ステップでの前記次符号化対象画像の本符号化を前記インター予測モードによる仮符号化で探索して得られた前記動ベクトルを用いて行う符号化とし、前記選択ステップで前記イントラ予測モードが選択された場合は前記符号化ステップでの前記次符号化対象画像の本符号化を前記イントラ予測モードにより行う符号化とするよう制御する第1の制御ステップと、
前記インター予測ステップで前記次符号化対象画像に対する仮符号化を行っている期間に、前記現符号化対象画像に対する前記符号化データの生成を行わせる前記符号化ステップと、前記次符号化対象画像の前記イントラ予測モードによる仮符号化で用いる参照画像の生成を行わせる前記復号ステップと、前記次符号化対象画像の前記イントラ予測モードによる仮符号化を行わせる前記イントラ予測ステップとを行わせるよう制御する第2の制御ステップと、
を有して前記画像の本符号化を行うことを特徴とする画像符号化方法。
In an image encoding method for performing main encoding of sequentially supplied images using the results of temporary encoding in inter prediction mode and temporary encoding in intra prediction mode performed while searching for a motion vector,
An encoding step of performing main encoding of a current encoding target image that is currently an encoding target to generate encoded data;
An inter prediction step for continuously performing temporary encoding in the inter prediction mode for the sequentially supplied images;
A decoding step of decoding the encoded data and generating a reference image to be used for provisional encoding in the intra prediction mode of the next encoding target image to be encoded next to the current encoding target image;
An intra prediction step of performing temporary encoding in the intra prediction mode of the next encoding target image using the reference image;
The generated code amount is small by comparing the generated code amount in the temporary encoding in the inter prediction mode for the next encoding target image with the generated code amount in the temporary encoding in the intra prediction mode for the same image. A selection step to select a prediction mode of
When the inter prediction mode is selected in the selection step, the motion vector obtained by searching the main encoding of the next encoding target image in the encoding step by temporary encoding in the inter prediction mode is used. If the intra prediction mode is selected in the selection step, control is performed so that the main encoding of the next encoding target image in the encoding step is performed in the intra prediction mode. A first control step,
The encoding step for generating the encoded data for the current encoding target image during a period in which temporary encoding is performed on the next encoding target image in the inter prediction step; and the next encoding target image The decoding step for generating a reference image used for provisional encoding in the intra prediction mode and the intra prediction step for performing provisional encoding of the next encoding target image in the intra prediction mode. A second control step to control;
And a main encoding of the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006027031A JP2007208802A (en) | 2006-02-03 | 2006-02-03 | Image encoding apparatus and image encoding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006027031A JP2007208802A (en) | 2006-02-03 | 2006-02-03 | Image encoding apparatus and image encoding method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007208802A true JP2007208802A (en) | 2007-08-16 |
Family
ID=38487831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006027031A Withdrawn JP2007208802A (en) | 2006-02-03 | 2006-02-03 | Image encoding apparatus and image encoding method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007208802A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009055363A (en) * | 2007-08-27 | 2009-03-12 | Panasonic Electric Works Co Ltd | Repeater of video transmission system |
CN101795408A (en) * | 2009-02-02 | 2010-08-04 | 辉达公司 | Dual stage intra-prediction video encoding system and method |
-
2006
- 2006-02-03 JP JP2006027031A patent/JP2007208802A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009055363A (en) * | 2007-08-27 | 2009-03-12 | Panasonic Electric Works Co Ltd | Repeater of video transmission system |
CN101795408A (en) * | 2009-02-02 | 2010-08-04 | 辉达公司 | Dual stage intra-prediction video encoding system and method |
JP2010178335A (en) * | 2009-02-02 | 2010-08-12 | Nvidia Corp | Dual stage intra-prediction video encoding system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5620641B2 (en) | Video encoding / decoding apparatus and method using adaptive scanning | |
JP4647558B2 (en) | Video encoding parallel processing method, video encoding device, video encoding program, and recording medium therefor | |
JP2010135864A (en) | Image encoding method, device, image decoding method, and device | |
JP2009094828A (en) | Device and method for encoding image, and device and method for decoding image | |
JP2010263301A (en) | Method of generating image data | |
JP2008227670A (en) | Image coding device | |
JP2006128770A (en) | Image coding device and method therefor, computer program of image coding device, and portable terminal | |
JP2008048065A (en) | Moving image encoding apparatus | |
JP2007013298A (en) | Image coding apparatus | |
JP2008271127A (en) | Coding apparatus | |
JP2010183162A (en) | Motion picture encoder | |
JP6652068B2 (en) | Moving picture coding apparatus, moving picture coding method and moving picture coding program | |
KR20110090841A (en) | Apparatus and method for encoding/decoding of video using weighted prediction | |
JP2008166916A (en) | Intra prediction encoder and intra prediction coding method | |
JP2007282014A (en) | Method of generating image data | |
JP2007266679A (en) | Moving picture encoder | |
JP2007208802A (en) | Image encoding apparatus and image encoding method | |
JP4367354B2 (en) | Image encoding device | |
JP4786623B2 (en) | Moving picture encoding apparatus and moving picture decoding apparatus | |
JP2009005217A (en) | Image encoding method, image decoding method, image encoding apparatus, image decoding apparatus, image encoding program, image decoding program, and computer readable recording medium | |
JP2007036725A (en) | Encoding apparatus | |
KR101841352B1 (en) | Reference frame selection method and apparatus | |
JP4719650B2 (en) | Image encoding device | |
KR20110067648A (en) | Method for encoding/decoding image and apparatus for performing the same | |
KR20130055317A (en) | Apparatus and method for encoding/decoding of video using block merging selecting candidate block in consecutive order |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080630 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20100303 |