1 Introduction
MPEG-Ⅱ has been widely used as an international standard for motion images. Digital Video Broadcast (DVB) has used MPEG-Ⅱ as a source format. In many practical applications, including satellite broadcasting, digital cables, and high-definition TV HDTV, MPEG-Ⅱ groups are input to channels through synchronous interfaces of encoder. In the broadband digital communication network, for example, ADSL, FTTC and broadband IDSL convert the MPEG-Ⅱ group into another network transmission group. In this case, A certain number of transmission streams are compressed into an ATM AAL-5 PDU unit. During group switching, PDU are divided into several ATM units. As to how many transmission streams are compressed into an ATM AAL-5 PDU unit, it is mainly related to the ATM network protocol, generally two transmission streams are compressed into a AAL-5 PDU unit. The MPEG-2 transmission stream transmitted in a network needs the internal group delay to control the time, this control is mainly to send the program reference clock, in this way, the system clock is restored when the system receiver is decoded. It can also avoid the overflow and underflow of the decoder's input buffer.
When designing a video sending system, it is particularly important to precisely control the bit rate of the MPEG-Ⅱ transmission stream. When MPEG-Ⅱ groups are directly transmitted, the system time control is relatively simple. The key issue is how to accurately calculate the input time of the video source. If this problem is solved, the decoder-side decoding clock or the system clock input by the system layer multiplexing can basically be synchronized with the system clock of the encoder. If the current network can tolerate a certain amount of group latency, the group latency caused by network congestion is not our goal, therefore, Bit Rate Measurement for MPEG-Ⅱ is not a critical issue for the design of the entire decoder or video sending system. However, when the MPEG-Ⅱ transmission stream group is converted into another format, such as the ATM AAL-5 PDU unit, it is critical to effectively decode internal groups due to network congestion or even packet loss. Here we propose a simple and effective method for measuring the MPEG-Ⅱ bit rate at the decoder or system layer multiplexing receiver. Use an MPEG decoder chip and an embedded processor to centrally manage the reference clock of the MPEG-Ⅱ Transfer Stream program. Because the reference clock of the MPEG-Ⅱ transmission stream program is set based on a certain encoder system's reference clock, the bit rate of the stream can be basically determined through real-time monitoring, at the same time, compare the reference clock of the current decoder with the reference clock PCR of the program to verify the network congestion to be measured. In addition, a hardware test and evaluation card is designed to verify the method. The verification result basically conforms to the current CATV or HDTV requirements.
2. network congestion and recovery of the system reference clock
According to the MPEG-Ⅱ international standard, the encoder encodes the system at 1/33 of the 27 MHz clock, the encoded data is extended and processed, and then embedded into the transmission stream group as a program reference clock PCR. Therefore, at the decoder end, the encoding system clock can be determined through the recovery of PCR, so as to synchronize the codec. Because the PID values containing the PCR field grouping in the Transfer Stream are determined in the program ing table PMT. According to the grouping PID containing the PCR field, you can refer to setting the first group containing PCR as the reference PCR of the system clock STC, then, the system clock can be restored by processing the PCR values in the other transfer groups containing PCR fields in a certain way. The system clock recovery method is as follows:
(1) initialize the value of the first PCR on STC.
(2) considering the effects of overflow and underflow of decoder input buffer, make an estimation of its size to determine the decoded input buffer. Based on the maximum bit rate of the current MPEG-Ⅱ transmission stream, the interval between consecutive groups containing PCR fields must be less than 0.1 s.
(3) locks the continuously arriving PCR value. You can determine the STC by comparing it with the first PCR value.
In the past, the Code speed was not measured during the output of the MPEG demultiplexing to the buffer, which may cause overflow of the buffer. On the video and audio decoder side, during the buffer input to the decoder, the buffer overflows for the same reason. Therefore, when an ATM/CATV network is sent to the MPEG demultiplexing, adding a receiver's bit monitoring unit can reduce the network congestion.
If the packets obtained from the transmission group contain PCR fields, the random latency of the PCR value is caused by network congestion, decoder and embedded system processor, the PCR value will be corrected according to a certain algorithm to restore the STC. This correction is closely related to the current MPEG bit rate, which is to compensate the current MPEG bit rate for the PCR value to restore the original value of the PCR. If the current PCR is not corrected, video decoding, image conversion, and D/A conversion will all be affected by the failure of the STC to recover. Therefore, the real-time monitoring and measurement of the current MPEG bit rate is crucial in the design of the decoder or demultiplexing system, it aims to measure and monitor the transmission latency in real time. If the current bit rate can be tracked and tested in real time in the receiver, the transmission delay of the ATM/CATV network is basically blocked.
3 Measurement Algorithm of MPEG bit rate at the receiver end
The random latency caused by network congestion of the MPEG-Ⅱ transmission group during ATM or CATV network transmission, the group system clock received by the demultiplexing or decoder has a certain offset with the output of the sending end. Ideally, this offset is not considered, however, this makes video decoding unable to work normally, or the image cannot be restored to its original state. In this case, the system clock STC will be restored in an uncertain state. To avoid this situation, you must check the status of STC and compare the current PCR value with the locally generated clock. The comparison formula is as follows:
(△Stc-△pcr) △stc = (△b/△pcr-Rf) (△b/△pcr) (1)
Medium: △stc = STC (t)-STC (t-1)
△Pcr = PCR (t)-PCR (t-1)
Delta B = B (t)-B (t-1)
T -- PCR arrival time
B (t) -- the number of BITs accumulated at the time of PCR arrival t
Rf-run time bit rate between two consecutive processes and more PCR
If Sf is used to replace △b/△pcr, the 1) formula can be changed:
△Stc-△pcr)/△stc = (Sf-Rf)/Sf (2)
In the above formula, it is easy to see that Sf can be obtained before video signal transmission, and Sf is a constant K in constant bit rate transmission stream CBR, therefore, in CBR, the above formula can be evolved:
Rf = (△stc/△pcr) K (3)
In the variable-rate MPEG-Ⅱ transmission stream VBR, because Sf is a variable, the 2) formula can evolve:
Rf = △stc × △b)/(△pcr × △pcr) (4)
4. Hardware Testing System
In order to verify the above MPEG-Ⅱ TS bit rate algorithm, a hardware test and evaluation system is designed to verify the above algorithm in real time. The system consists of a video server and an embedded processor. The video server is mainly used to send the MPEG-Ⅱ transmission stream group. The sending speed is the block rate that simulates network latency caused by network congestion. When the MPEG-Ⅱ Transfer Stream group reaches the processor, the processor first processes the group containing the PCR field to filter out the PCR value. The processor consists of two modules: the group processor and the MPEG-Ⅱ system layer demultiplexing. The Group processor processes the PAT and PMT tables, and saves the processed group PID values containing the PCR fields to the demultiplexing, the demultiplexing splits the transmission stream group according to the PID value, filters the groups containing the PCR value, and extracts the PCR value from the group. The FPGA circuit is used as the grouping processor. The demutor uses the TMS320VC5410 DSP chip. The demutor extracts the PCR value and subtract the extracted adjacent PCR value to obtain the △pcr, use this △pcr value to obtain a 27 MHz clock after the PLL frequency doubling. After processing, the MPEG-Ⅱ audio stream is directly input to the audio decoder, and the video stream is input to the input buffer of the video decoder. The restored system clock STC is used as the decoder clock input to the audio and video decoder.
The MPEG-Ⅱ transmission stream group is generated by a Broadcast Server Based on the NT System. To facilitate the control of the MPEG-Ⅱ bit rate, the data in the MPEG file system is converted to the MPEG-Ⅱ TS group through the abortion generator on the PC, at the same time, the data stream is directly output to the group processor through the digital interface. This processing method is more effective than directly downloading the transmission group from the ATM/CATV network to estimate the bit rate and system clock. The video server can adjust the MPEG-Ⅱ Transmission Bit rate based on the algorithm requirements. Different bit rates can be entered into the group processor to verify the correctness of the above algorithm. In addition, to effectively control network congestion and avoid the impact of other network delays on the testing bit rate, servers and group processors and MPEG-Ⅱ TS are directly connected together, And RS422 interfaces are used to maintain signal stability. The physical connection of the pin is consistent with the high-speed data I/O in the DAVIC1.1 specification.
5. Test Result Evaluation
This test system is used to analyze two test results: Bit Rate continuity and bit rate under multi-user input.
1) Non-continuity Analysis of code streams
The purpose of the test code stream is to analyze whether the current demultiplexing driver can effectively detect the code speed changes caused by network latency. This situation can be seen in many aspects: for example, the network transmission in CATV fails, the video server transmission fails in VOD, and the video player playback program is completed, which can cause the current transfer speed to change, however, no matter how the bit rate of the current stream is changed or even stops, the driver in the current demultiplexing must be able to detect the changes, in this way, the current MPEG-Ⅱ bit rate can be measured in real time. The concave point of the image indicates that the current MPEG transmission group has a PCR arrival time of about 30 ~ The stream bit rate changes to 0 in 35 s.
2) Bit Rate Test Result Analysis under multi-user input
When multiple users are input, the bit rate of the network is different from that of a single channel. In a CATV network system, when multiple users are connected to the network, the server may use the same transmission channel to serve each user. For example, in VOD, six MPEG-Ⅱ transmission streams share a transmission channel, which involves the Dynamic Allocation of network resources. The Dynamic Allocation of network bandwidth is related to the current bit rate of each transmission stream. Therefore, the bit rate test is performed when multiple users are mounted, bit Rate Testing and computing for each TS is particularly important.
6 conclusion
MPEG-Ⅱ motion image compression coding has become a very important standard in today's digital broadcast and television systems, especially in the field of digital TV applications. In these application fields, the most critical issue is to maintain a stable bit rate for MPEG image transmission, so as to effectively recover the STC during decoding, this ensures the correct decoding of videos and audios. Some professional tools and knowledge are required to test the bit rate of the MPEG-Ⅱ transmission stream. However, the application grouping processor and demultiplexing can be used to complete this task easily and effectively. The MPEG-Ⅱ bit rate testing principle and method proposed here are also widely used in the design of decoding system terminals. Therefore, a hardware testing platform is designed to evaluate the platform. The evaluation results basically meet the actual requirements. Although in this test platform, the video server is used to simulate the actual MPEG-Ⅱ transmission stream data in the form of files, this does not affect the correctness of this method.