JP4154903B2 - Image processing apparatus, image processing method, program, and recording medium - Google Patents
Image processing apparatus, image processing method, program, and recording medium Download PDFInfo
- Publication number
- JP4154903B2 JP4154903B2 JP2002061401A JP2002061401A JP4154903B2 JP 4154903 B2 JP4154903 B2 JP 4154903B2 JP 2002061401 A JP2002061401 A JP 2002061401A JP 2002061401 A JP2002061401 A JP 2002061401A JP 4154903 B2 JP4154903 B2 JP 4154903B2
- Authority
- JP
- Japan
- Prior art keywords
- block
- dimensional dct
- coefficient
- pixel
- pixels
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、画像処理装置および画像処理方法、並びにプログラムおよび記録媒体に関し、特に、例えば、画像データをMPEG符号化した符号化データを、高画質の画像データに復号することができるようにする画像処理装置および画像処理方法、並びにプログラムおよび記録媒体に関する。
【0002】
【従来の技術】
MPEG(Moving Picture Experts Group)1や2等の符号化方式では、画像データが、8×8画素のブロック単位で、DCT(Discrete Cosine Transform)変換され、さらに量子化されることにより、符号化データとされる。このため、MPEGの規格に準拠したMPEGデコーダでは、符号化データが、逆量子化され、さらに逆DCT変換されることにより復号される。
【0003】
上述のように、MPEG符号化方式では、画像データが、ブロック単位でDCT変換され、その結果得られるDCT係数が量子化されるため、MPEGの規格に準拠したMPEGデコーダにおいて得られる復号画像には、符号化時の量子化の影響により、ブロック歪みやモスキートノイズといった各種の歪みが生じる。
【0004】
復号画像に生じる歪みを低減する方法としては、例えば、特開平11−187400号公報や特開平11−205792号公報に記載されているように、復号画像に対して後処理を施すことにより、その復号画像に生じている歪みを検知して補正する方法がある。
【0005】
【発明が解決しようとする課題】
しかしながら、上述のように、歪みを検知して補正する方法では、ブロック境界の位置を検出する必要がある。さらに、符号化データが、MPEG2方式で画像データを符号化したものである場合には、マクロブロック単位で設定可能なDCTタイプが、フレームDCTまたはフィールドDCTのうちのいずれであったかを判別する必要もある。従って、ブロック境界の位置の検出や、DCTタイプの判別を誤ると、復号画像に生じている歪みを、十分に除去することが困難なことがある。
【0006】
さらに、上述の方法は、復号画像に生じる歪み波形の基底をなすコサイン波形の位相とは無関係に、補正のためのフィルタ処理を施すものとなっており、従って、必ずしも、最適な歪み除去方式とは言えない。
【0007】
本発明は、このような状況に鑑みてなされたものであり、各種の歪みを十分に低減した高画質の復号画像を得ることができるようにするものである。
【0008】
【課題を解決するための手段】
本発明の第1の画像処理装置は、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得手段と、注目画素を含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、取得手段において取得された演算係数との積和演算に用いる幾つかの値の集合として生成する生成手段と、注目画素のクラスに対応した演算係数と、値の集合との積和演算を行うことにより、注目画素の画素値を求めることで、符号化された画像データを復号する予測演算手段とを備え、所定の学習処理は、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成し、値の集合と演算係数の積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める処理であることを特徴とする。
【0009】
本発明の第1の画像処理方法は、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得ステップと、注目画素を含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、取得手段において取得された演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、注目画素のクラスに対応した演算係数と、値の集合との積和演算を行うことにより、注目画素の画素値を求めることで、符号化された画像データを復号する予測演算ステップとを備え、所定の学習処理は、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成し、値の集合と演算係数の積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める処理であることを特徴とする。
【0010】
本発明の第1のプログラムは、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得ステップと、注目画素を含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、取得手段において取得された演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、注目画素のクラスに対応した演算係数と、値の集合との積和演算を行うことにより、注目画素の画素値を求めることで、符号化された画像データを復号する予測演算ステップとを備え、所定の学習処理は、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成し、値の集合と演算係数の積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める処理であることを特徴とする。
【0011】
本発明の第1の記録媒体は、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得ステップと、注目画素を含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、取得手段において取得された演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、注目画素のクラスに対応した演算係数と、値の集合との積和演算を行うことにより、注目画素の画素値を求めることで、符号化された画像データを復号する予測演算ステップとをコンピュータに実行させるためのプログラムを記録し、所定の学習処理は、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成し、値の集合と演算係数の積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める処理であるコンピュータ読み取り可能なものである。
【0012】
本発明の第2の画像処理装置は、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして出力する生徒データ生成手段と、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類手段と、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成する生成手段と、値の集合と演算係数の積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める学習を行う学習手段とを備えることを特徴とする。
【0013】
本発明の第2の画像処理方法は、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして出力する生徒データ生成ステップと、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、値の集合と演算係数との積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める学習を行う学習ステップとを備えることを特徴とする。
【0014】
本発明の第2のプログラムは、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして出力する生徒データ生成ステップと、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、値の集合と演算係数との積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める学習を行う学習ステップとを備えることを特徴とする。
【0015】
本発明の第2の記録媒体は、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして出力する生徒データ生成ステップと、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、値の集合と演算係数との積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める学習を行う学習ステップとをコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能なものである。
【0016】
本発明の第1の画像処理装置および画像処理方法、並びにプログラムおよび記録媒体においては、学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものが取得され、その注目画素を含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とが、演算係数との積和演算に用いる幾つかの値の集合として生成される。そして、注目画素のクラスに対応した演算係数と、値の集合との積和演算を行うことにより、注目画素の画素値を求めることで、符号化された画像データが復号される。また、所定の学習処理は、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、演算係数との積和演算に用いる幾つかの値の集合として生成し、値の集合と演算係数の積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数を、クラスごとに求める処理である。
【0017】
本発明の第2の画像処理装置および画像処理方法、並びにプログラムおよび記録媒体においては、学習の教師となる画像データである教師データが、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データが、学習の生徒となる生徒データとして出力される。また、教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類が行われる。そして、教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの2次元DCT係数と、注目ブロックの周辺のブロックである周辺ブロックの2次元DCT係数を逆2次元DCT変換して得られる画素値情報または周辺ブロックのDCT係数の特定の周波数成分または周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とが、演算係数との積和演算に用いる幾つかの値の集合として生成され、値の集合と演算係数との積和演算を行うことにより得られる注目教師データの予測値の予測誤差を、統計的に最小にする演算係数が、クラスごとに求められる。
【0018】
【発明の実施の形態】
以下、本発明の実施の形態について説明するが、その前に、MPEGに準拠した復号方式について、簡単に説明する。
【0019】
図1は、例えば、MPEG2方式で符号化された符号化データを、MPEGに準拠して復号するMPEGデコーダの構成例を示している。
【0020】
画像データをMPEG2方式で符号化することにより得られる符号化データ(ビデオストリーム)は、分離部1に供給される。分離部1は、符号化データから、コーデッドブロックパターン(Coded Block Pattern)(以下、適宜、CBPという)、DCTタイプ、量子化されたDCT係数のVLC(可変長符号化)コード、量子化スケール、動きベクトル、動き補償タイプ(frame motion type, field motion type)等を分離して出力する。
【0021】
DCT係数抽出/逆量子化部2は、分離部1が出力する、量子化されたDCT係数(以下、適宜、量子化DCT係数という)のVLCコード、量子化スケール、およびDCTタイプを受信し、DCT係数を復号する。即ち、DCT係数抽出/逆量子化部2は、分離部1が出力する量子化DCT係数のVLCコードを可変長復号し、8×8画素のブロックごとの量子化DCT係数を求める。さらに、DCT係数抽出/逆量子化部2は、ブロックごとの量子化DCT係数を、分離部1が出力する量子化スケールによって逆量子化し、ブロックごとのDCT係数を求める。DCT係数抽出/逆量子化部2で得られたブロックごとのDCT係数は、逆DCT変換部3に供給される。
【0022】
逆DCT変換部3は、DCT係数抽出/逆量子化部2からのブロックごとのDCT係数を逆DCT変換し、動き補償加算部6に供給する。
【0023】
動き補償加算部6には、逆DCT変換部3が出力する逆DCT変換結果の他、分離部1が出力するCBPおよびDCTタイプが供給される。動き補償加算部6は、CBPやDCTタイプに基づき、必要に応じて、逆DCT変換部3からの逆DCT結果に対して、画像メモリ5に記憶された予測画像を加算することで、8×8の画素値のブロックを復号して出力する。
【0024】
即ち、MPEG符号化では、Iピクチャのブロックは、イントラ(intra)符号化され、Pピクチャのブロックは、イントラ符号化、または前方予測符号化され、Bピクチャのブロックは、イントラ符号化、前方予測符号化、後方予測符号化、または両方向予測符号化される。
【0025】
ここで、前方予測符号化では、符号化対象のブロックのフレーム(またはフィールド)より時間的に先行するフレーム(またはフィールド)の画像を参照画像として、その参照画像を動き補償することにより得られる、符号化対象のブロックの予測画像と、符号化対象のブロックとの差分が求められ、その差分値(以下、適宜、残差画像という)がDCT変換される。
【0026】
また、後方予測符号化では、符号化対象のブロックのフレームより時間的に後行するフレームの画像を参照画像として、その参照画像を動き補償することにより得られる、符号化対象のブロックの予測画像と、符号化対象のブロックとの差分が求められ、その差分値(残差画像)がDCT変換される。
【0027】
さらに、両方向予測符号化では、符号化対象のブロックのフレームより時間的に先行するフレームと後行するフレームの2フレーム(またはフィールド)の画像を参照画像として、その参照画像を動き補償することにより得られる、符号化対象のブロックの予測画像と、符号化対象のブロックとの差分が求められ、その差分値(残差画像)がDCT変換される。
【0028】
従って、ブロックが、ノンイントラ(non-intra)符号化(前方予測符号化、後方予測符号化、または両方向予測符号化)されている場合、逆DCT変換部3が出力する逆DCT変換結果は、残差画像(元の画像と、その予測画像との差分値)であり、動き補償加算部6は、この残差画像と、画像メモリ5に記憶された予測画像とを加算することで、ノンイントラ符号化されたブロックを復号する。
【0029】
一方、動き補償加算部6は、逆DCT変換部4が出力するブロックが、イントラ符号化されたものであった場合には、そのブロックを、そのまま復号結果とする。
【0030】
動き補償加算部6は、1フレーム(またはフィールド)分のブロックの復号結果、即ち、1フレーム(またはフィールド)の復号画像を得ると、その復号画像を、画像メモリ(I,Pピクチャ用画像メモリ)7と、ピクチャ選択部8に供給する。
【0031】
画像メモリ7は、動き補償加算部6から供給される復号画像が、IピクチャまたはPピクチャの画像である場合、その復号画像を、その後に復号される符号化データの参照画像として一時記憶する。なお、MPEG2では、Bピクチャは参照画像とされないことから、動き補償加算部6から供給される復号画像が、Bピクチャの画像である場合には、その復号画像は、画像メモリ7に記憶されない。
【0032】
ピクチャ選択部8は、動き補償加算部6が出力する復号画像、または画像メモリ7に記憶された復号画像のフレーム(またはフィールド)を、表示順に選択して出力する。即ち、MPEG2方式では、画像のフレーム(またはフィールド)の表示順と復号順(符号化順)とが一致していないため、ピクチャ選択部8は、復号順に並んでいる復号画像のフレーム(またはフィールド)を表示順に並べ替えて出力する。
【0033】
このようにして表示順の並びとされた復号画像は、例えば、図示せぬディスプレイ等に供給されて表示される。
【0034】
一方、動き補償部4は、分離部1が出力する動きベクトルや動き補償タイプを受信し、その動き補償タイプに基づいて、参照画像となるフレーム(またはフィールド)を、画像メモリ7から読み出す。さらに、動き補償部4は、画像メモリ7から読み出した参照画像に対して、分離部1が出力する動きベクトルにしたがった動き補償を施し、その結果得られる予測画像を、画像メモリ5に供給して記憶させる。
【0035】
このようにして画像メモリ5に記憶された予測画像は、上述したように、動き補償加算部6において、逆DCT変換部3が出力する残差画像と加算される。
【0036】
なお、図1のMPEGデコーダにおいては、各ブロックにおける遅延時間を吸収するためのタイミング調整用のメモリと同期信号を必要とするが、その図示は、省略してある。後述する画像処理装置や学習装置においても同様である。
【0037】
次に、図2は、本発明を適用した画像処理装置の一実施の形態の構成例を示している。なお、図中、図1のMPEGデコーダにおける場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。
【0038】
図2の画像処理装置は、前処理部11、バッファメモリ12、クラス分類部13、タップ係数記憶部14、および画像再構成部15から構成されており、例えば、画像データをMPEG2方式で符号化することにより得られる符号化データ(ビットストリーム)を復号するようになっている。
【0039】
即ち、符号化データは、前処理部11に供給されるようになっている。また、前処理部11には、符号化データの他、画像再構成部15から、既に復号された画像が、参照画像として供給されるようになっている。
【0040】
前処理部11は、分離部1、DCT係数抽出/逆量子化部2、動き補償部4、画像メモリ5、DCT変換部21、周波数領域動き補償加算部22から構成されており、符号化データに対して、前処理を施すようになっている。
【0041】
即ち、DCT変換部21には、分離部1から、DCTタイプが供給されるとともに、画像メモリ5から、動き補償部4において参照画像に動き補償処理を施すことにより得られた予測画像が供給される。
【0042】
ここで、いま、復号の対象となっているブロックを、以下、適宜、注目ブロックという。
【0043】
また、以下、適宜、画素値で構成されるブロックを、画素ブロックというとともに、DCT係数で構成されるブロックを、DCTブロックという。
【0044】
さらに、以下、適宜、注目ブロックとなっている画素ブロックまたはDCTブロックを、それぞれ、注目画素ブロックまたは注目DCTブロックという。
【0045】
DCT変換部21は、分離部1から供給されるDCTタイプに基づき、DCT係数抽出/逆量子化部2が出力する注目ブロックのDCTタイプを認識する。さらに、DCT変換部21は、注目ブロックのDCTタイプに基づいて、画像メモリ5に記憶された予測画像から、ブロックと同一の大きさの8×8画素を選択し、DCT係数に変換する。この予測画像から得られたDCT係数(以下、適宜、予測DCT係数という)は、DCT変換部21から周波数領域動き補償加算部22に供給される。
【0046】
周波数領域動き補償加算部22には、DCT変換部21から、8×8の予測DCT係数が供給される他、分離部1から、注目ブロックを含むマクロブロック(以下、適宜、注目マクロブロックという)のCBPが供給されるとともに、DCT係数抽出/逆量子化部2から、注目ブロックが供給される。
【0047】
周波数領域動き補償加算部22は、注目マクロブロックのCBPに基づき、必要に応じて、注目ブロックの各DCT係数と、対応する予測DCT係数とを加算することで、注目ブロックの画素値をDCT変換した注目DCTブロックを求める。
【0048】
即ち、注目ブロックがイントラ符号化されているものである場合、その注目ブロックのDCT係数は、画素値のブロック(画素ブロック)をDCT変換したものとなっているから、周波数領域動き補償加算部22は、その注目ブロックを、そのまま、注目DCTブロックとする。
【0049】
また、注目ブロックがノンイントラ符号化されているものである場合、その注目ブロックは、画素値のブロック(画素ブロック)と、予測画像との差分値(残差画像)をDCT変換したものとなっているから、周波数領域動き補償加算部22は、その注目ブロックの各DCT係数と、DCT変換部21において8×8画素の予測画像をDCT変換して得られる8×8の予測DCT係数のうちの対応するものとを加算することにより、注目DCTブロックを求める。
【0050】
周波数領域動き補償加算部22において求められた注目DCTブロックは、分離部1が出力する、その注目DCTブロック(を含むマクロブロック)のDCTタイプと対応付けられ、前処理部11からバッファメモリ12に供給される。
【0051】
バッファメモリ12は、前処理部11から供給される注目DCTブロックとそのDCTタイプとのセットを、一時記憶する。なお、クラス分類部13では、後述するように、注目ブロックの情報の他、その注目ブロックの上下左右にそれぞれ隣接する4つのブロックの情報も用いて処理が行われるようになっている。このため、バッファメモリ12は、画面2行分のマクロブロックに、1つのマクロブロックを加えた分の2次元DCT係数およびDCTタイプを記憶することのできる記憶容量を、少なくとも有している。
【0052】
ここで、バッファメモリ12に記憶されるブロックのDCT係数は、前処理部11の周波数領域動き補償加算部22が出力するものであるから、ブロックのピクチャタイプによらず、また、ブロックがイントラ符号化またはノンイントラ符号化されたかによらず、元の画像の画素値(残差画像ではなく、元の画像)をDCT変換したものとなっている。
【0053】
なお、ここでいう元の画像は、残差画像と予測画像とを加算して得られるものを意味し、MPEG符号化の対象となった原画像そのものではない。
【0054】
クラス分類部13は、1次元逆DCT変換部31、隣接1次元DCT係数選択/変換部32、ACパワー算出部33、AC内積計算部34、クラスコード生成部36および37から構成され、バッファメモリ12に記憶されたブロックのDCT係数とDCTタイプに基づき、注目ブロックの各画素を、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行う。
【0055】
即ち、1次元逆DCT変換部31は、バッファメモリ12に記憶されたブロックのDCT係数を、1次元逆DCT変換することにより、水平方向の空間周波数成分を表す水平1次元DCT係数と、垂直方向の空間周波数成分を表す垂直1次元DCT係数とを求める。
【0056】
ここで、以下、適宜、垂直1次元DCT係数と水平1次元DCT係数とをまとめて、1次元DCT係数という。
【0057】
また、MPEG符号化された符号化データに含まれるDCT係数は、水平方向と垂直方向の2方向の空間周波数成分を表すものであり、1次元DCT係数と区別するために、以下、適宜、2次元DCT係数という。
【0058】
さらに、以下、適宜、画素値から2次元DCT係数への変換を、2次元DCT変換と、2次元DCT係数から画素値への変換を、2次元逆DCT変換と、それぞれいう。図2のDCT変換部21で行われるDCT変換は、2次元DCT変換であり、図1の逆DCT変換部3で行われる逆DCT変換は、2次元逆DCT変換である。
【0059】
1次元逆DCT変換部31で得られる1次元DCT係数は、隣接1次元DCT係数選択/変換部32、ACパワー算出部33、AC内積計算部34、およびクラスコード生成部36に供給される。
【0060】
隣接1次元DCT係数選択/変換部32は、バッファメモリ12から、注目ブロックのDCTタイプを受信し、そのDCTタイプに基づき、注目ブロックに隣接する画素(列)の1次元DCT係数(以下、適宜、隣接1次元DCT係数という)を、1次元逆DCT変換部31から供給される1次元DCT係数から取得し、ACパワー算出部33、AC内積計算部34、およびクラスコード生成部36に供給する。
【0061】
ACパワー算出部33は、1次元逆DCT係数変換部31から供給される1次元DCT係数の交流成分のパワー(以下、適宜、ACパワーという)を求めるとともに、隣接1次元DCT係数選択/変換部32から供給される1次元DCT係数のACパワーを求め、クラスコード生成部36および37に供給する。
【0062】
AC内積計算部34は、1次元逆DCT係数変換部31から供給される注目ブロックの境界部分の1次元DCT係数の交流成分と、隣接1次元DCT係数選択/変換部32から供給される隣接1次元DCT係数の交流成分とを、それぞれベクトルのコンポーネントとみなして、その2つのベクトルの内積(以下、適宜、AC内積という)を求める。AC内積計算部34で求められるAC内積は、クラスコード生成部36に供給される。
【0063】
クラスコード生成部36は、輝度信号Yのブロックを構成する画素のクラス分類を行い、クラスコード生成部37は、色差信号(色信号)Cのブロックを構成する画素のクラス分類を行う。
【0064】
ここで、符号化データは、例えば、カラーの画像データをMPEG符号化したものとなっている。
【0065】
そして、1次元逆DCT変換部31は、注目ブロックが輝度信号のブロックである場合の、その注目ブロックの1次元DCT係数を、隣接1次元DCT係数選択/変換部32は、注目ブロックが輝度信号のブロックである場合の、その注目ブロックに隣接する隣接1次元DCT係数を、ACパワー算出部33は、注目ブロックが輝度信号のブロックである場合の、その注目ブロックについて得られたACパワーを、AC内積計算部34は、注目ブロックが輝度信号のブロックである場合の、その注目ブロックについて得られたAC内積を、それぞれ、クラスコード生成部36に供給するようになっており、クラスコード生成部36は、そこに供給される情報に基づいて、注目ブロックの各画素をクラス分類する。
【0066】
さらに、クラスコード生成部36は、注目ブロックの輝度信号の画素のクラス分類を行うことにより得られるクラスを表すクラスコードを生成し、タップ係数記憶部14に供給する。ここで、クラスコード生成部36において得られる、輝度信号のブロックの画素についてのクラスコードを、以下、適宜、輝度クラスコードという。
【0067】
クラスコード生成部36が出力する注目ブロックの各画素についての輝度クラスコードは、クラスコード生成部37にも供給される。また、クラスコード生成部37には、ACパワー算出部33から、注目ブロックが色差信号のブロックである場合の、その注目ブロックについて得られたACパワーも供給されるようになっている。
【0068】
クラスコード生成部37は、ACパワー算出部33から供給される注目ブロックのACパワーと、クラスコード生成部36から供給される、色差信号の注目ブロックに対応する輝度信号のブロックの画素の輝度クラスコードとに基づいて、注目ブロックの各画素をクラス分類する。
【0069】
そして、クラスコード生成部37は、注目ブロックの色差信号の画素のクラス分類を行うことにより得られるクラスを表すクラスコードを生成し、タップ係数記憶部14に供給する。ここで、クラスコード生成部37において得られる、色差信号のブロックの画素についてのクラスコードを、以下、適宜、色差クラスコードという。
【0070】
タップ係数記憶部14は、タップ係数選択部41および42、並びに係数メモリ43および44から供給され、クラス分類部13のクラスコード生成部36または37から供給されるクラスコードに対応するタップ係数を取得し、画像再構成部15に供給する。
【0071】
即ち、タップ係数選択部41には、クラスコード生成部36が出力する輝度クラスコードが供給されるようになっており、タップ係数選択部42には、クラスコード生成部37が出力する色差クラスコードが供給されるようになっている。
【0072】
また、係数メモリ43には、輝度信号の画素について、後述する学習により得られたクラスごとのタップ係数が記憶されており、係数メモリ44には、色差信号の画素について、学習により得られたクラスごとのタップ係数が記憶されている。
【0073】
そして、タップ係数選択部41は、クラスコード生成部36から供給される輝度クラスコードを、係数メモリ43にアドレスとして与え、これにより、そのクラスコードに対応するクラスのタップ係数を、係数メモリ43から読み出させ、画像再構成部15の適応処理部51に供給させる。
【0074】
また、タップ係数選択部42は、クラスコード生成部37から供給される色差クラスコードを、係数メモリ44にアドレスとして与え、これにより、そのクラスコードに対応するクラスのタップ係数を、係数メモリ44から読み出させ、画像再構成部15の適応処理部51に供給させる。
【0075】
画像再構成部15は、画像メモリ7、ピクチャ選択部8、および適応処理部51から構成されており、バッファメモリ12に記憶された2次元DCT係数、並びにタップ係数記憶部14の係数メモリ43と44から供給されるタップ係数を用いて、画像を復号(再構成)する。
【0076】
即ち、適応処理部51は、バッファメモリ12に記憶された注目ブロックの2次元DCT係数を、タップ係数記憶部14の係数メモリ43と44から供給されるタップ係数を用いて適応処理することにより、注目ブロックの画素値に変換する。さらに、適応処理部51は、1フレーム(またはフィールド)分の画素値、即ち、1フレーム(またはフィールド)の画像データを復号すると、その復号画像データを、画像メモリ7とピクチャ選択部8に供給する。
【0077】
画像メモリ7は、適応処理部51から供給される復号画像データのうち、IピクチャとPピクチャの復号画像データを、参照画像として記憶する。ピクチャ選択部8は、適応処理部51から供給される復号画像データ、または画像メモリ7に記憶された復号画像データを、表示順で選択して出力する。
【0078】
ここで、適応処理部51では、上述したように、DCT係数を、タップ係数を用いて画素値に変換する適応処理が行われる。
【0079】
即ち、適応処理では、例えば、DCT係数と、所定のタップ係数との線形結合により、元の画素の予測値を求めることで、DCT係数が、元の画素値に復号される。
【0080】
具体的には、例えば、いま、画像の画素値を教師データとするとともに、その画像を、ブロック単位でDCT変換し、さらに量子化、逆量子化をして得られるDCT係数を生徒データとして、教師データである画素の画素値yの予測値E[y]を、幾つかのDCT係数x1,x2,・・・の集合と、所定のタップ係数w1,w2,・・・の線形結合により規定される線形1次結合モデルにより求めることを考える。この場合、予測値E[y]は、次式で表すことができる。
【0081】
【0082】
式(1)を一般化するために、タップ係数wjの集合でなる行列W、生徒データxijの集合でなる行列X、および予測値E[yj]の集合でなる行列Y’を、
【数1】
で定義すると、次のような観測方程式が成立する。
【0083】
XW=Y’・・・(2)
【0084】
ここで、行列Xの成分xijは、i件目の生徒データの集合(i件目の教師データyiの予測に用いる生徒データの集合)(予測タップ)の中のj番目の生徒データを意味し、行列Wの成分wjは、生徒データの集合の中のj番目の生徒データとの積が演算されるタップ係数を表す。また、yiは、i件目の教師データを表し、従って、E[yi]は、i件目の教師データの予測値を表す。なお、式(1)の左辺におけるyは、行列Yの成分yiのサフィックスiを省略したものであり、また、式(1)の右辺におけるx1,x2,・・・も、行列Xの成分xijのサフィックスiを省略したものである。
【0085】
式(2)の観測方程式に、例えば最小自乗法を適用して、元の画素値yに近い予測値E[y]を求めることを考える。この場合、教師データとなる真の画素値yの集合でなる行列Y、および画素値yに対する予測値E[y]の残差eの集合でなる行列Eを、
【数2】
で定義すると、式(2)から、次のような残差方程式が成立する。
【0086】
XW=Y+E・・・(3)
【0087】
この場合、元の画素値yに近い予測値E[y]を求めるためのタップ係数wjは、自乗誤差
【数3】
を最小にすることで求めることができる。
【0088】
従って、上述の自乗誤差をタップ係数wjで微分したものが0になる場合、即ち、次式を満たすタップ係数wjが、元の画素値yに近い予測値E[y]を求めるため最適値ということになる。
【0089】
【数4】
・・・(4)
【0090】
そこで、まず、式(3)を、タップ係数wjで微分することにより、次式が成立する。
【0091】
【数5】
・・・(5)
【0092】
式(4)および(5)より、式(6)が得られる。
【0093】
【数6】
・・・(6)
【0094】
さらに、式(3)の残差方程式における生徒データxij、タップ係数wj、教師データyi、および残差eiの関係を考慮すると、式(6)から、次のような正規方程式を得ることができる。
【0095】
【数7】
・・・(7)
【0096】
なお、式(7)に示した正規方程式は、行列(共分散行列)Aおよびベクトルvを、
【数8】
で定義するとともに、ベクトルWを、数1で示したように定義すると、式
AW=v・・・(8)
で表すことができる。
【0097】
式(7)における各正規方程式は、生徒データxijおよび教師データyiのセットを、ある程度の数だけ用意することで、求めるべきタップ係数wjの数Jと同じ数だけたてることができ、従って、式(8)を、ベクトルWについて解くことで(但し、式(8)を解くには、式(8)における行列Aが正則である必要がある)、最適なタップ係数(ここでは、自乗誤差を最小にするタップ係数)wjを求めることができる。なお、式(8)を解くにあたっては、例えば、掃き出し法(Gauss-Jordanの消去法)などを用いることが可能である。
【0098】
以上のようにして、最適なタップ係数、即ち、画素値の予測値の統計的な誤差を最小にするタップ係数wjを求めておき、さらに、そのタップ係数wjを用いて、式(1)により、元の画素値yに近い予測値E[y]を求めるのが適応処理である。
【0099】
なお、上述のように、画像の画素値を教師データとするとともに、その画像を、ブロック単位でDCT変換し、さらに量子化、逆量子化をして得られるDCT係数を生徒データとする場合には、DCT係数(画素値をDCT変換し、量子化し、さらに、逆量子化して得られるDCT係数)を、式(1)の線形予測演算によって、元の画素値(の予測値)に変換するのに最適なタップ係数を得ることができる。そして、DCT係数は、周波数領域のデータであり、画素値は時間領域の信号であるから、上述のようなタップ係数を用いて、DCT係数を画素値に変換する適応処理は、周波数(Frequency)と時間(Time)の頭文字をとって、FT変換と呼ぶことができる。
【0100】
ここで、上述の場合には、画像を2次元DCT変換し、さらに量子化、逆量子化して得られるDCT係数を生徒データとするとともに、原画像を教師データとして、タップ係数を求めるようにしたが、タップ係数は、その他、例えば、原画像を2次元DCT変換し、さらに量子化、逆量子化して得られるDCT係数を生徒データとするとともに、原画像を2次元DCT変換して得られるDCT係数を教師データとして求めるようにすることも可能である。この場合、量子化誤差のあるDCT係数を、量子化誤差のないDCT係数(の予測値)に変換するのに最適なタップ係数を得ることができる。
【0101】
また、タップ係数は、原画像を2次元DCT変換し、さらに、量子化、逆量子化、2次元逆DCT変換して得られる復号画像を生徒データとするとともに、原画像を教師データとして求めるようにすることも可能である。この場合、逆量子化および2次元逆DCT変換によって復号された画像を、原画像(の予測値)に変換するのに最適なタップ係数を得ることができる。
【0102】
即ち、適応処理によれば、教師データと生徒データとして、どのようなデータを採用するかによって、任意のデータ変換を行う(生徒データに対応するデータを、教師データに対応するデータに変換する)のに最適なタップ係数を得ることができる。
【0103】
次に、図3は、図2のDCT変換部21および周波数領域動き補償加算部22の構成例を示している。
【0104】
DCT変換部21は、(8×8画素)サンプリング部61とDCT部62から構成され、画像メモリ5に記憶された予測画像を2次元DCT変換した予測DCT係数を生成するようになっている。
【0105】
即ち、サンプリング部61には、画像メモリ5に記憶された予測画像と、分離部1(図2)が出力する注目ブロック(を含むマクロブロック)のDCTタイプが供給されるようになっている。
【0106】
ここで、画像メモリ5には、動き補償部4(図2)から、マクロブロックと同一の大きさである16×16画素の予測画像が供給されるようになっており、画像メモリ5は、注目ブロックに対応する16×16画素の予測画像を記憶する。従って、画像メモリ5は、少なくとも16×16画素の画像を記憶することのできる記憶容量を有している。
【0107】
サンプリング部61は、画像メモリ5に記憶された16×16画素の予測画像を、注目ブロックのDCTタイプにしたがってサンプリングし、ブロックと同一の大きさの8×8画素の予測画像を生成する。
【0108】
即ち、画像メモリ5に記憶された16×16画素の予測画像は、フレーム構造になっており、注目ブロックの構造と一致している場合と、一致していない場合とがある。
【0109】
具体的には、注目ブロックがフレーム構造である場合には、注目ブロックと、画像メモリ5に記憶された16×16画素の予測画像とは、一致した構造のものとなる。
【0110】
従って、注目ブロックが、図4Aに示すように、マクロブロック(注目マクロブロック)の左上、左下、右上、または右下のブロックである場合、サンプリング部61は、図4Bに示すように、画像メモリ5に記憶された16×16画素の予測画像のうち、左上、左下、右上、または右下の8×8画素を、それぞれサンプリングし、これにより、注目ブロックの各画素と空間的に対応する位置にある8×8画素の予測画像を得て、DCT部62に供給する。
【0111】
ここで、図4において(後述する図5においても同様)、影を付してあるラインは、奇数ライン(トップフィールド)を表し、影を付していないラインは、偶数ライン(ボトムフィールド)を表す。
【0112】
一方、注目ブロックがフィールド構造である場合は、注目ブロックと、画像メモリ5に記憶された16×16画素の予測画像とは、異なる構造のものとなる。
【0113】
即ち、この場合、注目ブロックを含むマクロブロック(注目マクロブロック)は、図5Aに示すように、上側の8ラインが奇数ライン(トップフィールド)で構成され、下側の8ラインが偶数ライン(ボトムフィールド)で構成される。
【0114】
従って、注目ブロックが、注目マクロブロックの左上のブロックである場合、その注目ブロックの8×8画素は、図5Bに示すように、画像メモリ5に記憶された16×16画素の予測画像のうちの、8つの奇数ライン(影を付してあるライン)の左側の8画素に対応する。また、注目ブロックが、注目マクロブロックの左下のブロックである場合、その注目ブロックの8×8画素は、図5Bに示すように、画像メモリ5に記憶された16×16画素の予測画像のうちの、8つの偶数ライン(影を付してないライン)の左側の8画素に対応する。さらに、注目ブロックが、注目マクロブロックの右上のブロックである場合には、その注目ブロックの8×8画素は、図5Bに示すように、画像メモリ5に記憶された16×16画素の予測画像のうちの、8つの奇数ライン(影を付してあるライン)の右側の8画素に対応し、また、注目ブロックが、注目マクロブロックの右下のブロックである場合には、その注目ブロックの8×8画素は、図5Bに示すように、画像メモリ5に記憶された16×16画素の予測画像のうちの、8つの偶数ライン(影を付してないライン)の右側の8画素に対応する。
【0115】
そこで、サンプリング部61は、注目ブロックが、フィールド構造である場合には、画像メモリ5に記憶された16×16画素の予測画像のうち、注目マクロブロックにおける注目ブロックの位置に対応する、上述のような8×8画素をサンプリングし、これにより、注目ブロックの各画素と空間的に対応する位置にある8×8画素の予測画像を得て、DCT部62に供給する。
【0116】
DCT部62は、サンプリング部61から供給される、注目ブロックの各画素と空間的に対応する位置にある8×8画素の予測画像を2次元DCT変換し、これにより、8×8の予測DCT係数を得て、周波数領域動き補償加算部22に供給する。
【0117】
なお、サンプリング部61において、注目ブロックの構造は、分離部1(図2)が出力する注目ブロック(を含む注目マクロブロック)のDCTタイプに基づいて認識される。
【0118】
図3において、周波数領域動き補償加算部22は、DCT係数選択部71、加算部72、および選択部73から構成され、DCT係数抽出/逆量子化部2(図2)から供給される注目ブロックの2次元DCT係数と、DCT変換部21から供給される予測DCT係数とを、必要に応じて加算することにより、注目ブロックの元の画像の2次元DCT係数を求める。
【0119】
即ち、DCT係数選択部71には、DCT係数抽出/逆量子化部2(図2)が出力する注目ブロックの2次元DCT係数と、分離部1(図2)が出力する注目ブロック(を含む注目マクロブロック)のCBPが供給されるようになっている。
【0120】
注目ブロックがイントラ符号化されたものである場合、その注目ブロックの2次元DCT係数は、注目ブロックの元の画像を2次元DCT変換したものであるから、DCT係数選択部71は、注目ブロックを、そのまま出力する。DCT係数選択部71の出力は、加算部72と選択部73に供給される。
【0121】
注目ブロックがイントラ符号化されたものである場合、加算部72は、特に処理を行わず、また、選択部73は、DCT係数選択部71の出力を選択し、後段のバッファメモリ12(図2)に供給する。
【0122】
従って、注目ブロックがイントラ符号化されたものである場合、即ち、DCT係数抽出/逆量子化部2(図2)が出力する注目ブロックの2次元DCT係数が、注目ブロックの元の画像を2次元DCT変換したものである場合には、DCT係数抽出/逆量子化部2(図2)が出力する注目ブロックが、そのまま、バッファメモリ12(図2)に供給される。
【0123】
一方、DCT係数選択部71は、注目ブロックがノンイントラ符号化されたものである場合、その注目ブロックのCBPを参照し、残差画像の2次元DCT係数の有無を認識する。即ち、注目ブロックがノンイントラ符号化されたものである場合には、その注目ブロックには、原則として、残差画像の2次元DCT係数が(ビデオストリーム中に)配置されるが、残差画像の2次元DCT係数がすべて0となるときには、CBPが0とされ、2次元DCT係数は配置されない。そして、この場合、注目ブロックの画像は、予測画像に一致する。
【0124】
そこで、DCT係数選択部71は、注目ブロックがノンイントラ符号化されたものであり、そのCBPが0である場合には、残差画像の2次元DCT係数として0を出力する。
【0125】
また、DCT係数選択部71は、注目ブロックがノンイントラ符号化されたものであり、そのCBPが1である場合、DCT係数抽出/逆量子化部2(図2)が出力する注目ブロックには、残差画像の2次元DCT係数が配置されているから、その2次元DCT係数を出力する。
【0126】
DCT係数選択部71の出力は、上述したように、加算部72と選択部73に供給される。
【0127】
加算部72は、注目ブロックがノンイントラ符号化されたものである場合、DCT係数選択部71の出力と、DCT変換部21(のDCT部62)が出力する予測画像の2次元DCT係数とを加算し、これにより、注目ブロックについて、元の画像の2次元DCT係数を得て、選択部73に供給する。
【0128】
選択部73は、注目ブロックがノンイントラ符号化されたものである場合、演算部72の出力を選択し、後段のバッファメモリ12(図2)に供給する。
【0129】
従って、注目ブロックがノンイントラ符号化されたものである場合において、注目ブロックのCBPが0であるときには、注目ブロックの画像が、予測画像に一致するため、加算部72において、DCT係数選択部71が出力する0と、DCT部62が出力する予測画像のDCT係数(予測DCT係数)とが加算されることにより、注目ブロックの元の画像の2次元DCT係数が求められる。
【0130】
また、注目ブロックのCBPが1であるときには、加算部72において、DCT係数選択部71が出力する注目ブロックの残差画像のDCT係数と、DCT部62が出力する予測画像のDCT係数(予測DCT係数)とが加算されることにより、やはり、注目ブロックの元の画像の2次元DCT係数が求められる。
【0131】
そして、選択部73では、加算部72において上述したようにして得られる、注目ブロックの元の画像の2次元DCT係数が選択されて出力される。
【0132】
なお、前処理部11(図2)では、周波数領域において、残差画像と予測画像とを加算して、元の画像の2次元DCT係数を求めるようにしたが、即ち、残差画像の2次元DCT係数と、予測画像の2次元DCT係数とを加算して、元の画像の2次元DCT係数を求めるようにしたが、これは、後段のクラス分類部13において、周波数領域のDCT係数を用いて処理を行うため、前処理部11とクラス分類部13の処理を、周波数領域で行うように統一した方が都合が良いと考えられるためである。
【0133】
従って、元の画像の2次元DCT係数は、残差画像と予測画像とを、時間領域において加算し、その加算結果を、2次元DCT変換することによって求めても良い。
【0134】
次に、図6および図7を参照して、図2の1次元逆DCT変換部31の処理について説明する。
【0135】
MPEGやJPEG(Joint Photographic Experts Group)等のDCT変換を利用した画像の符号化方式では、画像データが、水平方向および垂直方向の2次元のDCT変換(2次元DCT変換)/逆DCT変換(2次元逆DCT変換)が行われる。
【0136】
図6Aに示すような8×8画素のブロックにおける画素値を、8行×8列の行列Xで表すとともに、図6Bに示すような8×8のブロックにおけるDCT係数を、8行×8列の行列Fで表すこととすると、2次元DCT変換/2次元逆DCT変換は、次式で表すことができる。
【0137】
CXCT=F・・・(9)
CTFC=X・・・(10)
【0138】
ここで、上付のTは、転置を表す。また、Cは、8行×8列のDCT変換行列で、その第i+1行第j+1列のコンポーネントcijは、次式で表される。
【0139】
cij=Ai×cos((2j+1)×i×π/16)・・・(11)
【0140】
但し、式(11)において、i=0のときは、Ai=1/(2√2)であり、i≠0のときは、Ai=1/2である。また、iとjは、0乃至7の範囲の整数値である。
【0141】
式(9)は、画素値Xを、2次元DCT係数Fに変換する2次元DCT変換を表し、式(10)は、2次元DCT係数Fを、画素値Xに変換する2次元逆DCT変換を表す。
【0142】
従って、式(10)によれば、2次元DCT係数Fは、その左側から行列CTをかけるとともに、その右側から行列Cをかけることにより、画素値Xに変換されるが、1次元逆DCT変換部31は、2次元DCT係数Fに対して、その左側から行列CTをかけるだけか、または、その右側から行列Cをかけるだけかすることにより、1次元DCT係数を求める。
【0143】
即ち、1次元逆DCT変換部31は、2次元DCT係数Fに対して、その左側から行列CTだけをかける。この場合、図6Cに示すように、2次元DCT係数Fにおける垂直方向が空間領域に変換され、水平方向が周波数領域のままとされる垂直1次元逆DCT変換が行われることとなり、その結果、水平方向の空間周波数成分を表す水平1次元DCT係数vXhFを得ることができる。
【0144】
また、1次元逆DCT変換部31は、2次元DCT係数Fに対して、その右側から行列Cだけをかける。この場合、図6Dに示すように、2次元DCT係数Fにおける水平方向が空間領域に変換され、垂直方向が周波数領域のままとされる水平1次元逆DCT変換が行われることとなり、その結果、垂直方向の空間周波数成分を表す垂直1次元DCT係数hXvFを得ることができる。
【0145】
なお、横×縦が8×8の2次元DCT係数Fを、垂直1次元逆DCT変換した場合には、8×1の水平1次元DCT係数が、8セット(8行分)得られることになる(図6C)。また、2次元DCT係数Fを、水平1次元逆DCT変換した場合には、1×8の垂直1次元DCT係数が、8セット(8列分)得られることになる(図6D)。
【0146】
そして、ある行における8×1の水平1次元DCT係数については、その左端のDCT係数が、その行の8画素の画素値の直流成分(DC成分)(8画素の画素値の平均値)を表し、他の7つのDCT係数が、その行の水平方向の交流成分を表す。また、ある列における1×8の垂直1次元DCT係数については、その最上行のDCT係数が、その列の8画素の画素値の直流成分を表し、他の7つのDCT係数が、その列の垂直方向の交流成分を表す。
【0147】
ここで、式(9)によれば、水平1次元DCT係数は、2次元DCT係数Fに対応する画素値Xに対して、その右側から行列CTをかける水平1次元DCT変換を行うことによっても求めることができる。また、垂直1次元DCT係数は、2次元DCT係数Fに対応する画素値Xに対して、その左側から行列Cをかける垂直1次元DCT変換を行うことによっても求めることができる。
【0148】
図7は、実際の画像と、その画像についての2次元DCT係数、水平1次元DCT係数、および垂直1次元DCT係数を示している。
【0149】
なお、図7は、8×8ブロックの画像と、その画像についての2次元DCT係数、水平1次元DCT係数、および垂直1次元DCT係数を示している。また、図7Aが、実際の画像を、図7Bが、2次元DCT係数を、図7Cが、水平1次元DCT係数を、図7Dが、垂直1次元DCT係数を、それぞれ示している。
【0150】
ここで、図7Aの画像は、8ビットの画素値を有するものであり、そのような画素値から求められるDCT係数は、負の値も取り得る。但し、図7B乃至図7Dの実施の形態では、求められたDCT係数に対して、128(=27)を加算し、その加算値が0未満となるものは0にクリップするとともに、加算値が256以上となるものは255にクリップすることにより、0乃至255の範囲のDCT係数を、図示してある。
【0151】
2次元DCT係数には、8×8画素のブロック全体の情報が反映されているため、2次元DCT係数からでは、ブロック内の特定の画素の情報等の局所的な情報を把握するのは困難である。これに対して、水平1次元DCT係数または垂直1次元DCT係数には、ブロックのある1行または1列だけの情報が、それぞれ反映されているため、2次元DCT係数に比較して、ブロック内の局所的な情報を容易に把握することができる。
【0152】
即ち、ブロックのある行の特徴は、その行の8×1の水平1次元DCT係数から把握することができ、ある列の特徴は、その列の1×8の垂直1次元DCT係数から把握することができる。さらに、ブロックのある画素の特徴は、その画素が位置する行の8×1の水平1次元DCT係数と、その画素が位置する列の1×8の垂直1次元DCT係数とから把握することができる。
【0153】
また、左右に隣接するブロックどうしの境界の状態は、ブロック全体の情報が反映された2次元DCT係数よりも、ブロックの境界部分の垂直方向の空間周波数成分を表す垂直1次元DCT係数を用いた方が、より正確に把握することができる。さらに、上下に隣接するブロックどうしの境界の状態も、ブロック全体の情報が反映された2次元DCT係数よりも、ブロックの境界部分の水平方向の空間周波数成分を表す水平1次元DCT係数を用いた方が、より正確に把握することができる。
【0154】
次に、図2の隣接次元DCT係数選択/変換部32は、上述したように、1次元逆DCT変換部31から供給される1次元DCT係数の中から、注目ブロックに隣接する画素(列)の1次元DCT係数(隣接1次元DCT係数)を取得するが、この隣接1次元DCT係数は、注目ブロックと、その注目ブロックと空間的に隣接するブロック(以下、適宜、隣接ブロックという)との間のブロック境界の状態を分析するのに用いられるものであるため、空間領域において、注目ブロックの境界と隣接する画素列を1次元DCT変換したものである必要がある。
【0155】
しかしながら、MPEG2では、マクロブロック単位で、フレーム構造とフィールド構造の選択が可能であることから、注目ブロックを含む注目マクロブロックの構造や、注目マクロブロックに隣接するマクロブロック(以下、適宜、隣接マクロブロックという)の構造によっては、注目ブロックに隣接する隣接ブロックにおける、注目ブロックに隣接する1次元DCT係数が、空間領域において、注目ブロックの境界と隣接する画素列を1次元DCT変換したものとなっていない場合がある。
【0156】
そこで、隣接1次元DCT係数選択/変換部32は、バッファメモリ12から供給されるDCTタイプによって、注目ブロックと隣接ブロックの構造を認識し、注目ブロックの構造を基準として、空間領域において、その注目ブロックの境界と隣接する隣接ブロックの画素列を1次元DCT変換した1次元DCT係数(隣接1次元DCT係数)を取得するようになっている。
【0157】
ここで、図8乃至図23を参照して、注目ブロックの構造を基準とした場合に、空間領域において、その注目ブロックの境界と隣接する隣接ブロックの画素列を1次元DCT変換したものとなる1次元DCT係数について説明する。
【0158】
なお、図8乃至図23では、注目マクロブロックをMBNと、注目マクロブロックMBNの上下左右に隣接するマクロブロックを、それぞれMBU,MBD,MBL,MBRと表す。
【0159】
さらに、注目マクロブロックMBNの左上、左下、右上、右下のブロックを、それぞれ、BNUL,BNDL,BNUR,BNDRと表し、上隣接マクロブロック(注目ブロックの上に隣接するマクロブロック)MBUの左上、左下、右上、右下のブロックを、それぞれ、BUUL,BUDL,BUUR,BUDRと表す。また、下隣接マクロブロック(注目ブロックの下に隣接するマクロブロック)MBDの左上、左下、右上、右下のブロックを、それぞれ、BDUL,BDDL,BDUR,BDDRと表し、左隣接マクロブロック(注目ブロックの左に隣接するマクロブロック)MBLの左上、左下、右上、右下のブロックを、それぞれ、BLUL,BLDL,BLUR,BLDRと表す。さらに、右隣接マクロブロック(注目ブロックの右に隣接するマクロブロック)MBRの左上、左下、右上、右下のブロックを、それぞれ、BRUL,BRDL,BRUR,BRDRと表す。
【0160】
図8は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの上側の境界、即ち、最上行の8画素に隣接する隣接ブロックの画素列(以下、適宜、上隣接画素列という)を示している。
【0161】
なお、図8において、影を付してあるラインが、注目ブロックBNULの最上行の画素列を表し、斜線を付してあるラインが、上隣接画素列を表している。
【0162】
注目マクロブロックMBNの左上のブロックBNULが注目ブロックである場合の上に隣接するブロックは、注目マクロブロックMBNの中のブロックではない上隣接マクロブロックMBUの左下のブロックBUDLとなるから、注目ブロックBNULの最上行の画素列の上に隣接する上隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、上隣接マクロブロックMBUの両方の構造を考慮する必要がある。
【0163】
即ち、注目マクロブロックMBNと上隣接マクロブロックMBUのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの左上の8×8画素であり、図8Aに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最上行の水平1次元DCT係数に対し、空間領域において上側に隣接する画素列の水平1次元DCT係数(以下、適宜、上隣接1次元DCT係数という)は、ブロックBUDLの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0164】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、上隣接マクロブロックMBUのDCTタイプが、フィールドDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの左上の8×8画素であり、図8Bに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フィールド構造の上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUDLの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0165】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプが、フレームDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの8つの奇数ラインの左側の8画素であり、図8Cに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の上隣接マクロブロックMBUの左下ブロックBUDLの第7行目(上から7行目)の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUDLの第7行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0166】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプも、フィールドDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの8つの奇数ラインの左側の8画素であり、図8Dに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フィールド構造の上隣接マクロブロックMBUの左上のブロックBUULの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUULの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0167】
次に、図9は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの下側の境界、即ち、最下行の8画素に隣接する隣接ブロックの画素列(以下、適宜、下隣接画素列という)を示している。
【0168】
なお、図9において、影を付してあるラインが、注目ブロックBNULの最下行の画素列を表し、斜線を付してあるラインが、下隣接画素列を表している。
【0169】
注目マクロブロックMBNの左上のブロックBNULが注目ブロックである場合の下に隣接するブロックは、注目マクロブロックMBNの中の左下のブロックBNDLとなるから、注目ブロックBNULの最下行の画素列の下に隣接する下隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNの構造のみを考慮すれば良い。
【0170】
即ち、注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの左上の8×8画素であり、図9Aに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フレーム構造の注目マクロブロックMBNの左下のブロックBNDLの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最下行の水平1次元DCT係数に対し、空間領域において下側に隣接する画素列の水平1次元DCT係数(以下、適宜、下隣接1次元DCT係数という)は、ブロックBNDLの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0171】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、注目ブロックBNULは、注目マクロブロックMBNの8つの奇数ラインの左側の8画素であり、図9Bに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フィールド構造の注目マクロブロックMBNの下に隣接する下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDULの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0172】
次に、図10は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの左側の境界、即ち、最左列の8画素に隣接する隣接ブロックの画素列(以下、適宜、左隣接画素列という)を示している。
【0173】
なお、図10において、影を付してあるラインが、注目ブロックBNULの最左列の画素列を表し、斜線を付してあるラインが、左隣接画素列を表している。
【0174】
注目マクロブロックMBNの左上のブロックBNULが注目ブロックである場合の左に隣接するブロックは、注目マクロブロックMBNの中のブロックではない左隣接マクロブロックMBLの右上のブロックBLURとなるから、注目ブロックBNULの最左列の画素列の左に隣接する左隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、左隣接マクロブロックMBLの両方の構造を考慮する必要がある。
【0175】
即ち、注目マクロブロックMBNと左隣接マクロブロックMBUのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの左上の8×8画素であり、図10Aに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フレーム構造の左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最左列の垂直1次元DCT係数に対し、空間領域において左側に隣接する画素列の垂直1次元DCT係数(以下、適宜、左隣接1次元DCT係数という)は、ブロックBLURの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0176】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、左隣接マクロブロックMBLのDCTタイプが、フィールドDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの左上の8×8画素であり、図10Bに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フィールド構造の左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の上4画素と、その右下のブロックBLDRにおける最右列の上4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBLURにおける最右列の上4画素とブロックBLDRにおける最右列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0177】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプが、フレームDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの8つの奇数ラインの左側の8画素であり、図10Cに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フレーム構造の左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の奇数行の4画素と、その右下のブロックBLDRにおける奇数行の4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBLURにおける最右列の奇数行の4画素とブロックBLDRにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0178】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプも、フィールドDCTの場合は、注目ブロックBNULは、注目マクロブロックMBNの8つの奇数ラインの左側の8画素であり、図10Dに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フィールド構造の左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBLURの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0179】
次に、図11は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの右側の境界、即ち、最右列の8画素に隣接する隣接ブロックの画素列(以下、適宜、右隣接画素列という)を示している。
【0180】
なお、図11において、影を付してあるラインが、注目ブロックBNULの最右列の画素列を表し、斜線を付してあるラインが、右隣接画素列を表している。
【0181】
注目マクロブロックMBNの左上のブロックBNULが注目ブロックである場合の右に隣接するブロックは、注目マクロブロックMBNの中の右上のブロックBNURになるから、注目ブロックBNULの最右列の画素列の右に隣接する右隣接画素列は、必ず、ブロックNURの最左列の8画素となるので、注目マクロブロックMBNや、その注目マクロブロックMBNに隣接するマクロブロックの構造を考慮する必要はない。
【0182】
即ち、注目マクロブロックMBNの左上のブロックBNULが注目ブロックである場合には、図11に示すように、その最右列の8画素(影を付してある部分)は、空間領域において、注目ブロックBNULの右隣のブロックBNURの最左列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNULの最右列の垂直1次元DCT係数に対し、空間領域において右側に隣接する画素列の垂直1次元DCT係数(以下、適宜、右隣接1次元DCT係数という)は、ブロックBNURの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0183】
次に、図12は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの上側の境界、即ち、最上行の8画素に隣接する隣接ブロックの画素列(上隣接画素列)を示している。
【0184】
なお、図12において、影を付してあるラインが、注目ブロックBNDLの最上行の画素列を表し、斜線を付してあるラインが、上隣接画素列を表している。
【0185】
注目マクロブロックMBNの左下のブロックBNDLが注目ブロックである場合の上に隣接するブロックは、注目マクロブロックMBNの中の左上のブロックBNULとなるから、注目ブロックBNDLの最上行の画素列の上に隣接する上隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNの構造のみを考慮すれば良い。
【0186】
即ち、注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの左下の8×8画素であり、図12Aに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の注目マクロブロックMBNの左上ブロックBNULの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBNULの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0187】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、注目ブロックBNDLは、注目マクロブロックMBNの8つの偶数ラインの左側の8画素であり、図12Bに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の注目マクロブロックMBNの上に隣接する上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUDLの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0188】
次に、図13は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの下側の境界、即ち、最下行の8画素に隣接する隣接ブロックの画素列(下隣接画素列)を示している。
【0189】
なお、図13において、影を付してあるラインが、注目ブロックBNDLの最下行の画素列を表し、斜線を付してあるラインが、下隣接画素列を表している。
【0190】
注目マクロブロックMBNの左下のブロックBNDLが注目ブロックである場合の下に隣接するブロックは、注目マクロブロックMBNの中のブロックではない下隣接マクロブロックMBDの左上のブロックBDULとなるから、注目ブロックBNDLの最下行の画素列の下に隣接する下隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、下隣接マクロブロックMBDの両方の構造を考慮する必要がある。
【0191】
即ち、注目マクロブロックMBNと下隣接マクロブロックMBDのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの左下の8×8画素であり、図13Aに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フレーム構造の下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDULの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0192】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、下隣接マクロブロックMBDのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの左下の8×8画素であり、図13Bに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フィールド構造の下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDULの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0193】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプが、フレームDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの8つの偶数ラインの左側の8画素であり、図13Cに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フレーム構造の下隣接マクロブロックMBDの左上のブロックBDULの第2行目の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDULの第2行目の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0194】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの8つの偶数ラインの左側の8画素であり、図13Dに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フィールド構造の下隣接マクロブロックMBDの左下のブロックBDDLの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDDLの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0195】
次に、図14は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの左側の境界、即ち、最左列の8画素に隣接する隣接ブロックの画素列(左隣接画素列)を示している。
【0196】
なお、図14において、影を付してあるラインが、注目ブロックBNDLの最左列の画素列を表し、斜線を付してあるラインが、左隣接画素列を表している。
【0197】
注目マクロブロックMBNの左下のブロックBNDLが注目ブロックである場合の左に隣接するブロックは、注目マクロブロックMBNの中のブロックではない左隣接マクロブロックMBLの右下のブロックBLDRとなるから、注目ブロックBNDLの最左列の画素列の左に隣接する左隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、左隣接マクロブロックMBLの両方の構造を考慮する必要がある。
【0198】
即ち、注目マクロブロックMBNと左隣接マクロブロックMBLのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの左下の8×8画素であり、図14Aに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フレーム構造の左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBLDRの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0199】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、左隣接マクロブロックMBLのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの左下の8×8画素であり、図14Bに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フィールド構造の左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の下4画素と、その右下のブロックBLDRにおける最右列の下4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBLURにおける最右列の下4画素とブロックBLDRにおける最右列の下4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0200】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプが、フレームDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの8つの偶数ラインの左側の8画素であり、図14Cに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フレーム構造の左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の偶数行の4画素と、その右下のブロックBLDRにおける偶数行の4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBLURにおける最右列の偶数行の4画素とブロックBLDRにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0201】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDLは、注目マクロブロックMBNの8つの偶数ラインの左側の8画素であり、図14Dに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フィールド構造の左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBLDRの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0202】
次に、図15は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの右側の境界、即ち、最右列の8画素に隣接する隣接ブロックの画素列(右隣接画素列)を示している。
【0203】
なお、図15において、影を付してあるラインが、注目ブロックBNDLの最右列の画素列を表し、斜線を付してあるラインが、右隣接画素列を表している。
【0204】
注目マクロブロックMBNの左下のブロックBNDLが注目ブロックである場合の右に隣接するブロックは、注目マクロブロックMBNの中の右下のブロックBNDRになるから、注目ブロックBNDLの最右列の画素列の右に隣接する右隣接画素列は、必ず、ブロックNDRの最左列の8画素となるので、注目マクロブロックMBNや、その注目マクロブロックMBNに隣接するマクロブロックの構造を考慮する必要はない。
【0205】
即ち、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックである場合には、図15に示すように、その最右列の8画素(影を付してある部分)は、空間領域において、注目ブロックBNDLの右隣のブロックBNDRの最左列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDLの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBNDRの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0206】
図16は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの上側の境界、即ち、最上行の8画素に隣接する隣接ブロックの画素列(上隣接画素列)を示している。
【0207】
なお、図16において、影を付してあるラインが、注目ブロックBNURの最上行の画素列を表し、斜線を付してあるラインが、上隣接画素列を表している。
【0208】
注目マクロブロックMBNの右上のブロックBNURが注目ブロックである場合の上に隣接するブロックは、注目マクロブロックMBNの中のブロックではない上隣接マクロブロックMBUの右下のブロックBUDRとなるから、注目ブロックBNURの最上行の画素列の上に隣接する上隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、上隣接マクロブロックMBUの両方の構造を考慮する必要がある。
【0209】
即ち、注目マクロブロックMBNと上隣接マクロブロックMBUのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの右上の8×8画素であり、図16Aに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の上隣接マクロブロックMBUの右下のブロックBUDRの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUDRの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0210】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、上隣接マクロブロックMBUのDCTタイプが、フィールドDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの右上の8×8画素であり、図16Bに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フィールド構造の上隣接マクロブロックMBUの右下ブロックBUDRの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUDRの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0211】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプが、フレームDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの8つの奇数ラインの右側の8画素であり、図16Cに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の上隣接マクロブロックMBUの右下のブロックBUDRの第7行目の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUDRの第7行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0212】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプも、フィールドDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの8つの奇数ラインの右側の8画素であり、図16Dに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フィールド構造の上隣接マクロブロックMBUの右上のブロックBUURの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUURの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0213】
次に、図17は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの下側の境界、即ち、最下行の8画素に隣接する隣接ブロックの画素列(下隣接画素列)を示している。
【0214】
なお、図17において、影を付してあるラインが、注目ブロックBNURの最下行の画素列を表し、斜線を付してあるラインが、下隣接画素列を表している。
【0215】
注目マクロブロックMBNの右上のブロックBNURが注目ブロックである場合の下に隣接するブロックは、注目マクロブロックMBNの中の右下のブロックBNDRとなるから、注目ブロックBNURの最下行の画素列の下に隣接する下隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNの構造のみを考慮すれば良い。
【0216】
即ち、注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの右上の8×8画素であり、図17Aに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フレーム構造の注目マクロブロックMBNの右下のブロックBNDRの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBNDRの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0217】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、注目ブロックBNURは、注目マクロブロックMBNの8つの奇数ラインの右側の8画素であり、図17Bに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フレーム構造の注目マクロブロックMBNの下に隣接する下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDURの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0218】
次に、図18は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの左側の境界、即ち、最左列の8画素に隣接する隣接ブロックの画素列(左隣接画素列)を示している。
【0219】
なお、図18において、影を付してあるラインが、注目ブロックBNURの最左列の画素列を表し、斜線を付してあるラインが、左隣接画素列を表している。
【0220】
注目マクロブロックMBNの右上のブロックBNURが注目ブロックである場合の左に隣接するブロックは、注目マクロブロックMBNの中の左上のブロックBNULになるから、注目ブロックBNURの最左列の画素列の左に隣接する左隣接画素列は、必ず、ブロックBNULの最右列の8画素となるので、注目マクロブロックMBNや、その注目マクロブロックMBNに隣接するマクロブロックの構造を考慮する必要はない。
【0221】
即ち、注目マクロブロックMBNの右上のブロックBNURが注目ブロックである場合には、図18に示すように、その最左列の8画素(影を付してある部分)は、空間領域において、注目ブロックBNURの左隣のブロックBNULの最右列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBNULの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0222】
次に、図19は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの右側の境界、即ち、最右列の8画素に隣接する隣接ブロックの画素列(右隣接画素列)を示している。
【0223】
なお、図19において、影を付してあるラインが、注目ブロックBNURの最右列の画素列を表し、斜線を付してあるラインが、右隣接画素列を表している。
【0224】
注目マクロブロックMBNの右上のブロックBNURが注目ブロックである場合の右に隣接するブロックは、注目マクロブロックMBNの中のブロックではない右隣接マクロブロックMBRの左上のブロックBRULとなるから、注目ブロックBNURの最右列の画素列の右に隣接する右隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、右隣接マクロブロックMBRの両方の構造を考慮する必要がある。
【0225】
即ち、注目マクロブロックMBNと右隣接マクロブロックMBRのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの右上の8×8画素であり、図19Aに示すように、その最右列の8画素(影を付してある部分)は、空間領域において、フレーム構造の右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRULの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0226】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、右隣接マクロブロックMBRのDCTタイプが、フィールドDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの右上の8×8画素であり、図19Bに示すように、その最左列の8画素(影を付してある部分)は、空間領域において、フィールド構造の右隣接マクロブロックMBLの左上のブロックBRULにおける最左列の上4画素と、その左下のブロックBRDLにおける最左列の上4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRULにおける最左列の上4画素とブロックBRDLにおける最左列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0227】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプが、フレームDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの8つの奇数ラインの右側の8画素であり、図19Cに示すように、その最右列の8画素(影を付してある部分)は、空間領域において、フレーム構造の右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の奇数行の4画素と、その左下のブロックBRDLにおける奇数行の4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRULにおける最右列の奇数行の4画素とブロックBRDLにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0228】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプも、フィールドDCTの場合は、注目ブロックBNURは、注目マクロブロックMBNの8つの奇数ラインの右側の8画素であり、図19Dに示すように、その最右列の8画素(影を付してある部分)は、空間領域において、フィールド構造の右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNURの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRULの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0229】
次に、図20は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの上側の境界、即ち、最上行の8画素に隣接する隣接ブロックの画素列(上隣接画素列)を示している。
【0230】
なお、図20において、影を付してあるラインが、注目ブロックBNDRの最上行の画素列を表し、斜線を付してあるラインが、上隣接画素列を表している。
【0231】
注目マクロブロックMBNの右下のブロックBNDRが注目ブロックである場合の上に隣接するブロックは、注目マクロブロックMBNの中の右上のブロックBNURとなるから、注目ブロックBNDRの最上行の画素列の上に隣接する上隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNの構造のみを考慮すれば良い。
【0232】
即ち、注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの右下の8×8画素であり、図20Aに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の注目マクロブロックMBNの右下のブロックBNDRの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBNDRの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0233】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、注目ブロックBNDRは、注目マクロブロックMBNの8つの偶数ラインの右側の8画素であり、図20Bに示すように、その最上行の8画素(影を付してある部分)は、空間領域において、フレーム構造の注目マクロブロックMBNの上に隣接する上隣接マクロブロックMBUの右下のブロックBUDRの最下行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最上行の水平1次元DCT係数に対する上隣接1次元DCT係数は、ブロックBUDRの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0234】
次に、図21は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの下側の境界、即ち、最下行の8画素に隣接する隣接ブロックの画素列(下隣接画素列)を示している。
【0235】
なお、図21において、影を付してあるラインが、注目ブロックBNDRの最下行の画素列を表し、斜線を付してあるラインが、下隣接画素列を表している。
【0236】
注目マクロブロックMBNの右下のブロックBNDRが注目ブロックである場合の下に隣接するブロックは、注目マクロブロックMBNの中のブロックではない下隣接マクロブロックMBDの右上のブロックBDURとなるから、注目ブロックBNDRの最下行の画素列の下に隣接する下隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、下隣接マクロブロックMBDの両方の構造を考慮する必要がある。
【0237】
即ち、注目マクロブロックMBNと下隣接マクロブロックMBDのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの右下の8×8画素であり、図21Aに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フレーム構造の下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDURの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0238】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、下隣接マクロブロックMBDのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの右下の8×8画素であり、図21Bに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フィールド構造の下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDURの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0239】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプが、フレームDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの8つの偶数ラインの右側の8画素であり、図21Cに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フレーム構造の下隣接マクロブロックMBDの右上のブロックBDURの第2行目の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDURの第2行目の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0240】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの8つの偶数ラインの右側の8画素であり、図21Dに示すように、その最下行の8画素(影を付してある部分)は、空間領域において、フィールド構造の下隣接マクロブロックMBDの右下のブロックBDDRの最上行の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最下行の水平1次元DCT係数に対する下隣接1次元DCT係数は、ブロックBDDRの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数になる。
【0241】
次に、図22は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの左側の境界、即ち、最左列の8画素に隣接する隣接ブロックの画素列(左隣接画素列)を示している。
【0242】
なお、図22において、影を付してあるラインが、注目ブロックBNDRの最左列の画素列を表し、斜線を付してあるラインが、左隣接画素列を表している。
【0243】
注目マクロブロックMBNの右下のブロックBNDRが注目ブロックである場合の左に隣接するブロックは、注目マクロブロックMBNの中の左下のブロックBNDLになるから、注目ブロックBNDRの最左列の画素列の左に隣接する左隣接画素列は、必ず、ブロックNDLの最右列の8画素となるので、注目マクロブロックMBNや、その注目マクロブロックMBNに隣接するマクロブロックの構造を考慮する必要はない。
【0244】
即ち、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックである場合には、図22に示すように、その最左列の8画素(影を付してある部分)は、空間領域において、注目ブロックBNDRの左隣のブロックBNDLの最右列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最左列の垂直1次元DCT係数に対する左隣接1次元DCT係数は、ブロックBNDLの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0245】
次に、図23は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの右側の境界、即ち、最右列の8画素に隣接する隣接ブロックの画素列(右隣接画素列)を示している。
【0246】
なお、図23において、影を付してあるラインが、注目ブロックBNDRの最右列の画素列を表し、斜線を付してあるラインが、右隣接画素列を表している。
【0247】
注目マクロブロックMBNの右下のブロックBNDRが注目ブロックである場合の右に隣接するブロックは、注目マクロブロックMBNの中のブロックではない右隣接マクロブロックMBRの右下のブロックBRDLとなるから、注目ブロックBNDRの最右列の画素列の右に隣接する右隣接画素列がいずれの画素列になるかは、注目マクロブロックMBNと、右隣接マクロブロックMBRの両方の構造を考慮する必要がある。
【0248】
即ち、注目マクロブロックMBNと右隣接マクロブロックMBRのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの右下の8×8画素であり、図23Aに示すように、その最右列の8画素(影を付してある部分)は、空間領域において、フレーム構造の右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRDLの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0249】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、右隣接マクロブロックMBRのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの右下の8×8画素であり、図23Bに示すように、その最右列の8画素(影を付してある部分)は、空間領域において、フィールド構造の右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の下4画素と、その左下のブロックBRDLにおける最左列の下4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRULにおける最左列の下4画素とブロックBRDLにおける最左列の下4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0250】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプが、フレームDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの8つの偶数ラインの左側の8画素であり、図23Cに示すように、その最右列の8画素(影を付してある部分)は、空間領域において、フレーム構造の右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の偶数行の4画素と、その左下のブロックBRDLにおける最左列の偶数行の4画素の合計8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最左列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRULにおける最左列の偶数行の4画素とブロックBRDLにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0251】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDRは、注目マクロブロックMBNの8つの偶数ラインの右側の8画素であり、図23Dに示すように、その最右列の8画素(影を付してある部分)は、空間領域において、フィールド構造の右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素(斜線を付してある部分)と隣接する。従って、注目ブロックBNDRの最右列の垂直1次元DCT係数に対する右隣接1次元DCT係数は、ブロックBRDLの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数になる。
【0252】
次に、図24は、図8乃至図23で説明したような、注目ブロックに対する隣接1次元DCT係数(上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、および右隣接1次元DCT係数)を取得する、図2の隣接1次元DCT係数選択/変換部32の構成例を示している。
【0253】
隣接1次元DCT係数選択/変換部32において、1次元逆DCT変換部31(図2)が出力する1次元DCT係数(水平1次元DCT係数および垂直1次元DCT係数)は、メモリ81に供給されるようになっており、バッファメモリ12(図12)に記憶された注目マクロブロックと隣接マクロブロック(上隣接マクロブロック、下隣接マクロブロック、左隣接マクロブロック、および右隣接マクロブロック)のDCTタイプは、サンプリング部83および選択部85に供給されるようになっている。
【0254】
制御部80は、隣接1次元DCT係数選択/変換部32を構成する各ブロックを制御する。
【0255】
メモリ81は、1次元逆DCT変換部31(図2)が出力する1次元DCT係数を、一時記憶する。
【0256】
垂直1次元逆DCT変換部82は、メモリ81に記憶された垂直1次元DCT係数を読み出して、垂直1次元逆DCT変換し、これにより、横×縦が1×8の画素列を得て出力する。垂直1次元逆DCT変換部82が出力する1×8の画素列は、サンプリング部83に供給される。
【0257】
サンプリング部83は、バッファメモリ12(図2)に記憶された注目マクロブロックと隣接マクロブロックのDCTタイプに基づき、垂直1次元逆DCT変換部83から供給される画素列を対象としたサンプリングを行い、そのサンプリングの結果得られる画素から、1×8の画素列を再構成して、垂直1次元DCT変換部84に供給する。
【0258】
垂直1次元DCT変換部84は、サンプリング部83から供給される1×8の画素列を、垂直1次元DCT変換し、これにより、横×縦が1×8の垂直1次元DCT係数を得て、選択部85に供給する。
【0259】
選択部85は、メモリ81に記憶された水平1次元DCT係数もしくは垂直1次元DCT係数、または垂直1次元DCT変換部84が出力する垂直1次元DCT係数を選択し、隣接1次元DCT係数として出力する。
【0260】
次に、図25のフローチャートを参照して、図24の隣接1次元DCT係数選択/変換部32の処理(隣接1次元DCT係数選択/変換処理)について説明する。
【0261】
メモリ81には、注目マクロブロック、上隣接マクロブロック、下隣接マクロブロック、左隣接マクロブロック、および右隣接マクロブロックの1次元DCT係数が供給されて記憶される。また、サンプリング部83および選択部85には、注目マクロブロック、上隣接マクロブロック、下隣接マクロブロック、左隣接マクロブロック、および右隣接マクロブロックのDCTタイプが供給される。
【0262】
そして、ステップS1において、制御部80は、注目マクロブロックにおける注目ブロックの位置を判定する。ステップS1において、注目ブロックが、注目ブロックの左上、左下、右上、または右下のブロックであると判定された場合、ステップS2,S3,S4、またはS5にそれぞれ進み、左上ブロック処理、左下ブロック処理、右上ブロック処理、または右下ブロック処理がそれぞれ行われ、処理を終了する。
【0263】
なお、図25のフローチャートに示した処理は、例えば、注目ブロックが変更されるごとに行われる。
【0264】
次に、図26のフローチャートを参照して、図25のステップS2における左上ブロック処理について説明する。
【0265】
左上ブロック処理では、注目マクロブロックの左上のブロックBNULについて、上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、右隣接1次元DCT係数が取得される。
【0266】
即ち、左上ブロック処理では、まず最初に、ステップS11において、選択部85が、注目マクロブロックと上隣接マクロブロックのDCTタイプを判定する。
【0267】
ステップS11において、注目マクロブロックと上隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS12に進み、選択部85は、図8Aで説明したように、上隣接マクロブロックMBUの左下のブロックBUDLにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0268】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックと上隣接マクロブロックが、いずれもフレーム構造であるときには、上隣接1次元DCT係数は、図8Aで説明したように、上隣接マクロブロックMBUの左下のブロックBUDLにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDLの第8行の水平1次元DCT係数である。ブロックBUDLの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS12において、メモリ81から、ブロックBUDLの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0269】
また、ステップS11において、注目マクロブロックのDCTタイプがフレームDCTであり、上隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS13に進み、選択部85は、図8Bで説明したように、上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0270】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックがフレーム構造であり、上隣接マクロブロックがフィールド構造であるときには、上隣接1次元DCT係数は、図8Bで説明したように、上隣接マクロブロックMBUの左下のブロックBUDLにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDLの第8行の水平1次元DCT係数である。ブロックBUDLの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS13において、メモリ81から、ブロックBUDLの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0271】
また、ステップS11において、注目マクロブロックのDCTタイプがフィールドDCTであり、上隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS14に進み、選択部85は、図8Cで説明したように、上隣接マクロブロックMBUの左下ブロックBUDLの第7行目の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0272】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックがフィールド構造であり、上隣接マクロブロックがフレーム構造であるときには、上隣接1次元DCT係数は、図8Cで説明したように、上隣接マクロブロックMBUの左下ブロックBUDLの第7行目の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDLの第7行の水平1次元DCT係数である。ブロックBUDLの第7行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS14において、メモリ81から、ブロックBUDLの第7行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0273】
また、ステップS11において、注目マクロブロックと上隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS15に進み、選択部85は、図8Dで説明したように、上隣接マクロブロックMBUの左上のブロックBUULの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0274】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックと上隣接マクロブロックが、いずれもフィールド構造であるときには、上隣接1次元DCT係数は、図8Dで説明したように、上隣接マクロブロックMBUの左上のブロックBUULの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUULの第8行の水平1次元DCT係数である。ブロックBUULの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS15において、メモリ81から、ブロックBUULの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0275】
ステップS12乃至S15の処理後は、いずれも、ステップS16に進み、選択部85が、注目マクロブロックのDCTタイプを判定する。
【0276】
ステップS16において、注目マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS17に進み、選択部85は、図9Aで説明したように、注目マクロブロックMBNの左下のブロックBNDLの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0277】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックがフレーム構造であるときには、下隣接1次元DCT係数は、図9Aで説明したように、注目マクロブロックMBNの左下のブロックBNDLの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBNDLの第1行の水平1次元DCT係数である。ブロックBNDLの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS17において、メモリ81から、ブロックBNDLの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0278】
また、ステップS16において、注目マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS18に進み、選択部85は、図9Bで説明したように、下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0279】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックがフィールド構造であるときには、下隣接1次元DCT係数は、図9Bで説明したように、下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDULの第1行の水平1次元DCT係数である。ブロックBDULの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS18において、メモリ81から、ブロックBDULの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0280】
ステップS17およびS18の処理後は、いずれも、ステップS19に進み、サンプリング部83および選択部85が、注目マクロブロックと左隣接マクロブロックのDCTタイプを判定する。
【0281】
ステップS19において、注目マクロブロックと左隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS20に進み、選択部85は、図10Aで説明したように、左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0282】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックと左隣接マクロブロックが、いずれもフレーム構造であるときには、左隣接1次元DCT係数は、図10Aで説明したように、左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBLURの第8列(左から8列目)の垂直1次元DCT係数である。ブロックBLURの第8列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS20において、メモリ81から、ブロックBLURの第8列の垂直1次元DCT係数を読み出して選択し、左隣接1次元DCT係数として出力する。
【0283】
また、ステップS19において、注目マクロブロックのDCTタイプがフレームDCTであり、左隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS21乃至S23に順次進み、選択部85は、図10Bで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の上4画素と、その右下のブロックBLDRにおける最右列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0284】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックがフレーム構造であり、左隣接マクロブロックがフィールド構造であるときには、左隣接1次元DCT係数は、図10Bで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の上4画素と、その右下のブロックBLDRにおける最右列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、このような垂直1次元DCT係数は、メモリ81に存在しない。
【0285】
そこで、サンプリング部83は、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0286】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS21において、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBLURの第8列の8画素と、ブロックBLDRの第8列の8画素を得て、サンプリング部83に供給し、ステップS22に進む。
【0287】
ステップS22では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBLURの第8列の8画素のうちの上4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBLDRの第8列の8画素のうちの上4画素をサンプリングし、ブロックBLURの第8列からサンプリングした上4画素を奇数行(トップフィールド)に配置するとともに、ブロックBLDRの第8列からサンプリングした上4画素を偶数行(ボトムフィールド)に配置することにより、注目マクロブロックと同一のフレーム構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0288】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS23において、その8画素を、垂直1次元DCT変換し、これにより、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の上4画素と、その右下のブロックBLDRにおける最右列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、左隣接1次元DCT係数として出力する。
【0289】
また、ステップS19において、注目マクロブロックのDCTタイプがフィールドDCTであり、左隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS24乃至S26に順次進み、選択部85は、図10Cで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の奇数行の4画素と、その右下のブロックBLDRにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0290】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックがフィールド構造であり、左隣接マクロブロックがフレーム構造であるときには、左隣接1次元DCT係数は、図10Cで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の奇数行の4画素と、その右下のブロックBLDRにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、そのような垂直1次元DCT係数は、メモリ81に存在しない。
【0291】
そこで、サンプリング部83は、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0292】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS24において、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBLURの第8列の8画素と、ブロックBLDRの第8列の8画素を得て、サンプリング部83に供給し、ステップS25に進む。
【0293】
ステップS25では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBLURの第8列の8画素のうちの奇数行の4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBLDRの第8列の8画素のうちの奇数行の4画素をサンプリングし、ブロックBLURの第8列からサンプリングした奇数行の4画素を上側に配置するとともに、ブロックBLDRの第8列からサンプリングした奇数行の4画素を下側に配置することにより、注目マクロブロックと同一のフィールド(トップフィールド)構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0294】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS26において、その8画素を、垂直1次元DCT変換し、これにより、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の奇数行の4画素と、その右下のブロックBLDRにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、左隣接1次元DCT係数として出力する。
【0295】
また、ステップS19において、注目マクロブロックと左隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS27に進み、選択部85は、図10Dで説明したように、左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0296】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合において、注目マクロブロックと左隣接マクロブロックが、いずれもフィールド構造であるときには、左隣接1次元DCT係数は、図10Dで説明したように、左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBLURの第8列の垂直1次元DCT係数である。ブロックBLURの第8列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS27において、メモリ81から、ブロックBLURの第8列の垂直1次元DCT係数を読み出して選択し、左隣接1次元DCT係数として出力する。
【0297】
ステップS20,S23,S26、およびS27の処理後は、いずれも、ステップS28に進み、選択部85は、図11で説明したように、注目ブロックBNULの右隣のブロックBNURの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0298】
即ち、注目ブロックが、注目マクロブロックの左上のブロックBNULである場合には、右隣接1次元DCT係数は、図11で説明したように、注目ブロックBNULの右隣のブロックBNURの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBNURの第1列の垂直1次元DCT係数である。ブロックBNURの第1列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS28において、メモリ81から、ブロックBNURの第1列の垂直1次元DCT係数を読み出して選択し、右隣接1次元DCT係数として出力して、左上ブロック処理を終了する。
【0299】
次に、図27のフローチャートを参照して、図25のステップS3における左下ブロック処理について説明する。
【0300】
左下ブロック処理では、注目マクロブロックの左下のブロックBNDLについて、上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、右隣接1次元DCT係数が取得される。
【0301】
即ち、左下ブロック処理では、まず最初に、ステップS31において、選択部85が、注目マクロブロックのDCTタイプを判定する。
【0302】
ステップS31において、注目マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS32に進み、選択部85は、図12Aで説明したように、注目マクロブロックMBNの左上のブロックBNULの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0303】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックがフレーム構造であるときには、上隣接1次元DCT係数は、図12Aで説明したように、注目マクロブロックMBNの左上のブロックBNULの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBNULの第8行の水平1次元DCT係数である。ブロックBNULの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS32において、メモリ81から、ブロックBNULの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0304】
また、ステップS31において、注目マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS33に進み、選択部85は、図12Bで説明したように、上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0305】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックがフィールド構造であるときには、上隣接1次元DCT係数は、図12Bで説明したように、上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDLの第8行の水平1次元DCT係数である。ブロックBUDLの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS33において、メモリ81から、ブロックBUDLの第1行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0306】
ステップS32およびS33の処理後は、いずれも、ステップS34に進み、選択部85が、注目マクロブロックと下隣接マクロブロックのDCTタイプを判定する。
【0307】
ステップS34において、注目マクロブロックと下隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS35に進み、選択部85は、図13Aで説明したように、下隣接マクロブロックMBDの左上のブロックBDULにおける最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0308】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックと下隣接マクロブロックが、いずれもフレーム構造であるときには、下隣接1次元DCT係数は、図13Aで説明したように、下隣接マクロブロックMBDの左上のブロックBDULにおける最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDULの第1行の水平1次元DCT係数である。ブロックBDULの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS35において、メモリ81から、ブロックBDULの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0309】
また、ステップS34において、注目マクロブロックのDCTタイプがフレームDCTであり、下隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS36に進み、選択部85は、図13Bで説明したように、下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0310】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックがフレーム構造であり、下隣接マクロブロックがフィールド構造であるときには、下隣接1次元DCT係数は、図13Bで説明したように、下隣接マクロブロックMBDの左上のブロックBDULにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDULの第1行の水平1次元DCT係数である。ブロックBDULの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS36において、メモリ81から、ブロックBDULの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0311】
また、ステップS34において、注目マクロブロックのDCTタイプがフィールドDCTであり、下隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS37に進み、選択部85は、図13Cで説明したように、下隣接マクロブロックMBDの左上のブロックBDULの第2行目の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0312】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックがフィールド構造であり、下隣接マクロブロックがフレーム構造であるときには、下隣接1次元DCT係数は、図13Cで説明したように、下隣接マクロブロックMBDの左上のブロックBDULの第2行目の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDULの第2行の水平1次元DCT係数である。ブロックBDULの第2行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS37において、メモリ81から、ブロックBDULの第2行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0313】
また、ステップS34において、注目マクロブロックと下隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS38に進み、選択部85は、図13Dで説明したように、下隣接マクロブロックMBDの左下のブロックBDDLの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0314】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックと下隣接マクロブロックが、いずれもフィールド構造であるときには、下隣接1次元DCT係数は、図13Dで説明したように、下隣接マクロブロックMBDの左下のブロックBDDLの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDDLの第1行の水平1次元DCT係数である。ブロックBDDLの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS38において、メモリ81から、ブロックBDDLの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0315】
ステップS35乃至S38の処理後は、いずれも、ステップS39に進み、サンプリング部83および選択部85が、注目マクロブロックと左隣接マクロブロックのDCTタイプを判定する。
【0316】
ステップS39において、注目マクロブロックと左隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS40に進み、選択部85は、図14Aで説明したように、左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0317】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックと左隣接マクロブロックが、いずれもフレーム構造であるときには、左隣接1次元DCT係数は、図14Aで説明したように、左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBLDRの第8列の垂直1次元DCT係数である。ブロックBLDRの第8列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS40において、メモリ81から、ブロックBLDRの第8列の垂直1次元DCT係数を読み出して選択し、左隣接1次元DCT係数として出力する。
【0318】
また、ステップS39において、注目マクロブロックのDCTタイプがフレームDCTであり、左隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS41乃至S43に順次進み、選択部85は、図14Bで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の下4画素と、その右下のブロックBLDRにおける最右列の下4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0319】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックがフレーム構造であり、左隣接マクロブロックがフィールド構造であるときには、左隣接1次元DCT係数は、図14Bで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の上4画素と、その右下のブロックBLDRにおける最右列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、このような垂直1次元DCT係数は、メモリ81に存在しない。
【0320】
そこで、サンプリング部83は、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0321】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS41において、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBLURの第8列の8画素と、ブロックBLDRの第8列の8画素を得て、サンプリング部83に供給し、ステップS42に進む。
【0322】
ステップS42では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBLURの第8列の8画素のうちの下4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBLDRの第8列の8画素のうちの下4画素をサンプリングし、ブロックBLURの第8列からサンプリングした上4画素を奇数行(トップフィールド)に配置するとともに、ブロックBLDRの第8列からサンプリングした上4画素を偶数行(ボトムフィールド)に配置することにより、注目マクロブロックと同一のフレーム構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0323】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS43において、その8画素を、垂直1次元DCT変換し、これにより、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の上4画素と、その右下のブロックBLDRにおける最右列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、左隣接1次元DCT係数として出力する。
【0324】
また、ステップS39において、注目マクロブロックのDCTタイプがフィールドDCTであり、左隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS44乃至S46に順次進み、選択部85は、図14Cで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の偶数行の4画素と、その右下のブロックBLDRにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0325】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックがフィールド構造であり、左隣接マクロブロックがフレーム構造であるときには、左隣接1次元DCT係数は、図14Cで説明したように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の偶数行の4画素と、その右下のブロックBLDRにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、そのような垂直1次元DCT係数は、メモリ81に存在しない。
【0326】
そこで、サンプリング部83は、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0327】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS44において、ブロックBLURの第8列の垂直1次元DCT係数と、ブロックBLDRの第8列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBLURの第8列の8画素と、ブロックBLDRの第8列の8画素を得て、サンプリング部83に供給し、ステップS45に進む。
【0328】
ステップS45では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBLURの第8列の8画素のうちの偶数行の4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBLDRの第8列の8画素のうちの偶数行の4画素をサンプリングし、ブロックBLURの第8列からサンプリングした偶数行の4画素を上側に配置するとともに、ブロックBLDRの第8列からサンプリングした偶数行の4画素を下側に配置することにより、注目マクロブロックと同一のフィールド(ボトムフィールド)構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0329】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS46において、その8画素を、垂直1次元DCT変換し、これにより、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の偶数行の4画素と、その右下のブロックBLDRにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、左隣接1次元DCT係数として出力する。
【0330】
また、ステップS39において、注目マクロブロックと左隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS47に進み、選択部85は、図14Dで説明したように、左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0331】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合において、注目マクロブロックと左隣接マクロブロックが、いずれもフィールド構造であるときには、左隣接1次元DCT係数は、図14Dで説明したように、左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBLDRの第8列の垂直1次元DCT係数である。ブロックBLDRの第8列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS47において、メモリ81から、ブロックBLDRの第8列の垂直1次元DCT係数を読み出して選択し、左隣接1次元DCT係数として出力する。
【0332】
ステップS40,S43,S46、およびS47の処理後は、いずれも、ステップS48に進み、選択部85は、図15で説明したように、注目ブロックBNDLの右隣のブロックBNDRの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0333】
即ち、注目ブロックが、注目マクロブロックの左下のブロックBNDLである場合には、右隣接1次元DCT係数は、図15で説明したように、注目ブロックBNDLの右隣のブロックBNDRの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBNDRの第1列の垂直1次元DCT係数である。ブロックBNDRの第1列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS48において、メモリ81から、ブロックBNDRの第1列の垂直1次元DCT係数を読み出して選択し、右隣接垂直1次元DCT係数として出力して、左下ブロック処理を終了する。
【0334】
次に、図28のフローチャートを参照して、図25のステップS4における右上ブロック処理について説明する。
【0335】
右上ブロック処理では、注目マクロブロックの右上のブロックBNURについて、上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、右隣接1次元DCT係数が取得される。
【0336】
即ち、右上ブロック処理では、まず最初に、ステップS51において、選択部85が、注目マクロブロックと上隣接マクロブロックのDCTタイプを判定する。
【0337】
ステップS51において、注目マクロブロックと上隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS52に進み、選択部85は、図16Aで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0338】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックと上隣接マクロブロックが、いずれもフレーム構造であるときには、上隣接1次元DCT係数は、図16Aで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDRの第8行の水平1次元DCT係数である。ブロックBUDRの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS52において、メモリ81から、ブロックBUDRの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0339】
また、ステップS51において、注目マクロブロックのDCTタイプがフレームDCTであり、上隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS53に進み、選択部85は、図16Bで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0340】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックがフレーム構造であり、上隣接マクロブロックがフィールド構造であるときには、上隣接1次元DCT係数は、図16Bで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDRの第8行の水平1次元DCT係数である。ブロックBUDRの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS53において、メモリ81から、ブロックBUDRの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0341】
また、ステップS51において、注目マクロブロックのDCTタイプがフィールドDCTであり、上隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS54に進み、選択部85は、図16Cで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRの第7行目の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0342】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックがフィールド構造であり、上隣接マクロブロックがフレーム構造であるときには、上隣接1次元DCT係数は、図16Cで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRの第7行目の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDRの第7行の水平1次元DCT係数である。ブロックBUDRの第7行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS54において、メモリ81から、ブロックBUDRの第7行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0343】
また、ステップS51において、注目マクロブロックと上隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS55に進み、選択部85は、図16Dで説明したように、上隣接マクロブロックMBUの右上のブロックBUURの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0344】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックと上隣接マクロブロックが、いずれもフィールド構造であるときには、上隣接1次元DCT係数は、図16Dで説明したように、上隣接マクロブロックMBUの右上のブロックBUURの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUULの第8行の水平1次元DCT係数である。ブロックBUURの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS55において、メモリ81から、ブロックBUURの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0345】
ステップS52乃至S55の処理後は、いずれも、ステップS56に進み、選択部85が、注目マクロブロックのDCTタイプを判定する。
【0346】
ステップS56において、注目マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS57に進み、選択部85は、図17Aで説明したように、注目マクロブロックMBNの右下のブロックBNDRの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0347】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックがフレーム構造であるときには、下隣接1次元DCT係数は、図17Aで説明したように、注目マクロブロックMBNの右下のブロックBNDRの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBNDRの第1行の水平1次元DCT係数である。ブロックBNDRの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS57において、メモリ81から、ブロックBNDRの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0348】
また、ステップS56において、注目マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS58に進み、選択部85は、図17Bで説明したように、下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0349】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックがフィールド構造であるときには、下隣接1次元DCT係数は、図17Bで説明したように、下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDURの第1行の水平1次元DCT係数である。ブロックBDURの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS58において、メモリ81から、ブロックBDURの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0350】
ステップS57およびS58の処理後は、いずれも、ステップS59に進み、サンプリング部83および選択部85が、注目マクロブロックと右隣接マクロブロックのDCTタイプを判定する。
【0351】
ステップS59において、注目マクロブロックと右隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS60に進み、選択部85は、図19Aで説明したように、右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0352】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックと右隣接マクロブロックが、いずれもフレーム構造であるときには、右隣接1次元DCT係数は、図19Aで説明したように、右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBRULの第1列の垂直1次元DCT係数である。ブロックBRULの第1列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS60において、メモリ81から、ブロックBRULの第1列の垂直1次元DCT係数を読み出して選択し、右隣接1次元DCT係数として出力する。
【0353】
また、ステップS59において、注目マクロブロックのDCTタイプがフレームDCTであり、右隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS61乃至S63に順次進み、選択部85は、図19Bで説明したように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の上4画素と、その左下のブロックBRDLにおける最左列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0354】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックがフレーム構造であり、右隣接マクロブロックがフィールド構造であるときには、右隣接1次元DCT係数は、図19Bで説明したように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の上4画素と、その左下のブロックBRDLにおける最左列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、このような垂直1次元DCT係数は、メモリ81に存在しない。
【0355】
そこで、サンプリング部83は、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0356】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS61において、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBRULの第1列の8画素と、ブロックBRDLの第1列の8画素を得て、サンプリング部83に供給し、ステップS62に進む。
【0357】
ステップS62では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBRULの第1列の8画素のうちの上4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBRDLの第1列の8画素のうちの上4画素をサンプリングし、ブロックBRULの第1列からサンプリングした上4画素を奇数行(トップフィールド)に配置するとともに、ブロックBRDLの第1列からサンプリングした上4画素を偶数行(ボトムフィールド)に配置することにより、注目マクロブロックと同一のフレーム構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0358】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS63において、その8画素を、垂直1次元DCT変換し、これにより、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の上4画素と、その左下のブロックBRDLにおける最左列の上4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、右隣接1次元DCT係数として出力する。
【0359】
また、ステップS59において、注目マクロブロックのDCTタイプがフィールドDCTであり、右隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS64乃至S66に順次進み、選択部85は、図19Cで説明したように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の奇数行の4画素と、その左下のブロックBRDLにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0360】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックがフィールド構造であり、右隣接マクロブロックがフレーム構造であるときには、右隣接1次元DCT係数は、図19Cで説明したように、右隣接マクロブロックMBLの左上のブロックBRULにおける最左列の奇数行の4画素と、その左下のブロックBRDLにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、そのような垂直1次元DCT係数は、メモリ81に存在しない。
【0361】
そこで、サンプリング部83は、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0362】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS64において、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBRULの第1列の8画素と、ブロックBRDLの第1列の8画素を得て、サンプリング部83に供給し、ステップS65に進む。
【0363】
ステップS65では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBRULの第1列の8画素のうちの奇数行の4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBRDLの第1列の8画素のうちの奇数行の4画素をサンプリングし、ブロックBRULの第1列からサンプリングした奇数行の4画素を上側に配置するとともに、ブロックBRDLの第1列からサンプリングした奇数行の4画素を下側に配置することにより、注目マクロブロックと同一のフィールド(トップフィールド)構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0364】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS66において、その8画素を、垂直1次元DCT変換し、これにより、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の奇数行の4画素と、その左下のブロックBRDLにおける奇数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、右隣接1次元DCT係数として出力する。
【0365】
また、ステップS59において、注目マクロブロックと右隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS67に進み、選択部85は、図19Dで説明したように、右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0366】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合において、注目マクロブロックと右隣接マクロブロックが、いずれもフィールド構造であるときには、右隣接1次元DCT係数は、図19Dで説明したように、右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBRULの第1列の垂直1次元DCT係数である。ブロックBRULの第1列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS67において、メモリ81から、ブロックBRULの第1列の垂直1次元DCT係数を読み出して選択し、右隣接1次元DCT係数として出力する。
【0367】
ステップS60,S63,S66、およびS67の処理後は、いずれも、ステップS68に進み、選択部85は、図18で説明したように、注目ブロックBNURの左隣のブロックBNULの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0368】
即ち、注目ブロックが、注目マクロブロックの右上のブロックBNURである場合には、左隣接1次元DCT係数は、図18で説明したように、注目ブロックBNURの左隣のブロックBNULの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBNULの第8列の垂直1次元DCT係数である。ブロックBNURの第8列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS68において、メモリ81から、ブロックBNULの第8列の垂直1次元DCT係数を読み出して選択し、左隣接垂直1次元DCT係数として出力して、右上ブロック処理を終了する。
【0369】
次に、図29のフローチャートを参照して、図25のステップS5における右下ブロック処理について説明する。
【0370】
右下ブロック処理では、注目マクロブロックの右下のブロックBNDRについて、上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、右隣接1次元DCT係数が取得される。
【0371】
即ち、右下ブロック処理では、まず最初に、ステップS71において、選択部85が、注目マクロブロックのDCTタイプを判定する。
【0372】
ステップS71において、注目マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS72に進み、選択部85は、図20Aで説明したように、注目マクロブロックMBNの右上のブロックBNURの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0373】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックがフレーム構造であるときには、上隣接1次元DCT係数は、図20Aで説明したように、注目マクロブロックMBNの右上のブロックBNURの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBNURの第8行の水平1次元DCT係数である。ブロックBNURの第8行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS72において、メモリ81から、ブロックBNURの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0374】
また、ステップS71において、注目マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS73に進み、選択部85は、図20Bで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数を、上隣接1次元DCT係数として取得する。
【0375】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックがフィールド構造であるときには、上隣接1次元DCT係数は、図20Bで説明したように、上隣接マクロブロックMBUの右下のブロックBUDRの最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBUDRの第8行の水平1次元DCT係数である。ブロックBUDRの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS73において、メモリ81から、ブロックBUDRの第8行の水平1次元DCT係数を読み出して選択し、上隣接1次元DCT係数として出力する。
【0376】
ステップS72およびS73の処理後は、いずれも、ステップS74に進み、選択部85が、注目マクロブロックと下隣接マクロブロックのDCTタイプを判定する。
【0377】
ステップS74において、注目マクロブロックと下隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS75に進み、選択部85は、図21Aで説明したように、下隣接マクロブロックMBDの右上のブロックBDURにおける最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0378】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックと下隣接マクロブロックが、いずれもフレーム構造であるときには、下隣接1次元DCT係数は、図21Aで説明したように、下隣接マクロブロックMBDの右上のブロックBDURにおける最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDURの第1行の水平1次元DCT係数である。ブロックBDURの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS75において、メモリ81から、ブロックBDURの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0379】
また、ステップS74において、注目マクロブロックのDCTタイプがフレームDCTであり、下隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS76に進み、選択部85は、図21Bで説明したように、下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0380】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックがフレーム構造であり、下隣接マクロブロックがフィールド構造であるときには、下隣接1次元DCT係数は、図21Bで説明したように、下隣接マクロブロックMBDの右上のブロックBDURにおける最下行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDURの第1行の水平1次元DCT係数である。ブロックBDURの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS76において、メモリ81から、ブロックBDURの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0381】
また、ステップS74において、注目マクロブロックのDCTタイプがフィールドDCTであり、下隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS77に進み、選択部85は、図21Cで説明したように、下隣接マクロブロックMBDの右上のブロックBDURの第2行目の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0382】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックがフィールド構造であり、下隣接マクロブロックがフレーム構造であるときには、下隣接1次元DCT係数は、図21Cで説明したように、下隣接マクロブロックMBDの右上のブロックBDURの第2行目の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDURの第2行の水平1次元DCT係数である。ブロックBDURの第2行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS77において、メモリ81から、ブロックBDURの第2行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0383】
また、ステップS74において、注目マクロブロックと下隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS78に進み、選択部85は、図21Dで説明したように、下隣接マクロブロックMBDの右下のブロックBDDRの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数を、下隣接1次元DCT係数として取得する。
【0384】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックと下隣接マクロブロックが、いずれもフィールド構造であるときには、下隣接1次元DCT係数は、図21Dで説明したように、下隣接マクロブロックMBDの右下のブロックBDDRの最上行の8画素を水平1次元DCT変換した水平1次元DCT係数であり、この水平1次元DCT係数は、ブロックBDDRの第1行の水平1次元DCT係数である。ブロックBDDRの第1行の水平1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS78において、メモリ81から、ブロックBDDRの第1行の水平1次元DCT係数を読み出して選択し、下隣接1次元DCT係数として出力する。
【0385】
ステップS75乃至S78の処理後は、いずれも、ステップS79に進み、サンプリング部83および選択部85が、注目マクロブロックと左隣接マクロブロックのDCTタイプを判定する。
【0386】
ステップS79において、注目マクロブロックと左隣接マクロブロックのDCTタイプが、いずれもフレームDCTであると判定された場合、ステップS80に進み、選択部85は、図23Aで説明したように、右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0387】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックと右隣接マクロブロックが、いずれもフレーム構造であるときには、右隣接1次元DCT係数は、図23Aで説明したように、右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBRDLの第1列の垂直1次元DCT係数である。ブロックBRDLの第1列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS80において、メモリ81から、ブロックBRDLの第1列の垂直1次元DCT係数を読み出して選択し、右隣接1次元DCT係数として出力する。
【0388】
また、ステップS79において、注目マクロブロックのDCTタイプがフレームDCTであり、右隣接マクロブロックのDCTタイプがフィールドDCTであると判定された場合、ステップS81乃至S83に順次進み、選択部85は、図23Bで説明したように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の下4画素と、その左下のブロックBRDLにおける最左列の下4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0389】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックがフレーム構造であり、右隣接マクロブロックがフィールド構造であるときには、右隣接1次元DCT係数は、図23Bで説明したように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の下4画素と、その左下のブロックBRDLにおける最左列の下4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、このような垂直1次元DCT係数は、メモリ81に存在しない。
【0390】
そこで、サンプリング部83は、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0391】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS81において、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBRULの第1列の8画素と、ブロックBRDLの第1列の8画素を得て、サンプリング部83に供給し、ステップS82に進む。
【0392】
ステップS82では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBRULの第1列の8画素のうちの下4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBRDLの第1列の8画素のうちの下4画素をサンプリングし、ブロックBRULの第1列からサンプリングした上4画素を奇数行(トップフィールド)に配置するとともに、ブロックBRDLの第1列からサンプリングした上4画素を偶数行(ボトムフィールド)に配置することにより、注目マクロブロックと同一のフレーム構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0393】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS83において、その8画素を、垂直1次元DCT変換し、これにより、右隣接マクロブロックMBLの左上のブロックBRULにおける最左列の下4画素と、その左下のブロックBRDLにおける最左列の下4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、右隣接1次元DCT係数として出力する。
【0394】
また、ステップS79において、注目マクロブロックのDCTタイプがフィールドDCTであり、右隣接マクロブロックのDCTタイプがフレームDCTであると判定された場合、ステップS84乃至S86に順次進み、選択部85は、図23Cで説明したように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の偶数行の4画素と、その左下のブロックBRDLにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0395】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックがフィールド構造であり、右隣接マクロブロックがフレーム構造であるときには、右隣接1次元DCT係数は、図23Cで説明したように、右隣接マクロブロックMBLの左上のブロックBRULにおける最左列の偶数行の4画素と、その左下のブロックBRDLにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数となるが、そのような垂直1次元DCT係数は、メモリ81に存在しない。
【0396】
そこで、サンプリング部83は、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数の垂直1次元逆DCT変換を、垂直1次元逆DCT変換部82に要求する。
【0397】
垂直1次元逆DCT変換部82は、サンプリング部83からの要求に応じ、ステップS84において、ブロックBRULの第1列の垂直1次元DCT係数と、ブロックBRDLの第1列の垂直1次元DCT係数を、メモリ81から読み出し、垂直1次元逆DCT変換を施す。これにより、垂直1次元逆DCT変換部82は、ブロックBRULの第1列の8画素と、ブロックBRDLの第1列の8画素を得て、サンプリング部83に供給し、ステップS85に進む。
【0398】
ステップS85では、サンプリング部83は、垂直1次元逆DCT変換部82から供給されるブロックBRULの第1列の8画素のうちの偶数行の4画素をサンプリングするとともに、同じく垂直1次元逆DCT変換部82から供給されるブロックBRDLの第1列の8画素のうちの偶数行の4画素をサンプリングし、ブロックBRULの第1列からサンプリングした偶数行の4画素を上側に配置するとともに、ブロックBRDLの第1列からサンプリングした偶数行の4画素を下側に配置することにより、注目マクロブロックと同一のフィールド(ボトムフィールド)構造とした垂直方向に並ぶ8画素を、垂直1次元DCT変換部84に供給する。
【0399】
垂直1次元DCT変換部84は、サンプリング部83でサンプリングされた8画素を受信すると、ステップS86において、その8画素を、垂直1次元DCT変換し、これにより、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の偶数行の4画素と、その左下のブロックBRDLにおける偶数行の4画素の合計8画素を垂直1次元DCT変換した垂直1次元DCT係数を得て、選択部85に供給する。選択部85は、垂直1次元DCT変換部84から供給される垂直1次元DCT係数を選択し、右隣接1次元DCT係数として出力する。
【0400】
また、ステップS79において、注目マクロブロックと右隣接マクロブロックのDCTタイプが、いずれもフィールドDCTであると判定された場合、ステップS87に進み、選択部85は、図23Dで説明したように、右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、右隣接1次元DCT係数として取得する。
【0401】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合において、注目マクロブロックと右隣接マクロブロックが、いずれもフィールド構造であるときには、右隣接1次元DCT係数は、図23Dで説明したように、右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBRDLの第1列の垂直1次元DCT係数である。ブロックBRDLの第1列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS87において、メモリ81から、ブロックBRDLの第1列の垂直1次元DCT係数を読み出して選択し、右隣接1次元DCT係数として出力する。
【0402】
ステップS80,S83,S86、およびS87の処理後は、いずれも、ステップS88に進み、選択部85は、図22で説明したように、注目ブロックBNDRの左隣のブロックBNDLの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数を、左隣接1次元DCT係数として取得する。
【0403】
即ち、注目ブロックが、注目マクロブロックの右下のブロックBNDRである場合には、左隣接1次元DCT係数は、図22で説明したように、注目ブロックBNDRの左隣のブロックBNDLの最右列の8画素を垂直1次元DCT変換した垂直1次元DCT係数であり、この垂直1次元DCT係数は、ブロックBNDLの第8列の垂直1次元DCT係数である。ブロックBNDLの第8列の垂直1次元DCT係数は、メモリ81に記憶されており、選択部85は、ステップS88において、メモリ81から、ブロックBNDLの第8列の垂直1次元DCT係数を読み出して選択し、左隣接垂直1次元DCT係数として出力して、右下ブロック処理を終了する。
【0404】
次に、図2のACパワー算出部33の処理について説明する。
【0405】
ACパワー算出部33は、上述したように、1次元逆DCT係数変換部31から供給される1次元DCT係数の交流成分のパワー(ACパワー)を求めるとともに、隣接1次元DCT係数選択/変換部32から供給される隣接1次元DCT係数のACパワーを求めるようになっている。
【0406】
即ち、ACパワー算出部33は、図30に示すように、注目ブロックにおける注目画素の位置の行の水平1次元DCT係数から、水平方向のACパワーを求めるとともに、注目画素の位置の列の垂直1次元DCT係数から、垂直方向のACパワーを求める。
【0407】
ここで、1次元DCT係数の7つの交流成分をACnと表すこととすると(n=1,2,・・・,7)、ACパワーPACは、例えば、次式によって計算される。
【0408】
PAC=ΣACn 2・・・(12)
【0409】
但し、式(12)において、Σは、変数nを1から7に変えてのサメーションを表す。
【0410】
また、ACパワー算出部33は、注目ブロックについての上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、右隣接1次元DCT係数それぞれについても、式(12)にしたがい、ACパワーを求める。なお、上隣接1次元DCT係数と下隣接1次元DCT係数は、いずれも水平1次元DCT係数であり、従って、これらから求められるACパワーは、水平方向のACパワーである。また、左隣接1次元DCT係数と右隣接1次元DCT係数は、いずれも垂直1次元DCT係数であり、従って、これらから求められるACパワーは、垂直方向のACパワーである。
【0411】
ACパワー算出部33は、さらに、注目ブロックの1次元DCT係数のうち、その境界に隣接するもの(以下、適宜、境界1次元DCT係数という)についても、式(12)にしたがい、ACパワーを求める。
【0412】
即ち、ACパワー算出部33は、注目ブロックの上側の境界に隣接する第1行の水平1次元DCT係数(以下、適宜、上境界1次元DCT係数という)から、水平方向のACパワーを求める。さらに、ACパワー算出部33は、注目ブロックの下側の境界に隣接する第8行の水平1次元DCT係数(以下、適宜、下境界1次元DCT係数という)から、水平方向のACパワーを求める。また、ACパワー算出部33は、注目ブロックの左側の境界に隣接する第1列の垂直1次元DCT係数(以下、適宜、左境界1次元DCT係数という)から、垂直方向のACパワーを求めるとともに、注目ブロックの右側の境界に隣接する第8列の垂直1次元DCT係数(以下、適宜、右境界1次元DCT係数という)から、垂直方向のACパワーを求める。
【0413】
次に、図31は、以上のようにしてACパワーを求める図2のACパワー算出部33の構成例を示している。
【0414】
水平1次元DCT係数抽出部91および垂直1次元DCT係数抽出部92には、1次元逆DCT変換部31(図2)と、隣接1次元DCT係数選択/変換部32から、1次元DCT係数が供給されるようになっている。
【0415】
水平1次元DCT係数抽出部91は、そこに供給される1次元DCT係数から、ACパワーの計算対象とするものを抽出し、水平ACパワー計算部93に供給する。即ち、水平1次元DCT係数抽出部91は、そこに供給される1次元DCT係数から、注目ブロックにおける注目画素の位置の行の水平1次元DCT係数、注目ブロックについての上隣接1次元DCT係数および下隣接1次元DCT係数、並びに注目ブロックの上境界1次元DCT係数および下境界1次元DCT係数を抽出し、水平ACパワー計算部93に供給する。
【0416】
垂直1次元DCT係数抽出部92には、そこに供給される1次元DCT係数から、ACパワーの計算対象とするものを抽出し、垂直ACパワー計算部94に供給する。即ち、垂直1次元DCT係数抽出部92は、そこに供給される1次元DCT係数から、注目ブロックにおける注目画素の位置の列の垂直1次元DCT係数、注目ブロックについての左隣接1次元DCT係数および右隣接1次元DCT係数、並びに注目ブロックの左境界1次元DCT係数および右境界1次元DCT係数を抽出し、垂直ACパワー計算部94に供給する。
【0417】
水平ACパワー計算部93は、水平1次元DCT係数抽出部91から供給される水平1次元DCT係数から、式(12)にしたがって、水平方向のACパワーを計算して出力する。即ち、水平ACパワー計算部93は、注目ブロックにおける注目画素の位置の行の水平1次元DCT係数、注目ブロックについての上隣接1次元DCT係数および下隣接1次元DCT係数、並びに注目ブロックの上境界1次元DCT係数および下境界1次元DCT係数それぞれから、水平方向のACパワーを計算する。
【0418】
垂直ACパワー計算部94は、垂直1次元DCT係数抽出部92から供給される垂直1次元DCT係数から、式(12)にしたがって、垂直方向のACパワーを計算して出力する。即ち、垂直ACパワー計算部94は、注目ブロックにおける注目画素の位置の列の垂直1次元DCT係数、注目ブロックについての左隣接1次元DCT係数および右隣接1次元DCT係数、並びに注目ブロックの左境界1次元DCT係数および右境界1次元DCT係数それぞれから、垂直方向のACパワーを計算する。
【0419】
なお、以上のようにして、1次元DCT係数から求められるACパワーは、その1次元DCT係数に対応する8画素の交流成分の電力と捉えることができ、従って、画像のアクティビティを表す。
【0420】
次に、図2のAC内積計算部34の処理について説明する。
【0421】
AC内積計算部34は、上述したように、1次元逆DCT係数変換部31から供給される注目ブロックの境界部分の1次元DCT係数(境界1次元DCT係数)の交流成分と、隣接1次元DCT係数選択/変換部32から供給される隣接1次元DCT係数の交流成分とを、それぞれベクトルのコンポーネントとみなして、その2つのベクトルの内積(AC内積)を求める。
【0422】
即ち、AC内積計算部34は、図32に示すように、注目ブロックについての上境界1次元DCT係数の交流成分と、上隣接1次元DCT係数の交流成分とを、それぞれベクトルのコンポーネントとみなして、その2つのベクトルのAC内積(以下、上内積という)を、次式にしたがって求める。
【0423】
I=Σ(ACn×ACn’)・・・(13)
【0424】
但し、式(13)において、Iは、AC内積を表す。さらに、ACnは、注目ブロックについての上境界1次元DCT係数のn番目の交流成分を表し、ACn’は、注目ブロックについての上隣接1次元DCT係数のn番目の交流成分を表す。また、Σは、nを1から7に変えてのサメーションを表す。
【0425】
AC内積計算部34は、注目ブロックについての下境界1次元DCT係数と下隣接1次元DCT係数、左境界1次元DCT係数と左隣接1次元DCT係数、または右境界1次元DCT係数と右隣接1次元DCT係数それぞれについても、式(13)にしたがい、AC内積を求める。
【0426】
ここで、以下、適宜、注目ブロックについての下境界1次元DCT係数と下隣接1次元DCT係数とから求められるAC内積を、下内積と、左境界1次元DCT係数と左隣接1次元DCT係数とから求められるAC内積を、左内積と、右境界1次元DCT係数と右隣接1次元DCT係数とから求められるAC内積を、右内積と、それぞれいう。
【0427】
AC内積は、注目ブロックの境界を挟む境界1次元DCT係数と隣接1次元DCT係数の交流成分が類似する場合、即ち、境界1次元DCT係数の交流成分をコンポーネントとするベクトルと、隣接1次元DCT係数の交流成分をコンポーネントとするベクトルとがつくる角度が90度未満(以上)である場合に正の値(0以上の値)となる。従って、AC内積が正の値であることは、注目ブロックの境界を挟む境界1次元DCT係数に対応する8画素と、隣接1次元DCT係数に対応する8画素の波形パターンが似ていることを表しており、例えば、注目ブロックとそれに隣接するブロックの境界において、その境界を横切る形で連続しているエッジが存在することを表す。
【0428】
次に、図33は、注目ブロックについて、上述のようなAC内積(上内積、下内積、左内積、右内積)を計算する図2のAC内積計算部34の構成例を示している。
【0429】
1次元逆DCT変換部31と隣接1次元DCT係数選択/変換部32が出力する1次元DCT係数は、上内積用1次元DCT係数抽出部101、下内積用1次元DCT係数抽出部102、左内積用1次元DCT係数抽出部103、および右内積用1次元DCT係数抽出部104に供給されるようになっている。
【0430】
上内積用1次元DCT係数抽出部101は、注目ブロックについて、上内積を計算するのに用いる上境界1次元DCT係数と上隣接1次元DCT係数を、そこに供給される1次元DCT係数から抽出し、上内積演算部105に供給する。
【0431】
上内積演算部105は、上内積用1次元DCT係数抽出部101から供給される上境界1次元DCT係数と上隣接1次元DCT係数から、式(13)にしたがって、上内積を計算して出力する。
【0432】
下内積用1次元DCT係数抽出部102は、注目ブロックについて、下内積を計算するのに用いる下境界1次元DCT係数と下隣接1次元DCT係数を、そこに供給される1次元DCT係数から抽出し、下内積演算部106に供給する。
【0433】
下内積演算部106は、下内積用1次元DCT係数抽出部102から供給される下境界1次元DCT係数と下隣接1次元DCT係数から、式(13)にしたがって、下内積を計算して出力する。
【0434】
左内積用1次元DCT係数抽出部103は、注目ブロックについて、左内積を計算するのに用いる左境界1次元DCT係数と左隣接1次元DCT係数を、そこに供給される1次元DCT係数から抽出し、左内積演算部107に供給する。
【0435】
左内積演算部107は、左内積用1次元DCT係数抽出部103から供給される左境界1次元DCT係数と左隣接1次元DCT係数から、式(13)にしたがって、左内積を計算して出力する。
【0436】
右内積用1次元DCT係数抽出部104は、注目ブロックについて、右内積を計算するのに用いる右境界1次元DCT係数と右隣接1次元DCT係数を、そこに供給される1次元DCT係数から抽出し、右内積演算部108に供給する。
【0437】
右内積演算部108は、右内積用1次元DCT係数抽出部104から供給される右境界1次元DCT係数と右隣接1次元DCT係数から、式(13)にしたがって、右内積を計算して出力する。
【0438】
次に、図34は、図2のクラスコード生成部36の構成例を示している。
【0439】
クラスコード生成部36は、輝度信号のブロックを対象に、そのブロックを構成する画素をクラス分類するようになっている。
【0440】
即ち、比較部111および112には、ACパワー算出部33(図2)が出力するACパワーが供給される。平坦性条件判定部113には、ACパワー算出部33(図2)が出力するACパワー、並びに1次元逆DCT変換部31および隣接1次元DCT係数選択/変換部32が出力する1次元DCT係数が供給される。連続性判定部114には、AC内積計算部34(図2)が出力するAC内積が供給される。境界部エッジ条件判定部115には、1次元逆DCT変換部31および隣接1次元DCT係数選択/変換部32が出力する1次元DCT係数が供給される。
【0441】
比較部111は、ACパワー算出部33(図2)が出力するACパワーのうちの、注目画素の行の水平1次元DCT係数から求められた水平方向のACパワーを、所定の閾値Aと比較し、その比較結果を、クラスコード作成部116に供給する。
【0442】
比較部112は、ACパワー算出部33(図2)が出力するACパワーのうちの、注目画素の列の垂直1次元DCT係数から求められた垂直方向のACパワーを、所定の閾値Aと比較し、その比較結果を、クラスコード作成部116に供給する。
【0443】
平坦性条件判定部113は、注目ブロックについて、境界1次元DCT係数から求められたACパワー、隣接1次元DCT係数から求められたACパワー、さらには、境界1次元DCT係数の直流成分、隣接1次元DCT係数の直流成分に基づき、注目ブロックの上下左右それぞれの境界について、各境界部分における画像の平坦性を判定し、その判定結果を、クラスコード生成部116に供給する。
【0444】
連続性条件判定部114は、注目ブロックについて求められた上内積、下内積、左内積、右内積に基づき、注目ブロックの上下左右それぞれの境界について、各境界部分における画像の連続性を判定し、その判定結果を、クラスコード生成部116に供給する。
【0445】
境界部エッジ条件判定部115は、注目ブロックについての境界1次元DCT係数の直流成分と、隣接1次元DCT係数の直流成分とに基づき、注目ブロックの上下左右それぞれの境界について、その境界に沿ってエッジが存在するかどうかを判定し、その判定結果を、クラスコード生成部116に供給する。
【0446】
クラスコード作成部116は、比較部111および112、平坦性条件判定部113、連続性条件判定部114、並びに境界部エッジ条件判定部115の出力に基づき、注目画素をクラス分類し、そのクラスを表すクラスコード(輝度クラスコード)を作成(生成)して出力する。
【0447】
ここで、図35は、クラスコード作成部116が出力するクラスコードのフォーマットを示している。
【0448】
図35の実施の形態では、クラスコードは、10ビットとされており、その先頭から、2ビットのACパワークラスコード、4ビットのブロック平坦性クラスコード、4ビットのブロック間連続性クラスコードが順次配置されて構成される。
【0449】
2ビットのACパワークラスコードは、注目画素を、その垂直方向のACパワーと水平方向のACパワーによってクラス分けするもので、その先頭のビットは、注目画素の列の垂直1次元DCT係数から求められた垂直方向のACパワーによって決定され、2番目のビットは、注目画素の行の水平1次元DCT係数から求められた水平方向のACパワーによって決定される。従って、ACパワークラスコードは、画素ごとに決定される。
【0450】
4ビットのブロック平坦性クラスコードは、注目画素を含むブロック(注目ブロック)を、その上下左右それぞれの境界部分の平坦性(注目ブロックとそれに隣接するブロックとの間における画像の平坦さ)によってクラス分けするもので、その1乃至4番目のビットは、注目ブロックの上、下、左、右それぞれの境界の平坦性によって決定される。従って、ブロック平坦性クラスコードは、ブロックごとに決定される。
【0451】
4ビットのブロック間連続性クラスコードは、注目画素を含むブロック(注目ブロック)を、その上下左右それぞれの境界部分の連続性(注目ブロックとそれに隣接するブロックとの間における画像のつながり具合)によってクラス分けするもので、その1乃至4番目のビットは、注目ブロックの上、下、左、右それぞれの境界の連続性によって決定される。従って、ブロック連続性クラスコードも、ブロック平坦性クラスコードと同様に、ブロックごとに決定される。
【0452】
以上から、ACパワークラスコードは、基本的に、画素ごとに異なるが、ブロック平坦性クラスコードとブロック間連続性クラスコードは、同一ブロックの画素については、同一となる。
【0453】
次に、図36のフローチャートを参照して、図34のクラスコード生成部36の処理(クラス分類処理)について説明する。
【0454】
クラスコード生成部36では、まず最初に、ステップS91において、比較部111が、ACパワー算出部33(図2)が出力するACパワーのうちの、注目画素の行の水平1次元DCT係数から求められた水平方向のACパワーを、所定の閾値Aと比較し、その比較結果を、クラスコード作成部116に供給する。さらに、ステップS91では、比較部112が、ACパワー算出部33(図2)が出力するACパワーのうちの、注目画素の列の垂直1次元DCT係数から求められた垂直方向のACパワーを、所定の閾値Aと比較し、その比較結果を、クラスコード作成部116に供給する。
【0455】
そして、クラスコード作成部116は、比較部111と112の出力に基づいて、注目画素のACパワークラスコードを決定する。
【0456】
即ち、クラスコード作成部116は、注目画素の列の垂直1次元DCT係数から求められた垂直方向のACパワーが、所定の閾値Aより大の場合は、2ビットのACパワークラスコードのうちの1番目のビットを、例えば1とし、その垂直方向のACパワーが、所定の閾値Aより大でない場合は、ACパワークラスコードの1番目のビットを、例えば、0とする。さらに、クラスコード作成部116は、注目画素の行の水平1次元DCT係数から求められた水平方向のACパワーが、所定の閾値Aより大の場合は、2ビットのACパワークラスコードのうちの2番目のビットを、例えば1とし、その水平方向のACパワーが、所定の閾値Aより大でない場合は、ACパワークラスコードの2番目のビットを、例えば、0とする。
【0457】
その後、ステップS92に進み、境界部エッジ条件判定部115は、注目ブロックについての境界1次元DCT係数の直流成分と、隣接1次元DCT係数の直流成分とに基づき、注目ブロックの境界について、その境界に沿ってエッジが存在するという境界部エッジ条件が満たされるかどうかを判定する。
【0458】
即ち、境界部エッジ条件判定部115は、例えば、注目ブロックについての境界1次DCT係数の直流成分DCと、隣接1次DCT係数の直流成分DC’との差分絶対値|DC−DC’|が、所定の閾値Eよりも大きい(または以上である)という条件を、境界部エッジ条件として、そのような境界部エッジ条件が満たされるかどうかを判定する。
【0459】
ステップS92において、境界部エッジ条件が満たされると判定した場合、即ち、注目ブロックについての境界1次DCT係数の直流成分DCと、隣接1次DCT係数の直流成分DC’との差が非常に大きく、従って、注目ブロックの境界部分にエッジが存在し、注目ブロックとそれに隣接するブロックの画像パターンにつながりがないと考えられる場合、境界部エッジ条件判定部115は、その旨を、クラスコード作成部116に出力し、ステップS97に進む。ステップS97では、クラスコード作成部116は、ブロック平坦性クラスコードおよびブロック間連続性クラスコードを、いずれも、例えば0とし、ステップS98に進む。
【0460】
また、ステップS92において、境界部エッジ条件が満たされないと判定された場合、ステップS93に進み、平坦性条件判定部113は、注目ブロックについて、境界1次元DCT係数から求められたACパワー、隣接1次元DCT係数から求められたACパワー、さらには、境界1次元DCT係数の直流成分、隣接1次元DCT係数の直流成分に基づき、注目ブロックの境界部分が平坦であるという平坦性条件が満たされるかどうかを判定する。
【0461】
即ち、平坦性条件判定部113は、例えば、次式で表される条件を、平坦性条件として、そのような平坦性条件が満たされるかどうかを判定する。
【0462】
(PAC≦B)∩(PAC’≦B)∩(|DC−DC’|≦D)・・・(14)
【0463】
PAC’≦C・・・(15)
【0464】
但し、式(14)および(15)において、B,C,Dは、所定の閾値であり、閾値Cは、閾値Bよりも十分小さいものとする。また、式(14)および(15)において、PACは、注目ブロックについての境界1次元DCT係数から求められたACパワーを表し、PAC’は、注目ブロックについての隣接1次元DCT係数から求められたACパワーを表す。さらに、式(14)において、DCは、注目ブロックについての境界1次元DCT係数の直流成分を表し、DC’は、注目ブロックについての隣接1次元DCT係数の直流成分を表す。また、∩は、論理積を表す。
【0465】
式(14)は、注目ブロックについての境界1次元DCT係数と隣接1次元DCT係数からそれぞれ求められるACパワーPACとPAC’が、いずれも閾値B以下で(または未満で)、かつ、それぞれの直流成分DCとDC’の差分絶対値|DC−DC’|が、閾値D以下(または未満)の場合に、真となる。また、式(15)は、注目ブロックについての隣接1次元DCT係数から求められたACパワーPAC’が、閾値C以下(または未満)の場合に、真となる。
【0466】
ここで、閾値Cは、上述したように、閾値Bよりも十分小さい、例えば、0に近い値であり、従って、式(15)は、注目ブロックについての隣接1次元DCT係数から求められたACパワーPAC’が0に近い場合に、真となる。
【0467】
なお、ここでは、平坦性条件は、例えば、式(14)および(15)のうちのいずれか一方が真であれば満たされるものとする。
【0468】
ステップS93において、平坦性条件が満たされると判定された場合、平坦性条件判定部113は、その旨を、クラスコード作成部116に供給して、ステップS94に進む。
【0469】
ステップS94では、クラスコード作成部116は、ブロック平坦性クラスコードおよびブロック間連続性クラスコードを、いずれも、例えば1とし、ステップS98に進む。
【0470】
また、ステップS93において、平坦性条件が満たされないと判定された場合、ステップS95に進み、連続性条件判定部114は、注目ブロックについて求められたAC内積に基づき、注目ブロックの境界部分に連続性があるという連続性条件が満たされるかどうかを判定する。
【0471】
即ち、連続性条件判定部114は、例えば、注目ブロックについてのAC内積Iが、正の値(または0以上)であるという条件を、連続性条件として、そのような連続性条件が満たされるかどうかを判定する。
【0472】
ステップS95において、連続性条件が満たされると判定された場合、連続性条件判定部114は、その旨を、クラスコード作成部116に供給して、ステップS96に進む。
【0473】
ステップS96では、クラスコード作成部116は、ブロック平坦性クラスコードを、例えば、0とするとともに、ブロック間連続性クラスコードを、例えば、1とし、ステップS98に進む。
【0474】
一方、ステップS96において、連続性条件が満たされないと判定された場合、連続性条件判定部114は、その旨を、クラスコード作成部116に供給して、ステップS97に進む。ステップS97では、クラスコード作成部116は、上述したように、ブロック平坦性クラスコードおよびブロック間連続性クラスコードを、いずれも0とし、ステップS98に進む。
【0475】
なお、ステップS92乃至S97の処理は、注目ブロックの上下左右の境界それぞれについて、独立に行われ、これにより、ブロック平坦性クラスコードとブロック間連続性クラスコードは、注目ブロックの上下左右の境界それぞれについて求められる。
【0476】
ステップS98では、クラスコード作成部116は、ステップS91乃至S97の処理によって求められたACパワークラスコード、ブロック平坦性クラスコード、およびブロック間連続性クラスコードから、図35に示した10ビットのクラスコードを作成し、処理を終了する。
【0477】
なお、図36のフローチャートに示した処理は、新たな画素が注目画素とされるごとに行われる。但し、上述したように、ブロック平坦生クラスコードとブロック間連続性クラスコードは、同一ブロックの画素については同一となるため、同一ブロックを構成する画素については、最初の画素に対してのみ、ステップS91乃至98の処理を行い、他の画素に対しては、ステップS91とS98の処理だけを行い、ブロック平坦生クラスコードとブロック間連続性クラスコードは、最初の画素に対して得られたものを流用するようにすることが可能である。
【0478】
ここで、本実施の形態では、図35に示したように、クラスコードを10ビットとしているため、そのような10ビットのクラスコードによれば、1024(=210)通りのクラスを表すことができる。
【0479】
しかしながら、図36に示したクラス分類処理では、ブロック平坦性クラスコードが1で、ブロック間連続性クラスコードが0となるケースは、存在しない。即ち、ここでは、ブロックの境界部分が平坦であるのに、連続性がないということはありえないとして、ブロック平坦性クラスコードが1となる場合には、ブロック間連続性クラスコードも、必ず1とするようにしている。
【0480】
従って、例えば、ブロックの上の境界についてのブロック平坦性クラスコードとブロック間連続性クラスコードとの組(b1,b2)は、(0,0),(0,1),(1,1)の3通りしか取り得ない。その結果、ブロックの上下左右の4つの境界すべてについての4ビットのブロック平坦性クラスコード、および4ビットのブロック間連続性クラスコードで表現されるクラス数は、81(=34)通りとなる。
【0481】
また、2ビットのACパワークラスコードで表現されるクラス数は、4(=22)通りである。
【0482】
従って、ここでは、図35の10ビットのクラスコードで表現されるクラス数は、324(=81×4)通りとなる。
【0483】
ここで、上述の場合において、ブロック平坦性クラスコードとブロック間連続性クラスコードとの組(b1,b2)が、(0,0)となるケースは、注目ブロックとそれに隣接する隣接ブロックにおける画像どうしにつながりがなく、注目ブロックと隣接ブロックとが、いわば「無関係」であることを表す。また、(b1,b2)が、(0,1)となるケースは、注目ブロックと隣接ブロックにおける画像が、平坦ではないが、「連続」していることを表す。さらに、(b1,b2)が、(1,1)となるケースは、注目ブロックと隣接ブロックにおける画像が、「平坦」であること(従って、「連続」でもある)ことを表す。
【0484】
なお、上述の場合には、ブロック平坦性クラスコードとブロック間連続性クラスコードとの組(b1,b2)を、3通りとして、10ビットのクラスコードにより、324通りのクラスを表現するようにしたが、(b1,b2)は、3通りではなく、(0,0),(0,1),(1,0)、(1,1)の4通りを取り得るようにして、10ビットのクラスコードにより、1024(=210)通りのクラスを表現することができるようにすることも可能である。
【0485】
即ち、上述の場合には、式(14)または(15)のいずれか一方のみが満たされれば、平坦性条件が満たされることとして、(b1,b2)に(1,1)を割り当てるようにしたが、例えば、式(14)と(15)の両方が満たされる場合と、式(14)だけが満たされる場合とを区別するようにし、式(14)と(15)の両方が満たされる場合には、(b1,b2)に、(1,1)を割り当てるとともに、式(14)だけが満たされる場合には、(b1,b2)に、(1,0)を割り当てるようにすることが可能である。
【0486】
この場合、(b1,b2)が、(1,1)となるケースは、注目ブロックと隣接ブロックにおける画像が、「注目ブロック側と隣接ブロック側の両方で平坦」であることを表し、(b1,b2)が、(1,0)となるケースは、注目ブロックと隣接ブロックにおける画像が、「隣接ブロック側だけで平坦」であることを表す。
【0487】
また、図36のフローチャートでは、境界エッジ条件が満たされるケースであっても、平坦性条件と連続性条件のいずれもが満たされないケースであっても、(b1,b2)を、(0,0)とするようにしたが、境界エッジ条件が満たされるケースか、平坦性条件と連続性条件のいずれもが満たされないケースのうちのいずれか一方を、(1,0)に割り当てることにより、ブロック平坦性クラスコードとブロック間連続性クラスコードとの組(b1,b2)が、4通りを取り得るようにすることも可能である。
【0488】
さらに、式(14)と(15)の両方が満たされるケースと、式(14)だけが満たされるケースとを区別するとともに、境界エッジ条件が満たされるケースと、平坦性条件と連続性条件のいずれもが満たされないケースとを区別するようにすることも可能である。但し、この場合、注目ブロックと隣接ブロックにおける画像が「連続」しているケース、および注目ブロックと隣接ブロックにおける画像が「平坦」であるケースとあわせると、注目ブロックの1つ(1辺)の境界について、5通りの場合分けが必要となる。従って、この場合、注目ブロックの境界によるクラスの場合の数は、625通りとなり、その結果、2ビットのACパワークラスコードも考慮すると、全クラス数は、2500となる。
【0489】
次に、図37は、図2のクラスコード生成部37の構成例を示している。
【0490】
クラスコード生成部37は、色差信号のブロックを対象に、そのブロックを構成する画素をクラス分類するようになっている。
【0491】
従って、クラスコード生成部37は、輝度クラスコードを出力するクラスコード生成部36と同様に構成することも可能である。
【0492】
しかしながら、色差信号のブロックは、一般に、輝度信号のブロックに比較して、画像のアクティビティが低く、1次元DCT係数の交流成分の値が小さくなるため、クラスコード生成部36と同一の処理を行うと、効果的なクラス分類が困難な場合がある。
【0493】
そこで、ここでは、クラスコード生成部37は、クラスコード生成部36で得られた輝度クラスコードをも用いて、色差信号の画素のクラス分類を行うようになっている。
【0494】
即ち、図37の実施の形態において、比較部121および122には、ACパワー算出部33(図2)が出力するACパワーが供給される。
【0495】
比較部121は、図34の比較部111と同様に、ACパワー算出部33(図2)が出力するACパワーのうちの、注目画素の行の水平1次元DCT係数から求められた水平方向のACパワーを、所定の閾値Aと比較し、その比較結果を、クラスコード作成部123に供給する。
【0496】
比較部122は、図33の比較部112と同様に、ACパワー算出部33(図2)が出力するACパワーのうちの、注目画素の列の垂直1次元DCT係数から求められた垂直方向のACパワーを、所定の閾値Aと比較し、その比較結果を、クラスコード作成部123に供給する。
【0497】
なお、クラスコード生成部37では、色差信号のブロックを対象に処理が行われるが、上述したように、色差信号については、その1次元DCT係数の交流成分の値が小さくなることから、ACパワーも小さくなる。このため、比較部121と122で用いられる閾値Aは、図34の比較部111と112で用いられるものよりも小さい値のものを用いるのが望ましい。
【0498】
クラスコード作成部123には、比較部121および122の出力の他、クラスコード作成部36が出力する図35の輝度クラスコードも供給されるようになっており、クラスコード作成部123は、これらの比較部121および122の出力、並びに輝度クラスコードに基づき、注目画素をクラス分類し、そのクラスを表すクラスコード(色差クラスコード)を作成(生成)して出力する。
【0499】
ここで、クラスコード作成部123は、図35に示した輝度クラスコードと同一フォーマットの色差クラスコードを作成するようになっている。
【0500】
即ち、クラスコード作成部123は、注目画素のACパワークラスコードについては、比較部121と122の出力に基づき、図34のクラスコード作成部116と同様にして作成する。
【0501】
また、クラスコード作成部123は、注目画素のブロック平坦性クラスコードと、ブロック間連続性クラスコードについては、その注目画素を含む色差信号のブロック(注目ブロック)と空間的に同一位置にある輝度信号のブロックにおける画素の輝度クラスコードを用いて作成する。
【0502】
即ち、例えば、いま、画像データがYUV形式で表されるものとし、その画像フォーマットが、4:2:2であるとすると、図38Aに示すように、左右に並ぶ2つの輝度ブロックY1およびY2と、1つの色差ブロックUと、1つの色差ブロックVとが対応する。
【0503】
そして、この場合、色差ブロックUの上の境界は、左の輝度ブロックY1の上の境界aと右の輝度ブロックY2の上の境界bに、色差ブロックUの下の境界は、輝度ブロックY1の下の境界eと輝度ブロックY2の下の境界fに、色差ブロックUの左の境界は、輝度ブロックY1の左の境界cに、色差ブロックUの右の境界は、輝度ブロックY2の右の境界dに、それぞれ対応する。
【0504】
そこで、図38Aに点線で示してあるように、色差ブロックUを、横×縦が4×8画素の、左右に隣接する2つの小ブロックUlとUrに分割すると、図38Bに示すように、左の小ブロックUlの上の境界は、輝度ブロックY1の上の境界aに、小ブロックUlの下の境界は、輝度ブロックY1の下の境界eに、小ブロックUlの左の境界は、輝度ブロックY1の左の境界cに、小ブロックUlの右の境界は、輝度ブロックY2の右の境界dに、それぞれ対応する。また、右の小ブロックUrの上の境界は、輝度ブロックY2の上の境界bに、小ブロックUrの下の境界は、輝度ブロックY2の下の境界fに、小ブロックUrの左の境界は、輝度ブロックY1の左の境界cに、小ブロックUrの右の境界は、輝度ブロックY2の右の境界dに、それぞれ対応する。
【0505】
ここで、図35のクラスコードにおいて、ブロックの上下左右の境界について求められたブロック平坦性クラスコードを、以下、適宜、上境界平坦性コード、下境界平坦性コード、左境界平坦性コード、右境界平坦性コードと、それぞれいう。また、ブロックの上下左右の境界について求められたブロック間連続性クラスコードを、以下、適宜、上境界連続性コード、下境界連続性コード、左境界連続性コード、右境界連続性コードと、それぞれいう。さらに、以下、適宜、上境界平坦性コードと上境界連続性コードをまとめて、上境界コードと、下境界平坦性コードと下境界連続性コードをまとめて、下境界コードと、左境界平坦性コードと左境界連続性コードをまとめて、左境界コードと、右境界平坦性コードと右境界連続性コードをまとめて、右境界コードと、それぞれいう。また、以下、適宜、上境界コード、下境界コード、左境界コード、および右境界コードをまとめて、境界コードという。
【0506】
輝度ブロックY1およびY2の境界と、小ブロックUlやUrの境界との間には、上述のような対応関係があることから、クラスコード作成部123は、小ブロックUlとUrそれぞれの画素の色差クラスコードにおける境界コードとして、輝度ブロックY1およびY2の対応する境界について求められたものを、そのまま用いるようになっている。
【0507】
即ち、クラスコード作成部123は、小ブロックUlの画素については、その色差クラスコードにおける上境界コード、下境界コード、左境界コード、右境界コードとして、それぞれ、輝度ブロックY1の上境界コード、輝度ブロックY1の下境界コード、輝度ブロックY1の左境界コード、輝度ブロックY2の右境界をセットする。
【0508】
また、クラスコード作成部123は、小ブロックUrの画素については、その色差クラスコードにおける上境界コード、下境界コード、左境界コード、右境界コードとして、それぞれ、輝度ブロックY2の上境界コード、輝度ブロックY2の下境界コード、輝度ブロックY1の左境界コード、輝度ブロックY2の右境界コードをセットする。
【0509】
色差ブロックVと、輝度ブロックY1およびY2との対応関係も、色差ブロックUと、輝度ブロックY1およびY2との対応関係と同一であり、クラスコード作成部123は、色差ブロックUにおける場合と同様に、色差ブロックVを、横×縦が4×8画素の2つの小ブロックVlとVrに分割し、小ブロックVlとVrの色差クラスコードにおける境界コードとして、輝度ブロックY1およびY2の境界コードを、色差ブロックUにおける場合と同様にしてセットする。
【0510】
その結果、クラスコード作成部123では、小ブロックUl,Ur,Vl,Vrの画素について、次のような色差クラスコードが作成される。
【0511】
即ち、例えば、いま、図39Aに示すように、色差ブロックU,Vに対応する2つの輝度ブロックY1またはY2の画素について得られている10ビットの輝度クラスコードの第iビット(最下位ビットからiビット目)を、BL#i−1またはBR#i−1と、それぞれ表すこととすると、小ブロックUl,Ur,Vl,Vrの画素については、図39Bに示すようなクラスコードが作成される。
【0512】
即ち、小ブロックUl,Vlの画素の色差クラスコードの第1乃至第8ビットには、BR0,BL1,BL2,BL3,BR4,BL5,BL6,BL7がそれぞれ配置される。また、小ブロックUr,Vrの画素の色差クラスコードの第1乃至第8ビットには、BR0,BL1,BR2,BR3,BR4,BL5,BR6,BR7がそれぞれ配置される。
【0513】
ここで、色差クラスコードの第9ビットと第10ビットは、輝度クラスコードにおける場合と同様に、注目画素のACパワーに基づいて決定される。
【0514】
次に、画像フォーマットが、例えば、4:2:0である場合には、図40Aに示すように、左上、左下、右上、右下の位置関係にある4つの隣接する輝度ブロックY1,Y2,Y3,Y4と、1つの色差ブロックUと、1つの色差ブロックVとが対応する。
【0515】
そして、この場合、図40Aに点線で示してあるように、色差ブロックUを、横×縦が4×4画素の左上、左下、右上、右下の位置関係にある4つの小ブロックUul,Ull,Uur,Ulrに分割すると、図40Bに示すように、小ブロックUulの上の境界は、輝度ブロックY1の上の境界aに、小ブロックUulの下の境界は、輝度ブロックY3の下の境界gに、小ブロックUulの左の境界は、輝度ブロックY1の左の境界cに、小ブロックUulの右の境界は、輝度ブロックY2の右の境界dに、それぞれ対応する。また、小ブロックUllの上の境界は、輝度ブロックY1の上の境界aに、小ブロックUllの下の境界は、輝度ブロックY3の下の境界gに、小ブロックUllの左の境界は、輝度ブロックY3の左の境界eに、小ブロックUllの右の境界は、輝度ブロックY4の右の境界fに、それぞれ対応する。さらに、小ブロックUurの上の境界は、輝度ブロックY2の上の境界bに、小ブロックUurの下の境界は、輝度ブロックY4の下の境界hに、小ブロックUurの左の境界は、輝度ブロックY1の左の境界cに、小ブロックUurの右の境界は、輝度ブロックY2の右の境界dに、それぞれ対応する。さらに、小ブロックUlrの上の境界は、輝度ブロックY2の上の境界bに、小ブロックUlrの下の境界は、輝度ブロックY4の下の境界hに、小ブロックUlrの左の境界は、輝度ブロックY3の左の境界eに、小ブロックUlrの右の境界は、輝度ブロックY4の右の境界fに、それぞれ対応する。
【0516】
輝度ブロックY1乃至Y4の境界と、小ブロックUulや、Ull,Uur,Ulrの境界との間には、上述のような対応関係があることから、クラスコード作成部123は、画像フォーマットが4:2:2である場合と同様に、小ブロックUul,Ull,Uur,Ulrそれぞれの画素の色差クラスコードにおける境界コードとして、輝度ブロックY1乃至Y4の対応する境界について求められたものを、そのまま用いるようになっている。
【0517】
即ち、クラスコード作成部123は、小ブロックUulの画素については、その色差クラスコードにおける上境界コード、下境界コード、左境界コード、右境界コードとして、それぞれ、輝度ブロックY1の上境界コード、輝度ブロックY3の下境界コード、輝度ブロックY1の左境界コード、輝度ブロックY2の右境界をセットする。
【0518】
また、クラスコード作成部123は、小ブロックUllの画素については、その色差クラスコードにおける上境界コード、下境界コード、左境界コード、右境界コードとして、それぞれ、輝度ブロックY1の上境界コード、輝度ブロックY3の下境界コード、輝度ブロックY3の左境界コード、輝度ブロックY4の右境界をセットする。
【0519】
さらに、クラスコード作成部123は、小ブロックUurの画素については、その色差クラスコードにおける上境界コード、下境界コード、左境界コード、右境界コードとして、それぞれ、輝度ブロックY2の上境界コード、輝度ブロックY4の下境界コード、輝度ブロックY1の左境界コード、輝度ブロックY2の右境界コードをセットする。
【0520】
また、クラスコード作成部123は、小ブロックUlrの画素については、その色差クラスコードにおける上境界コード、下境界コード、左境界コード、右境界コードとして、それぞれ、輝度ブロックY2の上境界コード、輝度ブロックY4の下境界コード、輝度ブロックY3の左境界コード、輝度ブロックY4の右境界コードをセットする。
【0521】
色差ブロックVと、輝度ブロックY1乃至Y4との対応関係も、色差ブロックUと、輝度ブロックY1乃至Y4との対応関係と同一であり、クラスコード作成部123は、色差ブロックUにおける場合と同様に、色差ブロックVを、横×縦が4×4画素の4つの小ブロックVul,Vll,Vur,Vlrに分割し、小ブロックVul,Vll,Vur,Vlrの色差クラスコードにおける境界コードとして、輝度ブロックY1乃至Y4の境界コードを、色差ブロックUにおける場合と同様にしてセットする。
【0522】
その結果、クラスコード作成部123では、小ブロックUul,Ull,Uur,Ulr、およびVul,Vll,Vur,Vlrの画素について、次のような色差クラスコードが作成される。
【0523】
即ち、例えば、いま、図41Aに示すように、色差ブロックU,Vに対応する2つの輝度ブロックY1乃至Y4の画素について得られている10ビットの輝度クラスコードの第iビットを、BUL#i−1,BUR#i−1,BDL#i−1,BDR#i−1と、それぞれ表すこととすると、小ブロックUul,Ull,Uur,Ulr、およびVul,Vll,Vur,Vlrの画素については、図41Bに示すようなクラスコードが作成される。
【0524】
即ち、小ブロックUul,Vulの画素の色差クラスコードの第1乃至第8ビットには、BUR0,BUL1,BDL2,BUL3,BUR4,BUL5,BDL6,BUL7がそれぞれ配置される。また、小ブロックUll,Vllの画素の色差クラスコードの第1乃至第8ビットには、BDR0,BDL1,BDL2,BUL3,BDR4,BDL5,BDL6,BUL7がそれぞれ配置される。さらに、小ブロックUur,Vurの画素の色差クラスコードの第1乃至第8ビットには、BUR0,BUL1,BDR2,BUR3,BUR4,BUL5,BDR6,BUR7がそれぞれ配置される。また、小ブロックUlr,Vlrの画素の色差クラスコードの第1乃至第8ビットには、BDR0,BDL1,BDR2,BUR3,BDR4,BDL5,BDR6,BUR7がそれぞれ配置される。
【0525】
ここで、色差クラスコードの第9ビットと第10ビットは、輝度クラスコードにおける場合と同様に、注目画素のACパワーに基づいて決定される。
【0526】
なお、ここでは、画像データが、Y,U,V形式で表されるものとして説明したが、画像データが、その他、例えば、Y,Cb,Cr形式で表される場合も、同様のクラス分類を行うことが可能である。
【0527】
さらに、ここでは、画像フォーマットが、4:2:2の場合と、4:2:0の場合について説明したが、画像フォーマットが、4:4:4の場合(例えば、画像データが、R(red),G(green),B(blue)形式の場合)は、各信号について、同一のクラス分類を行っても良いし、ある信号について行ったクラス分類により得られたクラスコードを、そのまま、他の信号に用いるようにしても良い。
【0528】
次に、図42は、図2の適応処理部51の構成例を示している。
【0529】
予測タップ生成部131は、バッファメモリ12(図2)から2次元DCT係数を読み出すことにより、注目画素を予測する式(1)の線形1次予測演算を行うための予測タップを生成し、積和演算部133に供給する。
【0530】
ここで、図43は、図42の予測タップ生成部131の構成例を示している。
【0531】
読み出し部136は、バッファメモリ12(図2)から必要な2次元DCT係数を読み出し、配列部137に供給する。配列部137は、読み出し部136からの2次元DCT係数を、所定の順番に配列する(並べる)ことにより、予測タップを構成し、積和演算部133(図42)に供給する。
【0532】
ここで、読み出し部136は、例えば、バッファメモリ12に記憶された注目ブロックの2次元DCT係数すべてを読み出し、予測タップとして、配列部137に供給する。この場合、予測タップは、64(=8×8)タップで構成されることになる。
【0533】
ところで、注目画素の空間周波数成分は、注目ブロックの2次元DCT係数全体に、いわば分散しているから、注目画素を予測するにあたっては、少なくとも、注目ブロックの2次元DCT係数すべてを、予測タップとして用いるのが望ましい。
【0534】
しかしながら、注目画素は、一般に、注目ブロックの画素のみならず、それに隣接する隣接ブロックなどの、注目ブロックの周辺の周辺ブロックの画素とも相関を有する場合が多く、従って、予測タップは、一般には、周辺ブロックの情報(周辺情報)も含めた形で構成した方が、注目画素を、より精度良く復号(予測)することが可能となる。
【0535】
そこで、読み出し部136では、例えば、図44に示すように、バッファメモリ12に記憶された注目ブロックの2次元DCT係数すべてと、その注目ブロックの上下左右それぞれに隣接する4つの隣接ブロックの2次元DCT係数すべてとを読み出し、予測タップとして、配列部137に供給することができる。この場合、予測タップは、320(=8×8×5)タップで構成されることになる。
【0536】
また、読み出し部136では、例えば、図45に示すように、バッファメモリ12に記憶された注目ブロックの2次元DCT係数すべてと、その注目ブロックの上、下、左、右、左上、左下、右上、右下それぞれに隣接する8つの隣接ブロックの2次元DCT係数すべてとを読み出し、予測タップとして、配列部137に供給することができる。この場合、予測タップは、576(=8×8×9)タップで構成されることになる。
【0537】
ところで、図44や図45に示したように、注目ブロックに隣接する複数ブロックの2次元DCT係数すべてを、予測タップに含めることとすると、予測タップのタップ数が大になり、後述する積和演算部133(図42)において用いられるタップ係数の数も多くなり、さらには、積和演算部133の演算量も大になる。
【0538】
そこで、読み出し部136には、例えば、図46に示すように、バッファメモリ12に記憶された注目ブロックの2次元DCT係数すべてと、その注目ブロックの上、下、左、右、左上、左下、右上、右下それぞれに隣接する8つのブロックの2次元DCT係数のうちの直流成分だけを、予測タップとして読み出させるようにすることができる。この場合、予測タップは、72(=8×8+8)タップで構成されることになり、図44や図45における場合に比較して、隣接ブロックの情報を含む予測タップ、即ち、ここでは、2次元DCT係数の直流成分によって表される、注目ブロック付近の画素値の勾配の情報を含む予測タップを、少ないタップ数で構成することができる。
【0539】
図42に戻り、タップ係数バッファ132は、タップ係数記憶部14(図2)から供給されるタップ係数を一時記憶する。
【0540】
積和演算部131は、予測タップ生成部131から供給される予測タップと、タップ係数バッファ132に記憶されたタップ係数とを用いて、式(1)の線形1次予測演算を行い、注目画素の復号値を出力する。
【0541】
次に、図47のフローチャートを参照して、図42の適応処理部51の処理(適応処理)について説明する。
【0542】
まず最初に、ステップS101において、予測タップ生成部131は、注目ブロックの各画素を予測する式(1)の線形1次予測演算を行うための予測タップを、例えば、バッファメモリ12に記憶された注目ブロックのすべての2次元DCT係数と、その他の必要な2次元DCT係数を用いて生成し、積和演算部133に供給して、ステップS102に進む。
【0543】
ステップS102では、積和演算部133が、画素位置モードを表す変数iを、例えば1に初期化する。
【0544】
ここで、ブロックの2次元DCT係数を逆DCT変換する場合は、そのブロックにおける各画素の空間上の位置を表す位置情報が、式(11)に示した変換行列Cのコンポーネントcijを定義するcos((2j+1)×i×π/16)の位相という形で考慮される。
【0545】
一方、適応処理では、予測タップを構成するDCT係数と、タップ係数とを用いた式(1)の線形1次予測演算が行われるが、この線形1次予測演算では、復号しようとしている画素(注目画素)の位置情報が考慮されない。そこで、注目画素の位置情報を考慮した線形1次予測演算を行うために、ここでは、注目画素の位置によって異なるタップ係数が用いられるようになっている。即ち、同一のクラスに分類される画素であっても、ブロックにおける位置が異なる場合には、異なるタップ係数を用いて、線形1次予測演算が行われるようになっている。この場合、線形1次予測演算に用いるタップ係数が、ブロックにおける注目画素の位置によって切り替えられることとなるが、この注目画素の位置を表す情報が、画素位置モードである。
【0546】
いまの場合、ブロックは8×8画素で構成されるから、64カ所の位置が存在し、ここでは、例えば、ラスタスキャン順で、i番目の位置を、画素位置モード#iと表すこととする。
【0547】
その後、画素位置モード#iの画素が注目画素とされ、クラス分類部13(図2)において、その注目画素についてクラス分類が行われることにより、タップ係数記憶部14から、注目画素のクラスコードに対応するタップ係数が供給されてくるのを待って、ステップS103に進む。
【0548】
ステップS103では、タップ係数記憶部14からのタップ係数が、タップ係数バッファ132に供給されて記憶される。
【0549】
ここで、上述のように、同一のクラスに分類される画素であっても、ブロックにおける位置(画素位置モード)が異なる場合には、異なるタップ係数が用いられる。従って、タップ係数記憶部14からは、注目画素のクラスのタップ係数として、画素位置モードの総数である64セットのタップ係数が供給されるようになっており、タップ係数バッファ132は、そのような64セットのタップ係数を記憶する。
【0550】
その後、ステップS104に進み、積和演算部133は、画素位置モード#iに対応するタップ係数のセット(式(1)におけるw1,w2,・・・)を、タップ係数バッファ132から読み出すことにより取得し、ステップS105に進む。
【0551】
ステップS105では、積和演算部133は、予測タップ生成部131からの予測タップと、タップ係数バッファ132から読み出したタップ係数とを用いて、式(1)の線形1次予測演算を行い、これにより、注目画素の画素値を復号する。
【0552】
そして、ステップS106に進み、積和演算部133は、画素位置モード#iが、注目ブロックの画素数である64(=8×8)に等しいかどうかを判定する。
【0553】
ステップS106において、画素位置モード#iが64に等しくないと判定された場合、ステップS107に進み、積和演算部133は、画素位置モード#iを1だけインクリメントして、ステップS103に戻り、以下、同様の処理が繰り返される。
【0554】
また、ステップS106において、画素位置モード#iが64に等しいと判定された場合、即ち、注目ブロックのすべての画素値を復号した場合、処理を終了する。
【0555】
なお、適応処理部51では、バッファメモリ12(図2)に記憶されるブロックを、順次、注目ブロックとして、図47の適応処理を繰り返し行う。
【0556】
また、積和演算部133は、1フレーム(またはフィールド)の復号画像を得るまでは、復号したブロックを一時記憶しており、1フレームの復号画像が得られると、その1フレームの復号画像を出力する。
【0557】
ここで、MPEG符号化では、8ビットの画像データを符号化する場合、画素値および2次元DCT係数を、0を中心とした正側と負側に均等に分布させるため、原画像の画素値から128(=27)を減算して得られる画素値が符号化される。
【0558】
このため、積和演算部133では、復号画像として、各画素値のレベルが、128だけ低いものが得られる。そこで、積和演算部133は、復号画像の各画素値に、128を加算して出力するようになっている。
【0559】
次に、図2の係数メモリ43および44に記憶させるタップ係数の学習について説明する。
【0560】
MPEGでは、予測方式の違いにより、Iピクチャ、Pピクチャ、Bピクチャの3つのピクチャタイプがあるので、タップ係数の学習も、ピクチャタイプごとに行われる。
【0561】
図48は、Iピクチャ用のタップ係数を学習する場合の学習装置の一実施の形態の構成例を示している。
【0562】
教師データストレージ141は、学習用の画像データを、教師データとして記憶している。
【0563】
生徒データ生成部142は、MPEGエンコーダ151、分離部152、およびDCT係数抽出/逆量子化部153から構成され、教師データストレージ141に記憶された学習用の画像データ(ここでは、教師データでもある)から、生徒データを生成するようになっている。
【0564】
即ち、MPEGエンコーダ151は、教師データストレージ141に記憶された学習用の画像データを読み出して、MPEG符号化し、その結果得られる符号化データを、分離部152に供給する。分離部152とDCT係数抽出/逆量子化部153は、図2の分離部1とDCT係数抽出/逆量子化部2とそれぞれ同様に構成されており、符号化データから、量子化DCT係数を分離、抽出し、逆量子化して出力する。
【0565】
なお、分離部152およびDCT係数抽出/逆量子化部153は、Iピクチャのみを対象に処理を行う。また、分離部152は、符号化データから、量子化DCT係数の他、量子化スケールやDCTタイプ等の、いわゆるサイドインフォメーションも、必要に応じて分離する。
【0566】
従って、DCT係数抽出/逆量子化部153からは、Iピクチャについての2次元DCT係数の他、DCTタイプ等の必要なサイドインフォメーションも出力される。
【0567】
DCT係数抽出/逆量子化部153が出力するIピクチャについての2次元DCT係数やDCTタイプ等は、生徒データとして、生徒データストレージ143に供給される。
【0568】
生徒データストレージ143は、生徒データ生成部142(のDCT係数抽出/逆量子化部153)から供給される生徒データを記憶する。
【0569】
予測タップ生成部144は、生徒データストレージ143に記憶された生徒データから、図42の予測タップ生成部131が生成するのと同一の予測タップを生成し、足し込み部146に供給する。従って、ここでは、予測タップ生成部144は、生徒データストレージ143に記憶された生徒データとしての2次元DCT係数のうち、注目ブロックを構成するすべての2次元DCT係数と、必要な2次元DCT係数を読み出して、予測タップとする。
【0570】
なお、図42の予測タップ生成部131が注目ブロックの2次元DCT係数の他、注目ブロックに隣接するブロックの2次元DCT係数を用いて予測タップを生成する場合には、予測タップ生成部144も、注目ブロックの2次元DCT係数の他、注目ブロックに隣接する2次元DCT係数を用いて、予測タップ生成部131が生成するのと同一構造の予測タップを生成する。この場合、予測タップ生成部144は、注目ブロックに隣接するブロックの2次元DCT係数を、生徒データストレージ143から取得する。
【0571】
クラス分類部145は、図2のクラス分類部13と同様にされ、生徒データストレージ143に記憶された生徒データとしての2次元DCT係数から1次元DCT係数を求め、さらに、その1次元DCT係数に基づき、図2のクラス分類部13における場合と同様にして、注目ブロックにおける注目画素をクラス分類し、注目画素のクラスを表すクラスコードを、足し込み部146に出力する。
【0572】
足し込み部146は、生徒データストレージ143に記憶された生徒データとしての2次元DCT係数のブロックを、順次、注目ブロックとし、さらに、注目ブロックの画素を、順次、注目画素(注目教師データ)として、予測タップ生成部144からの生徒データとしての予測タップ(を構成する2次元DCT係数)、および注目画素を対象とした足し込みを行う。
【0573】
即ち、足し込み部146は、クラス分類部145から供給されるクラスコードに対応するクラスごとに、予測タップ(生徒データ)を用い、式(8)の行列Aにおける各コンポーネントとなっている、生徒データどうしの乗算(xinxim)と、サメーション(Σ)に相当する演算を行う。
【0574】
さらに、足し込み部146は、やはり、クラス分類部145から供給されるクラスコードに対応するクラスごとに、予測タップ(生徒データ)および注目画素(教師データ)を用い、式(8)のベクトルvにおける各コンポーネントとなっている、生徒データと教師データの乗算(xinyi)と、サメーション(Σ)に相当する演算を行う。
【0575】
なお、足し込み部146における、上述のような足し込みは、各クラスについて、注目画素に対する画素位置モードごとに行われる。
【0576】
足し込み部146は、以上の足し込みを、生徒データストレージ143に記憶されている生徒データとしての2次元DCT係数を構成するブロックすべてを注目ブロックとして行い、これにより、各クラスについて、画素位置モードごとに、式(8)に示した正規方程式をたてる。
【0577】
タップ係数演算部147は、足し込み部146においてクラスごとに、かつ、画素位置モードごとに生成された各正規方程式を解くことにより、クラスごとに、64の画素位置モードに対応した64セットのタップ係数を求める。
【0578】
なお、学習用の画像として用意する画像の枚数や、その画像の内容等によっては、足し込み部146において、タップ係数を求めるのに必要な数の正規方程式が得られないクラス、さらには画素位置モードが生じる場合があり得るが、タップ係数演算部147は、そのようなクラスや画素位置モードについては、例えば、デフォルトのタップ係数を出力する。
【0579】
次に、図49のフローチャートを参照して、図48の学習装置の処理(学習処理)について説明する。
【0580】
まず最初に、ステップS111において、生徒データ生成部142は、上述したように、教師データストレージ141に記憶された学習用の画像データから、Iピクチャについての生徒データを生成し、生徒データストレージ143に供給して記憶させる。
【0581】
そして、ステップS112に進み、足し込み部146は、生徒データストレージ143に記憶された生徒データとしての2次元DCT係数のブロックのうち、まだ、注目ブロックとしていないものの1つを選択して、注目ブロックとし、ステップS113に進む。
【0582】
ステップS113では、予測タップ生成部144が、注目ブロックの生徒データとしての2次元DCT係数すべてと、必要な2次元DCT係数を、生徒データストレージ143から読み出すことにより、予測タップを生成し、ステップS114に進む。
【0583】
ステップS114では、足し込み部146が、画素位置モードを表す変数iを、例えば1に初期化し、ステップS115に進む。ステップS115では、クラス分類部145が、注目ブロックにおける画素位置モード#iが表す位置の画素を注目画素として、図2のクラス分類部13における場合と同様にして、注目画素のクラス分類を行い、その結果得られるクラスコードを、足し込み部146に出力する。
【0584】
足し込み部146は、ステップS116において、教師データストレージ141から、注目画素となっている教師データ(画素値)を読み出し、生徒データとしての予測タップ(を構成する2次元DCT係数)、および教師データとしての注目画素を対象として、式(8)の行列Aとベクトルvの、上述したような足し込みを行う。なお、この足し込みは、クラス分類部145からのクラスコードに対応するクラスごとに、かつ注目画素に対する画素位置モード#iごとに行われる。
【0585】
そして、ステップS117に進み、足し込み部146は、画素位置モード#iが、注目ブロックの画素数である64に等しいかどうかを判定する。
【0586】
ステップS117において、画素位置モード#iが64に等しくないと判定された場合、ステップS118に進み、足し込み部146は、画素位置モード#iを1だけインクリメントして、ステップS115に戻り、以下、同様の処理が繰り返される。
【0587】
また、ステップS117において、画素位置モード#iが64に等しいと判定された場合、即ち、注目ブロックのすべての画素を注目画素として足し込みを行った場合、ステップS119に進み、足し込み部146は、生徒データストレージ143に記憶された生徒データとしての2次元DCT係数のブロックのうち、まだ、注目ブロックとしていないもの(以下、適宜、未処理ブロックという)があるかどうかを判定する。
【0588】
ステップS119において、未処理ブロックがあると判定された場合、ステップS112に戻り、その未処理ブロックの中から、新たに注目ブロックとするものが選択され、以下、同様の処理が繰り返される。
【0589】
また、ステップS119において、未処理ブロックがないと判定された場合、即ち、足し込み部146において、各クラスについて、画素位置モードごとの正規方程式が得られた場合、ステップS120に進み、タップ係数演算部147は、各クラスの画素位置モードごとに生成された正規方程式を解くことにより、各クラスごとに、そのクラスの64の画素位置モードそれぞれに対応する64セットのタップ係数を求め、学習処理を終了する。
【0590】
次に、図50は、Pピクチャ用のタップ係数を学習する場合の学習装置の一実施の形態の構成例を示している。なお、図中、図48における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図50の学習装置は、生徒データ生成部151に代えて、生徒データ生成部162が設けられている他は、図48における場合と基本的に同様に構成されている。
【0591】
ここで、Pピクチャは、時間的に先行して復号(符号化)されるIまたはPピクチャを参照画像として予測符号化(ノンイントラ符号化)されるため、即ち、原画像から予測画像を減算した残差画像が2次元DCT変換されるため、図2の画像処理装置では、前処理部11において、先に復号されたIまたはPピクチャに動き補償を施し、その結果得られる予測画像の2次元DCT係数と、残差画像の2次元DCT係数とを加算した後に、適応処理部51において、適応処理を施すようになっている。
【0592】
従って、Pピクチャ用のタップ係数の学習においては、残差画像の2次元DCT係数に、予測画像の2次元DCT係数を加算したものを、生徒データとして用いる必要がある。
【0593】
ところで、Pピクチャの予測画像は、先に復号されたIまたはPピクチャを参照画像として、その参照画像に、動き補償を施すことで得ることができるが、いまの場合、Pピクチャのタップ係数を学習しようとしているので、Pピクチャ用のタップ係数は存在しない。
【0594】
一方、Iピクチャ用のタップ係数は、図48の学習装置において、あらかじめ求めておくことができる。
【0595】
そこで、図50の学習装置では、生徒データ生成部162において、Iピクチャを参照画像として予測符号化されるPピクチャのブロックについて、生徒データが生成されるようになっている。
【0596】
即ち、MPEGエンコーダ171は、教師データストレージ141に記憶された学習用の画像データを読み出して、MPEG符号化し、その結果得られる符号化データを、分離部172に供給する。分離部172とDCT係数抽出/逆量子化部173は、図2の分離部1とDCT係数抽出/逆量子化部2とそれぞれ同様に構成されており、符号化データから、量子化DCT係数を分離、抽出し、逆量子化する。
【0597】
なお、分離部172およびDCT係数抽出/逆量子化部173は、Iピクチャと、Pピクチャの予測符号化されたブロックのみを対象に処理を行う。また、分離部172は、符号化データから、量子化DCT係数の他、量子化スケールやDCTタイプや動きベクトル等のサイドインフォメーションも、必要に応じて分離する。
【0598】
DCT係数抽出/逆量子化部173は、Iピクチャの2次元DCT係数を得た場合、そのIピクチャの2次元DCT係数を、クラス分類部174および適応処理部176に供給する。
【0599】
また、DCT係数抽出/逆量子化部173は、Pピクチャの予測符号化されたブロックの2次元DCT係数、即ち、残差画像の2次元DCT係数を得た場合、その残差画像の2次元DCT係数を、周波数領域動き補償加算部181に供給する。
【0600】
さらに、DCT係数抽出/逆量子化部173は、Pピクチャの予測符号化されたブロックの動きベクトルを得た場合、その動きベクトルを、動き補償部178に供給する。
【0601】
クラス分類部174は、DCT係数抽出/逆量子化部173から供給されるIピクチャのブロックの画素を、順次、注目画素として、その注目画素について、図2のクラス分類部13における場合と同様にしてクラス分類を行い、その結果得られるクラスコードを、タップ係数記憶部175に供給する。タップ係数記憶部175は、図48の学習装置で得られたIピクチャ用のタップ係数を記憶しており、図2のタップ係数記憶部14と同様に、クラス分類部174から供給されるクラスコードに対応するタップ係数を取得して、適応処理部176に供給する。
【0602】
適応処理部176は、図2の適応処理部51と同様に、DCT係数抽出/逆量子化部173から供給される、注目画素を含むブロックの2次元DCT係数すべてと、必要な2次元DCT係数を予測タップとして、その予測タップと、タップ係数記憶部175から供給されるタップ係数とを用いた線形1次予測演算、即ち、適応処理を行う。
【0603】
適応処理部176において適応処理が行われることにより得られるIピクチャの復号画像は、Iピクチャストレージ177に供給されて記憶される。
【0604】
その後、動き補償部178は、DCT係数抽出/逆量子化部173から供給される動きベクトルによって動き補償を施すべき参照画像としてのIピクチャを、Iピクチャストレージ177から読み出し、そのIピクチャに動き補償を施すことで、予測画像を生成する。この予測画像は、画像メモリ179に供給されて記憶される。画像メモリ179に記憶された予測画像は、DCT変換部180において2次元DCT係数に変換され、周波数領域動き補償加算部181に供給される。周波数領域動き補償加算部181は、DCT係数抽出/逆量子化部173から供給されるPピクチャの残差画像の2次元DCT係数と、DCT変換部180から供給される予測画像の2次元DCT係数とを加算する。
【0605】
即ち、動き補償部178、画像メモリ179、DCT変換部180、および周波数領域動き補償加算部181は、図2の動き補償部4、画像メモリ5、DCT変換部21、周波数領域動き補償加算部22と同様に構成されるものであり、従って、周波数領域動き補償加算部181において、DCT係数抽出/逆量子化部173からのPピクチャの残差画像の2次元DCT係数と、DCT変換部180からの予測画像の2次元DCT係数とが加算されることにより、Pピクチャの元の画像(上述したように、原画像ではない)を2次元DCT変換した2次元DCT係数が得られる。
【0606】
周波数領域動き補償加算部181で得られたPピクチャの元の画像の2次元DCT係数は、生徒データとして、生徒データストレージ143に供給されて記憶される。
【0607】
以降は、図48の学習装置における場合と同様の処理が行われ、これにより、Pピクチャ用(正確には、Pピクチャの予測符号化されたブロック用)のタップ係数が求められる。
【0608】
次に、図51は、Bピクチャ用のタップ係数を学習する場合の学習装置の一実施の形態の構成例を示している。なお、Bピクチャ用のタップ係数を学習する学習装置も、図50のPピクチャ用のタップ係数を学習する学習装置と同様に、生徒データを生成する生徒データ生成部だけが、図48のIピクチャ用のタップ係数を学習する学習装置と異なるだけであるため、図51においては、Bピクチャ用のタップ係数を学習する学習装置の生徒データ生成部だけを図示してある。
【0609】
Bピクチャも、Pピクチャと同様に、時間的に先行して復号されるIまたはPピクチャを参照画像として予測符号化(ノンイントラ符号化)されるため、即ち、原画像から予測画像を減算した残差画像が2次元DCT変換されるため、図2の画像処理装置では、前処理部11において、先に復号されたIまたはPピクチャに動き補償を施し、その結果得られる予測画像の2次元DCT係数と、残差画像の2次元DCT係数とを加算した後に、適応処理部51において、適応処理を施すようになっている。
【0610】
従って、Bピクチャ用のタップ係数の学習においては、残差画像の2次元DCT係数に、予測画像の2次元DCT係数を加算したものを、生徒データとして用いる必要がある。
【0611】
そこで、図51の学習装置では、そのような生徒データを生成して、学習を行うようになっている。
【0612】
即ち、MPEGエンコーダ191には、学習用の画像データ(ここでは、教師データに等しい)が供給されるようになっており、MPEGエンコーダ191は、その学習用の画像データをMPEG符号化し、その結果得られる符号化データを、分離部192に供給する。分離部192とDCT係数抽出/逆量子化部193は、図2の分離部1とDCT係数抽出/逆量子化部2とそれぞれ同様に構成されており、符号化データから、量子化DCT係数を分離、抽出し、逆量子化して出力する。
【0613】
DCT係数抽出/逆量子化部193が出力するIピクチャの2次元DCT係数は、クラス分類部194と適応処理部196に供給される。また、DCT係数抽出/逆量子化部193が出力するPピクチャの2次元DCT係数は、周波数領域動き補償加算部201に供給される。さらに、DCT係数抽出/逆量子化部193が出力するBピクチャの2次元DCT係数は、周波数領域動き補償加算部209に供給される。
【0614】
ここで、分離部192は、符号化データから、量子化DCT係数の他、量子化スケールやDCTタイプや動くベクトル等のサイドインフォメーションも、必要に応じて分離し、DCT係数抽出/逆量子化部193を介して、必要なブロックに供給する。なお、サイドインフォメーションについては、図51の実施の形態では、DCT係数抽出/逆量子化部193から動き補償部198へのPピクチャの動きベクトルの供給と、DCT係数抽出/逆量子化部193から動き補償部206へのBピクチャの動きベクトルの供給だけを、図示してある。
【0615】
また、DCT係数抽出/逆量子化部193は、Bピクチャの予測符号化されたブロックの2次元DCT係数、即ち、残差画像の2次元DCT係数だけを、周波数領域動き補償加算部209に供給する。
【0616】
さらに、DCT係数抽出/逆量子化部193は、Pピクチャについては、予測符号化されたブロックの2次元DCT係数だけを、周波数領域動き補償加算部201に供給する。また、DCT係数抽出/逆量子化部193では、Pピクチャのイントラ符号化されたブロックの2次元DCT係数は、クラス分類部194および適応処理部196に供給され、以下、イントラ符号化されたIピクチャと同様に処理される。
【0617】
即ち、クラス分類部194は、DCT係数抽出/逆量子化部193から供給されるIピクチャおよびPピクチャのイントラ符号化されたブロックの画素を、順次、注目画素として、その注目画素について、図2のクラス分類部13における場合と同様にしてクラス分類を行い、その結果得られるクラスコードを、タップ係数記憶部195に供給する。タップ係数記憶部195は、図48の学習装置で得られたIピクチャ用のタップ係数を記憶しており、図2のタップ係数記憶部14と同様に、クラス分類部194から供給されるクラスコードに対応するタップ係数を取得して、適応処理部196に供給する。
【0618】
適応処理部196は、図2の適応処理部51と同様に、注目画素を含むブロックの2次元DCT係数すべてと、必要な2次元DCT係数を予測タップとして、その予測タップと、タップ係数記憶部195から供給されるタップ係数とを用いた線形1次予測演算、即ち、適応処理を行う。
【0619】
適応処理部196において適応処理が行われることにより得られるIピクチャの復号画像は、Iピクチャストレージ197に供給されて記憶される。なお、適応処理部196では、イントラ符号化されたPピクチャのブロックの復号画像も得られるが、このPピクチャの復号画像は、適応処理部196からPピクチャストレージ205に供給されて記憶される。
【0620】
その後、動き補償部198は、DCT係数抽出/逆量子化部193から供給される動きベクトルによって動き補償を施すべき参照画像としてのIピクチャを、Iピクチャストレージ197から読み出し、そのIピクチャに動き補償を施すことで、Pピクチャの予測画像を生成する。このPピクチャの予測画像は、画像メモリ199に供給されて記憶される。画像メモリ199に記憶された予測画像は、DCT変換部200において2次元DCT係数に変換され、周波数領域動き補償加算部201に供給される。周波数領域動き補償加算部201は、DCT係数抽出/逆量子化部193から供給されるPピクチャの残差画像の2次元DCT係数と、DCT変換部200から供給される予測画像の2次元DCT係数とを加算する。
【0621】
即ち、動き補償部198、画像メモリ199、DCT変換部200、および周波数領域動き補償加算部201は、図2の動き補償部4、画像メモリ5、DCT変換部21、周波数領域動き補償加算部22と同様に構成されるものであり、従って、周波数領域動き補償加算部201において、DCT係数抽出/逆量子化部193からのPピクチャの残差画像の2次元DCT係数と、DCT変換部200からの予測画像の2次元DCT係数とが加算されることにより、Pピクチャの元の画像(上述したように、原画像ではない)を2次元DCT変換した2次元DCT係数が得られる。
【0622】
周波数領域動き補償加算部201で得られたPピクチャの元の画像の2次元DCT係数は、クラス分類部202および適応処理部204に供給される。
【0623】
クラス分類部202は、周波数領域動き補償加算部201から供給されるPピクチャの予測符号化されたブロックの画素を、順次、注目画素として、その注目画素について、図2のクラス分類部13における場合と同様にしてクラス分類を行い、その結果得られるクラスコードを、タップ係数記憶部203に供給する。タップ係数記憶部203は、図50の学習装置で得られたPピクチャ用のタップ係数を記憶しており、図2のタップ係数記憶部14と同様に、クラス分類部202から供給されるクラスコードに対応するタップ係数を取得して、適応処理部204に供給する。
【0624】
適応処理部204は、図2の適応処理部51と同様に、注目画素を含むブロックの2次元DCT係数すべてを予測タップとして、その予測タップと、タップ係数記憶部203から供給されるタップ係数とを用いた線形1次予測演算、即ち、適応処理を行う。
【0625】
適応処理部204において適応処理が行われることにより得られる、予測符号化されたPピクチャのブロックの復号画像は、Pピクチャストレージ205に供給されて記憶される。なお、上述したように、Pピクチャストレージ205は、適応処理部196から供給される、イントラ符号化されたPピクチャのブロックの復号画像も記憶する。
【0626】
その後、動き補償部206は、DCT係数抽出/逆量子化部193から供給されるBピクチャの動きベクトルによって動き補償を施すべき参照画像としてのIまたはPピクチャを、Iピクチャストレージ197またはPピクチャストレージ205から読み出し、そのIまたはPピクチャに動き補償を施すことで、Bピクチャの予測画像を生成する。このBピクチャの予測画像は、画像メモリ207に供給されて記憶される。画像メモリ207に記憶された予測画像は、DCT変換部208において2次元DCT係数に変換され、周波数領域動き補償加算部209に供給される。周波数領域動き補償加算部209は、DCT係数抽出/逆量子化部193から供給されるBピクチャの残差画像の2次元DCT係数と、DCT変換部208から供給される予測画像の2次元DCT係数とを加算する。
【0627】
即ち、動き補償部206、画像メモリ207、DCT変換部208、および周波数領域動き補償加算部209は、図2の動き補償部4、画像メモリ5、DCT変換部21、周波数領域動き補償加算部22と同様に構成されるものであり、従って、周波数領域動き補償加算部209において、DCT係数抽出/逆量子化部193からのBピクチャの残差画像の2次元DCT係数と、DCT変換部208からの予測画像の2次元DCT係数とが加算されることにより、Bピクチャの元の画像(上述したように、原画像ではない)を2次元DCT変換した2次元DCT係数が得られる。
【0628】
周波数領域動き補償加算部209で得られたBピクチャの元の画像の2次元DCT係数は、生徒データとして出力される。そして、以降は、図48の学習装置における場合と同様の処理が行われ、これにより、Bピクチャ用(正確には、Bピクチャの予測符号化されたブロック用)のタップ係数が求められる。
【0629】
図2の係数メモリ43および44には、以上のような学習によって、各クラスごとに求められた64の画素位置モードそれぞれごとの、I,P,Bピクチャ用のタップ係数が記憶されている。
【0630】
従って、係数メモリ43および44に記憶されたタップ係数は、線形1次予測演算を行うことにより得られる元の画素値の予測値の予測誤差(ここでは、自乗誤差)が、統計的に最小になるように学習を行うことにより求められたものであり、その結果、図2の適応処理部51によれば、MPEG符号化された画像を、元の画像に限りなく近い画像、即ち、ブロック歪みやモスキートノイズ等の各種の歪みを十分に低減した、画質の良い画像に復号することができる。
【0631】
ここで、学習装置では、輝度信号と色差信号について、別々に正規方程式がたてられ、輝度信号からたてられた正規方程式を解くことにより得られるタップ係数は、係数メモリ43に記憶され、色差信号からたてられた正規方程式を解くことにより得られるタップ係数は、係数メモリ44に記憶される。
【0632】
また、上述したように、MPEG符号化では、原画像の画素値から128(=27)を減算して得られる画素値が符号化される。このため、足し込み部146(図48、図50)は、足し込みにおいて、教師データストレージ141に記憶された教師データとしての画素値から、128を減算した値を用いるようになっている。
【0633】
なお、図2の画像処理装置において、Iピクチャのブロックについては、Iピクチャ用のタップ係数を用いて適応処理が行われる。また、PピクチャまたはBピクチャのブロックについては、そのブロックが予測符号化(ノンイントラ符号化)されている場合には、PピクチャまたはBピクチャ用のタップ係数を用いて適応処理が行われるが、ブロックがイントラ符号化されている場合には、Iピクチャ用のタップ係数を用いて適応処理が行われる。
【0634】
また、上述の場合には、I,P,Bピクチャそれぞれ用のタップ係数を学習するようにしたが、例えば、Bピクチャ用のタップ係数の学習は省略することが可能である。この場合、図2の画像処理装置では、PピクチャとBピクチャの予測符号化されたブロックについて、例えば、いずれも、Pピクチャ用のタップ係数を用いて適応処理が行われる。さらに、図2の画像処理装置において、I,P,Bピクチャについての適応処理は、すべて、Iピクチャ用のタップ係数を用いて行うようにすることが可能である。
【0635】
次に、図52および図53は、図2の画像処理装置で、MPEG符号化された画像を復号するシミュレーションを行って得られたシミュレーション結果を示している。
【0636】
なお、シミュレーションにおいては、4:2:2フォーマットの画像を、約3.3MbpsのデータレートでMPEG2方式により符号化して得られた符号化データを用いた。また、シミュレーションでは、IピクチャとPピクチャを、それぞれ偶数フレームと奇数フレームとして、1フレームごとに交代する画像シーケンスを用いた。さらに、シミュレーションでは、上述の閾値A,B,C,D,Eとして、それぞれ、700,700,350,120,120を用いた。但し、色差信号については、閾値Aとして、80を用いた。
【0637】
図52は、シミュレーションによって得られた復号画像の輝度信号についてのS/N(Signal to Noise ratio)を示している。
【0638】
図52において、実線で示すS/Nは、図2の画像処理装置による復号画像のものを示しており、点線で示すS/Nは、MPEGの規格に準拠した従来のMPEGソフトウェアデコーダによる復号画像のものを示している。図52から、図2の画像処理装置による復号画像のS/Nが、従来のMPEGソフトウェアデコーダによる復号画像と比較して、約1dB程度向上していることが分かる。
【0639】
図53は、シミュレーションによって得られた復号画像を示している。
【0640】
即ち、図53Aは、原画像を、図53Bは、従来のMPEGソフトウェアデコーダによる復号画像を、図53Cは、図2の画像処理装置による復号画像を、それぞれ示している。なお、図53A乃至図53Cにおいて、その右側の約1/3の部分が、瓶の全体が表示されている全体の画像を示しており、左側の約2/3の部分が、その瓶のラベルの部分を拡大した画像を示している。また、図53に示した画像は、Iピクチャの画像である。
【0641】
図53Aの原画像と、図53Bの従来のMPEGソフトウェアデコーダによる復号画像を比較すると、図53Bの復号画像には、ブロックの境界が顕著に現れるブロック歪みが生じ、さらに、瓶のラベルにおける「Z」の文字の部分に、モスキートノイズが顕著に現れている。
【0642】
これに対して、図53Cの図2の画像処理装置による復号画像においては、ブロック歪みが十分に低減されており、さらに、モスキートノイズも低減されている。
【0643】
次に、図54は、図42の予測タップ生成部131の第2の構成例を示している。なお、図中、図43における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図54の実施の形態では、逆DCT変換部221および選択部222が新たに設けられている他は、基本的に、図43における場合と同様に構成されている。
【0644】
ここで、以下においては、予測タップ生成部131が構成する予測タップについてだけ説明するが、予測タップ生成部131が、以下説明する予測タップを構成する場合には、図48および図50に示した学習装置の予測タップ生成部144でも、同一のタップ構造の予測タップが構成される。また、図50の適応処理部176、並びに図51の適応処理部196および204では、図42の適応処理部51と同様の処理が行われるが、その処理にあたっても、予測タップ生成部131が生成するのと同一のタップ構造の予測タップが構成(生成)される。
【0645】
逆DCT変換部221は、読み出し部136から供給される、注目ブロックの上下左右それぞれに隣接する4つの隣接ブロックを逆DCT変換する。即ち、図54の実施の形態では、読み出し部136は、バッファメモリ12(図2)から、注目ブロックの2次元DCT係数の他、その注目ブロックの上下左右それぞれに隣接する4つの隣接ブロックの2次元DCT係数も読み出すようになっている。そして、読み出し部136は、注目ブロックの2次元DCT係数を、配列部137に供給するとともに、4つの隣接ブロックの2次元DCT係数を、逆DCT変換部221に供給する。逆DCT変換部221は、このようにして、読み出し部136から供給される、注目ブロックの上下左右それぞれに隣接する4つの隣接ブロックを2次元逆DCT変換し、これにより、その4つの隣接ブロックの画素値を復号して、選択部222に供給する。
【0646】
選択部222は、逆DCT変換部221から供給される4つの隣接ブロックの8×8の画素の画素値から、所定の画素の画素値を選択し、配列部137に供給する。この場合、配列部137では、読み出し部136から供給される注目ブロックの2次元DCT係数の他、選択部222から供給される画素の画素値が、所定の順番に配列されることにより、予測タップが構成され、積和演算部133(図42)に供給される。
【0647】
即ち、選択部222は、例えば、図55Aに示すように、隣接ブロックの画素のうち、注目ブロックに隣接する画素(ブロック隣接画素)であって、注目画素と同一行の左右にある2つの画素(以下、適宜、それぞれを、左隣接同一行画素と右隣接同一行画素という)の画素値と、注目画素と同一列の上下にある2つの画素(以下、適宜、それぞれを、上隣接同一列画素と下隣接同一列画素という)の画素値を選択し、配列部137に供給する。この場合、配列部137では、読み出し部136から供給される注目ブロックの8×8の2次元DCT係数と、選択部222から供給される4つの画素の画素値との、合計で68(=8×8+4)タップでなる予測タップが構成される。
【0648】
また、選択部222は、例えば、図55Bに示すように、左隣接同一行画素、右隣接同一行画素、上隣接同一列画素、および下隣接同一列画素の他に、左隣接同一行画素の左に隣接する画素、右隣接同一行画素の右に隣接する画素、上隣接同一列画素の上に隣接する画素、および下隣接同一列画素の下に隣接する画素を選択し、配列部137に供給する。この場合、配列部137では、読み出し部136から供給される注目ブロックの8×8の2次元DCT係数と、選択部222から供給される8つの画素の画素値との、合計で72(=8×8+8)タップでなる予測タップが構成される。
【0649】
あるいは、また、選択部222は、例えば、図55Cに示すように、左隣接同一行画素と右隣接同一行画素のうちの、注目画素に近い方を選択するとともに、上隣接同一列画素と下隣接同一列画素のうちの、注目画素に近い方を選択し、配列部137に供給する。この場合、配列部137では、読み出し部136から供給される注目ブロックの8×8の2次元DCT係数と、選択部222から供給される2つの画素の画素値との、合計で66(=8×8+2)タップでなる予測タップが構成される。
【0650】
また、選択部222は、例えば、図55Dに示すように、注目ブロックの上下左右に隣接する4つの隣接ブロックそれぞれにおける、注目ブロックに隣接する8つの画素(ブロック隣接画素)を、4セット選択し、配列部137に供給する。この場合、配列部137では、読み出し部136から供給される注目ブロックの8×8の2次元DCT係数と、選択部222から供給される8×4の画素の画素値との、合計で96(=8×8+8×4)タップでなる予測タップが構成される。
【0651】
ここで、選択部222においては、例えば、注目ブロックの上下左右それぞれに隣接する4つの隣接ブロックのすべての画素を選択するようにすることが可能である。しかしながら、この場合、図44における場合と同様に、配列部137で構成される予測タップのタップ数が大になり、積和演算部133(図42)の演算量や、タップ係数を記憶する係数メモリ43および44(図2)のメモリ容量なども大になる。
【0652】
そこで、例えば、図46に示したように、注目ブロックの2次元DCT係数すべてと、その注目ブロックの上、下、左、右、左上、左下、右上、右下それぞれに隣接する8つの隣接ブロックの2次元DCT係数のうちの直流成分とから、予測タップを構成することにより、注目画素との相関がある隣接ブロックの情報を含んだ形で、少ないタップ数の予測タップを構成することができる。
【0653】
ところで、注目画素と、隣接ブロックの8×8画素それぞれとの間の相関は、一般には、均一ではない。即ち、隣接ブロックの画素の、注目画素との相関は、一般には、注目画素に近い画素ほど高く、遠い画素ほど低くなることが多い。また、例えば、隣接ブロックの画素と、注目画素との間に、エッジが存在する場合や、複雑な画像については、隣接ブロックの画素と、注目画素との間に、相関がない(ほとんどない)こともある。
【0654】
一方、隣接ブロックの2次元DCT係数の直流成分は、その隣接ブロックの8×8画素の平均値(画素値の平均値)を表し、その8×8画素すべての情報が反映されている。従って、隣接ブロックの2次元DCT係数の直流成分は、注目画素との相関が高い画素の情報を含むが、逆に、注目画素との相関がない画素の情報を含むこともある。このように、注目画素との相関がない(ほとんどない)画素の情報を含んだ形で予測タップが構成される場合には、積和演算部133(図42)で求められる注目画素の復号値の復号精度に悪影響を与える。
【0655】
そこで、予測タップは、図55に示したように、隣接ブロックの画素すべてではなく、そのうちの、注目ブロックに近い(あるいは隣接する)画素だけを選択して構成するようにすることができる。この場合、少ないタップ数の予測タップによって、復号精度を向上させることができる。
【0656】
なお、図55Aや図55Bに示した左隣接同一行画素、右隣接同一行画素、上隣接同一列画素、および下隣接同一列画素や、左隣接同一行画素の左に隣接する画素、右隣接同一行画素の右に隣接する画素、上隣接同一列画素の上に隣接する画素、および下隣接同一列画素の下に隣接する画素は、注目画素との相関が高い場合が多く、従って、これらを含めて予測タップを構成することは、注目画素の復号精度を向上させるために、即ち、原画像により近く、各種の歪みが十分に低減された高画質の画像を復号するために、基本的に有効である。
【0657】
また、例えば、注目ブロックの左端等のブロック境界付近の画素が注目画素とされた場合には、その注目ブロックの左端の注目画素については、左に隣接する隣接ブロックの画素との相関は大きいが、右に隣接する隣接ブロックの画素との相関はほとんどないことがある。従って、図55Cに示したように、左隣接同一行画素と右隣接同一行画素のうちの、注目画素に近い方を選択するとともに、上隣接同一列画素と下隣接同一列画素のうちの、注目画素に近い方を選択して予測タップを構成することは、注目ブロックのブロック境界の画素の復号精度を向上させるのに有効である。なお、その他、例えば、注目ブロック付近が、複雑な画像パターンとなっている場合や、エッジを有する場合も、注目画素から遠い左隣接同一行画素または右隣接同一行画素や、上隣接同一列画素と下隣接同一列画素は、注目画素との相関がほとんどないことがあり、従って、このような場合も、図55Cに示したように予測タップを構成することは、注目画素の復号精度を向上させるのに有効である。
【0658】
一方、注目画素のクラス分類が適切に行われている場合には、予測タップを構成する情報量が多い方が、復号精度が向上する。従って、そのような場合に、図55Dに示した予測タップは有効である。
【0659】
ここで、予測タップは、図55A乃至図55Dに示したいずれか1つのタップ構造のものに固定することも可能であるが、図55A乃至図55Dに示した4つのタップ構造のものを、選択的に採用することも可能である。即ち、予測タップは、注目画素の画素位置モードや、注目画素付近におけるエッジの有無、さらには、注目画素付近における画像の複雑さなどに基づいて、図55A乃至図55Dに示した4つのタップ構造のものを、選択的に採用することが可能である。
【0660】
次に、図56のフローチャートを参照して、図54の予測タップ生成部131が図47のステップS101で行う処理について説明する。
【0661】
予測タップ生成部131では、まず最初に、ステップS131において、読み出し部136が、注目ブロックと、その上下左右それぞれに隣接する4つの隣接ブロックの2次元DCT係数を、バッファメモリ12(図2)から読み出す。さらに、ステップS131では、読み出し部136が、注目ブロックの2次元DCT係数を、配列部137に供給するとともに、4つの隣接ブロックの2次元DCT係数を、逆DCT変換部221に供給して、ステップS132に進む。
【0662】
ステップS132では、逆DCT変換部221が、読み出し部136から供給される4つの隣接ブロックを逆DCT変換し、これにより、その4つの隣接ブロックの画素値を復号して、選択部222に供給し、ステップS133に進む。
【0663】
ステップS133では、選択部222は、注目ブロックの8×8画素を、順次、注目画素として、各注目画素について、逆DCT変換部221から供給される4つの隣接ブロックの8×8の画素の画素値から、図55で説明したようにして、所定の画素の画素値を選択し、配列部137に供給して、ステップS134に進む。
【0664】
ステップS134では、配列部137は、注目ブロックの8×8画素それぞれについて、読み出し部136から供給される注目ブロックの2次元DCT係数と、選択部222から供給される画素の画素値とを、所定の順番に配列し、これにより、図55に示した予測タップを構成して、積和演算部133(図42)に供給し、処理を終了する。
【0665】
次に、図54の予測タップ生成部131では、隣接ブロックにおける、注目ブロックに隣接する画素(ブロック隣接画素)の画素値を含む予測タップが生成されるが、このブロック隣接画素は、注目ブロックと空間的に隣接するものである必要がある。
【0666】
しかしながら、MPEG2では、上述したように、マクロブロック単位で、フレーム構造とフィールド構造の選択が可能であることから、注目ブロックを含む注目マクロブロックの構造や、注目マクロブロックに隣接する隣接マクロブロックの構造によっては、注目ブロックに隣接する隣接ブロックにおける、注目ブロックに隣接する画素が、空間領域において、注目ブロックの境界と隣接する画素(ブロック隣接画素)となっていない場合がある。
【0667】
そこで、読み出し部136(図4)は、バッファメモリ12に記憶されたDCTタイプを参照することにより、注目ブロックと隣接ブロックの構造を認識し、注目ブロックの構造を基準として、空間領域において、その注目ブロックの境界と隣接するブロック隣接画素を有するブロックの2次元DCT係数を、バッファメモリ12から読み出すようになっている。従って、上述の場合には、説明を簡単にするために、図54の読み出し部136が、注目ブロックの上下左右にそれぞれ隣接する4つのブロックの2次元DCT係数を読み出すと説明したが、実際には、読み出し部136は、空間領域において注目ブロックと隣接する画素(ブロック隣接画素)を得るために、必要に応じて、上述の4つのブロック以外のブロックの2次元DCT係数も読み出すようになっている。
【0668】
ここで、図57乃至図72を参照して、注目ブロックの構造を基準とした場合に、空間領域において、その注目ブロックの境界と隣接するブロック隣接画素について説明する。
【0669】
なお、図57乃至図72では、図8乃至図23における場合と同様に、注目マクロブロックをMBNと、注目マクロブロックMBN上下左右に隣接するマクロブロックを、それぞれMBU,MBD,MBL,MBRと表す。さらに、注目マクロブロックMBNの左上、左下、右上、右下のブロックを、それぞれ、BNUL,BNDL,BNUR,BNDRと表し、上隣接マクロブロックMBUの左上、左下、右上、右下のブロックを、それぞれ、BUUL,BUDL,BUUR,BUDRと表す。また、下隣接マクロブロックMBDの左上、左下、右上、右下のブロックを、それぞれ、BDUL,BDDL,BDUR,BDDRと表し、左隣接マクロブロックMBLの左上、左下、右上、右下のブロックを、それぞれ、BLUL,BLDL,BLUR,BLDRと表す。さらに、右隣接マクロブロックMBRの左上、左下、右上、右下のブロックを、それぞれ、BRUL,BRDL,BRUR,BRDRと表す。
【0670】
また、図57乃至図72では、斜線を付してあるラインが、ブロック隣接画素を表しており、さらに、黒塗りのブロックが、注目ブロックを表している。
【0671】
注目ブロックの構造を基準とした場合に、空間領域において、その注目ブロックの境界と隣接するブロック隣接画素は、隣接1次元DCT係数について説明した図8乃至図23における場合と同様になる。
【0672】
即ち、図57は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの上側の境界に隣接するブロック隣接画素を示している。
【0673】
注目マクロブロックMBNと上隣接マクロブロックMBUのDCTタイプが、いずれもフレームDCTの場合は、フレーム構造の注目ブロックBNULの上側の境界に隣接するブロック隣接画素は、図57Aに示すように、フレーム構造の上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素(斜線を付してある部分)となる。
【0674】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、上隣接マクロブロックMBUのDCTタイプが、フィールドDCTの場合は、フレーム構造の注目ブロックBNULの上側の境界に隣接するブロック隣接画素は、図57Bに示すように、フィールド構造の上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素(斜線を付してある部分)となる。
【0675】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプが、フレームDCTの場合は、フィールド構造の注目ブロックBNULの上側の境界に隣接するブロック隣接画素は、図57Cに示すように、フレーム構造の上隣接マクロブロックMBUの左下ブロックBUDLの第7行目(上から7行目)の8画素となる。
【0676】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプも、フィールドDCTの場合は、フィールド構造の注目ブロックBNULの上側の境界に隣接するブロック隣接画素は、図57Dに示すように、フィールド構造の上隣接マクロブロックMBUの左上のブロックBUULの最下行の8画素(斜線を付してある部分)となる。
【0677】
次に、図58は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの下側の境界に隣接するブロック隣接画素を示している。
【0678】
注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、フレーム構造の注目ブロックBNULの下側の境界に隣接するブロック隣接画素は、図58Aに示すように、フレーム構造の注目マクロブロックMBNの左下のブロックBNDLの最上行の8画素(斜線を付してある部分)となる。
【0679】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、フィールド構造の注目ブロックBNULの下側の境界に隣接するブロック隣接画素は、図58Bに示すように、フィールド構造の注目マクロブロックMBNの下に隣接する下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素(斜線を付してある部分)となる。
【0680】
次に、図59は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの左側の境界に隣接するブロック隣接画素を示している。
【0681】
注目マクロブロックMBNと左隣接マクロブロックMBUのDCTタイプが、いずれもフレームDCTの場合は、フレーム構造の注目ブロックBNULの左側の境界に隣接するブロック隣接画素は、図59Aに示すように、フレーム構造の左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素(斜線を付してある部分)となる。
【0682】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、左隣接マクロブロックMBLのDCTタイプが、フィールドDCTの場合は、フレーム構造の注目ブロックBNULの左側の境界に隣接するブロック隣接画素は、図59Bに示すように、フィールド構造の左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の上4画素と、その右下のブロックBLDRにおける最右列の上4画素(斜線を付してある部分)となる。即ち、注目ブロックBNULの第1行乃至第8行に隣接する左側のブロック隣接画素は、それぞれ、ブロックBLURの最右列の第1行乃至第4行の画素、ブロックBLDRの最右列の第1行乃至第4行の画素となる。
【0683】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプが、フレームDCTの場合は、フィールド構造の注目ブロックBNULの左側の境界に隣接するブロック隣接画素は、図59Cに示すように、フレーム構造の左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の奇数行の4画素と、その右下のブロックBLDRにおける奇数行の4画素(斜線を付してある部分)となる。即ち、注目ブロックBNULの第1行乃至第8行に隣接する左側のブロック隣接画素は、それぞれ、ブロックBLURの最右列の第1,3,5,7行の画素、ブロックBLDRの最右列の第1,3,5,7行の画素となる。
【0684】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプも、フィールドDCTの場合は、フィールド構造の注目ブロックBNULの左側の境界に隣接するブロック隣接画素は、図59Dに示すように、フィールド構造の左隣接マクロブロックMBLの右上のブロックBLURの最右列の8画素(斜線を付してある部分)となる。
【0685】
次に、図60は、注目マクロブロックMBNの左上のブロックBNULが注目ブロックであるとした場合に、空間領域において、注目ブロックBNULの右側の境界に隣接するブロック隣接画素を示している。
【0686】
注目マクロブロックMBNの左上のブロックBNULが注目ブロックである場合には、その注目ブロックBNULの右側の境界に隣接するブロック隣接画素は、図60に示すように、その右隣のブロックBNURの最左列の8画素(斜線を付してある部分)となる。
【0687】
次に、図61は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの上側の境界に隣接するブロック隣接画素を示している。
【0688】
注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、注目ブロックBNDLの上側の境界に隣接するブロック隣接画素は、図61Aに示すように、注目マクロブロックMBNの左上ブロックBNULの最下行の8画素(斜線を付してある部分)となる。
【0689】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、注目ブロックBNDLの上側の境界に隣接するブロック隣接画素は、図61Bに示すように、注目マクロブロックMBNの上に隣接する上隣接マクロブロックMBUの左下のブロックBUDLの最下行の8画素(斜線を付してある部分)となる。
【0690】
次に、図62は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの下側の境界に隣接するブロック隣接画素を示している。
【0691】
注目マクロブロックMBNと下隣接マクロブロックMBDのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDLの下側の境界に隣接するブロック隣接画素は、図62Aに示すように、下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素(斜線を付してある部分)となる。
【0692】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、下隣接マクロブロックMBDのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDLの下側の境界に隣接するブロック隣接画素は、図62Bに示すように、下隣接マクロブロックMBDの左上のブロックBDULの最上行の8画素(斜線を付してある部分)となる。
【0693】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプが、フレームDCTの場合は、注目ブロックBNDLの下側の境界に隣接するブロック隣接画素は、図62Cに示すように、下隣接マクロブロックMBDの左上のブロックBDULの第2行目の8画素(斜線を付してある部分)となる。
【0694】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDLの下側の境界に隣接するブロック隣接画素は、下隣接マクロブロックMBDの左下のブロックBDDLの最上行の8画素(斜線を付してある部分)となる。
【0695】
次に、図63は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの左側の境界に隣接するブロック隣接画素を示している。
【0696】
注目マクロブロックMBNと左隣接マクロブロックMBLのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDLの左側の境界に隣接するブロック隣接画素は、図63Aに示すように、左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素(斜線を付してある部分)となる。
【0697】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、左隣接マクロブロックMBLのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDLの左側の境界に隣接するブロック隣接画素は、図63Bに示すように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の下4画素と、その右下のブロックBLDRにおける最右列の下4画素(斜線を付してある部分)となる。即ち、注目ブロックBNDLの第1行乃至第8行に隣接する左側のブロック隣接画素は、それぞれ、ブロックBLURの最右列の第5行乃至第8行の画素、ブロックBLDRの最右列の第5行乃至第8行の画素となる。
【0698】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプが、フレームDCTの場合は、注目ブロックBNDLの左側の境界に隣接するブロック隣接画素は、図63Cに示すように、左隣接マクロブロックMBLの右上のブロックBLURにおける最右列の偶数行の4画素と、その右下のブロックBLDRにおける偶数行の4画素(斜線を付してある部分)となる。即ち、注目ブロックBNDLの第1行乃至第8行に隣接する左側のブロック隣接画素は、それぞれ、ブロックBLURの最右列の第2,4,6,8行の画素、ブロックBLDRの最右列の第2,4,6,8行の画素となる。
【0699】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、左隣接マクロブロックMBLのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDLの左側の境界に隣接するブロック隣接画素は、図63Dに示すように、左隣接マクロブロックMBLの右下のブロックBLDRの最右列の8画素(斜線を付してある部分)となる。
【0700】
次に、図64は、注目マクロブロックMBNの左下のブロックBNDLが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDLの右側の境界に隣接するブロック隣接画素を示している。
【0701】
注目マクロブロックMBNの左下のブロックBNDLが注目ブロックである場合の、その注目ブロックBNDRの右側の境界に隣接するブロック隣接画素は、図64に示すように、注目ブロックBNDLの右隣のブロックBNDRの最左列の8画素(斜線を付してある部分)となる。
【0702】
図65は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの上側の境界に隣接するブロック隣接画素を示している。
【0703】
注目マクロブロックMBNと上隣接マクロブロックMBUのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNURの上側の境界に隣接するブロック隣接画素は、図65Aに示すように、上隣接マクロブロックMBUの右下のブロックBUDRの最下行の8画素(斜線を付してある部分)となる。
【0704】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、上隣接マクロブロックMBUのDCTタイプが、フィールドDCTの場合は、注目ブロックBNURの上側の境界に隣接するブロック隣接画素は、図65Bに示すように、上隣接マクロブロックMBUの右下ブロックBUDRの最下行の8画素(斜線を付してある部分)となる。
【0705】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプが、フレームDCTの場合は、注目ブロックBNURの上側の境界に隣接するブロック隣接画素は、図65Cに示すように、上隣接マクロブロックMBUの右下のブロックBUDRの第7行目の8画素(斜線を付してある部分)となる。
【0706】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、上隣接マクロブロックMBUのDCTタイプも、フィールドDCTの場合は、注目ブロックBNURの上側の境界に隣接するブロック隣接画素は、図65Dに示すように、上隣接マクロブロックMBUの右上のブロックBUURの最下行の8画素(斜線を付してある部分)となる。
【0707】
次に、図66は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの下側の境界に隣接するブロック隣接画素を示している。
【0708】
注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、注目ブロックBNURの下側の境界に隣接するブロック隣接画素は、図66Aに示すように、注目マクロブロックMBNの右下のブロックBNDRの最上行の8画素(斜線を付してある部分)となる。
【0709】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、注目ブロックBNURの下側の境界に隣接するブロック隣接画素は、図66Bに示すように、下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素(斜線を付してある部分)となる。
【0710】
次に、図67は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの左側の境界に隣接するブロック隣接画素を示している。
【0711】
注目マクロブロックMBNの右上のブロックBNURが注目ブロックである場合には、その注目ブロックBNURの左側の境界に隣接するブロック隣接画素は、図67に示すように、注目ブロックBNURの左隣のブロックBNULの最右列の8画素(斜線を付してある部分)となる。
【0712】
次に、図68は、注目マクロブロックMBNの右上のブロックBNURが注目ブロックであるとした場合に、空間領域において、注目ブロックBNURの右側の境界に隣接するブロック隣接画素を示している。
【0713】
注目マクロブロックMBNと右隣接マクロブロックMBRのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNURの右側の境界に隣接するブロック隣接画素は、図68Aに示すように、右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素(斜線を付してある部分)となる。
【0714】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、右隣接マクロブロックMBRのDCTタイプが、フィールドDCTの場合は、注目ブロックBNURの右側の境界に隣接するブロック隣接画素は、図68Bに示すように、右隣接マクロブロックMBLの左上のブロックBRULにおける最左列の上4画素と、その左下のブロックBRDLにおける最左列の上4画素(斜線を付してある部分)となる。
【0715】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプが、フレームDCTの場合は、注目ブロックBNURの右側の境界に隣接するブロック隣接画素は、図68Cに示すように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の奇数行の4画素と、その左下のブロックBRDLにおける奇数行の4画素(斜線を付してある部分)となる。
【0716】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプも、フィールドDCTの場合は、注目ブロックBNURの右側の境界に隣接するブロック隣接画素は、図68Dに示すように、右隣接マクロブロックMBRの左上のブロックBRULの最左列の8画素(斜線を付してある部分)となる。
【0717】
次に、図69は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの上側の境界に隣接するブロック隣接画素を示している。
【0718】
注目マクロブロックMBNのDCTタイプが、フレームDCTの場合は、注目ブロックBNDRの上側の境界に隣接するブロック隣接画素は、図69Aに示すように、注目マクロブロックMBNの右下のブロックBNDRの最上行の8画素(斜線を付してある部分)となる。
【0719】
注目マクロブロックMBNのDCTタイプが、フィールドDCTである場合は、注目ブロックBNDRの上側の境界に隣接するブロック隣接画素は、図69Bに示すように、注目マクロブロックMBNの上に隣接する上隣接マクロブロックMBUの右下のブロックBUDRの最下行の8画素(斜線を付してある部分)ととなる。
【0720】
次に、図70は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの下側の境界に隣接するブロック隣接画素を示している。
【0721】
注目マクロブロックMBNと下隣接マクロブロックMBDのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDRの下側の境界に隣接するブロック隣接画素は、図70Aに示すように、下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素(斜線を付してある部分)となる。
【0722】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、下隣接マクロブロックMBDのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDRの下側の境界に隣接するブロック隣接画素は、図70Bに示すように、下隣接マクロブロックMBDの右上のブロックBDURの最上行の8画素(斜線を付してある部分)となる。
【0723】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプが、フレームDCTの場合は、注目ブロックBNDRの下側の境界に隣接するブロック隣接画素は、図70Cに示すように、下隣接マクロブロックMBDの右上のブロックBDURの第2行目の8画素(斜線を付してある部分)となる。
【0724】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、下隣接マクロブロックMBDのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDRの下側に隣接するブロック隣接画素は、図70Dに示すように、下隣接マクロブロックMBDの右下のブロックBDDRの最上行の8画素(斜線を付してある部分)となる。
【0725】
次に、図71は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの左側の境界に隣接するブロック隣接画素を示している。
【0726】
注目マクロブロックMBNの右下のブロックBNDRが注目ブロックである場合には、その注目ブロックBNDRの左側の境界に隣接するブロック隣接画素は、図71に示すように、注目ブロックBNDRの左隣のブロックBNDLの最右列の8画素(斜線を付してある部分)となる。
【0727】
次に、図72は、注目マクロブロックMBNの右下のブロックBNDRが注目ブロックであるとした場合に、空間領域において、注目ブロックBNDRの右側の境界に隣接するブロック隣接画素を示している。
【0728】
注目マクロブロックMBNと右隣接マクロブロックMBRのDCTタイプが、いずれもフレームDCTの場合は、注目ブロックBNDRの右側の境界に隣接するブロック隣接画素は、図72Aに示すように、右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素(斜線を付してある部分)となる。
【0729】
注目マクロブロックMBNのDCTタイプが、フレームDCTであり、右隣接マクロブロックMBRのDCTタイプが、フィールドDCTの場合は、注目ブロックBNDRの右側の境界に隣接するブロック隣接画素は、図72Bに示すように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の下4画素と、その左下のブロックBRDLにおける最左列の下4画素(斜線を付してある部分)となる。
【0730】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプが、フレームDCTの場合は、注目ブロックBNDRの右側の境界に隣接するブロック隣接画素は、図72Cに示すように、右隣接マクロブロックMBRの左上のブロックBRULにおける最左列の偶数行の4画素と、その左下のブロックBRDLにおける最左列の偶数行の4画素(斜線を付してある部分)となる。
【0731】
注目マクロブロックMBNのDCTタイプが、フィールドDCTであり、右隣接マクロブロックMBRのDCTタイプも、フィールドDCTの場合は、注目ブロックBNDRの右側の境界に隣接するブロック隣接画素は、図72Dに示すように、右隣接マクロブロックMBRの左下のブロックBRDLの最左列の8画素(斜線を付してある部分)となる。
【0732】
次に、図73は、図42の予測タップ生成部131の第3の構成例を示している。なお、図中、図54における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図73の実施の形態では、逆DCT変換部221に代えて、MPEGデコーダ231およびバッファメモリ232が設けられている他は、基本的に、図54における場合と同様に構成されている。
【0733】
MPEGデコーダ231は、例えば、図1に示したMPEGデコーダと同様に構成されている。また、図73の実施の形態では、図2の画像処理装置に供給されるビデオストリームが、MPEGデコーダ231にも供給されるようになっており、MPEGデコーダ231は、そこに供給されるビデオストリームを、図1で説明したようにMPEGデコードし、その結果得られる復号画像を、バッファメモリ232に供給する。
【0734】
バッファメモリ232は、MPEGデコーダ231から供給される復号画像を一時記憶する。なお、バッファメモリ232は、注目画素について、図55で説明した予測タップを構成する画素を含む復号画像を記憶することのできる記憶容量を、少なくとも有している。
【0735】
以上のように構成される予測タップ生成部131では、MPEGデコーダ231において、そこに供給されるビデオストリームがMPEGデコードされ、その結果得られる復号画像が、バッファメモリ232に供給されて記憶される。
【0736】
そして、選択部222は、バッファメモリ232に記憶された復号画像を構成する画素のうち、図55で説明した予測タップを構成する画素を選択し、その画素の画素値を、バッファメモリ232から読み出して、配列部137に供給する。
【0737】
従って、図73の実施の形態においても、図54における場合と同様の予測タップが生成される。
【0738】
なお、MPEGデコーダ231における復号順序は、必ずしも、表示順に一致しない。即ち、MPEGデコーダ231における復号順序は、例えば、GOP(Group Of Picture)構造によって変化する。このため、MPEGデコーダ231では、選択部222において選択され得る画素が、バッファメモリ232に記憶された状態となるように、MPEGデコードを行うようにする必要がある。
【0739】
次に、図74は、図42の予測タップ生成部131の第4の構成例を示している。なお、図中、図73における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図74の実施の形態では、MPEGデコーダ231に代えて、画像処理装置240が設けられている他は、基本的に、図73における場合と同様に構成されている。
【0740】
画像処理装置240は、図2の前処理部11、バッファメモリ12、クラス分類部13、タップ係数記憶部14、画像再構成部15とそれぞれ同様に構成される前処理部241、バッファメモリ242、クラス分類部243、タップ係数記憶部244、画像再構成部245で構成されている。また、図74の実施の形態では、図73における場合と同様に、図2の画像処理装置に供給されるビデオストリームが、画像処理装置240にも供給されるようになっており、画像処理装置240は、そこに供給されるビデオストリームを、図2の画像処理装置における場合と同様に処理することにより復号し、その結果得られる復号画像を、バッファメモリ232に供給する。
【0741】
即ち、図73の実施の形態では、MPEGデコーダ231によって、ビデオストリームがMPEGデコードされるようになっていたが、図74の実施の形態では、画像処理装置240によって、ビデオストリームが復号されるようになっている。
【0742】
従って、図74の実施の形態においても、図54における場合と同様の予測タップが生成される。
【0743】
ここで、画像処理装置240における画像再構成部245は、図2の画像再構成部15が有する適応処理部51と同様の処理を行う適応処理部251を有しているが、適応処理部251では、例えば、上述した図43(あるいは、図54や図73)の予測タップ生成部131における場合と同様にして、予測タップが生成されるようになっている。
【0744】
なお、画像処理装置240において、ビデオストリームを復号する場合、ノンイントラ符号化されたブロックは、上述したように、そのブロックの画像と予測画像との差分値(残差画像)を2次元DCT変換して得られる2次元DCT係数(以下、適宜、残差DCT係数という)となっているため、画像処理装置240では、図2の画像処理装置と同様に、ノンイントラ符号化されたブロックについては、図75Aに示すように、残差DCT係数と、予測画像をDCT変換して得られる2次元DCT係数とが加算され、その加算の結果得られる2次元DCT係数から、予測タップが構成される。そして、その予測タップを用いて適応処理が行われることにより、画像が復号される。
【0745】
但し、画像処理装置240では、ノンイントラ符号化されたブロックについては、その他、例えば、図75Bに示すように、残差DCT係数を2次元逆DCT変換して得られる残差画像と、予測画像とを加算し、その加算の結果得られる画像から、予測タップを構成して、適応処理を行うことにより、画像を復号するようにすることが可能である。また、画像処理装置240では、ノンイントラ符号化されたブロックについては、例えば、図75Cに示すように、残差DCT係数と予測画像とから、予測タップを構成して、適応処理を行うことにより、画像を復号するようにすることも可能である。
【0746】
なお、図75Aの予測タップを構成して、画像を復号する場合には、学習において、図75Aにおける場合と同一構造の予測タップを構成して、タップ係数を求めておく必要がある。図75Bまたは図75Cの予測タップを構成して、画像を復号する場合においても、同様に、図75Bまたは図75Cにおける場合と同一構造の予測タップを構成して、タップ係数を求めておく必要がある。
【0747】
次に、図76は、図42の予測タップ生成部131の第5の構成例を示している。なお、図中、図43における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図76の実施の形態では、1次元逆DCT変換部261および隣接1次元DCT係数選択/変換部262が新たに設けられている他は、基本的に、図43における場合と同様に構成されている。
【0748】
1次元逆DCT変換部261は、図2の1次元逆DCT変換部31と同様に構成され、読み出し部136から供給されるブロックの2次元DCT係数を、1次元逆DCT変換することにより、1次元DCT係数(水平1次元DCT係数と垂直1次元DCT係数)を求め、隣接1次元DCT係数選択/変換部262に供給する。
【0749】
隣接1次元DCT係数選択/変換部262は、図2の隣接1次元DCT係数選択/変換部32と同様に構成され、読み出し部136から供給されるブロック(マクロブロック)のDCTタイプに基づき、注目ブロックに隣接する画素列の1次元DCT係数(隣接1次元DCT係数)を、1次元逆DCT変換部261から供給される1次元DCT係数から取得し、配列部137に供給する。
【0750】
次に、図77のフローチャートを参照して、図76の予測タップ生成部131が図47のステップS101で行う処理について説明する。
【0751】
予測タップ生成部131では、まず最初に、ステップS141において、読み出し部136が、注目ブロックと、その注目ブロックを含む注目マクロブロックの上下左右それぞれに隣接する4つの隣接マクロブロックの2次元DCT係数を、バッファメモリ12(図2)から読み出すとともに、それらの各マクロブロックのDCTタイプを、バッファメモリ12から読み出す。さらに、ステップS141では、読み出し部136が、注目ブロックの2次元DCT係数を、配列部137に供給するとともに、4つの隣接マクロブロックの2次元DCT係数を、1次元逆DCT変換部261に供給する。また、ステップS141では、読み出し部136が、バッファメモリ12から読み出したDCTタイプを、隣接1次元DCT係数選択/変換部262に供給し、ステップS142に進む。
【0752】
ステップS142では、1次元逆DCT変換部261が、読み出し部136から供給される4つの隣接マクロブロックを構成するブロックを1次元逆DCT変換し、その結果得られる1次元DCT係数を、隣接1次元DCT係数選択/変換部262に供給して、ステップS143に進む。
【0753】
ステップS143では、隣接1次元DCT係数選択/変換部262は、図2の隣接1次元DCT係数選択/変換部32と同様に、読み出し部136から供給されるDCTタイプに基づき、図8乃至図23で説明した、注目ブロックに隣接する画素列の1次元DCT係数(隣接1次元DCT係数)を、1次元逆DCT変換部261から供給される1次元DCT係数から取得し、配列部137に供給する。
【0754】
そして、ステップS144に進み、配列部137は、注目ブロックの8×8画素それぞれの予測タップとして、読み出し部136から供給される注目ブロックの2次元DCT係数と、隣接1次元DCT係数選択/変換部262から供給される隣接1次元DCT係数とを、所定の順番に配列し、これにより、予測タップを構成して、積和演算部133(図42)に供給し、処理を終了する。
【0755】
従って、図76の予測タップ生成部131によれば、図78に示すように、注目ブロックの8×8の2次元DCT係数と、その注目ブロックの上下左右それぞれに隣接する隣接1次元DCT係数(上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、および右隣接1次元DCT係数)との、合計で96(=8×8+8×4)タップでなる予測タップが構成される。
【0756】
図78のタップ構造の予測タップにおいて、上隣接1次元DCT係数、下隣接1次元DCT係数、左隣接1次元DCT係数、右隣接1次元DCT係数は、注目ブロックの上、下、左、右に隣接する隣接ブロックそれぞれの8つのブロック隣接画素の水平方向または垂直方向の空間周波数成分を表すことから、即ち、注目画素に近い位置の空間周波数を表すことから、図76の予測タップ生成部131でも、例えば、図44や図45における場合に比較して、注目画素との相関が大きい情報を含んだ形の、少ないタップ数の予測タップが生成されることになる。
【0757】
なお、1次元逆DCT変換部261と隣接1次元DCT係数選択/変換部262は、図2の1次元逆DCT変換部31と隣接1次元DCT係数選択/変換部32それぞれによって兼用するようにすることが可能である。
【0758】
また、上述の場合には、2次元DCT係数を1次元逆DCT変換することによって、予測タップとする1次元DCT係数を求めるようにしたが、この1次元DCT係数は、その他、例えば、ビットストリームをMPEGデコード等することにより復号画像に復号し、その復号画像を1次元DCT変換することによって求めるようにすることも可能である。
【0759】
次に、図79は、図42の予測タップ生成部131の第6の構成例を示している。なお、図中、図73における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図79の実施の形態では、予想タップ生成部131は、基本的に、図73における場合と同様に構成されている。
【0760】
但し、選択部222は、バッファメモリ232に記憶された復号画像を構成する画素から、図80に示すように、注目画素のフレームの1フレーム前と後のフレームそれぞれの、注目画素と同一位置にある画素(以下、適宜、同一位置画素という)を選択し、その同一位置画素の画素値を、バッファメモリ232から読み出して、配列部137に供給する。
【0761】
次に、図81のフローチャートを参照して、図79の予測タップ生成部131が図47のステップS101で行う処理について説明する。
【0762】
予測タップ生成部131では、まず最初に、ステップS151において、読み出し部136が、注目ブロックの2次元DCT係数を、バッファメモリ12(図2)から読み出し、配列部137に供給して、ステップS152に進む。
【0763】
ステップS152では、選択部222が、注目画素のフレームの1フレーム前と後のフレームそれぞれにおける注目ブロックの各画素と同一位置にある画素(同一位置画素)を選択し、その同一位置画素の画素値を、バッファメモリ232から読み出して、配列部137に供給する。
【0764】
そして、ステップS153に進み、配列部137は、注目ブロックの8×8画素を、順次、注目画素として、各注目画素について、読み出し部136から供給される注目ブロックの2次元DCT係数と、選択部222から供給される、注目画素に対する2つの同一位置画素とを、所定の順番に配列し、これにより、予測タップを構成して、積和演算部133(図42)に供給し、処理を終了する。
【0765】
従って、図79の予測タップ生成部131によれば、注目画素について、注目ブロックの8×8の2次元DCT係数と、その注目画素に対する2つの同一位置画素との、合計で66(=8×8+2)タップでなる予測タップが構成される。
【0766】
注目画素のフレームの1フレーム前と後のフレームの同一位置画素は、一般に、注目画素との相関が大きいから、図79の予測タップ生成部131では、そのような注目画素との相関が大きい情報を含んだ形の予測タップであって、タップ数の少ないものが生成されることになる。
【0767】
なお、図79のタップ生成部131では、注目画素のフレームの1フレーム前と後のフレームの同一位置画素の他、注目画素のフレームの2フレーム以上前や後のフレームの同一位置画素を含めた形の予測タップを生成するようにすることも可能である。
【0768】
また、図79のタップ生成部131では、注目画素のフレームの1フレーム前と後のフレームの同一位置画素の他、その同一位置画素に(空間的に)隣接する画素等を含めた形の予測タップを生成するようにすることも可能である。
【0769】
次に、図82は、図42の予測タップ生成部131の第7の構成例を示している。なお、図中、図79における場合と対応する部分については、同一の符号を付してあり、以下では、その説明は、適宜省略する。即ち、図82の実施の形態では、予想タップ生成部131は、基本的に、図79における場合と同様に構成されている。
【0770】
但し、MPEGデコーダ231は、MPEGデコードした復号画像の他、そのMPEGデコードに用いた動きベクトルも、バッファメモリ232に供給するようになっている。また、バッファメモリ232は、MPEGデコーダ231が出力する復号画像と動きベクトルを、一時記憶するようになっている。
【0771】
さらに、選択部222は、バッファメモリ232に記憶された復号画像を構成する画素から、図83に示すように、注目ブロックのフレームの前または後のフレームにおける、注目画素に対応する位置から、注目ブロックの動きベクトルに対応する分だけ移動した位置にある画素(以下、適宜、動き対応画素という)を選択し、その動き対応画素の画素値を、バッファメモリ232から読み出して、配列部137に供給する。
【0772】
なお、注目ブロックが、両方向予測されるBピクチャの画像である場合には、図83Aに示すように、その注目ブロックについては、注目ブロックのフレームの前のフレームを参照画像として前方予測を行うための動きベクトルと、注目ブロックのフレームの後のフレームを参照画像として後方予測を行うための動きベクトルが存在する。
【0773】
ここで、図83Aの実施の形態では、第nフレームが、注目ブロックのフレームで、Bピクチャとなっている。そして、注目ブロックは、Iピクチャである第n−2フレームを参照画像として前方予測を行うための動きベクトルv1と、Pピクチャである第n+1フレームを参照画像として後方予測を行うための動きベクトルv2を有している。
【0774】
この場合、選択部222では、第n−2フレームの、注目画素に対応する位置から動きベクトルv1だけ移動した位置の画素と、第n+2フレームの、注目画素に対応する位置から動きベクトルv2だけ移動した位置の画素が、動き対応画素として選択される。
【0775】
一方、注目ブロックが、予測符号化されないIピクチャや、前方予測されるPピクチャの画像である場合は、予測を行うための動きベクトルが存在しなかったり、存在しても、注目ブロックのフレームの前のフレームを参照画像として前方予測を行うための動きベクトルしか存在しない。
【0776】
ここで、図83Bの実施の形態では、第nフレームが、注目ブロックのフレームで、Pピクチャとなっている。そして、注目ブロックは、Iピクチャである第n−2フレームを参照画像として前方予測を行うための動きベクトルv3しか有していない。
【0777】
ところで、IピクチャやPピクチャは、PピクチャやBピクチャの予測画像を予測するときの参照画像となりうる。図83Bの実施の形態では、Bピクチャである第n+1フレームのブロックが、注目画素のフレームの、注目画素を含む画像を参照画像として前方予測を行うための動きベクトルv4を有している。
【0778】
この場合、選択部222には、第n−2フレームの、注目画素の対応する位置から動きベクトルv3だけ移動した位置の画素と、第n+1フレームの、注目画素に対応する位置から動きベクトルv4だけ移動した位置の画素を、動き対応画素として選択させることができる。
【0779】
ここで、以下、適宜、動きベクトルに基づいて参照画像を動き補償して得られる予測画像によって予測される画像のフレームを、非参照フレームという。また、以下、適宜、非参照フレームの画像を予測するのに参照される画像のフレームを、参照フレームという。さらに、注目ブロックが有する動きベクトルと、他のブロックが有する、注目画素を含む画像を参照画像とした動き補償に用いられる動きベクトルの両方をまとめて、以下、適宜、注目ブロックに関する動きベクトルという。
【0780】
なお、注目画素のフレームの、注目画素を含む画像を参照画像として前方予測を行うための動きベクトルを有する、他のフレーム(非参照フレーム)のブロックは複数存在しうるが、その場合には、その複数の動きベクトルの任意の1以上に基づいて、その1以上の動きベクトルそれぞれに対応する動き対応画素を選択することが可能である。
【0781】
また、上述の場合には、参照フレーム(または非参照フレーム)から、1つの動き対応画素を選択するようにしたが、動き対応画素としては、参照フレームの、注目画素に対応する位置から、注目ブロックの動きベクトルに対応する分だけ移動した位置にある画素と、その周辺の1以上の画素との合計2以上の画素を、動き対応画素として選択するようにすることも可能である。さらに、選択部222では、注目画素についての動き対応画素を、仮の注目画素とした場合に、その仮の注目画素についての動き対応画素となる画素も、注目画素についての動き対応画素として選択するようにすることが可能である。
【0782】
次に、図84のフローチャートを参照して、図82の予測タップ生成部131が図47のステップS101で行う処理について説明する。
【0783】
予測タップ生成部131では、まず最初に、ステップS161において、読み出し部136が、注目ブロックの2次元DCT係数を、バッファメモリ12(図2)から読み出し、配列部137に供給して、ステップS162に進む。
【0784】
ステップS162では、選択部222が、注目ブロックに関する動きベクトルを、バッファメモリ232から読み出し、ステップS163に進む。
【0785】
ステップS163では、選択部222は、参照フレームまたは非参照フレームにおいて、注目ブロックの各画素の位置から、注目ブロックに関する動きベクトルに対応する分だけ移動した位置にある画素を、動き対応画素として選択し、その動き対応画素の画素値を、バッファメモリ232から読み出して、配列部137に供給する。
【0786】
そして、ステップS164に進み、配列部137は、注目ブロックの8×8画素を、順次、注目画素として、各注目画素について、読み出し部136から供給される注目ブロックの2次元DCT係数と、選択部222から供給される動き対応画素とを、所定の順番に配列し、これにより、予測タップを構成して、積和演算部133(図42)に供給し、処理を終了する。
【0787】
動き対応画素は、一般に、注目画素との相関が大きいから、図82の予測タップ生成部131では、そのような注目画素との相関が大きい情報を含んだ形の予測タップであって、タップ数の少ないものが生成されることになる。
【0788】
ここで、動き対応画素を含む予測タップを構成することは、動きのある物体が表示された画像の復号精度を向上させるのに有効である。
【0789】
なお、図79や図82の実施の形態では、同一位置画素や動き対応画素の画素値を、予測タップに含めるようにしたが、予測タップには、同一位置画素や動き対応画素の画素値ではなく、その1次元DCT係数を含めるようにすることが可能である。また、予測タップには、同一位置画素や動き対応画素を含む、垂直または水平方向に並ぶ所定数の画素列の1次元DCT係数を含めるようにすることも可能である。
【0790】
次に、上述した一連の処理は、ハードウェアにより行うこともできるし、ソフトウェアにより行うこともできる。一連の処理をソフトウェアによって行う場合には、そのソフトウェアを構成するプログラムが、汎用のコンピュータ等にインストールされる。
【0791】
そこで、図85は、上述した一連の処理を実行するプログラムがインストールされるコンピュータの一実施の形態の構成例を示している。
【0792】
プログラムは、コンピュータに内蔵されている記録媒体としてのハードディスク405やROM403に予め記録しておくことができる。
【0793】
あるいはまた、プログラムは、フレキシブルディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto Optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体411に、一時的あるいは永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体411は、いわゆるパッケージソフトウエアとして提供することができる。
【0794】
なお、プログラムは、上述したようなリムーバブル記録媒体411からコンピュータにインストールする他、ダウンロードサイトから、ディジタル衛星放送用の人工衛星を介して、コンピュータに無線で転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送し、コンピュータでは、そのようにして転送されてくるプログラムを、通信部408で受信し、内蔵するハードディスク405にインストールすることができる。
【0795】
コンピュータは、CPU(Central Processing Unit)402を内蔵している。CPU402には、バス401を介して、入出力インタフェース410が接続されており、CPU402は、入出力インタフェース410を介して、ユーザによって、キーボードや、マウス、マイク等で構成される入力部407が操作等されることにより指令が入力されると、それにしたがって、ROM(Read Only Memory)403に格納されているプログラムを実行する。あるいは、また、CPU402は、ハードディスク405に格納されているプログラム、衛星若しくはネットワークから転送され、通信部408で受信されてハードディスク405にインストールされたプログラム、またはドライブ409に装着されたリムーバブル記録媒体411から読み出されてハードディスク405にインストールされたプログラムを、RAM(Random Access Memory)404にロードして実行する。これにより、CPU402は、上述したフローチャートにしたがった処理、あるいは上述したブロック図の構成により行われる処理を行う。そして、CPU402は、その処理結果を、必要に応じて、例えば、入出力インタフェース410を介して、LCD(Liquid CryStal Display)やスピーカ等で構成される出力部406から出力、あるいは、通信部408から送信、さらには、ハードディスク405に記録等させる。
【0796】
ここで、本明細書において、コンピュータに各種の処理を行わせるためのプログラムを記述する処理ステップは、必ずしもフローチャートとして記載された順序に沿って時系列に処理する必要はなく、並列的あるいは個別に実行される処理(例えば、並列処理あるいはオブジェクトによる処理)も含むものである。
【0797】
また、プログラムは、1のコンピュータにより処理されるものであっても良いし、複数のコンピュータによって分散処理されるものであっても良い。さらに、プログラムは、遠方のコンピュータに転送されて実行されるものであっても良い。
【0798】
以上のように、注目ブロックの2次元DCT係数の他、その注目ブロックのフレームに対して、空間的または時間的に近接するフレームのブロックの2次元DCT係数から得られる、画素値や1次元DCT係数によって、予測タップを構成するようにしたので、少ないタップ数の予測タップによって、ブロック歪みやモスキートノイズ等の歪みを十分に低減した高画質の復号画像を得ることが可能となる。
【0799】
なお、本実施の形態では、教師データの予測値を、式(1)の線形1次予測演算によって求めるようにしたが、教師データの予測値は、その他、例えば、2次以上の高次の式を用いて求めるようにすることが可能である。
【0800】
また、本実施の形態では、クラス分類を、注目ブロックとそれに隣接するブロックの1次元DCT係数を用いて行うようにしたが、その他、クラス分類は、注目ブロックと空間的または時間的に近いブロックの1次元DCT係数をも用いて行うことが可能である。さらに、クラス分類は、1次元DCT係数の他、2次元DCT係数も用いて行うことが可能である。また、クラス分類は、注目ブロックに対して、時間方向に近接するブロックの1次元DCT係数をも用いて行うことが可能である。
【0801】
さらに、クラス分類は、例えば、注目ブロックや隣接ブロックの8×8の2次元DCT係数のうちの、直流成分を除く63個の2次元DCT係数のパワー(自乗和)を求め、そのパワーと所定の閾値との大小関係や、注目ブロックから求めたパワーと、隣接ブロックから求めたパワーとの大小関係に基づいて行うようにすることも可能である。また、クラス分類は、例えば、図46に示した注目ブロックに隣接する8つの隣接ブロックの2次元DCT係数のうちの直流成分と所定の閾値との大小関係や、その8つの隣接ブロックの2次元DCT係数のうちの直流成分それぞれと、注目ブロックの2次元DCT係数のうちの直流成分との大小関係に基づいて行うようにすることも可能である。
【0802】
また、クラス分類は、例えば、注目ブロックや隣接ブロックの複数の画素を含んだ形のクラスタップを構成し、そのクラスタップをADRC(Adaptive Dynamic Range Coding)処理することによって行うことも可能である。
【0803】
ここで、KビットADRC処理によれば、例えば、クラスタップを構成する画素の画素値の最大値MAXと最小値MINが検出され、DR=MAX-MINを、集合の局所的なダイナミックレンジとし、このダイナミックレンジDRに基づいて、クラスタップを構成する画素値がKビットに再量子化される。即ち、クラスタップを構成する各画素の画素値から、最小値MINが減算され、その減算値がDR/2Kで除算(量子化)される。そして、以上のようにして得られる、クラスタップを構成するKビットの各画素の画素値を、所定の順番で並べたビット列が、ADRCコードとして出力される。従って、クラスタップが、例えば、1ビットADRC処理された場合には、そのクラスタップを構成する各画素の画素値は、最小値MINが減算された後に、最大値MAXと最小値MINとの平均値で除算され(小数点以下切り捨て)、これにより、各画素の画素値が1ビットとされる(2値化される)。そして、その1ビットの画素値を所定の順番で並べたビット列であるADRCコードに基づいて、注目画素のクラスが決定される。
【0804】
さらに、クラス分類は、例えば、ビデオストリームに含まれるサイドインフォメーションを用いて行うようにすることも可能である。即ち、クラス分類は、例えば、サイドインフォメーションの1つである量子化ステップに基づいて行うことが可能である。また、クラス分類は、例えば、サイドインフォメーションの1つであるDCTタイプに基づき、注目ブロックと隣接ブロックの構造(フィールド構造であるか、またはフレーム構造であるか)の組み合わせを認識し、その認識結果に基づいて行うようにすることも可能である。さらに、クラス分類は、例えば、動き補償タイプやCBPなどのサイドインフォメーションから認識される動き補償の有無や、2次元DCT係数の有無に基づいて行うようにすることも可能である。
【0805】
また、クラス分類は、例えば、上述した画素位置モードに基づいて行うことも可能である。
【0806】
さらに、本実施の形態では、注目ブロックについては、その2次元DCT係数だけを、予測タップに含めるようにしたが、予測タップには、その他、例えば、注目ブロックの画素値や1次元DCT係数を含めるようにすることが可能である。
【0807】
さらに、本実施の形態では、MPEG符号化された動画像を対象としたが、本発明は、2次元DCT変換を用いる、MPEG以外の符号化方式により符号化された動画像や、JPEG符号化された静止画等を復号する場合にも適用可能である。
【0808】
【発明の効果】
以上の如く、本発明によれば、画像データを、少なくとも2次元DCT(Discrete Cosine Transform)変換して得られる2次元DCT係数を含む符号化データを、高画質の画像を復号することが可能となる。
【図面の簡単な説明】
【図1】MPEGデコーダの構成例を示すブロック図である。
【図2】本発明を適用した画像処理装置の第1実施の形態の構成例を示すブロック図である。
【図3】DCT変換部21と周波数領域動き補償加算部22の構成例を示すブロック図である。
【図4】サンプリング部61の処理を説明するための図である。
【図5】サンプリング部61の処理を説明するための図である。
【図6】2次元DCT変換および2次元逆DCT変換、並びに1次元DCT変換および1次元逆DCT変換を説明するための図である。
【図7】原画像、水平1次元DCT係数、垂直1次元DCT係数、および2次元DCT係数を示すディスプレイ上に表示された中間階調の写真である。
【図8】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図9】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図10】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図11】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図12】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図13】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図14】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図15】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図16】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図17】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図18】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図19】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図20】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図21】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図22】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図23】注目ブロックの境界の画素列に空間的に隣接する隣接ブロックの画素列を説明するための図である。
【図24】隣接1次元DCT係数選択/変換部32の構成例を示すブロック図である。
【図25】隣接1次元DCT係数選択/変換部32の処理を説明するフローチャートである。
【図26】左上ブロック処理の詳細を説明するフローチャートである。
【図27】左下ブロック処理の詳細を説明するフローチャートである。
【図28】右上ブロック処理の詳細を説明するフローチャートである。
【図29】右下ブロック処理の詳細を説明するフローチャートである。
【図30】ACパワーを説明するための図である。
【図31】ACパワー算出部33の構成例を示すブロック図である。
【図32】AC内積を説明するための図である。
【図33】AC内積計算部34の構成例を示すブロック図である。
【図34】クラスコード生成部36の構成例を示すブロック図である。
【図35】クラスコードのフォーマットを示す図である。
【図36】クラスコード生成部36の処理を説明するフローチャートである。
【図37】クラスコード生成部37の構成例を示すブロック図である。
【図38】4:2:2フォーマットにおける輝度ブロックと色差ブロックとの対応関係を示す図である。
【図39】輝度クラスコードを利用した色差クラスコードの生成を説明する図である。
【図40】4:2:0フォーマットにおける輝度ブロックと色差ブロックとの対応関係を示す図である。
【図41】輝度クラスコードを利用した色差クラスコードの生成を説明する図である。
【図42】適応処理部51の構成例を示すブロック図である。
【図43】予測タップ生成部131の第1の構成例を示すブロック図である。
【図44】予測タップ生成部131が生成する予測タップのタップ構造を示す図である。
【図45】予測タップ生成部131が生成する予測タップのタップ構造を示す図である。
【図46】予測タップ生成部131が生成する予測タップのタップ構造を示す図である。
【図47】適応処理部51の処理を説明するフローチャートである。
【図48】タップ係数を学習する学習装置の第1実施の形態の構成例を示すブロック図である。
【図49】学習装置による学習処理を説明するフローチャートである。
【図50】タップ係数を学習する学習装置の第2実施の形態の構成例を示すブロック図である。
【図51】タップ係数を学習する学習装置の第3実施の形態の構成例を示すブロック図である。
【図52】シミュレーションにより得られた復号画像のS/Nを示す図である。
【図53】シミュレーションにより得られた復号画像を示すディスプレイ上に表示された中間階調の写真である。
【図54】予測タップ生成部131の第2の構成例を示すブロック図である。
【図55】予測タップ生成部131が生成する予測タップのタップ構造を示す図である。
【図56】予想タップ生成部131の処理を説明するフローチャートである。
【図57】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図58】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図59】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図60】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図61】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図62】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図63】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図64】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図65】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図66】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図67】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図68】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図69】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図70】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図71】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図72】注目ブロックの境界に空間的に隣接するブロック隣接画素を説明するための図である。
【図73】予測タップ生成部131の第3の構成例を示すブロック図である。
【図74】予測タップ生成部131の第4の構成例を示すブロック図である。
【図75】画像処理装置240の処理を説明するための図である。
【図76】予測タップ生成部131の第5の構成例を示すブロック図である。
【図77】予測タップ生成部131の処理を説明するフローチャートである。
【図78】予測タップ生成部131が生成する予測タップのタップ構造を示す図である。
【図79】予測タップ生成部131の第6の構成例を示すブロック図である。
【図80】予測タップ生成部131が生成する予測タップのタップ構造を示す図である。
【図81】予測タップ生成部131の処理を説明するフローチャートである。
【図82】予測タップ生成部131の第7の構成例を示すブロック図である。
【図83】予測タップ生成部131が生成する予測タップのタップ構造を示す図である。
【図84】予測タップ生成部131の処理を説明するフローチャートである。
【図85】本発明を適用したコンピュータの一実施の形態の構成例を示すブロック図である。
【符号の説明】
1 分離部, 2 DCT係数抽出/逆量子化部, 4 動き補償部, 5 画像メモリ, 11 前処理部, 12 バッファメモリ, 13 クラス分類部, 14 タップ係数記憶部, 15 画像再構成部, 21 DCT変換部, 22 周波数領域動き補償加算部, 31 1次元逆DCT変換部, 32隣接1次元DCT係数選択/変換部, 33 ACパワー算出部, 34 AC内積計算部, 36,37 クラスコード生成部, 41,42 タップ係数選択部, 43,44 係数メモリ, 51 適応処理部, 52 逆DCT変換部, 61 サンプリング部, 62 DCT部, 71 DCT係数選択部, 72 加算部, 73 選択部, 80 制御部, 81 メモリ, 82垂直1次元逆DCT変換部, 83 サンプリング部, 84 垂直1次元DCT変換部, 85 選択部, 91 水平1次元DCT係数抽出部, 92 垂直1次元DCT係数抽出部, 93 水平ACパワー計算部, 94 垂直ACパワー計算部, 101 上内積用1次元DCT係数抽出部, 102 下内積用1次元DCT係数抽出部, 103 左内積用1次元DCT係数抽出部, 104 右内積用1次元DCT係数抽出部, 105 上内積演算部, 106下内積演算部, 107 左内積演算部, 108 右内積演算部, 111,112 比較部, 113 平坦性条件判定部, 114 連続性条件判定部, 115 境界部エッジ条件判定部, 116 クラスコード作成部, 121,122 比較部, 123 クラスコード作成部, 131 予測タップ生成部, 132 タップ係数バッファ, 133 積和演算部, 136 読み出し部, 137 配列部, 141 教師データストレージ, 142 生徒データ生成部, 143 生徒データストレージ, 144 予測タップ生成部, 145 クラス分類部, 146 足し込み部, 147 タップ係数演算部, 151 MPEGエンコーダ, 152 分離部, 153 DCT係数抽出/逆量子化部, 171 MPEGエンコーダ, 172 分離部, 173 DCT係数抽出/逆量子化部, 174 クラス分類部, 175 タップ係数記憶部, 176 適応処理部, 177 Iピクチャストレージ, 178 動き補償部, 179 画像メモリ, 180 DCT変換部, 181 周波数領域動き補償加算部, 191 MPEGエンコーダ, 192 分離部, 193 DCT係数抽出/逆量子化部, 194 クラス分類部, 195タップ係数記憶部, 196 適応処理部, 197 Iピクチャストレージ, 198 動き補償部, 199 画像メモリ, 200 DCT変換部, 201 周波数領域動き補償加算部, 202 クラス分類部, 203 タップ係数記憶部, 204 適応処理部, 205 Pピクチャストレージ, 206 動き補償部, 207 画像メモリ, 208 DCT変換部, 209周波数領域動き補償加算部, 221 逆DCT変換部, 222 選択部,231 MPEGデコーダ, 232 バッファメモリ, 240 画像処理装置, 241 前処理部, 242 バッファメモリ, 243 クラス分類部, 244 タップ係数記憶部, 245 画像再構成部, 251 適応処理部, 261 1次元逆DCT変換部, 262 隣接1次元DCT係数選択/変換部, 401 バス, 402 CPU, 403 ROM, 404 RAM,405 ハードディスク, 406 出力部, 407 入力部, 408 通信部, 409 ドライブ, 410 入出力インタフェース, 411 リムーバブル記録媒体[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus, an image processing method, a program, and a recording medium, and in particular, an image that enables, for example, encoded data obtained by MPEG encoding image data to be decoded into high-quality image data. The present invention relates to a processing device, an image processing method, a program, and a recording medium.
[0002]
[Prior art]
In encoding methods such as MPEG (Moving Picture Experts Group) 1 and 2, image data is subjected to DCT (Discrete Cosine Transform) conversion in units of 8 × 8 pixel blocks and further quantized to generate encoded data. It is said. For this reason, in an MPEG decoder compliant with the MPEG standard, encoded data is inversely quantized and further decoded by inverse DCT conversion.
[0003]
As described above, in the MPEG encoding method, image data is DCT-converted in units of blocks, and the resulting DCT coefficients are quantized. Therefore, a decoded image obtained by an MPEG decoder compliant with the MPEG standard is included in the decoded image. Various distortions such as block distortion and mosquito noise occur due to the influence of quantization during encoding.
[0004]
As a method of reducing the distortion generated in the decoded image, for example, as described in JP-A-11-187400 and JP-A-11-205792, post-processing is performed on the decoded image, There is a method of detecting and correcting distortion occurring in a decoded image.
[0005]
[Problems to be solved by the invention]
However, as described above, in the method of detecting and correcting distortion, it is necessary to detect the position of the block boundary. Further, when the encoded data is the image data encoded by the MPEG2 system, it is necessary to determine whether the DCT type that can be set in units of macroblocks is the frame DCT or the field DCT. is there. Therefore, if the detection of the position of the block boundary or the determination of the DCT type is mistaken, it may be difficult to sufficiently remove the distortion generated in the decoded image.
[0006]
Furthermore, the above-described method performs a filter process for correction regardless of the phase of the cosine waveform that forms the basis of the distortion waveform generated in the decoded image. I can't say that.
[0007]
The present invention has been made in view of such a situation, and makes it possible to obtain a high-quality decoded image in which various distortions are sufficiently reduced.
[0008]
[Means for Solving the Problems]
The first image processing apparatus of the present invention includes:Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is preliminarily obtained as student data to be a learning student by a predetermined learning process. Calculation coefficient for each classAn acquisition means for acquiring one corresponding to the class of the target pixel that is the prediction target pixel,Of the block of interest that is the block containing the pixel of interestA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsOr some specific frequency components of DCT coefficients of the peripheral blocks or peripheral information which is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks are used for the product-sum operation with the arithmetic coefficients acquired by the acquiring means. Generate as a set of valuesIt corresponds to the class of the generation means and the target pixelCalculation coefficientWhen,Set of valuesPredictive calculation means for decoding the encoded image data by obtaining the pixel value of the pixel of interest by performing a product-sum operation withThe predetermined learning process classifies the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel, Among the pixels constituting the teacher data, the two-dimensional DCT coefficient of the target block that is the block including the target teacher data that is the prediction target pixel and the two-dimensional DCT coefficient of the peripheral block that is a peripheral block of the target block are inverted by 2. Multiply-sum operation with operation coefficient of pixel value information obtained by two-dimensional DCT conversion or specific frequency component of DCT coefficient of peripheral block or peripheral information which is one-dimensional DCT coefficient obtained from two-dimensional DCT coefficient of peripheral block Of the teacher data of interest obtained by performing a product-sum operation on the set of values and the calculation coefficient. The prediction error, a calculation coefficient for the statistical minimum is the process for obtaining for each classIt is characterized by that.
[0009]
The first image processing method of the present invention includes:Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is preliminarily obtained as student data to be a learning student by a predetermined learning process. Calculation coefficient for each classAn acquisition step of acquiring one corresponding to the class of the target pixel that is the prediction target pixel,Of the block of interest that is the block containing the pixel of interestA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsOr some specific frequency components of DCT coefficients of the peripheral blocks or peripheral information which is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks are used for the product-sum operation with the arithmetic coefficients acquired by the acquiring means. Generate as a set of valuesIt corresponds to the generation step and the class of the target pixel.Calculation coefficientWhen,Set of valuesA prediction operation step of decoding the encoded image data by obtaining the pixel value of the target pixel by performing a product-sum operation withThe predetermined learning process classifies the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel, Among the pixels constituting the teacher data, the two-dimensional DCT coefficient of the target block that is the block including the target teacher data that is the prediction target pixel and the two-dimensional DCT coefficient of the peripheral block that is a peripheral block of the target block are inverted by 2. Multiply-sum operation with operation coefficient of pixel value information obtained by two-dimensional DCT conversion or specific frequency component of DCT coefficient of peripheral block or peripheral information which is one-dimensional DCT coefficient obtained from two-dimensional DCT coefficient of peripheral block Of the teacher data of interest obtained by performing a product-sum operation on the set of values and the calculation coefficient. The prediction error, a calculation coefficient for the statistical minimum is the process for obtaining for each classIt is characterized by that.
[0010]
The first program of the present invention is:Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is preliminarily obtained as student data to be a learning student by a predetermined learning process. Calculation coefficient for each classAn acquisition step of acquiring one corresponding to the class of the target pixel that is the prediction target pixel,Of the block of interest that is the block containing the pixel of interestA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsOr some specific frequency components of DCT coefficients of the peripheral blocks or peripheral information which is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks are used for the product-sum operation with the arithmetic coefficients acquired by the acquiring means. Generate as a set of valuesIt corresponds to the generation step and the class of the target pixel.Calculation coefficientWhen,Set of valuesA prediction operation step of decoding the encoded image data by obtaining the pixel value of the target pixel by performing a product-sum operation withThe predetermined learning process classifies the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel, Among the pixels constituting the teacher data, the two-dimensional DCT coefficient of the target block that is the block including the target teacher data that is the prediction target pixel and the two-dimensional DCT coefficient of the peripheral block that is a peripheral block of the target block are inverted by 2. Multiply-sum operation with operation coefficient of pixel value information obtained by two-dimensional DCT conversion or specific frequency component of DCT coefficient of peripheral block or peripheral information which is one-dimensional DCT coefficient obtained from two-dimensional DCT coefficient of peripheral block Of the teacher data of interest obtained by performing a product-sum operation on the set of values and the calculation coefficient. The prediction error, a calculation coefficient for the statistical minimum is the process for obtaining for each classIt is characterized by that.
[0011]
The first recording medium of the present invention encodes teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT conversion, and becomes encoded learning data including a two-dimensional DCT coefficient. An acquisition step of acquiring, as student data, one corresponding to a class of a pixel of interest that is a prediction target pixel, among computation coefficients for each class obtained in advance by a predetermined learning process;Of the block of interest that is the block containing the pixel of interestA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsOr some specific frequency components of DCT coefficients of the peripheral blocks or peripheral information which is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks are used for the product-sum operation with the arithmetic coefficients acquired by the acquiring means. Generate as a set of valuesIt corresponds to the generation step and the class of the target pixel.Calculation coefficientWhen,Set of valuesA program for causing a computer to execute a prediction calculation step of decoding encoded image data by obtaining a pixel value of a target pixel by performing a product-sum operation withThe predetermined learning process classifies the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel, Among the pixels constituting the teacher data, the two-dimensional DCT coefficient of the target block that is the block including the target teacher data that is the prediction target pixel and the two-dimensional DCT coefficient of the peripheral block that is a peripheral block of the target block are inverted by 2. Multiply-sum operation with operation coefficient of pixel value information obtained by two-dimensional DCT conversion or specific frequency component of DCT coefficient of peripheral block or peripheral information which is one-dimensional DCT coefficient obtained from two-dimensional DCT coefficient of peripheral block Of the teacher data of interest obtained by performing a product-sum operation on the set of values and the calculation coefficient. The prediction error, a calculation coefficient for the statistical minimum is the process for obtaining for each classComputer readableIs something.
[0012]
The second image processing apparatus of the present invention encodes teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT conversion, and encodes data including a two-dimensional DCT coefficient with a learning student. Student data generating means for outputting as student data and pixels constituting the teacher dataContains the feature value obtained from the DCT coefficient of the block containingClass classification means for classifying into one of a plurality of classes based on a code, and attention teacher data that is a prediction target pixel among pixels constituting the teacher dataOf the block of interest that is the block containingA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsAlternatively, a specific frequency component of the DCT coefficient of the peripheral block or peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is generated as a set of several values used for the product-sum operation with the arithmetic coefficient. DoGenerating means;Set of valuesWhenCalculation coefficientStatistically minimize the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operationCalculation coefficientAnd learning means for performing learning for each class.
[0013]
According to the second image processing method of the present invention, teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is added to a learning student. A student data generation step to output as student data and a pixel constituting the teacher dataContains the feature value obtained from the DCT coefficient of the block containingBased on the code, a class classification step for classifying into one of a plurality of classes, and attention teacher data that is a prediction target pixel among pixels constituting the teacher dataOf the block of interest that is the block containingA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsAlternatively, a specific frequency component of the DCT coefficient of the peripheral block or peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is generated as a set of several values used for the product-sum operation with the arithmetic coefficient. DoGeneration step;Set of valuesWhenCalculation coefficientStatistically minimize the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation withCalculation coefficientAnd a learning step for performing learning for each class.
[0014]
The second program of the present invention encodes teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT conversion, and encodes data including a two-dimensional DCT coefficient as a learning student. The student data generation step to output as data and the pixels constituting the teacher data areContains the feature value obtained from the DCT coefficient of the block containingBased on the code, a class classification step for classifying into one of a plurality of classes, and attention teacher data that is a prediction target pixel among pixels constituting the teacher dataOf the block of interest that is the block containingA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsAlternatively, a specific frequency component of the DCT coefficient of the peripheral block or peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is generated as a set of several values used for the product-sum operation with the arithmetic coefficient. DoGeneration step;Set of valuesWhenCalculation coefficientStatistically minimize the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation withCalculation coefficientAnd a learning step for performing learning for each class.
[0015]
The second recording medium of the present invention encodes teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT conversion, and uses encoded data including a two-dimensional DCT coefficient as a learning student. The student data generation step for outputting as student data and the pixels constituting the teacher data areContains the feature value obtained from the DCT coefficient of the block containingBased on the code, a class classification step for classifying into one of a plurality of classes, and attention teacher data that is a prediction target pixel among pixels constituting the teacher dataOf the block of interest that is the block containingA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsAlternatively, a specific frequency component of the DCT coefficient of the peripheral block or peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is generated as a set of several values used for the product-sum operation with the arithmetic coefficient. DoGeneration step;Set of valuesWhenCalculation coefficientStatistically minimize the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation withCalculation coefficientIs a computer-readable recording medium storing a program for causing a computer to execute a learning step for performing learning for each class.
[0016]
In the first image processing apparatus, the image processing method, the program, and the recording medium of the present invention,Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is preliminarily obtained as student data to be a learning student by a predetermined learning process. Calculation coefficient for each classOf the pixels corresponding to the class of the pixel of interest that is the pixel to be predicted is acquired,Of the block of interest that is the block containing the pixel of interestA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsAlternatively, a specific frequency component of the DCT coefficient of the peripheral block or peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is a set of several values used for the product-sum operation with the arithmetic coefficient.Generated. And corresponding to the class of pixel of interestCalculation coefficientWhen,Set of valuesThe encoded image data is decoded by obtaining the pixel value of the pixel of interest by performing a product-sum operation withIs done. In addition, the predetermined learning process classifies the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel. The two-dimensional DCT coefficient of the target block that is the block including the target teacher data that is the pixel to be predicted among the pixels that constitute the teacher data and the two-dimensional DCT coefficient of the peripheral block that is a peripheral block of the target block are reversed. The pixel value information obtained by the two-dimensional DCT transform, the specific frequency component of the DCT coefficient of the peripheral block, or the peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block, and the product sum It is generated as a set of several values used for the calculation, and the attention teacher data obtained by performing the product-sum operation of the set of values and the calculation coefficient The prediction error Hakachi, calculation coefficients that statistically minimum, a process for obtaining for each class.
[0017]
In the second image processing apparatus, the image processing method, the program, and the recording medium of the present invention, the teacher data, which is image data serving as a learning teacher, is encoded by performing at least two-dimensional DCT conversion, and the two-dimensional DCT coefficient Is output as student data for learning students.Further, class classification is performed in which the pixels constituting the teacher data are classified into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel.Of the pixels constituting the teacher data, the attention teacher data that is the prediction target pixelOf the block of interest that is the block containingA two-dimensional DCT coefficient;Of the surrounding blocks that are the blocks around the block of interestPixel value information obtained by inverse two-dimensional DCT transformation of two-dimensional DCT coefficientsAlternatively, a specific frequency component of the DCT coefficient of the peripheral block or peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is generated as a set of several values used for the product-sum operation with the arithmetic coefficient. A set of valuesWhenCalculation coefficientStatistically minimize the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation withCalculation coefficientIs required for each class.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described, but before that, a decoding system compliant with MPEG will be briefly described.
[0019]
FIG. 1 shows an example of the configuration of an MPEG decoder that decodes encoded data encoded by, for example, the MPEG2 system in conformity with MPEG.
[0020]
Encoded data (video stream) obtained by encoding image data by the MPEG2 system is supplied to the
[0021]
The DCT coefficient extraction /
[0022]
The inverse
[0023]
In addition to the inverse DCT conversion result output from the inverse
[0024]
That is, in MPEG coding, an I-picture block is intra-coded, a P-picture block is intra-coded or forward-predicted, and a B-picture block is intra-coded or forward-predicted. Encoded, backward predictive encoded, or bi-directional predictive encoded.
[0025]
Here, in forward predictive coding, an image of a frame (or field) temporally preceding the frame (or field) of the block to be coded is used as a reference image, and the reference image is obtained by motion compensation. The difference between the prediction image of the block to be encoded and the block to be encoded is obtained, and the difference value (hereinafter referred to as a residual image as appropriate) is DCT transformed.
[0026]
Further, in backward predictive coding, a predicted image of a block to be encoded, which is obtained by performing motion compensation on the reference image using a frame image temporally following the frame of the block to be encoded as a reference image. And the difference from the block to be encoded are obtained, and the difference value (residual image) is DCT transformed.
[0027]
Furthermore, in bi-directional predictive coding, two frames (or fields) of a frame temporally preceding and following a frame of a block to be encoded are used as reference images, and the reference image is subjected to motion compensation. The obtained difference between the prediction image of the encoding target block and the encoding target block is obtained, and the difference value (residual image) is subjected to DCT transform.
[0028]
Therefore, when the block is non-intra coded (forward prediction coding, backward prediction coding, or bidirectional prediction coding), the inverse DCT transformation result output by the inverse
[0029]
On the other hand, when the block output from the inverse
[0030]
When the motion
[0031]
When the decoded image supplied from the motion
[0032]
The
[0033]
The decoded images arranged in the display order in this way are supplied to and displayed on a display (not shown), for example.
[0034]
On the other hand, the
[0035]
The prediction image stored in the
[0036]
The MPEG decoder in FIG. 1 requires a timing adjustment memory and a synchronization signal for absorbing the delay time in each block, but the illustration thereof is omitted. The same applies to image processing apparatuses and learning apparatuses described later.
[0037]
Next, FIG. 2 shows a configuration example of an embodiment of an image processing apparatus to which the present invention is applied. In the figure, portions corresponding to those in the MPEG decoder of FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted below as appropriate.
[0038]
The image processing apparatus in FIG. 2 includes a
[0039]
That is, the encoded data is supplied to the
[0040]
The preprocessing
[0041]
In other words, the
[0042]
Here, the block that is the object of decoding is hereinafter referred to as a target block as appropriate.
[0043]
Hereinafter, a block composed of pixel values will be referred to as a pixel block, and a block composed of DCT coefficients will be referred to as a DCT block.
[0044]
Further, hereinafter, the pixel block or the DCT block that is the target block is appropriately referred to as the target pixel block or the target DCT block, respectively.
[0045]
The
[0046]
The frequency domain motion
[0047]
Based on the CBP of the target macroblock, the frequency domain motion
[0048]
That is, when the target block is intra-coded, the DCT coefficient of the target block is obtained by DCT transforming a block of pixel values (pixel block). Uses the target block as it is as the target DCT block.
[0049]
When the target block is non-intra coded, the target block is obtained by DCT transforming a difference value (residual image) between a pixel value block (pixel block) and a predicted image. Therefore, the frequency domain motion
[0050]
The target DCT block obtained by the frequency domain motion
[0051]
The
[0052]
Here, since the DCT coefficients of the block stored in the
[0053]
The original image referred to here means an image obtained by adding the residual image and the predicted image, and is not the original image that is the target of the MPEG encoding.
[0054]
The
[0055]
That is, the one-dimensional inverse
[0056]
Here, hereinafter, the vertical one-dimensional DCT coefficient and the horizontal one-dimensional DCT coefficient are collectively referred to as a one-dimensional DCT coefficient.
[0057]
Further, the DCT coefficient included in the MPEG-encoded encoded data represents a spatial frequency component in two directions of the horizontal direction and the vertical direction. This is called a dimensional DCT coefficient.
[0058]
Furthermore, hereinafter, conversion from a pixel value to a two-dimensional DCT coefficient is referred to as two-dimensional DCT conversion, and conversion from a two-dimensional DCT coefficient to a pixel value is referred to as two-dimensional inverse DCT conversion, respectively. The DCT conversion performed by the
[0059]
The one-dimensional DCT coefficient obtained by the one-dimensional inverse
[0060]
The adjacent one-dimensional DCT coefficient selection /
[0061]
The AC
[0062]
The AC inner
[0063]
The class
[0064]
Here, the encoded data is, for example, color-encoded image data encoded by MPEG.
[0065]
Then, the one-dimensional inverse
[0066]
Further, the class
[0067]
The luminance class code for each pixel of the block of interest output from the
[0068]
The class
[0069]
The class
[0070]
The tap
[0071]
That is, the tap
[0072]
Further, the
[0073]
Then, the tap
[0074]
Further, the tap
[0075]
The image reconstruction unit 15 includes an
[0076]
That is, the
[0077]
The
[0078]
Here, as described above, the
[0079]
That is, in the adaptive processing, for example, the DCT coefficient is decoded into the original pixel value by obtaining the predicted value of the original pixel by linear combination of the DCT coefficient and a predetermined tap coefficient.
[0080]
Specifically, for example, the pixel value of the image is used as teacher data, and the image is subjected to DCT conversion in units of blocks, and further subjected to quantization and inverse quantization as student data. The predicted value E [y] of the pixel value y of the pixel that is the teacher data is converted into several DCT coefficients x.1, X2, ... and a predetermined tap coefficient w1, W2Consider a linear primary combination model defined by the linear combination of. In this case, the predicted value E [y] can be expressed by the following equation.
[0081]
[0082]
To generalize equation (1), tap coefficient wjA matrix W consisting ofijAnd a predicted value E [yj] Is a matrix Y ′ consisting of
[Expression 1]
Then, the following observation equation holds.
[0083]
XW = Y ′ (2)
[0084]
Here, the component x of the matrix XijIs a set of i-th student data (i-th teacher data yiThe j-th student data in the set of student data (prediction tap) used for prediction ofjRepresents a tap coefficient by which a product with the jth student data in the student data set is calculated. YiRepresents the i-th teacher data, and thus E [yi] Represents the predicted value of the i-th teacher data. Note that y on the left side of Equation (1) is the component y of the matrix Y.iThe suffix i is omitted, and x on the right side of Equation (1)1, X2,... Are also components x of the matrix XijThe suffix i is omitted.
[0085]
Consider that, for example, a least square method is applied to the observation equation of Expression (2) to obtain a predicted value E [y] close to the original pixel value y. In this case, a matrix Y composed of a set of true pixel values y serving as teacher data and a matrix E composed of a set of residuals e of predicted values E [y] for the pixel values y are
[Expression 2]
From the equation (2), the following residual equation is established.
[0086]
XW = Y + E (3)
[0087]
In this case, the tap coefficient w for obtaining the predicted value E [y] close to the original pixel value y.jIs the square error
[Equation 3]
Can be obtained by minimizing.
[0088]
Therefore, the above square error is converted to the tap coefficient w.jWhen the value differentiated by 0 is 0, that is, the tap coefficient w satisfying the following equation:jHowever, this is the optimum value for obtaining the predicted value E [y] close to the original pixel value y.
[0089]
[Expression 4]
... (4)
[0090]
Therefore, first, the equation (3) is changed to the tap coefficient w.jIs differentiated by the following equation.
[0091]
[Equation 5]
... (5)
[0092]
From equations (4) and (5), equation (6) is obtained.
[0093]
[Formula 6]
... (6)
[0094]
Furthermore, the student data x in the residual equation of equation (3)ij, Tap coefficient wj, Teacher data yiAnd residual eiConsidering this relationship, the following normal equation can be obtained from the equation (6).
[0095]
[Expression 7]
... (7)
[0096]
In addition, the normal equation shown in Expression (7) has a matrix (covariance matrix) A and a vector v,
[Equation 8]
And the vector W is defined as shown in
AW = v (8)
Can be expressed as
[0097]
Each normal equation in equation (7) is the student data xijAnd teacher data yiBy preparing a certain number of sets, a tap coefficient w to be obtainedjTherefore, by solving equation (8) with respect to vector W (however, to solve equation (8), matrix A in equation (8) is regular). Required), the optimal tap coefficient (here, the tap coefficient that minimizes the square error) wjCan be requested. In solving the equation (8), for example, a sweeping method (Gauss-Jordan elimination method) or the like can be used.
[0098]
As described above, the optimum tap coefficient, that is, the tap coefficient w that minimizes the statistical error of the predicted value of the pixel value.jAnd tap coefficient wjThe adaptive processing is to obtain the predicted value E [y] close to the original pixel value y by using the equation (1).
[0099]
As described above, when the pixel value of an image is used as teacher data, and the DCT coefficient obtained by performing DCT conversion on the block unit, and further performing quantization and inverse quantization is used as student data. Converts a DCT coefficient (a DCT coefficient obtained by performing DCT transform, quantization, and inverse quantization on a pixel value) to an original pixel value (predicted value thereof) by the linear prediction calculation of Expression (1). An optimum tap coefficient can be obtained. Since the DCT coefficient is data in the frequency domain, and the pixel value is a signal in the time domain, the adaptive process for converting the DCT coefficient into the pixel value using the tap coefficient as described above is performed with the frequency (Frequency). And the acronym of Time, it can be called FT conversion.
[0100]
Here, in the above case, the two-dimensional DCT transform is performed on the image, and the DCT coefficient obtained by further quantization and inverse quantization is used as the student data, and the tap coefficient is obtained using the original image as the teacher data. However, the tap coefficients are, for example, DCT coefficients obtained by subjecting the original image to two-dimensional DCT transform, further quantizing and dequantizing the DCT coefficients as student data, and obtaining two-dimensional DCT transform of the original image. It is also possible to obtain the coefficient as teacher data. In this case, it is possible to obtain an optimum tap coefficient for converting a DCT coefficient having a quantization error into a DCT coefficient having a quantization error (predicted value thereof).
[0101]
The tap coefficient is obtained by subjecting the original image to two-dimensional DCT transformation, and further obtaining the decoded image obtained by quantization, inverse quantization, and two-dimensional inverse DCT transformation as student data and the original image as teacher data. It is also possible to make it. In this case, it is possible to obtain an optimum tap coefficient for converting an image decoded by inverse quantization and two-dimensional inverse DCT transform into an original image (predicted value thereof).
[0102]
That is, according to the adaptive processing, arbitrary data conversion is performed depending on what kind of data is used as the teacher data and the student data (data corresponding to the student data is converted into data corresponding to the teacher data). An optimum tap coefficient can be obtained.
[0103]
Next, FIG. 3 shows a configuration example of the
[0104]
The
[0105]
In other words, the
[0106]
Here, a prediction image of 16 × 16 pixels having the same size as the macroblock is supplied from the motion compensation unit 4 (FIG. 2) to the
[0107]
The
[0108]
That is, the predicted image of 16 × 16 pixels stored in the
[0109]
Specifically, when the block of interest has a frame structure, the block of interest and the 16 × 16 pixel predicted image stored in the
[0110]
Therefore, when the target block is the upper left, lower left, upper right, or lower right block of the macro block (target macro block) as shown in FIG. 4A, the
[0111]
Here, in FIG. 4 (the same applies to FIG. 5 described later), a shaded line represents an odd line (top field), and a non-shadowed line represents an even line (bottom field). To express.
[0112]
On the other hand, when the block of interest has a field structure, the block of interest and the 16 × 16 pixel predicted image stored in the
[0113]
That is, in this case, as shown in FIG. 5A, the macro block including the target block (target macro block) is configured such that the upper 8 lines are odd lines (top field) and the lower 8 lines are even lines (bottom lines). Field).
[0114]
Therefore, when the target block is the upper left block of the target macro block, the 8 × 8 pixels of the target block are among the predicted images of 16 × 16 pixels stored in the
[0115]
Therefore, when the target block has a field structure, the
[0116]
The
[0117]
In the
[0118]
In FIG. 3, the frequency domain motion
[0119]
That is, the DCT
[0120]
When the target block is intra-coded, the two-dimensional DCT coefficient of the target block is a two-dimensional DCT transform of the original image of the target block, and thus the DCT
[0121]
When the block of interest is an intra-coded block, the
[0122]
Therefore, when the target block is intra-coded, that is, the two-dimensional DCT coefficient of the target block output from the DCT coefficient extraction / inverse quantization unit 2 (FIG. 2) represents the original image of the target block as 2. In the case of dimensional DCT transformation, the target block output from the DCT coefficient extraction / inverse quantization unit 2 (FIG. 2) is supplied to the buffer memory 12 (FIG. 2) as it is.
[0123]
On the other hand, when the block of interest is non-intra coded, the DCT
[0124]
Therefore, if the block of interest is non-intra coded and its CBP is 0, the DCT
[0125]
Further, the DCT
[0126]
The output of the DCT
[0127]
When the block of interest is non-intra coded, the adding
[0128]
When the target block is non-intra coded, the
[0129]
Accordingly, when the block of interest is non-intra coded and the CBP of the block of interest is 0, the image of the block of interest matches the predicted image, so the
[0130]
When the CBP of the block of interest is 1, the
[0131]
Then, in the
[0132]
In the pre-processing unit 11 (FIG. 2), the residual image and the predicted image are added in the frequency domain to obtain the two-dimensional DCT coefficient of the original image. The two-dimensional DCT coefficient of the prediction image and the two-dimensional DCT coefficient of the predicted image are added to obtain the two-dimensional DCT coefficient of the original image. This is because the
[0133]
Therefore, the two-dimensional DCT coefficient of the original image may be obtained by adding the residual image and the predicted image in the time domain and performing the two-dimensional DCT transform on the addition result.
[0134]
Next, processing of the one-dimensional inverse
[0135]
In an image encoding method using DCT conversion such as MPEG or JPEG (Joint Photographic Experts Group), image data is converted into two-dimensional DCT conversion (two-dimensional DCT conversion) / inverse DCT conversion (2 Dimensional inverse DCT transform) is performed.
[0136]
A pixel value in an 8 × 8 pixel block as shown in FIG. 6A is represented by a matrix X of 8 rows × 8 columns, and a DCT coefficient in an 8 × 8 block as shown in FIG. 6B is expressed as 8 rows × 8 columns. The two-dimensional DCT transformation / two-dimensional inverse DCT transformation can be represented by the following equation.
[0137]
CXCT= F ... (9)
CTFC = X (10)
[0138]
Here, the superscript T represents transposition. C is a DCT transformation matrix of 8 rows × 8 columns, and the component c of the (i + 1) th row and the (j + 1) th column.ijIs expressed by the following equation.
[0139]
cij= Ai× cos ((2j + 1) × i × π / 16) (11)
[0140]
However, in the equation (11), when i = 0, Ai= 1 / (2√2), and when i ≠ 0, Ai= 1/2. I and j are integer values ranging from 0 to 7.
[0141]
Equation (9) represents a two-dimensional DCT transformation that transforms the pixel value X into a two-dimensional DCT coefficient F, and Equation (10) represents a two-dimensional inverse DCT transformation that transforms the two-dimensional DCT coefficient F into a pixel value X. Represents.
[0142]
Therefore, according to Equation (10), the two-dimensional DCT coefficient F is calculated from the left side of the matrix CTIs applied to the pixel value X by applying the matrix C from the right side thereof. The one-dimensional inverse
[0143]
That is, the one-dimensional inverse
[0144]
The one-dimensional inverse
[0145]
In addition, when a two-dimensional DCT coefficient F of horizontal × vertical 8 × 8 is subjected to a vertical one-dimensional inverse DCT transform, eight sets (eight lines) of 8 × 1 horizontal one-dimensional DCT coefficients are obtained. (FIG. 6C). Further, when the two-dimensional DCT coefficient F is subjected to the horizontal one-dimensional inverse DCT transform, 8 sets (for eight columns) of 1 × 8 vertical one-dimensional DCT coefficients are obtained (FIG. 6D).
[0146]
Then, for an 8 × 1 horizontal one-dimensional DCT coefficient in a certain row, the DCT coefficient at the left end represents the direct current component (DC component) of the pixel values of the eight pixels in the row (average value of the pixel values of eight pixels). And the other seven DCT coefficients represent the horizontal AC component of the row. For a 1 × 8 vertical one-dimensional DCT coefficient in a certain column, the DCT coefficient in the uppermost row represents the DC component of the pixel value of the eight pixels in the column, and the other seven DCT coefficients are in the column. Represents the AC component in the vertical direction.
[0147]
Here, according to Equation (9), the horizontal one-dimensional DCT coefficient is a matrix C from the right side of the pixel value X corresponding to the two-dimensional DCT coefficient F.TIt can also be obtained by performing a horizontal one-dimensional DCT transform that applies. The vertical one-dimensional DCT coefficient can also be obtained by performing a vertical one-dimensional DCT transform that applies the matrix C from the left side to the pixel value X corresponding to the two-dimensional DCT coefficient F.
[0148]
FIG. 7 shows an actual image and a two-dimensional DCT coefficient, a horizontal one-dimensional DCT coefficient, and a vertical one-dimensional DCT coefficient for the image.
[0149]
FIG. 7 shows an 8 × 8 block image, a two-dimensional DCT coefficient, a horizontal one-dimensional DCT coefficient, and a vertical one-dimensional DCT coefficient for the image. 7A shows an actual image, FIG. 7B shows a two-dimensional DCT coefficient, FIG. 7C shows a horizontal one-dimensional DCT coefficient, and FIG. 7D shows a vertical one-dimensional DCT coefficient.
[0150]
Here, the image of FIG. 7A has an 8-bit pixel value, and the DCT coefficient obtained from such a pixel value can take a negative value. However, in the embodiment of FIGS. 7B to 7D, 128 (= 2) is obtained with respect to the obtained DCT coefficient.7), And when the added value is less than 0, it is clipped to 0, and when the added value is 256 or more, it is clipped to 255, so that DCT coefficients in the range of 0 to 255 are illustrated. is there.
[0151]
Since the information of the entire block of 8 × 8 pixels is reflected in the two-dimensional DCT coefficient, it is difficult to grasp local information such as information on specific pixels in the block from the two-dimensional DCT coefficient. It is. On the other hand, since the horizontal one-dimensional DCT coefficient or the vertical one-dimensional DCT coefficient reflects information of only one row or one column of the block, it is compared with the two-dimensional DCT coefficient. The local information of can be easily grasped.
[0152]
That is, the feature of a certain row of a block can be grasped from the 8 × 1 horizontal one-dimensional DCT coefficient of the row, and the feature of a certain column can be grasped from the 1 × 8 vertical one-dimensional DCT coefficient of the column. be able to. Furthermore, the characteristics of a pixel with a block can be grasped from the 8 × 1 horizontal one-dimensional DCT coefficient of the row where the pixel is located and the 1 × 8 vertical one-dimensional DCT coefficient of the column where the pixel is located. it can.
[0153]
In addition, for the state of the boundary between adjacent blocks on the left and right, a vertical one-dimensional DCT coefficient representing a spatial frequency component in the vertical direction of the boundary portion of the block is used rather than a two-dimensional DCT coefficient reflecting the information of the entire block. It is possible to grasp more accurately. Further, for the state of the boundary between adjacent blocks, a horizontal one-dimensional DCT coefficient representing a horizontal spatial frequency component of the boundary part of the block is used rather than a two-dimensional DCT coefficient reflecting the information of the entire block. It is possible to grasp more accurately.
[0154]
Next, as described above, the adjacent dimension DCT coefficient selection /
[0155]
However, in MPEG2, the frame structure and field structure can be selected in units of macroblocks. Therefore, the structure of the target macroblock including the target block and the macroblock adjacent to the target macroblock (hereinafter referred to as the adjacent macroblock as appropriate). Depending on the structure of the block, the one-dimensional DCT coefficient adjacent to the target block in the adjacent block adjacent to the target block is a one-dimensional DCT transform of the pixel column adjacent to the boundary of the target block in the spatial domain. There may not be.
[0156]
Therefore, the adjacent one-dimensional DCT coefficient selection /
[0157]
Here, referring to FIG. 8 to FIG. 23, when the structure of the target block is used as a reference, the pixel column of the adjacent block adjacent to the boundary of the target block in the spatial domain is one-dimensional DCT transformed. A one-dimensional DCT coefficient will be described.
[0158]
In FIG. 8 to FIG.NAnd attention macroblock MBNMacro blocks adjacent to the top, bottom, left, and right of eachU, MBD, MBL, MBRIt expresses.
[0159]
Furthermore, attention macroblock MBNThe upper left, lower left, upper right, and lower right blocks of BNUL, BNDL, BNUR, BNDRThe upper adjacent macroblock (the macroblock adjacent to the target block) MBUThe upper left, lower left, upper right, and lower right blocks of BUUL, BUDL, BUUR, BUDRIt expresses. Also, lower adjacent macroblock (macroblock adjacent below the target block) MBDThe upper left, lower left, upper right, and lower right blocks of BDUL, BDDL, BDUR, BDDRLeft adjacent macroblock (macroblock adjacent to the left of the target block) MBLThe upper left, lower left, upper right, and lower right blocks of BLUL, BLDL, BLUR, BLDRIt expresses. Furthermore, right adjacent macroblock (macroblock adjacent to the right of the target block) MBRThe upper left, lower left, upper right, and lower right blocks of BRUL, BRDL, BRUR, BRDRIt expresses.
[0160]
FIG. 8 shows an attention macroblock MBNBlock B in the upper left ofNULIs a block of interest, the block of interest B in the
[0161]
In FIG. 8, the shaded line is the target block B.NULRepresents the uppermost pixel column, and the hatched line represents the upper adjacent pixel column.
[0162]
Attention macroblock MBNBlock B in the upper left ofNULIs the target block, the adjacent block above is the target macroblock MBNIs not a block in the upper adjacent macroblock MBUBlock B at the lower left ofUDLTherefore, attention block BNULWhich pixel column the upper adjacent pixel column that is adjacent to the uppermost pixel column of is the target macroblock MBNAnd upper adjacent macroblock MBUBoth structures need to be considered.
[0163]
That is, attention macroblock MBNAnd upper adjacent macroblock MBUIf both of the DCT types are frame DCT, the target block BNULIs the
[0164]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the upper adjacent macroblock MBUIf the DCT type is field DCT, the target block BNULIs the
[0165]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIf the DCT type is frame DCT, the target block BNULIs the
[0166]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIf the DCT type is also a field DCT, the target block BNULIs the
[0167]
Next, FIG. 9 shows the attention macroblock MB.NBlock B in the upper left ofNULIs a block of interest, the block of interest B in the spatial domainNULA lower boundary of the pixel, that is, a pixel column of an adjacent block adjacent to the 8 pixels in the lowermost row (hereinafter referred to as a lower adjacent pixel column as appropriate).
[0168]
In FIG. 9, the shaded line is the target block B.NULThe lowermost row of pixels is represented by a hatched line and the lower adjacent pixel row is represented by a hatched line.
[0169]
Attention macroblock MBNBlock B in the upper left ofNULIs a target block, the adjacent block below is the target macroblock MBNBlock B in the lower left ofNDLTherefore, attention block BNULWhich pixel column is the lower adjacent pixel column adjacent to the lowermost pixel column of the bottom row of the target macroblock MBNOnly the structure of this should be considered.
[0170]
That is, attention macroblock MBNIf the DCT type is frame DCT, the target block BNULIs the
[0171]
Attention macroblock MBNIf the DCT type is field DCT, the target block BNULIs the
[0172]
Next, FIG. 10 shows the attention macroblock MB.NBlock B in the upper left ofNULIs a block of interest, the block of interest B in the
[0173]
In FIG. 10, the shaded line is the target block B.NULRepresents the leftmost pixel column, and the hatched line represents the left adjacent pixel column.
[0174]
Attention macroblock MBNBlock B in the upper left ofNULThe block adjacent to the left when is a target block is the target macroblock MBNLeft adjacent macroblock MB that is not a block inLBlock B in the upper right ofLURTherefore, attention block BNULThe left adjacent pixel column adjacent to the left of the leftmost pixel column of which is the pixel column to be determined is the target macroblock MBNAnd left adjacent macroblock MBLBoth structures need to be considered.
[0175]
That is, attention macroblock MBNAnd left adjacent macroblock MBUIf both of the DCT types are frame DCT, the target block BNULIs the
[0176]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the left adjacent macroblock MBLIf the DCT type is field DCT, the target block BNULIs the
[0177]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIf the DCT type is frame DCT, the target block BNULIs the
[0178]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIf the DCT type is also a field DCT, the target block BNULIs the
[0179]
Next, FIG. 11 shows the attention macroblock MB.NBlock B in the upper left ofNULIs a block of interest, the block of interest B in the spatial domainNULThe right side of the right side, that is, the pixel column of the adjacent block adjacent to the 8 pixels in the rightmost column (hereinafter referred to as the right adjacent pixel column as appropriate).
[0180]
In FIG. 11, the shaded line is the target block B.NULRepresents the rightmost pixel column, and the hatched line represents the right adjacent pixel column.
[0181]
Attention macroblock MBNBlock B in the upper left ofNULIs the attention block, the right adjacent block is the attention macroblock MBNBlock B in the upper right of theNURTherefore, attention block BNULThe right adjacent pixel column adjacent to the right of the rightmost pixel column is always a block.NURSince the 8 pixels in the leftmost column ofNAnd its attention macroblock MBNIt is not necessary to consider the structure of the macroblock adjacent to the.
[0182]
That is, attention macroblock MBNBlock B in the upper left ofNUL11 is the target block, as shown in FIG. 11, the rightmost column of 8 pixels (shaded part) is the target block B in the spatial domain.NULBlock B to the right ofNURAdjacent to the leftmost column of 8 pixels (hatched portion). Therefore, attention block BNULThe vertical one-dimensional DCT coefficient of the pixel column adjacent to the right side in the spatial domain (hereinafter, referred to as the right adjacent one-dimensional DCT coefficient as appropriate)NURThe vertical one-dimensional DCT coefficients are obtained by performing vertical one-dimensional DCT conversion on the 8 pixels in the leftmost column of the leftmost column.
[0183]
Next, FIG. 12 shows the attention macroblock MB.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDL, Ie, the pixel column (upper adjacent pixel column) of the adjacent block adjacent to the uppermost 8 pixels.
[0184]
In FIG. 12, the shaded line is the target block B.NDLRepresents the uppermost pixel column, and the hatched line represents the upper adjacent pixel column.
[0185]
Attention macroblock MBNBlock B at the lower left ofNDLIs the target block, the adjacent block above is the target macroblock MBNBlock B in the upper leftNULTherefore, attention block BNDLWhich pixel column the upper adjacent pixel column that is adjacent to the uppermost pixel column of is the target macroblock MBNOnly the structure of this should be considered.
[0186]
That is, attention macroblock MBNIf the DCT type is frame DCT, the target block BNDLIs the
[0187]
Attention macroblock MBNIf the DCT type is field DCT, the target block BNDLIs the
[0188]
Next, FIG. 13 shows the attention macroblock MB.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDLThe lower boundary, that is, a pixel column (lower adjacent pixel column) of an adjacent block adjacent to the 8 pixels in the lowermost row.
[0189]
In FIG. 13, the shaded line is the target block B.NDLThe lowermost row of pixels is represented by a hatched line and the lower adjacent pixel row is represented by a hatched line.
[0190]
Attention macroblock MBNBlock B at the lower left ofNDLIs a target block, the adjacent block below is the target macroblock MBNLower adjacent macroblock MB that is not a block inDBlock B in the upper left ofDULTherefore, attention block BNDLWhich pixel column is the lower adjacent pixel column adjacent to the lowermost pixel column of the bottom row of the target macroblock MBNAnd lower adjacent macroblock MBDBoth structures need to be considered.
[0191]
That is, attention macroblock MBNAnd lower adjacent macroblock MBDIf both of the DCT types are frame DCT, the target block BNDLIs the
[0192]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the lower adjacent macroblock MBDIf the DCT type is field DCT, the target block BNDLIs the
[0193]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is frame DCT, the target block BNDLIs the
[0194]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is also a field DCT, the target block BNDLIs the
[0195]
Next, FIG. 14 shows the attention macroblock MB.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDLThe left side of the left side, that is, the pixel column of the adjacent block adjacent to the 8 pixels in the leftmost column (left adjacent pixel column).
[0196]
In FIG. 14, the shaded line is the target block B.NDLRepresents the leftmost pixel column, and the hatched line represents the left adjacent pixel column.
[0197]
Attention macroblock MBNBlock B at the lower left ofNDLThe block adjacent to the left when is a target block is the target macroblock MBNLeft adjacent macroblock MB that is not a block inLBlock B on the lower right ofLDRTherefore, attention block BNDLThe left adjacent pixel column adjacent to the left of the leftmost pixel column of which is the pixel column to be determined is the target macroblock MBNAnd left adjacent macroblock MBLBoth structures need to be considered.
[0198]
That is, attention macroblock MBNAnd left adjacent macroblock MBLIf both of the DCT types are frame DCT, the target block BNDLIs the
[0199]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the left adjacent macroblock MBLIf the DCT type is field DCT, the target block BNDLIs the
[0200]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIf the DCT type is frame DCT, the target block BNDLIs the
[0201]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIf the DCT type is also a field DCT, the target block BNDLIs the
[0202]
Next, FIG. 15 shows the attention macroblock MB.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDLThe right side boundary, that is, the pixel column (right adjacent pixel column) of the adjacent block adjacent to the 8 pixels in the rightmost column.
[0203]
In FIG. 15, the shaded line is the target block B.NDLRepresents the rightmost pixel column, and the hatched line represents the right adjacent pixel column.
[0204]
Attention macroblock MBNBlock B at the lower left ofNDLIs the attention block, the right adjacent block is the attention macroblock MBNBlock B in the lower rightNDRTherefore, attention block BNDLThe right adjacent pixel column adjacent to the right of the rightmost pixel column is always a block.NDRSince the 8 pixels in the leftmost column ofNAnd its attention macroblock MBNIt is not necessary to consider the structure of the macroblock adjacent to the.
[0205]
That is, attention macroblock MBNBlock B at the lower left ofNDL15 is the target block, as shown in FIG. 15, the rightmost column of 8 pixels (shaded part) is the target block B in the spatial domain.NDLBlock B to the right ofNDRAdjacent to the leftmost column of 8 pixels (hatched portion). Therefore, attention block BNDLThe right adjacent 1D DCT coefficient for the vertical 1D DCT coefficient in the rightmost column ofNDRThe vertical one-dimensional DCT coefficients are obtained by performing vertical one-dimensional DCT conversion on the 8 pixels in the leftmost column of the leftmost column.
[0206]
FIG. 16 shows an attention macroblock MBNBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNUR, Ie, the pixel column (upper adjacent pixel column) of the adjacent block adjacent to the uppermost 8 pixels.
[0207]
In FIG. 16, the shaded line is the target block B.NURRepresents the uppermost pixel column, and the hatched line represents the upper adjacent pixel column.
[0208]
Attention macroblock MBNBlock B in the upper right ofNURIs the target block, the adjacent block above is the target macroblock MBNIs not a block in the upper adjacent macroblock MBUBlock B on the lower right ofUDRTherefore, attention block BNURWhich pixel column the upper adjacent pixel column that is adjacent to the uppermost pixel column of is the target macroblock MBNAnd upper adjacent macroblock MBUBoth structures need to be considered.
[0209]
That is, attention macroblock MBNAnd upper adjacent macroblock MBUIf both of the DCT types are frame DCT, the target block BNURIs the
[0210]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the upper adjacent macroblock MBUIf the DCT type is field DCT, the target block BNURIs the
[0211]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIf the DCT type is frame DCT, the target block BNURIs the
[0212]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIf the DCT type is also a field DCT, the target block BNURIs the
[0213]
Next, FIG. 17 shows the attention macroblock MB.NBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNURThe lower boundary, that is, a pixel column (lower adjacent pixel column) of an adjacent block adjacent to the 8 pixels in the lowermost row.
[0214]
In FIG. 17, the shaded line is the target block B.NURThe lowermost row of pixels is represented by a hatched line and the lower adjacent pixel row is represented by a hatched line.
[0215]
Attention macroblock MBNBlock B in the upper right ofNURIs a target block, the adjacent block below is the target macroblock MBNBlock B in the lower rightNDRTherefore, attention block BNURWhich pixel column is the lower adjacent pixel column adjacent to the lowermost pixel column of the bottom row of the target macroblock MBNOnly the structure of this should be considered.
[0216]
That is, attention macroblock MBNIf the DCT type is frame DCT, the target block BNURIs the
[0217]
Attention macroblock MBNIf the DCT type is field DCT, the target block BNURIs the
[0218]
Next, FIG. 18 shows the attention macroblock MB.NBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNURThe left side of the left side, that is, the pixel column of the adjacent block adjacent to the 8 pixels in the leftmost column (left adjacent pixel column).
[0219]
In FIG. 18, the shaded line is the target block B.NURRepresents the leftmost pixel column, and the hatched line represents the left adjacent pixel column.
[0220]
Attention macroblock MBNBlock B in the upper right ofNURThe block adjacent to the left when is a target block is the target macroblock MBNBlock B in the upper leftNULTherefore, attention block BNURThe left adjacent pixel column adjacent to the left of the leftmost pixel column is always a block BNULSince it becomes 8 pixels in the rightmost column ofNAnd its attention macroblock MBNIt is not necessary to consider the structure of the macroblock adjacent to the.
[0221]
That is, attention macroblock MBNBlock B in the upper right ofNUR18 is the target block, as shown in FIG. 18, the leftmost column of eight pixels (shaded part) is the target block B in the spatial domain.NURBlock B next to the leftNULAdjacent to the rightmost 8 pixels (the hatched portion). Therefore, attention block BNURThe left adjacent one-dimensional DCT coefficient for the vertical one-dimensional DCT coefficient in the leftmost column ofNULThe vertical one-dimensional DCT coefficients are obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column of the above.
[0222]
Next, FIG. 19 shows the attention macroblock MB.NBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNURThe right side boundary, that is, the pixel column (right adjacent pixel column) of the adjacent block adjacent to the 8 pixels in the rightmost column.
[0223]
In FIG. 19, the shaded line is the target block B.NURRepresents the rightmost pixel column, and the hatched line represents the right adjacent pixel column.
[0224]
Attention macroblock MBNBlock B in the upper right ofNURIs the attention block, the right adjacent block is the attention macroblock MBNRight adjacent macroblock MB that is not a block inRBlock B in the upper left ofRULTherefore, attention block BNURWhich pixel column the right adjacent pixel column adjacent to the right of the rightmost pixel column of is the macro block MB of interestNAnd right adjacent macroblock MBRBoth structures need to be considered.
[0225]
That is, attention macroblock MBNAnd right adjacent macroblock MBRIf both of the DCT types are frame DCT, the target block BNURIs the
[0226]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the right adjacent macroblock MBRIf the DCT type is field DCT, the target block BNURIs the
[0227]
Attention macroblock MBNThe DCT type is field DCT and the right adjacent macroblock MBRIf the DCT type is frame DCT, the target block BNURIs the
[0228]
Attention macroblock MBNThe DCT type is field DCT and the right adjacent macroblock MBRIf the DCT type is also a field DCT, the target block BNURIs the
[0229]
Next, FIG. 20 shows the attention macroblock MB.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDR, Ie, the pixel column (upper adjacent pixel column) of the adjacent block adjacent to the uppermost 8 pixels.
[0230]
In FIG. 20, the shaded line is the target block B.NDRRepresents the uppermost pixel column, and the hatched line represents the upper adjacent pixel column.
[0231]
Attention macroblock MBNBlock B on the lower right ofNDRIs the target block, the adjacent block above is the target macroblock MBNBlock B in the upper right of theNURTherefore, attention block BNDRWhich pixel column the upper adjacent pixel column that is adjacent to the uppermost pixel column of is the target macroblock MBNOnly the structure of this should be considered.
[0232]
That is, attention macroblock MBNIf the DCT type is frame DCT, the target block BNDRIs the
[0233]
Attention macroblock MBNIf the DCT type is field DCT, the target block BNDRIs the
[0234]
Next, FIG. 21 shows an attention macroblock MB.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDRThe lower boundary, that is, a pixel column (lower adjacent pixel column) of an adjacent block adjacent to the 8 pixels in the lowermost row.
[0235]
In FIG. 21, the shaded line is the target block B.NDRThe lowermost row of pixels is represented by a hatched line and the lower adjacent pixel row is represented by a hatched line.
[0236]
Attention macroblock MBNBlock B on the lower right ofNDRIs a target block, the adjacent block below is the target macroblock MBNLower adjacent macroblock MB that is not a block inDBlock B in the upper right ofDURTherefore, attention block BNDRWhich pixel column is the lower adjacent pixel column adjacent to the lowermost pixel column of the bottom row of the target macroblock MBNAnd lower adjacent macroblock MBDBoth structures need to be considered.
[0237]
That is, attention macroblock MBNAnd lower adjacent macroblock MBDIf both of the DCT types are frame DCT, the target block BNDRIs the
[0238]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the lower adjacent macroblock MBDIf the DCT type is field DCT, the target block BNDRIs the
[0239]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is frame DCT, the target block BNDRIs the
[0240]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is also a field DCT, the target block BNDRIs the
[0241]
Next, FIG. 22 shows a macro block MB of interest.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDRThe left side of the left side, that is, the pixel column of the adjacent block adjacent to the 8 pixels in the leftmost column (left adjacent pixel column).
[0242]
In FIG. 22, the shaded line is the target block B.NDRRepresents the leftmost pixel column, and the hatched line represents the left adjacent pixel column.
[0243]
Attention macroblock MBNBlock B on the lower right ofNDRThe block adjacent to the left when is a target block is the target macroblock MBNBlock B in the lower left ofNDLTherefore, attention block BNDRThe left adjacent pixel column adjacent to the left of the leftmost pixel column is always a blockNDLSince it becomes 8 pixels in the rightmost column ofNAnd its attention macroblock MBNIt is not necessary to consider the structure of the macroblock adjacent to the.
[0244]
That is, attention macroblock MBNBlock B on the lower right ofNDR22 is the target block, as shown in FIG. 22, the leftmost column of eight pixels (shaded portion) is the target block B in the spatial domain.NDRBlock B next to the leftNDLAdjacent to the rightmost 8 pixels (the hatched portion). Therefore, attention block BNDRThe left adjacent one-dimensional DCT coefficient for the vertical one-dimensional DCT coefficient in the leftmost column ofNDLThe vertical one-dimensional DCT coefficients are obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column of the above.
[0245]
Next, FIG. 23 shows the attention macroblock MB.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDRThe right side boundary, that is, the pixel column (right adjacent pixel column) of the adjacent block adjacent to the 8 pixels in the rightmost column.
[0246]
In FIG. 23, the shaded line is the target block B.NDRRepresents the rightmost pixel column, and the hatched line represents the right adjacent pixel column.
[0247]
Attention macroblock MBNBlock B on the lower right ofNDRIs the attention block, the right adjacent block is the attention macroblock MBNRight adjacent macroblock MB that is not a block inRBlock B on the lower right ofRDLTherefore, attention block BNDRWhich pixel column the right adjacent pixel column adjacent to the right of the rightmost pixel column of is the macro block MB of interestNAnd right adjacent macroblock MBRBoth structures need to be considered.
[0248]
That is, attention macroblock MBNAnd right adjacent macroblock MBRIf both of the DCT types are frame DCT, the target block BNDRIs the
[0249]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the right adjacent macroblock MBRIf the DCT type is field DCT, the target block BNDRIs the
[0250]
Attention macroblock MBNThe DCT type is field DCT and the right adjacent macroblock MBRIf the DCT type is frame DCT, the target block BNDRIs the
[0251]
Attention macroblock MBNIf the DCT type of the current adjacent macroblock MBR is the field DCT and the DCT type of the right adjacent macroblock MBR is also the field DCT, the target block BNDRIs the
[0252]
Next, FIG. 24 shows adjacent one-dimensional DCT coefficients (upper adjacent one-dimensional DCT coefficient, lower adjacent one-dimensional DCT coefficient, left adjacent one-dimensional DCT coefficient, and right) for the block of interest as described in FIGS. 3 shows a configuration example of the adjacent one-dimensional DCT coefficient selection /
[0253]
In the adjacent one-dimensional DCT coefficient selection /
[0254]
The
[0255]
The
[0256]
The vertical one-dimensional inverse
[0257]
The
[0258]
The vertical one-dimensional
[0259]
The
[0260]
Next, processing of the adjacent one-dimensional DCT coefficient selection / conversion unit 32 (adjacent one-dimensional DCT coefficient selection / conversion processing) in FIG. 24 will be described with reference to the flowchart of FIG.
[0261]
The
[0262]
In step S1, the
[0263]
Note that the processing shown in the flowchart of FIG. 25 is performed each time the block of interest is changed, for example.
[0264]
Next, the upper left block process in step S2 of FIG. 25 will be described with reference to the flowchart of FIG.
[0265]
In the upper left block processing, the upper left block B of the target macro blockNUL, An upper adjacent one-dimensional DCT coefficient, a lower adjacent one-dimensional DCT coefficient, a left adjacent one-dimensional DCT coefficient, and a right adjacent one-dimensional DCT coefficient are acquired.
[0266]
That is, in the upper left block process, first, in step S11, the
[0267]
If it is determined in step S11 that both the DCT type of the target macroblock and the upper adjacent macroblock are frame DCTs, the process proceeds to step S12, and the
[0268]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock and the upper adjacent macroblock both have a frame structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG.UBlock B at the lower left ofUDL8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the bottom row in FIG.UDLThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUDLThe horizontal one-dimensional DCT coefficients of the eighth row are stored in the
[0269]
If it is determined in step S11 that the DCT type of the target macroblock is the frame DCT and the DCT type of the upper adjacent macroblock is the field DCT, the process proceeds to step S13, and the
[0270]
That is, the target block is the block B at the upper left of the target macro block.NUL, When the target macroblock has a frame structure and the upper adjacent macroblock has a field structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described in FIG. 8B.UBlock B at the lower left ofUDL8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the bottom row in FIG.UDLThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUDLThe horizontal one-dimensional DCT coefficients of the eighth row are stored in the
[0271]
If it is determined in step S11 that the DCT type of the target macroblock is the field DCT and the DCT type of the upper adjacent macroblock is the frame DCT, the process proceeds to step S14, and the
[0272]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock has a field structure and the upper adjacent macroblock has a frame structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG. 8C.ULower left block BUDLAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT conversion on the eight pixels in the seventh row.UDLThis is the horizontal one-dimensional DCT coefficient of the seventh row. Block BUDLThe horizontal one-dimensional DCT coefficients of the seventh row are stored in the
[0273]
If it is determined in step S11 that the DCT type of the target macroblock and the upper adjacent macroblock are both field DCTs, the process proceeds to step S15, and the
[0274]
That is, the target block is the block B at the upper left of the target macro block.NULWhen both the target macroblock and the upper adjacent macroblock have a field structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG. 8D.UBlock B in the upper left ofUULAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the bottom row ofUULThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUULThe horizontal one-dimensional DCT coefficients of the eighth row are stored in the
[0275]
After the processes in steps S12 to S15, the process proceeds to step S16, and the
[0276]
When it is determined in step S16 that the DCT type of the target macroblock is the frame DCT, the process proceeds to step S17, and the
[0277]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock has a frame structure, the lower adjacent one-dimensional DCT coefficient is the target macroblock MB as described with reference to FIG. 9A.NBlock B at the lower left ofNDLAre the horizontal one-dimensional DCT coefficients obtained by horizontal one-dimensional DCT conversion of the eight pixels in the top row ofNDLIs the horizontal one-dimensional DCT coefficient of the first row. Block BNDLThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0278]
If it is determined in step S16 that the DCT type of the target macroblock is the field DCT, the process proceeds to step S18, and the
[0279]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock has a field structure, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 9B.DBlock B in the upper left ofDULAre the horizontal one-dimensional DCT coefficients obtained by horizontal one-dimensional DCT conversion of the eight pixels in the top row ofDULIs the horizontal one-dimensional DCT coefficient of the first row. Block BDULThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0280]
After the processing in steps S17 and S18, the process proceeds to step S19, and the
[0281]
If it is determined in step S19 that the DCT type of the target macroblock and the left adjacent macroblock are both frame DCTs, the process proceeds to step S20, and the
[0282]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock and the left adjacent macroblock are both frame structures, the left adjacent one-dimensional DCT coefficient is the left adjacent macroblock MB as described with reference to FIG. 10A.LBlock B in the upper right ofLURAre the vertical one-dimensional DCT coefficients obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column ofLURAre the vertical one-dimensional DCT coefficients in the eighth column (the eighth column from the left). Block BLURThe vertical one-dimensional DCT coefficients of the eighth column are stored in the
[0283]
If it is determined in step S19 that the DCT type of the target macroblock is the frame DCT and the DCT type of the left adjacent macroblock is the field DCT, the process proceeds to steps S21 to S23 in sequence, and the
[0284]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock has a frame structure and the left adjacent macroblock has a field structure, the left adjacent one-dimensional DCT coefficient is equal to the left adjacent macroblock MB as described with reference to FIG. 10B.LBlock B in the upper right ofLURThe upper four pixels in the rightmost column and the lower right block BLDRA vertical one-dimensional DCT coefficient obtained by vertical one-dimensional DCT conversion of a total of eight pixels in the upper four pixels in the rightmost column in FIG. 6 does not exist in the
[0285]
Therefore, the
[0286]
In response to a request from the
[0287]
In step S <b> 22, the
[0288]
When the vertical one-dimensional
[0289]
If it is determined in step S19 that the DCT type of the target macroblock is the field DCT and the DCT type of the left adjacent macroblock is the frame DCT, the process proceeds to steps S24 to S26 sequentially. As described in 10C, the left adjacent macroblock MBLBlock B in the upper right ofLUR4 pixels in the odd-numbered row in the rightmost column and the lower right block BLDRA vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT conversion on a total of eight pixels of the odd-numbered four pixels is obtained as a left adjacent one-dimensional DCT coefficient.
[0290]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock has a field structure and the left adjacent macroblock has a frame structure, the left adjacent one-dimensional DCT coefficient is equal to the left adjacent macroblock MB as described in FIG. 10C.LBlock B in the upper right ofLUR4 pixels in the odd-numbered row in the rightmost column and the lower right block BLDRThe vertical one-dimensional DCT coefficient obtained by vertical one-dimensional DCT conversion of a total of eight pixels of the odd-numbered four pixels in FIG.
[0291]
Therefore, the
[0292]
In response to a request from the
[0293]
In step S25, the
[0294]
When the vertical one-dimensional
[0295]
If it is determined in step S19 that the DCT type of the target macroblock and the left adjacent macroblock are both field DCTs, the process proceeds to step S27, and the
[0296]
That is, the target block is the block B at the upper left of the target macro block.NULIn the case where the target macroblock and the left adjacent macroblock both have a field structure, the left adjacent one-dimensional DCT coefficient is the left adjacent macroblock MB as described with reference to FIG. 10D.LBlock B in the upper right ofLURAre the vertical one-dimensional DCT coefficients obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column ofLURAre the vertical one-dimensional DCT coefficients of the eighth column. Block BLURThe vertical one-dimensional DCT coefficients of the eighth column are stored in the
[0297]
After the processing of steps S20, S23, S26, and S27, all proceed to step S28, and the
[0298]
That is, the target block is the block B at the upper left of the target macro block.NUL, The right adjacent one-dimensional DCT coefficient is equal to the target block B as described in FIG.NULBlock B to the right ofNURIs a vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the leftmost column ofNURIs the vertical one-dimensional DCT coefficient of the first column. Block BNURThe vertical one-dimensional DCT coefficients of the first column are stored in the
[0299]
Next, the lower left block process in step S3 of FIG. 25 will be described with reference to the flowchart of FIG.
[0300]
In the lower left block processing, the lower left block B of the target macro blockNDL, An upper adjacent one-dimensional DCT coefficient, a lower adjacent one-dimensional DCT coefficient, a left adjacent one-dimensional DCT coefficient, and a right adjacent one-dimensional DCT coefficient are acquired.
[0301]
That is, in the lower left block process, first, in step S31, the
[0302]
If it is determined in step S31 that the DCT type of the target macroblock is the frame DCT, the process proceeds to step S32, and the
[0303]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock has a frame structure, the upper adjacent one-dimensional DCT coefficient is equal to the target macroblock MB as described with reference to FIG.NBlock B in the upper left ofNULAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the bottom row ofNULThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BNULThe horizontal one-dimensional DCT coefficients of the eighth row are stored in the
[0304]
If it is determined in step S31 that the DCT type of the target macroblock is field DCT, the process proceeds to step S33, and the
[0305]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the macro block of interest has a field structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macro block MB as described with reference to FIG.UBlock B at the lower left ofUDLAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the bottom row ofUDLThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUDLThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0306]
After the processing of steps S32 and S33, both proceed to step S34, and the
[0307]
If it is determined in step S34 that the DCT type of the target macroblock and the lower adjacent macroblock are both frame DCT, the process proceeds to step S35, and the
[0308]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock and the lower adjacent macroblock are both frame structures, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 13A.DBlock B in the upper left ofDUL8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the top row in FIG.DULIs the horizontal one-dimensional DCT coefficient of the first row. Block BDULThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0309]
If it is determined in step S34 that the DCT type of the target macroblock is the frame DCT and the DCT type of the lower adjacent macroblock is the field DCT, the process proceeds to step S36, and the
[0310]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock has a frame structure and the lower adjacent macroblock has a field structure, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described in FIG. 13B.DBlock B in the upper left ofDUL8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the bottom row in FIG.DULIs the horizontal one-dimensional DCT coefficient of the first row. Block BDULThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0311]
If it is determined in step S34 that the DCT type of the target macroblock is the field DCT and the DCT type of the lower adjacent macroblock is the frame DCT, the process proceeds to step S37, and the
[0312]
That is, the target block is the lower left block B of the target macro block.NDLIf the target macroblock has a field structure and the lower adjacent macroblock has a frame structure, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 13C.DBlock B in the upper left ofDULAre horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the second row of the second row.DULIs the horizontal one-dimensional DCT coefficient of the second row. Block BDULThe horizontal one-dimensional DCT coefficients of the second row are stored in the
[0313]
If it is determined in step S34 that the DCT type of the target macroblock and the lower adjacent macroblock are both field DCTs, the process proceeds to step S38, and the
[0314]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock and the lower adjacent macroblock are both field structures, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 13D.DBlock B at the lower left ofDDLAre the horizontal one-dimensional DCT coefficients obtained by horizontal one-dimensional DCT conversion of the eight pixels in the top row ofDDLIs the horizontal one-dimensional DCT coefficient of the first row. Block BDDLThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0315]
After the processing of steps S35 to S38, the process proceeds to step S39, and the
[0316]
If it is determined in step S39 that the DCT type of the target macroblock and the left adjacent macroblock are both frame DCT, the process proceeds to step S40, and the
[0317]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock and the left adjacent macroblock both have a frame structure, the left adjacent one-dimensional DCT coefficient is, as described with reference to FIG. 14A, the left adjacent macroblock MB.LBlock B on the lower right ofLDRAre the vertical one-dimensional DCT coefficients obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column ofLDRAre the vertical one-dimensional DCT coefficients of the eighth column. Block BLDRThe vertical one-dimensional DCT coefficients of the eighth column are stored in the
[0318]
If it is determined in step S39 that the DCT type of the target macroblock is the frame DCT and the DCT type of the left adjacent macroblock is the field DCT, the process proceeds to steps S41 to S43 in sequence, and the
[0319]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock has a frame structure and the left adjacent macroblock has a field structure, the left adjacent one-dimensional DCT coefficient is the left adjacent macroblock MB as described with reference to FIG. 14B.LBlock B in the upper right ofLURThe upper four pixels in the rightmost column and the lower right block BLDRA vertical one-dimensional DCT coefficient obtained by vertical one-dimensional DCT conversion of a total of eight pixels in the upper four pixels in the rightmost column in FIG. 6 does not exist in the
[0320]
Therefore, the
[0321]
In response to a request from the
[0322]
In step S42, the
[0323]
When the vertical one-dimensional
[0324]
If it is determined in step S39 that the DCT type of the target macroblock is the field DCT and the DCT type of the left adjacent macroblock is the frame DCT, the process proceeds to steps S44 to S46 in sequence, and the
[0325]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock has a field structure and the left adjacent macroblock has a frame structure, the left adjacent one-dimensional DCT coefficient is equal to the left adjacent macroblock MB as described with reference to FIG. 14C.LBlock B in the upper right ofLUR4 pixels in the even-numbered row in the rightmost column and the lower right block BLDRThe vertical one-dimensional DCT coefficient obtained by vertical one-dimensional DCT conversion of a total of eight pixels of the four pixels in the even-numbered row in FIG.
[0326]
Therefore, the
[0327]
In response to a request from the
[0328]
In step S45, the
[0329]
When the vertical one-dimensional
[0330]
If it is determined in step S39 that the DCT type of the target macroblock and the left adjacent macroblock are both field DCTs, the process proceeds to step S47, and the
[0331]
That is, the target block is the lower left block B of the target macro block.NDLIn the case where the target macroblock and the left adjacent macroblock both have a field structure, the left adjacent one-dimensional DCT coefficient is, as described with reference to FIG.LBlock B on the lower right ofLDRAre the vertical one-dimensional DCT coefficients obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column ofLDRAre the vertical one-dimensional DCT coefficients of the eighth column. Block BLDRThe eighth column vertical one-dimensional DCT coefficients are stored in the
[0332]
After the processing of steps S40, S43, S46, and S47, all proceed to step S48, and the
[0333]
That is, the target block is the lower left block B of the target macro block.NDL, The right adjacent one-dimensional DCT coefficient is equal to the target block B as described in FIG.NDLBlock B to the right ofNDRIs a vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the leftmost column ofNDRIs the vertical one-dimensional DCT coefficient of the first column. Block BNDRThe vertical one-dimensional DCT coefficients of the first column are stored in the
[0334]
Next, the upper right block process in step S4 of FIG. 25 will be described with reference to the flowchart of FIG.
[0335]
In the upper right block processing, the upper right block B of the target macro blockNUR, An upper adjacent one-dimensional DCT coefficient, a lower adjacent one-dimensional DCT coefficient, a left adjacent one-dimensional DCT coefficient, and a right adjacent one-dimensional DCT coefficient are acquired.
[0336]
That is, in the upper right block process, first, in step S51, the
[0337]
When it is determined in step S51 that the DCT type of the target macroblock and the upper adjacent macroblock are both frame DCT, the process proceeds to step S52, and the
[0338]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock and the upper adjacent macroblock both have a frame structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG. 16A.UBlock B on the lower right ofUDR8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the bottom row in FIG.UDRThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUDRThe horizontal one-dimensional DCT coefficients of the eighth row are stored in the
[0339]
If it is determined in step S51 that the DCT type of the target macroblock is the frame DCT and the DCT type of the upper adjacent macroblock is the field DCT, the process proceeds to step S53, and the
[0340]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock has a frame structure and the upper adjacent macroblock has a field structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG.UBlock B on the lower right ofUDR8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the bottom row in FIG.UDRThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUDRThe horizontal one-dimensional DCT coefficients of the eighth row are stored in the
[0341]
If it is determined in step S51 that the DCT type of the target macroblock is the field DCT and the DCT type of the upper adjacent macroblock is the frame DCT, the process proceeds to step S54, and the
[0342]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock has a field structure and the upper adjacent macroblock has a frame structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG.UBlock B on the lower right ofUDRAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT conversion on the eight pixels in the seventh row.UDRThis is the horizontal one-dimensional DCT coefficient of the seventh row. Block BUDRThe horizontal one-dimensional DCT coefficients of the seventh row are stored in the
[0343]
If it is determined in step S51 that the DCT type of the target macroblock and the upper adjacent macroblock are both field DCTs, the process proceeds to step S55, and the
[0344]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock and the upper adjacent macroblock both have a field structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG. 16D.UBlock B in the upper right ofUURAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the bottom row ofUULThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUURThe horizontal one-dimensional DCT coefficient of the eighth row is stored in the
[0345]
After the processes in steps S52 to S55, the process proceeds to step S56, and the
[0346]
If it is determined in step S56 that the DCT type of the target macroblock is the frame DCT, the process proceeds to step S57, and the
[0347]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock has a frame structure, the lower adjacent one-dimensional DCT coefficient is the target macroblock MB as described with reference to FIG. 17A.NBlock B on the lower right ofNDRAre the horizontal one-dimensional DCT coefficients obtained by horizontal one-dimensional DCT conversion of the eight pixels in the top row ofNDRIs the horizontal one-dimensional DCT coefficient of the first row. Block BNDRThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0348]
If it is determined in step S56 that the DCT type of the target macroblock is the field DCT, the process proceeds to step S58, and the
[0349]
That is, the target block is the block B at the upper right of the target macro block.NUR, When the target macroblock has a field structure, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 17B.DBlock B in the upper right ofDURAre the horizontal one-dimensional DCT coefficients obtained by horizontal one-dimensional DCT conversion of the eight pixels in the top row ofDURIs the horizontal one-dimensional DCT coefficient of the first row. Block BDURThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0350]
After the processes of steps S57 and S58, the process proceeds to step S59, and the
[0351]
If it is determined in step S59 that the DCT type of the target macroblock and the right adjacent macroblock are both frame DCT, the process proceeds to step S60, and the
[0352]
That is, the target block is the block B at the upper right of the target macro block.NURWhen the target macroblock and the right adjacent macroblock both have a frame structure, the right adjacent one-dimensional DCT coefficient is the right adjacent macroblock MB as described with reference to FIG. 19A.RBlock B in the upper left ofRULIs a vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the leftmost column ofRULIs the vertical one-dimensional DCT coefficient of the first column. Block BRULThe vertical one-dimensional DCT coefficients of the first column are stored in the
[0353]
If it is determined in step S59 that the DCT type of the target macroblock is the frame DCT and the DCT type of the right adjacent macroblock is the field DCT, the process proceeds to steps S61 to S63 sequentially. As described in 19B, right adjacent macroblock MBRBlock B in the upper left ofRULThe top four pixels in the leftmost column and the lower left block BRDLA vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT transformation on a total of eight pixels in the upper four pixels in the leftmost column is acquired as a right adjacent one-dimensional DCT coefficient.
[0354]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock has a frame structure and the right adjacent macroblock has a field structure, the right adjacent one-dimensional DCT coefficient is the right adjacent macroblock MB as described with reference to FIG. 19B.RBlock B in the upper left ofRULThe top four pixels in the leftmost column and the lower left block BRDLA vertical one-dimensional DCT coefficient obtained by vertical one-dimensional DCT conversion of a total of eight pixels in the upper four pixels in the leftmost column is not present in the
[0355]
Therefore, the
[0356]
In response to a request from the
[0357]
In step S62, the
[0358]
When the vertical one-dimensional
[0359]
If it is determined in step S59 that the DCT type of the target macroblock is the field DCT and the DCT type of the right adjacent macroblock is the frame DCT, the process proceeds to steps S64 to S66 sequentially. As described in 19C, right adjacent macroblock MBRBlock B in the upper left ofRUL4 pixels in the odd-numbered row in the leftmost column and the lower left block BRDLA vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT conversion on a total of eight pixels of the odd-numbered four pixels is obtained as a right adjacent one-dimensional DCT coefficient.
[0360]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock has a field structure and the right adjacent macroblock has a frame structure, the right adjacent one-dimensional DCT coefficient is the right adjacent macroblock MB as described with reference to FIG. 19C.LBlock B in the upper left ofRUL4 pixels in the odd-numbered row in the leftmost column and the lower left block BRDLThe vertical one-dimensional DCT coefficient obtained by vertical one-dimensional DCT conversion of a total of eight pixels of the odd-numbered four pixels in FIG.
[0361]
Therefore, the
[0362]
In response to a request from the
[0363]
In step S65, the
[0364]
When the vertical one-dimensional
[0365]
If it is determined in step S59 that the DCT type of the target macroblock and the right adjacent macroblock are both field DCTs, the process proceeds to step S67, and the
[0366]
That is, the target block is the block B at the upper right of the target macro block.NURIn the case where the target macroblock and the right adjacent macroblock both have a field structure, the right adjacent one-dimensional DCT coefficient is, as described with reference to FIG. 19D, the right adjacent macroblock MB.RBlock B in the upper left ofRULIs a vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the leftmost column ofRULIs the vertical one-dimensional DCT coefficient of the first column. Block BRULThe vertical one-dimensional DCT coefficients of the first column are stored in the
[0367]
After the processing of steps S60, S63, S66, and S67, all proceed to step S68, and the
[0368]
That is, the target block is the block B at the upper right of the target macro block.NUR, The left adjacent one-dimensional DCT coefficient is the target block B as described with reference to FIG.NURBlock B next to the leftNULAre the vertical one-dimensional DCT coefficients obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column ofNULAre the vertical one-dimensional DCT coefficients of the eighth column. Block BNURThe vertical one-dimensional DCT coefficients of the eighth column are stored in the
[0369]
Next, the lower right block process in step S5 of FIG. 25 will be described with reference to the flowchart of FIG.
[0370]
In the lower right block processing, the lower right block B of the target macro blockNDR, An upper adjacent one-dimensional DCT coefficient, a lower adjacent one-dimensional DCT coefficient, a left adjacent one-dimensional DCT coefficient, and a right adjacent one-dimensional DCT coefficient are acquired.
[0371]
That is, in the lower right block process, first, in step S71, the
[0372]
When it is determined in step S71 that the DCT type of the target macroblock is the frame DCT, the process proceeds to step S72, and the
[0373]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock has a frame structure, the upper adjacent one-dimensional DCT coefficient is equal to the target macroblock MB as described with reference to FIG.NBlock B in the upper right ofNURAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the bottom row ofNURThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BNURThe horizontal one-dimensional DCT coefficients of the eighth row are stored in the
[0374]
If it is determined in step S71 that the DCT type of the target macroblock is the field DCT, the process proceeds to step S73, and the
[0375]
That is, the target block is the lower right block B of the target macro block.NDRWhen the target macroblock has a field structure, the upper adjacent one-dimensional DCT coefficient is equal to the upper adjacent macroblock MB as described with reference to FIG. 20B.UBlock B on the lower right ofUDRAre the horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the bottom row ofUDRThis is the horizontal one-dimensional DCT coefficient of the eighth row. Block BUDRThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0376]
After the processes of steps S72 and S73, both proceed to step S74, and the
[0377]
If it is determined in step S74 that the DCT type of the target macroblock and the lower adjacent macroblock are both frame DCT, the process proceeds to step S75, and the
[0378]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock and the lower adjacent macroblock are both frame structures, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 21A.DBlock B in the upper right ofDUR8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT transformation on the eight pixels in the top row in FIG.DURIs the horizontal one-dimensional DCT coefficient of the first row. Block BDURThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0379]
If it is determined in step S74 that the DCT type of the target macroblock is the frame DCT and the DCT type of the lower adjacent macroblock is the field DCT, the process proceeds to step S76, and the
[0380]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock has a frame structure and the lower adjacent macroblock has a field structure, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 21B.DBlock B in the upper right ofDUR8 is a horizontal one-dimensional DCT coefficient obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the bottom row in FIG.DURIs the horizontal one-dimensional DCT coefficient of the first row. Block BDURThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0381]
If it is determined in step S74 that the DCT type of the target macroblock is the field DCT and the DCT type of the lower adjacent macroblock is the frame DCT, the process proceeds to step S77, and the
[0382]
That is, the target block is the lower right block B of the target macro block.NDRWhen the target macroblock has a field structure and the lower adjacent macroblock has a frame structure, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 21C.DBlock B in the upper right ofDURAre horizontal one-dimensional DCT coefficients obtained by performing horizontal one-dimensional DCT conversion on the 8 pixels in the second row of the second row.DURIs the horizontal one-dimensional DCT coefficient of the second row. Block BDURThe horizontal one-dimensional DCT coefficients of the second row are stored in the
[0383]
If it is determined in step S74 that the DCT type of the target macroblock and the lower adjacent macroblock are both field DCTs, the process proceeds to step S78, and the
[0384]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock and the lower adjacent macroblock are both field structures, the lower adjacent one-dimensional DCT coefficient is lower adjacent macroblock MB as described with reference to FIG. 21D.DBlock B on the lower right ofDDRAre the horizontal one-dimensional DCT coefficients obtained by horizontal one-dimensional DCT conversion of the eight pixels in the top row ofDDRIs the horizontal one-dimensional DCT coefficient of the first row. Block BDDRThe horizontal one-dimensional DCT coefficient of the first row of is stored in the
[0385]
After the processing of steps S75 to S78, the process proceeds to step S79, and the
[0386]
If it is determined in step S79 that the DCT type of the target macroblock and the left adjacent macroblock are both frame DCT, the process proceeds to step S80, and the
[0387]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock and the right adjacent macroblock both have a frame structure, the right adjacent one-dimensional DCT coefficient is, as described with reference to FIG. 23A, the right adjacent macroblock MB.RBlock B at the lower left ofRDLIs a vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the leftmost column ofRDLIs the vertical one-dimensional DCT coefficient of the first column. Block BRDLThe vertical one-dimensional DCT coefficients of the first column are stored in the
[0388]
If it is determined in step S79 that the DCT type of the target macroblock is the frame DCT and the DCT type of the right adjacent macroblock is the field DCT, the process proceeds to steps S81 to S83 in sequence, and the
[0389]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock has a frame structure and the right adjacent macroblock has a field structure, the right adjacent one-dimensional DCT coefficient is the right adjacent macroblock MB as described with reference to FIG.RBlock B in the upper left ofRULThe lower 4 pixels in the leftmost column and the lower left block BRDLA vertical one-dimensional DCT coefficient is obtained by performing vertical one-dimensional DCT conversion on a total of eight pixels in the lower four pixels in the leftmost column. However, such a vertical one-dimensional DCT coefficient does not exist in the
[0390]
Therefore, the
[0390]
In response to a request from the
[0392]
In step S82, the
[0393]
When the vertical one-dimensional
[0394]
If it is determined in step S79 that the DCT type of the target macroblock is the field DCT and the DCT type of the right adjacent macroblock is the frame DCT, the process proceeds to steps S84 to S86 in sequence, and the
[0395]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock has a field structure and the right adjacent macroblock has a frame structure, the right adjacent one-dimensional DCT coefficient is the right adjacent macroblock MB as described with reference to FIG.LBlock B in the upper left ofRUL4 pixels in the even-numbered row in the leftmost column and the lower left block BRDLThe vertical one-dimensional DCT coefficient obtained by vertical one-dimensional DCT conversion of a total of eight pixels of the four pixels in the even-numbered row in FIG.
[0396]
Therefore, the
[0397]
In response to a request from the
[0398]
In step S85, the
[0399]
When the vertical one-dimensional
[0400]
If it is determined in step S79 that the DCT type of the target macroblock and the right adjacent macroblock are both field DCTs, the process proceeds to step S87, and the
[0401]
That is, the target block is the lower right block B of the target macro block.NDRIn the case where the target macroblock and the right adjacent macroblock both have a field structure, the right adjacent one-dimensional DCT coefficient is the right adjacent macroblock MB as described with reference to FIG. 23D.RBlock B at the lower left ofRDLIs a vertical one-dimensional DCT coefficient obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the leftmost column ofRDLIs the vertical one-dimensional DCT coefficient of the first column. Block BRDLThe vertical one-dimensional DCT coefficients of the first column are stored in the
[0402]
After the processing of steps S80, S83, S86, and S87, all proceed to step S88, and the
[0403]
That is, the target block is the lower right block B of the target macro block.NDR, The left adjacent one-dimensional DCT coefficient is equal to the target block B as described in FIG.NDRBlock B next to the leftNDLAre the vertical one-dimensional DCT coefficients obtained by performing vertical one-dimensional DCT transformation on the eight pixels in the rightmost column ofNDLAre the vertical one-dimensional DCT coefficients of the eighth column. Block BNDLThe vertical one-dimensional DCT coefficients of the eighth column are stored in the
[0404]
Next, processing of the AC
[0405]
As described above, the AC
[0406]
That is, as shown in FIG. 30, the AC
[0407]
Here, the seven AC components of the one-dimensional DCT coefficient are ACn(N = 1, 2,..., 7), AC power PACIs calculated by, for example, the following equation.
[0408]
PAC= ΣACn 2(12)
[0409]
However, in Formula (12), Σ represents a summation when the variable n is changed from 1 to 7.
[0410]
In addition, the AC
[0411]
The AC
[0412]
That is, the AC
[0413]
Next, FIG. 31 illustrates a configuration example of the AC
[0414]
The horizontal one-dimensional DCT
[0415]
The horizontal one-dimensional DCT
[0416]
The vertical one-dimensional DCT
[0417]
The horizontal AC
[0418]
The vertical AC
[0419]
As described above, the AC power obtained from the one-dimensional DCT coefficient can be regarded as the power of the AC component of 8 pixels corresponding to the one-dimensional DCT coefficient, and therefore represents the activity of the image.
[0420]
Next, processing of the AC inner
[0421]
As described above, the AC inner
[0422]
That is, as shown in FIG. 32, the AC inner
[0423]
I = Σ (ACn× ACn′) ... (13)
[0424]
However, in Formula (13), I represents an AC inner product. In addition, ACnRepresents the nth AC component of the upper boundary one-dimensional DCT coefficient for the block of interest, and ACn'Represents the nth AC component of the upper adjacent one-dimensional DCT coefficient for the block of interest. Σ represents a summation with n changed from 1 to 7.
[0425]
The AC inner
[0426]
Here, hereinafter, the AC inner product obtained from the lower boundary one-dimensional DCT coefficient and the lower adjacent one-dimensional DCT coefficient for the target block is appropriately expressed as the lower inner product, the left boundary one-dimensional DCT coefficient, and the left adjacent one-dimensional DCT coefficient. The AC inner product obtained from the left inner product and the AC inner product obtained from the right boundary one-dimensional DCT coefficient and the right adjacent one-dimensional DCT coefficient are referred to as the right inner product.
[0427]
The AC inner product is obtained when the AC component of the boundary one-dimensional DCT coefficient and the adjacent one-dimensional DCT coefficient that sandwich the boundary of the target block are similar, that is, a vector having the AC component of the boundary one-dimensional DCT coefficient as a component, and the adjacent one-dimensional DCT A positive value (a value greater than or equal to 0) is obtained when the angle formed by a vector whose component is the AC component of the coefficient is less than 90 degrees (or greater). Therefore, a positive AC inner product indicates that the waveform pattern of 8 pixels corresponding to the boundary one-dimensional DCT coefficient sandwiching the boundary of the target block is similar to the waveform pattern of 8 pixels corresponding to the adjacent one-dimensional DCT coefficient. For example, the boundary between the block of interest and a block adjacent to the block of interest indicates that there is a continuous edge across the boundary.
[0428]
Next, FIG. 33 shows a configuration example of the AC inner
[0429]
The one-dimensional DCT coefficients output from the one-dimensional inverse
[0430]
The upper inner product one-dimensional DCT
[0431]
The upper inner
[0432]
The lower inner product one-dimensional DCT
[0433]
The lower inner
[0434]
The left inner product one-dimensional DCT
[0435]
The left inner
[0436]
The right inner product one-dimensional DCT
[0437]
The right inner
[0438]
Next, FIG. 34 shows a configuration example of the class
[0439]
The class
[0440]
That is, the
[0441]
The
[0442]
The
[0443]
The flatness
[0444]
The continuity
[0445]
The boundary edge
[0446]
The class
[0447]
Here, FIG. 35 shows the format of the class code output by the class
[0448]
In the embodiment of FIG. 35, the class code is 10 bits, and from the beginning, a 2-bit AC power class code, a 4-bit block flatness class code, and a 4-bit inter-block continuity class code are sequentially provided. Arranged and configured.
[0449]
The 2-bit AC power class code classifies the target pixel by its vertical AC power and horizontal AC power, and the leading bit is obtained from the vertical one-dimensional DCT coefficient of the target pixel column. The second bit is determined by the horizontal AC power obtained from the horizontal one-dimensional DCT coefficient of the row of the target pixel. Accordingly, the AC power class code is determined for each pixel.
[0450]
The 4-bit block flatness class code classifies a block including a target pixel (target block) according to the flatness of the boundary portions of the upper, lower, left, and right sides (image flatness between the target block and the adjacent block). The first to fourth bits are determined by the flatness of the upper, lower, left, and right boundaries of the block of interest. Therefore, the block flatness class code is determined for each block.
[0451]
The 4-bit inter-block continuity class code determines whether a block containing a pixel of interest (target block) depends on the continuity of the upper, lower, left, and right borders (how images are connected between the target block and its adjacent blocks). The first to fourth bits are determined by the continuity of the upper, lower, left, and right boundaries of the block of interest. Accordingly, the block continuity class code is also determined for each block in the same manner as the block flatness class code.
[0452]
From the above, the AC power class code basically differs for each pixel, but the block flatness class code and the interblock continuity class code are the same for the pixels in the same block.
[0453]
Next, processing (class classification processing) of the class
[0454]
In the class
[0455]
Then, the class
[0456]
That is, the class
[0457]
Thereafter, the process proceeds to step S92, where the boundary edge
[0458]
That is, the boundary edge
[0459]
When it is determined in step S92 that the boundary edge condition is satisfied, that is, the difference between the DC component DC of the boundary primary DCT coefficient and the DC component DC ′ of the adjacent primary DCT coefficient for the target block is very large. Therefore, when an edge is present at the boundary portion of the block of interest and it is considered that there is no connection between the image pattern of the block of interest and the block adjacent thereto, the boundary edge
[0460]
If it is determined in step S92 that the boundary edge condition is not satisfied, the process advances to step S93, and the flatness
[0461]
That is, the flatness
[0462]
(PAC≦ B) ∩ (PAC′ ≦ B) ∩ (| DC−DC ′ | ≦ D) (14)
[0463]
PAC′ ≦ C (15)
[0464]
However, in Expressions (14) and (15), B, C, and D are predetermined threshold values, and the threshold value C is sufficiently smaller than the threshold value B. In the formulas (14) and (15), PACRepresents the AC power obtained from the boundary one-dimensional DCT coefficient for the block of interest, and PAC'Represents the AC power obtained from the adjacent one-dimensional DCT coefficient for the block of interest. Further, in Equation (14), DC represents the direct current component of the boundary one-dimensional DCT coefficient for the block of interest, and DC ′ represents the direct current component of the adjacent one-dimensional DCT coefficient for the block of interest. ∩ represents a logical product.
[0465]
Equation (14) is an AC power P obtained from the boundary one-dimensional DCT coefficient and the adjacent one-dimensional DCT coefficient for the block of interest.ACAnd PACIs true when both are less than (or less than) the threshold value B and the absolute difference value | DC-DC '| between the respective DC components DC and DC' is less than or equal to the threshold value D (or less). Become. Further, the equation (15) is obtained by calculating the AC power P obtained from the adjacent one-dimensional DCT coefficient for the block of interest.ACTrue when ′ is less than or equal to threshold C (or less).
[0466]
Here, as described above, the threshold value C is sufficiently smaller than the threshold value B, for example, a value close to 0. Therefore, the equation (15) is an AC obtained from the adjacent one-dimensional DCT coefficient for the block of interest. Power PACTrue if ′ is close to 0.
[0467]
Here, it is assumed that the flatness condition is satisfied if, for example, any one of formulas (14) and (15) is true.
[0468]
If it is determined in step S93 that the flatness condition is satisfied, the flatness
[0469]
In step S94, the class
[0470]
If it is determined in step S93 that the flatness condition is not satisfied, the process proceeds to step S95, where the continuity
[0471]
That is, for example, the continuity
[0472]
If it is determined in step S95 that the continuity condition is satisfied, the continuity
[0473]
In step S96, the class
[0474]
On the other hand, if it is determined in step S96 that the continuity condition is not satisfied, the continuity
[0475]
Note that the processing in steps S92 to S97 is performed independently for each of the upper, lower, left, and right boundaries of the block of interest, so that the block flatness class code and the inter-block continuity class code can Sought about.
[0476]
In step S98, the class
[0477]
The process shown in the flowchart of FIG. 36 is performed every time a new pixel is set as the target pixel. However, as described above, the block flat raw class code and the inter-block continuity class code are the same for the pixels in the same block, so for the pixels constituting the same block, only the first pixel is a step. The processing of S91 to 98 is performed, and only the processing of steps S91 and S98 is performed for the other pixels, and the block flat raw class code and the interblock continuity class code are obtained for the first pixel. Can be diverted.
[0478]
Here, in the present embodiment, as shown in FIG. 35, the class code is 10 bits, so according to such a 10-bit class code, 1024 (= 2Ten) Can represent street classes.
[0479]
However, in the class classification process shown in FIG. 36, there is no case where the block flatness class code is 1 and the interblock continuity class code is 0. That is, here, it is impossible that there is no continuity even though the boundary portion of the block is flat. When the block flatness class code is 1, the interblock continuity class code is always 1 as well. Like to do.
[0480]
Therefore, for example, the set (b1, b2) of the block flatness class code and the interblock continuity class code for the upper boundary of the block is (0, 0), (0, 1), (1, 1). You can take only three ways. As a result, the number of classes expressed by the 4-bit block flatness class code and the 4-bit inter-block continuity class code for all four boundaries on the top, bottom, left, and right of the block is 81 (= 3Four)
[0481]
The number of classes represented by the 2-bit AC power class code is 4 (= 22) That's right.
[0482]
Therefore, here, the number of classes represented by the 10-bit class code in FIG. 35 is 324 (= 81 × 4).
[0483]
Here, in the above-described case, the case where the set (b1, b2) of the block flatness class code and the interblock continuity class code is (0, 0) is an image in the target block and adjacent blocks adjacent thereto. This means that there is no connection between the blocks and the block of interest and the adjacent block are so-called “unrelated”. A case where (b1, b2) is (0, 1) indicates that the images in the target block and the adjacent blocks are not flat but are “continuous”. Further, the case where (b1, b2) is (1, 1) indicates that the image in the target block and the adjacent block is “flat” (and therefore “continuous”).
[0484]
In the above case, there are three combinations (b1, b2) of the block flatness class code and the interblock continuity class code so that 324 classes are represented by a 10-bit class code. However, (b1, b2) has 10 bits so that four (0, 0), (0, 1), (1, 0), (1, 1) can be taken instead of three. 1024 (= 2TenIt is also possible to express street classes.
[0485]
That is, in the above case, if only one of the equations (14) and (15) is satisfied, the flatness condition is satisfied and (1, 1) is assigned to (b1, b2). However, for example, a case where both the expressions (14) and (15) are satisfied is distinguished from a case where only the expression (14) is satisfied, and both the expressions (14) and (15) are satisfied. In this case, (1, 1) is assigned to (b1, b2), and (1, 0) is assigned to (b1, b2) when only equation (14) is satisfied. Is possible.
[0486]
In this case, the case where (b1, b2) is (1, 1) indicates that the image in the target block and the adjacent block is “flat on both the target block side and the adjacent block side”, and (b1 , B2) is (1, 0) indicates that the image in the target block and the adjacent block is “flat only on the adjacent block side”.
[0487]
In the flowchart of FIG. 36, (b1, b2) is set to (0, 0) regardless of whether the boundary edge condition is satisfied or the flatness condition and the continuity condition are not satisfied. By assigning either (1) or (0) a case where the boundary edge condition is satisfied or neither the flatness condition nor the continuity condition is satisfied, It is also possible that the set (b1, b2) of the flatness class code and the interblock continuity class code can take four types.
[0488]
Further, a case where both of the expressions (14) and (15) are satisfied is distinguished from a case where only the expression (14) is satisfied, and the cases where the boundary edge condition is satisfied, the flatness condition and the continuity condition It is also possible to distinguish between cases in which neither is satisfied. However, in this case, when the case where the image of the target block and the adjacent block is “continuous” and the case where the image of the target block and the adjacent block are “flat” are combined, one of the target blocks (one side) Regarding the boundary, it is necessary to divide into five cases. Accordingly, in this case, the number of classes based on the boundary of the block of interest is 625, and as a result, the total number of classes is 2500 considering the 2-bit AC power class code.
[0489]
Next, FIG. 37 shows a configuration example of the class
[0490]
The class
[0491]
Accordingly, the class
[0492]
However, the color difference signal block generally has lower image activity than the luminance signal block, and the value of the AC component of the one-dimensional DCT coefficient is smaller, so the same processing as the class
[0493]
Therefore, here, the class
[0494]
That is, in the embodiment of FIG. 37, AC power output from the AC power calculation unit 33 (FIG. 2) is supplied to the
[0495]
Similar to the
[0496]
Similar to the
[0497]
In the class
[0498]
In addition to the outputs from the
[0499]
Here, the class
[0500]
That is, the class
[0501]
Further, the class
[0502]
That is, for example, assuming that the image data is now expressed in YUV format and the image format is 4: 2: 2, as shown in FIG. 38A, two luminance blocks Y1 and Y2 arranged on the left and right are arranged. And one color difference block U and one color difference block V correspond to each other.
[0503]
In this case, the upper boundary of the color difference block U is the boundary a on the left luminance block Y1 and the upper boundary b of the right luminance block Y2, and the lower boundary of the color difference block U is the luminance block Y1. The lower boundary e and the lower boundary f of the luminance block Y2, the left boundary of the color difference block U is the left boundary c of the luminance block Y1, and the right boundary of the color difference block U is the right boundary of the luminance block Y2. Each corresponds to d.
[0504]
Therefore, as shown by a dotted line in FIG. 38A, when the color difference block U is divided into two small blocks Ul and Ur that are 4 × 8 pixels wide and vertically adjacent to each other as shown in FIG. 38B, The upper boundary of the left small block Ul is the boundary a above the luminance block Y1, the lower boundary of the small block Ul is the lower boundary e of the luminance block Y1, and the left boundary of the small block Ul is the luminance. The left boundary c of the block Y1 and the right boundary of the small block Ul correspond to the right boundary d of the luminance block Y2, respectively. The upper boundary of the right small block Ur is the boundary b above the luminance block Y2, the lower boundary of the small block Ur is the lower boundary f of the luminance block Y2, and the left boundary of the small block Ur is The left boundary c of the luminance block Y1 and the right boundary of the small block Ur correspond to the right boundary d of the luminance block Y2, respectively.
[0505]
Here, in the class code of FIG. 35, the block flatness class codes obtained for the upper, lower, left and right boundaries of the block are as follows, as appropriate: upper boundary flatness code, lower boundary flatness code, left boundary flatness code, right These are called boundary flatness codes. In addition, the inter-block continuity class codes obtained for the upper, lower, left, and right boundaries of the block are respectively referred to as upper boundary continuity code, lower boundary continuity code, left boundary continuity code, and right boundary continuity code, Say. Furthermore, below, the upper boundary flatness code and the upper boundary continuity code are combined as appropriate, and the upper boundary code, the lower boundary flatness code and the lower boundary continuity code are combined, and the lower boundary code and the left boundary flatness are appropriately combined. The code and the left boundary continuity code are collectively referred to as a left boundary code, and the right boundary flatness code and the right boundary continuity code are collectively referred to as a right boundary code. Hereinafter, the upper boundary code, the lower boundary code, the left boundary code, and the right boundary code are collectively referred to as a boundary code as appropriate.
[0506]
Since the boundary between the luminance blocks Y1 and Y2 and the boundaries of the small blocks Ul and Ur have the above-described correspondence, the class
[0507]
That is, for the pixels of the small block Ul, the class
[0508]
Also, the class
[0509]
The correspondence relationship between the color difference block V and the luminance blocks Y1 and Y2 is also the same as the correspondence relationship between the color difference block U and the luminance blocks Y1 and Y2, and the class
[0510]
As a result, the class
[0511]
That is, for example, as shown in FIG. 39A, the i-th bit (from the least significant bit) of the 10-bit luminance class code obtained for the pixels of the two luminance blocks Y1 or Y2 corresponding to the color difference blocks U and V If the i-th bit is represented as BL # i-1 or BR # i-1, class codes as shown in FIG. 39B are created for the pixels of the small blocks Ul, Ur, Vl, and Vr. The
[0512]
That is, BR0, BL1, BL2, BL3, BR4, BL5, BL6, and BL7 are arranged in the first to eighth bits of the color difference class codes of the pixels of the small blocks Ul and Vl, respectively. In addition, BR0, BL1, BR2, BR3, BR4, BL5, BR6, BR7 are arranged in the first to eighth bits of the color difference class codes of the pixels of the small blocks Ur, Vr, respectively.
[0513]
Here, the ninth bit and the tenth bit of the color difference class code are determined based on the AC power of the pixel of interest, as in the case of the luminance class code.
[0514]
Next, when the image format is 4: 2: 0, for example, as shown in FIG. 40A, as shown in FIG. 40A, four adjacent luminance blocks Y1, Y2, which are in the positional relationship of upper left, lower left, upper right, and lower right. Y3, Y4, one color difference block U, and one color difference block V correspond to each other.
[0515]
In this case, as indicated by a dotted line in FIG. 40A, the color difference block U is divided into four small blocks Uul, Ull having a horizontal x vertical position of 4 × 4 pixels in the upper left, lower left, upper right, and lower right positions. , Uur, Ulr, as shown in FIG. 40B, the upper boundary of the small block Uul is the boundary a above the luminance block Y1, and the lower boundary of the small block Uul is a lower boundary of the luminance block Y3. g, the left boundary of the small block Uul corresponds to the left boundary c of the luminance block Y1, and the right boundary of the small block Uul corresponds to the right boundary d of the luminance block Y2. The upper boundary of the small block Ull is the boundary a above the luminance block Y1, the lower boundary of the small block Ull is the lower boundary g of the luminance block Y3, and the left boundary of the small block Ull is the luminance. The left boundary e of the block Y3 and the right boundary of the small block Ull correspond to the right boundary f of the luminance block Y4, respectively. Furthermore, the upper boundary of the small block Uur is the boundary b above the luminance block Y2, the lower boundary of the small block Uur is the lower boundary h of the luminance block Y4, and the left boundary of the small block Uur is the luminance. The left boundary c of the block Y1 and the right boundary of the small block Uur correspond to the right boundary d of the luminance block Y2. Furthermore, the upper boundary of the small block Ulr is the boundary b above the luminance block Y2, the lower boundary of the small block Ulr is the lower boundary h of the luminance block Y4, and the left boundary of the small block Ulr is the luminance The left boundary e of the block Y3 and the right boundary of the small block Ulr correspond to the right boundary f of the luminance block Y4, respectively.
[0516]
Since the boundary between the luminance blocks Y1 to Y4 and the boundary between the small blocks Uul, Ull, Uur, and Ulr have the above correspondence, the class
[0517]
That is, for the pixels of the small block Uul, the class
[0518]
In addition, the class
[0519]
Further, the class
[0520]
In addition, the class
[0521]
The correspondence relationship between the color difference block V and the luminance blocks Y1 to Y4 is the same as the correspondence relationship between the color difference block U and the luminance blocks Y1 to Y4, and the class
[0522]
As a result, the class
[0523]
That is, for example, as shown in FIG. 41A, the i-th bit of the 10-bit luminance class code obtained for the pixels of the two luminance blocks Y1 to Y4 corresponding to the color difference blocks U and V is represented by BUL # i. −1, BUR # i−1, BDL # i−1, and BDR # i−1, respectively, the pixels of small blocks Uul, Ull, Uur, Ulr, and Vul, Vll, Vur, Vlr A class code as shown in FIG. 41B is created.
[0524]
That is, BUR0, BUL1, BDL2, BUL3, BUR4, BUL5, BDL6, and BUL7 are arranged in the first to eighth bits of the color difference class codes of the pixels of the small blocks Uul and Vul, respectively. In addition, BDR0, BDL1, BDL2, BUL3, BDR4, BDL5, BDL6, and BUL7 are arranged in the first to eighth bits of the color difference class codes of the pixels of the small blocks Ull and Vll, respectively. Further, BUR0, BUL1, BDR2, BUR3, BUR4, BUL5, BDR6, and BUR7 are arranged in the first to eighth bits of the color difference class codes of the pixels of the small blocks Uur and Vur, respectively. Also, BDR0, BDL1, BDR2, BUR3, BDR4, BDL5, BDR6, and BUR7 are arranged in the first to eighth bits of the color difference class codes of the pixels of the small blocks Ulr and Vlr, respectively.
[0525]
Here, the ninth bit and the tenth bit of the color difference class code are determined based on the AC power of the pixel of interest, as in the case of the luminance class code.
[0526]
Here, the image data is described as being represented in Y, U, V format, but the same class classification is also applied when the image data is represented in, for example, Y, Cb, Cr format. Can be done.
[0527]
Furthermore, here, the case where the image format is 4: 2: 2 and the case where the image format is 4: 2: 0 has been described. However, when the image format is 4: 4: 4 (for example, the image data is R ( red), G (green), and B (blue) formats), the same class classification may be performed for each signal, or the class code obtained by the class classification performed for a certain signal may be used as is. It may be used for other signals.
[0528]
Next, FIG. 42 shows a configuration example of the
[0529]
The prediction
[0530]
Here, FIG. 43 illustrates a configuration example of the prediction
[0531]
The
[0532]
Here, the
[0533]
By the way, since the spatial frequency component of the target pixel is dispersed throughout the two-dimensional DCT coefficients of the target block, in order to predict the target pixel, at least all the two-dimensional DCT coefficients of the target block are used as prediction taps. It is desirable to use it.
[0534]
However, the target pixel generally has a correlation with not only the pixel of the target block but also the neighboring block pixels around the target block, such as the adjacent block adjacent to the target block. It is possible to decode (predict) the target pixel with higher accuracy when configured in a form including peripheral block information (peripheral information).
[0535]
Therefore, in the
[0536]
Further, in the
[0537]
Incidentally, as shown in FIGS. 44 and 45, if all the two-dimensional DCT coefficients of a plurality of blocks adjacent to the target block are included in the prediction tap, the number of taps of the prediction tap becomes large, and a product sum described later. The number of tap coefficients used in the calculation unit 133 (FIG. 42) increases, and the calculation amount of the product-
[0538]
Therefore, for example, as shown in FIG. 46, the
[0539]
Returning to FIG. 42, the
[0540]
The product-
[0541]
Next, processing (adaptive processing) of the
[0542]
First, in step S <b> 101, the prediction
[0543]
In step S102, the product-
[0544]
Here, in the case of performing inverse DCT transform on the two-dimensional DCT coefficient of the block, the position information indicating the spatial position of each pixel in the block is the component c of the transformation matrix C shown in Expression (11).ijIs considered in the form of the phase of cos ((2j + 1) × i × π / 16) defining
[0545]
On the other hand, in the adaptive processing, linear primary prediction calculation of Equation (1) using the DCT coefficients constituting the prediction tap and the tap coefficients is performed. In this linear primary prediction calculation, the pixel ( The position information of the pixel of interest is not considered. Therefore, in order to perform linear primary prediction calculation in consideration of the position information of the target pixel, here, different tap coefficients are used depending on the position of the target pixel. That is, even if the pixels are classified into the same class, if the positions in the blocks are different, linear primary prediction calculation is performed using different tap coefficients. In this case, the tap coefficient used for the linear primary prediction calculation is switched depending on the position of the target pixel in the block, and information indicating the position of the target pixel is the pixel position mode.
[0546]
In this case, since the block is composed of 8 × 8 pixels, there are 64 positions. Here, for example, the i-th position in the raster scan order is represented as a pixel position mode #i. .
[0547]
Thereafter, the pixel in the pixel position mode #i is set as the target pixel, and the class classification unit 13 (FIG. 2) performs class classification on the target pixel, so that the tap
[0548]
In step S103, the tap coefficient from the tap
[0549]
Here, as described above, even if the pixels are classified into the same class, different tap coefficients are used when the positions in the block (pixel position modes) are different. Therefore, 64 sets of tap coefficients, which are the total number of pixel position modes, are supplied from the tap
[0550]
Thereafter, the process proceeds to step S104, where the product-
[0551]
In step S105, the product-
[0552]
In step S106, the product-
[0553]
If it is determined in step S106 that the pixel position mode #i is not equal to 64, the process proceeds to step S107, and the product-
[0554]
If it is determined in step S106 that the pixel position mode #i is equal to 64, that is, if all the pixel values of the block of interest are decoded, the process ends.
[0555]
Note that the
[0556]
The product-
[0557]
Here, in the MPEG encoding, when encoding 8-bit image data, the pixel value and the two-dimensional DCT coefficient are evenly distributed on the positive side and the negative side centered on 0, so that the pixel value of the original image To 128 (= 27) Is subtracted to encode the pixel value.
[0558]
For this reason, the product-
[0559]
Next, learning of tap coefficients stored in the
[0560]
In MPEG, there are three picture types, i.e., I picture, P picture, and B picture, depending on the prediction method. Therefore, learning of tap coefficients is also performed for each picture type.
[0561]
FIG. 48 illustrates a configuration example of an embodiment of a learning device when learning tap coefficients for I pictures.
[0562]
The
[0563]
The student data generation unit 142 includes an
[0564]
That is, the
[0565]
Note that the
[0566]
Therefore, the DCT coefficient extraction /
[0567]
The two-dimensional DCT coefficient, DCT type, and the like for the I picture output from the DCT coefficient extraction /
[0568]
The
[0569]
The prediction
[0570]
When the prediction
[0571]
The
[0572]
The adding
[0573]
That is, the adding
[0574]
Further, the adding
[0575]
Note that the above-described addition in the
[0576]
The
[0577]
The tap
[0578]
Depending on the number of images prepared as learning images, the contents of the images, etc., the adding
[0579]
Next, processing (learning processing) of the learning device in FIG. 48 will be described with reference to the flowchart in FIG.
[0580]
First, in step S111, as described above, the student data generation unit 142 generates student data for the I picture from the learning image data stored in the
[0581]
In step S112, the adding
[0582]
In step S113, the prediction
[0583]
In step S114, the adding
[0584]
In step S116, the adding
[0585]
In step S117, the adding
[0586]
If it is determined in step S117 that the pixel position mode #i is not equal to 64, the process proceeds to step S118, and the adding
[0587]
If it is determined in step S117 that the pixel position mode #i is equal to 64, that is, if all pixels in the target block are added as the target pixel, the process proceeds to step S119, where the
[0588]
If it is determined in step S119 that there is an unprocessed block, the process returns to step S112, and a new target block is selected from the unprocessed blocks. Thereafter, the same processing is repeated.
[0589]
If it is determined in step S119 that there is no unprocessed block, that is, if a normal equation for each pixel position mode is obtained for each class in the adding
[0590]
Next, FIG. 50 illustrates a configuration example of an embodiment of a learning device when learning tap coefficients for P pictures. In the figure, portions corresponding to those in FIG. 48 are denoted by the same reference numerals, and description thereof will be omitted below as appropriate. That is, the learning apparatus in FIG. 50 is configured basically in the same manner as in FIG. 48 except that a student
[0591]
Here, the P picture is predictively encoded (non-intra encoded) using the I or P picture decoded (encoded) in advance in time as a reference image, that is, the predicted image is subtracted from the original image. 2 is subjected to two-dimensional DCT transform, the preprocessing
[0592]
Therefore, in learning of tap coefficients for P pictures, it is necessary to use, as student data, a value obtained by adding a two-dimensional DCT coefficient of a predicted image to a two-dimensional DCT coefficient of a residual image.
[0593]
By the way, a predicted picture of a P picture can be obtained by using the previously decoded I or P picture as a reference picture and applying motion compensation to the reference picture. Since we are trying to learn, there are no tap coefficients for P pictures.
[0594]
On the other hand, the tap coefficient for I picture can be obtained in advance in the learning apparatus of FIG.
[0595]
Therefore, in the learning apparatus of FIG. 50, the student
[0596]
That is, the
[0597]
Note that the separation unit 172 and the DCT coefficient extraction /
[0598]
When obtaining the two-dimensional DCT coefficient of the I picture, the DCT coefficient extraction /
[0599]
In addition, when the DCT coefficient extraction /
[0600]
Furthermore, when the DCT coefficient extraction /
[0601]
The
[0602]
Similar to the
[0603]
The decoded picture of the I picture obtained by performing the adaptive process in the
[0604]
Thereafter, the
[0605]
That is, the
[0606]
The two-dimensional DCT coefficient of the original image of the P picture obtained by the frequency domain motion
[0607]
Thereafter, the same processing as in the learning apparatus of FIG. 48 is performed, and thereby, tap coefficients for P pictures (more precisely, for predictive-encoded blocks of P pictures) are obtained.
[0608]
Next, FIG. 51 shows a configuration example of an embodiment of a learning apparatus when learning tap coefficients for B pictures. Note that the learning device that learns the tap coefficient for the B picture is similar to the learning device that learns the tap coefficient for the P picture in FIG. FIG. 51 shows only the student data generation unit of the learning device that learns the tap coefficient for the B picture.
[0609]
Similarly to the P picture, the B picture is also predictively encoded (non-intra-encoded) using the I or P picture decoded in advance in time as a reference image, that is, the predicted image is subtracted from the original image. Since the residual image is subjected to the two-dimensional DCT transform, in the image processing apparatus of FIG. 2, the
[0610]
Therefore, in learning of tap coefficients for B pictures, it is necessary to use, as student data, a result obtained by adding a two-dimensional DCT coefficient of a predicted image to a two-dimensional DCT coefficient of a residual image.
[0611]
Therefore, in the learning device of FIG. 51, such student data is generated and learning is performed.
[0612]
That is, learning image data (here, equal to teacher data) is supplied to the
[0613]
The two-dimensional DCT coefficient of the I picture output from the DCT coefficient extraction /
[0614]
Here, the separation unit 192 separates side information such as a quantization scale, a DCT type, and a moving vector from the encoded data in addition to the quantized DCT coefficient as necessary, and extracts the DCT coefficient extraction / inverse quantization unit. The necessary blocks are supplied via 193. As for the side information, in the embodiment of FIG. 51, the supply of the P-picture motion vector from the DCT coefficient extraction /
[0615]
Also, the DCT coefficient extraction /
[0616]
Further, the DCT coefficient extraction /
[0617]
That is, the
[0618]
Similar to the
[0619]
The decoded picture of the I picture obtained by performing the adaptive process in the
[0620]
Thereafter, the motion compensation unit 198 reads an I picture as a reference image to be subjected to motion compensation using the motion vector supplied from the DCT coefficient extraction /
[0621]
That is, the motion compensation unit 198, the image memory 199, the DCT conversion unit 200, and the frequency domain motion
[0622]
The two-dimensional DCT coefficient of the original image of the P picture obtained by the frequency domain motion
[0623]
In the case of the
[0624]
Similar to the
[0625]
The decoded image of the P-coded block of the P picture obtained by performing the adaptive process in the
[0626]
After that, the motion compensation unit 206 converts the I or P picture as a reference image to be subjected to motion compensation by the motion vector of the B picture supplied from the DCT coefficient extraction /
[0627]
That is, the motion compensation unit 206, the image memory 207, the DCT conversion unit 208, and the frequency domain motion
[0628]
The two-dimensional DCT coefficient of the original image of the B picture obtained by the frequency domain motion
[0629]
The
[0630]
Accordingly, the tap coefficients stored in the
[0631]
Here, in the learning device, a normal equation is separately established for the luminance signal and the color difference signal, and the tap coefficient obtained by solving the normal equation established from the luminance signal is stored in the
[0632]
As described above, in MPEG encoding, 128 (= 2) from the pixel value of the original image.7) Is subtracted to encode the pixel value. For this reason, the addition unit 146 (FIGS. 48 and 50) uses a value obtained by subtracting 128 from the pixel value as the teacher data stored in the
[0633]
In the image processing apparatus of FIG. 2, adaptive processing is performed on the I picture block using the tap coefficient for I picture. In addition, for a P picture or B picture block, if the block is predictively encoded (non-intra encoded), adaptive processing is performed using tap coefficients for the P picture or B picture. If the block is intra-coded, adaptive processing is performed using tap coefficients for I pictures.
[0634]
In the above-described case, the tap coefficient for each of the I, P, and B pictures is learned. However, for example, the learning of the tap coefficient for the B picture can be omitted. In this case, in the image processing apparatus of FIG. 2, for example, both of the P-picture and B-picture predictively coded blocks are subjected to adaptive processing using a P-picture tap coefficient. Further, in the image processing apparatus of FIG. 2, all the adaptive processing for I, P, and B pictures can be performed using tap coefficients for I pictures.
[0635]
Next, FIGS. 52 and 53 show simulation results obtained by performing a simulation of decoding an MPEG encoded image with the image processing apparatus of FIG.
[0636]
In the simulation, encoded data obtained by encoding an image in 4: 2: 2 format at the data rate of about 3.3 Mbps by the MPEG2 method was used. Further, in the simulation, an image sequence is used in which the I picture and the P picture are changed into even frames and odd frames, respectively, for each frame. Further, in the simulation, 700, 700, 350, 120, and 120 were used as the above-described threshold values A, B, C, D, and E, respectively. However, 80 was used as the threshold A for the color difference signal.
[0637]
FIG. 52 shows S / N (Signal to Noise ratio) for the luminance signal of the decoded image obtained by the simulation.
[0638]
In FIG. 52, S / N indicated by a solid line indicates a decoded image by the image processing apparatus of FIG. 2, and S / N indicated by a dotted line indicates a decoded image by a conventional MPEG software decoder compliant with the MPEG standard. Shows things. From FIG. 52, it can be seen that the S / N of the decoded image by the image processing apparatus of FIG. 2 is improved by about 1 dB as compared with the decoded image by the conventional MPEG software decoder.
[0639]
FIG. 53 shows a decoded image obtained by simulation.
[0640]
53A shows an original image, FIG. 53B shows a decoded image by a conventional MPEG software decoder, and FIG. 53C shows a decoded image by the image processing apparatus of FIG. In FIGS. 53A to 53C, about 1/3 of the right side shows the entire image showing the entire bottle, and about 2/3 of the left side shows the label of the bottle. The image which expanded the part of is shown. The image shown in FIG. 53 is an I picture image.
[0641]
Comparing the original image of FIG. 53A and the decoded image by the conventional MPEG software decoder of FIG. 53B, the decoded image of FIG. 53B has a block distortion in which the block boundary is noticeable. The mosquito noise appears prominently in the part of the character “”.
[0642]
On the other hand, in the decoded image by the image processing apparatus of FIG. 2 in FIG. 53C, the block distortion is sufficiently reduced, and mosquito noise is also reduced.
[0643]
Next, FIG. 54 illustrates a second configuration example of the prediction
[0644]
Here, in the following, only the prediction tap configured by the prediction
[0645]
The inverse
[0646]
The
[0647]
That is, for example, as illustrated in FIG. 55A, the
[0648]
Further, for example, as illustrated in FIG. 55B, the
[0649]
Alternatively, for example, as illustrated in FIG. 55C, the
[0650]
Further, for example, as illustrated in FIG. 55D, the
[0651]
Here, in the
[0652]
Therefore, for example, as shown in FIG. 46, all the two-dimensional DCT coefficients of the block of interest and eight adjacent blocks adjacent to the block of interest, above, below, left, right, upper left, lower left, upper right, and lower right, respectively. By forming a prediction tap from the direct current component of the two-dimensional DCT coefficients, a prediction tap with a small number of taps can be formed in a form including information on adjacent blocks correlated with the pixel of interest. .
[0653]
By the way, the correlation between the target pixel and each 8 × 8 pixel of the adjacent block is generally not uniform. That is, the correlation between the pixels of the adjacent block and the target pixel is generally higher as the pixel is closer to the target pixel and lower as the pixel is farther away. In addition, for example, when there is an edge between the pixel of the adjacent block and the target pixel, or for a complex image, there is no correlation between the pixel of the adjacent block and the target pixel (almost no). Sometimes.
[0654]
On the other hand, the direct current component of the two-dimensional DCT coefficient of the adjacent block represents an average value of 8 × 8 pixels (average value of pixel values) of the adjacent block, and information of all the 8 × 8 pixels is reflected. Accordingly, the DC component of the two-dimensional DCT coefficient of the adjacent block includes information on a pixel having a high correlation with the target pixel, but conversely, may include information on a pixel having no correlation with the target pixel. In this way, when the prediction tap is configured to include information on a pixel that has no correlation with the target pixel (there is almost no correlation), the decoded value of the target pixel obtained by the product-sum operation unit 133 (FIG. 42) Adversely affects the decoding accuracy.
[0655]
Therefore, as shown in FIG. 55, the prediction tap can be configured by selecting not only all the pixels of the adjacent block but only the pixels close to (or adjacent to) the target block. In this case, decoding accuracy can be improved by a prediction tap with a small number of taps.
[0656]
55A and 55B, the left adjacent identical row pixel, the right adjacent identical row pixel, the upper adjacent identical column pixel, the lower adjacent identical column pixel, the pixel adjacent to the left of the left adjacent identical row pixel, the right adjacent The pixel adjacent to the right of the same row pixel, the pixel adjacent above the upper adjacent same column pixel, and the pixel adjacent below the lower adjacent same column pixel often have a high correlation with the target pixel. Is included in order to improve the decoding accuracy of the pixel of interest, that is, to decode a high-quality image that is closer to the original image and has various distortions sufficiently reduced. It is effective for.
[0657]
For example, when a pixel near the block boundary such as the left end of the target block is the target pixel, the target pixel at the left end of the target block has a large correlation with the pixel of the adjacent block adjacent to the left. In some cases, there is almost no correlation with the pixel of the adjacent block on the right. Therefore, as shown in FIG. 55C, the closer one of the left adjacent identical row pixels and the right adjacent identical row pixels to the target pixel is selected, and the upper adjacent identical column pixel and the lower adjacent identical column pixel are selected. It is effective to improve the decoding accuracy of the pixels at the block boundary of the block of interest by selecting the one closer to the pixel of interest and configuring the prediction tap. In addition, for example, when the vicinity of the target block has a complicated image pattern or has an edge, the left adjacent same row pixel or the right adjacent same row pixel or the upper adjacent same column pixel far from the target pixel And the lower adjacent column pixel may have little correlation with the target pixel. Therefore, even in such a case, configuring the prediction tap as shown in FIG. 55C improves the decoding accuracy of the target pixel. It is effective to make it.
[0658]
On the other hand, when the class of the target pixel is appropriately classified, decoding accuracy is improved when the amount of information constituting the prediction tap is large. Therefore, in such a case, the prediction tap shown in FIG. 55D is effective.
[0659]
Here, the prediction tap can be fixed to any one of the tap structures shown in FIGS. 55A to 55D, but the four tap structures shown in FIGS. 55A to 55D are selected. It is also possible to adopt it. That is, the prediction tap has four tap structures shown in FIGS. 55A to 55D based on the pixel position mode of the target pixel, the presence / absence of an edge near the target pixel, and the complexity of the image near the target pixel. Can be selectively employed.
[0660]
Next, processing performed by the prediction
[0661]
In the prediction
[0662]
In step S <b> 132, the inverse
[0663]
In step S133, the
[0664]
In step S134, the
[0665]
Next, in the prediction
[0666]
However, in MPEG2, as described above, the frame structure and field structure can be selected in units of macroblocks. Therefore, the structure of the target macroblock including the target block and the adjacent macroblock adjacent to the target macroblock can be selected. Depending on the structure, the pixel adjacent to the target block in the adjacent block adjacent to the target block may not be a pixel adjacent to the boundary of the target block (block adjacent pixel) in the spatial region.
[0667]
Therefore, the reading unit 136 (FIG. 4) recognizes the structure of the target block and adjacent blocks by referring to the DCT type stored in the
[0668]
Here, with reference to FIGS. 57 to 72, block adjacent pixels adjacent to the boundary of the target block in the spatial region when the structure of the target block is used as a reference will be described.
[0669]
In FIG. 57 to FIG. 72, the target macroblock is changed to MB as in the case of FIG.NAnd attention macroblock MBNMacro blocks adjacent to the top, bottom, left, rightU, MBD, MBL, MBRIt expresses. Furthermore, attention macroblock MBNThe upper left, lower left, upper right, and lower right blocks of BNUL, BNDL, BNUR, BNDRAnd the upper adjacent macroblock MBUThe upper left, lower left, upper right, and lower right blocks of BUUL, BUDL, BUUR, BUDRIt expresses. Also, lower adjacent macroblock MBDThe upper left, lower left, upper right, and lower right blocks of BDUL, BDDL, BDUR, BDDRLeft adjacent macroblock MBLThe upper left, lower left, upper right, and lower right blocks of BLUL, BLDL, BLUR, BLDRIt expresses. Furthermore, right adjacent macroblock MBRThe upper left, lower left, upper right, and lower right blocks of BRUL, BRDL, BRUR, BRDRIt expresses.
[0670]
In FIGS. 57 to 72, hatched lines represent block adjacent pixels, and black blocks represent the target block.
[0671]
When the structure of the target block is used as a reference, the block adjacent pixels adjacent to the boundary of the target block in the spatial domain are the same as those in FIGS.
[0672]
That is, FIG. 57 shows the target macroblock MB.NBlock B in the upper left ofNULIs a block of interest, the block of interest B in the spatial domainNULThe block adjacent pixels adjacent to the upper boundary of FIG.
[0673]
Attention macroblock MBNAnd upper adjacent macroblock MBUIf both of the DCT types are frame DCT, the target block B of the frame structureNULAs shown in FIG. 57A, the block adjacent pixels adjacent to the upper boundary of the upper boundary macroblock MB of the frame structureUBlock B at the lower left ofUDLThe bottom row of 8 pixels (hatched portion).
[0674]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the upper adjacent macroblock MBUIf the DCT type is field DCT, the target block B of the frame structureNULAs shown in FIG. 57B, the block adjacent pixels adjacent to the upper boundary of the upper boundary macroblock MB of the field structureUBlock B at the lower left ofUDLThe bottom row of 8 pixels (hatched portion).
[0675]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIf the DCT type is frame DCT, the target block B of the field structureNULAs shown in FIG. 57C, block adjacent pixels adjacent to the upper boundary of the upper boundary macroblock MB of the frame structureULower left
[0676]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIn the case of the DCT type of the field DCT, the target block B of the field structureNULAs shown in FIG. 57D, the block adjacent pixels adjacent to the upper boundary of theUBlock B in the upper left ofUULThe bottom row of 8 pixels (hatched portion).
[0677]
Next, FIG. 58 shows the attention macroblock MB.NBlock B in the upper left ofNULIs a block of interest, the block of interest B in the spatial domainNULThe block adjacent pixel adjacent to the lower boundary is shown.
[0678]
Attention macroblock MBNIf the DCT type is frame DCT, the target block B of the frame structureNULAs shown in FIG. 58A, block adjacent pixels adjacent to the lower boundary of the target macroblock MB of the frame structureNBlock B at the lower left ofNDLThe uppermost row of 8 pixels (hatched portion).
[0679]
Attention macroblock MBNIf the DCT type is field DCT, the target block B of the field structureNULAs shown in FIG. 58B, block adjacent pixels adjacent to the lower boundary of the target macroblock MB of the field structureNLower adjacent macroblock MB adjacent belowDBlock B in the upper left ofDULThe uppermost row of 8 pixels (hatched portion).
[0680]
Next, FIG. 59 shows the attention macroblock MB.NBlock B in the upper left ofNULIs a block of interest, the block of interest B in the spatial domainNULThe block adjacent pixels adjacent to the left boundary of FIG.
[0681]
Attention macroblock MBNAnd left adjacent macroblock MBUIf both of the DCT types are frame DCT, the target block B of the frame structureNULAs shown in FIG. 59A, block adjacent pixels adjacent to the left boundary of the left boundary macroblock MB of the frame structureLBlock B in the upper right ofLURThe rightmost column of 8 pixels (the hatched portion).
[0682]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the left adjacent macroblock MBLIf the DCT type is field DCT, the target block B of the frame structureNULAs shown in FIG. 59B, the block adjacent pixels adjacent to the left boundary of the left boundary macroblock MB of the field structureLBlock B in the upper right ofLURThe upper four pixels in the rightmost column and the lower right block BLDRThe upper four pixels in the rightmost column (the hatched portion). That is, attention block BNULThe block adjacent pixels on the left side adjacent to the first row to the eighth row ofLURPixels in the first to fourth rows in the rightmost column of block B, block BLDRThe pixels in the first to fourth rows of the rightmost column of
[0683]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIf the DCT type is frame DCT, the target block B of the field structureNULAs shown in FIG. 59C, the block adjacent pixels adjacent to the left boundary of the left boundary macroblock MB of the frame structureLBlock B in the upper right ofLUR4 pixels in the odd-numbered row in the rightmost column and the lower right block BLDRThe four pixels in the odd-numbered row in FIG. That is, attention block BNULThe block adjacent pixels on the left side adjacent to the first row to the eighth row ofLUR, Pixels in the first, third, fifth and seventh rows of the rightmost column, block BLDRAre the pixels in the first, third, fifth, and seventh rows of the rightmost column.
[0684]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIn the case of the DCT type of the field DCT, the target block B of the field structureNULAs shown in FIG. 59D, the block adjacent pixels adjacent to the left boundary of the left boundary macroblock MB of the field structureLBlock B in the upper right ofLURThe rightmost column of 8 pixels (the hatched portion).
[0685]
Next, FIG. 60 shows an attention macroblock MB.NBlock B in the upper left ofNULIs a block of interest, the block of interest B in the spatial domainNULThe block adjacent pixels adjacent to the right boundary of FIG.
[0686]
Attention macroblock MBNBlock B in the upper left ofNULIs a target block, the target block BNULAs shown in FIG. 60, a block adjacent pixel adjacent to the right boundary of the block BNURThe leftmost column of 8 pixels (hatched portion).
[0687]
Next, FIG. 61 shows a macro block MB of interest.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDLThe block adjacent pixels adjacent to the upper boundary of FIG.
[0688]
Attention macroblock MBNIf the DCT type is frame DCT, the target block BNDLAs shown in FIG. 61A, the block adjacent pixels adjacent to the upper boundary of the target macroblock MBNUpper left block BNULThe bottom row of 8 pixels (hatched portion).
[0689]
Attention macroblock MBNIf the DCT type is field DCT, the target block BNDLAs shown in FIG. 61B, the block adjacent pixels adjacent to the upper boundary of the target macroblock MBNUpper adjacent macroblock MB adjacent aboveUBlock B at the lower left ofUDLThe bottom row of 8 pixels (hatched portion).
[0690]
Next, FIG. 62 shows a macro block MB of interest.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDLThe block adjacent pixel adjacent to the lower boundary is shown.
[0691]
Attention macroblock MBNAnd lower adjacent macroblock MBDIf both of the DCT types are frame DCT, the target block BNDLAs shown in FIG. 62A, block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B in the upper left ofDULThe uppermost row of 8 pixels (hatched portion).
[0692]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the lower adjacent macroblock MBDIf the DCT type is field DCT, the target block BNDLAs shown in FIG. 62B, the block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B in the upper left ofDULThe uppermost row of 8 pixels (hatched portion).
[0693]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is frame DCT, the target block BNDLAs shown in FIG. 62C, the block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B in the upper left ofDULThe second row of 8 pixels (hatched portion).
[0694]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is also a field DCT, the target block BNDLThe block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B at the lower left ofDDLThe uppermost row of 8 pixels (hatched portion).
[0695]
Next, FIG. 63 shows an attention macroblock MB.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDLThe block adjacent pixels adjacent to the left boundary of FIG.
[0696]
Attention macroblock MBNAnd left adjacent macroblock MBLIf both of the DCT types are frame DCT, the target block BNDLAs shown in FIG. 63A, a block adjacent pixel adjacent to the left boundary of the left adjacent macroblock MBLBlock B on the lower right ofLDRThe rightmost column of 8 pixels (the hatched portion).
[0697]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the left adjacent macroblock MBLIf the DCT type is field DCT, the target block BNDLAs shown in FIG. 63B, the block adjacent pixels adjacent to the left boundary of the left adjacent macroblock MBLBlock B in the upper right ofLUR
[0698]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIf the DCT type is frame DCT, the target block BNDLAs shown in FIG. 63C, a block adjacent pixel adjacent to the left boundary of the left adjacent macroblock MBLBlock B in the upper right ofLUR4 pixels in the even-numbered row in the rightmost column and the lower
[0699]
Attention macroblock MBNDCT type is field DCT, and left adjacent macroblock MBLIf the DCT type is also a field DCT, the target block BNDLAs shown in FIG. 63D, a block adjacent pixel adjacent to the left boundary of the left adjacent macroblock MBLBlock B on the lower right ofLDRThe rightmost column of 8 pixels (the hatched portion).
[0700]
Next, FIG. 64 shows the attention macroblock MB.NBlock B at the lower left ofNDLIs a block of interest, the block of interest B in the spatial domainNDLThe block adjacent pixels adjacent to the right boundary of FIG.
[0701]
Attention macroblock MBNBlock B at the lower left ofNDLIs block of interest when is a block of interestNDRAs shown in FIG. 64, block adjacent pixels adjacent to the right boundary of the target block BNDLBlock B to the right ofNDRThe leftmost column of 8 pixels (hatched portion).
[0702]
FIG. 65 shows a macro block MB of interestNBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNURThe block adjacent pixels adjacent to the upper boundary of FIG.
[0703]
Attention macroblock MBNAnd upper adjacent macroblock MBUIf both of the DCT types are frame DCT, the target block BNURAs shown in FIG. 65A, the block adjacent pixels adjacent to the upper boundary of the upper boundary macroblock MBUBlock B on the lower right ofUDRThe bottom row of 8 pixels (hatched portion).
[0704]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the upper adjacent macroblock MBUIf the DCT type is field DCT, the target block BNURAs shown in FIG. 65B, the block adjacent pixels adjacent to the upper boundary of the upper boundary macroblock MBULower right block BUDRThe bottom row of 8 pixels (hatched portion).
[0705]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIf the DCT type is frame DCT, the target block BNURAs shown in FIG. 65C, block adjacent pixels adjacent to the upper boundary of the upper boundary macroblock MBUBlock B on the lower right ofUDRThe 8th pixel in the seventh row (the hatched portion).
[0706]
Attention macroblock MBNDCT type is field DCT, and upper adjacent macroblock MBUIf the DCT type is also a field DCT, the target block BNURAs shown in FIG. 65D, block adjacent pixels adjacent to the upper boundary of the upper boundary macroblock MBUBlock B in the upper right ofUURThe bottom row of 8 pixels (hatched portion).
[0707]
Next, FIG. 66 shows an attention macroblock MB.NBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNURThe block adjacent pixel adjacent to the lower boundary is shown.
[0708]
Attention macroblock MBNIf the DCT type is frame DCT, the target block BNURAs shown in FIG. 66A, the block adjacent pixels adjacent to the lower boundary of the target macroblock MBNBlock B on the lower right ofNDRThe uppermost row of 8 pixels (hatched portion).
[0709]
Attention macroblock MBNIf the DCT type is field DCT, the target block BNURAs shown in FIG. 66B, the block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B in the upper right ofDURThe uppermost row of 8 pixels (hatched portion).
[0710]
Next, FIG. 67 shows a macro block MB of interest.NBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNURThe block adjacent pixels adjacent to the left boundary of FIG.
[0711]
Attention macroblock MBNBlock B in the upper right ofNURIs a target block, the target block BNURAs shown in FIG. 67, block adjacent pixels adjacent to the left boundary of the target block BNURBlock B next to the leftNULThe rightmost column of 8 pixels (the hatched portion).
[0712]
Next, FIG. 68 shows an attention macroblock MB.NBlock B in the upper right ofNURIs a block of interest, the block of interest B in the spatial domainNURThe block adjacent pixels adjacent to the right boundary of FIG.
[0713]
Attention macroblock MBNAnd right adjacent macroblock MBRIf both of the DCT types are frame DCT, the target block BNURAs shown in FIG. 68A, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBRBlock B in the upper left ofRULThe leftmost column of 8 pixels (hatched portion).
[0714]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the right adjacent macroblock MBRIf the DCT type is field DCT, the target block BNURAs shown in FIG. 68B, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBLBlock B in the upper left ofRULThe top four pixels in the leftmost column and the lower left block BRDLAre the upper four pixels (the hatched portion).
[0715]
Attention macroblock MBNThe DCT type is field DCT and the right adjacent macroblock MBRIf the DCT type is frame DCT, the target block BNURAs shown in FIG. 68C, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBRBlock B in the upper left ofRUL4 pixels in the odd-numbered row in the leftmost column and the lower left block BRDLThe four pixels in the odd-numbered row in FIG.
[0716]
Attention macroblock MBNThe DCT type is field DCT and the right adjacent macroblock MBRIf the DCT type is also a field DCT, the target block BNURAs shown in FIG. 68D, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBRBlock B in the upper left ofRULThe leftmost column of 8 pixels (hatched portion).
[0717]
Next, FIG. 69 shows a macro block MB of interest.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDRThe block adjacent pixels adjacent to the upper boundary of FIG.
[0718]
Attention macroblock MBNIf the DCT type is frame DCT, the target block BNDRAs shown in FIG. 69A, the block adjacent pixels adjacent to the upper boundary of the target macroblock MBNBlock B on the lower right ofNDRThe uppermost row of 8 pixels (hatched portion).
[0719]
Attention macroblock MBNIf the DCT type is field DCT, the target block BNDRAs shown in FIG. 69B, the block adjacent pixels adjacent to the upper boundary of the target macroblock MBNUpper adjacent macroblock MB adjacent aboveUBlock B on the lower right ofUDR8 pixels in the lowermost row (the portion with hatching).
[0720]
Next, FIG. 70 shows the attention macroblock MB.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDRThe block adjacent pixel adjacent to the lower boundary is shown.
[0721]
Attention macroblock MBNAnd lower adjacent macroblock MBDIf both of the DCT types are frame DCT, the target block BNDRAs shown in FIG. 70A, the block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B in the upper right ofDURThe uppermost row of 8 pixels (hatched portion).
[0722]
Attention macroblock MBNThe DCT type of the frame is a frame DCT, and the lower adjacent macroblock MBDIf the DCT type is field DCT, the target block BNDRAs shown in FIG. 70B, the block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B in the upper right ofDURThe uppermost row of 8 pixels (hatched portion).
[0723]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is frame DCT, the target block BNDRAs shown in FIG. 70C, the block adjacent pixels adjacent to the lower boundary of the lower boundary macroblock MBDBlock B in the upper right ofDURThe second row of 8 pixels (hatched portion).
[0724]
Attention macroblock MBNDCT type is field DCT and lower adjacent macroblock MBDIf the DCT type is also a field DCT, the target block BNDRAs shown in FIG. 70D, a block adjacent pixel adjacent to the lower side is a lower adjacent macroblock MB.DBlock B on the lower right ofDDRThe uppermost row of 8 pixels (hatched portion).
[0725]
Next, FIG. 71 shows an attention macroblock MB.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDRThe block adjacent pixels adjacent to the left boundary of FIG.
[0726]
Attention macroblock MBNBlock B on the lower right ofNDRIs a target block, the target block BNDRAs shown in FIG. 71, block adjacent pixels adjacent to the left boundary of the target block BNDRBlock B next to the leftNDLThe rightmost column of 8 pixels (the hatched portion).
[0727]
Next, FIG. 72 shows the target macroblock MB.NBlock B on the lower right ofNDRIs a block of interest, the block of interest B in the spatial domainNDRThe block adjacent pixels adjacent to the right boundary of FIG.
[0728]
Attention macroblock MBNAnd right adjacent macroblock MBRIf both of the DCT types are frame DCT, the target block BNDRAs shown in FIG. 72A, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBRBlock B at the lower left ofRDLThe leftmost column of 8 pixels (hatched portion).
[0729]
Attention macroblock MBNThe DCT type of the frame is the frame DCT, and the right adjacent macroblock MBRIf the DCT type is field DCT, the target block BNDRAs shown in FIG. 72B, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBRBlock B in the upper left ofRULThe lower 4 pixels in the leftmost column and the lower left block BRDLIn the leftmost column in FIG. 4, the lower four pixels (hatched portion).
[0730]
Attention macroblock MBNThe DCT type is field DCT and the right adjacent macroblock MBRIf the DCT type is frame DCT, the target block BNDRAs shown in FIG. 72C, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBRBlock B in the upper left ofRUL4 pixels in the even-numbered row in the leftmost column and the lower left block BRDLIn the leftmost column, there are four pixels in the even-numbered row (the hatched portion).
[0731]
Attention macroblock MBNIf the DCT type of the current adjacent macroblock MBR is the field DCT and the DCT type of the right adjacent macroblock MBR is also the field DCT, the target block BNDRAs shown in FIG. 72D, the block adjacent pixels adjacent to the right boundary of the right adjacent macroblock MBRBlock B at the lower left ofRDLThe leftmost column of 8 pixels (hatched portion).
[0732]
Next, FIG. 73 illustrates a third configuration example of the prediction
[0733]
The
[0734]
The
[0735]
In the
[0736]
Then, the
[0737]
Therefore, also in the embodiment of FIG. 73, a prediction tap similar to that in the case of FIG. 54 is generated.
[0738]
Note that the decoding order in the
[0739]
Next, FIG. 74 illustrates a fourth configuration example of the prediction
[0740]
The image processing apparatus 240 includes a
[0741]
That is, in the embodiment of FIG. 73, the video stream is MPEG-decoded by the
[0741]
Therefore, also in the embodiment of FIG. 74, a prediction tap similar to that in the case of FIG. 54 is generated.
[0743]
Here, the
[0744]
When the video stream is decoded in the image processing apparatus 240, the non-intra coded block is subjected to the two-dimensional DCT transform of the difference value (residual image) between the image of the block and the predicted image as described above. Since the two-dimensional DCT coefficients (hereinafter referred to as residual DCT coefficients as appropriate) obtained as described above are obtained, the image processing apparatus 240 is configured to perform non-intra coded blocks as in the image processing apparatus of FIG. 75A, the residual DCT coefficient and the two-dimensional DCT coefficient obtained by DCT transform of the prediction image are added, and the prediction tap is formed from the two-dimensional DCT coefficient obtained as a result of the addition. . And an image is decoded by performing an adaptive process using the prediction tap.
[0745]
However, in the image processing apparatus 240, for the non-intra coded block, as shown in FIG. 75B, for example, a residual image obtained by two-dimensional inverse DCT transform and a predicted image are obtained. It is possible to decode the image by constructing a prediction tap from the image obtained as a result of the addition and performing adaptive processing. Further, in the image processing apparatus 240, for non-intra coded blocks, for example, as shown in FIG. 75C, a prediction tap is configured from a residual DCT coefficient and a predicted image, and adaptive processing is performed. It is also possible to decode the image.
[0746]
When decoding the image by configuring the prediction tap of FIG. 75A, it is necessary to configure the prediction tap having the same structure as in FIG. 75A and obtain the tap coefficient in learning. Even when the prediction tap of FIG. 75B or 75C is configured and the image is decoded, similarly, it is necessary to configure the prediction tap having the same structure as in FIG. 75B or 75C and obtain the tap coefficient. is there.
[0747]
Next, FIG. 76 illustrates a fifth configuration example of the prediction
[0748]
The one-dimensional inverse
[0749]
The adjacent one-dimensional DCT coefficient selection /
[0750]
Next, processing performed by the prediction
[0751]
In the prediction
[0752]
In step S142, the one-dimensional inverse
[0753]
In step S143, the adjacent one-dimensional DCT coefficient selection /
[0754]
In step S144, the
[0755]
Therefore, according to the prediction
[0756]
In the prediction tap having the tap structure of FIG. 78, the upper adjacent one-dimensional DCT coefficient, the lower adjacent one-dimensional DCT coefficient, the left adjacent one-dimensional DCT coefficient, and the right adjacent one-dimensional DCT coefficient are located above, below, left, and right of the block of interest. 76 represents the spatial frequency component in the horizontal direction or the vertical direction of the adjacent pixels of each of the eight adjacent blocks, that is, represents the spatial frequency at a position close to the target pixel. Therefore, the prediction
[0757]
The one-dimensional inverse
[0758]
In the above case, the one-dimensional inverse DCT transform is performed on the two-dimensional DCT coefficient to obtain a one-dimensional DCT coefficient as a prediction tap. It is also possible to decode the decoded image into a decoded image by MPEG decoding or the like, and obtain the decoded image by performing one-dimensional DCT conversion.
[0759]
Next, FIG. 79 illustrates a sixth configuration example of the prediction
[0760]
However, as shown in FIG. 80, the
[0761]
Next, processing performed by the prediction
[0762]
In the prediction
[0763]
In step S152, the
[0764]
Then, in step S153, the
[0765]
Therefore, according to the prediction
[0766]
Since the pixels at the same position in the frame before and after the target pixel frame generally have a large correlation with the target pixel, the prediction
[0767]
79 includes pixels at the same position in two or more frames before and after the target pixel frame, in addition to the same position pixels in the previous and subsequent frames of the target pixel frame. It is also possible to generate a shape prediction tap.
[0768]
In addition, the
[0769]
Next, FIG. 82 illustrates a seventh configuration example of the prediction
[0770]
However, the
[0771]
Further, the
[0772]
If the block of interest is a B-picture image predicted in both directions, as shown in FIG. 83A, forward prediction is performed for the block of interest using the frame before the block of the block of interest as a reference image. And a motion vector for performing backward prediction using a frame after the frame of the target block as a reference image.
[0773]
Here, in the embodiment of FIG. 83A, the nth frame is the frame of the block of interest and is a B picture. The target block is a motion vector v for performing forward prediction using the (n-2) th frame that is an I picture as a reference image.1And a motion vector v for performing backward prediction using the (n + 1) th frame as a P picture as a reference image2have.
[0774]
In this case, the
[0775]
On the other hand, when the block of interest is an I picture that is not predictively encoded or a P picture that is forward-predicted, there is no motion vector for prediction or even if there is a motion vector for the frame of the block of interest. There is only a motion vector for performing forward prediction using the previous frame as a reference image.
[0776]
Here, in the embodiment of FIG. 83B, the nth frame is the frame of the block of interest and is a P picture. The target block is a motion vector v for performing forward prediction using the (n-2) th frame that is an I picture as a reference image.ThreeI have only.
[0777]
By the way, an I picture or a P picture can be a reference picture when predicting a predicted picture of a P picture or a B picture. In the embodiment of FIG. 83B, the motion vector v for performing the forward prediction in the block of the (n + 1) th frame that is the B picture using the image including the target pixel in the frame of the target pixel as a reference image.Fourhave.
[0778]
In this case, the
[0779]
Here, hereinafter, a frame of an image predicted by a predicted image obtained by performing motion compensation on a reference image based on a motion vector will be referred to as a non-reference frame. In addition, hereinafter, an image frame referred to when predicting an image of a non-reference frame is referred to as a reference frame as appropriate. Furthermore, both the motion vector of the target block and the motion vector used for motion compensation using the image including the target pixel of other blocks as the reference image are collectively referred to as a motion vector related to the target block as appropriate.
[0780]
Note that there may be a plurality of blocks of other frames (non-reference frames) having a motion vector for performing forward prediction using the image including the target pixel of the frame of the target pixel as a reference image. Based on any one or more of the plurality of motion vectors, it is possible to select a motion corresponding pixel corresponding to each of the one or more motion vectors.
[0781]
In the above-described case, one motion-corresponding pixel is selected from the reference frame (or non-reference frame). As the motion-corresponding pixel, attention is paid from the position corresponding to the target pixel in the reference frame. It is also possible to select a total of two or more pixels, that is, a pixel at a position moved by an amount corresponding to the motion vector of the block and one or more neighboring pixels as motion corresponding pixels. Further, in the case where the motion corresponding pixel for the pixel of interest is a temporary pixel of interest, the
[0782]
Next, processing performed by the prediction
[0783]
In the prediction
[0784]
In step S162, the
[0785]
In step S163, the
[0786]
Then, in step S164, the
[0787]
Since the motion-corresponding pixel generally has a large correlation with the pixel of interest, the prediction
[0788]
Here, configuring a prediction tap including a motion-corresponding pixel is effective in improving the decoding accuracy of an image on which a moving object is displayed.
[0789]
In the embodiment of FIGS. 79 and 82, the pixel value of the same position pixel or motion corresponding pixel is included in the prediction tap. However, the prediction tap includes the pixel value of the same position pixel or motion corresponding pixel. Instead, it is possible to include the one-dimensional DCT coefficient. In addition, the prediction tap may include a one-dimensional DCT coefficient of a predetermined number of pixel columns arranged in the vertical or horizontal direction, including pixels at the same position and motion corresponding pixels.
[0790]
Next, the series of processes described above can be performed by hardware or software. When a series of processing is performed by software, a program constituting the software is installed in a general-purpose computer or the like.
[0791]
Therefore, FIG. 85 shows a configuration example of an embodiment of a computer in which a program for executing the series of processes described above is installed.
[0792]
The program can be recorded in advance on a
[0793]
Alternatively, the program is stored temporarily on a
[0794]
The program is installed on the computer from the
[0795]
The computer includes a CPU (Central Processing Unit) 402. An input /
[0796]
Here, in the present specification, the processing steps for describing a program for causing the computer to perform various processes do not necessarily have to be processed in time series in the order described in the flowcharts, but in parallel or individually. This includes processing to be executed (for example, parallel processing or processing by an object).
[0797]
Further, the program may be processed by a single computer, or may be processed in a distributed manner by a plurality of computers. Furthermore, the program may be transferred to a remote computer and executed.
[0798]
As described above, in addition to the two-dimensional DCT coefficient of the block of interest, the pixel value and the one-dimensional DCT obtained from the two-dimensional DCT coefficient of the block of the frame spatially or temporally adjacent to the frame of the block of interest. Since the prediction tap is configured by the coefficient, it is possible to obtain a high-quality decoded image in which distortion such as block distortion and mosquito noise is sufficiently reduced by the prediction tap having a small number of taps.
[0799]
In the present embodiment, the predicted value of the teacher data is obtained by the linear primary prediction calculation of Expression (1). However, the predicted value of the teacher data is other than, for example, a second or higher order higher order. It is possible to use an expression.
[0800]
In this embodiment, the class classification is performed using the one-dimensional DCT coefficients of the block of interest and the blocks adjacent to the block of interest. However, the class classification is a block that is spatially or temporally close to the block of interest. The one-dimensional DCT coefficient can also be used. Furthermore, classification can be performed using a two-dimensional DCT coefficient in addition to a one-dimensional DCT coefficient. Further, the classification can be performed using the one-dimensional DCT coefficients of the blocks adjacent to the target block in the time direction.
[0801]
Furthermore, the class classification, for example, obtains the power (square sum) of 63 two-dimensional DCT coefficients excluding the direct current component of the 8 × 8 two-dimensional DCT coefficients of the block of interest and adjacent blocks, and the power and a predetermined value. It is also possible to perform the determination based on the magnitude relationship with the threshold value of, and the magnitude relationship between the power obtained from the target block and the power obtained from the adjacent block. In addition, for example, the class classification is the magnitude relationship between the direct current component of the two-dimensional DCT coefficients of the eight adjacent blocks adjacent to the target block shown in FIG. 46 and a predetermined threshold, or the two-dimensional of the eight adjacent blocks. It is also possible to perform this based on the magnitude relationship between each DC component of the DCT coefficients and the DC component of the two-dimensional DCT coefficients of the block of interest.
[0802]
The class classification can also be performed, for example, by configuring a class tap that includes a plurality of pixels of the block of interest or an adjacent block, and subjecting the class tap to ADRC (Adaptive Dynamic Range Coding) processing.
[0803]
Here, according to the K-bit ADRC processing, for example, the maximum value MAX and the minimum value MIN of the pixel values constituting the class tap are detected, and DR = MAX-MIN is set as the local dynamic range of the set, Based on the dynamic range DR, the pixel values constituting the class tap are requantized to K bits. That is, the minimum value MIN is subtracted from the pixel value of each pixel constituting the class tap, and the subtracted value is DR / 2.KDivide by (quantize). A bit string obtained by arranging the pixel values of the K-bit pixels constituting the class tap in a predetermined order is output as an ADRC code. Therefore, when a class tap is subjected to, for example, 1-bit ADRC processing, the pixel value of each pixel constituting the class tap is an average of the maximum value MAX and the minimum value MIN after the minimum value MIN is subtracted. Divided by the value (rounded down after the decimal point), the pixel value of each pixel is made 1 bit (binarized). Then, the class of the pixel of interest is determined based on the ADRC code that is a bit string in which the 1-bit pixel values are arranged in a predetermined order.
[0804]
Furthermore, the classification can be performed using, for example, side information included in the video stream. That is, classification can be performed based on a quantization step which is one of side information, for example. The class classification is based on the DCT type, which is one of side information, for example, and recognizes the combination of the structure of the block of interest and the adjacent block (whether it is a field structure or a frame structure), and the recognition result It is also possible to perform based on the above. Furthermore, the classification can be performed based on, for example, the presence or absence of motion compensation recognized from side information such as a motion compensation type or CBP, and the presence or absence of a two-dimensional DCT coefficient.
[0805]
The class classification can also be performed based on the above-described pixel position mode, for example.
[0806]
Furthermore, in the present embodiment, only the two-dimensional DCT coefficient of the target block is included in the prediction tap. However, for example, the pixel value of the target block and the one-dimensional DCT coefficient are included in the prediction tap. It can be included.
[0807]
Furthermore, in the present embodiment, MPEG-encoded moving images are targeted. However, the present invention is not limited to moving images encoded by an encoding method other than MPEG using two-dimensional DCT transform, or JPEG encoding. The present invention can also be applied when decoding a still image or the like.
[0808]
【The invention's effect】
As described above, according to the present invention, it is possible to decode high-quality images from encoded data including two-dimensional DCT coefficients obtained by converting at least two-dimensional DCT (Discrete Cosine Transform) image data. Become.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an MPEG decoder.
FIG. 2 is a block diagram illustrating a configuration example of a first embodiment of an image processing apparatus to which the present invention has been applied.
3 is a block diagram illustrating a configuration example of a
FIG. 4 is a diagram for explaining processing of a
FIG. 5 is a diagram for explaining processing of a
FIG. 6 is a diagram for explaining a two-dimensional DCT transformation and a two-dimensional inverse DCT transformation, and a one-dimensional DCT transformation and a one-dimensional inverse DCT transformation.
FIG. 7 is a half-tone photo displayed on a display showing an original image, a horizontal one-dimensional DCT coefficient, a vertical one-dimensional DCT coefficient, and a two-dimensional DCT coefficient.
FIG. 8 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a block of interest.
FIG. 9 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 10 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 11 is a diagram for describing a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 12 is a diagram for describing a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 13 is a diagram for describing a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 14 is a diagram for describing a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 15 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 16 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 17 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 18 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 19 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 20 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 21 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 22 is a diagram for describing a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
FIG. 23 is a diagram for explaining a pixel column of an adjacent block spatially adjacent to a pixel column at a boundary of a target block.
24 is a block diagram illustrating a configuration example of an adjacent one-dimensional DCT coefficient selection /
FIG. 25 is a flowchart for explaining processing of an adjacent one-dimensional DCT coefficient selection /
FIG. 26 is a flowchart illustrating details of an upper left block process.
FIG. 27 is a flowchart illustrating details of a lower left block process.
FIG. 28 is a flowchart illustrating details of an upper right block process.
FIG. 29 is a flowchart illustrating details of a lower right block process.
FIG. 30 is a diagram for explaining AC power;
31 is a block diagram illustrating a configuration example of an AC
FIG. 32 is a diagram for explaining an AC inner product.
33 is a block diagram illustrating a configuration example of an AC inner
34 is a block diagram illustrating a configuration example of a class
FIG. 35 is a diagram illustrating a format of a class code.
FIG. 36 is a flowchart for describing processing of a class code generation unit.
37 is a block diagram illustrating a configuration example of a class
FIG. 38 is a diagram illustrating a correspondence relationship between luminance blocks and color difference blocks in 4: 2: 2 format.
FIG. 39 is a diagram illustrating generation of a color difference class code using a luminance class code.
FIG. 40 is a diagram illustrating a correspondence relationship between a luminance block and a color difference block in a 4: 2: 0 format.
FIG. 41 is a diagram illustrating generation of a color difference class code using a luminance class code.
42 is a block diagram illustrating a configuration example of an
43 is a block diagram illustrating a first configuration example of a prediction
44 is a diagram illustrating a tap structure of a prediction tap generated by the prediction
45 is a diagram illustrating a tap structure of a prediction tap generated by the prediction
FIG. 46 is a diagram illustrating a tap structure of a prediction tap generated by the prediction
47 is a flowchart for explaining processing of an
FIG. 48 is a block diagram illustrating a configuration example of a first embodiment of a learning device that learns tap coefficients.
FIG. 49 is a flowchart for describing learning processing by the learning device.
FIG. 50 is a block diagram illustrating a configuration example of a second embodiment of a learning device that learns tap coefficients.
FIG. 51 is a block diagram illustrating a configuration example of a third embodiment of a learning device that learns tap coefficients;
FIG. 52 is a diagram illustrating S / N of a decoded image obtained by simulation.
FIG. 53 is a half-tone photo displayed on a display showing a decoded image obtained by simulation.
54 is a block diagram illustrating a second configuration example of the
FIG. 55 is a diagram illustrating a tap structure of a prediction tap generated by the prediction
FIG. 56 is a flowchart for describing processing of the prediction
FIG. 57 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 58 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 59 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the target block.
FIG. 60 is a diagram for describing block adjacent pixels spatially adjacent to a boundary of a target block.
FIG. 61 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 62 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 63 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 64 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 65 is a diagram for explaining block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 66 is a diagram for explaining block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 67 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 68 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 69 is a diagram for describing block adjacent pixels spatially adjacent to a boundary of a target block.
FIG. 70 is a diagram for describing block adjacent pixels spatially adjacent to a boundary of a target block.
FIG. 71 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
FIG. 72 is a diagram for describing block adjacent pixels spatially adjacent to the boundary of the block of interest.
73 is a block diagram illustrating a third configuration example of the prediction
74 is a block diagram illustrating a fourth configuration example of the prediction
75 is a diagram for explaining processing of the image processing device 240. FIG.
76 is a block diagram illustrating a fifth configuration example of the prediction
FIG. 77 is a flowchart for describing processing of a prediction
78 is a diagram illustrating a tap structure of a prediction tap generated by the prediction
79 is a block diagram illustrating a sixth configuration example of the prediction
80 is a diagram illustrating a tap structure of a prediction tap generated by a prediction
FIG. 81 is a flowchart for describing processing of a prediction
82 is a block diagram illustrating a seventh configuration example of the prediction
83 is a diagram illustrating a tap structure of a prediction tap generated by the prediction
84 is a flowchart for describing processing of a prediction
Fig. 85 is a block diagram illustrating a configuration example of an embodiment of a computer to which the present invention has been applied.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Separation part, 2 DCT coefficient extraction / inverse quantization part, 4 Motion compensation part, 5 Image memory, 11 Preprocessing part, 12 Buffer memory, 13 Class classification part, 14 Tap coefficient memory | storage part, 15 Image reconstruction part, 21 DCT conversion unit, 22 frequency domain motion compensation addition unit, 31 one-dimensional inverse DCT conversion unit, 32 adjacent one-dimensional DCT coefficient selection / conversion unit, 33 AC power calculation unit, 34 AC inner product calculation unit, 36, 37 class code generation unit , 41, 42 Tap coefficient selection section, 43, 44 coefficient memory, 51 adaptive processing section, 52 inverse DCT conversion section, 61 sampling section, 62 DCT section, 71 DCT coefficient selection section, 72 addition section, 73 selection section, 80 control Section, 81 memory, 82 vertical one-dimensional inverse DCT transform section, 83 sampling section, 84 1-dimensional DCT conversion unit, 85 selection unit, 91 horizontal 1-dimensional DCT coefficient extraction unit, 92 vertical 1-dimensional DCT coefficient extraction unit, 93 horizontal AC power calculation unit, 94 vertical AC power calculation unit, 101 1-dimensional DCT coefficient for upper inner product Extraction unit, 102 One-dimensional DCT coefficient extraction unit for lower inner product, 103 One-dimensional DCT coefficient extraction unit for left inner product, 104 One-dimensional DCT coefficient extraction unit for right inner product, 105 Upper inner product calculation unit, 106 Lower inner product calculation unit, 107 Left Inner product calculation unit, 108 right inner product calculation unit, 111, 112 comparison unit, 113 flatness condition determination unit, 114 continuity condition determination unit, 115 boundary portion edge condition determination unit, 116 class code creation unit, 121, 122 comparison unit, 123 class code creation unit, 131 prediction tap generation unit, 132 tap coefficient buffer, 1 3 product-sum operation unit, 136 reading unit, 137 array unit, 141 teacher data storage, 142 student data generation unit, 143 student data storage, 144 prediction tap generation unit, 145 class classification unit, 146 addition unit, 147 tap coefficient calculation , 151 MPEG encoder, 152 separation unit, 153 DCT coefficient extraction / inverse quantization unit, 171 MPEG encoder, 172 separation unit, 173 DCT coefficient extraction / inverse quantization unit, 174 class classification unit, 175 tap coefficient storage unit, 176 Adaptive processing unit, 177 I picture storage, 178 motion compensation unit, 179 image memory, 180 DCT conversion unit, 181 frequency domain motion compensation addition unit, 191 MPEG encoder, 192 separation unit, 193 DCT coefficient Out / Inverse quantization unit, 194 class classification unit, 195 tap coefficient storage unit, 196 adaptive processing unit, 197 I picture storage, 198 motion compensation unit, 199 image memory, 200 DCT transform unit, 201 frequency domain motion compensation addition unit, 202 class classification unit, 203 tap coefficient storage unit, 204 adaptive processing unit, 205 P picture storage, 206 motion compensation unit, 207 image memory, 208 DCT conversion unit, 209 frequency domain motion compensation addition unit, 221 inverse DCT conversion unit, 222 Selection unit, 231 MPEG decoder, 232 buffer memory, 240 image processing device, 241 preprocessing unit, 242 buffer memory, 243 class classification unit, 244 tap coefficient storage unit, 245 image reconstruction unit, 251 adaptive processing unit, 2 61 one-dimensional inverse DCT conversion unit, 262 adjacent one-dimensional DCT coefficient selection / conversion unit, 401 bus, 402 CPU, 403 ROM, 404 RAM, 405 hard disk, 406 output unit, 407 input unit, 408 communication unit, 409 drive, 410 I / O interface, 411 removable recording media
Claims (29)
前記画像データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類手段と、
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得手段と、
前記注目画素を含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記取得手段において取得された前記演算係数との積和演算に用いる幾つかの値の集合として生成する生成手段と、
前記注目画素のクラスに対応した演算係数と、前記値の集合との積和演算を行うことにより、前記注目画素の画素値を求めることで、前記符号化された画像データを復号する予測演算手段と
を備え、
前記所定の学習処理は、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成し、
前記値の集合と演算係数の積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める
処理である
ことを特徴とする画像処理装置。An image processing apparatus that decodes encoded image data including a two-dimensional DCT coefficient obtained by performing two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit ,
Class classification means for classifying a pixel constituting the image data into a class of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel When,
Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is obtained as student data to be the learning student by a predetermined learning process. An acquisition unit that acquires a calculation coefficient for each class, which corresponds to a class of a target pixel that is a prediction target pixel, in advance ,
Pixel value information obtained by inverse two-dimensional DCT transformation of the two-dimensional DCT coefficient of the target block that is a block including the target pixel and the two-dimensional DCT coefficient of a peripheral block that is a block around the target block, or A specific frequency component of the DCT coefficient of the peripheral block or peripheral information which is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is used for a product-sum operation with the arithmetic coefficient acquired by the acquisition means. Generating means for generating a set of several values ;
Prediction calculation means for decoding the encoded image data by obtaining a pixel value of the pixel of interest by performing a product-sum operation on the coefficient of interest corresponding to the class of the pixel of interest and the set of values. It equipped with a door,
The predetermined learning process includes
The pixels constituting the teacher data are classified into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel,
Of the pixels constituting the teacher data, the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, Generate as a set of several values used in the product-sum operation with the operation coefficient,
The calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation of the set of values and the calculation coefficient is obtained for each class.
The image processing apparatus, characterized in that the processing.
ことを特徴とする請求項1に記載の画像処理装置。The calculation coefficient is obtained by performing learning so that a prediction error of a predicted value of a pixel value of the target pixel obtained by performing a product-sum operation of the set of values and the calculation coefficient is statistically minimized. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
ことを特徴とする請求項2に記載の画像処理装置。The image processing apparatus according to claim 2 , wherein the peripheral block is a block spatially or temporally adjacent to the block of interest.
ことを特徴とする請求項3に記載の画像処理装置。The image processing apparatus according to claim 3 , wherein the pixel value obtained as the peripheral information is a pixel value of a pixel of a block adjacent to the target block.
ことを特徴とする請求項3に記載の画像処理装置。The image processing apparatus according to claim 3 , wherein the pixel value obtained as the peripheral information is a pixel value of a block adjacent pixel that is a pixel adjacent to the target block in a block adjacent to the target block. .
ことを特徴とする請求項5に記載の画像処理装置。The pixel values obtained as the peripheral information are the pixel values of two pixels on the left and right of the same row as the target pixel in the block adjacent pixels, and the pixel values of two pixels above and below the same column as the target pixel. The image processing apparatus according to claim 5 , wherein:
ことを特徴とする請求項5に記載の画像処理装置。The pixel values obtained as the peripheral information are the pixel values closer to the target pixel of the two pixels on the left and right in the same row as the target pixel in the block adjacent pixels, and the same column as the target pixel. of one of the two pixels above and below, the image processing apparatus according to claim 5, characterized in that the pixel value closer to the target pixel.
ことを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1 , wherein the frequency component obtained as the peripheral information is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient.
ことを特徴とする請求項8に記載の画像処理装置。The image processing device according to claim 8 , wherein the frequency component obtained as the peripheral information is the one-dimensional DCT coefficient corresponding to a position adjacent to the target block in a block adjacent to the target block. .
ことを特徴とする請求項1に記載の画像処理装置。The image processing according to claim 1 , wherein the peripheral information is pixel value information of one or more pixels in a frame before or after the frame of the block of interest, or DCT coefficients of the one or more pixels. apparatus.
ことを特徴とする請求項10に記載の画像処理装置。The peripheral information is pixel value information of one or more pixels including a pixel at the same position as the pixel of interest in a frame before or after the frame of the block of interest, or a DCT coefficient of the one or more pixels. The image processing apparatus according to claim 10 .
前記周辺情報は、前記注目ブロックのフレームの前または後のフレームにおける、前記注目画素に対応する位置から前記動きベクトルに対応する分だけ移動した位置にある画素を含む1以上の画素の画素値情報、またはその1以上の画素のDCT係数である
ことを特徴とする請求項10に記載の画像処理装置。The encoded data includes a motion vector representing the motion of the image data,
The peripheral information is pixel value information of one or more pixels including a pixel at a position moved by an amount corresponding to the motion vector from a position corresponding to the target pixel in a frame before or after the frame of the target block. The image processing apparatus according to claim 10 , or a DCT coefficient of one or more of the pixels.
前記画像データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得ステップと、
前記注目画素を含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記取得ステップにおいて取得された前記演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、
前記注目画素のクラスに対応した演算係数と、前記値の集合との積和演算を行うことにより、前記注目画素の画素値を求めることで、前記符号化された画像データを復号する予測演算ステップと
を備え、
前記所定の学習処理は、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求めら れる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成し、
前記値の集合と演算係数の積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める
処理である
ことを特徴とする画像処理方法。An image processing method for decoding encoded image data including a two-dimensional DCT coefficient obtained by two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit ,
A class classification step for classifying the pixels constituting the image data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel When,
Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is used as student data to be the learning student by a predetermined learning process. An acquisition step of acquiring a calculation coefficient for each class, which corresponds to a class of a target pixel that is a prediction target pixel, in advance ,
Pixel value information obtained by inverse two-dimensional DCT transformation of the two-dimensional DCT coefficient of the target block that is a block including the target pixel and the two-dimensional DCT coefficient of a peripheral block that is a block around the target block, or The specific frequency component of the DCT coefficient of the peripheral block or the peripheral information that is the one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is used for the product-sum operation with the calculation coefficient acquired in the acquisition step. A generation step for generating a set of several values ;
Prediction calculation step of decoding the encoded image data by obtaining a pixel value of the pixel of interest by performing a product-sum operation with the coefficient of operation corresponding to the class of the pixel of interest and the set of values. It equipped with a door,
The predetermined learning process includes
The pixels forming the supervisor data, based on the code including the feature quantity is prompted from the DCT coefficients of the block including the pixel, and classified into any class of a plurality of classes,
Of the pixels constituting the teacher data, the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, Generate as a set of several values used in the product-sum operation with the operation coefficient,
The calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation of the set of values and the calculation coefficient is obtained for each class.
An image processing method which is a process.
前記画像データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得ステップと、
前記注目画素を含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記取得ステップにおいて取得された前記演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、
前記注目画素のクラスに対応した演算係数と、前記値の集合との積和演算を行うことにより、前記注目画素の画素値を求めることで、前記符号化された画像データを復号する予測演算ステップと
を備え、
前記所定の学習処理は、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成し、
前記値の集合と演算係数の積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める
処理である
ことを特徴とするプログラム。A program for causing a computer to perform image processing for decoding encoded image data including two-dimensional DCT coefficients obtained by performing two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit ,
A class classification step for classifying the pixels constituting the image data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel When,
Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is obtained as student data to be the learning student by a predetermined learning process. An acquisition step of acquiring a coefficient corresponding to a class of a pixel of interest that is a prediction target pixel among calculation coefficients for each class obtained in advance ;
Pixel value information obtained by inverse two-dimensional DCT transformation of the two-dimensional DCT coefficient of the target block that is a block including the target pixel and the two-dimensional DCT coefficient of a peripheral block that is a block around the target block, or The specific frequency component of the DCT coefficient of the peripheral block or the peripheral information that is the one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is used for the product-sum operation with the calculation coefficient acquired in the acquisition step. A generation step for generating a set of several values ;
Prediction calculation step of decoding the encoded image data by obtaining a pixel value of the pixel of interest by performing a product-sum operation with the coefficient of operation corresponding to the class of the pixel of interest and the set of values. It equipped with a door,
The predetermined learning process includes
The pixels constituting the teacher data are classified into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel,
Of the pixels constituting the teacher data, the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, Generate as a set of several values used in the product-sum operation with the operation coefficient,
The calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation of the set of values and the calculation coefficient is obtained for each class.
A program characterized by being a process .
前記画像データを構成する画素を、当該画素を含むブロックのDCT係数から求められ る特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして、所定の学習処理により予め得られたクラスごとの演算係数のうちの、予測対象画素である注目画素のクラスに対応するものを取得する取得ステップと、
前記注目画素を含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記取得ステップにおいて取得された前記演算係数との積和演算に用いる幾つかの値の集合として生成する生成ステップと、
前記注目画素のクラスに対応した演算係数と、前記値の集合との積和演算を行うことにより、前記注目画素の画素値を求めることで、前記符号化された画像データを復号する予測演算ステップと
をコンピュータに実行させるためのプログラムを記録し、
前記所定の学習処理は、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けし、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成し、
前記値の集合と演算係数の積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める
処理である
コンピュータ読み取り可能な記録媒体。Recording medium on which a program for causing a computer to perform image processing for decoding encoded image data including two-dimensional DCT coefficients obtained by performing two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit is recorded Because
Wherein the pixels constituting the image data, on the basis of the code including a feature amount that is calculated from the DCT coefficients of the block including the pixel, the classification of performing class classification to classify into any class of a plurality of classes Steps,
Teacher data, which is image data to be a learning teacher, is encoded by at least two-dimensional DCT transform, and encoded data including a two-dimensional DCT coefficient is obtained as student data to be the learning student by a predetermined learning process. An acquisition step of acquiring a coefficient corresponding to a class of a pixel of interest that is a prediction target pixel among calculation coefficients for each class obtained in advance;
Pixel value information obtained by inverse two-dimensional DCT transformation of the two-dimensional DCT coefficient of the target block that is a block including the target pixel and the two-dimensional DCT coefficient of a peripheral block that is a block around the target block, or The specific frequency component of the DCT coefficient of the peripheral block or the peripheral information that is the one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient of the peripheral block is used for the product-sum operation with the calculation coefficient acquired in the acquisition step. A generation step for generating a set of several values ;
Prediction calculation step of decoding the encoded image data by obtaining a pixel value of the pixel of interest by performing a product-sum operation with the coefficient of operation corresponding to the class of the pixel of interest and the set of values. Record the program that causes the computer to execute and
The predetermined learning process includes
The pixels constituting the teacher data are classified into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel,
Of the pixels constituting the teacher data, the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, Generate as a set of several values used in the product-sum operation with the operation coefficient,
The calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing the product-sum operation of the set of values and the calculation coefficient is obtained for each class.
A computer-readable recording medium that is a process .
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして出力する生徒データ生成手段と、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類手段と、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成する生成手段と、
前記値の集合と演算係数の積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める学習を行う学習手段と
を備えることを特徴とする画像処理装置。Learning arithmetic coefficients, which are coefficients used for product-sum operations used to decode encoded image data including two-dimensional DCT coefficients obtained by performing two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit An image processing apparatus that
Student data generation means for encoding teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT conversion, and outputting encoded data including a two-dimensional DCT coefficient as student data serving as the learning student When,
Class classification means for performing class classification for classifying the pixels constituting the teacher data into any one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel When,
Of the pixels constituting the teacher data , the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, Generating means for generating a set of several values used for the product-sum operation with the operation coefficient ;
Learning means for performing learning for each class to calculate the calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing a product-sum operation of the set of values and the calculation coefficient An image processing apparatus comprising:
ことを特徴とする請求項16に記載の画像処理装置。The image processing apparatus according to claim 16 , wherein the peripheral block is a block spatially or temporally adjacent to the block of interest.
ことを特徴とする請求項16に記載の画像処理装置。The image processing apparatus according to claim 16 , wherein the pixel value obtained as the peripheral information is a pixel value of a pixel of a block adjacent to the block of interest.
ことを特徴とする請求項16に記載の画像処理装置。The image processing apparatus according to claim 16 , wherein the pixel value obtained as the peripheral information is a pixel value of a block adjacent pixel that is a pixel adjacent to the target block in a block adjacent to the target block. .
ことを特徴とする請求項17に記載の画像処理装置。The pixel values obtained as the peripheral information are pixel values of two pixels on the left and right of the same row as the attention teacher data and two pixels above and below the same column as the attention teacher data in the block adjacent pixels. The image processing apparatus according to claim 17 , wherein the image processing apparatus is a pixel value.
ことを特徴とする請求項19に記載の画像処理装置。The pixel value obtained as the peripheral information includes a pixel value closer to the attention teacher data among the two pixels on the left and right of the same row as the attention teacher data in the block adjacent pixels, and the attention teacher data. The image processing apparatus according to claim 19 , wherein the pixel value is a pixel value closer to the attention teacher data of two pixels located above and below the same column.
ことを特徴とする請求項16に記載の画像処理装置。The image processing apparatus according to claim 16 , wherein the frequency component obtained as the peripheral information is a one-dimensional DCT coefficient obtained from the two-dimensional DCT coefficient.
ことを特徴とする請求項22に記載の画像処理装置。The image processing apparatus according to claim 22 , wherein the frequency component obtained as the peripheral information is the one-dimensional DCT coefficient corresponding to a position adjacent to the target block in a block adjacent to the target block. .
ことを特徴とする請求項16に記載の画像処理装置。The image processing according to claim 16 , wherein the peripheral information is pixel value information of one or more pixels in a frame before or after the frame of the block of interest, or DCT coefficients of the one or more pixels. apparatus.
ことを特徴とする請求項24に記載の画像処理装置。The peripheral information is pixel value information of one or more pixels including a pixel at the same position as the attention teacher data in a frame before or after the frame of the target block, or DCT coefficients of the one or more pixels. 25. The image processing apparatus according to claim 24 .
前記周辺情報は、前記注目ブロックのフレームの前または後のフレームにおける、前記注目教師データに対応する位置から前記動きベクトルに対応する分だけ移動した位置にある画素を含む1以上の画素の画素値、またはその1以上の画素のDCT係数である
ことを特徴とする請求項24に記載の画像処理装置。The encoded data includes a motion vector representing the motion of the image data,
The peripheral information is a pixel value of one or more pixels including a pixel at a position moved by an amount corresponding to the motion vector from a position corresponding to the attention teacher data in a frame before or after the frame of the target block. The image processing apparatus according to claim 24 , or a DCT coefficient of one or more of the pixels.
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして出力する生徒データ生成ステップと、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成する生成ステップと、
前記値の集合と演算係数との積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める学習を行う学習ステップと
を備えることを特徴とする画像処理方法。Learning arithmetic coefficients, which are coefficients used for product-sum operations used to decode encoded image data including two-dimensional DCT coefficients obtained by performing two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit An image processing method for
Student data generation step of encoding teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT transformation, and outputting encoded data including a two-dimensional DCT coefficient as student data serving as the learning student When,
A class classification step for classifying the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel When,
Of the pixels constituting the teacher data , the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, A generation step of generating as a set of several values used for the product-sum operation with the operation coefficient ;
Learning to learn for each class the calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing a product-sum operation of the set of values and the calculation coefficient An image processing method comprising the steps of:
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして出力する生徒データ生成ステップと、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成する生成ステップと、
前記値の集合と演算係数との積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める学習を行う学習ステップと
を備えることを特徴とするプログラム。Learning arithmetic coefficients, which are coefficients used for product-sum operations used to decode encoded image data including two-dimensional DCT coefficients obtained by performing two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit A program for causing a computer to perform image processing,
Student data generation step of encoding teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT transformation, and outputting encoded data including a two-dimensional DCT coefficient as student data serving as the learning student When,
A class classification step for classifying the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel When,
Of the pixels constituting the teacher data , the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, A generation step of generating as a set of several values used for the product-sum operation with the operation coefficient ;
Learning to learn for each class the calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing a product-sum operation of the set of values and the calculation coefficient A program comprising the steps.
学習の教師となる画像データである教師データを、少なくとも2次元DCT変換することにより符号化し、2次元DCT係数を含む符号化データを、前記学習の生徒となる生徒データとして出力する生徒データ生成ステップと、
前記教師データを構成する画素を、当該画素を含むブロックのDCT係数から求められる特徴量を含むコードに基づいて、複数のクラスのうちのいずれかのクラスにクラス分けするクラス分類を行うクラス分類ステップと、
前記教師データを構成する画素のうちの、予測対象画素である注目教師データを含むブロックである注目ブロックの前記2次元DCT係数と、前記注目ブロックの周辺のブロックである周辺ブロックの前記2次元DCT係数を逆2次元DCT変換して得られる画素値情報または前記周辺ブロックのDCT係数の特定の周波数成分または前記周辺ブロックの2次元DCT係数から得られる1次元DCT係数である周辺情報とを、前記演算係数との前記積和演算に用いる幾つかの値の集合として生成する生成ステップと、
前記値の集合と演算係数との積和演算を行うことにより得られる前記注目教師データの予測値の予測誤差を、統計的に最小にする前記演算係数を、前記クラスごとに求める学習を行う学習ステップと
をコンピュータに実行させるためのプログラムを記録したコンピュータ読み取り可能な記録媒体。An operation which is a coefficient used for a predetermined product-sum operation used to decode encoded image data including a two-dimensional DCT coefficient obtained by performing two-dimensional DCT (Discrete Cosine Transform) conversion at least in a predetermined block unit A recording medium on which a program for causing a computer to perform image processing for learning a coefficient is recorded,
Student data generation step of encoding teacher data, which is image data serving as a learning teacher, by performing at least two-dimensional DCT transformation, and outputting encoded data including a two-dimensional DCT coefficient as student data serving as the learning student When,
A class classification step for classifying the pixels constituting the teacher data into one of a plurality of classes based on a code including a feature amount obtained from a DCT coefficient of a block including the pixel When,
Of the pixels constituting the teacher data , the two-dimensional DCT coefficient of a target block that is a block including target teacher data that is a prediction target pixel, and the two-dimensional DCT of a peripheral block that is a block around the target block. Pixel value information obtained by inverse two-dimensional DCT conversion of coefficients, specific frequency components of DCT coefficients of the peripheral blocks, or peripheral information that is one-dimensional DCT coefficients obtained from the two-dimensional DCT coefficients of the peripheral blocks, A generation step of generating as a set of several values used for the product-sum operation with the operation coefficient ;
Learning to learn for each class the calculation coefficient that statistically minimizes the prediction error of the predicted value of the attention teacher data obtained by performing a product-sum operation of the set of values and the calculation coefficient A computer-readable recording medium having recorded thereon a program for causing a computer to execute the steps.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002061401A JP4154903B2 (en) | 2002-03-07 | 2002-03-07 | Image processing apparatus, image processing method, program, and recording medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002061401A JP4154903B2 (en) | 2002-03-07 | 2002-03-07 | Image processing apparatus, image processing method, program, and recording medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003264836A JP2003264836A (en) | 2003-09-19 |
| JP4154903B2 true JP4154903B2 (en) | 2008-09-24 |
Family
ID=29195730
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002061401A Expired - Fee Related JP4154903B2 (en) | 2002-03-07 | 2002-03-07 | Image processing apparatus, image processing method, program, and recording medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4154903B2 (en) |
-
2002
- 2002-03-07 JP JP2002061401A patent/JP4154903B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003264836A (en) | 2003-09-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11159789B2 (en) | Generative adversarial network based intra prediction for video coding | |
| EP3354030B1 (en) | Methods and apparatuses for encoding and decoding digital images through superpixels | |
| JP5128794B2 (en) | Intra-prediction coding and decoding method and apparatus for video | |
| Kim et al. | Hierarchical prediction and context adaptive coding for lossless color image compression | |
| JP5143120B2 (en) | Image encoding method and apparatus, decoding method and apparatus | |
| JP2009530958A (en) | Image encoding method and apparatus, decoding method and apparatus | |
| JP2009518940A (en) | Image encoding method and apparatus, decoding method and apparatus | |
| EP3590193B1 (en) | Method and apparatus for encoding and decoding digital images or video streams | |
| US9438920B2 (en) | Picture encoding method, picture encoding apparatus, picture decoding method and picture decoding apparatus | |
| JP4238516B2 (en) | Data conversion device, data conversion method, learning device, learning method, program, and recording medium | |
| JP2006005659A (en) | Image encoding apparatus and method | |
| WO2010067668A1 (en) | Image encoder and image decoder | |
| JP4154903B2 (en) | Image processing apparatus, image processing method, program, and recording medium | |
| JP4154902B2 (en) | Image processing apparatus, image processing method, program, and recording medium | |
| JP4154647B2 (en) | Data processing apparatus, data processing method, program, and recording medium | |
| JP4147789B2 (en) | Image processing apparatus, image processing method, program, and recording medium | |
| US7424057B2 (en) | Data format transcoding apparatus and associated method | |
| JP4081745B2 (en) | Decoding device and decoding method, learning device and learning method, program, and recording medium | |
| JP4000589B2 (en) | Decoding device, decoding method, program, and recording medium | |
| AU2023306422B2 (en) | Image decoding method and apparatus based on neural network, image encoding method and apparatus based on neural network, and device thereof | |
| WO2026007010A1 (en) | System and method for unified reference picture synthesis | |
| JP4770704B2 (en) | Image processing apparatus, image processing method, and program | |
| JP2001320277A (en) | Data processing device, data processing method, and recording medium | |
| JP2001320587A (en) | Data processing device, data processing method, and recording medium | |
| JP4491701B2 (en) | Data processing apparatus, data processing method, and recording medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050223 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080104 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080303 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080327 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080526 |
|
| 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: 20080617 |
|
| 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: 20080630 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110718 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110718 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110718 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120718 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120718 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130718 Year of fee payment: 5 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |