Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3953285B2 - MPEG encoding processing apparatus and processing method - Google Patents
[go: Go Back, main page]

JP3953285B2 - MPEG encoding processing apparatus and processing method - Google Patents

MPEG encoding processing apparatus and processing method Download PDF

Info

Publication number
JP3953285B2
JP3953285B2 JP2001153391A JP2001153391A JP3953285B2 JP 3953285 B2 JP3953285 B2 JP 3953285B2 JP 2001153391 A JP2001153391 A JP 2001153391A JP 2001153391 A JP2001153391 A JP 2001153391A JP 3953285 B2 JP3953285 B2 JP 3953285B2
Authority
JP
Japan
Prior art keywords
encoding
video
value
synchronization
signal
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
JP2001153391A
Other languages
Japanese (ja)
Other versions
JP2002354416A (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.)
NEC Electronics Corp
Original Assignee
NEC Electronics 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 NEC Electronics Corp filed Critical NEC Electronics Corp
Priority to JP2001153391A priority Critical patent/JP3953285B2/en
Publication of JP2002354416A publication Critical patent/JP2002354416A/en
Application granted granted Critical
Publication of JP3953285B2 publication Critical patent/JP3953285B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Synchronizing For Television (AREA)
  • Television Signal Processing For Recording (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明はMPEG符号化処理装置及び処理方法に関し、特に入力したアナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリームを生成するMPEG符号化処理装置及び処理方法に関する。
【0002】
【従来の技術】
MPEG(Moving Picture Experts Group)は、標準的な動画像圧縮符号化技術としてISO/IEC(国際標準化機構/国際電気標準会議)1381などで規定され、放送やAV(Audio−Video)機器などの画像、音声、データなどの情報圧縮技術として広く用いられている。
【0003】
まず、MPEGデータを生成する動画像符号化装置の動作概要について説明すると、この動画像符号化装置は動画像の時間方向の冗長性を削減する動き補償フレーム間予測符号化を採用している。
【0004】
動き補償フレーム間予測符号化は、まず、入力画像を、例えば16画素×16ラインのマクロブロックに分割し、すでに符号化した画像の復号画像を参照画像として、各マクロブロックに最も近い画像の領域を参照画像の中から探索して予測画像を作成するとともに、その予測画像の位置を動きベクトルとして符号化する。フレーム間予測を行う符号化画像には順方向予測を行うPピクチャ及び両方向予測を行うBピクチャの2つの画像タイプがある。また、符号化の初期状態や、伝送エラーが起こった場合のために、フレーム間予測を行わないで一つの画面内で符号化するIピクチャがある。
【0005】
順方向予測の場合、参照画像はすでに符号化した画像で、入力画像より時問的に前の画像である。また、両方向予測の場合、参照画像はすでに符号化した画像で、入力画像より時問的に前と後の画像の両方を用いる。すなわち、符号化する前に入力画像の順番を入れ替える必要がある。この場合、予測画像には、時間的に前の画像を参照画像としたときの予測画像と、時問的に後の画像を参照画像としたときの予測画像と、これらの予測画像の平均をとった画像の3つのうち、予測誤差の少ないものを選ぶ。入力画像と予測画像の差分を、予測誤差として離散コサイン変換(以下、DCT変換)、量子化、可変長符号化を用いて符号化する。
【0006】
MPEG符号化動画像データをストリームと呼ぶ。ストリーム中でIピクチャ又はPピクチャの現れる周期の値を符号化モードMと呼ぶ。Mの値が3(以下、M=3)の場合のビデオ符号化部105におけるビデオフレームFVの入力順及び符号化順、すなわち、ストリームBSの出力順の関係を模式的に説明図で示す図3(A)を参照すると、この図に示すI/P/Bの記号は、そのビデオフレームが符号化されるときの画像タイプ(ピクチャ)を示し、それに続く数字は入力順を表す。画質と符号量の関係から、一般的に使用されているM値は3である。この図に示すようにM=3では、フレーム入力順と符号化順に入れ替えが生じる。この例では、ビデオフレームFVがピクチャB0,B1,I2,B3,B4,P5の順で入力し、符号化がピクチャI2,B0,B1,P5,B3,B4の順で行われる。
【0007】
最近の機器のディジタル化の趨勢が進行する中で、例えば、家庭における映像(画像)の録画方式もVHS等のアナログ方式から、ディジタル方式のものに移行しつつある。例えば家庭内で保存を希望するアナログ方式の画像をディジタル方式で保存するニーズが考えられる。このような場合、ディジタル方式としてはMPEG規格による圧縮符号化(以下MPEG符号化)によりディジタル化することが一般的である。
【0008】
例えば、VHS方式で何回かに分割してビデオテープに録画した映像、すなわち、一連の複数の独立した録画映像を再生し、これをマスタとしてMPEG符号化してディジタル方式の記録媒体に記録する場合について考察する。この場合、再生されるアナログ映像は、上記分割単位でそれぞれ独立の映像であり、当然相互間の信号の同期関係はない。すなわち、アナログ映像としては各分割毎の映像の終了時点で、次の映像との信号の同期関係は絶たれている。従って、このような一連のアナログ映像を、MPEG符号化した場合、先に再生した映像と、次の映像との境界で映像信号の同期外れが発生し、MPEG符号化が正常にできないという問題がある。ここで、同期外れとは、映像信号の同期をとるために一定時間間隔で挿入してある同期信号が所定の間隔で現れないことをいう。同期信号の間隔は、ビデオ信号の規格により定められている。
【0009】
すなわち、分割して録画された映像では録画毎の境界では映像信号の同期外れが存在するが、その記録メディアの録画映像を連続再生してMPEG符号化する場合、MPEG符号化装置側から見ると、それは1シーケンス内での処理対象となる。また、放送番組のMPEG符号化によるディジタル録画の場合、MPEG符号化の途中で放送チャネルを切り替えた場合でも、映像信号の同期外れは避けられない。この場合も、MPEG符号化装置側から見ると、それは1シーケンス内での処理対象となる。また、受信電界が弱く正常に受信できない場合、無信号の場合、VTRの早送り・巻き戻しなどのビデオ信号は連続して同期外れが発生する。これらの場合、同期外れが生じた時点で正常なMPEG符号化ができなくなり、不完全なストリームを生成したり、全くストリームが生成できなくなったりしてしまう。
【0010】
以上の問題を解決し同期外れが発生した場合にもアナログ方式の映像信号を円滑にMPEG符号化できるようにすることを目的とした、特特開2000−23101号公報記載の従来のMPEG符号化処理装置をブロックで示す図4を参照すると、この図に示す従来のMPEG符号化処理装置は、アナログビデオ信号Vを入力し垂直同期信号(以下同期信号)SYとビデオデータDVを出力するビデオ入力部101と、同期信号SYを入力し計算したタイミングで次の擬似同期信号YQを出力する同期信号作成部102と、同期信号SYと擬似同期信号YQを入力し有効同期信号YUと同期外れが発生したことを通知する同期外れ通知信号NYを出力する同期信号比較部103と、複数のフレームメモリを備え有効同期信号YUとビデオデータDVを入力しビデオデータDVをフレームメモリに格納しビデオフレームFVを出力するとともにこのフレームメモリのアドレスをメモリアドレスAMとして出力するメモリ部104と、メモリアドレスAMと同期外れ通知信号NYを入力し符号化したデータであるストリーム信号BSを出力するビデオ符号化部105とを備える。
【0011】
次に、図4を参照して、従来のMPEG符号化処理装置の動作について説明すると、まず、ビデオ入力部101は、入力したアナログビデオ信号Vに応じてビデオデータDVと、抽出した同期信号SYを出力し、ビデオデータDVをメモリ部104に、同期信号SYを同期信号作成部102と同期信号比較部103とに供給する。メモリ部104は供給を受けたビデオデータDVを複数のフレームメモリに順次格納し、そのアドレスをメモリアドレスAMとして出力し、ビデオ符号化部105に供給する。ビデオ符号化部105は、メモリアドレスAMにより、符号化の対象とするフレームを特定する。メモリ部104が符号化に必要な枚数(所定枚数)分のビデオデータのフレーム(以下ビデオフレーム)FVを格納したら、ビデオ符号化部105は最初に符号化するビデオフレームFVを読出し、符号化を開始する。
【0012】
同期信号作成部102は、供給を受けた現在のビデオフレーム対応の現在の同期信号SYから次のビデオフレーム対応の次の同期信号のタイミングを計算し、そのタイミングで擬似同期信号YQを出力する。同期信号比較部103は、同期信号SYと擬似同期信号YQのうち、先に到達した方の信号を有効同期信号YUとして出力する。また、同期信号SYと擬似同期信号YQを比較し、同期信号SYの擬似同期信号YQに対するずれが一定値以上となる場合、同期外れとして検出する。同期外れを検出したら、同期外れ通知信号NYを出力しビデオ符号化部105に供給することにより通知する。ビデオ符号化部105は、同期外れ通知信号NYの供給により同期外れが通知されたらビデオ符号化を中止する。具体的には、同期外れが通知されたときに読み込み中のビデオフレームまで符号化完了したら以降のビデオフレームの符号化を停止する。同期外れ通知信号NYが消失すると符号化を再開する。
【0013】
この従来のMPEG符号化処理装置では、同期信号作成部が必要であるが、同期信号作成部がなくても動作可能である。しかし、この場合、画質と符号量の関係から一般的に使用する符号化モードであるM=3で同期外れのあるビデオ信号を符号化した場合、復号器でのピクチャ表示順で、中間のBピクチャが抜けてしまい、不完全なストリームを作成してしまう場合がある。この現象は、特に連続して同期外れが発生した場合に著しい。
【0014】
M=3の場合のストリームBSの出力順の関係を模式的に説明図で示す図3(A)を参照すると、その理由は、ストリームBSのピクチャI2を符号化開始するタイミング信号は、ビデオフレームFVのピクチャB3の同期信号を基準に作るが、ストリームBSのピクチャB0,B1を符号化開始するタイミング信号は、ビデオフレームFVのピクチャB4,P5の入力信号を基準とする。この場合、例えば、ビデオフレームFVのピクチャB3が同期外れのため正常でない場合、ストリームBSのピクチャB0を符号化できず欠落してしまい、同期外れ通知信号NYが発生しピクチャI2を符号化した時点で符号化処理を停止する。このため、復号器でピクチャB0,B1を表示すべきタイミングに表示対象とするピクチャがないという現象が起きる。
【0015】
ここでいう不完全なストリームとは、ストリーム中に、表示順で不連続なピクチャが入っていることを表す。例えば、この例のストリームにおいて、ピクチャP5の符号化中に同期外れが発生すると、このピクチャP5で符号化を停止する。このストリームを復号して表示するとき、ビデオフレームFVにおいて本来ピクチャB3,B4が表示されるはずのピクチャI2とP5の間で表示するピクチャがなく、2枚分の空きができてしまう。
【0016】
【発明が解決しようとする課題】
上述した従来のMPEG符号化処理装置及び処理方法は、画質と符号量の関係から一般的に使用する符号化モードであるM=3で符号化するとき、同期外れ、特に連続して同期外れのあるビデオ信号を符号化した場合、復号器でのピクチャ表示順で、中間のBピクチャが抜けてしまい、不完全なストリームを作成してしまう場合があるという欠点があった。
【0017】
本発明の目的は、上記欠点を解決し、符号化モードM=3で連続して同期外れのあるビデオ信号を符号化した場合も、不完全なストリームの作成を防止するMPEG符号化処理装置及び処理方法を提供することにある。
【0018】
【課題を解決するための手段】
請求項1記載の発明のMPEG符号化処理装置は、入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム)を生成する符号化手段を有するMPEG符号化処理装置において、
前記入力アナログビデオ信号に含まれる同期信号が不規則になる同期外れ発生による前記符号化の停止後に符号化を再開するときに、前記符号化手段に対して前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値に変更する符号化モード変更手段を備えて構成されている。
【0019】
請求項2記載の発明のMPEG符号化処理装置は、入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム信号)を生成する符号化手段を有するMPEG符号化処理装置において、
前記入力アナログビデオ信号を入力し同期信号とビデオデータとを出力するビデオ入力部と、
前記同期信号を入力し前記同期信号が不規則になる同期外れが発生したことを示す同期外れ検出信号を出力する同期外れ検出部と、
前記同期外れ検出信号と符号化状態を示す符号化状態信号とを入力し前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を指定するモード値信号とビデオ符号化の停止/再開を制御する符号化制御信号を出力するビデオ符号化制御部と、
複数のフレームメモリを備え前記同期信号と前記ビデオデータとを入力しこのビデオデータを前記フレームメモリに格納し前記符号化手段の読出に応じてビデオフレームを出力するとともにこのフレームメモリのアドレスをメモリアドレスとして出力するメモリ部と、
前記メモリアドレスと前記符号化制御信号と前記モード値信号を入力し前記メモリアドレス対応の前記ビデオフレームを読み出して動き補償フレーム間予測符号化し前記ストリーム信号と前記符号化状態信号とを出力する前記符号化手段であるビデオ符号化部とを備え、
前記ビデオ符号化制御部が、前記入力アナログビデオ信号に含まれる同期信号が不規則になる同期外れ発生による前記符号化の停止後に符号化を再開するときに、前記ビデオ符号化部に対して前記符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値に変更する符号化モード値設定部を備えて構成されている。
【0020】
また、請求項3記載の発明は、請求項1又は2記載のMPEG符号化処理装置において、前記符号化モードの値の前記第1の値が3であり、前記第2の値が1であることを特徴とするものである。
【0021】
請求項4記載の発明のMPEG符号化処理方法は、入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム)を生成する符号化手段を有するMPEG符号化処理方法において、
前記入力アナログビデオ信号に含まれる同期信号が不規則になる同期外れ発生による前記符号化の停止後に符号化を再開するときに、前記符号化手段に対して前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値に変更することを特徴とするものである。
【0022】
請求項5記載の発明のMPEG符号化処理方法は、入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム)を生成する符号化手段を有するMPEG符号化処理方法において、
入力した前記アナログビデオ信号から同期信号を抽出する同期信号抽出ステップと、
前記同期信号を監視し同期外れを検出する同期外れ検出ステップと、
前記同期外れ検出ステップで、同期外れを検出した場合、前記符号化手段に同期外れ検出を通知する同期外れ検出通知ステップと、
前記同期外れ検出通知により同期外れの発生を検知し、前記符号化手段にビデオ符号化停止を要求するビデオ符号化停止要求ステップと、
前記符号化制御信号による停止要求に応じてそのとき符号化中のビデオフレームの符号化完了時点でビデオ符号化を停止するビデオ符号化停止ステップと、
符号化停止状態を通知する符号化停止状態通知ステップと、
前記符号化停止状態通知により符号化停止したことを確認する符号化停止確認ステップと、
前記符号化停止確認ステップで符号化が停止していた場合、前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値に替えて同期外れ救済用の第2の値をセットする第2の値セットステップと、
前記ビデオ符号化の再開を要求するビデオ符号化再開要求ステップと、
前記ビデオ符号化再開要求に基づき前記符号化モードの第2の値で前記ビデオ符号化を再開するビデオ符号化再開ステップと、
同期信号が安定したと見なし得る予め設定した枚数のビデオフレームを符号化したかを判定する設定枚数符号化判定ステップと、
同期外れの無いことを確認する同期外れ無し確認ステップと、
前記符号化モードを前記第1の値に戻す第1の値セットステップと、
前記符号化モードの前記第1の値で前記ビデオ符号化を継続するビデオ符号化継続ステップとを有することを特徴とするものである。
【0023】
また、請求項6記載の発明は、請求項4又は5記載のMPEG符号化処理方法において、前記符号化モードの値の前記第1の値が3であり、前記第2の値が1であることを特徴とするものである。
【0024】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して詳細に説明する。
【0025】
本実施の形態のMPEG(Moving Picture Experts Group)符号化処理装置及び処理方法は、入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム)を生成する符号化手段を有するMPEG符号化処理装置において、上記入力アナログビデオ信号に含まれる同期信号が不規則になる同期外れ発生による符号化の停止後に符号化を再開するときに、上記符号化手段に対してストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値に変更する符号化モード変更手段を備え、同期外れによる符号化停止後に符号化を再開する時に、MPEGの符号化モードであるM値を第2の値である1にすることにより、連続して同期外れが起きる場合に、不完全なストリームを生成しないようにすることを特徴とするものである。
【0026】
次に、本発明の実施の形態をブロックで示す図1を参照すると、この図に示す本実施の形態のMPEG符号化処理装置は、アナログビデオ信号Vを入力し垂直同期信号(以下同期信号)SYとビデオデータDVとを出力するビデオ入力部1と、同期信号SYを入力し同期外れが起きたことを示す同期外れ検出信号DYを出力する同期外れ検出部2と、同期外れ検出信号DYと符号化状態を示す符号化状態信号SMとを入力し後述する符号化モードM値を指定するM値信号Mとビデオ符号化の停止/再開を制御する符号化制御信号CMを出力するビデオ符号化制御部3と、複数のフレームメモリを備え同期信号SYとビデオデータDVとを入力しビデオデータDVをフレームメモリに格納し後述のビデオ符号化部5の読出に応じてビデオフレームFVを出力するとともにこのフレームメモリのアドレスをメモリアドレスAMとして出力するメモリ部4と、メモリアドレスAMと符号化制御信号CMとM値信号Mを入力しメモリアドレスAM対応のビデオフレームFVを読み出して動き補償フレーム間予測符号化しMPEG符号化(以下符号化)したデータであるストリーム信号BSと符号化状態信号SMとを出力するビデオ符号化部5とを備える。
【0027】
ビデオ符号化制御部3は、符号化モードM値を設定するM値設定部31を備える。
【0028】
次に、図1及び各部の処理をフローチャートで示す図2を参照して本実施の形態の動作であるMPEG符号化処理方法について説明すると、まず、ビデオ符号化部5は、従来の技術で説明したように、各ビデオフレームFVを順方向予測符号化画像であるPピクチャ又は両方向予測を行う両方向予測符号化画像であるBピクチャ、又はフレーム内符号化画像であるIピクチャのいずれかの画像として符号化し、MPEG符号化動画像データであるストリームを生成する。
【0029】
ストリーム中でIピクチャ又はPピクチャの現れる周期の値を符号化モードMと呼ぶ。Mの値が3(以下、M=3)の場合のビデオフレームFVのメモリ部4における入力順及びビデオ符号化部5における符号化順、すなわち、ストリームBSの出力順の関係を模式的に説明図で示す図3(A)を参照すると、この図に示すI/P/Bの記号は、そのビデオフレームが符号化されるときの画像タイプ(ピクチャ)を示し、それに続く数字は入力順を表す。画質と符号量の関係から、一般的に使用されているM値は3である。この図に示すようにM=3では、フレーム入力順と符号化順に入れ替えが生じる。この例では、ビデオフレームFVがピクチャB0,B1,I2,B3,B4,P5の順で入力し、符号化がピクチャI2,B0,B1,P5,B3,B4の順で行われる。
【0030】
ビデオ符号化処理は、ビデオ入力の同期信号を基準にフレームメモリの書き込み領域切り替えなどの制御を行う。ビデオ信号に同期外れが起きると、符号化するフレームの順番が間違ったり、1枚のフレームの上下に別の画像が入ったりするので、同期外れを検出したピクチャの符号化完了時に、ビデオ符号化処理を停止し、ビデオ信号が正常に戻った後符号化を再開する。
【0031】
ここで、同期外れとは、映像信号の同期をとるために一定時間間隔で挿入してある同期信号が所定の間隔で現れないことをいう。同期信号の間隔は、ビデオ信号の規格により定められている。
【0032】
まず、ビデオ入力部1は、入力したアナログビデオ信号Vから同期信号SYを抽出し(同期信号抽出ステップS1)、ビデオデータDVをメモリ部4に、抽出した同期信号SYを同期外れ検出部2とメモリ部4とに供給する。
【0033】
以下、説明の便宜上、アナログビデオ信号がNTSC規格のTV信号であるものとし、同期信号SYは垂直同期信号であるものとし、符号化モードMの設定値(初期値)を3とする。従って、ビデオ符号化制御部3のM値設定部31には、初期値としてM=3を設定する。
【0034】
メモリ部4は、1フレーム単位で画像を格納する複数のフレームメモリを有し、ビデオ入力部1が出力したビデオデータDVを1フレーム単位でフレームメモリに格納する(このフレーム単位のビデオデータを以下ビデオフレームFVと呼ぶ)。同期信号SYにより、フレームの区切りを判別できる。符号化の開始前に格納するフレーム数を予め決めておけば、格納したフレーム数とその格納順を管理することにより符号化済みのフレームを特定できるので、符号化済みのビデオフレームを格納してあるフレームメモリを上書きすることにより、順次入力したビデオデータDV対応のビデオフレームFVを格納する。メモリ部4は、ビデオフレームFVを格納したフレームメモリのアドレスをメモリアドレスAMとして出力する。メモリアドレスAMから格納したビデオフレームFVを特定できる。
【0035】
ビデオ符号化部5は、必要な枚数分のビデオフレームFVをメモリ部4に格納したら符号化を開始する。メモリアドレスAMを監視することにより、メモリ部4に格納したビデオフレームFVの数が分かり、メモリアドレスAMを保存しておけばビデオフレームFVの入力順が分かる。例えば、この例の符号化モードM=3で符号化する場合、入力順と符号化順で入れ替えが起こるので、最低3枚のビデオフレームFVが格納されている必要がある。符号化モードM値、この例ではM=3に従ったビデオフレーム順(図3(A))で符号化を行う。
【0036】
同期外れ検出部2は、入力した同期信号SYを監視し、同期外れを検出する(同期外れ検出ステップS2)。入力するビデオ信号の規格により同期信号の間隔が決まっているので、現在処理中のビデオフレーム(以下現ビデオフレーム)FVの直前のビデオフレームFVPの同期信号(以下前同期信号)SYPからから現ビデオフレームFVの同期信号SYまでの時間、すなわち、同期信号周期を計測することにより、同期外れを検出できる。この例では、上述のように、NTSC規格のTV垂直同期信号であるので上記同期信号周期Tは1/60s、すなわち、16.67msとなる。従って検出した同期信号周期Tが上記値より一定時間、例えば5ms以上超過する場合同期外れとして検出する。
【0037】
同期外れ検出部2は、同期外れ検出ステップS2で、同期外れを検出した場合、同期外れ検出信号DYを出力し(Hレベル)、ビデオ符号化制御部3に供給して同期外れ検出を通知する(同期外れ検出通知ステップS3)。同期外れを検出しない場合は、上記符号化モードM=3で符号化を続行する。
【0038】
次に、ビデオ符号化制御部3は、同期外れ検出信号DYの入力より同期外れが起きたことを検知する。ビデオ符号化を停止するために、ビデオ符号化部5に対して、ビデオ符号化停止を要求する符号化制御信号CMを出力する(ビデオ符号化停止要求ステップS4)。
【0039】
ビデオ符号化部5は、符号化制御信号CMによる停止要求が送られてきたら、そのとき符号化中のビデオフレームの符号化完了時点でビデオ符号化を停止し(ビデオ符号化停止ステップS5)、符号化状態信号SMで符号化停止状態を出力し、ビデオ符号化制御部3に通知する(符号化停止状態通知ステップS6)。
【0040】
ビデオ符号化制御部3は、ビデオ符号化部5が出力する符号化状態信号SMにより、符号化停止したことを確認する(符号化停止確認ステップS7)。符号化が停止していた場合、M値設定部31は、初期設定値であるM=3に替えて同期外れ救済用のM値信号M=1をセットし(M=1のセットステップS8)、ビデオ符号化の再開を要求する符号化制御信号CMを出力する(ビデオ符号化再開要求ステップS9)。
【0041】
ビデオ符号化部5は、符号化制御信号CMで再開要求が送られてきたら、符号化開始時同様、必要な枚数分の同期外れのないフレームをメモリ部4に格納してからビデオ符号化を再開する(ビデオ符号化再開ステップS10)。このビデオ符号化再開時は、M=1のセットステップS8でM値信号Mにセットした符号化モードM=1を使用する。
【0042】
ビデオ符号化部5は、この符号化モードM=1の状態でビデオ符号化を再開する。同期信号が安定したと見なし得る予め設定した一定枚数のビデオフレームを復号化した時点で(設定枚数復号化判定ステップS12)、M値設定部31は、符号化モードMをビデオ符号化開始時の符号化モードMの初期値M=3に戻す(M=3にセットステップS13)。ビデオ符号化制御部3は上記設定枚数を符号化している間も同期外れ検出部2からの同期外れ検出信号を確認し(同期外れ無し確認ステップS11)、再度ビデオ符号化停止処理からやり直す。上記設定枚数は、例えば、何枚かのピクチャをひとまとまりとした単位であるGOP(Group of Pictures)とする。一般的には1GOPに含まれるピクチャは15枚程度であるので、この例では15枚とする。
【0043】
ビデオ符号化部5は、この符号化モードM=3の状態でビデオ符号化を継続する(ビデオ符号化ステップS14)。
【0044】
符号化モードMの値が1(以下、M=1)の場合のビデオフレームFVのメモリ部4における入力順及びビデオ符号化部5における符号化順、すなわち、ストリームBSの出力順の関係を模式的に説明図で示す図3(B)を参照すると、この図に示すように符号化モードM=1では、ビデオフレーム入力順と符号化順は同一であり、上述したM=3におけるようなビデオフレームの入れ替えはなく、この例では、ビデオフレームFVがピクチャI0,P1,P2,P3,P4,P5の順で入力し、符号化も同様にピクチャI0,P1,P2,P3,P4,P5の順で行われる。
【0045】
従って、M=1で符号化時に、連続して同期外れが発生しビデオ符号化を停止しても、ビデオ符号化再開時に入力順に符号化を継続するため、中間のピクチャが抜けてしまうことがないので2回目以降のビデオ符号化停止部分で不完全なストリームを作成することがなく、ピクチャが表示順で連続する。
【0046】
また、連続して同期外れが発生するビデオ信号を符号化したストリームを復号器で復号して表示するとき、2回目以降のビデオ符号化停止部分のストリームで、I/Pピクチャが存在するのにI/Pピクチャの前に表示するべきBピクチャが抜けるということがない。
【0047】
以上本発明の実施の形態を述べたが、本発明は上記実施の形態に限られることなく種々の変形が可能である。例えば、符号化モードの初期値M=3に限定すること無くMが1より大きい任意の値としてもよい。また、同期外れの無いことを確認するための枚数は15枚と限定することなく適宜設定することも本発明の主旨を逸脱しない限り適用できることは勿論である。
【0048】
【発明の効果】
以上説明したように、本発明のMPEG符号化処理装置及び処理方法は、同期外れ発生による符号化の停止後に符号化を再開するときに、符号化手段に対してストリーム中でIピクチャ又はPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値に変更する符号化モード変更手段を備え、同期外れを検出すると、符号化モードの値MをM=1に切り替えて符号化を再開することにより、連続して同期外れが発生しビデオ符号化を停止しても、ビデオ符号化再開時にこのM=1の特徴である入力順に符号化するため、中間のピクチャが抜けてしまうことがないので2回目以降のビデオ符号化停止部分で不完全なストリームを作成することがなく、ピクチャが表示順で連続するという効果がある。
【0049】
また、連続して同期外れが発生するビデオ信号を符号化したストリームを復号器で復号して表示するとき、2回目以降のビデオ符号化停止部分のストリームで、I/Pピクチャが存在するのにI/Pピクチャの前に表示するべきBピクチャが抜けるということがなく、正常に表示できるという効果がある。
【図面の簡単な説明】
【図1】本発明のMPEG符号化処理装置の第1の実施の形態を示すブロック図である。
【図2】本実施の形態のMPEG符号化処理装置における動作であるMPEG符号化処理処理方法の一例を示すフローチャートである。
【図3】メモリ部におけるビデオフレームの入力順とビデオ符号化部における符号化順の関係を模式的に示す説明図である。
【図4】従来のMPEG符号化処理装置の一例を示すブロック図である。
【符号の説明】
1,101 ビデオ入力部
2 同期外れ検出部
3 ビデオ符号化制御部
4,104 メモリ部
5,105 ビデオ符号化部
31 M値設定部
102 同期信号作成部
103 同期信号比較部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an MPEG encoding processing apparatus and processing method, and more particularly to an MPEG encoding processing apparatus and processing method for generating an MPEG bit stream that is data obtained by compressing and encoding an input analog video signal according to the MPEG standard.
[0002]
[Prior art]
MPEG (Moving Picture Experts Group) is defined by ISO / IEC (International Organization for Standardization / International Electrotechnical Commission) 1381 as a standard moving image compression coding technique, and is used for images such as broadcasting and AV (Audio-Video) equipment. It is widely used as an information compression technique for voice, data, etc.
[0003]
First, the outline of the operation of a moving picture coding apparatus that generates MPEG data will be described. This moving picture coding apparatus employs motion compensation interframe predictive coding that reduces redundancy in the time direction of moving pictures.
[0004]
In motion compensation interframe predictive coding, first, an input image is divided into macroblocks of, for example, 16 pixels × 16 lines, and a region of an image closest to each macroblock using a decoded image of an already encoded image as a reference image. Is searched from the reference image to create a predicted image, and the position of the predicted image is encoded as a motion vector. There are two types of encoded images that perform inter-frame prediction: a P picture that performs forward prediction and a B picture that performs bidirectional prediction. In addition, there is an I picture that is encoded in one screen without performing inter-frame prediction for an initial state of encoding or when a transmission error occurs.
[0005]
In the case of forward prediction, the reference image is an already encoded image and is an image temporally preceding the input image. In the case of bi-directional prediction, the reference image is an already encoded image, and both the images before and after the input image are used temporally. That is, it is necessary to change the order of input images before encoding. In this case, the predicted image includes a predicted image when the previous image is used as a reference image, a predicted image when the later image is used as a reference image, and an average of these predicted images. Of the three images taken, select the one with the least prediction error. The difference between the input image and the predicted image is encoded using a discrete cosine transform (hereinafter referred to as DCT transform), quantization, and variable length coding as a prediction error.
[0006]
MPEG encoded moving image data is called a stream. A value of a period in which an I picture or P picture appears in a stream is referred to as an encoding mode M. The figure which shows typically the relationship between the input order and encoding order of the video frame FV in the video encoding part 105 in case the value of M is 3 (henceforth M = 3), ie, the output order of stream BS, with explanatory drawing. Referring to FIG. 3 (A), the I / P / B symbol shown in this figure indicates the image type (picture) when the video frame is encoded, and the subsequent numbers indicate the input order. The M value generally used is 3 because of the relationship between the image quality and the code amount. As shown in the figure, when M = 3, the order of frame input and the order of encoding occur. In this example, a video frame FV is input in the order of pictures B0, B1, I2, B3, B4, and P5, and encoding is performed in the order of pictures I2, B0, B1, P5, B3, and B4.
[0007]
With the recent trend toward digitization of equipment, for example, video (image) recording methods at home are also shifting from analog methods such as VHS to digital methods. For example, there may be a need to store an analog image desired to be stored at home in a digital format. In such a case, as a digital system, it is common to digitize by compression coding (hereinafter, MPEG coding) according to the MPEG standard.
[0008]
For example, when video recorded on a video tape divided into several times in the VHS format, that is, a series of a plurality of independent recorded videos is reproduced, and this is MPEG-recorded as a master and recorded on a digital recording medium Consider. In this case, the analog video to be reproduced is an independent video for each of the division units, and there is naturally no signal synchronization relationship between them. In other words, the analog video is disconnected from the next video at the end of the video for each division. Therefore, when such a series of analog video is MPEG-encoded, the video signal is out of synchronization at the boundary between the previously reproduced video and the next video, and MPEG encoding cannot be normally performed. is there. Here, the loss of synchronization means that the synchronization signal inserted at regular time intervals for synchronizing the video signal does not appear at a predetermined interval. The interval of the synchronization signal is determined by the video signal standard.
[0009]
That is, in the video that is divided and recorded, the video signal is out of synchronization at the boundary of each recording, but when the recorded video of the recording medium is continuously reproduced and MPEG encoded, it is viewed from the MPEG encoding device side. , It becomes a processing target in one sequence. Also, in the case of digital recording by MPEG encoding of a broadcast program, loss of synchronization of video signals is inevitable even when the broadcast channel is switched during MPEG encoding. In this case as well, when viewed from the side of the MPEG encoding device, it becomes a processing target within one sequence. Further, when the reception electric field is weak and normal reception is not possible, and when there is no signal, video signals such as VTR fast forward and rewind continuously lose synchronization. In these cases, normal MPEG encoding cannot be performed at the time of loss of synchronization, and an incomplete stream or no stream can be generated.
[0010]
The conventional MPEG coding described in Japanese Patent Application Laid-Open No. 2000-23101 is intended to solve the above problems and to enable smooth MPEG coding of an analog video signal even when out-of-synchronization occurs. Referring to FIG. 4 showing the processing device in block form, the conventional MPEG encoding processing device shown in this figure receives an analog video signal V and outputs a vertical synchronizing signal (hereinafter referred to as synchronizing signal) SY and video data DV. Unit 101, synchronization signal generation unit 102 that outputs the next pseudo-synchronization signal YQ at the timing calculated by inputting the synchronization signal SY, and the synchronization signal SY and the pseudo-synchronization signal YQ are input and the synchronization signal YU is out of synchronization. A synchronization signal comparison unit 103 that outputs an out-of-synchronization notification signal NY for notifying that it has been performed, a plurality of frame memories, and an effective synchronization signal YU and video data. DV is input, video data DV is stored in the frame memory, the video frame FV is output, and the address of this frame memory is output as the memory address AM. The memory address AM and the out-of-synchronization notification signal NY are input. And a video encoding unit 105 that outputs a stream signal BS that is converted data.
[0011]
Next, the operation of the conventional MPEG encoding processing apparatus will be described with reference to FIG. 4. First, the video input unit 101 receives video data DV according to the input analog video signal V and the extracted synchronization signal SY. And the video data DV is supplied to the memory unit 104, and the synchronization signal SY is supplied to the synchronization signal generation unit 102 and the synchronization signal comparison unit 103. The memory unit 104 sequentially stores the supplied video data DV in a plurality of frame memories, outputs the addresses as memory addresses AM, and supplies them to the video encoding unit 105. The video encoding unit 105 specifies a frame to be encoded based on the memory address AM. When the memory unit 104 stores frames (hereinafter referred to as video frames) FV of the number of video data necessary for encoding (predetermined number), the video encoding unit 105 reads out the video frame FV to be encoded first, and performs encoding. Start.
[0012]
The synchronization signal generator 102 calculates the timing of the next synchronization signal corresponding to the next video frame from the supplied current synchronization signal SY corresponding to the current video frame, and outputs the pseudo synchronization signal YQ at that timing. The synchronization signal comparison unit 103 outputs, as the effective synchronization signal YU, the signal that has arrived first among the synchronization signal SY and the pseudo synchronization signal YQ. Further, the synchronization signal SY is compared with the pseudo synchronization signal YQ, and when the shift of the synchronization signal SY with respect to the pseudo synchronization signal YQ exceeds a certain value, it is detected as out of synchronization. When out-of-synchronization is detected, the out-of-synchronization notification signal NY is output and supplied to the video encoding unit 105 for notification. The video encoding unit 105 stops the video encoding when the loss of synchronization is notified by the supply of the synchronization loss notification signal NY. Specifically, when encoding is completed up to the video frame being read when the synchronization is notified, encoding of the subsequent video frames is stopped. When the out-of-synchronization notification signal NY disappears, encoding is resumed.
[0013]
This conventional MPEG encoding processing apparatus requires a synchronization signal generation unit, but can operate without a synchronization signal generation unit. However, in this case, when an out-of-synchronization video signal is encoded with M = 3, which is a commonly used encoding mode, from the relationship between the image quality and the code amount, an intermediate B in the picture display order in the decoder. There are cases where a picture is lost and an incomplete stream is created. This phenomenon is remarkable particularly when out-of-synchronization occurs.
[0014]
Referring to FIG. 3A schematically showing the relationship of the output order of the stream BS when M = 3, the reason is that the timing signal for starting encoding the picture I2 of the stream BS is a video frame. The timing signal for starting the encoding of the pictures B0 and B1 of the stream BS is based on the input signals of the pictures B4 and P5 of the video frame FV. In this case, for example, when the picture B3 of the video frame FV is not normal due to loss of synchronization, the picture B0 of the stream BS cannot be encoded and is lost, and the synchronization loss notification signal NY is generated and the picture I2 is encoded. To stop the encoding process. For this reason, there occurs a phenomenon that there is no picture to be displayed at the timing when the pictures B0 and B1 are to be displayed by the decoder.
[0015]
The incomplete stream here means that a discontinuous picture is included in the display order in the stream. For example, in the stream of this example, when a loss of synchronization occurs during the encoding of the picture P5, the encoding is stopped at the picture P5. When this stream is decoded and displayed, there is no picture to be displayed between the pictures I2 and P5 where the pictures B3 and B4 are supposed to be displayed in the video frame FV, and there is a space for two.
[0016]
[Problems to be solved by the invention]
The conventional MPEG encoding processing apparatus and processing method described above is out of synchronization when encoding with M = 3, which is a commonly used encoding mode, because of the relationship between image quality and code amount. When a certain video signal is encoded, there is a drawback that an intermediate B picture may be lost in the picture display order in the decoder, and an incomplete stream may be generated.
[0017]
An object of the present invention is to solve the above-described drawbacks and to provide an MPEG encoding processing apparatus that prevents the creation of an incomplete stream even when a video signal that is continuously out of synchronization is encoded in the encoding mode M = 3. It is to provide a processing method.
[0018]
[Means for Solving the Problems]
The MPEG encoding processing apparatus according to the first aspect of the present invention is an MPEG encoding apparatus having encoding means for generating an MPEG bit stream (hereinafter referred to as a stream) which is data obtained by compressing and encoding an input analog video signal according to the MPEG standard. In the processing device,
When resuming encoding after the stop of encoding due to out-of-synchronization that causes the synchronization signal included in the input analog video signal to become irregular, an intra-frame encoded image in the stream is sent to the encoding means. The encoding mode value, which is the value of the period in which a certain I picture or P picture, which is a forward predictive encoded image, appears, is changed from a first value, which is a normal initial setting value, to a second value for loss of synchronization relief. The encoding mode changing means for changing is provided.
[0019]
An MPEG encoding processing apparatus according to a second aspect of the present invention is an MPEG code having encoding means for generating an MPEG bit stream (hereinafter referred to as stream signal) which is data obtained by compressing and encoding an input analog video signal according to the MPEG standard. In the processing equipment,
A video input unit for inputting the input analog video signal and outputting a synchronization signal and video data;
An out-of-synchronization detection unit that inputs the synchronization signal and outputs an out-of-synchronization detection signal indicating that an out-of-synchronization occurs in which the synchronization signal becomes irregular;
It is a value of a period in which an I picture which is an intra-frame encoded image or a P picture which is a forward prediction encoded image appears in the stream when the out-of-sync detection signal and an encoding state signal indicating an encoding state are input. A video encoding control unit for outputting a mode value signal for specifying a value of the encoding mode and an encoding control signal for controlling stop / restart of video encoding;
Provided with a plurality of frame memories, inputs the synchronization signal and the video data, stores the video data in the frame memory, outputs a video frame in response to reading of the encoding means, and sets the address of the frame memory as a memory address A memory unit that outputs as
The code that inputs the memory address, the encoding control signal, and the mode value signal, reads the video frame corresponding to the memory address, performs motion compensation interframe prediction encoding, and outputs the stream signal and the encoding state signal A video encoding unit which is an encoding means,
When the video encoding control unit restarts encoding after the stop of encoding due to out-of-synchronization occurrence in which a synchronization signal included in the input analog video signal becomes irregular, the video encoding unit The encoding mode value setting unit is configured to change the encoding mode value from the first value which is the initial set value in the normal state to the second value for loss of synchronization relief.
[0020]
According to a third aspect of the present invention, in the MPEG encoding processing apparatus according to the first or second aspect, the first value of the encoding mode value is 3, and the second value is 1. It is characterized by this.
[0021]
According to a fourth aspect of the present invention, there is provided an MPEG encoding method comprising an encoding means for generating an MPEG bit stream (hereinafter referred to as a stream) which is data obtained by compressing and encoding an input analog video signal according to the MPEG standard. In the processing method,
When resuming encoding after the stop of encoding due to out-of-synchronization that causes the synchronization signal included in the input analog video signal to become irregular, an intra-frame encoded image in the stream is sent to the encoding means. The encoding mode value, which is the value of the period in which a certain I picture or P picture, which is a forward predictive encoded image, appears, is changed from a first value, which is a normal initial setting value, to a second value for loss of synchronization relief. It is characterized by changing.
[0022]
According to a fifth aspect of the present invention, there is provided an MPEG encoding method comprising MPEG encoding means for generating an MPEG bit stream (hereinafter referred to as stream) which is data encoded by compressing and encoding an input analog video signal in accordance with the MPEG standard. In the processing method,
A synchronization signal extracting step of extracting a synchronization signal from the input analog video signal;
A synchronization loss detection step of monitoring the synchronization signal and detecting a synchronization loss;
When detecting out-of-synchronization in the out-of-synchronization detection step, out-of-synchronization detection notifying step for notifying the encoding means of out-of-synchronization detection; and
Video encoding stop request step for detecting occurrence of loss of synchronization by the out of sync detection notification and requesting the encoding means to stop video encoding;
In response to a stop request by the encoding control signal, a video encoding stop step for stopping video encoding at the completion of encoding of the video frame being encoded at that time;
An encoding stop state notifying step for notifying an encoding stop state;
An encoding stop confirmation step for confirming that the encoding has been stopped by the encoding stop state notification;
When encoding is stopped in the encoding stop confirmation step, an encoding mode that is a value of a cycle in which an I picture that is an intra-frame encoded image or a P picture that is a forward prediction encoded image appears in the stream A second value setting step of setting a second value for out-of-synchronization relief in place of the first value which is a normal initial setting value;
A video encoding restart request step for requesting restart of the video encoding;
Resuming a video encoding step of resuming the video encoding with a second value of the encoding mode based on the video encoding restart request;
A set number encoding determination step for determining whether or not a predetermined number of video frames that the synchronization signal can be regarded as stable have been encoded;
A step of confirming that there is no loss of synchronization;
A first value setting step for returning the encoding mode to the first value;
A video encoding continuation step of continuing the video encoding with the first value of the encoding mode.
[0023]
The invention according to claim 6 is the MPEG encoding processing method according to claim 4 or 5, wherein the first value of the encoding mode value is 3, and the second value is 1. It is characterized by this.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described in detail with reference to the drawings.
[0025]
The MPEG (Moving Picture Experts Group) encoding processing apparatus and processing method according to the present embodiment is a code for generating an MPEG bit stream (hereinafter referred to as a stream) that is data obtained by compressing and encoding an input analog video signal according to the MPEG standard. In the MPEG encoding processing apparatus having the encoding means, when the encoding is resumed after the encoding is stopped after the out-of-synchronization occurs in which the synchronization signal included in the input analog video signal becomes irregular, Synchronizes the value of the encoding mode, which is the value of the period in which an I picture that is an intra-frame encoded image or a P picture that is a forward prediction encoded image, appears in the stream from the first value that is a normal initial setting value. Coding mode changing means for changing to the second value for out-of-phase relief is provided, When resuming encoding after stopping the encoding, the M value, which is the MPEG encoding mode, is set to the second value, 1, so that an incomplete stream is not generated when continuous loss of synchronization occurs. It is characterized by that.
[0026]
Next, referring to FIG. 1 showing the embodiment of the present invention in block form, the MPEG coding processing apparatus of the present embodiment shown in this figure receives an analog video signal V and receives a vertical synchronization signal (hereinafter referred to as a synchronization signal). A video input unit 1 that outputs SY and video data DV, an out-of-synchronization detection unit 2 that inputs a synchronization signal SY and outputs an out-of-synchronization detection signal DY indicating that out-of-synchronization has occurred, and an out-of-synchronization detection signal DY Video encoding for inputting an encoding state signal SM indicating an encoding state and outputting an M value signal M for specifying an encoding mode M value, which will be described later, and an encoding control signal CM for controlling stop / restart of video encoding The control unit 3 is provided with a plurality of frame memories, receives the synchronization signal SY and the video data DV, stores the video data DV in the frame memory, and reads the video frame in accordance with the reading of the video encoding unit 5 described later. The memory unit 4 outputs FV and outputs the address of the frame memory as the memory address AM, and inputs the memory address AM, the encoding control signal CM, and the M value signal M, and reads the video frame FV corresponding to the memory address AM. It includes a video encoding unit 5 that outputs a stream signal BS and encoding state signal SM, which are data that has been motion-compensated interframe prediction encoded and MPEG encoded (hereinafter encoded).
[0027]
The video encoding control unit 3 includes an M value setting unit 31 that sets an encoding mode M value.
[0028]
Next, with reference to FIG. 1 and FIG. 2 showing the processing of each unit in a flowchart, the MPEG encoding processing method as the operation of the present embodiment will be described. First, the video encoding unit 5 will be described in the prior art. As described above, each video frame FV is an image of either a P picture that is a forward prediction encoded image, a B picture that is a bidirectional prediction encoded image that performs bidirectional prediction, or an I picture that is an intra-frame encoded image. Encoding and generating a stream that is MPEG encoded moving image data.
[0029]
A value of a period in which an I picture or P picture appears in a stream is referred to as an encoding mode M. The relationship between the input order of the video frame FV in the memory unit 4 and the encoding order in the video encoding unit 5, that is, the output order of the stream BS when the value of M is 3 (hereinafter, M = 3) is schematically described. Referring to FIG. 3A, the I / P / B symbol shown in this figure indicates the image type (picture) when the video frame is encoded, and the subsequent numbers indicate the input order. To express. The M value generally used is 3 because of the relationship between the image quality and the code amount. As shown in the figure, when M = 3, the order of frame input and the order of encoding occur. In this example, a video frame FV is input in the order of pictures B0, B1, I2, B3, B4, and P5, and encoding is performed in the order of pictures I2, B0, B1, P5, B3, and B4.
[0030]
In the video encoding process, control such as switching of the writing area of the frame memory is performed based on the synchronization signal of the video input. If the video signal is out of sync, the order of the frames to be encoded will be wrong, or another image will be inserted above and below one frame. Processing is stopped, and encoding is resumed after the video signal returns to normal.
[0031]
Here, the loss of synchronization means that the synchronization signal inserted at regular time intervals for synchronizing the video signal does not appear at a predetermined interval. The interval of the synchronization signal is determined by the video signal standard.
[0032]
First, the video input unit 1 extracts a synchronization signal SY from the input analog video signal V (synchronization signal extraction step S1), the video data DV is stored in the memory unit 4, and the extracted synchronization signal SY is extracted from the synchronization detection unit 2. To the memory unit 4.
[0033]
Hereinafter, for convenience of explanation, it is assumed that the analog video signal is an NTSC standard TV signal, the synchronization signal SY is a vertical synchronization signal, and the setting value (initial value) of the encoding mode M is 3. Therefore, M = 3 is set as an initial value in the M value setting unit 31 of the video encoding control unit 3.
[0034]
The memory unit 4 has a plurality of frame memories for storing images in units of one frame, and stores the video data DV output from the video input unit 1 in the frame memory in units of one frame. Called video frame FV). A frame delimiter can be determined by the synchronization signal SY. If the number of frames to be stored before the start of encoding is determined in advance, the encoded frames can be identified by managing the number of stored frames and their storage order. By overwriting a certain frame memory, the video frames FV corresponding to the sequentially input video data DV are stored. The memory unit 4 outputs the address of the frame memory storing the video frame FV as the memory address AM. The stored video frame FV can be specified from the memory address AM.
[0035]
The video encoding unit 5 starts encoding after storing the required number of video frames FV in the memory unit 4. By monitoring the memory address AM, the number of video frames FV stored in the memory unit 4 can be known, and by storing the memory address AM, the input order of the video frames FV can be known. For example, when encoding is performed in the encoding mode M = 3 in this example, since the input order and the encoding order are switched, it is necessary to store at least three video frames FV. Encoding is performed in the encoding mode M value, in this example, in the video frame order according to M = 3 (FIG. 3A).
[0036]
The out-of-synchronization detection unit 2 monitors the input synchronization signal SY and detects out-of-synchronization (out-of-synchronization detection step S2). Since the interval of the synchronization signal is determined according to the standard of the video signal to be input, the current video is started from the synchronization signal (hereinafter referred to as the previous synchronization signal) SYP of the video frame FVP immediately before the currently processed video frame (hereinafter referred to as the current video frame) FV. The loss of synchronization can be detected by measuring the time until the synchronization signal SY of the frame FV, that is, the synchronization signal period. In this example, as described above, since it is an NTSC standard TV vertical synchronizing signal, the synchronizing signal period T is 1/60 s, that is, 16.67 ms. Therefore, if the detected synchronization signal period T exceeds the above value by a certain time, for example, 5 ms or more, it is detected as out of synchronization.
[0037]
The out-of-synchronization detection unit 2 outputs an out-of-synchronization detection signal DY (H level) when the out-of-synchronization is detected in the out-of-synchronization detection step S2, and supplies it to the video encoding control unit 3 to notify the out-of-synchronization detection. (Out of synchronization detection notification step S3). If no loss of synchronization is detected, encoding is continued in the encoding mode M = 3.
[0038]
Next, the video encoding control unit 3 detects that a synchronization loss has occurred from the input of the synchronization loss detection signal DY. In order to stop the video encoding, an encoding control signal CM for requesting the video encoding stop is output to the video encoding unit 5 (video encoding stop request step S4).
[0039]
When a stop request is sent by the encoding control signal CM, the video encoding unit 5 stops video encoding at the time when encoding of the video frame being encoded is completed (video encoding stop step S5). The encoding stop signal is output by the encoding state signal SM and notified to the video encoding control unit 3 (encoding stop state notification step S6).
[0040]
The video encoding control unit 3 confirms that the encoding is stopped by the encoding state signal SM output from the video encoding unit 5 (encoding stop confirmation step S7). When the encoding is stopped, the M value setting unit 31 sets the M value signal M = 1 for losing synchronization instead of the initial setting value M = 3 (set step S8 where M = 1) Then, an encoding control signal CM for requesting restart of video encoding is output (video encoding restart request step S9).
[0041]
When a restart request is sent with the encoding control signal CM, the video encoding unit 5 stores the necessary number of frames out of synchronization in the memory unit 4 and then performs video encoding as in the case of encoding start. Restart (video encoding restart step S10). When the video encoding is resumed, the encoding mode M = 1 set in the M-value signal M in the setting step S8 of M = 1 is used.
[0042]
The video encoding unit 5 resumes video encoding in this encoding mode M = 1. When a predetermined number of video frames that can be regarded as being stable is decoded (set number decoding determination step S12), the M value setting unit 31 sets the encoding mode M at the start of video encoding. The initial value M of the encoding mode M is returned to 3 (set to M = 3, step S13). The video encoding control unit 3 confirms the out-of-synchronization detection signal from the out-of-synchronization detecting unit 2 while encoding the set number of sheets (step S11 for confirming no out-of-synchronization), and starts again from the video encoding stop process. The set number of sheets is, for example, GOP (Group of Pictures) which is a unit of several pictures. Generally, there are about 15 pictures included in one GOP, so in this example, 15 pictures are used.
[0043]
The video encoding unit 5 continues video encoding in this encoding mode M = 3 (video encoding step S14).
[0044]
The relationship between the input order of the video frame FV in the memory unit 4 and the encoding order in the video encoding unit 5, that is, the output order of the stream BS when the value of the encoding mode M is 1 (hereinafter, M = 1) is schematically shown. Referring to FIG. 3B, which is an explanatory diagram, in the encoding mode M = 1, the video frame input order and encoding order are the same as shown in FIG. In this example, video frames FV are input in the order of pictures I0, P1, P2, P3, P4, and P5, and encoding is similarly performed for pictures I0, P1, P2, P3, P4, and P5. It is done in the order.
[0045]
Therefore, even if M = 1 and a loss of synchronization occurs continuously and video encoding is stopped, since the encoding is continued in the order of input when video encoding is resumed, an intermediate picture may be lost. Since there is no incomplete stream at the second and subsequent video encoding stop portions, the pictures continue in the display order.
[0046]
In addition, when a stream obtained by encoding a video signal that continuously loses synchronization is decoded by a decoder and displayed, an I / P picture exists in the second or subsequent video encoding stop stream. There is no loss of the B picture to be displayed before the I / P picture.
[0047]
Although the embodiment of the present invention has been described above, the present invention is not limited to the above embodiment, and various modifications can be made. For example, M may be an arbitrary value larger than 1 without being limited to the initial value M = 3 of the encoding mode. Of course, the number of sheets for confirming that there is no loss of synchronization is appropriately set without being limited to 15, so long as it does not depart from the gist of the present invention.
[0048]
【The invention's effect】
As described above, the MPEG encoding processing apparatus and processing method according to the present invention allows an I picture or a P picture in a stream to the encoding means when encoding is resumed after the encoding is stopped due to out-of-synchronization. Coding mode change means for changing the value of the encoding mode, which is the value of the period in which the error occurs, from the first value, which is the initial setting value in the normal state, to the second value for out-of-synchronization relief, and detects loss of synchronization Then, by switching the encoding mode value M to M = 1 and restarting the encoding, even if a loss of synchronization occurs continuously and the video encoding is stopped, this M = 1 when the video encoding is resumed. Since encoding is performed in the order of input, which is a feature, there is no loss of intermediate pictures, so an incomplete stream is not created at the second and subsequent video encoding stop portions, and pictures are consecutive in display order. There is a cormorant effect.
[0049]
In addition, when a stream obtained by encoding a video signal that continuously loses synchronization is decoded by a decoder and displayed, an I / P picture exists in the second or subsequent video encoding stop stream. There is an effect that the B picture to be displayed before the I / P picture is not lost and can be normally displayed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a first embodiment of an MPEG encoding processing apparatus according to the present invention.
FIG. 2 is a flowchart showing an example of an MPEG encoding processing method that is an operation in the MPEG encoding processing apparatus according to the present embodiment;
FIG. 3 is an explanatory diagram schematically showing a relationship between an input order of video frames in a memory unit and an encoding order in a video encoding unit.
FIG. 4 is a block diagram showing an example of a conventional MPEG encoding processing apparatus.
[Explanation of symbols]
1,101 Video input section
2 Out of sync detector
3 Video encoding control unit
4,104 Memory part
5,105 video encoding unit
31 M value setting section
102 Sync signal generator
103 Sync signal comparator

Claims (6)

入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム)を生成する符号化手段を有するMPEG符号化処理装置において、
前記入力アナログビデオ信号に含まれる同期信号が不規則になる同期外れ発生による前記符号化の停止後に符号化を再開するときに、
前記符号化手段に対して前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値である1に変更する符号化モード変更手段を備える
ことを特徴とするMPEG符号化処理装置。
In an MPEG encoding processing apparatus having encoding means for generating an MPEG bit stream (hereinafter referred to as a stream) that is data obtained by compressing and encoding an input analog video signal according to the MPEG standard,
When resuming encoding after stopping the encoding due to out-of-synchronization occurring in which the synchronization signal included in the input analog video signal becomes irregular,
An encoding mode value that is a value of a period in which an I picture that is an intra-frame encoded image or a P picture that is a forward prediction encoded image appears in the stream with respect to the encoding means. An MPEG encoding processing apparatus comprising encoding mode changing means for changing from a first value of 1 to 1 which is a second value for out-of-sync relief.
入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム信号)を生成する符号化手段を有するMPEG符号化処理装置において、
前記入力アナログビデオ信号を入力し同期信号とビデオデータとを出力するビデオ入力部と、
前記同期信号を入力し前記同期信号が不規則になる同期外れが発生したことを示す同期外れ検出信号を出力する同期外れ検出部と、
前記同期外れ検出信号と符号化状態を示す符号化状態信号とを入力し前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を指定するモード値信号とビデオ符号化の停止/再開を制御する符号化制御信号を出力するビデオ符号化制御部と、
複数のフレームメモリを備え前記同期信号と前記ビデオデータとを入力しこのビデオデータを前記フレームメモリに格納し前記符号化手段の読出に応じてビデオフレームを出力するとともにこのフレームメモリのアドレスをメモリアドレスとして出力するメモリ部と、前記メモリアドレスと前記符号化制御信号と前記モード値信号を入力し前記メモリアドレス対応の前記ビデオフレームを読み出して動き補償フレーム間予測符号化し前記ストリーム信号と前記符号化状態信号とを出力する前記符号化手段であるビデオ符号化部とを備え、
前記ビデオ符号化制御部が、前記入力アナログビデオ信号に含まれる同期信号が不規則になる同期外れ発生による前記符号化の停止後に符号化を再開するときに、前記ビデオ符号化部に対して前記符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値である1に変更する符号化モード値設定部を備える
ことを特徴とするMPEG符号化処理装置。
In an MPEG encoding processing apparatus having encoding means for generating an MPEG bit stream (hereinafter referred to as a stream signal) which is data obtained by compressing and encoding an input analog video signal according to the MPEG standard,
A video input unit for inputting the input analog video signal and outputting a synchronization signal and video data;
An out-of-synchronization detection unit that inputs the synchronization signal and outputs an out-of-synchronization detection signal indicating that an out-of-synchronization occurs in which the synchronization signal becomes irregular;
It is a value of a period in which an I picture which is an intra-frame encoded image or a P picture which is a forward prediction encoded image appears in the stream when the out-of-sync detection signal and an encoding state signal indicating an encoding state are input. A video encoding control unit for outputting a mode value signal for specifying a value of the encoding mode and an encoding control signal for controlling stop / restart of video encoding;
Provided with a plurality of frame memories, inputs the synchronization signal and the video data, stores the video data in the frame memory, outputs a video frame in response to reading of the encoding means, and sets the address of the frame memory as a memory address A memory unit that outputs the memory address, the encoding control signal, and the mode value signal, reads the video frame corresponding to the memory address, performs motion compensation inter-frame predictive encoding, the stream signal, and the encoding state A video encoding unit which is the encoding means for outputting a signal,
When the video encoding control unit restarts encoding after the stop of encoding due to out-of-synchronization occurrence in which a synchronization signal included in the input analog video signal becomes irregular, the video encoding unit MPEG encoding, characterized in that it comprises the coding mode setting unit to change the value of the encoding mode to 1 which is the second value of the out-of-sync for relief from a first value is a default value for the normal Processing equipment.
前記符号化モードの値の前記第1の値が3である
ことを特徴とする請求項1又は2記載のMPEG符号化処理装置。
3. The MPEG encoding processing apparatus according to claim 1, wherein the first value of the encoding mode value is 3.
入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム)を生成する符号化手段を有するMPEG符号化処理方法において、
前記入力アナログビデオ信号に含まれる同期信号が不規則になる同期外れ発生による前記符号化の停止後に符号化を再開するときに、前記符号化手段に対して前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値から同期外れ救済用の第2の値である1に変更する
ことを特徴とするMPEG符号化処理方法。
In an MPEG encoding processing method having encoding means for generating an MPEG bit stream (hereinafter referred to as stream) which is data obtained by compressing and encoding an input analog video signal according to the MPEG standard,
When resuming encoding after the stop of encoding due to out-of-synchronization that causes the synchronization signal included in the input analog video signal to become irregular, an intra-frame encoded image in the stream is sent to the encoding means. in a second value for the relief out of synchronization values for certain I-picture or forward a predictive coded picture of the period of appearance of P-picture is a value encoding mode from a first value is a default value for the normal An MPEG encoding processing method characterized by changing to one .
入力アナログビデオ信号をMPEG規格で圧縮符号化して符号化したデータであるMPEGビットストリーム(以下ストリーム)を生成する符号化手段を有するMPEG符号化処理方法において、
入力した前記アナログビデオ信号から同期信号を抽出する同期信号抽出ステップと、
前記同期信号を監視し同期外れを検出する同期外れ検出ステップと、
前記同期外れ検出ステップで、同期外れを検出した場合、前記符号化手段に同期外れ検出を通知する同期外れ検出通知ステップと、
前記同期外れ検出通知により同期外れの発生を検知し、前記符号化手段にビデオ符号化停止を要求するビデオ符号化停止要求ステップと、
前記符号化制御信号による停止要求に応じてそのとき符号化中のビデオフレームの符号化完了時点でビデオ符号化を停止するビデオ符号化停止ステップと、
符号化停止状態を通知する符号化停止状態通知ステップと、
前記符号化停止状態通知により符号化停止したことを確認する符号化停止確認ステップと、
前記符号化停止確認ステップで符号化が停止していた場合、前記ストリーム中でフレーム内符号化画像であるIピクチャ又は順方向予測符号化画像であるPピクチャの現れる周期の値である符号化モードの値を通常時の初期設定値である第1の値に替えて同期外れ救済用の第2の値である1をセットする第2の値セットステップと、
前記ビデオ符号化の再開を要求するビデオ符号化再開要求ステップと、
前記ビデオ符号化再開要求に基づき前記符号化モードを前記第2の値である1として前記ビデオ符号化を再開するビデオ符号化再開ステップと、
同期信号が安定したと見なし得る予め設定した枚数のビデオフレームを符号化したかを判定する設定枚数符号化判定ステップと、
同期外れの無いことを確認する同期外れ無し確認ステップと、
前記符号化モードを前記第1の値に戻す第1の値セットステップと、
前記符号化モードの前記第1の値で前記ビデオ符号化を継続するビデオ符号化継続ステップとを有する
ことを特徴とするMPEG符号化処理方法。
In an MPEG encoding processing method having encoding means for generating an MPEG bit stream (hereinafter referred to as stream) which is data obtained by compressing and encoding an input analog video signal according to the MPEG standard,
A synchronization signal extracting step of extracting a synchronization signal from the input analog video signal;
A synchronization loss detection step of monitoring the synchronization signal and detecting a synchronization loss;
When detecting out-of-synchronization in the out-of-synchronization detection step, out-of-synchronization detection notifying step for notifying the encoding means of out-of-synchronization detection; and
Video encoding stop request step for detecting occurrence of loss of synchronization by the out of sync detection notification and requesting the encoding means to stop video encoding;
In response to a stop request by the encoding control signal, a video encoding stop step for stopping video encoding at the completion of encoding of the video frame being encoded at that time;
An encoding stop state notifying step for notifying an encoding stop state;
An encoding stop confirmation step for confirming that the encoding has been stopped by the encoding stop state notification;
When encoding is stopped in the encoding stop confirmation step, an encoding mode that is a value of a cycle in which an I picture that is an intra-frame encoded image or a P picture that is a forward prediction encoded image appears in the stream A second value setting step of setting 1 which is a second value for out-of-synchronization relief in place of the first value which is a normal initial setting value;
A video encoding restart request step for requesting restart of the video encoding;
A video encoding restarting step for restarting the video encoding with the encoding mode being the second value of 1 based on the video encoding restart request;
A set number encoding determination step for determining whether or not a predetermined number of video frames that the synchronization signal can be regarded as stable have been encoded;
A step of confirming that there is no loss of synchronization;
A first value setting step for returning the encoding mode to the first value;
And a video encoding continuation step for continuing the video encoding with the first value of the encoding mode.
前記符号化モードの値の前記第1の値が3である
ことを特徴とする請求項4又は5記載のMPEG符号化処理方法。
6. The MPEG encoding processing method according to claim 4, wherein the first value of the encoding mode value is 3.
JP2001153391A 2001-05-23 2001-05-23 MPEG encoding processing apparatus and processing method Expired - Fee Related JP3953285B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001153391A JP3953285B2 (en) 2001-05-23 2001-05-23 MPEG encoding processing apparatus and processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001153391A JP3953285B2 (en) 2001-05-23 2001-05-23 MPEG encoding processing apparatus and processing method

Publications (2)

Publication Number Publication Date
JP2002354416A JP2002354416A (en) 2002-12-06
JP3953285B2 true JP3953285B2 (en) 2007-08-08

Family

ID=18997916

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001153391A Expired - Fee Related JP3953285B2 (en) 2001-05-23 2001-05-23 MPEG encoding processing apparatus and processing method

Country Status (1)

Country Link
JP (1) JP3953285B2 (en)

Also Published As

Publication number Publication date
JP2002354416A (en) 2002-12-06

Similar Documents

Publication Publication Date Title
KR100547095B1 (en) Method and apparatus for error concealment
KR100416873B1 (en) Method and apparatus for playback compressed video data
US6683987B1 (en) Method and apparatus for altering the picture updating frequency of a compressed video data stream
KR100276205B1 (en) Record / Playback Device
US6463101B1 (en) Video encoding method and apparatus
US5745180A (en) Low-delay encoding methods of moving pictures
JP2002518898A (en) Trick play signal generation for digital video recorder
JP3147792B2 (en) Video data decoding method and apparatus for high-speed playback
JP2000236553A (en) Image processing apparatus and method, computer readable recording medium on which image processing program is recorded
KR100205490B1 (en) Code logger
JP4010617B2 (en) Image decoding apparatus and image decoding method
JP3953285B2 (en) MPEG encoding processing apparatus and processing method
JPH09168148A (en) MOVING IMAGE ENCODING METHOD AND DEVICE, AND RECORDING MEDIUM
JPH1084545A (en) Coding method for digital video signal and its device
JP3317440B2 (en) Still image playback device for recording media
JP3191439B2 (en) Coded image signal switching device
JP2001128165A (en) Device and system for switching video signal
US6157770A (en) Moving picture data reproduction controlling system and method for reproducing moving picture data having block elements and minimum elements each with headers
WO1996033573A1 (en) Device and method for coding moving image
JP3661879B2 (en) Image signal decoding method and image signal decoding apparatus
JP3570785B2 (en) Moving image expansion / reproduction method and apparatus
JPH0888854A (en) Video coding system
JP3810830B2 (en) Decoding processing method of encoded video signal and decoding apparatus using the same
JP3501521B2 (en) Digital video signal reproducing apparatus and reproducing method
JP3300448B2 (en) Editing device and editing signal decoding device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20020131

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20020131

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20021212

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20040127

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040809

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20060308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070223

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070424

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees