JP3643020B2 - Data transfer method and apparatus, and data processing apparatus using the apparatus - Google Patents

Data transfer method and apparatus, and data processing apparatus using the apparatus Download PDF

Info

Publication number
JP3643020B2
JP3643020B2 JP2000232176A JP2000232176A JP3643020B2 JP 3643020 B2 JP3643020 B2 JP 3643020B2 JP 2000232176 A JP2000232176 A JP 2000232176A JP 2000232176 A JP2000232176 A JP 2000232176A JP 3643020 B2 JP3643020 B2 JP 3643020B2
Authority
JP
Japan
Prior art keywords
data
memory
image data
read
timing
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
JP2000232176A
Other languages
Japanese (ja)
Other versions
JP2002041450A (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.)
Schneider Electric Japan Holdings Ltd
Original Assignee
Digital 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 Digital Electronics Corp filed Critical Digital Electronics Corp
Priority to JP2000232176A priority Critical patent/JP3643020B2/en
Publication of JP2002041450A publication Critical patent/JP2002041450A/en
Application granted granted Critical
Publication of JP3643020B2 publication Critical patent/JP3643020B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Studio Circuits (AREA)
  • Image Input (AREA)
  • Digital Computer Display Output (AREA)
  • Information Transfer Systems (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、一旦メモリに取り込んだ入力データをCPUなどの処理装置において処理するために、その処理装置に所望のタイミングで転送するデータ転送方法およびその装置ならびにその装置を用いたデータ処理装置に関するものである。
【0002】
【従来の技術】
従来、ビデオキャプチャー装置などの画像合成装置においては、外部から入力されたビデオ画像を取り込んで、表示装置に表示されている表示画像上に重畳して表示する際に、ビデオ画像のデジタルデータを一旦画像メモリに蓄えた後、所定の表示タイミングで表示装置に表示された表示画像上に設けられたウインドウに表示する。このような装置において、ビデオ画像を拡大して表示する場合、図7に示すような構成が用いられる。
【0003】
この構成においては、ビデオカメラ21から出力された、例えばNTSC方式やPAL方式のビデオ信号は、ビデオデコーダ22で処理される。ここでは、ビデオ信号から同期信号と画像信号とが分離され、その画像信号がデジタル信号に変換される。そのデジタルの画像データは、画像メモリ23に書き込まれる。
【0004】
画像メモリ23から読み出された画像データは、拡大処理回路24で水平方向および垂直方向に指定された倍率で拡大処理が施された後、表示装置25の表示部25aに表示されている表示画像上に拡大画像として表示される。
【0005】
一般に、画像メモリのアクセスバンド幅は、ライン当たりのドット数×動作速度で定められるので、アクセスバンド幅を大きくしないためには、ドット数または/および動作速度を制限する必要がある。そこで、通常、メモリへの書き込みの前ではなく後に画像データを拡大することによって、ドット数および動作速度を不要に上昇させることなく、アクセスバンド幅を小さくしている。
【0006】
また、上記のような画像合成装置においては、入力画像の所望の部分を抜き出して(クリッピングして)、表示装置25に表示されたベース画面に入力画像を併せて表示することができる。入力画像の抜き出しは、図示しない表示コントローラによって、指定された期間で画像メモリ23から読み出すことで行われる。
【0007】
【発明が解決しようとする課題】
ところで、画像メモリ23から読み出された画像データをCPUなどの処理装置を用いてソフトウェアによって所望の画像処理を行う場合、画像メモリ23に格納された画像データをCPUで直接読み出している。
【0008】
しかしながら、上記の構成では、拡大画像をソフトウェアによって処理する場合、表示装置25の表示タイミングで読み出された画像データが拡大処理回路24で拡大されるため、その拡大画像データをCPUのタイミングで取り込むことができない。このため、画像メモリ23からCPUによって直接読み出された画像データに、拡大処理回路24で行う同等の拡大処理をソフトウェアで施さなければならず、それだけCPUの負担が増大するという問題がある。
【0009】
しかも、拡大(または縮小)処理をソフトウェアで行うためのアルゴリズムが拡大の手法によって微妙に異なるので、そのアルゴリズムを正確に適用しないと、回路処理で得られた拡大画像データと同一の拡大画像データを得ることができない。
【0010】
また、入力画像の所望の部分を取り込むためにソフトウェアによるクリッピング処理を行う場合、所望の部分をCPUによって画像メモリ23から直接読み出すためのアドレス設定などをソフトウェアで行わなければならない。したがって、この場合もやはりCPUの負担を増大させるという問題がある。
【0011】
CPUのタイミングで画像データを取り込む方法としては、表示タイミングで画像メモリ23から読み出された画像データを他のメモリなどに一旦蓄えた上でCPUのタイミングで読み出すことも考えられる。しかしながら、その場合、メモリが1画面分といった記憶容量を有しておれば、1画面分の画像データの書き込みおよび読み出しの時間が短くなって、CPUに取り込まれるまでの速度を比較的高くすることができる。しかしながら、メモリの記憶容量を大きくするほど装置のコストが高くなるという不都合がある。
【0012】
なお、上記のような課題は、画像データに限らず、周期的に繰り返すデータ、例えばハードディスクへの書き込みデータのようなデータをハードウェアで処理する場合にも生じる。したがって、このようなデータについても、画像データと同様に上記の課題が解決されることが望まれる。
【0013】
本発明は、上記の事情に鑑みてなされたものであって、CPUなどの処理装置の負担を軽減するために、ハードウェアで処理されたデータを処理装置に取り込むとともに、その取り込む速度を低コストの構成で高めることができるデータ転送方法およびその装置を提供することを目的としている。
【0014】
【課題を解決するための手段】
本発明のデータ転送方法およびデータ転送装置は、上記の課題を解決するために、周期的に繰り返して連続するデータを出力先のタイミングでメモリから読み出して1周期分のデータより小さい記憶容量を有するバッファメモリに一時的に書き込む一方、バッファメモリへの書き込みのタイミングと非同期な処理装置の読出タイミングで上記データを上記バッファメモリから読み出すと共に、上記データが画像データであり、上記出力先としての表示装置の表示タイミングで上記メモリから画像データを読み出す一方、上記記憶容量が画像データの1水平ライン分よりも小さく、さらに、1周期の間に上記バッファメモリへの上記記憶容量分の書き込みを、予め定められたスキップライン数のラインを飛び越して行うことによって、上記メモリから読み出されるタイミングで定まる速度に合わせて複数回行うことを特徴としている。
【0015】
また、本発明のデータ処理装置は、周期的に繰り返して連続するデータを格納するメモリ手段と、上記メモリ手段から出力先のタイミングで読み出す読出制御手段と、上記メモリ手段から読み出されたデータに所定の処理を施す処理手段と、上記データ転送装置とを備えていることを特徴としている。
【0016】
上記の方法および装置では、データを出力先に出力させるために、メモリから出力先のタイミングで読み出される。一方、そのデータは、読み出されたタイミングでバッファメモリに書き込まれた後、処理装置の読出タイミングで書き込みとは非同期に読み出される。また、データがバッファから読み出される際にも、メモリからデータが読み出されているので、そのデータをバッファメモリに書き込むことができない。しかしながら、1周期の間にバッファメモリへの記憶容量分の書き込みをメモリから読み出されるタイミングで定まる速度に合わせて複数回行うことにより、データの1周期分をバッファメモリに書き込むために、同じ1周期のデータをメモリから読み出す回数が少なくなり、1周期のデータをバッファメモリから読み出す速度を高めることができる。しかも、1周期分のデータより小さい記憶容量を有するバッファメモリにデータを書き込むことから、1周期の間におけるバッファメモリへのデータの書き込み回数が多くなるほどバッファメモリの記憶容量が小さくなり、バッファメモリを集積回路で構成する場合に、その集積回路の規模が小さくなり、コストを低減することができる。
【0017】
また、上記の方法および装置においては、上記データが画像データであり、上記出力先としての表示装置の表示タイミングで上記メモリから画像データを読み出す一方、上記記憶容量が画像データの1水平ライン分よりも小さいので、1画面分の画像データを表示装置に出力する際に、表示装置の表示タイミングでバッファメモリに書き込まれた画像データが、処理装置のタイミングで読み出される。それゆえ、ソフトウェアによってクリッピング処理を行う必要がなくなり、CPUなどの処理装置の負担を軽減することができる。また、バッファメモリの記憶容量が1水平ライン分よりも小さいので、例えば、表示速度に合わせて1フレーム期間で数ライン飛び越すようにバッファメモリに書き込むようにすれば、多数回書き込みを行うことができる。
【0018】
上記の画像データを転送する方法および装置においては、上記メモリから読み出された画像データに拡大または縮小処理を施してから上記バッファメモリに書き込むことが好ましい。このようにすれば、拡大画像データまたは縮小画像データがバッファメモリを介して取り込まれるので、表示タイミングと異なる処理装置の読出タイミングで拡大または縮小画像データを読み出すことができる。それゆえ、ソフトウェアによって拡大または縮小処理を行う必要がなくなるので、CPUなどの処理装置の負担をさらに軽減することができるとともに、回路(ハードウェア)処理によって得られた拡大または縮小画像データをそのまま処理装置で利用できる。また、上記スキップライン数は、上記バッファメモリが記憶容量分の画素データを取り込む間に出力される画像データのライン数よりも1つ多いライン数に設定されていてもよい。これにより、バッファメモリの取り込みを確実に行うとともに、取り込みの待ち時間を長引くことが回避できる。
【0019】
【発明の実施の形態】
本発明の実施の一形態について図1ないし図6に基づいて説明すれば、以下の通りである。
【0020】
本実施の形態では、データ転送装置が画像処理装置としてのビデオキャプチャー装置に組み込まれた構成について説明する。
【0021】
本実施の形態に係るビデオキャプチャー装置は、図2に示すように、ビデオカメラ1、ビデオデコーダ2、FIFOメモリ(図中、FIFO)3、画像メモリ4、拡大/縮小処理回路5およびバッファ回路6を備えている。
【0022】
ビデオカメラ1としては、白黒で画像を撮影する産業用のビデオカメラが用いられる。ビデオデコーダ2は、ビデオカメラ1から出力されたアナログのNTSC方式やPAL方式といったビデオ信号(コンポジットビデオ信号)から抽出された画像信号のデジタルへの変換、ビデオ信号からの水平同期信号および垂直同期信号の分離等を行う装置である。
【0023】
FIFOメモリ3は、ビデオデコーダ2から出力される入力画像データを書き込まれた順に読み出すメモリである。このFIFOメモリ3は、画像メモリ4からの入力画像データの読み出しを優先させるために、後述の表示コントローラ9(図3参照)によって制御される表示装置8の表示タイミングに応じて、ビデオデコーダ2から出力される入力画像データの画像メモリ4への読み出しのタイミングが制御される。
【0024】
メモリ(メモリ手段)としての画像メモリ4は、入力画像データを蓄える半導体メモリ(ビデオRAMなど)である。この画像メモリ4は、FIFOメモリ3から読み出された入力画像データを順次蓄えていき、表示装置8の表示タイミングに合わせて読み出していくように、書き込みおよび読み出しが制御される。
【0025】
画像メモリ4への書き込みに用いられる書込アドレスは、例えば、1ラインにおける各画素に割り当てられた下位の10ビットと、各ラインに割り当てられた上位の9ビットとによって構成されている。下位の10ビットは、1水平ラインにおける各ドットに対応したドットクロックをカウントするカウンタによって生成される。一方、上位の9ビットのうち8ビットは、水平同期信号をカウントするカウンタによって生成される。残余の1ビットは奇数フィールドと偶数フィールドとを区別するために設けられ、垂直同期信号に基づいて与えられる。
【0026】
なお、上記のドットクロックは、1水平走査期間内の有効表示期間において各画素が供給されるタイミングに同期したクロックであり、外部から供給される(またはビデオデコーダで生成される)。
【0027】
画像メモリ4からの読み出しに用いられる読出アドレスは、予め別途用意されている。この読出アドレスは、表示コントローラ9から供給される1画素毎に対応したドットクロックをカウンタでカウントすることによって得られた下位の10ビット(水平位置に対応)と、1水平走査期間において有効な画像データが存在する期間でアクティブとなる信号をカウンタでカウントすることによって得られた上位の9ビット(垂直位置に対応)からなる。このような読出アドレスは、後述する読出アドレス発生回路11で生成される。
【0028】
拡大/縮小手段としての拡大/縮小処理回路5は、画像メモリ4から読み出された入力画像データを水平方向および垂直方向に予め設定された倍率で拡大または縮小する。拡大の方法としては、例えば、入力画像データを用いて、隣接する画素データに適当に重み付けされた係数を乗算した値を加算して隣接する画素データ間に補間すべきデータを生成する方法が挙げられる。また、縮小の方法としては、例えば、入力画像データを用いて、隣接する画素データに適当に重み付けされた係数を乗算した値を加算して元の画素数より少ない新たな画素データを生成する方法が挙げられる。
【0029】
なお、以降の説明では、画像を拡大する例について説明する。
【0030】
バッファ回路6は、拡大/縮小処理回路5から出力された拡大画像データにおいて、CPU7により指定された位置のデータと上記の表示タイミングで定まる位置のデータとが一致したときに、その位置の画素データを一時的に蓄え、CPU7の要求するタイミングで出力するように構成されている。このバッファ回路6については、後にさらに詳しく説明する。
【0031】
バッファ回路6は、図3に示すように、Dフリップフロップ61、FIFOメモリ(図中、FIFO)62、デコーダ63、書込制御部64、読出制御部65および出力インターフェース部66を備えている。
【0032】
Dフリップフロップ61は、表示タイミングで入力される拡大/縮小処理回路5からの拡大画像データをラッチして出力する回路である。このDフリップフロップ61は、FIFOメモリ62と共通するシステムクロックSYSCLKに同期して拡大画像データをFIFOメモリ62に出力する。
【0033】
バッファメモリ(バッファメモリ手段)としてのFIFOメモリ62は、拡大/縮小処理回路5からの拡大画像データを書き込み順に読み出すデータレジスタ的動作をするメモリである。このFIFOメモリ62は、書込制御端子WRに書込制御部64からのハイレベルの書込制御信号が入力されると、Dフリップフロップ61からの拡大画像データを順次書き込んでいき、書き込み順に第1ワードのレジスタから第n(最終)ワードのレジスタまでシフトさせる。一方、FIFOメモリ62は、読出制御端子RDに読出制御部65からのハイレベルの書込制御信号が入力されると、蓄えていた拡大画像データを第nワードのレジスタから順次読み出していく。また、FIFOメモリ62は、拡大または縮小されていない入力画像データの1水平ライン分(NTSC方式やPAL方式といった一般のビデオ信号における標準的な1水平ライン分)よりも少ない画像データの記憶容量を有している。このため、FIFOメモリ62は、1水平ライン分の拡大画像データを出力するために、複数回の書き込みおよび読み出しを行う。
【0034】
上記のFIFOメモリ62は、画像データが第nワードのレジスタまで書き込まれたとき(画像データが全レジスタに書き込まれたとき)に満端子FULLからハイレベルの信号(出力許可信号)を出力する一方、第nワードのレジスタにデータが書き込まれていないときに満端子FULLからローレベルの信号(出力禁止信号)を出力する。また、FIFOメモリ62は、画像データが全てのレジスタに書き込まれていないときに空き端子EMPTYからハイレベルの信号(入力許可信号)を出力する一方、画像データが全てのレジスタに書き込まれているときに空き端子EMPTYからローレベルの信号(入力禁止信号)を出力する。
【0035】
なお、上記の出力許可信号は、CPU7の割り込み端子INTRに割り込み要求信号として入力される。
【0036】
デコーダ63は、CPU7のアドレス端子ADDから出力されるアドレスおよびコントロール端子CNT(実際は信号毎に出力端子が異なる)から出力される各種のコントロール信号に基づいて次の各種の制御信号を生成する回路である。これらの制御信号は、それぞれローアクティブの垂直位置セット信号SETVPOSCS* 、水平位置セット信号SETHPOSCS* 、読出選択信号RDDATACS* および読出ステータス信号RDSTATCS* である。
【0037】
垂直位置セット信号SETVPOSCS* は読み出したいデータの垂直方向の位置(ライン位置)を与える信号であり、水平位置セット信号SETHPOSCS* は読み出したデータの水平方向の位置(画素位置)を与える信号である。また、読出選択信号RDDATACS* はFIFOメモリ62からの読み出しのタイミングを与えるための基礎となる制御信号であり、FIFOメモリ62の満状態(出力禁止信号)が割込要求信号としてCPU7に通知されることによりCPU7で発生する読出ストローブ信号(コントロール信号の一種)に基づいている。さらに、読出ステータス信号RDSTATCS* は、アプリケーションプログラム(画像処理プログラムなど)による拡大画像データの読み込みが可能な状態になったときにCPU7から出力されるステータス信号(コントロール信号の一種)に基づいている。
【0038】
垂直位置セット信号SETVPOSCS* および水平位置セット信号SETHPOSCS* を得るためには、アドレスだけではなくコントロール信号が組み合わされて用いられる。これは、アドレスが前述のようにドットクロックおよび水平同期信号に基づいて作成されることから画素(表示ドット)の位置に対応していること、および安定した期間(アドレス信号の立ち上がり時などの過渡的な不安定期間を除いた期間)でアドレスを利用できるように上記の読出ストローブ信号などのコントロール信号が必要であることによる。
【0039】
書込制御部64は、インバータ64a・64b、垂直位置レジスタ(図中、VPR)64c、水平位置レジスタ(図中、HPR)64d、一致検出コンパレータ(図中、CMP)64e・64f、ANDゲート64gおよびJKフリップフロップ64hを備えている。
【0040】
垂直位置レジスタ64cは、CPU7から出力された、読み出すべき画像データ(画素データ)の垂直位置のデータをラッチする回路であり、インバータ64aで反転された前述の垂直位置セット信号SETVPOSCS* (入力クロック)に同期して上記の垂直位置データをセットする。一方、水平位置レジスタ64dは、上記の読み出すべき画像データの水平位置のデータをラッチする回路であり、インバータ64bで反転された前述の水平位置セット信号SETHPOSCS* (入力クロック)に同期して上記の水平位置データをセットする。
【0041】
一致検出手段としての一致検出コンパレータ64eは、表示コントローラ9から出力された、表示装置8に表示される拡大画像データの垂直位置データVPOSと、CPU7からの垂直位置データとを比較して、両者が一致したときにハイレベルの一致検出信号を出力する。一方、一致検出手段としての一致検出コンパレータ64gは、表示コントローラ9から出力される、表示装置8に表示される拡大画像データの水平位置データHPOSと、CPU7からの水平位置データとを比較して、両者が一致したときにハイレベルの一致検出信号を出力する。
【0042】
ANDゲート64gは、一致検出コンパレータ64f・64gからの両一致検出信号の論理積を出力する。JKフリップフロップ64hは、入力端子Jに入力されるANDゲート64gのハイレベルの出力により、システムクロックSYSCLKに同期して出力端子Qの出力をセットし(ハイレベル)、FIFOメモリ62の満端子FULLのハイレベルの出力により、システムクロックSYSCLKに同期して出力端子Qの出力をリセットする(ローレベル)。このようにして得られる出力端子Qの出力は、FIFOメモリ62の書込制御端子WRに書込制御信号として与えられる。
【0043】
読出制御部65は、インバータ65a、Dフリップフロップ65b・65cおよびANDゲート65dを備えている。
【0044】
インバータ65aは、前述の読出選択信号RDDATACS* を反転する。Dフリップフロップ65bは、入力端子D1 に入力されるインバータ65aの出力をシステムクロックSYSCLKの立ち上がりエッジに同期して出力端子Q1 から出力する。Dフリップフロップ65cは、上記の出力端子Q1 からの出力を同様にシステムクロックSYSCLKの立ち上がりエッジに同期して出力端子Q2 から出力する。これにより、出力端子Q2 の出力は出力端子Q1 の出力に対して1クロック分シフトしている。ANDゲート65dは、その出力端子Q2 の出力と、Dフリップフロップ65bにおける反転出力端子/Q1 の出力との論理積をとることによって、読出選択信号RDDATACS* の立ち下がりエッジで立ち上がる1クロック幅のパルスを出力する。このパルスは、FIFOメモリ62の読出制御端子RDに読出制御信号として与えられる。
【0045】
出力インターフェース部66は、バッファ66a〜66cからなっている。バッファ66aは、前述の読出選択信号RDDATACS* (ローレベル)によってFIFOメモリ62の出力端子OUTから出力される拡大画像データをCPU7のデータ端子DATAに出力する。バッファ66b・66cは、前述の読出ステータス信号RDSTATCS* (ローレベル)によって、それぞれFIFOメモリ62の空き端子EMPTYからの信号と、満端子FULLからの信号とをCPU7のデータ端子DATAに拡大画像データとともに入力する。
【0046】
続いて、上記のように構成されるビデオキャプチャー装置における拡大画像データのCPU7への取り込みの動作について説明する。
【0047】
まず、ビデオカメラ1に取り込まれた画像は、ビデオ信号としてビデオデコーダ2に出力される。ビデオデコーダ2では、ビデオ信号から画像信号が抽出されるとともにデジタル化される。その入力画像データは、ビデオデコーダ2からの出力タイミングに合わせてFIFOメモリ3に順次書き込まれていき、画像メモリ4への書込タイミングに合わせて順次読み出されていく。このFIFOメモリ3による入力画像データの書き込みおよび読み出しによって、画像メモリ4からの入力画像データの読み出しが、FIFOメモリ3からの入力画像データの書き込みに対して優先して行われる。したがって、FIFOメモリ3の次段に設けられるバッファ10は、画像メモリ4への入力画像データの出力可能な期間が、バッファ10のイネーブル端子に入力されるイネーブル信号がローレベルとなる期間に制限される。
【0048】
画像メモリ4への入力画像データの書き込みは、前述の書込アドレスがマルチプレクサ(図中、MPX)12を介して画像メモリ4のアドレス端子ADDに入力されることによって行われる。画像メモリ4からの画像データの読み出しは、読出制御手段としての読出アドレス発生回路11から出力される前述の読出アドレスがマルチプレクサ(図中、MPX)12を介して画像メモリ4のアドレス端子ADDに入力されることによって行われる。
【0049】
画像メモリ4から読み出された画像データは、拡大/縮小処理回路5に入力される。拡大/縮小処理回路5では、画像データが垂直方向および垂直方向に所定の倍率で拡大される。この結果得られた拡大画像データは、表示装置8に送出される。表示装置8では、表示部8aの全面に表示された画像上の予め定められた領域に設けられたウインドウに、上記の拡大画像データが、元画像(表示部8aにおける左側の画像)から拡大された拡大画像として表示される。この拡大画像は、必要に応じて、表示コントローラ9で制御される表示タイミングによって、元画像における予め指定された領域がクリッピングされた画像として表示される。
【0050】
また、上記の拡大画像データは、バッファ回路6にも入力される。このバッファ回路6では、拡大画像データにおける必要な部分の画素データの位置(垂直位置および水平位置)についてのデータが、画像処理プログラムによってCPU7で予め設定されており、データ端子DATAから出力される。この位置データのうち垂直位置データが、垂直位置セット信号SETVPOSCS* に同期して垂直位置レジスタ64cにセットされる一方、水平位置データが水平位置セット信号SETHPOSCS* に同期して水平位置レジスタ64dにセットされる。
【0051】
一方、表示コントローラ9からは、垂直位置データVPOSおよび水平位置データHPOSが出力される。一致検出コンパレータ64eでは、上記の垂直位置データVPOSと、垂直位置レジスタ64cから出力された垂直位置データとが比較され、両者が一致するとハイレベルの一致検出信号が出力される。また、一致検出コンパレータ64fでは、上記の水平位置データHPOSと、水平位置レジスタ64dから出力された水平位置データとが比較され、両者が一致するとハイレベルの一致検出信号が出力される。
【0052】
これにより、ANDゲート64gからJKフリップフロップ64hにハイレベルの信号が入力されると、JKフリップフロップ64hがセットされ、FIFOメモリ62の書込制御端子WRにハイレベルの書込制御信号が与えられる。FIFOメモリ62は、この書込制御信号が入力されている期間にシステムクロックSYSCLKのタイミングで、Dフリップフロップ61にラッチされた、上記の位置の画素データがFIFOメモリ62に書き込まれる。
【0053】
このようにして、表示コントローラ9およびCPU7で指定された両垂直位置および両水平位置がそれぞれ一致する毎に、画素データが1つずつFIFOメモリ62に書き込まれるとともに出力側にシフトしていく。このとき、新たな垂直位置データおよび水平位置データは、垂直位置セット信号SETVPOSCS* および水平位置セット信号SETHPOSCS* がデコーダ63からそれぞれ出力される毎にセットされる。
【0054】
そして、画素データがFIFOメモリ62における最後のレジスタに達すると、全レジスタに画素データが書き込まれたことになるので、満端子FULLから、ハイレベルの出力許可信号が出力される。このとき、JKフリップフロップ64hがリセットされるので、FIFOメモリ62の書込制御端子WRの状態がローレベルに変化して、画素データの書き込みが停止する。
【0055】
一方、CPU7は、上記の出力許可信号を割り込み要求信号として受けると、読出ストローブ信号を出力する。デコーダ63が、この読出ストローブ信号に基づいてローレベルの読出選択信号RDDATACS* を出力すると、ハイレベルの読出制御信号が読出制御部65から出力されてFIFOメモリ62の読出制御端子RDに与えられる。その結果、読出制御信号が入力されている期間にシステムクロックSYSCLKのタイミングで、FIFOメモリ62に蓄えられている画素データがバッファ66aを介して1つずつ出力されて、CPU7のデータ端子DATAに入力される。
【0056】
このようにして画素データが順次読み出されていくと、やがてFIFOメモリ62の全てのレジスタに空きが生じる。このとき、空き端子EMPTYからハイレベルの入力許可信号がバッファ66bを介してCPU7に入力されると、CPU7から出力されるアドレスなどに基づいて、デコーダ63から垂直位置セット信号SETVPOSCS* および水平位置セット信号SETHPOSCS* が出力される。これにより、垂直位置データおよび水平位置データが、それぞれ両位置レジスタ64c・64dにセットされると、前述のように、垂直位置データVPOSおよび水平位置データHPOSとの比較が行われ、両者が一致したときに画素データがFIFOメモリ62に書き込まれる。
【0057】
そして、このような画素データの満状態に至るまでの書き込みと空き状態に至るまでの読み出しとが複数回繰り返されることによって1水平ライン分の画素データが読み出される。読み出された画素データは、1画面分の拡大画像データとしてメインメモリ13にまとめられて、画像処理プログラムによって所定の画像処理が施される。
【0058】
上記のような画像データのFIFOメモリ62への取り込みからメインメモリ13への移動に至る処理は、所定の画像転送プログラムによって実行される。以下に、その処理の手順を図4のフローチャートを参照して説明する。下記の例は、VGA(480ライン×680画素)の画像データを扱う場合である。
【0059】
まず、現在のライン番号を表すカレントライン番号CURLNを0にセットするとともに、バッファサイズBSZ(FIFOメモリ62の記憶容量)を63画素にセットし(S1)、現在の水平位置を表すカレント水平位置CURHPOSを0にセットする(S2)。
【0060】
次いで、カレントライン番号CURLN(垂直位置データVPOS)およびカレント水平位置CURHPOS(水平位置データHPOS)に基づいて、前述のように画素データを1つずつバッファサイズBSZが満たされるまでFIFOメモリ62に取り込むようにFIFOメモリ62の動作を制御する(S3)。FIFOメモリ62に蓄えられたバッファサイズBSZ分の画素データをCPU7によって読み出してメインメモリ13における画像記憶領域内のカレントライン番号CURLNおよびカレント水平位置CURHPOSに対応する画素データを順次書き込んでいく(S4)。
【0061】
さらに、カレント水平位置CURHPOSをバッファサイズBSZ分の画素数だけ加算して更新し(S5)、カレント水平位置CURHPOSが640未満であるか否かを判定する(S6)。ここで、カレント水平位置CURHPOSが640未満である場合、処理をS3に戻す一方、カレント水平位置CURHPOSが640に達するまでS3ないしS6の処理を繰り返す。
【0062】
カレント水平位置CURHPOSが640に達すると、カレントライン番号CURLNを1だけ加算して更新し(S7)、カレントライン番号CURLNが480未満であるか否かを判定する(S8)。ここで、カレントライン番号CURLNが480未満である場合は処理をS2に戻し、カレントライン番号CURLNが480に達するまでS2ないしS8の処理を繰り返して、処理を終える。
【0063】
以上のように、本実施の形態に係るビデオキャプチャー装置では、拡大/縮小処理回路5からの拡大画像データを表示装置8に送出するだけでなく、バッファ回路6におけるFIFOメモリ62に一旦書き込んで、CPU7のタイミングで読み出している。このようにして拡大画像データをCPU7に取り込むことにより、ソフトウェア(画像処理プログラム)で拡大処理を行う必要がない。それゆえ、CPU7の負担を軽減することができるだけでなく、拡大/縮小処理回路5で得られた拡大画像と同じ拡大画像を得るために画像処理プログラムで拡大処理アルゴリズムを正確に適用する必要がなくなり、プログラム作成の複雑化を避けることができる。これは、入力画像を縮小した場合でも同様である。
【0064】
また、本ビデオキャプチャー装置では、CPU7側で設定された垂直位置データおよび水平位置データを、表示コントローラ9で設定された垂直位置データおよび水平位置データとそれぞれ比較して、両者がともに一致したときに、その位置の画像データ(画素データ)をFIFOメモリ62に書き込んでいる。これにより、拡大画像から画像処理プログラムで設定された所定の領域を取り出すクリッピングが行われるので、その処理を画像処理プログラムで行う必要がなくなり、それだけCPU7の負担が軽減する。
【0065】
さらに、FIFOメモリ62の記憶容量が1水平ライン分の入力画像データより小さいので、1水平ライン分の拡大画像データを出力するには、前述のように書き込みと読み出しとを複数回繰り返す必要があるが、バッファ回路6の製作コストを削減するとともに、実装面積を小さくすることができる。これにより、バッファ回路6をASIC(Application-Specific Integrated Circuit) などの集積回路で構成する場合に、バッファ回路6の規模を縮小化を容易に図ることができる。この結果、バッファ回路6およびビデオキャプチャー装置のコストを低下させることができる。
【0066】
なお、拡大/縮小処理回路5で入力画像データに縮小処理を施す場合は、入力画像データが圧縮されるので、縮小率によっては1水平ライン分の縮小画像データを1回の書き込みと読み出しとでFIFOメモリ62から出力することができる。
【0067】
ところで、FIFOメモリ62への画像データの取り込みが表示タイミングで行われるため、上記のようにバッファサイズBSZが1水平ライン分に対してかなり小さく設定された場合は、画像メモリ4から取り出せるのは、1フレーム時間(約16msec )にバッファサイズBSZ分の画素データである。したがって、1画面分の画素データを取り出すには多大な時間を要する。
【0068】
例えば、バッファサイズBSZが63画素である場合、16msec の間に63画素を取り出すので、480×680個の画素を取り出すには、次の計算により約84.5sec を要する。なお、1ライン680個の画素をバッファサイズBSZに取り込む場合、11回の取り込みが必要である。
【0069】
11×480×16×10-3≒84.5
これに対し、画像メモリ4から直接CPU7によって画像データを取り出す場合、1画面分の画像データを10msec 程度で取り出すことができる。したがって、バッファサイズBSZが63画素である場合の取り出し時間は、CPU7による直接取り出し時間の8450倍もの時間を要することになる。
【0070】
このように画像データの取り出しに多大な時間を要すると、1画面分の画像データをメインメモリ13に蓄えてプリンタ14(図1参照)に印刷出力する場合、出力に長時間を要する。このような不都合を解消するには、取り出し時間の短縮を図るにはバッファサイズBSZを大きくすればよいが、バッファサイズBSZが大きくなるとバッファ回路6のコストが高くなる。
【0071】
そこで、本実施の形態では、バッファサイズBSZを大きくすることなく、また、バッファ回路6の構成を変更することなく高速で画像データを画像メモリ4から取り出すために前述の画像転送プログラムに改良を加えている。以下に、その画像転送プログラムを含む構成について説明する。
【0072】
図1に示すように、画像転送プログラム15は、メモリ転送部15a、カレントライン番号設定部15b、カレント水平位置設定部15cおよびインライン番号設定部15dを有している。
【0073】
メモリ転送部15aは、FIFOメモリ62からメインメモリ13への画像データの移動を制御する。具体的には、FIFOメモリ62からCPU7によって読み出された画像データを、メインメモリ13における画像記憶領域内のカレントライン番号CURLNおよびカレント水平位置CURHPOSに対応する位置に書き込させる。
【0074】
カレントライン番号設定部15aは、メモリ転送部15aによるバッファサイズBSZ分の画素データのメインメモリ13への書き込みが終了すると、前述のカレントライン番号CURLNを新たに設定(更新)する。カレントライン番号CURLNの更新は、カレントライン番号CURLNに後述するスキップライン数skを加算することによって行われる。
【0075】
カレント水平位置設定部15cは、メモリ転送部15aによるバッファサイズBSZ分の画素データのメインメモリ13への書き込みが終了に、1水平ライン内で前述のカレント水平位置CURHPOSを新たに設定(更新)する。カレント水平位置CURHPOSの更新は、カレント水平位置CURHPOSにバッファサイズBSZの画素数を加算することによって行われる。
【0076】
インライン番号設定部15dは、1フレーム期間にFIFOメモリ62が所定のスキップライン数skずつ飛び越して画像データを取り込むように、スキップライン数skの間隔で定まる各区間におけるインラインの番号を表すインライン番号InLNを、1フレーム期間でのメインメモリ13への画像データ書き込みが終了した後に新たに設定(更新)する。インライン番号InLNの更新は、インライン番号InLNに“1”を加算することによって行われる。
【0077】
スキップライン数skは、表示タイミングで決まる表示速度と、画像転送プログラム15に基づくCPU7によってFIFOメモリ62から画像データを読み出す速度とによって決まる。スキップライン数skは、FIFOメモリ62がバッファサイズBSZの画素データを取り込むの間に出力される画像データのライン数よりも1つ多いライン数に設定される。これにより、FIFOメモリ62の取り込みを確実に行うとともに、取り込みの待ち時間を長引くことが回避できる。
【0078】
図5は、画像メモリ4における1画面分の画像データの配置を示している。具体的には、例えば、スキップライン数skとした場合、ライン番号“0”からライン番号“3”までの区間、ライン番号“4”からライン番号“7”までの区間、ライン番号“8”からライン番号“11”までの区間、ライン番号“12”からライン番号“15”までの区間のそれぞれにおけるラインがインラインとなる。1フレーム期間では、(1),(2),(3),(4),…,(j)のバッファサイズBSZ分の画素データが画像メモリ4からFIFO62に読み出されるようになっている。
【0079】
同じ1フレーム期間に読み出される異なるライン番号の画素データ群(バッファサイズBSZ分)は、図示した例では水平方向で同じ位置にあるが、必ずしも水平方向で位置が一致していなくてもよい。しかしながら、位置計算などの容易性から、図示した配置が好ましい。
【0080】
上記のような画像転送プログラム15の処理の手順を図6のフローチャートを参照して説明する。下記の例も、図4のフローチャートで示した場合と同様、VGA(480ライン×680画素)の画像データを扱う場合である。
【0081】
まず、インライン番号InLNを0にセットし、スキップライン数skを4にセットし、バッファサイズBSZを63画素にセットする(S11)。また、現在の水平位置を表すカレント水平位置CURHPOSを0にセットし(S12)、カレントライン番号CURLNをインライン番号InLNにセットする(S13)。
【0082】
次いで、カレントライン番号CURLN(垂直位置データVPOS)およびカレント水平位置CURHPOS(水平位置データHPOS)に基づいて、前述のように画素データを1つずつバッファサイズBSZが満たされるまでFIFOメモリ62に取り込むようにFIFOメモリ62の動作を制御する(S14)。FIFOメモリ62に蓄えられたバッファサイズBSZ分の画素データをCPU7によって読み出してメインメモリ13における画像記憶領域内のカレントライン番号CURLNおよびカレント水平位置CURHPOSに対応する画素データを順次書き込んでいく(S15)。
【0083】
さらに、カレントライン番号CURLNをスキップライン数skだけ加算して更新し(S16)、カレントライン番号CURLNが480未満であるか否かを判定する(S17)。ここで、カレントライン番号CURLNが480未満である場合は処理をS14に戻し、カレントライン番号CURLNが480に達すると、カレント水平位置CURHPOSをバッファサイズBSZ分の画素数だけ加算して更新する(S18)。
【0084】
そして、カレント水平位置CURHPOSが640未満であるか否かを判定し(S19)、ここで、カレント水平位置CURHPOSが640未満である場合、処理をS13に戻して、カレント水平位置CURHPOSが640に達するまでS13ないしS19の処理を繰り返す。カレント水平位置CURHPOSが640に達すると、1を加算してインライン番号InLNを更新する(S20)。
【0085】
最後に、インライン番号InLNがスキップライン数skに達したか否かを判定し(S21)、達していない場合は、処理をS12に戻してインライン番号InLNがスキップライン数skに達するまでS12ないしS21の処理を繰り返す。一方、インライン番号InLNがスキップライン数skに達している場合は、そのまま処理を終える。
【0086】
このように、上記の画像転送プログラム15は、画像メモリ4から表示タイミングで取り出されて拡大または縮小処理が施された画像データを、スキップライン数のラインを飛び越してFIFOメモリ62に書き込むようにしている。これにより、FIFOメモリ62にバッファサイズBSZ分の画素データが蓄えられた後に、その画素データが読み出される間にも画像メモリ4から画像データが読みだされているが、FIFOメモリ62への画像データの書き込みが飛び越して行われるので、1フレーム期間において表示タイミングに合わせて複数回書き込みを行うことができる。それゆえ、図4の処理手順を実行する画像転送プログラムに比べて、1フレーム期間にFIFOメモリ62に画像データを書き込む回数を大幅に増加させることができる。
【0087】
例えば、480ライン×680画素の画像データを転送し、スキップライン数を4とする場合、バッファサイズBSZが63画素であると、図5における(j)が120(=480/4)となり、画像メモリ4からFIFOメモリ62への画像データの取り出しを1フレーム期間に120回行うことができる。これにより、次の計算で704msec で1画面分の画素データを取り出すことができる。
【0088】
11×(480/120)×16=704
この結果、図4の処理手順を実行する画像転送プログラムでの例(約84.5sec )に比べて120倍速く画像データをFIFOメモリ62へ取り込むことができる。また、この速度は、画像メモリ4からCPU7によって直接画像データを読み出す場合の速度(10msec )の約70倍にまで高められている。
【0089】
したがって、図1に示すバッファ回路6の構成を変更することなく、すなわちバッファサイズBSZを大きくすることなく、拡大/縮小処理回路5からの画像データを高速でCPU7に取り込むことができる。これにより、上記の画像データをプリンタ14で印刷出力する場合の速度を高めることができる。
【0090】
なお、本実施の形態では、画像データを転送する例について説明したが、本発明は、転送するデータが画像データに限らず周期的に繰り返すように連続するデータであればよい。例えば、このようなデータとしては、ハードディスクへの書き込みデータが挙げられる。
【0091】
【発明の効果】
以上のように、本発明のデータ転送方法および装置は、周期的に繰り返して連続するデータを出力先のタイミングでメモリから読み出して1周期分のデータより小さい記憶容量を有するバッファメモリに一時的に書き込む一方、バッファメモリへの書き込みのタイミングと非同期な処理装置の読出タイミングで上記データを上記バッファメモリから読み出すと共に、上記データが画像データであり、上記出力先としての表示装置の表示タイミングで上記メモリから画像データを読み出す一方、上記記憶容量が画像データの1水平ライン分よりも小さく、さらに、1周期の間に上記バッファメモリへの上記記憶容量分の書き込みを、予め定められたスキップライン数のラインを飛び越して行うことによって、上記メモリから読み出されるタイミングで定まる速度に合わせて複数回行う構成である。
【0092】
また、本発明のデータ処理装置は、周期的に繰り返して連続するデータを格納するメモリ手段と、上記メモリ手段から出力先のタイミングで読み出す読出制御手段と、上記メモリ手段から読み出されたデータに所定の処理を施す処理手段と、上記データ転送装置とを備えている構成である。
【0093】
これにより、メモリから出力先のタイミングで読み出されたデータがバッファメモリに書き込まれた後、処理装置の読出タイミングで書き込みとは非同期に読み出され、その読み出しの際にも、メモリからデータが読み出されるので、そのデータをバッファメモリに書き込めないが、1周期の間にバッファメモリへの記憶容量分の書き込みを上記のように複数回行うことで、データの1周期分をバッファメモリに書き込むために、同じ1周期のデータをメモリから読み出す回数が少なくなり、1周期のデータをバッファメモリから読み出す速度を高めることができる。しかも、1周期分のデータより小さい記憶容量を有するバッファメモリにデータを書き込むことから、1周期の間におけるバッファメモリへのデータの書き込み回数が多くなるほどバッファメモリの記憶容量が小さくなり、バッファメモリを集積回路で構成する場合に、その集積回路の規模が小さくなる。したがって、ハードウェアのコスト上昇を抑えた構成によって、出力先とは異なる経路でCPUなどの処理装置にデータを高速に取り込むことができるという効果を奏する。
【0094】
また、上記の方法および装置においては、上記データが画像データであり、上記出力先としての表示装置の表示タイミングで上記メモリから画像データを読み出す一方、上記記憶容量が画像データの1水平ライン分よりも小さいので、1画面分の画像データを表示装置に出力する際に、表示装置の表示タイミングでバッファメモリに書き込まれた画像データが、処理装置のタイミングで読み出される。それゆえ、ソフトウェアによってクリッピング処理を行う必要がなくなり、CPUなどの処理装置の負担を軽減することができる。また、バッファメモリの記憶容量が1水平ライン分よりも小さいので、例えば、表示速度に合わせて1フレーム期間で数ライン飛び越すようにバッファメモリに書き込むようにすれば、多数回書き込みを行うことができる。画像データの処理装置への転送を高速に行うことができるという効果を奏する。
【0095】
上記の画像データを転送する方法および装置においては、上記メモリから読み出された画像データに拡大または縮小処理を施してから上記バッファメモリに書き込むことが好ましい。このようにすれば、拡大画像データまたは縮小画像データがバッファメモリを介して取り込まれるので、表示タイミングと異なる処理装置の読出タイミングで拡大または縮小画像データを読み出すことができる。それゆえ、ソフトウェアによって拡大または縮小処理を行う必要がなくなるので、CPUなどの処理装置の負担をさらに軽減することができるとともに、回路(ハードウェア)処理によって得られた拡大または縮小画像データをそのまま処理装置で利用できる。したがって、より一層処理能力の高い画像処理を行うことができるとともに、拡大または縮小アルゴリズムの適正化が不要になるためにソフトウェア作成の複雑化を回避することができるという効果を奏する。また、上記スキップライン数は、上記バッファメモリが記憶容量分の画素データを取り込む間に出力される画像データのライン数よりも1つ多いライン数に設定されていれば、バッファメモリの取り込みを確実に行うとともに、取り込みの待ち時間を長引くことが回避できるという効果を奏する。
【図面の簡単な説明】
【図1】本発明の実施の一形態に係る、改良された転送プログラムを含むビデオキャプチャー装置の構成を示すブロック図である。
【図2】上記ビデオキャプチャー装置の基本構成を示すブロック図である。
【図3】上記ビデオキャプチャー装置のバッファ回路を中心とする詳細な構成を示すブロック図である。
【図4】上記バッファ回路による画像転送の手順を示すフローチャートである。
【図5】上記バッファ回路による画像を行う画像転送プログラムが実現する高速画像転送の概念を画像メモリに展開された画素で示す説明図である。
【図6】上記バッファ回路による改良された画像転送の手順を示すフローチャートである。
【図7】従来のビデオキャプチャー装置の概略構成を示すブロック図である。
【符号の説明】
4 画像メモリ(メモリ、メモリ手段)
5 拡大/縮小処理回路(処理手段、拡大/縮小手段)
8 表示装置(出力先)
6 バッファ回路(データ転送装置)
7 CPU(処理装置)
9 表示コントローラ
11 読出アドレス発生回路(読出制御手段)
15b カレントライン番号設定部(書込制御手段)
62 FIFOメモリ(バッファメモリ、バッファメモリ手段)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data transfer method for transferring input data once fetched into a memory to a processing device such as a CPU at a desired timing, a device for the same, and a data processing device using the device. It is.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in an image composition device such as a video capture device, when a video image input from the outside is captured and superimposed on a display image displayed on a display device, the digital data of the video image is temporarily stored. After being stored in the image memory, the image is displayed in a window provided on the display image displayed on the display device at a predetermined display timing. In such an apparatus, when a video image is enlarged and displayed, a configuration as shown in FIG. 7 is used.
[0003]
In this configuration, for example, an NTSC or PAL video signal output from the video camera 21 is processed by the video decoder 22. Here, the synchronization signal and the image signal are separated from the video signal, and the image signal is converted into a digital signal. The digital image data is written into the image memory 23.
[0004]
The image data read from the image memory 23 is subjected to enlargement processing at a magnification specified in the horizontal direction and the vertical direction by the enlargement processing circuit 24, and then displayed on the display unit 25 a of the display device 25. It is displayed as an enlarged image on the top.
[0005]
In general, the access bandwidth of the image memory is determined by the number of dots per line × the operation speed. Therefore, in order not to increase the access bandwidth, it is necessary to limit the number of dots and / or the operation speed. Therefore, the access bandwidth is normally reduced without unnecessarily increasing the number of dots and the operation speed by enlarging the image data not before writing into the memory but after.
[0006]
Further, in the image composition device as described above, a desired portion of the input image can be extracted (clipped) and displayed together on the base screen displayed on the display device 25. The input image is extracted by reading it from the image memory 23 during a specified period by a display controller (not shown).
[0007]
[Problems to be solved by the invention]
Incidentally, when desired image processing is performed on the image data read from the image memory 23 by software using a processing device such as a CPU, the image data stored in the image memory 23 is directly read by the CPU.
[0008]
However, in the above configuration, when the enlarged image is processed by software, the image data read at the display timing of the display device 25 is enlarged by the enlargement processing circuit 24. Therefore, the enlarged image data is captured at the timing of the CPU. I can't. For this reason, the image data directly read from the image memory 23 by the CPU must be subjected to equivalent enlargement processing performed by the enlargement processing circuit 24 by software, and there is a problem that the burden on the CPU increases accordingly.
[0009]
In addition, the algorithm for performing enlargement (or reduction) processing with software is slightly different depending on the enlargement method. If the algorithm is not applied correctly, the same enlarged image data as the enlarged image data obtained by the circuit processing is obtained. Can't get.
[0010]
In addition, when performing clipping processing by software in order to capture a desired portion of the input image, it is necessary to perform software such as address setting for directly reading out the desired portion from the image memory 23 by the CPU. Therefore, in this case, there is also a problem that the burden on the CPU is increased.
[0011]
As a method for capturing image data at the timing of the CPU, it is also conceivable that the image data read from the image memory 23 at the display timing is temporarily stored in another memory and then read out at the timing of the CPU. However, in this case, if the memory has a storage capacity of one screen, the time for writing and reading image data for one screen is shortened, and the speed until it is taken into the CPU is relatively high. Can do. However, there is a disadvantage that the cost of the apparatus increases as the storage capacity of the memory increases.
[0012]
The above-described problem occurs not only in the case of image data, but also in the case where data that is periodically repeated, such as data written to a hard disk, is processed by hardware. Therefore, it is desired that the above-described problems be solved for such data as well as image data.
[0013]
The present invention has been made in view of the above circumstances. In order to reduce the burden on a processing device such as a CPU, data processed by hardware is loaded into the processing device, and the loading speed is low. It is an object of the present invention to provide a data transfer method and apparatus that can be enhanced with the above configuration.
[0014]
[Means for Solving the Problems]
  In order to solve the above problems, a data transfer method and a data transfer apparatus according to the present invention have a storage capacity smaller than one cycle of data by reading data that is repeated continuously and periodically from the memory at the output destination timing. While temporarily writing to the buffer memory, the data is read from the buffer memory at the timing of writing to the buffer memory and asynchronously with the reading timing of the processing device.The data is image data, and the image data is read from the memory at the display timing of the display device as the output destination, while the storage capacity is smaller than one horizontal line of the image data,Write the storage capacity to the buffer memory in one cycleBy skipping over a predetermined number of skip lines,It is characterized in that it is performed a plurality of times in accordance with the speed determined by the timing of reading from the memory.
[0015]
Further, the data processing apparatus of the present invention comprises a memory means for storing data that repeats periodically and repeatedly, a read control means for reading data from the memory means at an output destination timing, and data read from the memory means. A processing means for performing a predetermined process and the data transfer device are provided.
[0016]
In the above method and apparatus, in order to output data to the output destination, the data is read from the memory at the timing of the output destination. On the other hand, the data is written into the buffer memory at the read timing, and then read out asynchronously with the write at the read timing of the processing device. Also, when data is read from the buffer, the data cannot be written to the buffer memory because the data is read from the memory. However, in order to write one cycle of data to the buffer memory by writing multiple times of the storage capacity to the buffer memory in one cycle at a speed determined by the timing of reading from the memory, the same cycle The number of times data is read from the memory is reduced, and the speed of reading one cycle of data from the buffer memory can be increased. In addition, since data is written to the buffer memory having a storage capacity smaller than the data for one cycle, the storage capacity of the buffer memory decreases as the number of times of writing data to the buffer memory during one cycle increases. In the case of using an integrated circuit, the scale of the integrated circuit is reduced, and the cost can be reduced.
[0017]
  Also,In the above method and apparatus, the data is image data, and the image data is read from the memory at the display timing of the display device as the output destination, while the storage capacity is smaller than one horizontal line of the image data.1When outputting the image data for the screen to the display device, the image data written in the buffer memory at the display timing of the display device is read at the timing of the processing device. Therefore, it is not necessary to perform clipping processing by software, and the burden on a processing device such as a CPU can be reduced. In addition, since the storage capacity of the buffer memory is smaller than one horizontal line, for example, if writing is performed in the buffer memory so that several lines are skipped in one frame period in accordance with the display speed, writing can be performed many times. .
[0018]
  In the method and apparatus for transferring the image data, it is preferable that the image data read from the memory is subjected to enlargement or reduction processing and then written to the buffer memory. In this way, since the enlarged image data or the reduced image data is taken in via the buffer memory, the enlarged or reduced image data can be read out at a reading timing of the processing device different from the display timing. Therefore, since it is not necessary to perform enlargement or reduction processing by software, it is possible to further reduce the load on a processing device such as a CPU, and to directly process enlargement or reduction image data obtained by circuit (hardware) processing. Available on the device.The number of skip lines may be set to one more than the number of lines of image data output while the buffer memory captures pixel data for the storage capacity. This makes it possible to reliably fetch the buffer memory and to avoid prolonging the waiting time for fetching.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described with reference to FIGS. 1 to 6 as follows.
[0020]
In this embodiment, a configuration in which a data transfer device is incorporated in a video capture device as an image processing device will be described.
[0021]
As shown in FIG. 2, the video capture device according to the present embodiment includes a video camera 1, a video decoder 2, a FIFO memory (FIFO in the figure) 3, an image memory 4, an enlargement / reduction processing circuit 5, and a buffer circuit 6. It has.
[0022]
As the video camera 1, an industrial video camera that captures images in black and white is used. The video decoder 2 converts an image signal extracted from a video signal (composite video signal) such as an analog NTSC system or PAL system output from the video camera 1 into a digital signal, a horizontal synchronization signal and a vertical synchronization signal from the video signal. Is a device for performing separation and the like.
[0023]
The FIFO memory 3 is a memory that reads input image data output from the video decoder 2 in the order of writing. In order to prioritize the reading of the input image data from the image memory 4, the FIFO memory 3 receives from the video decoder 2 in accordance with the display timing of the display device 8 controlled by a display controller 9 (see FIG. 3) described later. The timing of reading the output input image data to the image memory 4 is controlled.
[0024]
The image memory 4 as a memory (memory means) is a semiconductor memory (video RAM or the like) that stores input image data. The image memory 4 is controlled to write and read so that the input image data read from the FIFO memory 3 is sequentially stored and read according to the display timing of the display device 8.
[0025]
The write address used for writing to the image memory 4 is composed of, for example, the lower 10 bits assigned to each pixel in one line and the upper 9 bits assigned to each line. The lower 10 bits are generated by a counter that counts the dot clock corresponding to each dot in one horizontal line. On the other hand, 8 bits out of the upper 9 bits are generated by a counter that counts the horizontal synchronization signal. The remaining 1 bit is provided to distinguish between the odd field and the even field, and is given based on the vertical synchronizing signal.
[0026]
The dot clock is a clock synchronized with the timing at which each pixel is supplied in the effective display period within one horizontal scanning period, and is supplied from the outside (or generated by a video decoder).
[0027]
A read address used for reading from the image memory 4 is prepared separately in advance. This read address is the lower 10 bits (corresponding to the horizontal position) obtained by counting the dot clock corresponding to each pixel supplied from the display controller 9 by the counter, and an image effective in one horizontal scanning period. It consists of the upper 9 bits (corresponding to the vertical position) obtained by counting with a counter the signal that is active during the period in which data exists. Such a read address is generated by a read address generation circuit 11 described later.
[0028]
The enlargement / reduction processing circuit 5 as enlargement / reduction means enlarges or reduces the input image data read from the image memory 4 at a preset magnification in the horizontal direction and the vertical direction. As an enlargement method, for example, a method of adding data obtained by multiplying adjacent pixel data by an appropriately weighted coefficient using input image data to generate data to be interpolated between adjacent pixel data can be cited. It is done. Further, as a reduction method, for example, a method of generating new pixel data smaller than the original number of pixels by adding a value obtained by multiplying adjacent pixel data by an appropriately weighted coefficient using input image data Is mentioned.
[0029]
In the following description, an example of enlarging an image will be described.
[0030]
When the enlarged image data output from the enlargement / reduction processing circuit 5 matches the position data specified by the CPU 7 and the position data determined by the display timing, the buffer circuit 6 outputs the pixel data at that position. Is temporarily stored and output at a timing requested by the CPU 7. The buffer circuit 6 will be described in more detail later.
[0031]
As shown in FIG. 3, the buffer circuit 6 includes a D flip-flop 61, a FIFO memory (FIFO in the figure) 62, a decoder 63, a write control unit 64, a read control unit 65, and an output interface unit 66.
[0032]
The D flip-flop 61 is a circuit that latches and outputs the enlarged image data from the enlargement / reduction processing circuit 5 input at the display timing. The D flip-flop 61 outputs enlarged image data to the FIFO memory 62 in synchronization with the system clock SYSCLK common to the FIFO memory 62.
[0033]
The FIFO memory 62 serving as a buffer memory (buffer memory means) is a memory that performs a data register-like operation of reading the enlarged image data from the enlargement / reduction processing circuit 5 in the order of writing. The FIFO memory 62 sequentially writes the enlarged image data from the D flip-flop 61 when the high-level write control signal from the write control unit 64 is input to the write control terminal WR, and the first order in the write order. Shift from the 1-word register to the n-th (last) word register. On the other hand, when a high-level write control signal from the read control unit 65 is input to the read control terminal RD, the FIFO memory 62 sequentially reads the stored enlarged image data from the nth word register. Further, the FIFO memory 62 has a storage capacity of image data smaller than that of one horizontal line of input image data that has not been enlarged or reduced (one standard horizontal line in a general video signal such as the NTSC system or the PAL system). Have. Therefore, the FIFO memory 62 performs writing and reading a plurality of times in order to output enlarged image data for one horizontal line.
[0034]
The FIFO memory 62 outputs a high level signal (output permission signal) from the full terminal FULL when the image data is written up to the register of the nth word (when the image data is written to all the registers). When data is not written in the n-th word register, a low level signal (output inhibition signal) is output from the full terminal FULL. The FIFO memory 62 outputs a high-level signal (input permission signal) from the empty terminal EMPTY when the image data is not written to all the registers, while the image data is written to all the registers. A low level signal (input inhibition signal) is output from the empty terminal EMPTY.
[0035]
The output permission signal is input to the interrupt terminal INTR of the CPU 7 as an interrupt request signal.
[0036]
The decoder 63 is a circuit that generates the following various control signals based on the address output from the address terminal ADD of the CPU 7 and the various control signals output from the control terminal CNT (actually the output terminal differs for each signal). is there. These control signals are respectively a low active vertical position set signal SETTVPOSCS.*, Horizontal position set signal SETHPOSCS*Read selection signal RDDATACS*And read status signal RDSTATCS*It is.
[0037]
Vertical position set signal SETTVPOSCS*Is a signal for giving a vertical position (line position) of data to be read, and a horizontal position set signal SETHPOSCS.*Is a signal that gives the position (pixel position) of the read data in the horizontal direction. Further, the read selection signal RDDATACS*Is a control signal serving as a basis for giving the timing of reading from the FIFO memory 62, and a read generated by the CPU 7 when the full state (output inhibition signal) of the FIFO memory 62 is notified to the CPU 7 as an interrupt request signal. Based on a strobe signal (a kind of control signal). Further, the read status signal RDSTATCS*Is based on a status signal (a type of control signal) output from the CPU 7 when the enlarged image data can be read by an application program (image processing program or the like).
[0038]
Vertical position set signal SETTVPOSCS*And horizontal position set signal SETHPOSCS*In order to obtain data, not only an address but also a control signal is used in combination. This is because the address is generated based on the dot clock and the horizontal synchronization signal as described above, so that it corresponds to the position of the pixel (display dot) and a stable period (transient such as when the address signal rises). This is because a control signal such as the above read strobe signal is necessary so that the address can be used in a period excluding a typical unstable period.
[0039]
The write control unit 64 includes inverters 64a and 64b, a vertical position register (VPR in the figure) 64c, a horizontal position register (HPR in the figure) 64d, a coincidence detection comparator (CMP in the figure) 64e and 64f, and an AND gate 64g. And a JK flip-flop 64h.
[0040]
The vertical position register 64c is a circuit for latching the vertical position data of the image data (pixel data) to be read output from the CPU 7, and the above-described vertical position set signal SETTVPOSCS inverted by the inverter 64a.*The vertical position data is set in synchronization with (input clock). On the other hand, the horizontal position register 64d is a circuit for latching the horizontal position data of the image data to be read out, and the horizontal position set signal SETHPOSCS inverted by the inverter 64b.*The horizontal position data is set in synchronization with (input clock).
[0041]
The coincidence detection comparator 64e as the coincidence detection means compares the vertical position data VPOS of the enlarged image data output from the display controller 9 and displayed on the display device 8 with the vertical position data from the CPU 7, and both are compared. When they match, a high level match detection signal is output. On the other hand, the coincidence detection comparator 64g serving as a coincidence detecting unit compares the horizontal position data HPOS of the enlarged image data output from the display controller 9 and displayed on the display device 8 with the horizontal position data from the CPU 7, When the two coincide, a high level coincidence detection signal is output.
[0042]
The AND gate 64g outputs a logical product of both coincidence detection signals from the coincidence detection comparators 64f and 64g. The JK flip-flop 64h sets the output of the output terminal Q in synchronization with the system clock SYSCLK (high level) by the high level output of the AND gate 64g input to the input terminal J, and the full terminal FULL of the FIFO memory 62 The output of the output terminal Q is reset in synchronization with the system clock SYSCLK by the high level output (low level). The output of the output terminal Q obtained in this way is given to the write control terminal WR of the FIFO memory 62 as a write control signal.
[0043]
The read control unit 65 includes an inverter 65a, D flip-flops 65b and 65c, and an AND gate 65d.
[0044]
The inverter 65a receives the above-described read selection signal RDDATACS.*Invert. The D flip-flop 65b has an input terminal D1The output of the inverter 65a input to the output terminal Q is synchronized with the rising edge of the system clock SYSCLK.1Output from. The D flip-flop 65c has the output terminal Q described above.1Similarly, the output from the output terminal Q is synchronized with the rising edge of the system clock SYSCLK.2Output from. As a result, the output terminal Q2Output is output terminal Q1The output is shifted by one clock. The AND gate 65d has its output terminal Q2And the inverting output terminal / Q in the D flip-flop 65b.1The read selection signal RDDATACS is obtained by ANDing the output of*A pulse of 1 clock width rising at the falling edge of is output. This pulse is applied to the read control terminal RD of the FIFO memory 62 as a read control signal.
[0045]
The output interface unit 66 includes buffers 66a to 66c. The buffer 66a receives the above-described read selection signal RDDATACS.*The enlarged image data output from the output terminal OUT of the FIFO memory 62 is output to the data terminal DATA of the CPU 7 by (low level). The buffers 66b and 66c store the read status signal RDSTATCS described above.*(Low level), the signal from the empty terminal EMPTY of the FIFO memory 62 and the signal from the full terminal FULL are input to the data terminal DATA of the CPU 7 together with the enlarged image data.
[0046]
Next, an operation of capturing the enlarged image data into the CPU 7 in the video capture device configured as described above will be described.
[0047]
First, an image captured by the video camera 1 is output to the video decoder 2 as a video signal. In the video decoder 2, an image signal is extracted from the video signal and digitized. The input image data is sequentially written in the FIFO memory 3 in accordance with the output timing from the video decoder 2 and sequentially read out in accordance with the write timing in the image memory 4. By writing and reading the input image data by the FIFO memory 3, the reading of the input image data from the image memory 4 is performed with priority over the writing of the input image data from the FIFO memory 3. Therefore, in the buffer 10 provided in the next stage of the FIFO memory 3, the period during which the input image data can be output to the image memory 4 is limited to the period during which the enable signal input to the enable terminal of the buffer 10 is at a low level. The
[0048]
The input image data is written into the image memory 4 by inputting the above-described write address to the address terminal ADD of the image memory 4 via the multiplexer (MPX in the figure) 12. Reading of the image data from the image memory 4 is performed by inputting the aforementioned read address output from the read address generation circuit 11 as read control means to the address terminal ADD of the image memory 4 via the multiplexer (MPX in the figure) 12. Is done.
[0049]
The image data read from the image memory 4 is input to the enlargement / reduction processing circuit 5. In the enlargement / reduction processing circuit 5, the image data is enlarged at a predetermined magnification in the vertical direction and the vertical direction. The enlarged image data obtained as a result is sent to the display device 8. In the display device 8, the enlarged image data is enlarged from the original image (the left image in the display unit 8a) in a window provided in a predetermined area on the image displayed on the entire surface of the display unit 8a. Displayed as an enlarged image. The enlarged image is displayed as an image in which a predetermined area in the original image is clipped at a display timing controlled by the display controller 9 as necessary.
[0050]
The enlarged image data is also input to the buffer circuit 6. In the buffer circuit 6, data about the position (vertical position and horizontal position) of pixel data of a necessary portion in the enlarged image data is preset by the CPU 7 by the image processing program and is output from the data terminal DATA. Among the position data, the vertical position data is the vertical position set signal SETTVPOSCS.*The horizontal position data is set in the vertical position register 64c in synchronization with the horizontal position set signal SETHPOSCS.*In synchronization with the horizontal position register 64d.
[0051]
On the other hand, the display controller 9 outputs vertical position data VPOS and horizontal position data HPOS. The coincidence detection comparator 64e compares the vertical position data VPOS and the vertical position data output from the vertical position register 64c, and outputs a high level coincidence detection signal when the two coincide. The coincidence detection comparator 64f compares the horizontal position data HPOS with the horizontal position data output from the horizontal position register 64d, and outputs a high level coincidence detection signal when the two coincide.
[0052]
Thus, when a high level signal is input from the AND gate 64g to the JK flip-flop 64h, the JK flip-flop 64h is set, and a high level write control signal is applied to the write control terminal WR of the FIFO memory 62. . In the FIFO memory 62, the pixel data at the above-mentioned position, which is latched in the D flip-flop 61, is written into the FIFO memory 62 at the timing of the system clock SYSCLK while the write control signal is input.
[0053]
In this way, every time the vertical position and the horizontal position specified by the display controller 9 and the CPU 7 match, pixel data is written to the FIFO memory 62 one by one and shifted to the output side. At this time, the new vertical position data and horizontal position data are used as the vertical position set signal SETTVPOSCS.*And horizontal position set signal SETHPOSCS*Is set whenever it is output from the decoder 63.
[0054]
When the pixel data reaches the last register in the FIFO memory 62, the pixel data is written in all the registers, so that a high-level output permission signal is output from the full terminal FULL. At this time, since the JK flip-flop 64h is reset, the state of the write control terminal WR of the FIFO memory 62 changes to the low level, and the writing of the pixel data is stopped.
[0055]
On the other hand, when the CPU 7 receives the output permission signal as an interrupt request signal, it outputs a read strobe signal. Based on the read strobe signal, the decoder 63 reads the low level read selection signal RDDATACS.*Is output from the read control unit 65 and applied to the read control terminal RD of the FIFO memory 62. As a result, the pixel data stored in the FIFO memory 62 is output one by one through the buffer 66a at the timing of the system clock SYSCLK during the period in which the readout control signal is input, and input to the data terminal DATA of the CPU 7 Is done.
[0056]
When the pixel data is sequentially read out in this manner, all the registers in the FIFO memory 62 will eventually become empty. At this time, when a high-level input permission signal is input from the empty terminal EMPTY to the CPU 7 via the buffer 66b, the vertical position set signal SETTVPOSCS is output from the decoder 63 based on the address output from the CPU 7 and the like.*And horizontal position set signal SETHPOSCS*Is output. As a result, when the vertical position data and the horizontal position data are respectively set in both position registers 64c and 64d, the vertical position data VPOS and the horizontal position data HPOS are compared with each other as described above. Sometimes pixel data is written into the FIFO memory 62.
[0057]
Then, pixel data for one horizontal line is read by repeating such writing until the pixel data is full and reading until the pixel data is full. The read pixel data is collected in the main memory 13 as enlarged image data for one screen and subjected to predetermined image processing by an image processing program.
[0058]
The processing from taking the image data into the FIFO memory 62 and moving to the main memory 13 as described above is executed by a predetermined image transfer program. The processing procedure will be described below with reference to the flowchart of FIG. In the following example, image data of VGA (480 lines × 680 pixels) is handled.
[0059]
First, the current line number CURLN representing the current line number is set to 0, the buffer size BSZ (storage capacity of the FIFO memory 62) is set to 63 pixels (S1), and the current horizontal position CURHPOS representing the current horizontal position is set. Is set to 0 (S2).
[0060]
Next, based on the current line number CURLN (vertical position data VPOS) and the current horizontal position CURHPOS (horizontal position data HPOS), the pixel data is fetched into the FIFO memory 62 one by one until the buffer size BSZ is filled as described above. The operation of the FIFO memory 62 is controlled (S3). The pixel data corresponding to the buffer size BSZ stored in the FIFO memory 62 is read out by the CPU 7, and the pixel data corresponding to the current line number CURLN and the current horizontal position CURHPOS in the image storage area in the main memory 13 are sequentially written (S4). .
[0061]
Further, the current horizontal position CURHPOS is updated by adding the number of pixels corresponding to the buffer size BSZ (S5), and it is determined whether or not the current horizontal position CURHPOS is less than 640 (S6). If the current horizontal position CURHPOS is less than 640, the process returns to S3, while the processes of S3 to S6 are repeated until the current horizontal position CURHPOS reaches 640.
[0062]
When the current horizontal position CURHPOS reaches 640, the current line number CURLN is updated by adding 1 (S7), and it is determined whether or not the current line number CURLN is less than 480 (S8). If the current line number CURLN is less than 480, the process returns to S2, and the processes of S2 to S8 are repeated until the current line number CURLN reaches 480, thereby completing the process.
[0063]
As described above, in the video capture device according to the present embodiment, not only the enlarged image data from the enlargement / reduction processing circuit 5 is sent to the display device 8, but also temporarily written into the FIFO memory 62 in the buffer circuit 6, Reading is performed at the timing of the CPU 7. By taking the enlarged image data into the CPU 7 in this way, it is not necessary to perform enlargement processing by software (image processing program). Therefore, not only can the burden on the CPU 7 be reduced, but it is not necessary to accurately apply the enlargement processing algorithm in the image processing program in order to obtain the same enlarged image as the enlarged image obtained by the enlargement / reduction processing circuit 5. This avoids complications in program creation. This is the same even when the input image is reduced.
[0064]
In this video capture device, the vertical position data and the horizontal position data set on the CPU 7 side are respectively compared with the vertical position data and the horizontal position data set on the display controller 9 and when both coincide with each other. The image data (pixel data) at that position is written in the FIFO memory 62. As a result, clipping is performed to extract a predetermined area set by the image processing program from the enlarged image, so that the processing need not be performed by the image processing program, and the burden on the CPU 7 is reduced accordingly.
[0065]
Further, since the storage capacity of the FIFO memory 62 is smaller than the input image data for one horizontal line, it is necessary to repeat writing and reading a plurality of times as described above in order to output enlarged image data for one horizontal line. However, the manufacturing cost of the buffer circuit 6 can be reduced and the mounting area can be reduced. Thereby, when the buffer circuit 6 is configured by an integrated circuit such as an ASIC (Application-Specific Integrated Circuit), the size of the buffer circuit 6 can be easily reduced. As a result, the cost of the buffer circuit 6 and the video capture device can be reduced.
[0066]
When the enlargement / reduction processing circuit 5 performs the reduction process on the input image data, the input image data is compressed. Depending on the reduction ratio, the reduced image data for one horizontal line can be written and read out once. The data can be output from the FIFO memory 62.
[0067]
By the way, since the capture of the image data into the FIFO memory 62 is performed at the display timing, when the buffer size BSZ is set to be considerably small with respect to one horizontal line as described above, it is possible to retrieve from the image memory 4 as follows. This is pixel data corresponding to the buffer size BSZ in one frame time (about 16 msec). Therefore, it takes a long time to extract pixel data for one screen.
[0068]
For example, when the buffer size BSZ is 63 pixels, 63 pixels are extracted during 16 msec. Therefore, to extract 480 × 680 pixels, about 84.5 seconds are required by the following calculation. In addition, when 680 pixels per line are captured in the buffer size BSZ, 11 captures are required.
[0069]
11 x 480 x 16 x 10-3≒ 84.5
On the other hand, when image data is extracted directly from the image memory 4 by the CPU 7, image data for one screen can be extracted in about 10 msec. Accordingly, the extraction time when the buffer size BSZ is 63 pixels requires 8450 times as long as the direct extraction time by the CPU 7.
[0070]
As described above, if it takes a long time to take out the image data, it takes a long time to output the image data for one screen when it is stored in the main memory 13 and printed out to the printer 14 (see FIG. 1). In order to eliminate such inconvenience, the buffer size BSZ may be increased in order to shorten the extraction time. However, as the buffer size BSZ increases, the cost of the buffer circuit 6 increases.
[0071]
Therefore, in the present embodiment, the above-described image transfer program is improved in order to retrieve image data from the image memory 4 at a high speed without increasing the buffer size BSZ and without changing the configuration of the buffer circuit 6. ing. The configuration including the image transfer program will be described below.
[0072]
As shown in FIG. 1, the image transfer program 15 includes a memory transfer unit 15a, a current line number setting unit 15b, a current horizontal position setting unit 15c, and an inline number setting unit 15d.
[0073]
The memory transfer unit 15 a controls the movement of image data from the FIFO memory 62 to the main memory 13. Specifically, the image data read by the CPU 7 from the FIFO memory 62 is written in a position corresponding to the current line number CURLN and the current horizontal position CURHPOS in the image storage area in the main memory 13.
[0074]
The current line number setting unit 15a newly sets (updates) the above-described current line number CURLN when the writing of pixel data for the buffer size BSZ to the main memory 13 by the memory transfer unit 15a is completed. The current line number CURLN is updated by adding a skip line number sk described later to the current line number CURLN.
[0075]
The current horizontal position setting unit 15c newly sets (updates) the above-described current horizontal position CURHPOS within one horizontal line after the writing of pixel data for the buffer size BSZ to the main memory 13 by the memory transfer unit 15a is completed. . The current horizontal position CURHPOS is updated by adding the number of pixels of the buffer size BSZ to the current horizontal position CURHPOS.
[0076]
The inline number setting unit 15d represents an inline number InLN that represents an inline number in each section determined by an interval of the number of skip lines sk so that the FIFO memory 62 captures image data by skipping the predetermined number of skip lines sk in one frame period. Is newly set (updated) after the writing of the image data to the main memory 13 in one frame period is completed. The inline number InLN is updated by adding “1” to the inline number InLN.
[0077]
The skip line number sk is determined by the display speed determined by the display timing and the speed at which the image data is read from the FIFO memory 62 by the CPU 7 based on the image transfer program 15. The number of skip lines sk is set to one more than the number of lines of image data output while the FIFO memory 62 takes in pixel data of the buffer size BSZ. As a result, it is possible to reliably fetch the FIFO memory 62 and to avoid prolonging the waiting time for fetching.
[0078]
FIG. 5 shows the arrangement of image data for one screen in the image memory 4. Specifically, for example, when the number of skip lines sk is set, the section from the line number “0” to the line number “3”, the section from the line number “4” to the line number “7”, the line number “8”. The lines in the section from the line number “11” to the line number “11” and the section from the line number “12” to the line number “15” are inline. In one frame period, pixel data corresponding to the buffer size BSZ of (1), (2), (3), (4),..., (J) is read from the image memory 4 to the FIFO 62.
[0079]
The pixel data groups (buffer size BSZ) of different line numbers read out during the same one frame period are at the same position in the horizontal direction in the illustrated example, but the positions do not necessarily match in the horizontal direction. However, the illustrated arrangement is preferable because of ease of position calculation and the like.
[0080]
The processing procedure of the image transfer program 15 will be described with reference to the flowchart of FIG. The following example is also a case of handling VGA (480 lines × 680 pixels) image data as in the case shown in the flowchart of FIG.
[0081]
First, the inline number InLN is set to 0, the skip line number sk is set to 4, and the buffer size BSZ is set to 63 pixels (S11). Further, the current horizontal position CURHPOS representing the current horizontal position is set to 0 (S12), and the current line number CURLN is set to the inline number InLN (S13).
[0082]
Next, based on the current line number CURLN (vertical position data VPOS) and the current horizontal position CURHPOS (horizontal position data HPOS), the pixel data is fetched into the FIFO memory 62 one by one until the buffer size BSZ is filled as described above. The operation of the FIFO memory 62 is controlled (S14). The pixel data corresponding to the buffer size BSZ stored in the FIFO memory 62 is read by the CPU 7 and the pixel data corresponding to the current line number CURLN and the current horizontal position CURHPOS in the image storage area in the main memory 13 are sequentially written (S15). .
[0083]
Further, the current line number CURLN is updated by adding the skip line number sk (S16), and it is determined whether or not the current line number CURLN is less than 480 (S17). If the current line number CURLN is less than 480, the process returns to S14. When the current line number CURLN reaches 480, the current horizontal position CURHPOS is updated by adding the number of pixels corresponding to the buffer size BSZ (S18). ).
[0084]
Then, it is determined whether or not the current horizontal position CURHPOS is less than 640 (S19). If the current horizontal position CURHPOS is less than 640, the process returns to S13 and the current horizontal position CURHPOS reaches 640. The processes from S13 to S19 are repeated. When the current horizontal position CURHPOS reaches 640, 1 is added to update the inline number InLN (S20).
[0085]
Finally, it is determined whether or not the inline number InLN has reached the skip line number sk (S21). If not, the process returns to S12 and S12 to S21 until the inline number InLN reaches the skip line number sk. Repeat the process. On the other hand, when the inline number InLN has reached the skip line number sk, the processing is finished as it is.
[0086]
In this way, the image transfer program 15 writes the image data taken out from the image memory 4 at the display timing and subjected to the enlargement / reduction process to the FIFO memory 62 by skipping the number of skip lines. Yes. Thus, after the pixel data for the buffer size BSZ is stored in the FIFO memory 62, the image data is read from the image memory 4 while the pixel data is read. Therefore, the writing can be performed a plurality of times in accordance with the display timing in one frame period. Therefore, compared with the image transfer program that executes the processing procedure of FIG. 4, the number of times that image data is written to the FIFO memory 62 during one frame period can be greatly increased.
[0087]
For example, when image data of 480 lines × 680 pixels is transferred and the number of skip lines is 4, and the buffer size BSZ is 63 pixels, (j) in FIG. 5 becomes 120 (= 480/4), and the image Extraction of image data from the memory 4 to the FIFO memory 62 can be performed 120 times in one frame period. Thereby, pixel data for one screen can be taken out in 704 msec in the next calculation.
[0088]
11 × (480/120) × 16 = 704
As a result, the image data can be taken into the FIFO memory 62 120 times faster than the example (about 84.5 sec) in the image transfer program for executing the processing procedure of FIG. This speed is increased to about 70 times the speed (10 msec) when the image data is directly read from the image memory 4 by the CPU 7.
[0089]
Therefore, the image data from the enlargement / reduction processing circuit 5 can be taken into the CPU 7 at high speed without changing the configuration of the buffer circuit 6 shown in FIG. 1, that is, without increasing the buffer size BSZ. As a result, the speed when the image data is printed out by the printer 14 can be increased.
[0090]
In the present embodiment, an example in which image data is transferred has been described. However, the present invention is not limited to image data, but may be any data that is continuous so as to repeat periodically. For example, such data includes write data to a hard disk.
[0091]
【The invention's effect】
  As described above, according to the data transfer method and apparatus of the present invention, continuous data is read periodically from the memory at the timing of the output destination, and temporarily stored in the buffer memory having a storage capacity smaller than the data for one cycle. On the other hand, the data is read from the buffer memory at the timing of writing to the buffer memory and the reading timing of the processing device asynchronously.The data is image data, and the image data is read from the memory at the display timing of the display device as the output destination, while the storage capacity is smaller than one horizontal line of the image data,Write the storage capacity to the buffer memory in one cycleBy skipping over a predetermined number of skip lines,This is a configuration that is performed a plurality of times according to the speed determined by the timing of reading from the memory.
[0092]
Further, the data processing apparatus of the present invention comprises a memory means for storing data that repeats periodically and repeatedly, a read control means for reading data from the memory means at an output destination timing, and data read from the memory means. It is the structure provided with the processing means which performs a predetermined process, and the said data transfer apparatus.
[0093]
Thus, after the data read from the memory at the output destination timing is written to the buffer memory, it is read asynchronously with the writing at the reading timing of the processing device. Since the data is read, the data cannot be written to the buffer memory. However, since one cycle of data is written to the buffer memory a plurality of times in one cycle as described above, one cycle of data is written to the buffer memory. In addition, the number of times of reading the same period of data from the memory is reduced, and the speed of reading the period of data from the buffer memory can be increased. In addition, since data is written to the buffer memory having a storage capacity smaller than the data for one cycle, the storage capacity of the buffer memory decreases as the number of times of writing data to the buffer memory during one cycle increases. In the case of an integrated circuit, the scale of the integrated circuit is reduced. Therefore, the configuration that suppresses the increase in the cost of hardware has an effect that data can be taken into a processing device such as a CPU at a high speed through a path different from the output destination.
[0094]
  Also,In the above method and apparatus, the data is image data, and the image data is read from the memory at the display timing of the display device as the output destination, while the storage capacity is smaller than one horizontal line of the image data. Therefore, when outputting image data for one screen to the display device, the image data written in the buffer memory at the display timing of the display device is read at the timing of the processing device. Therefore, it is not necessary to perform clipping processing by software, and the burden on a processing device such as a CPU can be reduced. In addition, since the storage capacity of the buffer memory is smaller than one horizontal line, for example, if writing is performed in the buffer memory so that several lines are skipped in one frame period in accordance with the display speed, writing can be performed many times. . There is an effect that the image data can be transferred to the processing device at high speed.
[0095]
  In the method and apparatus for transferring the image data, it is preferable that the image data read from the memory is subjected to enlargement or reduction processing and then written to the buffer memory. In this way, since the enlarged image data or the reduced image data is taken in via the buffer memory, the enlarged or reduced image data can be read out at a reading timing of the processing device different from the display timing. Therefore, since it is not necessary to perform enlargement or reduction processing by software, it is possible to further reduce the load on a processing device such as a CPU, and to directly process enlargement or reduction image data obtained by circuit (hardware) processing. Available on the device. Therefore, it is possible to perform image processing with higher processing capability, and it is possible to avoid complication of software creation because it is not necessary to optimize the enlargement or reduction algorithm.In addition, if the number of skip lines is set to one more than the number of lines of image data output while the buffer memory captures pixel data corresponding to the storage capacity, it is ensured that the buffer memory is captured. In addition, there is an effect that it is possible to avoid prolonging the waiting time for capturing.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a video capture device including an improved transfer program according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a basic configuration of the video capture device.
FIG. 3 is a block diagram showing a detailed configuration centering on a buffer circuit of the video capture device;
FIG. 4 is a flowchart showing a procedure of image transfer by the buffer circuit.
FIG. 5 is an explanatory diagram showing the concept of high-speed image transfer realized by an image transfer program for performing an image by the buffer circuit, using pixels developed in an image memory.
FIG. 6 is a flowchart showing a procedure of improved image transfer by the buffer circuit.
FIG. 7 is a block diagram showing a schematic configuration of a conventional video capture device.
[Explanation of symbols]
4 Image memory (memory, memory means)
5 Enlargement / reduction processing circuit (processing means, enlargement / reduction means)
8 Display device (output destination)
6 Buffer circuit (data transfer device)
7 CPU (Processor)
9 Display controller
11 Read address generation circuit (read control means)
15b Current line number setting unit (writing control means)
62 FIFO memory (buffer memory, buffer memory means)

Claims (9)

周期的に繰り返して連続するデータを出力先のタイミングでメモリから読み出して1周期分のデータより小さい記憶容量を有するバッファメモリに一時的に書き込む一方、バッファメモリへの書き込みのタイミングと非同期な処理装置の読出タイミングで上記データを上記バッファメモリから読み出すデータ転送方法であって、
上記データが画像データであり、上記出力先としての表示装置の表示タイミングで上記メモリから画像データを読み出す一方、
上記記憶容量が画像データの1水平ライン分よりも小さく、
さらに、1周期の間に上記バッファメモリへの上記記憶容量分の書き込みを、予め定められたスキップライン数のラインを飛び越して行うことによって、上記メモリから読み出されるタイミングで定まる速度に合わせて複数回行うことを特徴とするデータ転送方法。
A processing device that reads cyclically repeated data from the memory at the timing of the output destination and temporarily writes it in a buffer memory having a storage capacity smaller than the data for one cycle, while asynchronous with the timing of writing to the buffer memory A data transfer method for reading the data from the buffer memory at a read timing of
While the data is image data and the image data is read from the memory at the display timing of the display device as the output destination,
The storage capacity is smaller than one horizontal line of image data,
Further, by writing over the storage capacity to the buffer memory in one cycle by skipping a predetermined number of skip lines, the buffer memory is written a plurality of times in accordance with the speed determined by the timing of reading from the memory. A data transfer method characterized in that:
上記メモリから読み出され、上記バッファメモリに書き込まれる前の画像データに拡大または縮小処理が施されていることを特徴とする請求項1に記載のデータ転送方法。2. The data transfer method according to claim 1, wherein the image data before being read from the memory and written to the buffer memory is subjected to enlargement or reduction processing. 上記スキップライン数は、上記バッファメモリが記憶容量分の画素データを取り込む間に出力される画像データのライン数よりも1つ多いライン数に設定されていることを特徴とする請求項1または2記載のデータ転送方法。3. The number of skip lines is set to be one more than the number of lines of image data output while the buffer memory captures pixel data for a storage capacity. The data transfer method described. 周期的に繰り返して連続するデータを出力先のタイミングでメモリから読み出して1周期分のデータより小さい記憶容量を有するバッファメモリに一時的に書き込む一方、バッファメモリへの書き込みのタイミングと非同期な処理装置の読出タイミングで上記データを上記バッファメモリから読み出すデータ転送装置であって、
上記データが画像データであり、上記出力先としての表示装置の表示タイミングで上記メモリから画像データを読み出す一方、
上記記憶容量が画像データの1水平ライン分よりも小さく、
さらに、1周期の間に上記バッファメモリへの上記記憶容量分の書き込みを、予め定められたスキップライン数のラインを飛び越して行うことによって、上記メモリから読み出されるタイミングで定まる速度に合わせて複数回行わせる書込制御手段を備えていることを特徴とするデータ転送装置。
A processing device that reads cyclically repeated data from the memory at the timing of the output destination and temporarily writes it in a buffer memory having a storage capacity smaller than the data for one cycle, while asynchronous with the timing of writing to the buffer memory A data transfer device for reading the data from the buffer memory at a read timing of
While the data is image data and the image data is read from the memory at the display timing of the display device as the output destination,
The storage capacity is smaller than one horizontal line of image data,
Further, by writing over the storage capacity to the buffer memory in one cycle by skipping a predetermined number of skip lines, the buffer memory is written a plurality of times in accordance with the speed determined by the timing of reading from the memory. A data transfer apparatus comprising write control means for performing.
上記メモリから読み出され、上記バッファメモリに書き込まれる前の画像データに拡大または縮小処理が施されていることを特徴とする請求項4に記載のデータ転送装置。5. The data transfer device according to claim 4, wherein the image data before being read from the memory and written to the buffer memory is subjected to enlargement or reduction processing. 上記スキップライン数は、上記バッファメモリが記憶容量分の画素データを取り込む間に出力される画像データのライン数よりも1つ多いライン数に設定されていることを特徴とする請求項4または5記載のデータ転送装置。6. The number of skip lines is set to be one more than the number of lines of image data output while the buffer memory captures pixel data for a storage capacity. The data transfer device described. 周期的に繰り返して連続するデータを格納するメモリ手段と、
上記メモリ手段から出力先のタイミングで読み出す読出制御手段と、
上記メモリ手段から読み出されたデータに所定の処理を施す処理手段とを備え、
上記データが画像データであり、上記出力先としての表示装置の表示タイミングで上記メモリから画像データを読み出す一方、
さらに、記憶容量が画像データの1水平ライン分よりも小さく、上記メモリ手段から読み出されたデータを一時的に書き込むバッファメモリと、1周期の間にバッファメモリへの上記記憶容量分の書き込みを、予め定められたスキップライン数のラインを飛び越して行うことによって、上記メモリから読み出されるタイミングで定まる速度に合わせて複数回行わせる書込制御手段と、上記バッファメモリへの書き込みのタイミングと非同期な処理装置の読出タイミングで上記データを上記バッファメモリから読み出す非同期読出手段とを有するデータ転送装置とを備えていることを特徴とするデータ処理装置。
Memory means for storing periodically repeated data; and
Read control means for reading from the memory means at the timing of the output destination;
Processing means for performing predetermined processing on the data read from the memory means ,
While the data is image data and the image data is read from the memory at the display timing of the display device as the output destination,
Further, the storage capacity is smaller than one horizontal line of image data, and temporarily write Muba Ffamemori the data read out from said memory means, said storage capacity of the buffer memory during one cycle Write control means for performing writing a plurality of times according to the speed determined by the timing of reading from the memory by skipping a predetermined number of skip lines, and the timing of writing to the buffer memory A data processing apparatus comprising: a data transfer device having asynchronous reading means for reading the data from the buffer memory at a read timing of the asynchronous processing device.
上記処理手段が、画像データに拡大または縮小処理を施す拡大/縮小手段であることを特徴とする請求項7に記載のデータ処理装置。8. The data processing apparatus according to claim 7, wherein the processing means is enlargement / reduction means for performing enlargement / reduction processing on image data. 上記スキップライン数は、上記バッファメモリが記憶容量分の画素データを取り込む間に出力される画像データのライン数よりも1つ多いライン数に設定されていることを特徴とする請求項7または8記載のデータ処理装置。9. The skip line number is set to a line number that is one more than the line number of image data output while the buffer memory captures pixel data for a storage capacity. The data processing apparatus described.
JP2000232176A 2000-07-31 2000-07-31 Data transfer method and apparatus, and data processing apparatus using the apparatus Expired - Lifetime JP3643020B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000232176A JP3643020B2 (en) 2000-07-31 2000-07-31 Data transfer method and apparatus, and data processing apparatus using the apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000232176A JP3643020B2 (en) 2000-07-31 2000-07-31 Data transfer method and apparatus, and data processing apparatus using the apparatus

Publications (2)

Publication Number Publication Date
JP2002041450A JP2002041450A (en) 2002-02-08
JP3643020B2 true JP3643020B2 (en) 2005-04-27

Family

ID=18724900

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000232176A Expired - Lifetime JP3643020B2 (en) 2000-07-31 2000-07-31 Data transfer method and apparatus, and data processing apparatus using the apparatus

Country Status (1)

Country Link
JP (1) JP3643020B2 (en)

Also Published As

Publication number Publication date
JP2002041450A (en) 2002-02-08

Similar Documents

Publication Publication Date Title
US7589745B2 (en) Image signal processing circuit and image display apparatus
JP2790007B2 (en) Image memory access control method
JP2006203437A (en) Camera and its image processing method
US7103702B2 (en) Memory device
JP3378710B2 (en) Reduced image writing / reading method and reduced image processing circuit
JP3643020B2 (en) Data transfer method and apparatus, and data processing apparatus using the apparatus
JP2000083211A (en) Method and device for storing and extracting digital image data
JP2000311241A (en) Image processor
JP3792470B2 (en) Image transfer method and apparatus, and image processing apparatus
JP2001111968A (en) Frame rate converter
JP3986325B2 (en) Image processing apparatus, image processing method, and image processing system
JP2002199281A (en) Image processing apparatus
JP4293503B2 (en) Image processing device
JP2006121343A (en) Image processor
US6775421B2 (en) Method and apparatus of image processing while inputting image data
JP2007221538A (en) Device and method for scene change determination data transfer device, and data transfer method
JP4802482B2 (en) Image processing apparatus and image processing method
JP2017220180A (en) Image processing system, image processing device, and image processing method
JP2719327B2 (en) Buffering device for image processing device
JP3145477B2 (en) Sub screen display circuit
JP3784599B2 (en) Image reduction / enlargement device
JP2520492B2 (en) Video memory data storage control system
JP2005020521A (en) Imaging apparatus and cellular phone equipped with the same imaging apparatus
JPH0962236A (en) Pixel data processing method and high speed drawing device using same
JPH09128475A (en) Information reader

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041012

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041019

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041217

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050126

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3643020

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080204

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090204

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110204

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20120204

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20120204

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130204

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20140204

Year of fee payment: 9

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term