CN1065400C - Compatible AC-3 and MPEG-2 audio-frequency code-decode device and its computing method - Google Patents

Compatible AC-3 and MPEG-2 audio-frequency code-decode device and its computing method Download PDF

Info

Publication number
CN1065400C
CN1065400C CN 98117867 CN98117867A CN1065400C CN 1065400 C CN1065400 C CN 1065400C CN 98117867 CN98117867 CN 98117867 CN 98117867 A CN98117867 A CN 98117867A CN 1065400 C CN1065400 C CN 1065400C
Authority
CN
China
Prior art keywords
mpeg
decoder
encoder
dsp
digital
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
CN 98117867
Other languages
Chinese (zh)
Other versions
CN1212580A (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.)
Hi-Tech Research & Development Center State Science & Technology Commission
Original Assignee
Hi-Tech Research & Development Center State Science & Technology Commission
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 Hi-Tech Research & Development Center State Science & Technology Commission filed Critical Hi-Tech Research & Development Center State Science & Technology Commission
Priority to CN 98117867 priority Critical patent/CN1065400C/en
Publication of CN1212580A publication Critical patent/CN1212580A/en
Application granted granted Critical
Publication of CN1065400C publication Critical patent/CN1065400C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

The present invention provides a compatible AC-3 and MPEG-2 audio-frequency codec device and a calculating method thereof. The codec device is arranged on a control plate and is divided into two independent units according to an encoder and a decoder, and simultaneously, two calculating method programs are stored at the end of the encoder and the end of the decoder according to the characteristics of AC-3 and MPEG-2. The calculating method of AC-3 or MPEG-2 is selected by keys on a panel for causing the audio-frequency signals of six sound channels to be encoded, the end of the decoder can carry out a decoded process by the selection of the panel and can also carry out the correct decoded process by a code automatic identification mode when the selection of the panel is wrong, and sweet multitrack ambient stereophonic effect is output.

Description

