JP2021013064A - Recording device, recording method, and program - Google Patents

Recording device, recording method, and program Download PDF

Info

Publication number
JP2021013064A
JP2021013064A JP2019125191A JP2019125191A JP2021013064A JP 2021013064 A JP2021013064 A JP 2021013064A JP 2019125191 A JP2019125191 A JP 2019125191A JP 2019125191 A JP2019125191 A JP 2019125191A JP 2021013064 A JP2021013064 A JP 2021013064A
Authority
JP
Japan
Prior art keywords
image data
moving image
coding processing
processing means
data encoded
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
JP2019125191A
Other languages
Japanese (ja)
Inventor
道紀 中島
Michinori Nakajima
道紀 中島
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 JP2019125191A priority Critical patent/JP2021013064A/en
Publication of JP2021013064A publication Critical patent/JP2021013064A/en
Pending legal-status Critical Current

Links

Images

Abstract

To prevent a pre-recording time from being shortened.SOLUTION: A recording device includes: a compression/decompression circuit A and a compression/decompression circuit B that encode moving image data while making the moving image data different in phase with a reference structure having the same number of frames; and a buffer for pre-REC for temporarily holding the moving image data encoded by the compression/decompression circuit A and the moving image data encoded by the compression/decompression circuit B. When moving image data before a recording start instruction is accepted are recorded in response to the acceptance of the recording start instruction, any one of the moving image data encoded by the compression/decompression circuit A and the moving image data encoded by the compression/decompression circuit B is controlled to be recorded in a recording medium, whereby it is possible to prevent a pre-REC time from being shortened.SELECTED DRAWING: Figure 1

Description

本発明は、記録装置、記録方法、及びプログラムに関する。 The present invention relates to recording devices, recording methods, and programs.

デジタルビデオカメラ等の撮像装置として、録画機会を逃がさないように、記録開始指示以前の一定時間分の映像信号をバッファリングするプリレコーディング(プリREC、プリ記録)機能を有するものがある(例えば、特許文献1参照)。プリREC機能を有する撮像装置は、使用者が電源をオンにすると、レンズ光学系を介して結像された光学像が撮像素子によって電気信号に変換され、画像データ(デジタルデータ)として半導体メモリ等のバッファに逐次記憶されていく。バッファの記憶容量がフル(一杯)になると、古い画像データに新しい画像データが上書きされることで、古い画像データは逐次消去され、一方で新しい画像データが逐次記憶されていく。そして、撮像装置の使用者によって映像の記録開始が指示されると、バッファに記憶されている記録開始指示以前の一定時間分の画像データ及び記録開始指示以降の画像データがSDカード等の記憶媒体へ記憶される。その後、撮像装置の使用者によって映像の記録終了が指示されると、記憶媒体への画像データの記憶処理が終了すると共に、バッファへの画像データの記憶処理が再開される。 Some imaging devices such as digital video cameras have a pre-recording (pre-REC, pre-recording) function that buffers video signals for a certain period of time before the recording start instruction so as not to miss a recording opportunity (for example, pre-recording). See Patent Document 1). When the user turns on the power of the image pickup device having a pre-REC function, the optical image formed through the lens optical system is converted into an electric signal by the image pickup element, and the image data (digital data) is a semiconductor memory or the like. It is sequentially stored in the buffer of. When the storage capacity of the buffer becomes full (full), the old image data is overwritten with the new image data, so that the old image data is sequentially erased, while the new image data is sequentially stored. Then, when the user of the imaging device instructs to start recording the image, the image data for a certain period of time before the recording start instruction and the image data after the recording start instruction stored in the buffer are stored in a storage medium such as an SD card. Is memorized in. After that, when the user of the imaging device instructs the end of recording the image, the storage process of the image data in the storage medium is completed, and the storage process of the image data in the buffer is restarted.

特開2002−118822号公報JP-A-2002-118822

プリREC機能を有する従来の撮像装置では、以下のような問題がある。近年、動き補償予測符号化を用いた動画像の圧縮方式には、複数のフレームにまたがって圧縮するLong GOPと呼ばれる方式が用いられる。Long GOP方式で圧縮された画像データの編集単位はGOP(Group Of Pictures)単位であるため、プリRECでバッファに蓄えられた画像データはGOP単位に扱う必要がある。一方、プリRECのバッファリング動作では、バッファの記憶容量がフルになると、古い画像データを新しい画像データで順次上書きする。そのため、新しい画像データで一部でも上書きされたGOPはプリRECのデータとしては使用できず、バッファにおける画像データの上書き状態によってプリREC時間が短くなってしまうという問題点があった。 A conventional image pickup apparatus having a pre-REC function has the following problems. In recent years, as a moving image compression method using motion compensation prediction coding, a method called Long GOP that compresses across a plurality of frames is used. Since the editing unit of the image data compressed by the Long GOP method is the GOP (Group Of Pictures) unit, the image data stored in the buffer by the pre-REC needs to be handled in the GOP unit. On the other hand, in the pre-REC buffering operation, when the storage capacity of the buffer becomes full, the old image data is sequentially overwritten with the new image data. Therefore, the GOP that is partially overwritten with the new image data cannot be used as the pre-REC data, and there is a problem that the pre-REC time is shortened depending on the overwriting state of the image data in the buffer.

本発明は、このような事情に鑑みてなされたものであり、プリ記録の時間が短くなることを防止できるようにすることを目的とする。 The present invention has been made in view of such circumstances, and an object of the present invention is to prevent the pre-recording time from being shortened.

本発明に係る記録装置は、所定のフレーム数の参照構造で動画像データを符号化する第1の符号化処理手段と、前記第1の符号化処理手段と同じフレーム数の参照構造で位相を異ならせて、前記動画像データを符号化する第2の符号化処理手段と、前記第1の符号化処理手段により符号化された動画像データと、前記第2の符号化処理手段により符号化された動画像データを一時的に保持する保持手段と、記録開始指示を受け付けたことに応じて前記記録開始指示を受け付ける前の動画像データを記録する場合に、前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうちのいずれか一方の動画像データを記憶手段に記録するように制御する制御手段とを有することを特徴とする。 The recording apparatus according to the present invention has a first coding processing means that encodes moving image data with a reference structure having a predetermined number of frames, and a reference structure having the same number of frames as the first coding processing means. Differently, the second coding processing means for encoding the moving image data, the moving image data encoded by the first coding processing means, and the moving image data encoded by the second coding processing means are encoded. A holding means for temporarily holding the moving image data, and a first coding processing means for recording the moving image data before receiving the recording start instruction in response to receiving the recording start instruction. It has a control means for controlling to record the moving image data of either one of the moving image data encoded by the above-mentioned second coding processing means and the moving image data encoded by the second coding processing means in the storage means. It is characterized by that.

本発明によれば、プリ記録の時間が短くなることを防止することができる。 According to the present invention, it is possible to prevent the pre-recording time from being shortened.

本発明の実施形態における記録装置を適用した撮像装置の構成例を示す図である。It is a figure which shows the structural example of the image pickup apparatus which applied the recording apparatus in embodiment of this invention. 第1の実施形態における撮像装置の動作例を示すフローチャートである。It is a flowchart which shows the operation example of the image pickup apparatus in 1st Embodiment. プリREC機能を説明する図である。It is a figure explaining the pre-REC function. 第1の実施形態におけるプリREC動作を説明する図である。It is a figure explaining the pre-REC operation in 1st Embodiment. 第2の実施形態における撮像装置の動作例を示すフローチャートである。It is a flowchart which shows the operation example of the image pickup apparatus in the 2nd Embodiment. 第2の実施形態におけるプリREC動作を説明する図である。It is a figure explaining the pre-REC operation in 2nd Embodiment. 第3の実施形態における撮像装置の動作例を示すフローチャートである。It is a flowchart which shows the operation example of the image pickup apparatus in 3rd Embodiment. 第3の実施形態におけるプリREC動作を説明する図である。It is a figure explaining the pre-REC operation in 3rd Embodiment.

以下、本発明の実施形態を図面に基づいて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(第1の実施形態)
本発明の第1の実施形態について説明する。
図1は、本発明の一実施形態における記録装置を適用した撮像装置100の構成例を示すブロック図である。本実施形態における撮像装置100は、レンズユニット101、センサー(撮像素子)102、画像処理部103、圧縮伸張回路104、105、119、オンスクリーンディスプレイ(OSD)部106、及び表示部107を有する。また、撮像装置100は、マイクロコンピュータ(マイコン)108、操作スイッチ群109、ROM110、RAM111、SDカードコントローラ112、113、外部出力部116、バス117、及び無線モジュール118を有する。
(First Embodiment)
The first embodiment of the present invention will be described.
FIG. 1 is a block diagram showing a configuration example of an image pickup apparatus 100 to which the recording apparatus according to the embodiment of the present invention is applied. The image pickup device 100 in the present embodiment includes a lens unit 101, a sensor (image sensor) 102, an image processing section 103, compression / expansion circuits 104, 105, 119, an on-screen display (OSD) section 106, and a display section 107. Further, the image pickup apparatus 100 includes a microcomputer (microcomputer) 108, an operation switch group 109, a ROM 110, a RAM 111, an SD card controllers 112 and 113, an external output unit 116, a bus 117, and a wireless module 118.

レンズユニット101は、集光のための固定レンズ群、変倍レンズ群、絞り、変倍レンズ群の動きで移動した結像位置を補正する機能と焦点調節を行う機能とを兼ね備えた補正レンズ群により構成されている。レンズユニット101によって、最終的にセンサー102の結像面上に被写体像が結像される。センサー102は、光を電荷に変換し撮像信号を生成する。画像処理部103は、センサー102から入ってきた撮像信号に対して所定の処理を施して画像データをRAM111に出力する。 The lens unit 101 is a correction lens group having a function of correcting an image formation position moved by the movement of a fixed lens group, a variable magnification lens group, an aperture, and a variable magnification lens group for focusing, and a function of adjusting the focus. It is composed of. The lens unit 101 finally forms a subject image on the image plane of the sensor 102. The sensor 102 converts light into electric charges to generate an imaging signal. The image processing unit 103 performs a predetermined process on the image pickup signal input from the sensor 102 and outputs the image data to the RAM 111.

圧縮伸張回路104、105、119は、RAM111に格納された画像データを動き補償予測符号化等の符号化処理を行うことでMPEG圧縮(エンコード)して動画像データを生成し、RAM111に出力する。また、圧縮伸張回路104、105、119は、動画像データを入力し、これを伸張する機能(デコード)も有している。OSD部106は、各種設定メニューやタイトル、時間等の情報をデジタル画像データに重畳させるためのものである。また、OSD部106は、重畳された画像データ等を表示部107に出力して画像等を表示させる制御も行う。表示部107は、例えば液晶パネルであり、OSD部106からの制御を受け、画像等を表示させるためのものである。 The compression / decompression circuits 104, 105, and 119 generate moving image data by MPEG compression (encoding) by performing coding processing such as motion compensation prediction coding on the image data stored in the RAM 111, and output the moving image data to the RAM 111. .. Further, the compression / expansion circuits 104, 105, and 119 also have a function (decoding) of inputting moving image data and decompressing the moving image data. The OSD unit 106 is for superimposing information such as various setting menus, titles, and times on digital image data. The OSD unit 106 also controls to output the superimposed image data or the like to the display unit 107 to display the image or the like. The display unit 107 is, for example, a liquid crystal panel, which is controlled by the OSD unit 106 to display an image or the like.

マイコン108は、撮像装置100全体を制御する。操作スイッチ群109は、ユーザーが操作入力するためのものである。また、操作スイッチ群109には、主としてカメラ撮影を行うためのカメラモードと、主として再生させるための再生モードと、電源オフとするパワーオフモードとを選択するためのスイッチも設けられている。また、操作スイッチ群109には、プリREC機能や動画記録を行うためのスイッチも設けられている。ROM110は、マイコン108が実行するプログラム等が格納されている。また、ROM110の一部領域は、バックアップ用としてシステムの状態等を保持するために使用される。RAM111は、マイコン108、画像処理部103や圧縮伸張回路104、105、119等がワークメモリとして使用する揮発性メモリである。 The microcomputer 108 controls the entire image pickup apparatus 100. The operation switch group 109 is for the user to input an operation. Further, the operation switch group 109 is also provided with a switch for selecting a camera mode for mainly performing camera shooting, a reproduction mode for mainly reproducing, and a power-off mode for turning off the power. Further, the operation switch group 109 is also provided with a switch for performing a pre-REC function and moving image recording. The ROM 110 stores a program or the like executed by the microcomputer 108. In addition, a part of the ROM 110 is used for holding the state of the system for backup. The RAM 111 is a volatile memory used as a work memory by the microcomputer 108, the image processing unit 103, the compression / decompression circuits 104, 105, 119, and the like.

SDカードコントローラ112、113は、圧縮伸張回路104、105、119で生成されRAM111に出力された動画像データを、SDカード114、115に記録するためのものである。SDカードコントローラ112、113は、FATファイルシステム等のコンピュータと互換のあるフォーマットに従って、動画像データをSDカード114、115に記録する。SDカード114、115は、撮像装置100から取り外し可能な着脱可能な記録媒体であり、撮像装置100以外にもパーソナル・コンピュータ等に装着することができる。 The SD card controllers 112 and 113 are for recording the moving image data generated by the compression / decompression circuits 104, 105 and 119 and output to the RAM 111 on the SD cards 114 and 115. The SD card controllers 112 and 113 record moving image data on the SD cards 114 and 115 according to a computer-compatible format such as a FAT file system. The SD cards 114 and 115 are removable recording media that can be removed from the image pickup device 100, and can be attached to a personal computer or the like in addition to the image pickup device 100.

外部出力部116は、画像処理部103がRAM111に出力した画像データを外部に出力するものである。バス117は、撮像装置100が有する各機能部が接続され、各機能部はこのバス117を介してデータのやり取りを行う。無線モジュール118は、RAM111に格納された動画像データをWiFi(登録商標)又はBluetooth(登録商標)等の無線通信で外部に転送する。また、図1には図示していないが、音声についてもマイクユニットやスピーカー等を有しており、圧縮伸張回路104、105、119は、画像データと共に音声データの圧縮伸張を行う。すなわち、前述の動画像データには音声データも多重化される。 The external output unit 116 outputs the image data output to the RAM 111 by the image processing unit 103 to the outside. Each functional unit of the image pickup apparatus 100 is connected to the bus 117, and each functional unit exchanges data via the bus 117. The wireless module 118 transfers the moving image data stored in the RAM 111 to the outside by wireless communication such as WiFi (registered trademark) or Bluetooth (registered trademark). Further, although not shown in FIG. 1, the sound also has a microphone unit, a speaker, and the like, and the compression / decompression circuits 104, 105, and 119 perform compression / decompression of the sound data together with the image data. That is, audio data is also multiplexed with the above-mentioned moving image data.

なお、図1に示した撮像装置100は一例であり、これに限定されるものではない。例えば、SDカードコントローラ113や圧縮伸張回路C119は、以下に説明する第1の実施形態や第2の実施形態においては有していなくてもよく、少なくとも第3の実施形態において有していればよい。また、圧縮伸張回路104、105、119は、それぞれが異なるチップ上に形成されていてもよいし、圧縮伸張回路104、105、119の内の一部又は全部が1つのチップ上に形成されていてもよい。 The imaging device 100 shown in FIG. 1 is an example, and the present invention is not limited to this. For example, the SD card controller 113 and the compression / decompression circuit C119 may not be included in the first embodiment and the second embodiment described below, as long as they are included in at least the third embodiment. Good. Further, the compression / expansion circuits 104, 105 and 119 may be formed on different chips, or a part or all of the compression / expansion circuits 104, 105 and 119 may be formed on one chip. You may.

次に、第1の実施形態における撮像装置100の動作について説明する。図2は、第1の実施形態における撮像装置100の動作例を示すフローチャートである。図2に示すフローチャートにおける各処理は、撮像装置100が有するマイコン108がRAM111に保存されているプログラムを実行することにより実現される。なお、画像データは、センサー102が画像を取り込む毎に画像処理部103よりRAM111に対して出力されている。この状態でフローチャートはスタートする。 Next, the operation of the image pickup apparatus 100 in the first embodiment will be described. FIG. 2 is a flowchart showing an operation example of the image pickup apparatus 100 according to the first embodiment. Each process in the flowchart shown in FIG. 2 is realized by the microcomputer 108 of the image pickup apparatus 100 executing a program stored in the RAM 111. The image data is output from the image processing unit 103 to the RAM 111 each time the sensor 102 captures the image. The flowchart starts in this state.

ステップS201では、マイコン108は、撮像装置100に対してプリREC動作の開始が指示されたか否かを判断する。プリREC開始が指示されたとマイコン108が判断した場合、処理はステップS202へ進む。 In step S201, the microcomputer 108 determines whether or not the imaging device 100 is instructed to start the pre-REC operation. When the microcomputer 108 determines that the pre-REC start is instructed, the process proceeds to step S202.

ここでプリREC機能について、図3を用いて説明する。図3(a)〜(e)は、RAM111に設けられるプリREC用のバッファの状態遷移の例を示した図である。図3(a)〜(e)には、一例として、圧縮伸張回路A104により生成される動画像データを一時的に保持するプリREC用のバッファ301を示している。 Here, the pre-REC function will be described with reference to FIG. 3A to 3E are diagrams showing an example of the state transition of the buffer for pre-REC provided in the RAM 111. 3 (a) to 3 (e) show, as an example, a buffer 301 for pre-REC that temporarily holds moving image data generated by the compression / decompression circuit A104.

図3(a)に示すように、プリREC開始前は、プリREC用のバッファ301は空である。
操作スイッチ群109が操作され、撮像装置100に対してプリRECの開始が指示されると、図3(b)に示すようにRAM111上のプリREC用のバッファ301に動画像データ302が保持される。この動画像データ302は、マイコン108が、圧縮伸張回路A104を制御して画像処理部103がRAM111に出力した画像データを動き補償予測符号化等の符号化処理を行うことで圧縮し生成される。その後、同様にして、図3(c)及び図3(d)に示すように、プリREC用のバッファ301への動画像データ303、304の書き込みが行われる。そして、プリREC用のバッファ301がフルになると、図3(e)に示すように、1GOP(Group Of Pictures)目の動画像データ302を上書きするように、4GOP目の動画像データ305をプリREC用のバッファ301に書き込む。以降、同様にして、保持する動画像データを逐次更新することで、プリREC用のバッファ301に所定時間分の動画像データが保持される。
As shown in FIG. 3A, the buffer 301 for pre-REC is empty before the start of pre-REC.
When the operation switch group 109 is operated and the image pickup apparatus 100 is instructed to start the pre-REC, the moving image data 302 is held in the buffer 301 for the pre-REC on the RAM 111 as shown in FIG. 3 (b). To. The moving image data 302 is generated by compressing the image data output to the RAM 111 by the image processing unit 103 by controlling the compression / decompression circuit A104 by the microcomputer 108 to perform coding processing such as motion compensation prediction coding. .. Then, in the same manner, as shown in FIGS. 3 (c) and 3 (d), the moving image data 303 and 304 are written to the buffer 301 for pre-REC. Then, when the buffer 301 for the pre-REC becomes full, as shown in FIG. 3 (e), the moving image data 305 of the 4th GOP is pre-written so as to overwrite the moving image data 302 of the 1st GOP (Group Of Pictures). Write to buffer 301 for REC. After that, by sequentially updating the moving image data to be held in the same manner, the moving image data for a predetermined time is held in the buffer 301 for pre-REC.

例えば、図3(e)に示した状態の時点で撮像装置100に対して、操作スイッチ群109を介して動画記録開始の指示が行われたとする。このとき、2GOP目の動画像データ303から4GOP目の動画像データ305までがプリRECの動画像データとしてSDカードコントローラA112を介してSDカードA114に書き込まれる。以上がプリREC機能についての説明である。 For example, it is assumed that the image pickup apparatus 100 is instructed to start moving image recording via the operation switch group 109 at the time of the state shown in FIG. 3 (e). At this time, the moving image data 303 of the 2nd GOP to the moving image data 305 of the 4th GOP are written to the SD card A114 as the moving image data of the pre-REC via the SD card controller A112. The above is the description of the pre-REC function.

ステップS202では、マイコン108は、圧縮伸張回路A104を制御して画像処理部103がRAM111に出力した画像データを圧縮し、プリREC用の動画像データとしてRAM111上の圧縮伸張回路A104用のプリREC用バッファに保持する。 In step S202, the microcomputer 108 controls the compression / decompression circuit A104 to compress the image data output to the RAM 111 by the image processing unit 103, and the pre-REC for the compression / decompression circuit A104 on the RAM 111 is used as the moving image data for the pre-REC. Hold in the buffer.

ステップS203では、マイコン108は、圧縮伸張回路A104がGOP長の半分の画像データを圧縮したか否かを判断する。ここで、GOP長とは、動き補償予測符号化の参照構造(GOP構造)のフレーム数、すなわちGOPが何フレームで構成されているかというGOPの長さであり、例えばGOP長が64であれば1GOPは64フレームで構成される。また、GOP長が64である場合にGOP長の半分の画像データを圧縮したということは、圧縮伸張回路A104は64フレームの半分のフレーム数分である32フレーム分の画像データを圧縮したということである。GOP長の半分の画像データを圧縮したとマイコン108が判断した場合、処理はステップS204へ進む。 In step S203, the microcomputer 108 determines whether or not the compression / decompression circuit A104 has compressed image data having half the GOP length. Here, the GOP length is the number of frames of the reference structure (GOP structure) of motion compensation prediction coding, that is, the length of the GOP indicating how many frames the GOP is composed of. For example, if the GOP length is 64. One GOP consists of 64 frames. Further, when the GOP length is 64, the image data of half the GOP length is compressed, which means that the compression / decompression circuit A104 compresses the image data of 32 frames, which is half the number of frames of 64 frames. Is. When the microcomputer 108 determines that the image data having half the GOP length has been compressed, the process proceeds to step S204.

ステップS204では、マイコン108は、圧縮伸張回路B105を制御して画像処理部103がRAM111に出力した画像データを圧縮し、プリREC用の動画像データとしてRAM111上の圧縮伸張回路B105用のプリREC用バッファに保持する。 In step S204, the microcomputer 108 controls the compression / decompression circuit B105 to compress the image data output to the RAM 111 by the image processing unit 103, and the pre-REC for the compression / decompression circuit B105 on the RAM 111 is used as the moving image data for the pre-REC. Hold in the buffer.

ここで、図4(a)を用いて、圧縮伸張回路A104用のプリREC用バッファと圧縮伸張回路B105用のプリREC用バッファについて説明する。なお、圧縮伸張回路A104の動画像データ、及び圧縮伸張回路B105の動画像データともにGOP長は64であるとする。プリREC用バッファの領域401は、RAM111上に確保される。なお、プリREC用バッファでは、RAM111に確保された領域をリングバッファのようにして使用してバッファリングを行い、保持する動画像データが逐次更新される。図4においては、図において左側がリングバッファとしたときの最古の動画像データであり、右側がリングバッファとしたときの最新の動画像データであるものとする。 Here, the pre-REC buffer for the compression / expansion circuit A104 and the pre-REC buffer for the compression / expansion circuit B105 will be described with reference to FIG. 4A. It is assumed that the GOP length is 64 for both the moving image data of the compression / stretching circuit A104 and the moving image data of the compression / stretching circuit B105. The area 401 of the pre-REC buffer is secured on the RAM 111. In the pre-REC buffer, the area reserved in the RAM 111 is used like a ring buffer for buffering, and the moving image data to be held is sequentially updated. In FIG. 4, it is assumed that the left side is the oldest moving image data when the ring buffer is used and the right side is the latest moving image data when the ring buffer is used.

図4(a)に一例を示すように、圧縮伸張回路A104のプリREC用のバッファ402には、1GOPに満たない30フレーム目〜63フレーム目の動画像データ403と、1GOP分の動画像データ404が保持されている。また、圧縮伸張回路B105のプリREC用のバッファ405には、1GOPに満たない62フレーム目〜63フレーム目の動画像データ406と、1GOP分の動画像データ407と、今後追記される1GOPに満たない動画像データ408が保持されている。なお、圧縮伸張回路A104のプリREC用のバッファ402と、圧縮伸張回路B105のプリREC用のバッファ405は、409に示すように32フレーム(GOP長の半分)だけ位相差をつけて動画像データが記録されている。つまり、圧縮伸張回路A104及び圧縮伸張回路B105は、動き補償予測符号化における参照構造(GOP構造)の半分のフレーム数分だけ位相を異ならせて、動画像データを動き補償予測符号化している。 As an example shown in FIG. 4A, the buffer 402 for the pre-REC of the compression / expansion circuit A104 contains the moving image data 403 of the 30th to 63rd frames, which is less than 1 GOP, and the moving image data for 1 GOP. 404 is held. Further, the buffer 405 for the pre-REC of the compression / expansion circuit B105 is filled with the moving image data 406 of the 62nd to 63rd frames, which is less than 1 GOP, the moving image data 407 of 1 GOP, and 1 GOP to be added in the future. No moving image data 408 is retained. As shown in 409, the buffer 402 for the pre-REC of the compression / expansion circuit A104 and the buffer 405 for the pre-REC of the compression / expansion circuit B105 have a phase difference of 32 frames (half the GOP length) to provide moving image data. Is recorded. That is, the compression / expansion circuit A104 and the compression / expansion circuit B105 are different in phase by half the number of frames of the reference structure (GOP structure) in the motion compensation prediction coding, and the moving image data is motion compensation prediction coding.

ステップS205では、マイコン108は、ユーザーが操作スイッチ群109を操作することで、撮像装置100に対して記録開始指示がされたか否かを判断する。記録開始指示されたとマイコン108が判断した場合、処理はステップS206に進む。 In step S205, the microcomputer 108 determines whether or not the image pickup apparatus 100 has been instructed to start recording by operating the operation switch group 109. If the microcomputer 108 determines that the recording start instruction has been given, the process proceeds to step S206.

ステップS206では、マイコン108は、圧縮伸張回路A104のプレREC用バッファと、圧縮伸張回路B105のプレREC用バッファとを比較し、どちらがプレREC時間が長くなるかを判断する。圧縮伸張回路A104の動画像データのプリRECの時間の方が長くなるとマイコン108が判断した場合、処理はステップS207に進む。また、圧縮伸張回路B105の動画像データのプリREC時間の方が長くなるとマイコン108が判断した場合、処理はステップS209に進む。 In step S206, the microcomputer 108 compares the pre-REC buffer of the compression / expansion circuit A104 with the pre-REC buffer of the compression / expansion circuit B105, and determines which has the longer pre-REC time. When the microcomputer 108 determines that the pre-REC time of the moving image data of the compression / decompression circuit A104 is longer, the process proceeds to step S207. If the microcomputer 108 determines that the pre-REC time of the moving image data of the compression / decompression circuit B105 is longer, the process proceeds to step S209.

ここで、このステップS206での比較について、図4(b)を用いて説明する。なお、圧縮伸張回路A104のプリREC用バッファ及び圧縮伸張回路B105のプリREC用バッファの状態は、図4(a)で説明したものと同様である。圧縮伸張回路A104のプリREC用のバッファ402には、1GOPに満たない30フレーム目〜63フレーム目の動画像データ403と、1GOP分の動画像データ404とが保持されている。また、圧縮伸張回路B105のプリREC用のバッファ405には、1GOPに満たない62フレーム目〜63フレーム目の動画像データ406と、1GOP分の動画像データ407と、1GOPに満たない動画像データ408とが保持されている。 Here, the comparison in step S206 will be described with reference to FIG. 4 (b). The states of the pre-REC buffer of the compression / expansion circuit A104 and the pre-REC buffer of the compression / expansion circuit B105 are the same as those described in FIG. 4A. The buffer 402 for pre-REC of the compression / decompression circuit A104 holds the moving image data 403 of the 30th to 63rd frames, which is less than 1 GOP, and the moving image data 404 for 1 GOP. Further, in the buffer 405 for the pre-REC of the compression / decompression circuit B105, the moving image data 406 of the 62nd to 63rd frames less than 1GOP, the moving image data 407 of 1GOP, and the moving image data less than 1GOP. 408 and are retained.

動画像データ403、406は、1GOPに満たないデータであるため、破棄フレームとして動画像データ403、406は破棄される。一方で、動画像データ408も同様に1GOPに満たないデータではあるが、今後の記録で追記されて1GOPのデータとなる。そのため、圧縮伸張回路A104では、動画像データ404がプリREC用の動画像データとなり、圧縮伸張回路B105では、動画像データ407と動画像データ408とがプリREC用の動画像データとなる。以上より、図4に示すバッファ状態では、圧縮伸張回路B105のプリREC用バッファ405の方が圧縮伸張回路A104のプリREC用バッファ402よりも、保持している動画像データにおいて有効フレームの数が多い(破棄フレームの数が少ない)。したがって、圧縮伸張回路B105のプリREC時間の方が、圧縮伸張回路A104のプリREC時間より長いと判断される。 Since the moving image data 403 and 406 are data less than 1 GOP, the moving image data 403 and 406 are discarded as a discard frame. On the other hand, the moving image data 408 is also data that is less than 1 GOP, but will be added in future records to become 1 GOP data. Therefore, in the compression / expansion circuit A104, the moving image data 404 becomes the moving image data for the pre-REC, and in the compression / stretching circuit B105, the moving image data 407 and the moving image data 408 become the moving image data for the pre-REC. From the above, in the buffer state shown in FIG. 4, the number of effective frames in the moving image data held by the pre-REC buffer 405 of the compression / expansion circuit B105 is larger than that of the pre-REC buffer 402 of the compression / expansion circuit A104. Many (small number of discarded frames). Therefore, it is determined that the pre-REC time of the compression / expansion circuit B105 is longer than the pre-REC time of the compression / expansion circuit A104.

ステップS207では、マイコン108は、圧縮伸張回路B105の動作を停止し、圧縮伸張回路B105に対応するRAM111上のプリREC用バッファに保持されている動画像データを破棄する。その後、処理はステップS208に進む。 In step S207, the microcomputer 108 stops the operation of the compression / decompression circuit B105, and discards the moving image data held in the pre-REC buffer on the RAM 111 corresponding to the compression / decompression circuit B105. After that, the process proceeds to step S208.

ステップS208では、マイコン108は、RAM111上に展開された圧縮伸張回路A104のプリREC用バッファに保持されている動画像データを、SDカードコントローラA112を制御してSDカードA114に書き込む。そして、引き続き圧縮伸張回路A104を動作させ、RAM111に動画像データを出力させる。そして、マイコン108は、SDカードコントローラA112を制御して、プリREC用の動画像データに対して継続して記録されるようにSDカードA114に、この動画像データを書き込む。そして終了する。 In step S208, the microcomputer 108 controls the SD card controller A112 to write the moving image data held in the pre-REC buffer of the compression / decompression circuit A104 expanded on the RAM 111 to the SD card A114. Then, the compression / decompression circuit A104 is continuously operated to output the moving image data to the RAM 111. Then, the microcomputer 108 controls the SD card controller A112 and writes the moving image data in the SD card A114 so that the moving image data for the pre-REC is continuously recorded. And finish.

ステップS209では、マイコン108は、圧縮伸張回路A104の動作を停止し、圧縮伸張回路A104に対応するRAM111上のプリREC用バッファに保持されている動画像データを破棄する。その後、処理はステップS210に進む。 In step S209, the microcomputer 108 stops the operation of the compression / decompression circuit A104, and discards the moving image data held in the pre-REC buffer on the RAM 111 corresponding to the compression / decompression circuit A104. After that, the process proceeds to step S210.

ステップS210では、マイコン108は、RAM111上に展開された圧縮伸張回路B105のプリREC用バッファに保持されている動画像データを、SDカードコントローラA112を制御してSDカードA114に書き込む。そして、引き続き圧縮伸張回路B105を動作させ、RAM111に動画像データを出力させる。そして、マイコン108は、SDカードコントローラA112を制御して、プリREC用の動画像データに対して継続して記録されるようにSDカードA114に、動画像データを書き込む。そして終了する。 In step S210, the microcomputer 108 controls the SD card controller A112 to write the moving image data held in the pre-REC buffer of the compression / decompression circuit B105 developed on the RAM 111 to the SD card A114. Then, the compression / decompression circuit B105 is continuously operated to output the moving image data to the RAM 111. Then, the microcomputer 108 controls the SD card controller A112 and writes the moving image data to the SD card A114 so that the moving image data for the pre-REC is continuously recorded. And finish.

このように、圧縮伸張回路A104及び圧縮伸張回路B105による動き補償予測符号化を参照構造(GOP構造)の位相がGOP長の半分ずらし異なるようにしてプリRECを行う。そして、動画像データの記録開始指示を受け付けると、プリREC時間が長くなる一方のプリREC用バッファが保持する動画像データをプリRECの動画像データとして使用し、他方のプリREC用バッファが保持する動画像データを破棄する。これにより、撮像装置100において、動画像データの記録時にプリREC時間が短くなってしまうことを防止することができる。 In this way, the motion compensation prediction coding by the compression / expansion circuit A104 and the compression / expansion circuit B105 is performed by pre-REC so that the phases of the reference structure (GOP structure) are shifted by half the GOP length. Then, when the recording start instruction of the moving image data is received, the moving image data held by the pre-REC buffer for which the pre-REC time becomes longer is used as the moving image data of the pre-REC, and the other pre-REC buffer holds the moving image data. Discard the moving image data. This makes it possible to prevent the pre-REC time from being shortened when recording moving image data in the image pickup apparatus 100.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。第2の実施形態における撮像装置の構成は、第1の実施形態における撮像装置100と同様であるので、説明は省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. Since the configuration of the imaging device in the second embodiment is the same as that of the imaging device 100 in the first embodiment, the description thereof will be omitted.

第2の実施形態における撮像装置100の動作について、図5を参照して説明する。図5は、第2の実施形態における撮像装置100の動作例を示すフローチャートである。第1の実施形態では、動画像データのGOP長やプリRECの形式にはかかわらず、圧縮伸張回路B105を動作させていた。しかし、例えばGOP長が短い時などは、破棄するフレームが少ないため、圧縮伸張回路A104に対してGOP長の半分だけ位相をずらして圧縮伸張回路B105を動作させることで破棄するフレームを少なくするメリットが低い。後述するがプリRECの形式についても同様である。そのため、第2の実施形態では、GOP長や、プリRECの形式に基づき圧縮伸張回路B105を動作させるか否かを判断する。 The operation of the image pickup apparatus 100 in the second embodiment will be described with reference to FIG. FIG. 5 is a flowchart showing an operation example of the image pickup apparatus 100 according to the second embodiment. In the first embodiment, the compression / decompression circuit B105 is operated regardless of the GOP length of the moving image data and the format of the pre-REC. However, for example, when the GOP length is short, there are few frames to be discarded. Therefore, there is an advantage that the number of frames to be discarded is reduced by operating the compression / expansion circuit B105 by shifting the phase by half of the GOP length with respect to the compression / expansion circuit A104. Is low. As will be described later, the same applies to the pre-REC format. Therefore, in the second embodiment, it is determined whether or not to operate the compression / expansion circuit B105 based on the GOP length and the pre-REC format.

ステップS501では、マイコン108は、撮像装置100に対してプリREC動作の開始が指示されたか否かを判断する。プリREC開始が指示されたとマイコン108が判断した場合、処理はステップS502へ進む。 In step S501, the microcomputer 108 determines whether or not the image pickup apparatus 100 is instructed to start the pre-REC operation. When the microcomputer 108 determines that the pre-REC start is instructed, the process proceeds to step S502.

ステップS502では、マイコン108は、圧縮伸張回路A104を制御して画像処理部103がRAM111に出力した画像データを圧縮し、プリREC用の動画像データとしてRAM111上の圧縮伸張回路A104用のプリREC用バッファに保持する。 In step S502, the microcomputer 108 controls the compression / decompression circuit A104 to compress the image data output to the RAM 111 by the image processing unit 103, and the pre-REC for the compression / decompression circuit A104 on the RAM 111 is used as the moving image data for the pre-REC. Hold in the buffer.

ステップS503では、マイコン108は、圧縮伸張回路A104で圧縮している動画像データのGOP長(参照構造のフレーム数)が所定のフレーム数以上であるか否かを判断する。圧縮伸張回路A104で圧縮している動画像データのGOP長が所定のフレーム数以上であるとマイコン108が判断した場合には、処理はステップS504へ進む。一方、圧縮伸張回路A104で圧縮している動画像データのGOP長が所定のフレーム数以上でないとマイコン108が判断した場合には、処理はステップS505へ進む。 In step S503, the microcomputer 108 determines whether or not the GOP length (the number of frames of the reference structure) of the moving image data compressed by the compression / decompression circuit A104 is equal to or greater than a predetermined number of frames. When the microcomputer 108 determines that the GOP length of the moving image data compressed by the compression / decompression circuit A104 is equal to or greater than a predetermined number of frames, the process proceeds to step S504. On the other hand, when the microcomputer 108 determines that the GOP length of the moving image data compressed by the compression / decompression circuit A104 is not equal to or more than a predetermined number of frames, the process proceeds to step S505.

ステップS504では、マイコン108は、プリREC方式が一定の時間分とする秒数固定方式であるか、プリREC用バッファの記憶容量分とするバッファフル方式であるかを判断する。バッファフル方式であるとマイコン108が判断した場合には、処理はステップS507へ進み、秒数固定方式であるとマイコン108が判断した場合には、処理はステップS505に進む。 In step S504, the microcomputer 108 determines whether the pre-REC method is a fixed number of seconds method for a fixed time or a buffer full method for the storage capacity of the pre-REC buffer. If the microcomputer 108 determines that the buffer full method is used, the process proceeds to step S507, and if the microcomputer 108 determines that the method is a fixed number of seconds method, the process proceeds to step S505.

ここで図6を用いて、秒数固定方式とバッファフル方式について説明する。なお、ここでは1GOP=1秒の動画データとして説明する。図6(a)に示すように、RAM111に圧縮伸張回路A104のプリREC用のバッファ601が確保されている。図6(a)に示す例では、1〜4GOPで4秒分の動画像データが格納されている。 Here, the fixed number of seconds method and the buffer full method will be described with reference to FIG. Here, it will be described as moving image data of 1 GOP = 1 second. As shown in FIG. 6A, a buffer 601 for pre-REC of the compression / expansion circuit A104 is secured in the RAM 111. In the example shown in FIG. 6A, moving image data for 4 seconds is stored in 1 to 4 GOP.

秒数固定方式は、プリRECの時間が何秒かを固定するプリREC方式である。例えば、図6(a)に示すバッファ601の状態で、プリRECの秒数が3秒固定である場合には、図6(b)の602に示すように2〜4GOP目の3秒分をプリREC用の動画像データとして扱う。一方、バッファフル方式は、RAM111に保持されている圧縮伸張回路A104のプリREC用のバッファのすべてを記録する方式である。例えば、図6(a)に示すバッファ601の状態である場合には、図6(c)の603に示すように1〜4GOP目、4秒分をプリREC用の動画像データとして扱う。 The fixed number of seconds method is a pre-REC method that fixes the pre-REC time to several seconds. For example, in the state of the buffer 601 shown in FIG. 6 (a), when the number of seconds of the pre-REC is fixed at 3 seconds, as shown in 602 of FIG. 6 (b), 3 seconds of the 2nd to 4th GOP are set. It is treated as moving image data for pre-REC. On the other hand, the buffer full method is a method of recording all the buffers for pre-REC of the compression / expansion circuit A104 held in the RAM 111. For example, in the case of the state of the buffer 601 shown in FIG. 6A, the 1st to 4th GOPs and 4 seconds are treated as moving image data for pre-REC as shown in 603 of FIG. 6C.

ステップS505では、マイコン108は、ユーザーが操作スイッチ群109を操作することで、撮像装置100に対して記録開始指示がされたか否かを判断する。記録開始指示されたとマイコン108が判断した場合、処理はステップS506に進む。 In step S505, the microcomputer 108 determines whether or not the image pickup apparatus 100 has been instructed to start recording by operating the operation switch group 109. If the microcomputer 108 determines that the recording start instruction has been given, the process proceeds to step S506.

ステップS506では、マイコン108は、RAM111上に展開された圧縮伸張回路A104のプリREC用バッファに保持されている動画像データを、SDカードコントローラA112を制御してSDカードA114に書き込む。そして、引き続き圧縮伸張回路A104を動作させ、RAM111に動画像データを出力させる。そして、マイコン108は、SDカードコントローラA112を制御して、プリREC用の動画像データに対して継続して記録されるようにSDカードA114に、この動画像データを書き込む。そして終了する。 In step S506, the microcomputer 108 controls the SD card controller A112 to write the moving image data held in the pre-REC buffer of the compression / decompression circuit A104 developed on the RAM 111 to the SD card A114. Then, the compression / decompression circuit A104 is continuously operated to output the moving image data to the RAM 111. Then, the microcomputer 108 controls the SD card controller A112 and writes the moving image data in the SD card A114 so that the moving image data for the pre-REC is continuously recorded. And finish.

なお、ステップS507〜S514の処理は、図2に示した第1の実施形態におけるステップS203〜S210の処理とそれぞれ同様であるので、説明は省略する。 Since the processes of steps S507 to S514 are the same as the processes of steps S203 to S210 in the first embodiment shown in FIG. 2, the description thereof will be omitted.

このように、第2の実施形態によれば、動画像データのGOP長又はプリREC方式に応じて、圧縮伸張回路A104及び圧縮伸張回路B105の両方を使ってプリRECを行うか、圧縮伸張回路A104のみでプリRECを行うかを切り替える。これにより、圧縮伸張回路B105の不要な動作を抑制することができ、消費電力等を削減することができる。 As described above, according to the second embodiment, the pre-REC is performed by using both the compression / expansion circuit A104 and the compression / expansion circuit B105, or the compression / expansion circuit is performed, depending on the GOP length of the moving image data or the pre-REC method. It is switched whether to perform pre-REC only with A104. As a result, unnecessary operation of the compression / expansion circuit B105 can be suppressed, and power consumption and the like can be reduced.

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。第3の実施形態における撮像装置の構成は、第1の実施形態における撮像装置100と同様であるので、説明は省略する。
(Third Embodiment)
Next, a third embodiment of the present invention will be described. Since the configuration of the image pickup apparatus in the third embodiment is the same as that of the image pickup apparatus 100 in the first embodiment, the description thereof will be omitted.

第3の実施形態における撮像装置100の動作について、図7を参照して説明する。図7は、第3の実施形態における撮像装置100の動作例を示すフローチャートである。第3の実施形態は、第1の実施形態に対して、新たに圧縮伸張回路C119を用い、圧縮伸張回路A104もしくは圧縮伸張回路B105のプロキシ動画を生成するものである。 The operation of the image pickup apparatus 100 in the third embodiment will be described with reference to FIG. 7. FIG. 7 is a flowchart showing an operation example of the image pickup apparatus 100 according to the third embodiment. The third embodiment newly uses the compression / decompression circuit C119 with respect to the first embodiment to generate a proxy moving image of the compression / decompression circuit A104 or the compression / decompression circuit B105.

ステップS701では、マイコン108は、撮像装置100に対してプリREC動作の開始が指示されたか否かを判断する。プリREC開始が指示されたとマイコン108が判断した場合、処理はステップS702へ進む。 In step S701, the microcomputer 108 determines whether or not the image pickup apparatus 100 is instructed to start the pre-REC operation. When the microcomputer 108 determines that the pre-REC start is instructed, the process proceeds to step S702.

ステップS702では、マイコン108は、圧縮伸張回路C119を制御して画像処理部103がRAM111に出力した画像データを圧縮し、プリREC用の動画像データとしてRAM111上の圧縮伸張回路C119用のプリREC用バッファに保持する。なお、圧縮伸張回路C119は、圧縮伸張回路A104及び圧縮伸張回路B105と符号化方式が異なっていても良く、生成される動画像データの解像度やGOP長が異なっていても良い。 In step S702, the microcomputer 108 controls the compression / decompression circuit C119 to compress the image data output to the RAM 111 by the image processing unit 103, and the pre-REC for the compression / decompression circuit C119 on the RAM 111 is used as the moving image data for the pre-REC. Hold in the buffer. The compression / expansion circuit C119 may have a different coding method from the compression / expansion circuit A104 and the compression / expansion circuit B105, and may have different resolutions and GOP lengths of the generated moving image data.

ステップS703では、マイコン108は、圧縮伸張回路A104を制御して画像処理部103がRAM111に出力した画像データを圧縮し、プリREC用の動画像データとしてRAM111上の圧縮伸張回路A104用のプリREC用バッファに保持する。 In step S703, the microcomputer 108 controls the compression / decompression circuit A104 to compress the image data output to the RAM 111 by the image processing unit 103, and the pre-REC for the compression / decompression circuit A104 on the RAM 111 is used as the moving image data for the pre-REC. Hold in the buffer.

ステップS704では、マイコン108は、圧縮伸張回路A104がGOP長の半分の画像データを圧縮したか否かを判断する。GOP長の半分の画像データを圧縮したとマイコン108が判断した場合、処理はステップS705へ進む。 In step S704, the microcomputer 108 determines whether or not the compression / decompression circuit A104 has compressed image data having half the GOP length. When the microcomputer 108 determines that the image data having half the GOP length has been compressed, the process proceeds to step S705.

ステップS705では、マイコン108は、圧縮伸張回路B105を制御して画像処理部103がRAM111に出力した画像データを圧縮し、プリREC用の動画像データとしてRAM111上の圧縮伸張回路B105用のプリREC用バッファに保持する。 In step S705, the microcomputer 108 controls the compression / decompression circuit B105 to compress the image data output to the RAM 111 by the image processing unit 103, and the pre-REC for the compression / decompression circuit B105 on the RAM 111 is used as the moving image data for the pre-REC. Hold in the buffer.

ステップS706では、マイコン108は、ユーザーが操作スイッチ群109を操作することで、撮像装置100に対して記録開始指示がされたか否かを判断する。記録開始指示されたとマイコン108が判断した場合、処理はステップS707に進む。 In step S706, the microcomputer 108 determines whether or not the image pickup apparatus 100 has been instructed to start recording by operating the operation switch group 109. If the microcomputer 108 determines that the recording start instruction has been given, the process proceeds to step S707.

ステップS707では、マイコン108は、圧縮伸張回路A104のプレREC用バッファと、圧縮伸張回路B105のプレREC用バッファとを比較し、どちらが圧縮伸張回路C119のプリREC用バッファの時間に近いかを判断する。圧縮伸張回路A104の動画像データのプリRECの時間の方が圧縮伸張回路C119のプリRECの時間に近いとマイコン108が判断した場合には、処理はステップS708に進む。また、圧縮伸張回路B105の動画像データのプリRECの時間の方が圧縮伸張回路C119のプリRECの時間に近いとマイコン108が判断した場合には、処理はステップS710に進む。 In step S707, the microcomputer 108 compares the pre-REC buffer of the compression / expansion circuit A104 with the pre-REC buffer of the compression / expansion circuit B105, and determines which is closer to the time of the pre-REC buffer of the compression / expansion circuit C119. To do. When the microcomputer 108 determines that the pre-REC time of the moving image data of the compression / expansion circuit A104 is closer to the pre-REC time of the compression / expansion circuit C119, the process proceeds to step S708. If the microcomputer 108 determines that the pre-REC time of the moving image data of the compression / expansion circuit B105 is closer to the pre-REC time of the compression / expansion circuit C119, the process proceeds to step S710.

ここで、図8を参照して、どちらが圧縮伸張回路C119のプリREC用バッファの時間に近いかという判断について説明する。図8は、ある時点でのRAM111の状態を示している。図8において、801は圧縮伸張回路A104のプリREC用のバッファであり、802は圧縮伸張回路B105のプリREC用のバッファであり、803は圧縮伸張回路C119のプリREC用のバッファである。圧縮伸張回路A104の動画像データ805及び圧縮伸張回路B105の動画像データ806に示すように、圧縮伸張回路A104及び圧縮伸張回路B105のGOP長は64である。また、圧縮伸張回路C119の動画像データ807に示すように、圧縮伸張回路C119のGOP長は48である。そして、804に示すように、圧縮伸張回路A104のプリREC用バッファと、圧縮伸張回路B105のプリREC用バッファはGOP長の半分ずれている。 Here, with reference to FIG. 8, a determination as to which is closer to the time of the pre-REC buffer of the compression / decompression circuit C119 will be described. FIG. 8 shows the state of the RAM 111 at a certain point in time. In FIG. 8, 801 is a buffer for pre-REC of the compression / expansion circuit A104, 802 is a buffer for pre-REC of the compression / expansion circuit B105, and 803 is a buffer for pre-REC of the compression / expansion circuit C119. As shown in the moving image data 805 of the compression / decompression circuit A104 and the moving image data 806 of the compression / decompression circuit B105, the GOP length of the compression / decompression circuit A104 and the compression / decompression circuit B105 is 64. Further, as shown in the moving image data 807 of the compression / expansion circuit C119, the GOP length of the compression / expansion circuit C119 is 48. Then, as shown in 804, the pre-REC buffer of the compression / expansion circuit A104 and the pre-REC buffer of the compression / expansion circuit B105 are deviated by half of the GOP length.

このような状態で記録動作を行うと、プレRECとしての有効フレームは、圧縮伸張回路A104のプリREC用バッファではフレーム808となり、圧縮伸張回路B105のプリREC用バッファではフレーム809となる。また、圧縮伸張回路C119のプリREC用バッファではフレーム810となる。圧縮伸張回路A104及び圧縮伸張回路B105のプリREC用のバッファを比較すると圧縮伸張回路A104の有効フレームの範囲の方が圧縮伸張回路C119の有効フレームの範囲に近い。そのため、図8に示すバッファ状態では、ステップS707での判断はYESとなる。 When the recording operation is performed in such a state, the effective frame as the pre-REC is the frame 808 in the pre-REC buffer of the compression / expansion circuit A104, and the frame 809 in the pre-REC buffer of the compression / expansion circuit B105. Further, in the pre-REC buffer of the compression / expansion circuit C119, the frame is 810. Comparing the buffers for pre-REC of the compression / expansion circuit A104 and the compression / expansion circuit B105, the effective frame range of the compression / expansion circuit A104 is closer to the effective frame range of the compression / expansion circuit C119. Therefore, in the buffer state shown in FIG. 8, the determination in step S707 is YES.

ステップS708では、マイコン108は、圧縮伸張回路B105の動作を停止し、圧縮伸張回路B105に対応するRAM111上のプリREC用バッファに保持されている動画像データを破棄する。その後、処理はステップS709に進む。 In step S708, the microcomputer 108 stops the operation of the compression / decompression circuit B105, and discards the moving image data held in the pre-REC buffer on the RAM 111 corresponding to the compression / decompression circuit B105. After that, the process proceeds to step S709.

ステップS709では、マイコン108は、RAM111上に展開された圧縮伸張回路A104のプリREC用バッファに保持されている動画像データを、SDカードコントローラA112を制御してSDカードA114に書き込む。そして、引き続き圧縮伸張回路A104を動作させ、RAM111に動画像データを出力させる。そして、マイコン108は、SDカードコントローラA112を制御して、プリREC用の動画像データに対して継続して記録されるようにSDカードA114に、この動画像データを書き込む。その後、処理はステップS712に進む。 In step S709, the microcomputer 108 controls the SD card controller A112 to write the moving image data held in the pre-REC buffer of the compression / decompression circuit A104 developed on the RAM 111 to the SD card A114. Then, the compression / decompression circuit A104 is continuously operated to output the moving image data to the RAM 111. Then, the microcomputer 108 controls the SD card controller A112 and writes the moving image data in the SD card A114 so that the moving image data for the pre-REC is continuously recorded. After that, the process proceeds to step S712.

ステップS710では、マイコン108は、圧縮伸張回路A104の動作を停止し、圧縮伸張回路A104に対応するRAM111上のプリREC用バッファに保持されている動画像データを破棄する。その後、処理はステップS711に進む。 In step S710, the microcomputer 108 stops the operation of the compression / decompression circuit A104, and discards the moving image data held in the pre-REC buffer on the RAM 111 corresponding to the compression / decompression circuit A104. After that, the process proceeds to step S711.

ステップS711では、マイコン108は、RAM111上に展開された圧縮伸張回路B105のプリREC用バッファに保持されている動画像データを、SDカードコントローラA112を制御してSDカードA114に書き込む。そして、引き続き圧縮伸張回路B105を動作させ、RAM111に動画像データを出力させる。そして、マイコン108は、SDカードコントローラA112を制御して、プリREC用の動画像データに対して継続して記録されるようにSDカードA114に、動画像データを書き込む。その後、処理はステップS712に進む。 In step S711, the microcomputer 108 controls the SD card controller A112 to write the moving image data held in the pre-REC buffer of the compression / decompression circuit B105 developed on the RAM 111 to the SD card A114. Then, the compression / decompression circuit B105 is continuously operated to output the moving image data to the RAM 111. Then, the microcomputer 108 controls the SD card controller A112 and writes the moving image data to the SD card A114 so that the moving image data for the pre-REC is continuously recorded. After that, the process proceeds to step S712.

ステップS712では、マイコン108は、RAM111上に展開された圧縮伸張回路C119のプリREC用バッファに保持されている動画像データを、SDカードコントローラB113を制御してSDカードB115に書き込む。そして、引き続き圧縮伸張回路C119を動作させ、RAM111に動画像データを出力させる。そして、マイコン108は、SDカードコントローラB113を制御して、プリREC用の動画像データに対して継続して記録されるようにSDカードB115に、この動画像データを書き込む。そして終了する。 In step S712, the microcomputer 108 controls the SD card controller B113 to write the moving image data held in the pre-REC buffer of the compression / decompression circuit C119 expanded on the RAM 111 to the SD card B115. Then, the compression / decompression circuit C119 is continuously operated to output moving image data to the RAM 111. Then, the microcomputer 108 controls the SD card controller B113 to write the moving image data to the SD card B 115 so that the moving image data for pre-REC is continuously recorded. And finish.

このように、プロキシ動画を生成している際は、プロキシ動画のプリREC用バッファに近い方のプリREC用バッファに格納されている動画像データをプリRECの動画像データとして記録する。これにより、圧縮伸張回路C119で生成されるプロキシ動画の動画像データと、圧縮伸張回路A104もしくは圧縮伸張回路B105で生成される動画像データの長さを合わせることができる。 In this way, when the proxy moving image is generated, the moving image data stored in the pre-REC buffer closer to the pre-REC buffer of the proxy moving image is recorded as the moving image data of the pre-REC. As a result, the length of the moving image data of the proxy moving image generated by the compression / decompression circuit C119 and the moving image data generated by the compression / decompression circuit A104 or the compression / decompression circuit B105 can be matched.

以上、本発明の実施形態を説明したが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。前述の実施形態の一部を適宜組み合わせてもよい。 Although the embodiments of the present invention have been described above, the present invention is not limited to these specific embodiments, and various embodiments within the scope of the gist of the present invention are also included in the present invention. Some of the above-described embodiments may be combined as appropriate.

(本発明の他の実施形態)
本発明は、前述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other Embodiments of the present invention)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

なお、前記実施形態は、何れも本発明を実施するにあたっての具体化のほんの一例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 It should be noted that the above-described embodiments are merely examples of embodiment of the present invention, and the technical scope of the present invention should not be construed in a limited manner by these. That is, the present invention can be implemented in various forms without departing from the technical idea or its main features.

100:撮像装置 102:センサー 103:画像処理部 104、105、119:圧縮伸張回路 108:マイクロコンピュータ 109:操作スイッチ群 110:ROM 111:RAM 112、113:SDカードコントローラ 114、115:SDカード 100: Imaging device 102: Sensor 103: Image processing unit 104, 105, 119: Compression / decompression circuit 108: Microcomputer 109: Operation switch group 110: ROM 111: RAM 112, 113: SD card controller 114, 115: SD card

Claims (18)

所定のフレーム数の参照構造で動画像データを符号化する第1の符号化処理手段と、
前記第1の符号化処理手段と同じフレーム数の参照構造で位相を異ならせて、前記動画像データを符号化する第2の符号化処理手段と、
前記第1の符号化処理手段により符号化された動画像データと、前記第2の符号化処理手段により符号化された動画像データを一時的に保持する保持手段と、
記録開始指示を受け付けたことに応じて前記記録開始指示を受け付ける前の動画像データを記録する場合に、前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうちのいずれか一方の動画像データを記憶手段に記録するように制御する制御手段とを有することを特徴とする記録装置。
A first coding processing means for encoding moving image data with a reference structure having a predetermined number of frames,
A second coding processing means for encoding the moving image data by differentiating the phases with a reference structure having the same number of frames as the first coding processing means.
A holding means for temporarily holding the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means.
When recording the moving image data before receiving the recording start instruction in response to the reception of the recording start instruction, the moving image data encoded by the first coding processing means and the second coding are performed. A recording device including a control means for controlling to record moving image data of any one of moving image data encoded by the processing means in a storage means.
前記制御手段は、記録開始指示を受け付けたことに応じて、当該記録開始指示を受け付ける前の所定時間分の動画像データを記録するように制御することを特徴とする請求項1に記載の記録装置。 The recording according to claim 1, wherein the control means controls to record moving image data for a predetermined time before receiving the recording start instruction in response to receiving the recording start instruction. apparatus. 前記保持手段は、前記第1の符号化処理手段により符号化された動画像データを保持する第1の保持手段と、前記第2の符号化処理手段により符号化された動画像データを保持する第2の保持手段とを含み、
前記第1の保持手段、及び、前記第2の保持手段は、それぞれ、前記記録開始指示を受け付ける前の所定時間分の動画像データを保持することを特徴とする請求項1または2に記載の記録装置。
The holding means holds the first holding means for holding the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means. Including a second holding means
The first or second holding means according to claim 1, wherein each of the first holding means and the second holding means holds moving image data for a predetermined time before receiving the recording start instruction. Recording device.
前記制御手段は、前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうち、前記保持手段に保持されている有効な動画像データの時間が長い動画像データを前記記憶手段に記録するように制御することを特徴とする請求項1乃至3のいずれか1項に記載の記録装置。 The control means is an effective one of the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means, which is held by the holding means. The recording device according to any one of claims 1 to 3, wherein the moving image data for a long time is controlled to be recorded in the storage means. 前記制御手段は、前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうち、前記保持手段に保持されている動画像データにおいて有効フレームが多い動画像データを前記記憶手段に記録するように制御することを特徴とする請求項1乃至3のいずれか1項に記載の記録装置。 The control means is a moving image held in the holding means among the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means. The recording device according to any one of claims 1 to 3, wherein the moving image data having many effective frames in the image data is controlled to be recorded in the storage means. 前記制御手段は、前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうち、前記保持手段に保持されている動画像データにおいて破棄フレームが少ない動画像データを前記記憶手段に記録するように制御することを特徴とする請求項1乃至3のいずれか1項に記載の記録装置。 The control means is a moving image held in the holding means among the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means. The recording device according to any one of claims 1 to 3, wherein the moving image data having few discarded frames in the image data is controlled to be recorded in the storage means. 前記制御手段は、前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうち、前記保持手段に保持されている有効なGOP(Group Of Pictures)が多い動画像データを前記記憶手段に記録するように制御することを特徴とする請求項1乃至3のいずれか1項に記載の記録装置。 The control means is an effective one of the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means, which is held by the holding means. The recording device according to any one of claims 1 to 3, wherein the moving image data having a large number of GOPs (Group Of Pictures) is controlled to be recorded in the storage means. 前記第2の符号化処理手段は、前記第1の符号化処理手段に対して、前記参照構造の半分のフレーム数分の位相を異ならせて前記動画像データを符号化することを特徴とする請求項1乃至7のいずれか1項に記載の記録装置。 The second coding processing means encodes the moving image data with a phase difference of half the number of frames of the reference structure with respect to the first coding processing means. The recording device according to any one of claims 1 to 7. 前記制御手段は、前記保持手段に保持されている前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうちの前記記憶手段に記録されない動画像データを破棄するとともに、前記第1の符号化処理手段及び前記第2の符号化処理手段のうちの前記記憶手段に動画像データが記録されない前記符号化処理手段の動作を停止させることを特徴とする請求項1乃至8のいずれか1項に記載の記録装置。 The control means is the said of the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means held in the holding means. The operation of the coding processing means in which the moving image data that is not recorded in the storage means is discarded and the moving image data is not recorded in the storage means among the first coding processing means and the second coding processing means. The recording device according to any one of claims 1 to 8, wherein the recording device is stopped. 前記制御手段は、記録開始指示を受け付けたことに応じて、当該記録開始指示を受け付ける前の動画像データを前記記憶手段に記録した後、動画像データが前記記憶手段に記録された前記第1の符号化処理手段及び前記第2の符号化処理手段のうちのいずれか一方の符号化処理手段により符号化された動画像データを前記記憶手段に記録するように制御することを特徴とする請求項1乃至9のいずれか1項に記載の記録装置。 In response to the reception of the recording start instruction, the control means records the moving image data before receiving the recording start instruction in the storage means, and then the moving image data is recorded in the storage means. The claim is characterized in that the moving image data encoded by one of the coding processing means and the second coding processing means is controlled to be recorded in the storage means. Item 2. The recording apparatus according to any one of Items 1 to 9. 前記第2の符号化処理手段は、前記参照構造のフレーム数が所定のフレーム数以上である場合のみ前記動画像データを符号化することを特徴とする請求項1乃至10のいずれか1項に記載の記録装置。 The second coding processing means according to any one of claims 1 to 10, wherein the moving image data is encoded only when the number of frames of the reference structure is equal to or more than a predetermined number of frames. The recording device described. 前記保持手段に一定の時間分の動画像データを保持させる第1の方式と、前記保持手段に当該保持手段の記憶容量分の動画像データを保持させる第2の方式とを有し、
前記第2の符号化処理手段は、前記第2の方式である場合のみ前記動画像データを符号化することを特徴とする請求項1乃至11のいずれか1項に記載の記録装置。
It has a first method of causing the holding means to hold moving image data for a certain period of time, and a second method of causing the holding means to hold moving image data corresponding to the storage capacity of the holding means.
The recording device according to any one of claims 1 to 11, wherein the second coding processing means encodes the moving image data only in the case of the second method.
前記第1の符号化処理手段及び前記第2の符号化処理手段とは異なる符号化方式で前記動画像データを符号化する第3の符号化処理手段をさらに有し、
前記保持手段は、前記第3の符号化処理手段により符号化された動画像データを一時的に保持し、
前記制御手段は、記録開始指示を受けたことに応じて前記記録開始指示を受け付ける前の動画像データを記録する場合に、前記第3の符号化処理手段により符号化された動画像データを前記記憶手段に記録するように制御するとともに、前記第1の符号化処理手段により符号化された動画像データと前記第2の符号化処理手段により符号化された動画像データのうち、前記保持手段に保持されている前記第3の符号化処理手段により符号化された動画像データに対して有効な動画像データの時間が近い動画像データを前記記憶手段に記録するように制御することを特徴とする請求項1乃至12のいずれか1項に記載の記録装置。
Further having a third coding processing means for encoding the moving image data by a coding method different from that of the first coding processing means and the second coding processing means.
The holding means temporarily holds the moving image data encoded by the third coding processing means.
When the control means records the moving image data before receiving the recording start instruction in response to receiving the recording start instruction, the control means obtains the moving image data encoded by the third coding processing means. Of the moving image data encoded by the first coding processing means and the moving image data encoded by the second coding processing means, the holding means is controlled so as to be recorded in the storage means. It is characterized in that the moving image data whose effective time of the moving image data is close to the moving image data encoded by the third coding processing means held in the above is controlled to be recorded in the storage means. The recording device according to any one of claims 1 to 12.
前記第3の符号化処理手段により符号化される動画像データは、プロキシ動画を生成するための動画像データであることを特徴とする請求項13に記載の記録装置。 The recording device according to claim 13, wherein the moving image data encoded by the third coding processing means is moving image data for generating a proxy moving image. 前記第3の符号化処理手段により符号化された動画像データは、前記第1の符号化処理手段及び前記第2の符号化処理手段により符号化された動画像データと、解像度及び前記参照構造のフレーム数の少なくとも一方が異なることを特徴とする請求項13に記載の記録装置。 The moving image data encoded by the third coding processing means includes the moving image data encoded by the first coding processing means and the second coding processing means, the resolution, and the reference structure. 13. The recording device according to claim 13, wherein at least one of the frames is different. さらに、撮像手段を有し、
前記第1の符号化処理手段及び前記第2の符号化処理手段は、それぞれ、前記撮像手段により撮像された同じ動画像データを符号化することを特徴とする請求項1乃至15のいずれか1項に記載の記録装置。
In addition, it has an imaging means
Any one of claims 1 to 15, wherein the first coding processing means and the second coding processing means encode the same moving image data imaged by the imaging means, respectively. The recording device described in the section.
所定のフレーム数の参照構造で動画像データを符号化する第1の符号化処理工程と、
前記第1の符号化処理工程と同じフレーム数の参照構造で位相を異ならせて、前記動画像データを符号化する第2の符号化処理工程と、
前記第1の符号化処理工程にて符号化された動画像データと、前記第2の符号化処理工程にて符号化された動画像データを保持手段に一時的に保持する保持工程と、
記録開始指示を受け付けたことに応じて前記記録開始指示を受け付ける前の動画像データを記録する場合に、前記第1の符号化処理工程にて符号化された動画像データと前記第2の符号化処理工程にて符号化された動画像データのうちのいずれか一方の動画像データを記憶手段に記録するように制御する制御工程とを有することを特徴とする記録方法。
A first coding processing step of encoding moving image data with a reference structure having a predetermined number of frames, and
A second coding processing step of encoding the moving image data by differentiating the phases with a reference structure having the same number of frames as the first coding processing step.
A holding step of temporarily holding the moving image data encoded in the first coding processing step and the moving image data encoded in the second coding processing step in the holding means.
When recording the moving image data before receiving the recording start instruction in response to the reception of the recording start instruction, the moving image data encoded in the first coding processing step and the second reference numeral are used. A recording method comprising a control step of controlling to record the moving image data of any one of the moving image data encoded in the conversion processing step in a storage means.
コンピュータに、
所定のフレーム数の参照構造で動画像データを符号化する第1の符号化処理ステップと、
前記第1の符号化処理ステップと同じフレーム数の参照構造で位相を異ならせて、前記動画像データを符号化する第2の符号化処理ステップと、
前記第1の符号化処理ステップにて符号化された動画像データと、前記第2の符号化処理ステップにて符号化された動画像データを保持手段に一時的に保持する保持ステップと、
記録開始指示を受け付けたことに応じて前記記録開始指示を受け付ける前の動画像データを記録する場合に、前記第1の符号化処理ステップにて符号化された動画像データと前記第2の符号化処理ステップにて符号化された動画像データのうちのいずれか一方の動画像データを記憶手段に記録するように制御する制御ステップとを実行させるためのプログラム。
On the computer
A first coding process step of encoding moving image data with a reference structure having a predetermined number of frames, and
A second coding processing step that encodes the moving image data by differentiating the phases with a reference structure having the same number of frames as the first coding processing step.
A holding step of temporarily holding the moving image data encoded in the first coding processing step and the moving image data encoded in the second coding processing step in the holding means.
When recording the moving image data before receiving the recording start instruction in response to the reception of the recording start instruction, the moving image data encoded in the first coding processing step and the second reference numeral are used. A program for executing a control step that controls to record moving image data of any one of the moving image data encoded in the conversion processing step in a storage means.
JP2019125191A 2019-07-04 2019-07-04 Recording device, recording method, and program Pending JP2021013064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019125191A JP2021013064A (en) 2019-07-04 2019-07-04 Recording device, recording method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019125191A JP2021013064A (en) 2019-07-04 2019-07-04 Recording device, recording method, and program

Publications (1)

Publication Number Publication Date
JP2021013064A true JP2021013064A (en) 2021-02-04

Family

ID=74226131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019125191A Pending JP2021013064A (en) 2019-07-04 2019-07-04 Recording device, recording method, and program

Country Status (1)

Country Link
JP (1) JP2021013064A (en)

Similar Documents

Publication Publication Date Title
KR100803492B1 (en) Digital camera, memory control device usable for it, image processing device and image processing method
JP4682102B2 (en) Image coding apparatus and image coding method
JP2007134991A (en) Image signal processor, imaging apparatus, and image signal processing method
JP2016167788A (en) Moving image recorder
JP5294767B2 (en) Movie playback device, movie playback method, program, and recording medium
US8660400B2 (en) Imaging apparatus and method of starting the same
JP6929044B2 (en) Imaging device, control method of imaging device, and program
JP4785460B2 (en) Imaging apparatus and imaging method
US7606470B2 (en) Image pickup apparatus having moving picture photographing function and moving picture photographing method thereof
JP2005039792A (en) Recording apparatus and reproducing apparatus
JP2021013064A (en) Recording device, recording method, and program
JP2006352335A (en) Image coding equipment
JP4872571B2 (en) Imaging apparatus, imaging method, and program
JP2007279873A (en) Data recorder
JP6023512B2 (en) Recording apparatus and method
KR101332299B1 (en) Image recording apparatus and method thereof
JP4298583B2 (en) Imaging device and mobile phone
JP4312070B2 (en) Digital camera
JP2001197437A (en) Method and device for video recording
JP6504927B2 (en) Recording apparatus and control method of recording apparatus
JP2021034836A (en) Imaging device, control method of imaging device, and program
JP4338727B2 (en) Image processing device
JP4338726B2 (en) Image processing device
JP4338725B2 (en) Image processing device
JP4277291B2 (en) Image capturing device and image data copying method