JP2014170476A - Data processor and method for controlling the same - Google Patents

Data processor and method for controlling the same Download PDF

Info

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
Application number
JP2013043093A
Other languages
Japanese (ja)
Other versions
JP2014170476A5 (en
Inventor
Yuichiro Kimijima
裕一郎 君島
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013043093A priority Critical patent/JP2014170476A/en
Publication of JP2014170476A publication Critical patent/JP2014170476A/en
Publication of JP2014170476A5 publication Critical patent/JP2014170476A5/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To secure data by data transfer to an external memory using an internal memory by achieving high speed transfer under the control of the direct output of data to the external memory.SOLUTION: A data processor is configured to control data transfer to a DRAM 110 as an internal memory for temporarily storing processed data and an external card 111 as an external memory. A DMA controller 105 monitors a data transfer state to the external card 111, and switches control in a first mode for transferring data via the DRAM 110 to the external card 111 and control in a second mode for transferring data to the external card 111 without using the DRAM 110. In the second mode, the data are directly transferred to the external memory such that transfer processing with a high throughput is executable. In the first mode, the data read from the internal memory are transferred to the external memory in accordance with the deterioration of the data transfer speed.

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.

特開平06−006665号公報Japanese Patent Laid-Open No. 06-006665

ところで、外部メモリに使用するカード型記憶デバイスは、データ転送速度の高速化が進んでおり、カメラで撮像した画像データを直接書き込むことが可能になりつつある。この場合、内部メモリのデータ蓄積容量によらずに、最大連続撮影枚数を外部メモリに出力可能な最大サイズまで増やすことができる。しかし、データ転送速度が十分に高速な外部メモリであったとしても、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.

図2ないし図5と併せて本発明の第1実施形態を説明するために、装置の構成例を示す図である。It is a figure which shows the structural example of an apparatus in order to demonstrate 1st Embodiment of this invention combined with FIG. 2 thru | or FIG. DMAコントローラとカードコントローラのデータパスの切り替え制御を詳細に説明するための図である。It is a figure for demonstrating in detail the switching control of the data path of a DMA controller and a card controller. データ転送処理例を説明するフローチャートである。It is a flowchart explaining the example of a data transfer process. 図5とともにデータ転送の流れを例示する概念図であり、(A)ないし(D)の転送状態を示す。FIG. 6 is a conceptual diagram illustrating the flow of data transfer together with FIG. 5 and shows transfer states (A) to (D). 図4に続く(E)ないし(G)の転送状態を示す図である。FIG. 5 is a diagram illustrating transfer states (E) to (G) following FIG. 4. 図7および図8とともに本発明の第2実施形態を説明するために、装置の構成例を示す図である。It is a figure which shows the structural example of an apparatus in order to demonstrate 2nd Embodiment of this invention with FIG. 7 and FIG. 処理例を説明するためのタイムチャート(A)、およびDRAMのデータ配置例(B)を示す図である。It is a figure which shows the time chart (A) for demonstrating the example of a process, and the data arrangement example (B) of DRAM. データ転送処理例を説明するフローチャートである。It is a flowchart explaining the example of a data transfer process.

以下、添付図面を参照しながら、本発明の各実施形態について説明する。各実施形態では、電子機器としてデジタルカメラを例示するが、デジタルビデオカメラやカメラ付携帯電話等の撮像装置に幅広く適用可能である。   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 optical system 100 includes an imaging lens, a shutter, a diaphragm, and the like. The imaging unit 101 includes an imaging element that photoelectrically converts light from a subject via the imaging optical system 100 to generate an imaging signal, and a correlated double sampling unit (not shown) that removes reset noise included in the imaging signal. . In addition, the imaging unit 101 includes a variable gain amplification unit that amplifies the level of the imaging signal in a variable gain, and an A / D conversion unit that quantizes analog data into digital data. The imaging unit 101 outputs imaging data to a DMA (Direct Memory Access) controller 105 described later. In FIG. 1, as data processing means for processing imaging data output from the imaging unit 101, a signal processing unit 102 that performs imaging data development processing and the like, and an image compression / decompression unit 103 that performs image data compression processing and decompression processing are provided. Illustrate.
The signal processing unit 102 performs appropriate digital signal processing on the digital image data obtained by the imaging unit 101 based on an evaluation value by an image evaluation processing unit (not shown). The image compression / decompression unit 103 performs compression processing on the image data processed by the signal processing unit 102 to generate, for example, JPEG (Joint Photographic Experts Group) data. The image compression / decompression unit 103 performs decompression processing on the compressed JPEG image data, and generates image data to be displayed on a display device or the like.

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 DMA controller 105 is a first control unit that controls data transmitted and received between the imaging unit 101, the signal processing unit 102, and the image compression / decompression unit 103. The display controller 106 transmits display image data acquired via the system bus 112 to the display device 109. The display device 109 displays an image on the screen according to the display image data.
A DRAM (Dynamic Random Access Memory) controller 107 controls data access to the DRAM 110. The DRAM 110 is an internal memory (first storage medium) for temporarily saving processed data. The card controller 108 is second control means for controlling data access to the external card (mainly flash memory) 111. The external card 111 is an external memory (second storage medium) that can be attached to and detached from the imaging apparatus, and various card-type storage devices, recording devices using magnetic recording media, and the like can be used.

CPU104や各コントローラはシステムバス112に接続されている。CPU104、DMAコントローラ105をバス・マスタとし、表示コントローラ106、DRAMコントローラ107、カードコントローラ108をバス・スレーブとしてシステムバス112に各部が接続されている。カードダイレクトパス113は、システムバス112とは独立したデータパスとして、DMAコントローラ105からカードコントローラ108にデータを直接転送する。フロー制御信号線114は、外付けカード111への書き込みのデータフロー制御を行うための信号線である。   The CPU 104 and each controller are connected to the system bus 112. Each unit is connected to the system bus 112 with the CPU 104 and the DMA controller 105 as a bus master, and the display controller 106, DRAM controller 107, and card controller 108 as a bus slave. The card direct path 113 directly transfers data from the DMA controller 105 to the card controller 108 as a data path independent of the system bus 112. The flow control signal line 114 is a signal line for performing data flow control of writing to the external card 111.

次に、図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 DMA controller 105 and the card controller 108 will be described with reference to FIG. The first selector 105-1 in the DMA controller 105 is a first data selection unit that selects one of the data of the imaging unit 101, the signal processing unit 102, and the image compression / decompression unit 103 as a plurality of input data. The signal selection in the first selector 105-1 is controlled by the CPU 104.

データ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 DMA controller 105 at the time of write access to the system bus 112. The card direct path 113 indicates a path for transferring data from the FIFO 105-2 to the card controller 108.

カードコントローラ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 card controller 108 is second data selection means for selecting either input data from the system bus 112 or input data from the DMA controller 105. The second selector 108-1 has a function of selecting the output data of the FIFO 105-2 and the data read from the DRAM 110 as the internal memory as data to be written to the external card 111. The signal selection in the second selector 108-1 is controlled by the CPU 104. A data path 112-4 connecting the system bus 112 and the card controller 108 is used for data transfer when writing to the external card 111.
The data path 112-1 connects the system bus 112 and the CPU 104, and the data path 112-2 connects the system bus 112 and the DRAM controller 107.

次に、図3、図4、図5を参照して、撮像部101から入力される画像データを、外付けカード111に対して直接書き込む場合の処理例について説明する。図3は処理の流れを説明するフローチャートであり、図4、図5はデータ転送例を説明する概念図である。   Next, a processing example in the case where image data input from the imaging unit 101 is directly written to the external card 111 will be described with reference to FIGS. 3, 4, and 5. FIG. 3 is a flowchart for explaining the flow of processing, and FIGS. 4 and 5 are conceptual diagrams for explaining data transfer examples.

外付けカード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 external card 111 is inserted into the card slot of the camera, the CPU 104 checks the attribute of the external card 111. At this time, the data reading speed and writing speed can be determined. The processing of FIG. 3 starts, and in S301, the CPU 104 directly writes the data output by the imaging unit 101 to the external card 111 via the DMA controller 105 based on the data transfer speed checked at the time of card insertion (card direct processing). Whether or not is possible is determined. In the case where the card direct processing is impossible, for example, when the data transfer speed of the external card 111 is slower than the data transfer speed of the imaging unit 101, the process proceeds to S309 and the first mode is set. Hereinafter, the first mode in which image data read from the internal memory (DRAM 110) is transferred to the external memory (card 111) and recorded is referred to as an “internal buffer mode”. In the internal buffer mode, output data of the imaging unit 101 is temporarily stored in the DRAM 110 and then transferred from the DRAM 110 to the external card 111 to execute a writing process. That is, when the external memory is a low-speed recording medium, the processed data is transferred from the FIFO 105-2 to the DRAM 110, temporarily stored, and then transferred to the card 111.

一方、カードダイレクト処理が可能な場合、例えば、カードスロットに挿入されたカード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 card 111 inserted into the card slot is a speed sufficient to directly write the output data of the imaging unit 101, The process proceeds to S302. In S302, the second mode is set. Hereinafter, the second mode in which image data is transferred to and recorded on the card 111 without going through the DRAM 110 is referred to as “card direct mode”. In this case, the CPU 104 performs setting processing so that the first selector 105-1 selects an input from the imaging unit 101 and the second selector 108-1 selects an input from the card direct path 113. The CPU 104 starts transfer of image data by the DMA controller 105. Also in the card direct mode, the image data is transferred to the DRAM controller 107 in parallel with the transfer of the image data to the card controller 108. In the next S303, the imaging operation is started, the image data acquisition by the imaging optical system 100 and the imaging unit 101 is started, and the image data is input to the FIFO 105-2 in the DMA controller 105.

ここで、図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 DRAM 110, and the external card 111 will be described with reference to FIGS. In the present embodiment, it is assumed that the total capacity of the FIFO 105-2 is 2048 bytes and this is used by being divided into four. That is, the data amount per block is 512 bytes. The image data output from the imaging unit 101 is transferred to the DRAM 110 and the external card 111 when data for one block is accumulated in the FIFO 105-2.

図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 DRAM 110 and the external card 111 are also shown as being divided in units of blocks. A first pointer (FIFO write pointer) in the figure indicates a position where imaging data is written to the FIFO 105-2. Further, the second pointer (card write pointer) indicates a position where image data is written from the FIFO 105-2 to the external card 111. The third pointer (DRAM write pointer) indicates a position where the imaging data is written from the FIFO 105-2 to the DRAM 110. These pointers point to the same position at the time of S303 in FIG. 3, and this position is the position of the FIFO write pointer (this reference position is set to zero).

図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 DRAM 110, as indicated by the DRAM write pointer, the writing of D (1) and D (2) is completed, and the data of D (3) is being transferred. At this time, if an error occurs in the external card 111, a retransmission process is executed, and therefore a delay occurs in the data transfer process. As indicated by the card write pointer, the data of D (1) is being transferred to the external card 111.

図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 external card 111. The FIFO write pointer points to the beginning of D (5), and D (5) is being written. That is, since the data of D (1) has already been transferred, D (5) can be written in the area where D (1) previously existed.

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 imaging unit 101 to the FIFO 105-2, the transfer to the external card 111 at the present time is performed. D (2) May be overwritten. Therefore, at this time, the CPU 104 is notified that the FIFO 105-2 is not allowed to write any more data (Full). The full state can be determined, for example, based on whether or not the data accumulation amount of the FIFO 105-2 exceeds a threshold value. In S304 of FIG. 3, a Full state determination process related to the FIFO 105-2 is shown. If it is determined that the FIFO 105-2 is in the full state, the process proceeds to step S305. If it is determined that the FIFO 105-2 is not in the full state, the process proceeds to step S307. When the DMA controller 105 accepts the data of the imaging unit 101, real-time processing relating to imaging data at a specific frame rate is required. When this imaging data is written to the external memory by card direct processing, the waiting time for the writing processing cannot be taken. For this reason, it is necessary to constantly monitor the data accumulation amount in the FIFO 105-2.

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 CPU 104 performs an internal buffer mode setting process. As a result, the second selector 108-1 switches to a state of selecting a data input from the data path 112-4. That is, a process of writing data input from the DRAM 110 to the card controller 108 via the system bus 112 to the external card 111 is executed. At this time, since the data D (1) on the DRAM 110 shown in FIG. 4C has already been transferred to the external card 111, the area storing the D (1) Freed for no need. An area indicated by hatching in FIG. 4 indicates a releasable area, that is, an area that can be used for data writing again. Of the data on the DRAM 110, an area for storing data that has been written to the external card 111 is in a state in which the next data can be written to the area upon release.

図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 DRAM 110. D (2) on the DRAM 110 is transferred to the external card 111. In the state of FIG. 5E, the internal buffer mode is continuing, and D (4) on the DRAM 110 is being transferred to the external card 111. The FIFO write pointer at this time points to the head of D (6), and D (6) is written from the imaging unit 101. The difference between the write position pointed to by the FIFO write pointer and the position pointed to by the card write pointer is two blocks or more. At this time, the determination result of S304 in FIG. 3 indicates that the FIFO 105-2 is not in the Full state. That is, the Full state is released. In this case, the process proceeds to S307, the card direct mode is set, and the second selector 108-1 selects the input of the card direct path 113. At this time, the transfer to the external card 111 has already been completed for the areas in the DRAM 110 that store D (1) to D (3). Therefore, these areas can be released.

図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 DRAM 110, writing is performed in an area that has already been released and that holds D (1).

このように、本実施形態では撮像部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 imaging unit 101 to the FIFO 105-2 and the second pointer used when writing data from the FIFO 105-2 to the external memory are monitored. In order to determine whether the position pointed to by the first pointer exceeds the position pointed to by the second pointer, a difference in pointer position is calculated and compared with a threshold value. If the calculated difference is greater than or equal to the threshold value, there is room in processing, so that it is possible to continue the control of transferring the imaging data to the external memory and writing it directly. On the other hand, if the calculated difference is less than the threshold value, it is determined that the position pointed to by the first pointer may possibly overtake the position pointed to by the second pointer. In this case, the control of transferring the imaging data to the external memory and directly writing it is stopped, and the control of reading the imaging data already saved in the internal memory, transferring it to the external memory and writing it is performed. In other words, the mode switching criterion for changing the data transfer path is based on the result of comparing the difference amount between the positions indicated by the first pointer and the second pointer with the threshold value, and the mode switching is performed dynamically. become.

図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 CPU 104 determines whether or not to end the imaging operation. If the imaging operation is continued, the process returns to S304. Similarly, if the process moves from S307 to S308 and it is determined that the shooting operation is to be continued, the process returns to S304. If the process moves from S309 to S310 and it is determined that the photographing operation is to be continued, the process returns to S309. When it is determined in S306, S308, and S310 that the photographing operation has been completed, the series of processing illustrated in FIG. 3 ends.
As described above, dynamic switching control between the internal buffer mode and the card direct mode is performed until the data transfer to the external card 111 is completed while monitoring the first pointer and the second pointer.

第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 external card 111.
When the specified time elapses, the hardware timer 120 notifies the CPU 104 of the elapse of time via the timer interrupt signal line 121. The flow control signal line 122 of the DMA controller 105 transmits a signal to the image compression / decompression unit 103 to stop data input to the DMA controller 105 when detecting a state where all the data of the FIFO 105-2 is accumulated. In the case of the first embodiment, data input from the imaging unit 101 cannot be stopped halfway. On the other hand, in the case of the second embodiment, regarding the data input of the processing system that performs signal processing and image compression, if data reading from the DRAM 110 is interrupted, the processing can be stopped halfway.

次に図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 imaging unit 101 will be described. FIG. 7A is a schematic diagram for explaining the flow of processing, and shows four periods T1, T2, T3, and T4 divided in the time axis direction. Each period corresponds to the processing time per frame during continuous shooting. For example, assuming that 10 frames are continuously shot per second, the time lengths of the periods T1, T2, T3, and T4 are each 100 milliseconds. That is, 1000/10 = 100 milliseconds per frame. The imaging data, the development data, and the JPEG data in each period are distinguished by the numbers in the circles in the figure. In the specification, these are expressed as D (X). X is a natural number variable, and D (X) represents image data of the Xth frame. As imaging data, D (1) to D (4) are shown in periods T1 to T4, respectively. As development data, D (1) to D (3) are shown in periods T2 to T4, respectively, and as JPEG data, D (1) and D (2) are shown in periods T3 and T4, respectively.

期間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 DRAM 110 when attention is paid to the period T4 will be described with reference to FIG. FIG. 7B illustrates the arrangement of image data on the DRAM 110 in the period T4 within a rectangular frame. On the left side of the rectangular frame, the write pointers by the imaging unit 101 and the development processing unit in the signal processing unit 102 are shown, and on the right side of the rectangular frame, the read pointers by the development processing unit and the image compression / decompression unit 103 are shown.
In the period T4, the imaging data D (4) from the imaging unit 101 is written in the DRAM 110. As for the development data, the imaging data D (3) that has already completed the imaging process in the period T3 is read, and the development processing unit performs the development process of D (3) and writes it in the DRAM 110. For JPEG data, development data D (2) that has already undergone development processing in period T3 is read. The data D (2) is compressed by the image compression / decompression unit 103, transferred from the DMA controller 105 to the card controller 108 via the card direct path 113, and output to the external card 111.

このとき、撮像データ、現像データ、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 DRAM 110, which is the internal memory of the camera, is strictly guaranteed, the time required for the card direct processing of JPEG data must not exceed a predetermined time. This predetermined time is 1000 milliseconds in this example, and is hereinafter referred to as 1V processing time. In other words, when reading and writing of imaging data to the internal memory and reading and writing of development data are possible within 1V processing time, it is guaranteed that the time for transferring compressed data to the external memory does not exceed 1V processing time. There is a need to.

次に、図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 external card 111 is inserted into the card slot of the camera, the attribute of the card is checked. If it is determined in S701 that card direct processing is not possible, the process proceeds to S710, and the internal buffer mode is set. That is, the JPEG data output from the image compression / decompression unit 103 is temporarily stored in the DRAM 110 via the system bus 112 and the DRAM controller 107, read out, and stored in the external card 111. If it is determined in S711 that the shooting has ended, the process ends, but the internal buffer mode remains set while the imaging operation continues.

一方、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 external card 111 is completed before the process of the period T4 shown in FIG. Is determined. If the processing of data D (1) has not been completed, the process proceeds to S708. If the processing of data D (1) has been completed, the process proceeds to S704. In step S <b> 708, the internal buffer mode is set, and the JPEG data is once written to the DRAM 110 and then read and stored in the external card 111.

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 external card 111, retransmission processing is necessary, and the transfer rate to the external card 111 may be slow. For this reason, the JPEG data D (2) shown in FIG. 7B may not be stored in the external card 111 within the 1V processing time. Therefore, a timer monitoring function is used to detect that the data transfer rate of the external card 111 has become slower than the threshold rate. In other words, the hardware timer 120 is activated at the start of processing in the period T4, and for example, when 500 milliseconds have elapsed, the CPU 104 is interrupted, and the CPU 104 measures the amount of JPEG data written to the external card 111. Execute the process to check. The time threshold value 500 milliseconds set here is a half of the time when the 1V processing time is 1000 milliseconds. For example, the progress of the read process is checked by monitoring the read address of the development data (see D (2) in FIG. 7B) for generating JPEG data. Whether the write processing to the external card 111 is performed without any problem or the write processing is delayed by comparing the measured amount of data with the planned data amount (threshold) to be processed within the time threshold Can be judged. In S705, it is determined whether or not a timer interrupt has occurred. If a timer interrupt occurs after 500 milliseconds have elapsed, the process proceeds to S706. In S706, a check is made as to whether or not the writing process of JPEG data to the external card 111 is proceeding without any problem. Here, if the output amount of JPEG data is less than the specified value, that is, the writing speed to the external card 111 is slow, and if it is determined that the card direct processing will not be in time for the end of the 1V processing time, S708 is performed. Move on. In step S708, the internal buffer mode is set, and JPEG data writing processing is guaranteed. If the output amount of JPEG data is greater than or equal to the specified value in S706, the process proceeds to S707.

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 hardware timer 120 and measuring the progress of the processing data in the middle of the specified time. As a result, it is selected whether to continue the control of transferring the output data subjected to the data compression processing to the external memory and directly writing it, or to change the control to transfer the data stored in the internal memory and writing to the external memory.
The DMA controller 105 monitors the address pointer of the FIFO 105-2 when data from the imaging unit 101 is selected, and the CPU 104 monitors the processing time when data is from the image compression / decompression unit 103. In this way, the monitoring process can be appropriately switched according to the processing content.

104 CPU
105 DMAコントローラ
110 DRAM(第1の記憶媒体)
111 外付けカード(第2の記憶媒体)
104 CPU
105 DMA controller 110 DRAM (first storage medium)
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.
前記制御手段は、前記第2の記憶媒体へのデータ転送速度が閾値未満である場合、前記第1のモードを設定することを特徴とする請求項1に記載のデータ処理装置。   2. The data processing apparatus according to claim 1, wherein the control unit sets the first mode when a data transfer rate to the second storage medium is less than a threshold value. 前記制御手段は、前記入力手段から前記第2の記憶媒体に書き込まれるデータ量が閾値以上である場合、前記第2のモードに設定することを特徴とする請求項1に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the control unit sets the second mode when the amount of data written from the input unit to the second storage medium is equal to or greater than a threshold value. 前記制御手段は、前記第2のモードにおいて、前記入力手段から前記第2の記憶媒体へのデータの転送と並列に、前記入力手段から前記第1の記憶媒体へのデータの転送を行うことを特徴とする請求項1から3のいずれか1項に記載のデータ処理装置。   In the second mode, the control means performs data transfer from the input means to the first storage medium in parallel with data transfer from the input means to the second storage medium. The data processing device according to claim 1, wherein the data processing device is a data processing device. 前記制御手段は、前記入力手段により入力されたデータを蓄積する蓄積手段を有し、前記第2のモードにおいて、前記蓄積手段に蓄積されたデータのうち前記第2の記憶媒体に記憶されていないデータの量が閾値を超えた場合、前記第2のモードから前記第1のモードに変更することを特徴とする請求項4に記載のデータ処理装置。   The control means has storage means for storing data input by the input means, and is not stored in the second storage medium among the data stored in the storage means in the second mode. The data processing apparatus according to claim 4, wherein when the amount of data exceeds a threshold value, the second mode is changed to the first mode. 前記制御手段は、前記第2のモードから前記第1のモードに変更した後、前記第1の記憶媒体に記憶されたデータのうち、前記第2の記憶媒体に記憶されていないデータから前記第2の記憶媒体への転送を開始することを特徴とする請求項5に記載のデータ処理装置。   The control means changes the second mode to the first mode, and then, among the data stored in the first storage medium, the control means starts from the data not stored in the second storage medium. 6. The data processing apparatus according to claim 5, wherein transfer to the second storage medium is started. 前記制御手段は、前記第2のモードにおいて、前記第1の記憶媒体に記憶されたデータと同じデータが前記第2の記憶媒体に記憶されたことに応じて、前記第1の記憶媒体のうち前記同じデータが記憶されていた領域にデータを書き込むことを特徴とする請求項4に記載のデータ処理装置。   In the second mode, the control means is responsive to the same data stored in the first storage medium as being stored in the second storage medium. The data processing apparatus according to claim 4, wherein data is written in an area where the same data is stored. 前記入力手段は、複数のデータから1つのデータを選択して入力することを特徴とする請求項1に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the input unit selects and inputs one data from a plurality of data. 前記入力手段は撮像手段を含むことを特徴とする請求項1に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the input unit includes an imaging unit. 処理されたデータを一時的に記憶する第1の記憶媒体と、前記データおよび前記第1の記憶媒体から転送されるデータを記憶する第2の記憶媒体に対してデータ転送を制御するデータ処理装置にて実行される制御方法であって、
前記データを前記第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.
JP2013043093A 2013-03-05 2013-03-05 Data processor and method for controlling the same Pending JP2014170476A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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