JP3700801B2 - Image coding apparatus and image coding method - Google Patents

Image coding apparatus and image coding method Download PDF

Info

Publication number
JP3700801B2
JP3700801B2 JP29534296A JP29534296A JP3700801B2 JP 3700801 B2 JP3700801 B2 JP 3700801B2 JP 29534296 A JP29534296 A JP 29534296A JP 29534296 A JP29534296 A JP 29534296A JP 3700801 B2 JP3700801 B2 JP 3700801B2
Authority
JP
Japan
Prior art keywords
image
prediction
reference image
mode
encoding
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
JP29534296A
Other languages
Japanese (ja)
Other versions
JPH10145792A (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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP29534296A priority Critical patent/JP3700801B2/en
Publication of JPH10145792A publication Critical patent/JPH10145792A/en
Application granted granted Critical
Publication of JP3700801B2 publication Critical patent/JP3700801B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像符号化装置および画像符号化方法に関し、特に、例えば、動画像を、光磁気ディスクや磁気テープなどの記録媒体に記録したり、テレビ会議システムや、テレビ電話システム、放送用機器などにおいて、動画像を、伝送路を介して、送信側から受信側に伝送する場合などに用いて好適な画像符号化装置および画像符号化方法に関する。
【0002】
【従来の技術】
例えば、動画像をディジタル化して記録したり、伝送する場合においては、そのデータ量が膨大であることから、従来より、画像データを圧縮符号化することが行われている。動画像の代表的な符号化方式としては、動き補償予測符号化などがある。
【0003】
動き補償予測符号化は、画像の時間軸方向の相関を利用する符号化方法で、図13に示すように、参照する画像(参照画像)(参照フレーム)に対する、符号化対象の画像(符号化対象画像)(現フレーム)の動きベクトルを検出し、その動きベクトルにしたがって、既に符号化されて復号化された参照画像を動き補償することにより、予測画像を生成する。そして、この予測画像に対する、符号化対象画像の予測残差を求め、この予測残差と動きベクトルを符号化することにより、動画像の情報量が圧縮される。
【0004】
動き補償予測符号化の具体的なものとしては、MPEG(Moving Picture Experts Group)符号化がある。これは、ISO(国際標準化機構)とIEC(国際電気標準会議)のJTC(Joint Technical Committee)1のSC(Sub Committee)9のWG(Working Group)11においてまとめられた動画像符号化方式の通称である。
【0005】
MPEGでは、1フレームまたは1フィールドが、16ライン×16画素で構成されるマクロブロックに分割され、このマクロブロック単位で、動き補償予測符号化が行われる。
【0006】
ここで、動き補償予測符号化には、大別して、イントラ符号化と、インター符号化(非イントラ符号化)の2つの符号化方式がある。イントラ符号化では、符号化対象のマクロブロックに関して、自身の情報がそのまま符号化され、インター符号化では、他の時刻のフレーム(またはフィールド)を参照画像として、その参照画像から生成される予測画像と、自身の情報との差分が符号化される。
【0007】
MPEGでは、各フレームが、Iピクチャ(Intra coded picture)、Pピクチャ(Predictive coded picture)、またはBピクチャ(Bidirectionally predictive picture)のうちのいずれかとして符号化される。また、MPEGでは、GOP(Group Of Picture)単位で処理が行われる。
【0008】
即ち、MPEGにおいては、GOPは、例えば、図14に示すように、17フレームで構成される。そして、いま、このGOPを構成するフレームを、その先頭から、F1,F2,・・・,F17とするとき、例えば、同図に示すように、フレームF1はIピクチャとして、フレームF2はBピクチャとして、フレームF3はPピクチャとして処理される。その後のフレームF4乃至F17は、交互に、BピクチャまたはPピクチャとして処理される。
【0009】
Iピクチャはイントラ符号化されるが、PおよびBピクチャは、基本的に、インター符号化される。即ち、Pピクチャは、図14(A)に矢印で示すように、基本的には、その直前のIまたはPピクチャを参照画像として用いて、インター符号化される。Bピクチャは、図14(B)に矢印で示すように、基本的には、その直前のIまたはPピクチャと、その直後のPピクチャとの両方、あるいは、そのいずれか一方を参照画像として用いて、インター符号化される。
【0010】
より具体的には、図15に示すように、まず、フレームF1がIピクチャとして処理される。即ち、そのすべてのマクロブロックはイントラ符号化され(SP1)、伝送データF1Xとして、伝送路を介して伝送される。
【0011】
次に、時間的に後行する画像(未来の画像)を参照画像とする可能性のあるBピクチャであるフレームF2をスキップして、PピクチャであるフレームF3が先に処理される。フレームF3については、その直前のIピクチャであるフレームF1を参照画像として、その参照画像から生成される予測画像に対する予測残差が求められ(順方向予測符号化され)(SP3)、これが、フレームF1に対する動きベクトルx3とともに、伝送データF3Xとして伝送される。あるいは、また、フレームF3は、フレームF1と同様にイントラ符号化され(SP1)、伝送データF3Xとして伝送される。Pピクチャを、イントラ符号化するか、または順方向予測符号化するかは、マクロブロック単位で切り換えることができる。
【0012】
フレームF3の符号化後は、BピクチャであるフレームF2が処理される。Bピクチャは、イントラ符号化、順方向予測符号化、逆方向予測符号化、または双方向予測符号化される。
【0013】
即ち、イントラ符号化では、フレームF2は、フレームF1と同様に、そのデータがそのまま伝送データF2Xとして伝送される(SP1)。
【0014】
順方向予測符号化では、フレームF2は、その直前の(時間的に先行する)IまたはPピクチャであるフレームF1を参照画像として、その参照画像から生成される予測画像に対する予測残差が求められ(順方向予測符号化され)(SP3)、これが、フレームF1に対する動きベクトルx1とともに、伝送データF2Xとして伝送される。
【0015】
逆方向予測符号化では、フレームF2は、その直後の(時間的に後行する)IまたはPピクチャであるフレームF3を参照画像として、その参照画像から生成される予測画像に対する予測残差が求められ(逆方向予測符号化され)(SP2)、これが、フレームF3に対する動きベクトルx2とともに、伝送データF2Xとして伝送される。
【0016】
双方向予測符号化では、フレームF2は、フレームF1とF3を参照画像として、その参照画像から生成される予測画像の平均値などに対する予測残差が求められ(双方向予測符号化され)(SP4)、これが、フレームF1とF3に対する動きベクトルx1とx2とともに、伝送データF2Xとして伝送される。
【0017】
なお、Bピクチャを、イントラ符号化、順方向予測符号化、逆方向予測符号化、または双方向予測符号化のうちのいずれで符号化するかも、Pピクチャと同様に、マクロブロック単位で切り換えることができる。
【0018】
また、イントラ符号化に対して、順方向予測符号化、逆方向予測符号化、および双方向予測符号化が、インター符号化(非イントラ符号化)と呼ばれる。
【0019】
ここで、以下、適宜、時間的に先行または後行する参照画像を、過去参照画像または未来参照画像という。
【0020】
【発明が解決しようとする課題】
画像符号化装置には、Bピクチャのマクロブロックを符号化させる際に、イントラ符号化、順方向予測符号化、逆方向予測符号化、または両方向予測符号化のうちの、最も符号化効率の良い予測モードを選択させるのが望ましい。
【0021】
そこで、Bピクチャを、上述の4つの予測モードそれぞれで符号化し、その結果得られるデータ量の最も少ないものを選択する方法がある。
【0022】
しかしながら、この方法では、4つの予測モードそれぞれで符号化する必要があるため、処理に時間を要し、あるいは、装置規模が大きくなる。
【0023】
そこで、過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとを検出(ME(Motion Estimation))し、順方向動きベクトルまたは逆方向動きベクトルに対応して過去参照画像または未来参照画像をそれぞれ動き補償することにより予測画像を求め、それぞれの予測画像に対する、符号化対象の画像の予測残差(ME Error)(以下、適宜、動きベクトル推定残差ともいう)に対応して、Bピクチャの予測モードを決定する方法(正確には、3種類のインター符号化(順方向予測符号化、逆方向予測符号化、および両方向予測符号化)のうちの1つを選択する方法))を、本件出願人は先に提案している。
【0024】
この方法(以下、適宜、第1の方法という)においては、まず最初に、例えば、符号化対象のマクロブロックと、参照画像を動き補償して得られる予測マクロブロックとの、各画素値の差分の絶対値和が、動きベクトル推定残差として求められる。
【0025】
そして、過去参照画像または未来参照画像に対する動きベクトル推定残差を、それぞれEfまたはEbとするとき、インター符号化の中のどれを用いるかが、例えば、図16に示すように決定される。
【0026】
即ち、式Eb>j×Efが成り立つ場合、順方向予測符号化が選択され、式Eb<k×Efが成り立つ場合、逆方向予測符号化が選択される。そして、これら以外の場合、即ち、式k×Ef≦Eb≦j×Efが成り立つ場合、双方向予測符号化が選択される。
【0027】
なお、0<k<jで、図16においては、j=2,k=1/2としてある。
【0028】
ここで、本明細書中において、記号<,>は、記号≦,≧としても良い。同様に、記号≦,≧は、記号<,>としても良い。
【0029】
従って、順方向動きベクトルによる予測残差Efが、逆方向動きベクトルによる予測残差Ebに比べ、比較的小さい場合(図16では、1/2未満(以下)である場合)、順方向予測符号化が選択される。また、逆方向動きベクトルによる予測残差Ebが、順方向動きベクトルによる予測残差Efに比べ、比較的小さい場合(図16では、1/2未満(以下)である場合)、逆方向予測符号化が選択される。さらに、予測残差EfとEbとの比がそれほど大きなものおよび小さなものでない場合(図16では、Ef/Ebが1/2以上(より大きく)、かつ2以下(未満)の場合)、双方向予測が選択される。
【0030】
ところで、画像のシーケンスが、図14に示したように、IまたはPピクチャの間に、1枚(フレームまたはフィールド)のBピクチャが配置されて構成されている場合においては、Bピクチャに対する過去参照画像または未来参照画像それぞれとなるIあるいはPピクチャ(I/Pピクチャ)から、そのBピクチャまでの時間的な距離が、いずれも同一であるから、第1の方法によって、符号化効率の向上を図ることができる。
【0031】
しかしながら、画像のシーケンスが、IまたはPピクチャの間に、2枚以上のBピクチャが配置されて構成されている場合、即ち、例えば、図17に示すように、2枚のBピクチャが配置されて構成されている場合においては、インター符号化の中で、順方向予測符号化または逆方向予測符号化が、最も符号化効率が高いのにも拘らず、双方向予測符号化が選択されることがあった。
【0032】
なお、このことは、本件発明者が行ったシミュレーションにより確認している。
【0033】
これは、図17に示すように、Bピクチャから、その過去参照画像または未来参照画像それぞれとなるI/Pピクチャまでの距離が異なることに起因する。
【0034】
即ち、2枚のBピクチャが配置されている場合においては、1枚目のBピクチャについては、未来参照画像までの距離の方が、過去参照画像までの距離より遠くなり、2枚目のBピクチャについては、その逆に、過去参照画像までの距離の方が、未来参照画像までの距離より遠くなる。従って、1枚目のBピクチャについては、逆方向動きベクトルによる予測精度が劣化し、2枚目のBピクチャについては、順方向動きベクトルによる予測精度が劣化する。
【0035】
そこで、本件出願人は、Bピクチャから過去参照画像または未来参照画像それぞれまでの距離を考慮して、予測モードを決定することにより、過去参照画像と未来参照画像との間に、2枚以上のBピクチャが配置されていても、画像を効率良く符号化することが可能な方法(以下、適宜、第2の方法という)を、先に提案している(例えば、特願平7−210665号)。
【0036】
この第2の方法では、符号化対象のBピクチャが、過去参照画像または未来参照画像のうちのいずれに近いかによって、インター符号化の中から1つを選択する条件が変更されるようになされている。
【0037】
即ち、符号化対象のBピクチャが、過去参照画像に近い場合(例えば、図17におけるフレームF2や、F5,F8,・・・)、図18(A)に示すように、式Eb>a×Efが成り立つとき、順方向予測符号化が選択され、式Eb<b×Efが成り立つとき、逆方向予測符号化が選択される。また、式b×Ef≦Eb≦a×Efが成り立つとき、双方向予測符号化が選択される。
【0038】
但し、0<b<aで、また、aは、図16におけるjより小さい値である。図18(A)においては、a=4/3,b=1/2としてある。
【0039】
一方、符号化対象のBピクチャが、未来参照画像に近い場合(例えば、図17におけるフレームF3や、F6,F9,・・・)、図18(B)に示すように、式Eb>c×Efが成り立つとき、順方向予測符号化が選択され、式Eb<d×Efが成り立つとき、逆方向予測符号化が選択される。また、式d×Ef≦Eb≦c×Efが成り立つとき、双方向予測符号化が選択される。
【0040】
但し、0<d<cで、また、dは、図16におけるkより大きい値である。図18(B)においては、c=2,d=3/4としてある。
【0041】
以上のようにすることで、符号化対象のBピクチャが、過去参照画像に近い場合には、その過去参照画像のみを用いる順方向予測符号化が選択され易くなり、また、未来参照画像に近い場合には、その未来参照画像のみを用いる逆方向予測符号化が選択され易くなる。従って、予測精度が高い参照画像だけを用いて予測符号化され易くなり、その結果、符号化効率を向上させることができる。
【0042】
しかしながら、第2の方法によれば、例えば、動きの遅い画像、あるいは、物体が、水平方向にパンしているなど、一定の単純な動きをしている画像などを符号化対象とすると、符号化効率が若干低下する場合があった。
【0043】
即ち、動きの遅い画像や、一定の単純な動きをしている画像については、順方向予測符号化または逆方向予測符号化するより、双方向予測符号化する方が予測精度が高くなり、従って、符号化効率も高くなる。しかしながら、第2の方法では、図18に示したように、図16における場合に比較して、双方向予測符号化が選択される範囲を狭くして、順方向予測符号化または逆方向予測符号化が選択される範囲を広くしている。これにより、第2の方法によれば、動きの遅い画像や、一定の単純な動きをしている画像を符号化する場合においても、双方向予測符号化より、順方向予測符号化または逆方向予測符号化が選択され易く、その結果、符号化効率が劣化する。
【0044】
一方、従来においては、動きベクトルの伝送に必要なビット量を考慮せずに、インター符号化の選択(順方向予測符号化、逆方向予測符号化、または双方向予測符号化のうちのいずれか1つの選択)を行っていた。
【0045】
即ち、従来においては、基本的に、順方向予測符号化、逆方向予測符号化、または双方向予測符号化のうちの、予測残差が最も小さいものが選択されるようになされていた。
【0046】
しかしながら、例えば、順方向予測符号化、逆方向予測符号化、および双方向予測符号化についてのいずれの予測残差も小さい場合においては、そのうちの双方向予測符号化についてのものが最も小さくても、動きベクトルの伝送に要するビット量をも考慮すると、双方向予測符号化よりも、順方向予測符号化または逆方向予測符号化の方が、符号化効率が良くなることがあった。
【0047】
なお、このようなケースは、例えば、動きの速い画像を符号化する場合に生じることが多かった。
【0048】
本発明は、このような状況に鑑みてなされたものであり、画像の符号化効率を、より向上させることができるようにするものである。
【0049】
【課題を解決するための手段】
本発明の画像符号化装置は、時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとを検出する動きベクトル検出手段と、過去参照画像または未来参照画像それぞれに対する、符号化対象の画像の予測残差に基づいて、符号化対象の画像の予測モードを順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのいずれかに決定する予測モード決定手段と、予測モードに対応する動き補償を行うことにより、予測画像を生成する動き補償手段と、符号化対象の画像と、予測画像との差分値を演算する差分値演算手段と、差分値を符号化する符号化手段とを備え、予測モード決定手段は、過去参照画像または未来参照画像それぞれに対する予測残差をEfまたはEbとするとともに、α,β,γ,δを所定の定数とする場合において(但し、α,β,γ,δは実数であり、γ<β)、式Eb>α×EfかつEb>β×Ef+(1−α×β)×δが成り立つとき、過去参照画像のみから予測画像を生成する順方向予測符号化モードに、予測モードを決定し、式Eb≦α×EfかつEb<γ×Ef+(1−α×γ)×δが成り立つとき、未来参照画像のみから予測画像を生成する逆方向予測符号化モードに、予測モードを決定し、式γ×Ef+(1−α×γ)×δ≦EbかつEb≦β×Ef+(1−α×β)×δが成り立つとき、過去参照画像および未来参照画像の両方から予測画像を生成する双方向予測符号化モードに、予測モードを決定し、順方向動きベクトルまたは逆方向動きベクトルの大きさが大きいほどにδを大きくすることで、双方向予測符号化モードが決定されにくくすることを特徴とする。
【0050】
本発明の画像符号化方法は、時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとを検出し、過去参照画像または未来参照画像それぞれに対する、符号化対象の画像の予測残差に基づいて、符号化対象の画像の予測モードを順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのいずれかに決定し、予測モードに対応する動き補償を行うことにより、予測画像を生成し、符号化対象の画像と、予測画像との差分値を演算し、差分値を符号化し、過去参照画像または未来参照画像それぞれに対する予測残差をEfまたはEbとするとともに、α,β,γ,δを所定の定数とする場合において(但し、α,β,γ,δは実数であり、γ<β)、式Eb>α×EfかつEb>β×Ef+(1−α×β)×δが成り立つとき、過去参照画像のみから予測画像を生成する順方向予測符号化モードに、予測モードを決定し、式Eb≦α×EfかつEb<γ×Ef+(1−α×γ)×δが成り立つとき、未来参照画像のみから予測画像を生成する逆方向予測符号化モードに、予測モードを決定し、式γ×Ef+(1−α×γ)×δ≦EbかつEb≦β×Ef+(1−α×β)×δが成り立つとき、過去参照画像および未来参照画像の両方から予測画像を生成する双方向予測符号化モードに、予測モードを決定し、順方向動きベクトルまたは逆方向動きベクトルの大きさが大きいほどにδを大きくすることで、双方向予測符号化モードが決定されにくくすることを特徴とする。
【0051】
本発明の画像符号化装置においては、時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとが検出され、過去参照画像または未来参照画像それぞれに対する、符号化対象の画像の予測残差に基づいて、符号化対象の画像の予測モードが順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのいずれかに決定され、予測モードに対応する動き補償が行われることにより、予測画像が生成され、符号化対象の画像と、予測画像との差分値が演算され、差分値が符号化され、過去参照画像または未来参照画像それぞれに対する予測残差をEfまたはEbとするとともに、α,β,γ,δを所定の定数とする場合において(但し、α,β,γ,δは実数であり、γ<β)、式Eb>α×EfかつEb>β×Ef+(1−α×β)×δが成り立つとき、過去参照画像のみから予測画像を生成する順方向予測符号化モードに、予測モードが決定され、式Eb≦α×EfかつEb<γ×Ef+(1−α×γ)×δが成り立つとき、未来参照画像のみから予測画像を生成する逆方向予測符号化モードに、予測モードが決定され、式γ×Ef+(1−α×γ)×δ≦EbかつEb≦β×Ef+(1−α×β)×δが成り立つとき、過去参照画像および未来参照画像の両方から予測画像を生成する双方向予測符号化モードに、予測モードが決定され、順方向動きベクトルまたは逆方向動きベクトルの大きさが大きいほどにδが大されることで、双方向予測符号化モードが決定されにくくされる
【0052】
本発明の画像符号化方法においては、時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとが検出され、過去参照画像または未来参照画像それぞれに対する、符号化対象の画像の予測残差に基づいて、符号化対象の画像の予測モードが順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのいずれかに決定され、予測モードに対応する動き補償が行われることにより、予測画像が生成され、符号化対象の画像と、予測画像との差分値が演算され、差分値が符号化され、過去参照画像または未来参照画像それぞれに対する予測残差をEfまたはEbとするとともに、α,β,γ,δを所定の定数とする場合において(但し、α,β,γ,δは実数であり、γ<β)、式Eb>α×EfかつEb>β×Ef+(1−α×β)×δが成り立つとき、過去参照画像のみから予測画像を生成する順方向予測符号化モードに、予測モードが決定され、式Eb≦α×EfかつEb<γ×Ef+(1−α×γ)×δが成り立つとき、未来参照画像のみから予測画像を生成する逆方向予測符号化モードに、予測モードが決定され、式γ×Ef+(1−α×γ)×δ≦EbかつEb≦β×Ef+(1−α×β)×δが成り立つとき、過去参照画像および未来参照画像の両方から予測画像を生成する双方向予測符号化モードに、予測モードが決定され、順方向動きベクトルまたは逆方向動きベクトルの大きさが大きいほどにδが大されることで、双方向予測符号化モードが決定されにくくされる
【0053】
【発明の実施の形態】
以下に、本発明の実施の形態を説明するが、その前に、特許請求の範囲に記載の発明の各手段と以下の実施の形態との対応関係を明らかにするために、各手段の後の括弧内に、対応する実施の形態(但し、一例)を付加して、本発明の特徴を記述すると、次のようになる。
【0054】
即ち、請求項1に記載の画像符号化装置は、時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとを検出する動きベクトル検出手段(例えば、図6に示す動きベクトル推定回路6など)と、順方向動きベクトルまたは逆方向動きベクトルに対応して、符号化対象の画像の予測モードを決定する予測モード決定手段(例えば、図7に示す予測モード決定回路21など)と、予測モードに対応する動き補償を行うことにより、予測画像を生成する動き補償手段(例えば、図7に示す動き補償回路20など)と、符号化対象の画像と、予測画像との差分値を演算する差分値演算手段(例えば、図7に示す演算部11など)と、差分値を符号化する符号化手段(例えば、図7に示すDCT回路12や、量子化回路13、可変長符号化回路15など)とを備えることを特徴とする。
【0055】
なお、勿論この記載は、各手段を上記したものに限定することを意味するものではない。
【0056】
次に、本発明の原理について説明する。
【0057】
動画像においては、一般に、画像どうしの時間軸方向の相関は、その画像どうしの距離(間隔)が大きくなるほど小さくなる。
【0058】
従って、例えば、図14と同一の図1に示すような、I/Pピクチャの間に1枚のBピクチャが配置されたシーケンスにおいては、Bピクチャと、過去参照画像または未来参照画像それぞれとの相関は等しく、その結果、過去参照画像および未来参照画像に対する動きベクトル推定残差Ef,Ebについての統計的な性質も等しくなる。
【0059】
一方、例えば、図17と同一の図2に示すような、I/Pピクチャの間に2枚以上のBピクチャが配置されたシーケンスにおいては、Bピクチャと、過去参照画像または未来参照画像それぞれとの相関は、その距離に対応して変化する。
【0060】
このため、例えば、図3に示すように、PピクチャPnとPn+4との間に、3枚のBピクチャBn+1,Bn+2,Bn+3が配置されている場合において、この3枚のBピクチャBn+1,Bn+2,Bn+3を、PピクチャPnまたはPn+4それぞれを過去参照画像または未来参照画像として予測符号化すると、過去参照画像Pnに対するBピクチャBn+1,Bn+2,Bn+3それぞれの動きベクトル残差Ef1,Ef2,Ef3は、一般に、Ef1<Ef2<Ef3の関係になる。
【0061】
同様に、未来参照画像Pn+4に対するBピクチャBn+1,Bn+2,Bn+3それぞれの動きベクトル残差Eb1,Eb2,Eb3は、一般に、Eb1>Eb2>Eb3の関係になる。
【0062】
以上のように、I/Pピクチャの間に、2枚以上のBピクチャが配置されている場合には、各Bピクチャについて、過去参照画像または未来参照画像それぞれまでの距離が異なるため、その相関も異なる。その結果、過去参照画像または未来参照画像に対する動きベクトル残差それぞれの統計的性質も、各Bピクチャによって異なり、従って、符号化効率を向上させるには、各Bピクチャを符号化する際の予測モードの決定方法を、その統計的性質に応じて変える必要がある。
【0063】
次に、双方向予測符号化による予測精度は、一般に、画像の動きが速いほど低下する。このため、双方向予測符号化による場合には、順方向動きベクトルと逆方向動きベクトルとの両方を伝送しなければならないことをも考慮すると、画像の動きが速い場合には、双方向予測符号化による予測残差が最も小さいときであっても、符号化対象のBピクチャから時間的に最も近い参照画像のみを用いて予測符号化を行う方が、発生する全体のデータ量が少なくなることが多い。
【0064】
一方、画像の動きの速さは、例えば、動きベクトルをMVと表し、そのx成分(水平方向の成分)をvxと、y成分(垂直方向の成分)をvyと表すとき、動きベクトルの大きさ|MV|=(vx 2+vy 21/2で表すことができる。
【0065】
そこで、I/Pピクチャの間に、例えば、図2に示したように、2枚のBピクチャが配置されている場合においては、動きベクトルの大きさ|MV|に対応して、次のように予測モードを設定することにより、符号化効率を向上させることができる。
【0066】
即ち、いま、符号化対象のBピクチャから、過去参照画像または未来参照画像までのフレーム数を、それぞれDfまたはDbとすると、Df=1およびDb=2の場合(符号化対象のBピクチャからの距離が、過去参照画像の方が近い場合)、例えば、図4(A)に示すように、式Eb>p×EfかつEb>q×Ef+(1−p×q)×Tiが成り立つとき、順方向予測符号化を選択し、式Eb≦p×EfかつEb<r×Ef+(1−p×r)×Tiが成り立つとき、逆方向予測符号化を選択する。また、式r×Ef+(1−p×r)×Ti≦EbかつEb≦q×Ef+(1−p×q)×Tiが成り立つとき、双方向予測符号化を選択する。
【0067】
ここで、Tiは0以上の定数で、0<r<qであり、また、qは、図16におけるjより小さい値である。図4(A)においては、q=5/4,r=3/4となっている。また、p=1となっている。
【0068】
この場合、予測残差EfがTi未満(以下)か、または予測誤差Ebがp×Ti未満となるときは、双方向予測符号化は選択されない。即ち、この場合、双方向予測符号化は、予測残差EfがTi以上となる(より大きくなる)か、または予測誤差Ebがp×Ti以上となるときに限り選択され得る。
【0069】
従って、この場合、動きベクトルの大きさ|MV|が大きくなるにつれて、定数Tiを大きな値に設定することにより、双方向予測符号化が選択され難くなる。
【0070】
即ち、T1<T2<・・・<Tn<Tn+1、および0<mv0<mv1<・・・<mvn-1<mvnとする場合において、動きベクトルの大きさ|MV|が、mv0以上mv1未満のときは、TiをT1に、mv1以上mv2未満のときは、TiをT2に、・・・、mvn-1以上mvn未満のときは、TiをTnに、mvn以上のときは、TiをTn+1に設定する。このようにすることで、画像の動きが速いほど、予測精度の低下し、動きベクトルに割り当てるビット量が大きく増加する双方向予測符号化が選択され難くなり、その結果、符号化効率を向上させることができる。
【0071】
また、この場合、符号化対象のBピクチャが、過去参照画像に近いことから、その過去参照画像のみを用いる順方向予測符号化が選択され易くなっているので、この点からも、符号化効率を向上させることができる。
【0072】
一方、Df=2およびDb=1の場合(符号化対象のBピクチャからの距離が、未来参照画像の方が近い場合)、例えば、図4(B)に示すように、式Eb>s×EfかつEb>t×Ef+(1−s×t)×Tiが成り立つとき、順方向予測符号化を選択し、式Eb≦s×EfかつEb<u×Ef+(1−s×u)×Tiが成り立つとき、逆方向予測符号化を選択する。また、式u×Ef+(1−s×u)×Ti≦EbかつEb≦t×Ef+(1−s×t)×Tiが成り立つとき、双方向予測符号化を選択する。
【0073】
ここで、0<u<tであり、また、uは、図16におけるkより大きい値である。図4(B)においては、t=4/3,u=4/5となっている。また、s=1となっている。
【0074】
この場合も、予測残差EfがTi未満か、または予測誤差Ebがs×Ti未満となるときは、双方向予測符号化は選択されない。即ち、この場合、双方向予測符号化は、予測残差EfがTi以上となるか、または予測誤差Ebがs×Ti以上となるときに限り選択され得る。
【0075】
従って、上述の場合と同様に、動きベクトルの大きさ|MV|が大きくなるにつれて、定数Tiを大きな値に設定することにより、双方向予測符号化が選択され難くなり、その結果、符号化効率を向上させることができる。
【0076】
また、この場合、符号化対象のBピクチャが、未来参照画像に近いことから、その未来参照画像のみを用いる逆方向予測符号化が選択され易くなっているので、この点からも、符号化効率を向上させることができる。
【0077】
なお、画像の動きが遅い場合には、前述したように、双方向予測符号化の予測精度が高く、また、発生符号量も少なくなるので、双方向予測符号化が選択されるのが望ましい。そこで、動きベクトルの大きさ|MV|が所定の値mv0未満となった場合には、例えば、図16と同一の図5に示すように、式Eb>j×Efが成り立つときは、順方向予測符号化を選択し、式Eb<k×Efが成り立つときは、逆方向予測符号化を選択し、式k×Ef≦Eb≦j×Efが成り立つときは、双方向予測符号化を選択するようにする。
【0078】
即ち、図4において、例えば、t=q=j,r=u=k,Ti=0とする。
【0079】
このようにすることで、動きベクトルの大きさ|MV|がmv0未満となった場合には、予測精度の高い双方向予測符号化が選択され易くなり、その結果、符号化効率を向上させることができる。
【0080】
なお、画像の動きの速さは、動きベクトルの大きさ|MV|の他、例えば、動きベクトルMVのx成分の絶対値とy成分の絶対値との和|x|+|y|などにも反映される。そこで、上述の定数Tiは、この成分の絶対値和|x|+|y|に対応して設定することも可能である。
【0081】
次に、双方向予測符号化による予測精度は、画像の動きの速さの他、その複雑さによっても変化する。即ち、双方向予測符号化による予測精度は、基本的に、画像の動きが、物体が、水平方向にパンしているなど、一定の単純なものであるときは高くなり、複雑になるほど低下する。
【0082】
このため、双方向予測符号化による場合には、順方向動きベクトルと逆方向動きベクトルとの両方を伝送しなければならないことをも考慮すると、画像の動きが複雑な場合には、双方向予測符号化による予測残差が最も小さいときであっても、符号化対象のBピクチャから時間的に最も近い参照画像(過去参照画像または未来参照画像までの距離が等しい場合には、そのうちのいずれか一方)のみを用いて予測符号化を行う方が、発生する全体のデータ量が少なくなることが多い。
【0083】
一方、例えば、物体が平行移動している画像においては、その順方向動きベクトルと逆方向動きベクトルの方向は逆になる。即ち、順方向動きベクトルのx成分またはy成分の符号と、逆方向動きベクトルのx成分またはy成分の符号とは(x成分どうしの符号とy成分どうしの符号は)、それぞれ異なるものとなる。
【0084】
逆に、物体が複雑な動きをしている場合、x成分どうしの符号またはy成分どうしの符号のうちの少なくとも一方は同一となる。
【0085】
従って、例えば、いま、順方向動きベクトルのx成分またはy成分をそれぞれFxまたはFyとするとともに、逆方向動きベクトルのx成分またはy成分をそれぞれBxまたはByとすると、次式で表されるSMVは、画像の動きの複雑さを反映したものとなる。
【0086】
SMV=|Fx+Bx|+|Fy+By|
【0087】
なお、このSMVは、画像の動きの複雑さに対応して変化する他、順方向予測符号化および逆方向予測符号化の両方の予測精度が高い場合には小さくなり、いずれか一方の予測精度が低い場合には大きくなる傾向がある。
【0088】
そこで、I/Pピクチャの間に、例えば、図2に示したように、2枚のBピクチャが配置されている場合においては、SMVに対応して、次のように予測モードを設定することによっても、符号化効率を向上させることができる。
【0089】
即ち、まず、Df=1およびDb=2の場合、例えば、図4(A)に示したように、式Eb>p×EfかつEb>q×Ef+(1−p×q)×Tiが成り立つとき、順方向予測符号化を選択し、式Eb≦p×EfかつEb<r×Ef+(1−p×r)×Tiが成り立つとき、逆方向予測符号化を選択する。また、式r×Ef+(1−p×r)×Ti≦EbかつEb≦q×Ef+(1−p×q)×Tiが成り立つとき、双方向予測符号化を選択する。
【0090】
この場合、上述したように、予測残差EfがTi未満か、または予測誤差Ebがp×Ti未満となるときは、双方向予測符号化は選択されない。即ち、この場合、双方向予測符号化は、予測残差EfがTi以上となるか、または予測誤差Ebがp×Ti以上となるときに限り選択され得る。
【0091】
従って、この場合、SMVが大きくなるにつれて、定数Tiを大きな値に設定することにより、双方向予測符号化が選択され難くなる。
【0092】
即ち、0<MV0<MV1<・・・<MVn-1<MVnとする場合において、SMVが、MV0以上MV1未満のときは、TiをT1に、MV1以上MV2未満のときは、TiをT2に、・・・、MVn-1以上MVn未満のときは、TiをTnに、MVn以上のときは、TiをTn+1に設定する。このようにすることで、画像の動きが複雑なほど、予測精度の低下する双方向予測符号化が選択され難くなり、その結果、符号化効率を向上させることができる。
【0093】
また、この場合、符号化対象のBピクチャが、過去参照画像に近いことから、その過去参照画像のみを用いる順方向予測符号化が選択され易くなっているので、この点からも、符号化効率を向上させることができる。
【0094】
一方、Df=2およびDb=1の場合、例えば、図4(B)に示したように、式Eb>s×EfかつEb>t×Ef+(1−s×t)×Tiが成り立つとき、順方向予測符号化を選択し、式Eb≦s×EfかつEb<u×Ef+(1−s×u)×Tiが成り立つとき、逆方向予測符号化を選択する。また、式u×Ef+(1−s×u)×Ti≦EbかつEb≦t×Ef+(1−s×t)×Tiが成り立つとき、双方向予測符号化を選択する。
【0095】
この場合も、予測残差EfがTi未満か、または予測誤差Ebがs×Ti未満となるときは、双方向予測符号化は選択されない。即ち、この場合、双方向予測符号化は、予測残差EfがTi以上となるか、または予測誤差Ebがs×Ti以上となるときに限り選択され得る。
【0096】
従って、やはり、上述の場合と同様に、SMVが大きくなるにつれて、定数Tiを大きな値に設定することにより、双方向予測符号化が選択され難くなり、その結果、符号化効率を向上させることができる。
【0097】
また、この場合、符号化対象のBピクチャが、未来参照画像に近いことから、その未来参照画像のみを用いる逆方向予測符号化が選択され易くなっているので、この点からも、符号化効率を向上させることができる。
【0098】
なお、画像の動きが非常に単純な場合、即ち、例えば、物体が、一定方向に平行移動しているような場合には、SMVは非常に小さな値となる(理想的には、0となる)。また、この場合、前述したように、双方向予測符号化の予測精度が高く、また、発生符号量も少なくなるので、双方向予測符号化が選択されるのが望ましい。そこで、SMVが所定の値MV0未満となった場合には、例えば、図16と同一の図5に示すように、式Eb>j×Efが成り立つときは、順方向予測符号化を選択し、式Eb<k×Efが成り立つときは、逆方向予測符号化を選択し、式k×Ef≦Eb≦j×Efが成り立つときは、双方向予測符号化を選択するようにする。
【0099】
即ち、図4において、例えば、t=q=j,r=u=k,Ti=0とする。
【0100】
このようにすることで、SMVがMV0未満となった場合には、予測精度の高い双方向予測符号化が選択され易くなり、その結果、符号化効率を向上させることができる。
【0101】
また、画像の動きが非常に単純な場合の例として、ビデオカメラをパンして撮影した画像があるが、この場合、動きベクトルのx成分が、そのy成分に比較して非常に大きくなる。そこで、例えば、gを所定の定数(1より大きい値である、例えば4など)として、式|x|>g|y|が成り立つときにも、上述のように、双方向予測符号化が選択され易くするようにすることが可能である。なお、このことは、式g|x|<|y|が成り立つときについても同様である。
【0102】
以上のように、画像の動きの速さや複雑さに対応して、適応的に、予測モードを選択(決定)するようにすることで、符号化効率を、従来より向上させることができる。
【0103】
なお、上述の場合においては、I/Pピクチャの間に、2枚のBピクチャが配置されているとしたが、その間に、1枚だけまたは3枚以上のBピクチャが配置されている場合についても同様のことがいえる。
【0104】
次に、図6および図7は、本発明を適用した画像符号化装置の一実施の形態の構成を示している。
【0105】
この画像符号化装置は、上述した、例えば、画像の動きの複雑さを反映するSMVに対応して予測モードを決定し、画像を、動き補償とDCT(Discrete Cosine Transform)とを組み合わせたハイブリッド符号化するようになされている。
【0106】
即ち、符号化すべき画像データは、例えば、フレーム(またはフィールド)単位で、画像符号化タイプ指定回路3に供給される。画像符号化タイプ指定回路3は、そこに入力されるフレームを、I,P、またはBピクチャ(以下、適宜、これらをまとめてピクチャタイプという)のいずれとして処理するのかを指定する。
【0107】
具体的には、画像符号化タイプ指定回路3は、例えば、図8(A)に示すように、そこに入力される16フレームの画像F1乃至F16を1GOPのデータとして処理し、同図(B)に示すように、最初のフレームF1をIピクチャとして、2番目および3番目のフレームF2およびF3をBピクチャとして、4番目のフレームF4をPピクチャとして指定する。さらに、画像符号化タイプ指定回路3は、5番目および6番目のフレームF5およびF6をBピクチャとして、7番目のフレームF7をPピクチャとして指定し、以下、同様にして、残りのフレームF8乃至F16を、BまたはPピクチャとして指定する。
【0108】
なお、図8(B)(同図(C)についても同様)において、I,P,Bに付してある下付けの数字は、MPEGにおけるテンポラルリファレンス(temporal referencd)に相当し、各フレームの表示順を表す。
【0109】
画像符号化タイプ指定回路3においてピクチャタイプの指定されたフレームは、画像符号化順序替え回路4に出力される。画像符号化順序替え回路4では、フレームの並びが符号化順に並び替えられる。即ち、Bピクチャは、受信側において、自己が表示された後に表示される画像を参照画像(未来参照画像)として用いて復号化される場合があるため、その未来参照画像が既に復号化されていないと、Bピクチャを復号化することができない。そこで、画像符号化順序替え回路4では、未来参照画像となるフレームが、Bピクチャより先に符号化されるように、GOPを構成するフレームの並びが替えられる。
【0110】
具体的には、例えば、図8(C)に示すように並び替えられる。
【0111】
画像符号化順序替え回路4で並びの替えられたフレームのシーケンスは、スキャンコンバータ5に供給される。スキャンコンバータ5では、ラスタスキャンで入力されるフレームがブロックフォーマットの信号に変換される。
【0112】
即ち、スキャンコンバータ5には、例えば、Hドットで構成されるラインを、Vラインだけ集めたフレームフォーマットの画像データが入力される。そして、スキャンコンバータ5は、この画像データを、図9(A)に示すように、16ラインで構成されるN個のスライスに区分し(従って、ここでは、V=16×N)、さらに、同図(B)に示すように、各スライスを、16ドットごとに区分することで、M個のマクロブロックに分割する(従って、ここでは、H=16×M)。
【0113】
従って、各マクロブロックは、16×16ドットに対応する輝度信号で構成される。なお、マクロブロックは、図9(C)に示すように、8×8ドットに対応する輝度信号Y[1]乃至Y[4]に区分され、さらに、マクロブロックには、8×8ドットに対応する色差信号Cb[5]とCr[6]が対応付けられる。後述するDCT回路12(図7)では、この8×8ドットのブロック単位で、DCT処理が施される。
【0114】
以上のようにして、スキャンコンバータ5で得られたマクロブロックは、図7の演算部11に供給される。
【0115】
図6に戻り、カウンタ9は、画像符号化順序替え回路4が出力するフレーム同期信号をカウントしている。
【0116】
即ち、画像符号化順序替え回路4は、スキャンコンバータ5に、並び替えたフレームを出力するタイミングで、フレーム同期信号を、カウンタ9に出力している。さらに、画像符号化順序替え回路4は、スキャンコンバータ5に出力するフレームのピクチャタイプTYPEを検出し、動きベクトル推定回路6、カウンタ9、および図7の予測モード決定回路21に出力している。
【0117】
カウンタ9は、画像符号化順序替え回路4が出力するフレーム同期信号をカウントし、そのカウント値CNTを、画像間距離発生回路10に出力する。なお、カウンタ9は、画像符号化順序替え回路4が出力するピクチャタイプTYPEがIまたはPピクチャのとき、そのカウント値CNTを、例えば0にリセットするようになされている。
【0118】
従って、カウンタ9が出力するカウント値CNTは、IまたはPピクチャの間に配置されたBピクチャの数を表す。
【0119】
ここで、本実施の形態では、図8(B)に示したように、IまたはPピクチャの間に、2枚のBピクチャが配置されているので、カウンタ9が出力するカウント値CNTは、同図(D)に示すように、0,1、または2となる。
【0120】
画像間距離発生回路10は、カウンタ9からのカウント値CNTに基づいて、Bピクチャから、その予測符号化(インター符号化)に用いられる過去参照画像または未来参照画像それぞれまでの距離(フレーム数)DfまたはDbを算出し、図7の予測モード決定回路21に出力する。
【0121】
即ち、画像間距離発生回路10は、過去参照画像までの距離Dfとして、図8(E)に示すように、カウント値CNTと同一の値を出力し、また、未来参照画像までの距離Dbとして、図8(F)に示すように、カウント値CNTを逆に並べた値を出力する。
【0122】
一方、動きベクトル推定回路6では、順方向動きベクトルMVfおよび逆方向動きベクトルMBbが検出(推定)され、さらに、その順方向動きベクトルMVfまたは逆方向動きベクトルMVbそれぞれに対する予測残差(動きベクトル推定残差)EfまたはEbが算出される。
【0123】
即ち、動きベクトル推定回路6には、画像符号化順序替え回路4から、ピクチャタイプTYPEが指定されたフレームと、そのピクチャタイプTYPEが供給されるようになされている。
【0124】
動きベクトル推定回路6は、画像符号化順序替え回路4から供給されるフレームを、そのピクチャタイプTYPEにしたがって、記憶部7を構成する過去参照画像記憶部7A、現在画像記憶部7B、または未来参照画像記憶部7Cのうちのいずれかに記憶させ、現在画像記憶部7Bに記憶された画像を対象に、その動きベクトルを検出する。
【0125】
具体的には、動きベクトル推定回路6は、例えば、図8に示した場合において、I1を過去参照画像記憶部7Aに記憶させ、P4を現在画像記憶部7Bに記憶させ、これにより、I1を過去参照画像として、P4の動きベクトル(順方向動きベクトル)MVfを検出し、その予測残差Efを求める。次に、現在画像記憶部7Bに記憶されていたP4を未来参照画像記憶部7Cに転送し、B2を現在画像記憶部7Bに記憶させ、これにより、I1またはP4を、それぞれ過去参照画像または未来参照画像として、B2の順方向動きベクトルMVfまたは逆方向動きベクトルMVbを検出し、それぞれの予測残差EfまたはEbを求める。
【0126】
続いて、B3を現在画像記憶部7Bに記憶させ、これにより、上述した場合と同様に、B3の順方向動きベクトルMVfまたは逆方向動きベクトルMVbを検出し、それぞれの予測残差EfまたはEbを求める。
【0127】
その後、未来参照画像記憶部7Cに記憶されていたP4を、過去参照画像記憶部7Aに転送して記憶させる(上書きする)とともに、P7を現在画像記憶部7Bに記憶させ、これにより、P4を過去参照画像として、P7の動きベクトルMVfを検出し、その予測残差Efを求める。
【0128】
次に、現在画像記憶部7Bに記憶されていたP7を未来参照画像記憶部7Cに転送し、B5を現在画像記憶部7Bに記憶させ、これにより、P4またはP7を、それぞれ過去参照画像または未来参照画像として、B5の順方向動きベクトルMVfまたは逆方向動きベクトルMVbを検出し、それぞれの予測残差EfまたはEbを求める。以下、同様にして、動きベクトルの検出と、予測残差の算出が行われていく。
【0129】
ここで、予測誤差EfおよびEbの算出方法について説明する。
【0130】
いま、あるマクロブロックを注目マクロブロックとし、その注目マクロブロックを構成する左からi番目で、上からj番目の画素の画素値をAijと表すとともに、注目マクロブロックに最も近似する過去参照画像の16×16の範囲を構成する、左からi番目で、上からj番目の画素の画素値をFijと表す。この場合、予測誤差Efは、例えば、次式にしたがって算出される。
【0131】
Ef=Σ|Aij−Fij
なお、上式において、Σは、i,jを1乃至16に変えてのサメーションを表す。
【0132】
また、注目マクロブロックに最も近似する未来参照画像の16×16の範囲を構成する、左からi番目で、上からj番目の画素の画素値をBijと表すと、予測誤差Ebは、例えば、次式にしたがって算出される。
【0133】
Eb=Σ|Aij−Bij
なお、上式においても、Σは、i,jを1乃至16に変えてのサメーションを表す。
【0134】
以上のようにして求められた動きベクトルMVf,MBb、予測誤差Ef,Ebは、図7の予測モード決定回路21に供給される。また、動きベクトルMVf,MBbは、図7の可変長符号化回路15および動き補償回路20にも供給される。さらに、Bピクチャについての動きベクトルMVf,MBbは、動き量算出回路8にも供給される。
【0135】
動き量算出回路8では、動きベクトルMVf,MBbから、上述したSMVが算出され、図7の予測モード決定回路21に供給される。
【0136】
図7の予測モード決定回路21では、距離Df,Db、動きベクトルMVf,MVb、ピクチャタイプTYPE、およびSMVに基づいて、マクロブロックの予測モードが決定される。
【0137】
即ち、ピクチャタイプTYPEがIピクチャである場合、即ち、符号化対象のマクロブロックがIピクチャである場合、予測モード決定回路21は、予測モードを、イントラ符号化モードに決定する。
【0138】
また、ピクチャタイプTYPEがPピクチャである場合、即ち、符号化対象のマクロブロックがPピクチャである場合、予測モード決定回路21は、次のようにして、予測モードを、イントラ符号化モードまたは順方向予測符号化モードのうちのいずれかに決定する。
【0139】
即ち、この場合、予測モード決定回路21は、まず、イントラ符号化時の予測残差として、例えば、次式で定義されるEintraを算出する。
【0140】
intra=Σ|Aij−Aav
なお、上式において、Aijは、符号化対象のマクロブロックを構成する左からi番目で、上からj番目の画素の画素値を表し、Aavは、その平均値を表す。また、Σは、i,jを1乃至16に変えてのサメーションを表す。
【0141】
そして、予測モード決定回路21は、イントラ符号化時の予測残差Eintraが、順方向予測符号化における予測残差Efより小さいとき(以下のとき)、予測モードを、イントラ符号化モードに決定する。また、イントラ符号化時の予測残差Eintraが、順方向予測符号化における予測残差Ef以上のとき(より大きいとき)、予測モードを、順方向予測符号化モードに決定する。
【0142】
次に、ピクチャタイプTYPEがBピクチャである場合、即ち、符号化対象のマクロブロックがBピクチャである場合、予測モード決定回路21は、次のようにして、予測モードを、イントラ符号化モード、順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのうちのいずれかに決定する。
【0143】
即ち、まず、予測モード決定回路21は、インター符号化、つまり、順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのうちの1つを選択(決定)する。
【0144】
この選択は、SMV、予測残差Ef,Eb、距離Df,Db、および動きベクトルMVf,MVbに基づいて行われる。
【0145】
即ち、まず、SMVに対応して、図4で説明した定数Tiが設定される。そして、距離DfおよびDbに対応して、図4(A)または図4(B)のうちのいずれか一方が選択され、その選択された方において、予測残差EfとEbとの上述したような大小関係に基づいて、順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードの中から1つが選択される。
【0146】
なお、SMVが所定値MV0以下の場合や、動きベクトルMVf,MVbのx成分またはy成分の絶対値のうちのいずれか一方が、他方に比較して充分大きい場合などには、上述したように、図5で説明した予測残差EfとEbとの大小関係に基づいて、順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードの中から1つが選択される。
【0147】
そして、インター符号化の中から選択された予測モードに対応する予測残差が、インター符号化についての予測残差Einterとされる。なお、双方向予測符号化モードが選択された場合、予測残差Einterは、例えば、予測残差EfとEbの平均値とされる。従って、順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードが選択された場合、予測残差Einterは、それぞれEf,Eb、または(Ef+Eb)/2とされる。
【0148】
さらに、予測モード決定回路21では、上述した場合と同様にして、イントラ符号化時の予測残差Eintraが算出される。そして、予測モード決定回路21は、イントラ符号化時の予測残差Eintraが、インター符号化の中から選択したものの予測残差Einterより小さいとき、予測モードを、イントラ符号化モードに決定する。また、イントラ符号化時の予測残差Eintraが、予測残差Einter以上のとき、予測モードを、インター符号化の中から選択したものに決定する。
【0149】
従って、Bピクチャについては、画像の動き複雑さ、さらには、参照画像までの距離に対応して、その予測モードが適応的に決定されるので、その符号化効率を、より向上させることが可能となる。
【0150】
以上のようにして決定された予測モードは、予測モード決定部21から、演算部11、可変長符号化回路15、および動き補償回路20に供給される。
【0151】
演算部11には、予測モード決定回路21から供給される予測モードで予測符号化すべきマクロブロック(符号化対象のマクロブロック)が、図6のスキャンコンバータ5から供給される。演算部11は、演算器11A乃至11CおよびスイッチSWを有しており、予測モードに対応して、スイッチSWが切り換えられる。
【0152】
即ち、演算部11にIピクチャのマクロブロックが入力される場合においては、予測モードはイントラ符号化モードとなっている。この場合、スイッチSWは端子aを選択する。端子aには、符号化対象のマクロブロックが、そのまま供給されるようになされており、従って、このマクロブロックは、端子aを介して、DCT回路12に供給される。
【0153】
DCT回路12では、演算部11からのマクロブロックがDCT処理され、これにより、DCT係数に変換される。このDCT係数は、量子化回路13に供給され、そこで、所定の量子化ステップで量子化された後、可変長符号化回路15に供給される。
【0154】
可変長符号化回路15には、量子化回路13から量子化されたDCT係数が供給される他、同じく量子化回路13から量子化ステップが、予測モード決定回路21から予測モードが、図6の動きベクトル推定回路6から動きベクトルMVf,MVbが、それぞれ供給されるようになされている。可変長符号化回路15は、適宜、これらのデータを、例えば、ハフマン符号などの可変長符号に変換し、送信バッファ14に出力する。
【0155】
送信バッファ14は、可変長符号化回路15からの可変長符号を一時記憶し、例えば、一定のデータレートにして出力する。送信バッファ14から出力される可変長符号は、例えば、光ディスクや、光磁気ディスク、磁気ディスク、光カード、磁気テープ、相変化ディスクなどの記録媒体31に記録され、あるいは、衛星回線、地上波、CATV網、インターネットなどの伝送路32を介して伝送される。
【0156】
なお、送信バッファ14は、そのデータの蓄積量を量子化回路13に供給(フィードバック)するようになされている。量子化回路13は、この蓄積量に基づいて、量子化ステップを設定するようになされている。即ち、量子化回路13は、送信バッファ14がオーバーフローしそうなとき、量子化ステップを大きくし、これにより、データ発生量を減少させる。また、量子化回路13は、送信バッファ14がアンダーフローしそうなとき、量子化ステップを小さくし、これにより、データ発生量を増加させる。以上のようにして、送信バッファ14のオーバーフローおよびアンダーフローを防止するようになされている。
【0157】
一方、量子化回路13が出力する量子化されたDCT係数と量子化ステップとは、可変長符号化回路15の他、逆量子化回路16にも供給される。逆量子化回路16は、量子化回路13からの量子化されたDCT係数を、同じく量子化回路13からの量子化ステップで逆量子化し、その結果得られるDCT係数を、IDCT回路17に出力する。
【0158】
IDCT回路17では、逆量子化回路16からのDCT係数が逆DCT処理され、これにより、演算部11の出力とほぼ同一の値の画像データが復元され、演算器18に供給される。演算器18は、そこに入力される画像データが、イントラ符号化されるものである場合には、特に処理を行わず、その画像データを、そのままフレームメモリ19に出力して記憶させる。
【0159】
なお、フレームメモリ19は、未来参照画像または過去参照画像として用いられる画像を記憶する未来参照画像記憶回路19Aおよび過去参照画像記憶回路19Bを有しており、最初に符号化され、復号化されたIピクチャは、過去参照画像記憶回路19Bに記憶される。
【0160】
次に、演算部11に入力されたマクロブロックがPピクチャである場合において、予測モードがイントラ符号化モードであるときには、スイッチSWは端子aを選択する。従って、この場合、Pピクチャのマクロブロックは、上述のIピクチャにおける場合と同様に符号化され、また、ローカルデコードされて、フレームメモリ19に供給される。なお、Iピクチャの次に符号化され、復号化されたPピクチャは、未来参照画像記憶回路19Aに記憶される。
【0161】
一方、演算部11に入力されたマクロブロックがPピクチャである場合において、予測モードが順方向予測符号化モードであるときには、スイッチSWは、端子bを選択する。端子bには、演算器11Aの出力が供給されるようになされており、また、演算器11Aには、符号化対象のマクロブロックと、動き補償回路20の出力とが供給されるようになされている。
【0162】
動き補償回路20は、予測モードが順方向予測符号化モードの場合、過去参照画像記憶回路19Bに記憶されている画像(いまの場合、Iピクチャ)を過去参照画像として読み出し、動きベクトルMVfにしたがって動き補償を施すことにより予測画像を生成する。即ち、動き補償回路20は、符号化対象のマクロブロックに対応する位置から、動きベクトルMVfに対応する分だけずらしたアドレスのデータを、過去参照画像記憶回路19Bから読み出し、これを予測画像として演算器11Aに供給する。
【0163】
演算器11Aは、符号化対象のマクロブロックを構成する各画素値から、予測画像を構成する、対応する画素値を減算し、その減算値(差分値)を出力する。従って、この場合、演算部11からは、符号化対象のマクロブロックと、過去参照画像から得られた予測画像との差分値が、DCT回路12に供給される。この差分値は、イントラ符号化における場合と同様に符号化されて出力される。
【0164】
さらに、この差分値は、上述した場合と同様に、DCT回路12、量子化回路13、逆量子化回路16、およびIDCT回路17を介することで、元の値とほぼ同一の値に復元され、演算器18に供給される。
【0165】
この場合、演算器18には、動き補償回路20から、演算器11Aに供給される予測画像と同一のデータが供給されており、演算器18では、復元された差分値と、その予測画像とが加算され、これにより、Pピクチャがローカルデコードされる。このローカルデコードされたPピクチャは、フレームメモリ19に供給されて記憶される。
【0166】
なお、Iピクチャの次に符号化され、復号化されたPピクチャは、上述したように、未来参照画像記憶回路19Aに記憶される。
【0167】
次に、演算部11に入力されたマクロブロックがBピクチャである場合において、予測モードがイントラ符号化モードまたは順方向予測符号化モードであるときには、スイッチSWは端子aまたはbをそれぞれ選択する。従って、この場合、Bピクチャのマクロブロックは、上述した場合と同様に符号化される。
【0168】
一方、演算部11に入力されたマクロブロックがBピクチャである場合において、予測モードが逆方向予測符号化モードであるときには、スイッチSWは、端子cを選択する。端子cには、演算器11Bの出力が供給されるようになされており、また、演算器11Bには、符号化対象のマクロブロックと、動き補償回路20の出力とが供給されるようになされている。
【0169】
動き補償回路20は、予測モードが逆方向予測符号化モードの場合、未来参照画像記憶回路19Aに記憶されている画像(いまの場合、Pピクチャ)を未来参照画像として読み出し、動きベクトルMVbにしたがって動き補償を施すことにより予測画像を生成する。即ち、動き補償回路20は、符号化対象のマクロブロックに対応する位置から、動きベクトルMVbに対応する分だけずらしたアドレスのデータを、未来参照画像記憶回路19Aから読み出し、これを予測画像として演算器11Bに供給する。
【0170】
演算器11Bは、符号化対象のマクロブロックを構成する各画素値から、予測画像を構成する、対応する画素値を減算し、その減算値(差分値)を出力する。従って、この場合、演算部11からは、符号化対象のマクロブロックと、未来参照画像から得られた予測画像との差分値が、DCT回路12に供給される。この差分値は、イントラ符号化における場合と同様に符号化されて出力される。
【0171】
また、演算部11に入力されたマクロブロックがBピクチャである場合において、予測モードが双方向予測符号化モードであるときには、スイッチSWは、端子dを選択する。端子dには、演算器11Cの出力が供給されるようになされており、また、演算器11Cには、符号化対象のマクロブロックと、動き補償回路20の出力とが供給されるようになされている。
【0172】
動き補償回路20は、予測モードが双方向予測符号化モードの場合、過去参照画像記憶回路19Bに記憶されている画像(いまの場合、Iピクチャ)を過去参照画像として読み出し、動きベクトルMVfにしたがって動き補償を施すことにより予測画像(以下、適宜、過去予測画像という)を生成するとともに、未来参照画像記憶回路19Aに記憶されている画像(いまの場合、Pピクチャ)を未来参照画像として読み出し、動きベクトルMVbにしたがって動き補償を施すことにより予測画像(以下、適宜、未来予測画像という)を生成する。この過去予測画像および未来予測画像は、演算器11Cに供給される。
【0173】
演算器11Cは、まず、動き補償回路20より供給される過去予測画像および未来予測画像の、例えば平均値(以下、適宜、平均予測画像という)を演算する。そして、演算器11Cは、符号化対象のマクロブロックを構成する各画素値から、平均予測画像を構成する、対応する画素値を減算し、その減算値(差分値)を出力する。従って、この場合、演算部11からは、符号化対象のマクロブロックと、平均予測画像との差分値が、DCT回路12に供給される。この差分値は、イントラ符号化における場合と同様に符号化されて出力される。
【0174】
なお、本実施の形態においては、Bピクチャは、他の画像を符号化する際に、参照画像として用いられないため、ローカルデコードされない(する必要がない)。また、過去参照画像記憶回路19Aおよび未来参照画像記憶回路19Bは、必要に応じてバンク切り換えすることができるようになされており、これにより、過去参照画像記憶回路19Aおよび未来参照画像記憶回路19Bに記憶されている画像データを、過去参照画像および未来参照画像のいずれとしても用いることができるようになされている。さらに、上述の処理は、輝度信号Yおよび色差信号Cb,Crのすべてに施される。但し、色差信号Cb,Crについては、例えば、輝度信号Yを処理するときに用いた動きベクトルの大きさを1/2にしたものが、その動きベクトルとして用いられる。
【0175】
次に、図10のフローチャートを参照して、図7の予測モード決定回路21の処理(予測モード決定処理)について、さらに説明する。
【0176】
予測モード決定回路21では、図10のフローチャートにしたがった処理が、マクロブロックごとに行われる。
【0177】
即ち、予測モード決定回路21では、まず最初に、ステップS1において、SMVが、閾値MV0未満かどうかが判定される。ステップS1において、SMVが、閾値MV0未満であると判定された場合、ステップS2に進み、以下、図5で説明したようにして、インター符号化の中の1つが選択される。
【0178】
即ち、ステップS2では、予測残差Ebが、予測残差Efのj倍(j×Ef)より大きいかどうかが判定される。ステップS2において、Ebがj×Efより大きいと判定された場合、ステップS3に進み、インター符号化として、順方向予測符号化が選択され、処理を終了する。
【0179】
その後は、上述したように、選択されたインター符号化についての予測残差と、イントラ符号化についての予測残差との大小関係に基づいて、最終的な予測モードが決定される。
【0180】
一方、ステップS2において、Ebがj×Efより大きくないと判定された場合、ステップS4に進み、予測残差Ebが、予測残差Efのk倍(k×Ef)未満であるかどうかが判定される。ステップS4において、Ebがk×Ef未満であると判定された場合、ステップS5に進み、インター符号化として、逆方向予測符号化が選択され、処理を終了する。
【0181】
また、ステップS4において、Ebがk×Ef未満でないと判定された場合、即ち、Ebが、k×Ef以上かつj×Ef以下である場合、ステップS6に進み、インター符号化として、双方向予測符号化が選択され、処理を終了する。
【0182】
なお、予測モード決定回路21は、ステップS1の処理を行う前に、順方向動きベクトルMVfまたは逆方向動きベクトルMVbのx成分およびy成分について、例えば、式|x|>g|y|または|y|>g|x|が成り立つかどうかを判定し、成り立つ場合には、SMVを、0などのMV0未満の値に、強制的に設定するようになされている。従って、例えば、物体が、ほぼ水平または垂直方向に移動しているような画像については、図5で説明したように、双方向予測符号化が選択され易い条件の下で、インター符号化の選択が行われる。
【0183】
一方、ステップS1において、SMVがMV0未満でないと判定された場合、ステップS71に進み、以下、図4で説明したようにして、インター符号化の選択が行われる。
【0184】
即ち、ステップS71では、SMVが、MV0以上MV1未満であるかどうかが判定される。ステップS71において、SMVが、MV0以上MV1未満であると判定された場合、ステップS81に進み、定数TiがT1に設定され、ステップS9に進む。
【0185】
また、ステップS71において、SMVが、MV0以上MV1未満でないと判定された場合、ステップS72に進み、SMVが、MV1以上MV2未満であるかどうかが判定される。
【0186】
以下、同様に、ステップS7cでは、SMVが、MVc-1以上MVc未満であるかどうかが判定され、SMVが、MVc-1以上MVc未満である場合には、ステップS8cに進み、定数TiがTcに設定され、ステップS9に進む。また、SMVが、MVc-1以上MVc未満でない場合には、ステップS7c+1に進む。
【0187】
そして、ステップS7nにおいて、SMVが、MVn-1以上MVn未満でないと判定された場合、即ち、SMVがMVn以上の場合、ステップS8n+1に進み、定数TiがTn+1に設定され、ステップS9に進む。
【0188】
ステップS9では、距離Df,Dbに対応した画像間距離判定処理が行われ、処理を終了する。
【0189】
次に、図11のフローチャートは、図10のステップS9における画像間距離判定処理の詳細を示している。なお、図11においては、IまたはPピクチャの間に、1または2枚のBピクチャが配置されていることを前提としている。
【0190】
画像間距離判定処理では、まず最初に、ステップS11において、Dfが1で、かつDbが2であるかどうかが判定される。ステップS11において、Dfが1で、かつDbが2であるかと判定された場合、ステップS12に進み、以下、図4(A)で説明したようにして、インター符号化が選択される。
【0191】
即ち、ステップS12では、Ebが、q×Ef+(1−p×q)×Tiより大きく、かつp×Efより大きいかどうかが判定される。ステップS12において、Ebが、q×Ef+(1−p×q)×Tiより大きく、かつp×Efより大きいと判定された場合、ステップS13に進み、順方向予測符号化が選択され、リターンする。また、ステップS12において、Ebが、q×Ef+(1−p×q)×Tiより大きくないか、またはp×Efより大きくないと判定された場合、ステップS14に進み、Ebが、r×Ef+(1−p×r)×Ti未満で、かつp×Ef未満であるかどうかが判定される。
【0192】
ステップS14において、Ebが、r×Ef+(1−p×r)×Ti未満で、かつp×Ef未満であると判定された場合、ステップS15に進み、逆方向予測符号化が選択され、リターンする。また、ステップS14において、Ebが、r×Ef+(1−p×r)×Ti未満でないか、またはp×Ef未満でないと判定された場合、ステップS16に進み、双方向予測符号化が選択され、リターンする。
【0193】
一方、ステップS11において、Dfが1でないか、またはDbが2でないと判定された場合、ステップS17に進み、Dfが2で、かつDbが1であるかどうかが判定される。
【0194】
ステップS17において、Dfが2で、かつDbが1であると判定された場合、ステップS18に進み、以下、図4(B)で説明したようにして、インター符号化が選択される。
【0195】
即ち、ステップS18では、Ebが、t×Ef+(1−s×t)×Tiより大きく、かつs×Efより大きいかどうかが判定される。ステップS18において、Ebが、t×Ef+(1−s×t)×Tiより大きく、かつs×Efより大きいと判定された場合、ステップS19に進み、順方向予測符号化が選択され、リターンする。また、ステップS18において、Ebが、t×Ef+(1−s×t)×Tiより大きくないか、またはs×Efより大きくないと判定された場合、ステップS20に進み、Ebが、u×Ef+(1−s×u)×Ti未満で、かつs×Ef未満であるかどうかが判定される。
【0196】
ステップS20において、Ebが、u×Ef+(1−s×u)×Ti未満で、かつs×Ef未満であると判定された場合、ステップS21に進み、逆方向予測符号化が選択され、リターンする。また、ステップS20において、Ebが、u×Ef+(1−s×u)×Ti未満でないか、またはs×Ef未満でないと判定された場合、ステップS22に進み、双方向予測符号化が選択され、リターンする。
【0197】
一方、ステップS17において、Dfが2でないか、またはDbが1でないと判定された場合、ステップS23に進み、以下、図5で説明したようにして、インター符号化の中の1つが選択される。即ち、ステップS23乃至S27において、図10のステップS2乃至S6における場合とそれぞれ同様の処理が行われ、これにより、インター符号化の選択が行われる。
【0198】
以上のように、画像の動きの複雑さを表すSMVに対応して、予測モードを決定するようにしたので、その符号化効率を、従来より向上させることが可能となる。
【0199】
即ち、画像の動きが複雑な場合は、予測精度、さらには、動きベクトルの伝送に必要なデータ量を考慮して、双方向予測符号化モードが選択され難くし、その逆に、画像の動きが単純な場合は、双方向予測符号化モードが選択され易くしたので、効率的な符号化を行うことが可能となる。
【0200】
なお、画像の動きの複雑さの他、上述したように、画像の動きの速さ、さらには、その両方などに対応して、予測モードを決定するようにすることなども可能である。
【0201】
また、本実施の形態では、画像の動きの複雑さを、上述のSMVで表すようにしたが、その他の物理量によって表すようにすることも可能である。
【0202】
さらに、本実施の形態においては、画像の動きの速さを、動きベクトルの大きさや、そのx成分およびy成分の絶対値の和によって表現するようにしたが、やはり、その他の物理量により表すことも可能である。
【0203】
また、本実施の形態では、双方向予測符号化モードを選択され易くする場合、図5で説明した条件の下で、インター符号化の選択を行うようにしたが、その他、例えば、図18と同様の図12に示すような条件の下で、インター符号化の選択を行うようにすることにより、双方向予測符号化モードを選択され易くすることも可能である。但し、この場合、図18における場合よりも、定数aおよびcは大きくし、または定数bおよびdは小さくするのが望ましい。
【0204】
なお、本件発明者が行ったシミュレーションによれば、図4におけるqまたはtは、図12におけるaまたはcそれぞれより小さい方が、また、図4におけるrまたはuは、図12におけるbまたはdそれぞれより大きい方が、符号化効率が向上することが確認されている。さらに、予測誤差EbおよびEfが小さい場合には、双方向予測符号化モードを用いないようにする方が、符号化効率が向上することも確認されている。
【0205】
【発明の効果】
以上の如く、本発明の画像符号化装置および画像符号化方法によれば、時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとを検出し、過去参照画像または未来参照画像それぞれに対する、符号化対象の画像の予測残差に基づいて、符号化対象の画像の予測モードを順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのいずれかに決定し、予測モードに対応する動き補償を行うことにより、予測画像を生成し、符号化対象の画像と、予測画像との差分値を演算し、差分値を符号化し、過去参照画像または未来参照画像それぞれに対する予測残差をEfまたはEbとするとともに、α,β,γ,δを所定の定数とする場合において(但し、α,β,γ,δは実数であり、γ<β)、式Eb>α×EfかつEb>β×Ef+(1−α×β)×δが成り立つとき、過去参照画像のみから予測画像を生成する順方向予測符号化モードに、予測モードを決定し、式Eb≦α×EfかつEb<γ×Ef+(1−α×γ)×δが成り立つとき、未来参照画像のみから予測画像を生成する逆方向予測符号化モードに、予測モードを決定し、式γ×Ef+(1−α×γ)×δ≦EbかつEb≦β×Ef+(1−α×β)×δが成り立つとき、過去参照画像および未来参照画像の両方から予測画像を生成する双方向予測符号化モードに、予測モードを決定し、順方向動きベクトルまたは逆方向動きベクトルの大きさが大きいほどにδを大きくすることで、双方向予測符号化モードが決定されにくくするようにした。従って、画像の動きに基づいて、効率的な符号化を行うことが可能となる。
【図面の簡単な説明】
【図1】GOPを示す図である。
【図2】GOPを示す図である。
【図3】IまたはPピクチャとの距離によって、Bピクチャの予測残差が異なることを説明するための図である。
【図4】予測モードを選択する条件を説明するための図である。
【図5】双方向予測符号化モードが選択され易くする場合の、予測モードを選択する条件を示す図である。
【図6】本発明を適用した画像符号化装置の一実施の形態の構成を示すブロック図である。
【図7】図6に続くブロック図である。
【図8】図6および図7の画像符号化装置の処理を説明するための図である。
【図9】図6のスキャンコンバータ5の処理を説明するための図である。
【図10】図7の予測モード決定回路21の処理を説明するためのフローチャートである。
【図11】図10におけるステップS9の画像間距離判定処理の詳細を説明するためのフローチャートである。
【図12】双方向予測符号化モードが選択され易くする場合の、予測モードを選択する条件を示す図である。
【図13】動き補償予測符号化を説明するための図である。
【図14】GOPを示す図である。
【図15】MPEG符号化を説明するための図である。
【図16】予測モードを選択する条件を示す図である。
【図17】GOPを示す図である。
【図18】予測モードを選択する条件を示す図である。
【符号の説明】
3 画像符号化タイプ指定回路, 4 画像符号化順序替え回路, 5 スキャンコンバータ, 6 動きベクトル推定回路, 7 記憶部, 7A 過去参照画像記憶部, 7B 現在画像記憶部, 7C 未来参照画像記憶部, 8 動き量算出回路, 9 カウンタ, 10 画像間距離発生算出回路, 11 演算部, 11A乃至11C 演算器, 12 DCT回路, 13 量子化回路, 14 送信バッファ, 15 可変長符号化回路, 16 逆量子化回路, 17 IDCT回路, 18 演算器, 19 フレームメモリ, 19A未来参照画像記憶回路, 19B 過去参照画像記憶回路, 20 動き補償回路, 21 予測モード決定回路, 31 記録媒体, 32 伝送路
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image encoding device and an image encoding method, and in particular, for example, a moving image is recorded on a recording medium such as a magneto-optical disk or a magnetic tape, or a video conference system, a video phone system, or a broadcasting device. The present invention relates to an image encoding device and an image encoding method suitable for use when, for example, moving images are transmitted from a transmission side to a reception side via a transmission line.
[0002]
[Prior art]
For example, when a moving image is digitized and recorded or transmitted, since the amount of data is enormous, image data is conventionally compression-encoded. As a typical coding method for moving images, there is motion compensation predictive coding.
[0003]
Motion compensated predictive coding is a coding method that uses correlation in the time axis direction of an image. As shown in FIG. 13, an image to be coded (encoding) with respect to a reference image (reference image) (reference frame). The motion vector of the target image) (current frame) is detected, and a predicted image is generated by performing motion compensation on the reference image that has already been encoded and decoded according to the motion vector. Then, the prediction residual of the encoding target image with respect to the prediction image is obtained, and the information amount of the moving image is compressed by encoding the prediction residual and the motion vector.
[0004]
As a specific example of motion compensation predictive coding, there is MPEG (Moving Picture Experts Group) coding. This is the common name of the video coding system compiled in WG (Working Group) 11 of SC (Sub Committee) 9 of JTC (Joint Technical Committee) 1 of ISO (International Organization for Standardization) and IEC (International Electrotechnical Commission). It is.
[0005]
In MPEG, one frame or one field is divided into macroblocks composed of 16 lines × 16 pixels, and motion compensation predictive coding is performed in units of macroblocks.
[0006]
Here, motion compensation predictive coding is roughly divided into two coding methods: intra coding and inter coding (non-intra coding). In intra coding, information of itself is encoded as it is for a macroblock to be encoded, and in inter coding, a predicted image generated from the reference image using a frame (or field) at another time as a reference image. And the difference from its own information is encoded.
[0007]
In MPEG, each frame is encoded as one of an I picture (Intra coded picture), a P picture (Predictive coded picture), or a B picture (Bidirectionally predictive picture). In MPEG, processing is performed in GOP (Group Of Picture) units.
[0008]
That is, in MPEG, a GOP is composed of 17 frames as shown in FIG. 14, for example. When the frames constituting this GOP are F1, F2,..., F17 from the head, for example, as shown in the figure, the frame F1 is an I picture and the frame F2 is a B picture. As a result, the frame F3 is processed as a P picture. Subsequent frames F4 to F17 are alternately processed as B pictures or P pictures.
[0009]
While I pictures are intra-coded, P and B pictures are basically inter-coded. That is, as shown by the arrow in FIG. 14A, the P picture is basically inter-coded using the immediately preceding I or P picture as a reference image. As shown by the arrow in FIG. 14B, the B picture basically uses both the I or P picture immediately before and the P picture immediately after that as a reference picture. And inter-coded.
[0010]
More specifically, as shown in FIG. 15, first, the frame F1 is processed as an I picture. That is, all the macroblocks are intra-coded (SP1) and transmitted as transmission data F1X via a transmission path.
[0011]
Next, a frame F2 that is a B picture that may be a reference image is an image that follows in time (future image), and a frame F3 that is a P picture is processed first. With respect to the frame F3, a frame F1 that is the immediately preceding I picture is used as a reference image, and a prediction residual with respect to a prediction image generated from the reference image is obtained (forward prediction encoding) (SP3). Along with the motion vector x3 for F1, it is transmitted as transmission data F3X. Alternatively, the frame F3 is intra-encoded in the same manner as the frame F1 (SP1) and transmitted as transmission data F3X. Whether the P picture is intra-coded or forward-predicted coded can be switched on a macroblock basis.
[0012]
After encoding the frame F3, the frame F2, which is a B picture, is processed. The B picture is subjected to intra coding, forward prediction coding, backward prediction coding, or bidirectional prediction coding.
[0013]
That is, in intra coding, the frame F2 is transmitted as it is as the transmission data F2X as in the frame F1 (SP1).
[0014]
In forward predictive coding, a prediction residual for a predicted image generated from the reference image is obtained from the frame F2 using the frame F1 that is an I or P picture immediately preceding (temporally preceding) as a reference image. (Forward predictive coding) (SP3), this is transmitted as transmission data F2X together with the motion vector x1 for the frame F1.
[0015]
In backward predictive coding, a frame F2 is obtained with a prediction residual with respect to a predicted image generated from the reference image, using the frame F3, which is an I or P picture immediately following (temporally following), as a reference image. (Reverse predictive coding) (SP2), this is transmitted as transmission data F2X together with the motion vector x2 for the frame F3.
[0016]
In the bi-directional predictive coding, the frame F2 uses the frames F1 and F3 as reference images and obtains a prediction residual with respect to an average value of predicted images generated from the reference images (bidirectional predictive coding) (SP4). This is transmitted as transmission data F2X together with motion vectors x1 and x2 for frames F1 and F3.
[0017]
Whether a B picture is encoded by intra coding, forward predictive coding, reverse predictive coding, or bi-directional predictive coding is switched in units of macroblocks as in the case of P pictures. Can do.
[0018]
Also, with respect to intra coding, forward predictive coding, reverse predictive coding, and bidirectional predictive coding are referred to as inter coding (non-intra coding).
[0019]
Here, hereinafter, a reference image that precedes or follows in time is referred to as a past reference image or a future reference image.
[0020]
[Problems to be solved by the invention]
When encoding a macroblock of a B picture, the image coding apparatus has the highest coding efficiency among intra coding, forward prediction coding, backward prediction coding, or bidirectional prediction coding. It is desirable to have the prediction mode selected.
[0021]
Therefore, there is a method in which a B picture is encoded in each of the above four prediction modes, and the one with the smallest data amount obtained as a result is selected.
[0022]
However, since this method requires encoding in each of the four prediction modes, it takes time for processing or increases the scale of the apparatus.
[0023]
Therefore, a forward motion vector that is a motion vector of the encoding target image with respect to the past reference image and a backward motion vector that is a motion vector of the encoding target image with respect to the future reference image are detected (ME (Motion Estimation). )), And predicting images are obtained by motion compensation of the past reference image or the future reference image corresponding to the forward motion vector or the backward motion vector, respectively, and the prediction residual of the encoding target image for each predicted image is obtained. Corresponding to a difference (ME Error) (hereinafter also referred to as a motion vector estimation residual as appropriate), a method for determining a prediction mode of a B picture (precisely, three types of inter coding (forward prediction coding, The present applicant has previously proposed a method))) of selecting one of backward prediction encoding and bidirectional prediction encoding.
[0024]
In this method (hereinafter referred to as the first method as appropriate), first, for example, the difference between pixel values of a macroblock to be encoded and a predicted macroblock obtained by motion compensation of a reference image. Is obtained as a motion vector estimation residual.
[0025]
Then, when the motion vector estimation residual with respect to the past reference image or the future reference image is set to Ef or Eb, which of the inter coding is used is determined as shown in FIG. 16, for example.
[0026]
That is, when the equation Eb> j × Ef holds, the forward prediction encoding is selected, and when the equation Eb <k × Ef holds, the backward prediction encoding is selected. In other cases, that is, when the equation k × Ef ≦ Eb ≦ j × Ef holds, bi-directional predictive coding is selected.
[0027]
Note that 0 <k <j and j = 2 and k = 1/2 in FIG.
[0028]
Here, in the present specification, the symbols <and> may be set to symbols ≦ and ≧. Similarly, the symbols ≦ and ≧ may be the symbols <and>.
[0029]
Therefore, when the prediction residual Ef by the forward motion vector is relatively small compared to the prediction residual Eb by the backward motion vector (in FIG. 16, it is less than 1/2 (or less)), the forward prediction code. Is selected. Further, when the prediction residual Eb based on the backward motion vector is relatively smaller than the prediction residual Ef based on the forward motion vector (in FIG. 16, it is less than 1/2 (or less)), the backward prediction code. Is selected. Furthermore, when the ratio between the prediction residuals Ef and Eb is not so large or small (in FIG. 16, Ef / Eb is 1/2 or more (greater) and 2 or less (less)), bidirectional A prediction is selected.
[0030]
By the way, when the sequence of images is configured by arranging one (frame or field) B picture between I or P pictures as shown in FIG. Since the temporal distance from the I or P picture (I / P picture) that is the image or the future reference picture to the B picture is the same, the first method improves the coding efficiency. Can be planned.
[0031]
However, when an image sequence is configured by arranging two or more B pictures between I or P pictures, that is, for example, two B pictures are arranged as shown in FIG. In the inter coding, the bidirectional predictive coding is selected even though the forward predictive coding or the reverse predictive coding has the highest coding efficiency. There was a thing.
[0032]
This has been confirmed by a simulation performed by the present inventors.
[0033]
This is because, as shown in FIG. 17, the distance from the B picture to the I / P picture that becomes the past reference image or the future reference image is different.
[0034]
That is, when two B pictures are arranged, the distance to the future reference image is longer than the distance to the past reference image for the first B picture, and the second B picture On the other hand, for the picture, the distance to the past reference image is longer than the distance to the future reference image. Therefore, the prediction accuracy by the backward motion vector is degraded for the first B picture, and the prediction accuracy by the forward motion vector is degraded for the second B picture.
[0035]
Accordingly, the applicant of the present invention determines the prediction mode in consideration of the distance from the B picture to each of the past reference image or the future reference image, so that two or more images are inserted between the past reference image and the future reference image. A method that can efficiently encode an image even if a B picture is arranged (hereinafter referred to as the second method as appropriate) has been proposed previously (for example, Japanese Patent Application No. 7-210665). ).
[0036]
In the second method, the condition for selecting one of the inter-coding is changed depending on whether the B picture to be encoded is closer to the past reference image or the future reference image. ing.
[0037]
That is, when the B picture to be encoded is close to the past reference image (for example, frames F2, F5, F8,... In FIG. 17), as shown in FIG. When Ef holds, forward predictive coding is selected, and when Eb <b × Ef holds, reverse predictive coding is selected. In addition, when the formula b × Ef ≦ Eb ≦ a × Ef holds, bidirectional predictive coding is selected.
[0038]
However, 0 <b <a, and a is a value smaller than j in FIG. In FIG. 18A, a = 4/3 and b = 1/2.
[0039]
On the other hand, when the B picture to be encoded is close to the future reference picture (for example, frames F3, F6, F9,... In FIG. 17), as shown in FIG. 18B, the expression Eb> c × When Ef holds, forward predictive coding is selected, and when Eb <d × Ef holds, reverse predictive coding is selected. In addition, when the formula d × Ef ≦ Eb ≦ c × Ef holds, bi-directional predictive coding is selected.
[0040]
However, 0 <d <c, and d is a value larger than k in FIG. In FIG. 18B, c = 2 and d = 3/4.
[0041]
By doing as described above, when the B picture to be encoded is close to a past reference image, it is easy to select forward prediction encoding using only the past reference image, and is close to a future reference image. In this case, it is easy to select backward prediction encoding using only the future reference image. Therefore, it becomes easy to perform predictive coding using only a reference image with high prediction accuracy, and as a result, coding efficiency can be improved.
[0042]
However, according to the second method, for example, when an image with slow motion or an image with a certain simple motion such as an object panning in the horizontal direction is an encoding target, In some cases, the conversion efficiency decreased slightly.
[0043]
That is, for images with slow motion and images with a certain simple motion, prediction accuracy is higher with bidirectional predictive coding than with forward predictive coding or reverse predictive coding. Encoding efficiency is also increased. However, in the second method, as shown in FIG. 18, compared with the case in FIG. 16, the range in which bi-directional predictive coding is selected is narrowed, and forward predictive coding or reverse predictive code is selected. The range that can be selected is widened. Thus, according to the second method, even when encoding a slow motion image or an image having a certain simple motion, forward predictive encoding or reverse direction is more preferable than bidirectional predictive encoding. Predictive coding is easily selected, and as a result, coding efficiency is degraded.
[0044]
On the other hand, conventionally, without considering the bit amount necessary for motion vector transmission, the selection of inter coding (either forward prediction coding, backward prediction coding, or bidirectional prediction coding) One choice).
[0045]
That is, in the past, basically, the one with the smallest prediction residual among the forward prediction coding, the backward prediction coding, and the bidirectional prediction coding has been selected.
[0046]
However, for example, when any prediction residual for forward predictive coding, reverse predictive coding, and bi-directional predictive coding is small, even if the one for bi-directional predictive coding is the smallest. Considering the amount of bits required for motion vector transmission, forward prediction encoding or backward prediction encoding may be more efficient than bidirectional prediction encoding.
[0047]
Such a case often occurs, for example, when an image with a fast motion is encoded.
[0048]
The present invention has been made in view of such a situation, and is intended to further improve the coding efficiency of an image.
[0049]
[Means for Solving the Problems]
  The image coding apparatus according to the present invention includes a forward motion vector that is a motion vector of an image to be coded with respect to a past reference image that precedes in time, and an encoding target with respect to a future reference image that follows in time. Prediction of the encoding target image based on the prediction residual of the encoding target image with respect to the past reference image or the future reference image for each of the past reference image and the future reference image, and a motion vector detection unit that detects the backward motion vector that is the motion vector of the image A prediction mode determining means for determining a mode as one of a forward prediction encoding mode, a backward prediction encoding mode, or a bidirectional prediction encoding mode, and performing motion compensation corresponding to the prediction mode, thereby predicting a prediction image A motion compensation unit to be generated; a difference value calculation unit that calculates a difference value between an encoding target image and a predicted image; and an encoding unit that encodes the difference value. The prediction mode determination means uses Ef or Eb as the prediction residual for the past reference image or the future reference image, and α, β, γ, and δ as predetermined constants (provided that α, β, γ, δ is a real number, and γ <β), a forward prediction code that generates a predicted image from only past reference images when Eb> α × Ef and Eb> β × Ef + (1−α × β) × δ hold. Predictive mode is determined as the normalization mode, and when the expression Eb ≦ α × Ef and Eb <γ × Ef + (1−α × γ) × δ holds, reverse predictive coding for generating a predicted image only from the future reference image When the prediction mode is determined as the mode and the expressions γ × Ef + (1−α × γ) × δ ≦ Eb and Eb ≦ β × Ef + (1−α × β) × δ hold, the past reference image and the future reference image Predictive mode to bi-directional predictive coding mode that generates predictive images from both ConstantHowever, by increasing δ as the size of the forward motion vector or backward motion vector increases, the bi-directional predictive coding mode is less likely to be determined.It is characterized by that.
[0050]
  The image encoding method of the present invention is a method of encoding a forward motion vector that is a motion vector of an image to be encoded with respect to a past reference image that precedes in time and a future reference image that is temporally following. The backward motion vector that is the motion vector of the image is detected, and the prediction mode of the encoding target image is predicted in the forward direction based on the prediction residual of the encoding target image for each of the past reference image or the future reference image. By determining one of the encoding mode, the backward prediction encoding mode, or the bidirectional prediction encoding mode, and performing motion compensation corresponding to the prediction mode, a prediction image is generated, and an image to be encoded, The difference value with the predicted image is calculated, the difference value is encoded, the prediction residual for each of the past reference image or the future reference image is set to Ef or Eb, and α, β, γ, δ In the case where predetermined constants are used (where α, β, γ, and δ are real numbers and γ <β), the equation Eb> α × Ef and Eb> β × Ef + (1−α × β) × δ holds. When the prediction mode is determined as the forward predictive coding mode for generating the prediction image only from the past reference image, and the equation Eb ≦ α × Ef and Eb <γ × Ef + (1−α × γ) × δ holds Then, the prediction mode is determined as the backward prediction encoding mode for generating the prediction image only from the future reference image, and the expressions γ × Ef + (1−α × γ) × δ ≦ Eb and Eb ≦ β × Ef + (1−α) are determined. When (ββ) × δ holds, the prediction mode is determined as the bidirectional predictive coding mode for generating the prediction image from both the past reference image and the future reference image.However, by increasing δ as the size of the forward motion vector or backward motion vector increases, the bi-directional predictive coding mode is less likely to be determined.It is characterized by that.
[0051]
  In the image encoding device of the present invention, a forward motion vector that is a motion vector of an image to be encoded with respect to a past reference image that precedes in time and an encoding target with respect to a future reference image that follows in time The backward motion vector that is the motion vector of the current image is detected, and the prediction mode of the image to be encoded is forward based on the prediction residual of the image to be encoded for each past reference image or future reference image. A prediction image is generated by determining a prediction encoding mode, a backward prediction encoding mode, or a bidirectional prediction encoding mode, and performing motion compensation corresponding to the prediction mode. And the difference value with the predicted image is calculated, the difference value is encoded, and the prediction residual for each of the past reference image or the future reference image is set to Ef or Eb. In both cases, α, β, γ, and δ are predetermined constants (where α, β, γ, and δ are real numbers, γ <β), and the expressions Eb> α × Ef and Eb> β × Ef + ( When 1−α × β) × δ holds, the prediction mode is determined as the forward prediction encoding mode for generating the prediction image only from the past reference image, and the expression Eb ≦ α × Ef and Eb <γ × Ef + (1 When −α × γ) × δ holds, the prediction mode is determined as the backward prediction encoding mode for generating the prediction image only from the future reference image, and the expression γ × Ef + (1−α × γ) × δ ≦ Eb When Eb ≦ β × Ef + (1−α × β) × δ holds, the prediction mode is determined as the bidirectional predictive coding mode for generating the prediction image from both the past reference image and the future reference image.The larger the size of the forward motion vector or the backward motion vector is, the larger δ is, thereby making it difficult to determine the bidirectional predictive coding mode..
[0052]
  In the image coding method of the present invention, a forward motion vector that is a motion vector of an image to be coded with respect to a temporally preceding past reference image and a future reference image that is temporally followed The backward motion vector that is the motion vector of the current image is detected, and the prediction mode of the image to be encoded is forward based on the prediction residual of the image to be encoded for each past reference image or future reference image. A prediction image is generated by determining a prediction encoding mode, a backward prediction encoding mode, or a bidirectional prediction encoding mode, and performing motion compensation corresponding to the prediction mode. And the difference value with the predicted image is calculated, the difference value is encoded, and the prediction residual for each of the past reference image or the future reference image is set to Ef or Eb. In both cases, α, β, γ, and δ are predetermined constants (where α, β, γ, and δ are real numbers, γ <β), and the expressions Eb> α × Ef and Eb> β × Ef + ( When 1−α × β) × δ holds, the prediction mode is determined as the forward prediction encoding mode for generating the prediction image only from the past reference image, and the expression Eb ≦ α × Ef and Eb <γ × Ef + (1 When −α × γ) × δ holds, the prediction mode is determined as the backward prediction encoding mode for generating the prediction image only from the future reference image, and the expression γ × Ef + (1−α × γ) × δ ≦ Eb When Eb ≦ β × Ef + (1−α × β) × δ holds, the prediction mode is determined as the bidirectional predictive coding mode for generating the prediction image from both the past reference image and the future reference image.The larger the size of the forward motion vector or the backward motion vector is, the larger δ is, thereby making it difficult to determine the bidirectional predictive coding mode..
[0053]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below, but before that, in order to clarify the correspondence between the respective means of the invention described in the claims and the following embodiments, after each means, A corresponding embodiment (however, an example) is added in parentheses to describe the characteristics of the present invention, and the following is obtained.
[0054]
That is, the image encoding device according to claim 1 is for a forward motion vector that is a motion vector of an image to be encoded with respect to a past reference image that precedes in time, and a future reference image that follows in time. A motion vector detection means (for example, a motion vector estimation circuit 6 shown in FIG. 6) that detects a backward motion vector that is a motion vector of an image to be encoded, and corresponds to a forward motion vector or a backward motion vector Then, a prediction mode is generated by performing prediction mode determination means (for example, the prediction mode determination circuit 21 shown in FIG. 7) for determining the prediction mode of the image to be encoded and motion compensation corresponding to the prediction mode. Motion compensation means (for example, the motion compensation circuit 20 shown in FIG. 7) and difference value calculation means (for example, a difference value calculation means for calculating the difference value between the image to be encoded and the predicted image) 7) and encoding means for encoding the difference value (for example, the DCT circuit 12, the quantization circuit 13, the variable length encoding circuit 15 and the like shown in FIG. 7). Features.
[0055]
Of course, this description does not mean that the respective means are limited to those described above.
[0056]
Next, the principle of the present invention will be described.
[0057]
In a moving image, in general, the correlation between images in the time axis direction decreases as the distance (interval) between the images increases.
[0058]
Therefore, for example, in a sequence in which one B picture is arranged between I / P pictures as shown in FIG. 1 which is the same as FIG. 14, the B picture and the past reference image or the future reference image are respectively The correlation is equal, and as a result, the statistical properties of the motion vector estimation residuals Ef and Eb for the past reference image and the future reference image are also equal.
[0059]
On the other hand, for example, in a sequence in which two or more B pictures are arranged between I / P pictures as shown in FIG. 2 which is the same as FIG. 17, B pictures and past reference images or future reference images respectively The correlation changes in accordance with the distance.
[0060]
For this reason, for example, as shown in FIG.nAnd Pn + 4Between the three B pictures Bn + 1, Bn + 2, Bn + 3When these three B pictures B are placedn + 1, Bn + 2, Bn + 3P picture PnOr Pn + 4When each is predictively encoded as a past reference image or a future reference image, the past reference image PnB picture forn + 1, Bn + 2, Bn + 3Each motion vector residual Ef1, Ef2, Ef3Is generally Ef1<Ef2<Ef3It becomes a relationship.
[0061]
Similarly, future reference image Pn + 4B picture forn + 1, Bn + 2, Bn + 3Each motion vector residual Eb1, Eb2, Eb3Is generally Eb1> Eb2> Eb3It becomes a relationship.
[0062]
As described above, when two or more B pictures are arranged between I / P pictures, the distance to each of the past reference image or the future reference image is different for each B picture. Is also different. As a result, the statistical properties of the motion vector residuals with respect to the past reference image or the future reference image are also different for each B picture. Therefore, in order to improve the encoding efficiency, the prediction mode when encoding each B picture is used. It is necessary to change the determination method according to its statistical properties.
[0063]
Next, the prediction accuracy by bidirectional predictive coding generally decreases as the motion of an image increases. For this reason, in the case of bi-directional predictive coding, considering that both the forward motion vector and the reverse motion vector must be transmitted, the bi-directional predictive code is used when the image motion is fast. Even when the prediction residual due to encoding is the smallest, if the predictive encoding is performed using only the reference image temporally closest to the B picture to be encoded, the total amount of data generated will be smaller There are many.
[0064]
On the other hand, for the speed of motion of an image, for example, a motion vector is represented as MV, and its x component (horizontal component) is represented by v.xAnd y component (vertical component) as vyThe magnitude of the motion vector | MV | = (vx 2+ Vy 2)1/2Can be expressed as
[0065]
Therefore, when two B pictures are arranged between I / P pictures, for example, as shown in FIG. 2, the following corresponds to the magnitude of the motion vector | MV | By setting the prediction mode, encoding efficiency can be improved.
[0066]
That is, if the number of frames from the B picture to be encoded to the past reference picture or the future reference picture is Df or Db, respectively, when Df = 1 and Db = 2 (from the encoding target B picture) For example, as shown in FIG. 4A, the formula Eb> p × Ef and Eb> q × Ef + (1−p × q) × TiIs satisfied, the forward predictive coding is selected, and the expression Eb ≦ p × Ef and Eb <r × Ef + (1−p × r) × TiWhen the above holds, reverse prediction encoding is selected. Also, the formula r × Ef + (1−p × r) × Ti≦ Eb and Eb ≦ q × Ef + (1−p × q) × TiIs selected, bi-directional predictive coding is selected.
[0067]
Where TiIs a constant of 0 or more, 0 <r <q, and q is a value smaller than j in FIG. In FIG. 4A, q = 5/4 and r = 3/4. Further, p = 1.
[0068]
In this case, the prediction residual Ef is TiLess than (below) or the prediction error Eb is p × TiIf less than, bi-predictive coding is not selected. That is, in this case, bi-directional predictive encoding is performed when the prediction residual Ef is TiOr the prediction error Eb is p × TiIt can be selected only when this is the case.
[0069]
Therefore, in this case, as the magnitude of the motion vector | MV |iIs set to a large value, it becomes difficult to select bidirectional predictive coding.
[0070]
That is, T1<T2<... <Tn<Tn + 1, And 0 <mv0<Mv1<... <mvn-1<MvnThe magnitude of the motion vector | MV |0Above mv1If less than TiT1And mv1Above mv2If less than TiT2, ..., mvn-1Above mvnIf less than TiTnAnd mvnAt times above, TiTn + 1Set to. By doing in this way, the faster the motion of the image, the lower the prediction accuracy, and it becomes difficult to select bi-directional predictive coding that greatly increases the amount of bits allocated to the motion vector, and as a result, improves the coding efficiency. be able to.
[0071]
Further, in this case, since the B picture to be encoded is close to the past reference image, it is easy to select the forward predictive encoding using only the past reference image. Can be improved.
[0072]
On the other hand, when Df = 2 and Db = 1 (when the distance from the encoding target B picture is closer to the future reference image), for example, as shown in FIG. 4B, the expression Eb> s × Ef and Eb> t × Ef + (1−s × t) × TiIs satisfied, the forward predictive coding is selected, and the expression Eb ≦ s × Ef and Eb <u × Ef + (1−s × u) × TiWhen the above holds, reverse prediction encoding is selected. Also, the equation u × Ef + (1−s × u) × Ti≦ Eb and Eb ≦ t × Ef + (1−s × t) × TiIs selected, bi-directional predictive coding is selected.
[0073]
Here, 0 <u <t, and u is a value larger than k in FIG. In FIG. 4B, t = 4/3 and u = 4/5. Further, s = 1.
[0074]
Also in this case, the prediction residual Ef is TiOr the prediction error Eb is s × TiIf less than, bi-predictive coding is not selected. That is, in this case, bi-directional predictive encoding is performed when the prediction residual Ef is TiOr the prediction error Eb is s × TiIt can be selected only when this is the case.
[0075]
Therefore, as in the case described above, as the magnitude of the motion vector | MV |iBy setting to a large value, bi-directional predictive coding becomes difficult to select, and as a result, coding efficiency can be improved.
[0076]
Further, in this case, since the B picture to be encoded is close to the future reference image, it is easy to select reverse prediction encoding using only the future reference image. Can be improved.
[0077]
Note that, when the motion of the image is slow, as described above, the prediction accuracy of the bidirectional predictive coding is high and the generated code amount is also small. Therefore, it is desirable to select the bidirectional predictive coding. Therefore, the magnitude | MV | of the motion vector is a predetermined value mv0For example, as shown in FIG. 5 which is the same as FIG. 16, when the formula Eb> j × Ef is satisfied, the forward predictive coding is selected, and the formula Eb <k × Ef is satisfied. If the formula k × Ef ≦ Eb ≦ j × Ef holds, the bidirectional predictive coding is selected.
[0078]
That is, in FIG. 4, for example, t = q = j, r = u = k, Ti= 0.
[0079]
By doing so, the magnitude of the motion vector | MV |0When it becomes less than, it becomes easy to select bi-directional predictive coding with high prediction accuracy, and as a result, coding efficiency can be improved.
[0080]
In addition to the magnitude of the motion vector | MV |, for example, the speed of motion of the image is, for example, the sum of the absolute value of the x component and the absolute value of the y component | x | + | y | Is also reflected. Therefore, the above constant TiCan be set corresponding to the sum of absolute values | x | + | y | of this component.
[0081]
Next, the prediction accuracy by bidirectional predictive coding varies depending on the complexity of the image as well as the speed of motion. That is, the prediction accuracy by bidirectional predictive coding basically increases when the motion of the image is a certain simple object such as an object panning in the horizontal direction, and decreases as it becomes more complicated. .
[0082]
For this reason, in the case of bi-directional predictive coding, considering that both the forward motion vector and the reverse motion vector must be transmitted, bi-directional prediction is used when the motion of the image is complicated. Even when the prediction residual by encoding is the smallest, if the distance from the B picture to be encoded to the temporally closest reference image (the distance from the past reference image or the future reference image is equal, one of them) On the other hand, it is often the case that predictive encoding is performed using only 1) and the total amount of data generated is reduced.
[0083]
On the other hand, for example, in an image in which an object is moving in parallel, the directions of the forward motion vector and the backward motion vector are reversed. That is, the sign of the x or y component of the forward motion vector and the sign of the x or y component of the backward motion vector (the sign of the x component and the sign of the y component) are different from each other. .
[0084]
On the other hand, when the object moves in a complicated manner, at least one of the codes of the x components and the codes of the y components is the same.
[0085]
Therefore, for example, if the x component or y component of the forward motion vector is Fx or Fy, respectively, and the x component or y component of the backward motion vector is Bx or By, respectively, the SMV represented by the following equation: Reflects the complexity of the motion of the image.
[0086]
SMV = | Fx + Bx | + | Fy + By |
[0087]
Note that this SMV changes in accordance with the complexity of the motion of the image, and becomes small when the prediction accuracy of both the forward prediction coding and the backward prediction coding is high. When is low, it tends to increase.
[0088]
Therefore, when two B pictures are arranged between I / P pictures, for example, as shown in FIG. 2, the prediction mode is set as follows corresponding to the SMV. As a result, the encoding efficiency can be improved.
[0089]
That is, first, in the case of Df = 1 and Db = 2, for example, as shown in FIG. 4A, the formula Eb> p × Ef and Eb> q × Ef + (1−p × q) × TiIs satisfied, the forward predictive coding is selected, and the expression Eb ≦ p × Ef and Eb <r × Ef + (1−p × r) × TiWhen the above holds, reverse prediction encoding is selected. Also, the formula r × Ef + (1−p × r) × Ti≦ Eb and Eb ≦ q × Ef + (1−p × q) × TiIs selected, bi-directional predictive coding is selected.
[0090]
In this case, as described above, the prediction residual Ef is TiOr the prediction error Eb is p × TiIf less than, bi-predictive coding is not selected. That is, in this case, bi-directional predictive encoding is performed when the prediction residual Ef is TiOr the prediction error Eb is p × TiIt can be selected only when this is the case.
[0091]
Therefore, in this case, as the SMV increases, the constant TiIs set to a large value, it becomes difficult to select bidirectional predictive coding.
[0092]
That is, 0 <MV0<MV1<... <MVn-1<MVnThe SMV is MV0MV1If less than TiT1And MV1MV2If less than TiT2, MVn-1MVnIf less than TiTnAnd MVnAt times above, TiTn + 1Set to. By doing in this way, it becomes difficult to select the bi-directional predictive coding in which the prediction accuracy decreases as the motion of the image becomes complicated, and as a result, the coding efficiency can be improved.
[0093]
Further, in this case, since the B picture to be encoded is close to the past reference image, it is easy to select the forward predictive encoding using only the past reference image. Can be improved.
[0094]
On the other hand, when Df = 2 and Db = 1, for example, as shown in FIG. 4B, the expressions Eb> s × Ef and Eb> t × Ef + (1−s × t) × TiIs satisfied, the forward predictive coding is selected, and the expression Eb ≦ s × Ef and Eb <u × Ef + (1−s × u) × TiWhen the above holds, reverse prediction encoding is selected. Also, the equation u × Ef + (1−s × u) × Ti≦ Eb and Eb ≦ t × Ef + (1−s × t) × TiIs selected, bi-directional predictive coding is selected.
[0095]
Also in this case, the prediction residual Ef is TiOr the prediction error Eb is s × TiIf less than, bi-predictive coding is not selected. That is, in this case, bi-directional predictive encoding is performed when the prediction residual Ef is TiOr the prediction error Eb is s × TiIt can be selected only when this is the case.
[0096]
Therefore, as in the case described above, as the SMV increases, the constant TiBy setting to a large value, bi-directional predictive coding becomes difficult to select, and as a result, coding efficiency can be improved.
[0097]
Further, in this case, since the B picture to be encoded is close to the future reference image, it is easy to select reverse prediction encoding using only the future reference image. Can be improved.
[0098]
In addition, when the movement of the image is very simple, that is, for example, when the object is translated in a certain direction, SMV becomes a very small value (ideally, 0) ). In this case, as described above, since the prediction accuracy of bidirectional predictive coding is high and the amount of generated codes is small, it is desirable to select bi-directional predictive coding. Therefore, SMV is a predetermined value MV.0For example, as shown in FIG. 5 which is the same as FIG. 16, when the formula Eb> j × Ef is satisfied, the forward predictive coding is selected, and the formula Eb <k × Ef is satisfied. If the formula k × Ef ≦ Eb ≦ j × Ef holds, the bidirectional predictive coding is selected.
[0099]
That is, in FIG. 4, for example, t = q = j, r = u = k, Ti= 0.
[0100]
By doing this, SMV becomes MV0When it becomes less than, it becomes easy to select bi-directional predictive coding with high prediction accuracy, and as a result, coding efficiency can be improved.
[0101]
In addition, as an example of a case where the motion of the image is very simple, there is an image shot by panning a video camera. In this case, the x component of the motion vector is much larger than the y component. Thus, for example, when g | y || g | y | is satisfied when g is a predetermined constant (a value larger than 1, for example, 4), bi-predictive coding is selected as described above. It is possible to facilitate this. This also applies to the case where the expression g | x | <| y | holds.
[0102]
As described above, by selecting (deciding) the prediction mode adaptively according to the speed and complexity of the motion of the image, the encoding efficiency can be improved as compared with the conventional case.
[0103]
In the above case, two B pictures are arranged between I / P pictures. However, only one or three or more B pictures are arranged between them. The same can be said for.
[0104]
Next, FIG. 6 and FIG. 7 show a configuration of an embodiment of an image encoding device to which the present invention is applied.
[0105]
This image encoding apparatus determines a prediction mode corresponding to, for example, SMV reflecting the complexity of motion of the image described above, and the image is a hybrid code combining motion compensation and DCT (Discrete Cosine Transform). It is made to become.
[0106]
That is, the image data to be encoded is supplied to the image encoding type designation circuit 3 in units of frames (or fields), for example. The image coding type designation circuit 3 designates whether the frame input thereto is to be processed as an I, P, or B picture (hereinafter referred to as a picture type as appropriate).
[0107]
Specifically, for example, as shown in FIG. 8A, the image coding type designating circuit 3 processes 16-frame images F1 to F16 input thereto as 1 GOP data, ), The first frame F1 is designated as the I picture, the second and third frames F2 and F3 are designated as the B picture, and the fourth frame F4 is designated as the P picture. Further, the image coding type designating circuit 3 designates the fifth and sixth frames F5 and F6 as B pictures and the seventh frame F7 as P pictures, and thereafter the remaining frames F8 to F16 are designated similarly. Are designated as B or P pictures.
[0108]
In FIG. 8B (the same applies to FIG. 8C), the subscript numbers attached to I, P, and B correspond to temporal referencd in MPEG, and each frame Indicates the display order.
[0109]
The frame in which the picture type is designated in the image coding type designation circuit 3 is output to the image coding order changing circuit 4. In the image encoding order changing circuit 4, the arrangement of frames is rearranged in the encoding order. That is, since the B picture may be decoded on the receiving side using an image displayed after it is displayed as a reference image (future reference image), the future reference image has already been decoded. Otherwise, the B picture cannot be decoded. Therefore, the image encoding order changing circuit 4 changes the arrangement of the frames constituting the GOP so that the frame serving as the future reference image is encoded before the B picture.
[0110]
Specifically, for example, rearrangement is performed as shown in FIG.
[0111]
The sequence of frames rearranged by the image encoding order changing circuit 4 is supplied to the scan converter 5. The scan converter 5 converts a frame input by raster scanning into a block format signal.
[0112]
That is, for example, frame format image data in which only V lines are collected from H dots is input to the scan converter 5. Then, the scan converter 5 divides the image data into N slices composed of 16 lines as shown in FIG. 9A (accordingly, V = 16 × N), and further, As shown in FIG. 5B, each slice is divided into 16 macro blocks and divided into M macro blocks (hence, here, H = 16 × M).
[0113]
Therefore, each macro block is composed of luminance signals corresponding to 16 × 16 dots. As shown in FIG. 9C, the macro block is divided into luminance signals Y [1] to Y [4] corresponding to 8 × 8 dots, and the macro block is divided into 8 × 8 dots. Corresponding color difference signals Cb [5] and Cr [6] are associated. In the DCT circuit 12 (FIG. 7), which will be described later, DCT processing is performed in units of blocks of 8 × 8 dots.
[0114]
As described above, the macroblock obtained by the scan converter 5 is supplied to the arithmetic unit 11 in FIG.
[0115]
Returning to FIG. 6, the counter 9 counts the frame synchronization signal output from the image coding order changing circuit 4.
[0116]
That is, the image encoding order changing circuit 4 outputs a frame synchronization signal to the counter 9 at a timing when the rearranged frames are output to the scan converter 5. Further, the image coding order changing circuit 4 detects the picture type TYPE of the frame to be output to the scan converter 5 and outputs it to the motion vector estimation circuit 6, the counter 9, and the prediction mode determination circuit 21 in FIG.
[0117]
The counter 9 counts the frame synchronization signal output from the image encoding order changing circuit 4 and outputs the count value CNT to the inter-image distance generation circuit 10. The counter 9 is configured to reset the count value CNT to 0, for example, when the picture type TYPE output from the image coding order changing circuit 4 is an I or P picture.
[0118]
Accordingly, the count value CNT output from the counter 9 represents the number of B pictures arranged between the I or P pictures.
[0119]
Here, in the present embodiment, as shown in FIG. 8B, since two B pictures are arranged between the I or P pictures, the count value CNT output from the counter 9 is As shown in FIG. 4D, it becomes 0, 1 or 2.
[0120]
The inter-image distance generation circuit 10 is based on the count value CNT from the counter 9 and the distance (number of frames) from the B picture to each of the past reference image or the future reference image used for the predictive encoding (inter encoding). Df or Db is calculated and output to the prediction mode determination circuit 21 of FIG.
[0121]
That is, the inter-image distance generation circuit 10 outputs the same value as the count value CNT as the distance Df to the past reference image, as shown in FIG. 8E, and as the distance Db to the future reference image. As shown in FIG. 8F, a value obtained by arranging the count values CNT in reverse is output.
[0122]
On the other hand, the motion vector estimation circuit 6 detects (estimates) the forward motion vector MVf and the backward motion vector MBb, and further, predicts residuals (motion vector estimation) for each of the forward motion vector MVf and the backward motion vector MVb. Residual) Ef or Eb is calculated.
[0123]
That is, the motion vector estimation circuit 6 is supplied with a frame in which the picture type TYPE is designated and the picture type TYPE from the image coding order changing circuit 4.
[0124]
The motion vector estimation circuit 6 uses the frame supplied from the image encoding reordering circuit 4 according to the picture type TYPE, the past reference image storage unit 7A, the current image storage unit 7B, or the future reference constituting the storage unit 7. A motion vector is detected for an image stored in any of the image storage units 7C and stored in the current image storage unit 7B.
[0125]
Specifically, the motion vector estimation circuit 6 is, for example, in the case shown in FIG.1Is stored in the past reference image storage unit 7A, and PFourIs stored in the current image storage unit 7B.1P as a past reference imageFourMotion vector (forward motion vector) MVf is detected, and the prediction residual Ef is obtained. Next, P currently stored in the image storage unit 7BFourIs transferred to the future reference image storage unit 7C, and B2Is stored in the current image storage unit 7B.1Or PFour, As past reference images or future reference images,2Forward motion vector MVf or backward motion vector MVb is detected, and the respective prediction residuals Ef or Eb are obtained.
[0126]
Next, BThreeIs stored in the current image storage unit 7B, and, as in the case described above, BThreeForward motion vector MVf or backward motion vector MVb is detected, and the respective prediction residuals Ef or Eb are obtained.
[0127]
Thereafter, P stored in the future reference image storage unit 7C.FourIs transferred to the past reference image storage unit 7A and stored (overwritten), and P7Is stored in the current image storage unit 7B, so that PFourP as a past reference image7Motion vector MVf is detected, and the prediction residual Ef is obtained.
[0128]
Next, P currently stored in the image storage unit 7B7Is transferred to the future reference image storage unit 7C, and BFiveIs stored in the current image storage unit 7B, so that PFourOr P7, As past reference images or future reference images,FiveForward motion vector MVf or backward motion vector MVb is detected, and the respective prediction residuals Ef or Eb are obtained. Hereinafter, similarly, detection of a motion vector and calculation of a prediction residual are performed.
[0129]
Here, a method of calculating the prediction errors Ef and Eb will be described.
[0130]
Now, let a certain macroblock be a target macroblock, and the pixel value of the i-th pixel from the left and the j-th pixel from the top constituting the target macroblock is AijAnd the pixel value of the i-th pixel from the left and the j-th pixel from the top constituting the 16 × 16 range of the past reference image that most closely approximates the target macroblock is FijIt expresses. In this case, the prediction error Ef is calculated according to the following equation, for example.
[0131]
Ef = Σ | Aij-Fij
In the above equation, Σ represents a summation with i and j changed from 1 to 16.
[0132]
In addition, the pixel value of the i-th pixel from the left and the j-th pixel from the top constituting the 16 × 16 range of the future reference image that most closely approximates the target macroblock is represented by BijIn other words, the prediction error Eb is calculated according to the following equation, for example.
[0133]
Eb = Σ | Aij-Bij
In the above formula, Σ represents the summation with i and j changed to 1 to 16.
[0134]
The motion vectors MVf and MBb and the prediction errors Ef and Eb obtained as described above are supplied to the prediction mode determination circuit 21 in FIG. The motion vectors MVf and MBb are also supplied to the variable length coding circuit 15 and the motion compensation circuit 20 in FIG. Further, the motion vectors MVf and MBb for the B picture are also supplied to the motion amount calculation circuit 8.
[0135]
In the motion amount calculation circuit 8, the SMV described above is calculated from the motion vectors MVf and MBb and supplied to the prediction mode determination circuit 21 in FIG.
[0136]
In the prediction mode determination circuit 21 of FIG. 7, the prediction mode of the macroblock is determined based on the distances Df and Db, the motion vectors MVf and MVb, the picture type TYPE, and the SMV.
[0137]
That is, when the picture type TYPE is an I picture, that is, when the encoding target macroblock is an I picture, the prediction mode determination circuit 21 determines the prediction mode as an intra encoding mode.
[0138]
When the picture type TYPE is a P picture, that is, when the encoding target macroblock is a P picture, the prediction mode determination circuit 21 sets the prediction mode to the intra coding mode or the order as follows. One of the direction prediction encoding modes is determined.
[0139]
In other words, in this case, the prediction mode determination circuit 21 first determines, for example, E defined by the following equation as a prediction residual at the time of intra coding.intraIs calculated.
[0140]
Eintra= Σ | Aij-Aav
In the above formula, AijRepresents the pixel value of the i-th pixel from the left and the j-th pixel from the top constituting the macroblock to be encoded, and AavRepresents the average value. Also, Σ represents summation with i and j changed to 1-16.
[0141]
Then, the prediction mode determination circuit 21 receives the prediction residual E during intra coding.intraIs smaller than the prediction residual Ef in the forward predictive coding (when below), the prediction mode is determined to be the intra coding mode. Also, the prediction residual E during intra codingintraIs greater than or equal to the prediction residual Ef in forward predictive coding (when larger), the predictive mode is determined as the forward predictive predictive mode.
[0142]
Next, when the picture type TYPE is a B picture, that is, when the encoding target macroblock is a B picture, the prediction mode determination circuit 21 sets the prediction mode to the intra coding mode, as follows. A forward prediction encoding mode, a backward prediction encoding mode, or a bidirectional predictive encoding mode is determined.
[0143]
That is, first, the prediction mode determination circuit 21 selects (determines) one of inter coding, that is, one of the forward prediction coding mode, the backward prediction coding mode, and the bidirectional prediction coding mode.
[0144]
This selection is performed based on SMV, prediction residuals Ef and Eb, distances Df and Db, and motion vectors MVf and MVb.
[0145]
That is, first, corresponding to SMV, the constant T described in FIG.iIs set. Then, either one of FIG. 4 (A) or FIG. 4 (B) is selected corresponding to the distances Df and Db, and in the selected one, the prediction residuals Ef and Eb are as described above. One of the forward prediction coding mode, the backward prediction coding mode, and the bidirectional prediction coding mode is selected based on the magnitude relationship.
[0146]
Note that SMV is a predetermined value MV.0As described above, the prediction described with reference to FIG. 5 is performed in the following cases, or when one of the absolute values of the x and y components of the motion vectors MVf and MVb is sufficiently larger than the other. Based on the magnitude relationship between the residuals Ef and Eb, one of the forward predictive coding mode, the reverse predictive coding mode, and the bidirectional predictive coding mode is selected.
[0147]
Then, the prediction residual corresponding to the prediction mode selected from the inter coding is obtained as the prediction residual E for the inter coding.interIt is said. When the bi-directional predictive coding mode is selected, the prediction residual EinterIs, for example, an average value of the prediction residuals Ef and Eb. Therefore, when the forward predictive coding mode, the reverse predictive coding mode, or the bidirectional predictive coding mode is selected, the prediction residual EinterAre Ef, Eb, or (Ef + Eb) / 2, respectively.
[0148]
Further, in the prediction mode determination circuit 21, the prediction residual E at the time of intra-coding is performed in the same manner as described above.intraIs calculated. Then, the prediction mode determination circuit 21 receives the prediction residual E during intra coding.intraIs the prediction residual E of the one selected from the inter codinginterWhen smaller, the prediction mode is determined as the intra coding mode. Also, the prediction residual E during intra codingintraIs the prediction residual EinterAt this time, the prediction mode is determined to be selected from the inter coding.
[0149]
Therefore, for the B picture, the prediction mode is adaptively determined in accordance with the motion complexity of the image and the distance to the reference image, so that the coding efficiency can be further improved. It becomes.
[0150]
The prediction mode determined as described above is supplied from the prediction mode determination unit 21 to the calculation unit 11, the variable length coding circuit 15, and the motion compensation circuit 20.
[0151]
A macroblock (macroblock to be encoded) to be predictively encoded in the prediction mode supplied from the prediction mode determination circuit 21 is supplied from the scan converter 5 of FIG. The computing unit 11 includes computing units 11A to 11C and a switch SW, and the switch SW is switched corresponding to the prediction mode.
[0152]
That is, when an I-picture macroblock is input to the calculation unit 11, the prediction mode is an intra coding mode. In this case, the switch SW selects the terminal a. The terminal a is supplied with the macroblock to be encoded as it is. Therefore, this macroblock is supplied to the DCT circuit 12 through the terminal a.
[0153]
In the DCT circuit 12, the macroblock from the calculation unit 11 is subjected to DCT processing, and thereby converted into DCT coefficients. This DCT coefficient is supplied to the quantization circuit 13, where it is quantized at a predetermined quantization step and then supplied to the variable length coding circuit 15.
[0154]
The variable length coding circuit 15 is supplied with the quantized DCT coefficients from the quantization circuit 13, and similarly, the quantization step from the quantization circuit 13 and the prediction mode from the prediction mode determination circuit 21 are as shown in FIG. Motion vectors MVf and MVb are respectively supplied from the motion vector estimation circuit 6. The variable length coding circuit 15 appropriately converts these data into a variable length code such as a Huffman code and outputs the data to the transmission buffer 14.
[0155]
The transmission buffer 14 temporarily stores the variable length code from the variable length encoding circuit 15 and outputs it at a constant data rate, for example. The variable length code output from the transmission buffer 14 is recorded on a recording medium 31 such as an optical disk, a magneto-optical disk, a magnetic disk, an optical card, a magnetic tape, a phase change disk, or a satellite line, a ground wave, It is transmitted via a transmission path 32 such as a CATV network or the Internet.
[0156]
The transmission buffer 14 supplies (feeds back) the accumulated amount of data to the quantization circuit 13. The quantization circuit 13 is configured to set a quantization step based on the accumulated amount. That is, the quantization circuit 13 increases the quantization step when the transmission buffer 14 is likely to overflow, thereby reducing the data generation amount. Further, when the transmission buffer 14 is likely to underflow, the quantization circuit 13 reduces the quantization step, thereby increasing the data generation amount. As described above, overflow and underflow of the transmission buffer 14 are prevented.
[0157]
On the other hand, the quantized DCT coefficient output from the quantization circuit 13 and the quantization step are supplied to the inverse quantization circuit 16 in addition to the variable length coding circuit 15. The inverse quantization circuit 16 inversely quantizes the quantized DCT coefficient from the quantization circuit 13 in the same quantization step from the quantization circuit 13, and outputs the resulting DCT coefficient to the IDCT circuit 17. .
[0158]
In the IDCT circuit 17, the DCT coefficient from the inverse quantization circuit 16 is subjected to inverse DCT processing, whereby image data having substantially the same value as the output of the computing unit 11 is restored and supplied to the computing unit 18. If the image data input thereto is to be intra-encoded, the arithmetic unit 18 outputs the image data as it is to the frame memory 19 for storage without performing any particular processing.
[0159]
The frame memory 19 includes a future reference image storage circuit 19A and a past reference image storage circuit 19B that store an image used as a future reference image or a past reference image. The frame memory 19 is first encoded and decoded. The I picture is stored in the past reference image storage circuit 19B.
[0160]
Next, when the macroblock input to the calculation unit 11 is a P picture and the prediction mode is the intra coding mode, the switch SW selects the terminal a. Therefore, in this case, the macroblock of the P picture is encoded in the same manner as in the case of the I picture described above, and is locally decoded and supplied to the frame memory 19. The P picture encoded and decoded next to the I picture is stored in the future reference image storage circuit 19A.
[0161]
On the other hand, when the macroblock input to the calculation unit 11 is a P picture, the switch SW selects the terminal b when the prediction mode is the forward predictive coding mode. The output of the computing unit 11A is supplied to the terminal b, and the macro block to be encoded and the output of the motion compensation circuit 20 are supplied to the computing unit 11A. ing.
[0162]
When the prediction mode is the forward predictive coding mode, the motion compensation circuit 20 reads an image (in this case, an I picture) stored in the past reference image storage circuit 19B as a past reference image, and follows the motion vector MVf. A predicted image is generated by performing motion compensation. That is, the motion compensation circuit 20 reads from the past reference image storage circuit 19B data at an address shifted from the position corresponding to the macroblock to be encoded by the amount corresponding to the motion vector MVf, and calculates this as a predicted image. To the vessel 11A.
[0163]
The computing unit 11A subtracts the corresponding pixel value constituting the predicted image from each pixel value constituting the macro block to be encoded, and outputs the subtraction value (difference value). Therefore, in this case, the arithmetic unit 11 supplies the DCT circuit 12 with a difference value between the encoding target macroblock and the predicted image obtained from the past reference image. This difference value is encoded and output in the same manner as in intra encoding.
[0164]
Further, this difference value is restored to a value almost the same as the original value through the DCT circuit 12, the quantization circuit 13, the inverse quantization circuit 16, and the IDCT circuit 17, as in the case described above. It is supplied to the calculator 18.
[0165]
In this case, the computing unit 18 is supplied with the same data as the predicted image supplied to the computing unit 11A from the motion compensation circuit 20, and the computing unit 18 uses the restored difference value, the predicted image, and Are added, whereby the P picture is locally decoded. The locally decoded P picture is supplied to and stored in the frame memory 19.
[0166]
Note that the P picture encoded and decoded next to the I picture is stored in the future reference image storage circuit 19A as described above.
[0167]
Next, when the macroblock input to the calculation unit 11 is a B picture and the prediction mode is the intra coding mode or the forward prediction coding mode, the switch SW selects the terminal a or b, respectively. Therefore, in this case, the macroblock of the B picture is encoded in the same manner as described above.
[0168]
On the other hand, when the macroblock input to the calculation unit 11 is a B picture and the prediction mode is the backward predictive coding mode, the switch SW selects the terminal c. The output of the computing unit 11B is supplied to the terminal c, and the macro block to be encoded and the output of the motion compensation circuit 20 are supplied to the computing unit 11B. ing.
[0169]
When the prediction mode is the backward predictive coding mode, the motion compensation circuit 20 reads an image (in this case, a P picture) stored in the future reference image storage circuit 19A as a future reference image, and follows the motion vector MVb. A predicted image is generated by performing motion compensation. In other words, the motion compensation circuit 20 reads data at an address shifted from the position corresponding to the macroblock to be encoded by the amount corresponding to the motion vector MVb from the future reference image storage circuit 19A, and calculates this as a predicted image. To the vessel 11B.
[0170]
The computing unit 11B subtracts the corresponding pixel value constituting the prediction image from each pixel value constituting the macro block to be encoded, and outputs the subtraction value (difference value). Therefore, in this case, the arithmetic unit 11 supplies the DCT circuit 12 with a difference value between the macro block to be encoded and the predicted image obtained from the future reference image. This difference value is encoded and output in the same manner as in intra encoding.
[0171]
Further, when the macroblock input to the calculation unit 11 is a B picture and the prediction mode is the bidirectional predictive coding mode, the switch SW selects the terminal d. The output of the arithmetic unit 11C is supplied to the terminal d, and the macro block to be encoded and the output of the motion compensation circuit 20 are supplied to the arithmetic unit 11C. ing.
[0172]
When the prediction mode is the bidirectional predictive coding mode, the motion compensation circuit 20 reads an image (in this case, an I picture) stored in the past reference image storage circuit 19B as a past reference image, and follows the motion vector MVf. A predicted image (hereinafter, appropriately referred to as a past predicted image) is generated by performing motion compensation, and an image (P picture in this case) stored in the future reference image storage circuit 19A is read as a future reference image. By performing motion compensation according to the motion vector MVb, a predicted image (hereinafter, appropriately referred to as a future predicted image) is generated. The past predicted image and the future predicted image are supplied to the computing unit 11C.
[0173]
First, the calculator 11C calculates, for example, an average value (hereinafter, appropriately referred to as an average predicted image) of the past predicted image and the future predicted image supplied from the motion compensation circuit 20. Then, the computing unit 11C subtracts the corresponding pixel value constituting the average predicted image from each pixel value constituting the macro block to be encoded, and outputs the subtraction value (difference value). Accordingly, in this case, the difference value between the macro block to be encoded and the average predicted image is supplied from the calculation unit 11 to the DCT circuit 12. This difference value is encoded and output in the same manner as in intra encoding.
[0174]
In the present embodiment, the B picture is not used as a reference image when other images are encoded, and thus is not locally decoded (it is not necessary). In addition, the past reference image storage circuit 19A and the future reference image storage circuit 19B are configured to be able to perform bank switching as necessary. As a result, the past reference image storage circuit 19A and the future reference image storage circuit 19B The stored image data can be used as both a past reference image and a future reference image. Further, the above-described processing is performed on all of the luminance signal Y and the color difference signals Cb and Cr. However, for the color difference signals Cb and Cr, for example, the motion vector used when the luminance signal Y is processed is halved.
[0175]
Next, the process (prediction mode determination process) of the prediction mode determination circuit 21 of FIG. 7 will be further described with reference to the flowchart of FIG.
[0176]
In the prediction mode determination circuit 21, the process according to the flowchart of FIG. 10 is performed for each macroblock.
[0177]
That is, in the prediction mode determination circuit 21, first, in step S1, the SMV is changed to the threshold value MV.0Whether it is less than is determined. In step S1, SMV is a threshold value MV.0If it is determined that the value is less than 1, the process proceeds to step S2, and one of the inter-coding is selected as described below with reference to FIG.
[0178]
That is, in step S2, it is determined whether the prediction residual Eb is larger than j times the prediction residual Ef (j × Ef). When it is determined in step S2 that Eb is larger than j × Ef, the process proceeds to step S3, where forward predictive coding is selected as inter coding, and the process ends.
[0179]
After that, as described above, the final prediction mode is determined based on the magnitude relationship between the prediction residual for the selected inter coding and the prediction residual for the intra coding.
[0180]
On the other hand, if it is determined in step S2 that Eb is not greater than j × Ef, the process proceeds to step S4, where it is determined whether the prediction residual Eb is less than k times the prediction residual Ef (k × Ef). Is done. When it is determined in step S4 that Eb is less than k × Ef, the process proceeds to step S5, and reverse prediction encoding is selected as inter encoding, and the process ends.
[0181]
If it is determined in step S4 that Eb is not less than k × Ef, that is, if Eb is greater than or equal to k × Ef and less than or equal to j × Ef, the process proceeds to step S6 to perform bidirectional prediction as inter coding. Encoding is selected and the process ends.
[0182]
Note that the prediction mode determination circuit 21 determines, for example, the expression | x |> g | y | or | for the x component and the y component of the forward motion vector MVf or the backward motion vector MVb before performing the process of step S1. It is determined whether or not y |> g | x | is satisfied, and if so, SMV is set to MV such as 0.0It is designed to force the setting to a value less than that. Therefore, for example, for an image in which an object is moving in a substantially horizontal or vertical direction, as described with reference to FIG. 5, selection of inter coding is performed under the condition that bi-directional predictive coding is easily selected. Is done.
[0183]
On the other hand, in step S1, SMV is MV.0If it is determined that it is not less than, step S71In the following, inter-coding selection is performed as described in FIG.
[0184]
That is, step S71So SMV is MV0MV1Whether it is less than is determined. Step S71SMV is MV0MV1If it is determined that the value is less than step S8, step S8 is performed.1The constant Ti is T1The process proceeds to step S9.
[0185]
Step S71SMV is MV0MV1If it is determined that it is not less than, step S72To SMV, MV1MV2Whether it is less than is determined.
[0186]
Hereinafter, similarly, step S7cSo SMV is MVc-1MVcAnd whether the SMV is MVc-1MVcIf it is less, step S8cThe constant Ti is TcThe process proceeds to step S9. Also, SMV is MVc-1MVcIf not, step S7c + 1Proceed to
[0187]
And step S7nSMV is MVn-1MVnIf it is determined that it is not less than, that is, SMV is MVnIn the above case, step S8n + 1The constant Ti is Tn + 1The process proceeds to step S9.
[0188]
In step S9, an inter-image distance determination process corresponding to the distances Df and Db is performed, and the process ends.
[0189]
Next, the flowchart of FIG. 11 shows the details of the inter-image distance determination process in step S9 of FIG. In FIG. 11, it is assumed that one or two B pictures are arranged between I or P pictures.
[0190]
In the inter-image distance determination process, first, in step S11, it is determined whether Df is 1 and Db is 2. When it is determined in step S11 that Df is 1 and Db is 2, the process proceeds to step S12, and inter-coding is selected as described below with reference to FIG.
[0191]
That is, in step S12, it is determined whether Eb is larger than q × Ef + (1−p × q) × Ti and larger than p × Ef. If it is determined in step S12 that Eb is greater than q × Ef + (1−p × q) × Ti and greater than p × Ef, the process proceeds to step S13, and forward prediction encoding is selected and the process returns. . If it is determined in step S12 that Eb is not greater than q × Ef + (1−p × q) × Ti or greater than p × Ef, the process proceeds to step S14, where Eb is r × Ef +. It is determined whether it is less than (1−p × r) × Ti and less than p × Ef.
[0192]
If it is determined in step S14 that Eb is less than r × Ef + (1−p × r) × Ti and less than p × Ef, the process proceeds to step S15, and reverse prediction encoding is selected, and return is performed. To do. If it is determined in step S14 that Eb is not less than r × Ef + (1−p × r) × Ti or less than p × Ef, the process proceeds to step S16, and bidirectional predictive coding is selected. To return.
[0193]
On the other hand, if it is determined in step S11 that Df is not 1 or Db is not 2, the process proceeds to step S17, where it is determined whether Df is 2 and Db is 1.
[0194]
When it is determined in step S17 that Df is 2 and Db is 1, the process proceeds to step S18, and inter-coding is selected as described below with reference to FIG.
[0195]
That is, in step S18, it is determined whether Eb is larger than t × Ef + (1−s × t) × Ti and larger than s × Ef. If it is determined in step S18 that Eb is greater than t × Ef + (1−s × t) × Ti and greater than s × Ef, the process proceeds to step S19, and forward prediction encoding is selected and the process returns. . If it is determined in step S18 that Eb is not greater than t × Ef + (1−s × t) × Ti or greater than s × Ef, the process proceeds to step S20, where Eb is u × Ef +. It is determined whether it is less than (1−s × u) × Ti and less than s × Ef.
[0196]
In step S20, when it is determined that Eb is less than u × Ef + (1−s × u) × Ti and less than s × Ef, the process proceeds to step S21, in which reverse prediction encoding is selected, and return To do. If it is determined in step S20 that Eb is not less than u × Ef + (1−s × u) × Ti or less than s × Ef, the process proceeds to step S22, and bidirectional predictive coding is selected. To return.
[0197]
On the other hand, if it is determined in step S17 that Df is not 2 or Db is not 1, the process proceeds to step S23, and one of the inter-coding is selected as described below with reference to FIG. . That is, in steps S23 to S27, the same processing as in steps S2 to S6 of FIG. 10 is performed, thereby selecting inter-coding.
[0198]
As described above, since the prediction mode is determined corresponding to the SMV representing the complexity of the motion of the image, the encoding efficiency can be improved as compared with the conventional case.
[0199]
That is, when the motion of the image is complicated, it is difficult to select the bi-directional predictive coding mode in consideration of the prediction accuracy and the amount of data necessary for transmission of the motion vector, and vice versa. However, since the bidirectional predictive encoding mode is easily selected, efficient encoding can be performed.
[0200]
In addition to the complexity of the motion of the image, as described above, the prediction mode can be determined in accordance with the speed of the motion of the image, or both of them.
[0201]
In the present embodiment, the complexity of the image motion is expressed by the above-described SMV, but may be expressed by other physical quantities.
[0202]
Furthermore, in the present embodiment, the speed of motion of the image is expressed by the magnitude of the motion vector and the sum of the absolute values of the x and y components, but it is also expressed by other physical quantities. Is also possible.
[0203]
Further, in this embodiment, when making it easy to select the bi-directional predictive coding mode, the selection of inter coding is performed under the conditions described in FIG. By selecting inter coding under the same conditions as shown in FIG. 12, it is possible to easily select the bidirectional predictive coding mode. However, in this case, it is desirable to make the constants a and c larger or the constants b and d smaller than in the case of FIG.
[0204]
According to the simulation conducted by the present inventors, q or t in FIG. 4 is smaller than a or c in FIG. 12, and r or u in FIG. 4 is b or d in FIG. 12, respectively. It has been confirmed that the encoding efficiency is improved when the ratio is larger. Furthermore, it has been confirmed that when the prediction errors Eb and Ef are small, the encoding efficiency is improved by not using the bidirectional predictive encoding mode.
[0205]
【The invention's effect】
  As described above, according to the image encoding device and the image encoding method of the present invention, the forward motion vector, which is the motion vector of the image to be encoded, with respect to the past reference image that precedes in time, and the later in time. A backward motion vector that is a motion vector of the encoding target image with respect to the future reference image to be performed, and based on the prediction residual of the encoding target image with respect to each of the past reference image or the future reference image, Predictive image is determined by determining the prediction mode of the target image to be one of the forward prediction coding mode, the backward prediction coding mode, or the bidirectional prediction coding mode, and performing motion compensation corresponding to the prediction mode. The difference value between the image to be encoded and the predicted image is calculated, the difference value is encoded, and the prediction residual for each of the past reference image or the future reference image is expressed as Ef. Or Eb and α, β, γ, and δ are predetermined constants (where α, β, γ, and δ are real numbers and γ <β), the equation Eb> α × Ef and Eb When> β × Ef + (1−α × β) × δ holds, the prediction mode is determined as the forward prediction encoding mode for generating the prediction image only from the past reference image, and the expression Eb ≦ α × Ef and Eb < When γ × Ef + (1−α × γ) × δ holds, the prediction mode is determined as the backward prediction encoding mode for generating the prediction image only from the future reference image, and the expression γ × Ef + (1−α × γ ) × δ ≦ Eb and Eb ≦ β × Ef + (1−α × β) × δ, the prediction mode is set to the bidirectional predictive coding mode for generating the prediction image from both the past reference image and the future reference image. DecisionHowever, by increasing δ as the size of the forward motion vector or backward motion vector increases, the bi-directional predictive coding mode is less likely to be determined.I did it. Therefore, efficient encoding can be performed based on the motion of the image.
