JP2005236641A - Reproduction method - Google Patents

Reproduction method Download PDF

Info

Publication number
JP2005236641A
JP2005236641A JP2004042969A JP2004042969A JP2005236641A JP 2005236641 A JP2005236641 A JP 2005236641A JP 2004042969 A JP2004042969 A JP 2004042969A JP 2004042969 A JP2004042969 A JP 2004042969A JP 2005236641 A JP2005236641 A JP 2005236641A
Authority
JP
Japan
Prior art keywords
audio
video
output
data
audio data
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.)
Withdrawn
Application number
JP2004042969A
Other languages
Japanese (ja)
Inventor
Eiji Imao
英司 今尾
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 JP2004042969A priority Critical patent/JP2005236641A/en
Publication of JP2005236641A publication Critical patent/JP2005236641A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To highly precisely synchronize audio data with video data to output them. <P>SOLUTION: In the reproduction method, encoded video data and encoded audio data are reproduced and decoded, the decoded audio data are written in a DMA transfer buffer, the decoded audio data are read from the DMA transfer buffer to output them to an audio output device and to output the decoded video data to a video output device. On the basis of an output value of a synchronous timer for counting clocks of higher frequency than a system timer for reproduction processing and an output delay time obtained from a state of the audio data stored in the DMA buffer, outputs of the audio data and video data are controlled so that reproduction elapsed time of the audio data to be outputted from the audio output device and reproduction elapsed time to be outputted from the video output device synchronize with each other. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明はビデオとオーディオの再生方法に関する。   The present invention relates to a video and audio playback method.

従来、ビデオデータとオーディオデータを合わせた動画データの再生ソフトウェアにおいて、ビデオとオーディオを同期再生する方法には、オペレーションシステムのシステムタイマを使ったシステム経過時間から得られる時間情報を利用して、ビデオとオーディオの再生時間を合わせて同期させる方法がある(例えば、特許文献1参照)。また、オーディオ再生においてはオーディオデバイスへのオーディオDMA転送を用いる場合、オーディオ再生のプロセス(あるいはスレッド)がオーディオDMA転送バッファにオーディオデータを書き込み、DMA転送が実行されることでオーディオを出力する。このような場合において、オーディオ再生データをDMA転送バッファに書き込むオーディオ再生プロセス(プロセス)ではDMA転送のバッファへの書き込みまでが一連のオーディオ再生ループ処理となるため、実際にオーディオが出力された時間までの遅延時間を、ビデオ再生との同期に反映することが難しい。
特開2001−324998
Conventionally, in video data playback software that combines video data and audio data, a method for synchronously playing back video and audio is based on time information obtained from the system elapsed time using the system timer of the operation system. There is a method of synchronizing the playback time of audio and audio (for example, see Patent Document 1). Further, when audio DMA transfer to an audio device is used in audio reproduction, an audio reproduction process (or thread) writes audio data in an audio DMA transfer buffer, and audio is output by executing DMA transfer. In such a case, in the audio reproduction process (process) for writing the audio reproduction data to the DMA transfer buffer, a series of audio reproduction loop processes are performed until the DMA transfer buffer is written. It is difficult to reflect the delay time in synchronization with video playback.
JP 2001-324998 A

前記のようなシステムタイマによる時間情報を使ったビデオとオーディオの同期再生方法では、システムタイマより小さい粒度で、ビデオとオーディオを同期再生することができない問題があった。例えば、システムタイマの粒度が10msである場合、オーディオとビデオの再生プロセスが10msよりも短い時間でスイッチすることはないため、同期再生の精度として10ms以下にはならない。さらにオーディオ再生にオーディオデバイスへDMAによるデータ転送を利用する場合では、オーディオ転送DMAのバッファリングが原因で実際にオーディオが出力されるまでの遅延時間が大きくなると、システムタイマの時間の粒度では、正確に遅延時間を反映したビデオ、オーディオの再生同期をとることができない。   The video and audio synchronous playback method using time information by the system timer as described above has a problem that video and audio cannot be synchronously played back with a smaller granularity than the system timer. For example, when the granularity of the system timer is 10 ms, the audio and video playback process does not switch in a time shorter than 10 ms, so the accuracy of synchronous playback does not become 10 ms or less. Furthermore, when data transfer by DMA to audio devices is used for audio playback, if the delay time until audio is actually output increases due to buffering of audio transfer DMA, the system timer time granularity is accurate. The video and audio playback that reflects the delay time cannot be synchronized.

本発明はこの様な問題を解決し、オーディオデータとビデオデータとを高精度に同期させて出力可能とすることを目的とする。   An object of the present invention is to solve such a problem and to enable audio data and video data to be output in synchronization with high accuracy.

本発明は、符号化されたビデオデータと符号化されたオーディオデータとを、システムタイマの出力に従って再生する再生ステップと、前記再生された符号化オーディオデータを復号してDMA転送バッファに書き込むオーディオ復号ステップと、前記再生された符号化ビデオデータを復号するビデオ復号ステップと、前記再生ステップによる前記オーディオデータの再生処理とは独立して前記DMA転送バッファから前記復号されたオーディオデータを読み出してオーディオ出力デバイスに出力するオーディオ出力ステップと、前記ビデオ復号ステップにより復号されたビデオデータをビデオ出力デバイスに出力するビデオ出力ステップと、前記システムタイマよりも高周波のクロックをカウントする同期タイマの出力値と前記DMAバッファに蓄積された前記オーディオデータの状態から求めた出力遅延時間とに基づき、前記オーディオ出力デバイスにより出力されるオーディオデータの再生経過時間と前記ビデオ出力デバイスにより出力されるビデオデータの再生経過時間とが同期するよう前記オーディオ出力ステップとビデオ出力ステップとを制御する同期制御ステップとを有する。   The present invention provides a reproduction step of reproducing encoded video data and encoded audio data according to an output of a system timer, and audio decoding for decoding the reproduced encoded audio data and writing it to a DMA transfer buffer Independent of the audio decoding step, the video decoding step for decoding the reproduced encoded video data, and the reproduction processing of the audio data by the reproduction step, and outputting the decoded audio data from the DMA transfer buffer. An audio output step for outputting to the device; a video output step for outputting the video data decoded in the video decoding step to a video output device; an output value of a synchronous timer for counting a clock having a frequency higher than the system timer; and the DMA Bag Based on the output delay time obtained from the state of the audio data stored in the memory, the playback elapsed time of the audio data output by the audio output device and the playback elapsed time of the video data output by the video output device, A synchronization control step for controlling the audio output step and the video output step so as to synchronize with each other.

本発明によれば、より高精度にオーディオデータとビデオデータとを同期して出力することができる。   According to the present invention, audio data and video data can be synchronized and output with higher accuracy.

図1は本発明を適用した再生システムの一例を表す図である。101は、動画データ格納手段であり、符号化されたビデオデータとオーディオデータを合わせた動画データを保存しておき、動画再生時に読み出す手段を表す。   FIG. 1 is a diagram showing an example of a reproduction system to which the present invention is applied. Reference numeral 101 denotes moving image data storage means, which represents means for storing moving image data in which encoded video data and audio data are combined and reading them out during moving image reproduction.

102は、再生データ同期手段である。動画再生中に101からビデオデータとオーディオデータを読み出す装置およびソフトウェアである。102は任意の再生経過時間に合致する、符号化ビデオデータと符号化オーディオデータを取り出すことが可能である。   Reference numeral 102 denotes reproduction data synchronization means. An apparatus and software for reading video data and audio data from 101 during moving image reproduction. Reference numeral 102 can extract encoded video data and encoded audio data that match an arbitrary playback elapsed time.

103はオーディオ再生手段である。動画再生中に符号化オーディオデータを復号するプロセス(あるいはスレッド)を示す。105はオーディオ出力手段である。オーディオデータから聴音可能なオーディオを出力する。   Reference numeral 103 denotes audio reproduction means. A process (or thread) for decoding encoded audio data during video playback is shown. Reference numeral 105 denotes an audio output means. Output audible audio from audio data.

オーディオ再生では、102の再生データ同期手段が101の動画データ格納手段から符号化オーディオデータを読み出し、103のオーディオ再生手段に渡す。103のオーディオ再生手段は符号化オーディオデータ復号化して105のオーディオ出力手段に転送する。最後に105のオーディオ出力手段が動画のオーディオを出力する。   In the audio reproduction, the reproduction data synchronization unit 102 reads the encoded audio data from the moving image data storage unit 101 and passes it to the audio reproduction unit 103. The audio reproduction means 103 decodes the encoded audio data and transfers it to the audio output means 105. Finally, 105 audio output means outputs moving image audio.

また、112は、DMAを利用して復号化したオーディオデータを103から105へ転送することを表している。   Reference numeral 112 denotes that audio data decoded using DMA is transferred from 103 to 105.

104はビデオ再生手段である。動画再生中に符号化ビデオデータを復号化するプロセス(あるいはスレッド)を示す。106はビデオ出力手段を表し、例えば液晶ディスプレイ表示などの表示装置である。   Reference numeral 104 denotes video playback means. A process (or thread) for decoding encoded video data during video playback is shown. Reference numeral 106 denotes a video output means, which is a display device such as a liquid crystal display.

ビデオ再生では、102の再生データ同期手段が101の動画データ格納手段から符号化ビデオデータを読み出し、104のビデオ再生手段に渡す。104のビデオ再生手段は符号化データを復号化して106のビデオ出力手段に転送する。最後に106のビデオ出力手段が動画のビデオを出力する。   In the video reproduction, the reproduction data synchronization unit 102 reads the encoded video data from the moving image data storage unit 101 and passes it to the video reproduction unit 104. The video reproduction means 104 decodes the encoded data and transfers it to the 106 video output means. Finally, the video output means 106 outputs a moving image video.

107は、本発明の動画再生システムの再生制御手段であり、102、103、104の制御指示を行うプロセス(あるいはスレッド)を表す。   Reference numeral 107 denotes playback control means of the moving image playback system of the present invention, which represents a process (or thread) that issues control instructions 102, 103, and 104.

108は再生操作受信手段を表す。動画再生を行うユーザーが、109に示す再生操作(再生、一時停止、早送り、巻き戻しなど)をすると、108の再生操作受信手段が107の再生制御手段にどのような再生操作が行われたかを送信する。107は操作の種類を識別し、102、103、104に対して制御指示を実行する。   Reference numeral 108 denotes a reproduction operation receiving means. When a user who performs video playback performs the playback operation shown in 109 (playback, pause, fast forward, rewind, etc.), the playback operation receiving unit 108 indicates what playback operation has been performed on the 107 playback control unit. Send. Reference numeral 107 identifies the type of operation, and executes control instructions for 102, 103, and 104.

また、動画再生システムは、システムタイマ110の時間粒度によって動作する。システムタイマ110は、該動画再生システムの動作するオペレーションシステムのタイマである。本発明において再生の同期専用に使用するタイマ111を使用する。このタイマを同期タイマと呼ぶことにする。再生データ同期手段102とオーディオ再生手段103とビデオ再生手段104が同期タイマを使用する。   The moving image playback system operates according to the time granularity of the system timer 110. The system timer 110 is an operation system timer in which the moving image playback system operates. In the present invention, a timer 111 used exclusively for reproduction synchronization is used. This timer is called a synchronous timer. The reproduction data synchronization means 102, the audio reproduction means 103, and the video reproduction means 104 use a synchronization timer.

ここで同期タイマについて実施例を記す。同期タイマはシステムタイマよりも細かい精度でタイマ割り込み処理が起きるように作成する。例えばシステムタイマの粒度が10msである場合、同期タイマは、少なくとも1msの粒度でなければならない。同期タイマの一例としては、ハードウェア周期タイマ(periodic timer)を使ったタイマである。ハードウェア周期タイマには一定周期のクロック数を設定する。開始するとシステム内部のクロックソース、あるいは外部のクロックソースに同期したクロックをカウントし、設定したクロック数で、ハードウェアタイマ割り込みを起こす。これを利用して同期タイマを作成する。また、同期タイマは任意のタイミングで、開始からの経過時間を読み出すことが可能であり、また任意のタイミングで開始からの経過時間を書き換えることが可能である。   Here, an embodiment of the synchronization timer will be described. The synchronous timer is created so that timer interrupt processing occurs with a finer precision than the system timer. For example, if the system timer granularity is 10 ms, the synchronization timer must be at least 1 ms granularity. An example of the synchronization timer is a timer using a hardware period timer. The number of clocks with a fixed period is set in the hardware period timer. When started, it counts the clocks synchronized with the internal clock source or the external clock source, and generates a hardware timer interrupt with the set number of clocks. A synchronization timer is created using this. The synchronous timer can read the elapsed time from the start at an arbitrary timing, and can rewrite the elapsed time from the start at an arbitrary timing.

ビデオの再生同期では、ビデオフレームレートが10fpsならば、再生開始から100msごとにビデオフレームを表示出力するのが理想である。しかし、15fpsならば、1000/15msであり、30fpsならば、1000/30msを周期として出力することが理想であり、このためには少なくとも0.1ms程度の精度のタイマが必要である。システムタイマは、動画再生システムのオペレーションシステムが利用するため、あまり粒度が小さいとタイマ割り込み処理が増大してしまう。そのためシステムタイマ時間間隔の粒度を小さくすることは難しい。   In video playback synchronization, if the video frame rate is 10 fps, it is ideal to display and output video frames every 100 ms from the start of playback. However, if it is 15 fps, it is 1000/15 ms, and if it is 30 fps, it is ideal to output 1000/30 ms as a cycle. For this purpose, a timer with an accuracy of at least about 0.1 ms is required. Since the system timer is used by the operation system of the moving image playback system, if the granularity is too small, timer interrupt processing increases. Therefore, it is difficult to reduce the granularity of the system timer time interval.

したがって、再生同期にシステムタイマを用いると同期再生の精度が悪くなる。   Therefore, if the system timer is used for reproduction synchronization, the accuracy of synchronous reproduction is deteriorated.

そこで、15fpsの場合は1000/15ms、30fpsの場合は1000/30msがハードウェア周期タイマの割り込み周期となるように、ハードウェア割り込み間隔のクロック数を計算して同期タイマに設定する。同期タイマは、タイマ割り込み処理内で、割り込み発生時の動作経過時間Iを計算して保持しておく。このように同期タイマは内部に動作経過時間を保持する。   Therefore, the number of clocks of the hardware interrupt interval is calculated and set to the synchronous timer so that 1000/15 ms for 15 fps and 1000/30 ms for 30 fps become the interrupt period of the hardware period timer. The synchronous timer calculates and holds an operation elapsed time I when an interrupt occurs in the timer interrupt process. In this way, the synchronization timer holds the operation elapsed time inside.

ソフトウェアプロセス(あるいはスレッド)から任意のタイミングで読み出される同期タイマの動作経過時間は、動作経過時間Iと前回の割り込みからのクロック数で計算された時間である。   The operation elapsed time of the synchronous timer read from the software process (or thread) at an arbitrary timing is a time calculated from the operation elapsed time I and the number of clocks from the previous interrupt.

次に同期タイマを使った再生同期について実施例を示す。図1の102に示す再生データ同期手段は、再生開始と同時に同期タイマをスタートさせる。動画のオーディオとビデオを同期再生するために、同期タイマの動作経過時間を利用する。同期タイマの動作経過時間を、オーディオ再生手段で計算されるオーディオの再生経過時間に合わせ、ビデオ再生手段で計算されるビデオデータの再生経過時間を同期タイマの動作経過時間に合わせるように調整することで、オーディオとビデオの再生経過時間をできるだけ一致させ、同期再生を可能としている。   Next, an embodiment of reproduction synchronization using a synchronization timer will be described. The reproduction data synchronization means 102 shown in FIG. 1 starts a synchronization timer simultaneously with the start of reproduction. In order to synchronize and play back the audio and video of the video, the elapsed time of the synchronous timer is used. Adjust the synchronization timer operation elapsed time to match the audio playback elapsed time calculated by the audio playback means, and adjust the video data playback elapsed time calculated by the video playback means to match the synchronization timer operation elapsed time. Thus, synchronized playback is possible by matching the elapsed playback time of audio and video as much as possible.

