JP2004151845A - Method of recording on media - Google Patents

Method of recording on media Download PDF

Info

Publication number
JP2004151845A
JP2004151845A JP2002314450A JP2002314450A JP2004151845A JP 2004151845 A JP2004151845 A JP 2004151845A JP 2002314450 A JP2002314450 A JP 2002314450A JP 2002314450 A JP2002314450 A JP 2002314450A JP 2004151845 A JP2004151845 A JP 2004151845A
Authority
JP
Japan
Prior art keywords
data
dma
register
recording
memory device
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
JP2002314450A
Other languages
Japanese (ja)
Inventor
Yuzo Umagami
裕三 馬上
Shinichi Takada
伸一 高田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002314450A priority Critical patent/JP2004151845A/en
Publication of JP2004151845A publication Critical patent/JP2004151845A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the time required for converting the image data of Y, Cb and Cr into the image data of R, G and G through TIFF conversion and writing the data on recording media and to simplify address management during the DMA transfer of the data. <P>SOLUTION: The total number of data to be transferred to a second memory device 50 by DMA transfer is set in a register 61. The number of DMA interruption data for which the DMA transfer is interrupted during the DMA transfer of all the data to issue the next media access command is set in a register 62. Before all the DMA data are transferred by the number set in the register 61, the DMA transfer and the TIFF conversion process executed by a DSP device 20 are temporarily interrupted every time the DMA data are transferred by the number set in the register 62, and a bus to the second memory device 50 is opened to enable the media access command to be issued from a control device 40 via an indirect register access process block 20-5 of the DSP device 20 to achieve recording in the second memory device 50. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、CFカードなどの装脱着可能なDOS−FAT(file allocation table)システムで管理される第2メモリ装置を、画像データの記録メディアとして備えたディジタルスチルカメラにおけるメディアへの記録方法に関するものである。
【0002】
【従来の技術】
ディジタルスチルカメラは当初、PC周辺機器として発売されて以来、銀塩カメラの性能に近づけるべく、高画素化、高速化を目指してきている。
【0003】
従来からこの種のディジタルスチルカメラはメモリカードに対し、DOS−FATファイルシステムでフレキシブルな制御を行うために、マイコンが制御を行っている。そのため、メモリカードはマイコンのバス上に直接的、または、インターフェースゲートを使用して間接的に接続される構成をしていた。
【0004】
しかし、このような構成ではメディアへのアクセスが遅く、メモリカードへの書きこみ処理時間と、メモリカードからの読みこみ処理時間が記録再生時間のほとんどを占め、ユーザインタフェースが非常に悪いものになっていた。その問題を解決するために、DMA処理ブロックと間接メモリアクセスブロックを備えたディジタルスチルカメラの構成が既に提案されている(特許文献1参照)。
【0005】
以下、このディジタルスチルカメラについて、図面を参照しながら説明する。
【0006】
図3に提案例のディジタルスチルカメラのシステム構成図を示し、図4に図1の提案例の記録処理時間の割合を示し、図5に同じく再生処理時間の割合を示す。
【0007】
提案例のディジタルスチルカメラは、CCD、CMOSセンサなどの画像入力装置10と、SDRAMなどの第1メモリ装置30と、マイコン(CPU)などの制御装置40と、CF(コンパクトフラッシュ(登録商標)メモリ)カードなどの装脱着可能なDOS−FATシステムで管理される第2メモリ装置50と、DSP装置21とで構成される。
【0008】
DSP装置21は、画像入力装置10から出力される画像信号を処理して第1メモリ装置にY、Cb、Crの画像データとして第1メモリ装置30に書き込む映像信号処理ブロック21−1と、第1メモリ装置30に蓄積されたY、Cb、Crの画像データを圧縮処理してJPEG符号データとして第1メモリ装置30に書き込んだり、第1メモリ装置30に蓄積されたJPEG符号データをY、Cb、Crの画像データに戻したりする処理を行う圧縮伸張処理ブロック21−2と、制御装置40との間のインターフェース処理を行うCPUインターフェース処理ブロック21−3と、第1メモリ装置30と第2メモリ装置50との間のDMA(Direct Memory Access)処理を行うことによりJPEG符号データを第1メモリ装置30から第2メモリ装置50へまたはその逆に転送させるDMA処理ブロック21−4と、制御装置40と第2メモリ装置50間の間接レジスタアクセス処理を行う間接レジスタアクセス処理ブロック21−5とで構成されている。
【0009】
制御装置40は、記録時において、画像入力装置10より取り込んだ画像信号に対してDSP装置21の映像信号処理ブロック21−1で映像信号処理を行わせてY、Cb、Crの画像データを得て、これを第1メモリ装置30に書き込ませる。また、圧縮伸張ブロック21−2で圧縮処理を行わせ、圧縮結果のJPEG符号データを第1メモリ装置30に格納する(処理時間A)。
【0010】
その後、制御装置40は、第2メモリ装置50に対する読み出しコマンドの発行を、DSP装置21の間接レジスタアクセス処理ブロック21−5のレジスタにコマンドを書き込むことで実現し、第2メモリ装置50のディレクトリエントリ情報とFATデータをDSP装置21の間接レジスタアクセス処理ブロック21−5のレジスタより読み出し、第2メモリ装置50の空き領域を計算し、その空き領域に対して、制御装置40は第2メモリ装置50に対する1クラスタ分の書き込みコマンドの発行を、読み出しコマンドと同様に発行する(処理時間B)。
【0011】
その後、第1メモリ装置30にあるJPEG符号データ(例えばNクラスタサイズ)を、DMA処理ブロック21−4を使用し、1クラスタ分のJPEG符号データに対し、第1メモリ装置30から読み出す処理(処理時間C1)と、第2メモリ装置50へ書き込む処理(処理時間D1)を多重化して行う。
【0012】
1クラスタ分のデータ移動が終了すると、制御装置40は再度、第2メモリ装置50のFATデータ読み出し処理、空き領域計算処理、第2メモリ装置50へのコマンド発行処理(処理時間B)から第1メモリ装置30から読み出す処理(処理時間C1)と、第2メモリ装置50へ書き込む処理(処理時間D1)までを全JPEG符号データを移動させるまで、N回処理を行い、記録を実現する(図4参照)。この従来例の方法では、1クラスタ分のデータ移動が終了する毎にDMA処理をいったん完了し、つぎの1クラスタ分のデータ移動を行うときにDMA処理を最初から始める。つまり、1クラスタ毎にDMA処理が完結することになる。
【0013】
再生時においては、制御装置40が第2メモリ装置50に対する読み出しコマンドを発行し、第2メモリ装置50からディレクトリエントリデータと、FATデータをDSP装置21の間接レジスタアクセス処理ブロック21−5のレジスタより読み出し、JPEG符号データ(例えばNクラスタサイズ)の位置を計算する(処理時間H)。その後、その位置のFATデータを読み出し、連鎖するデータ位置を計算し、1クラスタ分の読み出しコマンドを発行する(処理時間I)。その後、DSP装置21のDMA処理ブロック21−4を使用し、1クラスタ分のデータに対し、第2メモリ装置50から読み出す処理(処理時間J1)と、第1メモリ装置30へ書き込む処理(処理時間K1)を多重化させながら行う。
【0014】
1クラスタのデータ移動が終了すると、再度、制御装置40は第2メモリ装置50のFATデータを読み出し、連鎖するデータ位置を計算し、読み出しコマンドの発行処理(処理時間I)から第2メモリ装置50から読み出す処理(処理時間J1)と、第1メモリ装置30へ書き込む処理(処理時間K1)までを全JPEG符号データを移動させるまで、N回処理を行う。この際にも、DMA処理は1クラスタのデータが転送されるごとに完結する。
【0015】
JPEG符号データの移動が終了すると、DSP装置21の圧縮伸張ブロック21−2で伸張を行い、映像信号を出力(処理時間L)することで、再生を実現する(図5参照)。
【0016】
つまり、記録処理時間は図4に示すように処理時間C1<処理時間D1の関係があるので、処理時間A+(処理時間B+処理時間D1)×N回となり、従来より処理時間C1×N回の時間短縮ができる。また、再生処理時間は図5に示すように処理時間K1<処理時間J1の関係があるので、処理時間H+(処理時間I+処理時間J1)×N回+処理時間Lとなり、従来より処理時間K1×N回の時間短縮ができる。
【0017】
【特許文献1】
特開2001−326893号公報(第5〜6頁、図1〜図3)
【0018】
【発明が解決しようとする課題】
ところで、ディジタルスチルカメラにおいては、一般的にはJPEGフォーマットで記録メディアであるメモリカードに記録するものであるが、ある一部の機種ではJPEGフォーマット記録モードとRGBデータを記録するTIFFフォーマット記録モードとを備えたカメラがある。
【0019】
TIFFフォーマットでは200万画素(1600×1200)で5.76MBという大量のデータ量となる。そのため、ディジタルスチルカメラの記録フォーマットは圧縮を使用するJPEGフォーマットが一般的で、JPEGデータはY、Cb、Crの画像データより作成するため、Y、Cb、Crの画像データの形でメモリに一時保持するのが一般的である。そのため、従来TIFF記録を行う場合はY、Cb、Crの画像データをR、G、Bの画像データに変換し、再度変換結果をメモリに保持し、記録メディアへの記録を行っていた。
【0020】
つまり、ディジタルスチルカメラのTIFFデータフォーマット記録時、従来はSDRAM上にJPEGフォーマットの元データであるY、Cb、Crの画像データを保持し、その画像データをR、G、Bの画像データに変換し、再度SDRAM上に画像データを保持する。その画像データを記録メディアに転送する手段でTIFFデータフォーマット記録を実現していた。
【0021】
しかし、このような方式では、TIFF変換する時間と変換後のデータを保持する時間と変換後のデータを記録する時間がかかるという問題があった。つまり、大量のデータ変換時間と、SDRAM上に保持する時間がかかり、記録時間が長くなり、ユーザインタフェースの悪いものになっていた。
【0022】
一方、TIFF記録データに変換しながら、つまりY、Cb、Crの画像データをR、G、Bの画像データに変換しながら逐次DMA転送を行うと、転送元データ(Y、Cb、Crの画像データ)が2バイト(4:2:0)のデータ量であるのに対し、転送先データ(R、G、Bの画像データ)が3バイトのデータ量となり、CFカードなどのメディアは512バイトの整数倍(例えば、クラスタ単位)でのアクセスとなるため、特許文献1に記載のような以前の転送方法では、転送元のアドレス管理が複雑になる。
【0023】
以下、この点について、512バイト単位のデータ管理を行う場合について、詳しく説明する。転送元ではY,Cb,Crの2バイトデータであるのに対し、転送先のCFカードへはR,G,Bの3バイトデータとなる。一方、転送先へ送る512バイトのデータを生成するためには、512/3=170.666・・・となるので、171画素のデータが必要である。また、171画素目のデータは342、343バイト目のデータとなる。つまり、171画素以上のデータ(通常数メガ画素)をRGB変換する場合、転送元データは171画素のデータを取り込み、RGBデータのうちのRGデータを変換したところで、512バイトが生成終了されるので、一時停止しなければならない。連続して転送を再開するためには、171画素目のデータ(アドレスは342、343)を再度読み込み、Bデータを生成し、そのBデータから転送先へデータを順次書き込むこととなる。つまり、DMA処理を再開する場合、アドレスはどこまで進んだのか、RGBのどこまで変換して終了したのかを管理する必要がある。したがって、転送元のアドレス管理が複雑になる。
【0024】
したがって、本発明の目的は、Y、Cb、Crの画像データをR、G、Bの画像データに変換して記録メディアに書き込むのに要する時間を短縮でき、しかもデータをDMA転送するときのアドレス管理が簡単なメディアへの記録方法を提供することである。
【0025】
【課題を解決するための手段】
本発明の請求項1記載のメディアへの記録方法は、第1のレジスタに記録メディアへのDMA転送総データ数を設定し、第2のレジスタにDMA総データ転送中にDMA転送を一時中断して次のメディアアクセスコマンドを発行させるDMA中断データ数を設定し、第1のレジスタに設定されたDMA転送総データ数のDMA総データが転送されるまでの間に、第2のレジスタに設定されたDMA中断データ数のDMAデータが転送される毎にDMA転送を一時中断させ、記録メディアに対してのバスを開放し、メディアアクセスコマンドを発行可能にし、記録メディアに対する記録(記録コマンド発行)をDMA転送の中断毎に実現する。
【0026】
この方法によれば、第2のレジスタに記録メディアのデータ管理単位に相当するデータ数を設定することにより、記録メディアのデータ管理単位でDMA転送の中断が可能となり、DMA転送の中断中は記録メディアへのバスを開放することで、記録メディアに対するコマンド発行が可能となる。これによって、総データ転送数の途中にコマンドを発行することができ、また、中断したDMAを再開するときには、操作するレジスタが再転送スタートビットのみになり、高速アクセスができる。したがって、連続したデータをメディアに記録する場合、元データのアドレス管理を考慮せずに、メディアへのDMA転送が可能になる。また、DMAを再開する場合、制御するレジスタも減り、高速にDMA転送を再開することが可能となる。
【0027】
また、DMA中断時のアドレスを保持し、保持したアドレスの次のアドレスかDMA処理を再開させるようにしており、DMA処理のためのアドレス管理が簡単になる。
本発明の請求項2記載のメディアへの記録方法は、請求項1記載のメディアへの記録方法において、記録メディアへのDMA転送総データ数として、Y、Cb、Crの画像データからR、G、Bの画像データへ変換後のデータ量を第1のレジスタに設定し、次のメディアアクセスコマンドを発行するDMA中断データ数を記録メディアのFAT(file allocation table)空き領域に依存して第2のレジスタに設定し、Y、Cb、Crの画像データからR、G、Bの画像データへ変換しながら記録メディアに対してTIFF(Tag Image File Format)記録を実現する。
【0028】
この方法によれば、次のメディアアクセスコマンドを発行するDMA中断データ数を記録メディアのFAT(file allocation table)空き領域に依存して第2のレジスタに設定するので、メディア内のマイコンも大量データを扱うことができ、高速に書き込み処理を実現させることができる。
【0029】
本発明の請求項3記載のメディアへの記録方法は、画像入力装置と、第1メモリ装置と、制御装置と、DOS−FATシステムで管理される画像データの記録メディアとしての第2メモリ装置と、画像入力装置から出力される画像信号を処理して第1のメモリ装置にY、Cb、Crの画像データとして格納する映像信号処理ブロック、制御装置に対するインターフェース処理を行うインターフェース処理ブロック、第1メモリ装置と第2メモリ装置との間のDMA処理およびY、Cb、Crの画像データからR、G、Bの画像データへのデータ変換処理を行うDMA処理・データ変換処理ブロック、および制御装置と第2メモリ装置との間の間接レジスタアクセス処理を行う間接レジスタアクセス処理ブロックとからなるDSP装置とを備え、制御装置がDSP装置内の間接レジスタアクセス処理ブロックの内部レジスタを通して第2メモリ装置に対するコマンドの発行およびアクセスを実現するディジタルスチルカメラにおけるメディアへの記録方法であって、
第1のレジスタに記録メディアへのDMA転送総データ数を設定し、第2のレジスタにDMA総データ転送中にDMA転送を一時中断して次のメディアアクセスコマンドを発行させるDMA中断データ数を設定し、第1のレジスタに設定されたDMA転送総データ数のDMA総データが転送されるまでの間に、第2のレジスタに設定されたDMA中断データ数のDMAデータが転送される毎にDMA転送を一時中断させ、記録メディアに対してのバスを開放し、メディアアクセスコマンドを発行可能にし、記録メディアに対する記録をDMA転送の中断毎に実現する。
【0030】
この方法によれば、第2のレジスタに第2メモリ装置のデータ管理単位に相当するデータ数を設定することにより、第2メモリ装置のデータ管理単位でDMA転送の中断が可能となり、DMA転送の中断中は第2メモリ装置へのバスを間接レジスタアクセス処理ブロックに開放することで、コマンド発行が可能となる。これによって、総データ転送数の途中にコマンドを発行することができ、また、中断したDMAを再開するときには、操作するレジスタが再転送スタートビットのみになり、高速アクセスができる。したがって、連続したデータをメディアに記録する場合、元データのアドレス管理を考慮せずに、メディアへのDMA転送が可能になる。また、DMAを再開する場合、制御するレジスタも減り、高速にDMA転送を再開することが可能となる。
【0031】
また、DMA中断時のアドレスを保持し、保持したアドレスの次のアドレスかDMA処理を再開させるようにしており、DMA処理のためのアドレス管理が簡単になる。
【0032】
また、DMA転送元である第1メモリ装置のアドレスを中断時の状態で保持し、コマンド発行後のDMA再開時、中断時のアドレスに連続したアドレスから転送可能にすることで、第1メモリ装置とDSP装置との間のデータ転送処理と、Y、Cb、Crの画像データからR、G、Bの画像データへのデータ変換処理と、第2メモリ装置とDSP装置との間のデータ転送処理の多重化が可能となり、したがって、第2メモリ装置へのアクセス処理の短縮が可能となり、トータル記録時間の短縮を図ることが可能となる。
【0033】
本発明の請求項4記載のメディアへの記録方法は、請求項3記載のメディアへの記録方法において、記録メディアへのDMA転送総データ数として、Y、Cb、Crの画像データからR、G、Bの画像データへ変換後のデータ量を第1のレジスタに設定し、次のメディアアクセスコマンドを発行するDMA中断データ数を記録メディアのFAT(file allocation table)空き領域に依存して第2のレジスタに設定し、Y、Cb、Crの画像データからR、G、Bの画像データへ変換しながら記録メディアに対してTIFF(Tag Image File Format)記録を実現する。
【0034】
この方法によれば、次のメディアアクセスコマンドを発行するDMA中断データ数を記録メディアのFAT(file allocation table)空き領域に依存して第2のレジスタに設定するので、メディア内のマイコンも大量データを扱うことができ、高速に書き込み処理を実現させることができる。
【0035】
【発明の実施の形態】
本発明のメディアへの記録方法は、DMA処理・データ変換処理ブロックと間接レジスタアクセス処理ブロックとを備えたディジタルスチルカメラにおけるメディアへの記録方法であり、TIFF変換とメディア記録とを同時に行うことを可能にするもので、従来例のTIFF変換する時間と変換後のデータを保持する時間を削減し、従来方式より、記録メディア(メモリカード)への書きこみ処理時間を短縮できるものである。
【0036】
以下、本発明のメディアへの記録方法の実施の形態を、ディジタルスチルカメラを例にとって説明する。
【0037】
本発明の実施の形態のディジタルスチルカメラは、CCD、CMOSセンサなどの画像入力装置10と、SDRAMなどの第1メモリ装置30と、マイコン(CPU)などの制御装置40と、CF(コンパクトフラッシュ(登録商標)メモリ)カードなどの装脱着可能なDOS−FATシステムで管理される第2メモリ装置50と、DSP装置20とで構成されている。
【0038】
DSP装置20は、映像信号処理ブロック20−1と、圧縮信号処理ブロック20−2と、CPUインターフェース処理ブロック20−3と、第1メモリ装置30と第2メモリ装置50との間のDMA転送を行うデータ転送処理機能とY、Cb、Crの画像データからR、G,Bの画像データへのTIFF変換を行う変換処理機能とを設けたDMA処理・データ変換処理ブロック20−4と、制御装置40と第2メモリ装置50との間の間接レジスタアクセス処理を行う間接レジスタアクセス処理ブロック20−5と有している。図3の提案例との違いは、主にDMA処理ブロック21−4に代えて、Y、Cb、Crの画像データからR、G,Bの画像データへのTIFF変換を行う変換処理機能も併せて有するDMA処理・データ変換処理ブロック20−4を用い、TIFFデータ(R、G,Bの画像データ)を第2メモリ装置50に記録できるようにした点であり、その他は提案例と同様である。
【0039】
このディジタルスチルカメラは、上記したように、DSP装置20に間接レジスタアクセス処理ブロック20−5を備えることと、さらにDMA処理を一時的に中断するための第1および第2のレジスタ(図示せず)をDMA処理・データ変換処理ブロック20−4内に備えることで、第2メモリ装置50のデータ管理単位(例えば、512バイト単位)でDMA中断が可能となり、DMA中断中は第2メモリ装置50へのバスを間接レジスタアクセス処理ブロック20−5に開放することで、コマンド発行が可能となり、また、DMA転送元のアドレスを中断時の状態で保持し、コマンド発行後のDMA再開時、中断時のアドレスに連続したアドレスから転送可能にすることで、第1メモリ装置30とDSP装置20と間のデータ転送処理と、Y、Cb、Crの画像データからR、G、Bの画像データへのデータ変換処理と、第2メモリ装置50とDSP装置20間のデータ転送処理の多重化が可能となり、第2メモリ装置50へのアクセス処理の短縮が可能となり、トータル記録時間の短縮を図ることとなる。
【0040】
なお、上記における転送データ数と第1および第2のレジスタの値との比較、DMAの中断、アドレスの保持はDMA処理・データ変換処理ブロック20−4に第1および第2のレジスタが設けられていて、DMA処理・データ変換処理ブロック20−4において実行されている。また、バスの開放はDMA処理・データ変換処理ブロック20−4および間接レジスタアクセス処理ブロック20−5で実行されている。
【0041】
ここで、第1および第2のレジスタに書き込むデータについて、図2を参照しながら説明する。
【0042】
第1のレジスタには、第2メモリ装置50へDMA転送するDMA転送総データ数を設定し、第2のレジスタには、DMA中断データ数を設定し、DMA中断毎にメディアにコマンドを発行し、メディア記録を実現する。DMA転送総データ数としては、例えば1枚の静止画のR、G、Bの画像データの総数が設定される。また、DMA中断データ数としては、第2メモリ装置50のデータ管理単位のバイト数が、CFカードの場合には512バイトの整数倍が設定される。
【0043】
具体的に説明すると、第1のレジスタには、例えば1枚の静止画に対応したY、Cb、Crの画像データをR、G、Bの画像データに変換した後の総画像データ数を設定する。また、第2のレジスタには、記録メディアである第2のメモリ装置50に対するコマンドの発行単位(つまり、DMA中断データ数)を、メディアのFATの空き領域に依存して設定を行う。
【0044】
ここで、FATの空き領域に依存したDMA中断データ数の設定の方法について説明する。FATの空き領域はクラスタ単位で管理されていて、空き領域が連続して存在する場合と、不連続に存在する場合とが存在する。連続している場合は、不連続になるまでのサイズもしくは最大転送可能数をDMA中断データ数に設定する。連続するクラスタが多いほど高速にアクセスできる。
【0045】
メディアによっては、連続数MBまでアクセスできるメディア(コンパクトフラッシュ(登録商標)カード)と、128バイト単位にアクセスを中断しないといけないメディア(スマートメディア(登録商標))などがある。連続受けができるメディアは、連続に大量のデータが送られてくるコマンドが発行された方が、データの管理上、高速に書き込みができる。しかし、メディアとして、FATの空き領域が連続していない場合はどこに書くのかをコマンドで受け取り、そのアドレスに書かなければならない。その場合はシステムがメディアのFAT状況を管理し、最大転送可能数を上限としFATの連続した空き領域の大きさをコマンドの発行単位として、コマンドを発行する。
【0046】
また、DMA処理の完結と中断の切り替えを実現するためには、DMA処理・データ変換処理ブロック20−4内のアドレスレジスタにリセットをかけるか、かけないかをレジスタで切り換えられるようにすればよい。このように構成することで、リセットをかけない場合、DMA処理が中断動作となり、連続転送時にはアドレス管理の簡単化、転送時間の短縮という効果が現れる。
【0047】
第1メモリ装置30に蓄積されている転送元データが、例えば4:2:0のY、Cb、Crの画像データの場合、2バイトで1画素を構成するが、第2メモリ装置50に蓄積すべき転送先データはR、G、Bの画像データであるため、3バイトで1画素を構成する。記録メディア(例えばCFカードの場合)は、512バイトの整数倍単位でデータを管理するため、転送先データ数(CFカードの管理単位で、例えば512バイトの整数倍)に依存して、変換前のデータの転送途中でDMAを中断させ、コマンドを発行する。また、DMAを再開する場合、ソースアドレス(第1メモリ装置30の読み出しアドレス)に対して中断されたアドレスの次より再開できるようにアドレス保持機能を有し、連続DMA変換動作でTIFFデータ記録を実現させる。
【0048】
なお、上記のDMAの中断は、TIFF変換後の画像データが、データ管理単位、もしくは連続した一つの空き領域に余りなく納まる個数に対応した個数のTIFF変換前の画像データをDMA転送したときに行われるようになっている。
【0049】
ここで、ディジタルスチルカメラにおけるメディアへのTIFF記録動作について詳しく説明する。
【0050】
TIFFデータ記録時は、画像入力装置10より取り込んだ画像信号をDSP装置20の映像信号処理ブロック20−1で映像信号処理を行い、Y、Cb、Crの画像データとして第1メモリ装置30に生成し、保持させる。制御装置40は、第2メモリ装置50に対するコマンドの発行を、DSP装置20の間接レジスタアクセス処理ブロック20−5のレジスタにコマンドを書きこむことで実現する。上記のコマンドとしては、例えば、どこのクラスタにどのサイズでデータを書き込むかを示すコマンドをATAコマンドとして発行する。
【0051】
また、第2メモリ装置50のディレクトリエントリ情報とFATデータをDSP装置20の間接レジスタアクセス処理ブロック20−5のレジスタより読み出し、第2メモリ装置50の空き領域を計算し、その空き領域に対して、制御装置40は第2メモリ装置50に対する書きこみコマンドの発行を、間接レジスタアクセス処理ブロック20−5のレジスタにコマンドを書きこむことで実現する。
【0052】
その後、第1メモリ装置30にあるY、Cb、Crの画像データをTIFF変換後のR、G、Bの画像データのデータ量をTIFFデータサイズとして第1のレジスタ(DMA転送総データ数設定用レジスタ)61に設定し、次のコマンドを発行する単位のUNIT転送バイト数を第2のレジスタ(DMA中断データ数設定用レジスタ)62に設定し、DMA処理・データ変換処理ブロック20−4に対し、起動をかけ、第1メモリ装置30からY、Cb、Crの画像データを読み出す処理と、Y、Cb、Crの画像データをTIFFデータ(R、G、Bの画像データ)に変換する処理と、第2メモリ装置50へTIFFデータ(R、G、Bの画像データ)書きこむ処理を多重化して行う。
【0053】
ここで、メディアは、あくまでも512バイト単位でデータを受け取るので、もし、171画素のTIFFデータの場合、1バイトの端数が出るが、1024バイトデータを記録し、データサイズが513バイトとディレクトリエントリに記録する。パソコンでは、1024バイトのうち、513バイトの情報のみを使用することになる。
【0054】
データ移動がUNIT転送バイト数終了すると、制御装置40は再度、第2メモリ装置50のFATデータ読み出し処理、空き領域計算処理、メモリ装置50へのコマンド発行処理を行い、次のコマンドを発行する単位のUNIT転送バイト数を第2のレジスタ62に設定し、UNIT転送の起動をかける。第2のレジスタ61に設定したDMA転送総バイト数が終了するまで、コマンド発行とUNIT転送を繰り返すことで、TIFFデータ記録を実現する。
【0055】
なお、データ移動がUNIT転送バイト数の終了は以下のようにして検出される。DSP装置20が、転送データ数を常時監視し、それが第2のレジスタ62の値と一致したときに、DMA転送を中断させるのでしょうか。また、DMA転送総データ数をDSP装置が常時監視し、それが第1のレジスタ61の値に達したときに、割込みが発生し、マイコンに通知し、DMA転送を終了させる。この際、DMAのアドレスレジスタにはリセットをかけない。
【0056】
また、DMA処理の終了は、DSP装置20が転送データ数を常時監視し、転送データ数が第1のレジスタ61の設定値に達したときに行われる。この時には、別の割込みが発生する。この際、DMAのアドレスレジスタにリセットがかけられる。
【0057】
この実施の形態によれば、第2のレジスタ62に第2メモリ装置50のデータ管理単位に相当するデータ数を設定することにより、第2メモリ装置50のデータ管理単位でDMA転送の中断が可能となり、DMA転送の中断中は第2メモリ装置50へのバスを間接レジスタアクセス処理ブロック20−5に開放することで、コマンド発行が可能となる。また、DMA転送元である第1メモリ装置のアドレスを中断時の状態で保持し、コマンド発行後のDMA再開時、中断時のアドレスに連続したアドレスから転送可能にすることで、第1メモリ装置30とDSP装置20との間のデータ転送処理と、Y、Cb、Crの画像データからR、G、Bの画像データへのデータ変換処理と、第2メモリ装置50とDSP装置20との間のデータ転送処理の多重化が可能となり、第2メモリ装置50へのアクセス処理の短縮が可能となり、トータル記録時間の短縮を図ることが可能となる。
【0058】
また、DMA中断時のアドレスを保持し、保持したアドレスの次のアドレスかDMA処理を再開させるようにしており、DMA処理のためのアドレス管理が簡単になる。
【0059】
この発明を利用することにより、カメラシステムにおいて、記録処理の短縮が可能となり、将来、高画素化が進むにつれてもこの技術が使用され、快適なユーザインタフェースが得られる。
【0060】
【発明の効果】
本発明のメディアへの記録方法によれば、第2のレジスタに記録メディアのデータ管理単位に相当するデータ数を設定することにより、記録メディアのデータ管理単位でDMA転送の中断が可能となり、DMA転送の中断中は記録メディアへのバスを開放することで、記録メディアに対するコマンド発行が可能となる。
【0061】
これによって、総データ転送数の途中にコマンドを発行することができ、また、中断したDMAを再開するときには、操作するレジスタが再転送スタートビットのみになり、高速アクセスができる。したがって、連続したデータをメディアに記録する場合、元データのアドレス管理を考慮せずに、メディアへのDMA転送が可能になる。また、DMAを再開する場合、制御するレジスタも減り、高速にDMA転送を再開することが可能となる。
【0062】
また、DMA中断時のアドレスを保持し、保持したアドレスの次のアドレスかDMA処理を再開させるようにしており、DMA処理のためのアドレス管理が簡単になる。
【0063】
特に請求項3の発明によると、さらにDMA転送元のアドレスを中断時の状態で保持し、コマンド発行後のDMA再開時、中断時のアドレスに連続したアドレスから転送可能にすることで、データ転送処理と、Y、Cb、Crの画像データからR、G、Bの画像データへのデータ変換処理との多重化が可能となり、記録メディアへのアクセス処理の短縮が可能となり、トータル記録時間の短縮を図ることが可能となる。
【0064】
また、請求項2,4の発明によると、メディア内のマイコンも大量データを扱うことができ、高速に書き込み処理を実現させることができる。
【図面の簡単な説明】
【図1】本発明のメディアへの記録方法を説明するためのディジタルスチルカメラの構成を示すブロック図である。
【図2】第1および第2のレジスタの設定値を示す模式図である。
【図3】提案例のディジタルスチルカメラの構成を示すブロック図である。
【図4】図3の構成における記録処理時間の割合のフロー図である。
【図5】図3の構成における再生処理時間の割合のフロー図である。
【符号の説明】
10 画像入力装置
20 映像信号処理、圧縮・伸張処理装置
20−1 映像信号処理ブロック
20−2 圧縮伸張処理ブロック
20−3 CPUインターフェース処理ブロック
20−4 DMA処理・データ変換処理ブロック
20−5 間接レジスタアクセス処理ブロック
30 第1メモリ装置
40 制御装置
50 第2メモリ装置
61 第1のレジスタ(DMA転送総データ数設定用レジスタ)
62 第2のレジスタ(DMA中断データ数設定用レジスタ)
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method for recording on a medium in a digital still camera having a second memory device managed by a detachable DOS-FAT (file allocation table) system such as a CF card as a recording medium for image data. It is.
[0002]
[Prior art]
Since the digital still camera was first released as a PC peripheral device, the digital still camera has been aiming for higher pixels and higher speed in order to approximate the performance of the silver halide camera.
[0003]
Conventionally, in a digital still camera of this type, a microcomputer controls a memory card in order to perform flexible control using a DOS-FAT file system. Therefore, the memory card is configured to be directly connected to the bus of the microcomputer or indirectly using the interface gate.
[0004]
However, in such a configuration, access to the medium is slow, and the processing time for writing to the memory card and the processing time for reading from the memory card occupy most of the recording / reproducing time, resulting in a very poor user interface. I was In order to solve the problem, a configuration of a digital still camera including a DMA processing block and an indirect memory access block has already been proposed (see Patent Document 1).
[0005]
Hereinafter, this digital still camera will be described with reference to the drawings.
[0006]
FIG. 3 shows a system configuration diagram of the digital still camera of the proposal example, FIG. 4 shows a recording processing time ratio of the proposal example of FIG. 1, and FIG. 5 shows a reproduction processing time ratio similarly.
[0007]
The digital still camera of the proposed example includes an image input device 10 such as a CCD or a CMOS sensor, a first memory device 30 such as an SDRAM, a control device 40 such as a microcomputer (CPU), and a CF (Compact Flash (registered trademark) memory). ) A second memory device 50 managed by a DOS-FAT system that can be attached and detached, such as a card, and a DSP device 21.
[0008]
The DSP device 21 processes an image signal output from the image input device 10 and writes the image signal into the first memory device as Y, Cb, and Cr image data in the first memory device 30; The image data of Y, Cb, and Cr stored in the first memory device 30 is compressed and written into the first memory device 30 as JPEG code data, or the JPEG code data stored in the first memory device 30 is converted into Y, Cb , Cr image data, a compression / expansion processing block 21-2 for performing processing for returning to image data, a CPU interface processing block 21-3 for performing interface processing with the control device 40, a first memory device 30, and a second memory. By performing DMA (Direct Memory Access) processing with the device 50, JPEG encoded data is stored in the first memory. A DMA processing block 21-4 for transferring data from the storage device 30 to the second memory device 50 or vice versa; an indirect register access processing block 21-5 for performing indirect register access processing between the control device 40 and the second memory device 50; It is composed of
[0009]
At the time of recording, the control device 40 causes the video signal processing block 21-1 of the DSP device 21 to perform video signal processing on the image signal fetched from the image input device 10 to obtain Y, Cb, and Cr image data. Then, this is written in the first memory device 30. Further, the compression processing is performed in the compression / decompression block 21-2, and the JPEG code data as the compression result is stored in the first memory device 30 (processing time A).
[0010]
Thereafter, the control device 40 realizes the issuance of the read command to the second memory device 50 by writing the command in the register of the indirect register access processing block 21-5 of the DSP device 21, and the directory entry of the second memory device 50. The information and the FAT data are read from the register of the indirect register access processing block 21-5 of the DSP device 21, the free space of the second memory device 50 is calculated, and the control device 40 transmits the free space to the second memory device 50. Is issued in the same manner as the read command (processing time B).
[0011]
Thereafter, the JPEG code data (for example, N cluster size) in the first memory device 30 is read from the first memory device 30 for the JPEG code data of one cluster using the DMA processing block 21-4 (processing The time C1) and the process of writing to the second memory device 50 (processing time D1) are multiplexed.
[0012]
When the data movement for one cluster is completed, the control device 40 again executes the FAT data reading process of the second memory device 50, the free space calculation process, the command issuing process to the second memory device 50 (processing time B), and A process of reading from the memory device 30 (processing time C1) and a process of writing to the second memory device 50 (processing time D1) are performed N times until all the JPEG code data is moved, thereby realizing recording (FIG. 4). reference). In this conventional method, the DMA process is completed once each time data transfer for one cluster is completed, and the DMA process is started from the beginning when data transfer for the next one cluster is performed. That is, the DMA processing is completed for each cluster.
[0013]
At the time of reproduction, the control device 40 issues a read command to the second memory device 50, and reads directory entry data and FAT data from the second memory device 50 from the register of the indirect register access processing block 21-5 of the DSP device 21. Read and calculate the position of JPEG code data (for example, N cluster size) (processing time H). After that, the FAT data at that position is read out, the chained data position is calculated, and a read command for one cluster is issued (processing time I). Thereafter, using the DMA processing block 21-4 of the DSP device 21, a process of reading data of one cluster from the second memory device 50 (processing time J1) and a process of writing to the first memory device 30 (processing time) K1) is performed while multiplexing.
[0014]
When the data movement of one cluster is completed, the control device 40 reads the FAT data in the second memory device 50 again, calculates the chained data position, and executes the read command issuing process (processing time I) to start the second memory device 50. The processing from the reading of the JPEG code data (processing time J1) and the processing of writing to the first memory device 30 (processing time K1) are performed N times until all the JPEG code data is moved. Also at this time, the DMA processing is completed every time one cluster of data is transferred.
[0015]
When the movement of the JPEG code data is completed, the compression is performed by the compression / decompression block 21-2 of the DSP device 21, and the video signal is output (processing time L) to realize the reproduction (see FIG. 5).
[0016]
That is, since the recording processing time has a relationship of processing time C1 <processing time D1 as shown in FIG. 4, processing time A + (processing time B + processing time D1) × N times, and processing time C1 × N times longer than in the related art. Time can be reduced. Further, the reproduction processing time has a relationship of processing time K1 <processing time J1 as shown in FIG. 5, so that processing time H + (processing time I + processing time J1) × N times + processing time L, and the processing time K1 × N times can be reduced.
[0017]
[Patent Document 1]
JP 2001-326893 A (pages 5 to 6, FIGS. 1 to 3)
[0018]
[Problems to be solved by the invention]
By the way, in a digital still camera, recording is generally performed in a memory card which is a recording medium in a JPEG format, but in some models, a JPEG format recording mode and a TIFF format recording mode for recording RGB data are used. There are cameras with.
[0019]
In the TIFF format, 2 million pixels (1600 × 1200) have a large data amount of 5.76 MB. Therefore, the recording format of a digital still camera is generally the JPEG format using compression. Since JPEG data is created from Y, Cb, and Cr image data, it is temporarily stored in memory in the form of Y, Cb, and Cr image data. It is common to hold. Therefore, conventionally, when performing TIFF recording, image data of Y, Cb, and Cr is converted into image data of R, G, and B, the conversion result is stored again in a memory, and recording on a recording medium is performed.
[0020]
In other words, when recording in the TIFF data format of a digital still camera, the image data of the Y, Cb, and Cr, which are the original data of the JPEG format, is conventionally stored in the SDRAM, and the image data is converted into R, G, and B image data. Then, the image data is held on the SDRAM again. TIFF data format recording has been realized by means for transferring the image data to a recording medium.
[0021]
However, such a method has a problem in that it takes time to perform the TIFF conversion, hold the converted data, and record the converted data. That is, a large amount of data conversion time and a long time for holding the data on the SDRAM are required, and the recording time is long, resulting in a poor user interface.
[0022]
On the other hand, when the DMA transfer is sequentially performed while converting the image data of Y, Cb, and Cr into the image data of R, G, and B while converting the data into the TIFF recording data, the transfer source data (the image of Y, Cb, and Cr) is obtained. Data) has a data amount of 2 bytes (4: 2: 0), whereas the transfer destination data (R, G, B image data) has a data amount of 3 bytes, and a medium such as a CF card has 512 bytes. Since the access is performed in integer multiples (for example, in units of clusters), the transfer source address management becomes complicated in the previous transfer method as described in Patent Document 1.
[0023]
Hereinafter, this case will be described in detail in the case of performing data management in units of 512 bytes. The transfer source is 2-byte data of Y, Cb, and Cr, whereas the CF card of the transfer destination is 3-byte data of R, G, and B. On the other hand, in order to generate 512-byte data to be sent to the transfer destination, 512/3 = 170.666..., So data of 171 pixels is required. The data of the 171st pixel is data of the 342th and 343th bytes. In other words, when data of 171 pixels or more (usually several megapixels) is subjected to RGB conversion, the transfer source data takes in data of 171 pixels, and when RG data of the RGB data is converted, 512 bytes are generated and terminated. Have to pause. In order to continuously resume the transfer, the data of the 171st pixel (addresses 342 and 343) is read again, B data is generated, and the data is sequentially written from the B data to the transfer destination. That is, when the DMA processing is restarted, it is necessary to manage how far the address has advanced and how far the RGB has been converted and completed. Therefore, the management of the address of the transfer source becomes complicated.
[0024]
Therefore, an object of the present invention is to reduce the time required for converting Y, Cb, and Cr image data into R, G, and B image data and writing the data to a recording medium, and at the same time, to address data when DMA-transferring data. The purpose is to provide a method of recording on media that is easy to manage.
[0025]
[Means for Solving the Problems]
According to the recording method of the present invention, the total number of DMA transfer data to the recording medium is set in the first register, and the DMA transfer is temporarily suspended during the DMA total data transfer in the second register. The number of DMA interrupted data for issuing the next media access command is set in the second register until the total number of DMA transfer data set in the first register is transferred. DMA transfer is temporarily interrupted every time DMA data of the number of DMA interrupted data is transferred, the bus for the recording medium is released, a media access command can be issued, and recording (recording command issuance) on the recording medium is performed. This is realized every time the DMA transfer is interrupted.
[0026]
According to this method, by setting the number of data corresponding to the data management unit of the recording medium in the second register, the DMA transfer can be interrupted in the data management unit of the recording medium. By releasing the bus to the medium, it becomes possible to issue a command to the recording medium. As a result, a command can be issued in the middle of the total number of data transfers, and when the interrupted DMA is restarted, the register to be operated is only the retransfer start bit, and high-speed access can be performed. Therefore, when recording continuous data on a medium, DMA transfer to the medium can be performed without considering the address management of the original data. When the DMA is restarted, the number of registers to be controlled is reduced, and the DMA transfer can be restarted at a high speed.
[0027]
Also, the address at the time of DMA interruption is held, and DMA processing is restarted from the next address of the held address, so that address management for DMA processing is simplified.
According to a second aspect of the present invention, there is provided a method for recording on a medium according to the first aspect, wherein the total number of DMA transfer data to the recording medium is calculated based on image data of Y, Cb, and Cr from R, G , B after setting the amount of data converted to image data in the first register, and the number of DMA interrupted data for issuing the next media access command depends on the FAT (file allocation table) free area of the recording medium. To realize TIFF (Tag Image File Format) recording on a recording medium while converting image data of Y, Cb, and Cr into image data of R, G, and B.
[0028]
According to this method, the number of DMA interrupted data for issuing the next media access command is set in the second register depending on the FAT (file allocation table) free area of the recording medium. Can be handled, and the writing process can be realized at high speed.
[0029]
According to a third aspect of the present invention, there is provided a method of recording on a medium, comprising: an image input device, a first memory device, a control device, and a second memory device as a recording medium for image data managed by the DOS-FAT system. A video signal processing block for processing an image signal output from an image input device and storing it as Y, Cb, Cr image data in a first memory device; an interface processing block for performing interface processing for a control device; A DMA processing / data conversion processing block for performing a DMA processing between the device and the second memory device and a data conversion process from Y, Cb, Cr image data to R, G, B image data; A DSP device comprising an indirect register access processing block for performing indirect register access processing between the two memory devices. Controller is a method of recording media in a digital still camera to achieve the issuance of commands and access to the second memory device through internal registers of the indirect register access processing block in the DSP device,
The first register sets the total number of DMA transfer data to the recording medium, and the second register sets the number of DMA interrupted data to temporarily suspend the DMA transfer and issue the next media access command during the DMA total data transfer. During the time until the total number of DMA data set in the first register is transferred, the DMA is transferred every time the DMA data set in the second register is transferred. The transfer is temporarily interrupted, the bus for the recording medium is released, a media access command can be issued, and recording on the recording medium is realized every time the DMA transfer is interrupted.
[0030]
According to this method, by setting the number of data corresponding to the data management unit of the second memory device in the second register, the DMA transfer can be interrupted in the data management unit of the second memory device, and the DMA transfer can be stopped. During suspension, the command can be issued by releasing the bus to the second memory device to the indirect register access processing block. As a result, a command can be issued in the middle of the total number of data transfers, and when the interrupted DMA is restarted, the register to be operated is only the retransfer start bit, and high-speed access can be performed. Therefore, when recording continuous data on a medium, DMA transfer to the medium can be performed without considering the address management of the original data. When the DMA is restarted, the number of registers to be controlled is reduced, and the DMA transfer can be restarted at a high speed.
[0031]
Also, the address at the time of DMA interruption is held, and DMA processing is restarted from the next address of the held address, so that address management for DMA processing is simplified.
[0032]
In addition, the address of the first memory device that is the DMA transfer source is held in the state at the time of interruption, and when the DMA is resumed after the command is issued, the transfer can be performed from the address continuous with the address at the time of interruption. Transfer processing between the image data of Y, Cb, and Cr, image data of R, G, and B, and data transfer processing between the second memory device and the DSP device. Can be multiplexed, so that the access processing to the second memory device can be shortened, and the total recording time can be shortened.
[0033]
According to a fourth aspect of the present invention, there is provided a method for recording on a medium according to the third aspect, wherein the total number of DMA transfer data to the recording medium is calculated based on image data of Y, Cb, and Cr from R and G. , B after setting the amount of data converted to image data in the first register, and the number of DMA interrupted data for issuing the next media access command depends on the FAT (file allocation table) free area of the recording medium. To realize TIFF (Tag Image File Format) recording on a recording medium while converting image data of Y, Cb, and Cr into image data of R, G, and B.
[0034]
According to this method, the number of DMA interrupted data for issuing the next media access command is set in the second register depending on the FAT (file allocation table) free area of the recording medium. Can be handled, and the writing process can be realized at high speed.
[0035]
BEST MODE FOR CARRYING OUT THE INVENTION
The method of recording on a medium according to the present invention is a method of recording on a medium in a digital still camera including a DMA processing / data conversion processing block and an indirect register access processing block, and performs TIFF conversion and media recording simultaneously. This makes it possible to reduce the time for performing the TIFF conversion and the time for holding the converted data in the conventional example, and to shorten the processing time for writing to a recording medium (memory card) as compared with the conventional method.
[0036]
Hereinafter, an embodiment of a recording method on a medium according to the present invention will be described by taking a digital still camera as an example.
[0037]
The digital still camera according to the embodiment of the present invention includes an image input device 10 such as a CCD or a CMOS sensor, a first memory device 30 such as an SDRAM, a control device 40 such as a microcomputer (CPU), and a CF (Compact Flash). It comprises a second memory device 50 managed by a detachable DOS-FAT system such as a (registered trademark) memory) card, and a DSP device 20.
[0038]
The DSP device 20 performs a DMA transfer between the video signal processing block 20-1, the compression signal processing block 20-2, the CPU interface processing block 20-3, and the first memory device 30 and the second memory device 50. A DMA processing / data conversion processing block 20-4 provided with a data transfer processing function to perform and a conversion processing function to perform TIFF conversion from Y, Cb, and Cr image data to R, G, and B image data; It has an indirect register access processing block 20-5 for performing indirect register access processing between the memory device 40 and the second memory device 50. The difference from the proposal example of FIG. 3 is that, instead of the DMA processing block 21-4, a conversion processing function of performing TIFF conversion from Y, Cb, and Cr image data to R, G, and B image data is also provided. Is that the TIFF data (R, G, B image data) can be recorded in the second memory device 50 by using the DMA processing / data conversion processing block 20-4 provided in the present embodiment. is there.
[0039]
In this digital still camera, as described above, the DSP device 20 is provided with the indirect register access processing block 20-5, and the first and second registers (not shown) for temporarily interrupting the DMA processing are further provided. ) In the DMA processing / data conversion processing block 20-4, the DMA can be interrupted in the data management unit (for example, in units of 512 bytes) of the second memory device 50, and the second memory device 50 is interrupted during the DMA interruption. By releasing the bus to the indirect register access processing block 20-5, the command can be issued, the address of the DMA transfer source is held in the interrupted state, and when the DMA is resumed after the command is issued and when the DMA is interrupted. Data transfer processing between the first memory device 30 and the DSP device 20 , Y, Cb, and Cr image data into R, G, and B image data, and multiplex data transfer processing between the second memory device 50 and the DSP device 20. It is possible to shorten the access process to the 50, and to shorten the total recording time.
[0040]
The comparison between the number of transfer data and the values of the first and second registers, the interruption of DMA, and the holding of the address are performed by providing the first and second registers in the DMA processing / data conversion processing block 20-4. And is executed in the DMA processing / data conversion processing block 20-4. The release of the bus is executed by the DMA processing / data conversion processing block 20-4 and the indirect register access processing block 20-5.
[0041]
Here, data written to the first and second registers will be described with reference to FIG.
[0042]
In the first register, the total number of DMA transfer data to be DMA-transferred to the second memory device 50 is set, and in the second register, the number of DMA interrupted data is set, and a command is issued to the medium every time the DMA is interrupted. , Realize media recording. As the total number of DMA transfer data, for example, the total number of R, G, and B image data of one still image is set. As the number of DMA interrupted data, the number of bytes of the data management unit of the second memory device 50 is set to an integral multiple of 512 bytes in the case of a CF card.
[0043]
More specifically, the first register sets, for example, the total number of image data after converting Y, Cb, and Cr image data corresponding to one still image into R, G, and B image data. I do. In the second register, a unit for issuing a command to the second memory device 50 as a recording medium (that is, the number of DMA interrupted data) is set depending on a free area of the FAT of the medium.
[0044]
Here, a method of setting the number of DMA interrupted data depending on the free area of the FAT will be described. The free area of the FAT is managed in cluster units, and there are a case where the free area exists continuously and a case where the free area exists discontinuously. If they are continuous, the size up to the discontinuity or the maximum transferable number is set as the number of DMA interrupted data. The more consecutive clusters, the faster the access.
[0045]
Depending on the media, there are a media (compact flash (registered trademark) card) that can access up to several MBs in succession, and a media (smart media (registered trademark)) in which access must be interrupted in units of 128 bytes. For a medium that can continuously receive data, writing a command in which a large amount of data is continuously transmitted enables high-speed writing in terms of data management. However, as a medium, when the free area of the FAT is not continuous, it is necessary to receive a command as to where to write the FAT and write it to the address. In this case, the system manages the FAT status of the media, and issues a command using the maximum transferable number as an upper limit and the size of the continuous free area of the FAT as a command issuing unit.
[0046]
Further, in order to realize the switching between the completion and the interruption of the DMA processing, the register may be switched between resetting and not resetting the address register in the DMA processing / data conversion processing block 20-4. . With such a configuration, when resetting is not performed, DMA processing is interrupted, and the effects of simplifying address management and shortening the transfer time during continuous transfer appear.
[0047]
When the transfer source data stored in the first memory device 30 is, for example, Y, Cb, Cr image data of 4: 2: 0, one pixel is composed of two bytes, but stored in the second memory device 50. Since the transfer destination data to be transferred is R, G, and B image data, one pixel is composed of three bytes. Since the recording medium (for example, in the case of a CF card) manages data in units of 512-byte integer multiples, it depends on the number of destination data (CF card management unit, for example, 512-byte integer multiples) before conversion. DMA is interrupted in the middle of the data transfer, and a command is issued. Also, when resuming DMA, it has an address holding function so that the source address (read address of the first memory device 30) can be resumed from the address following the interrupted address, and TIFF data recording is performed by continuous DMA conversion operation. make it happen.
[0048]
Note that the above interruption of the DMA is caused when the image data after the TIFF conversion is DMA-transferred to the number of data management units or the number of the image data before the TIFF conversion corresponding to the number that can be completely fit in one continuous free area. Is being done.
[0049]
Here, the TIFF recording operation on the medium in the digital still camera will be described in detail.
[0050]
At the time of recording TIFF data, the image signal fetched from the image input device 10 is subjected to video signal processing in the video signal processing block 20-1 of the DSP device 20, and is generated in the first memory device 30 as Y, Cb, and Cr image data. And hold. The control device 40 issues the command to the second memory device 50 by writing the command to the register of the indirect register access processing block 20-5 of the DSP device 20. As the above command, for example, a command indicating which cluster is to be written and in what size data is issued as an ATA command.
[0051]
Further, the directory entry information and the FAT data of the second memory device 50 are read from the register of the indirect register access processing block 20-5 of the DSP device 20, and the free space of the second memory device 50 is calculated. The control device 40 realizes the issuance of the write command to the second memory device 50 by writing the command to the register of the indirect register access processing block 20-5.
[0052]
Then, the first register (for setting the total number of DMA transfer data) sets the data amount of the R, G, and B image data after the TIFF conversion of the Y, Cb, and Cr image data in the first memory device 30 to the TIFF data size. Register 61), and the number of UNIT transfer bytes in the unit for issuing the next command is set in the second register (register for setting the number of DMA interrupted data) 62 to the DMA processing / data conversion processing block 20-4. , Starting, reading out the Y, Cb, Cr image data from the first memory device 30, and converting the Y, Cb, Cr image data into TIFF data (R, G, B image data). , The process of writing TIFF data (R, G, B image data) to the second memory device 50 is multiplexed.
[0053]
Here, since the media receives data in units of 512 bytes, if TIFF data of 171 pixels is output, a fraction of 1 byte is output. However, 1024 bytes of data are recorded, and the data size is 513 bytes, and the directory entry is 513 bytes. Record. The personal computer uses only 513 bytes of information of 1024 bytes.
[0054]
When the data transfer ends with the number of UNIT transfer bytes, the control device 40 again performs the FAT data reading process of the second memory device 50, the free space calculation process, the command issuing process to the memory device 50, and the unit for issuing the next command. Is set in the second register 62, and the unit transfer is started. Until the total number of bytes of the DMA transfer set in the second register 61 is completed, TIFF data recording is realized by repeating the command issue and the UNIT transfer.
[0055]
The end of the data transfer in the unit transfer byte count is detected as follows. Does the DSP device 20 constantly monitor the number of transfer data and interrupt the DMA transfer when it matches the value of the second register 62? In addition, the DSP device constantly monitors the total number of DMA transfer data, and when it reaches the value of the first register 61, an interrupt occurs, notifies the microcomputer, and terminates the DMA transfer. At this time, the address register of the DMA is not reset.
[0056]
The end of the DMA processing is performed when the DSP device 20 constantly monitors the number of transfer data and the number of transfer data reaches the set value of the first register 61. At this time, another interrupt occurs. At this time, the address register of the DMA is reset.
[0057]
According to this embodiment, the DMA transfer can be interrupted in the data management unit of the second memory device 50 by setting the number of data corresponding to the data management unit of the second memory device 50 in the second register 62. During the interruption of the DMA transfer, the command can be issued by releasing the bus to the second memory device 50 to the indirect register access processing block 20-5. In addition, the address of the first memory device that is the DMA transfer source is held in the state at the time of interruption, and when the DMA is resumed after the command is issued, the transfer can be performed from the address continuous with the address at the time of interruption. 30, a data transfer process between the Y and Cb and Cr image data to an R, G and B image data, and a data transfer process between the second memory device 50 and the DSP device 20. Multiplexing of the data transfer process can be performed, the access process to the second memory device 50 can be reduced, and the total recording time can be reduced.
[0058]
Also, the address at the time of DMA interruption is held, and DMA processing is restarted from the next address of the held address, so that address management for DMA processing is simplified.
[0059]
By utilizing the present invention, the recording process can be shortened in the camera system, and this technology will be used as the number of pixels increases in the future, and a comfortable user interface will be obtained.
[0060]
【The invention's effect】
According to the recording method on the medium of the present invention, by setting the number of data corresponding to the data management unit of the recording medium in the second register, it is possible to interrupt the DMA transfer in the data management unit of the recording medium. By releasing the bus to the recording medium during the interruption of the transfer, it is possible to issue a command to the recording medium.
[0061]
As a result, a command can be issued in the middle of the total number of data transfers, and when the interrupted DMA is restarted, the register to be operated is only the retransfer start bit, and high-speed access can be performed. Therefore, when recording continuous data on a medium, DMA transfer to the medium can be performed without considering the address management of the original data. When the DMA is restarted, the number of registers to be controlled is reduced, and the DMA transfer can be restarted at a high speed.
[0062]
Also, the address at the time of DMA interruption is held, and DMA processing is restarted from the next address of the held address, so that address management for DMA processing is simplified.
[0063]
In particular, according to the third aspect of the present invention, the DMA transfer source address is held in the interrupted state, and when the DMA is resumed after the command is issued, the data can be transferred from the address continuous to the interrupted address, thereby enabling data transfer. Processing and data conversion processing from Y, Cb, Cr image data to R, G, B image data can be multiplexed, so that access processing to a recording medium can be shortened, and the total recording time can be shortened. Can be achieved.
[0064]
Further, according to the second and fourth aspects of the present invention, the microcomputer in the medium can handle a large amount of data, and the writing process can be realized at high speed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a digital still camera for explaining a recording method on a medium according to the present invention.
FIG. 2 is a schematic diagram showing set values of first and second registers.
FIG. 3 is a block diagram illustrating a configuration of a digital still camera of a proposal example.
FIG. 4 is a flow chart of a ratio of a recording processing time in the configuration of FIG. 3;
FIG. 5 is a flow chart of a ratio of a reproduction processing time in the configuration of FIG. 3;
[Explanation of symbols]
10 Image input device
20 Video signal processing, compression / decompression processing equipment
20-1 Video signal processing block
20-2 compression / decompression processing block
20-3 CPU Interface Processing Block
20-4 DMA Processing / Data Conversion Processing Block
20-5 Indirect Register Access Processing Block
30 first memory device
40 control device
50 Second memory device
61 1st register (DMA transfer total data number setting register)
62 Second register (DMA interrupt data number setting register)

Claims (4)

第1のレジスタに記録メディアへのDMA転送総データ数を設定し、第2のレジスタにDMA総データ転送中にDMA転送を一時中断して次のメディアアクセスコマンドを発行させるDMA中断データ数を設定し、前記第1のレジスタに設定された前記DMA転送総データ数のDMA総データが転送されるまでの間に、前記第2のレジスタに設定された前記DMA中断データ数のDMAデータが転送される毎にDMA転送を一時中断させ、前記記録メディアに対してのバスを開放し、前記メディアアクセスコマンドを発行可能にし、前記記録メディアに対する記録をDMA転送の中断毎に実現するメディアへの記録方法。The first register sets the total number of DMA transfer data to the recording medium, and the second register sets the number of DMA interrupted data to temporarily suspend the DMA transfer and issue the next media access command during the DMA total data transfer. Then, until the DMA total data of the DMA transfer total data set in the first register is transferred, the DMA data of the DMA interrupted data set in the second register is transferred. Recording method for temporarily interrupting DMA transfer, opening a bus to the recording medium, enabling the issuance of the media access command, and realizing recording on the recording medium every time DMA transfer is interrupted. . 記録メディアへのDMA転送総データ数として、Y、Cb、Crの画像データからR、G、Bの画像データへ変換後のデータ量を第1のレジスタに設定し、次のメディアアクセスコマンドを発行するDMA中断データ数を記録メディアのFAT空き領域に依存して第2のレジスタに設定し、Y、Cb、Crの画像データからR、G、Bの画像データへ変換しながら前記記録メディアに対してTIFF記録を実現する請求項1記載のメディアへの記録方法。The amount of data converted from Y, Cb, Cr image data to R, G, B image data is set in the first register as the total number of DMA transfer data to the recording medium, and the next media access command is issued. The number of DMA interrupted data to be transferred is set in the second register depending on the FAT empty area of the recording medium, and the Y, Cb, and Cr image data is converted to R, G, and B image data while being converted to the recording medium. 2. The method for recording on a medium according to claim 1, wherein the TIFF recording is realized by performing the TIFF recording. 画像入力装置と、第1メモリ装置と、制御装置と、DOS−FATシステムで管理される画像データの記録メディアとしての第2メモリ装置と、画像入力装置から出力される画像信号を処理して前記第1のメモリ装置にY、Cb、Crの画像データとして格納する映像信号処理ブロック、前記制御装置に対するインターフェース処理を行うインターフェース処理ブロック、第1メモリ装置と第2メモリ装置との間のDMA処理およびY、Cb、Crの画像データからR、G、Bの画像データへのデータ変換処理を行うDMA処理・データ変換処理ブロック、および前記制御装置と前記第2メモリ装置との間の間接レジスタアクセス処理を行う間接レジスタアクセス処理ブロックとからなるDSP装置とを備え、前記制御装置が前記DSP装置内の前記間接レジスタアクセス処理ブロックの内部レジスタを通して前記第2メモリ装置に対するコマンドの発行およびアクセスを実現するディジタルスチルカメラにおけるメディアへの記録方法であって、
第1のレジスタに記録メディアへのDMA転送総データ数を設定し、第2のレジスタにDMA総データ転送中にDMA転送を一時中断して次のメディアアクセスコマンドを発行させるDMA中断データ数を設定し、前記第1のレジスタに設定された前記DMA転送総データ数のDMA総データが転送されるまでの間に、前記第2のレジスタに設定された前記DMA中断データ数のDMAデータが転送される毎にDMA転送を一時中断させ、前記記録メディアに対してのバスを開放し、前記メディアアクセスコマンドを発行可能にし、前記記録メディアに対する記録をDMA転送の中断毎に実現するメディアへの記録方法。
An image input device, a first memory device, a control device, a second memory device as a recording medium for image data managed by the DOS-FAT system, and an image signal output from the image input device. A video signal processing block that stores Y, Cb, and Cr image data in a first memory device; an interface processing block that performs an interface process with respect to the control device; a DMA process between the first memory device and the second memory device; DMA processing / data conversion processing block for performing data conversion processing from Y, Cb, Cr image data to R, G, B image data, and indirect register access processing between the control device and the second memory device A DSP device comprising an indirect register access processing block for performing A of the indirect register access processing method of recording media in a digital still camera for implementing the issuance and access commands to said second memory device through an internal register of the block,
The first register sets the total number of DMA transfer data to the recording medium, and the second register sets the number of DMA interrupted data to temporarily suspend the DMA transfer and issue the next media access command during the DMA total data transfer. Then, until the DMA total data of the DMA transfer total data set in the first register is transferred, the DMA data of the DMA interrupted data set in the second register is transferred. Recording method for temporarily interrupting DMA transfer, opening a bus to the recording medium, enabling the issuance of the media access command, and realizing recording on the recording medium every time DMA transfer is interrupted. .
記録メディアへのDMA転送総データ数として、Y、Cb、Crの画像データからR、G、Bの画像データへ変換後のデータ量を第1のレジスタに設定し、次のメディアアクセスコマンドを発行するDMA中断データ数を記録メディアのFAT空き領域に依存して第2のレジスタに設定し、Y、Cb、Crの画像データからR、G、Bの画像データへ変換しながら前記記録メディアに対してTIFF記録を実現する請求項3記載のメディアへの記録方法。The amount of data converted from Y, Cb, Cr image data to R, G, B image data is set in the first register as the total number of DMA transfer data to the recording medium, and the next media access command is issued. The number of DMA interrupted data to be transferred is set in the second register depending on the FAT empty area of the recording medium, and the Y, Cb, and Cr image data is converted to R, G, and B image data while being converted to the recording medium. 4. The method for recording on a medium according to claim 3, wherein the TIFF recording is realized by using TIFF recording.
JP2002314450A 2002-10-29 2002-10-29 Method of recording on media Pending JP2004151845A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002314450A JP2004151845A (en) 2002-10-29 2002-10-29 Method of recording on media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002314450A JP2004151845A (en) 2002-10-29 2002-10-29 Method of recording on media

Publications (1)

Publication Number Publication Date
JP2004151845A true JP2004151845A (en) 2004-05-27

Family

ID=32458760

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002314450A Pending JP2004151845A (en) 2002-10-29 2002-10-29 Method of recording on media

Country Status (1)

Country Link
JP (1) JP2004151845A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122211A (en) * 2005-10-26 2007-05-17 Matsushita Electric Ind Co Ltd Data recording system using semiconductor memory medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122211A (en) * 2005-10-26 2007-05-17 Matsushita Electric Ind Co Ltd Data recording system using semiconductor memory medium

Similar Documents

Publication Publication Date Title
US5581311A (en) Image storage system for a digital still camera
WO2024074012A1 (en) Video transmission control method, apparatus and device, and nonvolatile readable storage medium
EP0844566B1 (en) Interface apparatus for adapting data width to system bus width
JPH0937205A (en) Electronic still camera
EP2183663B1 (en) Mass storage system with improved usage of buffer capacity
JP2004151845A (en) Method of recording on media
JPH10334037A (en) Communication dma device
JP3766113B2 (en) camera
US7280136B2 (en) Electronic camera and control integrated circuit for electronic camera
JPH0690423A (en) Electronic still camera and picture record managing method
TWI517695B (en) On die/off die memory management
JP2010049303A (en) Memory controller, non-volatile storage device, access device, and non-volatile storage system
JP4408478B2 (en) Video recording device
JP4690016B2 (en) Image compression / decompression device
JP2001326893A (en) Camera system
JP2009237790A (en) Dma controller
JP3731926B2 (en) MPEG2 data transfer method
JP3796606B2 (en) camera
JP2000295506A (en) Video recorder, video recording method and storage medium
JP4250170B2 (en) Video encoder that sends the extracted image to the outside during encoding
JP2008085656A (en) Recording and reproducing device
JP2000078556A (en) Server device
KR100846406B1 (en) Video encoder transmitting extracted image outside during encoding
JP2004165972A (en) Video and audio signal recorder
JP4227108B2 (en) camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050623

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060320

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080324

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080408

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080729