JP3599942B2 - Moving picture coding method and moving picture coding apparatus - Google Patents

Moving picture coding method and moving picture coding apparatus Download PDF

Info

Publication number
JP3599942B2
JP3599942B2 JP4730797A JP4730797A JP3599942B2 JP 3599942 B2 JP3599942 B2 JP 3599942B2 JP 4730797 A JP4730797 A JP 4730797A JP 4730797 A JP4730797 A JP 4730797A JP 3599942 B2 JP3599942 B2 JP 3599942B2
Authority
JP
Japan
Prior art keywords
frame
picture
scene change
encoding
indicating
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
JP4730797A
Other languages
Japanese (ja)
Other versions
JPH10229563A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP4730797A priority Critical patent/JP3599942B2/en
Publication of JPH10229563A publication Critical patent/JPH10229563A/en
Application granted granted Critical
Publication of JP3599942B2 publication Critical patent/JP3599942B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding
    • 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/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

Description

【0001】
【発明の属する技術分野】
本発明は、フレーム間予測符号化方式を利用してテレビジョン信号等の動画像映像信号を圧縮符号化する動画符号化方法と装置に関する。特に、場面切換(シーンチェンジ)時に、フレーム間予測符号化方式に於いて参照されることのない非参照フレームの符号量が増大する等の悪影響を防止することで画質の安定化を達成する動画像符号化方法と装置に関する。
【0002】
【従来の技術】
動画像信号を圧縮符号化する方式として、MPEG方式が、MPEG1−Video(ISO/IEC・11172−2)、及びMPEG2−Video(ISO/IEC・13818−2)として規格化され、記録分野ばかりでなく、ディジタル放送やディジタル伝送等の放送・通信分野でも広く用いられている。
【0003】
MPEG方式では、複数のフレーム単位(1フィールド,1フレーム等)の集合であるGOP(Group of Picture)が、フレームシーケンス中に構成される。GOP中では、フレーム単位内圧縮により少なくとも1枚のフレームが圧縮符号化され、そのフレーム以外は、他のフレームを参照して圧縮符号化される(フレーム単位間圧縮=フレーム間予測符号化)される。フレーム単位内圧縮により圧縮符号化される画像はIピクチャであり、フレーム単位間圧縮を利用して圧縮符号化される画像はPピクチャとBピクチャである。
【0004】
フレーム単位内圧縮では、DCT(Discrete Cosine Transform) 、量子化、可変長符号化(VLC)という技法が採用されている。
まず、フレーム内の画像データがマクロブロックと呼ばれる16×16画素の小領域に分割され、この小領域中の8×8画素ブロック毎にDCT変換が施されて、周波数領域が求められる。
【0005】
人間の視覚特性は高周波に対して鈍感なため、上述の周波数領域中の高周波領域への符号割当を少なくすることにより、人間の視覚的には大きな劣化を感じさせることなくデータ量を削減することができる。この割当は、量子化によって行われる。量子化は、8×8画素のブロックのDCT変換により得られた8×8の周波数領域データ(係数行列)を、あるマトリックスで除算することにより実現される。なお、復号器側では、可変長復号して得たデータに対して上記マトリックスを乗算(逆量子化)することにより、元の8×8の周波数領域データ(係数行列)を得ることが可能になる。即ち、逆DCT演算を行うべきマトリックスを得ることが可能になる。
【0006】
上記に於いて、高次のデータ、つまり高周波領域のデータに対する除算値を大きく設定することにより、高周波領域の符号化精度を下げることができる。つまり、高周波領域に相当するデータ量を大きく削減することができる。こうして得られた量子化データは、ゼロ値の多いものとなる。このため、このデータは、ゼロ値の数と、それに続く実値という組で可変長符号化テーブルが形成される。可変長符号化とは、エントロピー符号化の一種であり、出現頻度の高いデータに対しては短い符号を割当て、出現頻度の低いデータに対しては長い符号を割当てることにより、効率の高い圧縮を行う方式である。
【0007】
フレーム単位間圧縮では、上述のDCT、量子化、可変長符号化という技法に加えて、動きベクトルを用いた動き補償という技法が採用されている。
まず、フレーム内の画像データが、フレーム単位内圧縮の場合と同様にマクロブロックと呼ばれる16×16画素の小領域に分割される。フレーム単位間圧縮では、符号化対象の画像データ(現画像データ)ばかりでなく、現画像データが参照するべき他フレームの画像データ(参照画像データ)が必要となる。参照画像データとしては、現画像データから時間的に近い位置に存在するフレームが用いられる。各マクロブロック毎に、参照フレームの画像データ中から、現在の符号化対象のマクロブロック(現マクロブロック)とデータ的に近い領域(マクロブロック)が検索される。「データ的に近い(近似する)領域」とは、通常、画素データの輝度のみを比較して、その自乗誤差平均が最も少ない値を示す領域を言う。MPEGでは、この検索は半画素単位の精度で行われる。また、検索範囲は、現フレーム内の現マクロブロックの位置に対応する参照フレーム内の位置から所定範囲の領域である。この検索を「動きベクトル」の検出という。また、フレーム間予測符号化に於いて「動きベクトル」により参照マクロブロックと現マクロブロックとの位置ズレを補正することを「動き補償」という。この「動きベクトル」の値も可変長符号化される。
【0008】
参照する画像データが存在する場合には、復号器側に於いて上記「データ的に近い」領域を切り出すことが可能である。しかし、切り出される参照マクロブロックの画像データと、符号化対象の現マクロブロックの画像データとは、完全同一ではない。このため、この差を補償してやる必要がある。MPEGでは、この差を補償するために、各画素毎(輝度、色差)に差分を取って差分マクロブロックを構成し、その中の8×8画素の各領域毎に、フレーム単位内圧縮の場合と同様にDCT演算と量子化を行う。ただし、この場合の量子化は、対象が差分データであるため、通常、全体的に精度を落として行われる。このため、差分データに対しては、通常、高周波領域と低周波領域を区別しない量子化テーブルがデフォルトとして用意されている。勿論、この量子化テーブルをエンコーダ側で自由に変更することは可能である。
【0009】
こうして得られた圧縮符号が逆量子化及び逆DCTされる。参照されるフレームの画像データがデコーダ内部に存在している場合には、上述の逆DCT後の値を、その動き量から指定されるフレーム領域と加算することにより、当該マクロブロックの復号が行われることになる。
【0010】
MPEGでは、フレーム単位間圧縮を利用して圧縮符号化されるフレームは2種類存在する。過去のフレームからのみ参照が行われるフレームをPピクチャと呼び、過去及び未来の双方から参照が行われるフレームをBピクチャと呼ぶ。Pピクチャは、時間的に(=表示順で)過去に位置するI又はPピクチャから予測される。Bピクチャは時間的に(=表示順で)過去及び/又は未来に位置するI又はPピクチャから予測される。つまり、Bピクチャは、動き予測のために参照されない非参照フレーム(=差分データの算出用として参照されない非参照フレーム)であり、I及びPピクチャは、動き予測のために参照され得る参照フレーム(=差分データの算出用として参照され得るフレーム)である。
【0011】
これらの圧縮手法を組合わせて圧縮された差分圧縮符号の符号量は、もとの画像データのデータ量と比較して、数分の一〜数百分の一となり、しかも、比較的高い画質を保持している。しかし、他のフレームを参照するという方法を用いているため、復号器側に於いて参照フレームの画像データを保持するための構成が必要になる。また、復号器側では、参照フレームの画像データとして、復号された画像データを用いることになるため、エンコーダ側では、このことを考慮して符号化を行なわなくてはならない。つまり、参照されるフレームであるIピクチャとPピクチャを符号化した後、復号器と同じ条件で復号し、その復号後の参照フレームの画像データを保持する必要がある。そして、この復号した画像データを参照して、PピクチャとBピクチャを符号化しなくてはならない。
【0012】
図4に、MPEG動画像のフレームシーケンス例を示す。図内(A)は、各フレームの表示順である。MPEGで最も一般的に用いられるフレーム種類の順を示しているが、勿論これに限られるものではない。矢印は、終点のフレームを符号化/復号化する際に、始点のフレームを参照することを示す。例えば、Bピクチャ51,52 は、Iピクチャ53を参照して符号化/復号化されるフレームであるため、Bピクチャ51,52 の符号化時/復号化時には、既に、Iピクチャ53が復号されて画像メモリに保持されている必要がある。同様に、Bピクチャ54,55 は、Iピクチャ53とPピクチャ56とを参照して符号化/復号化されるフレームであるため、Bピクチャ54,55 の符号化時/復号化時には、既に、Iピクチャ53とPピクチャ56とが復号されて画像メモリに保持されている必要がある。同様に、Pピクチャ56は、Iピクチャ53を参照して符号化/復号化されるフレームであるため、Pピクチャ56の符号化時/復号化時には、既に、Iピクチャ53が復号されて画像メモリに保持されている必要がある。
【0013】
この理由から、上述の各フレームの記録順は、図内(B)のようになる。この記録順に復号を行い、IピクチャやPピクチャの復号画像データを順次保持することにより、上述のBピクチャやPピクチャの符号化/復号化が可能になる。また、このような参照を行うため、Iピクチャは、それ自体で画質を維持する必要がある。また、Pピクチャも他のPピクチャやBピクチャの参照に利用されるために、高い画質を維持する必要がある。このため、通常、Iピクチャに最も多くの符号量を割当て、次にPピクチャ、Bピクチャの順に符号量を割り当てることにより、全体としての画質を維持している。
【0014】
【発明が解決しようとする課題】
しかしながら、従来技術において、データ量の割り当て量が最も少ないBピクチャに於いて場面切換(シーンチェンジ)が発生すると、過去及び未来の双方向のフレームを参照して符号化を行う、いわゆる両方向予測符号化を行うことができなくなる。このため、Bピクチャに於いて高い圧縮率を維持することができなくなり、当該Bピクチャの符号量が増大する。
【0015】
また、動画像符号化装置では、該装置から出力される符号量をモニタして量子化スケールを制御することにより全体の符号量を制御するレート制御を行っているため、上述のように、シーンチェンジの発生したBピクチャの符号量が増大すると、他のフレームの量子化が粗く制御される結果、該他のフレームの画質が劣化するという問題も生ずる。
【0016】
本発明は、シーンチェンジの発生したBピクチャの画質を劣化させることなく該Bピクチャの符号量の増大を抑圧し、もって、他のフレームの画質の劣化をも防止することを目的とする。
【0017】
【課題を解決するための手段】
請求項1の発明は、Iフレーム、PフレームおよびBフレームを含む一連のフレーム動画像信号を入力信号として、Iフレームに対してはフレーム内符号化を行い、PフレームおよびBフレームに対しては予め設定された参照先フレームとの差分データを符号化した符号化データに当該参照先フレームを指示する予測方向情報を結合して出力するフレーム間符号化を行う動画像符号化方法において、前記Bフレームでシーンチェンジが検出されたとき、当該Bフレームに対する前記差分データをゼロで置換し、且つ、当該Bフレームの予測方向情報を前記設定された参照先フレームを指示するものから当該Bフレームに対し表示順が近いIまたはPフレームを参照先フレームとして指示するものに置き換えて出力する、ことを特徴とする動画像符号化方法である。
【0018】
請求項2の発明は、請求項1において、前記Bフレームでシーンチェンジが検出されたとき、当該Bフレームから前記置き換え後の参照フレームまでの間に存在するBフレームについても、前記差分データをゼロで置換し、且つ、前記予測方向情報を前記設定された参照先フレームを指示するものから前記置き換え後の参照先フレームを指示するものに置き換えて出力する、ことを特徴とする動画像符号化方法である。
【0019】
請求項3の発明は、Iフレーム、PフレームおよびBフレームを含む一連のフレーム動画像信号が入力されるとともに、Iフレームに対してはフレーム内符号化を行い、PフレームおよびBフレームに対しては予め設定された参照先フレームとの差分データを符号化した符号化データに当該参照先フレームを指示する予測方向情報を結合して出力するフレーム間符号化を行う動画像符号化装置において、前記一連のフレーム動画像信号を構成する各フレームのうちシーンチェンジが行われるフレームを検出するシーンチェンジ検出手段と、前記シーンチェンジ検出手段によってシーンチェンジが検出されたフレームが前記Bフレームであるとき、当該Bフレームに対する前記差分データをゼロで置換し、且つ、当該Bフレームの予測方向情報を前記設定された参照先フレームを指示するものから当該Bフレームに対し表示順が近いIまたはPフレームを参照先フレームとして指示するものに置換する置換手段と、を有することを特徴とする動画像符号化装置である。
【0020】
請求項4の発明は、請求項3において、前記置換手段は、前記シーンチェンジ検出手段によってシーンチェンジが検出されたフレームが前記Bフレームであるとき、当該Bフレームから前記置換後の参照フレームまでの間に存在するBフレームについても、前記差分データをゼロで置換し、且つ、前記予測方向情報を前記設定された参照先フレームを指示するものから前記置換後の参照先フレームを指示するものに置き換えて出力する、ことを特徴とする動画像符号化方法である。
なお、シーンチェンジの検出は、例えば、動画像の高域成分の変化、フレームのエッジ成分の移動、低域成分の変動等によって検出することができる。なお、シーンチェンジ検出の手法は、特開平6−153146号公報、特開平7−38842号公報、特開平7−79431号公報に開示されているように公知である。
【0026】
【発明の実施の形態】
1.典型的なMPEGエンコーダ(図3).
まず、図3を参照して、典型的なMPEGエンコーダを説明する。なお、MPEGエンコーダを例にとって説明しているが、MPEG規格に準拠しない動画像符号化装置や方法であっても、本発明の構成を具備し得る。
【0027】
11は入力手段、12はフレーム並換器、13はラスタースキャンからマクロブロックへの走査変換プロセッサ、14は減算器、16はDCTプロセッサ、18は重み付けを行う量子化器、20は可変長符号化器、22はエンコーダからの読出バッファ、23出力手段、24はレート制御器、26は逆量子化器、28は逆DCTプロセッサ、30は加算器、32はフレームメモリ、32aと32bはフレームメモリ32のデータの読出バス、34は動き補償プロセッサ、36はモード判定器、38は動き検出器である。
【0028】
まず、入力手段11からフレーム並換器12へ、フレーム信号が、図4(A)の順で入力される。フレーム並換器12は、図4(A)の順から同図(B)の順のようにフレーム順を入れ換える。即ち、Iピクチャとして圧縮符号化されるフレームが先頭とされ、以下、参照されるフレームが参照するフレームに対して先行するように、フレームの順が並び換えられる。
【0029】
次に、走査変換・マクロブロック化プロセッサ13へデータが入力される。通常、画像データは、ラスタースキャンフォーマットで記録されている。これは、画面の左上から1画素づつデータが出力されて1ラインが出力された後、次ラインのデータが出力される形式である。MPEGでは、16×16画素のマクロブロックと呼ばれる小領域を単位としてデータが処理されるため、ラスタースキャンフォーマットをマクロブロックフォーマットに変換する必要がある。なお、MPEG1では、マクロブロックは輝度データ16×16画素、色差データ各8×8画素である。MPEG2では、色差の割合がフレームフォーマットによって変更されるが、輝度で16×16画素に相当する範囲がマクロブロックとして処理され、動きベクトルの検索もこれを単位として行われる。
【0030】
以下、走査変換・マクロブロック化プロセッサ13から出力されるデータの処理を、圧縮手法別に説明する。
【0031】
1−1.Iピクチャの場合.
Iピクチャのデータは、通常、フレーム間予測符号化されず、動きベクトルを検索されない(但し、MPEGでは、エラー復帰のために、例外的にIピクチャへの動きベクトルの導入が許容されている)ため、そのままDCTプロセッサ16に入力される。該DCTプロセッサ16で画像データの空間周波数への変換が行われた後、量子化器18によって各周波数領域への重み付けが行われる。量子化後の係数データが可変長符号化器20に入力されて可変長符号化される。
【0032】
可変長符号化後の符号は、一定の転送レートでデータを出力することができない。このため、読出バッファ22で転送時のレートへの緩衝が行われ、出力手段23から圧縮符号列が一定の転送レートで出力される。
【0033】
可変長符号化器22から出力される符号量はレート制御器24により監視され、画像のタイプ(I,P,Bピクチャ)毎に設定されている符号量との差異が大きい場合には、量子化スケールが変更される。量子化に際しては前述の量子化マトリックスに量子化スケールが乗算されるのであるが、この量子化スケールが、上述のようにレート制御器24により制御される。量子化スケールが大きくされると量子化が粗く行われる結果、発生符号量は小さくなるが、画質は劣化する。量子化スケールが小さくされると量子化が細かく行われる結果、発生符号量は増大するが、画質は良好となる。
【0034】
量子化器18の出力は、逆量子化器26へも入力される。これは、前述の参照用の画像データを復号するためである。つまり、逆量子化後、逆DCTが逆DCTプロセッサ28で行われ、復号された画像データが画像メモリ32に格納される。こうして、画像メモリには、参照用のIピクチャが保持される。
【0035】
1−2.Pピクチャの場合.
Pピクチャの符号化に際しては、各マクロブロック毎に動きベクトルが検索される。この検索は、画像メモリ32に記憶されているIピクチャもしくはPピクチャを参照して行われる。但し、全てのマクロブロックについて動きベクトルを検索するわけではない。例えば動きの速いフレームの場合、左に大きくパンするフレーム等では、右端側の領域は当該フレームに於いて初めて出現する領域であるため、かかる領域に関しては、参照フレーム内から似た領域を検索できない。このため、かかる場合には、Iピクチャのマクロブロックの場合と同様に、動きベクトルを検索しないモードが適用される。他に、背景処理を簡単に行うため、同位置のブロックデータをそのまま切り出すモードがある。何れのモードが当該マクロブロックの符号化に有効であるかは、モード判定器36で判定される。
【0036】
モード判定器36が動き補償を行う旨の判断を出すと、その命令が動き補償器34に入力される。また、動き検出器38によって得られた動きベクトルも動き補償器34に入力される。動き補償器34はこれらのデータに基づいて、対応する領域のデータを画像メモリ32から読み出して減算器14へ出力させる。減算器14では現マクロブロックとの差分が取られて、該差分データがDCT16及び量子化器18にて前述のIピクチャの場合と同様に符号化される。Pピクチャの場合も、時間的に未来に位置する他のPピクチャや、過去及び未来に位置するBピクチャによって参照されるため、画像メモリ32に記憶される必要がある。このため、逆量子化器26と逆DCT28とにより処理されるが、そのままでは、差分データであって、もとの画像データではない。このため、当該マクロブロックの符号化に用いた動きベクトルを再度用いて、画像メモリ32から加算器30へ対応領域の画像データを出力させ、上記復号差分データに加算することにより、もとの画像データが復号される。この画像データが画像メモリ32に格納されて、上述の参照に供される。
【0037】
1−3.Bピクチャの場合.
Bピクチャの場合の符号化手法はPピクチャの場合と基本的に同じである。但し、Bピクチャの場合は、過去及び未来のIピクチャやPピクチャを参照して圧縮符号化されるため、動きベクトルを、Pピクチャの場合の倍、検索する必要がある。また、Bピクチャは参照用には用いられないため、復号画像データを画像メモリ32に格納する必要はない。Bピクチャの場合、マクロブロックの符号化のモードは、過去及び未来からの予測、過去からの予測、未来からの予測、単位内符号化、の四種類から選択される。
こうして、MPEG方式の圧縮画像符号のビットストリームが生成される。
【0038】
2.第1実施例(図1).
本発明の一実施の形態の例を図1に示す。図1中、図3と同一の機能を奏するブロックについては同一の符号を付して、説明を省略する。
【0039】
102はシーンチェンジ検出器、103は置換判定器、104は切換器、106は切換器、108は切換器である。切換器104,106,108 は、何れも、置換判定器103 からの制御信号によって切り換えられる。
【0040】
シーンチェンジ検出手段102 は、入力手段11から入力された画像データに基づいて場面切換の有無を判定する。例えば、画像データの高域成分の変化、フレームのエッジ成分の移動、低域成分の変動などによって、場面切換(シーンチェンジ)の有無を判定することができる。本発明では、シーンチェンジの検出技法は限定されない。また、現フレームのシーンチェンジの判定の基準となるフレームとしては、時間軸上で、現フレームの直前に位置するフレームの他、現フレームが符号化に際して参照するフレームを用いることもできる。
【0041】
置換判定器103 は、シーンチェンジ検出器102 によりシーンチェンジが検出された場合、そのシーンチェンジが、Bピクチャで行われたか、又は、IピクチャやPピクチャで行われたかを判定する。換言すれば、前記差分データの算出用として参照されない非参照フレームであるBピクチャで行われたか、又は、差分データの算出用として参照され得るフレームであるIピクチャやPピクチャで行われたかを判定する。
【0042】
その結果、Iピクチャ又はPピクチャでシーンチェンジが検出されたと判定された場合には、置換判定器103 は、切換器104,106,108 に対して通常の位置(端子a)を維持するように命令する。この場合は、前述の図1と同様の動作が行われる。一方、Bピクチャでシーンチェンジが検出されたと判定された場合、置換判定器103 は、当該Bピクチャの各マクロブロックについて、切換器104,106,108 に対して通常の位置(端子a)からの切換を命令する。
【0043】
これにより、切換器104 は、当該Bピクチャの各マクロブロックについて、減算器14からの入力(差分データの入力)に換えて、ゼロデータをDCTプロセッサ16に入力させるように、端子b側へ切り換えられる。このため、量子化器18から出力される差分圧縮符号はゼロデータとなる。
【0044】
また、切換器106 は、当該Bピクチャの各マクロブロックについて、検出された動きベクトルに換えて、動きが無いことを示すゼロデータを可変長符号化器20へ送るように、端子b側へ切り換えられる。これにより、当該マクロブロックの圧縮符号(この場合は、上述のようにゼロデータである)に結合される動きベクトルは、動きの無いことを示すゼロデータとなる。
【0045】
また、切換器108 は、当該Bピクチャの各マクロブロックについて、判定された符号化モードに代えて、当該Bピクチャに表示順が近く差分データの算出用として参照され得るフレーム(Iピクチャ又はPピクチクャ)の方向を予測方向とするマクロブロックタイプ情報を可変長符号化器20へ送るように、端子b側(前方予測)又は端子c側(後方予測)へ切り換えられる。これにより、当該マクロブロックの圧縮符号(この場合は、上述のようにゼロデータである)に結合されるマクロブロックタイプ情報は、上記予測方向を示す情報となる。なお、端子b側(前方予測)又は端子c側(後方予測)の何れを選択するかは、例えば、時間的に近い参照フレームの方向を選択するようにすると、容易に判定することができる。なお、端子b側(前方予測)又は端子c側(後方予測)の何れか一方のみを用意する構成も可能である。
【0046】
このように、切換器104,106,108 の切換が行われる結果、可変長符号化器20には、上記Bピクチャの期間に渡り、全て「0」の圧縮符号と、動きの無いことを示す動きベクトル「0」情報と、当該Bピクチャに表示順が近いIピクチャ又はPピクチャを指示するマクロブロックタイプ情報とが入力される。これらは可変長符号化された後、結合されて出力される。なお、MPEG方式では、マクロブロック内のデータが特定の条件を満たす場合、該マクロブロックに対するデータを符号化する必要がない。可変長符号化手段20への上述の入力はこの条件を満たしている。したがって、必ず符号化を義務づけられた少数のマクロブロックのみについて符号化が行われる。このため、当該Bピクチャについての符号量は、極めて少ないものに抑えられる。
【0047】
こうして、シーンチェンジの検出されたBピクチャについては、当該Bピクチャを、当該Bピクチャに表示順が近いIピクチャ又はPピクチャで置換する旨の情報が出力されることになる。このため、不図示のデコーダ側では、上述のBピクチャに代えて、上記置換する旨の情報で指示されるIピクチャ又はPピクチャが再生出力される。
【0048】
なお、図1では、切換器106 により端子b側へ切り換えられた動きベクトル情報と、切換器108 により端子b側又は端子c側へ切り換えられたマクロブロックタイプ情報とを、動き補償器34へ入力させているが、この動き補償器34への入力としては、動き検出器38から出力される通常の動きベクトル情報と、モード判定器36から出力される通常のマクロブロックタイプ情報とを採用してもよい。
【0049】
また、上記では、シーンチェンジの発生したBピクチャを、当該Bピクチャに表示順が近いIピクチャ又はPピクチャで置換する旨の情報を出力するように制御する例を説明しているが、当該Bピクチャと、当該Bピクチャに表示順が近いIピクチャ又はPピクチャとの間に、他のBピクチャが在る場合には、該他のBピクチャ内の各マクロブロックについて、シーンチェンジの発生したBピクチャと同様に処理するように構成することもできる。
【0050】
例えば、図4のBピクチャ58でシーンチェンジが検出された場合に、上述のように、Bピクチャ58をPピクチャ59で置換するように制御するとともに、他のBピクチャ57をPピクチャ56(Pピクチャ59でもよい)で置換するように制御する構成も可能である。この構成は、請求項10,11に対応する。
【0051】
3.第2実施例(図2).
本発明における別の実施の形態の例を図2に示す。図2中、図1や図3と同一の機能を奏するブロックについては同一の符号を付して、説明を省略する。
【0052】
図2では、切換器104 を走査変換マクロブロック化器13と減算器14との間に配置し、且つ、切換器104 の端子bに、画像メモリ32から読み出されるデータを入力させている。つまり、切換器104 が端子bに切り換えられた場合に、減算器14にの両入力端子に、画像メモリ32から読み出される同一の画像データが入力されるように構成されている。このため、切換器104 が端子b側に切り換えられた場合には、DCTプロセッサ16にはゼロデータが入力されることになり、図1の場合と同じ効果を得ることができる。
【0053】
【発明の効果】
本発明によると、非参照フレームに於いてシーンチェンジ発生した場合に、該非参照フレームの符号量の増大を抑圧することことができる。このため、シーンチェンジ以外での符号化効率を高めることもできる。その結果、高画質で安定な圧縮符号化を実現することができる。
【図面の簡単な説明】
【図1】本発明の動画像符号化装置の一実施の形態の例を示すブロック図。
【図2】本発明の動画像符号化装置の別の実施の形態の例を示すブロック図。
【図3】典型的な動画像符号化装置を示すブロック図。
【図4】フレーム間予測符号化の各フレームの参照関係の説明図。
【符号の説明】
102 シーンチェンジ検出器
103 置換判定器
104 切換器
106 切換器
108 切換器
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a moving image encoding method and apparatus for compressing and encoding a moving image video signal such as a television signal using an inter-frame predictive encoding method. In particular, at the time of a scene change (scene change), a moving image that achieves image quality stabilization by preventing an adverse effect such as an increase in the code amount of a non-reference frame that is not referred to in the inter-frame predictive coding method. The present invention relates to an image encoding method and apparatus.
[0002]
[Prior art]
As a method for compressing and encoding a moving image signal, the MPEG method is standardized as MPEG1-Video (ISO / IEC 11172-2) and MPEG2-Video (ISO / IEC-13818-2). Instead, it is also widely used in broadcasting and communication fields such as digital broadcasting and digital transmission.
[0003]
In the MPEG system, a GOP (Group of Picture), which is a set of a plurality of frame units (one field, one frame, or the like), is configured in a frame sequence. In a GOP, at least one frame is compression-coded by intra-frame compression, and other frames are compression-coded with reference to other frames (inter-frame compression = inter-frame predictive coding). You. Images compressed and encoded by intra-frame compression are I pictures, and images compressed and encoded using inter-frame compression are P pictures and B pictures.
[0004]
In intra-frame compression, techniques such as DCT (Discrete Cosine Transform), quantization, and variable length coding (VLC) are employed.
First, image data in a frame is divided into small regions of 16 × 16 pixels called macroblocks, and DCT transform is performed for each 8 × 8 pixel block in the small region to obtain a frequency region.
[0005]
Since human visual characteristics are insensitive to high frequencies, reducing the amount of codes assigned to high-frequency regions in the above-mentioned frequency region reduces the amount of data without causing significant visual deterioration to humans. Can be. This assignment is performed by quantization. Quantization is realized by dividing 8 × 8 frequency domain data (coefficient matrix) obtained by DCT transform of a block of 8 × 8 pixels by a certain matrix. On the decoder side, the original 8 × 8 frequency domain data (coefficient matrix) can be obtained by multiplying (inverse quantizing) the data obtained by the variable length decoding by the above matrix. Become. That is, it is possible to obtain a matrix for performing the inverse DCT operation.
[0006]
In the above, by setting a large division value for high-order data, that is, data in a high-frequency region, it is possible to reduce the encoding accuracy in the high-frequency region. That is, the data amount corresponding to the high frequency region can be significantly reduced. The quantized data thus obtained has many zero values. Therefore, in this data, a variable length encoding table is formed by a set of the number of zero values and the subsequent real values. Variable-length coding is a type of entropy coding, in which a short code is assigned to data with a high frequency of occurrence, and a long code is assigned to data with a low frequency of occurrence, resulting in highly efficient compression. It is a method to perform.
[0007]
In the inter-frame compression, a technique called motion compensation using a motion vector is employed in addition to the techniques of DCT, quantization, and variable-length coding described above.
First, image data in a frame is divided into small areas of 16 × 16 pixels called macroblocks, as in the case of intra-frame compression. The inter-frame compression requires not only image data to be encoded (current image data) but also image data of another frame to be referred to by the current image data (reference image data). As the reference image data, a frame existing at a position temporally close to the current image data is used. For each macroblock, an area (macroblock) that is close in data to the current encoding-target macroblock (current macroblock) is searched from the image data of the reference frame. The “region that is close (approximate) in terms of data” usually refers to a region in which only the luminance of pixel data is compared, and the average of the square errors thereof shows the smallest value. In MPEG, this search is performed with an accuracy of a half pixel unit. The search range is a region within a predetermined range from the position in the reference frame corresponding to the position of the current macroblock in the current frame. This search is called “motion vector” detection. Further, in the inter-frame predictive coding, correcting a positional shift between a reference macroblock and a current macroblock by using a "motion vector" is referred to as "motion compensation". The value of this “motion vector” is also variable-length coded.
[0008]
If there is image data to be referred to, it is possible to cut out the above “data-wise close” region on the decoder side. However, the image data of the extracted reference macroblock and the image data of the current macroblock to be encoded are not completely the same. Therefore, it is necessary to compensate for this difference. In MPEG, in order to compensate for this difference, a difference macroblock is constructed by taking a difference for each pixel (luminance, chrominance), and for each region of 8 × 8 pixels, compression in a frame unit is performed. DCT operation and quantization are performed in the same manner as in. However, in this case, the quantization is generally performed with reduced accuracy because the target is differential data. For this reason, a quantization table that does not distinguish between the high-frequency region and the low-frequency region is usually prepared as a default for the difference data. Of course, it is possible to freely change this quantization table on the encoder side.
[0009]
The compression code thus obtained is subjected to inverse quantization and inverse DCT. When the image data of the referenced frame exists inside the decoder, the value after the inverse DCT described above is added to the frame area specified by the motion amount, so that the decoding of the macroblock can be performed. Will be
[0010]
In MPEG, there are two types of frames that are compression-encoded using inter-frame compression. A frame referred to only from a past frame is called a P picture, and a frame referred to from both the past and the future is called a B picture. A P picture is predicted from an I or P picture that is located temporally (= in display order) in the past. B pictures are predicted from I or P pictures located in the past and / or future in time (= in display order). That is, the B picture is a non-reference frame that is not referred to for motion prediction (= a non-reference frame that is not referred to for calculating difference data), and the I and P pictures are reference frames that can be referred to for motion prediction. == frame that can be referred to for calculating difference data).
[0011]
The code amount of the differential compression code compressed by combining these compression methods is several-hundredths to one-hundredths smaller than the data amount of the original image data. Holding. However, since a method of referring to another frame is used, a configuration for holding image data of the reference frame on the decoder side is required. On the decoder side, the decoded image data is used as the image data of the reference frame. Therefore, the encoder must perform encoding in consideration of this fact. That is, it is necessary to encode the I-frame and the P-picture which are the frames to be referred to, decode them under the same conditions as those of the decoder, and hold the decoded image data of the reference frame. Then, the P picture and the B picture must be encoded with reference to the decoded image data.
[0012]
FIG. 4 shows an example of a frame sequence of an MPEG moving image. (A) in the figure shows the display order of each frame. The order of the frame type most commonly used in MPEG is shown, but is not limited to this. The arrow indicates that the start frame is referred to when encoding / decoding the end frame. For example, since the B pictures 51 and 52 are frames that are encoded / decoded with reference to the I picture 53, the I picture 53 is already decoded when the B pictures 51 and 52 are encoded / decoded. Must be stored in the image memory. Similarly, since the B pictures 54 and 55 are frames that are encoded / decoded with reference to the I picture 53 and the P picture 56, when the B pictures 54 and 55 are encoded / decoded, The I picture 53 and the P picture 56 need to be decoded and stored in the image memory. Similarly, since the P picture 56 is a frame that is encoded / decoded with reference to the I picture 53, the I picture 53 has already been decoded and encoded when the P picture 56 is encoded / decoded. Must be held in
[0013]
For this reason, the recording order of each frame described above is as shown in FIG. Decoding is performed in the recording order, and the decoded image data of the I picture and the P picture are sequentially stored, so that the above-described B picture and the P picture can be encoded / decoded. In order to make such a reference, the I-picture itself needs to maintain its image quality. Also, since the P picture is used for referring to another P picture or B picture, it is necessary to maintain high image quality. For this reason, the image quality as a whole is generally maintained by allocating the largest amount of code to the I picture and then allocating the code amount in the order of the P picture and the B picture.
[0014]
[Problems to be solved by the invention]
However, in the related art, when a scene change (scene change) occurs in a B picture with the smallest data amount allocation, a so-called bidirectional prediction code for performing coding with reference to past and future bidirectional frames. Can not be performed. For this reason, a high compression rate cannot be maintained in the B picture, and the code amount of the B picture increases.
[0015]
Also, in the video encoding device, since the amount of code output from the device is monitored and the quantization scale is controlled to control the overall amount of code, a rate control is performed as described above. When the code amount of the changed B picture increases, the quantization of the other frames is coarsely controlled, resulting in a problem that the image quality of the other frames deteriorates.
[0016]
It is an object of the present invention to suppress an increase in the code amount of a B picture without deteriorating the image quality of a B picture in which a scene change has occurred, thereby preventing the deterioration of the image quality of another frame.
[0017]
[Means for Solving the Problems]
According to the first aspect of the present invention, a series of frame moving image signals including an I frame, a P frame, and a B frame are used as input signals to perform intra-frame encoding for an I frame, and perform encoding for a P frame and a B frame. A moving image encoding method for performing inter-frame encoding in which prediction data indicating a reference frame is combined with encoded data obtained by encoding difference data from a preset reference frame and encoded data is output. When a scene change is detected in the frame, the difference data for the B frame is replaced with zero, and the prediction direction information of the B frame is changed from the one indicating the set reference frame to the B frame. A moving image characterized in that an I or P frame whose display order is close is replaced with a frame designating a reference frame and output. It is an encoding method.
[0018]
According to a second aspect of the present invention, in the first aspect, when a scene change is detected in the B frame, the difference data is reduced to zero even for a B frame existing from the B frame to the reference frame after the replacement. And outputting the prediction direction information by replacing the one indicating the set reference destination frame with the one indicating the replacement reference frame. It is.
[0019]
According to a third aspect of the present invention, a series of frame moving image signals including an I frame, a P frame, and a B frame are input, an intra-frame encoding is performed on the I frame, and a P frame and a B frame are encoded. In a moving image encoding apparatus for performing inter-frame encoding in which prediction direction information indicating the reference destination frame is combined with encoded data obtained by encoding difference data with a preset reference destination frame and output, A scene change detecting unit that detects a frame where a scene change is performed among frames constituting a series of frame moving image signals; and, when the scene change detected by the scene change detecting unit is the B frame, The difference data for the B frame is replaced with zero, and prediction direction information of the B frame is replaced. A moving unit that replaces the frame indicating the set reference frame with a frame indicating the I or P frame whose display order is closer to the B frame as the frame to be referenced. Device.
[0020]
According to a fourth aspect of the present invention, in the third aspect, when the frame in which the scene change is detected by the scene change detecting unit is the B frame, the replacing unit performs a process from the B frame to the reference frame after the replacement. Also for the B frame existing between them, the difference data is replaced with zero, and the prediction direction information is replaced from the one indicating the set reference frame to the one indicating the replaced reference frame. And outputting the moving image.
The scene change can be detected by, for example, a change in a high-frequency component of a moving image, a movement of an edge component of a frame, a change in a low-frequency component, and the like. The method of detecting a scene change is known as disclosed in JP-A-6-153146, JP-A-7-38842, and JP-A-7-79431.
[0026]
BEST MODE FOR CARRYING OUT THE INVENTION
1. Typical MPEG encoder (FIG. 3).
First, a typical MPEG encoder will be described with reference to FIG. Although the description has been made by taking the MPEG encoder as an example, a moving picture encoding device or method that does not conform to the MPEG standard may have the configuration of the present invention.
[0027]
11 is an input means, 12 is a frame reorderer, 13 is a scan conversion processor for converting a raster scan into a macroblock, 14 is a subtractor, 16 is a DCT processor, 18 is a quantizer for performing weighting, and 20 is variable length coding. 22, a read buffer from the encoder, 23 output means, 24 a rate controller, 26 an inverse quantizer, 28 an inverse DCT processor, 30 an adder, 32 a frame memory, 32a and 32b a frame memory 32 , A motion compensation processor, 36 a mode determiner, and 38 a motion detector.
[0028]
First, a frame signal is input from the input unit 11 to the frame reordering unit 12 in the order of FIG. The frame reordering unit 12 changes the frame order from the order of FIG. 4A to the order of FIG. That is, the frame that is compression-encoded as an I picture is set as the head, and the order of the frames is rearranged so that the referenced frame precedes the referenced frame.
[0029]
Next, data is input to the scan conversion / macroblock processor 13. Usually, image data is recorded in a raster scan format. This is a format in which data is output one pixel at a time from the upper left of the screen, one line is output, and then the data of the next line is output. In MPEG, data is processed in units of small areas called macroblocks of 16 × 16 pixels, so it is necessary to convert a raster scan format into a macroblock format. In MPEG1, a macroblock is composed of 16 × 16 pixels of luminance data and 8 × 8 pixels of chrominance data. In MPEG2, the ratio of the color difference is changed depending on the frame format. However, a range corresponding to 16 × 16 pixels in luminance is processed as a macroblock, and a search for a motion vector is also performed using this as a unit.
[0030]
Hereinafter, processing of data output from the scan conversion / macroblock processor 13 will be described for each compression method.
[0031]
1-1. For I-picture.
I-picture data is usually not inter-frame predictive coded and is not searched for a motion vector (however, the introduction of a motion vector into an I-picture is exceptionally allowed in MPEG for error recovery). Therefore, it is directly input to the DCT processor 16. After the DCT processor 16 converts the image data into the spatial frequency, the quantizer 18 weights each frequency domain. The quantized coefficient data is input to the variable-length encoder 20 and subjected to variable-length encoding.
[0032]
The code after the variable length coding cannot output data at a fixed transfer rate. Therefore, the read buffer 22 buffers the transfer rate, and the output means 23 outputs the compressed code string at a constant transfer rate.
[0033]
The code amount output from the variable length encoder 22 is monitored by the rate controller 24. If the difference from the code amount set for each image type (I, P, B picture) is large, The scale is changed. At the time of quantization, the above-described quantization matrix is multiplied by a quantization scale, and this quantization scale is controlled by the rate controller 24 as described above. When the quantization scale is increased, the quantization is coarsely performed. As a result, the generated code amount decreases, but the image quality deteriorates. When the quantization scale is reduced, the quantization is performed finely, and as a result, the generated code amount increases, but the image quality is improved.
[0034]
The output of the quantizer 18 is also input to the inverse quantizer 26. This is for decoding the aforementioned reference image data. That is, after the inverse quantization, the inverse DCT is performed by the inverse DCT processor 28, and the decoded image data is stored in the image memory 32. In this way, the reference I picture is held in the image memory.
[0035]
1-2. For a P picture.
When encoding a P picture, a motion vector is searched for each macroblock. This search is performed with reference to the I picture or the P picture stored in the image memory 32. However, motion vectors are not searched for all macroblocks. For example, in the case of a fast-moving frame, in the case of a frame that pans to the left and the like, the region on the right end is a region that first appears in the frame. . Therefore, in such a case, a mode in which a motion vector is not searched is applied as in the case of a macroblock of an I picture. In addition, there is a mode for cutting out block data at the same position as it is in order to easily perform background processing. Which mode is effective for encoding the macroblock is determined by the mode determiner 36.
[0036]
When the mode determiner 36 determines to perform motion compensation, the command is input to the motion compensator 34. The motion vector obtained by the motion detector 38 is also input to the motion compensator 34. Based on these data, the motion compensator 34 reads the data of the corresponding area from the image memory 32 and outputs the data to the subtractor 14. The subtracter 14 calculates the difference from the current macroblock, and the difference data is encoded by the DCT 16 and the quantizer 18 in the same manner as in the case of the I-picture described above. In the case of a P picture, it is necessary to store the P picture in the image memory 32 because it is referred to by other P pictures located in the future in time and B pictures located in the past and the future. Therefore, the data is processed by the inverse quantizer 26 and the inverse DCT 28, but as it is, it is difference data and not original image data. For this reason, the image data of the corresponding area is output from the image memory 32 to the adder 30 by using the motion vector used for encoding the macroblock again, and is added to the decoded difference data. The data is decrypted. This image data is stored in the image memory 32 and is provided for the above-mentioned reference.
[0037]
1-3. For B picture.
The coding method for a B picture is basically the same as that for a P picture. However, in the case of a B picture, since it is compression-encoded with reference to past and future I and P pictures, it is necessary to search for a motion vector twice that of a P picture. Further, since the B picture is not used for reference, it is not necessary to store the decoded image data in the image memory 32. In the case of a B picture, the encoding mode of the macroblock is selected from four types: prediction from the past and the future, prediction from the past, prediction from the future, and intra-unit encoding.
Thus, a bit stream of the compressed image code of the MPEG system is generated.
[0038]
2. First embodiment (FIG. 1).
FIG. 1 shows an example of an embodiment of the present invention. 1, blocks having the same functions as those in FIG. 3 are denoted by the same reference numerals, and description thereof will be omitted.
[0039]
102 is a scene change detector, 103 is a replacement determiner, 104 is a switch, 106 is a switch, and 108 is a switch. Each of the switches 104, 106, and 108 is switched by a control signal from the replacement determination unit 103.
[0040]
The scene change detecting unit 102 determines whether or not there is a scene change based on the image data input from the input unit 11. For example, the presence or absence of a scene change (scene change) can be determined based on a change in the high-frequency component of the image data, a shift in the edge component of the frame, a change in the low-frequency component, and the like. In the present invention, a technique for detecting a scene change is not limited. Further, as a frame that is used as a reference for determining a scene change of the current frame, a frame that is located immediately before the current frame on the time axis, or a frame that the current frame refers to at the time of encoding can be used.
[0041]
When a scene change is detected by the scene change detector 102, the replacement determiner 103 determines whether the scene change has been performed in a B picture, an I picture, or a P picture. In other words, it is determined whether the processing has been performed on a B-picture which is a non-reference frame not referred to for calculating the difference data, or whether the processing has been performed on an I-picture or P-picture which can be referred to for calculating the difference data. I do.
[0042]
As a result, when it is determined that a scene change has been detected in an I picture or a P picture, the replacement determiner 103 controls the switches 104, 106, and 108 to maintain the normal position (terminal a). Command. In this case, the same operation as in FIG. 1 is performed. On the other hand, when it is determined that a scene change has been detected in a B picture, the replacement determiner 103 sends to each of the switches 104, 106, and 108 the macroblock of the B picture from the normal position (terminal a). Command switching.
[0043]
As a result, the switching unit 104 switches the macroblock of the B picture to the terminal b so that zero data is input to the DCT processor 16 instead of the input from the subtractor 14 (input of difference data). Can be Therefore, the differential compression code output from the quantizer 18 becomes zero data.
[0044]
In addition, the switch 106 switches to the terminal b side so that zero data indicating no motion is sent to the variable length encoder 20 in place of the detected motion vector for each macroblock of the B picture. Can be Thereby, the motion vector combined with the compression code of the macroblock (in this case, zero data as described above) becomes zero data indicating no motion.
[0045]
In addition, the switch 108 replaces the coding mode determined for each macroblock of the B picture with a frame (I picture or P picture) that is close to the display order of the B picture and can be referred to for calculating difference data. ) Is switched to the terminal b side (forward prediction) or the terminal c side (backward prediction) so that the macroblock type information having the direction of ()) as the prediction direction is sent to the variable-length encoder 20. As a result, the macroblock type information combined with the compression code of the macroblock (in this case, zero data as described above) becomes information indicating the prediction direction. Note that whether to select the terminal b side (forward prediction) or the terminal c side (backward prediction) can be easily determined by, for example, selecting a direction of a reference frame that is close in time. Note that a configuration in which only one of the terminal b side (forward prediction) and the terminal c side (backward prediction) is prepared is also possible.
[0046]
As a result of the switching of the switches 104, 106, and 108, the variable-length encoder 20 shows a compression code of all "0" and indicates that there is no motion over the period of the B picture. The motion vector “0” information and macroblock type information indicating an I picture or a P picture whose display order is close to the B picture are input. These are variable-length coded and then combined and output. In the MPEG system, when data in a macroblock satisfies a specific condition, there is no need to encode data for the macroblock. The above-described input to the variable length encoding means 20 satisfies this condition. Therefore, encoding is performed only for a small number of macroblocks that must be encoded. For this reason, the code amount of the B picture is suppressed to an extremely small amount.
[0047]
In this way, for a B picture in which a scene change is detected, information indicating that the B picture is replaced with an I picture or a P picture whose display order is close to that of the B picture is output. For this reason, the decoder (not shown) reproduces and outputs the I picture or the P picture indicated by the information to be replaced, instead of the B picture.
[0048]
In FIG. 1, the motion vector information switched to the terminal b by the switch 106 and the macroblock type information switched to the terminal b or the terminal c by the switch 108 are input to the motion compensator 34. However, as inputs to the motion compensator 34, normal motion vector information output from the motion detector 38 and normal macroblock type information output from the mode determiner 36 are adopted. Is also good.
[0049]
In the above description, an example is described in which control is performed so as to output information indicating that a B picture in which a scene change has occurred is replaced with an I picture or a P picture whose display order is closer to the B picture. If there is another B picture between the picture and the I picture or P picture whose display order is close to the B picture, for each macroblock in the other B picture, It can also be configured to process in the same way as a picture.
[0050]
For example, when a scene change is detected in the B picture 58 of FIG. 4, as described above, control is performed so that the B picture 58 is replaced with the P picture 59, and the other B pictures 57 are replaced with the P pictures 56 (P (It may be a picture 59). This configuration corresponds to claims 10 and 11.
[0051]
3. Second embodiment (FIG. 2).
FIG. 2 shows an example of another embodiment of the present invention. 2, blocks having the same functions as those in FIGS. 1 and 3 are denoted by the same reference numerals, and description thereof will be omitted.
[0052]
In FIG. 2, the switch 104 is disposed between the scan conversion macroblock generator 13 and the subtractor 14, and data read from the image memory 32 is input to the terminal b of the switch 104. That is, the same image data read from the image memory 32 is input to both input terminals of the subtractor 14 when the switch 104 is switched to the terminal b. Therefore, when the switch 104 is switched to the terminal b, zero data is input to the DCT processor 16, and the same effect as in FIG. 1 can be obtained.
[0053]
【The invention's effect】
According to the present invention, when a scene change occurs in a non-reference frame, an increase in the code amount of the non-reference frame can be suppressed. For this reason, the coding efficiency other than the scene change can be improved. As a result, stable compression encoding with high image quality can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of an embodiment of a moving image encoding device according to the present invention.
FIG. 2 is a block diagram showing an example of another embodiment of the video encoding device of the present invention.
FIG. 3 is a block diagram showing a typical moving picture encoding device.
FIG. 4 is an explanatory diagram of a reference relationship between frames in inter-frame predictive coding.
[Explanation of symbols]
102 Scene Change Detector
103 Replacement decision unit
104 switch
106 switch
108 switch

Claims (4)

Iフレーム、PフレームおよびBフレームを含む一連のフレーム動画像信号を入力信号として、Iフレームに対してはフレーム内符号化を行い、PフレームおよびBフレームに対しては予め設定された参照先フレームとの差分データを符号化した符号化データに当該参照先フレームを指示する予測方向情報を結合して出力するフレーム間符号化を行う動画像符号化方法において、
前記Bフレームでシーンチェンジが検出されたとき、当該Bフレームに対する前記差分データをゼロで置換し、且つ、当該Bフレームの予測方向情報を前記設定された参照先フレームを指示するものから当該Bフレームに対し表示順が近いIまたはPフレームを参照先フレームとして指示するものに置き換えて出力する、
ことを特徴とする動画像符号化方法。
Using a series of frame video signals including an I frame, a P frame and a B frame as an input signal, intra-frame encoding is performed for the I frame, and a preset reference frame is set for the P frame and the B frame. A moving image encoding method for performing inter-frame encoding in which prediction direction information indicating the reference destination frame is combined with encoded data obtained by encoding difference data with
When a scene change is detected in the B frame, the difference data for the B frame is replaced with zero, and the prediction direction information of the B frame is changed from the one indicating the set reference frame to the B frame. Is output by replacing the I or P frame whose display order is close to the one indicating the reference frame.
A moving picture coding method characterized by the above-mentioned.
請求項1において、
前記Bフレームでシーンチェンジが検出されたとき、当該Bフレームから前記置き換え後の参照フレームまでの間に存在するBフレームについても、前記差分データをゼロで置換し、且つ、前記予測方向情報を前記設定された参照先フレームを指示するものから前記置き換え後の参照先フレームを指示するものに置き換えて出力する、
ことを特徴とする動画像符号化方法。
In claim 1,
When a scene change is detected in the B frame, for the B frame existing between the B frame and the reference frame after the replacement, the difference data is replaced with zero, and the prediction direction information is replaced by the prediction direction information. Output by replacing with the one indicating the reference frame after the replacement from the one indicating the set reference frame,
A moving picture coding method characterized by the above-mentioned.
Iフレーム、PフレームおよびBフレームを含む一連のフレーム動画像信号が入力されるとともに、Iフレームに対してはフレーム内符号化を行い、PフレームおよびBフレームに対しては予め設定された参照先フレームとの差分データを符号化した符号化データに当該参照先フレームを指示する予測方向情報を結合して出力するフレーム間符号化を行う動画像符号化装置において、
前記一連のフレーム動画像信号を構成する各フレームのうちシーンチェンジが行われるフレームを検出するシーンチェンジ検出手段と、
前記シーンチェンジ検出手段によってシーンチェンジが検出されたフレームが前記Bフレームであるとき、当該Bフレームに対する前記差分データをゼロで置換し、且つ、当該Bフレームの予測方向情報を前記設定された参照先フレームを指示するものから当該Bフレームに対し表示順が近いIまたはPフレームを参照先フレームとして指示するものに置換する置換手段と、
を有することを特徴とする動画像符号化装置。
A series of frame moving image signals including an I frame, a P frame, and a B frame are input, an intra-frame encoding is performed for the I frame, and a preset reference destination is assigned to the P frame and the B frame. A moving image encoding apparatus that performs inter-frame encoding in which prediction direction information indicating the reference destination frame is combined with encoded data obtained by encoding difference data from a frame and output.
Scene change detection means for detecting a frame in which a scene change is performed among frames constituting the series of frame moving image signals,
When the frame in which a scene change is detected by the scene change detecting means is the B frame, the difference data for the B frame is replaced with zero, and the prediction direction information of the B frame is set to the set reference destination. Replacement means for replacing an I or P frame whose display order is closer to the B frame from a frame indicating the frame with a frame indicating the I or P frame as a reference frame;
A moving picture coding apparatus comprising:
請求項3において、
前記置換手段は、前記シーンチェンジ検出手段によってシーンチェンジが検出されたフレームが前記Bフレームであるとき、当該Bフレームから前記置換後の参照フレームまでの間に存在するBフレームについても、前記差分データをゼロで置換し、且つ、前記予測方向情報を前記設定された参照先フレームを指示するものから前記置換後の参照先フレームを指示するものに置き換えて出力する、
ことを特徴とする動画像符号化装置。
In claim 3,
When the frame in which the scene change is detected by the scene change detecting unit is the B frame, the replacing unit also stores the difference data for the B frame existing between the B frame and the reference frame after the replacement. Is replaced with zero, and the prediction direction information is output by replacing the one indicating the set reference frame with the one indicating the reference frame after the replacement,
A moving picture coding apparatus characterized by the above-mentioned.
JP4730797A 1997-02-13 1997-02-13 Moving picture coding method and moving picture coding apparatus Expired - Fee Related JP3599942B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4730797A JP3599942B2 (en) 1997-02-13 1997-02-13 Moving picture coding method and moving picture coding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4730797A JP3599942B2 (en) 1997-02-13 1997-02-13 Moving picture coding method and moving picture coding apparatus

Publications (2)

Publication Number Publication Date
JPH10229563A JPH10229563A (en) 1998-08-25
JP3599942B2 true JP3599942B2 (en) 2004-12-08

Family

ID=12771643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4730797A Expired - Fee Related JP3599942B2 (en) 1997-02-13 1997-02-13 Moving picture coding method and moving picture coding apparatus

Country Status (1)

Country Link
JP (1) JP3599942B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100491530B1 (en) 2002-05-03 2005-05-27 엘지전자 주식회사 Method of determining motion vector
KR100480028B1 (en) * 2002-05-07 2005-03-30 엘지전자 주식회사 Improved direct prediction mode for b pictures by addition of syntax element indicating scene change
KR100901030B1 (en) * 2002-05-11 2009-06-04 엘지전자 주식회사 Method for coding moving picture
DK1742479T3 (en) 2002-07-11 2009-12-14 Panasonic Corp Multi-hypothesis B-image virtual display buffer with loan of space in H.264 post-decoder buffer
KR100794797B1 (en) 2002-10-14 2008-01-21 삼성전자주식회사 Apparatus of Writing and reproducing digital ?/? data and controlling method thereof
KR100668463B1 (en) 2004-12-31 2007-01-12 엠큐브웍스(주) Method for Selecting Multiple Reference Frame in Moving Pictures Data Encoding
JP7210944B2 (en) 2018-09-05 2023-01-24 富士通株式会社 Video encoding device, video encoding method and video encoding program
CN111770334B (en) * 2020-07-23 2023-09-22 西安万像电子科技有限公司 Data encoding method and device, and data decoding method and device

Also Published As

Publication number Publication date
JPH10229563A (en) 1998-08-25

Similar Documents

Publication Publication Date Title
JP4014263B2 (en) Video signal conversion apparatus and video signal conversion method
KR100599017B1 (en) Image data compression device and method
US6603815B2 (en) Video data processing apparatus, video data encoding apparatus, and methods thereof
KR100289852B1 (en) Image coding method, image coding apparatus and image recording medium
US6628713B1 (en) Method and device for data encoding and method for data transmission
JPH0998429A (en) Digital video signal encoding device and decoding device therefor
JPH08223577A (en) Moving image coding method and device therefor and moving image decoding method and device therefor
JP4616057B2 (en) Image coding apparatus and image coding method
JPH0818979A (en) Image processor
JP3599942B2 (en) Moving picture coding method and moving picture coding apparatus
JP2933561B2 (en) Video transcoder
KR100364748B1 (en) Apparatus for transcoding video
JP3599909B2 (en) Video encoding device
JPH07231449A (en) Encoder and decoder for picture signal
JP2002262293A (en) Moving image decoder and moving image decoding method
JPH05308628A (en) Moving image encoder
JPH0795536A (en) Device and method for reversely reproducing moving image
JPH07131793A (en) Video signal high efficiency coding device
JP3356413B2 (en) Image decoding method and apparatus
JP4359273B2 (en) Coding mode selection method
JP2002218470A (en) Method for converting image encoded data rate and device for converting image encoding rate
JP4000581B2 (en) Image coding apparatus and method
KR0157467B1 (en) Moving image encoding method and device
JPH10164594A (en) Compression encoding method for moving image and device therefor
JP4359274B2 (en) Video compression encoding device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040805

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040915

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

Free format text: PAYMENT UNTIL: 20070924

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20080924

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees