JP5930807B2 - Imaging device - Google Patents

Imaging device Download PDF

Info

Publication number
JP5930807B2
JP5930807B2 JP2012085727A JP2012085727A JP5930807B2 JP 5930807 B2 JP5930807 B2 JP 5930807B2 JP 2012085727 A JP2012085727 A JP 2012085727A JP 2012085727 A JP2012085727 A JP 2012085727A JP 5930807 B2 JP5930807 B2 JP 5930807B2
Authority
JP
Japan
Prior art keywords
processing circuit
moving image
image data
frame
cpu
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.)
Expired - Fee Related
Application number
JP2012085727A
Other languages
Japanese (ja)
Other versions
JP2013219424A (en
Inventor
亮 及川
亮 及川
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 JP2012085727A priority Critical patent/JP5930807B2/en
Publication of JP2013219424A publication Critical patent/JP2013219424A/en
Application granted granted Critical
Publication of JP5930807B2 publication Critical patent/JP5930807B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Description

本発明は撮像装置に関し、特に動画の撮影と記録に関する。   The present invention relates to an imaging apparatus, and more particularly to shooting and recording of moving images.

従来、動画を撮影してメモリカードなどの記録媒体に記録するデジタルカメラなどの撮像装置が知られている。民生用のデジタルカメラにおいても、近年では、画素数の大きな動画を撮影することができるものも登場している。また撮影される動画のフレームレート(単位時間あたりのフレーム数)も高くなっている。   2. Description of the Related Art Conventionally, an imaging device such as a digital camera that captures a moving image and records it on a recording medium such as a memory card is known. In recent years, consumer digital cameras that can shoot movies with a large number of pixels have also appeared. In addition, the frame rate (the number of frames per unit time) of a moving image to be shot is high.

特開2005−101835号公報JP 2005-101835 A

撮影する動画の画素数やフレームレートが大きくなった場合、処理すべきデータ量が増加するため、今までよりも高速に動画データを処理する必要がある。   When the number of pixels and the frame rate of a moving image to be photographed increase, the amount of data to be processed increases, so that it is necessary to process the moving image data faster than before.

動画データの処理能力を上げるためには、記憶容量が大きく高速にアクセスが可能なメモリや、より高速に動画データを処理可能なマイクロコンピュータなどの処理回路が必要になる。   In order to increase the processing capacity of moving image data, a processing circuit such as a memory having a large storage capacity and high speed access and a microcomputer capable of processing moving image data at a higher speed is required.

しかしながら、この様な高性能なメモリやマイコンを使うことは、回路規模の大型化や消費電力の増加につながる。   However, using such a high-performance memory or microcomputer leads to an increase in circuit scale and power consumption.

とくに、民生用のデジタルカメラにおいては、サイズやコスト面での制約や、或いは、消費電力を極力抑えることが望まれており、高性能なメモリやマイコンを使うことができない場合がある。   In particular, in a consumer digital camera, there are demands for limiting size and cost, or minimizing power consumption, and there are cases where a high-performance memory or microcomputer cannot be used.

そのため、画素数やフレームレートが大きな動画を撮影することができないという問題があった。   For this reason, there is a problem that it is impossible to shoot a moving image with a large number of pixels and frame rate.

本発明はこの様な問題を解決し、回路規模や消費電力を抑えながら、画素数やフレームレートが大きな動画を処理可能な装置を提供することを目的とする。   An object of the present invention is to solve such a problem and to provide an apparatus capable of processing a moving image having a large number of pixels and a high frame rate while suppressing a circuit scale and power consumption.

本発明の撮像装置は、撮像手段と、第1のCPUと第1の通信手段とを有する回路であって、前記撮像手段から動画データを取得し、取得した前記動画データを処理して前記第1の通信手段により出力する第1の処理回路と、第2のCPUと第2の通信手段とを有する回路であって、前記第1の処理回路により取得されたフレームとは異なるフレームの動画データを前記撮像手段から取得して処理し、処理した前記動画データと、前記第1の通信手段により前記第1の処理回路から出力された動画データとを記録媒体に記録する第2の処理回路とを備え、前記第2のCPUは、前記第2の処理回路が処理するフレームとは異なるフレームの動画データを前記第1の処理回路が前記撮像手段から取得して処理するように前記第1の処理回路による処理タイミングを制御するための制御情報を前記第2の通信手段により前記第1の処理回路に送信し、前記第1のCPUは、前記第2の通信手段から送信された前記制御情報に基づいて前記第1の処理回路が前記動画データを処理するタイミングを制御し、前記第1の処理回路は、前記制御されたタイミングに従って、前記第1の処理回路が処理するフレームの動画データを前記撮像手段から取得する。   The imaging apparatus of the present invention is a circuit having an imaging unit, a first CPU, and a first communication unit, acquires moving image data from the imaging unit, processes the acquired moving image data, and processes the first moving image data. A moving image data of a frame different from the frame acquired by the first processing circuit, the circuit having a first processing circuit that is output by one communication unit, a second CPU, and a second communication unit. A second processing circuit that records the processed moving image data from the imaging unit and the moving image data output from the first processing circuit by the first communication unit on a recording medium; The second CPU includes the first processing circuit so that the first processing circuit obtains and processes moving image data of a frame different from the frame processed by the second processing circuit from the imaging unit. By processing circuit Control information for controlling processing timing is transmitted to the first processing circuit by the second communication means, and the first CPU is based on the control information transmitted from the second communication means. The timing at which the first processing circuit processes the moving image data is controlled, and the first processing circuit is configured to capture the moving image data of the frame processed by the first processing circuit in accordance with the controlled timing. Get from.

本発明によれば、回路規模や消費電力を抑えながら、画素数やフレームレートが大きな動画を処理可能となる。   According to the present invention, it is possible to process a moving image with a large number of pixels and a high frame rate while suppressing the circuit scale and power consumption.

実施形態における撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device in embodiment. 記録される動画ファイルの構成を示す図である。It is a figure which shows the structure of the moving image file recorded. 処理回路200による記録時の処理を示すフローチャートである。5 is a flowchart showing processing at the time of recording by the processing circuit 200. 処理回路100による記録時の処理を示すフローチャートである。4 is a flowchart showing processing at the time of recording by the processing circuit 100. 処理回路200による符号化処理を示すフローチャートである。3 is a flowchart showing an encoding process by a processing circuit 200. 処理回路100による符号化処理を示すフローチャートである。3 is a flowchart showing an encoding process by a processing circuit 100. 圧縮された動画データの記憶領域を示す図である。It is a figure which shows the storage area of the compressed moving image data. 処理回路200による記録停止時の処理を示すフローチャートである。5 is a flowchart showing processing when recording is stopped by a processing circuit 200. 処理回路100による記録停止時の処理を示すフローチャートである。4 is a flowchart showing processing when recording is stopped by the processing circuit 100. 処理回路200による動画ファイルの記録処理を示すフローチャートである。4 is a flowchart showing a moving image file recording process by the processing circuit 200. 処理回路100と200による動画データの記録時における処理タイミングを示す図である。It is a figure which shows the process timing at the time of the moving image data recording by the processing circuits 100 and 200. FIG. 符号化される動画データの符号化方式を示す図である。It is a figure which shows the encoding system of the moving image data encoded. 処理回路200による再生時の処理を示すフローチャートである。4 is a flowchart showing processing during reproduction by the processing circuit 200. 処理回路200による動画データの復号処理を示すフローチャートである。4 is a flowchart illustrating a moving image data decoding process performed by a processing circuit 200. 処理回路100による動画データの復号処理を示すフローチャートである。4 is a flowchart illustrating moving image data decoding processing by the processing circuit 100. 処理回路200による表示処理を示すフローチャートである。5 is a flowchart showing display processing by a processing circuit 200. 処理回路100と200による動画データの再生時における処理タイミングを示す図である。It is a figure which shows the processing timing at the time of reproduction | regeneration of the moving image data by the processing circuits 100 and 200. FIG.

以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。図1は、本発明の実施形態にかかわる撮像装置500の構成の一例を示すブロック図である。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. FIG. 1 is a block diagram illustrating an example of a configuration of an imaging apparatus 500 according to an embodiment of the present invention.

撮像装置500は、二つの処理回路100(第1の処理回路)と処理回路200(第2の処理回路)を備えている。本実施形態では、これら二つの処理回路100、200はそれぞれが一つのマイクロコンピュータ(マイコン)により構成される。また、本実施形態では、処理回路100、200はそれぞれ、一つの集積回路(LSI)として構成される。   The imaging apparatus 500 includes two processing circuits 100 (first processing circuit) and a processing circuit 200 (second processing circuit). In the present embodiment, each of these two processing circuits 100 and 200 is constituted by a single microcomputer. In the present embodiment, the processing circuits 100 and 200 are each configured as one integrated circuit (LSI).

また、二つの処理回路100と処理回路200の間で通信を行うための専用バス300を有している。処理回路100、200はそれぞれ独立に撮像部400から動画データを取得することが可能である。処理回路100、200はそれぞれ、撮像部400から取得した動画データを処理することが可能である。   In addition, a dedicated bus 300 for performing communication between the two processing circuits 100 and 200 is provided. The processing circuits 100 and 200 can acquire moving image data from the imaging unit 400 independently of each other. Each of the processing circuits 100 and 200 can process moving image data acquired from the imaging unit 400.

次に、処理回路100と200の構成について説明する。   Next, the configuration of the processing circuits 100 and 200 will be described.

処理回路100は、画像処理部101、第1のCPU(Central Processing Unit)102、メモリ103、クロック制御部104、コーデック部105、リサイズ部106、通信部107、バス108を有する。本実施形態では、メモリ103としてSDRAMを使用する。また、メモリ103は処理回路100に内蔵されているが、処理回路100の外部にメモリ103を設けることも可能である。   The processing circuit 100 includes an image processing unit 101, a first CPU (Central Processing Unit) 102, a memory 103, a clock control unit 104, a codec unit 105, a resizing unit 106, a communication unit 107, and a bus 108. In this embodiment, an SDRAM is used as the memory 103. Further, although the memory 103 is built in the processing circuit 100, the memory 103 can be provided outside the processing circuit 100.

CPU102は、メモリ103に格納されているコンピュータプログラム(ソフトウエア)に従って、カメラ500全体の動作を制御する。メモリ103は、CPU102のワークエリアとして機能する。なお、CPU102のワークエリアは、メモリ103に限られるものではなく、ハードディスクドライブ等の外部記録装置等であってもよい。画像処理部101は、撮像部400から取得した動画データに対して画素補間処理や色変換処理等の画像処理を行う。画像処理部101は、撮像部400から取得したRGB色空間の動画データをYUV色空間のデータフォーマットに変換する。   The CPU 102 controls the overall operation of the camera 500 in accordance with a computer program (software) stored in the memory 103. The memory 103 functions as a work area for the CPU 102. The work area of the CPU 102 is not limited to the memory 103, and may be an external recording device such as a hard disk drive. The image processing unit 101 performs image processing such as pixel interpolation processing and color conversion processing on the moving image data acquired from the imaging unit 400. The image processing unit 101 converts moving image data in the RGB color space acquired from the imaging unit 400 into a data format in the YUV color space.

撮像部400及び画像処理部101は、CPU102によって、オートフォーカス(AF)処理及び自動露出制御(AE)処理を行うように制御される。CPU102からAF処理及びAE処理を開始するように指示された場合、画像処理部101は、撮像部400から取得した動画データを用いて演算処理を行う。撮像部400及び画像処理部101は、この演算結果に基づいて、TTL(スルー・ザ・レンズ)方式のAF処理及びAE処理を行う。   The imaging unit 400 and the image processing unit 101 are controlled by the CPU 102 to perform autofocus (AF) processing and automatic exposure control (AE) processing. When the CPU 102 instructs to start AF processing and AE processing, the image processing unit 101 performs arithmetic processing using moving image data acquired from the imaging unit 400. The imaging unit 400 and the image processing unit 101 perform TTL (through-the-lens) AF processing and AE processing based on the calculation result.

CPU102から動画の撮影を開始するように指示された場合、撮像部400及び画像処理部101は露光処理や現像処理等の処理を含む撮影処理を実行する。撮像部400は、CCDやCMOS等の撮像素子やAD変換器等を備える。撮像部400は、撮像素子により得られたアナログ信号をデジタルデータに変換して出力する。撮像部400から取得された動画データは、YUV形式の映像データとしてメモリ102に記憶される。メモリ103に記憶された動画データに対して、コーデック部105(第1の符号化部、第1の復号部)により符号化処理が行われ、動画データのデータ量が圧縮される。   When the CPU 102 instructs to start moving image shooting, the imaging unit 400 and the image processing unit 101 execute shooting processing including processing such as exposure processing and development processing. The imaging unit 400 includes an imaging element such as a CCD or CMOS, an AD converter, and the like. The imaging unit 400 converts an analog signal obtained by the imaging element into digital data and outputs the digital data. The moving image data acquired from the imaging unit 400 is stored in the memory 102 as YUV video data. The moving image data stored in the memory 103 is encoded by the codec unit 105 (first encoding unit, first decoding unit), and the data amount of the moving image data is compressed.

コーデック部105は、撮影時においては、撮像部400より取得した動画データをH.264(MPEG4 AVC)等の公知の符号化方式により符号化する。また、コーデック部105は、再生時においては、後述の様に、記録媒体212から読み出された動画データを復号する。クロック制御部104は処理回路100における処理タイミングを制御するための各種の動作クロックを生成する。クロック制御部104からのタイミング信号により、動画撮影の際に撮像部400から動画データを取得するタイミングなどが制御される。   At the time of shooting, the codec unit 105 converts the moving image data acquired from the imaging unit 400 to H.264. It is encoded by a known encoding method such as H.264 (MPEG4 AVC). Further, the codec unit 105 decodes the moving image data read from the recording medium 212 at the time of reproduction as described later. The clock control unit 104 generates various operation clocks for controlling the processing timing in the processing circuit 100. The timing at which moving image data is acquired from the image capturing unit 400 during moving image shooting is controlled by the timing signal from the clock control unit 104.

リサイズ部106(第1のリサイズ部)は、撮影時においては、撮像部400より取得した動画データの各フレームの画素数(サイズ)を必要な画像サイズに変更する。通信部107(第1の通信部)は、処理回路200との間で動画データやその他必要なコマンドを送受信する。通信部107は、動画データを受信するためのデータ受信部107a、動画データを送信するためのデータ送信部107b、制御コマンドなどのメッセージを送るためのメッセージ通信部107cを有する。通信部107での通信は専用のバス300を介して行われる。それぞれの通信は独立して行うことが可能である。   The resizing unit 106 (first resizing unit) changes the number of pixels (size) of each frame of the moving image data acquired from the imaging unit 400 to a necessary image size at the time of shooting. The communication unit 107 (first communication unit) transmits and receives moving image data and other necessary commands to and from the processing circuit 200. The communication unit 107 includes a data receiving unit 107a for receiving moving image data, a data transmitting unit 107b for transmitting moving image data, and a message communication unit 107c for transmitting messages such as control commands. Communication in the communication unit 107 is performed via a dedicated bus 300. Each communication can be performed independently.

本実施形態においては、後述の様に、撮影時において処理回路100により処理された動画データと、再生時において処理回路100により処理された動画データが通信部107により処理回路200に送信される。   In the present embodiment, as will be described later, the moving image data processed by the processing circuit 100 during shooting and the moving image data processed by the processing circuit 100 during reproduction are transmitted to the processing circuit 200 by the communication unit 107.

処理回路200は、画像処理部201、第2のCPU202、メモリ203、クロック制御部204、コーデック部205、リサイズ部206、通信部207、表示部208、音声制御部209、記録部再生部210、操作部211、バス213を有する。本実施形態では、メモリ203としてSDRAMを使用する。また、メモリ203は処理回路100に内蔵されているが、処理回路200の外部にメモリ203を設けることも可能である。画像処理部201、第2のCPU202、メモリ203、クロック制御部204、コーデック部205、リサイズ部206、通信部207(第2の通信部)の各ブロックは処理回路100における各ブロックと同様の機能を持つ。   The processing circuit 200 includes an image processing unit 201, a second CPU 202, a memory 203, a clock control unit 204, a codec unit 205, a resizing unit 206, a communication unit 207, a display unit 208, an audio control unit 209, a recording unit reproduction unit 210, An operation unit 211 and a bus 213 are included. In the present embodiment, an SDRAM is used as the memory 203. Further, although the memory 203 is built in the processing circuit 100, the memory 203 can be provided outside the processing circuit 200. Each block of the image processing unit 201, the second CPU 202, the memory 203, the clock control unit 204, the codec unit 205, the resizing unit 206, and the communication unit 207 (second communication unit) has the same function as each block in the processing circuit 100. have.

処理回路200は、撮影時には、撮像部400から動画データを取得して、コーデック部205(第2の符号化部、第2の復号部)により符号化処理を行う。記録再生部210は、記録時においては、コーデック部205により符号化された動画データと、処理回路100から送信された動画データ、及び、音声処理部209で生成された音声データを記録媒体212に記録する。記録媒体212は、メモリカードなどのランダムアクセス媒体である。また、本実施形態では、不図示の装着、排出機構により、容易に装着、排出が可能となっている。また、記録媒体212を撮像装置500に内蔵する構成としてもよい。   At the time of shooting, the processing circuit 200 acquires moving image data from the imaging unit 400 and performs encoding processing by the codec unit 205 (second encoding unit, second decoding unit). During recording, the recording / playback unit 210 stores the moving image data encoded by the codec unit 205, the moving image data transmitted from the processing circuit 100, and the audio data generated by the audio processing unit 209 in the recording medium 212. Record. The recording medium 212 is a random access medium such as a memory card. Further, in the present embodiment, mounting and discharging can be easily performed by a mounting and discharging mechanism (not shown). Further, the recording medium 212 may be built in the imaging apparatus 500.

CPU202は、操作部211により指定された動画のフレームレートや音声有無のユーザの設定に従って動画データや音声データの記録を制御する。   The CPU 202 controls the recording of moving image data and audio data according to the user's settings for the moving image frame rate and the presence / absence of audio specified by the operation unit 211.

また、記録再生部210は、再生時においては、後述の様にユーザによって選択されたシーンの動画データと音声データを記録媒体212から読み出す。コーデック部205は、再生時においては、記録媒体212から読み出された動画データと音声データを復号する。   Further, the recording / playback unit 210 reads the moving image data and audio data of the scene selected by the user from the recording medium 212 as described later during playback. The codec unit 205 decodes the moving image data and audio data read from the recording medium 212 during reproduction.

リサイズ部206(第2のリサイズ部)は、撮影時においては、撮像部400から取得した動画データの画像サイズを表示部208のサイズに合わせて変更してメモリ203に記憶する。そして、リサイズされたデータが表示部208に供給されて表示される。また、再生時においては、リサイズ部206は、再生された動画データのサイズを表示部208のサイズに合わせて変更してメモリ203に記憶する。そして、リサイズされたデータが表示部208に供給されて表示される。   The resizing unit 206 (second resizing unit) changes the image size of the moving image data acquired from the imaging unit 400 according to the size of the display unit 208 and stores it in the memory 203 at the time of shooting. Then, the resized data is supplied to the display unit 208 and displayed. At the time of reproduction, the resizing unit 206 changes the size of the reproduced moving image data in accordance with the size of the display unit 208 and stores it in the memory 203. Then, the resized data is supplied to the display unit 208 and displayed.

また、再生された音声データは、音声制御部209に供給されて出力される。表示部208は、液晶ディスプレイなどの表示器により構成される。表示部208は、撮影された動画や再生された動画の他、各種の必要な情報を表示する。CPU202は、表示部208に表示する情報を生成して表示部208に送る。   The reproduced audio data is supplied to the audio control unit 209 and output. The display unit 208 is configured by a display such as a liquid crystal display. The display unit 208 displays various necessary information in addition to the captured moving image and the reproduced moving image. The CPU 202 generates information to be displayed on the display unit 208 and sends it to the display unit 208.

操作部211は、撮像装置500を操作するためのユーザインターフェースとして機能する。操作部211は、撮像装置500を操作するための電源ボタン、モード変更ボタン、シャッターボタン、十字ボタン、メニューボタン等を有し、各ボタンはスイッチ、タッチパネル等により構成される。CPU202は、操作部211を介して入力されたユーザの指示に従って撮像装置500を制御する。ユーザによって操作部211のボタンが操作された場合、操作部211から各ボタンに応じた操作信号がCPU202に入力される。CPU202は操作部211から入力された操作信号を解析し、解析結果に応じて操作信号に対応した処理を判定する。CPU202は、操作部211から入力された操作信号に対応した処理を実行するように撮像装置500の各部を制御する。   The operation unit 211 functions as a user interface for operating the imaging apparatus 500. The operation unit 211 includes a power button, a mode change button, a shutter button, a cross button, a menu button, and the like for operating the imaging apparatus 500, and each button includes a switch, a touch panel, and the like. The CPU 202 controls the imaging apparatus 500 in accordance with a user instruction input via the operation unit 211. When a button on the operation unit 211 is operated by the user, an operation signal corresponding to each button is input from the operation unit 211 to the CPU 202. The CPU 202 analyzes the operation signal input from the operation unit 211 and determines processing corresponding to the operation signal according to the analysis result. The CPU 202 controls each unit of the imaging apparatus 500 so as to execute processing corresponding to the operation signal input from the operation unit 211.

次に、撮像装置500において記録する動画データの形式について説明する。本実施形態では、撮影した動画、音声データを動画ファイルとして記録媒体212に記録する。本実施形態では、汎用のファイル形式であるMOV形式に従い動画ファイルを記録する。   Next, the format of moving image data recorded in the imaging apparatus 500 will be described. In the present embodiment, the captured moving image and audio data are recorded on the recording medium 212 as a moving image file. In the present embodiment, a moving image file is recorded in accordance with the MOV format that is a general-purpose file format.

図2にMOVファイルの構成を示す。MOVファイルは、図2の220に示すように、符号化された動画データと音声データからなるストリームデータが格納されるmdatアトム222と、ストリームデータに関連する管理情報が格納されるmoovアトム221とから構成されている。mdatアトム222は更に、225に示すように複数のチャンク(chunk cN)で構成される。各チャンクは226に示すように複数のサンプル(sample sN)から構成される。各サンプルは例えば、それぞれが符号化された動画データの各フレームに対応する。   FIG. 2 shows the structure of the MOV file. As shown by 220 in FIG. 2, the MOV file includes an mdat atom 222 in which stream data including encoded moving image data and audio data is stored, and a moov atom 221 in which management information related to the stream data is stored. It is composed of The mdat atom 222 is further composed of a plurality of chunks (chunk cN) as indicated by 225. Each chunk is composed of a plurality of samples (sample sN) as indicated by 226. For example, each sample corresponds to each frame of moving image data encoded.

moovアトム221は図2(c)に示すように、作成日時等が記録されるヘッダ情報であるmvhdアトム223と管理情報が格納されるtrakアトム224を有する。trakアトム224には、各サンプルのサイズの情報を格納するstszアトム228が格納される。また、trakアトム224には、各チャンク内のサンプル数の情報を格納するstscアトム229が格納される。また、trakアトム224には、mdatアトム222の各チャンクへのファイル先頭からのオフセット値(バイト数)の情報を格納するstcoアトム230が格納される。   As shown in FIG. 2C, the moov atom 221 includes an mvhd atom 223 that is header information in which the creation date and time are recorded, and a trak atom 224 in which management information is stored. The trak atom 224 stores a stsz atom 228 that stores information on the size of each sample. The trak atom 224 stores a stsc atom 229 that stores information on the number of samples in each chunk. The trak atom 224 stores a stco atom 230 that stores information on an offset value (number of bytes) from the beginning of the file to each chunk of the mdat atom 222.

stszアトム228、stscアトム229、stcoアトム230に格納されるデータのデータ量は、記録された動画、音声データの量、すなわち記録時間と伴に増大していく。例えば1秒間30フレームの画像を15フレーム毎1チャンクに格納した場合、2時間で1メガバイトほどのデータとなる。また、moovアトム221に格納される管理情報の内容は記録が終了するまでは確定されない。また、moovアトム221のサイズは記録時間に応じて増加するため、記録が終了するまではmoovアトム221のサイズが確定されない。そのため、mdatアトム222をファイル先頭に配置し、記録終了時にmoovアトム221をmdatアトム222の後ろに配置する。   The amount of data stored in the stsz atom 228, the stsc atom 229, and the stco atom 230 increases with the amount of recorded moving image and audio data, that is, the recording time. For example, when an image of 30 frames per second is stored in one chunk every 15 frames, data of about 1 megabyte is obtained in 2 hours. Further, the contents of the management information stored in the moov atom 221 are not determined until recording is completed. Also, since the size of the moov atom 221 increases according to the recording time, the size of the moov atom 221 is not fixed until the recording is completed. Therefore, the mdat atom 222 is arranged at the head of the file, and the moov atom 221 is arranged behind the mdat atom 222 at the end of recording.

なお、MOV形式の動画ファイルを再生する場合には、先にmoovアトム221を読み出し、moovアトム221に格納された管理情報より各チャンクへのアクセスが可能となる。そのため、moovアトム221をmdatアトム222の後ろに配置するよりも、ファイルの先頭にmoovアトム221を配置することで、moovアトム221へのアクセスが容易になるような構造で記録することが望ましい。   In the case of playing a moving image file in the MOV format, the moov atom 221 is read first, and each chunk can be accessed from the management information stored in the moov atom 221. For this reason, it is desirable to record in a structure that facilitates access to the moov atom 221 by placing the moov atom 221 at the beginning of the file, rather than placing the moov atom 221 behind the mdat atom 222.

次に、撮像装置500における記録時の処理について説明する。   Next, processing at the time of recording in the imaging apparatus 500 will be described.

まず、各処理回路100、200が処理するフレームについて説明する。前述の様に、本実施形態では、動画データをH.264方式に従い符号化する。H.264では、フレーム内予測符号化、前方予測フレーム間予測符号化、及び、双方向予測フレーム間予測符号化の三つの符号化方式を用いる。ここで、フレーム内予測符号化により符号化するフレームをIフレーム、前方予測フレーム間予測符号化により符号化するフレームをPフレーム、双方向予測フレーム間予測符号化により符号化するフレームをBフレームと呼ぶ。   First, the frames processed by the processing circuits 100 and 200 will be described. As described above, in this embodiment, moving image data is converted to H.264. The encoding is performed according to the H.264 system. H. H.264 uses three encoding schemes: intra-frame prediction encoding, forward prediction inter-frame prediction encoding, and bidirectional prediction inter-frame prediction encoding. Here, a frame to be encoded by intra-frame prediction encoding is an I frame, a frame to be encoded by forward prediction inter-frame prediction encoding is a P frame, and a frame to be encoded by bidirectional inter-frame prediction encoding is a B frame. Call.

本実施形態においては、処理回路100、200がそれぞれ符号化した二系統の動画データは、一系統の動画データとして記録媒体212記録される。そこで、本実施形態では、各処理回路100、200は、動画データの各フレームをフレーム内予測符号化により符号化する。これにより、符号化の際に、参照フレームの情報を処理回路100と200の間で送受信しなくて済む。ただし、フレーム内予測だけでなく、フレーム間予測符号化を用いることも可能である。その場合、フレーム間予測のための参照フレームの情報を、処理回路100と200の間で送受信することが必要となる。   In the present embodiment, the two systems of moving image data encoded by the processing circuits 100 and 200 are recorded on the recording medium 212 as one system of moving image data. Thus, in the present embodiment, each processing circuit 100, 200 encodes each frame of moving image data by intraframe prediction encoding. Thereby, it is not necessary to transmit / receive reference frame information between the processing circuits 100 and 200 at the time of encoding. However, not only intra-frame prediction but also inter-frame prediction coding can be used. In that case, it is necessary to transmit / receive information on the reference frame for inter-frame prediction between the processing circuits 100 and 200.

図12の1201は処理回路200が生成する動画データ、1202は処理回路100が生成する動画データ、1203は記録媒体212に記録される動画データを表している。この様に、処理回路100、200は、撮像部400により生成される動画データを1フレームおきに交互に取得して符号化処理を行う。即ち、処理回路200は、処理回路100が処理するフレームとは異なるフレームの動画データを処理する。そのため、各処理回路100、200がそれぞれ処理可能な動画データのフレームレートの倍のフレームレートの動画を記録することができる。   In FIG. 12, 1201 represents moving image data generated by the processing circuit 200, 1202 represents moving image data generated by the processing circuit 100, and 1203 represents moving image data recorded on the recording medium 212. As described above, the processing circuits 100 and 200 alternately acquire moving image data generated by the imaging unit 400 every other frame and perform encoding processing. That is, the processing circuit 200 processes moving image data of a frame different from the frame processed by the processing circuit 100. Therefore, it is possible to record a moving image having a frame rate that is twice the frame rate of moving image data that can be processed by each of the processing circuits 100 and 200.

また、処理回路200では、動画データの各フレームをIDR(Instantaneous Decoding Refresh)−Iフレームとして符号化する。H.264符号化では、Iフレームを飛び越してフレーム間予測符号化を行うことが可能である。一方、IDR−Iのフレームを飛び越したフレーム間予測は禁止される。一方、処理回路100では、記録開始の指示の後の先頭フレームをIDR−Iフレームとして符号化し、2フレーム目以降のフレームは通常のIフレームとして符号化する。IDR−Iフレームには、それぞれ、idr_pic_idと呼ばれるIDを付加する必要がある。また、H.264では、隣接するIDR−Iフレームのidr_pic_idに同じ値を付加することができない。例えば、処理回路100と200がそれぞれ、先頭から全てIDR−Iフレームとして符号化を行い、また、idr_pic_idとして同じ値を付加する構成とした場合、これらを一つにまとめた動画データでは、隣接するIDR−Iフレームでidr_pic_idの値が同じになることがある。   Further, the processing circuit 200 encodes each frame of the moving image data as an IDR (Instantaneous Decoding Refresh) -I frame. H. In H.264 encoding, inter-frame predictive encoding can be performed by skipping I frames. On the other hand, inter-frame prediction that skips IDR-I frames is prohibited. On the other hand, in the processing circuit 100, the first frame after the recording start instruction is encoded as an IDR-I frame, and the second and subsequent frames are encoded as normal I frames. It is necessary to add an ID called idr_pic_id to each IDR-I frame. H. In H.264, the same value cannot be added to idr_pic_id of adjacent IDR-I frames. For example, when the processing circuits 100 and 200 are all encoded from the beginning as an IDR-I frame and the same value is added as idr_pic_id, the moving image data that are combined into one is adjacent. The idr_pic_id value may be the same in the IDR-I frame.

また、idr_pic_idのデータはゴロム符号化されており、更に、不定長の長さで記述されている。そのため、処理回路100と200により生成された動画データを結合した後で、idr_pic_idの値を変更することは困難である。そこで、本形態では、処理回路100により生成される動画データについては、2フレーム以降をIフレームとして符号化し、後述の様に、先頭のIDR−Iフレームを記録しないようにして、idr_pic_idを変更しなくても済むようにしている。   The data of idr_pic_id is Golomb coded and further described with an indefinite length. Therefore, it is difficult to change the value of idr_pic_id after the moving image data generated by the processing circuits 100 and 200 are combined. Therefore, in this embodiment, the moving image data generated by the processing circuit 100 is encoded as 2 frames and later as I frames, and the idr_pic_id is changed so as not to record the first IDR-I frame as described later. I do not have to.

次に、処理回路200による動画データの記録開始時の処理について図3のフローチャートを用いて説明する。図3の処理は処理回路200のCPU202が各部を制御することにより実行される。   Next, processing at the start of recording of moving image data by the processing circuit 200 will be described using the flowchart of FIG. 3 is executed by the CPU 202 of the processing circuit 200 controlling each unit.

操作部211により電源が投入されると、CPU202は撮像装置500を撮影モードに設定する。そして、CPU202は、クロック制御部204によるタイミング信号の生成を開始し、このタイミング信号に従って撮像部400を制御して、撮像部400による動画の撮影動作を開始する。なお、本実施形態では、撮像部400は1フレームが水平3840画素×垂直2160画素で、フレームレートが30フレーム毎秒(fps)の動画データを出力する。CPU202は、クロック制御部204からのタイミング信号に従って撮像部400から動画データを取得して、メモリ203に記憶する。そして、リサイズ部206によりメモリ203に記憶された動画データのサイズを変更して再度メモリ203に記憶する。表示部208は、メモリ203より動画データの各フレームを読み出して表示する。   When the power is turned on by the operation unit 211, the CPU 202 sets the imaging device 500 to the shooting mode. Then, the CPU 202 starts generating a timing signal by the clock control unit 204, controls the imaging unit 400 according to the timing signal, and starts a moving image shooting operation by the imaging unit 400. In the present embodiment, the imaging unit 400 outputs moving image data having one frame of horizontal 3840 pixels × vertical 2160 pixels and a frame rate of 30 frames per second (fps). The CPU 202 acquires moving image data from the imaging unit 400 in accordance with the timing signal from the clock control unit 204 and stores it in the memory 203. Then, the size of the moving image data stored in the memory 203 is changed by the resizing unit 206 and stored again in the memory 203. The display unit 208 reads out each frame of the moving image data from the memory 203 and displays it.

この様な撮影待機状態において、操作部211から記録開始の指示があると、CPU202は、メッセージ通信部207cを介して記録準備処理のコマンドを処理回路100に通知する(S301)。処理回路マイコン100の処理は図4のフローチャートを用いて後述する。次に、CPU202は、記録準備処理を行う(S302)。具体的には、CPU202は、符号化処理する動画のフレームレート、符号化後の目標データレート、符号化形態(処理回路200では全てIDR−Iフレームとして符号化する)などを設定する。また、CPU202は、符号化された動画データの各フレームを記憶するための記録バッファ領域をメモリ203上に設定する。また、CPU202は、記録準備処理のコマンドと共に、符号化処理する動画のフレームレート、符号化後の目標データレートなどの情報もメッセージ通信部207cにより処理回路100に通知する。   In such a shooting standby state, when there is an instruction to start recording from the operation unit 211, the CPU 202 notifies the processing circuit 100 of a command for recording preparation processing via the message communication unit 207c (S301). The processing of the processing circuit microcomputer 100 will be described later with reference to the flowchart of FIG. Next, the CPU 202 performs a recording preparation process (S302). Specifically, the CPU 202 sets a frame rate of a moving image to be encoded, a target data rate after encoding, an encoding form (all are encoded as IDR-I frames in the processing circuit 200), and the like. In addition, the CPU 202 sets a recording buffer area on the memory 203 for storing each frame of the encoded moving image data. In addition to the recording preparation process command, the CPU 202 notifies the processing circuit 100 of information such as the frame rate of the moving image to be encoded and the target data rate after encoding by the message communication unit 207c.

次に、処理回路100から、動画記録開始の準備が完了した旨の通知をメッセージ通信部207cにより受信したら(S303)、CPU202は、処理回路100とのフレーム読み出しの同期処理を行う(S304)。具体的には、CPU202は、メッセージ通信部207cより、処理回路100による動画データの処理タイミングを示す制御コマンドを処理回路100に送信する。これにより、処理回路100と200が、撮像部400により得られる動画データを1フレームおきに交互に処理するように制御される。次に、CPU202は、クロック制御部204のタイミング信号に応じて、撮像部400から動画データを取得し、動画データの符号化処理を開始する(S305)。   Next, when the message communication unit 207c receives notification from the processing circuit 100 that preparation for starting moving image recording has been completed (S303), the CPU 202 performs a frame reading synchronization process with the processing circuit 100 (S304). Specifically, the CPU 202 transmits a control command indicating the processing timing of the moving image data by the processing circuit 100 to the processing circuit 100 from the message communication unit 207c. As a result, the processing circuits 100 and 200 are controlled to alternately process the moving image data obtained by the imaging unit 400 every other frame. Next, the CPU 202 acquires moving image data from the imaging unit 400 according to the timing signal of the clock control unit 204, and starts encoding processing of moving image data (S305).

次に、処理回路100による動画データの記録開始時の処理について、図4のフローチャートを用いて説明する。図4の処理は処理回路100のCPU102が各部を制御することにより実行される。   Next, processing at the start of recording of moving image data by the processing circuit 100 will be described with reference to the flowchart of FIG. 4 is executed by the CPU 102 of the processing circuit 100 controlling each unit.

前記の様に、メッセージ通信部107cにより、処理回路200から記録開始を通知するコマンドが受信されると(S401)、CPU102は、処理回路100の記録準備処理を行う(S402)。具体的には、CPU102は、符号化処理する動画のフレームレート、符号化後の目標データレート、符号化形態(処理回路200では、2フレーム目以降が全てIフレームとして符号化される)などを設定する。また、CPU102は、符号化された動画データの各フレームを記憶するための記憶領域をメモリ103上に設定する。   As described above, when the message communication unit 107c receives a command to notify the start of recording from the processing circuit 200 (S401), the CPU 102 performs a recording preparation process of the processing circuit 100 (S402). Specifically, the CPU 102 sets the frame rate of the moving image to be encoded, the target data rate after encoding, the encoding mode (the processing circuit 200 encodes all the second and subsequent frames as I frames), and the like. Set. In addition, the CPU 102 sets a storage area for storing each frame of the encoded moving image data on the memory 103.

次に、コーデック部105を用いてダミーデータの符号化処理が実行される(S403)。CPU102は、撮像部400より1フレームの動画データを取得し、IDR−Iフレームとして符号化する。ここで符号化されるフレームは、図12の1202における先頭のフレームである。ここで符号化されたフレームはダミーデータであり、実際には記録されないため、処理回路200には送信されず、破棄される。このように先頭フレームを記録せずに破棄することで、記録される動画へのタイムラグが発生してしまう事を回避することが可能である。   Next, dummy data encoding processing is executed using the codec unit 105 (S403). The CPU 102 acquires one frame of moving image data from the imaging unit 400 and encodes it as an IDR-I frame. The frame to be encoded here is the first frame at 1202 in FIG. The frame encoded here is dummy data and is not actually recorded, so it is not transmitted to the processing circuit 200 but discarded. By discarding the first frame without recording it in this way, it is possible to avoid the occurrence of a time lag to the recorded moving image.

次に、CPU102は、メッセージ通信部107cより、記録準備が完了した旨のコマンドを処理回路200に送信する(S404)。その後、メッセージ通信部107cにより同期処理のタイミングを示すコマンドが受信されると、CPU102は、処理回路200とは異なるフレームを処理するように、クロック制御部104による動画データの処理タイミングを変更する(S405)。次に、CPU102は、クロック制御部104からのタイミング信号に従って撮像部400より動画データを取得して符号化処理を開始する(S406)。   Next, the CPU 102 transmits a command to the effect that the recording preparation is completed from the message communication unit 107c (S404). Thereafter, when the command indicating the timing of the synchronization processing is received by the message communication unit 107c, the CPU 102 changes the processing timing of the moving image data by the clock control unit 104 so as to process a frame different from the processing circuit 200 ( S405). Next, the CPU 102 acquires moving image data from the imaging unit 400 according to the timing signal from the clock control unit 104 and starts the encoding process (S406).

この様に、処理回路100と200は、撮像部400により得られる動画データを1フレームおきに交互に取得して符号化処理を行う。   In this way, the processing circuits 100 and 200 perform the encoding process by alternately obtaining the moving image data obtained by the imaging unit 400 every other frame.

次に、図7を用いて、処理回路100と200のメモリ103、203に記憶されるデータの記憶領域について説明する。   Next, a data storage area stored in the memories 103 and 203 of the processing circuits 100 and 200 will be described with reference to FIG.

図7の701は、メモリ203に記憶された動画データの様子を示す図である。701において、フレーム1、3は処理回路200により符号化されたデータで、フレーム2、4が処理回路100により符号化されたデータである。処理回路100と処理回路200により符号化されたデータが、メモリ203の記憶領域704−707に隙間なく配置される。   701 in FIG. 7 is a diagram illustrating the state of the moving image data stored in the memory 203. In 701, frames 1 and 3 are data encoded by the processing circuit 200, and frames 2 and 4 are data encoded by the processing circuit 100. Data encoded by the processing circuit 100 and the processing circuit 200 is arranged in the storage areas 704 to 707 of the memory 203 without any gap.

図7の702は、処理回路100から符号化された動画データが送信される前のメモリ203における記憶状態を示す図である。処理回路100により符号化された1フレームの動画データは、一旦メモリ103に記憶された後、メモリ103から読み出されて処理回路200に送信され、メモリ203に記憶される。図7の703は、処理回路100におけるメモリ103に記憶されたデータの状態を示す図である。703では、フレーム2、4、6のデータが記憶領域712−714に記憶されている。   702 in FIG. 7 is a diagram illustrating a storage state in the memory 203 before the encoded moving image data is transmitted from the processing circuit 100. One frame of moving image data encoded by the processing circuit 100 is temporarily stored in the memory 103, read from the memory 103, transmitted to the processing circuit 200, and stored in the memory 203. Reference numeral 703 in FIG. 7 is a diagram illustrating a state of data stored in the memory 103 in the processing circuit 100. In 703, the data of frames 2, 4, and 6 are stored in the storage area 712-714.

CPU102は、処理回路200におけるメモリ203の書き込みアドレスを指定し、この指定されたアドレスに符号化された動画データを記憶するように、処理回路200に対して符号化されたデータを送信する。CPU202は、処理回路100より符号化された動画データを受信すると、受信したデータを直接メモリ103に送る。そして、CPU202は、CPU102により指定されたメモリ203のアドレスに受信したデータを書き込む。CPU102が指定する書き込みアドレスの情報は、CPU202がメッセージ通信部207cを制御して処理回路100に通知する。   The CPU 102 designates a write address of the memory 203 in the processing circuit 200 and transmits the encoded data to the processing circuit 200 so as to store the moving image data encoded at the specified address. When the CPU 202 receives the encoded moving image data from the processing circuit 100, it sends the received data directly to the memory 103. Then, the CPU 202 writes the received data at the address of the memory 203 designated by the CPU 102. The CPU 202 controls the message communication unit 207c to notify the processing circuit 100 of the write address information designated by the CPU 102.

また、CPU102は、符号化されたデータを処理回路200に送信する前に、符号化された1フレームの動画データのデータ量の情報をメッセージ通信部107cによりCPU202に知らせる。例えば、CPU102は、703に示す様に、各フレームの動画データの符号化が完了すると、各フレームのデータ量を示す情報をメッセージ通信部107cにより処理回路200に知らせる。   Further, before transmitting the encoded data to the processing circuit 200, the CPU 102 informs the CPU 202 of the data amount information of the encoded video data of one frame by the message communication unit 107c. For example, as shown at 703, when the encoding of the moving image data of each frame is completed, the CPU 102 notifies the processing circuit 200 of information indicating the data amount of each frame by the message communication unit 107c.

フレーム2のデータ量の情報が処理回路100より送信されると、CPU202は、フレーム1の記憶領域708に連続するように、このデータ量の分だけメモリ203の記憶領域709を予約しておく。そして、CPU202は、コーデック部202により符号化されたフレーム3のデータを、この予約した記憶領域に連続した領域710に記憶する。この様にフレーム2の記憶領域を予約した後、処理回路100よりフレーム2の動画データが送信された場合、CPU202は、受信したフレーム2の動画データをメモリ203の領域709に記憶する。この様に、処理回路100より符号化された各フレームの動画データのサイズの情報を、動画データの送信を開始する前に処理回路200に送信することで、CPU202は、次に符号化する動画データの記憶領域を決定する。   When the information on the data amount of frame 2 is transmitted from the processing circuit 100, the CPU 202 reserves the storage area 709 of the memory 203 corresponding to the data amount so as to be continuous with the storage area 708 of frame 1. Then, the CPU 202 stores the data of the frame 3 encoded by the codec unit 202 in an area 710 continuous with the reserved storage area. After the frame 2 storage area is reserved in this way, when the frame 2 moving image data is transmitted from the processing circuit 100, the CPU 202 stores the received frame 2 moving image data in the area 709 of the memory 203. Thus, the CPU 202 transmits the information on the size of the moving image data of each frame encoded by the processing circuit 100 to the processing circuit 200 before starting the transmission of the moving image data, so that the CPU 202 can encode the moving image to be encoded next. Determine the data storage area.

次に、各処理回路における符号化処理について説明する。図5は処理回路200における符号化処理を示すフローチャートである。図5の処理はCPU202が各部を制御することにより実行される。   Next, encoding processing in each processing circuit will be described. FIG. 5 is a flowchart showing the encoding process in the processing circuit 200. The processing in FIG. 5 is executed by the CPU 202 controlling each unit.

CPU202は、タイミング制御部204からのタイミング信号に基づき、撮像部400から動画データを取得するタイミングであるか否か判別する(S501)。処理タイミングでない場合はステップS507に進む。   Based on the timing signal from the timing control unit 204, the CPU 202 determines whether or not it is time to acquire moving image data from the imaging unit 400 (S501). If it is not processing timing, the process proceeds to step S507.

動画データの処理タイミングであった場合、CPU202は、撮像部400から1フレームの動画データを取得し、画像処理部201にてYUV色空間データに変換した後メモリ203に記憶する(S502)。次に、CPU202は、取得した1フレームの動画データを符号化した後でメモリ203に記憶するための記憶アドレス(記憶領域)を決定する(S503)。符号化されたデータを記憶する領域は、図3のS302にてメモリ203内に確保された領域である。メモリ203における各フレームの記憶状態は図7に示した通りである。   If it is the processing timing of the moving image data, the CPU 202 acquires one frame of moving image data from the imaging unit 400, converts it into YUV color space data by the image processing unit 201, and stores it in the memory 203 (S502). Next, the CPU 202 determines a storage address (storage area) to be stored in the memory 203 after encoding the acquired moving image data of one frame (S503). The area for storing the encoded data is the area secured in the memory 203 in S302 of FIG. The storage state of each frame in the memory 203 is as shown in FIG.

次に、CPU202は、コーデック部205により、メモリ203に記憶された動画データを符号化し、S503で決定したメモリ203のアドレスに記憶する(S505)。CPU202は、メモリ203に関する情報をメッセージ通信部207cにより処理回路100に通知する。ここで通知されるメモリに関する情報は、処理回路100が符号化データを記憶するためのメモリ203の記憶アドレス、及び、メモリ203における記録バッファ領域の空き容量である。CPU102は、符号化データを処理回路200に送信する際には、ここで送信されたアドレスを指定する。   Next, the CPU 202 encodes the moving image data stored in the memory 203 by the codec unit 205 and stores it in the address of the memory 203 determined in S503 (S505). The CPU 202 notifies the processing circuit 100 of information related to the memory 203 through the message communication unit 207c. The information about the memory notified here is the storage address of the memory 203 for the processing circuit 100 to store the encoded data, and the free capacity of the recording buffer area in the memory 203. When transmitting the encoded data to the processing circuit 200, the CPU 102 designates the address transmitted here.

また、処理回路100から、符号化されたデータのデータ量の情報が受信されると(S506)、CPU202は、記録バッファ領域における符号化データの記憶領域を設定する。前述の様に、処理回路100より符号化データのデータ量の情報が通知されたことにより、処理回路200が次に符号化するフレームを記録バッファ領域に記憶する際のアドレスを決定することが可能となる。   When the information on the amount of encoded data is received from the processing circuit 100 (S506), the CPU 202 sets the storage area for the encoded data in the recording buffer area. As described above, the information on the amount of encoded data is notified from the processing circuit 100, so that the address when the processing circuit 200 stores the next frame to be encoded in the recording buffer area can be determined. It becomes.

次に、CPU202は、処理回路100から符号化データが送信されているか否かを判別し(S507)、符号化データが送信されていた場合、データ受信部207aにて符号化データを受信する(S508)。なお、処理回路100は、符号化データを周期的に送信する必要はなく、任意のタイミングで処理回路200に送信する。処理回路200では、処理回路100からの1フレームの符号化データの送信が完了する前にデータ量の情報を取得できる。そのため、処理回路200は、処理回路100からの符号化データの受信を待たずに、マイコンS200における次フレームの処理を実行可能としている。これにより、処理回路200における処理負担を軽減することを実現している。CPU202は、記録停止の指示があったか否かを判別し(S509)、記録停止の指示があった場合、処理を終了する。   Next, the CPU 202 determines whether or not encoded data is transmitted from the processing circuit 100 (S507). When encoded data is transmitted, the data reception unit 207a receives the encoded data ( S508). Note that the processing circuit 100 does not need to periodically transmit the encoded data, and transmits the encoded data to the processing circuit 200 at an arbitrary timing. The processing circuit 200 can acquire data amount information before transmission of one frame of encoded data from the processing circuit 100 is completed. Therefore, the processing circuit 200 can execute the process of the next frame in the microcomputer S200 without waiting for the reception of the encoded data from the processing circuit 100. As a result, the processing load on the processing circuit 200 is reduced. The CPU 202 determines whether or not there is an instruction to stop recording (S509), and when there is an instruction to stop recording, the process ends.

図6は処理回路100における符号化処理を示すフローチャートである。図6の処理はCPU102が各部を制御することにより実行される。   FIG. 6 is a flowchart showing the encoding process in the processing circuit 100. The process in FIG. 6 is executed by the CPU 102 controlling each unit.

CPU102は、タイミング制御部104からのタイミング信号に基づき、撮像部400から動画データを取得するタイミングであるか否か判別する(S601)。処理タイミングでない場合はステップS607に進む。   Based on the timing signal from the timing control unit 104, the CPU 102 determines whether or not it is timing to acquire moving image data from the imaging unit 400 (S601). If it is not processing timing, the process proceeds to step S607.

動画データの処理タイミングであった場合、CPU102は、撮像部400から1フレームの動画データを取得し、画像処理部101にてYUV色空間データに変換した後メモリ103に記憶する(S602)。次に、CPU102は、取得した1フレームの動画データを符号化した後でメモリ103に記憶するための記憶アドレス(記憶領域)を決定する(S503)。符号化されたデータを記憶する領域は、図4のS402にてメモリ103内に確保された領域である。メモリ103における各フレームの記憶状態は図7に示した通りである。   When it is the processing timing of the moving image data, the CPU 102 acquires moving image data of one frame from the imaging unit 400, converts it into YUV color space data by the image processing unit 101, and stores it in the memory 103 (S602). Next, the CPU 102 determines a storage address (storage area) to be stored in the memory 103 after encoding the acquired moving image data of one frame (S503). The area for storing the encoded data is the area secured in the memory 103 in S402 of FIG. The storage state of each frame in the memory 103 is as shown in FIG.

次に、CPU102は、コーデック部105により、メモリ103に記憶された動画データを符号化し、S603で決定したメモリ203のアドレスに記憶する(S604)。次に、メッセージ通信部107cにより、処理回路200からのメモリの情報を受信する(S605)。メモリ103の情報が処理回路200から通知されると、処理回路100から符号化データを処理回路200に送信することが可能となる。   Next, the CPU 102 encodes the moving image data stored in the memory 103 by the codec unit 105 and stores it in the address of the memory 203 determined in S603 (S604). Next, the message communication unit 107c receives memory information from the processing circuit 200 (S605). When the information in the memory 103 is notified from the processing circuit 200, the encoded data can be transmitted from the processing circuit 100 to the processing circuit 200.

次に、CPU102は、符号化された1フレームの動画データのサイズの情報をメッセージ通信部107cにより処理回路200に送信する。なお、処理回路200に対する符号化データのデータ量の情報の送信タイミングと、符号化データの送信タイミングは、CPU102の制御により不定期に実行される。   Next, the CPU 102 transmits the size information of the encoded moving image data of one frame to the processing circuit 200 by the message communication unit 107c. Note that the transmission timing of the data amount information of the encoded data to the processing circuit 200 and the transmission timing of the encoded data are irregularly executed under the control of the CPU 102.

次に、CPU102は、処理回路200から、メモリ203の情報が受信されているか否かを判別する(S607)。メモリ203の情報が受信されていた場合、CPU102は、未送信の符号化データがメモリ103に記憶されているか否かを判別する(S608)。未送信の符号化データがあった場合、CPU102は、S603で通知された書き込みアドレスを指定し、メモリ103より未送信の1フレームの符号化データを読み出し、データ送信部207bにより処理回路200に送信する(S609)。   Next, the CPU 102 determines whether or not the information in the memory 203 has been received from the processing circuit 200 (S607). When the information in the memory 203 has been received, the CPU 102 determines whether or not untransmitted encoded data is stored in the memory 103 (S608). If there is untransmitted encoded data, the CPU 102 designates the write address notified in S603, reads out one frame of encoded data that has not been transmitted from the memory 103, and transmits it to the processing circuit 200 by the data transmission unit 207b. (S609).

符号化データの送信が完了すると、CPU102は、処理回路200より記録停止の指示を受けたか否かを判別し(S610)、記録停止の指示があると処理を終了する。また、S607にてメモリ103の書き込みアドレスの情報が受信されていない場合、或いは、未送信の符号化データがメモリ103に記憶されていない場合にも、S610に進む。   When the transmission of the encoded data is completed, the CPU 102 determines whether or not a recording stop instruction has been received from the processing circuit 200 (S610), and ends the process when the recording stop instruction is received. Further, when the information of the write address of the memory 103 is not received in S607, or when the untransmitted encoded data is not stored in the memory 103, the process proceeds to S610.

次に、記録停止時の処理について説明する。図8は、記録停止時における処理回路200の処理を示すフローチャートである。図8の処理はCPU202が各部を制御することにより実現される。   Next, a process when recording is stopped will be described. FIG. 8 is a flowchart showing the processing of the processing circuit 200 when recording is stopped. The processing in FIG. 8 is realized by the CPU 202 controlling each unit.

操作部材211より記録停止の指示があった場合、CPU202は、メッセージ通信207cにより、処理回路100に対して記録停止を通知する(S801)。次に、CPU202は、コーデック部205の符号化処理を停止し(S802)、処理回路100から全ての符号化データを受信したか否かを判別する(S803)。処理回路100から全ての符号化データの受信が完了していない場合、CPU202は、処理回路100から符号化データを受信し(S804)、受信したデータをメモリ203の記録バッファ領域に記憶する(S805)。そして、CPU202は、全ての符号化データが処理回路100より送信された場合、処理を終了する。   When there is an instruction to stop recording from the operation member 211, the CPU 202 notifies the processing circuit 100 of the recording stop through the message communication 207c (S801). Next, the CPU 202 stops the encoding process of the codec unit 205 (S802), and determines whether or not all encoded data has been received from the processing circuit 100 (S803). If reception of all the encoded data from the processing circuit 100 is not completed, the CPU 202 receives the encoded data from the processing circuit 100 (S804), and stores the received data in the recording buffer area of the memory 203 (S805). ). Then, when all the encoded data is transmitted from the processing circuit 100, the CPU 202 ends the process.

図9は、記録停止時における処理回路100の処理を示すフローチャートである。図9の処理はCPU102が各部を制御することにより実現される。   FIG. 9 is a flowchart showing processing of the processing circuit 100 when recording is stopped. The processing in FIG. 9 is realized by the CPU 102 controlling each unit.

メッセージ通信部107cにより処理回路200から記録停止のコマンドを受信するとフローが開始され、CPU102は、コーデック部105の符号化処理を停止する(S901)。次に、CPU102は、未送信の符号化データがメモリ103に記憶されているか否かを判別し(S902)、未転送データがある場合はデータ送信部107bにより処理回路200に符号化データを送信する(S904)。そして、全ての符号化データの送信が完了すると、CPU102は、メッセージ通信部107cにより、全ての符号化データの送信が完了した旨を処理回路200に通知する(S903)。   When the message communication unit 107c receives a recording stop command from the processing circuit 200, the flow is started, and the CPU 102 stops the encoding process of the codec unit 105 (S901). Next, the CPU 102 determines whether untransmitted encoded data is stored in the memory 103 (S902). If there is untransferred data, the data transmission unit 107b transmits the encoded data to the processing circuit 200. (S904). When the transmission of all the encoded data is completed, the CPU 102 notifies the processing circuit 200 that the transmission of all the encoded data is completed by the message communication unit 107c (S903).

次に、処理回路200による動画ファイルの記録処理について説明する。図10は動画ファイルの記録処理を示すフローチャートである。図10の処理はCPU202が各部を制御することにより実行される。   Next, a moving image file recording process by the processing circuit 200 will be described. FIG. 10 is a flowchart showing a moving image file recording process. The processing in FIG. 10 is executed by the CPU 202 controlling each unit.

操作部211より記録開始の指示があると、CPU202は、記録再生部210を制御して、記録媒体212上に新たな動画ファイルをオープンする(S1001)。次に、CPU202は、メモリ203の記録バッファ領域に、未記録の動画、音声データが所定量記憶されているか否かを判別する(S1002)。また、本実施形態では、CPU202は、記録開始からの各フレームの経過時間を示すタイムコードの情報を生成し、メモリ203の記録バッファ領域に記憶する。所定量の未記録データが記録バッファ領域に記憶されていた場合、CPU202は、記録再生部212を制御し、メモリ203より未記録の動画、音声及びタイムコードのデータを読み出して記録媒体212に記録する(S1003)。なお、所定量ではなく、所定時間分の未記録データが記録バッファ領域に記憶された場合に記録媒体212への書き込みを行う様にしてもよい。また、本実施形態では、記録媒体212に対するデータの書き込み速度が、符号化された動画データと音声データのデータレートよりも大きいものとする。   When there is a recording start instruction from the operation unit 211, the CPU 202 controls the recording / reproducing unit 210 to open a new moving image file on the recording medium 212 (S1001). Next, the CPU 202 determines whether or not a predetermined amount of unrecorded moving image and audio data is stored in the recording buffer area of the memory 203 (S1002). In the present embodiment, the CPU 202 generates time code information indicating the elapsed time of each frame from the start of recording, and stores it in the recording buffer area of the memory 203. When a predetermined amount of unrecorded data is stored in the recording buffer area, the CPU 202 controls the recording / playback unit 212 to read unrecorded moving image, audio, and time code data from the memory 203 and record them on the recording medium 212. (S1003). Note that writing to the recording medium 212 may be performed when unrecorded data for a predetermined time is stored in the recording buffer area instead of the predetermined amount. In the present embodiment, it is assumed that the data writing speed to the recording medium 212 is higher than the data rate of the encoded moving image data and audio data.

