JP4390666B2 - Method and apparatus for decoding and reproducing compressed video data and compressed audio data - Google Patents
Method and apparatus for decoding and reproducing compressed video data and compressed audio data Download PDFInfo
- Publication number
- JP4390666B2 JP4390666B2 JP2004266201A JP2004266201A JP4390666B2 JP 4390666 B2 JP4390666 B2 JP 4390666B2 JP 2004266201 A JP2004266201 A JP 2004266201A JP 2004266201 A JP2004266201 A JP 2004266201A JP 4390666 B2 JP4390666 B2 JP 4390666B2
- Authority
- JP
- Japan
- Prior art keywords
- picture
- decoding
- audio
- video
- data stream
- 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
Links
Images
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
- Television Signal Processing For Recording (AREA)
Description
本発明は、圧縮映像データ及び圧縮音声データの復号再生方法及び復号再生装置に関し、特に、途中再生時に映像データと音声データの同期再生を行う方法に関するものである。 The present invention relates to a method for decoding and reproducing compressed video data and compressed audio data, and more particularly to a method for performing synchronous reproduction of video data and audio data during intermediate reproduction.
デジタル化された映像データ、音声データを圧縮符号化し、1本のデータストリームに多重化する方式としてMPEG1方式がある。MPEG1システムストリームのデータ構造について図3を用いて説明する。MPEG1方式によって圧縮符号化された映像データストリーム及び音声データストリームは、エレメンタリーストリームと呼ばれる。これらのエレメンタリーストリームはパケットと呼ばれる単位に分割されて多重化される。パケットには、パケットヘッダが付加され、パケットヘッダにはデータストリームを識別するためのストリーム識別コード、同期再生を行うための時間情報であるPTS(Presentation Time Stamp)、さらに画像データの場合はデータ復号順序を示す時間情報であるDTS(Decoding Time Stamp)等が記述される。 There is an MPEG1 system as a system for compressing and encoding digitized video data and audio data and multiplexing the data into a single data stream. The data structure of the MPEG1 system stream will be described with reference to FIG. A video data stream and an audio data stream that are compression-encoded according to the MPEG1 system are called elementary streams. These elementary streams are divided and multiplexed into units called packets. A packet header is added to the packet. The packet header includes a stream identification code for identifying a data stream, a PTS (Presentation Time Stamp) that is time information for performing synchronous reproduction, and, in the case of image data, data decoding. A DTS (Decoding Time Stamp), which is time information indicating the order, is described.
さらに、任意の数のパケットの集合によるパックと呼ばれる単位が形成される。パックにはパックヘッダが付加され、パックヘッダには、パック開始コード、SCR(System Clock Reference)と呼ばれる基準クロック情報等が記述される。MPEG1システムでは、映像と音声の同期再生を行うためにSTC(System Time Clock)と呼ばれる基準時間が定義されており、MPEG1復号再生装置は90kHzのSTCを備えている。従来のMPEG1復号再生装置は、パックヘッダ中のSCRを参照して符号化時の基準時間をSTCで再現することにより、映像と音声を同期再生する際に必要な基準時間を確定する。 Furthermore, a unit called a pack is formed by a set of an arbitrary number of packets. A pack header is added to the pack, and a pack start code, reference clock information called SCR (System Clock Reference), and the like are described in the pack header. In the MPEG1 system, a reference time called STC (System Time Clock) is defined in order to perform synchronized playback of video and audio, and the MPEG1 decoding / playback apparatus has a 90 kHz STC. The conventional MPEG1 decoding / playback apparatus determines the reference time required for synchronous playback of video and audio by reproducing the reference time at the time of encoding with STC by referring to the SCR in the pack header.
また、図3に示すように、パックヘッダの後にシステムヘッダを付加することもでき、システムヘッダには、個々のエレメンタリーストリームのビットレート等が記述される。このように、パック単位に映像、音声等の複数のエレメンタリーストリームを多重化して1本のストリームとしたものをMPEG1システムストリームと呼ぶ。 Also, as shown in FIG. 3, a system header can be added after the pack header, and the bit rate of each elementary stream is described in the system header. In this manner, a stream obtained by multiplexing a plurality of elementary streams such as video and audio in units of packs is called an MPEG1 system stream.
次に、MPEG1システムストリームから映像データ及び音声データの同期再生を行う従来のMPEG1復号再生装置40の構成を、図4を用いて説明する。復号再生を行う際には、転送装置41から出力されたMPEG1システムストリームがDEMUX42に入力される。ここで、転送装置41は、CD−ROM、ハードディスク等の記憶媒体からMPEG1システムストリームを抽出して出力する装置である。DEMUX42は、パケットヘッダ内のストリーム識別コードに基づいて、入力されたMPEG1システムストリームを映像データストリーム(ビデオエレメンタリストリーム、以下ビデオESと呼ぶ)と音声データストリーム(オーディオエレメンタリストリーム、以下オーディオESと呼ぶ)に分離するデマルチプレクサであり、それぞれをビデオデコーダ44、オーディオデコーダ45に出力する。
Next, the configuration of a conventional MPEG1 decoding /
また、DEMUX42は、パックヘッダから抽出したSCRの値をSTC生成部43に出力する。STC生成部43は、受信したSCR値と自己のSTCが一致するよう調整を行い、ビデオデコーダ44及びオーディオデコーダ45にSTCを配信する。具体的には、SCRに符号化時の基準時刻が90kHz単位のカウンタ値で示されており、STC生成部43は、自己が備えているSTCカウンタの値を受信したSCRに一致させることにより、符号化時の基準時刻を再現する。
Further, the
ビデオデコーダ44は、DEMUX42から受信したビデオESをデコードし、映像信号を出力する。受信したビデオESは、いったん入力バッファ441に蓄積される。DTS・PTS比較部443は、入力バッファ441に蓄積されたビデオESからDTS及びPTSを取得し、取得したDTS及びPTSをSTC生成部43から配信される基準時間STCと比較する。さらに、DTS・PTS比較部443は、DTSとSTCが一致するタイミングでビデオESに含まれるピクチャのデコードを行うようビデオ復号部442に対して指示し、PTSとSTCが一致するタイミングでデコード後の映像信号を出力するようビデオ復号部442に対して指示する。ビデオ復号部442は、入力バッファ441からビデオESを取得し、DTS・PTS比較部443が指示するタイミングに従ってデコードを行い、デコード後の映像信号を出力する。
The video decoder 44 decodes the video ES received from the
オーディオデコーダ45は、DEMUX42から受信したオーディオESをデコードし、音声信号を出力する。受信したオーディオESは、いったん入力バッファ451に蓄積される。PTS比較部453は、入力バッファ451に蓄積されたオーディオESからPTSを取得し、取得したPTSをSTC生成部43から配信されるSTCと比較する。さらに、PTS比較部453は、PTSとSTCが一致するタイミングでデコード後の音声信号を出力するようオーディオ復号部452に対して指示する。オーディオ復号部452は、入力バッファ451からオーディオESを取得してデコードを行い、PTS比較部453が指示するタイミングに従ってデコード後の映像信号を出力する。
The audio decoder 45 decodes the audio ES received from the
上述したように、従来のMPEG1復号再生装置40では、パケットヘッダに含まれているPTSに従って映像データ及び音声データの再生出力タイミングを決定してすることにより、映像と音声の同期再生を可能としている。なお、MPEG1システムストリームの途中から再生を行う場合(以下、途中再生と呼ぶ)であっても、PTSを用いることによって映像と音声の同期(以下、AV同期と呼ぶ)が可能である。以下では、途中再生時におけるPTSを用いたAV同期処理について、図5及び図6を参照して説明する。
As described above, the conventional MPEG1 decoding /
図5は、途中再生時のAV同期を示すタイミング図である。図5の横軸はSTC値を示している。このSTC値は、STC生成部43において、パックヘッダから取得したSCR値と一致するよう決められて配信されるものである。図5(a)は、途中再生時に転送装置41及びDEMUX42を経由して、ビデオESがビデオデコーダ44の備える入力バッファ441に入力されるタイミングを示している。図中のI1、P1、B1等はそれぞれ、Iピクチャ、Pピクチャ、Bピクチャのフレームであることを示している。図5(b)及び(c)は、図5(a)に示すビデオESの各ピクチャに付与されたPTS値及びDTS値を示している。
FIG. 5 is a timing chart showing AV synchronization during playback. The horizontal axis in FIG. 5 indicates the STC value. This STC value is determined and distributed by the
ここで、Iピクチャ、Pピクチャ及びBピクチャとは、映像フレーム(ピクチャ)の符号化方法の違いを示したものであり、MPEG1方式では、ビデオESを構成するピクチャは、Iピクチャ、Pピクチャ及びBピクチャのいずれかに符号化される。Iピクチャは、自己のフレーム(ピクチャ)内の情報だけを使用して符号化するフレーム内符号化方式により符号化されており、他のピクチャの情報を必要とせずに復号を行うことができる。一方、Pピクチャは、過去のIピクチャから順方向のフレーム(ピクチャ)間予測を行って差分を符号化したものであり、デコードの際には過去のIピクチャの情報を必要とする。さらに、Bピクチャは、過去及び未来の2つのピクチャからピクチャ間予測符号化を行ったものであり、デコードの際には過去のIピクチャの情報に加えて未来のPピクチャの情報を必要とする。 Here, the I picture, the P picture, and the B picture indicate differences in the encoding method of the video frame (picture). In the MPEG1 system, the pictures constituting the video ES are the I picture, the P picture, and the picture. It is encoded into one of the B pictures. The I picture is encoded by an intra-frame encoding method that encodes using only information in its own frame (picture), and can be decoded without requiring information of other pictures. On the other hand, a P picture is obtained by encoding a difference by performing inter-frame prediction in the forward direction from a past I picture, and information on the past I picture is required for decoding. Further, the B picture is obtained by performing inter-picture predictive coding from two past and future pictures. In decoding, B picture information in addition to past I picture information is required. .
図5(f)は、図5(c)のDTS値に従って図5(a)のビデオ復号部442においてビデオESがデコードされるタイミングを示したものである。ここで、デコードされるピクチャの先頭はピクチャI1であり、DTS値が99乃至101であるピクチャP1、B1及びB2のデコードは行われない。これは、ピクチャP1、B1及びB2をデコードする際に必要となる過去のIピクチャが途中再生されたビデオES中に存在せず、これらのフレーム間予測符号化されたピクチャをデコードすることができないためである。このため、単独でデコード可能なピクチャI1からデコードが開始される。なお、デコードすることができないピクチャP1、B1及びB2は入力バッファ441及びビデオ復号部442から廃棄される。
FIG. 5F shows the timing at which the video ES is decoded in the
図5(g)は、図5(b)のPTS値に従ってデコードされた映像信号がビデオ復号部442から出力されるタイミングを示したものである。上述したように、ピクチャP1、B1及びB2はデコード不可能であるため、I1に対応する映像信号から出力が行われる。
FIG. 5G shows the timing when the video signal decoded according to the PTS value of FIG. 5B is output from the
一方、図5(d)は、オーディオESがオーディオデコーダ45の備える入力バッファ451に入力されるタイミングを示しており、図5(e)は、図5(d)のオーディオESに対応するPTS値を示している。また、図5(h)は、ビデオ復号部442において図5(e)のPTS値に従って図5(d)のオーディオESがデコードされ、デコード後の音声信号が出力されるタイミングを示したものである。音声信号の出力は、STC値100の時点からA1の出力を開始することとしてもよいが、通常は、映像信号出力が可能となるSTC値103の時点から、映像信号I1と同一のPTS値を持つ音声信号A4の出力を開始することにより、映像と音声の再生を同時に始めることが行われている。
On the other hand, FIG. 5D shows the timing at which the audio ES is input to the
図6は、PTSを用いたAV同期処理の手順を示すフローチャートである。ステップS1では、オーディオデコーダ45が備えるPTS比較部453が、途中再生されたオーディオESの先頭パケットに付与されたオーディオPTSを取得する。ステップS2では、ビデオデコーダ44が備えるビデオ復号部442が、入力バッファ441に蓄積されているビデオESからピクチャを順次読み出して取得する。ビデオ復号部442では読み出したピクチャがIピクチャであるか判定を行い(ステップS3)、Iピクチャでないピクチャは、上述したようにデコード不可能であるため、取得したピクチャを廃棄して次のピクチャの読み出しを行う。他方、読み出したピクチャがIピクチャである場合は、DTS・PTS比較部443において、当該Iピクチャに付与されたPTS及びDTSの取得が行われる(ステップS4)。
FIG. 6 is a flowchart showing a procedure of AV synchronization processing using PTS. In step S1, the
ステップS5では、オーディオデコーダ45が備えるPTS比較部453が、STC生成部43から配信されるSTCの値とステップS1で取得したPTS値との比較を行って、両者が一致するタイミングでオーディオ復号部452に対してデコード後の音声信号を出力するよう指示する。ステップS6では、PTS比較部453から指示されたタイミングに従って、オーディオ復号部452がオーディオESのデコード及び音声信号の出力を行う。
In step S5, the
ステップS7では、DTS・PTS比較部443が、STC生成部43から配信されるSTCの値とステップS4で取得したPTS及びDTSの値との比較を行って、両者が一致するタイミングでビデオ復号部442に対してピクチャのデコード及びデコード後の映像信号の出力を行うよう指示する。ステップS8では、DTS・PTS比較部443から指示されたタイミングに従って、ビデオ復号部442がピクチャのデコード及び映像信号の出力を行う。
In step S7, the DTS /
以上に説明したように、従来のMPEG1復号再生装置では、ビデオPTS及びオーディオPTSがSTCカウンタの値と一致するタイミングで映像信号及び音声信号の出力を開始することにより、途中再生の場合であってもAV同期を行うことができる。このように、PTSを用いてAV同期を確立することにより途中再生を行う復号再生装置は、例えば、特許文献1乃至2に開示されている。
上述したように、従来のMPEG1復号再生装置で行われるAV同期処理は、PTSを使用して行われている。しかしながら、ISO/IEC11172−1に定められるMPEG1規格では、必ずしも全てのピクチャにビデオPTSを付与する必要はなく、MPEG1システムストリームの先頭に位置するピクチャ以外のピクチャをパケット化する際には、ビデオPTSを付与しないことも許容されている。ビデオPTSが付与されなければ、上述したPTSを使用する方式によってAV同期を行うことはできない。このように、ビデオPTSが付与されていないMPEG1システムストリームの復号再生を開始すると、AV同期が取れないばかりでなく、映像と音声の再生開始タイミングの同期を取ることもできないため、映像と音声の出力を同時に開始することができないという課題がある。具体的には、PTSとSTCの一致による再生タイミングの決定ができないために、映像信号の出力は最初に取得したIピクチャに相当する映像信号から開始し、音声信号の出力はオーディオESの先頭に相当する音声信号から開始すると、両者の出力開始時間には、先頭のIピクチャを取得前にデコードされずに廃棄されるピクチャの再生時間の分だけタイムラグが生じることになる。 As described above, the AV synchronization processing performed in the conventional MPEG1 decoding / playback apparatus is performed using PTS. However, in the MPEG1 standard defined in ISO / IEC11172-1, it is not always necessary to assign a video PTS to all pictures. When a picture other than the picture located at the head of the MPEG1 system stream is packetized, the video PTS is used. It is also allowed not to give. If no video PTS is given, AV synchronization cannot be performed by the above-described method using the PTS. As described above, when the decoding and reproduction of the MPEG1 system stream to which the video PTS is not added is started, not only AV synchronization cannot be established but also the reproduction start timing of the video and audio cannot be synchronized. There is a problem that output cannot be started simultaneously. Specifically, since the reproduction timing cannot be determined based on the coincidence of PTS and STC, the output of the video signal starts from the video signal corresponding to the first acquired I picture, and the output of the audio signal is at the head of the audio ES. When starting from the corresponding audio signal, a time lag is generated in the output start time of both of them corresponding to the reproduction time of the picture discarded without being decoded before the leading I picture is acquired.
本発明にかかる復号再生方法は、少なくとも画像フレームをフレーム内符号化した第1ピクチャ及び画像フレームをフレーム間予測符号化した第2ピクチャにより構成される圧縮映像データストリームと圧縮音声データストリームから、映像データ及び音声データの復号再生を行う方法であって、前記圧縮映像データストリームの先頭からみて最初の前記第1ピクチャを検出し、前記圧縮映像データストリームの先頭から前記最初の第1ピクチャの直前に位置する前記第2ピクチャまでを再生した場合の再生時間を算出し、前記最初の第1ピクチャを復号化して得られる映像データから映像出力を開始し、前記圧縮音声データストリームを復号化して得られる音声データストリームの先頭から、前記再生時間分だけ後の音声データより音声出力を開始するものである。 The decoding / reproducing method according to the present invention includes a compressed video data stream and a compressed audio data stream that are composed of at least a first picture obtained by intra-coding an image frame and a second picture obtained by inter-frame predictive coding an image frame. A method for decoding and reproducing data and audio data, wherein the first picture is detected as viewed from the head of the compressed video data stream, and immediately before the first picture from the head of the compressed video data stream. Obtained by calculating a reproduction time when reproducing up to the second picture located, starting video output from video data obtained by decoding the first first picture, and decoding the compressed audio data stream From the beginning of the audio data stream, the audio data is output from the audio data after the playback time. It is intended to start.
一方、本発明にかかる復号再生装置は、少なくとも画像フレームをフレーム内符号化した第1ピクチャ及び画像フレームをフレーム間予測符号化した第2ピクチャにより構成される圧縮映像データストリームから映像データを復号再生するビデオデコーダと、圧縮音声データストリームから音声データを復号再生するオーディオデコーダとを備え、前記ビデオデコーダは、前記圧縮映像データストリームの先頭からみて最初の前記第1ピクチャを復号化して得られる映像データから映像出力を開始し、前記オーディオデコーダは、前記圧縮音声データストリームを復号化して得られる音声データストリームの先頭から、前記最初の第1ピクチャより前に位置する全てのピクチャの再生時間に対応する音声データを飛び越し、前記再生時間に対応する音声データより後の音声データより音声出力を開始するよう構成したものである。 On the other hand, the decoding / reproducing apparatus according to the present invention decodes / reproduces video data from a compressed video data stream including at least a first picture obtained by intra-coding an image frame and a second picture obtained by inter-frame predictive coding an image frame. And a video decoder obtained by decoding the first picture as viewed from the beginning of the compressed video data stream. Video output is started, and the audio decoder corresponds to the playback time of all pictures located before the first first picture from the beginning of the audio data stream obtained by decoding the compressed audio data stream. Audio data is skipped and the playback time is Those configured to start a voice output from the voice data after the audio data.
本発明にかかる復号再生方法又は復号再生装置によれば、音声信号の出力開始タイミングを前記最初の第1ピクチャより前に位置するピクチャの再生時間に相当する時間だけ遅らせることができる。さらには、前記最初の第1ピクチャより前に位置するピクチャはデコードできないため、音声信号の再生開始時には再生可能な映像信号の存在しない時間がある。本発明にかかる復号再生方法又は復号再生装置によれば、この映像信号が存在しない時間に対応する音声信号を除いて再生を開始することができる。これにより、ビデオPTSが検出されない場合であっても、音声信号の再生開始タイミングを映像信号の再生開始タイミングに合わせることが可能となる。 According to the decoding / reproducing method or the decoding / reproducing apparatus according to the present invention, the output start timing of the audio signal can be delayed by a time corresponding to the reproduction time of the picture located before the first first picture. Furthermore, since a picture positioned before the first first picture cannot be decoded, there is a time when there is no reproducible video signal at the start of reproduction of the audio signal. According to the decoding / reproducing method or the decoding / reproducing apparatus according to the present invention, reproduction can be started except for the audio signal corresponding to the time when the video signal does not exist. Thereby, even when the video PTS is not detected, it is possible to match the reproduction start timing of the audio signal with the reproduction start timing of the video signal.
本発明により、圧縮符号化された映像ストリームにPTS等の再生時間情報が付与されていない場合であっても、映像と音声の再生開始タイミングを合わせることができる。 According to the present invention, even when playback time information such as PTS is not added to a compression-encoded video stream, the playback start timing of video and audio can be matched.
発明の実施の形態1.
図1に本発明の実施の形態1にかかるMPEG1復号再生装置10の構成を示す。MPEG1復号再生装置10は、廃棄ピクチャ数をカウントするためのピクチャカウンタ144をビデオデコーダ14に備え、ピクチャカウンタ144に集計された廃棄ピクチャ数から音声信号出力時のオフセット時間を算出するオフセット算出部154をオーディオデコーダ15に備えている。MPEG1復号再生装置10が備える転送装置41、DEMUX42及びSTC生成部43の機能は、従来のMPEG1復号再生装置40が備えるものと同等であるため、説明を省略する。
FIG. 1 shows a configuration of an MPEG1 decoding /
ビデオデコーダ14は、DEMUX42から受信したビデオESをデコードし、映像信号の出力を行う。ここで、入力バッファ441及びDTS・PTS比較部443の機能は、図4に示した従来のMPEG1復号再生装置40が備えるものと同等である。
The video decoder 14 decodes the video ES received from the DEMUX 42 and outputs a video signal. Here, the functions of the
ビデオ復号部142は、従来のMPEG1復号再生装置40が備えるビデオ復号部442と同様に、入力バッファ441からピクチャを取得し、DTS・PTS比較部443の指示によって、DTSで示される復号順序に従ってデコードを行い、PTSで示される再生順序に従って復号後の映像信号を出力できるよう構成されている。加えて、ビデオ復号部142は、PTSが取得できないためにDTS・PTS比較部443から再生タイミングの指示を得られない場合には、先頭Iピクチャから順次再生を行うよう構成されている。
Similar to the
ビデオ復号部142は、ビデオESの先頭に位置するIピクチャを取得するまでPピクチャ及びBピクチャの廃棄を行う点も従来のビデオ復号部442と同様であるが、さらに、ピクチャカウンタ144に対してピクチャを廃棄したことを通知するよう構成されている。ピクチャカウンタ144は、ビデオ復号部142においてビデオESの先頭に位置するIピクチャを検出するまでに廃棄されたピクチャ数を計数するカウンタであり、ビデオ復号部142がピクチャを廃棄した旨の通知を受けて廃棄ピクチャ数を順次カウントしていく。
The
オーディオデコーダ15は、DEMUX42から受信したオーディオESをデコードし、音声信号の出力を行う。ここで、入力バッファ451及びPTS比較部453の機能は、従来のMPEG1復号再生装置40が備えるものと同等である。
The
オフセット算出部154は、ピクチャカウンタ144が保持する廃棄ピクチャ数を参照して、廃棄ピクチャ数に相当する再生時間TPの算出を行う。再生時間TPは以下の式(1)、
TP=PIC_CNT×TF ・・・・(1)
により算出する。ここで、PIC_CNTは廃棄ピクチャ数であり、TFは1ピクチャ当たりの再生時間である。TFの値は、ビデオESが従うテレビ信号形式によって定まるものであり、NTSC方式であれば1/30秒、PAL方式であれば1/24秒である。
Offset
T P = PIC_CNT × T F (1)
Calculated by Here, PIC_CNT is discarded number of pictures, T F is the reproduction time per picture. The value of TF is determined by the television signal format followed by the video ES, and is 1/30 seconds for the NTSC system and 1/24 seconds for the PAL system.
オーディオ復号部152は、従来のMPEG1復号再生装置40が備えるオーディオ復号部452と同様に、入力バッファ451からオーディオESを取得し、PTS比較部453の指示によって、PTSで示される再生タイミングに従ってデコード後の映像信号を出力できるよう構成されている。加えて、オーディオ復号部152は、オフセット算出部154で算出された廃棄ピクチャ数に相当する再生時間TP分のオーディオデータを再生される音声信号の先頭から廃棄することにより、出力開始タイミングを遅らせて出力を開始できるよう構成されている。
The
このような構成により、映像ストリームにPTSが付与されていない場合であっても、映像と音声の再生開始タイミングを合わせることが可能となる。 With such a configuration, it is possible to match the playback start timing of video and audio even when no PTS is added to the video stream.
続いて、本実施の形態にかかるMPEG1復号再生装置10で行うAV同期及び再生タイミングの同期処理フローを、図2を用いて説明する。なお、ピクチャにビデオPTSが付与されており、ビデオPTSの取得が可能である場合におけるAV同期処理は、図6を用いて説明した従来の処理と同様であるため、これに関する処理ステップには、図6と同じ記号を付与している。
Next, an AV synchronization and playback timing synchronization processing flow performed by the MPEG1 decoding /
まず、ステップS1からS3は、図6を用いて説明した従来の処理と同様である。ステップS22では、ステップS3において取得したピクチャがPピクチャ又はBピクチャであるためにピクチャ廃棄を行った場合、ピクチャカウンタ144が保持する廃棄ピクチャ数のカウントアップを行う。 First, steps S1 to S3 are the same as the conventional processing described with reference to FIG. In step S22, when the picture is discarded because the picture acquired in step S3 is a P picture or a B picture, the number of discarded pictures held by the picture counter 144 is counted up.
ステップS21では、ステップS3において取得した先頭IピクチャにビデオPTSが付与されているか否かの判定が、DTS・PTS比較部443において行われる。ビデオPTSが付与されている場合は、ステップS4からS8の処理を行うが、これらの処理ステップは図6を用いて説明した従来の処理ステップと同様であるため説明を省略する。
In step S21, the DTS /
他方、ステップS21において先頭IピクチャにビデオPTSが付与されていないと判断された場合は、ステップS23からS25の処理を行う。ステップS23では、オフセット算出部154が、上述した(1)式により廃棄ピクチャ数に相当する再生時間TPの算出を行う。続く、ステップS24では、オーディオ復号部152が、再生時間TP分のオーディオデータを、オーディオESの先頭から廃棄する。最後に、ステップS25では、ビデオ復号部142が先頭Iピクチャから映像信号の出力を開始し、オーディオ復号部152がオーディオデータ廃棄後の先頭データから音声信号の出力を開始する。
On the other hand, if it is determined in step S21 that the video PTS is not assigned to the first I picture, the processing from steps S23 to S25 is performed. In step S23, the offset
このように処理することにより、音声信号の出力開始タイミングを、ビデオデコーダ14において廃棄されたピクチャの再生時間に相当する時間だけ遅くすることができ、さらに、映像信号が存在しない部分の音声信号を除いて再生を開始することができる。これによって、ビデオPTSが検出されない場合であっても、映像信号と音声信号の再生開始タイミングを合わせることが可能となる。 By processing in this way, the output start timing of the audio signal can be delayed by a time corresponding to the reproduction time of the picture discarded in the video decoder 14, and the audio signal of the portion where no video signal exists is further reduced. Excluding playback can be started. Thereby, even when the video PTS is not detected, the reproduction start timing of the video signal and the audio signal can be matched.
なお、以上の説明では、MPEG1システムストリームを復号再生する際にビデオESからビデオPTSを取得できない場合に、映像信号と音声信号の再生開始タイミングを合わせることができる復号再生装置について説明したが、本発明はMPEG1復号再生装置に限定されるものではなく、MPEG2プログラムストリームを復号再生するMPEG2復号再生装置において、PES(Packetized Elementary Stream)パケットからピクチャの再生タイミングを指示するPTSが取得できないときにも適用可能であることは言うまでもない。 In the above description, the decoding / playback apparatus that can match the playback start timing of the video signal and the audio signal when the video PTS cannot be obtained from the video ES when the MPEG1 system stream is decoded and played back has been described. The invention is not limited to the MPEG1 decoding / playback apparatus, and is also applicable to the MPEG2 decoding / playback apparatus that decodes / plays back an MPEG2 program stream when a PTS indicating the playback timing of a picture cannot be obtained from a PES (Packetized Elementary Stream) packet. It goes without saying that it is possible.
10 MPEG1復号再生装置
14 ビデオデコーダ
15 オーディオデコーダ
144 ピクチャカウンタ
154 オフセット算出部
DESCRIPTION OF
Claims (5)
前記圧縮映像データストリームの先頭からみて最初の前記第1ピクチャを検出し、
前記圧縮映像データストリームにおいて前記最初の第1ピクチャより表示順序が前に位置する全てのピクチャを再生したと仮定した場合の再生時間を算出し、
前記最初の第1ピクチャを復号化して得られる映像データから映像出力を開始し、
前記圧縮音声データストリームを復号化して得られる音声データストリームの先頭から、前記再生時間分だけ後の音声データより音声出力を開始する復号再生方法。 Video data and audio data are decoded and reproduced from a compressed video data stream and a compressed audio data stream which are composed of at least a first picture obtained by intra-coding an image frame and a second picture obtained by inter-frame predictive coding an image frame. A method,
Detecting the first first picture viewed from the beginning of the compressed video data stream;
Calculating a playback time when it is assumed that all pictures whose display order is positioned before the first first picture in the compressed video data stream are played back;
Starting video output from video data obtained by decoding the first first picture;
A decoding / reproducing method for starting audio output from audio data after the reproduction time from the head of an audio data stream obtained by decoding the compressed audio data stream.
圧縮音声データストリームから音声データを復号再生するオーディオデコーダとを備え、
前記ビデオデコーダは、前記圧縮映像データストリームの先頭からみて最初の前記第1ピクチャを復号化して得られる映像データから映像出力を開始し、
前記オーディオデコーダは、前記圧縮音声データストリームを復号化して得られる音声データストリームの先頭から、前記最初の第1ピクチャより表示順序が前に位置する全てのピクチャの再生時間に対応する音声データを飛び越し、前記再生時間に対応する音声データより後の音声データより音声出力を開始することを特徴とする復号再生装置。 A video decoder that decodes and reproduces video data from a compressed video data stream composed of at least a first picture obtained by intra-coding an image frame and a second picture obtained by inter-frame predictive coding an image frame;
An audio decoder that decodes and reproduces audio data from the compressed audio data stream;
The video decoder starts video output from video data obtained by decoding the first picture as viewed from the beginning of the compressed video data stream;
The audio decoder skips audio data corresponding to playback times of all the pictures whose display order is located before the first first picture from the beginning of the audio data stream obtained by decoding the compressed audio data stream. A decoding / reproducing apparatus, wherein audio output is started from audio data after audio data corresponding to the reproduction time.
前記オーディオデコーダは、前記圧縮音声データストリームを復号化して得られる音声データストリームの先頭から、前記算出手段において算出された再生時間分だけ後の音声データより音声出力を開始する請求項3に記載の復号再生装置。 Further comprising a calculating means for calculating the playback time,
4. The audio decoder according to claim 3, wherein the audio decoder starts audio output from audio data after the reproduction time calculated by the calculation means from the head of the audio data stream obtained by decoding the compressed audio data stream. Decoding and playback device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004266201A JP4390666B2 (en) | 2004-09-14 | 2004-09-14 | Method and apparatus for decoding and reproducing compressed video data and compressed audio data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004266201A JP4390666B2 (en) | 2004-09-14 | 2004-09-14 | Method and apparatus for decoding and reproducing compressed video data and compressed audio data |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006086553A JP2006086553A (en) | 2006-03-30 |
JP4390666B2 true JP4390666B2 (en) | 2009-12-24 |
Family
ID=36164740
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004266201A Expired - Fee Related JP4390666B2 (en) | 2004-09-14 | 2004-09-14 | Method and apparatus for decoding and reproducing compressed video data and compressed audio data |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4390666B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5656394B2 (en) * | 2009-12-01 | 2015-01-21 | キヤノン株式会社 | Moving picture reproducing apparatus and program |
-
2004
- 2004-09-14 JP JP2004266201A patent/JP4390666B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2006086553A (en) | 2006-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4311570B2 (en) | Playback apparatus, video decoding apparatus, and synchronous playback method | |
KR101132043B1 (en) | Decoder and decoding method | |
JP5059301B2 (en) | Synchronous playback apparatus and synchronous playback method | |
US20060203287A1 (en) | Reproducing apparatus and method, and recording medium | |
JP3692164B2 (en) | MPEG decoder | |
JP4775208B2 (en) | REPRODUCTION METHOD, REPRODUCTION PROGRAM, AND REPRODUCTION DEVICE | |
JP4294660B2 (en) | REPRODUCTION DEVICE, REPRODUCTION METHOD, AND RECORDING MEDIUM THEREOF | |
KR20060099687A (en) | Device of video-synchronization using time stamp and method thereof | |
KR19980080385A (en) | Synchronous delay control device and method | |
JP2001204032A (en) | Mpeg decoder | |
JP4390666B2 (en) | Method and apparatus for decoding and reproducing compressed video data and compressed audio data | |
JP3087826B2 (en) | MPEG encoded image data decoding device | |
JP3542976B2 (en) | Method and apparatus for reproducing compressed encoded data | |
JP2008176918A (en) | Reproducing apparatus and method, and recording medium | |
JP2006352587A (en) | Information processor | |
JP4690965B2 (en) | Data recording / reproducing device | |
JP5168105B2 (en) | Audio reproduction device and audio reproduction method | |
JP2002033712A (en) | Packet processor and packet output method therefor | |
JP3975503B2 (en) | Information reproducing apparatus and reproducing method | |
JPH099215A (en) | Data multiplex method, data transmission method, multiplex data decoding method and multiplex data decoder | |
WO2009090865A1 (en) | Dynamic image data decoding/reproduction device and dynamic image data decoding device | |
JPH1083632A (en) | Digital signal coding method and device, digital signal transmitting method and signal recording medium | |
JP4342977B2 (en) | Recording / reproducing apparatus, control method for recording / reproducing apparatus, control program for recording / reproducing apparatus, and recording medium storing control program for recording / reproducing apparatus | |
JP2002152678A (en) | Mpeg stream reproducing method | |
JP2004104733A (en) | Multimedia decoding and reproducing apparatus and synchronization control method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20060223 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070618 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090401 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090407 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090513 |
|
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: 20090908 |
|
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: 20091006 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121016 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121016 Year of fee payment: 3 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121016 Year of fee payment: 3 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121016 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131016 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |