JP2004078704A - Image and sound record/playback device and file read/write method thereof - Google Patents

Image and sound record/playback device and file read/write method thereof Download PDF

Info

Publication number
JP2004078704A
JP2004078704A JP2002239978A JP2002239978A JP2004078704A JP 2004078704 A JP2004078704 A JP 2004078704A JP 2002239978 A JP2002239978 A JP 2002239978A JP 2002239978 A JP2002239978 A JP 2002239978A JP 2004078704 A JP2004078704 A JP 2004078704A
Authority
JP
Japan
Prior art keywords
file
cluster
fat
hard disk
disk drive
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
JP2002239978A
Other languages
Japanese (ja)
Inventor
Tsutomu Nikami
仁紙 勉
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2002239978A priority Critical patent/JP2004078704A/en
Publication of JP2004078704A publication Critical patent/JP2004078704A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve a continuous smooth moving image playback which reduces the number of seek occurrences when reading a large size file such as a moving image in an image and sound record/playback device which mounts a HDD (hard disc drive) and plays back image/sound data recorded in this HDD. <P>SOLUTION: Continuity of data in a file written in a disk is secured in units of a big cluster by managing the file such as the moving image data that is read/written to the hard disk drive in units of cluster by FAT file system and by reading/writing the file in units of the big cluster composed of two or more consecutive clusters. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、ハード・ディスク・ドライブを搭載し、外部より転送された映像および/または音声データをハード・ディスク・ドライブに記録し、任意のタイミングでその記録データを読み出して再生する映像音声記録再生装置とそのファイル読み書き方法に関する。
【0002】
【従来の技術】
ハード・ディスク・ドライブに対してファイルを読み書きするとき、どのファイルがどこに保存されているかを管理するためにファイルシステムが用いられる。
【0003】
ここではFAT(File Allocation Table)ファイルシステムについて取り上げる。FATファイルシステムでは、ディスクの1つのパーティションをクラスタと呼ばれる単位で管理し、各クラスタの状態やクラスタ間のリンクなどの情報をFATデータとしてFAT管理領域に記録し管理している。
【0004】
1クラスタのサイズはパーティションの容量とFATエントリのサイズによる制約内で決められる。仮に1クラスタのサイズを64セクタ(=32kバイト)とした場合を考える。
【0005】
この場合、データの連続性は32kバイトまでは保証されるが、32kバイトを超過する場合には次のデータを探すために、ヘッドがディスク上のトラックを横切る動きであるシークが発生する。このシークが発生すると、このシークに要する時間によってハード・ディスク・ドライブからのデータ出力が時間的に途切れる可能性がでてくる。
【0006】
【発明が解決しようとする課題】
再生するデータが時間的な制約を受けない性質のものであるならハード・ディスク・ドライブからのデータ出力の途切れはさほど問題となることはない。しかし、再生するデータが動画や音楽などの場合、データ出力の途切れがユーザに視覚的、聴覚的な不快感をもたらす。
【0007】
また、動画データのファイルサイズは数十メガバイト、数百メガバイトクラスであり、1クラスタのサイズ(32kバイト)と比べると非常に大きい。このため1ファイルの動画を読み書きするのに大量のFATデータの読み書きが発生し、効率が悪いという問題があった。
【0008】
また、FATファイルシステムでは、ディスクにおいてFAT管理領域の位置が固定されており、FATデータの読み書きとファイルの読み書きの切り替えのたびに発生するシークの影響で、やはり再生した動画に途切れが発生するおそれがあった。
【0009】
FATデータを読み書きする際のシークの発生をできるだけ抑えるために、FATデータをメモリにキャッシュする方法が通常採られているが、動画データのようなサイズの大きいファイルを読み書きする場合には、大量のFATデータに対してキャッシュ容量が不足し、結局は、ディスク上のFAT管理領域へのアクセスが発生していた。
【0010】
本発明はこのような課題を解決するためのもので、動画などのファイルサイズの大きいファイルを読み出す場合のシーク発生回数を低減して、途切れのないスムースな動画再生を実現し得る映像音声記録再生装置とそのファイル読み書き方法を提供することを目的とする。
【0011】
【課題を解決するための手段】
上記目的を達成するために、本発明の映像音声記録再生装置は、映像および/または音声のデータのファイルの読み書きが可能なハード・ディスク・ドライブと、このハード・ディスク・ドライブに対して読み書きされるファイルをFATファイルシステムによりクラスタを単位に管理するとともに、2以上の所定数の連続するクラスタであるビッグクラスタの単位で前記ファイルの読み書きを行うように制御する制御部と、前記ハード・ディスク・ドライブから読み出された映像および/または音声のデータを再生する再生部とを具備するものである。
【0012】
この発明によれば、ディスクに書き込まれるファイルのデータの連続性がN(Nは2以上の所定数)個の連続するクラスタであるビッグクラスタの単位で保証される。これにより動画などのサイズの大きいファイルを読み出す際のシークの発生頻度が低減し、再生時の動画の途切れが発生しにくくなるなど、スムースな動画再生が可能になる。
【0013】
また、本発明の映像音声記録再生装置において、前記制御部は、前記ハード・ディスク・ドライブへ前記ファイルを書き込むとき、前記FATファイルシステムにより提供されるFATを参照して、空き領域である1つ以上の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ファイルの書き込みを行うとともに前記FATの内容を更新し、前記ハード・ディスク・ドライブから前記ファイルを読み込むとき、前記FATを参照して、当該ファイルが書き込まれている個々の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ハード・ディスク・ドライブから前記ファイルを読み込むように制御するものであってよい。
【0014】
これによれば、ファイルを読み書きする際にキャッシュしなければならないFATデータの数を大幅に低減できるので、連続して読み書きすることのできるクラスタ数が増大し、高速な読み書きが可能になる。
【0015】
さらに、この発明の映像音声記録再生装置において、前記制御部は、前記ハード・ディスク・ドライブに前記ビッグクラスタを単位として書き込まれたタイプの第1のファイルと前記クラスタを単位として書き込まれたタイプの第2のファイルとを識別するための情報を管理し、前記各々のファイルのタイプに応じて、前記ビッグクラスタ単位によるファイルの読み込みと前記クラスタ単位によるファイルの読み込みを切り替えるように制御するものであってもよい。
【0016】
この発明によれば、クラスタ単位でのファイルの読み書きを行うシステムとの共存が可能になるとともに、動画、映像、音楽データなどの比較的サイズが大きいファイルとサイズが小さいファイルの読み書きを同一パーティションにおいて可能とする場合の、ディスク記憶領域の利用効率を向上させることができる。
【0017】
また、上記目的を達成するために、本発明の別の観点に基づく映像音声記録再生装置のファイル読み書き方法は、映像および/または音声のデータをファイルとして記憶するハード・ディスク・ドライブを備え、このハード・ディスク・ドライブから前記ファイルを読み出し再生する映像音声記録再生装置のファイル読み書き方法であって、前記ハード・ディスク・ドライブに対して読み書きされる前記ファイルをFATファイルシステムによりクラスタを単位に管理するとともに、2以上の所定数の連続するクラスタであるビッグクラスタの単位で前記ファイルの読み書きを行うものである。
【0018】
この発明によれば、ディスクに書き込まれるファイルのデータの連続性がN(Nは2以上の所定数)個の連続するクラスタであるビッグクラスタの単位で保証される。これにより動画などのサイズの大きいファイルを読み出す際のシークの発生頻度が低減し、再生時の動画の途切れが発生しにくくなるなど、スムースな動画再生が可能になる。
【0019】
また、本発明の映像音声記録再生装置のファイル読み書き方法は、前記ハード・ディスク・ドライブへ前記ファイルを書き込むとき、前記FATファイルシステムにより提供されるFATを参照して、空き領域である1つ以上の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ファイルの書き込みを行うとともに前記FATの内容を更新し、前記ハード・ディスク・ドライブから前記ファイルを読み込むとき、前記FATを参照して、当該ファイルが書き込まれている個々の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ハード・ディスク・ドライブから前記ファイルを読み込むものであってよい。
【0020】
この発明によれば、ファイルを読み書きする際にキャッシュしなければならないFATデータの数を大幅に低減できるので、連続して読み書きすることのできるクラスタ数が増大し、高速な読み書きが可能になる。
【0021】
さらに、本発明の映像音声記録再生装置のファイル読み書き方法は、前記ビッグクラスタを単位として前記ハード・ディスク・ドライブに書き込まれたタイプの第1のファイルと前記クラスタを単位として前記ハード・ディスク・ドライブに書き込まれたタイプの第2のファイルとを識別するための情報を管理し、前記各々のファイルのタイプに応じて、前記ビッグクラスタ単位によるファイルの読み込みと前記クラスタ単位によるファイルの読み込みを切り替えるものであってよい。
【0022】
この発明によれば、クラスタ単位でのファイルの読み書きを行うシステムとの共存が可能になるとともに、動画、映像、音楽データなどの比較的サイズが大きいファイルとサイズが小さいファイルの読み書きを同一パーティションにおいて可能とする場合の、ディスク記憶領域の利用効率を向上させることができる。
【0023】
【発明の実施の形態】
以下、本発明の実施形態を図面に基づいて説明する。
【0024】
図1は、本発明を適用した実施の一形態である映像音声記録再生装置100の構成を示すハードウェアブロック図である。
【0025】
同図に示すように、この映像音声記録再生装置100は、ハード・ディスク・ドライブ1(以下、HDDと呼ぶ。)、HDDインタフェース2、システムバス3、CPU(Central Processing Unit)4、ROM(Read Only Memory)5、RAM(Random Access Memory)6、ユーザインタフェース7、バッファメモリ8、デコーダ9、外部インタフェース10、ビデオインタフェース11、オーディオインタフェース12、モニタ13、およびスピーカ14などで構成される。
【0026】
この映像音声記録再生装置100は動画データなどのファイルサイズの大きいデータの記録再生を行う映像音声記録再生装置であり、ファイルサイズの大きいデータを記録するストレージデバイスとしてHDD1を採用したものである。
【0027】
HDD1に対するファイルの読み書きはFATファイルシステムによって管理される。HDD1は、たとえばATA/ATAPI、IEEE1394、USBなどの高速なHDDインタフェース2を通じてシステムバス3と接続されている。
【0028】
CPU4は、ROM5に記憶されているプログラムやパラメータを用いて映像音声記録再生装置100の全体の制御、各デバイス間でのデータのやりとり、各種の演算処理を実行する。
【0029】
ROM5には、この映像音声記録再生装置100を動作させるための基本プログラムや各種パラメータが格納されている。基本プログラムはFATファイルシステムの構築と運用に必要なプログラム15を含んでいる。
【0030】
RAM6は、CPU4の作業領域として用いられるほか、FATデータのキャッシュ領域などとして用いられる。RAM6の領域において、FATデータのキャッシュ領域には一定の容量が割り当てられている。
【0031】
ユーザインタフェース7は、ユーザからの記録・再生・停止などの指令のほか、ファイルの選択、削除などのファイル操作に関する指令入力を受け付けてCPU4へ通知する。
【0032】
バッファメモリ8は、HDD1から読み出されたMPEG(Moving Picture Coding Experts Group)データなどの圧縮符号化された動画データなどの映像・音楽データが一時的に蓄積されるメモリである。
【0033】
デコーダ9は、バッファメモリ8から読み出されたMPEGデータをデコードする。
【0034】
外部インタフェース10は、たとえばHDDレコーダなどの外部情報機器との接続インタフェースであり、これによって外部情報機器との間で映像・音楽データの転送を行うことが可能である。
【0035】
ビデオインタフェース11は、デコーダ9によってデコードされた動画・映像データをモニタ13にて表示可能な信号に変換してモニタ13に供給する。モニタ13には、たとえばLCD(Liquid Crystal Display)ディスプレイなどが用いられる。
【0036】
オーディオインタフェース12は、デコーダ9によってデコードされた音楽・音声データをスピーカ14にて出力可能な信号に変換してスピーカ14に供給する。
【0037】
次に、この映像音声記録再生装置100に採用されているFATファイルシステムについて説明する。
【0038】
FATファイルシステムは、ディレクトリエントリとFAT(File Allocation Table)とを含む。
【0039】
図2に示すように、ディレクトリエントリ21は、ファイル名22、属性(日付、サイズなど)23、ファイルを構成する先頭のクラスタ番号24との対応を管理する。
【0040】
図3に示すように、FAT31は、ファイルを構成するクラスタのつながりを示す情報を管理するためのテーブル構造である。FAT31の各エントリ32は、ディスクの各クラスタと1対1に対応し、該当するクラスタの使用状況(空きか否か)を表わしている。
【0041】
この実施形態では、図4に示すように、HDD1に対するファイルの読み書きを、N(Nは2以上の所定数)個の連続するクラスタの単位で行うことが可能である。このN個の連続するクラスタをここでは「ビッグクラスタ」と呼ぶ。図4の例では、128クラスタで1つのビッグクラスタ33が構成されている。
【0042】
図5に、ファイルの書き込み時の手順を示す。
【0043】
ファイルの書き込み要求が発生すると、まず、ディスク上の空き領域をビッグクラスタの単位で検索し、1ファイル分のデータを書き込む分の1以上のビッグクラスタ(図4の例ではビッグクラスタ1,2,3)を検索する。
【0044】
すなわち、図5に示すように、まずディスクの先頭のクラスタの番号を取得する(ステップ501)。なお、図4には示されていないが、ディスクの先頭の数クラスタはファイルシステム用に予約されていたり、ディレクトリエントリ用途等に使用されるので、ビッグクラスタ検索はそれより以降のクラスタを対象に行われる。次に、FAT31を参照して、上記ディスクの先頭クラスタを始点として、空きのビッグクラスタ33を検索する(ステップ502)。
【0045】
ただし、通常のクラスタ単位の読み書きをサポートしている場合、空きのビッグクラスタ33の検索対象である128クラスタ中に書き込み済みのクラスタが含まれている場合がある。このような場合、当該ビッグクラスタは空き状態でないものと見なし、次の128クラスタの空き状態のチェックに移行する(ステップ502a−502c)。
【0046】
このようにして検索されたビッグクラスタの位置情報をRAM6などのメモリに格納(キャッシュ)する。すなわち、検索した空きのビッグクラスタをファイル書き込み用に確保する(ステップ502d)。このとき格納するビッグクラスタの位置情報としては、ビッグクラスタの先頭クラスタの番号などがある。図4の例では、クラスタ番号1,257,359がビッグクラスタの情報として記憶される。
【0047】
書き込み先の1以上のビッグクラスタを検索(確保)できたなら(ステップ502eのYES)、キャッシュしたビッグクラスタの位置情報に基づいてファイルをビッグクラスタの単位で書き込む(ステップ503)。
【0048】
確保した空きのビッグクラスタが無くなった時点で(ステップ504のYES)、FAT31の更新を行う(ステップ505)。
【0049】
FAT31の更新は次のように行われる。
【0050】
図4に示すように、ビッグクラスタ1の先頭のクラスタ(番号1)から最後のクラスタ(番号128)までファイルのデータが連続して記録されたことにより、FAT31の各クラスタに対応するエントリには、ビッグクラスタ1の最後のクラスタ(番号128)に対応するエントリを除いて、各々自クラスタの次のクラスタの番号が入る。そしてビッグクラスタの最後のクラスタに対応するエントリとして、次のビッグクラスタ2の先頭のクラスタの番号(257)が入る。ファイルの終わりまで書き込んだ後、そのファイルの終わりの位置を含むクラスタに対応するエントリの値としてファイル終了の情報(EOF)を書き込む。
【0051】
通常のクラスタ単位の書き込みをサポートしている場合は、以上のようにファイルを書き込んだ後、このファイルがビッグクラスタ単位で書き込まれたファイルであることをどこかに明示しておく(ステップ506)。たとえば、ビッグクラスタ単位で書き込まれたファイルの一覧をファイルとして保存しておいたり、ディレクトリエントリにファイルの属性として持たすなどの方法がある。
【0052】
次に、以上のようにビッグクラスタ単位で書き込まれたファイルを読み込むときの動作を説明する。図6に、ファイルの読み込み時の手順を示す。
【0053】
まず、これから読み込もうとしているファイルがビッグクラスタ単位で書き込まれたファイルかどうかを、上記のファイル一覧との照合、あるいはディレクトリエントリに記録されている当該ファイルの属性を参照するなどして確認する(ステップ601,602)。
【0054】
ビッグクラスタ単位で書き込まれたファイルであることを確認した場合は、ディレクトリエントリ21から、そのファイルを構成する先頭クラスタの番号(図4の例では1)を取得してメモリにキャッシュする(ステップ603)。
【0055】
続いてFAT31を参照して、その先頭クラスタ番号+127(ビッグクラスタ1の最後のクラスタ番号)にエントリされている、次のビッグクラスタの先頭クラスタの番号(図4の例では257)をメモリにキャッシュし、同様に次のビッグクラスタの先頭クラスタの番号(図4の例では359)をメモリにキャッシュする。この手順を、ファイルを構成する全てのビッグクラスタ1,2,3について先頭クラスタの番号がすべてキャッシュされるまで、あるいは、メモリ内に用意したキャッシュ領域が埋まるまで繰り返す(ステップ604,605)。
【0056】
この後、メモリにキャッシュした各ビッグクラスタの先頭クラスタ番号に従って、ファイルのデータをディスクから読み込んで行く(ステップ606,607,608)。
【0057】
なお、ビッグクラスタの先頭クラスタ番号を取得している際、ビッグクラスタの最後のクラスタ番号のエントリに有効な値が入っていない場合は、このビッグクラスタがファイルの最後のビッグクラスタであることを意味する。また、このビッグクラスタのどのクラスタまでが有効なクラスタであるかを知るために、当該ビッグクラスタのFATデータを順に検索してEOFを含むクラスタ番号を検出し、これをファイルの読み込みの終了位置として記憶する。この情報に基づいて、ファイルの読み込みの終了を制御することができる。
【0058】
以上説明したように、この実施形態によれば、ディスクに書き込まれるファイルのデータの連続性がN(Nは2以上の所定数)個の連続するクラスタであるビッグクラスタの単位で保証される。これにより動画などのサイズの大きいファイルを読み出す際のシークの発生頻度が低減し、再生時の動画の途切れが発生しにくくなるなど、スムースな動画再生が可能になる。
【0059】
また、ファイルを読み書きする際にキャッシュするFATデータの数がほぼ1/Nに減るので、キャッシュ容量が同じでもほぼN倍のサイズのデータを、連続して(FATの参照による中断を挟むことなく)読み書きすることができ、高速な読み書きが実現される。
【0060】
実験によれば、再生ビットレートが1.5Mbpsの動画データ1時間分をディスクに書き込むのに、従来は200秒程度かかっていたが、本発明によれば、1ビッグクラスタを128クラスタで構成した場合、45秒程度で済むという結果が得られた。
【0061】
さらに、この実施形態では、クラスタ単位でのファイルの読み書きを行うシステムとの共存が可能であり、ファイルのサイズ、属性に応じて最適な読み書きの単位を柔軟に切り替えて運用することで、動画、映像、音楽データなどのサイズが大きいファイルとサイズが小さいファイルの読み書きを同一パーティションにおいて可能とする場合の、ディスク記憶領域の利用効率の低下を阻止できる。
【0062】
なお、本発明は上述したいずれの実施形態にも限定されず、本発明の技術思想の範囲内で適宜変更して実施できる。
【0063】
ビッグクラスタは128クラスタで構成されるものとしたが、連続する2以上のクラスタであればよい。ただし、ビッグクラスタを構成するクラスタの数が少なすぎるとディスクに対するファイルの読み書きの速度向上があまり望めない。逆に多すぎると、ビッグクラスタ内で未使用のクラスタが多数発生してしまうおそれがあり、ディスク記憶領域の利用効率が低下する。
【0064】
また、FATファイルシステムを適用可能なものであれば、HDD以外のストレージデバイスを用いた場合にも本発明は適用可能である。
【0065】
【発明の効果】
以上説明したように、本発明によれば、ディスクに書き込まれるファイルのデータの連続性がN(Nは2以上の所定数)個の連続するクラスタであるビッグクラスタの単位で保証されることで、動画などのサイズの大きいファイルを読み出す際のシークの発生頻度が低減し、再生時の動画の途切れが発生しにくくなるなど、スムースな動画再生が実現される。
【図面の簡単な説明】
【図1】本発明を適用した実施の一形態である映像音声記録再生装置の構成を示すハードウェアブロック図である。
【図2】FATファイルシステムのディレクトリエントリの構成を示す図である。
【図3】FATファイルシステムのFATの構成を示す図である。
【図4】本発明に係るFATファイルシステムの拡張の部分を説明するための図である。
【図5】ファイルの書き込み時の手順を示すフローチャートである。
【図6】ファイルの読み込み時の手順を示すフローチャートである。
【符号の説明】
1   ハード・ディスク・ドライブ
2   HDDインタフェース
3   システムバス
4   CPU
5   ROM
6   RAM
7   ユーザインタフェース
8   バッファメモリ
9   デコーダ
10   外部インタフェース
11   ビデオインタフェース
12   オーディオインタフェース
13   モニタ
14   スピーカ
15   FATファイルシステムのプログラム
21   ディレクトリエントリ
22   ファイル名
23   属性
24   先頭クラスタ番号
31   FAT
33   ビッグクラスタ
100   映像音声記録再生装置
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention provides a video / audio recording / reproducing system which includes a hard disk drive, records video and / or audio data transferred from an external device on the hard disk drive, and reads and reproduces the recorded data at an arbitrary timing. The present invention relates to a device and its file reading / writing method.
[0002]
[Prior art]
When reading and writing files to and from a hard disk drive, a file system is used to manage which files are stored where.
[0003]
Here, a FAT (File Allocation Table) file system will be described. In the FAT file system, one partition of a disk is managed in units called clusters, and information such as the state of each cluster and links between clusters is recorded and managed as FAT data in a FAT management area.
[0004]
The size of one cluster is determined within the constraints of the partition capacity and the size of the FAT entry. Consider a case where the size of one cluster is 64 sectors (= 32 kbytes).
[0005]
In this case, the continuity of data is guaranteed up to 32 kbytes, but if it exceeds 32 kbytes, a seek occurs, which is a movement of the head across a track on the disk to search for the next data. When this seek occurs, there is a possibility that data output from the hard disk drive is temporally interrupted due to the time required for the seek.
[0006]
[Problems to be solved by the invention]
If the data to be reproduced is of a nature that is not subject to time constraints, the interruption of data output from the hard disk drive does not matter much. However, when the data to be reproduced is a moving image, music, or the like, the interruption of the data output causes visual and auditory discomfort to the user.
[0007]
The file size of the moving image data is in the tens of megabytes or hundreds of megabytes class, which is much larger than the size of one cluster (32 kbytes). For this reason, a large amount of reading and writing of FAT data occurs when reading and writing a moving image of one file, and there has been a problem that efficiency is low.
[0008]
Further, in the FAT file system, the position of the FAT management area is fixed on the disc, and the reproduced video may be interrupted due to the effect of seek that occurs every time the read / write of the FAT data is switched between the read / write of the file. was there.
[0009]
In order to minimize the occurrence of seeking when reading and writing FAT data, a method of caching FAT data in a memory is usually adopted. However, when reading and writing large files such as moving image data, a large amount of data is read. Insufficient cache capacity for FAT data, resulting in access to the FAT management area on the disk.
[0010]
The present invention is intended to solve such a problem, and reduces the number of times of seeking when reading a file having a large file size such as a moving image, and realizes video / audio recording / reproducing that can realize smooth and smooth moving image reproduction. It is an object of the present invention to provide an apparatus and a method for reading and writing the file.
[0011]
[Means for Solving the Problems]
In order to achieve the above object, a video / audio recording / reproducing apparatus according to the present invention comprises a hard disk drive capable of reading and writing a file of video and / or audio data, and a read / write device for the hard disk drive. A control unit that manages files to be read and written in units of big clusters, which are two or more predetermined number of continuous clusters, by the FAT file system, and the hard disk drive. A playback unit that plays back video and / or audio data read from the drive.
[0012]
According to the present invention, continuity of data of a file written on a disk is guaranteed in units of N (N is a predetermined number of 2 or more) continuous clusters, which are big clusters. As a result, the frequency of seeking when reading a large file such as a moving image is reduced, and the moving image can be smoothly reproduced such that the moving image is less likely to be interrupted during reproduction.
[0013]
Further, in the video / audio recording / reproducing apparatus of the present invention, when writing the file to the hard disk drive, the control unit refers to the FAT provided by the FAT file system and sets one of the vacant areas. When the location information of the big cluster is cached, the file is written based on the cached location information, the contents of the FAT are updated, and when reading the file from the hard disk drive, the FAT is read. And caches the position information of each of the big clusters to which the file is written, and controls to read the file from the hard disk drive based on the cached position information. May be.
[0014]
According to this, the number of FAT data that must be cached when reading and writing a file can be greatly reduced, so that the number of clusters that can be continuously read and written increases, and high-speed reading and writing becomes possible.
[0015]
Further, in the video / audio recording / reproducing apparatus of the present invention, the control unit may include a first file of a type written in the hard disk drive in units of the big cluster and a first file of a type written in units of the cluster in the hard disk drive. It manages information for identifying a second file, and controls to switch between reading of the file in the unit of the big cluster and reading of the file in the unit of the cluster according to the type of each of the files. You may.
[0016]
According to the present invention, it is possible to coexist with a system that reads and writes files in cluster units, and to read and write relatively large files and small files such as moving images, videos, and music data in the same partition. When it is possible, the utilization efficiency of the disk storage area can be improved.
[0017]
To achieve the above object, a file reading / writing method for a video / audio recording / reproducing apparatus according to another aspect of the present invention includes a hard disk drive for storing video and / or audio data as a file. A file reading / writing method for a video / audio recording / reproducing apparatus for reading / reproducing the file from / to a hard disk drive, wherein the file read / written to / from the hard disk drive is managed in clusters by a FAT file system. In addition, the file is read and written in units of big clusters, which are two or more predetermined number of continuous clusters.
[0018]
According to the present invention, continuity of data of a file written on a disk is guaranteed in units of N (N is a predetermined number of 2 or more) continuous clusters, which are big clusters. As a result, the frequency of seeking when reading a large file such as a moving image is reduced, and the moving image can be smoothly reproduced such that the moving image is less likely to be interrupted during reproduction.
[0019]
Also, the file reading / writing method of the video / audio recording / reproducing apparatus according to the present invention is characterized in that, when the file is written to the hard disk drive, one or more free areas are referred to by referring to the FAT provided by the FAT file system. Caches the location information of the big cluster, writes the file based on the cached location information, updates the contents of the FAT, and reads the file from the hard disk drive. By referring to the cache, position information of each of the big clusters to which the file is written is cached, and the file is read from the hard disk drive based on the cached position information.
[0020]
According to the present invention, the number of FAT data that must be cached when reading and writing a file can be greatly reduced, so that the number of clusters that can be continuously read and written increases, and high-speed reading and writing becomes possible.
[0021]
Further, the file reading / writing method of the video / audio recording / reproducing apparatus according to the present invention may further comprise a first file of a type written to the hard disk drive in units of the big cluster and the hard disk drive in units of the cluster. Manages information for identifying a second file of the type written in the file, and switches between reading of the file in the unit of the big cluster and reading of the file in the unit of the cluster according to the type of each of the files It may be.
[0022]
According to the present invention, it is possible to coexist with a system that reads and writes files in cluster units, and to read and write relatively large files and small files such as moving images, videos, and music data in the same partition. When it is possible, the utilization efficiency of the disk storage area can be improved.
[0023]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0024]
FIG. 1 is a hardware block diagram showing a configuration of a video / audio recording / reproducing apparatus 100 according to an embodiment to which the present invention is applied.
[0025]
As shown in FIG. 1, the video / audio recording / reproducing apparatus 100 includes a hard disk drive 1 (hereinafter, referred to as an HDD), an HDD interface 2, a system bus 3, a CPU (Central Processing Unit) 4, and a ROM (Read). It includes an Only Memory 5, a RAM (Random Access Memory) 6, a user interface 7, a buffer memory 8, a decoder 9, an external interface 10, a video interface 11, an audio interface 12, a monitor 13, a speaker 14, and the like.
[0026]
The video / audio recording / reproducing apparatus 100 is a video / audio recording / reproducing apparatus for recording / reproducing data having a large file size such as moving image data, and employs the HDD 1 as a storage device for recording data having a large file size.
[0027]
Reading and writing of files to and from the HDD 1 is managed by the FAT file system. The HDD 1 is connected to a system bus 3 through a high-speed HDD interface 2 such as ATA / ATAPI, IEEE1394, USB, or the like.
[0028]
The CPU 4 uses the programs and parameters stored in the ROM 5 to control the entire video / audio recording / reproducing apparatus 100, exchange data between devices, and execute various arithmetic processes.
[0029]
The ROM 5 stores a basic program and various parameters for operating the video / audio recording / reproducing apparatus 100. The basic program includes a program 15 necessary for construction and operation of the FAT file system.
[0030]
The RAM 6 is used not only as a work area for the CPU 4 but also as a cache area for FAT data. In the area of the RAM 6, a fixed capacity is allocated to the FAT data cache area.
[0031]
The user interface 7 receives commands from the user, such as recording, reproduction, and stop, and command inputs related to file operations such as file selection and deletion, and notifies the CPU 4 of the command inputs.
[0032]
The buffer memory 8 is a memory for temporarily storing video and music data such as moving image data that has been compression-encoded such as MPEG (Moving Picture Coding Experts Group) data read from the HDD 1.
[0033]
The decoder 9 decodes the MPEG data read from the buffer memory 8.
[0034]
The external interface 10 is a connection interface with an external information device such as an HDD recorder, for example, and can transfer video and music data to and from the external information device.
[0035]
The video interface 11 converts the moving image / video data decoded by the decoder 9 into a signal that can be displayed on the monitor 13 and supplies the signal to the monitor 13. As the monitor 13, for example, an LCD (Liquid Crystal Display) display or the like is used.
[0036]
The audio interface 12 converts the music / voice data decoded by the decoder 9 into a signal that can be output by the speaker 14 and supplies the signal to the speaker 14.
[0037]
Next, the FAT file system employed in the video / audio recording / reproducing apparatus 100 will be described.
[0038]
The FAT file system includes a directory entry and a FAT (File Allocation Table).
[0039]
As shown in FIG. 2, the directory entry 21 manages a correspondence between a file name 22, an attribute (date, size, etc.) 23, and a cluster number 24 at the head of the file.
[0040]
As shown in FIG. 3, the FAT 31 has a table structure for managing information indicating the connection of clusters constituting a file. Each entry 32 of the FAT 31 has a one-to-one correspondence with each cluster of the disk, and indicates the usage status of the corresponding cluster (whether it is free or not).
[0041]
In this embodiment, as shown in FIG. 4, it is possible to read / write a file from / to the HDD 1 in units of N (N is a predetermined number of 2 or more) continuous clusters. The N consecutive clusters are referred to herein as "big clusters". In the example of FIG. 4, one big cluster 33 is configured by 128 clusters.
[0042]
FIG. 5 shows a procedure for writing a file.
[0043]
When a file write request occurs, first, an empty area on the disk is searched in units of big clusters, and one or more big clusters for writing data of one file (in the example of FIG. 3) Search.
[0044]
That is, as shown in FIG. 5, first, the number of the cluster at the head of the disk is obtained (step 501). Although not shown in FIG. 4, several clusters at the head of the disk are reserved for a file system or used for a directory entry or the like. Done. Next, referring to the FAT 31, the free big cluster 33 is searched starting from the head cluster of the disc (step 502).
[0045]
However, when reading and writing in a normal cluster unit are supported, the written cluster may be included in the 128 clusters to be searched for the empty big cluster 33. In such a case, it is considered that the big cluster is not in an empty state, and the process shifts to checking the empty state of the next 128 clusters (steps 502a to 502c).
[0046]
The position information of the big cluster searched in this way is stored (cached) in a memory such as the RAM 6. That is, the found free big cluster is reserved for writing the file (step 502d). The position information of the big cluster stored at this time includes the number of the head cluster of the big cluster and the like. In the example of FIG. 4, cluster numbers 1, 257, and 359 are stored as big cluster information.
[0047]
If one or more big clusters at the write destination have been searched (secured) (YES in step 502e), the file is written in units of big clusters based on the cached position information of the big cluster (step 503).
[0048]
When the reserved free big cluster is gone (YES in step 504), the FAT 31 is updated (step 505).
[0049]
Updating of the FAT 31 is performed as follows.
[0050]
As shown in FIG. 4, since the data of the file is continuously recorded from the first cluster (number 1) to the last cluster (number 128) of the big cluster 1, the entry corresponding to each cluster of the FAT 31 has , Except for the entry corresponding to the last cluster (number 128) of the big cluster 1, the number of the cluster next to the own cluster is entered. Then, as the entry corresponding to the last cluster of the big cluster, the number (257) of the first cluster of the next big cluster 2 is entered. After writing to the end of the file, end-of-file information (EOF) is written as the value of the entry corresponding to the cluster including the end position of the file.
[0051]
If normal cluster unit writing is supported, after writing the file as described above, it is explicitly stated that this file is a file written in big cluster units (step 506). . For example, there is a method of storing a list of files written in units of big clusters as a file, or having a directory entry as a file attribute.
[0052]
Next, an operation of reading a file written in a unit of a big cluster as described above will be described. FIG. 6 shows a procedure for reading a file.
[0053]
First, it is checked whether the file to be read is a file written in a big cluster unit by checking the above file list or referring to the attribute of the file recorded in a directory entry ( Steps 601 and 602).
[0054]
If it is confirmed that the file is written in units of big clusters, the number of the first cluster (1 in the example of FIG. 4) constituting the file is acquired from the directory entry 21 and cached in the memory (step 603). ).
[0055]
Subsequently, referring to the FAT 31, the number of the first cluster of the next big cluster (257 in the example of FIG. 4), which is entered at the first cluster number +127 (the last cluster number of the big cluster 1), is cached in the memory. Similarly, the number of the first cluster of the next big cluster (359 in the example of FIG. 4) is cached in the memory. This procedure is repeated until all of the leading cluster numbers are cached for all the big clusters 1, 2, and 3 constituting the file, or until the cache area prepared in the memory is filled (steps 604 and 605).
[0056]
Thereafter, the data of the file is read from the disk according to the leading cluster number of each big cluster cached in the memory (steps 606, 607, 608).
[0057]
If the last cluster number entry of the big cluster does not contain a valid value when obtaining the first cluster number of the big cluster, this means that this big cluster is the last big cluster of the file. I do. Also, in order to know which cluster of this big cluster is a valid cluster, FAT data of the big cluster is searched in order to detect a cluster number including EOF, and this is set as a file read end position. Remember. Based on this information, the end of reading the file can be controlled.
[0058]
As described above, according to this embodiment, the continuity of the data of the file written to the disk is guaranteed in units of a big cluster, which is N (N is a predetermined number of 2 or more) continuous clusters. As a result, the frequency of seeking when reading a large file such as a moving image is reduced, and the moving image can be smoothly reproduced such that the moving image is less likely to be interrupted during reproduction.
[0059]
Further, since the number of FAT data to be cached when reading / writing a file is reduced to approximately 1 / N, data of approximately N times the size can be continuously (even without interruption due to reference to the FAT) even if the cache capacity is the same. ) Reading and writing can be performed, and high-speed reading and writing can be realized.
[0060]
According to an experiment, it took about 200 seconds to write one hour of moving image data having a reproduction bit rate of 1.5 Mbps to a disk, but according to the present invention, one big cluster was composed of 128 clusters. In this case, the result was that about 45 seconds were enough.
[0061]
Furthermore, in this embodiment, it is possible to coexist with a system that reads and writes files in cluster units, and by switching and operating the optimal reading and writing unit flexibly according to the file size and attributes, moving images, In a case where a large file and a small file such as video and music data can be read and written in the same partition, it is possible to prevent a decrease in the use efficiency of the disk storage area.
[0062]
Note that the present invention is not limited to any of the above-described embodiments, and can be appropriately modified and implemented within the scope of the technical idea of the present invention.
[0063]
Although the big cluster is composed of 128 clusters, any two or more continuous clusters may be used. However, if the number of clusters constituting the big cluster is too small, the speed of reading / writing files from / to the disk cannot be improved much. Conversely, if the number is too large, many unused clusters may be generated in the big cluster, and the utilization efficiency of the disk storage area decreases.
[0064]
Further, the present invention can be applied to a case where a storage device other than the HDD is used as long as the FAT file system can be applied.
[0065]
【The invention's effect】
As described above, according to the present invention, the continuity of data of a file written on a disk is guaranteed in units of N (N is a predetermined number of 2 or more) continuous clusters, which are big clusters. In addition, the frequency of seeking when reading a large-sized file such as a moving image is reduced, so that the moving image is less likely to be interrupted during reproduction.
[Brief description of the drawings]
FIG. 1 is a hardware block diagram illustrating a configuration of a video / audio recording / reproducing apparatus according to an embodiment of the present invention.
FIG. 2 is a diagram showing a configuration of a directory entry of the FAT file system.
FIG. 3 is a diagram showing a configuration of a FAT of a FAT file system.
FIG. 4 is a diagram for explaining an extended part of the FAT file system according to the present invention.
FIG. 5 is a flowchart showing a procedure for writing a file.
FIG. 6 is a flowchart showing a procedure for reading a file.
[Explanation of symbols]
1 hard disk drive 2 HDD interface 3 system bus 4 CPU
5 ROM
6 RAM
7 User Interface 8 Buffer Memory 9 Decoder 10 External Interface 11 Video Interface 12 Audio Interface 13 Monitor 14 Speaker 15 FAT File System Program 21 Directory Entry 22 File Name 23 Attribute 24 First Cluster Number 31 FAT
33 Big Cluster 100 Video / Audio Recording / Reproducing Device