所定量の未記録データの書き込みが終了すると、CPU202は、記録媒体212へのデータの書き込みを停止する。そして、CPU202は、操作部211より記録停止の指示があったか否かを判別する(S1004)。記録停止の指示が無い場合には記録処理が継続される。また、記録停止の指示があった場合、CPU202は、メモリ203における記録バッファ領域より未記録データを読み出し、記録再生部210により記録媒体212に記録する(S1005)。また、CPU202は、動画ファイルの記録中に、図2のmoovアトムに格納する管理情報を順次生成してメモリ203に記憶する。そして、CPU202は、メモリ203よりmoovアトムに格納する管理情報を読み出し、記録再生部210により記録媒体212に記録して、動画ファイルをクローズする(S1006)。このような処理により、MOV形式の動画ファイルが記録媒体212に記録される。   When the writing of a predetermined amount of unrecorded data is completed, the CPU 202 stops writing data to the recording medium 212. Then, the CPU 202 determines whether or not there is an instruction to stop recording from the operation unit 211 (S1004). If there is no instruction to stop recording, the recording process is continued. If there is an instruction to stop recording, the CPU 202 reads unrecorded data from the recording buffer area in the memory 203 and records it in the recording medium 212 by the recording / playback unit 210 (S1005). Further, the CPU 202 sequentially generates management information to be stored in the moov atom in FIG. Then, the CPU 202 reads management information stored in the moov atom from the memory 203, records it on the recording medium 212 by the recording / playback unit 210, and closes the moving image file (S1006). By such processing, a moving image file in the MOV format is recorded on the recording medium 212.

次に、図11を用いて各処理回路100、200による動画データの符号化処理のタイミングについて説明する。   Next, the timing of the moving image data encoding processing by the processing circuits 100 and 200 will be described with reference to FIG.

図11において、1101は記録される動画データのフレームレートに対応したフレームの周期である。本実施形態では、撮像部400により生成される動画データのフレームレートと記録される動画のフレームレートが共に30fpsなので、フレーム間隔1101は1/30秒である。1102は処理回路200による動画データの各フレームを処理するフレーム間隔である。1103は処理回路100による動画データの各フレームを処理するフレーム間隔である。処理回路100と200は、撮像部400から出力される動画データを1フレームおきに交互に処理するため、フレーム間隔1102、1103はそれぞれ、記録される動画のフレーム間隔の2倍の間隔である。   In FIG. 11, reference numeral 1101 denotes a frame period corresponding to the frame rate of moving image data to be recorded. In this embodiment, since the frame rate of the moving image data generated by the imaging unit 400 and the frame rate of the recorded moving image are both 30 fps, the frame interval 1101 is 1/30 second. Reference numeral 1102 denotes a frame interval for processing each frame of the moving image data by the processing circuit 200. Reference numeral 1103 denotes a frame interval for processing each frame of the moving image data by the processing circuit 100. Since the processing circuits 100 and 200 alternately process the moving image data output from the imaging unit 400 every other frame, the frame intervals 1102 and 1103 are each twice the frame interval of the recorded moving image.

1104は処理回路200が撮像部400から1フレーム分の動画データを取得する期間、1105は処理回路200が1フレームの動画データを符号化処理する期間である。1106は処理回路100が撮像部400から1フレーム分の動画データを取得する期間、1107は処理回路100が1フレームの動画データを符号化処理する期間である。1108は処理回路100から処理回路200に符号化データを送信する期間である。   1104 is a period during which the processing circuit 200 acquires one frame of moving image data from the imaging unit 400, and 1105 is a period during which the processing circuit 200 encodes one frame of moving image data. Reference numeral 1106 denotes a period during which the processing circuit 100 acquires one frame of moving image data from the imaging unit 400. Reference numeral 1107 denotes a period during which the processing circuit 100 encodes one frame of moving image data. Reference numeral 1108 denotes a period during which encoded data is transmitted from the processing circuit 100 to the processing circuit 200.

また、1109は処理回路200から処理回路100に対するメモリ203の情報を送信する処理を示している。1110は処理回路100から処理回路200に対して符号化データのデータ量の情報を送信する処理を示している。1111は処理回路100から処理回路200に対して1フレームの符号化データの送信が完了したことを通知する処理を示している。   Reference numeral 1109 denotes processing for transmitting information in the memory 203 from the processing circuit 200 to the processing circuit 100. Reference numeral 1110 denotes processing for transmitting information on the amount of encoded data from the processing circuit 100 to the processing circuit 200. Reference numeral 1111 denotes processing for notifying the processing circuit 100 that the transmission of one frame of encoded data has been completed.

図11に示すように、フレーム間隔1101に対応したフレームレートの動画データを処理回路100と200の何れか一方で処理する場合、フレーム間隔1101の期間内に1フレームの動画データの取得及び符号化処理を完了しなくてはならない。   As shown in FIG. 11, when moving image data having a frame rate corresponding to the frame interval 1101 is processed by one of the processing circuits 100 and 200, acquisition and encoding of one frame of moving image data within the period of the frame interval 1101 is performed. Processing must be completed.

一方、本実施形態では、二つの処理回路100と200が並列に動画データを符号化処理するため、各処理回路は、フレーム間隔1101の期間内に1フレームの動画データの取得及び符号化処理を完了しなくてもよい。   On the other hand, in this embodiment, since the two processing circuits 100 and 200 encode moving image data in parallel, each processing circuit performs acquisition and encoding processing of one frame of moving image data within a frame interval 1101. It does not have to be completed.

そして、本実施形態では、処理回路100により1フレームの動画の符号化処理が完了した場合に、符号化データのデータ量の情報を処理回路200に送信する。そのため、処理回路200では、処理回路100から符号化データを受信する前に次のフレームの符号化処理を開始することが可能となる。   In the present embodiment, when the encoding process of one frame of moving image is completed by the processing circuit 100, information on the amount of encoded data is transmitted to the processing circuit 200. Therefore, the processing circuit 200 can start the encoding process for the next frame before receiving the encoded data from the processing circuit 100.

次に、再生処理について説明する。   Next, the reproduction process will be described.

図13は、再生時における処理回路200の処理を示すフローチャートである。図13の処理は、CPU202が各部を制御することにより実現される。操作部211より再生モードへの切り替え指示があった場合、CPU202は、記録再生部210に対し、記録媒体212に記録された各動画ファイルを管理する管理ファイルを読み出すように指示する。そして、CPU202は、読み出された管理ファイルに基づき、記録媒体212に記録された各動画ファイルのインデックス画面を表示部208に表示する。ユーザが操作部211を操作して、表示部208に表示された動画ファイルの一つを選択して再生開始を指示すると、図13の処理が開始される。   FIG. 13 is a flowchart showing processing of the processing circuit 200 during reproduction. The processing in FIG. 13 is realized by the CPU 202 controlling each unit. When the operation unit 211 gives an instruction to switch to the playback mode, the CPU 202 instructs the recording / playback unit 210 to read out a management file for managing each moving image file recorded on the recording medium 212. Then, the CPU 202 displays an index screen of each moving image file recorded on the recording medium 212 on the display unit 208 based on the read management file. When the user operates the operation unit 211 to select one of the moving image files displayed on the display unit 208 and instruct the start of reproduction, the process of FIG. 13 is started.

CPU202は、ユーザにより選択された動画ファイルのファイル名等の識別情報をメッセージ通信部207cにより処理回路100に通知する(S1301)。次に、CPU202は、記録再生部210を制御して、選択された動画ファイルのmoovアトムのデータを読み出し、メモリ203に記憶する(S1302)。また、処理回路100のCPU102は、S1301にて処理回路200から通知された動画ファイルの情報に基づき、メッセージ通信部107cにより、記録再生部210に対して選択された動画ファイルのmoovアトムの読み出しを要求する。記録再生部210は、CPU102からの読み出し要求に従い、記録媒体212から選択された動画ファイルのmoovアトムを読み出し、データ送信部207aにより処理回路100に送る。CPU102は、データ受信部107aにより選択された動画ファイルのmoovアトムのデータを受信すると、メモリ103に記憶し、moovアトムのデータをメモリ103に記憶すると、再生準備完了を示す情報をメッセージ通信部107cにより処理回路200に送信する。これにより、動画データの再生処理のために必要な情報を、処理回路100と200の間で共に利用できるようになる。なお、CPU102が記録再生部210に対してmoovアトムのデータの読み出しを直接要求するのではなく、CPU202がメモリ203に記憶したmoovアトムのデータを処理回路100に送信するようにしてもよい。   The CPU 202 notifies the processing circuit 100 of identification information such as the file name of the moving image file selected by the user via the message communication unit 207c (S1301). Next, the CPU 202 controls the recording / playback unit 210 to read the moov atom data of the selected moving image file and store it in the memory 203 (S1302). Further, the CPU 102 of the processing circuit 100 reads out the moov atom of the selected moving image file from the recording / playback unit 210 by the message communication unit 107c based on the information of the moving image file notified from the processing circuit 200 in S1301. Request. The recording / reproducing unit 210 reads the moov atom of the selected moving image file from the recording medium 212 in accordance with the read request from the CPU 102 and sends it to the processing circuit 100 by the data transmission unit 207a. When receiving the moov atom data of the moving image file selected by the data receiving unit 107a, the CPU 102 stores the data in the memory 103, and when storing the moov atom data in the memory 103, the message communication unit 107c displays information indicating that playback preparation is complete. To the processing circuit 200. As a result, information necessary for the reproduction processing of moving image data can be used between the processing circuits 100 and 200 together. The CPU 102 may not directly request the recording / playback unit 210 to read the moov atom data, but the CPU 202 may transmit the moov atom data stored in the memory 203 to the processing circuit 100.

CPU202は、このように処理回路100から再生準備完了の通知を待つ(S1303)。再生準備完了の通知を受けた場合、CPU202は、クロック制御部204を制御して、動画データの復号タイミングを示すデコードクロックと表示部208の表示タイミングを示す表示クロックの出力を開始する(S1304)。デコードクロックは、moovアトムの情報に基づき決定される。また、CPU102は、クロック制御部104を制御して、デコードクロックの出力を開始する。また、表示クロックは、表示部208の能力により決定される。   In this way, the CPU 202 waits for notification of completion of reproduction preparation from the processing circuit 100 (S1303). When receiving the notification of completion of reproduction preparation, the CPU 202 controls the clock control unit 204 to start outputting a decode clock indicating the decoding timing of the moving image data and a display clock indicating the display timing of the display unit 208 (S1304). . The decode clock is determined based on the information of the moov atom. Further, the CPU 102 controls the clock control unit 104 to start outputting the decode clock. The display clock is determined by the capability of the display unit 208.

次に、CPU202は、復号された動画データを用いて表示用画面を生成する処理を実行し(S1305)、生成された表示用画面を表示部208に表示する(S1306)。そして、CPU202は、操作部211より再生停止の指示があったか否かを判別し、再生停止の指示があるまで処理を継続する。   Next, the CPU 202 executes processing for generating a display screen using the decoded moving image data (S1305), and displays the generated display screen on the display unit 208 (S1306). Then, the CPU 202 determines whether or not an instruction to stop reproduction has been given from the operation unit 211, and continues the process until there is an instruction to stop reproduction.

各処理回路100、200は、それぞれデコードクロックに応じたタイミングで動画データの復号処理を実行する。また、後述の様に、処理回路200では、表示クロックに応じたタイミングで再生画像の縮小処理を実行して表示画面を生成する。一方、処理回路100では、表示タイミングとは独立したタイミングで再生画像の縮小処理を実行して表示画面を生成する。   Each of the processing circuits 100 and 200 executes the moving image data decoding process at a timing corresponding to the decoding clock. As will be described later, the processing circuit 200 generates a display screen by executing a reduction process of the reproduced image at a timing according to the display clock. On the other hand, the processing circuit 100 generates a display screen by executing a reduction process of the reproduced image at a timing independent of the display timing.

また、後述の様に、本実施形態では、処理回路100と200は1フレームおきに交互に再生された動画データの復号処理を行う。そのため、動画データにおいて、処理回路100が処理するフレームの番号は、S1301において、処理回路200から処理回路100に通知される。   Further, as will be described later, in the present embodiment, the processing circuits 100 and 200 perform decoding processing of moving image data reproduced alternately every other frame. Therefore, in the moving image data, the frame number processed by the processing circuit 100 is notified from the processing circuit 200 to the processing circuit 100 in S1301.

また、S1306の表示処理においては、表示クロックに対応したタイミングで、生成された表示画面を表示部208に表示する。このとき表示するフレームは、処理回路100側で生成したものと、処理回路200側で生成したものがある。どちらの処理回路で生成したフレームを使うかを判定する処理は後述する。   In the display process of S1306, the generated display screen is displayed on the display unit 208 at a timing corresponding to the display clock. The frame displayed at this time includes a frame generated on the processing circuit 100 side and a frame generated on the processing circuit 200 side. Processing for determining which processing circuit uses the frame generated will be described later.

次に、処理回路200による表示画面の生成処理について説明する。図14は処理回路200による表示画面の生成処理を示すフローチャートである。図14の処理はCPU202が各部を制御することにより実行される。   Next, display screen generation processing by the processing circuit 200 will be described. FIG. 14 is a flowchart showing display screen generation processing by the processing circuit 200. The processing in FIG. 14 is executed by the CPU 202 controlling each unit.

処理回路200は、デコードクロックに応じたタイミングで1フレームの動画データを復号し、また、表示クロックに応じたタイミングで復号された動画データのサイズを縮小し、表示画面を生成する。   The processing circuit 200 decodes one frame of moving image data at a timing corresponding to the decoding clock, reduces the size of the moving image data decoded at a timing corresponding to the display clock, and generates a display screen.

まず、CPU202は、デコードクロックによるデコードタイミングであるか否かを判別する(S1401)。デコードタイミングであった場合、CPU202は、記録再生部210に対し、1フレームの動画データの読み出しを要求する。そして、CPU202は、コーデック部205により、読み出された1フレームの動画データを復号し(S1402)、復号された動画データをメモリ203に記憶する(S1403)。   First, the CPU 202 determines whether or not it is a decoding timing based on a decoding clock (S1401). If it is the decoding timing, the CPU 202 requests the recording / playback unit 210 to read out one frame of moving image data. The CPU 202 uses the codec unit 205 to decode the read one frame of moving image data (S1402), and stores the decoded moving image data in the memory 203 (S1403).

次に、CPU202は、表示クロックによるデコードタイミングであるか否かを判別する(S1404)。表示タイミングであった場合、CPU202は、リサイズ部206を制御して、メモリ203に記憶された復号済みの1フレームの動画データのサイズを縮小し、メモリ203の表示用画面の記憶領域に記憶する(S1406)。CPU202は、図14の処理を繰り返すことで、再生停止の指示があるまでの間、表示用画面を生成する。   Next, the CPU 202 determines whether or not it is the decoding timing based on the display clock (S1404). When it is the display timing, the CPU 202 controls the resizing unit 206 to reduce the size of the decoded one-frame moving image data stored in the memory 203 and stores it in the storage area of the display screen of the memory 203. (S1406). The CPU 202 repeats the process of FIG. 14 to generate a display screen until a playback stop instruction is issued.

次に、処理回路100による表示画面の生成処理について説明する。図15は処理回路100による表示画面の生成処理を示すフローチャートである。図15の処理はCPU102が各部を制御することにより実行される。   Next, display screen generation processing by the processing circuit 100 will be described. FIG. 15 is a flowchart showing display screen generation processing by the processing circuit 100. The processing in FIG. 15 is executed by the CPU 102 controlling each unit.

処理回路100は、デコードクロックに応じたタイミングで1フレームの動画データを復号し、引き続き復号された動画データの画面サイズの縮小処理を実行する。   The processing circuit 100 decodes one frame of moving image data at a timing according to the decode clock, and subsequently executes a process of reducing the screen size of the decoded moving image data.

まず、CPU102は、デコードクロックによるデコードタイミングであるか否かを判別する(S1501)。デコードタイミングであった場合、CPU102は、記録再生部210に対し、1フレームの動画データの読み出しを要求する。記録再生部210は、記録媒体211より指定された動画データを読み出して、データ送信部207aにより処理回路100に送る。CPU202は、コーデック部205により、送信された1フレームの動画データを復号し(S1502)、復号された動画データをメモリ103に記憶する(S1503)。   First, the CPU 102 determines whether or not it is a decoding timing based on a decoding clock (S1501). When it is the decoding timing, the CPU 102 requests the recording / reproducing unit 210 to read out one frame of moving image data. The recording / playback unit 210 reads the designated moving image data from the recording medium 211 and sends it to the processing circuit 100 by the data transmission unit 207a. The CPU 202 uses the codec unit 205 to decode the transmitted one frame of moving image data (S1502), and stores the decoded moving image data in the memory 103 (S1503).

1フレームの動画データの復号処理が完了すると、CPU102は、リサイズ部106を制御して、メモリ103に記憶された復号済みの1フレームの動画データのサイズを縮小する。そして、CPU102は、縮小した動画データをデータ送信部107bにより処理回路200に送信し、メモリ203の表示用画面の記憶領域に記憶する(S1505)。CPU102は、図15の処理を繰り返すことで、再生停止の指示があるまでの間、表示用画面を生成する。   When the decoding process for one frame of moving image data is completed, the CPU 102 controls the resizing unit 106 to reduce the size of the decoded one frame of moving image data stored in the memory 103. Then, the CPU 102 transmits the reduced moving image data to the processing circuit 200 by the data transmission unit 107b and stores it in the storage area of the display screen of the memory 203 (S1505). The CPU 102 generates a display screen until a reproduction stop instruction is issued by repeating the processing of FIG.

このように、処理回路100と処理回路200では、リサイズ処理の手順を異ならせることにより、メモリの効率的な利用と再生速度の維持を両立させる。つまり、処理回路200では、表示部208の表示タイミングにあわせてリサイズ部206にてリサイズ処理を行う。これにより、リサイズ済のフレームを保存しておくためのメモリ203の記憶領域を最小限にとどめ、メモリ203を効率的に利用することができる。また、データバス300を通して動画データを転送する処理回路100では、デコード処理、リサイズ処理、転送処理を連続して行うことで、データバス300の通信のためのオーバーヘッド分を補い、処理回路200に早く復号済みの動画データを送信する。なお、本実施形態では、メモリ203の表示用画面の記憶領域として、3フレーム分の記憶領域を用意している。そして、新たに1フレームのリサイズ処理が完了すると、一番古いフレームのデータを消去して新たなフレームのデータを記憶する。   In this way, the processing circuit 100 and the processing circuit 200 can achieve both efficient use of the memory and maintenance of the reproduction speed by making the resizing process different. That is, in the processing circuit 200, the resizing process is performed by the resizing unit 206 in accordance with the display timing of the display unit 208. As a result, the storage area of the memory 203 for storing the resized frame can be minimized and the memory 203 can be used efficiently. Further, in the processing circuit 100 that transfers moving image data through the data bus 300, the decoding circuit, the resizing process, and the transfer process are continuously performed, so that the overhead for communication of the data bus 300 is compensated, and the processing circuit 200 is quickly transmitted. Send the decoded video data. In the present embodiment, a storage area for three frames is prepared as a storage area for the display screen of the memory 203. When the resizing process for one frame is newly completed, the oldest frame data is erased and the new frame data is stored.

次に、処理回路200における、復号された動画データの表示処理について説明する。図16は、処理回路200による表示処理を説明するためのフローチャートである。図16の処理はCPU202が各部を制御することにより実行される。また、図16の処理は、表示クロックに応じて実行される。   Next, display processing of the decoded moving image data in the processing circuit 200 will be described. FIG. 16 is a flowchart for explaining display processing by the processing circuit 200. The processing in FIG. 16 is executed by the CPU 202 controlling each unit. Further, the process of FIG. 16 is executed according to the display clock.

まず、CPU202は、表示するフレームのフレーム番号を更新する(S1601)。フレーム番号とは、ここでは、動画の先頭から数えて何枚目のフレームかを示す番号である。先頭を1とし、次が2、さらにその次が3といったように、1ずつ増えるものとする。本実施形態では、デコードクロックを用いて表示フレーム番号を更新する。即ち、最後に表示フレーム番号を更新してから、ステップS1601までの間にデコードクロックが発生していれば表示フレーム番号を1増やし、そうでなければ表示フレーム番号は変更しない。   First, the CPU 202 updates the frame number of the frame to be displayed (S1601). Here, the frame number is a number indicating the number of frames counted from the top of the moving image. It is assumed that the head is 1, the next is 2, the next is 3, and so on. In this embodiment, the display frame number is updated using the decode clock. That is, if the decode clock has been generated between the last update of the display frame number and step S1601, the display frame number is incremented by 1. Otherwise, the display frame number is not changed.

次に、CPU202は、表示フレーム番号と、処理回路200によりリサイズされてメモリ203に記憶されたフレームのフレーム番号を比較する(S1602)。これらのフレーム番号が一致している場合(S1603)、CPU202は、処理回路200によりリサイズ処理されたフレームの動画データをメモリ203より読み出し、表示部208に供給して表示する(S1604)。   Next, the CPU 202 compares the display frame number with the frame number of the frame resized by the processing circuit 200 and stored in the memory 203 (S1602). If these frame numbers match (S1603), the CPU 202 reads out the moving image data of the frame resized by the processing circuit 200 from the memory 203, supplies it to the display unit 208, and displays it (S1604).

一方、表示フレーム番号と、処理回路200によりリサイズ処理されたフレーム番号が一致しない場合(1603)、CPU202は、処理回路200によりリサイズされてメモリ203に記憶されたフレームのフレーム番号を比較する(S1602)。これらのフレーム番号が一致している場合(S1606)、CPU202は、処理回路100によりリサイズ処理されてメモリ203に記憶されたフレームの動画データをメモリ203より読み出し、表示部208に供給して表示する(S1607)。   On the other hand, when the display frame number does not match the frame number resized by the processing circuit 200 (1603), the CPU 202 compares the frame number of the frame resized by the processing circuit 200 and stored in the memory 203 (S1602). ). If these frame numbers match (S1606), the CPU 202 reads out the moving image data of the frame resized by the processing circuit 100 and stored in the memory 203 from the memory 203, supplies it to the display unit 208, and displays it. (S1607).

また、表示フレーム番号と、処理回路100によりリサイズ処理されたフレーム番号が一致しない場合(1606)、CPU202は、メモリ203に記憶されたリサイズ済みのフレームのうち、表示フレーム番号に最も近いフレームを選択する。そして、CPU202は、選択したフレームの動画データをメモリ203より読み出し、表示部208に送って表示する。   If the display frame number does not match the frame number resized by the processing circuit 100 (1606), the CPU 202 selects the frame closest to the display frame number from the resized frames stored in the memory 203. To do. Then, the CPU 202 reads the moving image data of the selected frame from the memory 203 and sends it to the display unit 208 for display.

図17は、再生時における処理回路100と200による動画データの復号、表示処理を示すタイミングチャートである。図17に示す様に、各処理回路100、200はそれぞれ、デコードクロックに対応したタイミングで1フレームの動画データを復号する。また、処理回路100では、動画データの復号処理に引き続いてリサイズ処理を実行し、リサイズ処理に引き続いて、リサイズされたフレームのデータを処理回路200に送信する。   FIG. 17 is a timing chart showing the decoding and display processing of moving image data by the processing circuits 100 and 200 during reproduction. As shown in FIG. 17, each of the processing circuits 100 and 200 decodes one frame of moving image data at a timing corresponding to the decode clock. The processing circuit 100 executes a resizing process subsequent to the decoding process of the moving image data, and transmits the resized frame data to the processing circuit 200 following the resizing process.

一方、処理回路200では、動画データの復号処理が完了した後、すぐにリサイズ処理を行うのではなく、次の表示クロックに対応したタイミングでリサイズ処理を実行する。   On the other hand, the processing circuit 200 does not perform the resizing process immediately after the video data decoding process is completed, but performs the resizing process at a timing corresponding to the next display clock.

この様に、本実施形態では、二つの処理回路を使って、画素数とフレームレートが大きい動画データを再生することができる。さらに、二つの処理回路を使って動画データを再生する際、メモリを効率的に利用し、処理回路の間でのデータ転送のためのオーバーヘッドを補うことが可能となる。   As described above, in this embodiment, moving image data having a large number of pixels and a large frame rate can be reproduced using two processing circuits. Furthermore, when reproducing moving image data using two processing circuits, it is possible to efficiently use the memory and compensate for the overhead for data transfer between the processing circuits.

Claims (8)

撮像手段と、
第1のCPUと第1の通信手段とを有する回路であって、前記撮像手段から動画データを取得し、取得した前記動画データを処理して前記第1の通信手段により出力する第1の処理回路と、
第2のCPUと第2の通信手段とを有する回路であって、前記第1の処理回路により取得されたフレームとは異なるフレームの動画データを前記撮像手段から取得して処理し、処理した前記動画データと、前記第の通信手段により前記第1の処理回路から出力された動画データとを記録媒体に記録する第2の処理回路とを備え
前記第2のCPUは、前記第2の処理回路が処理するフレームとは異なるフレームの動画データを前記第1の処理回路が前記撮像手段から取得して処理するように前記第1の処理回路による処理タイミングを制御するための制御情報を前記第2の通信手段により前記第1の処理回路に送信し、
前記第1のCPUは、前記第2の通信手段から送信された前記制御情報に基づいて前記第1の処理回路が前記動画データを処理するタイミングを制御し、
前記第1の処理回路は、前記制御されたタイミングに従って、前記第1の処理回路が処理するフレームの動画データを前記撮像手段から取得する、ことを特徴とする撮像装置。
Imaging means;
A circuit having a first CPU and a first communication unit, which acquires moving image data from the imaging unit, processes the acquired moving image data, and outputs the acquired moving image data by the first communication unit Circuit,
A circuit having a second CPU and a second communication unit, wherein the moving image data of a frame different from the frame acquired by the first processing circuit is acquired from the imaging unit, processed, and processed; A second processing circuit for recording the moving image data and the moving image data output from the first processing circuit by the first communication unit on a recording medium ;
The second CPU uses the first processing circuit so that the first processing circuit acquires and processes moving image data of a frame different from the frame processed by the second processing circuit from the imaging unit. Control information for controlling processing timing is transmitted to the first processing circuit by the second communication means;
The first CPU controls the timing at which the first processing circuit processes the moving image data based on the control information transmitted from the second communication means,
The imaging apparatus , wherein the first processing circuit acquires moving image data of a frame processed by the first processing circuit from the imaging unit according to the controlled timing .
前記第1の処理回路は、前記第1の処理回路における処理タイミングを制御するためのタイミング信号を生成する生成手段を有し、
前記第1のCPUは、前記第2の通信手段から送信された前記制御情報に基づいて、前記生成手段による処理タイミングを変更することを特徴とする請求項1に記載の撮像装置。
The first processing circuit includes a generating unit that generates a timing signal for controlling processing timing in the first processing circuit,
The imaging apparatus according to claim 1, wherein the first CPU changes a processing timing by the generation unit based on the control information transmitted from the second communication unit .
前記第2の処理回路は、前記第2の処理回路が処理したフレームの動画データと、前記第の通信手段により前記第1の処理回路から出力されたフレームの動画データとをメモリに記憶し、前記メモリに記憶された動画データを読み出して前記記録媒体に記録することを特徴とする請求項1に記載の撮像装置。 The second processing circuit stores the video data in the frame in which the second processing circuit has processed a video data frame output from the first processing circuit by the first communication means to the memory The imaging apparatus according to claim 1, wherein the moving image data stored in the memory is read and recorded on the recording medium. 前記第1の処理回路と前記第2の処理回路はそれぞれ、前記撮像手段から取得した動画データを符号化する処理を行うことを特徴とする請求項3に記載の撮像装置。   The imaging apparatus according to claim 3, wherein each of the first processing circuit and the second processing circuit performs a process of encoding moving image data acquired from the imaging unit. 撮像手段と、
第1のCPUと第1の通信手段とを有する回路であって、前記撮像手段から動画データを取得し、取得した前記動画データを処理して前記第1の通信手段により出力する第1の処理回路と、
第2のCPUと第2の通信手段とを有する回路であって、前記第1の処理回路により取得されたフレームとは異なるフレームの動画データを前記撮像手段から取得して処理し、処理した前記動画データと、前記第1の通信手段により前記第1の処理回路から出力された動画データとを記録媒体に記録する第2の処理回路とを備え、
前記第1の処理回路と前記第2の処理回路はそれぞれ、前記撮像手段から取得した動画データを符号化する処理を行い、
前記第2の処理回路は、前記第2の処理回路が符号化処理したフレームの動画データと、前記第1の処理回路により符号化処理されて前記第1の通信手段により出力されたフレームの動画データとをメモリに記憶し、前記メモリに記憶された動画データを読み出して前記記録媒体に記録し、
前記第1のCPUは、前記第1の処理回路が符号化処理した1フレームの動画データのデータ量の情報を前記第1の通信手段により前記第2の処理回路に出力し、前記第2のCPUは、前記第1の通信手段により出力された前記データ量の情報に基づいて、前記第2の処理回路が符号化処理した動画データの前記メモリにおける記憶領域を決定することを特徴とする撮像装置。
Imaging means;
A circuit having a first CPU and a first communication unit, which acquires moving image data from the imaging unit, processes the acquired moving image data, and outputs the acquired moving image data by the first communication unit Circuit,
A circuit having a second CPU and a second communication unit, wherein the moving image data of a frame different from the frame acquired by the first processing circuit is acquired from the imaging unit, processed, and processed; A second processing circuit for recording the moving image data and the moving image data output from the first processing circuit by the first communication unit on a recording medium;
Each of the first processing circuit and the second processing circuit performs a process of encoding the moving image data acquired from the imaging unit,
The second processing circuit includes the moving image data of the frame encoded by the second processing circuit and the moving image of the frame encoded by the first processing circuit and output by the first communication unit. Data is stored in a memory, moving image data stored in the memory is read and recorded on the recording medium,
The first CPU outputs data amount information of one frame of moving image data encoded by the first processing circuit to the second processing circuit by the first communication means, and the second processing circuit the CPU, based on the said amount of data of information outputted by the first communication means, shooting the second processing circuit and determines the storage area in the memory of the moving image data processed coded Image device.
前記第2のCPUは、前記第2の処理回路が符号化処理した動画データを記憶するための前記メモリにおける記憶アドレスを決定し、前記記憶アドレスの情報を前記第2の通信手段により前記第1の処理回路に出力することを特徴とする請求項5に記載の撮像装置。   The second CPU determines a storage address in the memory for storing the moving image data encoded by the second processing circuit, and uses the second communication means to store the storage address information. The image pickup apparatus according to claim 5, wherein the image pickup apparatus outputs the image to a processing circuit. 前記第1のCPUは、前記データ量の情報を前記第1の通信手段により前記第2の処理回路に出力した後、符号化処理された前記動画データを前記第1の通信手段により前記第2の処理回路に出力し、前記第2の通信手段を介して、前記メモリにおける前記第2の通信手段により出力された前記記憶アドレスに書き込むことを特徴とする請求項6に記載の撮像装置。   The first CPU outputs the information on the amount of data to the second processing circuit by the first communication unit, and then the encoded video data is output to the second processing unit by the first communication unit. The imaging apparatus according to claim 6, wherein the image data is output to the processing circuit and written to the storage address output from the second communication unit in the memory via the second communication unit. 前記第1の処理回路と前記第2の処理回路は、1フレームおきに交互に前記撮像手段から1フレームの動画データを取得することを特徴とする請求項1から7の何れか1項に記載の撮像装置。   8. The method according to claim 1, wherein the first processing circuit and the second processing circuit acquire one frame of moving image data from the imaging unit alternately every other frame. Imaging device.
JP2012085727A 2012-04-04 2012-04-04 Imaging device Expired - Fee Related JP5930807B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012085727A JP5930807B2 (en) 2012-04-04 2012-04-04 Imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012085727A JP5930807B2 (en) 2012-04-04 2012-04-04 Imaging device

Publications (2)

Publication Number Publication Date
JP2013219424A JP2013219424A (en) 2013-10-24
JP5930807B2 true JP5930807B2 (en) 2016-06-08

Family

ID=49591107

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012085727A Expired - Fee Related JP5930807B2 (en) 2012-04-04 2012-04-04 Imaging device

Country Status (1)

Country Link
JP (1) JP5930807B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3104416B2 (en) * 1992-06-29 2000-10-30 日本ビクター株式会社 Information recording / reproducing device
JPH08255142A (en) * 1995-03-16 1996-10-01 Sony Corp Parallel processor device
JP3851149B2 (en) * 2001-11-22 2006-11-29 三洋電機株式会社 Image processing device
JP2008294579A (en) * 2007-05-22 2008-12-04 Sony Corp Video data processor

Also Published As

Publication number Publication date
JP2013219424A (en) 2013-10-24

Similar Documents

Publication Publication Date Title
US8577161B2 (en) Reproduction apparatus
JP5883052B2 (en) Image processing apparatus and control method thereof
JP2015171042A (en) Picture processing system and picture imaging apparatus
JP5164610B2 (en) Imaging apparatus and control method thereof
JP4799504B2 (en) Image decoding apparatus and control method thereof
US9258540B2 (en) Imaging apparatus
JP5930807B2 (en) Imaging device
JP5925020B2 (en) Playback device
JP2008131568A (en) Video signal processing apparatus and method
JP5506536B2 (en) Image processing device
JP6294725B2 (en) Image processing apparatus, imaging apparatus, image processing apparatus control method, and program
JP5072524B2 (en) Moving picture reproduction apparatus, processing method thereof, and program thereof
JP2015099995A (en) Recording device and recording device control method
JP7374698B2 (en) Imaging device, control method and program
JP2018195923A (en) Recording device
JP2015029211A (en) Imaging device
JP2013005054A (en) Reproduction device and reproduction method
JP6082269B2 (en) Recording apparatus and control method thereof
JP6351325B2 (en) Recording apparatus and control method thereof
JP5511739B2 (en) Recording apparatus and recording method
JP2015164266A (en) Moving picture recording system, imaging device and recording device
JP2018195946A (en) Recording device
JP2009100105A (en) Moving image reproducing apparatus, its control method, and its program
JP2011014954A (en) Recorder, and reproducing device
JP2017188831A (en) Image recording device and control method of the image recording device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150406

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160105

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160303

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160329

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160426

R151 Written notification of patent or utility model registration

Ref document number: 5930807

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees