CN100428798C - A digital TV decoding method and system - Google Patents
A digital TV decoding method and system Download PDFInfo
- Publication number
- CN100428798C CN100428798C CNB2006100342396A CN200610034239A CN100428798C CN 100428798 C CN100428798 C CN 100428798C CN B2006100342396 A CNB2006100342396 A CN B2006100342396A CN 200610034239 A CN200610034239 A CN 200610034239A CN 100428798 C CN100428798 C CN 100428798C
- Authority
- CN
- China
- Prior art keywords
- audio
- video
- clock reference
- program clock
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
一种涉及数字电视技术的数字电视解码方法和系统,包括如下步骤:a)从传输流中提取时间信息、帧头信息和数据信息,b)根据所述的时间信息产生相应的本地节目时钟基准,c)通过数据信息与帧头信息的比较,对本地节目时钟基准或解音频速度进行调整,控制音频和视频数据读取,该系统包括解复用模块、音频解码器、视频解码器、显示模块和数据存储器,其特征在于:还包括同步控制模块,同步控制模块根据时间信息产生相应的本地节目时钟基准,该同步控制模块与音频解码器之间信息交互控制音频的解码,且与视频解码器、显示模块之间信息交互,控制视频的显示,本发明提供了多种同步控制模式,同步控制性能好,实用性强,可靠性高。
A digital TV decoding method and system related to digital TV technology, comprising the following steps: a) extracting time information, frame header information and data information from a transport stream, b) generating a corresponding local program clock reference according to the time information , c) By comparing the data information with the frame header information, the local program clock reference or the audio speed is adjusted to control the reading of audio and video data. The system includes a demultiplexing module, an audio decoder, a video decoder, a display The module and the data memory are characterized in that: it also includes a synchronous control module, the synchronous control module generates a corresponding local program clock reference according to the time information, and the information interaction between the synchronous control module and the audio decoder controls the decoding of the audio, and is connected with the video decoding Information interaction between the device and the display module, and video display control, the present invention provides a variety of synchronous control modes, good synchronous control performance, strong practicability, and high reliability.
Description
技术领域 technical field
本发明涉及数字电视技术,尤其涉及一种数字电视解码方法和系统。The invention relates to digital TV technology, in particular to a digital TV decoding method and system.
背景技术 Background technique
数字机顶盒在音视频播放过程中经常可能因为码流出错等原因导致音视频不能同步播放,影响观看效果,所以需要进行特殊处理,控制音频或者视频播放速度,来达到理想的播放效果。如现有技术中某种HDTV视频解码器中的系统控制器,如图1所示,它包括前拆包单元1、音视频同步电路2、输入缓存器3、输入缓存控制器4、表存储器5,数据分流器6、后拆包单元7和显示控制电路8等,前拆包单元1接收PES数据输入,从中提取与系统控制器实现控制有关的视帧头信息,并将该信息送到表存储器5暂存,前拆包单元1还产生首帧读出信号送给输入缓存控制器4;前拆包单元1将基本流数据送到输入缓存器3;后拆包单元7从输入缓存器3输出的视频数据中提取核心解码器必要的解码参数,并产生快读信号给输入缓存控制器4:输入缓存器3在输入缓存控制器4的控制下接收来自前拆包单元1的基本流数据,并将视频数据输出到数据分流器6;表存储器5存储输入缓存器3中相应帧的有关信息,给输入缓存控制器4提供必要的控制信息,并把当前显示帧的信息送给音视频同步电路2与显示控制电路8;音视频同步电路2根据音频当前回放帧的PTS值与视频当前显示帧的PTS值判断解码端音/视频同步的情况,并向输入缓存控制器4提供音频超前/视频超前信号,指示其完成音/视频同步的调整;显示控制电路8根据表存储器5中将要显示帧的类型和输入缓存器3的上/下溢情况,实现对视频显示缓存器的控制,完成视频序列的重排序;数据分流器6接收来自输入缓存器3的视频数据,分流后送到核心解码器,该技术方案同步控制稳定性不高,只能调整音视频播放快慢关系,其控制模式单一,应用不够灵活。During the audio and video playback process of digital set-top boxes, the audio and video may not be played synchronously due to code stream errors and other reasons, which affects the viewing effect. Therefore, special processing is required to control the audio or video playback speed to achieve the ideal playback effect. As the system controller in a certain HDTV video decoder in the prior art, as shown in Figure 1, it includes a front
发明内容 Contents of the invention
本发明的目的在于提供一种数字电视解码方法和系统,增强数字电视的同步控制稳定性。The purpose of the present invention is to provide a digital TV decoding method and system to enhance the synchronization control stability of digital TV.
本发明所采用的数字电视解码方法,包括如下步骤:The digital television decoding method adopted in the present invention comprises the following steps:
A、从传输流TS中提取时间信息、帧头信息和数据信息;A. Extract time information, frame header information and data information from the transport stream TS;
B、根据所述的时间信息产生本地节目时钟基准PCR;B. Generate a local program clock reference PCR according to the time information;
C、通过对所述数据信息与所述帧头信息的比较,对本地节目时钟基准PCR或解音频速度进行调整,控制音频和视频数据的读取。C. By comparing the data information with the frame header information, adjust the local program clock reference PCR or audio decoding speed to control the reading of audio and video data.
在该技术方案中:In this technical scheme:
所述的步骤C中,数据信息与帧头信息的比较结果一致时产生校准信号,根据校准信号的触发对本地节目时钟基准PCR或解音频速度进行调整。In the step C, a calibration signal is generated when the comparison result between the data information and the frame header information is consistent, and the local program clock reference PCR or the de-audio speed is adjusted according to the trigger of the calibration signal.
所述的步骤B包括如下步骤:Described step B comprises the following steps:
对解复用的节目时钟基准PCR初始化;Initialize the demultiplexed program clock reference PCR;
将其装载至本地计数器中建立本地的节目时钟基准PCR。Load it into the local counter to establish the local program clock reference PCR.
所述的步骤A中,由传输流TS中提取的时间信息包括节目时钟基准PCR、音频解码时间标签DTS和视频播放时间标签PTS,所述的帧头信息包括音频帧头指针和视频帧头指针,所述的数据信息包括基本流ES。In the step A, the time information extracted from the transport stream TS includes the program clock reference PCR, the audio decoding time tag DTS and the video playback time tag PTS, and the frame header information includes the audio frame header pointer and the video frame header pointer , the data information includes elementary stream ES.
所述的步骤C包括如下步骤:Described step C comprises the steps:
C1、根据ES流指针和音频帧头指针的比较结果,对本地节目时钟基准PCR或解音频速度进行调整;C1. According to the comparison result of the ES stream pointer and the audio frame header pointer, adjust the local program clock reference PCR or the audio solution speed;
C2、根据ES流指针和视频帧头指针的比较结果,建立解码视频数据与播放时间标签PTS的对应关系;C2, according to the comparison result of ES stream pointer and video frame head pointer, establish the corresponding relation of decoded video data and playback time label PTS;
C3、在场消隐结束时刻,根据视频播放时间标签PTS与本地节目时钟基准PCR的差值,对本地节目时钟基准PCR进行调整或控制读地址信号操作。C3. At the end of field blanking, adjust the local program clock reference PCR or control the read address signal operation according to the difference between the video playback time tag PTS and the local program clock reference PCR.
所述的步骤C1包括如下步骤:Described step C1 comprises the following steps:
C1A、当音频解码器读取ES流的读指针等于音频帧头指针时,产生第一校准信号;C1A, when the audio decoder reads the read pointer of the ES stream equal to the audio frame header pointer, a first calibration signal is generated;
C1B、根据所述的第一校准信号的触发,将音频解码时间标签DTS与本地节目时钟基准PCR之差的绝对值D0与第一固定阈值T1比较,进行如下操作:C1B. According to the triggering of the first calibration signal, the absolute value D0 of the difference between the audio decoding time stamp DTS and the local program clock reference PCR is compared with the first fixed threshold T1, and the following operations are performed:
C1B1、若绝对值D0大于该阈值T1,将音频的解码时间标签DTS装载到本地节目时钟基准PCR中;C1B1, if the absolute value D0 is greater than the threshold T1, load the audio decoding time stamp DTS into the local program clock reference PCR;
C1B2、否则,不执行任何操作。C1B2. Otherwise, do not perform any operation.
所述的步骤C1包括如下步骤:Described step C1 comprises the following steps:
C1a、当音频解码器读取ES流的读指针等于音频帧头指针时,产生第一校准信号;C1a, when the audio decoder reads the read pointer of the ES stream equal to the audio frame header pointer, a first calibration signal is generated;
C1b、根据所述的第一校准信号的触发,将音频解码时间标签DTS与本地节目时钟基准PCR之差的绝对值D0与第一固定阈值T1比较,进行如下操作:C1b. According to the triggering of the first calibration signal, compare the absolute value D0 of the difference between the audio decoding time stamp DTS and the local program clock reference PCR with the first fixed threshold T1, and perform the following operations:
C1b1、若绝对值D0大于该阈值T1,根据音频解码时间标签DTS与本地节目时钟基准PCR的大小关系加快或减慢解音频速度;C1b1, if the absolute value D0 is greater than the threshold T1, speed up or slow down the audio decoding speed according to the size relationship between the audio decoding time tag DTS and the local program clock reference PCR;
C1b2、否则,不执行任何操作。C1b2. Otherwise, do nothing.
所述的步骤C2包括如下步骤:Described step C2 comprises the following steps:
C21、当视频解码器读取ES流的读指针等于视频帧头指针时,产生第二校准信号;C21, when the video decoder reads the read pointer of the ES stream and is equal to the video frame header pointer, a second calibration signal is generated;
C22、根据所述的第二校准信号的触发,进行如下操作:C22. According to the triggering of the second calibration signal, perform the following operations:
C221、若解码视频数据带有视频播放时间标签PTS,则产生“有”标志,且记录该视频播放时间标签PTS;C221, if the decoded video data has a video playback time tag PTS, then generate a "yes" sign, and record the video playback time tag PTS;
C222、否则,产生“无”标志。C222. Otherwise, generate a "none" flag.
所述的步骤C3包括如下步骤:Described step C3 comprises the following steps:
C3A、在场消隐结束时刻,将视频播放时间标签PTS与本地节目时钟基准PCR之差的绝对值P0与第二固定阈值T2比较,进行如下操作:C3A, at the end of blanking, compare the absolute value P0 of the difference between the video playback time tag PTS and the local program clock reference PCR with the second fixed threshold T2, and perform the following operations:
C3A1、若绝对值P0大于该阈值T2,控制读地址信号操作,重复显示或者跳过一帧图像。C3A1. If the absolute value P0 is greater than the threshold T2, control the read address signal operation to repeatedly display or skip a frame of images.
C3A2、否则,顺序显示图像。C3A2. Otherwise, display images sequentially.
所述的步骤C3包括如下步骤:Described step C3 comprises the following steps:
C3a、在场消隐结束时刻,将视频播放时间标签PTS与本地节目时钟基准PCR之差的绝对值P0与第二固定阈值T2比较,进行如下操作:C3a, at the end of blanking, compare the absolute value P0 of the difference between the video playback time tag PTS and the local program clock reference PCR with the second fixed threshold T2, and perform the following operations:
C3a1、若绝对值P0大于该阈值T2,将视频播放时间标签PTS装载到本地节目时钟基准PCR中;C3a1. If the absolute value P0 is greater than the threshold T2, load the video playback time tag PTS into the local program clock reference PCR;
C3a2、否则,不执行任何操作。C3a2. Otherwise, do not perform any operation.
本发明采用的数字电视解码系统,包括解复用模块、音频解码器、视频解码器和数据存储器,所述的数据存储器用于缓存音、视频数据信息,还包括同步控制模块,其中,The digital TV decoding system adopted by the present invention includes a demultiplexing module, an audio decoder, a video decoder and a data storage, and the data storage is used for buffering audio and video data information, and also includes a synchronization control module, wherein,
所述的解复用模块解析传输流TS,提取时间信息、帧头信息和数据信息,所述数据信息发送给所述数据存储器;The demultiplexing module analyzes the transport stream TS, extracts time information, frame header information and data information, and sends the data information to the data memory;
所述的音频解码器接收所述帧头信息,比较数据信息和帧头信息中的音频帧头指针,将比较结果发送给所述同步控制模块;The audio decoder receives the frame header information, compares the data information and the audio frame header pointer in the frame header information, and sends the comparison result to the synchronization control module;
所述的视频解码器接收所述帧头信息,比较数据信息和帧头信息中的视频帧头指针,将比较结果发送给所述同步控制模块;The video decoder receives the frame header information, compares the data information and the video frame header pointer in the frame header information, and sends the comparison result to the synchronization control module;
所述的同步控制模块接收所述时间信息,产生本地节目时钟基准PCR,接收所述比较结果,对本地节目时钟基准PCR或解音频速度进行调整,控制音频和视频数据读取。The synchronization control module receives the time information, generates a local program clock reference PCR, receives the comparison result, adjusts the local program clock reference PCR or the audio decoding speed, and controls the reading of audio and video data.
在该技术方案中,其中,In this technical scheme, among them,
所述的解复用模块提取的所述时间信息包括节目时钟基准PCR、音频解码时间标签DTS和视频播放时间标签PTS,并发送至同步控制模块;提取的所述帧头信息包括音频帧头指针和视频帧头指针,分别发送至音频解码器和视频解码器;提取的所述数据信息为基本流ES,发送至数据存储器进行保存。The time information extracted by the demultiplexing module includes program clock reference PCR, audio decoding time tag DTS and video playback time tag PTS, and is sent to the synchronization control module; the frame header information extracted includes audio frame header pointer and the video frame header pointer are sent to the audio decoder and the video decoder respectively; the extracted data information is the elementary stream ES, which is sent to the data memory for storage.
所述音频解码器读取ES的读指针和音频帧头指针产生第一校准信号并将其发送至同步控制模块,同步控制模块根据所述第一校准信号的触发对本地节目时钟基准PCR或解音频速度进行调整。The audio decoder reads the ES read pointer and the audio frame head pointer to generate a first calibration signal and sends it to the synchronization control module, and the synchronization control module performs a local program clock reference PCR or solution according to the triggering of the first calibration signal. Audio speed is adjusted.
所述视频解码器读取ES的读指针和视频帧头指针产生第二校准信号并将其发送至同步控制模块,同步控制模块根据所述第二校准信号的触发建立解码视频数据与播放时间标签PTS的对应关系,根据播放时间标签PTS与本地节目时钟基准PCR差值,对本地节目时钟基准PCR进行调整或控制显示模块的读地址信号操作。The video decoder reads the read pointer of the ES and the video frame head pointer to generate a second calibration signal and sends it to the synchronization control module, and the synchronization control module establishes the decoded video data and the playback time tag according to the trigger of the second calibration signal The corresponding relation of PTS adjusts the local program clock reference PCR or controls the read address signal operation of the display module according to the difference between the play time tag PTS and the local program clock reference PCR.
本发明的有益效果为:在本发明中,从传输流TS中提取时间、帧头信息和数据信息,根据时间信息产生相应的本地节目时钟基准PCR,通过数据信息与帧头信息的比较,对本地节目时钟基准PCR或解音频速度进行调整,控制音频和视频数据读取,具体来说,本发明以本地节目时钟基准PCR为桥梁,可采用三种基准控制模式:以音频为主模式、以视频为主模式和以节目时钟基准为主模式,本发明提供了多种同步控制模式,克服了现有技术中控制模式单一,应用不够灵活的缺点,增强了同步控制性能,而且,以本地节目时钟基准PCR为桥梁,使得系统灵活控制,提高了应用扩展性能,例如,可以较容易地实现加上字幕同步等。The beneficial effect of the present invention is: in the present invention, extract time, frame header information and data information from transport stream TS, generate corresponding local program clock benchmark PCR according to time information, compare data information and frame header information, to The local program clock reference PCR or audio speed is adjusted to control the reading of audio and video data. Specifically, the present invention uses the local program clock reference PCR as a bridge, and can adopt three reference control modes: audio-based mode, based on Video-based mode and program clock reference-based mode, the present invention provides a variety of synchronous control modes, which overcomes the shortcomings of single control mode and inflexible application in the prior art, and enhances the synchronous control performance. The clock reference PCR is used as a bridge, which enables flexible control of the system and improves the performance of application expansion. For example, it is easier to implement synchronization of subtitles.
本发明采用音频/视频帧头地址指针建立播放时间标签PTS或者解码时间标签DTS与帧数据(ES流)的联系,可以确保播放时间标签PTS或者解码时间标签DTS与帧数据(ES流)同步,增强了系统的同步稳定性。本发明通过采用播放时间标签PTS与帧头地址指针建立对应关系,例如对于解码视频数据带有视频播放时间标签PTS,产生“有”标志,且记录该视频播放时间标签PTS,否则,产生“无”标志,增加了播放时间标签PTS与包数据的地址指针的联系,可解决在播放时间标签PTS或解码时间标签DTS产生丢失时的同步问题,例如,当数据错误或者其他原因导致播放时间标签PTS与数据对应关系错误后,本发明能自动恢复同步状态,进一步提高了本发明的实用性和可靠性。The present invention adopts audio/video frame header address pointer to establish the link between playback time tag PTS or decoding time tag DTS and frame data (ES stream), which can ensure that playback time tag PTS or decoding time tag DTS is synchronized with frame data (ES stream), Enhanced the synchronization stability of the system. The present invention establishes a corresponding relationship by using the playback time tag PTS and the frame header address pointer. For example, for the decoded video data with the video playback time tag PTS, a "yes" flag is generated, and the video playback time tag PTS is recorded; otherwise, "no" is generated. "flag, which increases the connection between the playback time tag PTS and the address pointer of the packet data, which can solve the synchronization problem when the playback time tag PTS or the decoding time tag DTS is lost, for example, when the data error or other reasons cause the playback time tag PTS After the corresponding relationship with the data is wrong, the present invention can automatically restore the synchronization state, which further improves the practicability and reliability of the present invention.
附图说明 Description of drawings
图1为现有技术系统结构示意图;Fig. 1 is a schematic structural diagram of a prior art system;
图2本发明数字电视解码系统结构示意图;Fig. 2 is a schematic structural diagram of a digital television decoding system of the present invention;
图3为本发明数字电视解码方法基本控制流程示意图;Fig. 3 is a schematic diagram of the basic control flow of the digital television decoding method of the present invention;
图4为本发明数字电视解码方法第一实施例流程示意图;4 is a schematic flow chart of the first embodiment of the digital television decoding method of the present invention;
图5为本发明数字电视解码方法第二实施例流程示意图;Fig. 5 is a schematic flow chart of the second embodiment of the digital television decoding method of the present invention;
图6为本发明数字电视解码方法第三实施例流程示意图。FIG. 6 is a schematic flowchart of a third embodiment of a digital TV decoding method according to the present invention.
具体实施方式Detailed ways
下面根据附图和实施例对本发明作进一步详细说明:Below according to accompanying drawing and embodiment the present invention will be described in further detail:
根据图2,本发明中的数字电视解码系统包括解复用模块10、音频解码器20、视频解码器30、数据存储器40、显示模块50和同步控制模块60,在实际应用中数字电视解码系统常用的是机顶盒。According to Fig. 2, the digital television decoding system among the present invention comprises
如图2所示,所述的解复用模块10解析传输流TS,提取时间信息、帧头信息和数据信息,所提取的信息如下:As shown in Figure 2, the
时间信息:节目时钟基准PCR、音频解码时间标签DTS和视频播放时间标签PTS。Time information: program clock reference PCR, audio decoding time tag DTS and video playback time tag PTS.
帧头信息:音频帧头指针和视频帧头指针。Frame header information: audio frame header pointer and video frame header pointer.
数据信息:基本流ES。Data information: elementary stream ES.
如图2所示,其中时间信息发送至同步控制模块60;帧头信息中的音频帧头指针和视频帧头指针分别发送至音频解码器20和视频解码器30;数据信息发送至数据存储器40进行保存。As shown in Figure 2, wherein the time information is sent to the
如图2所示,音频解码器20由数据存储器40读取数据,解析音频流,产生音频数据;视频解码器30由数据存储器40读取数据,解析视频流,产生视频数据并发送。显示模块50用于显示视频解码器发送的视频数据,数据存储器40用于音、视频数据缓存,并缓存所述数据信息基本流ES。As shown in FIG. 2 , the
如图2所示,同步控制模块60根据时间信息产生相应的本地节目时钟基准PCR,该同步控制模块60与音频解码器20之间信息交互控制音频的解码,且与视频解码器30、显示模块50之间信息交互,控制视频的显示,其中数据信息与帧头信息的比较结果一致时产生校准信号,同步控制模块60根据校准信号的触发对本地节目时钟基准PCR或解音频速度进行调整,具体地,音频解码器20根据ES流指针和音频帧头指针产生第一校准信号并将其发送至同步控制模块60,同步控制模块60根据第一校准信号的触发对本地节目时钟基准PCR或解音频速度进行调整。视频解码器30根据ES流指针和视频帧头指针产生第二校准信号并将其发送至同步控制模块60,同步控制模块60根据第二校准信号的触发建立解码视频数据与播放时间标签PTS的对应关系,根据播放时间标签RTS与本地节目时钟基准PCR差值,对本地节目时钟基准PCR进行调整或控制显示模块50的读地址信号操作。As shown in Figure 2, the
如图2和如图3所示,本发明的基本控制流程如下:As shown in Figure 2 and Figure 3, the basic control flow of the present invention is as follows:
a)解复用模块10从传输流TS中提取时间、帧头信息和数据信息。a) The
b)同步控制模块60根据时间信息产生相应的本地节目时钟基准PCR。b) The
c)通过数据信息与帧头信息的比较,同步控制模块60对本地节目时钟基准PCR或解音频速度进行调整。c) By comparing the data information with the frame header information, the
d)通过数据信息与帧头信息的比较,同步控制模块60建立解码视频数据与播放时间标签PTS的对应关系。d) By comparing the data information with the frame header information, the
e)在场消隐结束时刻,同步控制模块60根据视频播放时间标签PTS与本地节目时钟基准PCR差值,对本地节目时钟基准PCR进行调整或控制显示模块50的读地址信号操作。e) At the end of field blanking, the
通过数据信息与帧头信息的比较可以这样实现:同步控制模块60轮循比较数据信息与帧头信息,当同步控制模块60比较读取ES流的读指针等于音频/视频帧头指针相等时,同时对所述后续信号进行调整。而较佳的实施方式是:当读取ES流的读指针等于音频/视频帧头指针时产生校准信号,发送给同步控制模块60,根据校准信号的触发对所述后续信号进行调整。Can realize like this by the comparison of data information and frame header information:
本发明采用音频/视频帧头地址指针建立播放时间标签PTS或者解码时间标签DTS与帧数据(ES流)的联系,可以确保播放时间标签PTS或者解码时间标签DTS与帧数据(ES流)同步,增强了系统的同步稳定性。The present invention adopts audio/video frame header address pointer to establish the link between playback time tag PTS or decoding time tag DTS and frame data (ES stream), which can ensure that playback time tag PTS or decoding time tag DTS is synchronized with frame data (ES stream), Enhanced the synchronization stability of the system.
如图2和图4所示,本发明所述的数字电视解码方法第一种(以音频为主模式)具体控制流程如下:As shown in Fig. 2 and Fig. 4, the specific control flow of the first (main mode with audio frequency) of the digital television decoding method of the present invention is as follows:
1.解复用模块10从传输流TS中提取时间、帧头信息和数据信息,具体地,时间信息包括节目时钟基准PCR、音频解码时间标签DTS和视频播放时间标签PTS;帧头信息包括音频帧头指针和视频帧头指针;数据信息为基本流ES(即ES流)。解复用模块10将时间信息、帧头信息、数据信息分别发送至同步控制模块60、音频解码器20和视频解码器30、数据存储器40。1. The
2.同步控制模块60对解复用的节目时钟基准PCR初始化。2. The
3.同步控制模块60将其装载至本地27M计数器中建立本地节目时钟基准PCR。3. The
4.音频解码器20读取数据存储器40中的ES流,当读取ES流的读指针等于音频帧头指针时,产生第一校准信号并将其发送至同步控制模块60。4. The
5.同步控制模块60接收第一校准信号,第一校准信号作为触发脉冲,触发比较音频解码时间标签DTS与本地节目时钟基准PCR之差的绝对值D0与第一固定阈值T1,进行如下操作:5. The
51.若绝对值D0大于该阈值T1,将音频的解码时间标签DTS装载到本地节目时钟基准PCR中,继续如下步骤6。51. If the absolute value D0 is greater than the threshold T1, load the audio decoding time stamp DTS into the local program clock reference PCR, and proceed to step 6 as follows.
52.否则,不执行任何操作,继续如下步骤6。52. Otherwise, do not perform any operation and continue to step 6 below.
6.视频解码器30读取ES流,当读指针等于视频帧头指针时,产生第二校准信号并将其发送至同步控制模块60。6. The
7.同步控制模块60接收第二校准信号,第二校准信号作为触发脉冲,触发进行如下操作:7. The
71.若解码视频数据带有视频播放时间标签PTS,则产生“有”标志,且记录该视频播放时间标签PTS,继续如下步骤8。71. If the decoded video data has a video playback time tag PTS, generate a "yes" flag, and record the video playback time tag PTS, and proceed to step 8 below.
72.否则,产生“无”标志,继续如下步骤8。72. Otherwise, generate a "none" flag and proceed to step 8 below.
8.显示模块50在场消隐结束时刻向同步控制模块60发送结束信号,同步控制模块60将视频播放时间标签PTS与本地节目时钟基准PCR之差的绝对值P0与第二固定阈值T2比较,进行如下操作:8. The
81.若绝对值P0大于该阈值T2,控制显示模块50读地址信号操作,使显示模块50重复显示或者跳过一帧图像。81. If the absolute value P0 is greater than the threshold T2, control the
82.否则,不执行特殊操作,使显示模块50顺序显示图像。82. Otherwise, no special operation is performed, and the
本实施例通过采用播放时间标签PTS与帧头地址指针建立对应关系,例如对于解码视频数据带有视频播放时间标签PTS,产生“有”标志,且记录该视频播放时间标签PTS,否则,产生“无”标志,增加了播放时间标签PTS与包数据的地址指针的联系,可解决在播放时间标签PTS或解码时间标签DTS产生丢失时的同步问题,例如,当数据错误或者其他原因导致播放时间标签PTS与数据对应关系错误后,本实施例能自动恢复同步状态,进一步提高了本发明的实用性和可靠性。This embodiment establishes a corresponding relationship by using the playback time tag PTS and the frame header address pointer. For example, for the decoded video data with the video playback time tag PTS, a "yes" flag is generated, and the video playback time tag PTS is recorded; otherwise, a "" is generated. "None" mark, increase the connection between the playback time tag PTS and the address pointer of the packet data, which can solve the synchronization problem when the playback time tag PTS or decoding time tag DTS is lost, for example, when the data error or other reasons cause the playback time tag After the corresponding relationship between PTS and data is wrong, this embodiment can automatically restore the synchronization state, which further improves the practicability and reliability of the present invention.
如图2和图5所示,本发明所述的数字电视解码方法第二种(以视频为主模式)具体控制流程如下:As shown in Fig. 2 and Fig. 5, the specific control flow of the second (based on video mode) of the digital television decoding method of the present invention is as follows:
1)解复用模块10从传输流TS中提取时间、帧头信息和数据信息,具体地,时间信息包括节目时钟基准PCR、音频解码时间标签DTS和视频播放时间标签PTS;帧头信息包括音频帧头指针和视频帧头指针;数据信息为基本流ES(即ES流)。解复用模块10将时间信息、帧头信息、数据信息分别发送至同步控制模块60、音频解码器20、视频解码器30、数据存储器40。1) The
2)同步控制模块60对解复用的节目时钟基准PCR初始化。2) The
3)同步控制模块60将其装载至本地27M计数器中建立本地节目时钟基准PCR。3) The
4)音频解码器20读取数据存储器40中的ES流,当读取ES流的读指针等于音频帧头指针时,产生第一校准信号并将其发送至同步控制模块60。4) The
5)同步控制模块60接收该第一校准信号,第一校准信号作为触发脉冲,触发比较音频解码时间标签DTS与本地节目时钟基准PCR之差的绝对值D0与第一固定阈值T1,进行如下操作:5) The
51)若绝对值D0大于该阈值T1,根据音频解码时间标签DTS与本地节目时钟基准PCR的大小关系加快或减慢解音频速度,即当DTS>PCR,减慢解音频速度,当DTS<PCR,加快解音频速度,继续如下步骤6)。51) If the absolute value D0 is greater than the threshold T1, speed up or slow down the audio decoding speed according to the size relationship between the audio decoding time tag DTS and the local program clock reference PCR, that is, when DTS>PCR, slow down the audio decoding speed, and when DTS<PCR , speed up the audio solution, and continue to the following step 6).
52)否则,不执行任何操作,继续如下步骤6)。52) Otherwise, do not perform any operation, and continue to the following step 6).
6)视频解码器30读取ES流,当读指针等于视频帧头指针时,产生第二校准信号并将其发送至同步控制模块60。6) The
7)同步控制模块60接收第二校准信号,第二校准信号作为触发脉冲,触发进行如下操作:7) The
71)若解码视频数据带有视频播放时间标签PTS,则产生“有”标志,且记录该视频播放时间标签PTS,继续如下步骤8)。71) If the decoded video data has a video playback time tag PTS, then generate a "yes" flag, and record the video playback time tag PTS, continue to the following step 8).
72)否则,产生“无”标志,继续如下步骤8)。72) Otherwise, generate a "none" flag and proceed to step 8) below.
8)显示模块50在场消隐结束时刻向同步控制模块60发送结束信号,同步控制模块60将视频播放时间标签PTS与本地节目时钟基准PCR之差的绝对值P0与第二固定阈值T2比较,进行如下操作:8) The
81)若绝对值P0大于该阈值T2,将视频播放时间标签PTS装载到本地节目时钟基准PCR中。81) If the absolute value P0 is greater than the threshold T2, load the video playback time tag PTS into the local program clock reference PCR.
82)否则,不执行任何操作。82) Otherwise, do nothing.
如图2和图6所示,本发明所述的数字电视解码方法第三种(以节目时钟基准为主模式)具体控制流程如下:As shown in Fig. 2 and Fig. 6, the third (based on the program clock reference mode) specific control flow of the digital television decoding method of the present invention is as follows:
I.解复用模块10从传输流TS中提取时间、帧头信息和数据信息,具体地,时间信息包括节目时钟基准PCR、音频解码时间标签DTS和视频播放时间标签PTS;帧头信息包括音频帧头指针和视频帧头指针;数据信息为基本流ES(即ES流)。解复用模块10将时间信息、帧头信息、数据信息分别发送至同步控制模块60、音频解码器20、视频解码器30、数据存储器40。I. The
II.同步控制模块60对解复用的节目时钟基准PCR初始化。II. The
III.同步控制模块60将其装载至本地27M计数器中建立本地节目时钟基准PCR。III. The
IV.音频解码器20读取数据存储器40中的ES流,当读取ES流的读指针等于音频帧头指针时,产生第一校准信号并将其发送至同步控制模块60。IV. The
V.同步控制模块60接收该第一校准信号,第一校准信号作为触发脉冲,触发比较音频解码时间标签DTS与本地节目时钟基准PCR之差的绝对值D0与第一固定阈值T1,进行如下操作:V. The
V1.若绝对值D0大于该阈值T1,根据音频解码时间标签DTS与本地节目时钟基准PCR的大小关系加快或减慢解音频速度,继续如下步骤VI。V1. If the absolute value D0 is greater than the threshold T1, speed up or slow down the audio decoding speed according to the size relationship between the audio decoding time tag DTS and the local program clock reference PCR, and continue with the following step VI.
V2.否则,不执行任何操作,继续如下步骤VI。V2. Otherwise, do not perform any operation and continue to the following step VI.
VI.视频解码器30读取ES流,当读指针等于视频帧头指针时,产生第二校准信号并将其发送至同步控制模块60。VI. The
VII.同步控制模块60接收第二校准信号,第二校准信号作为触发脉冲,触发进行如下操作:VII. The
VII1.若解码视频数据带有视频播放时间标签PTS,则产生“有”标志,且记录该视频播放时间标签PTS,继续如下步骤VIII。VII1. If the decoded video data has a video playback time tag PTS, then generate a "yes" flag, and record the video playback time tag PTS, continue to the following step VIII.
VII2.否则,产生“无”标志,继续如下步骤VIII。VII2. Otherwise, generate a "none" flag and proceed to step VIII below.
VIII.显示模块50在场消隐结束时刻向同步控制模块60发送结束信号,同步控制模块60将视频播放时间标签PTS与本地节目时钟基准PCR之差的绝对值P0与第二固定阈值T2比较,进行如下操作:VIII. The
VIII1.若绝对值P0大于该阈值T2,控制显示模块50读地址信号操作,使显示模块50重复显示或者跳过一帧图像。VIII1. If the absolute value P0 is greater than the threshold T2, control the
VIII2.否则,不执行特殊操作,使显示模块50顺序显示图像。VIII2. Otherwise, no special operation is performed, and the
通过上述控制流程,本发明从传输流TS中提取时间、帧头信息和数据信息,根据其中的时间信息产生相应的本地节目时钟基准PCR,通过数据信息与帧头信息的比较,对本地节目时钟基准PCR或解音频速度进行调整,控制音频和视频数据读取。具体来说,本发明以本地节目时钟基准PCR为桥梁,可采用三种基准控制模式:以音频为主模式、以视频为主模式和以节目时钟基准为主模式,本发明提供了多种同步控制模式,克服了现有技术中控制模式单一,应用不够灵活的缺点,而且,以本地节目时钟基准PCR为桥梁,使得系统灵活控制,提高了应用扩展性能,例如,可以较容易地实现加上字幕同步等。Through the above control process, the present invention extracts time, frame header information and data information from the transport stream TS, generates the corresponding local program clock reference PCR according to the time information therein, and compares the local program clock by comparing the data information with the frame header information. Baseline PCR or solution audio speed is adjusted to control audio and video data reading. Specifically, the present invention takes the local program clock reference PCR as a bridge, and can adopt three reference control modes: audio-based mode, video-based mode, and program clock reference-based mode. The present invention provides a variety of synchronous The control mode overcomes the shortcomings of single control mode and inflexible application in the prior art, and uses the local program clock reference PCR as a bridge to make the system flexible control and improve the application expansion performance. Subtitle synchronization, etc.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100342396A CN100428798C (en) | 2006-03-07 | 2006-03-07 | A digital TV decoding method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006100342396A CN100428798C (en) | 2006-03-07 | 2006-03-07 | A digital TV decoding method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1859567A CN1859567A (en) | 2006-11-08 |
CN100428798C true CN100428798C (en) | 2008-10-22 |
Family
ID=37298423
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006100342396A Expired - Fee Related CN100428798C (en) | 2006-03-07 | 2006-03-07 | A digital TV decoding method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100428798C (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101808239A (en) * | 2010-03-01 | 2010-08-18 | 北京东方广视科技股份有限公司 | Method for controlling TS flow broadcasting and device |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101137066B (en) * | 2007-05-11 | 2011-01-05 | 中兴通讯股份有限公司 | Multimedia data flow synchronous control method and device |
JP2009077192A (en) * | 2007-09-21 | 2009-04-09 | Sony Corp | Receiver, and image output control method of receiver |
CN101202919B (en) * | 2007-11-06 | 2011-05-11 | 深圳市同洲电子股份有限公司 | Digital television receiver and intermediate part |
CN101272193B (en) * | 2008-05-14 | 2010-06-16 | 中兴通讯股份有限公司 | Method and device for maintaining network time and timing broadcast method |
CN101540871B (en) | 2009-04-27 | 2011-05-11 | 中兴通讯股份有限公司 | Method and terminal for synchronously recording sounds and images of opposite ends based on circuit domain video telephone |
CN102630058B (en) * | 2012-03-23 | 2016-02-17 | 深圳创维数字技术有限公司 | The management method of Media Stream and device in a kind of buffering area |
CN104822008B (en) * | 2014-04-25 | 2019-01-08 | 腾讯科技(北京)有限公司 | video synchronization method and device |
US10013229B2 (en) * | 2015-04-30 | 2018-07-03 | Intel Corporation | Signal synchronization and latency jitter compensation for audio transmission systems |
CN112887772A (en) * | 2017-03-14 | 2021-06-01 | 上海兆芯集成电路有限公司 | Audio synchronization method for video streaming |
CN107277295B (en) * | 2017-06-22 | 2019-10-18 | 北京数码视讯科技股份有限公司 | Video synchronization processing device and method |
CN107452409B (en) * | 2017-08-16 | 2024-04-26 | 柳州桂通科技股份有限公司 | Information recording method, apparatus, system, storage medium, and processor |
CN108965990B (en) * | 2018-07-20 | 2020-11-17 | 广州酷狗计算机科技有限公司 | Method and device for controlling movement of sound altitude line |
CN112261445B (en) * | 2020-10-21 | 2022-07-12 | 深圳市创维软件有限公司 | Streaming media playing method, device, equipment and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1175854A (en) * | 1996-08-19 | 1998-03-11 | 松下电器产业株式会社 | Synchronous reproduction apparatus |
US6148135A (en) * | 1996-01-29 | 2000-11-14 | Mitsubishi Denki Kabushiki Kaisha | Video and audio reproducing device and video decoding device |
CN1588988A (en) * | 2004-07-29 | 2005-03-02 | 联合信源数字音视频技术(北京)有限公司 | Synchronous control device and control method for video elecoding and display |
-
2006
- 2006-03-07 CN CNB2006100342396A patent/CN100428798C/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6148135A (en) * | 1996-01-29 | 2000-11-14 | Mitsubishi Denki Kabushiki Kaisha | Video and audio reproducing device and video decoding device |
CN1175854A (en) * | 1996-08-19 | 1998-03-11 | 松下电器产业株式会社 | Synchronous reproduction apparatus |
CN1588988A (en) * | 2004-07-29 | 2005-03-02 | 联合信源数字音视频技术(北京)有限公司 | Synchronous control device and control method for video elecoding and display |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101808239A (en) * | 2010-03-01 | 2010-08-18 | 北京东方广视科技股份有限公司 | Method for controlling TS flow broadcasting and device |
Also Published As
Publication number | Publication date |
---|---|
CN1859567A (en) | 2006-11-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100428798C (en) | A digital TV decoding method and system | |
US6262775B1 (en) | Caption data processing circuit and method therefor | |
KR100308704B1 (en) | Multiplexed data producing apparatus, encoded data reproducing apparatus, clock conversion apparatus, encoded data recording medium, encoded data transmission medium, multiplexed data producing method, encoded data reproducing method, and clock conversion method | |
US8620134B2 (en) | Video and audio reproducing apparatus and video and audio reproducing method for reproducing video images and sound based on video and audio streams | |
US10129587B2 (en) | Fast switching of synchronized media using time-stamp management | |
KR100981378B1 (en) | Devices and methods for read-synchronization of video data and auxiliary data, and related products | |
US8750389B2 (en) | Video data decoder and method for decoding video data | |
KR100604831B1 (en) | Audio / video playback device and method for synchronizing additional video and text with audio | |
US8238446B2 (en) | Method and apparatus for reproducing digital broadcasting | |
JPH10262208A (en) | Step-out controller and step-out control method | |
JP2872104B2 (en) | Time stamp adding apparatus and method, and moving image compression / expansion transmission system and method using the same | |
JPH11205789A (en) | Transmission rate converter of mpeg2 transport stream | |
TW200829009A (en) | Playback system capable of synchronizing playback of video signal and playback of audio signal and method thereof | |
KR20080089721A (en) | Audio / Video Synchronization Method | |
US20080310647A1 (en) | Audio stream processing method, playback apparatus, and output apparatus | |
US20060257108A1 (en) | Multimedia reproduction apparatus | |
JP6742515B2 (en) | CODED VIDEO REPRODUCTION DEVICE AND CODED VIDEO REPRODUCTION METHOD | |
JP2003348543A (en) | Data decoder and data decoding method | |
JP2001231035A (en) | Decoding synchronous controller, decoder, and decode synchronization control method | |
JP2004072618A (en) | Image reproduction system | |
JP2009218934A (en) | Video reproducing device and video reproducing method | |
EP1148723B1 (en) | Special reproduction data generating device, medium, and information aggregate | |
KR100539731B1 (en) | Transport stream storage device and method | |
JP2001069467A (en) | Data reproduction device | |
JP6977707B2 (en) | Information processing equipment, information processing methods, and programs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20081022 |