図2は、同期タイマを利用して、オーディオ再生経過時間とビデオ再生経過時間を一致させることについて模式的に表した図である。201は同期タイマの動作経過時間、202はオーディオ再生経過時間を表す。オーディオ再生経過時間は、同期タイマ動作経過時間前後の規定同期時間の範囲(204)に収まるようにする。動画再生中にオーディオ再生経過時間が204の範囲から外れたときには、同期タイマの動作経過時間をオーディオ再生経過時間となるように、同期タイマを設定したり、オーディオ再生処理を一時停止させたりする。   FIG. 2 is a diagram schematically showing that the audio playback elapsed time and the video playback elapsed time are matched by using the synchronization timer. 201 represents the elapsed operation time of the synchronization timer, and 202 represents the elapsed audio reproduction time. The audio playback elapsed time is set to fall within a specified synchronization time range (204) before and after the synchronization timer operation elapsed time. When the audio playback elapsed time is out of the range of 204 during moving image playback, the synchronization timer is set or the audio playback processing is paused so that the operation elapsed time of the synchronization timer becomes the audio playback elapsed time.

203はビデオ経過時間を表し、205はビデオフレームを表示するタイミングを示す。ビデオ再生経過時間も同様に、同期タイマ動作経過時間前後の規定同期時間の範囲(204)に収まるようにする。動画再生中にビデオ再生経過時間が204の範囲より進んでしまったときに次ビデオフレームの表示を遅らせたり、逆に204の範囲より遅れたときに次ビデオフレームの表示をスキップしたりすることにより、ビデオ再生が同期タイマの動作経過時間に沿うように制御する。   Reference numeral 203 represents a video elapsed time, and 205 represents a timing for displaying a video frame. Similarly, the video playback elapsed time is set to fall within the specified synchronization time range (204) before and after the synchronization timer operation elapsed time. By delaying the display of the next video frame when the elapsed video playback time has advanced from the range of 204 during video playback, or by skipping the display of the next video frame when it is delayed from the range of 204 The video playback is controlled so as to follow the elapsed operation time of the synchronization timer.

図1の112に示すようなオーディオデータのDMA転送では、103のオーディオ再生手段によってDMAの転送バッファに書き込まれる復号化オーディオデータを105のオーディオ出力手段に転送する。DMA転送用バッファはFIFO(First In First Out)構造になっており、先に書き込まれたデータから順次転送される。したがってオーディオ出力までには、DMA転送バッファでのバッファリングによる遅延が生じる。一般にソフトウェアプロセスからの出力データをDMA転送で出力デバイスに転送する場合、ソフトウェアプロセスは、DMA転送バッファでのバッファリングによる遅延のために、出力の正確な時刻を知ることができない。かかる問題を解決するために、請求項1にある、再生同期処理においてオーディオ出力DMAバッファのバッファリングで発生する遅延時間を考慮する方法を説明する。   In the DMA transfer of audio data as indicated by 112 in FIG. 1, the decoded audio data written in the DMA transfer buffer by the 103 audio reproducing means is transferred to the 105 audio output means. The DMA transfer buffer has a FIFO (First In First Out) structure, and is sequentially transferred from the previously written data. Therefore, there is a delay due to buffering in the DMA transfer buffer until the audio output. In general, when output data from a software process is transferred to an output device by DMA transfer, the software process cannot know the exact time of output due to a delay due to buffering in the DMA transfer buffer. In order to solve this problem, a method for taking into account the delay time generated by buffering of the audio output DMA buffer in the reproduction synchronization processing according to claim 1 will be described.

図1の103のオーディオ再生手段側の再生同期処理シーケンスを図3に示す。図3のS302では、復号化オーディオデータをDMA転送バッファに書き込む。オーディオデータの書き込みはブロッキング・ライトで行われる。すなわち書き込もうとするデータサイズが、バッファの空きサイズに収まりきらない場合に書き込めるだけのデータを先に書き込み、DMA転送でバッファに空きが出来次第、残りのデータを書き込んでいく。S302でオーディオデータを書き終えるとS303に進む。   FIG. 3 shows a playback synchronization processing sequence on the audio playback means side 103 in FIG. In S302 of FIG. 3, the decoded audio data is written into the DMA transfer buffer. Audio data is written by blocking write. In other words, if the data size to be written does not fit in the free space of the buffer, data that can be written is written first, and the remaining data is written as soon as free space is created in the buffer by DMA transfer. When the audio data has been written in S302, the process proceeds to S303.

S303ではオーディオDMAバッファに書き込まれ、転送待ちになっているオーディオデータの出力に要する所要時間を計算する。この所用時間の計算では、転送バッファにあるオーディオデータのサイズと、112のDMAのオーディオデータ転送から105のオーディオデータ出力までのハードウェア特性を用いた計算を行う。   In S303, the time required to output the audio data written in the audio DMA buffer and waiting to be transferred is calculated. In the calculation of the required time, the calculation is performed using the size of the audio data in the transfer buffer and the hardware characteristics from 112 DMA audio data transfer to 105 audio data output.

S304では、それまでにオーディオ再生手段がDMA転送バッファに書き込んだ符号化オーディオデータの総サイズ分の再生時間から、S303で計算したDMA転送待ちのオーディオデータ分の再生所要時間を差し引いた、オーディオ再生経過時間を求める。   In S304, an audio reproduction is obtained by subtracting the reproduction time for the audio data waiting for DMA transfer calculated in S303 from the reproduction time for the total size of the encoded audio data written in the DMA transfer buffer by the audio reproduction means. Find the elapsed time.

次に、S305で同期タイマの動作経過時間を調べる。   Next, the operation elapsed time of the synchronous timer is checked in S305.

S306では、S305で得た同期タイマの動作経過時間をS304で得たオーディオ再生経過時間と比較する。同期タイマの動作経過時間がオーディオ再生経過時間よりも、再生同期判定の規定時間範囲以上にも遅れているならばS307に進み、そうでないならばS308に進む。S307では同期タイマの動作経過時間をオーディオ再生経過時間に変更する。   In S306, the operation elapsed time of the synchronization timer obtained in S305 is compared with the audio reproduction elapsed time obtained in S304. If the elapsed operation time of the synchronization timer is later than the audio reproduction elapsed time by a predetermined time range or more for reproduction synchronization determination, the process proceeds to S307, and if not, the process proceeds to S308. In S307, the operation elapsed time of the synchronization timer is changed to the audio playback elapsed time.

S308では同期タイマの動作経過時間がオーディオ再生経過時間よりも、同期判定の規定時間範囲以上に進んでいるならばS309に進む。S309では時間差分だけオーディオ再生手段を一時停止する。   In S308, if the operation elapsed time of the synchronization timer has advanced beyond the audio reproduction elapsed time beyond the specified time range for synchronization determination, the process proceeds to S309. In S309, the audio playback means is temporarily stopped by the time difference.

以上の方法により、オーディオ出力手段へDMAでオーディオデータを転送する場合に、DMAバッファでのバッファリングによるオーディオ出力の遅延を考慮して、同期再生をすることが可能である。   By the above method, when audio data is transferred to the audio output means by DMA, synchronous reproduction can be performed in consideration of audio output delay due to buffering in the DMA buffer.

オーディオ再生はオーディオDMA転送のバッファにブロッキング・ライトで書き込む。このとき、オーディオデータの書き込みができるだけブロックされるようにする。すなわち再生中はオーディオデータ転送バッファを常にフルの状態にしておくことにする。例えば、前記請求項3や、オーディオ再生手段のプロセス(あるいはスレッド)を他のプロセス(あるいはスレッド)より優先させるなどの方法により実現する。   Audio playback is written to the audio DMA transfer buffer by blocking write. At this time, writing of audio data is blocked as much as possible. That is, the audio data transfer buffer is always kept full during reproduction. For example, this is realized by the method of claim 3 or giving priority to the process (or thread) of the audio playback means over other processes (or threads).

このときオーディオ再生は途切れることなく連続しており、同期再生においてオーディオ再生時間を基準とすることが可能である。また転送バッファがフルの状態では、転送待ちになっているデータサイズが一定であり、データ転送にかかる遅延時間が一定となり、オーディオ再生経過時間の計算を単純にすることが可能となる。また書き込みがブロックされるとき、他プロセスに処理実行権を移すことができる利点がある。   At this time, the audio reproduction is continuous without interruption, and the audio reproduction time can be used as a reference in the synchronous reproduction. When the transfer buffer is full, the data size waiting for transfer is constant, the delay time for data transfer is constant, and the calculation of the elapsed audio playback time can be simplified. Also, when writing is blocked, there is an advantage that the right to execute processing can be transferred to another process.

ビデオ再生とオーディオ再生では、それぞれの再生経過時間が、同期タイマの動作経過時間を基準とした規定同期時間の範囲内であることを、同期再生の判定としている。しかしオーディオ再生では、再生経過時間すなわち実際に再生出力した時間に相当するオーディオデータ量よりも、DMA転送のバッファリングによる遅延時間分に相当するデータ量の分だけ、実際に復号化したデータ量は大きい。   In video playback and audio playback, the determination of synchronous playback is that each elapsed playback time is within a specified synchronization time range based on the elapsed operation time of the synchronization timer. However, in audio playback, the amount of data actually decoded is equal to the amount of data corresponding to the delay time due to buffering of DMA transfer, rather than the amount of audio data corresponding to the elapsed playback time, that is, the actual playback output time. large.

したがって、規定同期時間に相当するオーディオデータサイズよりも転送バッファサイズが大きいほど、オーディオ再生経過時間分のオーディオデータ量よりも復号化したデータ量が大きくなり、再生同期中も、オーディオの復号化処理(図1の103)がオーバーワークしていることになる。そこで、オーディオデータのDMA転送バッファのサイズを、同期再生の規定同期時間に相当するデータサイズよりも小さく変更可能であることする。   Therefore, the larger the transfer buffer size than the audio data size corresponding to the specified synchronization time, the larger the amount of decoded data than the amount of audio data for the elapsed audio playback time, and the audio decoding process even during playback synchronization. (103 in FIG. 1) is overworked. Therefore, the size of the DMA transfer buffer for audio data can be changed to be smaller than the data size corresponding to the specified synchronization time for synchronous reproduction.

また、DMA転送バッファサイズを小さくすることで、オーディオデータの書き込みをブロックする回数を増やすこともできる。   In addition, by reducing the DMA transfer buffer size, the number of times audio data writing is blocked can be increased.

再生システムの一例を示す図である。It is a figure which shows an example of a reproduction | regeneration system. オーディオ再生経過時間とビデオ再生経過時間の一致についての模式図である。It is a schematic diagram about coincidence of audio playback elapsed time and video playback elapsed time. 同期再生処理のフローチャートである。It is a flowchart of a synchronous reproduction process.

Claims (4)

符号化されたビデオデータと符号化されたオーディオデータとを、システムタイマの出力に従って再生する再生ステップと、
前記再生された符号化オーディオデータを復号してDMA転送バッファに書き込むオーディオ復号ステップと、
前記再生された符号化ビデオデータを復号するビデオ復号ステップと、
前記再生ステップによる前記オーディオデータの再生処理とは独立して前記DMA転送バッファから前記復号されたオーディオデータを読み出してオーディオ出力デバイスに出力するオーディオ出力ステップと、
前記ビデオ復号ステップにより復号されたビデオデータをビデオ出力デバイスに出力するビデオ出力ステップと、
前記システムタイマよりも高周波のクロックをカウントする同期タイマの出力値と前記DMAバッファに蓄積された前記オーディオデータの状態から求めた出力遅延時間とに基づき、前記オーディオ出力デバイスにより出力されるオーディオデータの再生経過時間と前記ビデオ出力デバイスにより出力されるビデオデータの再生経過時間とが同期するよう前記オーディオ出力ステップとビデオ出力ステップとを制御する同期制御ステップとを有する再生方法。
A reproduction step of reproducing the encoded video data and the encoded audio data according to the output of the system timer;
An audio decoding step of decoding the reproduced encoded audio data and writing it into a DMA transfer buffer;
A video decoding step of decoding the reproduced encoded video data;
An audio output step of reading out the decoded audio data from the DMA transfer buffer and outputting the decoded audio data to an audio output device independently of the playback processing of the audio data in the playback step;
A video output step of outputting the video data decoded by the video decoding step to a video output device;
Based on an output value of a synchronous timer that counts a clock having a frequency higher than that of the system timer and an output delay time obtained from the state of the audio data stored in the DMA buffer, the audio data output by the audio output device A playback method comprising: a synchronization control step for controlling the audio output step and the video output step so that a playback elapsed time and a playback elapsed time of video data output from the video output device are synchronized.
前記ビデオデータの再生中は前記オーディオデータのDMA転送バッファを常にフルにしておくことを特徴とする請求項1記載の再生方法。   2. The reproduction method according to claim 1, wherein a DMA transfer buffer for the audio data is always full during reproduction of the video data. 前記DMAバッファによる前記オーディオデータのバッファリングの為に発生する遅延時間が、規定時間範囲より小さくなるようにバッファサイズを変更可能であることを特徴とする請求項1記載の再生方法。   2. The reproduction method according to claim 1, wherein the buffer size can be changed so that a delay time generated for buffering the audio data by the DMA buffer becomes smaller than a specified time range. 請求項1から3のいずれかに記載の方法をコンピュータにより実行するためのプログラムを記憶した記憶媒体。   A storage medium storing a program for executing the method according to claim 1 by a computer.
JP2004042969A 2004-02-19 2004-02-19 Reproduction method Withdrawn JP2005236641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004042969A JP2005236641A (en) 2004-02-19 2004-02-19 Reproduction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004042969A JP2005236641A (en) 2004-02-19 2004-02-19 Reproduction method

Publications (1)

Publication Number Publication Date
JP2005236641A true JP2005236641A (en) 2005-09-02

Family

ID=35019149

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004042969A Withdrawn JP2005236641A (en) 2004-02-19 2004-02-19 Reproduction method

Country Status (1)

Country Link
JP (1) JP2005236641A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101353877B1 (en) * 2007-06-29 2014-01-22 엘지전자 주식회사 Apparatus and method for displaying moving picture
US8850084B2 (en) 2011-03-24 2014-09-30 Samsung Electronics Co., Ltd. Data processing systems for audio signals and methods of operating same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101353877B1 (en) * 2007-06-29 2014-01-22 엘지전자 주식회사 Apparatus and method for displaying moving picture
US8850084B2 (en) 2011-03-24 2014-09-30 Samsung Electronics Co., Ltd. Data processing systems for audio signals and methods of operating same

Similar Documents

Publication Publication Date Title
US8270800B2 (en) Information processing apparatus and method, recording medium, and program
KR100862630B1 (en) System and method for synchronizing video frames and audio frames
US20060012709A1 (en) Method of generating video reproduction synchronizing signal, program for generating video reproduction synchronizing signal, timing control apparatus, method of synchronously reproducing video and audio, program for synchronously reproducing video and audio, and apparatus for synchronously reproducing video and audio
WO2013182011A1 (en) Method and system of playing real time online video at variable speed
EP3089471A1 (en) Video smoothing method and device
US20080075175A1 (en) Information processing apparatus and method
US9742966B2 (en) Data processing system
EP1231791A2 (en) Method and apparatus for synchronously reproducing audio and video data
JP2005236641A (en) Reproduction method
JP5101668B2 (en) Digital video recording and playback device
US6339669B1 (en) Picture-reproducing apparatus
JP2007049466A (en) Synchronizing reproducing method and synchronizing reproducing software
JP6894736B2 (en) Recording device, control method, and program
JP2006066995A (en) Image reproducer, its control method and program, and storage medium
JPH06233269A (en) Video/audio synchronization system
JP2003324690A (en) Video record playback device
JP2005173775A (en) Data processor and method therefor, and encoding device
CN101964203B (en) Recording playback apparatus, recording-playback control method, and editing system
JP6347204B2 (en) REPRODUCTION CONTROL DEVICE, REPRODUCTION CONTROL METHOD, AND PROGRAM
JP3509658B2 (en) Operation mode switching circuit and method
JP2004120053A (en) Data supply apparatus
JPH11150727A (en) Mpeg decoder
JP2003046805A (en) Signal converting method and device, and image signal processor
JP2010074558A (en) Video audio recording reproducing apparatus and video audio reproducing method
JP2001008170A (en) Synchronous reproducing device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070501