JP2016009411A - Recording device - Google Patents

Recording device Download PDF

Info

Publication number
JP2016009411A
JP2016009411A JP2014130848A JP2014130848A JP2016009411A JP 2016009411 A JP2016009411 A JP 2016009411A JP 2014130848 A JP2014130848 A JP 2014130848A JP 2014130848 A JP2014130848 A JP 2014130848A JP 2016009411 A JP2016009411 A JP 2016009411A
Authority
JP
Japan
Prior art keywords
recording
writing
stream data
mode
memory
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
JP2014130848A
Other languages
Japanese (ja)
Inventor
周平 川地
Shuhei Kawachi
周平 川地
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014130848A priority Critical patent/JP2016009411A/en
Publication of JP2016009411A publication Critical patent/JP2016009411A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent reduction of recordable areas due to fragmentation and to prevent recording halt.SOLUTION: A recording device includes: a memory for storing input stream data; recording means that records the stream data stored in the memory onto a recording medium; measurement means that measures a degree of fragmentation in each of a plurality of sub-areas of the recording medium; and control means that controls a first mode for selectively writing data onto sub-areas with degrees of fragmentation greater than a predetermined level and a second mode for selectively writing data onto sub-areas with degrees of fragmentation no greater than the predetermined level. The control means switches either to the first mode or the second mode depending on the situation to write initial stream data supplied after start of recording, and uses the second mode to write data after completion of the initial writing until the end of recording.

Description

本発明は、記録装置に関する。   The present invention relates to a recording apparatus.

近年、メモリカードなど、ファイルシステムを搭載した記録媒体に対してファイルとして動画や静止画を記録するデジタルカメラやデジタルビデオカメラが広く普及してきている。このような機器では種々のファイルに対するランダムアクセスが可能であるため、従来のテープ式カムコーダのような記録メディアに対して利便性が向上している。   In recent years, digital cameras and digital video cameras that record moving images and still images as files on a recording medium equipped with a file system such as a memory card have become widespread. Since such a device allows random access to various files, convenience is improved for a recording medium such as a conventional tape camcorder.

メモリカード等で一般的に用いられているNAND 型フラッシュメモリにおいて、1回の書き込み要求で書き換え可能な最小単位はページと呼ばれている。書き込み済みのページを上書きするには事前に消去を行う必要があるが、消去はページよりも大きなブロックと呼ばれる単位でしか行えない。   In a NAND flash memory generally used in a memory card or the like, the smallest unit that can be rewritten by a single write request is called a page. In order to overwrite a written page, it is necessary to erase in advance. However, erasing can be performed only in units called blocks larger than the page.

したがって、ブロックサイズが大きなメモリに対して小さなサイズの書き込みを行った場合、書き換えたいのはブロック内部の一部のページのみであるにも関わらず、ブロック全体のデータを読み出し、更新された部分のみ書き換えたうえでブロック全体を消去して書き戻すという動作が必要になるため、ブロック単位の大きなサイズの書き込みに比べて速度が低下する。このような内部的にコピーを伴う書き込み動作は引越し書き込みと呼ばれる。さらに、近年のフラッシュメモリの大容量化に伴い、ブロックサイズが大きくなってきていることから、小さな単位の書き込み速度は大きな単位の書き込みに比べて相対的に低下する傾向にある。   Therefore, when writing a small size to a memory with a large block size, you want to rewrite the entire block of data, but only the updated part, even though you want to rewrite only some of the pages inside the block. Since the operation of erasing and rewriting the entire block after rewriting is necessary, the speed is reduced as compared with writing of a large size in block units. Such a write operation with internal copy is called moving write. Furthermore, since the block size has increased with the recent increase in capacity of flash memory, the writing speed of small units tends to be relatively lower than the writing of large units.

こうした書き込み速度の低下はビデオカメラのように継続して記録を行う必要のある機器において問題である。特に、ファイルシステム上の記録領域割り当て状況の断片化が進んだ状態になると、書き込み単位が小さくなり、結果として書き込み速度が低下してしまう。データのビットレートより記録メディアへの書き込みの平均レートが下回ると記録を続行できなくなってしまう。   Such a decrease in writing speed is a problem in a device such as a video camera that requires continuous recording. In particular, when the recording area allocation status on the file system becomes increasingly fragmented, the writing unit becomes smaller, resulting in a decrease in writing speed. If the average rate of writing to the recording medium is lower than the data bit rate, recording cannot be continued.

