CN1773607A - Audio-frequency decoding system and method with ring buffer - Google Patents

Audio-frequency decoding system and method with ring buffer Download PDF

Info

Publication number
CN1773607A
CN1773607A CNA2004100907195A CN200410090719A CN1773607A CN 1773607 A CN1773607 A CN 1773607A CN A2004100907195 A CNA2004100907195 A CN A2004100907195A CN 200410090719 A CN200410090719 A CN 200410090719A CN 1773607 A CN1773607 A CN 1773607A
Authority
CN
China
Prior art keywords
audio
ring buffer
data stream
minimum decoding
decoding unit
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.)
Granted
Application number
CNA2004100907195A
Other languages
Chinese (zh)
Other versions
CN100440316C (en
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.)
Sunplus Technology Co Ltd
Original Assignee
Sunplus Technology 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 Sunplus Technology Co Ltd filed Critical Sunplus Technology Co Ltd
Priority to CNB2004100907195A priority Critical patent/CN100440316C/en
Publication of CN1773607A publication Critical patent/CN1773607A/en
Application granted granted Critical
Publication of CN100440316C publication Critical patent/CN100440316C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

An audio decoding system with circular buffer comprises a circular buffer, an analyzing unit and a decoding unit. It features that analyzing unit can make justification of minimum decoding unit in audio data stream to initial position of circular buffer through audio data stream character and synchronous mechanism hidden in initial position of circular buffer so that automatic synchronization result can be still achieved when data increase or data decrease is caused by error of audio data stream transmission.

Description

Audio-frequency decoding system and method with ring buffer
Technical field
The present invention relates to audio-frequency decoding system and method, particularly relate to a kind of audio-frequency decoding system and method with ring buffer.
Background technology
Fig. 1 is the block scheme of a DVD playing device 100, and it comprises a user interface 28, a control module 29, a main control unit 21, a multi-channel decoder 22, a tone decoder 231, a video decoder 232, an audio frequency back segment processing unit 24, an audio output unit 25, a video back segment processing unit 26 and a video output unit 27.DVD playing device 100 passes through optical pickup device (not shown) and the data of reading and recording on a discs (not shown), and the video/audio stream that main control unit 21 will read is into given multi-channel decoder 22 and is divided into video data stream (video stream) with audio data stream (audio stream), and exports audio data stream to tone decoder 231 and video decoder 232 with video data stream respectively.Video data stream is carried out aftertreatment (post-processing) by video back segment processing unit 26 after deciphering through video decoder 232, passes through video output unit 27 show image pictures again on a display screen (not shown).After audio data stream is deciphered through tone decoder 231, carry out aftertreatment (post-processing) by audio frequency back segment processing unit 24, play out sound by audio output unit 25 by a loudspeaker (not shown) again, or audio output unit 25 is sent to outside code translator with acoustic information.And the user can control the various functions of DVD playing device 100 by user interface 28.
General known tone decoder 231 can (Linear Pulse Code Modulation, LPCM) form be deciphered at AC3, MPEG Audio or linear impulsive coded modulation.Audio data streams such as AC3, MPEG Audio or linear impulsive coded modulation are made up of packets of audio data (audiopack), Fig. 2 is for showing that one includes the data packet format of LPCM packets of audio data, and this packet comprises a data packet head 210 and a LPCM packets of audio data 220.LPCM packets of audio data 220 is divided into three parts such as voice data packet head 221, LPCM relevant information 222 and LPCM voice data 223.LPCM relevant information 222 as shown in Figure 3, it has comprised the relevant information of LPCM packets of audio data, wherein, Number_of_frame_headers (frame header number) field is 8 positions, and its expression has first byte of what audio frames in this LPCM packets of audio data 220.First_access_unit_pointer (the first access unit pointer) field is 16 positions, and it is illustrated in the position of first audio frame in this LPCM packets of audio data 220.
(Group of audioframes GOF) forms LPCM voice data 223 by the audio frame group as shown in Figure 4.An audio frame group comprises 20 audio frames, and each audio frame has comprised 1/600 second audio sampling data (80 sampled datas are arranged, 160 sampled datas are arranged) when the 96kHz sampling frequency when the 48kHz sampling frequency.The arrangement mode of audio sampling data when same sampling time point, is arranged according to the order of sampling and the order of channel as shown in Figure 5,3 kinds of different patterns is arranged: 16,20,24 three kinds of patterns.
As seen from Figure 5, the LPCM data stream does not have frame header (frame header), so have no idea can guarantee the synchronous of data stream by the correctness of looking for frame header and CRC as AC3 or MPEG Audio data stream.Because the arrangement mode of LPCM audio sampling data in the LPCM audio data stream, if there is not suitable synchronization mechanism, when data stream makes a mistake or damages and when causing data to increase and decrease to some extent, can cause the alignment of audio sampling data to produce mistake, and cause full of prunes decoding.
At the problems referred to above, in United States Patent (USP) USP6334026 patent case, insert one 4 to 10 synchronization character (synchronization word) before in each LPCM packets of audio data (audio pack), after an audio decoding device like this can be looked for correct synchronization character earlier, just move, it utilizes the method for inserting synchronization character, and audio decoding device can be kept synchronously with the LPCM data stream.
Yet, utilize to insert the method for synchronization character, though can effectively keep and the LPCM data stream between synchronously, but the transmitting bandwidth that is spent can increase the data volume of data stream and transmission the time and also can cause the decoding error of audio decoding device during synchronization failure.For simple LPCM audio decoding device, the method is also than inefficiency.So known LPCM audio decoding device and method still have the space of improvement.
Summary of the invention
The object of the present invention is to provide a kind of ring buffer control method and system of variable-length, synchronous can keep between an audio decoding device and the audio data stream.
According to an aspect of of the present present invention, a kind of audio-frequency decoding system with ring buffer is proposed, its reception is also kept the synchronous of an audio data stream, comprises a plurality of minimum decoding units in this audio data stream, and this system comprises a ring buffer, a resolver and a code translator.This ring buffer is in order to store a plurality of minimum decoding units; This resolver is in order to resolve this audio data stream to produce a plurality of continuous minimum decoding units, and one by one the minimum decoding unit that is produced is written in this ring buffer, and make the align reference position of this ring buffer of first minimum decoding unit in this ring buffer, and dynamically adjust the end position of ring buffer, make that the length of this ring buffer is the multiple of minimum decoding unit data length, and the end position of exporting this ring buffer is to code translator; This code translator is according to the end position of this ring buffer of this resolver output, read the end position place of minimum decoding unit continuously with section start, and each the minimum decoding unit that reads is deciphered until this ring buffer by this ring buffer.
According to another aspect of the present invention, a kind of audio coding method is provided, its reception is also kept the synchronous of an audio data stream, comprise a plurality of minimum decoding units in this audio data stream, use a ring buffer with temporary this minimum decoding unit, this method comprises: an analyzing step, in order to resolve this audio data stream to produce a plurality of continuous minimum decoding units, and one by one the minimum decoding unit that is produced is written in the ring buffer, and make the align reference position of this ring buffer of first minimum decoding unit in this ring buffer, and dynamically adjust the end position of ring buffer, make that the length of this ring buffer is the multiple of minimum decoding unit data length, and the end position of exporting this ring buffer is to code translator; One decoding step, export the end position of this ring buffer according to this analyzing step, read the end position place of minimum decoding unit continuously with section start, and each the minimum decoding unit that reads is deciphered until this ring buffer by this ring buffer.
Description of drawings
Fig. 1 is the block scheme of known DVD playing device.
Fig. 2 is the synoptic diagram of the data packet format of a LPCM packets of audio data.
Fig. 3 is the synoptic diagram of a LPCM relevant information field.
Fig. 4 is that a LPCM audio frame group forms the synoptic diagram of (GOP).
Fig. 5 is the synoptic diagram of the arrangement mode of an audio sampling data.
Fig. 6 is the block scheme with audio-frequency decoding system of ring buffer of the present invention.
Fig. 7 is the running synoptic diagram with audio-frequency decoding system of ring buffer of the present invention.
Fig. 8 is the process flow diagram of audio coding method of the present invention.
Fig. 9 is the synoptic diagram of a WAVE file layout relevant information field.
Embodiment
Fig. 6 is a kind of block scheme with audio-frequency decoding system of ring buffer of the present invention, its reception is also kept the synchronous of an audio data stream, this audio data stream comprises a plurality of audio frames, and with audio frame as a minimum decoding unit, wherein, this audio data stream is a linear impulsive coded modulation form, and is continued by a plurality of packets of audio data and to form, and each voice data includes the audio frames of a plurality of complete or parts.This audio-frequency decoding system comprises a ring buffer 520 (ring buffer), a resolver 510 and a code translator 530.
And please refer to the running synoptic diagram with audio-frequency decoding system of ring buffer of the present invention shown in Figure 7.This ring buffer 520 is in order to store a plurality of audio frames, it utilizes the reference position of the stored a plurality of audio frames of a BTS_STR_ADDR signal record, and utilize the end position of the stored a plurality of audio frames of a BTS_END_ADDR signal record, utilize these ring buffer 520 maximum lengths of a BTS_MAX_LEN signal record.
This resolver 510 is in order to receive audio data stream and to resolve the LPCM relevant information 222 that comprises in this audio data stream to produce a plurality of continuous audio frames.The decoding parameter that resolver 510 will be correlated with (quantizes word length (quantization_word_length), audio sample frequency (audio_sampling_frequency), voice-grade channel number (number_of_audio_channels),) be set to code translator 530, and the audio frame that is produced is written in this ring buffer 520 one by one, wherein first audio frame (i-1) is begun to insert by the position that the BTS_STR_ADDR signal is write down, and will the align reference position BTS_STR_ADDR of ring buffer 520 of the reference position of first audio frame (i-1).
To continue the again end position place of previous audio frame (i-1) of next audio frame (i) begins to insert, whether the audio frame total length of inserting ring buffer 520 simultaneously more at present is greater than the BTS_MAX_LEN signal, if not, representing that this ring buffer 520 still has living space can store this audio frame, so this audio frame (i) is write in this ring buffer 520, and in regular turn next audio frame (i+1) is repeated to do this inspection again.If, then expression can't completely again be inserted an audio frame to this ring buffer 520, this moment is with the end position of inserting last audio frame in this ring buffer 520 end position (BTS_END_ADDR) as this ring buffer 520, and export the end position (BTS_END_ADDR) of this ring buffer 520 to this code translator 530, and the reference position BTS_STR_ADDR place that the next audio frame (i+1) that will insert ring buffer 520 will come back to this ring buffer 520 begins to insert again.
This code translator 530 is according to the end position (BTS_END_ADDR) of this ring buffer 520 of this resolver output, read audio frame continuously until the end position place of this ring buffer 520 (BTS_END_ADDR) with section start (BTS_STR_ADDR) by this ring buffer 520, and each audio frame that reads deciphered, to produce the voice data of PCM form.When reading to the BTS_END_ADDR place continuously, return BTS_STR_ADDR.
Fig. 8 further shows the process flow diagram of audio coding method of the present invention.At first, in step S710, this resolver 510 reads this audio data stream, and resolves this audio data stream to produce audio frame.In step S712, first audio frame that is produced is written in the section start of this ring buffer 520, the section start of this ring buffer 520 is with a BTS_STR_ADDR signal indication, and with end position and these ring buffer 520 maximum lengths of a BTS_MAX_LEN signal record of the stored a plurality of audio frames of a BTS_END_ADDR signal record.
In step S714, judge whether next audio frame exceeds the length BTS_MAX_LEN of this ring buffer 520, if do not have, representing that this ring buffer 520 still has living space can store this audio frame, so this audio frame is write in this ring buffer 520 (step S716) and execution in step S714 again.If, then expression can't completely be inserted an audio frame to this ring buffer 520, this moment execution in step S718, setting ending place of ring buffer 520, it is with the end position of inserting last audio frame in this ring buffer 520 end position (BTS_END_ADDR) as this ring buffer 520.
This code translator 530 begins to read audio frame by the section start (BTS_STR_ADDR) of this ring buffer 520, and the audio frame that reads is deciphered in step S720, to produce the voice data of PCM form.In step S722,, judge whether the next audio frame that obtains exceeds the end position place of this ring buffer 520 according to the end position (BTS_END_ADDR) of the ring buffer 520 of resolver 510 output, if, resumes step S720 then, if not, execution in step S724 then.In step S724, this code translator 530 reads next audio frame by this ring buffer 520, and resumes step S722.
Fig. 9 is the relevant information that is comprised in the fmt chunk (format chunk) of the file header of a WAVE file layout, and wherein, the nBlockAlign field is represented the piece alignment (block alignment) of voice data in data block (datachunk).With this block size as a minimum decoding unit.Resolver of the present invention 510 receives and resolves a WAVE document data flow producing a plurality of minimum decoding units, and is written to one by one in the ring buffer 520.Code translator 530 is by reading the minimum decoding unit row decoding of going forward side by side, to produce the voice data of PCM form in the ring buffer.Its process is just like shown in the process flow diagram of Fig. 8.
As shown in the above description, there is a ring buffer 520 in the present invention between resolver 510 and the code translator 530, by the synchronization mechanism of resolving the relevant information (as LPCM relevant information 222) in the audio data stream and utilizing the reference position (BTS_STR_ADDR) of ring buffer 520 to be implied, code translator 530 is returned the BTS_STR_ADDR position at every turn, because resolver 510 is necessarily inserted a full audio frame, so code translator 530 can be deciphered full audio frame.So utilize technology of the present invention, can not only keep between a LPCM audio decoding device and the LPCM data stream synchronously, can avoid the data volume of data stream that known technology produces and the problem of transmitting bandwidth increase simultaneously.
The foregoing description is only given an example for convenience of description, and the interest field that the present invention advocated should be as the criterion with claims certainly, but not only limits to the foregoing description.

Claims (10)

1. audio-frequency decoding system with ring buffer, its reception also keep an audio data stream synchronously, comprise a plurality of minimum decoding units in this audio data stream, this system comprises:
One ring buffer is in order to store a plurality of minimum decoding units;
One resolver, in order to resolve this audio data stream to produce a plurality of continuous minimum decoding units, and one by one the minimum decoding unit that is produced is written in this ring buffer, and make the align reference position of this ring buffer of the reference position of first the minimum decoding unit in this ring buffer, and dynamically adjust the end position of this ring buffer, make that the length of this ring buffer is the multiple of minimum decoding unit data length, and the end position of exporting this ring buffer is to code translator; And
One code translator, the end position according to this ring buffer of this resolver output reads the end position place of minimum decoding unit until this ring buffer continuously with the section start by this ring buffer, and carries out audio decoding simultaneously.
2. audio-frequency decoding system as claimed in claim 1, wherein, this audio data stream is a linear impulsive coded modulation form.
3. audio-frequency decoding system as claimed in claim 2, wherein, this minimum decoding unit is an audio frame group or is an audio frame or is one group of complete audio sampling data.
4. audio-frequency decoding system as claimed in claim 1, wherein, this audio data stream is the WAVE file layout.
5. audio-frequency decoding system as claimed in claim 4, wherein, the unit of this minimum decoding unit is a defined size in the nBlockAlign field in the file header of WAVE file layout.
6. audio coding method, its reception also keep an audio data stream synchronously, comprise a plurality of minimum decoding units in this audio data stream, use a ring buffer with temporary minimum decoding unit, this method comprises:
One analyzing step, in order to resolve this audio data stream to produce a plurality of continuous minimum decoding units, and one by one the minimum decoding unit that is produced is written in the ring buffer, and make the align reference position of this ring buffer of the reference position of first the minimum decoding unit in this ring buffer, and dynamically adjust the end position of this ring buffer, make that the length of this ring buffer is the multiple of minimum decoding unit data length, and the end position of exporting this ring buffer is to code translator; And
One decoding step is exported the end position of this ring buffer according to this analyzing step, reads the end position place of minimum decoding unit until this ring buffer continuously with the section start by this ring buffer, and carries out audio decoding simultaneously.
7. audio coding method as claimed in claim 6, wherein, this audio data stream is a linear impulsive coded modulation form.
8. audio coding method as claimed in claim 7, wherein, this minimum decoding unit is an audio frame group or is an audio frame or is one group of complete audio sampling data.
9. audio coding method as claimed in claim 6, wherein, this audio data stream is the WAVE file layout.
10. audio coding method as claimed in claim 9, wherein, the unit of this minimum decoding unit is a defined size in the nBlockAlign field in the file header of WAVE file layout.
CNB2004100907195A 2004-11-08 2004-11-08 Audio-frequency decoding system and method with ring buffer Expired - Fee Related CN100440316C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100907195A CN100440316C (en) 2004-11-08 2004-11-08 Audio-frequency decoding system and method with ring buffer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100907195A CN100440316C (en) 2004-11-08 2004-11-08 Audio-frequency decoding system and method with ring buffer

Publications (2)

Publication Number Publication Date
CN1773607A true CN1773607A (en) 2006-05-17
CN100440316C CN100440316C (en) 2008-12-03

Family

ID=36760519

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100907195A Expired - Fee Related CN100440316C (en) 2004-11-08 2004-11-08 Audio-frequency decoding system and method with ring buffer

Country Status (1)

Country Link
CN (1) CN100440316C (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04181884A (en) * 1990-11-16 1992-06-29 Sony Corp Video signal recording device
JPH09298466A (en) * 1996-05-08 1997-11-18 Matsushita Electric Ind Co Ltd Voice coder/decoder
US6334026B1 (en) * 1998-06-26 2001-12-25 Lsi Logic Corporation On-screen display format reduces memory bandwidth for time-constrained on-screen display systems

Also Published As

Publication number Publication date
CN100440316C (en) 2008-12-03

Similar Documents

Publication Publication Date Title
US20060093331A1 (en) Audio decoding system with a ring buffer and its audio decoding method
US20080225652A1 (en) Transmitting and recording method, reproducing method, and reproducing apparatus of information and its recording medium
CN1123885C (en) Apparatus and method for reproducing a digital audio signal from a record carrier
CN100339906C (en) Method and apparatus for controlling audio-frequency flow buffering
CN101057295A (en) Method and apparatus for writing information on picture data sections in a data stream and for using the information
CN1523881A (en) Method and apparatus for recording digital data streams
KR20060076149A (en) Method and apparatus for determining arrival time of data packets
US7689306B2 (en) Audio player and method for playing audio data
KR100537393B1 (en) Recording method, recording medium and recorder
CN100440316C (en) Audio-frequency decoding system and method with ring buffer
US8712565B2 (en) Data output apparatus and data output method
RU2219655C2 (en) Device and method for transmitting digital information signal, record medium, and signal receiving device
KR20050105931A (en) Recording medium, data recording device and method, data reproducing device and method, program, and recording medium
JP2822940B2 (en) Video and audio data editing device
US6993139B2 (en) Method of and apparatus for decoding audio data
CN1335711A (en) Program recording reproducing method and apparatus
US20110110648A1 (en) Video recording device, video reproduction device, and method thereof
KR100357123B1 (en) Method for speed change playback of dvcr
JP2000152236A (en) Moving picture coder, multiplexing method, its system and recording and reproducing device
CN1741599A (en) Digital picture recorder and operating method thereof
JPH11306684A (en) Pcm data output method and device therefor
CN1610411A (en) Decoding proceeding time display method for MPEG audio frequency decoder
CN1652239A (en) Method for providing special information of programme recorded on high-density CD medium
JP2006277925A (en) Method and device for recording/reproducing data
KR19980053616A (en) Audio channel insertion device of digital video camera

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081203

Termination date: 20161108