Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4190384B2 - Video camera - Google Patents
[go: Go Back, main page]

JP4190384B2 - Video camera - Google Patents

Video camera Download PDF

Info

Publication number
JP4190384B2
JP4190384B2 JP2003349524A JP2003349524A JP4190384B2 JP 4190384 B2 JP4190384 B2 JP 4190384B2 JP 2003349524 A JP2003349524 A JP 2003349524A JP 2003349524 A JP2003349524 A JP 2003349524A JP 4190384 B2 JP4190384 B2 JP 4190384B2
Authority
JP
Japan
Prior art keywords
image
audio
image signal
video camera
frame
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
JP2003349524A
Other languages
Japanese (ja)
Other versions
JP2005117400A (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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2003349524A priority Critical patent/JP4190384B2/en
Publication of JP2005117400A publication Critical patent/JP2005117400A/en
Application granted granted Critical
Publication of JP4190384B2 publication Critical patent/JP4190384B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)

Description

この発明は、ビデオカメラに関し、特にたとえば、画像データおよび音声データを記録再生する、ビデオカメラに関する。   The present invention relates to a video camera, and more particularly to a video camera that records and reproduces image data and audio data, for example.

従来のこの種の信号処理装置の一例が、特許文献1および2に開示されている。特許文献1で開示された従来技術(1)は、ビデオ信号に付加されたタイムスタンプとオーディオ信号に付加されたタイムスタンプとの差分を求め、ディスプレイに送出する垂直帰線消去信号期間をこの差分に応じて変更し、これによってビデオ信号およびオーディオ信号の滑らかな同期再生を実現しようとするものである。   An example of a conventional signal processing apparatus of this type is disclosed in Patent Documents 1 and 2. In the prior art (1) disclosed in Patent Document 1, the difference between the time stamp added to the video signal and the time stamp added to the audio signal is obtained, and the vertical blanking signal period sent to the display is set as this difference. Accordingly, the video signal and the audio signal can be smoothly reproduced in a synchronized manner.

また、特許文献2で開示された従来技術(2)は、音声データの再生量を監視して求められた再生時刻と画像データに割り当てられたタイムスタンプとに基づいて、音声および画像の間で同期を確保しようとするものである。
特開平8−140054号公報[H04N 5/93,G11B 20/10] 特開平11−134804号公報[G11B 20/10,H04N 5/937,7/08,7/081]
Further, the prior art (2) disclosed in Patent Document 2 is based on the reproduction time obtained by monitoring the reproduction amount of audio data and the time stamp assigned to the image data, between the audio and the image. It is intended to ensure synchronization.
JP-A-8-140054 [H04N 5/93, G11B 20/10] Japanese Patent Application Laid-Open No. 11-134804 [G11B 20/10, H04N 5/937, 7/08, 7/081]

しかし、従来技術(1)では、記録時にビデオ信号およびオーディオ信号の両方にタイムスタンプを付加するため、タイムスタンプの生成に時計回路が必要となる。従来技術(2)でも、記録時に画像データにタイムスタンプを付加するため、タイムスタンプを生成するための時計回路を準備する必要がある。つまり、従来技術(1)および(2)のいずれにおいても、回路構成が複雑になるという問題がある。   However, in the prior art (1), since a time stamp is added to both the video signal and the audio signal at the time of recording, a clock circuit is required to generate the time stamp. Even in the prior art (2), it is necessary to prepare a clock circuit for generating a time stamp in order to add a time stamp to image data at the time of recording. That is, both the conventional techniques (1) and (2) have a problem that the circuit configuration is complicated.

それゆえに、この発明の主たる目的は、簡単な回路構成で再生画像と再生音声との同期を確保することができる、ビデオカメラを提供することである。   SUMMARY OF THE INVENTION Therefore, a main object of the present invention is to provide a video camera that can ensure synchronization between a reproduced image and reproduced sound with a simple circuit configuration.

請求項1の発明は、イメージセンサによって撮影された被写体の動画像信号とマイクロフォンによって取り込まれた音声信号とを記録媒体に記録するビデオカメラにおいて、動画像信号を形成する各画面の静止画像信号をラスタ走査態様でモニタに向けて出力する第1画像出力手段、第1画像出力手段によって走査されている画素位置を間欠的に検出する第1検出手段、および第1検出手段によって検出された画素位置を第1検出手段による検出時点でマイクロフォンによって取り込まれた音声信号に割り当てる割り当て手段を備えることを特徴とする、ビデオカメラである。   According to a first aspect of the present invention, there is provided a video camera for recording a moving image signal of a subject photographed by an image sensor and an audio signal captured by a microphone on a recording medium. First image output means for output to the monitor in a raster scanning manner, first detection means for intermittently detecting pixel positions scanned by the first image output means, and pixel positions detected by the first detection means A video camera comprising: assigning means for assigning to the audio signal captured by the microphone at the time of detection by the first detecting means.

請求項1の発明では、第1画面出力手段が動画像信号を形成する各画面の静止画像信号をラスタ走査態様でモニタに向けて出力し、第1検出手段が第1画像出力手段によって走査されている画素位置を間欠的に検出する。そして、割り当て手段が第1検出手段によって検出された画素位置を第1検出手段による検出時点でマイクロフォンによって取り込まれた音声信号に割り当てる。したがって、再生時に、音声信号に割り当てられた画素位置と現在再生(走査)されている静止画像信号の画素位置とを比較することによって再生画像と再生音声との同期を確保することができる。   In the first aspect of the invention, the first screen output means outputs the still image signal of each screen forming the moving image signal to the monitor in a raster scanning manner, and the first detection means is scanned by the first image output means. The detected pixel position is detected intermittently. Then, the assigning means assigns the pixel position detected by the first detecting means to the audio signal captured by the microphone at the time of detection by the first detecting means. Therefore, at the time of reproduction, synchronization between the reproduced image and the reproduced audio can be ensured by comparing the pixel position assigned to the audio signal with the pixel position of the still image signal currently reproduced (scanned).

請求項2の発明は、マイクロフォンによって取り込まれた音声信号の記録に先立って所定量毎の符号化処理を施す符号化手段をさらに備え、第1検出手段は所定量の音声信号が取り込まれる毎に画素位置を検出する、請求項1記載のビデオカメラである。   The invention of claim 2 further comprises encoding means for performing encoding processing for each predetermined amount prior to recording of the audio signal captured by the microphone, and the first detecting means is provided each time a predetermined amount of the audio signal is captured. The video camera according to claim 1, wherein the video camera detects a pixel position.

請求項2の発明では、符号化手段がマイクロフォンによって取り込まれた音声信号の記録に先立って所定量毎の音声信号に対して符号化処理を施し、第1検出手段は所定量の音声信号が取り込まれる毎に走査されている画素位置を検出する。したがって、音声信号が取り込まれた時点での画素位置が音声信号に割り当てられる。   According to the second aspect of the present invention, the encoding means performs an encoding process on the audio signal for each predetermined amount prior to recording of the audio signal captured by the microphone, and the first detecting means captures the predetermined amount of the audio signal. Each time a pixel is scanned, the position of the scanned pixel is detected. Therefore, the pixel position at the time when the audio signal is captured is assigned to the audio signal.

請求項3の発明は、記録媒体から読み出された動画像信号を形成する各画像の静止画像信号をラスタ走査態様でモニタに向けて出力する第2画像出力手段、記録媒体から読み出された音声信号をスピーカに向けて出力する音声出力手段、音声出力手段によって出力される音声信号に割り当てられた画素位置を検出する第2検出手段、第2検出手段の検出時点で第2画像出力手段によって走査されている画素位置と第2検出手段によって検出された画素位置とのずれを判別する判別手段、および第2画像出力手段によって出力される静止画像信号の画面数を判別手段の判別結果に応じて調整する調整手段をさらに備える、請求項1または2記載のビデオカメラである。   According to a third aspect of the present invention, the second image output means for outputting the still image signal of each image forming the moving image signal read from the recording medium toward the monitor in a raster scanning manner, read from the recording medium Audio output means for outputting an audio signal to a speaker, second detection means for detecting a pixel position assigned to the audio signal output by the audio output means, and second image output means at the time of detection by the second detection means A discriminating unit that discriminates a deviation between the pixel position being scanned and the pixel position detected by the second detecting unit, and the number of still image signals output by the second image output unit according to the discrimination result The video camera according to claim 1, further comprising adjusting means for adjusting the image.

請求項3の発明では、第2画像出力手段が記録媒体から読み出された動画像信号を形成する各画像の静止画像信号をラスタ走査態様でモニタに向けて出力し、音声出力手段が記録媒体から読み出された音声信号をスピーカに向けて出力する。第2検出手段が音声出力手段によって出力される音声信号に割り当てられた画素位置を検出する。判別手段が第2検出手段の検出時点で第2画像出力手段によって走査されている画素位置と第2検出手段によって検出された画素位置とのずれを判別する。そして、調整手段は第2画像出力手段によって出力される静止画像信号の画面数を判別手段の判別結果に応じて調整する。したがって、音声と画像との同期のずれを画素位置レベルで検出し、ずれに応じて画像の枚数を調整することによって音声と画像との同期を確保することができる。   In the invention of claim 3, the second image output means outputs the still image signal of each image forming the moving image signal read from the recording medium to the monitor in a raster scanning manner, and the audio output means is the recording medium. The audio signal read from is output to the speaker. The second detection means detects the pixel position assigned to the audio signal output by the audio output means. The discriminating unit discriminates a deviation between the pixel position scanned by the second image output unit and the pixel position detected by the second detecting unit at the time of detection by the second detecting unit. The adjusting means adjusts the number of still image signals output from the second image output means according to the determination result of the determining means. Therefore, the synchronization between the sound and the image can be ensured by detecting the synchronization shift between the sound and the image at the pixel position level and adjusting the number of images according to the shift.

請求項4の発明は、動画像信号は1画面ずつ符号化された状態で記録媒体に記録され、第2画像出力手段は各画面の符号化静止画像信号を復号命令に応答して復号する復号手段を含み、調整手段は復号命令の発生タイミングを制御する、請求項3記載のビデオカメラである。 According to a fourth aspect of the present invention, a moving image signal is recorded on a recording medium in a state of being encoded for each screen, and the second image output means decodes the encoded still image signal of each screen in response to a decoding command. It includes means, adjusting means for controlling the generation timing of the decoding instructions, a video camera according to claim 3 Symbol placement.

請求項4の発明では、動画像信号は1画面ずつ符号化された状態で記録媒体に記録され、復号手段が各画面の符号化静止画像信号を復号命令に応じて復号する。そして、調整手段が復号手段に与える復号命令の発生タイミングを制御する。したがって、符号化静止画像信号の復号のタイミングを制御することによって、音声と画像との同期のずれを調整し、同期を確保することができる。   According to the fourth aspect of the present invention, the moving image signal is recorded on the recording medium in a state of being encoded one screen at a time, and the decoding means decodes the encoded still image signal of each screen in accordance with the decoding command. Then, the generation timing of the decoding instruction given to the decoding unit by the adjusting unit is controlled. Therefore, by controlling the decoding timing of the encoded still image signal, it is possible to adjust the synchronization deviation between the sound and the image and ensure the synchronization.

請求項5の発明は、復号手段は、復号命令に応答して復号された静止画像信号を第1メモリに書き込み、かつ第1メモリに格納された静止画像信号を所定周期で第1メモリから読み出す、請求項4記載のビデオカメラである。   The decoding means writes the still image signal decoded in response to the decoding command to the first memory, and reads the still image signal stored in the first memory from the first memory at a predetermined cycle. 5. A video camera according to claim 4.

請求項5の発明では、復号手段は、復号命令に応答して復号した静止画像信号をバッファである第1メモリに書き込み、第1メモリに書き込まれた静止画像信号を一定の周期で第1メモリから読み出す。第1メモリに書き込まれた静止画像信号が再生されるので、復号手段に与える復号命令の周期を第1メモリに書き込まれた静止画像信号を読み出す周期よりも短くしたり長くしたりすることによって、再生される動画像を見かけ上スキップしたり停止したりして音声との同期を調整することができる。   In the invention of claim 5, the decoding means writes the still image signal decoded in response to the decoding command to the first memory which is a buffer, and the still image signal written in the first memory is written to the first memory at a constant cycle. Read from. Since the still image signal written in the first memory is reproduced, the cycle of the decoding command given to the decoding means is made shorter or longer than the cycle of reading the still image signal written in the first memory, It is possible to adjust the synchronization with the sound by apparently skipping or stopping the reproduced moving image.

請求項6の発明は、調整手段は、画面数を増大させるとき復号命令の発生周期を延長し、画面数を減少させるとき復号命令の発生周期を短縮する、請求項4または5記載のビデオカメラである。   6. The video camera according to claim 4, wherein the adjusting means extends the decoding command generation cycle when increasing the number of screens, and shortens the decoding command generation cycle when decreasing the number of screens. It is.

請求項6の発明では、調整手段は、画像数を増大させるとき画像の復号命令の発生周期を延長し、画面数を減少させるとき復号命令の発生周期を短縮する。つまり、復号命令の発生周期を第1メモリからの静止画像信号の読み出し周期よりも長くすると、第1メモリに記録されている静止画像信号が更新されないうちに第1メモリから静止画像信号が読み出されるので同一画像が再生されて画面数が増大する。これによって画像の表示が一時停止されて音声が画像に追いつくことができる。逆に、復号命令の発生周期を第1メモリからの静止画像信号の読み出し周期よりも短くすると、第1メモリから静止画像信号が読み出される前に第1メモリの内容が上書きされるので、第1メモリから読み出される静止画像信号は1画面分スキップされる。したがって、再生される画面数が減少する。これによって、音声に対する画像の遅れを取り戻すことができる。   According to the sixth aspect of the present invention, the adjusting means extends the generation cycle of the image decoding command when increasing the number of images, and shortens the generation cycle of the decoding command when decreasing the number of screens. That is, if the generation cycle of the decoding command is longer than the read cycle of the still image signal from the first memory, the still image signal is read from the first memory before the still image signal recorded in the first memory is updated. Therefore, the same image is reproduced and the number of screens increases. As a result, the display of the image is paused and the sound can catch up with the image. On the contrary, if the generation cycle of the decoding instruction is made shorter than the reading cycle of the still image signal from the first memory, the contents of the first memory are overwritten before the still image signal is read from the first memory. The still image signal read from the memory is skipped for one screen. Therefore, the number of screens to be played is reduced. Thereby, the delay of the image with respect to the sound can be recovered.

請求項7の発明は、第2画像出力手段は、復号手段から出力された静止画像信号を第2メモリに書き込む書き込み手段、および第2メモリに格納された静止画像信号を読み出す読み出し手段をさらに含む、請求項4ないし6に記載のビデオカメラである。   The second image output means further includes a writing means for writing the still image signal output from the decoding means to the second memory, and a reading means for reading the still image signal stored in the second memory. A video camera according to any one of claims 4 to 6.

請求項7の発明では、書き込み手段が復号手段から出力された静止画像信号をSDRAMなどの第2メモリに書き込み、読み出し手段が第2メモリに書き込まれた静止画像信号を読み出す。こうして第2メモリに書き込まれた静止画像信号が読み出されて再生される。   According to another aspect of the invention, the writing means writes the still image signal output from the decoding means to a second memory such as an SDRAM, and the reading means reads the still image signal written to the second memory. In this way, the still image signal written in the second memory is read and reproduced.

請求項8の発明は、第2メモリは第1エリアおよび第2エリアを含み、書き込み手段は復号手段から出力された静止画像信号を第1エリアおよび第2エリアに交互に書き込み、読み出し手段は静止画像信号を第1エリアおよび第2エリアから交互に読み出す、請求項7記載のビデオカメラである。   According to an eighth aspect of the present invention, the second memory includes a first area and a second area, the writing means alternately writes still image signals output from the decoding means to the first area and the second area, and the reading means is stationary. The video camera according to claim 7, wherein image signals are alternately read from the first area and the second area.

請求項8の発明では、第2メモリは第1エリアおよび第2エリアを含んでいる。そして、書き込み手段は復号手段のバッファ(第1メモリ)から出力された静止画像信号を第1エリアおよび第2エリアに交互に書き込み、読み出し手段は静止画像信号を第1エリアおよび第2エリアから交互に読み出す。   According to an eighth aspect of the present invention, the second memory includes a first area and a second area. The writing means alternately writes the still image signal output from the buffer (first memory) of the decoding means to the first area and the second area, and the reading means alternately writes the still image signal from the first area and the second area. Read to.

請求項9の発明は、書き込み手段による書き込みと読み出し手段による読み出しとは相補的に行われる、請求項8記載のビデオカメラである。   The invention of claim 9 is the video camera according to claim 8, wherein the writing by the writing means and the reading by the reading means are performed in a complementary manner.

請求項9の発明では、書き込み手段による第2メモリへの書き込みと読み出し手段による第2メモリからの読み出しとは相補的に行われる。したがって、第2メモリにおける書き込みアドレスに対する読み出しアドレスの追い越しが発生しないので再生画面にフレームのずれが出現することがない。   In the invention of claim 9, the writing to the second memory by the writing means and the reading from the second memory by the reading means are performed in a complementary manner. Accordingly, since the overtaking of the read address with respect to the write address in the second memory does not occur, no frame shift appears on the playback screen.

請求項10の発明は、動画像信号はMPEG4方式に従って符号化される、請求項4ないし9のいずれかに記載のビデオカメラである。   A tenth aspect of the present invention is the video camera according to any one of the fourth to ninth aspects, wherein the moving image signal is encoded according to the MPEG4 system.

請求項10の発明では、動画像信号はMPEG4方式に従って符号化される。   In the invention of claim 10, the moving image signal is encoded according to the MPEG4 system.

この発明によれば、動画像データの画素位置に基づいて動画像データの再生タイミングを制御するので、時計回路を必要としないのでより簡単な回路構成によって動画像データと音声データとの同期を実現することができる。   According to the present invention, since the reproduction timing of the moving image data is controlled based on the pixel position of the moving image data, a clock circuit is not required, and synchronization of the moving image data and the audio data is realized with a simpler circuit configuration. can do.

この発明の上述の目的,その他の目的,特徴および利点は、図面を参照して行う以下の実施例の詳細な説明から一層明らかとなろう。   The above object, other objects, features and advantages of the present invention will become more apparent from the following detailed description of embodiments with reference to the drawings.

図1に示すこの発明の一実施例であるビデオカメラ10は、タイムスタンプを用いることなく画像(動画)データおよび音声データの同期を確保しようとするものである。再生時に画像と音声との同期を取るために、記録時に音声データにこの音声データの入力タイミングにおいて表示されているスルー画像データのフィールド番号情報,垂直ライン位置情報および水平画素位置情報(これらを“同期サンプル情報”と呼ぶ)を付加する。そして、再生時には、音声フレームから同期サンプル情報を取り出し、取り出された同期サンプル情報と、現在再生されている画像のフィールド番号,垂直ライン位置および水平画素位置とから音声と画像との同期のずれを算出する。このずれが許容範囲を超えるときには、画像を一時停止するかもしくは画像をスキップすることによって画面数を調整してずれを修正する。   A video camera 10 according to an embodiment of the present invention shown in FIG. 1 is intended to ensure synchronization of image (moving image) data and audio data without using a time stamp. In order to synchronize the image and sound during playback, the field number information, the vertical line position information, and the horizontal pixel position information of the through-image data displayed at the time of input of the sound data are added to the sound data at the time of recording. "Synchronized sample information"). At the time of reproduction, the synchronization sample information is extracted from the audio frame, and the synchronization deviation between the audio and the image is detected from the extracted synchronization sample information and the field number, vertical line position, and horizontal pixel position of the currently reproduced image. calculate. When this deviation exceeds the allowable range, the number of screens is adjusted by temporarily stopping the image or skipping the image to correct the deviation.

この実施例のビデオカメラ10では、上述の構成によって画像と音声との同期をとるので、従来とは違って時計回路が必要でなく、簡単な回路構成で画像と音声との同期を実現できる。   In the video camera 10 of this embodiment, since the image and the sound are synchronized with the above-described configuration, a clock circuit is not required unlike the conventional one, and the synchronization between the image and the sound can be realized with a simple circuit configuration.

図1を参照して、ビデオカメラ10は、イメージセンサ12を含む。被写界の光学像は、図示しない光学レンズを介してこのイメージセンサ12の受光面に照射される。   With reference to FIG. 1, a video camera 10 includes an image sensor 12. The optical image of the object scene is irradiated onto the light receiving surface of the image sensor 12 through an optical lens (not shown).

オペレータが操作パネル42に設けられたモード切換スイッチ42mdによってカメラモードを選択すると、CPU40によってスルー画像処理が実行される。イメージセンサ12は被写界の生画像信号を1/30秒ごとに出力し、CDS/AGC/AD回路14は出力された生画像信号にノイズ除去,レベル調整およびA/D変換の一連の処理を実行する。CDS/AGC/AD回路14からはディジタル信号である生画像データが出力される。信号処理回路16は、出力された生画像データに白バランス調整,色分離,YUV変換などの信号処理を施し、これによってYUV形式の画像データが生成される。生成された画像データは、メモリ制御回路32によってSDRAM30の伸長画像記録領域に書き込まれる。伸長画像記録領域は、AおよびBの2つのバンクに区切られており、画像データの第1フレームは、まず、バンクAに書き込まれる。1/30秒ごとにバンクが切り換えられ、第2フレームはバンクBに書き込まれ、第3フレームは再びバンクAに書き込まれる。   When the operator selects the camera mode with the mode switch 42md provided on the operation panel 42, the CPU 40 executes through image processing. The image sensor 12 outputs a raw image signal of the object scene every 1/30 seconds, and the CDS / AGC / AD circuit 14 performs a series of processes of noise removal, level adjustment and A / D conversion on the output raw image signal. Execute. The CDS / AGC / AD circuit 14 outputs raw image data that is a digital signal. The signal processing circuit 16 performs signal processing such as white balance adjustment, color separation, and YUV conversion on the output raw image data, thereby generating YUV format image data. The generated image data is written into the expanded image recording area of the SDRAM 30 by the memory control circuit 32. The expanded image recording area is divided into two banks A and B, and the first frame of image data is first written in bank A. Banks are switched every 1/30 seconds, the second frame is written to bank B, and the third frame is written to bank A again.

ビデオエンコーダ22は、SDRAM30のバンクに書き込まれた画像データを1/60秒ごとにメモリ制御回路32を通してプログレッシブ方式で読み出す。まずバンクAから画像データを読み出し、次にバンクBから画像データを読み出す。SDRAM30のバンクAもしくはバンクBから読み出された画像データはビデオエンコーダ22によってコンポジットビデオ信号に変換されて640画素×240ラインのサイズに縮小される。この縮小されたコンポジットビデオ信号が疑似インタレーススキャン方式でLCD24に与えられる。これによって、1/60秒(16.6ミリ秒)に1フィールドの割合で画像がLCD24に表示される。   The video encoder 22 reads the image data written in the bank of the SDRAM 30 through the memory control circuit 32 in a progressive manner every 1/60 seconds. First, image data is read from bank A, and then image data is read from bank B. The image data read from the bank A or bank B of the SDRAM 30 is converted into a composite video signal by the video encoder 22 and reduced to a size of 640 pixels × 240 lines. The reduced composite video signal is given to the LCD 24 by a pseudo interlace scan method. As a result, an image is displayed on the LCD 24 at a rate of 1 field per 1/60 seconds (16.6 milliseconds).

また、ビデオエンコーダ22では、現フィールドの何ライン目までの描画が終了したかをVカウンタ22vを用いてカウントし、現ラインの何画素目までを描画し終えたかをHカウンタ22hを用いてカウントしている。Vカウンタ22vの最高値は240であり、Hカウンタ22hの最高値は640である。   The video encoder 22 uses the V counter 22v to count how many lines in the current field have been drawn, and counts how many pixels in the current line have been drawn using the H counter 22h. is doing. The maximum value of the V counter 22v is 240, and the maximum value of the H counter 22h is 640.

操作パネル42に設けられたシャッタボタン42stがオペレータによって操作されると、CPU40は、信号処理回路20を能動化するとともに、画像圧縮(符号化)命令および音声圧縮(符号化)命令の各々を周期的にMPEG−4コーデック34に与える。   When the shutter button 42st provided on the operation panel 42 is operated by the operator, the CPU 40 activates the signal processing circuit 20, and cycles each of an image compression (encoding) command and an audio compression (encoding) command. Thus, the MPEG-4 codec 34 is provided.

能動化された信号処理回路20は、マイクロフォン18から入力される音声信号を48kHzの周期でサンプリングしてディジタル信号である音声データに変換し、この音声データをメモリ制御回路32を通してSDRAM30に書き込む。48kHzのサンプリング処理では、1024サンプルによって約21ミリ秒分の音声データが生成される。詳しくは後述するが、音声データは1024サンプル単位で音声フレームというデータに加工される。CPU40は、SDRAM30への音声データの書き込み量を監視しており、1024サンプル分の音声データの書き込みが開始されるごとに、書き込み開始のタイミングでビデオエンコーダ22からVカウンタ22vのカウント値(垂直ライン位置情報)およびHカウンタ22hのカウント値(水平画素位置情報)を取得する。   The activated signal processing circuit 20 samples the audio signal input from the microphone 18 at a cycle of 48 kHz, converts it into audio data that is a digital signal, and writes this audio data to the SDRAM 30 through the memory control circuit 32. In the 48 kHz sampling process, about 21 milliseconds of audio data are generated by 1024 samples. As will be described in detail later, the audio data is processed into data called audio frames in units of 1024 samples. The CPU 40 monitors the amount of audio data written to the SDRAM 30, and each time writing of audio data for 1024 samples is started, the count value (vertical line) of the V counter 22v from the video encoder 22 is written at the start timing of writing. Position information) and the count value (horizontal pixel position information) of the H counter 22h are acquired.

また、CPU40はLCD24に表示されるスルー画像の画像フィールド番号を画像の表示開始時からフィールドカウンタ40fによってカウントしている。このフィールドカウンタ40fのカウント値(フィールド番号情報)は、ビデオエンコーダ22から取得された垂直ライン位置情報および水平画素位置情報とともに、1024サンプルごとの音声データに対応付けられてRAM46上のテーブル46tに記録される。   The CPU 40 counts the image field number of the through image displayed on the LCD 24 by the field counter 40f from the start of image display. The count value (field number information) of the field counter 40f is recorded in the table 46t on the RAM 46 in association with the audio data for every 1024 samples together with the vertical line position information and the horizontal pixel position information acquired from the video encoder 22. Is done.

画像フィールドは1/60秒(16.6ミリ秒)ごとに生成され、音声フレームは21ミリ秒ごとに生成されるため、画像フィールドと音声フレームとの発生タイミングは図2に示すようになる。図2からわかるように、音声フレーム番号と音声フレームに同期サンプル情報として付加されるフィールド番号(情報)とは1対1の対応関係にはない。図2の例では、フィールド番号“4”が添付される音声フレームは存在しない。   Since the image field is generated every 1/60 seconds (16.6 milliseconds) and the audio frame is generated every 21 milliseconds, the generation timing of the image field and the audio frame is as shown in FIG. As can be seen from FIG. 2, there is no one-to-one correspondence between the audio frame number and the field number (information) added as synchronization sample information to the audio frame. In the example of FIG. 2, there is no audio frame to which the field number “4” is attached.

MPEG−4コーデック34は、画像圧縮命令が与えられると、メモリ制御回路32を通してSDRAM30から音声データを随時読み出し、読み出した画像データにMPEG−4圧縮を施す。1回の画像圧縮命令によって1フレームの画像データが圧縮される。MPEG−4圧縮によって再生された圧縮画像データはメモリ制御回路32を通して再びSDRAM30に書き込まれる。   When an image compression command is given, the MPEG-4 codec 34 reads audio data from the SDRAM 30 through the memory control circuit 32 as needed, and performs MPEG-4 compression on the read image data. One frame of image data is compressed by one image compression command. The compressed image data reproduced by the MPEG-4 compression is written again into the SDRAM 30 through the memory control circuit 32.

また、MPEG−4コーデック34は、音声圧縮命令が与えられると、メモリ制御回路32を通してSDRAM30から音声データを随時読み出す。そして、読み出した音声データにMPEG−4圧縮を施す。1回の音声圧縮命令によって1024サンプルの音声データが圧縮される。MPEG−4圧縮によって生成された圧縮音声データはメモリ制御回路32を通して再びSDRAM30に書き込まれる。   The MPEG-4 codec 34 reads audio data from the SDRAM 30 through the memory control circuit 32 as needed when an audio compression command is given. Then, MPEG-4 compression is performed on the read audio data. The audio data of 1024 samples is compressed by one audio compression command. The compressed audio data generated by the MPEG-4 compression is written into the SDRAM 30 again through the memory control circuit 32.

シャッタボタン42stが再度押されない限り、CPU40は、MPEG−4コーデック34に画像圧縮命令および音声圧縮命令を繰り返し与え、信号処理回路20を能動化し続ける。これによって、圧縮画像データおよび圧縮音声データがSDRAM30に蓄積されてゆく。   Unless the shutter button 42st is pressed again, the CPU 40 repeatedly gives an image compression command and an audio compression command to the MPEG-4 codec 34 and keeps the signal processing circuit 20 activated. As a result, the compressed image data and the compressed audio data are accumulated in the SDRAM 30.

メモリカード38には、最初のシャッタボタン42stの操作に応答してMPEGファイルが新規に作成される。CPU40は、上述の圧縮処理の出力と並行して、SDRAM30に蓄積された圧縮画像データおよび圧縮音声データをメモリ制御回路32を通して読み出す。読み出された圧縮画像データおよび圧縮音声データは、I/F36を通してメモリカード38に与えられて記録される。   In the memory card 38, an MPEG file is newly created in response to the first operation of the shutter button 42st. The CPU 40 reads the compressed image data and the compressed audio data stored in the SDRAM 30 through the memory control circuit 32 in parallel with the output of the above-described compression processing. The read compressed image data and compressed audio data are given to the memory card 38 through the I / F 36 and recorded.

圧縮音声データは、SDRAM30から読み出されてメモリカード38に記録されるときに、図3に示すように、1024サンプルごとに音声データヘッダを有する音声フレームという単位にまとめられる。1024サンプルの音声データが音声フレームにまとめられると、RAM46に形成されたテーブル46tを参照して当該1024サンプルの音声データに対応する同期サンプル情報が特定され、特定された同期サンプル情報が音声フレームに付加される。図3には音声フレームが連続した状態で示されているが、メモリカード38に形成されるMPEGファイルには、圧縮画像データと圧縮音声データとが混在した状態で記録される。   When the compressed audio data is read from the SDRAM 30 and recorded on the memory card 38, the audio data is grouped into units of audio frames having an audio data header every 1024 samples, as shown in FIG. When the audio data of 1024 samples is collected into an audio frame, the synchronization sample information corresponding to the audio data of the 1024 samples is identified with reference to the table 46t formed in the RAM 46, and the identified synchronization sample information is included in the audio frame. Added. Although FIG. 3 shows a state in which audio frames are continuous, the MPEG file formed on the memory card 38 is recorded with a mixture of compressed image data and compressed audio data.

圧縮画像データおよび圧縮音声データの記録が終了すると、総ファイルサイズ,総フレーム数,総音声サイズ,フレームレートなどの情報がMPEGファイルのファイルヘッダに書き込まれる。また、ファイルヘッダには第何画像フレームの画像データおよび第何音声フレームの音声データがどのアドレスに記録されているかとう情報を保持したテーブルが含まれている。このテーブルを参照することによって所望のフレームの画像データおよび音声データを読み出すことができる。   When the recording of the compressed image data and the compressed audio data is completed, information such as the total file size, the total number of frames, the total audio size, and the frame rate is written in the file header of the MPEG file. In addition, the file header includes a table holding information such as which address the image data of which image frame and the audio data of which audio frame are recorded at. By referring to this table, image data and audio data of a desired frame can be read out.

シャッタボタン42stがオペレータによって操作されると、CPU40は、信号処理回路20を不能化し、MPEG−4コーデック34への圧縮命令の出力を停止する。これによって、圧縮画像データおよび圧縮音声データの生成が終了し、その後、メモリカード38への圧縮画像データおよび圧縮音声データの書き込みが終了する。   When the shutter button 42st is operated by the operator, the CPU 40 disables the signal processing circuit 20 and stops outputting the compression command to the MPEG-4 codec 34. Thereby, the generation of the compressed image data and the compressed audio data is completed, and then the writing of the compressed image data and the compressed audio data to the memory card 38 is completed.

このように、MPEGファイルに記録された音声データは1024サンプルごとに音声フレームという単位にまとめられ、各音声フレームには1024サンプルの音声データがSDRAM30に記録され始めたタイミングの画像データのフィールド番号,垂直ライン位置および水平画素位置を示す情報(同期サンプル情報)が付加されている。   As described above, the audio data recorded in the MPEG file is grouped into units called audio frames every 1024 samples, and in each audio frame, the field number of the image data at the timing when the audio data of 1024 samples starts to be recorded in the SDRAM 30, Information (synchronous sample information) indicating the vertical line position and the horizontal pixel position is added.

オペレータがモード切換スイッチ42mdによって再生モードを選択し、かつ、ファイル選択キー42fsによって所望のMPEGファイルを選択すると、CPU40は、ファイルヘッダに含まれる上述のテーブルを参照して、第1フレームである圧縮画像データおよび第1音声フレームである圧縮音声データをメモリカード38から読み出す。読み出された圧縮画像データおよび圧縮音声データはメモリ制御回路32を通してSDRAM30に書き込まれる。   When the operator selects the playback mode with the mode switch 42md and selects the desired MPEG file with the file selection key 42fs, the CPU 40 refers to the above-mentioned table included in the file header and compresses the first frame. Image data and compressed audio data as the first audio frame are read from the memory card 38. The read compressed image data and compressed audio data are written into the SDRAM 30 through the memory control circuit 32.

CPU40はまた、MPEG−4コーデック34に画像伸長(復号)命令および音声伸長(復号)命令を繰り返し与える。画像伸長命令は1/30秒(33ミリ秒)ごとに発行され、音声伸長命令は21ミリ秒ごとに発行される。   The CPU 40 also repeatedly gives the MPEG-4 codec 34 an image expansion (decoding) instruction and an audio expansion (decoding) instruction. An image decompression command is issued every 1/30 seconds (33 milliseconds), and an audio decompression command is issued every 21 milliseconds.

CPU40から音声伸長命令が与えられると、MPEG−4コーデック34は、メモリ制御回路32を通して圧縮音声データをSDRAM30から読み出し、読み出した圧縮音声データにMPEG−4伸長を施す。1回の音声伸長命令によって1フレームの圧縮音声データが伸長される。伸長された音声データは、メモリ制御回路32を通して再びSDRAM30に書き込まれる。信号処理回路26は、伸長音声データをメモリ制御回路32を通して読み出し、読み出した伸長音声データをアナログ信号に変換し、そして、変換した音声データをスピーカ28に与える。これによって、再生音声がスピーカ28から出力される。圧縮音声データは、順次メモリカード38から読み出され、MPEG−4コーデック34によって伸長されて、スピーカ28から出力される。これによって、途切れることなく音声がスピーカ28から出力される。   When an audio decompression command is given from the CPU 40, the MPEG-4 codec 34 reads compressed audio data from the SDRAM 30 through the memory control circuit 32, and performs MPEG-4 decompression on the read compressed audio data. One frame of compressed audio data is expanded by one audio expansion command. The expanded audio data is written into the SDRAM 30 again through the memory control circuit 32. The signal processing circuit 26 reads the decompressed audio data through the memory control circuit 32, converts the read decompressed audio data into an analog signal, and gives the converted audio data to the speaker 28. As a result, the reproduced sound is output from the speaker 28. The compressed audio data is sequentially read from the memory card 38, decompressed by the MPEG-4 codec 34, and output from the speaker 28. As a result, sound is output from the speaker 28 without interruption.

また、MPEG−4コーデック34は、CPU40から画像伸長命令が与えられると、メモリ制御回路32を通して圧縮画像データをSDRAM30から読み出す。読み出した圧縮画像データはMPEG−4伸長が施される。1回の画像伸長命令によって1フレームの圧縮画像データが伸長される。伸長された画像データはMPEG−4コーデック34が備えるバッファ34a(第1メモリ)に蓄積される。 バッファ34aに蓄積された1フレームの画像データは、1/30秒(33ミリ秒)ごとに読み出され、メモリ制御回路32を通してSDRAM30の伸長画像記録領域(第2メモリ)に記録される。伸長画像記録領域は、上述したように、AおよびBの2つのバンクに区切られており、伸長された画像データは、まず、バンクA(第1エリア)に記録される。1/30秒ごとにバンクが切り換えられ、次に伸長された第2画像フレームはバンクB(第2エリア)に記録され、第3画像フレームは再びバンクAに記録される。   The MPEG-4 codec 34 reads compressed image data from the SDRAM 30 through the memory control circuit 32 when an image decompression command is given from the CPU 40. The read compressed image data is subjected to MPEG-4 decompression. One frame of compressed image data is expanded by one image expansion command. The decompressed image data is stored in a buffer 34a (first memory) included in the MPEG-4 codec 34. One frame of image data stored in the buffer 34a is read every 1/30 seconds (33 milliseconds), and is recorded in the expanded image recording area (second memory) of the SDRAM 30 through the memory control circuit 32. As described above, the expanded image recording area is divided into two banks A and B, and the expanded image data is first recorded in bank A (first area). The bank is switched every 1/30 seconds, and the next expanded second image frame is recorded in bank B (second area), and the third image frame is recorded in bank A again.

ビデオエンコーダ22は、1/60秒ごとにメモリ制御回路32を通してSDRAM30のバンクから伸長された画像データをプログレッシブスキャン方式によって読み出す。まず、バンクAに記録されている画像データを読み出し、次にバンクを切り換えてバンクBに記録されている画像データを読み出す。ビデオエンコーダ22は、SDRAM30から読み出した画像データをコンポジットビデオ信号に変換して640画素×240ラインのサイズに縮小し、縮小した画像データを疑似インタレーススキャン方式でLCD24に与える。この疑似インタレーススキャン方式によって、LCD24には1/60秒に1フィールドの割合で画像が表示される。   The video encoder 22 reads the image data expanded from the bank of the SDRAM 30 through the memory control circuit 32 every 1/60 seconds by the progressive scan method. First, the image data recorded in the bank A is read, then the bank is switched and the image data recorded in the bank B is read. The video encoder 22 converts the image data read from the SDRAM 30 into a composite video signal, reduces the image data to a size of 640 pixels × 240 lines, and supplies the reduced image data to the LCD 24 by a pseudo interlace scan method. By this pseudo interlace scan method, an image is displayed on the LCD 24 at a rate of 1 field per 1/60 seconds.

また、ビデオエンコーダ22は、記録時と同様に再生時においても、Vカウンタ22vおよびHカウンタ22hを用いて、現フィールドの何ライン目までの描画が終了したか、および現ラインの何画素目までを描画し終えたかをそれぞれカウントしている。さらに、第何番目の画像フィールドが描画されているかがCPU40のフィールドカウンタ40fによってカウントされている。   Further, the video encoder 22 uses the V counter 22v and the H counter 22h at the time of reproduction in the same way as at the time of recording, up to which line in the current field has been drawn, and up to which pixel of the current line. Is counted each time. Further, the field counter 40f of the CPU 40 counts what numbered image field is drawn.

図2に示したように、音声フレームと画像フィールドとは1対1の対応関係にないので、音声フレームと画像フィールドとの同期を確保する仕組みが必要になる。音声は1音声フレームずつ順番に逐次の再生を行い、途中でスキップされたり停止されたりすることはない。一方、画像は、現在再生されている画像データの描画位置(フィールドカウンタ40fの値,Vカウンタ22vの値およびHカウンタ22hの値)と音声フレームに付加されている同期サンプル情報(画像フィールド番号情報,垂直ライン位置情報および水平画素位置情報)とから音声フレームと画像フィールドとのずれが算出され、ずれが許容範囲外であるときには、ずれを修正するためにスキップされたり停止されたりする。   As shown in FIG. 2, since there is no one-to-one correspondence between audio frames and image fields, a mechanism for ensuring synchronization between the audio frames and the image fields is required. The audio is sequentially reproduced one by one in an audio frame, and is not skipped or stopped midway. On the other hand, for the image, the drawing position of the currently reproduced image data (the value of the field counter 40f, the value of the V counter 22v and the value of the H counter 22h) and the synchronous sample information (image field number information) added to the audio frame. , Vertical line position information and horizontal pixel position information), the deviation between the audio frame and the image field is calculated, and when the deviation is outside the allowable range, it is skipped or stopped to correct the deviation.

図4を用いてより具体的に説明する。メモリカード38から音声フレームが読み出されると、読み出された音声フレームから同期サンプル情報(画像フィールド番号情報,垂直ライン位置情報および水平画素位置情報)が抽出される。この同期サンプル情報が示す画面上の位置をA点とする。このA点は、この音声フレームがサンプリングされたときに再生されていた画像の画素の位置を示している。つまり、この音声フレームがサンプリングされていたときには、第Xフィールドの第(Xa+1)ラインの第Ya画素が描画されたところであったことを示している。   This will be described more specifically with reference to FIG. When an audio frame is read from the memory card 38, synchronous sample information (image field number information, vertical line position information, and horizontal pixel position information) is extracted from the read audio frame. A position on the screen indicated by the synchronous sample information is defined as A point. This point A indicates the pixel position of the image that was being reproduced when this audio frame was sampled. That is, when this audio frame is sampled, it indicates that the Ya pixel of the (Xa + 1) th line of the Xth field has been drawn.

また、音声フレームから同期サンプル情報が抽出されるタイミングで、CPU40は、ビデオエンコーダ22からVカウンタ22vおよびHカウンタ22hのカウント値を取得する。取得したカウント値とフィールドカウンタ40fのカウント値とが示す位置をB点とする。つまり、音声フレームから同期サンプル情報が抽出された時点では、第Xフィールドの第(Xb+1)ラインの第Yb画素が描画されていたことになる。   Further, the CPU 40 acquires the count values of the V counter 22v and the H counter 22h from the video encoder 22 at the timing when the synchronization sample information is extracted from the audio frame. A position indicated by the acquired count value and the count value of the field counter 40f is defined as a B point. That is, at the time when the synchronous sample information is extracted from the audio frame, the Yb pixel of the (Xb + 1) th line of the Xth field is drawn.

A点とB点とが一致する場合に音声と画像とが記録時と同じタイミングで再生されていることになる。したがって、A点とB点との位置の差が音声と画像との同期のずれとなる。図4の例の場合、画像の再生が音声の再生に比べて、(Xb−Xa)ラインと(Yb−Ya)画素分だけ進んでいることになる。なお、図4の例ではA点とB点とは同一の画像フィールド上に存在するが、A点とB点とが異なる画像フィールド上に存在する場合もある。   When the A point and the B point coincide with each other, the sound and the image are reproduced at the same timing as when recording. Therefore, the difference in position between the point A and the point B is a synchronization shift between the sound and the image. In the case of the example in FIG. 4, the image reproduction is advanced by (Xb−Xa) line and (Yb−Ya) pixels compared to the audio reproduction. In the example of FIG. 4, the point A and the point B exist on the same image field, but the point A and the point B may exist on different image fields.

音声と画像との同期のずれが許容範囲を超える場合はずれの修正を行う。つまり、画像が音声よりも進んでいる場合には画像を1フレーム時間分(1/30秒)だけ停止させ、画像が音声よりも遅れている場合には画像を1フレーム分だけスキップさせる。   If the synchronization deviation between the sound and the image exceeds the allowable range, the deviation is corrected. That is, when the image is ahead of the sound, the image is stopped for one frame time (1/30 second), and when the image is behind the sound, the image is skipped by one frame.

画像を停止させる場合には、CPU40は、1/30秒おきに発生させるMPEG−4コーデック34への画像伸長命令を1回中止する。MPEG−4コーデック34によって伸長された画像データはバッファ34aに格納され、バッファ34aに格納された画像データは1/30秒おきにメモリ制御回路32を通してSDRAM30のバンクAもしくはバンクBに書き込まれる。CPU40が画像伸長命令の発生を1回中止すると、バッファ34aに蓄積されている伸長された画像データは更新されない。したがって、SDRAM30のバンクAもしくはバンクBには前回と同じ画像データが書き込まれる。つまり、バンクAとバンクBには同じ画像データが書き込まれた状態となる。   When stopping the image, the CPU 40 stops the image decompression command to the MPEG-4 codec 34 generated every 1/30 seconds once. The image data expanded by the MPEG-4 codec 34 is stored in the buffer 34a, and the image data stored in the buffer 34a is written into the bank A or the bank B of the SDRAM 30 through the memory control circuit 32 every 1/30 seconds. When the CPU 40 stops generating the image decompression command once, the decompressed image data stored in the buffer 34a is not updated. Therefore, the same image data as the previous time is written in the bank A or bank B of the SDRAM 30. That is, the same image data is written in bank A and bank B.

このため、ビデオエンコーダ22は、バンクは異なるものの2回続けて同じ画像データを読み出して再生することになる。したがって、LCD24には前回と同じ画像が表示され、見かけ上画像が1フレーム時間分停止されることになる。   For this reason, the video encoder 22 reads and reproduces the same image data twice in succession although the banks are different. Therefore, the same image as the previous one is displayed on the LCD 24, and the image is apparently stopped for one frame time.

一方、画像をスキップさせる場合には、CPU40は、通常1/30秒に1回発生させるMPEG−4コーデック34への画像伸長命令を1/30秒の間に2回発生させる。すると、1/30秒に1回読み出されてSDRAM30のバンクに書き込まれるバッファ34aの内容が、読み出される前に次の伸長画像データによって上書きされる。このためSDRAM30のバンクAもしくはバンクBにはバッファ34aに上書きされた画像データが書き込まれる。そして、この上書きされた画像データがビデオエンコーダ22によって読み出されて再生される。したがって、連続した画像フレームがMPEG−4コーデック34によって伸長されるが、LCD24には1フレーム分スキップされて画像が表示される。このようにして音声と画像とのずれが修正され、同期が保たれる。   On the other hand, when skipping an image, the CPU 40 generates an image decompression command to the MPEG-4 codec 34, which is normally generated once every 1/30 seconds, twice during 1/30 seconds. Then, the contents of the buffer 34a read once every 1/30 seconds and written to the bank of the SDRAM 30 are overwritten by the next decompressed image data before being read. Therefore, the overwritten image data in the buffer 34 a is written into the bank A or bank B of the SDRAM 30. The overwritten image data is read by the video encoder 22 and reproduced. Therefore, although continuous image frames are decompressed by the MPEG-4 codec 34, an image is displayed on the LCD 24 with one frame skipped. In this way, the deviation between the sound and the image is corrected, and synchronization is maintained.

以下に、図5から図10に示すフロー図を用いて、画像圧縮タスク,音声取込タスク,音声圧縮タスク,音声再生タスクおよび画像再生タスクにおけるCPU40の動作について説明する。なお、画像圧縮タスク,音声取込タスクおよび音声圧縮タスクは同時に平行して実行され、音声再生タスクおよび画像再生タスクは同時に平行して実行される。また、CPU40はフラッシュメモリ44に格納されているプログラムにしたがって動作する。   Hereinafter, the operations of the CPU 40 in the image compression task, the audio capture task, the audio compression task, the audio reproduction task, and the image reproduction task will be described using the flowcharts shown in FIGS. Note that the image compression task, the audio capture task, and the audio compression task are executed in parallel at the same time, and the audio reproduction task and the image reproduction task are executed in parallel at the same time. The CPU 40 operates according to a program stored in the flash memory 44.

画像圧縮タスクにおけるCPU40の動作は図5のフロー図に示される。まず、CPU40は、ステップS1において、オペレータによって記録開始操作が行われたかどうかを判断する。ステップS1においてYESと判断すると、次にステップS3において、記録開始操作から1/30秒が経過するまで待機する。この1/30秒の待機は、1フレーム分の画像データが信号処理回路16を経てメモリ制御回路32によってSDRAM30に書き込まれるのを待つためのものである。   The operation of the CPU 40 in the image compression task is shown in the flowchart of FIG. First, in step S1, the CPU 40 determines whether or not a recording start operation has been performed by the operator. If YES is determined in the step S1, then in a step S3, the process waits until 1/30 seconds elapse from the recording start operation. This waiting for 1/30 seconds is for waiting for image data for one frame to be written into the SDRAM 30 by the memory control circuit 32 via the signal processing circuit 16.

ステップS3においてYESと判断すると、ステップS5では、MPEG−4コーデック34に対して画像圧縮命令を与える。すると、MPEG−4コーデック34はメモリ制御回路32を通してSDRAM30から1フレーム分の画像データを読み出してMPEG−4圧縮を施す。そして、圧縮画像データは再びメモリ制御回路32を通してSDRAM30に書き込まれる。SDRAM30に書き込まれた圧縮画像データは別のタスクによって順次メモリカード38に書き込まれる。   If YES is determined in the step S3, an image compression command is given to the MPEG-4 codec 34 in a step S5. Then, the MPEG-4 codec 34 reads image data for one frame from the SDRAM 30 through the memory control circuit 32 and performs MPEG-4 compression. Then, the compressed image data is written into the SDRAM 30 through the memory control circuit 32 again. The compressed image data written in the SDRAM 30 is sequentially written in the memory card 38 by another task.

ステップS5において画像の圧縮命令をMPEG−4コーデック34に対して与えると、ステップS7では、圧縮命令の発生から1/30秒が経過したかどうかを判断する。ステップS7においてYESと判断すると、ステップS5に戻って再びMPEG−4コーデック34に対して画像の圧縮命令を与える。   When an image compression command is given to the MPEG-4 codec 34 in step S5, it is determined in step S7 whether 1/30 seconds have elapsed since the generation of the compression command. If YES is determined in the step S7, the process returns to the step S5 to again give an image compression command to the MPEG-4 codec 34.

ステップS7においてNOと判断すると、ステップS9においてオペレータによって記録停止の操作が行われたかどうかを判断する。ステップS7においてNOと判断するとステップS7に戻り、YESと判断すると画像圧縮タスクを終了する。   If NO is determined in step S7, it is determined in step S9 whether or not a recording stop operation has been performed by the operator. If NO is determined in step S7, the process returns to step S7, and if YES is determined, the image compression task is ended.

音声取込タスクにおけるCPU40の動作は図6のフロー図に示される。まず、CPU40は、ステップS11において、オペレータによって記録開始操作が行われたかどうかを判断する。記録開始操作が行われると、マイクロフォン18から入力された音声が信号処理回路20によって音声データに変換され、この音声データがメモリ制御回路32を通してSDRAM30に書き込まれる。ステップS13では、SDRAM30における音声データの書き込み開始位置(アドレス)を取得してレジスタW1に格納する。なお、レジスタW1に格納されている値を“W1”で表現する。   The operation of the CPU 40 in the voice capturing task is shown in the flowchart of FIG. First, in step S11, the CPU 40 determines whether or not a recording start operation has been performed by the operator. When the recording start operation is performed, the sound input from the microphone 18 is converted into sound data by the signal processing circuit 20, and this sound data is written into the SDRAM 30 through the memory control circuit 32. In step S13, the writing start position (address) of the audio data in the SDRAM 30 is acquired and stored in the register W1. The value stored in the register W1 is expressed as “W1”.

ステップS15では、第1同期サンプル処理を行う。第1同期サンプル処理では、1番目の1024サンプル(第1フレーム)に対応する同期サンプル情報を取得し、取得した同期サンプル情報を当該1024サンプルの音声データに対応させてRAM46のテーブル46tに記録する。つまり、音声データのSDRAM30への書き込みが開始された時点で、ビデオエンコーダ22からVカウンタ22vおよびHカウンタ22hの値を取得し、CPU40がカウントしている画像フィールド番号の値をフィールドカウンタ40fから取得する。   In step S15, a first synchronous sample process is performed. In the first synchronization sample processing, synchronization sample information corresponding to the first 1024 samples (first frame) is acquired, and the acquired synchronization sample information is recorded in the table 46t of the RAM 46 in association with the audio data of the 1024 samples. . That is, at the time when writing of the audio data to the SDRAM 30 is started, the values of the V counter 22v and the H counter 22h are obtained from the video encoder 22, and the value of the image field number counted by the CPU 40 is obtained from the field counter 40f. To do.

ステップS17では、SDRAM30における音声データの現状での書き込み終了位置(アドレス)を取得してレジスタW2に格納する。なお、レジスタW2に格納されている値を“W2”で表現する。   In step S17, the current write end position (address) of the audio data in the SDRAM 30 is acquired and stored in the register W2. The value stored in the register W2 is expressed as “W2”.

ステップS19では、レジスタW1に格納されている値とレジスタW2に格納されている値とから、SDRAM30に書き込まれた音声データのデータ量を算出する。そして、ステップS21では、SDRAM30に書き込まれた音声データの量が1024サンプル分となったかどうかを判断する。   In step S19, the data amount of the audio data written in the SDRAM 30 is calculated from the value stored in the register W1 and the value stored in the register W2. In step S21, it is determined whether or not the amount of audio data written in the SDRAM 30 is 1024 samples.

ステップS21においてNOと判断すると、ステップS17に戻って再び書き込み終了位置を取得する。一方、ステップS21においてYESと判断すると、ステップS23において第1同期サンプル処理を行う。この第1同期サンプル処理では、上述したように、次にSDRAM30に書き込まれる1024サンプル分の音声データに対応する同期サンプル情報を取得して、RAM46に形成されたテーブル46tに記録する。   If NO is determined in step S21, the process returns to step S17 to acquire the write end position again. On the other hand, if YES is determined in the step S21, the first synchronous sample process is performed in a step S23. In the first synchronous sample processing, as described above, synchronous sample information corresponding to 1024 samples of audio data written to the SDRAM 30 is acquired and recorded in the table 46 t formed in the RAM 46.

