JP2006094081A - Coding device, coding method, program of coding method, and recording medium with program of coding method recorded thereon - Google Patents
Coding device, coding method, program of coding method, and recording medium with program of coding method recorded thereon Download PDFInfo
- Publication number
- JP2006094081A JP2006094081A JP2004276393A JP2004276393A JP2006094081A JP 2006094081 A JP2006094081 A JP 2006094081A JP 2004276393 A JP2004276393 A JP 2004276393A JP 2004276393 A JP2004276393 A JP 2004276393A JP 2006094081 A JP2006094081 A JP 2006094081A
- Authority
- JP
- Japan
- Prior art keywords
- activity
- value
- mode
- prediction
- cost
- 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.)
- Granted
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、符号化装置、符号化方法、符号化方法のプログラム及び符号化方法のプログラムを記録した記録媒体に関し、動画による撮像結果を記録するビデオカメラ、電子スチルカメラ、監視装置等に適用することができる。本発明は、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出して画像データを符号化処理する場合に、アクティビティによりコスト値を補正して最適モードを検出することにより、コスト関数によりイントラ予測モード、インター予測モードから最適モードを選択して画像データを符号化処理する場合に、アクティビティの低い領域における画質劣化を防止することができるようにする。 The present invention relates to an encoding apparatus, an encoding method, an encoding method program, and a recording medium on which the encoding method program is recorded, and is applied to a video camera, an electronic still camera, a monitoring apparatus, and the like that record imaging results of moving images. be able to. The present invention detects the optimum mode for each macroblock from a plurality of intra prediction modes and a plurality of inter prediction modes by comparing the cost values with the cost function indicating the coding efficiency. By detecting the optimal mode by correcting the cost value by the activity, image quality degradation in the low activity area when the optimal mode is selected from the intra prediction mode and the inter prediction mode by the cost function and the image data is encoded. To be able to prevent.
近年、放送局、一般家庭等に係る動画の伝送、記録においては、画像データの冗長性を有効に利用して効率良く画像データを伝送、蓄積する装置が普及しつつあり、このような装置は、例えばMPEG(Moving Picture Experts Group )等の方式に準拠して、離散コサイン変換等の直交変換と動き補償とにより画像データをデータ圧縮するように構成されている。 In recent years, in the transmission and recording of moving images related to broadcasting stations, general homes, etc., devices that efficiently transmit and store image data by effectively using the redundancy of image data are becoming popular. For example, in accordance with a method such as MPEG (Moving Picture Experts Group), image data is compressed by orthogonal transform such as discrete cosine transform and motion compensation.
ここでこのような方式の1つであるMPEG2(ISO/IEC 13818-2 )は、汎用の画像符号化方式として定義された方式であり、飛び越し走査方式、順次走査方式の双方に対応できるように、また標準解像度画像、高精細画像の双方に対応できるように定義され、これらにより現在、プロフェッショナル用途及びコンシューマー用途の広範なアプリケーションに広く用いられている。具体的にMPEG2によれば、例えば720×480画素による標準解像度、飛び越し走査方式の画像データを4〜8〔Mbps〕のビットレートにデータ圧縮して、また1920×1088画素による高解像度、飛び越し走査方式の画像データを18〜22〔Mbps〕のビットレートにデータ圧縮して、高画質で高い圧縮率を確保することができる。 Here, MPEG2 (ISO / IEC 13818-2), which is one of such systems, is a system defined as a general-purpose image coding system so that it can handle both the interlace scanning system and the progressive scanning system. In addition, it is defined so as to be compatible with both standard resolution images and high-definition images, and is now widely used in a wide range of applications for professional use and consumer use. Specifically, according to MPEG2, for example, a standard resolution of 720 × 480 pixels and interlaced scanning image data are compressed to a bit rate of 4 to 8 Mbps, and a high resolution of 1920 × 1088 pixels and interlaced scanning are used. The image data of the system can be compressed to a bit rate of 18 to 22 [Mbps], and a high compression rate can be ensured with high image quality.
しかしながらMPEG2は、放送用に適合した高画質符号化方式であり、MPEG1より符号量の少ない高圧縮率の符号化方式には対応していない。これに対して近年の携帯端末の普及により、このようなMPEG1より符号量の少ない高圧縮率の符号化方式のニーズの高まりが予測される。このためMPEG4による符号化方式の規格が、ISO/IEC(International 0rganization for Standardization/International Electrotechnical Commission )14496−2により1998年12月に国際標準に承認された。 However, MPEG2 is a high-quality encoding system suitable for broadcasting, and does not support a high compression rate encoding system with a smaller code amount than MPEG1. On the other hand, with the spread of portable terminals in recent years, it is expected that there will be an increasing need for an encoding method with a high compression rate with a smaller code amount than MPEG1. For this reason, an MPEG-4 encoding system standard was approved in December 1998 by ISO / IEC (International Organization for Standardization / International Electrotechnical Commission) 14496-2.
またこのような方式にあっては、当初はテレビ会議用の画像符号化を目的としたものであったH26L(ITU-T Q6/16 VCEG)の規格化が進み、MPEG2、MPEG4に比して演算量が増大するものの、MPEG2、MPEG4に比して高い符号化効率を確保できるようになり、またMPEG4の活動の一環として、このH26Lをベースにして各種機能を取り入れ、さらに一段と高い符号化効率を確保する符号化方式の標準化が、Joint Model of Enhanced-Compression Video Codingとして進められ、これらの方式にあっては、2003年3月に、H264及びMPEG−4 Part10(AVC:Advanced Video Coding )との名称により国際標準に設定された。 In such a system, the standardization of H26L (ITU-T Q6 / 16 VCEG), which was originally intended for video coding for video conferencing, has progressed, compared to MPEG2 and MPEG4. Although the amount of computation increases, it becomes possible to secure higher encoding efficiency compared to MPEG2 and MPEG4. As part of MPEG4 activities, various functions are incorporated based on this H26L, and the encoding efficiency is even higher. Standardization of coding schemes to ensure the image quality is being promoted as Joint Model of Enhanced-Compression Video Coding. In these schemes, in March 2003, H264 and MPEG-4 Part 10 (AVC: Advanced Video Coding) Was set as an international standard.
ここで図3は、このAVCに基づく符号化装置を示すブロック図である。この符号化装置1は、複数のイントラ予測モードと複数のインター予測モードとから最適な予測モードを選択し、この選択した予測モードによる予測値を画像データから減算して差分データを生成し、この差分データを直交変換処理、量子化処理、可変長符号化処理することにより、この画像データをイントラ符号化、インター符号化により符号化処理する。
Here, FIG. 3 is a block diagram showing an encoding device based on this AVC. The
すなわちこの符号化装置1において、アナログディジタル変換回路(A/D)2は、ビデオ信号SVをアナログディジタル変換処理して画像データD1を出力する。画面並べ替えバッファ3は、このアナログディジタル変換回路2から出力される画像データD1を入力し、この符号化装置1の符号化処理に係るGOP(Group of Pictures )構造に応じて、この画像データD1のフレームを並べ替えて出力する。
That is, in this
減算回路4は、この画面並べ替えバッファ3から出力される画像データD1を受け、イントラ符号化においては、イントラ予測回路5で生成される予測値との差分データD2を生成して出力するのに対し、インター符号化においては、動き予測・補償回路6で生成される予測値との差分データD2を生成して出力する。直交変換回路7は、減算回路4の出力データD2を入力し、離散コサイン変換、カルーネン・レーベ変換等の直交変換処理を実行し、その処理結果による変換係数データD3を出力する。
The
量子化回路8は、レート制御回路9のレート制御による量子化スケールにより、この変換係数データD3を量子化して出力する。可逆符号化回路10は、この量子化回路8の出力データを可変長符号化、算術符号化等により可逆符号化処理して出力する。また可逆符号化回路10は、イントラ符号化に係るイントラ予測モードに関する情報、インター符号化に係る動きベクトルに関する情報等をイントラ予測回路5、動き予測・補償回路6から取得し、これらの情報を出力データD4のヘッダ情報に設定して出力する。
The
蓄積バッファ11は、この可逆符号化回路10の出力データD4を蓄積して続く伝送路の伝送速度により出力する。レート制御回路9は、この蓄積バッファ11の空き容量の監視により符号化処理による発生符号量を監視すると共に、この監視結果により量子化回路8における量子化スケールを切り換え、これによりこの符号化装置1による発生符号量を制御する。
The
逆量子化回路13は、量子化回路8の出力データを逆量子化処理し、これにより量子化回路8の入力データを再生する。逆直交変換回路14は、逆量子化回路13の出力データを逆直交変換処理し、これにより直交変換回路7の入力データを再生する。デブロックフィルタ15は、この逆直交変換回路14の出力データよりブロック歪を除去して出力する。フレームメモリ16は、このデブロックフィルタ15の出力データに、適宜、イントラ予測回路5又は動き予測・補償回路6により生成される予測値を加算して参照画像情報として記録する。
The
しかして動き予測・補償回路6は、インター符号化において、このフレームメモリ16に保持された参照画像情報による予測フレームより画面並べ替えバッファ3から出力される画像データの動きベクトルを検出し、またこの検出した動きベクトルによりフレームメモリ16に保持した参照画像情報を動き補償して予測画像情報を生成し、この予測画像情報による予測値を減算回路4に出力する。
Therefore, the motion prediction /
イントラ予測回路5は、イントラ符号化において、フレームメモリ16に蓄積された参照画像情報に基づいてイントラ予測モードを判定し、この判定結果により参照画像情報から予測画像情報の予測値を生成して減算回路4に出力する。
In the intra coding, the
これらによりこの符号化方式においては、インター符号化とイントラ符号化とでそれぞれインター予測に係る動き補償による差分データD2とイントラ予測による差分データD2とを生成し、これらの差分データD2を直交変換処理、量子化処理、可変長符号化処理して伝送する。 Accordingly, in this encoding method, difference data D2 by motion compensation related to inter prediction and difference data D2 by intra prediction are generated by inter encoding and intra encoding, respectively, and the difference data D2 is subjected to orthogonal transform processing. , Quantization processing, variable length coding processing, and transmission.
図4は、このようにして符号化処理された符号化データD4を復号化処理する復号化装置を示すブロック図である。この復号化装置20において、蓄積バッファ21は、伝送路を介して入力される符号化データD4を一時蓄積して出力する。可逆復号化回路22は、この蓄積バッファ21の出力データを可変長復号化、算術復号化等により復号化処理し、符号化装置1における可逆符号化回路10の入力データを再生する。またこのときこの出力データがイントラ符号化されたものである場合、ヘッダに格納されたイントラ予測モードの情報を復号化してイントラ予測回路23に伝送するのに対し、この出力データがインター符号化されたものである場合、ヘッダに格納された動きベクトルに関する情報を復号して動き予測・補償回路24へ転送する。
FIG. 4 is a block diagram showing a decoding apparatus that decodes the encoded data D4 encoded in this way. In the
逆量子化回路25は、可逆復号化回路22の出力データを逆量子化処理し、これにより符号化装置1の量子化回路8に入力される変換係数データD3を再生する。逆直交変換回路26は、この逆量子化回路25から出力される変換係数データを受け、4次の逆直交変換処理を実行し、これにより符号化装置1の直交変換回路7に入力される差分データD2を再生する。
The
加算器27は、逆直交変換回路26から出力される差分データD2を受け、イントラ符号化において、イントラ予測回路23で生成される予測画像による予測値を加算して出力するのに対し、インター符号化において、動き予測・補償回路24から出力される予測画像による予測値を加算して出力する。これにより加算器27は、符号化装置1における減算回路4の入力データを再生する。
The
デブロックフィルタ28は、この加算器27の出力データよりブロック歪を除去して出力し、画面並べ替えバッファ29は、このデブロックフィルタ28から出力される画像データのフレームをGOP構造に応じて並べ替えて出力する。ディジタルアナログ変換回路(D/A)30は、この画面並べ替えバッファ29の出力データをディジタルアナログ変換処理して出力する。
The
フレームメモリ31は、デブロックフィルタ28の出力データを参照画像情報として記録して保持する。動き予測・補償回路24は、インター符号化において、可逆復号化回路22から通知される動きベクトルの情報によりフレームメモリ31に保持された参照画像情報を動き補償して予測画像による予測値を生成し、この予測値を加算器27に出力する。またイントラ予測回路23は、イントラ符号化において、可逆復号化回路22から通知されるイントラ予測モードによりフレームメモリ31に保持された参照画像情報より予測画像による予測値を生成し、この予測値を加算器27に出力する。
The
しかしてこのような一連の処理によるAVCの符号化処理においては、図5に示すように、1つのマクロブロックが、輝度信号Yでは16×16画素により形成されるのに対し、色差信号Cr、Cbでは8×8画素により形成され、それぞれマクロブロックを単位にして処理される。すなわちこれらマクロブロックは、数字0〜25により示す4×4画素による小ブロックに分割され、各小ブロック毎に、差分データD2が直交変換処理、量子化処理される。
In the AVC encoding process by such a series of processes, as shown in FIG. 5, one macro block is formed by 16 × 16 pixels in the luminance signal Y, whereas the color difference signals Cr, Cb is formed by 8 × 8 pixels, and each macroblock is processed as a unit. That is, these macroblocks are divided into small blocks of 4 × 4 pixels indicated by
この処理において、色差信号Cr、Cbは、直交変換処理による係数から直流成分がマクロブロック毎に集められて2×2マトリックスが形成され、この2×2マトリックスが2次のアダマール変換処理の後、量子化処理される。また後述するイントラ16×16予測モードによる場合、輝度信号Yは、直交変換処理による係数から直流成分がマクロブロック毎に集められて4×4マトリックスが形成され、この4×4マトリックスが4次のアダマール変換処理後、量子化処理される。 In this process, the chrominance signals Cr and Cb are obtained by collecting DC components for each macroblock from the coefficients obtained by the orthogonal transform process to form a 2 × 2 matrix, and this 2 × 2 matrix is subjected to the second-order Hadamard transform process. Quantized. In addition, in the case of the intra 16 × 16 prediction mode described later, the luminance signal Y is obtained by collecting DC components for each macroblock from coefficients obtained by orthogonal transform processing to form a 4 × 4 matrix. After Hadamard transform processing, quantization processing is performed.
しかしてこのような符号化処理に係るイントラ符号化は、輝度信号の処理に関して、イントラ4×4予測モードとイントラ16×16予測モードとが用意されている。ここでAVCでは上述したように4×4画素のブロック単位で差分データD2を直交変換処理し、イントラ4×4予測モードは、この直交変換処理のブロック単位で、イントラ予測に係る予測値を生成するモードである。これに対してイントラ16×16予測モードは、この直交変換処理のブロックの複数個を単位にしてイントラ予測に係る予測値を生成するモードであり、この複数個が水平方向及び垂直方向にそれぞれ4個に設定される。
For intra coding related to such coding processing, an
このうちイントラ4×4予測モードでは、図6に示すように、予測値を生成する4×4画素a〜pによるブロックに対して、近傍13個の画素A〜Mの一部が予測値の生成に供する予測画素に設定され、この予測画素より予測値が生成される。なおここでこの13個の画素A〜Mは、このブロックの走査開始端側、垂直方向に隣接する4個の画素A〜Dと、この4個の画素A〜Dの走査終了端側の画素Dに続く4個の画素E〜Fと、このブロックの走査開始端側、水平方向に隣接する4個の画素I〜Lと、この水平方向に隣接する4個の画素I〜Lのうちの走査開始端側の画素Iの上方に位置する画素Mとにより形成される。
Among them, in the
イントラ4×4予測モードでは、これら13個の予測画素A〜Mと、予測値の生成に供する4×4個の画素a〜pとの相対的な関係により、図7及び図8に示すように、モード0〜モード8の予測モードが定義されている。すなわち図6に示すように、例えばモード0及び1では、予測値の生成に使用する13個の予測画素A〜Mのうち、それぞれ垂直方向及び水平方向に隣接する予測画素A〜D及びI〜Lにより予測値を生成する。
In the
より具体的には、図9(A)において矢印により示すように、モード0は、垂直方向に隣接する予測画素A〜Dより予測値を生成するモードであり、次式により示すように、予測値を生成する4×4個の画素a〜pのうち、垂直方向に連続する1列目の画素a、e、i、mは、その上方向の画素Aが予測画素に設定される。また続く2列目の画素b、f、j、nは、その上方向の画素Bが予測画素に設定され、続く3列目及び4列目の画素c、g、k、o及びd、h、l、pは、それぞれ上方の画素C及びDが予測画素に設定され、これら予測画素A〜Dの画素値がそれぞれ対応する画素a〜pの予測値に設定される。なおモード0は、このモードにおける予測画素A〜Dが有意である場合にのみ適用される。
More specifically, as indicated by an arrow in FIG. 9A,
また図9(B)に示すように、モード1は、水平方向に隣接する予測画素I〜Lより予測値を生成するモードであり、次式により示すように、予測値を生成する4×4個の画素a〜pのうち、水平方向に連続する1ラインの画素a〜dは、その左方の画素Iが予測画素に設定される。また続く2ライン目の画素e〜hは、その左方の画素Jが予測画素に設定され、続く3ライン目及び4ライン目の画素i〜l及びm〜pは、それぞれ左方の画素K及びLが予測画素に設定され、これら予測画素I〜Lの画素値がそれぞれ対応する画素a〜pの予測値に設定される。なおモード1は、このモードにおける予測画素I〜Lが有意である場合にのみ適用される。
As shown in FIG. 9B,
これに対してモード2は、図9(C)に示すように、13個の予測画素A〜Mのうち、このブロックの垂直方向及び水平方向に隣接する画素A〜D及びI〜Lより予測値を生成するモードであり、これらの画素A〜D及びI〜Lが全て有意な場合に、次式により各画素a〜pの予測値が生成される。
On the other hand,
なおモード2においては、画素A〜Dが全て有意でない場合、予測値は、(4)式により生成され、画素I〜Lが全て有意でない場合、予測値は、(5)式により生成され、画素A〜D及びI〜Lが全て有意でない場合、予測値は値128に設定される。
In
これに対してモード3は、図9(D)に示すように、13個の予測画素A〜Mのうち、水平方向に連続する画素A〜Hより予測値を生成するモードであり、これらの画素A〜Hのうちの画素A〜Dと画素I〜Mとが全て有意な場合にのみ適用されて、次式により各画素a〜pの予測値が生成される。
On the other hand, as shown in FIG. 9D,
これに対してモード4は、図9(E)に示すように、13個の予測画素A〜Mのうち、4×4個の画素a〜pによるブロックに隣接する画素A〜D、I〜Mにより予測値を生成するモードであり、これらの画素A〜D、I〜Mが全て有意な場合にのみ適用されて、次式により各画素a〜pの予測値が生成される。
On the other hand, in the
これに対してモード5は、図9(F)に示すように、13個の予測画素A〜Mのうち、4×4個の画素a〜pによるブロックに隣接する画素A〜D、I〜K、Mとにより予測値を生成するモードであり、予測画素A〜D、I〜Mが全て有意な場合にのみ適用されて、次式により各画素a〜pの予測値が生成される。
On the other hand, in the
これに対してモード6は、図9(G)に示すように、13個の予測画素A〜Mのうち、4×4個の画素a〜pによるブロックに隣接する画素A〜C、I〜Mとにより予測値を生成するモードであり、予測画素A〜D、I〜Mが全て有意な場合にのみ適用されて、次式により各画素a〜pの予測値が生成される。
On the other hand, in the
これに対してモード7は、図9(H)に示すように、13個の予測画素A〜Mのうち、4×4個の画素a〜pによるブロックの上方に隣接する4個の画素A〜Dと、この4個の画素A〜Dに続く4個の画素E〜Gとにより予測値を生成するモードであり、これらのうちの画素A〜D及び画素I〜Mが全て有意な場合にのみ適用されて、次式により各画素a〜pの予測値が生成される。
On the other hand, in the
これに対してモード8は、図9(I)に示すように、13個の予測画素A〜Mのうち、4×4個の画素によるブロックの左方に隣接する4個の画素I〜Lにより予測値を生成するモードであり、画素A〜D及び画素I〜Mが全て有意な場合にのみ適用されて、次式により各画素a〜pの予測値が生成される。
On the other hand, in the
このようなAVCは、イントラ4×4予測モードによる符号化処理においては、ラスタ走査の順序による処理を有効に利用して予測モードを伝送対象に通知する。すなわち4×4予測モードによりイントラ符号化する場合において、図10に示すように、処理対象であるブロックCの予測モードIntra 4x4 pred mode Cに対して、水平方向及び垂直方向に処理を完了している隣接ブロックA及びBの予測モードIntra 4x4 pred mode A及びIntra 4x4 pred mode Bは、高い相関を有する。これによりこれら隣接ブロックA及びBの予測モードIntra 4x4 pred mode A及びIntra 4x4 pred mode Bを用いて、次式により、最も可能性の高い予測モードMost Probable Modeを定義する。なおこの(12)式におけるminの判定は、これら予測モードの伝送に供するコードmode numberにより実行し、コードmode number の値の小さい側の予測モードを最も可能性の高い予測モードMost Probable Modeに設定する。
In such an AVC, in the encoding process using the
またビットストリーム中に、この4×4画素によるブロックに係るパラメータとして、予測モードの伝送の有無を示すフラグprev intra 4x4 pred mode flag[luma 4x4 BlkIdx]と、予測モード rem intra 4x4 pred mode[luma 4x4 BlkIdx] とが定義され、復号側は、C言語の記述により図11に示すようにこれら2つのパラメータを処理して、処理対象であるブロックCの予測モードIntra 4x4 pred mode Cを検出する。なおここで[luma 4x4
BlkIdx] は、輝度データに係る対象ブロックを特定するブロック番号である。
In addition, in the bitstream, as a parameter relating to the block of 4 × 4 pixels, a flag prev intra 4x4 pred mode flag [luma 4x4 BlkIdx] indicating whether or not the prediction mode is transmitted and a prediction mode rem intra 4x4 pred mode [luma 4x4 BlkIdx] is defined, and the decoding side processes these two parameters according to the description in C language as shown in FIG. 11 to detect the prediction mode Intra 4x4 pred mode C of the block C to be processed. Here [luma 4x4
BlkIdx] is a block number that identifies a target block related to luminance data.
すなわちこの場合、予測モードの伝送の有無を示すフラグprev intra 4x4 pred mode flag[luma 4x4BlkIdx]が設定されている場合、隣接ブロックA及びBの予測モードIntra 4x4 pred mode A及びIntra 4x4 pred mode Bを用いて(12)式により復号側で検出される最も可能性の高い予測モードMost Probable Modeを処理対象であるブロックCの予測モードに設定する。またこのフラグprev intra 4x4 pred mode flag[luma 4x4 BlkIdx]が設定されていない場合にあって、最も可能性の高い予測モードMost Probable Modeより伝送された予測モード rem intra 4x4 pred mode[luma 4x4 BlkIdx] のコードmode number が小さい場合、伝送された予測モード rem intra 4x4 pred mode[luma 4x4 BlkIdx] を処理対象ブロックCの予測モードに設定する。またフラグprev intra 4x4 pred mode flag[luma4x4 BlkIdx] が設定されていない場合にあって、最も可能性の高い予測モードMost Probable Modeより伝送された予測モード rem intra 4x4 pred mode[luma 4x4 BlkIdx] のコードmode number が小さくない場合、伝送された予測モード rem intra 4x4 pred mode[luma 4x4 BlkIdx] のコードmode number に値1を加算したコードmode number の予測モードを処理対象ブロックCの予測モードに設定する。
That is, in this case, when the flag prev intra 4x4 pred mode flag [luma 4x4BlkIdx] indicating whether or not the prediction mode is transmitted is set, the prediction modes Intra 4x4 pred mode A and Intra 4x4 pred mode B of the adjacent blocks A and B are set. By using the equation (12), the most probable prediction mode Most Probable Mode detected on the decoding side is set as the prediction mode of the block C to be processed. Also, when this flag prev intra 4x4 pred mode flag [luma 4x4 BlkIdx] is not set, the prediction mode transmitted from the most probable prediction mode Most Probable Mode rem intra 4x4 pred mode [luma 4x4 BlkIdx] When the code mode number of is smaller, the transmitted prediction mode rem intra 4x4 pred mode [luma 4x4 BlkIdx] is set as the prediction mode of the processing target block C. Also, when the flag prev intra 4x4 pred mode flag [luma4x4 BlkIdx] is not set, the prediction mode transmitted from the most probable prediction mode Most Probable Mode rem intra 4x4 pred mode [luma 4x4 BlkIdx] code If the mode number is not small, the prediction mode of the code mode number obtained by adding the
これらにより符号化装置1は、最も可能性の高い予測モードMost Probable Modeが処理対象ブロックCの予測モードと一致する場合、予測モードの伝送の有無を示すフラグprev intra 4x4 pred mode flag[luma 4x4 BlkIdx]を設定して、予測モード rem intra 4x4 pred mode[luma 4x4 BlkIdx] の伝送を中止し、伝送に供するデータ量を削減する。
Accordingly, when the most probable prediction mode Most Probable Mode matches the prediction mode of the processing target block C, the
これに対してイントラ16×16予測モードでは、図12に示すように、予測値を生成する16×16個の画素P(0,15)〜P(15,15)によるブロックBに対して、このブロックを構成する画素P(0,15)〜P(15,15)と、このブロックBの上方及び左方に隣接する画素P(0,−1)〜P(15,−1)及びP(−1,0)〜P(−1,15)が予測画素に設定され、これらの予測画素により予測値が生成される。 On the other hand, in the intra 16 × 16 prediction mode, as shown in FIG. 12, for a block B made up of 16 × 16 pixels P (0, 15) to P (15, 15) for generating a prediction value, Pixels P (0,15) to P (15,15) constituting this block, and pixels P (0, -1) to P (15, -1) and P adjacent above and to the left of this block B (-1, 0) to P (-1, 15) are set as prediction pixels, and a prediction value is generated by these prediction pixels.
イントラ16×16予測モードでは、図13に示すように、モード0〜モード3の予測モードが定義され、このうちモード0は、処理対象ブロックBの上方に隣接する画素P(0,−1)〜P(15,−1)(P(x,−1);x,y=−1〜15)が有意な場合にのみ適用されて、次式により示すように、ブロックBを構成する各画素P(0,15)〜P(15,15)の予測値が生成される。これにより図14(A)に示すように、ブロックBに隣接する各画素P(0,−1)〜P(15,−1)の画素値によりブロックBの垂直方向に連続する各画素の予測値が生成される。
In the intra 16 × 16 prediction mode, as shown in FIG. 13, prediction modes of
これに対してモード1は、ブロックBの左方に隣接する画素P(−1,0)〜P(−1,15)(P(−1,y);x,y=−1〜15)が有意な場合にのみ適用されて、次式により示すように、ブロックBを構成する各画素P(0,15)〜P(15,15)の予測値が生成され、これにより図14(B)に示すように、ブロックBに隣接する各画素P(−1,0)〜P(−1,15)の画素値によりブロックBの水平方向に連続する各画素の予測値が生成される。
On the other hand, in the
これに対してモード2は、ブロックBの上方及び左方に隣接する画素P(0,−1)〜P(15,−1)及びP(−1,0)〜P(−1,15)が全て有意な場合には、次式により予測値が求められ、これにより図14(C)に示すように、これらの画素P(0,−1)〜P(15,−1)及びP(−1,0)〜P(−1,15)による画素値の平均値によりブロックBを構成する各画素の予測値が生成される。
On the other hand, in the
なおモード2においては、これらブロックBの上方及び左方に隣接する画素P(0,−1)〜P(15,−1)及びP(−1,0)〜P(−1,15)のうち、上方に隣接する画素P(−1,0)〜P(−1,15)が有意でない場合、(16)式が適用されて有意な側の隣接画素の平均値により各画素の予測値が生成される。また左方に隣接する画素P(−1,0)〜P(−1,15)が有意でない場合、(17)式が適用され、この場合も有意な側の隣接画素の平均値によりブロックBを構成する各画素の予測値が生成される。またブロックBの上方及び左方に隣接する画素P(0,−1)〜P(15,−1)及びP(−1,0)〜P(−1,15)の全てが有意でない場合、値128に予測値が設定される。
In
これに対してモード3は、ブロックBの上方及び左方に隣接する画素P(0,−1)〜P(15,−1)及びP(−1,0)〜P(−1,15)が全て有意な場合にのみ適用され、次式により予測値が求められ、これにより図14(D)に示すように、斜め方向の演算処理により各画素の予測値が生成される。
On the other hand, in the
このような輝度信号に係る各種のイントラ予測モードに対して、色差信号は、輝度信号におけるイントラ16×16予測モードと同様に予測モードが設定される。但し、イントラ16×16予測モードが16×16画素のマクロブロックが処理対象であるのに対し、色差信号に対するイントラ予測モードは8×8画素のマクロブロックが処理対象であり、また図15に示すように、輝度信号の場合に比して、モード番号と対応する予測モードとが異なる。また輝度信号と色差信号とでは、予測モードがそれぞれ独立に設定される。 For various intra prediction modes related to such a luminance signal, the prediction mode is set for the color difference signal in the same manner as the intra 16 × 16 prediction mode for the luminance signal. However, while the intra 16 × 16 prediction mode is a macro block of 16 × 16 pixels, the intra prediction mode for the color difference signal is a macro block of 8 × 8 pixels, and is shown in FIG. As described above, the mode number and the corresponding prediction mode are different from those in the case of the luminance signal. The prediction mode is set independently for the luminance signal and the color difference signal.
すなわちモード0においては、画素P(x,−1)及び画素P(−1,y)が有意な場合に、次式により予測値が生成される。
That is, in
なお画素P(−1,y)が有意でない場合、(20)式により、画素P(x,−1)が有意でない場合、(21)式により予測値が生成される。 When the pixel P (−1, y) is not significant, the predicted value is generated according to the equation (21) when the pixel P (x, −1) is not significant according to the equation (20).
またモード1においては、画素P(−1,y)が有意な場合にのみ適用されて、次式により予測値が生成される。
In
またモード2においては、P(x,−1)が有意な場合にのみ適用されて、次式により予測値が生成される。
In
またモード3においては、画素P(x,−1)及び画素P(−1,y)が有意な場合に、次式により予測値が生成される。
In
これに対してインター符号化においては、Multiple Reference Frames により、図16に示すように、処理対象のフレームOrgに対して、複数の参照フレームRefの何れかを選択して動き補償できるように設定され、これにより直前のフレームにおいて動き補償のブロックに対応する部位が隠れている場合、さらにはフラッシュ等により直前のフレームで一時的に全体の画素値が変動した場合等にあっても、高い精度により動き補償してデータ圧縮効率を向上する。 On the other hand, in inter coding, multiple reference frames are set so that motion compensation can be performed by selecting any of a plurality of reference frames Ref for the processing target frame Org as shown in FIG. Thus, even when the part corresponding to the motion compensation block is hidden in the immediately preceding frame, or even when the entire pixel value temporarily changes in the immediately preceding frame due to flash or the like, it is possible to achieve high accuracy. Data compensation efficiency is improved by motion compensation.
また動き補償に係るブロックにおいては、図17(A1)に示すように、16画素×16画素によるブロックを基準にして動き補償するようになされているものの、variable
MC Block Sizeによりtree-structured motion compensation がサポートされており、これにより図17(A2)〜(A4)に示すように、16画素×16画素によるブロックを水平方向及び又は垂直方向に2分割して、16画素×8画素、8画素×16画素、8画素×8画素によるサブマクロブロックによりそれぞれ独立に動きベクトル、参照フレームを設定して動き補償できるように設定されている。また8画素×8画素によるサブマクロブロックについては、図17(B1)〜(B4)に示すように、8画素×8画素、8画素×4画素、4画素×8画素、4画素×4画素によるサブマクロブロックにさらに分割して、それぞれ独立に動きベクトル、参照フレームを設定して動き補償できるように設定されている。
In the block relating to motion compensation, as shown in FIG. 17A1, motion compensation is performed with reference to a block of 16 pixels × 16 pixels.
MC-block size supports tree-structured motion compensation. As shown in FIGS. 17 (A2) to (A4), a block of 16 pixels × 16 pixels is divided into two in the horizontal direction and / or the vertical direction. , 16 pixels × 8 pixels, 8 pixels × 16 pixels, and 8 pixels × 8 pixels are set so that motion compensation can be performed by setting a motion vector and a reference frame independently. In addition, as shown in FIGS. 17B1 to 17B4, the sub-macro block having 8 pixels × 8 pixels has 8 pixels × 8 pixels, 8 pixels × 4 pixels, 4 pixels × 8 pixels, 4 pixels × 4 pixels. Are further divided into sub-macroblocks, and motion vectors and reference frames are set independently so that motion compensation can be performed.
また動き補償においては、6タップのFIRフィルタを用いて1/4画素精度により動き補償できるように設定されている。これにより図18において、符号Aにより1画素精度の画素値、符号b〜dにより1/2画素精度の画素値、符号e1〜e3により1/4画素精度の画素値を示すように、動き予測・補償回路6は、6タップのFIRフィルタの各タップ入力を値1、−5、20、20、−5、1により重み付けして次式の演算処理を実行することにより、水平方向又は垂直方向の連続する画素間に1/2画素精度による画素値b又はdを計算する。
The motion compensation is set such that motion compensation can be performed with a 1/4 pixel accuracy using a 6-tap FIR filter. Accordingly, in FIG. 18, motion prediction is performed so that a pixel value of 1 pixel accuracy is indicated by the symbol A, a pixel value of 1/2 pixel accuracy is indicated by the symbols b to d, and a pixel value of 1/4 pixel accuracy is indicated by the symbols e1 to e3. The
またこのようにして計算した1/2画素精度による画素値b又はdを用いて、6タップのFIRフィルタの各タップ入力を値1、−5、20、20、−5、1により重み付けして次式の演算処理を実行することにより、水平方向及び垂直方向の連続する画素間の1/2画素精度による画素値cを計算する。
Also, using the pixel value b or d with 1/2 pixel accuracy calculated in this way, each tap input of the 6-tap FIR filter is weighted by the
またこのようにして計算した1/2画素精度による画素値b〜dを用いて、直線補間による次式の演算処理を実行することにより、1/4画素精度による画素値e1〜e3を計算する。なおこの(25)式及び(26)式の重み付け加算に係る正規化の処理においては、垂直方向及び水平方向の全ての補間処理が完了して実行される。 Further, the pixel values e1 to e3 with the ¼ pixel accuracy are calculated by executing the following arithmetic processing by linear interpolation using the pixel values b to d with the ½ pixel accuracy calculated in this way. . Note that in the normalization processing related to the weighted addition of the equations (25) and (26), all the interpolation processes in the vertical direction and the horizontal direction are completed and executed.
このような輝度信号に対する動き補償の処理に対して、色差信号に対する動き補償は、線型補間により実行される。すなわち図19に示すように、画素ピッチsによる隣接画素A〜Dに対して、水平方向及び垂直方向にそれぞれ内分比dx、s−dx及びdy、s−dyに係るサンプリング点に設定される画素値νは、次式により表される。 In contrast to such motion compensation processing for luminance signals, motion compensation for color difference signals is executed by linear interpolation. That is, as shown in FIG. 19, the adjacent pixels A to D with the pixel pitch s are set to sampling points with internal division ratios dx, s-dx, dy, and s-dy in the horizontal and vertical directions, respectively. The pixel value ν is expressed by the following equation.
AVCでは、このようなインター予測に係る符号化の情報である動きベクトルついても、連続するマクロブロック、サブマクロブロック間の相関を有効に利用してデータ伝送量を低減する。すなわちAVC符号化においては、1つのマクロブロックを複数のサブマクロブロックに分割してそれぞれ動き補償することも可能であることにより、動きベクトルの伝送に供する符号量が増大する。このためブロック毎にそれぞれ水平方向成分及び垂直方向成分について動きベクトル予測値pmv を生成し、この動きベクトル予測値pmv と実際の動きベクトルmvとの間で次式により表される演算処理による計算される差分値の動きベクトル情報MVD(Motion Vector Data)を符号化して伝送する。 In AVC, even for a motion vector that is coding information related to such inter prediction, the data transmission amount is reduced by effectively using the correlation between successive macroblocks and sub-macroblocks. That is, in AVC coding, one macroblock can be divided into a plurality of sub-macroblocks and motion compensation can be performed, thereby increasing the amount of code used for motion vector transmission. Therefore, a motion vector prediction value pmv is generated for each horizontal component and vertical component for each block, and the motion vector prediction value pmv and the actual motion vector mv are calculated by the arithmetic processing represented by the following equation. The difference vector motion vector information MVD (Motion Vector Data) is encoded and transmitted.
但し、図20(A)に示すように、動きベクトルmvに係るブロックが、1つのマクロブロックを水平方向に2分割して形成される2つのサブマクロブロックうちの右側のサブマクロブロックCの場合であって、動きベクトル予測値mvの検出に係る参照フレームrefIdxE が、残る左側に隣接するサブマクロブロックAの参照フレームrefIdxAと等しい場合、次式により示すように、この左側に隣接するサブマクロブロックAで検出された動きベクトルmvA を動きベクトル予測値pmv に設定する。 However, as shown in FIG. 20A, the block related to the motion vector mv is the right sub-macroblock C of the two sub-macroblocks formed by dividing one macroblock into two in the horizontal direction. If the reference frame refIdxE related to the detection of the motion vector prediction value mv is equal to the reference frame refIdxA of the remaining left submacroblock A, the submacroblock adjacent to the left side as shown by the following equation The motion vector mvA detected in A is set as the motion vector prediction value pmv.
またこれとは逆に、動きベクトルmvに係るブロックが、左側のサブマクロブロックAの場合であって、動きベクトル予測値mvの検出に係る参照フレームrefIdxE が、残る右側に隣接するサブマクロブロックCの参照フレームrefIdxC と等しい場合、次式により示すように、この右側に隣接するサブマクロブロックCで検出された動きベクトルmvC を動きベクトル予測値pmv に設定する。 On the other hand, when the block related to the motion vector mv is the left sub-macroblock A, the reference frame refIdxE related to the detection of the motion vector prediction value mv is adjacent to the remaining left sub-macroblock C. If it is equal to the reference frame refIdxC, the motion vector mvC detected in the sub-macroblock C adjacent to the right side is set to the motion vector prediction value pmv as shown by the following equation.
また図20(B)に示すように、動きベクトルmvに係るブロックが、1つのマクロブロックを垂直方向に2分割して形成される2つのサブマクロブロックうちの上側のサブマクロブロックCの場合であって、動きベクトル予測値mvの検出に係る参照フレームrefIdxE が、残る下側に隣接するサブマクロブロックBの参照フレームrefIdxA と等しい場合、次式により示すように、この下側に隣接するサブマクロブロックBで検出された動きベクトルmvB を動きベクトル予測値pmv に設定する。 Further, as shown in FIG. 20B, the block related to the motion vector mv is an upper sub-macroblock C of two sub-macroblocks formed by dividing one macroblock into two in the vertical direction. When the reference frame refIdxE related to the detection of the motion vector prediction value mv is equal to the reference frame refIdxA of the remaining lower submacroblock B, as shown by the following equation, The motion vector mvB detected in the block B is set to the motion vector prediction value pmv.
またこれとは逆に、動きベクトルmvに係るブロックが、下側のサブマクロブロックBの場合であって、動きベクトル予測値mvの検出に係る参照フレームrefIdxE が、残る上側に隣接するサブマクロブロックAの参照フレームrefIdxA と等しい場合、次式により示すように、この下側に隣接するサブマクロブロックAで検出された動きベクトルmvA を動きベクトル予測値pmv に設定する。 On the contrary, when the block related to the motion vector mv is the lower sub-macroblock B, the reference frame refIdxE related to the detection of the motion vector prediction value mv is the remaining adjacent sub-macroblock. When equal to the reference frame refIdxA of A, as shown by the following equation, the motion vector mvA detected in the sub macroblock A adjacent on the lower side is set to the motion vector prediction value pmv.
またこれら以外の場合にあっては、図21(A)に示すように、動き補正に係るブロックEに対して、隣接するブロックで検出される動きベクトルにより動きベクトルの予測値pmv を生成する。なおここでこの隣接するブロックは、ラスタ走査順序による水平方向の走査開始側に隣接するブロックA、ラスタ走査の順序により垂直方向の走査開始側に隣接するブロックB、このブロックの左右のブロックC、Dである。なおこれら隣接するブロックによる動きベクトルの予測値pmvは、図21(B)に示すように、この隣接するブロックに属するサブマクロブロックで検出される動きベクトルにも適用される。 In other cases, as shown in FIG. 21A, a motion vector prediction value pmv is generated from a motion vector detected in an adjacent block for a block E related to motion correction. Here, this adjacent block includes a block A adjacent to the horizontal scanning start side according to the raster scanning order, a block B adjacent to the vertical scanning start side according to the raster scanning order, and left and right blocks C of this block, D. Note that the motion vector prediction value pmv by these adjacent blocks is also applied to the motion vector detected by the sub-macroblock belonging to this adjacent block, as shown in FIG.
具体的に、各隣接ブロックの検出に係る参照フレームインデックスrefIdxA 、refIdxB 、refIdxC の値により、動き補正に係るブロックEとの間で参照フレームが一致する隣接ブロックが存在する場合、次式により、この参照フレームが一致してなる隣接ブロック(N=A or B or C )による動きベクトルmvN を動きベクトル予測値pmv に設定する。 Specifically, when there is an adjacent block whose reference frame matches with the block E related to motion correction based on the values of the reference frame indexes refIdxA, refIdxB, and refIdxC related to detection of each adjacent block, A motion vector mvN by an adjacent block (N = A or B or C) having a matching reference frame is set as a motion vector prediction value pmv.
またこれ以外の場合には、垂直方向及び水平方向の各成分について、次式により、メディアンフィルタによる処理結果による成分を動きベクトル予測値pmv の各成分に設定する。 In other cases, for each component in the vertical direction and the horizontal direction, the component based on the processing result by the median filter is set as each component of the motion vector prediction value pmv by the following equation.
但し、垂直方向に隣接するブロックB、又はこのブロックBに続くブロックCの何れかが有意でない場合であって、水平方向に隣接するブロックAが有意である場合、これら垂直方向に係る隣接ブロックB及びCの動きベクトルmv及び参照フレームインデックスrefIdxは、次式により示すように、ブロックAによる動きベクトルmvA 及び参照フレームインデックスrefIdxA が代用される。 However, when either the block B adjacent in the vertical direction or the block C following the block B is not significant and the block A adjacent in the horizontal direction is significant, the adjacent block B in the vertical direction The motion vector mvA and the reference frame index refIdx of the block A are substituted for the motion vector mv and the reference frame index refIdx of C and C, as shown by the following equation.
なおAVCでは、Bピクチャにおいて、テンポラル(時間)ダイレクトモードと、スペーシャル(空間)ダイレクトモードとによるダイレクトモードが設けられており、このダイレクトモードでは動きベクトルに関する情報の伝送を中止して符号化効率を向上する。 In the AVC, the B picture has a direct mode of a temporal (temporal) direct mode and a spatial (spatial) direct mode. In this direct mode, transmission of information on motion vectors is stopped to improve encoding efficiency. improves.
すなわちスペーシャルダイレクトモードでは、予測ベクトルpmv を動きベクトルに設定して復号化処理を実行する。これに対してテンポラルダイレクトモードは、動きが線形であると仮定して、図22に示すように、符号化処理を完了した予測フレームL1の対応するブロック(Co−Located Block)の動きベクトルmvcol を用いた線型補間により、処理対象のBピクチャに係る動きベクトルMVl0及びMVl1を作成するものである。なお、AVC画像圧縮情報においては、これらピクチャL0、L1との間の時間情報に係るパラメータTDが存在しないことにより、これに代えてPOC (Picture Order Count) が用いられる。 That is, in the spatial direct mode, the decoding process is executed with the prediction vector pmv set as a motion vector. On the other hand, in the temporal direct mode, assuming that the motion is linear, as shown in FIG. 22, the motion vector mvcol of the corresponding block (Co-Located Block) of the prediction frame L1 that has completed the encoding process is obtained. by linear interpolation using, is to create a motion vector MV l0 and MV l1 according to B-picture to be processed. In the AVC image compression information, since the parameter TD relating to the time information between these pictures L0 and L1 does not exist, POC (Picture Order Count) is used instead.
AVCは、これらイントラ及びインター予測に係る予測モードに関して、AVCに係るJoint Model(AVC参照符号化方式)により、マルチパスエンコードを前提としたHigh Complexity Modeと、1パスエンコードを前提としたLow Complexity Modeとが定義されており、これらの定義に従って最適なモードを選択して符号化処理を実行する。またこれらのモードのうち、Low Complexity Modeでは、符号化効率を示すコスト関数を次式により定義し、このコスト関数により得られるコスト値Cost(Mode)の比較により最適モードを検出する。 With respect to the prediction modes related to intra and inter prediction, AVC uses High Model Mode assuming multi-pass encoding and Low Complexity Mode assuming one-pass encoding by the Joint Model (AVC reference encoding method) related to AVC. Are defined, and an optimum mode is selected according to these definitions, and the encoding process is executed. Of these modes, in Low Complexity Mode, a cost function indicating encoding efficiency is defined by the following equation, and an optimal mode is detected by comparing cost values Cost (Mode) obtained by the cost function.
ここでSA(T)Dは、原画像と予測画像との誤差値であり、これら原画像と予測画像との間の、画素値差分値の絶対値誤差和が適用される。またSA(T)D0は、ヘッダビット、モード判定の際の重みとなるコストであり、誤差値SA(T)Dに与えられるオフセット値であり、動きベクトル等の付加的な情報の伝送に供するデータ量が示される。 Here, SA (T) D is an error value between the original image and the predicted image, and an absolute value error sum of pixel value difference values between the original image and the predicted image is applied. SA (T) D0 is a header bit and a cost as a weight for mode determination, an offset value given to the error value SA (T) D, and is used for transmission of additional information such as a motion vector. The amount of data is shown.
具体的に絶対値誤差和SADは、各マクロブロックについて、次式により示され、それぞれ各予測モードModeにおける原画像と予測画像の差分値が適用される。 Specifically, the absolute value error sum SAD is expressed by the following equation for each macroblock, and the difference value between the original image and the predicted image in each prediction mode Mode is applied.
なおここでこの(38)式による絶対値誤差和SADに代えて、次式による得られる差分加算値SATD(Mode )を用いてもよい。 Here, instead of the absolute value error sum SAD according to the equation (38), a difference addition value SATD (Mode) obtained by the following equation may be used.
なおHadamard()は、次式により示すように、対象の行列にアダマール変換行列を掛けるアダマール変換操作である。なおアダマール変換行列は、(41)式により表され、HTは、アダマール変換行列の転置行列である。 Hadamard () is a Hadamard transform operation for multiplying the target matrix by a Hadamard transform matrix, as shown by the following equation. Note Hadamard transform matrix is expressed by equation (41), H T is a transposed matrix of the Hadamard transform matrix.
またオフセット値SA(T)D0は、前予測モードにおいては、次式により示される。なおここでQP0(QP)は、量子化パラメータQPを量子化スケールに変換する関数であり、MVDFWは、前予測に係る動きベクトルであり、Bit to code は、この動きベクトルに係るビットストリーム上の符号量である。 The offset value SA (T) D0 is represented by the following equation in the previous prediction mode. Here, QP0 (QP) is a function for converting the quantization parameter QP into a quantization scale, MFDFW is a motion vector related to the previous prediction, and Bit to code is a bit stream related to this motion vector. Code amount.
またオフセット値SA(T)D0は、後予測モードにおいては、次式により表される。なおここでMVDBWは、後予測に係る動きベクトルである。 The offset value SA (T) D0 is expressed by the following equation in the post-prediction mode. Here, MVDBW is a motion vector related to post prediction.
またオフセット値SA(T)D0は、 Bi-Predictive予測モードにおいては、次式により表される。なおここでBit to code forward Blk size、Bit to code backward Blk size は、それぞれ前予測及び後予測に係る動き補償ブロックに関する情報の伝送に必要なビットストリーム上における符号量である。 The offset value SA (T) D0 is expressed by the following equation in the Bi-Predictive prediction mode. Here, Bit to code forward Blk size and Bit to code backward Blk size are code amounts on the bitstream necessary for transmission of information related to the motion compensation block related to the forward prediction and backward prediction, respectively.
またダイレクトモードにおいては、オフセット値SA(T)D0は、次式により求められる。 In the direct mode, the offset value SA (T) D0 is obtained by the following equation.
またイントラ4×4予測モードでは、オフセット値SA(T)D0は、次式により求められる。
In the
因みに、このコスト関数にあっては、動きベクトルの探索にも適用され、次式により示すように、コスト値Costを最小にする動きベクトルが検出される。 Incidentally, this cost function is also applied to a search for a motion vector, and a motion vector that minimizes the cost value Cost is detected as shown by the following equation.
これらによりLow Complexity Modeにおいて、最適モードを検出する場合、符号化装置1では、イントラ予測回路5及び動き予測・補償回路6において、輝度信号を用いて、それぞれイントラ符号化及びインター符号化の全ての予測モードのコスト値Costを計算し、このコスト値Costの最も小さな予測モードをそれぞれ選択してイントラ符号化の最適モード及びインター符号化の最適モードを検出する。またこれらイントラ符号化の最適モード及びインター符号化の最適モードにおけるコスト値Costの比較により、イントラ符号化、インター符号化を選択すると共に、輝度信号の最適モードを検出する。またこれによりイントラ符号化が選択された場合、色差信号について各イントラ予測モードのコスト値を計算し、このコスト値の比較により最も値の小さなイントラ予測モードが色差信号の最適モードに設定される。なお、インター符号化が選択された場合、色差信号は、輝度信号に係る参照フレーム、動きベクトル、輝度信号に対応する動き補償ブロックにより予測値が生成される。
Accordingly, when the optimum mode is detected in the Low Complexity Mode, the
これらによりAVCでは、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出し、この最適モードにより画像データを符号化処理し、これにより画像データを効率良く符号化処理する。 As a result, in AVC, the optimal mode is detected for each macroblock from a plurality of intra prediction modes and a plurality of inter prediction modes, and image data is encoded by this optimal mode, thereby efficiently encoding the image data. .
またAVCにおいて、デブロックフィルタ15、28は、復号画像におけるブロック歪を除去すると共に、動き補償処理によるブロック歪の伝播を防止する為に適用され、以下のように定義される。なおここで量子化パラメータQPは、輝度信号の処理においては、QPYが適用され、色差信号の処理においては、QPCが適用される。またデブロックフィルタ処理は、隣接画素に関しては、異なるスライスに属する画素値でも、同一のピクチャに属する場合は有意であるとして処理が実行される。 In AVC, the deblocking filters 15 and 28 are applied to remove block distortion in a decoded image and prevent propagation of block distortion due to motion compensation processing, and are defined as follows. Here, as the quantization parameter QP, QPY is applied in the luminance signal processing, and QPC is applied in the color difference signal processing. In the deblocking filter processing, regarding adjacent pixels, even if pixel values belonging to different slices belong to the same picture, the processing is executed.
ここで図23に示すように、ブロック境界を間に挟んで連続する画素について、デブロックフィルタによる処理前の画素値をp0〜p3、q0〜q3とし、処理後の画素値をp0' 〜p3' 、q0' 〜q3' とする。これら処理対象の画素値に対して、図24に示すように、各画素がイントラマクロブロックに属するか否か等によりブロック境界の強度値(Bs:Boundary Strength)が定義される。 Here, as shown in FIG. 23, for the pixels that are continuous with the block boundary in between, the pixel values before processing by the deblocking filter are p0 to p3 and q0 to q3, and the pixel values after processing are p0 ′ to p3. ', Q0' to q3 '. With respect to the pixel values to be processed, as shown in FIG. 24, block boundary strength values (Bs: Boundary Strength) are defined depending on whether or not each pixel belongs to an intra macroblock.
この定義を前提に、次式により示す関係式が成立する場合に、デブロックフィルタの処理が実行される。 On the premise of this definition, the deblocking filter process is executed when the relational expression expressed by the following expression holds.
なおここで定数α、βは、デフォルトでは次式により示すように、量子化パラメータQPにより図25に示すように設定されるが、矢印Aにより示すように、画像圧縮情報中のスライスヘッダに含まれるパラメータslice alpha c0 offset div2及びslice beta offset div2により用度を調整することが可能である。なおここで図26は、α及びβの設定を示す図表であり、この図26におけるindexAとindexBは、次式により定義され、オフセット値Filter OffsetA 及びFilter OffsetBがユーザによる調整分に相当する。 Here, the constants α and β are set by default as shown in FIG. 25 by the quantization parameter QP as shown by the following expression, but are included in the slice header in the image compression information as shown by the arrow A. The usage can be adjusted by the slice alpha c0 offset div2 and the slice beta offset div2. Note that FIG. 26 is a chart showing the settings of α and β. In FIG. 26, indexA and indexB are defined by the following equations, and the offset values Filter OffsetA and Filter OffsetB correspond to adjustments by the user.
AVCでは、ブロック境界の強度値Bsが値4以下の場合、次式により示すように、画素値p0' 、q0' が設定される。 In AVC, when the block boundary intensity value Bs is 4 or less, pixel values p0 ′ and q0 ′ are set as shown by the following equations.
ここでtcは、クロマエッジフラグ(chroma Edge Flag)が値0の場合、(51)式による値に設定され、それ以外の場合、(52)式による値に設定される。またtcoは、indexA、indexBと、Bsとにより図27に示すように定義される。 Here, tc is set to a value according to equation (51) when the chroma edge flag is 0, and is set to a value according to equation (52) otherwise. Tco is defined by indexA, indexB, and Bs as shown in FIG.
またap及びaqは、次式により表される。 Ap and aq are expressed by the following equations.
これに対して画素値p1' は、クロマエッジフラグ(chroma Edge Flag)が値0であって、かつapの値がb以下の場合、(54)式による値に設定され、それ以外の場合、(55)式による値に設定される。 On the other hand, the pixel value p1 ′ is set to a value according to the equation (54) when the chroma edge flag is 0 and the value of ap is less than or equal to b, otherwise, The value is set according to equation (55).
また画素値q1' は、クロマエッジフラグ(chroma Edge Flag)が値0であって、かつaqの値がb以下の場合、(56)式による値に設定され、それ以外の場合、(57)式による値に設定される。 The pixel value q1 ′ is set to a value according to the expression (56) when the chroma edge flag is 0 and the value of aq is less than or equal to b, and in other cases, (57) Set to an expression value.
また画素値p2' 及びq2' は、次式により示すように、処理前の画素値p2及びq2に設定される。 The pixel values p2 ′ and q2 ′ are set to the pixel values p2 and q2 before processing, as shown by the following equation.
これに対してブロック境界の強度値Bsが値4の場合、処理後の画素値pi' (i=0〜2)は、クロマエッジフラグ(chroma Edge Flag)が値0の場合であって、次式の関係式が成立する場合、(60)式により示す値に設定される。 On the other hand, when the block boundary intensity value Bs is 4, the processed pixel value pi ′ (i = 0 to 2) is the case where the chroma edge flag is 0, and When the relational expression is established, it is set to a value indicated by the expression (60).
またこのような条件に該当しない場合、次式により示す値に設定される。 If this condition is not met, the value is set according to the following equation.
またブロック境界の強度値Bsが値4の場合、処理後の画素値qi' (i=0〜2)は、クロマエッジフラグ(chroma Edge Flag)が値0の場合であって、次式の関係式が成立する場合、(63)式により示す値に設定される。 When the block boundary intensity value Bs is 4, the processed pixel value qi ′ (i = 0 to 2) is a case where the chroma edge flag is 0, and the relationship of the following equation: When the formula is established, the value is set to a value indicated by the formula (63).
またこのような条件に該当しない場合、次式により示す値に設定される。 If this condition is not met, the value is set according to the following equation.
AVCによる符号化装置1及び復号化装置20において、デブロックフィルタ28は、これらにより適宜特性を切り換えて、ブロック歪の発生を防止する。
In the
これに対してレート制御においては、例えばTM5(MPEG−2 Test Model 5)による手法が適用される。ここでTM5によるレート制御は、各ピクチャへの目標符号量を設定するビット配分のステップと、仮想バッファ制御を用いたレート制御のステップと、視覚特性を考慮した適応量子化のステップとによる3つの階層から構成される。 On the other hand, in rate control, for example, a technique based on TM5 (MPEG-2 Test Model 5) is applied. Here, the rate control by TM5 has three steps: a bit allocation step for setting a target code amount to each picture, a rate control step using virtual buffer control, and an adaptive quantization step considering visual characteristics. Consists of hierarchies.
これらのステップのうちビット配分のステップでは、1GOPへの割当ビット量、それまでの発生符号量から、未だ符号化処理されていないピクチャへの目標符号量を計算し、以下の2つの仮定に基づいて、各ピクチャへの符号量割当量を計算する。 Of these steps, in the bit allocation step, the target code amount for a picture that has not yet been encoded is calculated from the bit amount allocated to 1 GOP and the code amount generated so far, and based on the following two assumptions: Thus, the code amount allocation amount for each picture is calculated.
ここで第1の仮定は、各ピクチャを符号化する際に用いる平均量子化スケールと、発生符号量との積は、画面が変化しない限り、ピクチャタイプ毎に一定値であるとの仮定である。これによりこのレート制御においては、各ピクチャを符号化処理した後、各ピクチャタイプ毎に、画面の複雑さを表すパラメータXi、Xp、Xb(global complexity measure ) を次式により更新する。これによりTM5によるレート制御においては、これらのパラメータXi、Xp、Xbにより、次のピクチャを符号化処理する際の量子化スケールコードと発生符号量との関係を推定する。 Here, the first assumption is that the product of the average quantization scale used when encoding each picture and the generated code amount is a constant value for each picture type unless the screen changes. . Thus, in this rate control, after encoding each picture, parameters Xi, Xp, and Xb (global complexity measure) representing the complexity of the screen are updated by the following equation for each picture type. Thereby, in rate control by TM5, the relationship between the quantization scale code and the generated code amount when the next picture is encoded is estimated by using these parameters Xi, Xp, and Xb.
ここで(65)式の各変数の添え字は、それぞれIピクチャ、Pピクチャ、Bピクチャを示す添え字である。またSi 、Sp 、Sb は、各ピクチャの符号化処理による発生符号ビット量であり、Qi 、Qp 、Qb は、各ピクチャの符号化時における平均量子化スケールコードである。またパラメータXi 、Xp 、Xb の初期値は、目標符号量bit rate〔bit/sec 〕を用いて、次式により与えられる。 Here, the subscript of each variable in the expression (65) is a subscript indicating an I picture, a P picture, and a B picture, respectively. Si, Sp, and Sb are generated code bit amounts by the encoding process of each picture, and Qi, Qp, and Qb are average quantization scale codes at the time of encoding of each picture. The initial values of the parameters Xi, Xp, and Xb are given by the following equation using the target code amount bit rate [bit / sec].
また第2の仮定は、Iピクチャの量子化スケールに対するPピクチャの量子化スケールコードの比率Kp 、Iピクチャの量子化スケールに対するBピクチャの量子化スケールコードの比率Kb が、次式の関係に保持されている場合に、常に全体の画質が最良となるとの仮定である。 The second assumption is that the ratio Kp of the quantization scale code of the P picture to the quantization scale of the I picture and the ratio Kb of the quantization scale code of the B picture to the quantization scale of the I picture are held in the relationship of the following equations: It is assumed that the overall image quality is always best when
すなわちこの仮定は、Iピクチャ、Pピクチャの量子化スケールに対してBピクチャの量子化スケールを常に1.4倍に設定することにより全体の画質が最良となることを意味するものであり、Iピクチャ、Pピクチャに比してBピクチャを粗く量子化してBピクチャに割当る符号量を節約し、その分、Iピクチャ、Pピクチャに多くの符号量を振り分けてIピクチャ、Pピクチャの画質を向上すると共に、Iピクチャ、Pピクチャを参照するBピクチャの画質も併せて向上し、これらにより全体的に見た画質を最良とするものである。 In other words, this assumption means that the overall picture quality is best when the quantization scale of the B picture is always set to 1.4 times the quantization scale of the I picture and the P picture. Compared to pictures and P pictures, the B picture is roughly quantized to save the code amount assigned to the B picture, and accordingly, a large amount of code amount is allocated to the I picture and P picture to improve the image quality of the I picture and P picture. In addition to the improvement, the image quality of the B picture referring to the I picture and the P picture is also improved, and the overall image quality is thereby optimized.
これらによりTM5では、次式の演算処理により、各ピクチャへの割当ビット量Ti、Tp、Tbを計算する。なおここでNp、Nbは、処理対象であるGOP内で、未だ符号化されていないPピクチャ、Bピクチャの枚数である。 As a result, TM5 calculates the allocated bit amounts Ti, Tp, and Tb for each picture by the following arithmetic processing. Here, Np and Nb are the number of P pictures and B pictures that have not been encoded in the GOP to be processed.
これによりTM5では、上述した2つの仮定に基づいて、各ピクチャの発生符号量を推定する。このとき符号割当対象とは異なるピクチャタイプのピクチャについては、画質最適化条件の下で、そのピクチャの発生する符号量が、割当対象ピクチャの発生符号量の何倍となるかを推定する。またこの推定により、GOP内の未符号化ピクチャが、符号割当対象のピクチャタイプにおける何枚分のピクチャに相当するかを推計し、この推計結果より各ピクチャへの割当ビット量を計算する。なおこの場合に、レート制御回路9は、ヘッダ等の固定的に必要となる符号量を考慮して、その値に下限を設定して割当ビット量を計算する。
Thereby, TM5 estimates the generated code amount of each picture based on the above two assumptions. At this time, for a picture of a picture type different from the code allocation target, it is estimated how many times the code amount generated by the picture is larger than the generated code amount of the allocation target picture under the image quality optimization condition. Also, by this estimation, it is estimated how many pictures in the picture type to be code assigned correspond to the uncoded pictures in the GOP, and the allocated bit amount to each picture is calculated from this estimation result. In this case, the
これに対して続くレート制御のステップでは、ビット配分のステップで求められた各ピクチャへの割当ビット量Ti 、Tp 、Tb と、実際の発生符号量とを一致させるため、各ピクチャタイプ毎に独立に3種類の仮想バッファを設定し、この仮想バッファの容量に基づいて量子化回路8の量子化スケールをマクロブロック単位のフィードバック制御により計算する。
On the other hand, in the subsequent rate control step, the allocated bit amounts Ti, Tp, Tb obtained in the bit allocation step and the actual generated code amount are matched with each other, so that each picture type is independent. The three types of virtual buffers are set in the virtual buffer, and the quantization scale of the
ここで始めに、これら3種類の仮想バッファの占有率を、次式の演算式により計算する。なおここでd0i、d0p、d0bは、各仮想バッファの初期占有量、Bjは、ピクチャ先頭からj番目のマクロブロックまでの発生ビット量、MB_cntは、1ピクチャ内でのマクロブロック数である。 First, the occupation ratios of these three types of virtual buffers are calculated by the following formula. Here, d0i, d0p, and d0b are initial occupancy amounts of each virtual buffer, Bj is the generated bit amount from the beginning of the picture to the jth macroblock, and MB_cnt is the number of macroblocks in one picture.
この(69)式により計算結果に基づいてj番目のマクロブロックに対する量子化スケールを、次式により計算する。 The quantization scale for the jth macroblock is calculated by the following equation based on the calculation result by the equation (69).
なおここでrは、リアクションパラメータであり、フィードバックの応答を制御するパラメータである。TM5において、リアクションパラメータr及び初期値d0i、d0p、d0bは、次式により与えられる。 Here, r is a reaction parameter, which is a parameter for controlling a feedback response. In TM5, the reaction parameter r and the initial values d0i, d0p, d0b are given by the following equations.
なおシーケンス先頭における仮想バッファの初期値は以下の式により与えられる。 The initial value of the virtual buffer at the beginning of the sequence is given by the following equation.
続く適応量子化のステップでは、レート制御のステップで計算された量子化スケールを視覚特性を考慮して補正し、これにより視覚特性を考慮した最適量子化の処理を実行する。ここでこの最適量子化の処理においては、視覚的に劣化の目立ちやすい平坦部ではより細かく量子化するように、また劣化の比較的目立ちにくい絵柄の複雑な部分でより粗く量子化するように、各マクロブロックの平坦度を示すアクティビティにより、量子化スケールを補正する。 In the subsequent adaptive quantization step, the quantization scale calculated in the rate control step is corrected in consideration of the visual characteristics, thereby executing an optimal quantization process in consideration of the visual characteristics. Here, in this optimal quantization process, in order to quantize more finely in the flat part where deterioration is visually noticeable, and coarser in the complicated part of the pattern where deterioration is relatively inconspicuous, The quantization scale is corrected by the activity indicating the flatness of each macroblock.
ここでアクティビティは、16×16画素の大きさによるマクロブロック毎に、このマクロブロックを構成する8×8画素による4個のブロックについて、フレームDCTモードにおける4個のブロックと、フィールドDCTモードにおける4個のブロックとによる計8個のブロックの画素値を用いて、次式により算出され、これにより該当マクロブロックにおける輝度レベルの平滑度を示すようになされている。 Here, for each macroblock having a size of 16 × 16 pixels, the activity is divided into four blocks in the frame DCT mode and four blocks in the field DCT mode for four blocks of 8 × 8 pixels constituting the macroblock. The pixel values of a total of eight blocks are calculated using the following equation, thereby indicating the smoothness of the luminance level in the corresponding macroblock.
なおここでPk は、原画の輝度信号ブロック内画素値である。この(73)式において最小値を取るのは、このマクロブロック内の一部だけでも平坦部分のある場合には量子化ステップを細かくして画質劣化を防止するためである。 Here, Pk is the pixel value in the luminance signal block of the original image. The reason why the minimum value is taken in the equation (73) is to prevent the image quality deterioration by making the quantization step finer when only a part of the macroblock has a flat part.
TM5では、この計算式により求めたアクティビティを次式により正規化し、これにより0.5〜2の範囲で値を取る正規化アクティビティNactj を求める。なおここでavg_actは、直前に符号化したピクチャにおけるアクティビティactj の平均値である。 In TM5, the activity obtained by this calculation formula is normalized by the following formula, thereby obtaining a normalized activity Nactj having a value in the range of 0.5-2. Here, avg_act is an average value of activity actj in the picture encoded immediately before.
またこの正規化アクティビティNactj により次式の演算処理を実行し、レート制御のステップで計算した量子化スケールQj を補正する。 In addition, the normalization activity Nactj is used to execute the following arithmetic processing to correct the quantization scale Qj calculated in the rate control step.
これらにより符号化装置1では、レート制御回路9によりこれらTM5に係るレート制御の処理を実行して逐次画像データD1を符号化処理する。
Thus, in the
このような符号化装置に関しては、例えば特開2004−56827号公報等に復号化処理等の利便を図る工夫が種々に提案されている。 With regard to such an encoding apparatus, for example, various ideas for convenience of decoding processing and the like have been proposed in Japanese Patent Application Laid-Open No. 2004-56827.
ところでAVCでは、比較的アクティビティの低い領域では、イントラ予測モードによる誤差値SA(T)Dが小さくなり、(37)式に示すコスト関数において、動きベクトルに関する情報を伝送しなくて済む分、イントラ予測モードの方がコスト値Cost(Mode)が小さくなる場合がある。これによりAVCでは、例えば地面のように、比較的アクティビティの低い領域が画像の後半部分で多くを占める場合、インタースライスにおいても、このアクティビティの低い領域で、イントラ予測モードが選択され易くなる。 By the way, in the AVC, the error value SA (T) D due to the intra prediction mode is small in a region where the activity is relatively low, and it is not necessary to transmit information on the motion vector in the cost function shown in the equation (37). The cost value Cost (Mode) may be smaller in the prediction mode. Accordingly, in AVC, when an area with relatively low activity occupies a large portion in the second half of the image, such as the ground, the intra prediction mode is easily selected in the area with low activity even in the inter slice.
しかしながらこのようなこのアクティビティの低い領域のイントラ予測モードによる符号化処理においては、ノイズの影響により、図8及び図9について上述した9種類のイントラ4×4予測モードで、予測モードを切り換えて符号化処理する場合もあり、この場合には、予測モードの切り換わりがばたついた感じとなって復号した画像に表れる。ここでこのようなばたつきは、フリッカのように見て取られることにより、視聴者の目につきやすく、これによりこのような場合、従来のAVCでは画質が損なわれる問題があった。
However, in such an encoding process using the intra prediction mode in the low activity area, the coding is performed by switching the prediction mode in the nine types of
またさらにAVCでは、図24に示したように、イントラマクロブロックでブロック境界の強度値Bsが大きくなることにより、このようにアクティビティの低い領域をイントラ予測モードにより符号化処理した場合、デブロックフィルタにより過剰にブロック境界歪を抑圧することになる。ここでこのような過剰なブロック境界歪の抑圧にあっては、平坦な部分における局所的な変化が損なわれることにより、解像度が著しく低下したように視聴者に認識される。これによってもAVCでは、画質が損なわれる問題があった。
本発明は以上の点を考慮してなされたもので、コスト関数によりイントラ予測モード、インター予測モードから最適モードを選択して画像データを符号化処理する場合に、アクティビティの低い領域における画質劣化を防止することができる符号化装置、符号化方法、符号化方法のプログラム及び符号化方法のプログラムを記録した記録媒体を提案しようとするものである。 The present invention has been made in consideration of the above points. When image data is encoded by selecting an optimal mode from an intra prediction mode and an inter prediction mode by a cost function, image quality degradation in a low activity area is reduced. It is an object of the present invention to propose an encoding apparatus, an encoding method, an encoding method program, and a recording medium on which the encoding method program can be prevented.
かかる課題を解決するため請求項1の発明においては、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出し、前記最適モードにより画像データを符号化処理する符号化装置に適用して、前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算手段と、前記アクティビティにより前記コスト値を補正して前記最適モードを検出する最適モード検出手段とを備えるようにする。
In order to solve such a problem, in the invention of
また請求項11の発明においては、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出し、前記最適モードにより画像データを符号化処理する符号化方法に適用して、前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算のステップと、前記アクティビティにより前記コスト値を補正して前記最適モードを検出する最適モード検出のステップとを有するようにする。
In the invention of
また請求項12の発明においては、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出する最適モード検出のステップと、前記最適モードにより画像データを符号化処理する符号化処理のステップとを有する符号化方法のプログラムに適用して、前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算のステップとを有し、前記最適モード検出のステップは、前記アクティビティにより前記コスト値を補正して前記最適モードを検出する。
Further, in the invention of
また請求項13の発明においては、演算処理手段により実行される符号化方法のプログラムを記録した記録媒体に適用して、前記符号化方法のプログラムは、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出する最適モード検出のステップと、前記最適モードにより画像データを符号化処理する符号化処理のステップと、前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算のステップとを有し、前記最適モード検出のステップは、前記アクティビティにより前記コスト値を補正して前記最適モードを検出する。 According to a thirteenth aspect of the present invention, the program of the encoding method is applied to a recording medium on which a program of the encoding method executed by the arithmetic processing means is recorded. By comparison, a plurality of intra prediction modes, a step of optimal mode detection for detecting an optimal mode for each macroblock from a plurality of inter prediction modes, a step of encoding processing for encoding image data in the optimal mode, An activity calculation step of calculating an activity indicating the flatness of the image based on the image data for each macroblock, and the step of detecting the optimum mode corrects the cost value by the activity and sets the optimum mode. To detect.
請求項1の構成により、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出し、前記最適モードにより画像データを符号化処理する符号化装置に適用して、前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算手段と、前記アクティビティにより前記コスト値を補正して前記最適モードを検出する最適モード検出手段とを備えるようにすれば、このコスト値の補正によりアクティビティが低い場合にはイントラ予測モードを選択しないようにコスト値を設定することができる。これにより過剰なブロック境界歪の抑圧を防止して解像度の低下を防止することができ、また複数のイントラ予測モードの切り換わりによる画質劣化を防止することができ、これらによりコスト関数によりイントラ予測モード、インター予測モードから最適モードを選択して画像データを符号化処理する場合に、アクティビティの低い領域における画質劣化を防止することができる。
According to the configuration of
これにより請求項11、請求項12、請求項13の構成によれば、コスト関数によりイントラ予測モード、インター予測モードから最適モードを選択して画像データを符号化処理する場合に、アクティビティの低い領域における画質劣化を防止することができる符号化方法、符号化方法のプログラム、符号化方法のプログラムを記録した記録媒体を提供することができる。
Thus, according to the configurations of
本発明によれば、コスト関数によりイントラ予測モード、インター予測モードから最適モードを選択して画像データを符号化処理する場合に、アクティビティの低い領域における画質劣化を防止することができる。 According to the present invention, when image data is encoded by selecting an optimal mode from an intra prediction mode and an inter prediction mode by a cost function, it is possible to prevent image quality deterioration in a low activity area.
以下、適宜図面を参照しながら本発明の実施例を詳述する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings as appropriate.
(1)実施例の構成
図1は、本発明の実施例に係るAVC方式の符号化装置を示すブロック図である。この符号化装置41において、図3について上述した符号化装置1と同一の構成は、対応する符号を付して示し、重複した説明は省略する。これによりこの符号化装置41は、順次入力されるビデオ信号S1をアナログディジタル変換処理して画像データD1に変換した後、イントラ予測モード、インター予測モードより最適モードを選択してこの画像データD1を符号化する。
(1) Configuration of Embodiment FIG. 1 is a block diagram showing an AVC encoding apparatus according to an embodiment of the present invention. In this
この符号化装置41において、アクティビティ算出回路42は、この処理対象の画像データD1について、16×16画素によるマクロブロック毎に、画像データD1による画像の平坦度を示すパラメータを計算し、この実施例では、このパラメータにアクティビティが適用される。これによりアクティビティ算出回路42は、次式の演算処理の実行により、マクロブロック毎に画素値の分散値を計算してアクティビティactを計算する。アクティビティ算出回路42は、このアクティビティactをマクロブロックのアクティビティMB actに設定して出力する。
In this
レート制御回路43は、このアクティビティ算出回路42より得られるアクティビティMB actを用いて上述したTM5の手法によりレート制御の処理を実行する。
The
動き予測・補償回路44は、イントラ・インター判定回路45の制御により、インター符号化に係る輝度信号の全ての予測モードについて、(37)式のコスト値Cost(Mode)を計算し、各予測モードにおけるコスト値Cost(Mode)の比較により、最も値の小さな予測モードを検出する。これにより動き予測・補償回路44は、インター予測モードより最適モードを検出し、この最適モードのコスト値Cost(Mode)をイントラ・インター判定回路45に通知する。またこの通知により得られるイントラ・インター判定回路45からの指示により、インター符号化処理の場合に、この最適モードによる予測値を輝度信号及び色差信号について生成して減算回路4に出力する。
The motion prediction /
イントラ予測回路46は、同様に、イントラ・インター判定回路45の制御により、イントラ符号化に係る輝度信号の全ての予測モードについて、(37)式に関して上述した原画像と予測画像との誤差値SA(T)D、オフセット値SA(T)D0を計算してイントラ・インター判定回路45に通知する。またこの通知により得られるイントラ・インター判定回路45からの指示により、イントラ符号化処理の場合に、対応する予測値を減算回路4に出力する。またこの場合、色差信号についてコスト値を計算して最適モードを検出し、この最適モードによる予測値を減算回路4に出力する。
Similarly, the
イントラ・インター判定回路45は、イントラ予測回路46から通知される誤差値SA(T)D、オフセット値SA(T)D0を用いて全てのイントラ予測モードについてコスト値Cost(Mode)を計算し、この計算したコスト値Cost(Mode)と動き予測・補償回路44から通知されるコスト値Cost(Mode)とを比較し、最もコスト値Cost(Mode)の小さな予測モードを検出する。イントラ・インター判定回路45は、この予測モードの検出により、マクロブロック毎にイントラ予測、インター予測を選択し、また複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出する。またこの検出した最適モードによる予測値の出力をイントラ予測回路46、動き予測・補償回路44に指示する。
The intra /
この一連の処理において、イントラ・インター判定回路45は、アクティビティ算出回路42より得られるアクティビティMB actにより、イントラ4×4予測モードに係るコスト値Cost(Mode)を補正する。
In this series of processing, the intra /
すなわち(46)式について上述したように、従来、Low Complexity
Modeにおいて、イントラ4×4予測モードにおけるコスト値Cost(Mode)は、次式により示すように、値24による定数に、付加情報に関する量子化パラメータから量子化値への変換関数QP0(QP)を乗算してオフセット値SA(T)D0が定義され、このオフセット値SA(T)D0によりコスト値Cost(Mode)をオフセットさせることにより、インタースライスにおけるイントラマクロブロックの発生を低減している。ここでこの値24は、経験値に基づく値である。
That is, as described above with respect to the equation (46), conventionally, the Low Complexity.
In Mode, the cost value Cost (Mode) in the
しかしてこのような設定により、アクティビティの高い領域において、イントラマクロブロックが選択された場合、絵柄に応じた特定の方向のイントラ予測モードが適切に選択され、これにより符号化効率を確保しつつ、画質劣化を有効に回避することができる。しかしながらアクティビティの低い領域においては、ノイズの影響により予測モードが種々に切り換わったり、またデブロックフィルタにより過剰にブロック境界歪を抑圧することになる。 With this setting, when an intra macroblock is selected in a region with high activity, an intra prediction mode in a specific direction corresponding to a picture is appropriately selected, thereby ensuring coding efficiency, Image quality degradation can be effectively avoided. However, in the low activity region, the prediction mode is switched variously due to the influence of noise, and the block boundary distortion is excessively suppressed by the deblocking filter.
これによりイントラ・インター判定回路45は、この(77)式に代えて、次式の演算処理によりオフセット値SA(T)D0を設定する。なおここでf(MB act)は、アクティビティMB actを変数とする関数である。これによりイントラ・インター判定回路45は、アクティビティMB actにより、マクロブロックにおいて高周波成分が少ない場合、イントラ予測モードが選択され難くなるように、コスト値を補正する。より具体的に、この実施例では、このアクティビティMB actを変数とする関数f(MB act)に単調減少関数が適用され、これによりアクティビティの低い領域程、より大きな値のオフセット値を設定して、その分、イントラマクロブロックが選択されに難くする。またこれとは逆に、アクティビティの高い領域では、小さな値のオフセット値が適用され、イントラマクロブロックを選択され易くする。なお、単調減少関数には、例えば出力値が2値の関数、一次関数、種々の関数を広く適用することができる。
Thereby, the intra /
しかして図2は、この最適予測モードに係る符号化装置41の処理手順を示すフローチャートである。符号化装置41においては、マクロブロック毎に、この処理手順を実行し、ステップSP1によりインター予測モードに係る動き予測の処理を実行し、また続くステップSP2において、各予測モードのコスト値を計算する。また続くステップSP3において、この計算したコスト値の比較により、最適なインター予測モードを検出する。
FIG. 2 is a flowchart showing a processing procedure of the
またこのような動き予測・補償回路44に係る処理と同時並列的なアクティビティ算出回路42、イントラ予測回路46、イントラ・インター判定回路45の処理により、ステップSP4において、アクティビティを計算した後、続くステップSP5において、このアクティビティによりオフセット値を計算する。また続くステップSP6において、この計算したオフセット値により各イントラ予測モードに係るコスト値を計算し、ステップSP7において、この計算したコスト値とステップSP3で計算したコスト値とを比較し、この比較結果により続くステップSP8において、最適モードを検出する。
In addition, after the activity is calculated in step SP4 by the processes of the
(2)実施例の動作
以上の構成において、この符号化装置41(図1)において、順次入力されるビデオ信号S1は、アナログディジタル変換回路2により画像データD1に変換され、この画像データD1が画面並べ替えバッファ3により処理の順序に並べ替えられて減算回路4に入力される。ここで画像データD1は、イントラ予測、インター予測による予測値との間で減算されて減算データD2が生成され、この減算データD2が直交変換回路7、量子化回路8、可逆符号化回路10で順次処理されて符号化データD4に変換され、この符号化データD4が例えば記録系により記録媒体に記録される。また量子化回路8の出力データが、画像データに復号されてフレームメモリ16に参照画像として記録され、この参照画像より動き予測・補償回路44、イントラ予測回路46でインター予測、イントラ予測の予測値が生成される。
(2) Operation of the embodiment In the above configuration, in the encoding device 41 (FIG. 1), the video signal S1 sequentially input is converted into the image data D1 by the analog-
これら一連の処理において、画像データD1は、動き予測・補償回路44、イントラ予測回路46において、それぞれインター予測、イントラ予測の各予測モードについて、符号化効率を示すコスト関数によりコスト値が求められ、インター予測については、動き予測・補償回路44におけるコスト値の比較により、最も符号化処理に適した最適モードが検出される。またイントラ・インター判定回路45において、イントラ予測の各予測モードによるコスト値と、動き予測・補償回路44で検出されたインター予測に係る最適モードのコスト値との比較により、最適な予測モードが検出される。これにより符号化装置41では、この最適な予測モードによりイントラ予測、インター予測の何れの予測方式により符号化処理するかが決定され、イントラ予測による場合には、イントラ予測回路46で最適モードによる予測値が生成されて減算回路4に出力される。またインター予測による場合には、動き予測・補償回路44で最適モードによる予測値が生成されて減算回路4に出力される。これらにより符号化装置41では、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードがマクロブロック毎に検出され、この最適モードにより画像データD1を順次符号化処理する。
In these series of processing, the image data D1 is obtained in the motion prediction /
しかしてこれら各予測モードにおけるコスト値のうち、イントラ4×4予測モードにおけるコスト値は、(77)式に示すように、従来、値24による定数に、付加情報に関する量子化パラメータから量子化値への変換関数QP0(QP)を乗算してオフセット値SA(T)D0を計算し、このオフセット値SA(T)D0によりコスト値Cost(Mode)をオフセットさせることにより、インタースライスにおけるイントラマクロブロックの発生を低減するように設定される。
Therefore, among the cost values in each of these prediction modes, the cost value in the
これによりアクティビティの高い領域においては、イントラマクロブロックが選択された場合に、絵柄に応じた特定の方向のイントラ予測モードが適切に選択され、これにより符号化効率を確保しつつ、画質劣化を有効に回避することができる。しかしながらアクティビティの低い領域においては、ノイズの影響により予測モードが種々に切り換わったり、またデブロックフィルタにより過剰にブロック境界歪を抑圧することになる。 As a result, in areas with high activity, when an intra macroblock is selected, an intra prediction mode in a specific direction according to the design is appropriately selected, thereby ensuring image coding efficiency and effective image quality degradation. Can be avoided. However, in the low activity region, the prediction mode is switched variously due to the influence of noise, and the block boundary distortion is excessively suppressed by the deblocking filter.
このためこの符号化装置41において、画像データD1は、アクティビティ算出回路42において、画像の平坦度を示すパラメータとしてアクティビティが計算され、このアクティビティによりイントラ・インター判定回路45でイントラ4×4予測モードのコスト値が補正された後、最適モードが検出される。これによりこの符号化装置41では、アクティビティに応じて最適モードの選択を制御するように構成され、この構成により適切に最適モードを選択してアクティビティの低い領域における画質劣化を防止することが可能となる。
For this reason, in this
すなわちこの符号化装置41では、このコスト値の補正により、マクロブロックにおいて高周波成分が少ない場合に、イントラ予測モードが選択され難くなるように設定され、これによりアクティビティの低い領域におけるイントラ4×4予測モードの頻繁な切り換わりによる復号した画像のばたつき感が防止され、フリッカのような画質劣化が防止される。またさらにこのようにアクティビティの低い領域におけるデブロックフィルタによる過剰なブロック境界歪の抑圧を防止することができ、これにより見かけの解像度の低下を防止して画質劣化を防止することができる。
That is, in this
より具体的に、この実施例では、このイントラ4×4予測モードにおいて、原画像と予測画像との誤差値SA(T)Dに対してオフセット値SA(T)D0を与える関数により定義されているコスト関数について、アクティビティMB actを変数とする関数f(MB act)と、付加情報に関する量子化パラメータから量子化値への変換関数QP0(QP)との乗算値をオフセット値SA(T)D0に設定することにより、アクティビティに応じてコスト値を補正するように構成され、これによりこのアクティビティMB
actを変数とする関数f(MB act)の設定により必要に応じて種々の特性によりコスト値を補正することができ、これにより簡易かつ確実に、かつ種々に画質を向上することができる。
More specifically, in this embodiment, the
By setting the function f (MB act) with act as a variable, it is possible to correct the cost value with various characteristics as necessary, thereby improving the image quality in a simple and reliable manner.
またこのアクティビティMB actを変数とする関数f(MB act)がこの実施例では単調減少関数に設定され、これによりアクティビティの低い領域における画質劣化を確実に防止することができる。 Further, in this embodiment, the function f (MB act) having the activity MB act as a variable is set as a monotonically decreasing function, and thereby it is possible to reliably prevent image quality deterioration in a low activity area.
またこの処理基準であるアクティビティが、画像データD1による画素値の分散値により計算されることにより、このような画質劣化を知覚し易い領域で適切にイントラ予測モードの選択を制御することができ、これにより従来に比して一段と画質を向上することができる。 In addition, the activity that is the processing standard is calculated based on the variance value of the pixel values based on the image data D1, so that the selection of the intra prediction mode can be appropriately controlled in a region where such image quality degradation is easily perceived. As a result, the image quality can be further improved as compared with the prior art.
(3)実施例の効果
以上の構成によれば、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出して画像データを符号化処理する場合に、アクティビティによりコスト値を補正して最適モードを検出することにより、コスト関数によりイントラ予測モード、インター予測モードから最適モードを選択して画像データを符号化処理する場合に、アクティビティの低い領域における画質劣化を防止することができる。
(3) Effects of the embodiment According to the above configuration, the optimum mode is detected for each macroblock from the plurality of intra prediction modes and the plurality of inter prediction modes by comparing the cost values with the cost function indicating the coding efficiency. When image data is encoded, the cost value is corrected by activity and the optimal mode is detected, and the optimal mode is selected from the intra prediction mode and the inter prediction mode by the cost function to encode the image data. In this case, it is possible to prevent image quality deterioration in a low activity area.
またこのときこのコスト値の補正が、マクロブロックにおいて高周波成分が少ない場合に、イントラ予測モードが選択され難くなるようにするコスト値の補正であることにより、確実に、アクティビティの低い領域における画質劣化を防止することができる。 Also, at this time, the correction of the cost value is a correction of the cost value that makes it difficult to select the intra prediction mode when there are few high-frequency components in the macroblock. Can be prevented.
またこの処理基準であるアクティビティが、画像データD1による画素値の分散値であることにより、画質劣化を知覚し易い領域で適切にイントラ予測モードの選択を制御することができ、これにより従来に比して一段と画質を向上することができる。 In addition, since the activity that is the processing standard is a dispersion value of pixel values based on the image data D1, it is possible to appropriately control the selection of the intra prediction mode in an area where image quality degradation is easily perceived. Thus, the image quality can be further improved.
また原画像と予測画像との誤差値に対してオフセット値を与えるコスト関数によるコスト値について、アクティビティを変数とする関数と、付加情報に関する量子化パラメータから量子化値への変換関数との乗算値をオフセット値に設定し、これによりアクティビティによりコスト値を補正することにより、このアクティビティを変数とする関数の設定により必要に応じて種々の特性によりコスト値を補正することができ、これにより簡易かつ確実に、種々に画質を向上することができる。 Also, for the cost value by the cost function that gives an offset value to the error value between the original image and the predicted image, the product of the function with the activity as a variable and the conversion function from the quantization parameter to the quantization value for the additional information Is set as an offset value, and the cost value is corrected by the activity, so that the cost value can be corrected by various characteristics as required by setting the function using this activity as a variable. Certainly, the image quality can be improved in various ways.
より具体的には、このアクティビティを変数とする関数に単調減少関数を適用することにより、アクティビティの低い領域における画質劣化を確実に防止することができる。 More specifically, by applying a monotone decreasing function to a function having this activity as a variable, it is possible to reliably prevent image quality deterioration in a low activity area.
この実施例においては、実施例1について上述した16×16画素によるマクロブロックを単位にしたマクロブロックのアクティビティMB actの直接の計算に代えて、マクロブロックを水平方向及び垂直方向にそれぞれ4分割した4×4画素によるブロックを単位にしてマクロブロックのアクティビティMB actを計算する。なおこの実施例に係る符号化装置は、このアクティビティの検出に係るアクティビティ算出回路の構成が異なる点を除いて、実施例1について上述した符号化装置41と同一に構成される。
In this embodiment, instead of directly calculating the macroblock activity MB act in units of macroblocks of 16 × 16 pixels described above for the first embodiment, the macroblock is divided into four in the horizontal and vertical directions, respectively. The macro block activity MB act is calculated in units of blocks of 4 × 4 pixels. The encoding apparatus according to the present embodiment is configured in the same manner as the
すなわちこの実施例において、アクティビティ算出回路は、マクロブロックを水平方向及び垂直方向にそれぞれ4分割した4×4画素によるブロック毎に、次式の演算処理を実行し、これによりこの4×4画素によるブロックの分散により各4×4画素ブロックのアクティビティactを検出する。 That is, in this embodiment, the activity calculation circuit executes the following arithmetic processing for each block of 4 × 4 pixels obtained by dividing the macroblock into 4 parts in the horizontal direction and the vertical direction, and thereby the 4 × 4 pixels are used. The activity act of each 4 × 4 pixel block is detected by block distribution.
またアクティビティ算出回路は、このようにして計算される各種ブロックによるアクティビティactをマクロブロックによりまとめて、マクロブロックのアクティビティMB actを計算する。具体的にアクティビティ算出回路は、次式の演算処理により、マクロブロックを構成する4×4画素ブロックのアクティビティactより最小値を求めてマクロブロックのアクティビティMB actを計算する。 Further, the activity calculation circuit calculates the activity MB act of the macro block by grouping the activity act of the various blocks calculated in this way by the macro block. Specifically, the activity calculation circuit calculates the minimum value of the activity MB act of the macro block by calculating the minimum value from the activity act of the 4 × 4 pixel block constituting the macro block by the arithmetic processing of the following equation.
この実施例のように、マクロブロックを細分割したブロック毎に、画像データD1による画素値の分散値を計算した後、最小値を検出してアクティビティに設定するようにしても、実施例1と同様の効果を得ることができる。 As in this embodiment, after calculating the dispersion value of the pixel value based on the image data D1 for each block obtained by subdividing the macroblock, the minimum value may be detected and set in the activity. Similar effects can be obtained.
この実施例においては、実施例2について上述した4×4画素によるブロックを単位にしたマクロブロックのアクティビティMB actの直接の計算に代えて、マクロブロックを水平方向及び垂直方向にそれぞれ2分割した8×8画素によるブロックを単位にしてマクロブロックのアクティビティMB actを計算する。なおこの実施例に係る符号化装置は、このアクティビティの検出に係るアクティビティ算出回路の構成が異なる点を除いて、実施例2について上述した符号化装置41と同一に構成される。
In this embodiment, instead of the direct calculation of the activity MBact of the macroblock in units of blocks of 4 × 4 pixels described above for the second embodiment, the macroblock is divided into two in the horizontal direction and the vertical direction, respectively. The activity MB act of the macroblock is calculated in units of blocks of x8 pixels. Note that the encoding apparatus according to this embodiment is configured in the same manner as the
この実施例のように、マクロブロックを細分割したブロックを8×8画素のブロックに設定して、このブロック毎に、画像データD1による画素値の分散値を計算した後、最小値を検出してアクティビティに設定するようにしても、実施例2と同様の効果を得ることができる。 As in this embodiment, a block obtained by subdividing a macroblock is set to a block of 8 × 8 pixels, and a variance value of pixel values based on image data D1 is calculated for each block, and then a minimum value is detected. Even if the activity is set, the same effect as in the second embodiment can be obtained.
この実施例では、上述した平均値を基準にした分散値の計算によるアクティビティMB actの検出に代えて、アダマール変換処理によりアクティビティMB actを計算する。なおこの実施例に係る符号化装置は、このアクティビティの検出に係るアクティビティ算出回路の構成が異なる点を除いて、実施例2について上述した符号化装置と同一に構成される。 In this embodiment, instead of detecting the activity MB act by calculating the variance value based on the average value, the activity MB act is calculated by Hadamard transform processing. The encoding apparatus according to the present embodiment is configured in the same manner as the encoding apparatus described above with respect to the second embodiment, except that the configuration of the activity calculation circuit for detecting the activity is different.
すなわちこの実施例において、アクティビティ算出回路は、マクロブロックを水平方向及び垂直方向にそれぞれ4分割した4×4画素によるブロック毎に、次式の演算処理を実行し、これによりアダマール変換処理により4×4画素ブロックのアクティビティactを検出する。 In other words, in this embodiment, the activity calculation circuit performs the following arithmetic processing for each block of 4 × 4 pixels obtained by dividing the macroblock into 4 parts in the horizontal direction and the vertical direction, thereby performing 4 × by Hadamard transform processing. The activity act of the 4-pixel block is detected.
なおここでH4は、(82)式により示す4次のアダマール行列である。また(81)式の演算処理により得られる行列に対して、直流成分を除いた絶対値和を(83)式より求め、これを当該4×4画素ブロックのアクティビティactとする。なおこのような4次のアダマール行列による4×4画素ブロックの処理に代えて、8次又は16次のアダマール行列による8×8画素ブロック又は16×16画素ブロックの処理によりアクティビティを検出するようにしてもよい。 Here, H 4 is a fourth-order Hadamard matrix expressed by the equation (82). Further, the absolute value sum excluding the DC component is obtained from the equation (83) for the matrix obtained by the arithmetic processing of the equation (81), and this is defined as the activity act of the 4 × 4 pixel block. Instead of such a 4 × 4 pixel block process using a 4th order Hadamard matrix, an activity is detected by an 8 × 8 pixel block process or a 16 × 16 pixel block process using an 8th order or 16th order Hadamard matrix. May be.
またこのようにして計算した4×4画素ブロックによるアクティビティactを(80)式の演算処理によりマクロブロックでまとめてアクティビティMB actを検出する。 In addition, the activity act based on the 4 × 4 pixel block calculated in this way is collected in a macro block by the arithmetic processing of the expression (80) to detect the activity MB act.
この実施例のように、アダマール変換処理によりアクティビティMB actを検出するようにしても、実施例1と同様の効果を得ることができる。 Even if the activity MB act is detected by Hadamard transform processing as in this embodiment, the same effect as in the first embodiment can be obtained.
この実施例においては、イントター予測に係る最適モードの検出においても、アクティビティによりコスト関数を補正する。なおこの実施例に係る符号化装置は、このイントター予測の処理に係る動き予測・補償回路の構成が異なる点を除いて、実施例1について上述した符号化装置41と同一に構成される。
In this embodiment, the cost function is corrected by the activity even in the detection of the optimal mode related to the inter prediction. The encoding apparatus according to the present embodiment is configured in the same manner as the
すなわちこの実施例において、動き予測・補償回路は、予測モードより最適モードを検出する際のコスト値の計算において、アクティビティMB actによりオフセット値を生成し、このオフセット値によりコスト値を補正する。これにより動き予測・補償回路は、動き補償ブロックの大きさの選択、前予測、後予測、双方向予測の選択をアクティビティにより制御する。 That is, in this embodiment, the motion prediction / compensation circuit generates an offset value based on the activity MB act and calculates the cost value based on this offset value in calculating the cost value when detecting the optimum mode from the prediction mode. Thus, the motion prediction / compensation circuit controls the selection of the size of the motion compensation block, the pre-prediction, the post-prediction, and the bi-directional prediction according to the activity.
これによりこの符号化装置では、例えばアクティビティが低い場合には、動き補償ブロックの大きさの頻繁な切り換わり、前予測、後予測、双方向予測の頻繁な切り換わりを防止し、その分、このような切り換わりによるばたついた感じを防止して一段と画質を向上する。 As a result, in this encoding apparatus, for example, when the activity is low, frequent switching of the size of the motion compensation block, frequent switching of the forward prediction, the post prediction, and the bidirectional prediction is prevented. The flickering feeling caused by such switching is prevented and the image quality is further improved.
この実施例によれば、さらに動き補償ブロックの大きさの選択、前予測、後予測、双方向予測の選択をアクティビティにより制御することにより、一段と画質を向上することができる。 According to this embodiment, it is possible to further improve the image quality by further controlling the selection of the size of the motion compensation block, the pre-prediction, the post-prediction, and the bi-directional prediction by the activity.
なお上述の実施例においては、AVCにおけるLow Complexity Modeに本発明を適用する場合について述べたが、本発明はこれに限らず、High Complexity Modeに適用するようにしてもよい。 In the above-described embodiments, the case where the present invention is applied to the Low Complexity Mode in AVC has been described. However, the present invention is not limited to this, and may be applied to the High Complexity Mode.
また上述の実施例においては、本発明をAVCによる符号化装置に適用する場合について述べたが、本発明はこれに限らず、符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出して画像データを符号化処理する場合に広く適用することができる。 In the above-described embodiments, the case where the present invention is applied to an AVC encoding apparatus has been described. However, the present invention is not limited to this, and a plurality of intra-frames can be obtained by comparing cost values using cost functions indicating encoding efficiency. The present invention can be widely applied to a case where an optimal mode is detected for each macroblock from a prediction mode and a plurality of inter prediction modes and image data is encoded.
また上述の実施例においては、本発明をハードウエアの構成に適用する場合について述べたが、本発明はこれに限らず、画像データをソフトウエアにより処理する場合にも適用することができる。なおこのようなソフトウエアに係る符号化処理、復号化処理のプログラムにおいては、例えばインターネット等のネットワークにより提供する場合、光ディスク、磁気ディスク、メモリカード等、種々の記録媒体により提供する場合に、広く適用することができる。 In the above-described embodiments, the case where the present invention is applied to the hardware configuration has been described. However, the present invention is not limited to this, and can also be applied to the case where image data is processed by software. Note that the encoding processing and decoding processing programs related to such software are widely used when provided by a network such as the Internet, when provided by various recording media such as an optical disk, a magnetic disk, and a memory card. Can be applied.
本発明は、符号化装置、符号化方法、符号化方法のプログラム及び符号化方法のプログラムを記録した記録媒体に関し、動画による撮像結果を記録するビデオカメラ、電子スチルカメラ、監視装置等に適用することができる。 The present invention relates to an encoding apparatus, an encoding method, an encoding method program, and a recording medium on which the encoding method program is recorded, and is applied to a video camera, an electronic still camera, a monitoring apparatus, and the like that record imaging results of moving images. be able to.
1……符号化装置、5、23、46……イントラ予測回路、6、24、44……動き予測・補償回路、15、28……デブロックフィルタ、42……アクティビティ算出回路、イントラ・インター判定回路
DESCRIPTION OF
Claims (13)
前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算手段と、
前記アクティビティにより前記コスト値を補正して前記最適モードを検出する最適モード検出手段とを備える
ことを特徴とする符号化装置。 An encoding device that detects an optimal mode for each macroblock from a plurality of intra prediction modes and a plurality of inter prediction modes by comparing cost values with cost functions indicating encoding efficiency, and encodes image data in the optimal mode In
Activity calculating means for calculating an activity indicating the flatness of the image by the image data for each macroblock;
An encoding device comprising: an optimum mode detecting unit that detects the optimum mode by correcting the cost value by the activity.
前記マクロブロックにおいて高周波成分が少ない場合に、前記イントラ予測モードが選択され難くなるようにするコスト値の補正である
ことを特徴とする請求項1に記載の符号化装置。 Correction of the cost value by the optimum mode detection means is
The encoding apparatus according to claim 1, wherein the cost correction is performed to make it difficult to select the intra prediction mode when there are few high-frequency components in the macroblock.
ことを特徴とする請求項1に記載の符号化装置。 The encoding apparatus according to claim 1, wherein the activity is a variance value of pixel values based on the image data.
前記マクロブロックを細分割したブロック毎に、前記画像データによる画素値の分散値を計算し、
前記マクロブロック毎に、前記細分割したブロックの分散値から最小値を検出して前記アクティビティに設定する
ことを特徴とする請求項3に記載の符号化装置。 The activity calculation means includes:
For each block obtained by subdividing the macroblock, calculate a variance value of pixel values based on the image data,
The encoding apparatus according to claim 3, wherein, for each macroblock, a minimum value is detected from a variance value of the subdivided blocks and set in the activity.
アダマール変換により前記アクティビティを算出する
ことを特徴とする請求項1に記載の符号化装置。 The activity calculation means includes:
The encoding apparatus according to claim 1, wherein the activity is calculated by Hadamard transform.
前記マクロブロックを細分割したブロック毎にアダマール変換を実行し、
処理結果による係数データから直流成分の係数を除いて絶対値和を計算することにより、前記細分割したブロック毎に、前記アクティビティを算出し、
前記マクロブロック毎に、前記細分割したブロックのアクティビティから最小値を検出して前記マクロブロックのアクティビティに設定する
ことを特徴とする請求項5に記載の符号化装置。 The activity calculation means includes:
Performing Hadamard transform for each block obtained by subdividing the macroblock,
By calculating the absolute value sum by removing the coefficient of the DC component from the coefficient data by the processing result, the activity is calculated for each of the subdivided blocks,
6. The encoding apparatus according to claim 5, wherein, for each macroblock, a minimum value is detected from the subdivided block activity and set as the macroblock activity.
原画像と予測画像との誤差値に対して、オフセット値を与える関数であり、
前記アクティビティ計算手段は、
前記アクティビティを変数とする関数と、付加情報に関する量子化パラメータから量子化値への変換関数との乗算値を前記オフセット値に設定することにより、前記アクティビティにより前記コスト値を補正する
ことを特徴とする請求項1に記載の符号化装置。 The cost function is
This function gives an offset value for the error value between the original image and the predicted image.
The activity calculation means includes:
The cost value is corrected by the activity by setting, as the offset value, a multiplication value of a function having the activity as a variable and a conversion function from a quantization parameter to a quantization value regarding additional information. The encoding device according to claim 1.
単調減少関数である
ことを特徴とする請求項7に記載の符号化装置。 A function with the activity as a variable is
The encoding apparatus according to claim 7, wherein the encoding apparatus is a monotone decreasing function.
ことを特徴とする請求項1に記載の符号化装置。 The code according to claim 1, wherein selection of the motion compensation block is controlled by the activity by selecting a size of a motion compensation block related to the macroblock based on a cost value corrected by the activity. Device.
ことを特徴とする請求項1に記載の符号化装置。 The selection of pre-prediction, post-prediction, and bi-directional prediction is controlled by the activity by selecting pre-prediction, post-prediction, and bi-directional prediction based on the cost value corrected by the activity. The encoding device described.
前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算のステップと、
前記アクティビティにより前記コスト値を補正して前記最適モードを検出する最適モード検出のステップとを有する
ことを特徴とする符号化方法。 An encoding method for detecting an optimal mode for each macroblock from a plurality of intra prediction modes and a plurality of inter prediction modes by comparing cost values using a cost function indicating encoding efficiency, and encoding the image data in the optimal mode In
An activity calculating step for calculating an activity indicating the flatness of the image by the image data for each macroblock;
And an optimal mode detection step of detecting the optimal mode by correcting the cost value by the activity.
前記最適モードにより画像データを符号化処理する符号化処理のステップとを有する符号化方法のプログラムにおいて、
前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算のステップを有し、
前記最適モード検出のステップは、
前記アクティビティにより前記コスト値を補正して前記最適モードを検出する
ことを特徴とする符号化方法のプログラム。 Optimal mode detection step for detecting an optimal mode for each macroblock from a plurality of intra-prediction modes and a plurality of inter-prediction modes by comparing cost values with cost functions indicating encoding efficiency;
A coding method program comprising coding processing steps for coding image data in the optimum mode,
An activity calculating step for calculating an activity indicating flatness of an image based on the image data for each macroblock;
The optimal mode detection step includes:
A program of an encoding method, wherein the cost mode is corrected by the activity to detect the optimum mode.
前記符号化方法のプログラムは、
符号化効率を示すコスト関数によるコスト値の比較により、複数のイントラ予測モード、複数のインター予測モードから最適モードをマクロブロック毎に検出する最適モード検出のステップと、
前記最適モードにより画像データを符号化処理する符号化処理のステップと、
前記マクロブロック毎に、前記画像データによる画像の平坦度を示すアクティビティを計算するアクティビティ計算のステップを有し、
前記最適モード検出のステップは、
前記アクティビティにより前記コスト値を補正して前記最適モードを検出する
ことを特徴とする符号化方法のプログラムを記録した記録媒体。
In a recording medium on which a program of an encoding method executed by arithmetic processing means is recorded,
The encoding method program is:
Optimal mode detection step for detecting an optimal mode for each macroblock from a plurality of intra-prediction modes and a plurality of inter-prediction modes by comparing cost values with cost functions indicating encoding efficiency;
A step of encoding processing for encoding image data in the optimum mode;
An activity calculating step for calculating an activity indicating flatness of an image based on the image data for each macroblock;
The optimal mode detection step includes:
A recording medium on which a program of an encoding method is recorded, wherein the optimum mode is detected by correcting the cost value by the activity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004276393A JP4529615B2 (en) | 2004-09-24 | 2004-09-24 | Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004276393A JP4529615B2 (en) | 2004-09-24 | 2004-09-24 | Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006094081A true JP2006094081A (en) | 2006-04-06 |
JP4529615B2 JP4529615B2 (en) | 2010-08-25 |
Family
ID=36234627
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004276393A Expired - Fee Related JP4529615B2 (en) | 2004-09-24 | 2004-09-24 | Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4529615B2 (en) |
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008017225A (en) * | 2006-07-06 | 2008-01-24 | Toshiba Corp | Communication terminal device |
KR100829169B1 (en) | 2006-07-07 | 2008-05-13 | 주식회사 리버트론 | Apparatus and method for estimating compression modes for H.264 codings |
JP2008124699A (en) * | 2006-11-10 | 2008-05-29 | Sharp Corp | Encoding apparatus, encoding method and program |
US20080181311A1 (en) * | 2007-01-31 | 2008-07-31 | Sony Corporation | Video system |
JP2008193548A (en) * | 2007-02-07 | 2008-08-21 | Nippon Telegr & Teleph Corp <Ntt> | Adaptive deblocking processing method, device, and adaptive deblocking processing program, and computer readable recording medium |
JP2008219147A (en) * | 2007-02-28 | 2008-09-18 | Kddi R & D Laboratories Inc | Dynamic image coding apparatus |
KR100900316B1 (en) | 2006-12-06 | 2009-06-02 | 한국전자통신연구원 | Method and Apparatus for Intra mode prediction searching for compression of real time video signal |
KR100930164B1 (en) | 2007-11-29 | 2009-12-07 | 주식회사 창해에너지어링 | Fast rate-distortion optimization method |
JP2010541469A (en) * | 2007-10-05 | 2010-12-24 | トムソン ライセンシング | Method and apparatus for rate control accuracy in video encoding and decoding |
JP2011015171A (en) * | 2009-07-01 | 2011-01-20 | Canon Inc | Coding apparatus, control method for the same, and computer program |
JP2011151655A (en) * | 2010-01-22 | 2011-08-04 | Mitsubishi Electric Corp | Apparatus, method and program for encoding of moving picture |
JP2011176811A (en) * | 2010-02-25 | 2011-09-08 | Internatl Business Mach Corp <Ibm> | Method and apparatus for encoding surveillance video |
US8379726B2 (en) | 2007-08-29 | 2013-02-19 | Sony Corporation | Coding apparatus, coding method, decoding apparatus, and decoding method |
JP2013121079A (en) * | 2011-12-07 | 2013-06-17 | Renesas Electronics Corp | Encoding type determination device, moving image encoder, encoding type determination method, moving image encoding method and program |
JP2013138502A (en) * | 2013-03-04 | 2013-07-11 | Canon Inc | Coding apparatus, control method of the same, and computer program |
US20140079120A1 (en) * | 2012-09-19 | 2014-03-20 | Megachips Corporation | Moving image coding apparatus and moving image coding method |
US9106917B2 (en) | 2009-06-03 | 2015-08-11 | Fujitsu Limited | Video encoding apparatus and video encoding method |
JP2015228692A (en) * | 2009-10-05 | 2015-12-17 | トムソン ライセンシングThomson Licensing | Method and apparatus for encoding and decoding |
JP2016042615A (en) * | 2014-08-13 | 2016-03-31 | 沖電気工業株式会社 | Video coding device, method, and program |
US9313492B2 (en) | 2012-06-22 | 2016-04-12 | Fujitsu Limited | Device and method for moving image encoding |
US9560348B2 (en) | 2011-01-24 | 2017-01-31 | Sony Corporation | Image decoding device, image encoding device, and method thereof using a prediction quantization parameter |
EP3370419A1 (en) * | 2017-03-02 | 2018-09-05 | Axis AB | A video encoder and a method in a video encoder |
CN113613008A (en) * | 2021-08-20 | 2021-11-05 | 百果园技术(新加坡)有限公司 | Video encoding and decoding method and device, electronic equipment and storage medium |
WO2022196133A1 (en) | 2021-03-19 | 2022-09-22 | キヤノン株式会社 | Encoding device and method |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150055697A1 (en) * | 2013-08-20 | 2015-02-26 | Media Tek Inc. | Method and Apparatus of Transform Process for Video Coding |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1075453A (en) * | 1996-08-30 | 1998-03-17 | Sony Corp | Device and method for detecting motion vector |
-
2004
- 2004-09-24 JP JP2004276393A patent/JP4529615B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1075453A (en) * | 1996-08-30 | 1998-03-17 | Sony Corp | Device and method for detecting motion vector |
Cited By (39)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008017225A (en) * | 2006-07-06 | 2008-01-24 | Toshiba Corp | Communication terminal device |
US8290041B2 (en) | 2006-07-06 | 2012-10-16 | Kabushiki Kaisha Toshiba | Communication terminal |
KR100829169B1 (en) | 2006-07-07 | 2008-05-13 | 주식회사 리버트론 | Apparatus and method for estimating compression modes for H.264 codings |
JP2008124699A (en) * | 2006-11-10 | 2008-05-29 | Sharp Corp | Encoding apparatus, encoding method and program |
KR100900316B1 (en) | 2006-12-06 | 2009-06-02 | 한국전자통신연구원 | Method and Apparatus for Intra mode prediction searching for compression of real time video signal |
US20080181311A1 (en) * | 2007-01-31 | 2008-07-31 | Sony Corporation | Video system |
US8737485B2 (en) * | 2007-01-31 | 2014-05-27 | Sony Corporation | Video coding mode selection system |
JP4571955B2 (en) * | 2007-02-07 | 2010-10-27 | 日本電信電話株式会社 | Adaptive deblocking processing method, apparatus, adaptive deblocking processing program, and computer-readable recording medium |
JP2008193548A (en) * | 2007-02-07 | 2008-08-21 | Nippon Telegr & Teleph Corp <Ntt> | Adaptive deblocking processing method, device, and adaptive deblocking processing program, and computer readable recording medium |
JP4748603B2 (en) * | 2007-02-28 | 2011-08-17 | 株式会社Kddi研究所 | Video encoding device |
JP2008219147A (en) * | 2007-02-28 | 2008-09-18 | Kddi R & D Laboratories Inc | Dynamic image coding apparatus |
US8379726B2 (en) | 2007-08-29 | 2013-02-19 | Sony Corporation | Coding apparatus, coding method, decoding apparatus, and decoding method |
JP2010541469A (en) * | 2007-10-05 | 2010-12-24 | トムソン ライセンシング | Method and apparatus for rate control accuracy in video encoding and decoding |
US9979972B2 (en) | 2007-10-05 | 2018-05-22 | Thomson Licensing Dtv | Method and apparatus for rate control accuracy in video encoding and decoding |
KR100930164B1 (en) | 2007-11-29 | 2009-12-07 | 주식회사 창해에너지어링 | Fast rate-distortion optimization method |
US9106917B2 (en) | 2009-06-03 | 2015-08-11 | Fujitsu Limited | Video encoding apparatus and video encoding method |
US8588301B2 (en) | 2009-07-01 | 2013-11-19 | Canon Kabushiki Kaisha | Image coding apparatus, control method therefor and computer program |
JP2011015171A (en) * | 2009-07-01 | 2011-01-20 | Canon Inc | Coding apparatus, control method for the same, and computer program |
JP2015228692A (en) * | 2009-10-05 | 2015-12-17 | トムソン ライセンシングThomson Licensing | Method and apparatus for encoding and decoding |
US10291938B2 (en) | 2009-10-05 | 2019-05-14 | Interdigital Madison Patent Holdings | Methods and apparatus for adaptive filtering of prediction pixels for chroma components in video encoding and decoding |
JP2011151655A (en) * | 2010-01-22 | 2011-08-04 | Mitsubishi Electric Corp | Apparatus, method and program for encoding of moving picture |
JP2011176811A (en) * | 2010-02-25 | 2011-09-08 | Internatl Business Mach Corp <Ibm> | Method and apparatus for encoding surveillance video |
US9426477B2 (en) | 2010-02-25 | 2016-08-23 | International Business Machines Corporation | Method and apparatus for encoding surveillance video |
KR20180053425A (en) | 2011-01-24 | 2018-05-21 | 소니 주식회사 | Image encoding apparatus and image encoding method |
US10419761B2 (en) | 2011-01-24 | 2019-09-17 | Sony Corporation | Image decoding device, image encoding device, and method thereof |
EP3512198A1 (en) | 2011-01-24 | 2019-07-17 | Sony Corporation | Image decoding device, image encoding device, and method thereof |
US9560348B2 (en) | 2011-01-24 | 2017-01-31 | Sony Corporation | Image decoding device, image encoding device, and method thereof using a prediction quantization parameter |
JP2013121079A (en) * | 2011-12-07 | 2013-06-17 | Renesas Electronics Corp | Encoding type determination device, moving image encoder, encoding type determination method, moving image encoding method and program |
US9313492B2 (en) | 2012-06-22 | 2016-04-12 | Fujitsu Limited | Device and method for moving image encoding |
US9749624B2 (en) | 2012-09-19 | 2017-08-29 | Megachips Corporation | Moving image coding apparatus and moving image coding method |
US20140079120A1 (en) * | 2012-09-19 | 2014-03-20 | Megachips Corporation | Moving image coding apparatus and moving image coding method |
JP2014060666A (en) * | 2012-09-19 | 2014-04-03 | Mega Chips Corp | Moving picture encoder, moving picture encoding method and program |
JP2013138502A (en) * | 2013-03-04 | 2013-07-11 | Canon Inc | Coding apparatus, control method of the same, and computer program |
JP2016042615A (en) * | 2014-08-13 | 2016-03-31 | 沖電気工業株式会社 | Video coding device, method, and program |
EP3370419A1 (en) * | 2017-03-02 | 2018-09-05 | Axis AB | A video encoder and a method in a video encoder |
US10334267B2 (en) | 2017-03-02 | 2019-06-25 | Axis Ab | Video encoder and a method in a video encoder |
WO2022196133A1 (en) | 2021-03-19 | 2022-09-22 | キヤノン株式会社 | Encoding device and method |
KR20230144056A (en) | 2021-03-19 | 2023-10-13 | 캐논 가부시끼가이샤 | Encoding device and method |
CN113613008A (en) * | 2021-08-20 | 2021-11-05 | 百果园技术(新加坡)有限公司 | Video encoding and decoding method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
JP4529615B2 (en) | 2010-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4529615B2 (en) | Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program | |
JP4650173B2 (en) | Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program | |
JP4247680B2 (en) | Encoding apparatus, encoding method, encoding method program, and recording medium recording the encoding method program | |
JP4851741B2 (en) | Method and apparatus for encoding a sequence of source images | |
US9020294B2 (en) | Spatiotemporal metrics for rate distortion optimization | |
CA2703775C (en) | Method and apparatus for selecting a coding mode | |
Kamp et al. | Multihypothesis prediction using decoder side-motion vector derivation in inter-frame video coding | |
KR20170032894A (en) | Video decoding method and computer readable redording meduim for performing intra prediction using adaptive filter | |
KR100727990B1 (en) | Intra prediction encoding method and encoder thereof | |
US8780994B2 (en) | Apparatus, method, and computer program for image encoding with intra-mode prediction | |
JP4690966B2 (en) | Video encoding device | |
KR20120079180A (en) | Dynamic image decoding method and device | |
US20120147960A1 (en) | Image Processing Apparatus and Method | |
KR20070057212A (en) | Encoder, encoding method, program of encoding method and recording medium wherein program of encoding method is recorded | |
KR20050074286A (en) | Image encoding device, image encoding method and image encoding program | |
KR20130026436A (en) | Image encoding device, image decoding device, image encoding method, and image decoding method | |
WO2012098845A1 (en) | Image encoding method, image encoding device, image decoding method, and image decoding device | |
WO2015015436A2 (en) | System and method for performing optimal temporal predictive mode decision in h.264 video coding | |
JP5100572B2 (en) | Encoder | |
EP0982951B1 (en) | Picture compression process | |
KR101138736B1 (en) | Encoder and method for selecting candidate mode types | |
KR100807330B1 (en) | Method for skipping intra macroblock mode of h.264/avc encoder | |
KR100785773B1 (en) | An estimation method for CBP and a block mode decision method using estimated CBP on a moving picture encoding system | |
JP4277530B2 (en) | Image processing apparatus and encoding apparatus and methods thereof | |
JP5513333B2 (en) | Moving picture coding apparatus, moving picture coding method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070508 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20090331 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20090402 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090507 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090519 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090717 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100518 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100531 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130618 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |