CN101986388A - MP3 intelligent error detection method - Google Patents
MP3 intelligent error detection method Download PDFInfo
- Publication number
- CN101986388A CN101986388A CN2010102746403A CN201010274640A CN101986388A CN 101986388 A CN101986388 A CN 101986388A CN 2010102746403 A CN2010102746403 A CN 2010102746403A CN 201010274640 A CN201010274640 A CN 201010274640A CN 101986388 A CN101986388 A CN 101986388A
- Authority
- CN
- China
- Prior art keywords
- frame
- data
- information
- frame head
- head
- 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.)
- Pending
Links
Images
Abstract
The invention provides an MP3 intelligent error detection method and a corresponding device, the method can judge whether an error occurs in the current frame or not in an intelligent manner by comparing detailed frame head information of continuous two frames of MP3 data, if the error occurs, the frame is skipped, if frame data is correct, MP3 decoding is carried out and audio data is outputted. The decoding of the certain frame of MP3 comprises the following steps: firstly analyzing the current frame head data, obtaining the frame head information, calculating the position of the next frame head data through the frame head information, reading the next frame head data, then analyzing the frame head information, and judging whether the current frame data can carry out the MP3 decoding or not by contrasting frame head identification information of the two frames. The method and the device can effectively detect the frames with the errors in an MP3 file, skip the frames, and realize the correct playing of the MP3.
Description
Technical field
The present invention relates to a kind of MP3 intelligence error-detecting method.
Background technology
Along with popularizing of the growing and network of audio compression techniques, the audio file of MP3 (MPEG Audio Layer III) form with its ratio of compression height, total harmonic distortion is low and open good and obtain increasing widespread use.The general structure of mp3 file is made up of MP3 sign 3 (ID3tag) and frame data as shown in Figure 2, and wherein ID3 tag data are optional, and the voice data of mp3 file all is to export by after decoding by a series of Frame.Mp3 file is made up of the MP3 frame, and the reproduction time of each MP3 frame is fixed, but the size of data of MP3 frame is not necessarily fixing.Usually mp3 file divides two kinds: constant bit rate (CBR) and variable bit rate (VBR), and wherein CBR is the mp3 file of constant frame sign, each MP3 frame data size of forming CBR is identical; VBR is the mp3 file that becomes the frame data size, and the size of data of each MP3 frame of composition VBR is not necessarily identical.
Mp3 file is in decode procedure, if running into mistake is identified as the MP3 frame data with ID3tag and maybe will has the MP3 frame of corrupted data to carry out decodes and plays, will bring the noise of some error data frames, whether therefore correct identification MP3 frame is wrong is very useful, can skip the frame that voice data damages, play normal MP3 frame data.The MP3 frame of mp3 file comprises frame head information and frame voice data; wherein frame head information is made up of 32bit data+16bit bug check data as shown in Figure 3, and wherein 16bit bug check data are optional; when safeguard bit is 0, then there are not 16bit bug check data.
Patent ZL03103557.4 proposition is a kind of judges by the 16bit bug check whether the MP3 frame is correct; shown in the process flow diagram of Fig. 1; but there is not the mp3 file of 16bit bug check position for some; just do not have CRC protection mechanism position mp3 file its do not check; and directly will give the decoder decode outputting audio data; potentially like this send the erroneous frame data to the MP3 decoding device, decoding output noise data.Therefore for the mp3 file that does not have 16bit bug check position, need carry out the noise problem that error detection could avoid the MP3 frame data of decoding error to bring fully to its frame data equally.
Summary of the invention
Technical matters to be solved by this invention is to overcome the deficiencies in the prior art, propose a kind of intelligence when playing mp3 file and check the method for frame mistake, this method does not rely on the error-checking position of 16bit and checks data, but compare to judge whether discern current MP3 frame correct according to the frame head information of the Frame of mp3 file own, the noise problem of avoiding the MP3 frame data of decoding error to bring fully.
The technical solution adopted in the present invention is: the present invention's intelligence checks that the method for frame mistake may further comprise the steps:
(1) searches the frame synchronization head;
(2) resolve the frame head information of present frame, go out the position of next frame data and parse the frame head information of described next frame data according to the frame head information calculations;
(3) relatively whether present frame is consistent with the identifying information of described next frame data, and described identifying information is the fix information in the frame head information of each frame;
(4) if present frame is identical with the identifying information of described next frame data, then current frame data is carried out the MP3 decoding outputting audio data; Otherwise return step (1).
As shown in Figure 3; the information of frame head described in the said method is resolved in order and is followed successively by frame synchronization head, sign, audio layer, safeguard bit, bit rate index, sampling rate index, filler, privately owned position, pattern, mode expansion, copyright, original, reinforcement; if wherein the numerical value of safeguard bit is, then also comprise the error-checking position at 1 o'clock.
Further, the fix information in the described frame head information comprises frame synchronization head, sign, audio layer, safeguard bit and sampling rate.
Further, the step of calculating the position of next frame data in the described step (2) comprises: the length of at first calculating present frame, the present frame address adds that the length of present frame is the position of next frame data, and the length of described present frame rounds for the value to (144 * bit rate/sampling rate)+filling place value gained.
The invention has the beneficial effects as follows:, promptly when safeguard bit is 0, then do not have the bug check data because the error-checking position in the frame head information of mp3 file Frame is optionally; If carry out error detection decoding output according to the CRC protection mechanism; this kind situation can directly be given the decoder decode outputting audio data; form noise data; and the present invention has overcome this defective fully; utilize the frame head information of Frame own that two frame data are compared; judge the correctness of current data frame, and then give the decoder decode outputting audio data or skip, the noise problem of avoiding the MP3 frame data decoding to mistake to be brought.
Description of drawings
Fig. 1 is the process flow diagram of the related method of patent ZL03103557.4 in the background technology;
Fig. 2 is the structural drawing of mp3 file;
Fig. 3 is the frame head information of MP3 and shared bit number structural drawing;
Fig. 4 is the process flow diagram of MP3 intelligence error-detecting method of the present invention.
Embodiment
Please refer to Fig. 4, Fig. 4 is a particular flow sheet of the present invention.
Value | Bit rate |
0001 | 32kbps |
0010 | 42kbps |
0011 | 48kbps |
0100 | 56kbps |
0101 | 64kbps |
0110 | 80kbps |
0111 | 96kbps |
1000 | 112kbps |
1001 | 128kbps |
1010 | 160kbps |
1011 | 192kbps |
1100 | 224kbps |
1101 | 256kbps |
1110 | 320kbps |
After determining the bit rate of described present frame, also need to obtain the sampling rate of present frame, according to the sampling rate index value, by MP3 frame sampling rate index and sampling rate mapping table:
Value | Bit rate |
00 | 44100Hz |
01 | 48000Hz |
10 | 32000Hz |
Determine sampling rate.
According to bit rate, sampling rate, and the filler information in the frame head information that step 402 was resolved to, according to relation:
Frame length=round ((144 * bit rate/sampling rate)+filling place value)
Calculate the size of described present frame, after obtaining the present frame size, the present frame address adds the position that current frame length can calculate next frame.
Claims (3)
1. MP3 intelligence error-detecting method, whether the Frame of judging MP3 is made mistakes and correct Frame is carried out the MP3 decoding outputting audio data, it is characterized in that, may further comprise the steps:
(1) searches the frame synchronization head;
(2) resolve the frame head information of present frame, go out the position of next frame data and parse the frame head information of described next frame data according to the frame head information calculations;
(3) relatively whether present frame is consistent with the identifying information of described next frame data, and described identifying information is the fix information in the frame head information of each frame;
(4) if present frame is identical with the identifying information of described next frame data, then current frame data is carried out the MP3 decoding outputting audio data; Otherwise return step (1).
2. a kind of MP3 intelligence error-detecting method according to claim 1 is characterized in that the fix information in the described frame head information comprises frame synchronization head, sign, audio layer, safeguard bit and sampling rate.
3. a kind of MP3 intelligence error-detecting method according to claim 1, it is characterized in that, the step of calculating the position of next frame data in the described step (2) comprises: the length of at first calculating present frame, the present frame address adds that the length of present frame is the position of next frame data, and the length of described present frame rounds for the value to (144 * bit rate/sampling rate)+filling place value gained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102746403A CN101986388A (en) | 2010-09-06 | 2010-09-06 | MP3 intelligent error detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102746403A CN101986388A (en) | 2010-09-06 | 2010-09-06 | MP3 intelligent error detection method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101986388A true CN101986388A (en) | 2011-03-16 |
Family
ID=43710731
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010102746403A Pending CN101986388A (en) | 2010-09-06 | 2010-09-06 | MP3 intelligent error detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101986388A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103517027A (en) * | 2012-06-29 | 2014-01-15 | 联想(北京)有限公司 | Video data processing method and electronic equipment |
CN104835500A (en) * | 2015-04-10 | 2015-08-12 | 广东欧珀移动通信有限公司 | Method and device for acquiring audio information |
CN105931656A (en) * | 2016-04-14 | 2016-09-07 | 青岛海信移动通信技术股份有限公司 | Audio editing method and device |
CN110149171A (en) * | 2019-06-25 | 2019-08-20 | 昆腾微电子股份有限公司 | A kind of sending method, method of reseptance and the device of wireless audio data |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1467635A (en) * | 2002-06-21 | 2004-01-14 | ӡ�����Ƽ��ɷ�����˾ | Intelligent mp3 error checking method and mechanism |
CN101030381A (en) * | 2007-03-19 | 2007-09-05 | 北京中星微电子有限公司 | Method and apparatus for extracting MP3 file sampling rate |
CN101547369A (en) * | 2008-03-26 | 2009-09-30 | 盛大计算机(上海)有限公司 | Fault tolerance method for removing mosaic phenomenon in playing network video |
-
2010
- 2010-09-06 CN CN2010102746403A patent/CN101986388A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1467635A (en) * | 2002-06-21 | 2004-01-14 | ӡ�����Ƽ��ɷ�����˾ | Intelligent mp3 error checking method and mechanism |
CN101030381A (en) * | 2007-03-19 | 2007-09-05 | 北京中星微电子有限公司 | Method and apparatus for extracting MP3 file sampling rate |
CN101547369A (en) * | 2008-03-26 | 2009-09-30 | 盛大计算机(上海)有限公司 | Fault tolerance method for removing mosaic phenomenon in playing network video |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103517027A (en) * | 2012-06-29 | 2014-01-15 | 联想(北京)有限公司 | Video data processing method and electronic equipment |
CN103517027B (en) * | 2012-06-29 | 2017-05-24 | 联想(北京)有限公司 | Video data processing method and electronic equipment |
CN104835500A (en) * | 2015-04-10 | 2015-08-12 | 广东欧珀移动通信有限公司 | Method and device for acquiring audio information |
CN104835500B (en) * | 2015-04-10 | 2018-07-06 | 广东欧珀移动通信有限公司 | The method and its device that a kind of audio-frequency information obtains |
CN105931656A (en) * | 2016-04-14 | 2016-09-07 | 青岛海信移动通信技术股份有限公司 | Audio editing method and device |
CN105931656B (en) * | 2016-04-14 | 2019-07-05 | 青岛海信移动通信技术股份有限公司 | A kind of method and device of audio clips |
CN110149171A (en) * | 2019-06-25 | 2019-08-20 | 昆腾微电子股份有限公司 | A kind of sending method, method of reseptance and the device of wireless audio data |
CN110149171B (en) * | 2019-06-25 | 2022-04-26 | 昆腾微电子股份有限公司 | Wireless audio data sending method, receiving method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8121830B2 (en) | Methods and apparatus to extract data encoded in media content | |
CN101221760B (en) | Audio matching method and system | |
TWI745862B (en) | Audio transmitter processor, audio receiver processor and related methods and computer programs | |
CN101986388A (en) | MP3 intelligent error detection method | |
JP4053424B2 (en) | Robust checksum | |
RU2010144057A (en) | MASKING A TRANSFER ERROR IN A DIGITAL AUDIO SIGNAL IN THE HIERARCHICAL DECODING STRUCTURE | |
BRPI9904776B1 (en) | Process of decoding an audio signal with correction of transmission errors | |
CN102047336B (en) | Method and apparatus for generating or cutting or changing a frame based bit stream format file including at least one header section, and a corresponding data structure | |
CN101675473B (en) | Method and apparatus for processing encoded audio data | |
CN103546239A (en) | Blind test system and blind test method for LTE (long term evolution) downlink control channel | |
CN103269257B (en) | A kind of method detecting variable-length encoding code stream mistake and decoding and error detector element | |
US10943573B2 (en) | Audio output monitoring for failure detection of warning sound playback | |
CN102857833B (en) | Audio decoding system and method adapted to android stagefright multimedia framework | |
EP2242048B1 (en) | Method and apparatus for identifying frame type | |
US6959411B2 (en) | Intelligent error checking method and mechanism | |
CN111726125A (en) | Error-containing concatenated code identification method based on template matching | |
US20080226006A1 (en) | Data player and data play method | |
US20110022399A1 (en) | Auto Detection Method for Frame Header | |
US8577672B2 (en) | Audible errors detection and prevention for speech decoding, audible errors concealing | |
CN100366034C (en) | Blind transmission format detecting method suitable for broad band CDMA system | |
CN102238393A (en) | Method and device for resynchronizing audio code streams | |
CN109558509B (en) | Method and device for searching advertisements in broadcast audio | |
US20040261005A1 (en) | Algorithm for a memory-based Viterbi decoder | |
CN108389582A (en) | MPEG-2/4AAC audio decoders error detection and processing method | |
CN101626242B (en) | Improved Huffman decoding method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20110316 |