このような問題に対し、特許文献1では、メモリカードの書き込み領域の割り当てのために記録領域を所定のサイズの管理領域を単位として管理し、管理領域内の未書き込み領域の割合に応じて書き込み速度を予測することで、所望の記録レートの書き込みが可能な前記管理領域を選択的に割り当てるようなホスト機器が提案されている。このような制御を行うことで、ファイルシステムの断片化が進んだ領域を含む状態のメモリカードに対しても安定した記録を可能としている。   In order to deal with such a problem, in Patent Document 1, a recording area is managed in units of a management area of a predetermined size for allocating a writing area of a memory card, and writing is performed according to a ratio of an unwritten area in the management area. There has been proposed a host device that selectively allocates the management area capable of writing at a desired recording rate by predicting the speed. By performing such control, stable recording can be performed even on a memory card including a region where the file system has been fragmented.

しかし、このような制御を行う機器でも以下のような問題が存在する。例えば、ビデオカメラにおいて、特許文献1のように所定サイズの管理単位(AU: Allocation Unit)の未使用領域割合に応じて書き込み領域を選択する場合を考える。図2(a)はあるメモリカードに短時間の記録を3回行った後の記録領域の状況を示している。図中の「書き込み1」、「書き込み2」および「書き込み3」は3回の記録によって発生した書き込みを表している。動画記録中は断片化の発生していない AU を割り当てて動画を記録するためにこのような結果となる。また、斜線部分はファイルシステム上は未使用であるが、一部が使用済みとなった AU 上にあるために高速な書き込みができず、動画記録に使用できなくなった領域である。   However, the following problems also exist in devices that perform such control. For example, consider a case in which a writing area is selected in a video camera in accordance with the unused area ratio of a management unit (AU: Allocation Unit) of a predetermined size as in Patent Document 1. FIG. 2A shows the state of the recording area after performing a short recording three times on a certain memory card. “Write 1”, “Write 2”, and “Write 3” in the figure represent the writings generated by three recordings. This is the result of recording a moving image by assigning an AU that has not been fragmented during moving image recording. The shaded area is an area that is not used on the file system, but cannot be used for moving image recording because high-speed writing cannot be performed because a part is on the used AU.

このように、一般に特許文献1の方法によって動画などのストリームデータの記録を行うと、断片化していないAUが選択的に消費されるため、記録後に残される断片化した AU 内の空き領域はストリームデータの書き込みには使用できなくなる。   As described above, generally, when stream data such as a moving image is recorded by the method of Patent Document 1, unfragmented AU is selectively consumed, so that the free space in fragmented AU remaining after recording is a stream. Cannot be used to write data.

一方、図2(b)は 同図(a) よりも AU サイズが大きいメモリカードにおいて、同様に短い記録を3回行った後の状況を示している。AU サイズが大きいと、図中斜線部分、すなわち動画記録に使用できない領域が大量に発生してしまうことが分かる。このように特に AU サイズが増大している近年のメモリカードでは、記録を繰り返すだけで記録可能容量が実際の記録データ量以上に大きく減少してしまうという問題が存在する。   On the other hand, FIG. 2 (b) shows a situation after three short recordings are similarly performed on a memory card having a larger AU size than FIG. It can be seen that if the AU size is large, a hatched portion in the figure, that is, a large area that cannot be used for moving image recording occurs. As described above, particularly in recent memory cards in which the AU size has increased, there is a problem that the recordable capacity is greatly reduced beyond the actual amount of recorded data simply by repeating the recording.

この問題に対して、特許文献2では記録終了時の最後のデータについては断片化した領域に書き込むことで断片化を抑制するという方法が提示されている。特許文献2では、メモリカードに書き込む前にストリームデータをバッファリングしておき、記録が終了した時点でバッファリングされているデータについては断片化の発生しているAU に記録を行うというものである。これによって、記録する毎に最後の書き込みで断片化したAUを使用するので、断片化が進みにくく、記録可能領域が大きく減少することを防ぐことが可能となる。   With respect to this problem, Patent Document 2 proposes a method of suppressing fragmentation by writing the last data at the end of recording into a fragmented area. According to Patent Document 2, stream data is buffered before being written to a memory card, and the data buffered at the end of recording is recorded in an AU where fragmentation has occurred. . As a result, since the AU fragmented at the last writing is used every time recording is performed, it is difficult for fragmentation to proceed, and it is possible to prevent the recordable area from greatly decreasing.

特開2006−285669号公報JP 2006-285669 A 特開2009−064386号公報JP 2009-064386 A

しかし、特許文献2の方法をビデオカメラに適用する場合に問題となるのが以下の点である。   However, the following points are problems when the method of Patent Document 2 is applied to a video camera.

ビデオカメラではユーザが望んだ瞬間を映像として確実に記録するために、応答性に優れていることが求められる。そのため、記録停止指示がなされてストリームデータを書き終わるよりも前に次の記録開始指示がなされる場合でも、遅延なく記録処理を実行する必要がある。しかし、特許文献2の方法を適用している場合、断片化した領域を選択して書き込み速度が低下している状態で次の記録を開始することになるため、メモリカードへの書き込みが間に合わなくなる恐れがある。   A video camera is required to have excellent responsiveness in order to reliably record a moment desired by a user as an image. Therefore, even when the next recording start instruction is given before the recording stop instruction is given and the writing of the stream data is finished, it is necessary to execute the recording process without delay. However, when the method of Patent Document 2 is applied, since the next recording is started in a state where the fragmented area is selected and the writing speed is reduced, writing to the memory card is not in time. There is a fear.

したがって、AU の断片化による無駄な空き領域の増加を抑えながら確実なストリームデータの記録を行い、かつ記録終了直後の極端な応答性の低下を防止するような記録装置が求められていた。   Therefore, there has been a demand for a recording apparatus that can reliably record stream data while suppressing an increase in useless free space due to AU fragmentation, and prevent an extremely low response immediately after the end of recording.

本発明は、断片化による記録可能領域の減少を防ぎ、かつ応答性の低下やバッファオーバーフローによる記録停止を防ぐことを目的とする。   An object of the present invention is to prevent a recordable area from being reduced due to fragmentation, and to prevent a recording stop due to a decrease in responsiveness or a buffer overflow.

本発明に係る記録装置の構成は、入力されたストリームデータを記憶するメモリと、前記メモリに記憶されたストリームデータを記録媒体に記録する記録手段と、前記記録媒体における複数の部分領域それぞれの断片化の程度を測定する測定手段と、所定値よりも大きな断片化率の部分領域を選択して書き込む第1のモードと、前記所定値以下の断片化率の部分領域を選択して書き込む第2のモードとを制御する制御手段とを備え、前記制御手段は、記録開始後に最初に供給されたストリームデータの書き込みには状況に応じて前記第1および第2のモードを切り替えて適用し、前記最初の書き込みを完了した後、記録終了までの書き込みには前記第2のモードを適用することを特徴とする。   The configuration of the recording apparatus according to the present invention includes a memory that stores input stream data, a recording unit that records the stream data stored in the memory on a recording medium, and a fragment of each of a plurality of partial areas in the recording medium Measuring means for measuring the degree of fragmentation, a first mode for selecting and writing a partial region with a fragmentation rate larger than a predetermined value, and a second mode for selecting and writing a partial region with a fragmentation rate less than the predetermined value Control means for controlling the mode, and the control means switches between and applies the first and second modes according to the situation for writing the stream data supplied first after the start of recording, The second mode is applied to writing until the end of recording after the first writing is completed.

本発明によれば、断片化による記録可能領域の減少を防ぎ、かつ応答性の低下やバッファオーバーフローによる記録停止を防ぐことが可能となる。   According to the present invention, it is possible to prevent a recordable area from being reduced due to fragmentation, and to prevent a recording stop due to a decrease in responsiveness or a buffer overflow.

記録装置の構成図であるIt is a block diagram of a recording device. 記録媒体の使用状況を説明する図である。It is a figure explaining the usage condition of a recording medium. AUを説明する図である。It is a figure explaining AU. スピードクラス制御を説明する図である。It is a figure explaining speed class control. AU管理テーブルを説明する図である。It is a figure explaining an AU management table. データバッファを説明する図である。It is a figure explaining a data buffer. データバッファの状況を示す図である。It is a figure which shows the condition of a data buffer. 書き込み制御を示すフローチャートである。It is a flowchart which shows write-in control. 書き込み制御を示すフローチャートである。It is a flowchart which shows write-in control.

[実施例]
以下では、本発明の実施形態について説明する。図1は本実施形態が適用されるビデオカメラ100の構成を示したものである。ビデオカメラ100は、メモリカード112に対して撮影した動画データを記録することができる。
[Example]
Hereinafter, embodiments of the present invention will be described. FIG. 1 shows the configuration of a video camera 100 to which the present embodiment is applied. The video camera 100 can record moving image data shot on the memory card 112.

ビデオカメラ100は撮像部101、映像信号処理部102、フレームメモリ103、マイク104、音声信号処理部105、PCMバッファ106、VIDEOコーデック(CODEC)107,AUDIOCODEC108,多重化(MUX)処理部109、空き領域管理部110,メモリカード I/F 111、メモリカード112、操作部113、表示部114、CPU(中央演算処理装置)115、ファイル管理部116、ファイルシステム117およびデータバッファ118から成る。   The video camera 100 includes an imaging unit 101, a video signal processing unit 102, a frame memory 103, a microphone 104, an audio signal processing unit 105, a PCM buffer 106, a VIDEO codec (CODEC) 107, an AUDIOCODEC 108, a multiplexing (MUX) processing unit 109, and a free space. An area management unit 110, a memory card I / F 111, a memory card 112, an operation unit 113, a display unit 114, a CPU (central processing unit) 115, a file management unit 116, a file system 117, and a data buffer 118 are included.

図1において、撮像部101は被写体像を捉えて電気信号に変換するものである。映像信号処理部102は撮像部101で得られた映像信号にA/D変換および適切な画像処理を施すものである。フレームメモリ103は記録時、映像信号処理部にて生成されたビデオフレームデータを格納するものである。マイク104は外部の音声を取り込むものであり、音声信号処理部105はマイク104で得られた音声信号にA/D変換および適切な信号処理を施すものである。PCMバッファ106は記録時、マイク104から取り込んでAD変換されたPCMデータを格納するものである。   In FIG. 1, an imaging unit 101 captures a subject image and converts it into an electrical signal. The video signal processing unit 102 performs A / D conversion and appropriate image processing on the video signal obtained by the imaging unit 101. The frame memory 103 stores video frame data generated by the video signal processing unit during recording. The microphone 104 captures external audio, and the audio signal processing unit 105 performs A / D conversion and appropriate signal processing on the audio signal obtained by the microphone 104. The PCM buffer 106 stores PCM data taken from the microphone 104 and AD-converted during recording.

VIDEOコーデック(CODEC)107は記録時、フレームメモリ103に格納されたビデオフレームデータに対して圧縮符号化を施しビデオストリームとして出力するものである。AUDIOCODEC108はPCMバッファ106に格納されたPCMデータに対して圧縮符号化を施し、オーディオストリームを出力するものである。多重化(MUX)処理部109はVIDEOCODEC107が出力するビデオストリームとAUDIO CODEC108が出力したオーディオストリームを多重化し、AVストリームとして出力するものである。   A VIDEO codec (CODEC) 107 performs compression encoding on video frame data stored in the frame memory 103 and outputs it as a video stream during recording. The AUDIOCODEC 108 performs compression coding on the PCM data stored in the PCM buffer 106 and outputs an audio stream. A multiplexing (MUX) processing unit 109 multiplexes the video stream output from the VIDEOCODEC 107 and the audio stream output from the AUDIO CODEC 108, and outputs the result as an AV stream.

メモリカードI/F111は装着されたメモリカード112に対して読み書きを行うものであり、メモリカード112はビデオカメラ100で撮影した動画像データを記録するものである。操作部113はユーザからの操作を受け付けて、ビデオカメラ100を操作するためのものである。表示部114は液晶画面(図示しない)を有し、記録時は撮像部101によって取り込まれた映像、再生時は再生映像を表示するものである。またビデオカメラ100に対する設定メニュー等あるいは記録時間やバッテリ残量等の情報を表示する機能も有する。   The memory card I / F 111 reads / writes data from / into the memory card 112 mounted, and the memory card 112 records moving image data shot by the video camera 100. The operation unit 113 is for receiving an operation from the user and operating the video camera 100. The display unit 114 has a liquid crystal screen (not shown), and displays a video captured by the imaging unit 101 during recording and a reproduced video during playback. It also has a function of displaying a setting menu or the like for the video camera 100 or information such as recording time and remaining battery level.

CPU(中央演算処理装置)115はソフトウェアによって各部の動作を制御するものである。ファイル管理部116は記録時、ファイルレベルの書き込みを制御するものである。ファイルシステム117はメモリカード112に対するファイルレベルのアクセスを提供するものである。データバッファ118は記録時、生成されたAVストリームを格納するバッファである。データバッファ118でAVストリームをバッファリングすることで、ビデオカメラ100は記録終了時に全てのデータ書き込みが完了していなくても、次回の記録を開始することができる。   A CPU (Central Processing Unit) 115 controls the operation of each unit by software. The file management unit 116 controls file level writing during recording. The file system 117 provides file level access to the memory card 112. The data buffer 118 is a buffer for storing the AV stream generated during recording. By buffering the AV stream with the data buffer 118, the video camera 100 can start the next recording even if all the data has not been written at the end of the recording.

図6はデータバッファ118のイメージを表したものである。データバッファ118はAVストリームに対する先入れ先出し方式のバッファとして動作し、多重化処理部109から入力されたストリームデータをメモリカードI/F111に受け渡す。   FIG. 6 shows an image of the data buffer 118. The data buffer 118 operates as a first-in first-out buffer for the AV stream, and transfers the stream data input from the multiplexing processing unit 109 to the memory card I / F 111.

SDカードでは、リアルタイムデータを破綻なく記録可能とするためにスピードクラスというものを規定している。スピードクラスについて図3および4を用いて説明する。スピードクラスでは図3のようにカード上の記録領域をAU(Allocation Unit)と呼ばれる単位で区切り、各AUに対して断片化の程度を測定することが規定されている。具体的にはAUはFATにおけるクラスタサイズの整数倍となっており、AUにおけるFATの使用済みクラスタの割合が断片化率となる。   The SD card defines a speed class so that real-time data can be recorded without failure. The speed class will be described with reference to FIGS. The speed class stipulates that the recording area on the card is divided into units called AUs (Allocation Units) and the degree of fragmentation is measured for each AU as shown in FIG. Specifically, AU is an integer multiple of the cluster size in FAT, and the proportion of used clusters in FAT in AU is the fragmentation rate.

AUの断片化率に応じて、そのAU内の空きクラスタへの最低書き込み速度が規定されており、書き込むデータのビットレートより高速な書き込みが可能なAUに対して選択的に書き込みを行うことで、リアルタイムデータを確実にカードに記録することが可能となっている。   Depending on the fragmentation rate of the AU, the minimum writing speed to the free cluster in the AU is specified, and by selectively writing to the AU that can write faster than the bit rate of the data to be written Real-time data can be reliably recorded on the card.

以下で図4を用いて具体例を説明する。あるカードでは、図中に示すようにAU内の空きクラスタの割合が100%ならば6MB/sec 、75%ならば4MB/sec、50%ならば2MB/sec、25%ならば1MB/secでの書き込みが可能である。したがって、ビットレート3MB/sec のストリームをリアルタイムに記録する場合、空きクラスタの割合が100%、あるいは75%の領域を使用することで、バッファオーバーフローを発生させることなく記録を継続することが可能である。   A specific example will be described below with reference to FIG. On some cards, as shown in the figure, if the rate of the free cluster in the AU is 100%, it is 6MB / sec, if it is 75%, 4MB / sec, if it is 50%, 2MB / sec, if it is 25%, it is 1MB / sec. Can be written. Therefore, when recording a stream with a bit rate of 3 MB / sec in real time, it is possible to continue recording without causing a buffer overflow by using an area where the percentage of free clusters is 100% or 75%. is there.

ビデオカメラ100では、メモリカード112の種類としてSDカードを採用しており、カードからスピードクラスに関する情報を取得して動画記録時の書き込み制御に利用する。   In the video camera 100, an SD card is adopted as the type of the memory card 112, and information on the speed class is acquired from the card and used for writing control at the time of moving image recording.

(記録時における書き込み領域の選択)
記録時、空き領域管理部110は以下のようにして書き込み領域の管理を行う。まず、各AUについて断片化率を調べ、断片化率の大きさ順に並び替えてAU情報テーブルとして保持する(図5)。このとき、各AUは断片化率に応じて以下の3つに分類して管理される。
(Selection of writing area during recording)
During recording, the free area management unit 110 manages the write area as follows. First, the fragmentation rate is examined for each AU, rearranged in order of the fragmentation rate, and stored as an AU information table (FIG. 5). At this time, each AU is managed by being classified into the following three types according to the fragmentation rate.

領域A:リアルタイム書き込み可能な領域
スピードクラスにて規定される書き込み速度がストリームのビットレート r 以上である
領域B:リアルタイム書き込み不可能な領域
スピードクラスにて規定される書き込み速度がストリームのビットレート r 未満である
領域C:AU内に空きクラスタが存在しない領域
全てが使用済み領域のため書き込みが不可能な領域
上記AU情報テーブルは記録中、カードへの書き込みが行われる毎に最新の状態に更新される。
Area A: The write speed specified by the real-time writable area speed class is equal to or higher than the stream bit rate r Area B: The write speed specified by the real-time writable area speed class is the stream bit rate r Area C: Area in which no free cluster exists in the AU is an area that cannot be written because it is a used area. The AU information table is updated to the latest state each time data is written to the card during recording. Is done.

以下では、定常記録中および記録開始時のそれぞれについて、メモリカード112へのAVストリームデータ書き込み制御の詳細を説明する。   Hereinafter, details of AV stream data writing control to the memory card 112 will be described during steady recording and at the start of recording.

(定常記録中の書き込み制御)
定常記録中の書き込み処理の流れを図8に示す。AVストリームデータの書き込みは常にクラスタサイズの整数倍で行われ、書き込み位置がAU境界に達する毎に(図8Step1 Yes)空き領域管理部110はAU管理テーブルから領域Aに属するAUを割り当てる(同図Step2)。引き続き、データバッファ118にバッファリングされたAVストリームデータをメモリカードに書き込む(同図Step3)。このようにすることで、定常記録中に確実に記録を継続することを可能としている。
(Write control during regular recording)
FIG. 8 shows the flow of writing processing during steady recording. AV stream data is always written at an integer multiple of the cluster size, and every time the write position reaches the AU boundary (Step 1 Yes in FIG. 8), the free space management unit 110 assigns an AU belonging to region A from the AU management table (FIG. 8). Step2). Subsequently, the AV stream data buffered in the data buffer 118 is written to the memory card (Step 3 in the figure). In this way, recording can be surely continued during steady recording.

(記録開始時の書き込み制御)
空き領域管理部110は記録開始時点でデータバッファ118に直前の記録による未書き込みのAVストリームデータが残っている場合、データバッファ118に余裕がないと判断し、空き領域の割り当て方法を切り替える処理を行う。
(Write control at the start of recording)
When there is unwritten AV stream data from the previous recording in the data buffer 118 at the start of recording, the free space management unit 110 determines that there is no room in the data buffer 118 and switches the free space allocation method. Do.

例えば、1回目の記録完了後、すぐに2回目の記録開始操作を行った場合、ストリームバッファ118には図7示すように、1回目と2回目の記録で生成された未書き込みのストリームデータが蓄積された状態となる。データバッファ118には1回目の記録によるストリームデータD1、2回目の記録で生成された未書き込みのストリームデータD2が存在する。以下、D1の大きさをS1、D2の大きさをS2とする。   For example, when the second recording start operation is performed immediately after the completion of the first recording, the unwritten stream data generated in the first and second recordings is stored in the stream buffer 118 as shown in FIG. Accumulated state. The data buffer 118 includes stream data D1 generated by the first recording and unwritten stream data D2 generated by the second recording. Hereinafter, the size of D1 is S1, and the size of D2 is S2.

記録開始後、ストリームデータの書き込みを開始するために最低限必要な蓄積量をSthとする。Sthの値はストリームデータの多重化の最小単位などに基づいて決められる。2回目の記録によるストリームデータD2がSthだけ蓄積された時点で、S1が0でない場合は、少なくともD1の書き込みが完了するまでD2の書き込み開始は遅延されることになる。この場合、データバッファ118には遅延された分だけ多くのデータがバッファリングされた状態となり、バッファオーバーフローの可能性が高くなるため、空き領域管理部110はD2に対して領域Aを割り当てる。   Let Sth be the minimum storage amount necessary to start writing stream data after recording starts. The value of Sth is determined based on the minimum unit for multiplexing stream data. When S1 is not 0 at the time when the stream data D2 by the second recording is accumulated by Sth, the writing start of D2 is delayed until at least the writing of D1 is completed. In this case, a larger amount of data is buffered in the data buffer 118, and the possibility of buffer overflow increases. Therefore, the free space management unit 110 allocates the region A to D2.

一方、S1が0の場合はデータバッファ118の空きに余裕があるため、空き領域管理部110はD2に対して領域Bを割り当てる。   On the other hand, when S1 is 0, there is room in the data buffer 118, so the free space management unit 110 assigns the region B to D2.

なお、領域Bを割り当てた場合、割り当てられた領域の使用率が大きいほど書き込み速度が遅くなり、バッファオーバーフローの可能性が高くなる。このことを考慮して、使用率が大きいほど書き込み開始タイミングを早くするよう制御する。すなわち、S2が選択された領域BのAU内の空き領域サイズに達した時点で書き込みを開始する。一方、領域Aを割り当てた場合は、D1の書き込みが完了し、S2が選択された領域AのAU内の空き領域サイズに達した時点で書き込みを開始する。   When area B is allocated, the greater the usage rate of the allocated area, the slower the writing speed and the higher the possibility of buffer overflow. In consideration of this, control is performed so that the writing start timing is advanced as the usage rate increases. That is, the writing is started when S2 reaches the free area size in the AU of the selected area B. On the other hand, when the area A is allocated, the writing is started when the writing of D1 is completed and S2 reaches the free area size in the AU of the selected area A.

以上の流れを図9のフローチャートに示す。すなわち、2回目の記録開始後、S2がSthに達するのを待機し(同 Step1)、この時点でS1が0ならば(同Step2 Yes)、空き領域管理部110はD2に対して領域Bを割り当てる(同Step3)。割り当てられた領域BのAU内の空きクラスタ数Nfreeを求め(同 Step4)、この値より書き込み開始時のD2蓄積量S2thを求める(同Step8)。S2thはクラスタサイズをSclとして、S2th=Nfee×Sclで求められる。後はD2がS2thに達するのを待機し(同Step9)、ストリームデータの書き込みを開始する(同Step10)。   The above flow is shown in the flowchart of FIG. That is, after the start of the second recording, it waits for S2 to reach Sth (Step 1). If S1 is 0 (Step 2 Yes) at this time, the free space management unit 110 sets the region B for D2. Assign (Step 3). The number Nfree of free clusters in the AU of the allocated area B is obtained (step 4), and the D2 accumulation amount S2th at the start of writing is obtained from this value (step 8). S2th is obtained by S2th = Nfee × Scl, where the cluster size is Scl. After that, it waits for D2 to reach S2th (Step 9), and starts writing stream data (Step 10).

一方で、S2がS2thに達した時点でS1が0でなかった場合(同Step2 No)、空き領域管理部110はD2に対して領域Aを割り当てる(同Step5)。そしてD1の書き込み完了を待機して(同Step6)、割り当てられた領域AのAU内の空きクラスタ数Nfreeを求める(同 Step7)。以降のD2の書き込み開始まで制御は領域Bを割り当てた場合と同様である。   On the other hand, when S1 is not 0 when S2 reaches S2th (Step 2 No), the free space management unit 110 assigns region A to D2 (Step 5). Then, it waits for the completion of the writing of D1 (Step 6), and obtains the number of free clusters Nfree in the AU of the allocated area A (Step 7). The control is the same as the case where the area B is allocated until the subsequent writing of D2 is started.

以上のようにすることで、AU の断片化による無駄な空き領域の増加を抑えながら確実なストリームデータの記録を行い、かつ連続して記録を繰り返したような場合にも応答性の低下を最低限に抑えたビデオカメラを提供することが可能となる。   As described above, the stream data can be reliably recorded while suppressing the increase of useless free space due to AU fragmentation, and the decrease in responsiveness is minimized even when the recording is repeated continuously. It is possible to provide a video camera with a limited amount.

100 ビデオカメラ、112 メモリカード、101 撮像部、
102 映像信号処理部、103 フレームメモリ、104 マイク、
105 音声信号処理部、106 PCMバッファ、
107 VIDEOコーデック(CODEC)、108 AUDIO CODEC、
109 多重化(MUX)処理部、110 空き領域管理部、
111 メモリカードI/F、112 メモリカード、113 操作部、
114 表示部、115 CPU(中央演算処理装置)、
116 ファイル管理部、117 ファイルシステム、118 データバッファ
100 video camera, 112 memory card, 101 imaging unit,
102 video signal processing unit, 103 frame memory, 104 microphone,
105 audio signal processing unit, 106 PCM buffer,
107 VIDEO CODEC (CODEC), 108 AUDIO CODEC,
109 multiplexing (MUX) processing unit, 110 free space management unit,
111 memory card I / F, 112 memory card, 113 operation unit,
114 display unit, 115 CPU (central processing unit),
116 file management unit, 117 file system, 118 data buffer

Claims (4)

入力されたストリームデータを記憶するメモリと、
前記メモリに記憶されたストリームデータを記録媒体に記録する記録手段と、
前記記録媒体における複数の部分領域それぞれの断片化の程度を測定する測定手段と、
所定値よりも大きな断片化率の部分領域を選択して書き込む第1のモードと、前記所定値以下の断片化率の部分領域を選択して書き込む第2のモードとを制御する制御手段とを備え、
前記制御手段は、記録開始後に最初に供給されたストリームデータの書き込みには状況に応じて前記第1および第2のモードを切り替えて適用し、前記最初の書き込みを完了した後、記録終了までの書き込みには前記第2のモードを適用することを特徴とする記録装置。
A memory for storing the input stream data;
Recording means for recording the stream data stored in the memory on a recording medium;
Measuring means for measuring the degree of fragmentation of each of the plurality of partial areas in the recording medium;
Control means for controlling a first mode for selecting and writing a partial area having a fragmentation rate larger than a predetermined value and a second mode for selecting and writing a partial area having a fragmentation rate equal to or less than the predetermined value; Prepared,
The control means applies the first and second modes by switching according to the situation for writing the stream data supplied first after the start of recording, and after completing the initial writing, until the end of recording. A recording apparatus, wherein the second mode is applied for writing.
記録終了指示後、前記メモリに記憶されたストリームデータの全てを前記記録媒体に書き込むよりも前の時点で次の記録開始指示を受けてストリームデータの供給を開始することが可能であり、
(i+1)番目の記録開始後、(i+1)番目の記録によって生成されたストリームデータが前記メモリに所定量蓄積された時点でi番目の記録によって生成されたストリームデータのうち、前記メモリに蓄積されていて前記記録媒体に書き込まれる前のデータの量に応じて、(i+1)番目の記録による最初のストリームデータに対して、前記第1のモードと前記第2のモードとを切り替えて適用することを特徴とする請求項1に記載の記録装置。
After the recording end instruction, it is possible to start the supply of stream data in response to the next recording start instruction at a time before writing all of the stream data stored in the memory to the recording medium,
Of the stream data generated by the i-th recording when the stream data generated by the (i + 1) -th recording is accumulated in the memory by a predetermined amount after the start of the (i + 1) -th recording, Depending on the amount of data stored in the memory and before being written to the recording medium, the first mode and the second mode for the first stream data by the (i + 1) th recording, The recording apparatus according to claim 1, wherein the recording apparatus is applied by switching.
記録開始時に前記記録媒体に対する前記ストリームデータの書き込みを前記第1のモードで行う場合、書き込み対象となる前記部分領域の断片化率に応じて書き込みを開始するタイミングを変化させることを特徴とする請求項1に記載の記録装置。   When the stream data is written to the recording medium at the start of recording in the first mode, the timing for starting the writing is changed according to the fragmentation rate of the partial area to be written. Item 2. The recording device according to Item 1. 記録開始時に前記記録媒体に対する前記ストリームデータの書き込みを前記第1のモードで行う場合、前記メモリに蓄積されているストリームデータの量が所定の閾値を超えた時点を書き込み開始タイミングとし、書き込み対象となる前記部分領域の断片化率に応じて前記閾値を設定することで書き込み開始タイミングを変化させることを特徴とする請求項3に記載の記録装置。   When writing the stream data to the recording medium at the start of recording in the first mode, the time when the amount of stream data stored in the memory exceeds a predetermined threshold is set as the write start timing, The recording apparatus according to claim 3, wherein the write start timing is changed by setting the threshold according to a fragmentation rate of the partial area.
JP2014130848A 2014-06-26 2014-06-26 Recording device Pending JP2016009411A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014130848A JP2016009411A (en) 2014-06-26 2014-06-26 Recording device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014130848A JP2016009411A (en) 2014-06-26 2014-06-26 Recording device

Publications (1)

Publication Number Publication Date
JP2016009411A true JP2016009411A (en) 2016-01-18

Family

ID=55226906

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014130848A Pending JP2016009411A (en) 2014-06-26 2014-06-26 Recording device

Country Status (1)

Country Link
JP (1) JP2016009411A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023189326A1 (en) * 2022-03-30 2023-10-05 パナソニックIpマネジメント株式会社 Non-volatile storage device, recording device, and recording method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023189326A1 (en) * 2022-03-30 2023-10-05 パナソニックIpマネジメント株式会社 Non-volatile storage device, recording device, and recording method

Similar Documents

Publication Publication Date Title
US8032724B1 (en) Demand-driven opportunistic garbage collection in memory components
JP3825465B2 (en) Memory card and memory card system
US8166231B2 (en) Memory controller, nonvolatile memory device, access device, and nonvolatile memory system
CN102932622B (en) The kinescope method of digital video recording equipment and device
JP5235541B2 (en) Recording apparatus and method
US8572307B2 (en) Memory controller, memory card, and nonvolatile memory system
JP4949176B2 (en) Information processing apparatus, recording method, and computer program
CN110806840A (en) Flash memory card data storage method based on multiple data streams, flash memory card and equipment
US11150809B2 (en) Memory controller and storage device including the same
US8625968B2 (en) Recording apparatus and control method thereof
US8301862B2 (en) Formatting device
US8730348B2 (en) Recording apparatus and control method thereof
JP2016009411A (en) Recording device
JP5178355B2 (en) Recording device
JP5693277B2 (en) Recording apparatus and recording method
US8452158B2 (en) Recording apparatus, imaging and recording apparatus, recording method, and program
JP2009065387A (en) Video recorder, video recording method and program
US8509597B2 (en) Recording apparatus, imaging and recording apparatus, recording method, and program
JP2016015057A (en) Recording device
JP7435470B2 (en) Information processing device, information processing method, and information processing program
KR100538338B1 (en) Method for Uniformly Distributing Memory Blocks of Flash Memory and Data Storage Device Using The Method
JP4972909B2 (en) Data recording device
JP2011199377A (en) Recorder
US8401365B2 (en) Recording apparatus, imaging and recording apparatus, recording method, and program
JP4219299B2 (en) Recording device cache method and data recording apparatus