CN103179434B - Package receiver and method for processing packet thereof - Google Patents
Package receiver and method for processing packet thereof Download PDFInfo
- Publication number
- CN103179434B CN103179434B CN201110434781.1A CN201110434781A CN103179434B CN 103179434 B CN103179434 B CN 103179434B CN 201110434781 A CN201110434781 A CN 201110434781A CN 103179434 B CN103179434 B CN 103179434B
- Authority
- CN
- China
- Prior art keywords
- packet
- count value
- bit rate
- generate
- timestamp
- 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
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明所提供的封包处理方法应用于封包接收器。一概略比特率首先根据两个封包各自的时间戳印被决定。随后,根据至少另一封包的时间戳印,该概略比特率被修正,以产生一微调后比特率。该微调后比特率被用以做为自一暂存器读取一个或多个后续封包的参考依据。该另一封包的时间戳印根据该概略比特率被提供。
The packet processing method provided by the present invention is applied to a packet receiver. An approximate bit rate is first determined based on the respective timestamps of the two packets. Then, based on the timestamp of at least one other packet, the approximate bit rate is revised to generate a fine-tuned bit rate. The fine-tuned bit rate is used as a reference for reading one or more subsequent packets from a register. The timestamp of the other packet is provided according to the approximate bit rate.
Description
技术领域 technical field
本发明与无线传输技术相关,并且尤其与根据时间标记决定封包输出速率的技术相关。The present invention is related to wireless transmission technology, and especially related to the technology of determining the packet output rate according to the time stamp.
背景技术 Background technique
随着通信技术的进步,数位电视广播的发展渐趋成熟。第二代欧规数位电视地面广播(digitalvideebroadcasting-secondgenerationterrestrial,DVB-T2)是目前该领域最为广泛采用的标准,其中的视频编码方式包含MPE6-2、H.264/MPEG-4AVC和AVS等三种。图1为采用MPE6-2规格的DVB-T2无线发送端/接收端相对关系示意图。With the advancement of communication technology, the development of digital TV broadcasting is becoming more and more mature. Digital video broadcasting-second generation terrestrial (DVB-T2) is currently the most widely used standard in this field, and the video encoding methods include MPE6-2, H.264/MPEG-4AVC and AVS. . Figure 1 is a schematic diagram of the relative relationship between the DVB-T2 wireless transmitter/receiver using the MPE6-2 specification.
发送器10包含编码器12和调制器14;接收器20包含解码器22、解调器24和暂存器26。于此范例中,编码器12负责将分别对应于三个不同节目频道的数据编码,产生三个传送流(transferstream,TS)TS0、TS1、TS2。每个传送流各自包含多个封包。如图1所示,调制器14将这些传送流拆解成数据流data_PLP0、data_PLP1、data_PLP2和common_PLP。数据流common_PLP是由传送流TS0、TS1、TS2共同的数据封包组成,数据流data_PLP0、data_PLP1、data_PLP2则分别包含传送流TS0-TS2除了共同数据封包和空封包(nullpacket)之外的数据封包。将共同封包集合在数据流common_PLP,可节省重复传送相同封包耗用的频宽。Transmitter 10 includes encoder 12 and modulator 14 ; receiver 20 includes decoder 22 , demodulator 24 and register 26 . In this example, the encoder 12 is responsible for encoding data respectively corresponding to three different program channels to generate three transport streams (transferstream, TS) TS0, TS1, and TS2. Each Transport Stream contains multiple packets each. As shown in Figure 1, the modulator 14 unpacks these transport streams into data streams data_PLP0, data_PLP1, data_PLP2 and common_PLP. The data stream common_PLP is composed of the common data packets of the transport streams TS0, TS1, and TS2, and the data streams data_PLP0, data_PLP1, and data_PLP2 respectively include the data packets of the transport streams TS0-TS2 except the common data packets and null packets. Aggregating the common packets in the data stream common_PLP can save the bandwidth consumed by repeatedly transmitting the same packets.
为了协助接收器20正确还原传送流,发送器10在产生数据封包时,会选择性地在每个或某些封包中分别记载一个输入流参考时间(inputstreamtimereference,ISCR)值。实务上,调制器14中可设有一持续计数的计数器。在每次收到由编码器12传来的封包时,调制器14便将计数器当时的计数值写入该封包的ISCR栏位。In order to assist the receiver 20 to restore the transport stream correctly, the sender 10 will selectively record an input stream time reference (ISCR) value in each or some of the packets when generating the data packets. In practice, the modulator 14 may be provided with a counter that keeps counting. Every time a packet transmitted from the encoder 12 is received, the modulator 14 writes the current count value of the counter into the ISCR field of the packet.
假设接收器20的使用者选择观看传送流TS0对应的节目频道,解调器24会结合数据流data_PLP0和common_PLP,以产生还原后的传送流TS0’,再将传送流TS0’交由解码器22解码。如图1所示,经解调后的数据封包会先被储存于暂存器26中。接收器20必须根据这些封包中记录的ISCR值,决定自暂存器26读取封包的比特率(bitrate),才能正确重建传送流TS0’。Assuming that the user of the receiver 20 chooses to watch the program channel corresponding to the transport stream TS0, the demodulator 24 will combine the data streams data_PLP0 and common_PLP to generate the restored transport stream TS0', and then deliver the transport stream TS0' to the decoder 22 decoding. As shown in FIG. 1 , the demodulated data packets are first stored in the register 26 . The receiver 20 must determine the bit rate for reading packets from the register 26 according to the ISCR values recorded in these packets, so as to correctly reconstruct the transport stream TS0'.
发明内容 Contents of the invention
为满足上述需求,本发明提出一种根据封包的时间戳印(timestamp)决定封包读取率的电路架构及封包处理方法。除了根据较前端的封包的时间戳印决定一概略比特率,后续封包的时间戳印亦可被用以持续修正封包读取率,以提升封包读取率的正确性。本发明提出的概念可应用在各种需要根据时间戳印决定封包读取率的情况,不以采用MPEG-2规格的DVB-T2接收系统为限。In order to meet the above requirements, the present invention proposes a circuit architecture and a packet processing method for determining a packet reading rate according to a timestamp of the packet. In addition to determining an approximate bit rate based on the timestamp of the earlier packet, the timestamp of the subsequent packet can also be used to continuously correct the packet reading rate, so as to improve the accuracy of the packet reading rate. The concept proposed by the present invention can be applied to various situations where the packet reading rate needs to be determined according to the time stamp, not limited to the DVB-T2 receiving system adopting the MPEG-2 standard.
根据本发明的一具体实施例为一种应用于一封包接收器的封包处理方法。首先,一概略比特率根据一第一封包的一第一时间戳印及一第二封包的一第二时间戳印被决定。根据至少一第三封包的一第三时间戳印,该概略比特率被修正,以产生一微调后比特率。随后,根据该微调后比特率,一第四封包被读取。其中,该第二封包接续于该第一封包,该第三封包接续于该第二封包,以及该第四封包接续于该第三封包。A specific embodiment according to the present invention is a packet processing method applied to a packet receiver. First, an approximate bit rate is determined according to a first timestamp of a first packet and a second timestamp of a second packet. Based on a third timestamp of at least a third packet, the approximate bit rate is revised to generate a fine-tuned bit rate. Then, according to the fine-tuned bit rate, a fourth packet is read. Wherein, the second packet is continuous with the first packet, the third packet is continuous with the second packet, and the fourth packet is continuous with the third packet.
根据本发明的另一具体实施例为一封包接收器,其中包含一暂存器、一粗估模块、一微调模块及一控制模块。该暂存器用以暂存至少一封包。该粗估模块用以根据一第一封包的一第一时间戳印及一第二封包的一第二时间戳印决定一概略比特率。该微调模块用以根据至少一第三封包的一第三时间戳印修正该概略比特率,以产生一微调后比特率。该控制模块用以根据该微调后比特率控制该暂存器输出一第四封包。其中,该第二封包接续于该第一封包,该第三封包接续于该第二封包,以及该第四封包接续于该第三封包。Another specific embodiment according to the present invention is a packet receiver, which includes a register, a rough estimation module, a fine adjustment module and a control module. The register is used to temporarily store at least one packet. The rough estimation module is used for determining an approximate bit rate according to a first timestamp of a first packet and a second timestamp of a second packet. The fine-tuning module is used for correcting the approximate bit rate according to a third timestamp of at least one third packet, so as to generate a fine-tuned bit rate. The control module is used for controlling the register to output a fourth packet according to the fine-tuned bit rate. Wherein, the second packet is continuous with the first packet, the third packet is continuous with the second packet, and the fourth packet is continuous with the third packet.
关于本发明的优点与精神可以藉由以下发明详述及附图得到进一步的了解。The advantages and spirit of the present invention can be further understood through the following detailed description of the invention and the accompanying drawings.
附图说明 Description of drawings
图1为采用MPEG-2规格的DVB-T2无线发送端/接收端相对关系示意图。Figure 1 is a schematic diagram of the relative relationship between the DVB-T2 wireless transmitter/receiver using the MPEG-2 standard.
图2为根据本发明的一具体实施例中的封包接收器的电路方块图。FIG. 2 is a circuit block diagram of a packet receiver according to an embodiment of the present invention.
图3绘示了一封包相对关系范例。Figure 3 shows an example of relative relationship among packets.
图4(A)用以表示微调模块的一种详细实施范例;图4(B)用以表示差异检测单元的一种详细实施范例。FIG. 4(A) is used to show a detailed implementation example of the fine-tuning module; FIG. 4(B) is used to show a detailed implementation example of the difference detection unit.
图5(A)及图5(B)为表示修正单元的两种详细实施范例。FIG. 5(A) and FIG. 5(B) show two detailed implementation examples of the correction unit.
图6为根据本发明的封包接收器的一种详细电路关系范例。FIG. 6 is an example of a detailed circuit relationship of the packet receiver according to the present invention.
图7为中间计数值与控制信号相对于时间的图例。Figure 7 is a graphical illustration of intermediate count values and control signals versus time.
图8和图9为根据本发明的一具体实施例中的封包处理方法的流程图。8 and 9 are flowcharts of a packet processing method according to a specific embodiment of the present invention.
主要元件符号说明Description of main component symbols
10:发送器12:编码器10: Transmitter 12: Encoder
14:调制器20:接收器14: Modulator 20: Receiver
22:解码器24:解调器22: Decoder 24: Demodulator
26:暂存器TS0-TS2:传送流26: Scratchpad TS0-TS2: Transport Stream
data_PLP0、data_PLP1、data_PLP2、common_PLP:数据流data_PLP0, data_PLP1, data_PLP2, common_PLP: data flow
300:封包接收器32:暂存器300: packet receiver 32: register
34:粗估模块36:微调模块34: Rough estimation module 36: Fine-tuning module
38:控制模块P1、P2、P3:封包38: Control module P1, P2, P3: packet
362:差异检测单元364:修正单元362: Difference detection unit 364: Correction unit
362A:第一计数器362B:减法器362A: first counter 362B: subtractor
364A:第一乘法器364B:积分器364A: first multiplier 364B: integrator
364C:加法器364D:第二乘法器364C: adder 364D: second multiplier
364E:加法器32A:第一储存单元364E: adder 32A: first storage unit
32B:第二储存单元S82-S86:流程步骤32B: second storage unit S82-S86: process steps
S84A-S84C:流程步骤S86A-S86E:流程步骤S84A-S84C: process steps S86A-S86E: process steps
具体实施方式 detailed description
根据本发明的一具体实施例为如图2所示的封包接收器300,其中包含暂存器32、粗估模块34、微调模块36及控制模块38。以下说明将以封包接收器300位于DVB-T2数位电视广播接收端内的情况为例,但不以此为限。于此范例中,暂存器32用以暂存某个传送流(transportstream,TS)中经解调后的原始封包,其中的部份或全部封包中记录有输入流参考时间(inputstreamtimereference,ISCR)值,也就是带有传送端提供的参考时间戳印(timestamp)。粗估模块34、微调模块36和控制模块38的主要工作是根据这些时间戳印决定一微调后比特率,做为暂存器32后续输出数据封包的参考依据。A specific embodiment according to the present invention is a packet receiver 300 as shown in FIG. 2 , which includes a register 32 , a rough estimation module 34 , a fine-tuning module 36 and a control module 38 . The following description will take the case where the packet receiver 300 is located in the DVB-T2 digital TV broadcast receiving end as an example, but not limited thereto. In this example, the temporary register 32 is used to temporarily store demodulated original packets in a certain transport stream (transportstream, TS), in which part or all of the packets are recorded with an input stream time reference (ISCR) Value, that is, with the reference timestamp provided by the sender (timestamp). The main work of the rough estimation module 34 , the fine-tuning module 36 and the control module 38 is to determine a fine-tuned bit rate according to these time stamps, as a reference for the subsequent output data packets of the register 32 .
粗估模块34负责根据封包接收器300较早收到的封包先估计一个概略比特率。实务上,传送端负责产生ISCR值的计数器的一工作周期T为已知。粗估模块34即以工作周期T为单位计算概略比特率。如图3所示,假设前后两个直接相邻的第一封包P1及第二封包P2的ISCR值分别为100和300,表示暂存器32输出封包P2的时间点与输出封包P1的时间点应该相隔200个工作周期T。粗估模块34进一步考量ISCR被读取的两封包之间间隔的封包数,以求得封包被读取的速率。举例而言,若封包P1、P2之间另有四个空封包(nullpacket)或未带有ISCR值的数据封包,则该概略比特率为[(300-100)*T]/5的倒数,也就是1/(40*T)。粗估模块34可利用上述概念根据两个封包的ISCR值推断一个概略比特率。须说明的是,封包P1、P2之间或封包P2、P3之间都可能存在其他封包,也可能为相邻的两个封包。The rough estimation module 34 is responsible for estimating a rough bit rate based on the packets received earlier by the packet receiver 300 . In practice, a duty cycle T of the counter responsible for generating the ISCR value at the transmitting end is known. The rough estimation module 34 calculates the approximate bit rate in units of duty cycle T. As shown in FIG. 3 , assuming that the ISCR values of the first and second packets P1 and P2 directly adjacent to each other are 100 and 300 respectively, it means that the time point when the register 32 outputs the packet P2 and the time point when the packet P1 is output It should be 200 duty cycles T apart. The rough estimation module 34 further considers the number of packets between two ISCR read packets to obtain the packet read rate. For example, if there are four nullpackets or data packets without ISCR values between the packets P1 and P2, the approximate bit rate is the reciprocal of [(300-100)*T]/5, That is 1/(40*T). The coarse estimation module 34 can use the above concept to infer an approximate bit rate based on the ISCR values of the two packets. It should be noted that there may be other packets between the packets P1 and P2 or between the packets P2 and P3, or two adjacent packets.
实际上,仅根据两笔ISCR值决定的概略比特率可能有误差。比方说,传送端负责产生ISCR值的计数器的计数值通常都是整数,但实际上两封包的时间间隔未必刚好为工作周期T的整数倍。因此,根据上述方式估算的概略比特率不会是完全正确的比特率。若仅依照该概略比特率自暂存器32输出后续封包,错误偏差会愈累积愈大。举例而言,假设该概略比特率表示两封包的输出时间间隔为10T,但正确的时间间隔实为10.1T,则在根据该概略比特率输出10个封包之后,输出时间的错误会累积达到1T。易言之,第11个封包被暂存器32输出的时间会快于正确时间1T。In fact, the approximate bit rate determined only based on the two ISCR values may have errors. For example, the count value of the counter responsible for generating the ISCR value at the transmitting end is usually an integer, but in fact the time interval between two packets may not be exactly an integer multiple of the duty cycle T. Therefore, the approximate bit rate estimated in the above way will not be the exact bit rate. If the subsequent packets are output from the register 32 only according to the approximate bit rate, the error deviation will accumulate and become larger. For example, suppose the approximate bit rate indicates that the output time interval between two packets is 10T, but the correct time interval is actually 10.1T, then after outputting 10 packets according to the approximate bit rate, the output time error will accumulate to 1T . In other words, the time when the eleventh packet is output by the register 32 will be faster than the correct time 1T.
如图2所示,粗估模块34所产生的概略比特率会被传送至微调模块36。微调模块36用以根据至少一其他封包(例如图3中的第三封包P3)所带有的ISCR值修正该概略比特率,以产生一微调后比特率。图4(A)显示了微调模块36的一种详细实施范例,说明如下。As shown in FIG. 2 , the approximate bit rate generated by the coarse estimation module 34 is sent to the fine adjustment module 36 . The fine-tuning module 36 is used for modifying the approximate bit rate according to the ISCR value carried by at least one other packet (eg, the third packet P3 in FIG. 3 ), so as to generate a fine-tuned bit rate. FIG. 4(A) shows a detailed implementation example of the fine-tuning module 36, which is described as follows.
此范例中的微调模块36包含差异检测单元362及修正单元364,其中,封包P3及其ISCR值原本储存于暂存器32内。如图4(A)所示,粗估模块34根据封包P1、P2的ISCR值产生的概略比特率被提供至修正单元364,修正单元364并提供微调后比特率至控制模块38,供控制模块38决定将封包P3的ISCR值提供至差异检测单元362的时间。应注意的是,在未产生比特率修正量之前,修正单元364直接将该概略比特率提供给控制模块38。在产生比特率修正量之后,修正单元364则是将微调后比特率提供给控制模块38。就图3的范例而言,该概略比特率为1/(200*T)。因此,在未有微调后比特率产生前,控制模块38在封包P2被暂存器32输出后计数长度为200*T的时间点,控制暂存器32将封包P3的ISCR值提供至差异检测单元362。根据该概略比特率推算,封包P3的ISCR值为封包P2的ISCR值300再加上200,也就是500。The fine-tuning module 36 in this example includes a difference detection unit 362 and a correction unit 364 , wherein the packet P3 and its ISCR value are originally stored in the register 32 . As shown in FIG. 4(A), the approximate bit rate generated by the rough estimation module 34 according to the ISCR values of the packets P1 and P2 is provided to the correction unit 364, and the correction unit 364 also provides the fine-tuned bit rate to the control module 38 for the control module 38 The time to provide the ISCR value of the packet P3 to the difference detection unit 362 is determined. It should be noted that before generating the bit rate correction amount, the correction unit 364 directly provides the approximate bit rate to the control module 38 . After generating the bit rate correction amount, the correction unit 364 provides the fine-tuned bit rate to the control module 38 . For the example of FIG. 3, the approximate bit rate is 1/(200*T). Therefore, before the fine-tuned bit rate is generated, the control module 38 controls the register 32 to provide the ISCR value of the packet P3 to the difference detection at the time point when the count length is 200*T after the packet P2 is output by the register 32 Unit 362. According to the approximate bit rate calculation, the ISCR value of the packet P3 is 300 plus 200, that is, 500, the ISCR value of the packet P2.
于此范例中,实际上传送端写入封包P3的ISCR值为501而非500。差异检测单元362用以自封包P3真正的ISCR值(亦可称为传送端计数值)501减去一接收端计数值500(产生方式容后详述),以决定两计数值的差异为1。当此计数差异为正数,表示该概略比特率太高,必须被调降。相对地,当此计数差异为负数,表示该概略比特率太低,必须被提高。修正单元364用以根据此计数差异产生一比特率修正量,并根据该比特率修正量修正该概略比特率。In this example, the sender actually writes the ISCR value of 501 into the packet P3 instead of 500. The difference detection unit 362 is used to subtract a receiving end count value 500 from the real ISCR value (also called the transmitting end count value) 501 of the packet P3 (the generation method will be described in detail later) to determine that the difference between the two count values is 1 . When this count difference is positive, it means that the approximate bit rate is too high and must be lowered. Conversely, when the count difference is negative, it indicates that the approximate bit rate is too low and must be increased. The correction unit 364 is used for generating a bit rate correction amount according to the count difference, and correcting the approximate bit rate according to the bit rate correction amount.
图4(B)为差异检测单元362的详细实施例。此例中的差异检测单元362包含一第一计数器362A和一减法器362B。封包P2的ISCR值可做为第一计数器362A的计数起始值。以图3的情况为例,第一计数器362A可以自300上数,每隔一个参考周期T加1,此参考周期T由一参考时钟脉冲提供。如图4(B)所示,第一计数器362A接收该参考时钟脉冲做为计数的参考,该参考时钟脉冲的周期即为T。如先前所述,控制模块38会在200*T的时间后控制暂存器32将封包P3的ISCR值提供至差异检测单元362。此差异检测单元362以收到封包P3的ISCR值时的计数结果为该接收端计数值。因此,该接收端计数值为500。减法器362B负责自该传送端计数值(封包P3真正的ISCR值)减去该接收端计数值,以决定一计数差异。FIG. 4(B) is a detailed embodiment of the difference detection unit 362 . The difference detection unit 362 in this example includes a first counter 362A and a subtractor 362B. The ISCR value of the packet P2 can be used as the counting start value of the first counter 362A. Taking the situation in FIG. 3 as an example, the first counter 362A can count up from 300 and increment by 1 every other reference period T provided by a reference clock pulse. As shown in FIG. 4(B), the first counter 362A receives the reference clock pulse as a counting reference, and the period of the reference clock pulse is T. As mentioned above, the control module 38 controls the register 32 to provide the ISCR value of the packet P3 to the difference detection unit 362 after 200*T. The discrepancy detection unit 362 uses the counting result when receiving the ISCR value of the packet P3 as the counting value of the receiving end. Therefore, the sink count value is 500. The subtractor 362B is responsible for subtracting the receiving end count value from the transmitting end count value (real ISCR value of packet P3 ) to determine a count difference.
在一实施例中,第一计数器362A于产生该计数差异后,还是继续从500上数。于另一实施例中,差异检测单元362于产生该计数差异后,即采用甫自暂存器32传来的传送端计数值(即用以比对的ISCR值)做为一新接收端计数值。以图3的范例而言,差异检测单元362可在产生计数差异后,令第一计数器362A改以封包P3的ISCR值501为起始值上数。同样地,每一次出现新的ISCR值时,第一计数器362A的计数起始值都可被更新。这种做法的好处在于,自概略比特率趋近正确比特率的收敛行为比较稳定无振荡,且收敛速度较快。In one embodiment, the first counter 362A continues to count up from 500 after the count difference is generated. In another embodiment, after the difference detection unit 362 generates the count difference, it uses the count value of the transmitting end (ie, the ISCR value for comparison) just passed from the register 32 as a new counting value of the receiving end value. Taking the example in FIG. 3 as an example, the difference detection unit 362 can make the first counter 362A change to start counting up with the ISCR value 501 of the packet P3 after a count difference is generated. Likewise, every time a new ISCR value occurs, the counting start value of the first counter 362A can be updated. The advantage of this method is that the convergence behavior from the approximate bit rate to the correct bit rate is relatively stable without oscillation, and the convergence speed is fast.
图5(A)为修正单元364的一种详细实施例。此例中的修正单元364包含一第一乘法器364A、一积分器364B、一频率转换器(未绘示)和一加法器364C。第一乘法器364A用以将该计数差异乘以第一比例Ki,以产生一第一乘法结果。积分器364B则用以累加该第一乘法结果,做为时间修正量。第一比例Ki不以特定数值为限,亦可为1。频率转换器用以将该概略比特率取倒数以产生一概略封包间距。加法器364C负责将概略封包间距和时间修正量相加,并取倒数以产生微调后比特率。实务上,微调后比特率并不一定要在时间的范畴下处理,亦可透过其它方法在频率的范畴下得出相当于概略封包间距以及时间修正量相加后取倒数的结果,以求出与本实施例所得出者实质相同的微调后比特率;换言之,修正单元并不必然包含一频率转换器,且本实施例仅为一例,不限于此。FIG. 5(A) is a detailed embodiment of the correction unit 364 . The correction unit 364 in this example includes a first multiplier 364A, an integrator 364B, a frequency converter (not shown) and an adder 364C. The first multiplier 364A is used for multiplying the count difference by a first ratio Ki to generate a first multiplication result. The integrator 364B is used for accumulating the first multiplication result as a time correction amount. The first ratio Ki is not limited to a specific value, and can also be 1. A frequency converter is used to invert the approximate bit rate to generate an approximate packet spacing. The adder 364C is responsible for adding the approximate packet spacing and the time correction amount, and taking the inverse to generate the fine-tuned bit rate. In practice, the fine-tuned bit rate does not have to be processed in the time domain, and other methods can be used to obtain the result equivalent to the approximate packet spacing and the reciprocal of the time correction amount in the frequency domain, so as to In other words, the correction unit does not necessarily include a frequency converter, and this embodiment is only an example and is not limited thereto.
图5(B)为修正单元364的另一种详细实施范例。此范例中的修正单元364进一步包含第二乘法器364D和加法器364E。第二乘法器364D用以将该计数差异乘以一第二比例Kp,以产生一第二乘法结果。加法器364E用以将积分器364B输出的累加结果与该第二乘法结果相加,做为该时间修正量。由以上两个图例可看出,当比特率修正量为0时,修正单元364将该概略比特率提供给控制模块38。实务上,第一比例Ki和第二比例Kp皆不以特定数值为限。FIG. 5(B) is another detailed implementation example of the correction unit 364 . The modification unit 364 in this example further includes a second multiplier 364D and an adder 364E. The second multiplier 364D is used for multiplying the count difference by a second ratio Kp to generate a second multiplication result. The adder 364E is used for adding the accumulation result output by the integrator 364B to the second multiplication result, as the time correction amount. It can be seen from the above two illustrations that when the bit rate correction amount is 0, the correction unit 364 provides the approximate bit rate to the control module 38 . In practice, both the first ratio Ki and the second ratio Kp are not limited to specific values.
图6为封包接收器300的一种详细实施范例。于此范例中,暂存器32包含用以储存封包数据的第一储存单元32A和用以储存各封包的时间戳印(ISCR值)的第二储存单元32B。实务上,这两个储存单元可为先进先出(first-in-first-out,FIFO)式的存储器。如先前所述,粗估模块34负责根据较早的封包的ISCR值先估计一个概略比特率。以图3所示的封包为例,在收到封包P1、P2的ISCR值之后,粗估模块34即可产生一概略比特率,并将该概略比特率提供至修正单元364。在未产生比特率修正量之前,修正单元364直接将该概略比特率提供给控制模块38。在产生比特率修正量之后,修正单元364则是将微调后比特率提供给控制模块38。FIG. 6 is a detailed implementation example of the packet receiver 300 . In this example, the register 32 includes a first storage unit 32A for storing packet data and a second storage unit 32B for storing the timestamp (ISCR value) of each packet. In practice, the two storage units may be first-in-first-out (FIFO) type memories. As mentioned earlier, the coarse estimation module 34 is responsible for estimating an approximate bit rate based on the ISCR values of earlier packets. Taking the packet shown in FIG. 3 as an example, after receiving the ISCR values of the packets P1 and P2 , the rough estimation module 34 can generate an approximate bit rate and provide the approximate bit rate to the correction unit 364 . Before generating the bit rate correction amount, the correction unit 364 directly provides the approximate bit rate to the control module 38 . After generating the bit rate correction amount, the correction unit 364 provides the fine-tuned bit rate to the control module 38 .
控制模块38会根据修正单元364提供的比特率产生一控制信号,并将该控制信号提供给第一储存单元32A、第二储存单元32B及差异检测单元362。实务上,这些电路可被设计为每当控制信号中出现电压上升沿时即受触发并进行后一动作。第一储存单元32A可在每次控制信号中出现电压上升沿时输出一笔封包数据。若第一储存单元32A所输出的封包数据带有ISCR值,则第二储存单元32B在该次控制信号中出现电压上升沿时会相对应地输出该封包的ISCR值。举例而言,在第一储存单元32A输出封包P3时,第二储存单元32B同时将封包P3的ISCR值传送至差异检测单元362。The control module 38 generates a control signal according to the bit rate provided by the modification unit 364 , and provides the control signal to the first storage unit 32A, the second storage unit 32B and the difference detection unit 362 . Practically, these circuits can be designed to be triggered and take the next action whenever there is a voltage rising edge in the control signal. The first storage unit 32A can output a packet of data every time a rising voltage edge occurs in the control signal. If the packet data output by the first storage unit 32A has an ISCR value, the second storage unit 32B will correspondingly output the ISCR value of the packet when a rising voltage edge occurs in the control signal. For example, when the first storage unit 32A outputs the packet P3, the second storage unit 32B transmits the ISCR value of the packet P3 to the difference detection unit 362 at the same time.
差异检测单元362在每次控制信号中出现电压上升沿时检查是否有新的ISCR值输入。若检查结果为是,差异检测单元362即计算该ISCR值(传送端计数值)与接收端计数值的差异,并将该计数差异提供给修正单元364,供修正单元364做为产生微调后比特率的依据。在收到微调后的比特率后,控制模块38便会根据此一新的比特率产生上述控制信号。The difference detection unit 362 checks whether there is a new ISCR value input every time a voltage rising edge occurs in the control signal. If the check result is yes, the discrepancy detection unit 362 promptly calculates the difference between the ISCR value (transmitting end count value) and the receiving end count value, and provides the count difference to the correction unit 364 for the correction unit 364 to generate fine-tuned bits basis for the rate. After receiving the fine-tuned bit rate, the control module 38 will generate the above-mentioned control signal according to the new bit rate.
于一实施例中,控制模块38包含一第二计数器,且该微调后比特率对应于该第二计数器的一初始计数值。该第二计数器自该初始计数值下数,每隔一个参考周期减1,产生一中间计数值,该参考周期同样由该参考时钟脉冲提供。实务上,该第二计数器可利用一数字控制振荡器(numericallycontrolledoscillator,NCO)来实现。以概略比特率为1/(5*T)而时间修正量为0.3的情况为例,该初始计数值即等于5.3。该第二计数器自5.3开始下数,上述中间计数值的变化依序为5.3、4.3、3.3、2.3、1.3、0.3。每当该中间计数值小于1,该第二计数器便将该中间计数值减1并加上该初始计数值,产生一新计数值。因此,在中间计数值降为0.3之后,新计数值为0.3-1+5.3,等于4.6。In one embodiment, the control module 38 includes a second counter, and the fine-tuned bit rate corresponds to an initial count value of the second counter. The second counter counts down from the initial count value and subtracts 1 every other reference period to generate an intermediate count value. The reference period is also provided by the reference clock pulse. In practice, the second counter can be realized by using a numerically controlled oscillator (NCO). Taking the case where the approximate bit rate is 1/(5*T) and the time correction amount is 0.3 as an example, the initial count value is equal to 5.3. The second counter starts counting down from 5.3, and the change of the above-mentioned intermediate count value is 5.3, 4.3, 3.3, 2.3, 1.3, 0.3 in sequence. Whenever the intermediate count value is less than 1, the second counter subtracts 1 from the intermediate count value and adds the initial count value to generate a new count value. Therefore, after the intermediate count value drops to 0.3, the new count value is 0.3-1+5.3, which equals 4.6.
图7为该中间计数值与控制信号相对于时间的图例。如图7所示,在该中间计数值小于1后经过一个参考周期T,第二计数器会令控制信号为一个高电平脉冲,以触发第一储存单元32A、第二储存单元32B及差异检测单元362。此外,在该中间计数值小于1后经过一个参考周期T,第二计数器会重新自新计数值下数。以新计数值为4.6的情况为例,中间计数值的变化依序为4.6、3.6、2.6、1.6、0.6。若新计数值为4.9,则中间计数值的变化依序为4.9、3.9、2.9、1.9、0.9。FIG. 7 is a graphical illustration of the intermediate count value and control signal versus time. As shown in FIG. 7, after a reference period T passes after the intermediate count value is less than 1, the second counter will make the control signal a high-level pulse to trigger the first storage unit 32A, the second storage unit 32B and the difference detection Unit 362. In addition, after a reference period T passes after the intermediate count value is less than 1, the second counter will count down from the new count value again. Taking the case where the new count value is 4.6 as an example, the change of the intermediate count value is 4.6, 3.6, 2.6, 1.6, 0.6 in sequence. If the new count value is 4.9, the change of the intermediate count value is 4.9, 3.9, 2.9, 1.9, 0.9 in sequence.
如图7所示,图中的第一个高电平脉冲和第二个高电平脉冲相距6T,第二个高电平脉冲和第三个高电平脉冲相距5T,而第三个高电平脉冲和第四个高电平脉冲也是相距5T。实际上,若微调后比特率固定为1/(5.3*T),长期观之,该控制信号中出现高电平脉冲的平均周期会相对应地为5.3T。也就是说,第一储存单元32A输出封包的平均比特率等于1/(5.3*T)。此做法适用于不需要每一次封包输出时间都很精准的情况下,但仍能确保长期平均而言的封包读取率是正确的。这种做法的好处在于可以较频繁地产生微调后比特率,而能较紧密地追随传送端的比特率。As shown in Figure 7, the distance between the first high-level pulse and the second high-level pulse in the figure is 6T, the distance between the second high-level pulse and the third high-level pulse is 5T, and the third high-level pulse The distance between the level pulse and the fourth high level pulse is also 5T. In fact, if the bit rate is fixed at 1/(5.3*T) after fine-tuning, in the long run, the average period of high-level pulses in the control signal will be correspondingly 5.3T. That is to say, the average bit rate of the output packets of the first storage unit 32A is equal to 1/(5.3*T). This method is suitable for situations where the output time of each packet is not required to be accurate, but it can still ensure that the long-term average packet reading rate is correct. The advantage of this method is that the fine-tuned bit rate can be generated more frequently, and can follow the bit rate of the transmitting end more closely.
根据本发明的另一具体实施例为如图8所示的封包处理方法。首先,步骤S82为根据一第一封包的一第一时间戳印及一第二封包的一第二时间戳印决定一概略比特率。接着,步骤S84为根据至少一第三封包的一第三时间戳印修正该概略比特率,以产生一微调后比特率。该第三时间戳印根据该概略比特率被提供。步骤S86则是根据该微调后比特率读取一个或多个后续封包。Another specific embodiment according to the present invention is a packet processing method as shown in FIG. 8 . First, step S82 is to determine an approximate bit rate according to a first timestamp of a first packet and a second timestamp of a second packet. Next, step S84 is to modify the approximate bit rate according to a third time stamp of at least one third packet, so as to generate a fine-tuned bit rate. The third timestamp is provided according to the approximate bit rate. Step S86 is to read one or more subsequent packets according to the fine-tuned bit rate.
如图9所示,步骤S84可包含三个子步骤。步骤S84A为根据该概略比特率读取该第三时间戳印。步骤S84B为自该第三时间戳印减去一接收端计数值,以决定一计数差异,其中该接收端计数值与该第二时间戳印相关。步骤S84C为根据该计数差异产生一比特率修正量,并根据该比特率修正量修正该概略比特率。As shown in FIG. 9, step S84 may include three sub-steps. Step S84A is to read the third time stamp according to the approximate bit rate. Step S84B is to subtract a receiving end count value from the third time stamp to determine a count difference, wherein the receiving end count value is related to the second time stamp. Step S84C is to generate a bit rate correction amount according to the count difference, and correct the approximate bit rate according to the bit rate correction amount.
此外,步骤S86也可包含五个子步骤。步骤S86A为自对应于微调后比特率的初始计数值下数。步骤S86B为每隔一个参考周期减1,产生一中间计数值。步骤S86C为判断目前的中间计数值是否小于1。若步骤S86C的判断结果为否,该流程会回到步骤S86B,继续下数。若步骤S86C的判断结果为是,则步骤S86D会被执行,以将目前小于1的中间计数值减1并加上初始计数值,产生一新计数值。步骤S86E为在该中间计数值小于1后隔一个参考周期,读取一个后续封包并自新计数值下数。在步骤S86E之后,该流程会回到步骤S86B,重新开始下数程序。In addition, step S86 may also include five sub-steps. Step S86A is to count down from the initial count value corresponding to the fine-tuned bit rate. Step S86B is to subtract 1 every other reference period to generate an intermediate count value. Step S86C is to judge whether the current intermediate count value is less than 1. If the judgment result of step S86C is negative, the process will return to step S86B to continue counting down. If the judgment result of step S86C is yes, then step S86D will be executed to subtract 1 from the current intermediate count value less than 1 and add the initial count value to generate a new count value. Step S86E is to read a subsequent packet and count down from the new count value at intervals of a reference cycle after the intermediate count value is less than 1. After the step S86E, the process will return to the step S86B, and restart the countdown procedure.
须说明的是,先前在介绍封包接收器300时描述的数种电路操作流程变化,亦可应用至图8、图9所绘示的封包处理方法中,其细节不再赘述。It should be noted that the changes in the circuit operation process described above when introducing the packet receiver 300 can also be applied to the packet processing method shown in FIG. 8 and FIG. 9 , and the details will not be repeated here.
如上所述,本发明提出一种根据封包的时间戳印决定封包读取率的电路架构及封包处理方法。除了根据较前端的封包的时间戳印决定一概略比特率,后续封包的时间戳印亦可被用以持续修正封包读取率,以提升封包读取率的正确性。本发明提出的概念可应用在各种需要根据时间戳印决定封包读取率的情况,不以采用MPEG-2规格的DVB-T2接收系统为限。As mentioned above, the present invention proposes a circuit structure and a packet processing method for determining a packet reading rate according to the timestamp of the packet. In addition to determining an approximate bit rate based on the timestamp of the earlier packet, the timestamp of the subsequent packet can also be used to continuously correct the packet reading rate, so as to improve the accuracy of the packet reading rate. The concept proposed by the present invention can be applied to various situations where the packet reading rate needs to be determined according to the time stamp, not limited to the DVB-T2 receiving system adopting the MPEG-2 standard.
藉由以上较佳具体实施例的详述,希望能更加清楚描述本发明的特征与精神,而并非以上述所揭示的较佳具体实施例来对本发明的范畴加以限制。相反地,其目的是希望能涵盖各种改变及具相等性的安排于本发明所欲申请的专利范围的范畴内。Through the above detailed description of the preferred embodiments, it is hoped that the features and spirit of the present invention can be described more clearly, rather than limiting the scope of the present invention by the preferred embodiments disclosed above. On the contrary, the intention is to cover various changes and equivalent arrangements within the scope of the claimed patent scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110434781.1A CN103179434B (en) | 2011-12-22 | 2011-12-22 | Package receiver and method for processing packet thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110434781.1A CN103179434B (en) | 2011-12-22 | 2011-12-22 | Package receiver and method for processing packet thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103179434A CN103179434A (en) | 2013-06-26 |
CN103179434B true CN103179434B (en) | 2016-01-27 |
Family
ID=48639005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110434781.1A Expired - Fee Related CN103179434B (en) | 2011-12-22 | 2011-12-22 | Package receiver and method for processing packet thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103179434B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1461568A (en) * | 2000-09-20 | 2003-12-10 | 通用仪器公司 | Method and apparatus for determining transmission bit rate in a statistical multiplexer |
CN101184035A (en) * | 2006-11-14 | 2008-05-21 | 株式会社东芝 | Broadcast transport stream distribution system, and broadcast transport stream distribution apparatus, user terminal device and distribution method for use in the system |
CN101888541A (en) * | 2009-05-11 | 2010-11-17 | 晨星软件研发(深圳)有限公司 | Method and device for reconstructing digital video data stream |
CN102209261A (en) * | 2010-03-31 | 2011-10-05 | 日立民用电子株式会社 | Video transmission device, video reception device, and video transmission system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007104085A (en) * | 2005-09-30 | 2007-04-19 | Toshiba Corp | Digital broadcast method and apparatus employing communication line |
US20070110027A1 (en) * | 2005-11-15 | 2007-05-17 | Mediatek Incorporation | Systems and methods for processing packet streams |
JP2010212996A (en) * | 2009-03-10 | 2010-09-24 | Toshiba Corp | Information processing apparatus and multiplexing processing method |
-
2011
- 2011-12-22 CN CN201110434781.1A patent/CN103179434B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1461568A (en) * | 2000-09-20 | 2003-12-10 | 通用仪器公司 | Method and apparatus for determining transmission bit rate in a statistical multiplexer |
CN101184035A (en) * | 2006-11-14 | 2008-05-21 | 株式会社东芝 | Broadcast transport stream distribution system, and broadcast transport stream distribution apparatus, user terminal device and distribution method for use in the system |
CN101888541A (en) * | 2009-05-11 | 2010-11-17 | 晨星软件研发(深圳)有限公司 | Method and device for reconstructing digital video data stream |
CN102209261A (en) * | 2010-03-31 | 2011-10-05 | 日立民用电子株式会社 | Video transmission device, video reception device, and video transmission system |
Also Published As
Publication number | Publication date |
---|---|
CN103179434A (en) | 2013-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4746998B2 (en) | Transmission rate adjusting device and transmission rate adjusting method | |
CN100515091C (en) | Device and method for synchronization of compressed video signal receiving system | |
TWI471016B (en) | Reconstructing digital video data stream method and apparatus thereof | |
KR101889373B1 (en) | Adjustment of clock signals regenerated from a data stream | |
KR100448220B1 (en) | A null packet insertion method and its apparatus in digital broadcasting transmission system | |
US20080270800A1 (en) | Adjustment of clock approximations | |
US20120177160A1 (en) | Communication circuit and method of adjusting sampling clock signal | |
CN117615166B (en) | Network code stream recovery method, system, medium and FPGA chip | |
JP2008526073A (en) | Interface circuit and method for receiving and / or decoding data signals | |
JP2008034905A (en) | Digital transmission apparatus and method | |
US9729598B2 (en) | Method and a device for signalling transmission time and/or a system clock | |
CN103179434B (en) | Package receiver and method for processing packet thereof | |
US8854964B2 (en) | Method and apparatus for determining a transport bit rate for a Multiprogram transport stream | |
TWI443974B (en) | Packet receiver and packet processing method thereof | |
CN102934435B (en) | Video display devices | |
US6806818B2 (en) | Apparatus and method for digital stream conversion | |
JP5375021B2 (en) | Clock recovery system and method | |
CN101395805A (en) | Trellis encoder and trellis encoding device having the same | |
KR102484022B1 (en) | Receiving apparatus, receiving method, and program | |
CN101202921A (en) | Clock synchronous system of moving multimedia network | |
JP5239405B2 (en) | TS receiver and timing reproduction method used therefor | |
CN113722258A (en) | Method for reading data and data reading device | |
JP2014216706A (en) | Transmission apparatus, receiving apparatus and reproduction system | |
JP2006254041A (en) | Clock reproduction information generation circuit and clock reproduction circuit | |
EP1354319A1 (en) | Device and process for time stamping, receiver, system for delayed broadcasting and string of corresponding packets |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160127 Termination date: 20191222 |