CN1909657A - MPEG audio frequency decoding method - Google Patents

MPEG audio frequency decoding method Download PDF

Info

Publication number
CN1909657A
CN1909657A CNA2005100363311A CN200510036331A CN1909657A CN 1909657 A CN1909657 A CN 1909657A CN A2005100363311 A CNA2005100363311 A CN A2005100363311A CN 200510036331 A CN200510036331 A CN 200510036331A CN 1909657 A CN1909657 A CN 1909657A
Authority
CN
China
Prior art keywords
mentioned
frame length
synchronization character
mpeg audio
accumulation
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
Application number
CNA2005100363311A
Other languages
Chinese (zh)
Inventor
黄泰勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LG Electronics Huizhou Co Ltd
Original Assignee
LG Electronics Huizhou Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by LG Electronics Huizhou Co Ltd filed Critical LG Electronics Huizhou Co Ltd
Priority to CNA2005100363311A priority Critical patent/CN1909657A/en
Publication of CN1909657A publication Critical patent/CN1909657A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention relates to a MPEG video decode method, especially decoding the input stream at 44.1 kHz sample frequency, wherein said method comprises: checking the first synchronous word of input stream, and decoding the report head except from the synchronous word; via said decoding, calculating out the accumulated frame length (AFL); if the frame length has been calculated, checking next synchronous word, and checking the report head information, judging if there is mistake; if there is not mistake, calculating the frame length, to decode the frame.

Description

The mpeg audio decoding method
Technical field
The invention relates to the invention of mpeg audio aspect, more particularly, is the invention about the coding/decoding method of mpeg audio that the inlet flow with 44.1kHz sample frequency is decoded.
Background technology
Now, by publicly-owned medium such as networks, MPEG Layer-2 etc. is used for broadcasting stream and MPEGLayer-3 bit streams such as (MP3) can be easy to realize.And MP3 is in worldwide, and as the portable personal playing media, because it can bring very big economic interests, present most of manufacturing company all produces it.
And in mpeg audio, MP3 carries out digital coding from the CD with 44.1kHz sample frequency, and most of stream all has the sample frequency of 44.1kHz.In the mpeg audio specification, when having the sample frequency of 44.1kHz, use and fill (padding) position, coordinate mean bit rate (mean bit rate), carry out mpeg audio decoding.
But, only use the mpeg audio decoding of this filler (padding bit) to exist when mistake occurring in the filler, owing to can not calculate frame length, existence can not be carried out the problem of mpeg audio data decode exactly.
Summary of the invention
The present invention its objective is to the user provides a kind of in mpeg decode in order to address the above problem, and does not consider filler, directly calculates frame length, searches synchronization character (syncword), the mpeg audio decoding method of decoding.
To achieve these goals, mpeg audio decoding method of the present invention comprises following several stages: the stage of detecting first synchronization character of inlet flow; The stage that header information except the synchronization character of above-mentioned detection is decoded; By above-mentioned decoding, calculate the stage of the frame length (AFL) of accumulation; If calculated the frame length of above-mentioned accumulation, detect next synchronization character, the above-mentioned header information of verification judges whether to exist stage of mistake; If the judged result in last stage is not have mistake, calculate frame length, the stage that frame is decoded.
The frame length of above-mentioned accumulation preferably calculates by the bit rate index (bitrate_index) and sampling frequency (sampling_frequency) information of header information.
And, the initial value of counter is set at the number of the frame length of above-mentioned accumulation.
And the characteristics that above-mentioned next synchronization character detects are: do not assert that the frame length number that is present in above-mentioned accumulation is a synchronization character with interior 0xFFF, when its during greater than the frame length of accumulation, carry out synchronization character and detect.
And it is on the frame length bit bit position (M-position) of accumulation that above-mentioned frame calculates, and the above-mentioned header information of verification deducts the length of bit column position when not having mistake (N-position).
Mpeg audio decoding method of the present invention is not provided by the information of the filler that provides in the mpeg audio specification, by the accurate frame length of direct calculating, detects synchronization character exactly, decodes, and reaches the credible effect that improves product.And, in order to search next synchronization character,, also can reach and carry out CRC (Cyclic RedundancyCheck: the CRC) effect of Chu Liing simultaneously by operation unpack process.
And, judge information in advance about the header 1 of next frame, can grasp the poor of present decoding and next decoding in advance, can tackle the variation that in next frame, takes place on one's own initiative.
Description of drawings
Fig. 1 is the block diagram of mpeg audio decoding method of the present invention.
Fig. 2 is the schematic diagram of the header of inlet flow.
What Fig. 3 showed is the schematic diagram of second synchronization character testing process among Fig. 1.
Embodiment
Below, the embodiment to mpeg audio decoding method of the present invention is elaborated with reference to the accompanying drawings.
At first, what deserves to be mentioned is that the present invention does not use the information of filler, under the situation of 44.1KHz, directly try to achieve frame length, then, carry out synchronization character and detect.
Usually, the length before frame length refers to from synchronization character to next synchronization character.In the present invention, redefined frame length.
Fig. 1 is the block diagram of mpeg audio decoding method of the present invention, is by calculating the decoding that new frame length carries out.
At first, inlet flow is detected first synchronization character (S11).
Fig. 2 has shown the header of inlet flow.In the present invention, the residue field except the synchronization character territory in the header is defined as header 1 arbitrarily.
If detect above-mentioned first synchronization character (S11), to being defined as the residue field except the synchronization character territory arbitrarily--first header 1 decode (S12).
Utilize the bitrate_index and the sampling_frequency information that obtain by above-mentioned decoding, do not consider according to formula (1) and formula (2) calculating filler accumulation frame length (accumulatedframe length) (AFL).
AFL (bit)=1152*bitrate/sampling_frequency...... formula (1)
AFL(byte)=1152/8*bitrate/sampling_frequency
=144*bitrate/sampling_frequency...... formula (2)
Here, what deserves to be mentioned is, the initial value of counter is set at the number of the AFL (byte) that tries to achieve, this moment, the position of bit column was called as the M-position.
Then, detect next synchronization character (S13).
Although in the mpeg audio encoder, in the corresponding zone of voice data part, the 0xFFF value of byte align (align) is considered in fact not exist,, it is present in the stream of coding sometimes.For fear of this situation, utilize above-mentioned header 1 is decoded and the AFL that calculates, detect next synchronization character.
Above-mentioned next synchronization character detects as shown in Figure 3, is present in the AFL number and is not identified as synchronization character with interior 0xFFF, has only when 0xFFF is bigger than the AFL value, just moves testing process.
If detect above-mentioned next synchronization character (S13), the next header 1 (S14) of verification judges whether there is mistake in the later information of synchronization character.
That is, confirm whether ID, layer, sampling_frequency etc. exist mistake or do not have variation.
After the affirmation, will not have that the position of bit column is called the N-position when unusual.
Then, read in the bit column position in above-mentioned S12 and the S14 process, calculate frame length (S15).
Frame length can be tried to achieve by deducting the N position from the M position simply.
If the situation of M-N greater than AFL+1 takes place, it is handled according to erroneous condition, by acquiescence or repeatedly before this methods such as frame handle.
At last,, read the information of the frame length of calculating, carry out frame decoding (S16) if calculate above-mentioned frame length (S15).
Above-mentioned repeatedly this process is decoded to whole stream.

Claims (5)

1, the mpeg audio decoding method is characterized in that, comprises following several stages:
Detect the stage of first synchronization character of inlet flow;
The stage that header information except the synchronization character of above-mentioned detection is decoded;
By above-mentioned decoding, calculate the stage of the frame length (AFL) of accumulation;
If calculated the frame length of above-mentioned accumulation, detect next synchronization character, the above-mentioned header information of verification judges whether to exist stage of mistake;
If the judged result in last stage is not have mistake, calculate frame length, and the stage of decoding.
2, mpeg audio decoding method as claimed in claim 1 is characterized in that: the frame length of above-mentioned accumulation utilizes the bit rate index of header information and sampling frequency information to calculate.
3, mpeg audio decoding method as claimed in claim 1 is characterized in that: the number that the initial value of counter is set at the frame length of above-mentioned accumulation.
4, as claim item 1 described mpeg audio decoding method, it is characterized in that: it is exactly not assert that the frame length number that is present in above-mentioned accumulation is a synchronization character with interior 0xFF that above-mentioned next synchronization character detects, when its during greater than the frame length of accumulation, carry out synchronization character and detect.
5, as claim item 1 described mpeg audio decoding method, it is characterized in that: it is on the bit bit position (M-position) of the frame length of accumulation that above-mentioned frame calculates, and the above-mentioned header information of verification deducts the length of the position (N-position) of the bit column when not having mistake.
CNA2005100363311A 2005-08-05 2005-08-05 MPEG audio frequency decoding method Pending CN1909657A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2005100363311A CN1909657A (en) 2005-08-05 2005-08-05 MPEG audio frequency decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2005100363311A CN1909657A (en) 2005-08-05 2005-08-05 MPEG audio frequency decoding method

Publications (1)

Publication Number Publication Date
CN1909657A true CN1909657A (en) 2007-02-07

Family

ID=37700631

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2005100363311A Pending CN1909657A (en) 2005-08-05 2005-08-05 MPEG audio frequency decoding method

Country Status (1)

Country Link
CN (1) CN1909657A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547820A (en) * 2013-09-27 2019-03-29 Lg 电子株式会社 Send, receive the device and method of broadcast singal
WO2022183841A1 (en) * 2021-03-02 2022-09-09 北京沃东天骏信息技术有限公司 Decoding method and device, and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547820A (en) * 2013-09-27 2019-03-29 Lg 电子株式会社 Send, receive the device and method of broadcast singal
CN109547820B (en) * 2013-09-27 2020-12-01 Lg 电子株式会社 Apparatus and method for transmitting and receiving broadcast signal
WO2022183841A1 (en) * 2021-03-02 2022-09-09 北京沃东天骏信息技术有限公司 Decoding method and device, and computer readable storage medium

Similar Documents

Publication Publication Date Title
JP4160902B2 (en) Method and apparatus for determining whether a data frame contains encoded additional data
JP4875204B2 (en) Apparatus and method for processing encoded audio data
CN1573929A (en) Audio decoder and audio decoding method
CN1575491A (en) Method and apparatus for decoding a coded digital audio signal which is arranged in frames containing headers
US20060114136A1 (en) Method and apparatus for selecting particular decoder based on bitstream format detection
KR101854469B1 (en) Device and method for determining bit-rate for audio contents
CN103165151A (en) Method and device for playing multi-media file
CN1909657A (en) MPEG audio frequency decoding method
CN1279530C (en) Input buffer management for the playback control for media players
KR100781512B1 (en) Apparatus and method for playing multimedia files selecting multimedia file which can be played in embedded device
CN1193345C (en) Audible error detector and controller utilizing channel quality data and iterative synthesis
JP4860140B2 (en) Method and circuit for searching for sync word in compressed audio bitstream, and recording medium recording said method
CN1467635A (en) Intelligent mp3 error checking method and mechanism
CN103165157A (en) Method and device for locating playing position of no-indexing audio video interleaved (AVI) file and player
US7386082B2 (en) Method and related apparatus for searching the syncword of a next frame in an encoded digital signal
CN108389582A (en) MPEG-2/4AAC audio decoders error detection and processing method
US9317504B2 (en) Method for searching for flash video tag in bitstream and searching apparatus thereof
CN1774883A (en) Media encoded data transmission method, apparatus and program
Silovsky et al. Assessment of speaker recognition on lossy codecs used for transmission of speech
CN1288905C (en) Data decoder and method of decoding data
US20080225658A1 (en) Audio reproducing apparatus and audio reproducing method
US20050249482A1 (en) Reproduction apparatus and reproduction method
CN117012207B (en) Audio file detection method and device and computing equipment
CN101064152A (en) Method for playing MP3 files
CN106534887B (en) A kind of Random time sequence comparative approach and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication