JP2014170476A - Data processor and method for controlling the same - Google Patents
Data processor and method for controlling the same Download PDFInfo
- Publication number
- JP2014170476A JP2014170476A JP2013043093A JP2013043093A JP2014170476A JP 2014170476 A JP2014170476 A JP 2014170476A JP 2013043093 A JP2013043093 A JP 2013043093A JP 2013043093 A JP2013043093 A JP 2013043093A JP 2014170476 A JP2014170476 A JP 2014170476A
- Authority
- JP
- Japan
- Prior art keywords
- data
- storage medium
- mode
- card
- stored
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、データ処理装置およびその制御方法に関し、特に、複数の記憶媒体を用いる処理に関するものである。 The present invention relates to a data processing apparatus and a control method therefor, and particularly relates to processing using a plurality of storage media.
従来のデジタルカメラやビデオカメラ等の撮像装置において、例えば撮像データはカメラ内部のメモリ(以下、内部メモリという)に一旦蓄積されてから、着脱可能な記録媒体(以下、外部メモリという)へ出力される。特許文献1では外部メモリの挿入を検知すると、それが使用可能であるか否かを判定し、その後の撮影動作に反映させる処理が開示されている。外部メモリの使用可否判定によって書き込み不可と判断された場合、撮像動作が禁止される。 In conventional imaging devices such as digital cameras and video cameras, for example, imaging data is temporarily stored in a memory (hereinafter referred to as internal memory) inside the camera and then output to a removable recording medium (hereinafter referred to as external memory). The Japanese Patent Application Laid-Open No. 2004-228561 discloses a process of detecting whether or not an external memory is inserted and determining whether or not the external memory can be used and reflecting it in a subsequent photographing operation. When it is determined that writing is not possible by determining whether the external memory can be used, the imaging operation is prohibited.
カメラの動作開始時において、挿入された記録媒体の状態のチェックは行われるが、記録媒体のデータ転送速度を厳密に定義することは困難である。このため、内部メモリにデータを蓄積してから外部メモリへ転送される。一般的に、外部メモリは内部メモリに比べて低速な場合が多く、両者の速度差を吸収するために、内部メモリを介して外部メモリへのデータ転送が行われる。仮に、外部メモリが十分なデータ転送速度を有する場合でも、エラー発生時にはデータの再送が必要となる。例えば、SDカード(商標)では最低保証速度に関してClass10にて10メガバイト/秒とされるが、カメラ本体と外部メモリとの間の伝送路に起因するCRC(転送時の誤り検出方式)のエラーが発生し得る。このような場合にはデータ転送速度を保証することが難しいため、外部メモリへ出力するデータは内部メモリに一旦蓄積する必要がある。 At the start of the camera operation, the state of the inserted recording medium is checked, but it is difficult to precisely define the data transfer speed of the recording medium. For this reason, data is stored in the internal memory and then transferred to the external memory. In general, the external memory is often slower than the internal memory, and data is transferred to the external memory via the internal memory in order to absorb the speed difference between the two. Even if the external memory has a sufficient data transfer rate, it is necessary to retransmit the data when an error occurs. For example, in the SD card (trademark), the minimum guaranteed speed is 10 megabytes / second in Class 10, but there is a CRC (error detection method during transfer) error caused by the transmission path between the camera body and the external memory. Can occur. In such a case, since it is difficult to guarantee the data transfer rate, the data to be output to the external memory needs to be temporarily stored in the internal memory.
画像データを内部メモリへ一旦蓄積するシステムの場合、カメラの連続撮影枚数は、蓄積可能な内部メモリのサイズに依存する。例えば、画像1枚当りの平均データサイズを5メガバイトとし、内部メモリの容量を50メガバイトとすると、連続撮影可能な枚数は10枚となる。内部メモリへのデータ転送と、外部メモリへのデータ出力を同時に実行できないシステムでは、内部メモリへのデータ転送が完了してから、外部メモリへデータを出力する必要がある。よって、最大連続撮影枚数、つまり、カメラが連続して撮影できる最大枚数(10枚)を超えたときに、ユーザは次の撮影まで待たされることになる。 In the case of a system in which image data is temporarily stored in the internal memory, the number of continuous shots of the camera depends on the size of the internal memory that can be stored. For example, if the average data size per image is 5 megabytes and the internal memory capacity is 50 megabytes, the number of images that can be continuously shot is 10. In a system that cannot execute data transfer to the internal memory and data output to the external memory at the same time, it is necessary to output the data to the external memory after the data transfer to the internal memory is completed. Therefore, when the maximum number of continuous shots, that is, the maximum number (10) that can be continuously shot by the camera is exceeded, the user waits until the next shooting.
一方、内部メモリへのデータ転送と同時に、既に内部メモリに蓄積された画像データを外部メモリへ出力できるシステムの場合、最大連続撮影枚数を増やすことができる。例えば、内部メモリへのデータ転送を10枚分行っている期間中に、そのうちの5枚分のデータを外部メモリへ出力できるとすると、最大連続撮影枚数は15枚程度となる。どちらのシステムでも、連続撮影が可能な枚数には制限がある。内部メモリへのデータ転送速度に比較して、一般的に外部メモリの方が遅い場合が多いので、最大連続撮影枚数は、内部メモリへの蓄積量(バッファ量)に依存することになる。 On the other hand, in the case of a system that can output image data already stored in the internal memory to the external memory simultaneously with the data transfer to the internal memory, the maximum number of continuous shots can be increased. For example, if it is possible to output data for five images to the external memory during a period in which data transfer to the internal memory is performed for ten images, the maximum number of continuous shots is about 15. In both systems, there is a limit to the number of images that can be shot continuously. Since the external memory is generally slower than the data transfer rate to the internal memory, the maximum number of consecutive shots depends on the storage amount (buffer amount) in the internal memory.
ところで、外部メモリに使用するカード型記憶デバイスは、データ転送速度の高速化が進んでおり、カメラで撮像した画像データを直接書き込むことが可能になりつつある。この場合、内部メモリのデータ蓄積容量によらずに、最大連続撮影枚数を外部メモリに出力可能な最大サイズまで増やすことができる。しかし、データ転送速度が十分に高速な外部メモリであったとしても、CRCエラー等が発生して、データの書き込みに失敗した場合のデータ保証が必要となる。
本発明は、外部メモリへ直接データを出力する制御により高速転送を実現するとともに、内部メモリを使用した外部メモリへのデータ転送によりデータを保証することを目的とする。
Incidentally, card-type storage devices used for the external memory have been increased in data transfer speed, and image data captured by a camera can be directly written. In this case, the maximum number of continuous shots can be increased to the maximum size that can be output to the external memory, regardless of the data storage capacity of the internal memory. However, even if the external memory has a sufficiently high data transfer rate, it is necessary to guarantee data when a CRC error occurs and data writing fails.
An object of the present invention is to realize high-speed transfer by controlling data output directly to an external memory and to guarantee data by data transfer to an external memory using an internal memory.
上記課題を解決するために、本発明に係る装置は、データを入力する入力手段と、前記入力手段により入力されたデータを、第1の記憶媒体および第2の記憶媒体に転送して記憶すると共に、前記第1の記憶媒体に記憶されたデータを前記第2の記憶媒体に転送して記憶する手段であって、前記第1の記憶媒体から前記第2の記憶媒体にデータを転送して記憶する第1のモードと、前記入力手段からのデータを前記第2の記憶媒体に転送して記憶する第2のモードとを切り替える制御手段とを備える。前記制御手段は、前記入力手段から前記第2の記憶媒体にデータを転送して記憶することが可能であるか否かに応じて前記第1のモードと前記第2のモードを切り替える。 In order to solve the above-described problems, an apparatus according to the present invention transfers input data to the first storage medium and the second storage medium and stores the data input by the input means and the input means. And means for transferring the data stored in the first storage medium to the second storage medium for storage, wherein the data is transferred from the first storage medium to the second storage medium. Control means for switching between a first mode for storing and a second mode for transferring and storing data from the input means to the second storage medium. The control means switches between the first mode and the second mode depending on whether data can be transferred from the input means to the second storage medium and stored.
本発明によれば、第2の記憶媒体へ直接データを出力する制御により高速転送を実現するとともに、第1の記憶媒体を経由して第2の記憶媒体に転送する制御によりデータを保証することができる。 According to the present invention, high-speed transfer is realized by the control of directly outputting data to the second storage medium, and the data is guaranteed by the control of transferring to the second storage medium via the first storage medium. Can do.
以下、添付図面を参照しながら、本発明の各実施形態について説明する。各実施形態では、電子機器としてデジタルカメラを例示するが、デジタルビデオカメラやカメラ付携帯電話等の撮像装置に幅広く適用可能である。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In each embodiment, a digital camera is exemplified as the electronic device, but the present invention can be widely applied to imaging devices such as a digital video camera and a camera-equipped mobile phone.
[第1実施形態]
図1は、本発明の第1実施形態に係るデジタルカメラにおけるシステム構成例を説明するブロック図である。
[First Embodiment]
FIG. 1 is a block diagram illustrating a system configuration example of a digital camera according to the first embodiment of the present invention.
撮像光学系100は撮像レンズ、シャッタ、絞り等を備える。撮像部101は、撮像光学系100を介した被写体からの光を光電変換して撮像信号を生成する撮像素子と、撮像信号に含まれるリセットノイズを除去する不図示の相関二重サンプリング部を備える。この他、撮像部101は、撮像信号のレベルを利得可変に増幅する利得可変増幅部と、アナログデータをデジタルデータに量子化するA/D変換部を備える。撮像部101は後述のDMA(Direct Memory Access)コントローラ105に撮像データを出力する。図1では、撮像部101の出力する撮像データを処理するデータ処理手段として、撮像データの現像処理等を行う信号処理部102と、画像データの圧縮処理および伸長処理を行う画像圧縮伸長部103を例示する。
信号処理部102は、撮像部101によって得られたデジタル画像データに対し、不図示の画像評価処理部による評価値に基づいて適切なデジタル信号処理を行う。画像圧縮伸長部103は、信号処理部102で処理された画像データに圧縮処理を施し、例えば、JPEG(Joint Photographic Experts Group)データを生成する。また、画像圧縮伸長部103は、圧縮されたJPEG画像データの伸長処理を行い、表示デバイス等に表示する画像データを生成する。
The imaging
The
CPU(中央演算処理装置)104は、制御プログラムを実行して各部を制御する。DMAコントローラ105は、撮像部101、信号処理部102、画像圧縮伸長部103との間で送受されるデータを制御する第1制御手段である。表示コントローラ106は、システムバス112を介して取得した表示画像データを、表示デバイス109へ送信する。表示デバイス109は、表示画像データに従って画面に画像を表示する。
DRAM(Dynamic Random Access Memory)コントローラ107は、DRAM110へのデータアクセスを制御する。DRAM110は、処理されたデータを一時的に退避するための内部メモリ(第1の記憶媒体)である。また、カードコントローラ108は、外付けカード(主にフラッシュメモリ)111へのデータアクセスを制御する第2制御手段である。外付けカード111は撮像装置に着脱可能な外部メモリ(第2の記憶媒体)であり、各種カード型記憶デバイスや磁気記録媒体を用いた記録デバイス等を使用できる。
A CPU (Central Processing Unit) 104 executes a control program to control each unit. The
A DRAM (Dynamic Random Access Memory)
CPU104や各コントローラはシステムバス112に接続されている。CPU104、DMAコントローラ105をバス・マスタとし、表示コントローラ106、DRAMコントローラ107、カードコントローラ108をバス・スレーブとしてシステムバス112に各部が接続されている。カードダイレクトパス113は、システムバス112とは独立したデータパスとして、DMAコントローラ105からカードコントローラ108にデータを直接転送する。フロー制御信号線114は、外付けカード111への書き込みのデータフロー制御を行うための信号線である。
The
次に、図2を参照して、DMAコントローラ105およびカードコントローラ108を中心とする構成例について説明する。DMAコントローラ105内の第1セレクタ105−1は、複数の入力データである撮像部101、信号処理部102、画像圧縮伸長部103の各データから1つを選択する第1データ選択手段である。第1セレクタ105−1における信号選択はCPU104により制御される。
Next, a configuration example centering on the
データFIFOメモリ(以下、単にFIFOという)105−2は、データを一時的に保持して出力するデータバッファであり、第1セレクタ105−1により選択されたデータを蓄積して順次出力する。FIFOは”First-In First-Out”の略号である。データパス112−3は、システムバス112へのライトアクセス時におけるDMAコントローラ105の接続線である。また、カードダイレクトパス113は、FIFO105−2からカードコントローラ108へデータを転送する経路を示す。
A data FIFO memory (hereinafter simply referred to as FIFO) 105-2 is a data buffer that temporarily holds and outputs data, accumulates data selected by the first selector 105-1, and sequentially outputs the data. FIFO is an abbreviation for “First-In First-Out”. The data path 112-3 is a connection line of the
カードコントローラ108内の第2セレクタ108−1は、システムバス112からの入力データと、DMAコントローラ105からの入力データのいずれかを選択する第2データ選択手段である。第2セレクタ108−1は、FIFO105−2の出力データと、内部メモリであるDRAM110から読み出したデータを、外付けカード111に書き込むデータとして選択する役目をもつ。第2セレクタ108−1における信号選択はCPU104により制御される。システムバス112とカードコントローラ108とを接続するデータパス112−4は、外付けカード111に書き込みを行う際のデータ転送に使用される。
データパス112−1は、システムバス112とCPU104を接続し、またデータパス112−2は、システムバス112とDRAMコントローラ107とを接続する。
The second selector 108-1 in the
The data path 112-1 connects the
次に、図3、図4、図5を参照して、撮像部101から入力される画像データを、外付けカード111に対して直接書き込む場合の処理例について説明する。図3は処理の流れを説明するフローチャートであり、図4、図5はデータ転送例を説明する概念図である。
Next, a processing example in the case where image data input from the
外付けカード111がカメラのカードスロットに挿入されると、CPU104は外付けカード111の属性をチェックする。このとき、データの読み出し速度および書き込み速度を判別可能である。図3の処理が開始し、S301でCPU104は、カード挿入時にチェックしたデータ転送速度に基づき、撮像部101が出力するデータをDMAコントローラ105経由で外付けカード111に直接書き込む処理(カードダイレクト処理)が可能か否かを判定する。カードダイレクト処理が不可能なカードの場合、例えば、外付けカード111のデータ転送速度が撮像部101のデータ転送速度より遅い場合、S309に処理を進め、第1のモードが設定される。以下、内部メモリ(DRAM110)から読み出した画像データを外部メモリ(カード111)に転送して記録する第1のモードを「内部バッファモード」という。内部バッファモードでは、撮像部101の出力データが、DRAM110へ一時的に記憶された後、DRAM110から外付けカード111に転送されて書き込み処理が実行される。つまり、外部メモリが低速な記録メディアである場合には、処理後のデータは、FIFO105−2からDRAM110へ転送して一時的に記憶した上で、カード111へ転送される。
When the
一方、カードダイレクト処理が可能な場合、例えば、カードスロットに挿入されたカード111のデータ転送速度が、撮像部101の出力データを直接書き込むのに十分な速度であると判断された場合には、S302に処理を進める。S302で第2のモードが設定される。以下、DRAM110を経由せずにカード111に画像データを転送して記録する第2のモードを「カードダイレクトモード」という。この場合、CPU104は、第1セレクタ105−1が撮像部101からの入力を選択し、第2セレクタ108−1がカードダイレクトパス113からの入力を選択するように設定処理を行う。CPU104は、DMAコントローラ105による画像データの転送を開始させる。また、カードダイレクトモードにおいても、カードコントローラ108への画像データの転送と並列に、DRAMコントローラ107への画像データの転送が行われる。次のS303では撮像動作が開始し、撮像光学系100、撮像部101による画像データの取り込みが開始し、DMAコントローラ105内のFIFO105−2に画像データが入力される。
On the other hand, when the card direct processing is possible, for example, when it is determined that the data transfer speed of the
ここで、図4、図5を参照して、FIFO105−2、DRAM110、外付けカード111に入力されるデータの流れを説明する。本実施形態では、FIFO105−2の総容量を2048バイトとし、これを4分割して使用する場合を想定する。つまり、1ブロック当たりのデータ量は、512バイトとなる。撮像部101から出力される画像データについては、FIFO105−2にて1ブロック分のデータが蓄積されると、DRAM110と外付けカード111へ転送される。
Here, the flow of data input to the FIFO 105-2, the
図4(A)は、各部のデータ蓄積量について概念的に示す。FIFO105−2は4ブロックからなり、1ブロックが512バイトである。DRAM110、外付けカード111についても、ブロック単位で分割した状態で示す。図中の第1ポインタ(FIFOライトポインタ)は、撮像データをFIFO105−2に書き込む位置を指す。また、第2ポインタ(カードライトポインタ)は、撮像データをFIFO105−2から外付けカード111へ書き込む位置を指す。第3ポインタ(DRAMライトポインタ)は、撮像データをFIFO105−2からDRAM110へ書き込む位置を指す。これらのポインタは、図3のS303の時点では同じ位置を指しており、この位置はFIFOライトポインタの位置(この基準位置をゼロとする)となっている。
FIG. 4A conceptually shows the amount of data stored in each part. The FIFO 105-2 is composed of four blocks, and one block is 512 bytes. The
図4(B)は、撮像開始後に時間が経過した状態を例示する。図中に丸枠内で示す数字によってブロックごとの撮像データを区別しており、明細書中では各データをD(X)と表記する。Xは自然数変数を表す。図4(B)の状態にて、FIFO105−2には、FIFOライトポインタで示すように、D(1)からD(3)までデータが蓄積されており、D(4)を書き込み中である。DRAM110においては、DRAMライトポインタで示すように、D(1)とD(2)の書き込みが終了し、D(3)のデータを転送中である。このとき、外付けカード111にエラーが発生した場合、再送処理が実行され、従って、データ転送処理に遅れが発生する。なお、カードライトポインタに示すように、D(1)のデータは外付けカード111に転送中である。
FIG. 4B illustrates a state where time has elapsed after the start of imaging. In the figure, the imaging data for each block is distinguished by a number shown in a circle, and each data is expressed as D (X) in the specification. X represents a natural number variable. In the state shown in FIG. 4B, data is stored in the FIFO 105-2 from D (1) to D (3) as shown by the FIFO write pointer, and D (4) is being written. . In the
図4(C)に示す状態では、カードライトポインタがD(2)の先頭を指しており、現時点でD(2)のデータが外付けカード111に転送されている。FIFOライトポインタはD(5)の先頭を指しており、D(5)の書き込みが行われている。つまり、D(1)のデータは、既に転送が完了しているため、D(5)は、以前にD(1)が存在した領域に書き込むことが可能である。
In the state shown in FIG. 4C, the card write pointer points to the beginning of D (2), and the data of D (2) is currently transferred to the
FIFO105−2でD(5)の書き込みを終了し、次のD(6)を撮像部101からFIFO105−2に転送しようとすると、現時点で外付けカード111へ転送を行っているD(2)が上書きされてしまう可能性がある。そこで、この時点で、FIFO105−2がそれ以上データの書き込みを許可しない状態(Full)である旨を示す通知がCPU104に対して行われる。Full状態については、例えばFIFO105−2のデータ蓄積量が閾値を超えたか否かにより判定できる。図3のS304には、FIFO105−2に係るFull状態の判定処理を示す。FIFO105−2がFull状態と判定された場合、S305に処理を進め、また、Full状態でないと判定された場合、S307に処理を進める。DMAコントローラ105が撮像部101のデータを受け付ける際には、特定のフレームレートでの撮像データに関するリアルタイム処理が要求される。この撮像データをカードダイレクト処理で外部メモリに書き込む場合、書き込み処理の待ち時間をとることができない。このため、FIFO105−2におけるデータ蓄積量を、常に監視する必要がある。
When writing of D (5) is completed in the FIFO 105-2 and the next D (6) is transferred from the
S305でCPU104は内部バッファモードの設定処理を行う。これにより、第2セレクタ108−1は、データパス112−4からのデータ入力を選択する状態に切り替わる。すなわち、DRAM110からシステムバス112を介して、カードコントローラ108に入力されたデータを、外付けカード111への書き込む処理が実行される。このとき、図4(C)に示すDRAM110上のデータD(1)については、既に外付けカード111への転送が完了しているので、D(1)を記憶していた領域は、データ保持の必要がないために解放される。図4にて斜線を付して示す領域は、解放可能な領域、つまり再びデータの書き込みに使用可能な領域を示している。なお、DRAM110上のデータのうちで、外付けカード111への書き込みが完了しているデータを記憶する領域については、解放によって当該領域に次のデータを書き込める状態となる。
In step S305, the
図4(D)は、内部バッファモードに切り替わった状態を示し、カードライトポインタがDRAM110上のD(2)の先頭を指している。DRAM110上に在るD(2)が外付けカード111に転送されている。図5(E)の状態では、内部バッファモードが継続中であり、DRAM110上のD(4)を外付けカード111に転送中である。このときのFIFOライトポインタはD(6)の先頭を指しており、撮像部101からD(6)の書き込みが行われる。FIFOライトポインタの指している書き込み位置と、カードライトポインタの指している位置との差分は2ブロック以上である。この時点で、図3のS304の判定結果は、FIFO105−2がFull状態でないことを示す。すなわち、Full状態が解除される。この場合、S307に処理を進め、カードダイレクトモードに設定され、第2セレクタ108−1はカードダイレクトパス113の入力を選択する。またこの時点では既に、DRAM110においてD(1)〜D(3)を記憶している領域については、外付けカード111への転送を完了している。よって、これらの領域を解放することができる。
FIG. 4D shows a state in which the mode is switched to the internal buffer mode, and the card write pointer points to the head of D (2) on the
図5(F)では、カードダイレクトモードの設定状態であり、カードライトポインタが、FIFO105−2のD(4)の先頭を指している。FIFOライトポインタの指している位置と、カードライトポインタの指している位置との差分は2ブロック以上であるため、カードダイレクトモードを継続中である。図5(G)は、図5(F)から更に進んだ状態を示しており、カードライトポインタはD(5)の先頭を示しているが、FIFOライトポインタはD(7)の先頭を指している。これらのポインタの指す位置が2ブロック以上離れているため、カードダイレクトモードを継続することが可能である。また、DRAM110上のD(5)については、既に解放された領域である、D(1)を保持していた領域に書き込みが行われる。
In FIG. 5F, the card direct mode is set, and the card write pointer points to the beginning of D (4) of the FIFO 105-2. Since the difference between the position pointed to by the FIFO write pointer and the position pointed to by the card write pointer is two blocks or more, the card direct mode is being continued. FIG. 5G shows a state further advanced from FIG. 5F, and the card write pointer indicates the beginning of D (5), but the FIFO write pointer indicates the beginning of D (7). ing. Since the position indicated by these pointers is two blocks or more away, the card direct mode can be continued. In addition, as for D (5) on the
このように、本実施形態では撮像部101からFIFO105−2へデータを書き込む際に用いる第1ポインタと、FIFO105−2から外部メモリへデータを書き込む際に用いる第2ポインタを監視する。第1ポインタの指す位置が第2ポインタの指す位置を追い越してしまうかどうかを判断するために、ポインタ位置の差分が算出されて閾値と比較される。算出した差分が閾値以上である場合には、処理に余裕があるため、撮像データを外部メモリに転送して直接書き込む制御を継続することができる。一方、算出した差分が閾値未満である場合、第1ポインタの指す位置が第2ポインタの指す位置を追い越す可能性があると判断される。この場合、撮像データを外部メモリに転送して直接書き込む制御が中止され、既に内部メモリに退避された撮像データを読み出して外部メモリに転送して書き込む制御が行われる。すなわち、データ転送経路を変更するモード切り替えの判断規準は、第1ポインタと第2ポインタがそれぞれ指す位置の差分量を閾値と比較した結果に基づいており、モードの切り替えが動的に行われることになる。
As described above, in this embodiment, the first pointer used when writing data from the
図3のS305の次にS306へ処理が移ると、CPU104は撮像動作を終了するか否かを判断し、撮影動作を続行する場合、S304に処理を戻す。同様に、S307からS308に処理が移り、撮影動作を続行すると判定された場合には、S304に処理を戻す。S309からS310へ処理が移り、撮影動作を続行すると判定された場合、S309に処理を戻す。S306、S308、S310で撮影動作の終了が判定された場合、図3に示す一連の処理が終了する。
以上のように、第1ポインタおよび第2ポインタを監視しながら、外付けカード111へのデータ転送が完了するまでの間、内部バッファモードとカードダイレクトモードについてのダイナミックな切り替え制御が行われる。
When the process moves to S306 after S305 in FIG. 3, the
As described above, dynamic switching control between the internal buffer mode and the card direct mode is performed until the data transfer to the
第1実施形態によれば、データ保証のために最低限必要な容量の第1の記憶媒体(内部メモリ)を使用して、撮像装置に装着される第2の記憶媒体(外部メモリ)に直接データを出力して記憶させることができる。その際、外部メモリの転送状態(転送速度等)を監視するとともに、DMAコントローラのFIFOのデータ蓄積量を把握した上で、監視結果に従って外部メモリに対してデータを直接に書き込む制御を行う。一般的に、外部メモリのデータ転送速度を厳密に判断することは難しいが、データ転送速度が十分であると判断された場合、外部メモリへのダイレクト処理が実行される。この場合、内部メモリに退避したデータから外部メモリへ転送する方式に比べて、高スループットでのデータ転送が可能である。 According to the first embodiment, the first storage medium (internal memory) having the minimum necessary capacity for data guarantee is used directly to the second storage medium (external memory) mounted on the imaging apparatus. Data can be output and stored. At that time, the transfer state (transfer speed, etc.) of the external memory is monitored, and the amount of data stored in the FIFO of the DMA controller is ascertained, and control is performed to directly write data to the external memory according to the monitoring result. Generally, it is difficult to strictly determine the data transfer rate of the external memory, but when it is determined that the data transfer rate is sufficient, direct processing to the external memory is executed. In this case, data transfer with high throughput is possible as compared with the method of transferring data saved in the internal memory to the external memory.
また、外部メモリへのデータ転送と同時に内部メモリに記憶させるデータについては、外部メモリへの転送が完了した領域から順次に解放することで、内部メモリ上に確保する記憶領域を最小限にすることができる。外部メモリの転送エラー等が発生してデータ転送速度が低下した場合には、内部メモリに退避されたデータを外部メモリへ書き込む処理に切り替わるので、転送するデータを保証することができる。また、撮像装置内の処理に応じて、外部メモリへのダイレクト処理が可能かどうかの判断規準を変更することにより、それぞれの処理に応じて最適なデータ転送処理を実現できる。 In addition, for data to be stored in the internal memory at the same time as data transfer to the external memory, the storage area to be secured on the internal memory is minimized by sequentially releasing from the area where the transfer to the external memory has been completed. Can do. When the data transfer rate decreases due to an external memory transfer error or the like, the process switches to the process of writing the data saved in the internal memory to the external memory, so that the data to be transferred can be guaranteed. In addition, by changing the criteria for determining whether direct processing to the external memory is possible or not according to the processing in the imaging apparatus, optimal data transfer processing can be realized according to each processing.
[第2実施形態]
次に本発明の第2実施形態を説明する。第2実施形態では、撮像部から出力したデータに対して信号処理を施し、更に画像圧縮したJPEGデータを直接、外部メモリに記憶する処理について説明する。なお、第2実施形態において、第1実施形態の場合と同様の構成要素については既に使用した符号を用いることで、それらの詳細な説明を省略し、以下では相違点を中心に説明する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. In the second embodiment, a description will be given of a process of performing signal processing on data output from an imaging unit and storing JPEG data that has undergone image compression directly in an external memory. In the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals as those used in the first embodiment, and detailed description thereof is omitted. Hereinafter, differences will be mainly described.
図6は、画像圧縮後のJPEG画像データを、外付けカード111に出力するシステムの構成例を示す図である。
ハードウェアタイマ120は、規定時間が経過すると、タイマ割り込み信号線121を介してCPU104に時間経過を通知する。DMAコントローラ105のフロー制御信号線122は、FIFO105−2のデータが全て貯まった状態を検知した場合、画像圧縮伸長部103に信号を伝えて、DMAコントローラ105へのデータ入力を停止させる。第1実施形態の場合、撮像部101からのデータ入力については途中で停止することはできない。これに対して第2実施形態の場合、信号処理および画像圧縮を行う処理系のデータ入力については、DRAM110からのデータ読み出しを中断すれば、途中で処理を停止することが可能である。
FIG. 6 is a diagram illustrating a configuration example of a system that outputs JPEG image data after image compression to the
When the specified time elapses, the
次に図7を参照して、撮像部101からの撮像データを信号処理してJPEGデータを生成する処理について説明する。図7(A)は処理の流れを説明する模式図であり、時間軸方向に区分した4つの期間T1,T2,T3,T4を示す。各期間は、連続撮影時の1駒当たりの処理時間に相当する。例えば、1秒間に10駒の連続撮影を実施する場合を想定すると、期間T1,T2,T3,T4の時間長はそれぞれ100ミリ秒である。つまり1駒当たり、1000/10=100ミリ秒となる。図中の丸枠内の数字によって各期間における撮像データ、現像データ、JPEGデータをそれぞれ区別している。明細書中ではこれらをD(X)と表記する。Xは自然数変数であり、D(X)は、X駒目の画像データを示すものとする。撮像データとして、期間T1ないしT4にそれぞれD(1)ないしD(4)を示す。現像データとして、期間T2ないしT4にそれぞれD(1)ないしD(3)を示し、JPEGデータとして、期間T3,T4にそれぞれD(1)、D(2)を示す。
Next, with reference to FIG. 7, processing for generating JPEG data by performing signal processing on imaging data from the
期間T4に注目したときのDRAM110へのアクセスの様子について、図7(B)を参照して説明する。図7(B)は期間T4におけるDRAM110上の画像データ配置を矩形枠内に例示する。矩形枠の左側には撮像部101と、信号処理部102内の現像処理部による各ライトポインタを示し、矩形枠の右側には現像処理部と画像圧縮伸長部103による各リードポインタを示す。
期間T4にてDRAM110には、撮像部101からの撮像データD(4)が書き込まれる。現像データに関しては、期間T3にて既に撮像処理を完了していた撮像データD(3)が読み出され、現像処理部がD(3)の現像処理を行い、DRAM110に書き込んでいる。JPEGデータに関しては、期間T3にて既に現像処理を完了していた現像データD(2)が読み出される。該データD(2)は画像圧縮伸長部103で圧縮処理を施され、DMAコントローラ105からカードコントローラ108へと、カードダイレクトパス113経由で転送されて、外付けカード111へ出力される。
The state of access to the
In the period T4, the imaging data D (4) from the
このとき、撮像データ、現像データ、JPEGデータに係る一連の処理を1000ミリ秒内に完了できないと、1秒間に10駒の連続撮影を継続することができない。従って、カメラの内部メモリであるDRAM110への画像データの転送速度が厳密に保証されているとすると、JPEGデータのカードダイレクト処理にかかる時間が、所定時間を超えないようにする必要がある。この所定時間は、本例では1000ミリ秒であり、以下、1V処理時間という。換言すれば、内部メモリに対する撮像データのリードおよびライト、現像データのリードおよびライトが1V処理時間内で可能である場合、圧縮データを外部メモリに転送する時間が1V処理時間を超えないことを保証する必要がある。
At this time, if a series of processes related to imaging data, development data, and JPEG data cannot be completed within 1000 milliseconds, continuous shooting of 10 frames cannot be continued per second. Therefore, if the transfer speed of image data to the
次に、図8を参照して、JPEGデータのカードダイレクト処理にかかる時間が1V処理時間を超えないように保証するためのシーケンスについて説明する。
第1実施形態の図3のフローチャートと同様に、外付けカード111がカメラのカードスロットに挿入された場合、該カードの属性がチェックされる。S701でカードダイレクト処理が不可能と判断された場合、S710に進み、内部バッファモードが設定される。即ち、画像圧縮伸長部103が出力するJPEGデータは、システムバス112、DRAMコントローラ107を経由して、一旦DRAM110に記憶保持されてから読み出されて外付けカード111に記憶される。S711で撮影終了と判断された場合、処理を終了するが、撮像動作の続行中は内部バッファモードが設定されたままである。
Next, with reference to FIG. 8, a sequence for ensuring that the time required for card direct processing of JPEG data does not exceed 1V processing time will be described.
Similar to the flowchart of FIG. 3 of the first embodiment, when the
一方、S701でカードダイレクト処理が可能と判断された場合、S702へ移る。S702では、ユーザがレリーズスイッチを操作している状態であれば、連続撮影(いわゆる連写)が継続されていると判定されて、S703に処理を進める。また、連写終了時には、現時点での駒の処理を完了する。S703では、前の駒のJPEGデータ出力が終了したか否かが判定される。例えば、連写動作の途中で、図7(A)に示す期間T4での処理の開始前に、期間T3のJPEGデータD(1)を外付けカード111へ書き込む処理が完了しているか否かが判定される。データD(1)の処理が完了していない場合、S708に進み、データD(1)の処理が完了していた場合、S704に進む。S708では内部バッファモードに設定され、JPEGデータは、一旦DRAM110に書き込まれてから読み出されて外付けカード111に記憶される。
On the other hand, if it is determined in S701 that card direct processing is possible, the process proceeds to S702. In S702, if the user is operating the release switch, it is determined that continuous shooting (so-called continuous shooting) is continued, and the process proceeds to S703. At the end of continuous shooting, the current frame processing is completed. In S703, it is determined whether JPEG data output for the previous frame is completed. For example, during the continuous shooting operation, whether or not the process of writing the JPEG data D (1) of the period T3 to the
S704では、カードダイレクトモードが設定され、撮像処理、現像処理、JPEG圧縮処理が一斉に開始する。例えば、図7(A)に示す期間T4にて、データD(4)とD(3)のリードおよびライトについては、前述の通り、1V処理時間内で確実に処理が完了することを保証されている。ところが、JPEGデータのカードダイレクト処理での書き込みの場合、1V処理時間内での処理の完了が必ずしも保証されるわけではない。例えば、外付けカード111の書き込みエラーが発生した場合には再送処理が必要となり、外付けカード111への転送速度が遅くなる場合がある。このため、1V処理時間内に、図7(B)に示すJPEGデータD(2)を外付けカード111に記憶できない場合があり得る。そこで、外付けカード111のデータ転送速度が閾値速度よりも遅くなったことを検知するためにタイマ監視機能が用いられる。つまり、期間T4での処理開始とともに、ハードウェアタイマ120が起動し、例えば、500ミリ秒が経過した時点でCPU104に割り込みがかかり、CPU104はJPEGデータの外付けカード111への書き込み量を計測してチェックする処理を実行する。ここで設定している時間閾値500ミリ秒は、1V処理時間を1000ミリ秒とするとき、その半分の時間である。例えば、JPEGデータを生成するための現像データ(図7(B)のD(2)参照)の読み出しアドレスを監視してリード処理の進捗状況のチェックが行われる。データの計測量を、時間閾値内で処理されるべき予定データ量(閾値)と比較することにより、外付けカード111への書き込み処理が問題なく行われているか、または、書き込み処理が遅れているかを判断できる。S705にてタイマ割り込みが発生したか否かについて判定され、500ミリ秒の経過時点でのタイマ割り込みが発生すると、S706に移る。S706では、JPEGデータの外付けカード111への書き込み処理が問題なく進行しているか否かについてチェックが行われる。ここで、JPEGデータの出力量が規定値未満の場合、つまり外付けカード111への書き込み速度が遅くなり、このままではカードダイレクト処理が1V処理時間の終了時点に間に合わなくなると判断された場合、S708に移る。S708にて内部バッファモードが設定され、JPEGデータの書き込み処理が保証される。また、S706でJPEGデータの出力量が規定値以上の場合、S707に処理を進める。
In S704, the card direct mode is set, and imaging processing, development processing, and JPEG compression processing start all at once. For example, in the period T4 shown in FIG. 7A, the reading and writing of the data D (4) and D (3) are guaranteed to be reliably completed within 1V processing time as described above. ing. However, in the case of writing JPEG data by card direct processing, completion of processing within 1 V processing time is not necessarily guaranteed. For example, when a write error occurs in the
S707では現在の駒のJPEGデータの出力が終了したか否かが判定される。カードダイレクト処理にて現在の駒(図7の期間T4内の駒を参照)に対する処理が終了したことが確認されると、S702に処理を戻し、未終了の場合、S705に戻る。同様に、S708からS709に進むと、内部バッファモードにて現在の駒のJPEGデータの出力が終了したか否かが判定される。現在の駒に対する処理が終了すると処理をS702に戻し、未終了の場合、S709の判定処理が繰り返される。S702で連写動作が終了すると、シーケンスを終了する。 In S707, it is determined whether or not the output of the JPEG data of the current frame has been completed. If it is confirmed in the card direct process that the process for the current frame (see the frame in the period T4 in FIG. 7) has been completed, the process returns to S702, and if not completed, the process returns to S705. Similarly, when the process proceeds from S708 to S709, it is determined whether or not the output of the JPEG data of the current frame is completed in the internal buffer mode. When the process for the current piece is completed, the process returns to S702. When the process is not completed, the determination process of S709 is repeated. When the continuous shooting operation is finished in S702, the sequence is finished.
第2実施形態によれば、撮像処理、現像処理、データ圧縮処理という一連の処理を規定時間内に行いつつ、処理済みのデータを外部メモリに転送して記憶させることができる。データ圧縮処理においては、内部メモリから外部メモリへデータを転送する場合、書き込み速度に応じて処理を待たせることが可能であるが、連続撮影のように1駒当たりの処理時間が規定されている処理の場合には、規定時間の監視が必要である。ハードウェアタイマ120により時間の監視を行い、規定時間の途中で処理データの進捗状況を計測しつつ、計測量に基づいてデータの転送制御が行われる。これにより、データ圧縮処理された出力データを外部メモリに転送して直接書き込む制御を継続させるか、または内部メモリに記憶したデータを転送して外部メモリへ書き込む制御に変更するかが選択される。
また、DMAコントローラ105は、撮像部101からのデータを選択した場合、FIFO105−2のアドレスポインタを監視し、また画像圧縮伸長部103からデータの場合には、CPU104がその処理時間を監視する。このように処理内容に応じて監視処理を適切に切り替えることができる。
According to the second embodiment, the processed data can be transferred and stored in the external memory while performing a series of processing such as imaging processing, development processing, and data compression processing within a specified time. In data compression processing, when data is transferred from the internal memory to the external memory, it is possible to wait for the processing according to the writing speed, but the processing time per frame is specified as in continuous shooting. In the case of processing, it is necessary to monitor the specified time. Data transfer control is performed based on the measurement amount while monitoring the time by the
The
104 CPU
105 DMAコントローラ
110 DRAM(第1の記憶媒体)
111 外付けカード(第2の記憶媒体)
104 CPU
105
111 External card (second storage medium)
Claims (10)
前記入力手段により入力されたデータを、第1の記憶媒体および第2の記憶媒体に転送して記憶すると共に、前記第1の記憶媒体に記憶されたデータを前記第2の記憶媒体に転送して記憶する手段であって、前記第1の記憶媒体から前記第2の記憶媒体にデータを転送して記憶する第1のモードと、前記入力手段からのデータを前記第2の記憶媒体に転送して記憶する第2のモードとを切り替える制御手段とを備え、
前記制御手段は、前記入力手段から前記第2の記憶媒体にデータを転送して記憶することが可能であるか否かに応じて前記第1のモードと前記第2のモードを切り替えることを特徴とするデータ処理装置。 An input means for inputting data;
The data input by the input means is transferred to and stored in the first storage medium and the second storage medium, and the data stored in the first storage medium is transferred to the second storage medium. A first mode for transferring and storing data from the first storage medium to the second storage medium, and transferring data from the input means to the second storage medium Control means for switching between the second mode to be stored and
The control means switches between the first mode and the second mode depending on whether or not data can be transferred from the input means to the second storage medium and stored. A data processing device.
前記データを前記第1の記憶媒体および第2の記憶媒体に転送して記憶させる場合、前記第2の記憶媒体へのデータの転送状態を監視するステップと、
前記ステップでの監視結果により、前記第1の記憶媒体を経由して前記第2の記憶媒体に前記データを転送する第1のモードでの制御と、前記第1の記憶媒体を経由せずに前記第2の記憶媒体にデータを転送する第2のモードでの制御を切り替えるステップを有することを特徴とするデータ処理装置の制御方法。 A first storage medium that temporarily stores processed data, and a data processing device that controls data transfer with respect to the second storage medium that stores the data and data transferred from the first storage medium A control method executed in
When transferring and storing the data in the first storage medium and the second storage medium, monitoring a transfer state of the data to the second storage medium;
According to the monitoring result in the step, the control in the first mode for transferring the data to the second storage medium via the first storage medium, and without passing through the first storage medium A method for controlling a data processing apparatus, comprising: switching a control in a second mode for transferring data to the second storage medium.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013043093A JP2014170476A (en) | 2013-03-05 | 2013-03-05 | Data processor and method for controlling the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013043093A JP2014170476A (en) | 2013-03-05 | 2013-03-05 | Data processor and method for controlling the same |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014170476A true JP2014170476A (en) | 2014-09-18 |
JP2014170476A5 JP2014170476A5 (en) | 2016-04-14 |
Family
ID=51692811
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013043093A Pending JP2014170476A (en) | 2013-03-05 | 2013-03-05 | Data processor and method for controlling the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014170476A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105872428A (en) * | 2016-04-12 | 2016-08-17 | 北京奇虎科技有限公司 | Video data protection method and apparatus |
JP2017134500A (en) * | 2016-01-26 | 2017-08-03 | 日本電気株式会社 | Control circuit and control method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006093984A (en) * | 2004-09-22 | 2006-04-06 | Victor Co Of Japan Ltd | Imaging apparatus |
JP2008530649A (en) * | 2005-02-04 | 2008-08-07 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Transfer media content from a personal video recorder to an external storage device |
WO2009011078A1 (en) * | 2007-07-13 | 2009-01-22 | Panasonic Corporation | Vehicle image recording device |
-
2013
- 2013-03-05 JP JP2013043093A patent/JP2014170476A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006093984A (en) * | 2004-09-22 | 2006-04-06 | Victor Co Of Japan Ltd | Imaging apparatus |
JP2008530649A (en) * | 2005-02-04 | 2008-08-07 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Transfer media content from a personal video recorder to an external storage device |
WO2009011078A1 (en) * | 2007-07-13 | 2009-01-22 | Panasonic Corporation | Vehicle image recording device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017134500A (en) * | 2016-01-26 | 2017-08-03 | 日本電気株式会社 | Control circuit and control method |
CN105872428A (en) * | 2016-04-12 | 2016-08-17 | 北京奇虎科技有限公司 | Video data protection method and apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11800220B2 (en) | Accessory apparatus, image-capturing apparatus, control method and storage medium storing control program | |
US8732378B2 (en) | Bus bandwidth monitoring device and bus bandwidth monitoring method | |
JP5744650B2 (en) | BUS MONITOR DEVICE, BUS MONITOR METHOD, AND PROGRAM | |
JPWO2017216840A1 (en) | Memory access control device, image processing device, and imaging device | |
US9070201B2 (en) | Image processing apparatus | |
JP2014170476A (en) | Data processor and method for controlling the same | |
CN112995505B (en) | Image processing method, device and storage medium | |
US8436915B2 (en) | Image processing apparatus | |
JP2011130074A (en) | Image processing system, image processing apparatus, image processing method, and program | |
US10719458B2 (en) | Data transfer device, image processing device, and imaging device | |
JP2014167763A (en) | Electronic device and method for controlling the same | |
JP4487454B2 (en) | Electronic camera and control IC for electronic camera | |
JP4850504B2 (en) | Signal processing apparatus, imaging apparatus, and data transfer method | |
WO2019043822A1 (en) | Memory access device, image processing device, and imaging device | |
JPWO2018134882A1 (en) | Memory access device, image processing device, and imaging device | |
JP5360594B2 (en) | DMA transfer apparatus and method | |
US11314664B2 (en) | Memory access device, image processing device and imaging device | |
US20060206637A1 (en) | Electronic apparatus and control method | |
JP2006039672A (en) | Bus request control circuit | |
JP2021158490A (en) | Imaging apparatus and control method | |
JP2019134240A (en) | Image processing device | |
KR100843615B1 (en) | Efficient dual frame buffer control device and the same method | |
JP2012043053A (en) | Bus band monitoring device and bus band monitoring method | |
JP2017162431A (en) | Memory control device and imaging device | |
JP2021044746A (en) | Recording apparatus, control method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160301 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160301 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170125 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170214 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20170808 |