JP3750503B2 - Image data transmission apparatus and control method thereof - Google Patents

Image data transmission apparatus and control method thereof Download PDF

Info

Publication number
JP3750503B2
JP3750503B2 JP2000239252A JP2000239252A JP3750503B2 JP 3750503 B2 JP3750503 B2 JP 3750503B2 JP 2000239252 A JP2000239252 A JP 2000239252A JP 2000239252 A JP2000239252 A JP 2000239252A JP 3750503 B2 JP3750503 B2 JP 3750503B2
Authority
JP
Japan
Prior art keywords
image data
data
transmission
count value
mpeg
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 - Lifetime
Application number
JP2000239252A
Other languages
Japanese (ja)
Other versions
JP2002058018A (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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2000239252A priority Critical patent/JP3750503B2/en
Publication of JP2002058018A publication Critical patent/JP2002058018A/en
Application granted granted Critical
Publication of JP3750503B2 publication Critical patent/JP3750503B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Time-Division Multiplex Systems (AREA)
  • Television Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、LAN(Local Area Network)に画像データを送出する画像データ伝送装置及びその制御方法に関し、特に、カメラで撮影した動画像などの連続するストリ−ムデータをリアルタイムで送出するものに関する。
【0002】
【従来の技術】
ネットワーク画像伝送システムは、図9に示すように、伝送装置(サーバ)101と、受信装置(クライアント)103と、これらを相互に接続するネットワークバス(例えばイーサネットのネットワークバス、以下「イーサネット」という)102とで構成される。サーバ101は、カメラで撮影した映像信号をMPEG(Motion Picture Expert Group)1で圧縮しパケット化してイーサネット102に送出する。クライアント103では、このデータを受信して伸長し、表示モニタ104に表示する。以下にサーバ101の構成を説明する。
【0003】
(1)伝送装置(サーバ)101の構成
図10は、サーバ101の回路構成を示したものである。サーバ101は、入力ビデオ信号をMPEG1に準拠した情報圧縮処理を行うMPEGエンコーダ回路111と、この圧縮されたデータ(エレメンタリーストリーム)をイーサネットに送出するイーサネット回路114と、ソフトウェア処理を行い全体的な制御を行うCPU(Central Processing Unit)112、DRAM(Dynamic Random Access Memory)113と、データバス115とで構成される。
【0004】
このうちMPEGエンコーダ回路111は、主にA/D変換器(シンクセパレータ、同期回路を含む)121と、MPEG1エンコーダLSI122と、FIFO(First In First Out)メモリ123と、MPEGインターフェース回路124とで構成される。
【0005】
(2)ビデオデータの流れ
ここでは、入力されたビデオ信号がイーサネット102に送出されるまでの過程を簡単に説明する。
図10に示すサーバ101の回路構成において、入力されたビデオ信号は、ディジタルデータに変換された後、MPEG1エンコーダLSI122にて圧縮され、エレメンタリーストリームESのフォーマットで出力される。このデータは、一旦FIFOメモリ123に保持され、CPU112の制御によりデータバス115を介してDRAM113に書き込まれる。更にここでUDP(User Datagram Protocol)やIP(Internet Protocol)のヘッダなどの情報が付加されてイーサネット回路114に送られ、パケット毎にイーサネット102上に送出される。以上がサーバ101におけるビデオデータの流れである。
【0006】
(3)FIFOメモリ123の書き込み・読み出し動作
ここでは、MPEGエンコーダ回路111のFIFOメモリ123の書き込み・読み出し動作について説明する。
MPEG1エンコーダLSI122から出力されたエレメンタリーストリームESは、同LSI122から出力されるライトリセット信号WRやライトイネーブル信号WEによって制御され、FIFOメモリ123に書き込まれる。
【0007】
FIFOメモリ123に書き込まれたデータは、MPEGインターフェース回路124から出力されるリードリセット信号RRやリードイネーブル信号REの制御により読み出される。MPEGインターフェース回路124は、CPU112のデータバス115に接続されており、リードリセット信号RRやリードイネーブル信号REの出力は、CPU(ソフトウェア)112の命令にしたがって実行される。
【0008】
以下に、FIFOメモリ123の読み出し動作について、図11のタイミングチャートも参照して説明する。
図11(a)に示されたフレームパルスFPは、入力ビデオ信号のフレーム周期で切り替わる信号である。MPEGインターフェース回路124(図10参照)はこのフレームパルスFPからMPEG割り込み要求パルスMIRQを生成し、出力している。そして、このMPEG割り込み要求パルスMIRQは、CPU112のハードウェア割り込み端子に入力されており、CPU112に対し、1フレーム期間に1回ハードウェア割り込みを要求する。割り込みが発生すると、図12(a)に示すMPEG割り込みルーチンが実行され、ここでFIFOメモリ123に保持されたエレメンタリーストリームESの読み出し動作が行われる。
【0009】
FIFOメモリ123からの読み出しは、割り込み発生ごとに、1つのピクチャ(Iピクチャ、PピクチャまたはBピクチャのいずれか)を構成するデータ数だけFIFOメモリ123から読み出す。1つのピクチャを構成するデータ量はフレームごとに異なる。そのため、MPEG1エンコーダLSI122は、FIFOメモリ123に書き込まれたデータ数を図11に示すフレーム周期の先頭で、内部レジスタ(以下「FIFOリードレジスタ」という)にX1バイト、X2バイト、X3バイト...のように書き込む仕組みを備えている。
【0010】
(4)イーサネットパケット生成までのプログラム動作
FIFOメモリ123に保持されたエレメンタリーストリームESを読み出してイーサネットパケットを生成するまでのプログラム動作を、図11のタイミングチヤートと図12のフローチャートに沿って説明する。
【0011】
入力ビデオ信号のフレーム周期で発生するハードウェア割り込み(MPEG割り込み)要求MIRQにより、図12(a)に示すMPEG割り込みルーチン(フェーズA1、図11参照)がスタートする。
ステップS101では、MPEG1エンコーダLSI122の内部レジスタであるFIFOリードレジスタの内容(図11のX1バイト)を読み、現在のフレーム期間内に読み出すべきデータのバイト数を得る。
【0012】
ステップS102では、このバイト数だけFIFOメモリ123からデータを読み出し、DRAM113上に確保したMPEGエリアに書き込む。
ステップS103では、ネットワークプロセス(図12(b))をコールし、MPEG割り込みルーチンを終了する。
【0013】
ステップS103によりネットワークプロセスのフェーズB1がスタートする。図13は、エレメンタリーストリームESからパケットを生成する手順を示したものであり、図12とともに参照する。
【0014】
図12(b)のステップS111では、図13に示すように、DRAM113のMPEGエリアから1460バイトのデータ(最後に読み出すデータは、1460バイト以下の揚合がある)を読み出し、8バイトのUDPヘッダと20バイトのIPヘッダを付加する。
【0015】
次いでこのデータをイーサネット回路114のメモリに書き込み、送信開始手続きを行う(ステップS112)。この後、イーサネット回路114によるハードウェア処理となる。更にこのデータに14バイトのイーサネットヘッダが付加され(図13(d))、1502バイトのパケットになる。このパケットがイーサネット102に送り出される。
【0016】
図12(b)のステップS113では、DRAM113のMPEGエリアに書き込まれたデータがあるかどうかチェックし、データが残っているならステップS111に戻り、ステップS111〜S113の処理を繰り返す。このように、イーサネット回路114は、連続したデータをパケット(=1502バイト)に分割して順次イーサネット102に送出する。
【0017】
ステップS113で、DRAM113のMPEGエリアから読み出すデータが無くなった場合は、ネットワークプロセスを終了する。
ネットワークプロセスが終了すると、イーサネット回路114では内部のメモリに複数のパケットが保持されており、このパケットをすべて送信し終わると、イーサネット回路114はCPU112にハードウェア割り込み要求(以下「イーサネット割り込み要求」という)を出し、再びソフトウェア処理に移る。この時、図12(c)に示すイーサネット割り込みルーチンがコールされ、以下の処理が行われる。
【0018】
ステップS121では、送信終了割り込みかどうか判別し、送信終了割り込みでないときは、直ちに処理を終了する。送信終了割り込みであるときは、イーサネット回路114に対し、送信終了手続きを行い(ステップS122)、パケット送信の時に使用していたイーサネット回路114のメモリをクリアし(ステップS123)、イーサネット割り込みルーチンを終了する。
【0019】
以上が1フレーーム期間内に行う処理である。次のフレームの割り込みが発生すると、MPEG割り込みルーチンのフェーズA2がスタートし、同様にステップS101から処理を行う。
このようなソフトウェア処理により、MPEG1エンコーダLSI122から随時出力されたエレメンタリーストリームESがパケット化され、イーサネット102に送り出される。
【0020】
【発明が解決しようとする課題】
上記のサーバ101では、1)ネットワークが混雑している場合、パケットの衝突が頻繁に発生するため、パケットの再送信を繰り返す、2)ブロードキャストパケットを頻繁に受信した場合、CPU112で実行されるネットワークの受信処理が忙しくなる、などの原因により、CPU112の負荷が一時的に増加し、図12に示したネットワークプロセスやイーサネット割り込みルーチンの処理が遅れて、実行時間が通常よりも長くなり、CPU112の処理パフォーマンス(リアルタイム性など)が損なわれる。
【0021】
例えば、ネットワークプロセスB1とイーサネット割り込み処理C1の実行時間が長くなった場合を示すと図14のようになる。このような場合、図の第2フレーム時にB1とC1が実行されているため、このタイミングで本来MPEG割り込みルーチンA2が実行されるはずが、第3フレームまで、すなわち本来フェーズA3が実行されるべきタイミングにずれてしまう。この時、MPEG1エンコーダLSI122のFIFOレジスタの値は既にX3に更新されているため、MPEG割り込みルーチンA2はX2の値を読むことができない。
【0022】
つまり、MPEG割り込みルーチンが1フレーム期間に1回実行されないため、本来読み出すデータ数が分からなくなってしまう。このような状態が続くと、FIFOメモリ123に読み出せなかったデータが蓄積され、やがてFIFOメモリ123の容量をオーバーしてしまう。そのため、連続したストリームデータを読み出すことができなくなり、MPEGデータのパケット化が正常に行われず壊れたデータを送信してしまう。その結果、クライアントではこの壊れたデータを受信して伸長するため、表示する再生画像が乱れて復帰できないという不具合が発生する。
【0023】
本発明はこのような不具合を防止するためになされたものであり、CPUによるソフトウェア処理の遅れを検出し、画像データの受信側で再生画像が乱れて復帰不能となる事態を回避できるようにした画像データ伝送装置及びその制御方法を提供することを目的とする。
【0024】
【課題を解決するための手段】
上記目的を達成するため請求項1に記載の発明は、入力される動画像データの情報圧縮処理を行い、該処理後のデータをデータメモリに格納する情報圧縮部と、前記データメモリに格納された画像データを読み出し、パケット化して伝送路に送出する情報送出部と、前記情報圧縮部及び情報送出部の制御を行う制御部とを備える画像データ伝送装置において、前記画像データのフレーム周期で生成される信号の発生回数をカウントすることにより第1のカウント値を得るハードウェアカウント手段を備え、前記制御部は、前記情報送出部における1フレーム分のデータ送出処理が終了した回数をカウントすることにより第2のカウント値を得るソフトウェアカウント手段を有し、前記第1のカウント値と、前記第2のカウント値とが異なるときは、前記画像データの伝送路への送出を中断すると共に、前記ハードウェアカウント手段でカウントする第1のカウント値、及び前記ソフトウェアカウント手段でカウントする第2のカウント値をそれぞれ初期値に戻し、かつ前記データメモリに格納されている画像データを消去する処理であるリセットを行うことを特徴とする。
【0025】
請求項2に記載の発明は、入力される動画像データの情報圧縮処理を行い、該処理後のデータをデータメモリに格納する情報圧縮部と、前記データメモリに格納された画像データを読み出し、パケット化して伝送路に送出する情報送出部とを備える画像データ伝送装置の制御方法において、前記画像データのフレーム周期で生成される信号の発生回数をカウントすることにより第1のカウント値を得るステップと、前記情報送出部における1フレーム分のデータ送出処理が終了した回数をカウントすることにより第2にカウント値を得るステップと、前記第1のカウント値と、前記第2のカウント値とが異なるときは、前記画像データの伝送路への送出を中断すると共に、前記第1のカウント値、及び前記第2のカウント値をそれぞれ初期値に戻し、かつ前記データメモリに格納されている画像データを消去する処理であるリセットを行うステップとを含むことを特徴とする。
【0026】
【発明の実施の形態】
以下本発明の実施の形態を図面を参照して説明する。
(第1の実施形態)
図1は本発明の第1の実施形態にかかる画像データ伝送装置の構成を示すブロック図である。この装置は、図10に示す従来の伝送装置に、MIRQカウント回路16を追加したものである。すなわち、図1に示す伝送装置1は、図10に示すMPEGエンコーダ111、CPU112、DRAM113、イーサネット回路114及びデータバス115と、同様の機能を有するMPEGエンコーダ11、CPU12、DRAM13、イーサネット回路14及びデータバス15に、MIRQカウント回路16を追加して構成されている。また、MPEGエンコーダ11は、A/D変換器21と、MPEG1エンコーダLSI22と、FIFOメモリ23と、MPEGインターフェース回路24とで構成される。
【0027】
MIRQカウント回路16は、MPEGインターフェース回路24がCPU12に対して要求するハードウェア割り込み要求MIRQの発生回数を数えて、内部レジスタ(以下「ハードカウントレジスタ」という)に保存する。なお、以下の説明では、MIRQカウント回路16を、「ハードウェアカウンタ」ともいう。
【0028】
例えば、8ビットカウンタを用いてカウントした場合、図2(c)(d)に示すように、カウント値HCは、ハードウェア割り込み要求MIRQの立ち上がりエッジごとに1ずつ更新される。CPU12の命令(ソフトウェア)に依存しない独立したハードウェアで行う動作なので、CPU12の処理が忙しくなってもカウント値が狂うことはない。
ただし、CPU12は、このMIRQカウント回路16のリセット及びハードカウントレジスタの読み出しが行えるように、データバス15を介してMIRQカウント回路16にアクセスすることができるように構成されている。
【0029】
(1)ソフトウェアカウンタの実施と比較方法
次に、このMIRQカウント回路16とは別にもう1つカウンタを用意する。それはソフトウェアでハードウェア割り込み要求MIRQの発生回数を数えるカウンタである。
【0030】
ハードウェア割り込み要求MIRQの発生に対応して、割り込みルーチンであるMPEG割り込みルーチンが実行されるため、この割り込みルーチン内でカウント動作を行えば、発生した割り込みの数を数えることができる。このソフトウェアカウンタのカウント値SCは、図2(f)に示すように更新される。
【0031】
ここで図2(a)〜(h)からもわかるように、CPU12の処理が通常通りに行われていれば、ハードウェアカウンタの値HCとソフトウェアカウンタの値SCとは一致する。
しかし、CPU12に一時的に過大な負荷が加わった場合、MPEG割り込みルーチンは、図2(i)に示すように、1フレームに1回実行できないため、同図(j)に示すようにソフトウェアカウンタの値SCは1フレームごとに更新されなくなる。すなわち、実行されない回数だけハードウェアカウンタの値HCからずれていく。
そこで、MPEG割り込みルーチンの実行中にハードウェアカウンタの値を読み、ソフトウェアカウンタの値と比較して、値が異なった場合、CPU12の処理の遅れを検出することができる。
【0032】
(2)正常状態への復帰方法
上述したように、一旦CPU12の処理が遅れてしまうと、FIFOメモリ23に保持されたエレメンタリーストリームESのフォーマットが壊れてしまうため、不連続なデータを送信し続けてしまう。このような状況になった場合、本実施形態ではデータの送信を中断するとともに、FIFOメモリ23の内容と、ハードウェアカウンタの値HC及びソフトウェアカウンタの値SCをリセットして初期状態に戻すことを行う。
【0033】
この操作により、FIFOメモリ23に残った不連続なデータを読み出すことなく、先頭アドレスから書き込み及び読み出しができるようになる。よって、従来のように壊れたデータを送信し続けることがなくなり、受信装置側の画像の乱れを復帰させることができる。
【0034】
(3)プログラム操作
実際のソフトウェア動作を、図3及び4のフローチャートに沿って説明する。
(a)MPEGプロセスの動作
図3(a)は、MPEGプロセスのフローチャートである。MPEGプロセスは、主にMPEG1エンコーダLSI22のスタート・ストップを制御するプログラムであり、電源投入時に開始される。
【0035】
先ずステップS11では、MPEG1エンコーダLSI22の初期化を行う。ここではLSI自体のハードウェアリセットや内部レジスタ群の初期設定などを行う。また、FIFOメモリ23のライトリセットを行い、FIFOメモリ23の書き込みアドレスを先頭アドレスに戻す。
【0036】
ステップS12では、MPEG1エンコーダLSI22の管理するメモリ領域にマイクロコード(エンコード動作を司るプログラム)をロードする。
ステップS13では、ハードウェアカウンタの値HCを保存するMIRQカウント回路16内のハードカウントレジスタの値HCと、ソフトウェアカウンタの値SC(DRAM13のエリアSCAに保存される)とをともに0にする。
【0037】
ステップS14では、MPEGインターフェース回路24を介してFIFOメモリ23のリードリセットを行い、読み出しアドレスを先頭アドレスに戻す。
ステップS15では、エンコードスタートもしくはストップ状態を示すエンコードスタートフラグESFの値を0にセットする。フラグESFは、DRAM13上に確保された領域に保存され、ストップ状態の時:0、スタート状態の時:1に設定される。続くステップS16では、エンコード動作を開始するため、MPEGハードウェア割り込みを許可し、MPEG1エンコーダLSI16にスタート要求の命令を出す。すなわち、エンコードスタートフラグESFを1にセットする。
これによりエンコード動作が始まり、MPEG割り込みルーチンがフレームごとに実行される。エンコード動作中のMPEGプロセスの動作は後に述べることにして、先にMPEG割り込みルーチンについて説明する。
【0038】
(b)MPEG割り込みルーチンの動作
図3(b)は、MPEG割り込みルーチンのフローチャートである。MPEGプロセスによりエンコードがスタートすると、入力ビデオ信号のフレーム周期でハードウェア割り込み要求MIRQが発生し、MPEG割り込みルーチンが実行されフェーズA1(図2(e)参照)がスタートする。
【0039】
ステップS21では、ソフトウェアカウンタの値SCを1だけインクリメントする。ハードウェア割り込み要求MIRQが発生しても、CPU12がネットワークプロセスまたはイーサネット割り込みルーチンの実行中であるときは、MPEG割り込み処理は開始されないので、ソフトウェアカウンタの値SCは、インクリメントされない。したがって、ソフトウェアカウンタの値SCは、1フレーム分の画像データの終了回数に対応している。
【0040】
ステップS22では、MPEG1エンコーダLSI22の内部レジスタであるFIFOリードレジスタの内容(図2(b)のX1バイト)を読み、現在のフレーム期間TFM内に読み出すべきデータのバイト数を得る。
ステップS23では、このバイト数だけFIFOメモリ23からデータを読み出し、DRAM13上に確保した領域であるMPEGエリアに書き込む。
【0041】
ステップS24では、MIRQカウント回路16のハードカウントレジスタからハードウェアカウンタの値HCを読み出す。
ステップS25では、ハードウェアカウンタの値HCと、ソフトウェアカウンタの値SCとが等しいか否かを判別する。その結果両者が一致した場合、CPU12の処理が間に合っていることがわかるので、DRAM13に格納されるソフトカウントエラーフラグSCEFを0にセットし(ステップS26)、次いで正常なデータをパケット化するために、ネットワークプロセス(図4(a))をコールして、割り込みルーチンを終了する。
【0042】
一方ステップS25で、ハードウェアカウンタの値HCと、ソフトウェアカウンタの値SCとが一致しない場合は、CPU12の処理に遅れが生じていることを意味するので、ソフトカウントエラーフラグSCEFを1にセットする。この場合、壊れたデータの送信を防ぐため、ネットワークプロセスのコールをせずに、これ以降の処理を中断する。
【0043】
(c)ネットワークプロセスの動作
CPU12の処理が間に合っている場合、図4(a)に示すネットワークプロセスが実行される。MPEG割り込みルーチンのフェーズA1に対応して、ネットワークプロセスのフェーズB1(図2(e)(g)参照)がスタートする。
【0044】
図4(a)のステップS31では、図13に示したように、DRAM13のMPEGエリアから1460バイトのデータ(最後に読み出すデータは、1460バイト以下の場合がある)を読み出し、8バイトのUDPヘッダと20バイトのIPヘッダを付加する。
【0045】
ステップS32では、このデータをイーサネット回路14のメモリに書き込み、送信開始の手続きを行う。この後、イーサネット回路14によるハードウェア処理となる。ハードウェア処理では、更にこのデータに14バイトのイーサネットヘッダが付加され、1502バイトのパケットになる。このパケットがイーサネットに送り出される。
【0046】
ステップS33では、DRAM13のMPEGエリアに書き込まれたデータがあるかどうかチェックし、データが残っているならステップS31に戻り、ステップS31〜S33の処理を繰り返す。このように、連続したデータをパケット(=1502バイト)に分割して順次イーサネット2に送出する。DRAM13のMPEGエリアから読み出すデータが無くなった場合は、ネットワークプロセスを終了する。
【0047】
ネットワークプロセスのステップS32が終了すると、イーサネット回路14では内部のメモリに多数のパケットが保持されており、このパケットをすべて送信し終わると、イーサネット回路14はCPU12にハードウェア割り込み要求EIRQを出し、再びソフトウェア処理に移る。この時イーサネット割り込みルーチンがコールされ、フェーズC1(図2(h)参照)が開始されて、以下の処理が行われる。
【0048】
(d)イーサネット割り込みルーチンの動作
ステップS41では、送信終了割り込みか否かを判別し、送信終了割り込み出ないときは直ちに本ルーチンを終了する。送信終了割り込みであるときは、イーサネット回路14に対し、送信終了の手続きを行う(ステップS42)。次に、パケット送信の時に使用していたイーサネット回路14のメモリをクリアし(ステップS43)、イーサネット割り込みルーチンを終了する。
【0049】
以上が1フレーム期間内に行う処理である。次のフレームの割り込みが発生すると、MPEG割り込みルーチンのフェーズA2がスタートし、再びMPEG割り込みルーチンのステップS11から処理を行う。
このようなソフトウェア処理により、MPEG1エンコーダLSI22から随時出力されたエレメンタリーストリームESがパケット化され、イーサネット2に送り出される。
【0050】
(e)MPEGプロセスのエンコード中の動作
エンコード動作中、MPEGプロセスは以下の処理を行う。
図3(a)のステップS17では、DRAM13に格納されるソフトカウントエラーフラグSCEFが1否かを判別し、フラグSCEFが0の場合は、ソフトウェアカウンタが正常に更新されている、つまりCPU12の処理に遅れが生じていないことを示すので、この場合は、何もせずにステップS17を繰り返す。正常な場合はここをループすることになる。
【0051】
一方フラグSCEFが1の場合は、図2(i)〜(l)に示すように(CPUの処理が遅れた場合)に示すように、ハードウェアカウンタの値HC(同図(d))に対しソフトウェアカウンタの値SC(同図(j))がずれたことを意味し、CPU12の処理が遅れていることがわかる。この状態になると、FIFOメモリ23から読み出されないデータが蓄積してしまい、メモリの容量をオーバすると、連続したデータを読み出すことができなくなる。このため壊れたデータをイーサネット2に送り続けてしまう。その結果、クライアント(受信装置)で表示された画像は乱れたまま復帰しなくなってしまう。
【0052】
これを回避するため、図3(a)のステップS18では、FIFOメモリ23に蓄積されているデータを一旦クリアする。実際の動作は、MPEGインターフェース回路24にアクセスし、FIFOメモリ23のリードリセットを行うとともに、MPEG1エンコーダLSI22を介しFIFOメモリ23のライトリセットを行い、さらに、MPEG1エンコーダ22の内部レジスタであるFIFOリードレジスタに0を書き込む処理を行う。この処理により、FIFOメモリ23に蓄積された連続性のないデータを読み出さずに、メモリの先頭から再び連続したデータを書き込み・読み出しすることができるようになる。
【0053】
続くステップS19では、エラー処理が終了したため、ソフトカウントエラーフラグSCEFを0とし、ステップS17に戻る。
以上のように本実施形態では、2つのカウンタ、すなわちハードウェアカウンタの値HC及びソフトウェアカウンタの値SCを比較することによって、CPU12の処理の遅れを検出し、これをきっかけに壊れたデータの送信を一時中断するようにしたので、受信装置側(クライアント)の画像乱れを最小限に抑えることができる。
【0054】
また、FIFOメモリ23のライトリセット及びリードリセットを行い、書き込み・読み出し動作を強制的に先頭アドレスから行うようにしたので、FIFOメモリ23に残った不連続なデータを一掃し、再び連続したデータを送信することが可能となる。この結果、クライアントにおいて、乱れて中断していた画像をいち早く正常に復帰させることができる。
【0055】
(第2の実施形態)
上述した第1の実施形態では、MPEGインターフェース回路24がCPU12に出力するハードウェア割り込み要求MIRQをカウントすることでCPU12の処理遅れを検出したが、本実施形態では、ハードウェア割り込み要求MIRQの代わりに、イーサネット回路14がCPU12に出力するハードウェア割り込み要求EIRQをカウントする。
【0056】
図5に本実施形態における伝送装置(サーバ)の回路構成を示す。これは、図1に示す構成からMIRQカウント回路16を削除し、EIRQカウント回路17を追加したものである。また本実施形態では、ハードウェア割り込み要求EIRQは、フレームパルスFPに同期して1フレームに1回、図6(e)に示されたタイミング(フレーム期間の終了直前)で出力される。このEIRQカウント回路17は、イーサネット回路14がCPU12に対して要求するハードウェア割り込み要求EIRQの発生回数を数えて、内部レジスタ(ハードカウントレジスタ)に保存する。例えば、8ビットカウンタを用いてカウントした場合、図6(f)に示すように、ハードウェア割り込み要求EIRQの立ち上がりエッジごとに1ずつ更新される。CPU12の命令(ソフトウェア)に依存しない独立したハードウェアで行う動作なので、CPU12の処理が忙しくなってもカウント値が狂うことはない。
ただし、CPU12は、このEIRQカウント回路17のリセット及びハードカウントレジスタの読み出しが行えるように、データバス15を介してEIRQカウント回路17にアクセスすることができるように構成されている。
【0057】
(1)ソフトウェアカウンタの実施と比較方法
本実施形態では、ソフトウェアによるカウント動作は、図8に示すイーサネット割り込みルーチンで行う。ハードウェア割り込み要求EIRQにより、イーサネット割り込みルーチンが実行されるため、この割り込みルーチン内でカウント動作を行えば、発生したイーサネット割り込み要求EIRQの発生回数を数えることができる。このソフトウェアカウンタの動作タイミングは、図6(h)に示すようになる。
【0058】
従って、CPU12の処理が通常通りに行われていれば、ハードウェアカウンタの値HCとソフトウェアカウンタの値SCは一致する。
しかし、CPU12に一時的に過大な負荷が加わった場合、図6(l)に示すのように、ソフトウェアカウンタの値SCはハードウェアカウンタの値HCからずれていく。
そこで、イーサネット割り込みルーチンの実行中にハードウェアカウンタの値HCを読み、ソフトウェアカウンタの値SCと比較して値が異なった場合、CPU12の処理遅れを検出するようにしている。
【0059】
(2)正常状態への復帰方法
このような状況になった場合の対処方法として、第1の実施形態と同様に、FIFOメモリ23の内容と、ハードウェアカウンタの値HC及びソフトウェアカウンタの値SCをリセットして初期状態に戻すことを行う。
【0060】
この操作により、FIFOメモリ23に残った不連続なデータを読み出すことなく、先頭アドレスから書き込み・読み出しができるようになる。よって、従来のように壊れたデータを送信し続けることがなくなり、クライアントの画像の乱れを復帰させることができる。
【0061】
(3)プログラム動作
実際のソフトウェア動作を、図7及び8のフローチヤートに沿って説明する。
(a)MPEGプロセスの動作
本実施形態のMPEGプロセス(図7(a))は、第1の実施形態(図3(a))と同一である。
【0062】
(b)MPEG割り込みルーチンの動作
MPEGプロセスによりエンコードがスタートすると、入力ビデオ信号のフレーム周期でハードウェア割り込みが発生し、MPEG割り込みルーチンが実行されフェーズA1(図6(c)参照)がスタートする。本実施形態のMPEG割り込みルーチンは、図7(b)に示すようにステップS22,S23及びS27のみからなる。
【0063】
すなわちステップS22では、MPEG1エンコーダLSI22の内部レジスタであるFIFOレジスタの内容(図6(b)のX1バイト)を読み、現在のフレーム期間TFM内に読み出すべきデータのバイト数を得る。次にこのバイト数だけFIFOメモリ23からデータを読み出し、DRAM13上に確保した領域であるMPEGエリアに書き込む(ステップS23)。そして、ネットワークプロセスをコールして(ステップS27)、MPEG割り込みルーチンを終了する。
【0064】
(c)ネットワークプロセスの動作
本実施形態のネットワークプロセス(図7(c))は、図4(a)に示す第1の実施形態のネットワークプロセスと同一である。したがって、ネットワークプロセスのステップS32が終了すると、イーサネット回路14では内部のメモリに複数のパケットが保持されており、このパケットが順次送信される。
【0065】
ただし、本実施形態では、イーサネット回路14は、CPU12に対してハードウェア割り込み要求EIRQを、図6(e)に示すように、フレーム期間TFMの終了直前のタイミングで出力する。このとき、イーサネット割り込みルーチンがコールされ、フェーズC1(図6(g)参照)が開始されて、以下の処理が行われる。
【0066】
(d)イーサネット割り込みルーチンの動作
ステップS51では、送信終了割り込みか否かを判別する。送信終了割り込みでないときは直ちに処理を終了し、送信終了割り込みであるときは、ソフトウェアカウンタの値SCを1だけインクリメントする(ステップS52)。ハードウェア割り込み要求EIRQが発生しても、CPU12がネットワークプロセスまたはイーサネット割り込みルーチンの実行中であるときは、イーサネット割り込みルーチンは開始されないので、ソフトウェアカウンタの値SCは、インクリメントされない。したがって、ソフトウェアカウンタの値SCは、1フレーム分の画像データの終了回数に対応している。
【0067】
続くステップS53では、EIRQカウント回路17のハードカウントレジスタからハードウェアカウンタの値HCを読み出す。
ステップS54では、ソフトウェアカウンタの値SCと、ハードウェアカウンタの値HCとが等しいか否かを判別する。そして、両者が一致した場合は、CPU12の処理が間に合っていることを示すので、ソフトカウントエラーフラグSCEFを0にセットする(ステップS55)。一方ソフトウェアカウンタの値SCと、ハードウェアカウンタの値HCとが一致しない場合は、CPU12の処理に遅れが生じていることを示すので、ソフトカウントエラーフラグSCEFを1にセットする(ステップS56)。
【0068】
ステップS57では、イーサネット回路14に対し、送信終了の手続きを行い、次に、パケット送信の時に使用していたイーサネット回路14のメモリをクリアし(ステップS58)、イーサネット割り込みルーチンを終了する。
以上が1フレーム期間TFM内に行う処理である。次のフレームの割り込みが発生すると、MPEG割り込みルーチンのフェーズA2が開始され、再びMPEG割り込みルーチンのステップS11から処理が行われる。
このようなソフトウェア処理により、MPEG1エンコーダLSI22から随時出力されたエレメンタリーストリームをパケット化してイーサネットに送り出される。
【0069】
(e)MPEGプロセスのエンコード中の動作
エンコード動作中、ソフトカウントエラーフラグSCEFが1にセットされた場合の処理(図7(a),ステップS18,S19)は、第1の実施形態と同一である。
【0070】
以上のように、本実施形態においては、フレームパルスFPに同期して出力されるイーサネット割り込み要求EIRQの発生回数をカウントするEIRQカウント回路17を設け、これにより得られるハードウェアカウンタの値HCと、CPU12の処理に遅れが無い場合に、イーサネット割り込み要求EIRQに応じて実行されるイーサネット割り込み処理において動作するソフトウェアカウンタの値SCとを比較することによって、CPU12の処理の遅れを検出することができる。したがって、第1の実施形態と同様の効果を得ることができる。
【0071】
【発明の効果】
以上詳述したように請求項1または2に記載の発明によれば、入力される画像データのフレーム周期で生成される信号の発生回数をカウントすることに得られる第1のカウント値と、画像データを送出する情報送出部における1フレーム分のデータ送出処理が終了した回数をカウントすることにより得られる第2のカウント値とを比較し、第1のカウント値と、第2のカウント値とが異なるときは、伝送路への画像データの送出が中断されるので、情報送出処理の遅れを検出するとともに、壊れたデータの送出が継続されることを防止することができる。その結果、受信装置側の画像乱れを最小限に抑えることができる。さらに情報送出処理の遅れが検出されたときは、第1のカウント値及び第2のカウント値をそれぞれ初期値に戻し、かつデータメモリに格納されている画像データを消去するリセット処理が実行されるので、正常なデータの送信を再開することができる。その結果、受信装置側において、再生画像が乱れた状態から復帰できないという問題を解消し、いち早く正常な画像を表示させることができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態にかかる画像データ伝送装置の構成を示すブロック図である。
【図2】図1の装置の動作を説明するためのタイミングチャートである。
【図3】図1のCPUで実行される処理のフローチャートである。
【図4】図1のCPUで実行される処理のフローチャートである。
【図5】本発明の第2の実施形態にかかる画像データ伝送装置の構成を示すブロック図である。
【図6】図5の装置の動作を説明するためのタイミングチャートである。
【図7】図5のCPUで実行される処理のフローチャートである。
【図8】図5のCPUで実行される処理のフローチャートである。
【図9】従来の画像伝送システムの構成を示すブロック図である。
【図10】図9に示す伝送装置の構成を示すブロック図である。
【図11】図10の装置の動作を説明するためのタイミングチャートである。
【図12】図10のCPUで実行される処理のフローチャートである。
【図13】画像データの伝送用パケットの生成方法を説明するための図である。
【図14】従来の装置の問題点を説明するためのタイミングチャートである。
【符号の説明】
1 画像データ伝送装置
11 MPEGエンコーダ
12 CPU(制御部、ソフトウェアカウント手段)
13 DRAM
14 イーサネット回路(情報送出部)
15 データバス
16 MIRQカウント回路(ハードウェアカウント手段)
17 EIRQカウント回路(ハードウェアカウント手段)
22 MPEG1エンコーダLSI(情報圧縮部)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image data transmission apparatus that transmits image data to a local area network (LAN) and a control method therefor, and more particularly, to an apparatus that transmits continuous stream data such as a moving image captured by a camera in real time.
[0002]
[Prior art]
As shown in FIG. 9, the network image transmission system includes a transmission apparatus (server) 101, a reception apparatus (client) 103, and a network bus (for example, an Ethernet network bus, hereinafter referred to as “Ethernet”) that interconnects them. 102. The server 101 compresses the video signal captured by the camera with MPEG (Motion Picture Expert Group) 1 and packetizes it, and sends it to the Ethernet 102. The client 103 receives this data, decompresses it, and displays it on the display monitor 104. The configuration of the server 101 will be described below.
[0003]
(1) Configuration of transmission apparatus (server) 101
FIG. 10 shows the circuit configuration of the server 101. The server 101 performs software processing on the entire MPEG encoder circuit 111 that performs information compression processing on the input video signal in accordance with MPEG1, and an Ethernet circuit 114 that transmits the compressed data (elementary stream) to the Ethernet. A CPU (Central Processing Unit) 112 that performs control, a DRAM (Dynamic Random Access Memory) 113, and a data bus 115 are configured.
[0004]
Among these, the MPEG encoder circuit 111 mainly includes an A / D converter (including a sync separator and a synchronization circuit) 121, an MPEG1 encoder LSI 122, a FIFO (First In First Out) memory 123, and an MPEG interface circuit 124. Is done.
[0005]
(2) Flow of video data
Here, a process until the input video signal is transmitted to the Ethernet 102 will be briefly described.
In the circuit configuration of the server 101 shown in FIG. 10, the input video signal is converted into digital data, then compressed by the MPEG1 encoder LSI 122, and output in the format of the elementary stream ES. This data is temporarily held in the FIFO memory 123 and written to the DRAM 113 via the data bus 115 under the control of the CPU 112. Further, information such as a header of UDP (User Datagram Protocol) or IP (Internet Protocol) is added here and sent to the Ethernet circuit 114, and sent out on the Ethernet 102 for each packet. The above is the flow of video data in the server 101.
[0006]
(3) FIFO memory 123 write / read operations
Here, writing / reading operations of the FIFO memory 123 of the MPEG encoder circuit 111 will be described.
The elementary stream ES output from the MPEG1 encoder LSI 122 is controlled by the write reset signal WR and the write enable signal WE output from the LSI 122 and is written in the FIFO memory 123.
[0007]
The data written in the FIFO memory 123 is read out under the control of the read reset signal RR and the read enable signal RE output from the MPEG interface circuit 124. The MPEG interface circuit 124 is connected to the data bus 115 of the CPU 112, and the output of the read reset signal RR and the read enable signal RE is executed according to instructions of the CPU (software) 112.
[0008]
Hereinafter, the read operation of the FIFO memory 123 will be described with reference to the timing chart of FIG.
The frame pulse FP shown in FIG. 11A is a signal that switches at the frame period of the input video signal. The MPEG interface circuit 124 (see FIG. 10) generates an MPEG interrupt request pulse MIRQ from the frame pulse FP and outputs it. The MPEG interrupt request pulse MIRQ is input to the hardware interrupt terminal of the CPU 112 and requests the CPU 112 for a hardware interrupt once per frame period. When an interrupt occurs, the MPEG interrupt routine shown in FIG. 12A is executed, and here, the reading operation of the elementary stream ES held in the FIFO memory 123 is performed.
[0009]
Reading from the FIFO memory 123 reads from the FIFO memory 123 the number of data constituting one picture (I picture, P picture, or B picture) every time an interrupt occurs. The amount of data constituting one picture varies from frame to frame. Therefore, the MPEG1 encoder LSI 122 sets the number of data written in the FIFO memory 123 to the internal register (hereinafter referred to as “FIFO read register”) at the beginning of the frame period shown in FIG. . . It has a writing mechanism like
[0010]
(4) Program operation until Ethernet packet generation
A program operation from reading the elementary stream ES held in the FIFO memory 123 to generating an Ethernet packet will be described with reference to the timing chart of FIG. 11 and the flowchart of FIG.
[0011]
In response to a hardware interrupt (MPEG interrupt) request MIRQ generated in the frame period of the input video signal, the MPEG interrupt routine (phase A1, see FIG. 11) shown in FIG.
In step S101, the content (X1 byte in FIG. 11) of the FIFO read register, which is an internal register of the MPEG1 encoder LSI 122, is read to obtain the number of bytes of data to be read within the current frame period.
[0012]
In step S102, data is read from the FIFO memory 123 by the number of bytes and written to the MPEG area secured on the DRAM 113.
In step S103, the network process (FIG. 12B) is called and the MPEG interrupt routine is terminated.
[0013]
Step S103 starts phase B1 of the network process. FIG. 13 shows a procedure for generating a packet from the elementary stream ES, and is referred to with FIG.
[0014]
In step S111 of FIG. 12B, as shown in FIG. 13, 1460 bytes of data (the last read data is 1460 bytes or less) is read from the MPEG area of the DRAM 113, and an 8-byte UDP header is obtained. And a 20-byte IP header.
[0015]
Next, this data is written into the memory of the Ethernet circuit 114, and a transmission start procedure is performed (step S112). Thereafter, hardware processing by the Ethernet circuit 114 is performed. Further, a 14-byte Ethernet header is added to this data (FIG. 13 (d)), resulting in a 1502-byte packet. This packet is sent out to the Ethernet 102.
[0016]
In step S113 of FIG. 12B, it is checked whether there is data written in the MPEG area of the DRAM 113. If data remains, the process returns to step S111, and the processes of steps S111 to S113 are repeated. As described above, the Ethernet circuit 114 divides continuous data into packets (= 1502 bytes) and sequentially sends them to the Ethernet 102.
[0017]
If there is no more data to be read from the MPEG area of the DRAM 113 in step S113, the network process is terminated.
When the network process is completed, the Ethernet circuit 114 holds a plurality of packets in the internal memory. When all the packets are transmitted, the Ethernet circuit 114 sends a hardware interrupt request (hereinafter referred to as “Ethernet interrupt request”) to the CPU 112. ) And go to software processing again. At this time, the Ethernet interrupt routine shown in FIG. 12C is called, and the following processing is performed.
[0018]
In step S121, it is determined whether or not it is a transmission end interrupt. If it is not a transmission end interrupt, the process is immediately ended. If it is a transmission end interrupt, a transmission end procedure is performed for the Ethernet circuit 114 (step S122), the memory of the Ethernet circuit 114 used at the time of packet transmission is cleared (step S123), and the Ethernet interrupt routine is ended. To do.
[0019]
The above is the processing performed within one frame period. When an interrupt for the next frame occurs, phase A2 of the MPEG interrupt routine starts, and processing is similarly performed from step S101.
Through such software processing, the elementary stream ES output from the MPEG1 encoder LSI 122 as needed is packetized and sent to the Ethernet 102.
[0020]
[Problems to be solved by the invention]
In the server 101 described above, 1) When the network is congested, packet collisions frequently occur, so packet retransmission is repeated. 2) When broadcast packets are frequently received, the network executed by the CPU 112 The load on the CPU 112 temporarily increases due to the busy reception process of the network, the network process and the Ethernet interrupt routine shown in FIG. 12 are delayed, and the execution time becomes longer than usual. Processing performance (such as real-time performance) is impaired.
[0021]
For example, FIG. 14 shows a case where the execution time of the network process B1 and the Ethernet interrupt process C1 is long. In such a case, since B1 and C1 are executed at the second frame in the figure, the MPEG interrupt routine A2 should be executed at this timing, but until the third frame, that is, the phase A3 should be executed originally. It will be out of timing. At this time, since the value of the FIFO register of the MPEG1 encoder LSI 122 has already been updated to X3, the MPEG interrupt routine A2 cannot read the value of X2.
[0022]
That is, since the MPEG interrupt routine is not executed once in one frame period, the number of data to be originally read becomes unknown. If such a state continues, data that could not be read is accumulated in the FIFO memory 123, and the capacity of the FIFO memory 123 is eventually exceeded. For this reason, continuous stream data cannot be read out, and MPEG data is not packetized normally, and broken data is transmitted. As a result, the client receives and expands the broken data, and thus a problem arises in that the reproduced image to be displayed is disturbed and cannot be recovered.
[0023]
The present invention has been made to prevent such a problem, and detects a delay in software processing by the CPU so that a situation in which a reproduced image is disturbed on the image data receiving side and cannot be restored can be avoided. An object of the present invention is to provide an image data transmission apparatus and a control method thereof.
[0024]
[Means for Solving the Problems]
In order to achieve the above object, an invention according to claim 1 performs an information compression process of input moving image data, and stores the data after the process in a data memory, and is stored in the data memory. In an image data transmission apparatus comprising: an information sending unit that reads out image data, packetizes it, and sends it to a transmission line; and a control unit that controls the information compression unit and the information sending unit. Hardware count means for obtaining a first count value by counting the number of times the generated signal is generated, and the control unit counts the number of times one frame of data transmission processing has been completed in the information transmission unit. Software counting means for obtaining a second count value, wherein the first count value is different from the second count value; It may suspend the transmission of the transmission path of the image data At the same time, the first count value counted by the hardware count means and the second count value counted by the software count means are returned to their initial values, and the image data stored in the data memory is erased. Is processing It is characterized by resetting.
[0025]
The invention according to claim 2 performs an information compression process of input moving image data, reads an image compression unit that stores the processed data in a data memory, and image data stored in the data memory, In a control method of an image data transmission apparatus comprising an information transmission unit that packetizes and transmits to an transmission line, a step of obtaining a first count value by counting the number of times of generation of a signal generated in a frame period of the image data And secondly obtaining a count value by counting the number of times one frame of data transmission processing has been completed in the information transmission unit is different from the first count value and the second count value. When the transmission of the image data to the transmission line is interrupted And a process of returning the first count value and the second count value to their initial values and erasing the image data stored in the data memory. And a step of resetting.
[0026]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
(First embodiment)
FIG. 1 is a block diagram showing a configuration of an image data transmission apparatus according to the first embodiment of the present invention. This device is obtained by adding a MIRQ count circuit 16 to the conventional transmission device shown in FIG. That is, the transmission apparatus 1 shown in FIG. 1 includes the MPEG encoder 111, the CPU 112, the DRAM 113, the Ethernet circuit 114, and the data bus 115 shown in FIG. 10, and the MPEG encoder 11, the CPU 12, the DRAM 13, the Ethernet circuit 14, and the data having the same functions. A MIRQ count circuit 16 is added to the bus 15. The MPEG encoder 11 includes an A / D converter 21, an MPEG1 encoder LSI 22, a FIFO memory 23, and an MPEG interface circuit 24.
[0027]
The MIRQ count circuit 16 counts the number of occurrences of the hardware interrupt request MIRQ requested by the MPEG interface circuit 24 to the CPU 12 and stores it in an internal register (hereinafter referred to as “hard count register”). In the following description, the MIRQ count circuit 16 is also referred to as a “hardware counter”.
[0028]
For example, when counting is performed using an 8-bit counter, the count value HC is updated by one for each rising edge of the hardware interrupt request MIRQ, as shown in FIGS. Since the operation is performed by independent hardware that does not depend on the instruction (software) of the CPU 12, the count value does not go wrong even if the processing of the CPU 12 becomes busy.
However, the CPU 12 is configured to be able to access the MIRQ count circuit 16 via the data bus 15 so that the MIRQ count circuit 16 can be reset and the hard count register can be read.
[0029]
(1) Software counter implementation and comparison method
Next, another counter is prepared separately from the MIRQ count circuit 16. It is a counter that counts the number of occurrences of hardware interrupt request MIRQ by software.
[0030]
Since the MPEG interrupt routine, which is an interrupt routine, is executed in response to the generation of the hardware interrupt request MIRQ, the number of interrupts that have occurred can be counted by performing a counting operation in the interrupt routine. The count value SC of this software counter is updated as shown in FIG.
[0031]
As can be seen from FIGS. 2A to 2H, if the processing of the CPU 12 is performed as usual, the value HC of the hardware counter coincides with the value SC of the software counter.
However, when an excessive load is temporarily applied to the CPU 12, the MPEG interrupt routine cannot be executed once per frame as shown in FIG. 2 (i), so the software counter as shown in FIG. The value SC is not updated every frame. That is, it deviates from the hardware counter value HC as many times as it is not executed.
Therefore, the value of the hardware counter is read during the execution of the MPEG interrupt routine and compared with the value of the software counter. If the values are different, the processing delay of the CPU 12 can be detected.
[0032]
(2) How to return to normal state
As described above, once the processing of the CPU 12 is delayed, the format of the elementary stream ES held in the FIFO memory 23 is broken, so that discontinuous data continues to be transmitted. In such a situation, in this embodiment, the transmission of data is interrupted, and the contents of the FIFO memory 23, the value HC of the hardware counter, and the value SC of the software counter are reset to return to the initial state. .
[0033]
By this operation, it becomes possible to write and read from the head address without reading discontinuous data remaining in the FIFO memory 23. Therefore, it is no longer necessary to continue transmitting broken data as in the prior art, and image disturbance on the receiving device side can be restored.
[0034]
(3) Program operation
The actual software operation will be described with reference to the flowcharts of FIGS.
(A) MPEG process operation
FIG. 3A is a flowchart of the MPEG process. The MPEG process is a program that mainly controls start / stop of the MPEG1 encoder LSI 22 and is started when the power is turned on.
[0035]
First, in step S11, the MPEG1 encoder LSI 22 is initialized. Here, hardware reset of the LSI itself, initial setting of the internal register group, and the like are performed. Further, the write reset of the FIFO memory 23 is performed, and the write address of the FIFO memory 23 is returned to the head address.
[0036]
In step S12, a microcode (a program for performing an encoding operation) is loaded into a memory area managed by the MPEG1 encoder LSI 22.
In step S13, both the hardware count register value HC in the MIRQ count circuit 16 that stores the hardware counter value HC and the software counter value SC (stored in the area SCA of the DRAM 13) are set to zero.
[0037]
In step S14, read reset of the FIFO memory 23 is performed via the MPEG interface circuit 24, and the read address is returned to the head address.
In step S15, the value of the encode start flag ESF indicating the encode start or stop state is set to zero. The flag ESF is stored in an area secured on the DRAM 13, and is set to 0 when in the stop state and 1 when in the start state. In the subsequent step S16, in order to start the encoding operation, the MPEG hardware interrupt is permitted and a start request command is issued to the MPEG1 encoder LSI 16. That is, the encode start flag ESF is set to 1.
As a result, the encoding operation starts and the MPEG interrupt routine is executed for each frame. The operation of the MPEG process during the encoding operation will be described later, and the MPEG interrupt routine will be described first.
[0038]
(B) Operation of MPEG interrupt routine
FIG. 3B is a flowchart of the MPEG interrupt routine. When encoding is started by the MPEG process, a hardware interrupt request MIRQ is generated at the frame period of the input video signal, the MPEG interrupt routine is executed, and phase A1 (see FIG. 2 (e)) is started.
[0039]
In step S21, the software counter value SC is incremented by one. Even when the hardware interrupt request MIRQ is generated, when the CPU 12 is executing the network process or the Ethernet interrupt routine, the MPEG interrupt process is not started, and the software counter value SC is not incremented. Therefore, the value SC of the software counter corresponds to the number of end times of image data for one frame.
[0040]
In step S22, the content of the FIFO read register (X1 byte in FIG. 2B), which is an internal register of the MPEG1 encoder LSI 22, is read to obtain the number of bytes of data to be read within the current frame period TFM.
In step S23, data is read from the FIFO memory 23 by the number of bytes and written in the MPEG area, which is an area secured on the DRAM 13.
[0041]
In step S24, the hardware counter value HC is read from the hard count register of the MIRQ count circuit 16.
In step S25, it is determined whether or not the hardware counter value HC and the software counter value SC are equal. As a result, if both match, it can be seen that the processing of the CPU 12 is in time, so the soft count error flag SCEF stored in the DRAM 13 is set to 0 (step S26), and then normal data is packetized. Then, the network process (FIG. 4A) is called to end the interrupt routine.
[0042]
On the other hand, if the hardware counter value HC and the software counter value SC do not coincide with each other in step S25, it means that the processing of the CPU 12 is delayed, so the soft count error flag SCEF is set to 1. In this case, in order to prevent transmission of broken data, the subsequent processing is interrupted without calling the network process.
[0043]
(C) Network process operation
When the processing of the CPU 12 is in time, the network process shown in FIG. 4A is executed. In response to phase A1 of the MPEG interrupt routine, phase B1 of the network process (see FIGS. 2E and 2G) starts.
[0044]
In step S31 of FIG. 4A, as shown in FIG. 13, 1460 bytes of data (the last read data may be 1460 bytes or less) is read from the MPEG area of the DRAM 13, and an 8-byte UDP header is obtained. And a 20-byte IP header.
[0045]
In step S32, this data is written in the memory of the Ethernet circuit 14, and a transmission start procedure is performed. Thereafter, hardware processing by the Ethernet circuit 14 is performed. In the hardware processing, a 14-byte Ethernet header is further added to this data to form a 1502-byte packet. This packet is sent to the Ethernet.
[0046]
In step S33, it is checked whether there is data written in the MPEG area of the DRAM 13. If data remains, the process returns to step S31, and the processes in steps S31 to S33 are repeated. In this way, continuous data is divided into packets (= 1502 bytes) and sequentially transmitted to the Ethernet 2. When there is no more data to be read from the MPEG area of the DRAM 13, the network process is terminated.
[0047]
When step S32 of the network process is completed, the Ethernet circuit 14 holds a large number of packets in the internal memory. When all the packets are transmitted, the Ethernet circuit 14 issues a hardware interrupt request EIRQ to the CPU 12, and again. Move on to software processing. At this time, the Ethernet interrupt routine is called, phase C1 (see FIG. 2 (h)) is started, and the following processing is performed.
[0048]
(D) Ethernet interrupt routine operation
In step S41, it is determined whether or not it is a transmission end interrupt. If no transmission end interrupt is issued, this routine is immediately ended. If it is a transmission end interrupt, a transmission end procedure is performed for the Ethernet circuit 14 (step S42). Next, the memory of the Ethernet circuit 14 used at the time of packet transmission is cleared (step S43), and the Ethernet interrupt routine is terminated.
[0049]
The above is the processing performed within one frame period. When an interrupt for the next frame occurs, phase A2 of the MPEG interrupt routine starts, and the processing is again performed from step S11 of the MPEG interrupt routine.
Through such software processing, the elementary stream ES output from the MPEG1 encoder LSI 22 as needed is packetized and sent to the Ethernet 2.
[0050]
(E) Operation during encoding of MPEG process
During the encoding operation, the MPEG process performs the following processing.
In step S17 of FIG. 3A, it is determined whether or not the soft count error flag SCEF stored in the DRAM 13 is 1. If the flag SCEF is 0, the software counter is normally updated, that is, the processing of the CPU 12 In this case, step S17 is repeated without doing anything. If it is normal, it loops here.
[0051]
On the other hand, when the flag SCEF is 1, as shown in FIGS. 2 (i) to (l) (when the processing of the CPU is delayed), the hardware counter value HC ((d) in the figure) This means that the software counter value SC ((j) in the figure) has shifted, and it can be seen that the processing of the CPU 12 is delayed. In this state, data that cannot be read from the FIFO memory 23 is accumulated, and if the memory capacity is exceeded, continuous data cannot be read. For this reason, the broken data continues to be sent to the Ethernet 2. As a result, the image displayed on the client (receiving device) does not return while being distorted.
[0052]
In order to avoid this, in step S18 of FIG. 3A, the data stored in the FIFO memory 23 is once cleared. In actual operation, the MPEG interface circuit 24 is accessed, the FIFO memory 23 is read reset, the FIFO memory 23 is write reset via the MPEG1 encoder LSI 22, and the FIFO read register which is an internal register of the MPEG1 encoder 22. The process of writing 0 in With this process, it is possible to write / read data continuously from the beginning of the memory without reading the non-continuous data stored in the FIFO memory 23.
[0053]
In the subsequent step S19, since the error processing is completed, the soft count error flag SCEF is set to 0, and the process returns to step S17.
As described above, in the present embodiment, the CPU 12 detects a processing delay by comparing the two counters, that is, the hardware counter value HC and the software counter value SC, and the transmission of broken data is triggered by this. Since the interruption is made temporarily, image disturbance on the receiving device side (client) can be minimized.
[0054]
In addition, since the write reset and read reset of the FIFO memory 23 are performed and the write / read operation is forcibly performed from the top address, the discontinuous data remaining in the FIFO memory 23 is wiped out, and the continuous data is read again. It becomes possible to transmit. As a result, it is possible for the client to quickly return to normal the image that has been interrupted in a disturbed manner.
[0055]
(Second Embodiment)
In the first embodiment described above, the processing delay of the CPU 12 is detected by counting the hardware interrupt request MIRQ output from the MPEG interface circuit 24 to the CPU 12, but in this embodiment, instead of the hardware interrupt request MIRQ. The hardware interrupt request EIRQ output from the Ethernet circuit 14 to the CPU 12 is counted.
[0056]
FIG. 5 shows a circuit configuration of a transmission apparatus (server) in the present embodiment. In this configuration, the MIRQ count circuit 16 is deleted from the configuration shown in FIG. 1, and the EIRQ count circuit 17 is added. In this embodiment, the hardware interrupt request EIRQ is output once per frame in synchronization with the frame pulse FP at the timing shown in FIG. 6E (immediately before the end of the frame period). The EIRQ count circuit 17 counts the number of occurrences of the hardware interrupt request EIRQ requested by the Ethernet circuit 14 to the CPU 12, and stores it in an internal register (hard count register). For example, when counting is performed using an 8-bit counter, as shown in FIG. 6F, it is updated by one for each rising edge of the hardware interrupt request EIRQ. Since the operation is performed by independent hardware that does not depend on the instruction (software) of the CPU 12, the count value does not go wrong even if the processing of the CPU 12 becomes busy.
However, the CPU 12 is configured to be able to access the EIRQ count circuit 17 via the data bus 15 so that the EIRQ count circuit 17 can be reset and the hard count register can be read.
[0057]
(1) Software counter implementation and comparison method
In this embodiment, the counting operation by software is performed by the Ethernet interrupt routine shown in FIG. Since the Ethernet interrupt routine is executed by the hardware interrupt request EIRQ, the number of occurrences of the generated Ethernet interrupt request EIRQ can be counted by performing a counting operation in the interrupt routine. The operation timing of this software counter is as shown in FIG.
[0058]
Therefore, if the processing of the CPU 12 is performed as usual, the hardware counter value HC and the software counter value SC match.
However, when an excessive load is temporarily applied to the CPU 12, the value SC of the software counter deviates from the value HC of the hardware counter as shown in FIG.
Therefore, the value HC of the hardware counter is read during the execution of the Ethernet interrupt routine, and when the value is different from the value SC of the software counter, a processing delay of the CPU 12 is detected.
[0059]
(2) How to return to normal state
As a countermeasure against this situation, as in the first embodiment, the contents of the FIFO memory 23, the hardware counter value HC, and the software counter value SC are reset and returned to the initial state. Do.
[0060]
By this operation, it becomes possible to write / read from the head address without reading discontinuous data remaining in the FIFO memory 23. Therefore, it is no longer possible to continue transmitting broken data as in the conventional case, and it is possible to restore the disturbance of the image of the client.
[0061]
(3) Program operation
The actual software operation will be described along the flowcharts of FIGS.
(A) MPEG process operation
The MPEG process (FIG. 7A) of this embodiment is the same as that of the first embodiment (FIG. 3A).
[0062]
(B) Operation of MPEG interrupt routine
When encoding is started by the MPEG process, a hardware interrupt is generated in the frame period of the input video signal, the MPEG interrupt routine is executed, and phase A1 (see FIG. 6C) is started. The MPEG interrupt routine of this embodiment consists only of steps S22, S23 and S27 as shown in FIG.
[0063]
That is, in step S22, the contents of the FIFO register (X1 byte in FIG. 6B) which is an internal register of the MPEG1 encoder LSI 22 are read to obtain the number of bytes of data to be read within the current frame period TFM. Next, data is read from the FIFO memory 23 by the number of bytes and written to the MPEG area, which is an area secured on the DRAM 13 (step S23). Then, the network process is called (step S27), and the MPEG interrupt routine is terminated.
[0064]
(C) Network process operation
The network process (FIG. 7C) of this embodiment is the same as the network process of the first embodiment shown in FIG. Therefore, when step S32 of the network process ends, the Ethernet circuit 14 holds a plurality of packets in the internal memory, and these packets are sequentially transmitted.
[0065]
However, in this embodiment, the Ethernet circuit 14 outputs a hardware interrupt request EIRQ to the CPU 12 at a timing immediately before the end of the frame period TFM, as shown in FIG. At this time, the Ethernet interrupt routine is called, phase C1 (see FIG. 6G) is started, and the following processing is performed.
[0066]
(D) Ethernet interrupt routine operation
In step S51, it is determined whether it is a transmission end interrupt. If it is not a transmission end interrupt, the processing is immediately terminated, and if it is a transmission end interrupt, the value SC of the software counter is incremented by 1 (step S52). Even when the hardware interrupt request EIRQ is generated, when the CPU 12 is executing the network process or the Ethernet interrupt routine, the Ethernet interrupt routine is not started, and therefore the value SC of the software counter is not incremented. Therefore, the value SC of the software counter corresponds to the number of end times of image data for one frame.
[0067]
In the subsequent step S53, the value HC of the hardware counter is read from the hard count register of the EIRQ count circuit 17.
In step S54, it is determined whether the value SC of the software counter is equal to the value HC of the hardware counter. If they match, it indicates that the processing of the CPU 12 is in time, so the soft count error flag SCEF is set to 0 (step S55). On the other hand, if the value SC of the software counter does not match the value HC of the hardware counter, it indicates that there is a delay in the processing of the CPU 12, so the soft count error flag SCEF is set to 1 (step S56).
[0068]
In step S57, a procedure for ending transmission is performed for the Ethernet circuit 14. Next, the memory of the Ethernet circuit 14 used for packet transmission is cleared (step S58), and the Ethernet interrupt routine is ended.
The above is the processing performed within one frame period TFM. When an interrupt for the next frame occurs, phase A2 of the MPEG interrupt routine is started, and processing is performed again from step S11 of the MPEG interrupt routine.
Through such software processing, the elementary stream output from the MPEG1 encoder LSI 22 as needed is packetized and sent to the Ethernet.
[0069]
(E) Operation during encoding of MPEG process
Processing during the encoding operation when the soft count error flag SCEF is set to 1 (FIG. 7A, steps S18 and S19) is the same as that in the first embodiment.
[0070]
As described above, in the present embodiment, the EIRQ count circuit 17 that counts the number of occurrences of the Ethernet interrupt request EIRQ output in synchronization with the frame pulse FP is provided, and the hardware counter value HC obtained thereby and the CPU 12 When there is no delay in the process, it is possible to detect the process delay of the CPU 12 by comparing with the value SC of the software counter that operates in the Ethernet interrupt process executed in response to the Ethernet interrupt request EIRQ. Therefore, the same effect as the first embodiment can be obtained.
[0071]
【The invention's effect】
As described in detail above, according to the first or second aspect of the present invention, the first count value obtained by counting the number of occurrences of the signal generated in the frame period of the input image data, and the image The first count value is compared with the second count value obtained by counting the number of times one frame of data transmission processing has been completed in the information transmission unit that transmits data. When they are different from each other, the transmission of the image data to the transmission path is interrupted, so that it is possible to detect a delay in the information transmission process and prevent the transmission of broken data from being continued. As a result, image disturbance on the receiving device side can be minimized. Furthermore, when a delay in information transmission processing is detected, The first count value and the second count value are returned to their initial values, and the image data stored in the data memory is deleted. Since the reset process is executed, normal data transmission can be resumed. As a result, on the receiving device side, the problem that the reproduced image cannot be recovered from the disordered state can be solved, and a normal image can be displayed quickly.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an image data transmission apparatus according to a first embodiment of the present invention.
FIG. 2 is a timing chart for explaining the operation of the apparatus of FIG. 1;
FIG. 3 is a flowchart of processing executed by the CPU of FIG. 1;
4 is a flowchart of processing executed by the CPU of FIG.
FIG. 5 is a block diagram showing a configuration of an image data transmission apparatus according to a second embodiment of the present invention.
6 is a timing chart for explaining the operation of the apparatus shown in FIG. 5;
7 is a flowchart of processing executed by the CPU of FIG.
FIG. 8 is a flowchart of processing executed by the CPU of FIG.
FIG. 9 is a block diagram illustrating a configuration of a conventional image transmission system.
10 is a block diagram illustrating a configuration of the transmission apparatus illustrated in FIG. 9;
11 is a timing chart for explaining the operation of the apparatus shown in FIG. 10;
12 is a flowchart of processing executed by the CPU of FIG.
FIG. 13 is a diagram for explaining a method for generating a packet for transmitting image data.
FIG. 14 is a timing chart for explaining problems of a conventional apparatus.
[Explanation of symbols]
1 Image data transmission device
11 MPEG encoder
12 CPU (control unit, software counting means)
13 DRAM
14 Ethernet circuit (information sending part)
15 Data bus
16 MIRQ count circuit (hardware count means)
17 EIRQ count circuit (hardware counting means)
22 MPEG1 encoder LSI (information compression unit)

Claims (2)

入力される動画像データの情報圧縮処理を行い、該処理後のデータをデータメモリに格納する情報圧縮部と、前記データメモリに格納された画像データを読み出し、パケット化して伝送路に送出する情報送出部と、前記情報圧縮部及び情報送出部の制御を行う制御部とを備える画像データ伝送装置において、
前記画像データのフレーム周期で生成される信号の発生回数をカウントすることにより第1のカウント値を得るハードウェアカウント手段を備え、
前記制御部は、前記情報送出部における1フレーム分のデータ送出処理が終了した回数をカウントすることにより第2のカウント値を得るソフトウェアカウント手段を有し、前記第1のカウント値と、前記第2のカウント値とが異なるときは、前記画像データの伝送路への送出を中断すると共に、前記ハードウェアカウント手段でカウントする第1のカウント値、及び前記ソフトウェアカウント手段でカウントする第2のカウント値をそれぞれ初期値に戻し、かつ前記データメモリに格納されている画像データを消去する処理であるリセットを行うことを特徴とする画像データ伝送装置。
Information compression processing for input moving image data, information compression unit for storing the processed data in a data memory, and information for reading out the image data stored in the data memory, packetizing it, and sending it to the transmission line In an image data transmission apparatus comprising a sending unit and a control unit for controlling the information compression unit and the information sending unit,
Hardware counting means for obtaining a first count value by counting the number of occurrences of a signal generated in a frame period of the image data;
The control unit includes software count means for obtaining a second count value by counting the number of times one frame of data transmission processing has been completed in the information transmission unit, and the first count value and the first count value When the count value is different from 2, the transmission of the image data to the transmission path is interrupted , the first count value counted by the hardware count means, and the second count value counted by the software count means The image data transmission apparatus is characterized in that resetting is performed, which is a process of erasing image data stored in the data memory .
入力される動画像データの情報圧縮処理を行い、該処理後のデータをデータメモリに格納する情報圧縮部と、前記データメモリに格納された画像データを読み出し、パケット化して伝送路に送出する情報送出部とを備える画像データ伝送装置の制御方法において、
前記画像データのフレーム周期で生成される信号の発生回数をカウントすることにより第1のカウント値を得るステップと、
前記情報送出部における1フレーム分のデータ送出処理が終了した回数をカウントすることにより第2にカウント値を得るステップと、
前記第1のカウント値と、前記第2のカウント値とが異なるときは、前記画像データの伝送路への送出を中断すると共に、前記第1のカウント値、及び前記第2のカウント値をそれぞれ初期値に戻し、かつ前記データメモリに格納されている画像データを消去する処理であるリセットを行うステップとを含むことを特徴とする画像データ伝送装置の制御方法。
Information compression processing for input moving image data, information compression unit for storing the processed data in a data memory, and information for reading out the image data stored in the data memory, packetizing it, and sending it to the transmission line In a control method of an image data transmission device comprising a sending unit,
Obtaining a first count value by counting the number of occurrences of a signal generated in a frame period of the image data;
Secondly obtaining a count value by counting the number of times one frame of data transmission processing has been completed in the information transmission unit;
When the first count value and the second count value are different, the transmission of the image data to the transmission path is interrupted , and the first count value and the second count value are set respectively. A control method for an image data transmission apparatus, comprising: resetting to an initial value and resetting which is a process of erasing image data stored in the data memory .
JP2000239252A 2000-08-08 2000-08-08 Image data transmission apparatus and control method thereof Expired - Lifetime JP3750503B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000239252A JP3750503B2 (en) 2000-08-08 2000-08-08 Image data transmission apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000239252A JP3750503B2 (en) 2000-08-08 2000-08-08 Image data transmission apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JP2002058018A JP2002058018A (en) 2002-02-22
JP3750503B2 true JP3750503B2 (en) 2006-03-01

Family

ID=18730822

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000239252A Expired - Lifetime JP3750503B2 (en) 2000-08-08 2000-08-08 Image data transmission apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP3750503B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010048982A (en) * 2008-08-20 2010-03-04 Sigma Corp Camera body and interchangeable lens barrel

Also Published As

Publication number Publication date
JP2002058018A (en) 2002-02-22

Similar Documents

Publication Publication Date Title
JP4620041B2 (en) Stochastic adaptive content streaming
JP4850932B2 (en) Image transmission device
US8018931B2 (en) Communication apparatus and integrated circuit for communication
US11812114B2 (en) Method and server for audio and/or video content delivery
CN110830460A (en) Connection establishing method and device, electronic equipment and storage medium
JP4363404B2 (en) Receiving apparatus and method, and program
JP2002271389A (en) Packet processor and packet processing method
JP3750503B2 (en) Image data transmission apparatus and control method thereof
JP2013012833A (en) Transmission apparatus and control method for transmission apparatus
JP3201313B2 (en) Data transmission system and playback device
JP3390033B2 (en) Packet communication method
JP2000295597A (en) Reception and transmission system for media data
JP3827133B2 (en) Image transmission apparatus and image transmission method
JP3719120B2 (en) Image data transmission device
JP2002281079A (en) Image data transmitting device
JP2004526382A (en) Method and apparatus for controlling insertion of stuffing data into a recorded bit stream
JP3801043B2 (en) Data receiving apparatus and method
JP5506362B2 (en) Transmission device and transmission method
JP3454175B2 (en) Image information transmission device
JP3441257B2 (en) Data transmission equipment
JPH11163934A (en) System and device for transmission, reception device, real-time dynamic picture, system and device for sound transmission, control method for the same and storage device
JP2004349743A (en) Video stream switching system, method, and video image monitoring and video image distribution system including video stream switching system
JP2005244517A (en) Unit, method, and program for data transmission control
WO2021140768A1 (en) Transmission device and transmission method
JP4193856B2 (en) Data transmission apparatus and method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050426

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050616

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050906

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051024

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051128

R151 Written notification of patent or utility model registration

Ref document number: 3750503

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20091216

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101216

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111216

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111216

Year of fee payment: 6

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20111216

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20121216

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20121216

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20131216

Year of fee payment: 8

EXPY Cancellation because of completion of term