KR20030080377A - Method for managing presentation time stamp in digital broadcasting receiver - Google Patents

Method for managing presentation time stamp in digital broadcasting receiver Download PDF

Info

Publication number
KR20030080377A
KR20030080377A KR1020020018967A KR20020018967A KR20030080377A KR 20030080377 A KR20030080377 A KR 20030080377A KR 1020020018967 A KR1020020018967 A KR 1020020018967A KR 20020018967 A KR20020018967 A KR 20020018967A KR 20030080377 A KR20030080377 A KR 20030080377A
Authority
KR
South Korea
Prior art keywords
pts
address
buffer
decoding
pes
Prior art date
Application number
KR1020020018967A
Other languages
Korean (ko)
Other versions
KR100826170B1 (en
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 KR1020020018967A priority Critical patent/KR100826170B1/en
Publication of KR20030080377A publication Critical patent/KR20030080377A/en
Application granted granted Critical
Publication of KR100826170B1 publication Critical patent/KR100826170B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4341Demultiplexing of audio and video streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4343Extraction or processing of packetized elementary streams [PES]

Landscapes

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

Abstract

PURPOSE: A PTS management method in a digital broadcasting receiver is provided to manage PTS regardless of audio frames without any additional algorithm for searching different headers from different algorithms, thereby simplifying the PES decoding and reducing the code size. CONSTITUTION: A PTS(Presentation Time Stamp) management method in a digital broadcasting receiver includes the step of detecting PTSs(PTS1-PTSn) from PES(Presentation Elementary Stream) headers by PES packet while decoding the PES. The PTS are stored in PTS&address buffers and ESs are stored in ES buffers respectively, wherein the PTS&address buffer stores the PTSs with valid address of the PTSs. With reference to a length of a packet of each of the PES in the header of each of the PES header, a final part of the packet is realized and an address of the ES buffer storing the final part. In a single PES packet, the address of an ES buffer storing the audio ES of the final part is to be a valid address value of a corresponding PTS.

Description

디지털 방송 수신기에서의 PTS 관리 방법{Method for managing presentation time stamp in digital broadcasting receiver}Method for managing presentation time stamp in digital broadcasting receiver

본 발명은 디지털 방송 수신기에 관한 것으로서, 특히 오디오/비디오 신호의 립 싱크(Lip sync)를 위해 오디오 신호의 표시 타임 스탬프(PTS)를 관리하는 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to digital broadcast receivers, and more particularly, to a method of managing a display time stamp (PTS) of an audio signal for lip sync of an audio / video signal.

일반적으로 멀티미디어를 지원해주는 핵심 요소로는 디지털화와 더불어 화상 압축 기술이 있다. 상기 화상 압축 기술 중 MPEG(Moving Pictures Expert Group)-2는 멀티미디어 환경에 가장 핵심 기술인 디지털 동영상의 압축 부호화를 위한 국제적인 표준안이다.In general, the key elements supporting multimedia include image compression technology in addition to digitalization. Moving Pictures Expert Group (MPEG) -2 among the image compression technologies is an international standard for compression encoding of digital video, which is the core technology in a multimedia environment.

이러한 MPEG-2를 채용한 디지털 방송 수신 시스템은 도 1에 도시된 바와 같이, 오디오/비디오(Audio/Video ; A/V) 다중(Multiplexed) 비트스트림이 입력되면 트랜스포트 역다중화부(101)에서 다중화(Multiplexed)되어 있는 오디오와 비디오 비트스트림을 각각 분리한다. 상기 분리된 비디오 비트스트림과 오디오 비트스트림은 디코딩을 위해 각각 비디오 디코더(102)와 오디오 디코더(104)로 출력된다. 여기서, 상기 비디오 비트스트림과 오디오 비트스트림은 패킷화된 요소 스트림(packetized elementary stream ; PES)이다.As illustrated in FIG. 1, the digital broadcast reception system employing MPEG-2 receives an audio / video multiplexed bitstream from the transport demultiplexer 101. Separate the multiplexed audio and video bitstreams. The separated video bitstream and audio bitstream are output to video decoder 102 and audio decoder 104 for decoding. Here, the video bitstream and the audio bitstream are packetized elementary streams (PES).

상기 비디오 디코더(102)는 입력되는 비디오 비트스트림에서 오버헤드(각종 헤더 정보, 스타트 코드등)를 제거하고, 순수한 데이터 정보를 가변 길이 디코딩(Variable Length Decoding ; VLD)한 후 역양자화 과정, 역 이산 코사인 변환(IDCT) 과정을 거쳐 원래 화면의 픽셀 값을 복원하고, 비디오 디스플레이 프로세서(Video Display processor ; VDP)(103)는 이를 디스플레이 포맷에 맞게 변환하여 디스플레이 장치등에 출력한다.The video decoder 102 removes the overhead (various header information, start code, etc.) from the input video bitstream, performs variable length decoding (VLD) on pure data information, and then dequantizes and de-disperses the pure data information. The pixel value of the original screen is restored through a cosine transform (IDCT) process, and the video display processor (VDP) 103 converts it to a display format and outputs it to a display device.

상기 오디오 디코더(104)는 MPEG 알고리즘 또는 오디오 코딩(AC)-3 알고리즘등을 이용하여 입력되는 오디오 비트스트림을 원래의 신호로 복원한 후 이를 아날로그 형태로 변환하여 스피커등으로 출력한다.The audio decoder 104 restores the input audio bitstream to an original signal by using an MPEG algorithm or an audio coding (AC) -3 algorithm, etc., and then converts the audio bitstream into an analog form and outputs the same to a speaker.

또한, 시스템 디코더(105)는 상기 TP 역다중화부(101)의 출력으로부터 STC(System Time Clock)를 복구하여 비디오 디코더(102)와 오디오 디코더(104)로 출력한다. 그러면, 상기 비디오 디코더(102)는 복구된 STC에 동기시켜 비디오 디코딩을 수행하고, 오디오 디코더(104)는 복구된 STC에 동기시켜 오디오 디코딩을 수행한다.In addition, the system decoder 105 recovers an STC (System Time Clock) from the output of the TP demultiplexer 101 and outputs it to the video decoder 102 and the audio decoder 104. Then, the video decoder 102 performs video decoding in synchronization with the recovered STC, and the audio decoder 104 performs audio decoding in synchronization with the recovered STC.

이러한 디지털 방송 수신기는 다중화된 디지털 신호를 사용하기 때문에 기존의 아날로그 시스템과는 달리 비디오와 오디오 신호의 동기를 맞추어 주는 별도의 A/V 립 싱크(Lip-Synchronization) 장치나 방법이 필요하다.Since digital broadcasting receivers use multiplexed digital signals, a separate A / V Lip-Synchronization device or method for synchronizing video and audio signals is required, unlike conventional analog systems.

상기 A/V 립 싱크는 비디오, 오디오의 복호 재생 단위마다 주어지는 타임 스탬프(time stamp)라는 정보를 통해 구현된다. 타임 스탬프는 재생 출력 시간인 PTS(Presentation Time Stamp)와 복호 시간인 DTS(Decoding Time Stamp)로 이루어지는데 오디오의 경우 DTS는 사용되지 않는다. 이러한 타임 스탬프는 PES의 헤더에 위치하는데, PES 내에 ES(elementary stream)의 첫 부분이 포함될 경우에만 존재한다.The A / V lip sync is implemented through information called a time stamp given for each decoding reproduction unit of video and audio. The time stamp consists of a presentation time stamp (PTS) which is a reproduction output time and a decoding time stamp (DTS) which is a decoding time. In the case of audio, the DTS is not used. This time stamp is located in the header of the PES and is present only when the first part of the elementary stream (ES) is included in the PES.

여기서, 상기 DTS는 각 픽쳐를 언제 디코딩할 것인지를 상기 STC를 기준으로 나타내는 디코딩 타임 스탬프이고, PTS는 복원된 데이터를 언제 디스플레이할 것인지를 상기 STC를 기준으로 나타내는 표시 타임 스탬프이다. 상기 STC는 엔코더와 록킹된 전체적인 클럭으로서, 엔코더와 디코더가 똑같은 STC를 갖고 있으며, 또한 상기 엔코더는 비디오 신호가 내부적으로 딜레이를 갖고 있기 때문에 A/V 립 싱크와 정상적인 비디오 디코딩을 위해서 STC를 기준으로 DTS와 PTS를 발생하여 함께 전송한다.Here, the DTS is a decoding time stamp indicating when to decode each picture on the basis of the STC, and the PTS is a display time stamp indicating on the basis of the STC when to display the restored data. The STC is an encoder and a locked clock. The encoder and the decoder have the same STC. Also, since the encoder has the internal delay of the video signal, the STC is used for A / V lip sync and normal video decoding. DTS and PTS are generated and transmitted together.

통상, 비디오와 오디오는 별도의 립 싱크 과정을 수행하게 되고, 최종적으로 비디오와 오디오를 맞추는 시스템이 주를 이룬다.In general, video and audio perform separate lip sync processes, and the system mainly aligns video and audio.

도 2는 일반적인 PTS와 STC 관계에 따른 립 싱크 방식을 보여주는 도면으로서, 이론적으로는 STC와 PTS의 값이 동일할 때 A/V 데이터를 출력한다.FIG. 2 is a diagram illustrating a lip sync scheme according to a general PTS and STC relationship, and theoretically outputs A / V data when the values of the STC and the PTS are the same.

하지만 실제 적용에 있어서는 시간적인 차이가 존재하므로, PTS와 STC가 기설정된 범위(Range)를 만족하면 A/V 데이터를 출력하게 한다.However, since there is a time difference in actual application, if the PTS and STC satisfy the preset range, the A / V data is output.

즉, 도 2와 같이 PTS와 STC 관계에 따라 4가지 상황(A,B,C,D)이 발생한다.That is, as shown in FIG. 2, four situations A, B, C, and D occur according to the relationship between the PTS and the STC.

예컨대, (B)와 (C)의 경우처럼 STC를 기준으로 PTS가 기 설정된 특정 범위 내에 있으면 A/V 립 싱크가 맞는다고 판단하고 정상적인 디코딩을 수행하여 A/V 데이터를 출력시킨다. 하지만, (A)나 (D)의 경우처럼 STC를 기준으로 PTS가 기 설정된 특정 범위(range)를 벗어나면 디코딩을 스킵하던지, 반복이나 기다림을 통해 A/V 립 싱크를 맞춘다. 이때, (A)의 경우는 PTS 값이 STC보다 빠른 경우이므로 STC 값에 맞는 PTS를 포함한 디코딩 단위를 맞추기 위해서 현재 프레임(또는 픽쳐)의 디코딩을 수행하지 않고 다음 디코딩 단위로 바로 이동하는 스킵을 수행하고, (D)의 경우는 (A)와 반대인 경우로서, PTS 값이 STC보다 늦는 경우이므로 디코딩 단위를 반복(Repeat)하거나 기다리게(Wait) 해서 A/V 립 싱크를 맞추게 한다.For example, as in the case of (B) and (C), if the PTS is within a predetermined range based on the STC, the A / V lip sync is determined to be correct, and normal decoding is performed to output A / V data. However, as in the case of (A) or (D), if the PTS is out of a predetermined range based on the STC, decoding is skipped or A / V lip sync is set by repeating or waiting. In this case, in case of (A), since the PTS value is faster than the STC, skipping to the next decoding unit without performing decoding of the current frame (or picture) is performed in order to match the decoding unit including the PTS matching the STC value. In the case of (D), the opposite of (A), since the PTS value is later than STC, the decoding unit is repeated or waited to adjust the A / V lip sync.

이때, 디지털 신호 프로세서(DSP)를 이용하여 오디오 신호를 디코딩하는 경우 PES 헤더에서 PTS 값을 추출한 후 ES를 버퍼에 저장하여 디코딩을 하게 된다, 즉, PTS 값과 ES를 따로 따로 해당 버퍼에 저장한 후 디코딩을 수행한다.In this case, when decoding an audio signal using a digital signal processor (DSP), the PTS value is extracted from the PES header and the ES is stored in the buffer for decoding. That is, the PTS value and the ES are separately stored in the buffer. Decode is then performed.

그리고, 오디오 프레임을 디코딩할 때는 버퍼의 언더플로우를 방지하고 또 정확한 싱크를 찾기 위해 일정한 양의 ES 스트림을 저장한 후 디코딩을 시작하는데, 이때 여러개의 PES 패킷을 디코드하면서 여러개의 PTS가 나오게 된다.When decoding an audio frame, in order to prevent an underflow of a buffer and to find an accurate sync, a predetermined amount of ES streams are stored and decoding is started. At this time, several PTSs come out while decoding several PES packets.

따라서, 2개 이상의 PES 패킷을 저장한 다음 디코딩을 시작하는 경우에 저장되는 PTS값이 여러개가 되므로 현재 디코딩하고 있는 프레임의 PTS 값을 찾기가 모호하게 된다. 결국, 립싱크를 위해 STC 값과의 차이를 계산하기가 쉽지 않게 된다.Therefore, when two or more PES packets are stored and then decoding is started, the number of stored PTSs becomes ambiguous, which makes it difficult to find the PTS value of the frame currently being decoded. As a result, it is not easy to calculate the difference from the STC value for lip sync.

또한, 비디오 스트림과는 달리 오디오 디코딩의 경우 각 알고리즘(예, MPEG,AC-3,...)마다 프레임 길이 및 싱크가 다르고 또한, 프레임 싱크와 같은 형태의 데이터가 스트림 중에 존재하기 때문에 싱크를 찾아서 PTS와 ES를 연결하여 저장하는 방법을 사용할 경우 별도의 알고리즘을 다시 적용해야 하고, 그만큼 명령어의 수가 늘어나면서 DSP의 효율을 떨어뜨린다.In addition, unlike video streams, in audio decoding, the frame length and the sync are different for each algorithm (e.g., MPEG, AC-3, ...). If you use the method of finding and connecting the PTS and the ES, the separate algorithm must be applied again, and the number of instructions decreases the efficiency of the DSP.

본 발명은 상기와 같은 문제점을 해결하기 위한 것으로서, 본 발명의 목적은 오디오 PTS 값과 함께 상기 PTS 값이 적용되는 ES 버퍼의 위치를 같이 저장함으로써, 각각의 PTS를 효율적으로 관리하는 디지털 방송 수신기에서의 오디오 PTS 관리 방법을 제공함에 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to store an ES buffer to which the PTS value is applied together with an audio PTS value, thereby efficiently managing each PTS. To provide an audio PTS management method.

도 1은 일반적인 디지털 방송 수신 시스템의 구성 블록도1 is a block diagram of a general digital broadcast receiving system

도 2는 PTS와 STC 관계에 따른 립 싱크 방식을 보인 도면2 illustrates a lip sync scheme according to a PTS and STC relationship

도 3은 PES 패킷에서 추출되는 PTS 값과 함께 상기 PTS 값이 적용되는 ES 버퍼의 위치를 같이 저장하는 본 발명의 예를 보인 도면3 is a diagram illustrating an example of the present invention for storing the location of an ES buffer to which the PTS value is applied together with a PTS value extracted from a PES packet.

도 4는 오디오 디코딩시에 PTS 값이 유효한지를 비교하여 갱신하는 본 발명의 예를 보인 도면4 shows an example of the present invention for comparing and updating whether a PTS value is valid during audio decoding.

도면의 주요부분에 대한 부호의 설명Explanation of symbols for main parts of the drawings

101 : TP 역다중화부102 : 비디오 디코더101: TP demultiplexer 102: video decoder

103 : VDP104 : 오디오 디코더103: VDP104: Audio Decoder

105 : 시스템 디코더105: system decoder

상기와 같은 목적을 달성하기 위한 본 발명에 따른 디지털 방송 수신기의 PTS 관리 방법은, 입력되는 PES 패킷에서 검출된 PTS는 PTS 버퍼에, 오디오 스트림은 ES 버퍼에 저장한 후 오디오 스트림을 디코딩하는 경우, 상기 PES 디코딩시 PES 패킷에서 PTS가 검출되면 검출된 PTS와 함께 상기 PTS가 유효한 주소를 상기 PTS 버퍼에 저장하는 단계와, 오디오 스트림 디코딩시 상기 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 단계에서 PTS 버퍼에 저장된 유효 주소를 비교하여 상기 오디오 스트림의 PTS를 결정하는 단계와, 상기 단계에서 결정된 PTS 값과 이때 검출되는 시스템 타임 클럭(STC)을 비교하여 오디오 신호의 립 싱크를 수행하는 단계를 포함하여 이루어지는 것을 특징으로 한다.PTS management method of the digital broadcast receiver according to the present invention for achieving the above object, when the PTS detected in the input PES packet is stored in the PTS buffer, the audio stream is stored in the ES buffer, then decoding the audio stream, Storing a valid address in the PTS buffer along with the detected PTS in the PTS buffer when the PTS is detected in the PES packet during decoding of the PES; and in the step, the address of the audio stream read from the ES buffer and decoding the audio stream. Comparing a valid address stored in a buffer to determine a PTS of the audio stream, and performing a lip sync of the audio signal by comparing the PTS value determined in the step with a system time clock (STC) detected at this time; Characterized in that made.

상기 PES 디코딩 단계에서 저장되는 PTS가 유효한 주소는 해당 PTS가 검출되는 PES 패킷 내의 마지막 오디오 스트림이 저장되는 ES 버퍼의 주소인 것을 특징으로 한다.The valid address of the PTS stored in the PES decoding step is an address of an ES buffer in which the last audio stream in the PES packet in which the corresponding PTS is detected is stored.

상기 오디오 스트림 단계는, 오디오 스트림의 디코딩이 시작되면 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 PTS 버퍼에 저장해 놓은 PTS 값이 유효한 주소를 비교하여 현재의 PTS 값이 유효한지 판단하는 단계와, 현재의 PTS 값이 유효하지 않다면 현재의 PTS 값을 갱신하는 단계로 이루어지는 것을 특징으로 한다.The audio stream step may include determining whether a current PTS value is valid by comparing an address of an audio stream read from an ES buffer with a valid address of a PTS value stored in the PTS buffer when decoding of the audio stream starts. If the PTS value is not valid, it comprises the step of updating the current PTS value.

상기 갱신된 PTS 값은 다음번 립 싱크 비교시까지 유효한 것을 특징으로 한다.The updated PTS value is valid until the next lip sync comparison.

본 발명의 다른 목적, 특징 및 잇점들은 첨부한 도면을 참조한 실시예들의 상세한 설명을 통해 명백해질 것이다.Other objects, features and advantages of the present invention will become apparent from the following detailed description of embodiments taken in conjunction with the accompanying drawings.

이하, 첨부된 도면을 참조하여 본 발명의 실시예의 구성과 그 작용을 설명하며, 도면에 도시되고 또 이것에 의해서 설명되는 본 발명의 구성과 작용은 적어도하나의 실시예로서 설명되는 것이며, 이것에 의해서 상기한 본 발명의 기술적 사상과 그 핵심 구성 및 작용이 제한되지는 않는다.Hereinafter, with reference to the accompanying drawings illustrating the configuration and operation of the embodiment of the present invention, the configuration and operation of the present invention shown in the drawings and described by it will be described as at least one embodiment, By the technical spirit of the present invention described above and its core configuration and operation is not limited.

본 발명은 DSP를 이용하여 오디오 신호를 디코딩하는 경우 PES 헤더에서 PTS 값을 추출한 후 PTS 값과 함께 상기 PTS 값이 적용되는 ES 버퍼의 위치를 같이 저장한 후 디코딩을 수행하는데 있다. 즉, 디코딩을 위해 ES 버퍼의 값을 읽을 때마다 그 주소를 현재의 PTS가 유효한 주소와 비교하여 PTS를 갱신하여 줌으로써, 현재에 가장 적절한 PTS 값으로 STC와 비교하여 립 싱크를 맞출 수 있게 해준다. 또 특별히 오디오 싱크를 찾지 않고도 유효한 PTS 값을 알 수 있으므로 별도의 알고리즘이 필요하지 않다. 이로 인해 코드의 길이를 줄이는 효과를 얻는다.When decoding an audio signal using a DSP, the present invention extracts a PTS value from a PES header, stores the location of an ES buffer to which the PTS value is applied together with the PTS value, and performs decoding. That is, whenever the value of the ES buffer is read for decoding, the address is compared with the address where the current PTS is valid to update the PTS, so that the lip sync can be matched with the STC with the most appropriate PTS value. It also knows valid PTS values without looking for audio sinks, so no algorithm is required. This has the effect of reducing the length of the code.

도 3은 PES 패킷에서 추출되는 PTS 값과 함께 상기 PTS 값이 적용되는 ES 버퍼의 위치를 같이 저장하는 본 발명의 예를 보인 것이다.3 shows an example of the present invention in which the location of the ES buffer to which the PTS value is applied is stored together with the PTS value extracted from the PES packet.

이를 위해 본 발명은 PTS와 PTS가 유효한 주소값(valid address)을 같이 저장하기 위한 PTS&address 버퍼를 필요로 한다.To this end, the present invention requires a PTS & address buffer for storing a valid address together with the PTS.

도 3을 보면, PES를 디코드하는 단계에서 각 PES 패킷마다 PES 헤더에서 PTS(PTS1~PTSn)가 검출된다. 그러면, 상기 PTS는 PTS&address 버퍼에, ES는 ES 버퍼에 각각 저장하는데 이때, 상기 PTS&address 버퍼에는 상기 PTS와 상기 PTS가 유효한 주소가 같이 저장된다.3, in the step of decoding the PES, PTSs (PTS1 to PTSn) are detected in the PES header for each PES packet. Then, the PTS is stored in the PTS & address buffer and the ES is stored in the ES buffer. In this case, the PTS and the address in which the PTS is valid are stored together.

이때, PES 패킷의 헤더에 있는 PES 한 패킷의 길이를 참조하면 패킷의 마지막 부분을 알 수 있고, 마지막 부분이 저장되는 ES 버퍼의 주소도 알 수 있다. 따라서, 본 발명은 하나의 PES 패킷 내에서 패킷의 마지막 부분의 오디오 ES가 저장되는 ES 버퍼의 주소를 해당 PTS와 함께 저장하는 것을 실시예로 한다. 즉, 하나의 PES 패킷 내에서 패킷의 마지막 부분의 오디오 ES가 저장되는 ES 버퍼의 주소가 해당 PTS의 유효한 주소 값이 된다.At this time, referring to the length of one PES packet in the header of the PES packet, the last part of the packet can be known, and the address of the ES buffer in which the last part is stored can also be known. Therefore, according to an embodiment of the present invention, the address of the ES buffer in which the audio ES of the last part of the packet is stored in one PES packet is stored together with the corresponding PTS. That is, the address of the ES buffer in which the audio ES of the last part of the packet is stored in one PES packet becomes a valid address value of the corresponding PTS.

상기된 과정으로 모든 PES 패킷에 대한 각 PTS값과 해당 PTS의 유효한 주소값이 도 3과 같이 PTS&address 버퍼에 저장되고, 각 PES 패킷의 ES는 ES 버퍼에 저장되며, 이 값은 오디오 디코딩시에 참조된다.In the above process, each PTS value for all PES packets and a valid address value of the corresponding PTS are stored in the PTS & address buffer as shown in FIG. 3, and the ES of each PES packet is stored in the ES buffer, which is referred to during audio decoding. do.

도 4는 오디오 디코딩시에 PTS 값이 유효한지를 비교하여 갱신하는 본 발명의 예를 보이고 있다.4 shows an example of the present invention for comparing and updating whether a PTS value is valid at the time of audio decoding.

즉, 오디오 디코딩이 시작되면 마지막으로 ES 버퍼에서 가져온 ES 스트림의 주소와 상기된 도 3에서 저장해 놓은 PTS 값의 유효 주소를 비교하여 현재의 PTS 값이 유효한지 판단한다. 본 발명에서는 상기 PTS가 검출되는 PES 패킷 내의 마지막 오디오 ES가 저장되는 ES 버퍼의 위치를 해당 PTS 값의 유효 주소로 저장하였으므로, 상기 ES 버퍼에서 마지막으로 읽어 온 ES 스트림의 주소와 상기 유효 주소가 같다면 PTS 값은 상기 유효 주소와 함께 저장된 PTS로 갱신된다. 만일 같지 않다면 PTS&address 버퍼에 저장된 유효 주소와의 비교가 반복 수행되어 PTS를 갱신한다.That is, when audio decoding starts, it is determined whether the current PTS value is valid by comparing the address of the ES stream finally obtained from the ES buffer with the effective address of the PTS value stored in FIG. In the present invention, since the location of the ES buffer in which the last audio ES is stored in the PES packet in which the PTS is detected is stored as a valid address of the corresponding PTS value, the address of the last ES stream read from the ES buffer is the same as the valid address. The PTS value is then updated with the PTS stored with the valid address. If it is not the same, the comparison with the valid address stored in the PTS & address buffer is repeated to update the PTS.

도 4의 예를 보면, 오디오 디코딩시 ES 버퍼에서 마지막으로 읽어 온 ES 스트림의 주소가 PTS2 유효 주소라면, 상기 오디오 ES 스트림을 디코딩하는에 유효한 PTS는 PTS2로 갱신된다.4, if the address of the ES stream last read from the ES buffer during audio decoding is a PTS2 valid address, the PTS valid for decoding the audio ES stream is updated to PTS2.

이렇게 갱신된 PTS 값은 다음번 립 싱크 비교를 위해 다시 주소를 비교할 때까지 유효하며 결정된 PTS 값을 바탕으로 STC 값과의 비교를 통하여 립 싱크가 맞는지를 판단할 수 있고 디코딩을 계속 진행할 수 있다.The updated PTS value is valid until the address is compared again for the next lip sync comparison. Based on the determined PTS value, it is possible to determine whether the lip sync is correct and compare the STC value and continue decoding.

이상에서와 같이 본 발명에 따른 디지털 방송 수신기의 오디오 PTS 관리 방법에 의하면, 오디오 프레임과는 상관없이 PTS를 관리할 수 있으므로 서로 다른 알고리즘에서 서로 다른 헤더를 찾기 위한 별도의 알고리즘이 필요하지 않게 된다. 이로 인해 PES 디코딩을 간단히 할 수 있게 되고, 또한 코드 사이즈를 줄일 수 있는 효과가 있다. 그리고, 이렇게 저장된 PTS 값을 이용하여 디지털 TV의 오디오/비디오 립 싱크를 수행함으로써, A/V 립 싱크를 더욱 정확하게 맞출 수 있다. 특히, 여러개의 PES 스트림을 디코딩하여 2개 이상의 PTS가 저장되더라도 디코딩중인 오디오 프레임에서 가장 적절한 PTS 값을 찾을 수 있게 된다.As described above, according to the audio PTS management method of the digital broadcasting receiver according to the present invention, since the PTS can be managed irrespective of the audio frame, a separate algorithm for finding different headers is not required in different algorithms. This simplifies PES decoding and has the effect of reducing the code size. In addition, by performing the audio / video lip sync of the digital TV using the stored PTS value, the A / V lip sync can be more accurately matched. In particular, even if two or more PTSs are stored by decoding several PES streams, the most suitable PTS value can be found in the audio frame being decoded.

이상 설명한 내용을 통해 당업자라면 본 발명의 기술 사상을 일탈하지 아니하는 범위에서 다양한 변경 및 수정이 가능함을 알 수 있을 것이다.Those skilled in the art will appreciate that various changes and modifications can be made without departing from the spirit of the present invention.

따라서, 본 발명의 기술적 범위는 실시예에 기재된 내용으로 한정되는 것이 아니라 특허 청구의 범위에 의하여 정해져야 한다.Therefore, the technical scope of the present invention should not be limited to the contents described in the embodiments, but should be defined by the claims.

Claims (5)

입력되는 PES 패킷에서 검출된 PTS는 PTS 버퍼에, 오디오 스트림은 ES 버퍼에 저장한 후 디코딩하는 오디오 디코더를 포함하는 디지털 방송 수신기에서의 표시 타임 스탬프(PTS) 관리 방법에 있어서,A method of managing a display time stamp (PTS) in a digital broadcast receiver, comprising: an audio decoder for detecting a PTS detected in an input PES packet and storing the audio stream in an ES buffer and then decoding the audio stream; (a) 상기 PES 디코딩시 PES 패킷에서 PTS가 검출되면 검출된 PTS와 함께 상기 PTS가 유효한 주소를 상기 PTS 버퍼에 저장하는 단계;(a) if a PTS is detected in a PES packet during PES decoding, storing an address in which the PTS is valid together with the detected PTS in the PTS buffer; (b) 오디오 스트림 디코딩시 상기 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 (a) 단계에서 PTS 버퍼에 저장된 유효 주소를 비교하여 상기 오디오 스트림의 PTS를 결정하는 단계; 그리고(b) determining the PTS of the audio stream by comparing the address of the audio stream read from the ES buffer when decoding the audio stream with a valid address stored in the PTS buffer in step (a); And (c) 상기 (b) 단계에서 결정된 PTS 값과 이때 검출되는 시스템 타임 클럭(STC)을 비교하여 오디오 신호의 립 싱크를 수행하는 단계를 포함하여 이루어지는 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.(c) performing a lip sync of the audio signal by comparing the PTS value determined in step (b) with the system time clock (STC) detected at this time. . 제 1 항에 있어서, 상기 (a) 단계에서 저장되는 PTS가 유효한 주소는The address of claim 1, wherein the PTS stored in step (a) is valid. 해당 PTS가 검출되는 PES 패킷 내의 마지막 오디오 스트림이 저장되는 ES 버퍼의 주소인 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.A method of managing a PTS in a digital broadcast receiver, wherein the PTS is an address of an ES buffer in which the last audio stream in the PES packet is detected. 제 1 항에 있어서, 상기 (b) 단계는The method of claim 1, wherein step (b) 오디오 스트림의 디코딩이 시작되면 ES 버퍼에서 읽어 온 오디오 스트림의주소와 상기 PTS 버퍼에 저장해 놓은 PTS 값이 유효한 주소를 비교하여 현재의 PTS 값이 유효한지 판단하는 단계와,Determining whether the current PTS value is valid by comparing the address of the audio stream read from the ES buffer with the PTS value stored in the PTS buffer when the decoding of the audio stream starts; 현재의 PTS 값이 유효하지 않다면 현재의 PTS 값을 갱신하는 단계로 이루어지는 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.And updating the current PTS value if the current PTS value is not valid. 제 3 항에 있어서, 상기 갱신 단계는The method of claim 3, wherein said updating step 상기 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 PTS 버퍼에 저장된 유효 주소가 같다면 현재의 PTS 값은 상기 유효 주소와 함께 저장된 PTS로 갱신되는 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.If the address of the audio stream read from the ES buffer and the valid address stored in the PTS buffer is the same, the current PTS value is updated to the PTS stored with the valid address. 제 4 항에 있어서,The method of claim 4, wherein 상기 갱신된 PTS 값은 다음번 립 싱크 비교시까지 유효한 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.And the updated PTS value is valid until the next lip sync comparison.
KR1020020018967A 2002-04-08 2002-04-08 Method for managing presentation time stamp in digital broadcasting receiver KR100826170B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020020018967A KR100826170B1 (en) 2002-04-08 2002-04-08 Method for managing presentation time stamp in digital broadcasting receiver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020020018967A KR100826170B1 (en) 2002-04-08 2002-04-08 Method for managing presentation time stamp in digital broadcasting receiver

Publications (2)

Publication Number Publication Date
KR20030080377A true KR20030080377A (en) 2003-10-17
KR100826170B1 KR100826170B1 (en) 2008-04-30

Family

ID=32378124

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020020018967A KR100826170B1 (en) 2002-04-08 2002-04-08 Method for managing presentation time stamp in digital broadcasting receiver

Country Status (1)

Country Link
KR (1) KR100826170B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101143907B1 (en) * 2007-02-15 2012-05-10 삼성전자주식회사 Method and Apparatus of playing Digital Broadcasting

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5703877A (en) * 1995-11-22 1997-12-30 General Instrument Corporation Of Delaware Acquisition and error recovery of audio data carried in a packetized data stream
JP3893643B2 (en) * 1996-07-31 2007-03-14 ソニー株式会社 Signal multiplexing method and transmission signal generating apparatus using the same
KR100222705B1 (en) * 1997-08-30 1999-10-01 윤종용 Apparatus of synchronous outputting audio and video
KR100236014B1 (en) * 1997-12-29 1999-12-15 구자홍 Video decoding system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101143907B1 (en) * 2007-02-15 2012-05-10 삼성전자주식회사 Method and Apparatus of playing Digital Broadcasting
US8238446B2 (en) 2007-02-15 2012-08-07 Samsung Electronics Co., Ltd. Method and apparatus for reproducing digital broadcasting

Also Published As

Publication number Publication date
KR100826170B1 (en) 2008-04-30

Similar Documents

Publication Publication Date Title
US7675876B2 (en) Transport demultiplexor with bit maskable filter
KR100234265B1 (en) Caption data processing circuit and method therefor
US5726989A (en) Method for ensuring synchronization of MPEG-1 data carried in an MPEG-2 transport stream
US6236432B1 (en) MPEG II system with PES decoder
US8351514B2 (en) Method, protocol, and apparatus for transporting advanced video coding content
KR100203262B1 (en) Interface device of video decoder for syncronization of picture
CN100401784C (en) Data synchronization method and apparatus for digital multimedia data receiver
US8144791B2 (en) Apparatus, method, and medium for video synchronization
KR19990057100A (en) MPEG decoder and decoding control method
KR100301825B1 (en) Mpeg video decoding system and method of processing overflow of mpeg video decoding system
US20060203853A1 (en) Apparatus and methods for video synchronization by parsing time stamps from buffered packets
US8238446B2 (en) Method and apparatus for reproducing digital broadcasting
KR100617221B1 (en) Method for audio/video signal synchronizing of digital broadcasting receiver
US6731657B1 (en) Multiformat transport stream demultiplexor
JP2872104B2 (en) Time stamp adding apparatus and method, and moving image compression / expansion transmission system and method using the same
US6496233B1 (en) Command and control architecture for a video decoder and an audio decoder
KR100826170B1 (en) Method for managing presentation time stamp in digital broadcasting receiver
KR100236014B1 (en) Video decoding system
WO2017179592A1 (en) Transmission device, transmission method, reception device and reception method
KR20030082117A (en) Method for audio/video signal lip-sync controlling in digital broadcasting receiver
US20060257108A1 (en) Multimedia reproduction apparatus
US6970514B1 (en) Signal processing device, signal processing method, decoding device, decoding method and recording medium
KR100710393B1 (en) method for decording packetized streams
KR20050076968A (en) Video lip-synchronization method in digital broadcasting receiver
KR100499518B1 (en) Method for Controlling Audio Lip-Synchronization

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee