CN1212580A - 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
CN1212580A
CN1212580A CN 98117867 CN98117867A CN1212580A CN 1212580 A CN1212580 A CN 1212580A CN 98117867 CN98117867 CN 98117867 CN 98117867 A CN98117867 A CN 98117867A CN 1212580 A CN1212580 A CN 1212580A
Authority
CN
China
Prior art keywords
mpeg
decoder
coding
encoder
algorithm
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
CN 98117867
Other languages
Chinese (zh)
Other versions
CN1065400C (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

Images

Landscapes

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

Abstract

The present invention provides a compatible AC-3 and MPEG-2 audio-frequency coding-decoding device and its algorism. Said invented coding-decoding device is placed on a control panel, and divided into two independent units according to the coder and decoder, at the same time, according to the characteristics of AC-3 and MPEG-2, in the coder end and decoder end two algorithmic routines are stored respectively, and by using keys on the panel the AC-3 or MPEG-2 algorism can be selectively used to code audio-frequency signals of six sound channels, and at the decoder end it not only can use panel to make selection to decoder, and when the panel selection produces error, it can automatically identify coding mode to make correct decoding operation to output sweet multi-channel ambient stereophonic effect.

Description

The audio codec of compatible AC-3-3 and MPEG-2 and algorithm thereof
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, contrast test by the various tissues in the world, 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.
Another object of the present invention provides the algorithm of the audio codec of compatible AC-3-3 and MPEG-2, can realize the codec functions of AG-3 and two kinds of algorithms of MPEG-2 by the algorithm flow of the encoder in the algorithm, decoder.This purpose implementation method is: the algorithm of the audio codec of a kind of compatible AC-3-3 and MPEG-2, comprise the decoder algorithm of encoder algorithm, and wherein: a described stream sign indicating number device 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,
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,
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 1The decoding of=scale factor,
E) realize l by k 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 value.
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 same side's 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 the hardware platform structural representation of the audio coder of compatible AC-3-3 and MPEC-2;
Fig. 2 is the algorithm flow chart about encoder among the present invention;
Fig. 3 is about decoder algorithm flow chart among the present invention.
Among the figure: 1-represents codec hardware platform control panel.
By Fig. 1,2,3, the present invention is 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 a MPEG-2 control unit, a D/A converter that has the decoder of compressed bit stream mathematics channel entrance, a ROM, a six sound channels.
The algorithm of the audio codec of a kind of compatible AC-3-3 and MPEG-2 comprises the decoder algorithm of encoder algorithm, and wherein: a described stream sign indicating number device 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,
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,
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,
E) 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 value.
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 AC-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, the printed words that occur " just at loading procedure " on the panel display screen, 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.
Join with analog interface or AES/EBU interface mode and encoder by 6 tunnel audio signals of audio workstation, LD phonograph or the output of other signal sources, obtain the digital signal that three tunnel speed are 3.072MB/S (wherein effectively code check is 1.920MB/S) by A/D conversion or AES/EBU interface convertor, and join through the data/address bus that closes behind road, the buffer memory with first DSP, 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.Six road sampling point data of compression coding output are delivered to the D/A converter by serial mode, export six road voice datas.
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 of symbol platform 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 DPS 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, the present invention has divided 25 critical bands at least in 20Hz~20kHz frequency band, long piece for 512 of steady-state signal employings, then adopt 256 short block for transient signal, finish the mutual conversion of every blocks of data time-domain and frequency-domain then by the 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-MD-CT conversion of forward and backward three audio blocks respectively.

Claims (2)

1. the audio codec of compatible AC-3-3 and MPEG-2, comprise cell encoder and decoder element, it is characterized in that 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 decoding unit are co-located on a control panel.
2. the algorithm of the audio codec of compatible AC-3-3 and MPEG-2 comprises encoder algorithm and decoder algorithm, it is characterized in that described encoder algorithm flow comprises:
A) by A/D input PCM value,
B) realize b by a 1=Substrip analysis and b 2=FFT conversion,
C) by b 1Realize C 1=scale factor calculation,
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,
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) by j 1Realize k 1The decoding of=Bit Allocation in Discrete,
E) by k 1Realize l 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 value.
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 true CN1212580A (en) 1999-03-31
CN1065400C 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101790757B (en) * 2007-08-27 2012-05-30 爱立信电话股份有限公司 Improved transform coding of speech and audio signals
US8553895B2 (en) 2005-03-04 2013-10-08 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Device and method for generating an encoded stereo signal of an audio piece or audio datastream
CN105845145A (en) * 2010-12-03 2016-08-10 杜比实验室特许公司 Method for processing media data and media processing system
CN113454712A (en) * 2019-02-27 2021-09-28 索尼集团公司 Transmission device, transmission method, reception device, and reception method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8553895B2 (en) 2005-03-04 2013-10-08 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Device and method for generating an encoded stereo signal of an audio piece or audio datastream
CN101790757B (en) * 2007-08-27 2012-05-30 爱立信电话股份有限公司 Improved transform coding of speech and audio signals
CN105845145A (en) * 2010-12-03 2016-08-10 杜比实验室特许公司 Method for processing media data and media processing system
CN113454712A (en) * 2019-02-27 2021-09-28 索尼集团公司 Transmission device, transmission method, reception device, and reception method

Also Published As

Publication number Publication date
CN1065400C (en) 2001-05-02

Similar Documents

Publication Publication Date Title
CN1110145C (en) Scalable audio coding/decoding method and apparatus
CN1154085C (en) Scalable audio coding/decoding method and apparatus
JP2908270B2 (en) Adaptive coding system
CN1046608C (en) Apparatus and method for data compression using signal-weighted quantizing bit allocation
CN1210873C (en) Transmitting system for carrying different encoding principles
CN1756086B (en) Multichannel audio data encoding/decoding method and apparatus
CN1822508B (en) Method and apparatus for encoding and decoding digital signals
CN1705980A (en) Parametric audio coding
CN1945695A (en) Method and apparatus to encode/decode audio signal
CN1093843A (en) The method of high efficient coding and decoding and device
CN116884421A (en) Method and apparatus for generating a hybrid spatial/coefficient domain representation of an HOA signal
CN1262990C (en) Audio coding method and apparatus using harmonic extraction
CN1116348A (en) Adaptive digital audio encoding system
CN107610710B (en) Audio coding and decoding method for multiple audio objects
CN101485094A (en) Method and system for multi-channel audio encoding and decoding with backward compatibility based on maximum entropy rule
CN105164749A (en) Hybrid encoding of multichannel audio
CN101105940A (en) Audio frequency encoding and decoding quantification method, reverse conversion method and audio frequency encoding and decoding device
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
CN1485849A (en) Digital audio encoder and its decoding method
CN1641749A (en) Method and apparatus for converting audio data
CN1424713A (en) High frequency coupled pseudo small wave 5-tracks audio encoding/decoding method
KR20230069173A (en) Quantizing Spatial Audio Parameters
CN116982108A (en) Determination of spatial audio parameter coding and associated decoding

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