ステップS25では、次の1024サンプル分の音声データを算出するために、書き込み開始位置(W1)を現状における書き込み終了アドレスの次のアドレス(W2+1)で更新する。そして、ステップS27では、オペレータがシャッタボタン42stを操作して記録終了操作を行ったかどうかを判断する。ステップS27においてNOと判断するとステップS17に戻る。ステップS27でYESと判断すると音声取込タスクを終了する。   In step S25, in order to calculate audio data for the next 1024 samples, the write start position (W1) is updated with the address (W2 + 1) next to the current write end address. In step S27, it is determined whether or not the operator has performed the recording end operation by operating the shutter button 42st. If NO is determined in step S27, the process returns to step S17. If YES is determined in the step S27, the voice capturing task is ended.

音声圧縮タスクにおけるCPU40の動作は図7のフロー図に示される。まず、CPU40は、オペレータが記録開始の操作を行うと、その旨がステップS31において判断される。ステップS33では、記録開始の操作から1024サンプル期間(21ミリ秒)が経過するまで待機する。この待機は、マイクロフォン18から入力された1024サンプル分の音声が信号処理回路20およびメモリ制御回路32を通してSDRAM30に書き込まれるのを待つために行われる。   The operation of the CPU 40 in the voice compression task is shown in the flowchart of FIG. First, when the operator performs a recording start operation, the CPU 40 determines that in step S31. In step S33, the process waits until a 1024 sample period (21 milliseconds) elapses from the recording start operation. This standby is performed in order to wait for the voice of 1024 samples input from the microphone 18 to be written into the SDRAM 30 through the signal processing circuit 20 and the memory control circuit 32.

ステップS33においてYESと判断すると、CPU40は、ステップS35において音声データの圧縮命令をMPEG−4コーデック34に対して与える。これによって、1フレーム、つまり、1024サンプル分の音声データがMPEG−4コーデック34に取り込まれMPEG−4圧縮が施される。圧縮された音声データはメモリ制御回路32を通して再びSDRAM30に書き込まれる。   If YES is determined in the step S33, the CPU 40 gives an audio data compression command to the MPEG-4 codec 34 in a step S35. As a result, audio data for one frame, that is, 1024 samples is taken into the MPEG-4 codec 34 and subjected to MPEG-4 compression. The compressed audio data is written into the SDRAM 30 again through the memory control circuit 32.

音声データの圧縮命令の発行を行うと、ステップS37において、RAM46に形成されたテーブル46tを参照して当該1024サンプルの音声データに対応する同期サンプル情報を取得する。そして、ステップS39において、取得した同期サンプル情報を音声データに付加する。これによって1音声フレームがSDRAM30上に形成される。こうして形成された音声フレームは、別のタスクによって適宜SDRAM30から読み出されてI/F36を通してメモリカード38に書き込まれる。   When the audio data compression command is issued, in step S37, the synchronization sample information corresponding to the 1024 samples of audio data is acquired with reference to the table 46t formed in the RAM 46. In step S39, the acquired synchronous sample information is added to the audio data. As a result, one audio frame is formed on the SDRAM 30. The audio frame formed in this way is read from the SDRAM 30 as appropriate by another task and written to the memory card 38 through the I / F 36.

ステップS41では、ステップS35における音声の圧縮命令の発生から1024サンプル期間(21ミリ秒)が経過したかどうかを判断する。ステップS41においてYESと判断すると、ステップS35に戻って再びMPEG−4コーデック34に音声の圧縮命令を与える。ステップS41においてNOと判断すると、ステップS43において、オペレータがシャッタボタン42stを操作して記録終了操作を行ったかどうかを判断する。ステップS43においてNOと判断するとステップS41に戻る。ステップS43でYESと判断すると音声圧縮タスクを終了する。   In step S41, it is determined whether or not 1024 sample periods (21 milliseconds) have elapsed since the generation of the voice compression command in step S35. If YES is determined in the step S41, the process returns to the step S35 to again give an audio compression command to the MPEG-4 codec 34. If NO is determined in step S41, it is determined in step S43 whether or not the operator has operated the shutter button 42st to perform the recording end operation. If NO is determined in step S43, the process returns to step S41. If YES is determined in the step S43, the voice compression task is ended.

以上に説明した画像圧縮タスク,音声取込タスクおよび音声圧縮タスクによって、メモリカード38に音声データと画像データとを含むMPEGファイルが形成される。次に、音声再生タスクおよび画像再生タスクについて説明する。   The MPEG file including the audio data and the image data is formed on the memory card 38 by the image compression task, the audio capture task, and the audio compression task described above. Next, an audio reproduction task and an image reproduction task will be described.

音声再生タスクにおけるCPU40の動作は図9のフロー図に示される。まず、ステップS51において音声停止フラグがオン状態であるかどうかを判断し、オン状態である場合には音声停止フラグがオフ状態になるまで待機する。音声停止フラグがオフ状態になると、ステップS53において位置特定フラグがオン状態であるかどうかを判断する。   The operation of the CPU 40 in the sound reproduction task is shown in the flowchart of FIG. First, in step S51, it is determined whether or not the voice stop flag is in an on state. If the voice stop flag is in an on state, the process waits until the voice stop flag is turned off. When the voice stop flag is turned off, it is determined whether or not the position specifying flag is turned on in step S53.

音声停止フラグおよび位置特定フラグは、後述する画像再生タスクにおいてオン状態に設定される。画像再生タスクにおいて、画像のコマ送り再生やスキップ再生を行っているときには、音声の再生は行わない。そこで、コマ送り再生やスキップ再生を行っている間は、音声停止フラグをオン状態にして音声の再生を停止する。また、画像を第1フレームから再生するときには音声も第1音声フレームから再生すればよいが、画像のコマ送り再生やスキップ再生を行った後に、途中の画像から再生する場合には、再生される画像フレームに対応した音声フレームを特定し、特定された音声フレームから再生しなければならない。そのため、画像のコマ送り再生やスキップ再生を行ったときに位置特定フラグをオン状態に設定して再生する音声フレームの特定が必要なことを画像再生タスクに知らせる。   The audio stop flag and the position specifying flag are set to an on state in an image reproduction task described later. In the image reproduction task, audio is not reproduced when frame-by-frame reproduction or skip reproduction is performed. Therefore, during frame-by-frame playback or skip playback, the audio stop flag is turned on to stop audio playback. In addition, when the image is reproduced from the first frame, the sound may be reproduced from the first audio frame. However, when the image is reproduced from the middle image after frame-by-frame reproduction or skip reproduction, the image is reproduced. An audio frame corresponding to the image frame must be identified and reproduced from the identified audio frame. Therefore, when performing frame-by-frame playback or skip playback, the position specifying flag is set to the on state to notify the image playback task that it is necessary to specify the audio frame to be played back.

ステップS53でYESと判断すると、ステップS55で、画像再生タスクにおいてCPU40がレジスタFpを用いてカウントしている再生画像フレームの番号Fpを参照して第Fp番目の画像フレームに対応する音声フレームを特定する。なお、レジスタFpに格納されている値を“Fp”で表す。音声フレームは、画像フレームの番号ではなく、画像フィールドの番号を保持しているので、(Fp×2−1)番のフィールド番号を保持している音声フレームを第Fp画像フレームに対応する音声フレームとして特定する。そして、ステップS57では、音声フレームの特定を終えたので位置特定フラグをオフ状態に設定する。   If YES is determined in the step S53, an audio frame corresponding to the Fp-th image frame is specified with reference to the reproduction image frame number Fp counted by the CPU 40 using the register Fp in the image reproduction task in a step S55. To do. Note that the value stored in the register Fp is represented by “Fp”. Since the audio frame holds not the image frame number but the image field number, the audio frame holding the (Fp × 2-1) number field is the audio frame corresponding to the Fp image frame. As specified. In step S57, since the audio frame has been specified, the position specifying flag is set to the off state.

ステップS59では、ステップS55において特定された音声フレームの伸長命令をMPEG−4コーデック34に与える。ステップS53でNOと判断された場合には、第1音声フレームから伸長される。   In step S59, the MPEG-4 codec 34 is provided with a decompression command for the audio frame specified in step S55. If NO is determined in step S53, the first audio frame is expanded.

ステップS61では、伸長命令の対象となった音声フレームから、同期サンプル情報(画像フィールド番号情報,垂直ライン位置情報および水平画素位置情報)を取得して、RAM46に記録する。そして、ステップS63では、同期サンプリング情報の取得を画像再生タスクに知らせるために同期サンプル情報取得フラグをオン状態に設定する。   In step S 61, synchronization sample information (image field number information, vertical line position information, and horizontal pixel position information) is acquired from the audio frame that is the target of the decompression command and recorded in the RAM 46. In step S63, the synchronous sample information acquisition flag is set to an on state in order to notify the image reproduction task of acquisition of the synchronous sampling information.

ステップS65では、ステップS59で音声フレームの伸長命令を発してから1音声フレームの再生にかかる時間である21ミリ秒が経過したかどうかを判断する。ステップS65においてYESと判断するとステップS51に戻る。一方、ステップS65においてNOと判断するとステップS67に進む。   In step S65, it is determined whether 21 milliseconds, which is the time taken to reproduce one audio frame, has elapsed since the audio frame decompression command was issued in step S59. If YES is determined in the step S65, the process returns to the step S51. On the other hand, if NO is determined in step S65, the process proceeds to step S67.

ステップS67では、オペレータによって再生終了操作が行われるか、もしくは、すべてのデータ(音声フレームおよび画像フレーム)の再生が終了したかどうかを判断する。ステップS67でNOと判断したときにはステップS65に戻り、YESと判断したときには音声再生タスクを終了する。   In step S67, it is determined whether or not a reproduction end operation has been performed by the operator, or whether or not the reproduction of all data (audio frames and image frames) has been completed. When NO is determined in the step S67, the process returns to the step S65, and when YES is determined, the sound reproduction task is ended.

画像再生タスクにおけるCPU40の動作は図9および図10のフロー図に示される。まず、図9のステップS71では、再生される画像フレームをカウントするためにレジスタFpに1を格納して初期化する。ステップS73では、オペレータによってコマ送り再生もしくはスキップ再生の操作が行われたかどうかを判断する。ステップS73においてYESと判断すると、ステップS87においてコマ送り再生もしくはスキップ再生が行われている旨を音声再生タスクに知らせるために音声停止フラグをオン状態に設定する。また、ステップS89では、コマ送り再生もしくはスキップ再生によって画像が途中から再生されるので再生を開始する音声フレームを特定する必要がある旨を音声再生タスクに知らせるために位置特定フラグをオン状態に設定する。   The operation of the CPU 40 in the image reproduction task is shown in the flowcharts of FIGS. First, in step S71 in FIG. 9, 1 is stored in the register Fp and initialized in order to count the image frames to be reproduced. In step S73, it is determined whether or not an operation for frame advance reproduction or skip reproduction has been performed by the operator. If YES is determined in the step S73, an audio stop flag is set to an on state in order to notify the audio reproduction task that the frame advance reproduction or the skip reproduction is performed in a step S87. In step S89, the position specifying flag is set to ON to notify the audio playback task that the audio frame to be played back needs to be specified because the image is played back halfway by frame-by-frame playback or skip playback. To do.

ステップS91ではコマ送り再生もしくはスキップ再生の処理を行う。コマ送り再生およびスキップ再生の処理の詳細な説明は省略する。コマ送り再生およびスキップ再生の処理では、コマ送り再生もしくはスキップ再生に応じた画像フレームの伸長命令を発行するとともに、画像フレームカウンタFpの更新が行われる。   In step S91, frame advance playback or skip playback processing is performed. A detailed description of the frame advance playback and skip playback processing will be omitted. In the frame advance playback and skip playback processing, an image frame expansion command corresponding to frame advance playback or skip playback is issued, and the image frame counter Fp is updated.

ステップS73においてNOと判断すると、ステップS75において音声停止フラグをオフ状態に設定する。これによって、音声再生タスクにおいて、音声フレームの再生が開始される。   If NO is determined in step S73, the voice stop flag is set to an off state in step S75. Thereby, the playback of the audio frame is started in the audio playback task.

次に、ステップS77では同期サンプル情報取得フラグがオン状態であるかどうか、つまり、音声再生タスクにおいて音声フレームから同期サンプル情報が取得され、画像と音声とのずれを確認するタイミングが到来したかどうかを判断する。   Next, in step S77, whether or not the synchronization sample information acquisition flag is in an on state, that is, whether or not the timing for confirming the difference between the image and the audio has been acquired from the audio frame in the audio reproduction task. Judging.

ステップS77においてNOと判断すると、ステップS93において前回画像フレームの伸長命令が発生されてから1/30秒が経過したかどうかを判断する。画像フレームは1/30秒ごとに再生されるため、1/30秒が経過していなければステップS73に戻る。   If NO is determined in step S77, it is determined in step S93 whether 1/30 second has elapsed since the previous image frame decompression command was generated. Since the image frame is reproduced every 1/30 seconds, if 1/30 seconds have not elapsed, the process returns to step S73.

ステップS93においてYESと判断すると、ステップS95において、第Fp画像フレームの伸長命令をMPEG−4エンコーダ34に対して発生する。これによって、第Fp画像フレームが伸長されて再生される。そして、ステップS97において、カウンタFpに格納されている値を1だけインクリメントする。   If YES is determined in the step S93, a decompression command for the Fp image frame is generated to the MPEG-4 encoder 34 in a step S95. As a result, the Fp image frame is expanded and reproduced. In step S97, the value stored in the counter Fp is incremented by one.

一方、ステップS77においてYESと判断すると、画像と音声とのずれの確認および修正を行う。まず、ステップS79では、同期サンプル情報取得フラグをオフ状態に設定する。   On the other hand, if “YES” is determined in the step S77, confirmation and correction of the deviation between the image and the sound are performed. First, in step S79, the synchronization sample information acquisition flag is set to an off state.

ステップS81では、第2同期サンプル処理を行う。この第2同期サンプル処理では、ビデオエンコーダ22からVカウンタ22vおよびHカウンタ22hの値を取得してRAM46に記録するとともに、CPU40がカウントしている画像フィールド番号の値をフィールドカウンタ40fから取得してRAM46に記録する。   In step S81, a second synchronous sample process is performed. In this second synchronous sample processing, the values of the V counter 22v and H counter 22h are acquired from the video encoder 22 and recorded in the RAM 46, and the value of the image field number counted by the CPU 40 is acquired from the field counter 40f. Record in RAM 46.

そして、ステップS83では、先の音声再生タスクのステップS61(図8)において音声フレームから取り出されてRAM46に記録された、フィールド番号情報が示す値,垂直ライン位置情報が示す値および水平画素位置情報が示す値と、この画像再生タスクのステップS81における第2同期サンプル処理において取得されてRAM46に記録された、フィールドカウンタ40fの値,Vカウンタ22vの値およびHカウンタ22hの値とから、音声と画像との再生タイミングが何フィールド,何ラインそして何画素分ずれているかを計算する。   In step S83, the value indicated by the field number information, the value indicated by the vertical line position information, and the horizontal pixel position information extracted from the audio frame and recorded in the RAM 46 in step S61 (FIG. 8) of the previous audio reproduction task. And the value of the field counter 40f, the value of the V counter 22v, and the value of the H counter 22h acquired in the second synchronous sample processing in step S81 of this image reproduction task and recorded in the RAM 46, Calculate how many fields, how many lines, and how many pixels the playback timing of the image is shifted.

ステップS85では、音声と画像とタイミングのずれが許容範囲内であるかどうかを判断する。ステップS85でYESと判断すると前述のステップS93に進んで前回の画像フレームの伸長から1/30秒が経過したかどうかを判断し、判断結果がYESであればステップS95においてMPEG−4コーデック34に対する画像フレームの伸長命令を発生する。   In step S85, it is determined whether or not the timing difference between the sound and the image is within an allowable range. If YES is determined in the step S85, the process proceeds to the above-described step S93 to determine whether or not 1/30 second has elapsed from the previous image frame expansion. If the determination result is YES, the MPEG-4 codec 34 is determined in a step S95. Generates an image frame decompression instruction.

一方、ステップS85においてNOと判断すると、図10のステップS101において、音声と画像とのずれは画像の遅れによるものであるかどうかを判断する。ステップS101においてYESと判断すると、画像の遅れを取り戻すために画像のスキップ処理を行う。つまり、ステップS103において、前回の画像フレームの伸長命令の発生から1/30秒の経過を待たずに第Fp画像フレームの伸長命令をMPEG−4コーデック34に対して発生する。そして、ステップS105では、レジスタFpに格納されている値を1だけインクリメントして図9のステップS73に戻る。   On the other hand, if NO is determined in step S85, it is determined in step S101 in FIG. 10 whether or not the difference between the sound and the image is due to the delay of the image. If YES is determined in the step S101, an image skip process is performed in order to recover the image delay. That is, in step S103, the Fp image frame decompression command is issued to the MPEG-4 codec 34 without waiting for the elapse of 1/30 seconds from the generation of the previous image frame decompression command. In step S105, the value stored in the register Fp is incremented by 1, and the process returns to step S73 in FIG.

MPEG−4コーデック34によって伸長されてバッファ34aに蓄積された伸長画像データは、1/30秒ごとに読み出されてメモリ制御回路32を通してSDRAM30のバンク(バンクAもしくはバンクB)に書き込まれる。そして、バンクに書き込まれた伸長画像データがビデオエンコーダ22によって読み出されて再生される。   The decompressed image data decompressed by the MPEG-4 codec 34 and accumulated in the buffer 34a is read every 1/30 seconds and written to the bank (bank A or bank B) of the SDRAM 30 through the memory control circuit 32. The decompressed image data written in the bank is read out by the video encoder 22 and reproduced.

しかし、ステップS103では、1/30秒を待たずに画像の伸長命令がMPEG−4コーデック34に与えられるので、バッファ34aの内容は1/30秒の間に2回更新される。そのため、SDRAM30のバンクには1フレーム分とんで伸長画像データが書き込まれる。そして、ビデオエンコーダ22はそのまま伸長画像データを読み出すので、LCD24に表示される画像は1フレーム分スキップされる。このようにして、画像を音声に追いつかせる。   However, in step S103, since the image decompression command is given to the MPEG-4 codec 34 without waiting for 1/30 seconds, the contents of the buffer 34a are updated twice during 1/30 seconds. Therefore, the decompressed image data is written into the bank of the SDRAM 30 in one frame. Since the video encoder 22 reads the decompressed image data as it is, the image displayed on the LCD 24 is skipped by one frame. In this way, the image can catch up with the sound.

一方、ステップS101においてNOと判断すると、画像の先行を修正するために画像の表示を1フレーム分停止させる。つまり、ステップS107において、1/15秒(1/30秒の2回分)待機し、ステップS103に進む。   On the other hand, if NO is determined in step S101, the display of the image is stopped for one frame in order to correct the preceding of the image. That is, in step S107, it waits for 1/15 seconds (twice 1/30 seconds), and proceeds to step S103.

MPEG−4エンコーダ34のバッファ34aの内容は1/30秒ごとに読み出されてSDRAM30のバンクに書き込まれる。しかし、MPEG−4エンコーダ34に画像の伸長命令が与えられないまま1/30秒が経過するので、1/30秒経ってもバッファ34aの内容は更新されない。そのため、SDRAM30のバンクには前回と同じ伸長画像データがバッファ34aから読み出されて書き込まれ、バンクAとバンクBとの内容が同じになる。したがって、ビデオエンコーダ22は、バンクは異なるが前回と同じ伸長画像データをSDRAM30から読み出して再生するので、LCD24に表示される画像は見かけ上停止することになる。画像が停止している間にも音声は再生されるので、音声が画像に追いつく。   The contents of the buffer 34a of the MPEG-4 encoder 34 are read every 1/30 seconds and written to the bank of the SDRAM 30. However, since 1/30 seconds elapse without the MPEG-4 encoder 34 being given an image decompression command, the contents of the buffer 34a are not updated even after 1/30 seconds. Therefore, the same decompressed image data as in the previous time is read from the buffer 34a and written in the bank of the SDRAM 30, and the contents of the bank A and the bank B become the same. Therefore, since the video encoder 22 reads out and reproduces the same decompressed image data as in the previous time, although the bank is different, the image displayed on the LCD 24 is apparently stopped. Since the sound is played while the image is stopped, the sound catches up with the image.

以上に説明したように、この実施例のビデオカメラ10においては、画像と音声とを記録するときに音声フレームに対応する画像のフィールド番号,垂直ライン位置および水平画素位置の各情報を音声フレームに付加する。そして、再生するときには、再生される音声フレームから取り出した画像フィールド番号情報,垂直ライン位置情報および水平画素位置情報と、現在再生されている画像のフィールド番号,垂直ライン位置および水平画素位置とから音声と画像との同期のずれを算出する。そして、このずれが許容範囲を超えるときには、画像を一時停止するかもしくは画像をスキップすることによってずれを修正する。したがって、従来とは異なりタイムスタンプ用の時計回路を必要とせず、簡単な回路構成によって音声と画像との同期を実現することができる。   As described above, in the video camera 10 of this embodiment, when recording an image and sound, information on the image field number, vertical line position, and horizontal pixel position corresponding to the sound frame is stored in the sound frame. Append. Then, when reproducing, the audio is obtained from the image field number information, vertical line position information and horizontal pixel position information extracted from the reproduced audio frame, and the field number, vertical line position and horizontal pixel position of the currently reproduced image. And the synchronization deviation of the image is calculated. When the deviation exceeds the allowable range, the deviation is corrected by temporarily stopping the image or skipping the image. Therefore, unlike the prior art, a clock circuit for time stamp is not required, and synchronization between sound and image can be realized with a simple circuit configuration.

この発明の一実施例の全体構成を示す図解図である。It is an illustration figure which shows the whole structure of one Example of this invention. 音声フレームと画像フィールドとの発生タイミングを示す図解図である。It is an illustration figure which shows the generation | occurrence | production timing of an audio | voice frame and an image field. 音声フレームのデータ構成例を示す図解図である。It is an illustration figure which shows the data structural example of an audio | voice frame. 音声と画像とのずれの計算方法を示す図解図である。It is an illustration figure which shows the calculation method of the deviation | shift between an audio | voice and an image. 画像圧縮タスクにおけるCPUの動作を示すフロー図である。It is a flowchart which shows operation | movement of CPU in an image compression task. 音声取込タスクにおけるCPUの動作を示すフロー図である。It is a flowchart which shows operation | movement of CPU in an audio | voice capture | acquisition task. 音声圧縮タスクにおけるCPUの動作を示すフロー図である。It is a flowchart which shows operation | movement of CPU in an audio | voice compression task. 音声再生タスクにおけるCPUの動作を示すフロー図である。It is a flowchart which shows operation | movement of CPU in an audio | voice reproduction | regeneration task. 画像再生タスクにおけるCPUの動作を示すフロー図である。It is a flowchart which shows operation | movement of CPU in an image reproduction task. 図9のフロー図に続くフロー図である。FIG. 10 is a flowchart following the flowchart of FIG. 9.

符号の説明Explanation of symbols

10 …ビデオカメラ
16,20,26 …信号処理回路
22 …ビデオエンコーダ
30 …SDRAM
32 …メモリ制御回路
34 …MPEG−4コーデック
38 …メモリカード
40 …CPU
44 …フラッシュメモリ
46 …RAM
DESCRIPTION OF SYMBOLS 10 ... Video camera 16, 20, 26 ... Signal processing circuit 22 ... Video encoder 30 ... SDRAM
32 ... Memory control circuit 34 ... MPEG-4 codec 38 ... Memory card 40 ... CPU
44 ... Flash memory 46 ... RAM

Claims (10)

イメージセンサによって撮影された被写体の動画像信号とマイクロフォンによって取り込まれた音声信号とを記録媒体に記録するビデオカメラにおいて、
前記動画像信号を形成する各画面の静止画像信号をラスタ走査態様でモニタに向けて出力する第1画像出力手段、
前記第1画像出力手段によって走査されている画素位置を間欠的に検出する第1検出手段、および
前記第1検出手段によって検出された画素位置を前記第1検出手段による検出時点で前記マイクロフォンによって取り込まれた音声信号に割り当てる割り当て手段を備えることを特徴とする、ビデオカメラ。
In a video camera for recording a moving image signal of a subject photographed by an image sensor and an audio signal captured by a microphone on a recording medium,
First image output means for outputting a still image signal of each screen forming the moving image signal to a monitor in a raster scanning manner;
First detection means for intermittently detecting a pixel position scanned by the first image output means; and a pixel position detected by the first detection means is captured by the microphone at the time of detection by the first detection means. A video camera comprising assigning means for assigning to a recorded audio signal.
前記マイクロフォンによって取り込まれた音声信号の記録に先立って所定量毎の符号化処理を施す符号化手段をさらに備え、
前記第1検出手段は前記所定量の音声信号が取り込まれる毎に前記画素位置を検出する、請求項1記載のビデオカメラ。
Encoding means for performing an encoding process for each predetermined amount prior to recording of the audio signal captured by the microphone;
2. The video camera according to claim 1, wherein the first detection unit detects the pixel position each time the predetermined amount of the audio signal is captured.
前記記録媒体から読み出された動画像信号を形成する各画像の静止画像信号を前記ラスタ走査態様で前記モニタに向けて出力する第2画像出力手段、
前記記録媒体から読み出された音声信号をスピーカに向けて出力する音声出力手段、
前記音声出力手段によって出力される音声信号に割り当てられた画素位置を検出する第2検出手段、
前記第2検出手段の検出時点で前記第2画像出力手段によって走査されている画素位置と前記第2検出手段によって検出された画素位置とのずれを判別する判別手段、および
前記第2画像出力手段によって出力される静止画像信号の画面数を前記判別手段の判別結果に応じて調整する調整手段をさらに備える、請求項1または2記載のビデオカメラ。
Second image output means for outputting a still image signal of each image forming a moving image signal read from the recording medium toward the monitor in the raster scanning mode;
Audio output means for outputting an audio signal read from the recording medium toward a speaker;
Second detection means for detecting a pixel position assigned to the audio signal output by the audio output means;
A discriminating unit for discriminating a deviation between a pixel position scanned by the second image output unit at the time of detection by the second detection unit and a pixel position detected by the second detection unit; and the second image output unit The video camera according to claim 1, further comprising an adjusting unit that adjusts the number of screens of the still image signal output by the unit according to a determination result of the determining unit.
前記動画像信号は1画面ずつ符号化された状態で前記記録媒体に記録され、
前記第2画像出力手段は各画面の符号化静止画像信号を復号命令に応答して復号する復号手段を含み、
前記調整手段は前記復号命令の発生タイミングを制御する、請求項3記載のビデオカメラ。
The moving image signal is recorded on the recording medium in a state of being encoded screen by screen,
The second image output means includes decoding means for decoding the encoded still image signal of each screen in response to a decoding command;
It said adjusting means controls the generation timing of the decoded instruction, claim 3 Symbol placement of the video camera.
前記復号手段は、前記復号命令に応答して復号された静止画像信号を第1メモリに書き込み、かつ前記第1メモリに格納された静止画像信号を所定周期で前記第1メモリから読み出す、請求項4記載のビデオカメラ。   The decoding means writes a still image signal decoded in response to the decoding command to a first memory, and reads the still image signal stored in the first memory from the first memory at a predetermined period. 4. The video camera according to 4. 前記調整手段は、前記画面数を増大させるとき前記復号命令の発生周期を延長し、前記画面数を減少させるとき前記復号命令の発生周期を短縮する、請求項4または5記載のビデオカメラ。   The video camera according to claim 4 or 5, wherein the adjusting means extends the generation cycle of the decoding command when increasing the number of screens, and shortens the generation cycle of the decoding command when decreasing the number of screens. 前記第2画像出力手段は、前記復号手段から出力された静止画像信号を第2メモリに書き込む書き込み手段、および前記第2メモリに格納された静止画像信号を読み出す読み出し手段をさらに含む、請求項4ないし6に記載のビデオカメラ。   5. The second image output means further includes a writing means for writing the still image signal output from the decoding means to a second memory, and a reading means for reading the still image signal stored in the second memory. 7. The video camera according to 6. 前記第2メモリは第1エリアおよび第2エリアを含み、
前記書き込み手段は前記復号手段から出力された静止画像信号を前記第1エリアおよび前記第2エリアに交互に書き込み、
前記読み出し手段は前記静止画像信号を前記第1エリアおよび前記第2エリアから交互に読み出す、請求項7記載のビデオカメラ。
The second memory includes a first area and a second area;
The writing means alternately writes the still image signal output from the decoding means to the first area and the second area,
The video camera according to claim 7, wherein the reading unit reads the still image signal alternately from the first area and the second area.
前記書き込み手段による書き込みと前記読み出し手段による読み出しとは相補的に行われる、請求項8記載のビデオカメラ。   The video camera according to claim 8, wherein writing by the writing unit and reading by the reading unit are performed in a complementary manner. 前記動画像信号はMPEG4方式に従って符号化される、請求項4ないし9のいずれかに記載のビデオカメラ。   The video camera according to claim 4, wherein the moving image signal is encoded according to an MPEG4 system.
JP2003349524A 2003-10-08 2003-10-08 Video camera Expired - Fee Related JP4190384B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003349524A JP4190384B2 (en) 2003-10-08 2003-10-08 Video camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003349524A JP4190384B2 (en) 2003-10-08 2003-10-08 Video camera

Publications (2)

Publication Number Publication Date
JP2005117400A JP2005117400A (en) 2005-04-28
JP4190384B2 true JP4190384B2 (en) 2008-12-03

Family

ID=34541367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003349524A Expired - Fee Related JP4190384B2 (en) 2003-10-08 2003-10-08 Video camera

Country Status (1)

Country Link
JP (1) JP4190384B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4560788B2 (en) * 2005-05-26 2010-10-13 カシオ計算機株式会社 Camera device, recording device, and program
CN1758772B (en) * 2005-11-04 2010-05-05 无敌科技(西安)有限公司 Method for synchronous playing video and audio of medium document and its system
JP2011199477A (en) * 2010-03-18 2011-10-06 Hitachi Kokusai Electric Inc Video signal capturing device

Also Published As

Publication number Publication date
JP2005117400A (en) 2005-04-28

Similar Documents

Publication Publication Date Title
US7705904B2 (en) Moving-image recording device for recording moving image
JP4724577B2 (en) Imaging apparatus and control method thereof
US8743227B2 (en) Imaging apparatus and control method for reducing a load of writing image data on a recording medium
JP4525561B2 (en) Imaging apparatus, image processing method, and program
JP2007318725A (en) Camera, photographing control method of camera, program, and recording medium
JP4958758B2 (en) Recording apparatus, reproducing apparatus, recording method, reproducing method, and program
CN102164242A (en) Image capturing apparatus and image capturing control method
JP2010074323A (en) Recording apparatus and method, and recording and playback apparatus and method
JP5164610B2 (en) Imaging apparatus and control method thereof
US8538247B2 (en) Image processing apparatus and image processing method
JP4252015B2 (en) Image capturing apparatus, image reproducing apparatus, and image capturing / reproducing system
JP4190384B2 (en) Video camera
JP2009272921A (en) Moving image recording apparatus, moving image reproducing apparatus, moving image recording method, moving image reproducing method, and semiconductor integrated circuit
JP2007266659A (en) Imaging reproducing apparatus
US20110043654A1 (en) Image processing apparatus
JP2005318180A (en) Hard disk recorder and video recording apparatus
JP2007043417A (en) Image recording apparatus and method
JP7374698B2 (en) Imaging device, control method and program
JP2742111B2 (en) Video camera
JP2020188415A (en) Imaging device and its control method and program
JP2015029211A (en) Imaging device
JP2005229553A (en) Image processing apparatus
JP2007228119A (en) Imaging apparatus, image processing method, and program
JP5084586B2 (en) Image recording / reproducing apparatus and image reproducing apparatus
JP2008160564A (en) Camera device and chapter data generation method in camera device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080527

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080722

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: 20080819

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080916

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110926

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees