[go: up one dir, main page]

KR20140148304A - Transport stream switching method, apparatus and system - Google Patents

Transport stream switching method, apparatus and system Download PDF

Info

Publication number
KR20140148304A
KR20140148304A KR20140067662A KR20140067662A KR20140148304A KR 20140148304 A KR20140148304 A KR 20140148304A KR 20140067662 A KR20140067662 A KR 20140067662A KR 20140067662 A KR20140067662 A KR 20140067662A KR 20140148304 A KR20140148304 A KR 20140148304A
Authority
KR
South Korea
Prior art keywords
stream
input
input stream
picture
point
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
KR20140067662A
Other languages
Korean (ko)
Inventor
조숙희
김종호
추현곤
최진수
김진웅
Original Assignee
한국전자통신연구원
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 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to US14/305,610 priority Critical patent/US9860458B2/en
Publication of KR20140148304A publication Critical patent/KR20140148304A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • H04N21/23605Creation or processing of packetized elementary streams [PES]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

본 발명은 전송 스트림 전환 방법을 개시하고 있다. 상기 방법은 복수 개의 서로 다른 입력 스트림을 수신하는 단계, 상기 복수 개의 입력 스트림 중 현재 출력되는 제 1 입력 스트림에 대한 절체 명령을 입력받는 단계, 상기 절체 명령을 기반으로 상기 제 1 입력 스트림의 출구점(Out-point) 및 새롭게 출력되는 제 2 입력 스트림의 입구점(In-point)을 탐색하는 단계, 상기 출구점과 입구점 사이에 가상 P 픽처(picture) 스트림 및 널 패킷(Null-packet)을 삽입하는 단계 및 상기 출구점과 입구점을 기반으로 상기 제 1 입력 스트림에서 상기 제 2 입력 스트림으로의 절체를 수행하는 단계를 포함한다.The present invention discloses a transport stream switching method. The method includes the steps of receiving a plurality of different input streams, receiving a switch command for a first input stream currently output from the plurality of input streams, Searching for an Out-point of the first input stream and an In-point of the second output stream newly outputting a virtual P picture stream and a Null-packet between the exit point and the entry point; And performing a transfer from the first input stream to the second input stream based on the exit point and the entry point.

Description

전송 스트림 전환 방법, 장치 및 시스템{TRANSPORT STREAM SWITCHING METHOD, APPARATUS AND SYSTEM}TRANSPORT STREAM SWITCHING METHOD, APPARATUS AND SYSTEM,

본 발명은 전송 스트림 전환 방법, 장치 및 시스템에 관한 것으로, 보다 상세하게는, 서로 다른 인코더에서 출력되는 2개 이상의 MPEG-2 TS(Transport Stream)를 입력에 대해 사용자로부터의 절체 명령에 따라 선택되어지는 1개의 MPEG-2 TS를 절체하여 출력하는 MPEG-2 TS 전환 장치 및 방법에 관한 것이다.The present invention relates to a transport stream switching method, apparatus and system, and more particularly, to a transport stream switching method, apparatus and system, in which two or more MPEG-2 transport streams (TS) output from different encoders are selected The present invention relates to an MPEG-2 TS switching apparatus and method for switching and outputting one MPEG-2 TS.

도 1은 MPEG-2 TS 전환을 위한 입구점(In-Point) 및 출구점(Out-Point)의 예시적인 모습을 도시한 도면이다.1 is a diagram showing an exemplary view of an in-point and an out-point for switching an MPEG-2 TS.

도 1을 참조하면, 종래의 MPEG-2 TS 전환 방식으로는 ISO/IEC 1381-1 MPEG-2 시스템(Systems)에서 제공하는 방식으로 TS 전환 방식이 있다. "전환 시점"은 "입구점(In-Point)"과 "출구점(Out-Point)"으로 나누어지며, 입구점은 새로운 스트림이 전환되어 들어갈 수 있는 지점이며 출구점은 다시 기존의 스트림으로 전환되는 지점이다. 기존의 TS 전환 방식에서 도 1과 같이 영상의 끊김없는 연속 전환을 위해서는, 제약 조건에 맞는 픽처(picture)가 나올 때까지 기다린 후, 그 지점을 전환 시점으로 삼고 전환을 시작한다. 제약 조건에 맞는 픽처라고 하는 것은, 출구점의 경우는 PTS(Presentation Time Stamp) 기준으로 마지막 픽처가 I 또는 P 픽처이어야 한다는 것과 새로 교체되는 스트림(도 1에서 B 스트림)의 비디오 스트림의 시작도 I 픽처이어야 한다는 것이다. 또한, 교체되어 들어가는 시점(In-point) 의 I-picture 뒤에 있는 B 픽처(B 스트림에서 점선으로 되어 있는 B 픽처)는 교체되어 들어가는 시점 이전의 영상을 참조하지 않도록 부호화해야 한다는 것이다. 그렇지 않으면, 점선으로 되어 있는 B 픽처가 참조한 영상의 정보를 얻을 수 없으므로 이들 B 픽처를 디코더가 제대로 복원을 하지 못하는 문제가 발생하게 된다.Referring to FIG. 1, the conventional MPEG-2 TS switching method is a TS switching method in a manner provided by ISO / IEC 1381-1 MPEG-2 Systems. The "transition point" is divided into "In-Point" and "Out-Point", where the entry point is the point at which the new stream can be converted and the exit point is converted back to the existing stream . In the conventional TS conversion method, as shown in FIG. 1, in order to continuously switch the video without a continuous transition, the system waits until a picture satisfying the constraint condition is obtained, and then starts switching the point of time as the switching point. The picture satisfying the constraint means that the last picture should be an I or P picture based on a presentation time stamp (PTS) in the case of an exit point, and the start of a video stream of a new stream (B stream in FIG. 1) It should be a picture. In addition, a B-picture (B-picture in dotted line in the B stream) behind the in-point I-picture to be replaced is to be encoded so as not to refer to an image before the point of time of replacement. Otherwise, since the information of the image referenced by the B picture in the dotted line can not be obtained, there arises a problem that the decoder can not properly restore these B pictures.

도 2는 복수의 MPEG-2 TS가 연결되는 경우의 일 실시예를 나타낸 도면이다.2 is a diagram illustrating an embodiment in which a plurality of MPEG-2 TSs are connected.

도 2를 참조하면, ISO/IEC 1381-1 MPEG-2 시스템(Systems)에서 제공하는 MPEG-2 TS 전환 방식의 경우는 도 2에 나타낸 바와 같이 프로그램 별로 MPEG-2 TS가 이미 만들어져 있고, 이들 프로그램의 TS를 순차적으로 연결시켜주기 위하여 제안된 것이다. 따라서, 도 2에 도시된 바와 같이 이미 프로그램 1 TS 다음에 절체되어질 광고 1 TS의 처음은 IDR(Instantaneous Decoding Refresh) 픽처로 부호화되어 있을 것이다. 따라서, 입구점이 IDR 픽처가 될 것이므로 도 1의 B스트림에서 점선으로 된 B 픽처는 존재하지 않으므로 문제가 되지 않았다. 2, in the case of the MPEG-2 TS conversion scheme provided by ISO / IEC 1381-1 MPEG-2 Systems, an MPEG-2 TS is already prepared for each program as shown in FIG. 2, Of TS in order. Therefore, as shown in FIG. 2, the beginning of the advertisement 1 TS to be transferred after the program 1 TS is already encoded as an IDR (Instantaneous Decoding Refresh) picture. Therefore, since the entry point will be an IDR picture, there is no problem since there is no B-picture in dotted line in the B stream in Fig.

그러나, 서로 다른 인코더로부터 복수 개의 MPEG-2 TS가 계속하여 입력되고 있는 경우에는 절체되어 들어올 스트림에서 IDR 픽처가 올 때까지 기다린 후 절체하는 것은 지연 시간이 너무 길어지는 문제점이 있다. However, when a plurality of MPEG-2 TSs are continuously input from different encoders, there is a problem in that delay time is excessively long after waiting for an IDR picture to be transferred in a stream to be transferred.

또한, 절체되어 들어올 스트림에서 I 픽처 다음의 B 픽처의 복호가 안되는 문제점을 없애기 위해서는 Closed GOP 구조를 사용하면 가능하다. 그러나, 방송에서 방송 프로그램의 비디오를 부호화할 때, 부호화 효율 측면을 고려하여 Open GOP 구조로 부호화하는 것이 일반적이다. 그렇다고, 스트림 교체가 예상되는 지점에서만 Closed GOP 구조로 부호화한다는 것은 인코더의 설정을 변경해야 하므로 거의 불가능하다.In addition, in order to eliminate the problem that decoding of a B picture next to an I picture can not be performed in a stream to be switched, it is possible to use a closed GOP structure. However, when encoding a video of a broadcast program in a broadcast, encoding is generally performed in an Open GOP structure in consideration of the encoding efficiency. However, encoding in a closed GOP structure only at a point where stream replacement is expected is almost impossible because the setting of the encoder must be changed.

또한, 입력되는 복수의 MPEG-2 TS를 버퍼링 하지 않고, 가능한 빠른 시간 내에 2개 TS를 절체하는 것이 요구되는데, 이를 위해서는 절체 가능한 시점이 A 스트림에서 DTS(Decoding Time Stamp) 기준으로 P 또는 I 픽처가 시작하는 시점에 B 스트림의 I 픽처가 입력되어야만 가능하다. In addition, it is required to transfer two TSs as soon as possible without buffering a plurality of inputted MPEG-2 TSs. To this end, a switchable time point is defined as a P or I picture on the basis of a DTS (Decoding Time Stamp) It is only necessary to input an I picture of the B stream.

도 3은 MPEG-2 TS 전환에 있어서, 지연(Delay)가 크게 발생하는 입구점의 예시를 나타낸 도면이다.FIG. 3 is a diagram showing an example of an entry point at which delay greatly occurs in the MPEG-2 TS conversion.

도 3을 참조하면, 출구점을 찾은 후 B 스트림에서 처음 나타나는 I 픽처가 A 스트림의 P 픽처가 입력되어 지고 있어 A 스트림을 끊기가 어렵게 되며, 결국 A 스트림의 P 또는 I 픽처가 끝남과 동시에 B 스트림의 I 픽처가 입력되는 순간에 절체 가능함으로써 절체 지연시간이 상당히 길어지는 문제점이 있음을 알 수 있다. Referring to FIG. 3, it is difficult to break the A stream because the P picture of the A stream is input to the I picture that appears first in the B stream after finding the exit point. As a result, when the P or I picture of the A stream ends, It can be switched at the moment when an I-picture of the stream is input, so that there is a problem that the switching delay time becomes considerably long.

도 4a는 종래 HDTV와 3DTV 서비스의 혼용 방송의 예시이고, 도 4b는 종래 HDTV와 다채널 서비스의 혼용방송의 예시이다. FIG. 4A shows an example of a mixed broadcast of a conventional HDTV and a 3DTV service, and FIG. 4B shows an example of a mixed broadcast of a conventional HDTV and a multi-channel service.

도 4a 및 도 4b를 참조하면, 단일 채널에서 HDTV 프로그램, 3D 프로그램, 다채널 서비스 프로그램이 혼용되어 서비스될 경우, MPEG-2 TS 절체시에 문제가 발생할 수 있다. Referring to FIGS. 4A and 4B, when an HDTV program, a 3D program, and a multi-channel service program are mixed and served in a single channel, a problem may occur during MPEG-2 TS switching.

따라서, 2개의 MPEG-2 TS를 서로 다른 2개의 MPEG-2 TS를 연결시켜 주는 시점에서 오디오나 영상이 끊기거나 깨지는 현상 없이 복원될 수 있는 형태로 연결시켜줄 필요성이 요구된다.Accordingly, there is a need to connect two MPEG-2 TSs in a form that can be restored without splitting or breaking the audio or video at the time of connecting two different MPEG-2 TSs.

상술한 문제점을 해결하기 위한 본 발명의 목적은 서로 다른 인코더에서 출력되는 2개의 MPEG-2 TS(Transport Stream, 전송스트림)를 서로 연결시켜 주는 방법에 관한 것으로, 서로 다른 2개의 MPEG-2 TS를 연결시켜 주는 시점에서 오디오가 끊기거나 영상이 깨지는 현상 없이 복원될 수 있는 형태로 서로 다른 MPEG-2 TS를 연결시켜 주는 방법 및 장치를 제공하는 것이다.An object of the present invention is to provide a method for connecting two MPEG-2 TSs (Transport Streams) output from different encoders to each other. And to provide a method and an apparatus for connecting different MPEG-2 TSs in a form that can be restored without a loss of audio or image distortion at the time of connection.

상기한 목적을 달성하기 위한 본 발명의 전송 스트림 전환 방법은 복수 개의 서로 다른 입력 스트림을 수신하는 단계, 상기 복수 개의 입력 스트림 중 현재 출력되는 제 1 입력 스트림에 대한 절체 명령을 입력받는 단계, 상기 절체 명령을 기반으로 상기 제 1 입력 스트림의 출구점(Out-point) 및 새롭게 출력되는 제 2 입력 스트림의 입구점(In-point)을 탐색하는 단계, 상기 출구점과 입구점 사이에 가상 P 픽처(picture) 스트림을 삽입하는 단계 및 상기 출구점과 입구점을 기반으로 상기 제 1 입력 스트림에서 상기 제 2 입력 스트림으로의 절체를 수행하는 단계를 포함할 수 있다.According to an aspect of the present invention, there is provided a transport stream switching method comprising: receiving a plurality of different input streams; receiving a switching command for a first input stream currently output from the plurality of input streams; Searching for an Out-point of the first input stream and an In-point of a newly output second input stream based on the command, picture stream from the first input stream to the second input stream and performing a transfer from the first input stream to the second input stream based on the exit point and the entry point.

상기 출구점은 상기 절체 명령 이후의 최초 I 또는 P 픽처의 시작점으로 탐색되고, 상기 입구점은 상기 출구점 이후의 최초 I 픽처의 시작점으로 탐색될 수 있다.The exit point is searched to the start point of the first I or P picture after the transfer command and the entry point can be searched as the start point of the first I picture after the exit point.

상기 가상 P 픽처 스트림은 상기 출구점으로부터 상기 입구점까지의 상기 제 1 입력 스트림의 픽처 스트림을 대체하여 삽입되고, 상기 출구점부터 상기 입구점까지의 픽처 스트림의 길이에 맞게 널 패킷(Null-Packet)을 채울 수 있다.Wherein the virtual P-picture stream is inserted as a substitute for the picture stream of the first input stream from the exit point to the entry point, and a null packet is inserted in accordance with the length of the picture stream from the exit point to the entry point. ).

상기 가상 P 픽처 스트림은 상기 제 1 또는 제 2 입력 스트림에 포함되어 있는 비디오 ES(Element Stream)에 대한 분석을 통해 부호화 방식에 따라 모든 매크로블록의 움직임 정보 및 잔차신호가 0으로 만들어진 스트림일 수 있다.The virtual P-picture stream may be a stream in which motion information of all macroblocks and residual signal are made to be 0 according to an encoding scheme through analysis of a video ES (Element Stream) included in the first or second input stream .

상기 입구점 이전의 픽처를 참조하는 상기 입구점 이후의 제 2 입력 스트림의 P 또는 B 픽처가 존재하는 경우, 상기 P 또는 B 픽처를 상기 가상 P 픽처 스트림으로 대체하고, 패킷 길이만큼 널 패킷을 삽입할 수 있다.If there is a P or B picture of a second input stream after the entry point that refers to a picture preceding the entry point, replacing the P or B picture with the virtual P picture stream, can do.

상기 입구점 이후의 상기 제 2 입력 스트림의 PTS(Presentation Time Stamp), DTS(Decoding Time Stamp) 및 PCR(Program Clock Reference)의 타임스탬프는 상기 제 1 입력 스트림의 시간 정보를 기반으로 연속되는 PTS, DTS 및 PCR의 타임스탬프가 되도록 수정될 수 있다.Wherein a PTS (Presentation Time Stamp), a DTS (Decoding Time Stamp) and a PCR (Program Clock Reference) time stamp of the second input stream after the entry point are consecutive PTSs based on time information of the first input stream, DTS, and PCR timestamps.

상기 제 2 입력 스트림이 3D 좌영상 스트림인 경우, 상기 3D 좌영상에 대응하는 우영상 비디오 스트림의 절체는, 상기 절체가 상기 제 2 입력 스트림의 입구점을 기준으로 이루어질 때, 상기 제 2 입력 스트림의 입구점에 해당하는 픽처의 PTS를 저장해 두었다가, 상기 우영상 스트림의 PTS 및 DTS를 상기 저장된 PTS를 기준으로 수정하고, 상기 제 1 입력 스트림의 PCR을 기준으로 상기 우영상 비디오 스트림의 PCR을 수정할 수 있다.Wherein when the second input stream is a 3D left video stream, the right video stream corresponding to the 3D left video is switched when the switching is based on an input point of the second input stream, The PTS of the right video stream is corrected based on the stored PTS and the PCR of the right video stream is corrected based on the PCR of the first input stream .

상기 제 1 입력 스트림으로부터 상기 제 2 입력 스트림으로의 제 1 절체 이후, 다시 상기 제 2 입력 스트림으로부터 상기 제 1 입력 스트림으로의 제 2 절체가 이루어질 때, 상기 제 1 절체 이후부터 제 2 절체에 대한 절체 명령 입력시까지의 제 1 입력 스트림의 프레임 개수인 제 1 프레임 카운트 값과 제 2 입력 스트림의 프레임 개수인 제 2 프레임 카운트 값을 카운트하는 단계 및 상기 제 1 프레임 카운트 값과 상기 제 2 프레임 카운트 값을 비교하여 비교 결과에 따라 상기 제 2 절체를 수행하는 단계를 더 포함할 수 있다.After the first transfer from the first input stream to the second input stream and again after the second transfer from the second input stream to the first input stream, Counting a first frame count value as a frame number of a first input stream and a second frame count value as a frame number of a second input stream until a transfer command is input; And performing the second transfer according to the result of the comparison.

상기 제 2 프레임 카운트 값이 상기 제 1 프레임 카운트 값보다 큰 경우, 상기 제 2 절체를 수행할 때, 상기 제 1 프레임 카운트 값에서 상기 제 2 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 길이만큼, 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 널 패킷을 삽입할 수 있다.Wherein when the second frame count value is greater than the first frame count value, when the second frame count value is greater than the first frame count value, A null packet can be inserted between the output point of the second input stream and the input point of the first input stream.

상기 삽입된 널 패킷 이후에 상기 제 1 입력 스트림의 입구점까지의 픽처 스트림은 상기 가상 P 픽처 스트림으로 대체하며, 상기 널 패킷을 이용하여 패킷 길이를 맞춰줄 수 있다.The picture stream up to the entry point of the first input stream after the inserted null packet is replaced with the virtual P picture stream and the packet length can be adjusted using the null packet.

상기 제 1 프레임 카운트 값이 상기 제 2 프레임 카운트 값보다 큰 경우, 상기 제 2 절체를 수행할 때, 상기 제 2 프레임 카운트 값에서 상기 제 1 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 수만큼 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 상기 가상 P 픽처 스트림을 삽입하고, 상기 가상 P 픽처 스트림을 삽입하여 출력하는 동안에도 상기 제 1 프레임 카운트 및 상기 제 2 프레임 카운트를 계속하여 카운트하여, 두 값이 같아질 때까지 상기 가상 P 픽처 스트림을 더 삽입할 수 있다.Wherein when the first frame count value is greater than the second frame count value, when the second frame count value is smaller than the second frame count value, The first P picture stream and the second P picture stream are inserted between the output point of the 2 input stream and the input point of the first input stream, And further insert the virtual P picture stream until the two values become equal.

상기 제 1 입력 스트림으로부터 제 2 입력 스트림으로의 오디오 신호의 절체는 비디오의 절체가 이루어지는 픽처의 PTS를 저장시켜 두었다가 나중에 입력되는 오디오의 PTS가 상기 비디오 픽처가 절체되는 PTS에 대응하는 시간을 절체 시점으로 하여 이루어질 수 있다.The switching of the audio signal from the first input stream to the second input stream is performed by storing the PTS of the picture to which the video is to be switched and setting the time corresponding to the PTS of the audio to be input later, ≪ / RTI >

상기 제 1 입력 스트림 및 상기 제 2 입력 스트림에 대해 서로 다른 링버퍼를 구성하여 오디오 PES(Packetized Elementary Stream)에 있는 시간 정보로부터 내부에 포함되어 있는 프레임 단위의 시간정보를 계산하여 저장할 수 있다.A different ring buffer may be configured for the first input stream and the second input stream to calculate and store time information in units of frames included in the time information in an audio PES (Packetized Elementary Stream).

상기한 목적을 달성하기 위한 본 발명의 전송 스트림 전환 장치는 복수 개의 서로 다른 입력 스트림을 수신하는 입력 스트림 수신부, 상기 복수 개의 입력 스트림 중 현재 출력되는 제 1 입력 스트림에 대한 절체 명령을 입력받는 절체 명령 입력부, 상기 절체 명령을 기반으로 상기 제 1 입력 스트림의 출구점(Out-point) 및 새롭게 출력되는 제 2 입력 스트림의 입구점(In-point)을 탐색하는 탐색부, 상기 출구점과 입구점 사이에 가상 P 픽처(picture) 스트림을 삽입하는 삽입부 및 상기 출구점과 입구점을 기반으로 상기 제 1 입력 스트림에서 상기 제 2 입력 스트림으로의 절체를 수행하는 절체 수행부를 포함할 수 있다.According to an aspect of the present invention, there is provided a transport stream switching apparatus including an input stream receiver for receiving a plurality of different input streams, a switch command for receiving a switch command for a first input stream, A search unit for searching an Out-point of the first input stream and an In-point of a newly output second input stream based on the transfer command, An insertion unit for inserting a virtual P picture stream into the first input stream, and a switch performing unit for performing switching from the first input stream to the second input stream based on the exit point and the entry point.

상기 삽입부는 상기 가상 P 픽처 스트림을 상기 출구점으로부터 상기 입구점까지의 상기 제 1 입력 스트림의 픽처 스트림을 대체하여 삽입하고, 상기 널 패킷을 상기 출구점부터 상기 입구점까지의 픽처 스트림의 길이에 맞게 채울 수 있다.Wherein the inserting unit inserts the virtual P-picture stream in place of the picture stream of the first input stream from the exit point to the entry point, and inserts the null packet into the length of the picture stream from the exit point to the entry point You can fill it right.

상기 가상 P 픽처 스트림은 상기 제 1 또는 제 2 입력 스트림에 포함되어 있는 비디오 ES(Element Stream)에 대한 분석을 통해 부호화 방식에 따라 모든 매크로블록의 움직임 정보 및 잔차신호가 0으로 만들어진 스트림일 수 있다.The virtual P-picture stream may be a stream in which motion information of all macroblocks and residual signal are made to be 0 according to an encoding scheme through analysis of a video ES (Element Stream) included in the first or second input stream .

상기 제 1 입력 스트림으로부터 상기 제 2 입력 스트림으로의 제 1 절체 이후, 다시 상기 제 2 입력 스트림으로부터 상기 제 1 입력 스트림으로의 제 2 절체가 이루어질 때, 상기 제 1 절체 이후부터 상기 제 2 절체에 대한 절체 명령 입력시까지의 제 1 입력 스트림의 프레임 개수인 제 1 프레임 카운트 값과 제 2 입력 스트림의 프레임 개수인 제 2 프레임 카운트 값을 카운트하는 프레임 카운터를 더 포함하되, 상기 제 1 프레임 카운트 값과 상기 제 2 프레임 카운트 값을 비교하여 비교 결과에 따라 상기 제 2 절체를 수행할 수 있다.After the first transfer from the first input stream to the second input stream and again after the second transfer from the second input stream to the first input stream, Further comprising: a frame counter for counting a first frame count value, which is the number of frames of the first input stream, and a second frame count value, which is the number of frames of the second input stream, And the second frame count value, and perform the second transfer according to the comparison result.

상기 제 2 프레임 카운트 값이 상기 제 1 프레임 카운트 값보다 큰 경우, 상기 제 2 절체를 수행할 때, 상기 제 1 프레임 카운트 값에서 상기 제 2 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 길이만큼, 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 널 패킷을 삽입할 수 있다.Wherein when the second frame count value is greater than the first frame count value, when the second frame count value is greater than the first frame count value, A null packet can be inserted between the output point of the second input stream and the input point of the first input stream.

상기 제 1 프레임 카운트 값이 상기 제 2 프레임 카운트 값보다 큰 경우, 상기 제 2 절체를 수행할 때, 상기 제 2 프레임 카운트 값에서 상기 제 1 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 수만큼 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 상기 가상 P 픽처 스트림을 삽입하고, 상기 가상 P 픽처 스트림을 삽입하여 출력하는 동안에도 상기 제 1 프레임 카운트 및 상기 제 2 프레임 카운트를 계속하여 카운트하여, 두 값이 같아질 때까지 상기 가상 P 픽처 스트림을 더 삽입할 수 있다.Wherein when the first frame count value is greater than the second frame count value, when the second frame count value is smaller than the second frame count value, The first P picture stream and the second P picture stream are inserted between the output point of the 2 input stream and the input point of the first input stream, And further insert the virtual P picture stream until the two values become equal.

상기한 목적을 달성하기 위한 본 발명의 전송 스트림 전환 시스템은 부호화된 복수 개의 입력 스트림을 생성하여 전송하는 복수 개의 인코더 및 상기 복수 개의 인코더로부터 상기 복수 개의 입력 스트림을 수신하여 특정 입력 스트림으로의 절체를 수행하는 전송 스트림 전환기를 포함하되, 상기 전송 스트림 전환기는, 상기 복수 개의 입력 스트림 중 현재 출력되는 제 1 입력 스트림에 대한 절체 명령을 입력받고, 상기 절체 명령을 기반으로 상기 제 1 입력 스트림의 출구점(Out-point) 및 새롭게 출력되는 제 2 입력 스트림의 입구점(In-point)을 탐색하며, 상기 탐색된 제 1 입력 스트림의 출구점과 제 2 입력 스트림의 입구점 사이에 가상 P 픽처(picture) 스트림을 삽입하여 상기 출구점과 입구점을 기반으로 상기 제 1 입력 스트림에서 상기 제 2 입력 스트림으로의 절체를 수행할 수 있다.According to an aspect of the present invention, there is provided a transport stream switching system including a plurality of encoders for generating and transmitting a plurality of encoded input streams, and a plurality of encoders for receiving the plurality of input streams, Wherein the transport stream switcher receives a switch command for a first input stream which is currently output among the plurality of input streams, and outputs the switch command to the output port of the first input stream based on the switch command, (P-picture) between an output point of the searched first input stream and an input point of a second input stream, ) Stream is inserted into the second input stream from the first input stream based on the exit point and the entry point. In which it can perform a transfer.

본 발명의 전송 스트림 전환 방법, 장치 및 시스템에 따르면, Open GOP 구조에서 서로 다른 인코더에서 출력되는 2개의 MPEG-2 TS(Transport Stream, 전송스트림)를 서로 연결시켜 줌에 있어서, 서로 다른 2개의 MPEG-2 TS를 연결시켜 주는 시점에서 오디오가 끊기거나 영상이 깨지는 현상 없이 복원할 수 있으며, 입력되는 2개의 입력되는 TS의 버퍼링 없이 사용자로부터 절체명령을 받은 시점으로터 가능한 빠른 시간내에 절체가 가능하도록 해 주는 효과가 있다. 이에 따라 1개 채널에서 HDTV와 3DTV 또는 다채널 서비스를 혼용하는 방송서비스에서 반드시 필요한 기술이다.According to the transport stream switching method, apparatus and system of the present invention, in linking two MPEG-2 TS (Transport Streams) output from different encoders in an Open GOP structure, two different MPEG -2 It is possible to restore without interrupting audio or image distortion at the time of connecting TS. It is possible to change the time as soon as possible after receiving the switching command from the user without buffering the two input TSs. It has effect. Therefore, this technology is indispensable for broadcasting services that mix HDTV with 3DTV or multi-channel services in one channel.

또한, 본 발명의 전송 스트림 전환 방법, 장치 및 시스템에 따르면, MPEG-2 TS 전환기에 입력되어 출력되기까지의 처리시간을 최소화하여야 방송프로그램의 지연이 짧아지게 되고, 따라서, 입력되어지는 TS를 버퍼에 저장하지 않고 바로 처리할 수 있다.According to the transport stream switching method, apparatus and system of the present invention, the processing time until input and output to the MPEG-2 TS switching unit is minimized, the delay of the broadcasting program is shortened. Therefore, It can be processed immediately without storing it.

도 1은 MPEG-2 TS 전환을 위한 입구점(In-Point) 및 출구점(Out-Point)의 예시적인 모습을 도시한 도면,
도 2는 복수의 MPEG-2 TS가 연결되는 경우의 일 실시예를 나타낸 도면,
도 3은 MPEG-2 TS 전환에 있어서, 지연(Delay)가 크게 발생하는 입구점의 예시를 나타낸 도면,
도 4a는 종래 HDTV와 3DTV 서비스의 혼용 방송의 예시,
도 4b는 종래 HDTV와 다채널 서비스의 혼용방송의 예시,
도 5는 하나의 채널에서 3DTV와 HDTV가 혼용되는 방송 서비스 지원을 위한 본 발명의 일 실시예에 따른 MPEG-2 TS 전환기의 입출력 형태를 나타낸 도면,
도 6은 본 발명의 일 실시예에 따른 전송 스트림 전환 방법을 개략적으로 나타낸 흐름도,
도 7은 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 따라 제 1 입력 스트림에서 제 2 입력 스트림으로의 절체시 비디오 스트림의 구성을 설명하기 위한 개념도,
도 8은 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 있어서, 절체되어 들어온 제 2 입력 스트림에서 비디오 ES에 대한 PTS 변경의 예시적인 모습을 나타낸 개념도,
도 9는 본 발명의 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 1 및 제 2 입력 스트림의 프레임 카운트 값에 따른 절체 방법을 나타낸 흐름도,
도 10은 본 발명의 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 2 프레임 카운트가 제 1 프레임 카운트보다 큰 경우의 예시적인 모습을 나타낸 개념도,
도 11은 본 발명의 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 2 프레임 카운트가 제 1 프레임 카운트보다 큰 경우의 PTS 값 생성의 예시적인 모습을 나타낸 개념도,
도 12는 본 발명의 또 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 1 프레임 카운트가 제 2 프레임 카운트보다 큰 경우의 예시적인 모습을 나타낸 개념도
도 13은 본 발명의 또 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 1 프레임 카운트가 제 2 프레임 카운트보다 큰 경우의 PTS 값 생성의 예시적인 모습을 나타낸 개념도,
도 14는 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 있어서, 오디오 프레임에 대한 시간 정보를 계산하여 링 버퍼에 저장하는 예시를 설명하기 위한 개념도,
도 15는 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 있어서, 오디오 스트림의 절체에 대한 예시를 설명하기 위한 개념도,
도 16은 본 발명의 일 실시예에 따른 전송 스트림 전환 장치를 나타낸 블록도이다.
Figure 1 illustrates an exemplary view of an In-Point and an Out-Point for MPEG-2 TS switching,
2 is a diagram illustrating an embodiment in which a plurality of MPEG-2 TSs are connected,
3 is a diagram showing an example of an entry point at which delay greatly occurs in MPEG-2 TS conversion,
4A shows an example of a mixed broadcast of a conventional HDTV and a 3DTV service,
4B shows an example of a hybrid broadcast of a conventional HDTV and a multi-channel service,
5 is a diagram illustrating an input / output format of an MPEG-2 TS switcher according to an embodiment of the present invention for supporting a broadcast service in which 3DTV and HDTV are mixed in one channel;
FIG. 6 is a flowchart schematically showing a transport stream switching method according to an embodiment of the present invention;
7 is a conceptual diagram for explaining a configuration of a video stream upon switching from a first input stream to a second input stream according to a transport stream switching method according to an embodiment of the present invention;
8 is a conceptual diagram illustrating an exemplary view of a PTS change for a video ES in a switched second input stream, according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating a transmission method according to another exemplary embodiment of the present invention, which is performed according to a frame count value of a first and a second input stream,
10 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the second frame count at the exit point is larger than the first frame count A conceptual view showing an exemplary view,
11 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the second frame count at the exit point is larger than the first frame count A conceptual diagram showing an exemplary appearance of PTS value generation,
12 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the first frame count at the exit point is larger than the second frame count A conceptual view showing an example of
13 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the first frame count at the exit point is larger than the second frame count Lt; RTI ID = 0.0 > PTS < / RTI >
FIG. 14 is a conceptual diagram for explaining an example of calculating time information for an audio frame and storing it in a ring buffer in the transport stream switching method according to an embodiment of the present invention; FIG.
15 is a conceptual diagram for explaining an example of switching of an audio stream in a transport stream switching method according to an embodiment of the present invention;
16 is a block diagram illustrating a transport stream switching apparatus according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail.

그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

제 1, 제 2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제 1 구성요소는 제 2 구성요소로 명명될 수 있고, 유사하게 제 2 구성요소도 제 1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가진 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the relevant art and are to be interpreted in an ideal or overly formal sense unless explicitly defined in the present application Do not.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In order to facilitate the understanding of the present invention, the same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.

3DTV와 HDTV가 혼용되는 방송 서비스 환경Broadcast service environment in which 3DTV and HDTV are mixed

현재 지상파 DTV의 경우 1 채널에 단일 방송프로그램이 전송되고 있다. 그러나, 서비스 호환 3DTV 서비스나 1개 채널에서 복수 개의 프로그램을 서비스하는 다채널 서비스(MMS: Multi-Mode Service)가 도입되면, 도 4a 및 도 4b와 같이 방송 프로그램에 따라 1 채널에서 1개 HDTV 프로그램이 서비스되는 시간이 있는가 하면, 3DTV 프로그램 또는 MMS 프로그램과 같이 복수 개의 프로그램이 서비스되는 혼용방송이 있을 수 있다. Currently, a terrestrial DTV is broadcasting a single broadcast program on one channel. However, if a service-compatible 3DTV service or a multi-mode service (MMS) for providing a plurality of programs in one channel is introduced, one HDTV program There may be a mixed broadcast in which a plurality of programs are served, such as a 3DTV program or an MMS program.

서비스 호환 3DTV 방식은 좌우영상의 스트림을 각각 부호화하여 전송함으로써 기존 HDTV 방송서비스와 호환성을 가지는 3DTV 방식으로, 기존 HDTV를 소유하고 있는 사용자는 3DTV 신호 중에서 MPEG-2 인코더로 부호화된 신호만을 수신하여 HDTV 방송을 시청할 수 있다. 마찬가지로, 다채널 서비스 방식에서도 기존 HDTV를 소유하고 있는 사용자는 복수 개의 프로그램 중에서 기존 HDTV 1 개의 프로그램을 시청할 수 있다. The service-compatible 3DTV scheme is a 3DTV scheme compatible with existing HDTV broadcasting services by encoding and transmitting streams of left and right images. A user who owns an existing HDTV receives only signals encoded by the MPEG-2 encoder from the 3DTV signals, The broadcast can be watched. Similarly, in a multi-channel service, a user who owns an existing HDTV can view one program from a plurality of programs.

반면, 3DTV나 MMS 시청이 가능한 TV 또는 단말을 가지고 있으면, 사용자는 3DTV 및 복수 개의 프로그램 중에서 선택하여 시청할 수 있게 된다. 이때, 방송사는 1 개의 HDTV 프로그램에서 3DTV 프로그램이나 MMS 프로그램으로 전환하거나, 반대로 3DTV 프로그램이나 MMS 프로그램에서 1개의 HDTV 프로그램으로 전환하여 MPEG-2 TS를 송출해야 한다. 이때, 송출되는 MPEG-2 TS가 서로 다른 인코더에서 출력되더라도 기존 HDTV 사용자는 1개의 HDTV 방송만을 연속하여 시청하는 환경이 되므로, 오디오가 끊기거나 영상이 깨지는 현상이 발생하지 않아야 한다. On the other hand, if a user has a TV or a terminal capable of 3DTV or MMS viewing, the user can select and watch 3DTV and a plurality of programs. At this time, broadcasters should switch from one HDTV program to a 3DTV program or an MMS program, or vice versa, and switch to a HDTV program in a 3DTV program or an MMS program to transmit an MPEG-2 TS. At this time, even if the transmitted MPEG-2 TS is output from different encoders, the existing HDTV users are required to continuously view only one HDTV broadcast, so that no audio interruption or image distortion should occur.

도 5는 하나의 채널에서 3DTV와 HDTV가 혼용되는 방송 서비스 지원을 위한 본 발명의 일 실시예에 따른 MPEG-2 TS 전환기의 입출력 형태를 나타낸 도면이다.5 is a diagram illustrating an input / output format of an MPEG-2 TS converter according to an embodiment of the present invention for supporting a broadcasting service in which 3DTV and HDTV are mixed in one channel.

도 5를 참조하면, 하나의 HDTV 프로그램은 HDTV에 대한 신호(502)에 대하여 MPEG-2 인코더(510)가 부호화하고, 3DTV 프로그램은 HDTV(좌영상) 신호(502)와 우영상 신호(504)가 3DTV 인코더(520)에서 부호화된다. 방송사에서는 안전성을 위하여 프로그램이 HDTV이든 3DTV 프로그램이든 2개의 인코더(510, 520)는 24시간 계속하여 작동하는 것이 일반적이다. 따라서 프로그램이 무엇이든 상관없이 HDTV 인코더(510), 3DTV 인코더(520) 및 MPEG-2 TS 전환기(530)는 정상적인 작동을 계속한다. HDTV 프로그램일 경우 3DTV 인코더(520)는 좌영상(502)만 부호화하고, 우영상(504)은 널 데이터(Null data)를 출력할 것이다. 혼용방송 지원을 위한 MPEG-2 TS 전환기(530)는 기본적으로 MPEG-2 인코더(510)에서 입력되는 TS를 출력하고 있다가 3DTV 프로그램이 시작하게 되면 3DTV 인코더(520)에서 입력되는 TS로 절체하여 출력한다. 이 때 3DTV 인코더(520)에서 출력되는 TS 내에는 HDTV 프로그램을 포함하고 있다. HDTV를 소유하고 있는 시청자는 3DTV 프로그램으로 바뀌면서 3DTV 인코더(520)에서 출력되는 MPEG-2 TS에서 HDTV 신호만을 수신 및 복호하여 시청하게 되는데 이때 HDTV 의 비디오/오디오가 깨지지 않도록 하는 것이 중요하다. 반면, 3DTV를 소유하고 있는 시청자도 마찬가지로 HDTV 신호만을 계속하여 수신하여 복호하다가 3DTV 프로그램이라는 정보를 받게 되면, 시청자의 선호도에 따라 HDTV를 시청할 것인지 3DTV로 변경하여 시청할 것인지를 결정하게 된다. 따라서, HDTV(좌영상)(502)의 비디오 및 오디오는 깨지는 현상이 발생하면 안되지만, 우영상(504)은 사용자가 3DTV 시청모드를 선택하면 복호가 이루어지게 되므로 이어지는 부분 없이 처음부터 시작하는 형태가 된다. 이러한 이유로 MPEG-2 TS 전환기(530)는 HDTV 프로그램 TS에서 3DTV 프로그램 TS로 절체할 때, HDTV 프로그램 TS와 3DTV 프로그램 TS내의 좌영상(502) TS를 기준으로 출구점과 입구점을 탐색하여 처리한다. 좌영상(502) TS의 입구점이 결정되어 절체처리가 이루어지면 우영상(504) TS는 좌영상(502) TS의 입구점을 기준으로 우영상(504) TS의 절체 처리를 수행한다. 본 명세서 상에는 전송 스트림(TS)이 MPEG-2 TS만을 언급하고 있으나, 다른 전송 스트림, 예컨대, MMT(MPEG Media Transport) 스트림 등의 스트림의 사용도 가능할 수 있다. 또한, 절체되어지는 서비스 신호도 반드시 HDTV 및 3DTV만으로 한정되는 것은 아니고, 부호화 방식이 다른 임의의 서비스 방식의 절체의 경우에 모두 사용될 수 있으며, 부호화 방식이 같더라도, 부호화 파라미터 등이 상이하여 전환이 반드시 필요한 경우에 본 발명의 절체 방식을 사용할 수 있다.
5, one HDTV program is encoded by the MPEG-2 encoder 510 with respect to the HDTV signal 502 and the 3DTV program is encoded with the HDTV (left video) signal 502 and the right video signal 504, Is encoded in the 3DTV encoder 520. [ For safety reasons, it is common for broadcasters to operate two encoders 510 and 520 continuously for 24 hours, whether the program is an HDTV or a 3DTV program. Accordingly, the HDTV encoder 510, the 3DTV encoder 520, and the MPEG-2 TS converter 530 continue normal operation regardless of the program. In the case of an HDTV program, the 3DTV encoder 520 will encode only the left image 502 and the right image 504 will output null data. The MPEG-2 TS switcher 530 for supporting mixed broadcasts basically outputs the TS inputted from the MPEG-2 encoder 510, and when the 3DTV program is started, the TS is switched to the TS input from the 3DTV encoder 520 Output. At this time, the TS output from the 3DTV encoder 520 includes an HDTV program. The viewer who owns the HDTV receives and decodes only the HDTV signal from the MPEG-2 TS output from the 3DTV encoder 520 while changing to the 3DTV program. It is important that the video / audio of the HDTV is not broken. On the other hand, a viewer who owns 3DTV likewise continuously receives and decodes only the HDTV signal and receives information such as 3DTV program, and decides whether to watch HDTV or 3DTV according to the viewer's preference. Therefore, the video and audio of the HDTV (left image) 502 should not be broken, but the right image 504 is decoded when the user selects the 3DTV viewing mode. Therefore, do. For this reason, when switching from the HDTV program TS to the 3DTV program TS, the MPEG-2 TS switcher 530 searches and processes the exit point and the entrance point based on the HDTV program TS and the left image 502 TS in the 3DTV program TS . When the entry point of the left image 502 is determined and the transfer processing is performed, the right image 504 TS performs the transfer processing of the right image 504 TS based on the entry point of the left image 502 TS. Although the transport stream (TS) only refers to the MPEG-2 TS in this specification, it is also possible to use a stream such as another transport stream, for example, an MMT (MPEG Media Transport) stream. In addition, the service signal to be switched is not necessarily limited to HDTV and 3DTV, and may be used in any case of switching of any service method having different coding schemes. Even if the coding method is the same, The switching method of the present invention can be used when necessary.

전송 스트림 전환 방법How to switch transport streams

도 6은 본 발명의 일 실시예에 따른 전송 스트림 전환 방법을 개략적으로 나타낸 흐름도이다.6 is a flowchart schematically showing a transport stream switching method according to an embodiment of the present invention.

도 6을 참조하면, 전송 스트림 전환 장치(미도시)는 먼저, 복수 개의 서로 다른 입력 스트림을 수신한다(S610). 서로 다른 입력 스트림은 전환이 필요한 스트림으로써, 부호화 방식이 다른 스트림일 수 있다. 서로 다른 입력 스트림은 서로 다른 인코더로부터 수신되는 스트림일 수 있다. 복수 개의 입력 스트림이 수신되면, 장치는 절체 명령이 있는지 모니터링한다(S620). 절체 명령은 자동 또는 수동으로 입력될 수 있다. 예컨대, 절체하고자 하는 사용자가 절체 명령을 사용자 인터페이스(미도시) 등을 이용하여 입력할 수 있고, 또는 사용자 설정을 통해 절체 명령을 자동으로 입력할 수 있다. 자동 입력시 시간을 설정하여 주기적으로 절체 명령을 입력할 수도 있다. 절체 명령을 수신한 장치는 출구점 및 입구점을 탐색한다(S630). 출구점과 입구점은 전술한 바와 같이, 제 1 입력 스트림 및 제 2 입력 스트림(제 1 입력 스트림은 현재 출력되고 있다가 절체를 통해 출력이 종료되는 스트림이고, 제 2 입력 스트림은 절체를 통해 새롭게 출력되는 스트림임)에서 특정 픽처가 출현하는 시점을 기준으로 탐색될 수 있다. 즉, 제 1 입력 스트림을 기준으로 출구점을 찾고, 출구점 위치부터 제 2 입력 스트림을 기준으로 입구점을 찾을 수 있다. 다만, 본 발명의 일 실시예에 따르면, 종래의 방식과 다르게, 절체에 관여된 제 1 및 제 2 입력 스트림의 출구점과 입구점이 제 1 입력 스트림 및 제 2 입력 스트림 자체의 절대적인 관계만을 고려하여 이루어질 수 있다는 점이다. 즉, 이를 통해, 상대적인 관계에 따라 출구점과 입구점이 뒤로 밀려 절체 시간의 지연이 일어나는 것을 방지할 수 있다. Referring to FIG. 6, a transport stream switching apparatus (not shown) first receives a plurality of different input streams (S610). The different input streams may be streams having different encoding schemes as streams requiring conversion. The different input streams may be streams received from different encoders. When a plurality of input streams are received, the device monitors whether there is a transfer command (S620). The transfer command can be entered automatically or manually. For example, a user who wishes to switch can input a transfer command using a user interface (not shown), or can automatically input a transfer command through user setting. It is also possible to input the change command periodically by setting the time for automatic input. Upon receiving the transfer command, the apparatus searches for an exit point and an entry point (S630). As described above, the exit point and the entrance point are the first input stream and the second input stream (the first input stream is the stream currently being outputted and the output is ended through the transfer, and the second input stream is newly (I.e., a stream to be outputted). That is, it is possible to find the exit point based on the first input stream, and to find the entry point based on the second input stream from the exit point location. However, according to one embodiment of the present invention, unlike the conventional method, only the absolute relationship between the exit point and the entrance point of the first and second input streams involved in the switching is determined based on the absolute relationship between the first input stream and the second input stream itself . That is, through this, the exit point and the entrance point can be pushed backward according to the relative relationship, thereby preventing the transfer time from being delayed.

이렇게 출구점 및 입구점을 탐색하고 나면, 출구점과 입구점 사이에 가상 P 픽처 스트림 및 널 패킷(Null Packet)을 삽입한다(S640). 본 발명의 일 실시예에 따른 가상 P 픽처 스트림은 입력되는 전송 스트림 내에 포함되어 있는 비디오 ES에 대한 분석을 통해 MPEG-2, AVC(Advanced Video Coding), HEVC(High Efficiency Video Coding) 등의 비디오 부호화 방식에 따라 모든 매크로블록의 움직임 정보가 0이고, 전차신호가 0으로 만들어진 스트림으로, 가상 P 픽처 ES는 미리 생성하여 메모리에 저장하여 둘 수 있다. 경우에 따라, 입구점 탐색 과정과 가상 P 픽처 및 널 패킷 삽입 과정의 시간 선후 관계는 어떠한 것이 먼저 오더라도 상관 없다. 즉, 출구점 탐색 이후, 입구점이 나타날 때까지 가상 P 픽처 및 널 패킷을 삽입하다 입구점 조건에 맞는 픽처 스트림을 탐색하여 가상 P 픽처 및 널 패킷 삽입을 종료할 수도 있고, 출구점 탐색 이후, 미리 입구점을 스캔하여, 탐색된 입구점과 출구점 사이에 가상 P 픽처 및 널 패킷을 삽입할 수도 있다. 널 패킷은 제 1 입력 스트림의 출구점부터 제 2 입력 스트림의 입구점까지 P나 B 픽처 스트림의 길이만큼 채워 길이를 맞춰주는 역할을 한다.After searching for the exit point and the entry point, a virtual P picture stream and a null packet are inserted between the exit point and the entry point (S640). The virtual P picture stream according to an exemplary embodiment of the present invention may include video encoding such as MPEG-2, Advanced Video Coding (AVC), and High Efficiency Video Coding (HEVC) through analysis of a video ES included in an input transport stream The virtual P-picture ES can be generated in advance and stored in the memory in a stream in which the motion information of all the macroblocks is 0 and the train signal is made 0 according to the method. In some cases, the temporal relationship between the entry point search process and the virtual P-picture and null packet insertion process may be preceded by any one of them. That is, after a search for an exit point, a virtual P picture and a null packet are inserted until an entry point appears, a virtual P picture and a null packet insertion may be terminated by searching a picture stream satisfying an entry point condition, It is also possible to scan an entry point and insert a virtual P picture and a null packet between the retrieved entry point and the exit point. Null packets fill the length of the P or B picture stream from the output point of the first input stream to the input point of the second input stream to match the length.

가상 P 픽처 스트림 및 널 패킷 삽입 이후, 장치는 입구점에서 제 2 입력 스트림으로의 절체를 수행한다(S650). After the virtual P picture stream and Null packet insertion, the device performs a switch from the ingress point to the second input stream (S650).

도 7은 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 따라 제 1 입력 스트림에서 제 2 입력 스트림으로의 절체시 비디오 스트림의 구성을 설명하기 위한 개념도이다.7 is a conceptual diagram for explaining a configuration of a video stream upon switching from a first input stream to a second input stream according to a transport stream switching method according to an embodiment of the present invention.

도 7을 참조하면, 전송 스트림 전환 장치(예컨대, MPEG-2 TS 전환기)의 전원이 켜지면, 제 1 입력 스트림(710)과 제 2 입력 스트림(720)을 입력받을 수 있다. 이때, 전술한 예시와 대응되는 실시예로 설명하면, 제 1 입력 스트림은 HDTV TS일 수 있고, 제 2 입력 스트림은 3DTV TS일 수 있다(도 5 참조). 이 경우, HDTV TS가 제 1 입력 스트림(710)으로 자동 출력되는 상태이다. 이때 3DTV 프로그램이 시작되어 제 2 입력 스트림(720: 3DTV TS)로 절체하고자 사용자가 절체명령(702)을 줄 수 있다. 전술한 바와 같이, 절체명령(702)은 자동 또는 수동으로 입력이 가능하다. 절체명령(702)이 입력되면, 제 1 입력 스트림(710)에서 비디오를 기준으로 출구점(712)을 찾고, 출구점(712) 위치부터 제 2 입력 스트림(720: 3DTV TS) 내의 좌영상 비디오를 기준으로 입구점(714)이 나타날 때 까지 가상의 P 픽처 스트림(732)으로 대체하여 삽입한다. 그리고 제 1 입력 스트림(710)의 비디오 스트림에서 출구점(712)부터 입구점(714)까지의 P 나 B 픽처 스트림 길이만큼 널 패킷으로 채워 길이를 맞춘다.Referring to FIG. 7, the first input stream 710 and the second input stream 720 can be input when the power of the transport stream switching apparatus (for example, MPEG-2 TS switching apparatus) is turned on. In this case, the first input stream may be an HDTV TS and the second input stream may be a 3DTV TS (refer to FIG. 5). In this case, the HDTV TS is automatically output to the first input stream 710. At this time, a 3DTV program may be started and a user may give a switch command 702 to switch to the second input stream 720 (3DTV TS). As described above, the transfer command 702 can be input automatically or manually. When the transfer command 702 is input, an exit point 712 is searched based on the video in the first input stream 710, and the left video image 720 in the second input stream 720 (3DTV TS) P picture stream 732 until an entry point 714 appears on the basis of the P picture stream 732. [ Then, the length of the video stream of the first input stream 710 is filled with null packets as much as the length of the P or B picture stream from the exit point 712 to the entry point 714.

출력 스트림(730)을 참조하면, 스트림 구간(732)에서 제 1 입력 스트림(710)에 대응하여 제 1 입력 스트림(710)의 P 또는 B 픽처 부분을 가상 P 픽처 스트림(732)으로 대체하여 삽입한다. 가상 P 픽처 ES(732)는 모든 매크로블록의 움직임 정보가 0이고, 잔차신호가 0이 되도록 만들어진 스트림이어서, 실제 비디오 픽처 ES보다 데이터량이 훨씬 작아 입력 TS 의 버퍼링 없이도 출구점(712) 이후의 첫 입구점(714)에서 I 픽처의 시작 위치를 널 패킷으로 채워 맞추기가 용이하다. Referring to output stream 730, the P or B picture portion of the first input stream 710 is replaced with a virtual P picture stream 732 in stream section 732 corresponding to the first input stream 710, do. The virtual P-picture ES 732 is a stream made such that the motion information of all the macroblocks is 0 and the residual signal is 0 so that the amount of data is much smaller than the actual video picture ES so that the first PEC after the exit point 712 It is easy to fill the start position of the I picture with the null packet at the entry point 714.

본 발명의 일 실시예에 따르면, 입구점(714) 이후의 점선으로 된 2개의 B 픽처(716)를 가상 P 픽처 ES(736)로 대체함으로써 별도의 2개 TS가 연결되더라도 영상이 깨지는 현상을 막아준다. 점선으로 된 2개의 B 픽처(716)는 제 2 입력 스트림의 입구점(714) 이전의 영상을 참조하는 영상이기 때문에, 참조하는 영상이 절체 이전에 존재하므로, 참조할 영상이 없어 영상이 깨질 수 있으므로, 이를 가상 P 픽처 ES(736)로 대체하여 깨지는 현상을 방지할 수 있다. 이때, 2개의 비디오가 서로 다른 부호화 방식으로 부호화된 스트림인 경우, 출력 스트림(730)에서 관점에서는, 출구점(712)에서 입구점(714)까지의 가상 P 픽처 ES(732)와 입구점(714) 이후의 가상 P 픽처 ES(736)는 다른 형태의 ES가 될 수 있다. According to an embodiment of the present invention, by replacing two B pictures 716 with a dotted line after an entry point 714 with an imaginary P picture ES 736, even if two separate TSs are connected, It prevents you. Since the two B pictures 716 in the dotted line refer to the image before the entry point 714 of the second input stream, since the reference image exists before the transfer, there is no image to be referenced, Therefore, it is possible to replace the virtual P-picture ES 736 with the virtual P-picture ES 736 to prevent the picture from being broken. At this time, when two videos are coded in different coding schemes, the virtual P-picture ES 732 and the entry point 732 from the exit point 712 to the entry point 714 (from the point of view of the output stream 730) 714), the virtual P-picture ES 736 may be another type of ES.

본 발명의 실시예에 따르면, 제 1 입력 스트림(710: HDTV TS) 내의 비디오가 MPEG-2 인코더를 사용하고, 제 2 입력 스트림(720: 3DTV TS) 내의 좌영상 비디오가 마찬가지로 MPEG-2 인코더를 사용하므로 출구점(712)에서 입구점(714)까지의 가상 P 픽처 ES(732)와 입구점(714) 이후의 가상 P 픽처 ES(736)는 동일한 가상 P 픽처 ES가 된다. According to an embodiment of the present invention, the video in the first input stream 710 (HDTV TS) uses an MPEG-2 encoder and the left video in the second input stream 720 (3DTV TS) uses an MPEG- The virtual P-picture ES 732 from the exit point 712 to the entry point 714 and the virtual P-picture ES 736 after the entry point 714 are the same virtual P-picture ES.

도 8은 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 있어서, 절체되어 들어온 제 2 입력 스트림에서 비디오 ES에 대한 PTS 변경의 예시적인 모습을 나타낸 개념도이다.8 is a conceptual diagram showing an exemplary view of a PTS change for a video ES in a switched second input stream in a transport stream switching method according to an embodiment of the present invention.

도 8을 참조하면, 도 7에서와 같이 출력되는 ES에 있어, 절체되어진 제 2 입력 스트림(820: 3DTV TS) 내의 좌영상 비디오 ES에 대해서는 PTS(Presentation Time Stamp), DTS(Decoding Time Stamp) 및 PCR(Program Clock Reference)의 타임스탬프를 수정해야 한다. 타임스탬프는 제 1 입력 스트림(810)인 HDTV MPEG-2 TS의 시간 정보를 기반으로 연속된 PTS, DTS 및 PCR의 타임스탬프가 되도록 수정한다. 이때, DTS 및 PCR은 PTS를 기준에 준하여 처리할 수 있다. Referring to FIG. 8, in the ES outputted as shown in FIG. 7, a PTS (Presentation Time Stamp), a DTS (Decoding Time Stamp), and a DTS are applied to the left video ES in the second input stream 820 The time stamp of the PCR (Program Clock Reference) must be modified. The time stamp is modified to be a time stamp of PTS, DTS, and PCR that are consecutive based on the time information of the HDTV MPEG-2 TS, which is the first input stream 810. At this time, DTS and PCR can be processed according to the PTS.

본 발명의 다른 실시예에 있어서, HDTV TS에서 3DTV TS 절체에 있어서 3DTV TS 내의 우영상 비디오 ES 절체는 좌영상 비디오 ES를 기준으로 이루어진다. 즉, 3DTV TS 내의 좌영상 비디오 ES를 기준으로 입구점을 찾아 절체가 시작되는 비디오의 PTS를 저장해 두었다가 입력 3DTV MPEG-2 TS 내의 우영상 비디오 ES가 나타나면 저장해 둔 PTS를 기준으로 PTS 및 DTS를 수정하고, 제 1 입력 스트림(810)의 PCR 기준으로 PCR를 수정할 수 있다.
In another embodiment of the present invention, the right video ES transition in the 3DTV TS in the 3DTV TS transition in the HDTV TS is based on the left video ES. In other words, if PTS of the video in which the switching is started is found by searching the entrance point based on the left video ES in the 3DTV TS, and the right video ES of the input 3DTV MPEG-2 TS is displayed, the PTS and DTS are corrected based on the stored PTS And modify the PCR based on the PCR of the first input stream 810.

재절체 명령 처리 절차Re-transfer command processing procedure

도 9는 본 발명의 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 1 및 제 2 입력 스트림의 프레임 카운트 값에 따른 절체 방법을 나타낸 흐름도이다.9 is a flowchart illustrating a transmission method according to a frame count value of first and second input streams in a transport stream switching method according to another embodiment of the present invention.

도 9를 참조하면, 전송 스트림 전환 장치(미도시)는 제 1 입력 스트림으로부터 제 2 입력 스트림으로의 제 1 절체를 수행하고 나면(S910), 제 1 및 제 2 입력 스트림에 대한 프레임 갯수를 카운트한다(S920). 이는 반드시 제 1 절체 이후에 시행되는 것은 아니고, 프레임 카운터(미도시)에서, 제 1 및 제 2 입력 프레임에 대한 프레임 갯수 카운팅을 기존에 수행하고 있는 상황에서, 절체 시점을 기점으로 리셋하여 수행하는 방식으로 처리될 수 있다. 그리고는, 제 2 입력 스트림으로부터 제 1 입력 스트림으로의 재절체인 제 2 절체 명령을 입력받는다(S930). 예컨대, HDTV TS에서 3DTS로 절체가 이루어져 3DTV TS가 출력되다가 다시 3DTV TS에서 HDTV TS로의 절체를 위한 절체 명령을 입력받는 경우를 포함할 수 있다. 이때, 장치는 제 1 절체 이후부터 절체 명령 입력시까지의 제 2 입력 프레임의 카운트 값과 제 1 입력 프레임의 카운트 값을 비교한다(S940). 이때, 비교 결과에 따라 제 2 절체를 위한 과정이 상이하게 수행될 수 있다. 9, the transport stream switching device (not shown) performs a first switch from the first input stream to the second input stream (S910), counts the number of frames for the first and second input streams (S920). This is not necessarily performed after the first transfer, but is performed by resetting the transfer time point as a starting point in a state where a frame counter (not shown) counts the number of frames for the first and second input frames . ≪ / RTI > Then, a second transfer command, which is a re-transfer from the second input stream to the first input stream, is input (S930). For example, it may include a case of switching from the HDTV TS to the 3DTS, outputting the 3DTV TS, and receiving the switching command for switching from the 3DTV TS to the HDTV TS again. At this time, the apparatus compares the count value of the second input frame with the count value of the first input frame from the first transmission to the input of the transfer command (S940). At this time, the process for the second transfer can be performed differently according to the comparison result.

비교 결과, 제 2 입력 프레임의 카운트 값이 제 1 입력 프레임의 카운트 값보다 큰 경우, 제 2 입력 프레임과 제 1 입력 프레임의 차이값에 해당하는 프레임 수의 패킷 길이만큼 널 패킷을 삽입한다(S950). 그리고는, 삽입된 널 패킷 이후부터, 제 1 입력 스트림의 입구점까지의 픽처 스트림을 가상 P 픽처 스트림으로 대체할 수 있다(S960). 가상 P 픽처로 대체한 이후, 전술한 실시예에서와 마찬가지로, 패킷의 길이를 맞춰주기 위해, 널 패킷을 삽입한다(S970). 그리고는, 제 1 입력 스트림의 입구점에서 제 2 절체를 수행한다(S980). As a result of comparison, if the count value of the second input frame is larger than the count value of the first input frame, a null packet is inserted by the packet length corresponding to the difference value between the second input frame and the first input frame (S950 ). Then, the picture stream from the inserted null packet to the entry point of the first input stream can be replaced with the virtual P picture stream (S960). After replacing with a virtual P picture, a null packet is inserted to match the length of the packet (S970), as in the above-described embodiment. Then, a second transfer is performed at the entry point of the first input stream (S980).

다시 단계(S940)로 돌아가서, 비교 결과, 제 1 입력 프레임의 카운트 값이 제 2 입력 프레임의 카운트 값보다 큰 경우, 차이값에 해당하는 패킷 수만큼 가상 P 픽처 스트림을 삽입한다(S955). 그리고는, 가상 P 픽처를 스트림을 삽입하는 순간에도 제 1 절체 이후부터 제 1 및 제 2 입력 스트림에 대한 프레임 카운팅을 계속 수행하여 두 프레임 카운트 값이 같아질 때까지 추가적으로 가상 P 픽처 스트림을 삽입한다(S965). 두 프레임 카운트 값이 같아지면, 과정을 종료하고, 제 1 입력 스트림의 입구점에서 제 2 절체를 수행한다(S980).If the count value of the first input frame is greater than the count value of the second input frame as a result of the comparison (S940), a virtual P picture stream is inserted for the number of packets corresponding to the difference value (S955). Then, even at the moment of inserting the stream of the virtual P picture, frame counting for the first and second input streams is continued from the first transmission, and the virtual P picture stream is further inserted until the two frame count values become equal (S965). If the two frame count values become equal, the process is terminated and a second transfer is performed at the entry point of the first input stream (S980).

도 10은 본 발명의 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 2 프레임 카운트가 제 1 프레임 카운트보다 큰 경우의 예시적인 모습을 나타낸 개념도이다.10 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the second frame count at the exit point is larger than the first frame count Fig.

도 10을 참조하면, 제 1 입력 스트림(1010: HDTV TS)에서 제 2 입력 스트림(1020: 3DTV TS)로 절체가 이루어져서 제 2 입력 스트림(1020: 3DTV TS)이 출력되고 있다가 3DTV 프로그램이 종료되어 다시 제 1 입력 스트림(1010: HDTV TS)으로 절체될 때 비디오 및 오디오 신호에 문제가 없도록 하기 위해서 제 1 입력 스트림(1010)에서 제 2 입력 스트림(1020)으로의 절체 이후 입력되는 제 1 입력 스트림(1010)의 비디오 프레임 개수와 제 2 입력 스트림(1020)에서 출력되어지는 비디오 프레임 개수(예컨대, 좌영상 비디오 프레임 개수)를 계속하여 카운트한다. 제 1 입력 스트림(1010: HDTV TS)의 프레임 개수를 Frame_Count_1라고 하고, 제 2 입력 스트림(1020: 3DTV TS)에서 출력되는 프레임 개수를 Frame_Count_2라고 한다. 제 2 입력 스트림(1020)에서 제 1 입력 스트림(1010)으로의 절체명령(1002)을 받으면, 상기에서 설명한 바와 같이 출구점(1012)과 입구점(1014)을 탐색한다. 출구점(1012)에서의 Frame_Count_1과 Frame_Count_2 값이 어느 쪽이 큰 지에 따라 TS 전환 처리 방식이 2 가지로 나뉘어진다. 10, a second input stream 1020 (3DTV TS) is transferred from a first input stream 1010 (HDTV TS) to a second input stream 1020 (3DTV TS) Input from the first input stream 1010 to the second input stream 1020 so that there is no problem with the video and audio signals when the first input stream 1010 is switched back to the first input stream 1010 (HDTV TS) The number of video frames in the stream 1010 and the number of video frames output in the second input stream 1020 (e.g., the number of left video frames) are continuously counted. The number of frames of the first input stream 1010 (HDTV TS) is Frame_Count_1, and the number of frames output from the second input stream 1020 (3DTV TS) is Frame_Count_2. Upon receiving the transfer command 1002 from the second input stream 1020 to the first input stream 1010, it searches for an exit point 1012 and an entry point 1014 as described above. The TS switching processing method is divided into two depending on which of the Frame_Count_1 and Frame_Count_2 values at the exit point 1012 is larger.

먼저, 출구점(1012)에서의 Frame_Count_2가 Frame_Count_1보다 큰 경우는 Frame_Count_1에서 frame_Count_2 수를 뺀 프레임 수에 해당하는 패킷 길이만큼 널 패킷(1032)을 채운다. 도 10의 실시예는 출구점(1012)에서의 Frame_Count_2 Frame_Count_1 = 2개 프레임인 경우에 대한 예시를 나타낸다. 제 1 입력 스트림(1010: HDTV TS) 내의 비디오 ES에서 점선으로 표시된 P 픽처 및 B 픽처에 해당하는 패킷 길이만큼 널 패킷(1032)을 채워 출력한다. 점선으로 된 B 픽처 이후부터 입구점까지의 4개 픽처 ES(1034)는 제 1 입력 스트림에 대응하는 부분으로, 가상 P 픽처 ES로 대체하여 출력하며, 전술한 바와 마찬가지로 널 패킷을 이용하여 패킷 길이를 맞춘다. First, when the Frame_Count_2 at the exit point 1012 is larger than the Frame_Count_1, the null packet 1032 is filled by the packet length corresponding to the frame number obtained by subtracting the frame_Count_2 from the Frame_Count_1. The embodiment of FIG. 10 shows an example of the case where Frame_Count_2 Frame_Count_1 = 2 frames at the outgoing point 1012. FIG. A null packet 1032 is filled with a packet length corresponding to a P-picture and a B-picture indicated by a dotted line in a video ES in the first input stream 1010 (HDTV TS). The four picture ESs 1034 from the dotted B picture to the entry point are replaced with the virtual P picture ES as a part corresponding to the first input stream, and as described above, using the null packet, the packet length .

도 11은 본 발명의 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 2 프레임 카운트가 제 1 프레임 카운트보다 큰 경우의 PTS 값 생성의 예시적인 모습을 나타낸 개념도이다.11 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the second frame count at the exit point is larger than the first frame count Fig. 8 is a conceptual diagram showing an exemplary appearance of PTS value generation. Fig.

도 11을 참조하면, 마찬가지로 PTS, DTS 및 PCR 등 타임스탬프 값의 변경이 필요하다. 제 2 입력 스트림(1120: 3DTV TS)에서 제 1 입력 스트림(1110: HDTV TS)으로 절체할 경우는, 도 11에 도시된 바와 같이, 가상 P 픽처 ES에 대한 타임스탬프 값만 생성하여 설정하여 주면 된다. 다시 절체되어 들어오는 제 1 입력 스트림(1110: HDTV TS)에서의 입구점(1114)은 I 픽처로 타임스탬프 변경 없이 연결하여 주면 된다(도 11에서 타임스탬프 "65"로 연결). Referring to FIG. 11, similarly, it is necessary to change the time stamp values such as PTS, DTS, and PCR. In the case of switching from the second input stream 1120 (3DTV TS) to the first input stream 1110 (HDTV TS), only the time stamp value for the virtual P-picture ES is generated and set as shown in FIG. 11 . The entry point 1114 in the first input stream 1110 (HDTV TS) that is switched back in is connected to the I picture without changing the time stamp (connected with time stamp "65" in FIG. 11).

도 12는 본 발명의 또 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 1 프레임 카운트가 제 2 프레임 카운트보다 큰 경우의 예시적인 모습을 나타낸 개념도이다.12 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the first frame count at the exit point is larger than the second frame count As shown in FIG.

도 12를 참조하면, 제 2 입력 스트림(1220)의 출구점(1212)에서의 Frame_Count_2가 Frame_Count_1보다 작게 입력된 경우를 설명한다. 이 경우, Frame_Count_1에서 Frame_Count_2를 뺀 프레임 수 만큼 가상의 P 픽처 스트림(1232)을 끼워 넣는다. 가상의 P 픽처 스트림(1232)을 끼워 넣어 출력하고 있는 순간에도 제 1 입력 스트림(1210: HDTV TS)의 입력이 계속하여 이루어지고 있으므로, 제 1 입력 스트림(1210: HDTV TS) 내의 비디오 프래임 개수를 계속하여 카운트하고, 가상의 P 픽처 스트림(1232)을 삽입하는 만큼 Frame_Count_2도 계속 증가시켜 두 값이 같아질 때까지 삽입한다. 도 12의 실시예에서는, 출구점(1212)에서 Frame_Count_1 - Frame_Count_2 = 6개 프레임인 경우에 대한 일 실시예를 나타내었고, 도 12의 실시예에 있어서, 추가적으로 2 개의 가상 P 픽처 스트림(1234)를 더 삽입하여, 총 8개의 가상 P 픽처 스트림이 삽입되었을 때 제 1 입력 스트림(1210: HDTV TS)의 임의의 프레임이 시작되는 패킷 위치가 맞추어진 경우이다. 그리고 입구점(1214) 앞에 있는 3개의 픽처에 대해서는 앞선 실시예에서와 마찬가지로, 가상의 P 픽처와 널 패킷을 통해패킷 길이를 맞춘다.12, a case where Frame_Count_2 at the exit point 1212 of the second input stream 1220 is input smaller than Frame_Count_1 will be described. In this case, a virtual P picture stream 1232 is interleaved by the number of frames obtained by subtracting Frame_Count_2 from Frame_Count_1. The input of the first input stream 1210 (HDTV TS) continues even at the moment when the virtual P picture stream 1232 is interleaved and output, so that the number of video frames in the first input stream 1210 (HDTV TS) Continues to count, and Frame_Count_2 is continuously increased by inserting the virtual P picture stream 1232 until the two values are equal. In the embodiment of FIG. 12, an embodiment of the case where Frame_Count_1 - Frame_Count_2 = 6 frames at the out point 1212 is shown, and in the embodiment of FIG. 12, two virtual P picture streams 1234 And a packet position where an arbitrary frame of the first input stream 1210 (HDTV TS) is started when a total of eight virtual P picture streams are inserted is adjusted. For the three pictures preceding the entry point 1214, the packet length is adjusted through the virtual P picture and the null packet as in the previous embodiment.

도 13은 본 발명의 또 다른 실시예에 따른 전송 스트림 전환 방법에 있어서, 제 2 입력 스트림에서 제 1 입력 스트림으로의 절체에 있어서, 출구점에서의 제 1 프레임 카운트가 제 2 프레임 카운트보다 큰 경우의 PTS 값 생성의 예시적인 모습을 나타낸 개념도이다.13 is a diagram illustrating a transmission stream switching method according to another embodiment of the present invention. In the switching from the second input stream to the first input stream, when the first frame count at the exit point is larger than the second frame count Lt; RTI ID = 0.0 > PTS < / RTI >

도 13을 참조하면, 마찬가지로 PTS, DTS 및 PCR 등 타임스탬프 값이 변경이 필요하다. 제 2 입력 스트림(1320: 3DTV TS)에서 제 1 입력 스트림(1310: HDTV TS)로 절체할 경우는 도 13에 도시된 바와 같이, 삽입된 가상 P 픽처 ES(1332)에 대한 타임스탬프 값만 새롭게 생성하여 설정하여 주면 된다. 다시 절체되어 들어오는 제 1 입력 스트림(1310: HDTV TS)에서의 입구점(1314)은 I 픽처로 타임스탬프 변경없이 연결하여 주면 된다(도 13에서는 타임스탬프 '65'로 연결됨).
Referring to FIG. 13, similarly, time stamp values such as PTS, DTS, and PCR need to be changed. In the case of switching from the second input stream 1320 (3DTV TS) to the first input stream 1310 (HDTV TS), only the time stamp value for the inserted virtual P-picture ES 1332 is newly generated . The entry point 1314 in the first input stream 1310 (HDTV TS) that is switched back in is connected to the I picture without changing the time stamp (connected to the time stamp '65' in FIG. 13).

오디오 프레임의 처리Processing of audio frames

일반적으로 오디오의 신호를 기준으로 동기신호를 찾으므로, 오디오 신호는 비디오 신호에 비해 늦게 전송된다. 따라서 오디오는 비디오의 절체가 이루어지는 픽처의 PTS를 저장시켜 두었다가 나중에 입력되는 오디오의 PTS가 비디오 픽처가 절체되는 PTS에 대응하는 시간을 절체 시점으로 한다. Generally, since a sync signal is searched based on an audio signal, an audio signal is transmitted later than a video signal. Therefore, the audio stores the PTS of the picture in which the video is transferred, and the time corresponding to the PTS at which the PTS of the audio to be input later is transferred corresponds to the switching time.

도 14는 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 있어서, 오디오 프레임에 대한 시간 정보를 계산하여 링 버퍼에 저장하는 예시를 설명하기 위한 개념도이다.FIG. 14 is a conceptual diagram for explaining an example of calculating time information for an audio frame in a transport stream switching method according to an embodiment of the present invention and storing the time information in a ring buffer. FIG.

도 14를 참조하면, 비디오 스트림의 경우는 1개의 프레임에 대한 ES가 1개의 PES로 구성되기 때문에 PES 단위로 절체가 이루어지면 되지만, 오디오 스트림의 경우는 1개의 PES내에 복수 개의 프레임에 대한 ES가 포함되어 있어서 PES 단위로 절체할 경우 AC-3 디코더가 오디오 신호를 제대로 디코딩할 수 없는 문제를 발생시킬 수 있을 뿐만 아니라, 전체 스트림에 심각한 영향을 미칠 수 있다. 왜냐하면 대부분의 디코더가 오디오 신호를 기준으로 처리되기 때문이다. 따라서, 오디오는 PES 내에 있는 ES 단위로 절체 처리를 해야 한다. 그러나 시간 정보는 PES 단위로 존재하므로, 본 발명에서는 도 14에 도시된 바와 같이 2개의 입력 스트림(1410, 1420)에 대하여 서로 다른 링 버퍼(1430, 1432)를 구성하여 오디오 PES에 있는 시간 정보로부터 내부에 포함되어 있는 프레임 단위의 시간정보를 계산하여 저장할 수 있다. 즉, 제 1 입력 스트림의 오디오 PES(1410) 내의 각각의 ES인 AC3 프레임은 링버퍼 #1(1430)에 PTS의 시간 정보와 함께 저장되고, 제 2 입력 스트림의 오디오 PES(1420) 내의 각각의 ES인 AC3 프레임은 링버퍼 #2(1432)에 PTS의 시간 정보와 함께 별도로 저장될 수 있다. 이에 따라, 입력 스트림의 오디오 PES의 중간에서 절체가 일어나도, 절체 시점에 해당하는 ES를 찾아, 해당 AC3 프레임에서 절체가 일어날 수 있도록 지원할 수 있다.Referring to FIG. 14, in the case of a video stream, since ES for one frame is composed of one PES, the PES unit may be switched. However, in the case of an audio stream, ES for a plurality of frames in one PES The PES unit may cause a problem that the AC-3 decoder can not properly decode the audio signal, and may seriously affect the entire stream. This is because most decoders are processed based on audio signals. Therefore, the audio must be switched in ES units in the PES. However, since time information exists in units of PES, in the present invention, different ring buffers 1430 and 1432 are configured for two input streams 1410 and 1420 as shown in FIG. 14, It is possible to calculate and store the time information of the frame unit included therein. That is, each AC 3 frame in the audio PES 1410 of the first input stream is stored with the time information of the PTS in the ring buffer # 1 1430, and each AC 3 frame in the audio PES 1420 of the second input stream The AC3 frame, which is the ES, can be separately stored in the ring buffer # 2 1432 together with the time information of the PTS. Accordingly, even when the audio PES of the input stream is switched in the middle, it is possible to find an ES corresponding to the switching time and to support the switching in the corresponding AC3 frame.

도 15는 본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 있어서, 오디오 스트림의 절체에 대한 예시를 설명하기 위한 개념도이다.15 is a conceptual diagram for explaining an example of audio stream switching in the transport stream switching method according to an embodiment of the present invention.

도 15를 참조하면, 제 1 입력 스트림 오디오 PES(1510)에서 제 2 입력 스트림 오디오 PES로의 절체에 있어서, 제 2 입력 스트림 오디오 PES의 ES 단위 시간 정보 및 ES 데이터를 저장하고 있는 링버퍼 #2(1532)를 이용하여 해당 PES의 PTS를 기반으로 계산상 절체 시점을 산출한다. 그리고는, 산출된 절체 시점에 해당하는 제 2 입력 스트림의 AC3 프레임(1542)에서 제 2 입력 스트림으로의 절체가 이루어질 수 있도록 제어한다.
15, in the transfer from the first input stream audio PES 1510 to the second input stream audio PES, the ring buffer # 2 (FIG. 15) storing the ES unit time information and the ES data of the second input stream audio PES 1532) to calculate the switching time based on the PTS of the corresponding PES. Then, control is performed so that switching from the AC3 frame 1542 of the second input stream corresponding to the calculated switching time point to the second input stream can be performed.

기타 다른 활용Other uses

본 발명의 일 실시예에 따른 전송 스트림 전환 방법에 있어서, HDTV TS에서 3DTV TS로의 상호 절체 뿐만 아니라, 서로 다른 2개의 HDTV TS 간의 상호 절체 및 HDTV TS에서 다채널 서비스용 TS간의 상호 절체 등에 활용이 가능하다. In the transport stream switching method according to an embodiment of the present invention, not only interchange between HDTV TS and 3DTV TS but also interchange between two different HDTV TSs and interchange between TSs for multi-channel service in HDTV TS It is possible.

또한 본 발명의 MPEG-2 TS 전환기는 어떤 MPEG-2 TS 사이의 절체를 수행할 것인가에 따라 서비스에 적합한 PSI(Program Specific Information) 정보 생성 기능을 포함한다.
In addition, the MPEG-2 TS switcher of the present invention includes a program specific information (PSI) information generation function suitable for a service according to which switching between MPEG-2 TSs is to be performed.

전송 스트림 전환 장치Transport stream switching device

도 16은 본 발명의 일 실시예에 따른 전송 스트림 전환 장치를 나타낸 블록도이다. 도 16에 도시된 바와 같이, 본 발명의 일 실시예에 따른 전송 스트림 전환 장치(1600)는 수신부(1610), 절체 명령 입력부(1620), 제어부(1630), 저장부(1640), 프레임 카운터(1650) 및 출력부(1660)를 포함할 수 있다.16 is a block diagram illustrating a transport stream switching apparatus according to an embodiment of the present invention. 16, a transport stream switching apparatus 1600 according to an embodiment of the present invention includes a receiving unit 1610, a switching command input unit 1620, a control unit 1630, a storage unit 1640, a frame counter 1650, and an output 1660.

도 16을 참조하면, 수신부(1610)는 복수 개의 서로 다른 입력 스트림을 수신한다. 수신되는 입력 스트림은 서로 다른 인코더로부터 수신되는 스트림일 수 있다. 부호화 방식은 동일할 수도 있고 상이할 수 있다. 수신부(1610)는 유선 또는 무선 통신을 이용하여 입력 스트림을 수신한다. Referring to FIG. 16, a receiving unit 1610 receives a plurality of different input streams. The received input stream may be a stream received from a different encoder. The coding scheme may be the same or different. The receiving unit 1610 receives an input stream using wired or wireless communication.

절체 명령 입력부(1620)는 수동 또는 자동으로 절체 명령을 입력한다. 수동 입력의 경우, 절체 명령을 하고자하는 사용자로부터 사용자 인터페이스(미도시)를 통해 절체 명령을 입력할 수 있고, 자동 입력의 경우, 설정된 입력 조건에 따라 절체 명령을 입력할 수 있다. 입력 조건은 시간을 기반으로 설정하여, 특정 시간 주기마다 주기적으로 절체 명령이 입력될 수도 있고, 예약 시간을 설정하여, 특정 시점에 자동으로 채널 1에서 채널 2로의 절체 명령을 수행할 수도 있으며, 시간 이외에 채널 조건, 네트워크 조건 등으로 설정하여, 네트워크의 상태(가용 대역폭, 패킷 손실율 등)에 따라 절체 명령이 자동으로 입력될 수 있다. The transfer command input unit 1620 inputs a transfer command manually or automatically. In the case of manual input, a transfer command can be inputted from a user who wants to transfer command through a user interface (not shown), and in case of automatic input, a transfer command can be inputted according to a set input condition. The input condition may be set based on time, and a transfer command may be inputted periodically every specific time period. Alternatively, a transfer command from channel 1 to channel 2 may be automatically performed at a specific time by setting a reservation time, In addition, a channel condition, a network condition, and the like can be set, and a switch command can be automatically input according to the state of the network (available bandwidth, packet loss rate, and the like).

제어부(1630)는 절체 명령의 입력에 대응하여, 수신되는 입력 스트림들 간의 절체 수행을 제어한다. 제어부(1630)는 탐색부(1631), 삽입부(1632), 절체 수행부(1633), 비디오 분석부(1634), 타임스탬프 수정부(1635), 카운트 값 비교부(1636) 및 오디오 시간 제어부(1637)를 포함할 수 있다.The control unit 1630 controls the transfer of input streams among the input streams in response to the input of the transfer command. The control unit 1630 includes a searching unit 1631, an inserting unit 1632, a switching performing unit 1633, a video analyzing unit 1634, a time stamp correcting unit 1635, a count value comparing unit 1636, 1637 < / RTI >

탐색부(1631)는 절체 명령에 입력되면 현재 출력되다 절체에 의해 종료되는 제 1 입력 스트림의 출구점 및 절체에 의해 새롭게 출력되는 제 2 입력스트림의 입구점을 탐색한다. 출구점은 절체 명령 이후 최초 I 또는 P 픽처의 시작점으로 탐색될 수 있고, 입구점은 상기 출구점 이후의 최초 I 픽처의 시작점으로 탐색될 수 잇다. The search unit 1631 searches the entry point of the second input stream that is newly output by the exit point of the first input stream and the switch that is terminated by the current output switch. The exit point may be searched for the start point of the first I or P picture after the switch command and the entry point may be searched for the starting point of the first I picture after the exit point.

삽입부(1632)는 상기 출구점과 입구점 사이에 가상 P 픽처 스트림 및 널 패킷을 삽입한다. 삽입부(1632)는 가상 P 픽처 저장부(1642)로부터 가상 P 픽처 스트림을 수신하여 출구점과 입구점 사이에 삽입할 수 있다. 삽입부(1632)는 입구점 이후에 P 또는 B 픽처 중 입구점 이전 영상을 참조하는 픽처를 대체하여 가상 P 픽처 스트림을 삽입할 수 있다. 이때, 상기 P 또는 B 픽처는 제 2 입력 스트림의 부호화 방식에 입각한 가상 P 픽처를 가상 P 픽처 저장부(1642)로부터 수신하여 삽입한다.The inserter 1632 inserts a virtual P picture stream and a null packet between the exit point and the entry point. The insertion unit 1632 can receive the virtual P picture stream from the virtual P picture storage unit 1642 and insert it between the exit point and the entry point. The insertion unit 1632 may insert a virtual P-picture stream by replacing a picture that refers to an image before the entry point of the P or B picture after the entry point. At this time, the P or B picture receives and inserts a virtual P picture based on the encoding method of the second input stream from the virtual P picture storage unit 1642.

절체 수행부(1633)는 입력점에서 입력 스트림간의 절체를 수행한다. The switching execution unit 1633 performs switching between the input streams at the input point.

비디오 분석부(1634)는 수신부(1610)를 통해 입력되는 입력 스트림의 비디오 ES를 분석하여 가상 P 픽처 스트림을 생성하여 가상 P 픽처 저장부(1642)에 저장한다. 제 1 및 제 2 입력 스트림의 부호화방식이 다른 경우, 서로 다른 가상 P 픽처 스트림을 생성하여 저장할 수 있다.The video analyzer 1634 analyzes the video ES of the input stream input through the receiver 1610, generates a virtual P-picture stream, and stores the virtual P-picture stream in the virtual P-picture storage 1642. When the encoding methods of the first and second input streams are different, different virtual P picture streams can be generated and stored.

타임스탬프 수정부(1635)는 타임스탬프(미도시)로부터 각 입력 스트림의 PTS, DTS 및 PCR 정보를 수신하여 입력 스트림간 절체에 적절하게 PTS, DTS 및 PCR 정보를 수정한다. 예컨대, 타임스탬프 수정부(1635)는 제 2 입력 스트림의 PTS, DTS 및 PCR 정보를 제 1 입력 스트림의 시간 정보를 기반으로 연속되는 PTS, DTS 및 PCR의 타임스탬프가 되도록 수정할 수 있다. The time stamp correcting unit 1635 receives the PTS, DTS and PCR information of each input stream from a time stamp (not shown), and corrects the PTS, DTS and PCR information appropriately for switching between input streams. For example, the time stamp corrector 1635 may modify the PTS, DTS, and PCR information of the second input stream to be time stamps of PTS, DTS, and PCR that are consecutive based on the time information of the first input stream.

카운트 값 비교부(1636)는 제 1 입력 스트림으로부터 제 2 입력 스트림으로의 제 1 절체 이후, 다시 제 2 입력 스트림으로부터 제 1 입력 스트림으로의 제 2 절체(재절체)를 수행하게 될 때, 프레임 카운터(1650)로부터 제 1 절체 시점을 기준으로 제 1 입력 스트림과 제 2 입력 스트림의 프레임 개수 카운팅된 값을 수신하여 두 값의 크기를 비교한다. 카운트 값 비교부(1636)의 비교 결과에 따라 삽입부(1632)에서의 가상 P 픽처 스트림 및 널 패킷의 삽입 방식이 달라질 수 있다. 예컨대, 제 2 입력 스트림의 프레임 카운트 값이 제 1 입력 스트림의 프레임 카운트 값보다 큰 경우, 차이값의 프레임 수에 해당하는 패킷 길이만큼, 널 패킷을 삽입하고, 이후, 제 1 입력 스트림의 입구점까지의 픽처 스트림은 가상 P 픽처 스트림으로 대체하고, 널 패킷을 이용하여 패킷 길이를 맞춰줄 수 있다. 반대로, 제 1 입력 스트림의 프레임 카운트 값이 제 2 입력 스트림의 프레임 카운트 값보다 큰 경우, 차이값에 해당하는 패킷 수만큼 가상 P 픽처 스트림을 연속하여 삽입하고, 삽입 순간에도 양 입력 스트림의 프레임 카운팅을 계속 수행하여 두 값이 같아질 때까지 가상 P 픽처 스트림을 더 삽입할 수 있다. When the count value comparison unit 1636 performs a second transfer (re-transfer) from the second input stream to the first input stream after the first transfer from the first input stream to the second input stream, The counter 1650 receives the frame count values of the first input stream and the second input stream based on the first switching time point and compares the sizes of the two values. The inserting method of the virtual P picture stream and the null packet in the inserting unit 1632 may be changed according to the comparison result of the count value comparing unit 1636. [ For example, when the frame count value of the second input stream is larger than the frame count value of the first input stream, a null packet is inserted by the packet length corresponding to the frame number of the difference value, Can be replaced with a virtual P picture stream, and the packet length can be adjusted using a null packet. On the contrary, when the frame count value of the first input stream is larger than the frame count value of the second input stream, the virtual P picture stream is inserted consecutively for the number of packets corresponding to the difference value, So that the virtual P picture stream can be further inserted until the two values become equal.

오디오 시간 제어부(1637)는 저장부(1640)에 구성된 오디오 버퍼(1646) 내의 서로 다른 링버퍼(예컨대, 링버퍼#1, 링퍼버#2)에 수신된 서로 다른 입력 스트림의 오디오 PES의 ES 및 시간 정보를 별도로 저장한다. 오디오 시간 제어부(1637)는 비디오의 절체가 이루어지는 픽처의 PTS를 저장시켜 두었다가, 나중에 입력되는 오디오의 PTS와 비교하여 저장된 PTS에 대응하는 시점을 절체 시점으로 결정한다. 그리고는 결정된 절체 시점에 해당하는 제 2 입력 스트림의 ES(예컨대, AC3 프레임)에서 절체가 이루어지도록 한다. The audio time control unit 1637 controls the audio PES of the different input streams received in different ring buffers (e.g., ring buffer # 1, ring pager # 2) in the audio buffer 1646 configured in the storage unit 1640, The time information is stored separately. The audio time control unit 1637 stores the PTS of the picture to which the video is to be switched, and compares the PTS of the audio to be input later with the PTS of the audio to be inputted later. Then, the switching is performed in the ES (e.g., AC3 frame) of the second input stream corresponding to the determined switching time.

저장부(1640)는 비디오 분석부(1634)에서 생성된 적어도 하나의 가상 P 픽처 스트림을 저장하는 가상 P 픽처 저장부(1642), 비디오 스트림을 일시 저장하고 있는 비디오 버퍼(1644) 및 오디오 버퍼(1646)를 포함할 수 있다.The storage unit 1640 includes a virtual P-picture storage unit 1642 for storing at least one virtual P-picture stream generated by the video analysis unit 1634, a video buffer 1644 for temporarily storing the video stream, 1646).

프레임 카운터(1650)는 수신되는 입력 프레임의 프레임 개수를 카운팅한다.The frame counter 1650 counts the number of frames of the input frame to be received.

출력부(1660)는 절체가 수행된 결과 스트림을 출력한다. 출력부(1660)는 절체가 이루어진 입력 스트림의 영상을 복호화부(미도시)를 통해 복호화가 이루어진 이후, 디스플레이할 수 있다. 또는 경우에 따라, 다른 출력 기기로 영상 데이터를 전송할 수도 있다. The output unit 1660 outputs the resultant stream in which the switching is performed. The output unit 1660 may display an image of the switched input stream after decoding through a decoding unit (not shown). Alternatively, the video data may be transmitted to another output device as occasion demands.

이상 도면 및 실시예를 참조하여 설명하였지만, 본 발명의 보호범위가 상기 도면 또는 실시예에 의해 한정되는 것을 의미하지는 않으며 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the inventions as defined by the following claims It will be understood that various modifications and changes may be made thereto without departing from the spirit and scope of the invention.

Claims (20)

복수 개의 서로 다른 입력 스트림을 수신하는 단계;
상기 복수 개의 입력 스트림 중 현재 출력되는 제 1 입력 스트림에 대한 절체 명령을 입력받는 단계;
상기 절체 명령을 기반으로 상기 제 1 입력 스트림의 출구점(Out-point) 및 새롭게 출력되는 제 2 입력 스트림의 입구점(In-point)을 탐색하는 단계;
상기 출구점과 입구점 사이에 가상 P 픽처(picture) 스트림을 삽입하는 단계; 및
상기 출구점과 입구점을 기반으로 상기 제 1 입력 스트림에서 상기 제 2 입력 스트림으로의 절체를 수행하는 단계를 포함하는 것을 특징으로 하는 전송 스트림의 전환 방법.
Receiving a plurality of different input streams;
Receiving a switching command for a first input stream currently output among the plurality of input streams;
Searching for an Out-point of the first input stream and an In-point of a newly output second input stream based on the transfer command;
Inserting a virtual P picture stream between the exit point and the entry point; And
And performing a transfer from the first input stream to the second input stream based on the exit point and the entry point.
제 1 항에 있어서,
상기 출구점은 상기 절체 명령 이후의 상기 제 1 입력 스트림의 최초 I 또는 P 픽처의 시작점으로 탐색되고, 상기 입구점은 상기 출구점 이후의 상기 제 2 입력 스트림의 최초 I 픽처의 시작점으로 탐색되는 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 1,
The exit point is searched to the start point of the first I or P picture of the first input stream after the switch command and the entry point is searched to the start point of the first I picture of the second input stream after the exit point Characterized in that the transport stream is switched by the switching means.
제 1 항에 있어서,
상기 가상 P 픽처 스트림은 상기 출구점으로부터 상기 입구점까지의 상기 제 1 입력 스트림의 픽처 스트림을 대체하여 삽입되고, 상기 출구점부터 상기 입구점까지의 픽처 스트림의 길이에 맞게 널 패킷(Null-Packet)을 채우는 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 1,
Wherein the virtual P-picture stream is inserted as a substitute for the picture stream of the first input stream from the exit point to the entry point, and a null packet is inserted in accordance with the length of the picture stream from the exit point to the entry point. ) Of the transport stream.
제 1 항에 있어서,
상기 가상 P 픽처 스트림은 상기 제 1 또는 제 2 입력 스트림에 포함되어 있는 비디오 ES(Element Stream)에 대한 분석을 통해 부호화 방식에 따라 모든 매크로블록의 움직임 정보 및 잔차신호가 0으로 만들어진 스트림인 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 1,
The virtual P-picture stream is a stream in which motion information of all macroblocks and a residual signal are made to be 0 according to a coding scheme through analysis of a video ES (Element Stream) included in the first or second input stream To the transport stream.
제 1 항에 있어서,
상기 입구점 이전의 픽처를 참조하는 상기 입구점 이후의 제 2 입력 스트림의 P 또는 B 픽처가 존재하는 경우, 상기 P 또는 B 픽처를 상기 가상 P 픽처 스트림으로 대체하고, 패킷 길이만큼 널 패킷을 삽입하는 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 1,
If there is a P or B picture of a second input stream after the entry point that refers to a picture preceding the entry point, replacing the P or B picture with the virtual P picture stream, Wherein the transport stream is a transport stream.
제 1 항에 있어서,
상기 입구점 이후의 상기 제 2 입력 스트림의 PTS(Presentation Time Stamp), DTS(Decoding Time Stamp) 및 PCR(Program Clock Reference)의 타임스탬프는 상기 제 1 입력 스트림의 시간 정보를 기반으로 연속되는 PTS, DTS 및 PCR의 타임스탬프가 되도록 수정되는 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 1,
Wherein a PTS (Presentation Time Stamp), a DTS (Decoding Time Stamp) and a PCR (Program Clock Reference) time stamp of the second input stream after the entry point are consecutive PTSs based on time information of the first input stream, DTS, and PCR. ≪ RTI ID = 0.0 > 11. < / RTI >
제 6 항에 있어서,
상기 제 2 입력 스트림이 3D 좌영상 스트림인 경우, 상기 3D 좌영상에 대응하는 우영상 비디오 스트림의 절체는,
상기 절체가 상기 제 2 입력 스트림의 입구점을 기준으로 이루어질 때, 상기 제 2 입력 스트림의 입구점에 해당하는 픽처의 PTS를 저장해 두었다가, 상기 우영상 스트림의 PTS 및 DTS를 상기 저장된 PTS를 기준으로 수정하고, 상기 제 1 입력 스트림의 PCR을 기준으로 상기 우영상 비디오 스트림의 PCR을 수정하는 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 6,
And if the second input stream is a 3D left video stream, the right video stream corresponding to the 3D left video is switched,
The PTS of the picture corresponding to the entry point of the second input stream is stored and the PTS of the right picture stream and the DTS of the right picture stream are stored on the basis of the stored PTS when the switch is made on the basis of the entry point of the second input stream. And corrects the PCR of the right video stream based on the PCR of the first input stream.
제 1 항에 있어서,
상기 제 1 입력 스트림으로부터 상기 제 2 입력 스트림으로의 제 1 절체 이후, 다시 상기 제 2 입력 스트림으로부터 상기 제 1 입력 스트림으로의 제 2 절체가 이루어질 때,
상기 제 1 절체 이후부터 제 2 절체에 대한 절체 명령 입력시까지의 제 1 입력 스트림의 프레임 개수인 제 1 프레임 카운트 값과 제 2 입력 스트림의 프레임 개수인 제 2 프레임 카운트 값을 카운트하는 단계; 및
상기 제 1 프레임 카운트 값과 상기 제 2 프레임 카운트 값을 비교하여 비교 결과에 따라 상기 제 2 절체를 수행하는 단계를 더 포함하는 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 1,
When a second transfer from the second input stream back to the first input stream is performed after the first transfer from the first input stream to the second input stream,
Counting a first frame count value, which is the number of frames of the first input stream from the first transmission to the input of a switching command for the second transmission, and a second frame count value, which is the number of frames of the second input stream; And
Comparing the first frame count value with the second frame count value and performing the second transfer according to the comparison result.
제 8 항에 있어서,
상기 제 2 프레임 카운트 값이 상기 제 1 프레임 카운트 값보다 큰 경우,
상기 제 2 절체를 수행할 때, 상기 제 1 프레임 카운트 값에서 상기 제 2 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 길이만큼, 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 널 패킷을 삽입하는 것을 특징으로 하는 전송 스트림의 전환 방법.
9. The method of claim 8,
If the second frame count value is greater than the first frame count value,
When the second switch is performed, a packet length corresponding to the number of frames obtained by subtracting the second frame count value from the first frame count value is provided between the output point of the second input stream and the input point of the first input stream And a null packet is inserted.
제 9 항에 있어서,
상기 삽입된 널 패킷 이후에 상기 제 1 입력 스트림의 입구점까지의 픽처 스트림은 상기 가상 P 픽처 스트림으로 대체하며, 상기 널 패킷을 이용하여 패킷 길이를 맞춰주는 것을 특징으로 하는 전송 스트림의 전환 방법.
10. The method of claim 9,
Wherein the picture stream from the inserted null packet to the entry point of the first input stream is replaced with the virtual P picture stream and the packet length is adjusted using the null packet.
제 8 항에 있어서,
상기 제 1 프레임 카운트 값이 상기 제 2 프레임 카운트 값보다 큰 경우,
상기 제 2 절체를 수행할 때, 상기 제 2 프레임 카운트 값에서 상기 제 1 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 수만큼 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 상기 가상 P 픽처 스트림을 삽입하고,
상기 가상 P 픽처 스트림을 삽입하여 출력하는 동안에도 상기 제 1 프레임 카운트 및 상기 제 2 프레임 카운트를 계속하여 카운트하여, 두 값이 같아질 때까지 상기 가상 P 픽처 스트림을 더 삽입하는 것을 특징으로 하는 전송 스트림의 전환 방법.
9. The method of claim 8,
If the first frame count value is greater than the second frame count value,
When the second frame count value is subtracted from the second frame count value, the number of packets corresponding to the number of frames obtained by subtracting the first frame count value from the output point of the second input stream and the input point of the first input stream, Insert a virtual P-picture stream,
Further comprising counting the first frame count and the second frame count continuously while inserting and outputting the virtual P picture stream, and further inserting the virtual P picture stream until the two values become equal to each other How to convert streams.
제 1 항에 있어서,
상기 제 1 입력 스트림으로부터 제 2 입력 스트림으로의 오디오 신호의 절체는 비디오의 절체가 이루어지는 픽처의 PTS를 저장시켜 두었다가 나중에 입력되는 오디오의 PTS가 상기 비디오 픽처가 절체되는 PTS에 대응하는 시간을 절체 시점으로 하여 이루어지는 것을 특징으로 하는 전송 스트림의 전환 방법.
The method according to claim 1,
The switching of the audio signal from the first input stream to the second input stream is performed by storing the PTS of the picture to which the video is to be switched and setting the time corresponding to the PTS of the audio to be input later, To the transport stream.
제 12 항에 있어서,
상기 제 1 입력 스트림 및 상기 제 2 입력 스트림에 대해 서로 다른 링버퍼를 구성하여 오디오 PES(Packetized Elementary Stream)에 있는 시간 정보로부터 내부에 포함되어 있는 프레임 단위의 시간정보를 계산하여 저장하는 것을 특징으로 하는 전송 스트림의 전환 방법.
13. The method of claim 12,
A ring buffer is configured for the first input stream and the second input stream, and the time information of each frame included in the packetized elementary stream (PES) is calculated and stored. To the transport stream.
복수 개의 서로 다른 입력 스트림을 수신하는 입력 스트림 수신부;
상기 복수 개의 입력 스트림 중 현재 출력되는 제 1 입력 스트림에 대한 절체 명령을 입력받는 절체 명령 입력부;
상기 절체 명령을 기반으로 상기 제 1 입력 스트림의 출구점(Out-point) 및 새롭게 출력되는 제 2 입력 스트림의 입구점(In-point)을 탐색하는 탐색부;
상기 출구점과 입구점 사이에 가상 P 픽처(picture) 스트림을 삽입하는 삽입부; 및
상기 출구점과 입구점을 기반으로 상기 제 1 입력 스트림에서 상기 제 2 입력 스트림으로의 절체를 수행하는 절체 수행부를 포함하는 것을 특징으로 하는 전송 스트림의 전환 장치.
An input stream receiving unit receiving a plurality of different input streams;
A transfer command input unit for receiving a transfer command for the first input stream currently output from the plurality of input streams;
A search unit for searching an Out-point of the first input stream and an In-point of a newly output second input stream based on the transfer command;
An insertion unit for inserting a virtual P picture stream between the exit point and the entry point; And
And a transfer performing unit for performing transfer from the first input stream to the second input stream based on the exit point and the entry point.
제 14 항에 있어서, 상기 삽입부는
상기 가상 P 픽처 스트림을 상기 출구점으로부터 상기 입구점까지의 상기 제 1 입력 스트림의 픽처 스트림을 대체하여 삽입하고,
상기 출구점부터 상기 입구점까지의 픽처 스트림의 길이에 맞게 널 패킷을 채우는 것을 특징으로 하는 전송 스트림의 전환 장치.
15. The apparatus of claim 14, wherein the insert
Inserting the virtual P-picture stream in place of the picture stream of the first input stream from the exit point to the entry point,
And the null packet is filled in accordance with the length of the picture stream from the exit point to the entry point.
제 14 항에 있어서,
상기 가상 P 픽처 스트림은 상기 제 1 또는 제 2 입력 스트림에 포함되어 있는 비디오 ES(Element Stream)에 대한 분석을 통해 부호화 방식에 따라 모든 매크로블록의 움직임 정보 및 잔차신호가 0으로 만들어진 스트림인 것을 특징으로 하는 전송 스트림의 전환 장치.
15. The method of claim 14,
The virtual P-picture stream is a stream in which motion information of all macroblocks and a residual signal are made to be 0 according to a coding scheme through analysis of a video ES (Element Stream) included in the first or second input stream To the transport stream.
제 14 항에 있어서,
상기 제 1 입력 스트림으로부터 상기 제 2 입력 스트림으로의 제 1 절체 이후, 다시 상기 제 2 입력 스트림으로부터 상기 제 1 입력 스트림으로의 제 2 절체가 이루어질 때, 상기 제 1 절체 이후부터 상기 제 2 절체에 대한 절체 명령 입력시까지의 제 1 입력 스트림의 프레임 개수인 제 1 프레임 카운트 값과 제 2 입력 스트림의 프레임 개수인 제 2 프레임 카운트 값을 카운트하는 프레임 카운터를 더 포함하되,
상기 제 1 프레임 카운트 값과 상기 제 2 프레임 카운트 값을 비교하여 비교 결과에 따라 상기 제 2 절체를 수행하는 것을 특징으로 하는 전송 스트림의 전환 장치.
15. The method of claim 14,
After the first transfer from the first input stream to the second input stream and again after the second transfer from the second input stream to the first input stream, Further comprising: a frame counter for counting a first frame count value, which is the number of frames of the first input stream up to input of a shift command, and a second frame count value, which is the number of frames of the second input stream,
Wherein the first frame count value is compared with the second frame count value, and the second transfer is performed according to the comparison result.
제 17 항에 있어서,
상기 제 2 프레임 카운트 값이 상기 제 1 프레임 카운트 값보다 큰 경우,
상기 제 2 절체를 수행할 때, 상기 제 1 프레임 카운트 값에서 상기 제 2 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 길이만큼, 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 널 패킷을 삽입하는 것을 특징으로 하는 전송 스트림의 전환 장치.
18. The method of claim 17,
If the second frame count value is greater than the first frame count value,
When the second switch is performed, a packet length corresponding to the number of frames obtained by subtracting the second frame count value from the first frame count value is provided between the output point of the second input stream and the input point of the first input stream And a null packet is inserted.
제 17 항에 있어서,
상기 제 1 프레임 카운트 값이 상기 제 2 프레임 카운트 값보다 큰 경우,
상기 제 2 절체를 수행할 때, 상기 제 2 프레임 카운트 값에서 상기 제 1 프레임 카운트 값을 뺀 프레임 수에 해당하는 패킷 수만큼 제 2 입력 스트림의 출구점과 제 1 입력 스트림의 입구점 사이에 상기 가상 P 픽처 스트림을 삽입하고,
상기 가상 P 픽처 스트림을 삽입하여 출력하는 동안에도 상기 제 1 프레임 카운트 및 상기 제 2 프레임 카운트를 계속하여 카운트하여, 두 값이 같아질 때까지 상기 가상 P 픽처 스트림을 더 삽입하는 것을 특징으로 하는 전송 스트림의 전환 장치.
18. The method of claim 17,
If the first frame count value is greater than the second frame count value,
When the second frame count value is subtracted from the second frame count value, the number of packets corresponding to the number of frames obtained by subtracting the first frame count value from the output point of the second input stream and the input point of the first input stream, Insert a virtual P-picture stream,
Further comprising counting the first frame count and the second frame count continuously while inserting and outputting the virtual P picture stream, and further inserting the virtual P picture stream until the two values become equal to each other Stream switching device.
부호화된 복수 개의 입력 스트림을 생성하여 전송하는 복수 개의 인코더; 및
상기 복수 개의 인코더로부터 상기 복수 개의 입력 스트림을 수신하여 특정 입력 스트림으로의 절체를 수행하는 전송 스트림 전환기를 포함하되, 상기 전송 스트림 전환기는,
상기 복수 개의 입력 스트림 중 현재 출력되는 제 1 입력 스트림에 대한 절체 명령을 입력받고, 상기 절체 명령을 기반으로 상기 제 1 입력 스트림의 출구점(Out-point) 및 새롭게 출력되는 제 2 입력 스트림의 입구점(In-point)을 탐색하며, 상기 탐색된 제 1 입력 스트림의 출구점과 제 2 입력 스트림의 입구점 사이에 가상 P 픽처(picture) 스트림을 삽입하여 상기 출구점과 입구점을 기반으로 상기 제 1 입력 스트림에서 상기 제 2 입력 스트림으로의 절체를 수행하는 것을 특징으로 하는 전송 스트림의 전환 시스템.
A plurality of encoders for generating and transmitting a plurality of encoded input streams; And
And a transport stream converter for receiving the plurality of input streams from the plurality of encoders and performing switching to a specific input stream,
The method includes receiving a switching command for a first input stream currently output from the plurality of input streams, receiving an out-point of the first input stream and an input port of a newly output second input stream, A picture P picture stream is inserted between an output point of the searched first input stream and an input point of a second input stream, And performs switching from the first input stream to the second input stream.
KR20140067662A 2013-06-19 2014-06-03 Transport stream switching method, apparatus and system Withdrawn KR20140148304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/305,610 US9860458B2 (en) 2013-06-19 2014-06-16 Method, apparatus, and system for switching transport stream

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020130070093 2013-06-19
KR20130070093 2013-06-19

Publications (1)

Publication Number Publication Date
KR20140148304A true KR20140148304A (en) 2014-12-31

Family

ID=52676704

Family Applications (1)

Application Number Title Priority Date Filing Date
KR20140067662A Withdrawn KR20140148304A (en) 2013-06-19 2014-06-03 Transport stream switching method, apparatus and system

Country Status (1)

Country Link
KR (1) KR20140148304A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015111158A1 (en) 2014-10-29 2016-05-04 Hyundai Motor Company Engine system for controlling a flow of exhaust gas

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102015111158A1 (en) 2014-10-29 2016-05-04 Hyundai Motor Company Engine system for controlling a flow of exhaust gas

Similar Documents

Publication Publication Date Title
CN100387043C (en) Method and device for robust mode interleaving
US9860458B2 (en) Method, apparatus, and system for switching transport stream
US20090116814A1 (en) Reproducer, portable telephone, and reproducing method
CN107580780B (en) Method for processing video stream
EP2280541A1 (en) Fast channel switch between digital televisison channels
EP2485501B1 (en) Fast channel change companion stream solution with bandwidth optimization
JP5271544B2 (en) Digital broadcast receiving apparatus and digital broadcast receiving method
JP5881219B2 (en) Receiver capable of channel change with a single decoder and method at the receiver
US20020015577A1 (en) Data distribution apparatus and method, and data distribution system
US20090013369A1 (en) Device and Method for Initializing Decoder in Digital Broadcasting Receiver
US20090251616A1 (en) Apparatus and method for processing data in digital broadcasting receiver
US10757473B2 (en) Digital media splicing system and method
CN114189737B (en) Digital television rapid channel switching method and digital television
US7269839B2 (en) Data distribution apparatus and method, and data distribution system
KR20140148304A (en) Transport stream switching method, apparatus and system
JP2006254298A (en) Movie playback apparatus and movie playback method
JP2002094938A (en) Data processing method and system, data transmission system, transmission medium
JP3671969B2 (en) Data multiplexing method and multiple data decoding method
JP2002112194A (en) Data processing method and device, data transmission system, transmission medium
JP2016072919A (en) Moving image processing method, moving image processing system, and moving image processing program
JP2003284069A (en) Multiplex data decoding method and multiple data decoding device

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20140603

PG1501 Laying open of application
PC1203 Withdrawal of no request for examination
WITN Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid