KR100826170B1 - 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
KR100826170B1
KR100826170B1 KR1020020018967A KR20020018967A KR100826170B1 KR 100826170 B1 KR100826170 B1 KR 100826170B1 KR 1020020018967 A KR1020020018967 A KR 1020020018967A KR 20020018967 A KR20020018967 A KR 20020018967A KR 100826170 B1 KR100826170 B1 KR 100826170B1
Authority
KR
South Korea
Prior art keywords
pts
buffer
audio
address
value
Prior art date
Application number
KR1020020018967A
Other languages
Korean (ko)
Other versions
KR20030080377A (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

Images

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]

Abstract

디지털 방송 수신기에서 오디오/비디오 신호의 립 싱크를 위한 오디오 신호의 PTS 관리 방법에 관한 것으로서, 특히 PES 헤더에서 PTS 값을 추출하고 추출된 PTS 값과 함께 상기 PTS 값이 적용되는 ES 버퍼의 위치를 같이 저장한 후 오디오 스트림의 디코딩을 수행하는데 이때, 오디오 디코딩을 위해 ES 버퍼의 값을 읽을 때마다 그 주소를 현재의 PTS가 유효한 주소와 비교하여 PTS를 갱신하여 줌으로써, 현재에 가장 적절한 PTS 값으로 STC와 비교하여 립 싱크를 맞출 수 있게 해준다. 또 특별히 오디오 싱크를 찾지 않고도 유효한 PTS 값을 알 수 있으므로 별도의 알고리즘이 필요하지 않으며, 이로 인해 코드의 길이를 줄일 수 있다.

Figure R1020020018967

A/V 립 싱크, PTS 관리

In particular, the present invention relates to a PTS management method for an audio signal for lip-sync of an audio / video signal in a digital broadcast receiver, and more particularly, to a method and apparatus for extracting a PTS value from a PES header, Whenever the value of the ES buffer is read for audio decoding, the PTS is updated by comparing the address with a valid address of the PTS. Thus, STC To match the lip syncs. In addition, since a valid PTS value can be known without searching specifically for an audio sink, a separate algorithm is not required, thereby reducing the length of the code.

Figure R1020020018967

A / V lip sync, PTS management

Description

디지털 방송 수신기에서의 PTS 관리 방법{Method for managing presentation time stamp in digital broadcasting receiver}TECHNICAL FIELD [0001] The present invention relates to a PTS management method for a digital broadcasting receiver,

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

도 2는 PTS와 STC 관계에 따른 립 싱크 방식을 보인 도면FIG. 2 is a view showing a lip sinking method according to PTS and STC relationships; FIG.

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

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

도면의 주요부분에 대한 부호의 설명DESCRIPTION OF THE REFERENCE NUMERALS

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

103 : VDP 104 : 오디오 디코더103: VDP 104: Audio decoder

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

본 발명은 디지털 방송 수신기에 관한 것으로서, 특히 오디오/비디오 신호의 립 싱크(Lip sync)를 위해 오디오 신호의 표시 타임 스탬프(PTS)를 관리하는 방법 에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital broadcast receiver, 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, digital compression and image compression technology are key elements for supporting multimedia. Moving Pictures Expert Group (MPEG) -2 among the image compression techniques is an international standard for compressing and encoding digital moving pictures, which is the most important technology in a multimedia environment.

이러한 MPEG-2를 채용한 디지털 방송 수신 시스템은 도 1에 도시된 바와 같이, 오디오/비디오(Audio/Video ; A/V) 다중(Multiplexed) 비트스트림이 입력되면 트랜스포트 역다중화부(101)에서 다중화(Multiplexed)되어 있는 오디오와 비디오 비트스트림을 각각 분리한다. 상기 분리된 비디오 비트스트림과 오디오 비트스트림은 디코딩을 위해 각각 비디오 디코더(102)와 오디오 디코더(104)로 출력된다. 여기서, 상기 비디오 비트스트림과 오디오 비트스트림은 패킷화된 요소 스트림(packetized elementary stream ; PES)이다.As shown in FIG. 1, when a multiplexed bitstream of audio / video (A / V) is input, the digital broadcasting receiving system adopting MPEG-2 is used in a transport demultiplexing unit 101 Separate multiplexed audio and video bitstreams. The separated video bitstream and audio bitstream are output to the video decoder 102 and the audio decoder 104, respectively, 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 overhead (various kinds of header information, start code, etc.) from an input video bitstream, performs variable length decoding (VLD) on pure data information and then performs inverse quantization, (IDCT), restores the pixel values of the original screen, and the video display processor (VDP) 103 converts the converted pixel values to display formats and outputs them to a display device or the like.

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

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

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

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

여기서, 상기 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 based on the STC, and the PTS is a display time stamp indicating when to display the restored data based on the STC. The STC is an overall clock locked with the encoder. The encoder and the decoder have the same STC. The encoder also detects the STC based on the STC for A / V lip sync and normal video decoding because the video signal has an internal delay. DTS and PTS are generated and transmitted together.

통상, 비디오와 오디오는 별도의 립 싱크 과정을 수행하게 되고, 최종적으로 비디오와 오디오를 맞추는 시스템이 주를 이룬다.In general, video and audio are subjected to a separate lip sync process, and ultimately, a system for matching video and audio.

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

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

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

예컨대, (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, if the PTS is within a predetermined range based on the STC as in the cases (B) and (C), it is determined that the A / V lip sync is correct, and normal decoding is performed to output A / V data. However, if the PTS is out of a predetermined range based on the STC as in the case of (A) or (D), the A / V lip sync is performed by skipping the decoding or by repeating or waiting. In this case, since the PTS value is faster than the STC in the case of (A), skipping to the next decoding unit is performed without decoding the current frame (or picture) in order to match the decoding unit including the PTS corresponding to the STC value (D) is the opposite of (A). Since the PTS value is later than the STC, the decoding unit is repeated or waited to adjust the A / V lip sync.

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

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

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

또한, 비디오 스트림과는 달리 오디오 디코딩의 경우 각 알고리즘(예, MPEG,AC-3,...)마다 프레임 길이 및 싱크가 다르고 또한, 프레임 싱크와 같은 형태의 데이터가 스트림 중에 존재하기 때문에 싱크를 찾아서 PTS와 ES를 연결하여 저장하는 방법을 사용할 경우 별도의 알고리즘을 다시 적용해야 하고, 그만큼 명령어의 수가 늘어나면서 DSP의 효율을 떨어뜨린다.Also, unlike a video stream, audio decoding has different frame lengths and sinks for each algorithm (eg, MPEG, AC-3, etc.), and since data in the form of frame sync is present in the stream, If PTS and ES are connected and stored, a separate algorithm must be reapplied. This increases the number of instructions and degrades 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 it is an object of the present invention to provide a digital broadcast receiver which efficiently stores the position of an ES buffer to which the PTS value is applied together with an audio PTS value, The method comprising:

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

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

상기 오디오 스트림 단계는, 오디오 스트림의 디코딩이 시작되면 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 PTS 버퍼에 저장해 놓은 PTS 값이 유효한 주소를 비교하여 현재의 PTS 값이 유효한지 판단하는 단계와, 현재의 PTS 값이 유효하지 않다면 현재의 PTS 값을 갱신하는 단계로 이루어지는 것을 특징으로 한다.The audio stream may include a step of 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 an audio stream starts, And updating the current PTS value if the PTS value is not valid.

상기 갱신된 PTS 값은 다음번 립 싱크 비교시까지 유효한 것을 특징으로 한다.And 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 detailed description of embodiments with reference to the accompanying drawings.

이하, 첨부된 도면을 참조하여 본 발명의 실시예의 구성과 그 작용을 설명하며, 도면에 도시되고 또 이것에 의해서 설명되는 본 발명의 구성과 작용은 적어도 하나의 실시예로서 설명되는 것이며, 이것에 의해서 상기한 본 발명의 기술적 사상과 그 핵심 구성 및 작용이 제한되지는 않는다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a configuration and an operation of an embodiment of the present invention will be described with reference to the accompanying drawings, and the configuration and operation of the present invention shown in and described by the drawings will be described as at least one embodiment, The technical idea of the present invention and its essential structure and action are not limited.

본 발명은 DSP를 이용하여 오디오 신호를 디코딩하는 경우 PES 헤더에서 PTS 값을 추출한 후 PTS 값과 함께 상기 PTS 값이 적용되는 ES 버퍼의 위치를 같이 저장한 후 디코딩을 수행하는데 있다. 즉, 디코딩을 위해 ES 버퍼의 값을 읽을 때마다 그 주소를 현재의 PTS가 유효한 주소와 비교하여 PTS를 갱신하여 줌으로써, 현재에 가장 적절한 PTS 값으로 STC와 비교하여 립 싱크를 맞출 수 있게 해준다. 또 특별히 오디오 싱크를 찾지 않고도 유효한 PTS 값을 알 수 있으므로 별도의 알고리즘이 필요하지 않다. 이로 인해 코드의 길이를 줄이는 효과를 얻는다.In decoding an audio signal using a DSP, a PTS value is extracted from a PES header, and a PTS value and a position of an ES buffer to which the PTS value is applied are stored and then decoded. That is, every time the value of the ES buffer is read for decoding, the address is compared with a valid PTS address to update the PTS, thereby enabling the lip sync to be compared with the STC at the most appropriate PTS value at present. In addition, since a valid PTS value can be known without searching for an audio sync, a separate algorithm is not required. This has the effect of reducing the length of the code.

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

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

도 3을 보면, PES를 디코드하는 단계에서 각 PES 패킷마다 PES 헤더에서 PTS(PTS1~PTSn)가 검출된다. 그러면, 상기 PTS는 PTS&address 버퍼에, ES는 ES 버퍼에 각각 저장하는데 이때, 상기 PTS&address 버퍼에는 상기 PTS와 상기 PTS가 유효한 주소가 같이 저장된다.Referring to FIG. 3, PTS (PTS1 to PTSn) is detected in the PES header for each PES packet in the step of decoding PES. Then, the PTS is stored in the PTS & address buffer, and the ES is stored in the ES buffer. In the PTS & address buffer, the PTS and the PTS address 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 where the last part is stored can be known. Therefore, the present invention stores the address of the ES buffer in which the audio ES of the last part of the packet is stored in one PES packet together with the corresponding PTS. That is, the address of the ES buffer where 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 버퍼에 저장되며, 이 값은 오디오 디코딩시에 참조된다.3, the PTS value of each PES packet is stored in the ES buffer, and the value of the PTS packet is stored in the ES buffer, do.

도 4는 오디오 디코딩시에 PTS 값이 유효한지를 비교하여 갱신하는 본 발명의 예를 보이고 있다.FIG. 4 shows an example of the present invention for comparing and updating whether the 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, the address of the ES stream fetched from the ES buffer is finally compared with the effective address of the PTS value stored in FIG. 3 to determine whether the current PTS value is valid. In the present invention, since the location of the ES buffer storing the last audio ES in the PES packet in which the PTS is detected is stored as the effective address of the corresponding PTS value, the address of the ES stream read last in the ES buffer is equal to the effective address The face PTS value is updated with the PTS stored with the valid address. If it is not the same, the comparison with the effective address stored in the PTS & address buffer is repeated to update the PTS.

도 4의 예를 보면, 오디오 디코딩시 ES 버퍼에서 마지막으로 읽어 온 ES 스트림의 주소가 PTS2 유효 주소라면, 상기 오디오 ES 스트림을 디코딩하는에 유효한 PTS는 PTS2로 갱신된다.In the example of FIG. 4, if the address of the ES stream finally read from the ES buffer in the audio buffer 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 comparison is performed again for the next lip sync comparison. Based on the determined PTS value, it is possible to judge whether the lip sync is correct by comparing with the STC value, and decoding can be continued.

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

이상 설명한 내용을 통해 당업자라면 본 발명의 기술 사상을 일탈하지 아니하는 범위에서 다양한 변경 및 수정이 가능함을 알 수 있을 것이다.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 invention.

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

Claims (5)

입력되는 PES 패킷에서 검출된 PTS는 PTS 버퍼에, 오디오 스트림은 ES 버퍼에 저장한 후 디코딩하는 오디오 디코더를 포함하는 디지털 방송 수신기에서의 표시 타임 스탬프(PTS) 관리 방법에 있어서, A PTS (PTS) management method for a digital broadcast receiver, the PTS including a PTS detected in an input PES packet and an audio decoder storing an audio stream in an ES buffer and decoding the audio stream, (a) 상기 PES 디코딩시 PES 패킷에서 PTS가 검출되면 검출된 PTS와 함께 상기 PTS가 유효한 주소를 상기 PTS 버퍼에 저장하는 단계;(a) storing a PTS in the PTS buffer together with a detected PTS when a PTS is detected in the PES packet during the PES decoding; (b) 오디오 스트림 디코딩시 상기 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 (a) 단계에서 PTS 버퍼에 저장된 유효 주소를 비교하여 상기 오디오 스트림의 PTS를 결정하는 단계; 그리고 (b) determining an PTS of the audio stream by comparing an address of an audio stream read from the ES buffer and an effective address stored in a PTS buffer in step (a) when decoding an audio stream; And (c) 상기 (b) 단계에서 결정된 PTS 값과 이때 검출되는 시스템 타임 클럭(STC)을 비교하여 오디오 신호의 립 싱크를 수행하는 단계를 포함하여 이루어지는 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.(c) comparing the PTS value determined in the step (b) with a detected system time clock (STC) to perform a lip sync of an audio signal. . 제 1 항에 있어서, 상기 (a) 단계에서 저장되는 PTS가 유효한 주소는2. The method of claim 1, wherein the PTS stored in step (a) 해당 PTS가 검출되는 PES 패킷 내의 마지막 오디오 스트림이 저장되는 ES 버퍼의 주소인 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.Wherein the PTS packet is an address of an ES buffer in which the last audio stream in the PES packet in which the PTS is detected is stored. 제 1 항에 있어서, 상기 (b) 단계는2. The method of claim 1, wherein step (b) 오디오 스트림의 디코딩이 시작되면 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 PTS 버퍼에 저장해 놓은 PTS 값이 유효한 주소를 비교하여 현재의 PTS 값이 유효한지 판단하는 단계와,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 an audio stream is started; 현재의 PTS 값이 유효하지 않다면 현재의 PTS 값을 갱신하는 단계로 이루어지는 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.And updating the current PTS value if the current PTS value is not valid. 제 3 항에 있어서, 상기 갱신 단계는4. The method of claim 3, wherein the updating step 상기 ES 버퍼에서 읽어 온 오디오 스트림의 주소와 상기 PTS 버퍼에 저장된 유효 주소가 같다면 현재의 PTS 값은 상기 유효 주소와 함께 저장된 PTS로 갱신되는 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.Wherein the current PTS value is updated with the PTS stored together with the effective address if the address of the audio stream read from the ES buffer is the same as the effective address stored in the PTS buffer. 제 4 항에 있어서, 5. The method of claim 4, 상기 갱신된 PTS 값은 다음번 립 싱크 비교시까지 유효한 것을 특징으로 하는 디지털 방송 수신기에서의 PTS 관리 방법.Wherein 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 KR20030080377A (en) 2003-10-17
KR100826170B1 true 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)

Families Citing this family (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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970032167A (en) * 1995-11-22 1997-06-26 로버트 에이. 스코트 Error recovery and acquisition of audio data carried in packetized data streams
JPH1051750A (en) * 1996-07-31 1998-02-20 Sony Corp Signal multiplex method and transmission signal generator using it
KR19990020289A (en) * 1997-08-30 1999-03-25 윤종용 A device for synchronizing audio and video
KR19990057099A (en) * 1997-12-29 1999-07-15 구자홍 Video decoding system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970032167A (en) * 1995-11-22 1997-06-26 로버트 에이. 스코트 Error recovery and acquisition of audio data carried in packetized data streams
JPH1051750A (en) * 1996-07-31 1998-02-20 Sony Corp Signal multiplex method and transmission signal generator using it
KR19990020289A (en) * 1997-08-30 1999-03-25 윤종용 A device for synchronizing audio and video
KR19990057099A (en) * 1997-12-29 1999-07-15 구자홍 Video decoding system

Also Published As

Publication number Publication date
KR20030080377A (en) 2003-10-17

Similar Documents

Publication Publication Date Title
US8711934B2 (en) Decoding and presentation time stamps for MPEG-4 advanced video coding
KR100420740B1 (en) Encoding device, encoding method, decoding device, decoding method, coding system and coding method
JP3839089B2 (en) Method for capturing and synchronizing desired data from a packetized data stream
US7643513B2 (en) Method and system for audio and video transport
US7496675B2 (en) Data multiplexer, data multiplexing method, and recording medium
US8351514B2 (en) Method, protocol, and apparatus for transporting advanced video coding content
KR100203262B1 (en) Interface device of video decoder for syncronization of picture
US20090252231A1 (en) Encoding system and method, decoding system and method, multiplexing apparatus and method, and display system and method
KR100301826B1 (en) Video decoder
GB2324432A (en) MPEG-2 decoder and PES decoder
KR19980070568A (en) Waveform Generator for Inserting Data into Digital Television Signals
US20060018387A1 (en) Apparatus, method, and medium for video synchronization
KR100301825B1 (en) Mpeg video decoding system and method of processing overflow of mpeg video decoding system
KR19990057100A (en) MPEG decoder and decoding control method
US8238446B2 (en) Method and apparatus for reproducing digital broadcasting
KR100617221B1 (en) Method for audio/video signal synchronizing of digital broadcasting receiver
US20060072671A1 (en) System, method and apparatus for clean channel change
JP2872104B2 (en) Time stamp adding apparatus and method, and moving image compression / expansion transmission system and method using the same
US20030103765A1 (en) MPEG recording apparatus, recording medium and transmission method
KR100826170B1 (en) Method for managing presentation time stamp in digital broadcasting receiver
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
KR100236014B1 (en) Video decoding system
US6970514B1 (en) Signal processing device, signal processing method, decoding device, decoding method and recording medium
KR20050076968A (en) Video lip-synchronization method in digital broadcasting receiver

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