CN101572586B - Method, device and system for encoding and decoding - Google Patents
Method, device and system for encoding and decoding Download PDFInfo
- Publication number
- CN101572586B CN101572586B CN200810094441A CN200810094441A CN101572586B CN 101572586 B CN101572586 B CN 101572586B CN 200810094441 A CN200810094441 A CN 200810094441A CN 200810094441 A CN200810094441 A CN 200810094441A CN 101572586 B CN101572586 B CN 101572586B
- Authority
- CN
- China
- Prior art keywords
- sub
- band
- index value
- value
- mlt coefficient
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 238000013139 quantization Methods 0.000 claims abstract description 170
- 239000013598 vector Substances 0.000 claims description 44
- 230000005236 sound signal Effects 0.000 claims description 27
- 238000012163 sequencing technique Methods 0.000 claims description 16
- 230000009466 transformation Effects 0.000 claims description 12
- 238000010606 normalization Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 abstract description 6
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000005540 biological transmission Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 238000005070 sampling Methods 0.000 description 4
- 230000001174 ascending effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The embodiment of the invention discloses a method, a device and a system for encoding and decoding, belong to the communication technology and can form a code stream with an embedded structure by encoding so as to obtain an encoding signal with higher quality. The encoding method in the embodiment comprises the following steps of obtaining at least two subbands of signals; obtaining the extent enveloping quantization value of each subband; obtaining layering sequence and encoding information of each subband according to the extent enveloping quantization value of each subband; and writing theencoding information of each subband into the code stream according to the layering sequence of each subband.
Description
Technical Field
The present invention relates to communications technologies, and in particular, to a method, an apparatus, and a system for encoding and decoding.
Background
With the rapid development of multimedia technology, speech and audio coding technology is more and more widely applied. In the conventional speech and audio coding techniques, Transform coding techniques are mainly used, which first perform frequency domain Transform on speech and audio signals, such as Fast Fourier Transform (FFT), Modified Discrete Cosine Transform (MDCT), Modulated Lapped Transform (MLT), and the like, then perform quantization coding on obtained frequency domain coefficients, and write the coding results into a code stream for transmission. Usually, a huffman coding scheme based on MLT transform is used.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the voice and audio coding method provided in the prior art is a coding mode with a fixed rate, and is inconvenient for network transmission; and the influence of network packet loss is large during decoding, and high-quality decoding signals cannot be obtained.
Disclosure of Invention
On one hand, the embodiment of the invention provides an encoding method, which can encode to form a code stream with an embedded structure, and obtain a decoding signal with higher quality after decoding the code stream.
The technical scheme adopted by the embodiment of the invention is as follows: a method of encoding, the method comprising:
acquiring at least two sub-bands of a signal;
obtaining the amplitude envelope quantization value of each sub-band;
acquiring the hierarchical ordering of each sub-band and the coding information of each sub-band by using the amplitude envelope quantization value of each sub-band;
and writing the coding information of each sub-band into a code stream according to the hierarchical sequence of each sub-band.
On the other hand, the embodiment of the invention provides an encoding device which can encode to form a code stream with an embedded structure, and obtain a decoding signal with higher quality after decoding the code stream.
The technical scheme adopted by the embodiment of the invention is as follows: an encoding apparatus, the apparatus comprising:
a subband obtaining unit for obtaining at least two subbands of a signal;
an amplitude envelope quantization value obtaining unit, configured to obtain an amplitude envelope quantization value of the subband obtained by the subband obtaining unit;
the hierarchical ordering and coding information acquisition unit is used for acquiring the hierarchical ordering of each sub-band and the coding information of each sub-band by using the amplitude envelope quantization value of each sub-band;
and the code stream writing unit is used for writing the coding information of each sub-band acquired by the coding information acquisition unit into the code stream according to the hierarchical ordering determined by the hierarchical ordering determination unit.
In another aspect, an embodiment of the present invention provides a decoding method, which can obtain a decoded signal with higher quality.
The technical scheme adopted by the embodiment of the invention is as follows: a method of decoding, the method comprising:
acquiring decoding information from the code stream;
determining the hierarchical ordering of each sub-band in a signal according to the decoding information, wherein the signal comprises at least two sub-bands;
and decoding the decoding information according to the hierarchical ordering to obtain a decoded signal.
In another aspect, an embodiment of the present invention provides a decoding apparatus, which can obtain a decoded signal with higher quality.
The technical scheme adopted by the embodiment of the invention is as follows: a decoding apparatus, the apparatus comprising:
a decoding information obtaining unit for obtaining decoding information from the code stream;
a hierarchical ordering obtaining unit, configured to determine hierarchical ordering of each subband in a signal according to the decoding information obtained by the decoding information obtaining unit, where the signal includes at least two subbands;
and the decoding signal acquisition unit is used for decoding the decoding information acquired by the decoding information acquisition unit according to the hierarchical ordering acquired by the hierarchical ordering acquisition unit to acquire a decoded signal.
In another aspect, an embodiment of the present invention provides a coding and decoding system, where the system includes a coding apparatus and a decoding apparatus, where the coding apparatus includes:
a subband obtaining module, configured to obtain at least two subbands of a signal;
the amplitude envelope quantization value acquisition module is used for acquiring the amplitude envelope quantization value of the sub-band acquired by the sub-band acquisition module;
the hierarchical ordering and coding information acquisition module is used for acquiring the hierarchical ordering of each sub-band and the coding information of each sub-band by using the amplitude envelope quantization value acquired by the amplitude envelope quantization value acquisition module;
and the code stream writing module is used for writing the coding information of each sub-band acquired by the coding information acquisition module into the code stream according to the hierarchical ordering determined by the hierarchical ordering determination module.
The decoding apparatus includes:
the decoding information acquisition module is used for acquiring decoding information from the code stream;
a hierarchical ordering obtaining module, configured to determine hierarchical ordering of each subband in a signal according to the decoding information obtained by the decoding information obtaining module, where the signal includes at least two subbands;
and the decoding signal acquisition module is used for decoding the decoding information acquired by the decoding information acquisition module according to the hierarchical ordering acquired by the hierarchical ordering acquisition module to acquire a decoded signal.
The technical scheme adopted by the embodiment of the invention is that hierarchical sequencing is firstly determined for different sub-bands in a signal, the hierarchical sequencing sequences the sub-bands from large to small according to the importance of information carried by the sub-bands, coding information of the corresponding sub-bands is written in sequence from large to small according to the hierarchical sequencing when a code stream is compiled, and coding information of the sub-bands carrying more important information is written in first, so that the structure of the coded code stream is divided into different layers according to the importance of the carried information, a code stream with an embedded structure is formed, and the code streams with different layers can be transmitted according to different network conditions and different requirements of users on service quality. When decoding, decoding the decoding information of each sub-band according to the arrangement sequence of each sub-band and the importance in turn, and decoding the decoding information with higher importance first, so that even if part of the decoding information with lower importance is lost in the code stream, the technical scheme provided by the embodiment of the invention can obtain the decoding signal with higher quality.
Drawings
Fig. 1 is a flowchart of an encoding method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an encoding method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of a code stream structure provided in an embodiment of the present invention;
fig. 4 is a schematic diagram of a position of an interception point when a code stream is intercepted according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating code stream truncation according to an embodiment of the present invention;
FIG. 6 is a flowchart of a decoding method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a coding/decoding system according to an embodiment of the present invention;
FIG. 8 is a block diagram of an encoding apparatus according to an embodiment of the present invention;
fig. 9 is a structural diagram of an encoding apparatus according to a second embodiment of the present invention;
fig. 10 is a block diagram of a decoding apparatus according to an embodiment of the present invention;
fig. 11 is a structural diagram of a decoding device according to a second embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the embodiments of the present invention will be described in detail with reference to the accompanying drawings, and the following description is only some embodiments of the present invention, and it will be obvious to those skilled in the art that other embodiments of the present invention can be obtained according to the embodiments without inventive exercise.
In order to solve the problems that in the prior art, an encoding mode based on MLT transformation is adopted, network transmission is inconvenient, the influence of network packet loss is large during decoding, and the quality of acquired voice and audio is poor, embodiments of the present invention provide an encoding and decoding method, apparatus, and system. The following describes embodiments of the present invention in detail.
An embodiment of the present invention provides an encoding method, as shown in fig. 1, the method including the following steps:
and step 14, writing the coding information of each sub-band into a code stream according to the hierarchical sequence of each sub-band.
The technical scheme adopted by the embodiment of the invention is that hierarchical sequencing is firstly determined for different sub-bands in a signal, the hierarchical sequencing sequences the sub-bands from large to small according to the importance of information carried by the sub-bands, coding information of the corresponding sub-bands is written in sequence from large to small according to the hierarchical sequencing when a code stream is compiled, and coding information of the sub-bands carrying more important information is written in first, so that the structure of the coded code stream is divided into different layers according to the importance of the carried information, a code stream with an embedded structure is formed, and the code streams with different layers can be transmitted according to different network conditions and different requirements of users on service quality. When decoding, decoding the decoding information of each sub-band according to the arrangement sequence of each sub-band and the importance in turn, and decoding the decoding information with higher importance first, so that even if part of the decoding information with lower importance is lost in the code stream, the technical scheme provided by the embodiment of the invention can obtain the decoding signal with higher quality.
As shown in fig. 2, the encoding method provided by the embodiment of the present invention is described in detail below.
The encoding method provided by the embodiment of the invention is based on MLT transformation, the signal provided by the embodiment of the invention comprises at least one of a voice signal and an audio signal, the signal can be represented as x (n), and n represents a label of a time domain sampling point.
At the encoding end, firstly, adding a sine window and a transformation factor to the voice and audio signals, and performing MLT transformation to obtain an MLT coefficient MLT (m), wherein the adopted transformation formula is as follows:
wherein, <math><mrow>
<mi>sin</mi>
<mrow>
<mo>(</mo>
<mfrac>
<mi>π</mi>
<mrow>
<mn>2</mn>
<mi>N</mi>
</mrow>
</mfrac>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>+</mo>
<mn>0.5</mn>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mrow></math> in order to add the sine window, the method, <math><mrow>
<mi>cos</mi>
<mrow>
<mo>(</mo>
<mfrac>
<mi>π</mi>
<mi>N</mi>
</mfrac>
<mrow>
<mo>(</mo>
<mi>n</mi>
<mo>-</mo>
<mfrac>
<mrow>
<mi>N</mi>
<mo>-</mo>
<mn>1</mn>
</mrow>
<mn>2</mn>
</mfrac>
<mo>)</mo>
</mrow>
<mrow>
<mo>(</mo>
<mi>m</mi>
<mo>+</mo>
<mn>0.5</mn>
<mo>)</mo>
</mrow>
<mo>)</mo>
</mrow>
</mrow></math> for the applied transform factor, m denotes the index of the frequency domain sample point and N denotes the index of the frequency domain sample pointThe length of a frame signal, i.e. the total number of sample points in a frame signal. Since the previous frame information is used when performing MLT transform on the current frame signal, 2N sampling points are used in equation (1), which include the sampling points in the previous frame signal of the currently processed frame signal.
In the embodiment of the present invention, 320 sampling points are taken in one frame signal, that is, N is 320, and 320 MLT coefficients can be obtained.
In the embodiment of the present invention, each 20 MLT coefficients are divided into a group as one subband, and the embodiment of the present invention includes 16 subbands.
The amplitude envelope value of the sub-band in the embodiment of the invention is the root mean square of the MLT coefficient contained in the sub-band, and can be obtained according to the following formula (2):
where r is the index of the subband, rms (r) is the amplitude envelope value of the r-th subband.
And 204, acquiring the amplitude envelope quantization value of each sub-band according to the amplitude envelope value.
And determining a quantization interval according to the obtained maximum and minimum amplitude envelope values of each sub-band, and obtaining the amplitude envelope quantization value of each sub-band by adopting a scalar quantization method.
And step 205, determining the hierarchical ordering of each sub-band by using the amplitude envelope quantization value of each sub-band.
The hierarchical ordering provided by the embodiment of the present invention is an energy ordering, and the sub-bands corresponding to the larger amplitude envelope quantization value have larger energy, so that the sub-bands are ordered according to the descending order of the amplitude envelope quantization values of the sub-bands, and the hierarchical ordering of the sub-bands is an ordering order according to the descending order of the amplitude envelope quantization values corresponding to the sub-bands.
The coding information of each sub-band comprises: the amplitude envelope index value of each sub-band, the bit classification control information and the MLT coefficient quantization index value in each sub-band.
And step 206, obtaining the amplitude envelope index value of each sub-band according to the amplitude envelope quantization value of each sub-band.
The embodiment of the invention obtains the amplitude envelope quantization index value of each sub-band by carrying out Huffman coding on the amplitude envelope quantization value of each sub-band.
And step 207, obtaining the bit classification control information according to the coding rate and the amplitude envelope quantization value of each sub-band.
And determining the total bit number occupied by each frame of voice and audio signals according to the coding rate.
The bit classification control information in each frame occupies 4 bits, and the bit classification control information indicates a classification method of each sub-band, and the classification method is a method for performing bit allocation and vector division on each sub-band. The following describes a method for acquiring the bit classification control information in detail.
The bit classification control information determines a classification method for each sub-band, and the classification method determines the bit number occupied by each sub-band in the code stream and the vector division method of the MLT coefficient in each sub-band. The different classification conditions are different for the number of bits allocated to each subband and the division of the vectors in each subband.
The sub-bands are initially classified, as shown in table 1, each sub-band has 8 classes (class 0 to class 7) for selection, and each class corresponds to the corresponding number of allocation bits in the table.
Carrying out bit allocation according to the amplitude envelope quantization value, wherein the importance ratio of the sub-band with the larger amplitude envelope quantization value is larger, so that a classification method with a smaller label is selected, and more bit numbers are allocated to the sub-band; conversely, the sub-band with a smaller amplitude envelope quantization value has a smaller importance, and the classification case with a larger label is selected, so that the number of bits allocated to the sub-band is smaller.
TABLE 1
Classification | The number of bits required to apply such classification coding |
0 | 52 |
1 | 47 |
2 | 43 |
3 | 37 |
4 | 29 |
5 | 22 |
6 | 16 |
7 | 0 |
And obtaining the residual coding bit number according to the difference between the total bit number occupied by each frame of voice and audio signals determined by the coding rate and the bit classification control information (occupying 4 bits). The total number of bits allocated for each sub-band should be close to but not greater than the number of remaining coded bits. The following describes a method of determining the assigned class for each subband.
First, an offset range is determined, the embodiment of the present invention takes [ -32, 31], an initial offset is selected in the offset range, and the classification to which a sub-band belongs is preliminarily determined by the following formula (3):
category(r)=MAX{0,MIN{7,(offset-rms′(r))/2}} (3)
where offset is an offset, rms' (r) is an amplitude envelope quantization value of the subband r, and category (r) represents categories (category 0 to category 7) to which the subband r belongs.
At the selected initial offset, the total number of bits allocated for all subbands is shown in equation (4) below:
the expected _ bits _ table (category (r)) represents the number of bits required when the subband r belongs to the category (r), the number _ of _ region represents the total number of subbands, and the expected _ number _ of _ code _ bits represents the total number of bits allocated to all subbands.
Adjusting the offset value in the range of [ -32, 31], repeatedly calculating the total bit number allocated to all the sub-bands under different offset values, and selecting the classification method corresponding to the total bit number of all the sub-bands which is closest to but not more than the residual coding bit number as the initial classification method.
And adjusting the obtained initial classification method to find the most appropriate classification method. When the classification is adjusted, there are 16 kinds of adjustment classification methods, and according to the residual coding bit number and the coding rate, a person skilled in the art can obtain an optimal classification method by using the method disclosed in the prior art, thereby determining the bit number allocated to each sub-band and the vector division method for the MLT coefficient in each sub-band. The label corresponding to the optimal classification method, i.e. the bit classification control information, occupies 4 bits in the code stream.
And 208, obtaining an MLT coefficient quantization index value in each sub-band according to the MLT coefficient and the amplitude envelope quantization value in each sub-band. The MLT coefficient quantization index value includes an MLT coefficient amplitude index value and an MLT coefficient symbol index value, and the step specifically includes:
step S1, dividing the MLT coefficient in each sub-band by the corresponding amplitude envelope quantization value of each sub-band to obtain the normalization value of the MLT coefficient in each sub-band;
step S2, quantizing the normalized value of the MLT coefficient in each sub-band to obtain the quantized value of the normalized value of the MLT coefficient in each sub-band;
step S3, dividing the normalized quantization value of MLT coefficient in each sub-band into at least two vectors according to the bit classification control information, wherein the vectors comprise amplitude and sign;
step S4, obtaining the corresponding MLT coefficient amplitude index value of each vector in each sub-band according to the amplitude of each vector;
step S5, obtaining an MLT coefficient symbol index value corresponding to each vector in each subband according to the symbol of each vector, where the MLT coefficient symbol index value represents the positive or negative of its corresponding MLT coefficient amplitude index value.
And 209, writing the amplitude envelope index value of each sub-band into a code stream.
And step 210, writing the bit classification control information into a code stream.
And step 211, writing the MLT coefficient quantization index values of the vectors in each sub-band, namely the MLT coefficient amplitude index value and the MLT coefficient symbol index value, into a code stream in sequence according to the hierarchical ordering of each sub-band and the bit classification control information.
After the code stream is written, the structure of the obtained code stream is as shown in fig. 3, and the structure sequentially includes three parts, from the first to the last of the code stream, of the amplitude envelope index value, the bit classification control information and the MLT coefficient quantization index value of each sub-band.
The coding method provided by the embodiment of the invention ensures that important information in the voice and audio signals is stored in the front part of the code stream, namely the lower layer of the code stream, and the secondary important information is stored in the rear part of the code stream, namely the higher layer of the code stream by sequencing the layers of the sub-bands.
The coding method provided by the embodiment of the invention generates a code stream with a higher coding rate, wherein the higher coding rate is not less than the code rate required by transmission relative to the code rate required by transmission in an actual network. And when the code rate required in network transmission is lower than the coding code rate, the code stream is cut off to obtain the code stream at the required code rate.
The encoding method provided by the embodiment of the invention further comprises the following steps:
and truncating the MLT coefficient quantization index value in the code stream according to the coding code rate and the current required code rate to obtain a truncation point. And acquiring a required code stream according to the interception point, wherein the required code stream comprises an amplitude envelope index value of each sub-band, bit classification control information and the MLT coefficient quantization index value of each sub-band before the interception point according to the hierarchy.
The position of the truncation point is three, as shown in figure 4,
in the first case (as shown at a in fig. 4), the truncation point is located at the intersection of the MLT coefficient sign index value and the MLT coefficient magnitude index value.
In the second case (as shown at B in fig. 4), the truncation point is located in the MLT coefficient symbol index value.
In the third case (shown at C in fig. 4), the truncation point is located in the MLT coefficient magnitude index value.
In the embodiment of the invention, the encoding end encodes the MLT coefficient within the 7kHz bandwidth range at a code rate of 16kbit/s (bits per second), and each frame has 320 bits of encoding information. As shown in fig. 5, if 8kbit/s transmission is required, a code stream of 320 bits of information is truncated, the first 160bits of information, that is, the required code stream obtained after truncation, is reserved for network communication, and the 160bits of information after the truncation point is discarded. Three parts of information in the code stream: the bit numbers occupied by the first two parts are relatively small and far less than 160bits, so that the required code stream obtained after the truncation contains the basic information of the original voice and the audio signal, and the communication quality can be ensured.
The embodiment of the invention also provides a decoding method which can obtain a decoding signal with higher quality. A decoding method, as shown in fig. 6, the method comprising the steps of:
601, acquiring decoding information from a code stream;
and 603, decoding the decoding information according to the hierarchical ordering to obtain a decoded signal.
The following describes embodiments of the present invention in detail.
The signal in the embodiment of the present invention includes at least one of a voice signal and an audio signal.
The decoding information includes: the amplitude envelope index value of each sub-band, the bit classification control information and the MLT coefficient quantization index value in each sub-band.
step T1, obtaining the amplitude envelope quantization value of each sub-band according to the amplitude envelope index value of each sub-band;
in the embodiment of the present invention, since the amplitude envelope quantization index value is obtained by using a huffman coding method during coding, the amplitude envelope quantization value of each sub-band is recovered by decoding the huffman code during decoding in the embodiment of the present invention.
And step T2, determining the hierarchical ordering of each sub-band according to the amplitude envelope quantization value of each sub-band.
And during decoding, the hierarchical ordering of the sub-bands is also the ordering of the sub-bands according to the sequence of the amplitude envelope quantization values of the sub-bands from large to small. The hierarchical ordering of each sub-band obtained in decoding is the same as the hierarchical ordering of each sub-band in encoding, so that accurate voice and audio signals can be obtained after decoding.
603, decoding the decoding information according to the hierarchical ordering to obtain a decoded signal, wherein the step specifically includes:
the MLT coefficient quantization index value comprises an MLT coefficient amplitude index value and an MLT coefficient symbol index value.
Step U1, obtaining the classification mode of each sub-band according to the coding rate of the code stream, the bit classification control information and the amplitude envelope quantization value of each sub-band;
the bit classification control information represents a label of an optimal classification method selected during coding, and a classification mode of attribution of each sub-band is obtained according to the optimal classification method corresponding to the label, the coding rate of the code stream and the amplitude envelope quantization value of each sub-band, namely the bit number occupied by each sub-band and the division method of the vector in each sub-band are obtained. And the coding rate of the code stream is the coding rate used when the original embedded structure code stream is generated during coding.
Step U2, obtaining the MLT coefficients in each sub-band by using the MLT coefficient amplitude index values and the MLT coefficient symbol index values in each sub-band according to the hierarchical ordering of each sub-band and the classification mode of each sub-band;
and according to the hierarchical sequencing of the sub-bands, decoding the sub-band which is written into the code stream firstly, namely the sub-band carrying the more important information, and then sequentially decoding the sub-band carrying the less important information. And obtaining the bit number occupied by each sub-band and the division mode of the vector in each sub-band according to the classification mode of each sub-band, and obtaining all MLT coefficient amplitude index values and MLT coefficient symbol index values in each sub-band. And decoding by using the amplitude and symbol index value to obtain the MLT coefficient in each sub-band.
And step U3, performing inverse modulation splicing transformation on the MLT coefficients of each sub-band to obtain decoded voice and audio signals.
When the code stream has network packet loss or is truncated, which causes incomplete MLT coefficient quantization index values, the decoding method provided in the embodiment of the present invention obtains the MLT coefficients of the sub-bands corresponding to the missing MLT coefficient quantization index values by using noise filling, which can be divided into two cases:
in the first case, when the MLT coefficient symbol index values are all missing (as at A, C in fig. 4), the product of the amplitude envelope quantization value of the subband corresponding to the missing MLT coefficient symbol index value and the predetermined attenuation factor is used as the amplitude value of the MLT coefficient of the subband.
In the second case, when the MLT coefficient symbol index value is partially missing (as shown in fig. 4 at B), the product of the amplitude envelope quantization value of the subband corresponding to the MLT coefficient symbol index value missing part and the predetermined attenuation factor is used as the MLT coefficient value of the MLT coefficient symbol index value missing part, i.e. the right part of the symbol index where B is located. And for the left part of the symbol index where B is located, the obtained symbol index is still utilized and combined with the corresponding amplitude index to decode the corresponding MLT coefficient. The decoding method ensures that the effective information in the code stream is decoded to the maximum extent.
According to the decoding method adopted by the embodiment of the invention, when a code stream is decoded, the arrangement sequence of the sub-bands of the voice and audio signals from large to small according to the importance of the information carried by the sub-bands is obtained by obtaining the hierarchical sequence of the sub-bands in the code stream, and the decoding information of the sub-bands is decoded according to the arrangement sequence of the sub-bands and the importance in sequence during decoding, so that the decoding information with higher importance is decoded first, and finally the decoding signal with higher quality can be obtained even if part of the decoding information with lower importance is lost in the code stream.
As shown in fig. 7, an embodiment of the present invention further provides a coding and decoding system, where the system includes a coding apparatus and a decoding apparatus, where the coding apparatus includes:
a subband obtaining module 701, configured to obtain at least two subbands of a signal;
an amplitude envelope quantization value obtaining module 702, configured to obtain an amplitude envelope quantization value of the subband obtained by the subband obtaining module;
a hierarchical ordering and coding information obtaining module 703, configured to obtain hierarchical ordering of each sub-band and coding information of each sub-band by using the amplitude envelope quantization value obtained by the amplitude envelope quantization value obtaining module;
a code stream writing module 704, configured to write the coding information of each sub-band acquired by the coding information acquiring module into the code stream according to the hierarchical ordering determined by the hierarchical ordering determining module.
The decoding apparatus includes:
a decoding information obtaining module 705, configured to obtain decoding information from the code stream;
a hierarchical ordering obtaining module 706, configured to determine a hierarchical ordering of each subband in a signal according to the decoding information obtained by the decoding information obtaining module, where the signal includes at least two subbands;
a decoding signal obtaining module 707, configured to decode the decoding information obtained by the decoding information obtaining module according to the hierarchical ordering obtained by the hierarchical ordering obtaining module, and obtain a decoded signal.
In an embodiment of the present invention, the signal includes at least one of a voice signal and an audio signal.
The hierarchical sorting and coding information acquisition module comprises a coding sorting module which is used for sorting the sub-bands according to the sequence of the amplitude envelope quantization values of the sub-bands from large to small.
The hierarchical ordering acquisition module comprises a decoding ordering module used for ordering the sub-bands according to the sequence of the amplitude envelope quantization values of the sub-bands from large to small.
An embodiment of the present invention further provides an encoding apparatus, as shown in fig. 8, the apparatus includes:
a subband obtaining unit 81 for obtaining at least two subbands of a signal;
an amplitude envelope quantization value obtaining unit 82, configured to obtain an amplitude envelope quantization value of the subband obtained by the subband obtaining unit;
a hierarchical ordering and coding information obtaining unit 83, configured to obtain hierarchical ordering of each sub-band and coding information of each sub-band by using the amplitude envelope quantization value obtained by the amplitude envelope quantization value obtaining module;
and a code stream writing unit 84, configured to write the coding information of each sub-band acquired by the coding information acquisition unit into the code stream according to the hierarchical ordering acquired by the hierarchical ordering and coding information acquisition unit.
The following describes embodiments of the present invention in detail.
In an embodiment of the present invention, the signal includes at least one of a voice signal and an audio signal.
As shown in fig. 9, the subband obtaining unit 81 includes:
an MLT coefficient obtaining module 811, configured to obtain an MLT coefficient in the signal;
a sub-band dividing module 812, configured to divide the MLT coefficients obtained by the MLT coefficient obtaining module into at least two groups, where each group of MLT coefficients is a sub-band.
An amplitude envelope quantization value obtaining unit 82, configured to obtain an amplitude envelope quantization value of the subband obtained by the subband obtaining unit.
The hierarchical ordering provided by the embodiment of the present invention is an energy ordering, and the sub-bands corresponding to the larger amplitude envelope quantization value have larger energy, so that the sub-bands are ordered according to the descending order of the amplitude envelope quantization values of the sub-bands, and the hierarchical ordering of the sub-bands is an ordering order of the amplitude envelope quantization values from ascending to descending, that is, the ordering of the sub-bands from the lower layer to the upper layer corresponds to the descending order of the amplitude envelope quantization values. The hierarchical sorting and encoding information obtaining unit 83 includes:
and the hierarchical ordering determining module 831 is configured to order the sub-bands according to a descending order of the amplitude envelope quantization values of the sub-bands.
The coding device provided by the embodiment of the invention ensures that important information in the voice and audio signals is stored in the front part of the code stream, namely the low layer of the code stream, and the secondary important information is stored in the back part of the code stream, namely the high layer of the code stream through the hierarchical sequencing determining unit.
In this embodiment of the present invention, the coding information of each subband includes: the level ordering and coding information obtaining unit 83 includes:
an amplitude envelope index value obtaining module 832, configured to obtain an amplitude envelope index value of each sub-band according to the amplitude envelope quantization value of each sub-band;
a bit classification control information obtaining module 833, configured to obtain the bit classification control information according to the coding rate and the amplitude envelope quantization value of each sub-band;
an MLT coefficient quantization index value obtaining module 834, configured to obtain an MLT coefficient quantization index value in each sub-band according to the MLT coefficient in each sub-band, the amplitude envelope quantization value, and the bit classification control information obtained by the bit classification control information obtaining module.
In this embodiment of the present invention, the MLT coefficient quantization index value includes an MLT coefficient amplitude index value and an MLT coefficient symbol index value, and the MLT coefficient quantization index value obtaining module 933 further includes:
a normalized value obtaining module, configured to divide the MLT coefficient in each sub-band by the corresponding amplitude envelope quantization value of each sub-band, and obtain a normalized value of the MLT coefficient in each sub-band;
a normalized quantized value obtaining module, configured to obtain a quantized value of the normalized value of the MLT coefficient obtained by the normalized value obtaining module;
a vector dividing module, configured to divide the normalized quantized value obtained by the normalized quantized value obtaining module into at least two vectors according to the bit classification control information, where the vectors include amplitudes and symbols;
an MLT coefficient amplitude index value obtaining module, configured to obtain, according to the amplitude of each vector, an MLT coefficient amplitude index value corresponding to each vector in each subband;
and an MLT coefficient symbol index value obtaining module, configured to obtain, according to the symbol of each vector, an MLT coefficient symbol index value corresponding to each vector in each subband.
The code stream writing unit 84 includes:
an amplitude envelope index value writing module 841, configured to write the amplitude envelope index value of each subband into a code stream;
a bit classification control information writing module 842, configured to write the bit classification control information into a code stream;
an MLT coefficient quantization index value writing module 843, configured to write the MLT coefficient amplitude index value and the MLT coefficient symbol index value of each vector in each subband into a code stream in sequence according to the hierarchical ordering of each subband and the bit classification control information.
The coding device provided by the embodiment of the invention generates a code stream with a higher coding rate, wherein the higher coding rate is not less than the code rate required by transmission relative to the code rate required by transmission in an actual network. And when the code rate required in network transmission is lower than the coding code rate, the code stream is cut off to obtain the code stream at the required code rate. When the code rate required in the actual transmission is smaller than the coding code rate, the coding device further includes:
the truncation point acquisition unit is used for truncating the MLT coefficient quantization index value in the code stream according to the coding code rate and the current required code rate to acquire a truncation point; the position of the truncation point is three, as shown in figure 4,
in the first case (as shown at a in fig. 4), the truncation point is located at the intersection of the MLT coefficient sign index value and the MLT coefficient magnitude index value.
In the second case (as shown at B in fig. 4), the truncation point is located in the MLT coefficient symbol index value.
In the third case (shown at C in fig. 4), the truncation point is located in the MLT coefficient magnitude index value.
And the required code stream acquiring unit is used for acquiring the required code stream according to the interception point acquired by the interception point acquiring unit, wherein the required code stream comprises the amplitude envelope index value of each sub-band, bit classification control information and the MLT coefficient quantization index value of each sub-band before the interception point according to the hierarchy.
The coding device provided by the embodiment of the invention firstly determines the hierarchical sequencing for each different sub-band in the voice and audio signals, the hierarchical sequencing sequences each sub-band from large to small according to the importance of the information carried by each sub-band, the coding information of the corresponding sub-band is written in sequence from large to small according to the hierarchical sequencing when compiling the code stream, the coding information of the sub-band carrying the more important information is written in first, thereby, the structure of the code stream which is coded is divided into different layers according to the importance of the carried information, a code stream with an embedded structure is formed, the code streams with different layers can be transmitted according to the difference of the network condition and the requirement of the user on the service quality, and the coding device is suitable for the current network communication; meanwhile, when the code rate required in network transmission is lower than the coding code rate, the code stream is cut off to obtain the code stream at the required code rate, and the code stream has an embedded structure, so that the cut-off required code stream contains basic information of original voice and audio signals, and the communication quality can be ensured.
An embodiment of the present invention further provides a decoding apparatus, as shown in fig. 10, the apparatus includes:
a decoding information obtaining unit 101 configured to obtain decoding information from the code stream;
a hierarchical ordering obtaining unit 102, configured to determine hierarchical ordering of each subband in a speech and audio signal according to the decoding information obtained by the decoding information obtaining unit, where the speech and audio signal includes at least two subbands;
a decoding signal obtaining unit 103, configured to decode the decoding information obtained by the decoding information obtaining unit according to the hierarchical ranking obtained by the hierarchical ranking obtaining unit, and obtain the decoded speech and audio signals.
The following describes embodiments of the present invention in detail.
In an embodiment of the present invention, the decoding information includes: the amplitude envelope index value of each sub-band, bit classification control information and MLT coefficient quantization index value in each sub-band;
as shown in fig. 12, the hierarchical ranking acquiring unit 102 includes:
an amplitude envelope quantization value obtaining module 1021, configured to obtain an amplitude envelope quantization value of each sub-band according to the amplitude envelope index value of each sub-band;
a hierarchical ordering obtaining module 1022, configured to determine a hierarchical ordering of each subband according to the amplitude envelope quantization value obtained by the amplitude envelope quantization value obtaining module.
The MLT coefficient quantization index value comprises an MLT coefficient amplitude index value and an MLT coefficient symbol index value;
the decoded signal acquisition unit 103 includes:
a classification obtaining module 1031, configured to obtain a classification manner of each subband according to a coding rate of the code stream, the bit classification control information, and an amplitude envelope quantization value of each subband;
an MLT coefficient obtaining module 1032, configured to obtain an MLT coefficient in each sub-band by using an MLT coefficient amplitude index value and an MLT coefficient symbol index value in each sub-band according to the hierarchical order of each sub-band and the classification manner of each sub-band;
a decoded signal obtaining module 1033, configured to perform inverse modulation splicing transformation on the MLT coefficients of each sub-band, and obtain decoded speech and audio signals.
When the code stream has network packet loss or is truncated, and the MLT coefficient quantization index value is incomplete, the decoding device provided in the embodiment of the present invention obtains the MLT coefficient of each sub-band corresponding to the missing MLT coefficient quantization index value by using noise padding, where the MLT coefficient obtaining module includes:
an MLT coefficient obtaining module missing an index value, configured to obtain, by using noise padding, an MLT coefficient of each subband corresponding to the missing MLT coefficient quantization index value when the MLT coefficient quantization index value is incomplete, where the MLT coefficient obtaining module can be divided into two cases:
in the first case, when the MLT coefficient symbol index values are all missing (as at A, C in fig. 4), the MLT coefficient acquisition module with missing index values takes the product of the amplitude envelope quantization value of the sub-band corresponding to the missing MLT coefficient symbol index value and a predetermined attenuation factor as the amplitude value of the MLT coefficient of the sub-band.
In the second case, when the MLT coefficient symbol index value is partially missing (as shown in fig. 4B), the MLT coefficient acquisition module with missing index value takes the product of the amplitude envelope quantization value of the subband corresponding to the MLT coefficient symbol index value missing part and a predetermined attenuation factor as the MLT coefficient value of the MLT coefficient symbol index value missing part, i.e. the right part of the symbol index where B is located. And for the left part of the symbol index where B is located, the obtained symbol index is still utilized and combined with the corresponding amplitude index to decode the corresponding MLT coefficient. The decoding method ensures that the effective information in the code stream is decoded to the maximum extent.
When the decoding device provided by the embodiment of the invention decodes the code stream, the arrangement sequence of each sub-band of the voice and audio signals from large to small according to the importance of the information carried by each sub-band is obtained by obtaining the hierarchical sequence of each sub-band in the code stream, and the decoding information of each sub-band is decoded according to the arrangement sequence of each sub-band and the importance in sequence, so that the accurate voice and audio signals obtained by decoding are ensured; meanwhile, decoding information with higher importance is decoded first, so that even if part of decoding information with lower importance is lost in the code stream, a decoding signal with higher quality is finally obtained.
Those skilled in the art will appreciate that all or part of the steps in the above embodiments may be implemented by hardware associated with program instructions. The software corresponding to the embodiment can be stored in a computer storage readable medium.
There are, of course, many possible embodiments of the invention and many modifications and variations may be made by one skilled in the art without departing from the spirit and scope of the embodiments of the invention without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (23)
1. A method of encoding, the method comprising:
acquiring at least two sub-bands of a signal;
obtaining the amplitude envelope quantization value of each sub-band;
acquiring the hierarchical ordering of each sub-band and the coding information of each sub-band by using the amplitude envelope quantization value of each sub-band; the coding information of each sub-band comprises: the amplitude envelope index value of each sub-band, bit classification control information and MLT coefficient quantization index value in each sub-band;
writing the coding information of each sub-band into a code stream according to the hierarchical sequence of each sub-band; wherein,
the step of obtaining the hierarchical ordering of each sub-band and the coding information of each sub-band by using the amplitude envelope quantization value of each sub-band comprises: acquiring an amplitude envelope index value of each sub-band according to the amplitude envelope quantization value of each sub-band; acquiring the bit classification control information according to the coding rate and the amplitude envelope quantization value of each sub-band; obtaining an MLT coefficient quantization index value in each sub-band according to the MLT coefficient, the amplitude envelope quantization value and the bit classification control information in each sub-band; the MLT coefficient quantization index value comprises an MLT coefficient amplitude index value and an MLT coefficient sign index value, wherein,
the step of obtaining the MLT coefficient quantization index value in each sub-band according to the MLT coefficient and amplitude envelope quantization value in each sub-band and the bit classification control information includes: dividing the MLT coefficient in each sub-band by the corresponding amplitude envelope quantization value of each sub-band to obtain a normalization value of the MLT coefficient in each sub-band; obtaining the quantization value of the normalization value of the MLT coefficient in each sub-band; dividing the quantization value of the normalization value of the MLT coefficient in each sub-band into at least two vectors according to the bit classification control information, wherein the vectors comprise amplitudes and symbols; acquiring MLT coefficient amplitude index values corresponding to the vectors in the sub-bands according to the amplitudes of the vectors; acquiring MLT coefficient symbol index values corresponding to the vectors in the sub-bands according to the symbols of the vectors;
the step of writing the coding information of each sub-band into a code stream according to the hierarchical ordering of each sub-band comprises the following steps: writing the amplitude envelope index value of each sub-band into a code stream; writing the bit classification control information into a code stream; and writing the MLT coefficient amplitude index value and the MLT coefficient symbol index value of each vector in each sub-band into a code stream in sequence according to the hierarchical ordering of each sub-band and the bit classification control information.
2. The encoding method according to claim 1, wherein the step of acquiring at least two subbands of the signal comprises:
acquiring a modulation splicing transformation (MLT) coefficient of the signal;
and dividing the MLT coefficients into at least two groups, wherein each group of MLT coefficients is a sub-band.
3. The encoding method according to claim 2, wherein the step of obtaining the hierarchical ordering of the subbands and the encoding information of the subbands by using the amplitude envelope quantization value of the subbands comprises:
and sequencing the sub-bands according to the sequence of the amplitude envelope quantization values of the sub-bands from large to small.
4. The encoding method according to claim 1 or 3, wherein after the step of writing the encoding information of each sub-band into the code stream according to the hierarchical ordering of each sub-band, the method further comprises:
truncating the MLT coefficient quantization index value in the code stream according to the coding code rate and the current required code rate to obtain a truncation point;
and acquiring a required code stream according to the interception point, wherein the required code stream comprises an amplitude envelope index value of each sub-band, bit classification control information and the MLT coefficient quantization index value of each sub-band before the interception point according to the hierarchy.
5. The encoding method according to claim 4, wherein the truncation point is located in the MLT coefficient amplitude index value, or in the MLT coefficient symbol index value, or at the boundary between the MLT coefficient symbol index value and MLT coefficient amplitude index value.
6. The encoding method according to claim 1 or 2, wherein the signal comprises at least one of a speech signal and an audio signal.
7. A method for decoding a code stream obtained by the encoding method according to claim 1, the method comprising:
acquiring decoding information from the code stream; the decoding information includes: the amplitude envelope index value of each sub-band, bit classification control information and MLT coefficient quantization index value in each sub-band;
determining the hierarchical ordering of each sub-band in a signal according to the decoding information, wherein the signal comprises at least two sub-bands;
decoding the decoding information according to the hierarchical ordering to obtain a decoded signal; wherein,
the step of determining the hierarchical ordering of the sub-bands in the signal according to the decoding information comprises: acquiring an amplitude envelope quantization value of each sub-band according to the amplitude envelope index value of each sub-band; determining the hierarchical ordering of each sub-band in the signal according to the amplitude envelope quantization value of each sub-band;
the MLT coefficient quantization index value comprises an MLT coefficient amplitude index value and an MLT coefficient symbol index value; the decoding information according to the hierarchical ordering, and the step of obtaining the decoded signal includes: obtaining the classification mode of each sub-band according to the coding code rate of the code stream, the bit classification control information and the amplitude envelope quantization value of each sub-band; acquiring an MLT coefficient in each sub-band by using an MLT coefficient amplitude index value and an MLT coefficient symbol index value in each sub-band according to the hierarchical ordering of each sub-band and the classification mode of each sub-band; and carrying out inverse modulation splicing transformation on the MLT coefficients of each sub-band to obtain a decoded signal.
8. The decoding method according to claim 7, wherein the step of determining the hierarchical ordering of the sub-bands in the signal according to the decoding information comprises:
acquiring an amplitude envelope quantization value of each sub-band according to the amplitude envelope index value of each sub-band;
and sequencing the sub-bands according to the sequence of the amplitude envelope quantization values of the sub-bands from large to small.
9. The decoding method according to claim 8, wherein the step of obtaining the MLT coefficients in the subbands by using the MLT coefficient magnitude index values and the MLT coefficient sign index values in the subbands according to the hierarchical ordering of the subbands and the classification of the subbands comprises:
and when the MLT coefficient quantization index value is incomplete, acquiring the MLT coefficient of each sub-band corresponding to the missing MLT coefficient quantization index value by using noise filling.
10. The decoding method according to claim 9, wherein the step of obtaining the MLT coefficients of the subbands corresponding to the missing MLT coefficient quantization index values by noise padding comprises:
when the MLT coefficient symbol index values are completely lost, taking the product of the amplitude envelope quantized value of the sub-band corresponding to the lost MLT coefficient symbol index value and a predetermined attenuation factor as the amplitude value of the MLT coefficient of the sub-band;
and when the MLT coefficient symbol index value is partially lost, taking the product of the amplitude envelope quantized value of the sub-band corresponding to the MLT coefficient symbol index value lost part and a predetermined attenuation factor as the amplitude value of the MLT coefficient of the sub-band corresponding to the MLT coefficient symbol index value lost part.
11. The decoding method according to any one of claims 7 to 10, wherein the signal comprises at least one of a speech signal and an audio signal.
12. An encoding apparatus, characterized in that the apparatus comprises:
a subband obtaining unit for obtaining at least two subbands of a signal;
an amplitude envelope quantization value obtaining unit, configured to obtain an amplitude envelope quantization value of the subband obtained by the subband obtaining unit;
the hierarchical ordering and coding information acquisition unit is used for acquiring the hierarchical ordering of each sub-band and the coding information of each sub-band by using the amplitude envelope quantization value of each sub-band;
a code stream writing unit for writing the coding information of each sub-band into the code stream according to the hierarchical ordering obtained by the hierarchical ordering and coding information obtaining unit; the coding information of each sub-band comprises: the level ordering and coding information obtaining unit comprises:
the amplitude envelope index value acquisition module is used for acquiring the amplitude envelope index value of each sub-band according to the amplitude envelope quantization value of each sub-band; the bit classification control information acquisition module is used for acquiring the bit classification control information according to the coding rate and the amplitude envelope quantization value of each sub-band; an MLT coefficient quantization index value obtaining module, configured to obtain an MLT coefficient quantization index value in each sub-band according to the MLT coefficient in each sub-band, the amplitude envelope quantization value, and the bit classification control information obtained by the bit classification control information obtaining module; wherein,
the MLT coefficient quantization index value includes an MLT coefficient amplitude index value and an MLT coefficient symbol index value, and the MLT coefficient quantization index value acquisition module includes: a normalized value obtaining module, configured to divide the MLT coefficient in each sub-band by the corresponding amplitude envelope quantization value of each sub-band, and obtain a normalized value of the MLT coefficient in each sub-band; a normalized quantized value obtaining module, configured to obtain a quantized value of the normalized value of the MLT coefficient obtained by the normalized value obtaining module; the vector dividing module is used for dividing the quantization value of the normalization value acquired by the normalization quantization value acquisition module into at least two vectors according to the bit classification control information, wherein the vectors comprise amplitudes and symbols; an MLT coefficient amplitude index value obtaining module, configured to obtain, according to the amplitude of each vector, an MLT coefficient amplitude index value corresponding to each vector in each subband; an MLT coefficient symbol index value obtaining module, configured to obtain, according to the symbol of each vector, an MLT coefficient symbol index value corresponding to each vector in each subband;
the code stream writing unit comprises: the amplitude envelope index value writing module is used for writing the amplitude envelope index value of each sub-band into a code stream; the bit classification control information writing module is used for writing the bit classification control information into a code stream; and an MLT coefficient quantization index value writing module, configured to write the MLT coefficient amplitude index value and the MLT coefficient symbol index value of each vector in each subband into a code stream in sequence according to the hierarchical ordering of each subband and the bit classification control information.
13. The encoding device according to claim 12, wherein the subband obtaining unit includes:
an MLT coefficient obtaining module, configured to obtain an MLT coefficient of the signal;
and the sub-band dividing module is used for dividing the MLT coefficients acquired by the MLT coefficient acquisition module into at least two groups, wherein each group of MLT coefficients is a sub-band.
14. The encoding device according to claim 12 or 13, wherein the hierarchical ordering and encoding information obtaining unit includes:
and the hierarchical sequencing determining module is used for sequencing the sub-bands according to the sequence of the amplitude envelope quantization values of the sub-bands from large to small.
15. The encoding apparatus according to claim 12 or 13, wherein the apparatus further comprises:
the truncation point acquisition unit is used for truncating the MLT coefficient quantization index value in the code stream according to the coding code rate and the current required code rate to acquire a truncation point;
and the required code stream acquiring unit is used for acquiring the required code stream according to the interception point acquired by the interception point acquiring unit, wherein the required code stream comprises the amplitude envelope index value of each sub-band, bit classification control information and the MLT coefficient quantization index value of each sub-band before the interception point according to the hierarchy.
16. The encoding apparatus according to claim 12 or 13, wherein the signal includes at least one of a speech signal and an audio signal.
17. An apparatus for decoding a bitstream obtained by the encoding apparatus of claim 12, the apparatus comprising:
a decoding information obtaining unit for obtaining decoding information from the code stream;
a hierarchical ordering obtaining unit, configured to determine hierarchical ordering of each subband in a signal according to the decoding information obtained by the decoding information obtaining unit, where the signal includes at least two subbands;
a decoding signal obtaining unit, configured to decode the decoding information obtained by the decoding information obtaining unit according to the hierarchical ordering obtained by the hierarchical ordering obtaining unit, and obtain a decoded signal; wherein,
the decoding information includes: the amplitude envelope index value of each sub-band, bit classification control information and MLT coefficient quantization index value in each sub-band; the hierarchical ranking obtaining unit includes: the amplitude envelope quantized value obtaining module is used for obtaining the amplitude envelope quantized value of each sub-band according to the amplitude envelope index value of each sub-band; the hierarchical ordering acquisition module is used for determining the hierarchical ordering of each sub-band according to the amplitude envelope quantization value acquired by the amplitude envelope quantization value acquisition module;
the MLT coefficient quantization index value comprises an MLT coefficient amplitude index value and an MLT coefficient symbol index value; the decoded signal acquisition unit includes:
a classification obtaining module, configured to obtain a classification mode of each subband according to a coding rate of the code stream, the bit classification control information, and an amplitude envelope quantization value of each subband; an MLT coefficient obtaining module, configured to obtain an MLT coefficient in each sub-band by using an MLT coefficient amplitude index value and an MLT coefficient symbol index value in each sub-band according to the hierarchical order of each sub-band and the classification manner of each sub-band; and the decoding signal acquisition module is used for carrying out inverse modulation splicing transformation on the MLT coefficients of each sub-band to acquire a decoded signal.
18. The decoding device according to claim 17, wherein the hierarchical order obtaining module is configured to order the sub-bands according to a descending order of the quantization values of the amplitude envelopes of the sub-bands.
19. The decoding apparatus of claim 17, wherein the MLT coefficient obtaining module comprises:
and the MLT coefficient acquisition module is used for acquiring the MLT coefficients of the sub-bands corresponding to the missing MLT coefficient quantization index values by using noise filling when the MLT coefficient quantization index values are incomplete.
20. The decoding apparatus according to any one of claims 17 to 19, wherein the signal comprises at least one of a speech signal and an audio signal.
21. A coding/decoding system comprising a coding apparatus and a decoding apparatus, the coding apparatus comprising:
a subband obtaining module, configured to obtain at least two subbands of a signal;
the amplitude envelope quantization value acquisition module is used for acquiring the amplitude envelope quantization value of the sub-band acquired by the sub-band acquisition module;
the hierarchical ordering and coding information acquisition module is used for acquiring the hierarchical ordering of each sub-band and the coding information of each sub-band by using the amplitude envelope quantization value acquired by the amplitude envelope quantization value acquisition module;
a code stream writing module for writing the coding information of each sub-band acquired by the coding information acquisition module into a code stream according to the hierarchical ordering acquired by the hierarchical ordering and coding information acquisition module; wherein the coding information of each sub-band comprises: the module for obtaining the hierarchical ordering and coding information comprises an amplitude envelope index value of each sub-band, bit classification control information and an MLT coefficient quantization index value in each sub-band, and the module for obtaining the hierarchical ordering and coding information comprises:
the amplitude envelope index value acquisition module is used for acquiring the amplitude envelope index value of each sub-band according to the amplitude envelope quantization value of each sub-band; the bit classification control information acquisition module is used for acquiring the bit classification control information according to the coding rate and the amplitude envelope quantization value of each sub-band; an MLT coefficient quantization index value obtaining module, configured to obtain an MLT coefficient quantization index value in each sub-band according to the MLT coefficient in each sub-band, the amplitude envelope quantization value, and the bit classification control information obtained by the bit classification control information obtaining module;
wherein the MLT coefficient quantization index value includes an MLT coefficient amplitude index value and an MLT coefficient symbol index value, and the MLT coefficient quantization index value acquisition module includes: a normalized value obtaining module, configured to divide the MLT coefficient in each sub-band by the corresponding amplitude envelope quantization value of each sub-band, and obtain a normalized value of the MLT coefficient in each sub-band; a normalized quantized value obtaining module, configured to obtain a quantized value of the normalized value of the MLT coefficient obtained by the normalized value obtaining module; the vector dividing module is used for dividing the quantization value of the normalization value acquired by the normalization quantization value acquisition module into at least two vectors according to the bit classification control information, wherein the vectors comprise amplitudes and symbols; an MLT coefficient amplitude index value obtaining module, configured to obtain, according to the amplitude of each vector, an MLT coefficient amplitude index value corresponding to each vector in each subband; an MLT coefficient symbol index value obtaining module, configured to obtain, according to the symbol of each vector, an MLT coefficient symbol index value corresponding to each vector in each subband;
wherein, the code stream writing module comprises:
the amplitude envelope index value writing module is used for writing the amplitude envelope index value of each sub-band into a code stream; the bit classification control information writing module is used for writing the bit classification control information into a code stream; an MLT coefficient quantization index value writing module, configured to write the MLT coefficient amplitude index value and the MLT coefficient symbol index value of each vector in each subband into a code stream in sequence according to the hierarchical ordering of each subband and the bit classification control information;
the decoding apparatus includes:
the decoding information acquisition module is used for acquiring decoding information from the code stream;
a hierarchical ordering obtaining module, configured to determine hierarchical ordering of each subband in a signal according to the decoding information obtained by the decoding information obtaining module, where the signal includes at least two subbands;
a decoding signal obtaining module, configured to decode the decoding information obtained by the decoding information obtaining module according to the hierarchical ordering obtained by the hierarchical ordering obtaining module, and obtain a decoded signal; wherein the decoding information includes: the amplitude envelope index value of each sub-band, bit classification control information and MLT coefficient quantization index value in each sub-band; the hierarchical ordering acquisition module comprises: the amplitude envelope quantized value obtaining module is used for obtaining the amplitude envelope quantized value of each sub-band according to the amplitude envelope index value of each sub-band; the hierarchical ordering acquisition module is used for determining the hierarchical ordering of each sub-band according to the amplitude envelope quantization value acquired by the amplitude envelope quantization value acquisition module;
the MLT coefficient quantization index value comprises an MLT coefficient amplitude index value and an MLT coefficient symbol index value; the decoded signal acquisition module includes: a classification obtaining module, configured to obtain a classification mode of each subband according to a coding rate of the code stream, the bit classification control information, and an amplitude envelope quantization value of each subband; an MLT coefficient obtaining module, configured to obtain an MLT coefficient in each sub-band by using an MLT coefficient amplitude index value and an MLT coefficient symbol index value in each sub-band according to the hierarchical order of each sub-band and the classification manner of each sub-band; and the decoding signal acquisition module is used for carrying out inverse modulation splicing transformation on the MLT coefficients of each sub-band to acquire a decoded signal.
22. The codec system of claim 21, wherein the signal comprises at least one of a speech signal and an audio signal.
23. The coding-decoding system according to claim 21 or 22, wherein the hierarchical ordering and coding information obtaining module comprises a coding ordering module for ordering the sub-bands according to a descending order of their magnitude envelope quantization values;
the hierarchical ordering acquisition module comprises a decoding ordering module used for ordering the sub-bands according to the sequence of the amplitude envelope quantization values of the sub-bands from large to small.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810094441A CN101572586B (en) | 2008-04-30 | 2008-04-30 | Method, device and system for encoding and decoding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810094441A CN101572586B (en) | 2008-04-30 | 2008-04-30 | Method, device and system for encoding and decoding |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101572586A CN101572586A (en) | 2009-11-04 |
CN101572586B true CN101572586B (en) | 2012-09-19 |
Family
ID=41231830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810094441A Expired - Fee Related CN101572586B (en) | 2008-04-30 | 2008-04-30 | Method, device and system for encoding and decoding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101572586B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
BR122020017853B1 (en) | 2013-04-05 | 2023-03-14 | Dolby International Ab | SYSTEM AND APPARATUS FOR CODING A VOICE SIGNAL INTO A BITS STREAM, AND METHOD AND APPARATUS FOR DECODING AUDIO SIGNAL |
CN105957533B (en) * | 2016-04-22 | 2020-11-10 | 杭州微纳科技股份有限公司 | Voice compression method, voice decompression method, audio encoder and audio decoder |
CN115116451B (en) * | 2022-06-15 | 2024-11-08 | 腾讯科技(深圳)有限公司 | Audio decoding and encoding method and device, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1210651A (en) * | 1996-11-06 | 1999-03-10 | 松下电器产业株式会社 | Image encoding/decoding method, image encoder/decoder and image encoding/decoding program recording medium |
CN1239569A (en) * | 1997-09-30 | 1999-12-22 | 西门子股份公司 | Method of encoding speech signal |
-
2008
- 2008-04-30 CN CN200810094441A patent/CN101572586B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1210651A (en) * | 1996-11-06 | 1999-03-10 | 松下电器产业株式会社 | Image encoding/decoding method, image encoder/decoder and image encoding/decoding program recording medium |
CN1239569A (en) * | 1997-09-30 | 1999-12-22 | 西门子股份公司 | Method of encoding speech signal |
Also Published As
Publication number | Publication date |
---|---|
CN101572586A (en) | 2009-11-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10546592B2 (en) | Audio signal coding and decoding method and device | |
CN101223577B (en) | Method and apparatus to encode/decode low bit-rate audio signal | |
CN100454389C (en) | Sound encoding apparatus and sound encoding method | |
CN102222505B (en) | Hierarchical audio coding and decoding methods and systems and transient signal hierarchical coding and decoding methods | |
CN102081927B (en) | Layering audio coding and decoding method and system | |
KR101061404B1 (en) | How to encode and decode audio at variable rates | |
CN101583994B (en) | Method and apparatus to encode and/or decode audio and/or speech signal | |
CN101055720B (en) | Method and apparatus for encoding and decoding an audio signal | |
CN112767954B (en) | Audio encoding and decoding method, device, medium and electronic equipment | |
CN104934036B (en) | Audio coding apparatus, method and audio decoding apparatus, method | |
EP2037451A1 (en) | Method for improving the coding efficiency of an audio signal | |
US20070078646A1 (en) | Method and apparatus to encode/decode audio signal | |
JPH11186911A (en) | Audio encoding/decoding method capable of adjusting bit rate, device therefor and recording medium with the method recorded therein | |
CN103106902A (en) | Low bit-rate audio signal coding and/or decoding method | |
CN104838443A (en) | Voice audio encoding device, voice audio decoding device, voice audio encoding method, and voice audio decoding method | |
CN107077855B (en) | Signal encoding method and apparatus, and signal decoding method and apparatus | |
MX2011000557A (en) | Method and apparatus to encode and decode an audio/speech signal. | |
CN105103225A (en) | Stereo audio encoder and decoder | |
CN101572087B (en) | Method and device for encoding and decoding embedded voice or voice-frequency signal | |
CN101281748B (en) | Method for filling opening son (sub) tape using encoding index as well as method for generating encoding index | |
CN101572586B (en) | Method, device and system for encoding and decoding | |
CN101562015A (en) | Audio-frequency processing method and device | |
EP2447943A1 (en) | Coding method, decoding method, and device and program using the methods | |
CN101308657B (en) | Code stream synthesizing method based on advanced audio coder | |
KR101786863B1 (en) | Frequency band table design for high frequency reconstruction algorithms |
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 |
Granted publication date: 20120919 Termination date: 20190430 |
|
CF01 | Termination of patent right due to non-payment of annual fee |