The audio codec of compatible AC-3-3 and MPEG-2
The present invention relates to a kind of audio codec of consumer electronics product, the audio codec of especially a kind of compatible AC-3-3 and MPEG-2.
The current audio compress technique has been widely used in consumer product and communication apparatus, as DVD-VCD and DVB etc.Digital accompaniment standard for high definition TV HDTV forms, the U.S. is based on the AC-3 standard, Europe is then based on Moving Picture Experts Group-2, these two kinds of standards are by the contrast test of international various tissues, its effect is more or less the same, and has certain correspondence from the complexity of algorithm software and the structure of algorithm.
The audio codec that the purpose of this invention is to provide a kind of compatible AC-3-3 and MPEG-2, this decoder be based upon on the same hardware platform and with the digital accompaniment standard in the U.S., Europe with the platform of this Campatible as the selection that adapts to China HDTV digital accompaniment standard.
The object of the present invention is achieved like this: the audio codec of a kind of compatible AC-3-3 and MPEG-2, comprise cell encoder and decoder element, wherein: described cell encoder has an AC-3 or MPEG-2 control unit, an A/D converter that has the encoder of compressed bit stream digital channel outlet, a ROM, a six sound channels; Described decoder element has an AC-3 or MPEG-2 control unit, a D/A converter that has the decoder of compressed bit stream digital channel import, a ROM, a six sound channels.Described cell encoder and decoder element are co-located on the control panel.
The present invention is the algorithm that utilizes the audio codec of compatible AC-3-3 and MPEG-2, can realize the codec of AC-3 and two kinds of algorithms of MPEG-2 by the algorithm flow in encoder, the decoder.The algorithm of the audio codec of this compatible AC-3-3 and MPEG-2 comprises the decoder algorithm of encoder algorithm, and wherein: described encoder algorithm flow comprises:
A) by A/D input PCM value,
B) by a) realizing b 1=Substrip analysis and b 2=FFT conversion,
C) by b 1Realize C 1=scale factor calculation is by b 2And C 1Realize C 2=calculating masking threshold carries out Bit Allocation in Discrete,
D) by C 2Realize d 1=determine non-transmission subband,
E) by C 1And d 1Realize e 1=ratio chart coding is by d 1, e 1Realize e 2=adjustment bit rate,
F) by e 1, e 2Realize f 1The quantification of=subband sample,
G) by f 1Realize g 1=sample value coding,
H) by g 1Realize h 1=Bit Allocation in Discrete coding,
I) by h 1Realize i 1=framing;
Described decoder algorithm flow process comprises:
J) input coding bit stream,
K) realize the decoding of k=Bit Allocation in Discrete by j,
L) realize l by k 1The decoding of=scale factor, l 2=scale factor is selected information decoding,
M) by l 1, l 2Realize m 1=separate sample value,
N) by m 1Realize n 1=sample value quantizes again,
O) by n 1Realize o 1The normalization of=sample value,
P) by o 1Realize p 1=synthetic sub-band filter,
Q) by p 1Realize q 1=output PCM.
Owing to adopted above-mentioned technical scheme, reached the AC-3 of international popular and these two kinds of multichannel code decode algorithms of MPEG-2 be combined on the same hardware with the selected HDTV sound accompaniment standard of complete adaptive China, this good effect be the U.S. (AC-3), Europe (MPEG-2) single sound accompaniment standard can not compare.
Again the present invention is done detailedly carefully to state below in conjunction with drawings and Examples:
Fig. 1 is that the audio codec of compatible AC-3-3 and MPEG-2 is formed block diagram;
Fig. 2 is the algorithm flow chart of encoder;
Fig. 3 is the decoder algorithm flow chart.
Referring to Fig. 1, the present invention is the audio codec of a kind of compatible AC-3-3 and MPEG-2, comprise cell encoder and decoder element, it is characterized in that cell encoder has an AC-3 or MPEG-2 control unit, an encoder that has the outlet of compressed bit stream digital channel, a ROM, the analog-to-digital converter A/D of a six sound channels, wherein, encoder is by input buffer, 4 digital signal processing unit DSP and output state are formed, the input buffer input is connected with the A/D converter output terminal, the input buffer output is connected with first DSP1,4 DSP are that serial mode connects, promptly first DSP1 handles and transfers data to second DSP2, pass to the 3rd DSP3 again after handling for second, send the 4th DSP4 after the 3rd DSP3 handles again to, after output state the packed data code stream is exported; Decoder element has an AC-3 or MPEG-2 control unit, a digital-to-analog converter D/A who has the decoder of compressed bit stream digital channel import, a ROM, a six sound channels, wherein, decoder is made up of 3 digital signal processing unit DSP and data input, output state, the data input buffer carries out the packed data code stream of input to be connected with first DSP1 behind format conversion of serial parallel data and the buffer memory, 3 DSP are that serial mode connects, and the 3rd DSP3 sends audio signal by digital-to-analog converter D/A.
In the present invention, the basis of its conceptual design is to be based upon on these two kinds of different audio compression algorithm of compatible AC-3-3 and MPEG-2, the main idea of the method that realizes is that core digital signal processing unit (DSP unit) is carried out the loading of AC-3 and MPEG-2, its process is: after the encoder opening power, occur on the panel display screen " just at loading procedure " printed words, the control unit of encoder loads the MPEG-2 program by the state that lacks of " AC-3 and MPEG-2 select " to the DSP unit, when treating " audio coder " to occur on the screen, be loaded, enter operating state.After the user selected " AC-3 " and pressed " affirmation " by menu option this moment, system can enter AC-3 program stress state.
Control unit is made up of with some logic control circuits DSP TMS320c50 and peripheral circuit thereof.Its function is to realize that panel shows control, and will exist the AC-3 of its external memory storage or the machine code of MPEG-2 program to be passed to the DSP unit with the serial pass-through mode, has just finished the program loading.
By audio workstation, 6 tunnel audio signals of LD phonograph or other signal sources output are joined with analog interface or AES/EBU interface mode and encoder, obtain the digital signal that three tunnel speed are 3.072MB/S (wherein effectively code check is 1.920MB/S) by 6 vocal tract analogs/digitalizer A/D conversion or AES/EBU interface convertor, and through closing the road, data/address bus with first DSP behind the buffer memory joins, each road sampling point data enters the DSP unit and compresses processing with MPEG-2 algorithm standard subsequently, the DSP unit is to be made of multi-disc DSP cascade, mode with streamline is worked, below further narration.
Decoder is then carried out the inverse process of above-mentioned computing.The each several part framework is identical, does not calculate owing to do not carry out mental model, and the DSP processing unit is simpler, and decoder judges it is AC-3 or MPEG-2 code stream according to frame synchronization code word in the compressed bit stream of receiving, and loads the respective algorithms program by control unit.6 road sampling point data of compression coding output are delivered to 6 sound channel digitals/analogue converter (D/A) by serial mode, export 6 road voice datas.6 sound channel digitals/analogue converter (D/A) are used for the digital signal after the decoder processes is reverted to simulated audio signal.
Encoder is determined MPEG-2 among the ROM or AC-3 coded program are loaded to encoder according to the selection on the panel after start.Simulated audio signal is input to encoder, becomes digital signal and input to encoder after the A/D conversion, and encoder is carried out encryption algorithm and formed the code stream output that meets the corresponding encoded standard.
In decoding end, decoder is determined MPEG-2 among the ROM or AC-3 decoding program are loaded to decoder according to the selection on the panel after start.Compressed bit stream behind the encoded device coding is input to decoder, and decoder is carried out decoding algorithm to recover the multichannel audio data and to deliver to D/A, after become analog signal after the D/A conversion.So just finished the process of coding and decoding.
The compression coding and decoding algorithm is to realize that according to the masking effect of people's ear he is a complex calculations process.Need the operand of 80-100MIPS (1,000,000 instruction per second) for the 56002 chip MPEG-2 algorithms of selected in the present invention Motorola, so encoder has been used 4 DSP56002, decoder has used 3 DSP56002 to finish coding and decoding function.The workload of each sheet is divided and is decided according to the operand of each functional block in the algorithm flow and the situation of Data transmission.
The MPEG-2 coding is divided into three modules of quantization encoding framing of Subband Analysis Filter, psychoacoustic model calculating, sample value.
In the 1st DPS, main task is to analyze sub-band filter, promptly 1152 * 6 PCM sample values of six sound channels are carried out 6 * 32 * 36 grouping, that is to say the subband that the baseband signal of each sound channel is separated into 32 equidistances, the corresponding sample value of each extraction is formed one group from 32 subbands, making it is that 512 FIR mode filter and 32 * 64 square is old by a length, and 32 data points that go out through this conversion are by sub-bands of frequencies sequence arrangement from low to high; First DSP passes to the PCM data by analysis filter and Ge Lu among second DSP after calculating and finishing.In this sheet DSP, the PCM sample value of input has been carried out the FFT conversion to finish the conversion of time domain to frequency domain, the amplitude peak of each subband that calculates according to FFT and the maximum ratio factor of each subband, and calculate comprehensive masking threshold according to acoustic model at heart, carry out scale factor calculation at the 3rd DSP, and each subband is carried out the bit branch according to comprehensive thresholding and sound pressure level.Then the operation result serial is inputed to the 4th DSP, at last frame head, scale factor, Bit Allocation in Discrete and supplementary bit combination are formed the MPEG-2 code stream.
First DSP of decoder reads in the frame code stream of MPEG-2 and separates frame, solves the frame head of MPEG-2 from the metadata cache of decoder, scale factor is selected 12 sample values of information and five road sampling points and subwoofer channel, and sampling point is carried out de-quantization conciliate normalization.Calculate the back result is reached second DSP, second matrixing of doing five circuit-switched data, the filtering of one tunnel synthetic sub-band filter and subwoofer channel.The 3rd DSP done the synthetic filtering of all the other four sound channels.So what spread out of is exactly the PCM sample value of 5.1 sound channels from the 3rd, sends by D/A then.
Must consider the problem of real-time with DSP realization MPEG-2 audio algorithm, because the data volume that will transmit between the DSP is very big, 1/3rd of chip running time approximately can account for, therefore must emphasize arrangement optimization to algorithm structure, 56002 X, Y memory have only 256 BYTES, memory under program has 512 BYTES, when doing parallel instruction, the speed of service that sheet is interior and sheet is outer has been compared very big difference, so must be placed on sub-band filter part and FFT conversion in the sheet, because this part program has a large amount of parallel instructions and cycle-index quite a lot of.In addition owing to 56002 are DSP of fixed point, so if the divide instruction that provides with chip itself will expend a large amount of instruction numbers, so in the present invention will be the division of integer computing of tabling look-up instead.In addition when calculating sample value and quantize, be according to corresponding address table and calculate quantification with grouping information and addressing when either large or small (measure not calculation measure) with the quantization level of sample value, step-length, Bit Allocation in Discrete number.
The AC-3 algorithm comprises following components: the selection of block length and the selection of bank of filters, this algorithm is to have divided 25 critical bands in 20Hz~20kHz frequency band at least, long piece for 512 of steady-state signal employings, then adopt 256 short block for transient signal, then by the maintain the achievements of one's predecessors mutual conversion of every blocks of data time-domain and frequency-domain of MDCT conversion.
The spectrum envelope coding is the requirement according to code check and frequency resolution, adopt three kinds of patterns that the exponential part AC that encodes is taked differential coding to spectrum envelope on frequency, the index section in the code stream be by behind the adiabatic index and then the difference group of some become.
Core-bits is distributed and desirable Bit Allocation in Discrete.According to the psychoacoustic model theory of people's ear, adopt the forward-backward algorithm adaptive bit to distribute, and according to auditory model adjustment and correction bit parameter.Comprise some clear and definite model parameters in the code stream, the realistic model parameter can be by these parameter adjustments in the decoder.
The technology that also has high-frequency coupling in addition contracts and mixes and dynamic range control.
Therefore the AC-3 coding has been used 4 DSP56002, finished MDCT conversion, core-bits distribution and desirable Bit Allocation in Discrete, psychoacoustic model respectively and calculate and framing.3 DSP56002 have been used in decoding, finish unpacking and anti-MDCT conversion of forward and backward three audio blocks respectively.

Claims (1)

1, the audio codec of a kind of compatible AC-3-3 and MPEG-2, comprise cell encoder and decoder element, it is characterized in that cell encoder has an AC-3 or MPEG-2 control unit, an encoder that has the outlet of compressed bit stream digital channel, a ROM, the analog-to-digital converter A/D of a six sound channels, wherein, encoder is by input buffer, 4 digital signal processing unit DSP and output state are formed, the input buffer input is connected with the A/D converter output terminal, the input buffer output is connected with first DSP1,4 DSP are that serial mode connects, promptly first DSP1 handles and transfers data to second DSP2, pass to the 3rd DSP3 again after handling for second, send the 4th DSP4 after the 3rd DSP3 handles again to, after output state the packed data code stream is exported; Decoder element has an AC-3 or MPEG-2 control unit, a digital-to-analog converter D/A who has the decoder of compressed bit stream digital channel import, a ROM, a six sound channels, wherein, decoder is made up of 3 digital signal processing unit DSP and data input, output state, the data input buffer carries out the packed data code stream of input to be connected with first DSP1 behind format conversion of serial parallel data and the buffer memory, 3 DSP are that serial mode connects, and the 3rd DSP3 sends audio signal by digital-to-analog converter D/A.
CN 98117867 1998-09-01 1998-09-01 Compatible AC-3 and MPEG-2 audio-frequency code-decode device and its computing method Expired - Fee Related CN1065400C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 98117867 CN1065400C (en) 1998-09-01 1998-09-01 Compatible AC-3 and MPEG-2 audio-frequency code-decode device and its computing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 98117867 CN1065400C (en) 1998-09-01 1998-09-01 Compatible AC-3 and MPEG-2 audio-frequency code-decode device and its computing method

Publications (2)

Publication Number Publication Date
CN1212580A CN1212580A (en) 1999-03-31
CN1065400C true CN1065400C (en) 2001-05-02

Family

ID=5225755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 98117867 Expired - Fee Related CN1065400C (en) 1998-09-01 1998-09-01 Compatible AC-3 and MPEG-2 audio-frequency code-decode device and its computing method

Country Status (1)

Country Link
CN (1) CN1065400C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005010057A1 (en) 2005-03-04 2006-09-07 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Apparatus and method for generating a coded stereo signal of an audio piece or audio data stream
WO2009029035A1 (en) * 2007-08-27 2009-03-05 Telefonaktiebolaget Lm Ericsson (Publ) Improved transform coding of speech and audio signals
TW202405797A (en) * 2010-12-03 2024-02-01 美商杜比實驗室特許公司 Audio decoding device, audio decoding method, and audio encoding method
CN113454712A (en) * 2019-02-27 2021-09-28 索尼集团公司 Transmission device, transmission method, reception device, and reception method

Also Published As

Publication number Publication date
CN1212580A (en) 1999-03-31

Similar Documents

Publication Publication Date Title
CN1154085C (en) Scalable audio coding/decoding method and apparatus
CN1110145C (en) Scalable audio coding/decoding method and apparatus
CN101789792B (en) Multichannel audio data encoding/decoding method and apparatus
CN1942928B (en) Module and method for processing audio signals
CN1822508B (en) Method and apparatus for encoding and decoding digital signals
CN100361405C (en) Scalable audio coder and decoder
CN1062097C (en) High efficiency encoding or decoding method and device
JPH0851366A (en) Adaptive encoding system
CN1926608A (en) Device and method for processing a multi-channel signal
CN1136850A (en) Process, device and systems for determing a masking level for a subband in a subband audio encoder
CN1705980A (en) Parametric audio coding
CN1248824A (en) Audio signal coding device and method, decoding device and method
CN1116348A (en) Adaptive digital audio encoding system
CN1945695A (en) Method and apparatus to encode/decode audio signal
US20090132238A1 (en) Efficient method for reusing scale factors to improve the efficiency of an audio encoder
CN101485094A (en) Method and system for multi-channel audio encoding and decoding with backward compatibility based on maximum entropy rule
EP1249837A2 (en) A method for decompressing a compressed audio signal
CN101111997A (en) Perception-aware low-power audio decoder for portable devices
CN1065400C (en) Compatible AC-3 and MPEG-2 audio-frequency code-decode device and its computing method
CN1138254C (en) Audio signal comprssing coding/decoding method based on wavelet conversion
CN1641749B (en) Method and apparatus for converting audio data
CN1485849A (en) Digital audio encoder and its decoding method
WO2023173941A1 (en) Multi-channel signal encoding and decoding methods, encoding and decoding devices, and terminal device
KR100287861B1 (en) Device and method of nonuniform quantization for channels in digital audio stereo mode
CN101065796A (en) Method and apparatus for coding/decoding using inter-channel redundance

Legal Events

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

Granted publication date: 20010502

Termination date: 20130901