Claims (6)

映像および/または音声のデータのファイルの読み書きが可能なハード・ディスク・ドライブと、
このハード・ディスク・ドライブに対して読み書きされるファイルをFATファイルシステムによりクラスタを単位に管理するとともに、2以上の所定数の連続するクラスタであるビッグクラスタの単位で前記ファイルの読み書きを行うように制御する制御部と、
前記ハード・ディスク・ドライブから読み出された映像および/または音声のデータを再生する再生部と
を具備することを特徴とする映像音声記録再生装置。
A hard disk drive capable of reading and writing video and / or audio data files;
A file read / written from / to this hard disk drive is managed in units of clusters by the FAT file system, and the file is read / written in units of big clusters, which are two or more predetermined number of continuous clusters. A control unit for controlling;
A video / audio recording / reproducing apparatus, comprising: a reproducing section for reproducing video and / or audio data read from the hard disk drive.
前記制御部は、前記ハード・ディスク・ドライブへ前記ファイルを書き込むとき、前記FATファイルシステムにより提供されるFATを参照して、空き領域である1つ以上の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ファイルの書き込みを行うとともに前記FATの内容を更新し、前記ハード・ディスク・ドライブから前記ファイルを読み込むとき、前記FATを参照して、当該ファイルが書き込まれている個々の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ハード・ディスク・ドライブから前記ファイルを読み込むように制御することを特徴とする請求項1に記載の映像音声記録再生装置。When writing the file to the hard disk drive, the control unit refers to the FAT provided by the FAT file system, caches location information of one or more big clusters that are free areas, Based on the cached position information, the file is written and the contents of the FAT are updated. When the file is read from the hard disk drive, the file is written with reference to the FAT. 2. The video / audio recording / reproducing apparatus according to claim 1, wherein position information of each of the big clusters is cached, and the file is read from the hard disk drive based on the cached position information. apparatus. 前記制御部は、前記ハード・ディスク・ドライブに前記ビッグクラスタを単位として書き込まれたタイプの第1のファイルと前記クラスタを単位として書き込まれたタイプの第2のファイルとを識別するための情報を管理し、前記各々のファイルのタイプに応じて、前記ビッグクラスタ単位によるファイルの読み込みと前記クラスタ単位によるファイルの読み込みを切り替えるように制御することを特徴とする請求項1に記載の映像音声記録再生装置。The control unit stores information for identifying a first file of a type written in units of the big cluster and a second file of a type written in units of the cluster on the hard disk drive. 2. The video / audio recording / reproducing apparatus according to claim 1, wherein the control is performed so as to switch between reading of the file in the unit of the big cluster and reading of the file in the unit of the cluster according to the type of each of the files. apparatus. 映像および/または音声のデータをファイルとして記憶するハード・ディスク・ドライブを備え、このハード・ディスク・ドライブから前記ファイルを読み出し再生する映像音声記録再生装置のファイル読み書き方法であって、
前記ハード・ディスク・ドライブに対して読み書きされる前記ファイルをFATファイルシステムによりクラスタを単位に管理するとともに、2以上の所定数の連続するクラスタであるビッグクラスタの単位で前記ファイルの読み書きを行うことを特徴とする映像音声記録再生装置のファイル読み書き方法。
A file reading / writing method for a video / audio recording / reproducing apparatus, comprising: a hard disk drive that stores video and / or audio data as a file; and reading and reproducing the file from the hard disk drive.
Managing the file read / written to / from the hard disk drive in units of clusters using a FAT file system and reading / writing the file in units of big clusters, which are two or more predetermined number of continuous clusters A file reading / writing method for a video / audio recording / reproducing device, characterized by comprising:
前記ハード・ディスク・ドライブへ前記ファイルを書き込むとき、前記FATファイルシステムにより提供されるFATを参照して、空き領域である1つ以上の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ファイルの書き込みを行うとともに前記FATの内容を更新し、前記ハード・ディスク・ドライブから前記ファイルを読み込むとき、前記FATを参照して、当該ファイルが書き込まれている個々の前記ビッグクラスタの位置情報をキャッシュし、このキャッシュした位置情報に基づいて前記ハード・ディスク・ドライブから前記ファイルを読み込むことを特徴とする請求項4に記載の映像音声記録再生装置のファイル読み書き方法。When writing the file to the hard disk drive, cache the location information of one or more of the big clusters, which are free areas, with reference to the FAT provided by the FAT file system. When writing the file based on the FAT and updating the contents of the FAT, and reading the file from the hard disk drive, referring to the FAT, each of the big clusters in which the file is written 5. The method according to claim 4, wherein the position information is cached, and the file is read from the hard disk drive based on the cached position information. 前記ビッグクラスタを単位として前記ハード・ディスク・ドライブに書き込まれたタイプの第1のファイルと前記クラスタを単位として前記ハード・ディスク・ドライブに書き込まれたタイプの第2のファイルとを識別するための情報を管理し、前記各々のファイルのタイプに応じて、前記ビッグクラスタ単位によるファイルの読み込みと前記クラスタ単位によるファイルの読み込みを切り替えることを特徴とする請求項4に記載の映像音声記録再生装置のファイル読み書き方法。A first file of a type written to the hard disk drive in units of the big cluster and a second file of a type written to the hard disk drive in units of the cluster; 5. The video / audio recording / reproducing apparatus according to claim 4, wherein information is managed, and reading of the file by the big cluster unit and reading of the file by the cluster unit are switched according to the type of each of the files. 6. How to read and write files.
JP2002239978A 2002-08-20 2002-08-20 Image and sound record/playback device and file read/write method thereof Pending JP2004078704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002239978A JP2004078704A (en) 2002-08-20 2002-08-20 Image and sound record/playback device and file read/write method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002239978A JP2004078704A (en) 2002-08-20 2002-08-20 Image and sound record/playback device and file read/write method thereof

Publications (1)

Publication Number Publication Date
JP2004078704A true JP2004078704A (en) 2004-03-11

Family

ID=32022893

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002239978A Pending JP2004078704A (en) 2002-08-20 2002-08-20 Image and sound record/playback device and file read/write method thereof

Country Status (1)

Country Link
JP (1) JP2004078704A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006079742A (en) * 2004-09-10 2006-03-23 Sony Corp Device, method and program for processing information
JP2007087063A (en) * 2005-09-21 2007-04-05 Canon Inc Fat file system, file management method, program and storage medium
JP2012094242A (en) * 2005-03-04 2012-05-17 Panasonic Corp Data processor
US8515250B2 (en) 2008-07-17 2013-08-20 Panasonic Corporation Video recording device, video reproduction device, and method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006079742A (en) * 2004-09-10 2006-03-23 Sony Corp Device, method and program for processing information
JP2012094242A (en) * 2005-03-04 2012-05-17 Panasonic Corp Data processor
JP2007087063A (en) * 2005-09-21 2007-04-05 Canon Inc Fat file system, file management method, program and storage medium
US8515250B2 (en) 2008-07-17 2013-08-20 Panasonic Corporation Video recording device, video reproduction device, and method thereof

Similar Documents

Publication Publication Date Title
JP3566152B2 (en) Data recording / reproducing device and program recording medium
EP0971358B1 (en) Data processing apparatus and file management method therefor
JPH07302225A (en) Continuous data recording and reproducing apparatus and cache control method
JP4256075B2 (en) File system and storage area management method
JP3778055B2 (en) Recording / reproducing apparatus and recording / reproducing method
JP4036056B2 (en) Recording apparatus and method, recording medium, and program
JP4502375B2 (en) File system and control method thereof
JP2004334459A (en) Recording and reproduction device, method, and program
JP2006244653A (en) Device and method for recording stream data
US20050259542A1 (en) Reproduction device and method, recording medium, and program
JP2004078704A (en) Image and sound record/playback device and file read/write method thereof
EP1213652B1 (en) Disk medium managing method
JP5178355B2 (en) Recording device
JP4930358B2 (en) Data processing apparatus and data processing method
JP2001312875A (en) Recording and reproducing disk controller and disk device using the controller
JP4274783B2 (en) Recording device
KR100762580B1 (en) Method for controlling storage space personal video recorder
WO2010007727A1 (en) Video recording device, video reproduction device, and method thereof
JP2004362592A (en) System and method using swappable storage device for storing program data
JP2004171670A (en) Recording and reproducing device and recording and reproducing method
JP4137429B2 (en) Recording / reproducing apparatus, recording / reproducing method, program, and recording medium
JP2004199767A (en) Data processor, data processing method and program
JP2001043662A (en) Disk medium managing method
JP3506031B2 (en) Video / audio data recording / reproducing device
JPH11328824A (en) Reproducing device, recorder and recording/reproducing device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060424

A072 Dismissal of procedure [no reply to invitation to correct request for examination]

Free format text: JAPANESE INTERMEDIATE CODE: A072

Effective date: 20060829