JP3866580B2 - Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs - Google Patents

Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs Download PDF

Info

Publication number
JP3866580B2
JP3866580B2 JP2002020876A JP2002020876A JP3866580B2 JP 3866580 B2 JP3866580 B2 JP 3866580B2 JP 2002020876 A JP2002020876 A JP 2002020876A JP 2002020876 A JP2002020876 A JP 2002020876A JP 3866580 B2 JP3866580 B2 JP 3866580B2
Authority
JP
Japan
Prior art keywords
encoding
significant
orthogonal transform
decoding
image
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
Application number
JP2002020876A
Other languages
Japanese (ja)
Other versions
JP2003224851A (en
Inventor
英明 木全
由幸 八島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2002020876A priority Critical patent/JP3866580B2/en
Publication of JP2003224851A publication Critical patent/JP2003224851A/en
Application granted granted Critical
Publication of JP3866580B2 publication Critical patent/JP3866580B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画面を分割したブロックを単位に直交変換を使って画像を符号化する画像符号化装置と、直交変換を使って画像を符号化することで生成された符号化データを画面を分割したブロックを単位に復号する画像復号装置と、その画像符号化装置の実現に用いられる画像符号化プログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体と、その画像復号装置の実現に用いられる画像復号プログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体とに関する。
【0002】
【従来の技術】
値の分散の小さい複数の情報をまとめて符号化する場合に直交変換が用いられている。直交変換によれば、低周波成分に電力が集中するため、情報量を削減することができる。
【0003】
このような直交変換後の成分を符号化する場合には、一般的にランレングス符号化が応用される。
【0004】
直交変換係数は多次元行列となるが、その多次元行列の各成分が、多数の同じ値(A)と、それと異なる値(B1,B2,・・・,Bn)とで構成されている場合、まず、多次元行列中の成分を、或る定められた順序でスキャンして1次元配列にする。この1次元配列中では、同じ値(A)が多数を占めているため、値(A)が連続して並ぶ場合が多い。
【0005】
そこで、値(A)の並んだ成分の数をランレングス符号化する方法が用いられている。あるいは、値(A)の並ぶ数(LA)と、値(A)の前後に存在する値(Bi;i=1〜n)との間に相関がある場合には、(LA)と(Bi)との組み合わせに対して、1つの可変長符号を割り当てる2次元可変長符号化を行う方法もある。ここで、一般的に、(LA)をラン、(Bi)をレベルと呼ぶ。
【0006】
この方法は、ラスト情報を使わずに可変長符号を構成するのでラスト非複合手段の1手法である。
【0007】
例えば、2次元画像の符号化では、一般に、画素をDCTした後の係数を2次元可変長符号化する。
【0008】
まず、各画素を縦横8画素のブロックに分割し、ブロック毎に2次元DCTする。2次元DCTでは、低周波数部分には0以外の値が集中し、逆に高周波数部分には値0が多くなる性質がある。このDCT係数を8×8の2次元行列とみなす。低周波数部分から高周波数部分へジグザグスキャンして1次元配列にする。値が0の係数の連続する数をランとし、その後の係数の値をレベルとして、2次元可変長符号化する。
【0009】
予めランとレベルとの各組み合わせに対して、1つの符号を対応させたルックアップテーブルを作っておき、このルックアップテーブルを利用して2次元可変長符号化する。ルックアップテーブルに無い組み合わせの場合には、エスケープ符号を使った固定長符号化を行う。一般的に固定長符号化の方が符号長が長くなる。あるいは、2次元可変長符号化を行う方法として、ルックアップテーブルを利用しない、算術符号化を用いることも可能である。
【0010】
また、多次元行列中の値(Bi)と、値(A)の長さ(LA)との2次元可変長符号化を行う前に、値(Bi)を量子化する方法もある。量子化によって、値(Bi)がより小さい値(BQi)に変換されるとすると、値(BQi)と(LA)との組み合わせを2次元可変長符号化する。一般的に、2次元可変長符号化では、値(Bi)が小さいほど、より短い符号長の符号を割り当てるため、量子化により符号量の削減が可能となる。
【0011】
これらの2次元可変長符号化では、2次元DCTの最後の係数を符号化した後に、EOBという特有なビットパターンを持つ固定長符号を出力する。このEOBは、復号側でビット配列から2次元DCTの係数を可変長復号する際に、復号するべき係数が終わったことを知るために利用される。
【0012】
他方、値(Bi)と(LA)とを可変長符号化する際に、値(Bi)が、多次元行列中で最後の値(A)以外の成分かどうかを示すラスト情報を含めて符号化するという方法を用いる3次元可変長符号化方法がある。
【0013】
この方法は、ラスト情報を使って可変長符号を構成するのでラスト複合手段の1手法である。
【0014】
例えば画像符号化方式MPEG−4では、2次元DCTした係数のうち、値が0以外の係数(上述のBi)を符号化する際に、最後の0以外の係数(Bi)でない場合にはラスト情報を0に設定し、最後の0以外の係数(Bi)である場合にはラスト情報を1に設定し、ランとレベルとラスト情報との3次元可変長符号化を行う。
【0015】
ランとレベルとラスト情報との各組み合わせに対して、1つの符号を対応させたルックアップテーブルを予め作っておき、それを参照しながら3次元可変長符号化を行う。ルックアップテーブルに無い組み合わせの場合には、エスケープ符号を使った固定長符号化を行う。
【0016】
ラスト複合手段で構成した可変長符号を使う場合(例えば3次元可変長符号化)は、ラスト非複合手段で構成した可変長符号を使う場合(例えば2次元可変長符号化)に比べて、ラスト情報が1となる成分の数が符号化する成分の全体数に対して或る程度多い割合を占める場合に有効である。行列内の符号化するべき成分の数が少ない場合に、その割合が大きくなるので、そのような場合には、ラスト複合手段で構成した可変長符号を使うことが有効である。
【0017】
そのため、例えば3次元可変長符号化では、行列内の符号化するべき成分が少ない場合には、ランの値が大きくなる傾向があるため、ルックアップテーブルを使って符号化する場合には、ラスト1に対して、ランの値が小さい場合から大きい場合まで可変長符号を用意しておく。そのため、2次元可変長符号化で可変長符号を用意していたランとレベルのうち、使用頻度の低いものから順にルックアップテーブルから削除される。
【0018】
また、3次元可変長符号化で用いるルックアップテーブルと、2次元可変長符号化で用いるルックアップテーブルとの間で、予め用意されるランとレベルとの組み合わせに対する可変長符号の符号量の傾向も異なる。一般的に、3次元可変長符号化では、用意されるレベルの値は小さく、ランの値は小さい場合から大きい場合まで用意される傾向がある。
【0019】
また、3次元画像符号化で3次元DCTを使う方法もある。この場合には、3次元DCT係数をジグザグスキャンして1次元配列にする。その後、2次元画像符号化と同様に、1次元配列に対して、2次元可変長符号化あるいは3次元可変長符号化を行う。
【0020】
【発明が解決しようとする課題】
ラスト複合手段は、行列内で符号化するべき成分の数が少ない場合、すなわちランの長さが長くなる場合には有効であるが、成分の数が多い場合には、逆にラスト非複合手段よりも符号量が多くなる。
【0021】
成分の数は、直交変換する前の情報の分散等に依存して異なるため、情報によっては、ラスト複合手段を使うことにより符号化効率が低下する。
【0022】
例えば画像符号化の場合には、一般的にマクロブロック等の領域毎にDCTを行う。画像内容は領域毎に異なるため、2次元可変長符号化の方が3次元可変長符号化の方よりも符号量の少ない領域がある。
【0023】
また、フレーム間予測符号化を使う場合には、フレーム間の相関を使って符号化するインター符号化と、フレーム間の相関を使わないイントラ符号化のいずれかを選択できるが、一般的にイントラ符号化では成分の数が多い傾向があり、インター符号化では成分の数が少ない傾向がある。
【0024】
従って、画像シーケンス全体で2次元可変長符号化あるいは3次元可変長符号化を適用すると、前者の場合(画像シーケンス全体で2次元可変長符号化を用いる場合)には、インター符号化の符号化効率が低下し、後者の場合(画像シーケンス全体で3次元可変長符号化を用いる場合)には、イントラ符号化の符号化効率が低下する。
【0025】
しかるに、従来技術では、符号化対象の情報全体に対して、2次元可変長符号化を適用するようにしているか、3次元可変長符号化を適用するようにしている。
【0026】
これから、従来技術に従っていると、符号化効率が低下するという問題点がある。
【0027】
本発明はかかる事情に鑑みてなされたものであって、画像などを符号化・復号するときにあって、2次元可変長符号化・復号と3次元可変長符号化・復号を適応的に選択して符号化・復号を行うことができるようにすることで、符号化効率の向上を実現する新たな符号化・復号技術の提供を目的とする。
【0035】
【課題を解決するための手段】
(1)この目的を達成するために、本発明の画像符号化装置は、画面を分割したブロックを単位に直交変換を使って画像を符号化するという構成を採るときにあって、(イ)非有意な直交変換係数の連続する数と、有意な直交変換係数の値との1つの組み合わせに対して1つの可変長符号を割り当てる第1の符号化手段と、(ロ)非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報との1つの組み合わせに対して1つの可変長符号を割り当てる第2の符号化手段と、(ハ)2つの符号化手段のどちらを用いて符号化を行うのかを決定する決定手段と、(ニ)決定手段の決定結果に基づいて、2つの符号化手段のどちらかを選択する選択手段とを備えるように構成する。
この構成を採るときに、決定手段は、第1の符号化手段による符号量と第2の符号化手段による符号量とを比較するか、あるいは、第1の符号化手段による符号予測量と第2の符号化手段による符号予測量とを比較して、その比較に基づいて、2つの符号化手段の内の少ない符号量となる方の符号化手段を用いることを決定することがあり、この場合には、2つの符号化手段のどちらを用いたのかを示す情報を符号化する手段を備えることになる。
【0037】
このように構成される本発明の画像符号化装置では、第1の符号化手段と第2の符号化手段とを備えるときにあって、(イ)周囲の符号化済みブロックにおける、直交変換における有意係数の総数または有意係数間の距離の平均値に基づいて、例えば、直交変換の対象となる画像の領域毎に、2つの符号化手段のどちらを用いて符号化を行ったらより効率的な符号化を行えるようになるのかを判断することで、2つの符号化手段のどちらを用いて符号化を行うのかを決定したり、(ロ)動画像をフレーム間予測符号化方法を使って符号化するときにあって、直交変換を行う対象の情報をフレーム間の相関を使って作成したのか、フレーム間の相関を使わずに作成したのかにより、例えば、1つ又は複数のフレーム毎や、フレーム間予測するフレームから切り出される直交変換の対象となる画像の領域毎に、2つの符号化手段のどちらを用いて符号化を行ったらより効率的な符号化を行えるようになるのかを判断することで、2つの符号化手段のどちらを用いて符号化を行うのかを決定する。
【0038】
例えば、決定手段は、周囲の符号化済みブロックにおける、直交変換における有意係数間の距離の平均値から、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも小さい場合には、第1の符号化手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、第2の符号化手段を用いることを決定する。
また、決定手段は、周囲の符号化済みブロックにおける、直交変換における有意係数の総数から、現ブロックの有意係数の総数の予測値を求め、その予測値が予め設定した値よりも大きい場合には、第1の符号化手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、第2の符号化手段を用いることを決定する。
また、決定手段は、周囲の符号化済みブロックにおける、直交変換における有意係数間の距離の平均値から、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも大きい場合には、第2の符号化手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、第1の符号化手段による符号量と第2の符号化手段による符号量とを比較するか、あるいは、第1の符号化手段による符号予測量と第2の符号化手段による符号予測量とを比較して、その比較に基づいて、2つの符号化手段の内の少ない符号量となる方の符号化手段を用いることを決定する。
ここで、決定手段がこの決定方法を用いる場合には、復号側で、どちらの符号化手段を用いて符号化を行ったのかを知ることができないので、2つの符号化手段のどちらを用いたのかを示す情報を符号化することになる。
また、決定手段は、周囲の符号化済みブロックにおける、直交変換における有意係数の総数から、現ブロックの有意係数の総数の予測値を求め、その予測値が予め設定した値よりも小さい場合には、第2の符号化手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、第1の符号化手段による符号量と第2の符号化手段による符号量とを比較するか、あるいは、第1の符号化手段による符号予測量と第2の符号化手段による符号予測量とを比較して、その比較に基づいて、2つの符号化手段の内の少ない符号量となる方の符号化手段を用いることを決定する。
ここで、決定手段がこの決定方法を用いる場合には、復号側で、どちらの符号化手段を用いて符号化を行ったのかを知ることができないので、2つの符号化手段のどちらを用いたのかを示す情報を符号化することになる。
また、決定手段は、フレーム間の相関を使わないIフレームと、直前のフレームとの差分を符号化するPフレームとで構成される符号化データの場合、Iフレームの画像情報を第1の符号化手段を使って符号化し、Pフレームの画像情報(差分情報)を第2の符号化手段を使って符号化することで符号化効率を向上できるようになることから、1つ又は複数のフレーム毎に、この判断基準に従って、2つの符号化手段のどちらを用いて符号化を行うのかを決定する。このとき、領域毎にフレーム間の相関を使うか使わないかを選択できる場合には、領域毎に、この判断基準に従って、2つの符号化手段のどちらを用いて符号化を行うのかを決定することができる。
【0039】
そして、その決定に基づいて、その決定した符号化手段を用いて符号化を行うように処理する。
【0041】
このようにして、本発明の画像符号化装置によれば、直交変換を使って画像を符号化するという構成を採るときにあって、2次元可変長符号化手段の符号化と3次元可変長符号化手段の符号化とを適応的に選択して符号化を行うことで、符号化効率を向上できるようになる。
【0042】
ここで、本発明の画像符号化装置を構成する各処理手段は、コンピュータプログラムにより実現可能であり、このコンピュータプログラムは、コンピュータが読取可能な適当な記録媒体に記録することができる。
【0043】
次に、本発明の画像符号化装置が実行する、直交変換における有意係数の総数や有意係数間の距離の平均値といった周囲の符号化済みの符号化データに基づいてどちらの符号化手段を用いて符号化を行うのかということを決定する処理について説明する。
【0044】
すでに符号化した領域の符号化データとしては、直交変換係数の総数、ランの平均値などの特徴量が挙げられる。いずれも、現領域の特徴量と周囲の領域の特徴量との変化が急激でない。そのため、周囲の領域の特徴量から現領域の特徴量を予測することが可能である。
【0045】
一方、特徴量の大小により、符号量のより少ない可変長符号化を予測することが可能である。例えば、直交変換係数の総数については、その総数が多いほど、ランの小さい場合に符号長が短くなる可変長符号化の方が符号化効率が高くなることが予想できる。同様にして、ランの平均値については、その平均値が小さいほど、ランの小さい場合に符号長が短くなる可変長符号化の方が符号化効率が高くなることが予想できる。
【0046】
これから、本発明の画像符号化装置では、例えば、すでに符号化した領域のランの平均値から、現領域のランの平均値を予想して、その予想した値が予め設定した閾値よりも小さい場合には、ランの小さい場合に符号長が短くなる2次元可変長符号化を選択するように処理するのである。
【0047】
このようにして、符号化済みの符号化データに基づいて、2つの符号化手段のどちらを用いて符号化を行うのかを決定する場合に、現領域の特徴量の予測の確からしさが低いときには、それに基づいて符号化手段の選択を行うことができないことから、例えば、2つの符号化手段の符号量や符号予測量を算出して、それに基づいて符号化手段の選択を行うことになる。
【0048】
このときには、復号側で、どちらの符号化手段を用いて符号化を行ったのかを知ることができないので、どちらの符号化手段を用いて符号化を行ったのかを示す情報を符号化する必要がある。
【0049】
例えば、ランの平均値を予測して符号化手段を選択する場合に、その予測されるランの値が予め設定した閾値よりも小さい場合には、予測の確からしさが低くなるので、2つの符号化手段の符号量や符号予測量を算出して、それに基づいて符号化手段の選択を行うとともに、どちらの符号化手段を用いて符号化を行ったのかを示す情報(可変長選択符号)を符号化するのである。
【0050】
もちろん、現領域の特徴量の予測の確からしさに関係なく、2つの符号化手段のどちらを用いて符号化を行ったのかについて、それを示す可変長選択符号を符号化するという構成を採ってもよいが、復号側で知ることができない場合のみに可変長選択符号を符号化するという構成を採ると、そのような全ての領域に対して可変長選択符号を符号化する場合に比べて、符号化効率を向上できるようになる。
【0051】
一方、本発明を拡張することで、N次元行列を符号化するときにあって、ランを使う代わりに、行列内の2成分間の位置の差分情報を使うことができる。この方法を用いた符号化装置及び復号装置では、ランの代わりに、2成分間の位置の差分のノルムを使うことができる。
【0052】
例えば、図1のような2次元行列を符号化するときに、図2に示すようなジグザグスキャンを使うことで、図3に示すような有意な値の1次元配列が得られる場合には、1つ前に位置する有意な値の行列成分(x,y)(x,y=0〜7)について、xが偶数または0でyが0の場合には図4(a)の座標系を適用し、それ以外でx+yが偶数の場合には図4(b)の座標系を適用し、x+yが奇数の場合には図4(c)の座標系を適用することで、図5に示すように、ランの代わりに、2成分間の位置の差分のノルムを使うことができる。
【0053】
この場合には、2成分間の位置の差分はN次元の情報となるため、符号化済みの符号化データなどに基づいて、N次元可変長符号化手段と、ラスト情報を組み合わせた(N+1)次元可変長符号化手段という2つの符号化手段のいずれかを選択するという構成を採ることになる。
【0054】
この構成を採る場合にも、符号化済みの符号化データに基づいて、2つの符号化手段のどちらを用いて符号化を行うのかを決定する場合に、予測の確からしさが低いときには、それに基づいて符号化手段の選択を行うことができないことから、例えば、2つの符号化手段の符号量や符号予測量を算出して、それに基づいて符号化手段の選択を行うことになる。
【0055】
このときには、復号側で、どちらの符号化手段を用いて符号化を行ったのかを知ることができないので、どちらの符号化手段を用いて符号化を行ったのかを示す情報を符号化する必要がある。
【0056】
もちろん、予測の確からしさに関係なく、2つの符号化手段のどちらを用いて符号化を行ったのかについて、それを示す可変長選択符号を符号化するという構成を採ってもよいが、復号側で知ることができない場合のみに可変長選択符号を符号化するという構成を採ると、そのような全ての領域に対して可変長選択符号を符号化する場合に比べて、符号化効率を向上できるようになる。
【0057】
)また、この目的を達成するために、本発明の画像復号装置は、直交変換を使って画像を符号化することで生成された符号化データを画面を分割したブロックを単位に復号するという構成を採るときにあって、(イ)1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値とを復号する第1の復号手段と、(ロ)1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報とを復号する第2の復号手段と、(ハ)2つの復号手段のどちらを用いて復号を行うのかを決定する決定手段と、(ニ)決定手段の決定結果に基づいて、2つの復号手段のどちらかを選択する選択手段とを備えるように構成する。
【0058】
この構成を採るときに、符号化手段の種別を示す情報の符号化データが生成されていることがあり、このときには、その符号化データを復号する手段を備えることになる。
【0059】
このように構成される本発明の画像復号装置では、第1の復号手段と第2の復号手段とを備えるときにあって、(イ)周囲の復号済みブロックにおける、直交変換における有意係数の総数または有意係数間の距離の平均値に基づいて、2つの復号手段のどちらを用いて復号を行うのかを決定したり、(ロ)フレーム間予測符号化方法を使って符号化された動画像を復号対象とするときにあって、直交変換を行う対象の情報をフレーム間の相関を使って作成したのか、フレーム間の相関を使わずに作成したのかを示す情報の復号データに従って、2つの復号手段のどちらを用いて復号を行うのかを決定したり、(ハ)符号化手段の種別を示す情報の復号データに従って、2つの復号手段のどちらを用いて符号化を行うのかを決定する。
例えば、決定手段は、周囲の復号済みブロックにおける、直交変換における有意係数間の距離の平均値から、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも小さい場合には、第1の復号手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、第2の復号手段を用いることを決定する。
また、決定手段は、周囲の復号済みブロックにおける、直交変換における有意係数の総数から、現ブロックの有意係数の総数の予測値を求め、その予測値が予め設定した値よりも大きい場合には、第1の復号手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、第2の復号手段を用いることを決定する。
また、決定手段は、周囲の復号済みブロックにおける、直交変換における有意係数間の距離の平均値から、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも大きい場合には、第2の復号手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、第1の復号手段と第2の復号手段のどちらを用いて復号を行うべきかを示す情報の符号化データを復号することで、2つの復号手段のどちらを用いて復号を行うのかを決定する。
また、決定手段は、周囲の復号済みブロックにおける、直交変換における有意係数の総数から、現ブロックの有意係数の総数の予測値を求め、その予測値が予め設定した値よりも小さい場合には、第2の復号手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、第1の復号手段と第2の復号手段のどちらを用いて復号を行うべきかを示す情報の符号化データを復号することで、2つの復号手段のどちらを用いて復号を行うのかを決定する。
また、決定手段は、直交変換を行う対象の情報をフレーム間の相関を使わずに作成した場合には、第1の復号手段を用いることを決定し、フレーム間の相関を使って作成した場合には、第2の復号手段を用いることを決定する。
【0060】
そして、その決定に基づいて、その決定した復号手段を用いて復号を行うように処理する。
【0061】
このようにして、本発明の画像復号装置によれば、2次元可変長符号化手段の符号化と3次元可変長符号化手段の符号化とを適応的に選択して符号化を行うという構成を採る本発明の画像符号化装置により生成された符号化データを復号できるようになる。
【0062】
ここで、本発明の画像復号装置を構成する各処理手段は、コンピュータプログラムにより実現可能であり、このコンピュータプログラムは、コンピュータが読取可能な適当な記録媒体に記録することができる。
【0063】
【発明の実施の形態】
以下、実施の形態に従って本発明を詳細に説明する。
【0064】
画像を縦横8画素のブロックに分割して、画像情報をDCTし、そのDCT係数を可変長符号化する画像符号化装置と、その画像符号化装置の符号化データを復号する画像復号装置の動作例とについて2例示す。
【0065】
先ず最初に、ランの平均値を使って、2次元可変長符号化と3次元可変長符号化を選択する手法について説明する。
【0066】
図6に、この手法を実現する本発明の画像符号化装置の一実施形態例を図示する。
【0067】
この実施形態例に従う場合、本発明の画像符号化装置は、現ブロックの画像情報をDCTするDCT部101と、DCT係数を2次元可変長符号化する2次元可変長符号化部103と、DCT係数を3次元可変長符号化する3次元可変長符号化部104と、可変長符号化方式を選択する可変長符号化選択部102と、DCT係数のランの平均値を求めて蓄積するラン情報蓄積部105と、ラン情報蓄積部105に蓄積したランの平均値から現ブロックのランの平均値を予測するラン情報予測部106とを備える。
【0068】
現ブロックのランの平均値の予測値Pは、図7に示すブロック位置のランの平均値RUN(i)から、
P=ΣRUN(i)/4 但し、Σはi=0〜3の総和
を使って予測するものとする。
【0069】
可変長符号化選択部102は、予測したランの平均値の予測値Pが、
P≦Th 但し、Th は閾値
を満たす場合には2次元可変長符号化部103を選択し、満たさない場合には3次元可変長符号化部104を選択する。ここで、閾値Thは予め設定されており、例えば、Th=2とする。
【0070】
すなわち、現ブロックの予測したランの平均値Pが閾値Thよりも小さい場合には、2次元可変長符号化部103を用いた方が符号化効率を高められるので2次元可変長符号化部103を選択し、逆に大きい場合には、3次元可変長符号化部104を用いた方が符号化効率を高められるので3次元可変長符号化部104を選択するのである。
【0071】
なお、画面の上端のブロックには、図7中のB1,B2,B3に相当するブロックが存在せず、また、画面の左端のブロックには、図7中のB0,B1に相当するブロックが存在しない。このような場合には、存在しないブロックのラン長は予め定めた所定の値であるとして、上述のラン平均値の予測値Pを計算する。例えば、この所定の値を0とすると、画面左隅のブロックについては、必ず2次元可変長符号化部103が選択されることになる。
【0072】
次に、図8に示すブロックAとブロックBとを符号化する手順について詳細に説明する。
【0073】
ここで、ラン情報蓄積部105には、ブロックA以前のブロックであるブロックP,Q,R,S,Tのランの平均値が少なくとも蓄積されているものとする。また、ブロックP,Q,R,S,Tのランの平均値を、それぞれRUN(P),RUN(Q),RUN(R),RUN(S),RUN(T)で表し、RUN(P)=4,RUN(Q)=3,RUN(R)=2,RUN(S)=1,RUN(T)=1であったとする。
【0074】
このような前提の元で、本発明の画像符号化装置は、まずブロックAを次のように符号化する。
【0075】
まず、DCT部101は、ブロックAの画像情報をDCTする。これを受けて、ラン情報予測部106は、ラン情報蓄積部105に蓄積されたブロックP,Q,R,Sのランの平均値〔RUN(P),RUN(Q),RUN(R),RUN(S)〕を使って、ブロックAのランの平均値を予測する。上述した算出式に従って、この予測値PはP=3と予測される。
【0076】
これから、可変長符号化選択部102は、上述の選択ルールに従って3次元可変長符号化部104を選択する。この選択を受けて、3次元可変長符号化部104は、DCT係数を3次元可変長符号化し、符号化データを出力する。
【0077】
このとき、ラン情報蓄積部105は、DCT部101で得られた複数のランから、ブロックAのランの平均値を求めて蓄積する。このランの平均値がRUN(A)=4であったとする。
【0078】
続いて、本発明の画像符号化装置は、ブロックBを次のように符号化する。
【0079】
まず、DCT部101は、ブロックBの画像情報をDCTする。これを受けて、ラン情報予測部106は、ラン情報蓄積部105に蓄積されたブロックA,R,S,Tのランの平均値〔RUN(A),RUN(R),RUN(S),RUN(T)〕を使って、ブロックBのランの平均値を予測する。上述した算出式に従って、この予測値PはP=2と予測される。
【0080】
これから、可変長符号化選択部102は、上述の選択ルールに従って2次元可変長符号化部103を選択する。この選択を受けて、2次元可変長符号化部103は、DCT係数を2次元可変長符号化し、符号化データを出力する。
【0081】
このとき、ラン情報蓄積部105は、DCT部101で得られた複数のランから、ブロックBのランの平均値を求めて蓄積する。
【0082】
本発明の画像符号化装置は、以上の処理を繰り返し、すべての画面内のブロックを符号化する。
【0083】
図9に、この本発明の画像符号化装置により生成された符号化データを復号する本発明の画像復号装置の一実施形態例を図示する。
【0084】
この実施形態例に従う場合、本発明の画像復号装置は、DCT係数を逆DCTするIDCT部109と、符号化データを2次元可変長復号する2次元可変長復号部107と、符号化データを3次元可変長復号する3次元可変長復号部108と、可変長符号化方式を選択する可変長符号化選択部102と、DCT係数のランの平均値を求めて蓄積するラン情報蓄積部105と、ラン情報蓄積部105に蓄積したランの平均値から現ブロックのランの平均値を予測するラン情報予測部106とを備える。
【0085】
図6に示した本発明の画像符号化装置と同様に、現ブロックのランの平均値の予測値Pは、図7に示すブロック位置のランの平均値RUN(i)から、
P=ΣRUN(i)/4 但し、Σはi=0〜3の総和
を使って予測するものとする。
【0086】
そして、可変長符号化選択部102は、予測したランの平均値Pが、
P≦Th 但し、Th は閾値
を満たす場合には2次元可変長復号部107を選択し、満たさない場合には3次元可変長復号部108を選択する。ここで、閾値Thは予め設定されており、例えば、Th=2とする。
【0087】
なお、画面の上端のブロックには、図7中のB1,B2,B3に相当するブロックが存在せず、また、画面の左端のブロックには、図7中のB0,B1に相当するブロックが存在しない。このような場合には、存在しないブロックのラン長は予め定めた所定の値であるとして上述のラン平均値の予測値Pを計算する。例えば、この所定の値を0とすると、画面左隅のブロックについては、必ず2次元可変長復号部107が選択されることになる。
【0088】
次に、図8に示すブロックAとブロックBとを復号する手順について詳細に説明する。
【0089】
ここで、ラン情報蓄積部105には、ブロックA以前のブロックであるブロックP,Q,R,S,Tのランの平均値が少なくとも蓄積されているものとする。また、ブロックP,Q,R,S,Tのランの平均値を、それぞれRUN(P),RUN(Q),RUN(R),RUN(S),RUN(T)で表し、RUN(P)=4,RUN(Q)=3,RUN(R)=2,RUN(S)=1,RUN(T)=1であったとする。
【0090】
このような前提の元で、本発明の画像復号装置は、まずブロックAを次のように復号する。
【0091】
まず、ラン情報予測部106は、ラン情報蓄積部105に蓄積されたブロックP,Q,R,Sのランの平均値〔RUN(P),RUN(Q),RUN(R),RUN(S)〕を使って、ブロックAのランの平均値を予測する。上述した算出式に従って、この予測値PはP=3と予測される。
【0092】
これから、可変長符号化選択部102は、上述の選択ルールに従って3次元可変長復号部108を選択する。この選択を受けて、3次元可変長復号部108は、符号化データを3次元可変長復号し、DCT係数を出力する。
【0093】
このとき、ラン情報蓄積部105は、3次元可変長復号部108で得られたDCT係数の複数のランから、ブロックAのランの平均値を求めて蓄積する。このブロックAのランの平均値は、上述の画像符号化装置と同様にRUN(A)=4と求められる。
【0094】
そして、IDCT部109は、復号されたDCT係数を逆DCTし、ブロックAの画像情報を求める。
【0095】
続いて、本発明の画像復号装置は、ブロックBを次のように復号する。
【0096】
まず、ラン情報予測部106は、ラン情報蓄積部105に蓄積されたブロックA,R,S,Tのランの平均値〔RUN(A),RUN(R),RUN(S),RUN(T)〕を使って、ブロックBのランの平均値を予測する。上述した算出式に従って、この予測値PはP=2と予測される。
【0097】
これから、可変長符号化選択部102は、上述の選択ルールに従って2次元可変長復号部107を選択する。この選択を受けて、2次元可変長復号部107は、符号化データを2次元可変長復号し、DCT係数を出力する。
【0098】
このとき、ラン情報蓄積部105は、2次元可変長復号部107で得られたDCT係数の複数のランから、ブロックBのランの平均値を求めて蓄積する。
【0099】
そして、IDCT部109は、復号されたDCT係数を逆DCTし、ブロックBの画像情報を求める。
【0100】
本発明の画像復号装置は、以上の処理を繰り返し、すべての画面内のブロックを復号する。
【0101】
以上のように、図6及び図9の実施形態例に従う本発明では、すでに符号化した領域のラン情報により、2次元可変長符号化と3次元可変長符号化という2つの符号化方法の中から、符号化効率の向上を実現できる符号化方法を選択して符号化を行うように処理するので、符号化効率を向上できるようになる。
【0102】
なお、本実施形態例では、ラン情報によってどちらの符号化を用いるのかを選択したが、DCT係数の総数などの他の符号化データを使用しても同様な制御が可能である。
【0103】
図10に、本発明の画像符号化装置の他の実施形態例を図示する。
【0104】
この実施形態例に従う本発明の画像符号化装置では、図6の実施形態例と異なって、「P≦Th 」を満たす場合に、予測の確からしさが低いことを考慮して、直ちに2次元可変長符号化部103を選択するのではなくて、2次元可変長符号化部103による符号量と3次元可変長符号化部104による符号量とを比較して、どちらを選択するのかを決定するように処理している。なお、符号量を比較するのではなくて、符号予測量を求めるようにして、それを比較するようにしてもよい。
【0105】
この実施形態例に従う場合、本発明の画像符号化装置は、現ブロックの画像情報をDCTするDCT部101と、DCT係数を2次元可変長符号化する2次元可変長符号化部103と、DCT係数を3次元可変長符号化する3次元可変長符号化部104と、可変長符号化方式を選択する可変長符号化選択部102と、DCT係数のランの平均値を求めて蓄積するラン情報蓄積部105と、ラン情報蓄積部105に蓄積したランの平均値から現ブロックのランの平均値を予測するラン情報予測部106と、ランの平均値の予測値から可変長選択符号(どちらの符号化を選択したのかを示す情報)を出力するかどうかを決定する可変長選択符号符号化決定部110と、可変長選択符号を符号化する可変長選択符号符号化部112と、2次元可変長符号化部103で符号化した符号化データを出力するのか3次元可変長符号化部104で符号化した符号化データを出力するのかを決定する可変長符号化選択決定部111とを備える。
【0106】
図6に示した本発明の画像符号化装置と同様に、現ブロックのランの平均値の予測値Pは、図7に示すブロック位置のランの平均値RUN(i)から、
P=ΣRUN(i)/4 但し、Σはi=0〜3の総和
を使って予測するものとする。
【0107】
可変長選択符号符号化決定部110は、予測したランの平均値Pが「P≦Th 」を満たす場合には、どちらの符号化を選択したのかを示す情報であるところの可変長選択符号を符号化することを決定し、満たさない場合には、可変長選択符号を符号化しないことを決定する。ここで、閾値Thは予め設定されており、Th=2とする。
【0108】
可変長符号化選択決定部111は、可変長選択符号が符号化されることが決定される場合に、2次元可変長符号化部103からの出力の符号量と、3次元可変長符号化部104からの出力の符号量とを比較し、より小さい符号量の方の出力が最終的な出力となるようにと、可変長符号化選択部102を制御する。
【0109】
可変長符号化選択部102は、可変長選択符号が符号化されない場合(「P≦Th 」を満たさない場合)には、3次元可変長符号化部104からの出力を選択し、可変長選択符号が符号化される場合には、可変長符号化選択決定部111の決定に従って、2次元可変長符号化部103からの出力あるいは3次元可変長符号化部104からの出力のいずれかを選択する。
【0110】
ここで、可変長選択符号は、2次元可変長符号化部103からの出力が選択された場合には0であり、3次元可変長符号化部104からの出力が選択された場合には1であるとする。
【0111】
なお、画面の上端のブロックには、図8中のB1,B2,B3に相当するブロックが存在せず、また、画面の左端のブロックには、図8中のB0,B1に相当するブロックが存在しない。このような場合には、存在しないブロックのラン長は予め定めた所定の値であるとして上述のラン平均値の予測値Pを計算する。例えば、この所定の値を0とすると、画面左隅のブロックについては、必ず2次元可変長符号化部103が選択されることになる。
【0112】
次に、図8に示すブロックAとブロックBとを符号化する手順について詳細に説明する。
【0113】
ここで、ラン情報蓄積部105には、ブロックA以前のブロックであるブロックP,Q,R,S,Tのランの平均値が少なくとも蓄積されているものとする。また、ブロックP,Q,R,S,Tのランの平均値を、それぞれRUN(P),RUN(Q),RUN(R),RUN(S),RUN(T)で表し、RUN(P)=4,RUN(Q)=3,RUN(R)=2,RUN(S)=1,RUN(T)=1であったとする。
【0114】
このような前提の元で、本発明の画像符号化装置は、まずブロックAを次のように符号化する。
【0115】
まず、DCT部101は、ブロックAの画像情報をDCTする。これを受けて、2次元可変長符号化部103は、DCT係数を2次元可変長符号化し、3次元可変長符号化部104は、DCT係数を3次元可変長符号化する。
【0116】
一方、ラン情報予側部106は、ラン情報蓄積部105に蓄積されたブロックP,Q,R,Sのランの平均値〔RUN(P),RUN(Q),RUN(R),RUN(S)〕を使って、ブロックAのランの平均値を予測する。上述した算出式に従って、この予測値PはP=3と予測される。
【0117】
これから、可変長選択符号符号化決定部110は、可変長選択符号を符号化しないことを決定する。これを受けて、可変長符号化選択部102は、3次元可変長符号化部104からの出力を画像符号化装置の出力として出力する。
【0118】
このとき、ラン情報蓄積部105は、DCT部101で得られた複数のランから、ブロックAのランの平均値を求めて蓄積する。このランの平均値がRUN(A)=4であったとする。
【0119】
続いて、本発明の画像符号化装置は、ブロックBを次のように符号化する。
【0120】
まず、DCT部101は、ブロックBの画像情報をDCTする。これを受けて、2次元可変長符号化部103は、DCT係数を2次元可変長符号化し、3次元可変長符号化部104は、DCT係数を3次元可変長符号化する。
【0121】
一方、ラン情報予側部106は、ラン情報蓄積部105に蓄積されたブロックA,R,S,Tのランの平均値〔RUN(A),RUN(R),RUN(S),RUN(T)〕を使って、ブロックBのランの平均値を予測する。上述した算出式に従って、この予測値PはP=2と予測される。
【0122】
これから、可変長選択符号符号化決定部110は、可変長選択符号を符号化することを決定する。これを受けて、可変長符号化選択決定部111は、2次元可変長符号化部103からの出力の符号量と、3次元可変長符号化部104からの出力の符号量とを比較する。ここでは、2次元可変長符号化部103からの符号量の方が少なかったとする。
【0123】
これから、可変長選択符号符号化部112は、2次元可変長符号化部103の方が符号量が少ないため、可変長選択符号として0を出力する。一方、可変長符号化選択部102は、2次元可変長符号化部103からの出力を画像符号化装置の出力として出力する。
【0124】
このとき、ラン情報蓄積部105は、DCT部101で得られた複数のランから、ブロックBのランの平均値を求めて蓄積する。
【0125】
本発明の画像符号化装置は、以上の処理を繰り返し、すべての画面内のブロックを符号化する。
【0126】
図11に、この本発明の画像符号化装置により生成された符号化データを復号する本発明の画像復号装置の一実施形態例を図示する。
【0127】
この実施形態例に従う場合、本発明の画像復号装置は、DCT係数を逆DCTするIDCT部109と、符号化データを2次元可変長復号する2次元可変長復号部107と、符号化データを3次元可変長復号する3次元可変長復号部108と、可変長符号化方式を選択する可変長符号化選択部102と、DCT係数のランの平均値を求めて蓄積するラン情報蓄積部105と、ラン情報蓄積部105に蓄積したランの平均値から現ブロックのランの平均値を予測するラン情報予側部106と、ランの平均値の予測値から可変長選択符号を復号するかどうかを決定する可変長選択符号復号決定部113と、可変長選択符号を復号する可変長選択符号復号部114とを備える。
【0128】
図6に示した本発明の画像符号化装置と同様に、現ブロックのランの平均値の予測値Pは、図7に示すブロック位置のランの平均値RUN(i)から、
P=ΣRUN(i)/4 但し、Σはi=0〜3の総和
を使って予測するものとする。
【0129】
可変長選択符号復号決定部113は、予測したランの平均値Pが「P≦Th 」満たす場合には、どちらの符号化を選択したのかを示す情報であるところの可変長選択符号を復号することを決定し、満たさない場合には、可変長選択符号を復号しないことを決定する。ここで、閾値Th は予め設定されており、Th=2とする。
【0130】
可変長符号化選択部102は、可変長選択符号を復号した場合には、可変長選択符号に従って、2次元可変長復号部107または3次元可変長復号部108を選択し、可変長選択符号を復号しない場合には、3次元可変長復号部108を選択する。
【0131】
なお、画面の上端のブロックには、図7中のB1,B2,B3に相当するブロックが存在せず、また、画面の左端のブロックには、図7中のB0,B1に相当するブロックが存在しない。このような場合には、存在しないブロックのラン長は予め定めた所定の値であるとして上述のラン平均値の予測値Pを計算する。例えば、この所定の値を0とすると、画面左隅のブロックについては、必ず2次元可変長復号部107が選択されることになる。
【0132】
次に、図8に示すブロックAとブロックBとを復号する手順について詳細に説明する。
【0133】
ここで、ラン情報蓄積部105には、ブロックA以前のブロックであるブロックP,Q,R,S,Tのランの平均値が少なくとも蓄積されているものとする。また、ブロックP,Q,R,S,Tのランの平均値を、それぞれRUN(P),RUN(Q),RUN(R),RUN(S),RUN(T)で表し、RUN(P)=4,RUN(Q)=3,RUN(R)=2,RUN(S)=1,RUN(T)=1であったとする。
【0134】
このような前提の元で、本発明の画像復号装置は、まずブロックAを次のように復号する。
【0135】
まず、ラン情報予測部106は、ラン情報蓄積部105に蓄積されたブロックP,Q,R,Sのランの平均値〔RUN(P),RUN(Q),RUN(R),RUN(S)〕を使って、ブロックAのランの平均値を予測する。上述した算出式に従って、この予測値PはP=3と予測される。
【0136】
これから、可変長選択符号復号決定部113は、可変長選択符号を復号しないことを決定する。これを受けて、可変長符号化選択部102は、3次元可変長復号部108を選択し、これを受けて、3次元可変長復号部108は、符号化データを3次元可変長復号し、DCT係数を出力する。
【0137】
このとき、ラン情報蓄積部105は、3次元可変長復号部108で得られたDCT係数の複数のランから、ブロックAのランの平均値を求めて蓄積する。このブロックAのランの平均値は、上述の画像符号化装置と同様にRUN(A)=4と求められる。
【0138】
そして、IDCT部109は、復号されたDCT係数を逆DCTし、ブロックAの画像情報を求める。
【0139】
続いて、本発明の画像復号装置は、ブロックBを次のように復号する。
【0140】
まず、ラン情報予測部106は、ラン情報蓄積部105に蓄積されたブロックA,R,S,Tのランの平均値〔RUN(A),RUN(R),RUN(S),RUN(T)〕を使って、ブロックBのランの平均値を予測する。上述した算出式に従って、この予測値PはP=2と予測される。
【0141】
これから、可変長選択符号復号決定部113は、可変長選択符号を復号することを決定する。これを受けて、可変長選択符号復号部114は、可変長選択符号を復号する。このとき、可変長選択符号として、2次元可変長符号化部103を示す0が得られる。
【0142】
これから、可変長符号化選択部102は、可変長選択符号が0であることに対応して、2次元可変長復号部107を選択する。これを受けて、2次元可変長復号部107は、符号化データを2次元可変長復号し、DCT係数を出力する。
【0143】
このとき、ラン情報蓄積部105は、2次元可変長復号部107で得られたDCT係数の複数のランから、ブロックBのランの平均値を求めて蓄積する。
【0144】
そして、IDCT部109は、復号されたDCT係数を逆DCTし、ブロックBの画像情報を求める。
【0145】
本発明の画像復号装置は、以上の処理を繰り返し、すべての画面内のブロックを復号する。
【0146】
以上のように、図10及び図11の実施形態例に従う本発明では、すでに符号化した領域のラン情報により、2次元可変長符号化と3次元可変長符号化という2つの符号化方法の中から、符号化効率の向上を実現できる符号化方法を選択して符号化を行うように処理するときにあって、いずれの符号化を選択したのかについて示す可変長選択符号について、符号化が必要とされるときのみ符号化するように処理することから、符号化効率を向上できるようになる。
【0147】
なお、本実施形態例では、ラン情報によってどちらの符号化を用いるのかを選択したが、DCT係数の総数などの他の符号化データを使用しても同様な制御が可能である。
【0148】
また、フレーム間予測符号化を用いる画像符号化装置と画像復号装置では、フレーム間の相関を使うか使わないかの符号化モードに従って、可変長符号化の選択を行うことも可能である。この場合には、ラン情報蓄積部とラン情報予測部を備えずに、直接符号化モードによって可変長符号化を切り替えるという構成を採ることになる。
【0149】
また、本実施形態例では、画像符号化におけるDCT係数の符号化の方法について示したが、DCT以外の直交変換を使った場合の画像符号化装置と画像復号装置については、DCT部あるいはIDCT部を他の直交変換に置き換えることにより同様な形式で実現できる。
【0150】
また、本実施形態例では、2次元の画像情報を直交変換して符号化あるいは復号する場合の手順について示したが、3次元の画像情報の符号化も同様な構成で実現できる。
【0151】
また、一般的な多次元行列の成分の符号化では、本実施形態例の2次元可変長符号化部をラスト非複合手段の符号化部に入れ替え、3次元可変長符号化部をラスト複合手段の符号化部に入れ替えて、この2つの符号化部を選択するという構成で実現できる。
【0152】
また、行列をDCTを行わずに符号化することも可能である。この場合には、DCT部を備えない、あるいはDCT以外の直交変換を用いることも可能である。この場合には、DCT部の代わりに直交変換部を備えることになる。
【0153】
【発明の効果】
以上説明したように、本発明によれば、画面を分割したブロックを単位に直交変換を使って画像を符号化するときに、行列毎あるいは複数の行列毎に、2次元可変長符号化と3次元可変長符号化とを選択して使用することにより、より符号化効率を高めて符号化することが可能である。
【0154】
すなわち、画像符号化においては、直交変換後の係数を2次元行列とみなすことができ、この場合に、本発明によれば、成分(この場合にはブロック)毎に、既に符号化した成分(この場合にはブロック)の情報を使って、2次元可変長符号化と3次元可変長符号化を選択して符号化することが可能であり、どちらか片方を使う場合よりも符号化効率を向上することができる。
【図面の簡単な説明】
【図1】本発明の適用可能な符号化方法の説明図である。
【図2】本発明の適用可能な符号化方法の説明図である。
【図3】本発明の適用可能な符号化方法の説明図である。
【図4】本発明の適用可能な符号化方法の説明図である。
【図5】本発明の適用可能な符号化方法の説明図である。
【図6】本発明の画像符号化装置の一実施形態例である。
【図7】現ブロックのラン平均値の予測値Pの算出方法の説明図である。
【図8】実施形態例の説明に用いるブロック配置の説明図である。
【図9】本発明の画像復号装置の一実施形態例である。
【図10】本発明の画像符号化装置の他の実施形態例である。
【図11】本発明の画像復号装置の他の実施形態例である。
【符号の説明】
101 DCT部
102 可変長符号化選択部
103 2次元可変長符号化部
104 3次元可変長符号化部
105 ラン情報蓄積部
106 ラン情報予測部
107 2次元可変長復号部
108 3次元可変長復号部
109 IDCT部
110 可変長選択符号符号化決定部
111 可変長符号化選択決定部
112 可変長選択符号符号化部
113 可変長選択符号復号決定部
114 可変長選択符号復号部
[0001]
BACKGROUND OF THE INVENTION
  The present inventionIs the unit of blocks that divide the screen.Image encoding device that encodes images using cross transformAndThe encoded data generated by encoding the image using orthogonal transformIn units of blocks that divide the screenImage decoding device to decodeAnd, Its image codingapparatusImage coding program used to implement the program and the program recordedComputer readableRecording medium and its image decodingapparatusRecorded the image decoding program used to realizeComputer readableAnd a recording medium.
[0002]
[Prior art]
Orthogonal transformation is used when a plurality of pieces of information having a small value variance are encoded together. According to the orthogonal transform, the power is concentrated on the low frequency component, so that the amount of information can be reduced.
[0003]
In coding such components after orthogonal transformation, run-length coding is generally applied.
[0004]
The orthogonal transform coefficient is a multidimensional matrix, but each component of the multidimensional matrix is composed of a large number of the same values (A) and different values (B1, B2,..., Bn). First, the components in the multidimensional matrix are scanned into a one-dimensional array in a predetermined order. In this one-dimensional array, since the same value (A) occupies a large number, the value (A) is often arranged continuously.
[0005]
Therefore, a method of run-length encoding the number of components in which values (A) are arranged is used. Alternatively, when there is a correlation between the number (LA) in which the values (A) are arranged and the values (Bi; i = 1 to n) existing before and after the value (A), (LA) and (Bi There is also a method of performing two-dimensional variable length coding in which one variable length code is assigned to the combination with (). Here, generally, (LA) is called a run, and (Bi) is called a level.
[0006]
This method is one method of the last non-compositing means because the variable length code is constructed without using the last information.
[0007]
For example, in coding of a two-dimensional image, generally, a coefficient after DCT of a pixel is two-dimensional variable length coded.
[0008]
First, each pixel is divided into blocks of 8 pixels in length and width, and two-dimensional DCT is performed for each block. In the two-dimensional DCT, values other than 0 are concentrated in the low frequency part, and conversely, the value 0 increases in the high frequency part. This DCT coefficient is regarded as an 8 × 8 two-dimensional matrix. A one-dimensional array is formed by zigzag scanning from the low frequency portion to the high frequency portion. Two-dimensional variable length coding is performed with the number of consecutive coefficients having a value of 0 as a run and the subsequent coefficient value as a level.
[0009]
A lookup table in which one code is associated with each combination of run and level is created in advance, and two-dimensional variable length coding is performed using this lookup table. If the combination is not in the lookup table, fixed-length encoding using an escape code is performed. In general, the fixed length coding has a longer code length. Alternatively, arithmetic coding that does not use a lookup table can be used as a method of performing two-dimensional variable length coding.
[0010]
There is also a method of quantizing the value (Bi) before performing the two-dimensional variable length coding of the value (Bi) in the multidimensional matrix and the length (LA) of the value (A). If the value (Bi) is converted into a smaller value (BQi) by quantization, the combination of the values (BQi) and (LA) is two-dimensional variable length encoded. In general, in the two-dimensional variable length coding, as the value (Bi) is smaller, a code having a shorter code length is assigned, so that the code amount can be reduced by quantization.
[0011]
In these two-dimensional variable length coding, after encoding the last coefficient of the two-dimensional DCT, a fixed-length code having a unique bit pattern called EOB is output. This EOB is used to know that the coefficient to be decoded is over when the decoding side performs variable length decoding of the two-dimensional DCT coefficient from the bit array.
[0012]
On the other hand, when the values (Bi) and (LA) are subjected to variable length coding, the value (Bi) is coded including last information indicating whether the value (Bi) is a component other than the last value (A) in the multidimensional matrix. There is a three-dimensional variable length encoding method that uses a method of converting into a three-dimensional variable length.
[0013]
This method is one method of the last compounding means because the variable length code is constructed using the last information.
[0014]
For example, in the image encoding method MPEG-4, when a coefficient other than 0 (Bi described above) is encoded among the coefficients subjected to two-dimensional DCT, the last coefficient other than 0 (Bi) is encoded. When the information is set to 0 and the last coefficient other than 0 (Bi) is set, the last information is set to 1, and the three-dimensional variable length encoding of the run, the level, and the last information is performed.
[0015]
A lookup table in which one code is associated with each combination of run, level, and last information is created in advance, and three-dimensional variable length coding is performed while referring to it. If the combination is not in the lookup table, fixed-length encoding using an escape code is performed.
[0016]
When using a variable length code configured by the last composite means (for example, three-dimensional variable length encoding), compared to using a variable length code configured by the last non-composite means (for example, two-dimensional variable length encoding), This is effective when the number of components for which information is 1 occupies a certain proportion of the total number of components to be encoded. When the number of components to be encoded in the matrix is small, the ratio increases. In such a case, it is effective to use a variable length code constituted by the last composite means.
[0017]
For this reason, for example, in three-dimensional variable length coding, if there are few components to be coded in the matrix, the run value tends to increase. Therefore, when coding using a lookup table, the last value is used. For 1, variable length codes are prepared from when the run value is small to when it is large. For this reason, among the runs and levels for which variable-length codes are prepared by two-dimensional variable-length coding, those are deleted from the lookup table in order from the least frequently used.
[0018]
In addition, between the look-up table used in the three-dimensional variable length coding and the look-up table used in the two-dimensional variable length coding, the tendency of the code amount of the variable length code for the combination of run and level prepared in advance Is also different. In general, in three-dimensional variable length coding, the level value prepared is small and the run value tends to be prepared from a small value to a large value.
[0019]
There is also a method using 3D DCT in 3D image coding. In this case, a three-dimensional DCT coefficient is zigzag scanned into a one-dimensional array. Thereafter, similarly to the two-dimensional image coding, two-dimensional variable length coding or three-dimensional variable length coding is performed on the one-dimensional array.
[0020]
[Problems to be solved by the invention]
The last combining means is effective when the number of components to be encoded in the matrix is small, that is, when the length of the run is long, but conversely when the number of components is large, the last non-combining means The code amount is larger than that.
[0021]
Since the number of components differs depending on the distribution of information before orthogonal transform, etc., depending on the information, the encoding efficiency is lowered by using the last composite means.
[0022]
For example, in the case of image encoding, DCT is generally performed for each area such as a macroblock. Since the image contents differ from region to region, there are regions in which the two-dimensional variable length coding has a smaller code amount than the three-dimensional variable length coding.
[0023]
In addition, when using inter-frame predictive coding, it is possible to select either inter-coding that uses inter-frame correlation or intra-coding that does not use inter-frame correlation. Coding tends to have a large number of components, and inter coding tends to have a small number of components.
[0024]
Therefore, when two-dimensional variable length coding or three-dimensional variable length coding is applied to the entire image sequence, in the former case (when two-dimensional variable length coding is used for the entire image sequence), encoding of inter coding is performed. In the latter case (when three-dimensional variable length coding is used for the entire image sequence), the coding efficiency of intra coding is lowered.
[0025]
However, in the prior art, two-dimensional variable length encoding is applied to the entire information to be encoded, or three-dimensional variable length encoding is applied.
[0026]
Thus, according to the prior art, there is a problem that the encoding efficiency is lowered.
[0027]
The present invention has been made in view of such circumstances, and when encoding / decoding an image or the like, two-dimensional variable length encoding / decoding and three-dimensional variable length encoding / decoding are adaptively selected. Accordingly, it is an object of the present invention to provide a new encoding / decoding technique that realizes improvement in encoding efficiency by enabling encoding / decoding.
[0035]
[Means for Solving the Problems]
  (1) ThisIn order to achieve the object of the present invention, the image encoding device of the present invention includes:In units of blocks that divide the screenWhen adopting the configuration of encoding an image using orthogonal transformation,(I)First encoding means for assigning one variable length code to one combination of a number of non-significant orthogonal transform coefficients and a value of a significant orthogonal transform coefficient;(B)One for each combination of consecutive numbers of non-significant orthogonal transform coefficients, values of significant orthogonal transform coefficients, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient Second encoding means for assigning a variable length code;(C)Determining means for determining which of the two encoding means is used for encoding;(D)And a selection unit that selects one of the two encoding units based on the determination result of the determination unit.
  When adopting this configuration, the determining unit compares the code amount by the first encoding unit and the code amount by the second encoding unit, or the code predicting amount by the first encoding unit and the code prediction amount by the first encoding unit. The code prediction amount by the two encoding means is compared, and based on the comparison, it may be decided to use the encoding means having the smaller code amount of the two encoding means. In this case, a unit for encoding information indicating which of the two encoding units is used is provided.
[0037]
  In the image coding apparatus of the present invention configured as described above, the first coding unit and the second coding unit may be provided.(B) Based on the total number of significant coefficients in the orthogonal transform or the average value of the distances between significant coefficients in the surrounding coded blocks,For example, two codes can be obtained by determining which of the two encoding means is used for encoding for each region of the image to be subjected to orthogonal transformation so that more efficient encoding can be performed. (B) When encoding moving images using the inter-frame predictive encoding method, the information to be subjected to orthogonal transformation is determined between frames. For example, the region of the image to be subjected to orthogonal transformation cut out from one or a plurality of frames or from the frame predicted between the frames, depending on whether it is created using the correlation between the frames or without using the correlation between the frames. Each of the two encoding units is used for encoding by determining which one of the two encoding units is used for more efficient encoding. To decide .
[0038]
  For example, the determining unit obtains a predicted value of the distance between the significant coefficients of the current block from the average value of the distance between the significant coefficients in the orthogonal transform in the surrounding encoded blocks, and the predicted value is based on a preset value. Is smaller, it is decided to use the first encoding means, and when the predicted value is larger than a preset value, it is decided to use the second encoding means.
  Further, the determining means obtains a predicted value of the total number of significant coefficients of the current block from the total number of significant coefficients in the orthogonal transform in the surrounding encoded blocks, and when the predicted value is larger than a preset value Then, it is decided to use the first encoding means, and when the predicted value is smaller than a preset value, it is decided to use the second encoding means.
  Further, the determining means obtains a predicted value of the distance between the significant coefficients of the current block from the average value of the distance between the significant coefficients in the orthogonal transform in the surrounding encoded blocks, and the predicted value is based on a preset value. Is larger, it is decided to use the second encoding means, and when the predicted value is smaller than a preset value, the amount of code by the first encoding means and the second encoding means Or the code prediction amount by the first encoding means and the code prediction amount by the second encoding means, and based on the comparison, the two encoding means It is decided to use the encoding means with the smaller code amount.
  Here, when the determination means uses this determination method, the decoding side cannot know which encoding means was used, so which of the two encoding means was used. The information indicating whether or not is encoded.
  Further, the determining means obtains a predicted value of the total number of significant coefficients of the current block from the total number of significant coefficients in the orthogonal transform in the surrounding encoded blocks, and when the predicted value is smaller than a preset value When it is determined that the second encoding unit is used and the predicted value is larger than a preset value, the code amount by the first encoding unit and the code amount by the second encoding unit are Or the code prediction amount by the first encoding means and the code prediction amount by the second encoding means are compared, and based on the comparison, the smaller code amount of the two encoding means It is decided to use the encoding means that becomes.
  Here, when the determination means uses this determination method, the decoding side cannot know which encoding means was used, so which of the two encoding means was used. The information indicating whether or not is encoded.
  Also, the decision meansIn the case of encoded data composed of an I frame that does not use correlation between frames and a P frame that encodes the difference between the immediately preceding frames, the image information of the I frame is encoded using the first encoding means. Since the encoding efficiency can be improved by encoding the image information (difference information) of the P frame using the second encoding means, this criterion is determined for each one or a plurality of frames. To determine which of the two encoding means to use for encodingThe ThisIn this case, if it is possible to select whether or not to use correlation between frames for each area, it is determined for each area which of the two encoding means is used in accordance with this criterion. be able to.
[0039]
And based on the determination, it processes so that it may encode using the determined encoding means.
[0041]
  Thus, according to the image encoding device of the present invention, when adopting a configuration of encoding an image using orthogonal transformation,Two-dimensional variable length coding meansEncoding andThree-dimensional variable length coding meansThus, the encoding efficiency can be improved by adaptively selecting the encoding.
[0042]
  Here, the image coding apparatus of the present inventionEach processing means constituting the deviceComputer program, which can be read by a computerSuitableOn the right recording mediumRecordcan do.
[0043]
  Next, the image encoding apparatus of the present invention executesSurrounding symbols such as the total number of significant coefficients and the average distance between significant coefficients in orthogonal transformationA process of determining which encoding unit to use for encoding based on encoded data that has been encoded will be described.
[0044]
Examples of the encoded data of the already encoded area include feature quantities such as the total number of orthogonal transform coefficients and the average value of runs. In any case, the change between the feature amount of the current region and the feature amount of the surrounding region is not abrupt. Therefore, it is possible to predict the feature amount of the current region from the feature amount of the surrounding region.
[0045]
On the other hand, it is possible to predict variable-length coding with a smaller code amount depending on the size of the feature amount. For example, with regard to the total number of orthogonal transform coefficients, it can be expected that the larger the total number, the higher the coding efficiency will be in variable-length coding in which the code length becomes shorter when the run is small. Similarly, with regard to the average value of the run, it can be expected that the smaller the average value, the higher the coding efficiency in the variable length coding in which the code length becomes shorter when the run is small.
[0046]
From this, in the image encoding device according to the present invention, for example, when the average value of the run of the current region is predicted from the average value of the run of the already encoded region, the predicted value is smaller than a preset threshold value. In other words, processing is performed so as to select two-dimensional variable length coding that shortens the code length when the run is small.
[0047]
In this way, when determining which of the two encoding means is used for encoding based on the encoded data that has already been encoded, when the probability of predicting the feature quantity of the current region is low Since the encoding means cannot be selected on the basis thereof, for example, the code amount or code prediction amount of the two encoding means is calculated, and the encoding means is selected on the basis thereof.
[0048]
  At this time, since it is impossible for the decoding side to know which encoding means was used for encoding, it is necessary to encode information indicating which encoding means was used for encoding. ThereThe
[0049]
For example, when predicting the average value of a run and selecting an encoding means, if the predicted run value is smaller than a preset threshold value, the probability of prediction is reduced, so two codes The code amount and the code prediction amount of the encoding means are calculated, and the encoding means is selected based on the calculation amount, and information (variable length selection code) indicating which encoding means is used for the encoding is selected. It encodes.
[0050]
Of course, regardless of the certainty of the prediction of the feature quantity in the current region, the variable length selection code indicating that is used to encode which of the two encoding means is used is adopted. However, if a configuration in which a variable length selection code is encoded only when it cannot be known on the decoding side, compared to a case where a variable length selection code is encoded for all such regions, Encoding efficiency can be improved.
[0051]
  on the other hand,By extending the present invention,When encoding an N-dimensional matrix, instead of using a run, it is possible to use difference information of positions between two components in the matrix. In an encoding device and a decoding device using this method, a norm of a position difference between two components can be used instead of a run.
[0052]
For example, when a two-dimensional matrix as shown in FIG. 1 is encoded, if a zigzag scan as shown in FIG. 2 is used to obtain a one-dimensional array of significant values as shown in FIG. For the significant matrix component (x, y) (x, y = 0 to 7) located immediately before, when x is an even number or 0 and y is 0, the coordinate system of FIG. In other cases, the coordinate system of FIG. 4B is applied when x + y is an even number, and the coordinate system of FIG. 4C is applied when x + y is an odd number, as shown in FIG. Thus, the norm of the position difference between the two components can be used instead of the run.
[0053]
In this case, since the position difference between the two components is N-dimensional information, the N-dimensional variable length encoding means and the last information are combined based on the encoded data that has already been encoded (N + 1). A configuration is adopted in which one of two encoding means called dimension variable length encoding means is selected.
[0054]
Even in the case of adopting this configuration, when determining which of the two encoding means is used for encoding based on encoded data that has already been encoded, when the probability of prediction is low, it is based on that Therefore, the encoding means cannot be selected, and therefore, for example, the code amount and the code prediction amount of the two encoding means are calculated, and the encoding means is selected based on the calculation.
[0055]
  At this time, since it is impossible for the decoding side to know which encoding means was used for encoding, it is necessary to encode information indicating which encoding means was used for encoding. ThereThe
[0056]
Of course, regardless of the probability of prediction, it may be possible to adopt a configuration in which a variable-length selection code indicating that is used to encode which of the two encoding means is used. If the configuration in which the variable length selection code is encoded only when it cannot be known in the case of the above, the encoding efficiency can be improved as compared with the case where the variable length selection code is encoded for all such regions. It becomes like this.
[0057]
  (2In order to achieve this object, the image decoding apparatus of the present invention uses encoded data generated by encoding an image using orthogonal transformation.In units of blocks that divide the screenWhen taking the configuration of decryption,(I)First decoding means for decoding a continuous number of non-significant orthogonal transform coefficients and a value of a significant orthogonal transform coefficient from one variable-length code;(B)Decodes consecutive numbers of non-significant orthogonal transform coefficients, significant orthogonal transform coefficient values, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient from one variable-length code Second decoding means to:(C)Which of the two decryption meansTo determine whether to perform decodingStep and(D) DecisionMeansDecisionBased on the result, a selection unit that selects one of the two decoding units is provided.
[0058]
  When this configuration is adopted, encoded data of information indicating the type of encoding means may be generated.The hand that decodes the encoded dataWith stepsIt will be.
[0059]
  In the image decoding apparatus of the present invention configured as described above, the first decoding means and the second decoding means are provided.(B) In the surrounding decoded blocks, the total number of significant coefficients in the orthogonal transformation or the average value of the distances between the significant coefficientsBased on which of the two decryption meansDetermine whether to perform decryption using(B) When the video encoded using the inter-frame predictive encoding method is to be decoded, whether the information to be subjected to orthogonal transformation was created using the correlation between frames, Of the two decoding means according to the decoded data of the information indicating whether it was created without using the correlation betweenDetermine whether to perform decryption usingOr (c) according to the decoded data of the information indicating the type of encoding means2Which one of the decoding means is used for encoding is determined.
  For example, the determining unit obtains a predicted value of the distance between the significant coefficients of the current block from the average value of the distance between the significant coefficients in the orthogonal transform in the surrounding decoded blocks, and the predicted value is larger than a preset value. If it is smaller, it is decided to use the first decoding means, and if the predicted value is larger than a preset value, it is decided to use the second decoding means.
  Further, the determining means obtains a predicted value of the total number of significant coefficients of the current block from the total number of significant coefficients in the orthogonal transform in the surrounding decoded blocks, and when the predicted value is larger than a preset value, It is decided to use the first decoding means, and when the predicted value is smaller than a preset value, it is decided to use the second decoding means.
  Further, the determining means obtains a predicted value of the distance between the significant coefficients of the current block from the average value of the distance between the significant coefficients in the orthogonal transform in the surrounding decoded blocks, and the predicted value is larger than a preset value. If it is larger, it is decided to use the second decoding means, and if the predicted value is smaller than a preset value, decoding is performed using either the first decoding means or the second decoding means. By decoding the encoded data of information indicating whether to perform, it is determined which of the two decoding means is used for decoding.
  Further, the determining means obtains a predicted value of the total number of significant coefficients of the current block from the total number of significant coefficients in the orthogonal transform in the surrounding decoded blocks, and when the predicted value is smaller than a preset value, When it is decided to use the second decoding means and the predicted value is larger than a preset value, it indicates which of the first decoding means and the second decoding means should be used for decoding By decoding the encoded data of information, it is determined which of the two decoding means is used for decoding.
  Further, when the information to be orthogonally transformed is created without using the correlation between frames, the decision means decides to use the first decoding means and creates the information using the correlation between frames. Is determined to use the second decoding means.
[0060]
And based on the determination, it processes so that it may decode using the determined decoding means.
[0061]
  Thus, according to the image decoding apparatus of the present invention,Two-dimensional variable length coding meansEncoding andThree-dimensional variable length coding meansIt is possible to decode the encoded data generated by the image encoding apparatus of the present invention, which adopts a configuration in which encoding is selected adaptively.
[0062]
  Here, the image decoding apparatus of the present inventionEach processing means constituting the deviceComputer program, which can be read by a computerSuitableOn the right recording mediumRecordcan do.
[0063]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the present invention will be described in detail according to embodiments.
[0064]
Operation of an image coding apparatus that divides an image into blocks of 8 pixels in length, width, DCT of image information, variable-length codes the DCT coefficients, and an image decoding apparatus that decodes encoded data of the image coding apparatus Two examples are shown.
[0065]
First, a method of selecting two-dimensional variable length coding and three-dimensional variable length coding using the average value of runs will be described.
[0066]
FIG. 6 illustrates an embodiment of an image encoding apparatus according to the present invention that implements this technique.
[0067]
When following this embodiment, the image coding apparatus of the present invention includes a DCT unit 101 that DCTs image information of the current block, a two-dimensional variable length coding unit 103 that performs two-dimensional variable length coding of DCT coefficients, and a DCT. A three-dimensional variable length coding unit 104 that three-dimensionally encodes a coefficient, a variable length coding selection unit 102 that selects a variable length coding method, and run information that finds and accumulates average values of DCT coefficient runs The storage unit 105 and a run information prediction unit 106 that predicts the average value of the run of the current block from the average value of the run stored in the run information storage unit 105.
[0068]
The predicted value P of the average value of the run of the current block is obtained from the average value RUN (i) of the run at the block position shown in FIG.
P = ΣRUN (i) / 4 where Σ is the sum of i = 0-3
And predict using
[0069]
The variable length coding selection unit 102 determines that the predicted value P of the predicted average value of the run is
P ≦ Th where Th is a threshold value
When the condition is satisfied, the two-dimensional variable length encoding unit 103 is selected. When the condition is not satisfied, the three-dimensional variable length encoding unit 104 is selected. Here, the threshold Th is set in advance, for example, Th = 2.
[0070]
That is, when the predicted run average value P of the current block is smaller than the threshold value Th, the use of the two-dimensional variable length coding unit 103 can increase the coding efficiency, and thus the two-dimensional variable length coding unit 103. On the other hand, if it is larger, the use of the three-dimensional variable length encoding unit 104 can improve the encoding efficiency, and therefore the three-dimensional variable length encoding unit 104 is selected.
[0071]
It should be noted that there are no blocks corresponding to B1, B2 and B3 in FIG. 7 in the upper end block of the screen, and blocks corresponding to B0 and B1 in FIG. 7 are present in the left end block of the screen. not exist. In such a case, the run length of the non-existent block is assumed to be a predetermined value, and the above-described run average predicted value P is calculated. For example, if the predetermined value is 0, the two-dimensional variable length encoding unit 103 is always selected for the block at the left corner of the screen.
[0072]
Next, a procedure for encoding the block A and the block B shown in FIG. 8 will be described in detail.
[0073]
Here, it is assumed that the run information accumulation unit 105 accumulates at least average values of runs of blocks P, Q, R, S, and T that are blocks before the block A. Further, the average values of the runs of the blocks P, Q, R, S, and T are represented by RUN (P), RUN (Q), RUN (R), RUN (S), and RUN (T), respectively, and RUN (P ) = 4, RUN (Q) = 3, RUN (R) = 2, RUN (S) = 1, and RUN (T) = 1.
[0074]
Under such a premise, the image encoding apparatus of the present invention first encodes block A as follows.
[0075]
First, the DCT unit 101 performs DCT on the image information of the block A. In response to this, the run information prediction unit 106 calculates the average value of the runs of the blocks P, Q, R, and S accumulated in the run information accumulation unit 105 [RUN (P), RUN (Q), RUN (R), RUN (S)] is used to predict the average run of block A. According to the calculation formula described above, the predicted value P is predicted as P = 3.
[0076]
From this, the variable length coding selection unit 102 selects the three-dimensional variable length coding unit 104 according to the selection rule described above. In response to this selection, the three-dimensional variable length encoding unit 104 performs three-dimensional variable length encoding on the DCT coefficient and outputs encoded data.
[0077]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block A from the plurality of runs obtained by the DCT unit 101. Assume that the average value of this run is RUN (A) = 4.
[0078]
Subsequently, the image encoding device of the present invention encodes the block B as follows.
[0079]
First, the DCT unit 101 DCTs the image information of the block B. In response to this, the run information prediction unit 106 calculates the average value of the run of the blocks A, R, S, and T accumulated in the run information accumulation unit 105 [RUN (A), RUN (R), RUN (S), RUN (T)] is used to predict the average run of block B. According to the calculation formula described above, this predicted value P is predicted as P = 2.
[0080]
From this, the variable length coding selection unit 102 selects the two-dimensional variable length coding unit 103 in accordance with the selection rule described above. In response to this selection, the two-dimensional variable length encoding unit 103 performs two-dimensional variable length encoding on the DCT coefficient and outputs encoded data.
[0081]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block B from the plurality of runs obtained by the DCT unit 101.
[0082]
The image encoding apparatus of the present invention repeats the above processing and encodes all the blocks in the screen.
[0083]
FIG. 9 shows an embodiment of the image decoding apparatus of the present invention for decoding the encoded data generated by the image encoding apparatus of the present invention.
[0084]
When following this embodiment, the image decoding apparatus of the present invention includes an IDCT unit 109 that performs inverse DCT on DCT coefficients, a two-dimensional variable length decoding unit 107 that performs two-dimensional variable length decoding on encoded data, and three encoded data. A three-dimensional variable length decoding unit 108 that performs dimensional variable length decoding, a variable length coding selection unit 102 that selects a variable length coding method, a run information accumulation unit 105 that obtains and accumulates average values of DCT coefficient runs, A run information prediction unit 106 that predicts the average value of the run of the current block from the average value of the run stored in the run information storage unit 105.
[0085]
Similar to the image encoding apparatus of the present invention shown in FIG. 6, the predicted value P of the average value of the run of the current block is obtained from the average value RUN (i) of the run of the block position shown in FIG.
P = ΣRUN (i) / 4 where Σ is the sum of i = 0-3
And predict using
[0086]
Then, the variable length coding selection unit 102 determines that the average value P of the predicted run is
P ≦ Th where Th is a threshold value
When the condition is satisfied, the two-dimensional variable length decoding unit 107 is selected. When the condition is not satisfied, the three-dimensional variable length decoding unit 108 is selected. Here, the threshold Th is set in advance, for example, Th = 2.
[0087]
It should be noted that the blocks corresponding to B1, B2, and B3 in FIG. 7 do not exist in the top block of the screen, and the blocks corresponding to B0 and B1 in FIG. not exist. In such a case, the run average predicted value P is calculated on the assumption that the run length of the nonexistent block is a predetermined value. For example, if the predetermined value is 0, the two-dimensional variable length decoding unit 107 is always selected for the block at the left corner of the screen.
[0088]
Next, a procedure for decoding the block A and the block B shown in FIG. 8 will be described in detail.
[0089]
Here, it is assumed that the run information accumulation unit 105 accumulates at least average values of runs of blocks P, Q, R, S, and T that are blocks before the block A. In addition, the average values of the runs of the blocks P, Q, R, S, and T are represented by RUN (P), RUN (Q), RUN (R), RUN (S), and RUN (T), respectively, and RUN (P ) = 4, RUN (Q) = 3, RUN (R) = 2, RUN (S) = 1, and RUN (T) = 1.
[0090]
Under such a premise, the image decoding apparatus of the present invention first decodes block A as follows.
[0091]
First, the run information prediction unit 106 calculates the average value of the runs of the blocks P, Q, R, and S accumulated in the run information accumulation unit 105 [RUN (P), RUN (Q), RUN (R), RUN (S )] Is used to predict the average run of block A. According to the calculation formula described above, the predicted value P is predicted as P = 3.
[0092]
From this, the variable length coding selection unit 102 selects the three-dimensional variable length decoding unit 108 in accordance with the selection rule described above. In response to this selection, the three-dimensional variable length decoding unit 108 performs three-dimensional variable length decoding on the encoded data and outputs a DCT coefficient.
[0093]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block A from the plurality of DCT coefficient runs obtained by the three-dimensional variable length decoding unit 108. The average value of the run of the block A is obtained as RUN (A) = 4 similarly to the above-described image encoding device.
[0094]
Then, the IDCT unit 109 performs inverse DCT on the decoded DCT coefficient to obtain image information of the block A.
[0095]
Subsequently, the image decoding apparatus according to the present invention decodes the block B as follows.
[0096]
First, the run information prediction unit 106 calculates the average value of the run of the blocks A, R, S, and T accumulated in the run information accumulation unit 105 [RUN (A), RUN (R), RUN (S), RUN (T )] Is used to predict the average run of block B. According to the calculation formula described above, this predicted value P is predicted as P = 2.
[0097]
From this, the variable length coding selection unit 102 selects the two-dimensional variable length decoding unit 107 according to the selection rule described above. In response to this selection, the two-dimensional variable length decoding unit 107 performs two-dimensional variable length decoding on the encoded data and outputs a DCT coefficient.
[0098]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block B from the plurality of DCT coefficient runs obtained by the two-dimensional variable length decoding unit 107.
[0099]
Then, the IDCT unit 109 performs inverse DCT on the decoded DCT coefficient to obtain image information of the block B.
[0100]
The image decoding apparatus according to the present invention repeats the above processing and decodes blocks in all the screens.
[0101]
As described above, in the present invention according to the exemplary embodiments of FIGS. 6 and 9, two run methods, two-dimensional variable-length coding and three-dimensional variable-length coding, are used based on run information of already coded regions. Therefore, the encoding method can be improved by selecting an encoding method that can improve the encoding efficiency and performing the encoding.
[0102]
In the present embodiment, which encoding is used is selected according to the run information, but similar control is possible using other encoded data such as the total number of DCT coefficients.
[0103]
FIG. 10 illustrates another embodiment of the image encoding device of the present invention.
[0104]
In the image encoding apparatus according to the present embodiment according to this embodiment, unlike the embodiment of FIG. 6, when “P ≦ Th” is satisfied, it is considered that the prediction probability is low and the two-dimensional variable is immediately performed. Rather than selecting the long encoding unit 103, the code amount by the two-dimensional variable length encoding unit 103 and the code amount by the three-dimensional variable length encoding unit 104 are compared to determine which one to select. It is processed like so. Instead of comparing the code amounts, a code prediction amount may be obtained and compared.
[0105]
When following this embodiment, the image coding apparatus of the present invention includes a DCT unit 101 that DCTs image information of the current block, a two-dimensional variable length coding unit 103 that performs two-dimensional variable length coding of DCT coefficients, and a DCT. A three-dimensional variable length coding unit 104 that three-dimensionally encodes a coefficient, a variable length coding selection unit 102 that selects a variable length coding method, and run information that finds and accumulates average values of DCT coefficient runs The storage unit 105, the run information prediction unit 106 that predicts the average value of the run of the current block from the average value of the run stored in the run information storage unit 105, and the variable length selection code (which of which A variable length selection code encoding determination unit 110 that determines whether or not to output (information indicating whether encoding is selected), a variable length selection code encoding unit 112 that encodes a variable length selection code, and a two-dimensional variable Long And a variable length coding selection decision unit 111 for determining the three-dimensional variable length coding unit 104 or to output the encoded coded data Goka unit 103 to output the encoded coded data.
[0106]
Similar to the image encoding apparatus of the present invention shown in FIG. 6, the predicted value P of the average value of the run of the current block is obtained from the average value RUN (i) of the run of the block position shown in FIG.
P = ΣRUN (i) / 4 where Σ is the sum of i = 0-3
And predict using
[0107]
When the predicted run average value P satisfies “P ≦ Th”, the variable length selection code encoding determination unit 110 selects a variable length selection code that is information indicating which encoding is selected. If it is determined that the variable length selection code is not satisfied, it is determined that the variable length selection code is not encoded. Here, the threshold Th is set in advance, and Th = 2.
[0108]
The variable length coding selection determination unit 111, when it is determined that the variable length selection code is to be coded, the code amount of the output from the two-dimensional variable length coding unit 103 and the three-dimensional variable length coding unit The code length of the output from 104 is compared, and the variable length coding selection unit 102 is controlled so that the output of the smaller code amount becomes the final output.
[0109]
When the variable length selection code is not encoded (when “P ≦ Th” is not satisfied), the variable length encoding selection unit 102 selects the output from the three-dimensional variable length encoding unit 104 and selects the variable length. When a code is encoded, select either the output from the two-dimensional variable length encoding unit 103 or the output from the three-dimensional variable length encoding unit 104 according to the determination of the variable length encoding selection determination unit 111 To do.
[0110]
Here, the variable length selection code is 0 when the output from the two-dimensional variable length encoding unit 103 is selected, and is 1 when the output from the three-dimensional variable length encoding unit 104 is selected. Suppose that
[0111]
It should be noted that there are no blocks corresponding to B1, B2 and B3 in FIG. 8 in the upper end block of the screen, and blocks corresponding to B0 and B1 in FIG. 8 are present in the left end block of the screen. not exist. In such a case, the run average predicted value P is calculated on the assumption that the run length of the nonexistent block is a predetermined value. For example, if the predetermined value is 0, the two-dimensional variable length encoding unit 103 is always selected for the block at the left corner of the screen.
[0112]
Next, a procedure for encoding the block A and the block B shown in FIG. 8 will be described in detail.
[0113]
Here, it is assumed that the run information accumulation unit 105 accumulates at least average values of runs of blocks P, Q, R, S, and T that are blocks before the block A. In addition, the average values of the runs of the blocks P, Q, R, S, and T are represented by RUN (P), RUN (Q), RUN (R), RUN (S), and RUN (T), respectively, and RUN (P ) = 4, RUN (Q) = 3, RUN (R) = 2, RUN (S) = 1, and RUN (T) = 1.
[0114]
Under such a premise, the image encoding apparatus of the present invention first encodes block A as follows.
[0115]
First, the DCT unit 101 performs DCT on the image information of the block A. In response to this, the two-dimensional variable length coding unit 103 performs two-dimensional variable length coding on the DCT coefficient, and the three-dimensional variable length coding unit 104 performs three-dimensional variable length coding on the DCT coefficient.
[0116]
On the other hand, the run information predicting unit 106 averages the run values of the blocks P, Q, R, and S stored in the run information storage unit 105 [RUN (P), RUN (Q), RUN (R), RUN ( S)] is used to predict the average value of the run of block A. According to the calculation formula described above, the predicted value P is predicted as P = 3.
[0117]
From this, the variable length selection code encoding determination unit 110 determines not to encode the variable length selection code. In response to this, the variable length coding selection unit 102 outputs the output from the three-dimensional variable length coding unit 104 as the output of the image coding apparatus.
[0118]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block A from the plurality of runs obtained by the DCT unit 101. Assume that the average value of this run is RUN (A) = 4.
[0119]
Subsequently, the image encoding device of the present invention encodes the block B as follows.
[0120]
First, the DCT unit 101 DCTs the image information of the block B. In response to this, the two-dimensional variable length coding unit 103 performs two-dimensional variable length coding on the DCT coefficient, and the three-dimensional variable length coding unit 104 performs three-dimensional variable length coding on the DCT coefficient.
[0121]
On the other hand, the run information predicting unit 106 averages the run values of the blocks A, R, S, and T accumulated in the run information accumulation unit 105 [RUN (A), RUN (R), RUN (S), RUN ( T)] is used to predict the average run of block B. According to the calculation formula described above, this predicted value P is predicted as P = 2.
[0122]
From this, the variable length selection code encoding determination unit 110 determines to encode the variable length selection code. In response to this, the variable length coding selection determining unit 111 compares the code amount output from the two-dimensional variable length coding unit 103 with the code amount output from the three-dimensional variable length coding unit 104. Here, it is assumed that the code amount from the two-dimensional variable length coding unit 103 is smaller.
[0123]
Accordingly, the variable length selection code encoder 112 outputs 0 as the variable length selection code because the two-dimensional variable length encoder 103 has a smaller code amount. On the other hand, the variable length coding selection unit 102 outputs the output from the two-dimensional variable length coding unit 103 as the output of the image coding apparatus.
[0124]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block B from the plurality of runs obtained by the DCT unit 101.
[0125]
The image encoding apparatus of the present invention repeats the above processing and encodes all the blocks in the screen.
[0126]
FIG. 11 shows an example of an embodiment of the image decoding apparatus of the present invention for decoding the encoded data generated by the image encoding apparatus of the present invention.
[0127]
When following this embodiment, the image decoding apparatus of the present invention includes an IDCT unit 109 that performs inverse DCT on DCT coefficients, a two-dimensional variable length decoding unit 107 that performs two-dimensional variable length decoding on encoded data, and three encoded data. A three-dimensional variable length decoding unit 108 that performs dimensional variable length decoding, a variable length coding selection unit 102 that selects a variable length coding method, a run information accumulation unit 105 that obtains and accumulates average values of DCT coefficient runs, The run information predicting unit 106 that predicts the average value of the run of the current block from the average value of the run accumulated in the run information storage unit 105, and whether to decode the variable length selection code from the predicted value of the average value of the run A variable length selection code decoding determination unit 113, and a variable length selection code decoding unit 114 that decodes the variable length selection code.
[0128]
Similar to the image encoding apparatus of the present invention shown in FIG. 6, the predicted value P of the average value of the run of the current block is obtained from the average value RUN (i) of the run of the block position shown in FIG.
P = ΣRUN (i) / 4 where Σ is the sum of i = 0-3
And predict using
[0129]
The variable length selection code decoding determination unit 113 decodes the variable length selection code which is information indicating which encoding is selected when the predicted average value P of the runs satisfies “P ≦ Th”. If not satisfied, it is determined not to decode the variable length selection code. Here, the threshold value Th is preset, and Th = 2.
[0130]
When decoding the variable length selection code, the variable length coding selection unit 102 selects the two-dimensional variable length decoding unit 107 or the three-dimensional variable length decoding unit 108 according to the variable length selection code, and selects the variable length selection code. When not decoding, the three-dimensional variable length decoding unit 108 is selected.
[0131]
It should be noted that the blocks corresponding to B1, B2, and B3 in FIG. 7 do not exist in the top block of the screen, and the blocks corresponding to B0 and B1 in FIG. not exist. In such a case, the run average predicted value P is calculated on the assumption that the run length of the nonexistent block is a predetermined value. For example, if the predetermined value is 0, the two-dimensional variable length decoding unit 107 is always selected for the block at the left corner of the screen.
[0132]
Next, a procedure for decoding the block A and the block B shown in FIG. 8 will be described in detail.
[0133]
Here, it is assumed that the run information accumulation unit 105 accumulates at least average values of runs of blocks P, Q, R, S, and T that are blocks before the block A. In addition, the average values of the runs of the blocks P, Q, R, S, and T are represented by RUN (P), RUN (Q), RUN (R), RUN (S), and RUN (T), respectively, and RUN (P ) = 4, RUN (Q) = 3, RUN (R) = 2, RUN (S) = 1, and RUN (T) = 1.
[0134]
Under such a premise, the image decoding apparatus of the present invention first decodes block A as follows.
[0135]
First, the run information prediction unit 106 calculates the average value of the runs of the blocks P, Q, R, and S accumulated in the run information accumulation unit 105 [RUN (P), RUN (Q), RUN (R), RUN (S )] Is used to predict the average run of block A. According to the calculation formula described above, the predicted value P is predicted as P = 3.
[0136]
From this, the variable length selection code decoding determination unit 113 determines not to decode the variable length selection code. In response to this, the variable length coding selection unit 102 selects the three-dimensional variable length decoding unit 108. In response to this, the three-dimensional variable length decoding unit 108 performs three-dimensional variable length decoding on the encoded data, Output DCT coefficients.
[0137]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block A from the plurality of DCT coefficient runs obtained by the three-dimensional variable length decoding unit 108. The average value of the run of the block A is obtained as RUN (A) = 4 similarly to the above-described image encoding device.
[0138]
Then, the IDCT unit 109 performs inverse DCT on the decoded DCT coefficient to obtain image information of the block A.
[0139]
Subsequently, the image decoding apparatus according to the present invention decodes the block B as follows.
[0140]
First, the run information prediction unit 106 calculates the average value of the run of the blocks A, R, S, and T accumulated in the run information accumulation unit 105 [RUN (A), RUN (R), RUN (S), RUN (T )] Is used to predict the average run of block B. According to the calculation formula described above, this predicted value P is predicted as P = 2.
[0141]
From this, the variable length selection code decoding determination unit 113 determines to decode the variable length selection code. In response to this, the variable length selection code decoding unit 114 decodes the variable length selection code. At this time, 0 indicating the two-dimensional variable length encoding unit 103 is obtained as the variable length selection code.
[0142]
From this, the variable length coding selection unit 102 selects the two-dimensional variable length decoding unit 107 in response to the variable length selection code being 0. In response to this, the two-dimensional variable length decoding unit 107 performs two-dimensional variable length decoding on the encoded data and outputs a DCT coefficient.
[0143]
At this time, the run information accumulation unit 105 obtains and accumulates the average value of the run of the block B from the plurality of DCT coefficient runs obtained by the two-dimensional variable length decoding unit 107.
[0144]
Then, the IDCT unit 109 performs inverse DCT on the decoded DCT coefficient to obtain image information of the block B.
[0145]
The image decoding apparatus according to the present invention repeats the above processing and decodes blocks in all the screens.
[0146]
As described above, according to the present invention in accordance with the embodiment examples of FIGS. 10 and 11, two run methods, two-dimensional variable length coding and three-dimensional variable length coding, are used based on run information of already coded regions. Therefore, when selecting a coding method that can improve the coding efficiency and processing to perform coding, it is necessary to code a variable length selection code that indicates which coding is selected. Therefore, the encoding efficiency can be improved since the processing is performed so that the encoding is performed only when
[0147]
In the present embodiment, which encoding is used is selected according to the run information, but similar control is possible using other encoded data such as the total number of DCT coefficients.
[0148]
In addition, in an image encoding device and an image decoding device that use interframe predictive encoding, it is possible to select variable length encoding according to an encoding mode that uses or does not use correlation between frames. In this case, a configuration is adopted in which variable length coding is switched according to the direct coding mode without providing the run information accumulation unit and the run information prediction unit.
[0149]
In this embodiment, the DCT coefficient encoding method in image encoding has been described. However, for an image encoding apparatus and an image decoding apparatus using orthogonal transform other than DCT, a DCT unit or an IDCT unit is used. Can be realized in a similar form by replacing with another orthogonal transform.
[0150]
In the present embodiment, the procedure for encoding or decoding two-dimensional image information by orthogonal transformation is shown. However, encoding of three-dimensional image information can be realized with the same configuration.
[0151]
In general multidimensional matrix component encoding, the two-dimensional variable length encoding unit of the present embodiment is replaced with the encoding unit of the last non-compositing unit, and the three-dimensional variable length encoding unit is replaced with the last combining unit. This can be realized by a configuration in which the two encoding units are selected instead of the encoding unit.
[0152]
It is also possible to encode the matrix without performing DCT. In this case, it is possible not to include a DCT unit or to use orthogonal transform other than DCT. In this case, an orthogonal transform unit is provided instead of the DCT unit.
[0153]
【The invention's effect】
  As explained above, according to the present invention,For example, when encoding an image using orthogonal transform in units of blocks obtained by dividing the screen,Per column or multiple matricesIn addition, two-dimensional variable length coding and three-dimensional variable length codingBy selecting and using, encoding can be performed with higher encoding efficiency.
[0154]
  IeIn image coding, the coefficients after orthogonal transformation can be regarded as a two-dimensional matrix.In this case, according to the present invention,For each minute (in this case, a block), the information of the already encoded component (in this case, the block) is used to select and encode two-dimensional variable length coding and three-dimensional variable length coding. The encoding efficiency can be improved as compared with the case of using either one.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram of an encoding method applicable to the present invention.
FIG. 2 is an explanatory diagram of an encoding method applicable to the present invention.
FIG. 3 is an explanatory diagram of an encoding method applicable to the present invention.
FIG. 4 is an explanatory diagram of an encoding method applicable to the present invention.
FIG. 5 is an explanatory diagram of an encoding method applicable to the present invention.
FIG. 6 is an embodiment of an image encoding device according to the present invention.
FIG. 7 is an explanatory diagram of a calculation method of a predicted value P of a run average value of a current block.
FIG. 8 is an explanatory diagram of a block arrangement used for explaining the embodiment.
FIG. 9 shows an embodiment of an image decoding apparatus according to the present invention.
FIG. 10 is another embodiment of the image encoding device of the present invention.
FIG. 11 shows another embodiment of the image decoding device of the present invention.
[Explanation of symbols]
101 DCT section
102 Variable length coding selection unit
103 Two-dimensional variable length coding unit
104 Three-dimensional variable length coding unit
105 Run information storage
106 Run information prediction unit
107 Two-dimensional variable length decoding unit
108 Three-dimensional variable length decoding unit
109 IDCT Department
110 Variable length selection code encoding determination unit
111 Variable length coding selection decision unit
112 Variable length selection code encoder
113 Variable length selection code decoding determination unit
114 Variable length selection code decoding unit

Claims (14)

画面を分割したブロックを単位に直交変換を使って画像を符号化する画像符号化装置において、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値との1つの組み合わせに対して1つの可変長符号を割り当てる第1の符号化手段と、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報との1つの組み合わせに対して1つの可変長符号を割り当てる第2の符号化手段と、
周囲の符号化済みブロックにおける、直交変換における有意係数間の距離の平均値から、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも小さい場合には、上記第1の符号化手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、上記第2の符号化手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの符号化手段のどちらかを選択する手段とを備えることを、
特徴とする画像符号化装置。
In the image encoding apparatus for encoding an image using a Cartesian transformation blocks obtained by dividing the screen into unit,
First encoding means for assigning one variable length code to one combination of a number of non-significant orthogonal transform coefficients and a value of a significant orthogonal transform coefficient;
One for each combination of consecutive numbers of non-significant orthogonal transform coefficients, values of significant orthogonal transform coefficients, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient Second encoding means for assigning a variable length code;
In the surrounding coded block, from the average value of the distance between the significant coefficients in the orthogonal transform, the predicted value of the distance between the significant coefficients of the current block is obtained, and when the predicted value is smaller than a preset value, It said decided to use the first coding means, in which case the predicted value is greater than the value set in advance, and means that determine the use of the second coding means,
Comprising means for selecting one of the two encoding means based on the determination result,
An image encoding device.
画面を分割したブロックを単位に直交変換を使って画像を符号化する画像符号化装置において、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値との1つの組み合わせに対して1つの可変長符号を割り当てる第1の符号化手段と、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報との1つの組み合わせに対して1つの可変長符号を割り当てる第2の符号化手段と、
周囲の符号化済みブロックにおける、直交変換における有意係数の総数から、現ブロックの有意係数の総数の予測値を求め、その予測値が予め設定した値よりも大きい場合には、上記第1の符号化手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、上記第2の符号化手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの符号化手段のどちらかを選択する手段とを備えることを、
特徴とする画像符号化装置。
In the image encoding apparatus for encoding an image using a Cartesian transformation blocks obtained by dividing the screen into unit,
First encoding means for assigning one variable length code to one combination of a number of non-significant orthogonal transform coefficients and a value of a significant orthogonal transform coefficient;
One for each combination of consecutive numbers of non-significant orthogonal transform coefficients, values of significant orthogonal transform coefficients, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient Second encoding means for assigning a variable length code;
A predicted value of the total number of significant coefficients of the current block is obtained from the total number of significant coefficients in the orthogonal transform in the surrounding encoded blocks, and when the predicted value is larger than a preset value, the first code decided to use means, that if the predicted value is smaller than the preset value includes means that determine the use of the second coding means,
Comprising means for selecting one of the two encoding means based on the determination result,
An image encoding device.
画面を分割したブロックを単位に直交変換を使って画像を符号化する画像符号化装置において、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値との1つの組み合わせに対して1つの可変長符号を割り当てる第1の符号化手段と、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報との1つの組み合わせに対して1つの可変長符号を割り当てる第2の符号化手段と、
直交変換を行う対象の情報をフレーム間の相関を使わずに作成した場合には、上記第1の符号化手段を用いることを決定し、フレーム間の相関を使って作成した場合には、上記第2の符号化手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの符号化手段のどちらかを選択する手段とを備えることを、
特徴とする画像符号化装置。
In the image encoding apparatus for encoding an image using a Cartesian transformation blocks obtained by dividing the screen into unit,
First encoding means for assigning one variable length code to one combination of a number of non-significant orthogonal transform coefficients and a value of a significant orthogonal transform coefficient;
One for each combination of consecutive numbers of non-significant orthogonal transform coefficients, values of significant orthogonal transform coefficients, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient Second encoding means for assigning a variable length code;
When the information to be subjected to orthogonal transform is created without using the correlation between frames, it is decided to use the first encoding means, and when the information is created using the correlation between frames, means for determine the use of the second coding means,
Comprising means for selecting one of the two encoding means based on the determination result,
An image encoding device.
画面を分割したブロックを単位に直交変換を使って画像を符号化する画像符号化装置において、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値との1つの組み合わせに対して1つの可変長符号を割り当てる第1の符号化手段と、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報との1つの組み合わせに対して1つの可変長符号を割り当てる第2の符号化手段と、
周囲の符号化済みブロックにおける、直交変換における有意係数間の距離の平均値から 、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも大きい場合には、上記第2の符号化手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、上記第1の符号化手段による符号量と上記第2の符号化手段による符号量とを比較するか、あるいは、上記第1の符号化手段による符号予測量と上記第2の符号化手段による符号予測量とを比較して、その比較に基づいて、上記2つの符号化手段の内の少ない符号量となる方の符号化手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの符号化手段のどちらかを選択する手段と、
上記比較に基づいてどちらの符号化手段を用いるのかを決定した場合に、上記2つの符号化手段のどちらを用いたのかを示す情報を符号化する手段とを備えることを、
特徴とする画像符号化装置。
In the image encoding apparatus for encoding an image using a Cartesian transformation blocks obtained by dividing the screen into unit,
First encoding means for assigning one variable length code to one combination of a number of non-significant orthogonal transform coefficients and a value of a significant orthogonal transform coefficient;
One for each combination of consecutive numbers of non-significant orthogonal transform coefficients, values of significant orthogonal transform coefficients, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient Second encoding means for assigning a variable length code;
From the average value of the distance between the significant coefficients in the orthogonal transform in the surrounding encoded block, the predicted value of the distance between the significant coefficients of the current block is obtained, and when the predicted value is larger than the preset value, When it is decided to use the second encoding means, and the predicted value is smaller than a preset value, the code amount by the first encoding means and the code amount by the second encoding means Or the code prediction amount by the first encoding means and the code prediction amount by the second encoding means are compared, and based on the comparison, the two encoding means means for determine the use of coding means those causing small code amount of inner,
Means for selecting one of the two encoding means based on the determination result ;
A means for encoding information indicating which of the two encoding means is used when it is determined which encoding means to use based on the comparison ;
An image encoding device.
画面を分割したブロックを単位に直交変換を使って画像を符号化する画像符号化装置において、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値との1つの組み合わせに対して1つの可変長符号を割り当てる第1の符号化手段と、
非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報との1つの組み合わせに対して1つの可変長符号を割り当てる第2の符号化手段と、
周囲の符号化済みブロックにおける、直交変換における有意係数の総数から、現ブロックの有意係数の総数の予測値を求め、その予測値が予め設定した値よりも小さい場合には、上記第2の符号化手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、上記第1の符号化手段による符号量と上記第2の符号化手段による符号量とを比較するか、あるいは、上記第1の符号化手段による符号予測量と上記第2の符号化手段による符号予測量とを比較して、その比較に基づいて、上記2つの符号化手段の内の少ない符号量となる方の符号化手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの符号化手段のどちらかを選択する手段と、
上記比較に基づいてどちらの符号化手段を用いるのかを決定した場合に、上記2つの符号化手段のどちらを用いたのかを示す情報を符号化する手段とを備えることを、
特徴とする画像符号化装置。
In the image encoding apparatus for encoding an image using a Cartesian transformation blocks obtained by dividing the screen into unit,
First encoding means for assigning one variable length code to one combination of a number of non-significant orthogonal transform coefficients and a value of a significant orthogonal transform coefficient;
One for each combination of consecutive numbers of non-significant orthogonal transform coefficients, values of significant orthogonal transform coefficients, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient Second encoding means for assigning a variable length code;
A predicted value of the total number of significant coefficients of the current block is obtained from the total number of significant coefficients in the orthogonal transform in the surrounding encoded blocks, and when the predicted value is smaller than a preset value, the second code If the prediction value is larger than a preset value, whether the code amount by the first encoding unit is compared with the code amount by the second encoding unit? Alternatively, the code prediction amount by the first encoding means and the code prediction amount by the second encoding means are compared, and based on the comparison, the small code amount of the two encoding means means for determine the use of coding means those causing,
Means for selecting one of the two encoding means based on the determination result ;
A means for encoding information indicating which of the two encoding means is used when it is determined which encoding means to use based on the comparison ;
An image encoding device.
直交変換を使って画像を符号化することで生成された符号化データを画面を分割したブロックを単位に復号する画像復号装置において、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値とを復号する第1の復号手段と、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報とを復号する第2の復号手段と、
周囲の復号済みブロックにおける、直交変換における有意係数間の距離の平均値から、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも小さい場合には、上記第1の復号手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、上記第2の復号手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの復号手段のどちらかを選択する手段とを備えることを、
特徴とする画像復号装置。
In an image decoding apparatus that decodes encoded data generated by encoding an image using orthogonal transformation in units of blocks obtained by dividing a screen ,
From one variable length code, a first decoding means for decoding the number of consecutive non-significant orthogonal transform coefficient, the value of the significant orthogonal transform coefficients,
Decodes consecutive numbers of non-significant orthogonal transform coefficients, significant orthogonal transform coefficient values, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient from one variable-length code Second decoding means to:
From the average value of the distance between the significant coefficients in the orthogonal transform in the surrounding decoded blocks, the predicted value of the distance between the significant coefficients of the current block is obtained, and when the predicted value is smaller than a preset value, decided to use the first decoding means, in which case the predicted value is greater than the value set in advance, and means that determine the use of the second decoding means,
Comprising means for selecting one of the two decoding means based on the determination result,
A featured image decoding apparatus.
直交変換を使って画像を符号化することで生成された符号化データを画面を分割したブロックを単位に復号する画像復号装置において、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値とを復号する第1の復号手段と、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報とを復号する第2の復号手段と、
周囲の復号済みブロックにおける、直交変換における有意係数の総数から、現ブロック の有意係数の総数の予測値を求め、その予測値が予め設定した値よりも大きい場合には、上記第1の復号手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、上記第2の復号手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの復号手段のどちらかを選択する手段とを備えることを、
特徴とする画像復号装置。
In an image decoding apparatus that decodes encoded data generated by encoding an image using orthogonal transformation in units of blocks obtained by dividing a screen ,
From one variable length code, a first decoding means for decoding the number of consecutive non-significant orthogonal transform coefficient, the value of the significant orthogonal transform coefficients,
Decodes consecutive numbers of non-significant orthogonal transform coefficients, significant orthogonal transform coefficient values, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient from one variable-length code Second decoding means to:
A predicted value of the total number of significant coefficients of the current block is obtained from the total number of significant coefficients in the orthogonal transform in the surrounding decoded blocks, and when the predicted value is larger than a preset value, the first decoding means decided to use, in which case the predicted value is smaller than the preset value includes means that determine the use of the second decoding means,
Comprising means for selecting one of the two decoding means based on the determination result,
A featured image decoding apparatus.
直交変換を使って画像を符号化することで生成された符号化データを画面を分割したブロックを単位に復号する画像復号装置において、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値とを復号する第1の復号手段と、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報とを復号する第2の復号手段と、
直交変換を行う対象の情報をフレーム間の相関を使わずに作成した場合には、上記第1の復号手段を用いることを決定し、フレーム間の相関を使って作成した場合には、上記第2の復号手段を用いることを決定する手段と、
上記決定結果に基づいて、上記2つの復号手段のどちらかを選択する手段とを備えることを、
特徴とする画像復号装置。
In an image decoding apparatus that decodes encoded data generated by encoding an image using orthogonal transformation in units of blocks obtained by dividing a screen ,
From one variable length code, a first decoding means for decoding the number of consecutive non-significant orthogonal transform coefficient, the value of the significant orthogonal transform coefficients,
Decodes consecutive numbers of non-significant orthogonal transform coefficients, significant orthogonal transform coefficient values, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient from one variable-length code Second decoding means to:
When the information to be subjected to orthogonal transformation is created without using the correlation between frames, it is decided to use the first decoding means, and when the information is created using the correlation between frames, the first means for determine the use of the second decoding means,
Comprising means for selecting one of the two decoding means based on the determination result,
A featured image decoding apparatus.
直交変換を使って画像を符号化することで生成された符号化データを画面を分割したブロックを単位に復号する画像復号装置において、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値とを復号する第1の復号手段と、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報とを復号する第2の復号手段と、
周囲の復号済みブロックにおける、直交変換における有意係数間の距離の平均値から、現ブロックの有意係数間の距離の予測値を求め、その予測値が予め設定した値よりも大きい場合には、上記第2の復号手段を用いることを決定し、その予測値が予め設定した値よりも小さい場合には、上記第1の復号手段と上記第2の復号手段のどちらを用いて復号を行うべきかを示す情報の符号化データを復号することで、上記2つの復号手段のどちらを用いて復号を行うのかを決定する手段と、
上記決定結果に基づいて、上記2つの復号手段のどちらかを選択する手段とを備えることを、
特徴とする画像復号装置。
In an image decoding apparatus that decodes encoded data generated by encoding an image using orthogonal transformation in units of blocks obtained by dividing a screen ,
From one variable length code, a first decoding means for decoding the number of consecutive non-significant orthogonal transform coefficient, the value of the significant orthogonal transform coefficients,
Decodes consecutive numbers of non-significant orthogonal transform coefficients, significant orthogonal transform coefficient values, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient from one variable-length code Second decoding means to:
From the average value of the distance between the significant coefficients in the orthogonal decoding in the surrounding decoded blocks, the predicted value of the distance between the significant coefficients of the current block is obtained, and when the predicted value is larger than the preset value, If it is decided to use the second decoding means and the predicted value is smaller than a preset value, which of the first decoding means and the second decoding means should be used for decoding? by decoding the encoded data of information indicating, and means that determine whether to decode using either of the two decoding means,
Comprising means for selecting one of the two decoding means based on the determination result,
A featured image decoding apparatus.
直交変換を使って画像を符号化することで生成された符号化データを画面を分割したブロックを単位に復号する画像復号装置において、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値とを復号する第1の復号手段と、
1つの可変長符号から、非有意な直交変換係数の連続する数と、有意な直交変換係数の値と、符号化する有意な直交変換係数が最後の有意な係数かどうかを示す情報とを復号する第2の復号手段と、
周囲の復号済みブロックにおける、直交変換における有意係数の総数から、現ブロックの有意係数の総数の予測値を求め、その予測値が予め設定した値よりも小さい場合には、上記第2の復号手段を用いることを決定し、その予測値が予め設定した値よりも大きい場合には、上記第1の復号手段と上記第2の復号手段のどちらを用いて復号を行うべきかを示す情報の符号化データを復号することで、上記2つの復号手段のどちらを用いて復号を行うのかを決定する手段と、
上記決定結果に基づいて、上記2つの復号手段のどちらかを選択する手段とを備えることを、
特徴とする画像復号装置。
In an image decoding apparatus that decodes encoded data generated by encoding an image using orthogonal transformation in units of blocks obtained by dividing a screen ,
From one variable length code, a first decoding means for decoding the number of consecutive non-significant orthogonal transform coefficient, the value of the significant orthogonal transform coefficients,
Decodes consecutive numbers of non-significant orthogonal transform coefficients, significant orthogonal transform coefficient values, and information indicating whether the significant orthogonal transform coefficient to be encoded is the last significant coefficient from one variable-length code Second decoding means to:
A predicted value of the total number of significant coefficients of the current block is obtained from the total number of significant coefficients in the orthogonal transform in the surrounding decoded blocks, and when the predicted value is smaller than a preset value, the second decoding means If the predicted value is larger than a preset value, the sign of information indicating which of the first decoding means and the second decoding means should be used for decoding data by decoding and means for determine whether to decode using either of the two decoding means,
Comprising means for selecting one of the two decoding means based on the determination result,
A featured image decoding apparatus.
請求項1ないし5のいずれか1項に記載の画像符号化装置の実現に用いられる処理をコンピュータに実行させるための画像符号化プログラム。An image encoding program for causing a computer to execute processing used to realize the image encoding device according to claim 1 . 請求項1ないし5のいずれか1項に記載の画像符号化装置の実現に用いられる処理をコンピュータに実行させるための画像符号化プログラムを記録したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium having recorded thereon an image encoding program for causing a computer to execute processing used to realize the image encoding device according to claim 1 . 請求項6ないし10のいずれか1項に記載の画像復号装置の実現に用いられる処理をコンピュータに実行させるための画像復号プログラム。The image decoding program for making a computer perform the process used for implementation | achievement of the image decoding apparatus of any one of Claim 6 thru | or 10 . 請求項6ないし10のいずれか1項に記載の画像復号装置の実現に用いられる処理をコンピュータに実行させるための画像復号プログラムを記録したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium having recorded thereon an image decoding program for causing a computer to execute processing used to realize the image decoding device according to claim 6 .
JP2002020876A 2002-01-30 2002-01-30 Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs Expired - Fee Related JP3866580B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002020876A JP3866580B2 (en) 2002-01-30 2002-01-30 Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002020876A JP3866580B2 (en) 2002-01-30 2002-01-30 Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs

Publications (2)

Publication Number Publication Date
JP2003224851A JP2003224851A (en) 2003-08-08
JP3866580B2 true JP3866580B2 (en) 2007-01-10

Family

ID=27744254

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002020876A Expired - Fee Related JP3866580B2 (en) 2002-01-30 2002-01-30 Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs

Country Status (1)

Country Link
JP (1) JP3866580B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100604986B1 (en) * 2004-07-26 2006-07-28 삼성전자주식회사 Variable length coding method with 4 stage pipeline and variable length coder using the same
US9042440B2 (en) * 2010-12-03 2015-05-26 Qualcomm Incorporated Coding the position of a last significant coefficient within a video block based on a scanning order for the block in video coding
US8976861B2 (en) 2010-12-03 2015-03-10 Qualcomm Incorporated Separately coding the position of a last significant coefficient of a video block in video coding
US20120163456A1 (en) 2010-12-22 2012-06-28 Qualcomm Incorporated Using a most probable scanning order to efficiently code scanning order information for a video block in video coding
US10499059B2 (en) 2011-03-08 2019-12-03 Velos Media, Llc Coding of transform coefficients for video coding
US9167253B2 (en) 2011-06-28 2015-10-20 Qualcomm Incorporated Derivation of the position in scan order of the last significant transform coefficient in video coding
EP2985995B1 (en) 2013-04-12 2021-06-16 Square Enix Holdings Co., Ltd. Information processing device, control method, program, and recording medium
JP6377222B2 (en) * 2017-07-31 2018-08-22 株式会社スクウェア・エニックス・ホールディングス Information processing apparatus, control method, program, and recording medium

Also Published As

Publication number Publication date
JP2003224851A (en) 2003-08-08

Similar Documents

Publication Publication Date Title
JP4357590B2 (en) Image encoding system and image decoding system
JP5697614B2 (en) Adaptive frame / field coding at the macroblock level of digital video content
JP5401009B2 (en) Video intra prediction encoding and decoding method and apparatus
EP3684059B1 (en) Decoding method for intra predicting a block by first predicting the pixels at the boundary
US8204136B2 (en) Image encoding apparatus
US9210435B2 (en) Video encoding method and apparatus for estimating a code amount based on bit string length and symbol occurrence frequency
JP5222958B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture decoding apparatus, and moving picture decoding method
JP5400798B2 (en) Moving picture decoding method and apparatus, moving picture encoding method and apparatus
JP2005524319A (en) Image and image sequence compression through adaptive parcels
JP5216710B2 (en) Decryption processing method
JP2008219870A (en) Moving picture coding method and moving picture encoder
KR20190096432A (en) Intra prediction mode based image processing method and apparatus therefor
JP2008167449A (en) Method and apparatus for encoding/decoding image
JP3866580B2 (en) Image encoding device, image decoding device, image encoding program, image decoding program, and computer-readable recording medium recording these programs
JP2020005294A (en) Processing method
KR20160091392A (en) Method for encoding and decoding images, device for encoding and decoding images and corresponding computer programs
JP5178616B2 (en) Scene change detection device and video recording device
JP2001128179A (en) Device and method for encoding moving picture
JP4290972B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program, recording medium on which image encoding program is recorded, and recording medium on which image decoding program is recorded
JP2009049969A (en) Device and method of coding moving image and device and method of decoding moving image
JP6992825B2 (en) Video coding device, video coding method, video decoding device, video decoding method, and video coding system
KR101583870B1 (en) Image encoding system, image decoding system and providing method thereof
KR20150096353A (en) Image encoding system, image decoding system and providing method thereof
JP5298082B2 (en) Encoding apparatus and decoding apparatus for adaptively determining scan order of orthogonal transform coefficients
JP2008177834A (en) Coding device, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040422

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060801

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060904

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060904

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: 20061003

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061005

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D02

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131013

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees