CN101930744B - Handshake protocol method for AAC audio coding - Google Patents

Handshake protocol method for AAC audio coding Download PDF

Info

Publication number
CN101930744B
CN101930744B CN2010102745097A CN201010274509A CN101930744B CN 101930744 B CN101930744 B CN 101930744B CN 2010102745097 A CN2010102745097 A CN 2010102745097A CN 201010274509 A CN201010274509 A CN 201010274509A CN 101930744 B CN101930744 B CN 101930744B
Authority
CN
China
Prior art keywords
data
fpga
coding
fifo
buffering device
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.)
Expired - Fee Related
Application number
CN2010102745097A
Other languages
Chinese (zh)
Other versions
CN101930744A (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN2010102745097A priority Critical patent/CN101930744B/en
Publication of CN101930744A publication Critical patent/CN101930744A/en
Application granted granted Critical
Publication of CN101930744B publication Critical patent/CN101930744B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention relates to a handshake protocol method for AAC audio coding, which comprises the following steps: transferring voice signals to an FPGA after the voice signals are sampled by an analog-to-digital chip (AD), and caching the voice signals in a first-in first-out data buffer (FIFO) of the FPGA; when data stored by an FIFO1 is more than data of one frame for AAC coding, setting indication signals 1 to high, otherwise setting the indication signals to low; if a DSP detects that the indication signals 1 are low, continuing the detection, and if the DSP detects that the indication signals 1 are high, taking away the data of one frame for coding; and after coding, utilizing the DSP to detect indication signals 2 at the FPGA end (whether FIFO2 is half-full), if the indication signals 2 are high, sending a long frame to the FPGA, and if the indication signals 2 are low, sending a short frame, wherein the constant rate of the output code stream for an AAC coding is ensured by the FIFO caching and the long/short frame mechanism.

Description

A kind of handshake protocol method of AAC audio coding
(1) technical field:
The present invention relates to a kind of handshake protocol method, especially a kind of handshake protocol method of AAC audio coding.Belong to the communications field.
(2) background technology:
AAC (Advanced Audio Coding) standard was accomplished in 1997, used and its multi-channel encoder to low bit rate of test shows can provide quite high sound quality through BBC (British Broadcasting Corporation) and NHK (Japan Broadcasting Corporation).Under identical tonequality situation, the AAC compressibility is higher by 30% than MP3, and under stereo 128kbps, can reach the tonequality near CD.
In the practical application of AAC, usually the sampling rate of voice signal and the stream rate behind the coding are had certain requirement, and sampled voice clock and output code flow clock possibly be non-homogeneous, the output code flow constant rate is difficult to guarantee; And because the compressibility of AAC coding is relevant with input, under the situation that input audio signal changes, if no corresponding regulation mechanism, the constant rate of output code flow also is difficult to guarantee.
(3) summary of the invention:
The objective of the invention is to propose a kind of handshake protocol method of AAC audio coding,, require output code flow to keep the problem of constant rate to solve in the prior art practical application under the particular sample rate.
Technical scheme of the present invention is summarised as: voice signal gets into FPGA after modulus conversion chip (AD) sampling; Be buffered in the data buffer (FIFO) of the FIFO of FPGA; When FIFO stores data volume greater than the required number of frames of AAC coding; Indicator signal 1 is set to height, otherwise is changed to low; DSP then continues to detect if detect indicator signal 1 for low, if detect indicator signal 1 for high, then takes frame data away, encodes; Coding back DSP detects FPGA end indicator signal 2 (whether the FIFO of FPGA stored coding back data reaches half-full); If high, then send long frame, if low to FPGA; Then send short frame, guarantee AAC coding output code flow constant rate through FIFO buffer memory and length frame mechanism to FPGA.
The handshake protocol method of a kind of AAC audio coding of the present invention, its concrete steps are following:
Step 1:
Voice signal is after modulus conversion chip is gathered, and the pcm encoder that obtains gets into FPGA and also is stored among the FIFO in the FPGA, and when the data of FIFO stored reach the encode quantity of a required frame of AAC, the indicator signal that this FIFO is corresponding is changed to height; If data bulk is less than the required number of frames of AAC coding in the FIFO, corresponding indicator signal is changed to low.
Step 2:
DSP detects the indicator signal 1 of FPGA stored data to be encoded FIFO, and indicator signal 1 characterizes the data bulk of FPGA stored coding back data FIFO, if this indicator signal is low, then continues to detect this signal; If this indicator signal is high, from FIFO, take frame data away, DSP carries out encoding operation to these frame data then.
Step 3:
After the coding completion, DSP detects the indicator signal 2 of FPGA, and the data bulk of indicator signal 2 sign FPGA stored coding back data FIFO as if half greater than the FIFO capacity of data volume in the data FIFO behind the memory encoding, then is changed to indicator signal 2 low; Otherwise, indicator signal 2 is changed to height.DSP then sends long frame data to FPGA if detect indicator signal 2 for high, if detect indicator signal 2 for low, then sends short frame data to FPGA.
Step 4:
The data that FPGA will be stored in behind the coding among the FIFO send with constant rate of speed, and DSP continues to detect the indicator signal of FPGA stored data to be encoded FIFO.
Advantage of the present invention and effect are: through data are flow to row cache, and use the length frame to guarantee the output code flow constant rate through handshake mechanism, be applicable to the requirement of AAC audio coding.
(4) description of drawings:
Fig. 1 is hardware structure figure of the present invention.
Fig. 2 is the handshake procedure figure of DSP of the present invention.
(5) practical implementation method:
Technical scheme of the present invention is summarised as: voice signal gets into FPGA after modulus conversion chip (AD) sampling; Be buffered in the data buffer (FIFO) of the FIFO of FPGA; When FIFO1 stores data volume greater than the required frame data of AAC coding; Indicator signal 1 is set to height, otherwise is changed to low; DSP then continues to detect if detect indicator signal 1 for low, if detect indicator signal 1 for high, then takes frame data away, encodes; Behind the coding, DSP detects FPGA end indicator signal 2 (it is half-full whether FIFO2 reaches), if high, then sends long frame to FPGA, if low, then sends short frame, guarantees AAC coding output code flow constant rate through FIFO buffer memory and length frame mechanism.
Below in conjunction with accompanying drawing technical scheme of the present invention is done further to describe in detail.Key step is following:
Step 1:
As shown in Figure 1, connection hardware equipment.Voice signal is after AD gathers, and the PCM that obtains (pulse code modulation (PCM)) coding gets into FPGA and is stored among the FIFO1 in the FPGA.Wherein the AD chip adopts the PCM4204 of TI company, and SF is 44100Hz, is operated in holotype, and data layout is I2S; FPGA adopts the CycloneEP1C12Q240C8 of altera corp; The degree of depth of FIFO is 1024, and width is 32, and the data of storage are 16 pcm encoders.When the data of FIFO stored reach the AAC required number of frames of encoding, the indicator signal 1 that this FIFO is corresponding is changed to height; If data bulk is less than the AAC required number of frames of encoding in the FIFO, corresponding indicator signal is changed to low.Wherein, the AAC required frame data of encoding are 1024 sampled points, 16 pcm encoders.
Step 2:
Shown in Fig. 2 the first half, DSP detects the corresponding indicator signal 1 of FPGA stored data to be encoded FIFO1, if this indicator signal is low, then continues to detect this signal; If this indicator signal is high, from FIFO, take frame data away, DSP carries out encoding operation to these frame data then.DSP adopts the TMS320C6727 of TI company, through EMIF mouth (external memory interface of DSP) reading of data from FIFO1.
Step 3:
Shown in Fig. 2 the latter half, after the completion of encoding, the indicator signal 2 of DSP detection FPGA, the data bulk of this characterization FPGA stored coding back data FIFO 2, as if the interior data volume of FIFO2 half greater than the FIFO capacity, then this signal is changed to low; Otherwise this signal is changed to height.DSP then sends long frame coding back data to FPGA if detect indicator signal 2 for high, if it is low detecting this indicator signal, then sends short frame coding back data to FPGA.Wherein the degree of depth of FIFO2 is 512 among the FPGA, and width is 32; DSP writes data through the EMIF mouth in FIFO2; Long frame data length is 372 bytes, and short frame data length is 360 bytes.Through buffering and length frame mechanism, guarantee in the FIFO2 data of buffer memory some all the time, sky or full situation can not appear in FIFO2.
Step 4:
The data that FPGA will be stored in behind the coding among the FIFO2 send with constant rate of speed, and DSP continues to detect the indicator signal 1 of FPGA.Wherein the speed of the data behind the FPGA transmission coding is 128kbps.Because sky or full situation can not appear in the data of buffer memory some all the time among the FIFO2, can guarantee the constant rate of output code flow.
The english abbreviation that occurs in the Figure of description, its implication is following:
PCM: pulse code modulation (PCM);
FIFO: the data buffer of FIFO;
AD: analog-to-digital conversion chip.

Claims (5)

1. the handshake protocol method of an AAC audio coding is characterized in that, comprises following several steps:
Step 1:
Voice signal is after modulus conversion chip is gathered; The impulse coding modulation code to be encoded that obtains gets among the FPGA; Be stored in the FIFO data buffering device in the FPGA; When the data of FIFO data buffer stored reach the required number of frames of AAC coding, the indicator signal that this FIFO data buffering device is corresponding is changed to height; If data bulk is less than the required number of frames of AAC coding in the FIFO data buffering device, corresponding indicator signal is changed to low;
Step 2:
DSP detects the indicator signal of the FIFO data buffering device of FPGA stored impulse coding modulation code to be encoded, and the indicator signal of the FIFO data buffering device of the impulse coding modulation code to be encoded as if the FPGA stored is low, then continues to detect this signal; If the indicator signal of the FIFO data buffering device of the impulse coding modulation code that the FPGA stored is to be encoded is high, from the FIFO data buffer, take frame data away, DSP carries out encoding operation to these frame data then;
Step 3:
If data volume half the greater than capacity in the FIFO data buffering device of FPGA stored coding back data, then the indicator signal with the FIFO data buffering device of FPGA stored coding back data is changed to low; Otherwise, the indicator signal of the FIFO data buffering device of data behind the FPGA stored coding is changed to height; DSP detects the indicator signal of the FIFO data buffering device of FPGA stored coding back data; Be height if detect the indicator signal of the FIFO data buffering device of FPGA stored coding back data; Then send long frame coding back data to FPGA; If it is low detecting the indicator signal of the FIFO data buffering device of FPGA stored coding back data, then send short frame coding back data to FPGA;
Step 4:
The data that FPGA will be stored in behind the coding in the FIFO data buffering device send with constant rate of speed, and DSP continues to detect the indicator signal of FPGA stored impulse coding modulation code FIFO data buffering device to be encoded.
2. according to the said method of claim 1, wherein: modulus conversion chip adopts the PCM4204 of TI company, and SF is 44100Hz, is operated in holotype, and data layout is I2S; FPGA adopts the Cyclone EP1C12Q240C8 of altera corp; The degree of depth of FIFO data buffering device is 1024, and width is 32, and the storage data are 16 digit pulse coded modulation codes; The AAC required frame data of encoding are 1024 sampled points, 16 digit pulse coded modulation codes.
3. according to the said method of claim 1, wherein: DSP adopts the TMS320C6727 of TI company, through external memory interface reading of data from the FIFO data buffer of DSP.
4. according to the said method of claim 1, wherein: DSP writes data through the EMIF mouth in the FIFO data buffering device, and the degree of depth of FIFO data buffering device is 512 among the FPGA, and width is 32; The length of long frame data is 372 bytes, and the length of short frame data is 360 bytes.
5. according to the said method of claim 1, wherein: the constant rate that FPGA sends coding back data is 128kbps.
CN2010102745097A 2010-09-07 2010-09-07 Handshake protocol method for AAC audio coding Expired - Fee Related CN101930744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102745097A CN101930744B (en) 2010-09-07 2010-09-07 Handshake protocol method for AAC audio coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102745097A CN101930744B (en) 2010-09-07 2010-09-07 Handshake protocol method for AAC audio coding

Publications (2)

Publication Number Publication Date
CN101930744A CN101930744A (en) 2010-12-29
CN101930744B true CN101930744B (en) 2012-06-06

Family

ID=43369877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102745097A Expired - Fee Related CN101930744B (en) 2010-09-07 2010-09-07 Handshake protocol method for AAC audio coding

Country Status (1)

Country Link
CN (1) CN101930744B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102543023B (en) * 2012-01-10 2014-04-02 硅谷数模半导体(北京)有限公司 Receiving equipment and method, device and system for controlling video refreshing rate
CN107295689B (en) * 2016-04-13 2019-11-12 中兴通讯股份有限公司 A kind of resource regulating method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07202820A (en) * 1993-12-28 1995-08-04 Matsushita Electric Ind Co Ltd Bit rate control system
KR960008470B1 (en) * 1994-01-18 1996-06-26 Daewoo Electronics Co Ltd Apparatus for transferring bit stream data adaptively in the moving picture
JP4003948B2 (en) * 2002-10-07 2007-11-07 株式会社日立製作所 Digital broadcast content transmission side device, reception side device, broadcast system, and broadcast method
CN101287112B (en) * 2008-06-03 2010-12-22 方春 Optimizing method controlled by adaptive code rate

Also Published As

Publication number Publication date
CN101930744A (en) 2010-12-29

Similar Documents

Publication Publication Date Title
CN103346830B (en) Voice transmission method based on big-dipper satellite and device
ES2836220T3 (en) Redundancy-based packet transmission error recovery system and procedure
US8589720B2 (en) Synchronizing timing mismatch by data insertion
WO2010090427A2 (en) Audio signal encoding and decoding method, and apparatus for same
JP2008532363A5 (en)
CN110233708B (en) Data receiving and transmitting rate adjusting device and operation method thereof
CN101930744B (en) Handshake protocol method for AAC audio coding
CN106937137B (en) Method for synchronizing audio and video of multichannel digital audio coding
CN102595114A (en) Method and terminal for playing video on low-side embedded product
CN202334778U (en) High-definition multimedia interface (HDMI) optical fiber transmission device
CN101141644B (en) Encoding integration system and method and decoding integration system and method
WO2010074200A1 (en) Adaptive differential pulse code modulation encoding apparatus and decoding apparatus
CN101521813A (en) Method and device for processing media stream
CN101646075A (en) Device and method for adjusting code rate of multimedia code stream
TWI265732B (en) Digital video storage system and related method of storing digital video data
CN107004418B (en) Digital communication method and device based on audio channel
CN103050123B (en) A kind of method and system of transmitting voice information
WO2024001138A1 (en) Apparatus and method for transmitting audio data, and electronic device
CN104038398A (en) Coal mine digital voice communication system based on CAN bus
JP2009162918A (en) Decoding reproduction apparatus and method and receiver
CA2719954A1 (en) Video serializer and deserializer with mapping conversion
RU2321168C2 (en) Method for transforming an arbitrarily changing signal
CN102063906A (en) AAC audio real-time decoding fault-tolerant control method
TWI235359B (en) Electronic anti-shock system and performance improvement method thereof
JP2847612B2 (en) Cell assembly / separation equipment

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
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Mao Xia

Inventor after: Wang Qunyang

Inventor after: Huang Ronglin

Inventor after: Yang Hong

Inventor after: Li Wei

Inventor after: Zhao Jiming

Inventor after: Chen Xiaoguang

Inventor after: Xiong Songning

Inventor after: Xue Yuli

Inventor after: Hu Haiyong

Inventor after: Chen Lijiang

Inventor after: Wang Haitao

Inventor after: Jiang Lei

Inventor after: Diao Weihe

Inventor after: Wu Xingyu

Inventor before: Mao Xia

Inventor before: Jiang Lei

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM:

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120606

Termination date: 20120907