JP2007221505A - Decoding method and device - Google Patents

Decoding method and device Download PDF

Info

Publication number
JP2007221505A
JP2007221505A JP2006040320A JP2006040320A JP2007221505A JP 2007221505 A JP2007221505 A JP 2007221505A JP 2006040320 A JP2006040320 A JP 2006040320A JP 2006040320 A JP2006040320 A JP 2006040320A JP 2007221505 A JP2007221505 A JP 2007221505A
Authority
JP
Japan
Prior art keywords
image data
decoding
time
data
video signal
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
JP2006040320A
Other languages
Japanese (ja)
Inventor
Katsuhiko Kimura
克彦 木村
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.)
Oki Electric Industry Co Ltd
Oki Comtec Ltd
Original Assignee
Oki Electric Industry Co Ltd
Oki Comtec 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 Oki Electric Industry Co Ltd, Oki Comtec Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2006040320A priority Critical patent/JP2007221505A/en
Publication of JP2007221505A publication Critical patent/JP2007221505A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent image data decoded from encoded data from being reproduced by specifying the encoded data that is encoded when a video signal is asynchronously switched without using excess elements. <P>SOLUTION: A decoding part 3 includes a network interface part 21, a stream separating part 23, a video stream analyzing part 25, an internal memory 27, a video decoding part 29, a memory control part 31, a memory 33, a selector 35, and a video signal generating part 37, wherein the video stream analyzing part 25 calculates the period of time data described in the header of a PES packet formed by the stream separating part 23. Consequently, encoded data corresponding to time data whose period is disturbed is specified as data obtained by encoding a part obtained when a video signal is asynchronously switched, and image data is reproduced whose reproduction sequence is ahead of the image data by one instead of the image data decoded from the encoded data. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、復号方法および復号装置に関するものであり、とくに、符号化したデータを受信し、この符号化したデータから映像を作成する復号方法および復号装置に関する。   The present invention relates to a decoding method and a decoding device, and more particularly, to a decoding method and a decoding device that receive encoded data and create a video from the encoded data.

従来より、例えばMPEG-2 ( Moving Picture Coding Experts Group phase 2 ) のCODEC ( Coder/Decoder ) 等のように、動画、すなわち映像信号をデジタル処理する装置においては、処理の過程で映像同期信号が必要となる。この映像同期信号には、例えば水平同期信号や垂直同期信号等が挙げられる。例えば符号化する装置、すなわち符号化装置のMPEG 符号化部では、この2つの同期信号を用いてタイミングを計り、符号化する領域や復号する装置へ伝送する領域等を決定している。このため、それまで符号化装置に入力されていた映像信号に替えて別の映像信号が入力される際に、映像信号の同期信号のタイミングが合わない状態で切り替わった場合、すなわち、符号化装置へ入力される映像信号が非同期で切り替えられた場合は、水平同期信号や垂直同期信号が乱れるために符号化領域が本来の位置からずれてしまい、その結果、復号された映像信号を再生した際に、切り替える前の映像と切り替えた後の映像が混じって表示されてしまったり、垂直同期または水平同期期間が表示されてしまうといった映像の乱れが生じていた。   Conventionally, in the device that digitally processes moving images, that is, video signals such as MPEG-2 (Moving Picture Coding Experts Group phase 2) CODEC (Coder / Decoder), video synchronization signals are required in the process. It becomes. Examples of the video synchronization signal include a horizontal synchronization signal and a vertical synchronization signal. For example, an encoding apparatus, that is, an MPEG encoding unit of an encoding apparatus, measures timing using these two synchronization signals, and determines an area to be encoded, an area to be transmitted to a decoding apparatus, and the like. For this reason, when another video signal is input instead of the video signal that has been input to the encoding device until then, the timing of the synchronization signal of the video signal is switched, that is, the encoding device. When the video signal input to is switched asynchronously, the horizontal sync signal and vertical sync signal are disturbed, so that the coding area shifts from the original position. As a result, when the decoded video signal is played back In addition, the video before the switching and the video after the switching are mixedly displayed, or the video is disturbed such that the vertical synchronization or the horizontal synchronization period is displayed.

さらに、例えばMPEG 方式で符号化、および復号する場合では、符号化された映像と音とを復号して再生する際、映像と音とが同期している必要があるため、符号化装置側では、映像や音を復号再生する処理を行う時刻を示す時刻データ、すなわちタイムスタンプが、復号装置側に送るパケットに設けられている。この時刻データもまた、同期信号を基準としてパケットに設けられるため、映像信号が非同期で切り替えられたことにより同期信号が乱れてしまうと、時刻データも乱れてしまい、その結果、復号された映像信号を再生すると映像が乱れてしまうということが生じていた。しかし、例えばテレビ放送等では番組を切り替えるといったように、映像信号の切り替えが頻繁に行われるため、切り替え時における映像の乱れを解消する方法が求められていた。   Furthermore, in the case of encoding and decoding, for example, in the MPEG system, when the encoded video and sound are decoded and reproduced, the video and sound must be synchronized. The time data indicating the time for performing the process of decoding and reproducing the video and the sound, that is, the time stamp is provided in the packet to be sent to the decoding device side. Since this time data is also provided in the packet based on the synchronization signal, if the synchronization signal is disturbed due to the asynchronous switching of the video signal, the time data is also disturbed. As a result, the decoded video signal When playing the video, the video was disturbed. However, since video signals are frequently switched, such as switching programs in television broadcasting, for example, there has been a demand for a method for eliminating video disturbance at the time of switching.

特許文献1には、このように映像に乱れが生じる場合に、映像が乱れている部分を静止画像で隠す復号装置が開示されている。具体的に説明すると、特許文献1では復号装置にタイマーを設け、このタイマーによって映像の乱れが生じる部分を検出し、この部分に替えて別の静止画像を再生することで、映像の乱れが生じる部分を再生しない復号装置である。   Patent Document 1 discloses a decoding device that hides a portion where the video is disturbed with a still image when the video is disturbed in this way. More specifically, in Patent Document 1, a timer is provided in the decoding device, a portion where a video disturbance is detected by the timer is detected, and another still image is reproduced instead of this portion, thereby causing a video disturbance. This is a decoding device that does not reproduce the part.

しかし、特許文献1に開示されている復号装置では、タイマーにより映像の乱れが生じる部分か否かを検出するため、余計な素子が必要となり、復号装置の製造コストがかかるという問題点を有していた。
特開2002−152743号公報
However, the decoding device disclosed in Patent Document 1 has a problem in that an extra element is required to detect whether or not the video is disturbed by the timer, which increases the manufacturing cost of the decoding device. It was.
JP 2002-152743 A

本発明はこのような従来技術の欠点を解消し、映像が非同期で切り替わったために映像の乱れが生じている部分を余計な素子を使用せず検出し、非同期で切り替わったことによる映像の乱れを表示させない復号方法、および装置を提供することを目的とする。   The present invention eliminates such disadvantages of the prior art, detects the portion of the image that is disturbed because the image is asynchronously switched without using an extra element, and detects the image disturbance caused by the asynchronous switching. It is an object of the present invention to provide a decoding method and apparatus that do not display.

上述の課題を解決するために本発明は、映像が非同期で切り替わった際は、同期信号が乱れるため、この同期信号を基にして作成される時刻データもその周期が乱れることに着目し、復号する際にこの時刻データの周期を算出し、算出した周期が乱れているか否かを検出する。その結果、時刻データの周期が乱れている場合は、映像が非同期で切り替わった部分と判断し、その時刻データと対応する符号化データから復号された画像データは再生せず、事前に記憶しておいた画像データを再生することで、乱れている映像を形成する画像データを再生しないようにする。なお、乱れている映像を形成すると判断された画像データに替えて再生される画像データは、切り替えが行われる直前の映像の画像データにすることが可能である。   In order to solve the above-described problems, the present invention focuses on the fact that when the video is switched asynchronously, the synchronization signal is disturbed, and therefore, the time data created based on this synchronization signal is also disturbed in its cycle. At this time, the period of this time data is calculated, and it is detected whether or not the calculated period is disturbed. As a result, if the period of the time data is disturbed, it is determined that the video has been switched asynchronously, and the image data decoded from the encoded data corresponding to the time data is not reproduced and stored in advance. By reproducing the stored image data, the image data that forms the distorted video is not reproduced. Note that the image data to be reproduced instead of the image data determined to form a distorted video can be the image data of the video immediately before switching.

本発明によれば、時刻データの周期の乱れを利用することで映像が非同期で切り替わったことを検知するため、余計な素子を用いなくても映像が非同期で切り替わったことによる映像の乱れが生じている部分を表示させないことが可能になる。   According to the present invention, since it is detected that the video is switched asynchronously by using the disturbance of the period of the time data, the video is disturbed due to the video being switched asynchronously without using an extra element. It becomes possible not to display the part which is.

次に添付図面を参照して本発明による復号方法および復号装置の実施例を詳細に説明する。図1は、本発明の復号装置における復号部の実施例の構成を示すブロック図であり、図2は、図1に示す復号部を含む復号装置の使用環境の一例を示す図である。図2において図1と同じ参照番号は同様の構成を示している。なお本発明の理解に直接関係のない部分は図示を省略し、冗長な説明を避ける。また以下の説明において各信号はその現れる接続線の参照番号で特定する。本実施例の復号装置1は、テレビ放送における映像信号や音声信号が符号化された符号化データを復号する装置であり、図2に示すように復号部3、および再生部5を含み、図2に示す符号化装置7からネットワーク9を介して送られてきたパケット11を受信し、このパケット11に含まれる符号化データを復号部3で復号して復号後の信号を再生部5に供給する。   Next, embodiments of a decoding method and a decoding apparatus according to the present invention will be described in detail with reference to the accompanying drawings. FIG. 1 is a block diagram showing a configuration of an embodiment of a decoding unit in the decoding device of the present invention, and FIG. 2 is a diagram showing an example of a use environment of the decoding device including the decoding unit shown in FIG. 2, the same reference numerals as those in FIG. 1 indicate the same configurations. In addition, illustration is abbreviate | omitted and the redundant description is avoided about the part which is not directly related to understanding of this invention. In the following description, each signal is specified by the reference number of the connecting line in which it appears. A decoding device 1 according to the present embodiment is a device that decodes encoded data obtained by encoding a video signal or an audio signal in television broadcasting, and includes a decoding unit 3 and a reproduction unit 5 as shown in FIG. 2 receives the packet 11 sent from the encoding device 7 shown in FIG. 2 via the network 9, decodes the encoded data contained in the packet 11 by the decoding unit 3, and supplies the decoded signal to the reproducing unit 5 To do.

より具体的に説明すると、復号部3は、図1に示すように、ネットワークインタフェース部21、ストリーム分離部23、映像ストリーム解析部25、内部メモリ27、映像復号部29、メモリ制御部31、メモリ33、セレクタ35、および映像信号作成部37を含み、ネットワーク9を介して送られてきたパケット11をネットワークインタフェース部21で受信する。このパケット11は、通信方法に準拠したパケットである。なお本発明はパケットに限定するわけではなく、例えば、ATM ( Asynchronous Transfer Mode ) 回線の場合では、ATM セルであってもよい。またパケット11には、映像信号や音声信号等の信号41を符号化した符号化データ、およびこの符号化データの復号再生処理を行う時刻を示す時刻データが含まれている。これらの符号化データおよび時刻データは、後述するようにネットワーク9に接続している符号化装置7で作成される。   More specifically, as shown in FIG. 1, the decoding unit 3 includes a network interface unit 21, a stream separation unit 23, a video stream analysis unit 25, an internal memory 27, a video decoding unit 29, a memory control unit 31, a memory 33, the selector 35, and the video signal creation unit 37, and the network interface unit 21 receives the packet 11 sent via the network 9. This packet 11 is a packet conforming to the communication method. The present invention is not limited to packets. For example, in the case of an ATM (Asynchronous Transfer Mode) line, an ATM cell may be used. Further, the packet 11 includes encoded data obtained by encoding the signal 41 such as a video signal and an audio signal, and time data indicating a time when decoding / reproducing processing of the encoded data is performed. These encoded data and time data are created by the encoding device 7 connected to the network 9 as will be described later.

復号装置1の復号部3では、このようなパケット11を受信すると、パケットに含まれている符号化データのうち符号化された映像信号を、映像復号部29で復号して1枚、すなわち1画面分の静止画像である画像データを作成し、作成した画像データを映像信号作成部37で変換して映像信号17を作成する。この形成された映像信号17は、符号化装置7に入力された映像信号と実質的に同じものである。また公知の手法で符号化データに含まれている符号化された音声信号を復号し、同じく再生部15へと送る。再生部15は、図示しないが例えばディスプレイ等の表示装置や、外部メモリ等の記録装置を含んでおり、作成された映像信号17や音声信号をディスプレイに表示したり、記録装置に記録する。   When the decoding unit 3 of the decoding apparatus 1 receives such a packet 11, the video decoding unit 29 decodes the encoded video signal among the encoded data included in the packet, that is, 1 Image data that is a still image for the screen is created, and the created image data is converted by the video signal creation unit 37 to create the video signal 17. The formed video signal 17 is substantially the same as the video signal input to the encoding device 7. In addition, the encoded audio signal included in the encoded data is decoded by a known method, and sent to the reproduction unit 15 in the same manner. Although not shown, the reproduction unit 15 includes a display device such as a display and a recording device such as an external memory, and displays the created video signal 17 and audio signal on the display or records them on the recording device.

なお本実施例では、符号化装置7、および復号装置1は、テレビ放送における映像信号や音声信号を、それぞれ符号化、および復号しているが、本発明はこれに限定するわけではなく、符号化装置7および復号装置1は少なくとも映像信号を符号化および復号する装置であればよい。また、映像信号もテレビ放送における映像信号に限定するわけではなく、任意の映像信号を採用することが可能である。なおテレビ放送における映像信号は、NTSC ( National Television Standard Committee )信号であってもよいし、PAL ( Phase Alternation by Line )信号であってもよく、任意の信号を採用することが可能である。   In this embodiment, the encoding device 7 and the decoding device 1 encode and decode a video signal and an audio signal in television broadcasting, respectively, but the present invention is not limited to this. The encoding device 7 and the decoding device 1 need only be devices that encode and decode at least a video signal. Further, the video signal is not limited to the video signal in the television broadcast, and any video signal can be adopted. The video signal in television broadcasting may be an NTSC (National Television Standard Committee) signal or a PAL (Phase Alternation by Line) signal, and any signal can be adopted.

図1に示す復号装置1に入力される符号化データが収納されたパケット11は、前述したように、図2、図3に示す符号化装置7の符号化部51で作成される。図3は、図2に示す符号化部51の構成の一例を示したブロック図である。なお図3において、図2と同じ参照番号は同様の構成を示すため説明を省略する。   As described above, the packet 11 storing the encoded data input to the decoding device 1 shown in FIG. 1 is created by the encoding unit 51 of the encoding device 7 shown in FIGS. FIG. 3 is a block diagram showing an example of the configuration of the encoding unit 51 shown in FIG. In FIG. 3, the same reference numerals as those in FIG.

符号化装置7は、図3に示すように前処理部53、同期検出部55、映像符号化部57、ストリーム多重化部59、およびネットワークインタフェース部61を含み、入力された映像信号および音声信号等の信号41を公知の手法で符号化する装置である。例えば本実施例では、符号化装置7は、MPEG-2 方式を採用して符号化して符号化データを作成し、また作成した映像、音声等の符号化データを多重した後、通信方法に準拠した形式にてパケット11を作成する。このような符号化装置7には、公知のものを採用することが可能であり、実施例に限定するわけではない。なお以下の説明において符号化装置7に入力される信号41のうち、音声信号については映像信号と実質的に同様の処理を経て符号化されるため、映像信号についてのみ説明する。   The encoding device 7 includes a pre-processing unit 53, a synchronization detection unit 55, a video encoding unit 57, a stream multiplexing unit 59, and a network interface unit 61 as shown in FIG. Is a device that encodes a signal 41 such as the above by a known method. For example, in this embodiment, the encoding device 7 uses the MPEG-2 method to generate encoded data, and multiplexes the generated encoded data such as video and audio, and then conforms to the communication method. Packet 11 is created in the format. A known apparatus can be adopted as such an encoding apparatus 7, and is not limited to the embodiment. In the following description, among the signals 41 input to the encoding device 7, since the audio signal is encoded through substantially the same processing as the video signal, only the video signal will be described.

符号化装置7に映像信号が入力されると、入力された映像信号は符号化装置7における符号化部51の同期検出部55、および前処理部53へとそれぞれ入力される。同期検出部55は、各種の同期信号、例えば、垂直同期信号や水平同期信号やフレーム同期信号等を検出する部分である。水平同期信号とは、走査線の開始点を決めるパルス信号であり、垂直同期信号はフィールドの開始点を決めるパルス信号である。またフレーム同期信号とは、フレームの開始点の位置の識別を可能とする信号である。同期検出部55は、これらの同期信号を検出すると、それを前処理部53、および映像符号化部57へと送る。   When a video signal is input to the encoding device 7, the input video signal is input to the synchronization detection unit 55 and the preprocessing unit 53 of the encoding unit 51 in the encoding device 7, respectively. The synchronization detection unit 55 is a part that detects various synchronization signals such as a vertical synchronization signal, a horizontal synchronization signal, a frame synchronization signal, and the like. The horizontal synchronizing signal is a pulse signal that determines the starting point of the scanning line, and the vertical synchronizing signal is a pulse signal that determines the starting point of the field. The frame synchronization signal is a signal that makes it possible to identify the position of the start point of a frame. When the synchronization detection unit 55 detects these synchronization signals, it sends them to the preprocessing unit 53 and the video encoding unit 57.