[Brief description of the drawings]
FIG. 1 is a diagram showing a GOP.
FIG. 2 is a diagram showing a GOP.
FIG. 3 is a diagram for explaining that a prediction residual of a B picture varies depending on a distance from an I or P picture.
FIG. 4 is a diagram for explaining a condition for selecting a prediction mode.
FIG. 5 is a diagram illustrating a condition for selecting a prediction mode when the bidirectional predictive coding mode is easily selected.
FIG. 6 is a block diagram illustrating a configuration of an embodiment of an image encoding device to which the present invention has been applied.
FIG. 7 is a block diagram subsequent to FIG. 6;
8 is a diagram for explaining processing of the image encoding device in FIGS. 6 and 7. FIG.
9 is a diagram for explaining processing of the scan converter 5 of FIG. 6; FIG.
10 is a flowchart for explaining processing of a prediction mode determination circuit 21 in FIG. 7;
FIG. 11 is a flowchart for explaining the details of the inter-image distance determination processing in step S9 in FIG.
FIG. 12 is a diagram illustrating a condition for selecting a prediction mode when the bidirectional predictive coding mode is easily selected.
FIG. 13 is a diagram for explaining motion compensation predictive coding.
FIG. 14 is a diagram showing a GOP.
FIG. 15 is a diagram for explaining MPEG encoding;
FIG. 16 is a diagram illustrating a condition for selecting a prediction mode.
FIG. 17 is a diagram showing a GOP.
FIG. 18 is a diagram illustrating a condition for selecting a prediction mode.
[Explanation of symbols]
3 image encoding type designation circuit, 4 image encoding reordering circuit, 5 scan converter, 6 motion vector estimation circuit, 7 storage unit, 7A past reference image storage unit, 7B current image storage unit, 7C future reference image storage unit, 8 motion amount calculation circuit, 9 counter, 10 inter-image distance generation calculation circuit, 11 operation unit, 11A to 11C operation unit, 12 DCT circuit, 13 quantization circuit, 14 transmission buffer, 15 variable length encoding circuit, 16 inverse quantum Circuit, 17 IDCT circuit, 18 arithmetic unit, 19 frame memory, 19A future reference image storage circuit, 19B past reference image storage circuit, 20 motion compensation circuit, 21 prediction mode determination circuit, 31 recording medium, 32 transmission path

Claims (2)

時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとを検出する動きベクトル検出手段と、
前記過去参照画像または未来参照画像それぞれに対する、符号化対象の画像の予測残差に基づいて、符号化対象の画像の予測モードを順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのいずれかに決定する予測モード決定手段と、
前記予測モードに対応する動き補償を行うことにより、予測画像を生成する動き補償手段と、
符号化対象の画像と、前記予測画像との差分値を演算する差分値演算手段と、
前記差分値を符号化する符号化手段とを備え、
前記予測モード決定手段は、
前記過去参照画像または未来参照画像それぞれに対する予測残差をEfまたはEbとするとともに、α,β,γ,δを所定の定数とする場合において(但し、α,β,γ,δは実数であり、γ<β)、
式Eb>α×EfかつEb>β×Ef+(1−α×β)×δが成り立つとき、前記過去参照画像のみから予測画像を生成する順方向予測符号化モードに、前記予測モードを決定し、
式Eb≦α×EfかつEb<γ×Ef+(1−α×γ)×δが成り立つとき、前記未来参照画像のみから予測画像を生成する逆方向予測符号化モードに、前記予測モードを決定し、
式γ×Ef+(1−α×γ)×δ≦EbかつEb≦β×Ef+(1−α×β)×δが成り立つとき、前記過去参照画像および未来参照画像の両方から予測画像を生成する双方向予測符号化モードに、前記予測モードを決定し、
前記順方向動きベクトルまたは逆方向動きベクトルの大きさが大きいほどに前記δを大きくすることで、前記双方向予測符号化モードが決定されにくくする
ことを特徴とする画像符号化装置。
The forward motion vector that is the motion vector of the image to be encoded with respect to the past reference image that precedes in time, and the backward motion that is the motion vector of the image to be encoded with respect to the future reference image that follows in time. Motion vector detecting means for detecting a vector;
Based on the prediction residual of the encoding target image for each of the past reference image or the future reference image, the prediction mode of the encoding target image is set to the forward predictive encoding mode, the reverse predictive encoding mode, or bidirectional. A prediction mode determining means for determining one of the prediction encoding modes;
Motion compensation means for generating a predicted image by performing motion compensation corresponding to the prediction mode;
Difference value calculating means for calculating a difference value between the image to be encoded and the predicted image;
Encoding means for encoding the difference value,
The prediction mode determination means includes
When the prediction residual for each of the past reference image or the future reference image is Ef or Eb and α, β, γ, and δ are predetermined constants (provided that α, β, γ, and δ are real numbers) , Γ <β),
When the equation Eb> α × Ef and Eb> β × Ef + (1−α × β) × δ holds, the prediction mode is determined as a forward prediction encoding mode for generating a prediction image only from the past reference image. ,
When the equation Eb ≦ α × Ef and Eb <γ × Ef + (1−α × γ) × δ holds, the prediction mode is determined as a backward prediction encoding mode for generating a prediction image only from the future reference image. ,
When the expressions γ × Ef + (1−α × γ) × δ ≦ Eb and Eb ≦ β × Ef + (1−α × β) × δ hold, a predicted image is generated from both the past reference image and the future reference image. Determining the prediction mode to the bi-directional predictive coding mode ;
The image coding apparatus according to claim 1, wherein the bidirectional predictive coding mode is hardly determined by increasing the δ as the size of the forward motion vector or the backward motion vector increases .
時間的に先行する過去参照画像に対する、符号化対象の画像の動きベクトルである順方向動きベクトルと、時間的に後行する未来参照画像に対する、符号化対象の画像の動きベクトルである逆方向動きベクトルとを検出し、前記過去参照画像または未来参照画像それぞれに対する、符号化対象の画像の予測残差に基づいて、符号化対象の画像の予測モードを順方向予測符号化モード、逆方向予測符号化モード、または双方向予測符号化モードのいずれかに決定し、
前記予測モードに対応する動き補償を行うことにより、予測画像を生成し、
符号化対象の画像と、前記予測画像との差分値を演算し、
前記差分値を符号化し、
前記過去参照画像または未来参照画像それぞれに対する予測残差をEfまたはEbとするとともに、α,β,γ,δを所定の定数とする場合において(但し、α,β,γ,δは実数であり、γ<β)、
式Eb>α×EfかつEb>β×Ef+(1−α×β)×δが成り立つとき、前記過去参照画像のみから予測画像を生成する順方向予測符号化モードに、前記予測モードを決定し、
式Eb≦α×EfかつEb<γ×Ef+(1−α×γ)×δが成り立つとき、前記未来参照画像のみから予測画像を生成する逆方向予測符号化モードに、前記予測モードを決定し、
式γ×Ef+(1−α×γ)×δ≦EbかつEb≦β×Ef+(1−α×β)×δが成り立つとき、前記過去参照画像および未来参照画像の両方から予測画像を生成する双方向予測符号化モードに、前記予測モードを決定し、
前記順方向動きベクトルまたは逆方向動きベクトルの大きさが大きいほどに前記δを大 きくすることで、前記双方向予測符号化モードが決定されにくくする
ことを特徴とする画像符号化方法。
The forward motion vector that is the motion vector of the image to be encoded with respect to the past reference image that precedes in time, and the backward motion that is the motion vector of the image to be encoded with respect to the future reference image that follows in time. Detecting a vector, and for each of the past reference image or the future reference image, the prediction mode of the encoding target image is determined based on the prediction residual of the encoding target image. Or either bi-predictive coding mode,
By performing motion compensation corresponding to the prediction mode, a prediction image is generated,
A difference value between the image to be encoded and the predicted image is calculated,
Encoding the difference value;
When the prediction residual for each of the past reference image or the future reference image is Ef or Eb and α, β, γ, and δ are predetermined constants (provided that α, β, γ, and δ are real numbers) , Γ <β),
When the equation Eb> α × Ef and Eb> β × Ef + (1−α × β) × δ holds, the prediction mode is determined as a forward prediction encoding mode for generating a prediction image only from the past reference image. ,
When the equation Eb ≦ α × Ef and Eb <γ × Ef + (1−α × γ) × δ holds, the prediction mode is determined as a backward prediction encoding mode for generating a prediction image only from the future reference image. ,
When the expressions γ × Ef + (1−α × γ) × δ ≦ Eb and Eb ≦ β × Ef + (1−α × β) × δ hold, a predicted image is generated from both the past reference image and the future reference image. Determining the prediction mode to the bi-directional predictive coding mode ;
The forward movement of the the larger the magnitude of the vector or a backward motion vector δ By greatly, image coding method, characterized in that the bidirectional predictive coding mode is difficult to be determined.
JP29534296A 1996-11-07 1996-11-07 Image coding apparatus and image coding method Expired - Fee Related JP3700801B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29534296A JP3700801B2 (en) 1996-11-07 1996-11-07 Image coding apparatus and image coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29534296A JP3700801B2 (en) 1996-11-07 1996-11-07 Image coding apparatus and image coding method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2004257773A Division JP4061505B2 (en) 2004-09-03 2004-09-03 Image coding apparatus and method

Publications (2)

Publication Number Publication Date
JPH10145792A JPH10145792A (en) 1998-05-29
JP3700801B2 true JP3700801B2 (en) 2005-09-28

Family

ID=17819380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29534296A Expired - Fee Related JP3700801B2 (en) 1996-11-07 1996-11-07 Image coding apparatus and image coding method

Country Status (1)

Country Link
JP (1) JP3700801B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3898606B2 (en) 2002-09-12 2007-03-28 株式会社東芝 Motion vector detection method and apparatus, and frame interpolation image creation method and apparatus
EP1874059A4 (en) 2005-03-22 2011-05-04 Panasonic Corp Encoding device and dynamic image recording system using the encoding device
KR102070431B1 (en) 2012-01-19 2020-01-28 삼성전자주식회사 Method and apparatus for encoding video with restricting bi-directional prediction and block merging, method and apparatus for decoding video

Also Published As

Publication number Publication date
JPH10145792A (en) 1998-05-29

Similar Documents

Publication Publication Date Title
KR100393123B1 (en) Image sequence coding method and decoding method
EP1096800B1 (en) Image coding apparatus and image decoding apparatus
JP2699703B2 (en) Motion compensation prediction method and image signal encoding method using the same
KR100658181B1 (en) Video decoding method and apparatus
JP2801559B2 (en) Motion compensation coding method and apparatus adapted to the magnitude of motion
US6415055B1 (en) Moving image encoding method and apparatus, and moving image decoding method and apparatus
JPH09154137A (en) Method and apparatus for compressing video information usingmovement-dependent estimation
JPH09224254A (en) Device and method for estimating motion
EP0734176A2 (en) Motion compensation apparatus for use in a video encoding system
JP3240024B2 (en) Image processing method
JP3700801B2 (en) Image coding apparatus and image coding method
JP2998741B2 (en) Moving picture encoding method, computer-readable recording medium on which the method is recorded, and moving picture encoding apparatus
JP4061505B2 (en) Image coding apparatus and method
KR100240620B1 (en) Method and apparatus to form symmetric search windows for bidirectional half pel motion estimation
JPH0698311A (en) High efficiency coding and decoding device for picture signal
JP2001251628A (en) Coder for dissolve picture
JP3862479B2 (en) How to prevent drift errors in video downconversion
JPH06105299A (en) Dynamic image compressor
JP3237029B2 (en) Video compression device
JP3092612B2 (en) Moving picture decoding method and moving picture decoding apparatus
JP3092611B2 (en) Moving picture coding method and moving picture coding apparatus
JP2001128185A (en) Recording medium
JPH11317956A (en) Photographing camera, broadcasting receiver, reproduction device and computer system
JP2001148860A (en) Coding method, encoder, and computer-readable recording medium
JPH11317957A (en) Moving picture encoding and decoding method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040705

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040903

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041028

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050601

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050706

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

Free format text: PAYMENT UNTIL: 20080722

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090722

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees