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

Image coding apparatus and image coding method Download PDF

Info

Publication number
JP3617652B2
JP3617652B2 JP18796094A JP18796094A JP3617652B2 JP 3617652 B2 JP3617652 B2 JP 3617652B2 JP 18796094 A JP18796094 A JP 18796094A JP 18796094 A JP18796094 A JP 18796094A JP 3617652 B2 JP3617652 B2 JP 3617652B2
Authority
JP
Japan
Prior art keywords
encoding
image
inter
scene change
frame
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
JP18796094A
Other languages
Japanese (ja)
Other versions
JPH0856361A (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 JP18796094A priority Critical patent/JP3617652B2/en
Publication of JPH0856361A publication Critical patent/JPH0856361A/en
Application granted granted Critical
Publication of JP3617652B2 publication Critical patent/JP3617652B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/87Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving scene cut or scene change detection in combination with video compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/142Detection of scene cut or scene change
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/179Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a scene or a shot

Description

【0001】
【産業上の利用分野】
本発明は、例えば画像を圧縮符号化して伝送したり、あるいは記録媒体に記録したりする場合などに用いて好適な画像符号化装置、並びに画像符号化方法に関する。
【0002】
【従来の技術】
従来、例えば動画像などの画像信号を遠隔地に伝送したり、あるいは記録媒体に記録する場合などにおいては、伝送路や記録媒体を効率良く利用するために、画像信号を、そのライン相関やフレーム間相関を利用して圧縮符号化するようになされている。
【0003】
ライン相関を利用した場合には、画像信号を、例えばDCT(離散コサイン変換)処理などの直交変換処理することによって圧縮することができる。
【0004】
また、フレーム間相関を利用した場合には、画像信号をさらに圧縮することが可能となる。即ち、例えば時刻t1,t2(但し、例えばt1<t2で、t2−t1がフレーム周期に等しいとする)において、フレーム画像PC1,PC2がそれぞれ発生しているとき、フレーム画像PC1に対するPC2の差(画素値の差)を演算して、差分画像PC12を生成する。そして、この差分画像PC12を、フレーム画像PC2の代わりに符号化する。
【0005】
通常、時間的に隣接する(または近接する)フレーム画像は、それ程大きな変化を有していないため、フレーム画像PC1とPC2との差(PC2−PC1)(例えば、エネルギ総和の差や、振幅値の絶対値和の差、あるいはエントロピーの差など)を演算すると、その結果得られる差分画像PC12の信号は、フレーム画像PC2に比較して、そのエネルギ総和や、振幅値の絶対値和、あるいはエントロピーなどが、通常小さな値になる。そこで、フレーム画像PC2の代わりに差分画像PC12を符号化(エントロピー符号化)することにより、フレーム画像PC2そのものを符号化する場合より、発生符号量(発生ビット量)を低減することができる。
【0006】
以上のようにして符号化された差分画像PC12は、復号側において、フレーム画像PC1を用いて、フレーム画像PC2に復号される。
【0007】
いま、符号化対象の画像(上述した場合においては、フレーム画像PC2)を原画像と、この原画像と対比される画像(原画像との差分が演算される画像)(上述した場合においては、フレーム画像PC1)を参照画像と、それぞれいうとすると、原画像を符号化する代わりに、その原画像と参照画像との差分を符号化(本明細書中において、適宜、インター符号化という)する場合には、上述したように発生符号量を低減することができるが、長期間にわたってインター符号化を行うと、その復号画像のS/Nは徐々に劣化していく。
【0008】
そこで、通常は、原画像を、参照画像を用いてインター符号化するだけでなく、例えば周期的に、原画像そのものを符号化(本明細書中において、適宜、イントラ符号化という)するようにし、このイントラ符号化したものを参照画像として、インター符号化およびインター符号化されたものの復号を行うようにすることにより、インター符号化により生じて重畳されていくエラー(雑音)を、いわばリフレッシュし、画像のS/Nの長期的な劣化を防止するようになされている。
【0009】
また、画像信号を符号化して記録媒体に記録しておいたものを復号、再生する装置においては、まず参照画像が復号され、上述したようにこの参照画像を用いて、インター符号化された原画像が復号される。従って、記録媒体に、画像信号をインター符号化したものが長期間にわたって記録されていると、例えば倍速再生などの特殊再生を行うことが困難になるので、記録媒体には、やはり画像信号を、周期的にイントラ符号化したものが記録されるようになされている。
【0010】
以下、イントラ符号化されるべき画像のフレームをイントラフレームと、インター符号化されるべき画像のフレームを、インターフレームという。
【0011】
従来においては、符号化する画像信号のフレームが、イントラフレームまたはインターフレームのいずれかとされ、この場合、イントラフレームは、例えば、数インターフレームに1回の割合で出現するように、周期的に挿入される(イントラフレームから見れば、インターフレームが、1つのイントラフレームに対し、数回の割合で、周期的に出現していることになる)。
【0012】
通常、インターフレームに比べ、イントラフレームの発生符号量の方が多いので、イントラフレームとインターフレームとが出現する割合は、例えば符号化により発生する符号量の低減と、画像のS/Nの劣化などとをバランスさせるように決定される。
【0013】
なお、インター符号化には、原画像より、時間的に先行する画像(例えば、原画像の1フレームや2フレーム前などの画像フレーム)(以下、適宜、前方予測画像という)、時間的に後行する画像(例えば、原画像の1フレームや2フレーム後などの画像フレーム)(以下、適宜、後方予測画像という)、またはその両方の画像を、参照画像とするものがあり、それぞれの参照画像を用いるインター符号化を、以下、適宜、前方予測符号化、後方予測符号化、または両方向予測符号化という(両方向予測符号化の場合には、前方予測画像と後方予測画像との、例えば平均値などが、参照画像として用いられる)。
【0014】
また、イントラフレームとされたものは、必ずイントラ符号化されるが、インターフレームは、前方予測符号化およびイントラ符号化のうちのいずれかで符号化される(以下、このように符号化されるものを、適宜、Pピクチャの画像という)場合と、前方予測符号化、後方予測符号化、両方向予測符号化、およびイントラ符号化のうちのいずれかで符号化される(以下、このように符号化されるものを、適宜、Bピクチャの画像という)場合がある。即ち、インターフレームとされた画像は、通常、さらにPおよびBピクチャの画像のうちのいずれかに割り当てられる。
【0015】
Pピクチャの画像が、前方予測符号化およびイントラ符号化のうちのいずれで符号化されるかは、例えばそのPピクチャの画像と参照画像である前方予測画像との差分(画素値の差分)の絶対値和A、およびPピクチャの画像(画像の画素値)の絶対値和Bの大小関係に基づいて決定される(例えば、AがBより小さい場合は前方予測符号化で、またBがAより小さい場合はイントラ符号化で符号化される)。
【0016】
また、Bピクチャの画像が、前方予測符号化、後方予測符号化、両方向予測符号化、およびイントラ符号化のうちのいずれで符号化されるかは、例えばそのBピクチャの画像と参照画像である前方予測画像または後方予測画像それぞれとの差分の絶対値和、およびBピクチャの画像の絶対値和の大小関係に基づいて決定される。
【0017】
【発明が解決しようとする課題】
ところで、イントラフレームおよびインターフレームを、上述したフレーム/ライン相関を利用することにより、例えばDCT処理する場合には、その結果得られるDCT係数は、通常、さらに量子化されて可変長符号化処理され、例えば伝送路や記録媒体に出力される。
【0018】
一般的に、伝送路や記録媒体には、所定の一定のレートで、データを出力する必要があるから、符号化されたデータは、一時、バッファなどに蓄積され、そのバッファから所定の一定のレートで出力される。
【0019】
従来においては、このようなバッファのオーバーフローやアンダーフローを防止するために、バッファに蓄積されているデータ量に対応して、上述したDCT係数を量子化する量子化ステップが設定されるようになされている。即ち、バッファがオーバーフローまたはアンダーフローしそうな場合には、量子化ステップが、それぞれ粗くまたは細かくされ、発生符号量が少なくまたは多くなるようになされている。
【0020】
一方、インターフレームを符号化した場合には、通常、発生符号量が少なくなるが、インターフレームで、シーンチェンジが生じていると(以下、シーンチェンジが生じているインターフレームを、シーンチェンジフレームという)、そのフレームと、その参照画像である前方予測画像または後方予測画像との相関がほとんどなくなる。このため、シーンチェンジフレーム(あるいは、その付近のインターフレーム)をインター符号化しても、その発生符号量は、イントラフレームと同じ程度に多くなる。
【0021】
また、インターフレームは、その参照画像となるべきイントラフレームの符号化後に符号化される。従って、イントラフレームの符号化後にインター符号化されるインターフレームにシーンチェンジが生じている場合、イントラフレームの符号化により多くの符号化データが発生し、さらにシーンチェンジフレーム(あるいは、その付近のインターフレーム)の符号化により多くの符号化データが発生する。
【0022】
即ち、この場合、局所的に発生符号量が急増する。これにより、上述したバッファの蓄積量も急増し、そのオーバーフローを防止するため、量子化ステップが粗くされる。
【0023】
従って、この場合、量子化による量子化雑音が大きくなり、画像の画質(復号画像のS/N)が劣化する過大があった。
【0024】
本発明は、このような状況に鑑みてなされたものであり、シーンチェンジによる画質の劣化を防止することができるようにするものである。
【0025】
【課題を解決するための手段】
本発明の画像符号化装置は、画像信号を、所定の単位領域ごとに、イントラ符号化またはインター符号化の符号化モードで符号化する符号化手段(例えば、図1に示す圧縮符号化部2など)と、符号化手段における符号化モードを、イントラ符号化またはインター符号化に切り換える切換手段(例えば、図1に示す符号化モード決定回路4と)と、単位領域の画像信号を、所定の時間だけ遅延して符号化手段に供給する遅延手段(例えば、図1に示す遅延回路1)と、遅延手段による前段の画像信号におけるシーンチェンジを、単位領域ごとに検出する検出手段(例えば、図1に示すシーンチェンジ検出回路3など)と、検出手段によるシーンチェンジの検出結果に応じて、切換手段を制御する制御手段(例えば、図1に示すシークエンサ11)とを備え、制御手段は、検出手段によりシーンチェンジが検出されない場合には、符号化手段における符号化モードを、N回に1回の割合でインター符号化からイントラ符号化に切り替えるように切換手段を制御し、また、検出手段によりシーンチェンジが検出された場合には、そのシーンチェンジが検出された後、そのシーンチェンジが検出された単位領域の画像信号が、遅延手段から符号化手段に供給される直前までの間、遅延手段からN回の符号化に対応する時間だけ遅延されて符号化手段に供給される単位領域の画像信号すべてがインター符号化されるように、切換手段を制御することを特徴とする。
【0027】
本発明の画像符号化方法は、画像信号を符号化する符号化モードを、イントラ符号化またはインター符号化に切り換えながら、画像信号を、所定の単位領域ごとに符号化する画像符号化方法であって、単位領域の画像信号を、所定の時間だけ遅延してイントラ符号化またはインター符号化を行い、遅延される以前の画像信号におけるシーンチェンジを、単位領域ごとに検出し、シーンチェンジの検出結果に応じて、シーンチェンジが検出されない場合には、符号化モードを、N回に1回の割合でインター符号化からイントラ符号化に切り替えるようにし、また、シーンチェンジが検出された場合には、そのシーンチェンジが検出された後、そのシーンチェンジが検出された単位領域の画像信号が、遅延されて供給される直前までの間、N回の符号化に対応する時間だけ遅延されて供給される単位領域の画像信号すべてがインター符号化されるようにすることを特徴とする。
【0028】
【作用】
上記構成の画像符号化装置および画像符号化方法においては、符号化モードが、イントラ符号化またはインター符号化に切り換えられながら、画像信号が、所定の単位領域ごとに符号化され、単位領域の画像信号を、所定の時間だけ遅延される。そして、シーンチェンジの検出結果に応じて、シーンチェンジが検出されない場合には、符号化モードを、N回に1回の割合でインター符号化からイントラ符号化に切り替えるようにし、また、シーンチェンジが検出された場合には、そのシーンチェンジが検出された後、そのシーンチェンジが検出された単位領域の画像信号が、遅延されて供給される直前までの間、N回の符号化に対応する時間だけ遅延されて供給される単位領域の画像信号すべてがインター符号化される。従って、シーンチェンジに起因する発生符号量の局所的な増加を低減することができ、その結果画像の画質の劣化を防止することができる。
【0029】
【実施例】
図1は、本発明を適用した画像符号化装置の一実施例の構成を示すブロック図である。例えば、動画像の画像信号(ディジタル信号)は、符号化単位としての、例えばフレーム単位で遅延回路1およびシーンチェンジ検出回路3に順次(表示順に)供給されるようになされている。シーンチェンジ検出回路3は、いま入力されたフレームにシーンチェンジが生じているか否かを検出し、シーンチェンジが生じている場合には、検出信号を符号化モード決定回路4に出力するようになされている。即ち、シーンチェンジ検出回路3は、例えばいま入力されたフレームと、その直前に入力されたフレームとの差分(画素値の差分)の自乗和(差分のエネルギに相当するもの)を算出し、その値が、所定値以上である場合、いま入力されたフレームにシーンチェンジが生じていると判定し、検出信号を符号化モード決定回路4のシークエンサ11に出力するようになされている。
【0030】
遅延回路1は、シーンチェンジ回路3におけるシーンチェンジの検出処理のための時間に加え、符号化単位であるフレーム単位で、所定のフレーム数分に相当する時間だけ、入力される画像信号を遅延し、圧縮符号化部2に出力する(以下、所定のフレーム数分に相当する遅延時間を、すげ替え時間という)。
【0031】
圧縮符号化部2は、例えばMPEGなどの規格に準拠したもので、遅延回路1からの画像信号を、符号化モード決定回路4より出力される符号化モードにしたがい、符号化単位であるフレーム単位で、前述したイントラ符号化またはインター符号化するようになされている。即ち、圧縮符号化部2は、符号化モード決定回路4より出力された符号化モードが、イントラ符号化であった場合には、遅延回路1からの画像信号を、例えばDCT処理して量子化し、さらに可変長符号化するようになされている。そして、その結果得られた符号化データを、内蔵する図示せぬバッファに一時記憶し、所定の一定のレートで、伝送路(通信路)に出力するようになされている。
【0032】
また、圧縮符号化部2は、ローカルデコーダを内蔵し、そのローカルデコーダで、符号化データを、必要に応じてローカルデコードするようになされている。そして、圧縮符号化部2は、ローカルデコードしたデータ(以下、ローカルデコードデータという)を、内蔵する図示せぬフレームメモリに記憶するようになされている。このローカルデコードデータは、遅延回路1からの画像信号を、インター符号化する場合の参照画像として用いられる。
【0033】
さらに、圧縮符号化部2は、符号化モード決定回路4より出力された符号化モードが、インター符号化であった場合には、遅延回路1より出力された画像信号と、その画像信号の参照画像となるべきローカルデコードデータとの差分を演算し、差分データを生成するようにされている。そして、その差分データを、上述した場合と同様に処理し(DCT処理して量子化し、さらに可変長符号化し)、その結果得られた符号化データを、内蔵するバッファに一時記憶して、所定の一定のレートで、伝送路(通信路)に出力するようになされている。
【0034】
なお、圧縮符号化部2では、インター符号化された符号化データも、必要に応じてローカルデコードされ、内蔵するフレームメモリに記憶されるようになされている。
【0035】
また、圧縮符号化部2においては、インター符号化を行う場合、遅延回路1より出力された画像信号から動きベクトルを検出し、その画像信号の参照画像となるべきローカルデコードデータに対し、検出した動きベクトルを用いて動き補償を施すことにより、遅延回路1より出力された画像信号の予測画像信号を生成するようにすることができる。即ち、圧縮符号化部2は、いわゆるMC−DCT(動き補償−離散コサイン変換)による画像符号化を行うものとすることができる。この場合には、遅延回路1より出力された画像信号と、予測画像信号との差分が算出され、差分データが生成される。
【0036】
符号化モード決定回路4は、シークエンサ(シーケンサ)11およびスイッチSWから構成されている。スイッチSWは、シークエンサ11に制御され、圧縮符号化部2に対し、インター符号化またはイントラ符号化を指示する制御信号である符号化モードそれぞれに対応するインターモードまたはイントラモードの制御信号が供給されている端子AまたはBを選択し、圧縮符号化部2に出力するようになされている。
【0037】
シークエンサ11は、通常は、端子Aを選択するように、スイッチSWを制御している。そして、遅延回路1から出力される画像信号の、例えば3フレームに1フレームの割合で、端子Bを選択するように、スイッチSWを制御するようになされている。従って、この場合、符号化モード決定回路4からは、例えば「イントラ符号化(イントラモード)」、「インター符号化(インターモード)」、「インター符号化」、「イントラ符号化」、「インター符号化」、・・・のように、符号化モードが、圧縮符号化部2に出力され、これにより、遅延回路1から出力される画像信号は、圧縮符号化部2で、3フレームに1フレームの割合で周期的にイントラ符号化され、他のフレームはインター符号化されるようになされている(逆に考えれば、遅延回路1から出力される画像信号は、圧縮符号化部2で、3フレームに2フレームの割合で周期的にインター符号化され、残りの1フレームはイントラ符号化されるようになされている)(符号化モード決定回路4により符号化モードが、イントラ符号化またはインター符号化に周期的に切り換えられながら、画像信号の符号化が行われるようになされている)。
【0038】
なお、シークエンサ11によるスイッチの切り換えタイミング、 即ち時系列に入力される画像信号のフレームを、イントラフレームおよびインターフレームのうちのいずれに割り当てるかは、上述したパターンに限られるものではない。
【0039】
但し、シークエンサ11は、シーンチェンジ検出回路3から検出信号を受信した場合には、その受信後、上述した遅延回路1における遅延時間のうちのすげ替え時間だけ経過するまでは、端子Aを選択し続けるように、スイッチSWを制御するようになされている。
【0040】
従って、シークエンサ11で、シーンチェンジ検出回路3から検出信号が受信された場合には、その受信後、すげ替え時間だけ経過するまでの間は、符号化モード決定回路4から圧縮符号化部2へは、「インター符号化」の符号化モードが連続して出力され、これにより、この間に、遅延回路1から出力される画像信号のフレームは、すべてインターフレームに割り当てられる。よって、この間は、圧縮符号化部2では、遅延回路1からの画像信号が、インター符号化され続けることになる。
【0041】
次に、図2のタイミングチャートを参照して、その動作について説明する。なお、ここでは、説明を簡単にするために、画像信号のうちの、インター符号化されるように割り当てられるフレーム、即ちインターフレームには、Bピクチャの画像とされるものはなく、Pピクチャの画像とされるもののみとする。即ち、画像信号の表示順序と、その符号化順序とは、同一であるとする。
【0042】
符号化される画像信号は、圧縮符号化部2における符号化単位であるフレーム単位で、図2(a)に示すフレームパルス(画像信号の垂直同期信号に相当するもの)に同期して、遅延回路1およびシーンチェンジ検出回路3に入力される(図2(b))。遅延回路1では、入力された画像信号が、シーンチェンジ回路3におけるシーンチェンジの検出処理のための時間に加え、すげ替え時間(図2においては、3フレームに相当する時間にしてある)だけ遅延され、圧縮符号化部2に出力される(図2(d))(但し、シーンチェンジの検出処理のための時間は、すげ替え時間に比較して充分小さいので、図2では、シーンチェンジの検出処理のための時間に対応する遅延時間を無視してある。また、以下においても、この遅延時間はないものとして説明する)。
【0043】
一方、シーンチェンジ検出回路3では、いま入力されたフレームにシーンチェンジが生じているか否かが、上述したようにして判定される。シーンチェンジ検出回路3で、いま入力されたフレームにシーンチェンジが生じていないと判定された場合、検出信号(図2(c))は、シークエンサ11に対して出力されず(Lレベルがシークエンサ11に出力され)、従ってシークエンサ11では、上述したように、通常は端子Aを選択しているスイッチSWが、遅延回路1から出力される画像信号の、3フレームに1フレームの割合で、端子Bを選択するように制御される。
【0044】
これにより、符号化モード決定回路4からは、・・・、「インター符号化」、「イントラ符号化」、「インター符号化」、「インター符号化」、「イントラ符号化」、「インター符号化」、・・・というように、符号化モードが、圧縮符号化部2に出力される(図2(e))。
【0045】
従って、この場合、圧縮符号化部2では、符号化モード決定回路4からの符号化モードにしたがい、従来の場合と同様に、遅延回路1からの画像信号(図2(c))の符号化が、上述したようにして行われる。即ち、符号化モード決定回路4から出力される、いわばあらかじめ割り当てられたシークエンス(sequence)の符号化モードでの符号化が行われる。
【0046】
一方、シーンチェンジ検出回路3で、いま入力されたフレームにシーンチェンジが生じていると判定された場合、そのフレーム、即ちシーンチェンジフレーム(図2において、影を付して示す部分)の次のフレームの画像信号が入力されるタイミングで、検出信号が、シークエンサ11に対して出力される(Hレベルが出力される)(図2(c))。
【0047】
シークエンサ11は、シーンチェンジ検出回路3から検出信号を受信すると、それから、遅延回路1における遅延時間のうちのすげ替え時間だけ経過するまでは、端子Aを選択するように、スイッチSWを制御する。これにより、シーンチェンジフレームが、遅延回路1に入力された後、そこで、すげ替え時間だけ遅延されて圧縮符号化部2へ出力されるまでの間は、符号化モード決定回路4から圧縮符号化部2へは、「インター符号化」の符号化モードが連続して出力される。
【0048】
従って、シーンチェンジフレームが、遅延回路1に入力された後、そのシーンチェンジフレームが、すげ替え時間だけ遅延されて出力されるまでに、遅延回路1から出力されるフレーム、即ちシーンチェンジフレームよりすげ替え時間だけ先行するフレームから、シーンチェンジフレームの直前のフレームまでの符号化モードは、すべてインター符号化にされる(図2(f))。
【0049】
即ち、遅延回路1より出力された画像信号(図2(d))に、あらかじめ割り当てられたシークエンス(Sequence)の符号化モードが、例えば図2(e)に示すようであったとすると、それは図2(f)に示すように変更される。
【0050】
以上のようにして、符号化モード決定回路4では、シーンチェンジフレームより時間的に、すげ替え時間だけ先行するフレームすべてがインター符号化されるように、圧縮符号化部2における符号化モードが制御され、これにより圧縮符号化部2では、符号化モード決定回路4から出力される符号化モードにしたがい、シークエンサ11で検出信号が受信された後、すげ替え時間だけ経過するまでの間は、遅延回路1から出力される画像信号が、インター符号化され続ける。
【0051】
以上から、イントラフレームの符号化後にインター符号化されるインターフレームにシーンチェンジが生じている場合には、そのシーンチェンジフレームよりすげ替え時間だけ時間的に先行する範囲にあるイントラフレームは、インターフレームとしてインター符号化されることになる。
【0052】
従って、シーンチェンジフレーム(あるいは、その付近のインターフレーム)を符号化するときには、前述したように多くの符号化データが発生するが、それよりすげ替え時間だけ時間的に先行する範囲にあるイントラフレームが、インター符号化されるので、それが、本来の符号化モードであるイントラ符号化で符号化される場合に比較して、その発生符号量は少なくなり、その結果、局所的に発生符号量が急増することを防止することができる。
【0053】
これにより、圧縮符号化部2が内蔵する、符号化データを一時記憶するバッファの蓄積量が急増することがほとんどなくなり、そのオーバーフローを防止することができる(オーバーフローの確率を低減することができる)。さらに、その結果、圧縮符号化部2における量子化ステップが、極端に粗くされることを防止することができる。
【0054】
その後、シーンチェンジフレームが、遅延回路1から圧縮符号化部2に出力されると(図2(d))、シークエンサ11は、スイッチSWの制御を元に戻し、これにより、符号化モード決定回路4からは、あらかじめ割り当てられたシークエンス(Sequence)の符号化モードが、再び出力されるようになる(図2(e))。
【0055】
圧縮符号化部2で符号化されたデータは、その内蔵するバッファに一時記憶され、伝送路を介して、一定の伝送レートで、例えば図示せぬ画像復号化装置に伝送される。
【0056】
上述したように、圧縮符号化部2における量子化ステップは、極端に粗くされないので、画像復号化装置における復号の結果得られる復号画像は、従来に比較して、画質の向上したものとなる。
【0057】
なお、本実施例においては、圧縮符号化部2をMPEGに準拠したものとしたが、これに限られるものではない。
【0058】
また、シーンチェンジ検出回路3における画像信号の検出方法も、本実施例で説明した方法に限定されるものではない。
【0059】
さらに、本実施例では、すげ替え時間の設定方法について言及しなかったが、すげ替え時間は、例えば伝送路(通信路)の容量(伝送レート)や、装置に入力される画像信号の情報量などに基づいて設定するようにすることができる。
【0060】
即ち、すげ替え時間を長くするほど、シーンチェンジフレームから、より時間的に先行するイントラフレームをインター符号化することができ、これにより発生符号量を、より低減することができるようになる。一方、伝送路の容量が大きいまたは小さい場合には、圧縮符号化部2が内蔵するバッファのオーバーフローする確率は、それぞれ小さくまたは大きくなる。従って、伝送路の容量が大きいまたは小さい場合には、すげ替え時間は、それぞれ小さなまたは大きな値に設定するようにすれば良い。また、装置に入力される画像信号の情報量が多いまたは少ない場合には、圧縮符号化部2における符号化により得られる符号量は、それぞれ大きくまたは小さくなる。従って、装置に入力される画像信号の情報量が多いまたは少ない場合には、すげ替え時間は、それぞれ大きなまたは小さな値に設定するようにすれば良い。
【0061】
但し、すげ替え時間を長くしすぎると、即ち長期間にわたって、インター符号化を行うようにすると、前述したように、復号画像の画質の劣化などの問題が生じるので、これも考慮して、すげ替え時間の長さを決めるようにする必要がある。
【0062】
さらに、本実施例では、符号化単位を、フレーム単位としたが、これに限られるものではない。即ち、符号化単位は、例えばいわゆるマクロブロック単位や、1フレームまたは1フィールドの画像信号を、8画素×8画素のブロックに分割したブロック単位などとすることができる。
【0063】
また、本実施例においては、説明を簡単にするために、画像信号のうちの、インター符号化されるように割り当てられるフレーム、即ちインターフレームには、Bピクチャの画像とされるものはなく、Pピクチャの画像とされるもののみとしたが、本発明は、インターフレームに、PおよびBピクチャの画像の両方が出現する画像信号にも適用することができる。但し、Bピクチャの画像の符号化にあたっては、前述したように、それより時間的に後行するフレーム(このフレームをローカルデコードしたもの)を用いる場合があるので、圧縮符号化部2に入力するフレームの順番を入れ換える必要がある。
【0064】
即ち、いま、イントラフレームをIピクチャの画像というものとし、装置に、I,P,Bピクチャの割り当てがなされた画像信号が、例えば・・・,B1,I2,B3,B4,P5,B6,B7,P8,・・・(但し、I,P,Bに付した数字は、装置への入力順序、即ち表示順序を示す)のような順番で入力された場合には、圧縮符号化部2に、例えば・・・,I2,B1,P5,B3,B4,P8,B6,B7,・・・の順番で、画像信号を入力するようにする必要がある(例えば、B1は、時間的に後行するI2を用いて符号化される(符号化される場合がある)ので、I2より時間的に先行しているが、それより後に符号化せざるを得ない。また、例えば、B3,B4は、時間的に後行するP5を用いて符号化される(符号化される場合がある)ので、P5より時間的に先行しているが、よれより後に符号化せざるを得ない)。
【0065】
この場合、インターフレームである、例えばP5が、シーンチェンジフレームであったときには、発生符号量が、シーンチェンジフレームであるP5の符号化によって増加するが、上述したように、P5より時間的に先行し、さらに符号化順序も先行しているイントラフレームI2がインター符号化されるので、局所的な発生符号量の急増を防止することができる。
【0066】
また、インターフレームである、例えばB3が、シーンチェンジフレームであったときには、発生符号量は、シーンチェンジフレームであるB3の符号化によって増加するのではなく、B3より時間的に後行しているが、符号化順序が先行しているP5の符号化によって増加する。しかしながら、図1の装置によれば、I2は、符号化順序からすれば、B3から離れ、その3つ前に位置するようになるが、時間順(表示順序)では、B3の直前に位置するので、上述したようにインター符号化される。従って、この場合には、I2の2つ後に、多くの符号化データが発生するP5が符号化されるが、局所的な発生符号量の急増は避けることができる。
【0067】
なお、I2は、符号化順序からすれば、B1に先行するが、時間順(表示順序)は、B1に後行するので、B1がシーンチェンジフレームであっても、I2は、インター符号化されず、従来の場合と同様にイントラ符号化される。即ち、この場合は、B1より、すげ替え時間だけ時間的に先行する範囲にあるイントラフレームがインター符号化され、これによりシーンチェンジフレームに起因する局所的な発生符号量の増加が防止される。
【0068】
【発明の効果】
以上の如く、本発明によれば、シーンチェンジに起因する発生符号量の急激な増加を防止することができ、その結果画像の画質の劣化を防止することができる。
【図面の簡単な説明】
【図1】本発明を適用した画像符号化装置の一実施例の構成を示すブロック図である。
【図2】図1の実施例の動作を説明するタイミングチャートである。
【符号の説明】
1 遅延回路
2 圧縮符号化部
3 シーンチェンジ検出回路
4 符号化モード決定回路
11 シークエンサ
[0001]
[Industrial application fields]
The present invention relates to an image encoding apparatus and an image encoding method suitable for use when, for example, an image is transmitted after being compressed and encoded, or recorded on a recording medium.
[0002]
[Prior art]
Conventionally, when an image signal such as a moving image is transmitted to a remote place or recorded on a recording medium, the image signal is converted into its line correlation or frame in order to efficiently use the transmission path or the recording medium. Compression encoding is performed using inter-correlation.
[0003]
When line correlation is used, an image signal can be compressed by performing orthogonal transform processing such as DCT (discrete cosine transform) processing.
[0004]
In addition, when the inter-frame correlation is used, the image signal can be further compressed. That is, for example, when frame images PC1 and PC2 are generated at times t1 and t2 (where t1 <t2 and t2−t1 is equal to the frame period, for example), the difference between PC2 and frame image PC1 ( The difference image PC12 is generated by calculating the difference between the pixel values. Then, the difference image PC12 is encoded instead of the frame image PC2.
[0005]
Normally, frame images adjacent in time (or close to each other) do not have such a large change, so that the difference between the frame images PC1 and PC2 (PC2−PC1) (for example, the difference in energy sum, the amplitude value) The difference image PC12 signal obtained as a result is compared with the frame image PC2, and the energy sum, the absolute value sum of the amplitude values, or the entropy is calculated. Etc. are usually small values. Therefore, by encoding (entropy encoding) the differential image PC12 instead of the frame image PC2, the generated code amount (generated bit amount) can be reduced as compared with the case where the frame image PC2 itself is encoded.
[0006]
The differential image PC12 encoded as described above is decoded into the frame image PC2 using the frame image PC1 on the decoding side.
[0007]
Now, the image to be encoded (the frame image PC2 in the case described above) is compared with the original image and the image to be compared with this original image (the image in which the difference from the original image is calculated) (in the case described above, If the frame image PC1) is referred to as a reference image, the difference between the original image and the reference image is encoded instead of encoding the original image (referred to as inter-coding in this specification as appropriate). In this case, the amount of generated code can be reduced as described above, but when inter coding is performed over a long period, the S / N of the decoded image gradually deteriorates.
[0008]
Therefore, normally, the original image is not only inter-coded using the reference image, but the original image itself is periodically encoded (referred to as intra-coding in this specification as appropriate), for example. By using this intra-coded image as a reference image, inter-encoding and decoding of the inter-encoded image are performed, so that errors (noise) caused by inter-encoding are refreshed. Further, long-term deterioration of the image S / N is prevented.
[0009]
Also, in an apparatus that decodes and reproduces an image signal that has been encoded and recorded on a recording medium, first, a reference image is decoded and, as described above, an inter-coded original is obtained using this reference image. The image is decoded. Accordingly, if the inter-coded image signal is recorded on the recording medium for a long period of time, it becomes difficult to perform special reproduction such as double speed reproduction. What is periodically intra-coded is recorded.
[0010]
Hereinafter, an image frame to be intra-coded is referred to as an intra frame, and an image frame to be inter-coded is referred to as an inter frame.
[0011]
Conventionally, a frame of an image signal to be encoded is either an intra frame or an inter frame. In this case, the intra frame is periodically inserted so as to appear at a rate of once every several inter frames, for example. (From an intra frame, an inter frame appears periodically at a rate of several times with respect to one intra frame).
[0012]
Usually, since the amount of generated code of an intra frame is larger than that of an inter frame, the rate at which an intra frame and an inter frame appear is, for example, a reduction in the amount of code generated by encoding and a deterioration in image S / N. And so on.
[0013]
For inter coding, an image that precedes the original image in time (for example, an image frame such as one frame or two frames before the original image) (hereinafter referred to as a forward prediction image as appropriate), and temporally later. There are images to be executed (for example, image frames such as one frame or two frames after the original image) (hereinafter referred to as a backward prediction image as appropriate) or both images as reference images. Is hereinafter referred to as forward prediction encoding, backward prediction encoding, or bidirectional prediction encoding (in the case of bidirectional prediction encoding, for example, an average value of a forward prediction image and a backward prediction image). Etc. are used as reference images).
[0014]
An intra frame is always intra-coded, but an inter frame is coded by either forward prediction coding or intra coding (hereinafter, coded in this way). The image is appropriately referred to as a P picture image), forward prediction coding, backward prediction coding, bidirectional prediction coding, or intra coding (hereinafter referred to as code) May be referred to as a B picture image). In other words, an inter-frame image is normally assigned to one of P and B picture images.
[0015]
Whether the picture of the P picture is encoded by forward prediction encoding or intra encoding is, for example, the difference between the P picture image and the forward prediction image as the reference image (difference in pixel value). Absolute value sum A P , And the absolute value sum B of P-picture images (image pixel values) P (For example, A P Is B P If it is smaller, forward predictive coding and B P Is A P If it is smaller, it is encoded by intra coding).
[0016]
Also, whether the B picture image is encoded by forward predictive coding, backward predictive coding, bidirectional predictive coding, or intra coding is, for example, the B picture image or the reference image. It is determined based on the magnitude relationship between the sum of absolute values of differences from the forward predicted image or the backward predicted image and the sum of absolute values of B picture images.
[0017]
[Problems to be solved by the invention]
By the way, when the intra-frame and inter-frame are subjected to, for example, DCT processing by using the above-described frame / line correlation, the resulting DCT coefficients are usually further quantized and subjected to variable-length coding processing. For example, it is output to a transmission path or a recording medium.
[0018]
Generally, since it is necessary to output data to a transmission line or a recording medium at a predetermined constant rate, the encoded data is temporarily stored in a buffer or the like, and is stored in the buffer from a predetermined constant rate. Output at rate.
[0019]
Conventionally, in order to prevent such overflow and underflow of the buffer, a quantization step for quantizing the above-described DCT coefficient is set corresponding to the amount of data stored in the buffer. ing. That is, when the buffer is likely to overflow or underflow, the quantization step is made coarse or fine, respectively, so that the generated code amount is reduced or increased.
[0020]
On the other hand, when an inter frame is encoded, the amount of generated code is usually reduced. However, when a scene change occurs in an inter frame (hereinafter, an inter frame in which a scene change has occurred is referred to as a scene change frame). ), There is almost no correlation between the frame and the forward prediction image or the backward prediction image that is the reference image. For this reason, even if a scene change frame (or an interframe in the vicinity thereof) is inter-encoded, the amount of generated code is as large as that of an intra frame.
[0021]
The inter frame is encoded after the intra frame to be the reference image is encoded. Therefore, when a scene change occurs in an inter frame that is inter-coded after intra-frame coding, a large amount of encoded data is generated due to intra-frame coding, and a scene change frame (or an inter- A lot of encoded data is generated by encoding a frame.
[0022]
That is, in this case, the amount of generated codes increases rapidly locally. As a result, the amount of buffer accumulation described above also increases rapidly, and the quantization step is roughened to prevent overflow.
[0023]
Therefore, in this case, quantization noise due to quantization increases, and the image quality (S / N of the decoded image) is excessively deteriorated.
[0024]
The present invention has been made in view of such a situation, and is intended to prevent deterioration in image quality due to a scene change.
[0025]
[Means for Solving the Problems]
The image coding apparatus of the present invention encodes an image signal in a coding mode of intra coding or inter coding for each predetermined unit area (for example, the compression coding unit 2 shown in FIG. 1). Etc.), switching means for switching the encoding mode in the encoding means to intra encoding or inter encoding (for example, the encoding mode determination circuit 4 shown in FIG. 1), A delay unit (for example, the delay circuit 1 shown in FIG. 1) that supplies the image signal of the unit area to the encoding unit after being delayed by a predetermined time, and a preceding stage by the delay unit Detection means (for example, the scene change detection circuit 3 shown in FIG. 1) for detecting a scene change in the image signal for each unit area; Control means (for example, the sequencer 11 shown in FIG. 1) for controlling the switching means according to the detection result of the scene change by the detection means; With The control means controls the switching means to switch the coding mode in the coding means from inter coding to intra coding at a rate of once every N times when no scene change is detected by the detection means, When a scene change is detected by the detection means, after the scene change is detected, until the image signal of the unit area in which the scene change is detected is supplied from the delay means to the encoding means. During this period, the switching means is controlled so that all the image signals of the unit area supplied to the encoding means after being delayed by a time corresponding to N encodings from the delay means are inter-encoded. It is characterized by that.
[0027]
The image encoding method of the present invention is an image encoding method for encoding an image signal for each predetermined unit region while switching the encoding mode for encoding the image signal to intra encoding or inter encoding. And The image signal of the unit area is delayed by a predetermined time and subjected to intra coding or inter coding. Detect scene changes in the image signal for each unit area, If no scene change is detected according to the detection result of the scene change, the encoding mode is switched from inter encoding to intra encoding at a rate of once every N times, and a scene change is detected. In this case, after the scene change is detected, the image signal of the unit area in which the scene change is detected is delayed by a time corresponding to N encodings until immediately before being supplied after being delayed. All the image signals of the supplied unit area are inter-coded. It is characterized by that.
[0028]
[Action]
In the image encoding device and the image encoding method configured as described above, the image signal is encoded for each predetermined unit region while the encoding mode is switched to intra encoding or inter encoding. The image signal of the unit area is delayed by a predetermined time . And If no scene change is detected according to the detection result of the scene change, the encoding mode is switched from inter encoding to intra encoding at a rate of once every N times, and a scene change is detected. In this case, after the scene change is detected, the image signal of the unit area in which the scene change is detected is delayed by a time corresponding to N encodings until immediately before being supplied after being delayed. All the image signals of the unit area supplied in this way are inter-coded. Therefore, it is possible to reduce a local increase in the amount of generated code due to a scene change, and as a result, it is possible to prevent deterioration in image quality.
[0029]
【Example】
FIG. 1 is a block diagram showing a configuration of an embodiment of an image encoding apparatus to which the present invention is applied. For example, an image signal (digital signal) of a moving image is supplied sequentially (in the display order) to the delay circuit 1 and the scene change detection circuit 3 as an encoding unit, for example, in units of frames. The scene change detection circuit 3 detects whether or not a scene change has occurred in the currently input frame, and outputs a detection signal to the encoding mode determination circuit 4 if a scene change has occurred. ing. That is, the scene change detection circuit 3 calculates, for example, the square sum (corresponding to the energy of the difference) of the difference (pixel value difference) between the currently input frame and the frame input immediately before it. If the value is greater than or equal to a predetermined value, it is determined that a scene change has occurred in the currently input frame, and a detection signal is output to the sequencer 11 of the encoding mode determination circuit 4.
[0030]
The delay circuit 1 delays an input image signal by a time corresponding to a predetermined number of frames in a frame unit as an encoding unit in addition to a time for a scene change detection process in the scene change circuit 3. The data is output to the compression encoding unit 2 (hereinafter, a delay time corresponding to a predetermined number of frames is referred to as a replacement time).
[0031]
The compression encoding unit 2 conforms to a standard such as MPEG, for example, and the image signal from the delay circuit 1 is a frame unit that is an encoding unit according to the encoding mode output from the encoding mode determination circuit 4. Thus, the above-described intra coding or inter coding is performed. That is, when the encoding mode output from the encoding mode determination circuit 4 is intra encoding, the compression encoding unit 2 quantizes the image signal from the delay circuit 1 by, for example, DCT processing. Further, variable length encoding is performed. The encoded data obtained as a result is temporarily stored in a built-in buffer (not shown) and output to a transmission path (communication path) at a predetermined constant rate.
[0032]
The compression encoding unit 2 includes a local decoder, and the local decoder performs local decoding of encoded data as necessary. The compression encoding unit 2 stores locally decoded data (hereinafter referred to as local decoded data) in a built-in frame memory (not shown). This local decoded data is used as a reference image when the image signal from the delay circuit 1 is inter-encoded.
[0033]
Further, when the encoding mode output from the encoding mode determination circuit 4 is inter encoding, the compression encoding unit 2 refers to the image signal output from the delay circuit 1 and the image signal. The difference between the local decode data to be an image is calculated and difference data is generated. Then, the difference data is processed in the same manner as described above (DCT processing and quantization, and further variable length encoding), and the encoded data obtained as a result is temporarily stored in a built-in buffer and stored in a predetermined manner. Are output to a transmission path (communication path) at a constant rate.
[0034]
In the compression encoding unit 2, the inter-coded data is also locally decoded as necessary and stored in a built-in frame memory.
[0035]
Further, in the case of performing inter coding, the compression coding unit 2 detects a motion vector from the image signal output from the delay circuit 1 and detects the local decode data to be a reference image of the image signal. By performing motion compensation using the motion vector, a predicted image signal of the image signal output from the delay circuit 1 can be generated. That is, the compression coding unit 2 can perform image coding by so-called MC-DCT (motion compensation-discrete cosine transform). In this case, the difference between the image signal output from the delay circuit 1 and the predicted image signal is calculated, and difference data is generated.
[0036]
The encoding mode determination circuit 4 includes a sequencer (sequencer) 11 and a switch SW. The switch SW is controlled by the sequencer 11, and an inter mode or intra mode control signal corresponding to each encoding mode, which is a control signal instructing inter encoding or intra encoding, is supplied to the compression encoding unit 2. The selected terminal A or B is selected and output to the compression encoding unit 2.
[0037]
The sequencer 11 normally controls the switch SW so as to select the terminal A. The switch SW is controlled so that the terminal B is selected at a rate of, for example, one frame every three frames of the image signal output from the delay circuit 1. Therefore, in this case, the encoding mode determination circuit 4 outputs, for example, “intra coding (intra mode)”, “inter coding (inter mode)”, “inter coding”, “intra coding”, “inter coding”. The encoding mode is output to the compression encoding unit 2 so that the image signal output from the delay circuit 1 is 1 frame in 3 frames by the compression encoding unit 2. In other words, the other frames are inter-encoded (conversely, the image signal output from the delay circuit 1 is 3 by the compression encoder 2. The frames are periodically inter-coded at a rate of two frames, and the remaining one frame is intra-coded (the coding mode is determined by the coding mode decision circuit 4 as an intra code). Reduction or while periodically switched to inter-encoding, the encoding of the image signal is made to be performed).
[0038]
Note that the switching timing of the switch by the sequencer 11, that is, whether the frame of the image signal input in time series is allocated to an intra frame or an inter frame is not limited to the above-described pattern.
[0039]
However, when the sequencer 11 receives the detection signal from the scene change detection circuit 3, the sequencer 11 continues to select the terminal A until the replacement time of the delay time in the delay circuit 1 described above has elapsed after the reception. Thus, the switch SW is controlled.
[0040]
Therefore, when the sequencer 11 receives a detection signal from the scene change detection circuit 3, the encoding mode determination circuit 4 sends the compressed signal to the compression encoding unit 2 until the replacement time elapses after the reception. , The encoding mode of “inter encoding” is continuously output, and during this time, all the frames of the image signal output from the delay circuit 1 are assigned to the inter frame. Therefore, during this time, the compression encoding unit 2 continues to inter-code the image signal from the delay circuit 1.
[0041]
Next, the operation will be described with reference to the timing chart of FIG. Here, for the sake of simplification of description, frames assigned to be inter-coded among image signals, that is, inter-frames, are not used as B picture images. Only those that are considered images. That is, it is assumed that the display order of image signals and the encoding order are the same.
[0042]
The image signal to be encoded is delayed in synchronization with the frame pulse (corresponding to the vertical synchronization signal of the image signal) shown in FIG. 2A in units of frames which are encoding units in the compression encoding unit 2. The signal is input to the circuit 1 and the scene change detection circuit 3 (FIG. 2B). In the delay circuit 1, the input image signal is delayed by the replacement time (in FIG. 2, the time corresponding to 3 frames) in addition to the time for scene change detection processing in the scene change circuit 3. 2 is output to the compression encoding unit 2 (FIG. 2D) (however, since the time for the scene change detection process is sufficiently shorter than the replacement time, the scene change detection process in FIG. The delay time corresponding to the time for the above is ignored, and in the following description, this delay time is assumed to be absent).
[0043]
On the other hand, the scene change detection circuit 3 determines whether or not a scene change has occurred in the input frame as described above. When the scene change detection circuit 3 determines that no scene change has occurred in the frame that has been input, the detection signal (FIG. 2C) is not output to the sequencer 11 (L level is the sequencer 11). Therefore, in the sequencer 11, as described above, the switch SW that normally selects the terminal A is connected to the terminal B at a rate of 1 frame in 3 frames of the image signal output from the delay circuit 1. Is controlled to select.
[0044]
Thereby, from the coding mode determination circuit 4,..., “Inter coding”, “intra coding”, “inter coding”, “inter coding”, “intra coding”, “inter coding” The encoding mode is output to the compression encoding unit 2 (FIG. 2 (e)).
[0045]
Therefore, in this case, the compression encoding unit 2 encodes the image signal (FIG. 2 (c)) from the delay circuit 1 according to the encoding mode from the encoding mode determination circuit 4 as in the conventional case. Is performed as described above. In other words, encoding in the encoding mode of the sequence assigned in advance, which is output from the encoding mode determination circuit 4, is performed.
[0046]
On the other hand, when the scene change detection circuit 3 determines that a scene change has occurred in the currently input frame, the next frame to that frame, that is, the scene change frame (the portion indicated by the shadow in FIG. 2). At the timing when the image signal of the frame is input, the detection signal is output to the sequencer 11 (H level is output) (FIG. 2C).
[0047]
When the sequencer 11 receives the detection signal from the scene change detection circuit 3, the sequencer 11 controls the switch SW to select the terminal A until the replacement time of the delay time in the delay circuit 1 elapses. As a result, after the scene change frame is input to the delay circuit 1, until the scene change frame is delayed by the replacement time and output to the compression encoding unit 2, the encoding mode determination circuit 4 outputs the compression frame to the compression encoding unit. To 2, the encoding mode of “inter encoding” is continuously output.
[0048]
Therefore, after the scene change frame is input to the delay circuit 1, the frame change frame is output from the delay circuit 1, that is, from the scene change frame until the scene change frame is output after being delayed by the replacement time. The encoding modes from the preceding frame to the frame immediately before the scene change frame are all inter-coded (FIG. 2 (f)).
[0049]
That is, if the encoding mode of the sequence (Sequence) assigned in advance to the image signal (FIG. 2 (d)) output from the delay circuit 1 is as shown in FIG. 2 (e), for example, It is changed as shown in 2 (f).
[0050]
As described above, the encoding mode determination circuit 4 controls the encoding mode in the compression encoding unit 2 so that all frames that precede the scene change frame by the replacement time are inter-encoded. Thus, in the compression encoding unit 2, the delay circuit 1 follows the encoding mode output from the encoding mode determination circuit 4 until the replacement time elapses after the detection signal is received by the sequencer 11. The image signal output from is continuously inter-coded.
[0051]
From the above, if a scene change occurs in an inter frame that is inter-coded after intra-frame coding, the intra frame that is in the range that precedes the scene change frame by the replacement time is defined as an inter frame. It will be inter-coded.
[0052]
Therefore, when encoding a scene change frame (or an inter frame in the vicinity thereof), a large amount of encoded data is generated as described above, but an intra frame in a range that precedes in time by the replacement time is generated. Therefore, the amount of generated code is reduced compared to the case where it is encoded by intra encoding, which is the original encoding mode, and as a result, the amount of generated code is locally increased. A sudden increase can be prevented.
[0053]
As a result, the accumulation amount of the buffer that temporarily stores the encoded data included in the compression encoding unit 2 hardly increases, and the overflow can be prevented (the probability of overflow can be reduced). . Further, as a result, it is possible to prevent the quantization step in the compression encoding unit 2 from becoming extremely rough.
[0054]
Thereafter, when the scene change frame is output from the delay circuit 1 to the compression encoding unit 2 (FIG. 2 (d)), the sequencer 11 restores the control of the switch SW, thereby the encoding mode determination circuit. 4, the sequence encoding mode assigned in advance is output again (FIG. 2 (e)).
[0055]
The data encoded by the compression encoding unit 2 is temporarily stored in its built-in buffer, and transmitted to, for example, an image decoding apparatus (not shown) at a constant transmission rate via the transmission path.
[0056]
As described above, since the quantization step in the compression encoding unit 2 is not extremely roughened, the decoded image obtained as a result of decoding in the image decoding apparatus has improved image quality as compared with the conventional case.
[0057]
In the present embodiment, the compression encoding unit 2 conforms to MPEG, but is not limited to this.
[0058]
Further, the image signal detection method in the scene change detection circuit 3 is not limited to the method described in this embodiment.
[0059]
Furthermore, in this embodiment, the method for setting the replacement time was not mentioned, but the replacement time is determined by, for example, the capacity (transmission rate) of the transmission path (communication path), the information amount of the image signal input to the apparatus, or the like. Can be set based on.
[0060]
That is, the longer the replacement time, the more time-sequential intra frames can be inter-encoded from the scene change frame, and the amount of generated code can be further reduced. On the other hand, when the capacity of the transmission path is large or small, the probability of overflow of the buffer built in the compression encoding unit 2 is small or large, respectively. Therefore, when the capacity of the transmission path is large or small, the replacement time may be set to a small value or a large value, respectively. When the amount of information of the image signal input to the apparatus is large or small, the code amount obtained by the encoding in the compression encoding unit 2 is large or small, respectively. Therefore, when the amount of information of the image signal input to the apparatus is large or small, the replacement time may be set to a large or small value.
[0061]
However, if the replacement time is too long, that is, if inter-coding is performed over a long period of time, as described above, problems such as degradation of the image quality of the decoded image occur. It is necessary to decide the length.
[0062]
Furthermore, in this embodiment, the encoding unit is a frame unit, but the present invention is not limited to this. That is, the encoding unit can be, for example, a so-called macroblock unit or a block unit obtained by dividing an image signal of one frame or one field into blocks of 8 pixels × 8 pixels.
[0063]
In the present embodiment, in order to simplify the description, none of the image signals allocated to be inter-coded, i.e., inter frames, are B picture images. Although only an image of a P picture is used, the present invention can be applied to an image signal in which both an image of P and B pictures appear in an inter frame. However, when encoding a B picture image, as described above, there is a case where a temporally subsequent frame (locally decoded frame) may be used, so that it is input to the compression encoding unit 2. It is necessary to change the order of the frames.
[0064]
In other words, an intra frame is now called an I picture image, and image signals to which I, P, and B pictures have been assigned to the device are, for example,..., B1, I2, B3, B4, P5, B6. B7, P8,... (However, the numbers given to I, P, and B indicate the order of input to the apparatus, that is, the display order). For example, it is necessary to input image signals in the order of I2, B1, P5, B3, B4, P8, B6, B7,. Since it is encoded using the following I2 (may be encoded), it precedes I2 in time, but it must be encoded after that. B4 is encoded using P5 that follows in time (encoded Since there is a case), although temporally precedes P5, forced coding later than accordance).
[0065]
In this case, when an inter frame, for example, P5 is a scene change frame, the amount of generated code is increased by the encoding of P5, which is a scene change frame. In addition, since the intra frame I2, which is also preceded by the encoding order, is inter-encoded, it is possible to prevent a local increase in the amount of generated code.
[0066]
When an inter frame, for example, B3 is a scene change frame, the generated code amount is not increased by encoding of B3, which is a scene change frame, but is temporally behind B3. Is increased by encoding P5 preceded by the encoding order. However, according to the apparatus of FIG. 1, I2 moves away from B3 in the coding order and is positioned three times before it, but is positioned immediately before B3 in the time order (display order). Therefore, inter coding is performed as described above. Therefore, in this case, P5 where a large amount of encoded data is generated is encoded after I2, but a sudden increase in the amount of generated codes can be avoided.
[0067]
Note that I2 precedes B1 in terms of encoding order, but the time order (display order) follows B1, so I2 is inter-encoded even if B1 is a scene change frame. Instead, it is intra-coded as in the conventional case. That is, in this case, an intra frame in a range that is temporally ahead of the replacement time by B1 is inter-encoded, thereby preventing a locally generated code amount from being increased due to the scene change frame.
[0068]
【The invention's effect】
As described above, according to the present invention, it is possible to prevent a sudden increase in the amount of generated codes due to a scene change, and as a result, it is possible to prevent image quality deterioration.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of an image encoding apparatus to which the present invention is applied.
FIG. 2 is a timing chart for explaining the operation of the embodiment of FIG. 1;
[Explanation of symbols]
1 Delay circuit
2 Compression encoding unit
3 Scene change detection circuit
4 Coding mode decision circuit
11 Sequencer

Claims (2)

画像信号を、所定の単位領域ごとに、イントラ符号化またはインター符号化の符号化モードで符号化する符号化手段と、
前記符号化手段における符号化モードを、イントラ符号化またはインター符号化に切り換える切換手段と、
前記単位領域の画像信号を、所定の時間だけ遅延して前記符号化手段に供給する遅延手段と、
前記遅延手段による前段の前記画像信号におけるシーンチェンジを、前記単位領域ごとに検出する検出手段と、
前記検出手段によるシーンチェンジの検出結果に応じて、前記切換手段を制御する制御手段と
を備え、
前記制御手段は、前記検出手段によりシーンチェンジが検出されない場合には、前記符号化手段における符号化モードを、N回に1回の割合でインター符号化からイントラ符号化に切り替えるように前記切換手段を制御し、また、前記検出手段によりシーンチェンジが検出された場合には、そのシーンチェンジが検出された後、そのシーンチェンジが検出された前記単位領域の画像信号が、前記遅延手段から前記符号化手段に供給される直前までの間、前記遅延手段から前記N回の符号化に対応する時間だけ遅延されて前記符号化手段に供給される前記単位領域の画像信号すべてがインター符号化されるように、前記切換手段を制御する
ことを特徴とする画像符号化装置。
Encoding means for encoding an image signal for each predetermined unit area in an encoding mode of intra encoding or inter encoding;
Switching means for switching the coding mode in the coding means to intra coding or inter coding;
Delay means for delaying the image signal of the unit area by a predetermined time and supplying it to the encoding means;
Detecting means for detecting, for each unit region, a scene change in the preceding image signal by the delay means ;
Control means for controlling the switching means according to the detection result of the scene change by the detecting means ,
When the scene change is not detected by the detection means, the control means switches the coding mode in the coding means from inter coding to intra coding at a rate of once every N times. And when the scene change is detected by the detection means, after the scene change is detected, the image signal of the unit area where the scene change is detected is sent from the delay means to the code. All the image signals of the unit area supplied to the encoding means after being delayed by the time corresponding to the N encodings from the delay means until just before being supplied to the encoding means are inter-encoded. As described above , the image coding apparatus characterized by controlling the switching means .
画像信号を符号化する符号化モードを、イントラ符号化またはインター符号化に切り換えながら、前記画像信号を、所定の単位領域ごとに符号化する画像符号化方法であって、
前記単位領域の画像信号を、所定の時間だけ遅延してイントラ符号化またはインター符号化を行い、
遅延される以前の前記画像信号におけるシーンチェンジを、前記単位領域ごとに検出し、
シーンチェンジの検出結果に応じて、シーンチェンジが検出されない場合には、符号化モードを、N回に1回の割合でインター符号化からイントラ符号化に切り替えるようにし、また、シーンチェンジが検出された場合には、そのシーンチェンジが検出された後、そのシーンチェンジが検出された前記単位領域の画像信号が、遅延されて供給される直前までの間、前記N回の符号化に対応する時間だけ遅延されて供給される前記単位領域の画像信号すべてがインター符号化されるようにする
ことを特徴とする画像符号化方法。
An image encoding method for encoding the image signal for each predetermined unit region while switching an encoding mode for encoding an image signal to intra encoding or inter encoding,
The unit area image signal is delayed by a predetermined time to perform intra coding or inter coding,
A scene change in the image signal before being delayed is detected for each unit area,
If no scene change is detected according to the detection result of the scene change, the encoding mode is switched from inter encoding to intra encoding at a rate of once every N times, and a scene change is detected. When the scene change is detected, a time corresponding to the N encodings is performed until the image signal of the unit area in which the scene change is detected is delayed and immediately before being supplied. An image encoding method, wherein all the image signals of the unit area supplied with a delay of only one are inter-encoded .
JP18796094A 1994-08-10 1994-08-10 Image coding apparatus and image coding method Expired - Fee Related JP3617652B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18796094A JP3617652B2 (en) 1994-08-10 1994-08-10 Image coding apparatus and image coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18796094A JP3617652B2 (en) 1994-08-10 1994-08-10 Image coding apparatus and image coding method

Publications (2)

Publication Number Publication Date
JPH0856361A JPH0856361A (en) 1996-02-27
JP3617652B2 true JP3617652B2 (en) 2005-02-09

Family

ID=16215178

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18796094A Expired - Fee Related JP3617652B2 (en) 1994-08-10 1994-08-10 Image coding apparatus and image coding method

Country Status (1)

Country Link
JP (1) JP3617652B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3063715B2 (en) 1997-12-19 2000-07-12 日本電気株式会社 Image compression device

Also Published As

Publication number Publication date
JPH0856361A (en) 1996-02-27

Similar Documents

Publication Publication Date Title
US5963673A (en) Method and apparatus for adaptively selecting a coding mode for video encoding
JP3157101B2 (en) Image encoding method and image encoding device
US6628713B1 (en) Method and device for data encoding and method for data transmission
JPH07288820A (en) Coder and decoder
EP1754378A1 (en) Method and device for encoding digital video data
KR19980080602A (en) Method and apparatus for encoding video signal, and method and apparatus for decoding video signal
US6580755B1 (en) Apparatus and method for encoding
JP3599942B2 (en) Moving picture coding method and moving picture coding apparatus
JP3245496B2 (en) Image encoding method, image encoding circuit, image encoding device, and playback device
JP3617652B2 (en) Image coding apparatus and image coding method
JP3900534B2 (en) Moving picture coding apparatus and coding method
JPH09284770A (en) Image coding device and method
JP2002199408A (en) Moving image coding method and moving image coder
KR100454526B1 (en) Error concealment method of Itra coded frame by spatio-temporal information
JP3207095B2 (en) Motion compensation inter-frame / intra-frame coding apparatus
JP2002010263A (en) Motion picture encoding apparatus and its method
JP2000188735A (en) Motion vector detector and dynamic picture coder using the same
KR100238087B1 (en) Method of insertion of intra block and moving image encoder using it
JP3661711B2 (en) Image coding method and apparatus
JPH0775095A (en) Rate control circuit
JP2001359102A (en) Image coding method and image coder
JP4359273B2 (en) Coding mode selection method
JP3188081B2 (en) Image encoding method and image encoding device
JP4269405B2 (en) Encoding apparatus and method
JPH089374A (en) Encoded information quantity controller

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040616

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040816

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041103

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

Free format text: PAYMENT UNTIL: 20071119

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20081119

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091119

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees