Problems encountered during the development of CMMs

Source: Internet
Author: User

Problems encountered during the development of CMMs
Some time ago, I took over a cmmb development project, mainly for bug fixing and optimization. Now I have basically finished it. The standard document of cmmb has been roughly viewed. Due to the tight schedule, many details are not clearly understood. The development platform is wince. Here we will record the problems encountered.
1. Frequency
Cmmb has a total of 45 frequency points, and GZ is 37. Find the frequency distribution of each city on the Internet. Each city has a frequency. If you want to provide multiple channels, can you use multiple frequency points? After all, we only need to ensure that the frequency of neighboring cities is different.

2. Time Slot)
The cmmb signal is time-division multiplexing and is divided into 40 ts per second. Each channel occupies one or more ts. In this way, data is received only once in one second for a single channel. TS can be divided into three types:
1). control information, fixed by ts0.
2). ESG (e-Business Guide). Generally, ESG information is generated after ts0. You can obtain the channel list through ESG to locate the TS occupied by the channel. The number of TS occupied by ESG information is not fixed. The Guangzhou region is ts1, while the Shanghai region is ts1 ~ Ts2.
3). Each program occupies one or more ts.

3. audio and video data
The received audio data of cmmb must be dereused first, and the process of demultiplexing is complicated. Fortunately, the chip manufacturer provides a knowledge of the multiplexing library.
1) The video uses h264 encoding with a resolution of 320*240. After the video is deduplicated, The NALU is obtained and directly thrown to the decoder.
2). The audio uses AAC encoding and dual channels. The sampling rate of each channel is 24 kHz. After the audio is deduplicated, AAC frames can be obtained one by one. Audio Decoding has encountered some problems.
AAC decoder, originally used helix fixed-point HE-AAC decoder. The test found that sometimes the thread will be blocked in the decoding function, which is fatal. It is possible that the provided AAC data packet is faulty, and the decoder's fault tolerance capability is too bad.
Later, I found faad. The AAC decoding library has a high rating, which is used in tcpmp. Compilation is also very important in windows and wince. It can be compiled into a fixed-point version through macro control on the wince platform. When faad is used for decoding, the error 21 may occur occasionally, which may cause all subsequent decoding errors. I tried to disable the decoder and reinitialize it. It worked normally and has been tested for a long time without any other problems.

3. AAC audio decoding
1). ADTs Header
The AAC decoding is first encapsulated into an ADTs package (this has not been carefully studied. You can directly decode it without ADTs packaging. You have time to check it again ), the adts header creation process is as follows:

   ADTSHead[7]={0x0ff,0x0f9,0x058,0x80,0,0x1f,0xfc};ADTSHead[3] |= (frame_length & 0x1800) >> 11;// the upper 2 bit/* frame size continued over full byte */ADTSHead[4] = (frame_length & 0x1FF8) >> 3;// the middle 8 bit/* frame size continued first 3 bits */ADTSHead[5] |= (frame_length & 0x7) << 5;//the last 3 bitADTSHead[6] |= num_data_block & 0x03; //Set raw Data blocks.

2) Use of faad
Faad is easy to use. You only need to call four function calls.
Neaacdecopen, enable Decoder
Neaacdecinit, initialization
Neaacdecclose, disable
Neaacdecdecode, decoding

3) a strange problem

The audio sample rate decoded by faad has doubled to 48 khz. Why? Let me say something to someone I know.

The standard document for cmmb has been uploaded to: http://download.csdn.net/detail/gavinr/3806061

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.