前処理部53は、映像信号が入力されると、同期検出部55からの同期信号を基にしてアナログ/デジタル変換を行って、この映像信号をデジタル映像信号に変換し、また輝度信号と色信号の分離、すなわち、Y/C 分離を行う部分である。このように前処理部で処理された信号は、映像符号化部57へと送られる。映像符号化部57では、前処理部53から送られてきたデジタル映像信号を、MPEG-2 方式で符号化し符号化データを作成する。この際、符号化する領域や、復号部へ送る単位は、同期検出部55から送られてきた各種の同期信号を用いて決定される。例えば、本実施例では、符号化する領域を同期検出部55から送られてきたフレーム同期信号および水平同期信号を用いて決定する。また本実施例では、MPEG-2 方式で符号化しているため、符号化データと共に、フレーム周期信号に合わせて時刻データが作成される。   When the video signal is input, the preprocessing unit 53 performs analog / digital conversion based on the synchronization signal from the synchronization detection unit 55, converts the video signal into a digital video signal, and also performs luminance signal and color conversion. This is the part that performs signal separation, that is, Y / C separation. The signal processed by the preprocessing unit in this way is sent to the video encoding unit 57. The video encoding unit 57 encodes the digital video signal sent from the preprocessing unit 53 by the MPEG-2 method to create encoded data. At this time, the area to be encoded and the unit to be sent to the decoding unit are determined using various synchronization signals sent from the synchronization detection unit 55. For example, in the present embodiment, the area to be encoded is determined using the frame synchronization signal and horizontal synchronization signal sent from the synchronization detection unit 55. In this embodiment, since encoding is performed by the MPEG-2 system, time data is generated together with the encoded data in accordance with the frame period signal.

この時刻データとは、MPEG 形式で符号化した場合では、復号する際に、復号する順と再生する順とが異なる場合があるために正しい順序が必要となることや、復号された映像と音声とを同期させる必要があるために作成されるものであり、復号再生に必要な復号再生処理を行う時刻を示すもの、すなわちタイムスタンプである。より具体的に説明すると、MPEG 形式で符号化、および復号する場合では、符号化された映像と音とを復号して再生する際に音と映像とを同期させる必要があるため、再生処理を行う時刻を示す時刻データ、すなわち、プレゼンテーションタイムスタンプ( PTS : Presentation Time Stamp )が作成される。また復号する順序と再生する順序が異なる場合があるため、復号処理を行う時刻を示す時刻データ、すなわち、デコーディングタイムスタンプ( DTS : Decoding Time Stamp )が作成される。   This time data means that when encoded in MPEG format, the decoding order may be different from the playback order when decoding, so the correct order is necessary, and the decoded video and audio Is generated because it needs to be synchronized with each other, and indicates a time at which decoding / reproduction processing necessary for decoding / reproduction is performed, that is, a time stamp. More specifically, when encoding and decoding in the MPEG format, it is necessary to synchronize the sound and video when decoding and playing the encoded video and sound. Time data indicating the time to perform, that is, a presentation time stamp (PTS) is created. In addition, since the decoding order and the playback order may be different, time data indicating the time for performing the decoding process, that is, a decoding time stamp (DTS) is created.

図4は、本実施例における時刻データの作成処理を概念的に示した図であり、符号化部51に映像信号A が入力された場合における同期検出部55の出力を概念的に示した図である。なお図4において、水平方向は時間を表している。符号化部51に図4に示すようなタイミングのフレーム同期信号71を含む映像信号A が入力されると、同期検出部55は、映像信号A のフレーム同期信号71と実質的に同じタイミングの同期信号73を検出し、このフレーム同期信号73を映像符号化部57へと供給する。映像符号化部57では、映像信号A を符号化する際、供給されたフレーム同期信号73と対応して時刻データを作成する。例えば本実施例では、このフレーム同期信号73の立ち上がりフレームの先頭と実質的に同じタイミングで時刻データを作成する。   FIG. 4 is a diagram conceptually showing time data creation processing in the present embodiment, and conceptually showing the output of the synchronization detector 55 when the video signal A is inputted to the encoder 51. It is. In FIG. 4, the horizontal direction represents time. When the video signal A including the frame synchronization signal 71 having the timing as shown in FIG. 4 is input to the encoding unit 51, the synchronization detection unit 55 synchronizes with the frame synchronization signal 71 of the video signal A having substantially the same timing. The signal 73 is detected, and this frame synchronization signal 73 is supplied to the video encoding unit 57. The video encoder 57 creates time data corresponding to the supplied frame synchronization signal 73 when the video signal A is encoded. For example, in this embodiment, time data is created at substantially the same timing as the head of the rising frame of the frame synchronization signal 73.

よって、図4において隣り合う時刻データの間隔は、1フレーム分、すなわち、1/30秒である。例えば、時刻データA と時刻データB の間隔は、1/30秒であり、時刻データC、D も同様に、1つ前の時刻データとの差は、1/30秒となる。なお、本実施例ではフレーム同期信号73の立ち上がりのタイミングで、1フレーム毎に時刻データを作成しているが、本発明はこれに限定するわけではなく、任意に時刻データを作成することが可能である。例えば、時刻データをフレーム同期信号73の立ち下がりのタイミングで作成することも可能であるし、1フィールド毎に時刻データを作成することも可能である。なお本発明はこれに限定するわけではない。   Therefore, the interval between adjacent time data in FIG. 4 is one frame, that is, 1/30 second. For example, the interval between the time data A and the time data B is 1/30 second, and the time data C and D are similarly 1/30 seconds different from the previous time data. In this embodiment, time data is created for each frame at the rising timing of the frame synchronization signal 73. However, the present invention is not limited to this, and time data can be created arbitrarily. It is. For example, the time data can be created at the falling timing of the frame synchronization signal 73, or the time data can be created for each field. Note that the present invention is not limited to this.

以上のようにして作成された時刻データは、映像符号化部57で符号化データと共にパケット化され、ストリーム多重化部59で音声パケット等と多重された後に、ネットワークインタフェース部61へと送られる。ネットワークインタフェース部61では、多重されたこれらのデータを通信方法に準拠した形式のデータ、すなわちパケット11に変換し、このパケット11を復号装置1へネットワーク9を介して送信する。   The time data created as described above is packetized together with the encoded data by the video encoding unit 57, multiplexed with an audio packet or the like by the stream multiplexing unit 59, and then sent to the network interface unit 61. The network interface unit 61 converts these multiplexed data into data in a format conforming to the communication method, that is, the packet 11, and transmits the packet 11 to the decoding device 1 via the network 9.

図5は、図3に示す映像符号化部57で作成されるPES ( Packetized Elementary Stream ) パケットの概念図である。図5において水平方向は時間を示している。本実施例では、MPEG-2 方式を採用して符号化するため、符号化データはPES パケットに収納される。PES パケットには映像符号化部で決定された所定の単位に分けられた符号化データが、所定の領域、すなわち本実施例ではデータが格納されるデータ領域77に格納され、またその符号化データにアクセスユニット、すなわち、符号化する単位の先頭が存在する場合には、この符号化データの復号再生処理を行う時刻を示す時刻データが、1つのPES パケットにつき1つ、パケットヘッダ79に設けられる。   FIG. 5 is a conceptual diagram of a PES (Packetized Elementary Stream) packet created by the video encoding unit 57 shown in FIG. In FIG. 5, the horizontal direction indicates time. In this embodiment, since encoding is performed using the MPEG-2 system, the encoded data is stored in a PES packet. In the PES packet, encoded data divided into predetermined units determined by the video encoding unit is stored in a predetermined area, that is, in the data area 77 in which data is stored in this embodiment, and the encoded data is also stored. When there is an access unit, that is, the head of a unit to be encoded, time data indicating the time for performing decoding / reproduction processing of the encoded data is provided in the packet header 79, one per PES packet. .

なお時刻データは、PTS が示す再生時刻とDTS が示す復号開始時刻とが異なる場合はDTS とPTS の両方がパケットヘッダ79に設けられ、逆に両者が一致する場合はPTS だけがパケットヘッダ79に設けられる。この時刻データは、公知の手法で作成し、また公知の手法でパケットヘッダ79に設けることが可能である。   If the playback time indicated by the PTS and the decoding start time indicated by the DTS are different, both the DTS and the PTS are provided in the packet header 79. Conversely, if both match, only the PTS is included in the packet header 79. Provided. This time data can be created by a known method and provided in the packet header 79 by a known method.

以上のように符号化を行う符号化装置7には、常に同じ映像信号が入力されるわけではなく、例えばそれまでに入力されていた映像信号から、別の新たな映像信号へと切り替わるというように映像信号が替わる場合がある。このように切り替わる際は、切り替わる前の映像信号と切り替わった後の映像信号とが同期するように、すなわち切り替わる前の映像信号に含まれる同期信号のタイミングと、切り替わった後の映像信号に含まれる同期信号のタイミングとが実質的に一致するように映像信号が切り替わる場合は、映像が乱れる等の問題が生じることなく切り替えを行うことが可能になる。   As described above, the encoding device 7 that performs encoding does not always receive the same video signal. For example, the video signal that has been input so far is switched to another new video signal. The video signal may change. When switching in this way, the video signal before switching and the video signal after switching are synchronized, that is, the timing of the synchronization signal included in the video signal before switching and included in the video signal after switching. When the video signal is switched so that the timing of the synchronization signal substantially coincides, the switching can be performed without causing a problem such as a video disturbance.

しかし、例えば図6に示すように、切り替わる前の映像信号に含まれる同期信号のタイミングと、切り替わった後の映像信号に含まれる同期信号のタイミングとが、実質的に一致しないで切り替わった場合、すなわち、非同期で切り替わった場合は、同期信号の間隔に乱れが生じるようになり、その結果、復号された映像信号を再生した際に映像が乱れる等の問題が生じてしまっていた。   However, for example, as shown in FIG. 6, when the timing of the synchronization signal included in the video signal before switching and the timing of the synchronization signal included in the video signal after switching are switched without substantially matching, That is, when the switching is performed asynchronously, the interval of the synchronization signal is disturbed, and as a result, there is a problem that the video is disturbed when the decoded video signal is reproduced.

図6は、映像信号が切り替わった際の時刻データの作成処理を概念的に示した図であり、図5に示す時刻データB と時刻データC の間で、映像信号A から映像信号B に非同期で切り替わった場合における同期検出部55の出力を概念的に示した図である。なお図6において、図5と同じ参照番号は同様の構成を示すため説明を省略する。また図6において、点線で示した部分は説明をわかり易くするために表示しているが、本来は切り替わるために現れない信号である。   FIG. 6 is a diagram conceptually showing a time data creation process when the video signal is switched, and is asynchronous with the video signal B from the time data B and the time data C shown in FIG. FIG. 6 is a diagram conceptually showing an output of a synchronization detection unit 55 when it is switched at. In FIG. 6, the same reference numerals as those in FIG. In FIG. 6, the portion indicated by the dotted line is displayed for easy understanding of the explanation, but is a signal that does not appear because it is switched.

図6に示すように、映像信号が非同期で切り替わると、同期検出部55は、切り替わった後の最初の垂直同期信号からフレーム同期信号を検出するため、切り替わった際はフレーム同期信号の周期に乱れが生じてしまう。例えば図6に示す例では、切り替わる前の同期信号の立ち上がりのタイミングから、切り替わった後の同期信号の立ち上がりのタイミングまでの間隔が、他の部分における間隔と比較して長くなっている。このように同期信号の周期に乱れが生じた部分は、映像符号化部57では同期信号を基に符号化する領域等を決定しているためにうまく符号化されない。その結果、このうまく符号化できなかった符号化データを復号して再生した際は、例えば切り替える前の映像と切り替えた後の映像とが混じった映像になってしまう等の問題が生じていた。   As shown in FIG. 6, when the video signal is switched asynchronously, the synchronization detection unit 55 detects the frame synchronization signal from the first vertical synchronization signal after the switching, so that the period of the frame synchronization signal is disturbed when the switching is performed. Will occur. For example, in the example shown in FIG. 6, the interval from the rising timing of the synchronizing signal before switching to the rising timing of the synchronizing signal after switching is longer than the interval in other portions. Thus, the portion where the period of the synchronization signal is disturbed is not encoded well because the video encoding unit 57 determines the area to be encoded based on the synchronization signal. As a result, when the encoded data that could not be encoded successfully is decoded and reproduced, there has been a problem that, for example, a video before switching and a video after switching are mixed.

そこで本実施例の復号装置1はこのような問題を解決するため、非同期で切り替わった際は、図6に示すように同期信号の周期が乱れるために同期信号を基にして作成される時刻データの周期も乱れることに着目し、時刻データの周期の乱れを検出することで、映像が非同期で切り替わった部分を符号化した符号化データを特定し、その符号化データから作成された画像データを再生しないようにする。例えば図6において、時刻データE の示す時刻は、フレーム同期信号が乱れたために、時刻データB に1フレーム分の時間、すなわち1/30秒を加えた時間ではなくなる。よって、このように間隔が乱れた時刻データE と対応する符号化データ、すなわち、時刻データB から時刻データE までの間に符号化された符号化データは、うまく符号化できなかった部分と特定できる。本実施例の復号装置1は、このような時刻データの間隔の乱れから、うまく符号化できなかった部分を特定し、うまく符号化できなかった部分を再生しないようにする。以下、詳細に説明する。   Therefore, in order to solve such a problem, the decoding device 1 of this embodiment, when switched asynchronously, as shown in FIG. 6, because the period of the synchronization signal is disturbed, time data created based on the synchronization signal Focusing on the fact that the period of the image is also disturbed, by detecting the disturbance of the period of the time data, the encoded data obtained by encoding the portion where the video is asynchronously switched is specified, and the image data created from the encoded data is obtained. Do not play. For example, in FIG. 6, the time indicated by the time data E is not the time obtained by adding 1 frame time, ie, 1/30 second, to the time data B because the frame synchronization signal is disturbed. Therefore, the encoded data corresponding to the time data E with the irregular interval in this way, that is, the encoded data encoded between the time data B and the time data E, is identified as the portion that could not be encoded successfully. it can. The decoding apparatus 1 according to the present embodiment identifies a portion that has not been successfully encoded from such a disturbance in the time data interval, and does not reproduce a portion that has not been successfully encoded. Details will be described below.

図1において、ネットワークインタフェース部21は、送られてきたパケット11を受信する部分であり、受信したパケット11から、データ列であるトランスポート・ストリーム( TS : Transport Stream )を出力する。出力されたトランスポート・ストリームは、ストリーム分離部23に入力される。   In FIG. 1, a network interface unit 21 is a part that receives a transmitted packet 11 and outputs a transport stream (TS: Transport Stream) that is a data string from the received packet 11. The output transport stream is input to the stream separation unit 23.

ストリーム分離部23は、入力されたトランスポート・ストリームを個々のストリーム、すなわち、映像ストリームや音声ストリーム等に分離し、分離した映像ストリーム、および音声ストリームを作成する。なお以下の説明において、音声ストリームについては公知の手法で復号されて音声信号が形成され、復号された映像信号と同期して再生部5で再生されるために説明を省略し、映像ストリームについてのみ説明する。分離された映像ストリームは、内部メモリ27、および映像ストリーム解析部25にそれぞれ入力される。   The stream separation unit 23 separates the input transport stream into individual streams, that is, a video stream, an audio stream, and the like, and creates separated video streams and audio streams. In the following description, the audio stream is decoded by a known method to form an audio signal, and is reproduced by the playback unit 5 in synchronization with the decoded video signal. explain. The separated video stream is input to the internal memory 27 and the video stream analysis unit 25, respectively.

映像ストリーム解析部25は、入力された映像ストリームから、時刻データ、M値、およびピクチャタイプを解析して、後段のメモリ制御部31を制御するメモリ制御信号、および、セレクタ35を制御するセレクタ制御信号をそれぞれ作成する部分である。とくに映像ストリーム解析部25は、時刻データの周期を検出し、検出結果に応じてセレクタ制御信号を作成する。具体的に説明すると本実施例では、映像ストリーム解析部25が今回検出された時刻データよりも順序が一つ前の時刻データを一時的に保存しており、新たに時刻データが検出されると、この時刻データと、記憶していた一つ前の時刻データとの差分を計算し、この差分が事前に設定された値であるか否かを判断することで周期の乱れを検出する。   The video stream analysis unit 25 analyzes time data, M value, and picture type from the input video stream, and controls the memory control signal for controlling the memory control unit 31 in the subsequent stage and selector control for controlling the selector 35 This is the part that creates each signal. In particular, the video stream analysis unit 25 detects the period of time data and creates a selector control signal according to the detection result. More specifically, in this embodiment, the video stream analysis unit 25 temporarily stores time data that is one order before the time data detected this time, and when new time data is detected. Then, the difference between this time data and the stored previous time data is calculated, and it is determined whether or not this difference is a value set in advance, thereby detecting the disturbance of the cycle.

その結果、差分が一定の値ではない、すなわち周期に乱れがあると、映像信号が非同期で切り替えられた切り替え部分であると判断し、M値およびピクチャタイプからこの切り替え部分が復号されて内部メモリ27から出力される時間を計算する。また、内部メモリから出力される映像が切り替え部分である旨のセレクタ制御信号、すなわちメモリ33から画像データを選択するよう指示する制御信号を作成する。逆に周期の乱れがない場合は切り替えがなかった部分である旨の制御信号、すなわち内部メモリ27から画像データを選択するよう指示する制御信号を作成する。   As a result, if the difference is not a constant value, that is, if the period is disturbed, it is determined that the video signal is a switching part that is switched asynchronously, and this switching part is decoded from the M value and the picture type, and the internal memory Calculate the time output from 27. Further, a selector control signal indicating that the video output from the internal memory is a switching portion, that is, a control signal instructing to select image data from the memory 33 is generated. On the other hand, if there is no disturbance in the cycle, a control signal indicating that the part has not been switched, that is, a control signal instructing to select image data from the internal memory 27 is created.

一方、メモリ制御信号は公知のやり方を採用して作成される。作成されたメモリ制御信号はメモリ制御部31に入力され、またセレクタ制御信号はセレクタ35に入力される。なお、周期の乱れの検出には任意のやり方を採用することが可能であり、本実施例に限定するわけではない。例えば、今回検出された時刻データよりも順序が一つ後の時刻データとの差分を算出して周期に乱れがあるか否かを判断することも可能である。   On the other hand, the memory control signal is created using a known method. The created memory control signal is input to the memory control unit 31, and the selector control signal is input to the selector 35. Note that any method can be employed for detecting the periodic disturbance, and the present invention is not limited to this embodiment. For example, it is also possible to determine whether or not there is a disturbance in the cycle by calculating the difference from the time data one order after the time data detected this time.

内部メモリ27は、映像復号部29における復号の際に用いられるメモリであり、映像ストリームに含まれている符号化データや、この符号化データを復号することで作成される画像データを一時的に保存する部分である。映像復号部29は、図示しない制御部に制御されて時刻データに基づいて映像ストリームに含まれている符号化データをMPEG-2 方式で復号し、画像データを作成する部分である。復号には公知のやり方を採用して行うことが可能である。本実施例では、再生部5へ供給されるフレームの周期に合わせて、フレーム毎に符号化データを復号する。復号された画像データは、再び内部メモリへと送られる。なお本実施例ではフレーム毎に復号を行っているが、本発明はこれに限定するわけではなく、符号化データに合わせて復号を行うことが可能である。例えばフィールド毎に行うことも可能である。   The internal memory 27 is a memory used for decoding in the video decoding unit 29, and temporarily stores the encoded data included in the video stream and the image data created by decoding the encoded data. The part to save. The video decoding unit 29 is a part that is controlled by a control unit (not shown) and decodes encoded data included in the video stream based on the time data by the MPEG-2 system to create image data. Decoding can be performed using a known method. In the present embodiment, the encoded data is decoded for each frame in accordance with the cycle of the frame supplied to the reproduction unit 5. The decoded image data is sent to the internal memory again. In this embodiment, decoding is performed for each frame. However, the present invention is not limited to this, and decoding can be performed in accordance with encoded data. For example, it can be performed for each field.

メモリ制御部31は、映像ストリーム解析部25からのメモリ制御信号により、内部メモリ27およびメモリ33を制御する部分である。例えば、メモリ制御部31は、内部メモリ27を制御して、内部メモリ27に保存された画像データが後段の再生部5において正しい再生順序になるように、内部メモリ27における画像データをセレクタ35へ送る。   The memory control unit 31 is a part that controls the internal memory 27 and the memory 33 by a memory control signal from the video stream analysis unit 25. For example, the memory control unit 31 controls the internal memory 27 to transfer the image data stored in the internal memory 27 to the selector 35 so that the image data stored in the internal memory 27 is in the correct playback order in the subsequent playback unit 5. send.

メモリ33は、メモリ制御部31の制御によって、内部メモリ27とは別に、復号された画像データを保存する部分である。具体的には、内部メモリ27からセレクタ35へ送られる画像データに替えて、再生部5へ供給するための画像データが記憶される部分である。本実施例では、内部メモリ27から送られてきた画像データが切り替え部分である場合に、この画像データに替えて、セレクタ35が選択する画像データが保存されており、内部メモリ27からセレクタ35へ送られる画像データよりも、時間的に前に再生される画像データ、具体的には、内部メモリ27からセレクタ35へ送られる画像データよりも再生順序が1つ前の画像データが保存されている。なおメモリ33に保存する画像データが、セレクタ35へ送られる画像データより再生順序が1つ前の画像データであることに限定するわけではなく、切り替え部分である画像データの替わりに再生される画像データであれば、任意の画像データを保存することが可能である。例えば、再生順序が一つ後ろの画像データであってもよい。   The memory 33 is a part that stores the decoded image data separately from the internal memory 27 under the control of the memory control unit 31. Specifically, this is a part in which image data to be supplied to the reproducing unit 5 is stored instead of the image data sent from the internal memory 27 to the selector 35. In this embodiment, when the image data sent from the internal memory 27 is a switching portion, the image data selected by the selector 35 is stored in place of this image data, and the image data selected from the internal memory 27 is transferred to the selector 35. Image data that is reproduced in time before the image data to be sent, specifically, image data that is one order before the image data sent from the internal memory 27 to the selector 35 is stored. . Note that the image data stored in the memory 33 is not limited to the image data whose playback order is one before that of the image data sent to the selector 35, and the image that is played back instead of the image data that is the switching portion. Any image data can be saved as long as it is data. For example, it may be image data that is one order after the reproduction order.

ここで本実施例では、画像データの大きさは1フレームであるため、メモリ33には常に再生順序が1つ前の画像データが1フレーム分保存されていることになる。なお本実施例において、メモリ33が記憶する容量を1フレーム分としたのは、メモリ33における画像データの容量を小さくするためであるが、本発明はこれに限定するわけではなく、メモリ33が記憶する画像データの容量は任意の量にすることが可能である。例えば、メモリ33には、復号されたすべての画像データを保存しておくようにすることも可能であるし、また例えば、それまでに復号された任意のフレーム分の画像データを記憶することも可能である。なお本発明はこれらに限定するわけではない。   Here, in the present embodiment, since the size of the image data is one frame, the memory 33 always stores one frame of image data in the previous playback order. In this embodiment, the memory 33 stores the capacity for one frame in order to reduce the image data capacity in the memory 33, but the present invention is not limited to this, and the memory 33 The amount of image data to be stored can be set to an arbitrary amount. For example, it is possible to store all the decoded image data in the memory 33, and for example, it is possible to store image data for an arbitrary frame decoded so far. Is possible. The present invention is not limited to these.

セレクタ35は、映像ストリーム解析部25から送られるセレクタ制御信号により制御されて、メモリ33または内部メモリ27に記憶されている画像データのうち、映像信号作成部37へ供給する画像データを選択する部分である。より具体的に説明すると、セレクタ35は、セレクタ制御信号に基づいて、メモリ33に保存されている画像データ、または内部メモリ27に保存されている画像データの、どちらか一方の画像データを選択する。選択された画像データは、再生部5で再生する映像信号17へと変換されるために映像信号作成部37に入力される。   The selector 35 is a part for selecting image data to be supplied to the video signal creation unit 37 from the image data stored in the memory 33 or the internal memory 27 under the control of the selector control signal sent from the video stream analysis unit 25 It is. More specifically, the selector 35 selects one of the image data stored in the memory 33 or the image data stored in the internal memory 27 based on the selector control signal. . The selected image data is input to the video signal creation unit 37 for conversion into the video signal 17 to be played back by the playback unit 5.

映像信号作成部37は、セレクタ35から供給された画像データを、後段の再生部5における例えばディスプレイ等に表示するための映像信号に変換する部分であり、画像データから元の映像信号を作成する部分である。本実施例では、映像信号作成部37において輝度信号と色信号の多重や、デジタル/アナログ変換が行われ、映像信号17が作成される。作成された映像信号17は、再生部5へと送られる。再生部5は、復号部3で作成された映像信号17を、公知の手法で復号された音声信号と共に再生、すなわち再生部5に含まれている表示装置のディスプレイや記録媒体に出力する。なお本発明は、各部の構成を本実施例に限定するわけではなく、復号装置1に応じて任意の構成を採用することが可能である。   The video signal creation unit 37 is a part that converts the image data supplied from the selector 35 into a video signal to be displayed on, for example, a display in the playback unit 5 in the subsequent stage, and creates the original video signal from the image data. Part. In this embodiment, the video signal creation unit 37 multiplexes the luminance signal and the color signal and performs digital / analog conversion to create the video signal 17. The created video signal 17 is sent to the playback unit 5. The reproduction unit 5 reproduces the video signal 17 created by the decoding unit 3 together with the audio signal decoded by a known method, that is, outputs the video signal 17 to the display or recording medium of the display device included in the reproduction unit 5. In the present invention, the configuration of each unit is not limited to the present embodiment, and any configuration can be adopted depending on the decoding device 1.

図7は、図1に示す復号装置1において、パケット11を受信した際の復号処理の処理手順の一例を示した流れ図である。図1、図7において、符号化装置7から送られたパケット11は、復号装置1のネットワークインタフェース部21で順に受信される(ステップS1)。受信されたパケット11はネットワークインタフェース部21でトランスポート・ストリームに変換されてストリーム分離部23へ入力される。ストリーム分離部23では、入力されたトランスポート・ストリームから映像ストリームや音声ストリームを分離する(ステップS2)。また分離された映像ストリームはPES パケットに変換される(ステップS3)。例えばストリーム分離部23は、図8に示すように映像ストリームを順に、第1PES パケット81、第2PES パケット83、第3PES パケット85、・・・、第n PES パケット87に変換する。   FIG. 7 is a flowchart showing an example of the processing procedure of the decoding process when the packet 11 is received in the decoding device 1 shown in FIG. 1 and 7, the packet 11 sent from the encoding device 7 is sequentially received by the network interface unit 21 of the decoding device 1 (step S1). The received packet 11 is converted into a transport stream by the network interface unit 21 and input to the stream separation unit 23. The stream separation unit 23 separates the video stream and the audio stream from the input transport stream (step S2). The separated video stream is converted into a PES packet (step S3). For example, the stream separation unit 23 sequentially converts the video stream into a first PES packet 81, a second PES packet 83, a third PES packet 85,..., An nth PES packet 87 as shown in FIG.

図8は、図1に示すストリーム分離部23において変換されたPES パケット、およびこのPES パケットに含まれている符号化データを復号した際の映像信号を概念的に示した図である。なお図8において、図5と同じ参照番号は同様の構成要素を示すため説明を省略する。各PES パケット81、83、85、87には、符号化データが所定の領域に収納されており、またパケットヘッダに時刻データが設けられている。   FIG. 8 is a diagram conceptually showing a PES packet converted by the stream separation unit 23 shown in FIG. 1 and a video signal when the encoded data included in the PES packet is decoded. In FIG. 8, the same reference numerals as those in FIG. In each PES packet 81, 83, 85, 87, encoded data is stored in a predetermined area, and time data is provided in the packet header.

なお図8では、第1PES パケット81と第2PES パケット83における符号化データ89、91と時刻データ93、95が示されているが、第3PES パケット85、および第n PES パケット87についても第1PES パケット81および第2PES パケット83と同様に符号化データと時刻データが含まれている。図8においてn は正の正数である。なお説明をわかり易くするために、復号の順序と再生の順序は同じとする。つまり、例えば第1PES パケット81に含まれている第1符号化データ89から第1画像データ97が、また第2符号化データ91から第2画像データ99が復号される。また再生順序は、第1画像データ97、第2画像データ99、・・・、第n 画像データである。   In FIG. 8, encoded data 89 and 91 and time data 93 and 95 in the first PES packet 81 and the second PES packet 83 are shown, but the first PES packet 85 and the nth PES packet 87 are also shown in FIG. Similar to 81 and the second PES packet 83, encoded data and time data are included. In FIG. 8, n is a positive positive number. For the sake of easy understanding, it is assumed that the decoding order and the reproduction order are the same. That is, for example, the first image data 97 is decoded from the first encoded data 89 included in the first PES packet 81, and the second image data 99 is decoded from the second encoded data 91. The reproduction order is first image data 97, second image data 99,..., Nth image data.

ストリーム分離部23で変換されたPES パケットは内部メモリ、および映像ストリーム解析部にそれぞれ入力される。内部メモリにPES パケットが入力されると、映像復号部が、PES パケットに含まれている時刻データを基にして、符号化データを復号する(ステップS4)。   The PES packet converted by the stream separator 23 is input to the internal memory and the video stream analyzer. When the PES packet is input to the internal memory, the video decoding unit decodes the encoded data based on the time data included in the PES packet (step S4).

また映像ストリーム解析部25は、PES パケットが入力されると、メモリ制御信号やセレクタ制御信号を作成する。なおメモリ制御信号は公知のやり方で作成されるため、セレクタ制御信号の作成についてのみ説明する。まず映像ストリーム解析部25は、PES パケットが入力されると、そのPES パケットに含まれている時刻データのうち、復号時刻を示す時刻データ、すなわちDTS を検出する(ステップS5)。   In addition, when the PES packet is input, the video stream analysis unit 25 creates a memory control signal and a selector control signal. Since the memory control signal is created in a known manner, only the creation of the selector control signal will be described. First, when a PES packet is input, the video stream analysis unit 25 detects time data indicating a decoding time, that is, DTS among time data included in the PES packet (step S5).

例えば第3PES パケット85が映像ストリーム解析部25に入力されると、映像ストリーム解析部25は、第3PES パケットのヘッダに記載されている第3時刻データのうち、復号時刻を示す時刻データ、すなわち、第3DTS を検出する。なお、復号時刻を示す時刻データと再生時刻を示す時刻データが同じ場合は、再生時刻を示す時刻データ、すなわちPTS のみが時刻データとしてパケットに含まれるようになるため、映像ストリーム解析部25はPTS だけがそのパケットに含まれている場合は、PTS を検出する。   For example, when the third PES packet 85 is input to the video stream analyzer 25, the video stream analyzer 25 includes time data indicating a decoding time among the third time data described in the header of the third PES packet, that is, Detect third DTS. When the time data indicating the decoding time and the time data indicating the reproduction time are the same, only the time data indicating the reproduction time, that is, the PTS is included in the packet as the time data. If only the packet is included, the PTS is detected.

検出後、今回検出した第3DTS と、予め記憶しておいたこの第3DTS より順序が一つ前のDTS、すなわち本実施例の場合では、第2PES パケット83から検出した第2DTS との差分を計算し、第2DTS と第3DTS との周期に乱れがあるか否かを判断する。具体的には、算出した差分がある一定の値であるか否かを判断する(ステップS6)。本実施例では、図5に示すように、時刻データはフレーム周期毎に作成されるため、第3DTS と、第2DTS との差分は、映像信号の非同期切り替えがなかった場合は、1フレーム分、すなわち1/30秒である。   After detection, the difference between the third DTS detected this time and the previously stored DTS in the previous order from the third DTS, that is, in the present embodiment, the difference between the second DTS detected from the second PES packet 83 is calculated. Then, it is determined whether there is any disturbance in the period between the second DTS and the third DTS. Specifically, it is determined whether or not the calculated difference is a certain value (step S6). In the present embodiment, as shown in FIG. 5, since the time data is created for each frame period, the difference between the third DTS and the second DTS is equivalent to one frame when there is no asynchronous switching of the video signal. That is, 1/30 second.

差分を算出した結果、差分が一定の値、すなわち1フレーム分である場合は、第2DTS の周期に乱れがないため、第2DTS と対応する第2符号化データ91は映像信号における非同期切り替えがなかった部分であると判断する。よって、内部メモリ27から画像データを選択するようセレクタ制御信号を作成し、セレクタ35へとセレクタ制御信号を送る。   As a result of calculating the difference, when the difference is a constant value, that is, for one frame, there is no disturbance in the cycle of the second DTS, so the second encoded data 91 corresponding to the second DTS is not asynchronously switched in the video signal. It is determined that Therefore, a selector control signal is generated so as to select image data from the internal memory 27, and the selector control signal is sent to the selector 35.

逆に、その差分が1フレーム分ではなかった場合、すなわち、1/30秒よりも長い場合や短い場合は、第2符号化データ91は、第2DTS の周期に乱れがあるため、映像信号における非同期で切り替えられた部分、すなわち切り替え部分であると判断する。よって、M 値およびピクチャタイプから切り替え部分が復号されて内部メモリ27から出力されるまでの遅延時間を計算し、その遅延時間後に1フレームの間はメモリ33から画像データを選択するようセレクタ制御信号を作成し、セレクタ35へとセレクタ制御信号を送る。セレクタ制御信号を作成後、映像ストリーム解析部25は、第3DTS の値を、次の第4PES パケットにおける第4DTS の値との差分を算出するために保持するとともに、第2DTS の値を削除する。   Conversely, when the difference is not one frame, that is, when it is longer or shorter than 1/30 seconds, the second encoded data 91 is disturbed in the period of the second DTS. The part switched asynchronously, that is, the switching part is determined. Therefore, the selector control signal is used to calculate a delay time from the M value and the picture type until the switching portion is decoded and output from the internal memory 27, and to select image data from the memory 33 for one frame after the delay time. And a selector control signal is sent to the selector 35. After creating the selector control signal, the video stream analysis unit 25 holds the value of the third DTS in order to calculate the difference from the value of the fourth DTS in the next fourth PES packet, and deletes the value of the second DTS.

なお本実施例では、あるDTS と、このDTS よりも順序が1つ前のDTS との差分を算出し、差分が一定値ではない場合は、1つ前のDTS と対応する符号化データが切り替え部分であると判断している。これは符号化装置7において、DTS が作成された時刻から符号化が開始するためである。しかし本発明はこれに限定するわけではなく、差分を計算するために用いた2つの時刻データのうち、切り替え部分と対応している時刻データがどちらであるかの特定は、符号化装置7における時刻データが作成されるタイミングと符号化のタイミングに応じて任意に行うことが可能である。   In this embodiment, the difference between a DTS and the DTS one order earlier than this DTS is calculated. If the difference is not a constant value, the encoded data corresponding to the previous DTS is switched. Judging that it is a part. This is because the encoding apparatus 7 starts encoding from the time when the DTS is created. However, the present invention is not limited to this, and the identification of which time data corresponding to the switching portion of the two time data used for calculating the difference is in the encoding device 7. It can be arbitrarily performed according to the timing at which time data is created and the timing of encoding.

また本実施例では、DTS、すなわち復号時刻を示す時刻データを用いて、時刻データの周期の乱れを検出しているが、本発明はこれに限定するわけではなく、例えば再生時刻を示す時刻データ、すなわちPTS を用いて時刻データの周期の乱れを検出することも可能である。なおPTS を用いて検出する際は、B ピクチャが存在するために、前後するPES パケットであっても、PTS の順序が前後しているとは限らず、差分が1フレーム分にならない場合ある。よって、PTS を用いる場合では、例えばピクチャの種類等によってPTS の順序を特定し、前後するPTS を用いて差分を算出する必要がある。   In this embodiment, the DTS, that is, the time data indicating the decoding time is used to detect the disturbance of the period of the time data. However, the present invention is not limited to this. For example, the time data indicating the reproduction time That is, it is also possible to detect the disturbance of the period of time data using PTS. When PTS is used for detection, there is a B picture, so the order of PTS is not always changed even if the PES packet is forward or backward, and the difference may not be one frame. Therefore, when using the PTS, it is necessary to specify the order of the PTS according to, for example, the type of picture, and to calculate the difference using the preceding and succeeding PTS.

またパケットを1つ受信する毎に時刻データの周期を検討することに限定するわけではなく、任意のやり方を採用して、非同期切り替えがあった部分を特定することが可能である。例えば、複数のパケットを受信する毎に、時刻データの周期を検討するようにすることも可能である。例えば図8の例で説明すれば、パケットを2つ受信する毎に、すなわち1つおきに差分を計算するようにしてもよい。具体的には、第1パケットに含まれている第1DTS と第3パケットに含まれている第3DTS の差分を算出し、この差分が2フレーム分ではない場合に、さらに第1パケットにおけるDTS と第2パケットにおけるDTS の差分と、第2パケットにおけるDTS と第3パケットにおけるDTS の差分とを算出して、第1符号化データ89が切り替え部分であるのか、それとも第2符号化データ91が切り替え部分であるのかを判断するというようにすることも可能である。なお本発明はこれに限定するわけではない。   In addition, it is not limited to examining the period of time data every time one packet is received, and an arbitrary method can be adopted to identify a portion where asynchronous switching has occurred. For example, it is possible to consider the period of time data every time a plurality of packets are received. For example, referring to the example of FIG. 8, the difference may be calculated every time two packets are received, that is, every other packet. Specifically, the difference between the first DTS included in the first packet and the third DTS included in the third packet is calculated. If this difference is not two frames, the DTS in the first packet is further calculated. The difference between the DTS in the second packet and the difference between the DTS in the second packet and the DTS in the third packet are calculated, and whether the first encoded data 89 is the switching part or the second encoded data 91 is switched. It is also possible to determine whether it is a part. Note that the present invention is not limited to this.

以上のようにして映像ストリーム解析部25は、セレクタ制御信号を作成する。なおメモリ制御信号は公知のやり方で作成される。作成されたセレクタ制御信号はセレクタ35へと送られる。セレクタ35では、送られてきたセレクタ制御信号により制御されて、内部メモリ27の画像データ、またはメモリ33の画像データを選択する。なおこのセレクタ35における選択時に、内部メモリ27からは、第2画像データ99がセレクタ35へ向けて送信され、メモリ33には第2画像データより再生順序が一つ前の画像データ、すなわち、第1画像データ97が保存されているように、任意のやり方を採用して映像ストリーム解析部25、映像復号部29、メモリ制御部31、内部メモリ27、およびメモリ33のタイミングを合わせる必要がある。   As described above, the video stream analysis unit 25 creates a selector control signal. The memory control signal is generated in a known manner. The created selector control signal is sent to the selector 35. The selector 35 selects image data in the internal memory 27 or image data in the memory 33 under the control of the transmitted selector control signal. At the time of selection by the selector 35, the second image data 99 is transmitted from the internal memory 27 to the selector 35, and the image 33 whose reproduction order is one before the second image data, that is, the first image data is transmitted to the memory 33. As one image data 97 is stored, it is necessary to adopt an arbitrary method to synchronize the timings of the video stream analysis unit 25, the video decoding unit 29, the memory control unit 31, the internal memory 27, and the memory 33.

図9は、セレクタ35における画像データの選択処理を概念的に示した図である。図9において図8と同じ参照番号は同様の構成要素を示している。また図9において水平方向は時間を示している。図9においてセレクタ35は、例えばすでに時刻 t = 1 において第1画像データ97を選択し、時刻 t = 2 における画像データを選択するタイミングであるとする。このときセレクタ35が、第2画像データ99が非同期で切り替わった部分ではない旨のセレクタ制御信号を映像ストリーム解析部25から受け取ると、時刻 t = 2 では、内部メモリ27からの出力、すなわち第2画像データ99を選択する(ステップS7)。逆に、第2画像データ99が非同期で切り替わった部分である旨のセレクタ制御信号を映像ストリーム解析部25受信すると、時刻 t = 2 では、メモリ33からの出力、すなわち第1画像データ97を選択する(ステップS8)。   FIG. 9 is a diagram conceptually showing image data selection processing in the selector 35. 9, the same reference numerals as those in FIG. 8 denote the same components. In FIG. 9, the horizontal direction indicates time. In FIG. 9, for example, it is assumed that the selector 35 has already selected the first image data 97 at time t = 1 and the image data at time t = 2. At this time, when the selector 35 receives a selector control signal indicating that the second image data 99 is not an asynchronously switched portion from the video stream analysis unit 25, at time t = 2, the output from the internal memory 27, that is, the second Image data 99 is selected (step S7). Conversely, when the video stream analyzer 25 receives the selector control signal indicating that the second image data 99 is an asynchronously switched portion, the output from the memory 33, that is, the first image data 97 is selected at time t = 2. (Step S8).

なお、本実施例では、画像データの単位は1フレームであるため、セレクタ35は、第1画像データ97を選択する際は、第1画像データ97を1フレーム分、すなわち、第1画像データ97の奇数フィールド101と偶数フィールド103の両方を選択してもよいし、また第1画像データ97を1フィールド分選択し、この選択した1フィールド分の画像データを、時刻 t = 2 における奇数フィールドと偶数フィールドの両方に表示することも可能である。つまり、選択した1フィールド分の画像データが繰り返し表示されるようになる。なお画像データの単位が1フィールドの場合は、メモリ33には1フィールド分の画像データが記憶されているため、セレクタ35が選択する画像データは1フィールド分となる。   In this embodiment, since the unit of the image data is one frame, the selector 35 selects the first image data 97 for one frame, that is, the first image data 97 when selecting the first image data 97. The odd field 101 and the even field 103 may be selected, or the first image data 97 is selected for one field, and the selected one field of image data is selected as the odd field at time t = 2. It is also possible to display in both even fields. That is, the selected image data for one field is repeatedly displayed. When the unit of the image data is one field, the image data for one field is stored in the memory 33, so the image data selected by the selector 35 is for one field.

このようにセレクタ35にて選択された画像データは、映像信号作成部37へと送られ、映像信号作成部37は、非同期で切り替わっていなかった場合は第2画像データを、逆に非同期で切り替わっていた場合は第1画像データを変換し、映像信号17を作成する(ステップS9)。作成された映像信号17は、再生部5で表示装置のディスプレイや記録媒体等に出力される。   The image data selected by the selector 35 in this way is sent to the video signal creation unit 37. If the video signal creation unit 37 has not been switched asynchronously, the second image data is switched asynchronously. If so, the first image data is converted to create a video signal 17 (step S9). The created video signal 17 is output to the display of the display device, the recording medium, or the like by the reproducing unit 5.

以上のようにして本実施例では時刻データを比較することで、切り替えがあった部分を符号化した符号化データを特定し、この符号化データから復号された画像データに替えて、再生順序が一つ前の画像データを再生する。よって、余計な素子を必要としなくても、非同期切り替えがあった部分を符号化した符号化データを特定することができ、この符号化データから復号された画像データを表示することを防ぐことが可能である。   As described above, in this embodiment, by comparing the time data, the encoded data obtained by encoding the switched portion is specified, and the reproduction order is changed to the image data decoded from the encoded data. Play back the previous image data. Therefore, it is possible to specify encoded data obtained by encoding the portion that has undergone asynchronous switching without requiring an extra element, and to prevent display of image data decoded from this encoded data. Is possible.

なお本発明は本実施例に限定するわけではない。例えば、映像復号部29における復号、および映像ストリーム解析部25における周期の検出は、復号装置1に応じて任意のタイミングで行うことが可能であり、本実施例のように同時に行うことに限定するわけではない。また、本発明は、MPEG-2 方式で符号化、および復号することに限定するわけではなく、タイムスタンプを作成する方式でれば、任意の方式を採用することが可能である。   In addition, this invention is not necessarily limited to a present Example. For example, the decoding in the video decoding unit 29 and the period detection in the video stream analysis unit 25 can be performed at arbitrary timing according to the decoding device 1, and are limited to being performed simultaneously as in the present embodiment. Do not mean. Further, the present invention is not limited to encoding and decoding with the MPEG-2 system, and any system can be adopted as long as it is a system for creating a time stamp.

本発明の復号装置における復号部の実施例の構成を示すブロック図である。It is a block diagram which shows the structure of the Example of the decoding part in the decoding apparatus of this invention. 図1に示す復号部を含む復号装置の使用環境の一例を示す図である。It is a figure which shows an example of the usage environment of the decoding apparatus containing the decoding part shown in FIG. 図2に示す符号化部51の構成の一例を示したブロック図である。FIG. 3 is a block diagram illustrating an example of a configuration of an encoding unit 51 illustrated in FIG. 2. 図3に示す符号化装置で作成されるパケットの概念図である。It is a conceptual diagram of the packet produced with the encoding apparatus shown in FIG. 本実施例における時刻データの作成処理を概念的に示した図である。It is the figure which showed notionally the creation processing of the time data in a present Example. 映像信号が切り替わった際の時刻データの作成処理を概念的に示した図である。It is the figure which showed notionally the creation process of the time data at the time of a video signal switching. 図1に示す複合装置における復号処理の処理手順の一例を示した流れ図である。3 is a flowchart illustrating an example of a processing procedure of a decoding process in the composite device illustrated in FIG. 1. 図1に示す復号装置1に入力されるPES パケット、およびこのPES パケットに含まれている符号化データを復号した際の映像信号を概念的に示した図である。FIG. 2 is a diagram conceptually showing a PES packet input to the decoding apparatus 1 shown in FIG. 1 and a video signal when decoding encoded data included in the PES packet. セレクタにおける画像データの選択処理を概念的に示した図である。It is the figure which showed notionally the selection processing of the image data in a selector.

符号の説明Explanation of symbols

1 復号装置
3 符号化部
5 再生部
7 符号化装置
9 ネットワーク
1 Decryption device
3 Encoder
5 Playback section
7 Encoder
9 network

Claims (8)

映像信号を符号化した符号化データを、該符号化データを復号し再生する時刻を示す時刻データを用いて復号し、画像データを作成する復号工程と、
該画像データから前記映像信号を作成する映像信号作成工程とを含む復号方法において、該方法は、
該画像データを記憶する記憶工程と、
前記時刻データの周期を検出し、該周期に乱れがある場合は、該周期の乱れている時刻データと対応する画像データが、前記映像信号における非同期に切り替えられた切り替え部分であると判断する検出工程と、
該検出工程における判断に基づいて、前記記憶された画像データのうち、再生する画像データを選択する選択工程とを含み、
該選択工程は、前記検出工程において前記切り替え部分であると判断された際は、該切り替え部分である画像データに替えて、該画像データよりも前に再生された画像データを選択し、
前記映像信号作成工程は、該選択された画像データから前記映像信号を作成することを特徴とする復号方法。
A decoding step of decoding encoded data obtained by encoding a video signal using time data indicating a time at which the encoded data is decoded and reproduced, and creating image data;
In a decoding method including a video signal creating step of creating the video signal from the image data, the method includes:
A storage step for storing the image data;
Detection that detects the period of the time data and determines that the image data corresponding to the disturbed time data is an asynchronously switched part of the video signal when the period is disturbed Process,
A selection step of selecting image data to be reproduced from the stored image data based on the determination in the detection step,
When the selection step is determined to be the switching portion in the detection step, the image data that has been reproduced before the image data is selected instead of the image data that is the switching portion,
In the decoding method, the video signal creating step creates the video signal from the selected image data.
請求項1に記載の方法において、前記検出工程は、復号処理を行う時刻を示す時刻データの周期を検出することを特徴とする復号方法。   The decoding method according to claim 1, wherein the detecting step detects a period of time data indicating a time at which the decoding process is performed. 請求項1に記載の方法において、前記検出工程は、再生処理を行う時刻を示す時刻データの周期を検出することを特徴とする復号方法。   The decoding method according to claim 1, wherein the detecting step detects a period of time data indicating a time at which the reproduction process is performed. 請求項1ないし3のいずれかに記載の方法において、前記選択工程は、前記検出工程において前記切り替え部分であると判断された際は、該切り替え部分である画像データに替えて、該画像データより1つ前に再生された画像データを、少なくとも1フィールド分選択することを特徴とする復号方法。   4. The method according to claim 1, wherein when the selection step is determined to be the switching portion in the detection step, the image data is replaced with the image data that is the switching portion. A decoding method comprising selecting at least one field of image data reproduced immediately before. 映像信号を符号化した符号化データを、該符号化データを復号し再生する時刻を示す時刻データを用いて復号し、画像データを作成する復号手段と、
該画像データから前記映像信号を作成する映像信号作成手段とを含む復号装置において、該装置は、
該画像データを記憶する記憶手段と、
前記時刻データの周期を検出し、該周期に乱れがある場合は、該周期の乱れている時刻データと対応する画像データが、前記映像信号における非同期に切り替えられた切り替え部分であると判断する検出手段と、
該検出手段における判断に基づいて、前記記憶手段に記憶された画像データのうち、再生する画像データを選択する選択手段とを含み、
該選択手段は、前記検出手段において前記切り替え部分であると判断された際は、該切り替え部分である画像データに替えて、該画像データよりも前に再生された画像データを選択し、
前記映像信号作成手段は、該選択された画像データから前記映像信号を作成することを特徴とする復号装置。
Decoding means for decoding encoded data obtained by encoding a video signal using time data indicating a time for decoding and reproducing the encoded data, and creating image data;
In a decoding device including a video signal creating means for creating the video signal from the image data, the device comprises:
Storage means for storing the image data;
Detection that detects the period of the time data and determines that the image data corresponding to the disturbed time data is an asynchronously switched part of the video signal when the period is disturbed Means,
Selection means for selecting image data to be reproduced from among the image data stored in the storage means based on the determination in the detection means,
When the selection unit determines that the switching unit is the switching part, the selection unit selects image data reproduced before the image data instead of the image data that is the switching part,
The decoding apparatus according to claim 1, wherein the video signal creating means creates the video signal from the selected image data.
請求項5に記載の装置において、前記検出手段は、復号処理を行う時刻を示す時刻データの周期を検出することを特徴とする復号装置。   6. The decoding device according to claim 5, wherein the detection unit detects a period of time data indicating a time at which the decoding process is performed. 請求項5に記載の装置において、前記検出手段は、再生処理を行う時刻を示す時刻データの周期を検出することを特徴とする復号装置。   6. The decoding device according to claim 5, wherein the detection unit detects a period of time data indicating a time at which the reproduction process is performed. 請求項5ないし7のいずれかに記載の装置において、前記選択手段は、前記検出手段において前記切り替え部分であると判断された際は、該切り替え部分である画像データに替えて、該画像データより1つ前に再生された画像データを、少なくとも1フィールド分選択することを特徴とする復号装置。   8. The apparatus according to claim 5, wherein when the detection unit determines that the selection unit is the switching part, the selection unit replaces the image data that is the switching part with the image data. A decoding apparatus, wherein at least one field of image data reproduced immediately before is selected.
JP2006040320A 2006-02-17 2006-02-17 Decoding method and device Withdrawn JP2007221505A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006040320A JP2007221505A (en) 2006-02-17 2006-02-17 Decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006040320A JP2007221505A (en) 2006-02-17 2006-02-17 Decoding method and device

Publications (1)

Publication Number Publication Date
JP2007221505A true JP2007221505A (en) 2007-08-30

Family

ID=38498256

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006040320A Withdrawn JP2007221505A (en) 2006-02-17 2006-02-17 Decoding method and device

Country Status (1)

Country Link
JP (1) JP2007221505A (en)

Similar Documents

Publication Publication Date Title
JP3698376B2 (en) Synchronous playback device
US6404818B1 (en) Video transmission device and its method
KR101132043B1 (en) Decoder and decoding method
US8144791B2 (en) Apparatus, method, and medium for video synchronization
US7869522B2 (en) Video signal multiplexer, video signal multiplexing method, and picture reproducer
US6754273B1 (en) Method for compressing an audio-visual signal
US8238446B2 (en) Method and apparatus for reproducing digital broadcasting
JP2009105706A (en) Image/sound synchronous playback device
US6636563B2 (en) Decoder and decoding method for information signal
KR20040080930A (en) Information processing apparatus and method
JP2872104B2 (en) Time stamp adding apparatus and method, and moving image compression / expansion transmission system and method using the same
JP4689231B2 (en) Transport stream switching device
JP5211615B2 (en) Video / audio signal transmission method and transmission apparatus therefor
JP2002010254A (en) Feature point detection method and record reproduction device
KR100240331B1 (en) Apparatus for synchronizing a video and an audio signals for a decoder system
JPWO2004034616A1 (en) Broadcast data transmission / reception system and broadcast data transmission / reception method
JP2007221505A (en) Decoding method and device
JP2001231035A (en) Decoding synchronous controller, decoder, and decode synchronization control method
JP2006191538A (en) Compressed stream decoding instrument and compressed stream decoding method
JP2007201797A (en) Transmission system and video output method
JPH11127435A (en) Device for decoding compression-encoded video and voice signal
JP2005333412A (en) Multiple-stream generating device
JP2000354241A (en) Image decoder
JPH1083632A (en) Digital signal coding method and device, digital signal transmitting method and signal recording medium
JP3206649B2 (en) MPEG2 decoding processing method

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