JP5178355B2 - Recording device - Google Patents
Recording device Download PDFInfo
- Publication number
- JP5178355B2 JP5178355B2 JP2008172573A JP2008172573A JP5178355B2 JP 5178355 B2 JP5178355 B2 JP 5178355B2 JP 2008172573 A JP2008172573 A JP 2008172573A JP 2008172573 A JP2008172573 A JP 2008172573A JP 5178355 B2 JP5178355 B2 JP 5178355B2
- Authority
- JP
- Japan
- Prior art keywords
- recording
- area
- recording medium
- moving image
- data
- 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.)
- Active
Links
Images
Description
本発明は、記録領域管理方式が異なる複数種類の記録媒体を使用する記録装置に関する。 The present invention relates to a recording apparatus that uses a plurality of types of recording media having different recording area management methods.
近年、メモリカードやハードディスクドライブ等のランダムアクセス可能な記録媒体に撮影画像を記録するデジタルカメラやデジタルビデオカメラが広く普及してきている。これらの機器で使用される記録媒体の記録フォーマットとしては、使用領域と未使用領域を管理テーブル(File Allocation Table)で管理するファイルシステムが知られている。このファイルシステムでは、ファイル書込み要求があると、管理テーブルを参照して未使用領域を発見し、そのファイルを未使用領域に逐次的に書き込んでいく。このファイルシステムは、米国マイクロソフト社の初期のコンピュータオペレーティングシステムにも採用された In recent years, digital cameras and digital video cameras that record captured images on a randomly accessible recording medium such as a memory card or a hard disk drive have become widespread. As a recording format of a recording medium used in these devices, a file system that manages a used area and an unused area with a management table (File Allocation Table) is known. In this file system, when there is a file write request, an unused area is found by referring to the management table, and the file is sequentially written to the unused area. This file system was also adopted by Microsoft's early computer operating system.
しかし、このようなファイルシステムでは、ファイルの書込みと削除を繰り返していると、使用領域と未使用領域が混在してしまい、書き込まれたファイルが分断される。空き領域もまた、分断され、連続した大きな空き領域を確保するのが難しい。これは一般に、フラグメンテーションあるいは断片化と呼ばれる現象である。ファイルの断片化は、アクセス速度の低下を招くので、動画記録などのリアルタイム性を要するアクセス時に問題となる。 However, in such a file system, when the writing and deletion of the file are repeated, the used area and the unused area are mixed, and the written file is divided. The free area is also divided, and it is difficult to secure a continuous large free area. This is a phenomenon generally called fragmentation or fragmentation. Since file fragmentation causes a decrease in access speed, it becomes a problem at the time of access requiring real-time performance such as moving image recording.
フラッシュメモリを使用するメモリカードに上記ファイルシステムを適用した場合にも、断片化によるアクセス速度の低下が起こりうる。フラッシュメモリは、書き換え回数に制限があり、消去単位(書き換えの単位サイズ)が大きい(数キロバイト〜数十キロバイトのブロック単位)ことから、ハードディスクとは異なる対応が必要となる。 Even when the above file system is applied to a memory card using a flash memory, the access speed may decrease due to fragmentation. The flash memory has a limited number of rewrites and a large erasure unit (rewrite unit size) (a block unit of several kilobytes to several tens of kilobytes).
図2を参照して、簡単に説明する。一般にフラッシュメモリの消去単位又は書き換え単位は、上述のファイルステムの空き領域管理単位(クラスタサイズ)よりも大きい。図2に示す例では、4クラスタを消去単位としている。図2は、消去単位の記録領域Aに記録されるデータに変更を加えて消去単位の記録領域Bに書き換える場合を図示しており,(A)が書き換え前の状態を示し、同(B)が書き換え中と書き換え後の状態を示す。 A brief description will be given with reference to FIG. In general, the erase unit or the rewrite unit of the flash memory is larger than the above-described free area management unit (cluster size) of the file system. In the example shown in FIG. 2, 4 clusters are used as an erasing unit. FIG. 2 shows a case where data recorded in the erasure unit recording area A is changed and rewritten to the erasure unit recording area B. FIG. 2A shows a state before the rewriting, and FIG. Indicates the state during and after rewriting.
図2(A)では、記録領域A内に未使用クラスタと使用済みクラスタが混在している。記録領域Aの論理アドレスは、0x100000から0x13ffffに設定されている。 In FIG. 2A, unused clusters and used clusters are mixed in the recording area A. The logical address of the recording area A is set from 0x100000 to 0x13ffff.
ここで、論理アドレス0x110000から始まるクラスタ2に新データを書き込む必要が生じたとする。フラッシュメモリでは、記録領域Aに対する部分的な上書きが不可能であるので、カード内部で、データの移動と論理アドレスの割当の変更が行なわれる。即ち、記録領域Aの記憶データ(旧データ)を読み出して新データと合成し、記録領域Aとは物理的に異なる位置にある消去単位の記録領域Bに書き込む。そして、記録領域Aに割り当てていた論理アドレス0x100000から0x13ffffを記録領域Bに割り当てる。論理アドレス0x110000に書き込まれるべきデータは、実際には記録領域Bのクラスタ2'に書き込まれることになる。記録領域Aのクラスタ1,3のデータは、それぞれ領域Bのクラスタ1’,3’にコピーされる。
Here, it is assumed that it is necessary to write new data to the
このような書き換え時の内部的なコピー動作が、書込み速度の低下を招く。勿論、物理アドレスで見ても断片化が進行することになる。読み込みについては、断片化していても上記のようなコピー動作を伴わないので、速度低下はごくわずかである。 Such an internal copy operation at the time of rewriting causes a decrease in writing speed. Of course, fragmentation proceeds even when viewed by physical address. As for reading, even if it is fragmented, the copying operation as described above is not involved, so the speed reduction is negligible.
一方、ハードディスクでは、断片化により物理的に磁気ヘッドが移動する頻度が高くなり、読出し・書込み共に速度低下が発生する。 On the other hand, in a hard disk, the frequency of physical movement of the magnetic head due to fragmentation increases, and the speed of both reading and writing decreases.
このような問題に対して、特許文献1には、次のような技術が記載されている。すなわち、リアルタイムの書込みを要求されるデータ(リアルタイムデータ)とそうでないデータ(非リアルタイムデータ)に区別する。そして、記録媒体の空き領域情報に基づいてリアルタイムデータを相対的に高転送レートの領域に書き込み、非リアルタイムデータを相対的に低転送レートの領域に書き込む。
For such a problem,
近年、フラッシュメモリを使用するメモリカードでは、フラグメンテーションによる速度低下を考慮に入れた、最低記録保証レートを規定するものが現れている。例えば、Secure Digital Specifications Physical Layer Spec. Version 2.0では、動画に代表されるリアルタイムデータを破綻なく記録可能とするためのスピードクラスが規定されている。図3を参照して、そのスピードクラスを説明する。 In recent years, some memory cards using a flash memory have defined a minimum guaranteed recording rate that takes into account a decrease in speed due to fragmentation. For example, Secure Digital Specialties Physical Layer Spec. Version 2.0 defines a speed class for enabling real-time data represented by moving images to be recorded without failure. The speed class will be described with reference to FIG.
メモリカード上の記録領域をAU(Allocation Unit)と呼ばれる単位で区切り、各AUに対して断片化の程度を測定する。AUの大きさは、メモリカード内部のフラッシュメモリの消去単位に合わせてカード毎に決められている。また、スピードクラスを適用した記録におけるリアルタイムデータの最小記録単位を、RU(Recording Unit)と呼ぶ。RUは、上述の管理テーブル方式のクラスタサイズの整数倍と定められている。RU内の全クラスタが未使用クラスタである場合、そのRUを未使用RUとして扱う。AUは複数個のRUからなる。AUを構成する全てのRUの中における使用済みRUの割合に応じて、そのAU内の未使用RUへの最低記録速度が規定されている。使用済みRUの割合が低いほど、高速に記録が可能となる。記録データのビットレートよりも高速に記録可能なAUを選択することで、リアルタイムデータを確実にカードに記録することが可能となる。 The recording area on the memory card is divided by a unit called AU (Allocation Unit), and the degree of fragmentation is measured for each AU. The size of the AU is determined for each card according to the erase unit of the flash memory inside the memory card. The minimum recording unit of real-time data in recording to which the speed class is applied is referred to as RU (Recording Unit). The RU is defined as an integer multiple of the cluster size of the management table method described above. When all the clusters in the RU are unused clusters, the RU is treated as an unused RU. The AU is composed of a plurality of RUs. The minimum recording speed for unused RUs in the AU is defined according to the ratio of used RUs among all the RUs constituting the AU. The lower the ratio of used RU, the higher the recording speed. By selecting an AU that can be recorded at a speed higher than the bit rate of the recording data, real-time data can be reliably recorded on the card.
図3を参照して、具体例を説明する。図3に示す例では、AU内の空きRU率が100%の場合に書込み可能速度は6MB/secに設定されている。同様に、75%の場合に4MB/sec、50%の場合に2MB/sec、25%の場合に1MB/secと設定されている。このメモリカードにビットレート3MB/secのストリームをリアルタイムに記録する場合、未使用RUの割合が100%又は75%の領域を使用することで、ストリームデータのビットレートでの記録を継続できる。
近年は、メモリカードとハードディスクというように記録領域管理特性の異なる複数の記録媒体を使用可能なビデオカメラが登場してきている。リアルタイムの動画記録再生のほか、記録媒体間でのコンテンツコピー機能、コンテンツの簡易編集機能などを有するビデオカメラも登場している。 In recent years, video cameras capable of using a plurality of recording media having different recording area management characteristics such as a memory card and a hard disk have appeared. In addition to real-time video recording / playback, video cameras having a function of copying content between recording media, a function of easily editing content, and the like have also appeared.
記録媒体の大容量化により、ユーザは、大量のコンテンツの記録・再生・編集・削除といった操作を繰り返し行いながら使用することが考えられ、記録媒体上のファイルの断片化が進行しやすい状況になってきているといえる。 Due to the increase in the capacity of recording media, it is conceivable that the user may repeatedly use operations such as recording, playback, editing, and deletion of a large amount of content, and fragmentation of files on the recording medium is likely to proceed. It can be said that it has come.
従来技術では、複数の記録媒体を併用可能な場合でも、断片化率に応じた書込み/読出し速度特性が記録媒体の種類毎に相違している点を考慮していない。単に、書込み時に、データのリアルタイム性・ビットレートに応じて書込み先領域を選択するという一律な制御方法を適用しているだけである。従って、例えば、メモリカードでは断片化した領域でも読出しが高速であることが生かされないといった問題が存在した。また、断片化した領域が使用されないことで、空き領域が有効に使用されないといった問題が存在する。 In the prior art, even when a plurality of recording media can be used in combination, the writing / reading speed characteristics corresponding to the fragmentation rate are not taken into consideration for each type of recording medium. Simply, a uniform control method of selecting a write destination area according to the real-time property / bit rate of data at the time of writing is simply applied. Therefore, for example, a memory card has a problem that high-speed reading is not used even in a fragmented area. Further, there is a problem that a free area is not used effectively because a fragmented area is not used.
本発明は、このような問題点を解決し、断片化に強く、空き領域を有効に使用する記録装置を提示することを目的とする。 An object of the present invention is to solve such problems, and to provide a recording apparatus that is resistant to fragmentation and that effectively uses a free area.
前記目的を達成するため、本発明に係る記録装置は、動画データを生成する生成手段と、第1の記録媒体に前記動画データを書き込む第1の記録媒体インターフェースと、第2の記録媒体から動画データを読み出す第2の記録媒体インターフェースと、前記生成手段により生成された動画データを前記第1の記録媒体に書き込む第1のモードと、前記第2の記録媒体に記録された動画データを前記第1の記録媒体に書き込む第2のモードを切り替えるモード切り替え手段と、前記第1の記録媒体の複数の記録領域それぞれに含まれる未使用領域に基づいて前記第1の記録媒体インターフェースを制御する制御手段とを備え、前記制御手段は、前記第1のモードにおいては、前記第1の記録媒体の複数の記録領域のうち前記未使用領域の大きさが第2の領域よりも大きい第1の領域を選択し、選択した前記第1の領域に前記生成手段により生成された前記動画データを書き込み、前記第2のモードにおいては、前記第2の領域の読み出し速度が前記動画データのレートに対応する読み出し速度よりも大きい場合に前記第2の領域に前記第2の記録媒体に記録された動画データを書き込むように、前記第1の記録媒体インターフェースを制御することを特徴とする。 In order to achieve the above object, a recording apparatus according to the present invention includes a generating unit that generates moving image data, a first recording medium interface that writes the moving image data to a first recording medium, and a moving image from a second recording medium. A second recording medium interface for reading data; a first mode in which the moving image data generated by the generating means is written to the first recording medium; and the moving image data recorded on the second recording medium Mode switching means for switching the second mode written to one recording medium, and control means for controlling the first recording medium interface based on unused areas included in each of the plurality of recording areas of the first recording medium In the first mode, the control means includes a size of the unused area among a plurality of recording areas of the first recording medium. A first area larger than the second area is selected, and the moving image data generated by the generating unit is written to the selected first area. In the second mode, the second area The first recording medium interface is controlled so that the moving image data recorded on the second recording medium is written to the second area when the reading speed is higher than the reading speed corresponding to the rate of the moving image data. characterized in that it.
本発明によれば、特性の異なる複数の記録媒体を使用する記録装置において、断片化が発生した場合でもリアルタイム記録・再生をできる限り保証しつつ、空き領域を有効に利用することが可能になる。 According to the present invention, in a recording apparatus that uses a plurality of recording media having different characteristics, it is possible to effectively use a free space while guaranteeing real-time recording / reproduction as much as possible even when fragmentation occurs. .
以下、図面を参照して、本発明の実施例を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
図1は、本発明の一実施例であるビデオカメラ10の概略構成ブロック図である。
FIG. 1 is a schematic block diagram of a
ビデオカメラ10は、記録領域管理方式が互いに異なる複数の記録媒体として、フラッシュメモリを使用するメモリカード30と、ハードディスクドライブ(HDD)34を具備し、撮影した動画データをHDD34およびメモリカード30の指定した方に記録できる。メモリカード30は、ファイルシステムの空き領域管理単位を越える書き換えサイズでデータを書き込みし、空き領域管理単位より小さいサイズでデータを読み出す記録媒体の一例である。また、HDD34は、ファイルシステムの空き領域管理単位以下のサイズでデータを読み書きする記録媒体の一例である。
The
本実施例のビデオカメラ10はまた、動作モードとして、リアルタイム記録モードとコピーモードを具備する。リアルタイム記録モードでは、撮影映像を含むストリームデータをリアルタイムにメモリカード30またはHDD34に記録する。コピーモードでは、メモリカード30とHDD34間で記録データ、たとえば、ストリームデータをコピーする。
The
撮像部12は、被写体の光学像を電気信号に変換する。映像信号処理部14は、撮像部12からの映像信号をA/D変換し、ガンマ補正、色バランス調整及び色変換等の所定の画像処理を施す。フレームメモリ16は、映像信号処理部14からの画像データを表示用及び記録処理用に一時記憶するのに使用される。
The
マイク18は、外部の音声を取り込み、音声信号を出力する。音声信号処理部20は、マイク18からの音声信号をA/D変換し、PCM符号化方式で符号化する。PCMバッファ22は、音声信号処理部20からのPCM音声データを記録処理用に一記記憶する。
The
コーデック(CODEC)24は、記録時には、フレームメモリ16に格納される画像データとPCMバッファ22に格納されるPCM音声データを圧縮符号化及び多重化し、所定形式のストリームデータを生成する。即ち、コーデック24は、ストリームデータ生成手段に相当する。生成されたストリームデータは、ストリームバッファ26に一時格納され、カードインターフェース(I/F)28を介してメモリカード30に、また、HDDインターフェース32を介してHDD34に記録される。コーデック24はまた、再生モードで、メモリカード30又はHDD34から読み出されたストリームデータの圧縮画像データ及び圧縮音声データを伸長する。
During recording, the codec (CODEC) 24 compresses and encodes the image data stored in the
ユーザは、操作部36は、ユーザが種々の指示をビデオカメラ10に入力ために使用される。表示部38は液晶表示パネルからなり、記録時は撮像部12によって撮像される映像を表示し、再生時には再生映像を表示する。表示部38はまた、ビデオカメラ10に対する設定メニュー等、記録時間、及びバッテリ残量等の情報を表示する。
The user uses the
CPU(中央演算処理装置)40は、ビデオカメラ10の各部を制御する。ファイルシステム42は、メモリカード30へのファイルの書込みと読出しに必要な情報を提供する。書込み管理部44は、ファイルシステム42と連携して、メモリカード30及びHDD34への書込みを管理する。書き込み管理部44は記録シーケンス決定手段として機能する。
A CPU (Central Processing Unit) 40 controls each part of the
具体的には、記録先がメモリカード30である場合、書込み管理部44は、メモリカード30の断片化の状態およびメモリカード30の性能情報からメモリカード30内の各領域の書込み可能速度を算出する。また、書込み管理部44は、データ書込み要求に対し、データのビットレートに応じてメモリカード30上の書込み領域を決定する。記録先がHDD34の場合、書込み管理部44は、これらとは異なる書込み制御を行う。
Specifically, when the recording destination is the
書込み管理部44は、メモリカード30が接続されると、図6に示すプロセスでメモリカード30から必要な情報を取得し、スピードクラスを適用可能な状態にする。
When the
まず、接続されたメモリカード30のファイルシステムをマウントし(S1)、メモリカード30からAUサイズを取得する(S2)。次にRUサイズを決定する(S3)。RUサイズは、クラスタサイズ以上、AUサイズ未満であり、記録レートに応じて最小サイズが規格で定められているので、これを満たすように決定される。
First, the file system of the
メモリカード30に動画を記録する場合の動作を説明する。動画記録モードでは、撮像部12からの画像信号は、映像信号処理部14によってビデオフレームデータに変換され、フレームメモリ16に格納される。音声信号処理部20は、マイク18からの音声信号をPCM音声データに変換し、PCMバッファ22に格納する。コーデック24は、これらの映像データ及び音声データを符号化し、多重化して一本のストリームデータを生成する。このストリームデータは、ストリームバッファ26でバッファリングされる。動画記録中は以上の処理が並行して行われており、ストリームバッファ26には継続してストリームデータが書き込まれる。
An operation when a moving image is recorded on the
書込み管理部44は、ストリームバッファ26がオーバーフローしないように、メモリカード30の書込み領域を管理しつつ、ストリームデータのメモリカード30への書込みを制御する。
The
まず、各AUについて使用済みRUの割合(以下、AUの断片化率と記す)を調べ、その大きさ順に並び替えてAU情報テーブルとして保持する。この時点で、書込み管理部44は、空き領域検出手段として機能する。図4は、メモリカード30のAUテーブル例を示す。本実施例では、各AUは、断片化率に応じて、3つの領域A,B,Cに分類して管理される。領域Aはリアルタイム書込み可能領域であり、スピードクラスにて規定される書込み速度がストリームのビットレートr以上である。領域Bはリアルタイム書込み不可領域であり、スピードクラスにて規定される書込み速度がストリームのビットレートr未満である。領域CはAU内に空きクラスタが存在しない領域であり、全てが使用済み領域のため書込みが不可能な使用済み領域である。
First, the ratio of used RUs (hereinafter referred to as the AU fragmentation rate) is examined for each AU, rearranged in order of size, and held as an AU information table. At this point, the
このAU情報テーブルは、記録中、メモリカード30へのデータ書込みが行われる毎に最新の状態に更新される。領域Aはリアルタイムデータの書込み先として使用され、領域Bは非リアルタイムデータの書込み先として使用されることになる。
This AU information table is updated to the latest state every time data is written to the
図7は、書込み管理部44の制御フローチャートを示す。図7を参照して、書込み管理部44の動作を説明する。
FIG. 7 shows a control flowchart of the
記録が開始されると、記録ビットレートrを取得し(S11)、AU情報テーブルを更新する(S12)。AU情報テーブルの更新は、AU毎の断片化率を取得し、記録ビットレートrと照合して各AUを領域A,B,Cに分類する処理でもある。 When recording is started, the recording bit rate r is acquired (S11), and the AU information table is updated (S12). The update of the AU information table is also a process of acquiring the fragmentation rate for each AU and collating it with the recording bit rate r to classify each AU into areas A, B, and C.
領域Aの大きさが一定値Ath以上であれば(S13)、記録可能な空き領域があると判断し、記録を続行する。ストリームバッファ26に最低書込み単位以上のストリームデータが蓄積されるのを待ち、また、記録停止の指示の有無をモニタする(S14)。本実施例では、最低書込み単位はカード毎に規定されたAUサイズ分としている。
If the size of the area A is equal to or larger than the predetermined value Ath (S13), it is determined that there is a recordable free area, and the recording is continued. Waiting for the accumulation of stream data of at least the minimum writing unit in the
記録終了指示があった場合(S15)、未書込みデータをメモリカード30に書き出して、記録を終了する(S17)。
When there is a recording end instruction (S15), unwritten data is written to the
記録終了の指示が無く、ストリームバッファ26に最低書込み単位以上のストリームデータが蓄積されると、領域Aにストリームデータを書き込む(S16)。この書込みに応じて、AU情報テーブルが更新される(S12)。
If there is no instruction to end recording and stream data of the minimum writing unit or more is accumulated in the
ステップS12〜S16が記録の間、繰り返される。 Steps S12 to S16 are repeated during recording.
記録媒体間でデータをコピーするコピーモードの動作を説明する。ここでは、HDD34からメモリカード30に動画ストリームデータをコピーする動作を説明する。ユーザは、操作部36により、コピーすべきストリームを選択したうえで、コピー開始を指示する。指定されたストリームのストリームデータがHDD34からHDDインターフェース32により読み出される。読み出されたストリームデータは、ストリームバッファ26で一時的にバッファリングされたうえで、カードインターフェース28によりメモリカード30に書き込まれる。
An operation in a copy mode for copying data between recording media will be described. Here, an operation of copying moving image stream data from the
書込み管理部44は、メモリカード30への書込みを以下のように制御する。図8は、その制御フローチャートを示す。
The
まず、コピー元のストリームに対応する管理ファイルを読み込むことでビットレートRstreamを取得する(S21)。これは、ビットレート取得手段に相当する作用である。続いて、メモリカード30のリード(読出し)速度Preadを取得する(S12)。これは、読出し速度取得手段に相当する作用である。この測定は、一定の個数のRUをランダムリードするという条件で行われる。この速度PreadはRU単位でアクセスする場合における、RU単位での断片化が発生している最悪条件でのリード速度である。ここで取得したリード速度Preadは、後に書込み制御に利用される。
First, the bit rate Rstream is acquired by reading the management file corresponding to the copy source stream (S21). This is an operation corresponding to the bit rate acquisition means. Subsequently, the read (read) speed Pred of the
さらに、メモリカード30のAU情報テーブルを取得する(S23)。残量が無い場合、残量がない旨の警告を表示して(S31)、終了する。一方残量が一定量以上存在する場合、ストリームのコピーを実行する(S25〜S30)。
Further, the AU information table of the
ストリームのビットレートRstreamよりもリード速度Preadが高速の場合(S25)、HDD34からメモリカード30へのコピーを実行する(S28〜S30)。即ち、コピー元のHDD34から一定量のストリームデータが読み出されてストリームバッファ26に書き込まれる(S29)。ストリームバッファ26のストリームデータが、メモリカード30にRU単位で書き込まれる(S30)。全データのコピーが終了するまで(S28)、このステップS29、S30を繰り返す。
When the read speed Read is higher than the bit rate Rstream of the stream (S25), copying from the
メモリカード30への書込み単位をRUとすることで、再生時に読出しが間に合うことが保証される。また、本実施例では、コピー時には、まず、領域Bを選んでデータを書き込む。そして、領域BのAUに全てデータを書いてしまった後で、領域Aにデータを書き込む様にする。
By setting the unit of writing to the
この様にコピー時のデータ書き込みを制御することで、高速に書込み可能な領域Aを残し、動画記録時間を可能な限り長くすることが可能になる。これはまた、HDD34の記録データをメモリカード30の、前記記録データのレートに対応する読出し速度以上の領域にコピーすることに相当する。
By controlling the data writing at the time of copying in this way, it is possible to leave the area A where data can be written at high speed and to make the moving image recording time as long as possible. This also corresponds to copying the recording data of the
リード速度PreadがビットレートRstreamより低速、すなわち、遅い場合(S25)、連続再生が保証できないことになってしまう。しかし、アーカイブ目的としては問題がない。そこで、この場合、連続再生が保証できない旨を表示部38に表示してユーザに通知したうえで、コピーを続行するか否かをユーザに選択させる(S26)。ユーザがコピーを行わないことを選択した場合(S27)、何も行わずに処理を終了する。ユーザがコピーの続行を選択した場合(S27)、先に説明したように、ステップS28〜S30でコピーが実行される。
If the read speed Pred is lower than the bit rate Rstream, that is, slower (S25), continuous reproduction cannot be guaranteed. However, there is no problem for archiving purposes. Therefore, in this case, the
メモリカード30への書込みをRU単位とするのは、スピードクラスによる書込み制御との整合性を保つためである。一般に、メモリカードは書込みよりも読み込みのほうが大幅に高速である。また、断片化していても、HDDで見られるような物理的なシークが発生しない。そこで、このような制御を行うことで、リアルタイム記録が間に合わないような、ビットレートが高いストリームでも、多くの場合に連続再生を保証できる。
The reason why writing to the
次に、HDD34を記録先とする場合の動画記録における書込み制御を説明する。ストリームデータの生成までの動作自体は、メモリカード30を記録先とする場合と同じであるので、説明を省略する。
Next, writing control in moving image recording when the
HDD34は、ビデオカメラ10に固定的に接続されている。HDD34のシーク時間及びシーケンシャルアクセス速度等の性能は、動画記録の記録時でも破綻しないように設定されている。しかし、断片化が進んでしまうと、シークが大量に発生し、動画のストリームデータの書込みが間に合わずにバッファオーバーフローを起こしてしまう可能性がある。そこで、書込み管理部44は、HDD34内の記録領域をクラスタサイズの整数倍となる所定のサイズ毎に分割した単位(以下、WUとする)で、以下の3つの領域D,E,Fに分類して管理する。領域Dは、領域内の全クラスタが未使用であるリアルタイム書込み可能領域である。領域Eは、領域内に使用済みクラスタが存在する領域であり、リアルタイム書込みを避けるべきリアルタイム書込み不可領域である。領域Fは領域内の全クラスタが使用済みの領域である。図5は、この空き領域管理テーブル例である。
The
領域Dに分類されたWUに対して書込みを行った場合、書込み中にシークは発生せず、シーケンシャルライトとなる。従って、高速な書込みが可能となる。記録データのビットレートに応じてWUのサイズを適切に設定することで、書込み間のシーク発生を極力、避けることができ、破綻なく記録を行うことができる。領域Eは非リアルタイムデータの記録先として利用される。 When writing is performed on the WU classified in the region D, no seek occurs during writing, and sequential writing is performed. Accordingly, high-speed writing is possible. By appropriately setting the size of the WU according to the bit rate of the recording data, it is possible to avoid the occurrence of seek between writings as much as possible, and recording can be performed without failure. The area E is used as a recording destination for non-real time data.
図9は、HDD34に動画を記録する場合の、書込み管理部44の制御フローチャートを示す。
FIG. 9 shows a control flowchart of the
記録が開始されると、記録ビットレートrを取得し(S41)、このビットレートrに応じたWUサイズを決定する(S42)。次いで、空き領域管理テーブルを更新する(S43)。空き領域管理テーブルの更新は、WU毎に使用済みクラスタの有無を確認し、領域D,E,Fに再分類する処理である。 When recording is started, a recording bit rate r is acquired (S41), and a WU size corresponding to the bit rate r is determined (S42). Next, the free space management table is updated (S43). The update of the free area management table is a process of confirming the presence or absence of a used cluster for each WU and reclassifying the areas into areas D, E, and F.
更新した空き領域管理テーブルで、領域Dが一定のマージン量以上存在すれば空き領域が存在すると判断される(S44)。WUのサイズだけストリームデータがストリームバッファ26に蓄積されるか、ユーザの記録終了指示を待機する(S45)。WUのサイズだけストリームデータがストリームバッファ26に蓄積されると、領域DのWUにストリームデータを書き込み(S47)、ステップS43以降を繰り返す。
In the updated free area management table, it is determined that there is a free area if the area D exists more than a certain margin amount (S44). Stream data corresponding to the size of WU is accumulated in the
途中で記録終了の指示があると(S46)、書込み単位のストリーム蓄積を待たずに、未書込みデータをHDD34に書き込んで(S48)、終了する。また、更新した空き領域管理テーブルで、領域Dが一定のマージン量未満の場合にも(S44)、未書込みデータをHDD34に書き込んで(S48)、終了する。
If there is an instruction to end recording in the middle (S46), the non-written data is written in the
領域Dにストリームデータを記録することで、断片化によるシークの発生頻度を一定値以下に押さえ、これによってリアルタイム書込みを保証することを可能としている。 By recording the stream data in the area D, it is possible to keep the occurrence frequency of seek due to fragmentation below a certain value, thereby guaranteeing real-time writing.
メモリカード30からHDD34にストリームデータをコピーする場合、リアルタイムで動画をHDD34に記録する場合と同様の書込み制御を行うことで、コピーした動画ストリームデータの連続再生を保証する。図10は、メモリカード30からHDD34にストリームデータをコピーする場合の書込み管理部44の制御フローチャートを示す。
When copying stream data from the
記録開始後、ストリームのビットレートrを取得し(S51)、このビットレートrに応じたWUサイズを決定する(S52)。次いで、空き領域管理テーブルを更新する(S53)。 After starting recording, the bit rate r of the stream is acquired (S51), and the WU size corresponding to the bit rate r is determined (S52). Next, the free space management table is updated (S53).
領域Dがコピーすべきストリームサイズ以上存在するかどうかを調べる(S54)。領域Dが十分な場合、コピーを実行する(S58〜S61)。即ち、コピー元のメモリカード30から一定量のストリームデータが読み出されてストリームバッファ26に書き込まれる(S59)。ストリームバッファ26のストリームデータが、HDD34にWU単位で書き込まれ(S60)、HDD34に対する空き領域管理テーブルが更新される(S61)。全データのコピーが終了するまで(S58)、これらのステップS59〜S61を繰り返す。
It is checked whether the area D is larger than the stream size to be copied (S54). If the area D is sufficient, copying is executed (S58 to S61). That is, a certain amount of stream data is read from the copy
領域Dがストリームサイズに満たない場合(S54)、領域Eの大きさがストリームサイズ以上か否かを調べる(S55)。領域Eの大きさがストリームサイズ以上であれば、連続再生は保証できないがコピーは可能と判断する。この場合、連続再生が保証できない旨のメッセージを表示したうえでユーザにコピーを続行するかを問い合わせる(S56)。ユーザがコピーの続行を選択した場合(S57)、コピーを実行する(S58〜S61)。 When the area D is less than the stream size (S54), it is checked whether the area E is equal to or larger than the stream size (S55). If the size of the area E is equal to or larger than the stream size, it is determined that continuous reproduction cannot be guaranteed but copying is possible. In this case, after displaying a message indicating that continuous reproduction cannot be guaranteed, the user is inquired whether to continue copying (S56). When the user selects to continue copying (S57), copying is executed (S58 to S61).
領域Eも必要量存在しない場合(S55)、コピーできるだけの空き領域が存在しない旨のメッセージを表示し(S62)、終了する。 If the necessary amount of the area E does not exist (S55), a message indicating that there is no free area that can be copied is displayed (S62), and the process ends.
10 ビデオカメラ
12 撮像部
14 映像信号処理部
16 フレームメモリ
18 マイク
20 音声信号処理部
22 PCMバッファ
24 コーデック
26 ストリームバッファ
28 メモリインターフェース
30 メモリカード
32 HDDインターフェース
34 HDD
36 操作部
38 表示部
40 CPU(中央演算処理装置)
42 ファイルシステム
44 書込み管理部
DESCRIPTION OF
36
42
Claims (3)
第1の記録媒体に前記動画データを書き込む第1の記録媒体インターフェースと、
第2の記録媒体から動画データを読み出す第2の記録媒体インターフェースと、
前記生成手段により生成された動画データを前記第1の記録媒体に書き込む第1のモードと、前記第2の記録媒体に記録された動画データを前記第1の記録媒体に書き込む第2のモードを切り替えるモード切り替え手段と、
前記第1の記録媒体の複数の記録領域それぞれに含まれる未使用領域に基づいて前記第1の記録媒体インターフェースを制御する制御手段
とを備え、
前記制御手段は、前記第1のモードにおいては、前記第1の記録媒体の複数の記録領域のうち前記未使用領域の大きさが第2の領域よりも大きい第1の領域を選択し、選択した前記第1の領域に前記生成手段により生成された前記動画データを書き込み、前記第2のモードにおいては、前記第2の領域の読み出し速度が前記動画データのレートに対応する読み出し速度よりも大きい場合に前記第2の領域に前記第2の記録媒体に記録された動画データを書き込むように、前記第1の記録媒体インターフェースを制御することを特徴とする記録装置。 Generating means for generating video data;
A first recording medium interface for writing the moving image data to a first recording medium;
A second recording medium interface for reading moving image data from the second recording medium;
A first mode for writing the moving image data generated by the generating means to the first recording medium, and a second mode for writing the moving image data recorded on the second recording medium to the first recording medium. Mode switching means for switching;
Control means for controlling the first recording medium interface based on unused areas included in each of the plurality of recording areas of the first recording medium
And
In the first mode, the control means selects and selects a first area in which the size of the unused area is larger than the second area among the plurality of recording areas of the first recording medium. The moving image data generated by the generating unit is written to the first area, and in the second mode, the reading speed of the second area is higher than the reading speed corresponding to the rate of the moving image data. In this case, the recording apparatus controls the first recording medium interface so that the moving image data recorded on the second recording medium is written in the second area .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008172573A JP5178355B2 (en) | 2008-07-01 | 2008-07-01 | Recording device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008172573A JP5178355B2 (en) | 2008-07-01 | 2008-07-01 | Recording device |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2010015251A JP2010015251A (en) | 2010-01-21 |
JP2010015251A5 JP2010015251A5 (en) | 2011-08-18 |
JP5178355B2 true JP5178355B2 (en) | 2013-04-10 |
Family
ID=41701333
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008172573A Active JP5178355B2 (en) | 2008-07-01 | 2008-07-01 | Recording device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5178355B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5693277B2 (en) * | 2011-02-10 | 2015-04-01 | キヤノン株式会社 | Recording apparatus and recording method |
KR101487609B1 (en) | 2013-07-24 | 2015-01-29 | 주식회사 코아로직 | Method and apparatus for preventing misoperation of storage device |
US10268413B2 (en) * | 2017-01-27 | 2019-04-23 | Samsung Electronics Co., Ltd. | Overflow region memory management |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005050192A (en) * | 2003-07-30 | 2005-02-24 | Matsushita Electric Ind Co Ltd | Information recording system |
JP4001135B2 (en) * | 2004-08-18 | 2007-10-31 | ソニー株式会社 | Video signal processing device |
JP2006285669A (en) * | 2005-03-31 | 2006-10-19 | Toshiba Corp | Host apparatus |
JP4603953B2 (en) * | 2005-08-12 | 2010-12-22 | キヤノン株式会社 | Image data recording apparatus and method |
JP4721953B2 (en) * | 2006-05-24 | 2011-07-13 | Hoya株式会社 | Image recording device |
-
2008
- 2008-07-01 JP JP2008172573A patent/JP5178355B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2010015251A (en) | 2010-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20080025706A1 (en) | Information recording apparatus and control method thereof | |
JP5235541B2 (en) | Recording apparatus and method | |
JP5378197B2 (en) | Memory controller, memory card, nonvolatile memory system | |
US7613892B2 (en) | Recording device, recording method, recording medium, and program | |
JP5178355B2 (en) | Recording device | |
JP4241839B2 (en) | Data and file system information recording apparatus and recording method | |
JP4621794B1 (en) | Cache memory control method and information storage device including cache memory | |
JP2010237907A (en) | Storage device and recording method | |
JP5523128B2 (en) | Recording apparatus and control method thereof | |
EP1684288A1 (en) | Information recorder, information recording method, and recording medium containing program | |
JP2009283046A (en) | Information recording method and information recording apparatus | |
JP2013090134A (en) | Recording device and recording method | |
JP4401666B2 (en) | Digital image recording apparatus and image viewer apparatus | |
JP2009140233A (en) | Video recording apparatus and monitoring system | |
KR101320917B1 (en) | Method for writing file by different writing scheme according to file characteristic and electronic device thereof | |
JP2004171670A (en) | Recording and reproducing device and recording and reproducing method | |
US10950274B2 (en) | Image recording apparatus, method for controlling same, and non-transitory computer-readable storage medium | |
US11507306B2 (en) | Recording apparatus that records data using file system, control method therefor, and storage medium storing control program therefor | |
JP2004078704A (en) | Image and sound record/playback device and file read/write method thereof | |
JP4281571B2 (en) | Recording apparatus and method, and program | |
JP2016015057A (en) | Recording device | |
JP2016009411A (en) | Recording device | |
JP2017005309A (en) | Recording apparatus, recording method, and program | |
JP2005235007A (en) | Data storage device and method | |
JP4987813B2 (en) | Formatting device, formatting method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110630 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110630 |
|
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: 20121211 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130108 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5178355 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160118 Year of fee payment: 3 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: R3D03 |