This article is generally discussed in the hardware and software development point of mobile TV, how to design hardware, realize audio and video synchronization, increase H.264 decoding rate, and prevent DMA buffer overflow.
hardware design
Hardware design overview
The selection of the hardware configuration is integrated, such as the processing function of the CPU is related to the final decoding display. Of course, select some high-end general purpose processors, or dedicated media processors can achieve better results, but increase the cost of hardware. A fold can be taken on the final display effect and hardware. At present, the chip that can receive T-DMB and DVB-H standard is not a lot, you can choose some mainstream chips on the market. The hardware configured in this article is: S3C2440A (400 MHz), 64MB of SDRAM, Apollo FS1110, Kino2efs1026. Basically meet the needs of mobile TV on hardware. The RF tuning chip APOLLO FS 1110 received by the radio frequency signal received by the antenna is to demodulate the RF signal to be demodulated as an IF (Intermediate Frequency) signal. This chip is currently mainstream products on the market, which can receive multiple standard signals, and small size (5.0mmmmmmmmmmx0.9mm), low power consumption (80MW), three low noise front-end amplifiers, covering L-Band , BANDII and BANDIII three frequency bands. The Apollo FS1110 gives the IF signal to KINO2 EFS1026, complete the source code decoding output MPEG2-TS data. Kino2 is a highly optimized baseband processor, a small size (10mm10mm1.3mm), low power consumption (100MW), can provide various DMB code rates, up to 1.8Mbps, on the chip containing RS decoders, better Mobile channel performance. Kino2 The Source Code TS code stream is sent to the CPU, and the CPU completes the Decompression, decoding, and display of the TS stream. The hardware design block diagram is shown in Figure 1.
Be
Be
Figure 1 Hardware design block diagram
Hardware function module description
Mobile TV terminals ultimately support multi-standard, multi-band, which is also market demand. Since the frequency band used by the three places in mobile TV business is not too, such as Beijing and Guangdong use VHF Band 3, Shanghai uses L-Band, so the same mobile TV terminal should receive mobile services in different parts of China. Need to support multi-band. The working frequency bands used herein are VHF 3 bands and L band, so the BANDII and L-BANs of the FS1110 are used; and BandII is mainly used for FM broadcasts. All the three high-frequency inputs of the FS1110 can be used, and the band selection can be controlled by the FS 1026 through the III interface, and the initialization of the internal register of the FS1110 is also completed by this interface.
The downstream FS1026 baseband processor module receives the IF signal sent from the RF tuner, and finally completes the source decoding. The output MPEG2-TS data supports parallel and serial in both formats. Serial data can be directly connected via SPI interfaces and CPUs. The baseband module can also be exchanged with the SCP (SERIAL Control Port) interface and the CPU, the SCP interface and IIC interface are fully compatible. You can also communicate with serial ports (UART) and CPUs. Since some commercial DMB programs have been scrambled by service providers (after encryption), the smart card module can complete the descramble function.
The function of the CPU is to receive TS data through the SPI interface, and the decoding of audio and video is displayed. Data can be cached via DMA, and then read data from DMA. The DMA mode is a high-speed data transfer operation that allows reading and writing data between external devices and memories, neither passing CPU, no CPU intervention. The entire data transfer operation is performed under the control of the DMA controller. In addition to making a little processing at the beginning and end of the data transfer, the CPU can do other work during the transmission process. Thus, in most time, the CPU and input / output are in parallel operation. Therefore, the efficiency of the entire system can be greatly improved. Under the WinCe platform, the operation of the DMA is quite convenient, the driving development is not very difficult, and the read data is like operating a normal file. Only one difference is to prevent DMA from overflow. Because the reads of ordinary documents are fully controlled, and the "real-time" stream is processed here, it is possible to overflow. Overflow includes overflow (data read too slow) and underflow (too fast). The principle of MPEG's decoder receiving end prevents data overflows, mainly due to the format of image encoding, and the data rate of the front end of the transmitted decoder is not constant. MPEG uses flow rate feedback control to control data overflow, so that the data rate reaching the audio and video decoder tends to be constant. The control of the DMA is simple, read data with dedicated threads, and the demarcation thread is based on data, and some frames or slow decoding speed can be discarded. However, it is generally a lot of cases.
Hardware design considerations
The main problem when designing the hardware circuit is high frequency and electromagnetic compatibility, and the general method is to add a shield, which can add the Apollo FS1110 to the mask to reduce the spatial interference of the module. Of course, the Apollo FS1110, KINO2EFS 1026 can be used as an external module. It is also possible to reduce the impact of high frequency by optimizing the design of the schematic. Because the quality of the schematic directly affects the layout, the layout is difficult, and the performance of the board is good. In order to lay out, the partition design can be clearly performed to reduce the impact between the various functional modules, and the numbers, analog, and RF circuits should be separated when designing the schematic. However, since the handheld equipment is small, the shield is generally essential.
software design
T-DMB standard overview
T-DMB uses H.264 video compression standards, audio uses low-cost MPEG-4 bit slice arithmetic coding BIT-SLICED ARITHMETIC CODING or AAC + (European T-DMB), the image format is CIF (Common Intermediate Format (352288), add some of these audio and video code streams, after the MPEG-4 SL (Sync Layer) Synchronous Layer Package and MPEG-2 TS (Transport Stream), handed over to modulator modulation The signal suitable for propagating on the channel is emitted. Various standard receiving ends have a large difference in channel decoding, and the decoding of the source is very similar. The T-DMB system transmitting end encoder structure is shown in Figure 2.
Be
Be
Figure 2 block diagram of T-DMB transmitting end coding
The MPEG-4 OD / BINFS generator generates an audiovisual object, a scene time-space relationship information, and a descriptor information of the audiovisual object. The IOD generator generates an initial information of an audiovisual object: Scene Description and Object Description Information. The segmentation generator mainly collects SLP and IOD data information for generating and program demultiplexing related reference information PSI (Program Specific Information). In the data stream of the T-DMB, IOD_DESCRIPTOR can be obtained by parsing the description field in the PMT, and the object description information can be obtained by IOD_DESCRIPTOR. ES_DESCRIPTOR and other information can be obtained by the object description. The SL synchronous packer is mainly responsible for the synchronization of audiovisual objects and auxiliary data. After the SL package is packaged, the PES package is sent to the modulator. Technology area
Network player host X5mini disassembly: Quality is hard to dare
Mirai core push new high-precision pressure sensor, mainly for harsh car applications
Strong cross-border, TV box with cameras, smart speakers play a trick?
Under TV digital wave, modern free local radio and television practical application and tendency
TI interviewer's three questions, can you answer a few?
Our other product: