JP2010020576A - Recording control device - Google Patents
Recording control device Download PDFInfo
- Publication number
- JP2010020576A JP2010020576A JP2008180916A JP2008180916A JP2010020576A JP 2010020576 A JP2010020576 A JP 2010020576A JP 2008180916 A JP2008180916 A JP 2008180916A JP 2008180916 A JP2008180916 A JP 2008180916A JP 2010020576 A JP2010020576 A JP 2010020576A
- Authority
- JP
- Japan
- Prior art keywords
- data
- read
- data management
- storage area
- write
- 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.)
- Granted
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Television Signal Processing For Recording (AREA)
- Studio Devices (AREA)
Abstract
Description
本発明は、ライトワンス型の記憶媒体にデータを記録する記録制御装置に関する。 The present invention relates to a recording control apparatus for recording data on a write-once storage medium.
従来、メモリーカードやメモリスティック等の記憶媒体を装着可能なデジタルカメラ等の機器が普及している。このような記憶媒体の種類には、書き換え可能な記憶媒体、1度だけ書き込み可能なライトワンス型記憶媒体等がある。尚、下記の特許文献1及び特許文献2には、ライトワンス型の記憶媒体のファイル管理技術が開示されている。
ところで、上述のメモリーカード等の記憶媒体は、FAT(File Allocation Tables)ファイルシステムを適用してフォーマットされていることが多い。このFATファイルシステムは、クラスタ単位の各データ記憶領域に対応するFATエントリで構成されたFATと呼ばれるファイル管理情報により、データ記憶領域に記録されるファイルの管理を行うものである。ファイルデータが記憶されている各クラスタのFATエントリには、ファイルデータの読み出し順序として、そのクラスタの次に読み出すクラスタ番号が記録され、読み出し順序が最後となるクラスタのFATエントリには終端記号が記録される。このようなFATファイルシステムが適用されたメモリーカード等の記憶媒体に、PCやデジタルカメラ等のホスト機器からデータを記録する場合、ホスト機器は、記録するファイルのデータを内蔵メモリに一時記憶し、内蔵メモリのデータを記憶媒体に記録する毎に、FATを参照してクラスタを確保し、確保したクラスタのFATエントリに読み出し順序と終端記号を記録し、対応するクラスタにデータを記録する。従って、例えば、記録中にファイルサイズが予測できない動画等のコンテンツを記録する場合には、1つのファイルデータを複数回に分けて記録することになり、記録する毎に、当該ファイルデータに対するFATエントリの終端記号が、その時点での書き込み済みデータの最終端のクラスタに対応するFATエントリに設定されるようFATエントリを書き換えて更新していく必要がある。また、1つのファイルデータを記録中に他の処理を割り込み可能とすること等を考慮し、1つのファイルデータを複数回に分けて記録する場合も、上記と同様に、記録毎に終端記号を書き換えて更新する必要がある。 By the way, the storage medium such as the above-mentioned memory card is often formatted by applying a FAT (File Allocation Tables) file system. This FAT file system manages files recorded in a data storage area by using file management information called FAT configured with FAT entries corresponding to each data storage area in cluster units. In the FAT entry of each cluster in which file data is stored, the cluster number to be read next to the cluster is recorded as the reading order of the file data, and the terminal symbol is recorded in the FAT entry of the cluster having the last reading order. Is done. When recording data from a host device such as a PC or digital camera on a storage medium such as a memory card to which such a FAT file system is applied, the host device temporarily stores the data of the file to be recorded in the built-in memory, Each time the data in the built-in memory is recorded in the storage medium, the cluster is secured by referring to the FAT, the reading order and the terminal symbol are recorded in the FAT entry of the secured cluster, and the data is recorded in the corresponding cluster. Therefore, for example, when recording a content such as a movie whose file size cannot be predicted during recording, one file data is recorded in a plurality of times. Each time recording is performed, a FAT entry for the file data is recorded. It is necessary to rewrite and update the FAT entry so that the terminal symbol is set to the FAT entry corresponding to the last cluster of the written data at that time. In addition, considering that it is possible to interrupt other processing while recording one file data, etc., when recording one file data divided into a plurality of times, a terminal symbol is recorded for each recording as described above. It needs to be rewritten and updated.
しかしながら、ライトワンス型の記憶媒体に、内蔵メモリの容量より大きい動画等のファイルデータを記録する場合、内蔵メモリに格納されたファイルデータの記録毎に読み出し順序と終端記号をFATエントリに記録してしまうと、FATエントリに記録した終端記号を書き換えることができないため、1つのファイルデータを複数回に分けて記録することができない。 However, when recording file data such as a moving image larger than the capacity of the built-in memory on the write-once storage medium, the reading order and the terminal symbol are recorded in the FAT entry for each recording of the file data stored in the built-in memory. In this case, the terminal symbol recorded in the FAT entry cannot be rewritten, and thus one file data cannot be recorded in a plurality of times.
本発明は、ライトワンス型の記憶媒体にファイルデータを複数回に分けて記録しうる記録制御装置を提供することを目的とする。 An object of the present invention is to provide a recording control apparatus capable of recording file data on a write-once type storage medium in a plurality of times.
本発明の記録制御装置は、所定サイズ単位に管理されたデータ記憶領域にファイルのデータを記憶し、前記データ記憶領域の各々に対応するデータ管理領域に当該データ記憶領域に記憶される前記データの読み出し順序又は読み出し終了を示すリンク情報を記憶するライトワンス型の記憶媒体に、データを記録する記録制御装置であって、前記データを一時的に記憶するメモリと、前記メモリに記憶された前記データを所定単位で逐次読み出し、読み出した前記所定単位の前記データを前記記憶媒体に逐次記録する際、前記データ管理領域において、読み出した前記所定単位の前記データのサイズに応じた数の連続する前記データ管理領域と、当該連続するデータ管理領域に続く次の前記データ管理領域の確保を行い、確保した前記データ管理領域のうち最後尾以外の前記各データ管理領域において、当該データ管理領域に続く次の前記データ管理領域を示す情報を前記読み出し順序として書き込むリンク情報書き込み処理を行い、当該データ管理領域に対応する前記データ記憶領域に読み出した前記所定単位の前記データを書き込むよう制御する書き込み制御部とを備える。 The recording control apparatus of the present invention stores file data in a data storage area managed in units of a predetermined size, and stores the data stored in the data storage area in a data management area corresponding to each of the data storage areas. A recording control apparatus for recording data on a write-once storage medium that stores link information indicating a reading order or reading completion, the memory temporarily storing the data, and the data stored in the memory Is sequentially read in a predetermined unit, and when the read data in the predetermined unit is sequentially recorded in the storage medium, the number of the continuous data corresponding to the size of the read data in the predetermined unit in the data management area The management area and the next data management area following the continuous data management area are secured, and the secured data management area In each data management area other than the last of the areas, link information writing processing is performed to write information indicating the next data management area following the data management area as the read order, and the data management area corresponding to the data management area A write control unit that controls to write the data of the predetermined unit read into the data storage area.
本発明によれば、ライトワンス型の記憶媒体にファイルデータを複数回に分けて記録することができる。 According to the present invention, file data can be recorded in a plurality of times on a write-once storage medium.
以下、本発明の実施形態に係る記録制御装置を含むカメラについて説明する。本実施形態では、カメラにおいて、1フレームの静止画ファイルを複数回に分けてメモリーカードに記録する処理について説明する。 Hereinafter, a camera including a recording control apparatus according to an embodiment of the present invention will be described. In the present embodiment, a process of recording a still image file of one frame on a memory card in a plurality of times in the camera will be described.
図1は、本実施形態のカメラの構成を示すブロック図である。同図に示す様に、カメラ1は、撮影レンズ11、CCD12、CCDドライバ13、プリプロセス回路14、A/D変換回路15、ASIC(Application Specific Integrated Circuit)16、メモリ17、カラーモニタ18、操作部19、メモリーカードI/F20、外部I/F21、及びCPU10を備えて構成されている。
FIG. 1 is a block diagram showing the configuration of the camera of this embodiment. As shown in the figure, the
CCD12は、撮影レンズ11を介した被写体光を撮像して被写体の明るさに応じた電荷を蓄積し、CCDドライバ13の制御の下、蓄積した電荷のアナログ信号をプリプロセス回路14に出力する。プリプロセス回路14は、CCD12から出力されたアナログ信号を増幅し、雑音除去や黒レベル調整等のアナログ処理を行い、A/D変換回路15は、プリプロセス回路14でアナログ処理されたアナログ信号をデジタル信号に変換する。また、ASIC16は、A/D変換回路15によって変換されたデジタル信号に対して輪郭補償やガンマ補正等の画像処理を行い、Exif(Exchangeable Image File Format)規格に従って、画像データの撮影日時、シャッタースピード、圧縮情報等を含むヘッダ情報データと、画像データの画像処理後の画像データを所定サイズに縮小したサムネイル画像データを生成し、ヘッダ情報データとサムネイル画像データと画像処理後の画像データ(以下、「主画像データ」と言う。)をJPEG等の方式で圧縮して画像ファイルを生成する。
The
メモリ17は、DRAM(Dynamic Random Access Memory)で構成され、CPU10がプログラムを実行する際に用いられるワーク用メモリであり、画像処理後の画像データ等を一時的に記憶する。カラーモニタ18は、液晶ディスプレイで構成され、画像やカメラの設定情報等を表示する。操作部19は、電源スイッチ、レリーズボタン等の操作ボタンを含んで構成されており、ユーザ操作を受付ける。
The
メモリーカードI/F20は、着脱可能なメモリーカード30との接続インタフェースであり、装着されたメモリーカードとカメラ1との間のリード/ライトコマンドやデータ等の送受信を中継する。外部I/F21は、PC等の機器を接続するUSB等の接続インタフェースであり、接続された機器とカメラ1との間の通信を中継する。
The memory card I /
メモリーカード30は、ライトワンス型のメモリーカードであり、データを記憶するフラッシュメモリと、メモリーカードI/F20を介してカメラ1から送信されるリード/ライトコマンドに応じて、データ書き込み又は読み出しの制御を行うメモリコントローラ、データ書き込み単位情報やライトワンス型媒体であることを示す情報等のカード属性情報を記憶するレジスタを含んで構成されており、FATファイルシステムを適用してフォーマットされている。尚、メモリーカード30は、カメラ1からコマンドを受信した際にコマンドレスポンスをカメラ1に送信し、データを書き込む毎にデータレスポンスをカメラ1に送信する。また、本実施形態のメモリーカード30のデータ書き込み単位は3クラスタ単位であるものとする。
The
CPU10は、図示しないROMに記憶されたプログラムを実行することによりカメラ1を構成する各部を制御する。また、メモリーカード30のFATファイルシステムを用いて、メモリ17から読み出した画像ファイルをDCF規格に従ってメモリーカード30に書き込むライトコマンドの発行、又は、メモリーカード30に記憶されている画像ファイルを読み出すリードコマンドの発行を行い、メモリーカード30との間でデータ転送を行う。尚、メモリ17に記憶された画像ファイルの画像データをメモリーカード30へ書き込む際は、複数回に分けて読み出し、読み出す毎にライトコマンドを発行する。
CPU10 controls each part which comprises the
図2は、上述したFATファイルシステムの構成図である。FATファイルシステムは、BPB(BIOS Parameter Block)210、FAT(File Allocation Table)220、ROOT230を含むファイル管理領域と、複数セクタを含むクラスタ単位に管理されているデータ記憶領域240で構成されている。BPB210は、1クラスタに含まれるセクタ数、1セクタのバイト数、ルートディレクトリのサイズ、FAT16やFAT32のFATタイプ等の情報が記憶されている。
FIG. 2 is a configuration diagram of the FAT file system described above. The FAT file system includes a file management area including a BPB (BIOS Parameter Block) 210, a FAT (File Allocation Table) 220, and a
ROOT230は、ルートディレクトリのフォルダ名とルートディレクトリ直下のサブディレクトリを記憶するクラスタのクラスタ番号が記憶されている。FAT220の各FATエントリ221は、データ記憶領域240の各クラスタと対応しており、クラスタ番号の順に並んでいる。例えば、クラスタ2に対応するのはFATエントリ222であり、クラスタ3に対応するのはFATエントリ223である。また、各FATエントリ221は、そのクラスタの次に読み出すべきクラスタ番号を読み出し順序として記憶する。
The
データ記憶領域240は、クラスタ番号“2”の先頭クラスタから順にクラスタ番号が付与された複数のクラスタで構成され、各クラスタはJPEGデータやRAWデータ等のファイルデータを記憶する。
The
次に、カメラ1の動作について、図3のフローチャートを用いて説明する。図3は、ライトワンス型の記憶媒体に画像ファイルを記録する処理のフローチャートである。CPU10は、ユーザにより操作部19を用いて電源がONに設定されると(ステップS11)、メモリーカードI/F20にメモリーカード30が装着されているか否か判断する(ステップS12)。
Next, the operation of the
CPU10は、メモリーカードI/F20にメモリーカード30が装着されていないと判断した場合には(ステップS12:N)、処理を終了し、メモリーカード30が装着されていると判断した場合には(ステップS12:Y)、メモリーカード30からカード属性情報とFATファイルシステムを取得してメモリ17に記憶する(ステップS13)。
When the
CPU10は、操作部19のレリーズボタンがユーザにより全押しされたときに(ステップS14:Y)、被写体光を撮像してCCD12から出力した撮像信号に基づく画像データを生成してメモリ17に出力する(ステップS15)。そして、ASIC16により、メモリ17に記憶された画像データに画像処理を行い、サムネイル画像データを生成し、主画像データとサムネイル画像データをJPEG方式で圧縮する (ステップS16)。CPU10は、1フレームのヘッダ情報と圧縮されたサムネイル画像データ及び主画像データを含む画像データをメモリ17に記憶し(ステップS17)、メモリ17に記憶した1フレームの画像データをメモリーカード30に記録する処理を行う(ステップS18)。
When the release button of the
図4は、ステップS18の記録処理のフローチャートである。尚、メモリーカード30の書き込み単位はメモリ17の記憶容量より小さく、1フレームの画像データを複数回に分けてメモリーカード30に記録するものとする。
FIG. 4 is a flowchart of the recording process in step S18. The writing unit of the
CPU10は、ステップS13において取得したカード属性情報によりメモリーカード30がライトワンス型媒体であることを認識すると共に、カード属性情報の書き込み単位を参照し、書き込み単位3クラスタ分の画像データをメモリ17から読み出す(ステップS201)。ここで、図5及び図6は、メモリーカード30に画像ファイルを記録する前から画像ファイルのデータを4回に分けて記録するまでのFATファイルシステムの例を示している。以下、図5及び図6を適宜参照しながら図4の各ステップを説明する。
The
図5(A)は、ステップS201において読み出したFATファイルシステムを示している。同図に示すように、ROOT230にはルートディレクトリとしてDCF規格に従って生成された“DCIM”フォルダが記憶され、DCIM直下のサブディレクトリを記憶するクラスタ“2”が記憶されている。また、DCIM直下のサブディレクトリを記憶するクラスタ2のデータ記憶領域241には、DCF規格に従って生成されたサブディレクトリ“100NIKON”と、100NIKONに格納する画像ファイルのファイル情報を記憶するディレクトリエントリ領域としてクラスタ番号“3”が記憶されており、クラスタ2とクラスタ3のFATエントリ220a、220bには、終端記号“E”が記憶されている。尚、本実施形態では、メモリ17から読み出した画像ファイルは、サブディレクトリ“100NIKON”直下に記録するものとし、その画像ファイルのファイル名とファイルが記憶されている開始クラスタとを含むファイル情報は、ディレクトリエントリ領域であるクラスタ3のデータ記憶領域242に記録する。
FIG. 5A shows the FAT file system read in step S201. As shown in the figure, the
CPU10は、図5(A)のFAT220を参照し、書き込み単位数の3クラスタに1を加算した4クラスタ分のクラスタ4〜7を確保し、確保したクラスタ4〜6に読み出した3クラスタ分の画像データを順次割り当て、クラスタ7を除くクラスタ4〜6の各FATエントリに次のクラスタ番号を示す読み出し順序を設定する(ステップS202)。尚、FAT上でクラスタを確保する際、読み出し順序又は終端記号が記憶されていない連続するFATエントリのクラスタを確保するものとする。
The
CPU10は、確保した最後尾のクラスタ7を除くクラスタ4〜6のFATエントリに読み出し順序を書き込み、クラスタ4〜6の各データ記憶領域にステップS201で読み出した画像データを書き込むライトコマンドを発行し、読み出した画像データをメモリーカード30に対して送信する(ステップS203)。
The
メモリーカード30は、メモリーカードI/F20を介してライトコマンドと画像データを受信するとコマンドレスポンスをカメラ1に送信し、受信したライトコマンドに従って各FATエントリに読み出し順序の書き込みを行い、クラスタ4のデータ記憶領域の先頭セクタから順に画像データの書き込みを行い、メモリーカードI/F20を介してデータレスポンスを送信する(ステップS204)。
When the
図5(B)は、メモリ17から1回目の画像データの読み出しを行い(ステップS201)、上記ステップS202〜204の処理を行った後のメモリーカード30のFATファイルシステムを示している。同図に示すように、確保した最後尾のクラスタ7のFATエントリ220dを除く、クラスタ4〜6の各FATエントリ220cには、次のクラスタ番号を示す読み出し順序“5、6、7”が記録され、クラスタ4〜6のデータ記憶領域243には画像ファイルのヘッダ情報、サムネイル画像データ、画像ファイルの主画像データの一部が記録される。尚、1回目のデータの読み出しによりクラスタ7のデータ記憶領域243’は確保するが、この時点ではデータが記録されない。
FIG. 5B shows the FAT file system of the
CPU10は、メモリ17内の画像データの読み出しを終了するまで(ステップS205:N)、ステップS201以下の処理を繰り返し行い、画像データの読み出し毎に、FA220において、書き込み単位数に1を加算した4クラスタ分のクラスタを確保して、確保したクラスタのFATエントリの書き込みを行い、書き込み単位3クラスタ分の主画像データを書き込む。
The
図5(C)は、図5(B)に続いて2回目の画像データの読み出しを行い、FATエントリとデータ記憶領域への画像データの書き込みを行った後のFATファイルシステムを示している。同図に示すように、2回目の画像データの読み出しにより、クラスタ7〜10が確保され、確保した最後尾のクラスタ10のFATエントリ220fを除くFATエントリ220d、220eに対する読み出し順序が記録され、クラスタ10のデータ記憶領域244’を除くクラスタ7〜9のデータ記憶領域244に主画像データが記録される。
FIG. 5C shows the FAT file system after the image data is read for the second time following FIG. 5B and the image data is written to the FAT entry and the data storage area. As shown in the figure,
図6(A)は、図5(C)に続いて3回目の画像データの読み出しを行い、FATエントリとデータ記憶領域への画像データの書き込みを行った後のFATファイルシステムを示している。同図に示すように、3回目の画像データの読み出しにより、クラスタ10〜13が確保され、確保した最後尾のクラスタ13のFATエントリ220hを除くFATエントリ220f、220gに対する読み出し順序が記録され、クラスタ13のデータ記憶領域245’を除くクラスタ10〜12のデータ記憶領域245に主画像データが記録される。
FIG. 6A shows the FAT file system after the image data is read for the third time following FIG. 5C and the image data is written to the FAT entry and the data storage area. As shown in the figure,
図6(B)は、図6(A)に続いて4回目の画像データの読み出しを行い、4回目の画像データの読み出しによりクラスタ13〜16が確保され、確保した最後尾のクラスタ16のFATエントリ220jを除くFATエントリ220h、220iに読み出し順序が記録され、クラスタ16のデータ記憶領域246’を除くクラスタ13〜15のデータ記憶領域246に主画像データが記録される。
In FIG. 6B, the image data is read for the fourth time following FIG. 6A, and the
図4に戻り、CPU10は、メモリ17から画像ファイルの画像データの読み出しを終了するとき(ステップS205:Y)、最後に確保した最後尾のクラスタ16のFATエントリに終端記号を書き込み、クラスタ3のデータ記憶領域に、ファイル情報として画像ファイル名“DSC_0001.JPG”と画像ファイルの開始クラスタ番号“4”を書き込むライトコマンドを発行する(ステップS206)。メモリーカード30は、ステップS206で発行されたライトコマンドをメモリーカードI/F20を介して受信し、メモリーカードI/F20を介してコマンドレスポンスを送信し、受信したライトコマンドに従って、クラスタ16のFATエントリに終端記号を書き込み、クラスタ3のデータ記憶領域にファイル名“DSC_0001.JPG”と開始クラスタ番号“4”のファイル情報を書き込み、メモリーカードI/F20を介してデータレスポンスを送信する(ステップS207)。
Returning to FIG. 4, when the
図6(C)は、図6(B)の後、メモリ17からの画像データの読み出しを終了してステップS206〜207の終了処理を行った後のFATファイルシステムを示している。同図に示すように、最後尾のクラスタ16のFATエントリ220jには終端記号“E”が記録され、クラスタ3のデータ記憶領域242には画像ファイル名“DSC_0001.JPG”と開始クラスタ番号“4”のファイル情報が記録される。
FIG. 6C shows the FAT file system after the end of the reading of image data from the
上述した実施形態は、所定サイズのデータをメモリから読み出す毎に、読み出した所定サイズのデータを書き込むのに必要なクラスタ数より1つ余分にクラスタを確保し、1ファイルの書き込みが終了するまで、データの読み出し毎に余分に確保したクラスタのFATエントリには何も書き込まない。そのため、データの書き込みを終了するまで連続して書き込むことができ、1ファイルのデータを複数回に分けて書き込むことができる。 In the above-described embodiment, every time data of a predetermined size is read from the memory, one extra cluster is secured from the number of clusters necessary for writing the read data of the predetermined size, and writing of one file is completed. Nothing is written in the FAT entry of the cluster reserved for each data read. Therefore, data can be written continuously until data writing is completed, and data of one file can be written in a plurality of times.
また、上述した実施形態では、データの書き込み処理を終了する際に確保した最後尾のクラスタのFATエントリには終端記号が記録されるが、そのクラスタのデータ記憶領域にはデータが記録されない状態で書き込み処理を終了するため、そのクラスタのデータ記憶領域は無駄になる。しかしながら、1ファイルの記録途中におけるFATエントリとデータ記憶領域は、データの記憶状態が一致するよう保たれているので、例えば、記録途中でメモリーカードが抜かれる等の割り込み処理が発生した場合であっても、ファイルシステム上で不整合が生じることがない。 In the above-described embodiment, the terminal symbol is recorded in the FAT entry of the last cluster secured when the data writing process is completed, but no data is recorded in the data storage area of the cluster. Since the writing process is completed, the data storage area of the cluster is wasted. However, since the FAT entry and the data storage area in the middle of recording one file are kept so that the data storage states coincide with each other, for example, an interrupt process such as a memory card being removed during recording occurs. However, there is no inconsistency on the file system.
次に、上述した実施形態の第1の変形例について説明する。上述した実施形態では、メモリーカード30に画像データを書き込み中に書き込みエラーが発生しない場合について説明したが、本変形例では、メモリーカード30において書き込みエラーが発生した場合のエラー処理について説明する。尚、本変形例に係るカメラの構成は、上述した実施形態に係るカメラと同じであり、実施形態と同じ符号を用いて説明する。また、本変形例では、メモリーカード30において書き込みエラーが発生した際に、メモリーカード30から書き込みエラー発生通知がカメラ1に送信されるものとする。
Next, a first modification of the above-described embodiment will be described. In the above-described embodiment, the case where a writing error does not occur while image data is being written to the
図7は、本変形例に係るカメラ1の動作を示すフローチャートである。図7のステップS301〜304は、メモリーカード30に画像データを書き込む前の各処理を示す図4のステップS201〜204と同じであり、図7のステップS306〜308は、書き込みエラーが発生しない場合の画像データの書き込み処理を示す図4のステップS205〜207と同じであるため、ステップS301〜304及びステップS306〜308の詳細な説明は省略する。また、図8及び図9は、本変形例におけるメモリーカード30のFATファイルシステムの例を示しており、以下、各図を適宜参照しながら本変形例の動作を説明する。
FIG. 7 is a flowchart showing the operation of the
図8(A)は、画像データを記録する前のFATファイルシステムを示しており、クラスタ4のFATエントリ224には読み出し順序又は終端記号が記憶されていないが、クラスタ4のデータ記憶領域343にはデータが記憶されており、ファイルシステム上、不整合が生じている状態である。
FIG. 8A shows the FAT file system before recording image data. The
図8(B)は、CPU10が、メモリ17から書き込み単位3クラスタ分の画像データを読み出し(ステップS301)、図8(A)のFAT220を参照してクラスタ4〜7を確保し、読み出した画像データを確保したクラスタ4〜6のデータ記憶領域に書き込むライトコマンドを発行した際のFATファイルシステムを示している。同図に示すように、メモリーカード30において、確保した最後尾のクラスタ7を除くFATエントリ224〜226には読み出し順序を記録し(ステップS301〜304)、クラスタ4のデータ記憶領域343の先頭セクタから画像データを書き込む際、既にクラスタ4のデータ記憶領域343にデータが記録されていることにより書き込みエラーが発生する。
In FIG. 8B, the
図7に戻り、CPU10は、メモリーカード30から書き込みエラー発生通知のレスポンスを受信した場合(ステップS305:Y)、メモリ17から書き込み単位3クラスタ分の画像データの再読み出しを行い(ステップS301)、図8(B)のFAT220を参照して、書き込みエラー発生直前に確保した最後尾のクラスタ7以後のクラスタから、書き込み単位数に1を加算した4クラスタ分のクラスタを再確保する(ステップS302)。そして、メモリーカード30において、再確保したクラスタのFATエントリ及びデータ記憶領域にデータを記録する(ステップS303、S304)。
Returning to FIG. 7, when the
図9(A)は、エラーが発生した後に上述したステップS301〜S304の処理を行った後のFATファイルシステムである。同図に示すように、エラー発生前に確保した最後尾のクラスタ7を含むクラスタ7〜10が再度確保され、クラスタ10のFATエントリ230を除く、クラスタ7〜9のFATエントリ227〜229に読み出し順序“8〜10”が記録され、クラスタ7〜9のデータ記憶領域346に再度読み出された画像データが再書き込みされる。
FIG. 9A shows the FAT file system after performing the above-described steps S301 to S304 after an error has occurred. As shown in the figure, the
図7に戻り、CPU10は、画像ファイルの画像データの読み出しを終了する際、即ち、画像ファイルの書き込みを終了する際に(ステップS306:Y)、確保した最後尾のクラスタに終端記号を書き込み、ディレクトリエントリ領域にファイル情報の書き込みを行う(ステップS307、S308)。図9(B)は、画像データの読み出しを終了して画像ファイルの書き込みを終了したときのFATファイルシステムを示している。同図に示すように、最後尾のクラスタ10のFATエントリ230に終端記号“E”が記録され、ファイル情報として画像ファイル名“DSC_0001.JPG”と再書き込みを開始したクラスタ番号“7”がクラスタ3のデータ記憶領域342に記録される。従って、エラー発生直前に確保したクラスタ5、6のデータ記憶領域345と、画像データの読み出し終了時に確保した最後尾のクラスタ10のデータ記憶領域346’にはデータが記録されていない状態となる。
Returning to FIG. 7, when the reading of the image data of the image file is finished, that is, when the writing of the image file is finished (step S <b> 306: Y), the
上述した第1の変形例では、データを読み出す毎に余分に確保される最後尾のクラスタのFATエントリには読み出し順序や終端記号が記録されないため、書き込みエラーが発生した場合のエラー処理として、エラー発生直前に確保していた最後尾のクラスタから再書き込みを開始することができる。そのため、書き込みエラーや割り込み処理等が発生した場合でも、ファイルシステムにおいて不整合を生じさせることなく、データの読み出し毎に余分に確保されるクラスタの領域を無駄にすることなく利用することができる。また、画像ファイル名と開始クラスタのファイル情報を画像ファイルの書き込みを終了するときに書き込むことで、書き込みエラー発生後の再書き込み時において、書き込みエラー発生前と同じファイル名を設定することができる。 In the first modification described above, since the reading order and the terminal symbol are not recorded in the FAT entry of the last cluster that is reserved extra each time data is read, error handling is performed when a write error occurs. Rewriting can be started from the last cluster reserved immediately before the occurrence. Therefore, even when a write error or an interrupt process occurs, it is possible to use a cluster area that is reserved extra for each data read without causing inconsistency in the file system and without wasting it. Further, by writing the image file name and the file information of the start cluster when the writing of the image file is finished, the same file name as before the writing error can be set at the time of rewriting after the writing error occurs.
次に、実施形態の第2の変形例について説明する。本変形例は、メモリーカード30において書き込みエラーが発生した場合に第1の変形例とは異なるエラー処理を行う。尚、本変形例に係るカメラは、実施形態のカメラの構成と同じであり、実施形態と同じ符号を用いて説明する。また、本変形例では、メモリーカード30において書き込みエラーが発生した場合に、書き込みエラーが発生したエラークラスタの番号を含む書き込みエラー発生通知をメモリーカード30からカメラ1に送信するものとする。
Next, a second modification of the embodiment will be described. In this modification, when a write error occurs in the
図10は、本変形例に係るカメラ1の動作を示すフローチャートである。尚、ステップS401〜404は、メモリーカード30において書き込みエラーが発生するまでの処理を示す図4のステップS201〜204と同じであり、ステップS408〜410は、書き込みエラーが発生しない場合の画像データの書き込み処理を示す図4のステップS205〜207と同じであるため、ステップS401〜404及びステップS408〜410の詳細な説明は省略する。
FIG. 10 is a flowchart showing the operation of the
上述した第1の変形例と同様、メモリーカード30において、CPU10が発行したライトコマンドで指定されたクラスタのデータ記憶領域に画像データを書き込む際、既に当該クラスタのデータ記憶領域にデータが記憶されていることにより書き込みエラーが発生し、CPU10は、メモリーカード30から書き込みエラー発生通知を受信したものとする(ステップS405:Y)。
As in the first modification described above, in the
その場合、本変形例に係るCPU10は、メモリ17から画像データを再度読み出し(ステップS406)、FAT上で、エラークラスタに後続するクラスタの中から書き込み単位数に1を加算した4クラスタ分のクラスタを再確保し(ステップS407)、ステップS403以下の処理を行う。
In that case, the
図11は、本変形例におけるメモリーカード30のFATファイルシステムの例を示しており、第1の変形例において説明した図8と同様、FAT上でクラスタ4〜7が確保され、メモリーカード30において、クラスタ4のデータ記憶領域443で書き込みエラーが発生しているものとする。以下、上述した本変形例に係るエラー処理の各ステップと併せて各図を説明する。
FIG. 11 shows an example of the FAT file system of the
図11(A)は、メモリーカード30からエラークラスタ番号“4”を含む書き込みエラー発生通知が送信された時のFATファイルシステムを示している。同図に示すように、FAT上でクラスタ4〜7が確保されて、クラスタ4〜6のFATエントリ224〜226に読み出し順序が記録されている。
FIG. 11A shows the FAT file system when a write error occurrence notification including the error cluster number “4” is transmitted from the
図11(B)は、クラスタ4のデータ記憶領域443において発生した書き込みエラーに対してエラー処理を行った後のFATファイルシステムを示している。同図に示すように、書き込みエラー発生通知後に再度読み出された3クラスタ分の画像データに対して、FAT上でエラークラスタ4に後続するクラスタ5〜8(FATエントリ225〜228)が再確保される(ステップS407)。そして、メモリーカード30において、クラスタ8のFATエントリ228を除くクラスタ5〜7のFATエントリ225〜227のうち、図11(A)において読み出し順序が記録されていなかったFATエントリ227に読み出し順序が記録され、クラスタ8のデータ記憶領域444’を除くクラスタ5〜7のデータ記憶領域444に再度読み出された3クラスタ分の画像データが再書き込みされる(ステップS403、S404)。
FIG. 11B shows the FAT file system after error processing is performed for a write error that has occurred in the
また、図11(C)は、図11(B)の後、メモリ17からの画像データの再読み出しを終了したときのFATファイルシステムを示している。同図に示すように、画像データの再読み出しの終了時に確保した最後尾のクラスタ8のFATエントリ228に終端記号“E”が記録され、画像ファイル名“DSC_0001.JPG”と再書き込みを開始したクラスタ番号“5”のファイル情報が、クラスタ3のデータ記憶領域442に記録される(ステップS408:Y、ステップS409、S410)。従って、実施形態と同様、最後に確保した最後尾のクラスタ8のデータ記憶領域444’のみデータが記録されない状態でファイルの書き込みを終了する。
FIG. 11C shows the FAT file system when the rereading of the image data from the
本変形例では、画像データをメモリーカード30に書き込み中、書き込みエラーが発生した場合に、エラークラスタに後続するクラスタの中からクラスタを再確保して画像データの再書き込みを開始することができる。そのため、書き込みエラーが、書き込み単位の最後のクラスタで発生する場合を除き、第1の変形例に比べて無駄になるクラスタ数を減らすことができる。
In this modification, when a write error occurs while writing image data to the
尚、上述した実施形態及び変形例では、記録制御装置としてカメラを用いて説明したが、ライトワンス型の記憶媒体を装着可能な携帯電話、PDA、PC等の情報機器であってもよい。 In the above-described embodiment and modification, the camera is used as the recording control device. However, the recording control device may be an information device such as a mobile phone, a PDA, or a PC that can be mounted with a write-once storage medium.
また、上述した実施形態及び変形例では、メモリーカードに記録するファイルデータとしてJPEG方式で圧縮した静止画像データを用いて説明したが、TIFF形式の画像データやRAW画像データであってもよいし、動画像データや音声データであってもよい。 In the above-described embodiment and modification, the description has been given using still image data compressed by the JPEG method as file data to be recorded on the memory card. However, TIFF image data or RAW image data may be used. It may be moving image data or audio data.
10・・・CPU、11・・・撮影レンズ、12・・・CCD、13・・・CCDドライバ、14・・・プリプロセス回路、15・・・A/D変換回路、16・・・ASIC、17・・・メモリ、18・・・カラーモニタ、19・・・操作部、20・・・メモリーカードI/F、21・・・外部I/F、30・・・メモリーカード
DESCRIPTION OF
Claims (4)
前記データを一時的に記憶するメモリと、
前記メモリに記憶された前記データを所定単位で逐次読み出し、読み出した前記所定単位の前記データを前記記憶媒体に逐次記録する際、前記データ管理領域において、読み出した前記所定単位の前記データのサイズに応じた数の連続する前記データ管理領域と、当該連続するデータ管理領域に続く次の前記データ管理領域の確保を行い、確保した前記データ管理領域のうち最後尾以外の前記各データ管理領域において、当該データ管理領域に続く次の前記データ管理領域を示す情報を前記読み出し順序として書き込むリンク情報書き込み処理を行い、当該データ管理領域に対応する前記データ記憶領域に読み出した前記所定単位の前記データを書き込むよう制御する書き込み制御部と
を備えることを特徴とする記録制御装置。 A link that stores data of a file in a data storage area managed in units of a predetermined size, and indicates a read order or a read end of the data stored in the data storage area in a data management area corresponding to each of the data storage areas A recording control apparatus for recording data on a write-once storage medium for storing information,
A memory for temporarily storing the data;
When the data stored in the memory is sequentially read in a predetermined unit and the read data in the predetermined unit is sequentially recorded in the storage medium, the size of the read data in the predetermined unit is set in the data management area. In accordance with the number of the data management areas corresponding to the number and the next data management area following the continuous data management area, in each of the data management areas other than the last of the data management areas secured, A link information writing process for writing information indicating the next data management area following the data management area as the reading order is performed, and the read data of the predetermined unit is written in the data storage area corresponding to the data management area A recording control device comprising: a writing control unit that controls the recording control unit.
前記書き込み制御部は、確保した前記データ管理領域に対応する前記データ記憶領域において、読み出した前記データの書き込み中に書き込みエラーが発生した時、前記メモリに記憶された前記データを前記所定単位に再度読み出し、前記書き込みエラー発生直前に確保した最後尾の前記データ管理領域以後の前記データ管理領域において、前記データ管理領域の確保を再度行い、再度確保した前記データ管理領域のうち最後尾以外の前記データ管理領域に対する前記リンク情報書き込み処理と、当該データ管理領域に対応する前記データ記憶領域に再度読み出した前記所定単位の前記データを書き込む再書き込み処理とを行い、前記メモリから再度読み出した前記所定単位の前記データの全ての前記再書き込み処理が終了したときに前記終了処理を行い、前記再書き込み処理を開始した前記データ記憶領域の情報を、前記ファイルの前記読み出し開始位置として所定の前記データ記憶領域に書き込むことを特徴とする請求項2記載の記録制御装置。 The storage medium stores a read start position of the file stored in the data storage area in a predetermined data storage area,
In the data storage area corresponding to the secured data management area, the write control unit re-uses the data stored in the memory in the predetermined unit when a write error occurs during the writing of the read data. In the data management area after the last data management area secured immediately before the read / write error occurs, the data management area is secured again, and the data other than the last in the data management area secured again The link information writing process for the management area, and the rewriting process for writing the data of the predetermined unit read again to the data storage area corresponding to the data management area, and the predetermined unit of the predetermined unit read again from the memory When the rewriting process of all the data is completed, It performs processing, the information of the data storage area was started rewriting process, the recording control apparatus according to claim 2, wherein writing to a given said data storage area as the reading start position of the file.
前記書き込み制御部は、確保した前記データ管理領域に対応する前記データ記憶領域において、読み出した前記データの書き込み中に書き込みエラーが発生した時、当該書き込みエラーが発生した前記データ記憶領域に後続する前記各データ記憶領域に対応する前記データ管理領域において、前記データ管理領域の確保を再度行い、再度確保した前記データ管理領域のうち最後尾以外の前記データ管理領域に対する前記リンク情報書き込み処理と、当該データ管理領域に対応する前記データ記憶領域に再度読み出した前記データを書き込む再書き込み処理とを行い、前記メモリから再度読み出した前記所定単位の前記データの全ての前記再書き込み処理が終了したときに前記終了処理を行い、前記再書き込み処理を開始した前記データ記憶領域の情報を、前記ファイルの前記読み出し開始位置として所定の前記データ記憶領域に書き込むことを特徴とする請求項2記載の記録制御装置。 The storage medium stores a read start position of the file stored in the data storage area in a predetermined data storage area,
In the data storage area corresponding to the secured data management area, when a write error occurs during the writing of the read data, the write control unit follows the data storage area in which the write error has occurred. In the data management area corresponding to each data storage area, the data management area is secured again, and the link information writing process for the data management area other than the last of the data management areas secured again, and the data A rewrite process for writing the data read again to the data storage area corresponding to the management area, and the completion when all the rewrite processes of the data in the predetermined unit read again from the memory are completed. And the data storage area that has started the rewrite process. The information recording control apparatus according to claim 2, wherein writing to a given said data storage area as the reading start position of the file.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008180916A JP5396760B2 (en) | 2008-07-11 | 2008-07-11 | Recording control apparatus and imaging apparatus |
US12/385,697 US20090322905A1 (en) | 2008-06-25 | 2009-04-16 | Storage control device |
US13/554,708 US20120284468A1 (en) | 2008-06-25 | 2012-07-20 | Storage control device |
US13/927,651 US20130290652A1 (en) | 2008-06-25 | 2013-06-26 | Storage control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008180916A JP5396760B2 (en) | 2008-07-11 | 2008-07-11 | Recording control apparatus and imaging apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010020576A true JP2010020576A (en) | 2010-01-28 |
JP5396760B2 JP5396760B2 (en) | 2014-01-22 |
Family
ID=41705396
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008180916A Expired - Fee Related JP5396760B2 (en) | 2008-06-25 | 2008-07-11 | Recording control apparatus and imaging apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5396760B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8855465B2 (en) | 2011-01-14 | 2014-10-07 | Canon Kabushiki Kaisha | Moving image recording apparatus, moving image recording method, and program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6258479A (en) * | 1985-05-02 | 1987-03-14 | Hitachi Ltd | Label writing method for file data |
JPH02110725A (en) * | 1988-10-20 | 1990-04-23 | Nec Corp | System for recovering file on unrewritable medium |
JPH02214924A (en) * | 1989-02-15 | 1990-08-27 | Hitachi Ltd | Information recording and reproducing system device therefor |
JPH0779403A (en) * | 1993-06-25 | 1995-03-20 | Nikon Corp | Electronic still camera |
JPH0922375A (en) * | 1995-07-06 | 1997-01-21 | Canon Inc | File management method |
-
2008
- 2008-07-11 JP JP2008180916A patent/JP5396760B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6258479A (en) * | 1985-05-02 | 1987-03-14 | Hitachi Ltd | Label writing method for file data |
JPH02110725A (en) * | 1988-10-20 | 1990-04-23 | Nec Corp | System for recovering file on unrewritable medium |
JPH02214924A (en) * | 1989-02-15 | 1990-08-27 | Hitachi Ltd | Information recording and reproducing system device therefor |
JPH0779403A (en) * | 1993-06-25 | 1995-03-20 | Nikon Corp | Electronic still camera |
JPH0922375A (en) * | 1995-07-06 | 1997-01-21 | Canon Inc | File management method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8855465B2 (en) | 2011-01-14 | 2014-10-07 | Canon Kabushiki Kaisha | Moving image recording apparatus, moving image recording method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP5396760B2 (en) | 2014-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20090115861A1 (en) | Recording apparatus | |
US20130290652A1 (en) | Storage control device | |
JP5396760B2 (en) | Recording control apparatus and imaging apparatus | |
JP2010009205A (en) | Recording control device | |
JP2006197561A (en) | Data recording method and device | |
JP2005236496A (en) | Image recording display system | |
JP2002135711A (en) | Electronic camera device and recording medium | |
JP4455177B2 (en) | Information recording apparatus and control method thereof | |
JP3831472B2 (en) | Electronic still camera erasing operation control device | |
JP3816401B2 (en) | Data recording device | |
JP2001111920A (en) | Image recorder and image recording method | |
JP2010009206A (en) | Recording control device | |
JP2008219425A (en) | Image processor and image processing method | |
JP5487758B2 (en) | camera | |
JP5109848B2 (en) | Recording control apparatus and imaging apparatus | |
JP2009171437A (en) | Multi-image file creating method and multi-image file editing method | |
JP3914411B2 (en) | Imaging recording device | |
JP3552247B2 (en) | Electronic still camera | |
JP2002125188A (en) | Digital camera | |
JP5158237B2 (en) | Electronic camera | |
JP5407405B2 (en) | camera | |
JP2014036432A (en) | Imaging apparatus | |
JP2022048837A (en) | Imaging apparatus | |
JP2010092268A (en) | Recording control device | |
JP6112972B2 (en) | Imaging device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110707 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120105 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130322 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130326 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130527 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130924 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131007 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5396760 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |